upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/runtime/src
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 16:38:20 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-25 16:38:20 -0500
commitc116c3fa28983444cd47feea0461e1e7eaac83b5 (patch)
treef2f4821b744b678f0cf1ce98638e981ea737b0c6 /runtime/src
parent5866d6974e86fc2d39e6ce0691af63b354f6c8b9 (diff)
parent24d8af66af151f024b0b520fb397d899924f5486 (diff)
Merge main into t-drive-overlay
docs/boot.md: main added LEONIDA_WRITE_DIR / LEONIDA_SAVE_DIR to the --overlay bullet and a new "Under Wine on Linux" section; keep both and the T: paragraph of this branch after main's sentences. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'runtime/src')
-rw-r--r--runtime/src/arena_blocks.h257
-rw-r--r--runtime/src/arena_size.h31
-rw-r--r--runtime/src/bcpack.cpp423
-rw-r--r--runtime/src/bcpack.h33
-rw-r--r--runtime/src/bcpack_stream.h222
-rw-r--r--runtime/src/buffer_va_index.h6
-rw-r--r--runtime/src/clzero_patch.h200
-rw-r--r--runtime/src/command_list.h70
-rw-r--r--runtime/src/console_heap_vsharp_slots.h115
-rw-r--r--runtime/src/console_texture_layout.h611
-rw-r--r--runtime/src/d3d12_xs_frame_events.h47
-rw-r--r--runtime/src/deferred_image_binding.h31
-rw-r--r--runtime/src/depth24_fragment.h18
-rw-r--r--runtime/src/descriptor_table.h69
-rw-r--r--runtime/src/dstorage_swizzle.h29
-rw-r--r--runtime/src/dstorage_trace.h12
-rw-r--r--runtime/src/dual_source_fragment.h59
-rw-r--r--runtime/src/frame_pacer.h49
-rw-r--r--runtime/src/fsdraw_probe.h242
-rw-r--r--runtime/src/gfx10_descriptors.h45
-rw-r--r--runtime/src/gpu_label_memory.h95
-rw-r--r--runtime/src/guarded_copy.h59
-rw-r--r--runtime/src/image_memory.h231
-rw-r--r--runtime/src/indirect_clamp.comp152
-rw-r--r--runtime/src/indirect_clamp_spv.h287
-rw-r--r--runtime/src/indirect_dispatch_count.comp21
-rw-r--r--runtime/src/indirect_dispatch_count_spv.h160
-rw-r--r--runtime/src/indirect_draw_stats.h104
-rw-r--r--runtime/src/local_diagnostics.h29
-rw-r--r--runtime/src/main.cpp311
-rw-r--r--runtime/src/mem_probe.h570
-rw-r--r--runtime/src/native_pso.h581
-rw-r--r--runtime/src/pe_loader.cpp470
-rw-r--r--runtime/src/pe_loader.h14
-rw-r--r--runtime/src/pipeline_cache_file.h68
-rw-r--r--runtime/src/pipeline_cache_store.h69
-rw-r--r--runtime/src/pipeline_profile.h70
-rw-r--r--runtime/src/pipeline_workers.h173
-rw-r--r--runtime/src/present_dump.h256
-rw-r--r--runtime/src/quad_index_expand.comp44
-rw-r--r--runtime/src/quad_index_expand.h182
-rw-r--r--runtime/src/quad_index_expand_spv.h148
-rw-r--r--runtime/src/queue_families.h23
-rw-r--r--runtime/src/rect_list_geometry.h263
-rw-r--r--runtime/src/rgba4_fragment.h81
-rw-r--r--runtime/src/root_signature.cpp27
-rw-r--r--runtime/src/root_signature.h29
-rw-r--r--runtime/src/shader_directory.h56
-rw-r--r--runtime/src/shader_library.h208
-rw-r--r--runtime/src/subgroup_size.h8
-rw-r--r--runtime/src/submit_phases.h133
-rw-r--r--runtime/src/thread_sampler.h404
-rw-r--r--runtime/src/thread_stacks.cpp237
-rw-r--r--runtime/src/thread_stacks.h38
-rw-r--r--runtime/src/title_geometry_watch.h138
-rw-r--r--runtime/src/title_page_watch.h941
-rw-r--r--runtime/src/title_texture_memory.h62
-rw-r--r--runtime/src/title_texture_refresh.h63
-rw-r--r--runtime/src/title_va_alias.h375
-rw-r--r--runtime/src/title_window_plan.h66
-rw-r--r--runtime/src/tls_host.cpp13
-rw-r--r--runtime/src/value_write_sink.h77
-rw-r--r--runtime/src/vulkan13_features.h6
-rw-r--r--runtime/src/vulkan_aftermath.cpp822
-rw-r--r--runtime/src/vulkan_aftermath.h77
-rw-r--r--runtime/src/vulkan_backend.h1303
-rw-r--r--runtime/src/vulkan_bindless.h510
-rw-r--r--runtime/src/vulkan_depth24.h18
-rw-r--r--runtime/src/vulkan_device_fault.h484
-rw-r--r--runtime/src/vulkan_gpu_labels.h321
-rw-r--r--runtime/src/vulkan_graphics_shader_modules.h65
-rw-r--r--runtime/src/vulkan_index_view.h21
-rw-r--r--runtime/src/vulkan_indirect_clamp.h613
-rw-r--r--runtime/src/vulkan_indirect_dispatch_count.h34
-rw-r--r--runtime/src/vulkan_memory.h6
-rw-r--r--runtime/src/vulkan_predicate.h2
-rw-r--r--runtime/src/vulkan_predicated_copy.h2
-rw-r--r--runtime/src/vulkan_present.h440
-rw-r--r--runtime/src/vulkan_present_compose.h2
-rw-r--r--runtime/src/vulkan_present_splash.h74
-rw-r--r--runtime/src/vulkan_replay.h1502
-rw-r--r--runtime/src/vulkan_scratch.h134
-rw-r--r--runtime/src/vulkan_title_image_pool.h113
-rw-r--r--runtime/src/xdxr_build.comp61
-rw-r--r--runtime/src/xdxr_build.h30
-rw-r--r--runtime/src/xdxr_build.inc15379
86 files changed, 23516 insertions, 8408 deletions
diff --git a/runtime/src/arena_blocks.h b/runtime/src/arena_blocks.h
new file mode 100644
index 000000000..c7ac093d8
--- /dev/null
+++ b/runtime/src/arena_blocks.h
@@ -0,0 +1,257 @@
1#pragma once
2// The GPU address arena's free-block map (docs/d3d12_vulkan.md section 3.3).
3//
4// One map of free blocks, offset -> size, first fit at a requested alignment. Every access is made under the
5// device's arena mutex, and a walk holds no iterator across a call: each step reads a block's offset and size and
6// lets its iterator go, so a block cut under the walk cannot leave the next step reading a freed node. A freed
7// node reads as garbage (seen once in arena_allocate: an access violation reading the nil flag of a null map child
8// at 0x19 -- the freed block's first two pointers reused by the heap's free list, while the rest of the node still
9// looked like a node). A map access outside the lock does that to a concurrent walk: the arena's first block used
10// to be inserted by create_arena with no lock, and an insert rebalances the tree, writing child links under a
11// walker on another thread. It is locked now, and the walk is immune either way.
12//
13// The class keeps no lock of its own (the device's arena mutex is the lock), so a test can drive it directly.
14#include <algorithm>
15#include <cstddef>
16#include <cstdint>
17#include <limits>
18#include <map>
19#include <utility>
20#include <vector>
21
22namespace leonida {
23
24class ArenaBlocks {
25public:
26 struct Block {
27 std::uint64_t offset;
28 std::uint64_t size;
29 };
30
31 // What a release found wrong with the range it was given: a range the arena never had, or bytes that are free
32 // already (a double free, which would otherwise double-count them and let two live ranges overlap).
33 enum class Fault { none, outside_arena, double_free, bytes_mismatch, broken_map };
34 static constexpr const char* kFaultNames[] = {"none", "range outside the arena", "double free",
35 "free bytes disagree with the live bytes", "block map broken"};
36
37 // [reserved, size) is the one free block: the arena's first bytes hold the zero page and the quad index list
38 // (kArenaReserved in the device), which no resource may have.
39 void reset(std::uint64_t reserved, std::uint64_t size) {
40 blocks_.clear();
41 reserved_ = reserved;
42 size_ = size;
43 free_bytes_ = size > reserved ? size - reserved : 0;
44 if (free_bytes_) blocks_.emplace(reserved, free_bytes_);
45 cuts_ = 0;
46 fault_ = Fault::none;
47 faults_ = 0;
48 interrupted_ = false;
49 }
50
51 // First fit of `bytes` at `alignment`: `keep_out(lo, hi)` returns the end of a range of the arena no
52 // allocation may cover that overlaps [lo, hi), or 0 when there is none (the device passes the title's own
53 // memory through src/title_va_alias.h). False when no free block holds the request.
54 template<typename KeepOut>
55 bool allocate(std::uint64_t bytes, std::uint64_t alignment, KeepOut&& keep_out, std::uint64_t& out) {
56 if (!bytes || !alignment || bytes > size_) return false;
57 interrupted_ = false;
58 // Blocks in offset order. A step carries only a block's offset and size; the iterator is gone before
59 // keep_out() runs and the next block is looked up from the map again, so a cut made under the walk
60 // (cuts() changed) is seen, and the search starts over on the map as it is now.
61 for (int attempt = 0; attempt < kAttempts; ++attempt) {
62 const std::uint64_t cuts = cuts_;
63 std::uint64_t cursor = reserved_;
64 for (;;) {
65 const auto next = blocks_.lower_bound(cursor);
66 if (next == blocks_.end()) return false;
67 const std::uint64_t block = next->first;
68 const std::uint64_t block_size = next->second;
69 const std::uint64_t end = block + block_size;
70 std::uint64_t start = 0;
71 if (align_up(block, alignment, start)) {
72 while (start < end && bytes <= end - start) {
73 const std::uint64_t keep_out_end = keep_out(start, start + bytes);
74 if (!keep_out_end) break;
75 if (keep_out_end <= start || !align_up(keep_out_end, alignment, start)) {
76 start = end;
77 break;
78 }
79 }
80 } else {
81 start = end;
82 }
83 if (cuts_ != cuts) break; // the map moved under the walk: search the new one
84 if (start < end && bytes <= end - start) {
85 const auto target = blocks_.find(block); // nothing held between steps
86 if (target == blocks_.end() || target->second != block_size) break;
87 cut(target, start, bytes);
88 out = start;
89 return true;
90 }
91 cursor = end;
92 }
93 if (cuts_ == cuts) return false; // nothing moved: a genuine refusal
94 }
95 interrupted_ = true; // cut under the search kAttempts times: reported by the device
96 return false;
97 }
98
99 // [offset, offset + bytes) exactly, inside one free block (a console descriptor heap whose address shaders
100 // already use). False when any of it is taken or past the arena.
101 bool allocate_at(std::uint64_t offset, std::uint64_t bytes) {
102 if (!bytes || offset < reserved_ || offset > size_ || bytes > size_ - offset) return false;
103 auto it = blocks_.upper_bound(offset);
104 if (it == blocks_.begin()) return false;
105 --it;
106 if (offset + bytes > it->first + it->second) return false;
107 cut(it, offset, bytes);
108 return true;
109 }
110
111 // Gives [offset, offset + bytes) back and merges it with the blocks it touches. A range that is partly free
112 // already is merged as its union and reported as a double free, so the accounting cannot count a byte twice.
113 Fault release(std::uint64_t offset, std::uint64_t bytes) {
114 if (!bytes) return Fault::none;
115 if (offset < reserved_ || offset > size_ || bytes > size_ - offset) return note_fault(Fault::outside_arena);
116 const std::uint64_t released_end = offset + bytes;
117 std::uint64_t begin = offset;
118 std::uint64_t end = released_end;
119 bool already_free = false;
120 auto it = blocks_.lower_bound(offset);
121 if (it != blocks_.begin()) {
122 const auto previous = std::prev(it);
123 const std::uint64_t previous_end = previous->first + previous->second;
124 if (previous_end >= offset) { // the released bytes start inside a free block, or right after it
125 if (previous_end > offset) already_free = true;
126 begin = previous->first;
127 end = std::max(end, previous_end);
128 free_bytes_ -= previous->second;
129 it = blocks_.erase(previous);
130 }
131 }
132 while (it != blocks_.end() && it->first <= end) {
133 if (it->first < released_end) already_free = true;
134 end = std::max(end, it->first + it->second);
135 free_bytes_ -= it->second;
136 it = blocks_.erase(it);
137 }
138 blocks_.emplace(begin, end - begin);
139 free_bytes_ += end - begin;
140 ++cuts_;
141 return note_fault(already_free ? Fault::double_free : Fault::none);
142 }
143
144 // The arena's bytes: the size it was created with and the first block no resource may have.
145 std::uint64_t size() const { return size_; }
146 std::uint64_t reserved() const { return reserved_; }
147 std::uint64_t free_bytes() const { return free_bytes_; }
148 std::size_t count() const { return blocks_.size(); }
149
150 // Every free block in offset order: a report, or a diagnostic that prints what is free.
151 std::vector<Block> blocks() const {
152 std::vector<Block> out;
153 out.reserve(blocks_.size());
154 for (const auto& [offset, size] : blocks_) out.push_back({offset, size});
155 return out;
156 }
157
158 // The free block that holds `offset` (if one does) and the offset of the next block after it: what the compute
159 // input probe reads to tell a free range from a live one without walking the map itself
160 // (d3d12_compute_input_probe.h backing()).
161 bool free_at(std::uint64_t offset, std::uint64_t& block_offset, std::uint64_t& block_size,
162 std::uint64_t& next_offset) const {
163 auto it = blocks_.upper_bound(offset);
164 bool inside = false;
165 if (it != blocks_.begin()) {
166 const auto previous = std::prev(it);
167 if (offset >= previous->first && offset < previous->first + previous->second) {
168 inside = true;
169 block_offset = previous->first;
170 block_size = previous->second;
171 }
172 }
173 next_offset = it == blocks_.end() ? size_ : it->first;
174 return inside;
175 }
176
177 // The largest free block, for the high-water report (D3D-55).
178 Block largest() const {
179 Block best{0, 0};
180 for (const auto& [offset, size] : blocks_)
181 if (size > best.size) best = {offset, size};
182 return best;
183 }
184
185 // The block map is a partition of the arena's free bytes: sorted, inside the arena, no overlap, and summing to
186 // free_bytes(). Walked for a report, and by the device when its cheap check (free_bytes + live == size -
187 // reserved) fails or LEONIDA_ARENA_CHECK=1 is set.
188 Fault check() const {
189 std::uint64_t sum = 0, last_end = reserved_;
190 for (const auto& [offset, size] : blocks_) {
191 if (!size || offset < last_end || offset > size_ || size > size_ - offset) return Fault::broken_map;
192 sum += size;
193 last_end = offset + size;
194 }
195 return sum == free_bytes_ ? Fault::none : Fault::bytes_mismatch;
196 }
197
198 // Whether the map's free bytes and the device's live bytes add up to the arena: a byte released twice, or a
199 // released range that was never allocated, breaks this. O(1), so the device checks it on every call.
200 bool consistent(std::uint64_t live_bytes) const {
201 const std::uint64_t total = size_ > reserved_ ? size_ - reserved_ : 0;
202 return live_bytes <= total && free_bytes_ == total - live_bytes;
203 }
204
205 // Faults reported so far, and the last one this call reported.
206 std::uint64_t faults() const { return faults_; }
207 Fault last_fault() const { return fault_; }
208 // Cuts made so far: how often a block was split, taken whole or merged. A cut changes it under a walk.
209 std::uint64_t cuts() const { return cuts_; }
210 // The last allocate gave up because the map was cut under its search kAttempts times; the request may have been
211 // refusable anyway, so the device reports it rather than counting it as a fault.
212 bool interrupted() const { return interrupted_; }
213 static constexpr int kAttempts = 8;
214
215private:
216 static bool align_up(std::uint64_t value, std::uint64_t alignment, std::uint64_t& out) {
217 const std::uint64_t rem = value % alignment;
218 if (!rem) {
219 out = value;
220 return true;
221 }
222 const std::uint64_t add = alignment - rem;
223 if (value > std::numeric_limits<std::uint64_t>::max() - add) return false;
224 out = value + add;
225 return true;
226 }
227
228 Fault note_fault(Fault fault) {
229 fault_ = fault;
230 if (fault != Fault::none) ++faults_;
231 return fault;
232 }
233
234 using Map = std::map<std::uint64_t, std::uint64_t>;
235 void cut(Map::iterator it, std::uint64_t start, std::uint64_t bytes) {
236 const std::uint64_t offset = it->first;
237 const std::uint64_t end = offset + it->second;
238 blocks_.erase(it);
239 free_bytes_ -= end - offset;
240 if (start > offset) {
241 blocks_.emplace(offset, start - offset);
242 free_bytes_ += start - offset;
243 }
244 if (start + bytes < end) {
245 blocks_.emplace(start + bytes, end - (start + bytes));
246 free_bytes_ += end - (start + bytes);
247 }
248 ++cuts_;
249 }
250
251 Map blocks_; // offset -> size
252 std::uint64_t reserved_ = 0, size_ = 0, free_bytes_ = 0, cuts_ = 0, faults_ = 0;
253 Fault fault_ = Fault::none;
254 bool interrupted_ = false;
255};
256
257} // namespace leonida
diff --git a/runtime/src/arena_size.h b/runtime/src/arena_size.h
index 196b03e3e..66eed0dc2 100644
--- a/runtime/src/arena_size.h
+++ b/runtime/src/arena_size.h
@@ -9,7 +9,7 @@
9// The decision is a pure function of the variable's text and the two limits, so it is tested without a GPU 9// The decision is a pure function of the variable's text and the two limits, so it is tested without a GPU
10// (arena_size_test). It depends only on the Vulkan headers. 10// (arena_size_test). It depends only on the Vulkan headers.
11 11
12#include <vulkan/vulkan_core.h> 12#include "vulkan_memory.h"
13 13
14#include <algorithm> 14#include <algorithm>
15#include <cstdint> 15#include <cstdint>
@@ -21,6 +21,9 @@ constexpr VkDeviceSize kArenaMiB = VkDeviceSize(1) << 20;
21constexpr VkDeviceSize kArenaDefaultMiB = 256; 21constexpr VkDeviceSize kArenaDefaultMiB = 256;
22constexpr VkDeviceSize kArenaMinMiB = 16; 22constexpr VkDeviceSize kArenaMinMiB = 16;
23constexpr VkDeviceSize kArenaMaxMiB = 4095; 23constexpr VkDeviceSize kArenaMaxMiB = 4095;
24constexpr VkMemoryPropertyFlags kArenaRequiredMemory =
25 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
26constexpr VkMemoryPropertyFlags kArenaPreferredMemory = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
24 27
25// The device's limits; 0 is "not known", which caps nothing. 28// The device's limits; 0 is "not known", which caps nothing.
26struct ArenaLimits { 29struct ArenaLimits {
@@ -43,6 +46,7 @@ enum ArenaCap : unsigned {
43 arena_cap_none = 0, 46 arena_cap_none = 0,
44 arena_cap_buffer = 1, // maxBufferSize 47 arena_cap_buffer = 1, // maxBufferSize
45 arena_cap_allocation = 2, // maxMemoryAllocationSize 48 arena_cap_allocation = 2, // maxMemoryAllocationSize
49 arena_cap_bar = 4, // the largest size whose buffer may use DEVICE_LOCAL | HOST_VISIBLE memory
46}; 50};
47 51
48struct ArenaSize { 52struct ArenaSize {
@@ -82,6 +86,7 @@ inline ArenaSize decide_arena_size(const char* env, const ArenaLimits& limits, V
82 86
83// The Vulkan names of the limits in `capped`, for the log line. 87// The Vulkan names of the limits in `capped`, for the log line.
84inline const char* arena_cap_name(unsigned capped) { 88inline const char* arena_cap_name(unsigned capped) {
89 if (capped & arena_cap_bar) return "Resizable BAR memory types for a buffer that large";
85 switch (capped) { 90 switch (capped) {
86 case arena_cap_buffer: return "maxBufferSize"; 91 case arena_cap_buffer: return "maxBufferSize";
87 case arena_cap_allocation: return "maxMemoryAllocationSize"; 92 case arena_cap_allocation: return "maxMemoryAllocationSize";
@@ -90,4 +95,28 @@ inline const char* arena_cap_name(unsigned capped) {
90 } 95 }
91} 96}
92 97
98constexpr VkDeviceSize kArenaBarStep = 16 * kArenaMiB;
99
100// Apply the same memory-type eligibility checks as the arena allocation, requiring its preferred device-local type.
101inline bool device_local_arena_fits(const VkPhysicalDeviceMemoryProperties& memory,
102 const VkMemoryRequirements& requirements) {
103 return !memory_type_order(memory, requirements.memoryTypeBits, kArenaRequiredMemory | kArenaPreferredMemory,
104 0, requirements.size).empty();
105}
106
107// With Resizable BAR the arena belongs in VRAM the CPU can write. A driver can leave those memory types out of a
108// large buffer's memoryTypeBits: on an RTX 5070 Ti (NVIDIA 617.42, Windows 11) a 4,090 MiB buffer may use the
109// DEVICE_LOCAL | HOST_VISIBLE type and a 4,092 MiB one may not, so LEONIDA_ARENA_MB=4096 (4,095 MiB) put the whole
110// arena in system memory. `fits(bytes)` says whether a buffer of that size may use such a type. Returns the size to
111// create: `bytes` when it fits (or when nothing in reach does), else the largest size below it, in 16 MiB steps
112// and losing at most an eighth, that fits.
113template <class Fits>
114VkDeviceSize device_local_arena_bytes(VkDeviceSize bytes, Fits fits) {
115 if (fits(bytes)) return bytes;
116 const VkDeviceSize floor = std::max(bytes - bytes / 8, kArenaMinMiB * kArenaMiB);
117 for (VkDeviceSize size = bytes / kArenaBarStep * kArenaBarStep; size >= floor && size > 0; size -= kArenaBarStep)
118 if (size < bytes && fits(size)) return size;
119 return bytes;
120}
121
93} // namespace leonida 122} // namespace leonida
diff --git a/runtime/src/bcpack.cpp b/runtime/src/bcpack.cpp
new file mode 100644
index 000000000..bb4646787
--- /dev/null
+++ b/runtime/src/bcpack.cpp
@@ -0,0 +1,423 @@
1// C++ port of tools/bcpack.py. The build derives the model and BCn format
2// constants from that same reference.
3#include "bcpack.h"
4#include "bcpack_stream.h"
5#include <algorithm>
6#include <array>
7#include <bit>
8#include <cstring>
9
10namespace leonida::bcpack {
11namespace {
12using namespace detail;
13
14void color(uint8_t *dst, const int *e, int a, int b, int c, int d) {
15 for (int i = 0; i < 2; ++i, e += 3) {
16 const int rgb = (e[0] << 11) | (e[1] << 5) | e[2];
17 dst[i * 2] = uint8_t(rgb);
18 dst[i * 2 + 1] = uint8_t(rgb >> 8);
19 }
20 dst[4] = uint8_t((a & 15) | (b << 4));
21 dst[5] = uint8_t((a >> 4) | (b & 240));
22 dst[6] = uint8_t((c & 15) | (d << 4));
23 dst[7] = uint8_t((c >> 4) | (d & 240));
24}
25
26struct Endpoints {
27 int v[8]{};
28};
29
30bool rebuild_classic(unsigned codec, size_t i, const Symbols &a,
31 const Symbols &b, array<Endpoints, 256> &past,
32 uint8_t *dst, bool allow_fitted, Quality &quality) {
33 const bool single = codec == 1 || codec == 4;
34 if (a[1] || b[1])
35 return false;
36 const unsigned distance = unzig(single ? a[0] : interleave(a[0], b[0])) & 255;
37 Endpoints e;
38 const int count = codec == 1 ? 6 : codec == 3 ? 8 : codec == 4 ? 2 : 4;
39 if (!distance) {
40 if (codec != 1)
41 fill_n(e.v, codec == 5 ? 4 : 2, 128);
42 } else if (distance <= i) {
43 e = past[(i - distance) & 255];
44 } else {
45 const unsigned slot = (i - distance) & 255;
46 const Seed &seed = codec == 1 ? history1[slot]
47 : codec == 3 ? history3[slot]
48 : codec == 4 ? history4[slot]
49 : history5[slot];
50 if (seed.values[0] < 0 || (seed.fitted && !allow_fitted))
51 return false;
52 if (seed.fitted)
53 quality = Quality::fitted;
54 copy_n(seed.values, count, e.v);
55 }
56 const int alpha = codec == 1 ? 0 : codec == 5 ? 4 : 2;
57 for (int k = 0; k < count; ++k) {
58 const int coord = k - alpha;
59 const int mask = coord < 0 ? 255 : coord % 3 == 1 ? 63 : 31;
60 const int symbol = single ? a[2 + k]
61 : coord < 0 ? (k % 2 ? b : a)[2 + k / 2]
62 : (coord < 3 ? a : b)[7 + coord % 3];
63 e.v[k] = (e.v[k] + unzig(symbol)) & mask;
64 }
65 past[i & 255] = e;
66 for (int ch = 0; ch < alpha / 2; ++ch) {
67 const auto *pairs = codec == 3 ? pair3 : codec == 4 ? pair4 : pair5;
68 uint64_t bits = 0;
69 for (int row = 0; row < 4; ++row) {
70 const int lane =
71 codec == 4 ? 4 + 2 * row : (codec == 3 ? 3 : 4 + 4 * ch) + row;
72 const int right = single ? a[lane + 1] : b[lane];
73 bits |= uint64_t(pairs[a[lane]] | (pairs[right] << 6)) << (12 * row);
74 }
75 *dst++ = uint8_t(e.v[ch * 2]);
76 *dst++ = uint8_t(e.v[ch * 2 + 1]);
77 for (int j = 0; j < 6; ++j)
78 *dst++ = uint8_t(bits >> (8 * j));
79 }
80 if (codec == 1)
81 color(dst, e.v, quad1[a[8]], quad1[a[9]], quad1[a[10]], quad1[a[11]]);
82 if (codec == 3)
83 color(dst, e.v + 2, quad3[a[10]], quad3[b[10]], quad3[a[11]], quad3[b[11]]);
84 return true;
85}
86
87struct BitWriter {
88 uint8_t *dst;
89 int pos{}, violations{};
90 void put(int value, int bits) {
91 while (bits > 0) {
92 const int n = min(bits, 8 - pos % 8);
93 dst[pos / 8] |= uint8_t((value & ((1 << n) - 1)) << (pos % 8));
94 value >>= n;
95 bits -= n;
96 pos += n;
97 }
98 }
99};
100
101// Endpoints and indices have independent predictors, with distances limited to
102// eight bits.
103struct BptcState {
104 array<int, 24> ep{};
105 array<int, 32> ix{};
106 int ep_root = -1, ix_root = -1;
107};
108int mod_bits(int v, int n) { return v & ((1 << n) - 1); }
109
110void index_row(int a, int b, int row, int bits, const int *ref, int *value,
111 int *history) {
112 for (int x = 0; x < 4; ++x) {
113 const int s = (x < 2 ? a : b) >> ((x % 2) ^ (row < 3));
114 const int delta =
115 (s & 1) | ((s >> 1) & 2) | ((s >> 2) & 4) | ((s >> 3) & 8);
116 const int p = 4 * row + x;
117 value[p] = mod_bits((ref[p] >> (4 - bits)) + unzig(delta), bits);
118 history[p] = value[p] << (4 - bits);
119 }
120}
121
122bool put_indices(BitWriter &writer, const int *values, int bits,
123 int anchor1 = -1, int anchor2 = -1) {
124 for (int p = 0; p < 16; ++p) {
125 const int n = bits - (p == 0 || p == anchor1 || p == anchor2);
126 if (values[p] >> n)
127 ++writer.violations;
128 writer.put(values[p], n);
129 }
130 return true;
131}
132
133bool bc6(const Symbols &a, const Symbols &b, const BptcState &ep,
134 const BptcState &ix, BptcState &next, BitWriter &writer) {
135 if (a[15] >= 14)
136 return false;
137 const auto &m = bc6Modes[a[15]];
138 const int partition = min<int>(b[15], 31), base_shift = 16 - m.base;
139 int fields[3][4]{};
140 for (int c = 0; c < 3; ++c) {
141 const int n = m.delta[c], shift = max(0, 6 - n);
142 const auto *ref = &ep.ep[c * 4];
143 const int w = mod_bits((ref[0] >> base_shift) +
144 unzig(interleave(a[2 + c], b[2 + c], 8)),
145 m.base);
146 const int x = mod_bits(
147 (ref[1] >> (10 - n)) + unzig(interleave(a[5 + c], b[5 + c], 5)), n);
148 const int y = mod_bits((ref[2] >> shift) + unzig(a[8 + c]), n);
149 const int z = mod_bits((ref[3] >> shift) + unzig(b[8 + c]), n);
150 auto *state = &next.ep[c * 4];
151 state[0] = w << base_shift;
152 state[1] = x << (10 - n);
153 if (m.regions == 2) {
154 state[2] = y << shift;
155 state[3] = z << shift;
156 } else {
157 const int v = mod_bits(w, n) ^ (m.transformed << (n - 1));
158 state[2] = n >= 6 ? v >> (n - 6) : v << shift;
159 state[3] = state[1] >> 4;
160 }
161 fields[c][0] = w;
162 if (a[15] >= 12) {
163 fields[c][0] &= 1023;
164 for (int bit = 10; bit < m.base; ++bit)
165 fields[c][0] |= ((w >> bit) & 1) << (m.base + 9 - bit);
166 }
167 fields[c][1] = x;
168 fields[c][2] = y;
169 fields[c][3] = z;
170 }
171 writer.put(m.code, m.code < 2 ? 2 : 5);
172 for (int j = 0; j < m.count; ++j) {
173 const auto &f = bc6Plan[m.first + j];
174 writer.put((f[0] < 0 ? partition : fields[f[0]][f[1]]) >> f[2], 1);
175 }
176 int values[16];
177 const int bits = m.regions == 2 ? 3 : 4;
178 for (int y = 0; y < 4; ++y)
179 index_row(a[11 + y], b[11 + y], y, bits, ix.ix.data(), values,
180 next.ix.data());
181 return put_indices(writer, values, bits,
182 m.regions == 2 ? anchor2[partition] : -1);
183}
184
185bool bc7(const Symbols &a, const Symbols &b, const BptcState &ep,
186 const BptcState &ix, BptcState &next, BitWriter &writer) {
187 if (a[15] >= 32 || b[15] >= 16)
188 return false;
189 const auto &cfg = bc7Config[a[15] * 16 + b[15]];
190 const auto [tag, part, rot, isel] = cfg;
191 const int mode = tag & 127;
192 if (mode > 7 || part >= 64)
193 return false;
194 const auto &f = bc7_formats[mode];
195 int widths[4] = {f.color, f.color, f.color, f.alpha};
196 if (rot)
197 swap(widths[rot - 1], widths[3]);
198 constexpr int lane[3][4] = {{2, 3, 4, 5}, {6, 7, 8, 9}, {10, 5, 9, -1}};
199 int v[3][2][4]{};
200 for (int sub = 0; sub < f.subsets; ++sub) {
201 for (int end = 0; end < 2; ++end) {
202 for (int c = 0; c < 4; ++c) {
203 if (!widths[c] || lane[sub][c] < 0)
204 continue;
205 const int n = widths[c] + (f.pbits && c == 0);
206 const int k = 8 * sub + 4 * end + c;
207 v[sub][end][c] = mod_bits(
208 (ep.ep[k] >> (8 - n)) + unzig((end ? b : a)[lane[sub][c]]), n);
209 next.ep[k] = v[sub][end][c] << (8 - n);
210 }
211 }
212 if (f.pbits == 2 && ((v[sub][0][0] ^ v[sub][1][0]) & 1))
213 ++writer.violations;
214 }
215 for (int sub = f.subsets; sub < 3; ++sub)
216 copy_n(next.ep.begin(), 8, next.ep.begin() + 8 * sub);
217 int primary[16], secondary[16];
218 constexpr int second_rows[] = {6, 7, 8, 10};
219 const bool two = mode == 4 || mode == 5;
220 for (int y = 0; y < 4; ++y) {
221 index_row(a[11 + y], b[11 + y], y, f.index, ix.ix.data(), primary,
222 next.ix.data());
223 if (two)
224 index_row(a[second_rows[y]], b[second_rows[y]], y, 2, ix.ix.data() + 16,
225 secondary, next.ix.data() + 16);
226 }
227 if (mode == 0 && part == 0 &&
228 ranges::all_of(next.ep, [](int v) { return !v; }) &&
229 ranges::all_of(primary, [](int v) { return !v; }))
230 return true;
231
232 writer.put(1 << mode, mode + 1);
233 writer.put(part, f.partition);
234 if (two)
235 writer.put(rot, 2);
236 if (mode == 4)
237 writer.put(isel, 1);
238 for (int c = 0; c < 4; ++c) {
239 const int src = rot && c == rot - 1 ? 3 : rot && c == 3 ? rot - 1 : c;
240 for (int sub = 0; sub < f.subsets; ++sub)
241 for (int end = 0; end < 2; ++end)
242 writer.put(v[sub][end][src] >> (f.pbits && src == 0),
243 c == 3 ? f.alpha : f.color);
244 }
245 if (f.pbits) {
246 for (int sub = 0; sub < f.subsets; ++sub)
247 for (int end = 0; end < (f.pbits == 1 ? 2 : 1); ++end)
248 writer.put(v[sub][end][0], 1);
249 }
250 const int anc1 = f.subsets == 2 ? anchor2[part]
251 : f.subsets == 3 ? anchor3a[part]
252 : -1;
253 const int anc2 = f.subsets == 3 ? anchor3b[part] : -1;
254 if (mode == 4)
255 return put_indices(writer, secondary, 2) &&
256 put_indices(writer, primary, f.index);
257 return put_indices(writer, primary, f.index, anc1, anc2) &&
258 (!two || put_indices(writer, secondary, 2));
259}
260
261// A predictor can influence later blocks through either independent reference
262// chain. A bit-depth gap discovered during the first 256 blocks also affects
263// earlier uses of the slot.
264struct Coverage {
265 array<bool, 256> missing_ep{}, missing_ix{};
266 size_t lost{}, inconsistent{}, limit{};
267 bool lost_endpoints{}, lost_indices{};
268 void note_missing(const BptcState &block) {
269 const bool ep = block.ep_root >= 0 && missing_ep[block.ep_root];
270 const bool ix = block.ix_root >= 0 && missing_ix[block.ix_root];
271 lost += ep || ix;
272 lost_endpoints |= ep;
273 lost_indices |= ix;
274 }
275};
276
277bool rebuild_bptc(unsigned codec, size_t i, size_t blocks, const Symbols &a,
278 const Symbols &b, array<BptcState, 256> &past, uint8_t *dest,
279 const Calibration *history, bool allow_fitted,
280 Quality &quality, Coverage &coverage, const char*& reason) {
281 const unsigned di = interleave(a[1], b[1]);
282 const unsigned de = (di + unzig(interleave(a[0], b[0]))) & 255;
283 if ((di > i || de > i) && !history) {
284 reason = "missing-profile";
285 return false;
286 }
287 const int islot = di > i ? int(256 + i - di) : -1;
288 const int eslot = de > i ? int(256 + i - de) : -1;
289 bool fitted = false;
290 BptcState zero{};
291 if (codec == 6) {
292 for (int c = 0; c < 3; ++c) {
293 zero.ep[4 * c] = 32768;
294 zero.ep[4 * c + 1] = 512;
295 zero.ep[4 * c + 2] = zero.ep[4 * c + 3] = 32;
296 }
297 zero.ix.fill(8);
298 }
299 if (codec == 6) {
300 if (a[15] >= 14)
301 return false;
302 const auto &m = bc6Modes[a[15]];
303 if (eslot >= 0) {
304 const auto &row = history->bc6[eslot];
305 for (int c = 0; c < 3; ++c) {
306 const int needs[] = {m.base, m.delta[c],
307 m.regions == 2 ? m.delta[c] : 0,
308 m.regions == 2 ? m.delta[c] : 0};
309 for (int k = 0; k < 4; ++k) {
310 const int j = 4 * c + k;
311 zero.ep[j] = row.ep[2 * j] | (row.ep[2 * j + 1] << 8);
312 fitted |= row.ep_confirmed[j] < needs[k];
313 }
314 }
315 fitted |= row.ep_class != 3;
316 coverage.missing_ep[eslot] |= !row.ep_class;
317 }
318 if (islot >= 0) {
319 const auto &row = history->bc6[islot];
320 copy(row.ix.begin(), row.ix.end(), zero.ix.begin());
321 fitted |=
322 row.ix_class != 3 || ranges::any_of(row.ix_confirmed, [&](int n) {
323 return n < (m.regions == 2 ? 3 : 4);
324 });
325 coverage.missing_ix[islot] |= !row.ix_class;
326 }
327 } else {
328 if (a[15] >= 32 || b[15] >= 16)
329 return false;
330 const auto &cfg = bc7Config[a[15] * 16 + b[15]];
331 const unsigned mode = cfg[0] & 127;
332 if (mode >= 8 || cfg[1] >= 64)
333 return false;
334 if (cfg[0] & 128)
335 fitted = true;
336 const auto &format = bc7_formats[mode];
337 if (eslot >= 0) {
338 const auto &row = history->bc7[eslot];
339 copy(row.ep.begin(), row.ep.end(), zero.ep.begin());
340 int width[] = {format.color, format.color, format.color, format.alpha};
341 if (cfg[2])
342 swap(width[3], width[cfg[2] - 1]);
343 width[0] += format.pbits != 0;
344 for (int j = 0; j < 8 * format.subsets; ++j) {
345 const int need = width[j % 4];
346 fitted |= row.ep_confirmed[j] < need || row.ep_bits[j] < need;
347 coverage.missing_ep[eslot] |= row.ep_bits[j] < min(need, 4);
348 }
349 }
350 if (islot >= 0) {
351 const auto &row = history->bc7[islot];
352 copy(row.ix.begin(), row.ix.end(), zero.ix.begin());
353 for (int j = 0; j < (mode == 4 || mode == 5 ? 32 : 16); ++j) {
354 int need = j < 16 ? format.index : 2;
355 fitted |= row.ix_confirmed[j] < need || row.ix_bits[j] < need;
356 coverage.missing_ix[islot] |= row.ix_bits[j] < need;
357 }
358 }
359 }
360 if (fitted) {
361 if (!allow_fitted) {
362 reason = "unconfirmed-predictor";
363 return false;
364 }
365 quality = Quality::fitted;
366 }
367 const auto &ep = de && eslot < 0 ? past[(i - de) & 255] : zero;
368 const auto &ix = di && islot < 0 ? past[(i - di) & 255] : zero;
369 auto &next = past[i & 255];
370 next = {};
371 next.ep_root = eslot >= 0 ? eslot : ep.ep_root;
372 next.ix_root = islot >= 0 ? islot : ix.ix_root;
373 fill_n(dest, 16, 0);
374 BitWriter writer{dest};
375 const bool valid = codec == 6 ? bc6(a, b, ep, ix, next, writer)
376 : bc7(a, b, ep, ix, next, writer);
377 coverage.inconsistent +=
378 codec == 6 ? writer.violations : int(writer.violations != 0);
379 if (i + 1 == min<size_t>(256, blocks)) {
380 for (size_t k = 0; k <= i; ++k)
381 coverage.note_missing(past[k]);
382 } else if (i >= 256)
383 coverage.note_missing(next);
384 if (!valid) return false;
385 if (coverage.lost > coverage.limit) {
386 reason = coverage.lost_endpoints && coverage.lost_indices ? "missing-endpoint-and-index" :
387 coverage.lost_endpoints ? "missing-endpoint" : "missing-index";
388 return false;
389 }
390 if (coverage.inconsistent > coverage.limit) { reason = "anchor-or-pbit"; return false; }
391 return true;
392}
393} // namespace
394
395Quality decode(unsigned codec, std::span<const uint8_t> source,
396 std::span<uint8_t> output, bool allow_fitted,
397 const Calibration *history, const char** failure, bool fast_entropy) {
398 const char* reason = "bcpack-stream";
399 if (failure) *failure = reason;
400 Quality quality = Quality::confirmed;
401 if (!codec || codec == 2 || codec > 7)
402 return Quality::failed;
403 const bool single = codec == 1 || codec == 4;
404 const unsigned block_size = single ? 8 : 16;
405 if (output.size() % block_size)
406 return Quality::failed;
407 array<Endpoints, 256> classic{};
408 array<BptcState, 256> bptc{};
409 Coverage coverage{};
410 coverage.limit = allow_fitted && history
411 ? max<size_t>(2, output.size() / block_size / 1024)
412 : 0;
413 const bool valid = visit_blocks(codec, source, output.size(), [&](size_t i, const Symbols &first, const Symbols &tuple) {
414 auto *dst = output.data() + i * block_size;
415 if (codec >= 6)
416 return rebuild_bptc(codec, i, output.size() / block_size, first, tuple, bptc, dst, history, allow_fitted, quality, coverage, reason);
417 return rebuild_classic(codec, i, first, tuple, classic, dst, allow_fitted, quality);
418 }, fast_entropy);
419 if (valid && (!coverage.inconsistent || quality == Quality::fitted)) return quality;
420 if (failure) *failure = coverage.inconsistent && valid ? "anchor-or-pbit" : reason;
421 return Quality::failed;
422}
423} // namespace leonida::bcpack
diff --git a/runtime/src/bcpack.h b/runtime/src/bcpack.h
new file mode 100644
index 000000000..9c34a074b
--- /dev/null
+++ b/runtime/src/bcpack.h
@@ -0,0 +1,33 @@
1// C++ BCPack decoder. Publish the caller's staged output only on success.
2#pragma once
3#include <array>
4#include <cstdint>
5#include <span>
6
7namespace leonida::bcpack {
8enum class Quality { failed, confirmed, fitted };
9
10// Fixed-size little-endian sidecar produced by
11// tools/gen_bcpack_runtime_tables.py --profile. All fields are bytes: BC6H's 12
12// endpoint quantities are stored as little-endian uint16 pairs.
13struct Calibration {
14 struct BC6 {
15 std::array<std::uint8_t, 24> ep;
16 std::array<std::uint8_t, 16> ix;
17 std::array<std::uint8_t, 12> ep_confirmed;
18 std::array<std::uint8_t, 16> ix_confirmed;
19 std::uint8_t ep_class, ix_class;
20 };
21 struct BC7 {
22 std::array<std::uint8_t, 24> ep, ep_bits, ep_confirmed;
23 std::array<std::uint8_t, 32> ix, ix_bits, ix_confirmed;
24 };
25 std::array<BC6, 256> bc6;
26 std::array<BC7, 256> bc7;
27};
28static_assert(sizeof(Calibration) == 256 * (70 + 168));
29Quality decode(unsigned codec, std::span<const std::uint8_t> source,
30 std::span<std::uint8_t> output, bool allow_fitted = false,
31 const Calibration *history = nullptr, const char** failure = nullptr,
32 bool fast_entropy = true);
33} // namespace leonida::bcpack
diff --git a/runtime/src/bcpack_stream.h b/runtime/src/bcpack_stream.h
new file mode 100644
index 000000000..787686929
--- /dev/null
+++ b/runtime/src/bcpack_stream.h
@@ -0,0 +1,222 @@
1// Shared rANS block stream used by the runtime decoder and the offline history fitter.
2#pragma once
3#include <algorithm>
4#include <array>
5#include <bit>
6#include <cstdint>
7#include <span>
8
9namespace leonida::bcpack::detail {
10using namespace std;
11struct Seed {
12 int16_t values[8];
13 bool fitted;
14};
15struct BC6Mode {
16 int code, transformed, base, delta[3], regions, first, count;
17};
18#include "bcpack_tables.inc"
19
20using Symbols = array<uint16_t, 16>;
21constexpr uint32_t home = 1u << 24;
22
23struct Model {
24 uint32_t base[11]{};
25 const uint32_t *frequency{};
26 int width{};
27 array<uint8_t, 256> first{};
28 uint64_t reciprocal[9]{};
29 void init(int w, int q) {
30 width = w;
31 frequency = freq[w][q];
32 for (int p = 1; p <= w; ++p) {
33 base[p] = base[p - 1] + (frequency[p - 1] << max(0, p - 2));
34 reciprocal[p] = ((uint64_t{1} << 32) + frequency[p] - 1) / frequency[p];
35 }
36 unsigned p = 0;
37 for (unsigned window = 0; window < first.size(); ++window) {
38 while (p < unsigned(width) && base[p + 1] <= (window << 8)) ++p;
39 first[window] = uint8_t(p);
40 }
41 }
42 int symbol(uint32_t state, bool fast) const {
43 const uint32_t cf = state & 65535;
44 if (fast) {
45 unsigned p = first[cf >> 8];
46 while (p < unsigned(width) && cf >= base[p + 1]) ++p;
47 if (!p) return 0;
48 const auto quotient = uint32_t(((cf - base[p]) * reciprocal[p]) >> 32);
49 return int((1u << (p - 1)) + quotient);
50 }
51 int p = width;
52 while (p && cf < base[p]) --p;
53 return p ? (1 << (p - 1)) + (cf - base[p]) / frequency[p] : 0;
54 }
55 uint32_t advance(uint32_t state, unsigned sym) const {
56 const int p = bit_width(sym);
57 uint32_t f = frequency[p],
58 c = base[p] + f * (sym - (p ? 1u << (p - 1) : 0u));
59 if (!c) {
60 --f;
61 ++c;
62 }
63 return f * (state >> 16) + (state & 65535) - c;
64 }
65};
66
67// VIctory's GPL-3.0 BCPack decoder uses the high slot byte to locate a bucket.
68// Build this accelerator solely from Leonida's own rANS frequencies.
69inline const Model& model_for(int w, int q) {
70 static const auto models = [] {
71 array<array<Model, 16>, 8> result{};
72 for (int width = 1; width <= 8; ++width)
73 for (int quality = 0; quality < 16; ++quality)
74 result[width - 1][quality].init(width, quality);
75 return result;
76 }();
77 return models[w - 1][q];
78}
79
80enum class Phase { header, length, long_length, symbols };
81struct Lane {
82 Phase phase{Phase::header};
83 const Model* model{};
84 uint32_t state{};
85 int bytes{}, byte{}, zeros{}, symbol{}, slot{};
86 size_t remaining{};
87 bool flush{}, extended{}, buffered{}, held{}, full{}, done{};
88
89 bool step(int width, span<const uint8_t> &input, int &budget, bool fast) {
90 if (done || (held && full))
91 return true;
92 if (!buffered && (phase != Phase::symbols || bytes)) {
93 if (!budget)
94 return true;
95 if (input.empty())
96 return false;
97 --budget;
98 byte = input.front();
99 input = input.subspan(1);
100 buffered = true;
101 }
102 if (held) {
103 state = model->advance(state, symbol);
104 slot = symbol;
105 full = true;
106 held = false;
107 }
108 if (phase == Phase::header) {
109 model = &model_for(width - (byte >> 6), byte & 15);
110 flush = (byte & 16) != 0;
111 extended = (byte & 32) != 0;
112 zeros = 0;
113 buffered = false;
114 phase = Phase::length;
115 } else if (phase == Phase::length || phase == Phase::long_length) {
116 if (phase == Phase::long_length) {
117 bytes += (byte << 8) + 257;
118 phase = Phase::symbols;
119 } else {
120 bytes = byte + !extended;
121 phase = extended ? Phase::long_length : Phase::symbols;
122 }
123 buffered = false;
124 } else {
125 if (state < home) {
126 if (bytes) {
127 state = (state << 8) | byte;
128 buffered = false;
129 --bytes;
130 } else if (!flush) {
131 done = remaining == 0;
132 phase = Phase::header;
133 return true;
134 }
135 if (!bytes && flush && state < home) {
136 if (!state || zeros >= 8)
137 return false;
138 while (state < home && zeros < 8) {
139 state <<= 8;
140 ++zeros;
141 }
142 }
143 }
144 held = state > home && remaining;
145 if (held) {
146 symbol = model->symbol(state, fast);
147 if (symbol >= (1 << model->width))
148 return false;
149 --remaining;
150 }
151 if (!bytes && flush && state == home) {
152 done = !remaining;
153 phase = Phase::header;
154 state = 0;
155 } else if (!bytes && !flush && !remaining && !held) {
156 done = true;
157 } else if (state == home || (state > home && !held)) {
158 return false;
159 }
160 }
161 return true;
162 }
163};
164
165inline int unzig(int value) { return value & 1 ? -((value + 1) >> 1) : value >> 1; }
166inline int interleave(int a, int b, int bits = 4) {
167 int v = 0;
168 for (int k = 0; k < bits; ++k)
169 v |= (((a >> k) & 1) | (((b >> k) & 1) << 1)) << (2 * k);
170 return v;
171}
172
173struct BC7Format {
174 int subsets, color, alpha, pbits, index, partition;
175};
176constexpr BC7Format bc7_formats[] = {{3, 4, 0, 1, 3, 4}, {2, 6, 0, 2, 3, 6},
177 {3, 5, 0, 0, 2, 6}, {2, 7, 0, 1, 2, 6},
178 {1, 5, 6, 0, 3, 0}, {1, 7, 8, 0, 2, 0},
179 {1, 7, 7, 1, 4, 0}, {2, 5, 5, 1, 2, 6}};
180
181
182template<class Block>
183bool visit_blocks(unsigned codec, span<const uint8_t> source, size_t size, Block block, bool fast = true) {
184 const bool single = codec == 1 || codec == 4;
185 const unsigned count = codec >= 6 ? 16 : 12;
186 const size_t elements = size / 8;
187 array<Lane, 16> lanes{};
188 for (auto &lane : lanes) lane.remaining = elements;
189 Symbols first{};
190 size_t emitted = 0;
191 while (elements) {
192 bool ready = true, done = true;
193 int budget = 8;
194 for (unsigned l = 0; l < count; ++l) {
195 auto &lane = lanes[l];
196 if (!lane.step(widths[codec][l], source, budget, fast))
197 return false;
198 ready &= lane.full;
199 done &= lane.done;
200 }
201 if (ready) {
202 if (emitted == elements)
203 return false;
204 Symbols tuple{};
205 for (unsigned l = 0; l < count; ++l) {
206 tuple[l] = uint16_t(lanes[l].slot);
207 lanes[l].full = false;
208 }
209 if (single || emitted % 2) {
210 const size_t i = single ? emitted : emitted / 2;
211 if (!block(i, single ? tuple : first, tuple)) return false;
212 } else {
213 first = tuple;
214 }
215 ++emitted;
216 }
217 if (done)
218 break;
219 }
220 return emitted == elements && ranges::all_of(source, [](uint8_t v) { return v == 0; });
221}
222} // namespace leonida::bcpack::detail
diff --git a/runtime/src/buffer_va_index.h b/runtime/src/buffer_va_index.h
index 2ea0f9380..6fbba5b05 100644
--- a/runtime/src/buffer_va_index.h
+++ b/runtime/src/buffer_va_index.h
@@ -83,6 +83,12 @@ public:
83 return found; 83 return found;
84 } 84 }
85 85
86 // find() can return a shorter alias. Only a complete range can serve the view without new backing.
87 bool covers(std::uint64_t va, std::uint64_t bytes) const {
88 Hit hit{};
89 return find(va, hit, bytes) && bytes <= hit.size - (va - hit.start);
90 }
91
86 std::size_t size() const { return ranges_.size(); } 92 std::size_t size() const { return ranges_.size(); }
87 std::uint64_t longest() const { return longest_; } 93 std::uint64_t longest() const { return longest_; }
88 94
diff --git a/runtime/src/clzero_patch.h b/runtime/src/clzero_patch.h
new file mode 100644
index 000000000..7ab90e303
--- /dev/null
+++ b/runtime/src/clzero_patch.h
@@ -0,0 +1,200 @@
1// Moves the title's CLZERO loops off the #UD path on a CPU without CLZERO (docs/cpu_features.md).
2//
3// The executable's 10 CLZERO sites are one leaf routine that zeroes buffers a 64-byte line at a time. Emulated on #UD
4// (cpu_emulation.h), every line costs an exception dispatch and two VirtualQuery calls: measured on an i9-13900K,
5// the routine took ~99% of one thread for the whole boot and the title presented at ~3 frames a second. Each site sits
6// in one of two loop shapes, which are matched exactly (register forms only, nothing that refers to RIP):
7//
8// A (12 bytes) clzero; add rax, 40h; cmp rax, END; jb A (END: rdx or r8-r15)
9// B (15 bytes) mov rax, CUR; add CUR, 40h; clzero; cmp CUR, END; jb B (CUR, END: rdx or r8-r15)
10//
11// The loop's first instruction becomes a `jmp rel32` to a copy of the loop in a stub page within 2 GiB of the image,
12// and the rest of the loop becomes int3 (nothing branches into a loop's middle: its jb targets its first byte). In the
13// copy, CLZERO is eight 8-byte stores of zero to the line rAX points into, with RCX saved around them; the loop's own
14// instructions are copied unchanged, so the registers and flags the loop leaves are the ones the original leaves. The
15// copy ends with a jmp to the instruction after the original jb. A line the title cannot write faults in the stub, as
16// the original would fault at its CLZERO; the stub page is logged so such an address can be placed.
17//
18// Run before any of the image's code and before its sections are protected. LEONIDA_CLZERO_PATCH=0 keeps the #UD path.
19#pragma once
20
21#ifdef _WIN32
22#include <windows.h>
23
24#include <cstddef>
25#include <cstdint>
26#include <cstdlib>
27#include <cstring>
28#include <utility>
29#include <vector>
30
31namespace rt::clzero_patch {
32
33struct Site {
34 uint32_t head; // offset of the loop's first byte from the scanned code's start
35 uint32_t length; // 12 (shape A) or 15 (shape B)
36 uint32_t clzero; // offset of the CLZERO within the loop
37};
38
39// `cmp r/m64, r64` (REX.W 39 /r, register form) or `mov`/`add` with the given register as ModRM r/m, for rdx or
40// r8-r15: the registers the routine uses. rcx is excluded because the stub saves it around its stores.
41inline bool is_cmp_rr(const uint8_t* p) {
42 return (p[0] == 0x48 || p[0] == 0x49 || p[0] == 0x4C || p[0] == 0x4D) && p[1] == 0x39 && (p[2] & 0xC0) == 0xC0;
43}
44
45inline bool clzero_at(const uint8_t* p) { return p[0] == 0x0F && p[1] == 0x01 && p[2] == 0xFC; }
46
47// Register number (0-15) of ModRM.rm / ModRM.reg with REX.
48inline unsigned rm_reg(uint8_t rex, uint8_t modrm) { return (modrm & 7) | ((rex & 1) << 3); }
49inline unsigned reg_reg(uint8_t rex, uint8_t modrm) { return ((modrm >> 3) & 7) | ((rex & 4) << 1); }
50
51// Finds the loops in `code[0, size)`. A CLZERO that is in neither shape is left to the #UD path.
52inline std::vector<Site> find(const uint8_t* code, size_t size) {
53 std::vector<Site> sites;
54 for (size_t k = 0; k + 3 <= size; ++k) {
55 if (!clzero_at(code + k)) continue;
56 // Shape A: the CLZERO is the loop's first instruction.
57 if (k + 12 <= size) {
58 const uint8_t* p = code + k;
59 const bool add = p[3] == 0x48 && p[4] == 0x83 && p[5] == 0xC0 && p[6] == 0x40; // add rax, 40h
60 // cmp rax, END: REX.W (+R for r8-r15) 39 /r with rm = rax.
61 const bool cmp = is_cmp_rr(p + 7) && rm_reg(p[7], p[9]) == 0 && (p[7] & 1) == 0;
62 const unsigned end = cmp ? reg_reg(p[7], p[9]) : 0;
63 const bool jb = p[10] == 0x72 && int8_t(p[11]) == -12;
64 if (add && cmp && jb && end != 0 && end != 1 && end != 4) {
65 sites.push_back({uint32_t(k), 12, 0});
66 k += 2;
67 continue;
68 }
69 }
70 // Shape B: mov rax, CUR; add CUR, 40h before the CLZERO; cmp CUR, END; jb after it.
71 if (k >= 7 && k + 8 <= size) {
72 const uint8_t* p = code + k - 7;
73 // mov rax, CUR: REX.W(+R) 89 /r, rm = rax, reg = CUR.
74 const bool mov = (p[0] == 0x48 || p[0] == 0x4C) && p[1] == 0x89 && (p[2] & 0xC7) == 0xC0;
75 const unsigned cur = mov ? reg_reg(p[0], p[2]) : 0;
76 // add CUR, 40h: REX.W(+B) 83 /0 ib with rm = CUR.
77 const bool add = (p[3] == 0x48 || p[3] == 0x49) && p[4] == 0x83 && (p[5] & 0xF8) == 0xC0 &&
78 rm_reg(p[3], p[5]) == cur && p[6] == 0x40;
79 // cmp CUR, END: REX.W 39 /r with rm = CUR, reg = END.
80 const bool cmp = is_cmp_rr(p + 10) && rm_reg(p[10], p[12]) == cur;
81 const unsigned end = cmp ? reg_reg(p[10], p[12]) : 0;
82 const bool jb = p[13] == 0x72 && int8_t(p[14]) == -15;
83 const auto ok = [](unsigned r) { return r == 2 || r >= 8; };
84 if (mov && add && cmp && jb && ok(cur) && ok(end) && cur != end) {
85 sites.push_back({uint32_t(k - 7), 15, 7});
86 k += 7;
87 continue;
88 }
89 }
90 }
91 return sites;
92}
93
94// The stub for one loop: its instructions before the CLZERO, the zeroing block, its instructions after the CLZERO up
95// to the jb, a jb back to the stub's start, then a jmp to `resume` (the instruction after the original jb).
96inline std::vector<uint8_t> stub(const uint8_t* loop, const Site& s, uint64_t stub_at, uint64_t resume) {
97 std::vector<uint8_t> out(loop, loop + s.clzero); // shape B: mov rax, CUR; add CUR, 40h
98 const uint8_t zero_line[] = {
99 0x51, // push rcx
100 0x48, 0x89, 0xC1, // mov rcx, rax
101 0x48, 0x83, 0xE1, 0xC0, // and rcx, -64
102 0x48, 0xC7, 0x01, 0, 0, 0, 0, // mov qword [rcx], 0
103 0x48, 0xC7, 0x41, 0x08, 0, 0, 0, 0, // mov qword [rcx+8], 0
104 0x48, 0xC7, 0x41, 0x10, 0, 0, 0, 0,
105 0x48, 0xC7, 0x41, 0x18, 0, 0, 0, 0,
106 0x48, 0xC7, 0x41, 0x20, 0, 0, 0, 0,
107 0x48, 0xC7, 0x41, 0x28, 0, 0, 0, 0,
108 0x48, 0xC7, 0x41, 0x30, 0, 0, 0, 0,
109 0x48, 0xC7, 0x41, 0x38, 0, 0, 0, 0,
110 0x59, // pop rcx
111 };
112 out.insert(out.end(), std::begin(zero_line), std::end(zero_line));
113 // The instructions between the CLZERO and the jb (shape A: add rax, 40h; cmp; shape B: cmp).
114 out.insert(out.end(), loop + s.clzero + 3, loop + s.length - 2);
115 const int back = -int(out.size() + 2);
116 out.push_back(0x72);
117 out.push_back(uint8_t(int8_t(back)));
118 out.push_back(0xE9);
119 const int64_t rel = int64_t(resume) - int64_t(stub_at + out.size() + 4);
120 const int32_t rel32 = int32_t(rel);
121 const auto* b = reinterpret_cast<const uint8_t*>(&rel32);
122 out.insert(out.end(), b, b + 4);
123 return out;
124}
125
126// Reserves a page within 2 GiB above or below [lo, hi) for the stubs (the image does not move after this).
127inline uint8_t* stub_page(uint64_t lo, uint64_t hi, size_t size) {
128 SYSTEM_INFO si;
129 GetSystemInfo(&si);
130 const uint64_t gran = si.dwAllocationGranularity;
131 const uint64_t limit = uint64_t(1) << 31;
132 for (uint64_t at = (hi + gran - 1) & ~(gran - 1); at + size < lo + limit - 0x1000; at += gran) {
133 if (void* p = VirtualAlloc(reinterpret_cast<void*>(at), size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE))
134 return static_cast<uint8_t*>(p);
135 }
136 for (uint64_t at = (lo - size) & ~(gran - 1); at > gran && hi - at < limit - 0x1000; at -= gran) {
137 if (void* p = VirtualAlloc(reinterpret_cast<void*>(at), size, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE))
138 return static_cast<uint8_t*>(p);
139 }
140 return nullptr;
141}
142
143inline bool enabled() {
144 char v[8] = {};
145 size_t n = 0;
146 return !(getenv_s(&n, v, "LEONIDA_CLZERO_PATCH") == 0 && n == 2 && v[0] == '0');
147}
148
149struct Result {
150 size_t sites = 0;
151 uint8_t* stubs = nullptr;
152 size_t stub_bytes = 0;
153};
154
155// Patches every loop found in the executable ranges `ranges` (pairs of start address and size, all inside
156// [image_lo, image_hi)). The ranges must be writable. On any failure nothing is patched.
157inline Result patch(const std::vector<std::pair<uint8_t*, size_t>>& ranges, uint64_t image_lo, uint64_t image_hi) {
158 Result r;
159 std::vector<std::pair<uint8_t*, Site>> all;
160 for (const auto& [code, size] : ranges)
161 for (const Site& s : find(code, size)) all.push_back({code, s});
162 if (all.empty()) return r;
163 const size_t page = 0x10000;
164 uint8_t* const stubs = stub_page(image_lo, image_hi, page);
165 if (!stubs) return r;
166 size_t used = 0;
167 std::vector<std::vector<uint8_t>> bodies;
168 for (const auto& [code, s] : all) {
169 uint8_t* const loop = code + s.head;
170 const uint64_t at = uint64_t(stubs + used);
171 bodies.push_back(stub(loop, s, at, uint64_t(loop + s.length)));
172 used += (bodies.back().size() + 15) & ~size_t(15);
173 if (used > page) {
174 VirtualFree(stubs, 0, MEM_RELEASE);
175 return r;
176 }
177 }
178 used = 0;
179 for (size_t i = 0; i < all.size(); ++i) {
180 const auto& [code, s] = all[i];
181 uint8_t* const loop = code + s.head;
182 uint8_t* const at = stubs + used;
183 std::memcpy(at, bodies[i].data(), bodies[i].size());
184 used += (bodies[i].size() + 15) & ~size_t(15);
185 const int32_t rel = int32_t(int64_t(at) - int64_t(loop + 5));
186 loop[0] = 0xE9;
187 std::memcpy(loop + 1, &rel, 4);
188 std::memset(loop + 5, 0xCC, s.length - 5);
189 }
190 DWORD old = 0;
191 VirtualProtect(stubs, page, PAGE_EXECUTE_READ, &old);
192 FlushInstructionCache(GetCurrentProcess(), stubs, page);
193 r.sites = all.size();
194 r.stubs = stubs;
195 r.stub_bytes = used;
196 return r;
197}
198
199} // namespace rt::clzero_patch
200#endif
diff --git a/runtime/src/command_list.h b/runtime/src/command_list.h
index c28904efe..b68b413fc 100644
--- a/runtime/src/command_list.h
+++ b/runtime/src/command_list.h
@@ -1,4 +1,5 @@
1#pragma once 1#pragma once
2#include "gpu_label_memory.h"
2 3
3// The command-list IR (docs/d3d12_vulkan.md section 3.2): what a D3D12 command list records, kept until 4// The command-list IR (docs/d3d12_vulkan.md section 3.2): what a D3D12 command list records, kept until
4// ExecuteCommandLists replays it on Vulkan (vulkan_replay.h). This slice covers legacy and enhanced barriers and 5// ExecuteCommandLists replays it on Vulkan (vulkan_replay.h). This slice covers legacy and enhanced barriers and
@@ -423,6 +424,17 @@ struct DrawViewports {
423 std::uint32_t scissor_count = 0; 424 std::uint32_t scissor_count = 0;
424}; 425};
425 426
427// Simple DRAW or DRAW_INDEXED records. The GPU consumes the action's arguments;
428// the IR retains an ordinary record-time graphics-state snapshot alongside them.
429struct IndirectDrawArgs {
430 ResourceId argument_buffer = 0;
431 std::uint64_t argument_offset = 0;
432 std::uint32_t stride = 0;
433 std::uint32_t max_count = 1;
434 ResourceId count_buffer = 0; // zero: fixed draw count; otherwise, a GPU-written uint32
435 std::uint64_t count_offset = 0;
436};
437
426// DrawInstanced / DrawIndexedInstanced / DispatchMesh, with everything they use captured when they are recorded: 438// DrawInstanced / DrawIndexedInstanced / DispatchMesh, with everything they use captured when they are recorded:
427// D3D12 reads render-target and depth descriptors at OMSetRenderTargets, and every other piece of state is the 439// D3D12 reads render-target and depth descriptors at OMSetRenderTargets, and every other piece of state is the
428// list's state at the draw. resource 0 marks an unbound render-target slot or no depth buffer. A mesh draw 440// list's state at the draw. resource 0 marks an unbound render-target slot or no depth buffer. A mesh draw
@@ -452,6 +464,14 @@ struct Draw {
452 std::shared_ptr<const DrawViewports> viewports; // non-null when >1 viewport or >1 scissor was bound 464 std::shared_ptr<const DrawViewports> viewports; // non-null when >1 viewport or >1 scissor was bound
453}; 465};
454 466
467// Only indirect draws allocate this extra payload. Copies of the IR share both its
468// immutable state and the usual cached DrawViews; direct draws and barriers stay compact.
469struct IndirectRasterPayload {
470 Draw state;
471 IndirectDrawArgs arguments;
472};
473using IndirectRasterDraw = std::shared_ptr<const IndirectRasterPayload>;
474
455// D3D12_TEXTURE_DATA_PITCH_ALIGNMENT and D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT. 475// D3D12_TEXTURE_DATA_PITCH_ALIGNMENT and D3D12_TEXTURE_DATA_PLACEMENT_ALIGNMENT.
456inline constexpr std::uint32_t texture_data_pitch_alignment = 256; 476inline constexpr std::uint32_t texture_data_pitch_alignment = 256;
457inline constexpr std::uint32_t texture_data_placement_alignment = 512; 477inline constexpr std::uint32_t texture_data_placement_alignment = 512;
@@ -525,8 +545,9 @@ struct UavView {
525 std::uint64_t size; // buffer: bytes in the view 545 std::uint64_t size; // buffer: bytes in the view
526 std::uint32_t element_size; // buffer: bytes an element (rects count elements), 4 for a raw view 546 std::uint32_t element_size; // buffer: bytes an element (rects count elements), 4 for a raw view
527 std::uint32_t mip; // texture 547 std::uint32_t mip; // texture
528 std::uint32_t first_layer; 548 std::uint32_t first_layer; // 1D/2D array: first slice; 3D volume: FirstWSlice
529 std::uint32_t layer_count; 549 std::uint32_t layer_count; // 1D/2D array: slice count; 3D volume: WSize
550 bool exact_clear_format = false; // newly exposed 1D/3D UAVs: do not clear via a different backing format
530}; 551};
531 552
532// ClearUnorderedAccessViewUint / ...Float; the resource must be in unordered_access state at execution. values are 553// ClearUnorderedAccessViewUint / ...Float; the resource must be in unordered_access state at execution. values are
@@ -602,6 +623,17 @@ enum class IndirectKind : std::uint8_t {
602 dispatch_mesh = 3, 623 dispatch_mesh = 3,
603}; 624};
604 625
626// For a creation-validated signature, commands are stride bytes apart, but no padding follows the
627// last packed payload. A zero maximum reads no records (offset alignment is checked separately).
628constexpr bool indirect_records_fit(std::uint64_t buffer_size, std::uint64_t offset, std::uint32_t max_count,
629 std::uint32_t stride, std::uint32_t packed_size) {
630 if (!packed_size || packed_size > stride || stride % 4) return false;
631 if (!max_count) return true;
632 // All factors are UINT32 and packed_size <= stride: required <= UINT32_MAX squared.
633 const auto required = std::uint64_t(max_count - 1) * stride + packed_size;
634 return offset <= buffer_size && required <= buffer_size - offset;
635}
636
605struct ExecuteIndirect { 637struct ExecuteIndirect {
606 IndirectKind kind = IndirectKind::draw; 638 IndirectKind kind = IndirectKind::draw;
607 std::uint32_t stride = 0; 639 std::uint32_t stride = 0;
@@ -653,6 +685,11 @@ struct CopyAccelerationStructure {
653 std::uint64_t dst_va = 0; 685 std::uint64_t dst_va = 0;
654 std::uint64_t src_va = 0; 686 std::uint64_t src_va = 0;
655 std::uint32_t mode = 0; 687 std::uint32_t mode = 0;
688 // Set where the layer resolved a VA in the title's memory to the copy shaders reach it by (an XDXR build, at
689 // record time): the bytes that copy has from the VA on. 0: the VA names one of the layer's buffers, sized at
690 // replay by its binding.
691 std::uint64_t dst_room = 0;
692 std::uint64_t src_room = 0;
656}; 693};
657 694
658// EmitRaytracingAccelerationStructurePostbuildInfo, and each postbuild desc of BuildRaytracingAccelerationStructure: 695// EmitRaytracingAccelerationStructurePostbuildInfo, and each postbuild desc of BuildRaytracingAccelerationStructure:
@@ -662,14 +699,28 @@ struct AccelerationStructurePostbuild {
662 std::uint64_t dest_va = 0; 699 std::uint64_t dest_va = 0;
663 std::uint32_t type = 0; 700 std::uint32_t type = 0;
664 std::vector<std::uint64_t> sources; 701 std::vector<std::uint64_t> sources;
702 std::uint64_t dest_room = 0; // as CopyAccelerationStructure::dst_room
665}; 703};
666 704
667using Command = std::variant<TransitionBarrier, UavBarrier, AliasingBarrier, GlobalBarrier, BufferBarrier, 705using Command = std::variant<TransitionBarrier, UavBarrier, AliasingBarrier, GlobalBarrier, BufferBarrier,
668 TextureBarrier, ClearRenderTarget, ClearDepthStencil, CopyBuffer, CopyTexture, 706 TextureBarrier, ClearRenderTarget, ClearDepthStencil, CopyBuffer, CopyTexture,
669 CopyResource, ResolveSubresource, Predication, ClearUnorderedAccess, DiscardResource, 707 CopyResource, ResolveSubresource, Predication, ClearUnorderedAccess, DiscardResource,
670 WriteImmediate, AtomicCopyBuffer, BeginQuery, EndQuery, ResolveQueries, DebugMarker, 708 WriteImmediate, label::Write, AtomicCopyBuffer, BeginQuery, EndQuery, ResolveQueries, DebugMarker,
671 ExecuteIndirect, BuildAccelerationStructure, Dispatch, Draw, CopyAccelerationStructure, 709 ExecuteIndirect, BuildAccelerationStructure, Dispatch, Draw, CopyAccelerationStructure,
672 AccelerationStructurePostbuild>; 710 AccelerationStructurePostbuild, IndirectRasterDraw>;
711
712struct DrawCommandView {
713 const Draw* state = nullptr;
714 const IndirectDrawArgs* arguments = nullptr;
715};
716
717// Queries, shader-work detection and replay all see the same captured graphics state.
718inline DrawCommandView draw_command(const Command& command) noexcept {
719 if (const auto* draw = std::get_if<Draw>(&command)) return {draw, nullptr};
720 if (const auto* indirect = std::get_if<IndirectRasterDraw>(&command); indirect && *indirect)
721 return {&(*indirect)->state, &(*indirect)->arguments};
722 return {};
723}
673 724
674class CommandList { 725class CommandList {
675public: 726public:
@@ -769,6 +820,12 @@ public:
769 return append(std::move(draw)); 820 return append(std::move(draw));
770 } 821 }
771 822
823 bool draw_indirect(Draw&& state, const IndirectDrawArgs& arguments) {
824 if (closed_ || !state.pipeline) return false;
825 if (!arguments.max_count) return true;
826 return append(std::make_shared<const IndirectRasterPayload>(std::move(state), arguments));
827 }
828
772 // ClearRenderTargetView; the resource must be in render_target state at execution. No rects: the whole view. 829 // ClearRenderTargetView; the resource must be in render_target state at execution. No rects: the whole view.
773 bool clear_render_target(const TargetView& target, const ClearColor& color, std::span<const Rect> rects = {}) { 830 bool clear_render_target(const TargetView& target, const ClearColor& color, std::span<const Rect> rects = {}) {
774 if (!valid(target)) return false; 831 if (!valid(target)) return false;
@@ -797,6 +854,11 @@ public:
797 } 854 }
798 855
799 // WriteBufferImmediate: D3D12 requires a 4-byte aligned, non-null address and one of the three modes. 856 // WriteBufferImmediate: D3D12 requires a 4-byte aligned, non-null address and one of the three modes.
857 bool write_gpu_label(const label::Write& write) {
858 if(write.target.owner.expired() || write.clock>2) return false;
859 return append(write);
860 }
861
800 bool write_immediate(const WriteImmediate& write) { 862 bool write_immediate(const WriteImmediate& write) {
801 if (!write.address || write.address % 4 || write.mode > write_immediate_mode::marker_out) return false; 863 if (!write.address || write.address % 4 || write.mode > write_immediate_mode::marker_out) return false;
802 return append(write); 864 return append(write);
diff --git a/runtime/src/console_heap_vsharp_slots.h b/runtime/src/console_heap_vsharp_slots.h
new file mode 100644
index 000000000..0b0830053
--- /dev/null
+++ b/runtime/src/console_heap_vsharp_slots.h
@@ -0,0 +1,115 @@
1#pragma once
2// Host-RAM bitset of console resource-heap slots whose GPU copy (`heap.copy`) currently holds a live buffer V#
3// (`!(w[3] >> 30) && (w[2] || w[6])`).
4//
5// When a buffer backing or title VA alias is released, `refresh_console_heap` must re-run `fix_console_slot` on every
6// slot that might still point at the released allocation. Scanning `heap.copy` linearly reads every 32-byte slot of
7// the heap (4-5.5+ MiB): when `heap.copy` sits in `arena.mapped` (uncached write-combined GPU memory), each release
8// triggers ~180k uncached PCIe reads. Tracking the live V# slots in host RAM keeps invalidation scans strictly in CPU
9// cache (zero reads from `heap.copy`) and skips empty and T# slots 64 at a time.
10
11#include <algorithm>
12#include <bit>
13#include <cstddef>
14#include <cstdint>
15#include <vector>
16
17namespace leonida {
18
19class ConsoleHeapVsharpSlots {
20public:
21 // Matches the descriptor predicate for a non-empty buffer V# (primary or counter half) in a 32-byte slot.
22 static constexpr bool is_live_vsharp(const std::uint32_t* w) noexcept {
23 return !(w[3] >> 30) && (w[2] || w[6]);
24 }
25
26 void reset(std::size_t slot_count) {
27 slot_count_ = slot_count;
28 live_count_ = 0;
29 words_.assign((slot_count + 63) / 64, 0);
30 }
31
32 void set(std::size_t slot, bool live) noexcept {
33 if (slot >= slot_count_) return;
34 std::uint64_t& word = words_[slot >> 6];
35 const std::uint64_t mask = std::uint64_t{1} << (slot & 63);
36 const bool was = (word & mask) != 0;
37 if (live == was) return;
38 if (live) {
39 word |= mask;
40 ++live_count_;
41 } else {
42 word &= ~mask;
43 --live_count_;
44 }
45 }
46
47 void clear(std::size_t slot) noexcept { set(slot, false); }
48
49 // Clears every slot in [first, end), clamping to slot_count().
50 void clear_range(std::size_t first, std::size_t end) noexcept {
51 if (first >= end || first >= slot_count_ || live_count_ == 0) return;
52 end = (std::min)(end, slot_count_);
53 std::size_t w = first >> 6;
54 const std::size_t last_w = (end - 1) >> 6;
55 const unsigned first_bit = static_cast<unsigned>(first & 63);
56 const unsigned end_bit = static_cast<unsigned>(end & 63);
57 const std::uint64_t head_mask = ~std::uint64_t{0} << first_bit;
58 const std::uint64_t tail_mask = end_bit ? ((std::uint64_t{1} << end_bit) - 1) : ~std::uint64_t{0};
59 if (w == last_w) {
60 const std::uint64_t mask = head_mask & tail_mask;
61 const std::uint64_t cleared = words_[w] & mask;
62 if (cleared) {
63 words_[w] &= ~mask;
64 live_count_ -= static_cast<std::size_t>(std::popcount(cleared));
65 }
66 return;
67 }
68 if (const std::uint64_t cleared = words_[w] & head_mask) {
69 words_[w] &= ~head_mask;
70 live_count_ -= static_cast<std::size_t>(std::popcount(cleared));
71 }
72 for (++w; w < last_w; ++w) {
73 if (const std::uint64_t cleared = words_[w]) {
74 words_[w] = 0;
75 live_count_ -= static_cast<std::size_t>(std::popcount(cleared));
76 }
77 }
78 if (const std::uint64_t cleared = words_[last_w] & tail_mask) {
79 words_[last_w] &= ~tail_mask;
80 live_count_ -= static_cast<std::size_t>(std::popcount(cleared));
81 }
82 }
83
84 // Calls fn(slot) in ascending slot order for every set bit present when its 64-slot word is entered.
85 // Safe if fn mutates the bit for `slot` (e.g., fix_console_slot clearing an invalidated V#).
86 template <class F>
87 void for_each(F&& fn) const {
88 if (live_count_ == 0) return;
89 for (std::size_t w = 0; w < words_.size(); ++w) {
90 std::uint64_t bits = words_[w];
91 if (!bits) continue;
92 const std::size_t base = w << 6;
93 while (bits) {
94 const unsigned bit = static_cast<unsigned>(std::countr_zero(bits));
95 bits &= bits - 1;
96 fn(base + bit);
97 }
98 }
99 }
100
101 bool test(std::size_t slot) const noexcept {
102 return slot < slot_count_ && ((words_[slot >> 6] >> (slot & 63)) & 1u) != 0;
103 }
104
105 std::size_t slot_count() const noexcept { return slot_count_; }
106 std::size_t live_count() const noexcept { return live_count_; }
107 bool empty() const noexcept { return live_count_ == 0; }
108
109private:
110 std::size_t slot_count_ = 0;
111 std::size_t live_count_ = 0;
112 std::vector<std::uint64_t> words_;
113};
114
115} // namespace leonida
diff --git a/runtime/src/console_texture_layout.h b/runtime/src/console_texture_layout.h
new file mode 100644
index 000000000..393e0adee
--- /dev/null
+++ b/runtime/src/console_texture_layout.h
@@ -0,0 +1,611 @@
1// Texture layouts of the console GPU (RDNA2, GFX10.3): a texture's size and alignment, where each mip and array slice
2// starts, the address of each element, and copies between tiled memory and linear rows. Used by the xg_xs.dll shim
3// (runtime/shims/xg_xs.cpp), whose texture computer answers the title's layout and copy calls from it.
4//
5// Ported from Marvisak/VIctory (GPL-3.0-or-later; translated from Rust to C++ and changed for Leonida),
6// crates/victory-formats/src/texture.rs at commit d2a4bae1f, which follows
7// AMD's address library (addrlib) as shipped in Mesa under src/amd/addrlib: block dimensions, mip placement and mip
8// tails from gfx10addrlib.cpp and addrlib2.cpp (ComputeSurfaceInfoMacroTiled, ComputeThinBlockDimension,
9// GetMipTailDim, GetMaxNumMipsInTail, HwlComputeSurfaceInfoLinear, ComputeSurfaceAddrFromCoordMacroTiled), and the
10// 256-byte micro tile patterns in kMicro from gfx10SwizzlePattern.h (the RB+ tables, as on RDNA2). addrlib carries
11// this notice:
12//
13// Copyright (C) 2007-2026 Advanced Micro Devices, Inc. All rights reserved.
14// SPDX-License-Identifier: MIT
15//
16// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
17// documentation files (the "Software"), to deal in the Software without restriction, including without limitation
18// the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
19// to permit persons to whom the Software is furnished to do so, subject to the following conditions: the above
20// copyright notice and this permission notice shall be included in all copies or substantial portions of the
21// Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED.
22//
23// Units: an element is a texel, or a 4x4 block of a block-compressed format. Mips of one array slice (or one depth
24// slab of a thick 3D texture) are stored together, smallest first: the mip tail (the small mips sharing one block)
25// at offset 0, mip 0 last.
26#pragma once
27
28#include <algorithm>
29#include <array>
30#include <bit>
31#include <cstddef>
32#include <cstdint>
33#include <cstring>
34#include <optional>
35#include <vector>
36
37namespace leonida::console_texture {
38
39// A swizzle mode, by its hardware number (addrlib's ADDR_SW_* order).
40enum : uint32_t {
41 kLinear = 0,
42 kSw256bS = 1,
43 kSw256bD = 2,
44 kSw4kbS = 5,
45 kSw4kbD = 6,
46 kSw64kbS = 9,
47 kSw64kbD = 10,
48 kSw64kbST = 17,
49 kSw64kbDT = 18,
50 kSw4kbSX = 21,
51 kSw4kbDX = 22,
52 kSw4kbRX = 23,
53 kSw64kbZX = 24,
54 kSw64kbSX = 25,
55 kSw64kbDX = 26,
56 kSw64kbRX = 27,
57};
58
59// log2 of the block size in bytes (0 for linear); nullopt for modes GFX10 does not have.
60inline std::optional<uint32_t> block_log2(uint32_t swizzle) {
61 switch (swizzle) {
62 case 0: return 0;
63 case 1: case 2: return 8;
64 case 5: case 6: case 21: case 22: case 23: return 12;
65 case 9: case 10: case 17: case 18: case 24: case 25: case 26: case 27: return 16;
66 default: return std::nullopt;
67 }
68}
69inline bool is_standard(uint32_t s) { return s == 1 || s == 5 || s == 9 || s == 17 || s == 21 || s == 25; }
70inline bool is_display(uint32_t s) { return s == 2 || s == 6 || s == 10 || s == 18 || s == 22 || s == 26; }
71inline bool is_z_order(uint32_t s) { return s == 24; }
72// Pipe and bank XOR modes (_T, _X): their addresses depend on the GPU's pipe configuration.
73inline bool is_xor(uint32_t s) { return s >= 16; }
74
75enum class Dimension { tex1d, tex2d, tex3d };
76
77enum class Error {
78 ok,
79 invalid, // the description makes no texture, or a coordinate or subresource lies outside it
80 unsupported, // a valid layout whose addressing is not implemented here
81 too_small, // a buffer is smaller than the layout or the rows need
82};
83
84// One plane of a texture.
85struct Desc {
86 Dimension dimension = Dimension::tex2d;
87 uint32_t width = 1, height = 1; // in texels
88 uint32_t depth = 1; // depth of a 3D texture, else the array size
89 uint32_t mips = 1;
90 uint32_t element_bytes = 4; // 1, 2, 4, 8 or 16
91 uint32_t block = 1; // texels per element side: 1, or 4 for block compression
92 uint32_t samples = 1;
93 uint32_t swizzle = kLinear;
94};
95
96struct Tail {
97 uint32_t offset = 0; // byte offset inside the tail block
98 uint32_t x = 0, y = 0; // element position the mip starts at
99};
100
101// Where one mip lives inside a slice.
102struct Mip {
103 uint32_t width = 0, height = 0, depth = 0; // size in elements (depth 1 unless the texture is 3D)
104 uint32_t pitch = 0, rows = 0, depth_pitch = 0; // padded size in elements: whole blocks, or the tail's share
105 uint64_t offset = 0; // byte offset of its first block in the slice (0 in the tail)
106 std::optional<Tail> tail;
107};
108
109namespace detail {
110
111constexpr uint32_t div_ceil(uint32_t a, uint32_t b) { return (a + b - 1) / b; }
112constexpr uint32_t round_up(uint32_t a, uint32_t b) { return div_ceil(a, b) * b; }
113
114// Elements along one side of mip `mip`, as data and copies see it: texels halve rounding down (to at least 1), then
115// round up to whole elements.
116constexpr uint32_t dim(uint32_t texels, uint32_t mip, uint32_t block) {
117 return div_ceil(std::max(texels >> mip, 1u), block);
118}
119// Elements along one side of mip `mip` for placement (padding, tail, offsets): addrlib halves mip 0's elements
120// rounding up, which can be one more than dim() for odd sizes.
121constexpr uint32_t padded_dim(uint32_t texels, uint32_t mip, uint32_t block) {
122 return div_ceil(div_ceil(std::max(texels, 1u), block), 1u << mip);
123}
124
125// Micro tile (256 bytes) patterns by log2 of the element size: for each address bit, the element coordinate bit it
126// takes (x0, y1, z0...), "--" for the bits inside an element. Thin S, thin D, thick S (also the D 3D modes). From
127// addrlib's GFX10_SW_256_S_RBPLUS, GFX10_SW_256_D_RBPLUS and GFX10_SW_4K_S3_RBPLUS patterns; the larger blocks add
128// bits Y, X (thin) or Y, X, Z (thick) in turn.
129inline constexpr const char* kMicro[3][5] = {
130 {"x0x1x2x3y0y1y2y3", "--x0x1x2y0y1y2x3", "----x0x1y0y1y2x2", "------x0y0y1x1x2", "--------y0y1x0x1"},
131 {"x0x1x2y1y0y2x3y3", "--x0x1x2y0y1y2x3", "----x0x1y0y1x2y2", "------x0y0x1x2y1", "--------x0y0x1y1"},
132 {"x0x1z0y0z1y1x2z2", "--x0z0y0z1y1x1z2", "----x0y0z0y1x1z1", "------x0z0y0x1z1", "--------z0y0x0z1"},
133};
134
135// For each axis, the address bit each coordinate bit lands on.
136inline std::array<std::vector<uint32_t>, 3> pattern(int kind, uint32_t element_log2, uint32_t block_log2) {
137 std::array<std::vector<uint32_t>, 3> axes;
138 const char* micro = kMicro[kind][element_log2];
139 for (uint32_t bit = 0; bit < 8; ++bit) {
140 const char a = micro[2 * bit];
141 const int axis = a == 'x' ? 0 : a == 'y' ? 1 : a == 'z' ? 2 : -1;
142 if (axis < 0) continue;
143 const size_t index = static_cast<size_t>(micro[2 * bit + 1] - '0');
144 auto& to = axes[static_cast<size_t>(axis)];
145 if (to.size() <= index) to.resize(index + 1, 0);
146 to[index] = bit;
147 }
148 static constexpr int kThin[2] = {1, 0};
149 static constexpr int kThick[3] = {1, 0, 2};
150 const int* order = kind == 2 ? kThick : kThin;
151 const uint32_t n = kind == 2 ? 3u : 2u;
152 for (uint32_t bit = 8, i = 0; bit < block_log2; ++bit, ++i) axes[static_cast<size_t>(order[i % n])].push_back(bit);
153 return axes;
154}
155
156// Byte offsets inside a block for coordinates 0..2^bits of one axis.
157inline std::vector<uint32_t> spread(const std::vector<uint32_t>& bits) {
158 std::vector<uint32_t> out(size_t{1} << bits.size());
159 for (uint32_t c = 0; c < out.size(); ++c) {
160 uint32_t v = 0;
161 for (size_t i = 0; i < bits.size(); ++i) v |= ((c >> i) & 1u) << bits[i];
162 out[c] = v;
163 }
164 return out;
165}
166
167} // namespace detail
168
169constexpr uint32_t kMaxMips = 16;
170// The largest width, height and depth (or array size) accepted, in texels. GFX10's image descriptors hold at most
171// 16384 texels per side, so no texture the GPU can use is refused. The bound also keeps every size computed below
172// within uint64_t (and its uint32_t steps), which unchecked values from a title would otherwise overflow.
173constexpr uint32_t kMaxExtent = 1u << 14;
174
175// 256-byte micro tile dimensions by log2 element size, 2D and 3D.
176inline constexpr uint32_t kBlock256_2d[5][2] = {{16, 16}, {16, 8}, {8, 8}, {8, 4}, {4, 4}};
177inline constexpr uint32_t kBlock256_3d[5][3] = {{8, 4, 8}, {4, 4, 8}, {4, 4, 4}, {4, 2, 4}, {2, 2, 4}};
178inline constexpr uint32_t kBlock1k_3d[5][3] = {{16, 8, 8}, {8, 8, 8}, {8, 8, 4}, {8, 4, 4}, {4, 4, 4}};
179
180class Layout {
181public:
182 Desc desc;
183 std::array<uint32_t, 3> block{}; // block dimensions in elements (linear: the pitch alignment, 1, 1)
184 bool thick = false; // 3D blocks span block[2] depth slices (GFX10 3D S and D modes)
185 // Array slices, depth slabs of block[2] slices (thick), or depth slices (thin and linear 3D).
186 uint32_t slices = 0;
187 uint64_t slice_size = 0; // bytes of one slice: its whole mip chain
188 uint64_t size = 0;
189 uint64_t alignment = 0;
190 uint32_t first_tail_mip = 0; // the first mip in the tail; mips.size() without one
191 std::vector<Mip> mips;
192
193 static std::optional<Layout> make(const Desc& d) {
194 const auto log2 = block_log2(d.swizzle);
195 if (!log2) return std::nullopt;
196 const auto in = [](uint32_t v, uint32_t lo, uint32_t hi) { return v >= lo && v <= hi; };
197 const bool valid =
198 in(d.width, 1, kMaxExtent) && in(d.height, 1, kMaxExtent) && in(d.depth, 1, kMaxExtent) &&
199 in(d.mips, 1, kMaxMips) && std::has_single_bit(d.element_bytes) && d.element_bytes <= 16 &&
200 (d.block == 1 || d.block == 4) && std::has_single_bit(d.samples) && d.samples <= 8 &&
201 (d.samples == 1 || (d.dimension == Dimension::tex2d && d.mips == 1)) &&
202 (d.dimension != Dimension::tex1d || d.height == 1) &&
203 (d.dimension != Dimension::tex3d || d.swizzle == 0 || d.swizzle == 5 || d.swizzle == 9 ||
204 d.swizzle == 17 || d.swizzle == 21 || (d.swizzle >= 24 && d.swizzle <= 27));
205 if (!valid) return std::nullopt;
206 return *log2 == 0 ? linear(d) : tiled(d, *log2);
207 }
208
209 // Whether offset() and the copies work for this layout: linear and the modes without pipe or bank XOR,
210 // single-sampled. The XOR modes (_X, _T) and MSAA need the GPU's pipe and bank configuration (Series X and S
211 // differ); titles use them for render targets and depth, which the host renders.
212 bool addressable() const { return desc.swizzle == kLinear || !pattern_[0].empty(); }
213
214 // Depth slices a subresource of mip `mip` covers: the mip's depth for 3D textures, else 1 (one array slice).
215 uint32_t subresource_depth(uint32_t mip) const { return mip < mips.size() ? mips[mip].depth : 0; }
216
217 // Byte offset of element (x, y) of mip `mip` in array slice or depth slice `z`. Coordinates must lie inside.
218 Error offset(uint32_t mip, uint32_t x, uint32_t y, uint32_t z, uint64_t& out) const {
219 if (mip >= mips.size()) return Error::invalid;
220 const Mip& m = mips[mip];
221 const uint32_t depth = desc.dimension == Dimension::tex3d ? m.depth : slices;
222 const bool inside = x < m.width && y < m.height && z < depth;
223 if (!inside) return Error::invalid;
224 if (!addressable()) return Error::unsupported;
225 const auto [slice, inner] = split(z);
226 const uint64_t base = uint64_t{slice} * slice_size + m.offset;
227 if (desc.swizzle == kLinear) {
228 out = base + (uint64_t{y} * m.pitch + x) * desc.element_bytes;
229 return Error::ok;
230 }
231 out = base + row(m, y, inner) + column(m, x);
232 return Error::ok;
233 }
234
235 // Copies one subresource out of tiled memory (the whole texture, `size` bytes) into linear rows: mip `mip` of
236 // array slice `slice` (3D: every depth slice of the mip, slice 0). Rows are row_pitch bytes apart, depth slices
237 // depth_pitch.
238 Error detile(const uint8_t* tiled, size_t tiled_len, uint32_t mip, uint32_t slice, uint8_t* linear,
239 size_t linear_len, size_t row_pitch, size_t depth_pitch) const {
240 return walk(tiled_len, mip, slice, linear_len, row_pitch, depth_pitch, [&](size_t t, size_t l, size_t n) {
241 std::memcpy(linear + l, tiled + t, n);
242 });
243 }
244 // The reverse of detile(): linear rows into tiled memory.
245 Error tile(uint8_t* tiled, size_t tiled_len, uint32_t mip, uint32_t slice, const uint8_t* linear,
246 size_t linear_len, size_t row_pitch, size_t depth_pitch) const {
247 return walk(tiled_len, mip, slice, linear_len, row_pitch, depth_pitch, [&](size_t t, size_t l, size_t n) {
248 std::memcpy(tiled + t, linear + l, n);
249 });
250 }
251
252 // Byte offsets inside a block of each element coordinate bit, per axis; empty for linear and XOR/MSAA modes.
253 const std::array<std::vector<uint32_t>, 3>& pattern() const { return pattern_; }
254
255private:
256 std::array<std::vector<uint32_t>, 3> pattern_;
257
258 // HwlComputeSurfaceInfoLinear: rows aligned to 256 bytes, mips packed smallest first, a 3D texture's depth slices
259 // each hold the chain.
260 static Layout linear(const Desc& d) {
261 using namespace detail;
262 Layout l;
263 l.desc = d;
264 const uint64_t bpe = d.element_bytes;
265 const uint32_t align = 256 / d.element_bytes;
266 const bool three_d = d.dimension == Dimension::tex3d;
267 uint64_t offset = 0;
268 for (uint32_t i = d.mips; i-- > 0;) {
269 const uint32_t h = padded_dim(d.height, i, d.block);
270 const uint32_t pitch = round_up(padded_dim(d.width, i, d.block), align);
271 Mip m;
272 m.width = dim(d.width, i, d.block);
273 m.height = dim(d.height, i, d.block);
274 m.depth = three_d ? dim(d.depth, i, 1) : 1;
275 m.pitch = pitch;
276 m.rows = h;
277 m.depth_pitch = three_d ? d.depth : 1;
278 m.offset = offset;
279 l.mips.push_back(m);
280 offset += uint64_t{pitch} * h * bpe;
281 }
282 std::reverse(l.mips.begin(), l.mips.end());
283 l.block = {align, 1, 1};
284 l.slices = d.depth;
285 l.slice_size = offset;
286 l.size = offset * d.depth;
287 l.alignment = 256;
288 l.first_tail_mip = d.mips;
289 return l;
290 }
291
292 static Layout tiled(const Desc& d, uint32_t block_log2) {
293 using namespace detail;
294 Layout l;
295 l.desc = d;
296 const uint32_t element_log2 = static_cast<uint32_t>(std::countr_zero(d.element_bytes));
297 const uint64_t bpe = d.element_bytes;
298 const uint64_t block_bytes = uint64_t{1} << block_log2;
299 const bool thick = d.dimension == Dimension::tex3d && (is_standard(d.swizzle) || is_display(d.swizzle));
300 std::array<uint32_t, 3> block{};
301 if (thick) { // ComputeThickBlockDimension
302 const uint32_t amp = (block_log2 - 10) / 3, rest = (block_log2 - 10) % 3;
303 const auto* b = kBlock1k_3d[element_log2];
304 block = {b[0] << amp, b[1] << (amp + rest / 2), b[2] << (amp + (rest != 0 ? 1u : 0u))};
305 } else { // ComputeThinBlockDimension
306 const uint32_t samples_log2 = static_cast<uint32_t>(std::countr_zero(d.samples));
307 const uint32_t elements_log2 = block_log2 - element_log2 - samples_log2;
308 const bool wide = (samples_log2 & 1) == 0 || (block_log2 & 1) != 0;
309 const uint32_t w = (elements_log2 + (wide ? 1u : 0u)) / 2;
310 block = {1u << w, 1u << (elements_log2 - w), 1};
311 }
312 uint32_t slices = round_up(d.depth, block[2]);
313 const bool three_d = d.dimension == Dimension::tex3d;
314 // Mip depths placed by a thick layout (thin ones store depth as slices).
315 const auto mip_depth = [&](uint32_t i) { return thick ? padded_dim(d.depth, i, 1) : 1u; };
316 const auto depth_of = [&](uint32_t i) { return three_d ? dim(d.depth, i, 1) : 1u; };
317 const auto width = [&](uint32_t i) { return dim(d.width, i, d.block); };
318 const auto height = [&](uint32_t i) { return dim(d.height, i, d.block); };
319 uint32_t first_tail_mip = d.mips;
320 uint64_t slice_size = 0;
321 if (d.mips == 1) {
322 Mip m;
323 m.width = width(0);
324 m.height = height(0);
325 m.depth = depth_of(0);
326 m.pitch = round_up(width(0), block[0]);
327 m.rows = round_up(height(0), block[1]);
328 m.depth_pitch = three_d ? slices : 1;
329 l.mips.push_back(m);
330 slice_size = uint64_t{m.pitch} * m.rows * bpe * d.samples;
331 } else {
332 // GetMipTailDim: the largest mip the tail takes.
333 std::array<uint32_t, 3> tail_max = block;
334 if (thick) {
335 switch (block_log2 % 3) {
336 case 0: tail_max[1] >>= 1; break;
337 case 1: tail_max[0] >>= 1; break;
338 default: tail_max[2] >>= 1; break;
339 }
340 } else {
341 tail_max[0] >>= 1;
342 }
343 // GetMaxNumMipsInTail; 256-byte blocks have no tail (ComputeSurfaceInfoMicroTiled).
344 const uint32_t effective = thick ? block_log2 - (block_log2 - 8) / 3 : block_log2;
345 const uint32_t max_in_tail = effective == 8 ? 0
346 : (effective >= 9 && effective <= 11) ? 1 + (1u << (effective - 9))
347 : effective - 4;
348 // dsMipmapHtileFix: 8- and 16-bit depth enter the tail as 32-bit.
349 std::array<uint32_t, 3> fixed = tail_max;
350 if (is_z_order(d.swizzle) && element_log2 <= 1) {
351 const auto* b = kBlock256_2d[element_log2];
352 fixed[0] /= b[0] / kBlock256_2d[2][0];
353 fixed[1] /= b[1] / kBlock256_2d[2][1];
354 }
355 std::vector<uint64_t> sizes;
356 for (uint32_t i = 0; i < d.mips; ++i) {
357 const uint32_t w = padded_dim(d.width, i, d.block), h = padded_dim(d.height, i, d.block);
358 if (w <= fixed[0] && h <= fixed[1] && d.mips - i <= max_in_tail) {
359 first_tail_mip = i;
360 slice_size += block_bytes / block[2];
361 break;
362 }
363 const uint32_t pitch = round_up(w, block[0]), rows = round_up(h, block[1]);
364 const uint32_t depth = round_up(mip_depth(i), block[2]);
365 const uint64_t one = uint64_t{pitch} * rows * bpe;
366 slice_size += one;
367 sizes.push_back(one * block[2]);
368 Mip m;
369 m.width = width(i);
370 m.height = height(i);
371 m.depth = depth_of(i);
372 m.pitch = pitch;
373 m.rows = rows;
374 m.depth_pitch = three_d ? depth : 1;
375 l.mips.push_back(m);
376 }
377 // Standard mips from the smallest up, after the tail block.
378 uint64_t offset = first_tail_mip < d.mips ? block_bytes : 0;
379 for (uint32_t i = first_tail_mip; i-- > 0;) {
380 l.mips[i].offset = offset;
381 offset += sizes[i];
382 }
383 uint32_t micro[2];
384 if (thick) {
385 micro[0] = kBlock256_3d[element_log2][0];
386 micro[1] = kBlock256_3d[element_log2][1];
387 } else {
388 micro[0] = kBlock256_2d[element_log2][0];
389 micro[1] = kBlock256_2d[element_log2][1];
390 }
391 uint32_t pitch = tail_max[0], rows = tail_max[1];
392 for (uint32_t i = first_tail_mip; i < d.mips; ++i) {
393 const uint32_t m = max_in_tail - 1 - (i - first_tail_mip);
394 const uint32_t offset_in_tail = m > 6 ? 16u << m : m << 8;
395 // Address bits 8.. of the offset, odd ones x, even ones y.
396 const auto bits = [&](uint32_t from) {
397 uint32_t v = 0;
398 for (uint32_t b = 0; b < 6; ++b) v |= ((offset_in_tail >> (from + 2 * b)) & 1u) << b;
399 return v;
400 };
401 uint32_t x = bits(9), y = bits(8);
402 if ((block_log2 & 1) != 0) {
403 std::swap(x, y);
404 if ((element_log2 & 1) != 0) {
405 y = (y << 1) | (x & 1);
406 x >>= 1;
407 }
408 }
409 Mip t;
410 t.width = width(i);
411 t.height = height(i);
412 t.depth = depth_of(i);
413 t.pitch = pitch;
414 t.rows = rows;
415 t.depth_pitch = thick ? round_up(mip_depth(i), kBlock256_3d[element_log2][2]) : 1;
416 t.offset = 0;
417 t.tail = Tail{offset_in_tail, x * micro[0], y * micro[1]};
418 l.mips.push_back(t);
419 pitch = std::max(pitch >> 1, micro[0]);
420 rows = std::max(rows >> 1, micro[1]);
421 }
422 }
423 // Thick layouts store each depth slab's chain together.
424 const uint64_t slab = thick ? block[2] : 1;
425 slice_size *= slab;
426 slices /= block[2];
427 if (!is_xor(d.swizzle) && d.samples == 1) {
428 const int kind = thick ? 2 : (is_display(d.swizzle) ? 1 : 0);
429 const auto bits = detail::pattern(kind, element_log2, block_log2);
430 for (size_t a = 0; a < 3; ++a) l.pattern_[a] = detail::spread(bits[a]);
431 }
432 l.block = block;
433 l.thick = thick;
434 l.slices = slices;
435 l.slice_size = slice_size;
436 l.size = slice_size * slices;
437 l.alignment = block_bytes;
438 l.first_tail_mip = first_tail_mip;
439 return l;
440 }
441
442 // The slice and the depth inside it for z (an array slice or a 3D depth slice).
443 std::pair<uint32_t, uint32_t> split(uint32_t z) const {
444 return thick ? std::pair{z / block[2], z % block[2]} : std::pair{z, 0u};
445 }
446
447 // The part of an address that depends on the row (and depth in a thick block).
448 uint64_t row(const Mip& m, uint32_t y, uint32_t z) const {
449 const uint32_t bw = block[0], bh = block[1];
450 const int log2 = std::countr_zero(alignment);
451 // In the tail the pattern of the shifted position gives the mip's offset inside the tail block.
452 y += m.tail ? m.tail->y : 0;
453 const uint64_t blocks = uint64_t{y / bh} * (m.pitch / bw);
454 return (blocks << log2) + (pattern_[1][y % bh] | pattern_[2][z]);
455 }
456
457 // The part of an address that depends on the column.
458 uint64_t column(const Mip& m, uint32_t x) const {
459 const uint32_t bw = block[0];
460 x += m.tail ? m.tail->x : 0;
461 return (uint64_t{x / bw} << std::countr_zero(alignment)) + pattern_[0][x % bw];
462 }
463
464 // Visits contiguous runs as (tiled byte offset, linear byte offset, length).
465 template <class Copy>
466 Error walk(size_t tiled_len, uint32_t mip, uint32_t slice, size_t linear_len, size_t row_pitch,
467 size_t depth_pitch, Copy&& copy) const {
468 if (mip >= mips.size()) return Error::invalid;
469 const Mip& m = mips[mip];
470 const uint32_t depth = m.depth;
471 uint32_t first = slice;
472 if (desc.dimension == Dimension::tex3d) {
473 if (slice != 0) return Error::invalid;
474 first = 0;
475 }
476 if (first >= slices) return Error::invalid;
477 if (!addressable()) return Error::unsupported;
478 const size_t n = desc.element_bytes;
479 const size_t bytes = size_t{m.width} * n;
480 // need = (depth - 1) * depth_pitch + (height - 1) * row_pitch + bytes, refused on overflow.
481 const size_t dz = depth - 1u, dy = m.height - 1u;
482 if ((dz && depth_pitch > SIZE_MAX / dz) || (dy && row_pitch > SIZE_MAX / dy)) return Error::too_small;
483 const size_t depth_offset = dz * depth_pitch, row_offset = dy * row_pitch;
484 if (depth_offset > SIZE_MAX - row_offset || depth_offset + row_offset > SIZE_MAX - bytes)
485 return Error::too_small;
486 const size_t need = depth_offset + row_offset + bytes;
487 if (tiled_len < size || linear_len < need || row_pitch < bytes) return Error::too_small;
488 const bool is_linear = desc.swizzle == kLinear;
489 // The row and depth contribute one common base to every column, so the same contiguous runs repeat on
490 // every row, including mip tails.
491 struct Run {
492 size_t tiled, linear, len;
493 };
494 std::vector<Run> runs;
495 if (!is_linear) {
496 size_t first_linear = 0, first_tiled = static_cast<size_t>(column(m, 0));
497 for (uint32_t x = 1; x < m.width; ++x) {
498 const size_t off = static_cast<size_t>(column(m, x));
499 const size_t at = x * n;
500 if (off != first_tiled + (at - first_linear)) {
501 runs.push_back({first_tiled, first_linear, at - first_linear});
502 first_tiled = off;
503 first_linear = at;
504 }
505 }
506 runs.push_back({first_tiled, first_linear, bytes - first_linear});
507 }
508 for (uint32_t z = 0; z < depth; ++z) {
509 const auto [s, inner] = split(first + z);
510 const uint64_t base = uint64_t{s} * slice_size + m.offset;
511 for (uint32_t y = 0; y < m.height; ++y) {
512 const size_t linear_row = z * depth_pitch + y * row_pitch;
513 if (is_linear) {
514 copy(static_cast<size_t>(base + uint64_t{y} * m.pitch * n), linear_row, bytes);
515 } else {
516 const size_t tiled_row = static_cast<size_t>(base + row(m, y, inner));
517 for (const Run& r : runs) copy(tiled_row + r.tiled, linear_row + r.linear, r.len);
518 }
519 }
520 }
521 return Error::ok;
522 }
523};
524
525// What a DXGI format stores per element: bytes, texels per element side (4 for block compression), and whether its
526// stencil is a second plane (the GPU keeps depth and stencil apart). nullopt for 96-bit, 1-bit, packed 4:2:2 and
527// video formats, which have no layout here.
528struct Format {
529 uint32_t bytes, block;
530 bool stencil;
531};
532inline std::optional<Format> format(uint32_t dxgi) {
533 const auto in = [&](uint32_t lo, uint32_t hi) { return dxgi >= lo && dxgi <= hi; };
534 if (in(1, 4)) return Format{16, 1, false};
535 if (in(9, 18)) return Format{8, 1, false};
536 if (in(19, 22) || in(44, 47)) return Format{4, 1, true};
537 if (in(23, 43) || dxgi == 67 || in(87, 93) || dxgi == 116 || dxgi == 117) return Format{4, 1, false};
538 if (in(48, 59) || dxgi == 85 || dxgi == 86 || dxgi == 115) return Format{2, 1, false};
539 if (in(118, 120)) return Format{2, 1, true};
540 if (in(60, 65)) return Format{1, 1, false};
541 if (in(70, 72) || in(79, 81)) return Format{8, 4, false};
542 if (in(73, 78) || in(82, 84) || in(94, 99)) return Format{16, 4, false};
543 return std::nullopt;
544}
545
546// A texture as the console allocates it: a D3D12-style description with a swizzle mode.
547struct TextureDesc {
548 Dimension dimension = Dimension::tex2d;
549 uint32_t width = 1, height = 1; // in texels
550 uint32_t depth_or_array = 1; // depth of a 3D texture, else the array size
551 uint32_t mips = 1; // 0: the full chain
552 uint32_t format = 0; // DXGI format number
553 uint32_t samples = 1;
554 uint32_t swizzle = kLinear;
555};
556
557struct Plane {
558 uint64_t offset = 0; // from the start of the texture
559 bool stencil = false;
560 Layout layout;
561};
562
563// Every data plane of a texture (depth, then stencil), placed one after the other. No compression metadata planes
564// (HTILE, CMASK, FMASK, DCC): the console adds them to render targets and depth buffers unless the description
565// denies them, so those are smaller here than on the console; the host GPU renders them, so nothing reads that
566// memory.
567struct Texture {
568 std::vector<Plane> planes;
569 uint64_t size = 0;
570 uint64_t alignment = 0;
571
572 static std::optional<Texture> make(const TextureDesc& desc) {
573 const auto f = format(desc.format);
574 if (!f) return std::nullopt;
575 const uint32_t depth3d = desc.dimension == Dimension::tex3d ? desc.depth_or_array : 1;
576 const uint32_t mips =
577 desc.mips ? desc.mips
578 : 32u - static_cast<uint32_t>(std::countl_zero(
579 std::max({desc.width, desc.height, depth3d, 1u})));
580 const auto plane = [&](uint32_t bytes) {
581 Desc d;
582 d.dimension = desc.dimension;
583 d.width = desc.width;
584 d.height = desc.height;
585 d.depth = desc.depth_or_array;
586 d.mips = mips;
587 d.element_bytes = bytes;
588 d.block = f->block;
589 d.samples = std::max(desc.samples, 1u);
590 d.swizzle = desc.swizzle;
591 return d;
592 };
593 Texture t;
594 auto main = Layout::make(plane(f->bytes));
595 if (!main) return std::nullopt;
596 t.planes.push_back({0, false, std::move(*main)});
597 if (f->stencil) {
598 auto s = Layout::make(plane(1));
599 if (!s) return std::nullopt;
600 const uint64_t a = s->alignment;
601 const uint64_t offset = (t.planes[0].layout.size + a - 1) / a * a;
602 t.planes.push_back({offset, true, std::move(*s)});
603 }
604 const Plane& last = t.planes.back();
605 t.size = last.offset + last.layout.size;
606 for (const Plane& p : t.planes) t.alignment = std::max(t.alignment, p.layout.alignment);
607 return t;
608 }
609};
610
611} // namespace leonida::console_texture
diff --git a/runtime/src/d3d12_xs_frame_events.h b/runtime/src/d3d12_xs_frame_events.h
new file mode 100644
index 000000000..b4a128fb9
--- /dev/null
+++ b/runtime/src/d3d12_xs_frame_events.h
@@ -0,0 +1,47 @@
1#pragma once
2
3// Portable Xbox Series D3D12 device slot 81 (GetFrameEventsX) ABI model (no Windows or Vulkan dependency).
4//
5// Observed call shape (static ABI inspection, offsets and stride only):
6// HRESULT GetFrameEventsX(uint64_t frameToken, uint32_t flags, uint32_t* pNumEvents, XboxFrameEvent* pEvents)
7//
8// Each output event record has stride 0x38 bytes:
9// +0x00: uint32_t event_type
10// +0x08: uint8_t status (0 = ok)
11// +0x18: uint64_t timestamp
12
13#include <cstddef>
14#include <cstdint>
15
16namespace leonida::d3d12_xs {
17
18// Device slot 81 (GetFrameEventsX) output event record (exact stride 0x38 bytes).
19struct XboxFrameEvent {
20 std::uint32_t event_type = 0; // +0x00
21 std::uint32_t reserved0 = 0; // +0x04
22 std::uint8_t status = 0; // +0x08 (0 = ok)
23 std::uint8_t pad[15] = {}; // +0x09..+0x17
24 std::uint64_t timestamp = 0; // +0x18
25 std::uint64_t reserved1[3] = {}; // +0x20..+0x37
26};
27static_assert(sizeof(XboxFrameEvent) == 0x38);
28static_assert(offsetof(XboxFrameEvent, event_type) == 0x00);
29static_assert(offsetof(XboxFrameEvent, status) == 0x08);
30static_assert(offsetof(XboxFrameEvent, timestamp) == 0x18);
31
32enum class FrameEventQueryStatus : std::uint32_t {
33 ok = 0,
34 null_count = 1,
35 null_buffer = 2,
36};
37
38// Validates GetFrameEventsX output parameters and reports zero pending frame events.
39// With no hardware flip-event history yet, reporting *num_events = 0 is cleanly handled by callers.
40inline FrameEventQueryStatus query_frame_events_empty(std::uint32_t* num_events, XboxFrameEvent* events) {
41 if (!num_events) return FrameEventQueryStatus::null_count;
42 if (*num_events > 0 && !events) return FrameEventQueryStatus::null_buffer;
43 *num_events = 0;
44 return FrameEventQueryStatus::ok;
45}
46
47} // namespace leonida::d3d12_xs
diff --git a/runtime/src/deferred_image_binding.h b/runtime/src/deferred_image_binding.h
new file mode 100644
index 000000000..668cf593d
--- /dev/null
+++ b/runtime/src/deferred_image_binding.h
@@ -0,0 +1,31 @@
1#pragma once
2
3#include <atomic>
4#include <mutex>
5
6namespace leonida {
7
8// A placed image can be named concurrently by command replay and descriptor creation.
9// Vulkan permits one successful bind for the lifetime of an ordinary image.
10class DeferredImageBinding {
11public:
12 using Bind = bool (*)(void*);
13 DeferredImageBinding(void* owner, Bind bind) : owner_(owner), bind_(bind) {}
14 bool bound() const { return bound_.load(std::memory_order_acquire); }
15 bool ensure() {
16 if (bound()) return true;
17 std::lock_guard lock(mutex_);
18 if (bound()) return true;
19 if (!bind_(owner_)) return false;
20 bound_.store(true, std::memory_order_release);
21 return true;
22 }
23
24private:
25 void* owner_;
26 Bind bind_;
27 std::mutex mutex_;
28 std::atomic<bool> bound_{false};
29};
30
31} // namespace leonida
diff --git a/runtime/src/depth24_fragment.h b/runtime/src/depth24_fragment.h
index 10f0dada8..d32f975b2 100644
--- a/runtime/src/depth24_fragment.h
+++ b/runtime/src/depth24_fragment.h
@@ -37,12 +37,13 @@ struct Depth24Bias {
37 int constant = 0; // D3D12_RASTERIZER_DESC::DepthBias 37 int constant = 0; // D3D12_RASTERIZER_DESC::DepthBias
38 float slope = 0.0f; // SlopeScaledDepthBias 38 float slope = 0.0f; // SlopeScaledDepthBias
39 float clamp = 0.0f; // DepthBiasClamp: > 0 caps the bias, < 0 floors it, 0 leaves it 39 float clamp = 0.0f; // DepthBiasClamp: > 0 caps the bias, < 0 floors it, 0 leaves it
40 float levels = 16777215.0f;
40 bool any() const { return constant != 0 || slope != 0.0f; } 41 bool any() const { return constant != 0 || slope != 0.0f; }
41}; 42};
42 43
43// D3D's constant term in float: (float)DepthBias * r, with r the float nearest 1 / (2^24 - 1). 44// D3D's constant term in float: (float)DepthBias * r, with r the float nearest 1 / (2^24 - 1).
44inline float depth24_bias_constant(int bias) { 45inline float depth24_bias_constant(int bias, float levels=16777215.0f) {
45 return float(bias) * float(1.0 / 16777215.0); 46 return float(bias) * float(1.0 / double(levels));
46} 47}
47 48
48namespace spirv24 { 49namespace spirv24 {
@@ -141,7 +142,7 @@ private:
141// The edit, on a parsed module. Globals are collected first and spliced in at their section's end. 142// The edit, on a parsed module. Globals are collected first and spliced in at their section's end.
142class Patch { 143class Patch {
143public: 144public:
144 Patch(Module& m, std::uint32_t entry) : m_(m), entry_(entry) { 145 Patch(Module& m, std::uint32_t entry, float levels) : m_(m), entry_(entry), levels_(levels) {
145 // Copies: apply() moves the module's instructions while the code at returns still looks types up. 146 // Copies: apply() moves the module's instructions while the code at returns still looks types up.
146 for (const Inst& i : m.insts()) { 147 for (const Inst& i : m.insts()) {
147 if (opcode(i) == op_function) break; 148 if (opcode(i) == op_function) break;
@@ -185,7 +186,7 @@ public:
185 void prime_quantise() { 186 void prime_quantise() {
186 t_bool(); 187 t_bool();
187 glsl(); 188 glsl();
188 for (float f : {16777215.0f, 0.0f}) f32(f); 189 for (float f : {levels_, 0.0f}) f32(f);
189 for (std::uint32_t u : {0x3f800000u, 0xffffffu, 0x7f800000u, 0u, 23u, 1u, 80u}) u32(u); 190 for (std::uint32_t u : {0x3f800000u, 0xffffffu, 0x7f800000u, 0u, 23u, 1u, 80u}) u32(u);
190 } 191 }
191 std::uint32_t f32(float f) { return constant(t_float(), bits(f)); } 192 std::uint32_t f32(float f) { return constant(t_float(), bits(f)); }
@@ -248,11 +249,11 @@ public:
248 std::uint32_t quantise(std::vector<Inst>& code, std::uint32_t z) { 249 std::uint32_t quantise(std::vector<Inst>& code, std::uint32_t z) {
249 const std::uint32_t tf = t_float(), tu = t_uint(), tb = t_bool(); 250 const std::uint32_t tf = t_float(), tu = t_uint(), tb = t_bool();
250 const std::uint32_t b = emit(code, op_bitcast, tu, {z}); 251 const std::uint32_t b = emit(code, op_bitcast, tu, {z});
251 const std::uint32_t product = emit(code, op_f_mul, tf, {z, f32(16777215.0f)}); 252 const std::uint32_t product = emit(code, op_f_mul, tf, {z, f32(levels_)});
252 const std::uint32_t rounded = ext(code, tf, glsl_round_even, {product}); 253 const std::uint32_t rounded = ext(code, tf, glsl_round_even, {product});
253 // Clamped before the conversion so an out-of-range float never reaches OpConvertFToU (undefined there). 254 // Clamped before the conversion so an out-of-range float never reaches OpConvertFToU (undefined there).
254 const std::uint32_t safe = ext(code, tf, glsl_fmin, {ext(code, tf, glsl_fmax, {rounded, f32(0.0f)}), 255 const std::uint32_t safe = ext(code, tf, glsl_fmin, {ext(code, tf, glsl_fmax, {rounded, f32(0.0f)}),
255 f32(16777215.0f)}); 256 f32(levels_)});
256 const std::uint32_t code_mid = emit(code, op_convert_f_to_u, tu, {safe}); 257 const std::uint32_t code_mid = emit(code, op_convert_f_to_u, tu, {safe});
257 const std::uint32_t at_least_one = emit(code, op_u_greater_than_equal, tb, {b, u32(0x3f800000u)}); 258 const std::uint32_t at_least_one = emit(code, op_u_greater_than_equal, tb, {b, u32(0x3f800000u)});
258 const std::uint32_t code_hi = emit(code, op_select, tu, {at_least_one, u32(0xffffffu), code_mid}); 259 const std::uint32_t code_hi = emit(code, op_select, tu, {at_least_one, u32(0xffffffu), code_mid});
@@ -327,6 +328,7 @@ public:
327 } 328 }
328 329
329private: 330private:
331 float levels_;
330 Module& m_; 332 Module& m_;
331 std::uint32_t entry_; 333 std::uint32_t entry_;
332 std::vector<Inst> existing_; 334 std::vector<Inst> existing_;
@@ -369,7 +371,7 @@ inline std::vector<std::uint32_t> depth24_patch_fragment(const std::vector<std::
369 if (opcode(i) == op_function) break; 371 if (opcode(i) == op_function) break;
370 } 372 }
371 373
372 Patch p(m, entry); 374 Patch p(m, entry, bias.levels);
373 const std::uint32_t tf = p.t_float(); 375 const std::uint32_t tf = p.t_float();
374 p.prime_quantise(); 376 p.prime_quantise();
375 std::uint32_t frag_depth = p.builtin_variable(builtin_frag_depth); 377 std::uint32_t frag_depth = p.builtin_variable(builtin_frag_depth);
@@ -396,7 +398,7 @@ inline std::vector<std::uint32_t> depth24_patch_fragment(const std::vector<std::
396 const std::uint32_t dy = p.ext(entry_code, tf, glsl_fabs, {p.emit(entry_code, op_dpdy, tf, {z})}); 398 const std::uint32_t dy = p.ext(entry_code, tf, glsl_fabs, {p.emit(entry_code, op_dpdy, tf, {z})});
397 const std::uint32_t max_slope = p.ext(entry_code, tf, glsl_fmax, {dx, dy}); 399 const std::uint32_t max_slope = p.ext(entry_code, tf, glsl_fmax, {dx, dy});
398 std::uint32_t amount = p.emit(entry_code, op_f_mul, tf, {p.f32(bias.slope), max_slope}); 400 std::uint32_t amount = p.emit(entry_code, op_f_mul, tf, {p.f32(bias.slope), max_slope});
399 amount = p.emit(entry_code, op_f_add, tf, {amount, p.f32(depth24_bias_constant(bias.constant))}); 401 amount = p.emit(entry_code, op_f_add, tf, {amount, p.f32(depth24_bias_constant(bias.constant,bias.levels))});
400 if (bias.clamp > 0.0f) amount = p.ext(entry_code, tf, glsl_fmin, {amount, p.f32(bias.clamp)}); 402 if (bias.clamp > 0.0f) amount = p.ext(entry_code, tf, glsl_fmin, {amount, p.f32(bias.clamp)});
401 if (bias.clamp < 0.0f) amount = p.ext(entry_code, tf, glsl_fmax, {amount, p.f32(bias.clamp)}); 403 if (bias.clamp < 0.0f) amount = p.ext(entry_code, tf, glsl_fmax, {amount, p.f32(bias.clamp)});
402 z = p.emit(entry_code, op_f_add, tf, {z, amount}); 404 z = p.emit(entry_code, op_f_add, tf, {z, amount});
diff --git a/runtime/src/descriptor_table.h b/runtime/src/descriptor_table.h
index 69857c4c6..a0d80968a 100644
--- a/runtime/src/descriptor_table.h
+++ b/runtime/src/descriptor_table.h
@@ -26,7 +26,19 @@ inline constexpr std::uint32_t kSlotOccupiedMarker = 0xA11CA7EDu;
26// S# key is 4 dwords followed by 4x 0xFFFFFFFF. 26// S# key is 4 dwords followed by 4x 0xFFFFFFFF.
27using DescriptorKey = std::array<std::uint32_t, 8>; 27using DescriptorKey = std::array<std::uint32_t, 8>;
28 28
29inline std::uint32_t hash_descriptor_key(const std::uint32_t key[8]) { 29// Which hash the table, and every module it serves, probe with. Both run the same FNV-1a loop over the key's dwords;
30// fnv1a_fmix32 then finalizes it with MurmurHash3's fmix32, which spreads keys whose low FNV-1a bits cluster (the T#s
31// that differ only in a high nibble of dword 0 all land in one slot today). A translated index.json declares its
32// modules' kind in the per-module meta (`descriptor_hash`); the runtime picks one kind for its table before the first
33// insert and uses it for every insert, lookup, relocation and rehash.
34enum class DescriptorHashKind : std::uint8_t { fnv1a = 0, fnv1a_fmix32 = 1 };
35
36inline constexpr const char* descriptor_hash_kind_name(DescriptorHashKind kind) {
37 return kind == DescriptorHashKind::fnv1a_fmix32 ? "fnv1a_fmix32" : "fnv1a";
38}
39
40// The bare FNV-1a loop: the hash every module has probed with until the marker says otherwise.
41inline std::uint32_t hash_descriptor_key_fnv1a(const std::uint32_t key[8]) {
30 std::uint32_t h = kFnvOffsetBasis; 42 std::uint32_t h = kFnvOffsetBasis;
31 for (int i = 0; i < 8; ++i) { 43 for (int i = 0; i < 8; ++i) {
32 h = (h ^ key[i]) * kFnvPrime; 44 h = (h ^ key[i]) * kFnvPrime;
@@ -34,6 +46,30 @@ inline std::uint32_t hash_descriptor_key(const std::uint32_t key[8]) {
34 return h; 46 return h;
35} 47}
36 48
49// MurmurHash3's fmix32 finalizer (logical shifts, arithmetic mod 2^32): what fnv1a_fmix32 applies after the FNV loop.
50inline std::uint32_t finalize_descriptor_hash(std::uint32_t h) {
51 h ^= h >> 16;
52 h *= 0x85EBCA6Bu;
53 h ^= h >> 13;
54 h *= 0xC2B2AE35u;
55 h ^= h >> 16;
56 return h;
57}
58
59inline std::uint32_t hash_descriptor_key(const std::uint32_t key[8], DescriptorHashKind kind) {
60 const std::uint32_t h = hash_descriptor_key_fnv1a(key);
61 return kind == DescriptorHashKind::fnv1a_fmix32 ? finalize_descriptor_hash(h) : h;
62}
63
64inline std::uint32_t hash_descriptor_key(const DescriptorKey& key, DescriptorHashKind kind) {
65 return hash_descriptor_key(key.data(), kind);
66}
67
68// The old default, so a table or a test that does not name a kind keeps probing with bare FNV-1a.
69inline std::uint32_t hash_descriptor_key(const std::uint32_t key[8]) {
70 return hash_descriptor_key(key, DescriptorHashKind::fnv1a);
71}
72
37inline std::uint32_t hash_descriptor_key(const DescriptorKey& key) { 73inline std::uint32_t hash_descriptor_key(const DescriptorKey& key) {
38 return hash_descriptor_key(key.data()); 74 return hash_descriptor_key(key.data());
39} 75}
@@ -69,7 +105,12 @@ class DescriptorTable {
69public: 105public:
70 enum class InsertResult { added, unchanged, replaced, added_with_relocation }; 106 enum class InsertResult { added, unchanged, replaced, added_with_relocation };
71 107
72 explicit DescriptorTable(std::uint32_t initial_capacity = 16) { 108 // `hash_kind` is the finalizer every insert, lookup, relocation and rehash of this table uses. It is fixed here,
109 // before the first insert: one table serves all the device's shaders, which all probe with the kind the device
110 // chose from their indexes (or LEONIDA_DESCRIPTOR_HASH). The default is the old bare FNV-1a.
111 explicit DescriptorTable(std::uint32_t initial_capacity = 16,
112 DescriptorHashKind hash_kind = DescriptorHashKind::fnv1a)
113 : hash_kind_(hash_kind) {
73 // Slots use nonnegative int indices internally. Larger powers also wrap the capacity counter. 114 // Slots use nonnegative int indices internally. Larger powers also wrap the capacity counter.
74 if (initial_capacity > max_capacity) throw std::length_error("Descriptor table capacity exceeds slot range"); 115 if (initial_capacity > max_capacity) throw std::length_error("Descriptor table capacity exceeds slot range");
75 std::uint32_t cap = 16; 116 std::uint32_t cap = 16;
@@ -78,6 +119,9 @@ public:
78 entries_.resize(cap); 119 entries_.resize(cap);
79 } 120 }
80 121
122 // The kind this table places and finds keys with (immutable after construction).
123 DescriptorHashKind hash_kind() const { return hash_kind_; }
124
81 // Inserts or updates a key -> index mapping. 125 // Inserts or updates a key -> index mapping.
82 // If the key already exists in one of the 8 probe slots, its index is updated. 126 // If the key already exists in one of the 8 probe slots, its index is updated.
83 // Try one bounded relocation before growing. Load never exceeds 50%. 127 // Try one bounded relocation before growing. Load never exceeds 50%.
@@ -99,7 +143,7 @@ public:
99 // Queries the index associated with key. Returns 0 if not found. 143 // Queries the index associated with key. Returns 0 if not found.
100 std::uint32_t lookup(const std::uint32_t key[8]) const { 144 std::uint32_t lookup(const std::uint32_t key[8]) const {
101 std::lock_guard lock(mutex_); 145 std::lock_guard lock(mutex_);
102 const std::uint32_t h = hash_descriptor_key(key); 146 const std::uint32_t h = hash_descriptor_key(key, hash_kind_);
103 for (std::uint32_t k = 0; k < kDescriptorProbes; ++k) { 147 for (std::uint32_t k = 0; k < kDescriptorProbes; ++k) {
104 const std::uint32_t slot = (h + k) & mask_; 148 const std::uint32_t slot = (h + k) & mask_;
105 const auto& entry = entries_[slot]; 149 const auto& entry = entries_[slot];
@@ -116,7 +160,7 @@ public:
116 160
117 bool contains(const std::uint32_t key[8]) const { 161 bool contains(const std::uint32_t key[8]) const {
118 std::lock_guard lock(mutex_); 162 std::lock_guard lock(mutex_);
119 const std::uint32_t h = hash_descriptor_key(key); 163 const std::uint32_t h = hash_descriptor_key(key, hash_kind_);
120 for (std::uint32_t k = 0; k < kDescriptorProbes; ++k) { 164 for (std::uint32_t k = 0; k < kDescriptorProbes; ++k) {
121 const std::uint32_t slot = (h + k) & mask_; 165 const std::uint32_t slot = (h + k) & mask_;
122 const auto& entry = entries_[slot]; 166 const auto& entry = entries_[slot];
@@ -249,7 +293,7 @@ private:
249 // to the first empty slot beyond that window, within its own eight probes. 293 // to the first empty slot beyond that window, within its own eight probes.
250 // A later hole is farther from every resident, so failure here is final for a single move. 294 // A later hole is farther from every resident, so failure here is final for a single move.
251 // `moved_to` receives the hole the resident moved into, so the caller can mark that slot changed too. 295 // `moved_to` receives the hole the resident moved into, so the caller can mark that slot changed too.
252 static int make_probe_slot(std::vector<DescriptorEntry>& entries, std::uint32_t hash, 296 static int make_probe_slot(std::vector<DescriptorEntry>& entries, std::uint32_t hash, DescriptorHashKind kind,
253 std::uint32_t* moved_to = nullptr) { 297 std::uint32_t* moved_to = nullptr) {
254 const auto mask = static_cast<std::uint32_t>(entries.size() - 1); 298 const auto mask = static_cast<std::uint32_t>(entries.size() - 1);
255 for (auto offset = kDescriptorProbes; offset < 2 * kDescriptorProbes - 1; ++offset) { 299 for (auto offset = kDescriptorProbes; offset < 2 * kDescriptorProbes - 1; ++offset) {
@@ -257,7 +301,7 @@ private:
257 if (entries[hole].pad == kSlotOccupiedMarker) continue; 301 if (entries[hole].pad == kSlotOccupiedMarker) continue;
258 for (auto k = kDescriptorProbes; k > 0; --k) { 302 for (auto k = kDescriptorProbes; k > 0; --k) {
259 const auto slot = (hash + k - 1) & mask; 303 const auto slot = (hash + k - 1) & mask;
260 const auto home = hash_descriptor_key(entries[slot].key); 304 const auto home = hash_descriptor_key(entries[slot].key, kind);
261 if (((hole - home) & mask) < kDescriptorProbes) { 305 if (((hole - home) & mask) < kDescriptorProbes) {
262 entries[hole] = entries[slot]; 306 entries[hole] = entries[slot];
263 if (moved_to) *moved_to = hole; 307 if (moved_to) *moved_to = hole;
@@ -271,7 +315,7 @@ private:
271 315
272 InsertResult insert_locked(const std::uint32_t key[8], std::uint32_t index) { 316 InsertResult insert_locked(const std::uint32_t key[8], std::uint32_t index) {
273 while (true) { 317 while (true) {
274 const std::uint32_t h = hash_descriptor_key(key); 318 const std::uint32_t h = hash_descriptor_key(key, hash_kind_);
275 int empty_slot = -1; 319 int empty_slot = -1;
276 320
277 for (std::uint32_t k = 0; k < kDescriptorProbes; ++k) { 321 for (std::uint32_t k = 0; k < kDescriptorProbes; ++k) {
@@ -300,14 +344,14 @@ private:
300 std::uint32_t same_hash = 0; 344 std::uint32_t same_hash = 0;
301 for (std::uint32_t k = 0; k < kDescriptorProbes; ++k) { 345 for (std::uint32_t k = 0; k < kDescriptorProbes; ++k) {
302 const auto& entry = entries_[(h + k) & mask_]; 346 const auto& entry = entries_[(h + k) & mask_];
303 if (hash_descriptor_key(entry.key) == h) ++same_hash; 347 if (hash_descriptor_key(entry.key, hash_kind_) == h) ++same_hash;
304 } 348 }
305 if (same_hash == kDescriptorProbes) 349 if (same_hash == kDescriptorProbes)
306 throw std::length_error("Descriptor hash collision exceeds shader probe limit"); 350 throw std::length_error("Descriptor hash collision exceeds shader probe limit");
307 } 351 }
308 const bool relocate = empty_slot < 0; 352 const bool relocate = empty_slot < 0;
309 std::uint32_t moved_to = 0; 353 std::uint32_t moved_to = 0;
310 if (relocate) empty_slot = make_probe_slot(entries_, h, &moved_to); 354 if (relocate) empty_slot = make_probe_slot(entries_, h, hash_kind_, &moved_to);
311 if (empty_slot >= 0) { 355 if (empty_slot >= 0) {
312 auto& entry = entries_[empty_slot]; 356 auto& entry = entries_[empty_slot];
313 std::memcpy(entry.key, key, sizeof(entry.key)); 357 std::memcpy(entry.key, key, sizeof(entry.key));
@@ -324,7 +368,7 @@ private:
324 } 368 }
325 369
326 bool erase_locked(const std::uint32_t key[8]) { 370 bool erase_locked(const std::uint32_t key[8]) {
327 const std::uint32_t h = hash_descriptor_key(key); 371 const std::uint32_t h = hash_descriptor_key(key, hash_kind_);
328 std::uint32_t found_slot = 0; 372 std::uint32_t found_slot = 0;
329 bool found = false; 373 bool found = false;
330 for (std::uint32_t k = 0; k < kDescriptorProbes; ++k) { 374 for (std::uint32_t k = 0; k < kDescriptorProbes; ++k) {
@@ -355,7 +399,7 @@ private:
355 399
356 for (const auto& old : entries_) { 400 for (const auto& old : entries_) {
357 if (old.pad != kSlotOccupiedMarker) continue; 401 if (old.pad != kSlotOccupiedMarker) continue;
358 const std::uint32_t h = hash_descriptor_key(old.key); 402 const std::uint32_t h = hash_descriptor_key(old.key, hash_kind_);
359 int slot = -1; 403 int slot = -1;
360 for (std::uint32_t k = 0; k < kDescriptorProbes; ++k) { 404 for (std::uint32_t k = 0; k < kDescriptorProbes; ++k) {
361 const std::uint32_t s = (h + k) & new_mask; 405 const std::uint32_t s = (h + k) & new_mask;
@@ -364,7 +408,7 @@ private:
364 break; 408 break;
365 } 409 }
366 } 410 }
367 if (slot < 0) slot = make_probe_slot(new_entries, h); 411 if (slot < 0) slot = make_probe_slot(new_entries, h, hash_kind_);
368 if (slot < 0) { 412 if (slot < 0) {
369 rehash_ok = false; 413 rehash_ok = false;
370 break; 414 break;
@@ -386,6 +430,7 @@ private:
386 430
387 static constexpr std::uint32_t max_capacity = std::uint32_t{1} << 31; 431 static constexpr std::uint32_t max_capacity = std::uint32_t{1} << 31;
388 mutable std::mutex mutex_; 432 mutable std::mutex mutex_;
433 const DescriptorHashKind hash_kind_;
389 std::uint32_t mask_ = 15; 434 std::uint32_t mask_ = 15;
390 std::vector<DescriptorEntry> entries_; 435 std::vector<DescriptorEntry> entries_;
391 std::size_t occupied_count_ = 0; 436 std::size_t occupied_count_ = 0;
diff --git a/runtime/src/dstorage_swizzle.h b/runtime/src/dstorage_swizzle.h
new file mode 100644
index 000000000..45186fcf8
--- /dev/null
+++ b/runtime/src/dstorage_swizzle.h
@@ -0,0 +1,29 @@
1#pragma once
2#include <cstdint>
3#include <cstring>
4#include <span>
5
6namespace leonida::dstorage {
7// The public Xbox-GDK-Samples DirectStorageTextureShuffling example stores each BC component
8// plane across the whole request. The MDU interleaves a stripe of each plane per group. The
9// sample's compute shader does the remaining intra-group shuffle; surface tiling is already baked in.
10inline constexpr unsigned stripes[][5] = {{}, {1, 1, 2}, {1, 1, 6}, {1, 3, 1, 1, 2}, {1, 3, 1, 3}};
11
12inline size_t group_size(unsigned mode) { return mode == 1 ? 16384 : 32768; }
13
14inline bool unshuffle(unsigned mode, std::span<const uint8_t> input, std::span<uint8_t> out) {
15 if (!mode || mode > 4 || input.size() != out.size() || input.size() % group_size(mode)) return false;
16 const size_t group = group_size(mode), groups = input.size() / group;
17 size_t source = 0, offset = 0;
18 for (unsigned pages : stripes[mode]) {
19 if (!pages) break;
20 const size_t bytes = pages * 4096;
21 for (size_t i = 0; i < groups; ++i) {
22 std::memcpy(out.data() + i * group + offset, input.data() + source, bytes);
23 source += bytes;
24 }
25 offset += bytes;
26 }
27 return true;
28}
29} // namespace leonida::dstorage
diff --git a/runtime/src/dstorage_trace.h b/runtime/src/dstorage_trace.h
new file mode 100644
index 000000000..3c2eda217
--- /dev/null
+++ b/runtime/src/dstorage_trace.h
@@ -0,0 +1,12 @@
1#pragma once
2#include <windows.h>
3
4namespace leonida::dstorage {
5inline bool trace_enabled() {
6 static const bool enabled = [] {
7 char value[2]{};
8 return GetEnvironmentVariableA("LEONIDA_DSTORAGE_TRACE", value, sizeof value) == 1 && value[0] == '1';
9 }();
10 return enabled;
11}
12} // namespace leonida::dstorage
diff --git a/runtime/src/dual_source_fragment.h b/runtime/src/dual_source_fragment.h
new file mode 100644
index 000000000..86bc66236
--- /dev/null
+++ b/runtime/src/dual_source_fragment.h
@@ -0,0 +1,59 @@
1#pragma once
2
3// Dual-source blending (RT-DUAL-SOURCE-BLEND). D3D12 takes the second blend source from SV_Target1, which the
4// translated pixel shader declares as the output at Location 1. Vulkan takes it from Location 0, Index 1
5// (VK_BLEND_FACTOR_SRC1_*, dualSrcBlend). For a pipeline whose blend state uses a SRC1 factor, the fragment module's
6// Location 1 output is moved to Location 0 and given Index 1. Standard library only.
7
8#include <cstdint>
9#include <map>
10#include <set>
11#include <vector>
12
13namespace leonida::dual_source {
14
15// Rewrites `words` in place and returns true, or returns false and leaves them unchanged when the module is not one
16// this rewrite understands: not SPIR-V, no Output variable at Location 1, an output at Location 2 or above (Vulkan has
17// one dual-source attachment), or an Index decoration already present.
18inline bool remap(std::vector<std::uint32_t>& words) {
19 constexpr std::uint32_t kOpDecorate = 71, kOpVariable = 59, kOpTypePointer = 32;
20 constexpr std::uint32_t kLocation = 30, kIndex = 32, kBuiltIn = 11, kStorageOutput = 3;
21 if (words.size() < 5 || words[0] != 0x07230203) return false;
22 std::map<std::uint32_t, std::size_t> location_at; // variable id -> word index of its Location literal
23 std::map<std::uint32_t, std::uint32_t> location_of;
24 std::set<std::uint32_t> output_pointers, outputs, builtins;
25 for (std::size_t at = 5; at < words.size();) {
26 const std::uint32_t n = words[at] >> 16, op = words[at] & 0xffffu;
27 if (!n || n > words.size() - at) return false;
28 if (op == kOpDecorate && n == 4 && words[at + 2] == kLocation) {
29 location_at[words[at + 1]] = at + 3;
30 location_of[words[at + 1]] = words[at + 3];
31 } else if (op == kOpDecorate && n >= 3 && words[at + 2] == kIndex) {
32 return false;
33 } else if (op == kOpDecorate && n >= 3 && words[at + 2] == kBuiltIn) {
34 builtins.insert(words[at + 1]);
35 } else if (op == kOpTypePointer && n == 4 && words[at + 2] == kStorageOutput) {
36 output_pointers.insert(words[at + 1]);
37 } else if (op == kOpVariable && n >= 4 && words[at + 3] == kStorageOutput) {
38 outputs.insert(words[at + 2]);
39 }
40 at += n;
41 }
42 std::uint32_t second = 0;
43 for (const std::uint32_t id : outputs) {
44 if (builtins.count(id)) continue;
45 const auto loc = location_of.find(id);
46 if (loc == location_of.end()) continue;
47 if (loc->second >= 2) return false;
48 if (loc->second == 1) second = id;
49 }
50 if (!second) return false;
51 const std::size_t literal = location_at[second];
52 words[literal] = 0;
53 // OpDecorate %second Index 1, right after its Location decoration (annotations stay together).
54 const std::vector<std::uint32_t> index{(4u << 16) | kOpDecorate, second, kIndex, 1};
55 words.insert(words.begin() + static_cast<std::ptrdiff_t>(literal + 1), index.begin(), index.end());
56 return true;
57}
58
59} // namespace leonida::dual_source
diff --git a/runtime/src/frame_pacer.h b/runtime/src/frame_pacer.h
index afeaf191e..2c9f1fd7e 100644
--- a/runtime/src/frame_pacer.h
+++ b/runtime/src/frame_pacer.h
@@ -1,4 +1,6 @@
1#pragma once 1#pragma once
2#include <utility>
3#include <memory>
2 4
3// Frame pacing for the Xbox presentation path (docs/d3d12_vulkan.md section 4.5): what SetFrameIntervalX, 5// Frame pacing for the Xbox presentation path (docs/d3d12_vulkan.md section 4.5): what SetFrameIntervalX,
4// ScheduleFrameEventX, WaitFrameEventX and GetFrameStatisticsX do, and the token check and flip bookkeeping that 6// ScheduleFrameEventX, WaitFrameEventX and GetFrameStatisticsX do, and the token check and flip bookkeeping that
@@ -39,7 +41,9 @@
39#include <deque> 41#include <deque>
40#include <functional> 42#include <functional>
41#include <limits> 43#include <limits>
44#include <memory>
42#include <mutex> 45#include <mutex>
46#include <utility>
43#include <vector> 47#include <vector>
44 48
45namespace leonida { 49namespace leonida {
@@ -113,6 +117,7 @@ inline constexpr std::uint32_t frame_event_flip = 2;
113inline constexpr std::uint32_t frame_event_count = 3; 117inline constexpr std::uint32_t frame_event_count = 3;
114// Issue a consecutive frame token even when WaitFrameEventX(origin, ...) times out (returns S_FALSE). 118// Issue a consecutive frame token even when WaitFrameEventX(origin, ...) times out (returns S_FALSE).
115inline constexpr std::uint32_t frame_wait_flag_token_on_timeout = 2; 119inline constexpr std::uint32_t frame_wait_flag_token_on_timeout = 2;
120inline constexpr std::uint32_t wait_flag_current_token = frame_wait_flag_token_on_timeout;
116// Statistics types (bit mask). Interval and render entries are never produced here. 121// Statistics types (bit mask). Interval and render entries are never produced here.
117inline constexpr std::uint32_t stat_frame_interval = 0x01; 122inline constexpr std::uint32_t stat_frame_interval = 0x01;
118inline constexpr std::uint32_t stat_frame_event = 0x02; 123inline constexpr std::uint32_t stat_frame_event = 0x02;
@@ -171,9 +176,21 @@ struct FramePacingSummary {
171 std::uint64_t latency_p99_us = 0; // nearest-rank 99th percentile origin-to-present latency in us 176 std::uint64_t latency_p99_us = 0; // nearest-rank 99th percentile origin-to-present latency in us
172}; 177};
173 178
179class FrameTokenSource {
180public:
181 std::uint64_t issue() { return last_.fetch_add(1, std::memory_order_acq_rel) + 1; }
182 std::uint64_t issued() const { return last_.load(std::memory_order_acquire); }
183
184private:
185 std::atomic<std::uint64_t> last_{0};
186};
187
174class FramePacer { 188class FramePacer {
175public: 189public:
176 explicit FramePacer(FrameClock& clock) : clock_(clock) { 190 explicit FramePacer(FrameClock& clock, std::shared_ptr<FrameTokenSource> tokens = nullptr,
191 bool current_origin_poll = false)
192 : clock_(clock), tokens_(tokens ? std::move(tokens) : std::make_shared<FrameTokenSource>()),
193 current_origin_poll_(current_origin_poll) {
177 clock_.set_wake([this] { 194 clock_.set_wake([this] {
178 { std::lock_guard guard(mutex_); } 195 { std::lock_guard guard(mutex_); }
179 cv_.notify_all(); 196 cv_.notify_all();
@@ -239,6 +256,8 @@ public:
239 if (event >= frame_event_count) return pacer_hr::invalid_arg; 256 if (event >= frame_event_count) return pacer_hr::invalid_arg;
240 if (event == frame_event_origin && !token) return pacer_hr::invalid_arg; 257 if (event == frame_event_origin && !token) return pacer_hr::invalid_arg;
241 std::unique_lock lock(mutex_); 258 std::unique_lock lock(mutex_);
259 if (current_origin_poll_ && event == frame_event_origin && timeout_ms == 0 && (flags & wait_flag_current_token))
260 return current_token_locked(token);
242 ++waiters_; 261 ++waiters_;
243 const std::int32_t result = wait_locked(lock, event, timeout_ms, flags, token); 262 const std::int32_t result = wait_locked(lock, event, timeout_ms, flags, token);
244 if (--waiters_ == 0) cv_.notify_all(); 263 if (--waiters_ == 0) cv_.notify_all();
@@ -295,7 +314,7 @@ public:
295 std::lock_guard guard(mutex_); 314 std::lock_guard guard(mutex_);
296 if (issue) *issue = TokenIssue::none; 315 if (issue) *issue = TokenIssue::none;
297 if (suspended_) return pacer_hr::invalid_state; 316 if (suspended_) return pacer_hr::invalid_state;
298 if (token > issued_) return pacer_hr::invalid_arg; 317 if (token > tokens_->issued()) return pacer_hr::invalid_arg;
299 if (issue) { 318 if (issue) {
300 if (token == 0) *issue = TokenIssue::null_token; 319 if (token == 0) *issue = TokenIssue::null_token;
301 else if (token == last_presented_) *issue = TokenIssue::repeated; 320 else if (token == last_presented_) *issue = TokenIssue::repeated;
@@ -394,7 +413,8 @@ public:
394 } 413 }
395 414
396 bool suspended() const { std::lock_guard guard(mutex_); return suspended_; } 415 bool suspended() const { std::lock_guard guard(mutex_); return suspended_; }
397 std::uint64_t tokens_issued() const { std::lock_guard guard(mutex_); return issued_; } 416 std::uint64_t tokens_issued() const { return tokens_->issued(); }
417 const std::shared_ptr<FrameTokenSource>& token_source() const { return tokens_; }
398 std::uint32_t frames_in_flight() { 418 std::uint32_t frames_in_flight() {
399 std::lock_guard guard(mutex_); 419 std::lock_guard guard(mutex_);
400 retire_locked(clock_.now_us()); 420 retire_locked(clock_.now_us());
@@ -500,12 +520,30 @@ private:
500 } 520 }
501 } 521 }
502 522
523 std::int32_t current_token_locked(std::uint64_t* token) {
524 if (shutdown_ || suspended_) return pacer_hr::invalid_state;
525 if (!interval_set_ || !event_armed_[frame_event_origin]) {
526 *token = tokens_->issue();
527 return pacer_hr::ok;
528 }
529 const auto now = clock_.now_us();
530 retire_locked(now);
531 const auto offset = event_offset_us_[frame_event_origin];
532 const auto first = epoch_us_ + offset;
533 const auto newest = now >= first ? static_cast<std::int64_t>((now - first) / period_us_) : 0;
534 auto& tick = last_event_tick_[frame_event_origin];
535 tick = std::max(tick, newest);
536 const auto origin = first + static_cast<std::uint64_t>(tick) * period_us_;
537 *token = issue_token_locked(origin, origin - offset + period_us_);
538 return pacer_hr::ok;
539 }
540
503 bool any_armed_locked() const { 541 bool any_armed_locked() const {
504 return event_armed_[0] || event_armed_[1] || event_armed_[2]; 542 return event_armed_[0] || event_armed_[1] || event_armed_[2];
505 } 543 }
506 544
507 std::uint64_t issue_token_locked(std::uint64_t origin_us, std::uint64_t due_us) { 545 std::uint64_t issue_token_locked(std::uint64_t origin_us, std::uint64_t due_us) {
508 const std::uint64_t tok = ++issued_; 546 const std::uint64_t tok = tokens_->issue(); // the shared token source (the device proxy and PresentX pace with it)
509 Record record; 547 Record record;
510 record.token = tok; 548 record.token = tok;
511 record.origin_us = origin_us; 549 record.origin_us = origin_us;
@@ -580,7 +618,8 @@ private:
580 std::uint32_t event_offset_us_[frame_event_count] = {0, 0, 0}; 618 std::uint32_t event_offset_us_[frame_event_count] = {0, 0, 0};
581 std::uint64_t epoch_us_ = 0; 619 std::uint64_t epoch_us_ = 0;
582 std::int64_t last_event_tick_[frame_event_count] = {0, 0, 0}; // tick 0 is the epoch itself, which has passed 620 std::int64_t last_event_tick_[frame_event_count] = {0, 0, 0}; // tick 0 is the epoch itself, which has passed
583 std::uint64_t issued_ = 0; 621 std::shared_ptr<FrameTokenSource> tokens_;
622 bool current_origin_poll_ = false;
584 std::uint64_t last_presented_ = 0; 623 std::uint64_t last_presented_ = 0;
585 std::uint64_t immediate_presents_ = 0; 624 std::uint64_t immediate_presents_ = 0;
586 std::uint64_t presents_recorded_ = 0; 625 std::uint64_t presents_recorded_ = 0;
diff --git a/runtime/src/fsdraw_probe.h b/runtime/src/fsdraw_probe.h
new file mode 100644
index 000000000..180b02b36
--- /dev/null
+++ b/runtime/src/fsdraw_probe.h
@@ -0,0 +1,242 @@
1#pragma once
2
3// LOCAL DIAGNOSTIC (not for upstream): fsdraw probe. Follows the title's fullscreen draws back from the backbuffer:
4// what each pipeline is (shaders, target formats, blend, write mask), what the draw's descriptor tables hold on the
5// CPU and what the GPU address arena holds at the same VA (the shader's heap_base + VA), which T#s have a bindless
6// entry, and which render targets the present-probe should read back as well.
7
8#include "title_va_alias.h"
9
10#include <array>
11#include <atomic>
12#include <cstdint>
13#include <cstdio>
14#include <cstring>
15#include <cstdlib>
16#include <mutex>
17#include <set>
18#include <string>
19#include <unordered_map>
20#include <vector>
21
22namespace leonida::fsdraw {
23
24struct State {
25 std::mutex mutex;
26 std::unordered_map<std::uintptr_t, std::string> pipelines; // graphics PSO id -> description
27 std::set<std::array<std::uint32_t, 8>> tsharps; // T#s that have a bindless entry
28 const std::uint8_t* arena = nullptr; // the GPU address arena's host mapping
29 std::uint64_t arena_size = 0;
30 std::vector<std::uint64_t> readback; // render targets of fullscreen draws (besides the presented source)
31 std::uint64_t presented_source = 0;
32 std::unordered_map<std::uint64_t, std::uint64_t> table_origin; // translated table VA -> title VA
33 std::unordered_map<std::uint64_t, std::pair<std::uint64_t, std::uint32_t>> cbv_origin; // V# base -> location, size
34};
35
36inline State& state() {
37 static State s;
38 return s;
39}
40
41inline void note_pipeline(std::uintptr_t id, std::string text) {
42 std::lock_guard lock(state().mutex);
43 state().pipelines[id] = std::move(text);
44}
45
46inline std::size_t pipeline_count() { // LOCAL DIAGNOSTIC (mem probe)
47 std::lock_guard lock(state().mutex);
48 return state().pipelines.size();
49}
50
51inline std::string pipeline(std::uintptr_t id) {
52 std::lock_guard lock(state().mutex);
53 const auto it = state().pipelines.find(id);
54 return it == state().pipelines.end() ? std::string("(not registered)") : it->second;
55}
56
57inline void note_tsharp(const std::uint32_t* words) {
58 std::array<std::uint32_t, 8> key{};
59 std::memcpy(key.data(), words, sizeof(key));
60 std::lock_guard lock(state().mutex);
61 state().tsharps.insert(key);
62}
63
64inline bool has_tsharp(const std::uint32_t* words) {
65 std::array<std::uint32_t, 8> key{};
66 std::memcpy(key.data(), words, sizeof(key));
67 std::lock_guard lock(state().mutex);
68 return state().tsharps.count(key) != 0;
69}
70
71inline void note_arena(const std::uint8_t* mapped, std::uint64_t size) {
72 std::lock_guard lock(state().mutex);
73 state().arena = mapped;
74 state().arena_size = size;
75}
76
77// A test or application may create multiple devices. Never inspect a released
78// mapping; destroying an older device must leave the current mapping alone.
79inline void forget_arena(const std::uint8_t* mapped) {
80 std::lock_guard lock(state().mutex);
81 if (state().arena == mapped) {
82 state().arena = nullptr;
83 state().arena_size = 0;
84 }
85}
86
87// A render target a fullscreen draw wrote: the present-probe reads it back with the source (at most 4 kept).
88inline void note_target(std::uint64_t id) {
89 if (!id) return;
90 std::lock_guard lock(state().mutex);
91 auto& r = state().readback;
92 for (const std::uint64_t x : r)
93 if (x == id) return;
94 if (r.size() < 4) r.push_back(id);
95}
96
97inline std::vector<std::uint64_t> targets() {
98 std::lock_guard lock(state().mutex);
99 return state().readback;
100}
101
102inline void note_table(std::uint64_t translated, std::uint64_t original) {
103 std::lock_guard lock(state().mutex);
104 auto& m = state().table_origin;
105 if (m.size() > 8192) m.clear();
106 m[translated] = original;
107}
108
109inline std::uint64_t table_origin(std::uint64_t va) {
110 std::lock_guard lock(state().mutex);
111 const auto it = state().table_origin.find(va);
112 return it == state().table_origin.end() ? va : it->second;
113}
114
115inline void note_cbv(std::uint64_t base, std::uint64_t location, std::uint32_t size) {
116 std::lock_guard lock(state().mutex);
117 auto& m = state().cbv_origin;
118 if (m.size() > 8192) m.clear();
119 m[base] = {location, size};
120}
121
122inline bool cbv_origin(std::uint64_t base, std::uint64_t& location) {
123 std::lock_guard lock(state().mutex);
124 const auto it = state().cbv_origin.find(base);
125 if (it == state().cbv_origin.end()) return false;
126 location = it->second.first;
127 return true;
128}
129
130inline std::string hex_words(const std::uint32_t* w, std::size_t n) {
131 std::string s;
132 char b[16];
133 for (std::size_t i = 0; i < n; ++i) {
134 std::snprintf(b, sizeof b, i ? " %08x" : "%08x", w[i]);
135 s += b;
136 }
137 return s;
138}
139
140// The 8 dwords at arena offset `va`, if the arena holds them.
141inline bool arena_words(std::uint64_t va, std::uint32_t* out, std::size_t n) {
142 std::lock_guard lock(state().mutex);
143 const State& s = state();
144 if (!s.arena || va + n * 4 > s.arena_size || va + n * 4 < va) return false;
145 std::memcpy(out, s.arena + va, n * 4);
146 return true;
147}
148
149inline std::uint64_t arena_size() {
150 std::lock_guard lock(state().mutex);
151 return state().arena_size;
152}
153
154// Logs one descriptor table: `cpu` is the layer's host view of the slot at `va` (null when no heap holds `va`).
155// For each slot: the CPU bytes, the arena bytes at the same VA (what a shader's heap_base + VA loads), and what the
156// CPU bytes are (null, V# with its base, or T# with whether it has a bindless entry). A V# whose base is inside the
157// arena has its first 16 dwords printed from the arena.
158inline void describe_table(const char* tag, std::uint64_t va, std::uint32_t slots, const std::uint8_t* cpu,
159 const char* heap_kind) {
160 const std::uint32_t shown = slots < 4 ? slots : 4;
161 std::fprintf(stderr, "[rt] fsdraw: %s table va 0x%llx slots %u heap %s (arena size 0x%llx)\n", tag,
162 static_cast<unsigned long long>(va), slots, heap_kind, static_cast<unsigned long long>(arena_size()));
163 for (std::uint32_t i = 0; i < shown; ++i) {
164 const std::uint64_t at = va + std::uint64_t(i) * 32;
165 std::uint32_t c[8]{}, g[8]{};
166 const bool have_cpu = cpu != nullptr;
167 if (have_cpu) std::memcpy(c, cpu + std::size_t(i) * 32, sizeof c);
168 const bool have_gpu = arena_words(at, g, 8);
169 const bool same = have_cpu && have_gpu && std::memcmp(c, g, sizeof c) == 0;
170 std::fprintf(stderr, "[rt] fsdraw: %s slot %u cpu [%s] gpu [%s]%s\n", tag, i,
171 have_cpu ? hex_words(c, 8).c_str() : "no heap", have_gpu ? hex_words(g, 8).c_str() : "OUT OF ARENA",
172 have_cpu && have_gpu ? (same ? " (same)" : " (DIFFER)") : "");
173 const std::uint32_t* w = have_cpu ? c : have_gpu ? g : nullptr;
174 if (!w) continue;
175 if (!(w[0] | w[1] | w[2] | w[3] | w[4] | w[5] | w[6] | w[7])) {
176 std::fprintf(stderr, "[rt] fsdraw: %s slot %u is null\n", tag, i);
177 continue;
178 }
179 if (!(w[3] >> 30)) { // buffer V# (TYPE in dword 3 bits 30-31 is 0)
180 const std::uint64_t base = std::uint64_t(w[0]) | (std::uint64_t(w[1] & 0xFFFFu) << 32);
181 const std::uint32_t stride = (w[1] >> 16) & 0x3FFFu;
182 std::uint32_t data[16]{};
183 const bool in_arena = arena_words(base, data, 16);
184 std::size_t nonzero = 0;
185 if (in_arena) {
186 std::vector<std::uint32_t> all(std::min<std::uint32_t>(w[2] ? w[2] : 256, 4096) / 4);
187 if (!all.empty() && arena_words(base, all.data(), all.size()))
188 for (const std::uint32_t x : all) nonzero += x != 0;
189 }
190 std::uint64_t location = 0;
191 const bool made = cbv_origin(base, location);
192 std::fprintf(stderr, "[rt] fsdraw: %s slot %u V# base 0x%llx stride %u records %u -> %s [%s] nonzero dwords "
193 "%zu%s\n",
194 tag, i, static_cast<unsigned long long>(base), stride, w[2],
195 in_arena ? "arena" : "outside the arena buffer", in_arena ? hex_words(data, 16).c_str() : "",
196 nonzero, made ? "" : " (no CreateConstantBufferView made this V#)");
197 // The CB as the title wrote it, when its location is the title's memory (CPU view): an upload buffer's
198 // VA, also outside the arena, is no CPU address.
199 std::uint64_t title_lo = 0, title_hi = 0;
200 if (made && !in_arena && location && title_va_aliases().title_memory(location, title_lo, title_hi) &&
201 title_hi - location >= 64) {
202 std::uint32_t cb[16]{};
203 std::memcpy(cb, reinterpret_cast<const void*>(static_cast<std::uintptr_t>(location)), sizeof cb);
204 std::fprintf(stderr, "[rt] fsdraw: %s slot %u CB at title 0x%llx: [%s]\n", tag, i,
205 static_cast<unsigned long long>(location), hex_words(cb, 16).c_str());
206 }
207 } else {
208 std::fprintf(stderr, "[rt] fsdraw: %s slot %u T# bindless entry %s\n", tag, i,
209 has_tsharp(w) ? "yes" : "NO (a lookup misses: index 0, zeros)");
210 }
211 }
212}
213
214// LEONIDA_FSDRAW_POKE_CB=1 (experiment): before a submission, the CB that a bound table's slot-0 V# names gets a
215// known colour in dwords 8..11 (what PS_BlitColour multiplies the vertex colour by), written into the title's own
216// copy. A non-zero render target afterwards proves table -> V# -> CB -> pixel shader -> target works on the GPU.
217inline bool poke_enabled() {
218 static const bool on = [] {
219 const char* v = std::getenv("LEONIDA_FSDRAW_POKE_CB");
220 return v && *v && *v != '0';
221 }();
222 return on;
223}
224
225inline void poke_cb(const std::uint8_t* table_cpu) {
226 if (!table_cpu || !poke_enabled()) return;
227 std::uint32_t w[4];
228 std::memcpy(w, table_cpu, sizeof w);
229 if (!(w[0] | w[1] | w[2] | w[3]) || (w[3] >> 30) || w[2] < 48) return;
230 const std::uint64_t base = std::uint64_t(w[0]) | (std::uint64_t(w[1] & 0xFFFFu) << 32);
231 std::uint64_t location = 0;
232 if (!cbv_origin(base, location) || !location) return;
233 const float colour[4] = {1.0f, 0.5f, 0.25f, 1.0f};
234 std::memcpy(reinterpret_cast<void*>(static_cast<std::uintptr_t>(location + 32)), colour, sizeof colour);
235 static std::atomic<std::uint64_t> poked{0};
236 const std::uint64_t n = ++poked;
237 if (n <= 4 || n % 600 == 0)
238 std::fprintf(stderr, "[rt] fsdraw: POKE #%llu: CB at title 0x%llx dwords 8..11 = 1.0 0.5 0.25 1.0\n",
239 static_cast<unsigned long long>(n), static_cast<unsigned long long>(location));
240}
241
242} // namespace leonida::fsdraw
diff --git a/runtime/src/gfx10_descriptors.h b/runtime/src/gfx10_descriptors.h
index a4a9b4448..219e0a8c5 100644
--- a/runtime/src/gfx10_descriptors.h
+++ b/runtime/src/gfx10_descriptors.h
@@ -146,6 +146,39 @@ inline ImageWords encode(const Image& image) {
146// TYPE names an image, so these eight dwords are a T# and not a V# followed by something else. 146// TYPE names an image, so these eight dwords are a T# and not a V# followed by something else.
147inline constexpr bool is_image(const ImageWords& words) { return detail::get(words[3], 28, 4) >= 8; } 147inline constexpr bool is_image(const ImageWords& words) { return detail::get(words[3], 28, 4) >= 8; }
148 148
149// Synthetic volume UAV metadata distinguishes the storage view from SRVs of the same mip, and distinct W
150// ranges from one another. Sampled fetches use it because Vulkan only applies slicing to storage views.
151// WORD4[31] is reserved on GFX10/GFX103; hardware uses WORD7 for metadata addresses. DEPTH and BASE_ARRAY
152// stay unchanged. D3D12 depth is at most 2048, so count - 1 and offset fit 11 bits.
153inline constexpr std::uint32_t volume_uav_flag = 0x80000000;
154inline constexpr std::uint32_t volume_uav_tag = 0xD7800000;
155inline constexpr std::uint32_t volume_uav_tag_mask = 0xff800000;
156// RGB9E5 emulation uses R32_UINT storage, not the logical float format in T# word 1. The same tag marks packed
157// 1D-family UAVs (without a W range). No ordinary SRV or raw hardware T# has this synthetic metadata.
158inline constexpr std::uint32_t packed_uav_flag = 0x00400000;
159inline constexpr std::uint32_t volume_uav_word(std::uint32_t offset, std::uint32_t count) {
160 return volume_uav_tag | ((count - 1) << 11) | offset;
161}
162struct VolumeUavRange {
163 std::uint32_t first_w = 0;
164 std::uint32_t w_size = 0;
165};
166// The tag stores the first W slice and the slice count minus one. Bit 22 is independent packed-format metadata.
167inline constexpr bool volume_uav_range(const ImageWords& words, const Image& image, VolumeUavRange& out) {
168 if (image.type != ImageType::image_3d || !(words[4] & volume_uav_flag) ||
169 (words[7] & volume_uav_tag_mask) != volume_uav_tag)
170 return false;
171 out.first_w = words[7] & 0x7ffu;
172 out.w_size = ((words[7] >> 11) & 0x7ffu) + 1u;
173 return true;
174}
175inline constexpr bool partial_volume_uav(const ImageWords& words, const Image& image) {
176 VolumeUavRange range{};
177 if (!volume_uav_range(words, image, range)) return false;
178 const auto mip_depth = image.depth >> image.first_mip;
179 return range.first_w != 0 || range.w_size != (mip_depth ? mip_depth : 1u);
180}
181
149inline constexpr float image_min_lod(const ImageWords& words) { 182inline constexpr float image_min_lod(const ImageWords& words) {
150 return float(detail::get(words[1], 8, 12)) / 256.0f; 183 return float(detail::get(words[1], 8, 12)) / 256.0f;
151} 184}
@@ -218,6 +251,7 @@ struct FormatRow {
218}; 251};
219 252
220inline constexpr Swizzle channels_r{select_x, select_zero, select_zero, select_one}; 253inline constexpr Swizzle channels_r{select_x, select_zero, select_zero, select_one};
254inline constexpr Swizzle channels_a{select_zero, select_zero, select_zero, select_x};
221inline constexpr Swizzle channels_rg{select_x, select_y, select_zero, select_one}; 255inline constexpr Swizzle channels_rg{select_x, select_y, select_zero, select_one};
222inline constexpr Swizzle channels_rgb{select_x, select_y, select_z, select_one}; 256inline constexpr Swizzle channels_rgb{select_x, select_y, select_z, select_one};
223inline constexpr Swizzle channels_rgba = identity_swizzle; 257inline constexpr Swizzle channels_rgba = identity_swizzle;
@@ -227,6 +261,10 @@ inline constexpr Swizzle channels_abgr{select_w, select_z, select_y, select_x};
227 261
228inline constexpr FormatRow format_table[] = { 262inline constexpr FormatRow format_table[] = {
229 {1, VK_FORMAT_R8_UNORM, channels_r}, // GFX10_FORMAT_8_UNORM 263 {1, VK_FORMAT_R8_UNORM, channels_r}, // GFX10_FORMAT_8_UNORM
264#ifdef VK_KHR_MAINTENANCE_5_EXTENSION_NAME
265 // An A8 render target: the same console format as the R8 row above, in the image format that can be rendered to.
266 {1, VK_FORMAT_A8_UNORM_KHR, channels_a}, // GFX10_FORMAT_8_UNORM
267#endif
230 {2, VK_FORMAT_R8_SNORM, channels_r}, // GFX10_FORMAT_8_SNORM 268 {2, VK_FORMAT_R8_SNORM, channels_r}, // GFX10_FORMAT_8_SNORM
231 {3, VK_FORMAT_R8_USCALED, channels_r}, // GFX10_FORMAT_8_USCALED 269 {3, VK_FORMAT_R8_USCALED, channels_r}, // GFX10_FORMAT_8_USCALED
232 {4, VK_FORMAT_R8_SSCALED, channels_r}, // GFX10_FORMAT_8_SSCALED 270 {4, VK_FORMAT_R8_SSCALED, channels_r}, // GFX10_FORMAT_8_SSCALED
@@ -379,6 +417,13 @@ inline constexpr VkFormat vulkan_view_format(VkFormat image_format, std::uint32_
379 if (!image) return VK_FORMAT_UNDEFINED; 417 if (!image) return VK_FORMAT_UNDEFINED;
380 if (image->gfx10 == gfx10_format) return image_format; 418 if (image->gfx10 == gfx10_format) return image_format;
381 if (is_depth_stencil_format(image_format)) return VK_FORMAT_UNDEFINED; 419 if (is_depth_stencil_format(image_format)) return VK_FORMAT_UNDEFINED;
420 // An R9G9B9E5 render target on a GPU that cannot render to E5B9G9R9 is an R11G11B10F image (the D3D12 device's
421 // r9g9b9e5_target_stand_in): a T# that names 5_9_9_9 views it in the image's own format. The image is not
422 // mutable, and the two formats have the same channels, so the swizzle is unchanged.
423 if (image_format == VK_FORMAT_B10G11R11_UFLOAT_PACK32 && gfx10_format == 132) return image_format;
424 // The same for a B4G4R4A4 render target stored as BGRA8 (b4g4r4a4_target_stand_in): 4_4_4_4 names its channels
425 // in the order BGRA8 has them.
426 if (image_format == VK_FORMAT_B8G8R8A8_UNORM && gfx10_format == 136) return image_format;
382 const FormatRow* fallback = nullptr; 427 const FormatRow* fallback = nullptr;
383 for (const FormatRow& row : format_table) { 428 for (const FormatRow& row : format_table) {
384 if (row.gfx10 != gfx10_format || is_depth_stencil_format(row.vulkan)) continue; 429 if (row.gfx10 != gfx10_format || is_depth_stencil_format(row.vulkan)) continue;
diff --git a/runtime/src/gpu_label_memory.h b/runtime/src/gpu_label_memory.h
new file mode 100644
index 000000000..ac0c53591
--- /dev/null
+++ b/runtime/src/gpu_label_memory.h
@@ -0,0 +1,95 @@
1#pragma once
2#include <cstdint>
3#include <map>
4#include <memory>
5#include <mutex>
6#include <limits>
7
8namespace leonida::label {
9struct Region {
10 std::uintptr_t begin, end, allocation_base;
11 bool heap;
12 std::uint64_t generation = 1;
13};
14struct Target {
15 std::weak_ptr<const Region> owner;
16 std::uintptr_t address = 0;
17 unsigned bytes = 0;
18 std::uint64_t generation = 0;
19};
20struct Write {
21 Target target;
22 std::uint64_t value{};
23 unsigned clock{}; // 0: supplied value; 1: GPU timestamp; 2: system timestamp
24};
25class Memory {
26 std::mutex mutex_;
27 std::map<std::uintptr_t, std::shared_ptr<Region>> regions_;
28
29 public:
30 void track(std::uintptr_t base, std::uintptr_t bytes, std::uintptr_t allocation_base, bool heap) {
31 // A base of 0 is the GPU address arena: its address space starts at 0 (runtime/shims/d3d12_vulkan_device.cpp).
32 if (!bytes || !allocation_base || bytes > std::numeric_limits<std::uintptr_t>::max() - base) return;
33 const auto end = base + bytes;
34 std::lock_guard lock(mutex_);
35 auto previous = regions_.upper_bound(base);
36 if (!heap && previous != regions_.begin()) {
37 --previous;
38 const auto &r = *previous->second;
39 if (!r.heap && r.allocation_base == allocation_base && base >= r.begin && end <= r.end) return;
40 }
41 regions_[base] = std::make_shared<Region>(Region{base, end, allocation_base, heap});
42 }
43 void release_heap(std::uintptr_t base) {
44 std::lock_guard lock(mutex_);
45 regions_.erase(base);
46 }
47 template <class Release>
48 bool release_pages(std::uintptr_t base, std::uintptr_t bytes, bool entire, Release &&release) {
49 std::lock_guard lock(mutex_);
50 if (!release()) return false;
51 for (auto i = regions_.begin(); i != regions_.end();) {
52 const auto &r = *i->second;
53 if (r.heap || (entire ? r.allocation_base != base
54 : (!bytes ? r.allocation_base != base
55 : (base >= r.end || (base < r.begin && r.begin - base >= bytes))))) {
56 ++i;
57 continue;
58 }
59 if (entire || i->second->generation == std::numeric_limits<std::uint64_t>::max())
60 i = regions_.erase(i);
61 else {
62 ++i->second->generation;
63 ++i;
64 }
65 }
66 return true;
67 }
68 Target capture(std::uintptr_t address, unsigned bytes) {
69 if ((bytes != 4 && bytes != 8) || (address & (bytes - 1))) return {};
70 std::lock_guard lock(mutex_);
71 auto it = regions_.upper_bound(address);
72 while (it != regions_.begin()) {
73 --it;
74 const auto &r = *it->second;
75 if (address < r.end && r.end - address >= bytes) return {it->second, address, bytes, r.generation};
76 }
77 return {};
78 }
79 template <class Store> bool publish(const Target &target, Store &&store) {
80 std::lock_guard lock(mutex_);
81 const auto region = target.owner.lock();
82 if (!region || target.generation != region->generation || (target.bytes != 4 && target.bytes != 8) ||
83 (target.address & (target.bytes - 1)) || target.address < region->begin || target.address >= region->end ||
84 region->end - target.address < target.bytes)
85 return false;
86 const auto it = regions_.find(region->begin);
87 if (it == regions_.end() || it->second != region) return false;
88 return store(target.address, target.bytes, region->allocation_base);
89 }
90};
91inline Memory &memory() {
92 static Memory m;
93 return m;
94}
95} // namespace leonida::label
diff --git a/runtime/src/guarded_copy.h b/runtime/src/guarded_copy.h
new file mode 100644
index 000000000..60914d169
--- /dev/null
+++ b/runtime/src/guarded_copy.h
@@ -0,0 +1,59 @@
1#pragma once
2// Copies and reads made inside a __try frame that must turn an access violation into an error (the shadow and
3// title-texture copies of the D3D12 layer, DirectStorage request copies, the kernel-write retry).
4//
5// The faulting access has to happen in a function of ours, not inlined into the frame with the __try:
6// - Under Wine an access violation raised inside the CRT's memcpy or memmove (Wine's ucrtbase) never reaches the
7// __except of the frame that called it, and the process ends ("Unhandled page fault ... starting debugger").
8// guarded_copy_test --crt shows it: the same fault raised in a function of ours is caught. A Linux boot ended that way
9// in the slot-133 shadow refresh, reading a title page the title was remapping (CopyPageMappingsBatchX).
10// - clang-cl, without /EHa, catches only what a call inside the __try raises, not an inline load or store.
11// So the bytes move here: never inlined, and no_builtin keeps the compiler from turning a loop back into a call to
12// memcpy or memmove.
13#include <cstddef>
14#include <cstdint>
15#include <intrin.h>
16
17// clang-cl: no_builtin keeps the loops below from becoming CRT calls. MSVC has no such attribute (and accepts no
18// __attribute__ at all); it does not turn __movsb or a loop over volatile bytes into memcpy/memmove, so nothing is needed.
19#if defined(__clang__)
20#define LEONIDA_GUARDED_NO_BUILTIN __attribute__((no_builtin))
21#else
22#define LEONIDA_GUARDED_NO_BUILTIN
23#endif
24
25namespace leonida::guarded {
26
27// Forward copy, REP MOVSB: the source and destination do not overlap, or the destination is below the source.
28__declspec(noinline) LEONIDA_GUARDED_NO_BUILTIN inline void copy(void* to, const void* from, std::size_t bytes) {
29 __movsb(static_cast<unsigned char*>(to), static_cast<const unsigned char*>(from), bytes);
30}
31
32// memmove: forward when that is safe, else from the end down, byte by byte (rare: only an overlapping move upwards).
33__declspec(noinline) LEONIDA_GUARDED_NO_BUILTIN inline void move(void* to, const void* from, std::size_t bytes) {
34 auto* d = static_cast<volatile unsigned char*>(to);
35 const auto* s = static_cast<const volatile unsigned char*>(from);
36 const auto dst = reinterpret_cast<std::uintptr_t>(to), src = reinterpret_cast<std::uintptr_t>(from);
37 if (dst <= src || dst >= src + bytes) {
38 __movsb(static_cast<unsigned char*>(to), static_cast<const unsigned char*>(from), bytes);
39 return;
40 }
41 for (std::size_t i = bytes; i-- > 0;) d[i] = s[i];
42}
43
44// An aligned 32- or 64-bit store in one locked access (XCHG): a thread polling the value, or reading it with one
45// load, sees the old value or the new one, never half of each (a REP MOVSB may store byte by byte).
46__declspec(noinline) inline void store32(void* to, std::uint32_t value) {
47 _InterlockedExchange(static_cast<volatile long*>(to), static_cast<long>(value));
48}
49__declspec(noinline) inline void store64(void* to, std::uint64_t value) {
50 _InterlockedExchange64(static_cast<volatile long long*>(to), static_cast<long long>(value));
51}
52
53// One word read: for a __try that only asks whether memory still holds what it did (an OVERLAPPED the title may have
54// freed).
55__declspec(noinline) inline std::uintptr_t read_word(const void* at) {
56 return *static_cast<const volatile std::uintptr_t*>(at);
57}
58
59} // namespace leonida::guarded
diff --git a/runtime/src/image_memory.h b/runtime/src/image_memory.h
new file mode 100644
index 000000000..3a473192b
--- /dev/null
+++ b/runtime/src/image_memory.h
@@ -0,0 +1,231 @@
1#pragma once
2
3// Memory for textures, handed out as ranges of larger blocks instead of one driver allocation each. Making and freeing
4// an allocation is a kernel call that costs tens to hundreds of microseconds, where a range costs a map lookup; a title
5// that streams textures makes and frees them all the time. Vulkan also guarantees only 4096 live allocations
6// (maxMemoryAllocationCount).
7//
8// No Vulkan or Windows dependency: the caller allocates and frees the blocks (ImageMemoryPool's two callbacks), so the
9// policy is checked on the CPU (test/image_memory_test.cpp). All the images of a block are optimal-tiled, so
10// bufferImageGranularity, which separates linear from optimal resources, does not apply.
11
12#include <algorithm>
13#include <cstddef>
14#include <cstdint>
15#include <functional>
16#include <iterator>
17#include <map>
18#include <memory>
19#include <mutex>
20#include <set>
21#include <utility>
22#include <vector>
23
24namespace leonida {
25
26// The free space of one block: the smallest free piece that holds the request is used (best fit), and a released range
27// is merged with the free pieces beside it.
28class BlockRanges {
29public:
30 explicit BlockRanges(std::uint64_t size) : size_(size) { insert(0, size); }
31
32 // False when no free piece holds `size` bytes at `alignment`. `reused`: the range starts in bytes some earlier range
33 // of this block held, so it may hold that range's data.
34 bool allocate(std::uint64_t size, std::uint64_t alignment, std::uint64_t& offset, bool& reused) {
35 if (!size || !alignment || size > size_) return false;
36 for (auto it = by_size_.lower_bound({size, 0}); it != by_size_.end(); ++it) {
37 const auto [piece_size, piece] = *it;
38 const std::uint64_t start = (piece + alignment - 1) / alignment * alignment;
39 const std::uint64_t lead = start - piece;
40 if (lead > piece_size || size > piece_size - lead) continue;
41 erase(piece, piece_size);
42 insert(piece, lead);
43 insert(start + size, piece_size - lead - size);
44 offset = start;
45 reused = start < touched_;
46 touched_ = std::max(touched_, start + size);
47 in_use_ += size;
48 return true;
49 }
50 return false;
51 }
52
53 // Gives back a range allocate() returned.
54 void release(std::uint64_t offset, std::uint64_t size) {
55 in_use_ -= size;
56 if (const auto next = by_offset_.lower_bound(offset); next != by_offset_.end() && offset + size == next->first) {
57 const std::uint64_t next_size = next->second;
58 erase(next->first, next_size);
59 size += next_size;
60 }
61 if (auto previous = by_offset_.lower_bound(offset); previous != by_offset_.begin()) {
62 previous = std::prev(previous);
63 const auto [start, previous_size] = *previous;
64 if (start + previous_size == offset) {
65 erase(start, previous_size);
66 offset = start;
67 size += previous_size;
68 }
69 }
70 insert(offset, size);
71 }
72
73 bool empty() const { return in_use_ == 0; }
74 std::uint64_t size() const { return size_; }
75 std::uint64_t in_use() const { return in_use_; }
76 // The largest free piece, so a full block is passed over without a search.
77 std::uint64_t largest() const { return by_size_.empty() ? 0 : by_size_.rbegin()->first; }
78
79private:
80 void insert(std::uint64_t offset, std::uint64_t size) {
81 if (!size) return;
82 by_offset_[offset] = size;
83 by_size_.insert({size, offset});
84 }
85 void erase(std::uint64_t offset, std::uint64_t size) {
86 by_offset_.erase(offset);
87 by_size_.erase({size, offset});
88 }
89
90 std::uint64_t size_;
91 std::uint64_t in_use_ = 0;
92 std::uint64_t touched_ = 0; // bytes below this were handed out before
93 std::map<std::uint64_t, std::uint64_t> by_offset_; // offset -> size
94 std::set<std::pair<std::uint64_t, std::uint64_t>> by_size_; // (size, offset)
95};
96
97// Blocks of device memory, by memory type, split into ranges. Thread-safe. Every Range must be gone before the pool is.
98template<typename Memory>
99class ImageMemoryPool {
100public:
101 // A null Memory{}: the driver has no room in the type.
102 using AllocateFn = std::function<Memory(std::uint32_t type, std::uint64_t bytes)>;
103 using FreeFn = std::function<void(Memory)>;
104
105 // One image's range. Destroying it gives the bytes back to the block, so it is destroyed when no submission that
106 // used the image is still running (DeferredDeletionQueue).
107 class Range {
108 public:
109 Range(const Range&) = delete;
110 Range& operator=(const Range&) = delete;
111 ~Range() { pool_.release(*this); }
112
113 Memory memory() const { return memory_; }
114 std::uint64_t offset() const { return offset_; }
115 // The bytes may hold what an earlier range left; the memory of a new block was never given to one.
116 bool reused() const { return reused_; }
117
118 private:
119 friend class ImageMemoryPool;
120 Range(ImageMemoryPool& pool, void* block, Memory memory, std::uint64_t offset, std::uint64_t size, bool reused)
121 : pool_(pool), block_(block), memory_(memory), offset_(offset), size_(size), reused_(reused) {}
122
123 ImageMemoryPool& pool_;
124 void* block_;
125 Memory memory_;
126 std::uint64_t offset_;
127 std::uint64_t size_;
128 bool reused_;
129 };
130
131 struct Stats {
132 std::uint64_t blocks = 0; // live driver allocations
133 std::uint64_t block_bytes = 0; // their size
134 std::uint64_t ranges = 0; // live ranges in them
135 };
136
137 ImageMemoryPool(AllocateFn allocate, FreeFn free) : allocate_(std::move(allocate)), free_(std::move(free)) {}
138 ImageMemoryPool(const ImageMemoryPool&) = delete;
139 ImageMemoryPool& operator=(const ImageMemoryPool&) = delete;
140 ~ImageMemoryPool() {
141 for (auto& [type, pool] : types_)
142 for (const auto& block : pool.blocks) free_(block->memory);
143 }
144
145 // A range of a block of `type`, in a new block of `block_bytes` when no block has room. Null when the driver has no
146 // room for that block; the caller then makes its own allocation.
147 std::unique_ptr<Range> allocate(std::uint32_t type, std::uint64_t size, std::uint64_t alignment,
148 std::uint64_t block_bytes) {
149 std::lock_guard lock(mutex_);
150 Type& pool = types_[type];
151 std::uint64_t offset = 0;
152 bool reused = false;
153 for (const auto& block : pool.blocks) {
154 if (block->ranges.largest() < size || !block->ranges.allocate(size, alignment, offset, reused)) continue;
155 ++ranges_;
156 return std::unique_ptr<Range>(new Range(*this, block.get(), block->memory, offset, size, reused));
157 }
158 // A failed driver allocation is slow, and a full heap stays full until something is given back: do not ask for
159 // another block at every texture until a range is released, or that many textures later.
160 if (size > block_bytes || (pool.skip && pool.skip--)) return nullptr;
161 const Memory memory = allocate_(type, block_bytes);
162 if (!memory) {
163 pool.skip = kRetryAfter;
164 return nullptr;
165 }
166 auto block = std::make_unique<Block>(type, memory, block_bytes);
167 if (!block->ranges.allocate(size, alignment, offset, reused)) {
168 free_(memory);
169 return nullptr;
170 }
171 ++ranges_;
172 pool.blocks.push_back(std::move(block));
173 return std::unique_ptr<Range>(new Range(*this, pool.blocks.back().get(), memory, offset, size, reused));
174 }
175
176 Stats stats() const {
177 std::lock_guard lock(mutex_);
178 Stats result;
179 result.ranges = ranges_;
180 for (const auto& [type, pool] : types_)
181 for (const auto& block : pool.blocks) {
182 ++result.blocks;
183 result.block_bytes += block->ranges.size();
184 }
185 return result;
186 }
187
188private:
189 static constexpr std::uint32_t kRetryAfter = 64;
190
191 struct Block {
192 Block(std::uint32_t t, Memory m, std::uint64_t bytes) : type(t), memory(m), ranges(bytes) {}
193 std::uint32_t type;
194 Memory memory;
195 BlockRanges ranges;
196 };
197 struct Type {
198 std::vector<std::unique_ptr<Block>> blocks;
199 std::uint32_t skip = 0;
200 };
201
202 void release(const Range& range) {
203 Memory dead{};
204 bool free_block = false;
205 {
206 std::lock_guard lock(mutex_);
207 Block& block = *static_cast<Block*>(range.block_);
208 Type& pool = types_[block.type];
209 block.ranges.release(range.offset_, range.size_);
210 pool.skip = 0;
211 --ranges_;
212 // One empty block is kept, so a title that frees and makes the same textures does not ask the driver each
213 // time.
214 if (block.ranges.empty() && std::count_if(pool.blocks.begin(), pool.blocks.end(),
215 [](const auto& b) { return b->ranges.empty(); }) > 1) {
216 dead = block.memory;
217 free_block = true;
218 std::erase_if(pool.blocks, [&](const auto& b) { return b.get() == &block; });
219 }
220 }
221 if (free_block) free_(dead);
222 }
223
224 mutable std::mutex mutex_;
225 AllocateFn allocate_;
226 FreeFn free_;
227 std::map<std::uint32_t, Type> types_;
228 std::uint64_t ranges_ = 0;
229};
230
231} // namespace leonida
diff --git a/runtime/src/indirect_clamp.comp b/runtime/src/indirect_clamp.comp
new file mode 100644
index 000000000..565a19463
--- /dev/null
+++ b/runtime/src/indirect_clamp.comp
@@ -0,0 +1,152 @@
1// Clamp the arguments of one D3D12 ExecuteIndirect batch on the GPU before the indirect command reads them.
2// The title's own compute passes write most of these arguments; a pass the replay drops (async pipeline skip, a stub
3// pipeline, LEONIDA_SKIP_COMPUTE) or mistranslates leaves whatever the memory held, and a dispatch of billions of
4// groups or a draw of four billion vertices runs until the host resets the display driver. So the active records are
5// copied into scratch with their values bounded, and the indirect command reads that scratch (vulkan_indirect_clamp.h).
6// One invocation per record, one tiny dispatch per ExecuteIndirect call; nothing is read back by the CPU.
7//
8// When a count buffer is given, threads at or past min(max_command_count, count) return an empty record without
9// charging the list budget. The command list charges its work (vertices, indices, or groups * 64) against 2^27 units with
10// an atomic CAS, so thousands of garbage records cannot run for seconds either.
11//
12// The bounds cut legitimate work beyond them, so they are generous: 2^24 vertices (or indices), 2^26 vertex instances,
13// 65 535 groups per dimension, 2^20 groups per dispatch, and mesh dispatches charged 128 threads per group. The
14// console's mesh dispatch is one-dimensional; the output uses one group in y and z.
15#version 460
16#extension GL_EXT_buffer_reference : require
17layout(local_size_x = 64) in;
18
19layout(buffer_reference, std430, buffer_reference_align = 4) readonly buffer ArgsIn { uint data[]; };
20layout(buffer_reference, std430, buffer_reference_align = 4) readonly buffer CountIn { uint data[]; };
21layout(buffer_reference, std430, buffer_reference_align = 4) buffer ArgsOut { uint data[]; };
22layout(buffer_reference, std430, buffer_reference_align = 4) buffer CountOut { uint data[]; };
23layout(buffer_reference, std430, buffer_reference_align = 4) buffer Stats { uint data[]; };
24
25layout(push_constant) uniform Params {
26 ArgsIn arguments; // the first record of this chunk
27 CountIn count; // the D3D12 count buffer, or 0
28 ArgsOut records_out; // this chunk's clamped records, compact
29 CountOut count_out; // the clamped count word for a counted draw
30 Stats stats; // clamped records, bounded counts, over-budget records, zeroed records
31 Stats list_budget;
32 uint kind; // 0 draw, 1 draw indexed, 2 dispatch, 3 mesh dispatch (leonida::IndirectKind)
33 uint stride_words; // the D3D12 record stride in words
34 uint records; // records in this chunk
35 uint first_record; // the record index this chunk starts at
36 uint max_records; // max_command_count of the ExecuteIndirect call
37 uint flags; // bit 0: counted; bits 1..16: optional per-dispatch group budget
38} p;
39
40// One ExecuteIndirect batch's limits. A record that asks for more runs empty instead of for seconds.
41const uint max_vertices = 1u << 24u; // vertices or indices in one draw
42const uint max_vertex_instances = 1u << 26u; // vertex (or index) count times instance count
43const uint max_group_dimension = 65535u; // groups in x, y or z
44const uint max_groups = 1u << 20u; // groups in one dispatch or mesh dispatch
45const uint budget = 1u << 27u; // work in the whole command list: vertices, indices, or groups * 64
46
47// Charges `cost` units to the batch's budget. Saturating: a record that no longer fits runs empty, so the batch never
48// stops the GPU for longer than the budget allows.
49bool charge(uint cost) {
50 if (cost == 0u) return true;
51 uint before = atomicAdd(p.list_budget.data[0], 0u);
52 while (before < budget) {
53 const uint room = budget - before;
54 if (cost > room) return false;
55 const uint next = before + cost;
56 const uint previous = atomicCompSwap(p.list_budget.data[0], before, next);
57 if (previous == before) return true;
58 before = previous;
59 }
60 return false;
61}
62
63void main() {
64 const uint local = gl_GlobalInvocationID.x;
65 if (local >= p.records) return;
66 const uint global = p.first_record + local;
67 const uint out_words = p.kind <= 1u ? (p.kind == 0u ? 4u : 5u) : 3u;
68 const uint out_base = local * out_words;
69
70 const bool counted = (p.flags & 1u) != 0u;
71 // The count is clamped to max_command_count (VUID-vkCmdDrawIndirectCount-countBuffer-02717), so a *Count draw
72 // reads a count no larger than the records whose scratch this pass wrote.
73 uint effective = p.max_records;
74 if (counted) {
75 const uint asked = p.count.data[0];
76 effective = min(effective, asked);
77 if (global == 0u) {
78 p.count_out.data[0] = effective;
79 if (asked != effective) atomicAdd(p.stats.data[1], 1u); // the count asked past max_command_count
80 }
81 }
82 if (global >= effective) {
83 for (uint i = 0u; i < out_words; ++i) p.records_out.data[out_base + i] = 0u;
84 return;
85 }
86
87 const uint src = local * p.stride_words;
88 bool unfilled = true;
89 for (uint i = 0u; i < out_words; ++i)
90 unfilled = unfilled && p.arguments.data[src + i] == 0xffffffffu;
91 if (unfilled || (p.kind == 3u && p.arguments.data[src] == 0xffffffffu)) {
92 for (uint i = 0u; i < out_words; ++i) p.records_out.data[out_base + i] = 0u;
93 atomicAdd(p.stats.data[0], 1u);
94 atomicAdd(p.stats.data[3], 1u);
95 return;
96 }
97 uint words[5] = uint[5](0u, 0u, 0u, 0u, 0u);
98 uint cost = 0u;
99 uint clamped = 0u;
100 if (p.kind <= 1u) {
101 // A draw or an indexed draw: count, instances, then the two (or three) locations, copied as they are.
102 const uint count = p.arguments.data[src];
103 const uint instances = p.arguments.data[src + 1u];
104 uint index_count = min(count, max_vertices);
105 uint instance_count = min(instances, max_vertex_instances / max(index_count, 1u));
106 if (index_count == 0u) instance_count = 0u;
107 clamped = index_count != count || instance_count != instances ? 1u : 0u;
108 cost = index_count * instance_count;
109 words[0] = index_count;
110 words[1] = instance_count;
111 words[2] = p.arguments.data[src + 2u];
112 words[3] = p.arguments.data[src + 3u];
113 if (p.kind == 1u) words[4] = p.arguments.data[src + 4u];
114 } else {
115 // A dispatch or a mesh dispatch: three group counts. x * y fits 32 bits (each is at most 65 535); the whole
116 // group count may not, so an oversized product runs empty.
117 const uint asked_x = p.arguments.data[src];
118 const uint asked_y = p.arguments.data[src + 1u];
119 const uint asked_z = p.arguments.data[src + 2u];
120 uint x = min(asked_x, max_group_dimension);
121 uint y = min(asked_y, max_group_dimension);
122 uint z = min(asked_z, max_group_dimension);
123 if (p.kind == 3u) { y = 1u; z = 1u; }
124 const uint groups = p.flags >> 1u;
125 if (groups != 0u && x != 0u && y != 0u && z != 0u) {
126 x = min(x, groups);
127 y = min(y, groups / x);
128 z = min(z, groups / x / y);
129 }
130 if (z != 0u && x * y > max_groups / z) {
131 x = 0u;
132 y = 0u;
133 z = 0u;
134 }
135 clamped = x != asked_x || y != asked_y || z != asked_z ? 1u : 0u;
136 cost = x * y * z * (p.kind == 3u ? 128u : 64u);
137 words[0] = x;
138 words[1] = y;
139 words[2] = z;
140 }
141
142 if (cost != 0u && !charge(cost)) {
143 clamped = 1u;
144 atomicAdd(p.stats.data[2], 1u);
145 words = uint[5](0u, 0u, 0u, 0u, 0u);
146 }
147 if (clamped != 0u) {
148 atomicAdd(p.stats.data[0], 1u);
149 if (words[0] == 0u) atomicAdd(p.stats.data[3], 1u);
150 }
151 for (uint i = 0u; i < out_words; ++i) p.records_out.data[out_base + i] = words[i];
152}
diff --git a/runtime/src/indirect_clamp_spv.h b/runtime/src/indirect_clamp_spv.h
new file mode 100644
index 000000000..50253df78
--- /dev/null
+++ b/runtime/src/indirect_clamp_spv.h
@@ -0,0 +1,287 @@
1// Generated with glslangValidator -V --target-env vulkan1.2 -Os --spirv-val indirect_clamp.comp
2#pragma once
3#include <cstdint>
4namespace leonida {
5inline constexpr std::uint32_t indirect_clamp_spirv[] = {
6 0x07230203u, 0x00010500u, 0x0008000bu, 0x000002d0u, 0x00000000u, 0x00020011u, 0x00000001u, 0x00020011u,
7 0x000014e3u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu, 0x00000000u, 0x0003000eu,
8 0x000014e4u, 0x00000001u, 0x0007000fu, 0x00000005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00000026u,
9 0x0000005au, 0x00060010u, 0x00000004u, 0x00000011u, 0x00000040u, 0x00000001u, 0x00000001u, 0x00030003u,
10 0x00000002u, 0x000001ccu, 0x00070004u, 0x455f4c47u, 0x625f5458u, 0x65666675u, 0x65725f72u, 0x65726566u,
11 0x0065636eu, 0x00040005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00040005u, 0x0000001au, 0x61726150u,
12 0x0000736du, 0x00060006u, 0x0000001au, 0x00000000u, 0x75677261u, 0x746e656du, 0x00000073u, 0x00050006u,
13 0x0000001au, 0x00000001u, 0x6e756f63u, 0x00000074u, 0x00060006u, 0x0000001au, 0x00000002u, 0x6f636572u,
14 0x5f736472u, 0x0074756fu, 0x00060006u, 0x0000001au, 0x00000003u, 0x6e756f63u, 0x756f5f74u, 0x00000074u,
15 0x00050006u, 0x0000001au, 0x00000004u, 0x74617473u, 0x00000073u, 0x00060006u, 0x0000001au, 0x00000005u,
16 0x7473696cu, 0x6475625fu, 0x00746567u, 0x00050006u, 0x0000001au, 0x00000006u, 0x646e696bu, 0x00000000u,
17 0x00070006u, 0x0000001au, 0x00000007u, 0x69727473u, 0x775f6564u, 0x7364726fu, 0x00000000u, 0x00050006u,
18 0x0000001au, 0x00000008u, 0x6f636572u, 0x00736472u, 0x00070006u, 0x0000001au, 0x00000009u, 0x73726966u,
19 0x65725f74u, 0x64726f63u, 0x00000000u, 0x00060006u, 0x0000001au, 0x0000000au, 0x5f78616du, 0x6f636572u,
20 0x00736472u, 0x00050006u, 0x0000001au, 0x0000000bu, 0x67616c66u, 0x00000073u, 0x00040005u, 0x0000001cu,
21 0x73677241u, 0x00006e49u, 0x00050006u, 0x0000001cu, 0x00000000u, 0x61746164u, 0x00000000u, 0x00040005u,
22 0x0000001eu, 0x6e756f43u, 0x006e4974u, 0x00050006u, 0x0000001eu, 0x00000000u, 0x61746164u, 0x00000000u,
23 0x00040005u, 0x00000020u, 0x73677241u, 0x0074754fu, 0x00050006u, 0x00000020u, 0x00000000u, 0x61746164u,
24 0x00000000u, 0x00050005u, 0x00000022u, 0x6e756f43u, 0x74754f74u, 0x00000000u, 0x00050006u, 0x00000022u,
25 0x00000000u, 0x61746164u, 0x00000000u, 0x00040005u, 0x00000024u, 0x74617453u, 0x00000073u, 0x00050006u,
26 0x00000024u, 0x00000000u, 0x61746164u, 0x00000000u, 0x00030005u, 0x00000026u, 0x00000070u, 0x00080005u,
27 0x0000005au, 0x475f6c67u, 0x61626f6cu, 0x766e496cu, 0x7461636fu, 0x496e6f69u, 0x00000044u, 0x00040005u,
28 0x00000116u, 0x64726f77u, 0x00000073u, 0x00030047u, 0x0000001au, 0x00000002u, 0x00050048u, 0x0000001au,
29 0x00000000u, 0x00000023u, 0x00000000u, 0x00050048u, 0x0000001au, 0x00000001u, 0x00000023u, 0x00000008u,
30 0x00050048u, 0x0000001au, 0x00000002u, 0x00000023u, 0x00000010u, 0x00050048u, 0x0000001au, 0x00000003u,
31 0x00000023u, 0x00000018u, 0x00050048u, 0x0000001au, 0x00000004u, 0x00000023u, 0x00000020u, 0x00050048u,
32 0x0000001au, 0x00000005u, 0x00000023u, 0x00000028u, 0x00050048u, 0x0000001au, 0x00000006u, 0x00000023u,
33 0x00000030u, 0x00050048u, 0x0000001au, 0x00000007u, 0x00000023u, 0x00000034u, 0x00050048u, 0x0000001au,
34 0x00000008u, 0x00000023u, 0x00000038u, 0x00050048u, 0x0000001au, 0x00000009u, 0x00000023u, 0x0000003cu,
35 0x00050048u, 0x0000001au, 0x0000000au, 0x00000023u, 0x00000040u, 0x00050048u, 0x0000001au, 0x0000000bu,
36 0x00000023u, 0x00000044u, 0x00040047u, 0x0000001bu, 0x00000006u, 0x00000004u, 0x00030047u, 0x0000001cu,
37 0x00000002u, 0x00040048u, 0x0000001cu, 0x00000000u, 0x00000018u, 0x00050048u, 0x0000001cu, 0x00000000u,
38 0x00000023u, 0x00000000u, 0x00040047u, 0x0000001du, 0x00000006u, 0x00000004u, 0x00030047u, 0x0000001eu,
39 0x00000002u, 0x00040048u, 0x0000001eu, 0x00000000u, 0x00000018u, 0x00050048u, 0x0000001eu, 0x00000000u,
40 0x00000023u, 0x00000000u, 0x00040047u, 0x0000001fu, 0x00000006u, 0x00000004u, 0x00030047u, 0x00000020u,
41 0x00000002u, 0x00050048u, 0x00000020u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00040047u, 0x00000021u,
42 0x00000006u, 0x00000004u, 0x00030047u, 0x00000022u, 0x00000002u, 0x00050048u, 0x00000022u, 0x00000000u,
43 0x00000023u, 0x00000000u, 0x00040047u, 0x00000023u, 0x00000006u, 0x00000004u, 0x00030047u, 0x00000024u,
44 0x00000002u, 0x00050048u, 0x00000024u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00040047u, 0x0000005au,
45 0x0000000bu, 0x0000001cu, 0x00040047u, 0x00000209u, 0x0000000bu, 0x00000019u, 0x00020013u, 0x00000002u,
46 0x00030021u, 0x00000003u, 0x00000002u, 0x00040015u, 0x00000006u, 0x00000020u, 0x00000000u, 0x00040020u,
47 0x00000007u, 0x00000007u, 0x00000006u, 0x00020014u, 0x00000008u, 0x0004002bu, 0x00000006u, 0x0000000eu,
48 0x00000000u, 0x00030029u, 0x00000008u, 0x00000012u, 0x00030027u, 0x00000015u, 0x000014e5u, 0x00030027u,
49 0x00000016u, 0x000014e5u, 0x00030027u, 0x00000017u, 0x000014e5u, 0x00030027u, 0x00000018u, 0x000014e5u,
50 0x00030027u, 0x00000019u, 0x000014e5u, 0x000e001eu, 0x0000001au, 0x00000015u, 0x00000016u, 0x00000017u,
51 0x00000018u, 0x00000019u, 0x00000019u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u,
52 0x00000006u, 0x0003001du, 0x0000001bu, 0x00000006u, 0x0003001eu, 0x0000001cu, 0x0000001bu, 0x00040020u,
53 0x00000015u, 0x000014e5u, 0x0000001cu, 0x0003001du, 0x0000001du, 0x00000006u, 0x0003001eu, 0x0000001eu,
54 0x0000001du, 0x00040020u, 0x00000016u, 0x000014e5u, 0x0000001eu, 0x0003001du, 0x0000001fu, 0x00000006u,
55 0x0003001eu, 0x00000020u, 0x0000001fu, 0x00040020u, 0x00000017u, 0x000014e5u, 0x00000020u, 0x0003001du,
56 0x00000021u, 0x00000006u, 0x0003001eu, 0x00000022u, 0x00000021u, 0x00040020u, 0x00000018u, 0x000014e5u,
57 0x00000022u, 0x0003001du, 0x00000023u, 0x00000006u, 0x0003001eu, 0x00000024u, 0x00000023u, 0x00040020u,
58 0x00000019u, 0x000014e5u, 0x00000024u, 0x00040020u, 0x00000025u, 0x00000009u, 0x0000001au, 0x0004003bu,
59 0x00000025u, 0x00000026u, 0x00000009u, 0x00040015u, 0x00000027u, 0x00000020u, 0x00000001u, 0x0004002bu,
60 0x00000027u, 0x00000028u, 0x00000005u, 0x00040020u, 0x00000029u, 0x00000009u, 0x00000019u, 0x0004002bu,
61 0x00000027u, 0x0000002cu, 0x00000000u, 0x00040020u, 0x0000002du, 0x000014e5u, 0x00000006u, 0x0004002bu,
62 0x00000006u, 0x0000002fu, 0x00000001u, 0x0004002bu, 0x00000006u, 0x00000037u, 0x08000000u, 0x0003002au,
63 0x00000008u, 0x00000041u, 0x00040017u, 0x00000058u, 0x00000006u, 0x00000003u, 0x00040020u, 0x00000059u,
64 0x00000001u, 0x00000058u, 0x0004003bu, 0x00000059u, 0x0000005au, 0x00000001u, 0x00040020u, 0x0000005bu,
65 0x00000001u, 0x00000006u, 0x0004002bu, 0x00000027u, 0x0000005fu, 0x00000008u, 0x00040020u, 0x00000060u,
66 0x00000009u, 0x00000006u, 0x0004002bu, 0x00000027u, 0x00000068u, 0x00000009u, 0x0004002bu, 0x00000027u,
67 0x0000006eu, 0x00000006u, 0x0004002bu, 0x00000006u, 0x00000078u, 0x00000004u, 0x0004002bu, 0x00000006u,
68 0x00000079u, 0x00000005u, 0x0004002bu, 0x00000006u, 0x0000007cu, 0x00000003u, 0x0004002bu, 0x00000027u,
69 0x00000084u, 0x0000000bu, 0x0004002bu, 0x00000027u, 0x0000008au, 0x0000000au, 0x0004002bu, 0x00000027u,
70 0x00000091u, 0x00000001u, 0x00040020u, 0x00000092u, 0x00000009u, 0x00000016u, 0x0004002bu, 0x00000027u,
71 0x0000009eu, 0x00000003u, 0x00040020u, 0x0000009fu, 0x00000009u, 0x00000018u, 0x0004002bu, 0x00000027u,
72 0x000000a9u, 0x00000004u, 0x0004002bu, 0x00000027u, 0x000000bcu, 0x00000002u, 0x00040020u, 0x000000bdu,
73 0x00000009u, 0x00000017u, 0x0004002bu, 0x00000027u, 0x000000c9u, 0x00000007u, 0x00040020u, 0x000000dau,
74 0x00000009u, 0x00000015u, 0x0004002bu, 0x00000006u, 0x000000e2u, 0xffffffffu, 0x0004001cu, 0x00000114u,
75 0x00000006u, 0x00000079u, 0x00040020u, 0x00000115u, 0x00000007u, 0x00000114u, 0x0008002cu, 0x00000114u,
76 0x00000117u, 0x0000000eu, 0x0000000eu, 0x0000000eu, 0x0000000eu, 0x0000000eu, 0x0004002bu, 0x00000006u,
77 0x0000012eu, 0x01000000u, 0x0004002bu, 0x00000006u, 0x00000132u, 0x04000000u, 0x0004002bu, 0x00000006u,
78 0x0000014du, 0x00000002u, 0x0004002bu, 0x00000006u, 0x0000017cu, 0x0000ffffu, 0x0004002bu, 0x00000006u,
79 0x000001b0u, 0x00100000u, 0x0004002bu, 0x00000006u, 0x000001cbu, 0x00000080u, 0x0004002bu, 0x00000006u,
80 0x000001ccu, 0x00000040u, 0x0006002cu, 0x00000058u, 0x00000209u, 0x000001ccu, 0x0000002fu, 0x0000002fu,
81 0x00030001u, 0x00000008u, 0x00000288u, 0x00050036u, 0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u,
82 0x000200f8u, 0x00000005u, 0x0004003bu, 0x00000115u, 0x00000116u, 0x00000007u, 0x000300f7u, 0x0000020au,
83 0x00000000u, 0x000300fbu, 0x0000000eu, 0x0000020bu, 0x000200f8u, 0x0000020bu, 0x00050041u, 0x0000005bu,
84 0x0000005cu, 0x0000005au, 0x0000000eu, 0x0004003du, 0x00000006u, 0x0000005du, 0x0000005cu, 0x00050041u,
85 0x00000060u, 0x00000061u, 0x00000026u, 0x0000005fu, 0x0004003du, 0x00000006u, 0x00000062u, 0x00000061u,
86 0x000500aeu, 0x00000008u, 0x00000063u, 0x0000005du, 0x00000062u, 0x000300f7u, 0x00000065u, 0x00000000u,
87 0x000400fau, 0x00000063u, 0x00000064u, 0x00000065u, 0x000200f8u, 0x00000064u, 0x000200f9u, 0x0000020au,
88 0x000200f8u, 0x00000065u, 0x00050041u, 0x00000060u, 0x00000069u, 0x00000026u, 0x00000068u, 0x0004003du,
89 0x00000006u, 0x0000006au, 0x00000069u, 0x00050080u, 0x00000006u, 0x0000006cu, 0x0000006au, 0x0000005du,
90 0x00050041u, 0x00000060u, 0x0000006fu, 0x00000026u, 0x0000006eu, 0x0004003du, 0x00000006u, 0x00000070u,
91 0x0000006fu, 0x000500b2u, 0x00000008u, 0x00000071u, 0x00000070u, 0x0000002fu, 0x000300f7u, 0x00000074u,
92 0x00000000u, 0x000400fau, 0x00000071u, 0x00000073u, 0x0000007bu, 0x000200f8u, 0x00000073u, 0x000500aau,
93 0x00000008u, 0x00000077u, 0x00000070u, 0x0000000eu, 0x000600a9u, 0x00000006u, 0x0000007au, 0x00000077u,
94 0x00000078u, 0x00000079u, 0x000200f9u, 0x00000074u, 0x000200f8u, 0x0000007bu, 0x000200f9u, 0x00000074u,
95 0x000200f8u, 0x00000074u, 0x000700f5u, 0x00000006u, 0x00000246u, 0x0000007au, 0x00000073u, 0x0000007cu,
96 0x0000007bu, 0x00050084u, 0x00000006u, 0x00000081u, 0x0000005du, 0x00000246u, 0x00050041u, 0x00000060u,
97 0x00000085u, 0x00000026u, 0x00000084u, 0x0004003du, 0x00000006u, 0x00000086u, 0x00000085u, 0x000500c7u,
98 0x00000006u, 0x00000087u, 0x00000086u, 0x0000002fu, 0x000500abu, 0x00000008u, 0x00000088u, 0x00000087u,
99 0x0000000eu, 0x00050041u, 0x00000060u, 0x0000008bu, 0x00000026u, 0x0000008au, 0x0004003du, 0x00000006u,
100 0x0000008cu, 0x0000008bu, 0x000300f7u, 0x0000008fu, 0x00000000u, 0x000400fau, 0x00000088u, 0x0000008eu,
101 0x0000008fu, 0x000200f8u, 0x0000008eu, 0x00050041u, 0x00000092u, 0x00000093u, 0x00000026u, 0x00000091u,
102 0x0004003du, 0x00000016u, 0x00000094u, 0x00000093u, 0x00060041u, 0x0000002du, 0x00000095u, 0x00000094u,
103 0x0000002cu, 0x0000002cu, 0x0006003du, 0x00000006u, 0x00000096u, 0x00000095u, 0x00000002u, 0x00000004u,
104 0x0007000cu, 0x00000006u, 0x00000099u, 0x00000001u, 0x00000026u, 0x0000008cu, 0x00000096u, 0x000500aau,
105 0x00000008u, 0x0000009bu, 0x0000006cu, 0x0000000eu, 0x000300f7u, 0x0000009du, 0x00000000u, 0x000400fau,
106 0x0000009bu, 0x0000009cu, 0x0000009du, 0x000200f8u, 0x0000009cu, 0x00050041u, 0x0000009fu, 0x000000a0u,
107 0x00000026u, 0x0000009eu, 0x0004003du, 0x00000018u, 0x000000a1u, 0x000000a0u, 0x00060041u, 0x0000002du,
108 0x000000a3u, 0x000000a1u, 0x0000002cu, 0x0000002cu, 0x0005003eu, 0x000000a3u, 0x00000099u, 0x00000002u,
109 0x00000004u, 0x000500abu, 0x00000008u, 0x000000a6u, 0x00000096u, 0x00000099u, 0x000300f7u, 0x000000a8u,
110 0x00000000u, 0x000400fau, 0x000000a6u, 0x000000a7u, 0x000000a8u, 0x000200f8u, 0x000000a7u, 0x00050041u,
111 0x00000029u, 0x000000aau, 0x00000026u, 0x000000a9u, 0x0004003du, 0x00000019u, 0x000000abu, 0x000000aau,
112 0x00060041u, 0x0000002du, 0x000000acu, 0x000000abu, 0x0000002cu, 0x00000091u, 0x000700eau, 0x00000006u,
113 0x000000adu, 0x000000acu, 0x0000002fu, 0x0000000eu, 0x0000002fu, 0x000200f9u, 0x000000a8u, 0x000200f8u,
114 0x000000a8u, 0x000200f9u, 0x0000009du, 0x000200f8u, 0x0000009du, 0x000200f9u, 0x0000008fu, 0x000200f8u,
115 0x0000008fu, 0x000700f5u, 0x00000006u, 0x0000024cu, 0x0000008cu, 0x00000074u, 0x00000099u, 0x0000009du,
116 0x000500aeu, 0x00000008u, 0x000000b0u, 0x0000006cu, 0x0000024cu, 0x000300f7u, 0x000000b2u, 0x00000000u,
117 0x000400fau, 0x000000b0u, 0x000000b1u, 0x000000b2u, 0x000200f8u, 0x000000b1u, 0x000200f9u, 0x000000b4u,
118 0x000200f8u, 0x000000b4u, 0x000700f5u, 0x00000006u, 0x000002c2u, 0x0000000eu, 0x000000b1u, 0x000000c5u,
119 0x000000b5u, 0x000500b0u, 0x00000008u, 0x000000bbu, 0x000002c2u, 0x00000246u, 0x000400f6u, 0x000000b6u,
120 0x000000b5u, 0x00000000u, 0x000400fau, 0x000000bbu, 0x000000b5u, 0x000000b6u, 0x000200f8u, 0x000000b5u,
121 0x00050041u, 0x000000bdu, 0x000000beu, 0x00000026u, 0x000000bcu, 0x0004003du, 0x00000017u, 0x000000bfu,
122 0x000000beu, 0x00050080u, 0x00000006u, 0x000000c2u, 0x00000081u, 0x000002c2u, 0x00060041u, 0x0000002du,
123 0x000000c3u, 0x000000bfu, 0x0000002cu, 0x000000c2u, 0x0005003eu, 0x000000c3u, 0x0000000eu, 0x00000002u,
124 0x00000004u, 0x00050080u, 0x00000006u, 0x000000c5u, 0x000002c2u, 0x00000091u, 0x000200f9u, 0x000000b4u,
125 0x000200f8u, 0x000000b6u, 0x000200f9u, 0x0000020au, 0x000200f8u, 0x000000b2u, 0x00050041u, 0x00000060u,
126 0x000000cau, 0x00000026u, 0x000000c9u, 0x0004003du, 0x00000006u, 0x000000cbu, 0x000000cau, 0x00050084u,
127 0x00000006u, 0x000000ccu, 0x0000005du, 0x000000cbu, 0x000200f9u, 0x000000cfu, 0x000200f8u, 0x000000cfu,
128 0x000700f5u, 0x00000008u, 0x00000257u, 0x00000012u, 0x000000b2u, 0x000000e4u, 0x000000d2u, 0x000700f5u,
129 0x00000006u, 0x00000252u, 0x0000000eu, 0x000000b2u, 0x000000e6u, 0x000000d2u, 0x000500b0u, 0x00000008u,
130 0x000000d6u, 0x00000252u, 0x00000246u, 0x000400f6u, 0x000000d1u, 0x000000d2u, 0x00000000u, 0x000400fau,
131 0x000000d6u, 0x000000d0u, 0x000000d1u, 0x000200f8u, 0x000000d0u, 0x000300f7u, 0x000000d9u, 0x00000000u,
132 0x000400fau, 0x00000257u, 0x000000d8u, 0x000000d9u, 0x000200f8u, 0x000000d8u, 0x00050041u, 0x000000dau,
133 0x000000dbu, 0x00000026u, 0x0000002cu, 0x0004003du, 0x00000015u, 0x000000dcu, 0x000000dbu, 0x00050080u,
134 0x00000006u, 0x000000dfu, 0x000000ccu, 0x00000252u, 0x00060041u, 0x0000002du, 0x000000e0u, 0x000000dcu,
135 0x0000002cu, 0x000000dfu, 0x0006003du, 0x00000006u, 0x000000e1u, 0x000000e0u, 0x00000002u, 0x00000004u,
136 0x000500aau, 0x00000008u, 0x000000e3u, 0x000000e1u, 0x000000e2u, 0x000200f9u, 0x000000d9u, 0x000200f8u,
137 0x000000d9u, 0x000700f5u, 0x00000008u, 0x000000e4u, 0x00000257u, 0x000000d0u, 0x000000e3u, 0x000000d8u,
138 0x000200f9u, 0x000000d2u, 0x000200f8u, 0x000000d2u, 0x00050080u, 0x00000006u, 0x000000e6u, 0x00000252u,
139 0x00000091u, 0x000200f9u, 0x000000cfu, 0x000200f8u, 0x000000d1u, 0x000400a8u, 0x00000008u, 0x000000e8u,
140 0x00000257u, 0x000300f7u, 0x000000eau, 0x00000000u, 0x000400fau, 0x000000e8u, 0x000000e9u, 0x000000eau,
141 0x000200f8u, 0x000000e9u, 0x000500aau, 0x00000008u, 0x000000edu, 0x00000070u, 0x0000007cu, 0x000300f7u,
142 0x000000efu, 0x00000000u, 0x000400fau, 0x000000edu, 0x000000eeu, 0x000000efu, 0x000200f8u, 0x000000eeu,
143 0x00050041u, 0x000000dau, 0x000000f0u, 0x00000026u, 0x0000002cu, 0x0004003du, 0x00000015u, 0x000000f1u,
144 0x000000f0u, 0x00060041u, 0x0000002du, 0x000000f3u, 0x000000f1u, 0x0000002cu, 0x000000ccu, 0x0006003du,
145 0x00000006u, 0x000000f4u, 0x000000f3u, 0x00000002u, 0x00000004u, 0x000500aau, 0x00000008u, 0x000000f5u,
146 0x000000f4u, 0x000000e2u, 0x000200f9u, 0x000000efu, 0x000200f8u, 0x000000efu, 0x000700f5u, 0x00000008u,
147 0x000000f6u, 0x000000edu, 0x000000e9u, 0x000000f5u, 0x000000eeu, 0x000200f9u, 0x000000eau, 0x000200f8u,
148 0x000000eau, 0x000700f5u, 0x00000008u, 0x000000f7u, 0x00000257u, 0x000000d1u, 0x000000f6u, 0x000000efu,
149 0x000300f7u, 0x000000f9u, 0x00000000u, 0x000400fau, 0x000000f7u, 0x000000f8u, 0x000000f9u, 0x000200f8u,
150 0x000000f8u, 0x000200f9u, 0x000000fbu, 0x000200f8u, 0x000000fbu, 0x000700f5u, 0x00000006u, 0x000002beu,
151 0x0000000eu, 0x000000f8u, 0x0000010au, 0x000000fcu, 0x000500b0u, 0x00000008u, 0x00000102u, 0x000002beu,
152 0x00000246u, 0x000400f6u, 0x000000fdu, 0x000000fcu, 0x00000000u, 0x000400fau, 0x00000102u, 0x000000fcu,
153 0x000000fdu, 0x000200f8u, 0x000000fcu, 0x00050041u, 0x000000bdu, 0x00000103u, 0x00000026u, 0x000000bcu,
154 0x0004003du, 0x00000017u, 0x00000104u, 0x00000103u, 0x00050080u, 0x00000006u, 0x00000107u, 0x00000081u,
155 0x000002beu, 0x00060041u, 0x0000002du, 0x00000108u, 0x00000104u, 0x0000002cu, 0x00000107u, 0x0005003eu,
156 0x00000108u, 0x0000000eu, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x0000010au, 0x000002beu,
157 0x00000091u, 0x000200f9u, 0x000000fbu, 0x000200f8u, 0x000000fdu, 0x00050041u, 0x00000029u, 0x0000010bu,
158 0x00000026u, 0x000000a9u, 0x0004003du, 0x00000019u, 0x0000010cu, 0x0000010bu, 0x00060041u, 0x0000002du,
159 0x0000010du, 0x0000010cu, 0x0000002cu, 0x0000002cu, 0x000700eau, 0x00000006u, 0x0000010eu, 0x0000010du,
160 0x0000002fu, 0x0000000eu, 0x0000002fu, 0x00060041u, 0x0000002du, 0x00000111u, 0x0000010cu, 0x0000002cu,
161 0x0000009eu, 0x000700eau, 0x00000006u, 0x00000112u, 0x00000111u, 0x0000002fu, 0x0000000eu, 0x0000002fu,
162 0x000200f9u, 0x0000020au, 0x000200f8u, 0x000000f9u, 0x0003003eu, 0x00000116u, 0x00000117u, 0x000300f7u,
163 0x0000011eu, 0x00000000u, 0x000400fau, 0x00000071u, 0x0000011du, 0x00000165u, 0x000200f8u, 0x0000011du,
164 0x00050041u, 0x000000dau, 0x00000120u, 0x00000026u, 0x0000002cu, 0x0004003du, 0x00000015u, 0x00000121u,
165 0x00000120u, 0x00060041u, 0x0000002du, 0x00000123u, 0x00000121u, 0x0000002cu, 0x000000ccu, 0x0006003du,
166 0x00000006u, 0x00000124u, 0x00000123u, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x00000129u,
167 0x000000ccu, 0x0000002fu, 0x00060041u, 0x0000002du, 0x0000012au, 0x00000121u, 0x0000002cu, 0x00000129u,
168 0x0006003du, 0x00000006u, 0x0000012bu, 0x0000012au, 0x00000002u, 0x00000004u, 0x0007000cu, 0x00000006u,
169 0x0000012fu, 0x00000001u, 0x00000026u, 0x00000124u, 0x0000012eu, 0x0007000cu, 0x00000006u, 0x00000134u,
170 0x00000001u, 0x00000029u, 0x0000012fu, 0x0000002fu, 0x00050086u, 0x00000006u, 0x00000135u, 0x00000132u,
171 0x00000134u, 0x0007000cu, 0x00000006u, 0x00000136u, 0x00000001u, 0x00000026u, 0x0000012bu, 0x00000135u,
172 0x000500aau, 0x00000008u, 0x00000138u, 0x0000012fu, 0x0000000eu, 0x000600a9u, 0x00000006u, 0x000002c9u,
173 0x00000138u, 0x0000000eu, 0x00000136u, 0x000500abu, 0x00000008u, 0x0000013du, 0x0000012fu, 0x00000124u,
174 0x000500abu, 0x00000008u, 0x00000140u, 0x000002c9u, 0x0000012bu, 0x000500a6u, 0x00000008u, 0x00000141u,
175 0x0000013du, 0x00000140u, 0x000600a9u, 0x00000006u, 0x00000142u, 0x00000141u, 0x0000002fu, 0x0000000eu,
176 0x00050084u, 0x00000006u, 0x00000145u, 0x0000012fu, 0x000002c9u, 0x00050041u, 0x00000007u, 0x00000147u,
177 0x00000116u, 0x0000002cu, 0x0003003eu, 0x00000147u, 0x0000012fu, 0x00050041u, 0x00000007u, 0x00000149u,
178 0x00000116u, 0x00000091u, 0x0003003eu, 0x00000149u, 0x000002c9u, 0x00050080u, 0x00000006u, 0x0000014eu,
179 0x000000ccu, 0x0000014du, 0x00060041u, 0x0000002du, 0x0000014fu, 0x00000121u, 0x0000002cu, 0x0000014eu,
180 0x0006003du, 0x00000006u, 0x00000150u, 0x0000014fu, 0x00000002u, 0x00000004u, 0x00050041u, 0x00000007u,
181 0x00000151u, 0x00000116u, 0x000000bcu, 0x0003003eu, 0x00000151u, 0x00000150u, 0x00050080u, 0x00000006u,
182 0x00000155u, 0x000000ccu, 0x0000007cu, 0x00060041u, 0x0000002du, 0x00000156u, 0x00000121u, 0x0000002cu,
183 0x00000155u, 0x0006003du, 0x00000006u, 0x00000157u, 0x00000156u, 0x00000002u, 0x00000004u, 0x00050041u,
184 0x00000007u, 0x00000158u, 0x00000116u, 0x0000009eu, 0x0003003eu, 0x00000158u, 0x00000157u, 0x000500aau,
185 0x00000008u, 0x0000015bu, 0x00000070u, 0x0000002fu, 0x000300f7u, 0x0000015du, 0x00000000u, 0x000400fau,
186 0x0000015bu, 0x0000015cu, 0x0000015du, 0x000200f8u, 0x0000015cu, 0x00050080u, 0x00000006u, 0x00000161u,
187 0x000000ccu, 0x00000078u, 0x00060041u, 0x0000002du, 0x00000162u, 0x00000121u, 0x0000002cu, 0x00000161u,
188 0x0006003du, 0x00000006u, 0x00000163u, 0x00000162u, 0x00000002u, 0x00000004u, 0x00050041u, 0x00000007u,
189 0x00000164u, 0x00000116u, 0x000000a9u, 0x0003003eu, 0x00000164u, 0x00000163u, 0x000200f9u, 0x0000015du,
190 0x000200f8u, 0x0000015du, 0x000200f9u, 0x0000011eu, 0x000200f8u, 0x00000165u, 0x00050041u, 0x000000dau,
191 0x00000167u, 0x00000026u, 0x0000002cu, 0x0004003du, 0x00000015u, 0x00000168u, 0x00000167u, 0x00060041u,
192 0x0000002du, 0x0000016au, 0x00000168u, 0x0000002cu, 0x000000ccu, 0x0006003du, 0x00000006u, 0x0000016bu,
193 0x0000016au, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x00000170u, 0x000000ccu, 0x0000002fu,
194 0x00060041u, 0x0000002du, 0x00000171u, 0x00000168u, 0x0000002cu, 0x00000170u, 0x0006003du, 0x00000006u,
195 0x00000172u, 0x00000171u, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x00000177u, 0x000000ccu,
196 0x0000014du, 0x00060041u, 0x0000002du, 0x00000178u, 0x00000168u, 0x0000002cu, 0x00000177u, 0x0006003du,
197 0x00000006u, 0x00000179u, 0x00000178u, 0x00000002u, 0x00000004u, 0x0007000cu, 0x00000006u, 0x0000017du,
198 0x00000001u, 0x00000026u, 0x0000016bu, 0x0000017cu, 0x0007000cu, 0x00000006u, 0x00000180u, 0x00000001u,
199 0x00000026u, 0x00000172u, 0x0000017cu, 0x0007000cu, 0x00000006u, 0x00000183u, 0x00000001u, 0x00000026u,
200 0x00000179u, 0x0000017cu, 0x000500aau, 0x00000008u, 0x00000186u, 0x00000070u, 0x0000007cu, 0x000600a9u,
201 0x00000006u, 0x000002cau, 0x00000186u, 0x0000002fu, 0x00000183u, 0x000600a9u, 0x00000006u, 0x000002cbu,
202 0x00000186u, 0x0000002fu, 0x00000180u, 0x000500c2u, 0x00000006u, 0x0000018cu, 0x00000086u, 0x0000002fu,
203 0x000500abu, 0x00000008u, 0x0000018eu, 0x0000018cu, 0x0000000eu, 0x000500abu, 0x00000008u, 0x00000190u,
204 0x0000017du, 0x0000000eu, 0x000500a7u, 0x00000008u, 0x00000191u, 0x0000018eu, 0x00000190u, 0x000500abu,
205 0x00000008u, 0x00000193u, 0x000002cbu, 0x0000000eu, 0x000500a7u, 0x00000008u, 0x00000194u, 0x00000191u,
206 0x00000193u, 0x000500abu, 0x00000008u, 0x00000196u, 0x000002cau, 0x0000000eu, 0x000500a7u, 0x00000008u,
207 0x00000197u, 0x00000194u, 0x00000196u, 0x000300f7u, 0x00000199u, 0x00000000u, 0x000400fau, 0x00000197u,
208 0x00000198u, 0x00000199u, 0x000200f8u, 0x00000198u, 0x0007000cu, 0x00000006u, 0x0000019cu, 0x00000001u,
209 0x00000026u, 0x0000017du, 0x0000018cu, 0x00050086u, 0x00000006u, 0x000001a0u, 0x0000018cu, 0x0000019cu,
210 0x0007000cu, 0x00000006u, 0x000001a1u, 0x00000001u, 0x00000026u, 0x000002cbu, 0x000001a0u, 0x00050086u,
211 0x00000006u, 0x000001a7u, 0x000001a0u, 0x000001a1u, 0x0007000cu, 0x00000006u, 0x000001a8u, 0x00000001u,
212 0x00000026u, 0x000002cau, 0x000001a7u, 0x000200f9u, 0x00000199u, 0x000200f8u, 0x00000199u, 0x000700f5u,
213 0x00000006u, 0x00000260u, 0x000002cbu, 0x00000165u, 0x000001a1u, 0x00000198u, 0x000700f5u, 0x00000006u,
214 0x0000025fu, 0x0000017du, 0x00000165u, 0x0000019cu, 0x00000198u, 0x000700f5u, 0x00000006u, 0x0000025eu,
215 0x000002cau, 0x00000165u, 0x000001a8u, 0x00000198u, 0x000500abu, 0x00000008u, 0x000001aau, 0x0000025eu,
216 0x0000000eu, 0x000300f7u, 0x000001acu, 0x00000000u, 0x000400fau, 0x000001aau, 0x000001abu, 0x000001acu,
217 0x000200f8u, 0x000001abu, 0x00050084u, 0x00000006u, 0x000001afu, 0x0000025fu, 0x00000260u, 0x00050086u,
218 0x00000006u, 0x000001b2u, 0x000001b0u, 0x0000025eu, 0x000500acu, 0x00000008u, 0x000001b3u, 0x000001afu,
219 0x000001b2u, 0x000200f9u, 0x000001acu, 0x000200f8u, 0x000001acu, 0x000700f5u, 0x00000008u, 0x000001b4u,
220 0x000001aau, 0x00000199u, 0x000001b3u, 0x000001abu, 0x000600a9u, 0x00000006u, 0x000002ccu, 0x000001b4u,
221 0x0000000eu, 0x0000025eu, 0x000600a9u, 0x00000006u, 0x000002cdu, 0x000001b4u, 0x0000000eu, 0x00000260u,
222 0x000600a9u, 0x00000006u, 0x000002ceu, 0x000001b4u, 0x0000000eu, 0x0000025fu, 0x000500abu, 0x00000008u,
223 0x000001b9u, 0x000002ceu, 0x0000016bu, 0x000500abu, 0x00000008u, 0x000001bcu, 0x000002cdu, 0x00000172u,
224 0x000500a6u, 0x00000008u, 0x000001bdu, 0x000001b9u, 0x000001bcu, 0x000500abu, 0x00000008u, 0x000001c0u,
225 0x000002ccu, 0x00000179u, 0x000500a6u, 0x00000008u, 0x000001c1u, 0x000001bdu, 0x000001c0u, 0x000600a9u,
226 0x00000006u, 0x000001c2u, 0x000001c1u, 0x0000002fu, 0x0000000eu, 0x00050084u, 0x00000006u, 0x000001c5u,
227 0x000002ceu, 0x000002cdu, 0x00050084u, 0x00000006u, 0x000001c7u, 0x000001c5u, 0x000002ccu, 0x000600a9u,
228 0x00000006u, 0x000001cdu, 0x00000186u, 0x000001cbu, 0x000001ccu, 0x00050084u, 0x00000006u, 0x000001ceu,
229 0x000001c7u, 0x000001cdu, 0x00050041u, 0x00000007u, 0x000001d0u, 0x00000116u, 0x0000002cu, 0x0003003eu,
230 0x000001d0u, 0x000002ceu, 0x00050041u, 0x00000007u, 0x000001d2u, 0x00000116u, 0x00000091u, 0x0003003eu,
231 0x000001d2u, 0x000002cdu, 0x00050041u, 0x00000007u, 0x000001d4u, 0x00000116u, 0x000000bcu, 0x0003003eu,
232 0x000001d4u, 0x000002ccu, 0x000200f9u, 0x0000011eu, 0x000200f8u, 0x0000011eu, 0x000700f5u, 0x00000006u,
233 0x00000292u, 0x00000142u, 0x0000015du, 0x000001c2u, 0x000001acu, 0x000700f5u, 0x00000006u, 0x00000278u,
234 0x00000145u, 0x0000015du, 0x000001ceu, 0x000001acu, 0x000500abu, 0x00000008u, 0x000001d6u, 0x00000278u,
235 0x0000000eu, 0x000300f7u, 0x000001d8u, 0x00000000u, 0x000400fau, 0x000001d6u, 0x000001d7u, 0x000001d8u,
236 0x000200f8u, 0x000001d7u, 0x000300f7u, 0x00000244u, 0x00000000u, 0x000300fbu, 0x0000000eu, 0x0000021cu,
237 0x000200f8u, 0x0000021cu, 0x000500aau, 0x00000008u, 0x0000021eu, 0x00000278u, 0x0000000eu, 0x000300f7u,
238 0x00000220u, 0x00000000u, 0x000400fau, 0x0000021eu, 0x0000021fu, 0x00000220u, 0x000200f8u, 0x0000021fu,
239 0x000200f9u, 0x00000244u, 0x000200f8u, 0x00000220u, 0x00050041u, 0x00000029u, 0x00000221u, 0x00000026u,
240 0x00000028u, 0x0004003du, 0x00000019u, 0x00000222u, 0x00000221u, 0x00060041u, 0x0000002du, 0x00000223u,
241 0x00000222u, 0x0000002cu, 0x0000002cu, 0x000700eau, 0x00000006u, 0x00000224u, 0x00000223u, 0x0000002fu,
242 0x0000000eu, 0x0000000eu, 0x000200f9u, 0x00000225u, 0x000200f8u, 0x00000225u, 0x000700f5u, 0x00000006u,
243 0x0000027au, 0x00000224u, 0x00000220u, 0x00000239u, 0x00000240u, 0x000500b0u, 0x00000008u, 0x00000228u,
244 0x0000027au, 0x00000037u, 0x000400f6u, 0x00000241u, 0x00000240u, 0x00000000u, 0x000400fau, 0x00000228u,
245 0x00000229u, 0x00000241u, 0x000200f8u, 0x00000229u, 0x00050082u, 0x00000006u, 0x0000022bu, 0x00000037u,
246 0x0000027au, 0x000500acu, 0x00000008u, 0x0000022eu, 0x00000278u, 0x0000022bu, 0x000300f7u, 0x00000230u,
247 0x00000000u, 0x000400fau, 0x0000022eu, 0x0000022fu, 0x00000230u, 0x000200f8u, 0x0000022fu, 0x000200f9u,
248 0x00000241u, 0x000200f8u, 0x00000230u, 0x00050080u, 0x00000006u, 0x00000233u, 0x0000027au, 0x00000278u,
249 0x000900e6u, 0x00000006u, 0x00000239u, 0x00000223u, 0x0000002fu, 0x0000000eu, 0x0000000eu, 0x00000233u,
250 0x0000027au, 0x000500aau, 0x00000008u, 0x0000023cu, 0x00000239u, 0x0000027au, 0x000300f7u, 0x0000023eu,
251 0x00000000u, 0x000400fau, 0x0000023cu, 0x0000023du, 0x0000023eu, 0x000200f8u, 0x0000023du, 0x000200f9u,
252 0x00000241u, 0x000200f8u, 0x0000023eu, 0x000200f9u, 0x00000240u, 0x000200f8u, 0x00000240u, 0x000200f9u,
253 0x00000225u, 0x000200f8u, 0x00000241u, 0x000900f5u, 0x00000008u, 0x0000027fu, 0x00000288u, 0x00000225u,
254 0x00000041u, 0x0000022fu, 0x00000012u, 0x0000023du, 0x000900f5u, 0x00000008u, 0x0000027cu, 0x00000041u,
255 0x00000225u, 0x00000012u, 0x0000022fu, 0x00000012u, 0x0000023du, 0x000300f7u, 0x00000243u, 0x00000000u,
256 0x000400fau, 0x0000027cu, 0x00000244u, 0x00000243u, 0x000200f8u, 0x00000243u, 0x000200f9u, 0x00000244u,
257 0x000200f8u, 0x00000244u, 0x000900f5u, 0x00000008u, 0x0000027eu, 0x00000012u, 0x0000021fu, 0x0000027fu,
258 0x00000241u, 0x00000041u, 0x00000243u, 0x000400a8u, 0x00000008u, 0x000001dcu, 0x0000027eu, 0x000200f9u,
259 0x000001d8u, 0x000200f8u, 0x000001d8u, 0x000700f5u, 0x00000008u, 0x000001ddu, 0x000001d6u, 0x0000011eu,
260 0x000001dcu, 0x00000244u, 0x000300f7u, 0x000001dfu, 0x00000000u, 0x000400fau, 0x000001ddu, 0x000001deu,
261 0x000001dfu, 0x000200f8u, 0x000001deu, 0x00050041u, 0x00000029u, 0x000001e0u, 0x00000026u, 0x000000a9u,
262 0x0004003du, 0x00000019u, 0x000001e1u, 0x000001e0u, 0x00060041u, 0x0000002du, 0x000001e2u, 0x000001e1u,
263 0x0000002cu, 0x000000bcu, 0x000700eau, 0x00000006u, 0x000001e3u, 0x000001e2u, 0x0000002fu, 0x0000000eu,
264 0x0000002fu, 0x0003003eu, 0x00000116u, 0x00000117u, 0x000200f9u, 0x000001dfu, 0x000200f8u, 0x000001dfu,
265 0x000600a9u, 0x00000006u, 0x000002cfu, 0x000001ddu, 0x0000002fu, 0x00000292u, 0x000500abu, 0x00000008u,
266 0x000001e5u, 0x000002cfu, 0x0000000eu, 0x000300f7u, 0x000001e7u, 0x00000000u, 0x000400fau, 0x000001e5u,
267 0x000001e6u, 0x000001e7u, 0x000200f8u, 0x000001e6u, 0x00050041u, 0x00000029u, 0x000001e8u, 0x00000026u,
268 0x000000a9u, 0x0004003du, 0x00000019u, 0x000001e9u, 0x000001e8u, 0x00060041u, 0x0000002du, 0x000001eau,
269 0x000001e9u, 0x0000002cu, 0x0000002cu, 0x000700eau, 0x00000006u, 0x000001ebu, 0x000001eau, 0x0000002fu,
270 0x0000000eu, 0x0000002fu, 0x00050041u, 0x00000007u, 0x000001ecu, 0x00000116u, 0x0000002cu, 0x0004003du,
271 0x00000006u, 0x000001edu, 0x000001ecu, 0x000500aau, 0x00000008u, 0x000001eeu, 0x000001edu, 0x0000000eu,
272 0x000300f7u, 0x000001f0u, 0x00000000u, 0x000400fau, 0x000001eeu, 0x000001efu, 0x000001f0u, 0x000200f8u,
273 0x000001efu, 0x00060041u, 0x0000002du, 0x000001f3u, 0x000001e9u, 0x0000002cu, 0x0000009eu, 0x000700eau,
274 0x00000006u, 0x000001f4u, 0x000001f3u, 0x0000002fu, 0x0000000eu, 0x0000002fu, 0x000200f9u, 0x000001f0u,
275 0x000200f8u, 0x000001f0u, 0x000200f9u, 0x000001e7u, 0x000200f8u, 0x000001e7u, 0x000200f9u, 0x000001f6u,
276 0x000200f8u, 0x000001f6u, 0x000700f5u, 0x00000006u, 0x00000297u, 0x0000000eu, 0x000001e7u, 0x00000208u,
277 0x000001f7u, 0x000500b0u, 0x00000008u, 0x000001fdu, 0x00000297u, 0x00000246u, 0x000400f6u, 0x000001f8u,
278 0x000001f7u, 0x00000000u, 0x000400fau, 0x000001fdu, 0x000001f7u, 0x000001f8u, 0x000200f8u, 0x000001f7u,
279 0x00050041u, 0x000000bdu, 0x000001feu, 0x00000026u, 0x000000bcu, 0x0004003du, 0x00000017u, 0x000001ffu,
280 0x000001feu, 0x00050080u, 0x00000006u, 0x00000202u, 0x00000081u, 0x00000297u, 0x00050041u, 0x00000007u,
281 0x00000204u, 0x00000116u, 0x00000297u, 0x0004003du, 0x00000006u, 0x00000205u, 0x00000204u, 0x00060041u,
282 0x0000002du, 0x00000206u, 0x000001ffu, 0x0000002cu, 0x00000202u, 0x0005003eu, 0x00000206u, 0x00000205u,
283 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x00000208u, 0x00000297u, 0x00000091u, 0x000200f9u,
284 0x000001f6u, 0x000200f8u, 0x000001f8u, 0x000200f9u, 0x0000020au, 0x000200f8u, 0x0000020au, 0x000100fdu,
285 0x00010038u,
286};
287} // namespace leonida
diff --git a/runtime/src/indirect_dispatch_count.comp b/runtime/src/indirect_dispatch_count.comp
index 9cbc371d9..aafae093b 100644
--- a/runtime/src/indirect_dispatch_count.comp
+++ b/runtime/src/indirect_dispatch_count.comp
@@ -16,16 +16,29 @@ layout(push_constant) uniform Params {
16 uint stride_words; 16 uint stride_words;
17 uint first_record; 17 uint first_record;
18 uint records; 18 uint records;
19 uint budget;
20 uint has_count;
19} p; 21} p;
20void main() { 22void main() {
21 const uint local_record = gl_GlobalInvocationID.x; 23 const uint local_record = gl_GlobalInvocationID.x;
22 if (local_record >= p.records) return; 24 if (local_record >= p.records) return;
23 const uint target = local_record * 3u; 25 const uint target = local_record * 3u;
24 if (p.first_record + local_record < p.count.data[0]) { 26 if (p.has_count == 0u || p.first_record + local_record < p.count.data[0]) {
25 const uint source = local_record * p.stride_words; 27 const uint source = local_record * p.stride_words;
26 p.output_words.data[target] = p.arguments.data[source]; 28 uvec3 groups = uvec3(p.arguments.data[source], p.arguments.data[source + 1u],
27 p.output_words.data[target + 1u] = p.arguments.data[source + 1u]; 29 p.arguments.data[source + 2u]);
28 p.output_words.data[target + 2u] = p.arguments.data[source + 2u]; 30 if (p.budget != 0u) {
31 if (any(equal(groups, uvec3(0u)))) groups = uvec3(0u);
32 else {
33 groups.x = min(groups.x, p.budget);
34 uint remaining = p.budget / groups.x;
35 groups.y = min(groups.y, remaining);
36 groups.z = min(groups.z, remaining / groups.y);
37 }
38 }
39 p.output_words.data[target] = groups.x;
40 p.output_words.data[target + 1u] = groups.y;
41 p.output_words.data[target + 2u] = groups.z;
29 } else { 42 } else {
30 p.output_words.data[target] = 0u; 43 p.output_words.data[target] = 0u;
31 p.output_words.data[target + 1u] = 0u; 44 p.output_words.data[target + 1u] = 0u;
diff --git a/runtime/src/indirect_dispatch_count_spv.h b/runtime/src/indirect_dispatch_count_spv.h
index 9cf7bbae5..dd317b27b 100644
--- a/runtime/src/indirect_dispatch_count_spv.h
+++ b/runtime/src/indirect_dispatch_count_spv.h
@@ -3,7 +3,7 @@
3#include <cstdint> 3#include <cstdint>
4namespace leonida { 4namespace leonida {
5inline constexpr std::uint32_t indirect_dispatch_count_spirv[] = { 5inline constexpr std::uint32_t indirect_dispatch_count_spirv[] = {
6 0x07230203u, 0x00010500u, 0x0008000bu, 0x00000074u, 0x00000000u, 0x00020011u, 0x00000001u, 0x00020011u, 6 0x07230203u, 0x00010500u, 0x0008000bu, 0x000000c5u, 0x00000000u, 0x00020011u, 0x00000001u, 0x00020011u,
7 0x000014e3u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu, 0x00000000u, 0x0003000eu, 7 0x000014e3u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu, 0x00000000u, 0x0003000eu,
8 0x000014e4u, 0x00000001u, 0x0007000fu, 0x00000005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x0000000bu, 8 0x000014e4u, 0x00000001u, 0x0007000fu, 0x00000005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x0000000bu,
9 0x00000019u, 0x00060010u, 0x00000004u, 0x00000011u, 0x00000040u, 0x00000001u, 0x00000001u, 0x00030003u, 9 0x00000019u, 0x00060010u, 0x00000004u, 0x00000011u, 0x00000040u, 0x00000001u, 0x00000001u, 0x00030003u,
@@ -14,71 +14,97 @@ inline constexpr std::uint32_t indirect_dispatch_count_spirv[] = {
14 0x00000013u, 0x00000001u, 0x6e756f63u, 0x00000074u, 0x00070006u, 0x00000013u, 0x00000002u, 0x7074756fu, 14 0x00000013u, 0x00000001u, 0x6e756f63u, 0x00000074u, 0x00070006u, 0x00000013u, 0x00000002u, 0x7074756fu,
15 0x775f7475u, 0x7364726fu, 0x00000000u, 0x00070006u, 0x00000013u, 0x00000003u, 0x69727473u, 0x775f6564u, 15 0x775f7475u, 0x7364726fu, 0x00000000u, 0x00070006u, 0x00000013u, 0x00000003u, 0x69727473u, 0x775f6564u,
16 0x7364726fu, 0x00000000u, 0x00070006u, 0x00000013u, 0x00000004u, 0x73726966u, 0x65725f74u, 0x64726f63u, 16 0x7364726fu, 0x00000000u, 0x00070006u, 0x00000013u, 0x00000004u, 0x73726966u, 0x65725f74u, 0x64726f63u,
17 0x00000000u, 0x00050006u, 0x00000013u, 0x00000005u, 0x6f636572u, 0x00736472u, 0x00040005u, 0x00000015u, 17 0x00000000u, 0x00050006u, 0x00000013u, 0x00000005u, 0x6f636572u, 0x00736472u, 0x00050006u, 0x00000013u,
18 0x64726f57u, 0x006e4973u, 0x00050006u, 0x00000015u, 0x00000000u, 0x61746164u, 0x00000000u, 0x00050005u, 18 0x00000006u, 0x67647562u, 0x00007465u, 0x00060006u, 0x00000013u, 0x00000007u, 0x5f736168u, 0x6e756f63u,
19 0x00000017u, 0x64726f57u, 0x74754f73u, 0x00000000u, 0x00050006u, 0x00000017u, 0x00000000u, 0x61746164u, 19 0x00000074u, 0x00040005u, 0x00000015u, 0x64726f57u, 0x006e4973u, 0x00050006u, 0x00000015u, 0x00000000u,
20 0x00000000u, 0x00030005u, 0x00000019u, 0x00000070u, 0x00040047u, 0x0000000bu, 0x0000000bu, 0x0000001cu, 20 0x61746164u, 0x00000000u, 0x00050005u, 0x00000017u, 0x64726f57u, 0x74754f73u, 0x00000000u, 0x00050006u,
21 0x00030047u, 0x00000013u, 0x00000002u, 0x00050048u, 0x00000013u, 0x00000000u, 0x00000023u, 0x00000000u, 21 0x00000017u, 0x00000000u, 0x61746164u, 0x00000000u, 0x00030005u, 0x00000019u, 0x00000070u, 0x00040047u,
22 0x00050048u, 0x00000013u, 0x00000001u, 0x00000023u, 0x00000008u, 0x00050048u, 0x00000013u, 0x00000002u, 22 0x0000000bu, 0x0000000bu, 0x0000001cu, 0x00030047u, 0x00000013u, 0x00000002u, 0x00050048u, 0x00000013u,
23 0x00000023u, 0x00000010u, 0x00050048u, 0x00000013u, 0x00000003u, 0x00000023u, 0x00000018u, 0x00050048u, 23 0x00000000u, 0x00000023u, 0x00000000u, 0x00050048u, 0x00000013u, 0x00000001u, 0x00000023u, 0x00000008u,
24 0x00000013u, 0x00000004u, 0x00000023u, 0x0000001cu, 0x00050048u, 0x00000013u, 0x00000005u, 0x00000023u, 24 0x00050048u, 0x00000013u, 0x00000002u, 0x00000023u, 0x00000010u, 0x00050048u, 0x00000013u, 0x00000003u,
25 0x00000020u, 0x00040047u, 0x00000014u, 0x00000006u, 0x00000004u, 0x00030047u, 0x00000015u, 0x00000002u, 25 0x00000023u, 0x00000018u, 0x00050048u, 0x00000013u, 0x00000004u, 0x00000023u, 0x0000001cu, 0x00050048u,
26 0x00040048u, 0x00000015u, 0x00000000u, 0x00000018u, 0x00050048u, 0x00000015u, 0x00000000u, 0x00000023u, 26 0x00000013u, 0x00000005u, 0x00000023u, 0x00000020u, 0x00050048u, 0x00000013u, 0x00000006u, 0x00000023u,
27 0x00000000u, 0x00040047u, 0x00000016u, 0x00000006u, 0x00000004u, 0x00030047u, 0x00000017u, 0x00000002u, 27 0x00000024u, 0x00050048u, 0x00000013u, 0x00000007u, 0x00000023u, 0x00000028u, 0x00040047u, 0x00000014u,
28 0x00050048u, 0x00000017u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00040047u, 0x00000071u, 0x0000000bu, 28 0x00000006u, 0x00000004u, 0x00030047u, 0x00000015u, 0x00000002u, 0x00040048u, 0x00000015u, 0x00000000u,
29 0x00000019u, 0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u, 0x00000002u, 0x00040015u, 0x00000006u, 29 0x00000018u, 0x00050048u, 0x00000015u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00040047u, 0x00000016u,
30 0x00000020u, 0x00000000u, 0x00040017u, 0x00000009u, 0x00000006u, 0x00000003u, 0x00040020u, 0x0000000au, 30 0x00000006u, 0x00000004u, 0x00030047u, 0x00000017u, 0x00000002u, 0x00050048u, 0x00000017u, 0x00000000u,
31 0x00000001u, 0x00000009u, 0x0004003bu, 0x0000000au, 0x0000000bu, 0x00000001u, 0x0004002bu, 0x00000006u, 31 0x00000023u, 0x00000000u, 0x00040047u, 0x000000a9u, 0x0000000bu, 0x00000019u, 0x00020013u, 0x00000002u,
32 0x0000000cu, 0x00000000u, 0x00040020u, 0x0000000du, 0x00000001u, 0x00000006u, 0x00030027u, 0x00000011u, 32 0x00030021u, 0x00000003u, 0x00000002u, 0x00040015u, 0x00000006u, 0x00000020u, 0x00000000u, 0x00040017u,
33 0x000014e5u, 0x00030027u, 0x00000012u, 0x000014e5u, 0x0008001eu, 0x00000013u, 0x00000011u, 0x00000011u, 33 0x00000009u, 0x00000006u, 0x00000003u, 0x00040020u, 0x0000000au, 0x00000001u, 0x00000009u, 0x0004003bu,
34 0x00000012u, 0x00000006u, 0x00000006u, 0x00000006u, 0x0003001du, 0x00000014u, 0x00000006u, 0x0003001eu, 34 0x0000000au, 0x0000000bu, 0x00000001u, 0x0004002bu, 0x00000006u, 0x0000000cu, 0x00000000u, 0x00040020u,
35 0x00000015u, 0x00000014u, 0x00040020u, 0x00000011u, 0x000014e5u, 0x00000015u, 0x0003001du, 0x00000016u, 35 0x0000000du, 0x00000001u, 0x00000006u, 0x00030027u, 0x00000011u, 0x000014e5u, 0x00030027u, 0x00000012u,
36 0x00000006u, 0x0003001eu, 0x00000017u, 0x00000016u, 0x00040020u, 0x00000012u, 0x000014e5u, 0x00000017u, 36 0x000014e5u, 0x000a001eu, 0x00000013u, 0x00000011u, 0x00000011u, 0x00000012u, 0x00000006u, 0x00000006u,
37 0x00040020u, 0x00000018u, 0x00000009u, 0x00000013u, 0x0004003bu, 0x00000018u, 0x00000019u, 0x00000009u, 37 0x00000006u, 0x00000006u, 0x00000006u, 0x0003001du, 0x00000014u, 0x00000006u, 0x0003001eu, 0x00000015u,
38 0x00040015u, 0x0000001au, 0x00000020u, 0x00000001u, 0x0004002bu, 0x0000001au, 0x0000001bu, 0x00000005u, 38 0x00000014u, 0x00040020u, 0x00000011u, 0x000014e5u, 0x00000015u, 0x0003001du, 0x00000016u, 0x00000006u,
39 0x00040020u, 0x0000001cu, 0x00000009u, 0x00000006u, 0x00020014u, 0x0000001fu, 0x0004002bu, 0x00000006u, 39 0x0003001eu, 0x00000017u, 0x00000016u, 0x00040020u, 0x00000012u, 0x000014e5u, 0x00000017u, 0x00040020u,
40 0x00000026u, 0x00000003u, 0x0004002bu, 0x0000001au, 0x00000028u, 0x00000004u, 0x0004002bu, 0x0000001au, 40 0x00000018u, 0x00000009u, 0x00000013u, 0x0004003bu, 0x00000018u, 0x00000019u, 0x00000009u, 0x00040015u,
41 0x0000002du, 0x00000001u, 0x00040020u, 0x0000002eu, 0x00000009u, 0x00000011u, 0x0004002bu, 0x0000001au, 41 0x0000001au, 0x00000020u, 0x00000001u, 0x0004002bu, 0x0000001au, 0x0000001bu, 0x00000005u, 0x00040020u,
42 0x00000031u, 0x00000000u, 0x00040020u, 0x00000032u, 0x000014e5u, 0x00000006u, 0x0004002bu, 0x0000001au, 42 0x0000001cu, 0x00000009u, 0x00000006u, 0x00020014u, 0x0000001fu, 0x0004002bu, 0x00000006u, 0x00000026u,
43 0x0000003au, 0x00000003u, 0x0004002bu, 0x0000001au, 0x0000003eu, 0x00000002u, 0x00040020u, 0x0000003fu, 43 0x00000003u, 0x0004002bu, 0x0000001au, 0x00000028u, 0x00000007u, 0x0004002bu, 0x0000001au, 0x0000002fu,
44 0x00000009u, 0x00000012u, 0x0004002bu, 0x00000006u, 0x0000004cu, 0x00000001u, 0x0004002bu, 0x00000006u, 44 0x00000004u, 0x0004002bu, 0x0000001au, 0x00000034u, 0x00000001u, 0x00040020u, 0x00000035u, 0x00000009u,
45 0x00000058u, 0x00000002u, 0x0004002bu, 0x00000006u, 0x00000070u, 0x00000040u, 0x0006002cu, 0x00000009u, 45 0x00000011u, 0x0004002bu, 0x0000001au, 0x00000038u, 0x00000000u, 0x00040020u, 0x00000039u, 0x000014e5u,
46 0x00000071u, 0x00000070u, 0x0000004cu, 0x0000004cu, 0x00050036u, 0x00000002u, 0x00000004u, 0x00000000u, 46 0x00000006u, 0x0004002bu, 0x0000001au, 0x00000042u, 0x00000003u, 0x0004002bu, 0x00000006u, 0x00000050u,
47 0x00000003u, 0x000200f8u, 0x00000005u, 0x000300f7u, 0x00000072u, 0x00000000u, 0x000300fbu, 0x0000000cu, 47 0x00000001u, 0x0004002bu, 0x00000006u, 0x00000057u, 0x00000002u, 0x0004002bu, 0x0000001au, 0x0000005cu,
48 0x00000073u, 0x000200f8u, 0x00000073u, 0x00050041u, 0x0000000du, 0x0000000eu, 0x0000000bu, 0x0000000cu, 48 0x00000006u, 0x0006002cu, 0x00000009u, 0x00000063u, 0x0000000cu, 0x0000000cu, 0x0000000cu, 0x00040017u,
49 0x0004003du, 0x00000006u, 0x0000000fu, 0x0000000eu, 0x00050041u, 0x0000001cu, 0x0000001du, 0x00000019u, 49 0x00000064u, 0x0000001fu, 0x00000003u, 0x0004002bu, 0x0000001au, 0x00000083u, 0x00000002u, 0x00040020u,
50 0x0000001bu, 0x0004003du, 0x00000006u, 0x0000001eu, 0x0000001du, 0x000500aeu, 0x0000001fu, 0x00000020u, 50 0x00000084u, 0x00000009u, 0x00000012u, 0x0004002bu, 0x00000006u, 0x000000a8u, 0x00000040u, 0x0006002cu,
51 0x0000000fu, 0x0000001eu, 0x000300f7u, 0x00000022u, 0x00000000u, 0x000400fau, 0x00000020u, 0x00000021u, 51 0x00000009u, 0x000000a9u, 0x000000a8u, 0x00000050u, 0x00000050u, 0x00050036u, 0x00000002u, 0x00000004u,
52 0x00000022u, 0x000200f8u, 0x00000021u, 0x000200f9u, 0x00000072u, 0x000200f8u, 0x00000022u, 0x00050084u, 52 0x00000000u, 0x00000003u, 0x000200f8u, 0x00000005u, 0x000300f7u, 0x000000aau, 0x00000000u, 0x000300fbu,
53 0x00000006u, 0x00000027u, 0x0000000fu, 0x00000026u, 0x00050041u, 0x0000001cu, 0x00000029u, 0x00000019u, 53 0x0000000cu, 0x000000abu, 0x000200f8u, 0x000000abu, 0x00050041u, 0x0000000du, 0x0000000eu, 0x0000000bu,
54 0x00000028u, 0x0004003du, 0x00000006u, 0x0000002au, 0x00000029u, 0x00050080u, 0x00000006u, 0x0000002cu, 54 0x0000000cu, 0x0004003du, 0x00000006u, 0x0000000fu, 0x0000000eu, 0x00050041u, 0x0000001cu, 0x0000001du,
55 0x0000002au, 0x0000000fu, 0x00050041u, 0x0000002eu, 0x0000002fu, 0x00000019u, 0x0000002du, 0x0004003du, 55 0x00000019u, 0x0000001bu, 0x0004003du, 0x00000006u, 0x0000001eu, 0x0000001du, 0x000500aeu, 0x0000001fu,
56 0x00000011u, 0x00000030u, 0x0000002fu, 0x00060041u, 0x00000032u, 0x00000033u, 0x00000030u, 0x00000031u, 56 0x00000020u, 0x0000000fu, 0x0000001eu, 0x000300f7u, 0x00000022u, 0x00000000u, 0x000400fau, 0x00000020u,
57 0x00000031u, 0x0006003du, 0x00000006u, 0x00000034u, 0x00000033u, 0x00000002u, 0x00000004u, 0x000500b0u, 57 0x00000021u, 0x00000022u, 0x000200f8u, 0x00000021u, 0x000200f9u, 0x000000aau, 0x000200f8u, 0x00000022u,
58 0x0000001fu, 0x00000035u, 0x0000002cu, 0x00000034u, 0x000300f7u, 0x00000037u, 0x00000000u, 0x000400fau, 58 0x00050084u, 0x00000006u, 0x00000027u, 0x0000000fu, 0x00000026u, 0x00050041u, 0x0000001cu, 0x00000029u,
59 0x00000035u, 0x00000036u, 0x00000061u, 0x000200f8u, 0x00000036u, 0x00050041u, 0x0000001cu, 0x0000003bu, 59 0x00000019u, 0x00000028u, 0x0004003du, 0x00000006u, 0x0000002au, 0x00000029u, 0x000500aau, 0x0000001fu,
60 0x00000019u, 0x0000003au, 0x0004003du, 0x00000006u, 0x0000003cu, 0x0000003bu, 0x00050084u, 0x00000006u, 60 0x0000002bu, 0x0000002au, 0x0000000cu, 0x000400a8u, 0x0000001fu, 0x0000002cu, 0x0000002bu, 0x000300f7u,
61 0x0000003du, 0x0000000fu, 0x0000003cu, 0x00050041u, 0x0000003fu, 0x00000040u, 0x00000019u, 0x0000003eu, 61 0x0000002eu, 0x00000000u, 0x000400fau, 0x0000002cu, 0x0000002du, 0x0000002eu, 0x000200f8u, 0x0000002du,
62 0x0004003du, 0x00000012u, 0x00000041u, 0x00000040u, 0x00050041u, 0x0000002eu, 0x00000043u, 0x00000019u, 62 0x00050041u, 0x0000001cu, 0x00000030u, 0x00000019u, 0x0000002fu, 0x0004003du, 0x00000006u, 0x00000031u,
63 0x00000031u, 0x0004003du, 0x00000011u, 0x00000044u, 0x00000043u, 0x00060041u, 0x00000032u, 0x00000046u, 63 0x00000030u, 0x00050080u, 0x00000006u, 0x00000033u, 0x00000031u, 0x0000000fu, 0x00050041u, 0x00000035u,
64 0x00000044u, 0x00000031u, 0x0000003du, 0x0006003du, 0x00000006u, 0x00000047u, 0x00000046u, 0x00000002u, 64 0x00000036u, 0x00000019u, 0x00000034u, 0x0004003du, 0x00000011u, 0x00000037u, 0x00000036u, 0x00060041u,
65 0x00000004u, 0x00060041u, 0x00000032u, 0x00000048u, 0x00000041u, 0x00000031u, 0x00000027u, 0x0005003eu, 65 0x00000039u, 0x0000003au, 0x00000037u, 0x00000038u, 0x00000038u, 0x0006003du, 0x00000006u, 0x0000003bu,
66 0x00000048u, 0x00000047u, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x0000004du, 0x00000027u, 66 0x0000003au, 0x00000002u, 0x00000004u, 0x000500b0u, 0x0000001fu, 0x0000003cu, 0x00000033u, 0x0000003bu,
67 0x0000004cu, 0x00050080u, 0x00000006u, 0x00000051u, 0x0000003du, 0x0000004cu, 0x00060041u, 0x00000032u, 67 0x000200f9u, 0x0000002eu, 0x000200f8u, 0x0000002eu, 0x000700f5u, 0x0000001fu, 0x0000003du, 0x0000002bu,
68 0x00000052u, 0x00000044u, 0x00000031u, 0x00000051u, 0x0006003du, 0x00000006u, 0x00000053u, 0x00000052u, 68 0x00000022u, 0x0000003cu, 0x0000002du, 0x000300f7u, 0x0000003fu, 0x00000000u, 0x000400fau, 0x0000003du,
69 0x00000002u, 0x00000004u, 0x00060041u, 0x00000032u, 0x00000054u, 0x00000041u, 0x00000031u, 0x0000004du, 69 0x0000003eu, 0x00000099u, 0x000200f8u, 0x0000003eu, 0x00050041u, 0x0000001cu, 0x00000043u, 0x00000019u,
70 0x0005003eu, 0x00000054u, 0x00000053u, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x00000059u, 70 0x00000042u, 0x0004003du, 0x00000006u, 0x00000044u, 0x00000043u, 0x00050084u, 0x00000006u, 0x00000045u,
71 0x00000027u, 0x00000058u, 0x00050080u, 0x00000006u, 0x0000005du, 0x0000003du, 0x00000058u, 0x00060041u, 71 0x0000000fu, 0x00000044u, 0x00050041u, 0x00000035u, 0x00000048u, 0x00000019u, 0x00000038u, 0x0004003du,
72 0x00000032u, 0x0000005eu, 0x00000044u, 0x00000031u, 0x0000005du, 0x0006003du, 0x00000006u, 0x0000005fu, 72 0x00000011u, 0x00000049u, 0x00000048u, 0x00060041u, 0x00000039u, 0x0000004bu, 0x00000049u, 0x00000038u,
73 0x0000005eu, 0x00000002u, 0x00000004u, 0x00060041u, 0x00000032u, 0x00000060u, 0x00000041u, 0x00000031u, 73 0x00000045u, 0x0006003du, 0x00000006u, 0x0000004cu, 0x0000004bu, 0x00000002u, 0x00000004u, 0x00050080u,
74 0x00000059u, 0x0005003eu, 0x00000060u, 0x0000005fu, 0x00000002u, 0x00000004u, 0x000200f9u, 0x00000037u, 74 0x00000006u, 0x00000051u, 0x00000045u, 0x00000050u, 0x00060041u, 0x00000039u, 0x00000052u, 0x00000049u,
75 0x000200f8u, 0x00000061u, 0x00050041u, 0x0000003fu, 0x00000062u, 0x00000019u, 0x0000003eu, 0x0004003du, 75 0x00000038u, 0x00000051u, 0x0006003du, 0x00000006u, 0x00000053u, 0x00000052u, 0x00000002u, 0x00000004u,
76 0x00000012u, 0x00000063u, 0x00000062u, 0x00060041u, 0x00000032u, 0x00000065u, 0x00000063u, 0x00000031u, 76 0x00050080u, 0x00000006u, 0x00000058u, 0x00000045u, 0x00000057u, 0x00060041u, 0x00000039u, 0x00000059u,
77 0x00000027u, 0x0005003eu, 0x00000065u, 0x0000000cu, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 77 0x00000049u, 0x00000038u, 0x00000058u, 0x0006003du, 0x00000006u, 0x0000005au, 0x00000059u, 0x00000002u,
78 0x00000069u, 0x00000027u, 0x0000004cu, 0x00060041u, 0x00000032u, 0x0000006au, 0x00000063u, 0x00000031u, 78 0x00000004u, 0x00060050u, 0x00000009u, 0x0000005bu, 0x0000004cu, 0x00000053u, 0x0000005au, 0x00050041u,
79 0x00000069u, 0x0005003eu, 0x0000006au, 0x0000000cu, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 79 0x0000001cu, 0x0000005du, 0x00000019u, 0x0000005cu, 0x0004003du, 0x00000006u, 0x0000005eu, 0x0000005du,
80 0x0000006eu, 0x00000027u, 0x00000058u, 0x00060041u, 0x00000032u, 0x0000006fu, 0x00000063u, 0x00000031u, 80 0x000500abu, 0x0000001fu, 0x0000005fu, 0x0000005eu, 0x0000000cu, 0x000300f7u, 0x00000061u, 0x00000000u,
81 0x0000006eu, 0x0005003eu, 0x0000006fu, 0x0000000cu, 0x00000002u, 0x00000004u, 0x000200f9u, 0x00000037u, 81 0x000400fau, 0x0000005fu, 0x00000060u, 0x00000061u, 0x000200f8u, 0x00000060u, 0x000500aau, 0x00000064u,
82 0x000200f8u, 0x00000037u, 0x000200f9u, 0x00000072u, 0x000200f8u, 0x00000072u, 0x000100fdu, 0x00010038u, 82 0x00000065u, 0x0000005bu, 0x00000063u, 0x0004009au, 0x0000001fu, 0x00000066u, 0x00000065u, 0x000300f7u,
83 0x00000068u, 0x00000000u, 0x000400fau, 0x00000066u, 0x00000067u, 0x00000069u, 0x000200f8u, 0x00000067u,
84 0x000200f9u, 0x00000068u, 0x000200f8u, 0x00000069u, 0x0007000cu, 0x00000006u, 0x0000006eu, 0x00000001u,
85 0x00000026u, 0x0000004cu, 0x0000005eu, 0x00050086u, 0x00000006u, 0x00000075u, 0x0000005eu, 0x0000006eu,
86 0x0007000cu, 0x00000006u, 0x00000079u, 0x00000001u, 0x00000026u, 0x00000053u, 0x00000075u, 0x00050086u,
87 0x00000006u, 0x00000080u, 0x00000075u, 0x00000079u, 0x0007000cu, 0x00000006u, 0x00000081u, 0x00000001u,
88 0x00000026u, 0x0000005au, 0x00000080u, 0x00060050u, 0x00000009u, 0x000000c4u, 0x0000006eu, 0x00000079u,
89 0x00000081u, 0x000200f9u, 0x00000068u, 0x000200f8u, 0x00000068u, 0x000700f5u, 0x00000009u, 0x000000c3u,
90 0x00000063u, 0x00000067u, 0x000000c4u, 0x00000069u, 0x000200f9u, 0x00000061u, 0x000200f8u, 0x00000061u,
91 0x000700f5u, 0x00000009u, 0x000000c2u, 0x0000005bu, 0x0000003eu, 0x000000c3u, 0x00000068u, 0x00050041u,
92 0x00000084u, 0x00000085u, 0x00000019u, 0x00000083u, 0x0004003du, 0x00000012u, 0x00000086u, 0x00000085u,
93 0x00050051u, 0x00000006u, 0x00000089u, 0x000000c2u, 0x00000000u, 0x00060041u, 0x00000039u, 0x0000008au,
94 0x00000086u, 0x00000038u, 0x00000027u, 0x0005003eu, 0x0000008au, 0x00000089u, 0x00000002u, 0x00000004u,
95 0x00050080u, 0x00000006u, 0x0000008eu, 0x00000027u, 0x00000050u, 0x00050051u, 0x00000006u, 0x00000090u,
96 0x000000c2u, 0x00000001u, 0x00060041u, 0x00000039u, 0x00000091u, 0x00000086u, 0x00000038u, 0x0000008eu,
97 0x0005003eu, 0x00000091u, 0x00000090u, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x00000095u,
98 0x00000027u, 0x00000057u, 0x00050051u, 0x00000006u, 0x00000097u, 0x000000c2u, 0x00000002u, 0x00060041u,
99 0x00000039u, 0x00000098u, 0x00000086u, 0x00000038u, 0x00000095u, 0x0005003eu, 0x00000098u, 0x00000097u,
100 0x00000002u, 0x00000004u, 0x000200f9u, 0x0000003fu, 0x000200f8u, 0x00000099u, 0x00050041u, 0x00000084u,
101 0x0000009au, 0x00000019u, 0x00000083u, 0x0004003du, 0x00000012u, 0x0000009bu, 0x0000009au, 0x00060041u,
102 0x00000039u, 0x0000009du, 0x0000009bu, 0x00000038u, 0x00000027u, 0x0005003eu, 0x0000009du, 0x0000000cu,
103 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x000000a1u, 0x00000027u, 0x00000050u, 0x00060041u,
104 0x00000039u, 0x000000a2u, 0x0000009bu, 0x00000038u, 0x000000a1u, 0x0005003eu, 0x000000a2u, 0x0000000cu,
105 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x000000a6u, 0x00000027u, 0x00000057u, 0x00060041u,
106 0x00000039u, 0x000000a7u, 0x0000009bu, 0x00000038u, 0x000000a6u, 0x0005003eu, 0x000000a7u, 0x0000000cu,
107 0x00000002u, 0x00000004u, 0x000200f9u, 0x0000003fu, 0x000200f8u, 0x0000003fu, 0x000200f9u, 0x000000aau,
108 0x000200f8u, 0x000000aau, 0x000100fdu, 0x00010038u,
83}; 109};
84} // namespace leonida 110} // namespace leonida
diff --git a/runtime/src/indirect_draw_stats.h b/runtime/src/indirect_draw_stats.h
new file mode 100644
index 000000000..0413ae5d8
--- /dev/null
+++ b/runtime/src/indirect_draw_stats.h
@@ -0,0 +1,104 @@
1// Process-wide counts of calls recorded and replay attempts. A command list can replay more than once.
2#pragma once
3#include <atomic>
4#include <cstddef>
5#include <cstdint>
6#include <cstdio>
7
8namespace leonida::indirect_stats {
9enum class Event { recorded, emitted, record_skip, replay_skip };
10// One flag per reason, shared across resolver instantiations.
11enum Reason { compound, disabled, pipeline, root_layout, viewport, mesh, topology, first_instance, entry, robust_index,
12 count_limit, multi_draw, count_feature, raw_count_limit, argument_usage, count_usage,
13 divisor, pending_pipeline, index_view, index_range, stateless, reason_count };
14
15// D3D_PRIMITIVE_TOPOLOGY values whose Vulkan dynamic topology (or rectangle-list geometry-stage variant) needs no CPU
16// vertex/index-count expansion at prepare time: POINTLIST(1), LINELIST(2), LINESTRIP(3), TRIANGLELIST(4),
17// TRIANGLESTRIP(5), *_ADJ(10..13), and console RECTLIST(17). UNDEFINED(0), QUADLIST(19), and patch lists remain skipped.
18inline constexpr bool topology_supported(std::uint32_t value) {
19 return (value >= 1 && value <= 5) || (value >= 10 && value <= 13) || value == 17;
20}
21
22inline constexpr const char* reason_name(Reason reason) {
23 constexpr const char* names[]{"compound signature", "opt-out", "missing pipeline", "missing root signature",
24 "empty viewport", "mesh indirect", "topology", "drawIndirectFirstInstance", "missing Vulkan entry point",
25 "robust sized index binding", "maxDrawIndirectCount", "multiDrawIndirect", "drawIndirectCount",
26 "counted draw requires maxDrawIndirectCount == UINT32_MAX", "argument buffer lacks indirect creation usage",
27 "count buffer lacks indirect creation usage", "nonunit vertex divisor", "pipeline pending",
28 "invalid index view", "index view outside buffer or misaligned", "legacy command has no graphics state"};
29 static_assert(sizeof(names) / sizeof(*names) == reason_count);
30 return static_cast<unsigned>(reason) < reason_count ? names[reason] : "unknown";
31}
32
33inline constexpr const char* reason_tag(Reason reason) {
34 constexpr const char* tags[]{"compound", "disabled", "pipeline", "root_layout", "viewport", "mesh", "topology",
35 "first_instance", "entry", "robust_index", "count_limit", "multi_draw", "count_feature", "raw_count_limit",
36 "argument_usage", "count_usage", "divisor", "pending_pipeline", "index_view", "index_range", "stateless"};
37 static_assert(sizeof(tags) / sizeof(*tags) == reason_count);
38 return static_cast<unsigned>(reason) < reason_count ? tags[reason] : "unknown";
39}
40
41struct Counts {
42 std::atomic<unsigned long long> values[4]{};
43 std::atomic<unsigned long long> by_reason[reason_count]{};
44 void report(std::FILE* out = stderr) const {
45 char line[1280];
46 int pos = std::snprintf(
47 line, sizeof(line),
48 "[rt] indirect graphics: recorded=%llu emitted=%llu record_skips=%llu replay_skips=%llu",
49 values[0].load(std::memory_order_relaxed), values[1].load(std::memory_order_relaxed),
50 values[2].load(std::memory_order_relaxed), values[3].load(std::memory_order_relaxed));
51 if (pos < 0) return;
52 if (static_cast<std::size_t>(pos) >= sizeof(line)) pos = static_cast<int>(sizeof(line) - 1);
53 bool first_reason = true;
54 for (unsigned i = 0; i < reason_count; ++i) {
55 const auto count = by_reason[i].load(std::memory_order_relaxed);
56 if (!count) continue;
57 const int rem = static_cast<int>(sizeof(line)) - pos;
58 if (rem <= 2) break;
59 const int n = std::snprintf(line + pos, static_cast<std::size_t>(rem), "%s%s=%llu",
60 first_reason ? " [" : ", ",
61 reason_tag(static_cast<Reason>(i)), count);
62 if (n <= 0) break;
63 pos += (n < rem) ? n : (rem - 1);
64 first_reason = false;
65 }
66 if (!first_reason && static_cast<std::size_t>(pos) + 1 < sizeof(line)) line[pos++] = ']';
67 std::fprintf(out, "%.*s\n", pos, line);
68 }
69 ~Counts() {
70 for (const auto& value : values) {
71 if (value.load(std::memory_order_relaxed)) {
72 report();
73 break;
74 }
75 }
76 }
77};
78
79inline Counts& counts() {
80 static Counts instance;
81 return instance;
82}
83
84inline unsigned long long reason_skips(Reason reason) {
85 return static_cast<unsigned>(reason) < reason_count
86 ? counts().by_reason[reason].load(std::memory_order_relaxed)
87 : 0ull;
88}
89
90inline void note(Event event) {
91 auto& c = counts();
92 const auto n = 1 + c.values[static_cast<unsigned>(event)].fetch_add(1, std::memory_order_relaxed);
93 if ((n & (n - 1)) == 0) c.report();
94}
95
96inline void skip(Event event, Reason reason) {
97 if (static_cast<unsigned>(reason) >= reason_count) return;
98 static std::atomic_flag shown[reason_count]{};
99 if (!shown[reason].test_and_set(std::memory_order_relaxed))
100 std::fprintf(stderr, "[rt] indirect graphics skipped: %s\n", reason_name(reason));
101 counts().by_reason[reason].fetch_add(1, std::memory_order_relaxed);
102 note(event);
103}
104}
diff --git a/runtime/src/local_diagnostics.h b/runtime/src/local_diagnostics.h
new file mode 100644
index 000000000..50155479d
--- /dev/null
+++ b/runtime/src/local_diagnostics.h
@@ -0,0 +1,29 @@
1#pragma once
2
3// LEONIDA_LOCAL_DIAGNOSTICS=1 turns on the boot diagnostics that write to stderr from the draw, clear, present and
4// descriptor paths (the lines tagged present-probe, fsdraw, heap-probe, desc-probe and "PresentX diag"). They were
5// written to follow one frame of the retail title from its draws to the window and cost a lock and a line on paths
6// that run for every draw, so they are off unless asked for. Read once; any value that does not start with '0'
7// turns them on. No Windows dependency: the headers that use it are built into portable tests too.
8
9#include <cstddef>
10#include <cstdlib>
11
12namespace leonida {
13
14inline bool local_diagnostics() {
15 static const bool on = [] {
16#ifdef _WIN32
17 char value[8]{};
18 std::size_t length = 0;
19 return getenv_s(&length, value, sizeof value, "LEONIDA_LOCAL_DIAGNOSTICS") == 0 && length > 1 &&
20 value[0] != '0';
21#else
22 const char* value = std::getenv("LEONIDA_LOCAL_DIAGNOSTICS");
23 return value && *value && *value != '0';
24#endif
25 }();
26 return on;
27}
28
29} // namespace leonida
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp
index 900b8460a..28949830b 100644
--- a/runtime/src/main.cpp
+++ b/runtime/src/main.cpp
@@ -18,24 +18,147 @@
18// (--overlay, default <game-dir>/overlay) so the package is never modified (shims/file_system.cpp). 18// (--overlay, default <game-dir>/overlay) so the package is never modified (shims/file_system.cpp).
19#include <windows.h> 19#include <windows.h>
20 20
21#include <cstdint>
21#include <cstdio> 22#include <cstdio>
22#include <cstdlib> 23#include <cstdlib>
23#include <exception> 24#include <exception>
24#include <filesystem> 25#include <filesystem>
25#include <map> 26#include <map>
27#include <mutex>
26#include <string> 28#include <string>
27#include <system_error> 29#include <system_error>
28#include <vector> 30#include <vector>
29 31
32#include <cstring>
33
34namespace {
35
36// The retail executable (1.0.2.1) runs a hang watchdog thread (function at RVA 0x2215a60): when the game's main loop
37// has not set its "kick" byte (RVA 0x71b6331) for 30 one-second ticks, it calls a crash callback and then writes to
38// address 0 (`movl $0, 0` at RVA 0x2215c35). Under the runtime the game thread can legitimately stall for longer than
39// that, e.g. while the driver compiles pipelines against a cold cache (first boot after a driver update), and the
40// title then kills itself. By default the watchdog stays armed, as on the console. With LEONIDA_TITLE_WATCHDOG=0, and
41// only when that exact trap instruction sits where it does in this build, a runtime thread sets the kick byte twice a
42// second so the title's watchdog never fires.
43constexpr std::uint32_t kWatchdogTrapRva = 0x2215c35;
44constexpr std::uint32_t kWatchdogKickRva = 0x71b6331;
45constexpr unsigned char kWatchdogTrap[] = {0xC7, 0x04, 0x25, 0, 0, 0, 0, 0, 0, 0, 0}; // movl $0, 0x0
46
47void keep_title_watchdog_kicked(std::uint8_t* base) {
48 char value[4]{};
49 if (GetEnvironmentVariableA("LEONIDA_TITLE_WATCHDOG", value, sizeof(value)) != 1 || value[0] != '0') return;
50 MEMORY_BASIC_INFORMATION trap{}, kick{};
51 if (!VirtualQuery(base + kWatchdogTrapRva, &trap, sizeof(trap)) || trap.State != MEM_COMMIT ||
52 std::memcmp(base + kWatchdogTrapRva, kWatchdogTrap, sizeof(kWatchdogTrap)) != 0)
53 return; // not the build this was measured on: leave the title's watchdog alone
54 const DWORD writable = PAGE_READWRITE | PAGE_WRITECOPY | PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_WRITECOPY;
55 if (!VirtualQuery(base + kWatchdogKickRva, &kick, sizeof(kick)) || kick.State != MEM_COMMIT ||
56 !(kick.Protect & writable))
57 return;
58 volatile std::uint8_t* const byte = base + kWatchdogKickRva;
59 const HANDLE thread = CreateThread(
60 nullptr, 0,
61 [](LPVOID p) -> DWORD {
62 auto* b = static_cast<volatile std::uint8_t*>(p);
63 for (;;) {
64 *b = 1;
65 Sleep(500);
66 }
67 },
68 const_cast<std::uint8_t*>(byte), 0, nullptr);
69 if (thread) {
70 CloseHandle(thread);
71 std::fprintf(stderr, "[rt] loader: keeping the title's hang watchdog kicked (LEONIDA_TITLE_WATCHDOG=0; unset or 1 keeps it armed)\n");
72 }
73}
74
75// LEONIDA_PEEK="0x9e1dac0:3,0x7446510,0x98f828c" (diagnostic): a thread prints the 8-byte values at these RVAs of the
76// title's image (":n" = n consecutive values, at most 32; "RVA>OFF" reads through the pointer stored at the RVA, at
77// pointer + OFF, both hex) every LEONIDA_PEEK_SECONDS (default 10). For answering "what does this
78// global hold at run time" without a debugger: the reverse-engineering notes (docs/re/requests.md) ask for exactly
79// that. Reads are checked; nothing is written.
80void start_title_peek(std::uint8_t* base) {
81 static char spec[1024];
82 const DWORD n = GetEnvironmentVariableA("LEONIDA_PEEK", spec, sizeof(spec));
83 if (!n || n >= sizeof(spec)) return;
84 static std::uint8_t* image = base;
85 const HANDLE thread = CreateThread(
86 nullptr, 0,
87 [](LPVOID) -> DWORD {
88 char seconds[16]{};
89 DWORD period = 10;
90 if (GetEnvironmentVariableA("LEONIDA_PEEK_SECONDS", seconds, sizeof(seconds)) > 0)
91 period = std::max<DWORD>(1, static_cast<DWORD>(std::strtoul(seconds, nullptr, 10)));
92 for (unsigned tick = 0;; ++tick) {
93 std::string line = "[rt] peek t=" + std::to_string(tick * period) + "s:";
94 for (const char* at = spec; *at;) {
95 char* end = nullptr;
96 const std::uint64_t rva = std::strtoull(at, &end, 16);
97 if (end == at) break;
98 // "RVA>OFF": the 8-byte pointer at the RVA, then the values at pointer + OFF (both hex).
99 bool deref = false;
100 std::uint64_t offset = 0;
101 if (*end == '>') {
102 deref = true;
103 offset = std::strtoull(end + 1, &end, 16);
104 }
105 unsigned count = 1;
106 if (*end == ':') count = static_cast<unsigned>(std::strtoul(end + 1, &end, 10));
107 char text[48];
108 if (deref)
109 std::snprintf(text, sizeof(text), " 0x%llx>%llx=", static_cast<unsigned long long>(rva),
110 static_cast<unsigned long long>(offset));
111 else
112 std::snprintf(text, sizeof(text), " 0x%llx=", static_cast<unsigned long long>(rva));
113 line += text;
114 const std::uint8_t* from = image + rva;
115 if (deref) {
116 std::uint64_t pointer = 0;
117 SIZE_T got = 0;
118 if (!ReadProcessMemory(GetCurrentProcess(), from, &pointer, sizeof(pointer), &got) ||
119 got != sizeof(pointer) || !pointer)
120 count = 0, line += "?";
121 from = reinterpret_cast<const std::uint8_t*>(pointer + offset);
122 }
123 for (unsigned i = 0; i < count && i < 32; ++i) {
124 std::uint64_t value = 0;
125 SIZE_T got = 0;
126 const bool ok = ReadProcessMemory(GetCurrentProcess(), from + 8ull * i, &value,
127 sizeof(value), &got) && got == sizeof(value);
128 std::snprintf(text, sizeof(text), ok ? "%s%llx" : "%s?", i ? "," : "",
129 static_cast<unsigned long long>(value));
130 line += text;
131 }
132 at = *end == ',' ? end + 1 : end;
133 if (at == end && *end) break;
134 }
135 std::fprintf(stderr, "%s\n", line.c_str());
136 Sleep(period * 1000);
137 }
138 },
139 nullptr, 0, nullptr);
140 if (thread) CloseHandle(thread);
141}
142
143} // namespace
144
30#include "base_reservation.h" 145#include "base_reservation.h"
31#include "code_hooks.h" 146#include "code_hooks.h"
32#include "cpu_emulation.h" 147#include "cpu_emulation.h"
33#include "host_cpu.h" 148#include "host_cpu.h"
34#include "mods.h" 149#include "mods.h"
35#include "pe_loader.h" 150#include "pe_loader.h"
151#include "thread_stacks.h"
152#include "thread_sampler.h"
153#include "title_page_watch.h"
154#include "title_geometry_watch.h"
36#include "../shims/d3d12_trace.h" 155#include "../shims/d3d12_trace.h"
37#include "../shims/d3d12_xs_device.h" 156#include "../shims/d3d12_xs_device.h"
38#include "../shims/file_system.h" 157#include "../shims/file_system.h"
158#ifdef LEONIDA_VULKAN_DEVICE
159#include "../shims/d3d12_compile_exit.h"
160#include "../shims/package_splash.h"
161#endif
39#include "../shims/process_shim.h" 162#include "../shims/process_shim.h"
40#include "../shims/shims.h" 163#include "../shims/shims.h"
41#include "../shims/startup_trace.h" 164#include "../shims/startup_trace.h"
@@ -52,22 +175,128 @@ const char* binding_name(rt::Binding b) {
52 } 175 }
53} 176}
54 177
178// Module TLS index 0 for the game's executable (rt::reserve_tls_index0), from the CRT's initializer table: .CRT$XCT
179// runs after the C runtime is set up and before every C++ dynamic initializer of gta6rt (.CRT$XCU), so before any of
180// gta6rt's code can have started a thread. The frames above it (wmainCRTStartup, __scrt_common_main_seh, _initterm)
181// hold no TLS slot address. The result is read again where an image is run.
182void __cdecl reserve_tls_index0_at_start() { rt::reserve_tls_index0(); }
183#pragma section(".CRT$XCT", read)
184extern "C" __declspec(allocate(".CRT$XCT")) void(__cdecl* const gta6rt_reserve_tls_index0)() =
185 reserve_tls_index0_at_start;
186#pragma comment(linker, "/INCLUDE:gta6rt_reserve_tls_index0")
187
188// Select the settings used to display the offline first-run UI. Keep explicit caller settings.
189bool configure_first_run_ui(const std::filesystem::path& package, std::filesystem::path& overlay) {
190 // A variable that is set but empty is not a setting: Windows cannot hold one, but a caller on Wine can pass one
191 // (NAME= in the environment), and asking for the size alone reports it as present there.
192 const auto set_default = [](const wchar_t* name, const wchar_t* value) {
193 wchar_t first[2]{};
194 return GetEnvironmentVariableW(name, first, 2) != 0 || _wputenv_s(name, value) == 0;
195 };
196 const struct { const wchar_t* name; const wchar_t* value; } settings[] = {
197 {L"LEONIDA_D3D12", L"vulkan"}, {L"LEONIDA_ARENA_MB", L"2048"},
198 {L"LEONIDA_GRAPHICS_STAGE_LAYOUT", L"1"}, {L"LEONIDA_PIPELINE_COMPILE", L"on-demand"},
199 {L"LEONIDA_FRAME_PACING", L"1"},
200 // Focused, not always: keys typed into another window must not press anything on a consent page.
201 // Scripted presses (LEONIDA_INPUT_SCRIPT) still run while the window is unfocused.
202 {L"LEONIDA_KEYBOARD_PAD", L"1"},
203 };
204 for (const auto& setting : settings) {
205 if (!set_default(setting.name, setting.value)) return false;
206 }
207 std::wstring executable(32768, L'\0');
208 const DWORD length = GetModuleFileNameW(nullptr, executable.data(), static_cast<DWORD>(executable.size()));
209 if (!length || length >= executable.size()) return false;
210 executable.resize(length);
211 const auto state = std::filesystem::path(executable).parent_path() / L"first-run-ui";
212 if (overlay.empty()) overlay = state / L"overlay";
213 if (!GetEnvironmentVariableW(L"LEONIDA_XMEM_BACKING_DIR", nullptr, 0)) {
214 std::error_code error;
215 const auto backing = state / L"xmem";
216 std::filesystem::create_directories(backing, error);
217 if (error || !set_default(L"LEONIDA_XMEM_BACKING_DIR", backing.c_str())) return false;
218 }
219 return SetCurrentDirectoryW(package.c_str()) != FALSE;
220}
221
55int usage() { 222int usage() {
56 std::fprintf(stderr, 223 std::fprintf(stderr,
57 "usage: gta6rt --dry-run <image> [--game-dir DIR] [--overlay DIR] [--mods DIR] [--archetype-lookup RVA[,ARG]] [--view-mode-getter RVA] [--trace FILE]\n" 224 "usage: gta6rt --dry-run <image> [--game-dir DIR] [--overlay DIR] [--mods DIR] [--archetype-lookup RVA[,ARG]] [--view-mode-getter RVA] [--trace FILE]\n"
58 " gta6rt --init <image> [--game-dir DIR] [--overlay DIR] [--mods DIR] [--archetype-lookup RVA[,ARG]] [--view-mode-getter RVA] [--trace-d3d12] [--trace FILE]\n" 225 " gta6rt --init <image> [--game-dir DIR] [--overlay DIR] [--mods DIR] [--archetype-lookup RVA[,ARG]] [--view-mode-getter RVA] [--trace-d3d12] [--trace FILE]\n"
226 " gta6rt --first-run-ui <exe> [--game-dir DIR] [--overlay DIR] [--trace FILE]\n"
59 " gta6rt --run <exe> [--game-dir DIR] [--overlay DIR] [--mods DIR] [--archetype-lookup RVA[,ARG]] [--view-mode-getter RVA] [--trace-d3d12] [--trace FILE] [-- game arguments...]\n"); 227 " gta6rt --run <exe> [--game-dir DIR] [--overlay DIR] [--mods DIR] [--archetype-lookup RVA[,ARG]] [--view-mode-getter RVA] [--trace-d3d12] [--trace FILE] [-- game arguments...]\n");
60 return 2; 228 return 2;
61} 229}
62 230
63} // namespace 231} // namespace
64 232
233#ifdef LEONIDA_VULKAN_DEVICE
234// The run ends with the title's Vulkan device alive, so no ~Device stops the background pipeline compiler: stop it
235// here, before ExitProcess ends its thread, maybe inside the driver's compiler (rt::d3d12::stop_pipeline_compiles).
236constexpr unsigned kExitCompileWaitMs = 2000; // a console close gives the whole process 5 s
237// For a build still running on a title thread, then the session cache write (rt::d3d12::save_pipeline_caches_at_exit).
238constexpr unsigned kExitCacheWaitMs = 1000;
239
240static BOOL WINAPI stop_compiles_on_console_exit(DWORD event) {
241 if (event == CTRL_C_EVENT || event == CTRL_BREAK_EVENT || event == CTRL_CLOSE_EVENT) {
242 rt::d3d12_xs::stop_list_values(500); // as at the run's end: no list-value thread cut off inside the layer
243 rt::d3d12::stop_pipeline_compiles(kExitCompileWaitMs);
244 rt::d3d12::save_pipeline_caches_at_exit(kExitCacheWaitMs);
245 }
246 return FALSE; // the next handler (the default one: ExitProcess) ends the process, as before
247}
248
249// A run that ends in an exception nothing handles (a fault in the title or one of its DLLs, the int3 after a device
250// loss) would otherwise keep none of the pipelines it compiled, and the next boot builds them all again. The device is
251// left alone apart from that write; the exception then goes on as before (the previous filter, or Windows' own
252// handling), so the exit code is the exception's. Not for a stack overflow: no stack is left to write with.
253static LPTOP_LEVEL_EXCEPTION_FILTER previous_fatal_filter = nullptr;
254// The retail title installs a filter of its own (SetUnhandledExceptionFilter from api-ms-win-core-errorhandling),
255// which replaced this one and ended the process without it (measured: a title fault at 354 s wrote nothing). Its
256// call is served here instead: this filter stays installed and hands the exception to the title's, as Windows would.
257static void* volatile title_fatal_filter = nullptr;
258
259static LPTOP_LEVEL_EXCEPTION_FILTER WINAPI title_set_unhandled_exception_filter(LPTOP_LEVEL_EXCEPTION_FILTER filter) {
260 return reinterpret_cast<LPTOP_LEVEL_EXCEPTION_FILTER>(
261 InterlockedExchangePointer(&title_fatal_filter, reinterpret_cast<void*>(filter)));
262}
263
264static LONG WINAPI save_caches_on_fatal_exception(EXCEPTION_POINTERS* info) {
265 const DWORD code = info && info->ExceptionRecord ? info->ExceptionRecord->ExceptionCode : 0;
266 if (code != EXCEPTION_STACK_OVERFLOW) {
267 // Several title threads can fault at once (measured: eight within a second). The first writes; the others
268 // wait here for it, so none of them reaches the title's filter, which may end the process, mid-write.
269 static std::once_flag once;
270 std::call_once(once, [code] {
271 std::fprintf(stderr, "[rt] unhandled exception 0x%08lx: writing the session pipeline cache before the "
272 "process ends\n", static_cast<unsigned long>(code));
273 rt::d3d12::stop_pipeline_compiles(kExitCompileWaitMs);
274 rt::d3d12::save_pipeline_caches_at_exit(kExitCacheWaitMs);
275 std::fflush(stderr);
276 });
277 }
278 if (auto* title = reinterpret_cast<LPTOP_LEVEL_EXCEPTION_FILTER>(
279 InterlockedCompareExchangePointer(&title_fatal_filter, nullptr, nullptr)))
280 return title(info);
281 return previous_fatal_filter ? previous_fatal_filter(info) : EXCEPTION_CONTINUE_SEARCH;
282}
283
284static BOOL WINAPI show_package_window(HWND window, int command) {
285 const BOOL previous = ShowWindow(window, command);
286 const DWORD error = GetLastError();
287 if (command != SW_HIDE && rt::package_splash::paint_window(window))
288 rt::startup_trace::event("package_splash_window");
289 SetLastError(error);
290 return previous;
291}
292#endif
293
65int wmain(int argc, wchar_t** argv) { 294int wmain(int argc, wchar_t** argv) {
66 std::filesystem::path image, game_dir, overlay_dir, mods_dir; 295 std::filesystem::path image, game_dir, overlay_dir, mods_dir;
67 uint32_t archetype_lookup_rva = 0; // --archetype-lookup RVA[,ARG]: the game's archetype lookup by hash 296 uint32_t archetype_lookup_rva = 0; // --archetype-lookup RVA[,ARG]: the game's archetype lookup by hash
68 int archetype_lookup_arg = 0; 297 int archetype_lookup_arg = 0;
69 uint32_t view_mode_getter_rva = 0; // --view-mode-getter RVA: the game's view mode of a camera context 298 uint32_t view_mode_getter_rva = 0; // --view-mode-getter RVA: the game's view mode of a camera context
70 bool dry_run = false, init = false, run = false, trace_d3d12 = false; 299 bool dry_run = false, init = false, run = false, trace_d3d12 = false, first_run_ui = false;
71 std::vector<std::wstring> game_args; // wide: path::string() throws on a character the code page lacks (RT-84) 300 std::vector<std::wstring> game_args; // wide: path::string() throws on a character the code page lacks (RT-84)
72 std::wstring trace_file; 301 std::wstring trace_file;
73 for (int i = 1; i < argc; ++i) { 302 for (int i = 1; i < argc; ++i) {
@@ -78,6 +307,7 @@ int wmain(int argc, wchar_t** argv) {
78 } 307 }
79 if (a == L"--dry-run") dry_run = true; 308 if (a == L"--dry-run") dry_run = true;
80 else if (a == L"--init") init = true; 309 else if (a == L"--init") init = true;
310 else if (a == L"--first-run-ui") first_run_ui = true;
81 else if (a == L"--run") run = true; 311 else if (a == L"--run") run = true;
82 else if (a == L"--trace-d3d12") trace_d3d12 = true; 312 else if (a == L"--trace-d3d12") trace_d3d12 = true;
83 else if (a == L"--trace" && i + 1 < argc) trace_file = argv[++i]; 313 else if (a == L"--trace" && i + 1 < argc) trace_file = argv[++i];
@@ -104,7 +334,8 @@ int wmain(int argc, wchar_t** argv) {
104 } 334 }
105 if (image.empty()) return usage(); 335 if (image.empty()) return usage();
106 // Exactly one mode: --dry-run --run would otherwise initialise the modules and call the entry point. 336 // Exactly one mode: --dry-run --run would otherwise initialise the modules and call the entry point.
107 if (dry_run + init + run != 1) return usage(); 337 if (dry_run + init + run + first_run_ui != 1) return usage();
338 run = run || first_run_ui;
108 // The game runs AVX code from its TLS callbacks on; without AVX that is a bare 0xC000001D (src/host_cpu.h). 339 // The game runs AVX code from its TLS callbacks on; without AVX that is a bare 0xC000001D (src/host_cpu.h).
109 if ((init || run) && !rt::host_cpu::check_skipped()) 340 if ((init || run) && !rt::host_cpu::check_skipped())
110 if (const auto missing = rt::host_cpu::missing_host_features(); !missing.empty()) { 341 if (const auto missing = rt::host_cpu::missing_host_features(); !missing.empty()) {
@@ -119,7 +350,21 @@ int wmain(int argc, wchar_t** argv) {
119 std::filesystem::path a = std::filesystem::absolute(p, ec); 350 std::filesystem::path a = std::filesystem::absolute(p, ec);
120 return ec ? p : a; 351 return ec ? p : a;
121 }; 352 };
353 if (first_run_ui) {
354 image = absolute_or_same(image);
355 if (!mods_dir.empty()) mods_dir = absolute_or_same(mods_dir);
356 if (!trace_file.empty()) trace_file = absolute_or_same(trace_file).wstring();
357 }
122 game_dir = game_dir.empty() ? absolute_or_same(image).parent_path() : absolute_or_same(game_dir); 358 game_dir = game_dir.empty() ? absolute_or_same(image).parent_path() : absolute_or_same(game_dir);
359 // An unattended run can select a fresh write root even when its launcher supplies --overlay.
360 if (const DWORD size = GetEnvironmentVariableW(L"LEONIDA_WRITE_DIR", nullptr, 0)) {
361 std::wstring dir(size, 0);
362 const DWORD n = GetEnvironmentVariableW(L"LEONIDA_WRITE_DIR", dir.data(), size);
363 if (n && n < size) {
364 dir.resize(n);
365 overlay_dir = dir;
366 }
367 }
123 if (!overlay_dir.empty()) overlay_dir = absolute_or_same(overlay_dir); 368 if (!overlay_dir.empty()) overlay_dir = absolute_or_same(overlay_dir);
124 // LEONIDA_SHADERS too: the D3D12 device reads it at the title's first pipeline state, after it may have moved. 369 // LEONIDA_SHADERS too: the D3D12 device reads it at the title's first pipeline state, after it may have moved.
125 if (const DWORD size = GetEnvironmentVariableW(L"LEONIDA_SHADERS", nullptr, 0)) { 370 if (const DWORD size = GetEnvironmentVariableW(L"LEONIDA_SHADERS", nullptr, 0)) {
@@ -135,8 +380,31 @@ int wmain(int argc, wchar_t** argv) {
135 if (!rt::base_reservation::inherited()) 380 if (!rt::base_reservation::inherited())
136 if (const auto range = rt::base_reservation::needed(image)) return rt::base_reservation::relaunch(*range); 381 if (const auto range = rt::base_reservation::needed(image)) return rt::base_reservation::relaunch(*range);
137 // GAME: paths read under --game-dir; whatever a title writes lands in the overlay, never in the package. 382 // GAME: paths read under --game-dir; whatever a title writes lands in the overlay, never in the package.
383 if (first_run_ui && !configure_first_run_ui(game_dir, overlay_dir)) {
384 std::fprintf(stderr, "cannot initialize the first-run UI paths or graphics settings\n");
385 return 1;
386 }
138 if (overlay_dir.empty()) overlay_dir = game_dir / "overlay"; 387 if (overlay_dir.empty()) overlay_dir = game_dir / "overlay";
139 rt::fs::configure(game_dir, overlay_dir); 388 rt::fs::configure(game_dir, overlay_dir);
389#ifdef LEONIDA_VULKAN_DEVICE
390 if (run) {
391 // Before the image is loaded, so its import binds here (save_caches_on_fatal_exception).
392 const rt::shims::Entry filter_imports[] = {
393 {"api-ms-win-core-errorhandling-l1-1-0.dll", "SetUnhandledExceptionFilter",
394 reinterpret_cast<void*>(&title_set_unhandled_exception_filter)},
395 {"kernel32.dll", "SetUnhandledExceptionFilter", reinterpret_cast<void*>(&title_set_unhandled_exception_filter)},
396 };
397 rt::shims::Table{filter_imports, std::size(filter_imports)};
398 rt::package_splash::configure(game_dir);
399 if (rt::package_splash::configured()) {
400 const rt::shims::Entry window_imports[] = {
401 {"ext-ms-win-rtcore-ntuser-window-l1-1-0.dll", "ShowWindow", reinterpret_cast<void*>(&show_package_window)},
402 {"user32.dll", "ShowWindow", reinterpret_cast<void*>(&show_package_window)},
403 };
404 rt::shims::Table{window_imports, std::size(window_imports)};
405 }
406 }
407#endif
140 // Mods (docs/modding.md): <folder of gta6rt.exe>\mods unless --mods names another. Loaded and reported here; 408 // Mods (docs/modding.md): <folder of gta6rt.exe>\mods unless --mods names another. Loaded and reported here;
141 // the archetype swaps take effect once the game's archetype lookup is hooked for this executable version. 409 // the archetype swaps take effect once the game's archetype lookup is hooked for this executable version.
142 if (mods_dir.empty()) { 410 if (mods_dir.empty()) {
@@ -168,6 +436,11 @@ int wmain(int argc, wchar_t** argv) {
168 rt::d3d12_trace::set_enabled(trace_d3d12); 436 rt::d3d12_trace::set_enabled(trace_d3d12);
169 // Slot 133 imports the title's pages; xmem commits them on first touch, so they are committed first. 437 // Slot 133 imports the title's pages; xmem commits them on first touch, so they are committed first.
170 rt::d3d12_xs::set_placed_at_va_pages_hook(&rt::xmem::commit_physical_range); 438 rt::d3d12_xs::set_placed_at_va_pages_hook(&rt::xmem::commit_physical_range);
439 // So do the file shims' reads, whose kernel writes do not fault them in: on ERROR_NOACCESS (title_page_watch.h).
440 leonida::geometry_writes::aliases.store(&rt::xmem::geometry_aliases);
441 leonida::kernel_writes::set_committer(&rt::xmem::commit_physical_range);
442 rt::d3d12_xs::set_texture_page_provider(&rt::xmem::pin_mapped_data);
443 leonida::kernel_writes::set_unguarder(&rt::xmem::reopen_unowned);
171 if (int trace_error = 0; !trace_file.empty() && !rt::startup_trace::open(trace_file.c_str(), &trace_error)) { 444 if (int trace_error = 0; !trace_file.empty() && !rt::startup_trace::open(trace_file.c_str(), &trace_error)) {
172 std::fprintf(stderr, trace_error == EEXIST ? "error: the trace file already exists; --trace only creates a new file\n" 445 std::fprintf(stderr, trace_error == EEXIST ? "error: the trace file already exists; --trace only creates a new file\n"
173 : "error: cannot create the trace file\n"); 446 : "error: cannot create the trace file\n");
@@ -186,6 +459,20 @@ int wmain(int argc, wchar_t** argv) {
186 try { 459 try {
187 rt::Loader loader(game_dir); 460 rt::Loader loader(game_dir);
188 rt::Module& main_module = loader.load(image); // maps, binds and installs TLS; runs no image code 461 rt::Module& main_module = loader.load(image); // maps, binds and installs TLS; runs no image code
462 // An executable with TLS that did not get index 0: its /GA code would read and write the TLS in slot 0, which
463 // is gta6rt's own (or another executable's), so no code of it may run.
464 const auto* main_nt = reinterpret_cast<const IMAGE_NT_HEADERS64*>(
465 main_module.base + reinterpret_cast<const IMAGE_DOS_HEADER*>(main_module.base)->e_lfanew);
466 const bool main_is_exe = (main_nt->FileHeader.Characteristics & IMAGE_FILE_DLL) == 0;
467 if ((init || run) && main_is_exe && main_module.tls_slot != rt::kNoTlsIndex && main_module.tls_index != 0) {
468 std::string why;
469 if (rt::reserve_tls_index0(&why)) why = "another mapped executable holds it";
470 std::fprintf(stderr,
471 "error: %s cannot have module TLS index 0 (%s); code built with /GA would read and write "
472 "another module's TLS through slot 0, so it is not run\n",
473 main_module.name.c_str(), why.c_str());
474 return 1;
475 }
189 // The mods' archetype swaps (docs/modding.md): hooked here, before any image code runs, when the lookup's RVA 476 // The mods' archetype swaps (docs/modding.md): hooked here, before any image code runs, when the lookup's RVA
190 // for this executable is given. The count of redirected calls shows whether the RVA is the real lookup. 477 // for this executable is given. The count of redirected calls shows whether the RVA is the real lookup.
191 if (view_mode_getter_rva) { 478 if (view_mode_getter_rva) {
@@ -276,7 +563,18 @@ int wmain(int argc, wchar_t** argv) {
276 } 563 }
277 std::printf("running %s\n", main_module.name.c_str()); 564 std::printf("running %s\n", main_module.name.c_str());
278 std::fflush(stdout); 565 std::fflush(stdout);
279 const int code = rt::process::run_entry(main_module.base + main_module.entry_rva); 566 keep_title_watchdog_kicked(main_module.base);
567 start_title_peek(main_module.base);
568 leonida::thread_sampler::start(main_module.base, main_module.size); // LEONIDA_SAMPLE_MS (diagnostic)
569#ifdef LEONIDA_VULKAN_DEVICE
570 SetConsoleCtrlHandler(&stop_compiles_on_console_exit, TRUE);
571 previous_fatal_filter = SetUnhandledExceptionFilter(&save_caches_on_fatal_exception);
572#endif
573 int code;
574 {
575 auto stacks = rt::start_thread_stacks();
576 code = rt::process::run_entry(main_module.base + main_module.entry_rva);
577 }
280 std::fflush(stdout); 578 std::fflush(stdout);
281 std::printf("game exited with code %d\n", code); 579 std::printf("game exited with code %d\n", code);
282 rt::shims::report_called_unimplemented(); 580 rt::shims::report_called_unimplemented();
@@ -286,6 +584,13 @@ int wmain(int argc, wchar_t** argv) {
286 // Not `return`: a normal host exit runs the CRT's atexit table, which the game shares with gta6rt (its 584 // Not `return`: a normal host exit runs the CRT's atexit table, which the game shares with gta6rt (its
287 // handlers would run against a game that has stopped) and whose last word decides the exit status. 585 // handlers would run against a game that has stopped) and whose last word decides the exit status.
288 // ExitProcess also skips atexit, so the TLS clone cleanup registered there is run here instead. 586 // ExitProcess also skips atexit, so the TLS clone cleanup registered there is run here instead.
587 // The list-value threads end first: ExitProcess must not cut one off inside the layer (in a held submission,
588 // holding its queues' lock).
589 rt::d3d12_xs::stop_list_values(500);
590#ifdef LEONIDA_VULKAN_DEVICE
591 rt::d3d12::stop_pipeline_compiles(kExitCompileWaitMs);
592 rt::d3d12::save_pipeline_caches_at_exit(kExitCacheWaitMs);
593#endif
289 rt::cleanup_tls_clones(); 594 rt::cleanup_tls_clones();
290 ExitProcess(static_cast<UINT>(code)); 595 ExitProcess(static_cast<UINT>(code));
291 } catch (const std::exception& e) { 596 } catch (const std::exception& e) {
diff --git a/runtime/src/mem_probe.h b/runtime/src/mem_probe.h
new file mode 100644
index 000000000..a36d38bfe
--- /dev/null
+++ b/runtime/src/mem_probe.h
@@ -0,0 +1,570 @@
1#pragma once
2
3// LOCAL DIAGNOSTIC (not for upstream): mem probe. Where the game process's memory goes.
4// LEONIDA_MEM_PROBE=<seconds> turns it on (absent or 0: off, and nothing below is installed). Every <seconds> it logs
5// [rt] mem-probe t=...: the live Vulkan objects the runtime made (pipelines by kind, shader modules and their SPIR-V
6// bytes, VkDeviceMemory per memory type, split into allocated and imported), what the device
7// adds (pipeline cache bytes, arena, title memory), and
8// [rt] mem-probe smaps: /proc/self/smaps of the Wine process, Rss and Swap per kind of mapping: title memory,
9// other PE private memory (runtime + title heaps), PE images, PE sections, memory the Vulkan
10// driver mapped for us, /dev/nvidia* mappings, other native (Unix-side) anonymous memory
11// (driver heaps, glibc arenas), and files.
12// The Vulkan counts come from wrapping the runtime's own function table (install()); helpers that load their own
13// pointers (depth24, predicate, xdxr, swapchain) are not counted: they create a handful of objects.
14
15#include <windows.h>
16#include <vulkan/vulkan.h>
17
18#include <algorithm>
19#include <atomic>
20#include <cctype>
21#include <chrono>
22#include <cstdint>
23#include <cstdio>
24#include <cstdlib>
25#include <cstring>
26#include <functional>
27#include <map>
28#include <mutex>
29#include <string>
30#include <thread>
31#include <unordered_map>
32#include <utility>
33#include <vector>
34
35namespace leonida::mem_probe {
36
37struct Allocation {
38 std::uint32_t type = 0;
39 std::uint64_t bytes = 0;
40 bool imported = false;
41 std::uintptr_t mapped = 0;
42 std::uint64_t mapped_bytes = 0;
43};
44
45struct State {
46 PFN_vkAllocateMemory allocate = nullptr;
47 PFN_vkFreeMemory free = nullptr;
48 PFN_vkMapMemory map = nullptr;
49 PFN_vkUnmapMemory unmap = nullptr;
50 PFN_vkCreateShaderModule create_module = nullptr;
51 PFN_vkDestroyShaderModule destroy_module = nullptr;
52 PFN_vkCreateGraphicsPipelines create_graphics = nullptr;
53 PFN_vkCreateComputePipelines create_compute = nullptr;
54 PFN_vkDestroyPipeline destroy_pipeline = nullptr;
55
56 std::mutex mutex;
57 std::unordered_map<VkDeviceMemory, Allocation> allocations;
58 std::unordered_map<VkShaderModule, std::uint64_t> modules;
59 std::unordered_map<VkPipeline, std::uint8_t> pipelines; // 0 graphics, 1 compute
60 std::uint64_t module_bytes = 0, modules_made = 0, module_bytes_made = 0;
61 std::uint64_t graphics_live = 0, compute_live = 0, graphics_made = 0, compute_made = 0;
62 std::uint64_t graphics_ns = 0, compute_ns = 0; // time inside vkCreate*Pipelines
63 std::uint64_t installed = 0;
64 ULONGLONG started = 0;
65};
66
67inline State& state() {
68 static State s;
69 return s;
70}
71
72inline unsigned interval_seconds() {
73 static const unsigned seconds = [] {
74 char text[16] = {};
75 DWORD n = GetEnvironmentVariableA("LEONIDA_MEM_PROBE", text, sizeof text);
76 if (!n || n >= sizeof text) return 0u;
77 return unsigned(std::strtoul(text, nullptr, 10));
78 }();
79 return seconds;
80}
81
82inline bool imported_memory(const VkMemoryAllocateInfo* info) {
83 for (auto* p = static_cast<const VkBaseInStructure*>(info->pNext); p; p = p->pNext)
84 if (p->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_HOST_POINTER_INFO_EXT ||
85 p->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_WIN32_HANDLE_INFO_KHR ||
86 p->sType == VK_STRUCTURE_TYPE_IMPORT_MEMORY_FD_INFO_KHR)
87 return true;
88 return false;
89}
90
91inline VKAPI_ATTR VkResult VKAPI_CALL allocate_memory(VkDevice device, const VkMemoryAllocateInfo* info,
92 const VkAllocationCallbacks* callbacks, VkDeviceMemory* out) {
93 State& s = state();
94 const VkResult result = s.allocate(device, info, callbacks, out);
95 if (result == VK_SUCCESS && out && *out) {
96 std::lock_guard lock(s.mutex);
97 s.allocations[*out] = {info->memoryTypeIndex, info->allocationSize, imported_memory(info), 0, 0};
98 }
99 return result;
100}
101
102inline VKAPI_ATTR void VKAPI_CALL free_memory(VkDevice device, VkDeviceMemory memory,
103 const VkAllocationCallbacks* callbacks) {
104 State& s = state();
105 if (memory) {
106 std::lock_guard lock(s.mutex);
107 s.allocations.erase(memory);
108 }
109 s.free(device, memory, callbacks);
110}
111
112inline VKAPI_ATTR VkResult VKAPI_CALL map_memory(VkDevice device, VkDeviceMemory memory, VkDeviceSize offset,
113 VkDeviceSize size, VkMemoryMapFlags flags, void** data) {
114 State& s = state();
115 const VkResult result = s.map(device, memory, offset, size, flags, data);
116 if (result == VK_SUCCESS && data && *data) {
117 std::lock_guard lock(s.mutex);
118 if (auto it = s.allocations.find(memory); it != s.allocations.end()) {
119 it->second.mapped = reinterpret_cast<std::uintptr_t>(*data);
120 it->second.mapped_bytes = size == VK_WHOLE_SIZE ? it->second.bytes - offset : size;
121 }
122 }
123 return result;
124}
125
126inline VKAPI_ATTR void VKAPI_CALL unmap_memory(VkDevice device, VkDeviceMemory memory) {
127 State& s = state();
128 {
129 std::lock_guard lock(s.mutex);
130 if (auto it = s.allocations.find(memory); it != s.allocations.end()) it->second.mapped = 0;
131 }
132 s.unmap(device, memory);
133}
134
135inline VKAPI_ATTR VkResult VKAPI_CALL create_shader_module(VkDevice device, const VkShaderModuleCreateInfo* info,
136 const VkAllocationCallbacks* callbacks,
137 VkShaderModule* out) {
138 State& s = state();
139 const VkResult result = s.create_module(device, info, callbacks, out);
140 if (result == VK_SUCCESS && out && *out) {
141 std::lock_guard lock(s.mutex);
142 s.modules[*out] = info->codeSize;
143 s.module_bytes += info->codeSize;
144 ++s.modules_made;
145 s.module_bytes_made += info->codeSize;
146 }
147 return result;
148}
149
150inline VKAPI_ATTR void VKAPI_CALL destroy_shader_module(VkDevice device, VkShaderModule module,
151 const VkAllocationCallbacks* callbacks) {
152 State& s = state();
153 if (module) {
154 std::lock_guard lock(s.mutex);
155 if (auto it = s.modules.find(module); it != s.modules.end()) {
156 s.module_bytes -= it->second;
157 s.modules.erase(it);
158 }
159 }
160 s.destroy_module(device, module, callbacks);
161}
162
163inline std::uint64_t now_ns() {
164 return std::uint64_t(
165 std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::steady_clock::now().time_since_epoch())
166 .count());
167}
168
169inline void note_pipelines(std::uint8_t kind, std::uint32_t count, const VkPipeline* made, std::uint64_t ns) {
170 State& s = state();
171 std::lock_guard lock(s.mutex);
172 (kind ? s.compute_ns : s.graphics_ns) += ns;
173 for (std::uint32_t i = 0; i < count; ++i) {
174 if (!made[i]) continue;
175 s.pipelines[made[i]] = kind;
176 ++(kind ? s.compute_live : s.graphics_live);
177 ++(kind ? s.compute_made : s.graphics_made);
178 }
179}
180
181inline double mib(std::uint64_t bytes) { return double(bytes) / 1048576.0; }
182
183// One line per pipeline call that takes 1 s or more: how long, and how big its SPIR-V was.
184inline void note_slow(const char* kind, std::uint64_t ns, std::uint64_t spirv_bytes, std::uint32_t stages) {
185 if (ns < 1000000000ull) return;
186 std::fprintf(stderr, "[rt] mem-probe slow %s pipeline: %.1f s, %u stages, %.1f MiB SPIR-V\n", kind,
187 double(ns) / 1e9, stages, mib(spirv_bytes));
188}
189
190inline std::uint64_t module_size(VkShaderModule module) {
191 State& s = state();
192 std::lock_guard lock(s.mutex);
193 const auto it = s.modules.find(module);
194 return it == s.modules.end() ? 0 : it->second;
195}
196
197inline VKAPI_ATTR VkResult VKAPI_CALL create_graphics_pipelines(VkDevice device, VkPipelineCache cache,
198 std::uint32_t count,
199 const VkGraphicsPipelineCreateInfo* infos,
200 const VkAllocationCallbacks* callbacks,
201 VkPipeline* out) {
202 const std::uint64_t t0 = now_ns();
203 const VkResult result = state().create_graphics(device, cache, count, infos, callbacks, out);
204 const std::uint64_t ns = now_ns() - t0;
205 if (result >= 0 && out) note_pipelines(0, count, out, ns);
206 if (ns >= 1000000000ull && count == 1) {
207 std::uint64_t bytes = 0;
208 for (std::uint32_t i = 0; i < infos[0].stageCount; ++i) bytes += module_size(infos[0].pStages[i].module);
209 note_slow("graphics", ns, bytes, infos[0].stageCount);
210 }
211 return result;
212}
213
214inline VKAPI_ATTR VkResult VKAPI_CALL create_compute_pipelines(VkDevice device, VkPipelineCache cache,
215 std::uint32_t count,
216 const VkComputePipelineCreateInfo* infos,
217 const VkAllocationCallbacks* callbacks,
218 VkPipeline* out) {
219 const std::uint64_t t0 = now_ns();
220 const VkResult result = state().create_compute(device, cache, count, infos, callbacks, out);
221 const std::uint64_t ns = now_ns() - t0;
222 if (result >= 0 && out) note_pipelines(1, count, out, ns);
223 if (ns >= 1000000000ull && count == 1) note_slow("compute", ns, module_size(infos[0].stage.module), 1);
224 return result;
225}
226
227inline VKAPI_ATTR void VKAPI_CALL destroy_pipeline(VkDevice device, VkPipeline pipeline,
228 const VkAllocationCallbacks* callbacks) {
229 State& s = state();
230 if (pipeline) {
231 std::lock_guard lock(s.mutex);
232 if (auto it = s.pipelines.find(pipeline); it != s.pipelines.end()) {
233 --(it->second ? s.compute_live : s.graphics_live);
234 s.pipelines.erase(it);
235 }
236 }
237 s.destroy_pipeline(device, pipeline, callbacks);
238}
239
240// Wraps the runtime's function table (leonida::VulkanDeviceFunctions). Once per process: the first device wins.
241template<typename Functions>
242void install(Functions& vk) {
243 if (!interval_seconds()) return;
244 State& s = state();
245 std::lock_guard lock(s.mutex);
246 if (s.installed++) return;
247 if (!vk.vkAllocateMemory || !vk.vkFreeMemory || !vk.vkMapMemory || !vk.vkUnmapMemory ||
248 !vk.vkCreateShaderModule || !vk.vkDestroyShaderModule || !vk.vkCreateGraphicsPipelines ||
249 !vk.vkCreateComputePipelines || !vk.vkDestroyPipeline)
250 return;
251 s.started = GetTickCount64();
252 s.allocate = vk.vkAllocateMemory, vk.vkAllocateMemory = allocate_memory;
253 s.free = vk.vkFreeMemory, vk.vkFreeMemory = free_memory;
254 s.map = vk.vkMapMemory, vk.vkMapMemory = map_memory;
255 s.unmap = vk.vkUnmapMemory, vk.vkUnmapMemory = unmap_memory;
256 s.create_module = vk.vkCreateShaderModule, vk.vkCreateShaderModule = create_shader_module;
257 s.destroy_module = vk.vkDestroyShaderModule, vk.vkDestroyShaderModule = destroy_shader_module;
258 s.create_graphics = vk.vkCreateGraphicsPipelines, vk.vkCreateGraphicsPipelines = create_graphics_pipelines;
259 s.create_compute = vk.vkCreateComputePipelines, vk.vkCreateComputePipelines = create_compute_pipelines;
260 s.destroy_pipeline = vk.vkDestroyPipeline, vk.vkDestroyPipeline = destroy_pipeline;
261 std::fprintf(stderr, "[rt] mem-probe: installed, every %u s\n", interval_seconds());
262}
263
264// ---- /proc/self/smaps, classified ----
265enum Bucket {
266 b_title, // the title's memory (XMem / title VirtualAlloc ranges)
267 b_pe_private, // other PE private memory: the runtime's and the title's heaps, stacks
268 b_pe_high, // PE private memory at 0x7f0000000000 and above (where native mmaps land: a check on Wine views)
269 b_pe_image, // PE images (exe/dll)
270 b_pe_mapped, // PE sections (file mappings, pagefile-backed sections)
271 b_vk_mapped, // memory the Vulkan driver mapped for vkMapMemory
272 b_nvidia, // other /dev/nvidia* mappings
273 b_native_anon, // native anonymous memory Wine does not know: driver heaps, glibc arenas, [heap], [stack]
274 b_file, // native file mappings (.so, ...)
275 b_count
276};
277inline const char* bucket_name(int b) {
278 static const char* names[b_count] = {"title", "pe-private", "pe-private@7f", "pe-image", "pe-section",
279 "vk-mapped", "nvidia-dev", "native-anon", "native-file"};
280 return names[b];
281}
282
283struct Usage {
284 std::uint64_t rss = 0, anon = 0, swap = 0, vmas = 0;
285};
286
287using Ranges = std::vector<std::pair<std::uint64_t, std::uint64_t>>; // [begin, end), sorted
288
289inline bool in_ranges(const Ranges& ranges, std::uint64_t va) {
290 auto it = std::upper_bound(ranges.begin(), ranges.end(), std::make_pair(va, UINT64_MAX));
291 if (it == ranges.begin()) return false;
292 --it;
293 return va >= it->first && va < it->second;
294}
295
296inline std::string read_small(const std::string& path) {
297 HANDLE file = CreateFileA(path.c_str(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, nullptr, OPEN_EXISTING, 0,
298 nullptr);
299 if (file == INVALID_HANDLE_VALUE) return {};
300 std::string text;
301 std::vector<char> buffer(16384);
302 DWORD got = 0;
303 while (ReadFile(file, buffer.data(), DWORD(buffer.size()), &got, nullptr) && got) text.append(buffer.data(), got);
304 CloseHandle(file);
305 return text;
306}
307
308// The Unix process of this Wine process. Wine opens files in wineserver, so Z:\proc\self is the server: the game is
309// the /proc entry whose command line names gta6rt and whose address space is the largest (one boot at a time).
310inline std::string proc_dir() {
311 static std::string found;
312 if (!found.empty()) return found;
313 WIN32_FIND_DATAA data{};
314 HANDLE find = FindFirstFileA("Z:\\proc\\*", &data);
315 if (find == INVALID_HANDLE_VALUE) return {};
316 std::uint64_t best = 0;
317 do {
318 if (data.cFileName[0] < '1' || data.cFileName[0] > '9') continue;
319 const std::string dir = std::string("Z:\\proc\\") + data.cFileName;
320 std::string cmdline = read_small(dir + "\\cmdline");
321 for (char& c : cmdline) c = char(std::tolower(static_cast<unsigned char>(c)));
322 if (cmdline.find("gta6rt") == std::string::npos) continue;
323 const std::string status = read_small(dir + "\\status");
324 const std::size_t at = status.find("VmSize:");
325 const std::uint64_t vm = at == std::string::npos ? 0 : std::strtoull(status.c_str() + at + 7, nullptr, 10);
326 if (vm > best) {
327 best = vm;
328 found = dir;
329 }
330 } while (FindNextFileA(find, &data));
331 FindClose(find);
332 if (!found.empty()) std::fprintf(stderr, "[rt] mem-probe: this process is %s (VmSize %llu kB)\n", found.c_str(),
333 (unsigned long long)best);
334 return found;
335}
336
337// Parses /proc/<pid>/smaps (Wine reaches the Unix /proc through Z:). Classifies each VMA by its start address.
338inline bool read_smaps(const Ranges& title, const Ranges& vk_mapped, Usage (&usage)[b_count], std::string& top_files,
339 std::string& error) {
340 const std::string dir = proc_dir();
341 if (dir.empty()) {
342 error = "no /proc entry names gta6rt";
343 return false;
344 }
345 HANDLE file = CreateFileA((dir + "\\smaps").c_str(), GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, nullptr,
346 OPEN_EXISTING, 0, nullptr);
347 if (file == INVALID_HANDLE_VALUE) {
348 error = "open failed " + std::to_string(GetLastError());
349 return false;
350 }
351 std::vector<char> buffer(1 << 20);
352 std::string carry;
353 int bucket = -1;
354 std::string path;
355 std::map<std::string, Usage> files;
356 const auto field = [](const char* line, const char* name, std::uint64_t& out) {
357 const std::size_t n = std::strlen(name);
358 if (std::strncmp(line, name, n) != 0) return false;
359 out = std::strtoull(line + n, nullptr, 10) * 1024;
360 return true;
361 };
362 const auto header = [&](const char* line) {
363 // 7f0000000000-7f0000001000 rw-p 00000000 00:00 0 [path]
364 char* end = nullptr;
365 const std::uint64_t begin = std::strtoull(line, &end, 16);
366 if (!end || *end != '-') return false;
367 const char* p = line;
368 for (int fields = 0; fields < 5 && *p; ++fields) { // skip range perms offset dev inode
369 while (*p && *p != ' ') ++p;
370 while (*p == ' ') ++p;
371 }
372 path = p;
373 while (!path.empty() && (path.back() == '\n' || path.back() == '\r' || path.back() == ' ')) path.pop_back();
374 if (in_ranges(title, begin)) {
375 bucket = b_title;
376 } else if (in_ranges(vk_mapped, begin)) {
377 bucket = b_vk_mapped;
378 } else if (path.rfind("/dev/nvidia", 0) == 0) {
379 bucket = b_nvidia;
380 } else {
381 MEMORY_BASIC_INFORMATION region{};
382 const bool known = VirtualQuery(reinterpret_cast<const void*>(begin), &region, sizeof region) &&
383 region.State == MEM_COMMIT;
384 if (known && region.Type == MEM_IMAGE) bucket = b_pe_image;
385 else if (known && region.Type == MEM_MAPPED) bucket = b_pe_mapped;
386 else if (known && region.Type == MEM_PRIVATE) bucket = begin >= 0x7f0000000000ull ? b_pe_high : b_pe_private;
387 else if (!path.empty() && path[0] == '/' ) bucket = b_file;
388 else bucket = b_native_anon;
389 }
390 ++usage[bucket].vmas;
391 return true;
392 };
393 const auto line_of = [&](const char* line) {
394 std::uint64_t value = 0;
395 if ((line[0] >= '0' && line[0] <= '9') || (line[0] >= 'a' && line[0] <= 'f')) {
396 if (header(line)) return;
397 }
398 if (bucket < 0) return;
399 if (field(line, "Rss:", value)) {
400 usage[bucket].rss += value;
401 if (bucket == b_file || bucket == b_pe_image || bucket == b_pe_mapped) files[path].rss += value;
402 } else if (field(line, "Anonymous:", value)) {
403 usage[bucket].anon += value;
404 } else if (field(line, "Swap:", value)) {
405 usage[bucket].swap += value;
406 if (bucket == b_file || bucket == b_pe_image || bucket == b_pe_mapped) files[path].swap += value;
407 }
408 };
409 DWORD got = 0;
410 while (ReadFile(file, buffer.data(), DWORD(buffer.size()), &got, nullptr) && got) {
411 carry.append(buffer.data(), got);
412 std::size_t start = 0;
413 for (std::size_t nl; (nl = carry.find('\n', start)) != std::string::npos; start = nl + 1) {
414 carry[nl] = 0;
415 line_of(carry.c_str() + start);
416 }
417 carry.erase(0, start);
418 }
419 CloseHandle(file);
420 std::vector<std::pair<std::uint64_t, std::string>> ranked;
421 for (auto& [name, u] : files) ranked.push_back({u.rss + u.swap, name});
422 std::sort(ranked.rbegin(), ranked.rend());
423 char text[256];
424 for (std::size_t i = 0; i < ranked.size() && i < 4; ++i) {
425 std::string name = ranked[i].second.empty() ? "(none)" : ranked[i].second;
426 if (name.size() > 60) name = "..." + name.substr(name.size() - 57);
427 std::snprintf(text, sizeof text, "%s%s %.0f", i ? ", " : "", name.c_str(), mib(ranked[i].first));
428 top_files += text;
429 }
430 return true;
431}
432
433// Sums the Linux-side totals the kernel keeps (/proc/<pid>/smaps_rollup), for a check of the buckets.
434inline std::string read_rollup() {
435 const std::string dir = proc_dir();
436 const std::string text = dir.empty() ? std::string() : read_small(dir + "\\smaps_rollup");
437 if (text.empty()) return "rollup: open failed";
438 std::string out = "rollup MiB:";
439 for (const char* name : {"Rss:", "Anonymous:", "Swap:", "Pss_File:", "Pss_Shmem:"}) {
440 const std::size_t at = text.find(std::string("\n") + name);
441 if (at == std::string::npos) continue;
442 const std::uint64_t kb = std::strtoull(text.c_str() + at + 1 + std::strlen(name), nullptr, 10);
443 char item[64];
444 std::snprintf(item, sizeof item, " %.*s %.0f", int(std::strlen(name) - 1), name, double(kb) / 1024.0);
445 out += item;
446 }
447 return out;
448}
449
450// What the device adds to the line: pipeline cache bytes, arena use, title memory ranges.
451struct DeviceFacts {
452 std::function<std::string()> describe; // one text fragment
453 std::function<Ranges()> title_ranges; // the title's memory
454 VkPhysicalDeviceMemoryProperties memory{};
455};
456
457inline std::string type_flags(VkMemoryPropertyFlags f) {
458 std::string s;
459 if (f & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) s += "DL";
460 if (f & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) s += s.empty() ? "HV" : "+HV";
461 if (f & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT) s += "+HC";
462 if (f & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) s += "+HCa";
463 return s.empty() ? "none" : s;
464}
465
466inline std::string wall_clock() {
467 SYSTEMTIME now{};
468 GetLocalTime(&now);
469 char text[16];
470 std::snprintf(text, sizeof text, "%02u:%02u:%02u", now.wHour, now.wMinute, now.wSecond);
471 return text;
472}
473
474inline void sample(const DeviceFacts& facts) {
475 State& s = state();
476 const double t = double(GetTickCount64() - s.started) / 1000.0;
477 std::uint64_t type_count[VK_MAX_MEMORY_TYPES] = {}, type_bytes[VK_MAX_MEMORY_TYPES] = {};
478 std::uint64_t import_count[VK_MAX_MEMORY_TYPES] = {}, import_bytes[VK_MAX_MEMORY_TYPES] = {};
479 Ranges vk_mapped;
480 std::uint64_t modules = 0, module_bytes = 0, modules_made = 0, module_bytes_made = 0;
481 std::uint64_t graphics = 0, compute = 0, graphics_made = 0, compute_made = 0, graphics_ns = 0, compute_ns = 0;
482 {
483 std::lock_guard lock(s.mutex);
484 for (const auto& [memory, a] : s.allocations) {
485 const std::uint32_t i = a.type < VK_MAX_MEMORY_TYPES ? a.type : 0;
486 if (a.imported) {
487 ++import_count[i];
488 import_bytes[i] += a.bytes;
489 } else {
490 ++type_count[i];
491 type_bytes[i] += a.bytes;
492 }
493 if (a.mapped && !a.imported) vk_mapped.push_back({a.mapped, a.mapped + a.mapped_bytes});
494 }
495 modules = s.modules.size();
496 module_bytes = s.module_bytes;
497 modules_made = s.modules_made;
498 module_bytes_made = s.module_bytes_made;
499 graphics = s.graphics_live;
500 compute = s.compute_live;
501 graphics_made = s.graphics_made;
502 compute_made = s.compute_made;
503 graphics_ns = s.graphics_ns;
504 compute_ns = s.compute_ns;
505 }
506 std::sort(vk_mapped.begin(), vk_mapped.end());
507 std::string memory_text;
508 char item[256];
509 for (std::uint32_t i = 0; i < facts.memory.memoryTypeCount && i < VK_MAX_MEMORY_TYPES; ++i) {
510 if (!type_count[i] && !import_count[i]) continue;
511 std::snprintf(item, sizeof item, " type %u %s heap %u: %llu x %.0f MiB", i,
512 type_flags(facts.memory.memoryTypes[i].propertyFlags).c_str(),
513 facts.memory.memoryTypes[i].heapIndex, (unsigned long long)type_count[i], mib(type_bytes[i]));
514 memory_text += item;
515 if (import_count[i]) {
516 std::snprintf(item, sizeof item, " (+%llu imported, %.0f MiB)", (unsigned long long)import_count[i],
517 mib(import_bytes[i]));
518 memory_text += item;
519 }
520 memory_text += ';';
521 }
522 std::fprintf(stderr,
523 "[rt] mem-probe t=%.0fs (%s): pipelines live graphics %llu compute %llu (made %llu / %llu, %.1f s / %.1f s "
524 "in vkCreate*Pipelines); shader modules live %llu, %.0f MiB SPIR-V (made %llu, %.0f MiB); "
525 "vk memory:%s %s\n",
526 t, wall_clock().c_str(), (unsigned long long)graphics, (unsigned long long)compute, (unsigned long long)graphics_made,
527 (unsigned long long)compute_made, double(graphics_ns) / 1e9, double(compute_ns) / 1e9,
528 (unsigned long long)modules, mib(module_bytes), (unsigned long long)modules_made,
529 mib(module_bytes_made), memory_text.c_str(), facts.describe ? facts.describe().c_str() : "");
530 Ranges title = facts.title_ranges ? facts.title_ranges() : Ranges{};
531 std::sort(title.begin(), title.end());
532 Usage usage[b_count];
533 std::string top_files, error;
534 const std::uint64_t t0 = now_ns();
535 if (!read_smaps(title, vk_mapped, usage, top_files, error)) {
536 std::fprintf(stderr, "[rt] mem-probe smaps t=%.0fs: %s\n", t, error.c_str());
537 return;
538 }
539 std::string text;
540 std::uint64_t rss = 0, swap = 0;
541 for (int b = 0; b < b_count; ++b) {
542 rss += usage[b].rss;
543 swap += usage[b].swap;
544 std::snprintf(item, sizeof item, " %s %.0f+%.0f (anon %.0f, %llu vmas);", bucket_name(b), mib(usage[b].rss),
545 mib(usage[b].swap), mib(usage[b].anon), (unsigned long long)usage[b].vmas);
546 text += item;
547 }
548 std::fprintf(stderr,
549 "[rt] mem-probe smaps t=%.0fs (%.0f ms): total rss %.0f + swap %.0f MiB; rss+swap per kind:%s top "
550 "files: %s; %s\n",
551 t, double(now_ns() - t0) / 1e6, mib(rss), mib(swap), text.c_str(), top_files.c_str(),
552 read_rollup().c_str());
553}
554
555// Starts the sampling thread (once). The thread runs until the process ends.
556inline void start(DeviceFacts facts) {
557 const unsigned seconds = interval_seconds();
558 if (!seconds) return;
559 static std::once_flag once;
560 std::call_once(once, [&] {
561 std::thread([facts = std::move(facts), seconds] {
562 for (;;) {
563 Sleep(seconds * 1000);
564 sample(facts);
565 }
566 }).detach();
567 });
568}
569
570} // namespace leonida::mem_probe
diff --git a/runtime/src/native_pso.h b/runtime/src/native_pso.h
new file mode 100644
index 000000000..22427d1f5
--- /dev/null
+++ b/runtime/src/native_pso.h
@@ -0,0 +1,581 @@
1#pragma once
2
3// Source: adapted from enx/leonida, commit 5c175db901f8486bcdefd03746b578b657e3151f on the original author's git
4// mirror (https://git.notrexed.dev/enx/leonida), a fork of this project. Licence: GPL-3.0-or-later as a fork of this
5// project. That server could not be reached on 2026-11-25, when this file was merged, so the source and its licence
6// could not be read there; the maintainer accepted the file because the source is a fork of this same
7// GPL-3.0-or-later project (the README links the server as the original author's mirror) and because
8// tools/native_pso_hashes.py is adapted from the same commit. Changed, as the pull request that brought it describes
9// it (the source could not be compared): the parsing is standard-library code of its own, apart from the D3D12 part
10// (runtime/shims/d3d12_xs_native_pso.h), and a stage is taken from the translator's index entry of the container
11// its records name, not from the position of its block.
12//
13// The description Xbox device slot 57 receives (native graphics pipelines) and how its stages find the game's own
14// shader containers. Standard library only, so the parsing is tested on every platform.
15//
16// Layout measured by LooperSalty on 1.0.2.1 and implemented by enx in 5c175db90: 0x108 bytes, the root
17// signature at +0x00, pairs at +0x08 and +0x18, then seven blocks {code, size, records, size} at +0x28 + k * 0x20.
18// Measured by KkelebekK: pair 0 is state blob A (380-520 bytes: blend, decode_state_a_blend; raster and
19// depth, not decoded), pair 1 is state blob B (80-188 bytes: formats and input layout, decode_state_b), and each
20// stage's records blob carries the source container's HASH digest after its 0x43 word (docs/fspx.md, kind 7).
21// The block index is not trusted as the stage: the stage comes from the translator's index entry of the container.
22
23#include <array>
24#include <cstddef>
25#include <cstdint>
26#include <cstring>
27#include <map>
28#include <optional>
29#include <span>
30#include <set>
31#include <string>
32#include <string_view>
33#include <utility>
34#include <vector>
35
36namespace leonida::native_pso {
37
38struct Pair {
39 const void* data;
40 std::uint64_t size;
41};
42
43struct StageBlock {
44 Pair code; // +0x00: the stage's native program
45 Pair records; // +0x10: kind-7 style records holding the container's HASH digest
46};
47
48inline constexpr std::size_t kStageBlocks = 7;
49
50struct GraphicsDesc {
51 const void* root_signature; // +0x00
52 Pair state_a; // +0x08
53 Pair state_b; // +0x18
54 StageBlock stages[kStageBlocks]; // +0x28
55};
56
57static_assert(sizeof(Pair) == 0x10 && sizeof(StageBlock) == 0x20, "pairs are {pointer, u64 size}");
58static_assert(offsetof(GraphicsDesc, state_a) == 0x08 && offsetof(GraphicsDesc, state_b) == 0x18);
59static_assert(offsetof(GraphicsDesc, stages) == 0x28 && sizeof(GraphicsDesc) == 0x108,
60 "the slot-57 description has a 0x108-byte prefix");
61
62// Far above the largest blob measured (a few KiB), and small enough for 32-bit offsets inside one.
63inline constexpr std::uint64_t kPairLimit = 16u << 20;
64
65// The size, not the pointer, determines whether a pair is absent.
66enum class PairState { absent, present, malformed };
67
68// A table entry with size 0 is absent whatever its pointer (the title passes base + offset, measured on 1.0.2.1).
69inline PairState pair_state(const Pair& p) {
70 if (!p.size) return PairState::absent;
71 if (!p.data || p.size > kPairLimit) return PairState::malformed;
72 return PairState::present;
73}
74
75inline std::span<const std::uint8_t> bytes(const Pair& p) {
76 if (pair_state(p) != PairState::present) return {};
77 return {static_cast<const std::uint8_t*>(p.data), static_cast<std::size_t>(p.size)};
78}
79
80inline std::uint32_t read_u32(std::span<const std::uint8_t> b, std::size_t at) {
81 std::uint32_t v = 0;
82 if (at + 4 <= b.size()) std::memcpy(&v, b.data() + at, 4);
83 return v;
84}
85
86struct InputElement {
87 std::string name;
88 std::uint32_t semantic_index = 0;
89 std::uint32_t format = 0;
90 std::uint32_t input_slot = 0;
91 std::uint32_t aligned_byte_offset = 0;
92 std::uint32_t classification = 0;
93 std::uint32_t step_rate = 0;
94};
95
96// The colour-target registers of state blob A (RT-SLOT57-BLEND-STATE, docs/fspx.md "State blob A"): CB_TARGET_MASK
97// and CB_BLEND0..7_CONTROL as the console's driver serialized them, in the RDNA2 register layout.
98struct BlendRegisters {
99 std::uint32_t target_mask = 0; // CB_TARGET_MASK: four component bits (R, G, B, A) per target
100 std::array<std::uint32_t, 8> blend{}; // CB_BLENDn_CONTROL
101};
102
103// The depth, stencil and raster registers of state blob A (RT-SLOT57-DEPTH-RASTER, docs/fspx.md "State blob A").
104struct DepthRasterRegisters {
105 std::uint32_t clip_cntl = 0; // PA_CL_CLIP_CNTL
106 std::uint32_t mode_cntl = 0; // PA_SU_SC_MODE_CNTL
107 std::uint32_t depth_control = 0; // DB_DEPTH_CONTROL
108 std::uint32_t stencil_control = 0; // DB_STENCIL_CONTROL
109 std::uint32_t stencil_ref_mask = 0; // DB_STENCILREFMASK
110 std::uint32_t stencil_ref_mask_bf = 0; // DB_STENCILREFMASK_BF
111};
112
113// State blob B. The u32 field widths after each name are a hypothesis that fits the
114// measured sizes: 0x50 bytes with no element, and 188 bytes with POSITION, COLOR and TEXCOORD.
115struct FixedState {
116 std::optional<BlendRegisters> blend; // from blob A; empty when blob A is absent or not the measured shape
117 std::optional<DepthRasterRegisters> depth_raster; // from blob A, likewise
118 std::array<std::uint8_t, 8> rtv_formats{}; // +0x10, DXGI_FORMAT values
119 std::uint32_t sample_mask = 0; // +0x1c
120 std::uint8_t dsv_format = 0; // +0x24
121 std::uint8_t rt_count = 0; // +0x25
122 std::uint8_t topology_type = 0; // +0x26, low nibble
123 std::uint8_t sample_count = 1; // +0x28
124 std::vector<InputElement> elements; // count at +0x4c, packed from +0x50
125};
126
127inline constexpr std::size_t kStateBHeader = 0x50;
128inline constexpr std::uint32_t kMaxInputElements = 32; // D3D12_IA_VERTEX_INPUT_STRUCTURE_ELEMENT_COUNT
129inline constexpr std::uint32_t kMaxSemanticName = 256;
130
131// Empty for a blob that is too short, names more than 8 targets, a topology type past PATCH (4), or an element
132// list that runs past the blob or has a malformed name. Bytes after the last element are allowed.
133inline std::optional<FixedState> decode_state_b(std::span<const std::uint8_t> b, const char** why = nullptr) {
134 const auto fail = [&](const char* reason) {
135 if (why) *why = reason;
136 return std::nullopt;
137 };
138 if (b.size() < kStateBHeader) return fail("blob B shorter than its header");
139 FixedState s;
140 std::memcpy(s.rtv_formats.data(), b.data() + 0x10, 8);
141 s.sample_mask = read_u32(b, 0x1c);
142 s.dsv_format = b[0x24];
143 s.rt_count = b[0x25];
144 s.topology_type = b[0x26] & 0x0f;
145 s.sample_count = b[0x28] ? b[0x28] : 1;
146 if (s.rt_count > 8) return fail("blob B render target count over 8");
147 if (s.topology_type > 4) return fail("blob B topology type over 4");
148 const std::uint32_t count = read_u32(b, 0x4c);
149 if (count > kMaxInputElements) return fail("blob B input element count over 32");
150 std::size_t at = kStateBHeader;
151 for (std::uint32_t i = 0; i < count; ++i) {
152 if (at + 4 > b.size()) return fail("blob B input element past the end");
153 const std::uint32_t length = read_u32(b, at);
154 at += 4;
155 if (length < 2 || length > kMaxSemanticName || at + length + 24 > b.size())
156 return fail("blob B semantic name length out of range");
157 const auto* name = reinterpret_cast<const char*>(b.data() + at);
158 if (name[length - 1] != '\0' || std::memchr(name, '\0', length - 1))
159 return fail("blob B semantic name not one NUL-terminated string");
160 InputElement e;
161 e.name.assign(name, length - 1);
162 at += length;
163 e.semantic_index = read_u32(b, at);
164 e.format = read_u32(b, at + 4);
165 e.input_slot = read_u32(b, at + 8);
166 e.aligned_byte_offset = read_u32(b, at + 12);
167 e.classification = read_u32(b, at + 16);
168 e.step_rate = read_u32(b, at + 20);
169 at += 24;
170 s.elements.push_back(std::move(e));
171 }
172 return s;
173}
174
175// State blob A, measured on 1.0.2.1 over all 5,680 distinct blobs (25,471 graphics records, docs/fspx.md "State blob
176// A"): 380 + 8k bytes (k = 0..5) for vertex-shader pipelines and 464 + 8k (k = 0..7) for mesh pipelines, whose stage
177// block is 84 bytes longer, so every offset after +0x28 moves by 84 there. Word 0 is 0x4005d800 with bits 3 and 4
178// free. CB_TARGET_MASK is at +0x78 and CB_BLEND0..7_CONTROL at +0xd0..+0xec (vertex-pipeline offsets). Any other
179// shape is not decoded: the caller keeps its defaults.
180inline constexpr std::uint32_t kStateATag = 0x4005d800;
181inline constexpr std::size_t kStateATargetMask = 0x78, kStateABlend = 0xd0, kStateAMeshShift = 84;
182inline constexpr std::size_t kStateAClip = 0x9c, kStateAMode = 0xa0, kStateADepth = 0xb8, kStateAStencil = 0xbc,
183 kStateARefMask = 0xc0, kStateARefMaskBf = 0xc4;
184
185// The offset shift of a measured blob A shape (0 for vertex pipelines, 84 for mesh ones), or empty.
186inline std::optional<std::size_t> state_a_shift(std::span<const std::uint8_t> a, const char** why) {
187 const auto fail = [&](const char* reason) {
188 if (why) *why = reason;
189 return std::nullopt;
190 };
191 const std::size_t n = a.size();
192 std::size_t shift = 0;
193 if (n >= 380 && n <= 420 && (n - 380) % 8 == 0) shift = 0;
194 else if (n >= 464 && n <= 520 && (n - 464) % 8 == 0) shift = kStateAMeshShift;
195 else return fail("blob A size not one of the measured shapes");
196 if ((read_u32(a, 0) & ~0x18u) != kStateATag) return fail("blob A tag not 0x4005d800");
197 return shift;
198}
199
200inline std::optional<BlendRegisters> decode_state_a_blend(std::span<const std::uint8_t> a, const char** why = nullptr) {
201 const auto shift = state_a_shift(a, why);
202 if (!shift) return std::nullopt;
203 BlendRegisters r;
204 r.target_mask = read_u32(a, kStateATargetMask + *shift);
205 for (std::size_t i = 0; i < r.blend.size(); ++i) r.blend[i] = read_u32(a, kStateABlend + *shift + 4 * i);
206 return r;
207}
208
209// PA_CL_CLIP_CNTL at +0x9c, PA_SU_SC_MODE_CNTL at +0xa0, DB_DEPTH_CONTROL at +0xb8, DB_STENCIL_CONTROL at +0xbc and
210// DB_STENCILREFMASK(_BF) at +0xc0/+0xc4 (vertex-pipeline offsets), measured as for the blend registers.
211inline std::optional<DepthRasterRegisters> decode_state_a_depth_raster(std::span<const std::uint8_t> a,
212 const char** why = nullptr) {
213 const auto shift = state_a_shift(a, why);
214 if (!shift) return std::nullopt;
215 DepthRasterRegisters r;
216 r.clip_cntl = read_u32(a, kStateAClip + *shift);
217 r.mode_cntl = read_u32(a, kStateAMode + *shift);
218 r.depth_control = read_u32(a, kStateADepth + *shift);
219 r.stencil_control = read_u32(a, kStateAStencil + *shift);
220 r.stencil_ref_mask = read_u32(a, kStateARefMask + *shift);
221 r.stencil_ref_mask_bf = read_u32(a, kStateARefMaskBf + *shift);
222 return r;
223}
224
225// One target's blend state in D3D12 terms, with D3D12_BLEND and D3D12_BLEND_OP values (d3d12.h) so this header
226// stays standard-library only.
227struct TargetBlend {
228 bool enable = false;
229 std::uint8_t src = 2, dst = 1, op = 1; // D3D12_BLEND_ONE, D3D12_BLEND_ZERO, D3D12_BLEND_OP_ADD
230 std::uint8_t src_alpha = 2, dst_alpha = 1, op_alpha = 1;
231 std::uint8_t write_mask = 0xf; // D3D12_COLOR_WRITE_ENABLE_*: R 1, G 2, B 4, A 8
232};
233
234// An RDNA2 blend factor (V_028780_BLEND_*, the gfx10 register header) as a D3D12_BLEND, or 0 for one this path does
235// not take: BOTH_(INV_)SRC_ALPHA (11, 12; not on gfx10). The dual-source SRC1 factors (15 to 18) read the pixel
236// shader's SV_Target1, which the Vulkan layer moves to Location 0, Index 1 (RT-DUAL-SOURCE-BLEND). For an alpha
237// factor, a colour factor names its alpha.
238inline std::uint8_t d3d12_blend_factor(std::uint32_t f, bool alpha) {
239 static constexpr std::uint8_t colour[21] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 0, 0, 14, 15, 16, 17, 18, 19, 20, 21};
240 if (f >= std::size(colour)) return 0;
241 if (alpha) {
242 switch (f) {
243 case 2: return 5; // SRC_COLOR -> SRC_ALPHA
244 case 3: return 6; // ONE_MINUS_SRC_COLOR -> INV_SRC_ALPHA
245 case 8: return 7; // DST_COLOR -> DEST_ALPHA
246 case 9: return 8; // ONE_MINUS_DST_COLOR -> INV_DEST_ALPHA
247 case 15: return 18; // SRC1_COLOR -> SRC1_ALPHA
248 case 16: return 19; // INV_SRC1_COLOR -> INV_SRC1_ALPHA
249 default: break;
250 }
251 }
252 return colour[f];
253}
254
255// An RDNA2 COMB_FCN as a D3D12_BLEND_OP, or 0: DST_PLUS_SRC ADD, SRC_MINUS_DST SUBTRACT, MIN, MAX, DST_MINUS_SRC
256// REV_SUBTRACT.
257inline std::uint8_t d3d12_blend_op(std::uint32_t c) {
258 static constexpr std::uint8_t op[5] = {1, 2, 4, 5, 3};
259 return c < std::size(op) ? op[c] : 0;
260}
261
262// CB_BLENDn_CONTROL: COLOR_SRCBLEND [4:0], COLOR_COMB_FCN [7:5], COLOR_DESTBLEND [12:8], ALPHA_SRCBLEND [20:16],
263// ALPHA_COMB_FCN [23:21], ALPHA_DESTBLEND [28:24], SEPARATE_ALPHA_BLEND [29], ENABLE [30], DISABLE_ROP3 [31]. Without
264// SEPARATE_ALPHA_BLEND the alpha channel takes the colour fields. Empty for an enabled target this path cannot express.
265inline std::optional<TargetBlend> d3d12_target_blend(std::uint32_t cb_blend, std::uint32_t write_mask) {
266 TargetBlend t;
267 t.write_mask = static_cast<std::uint8_t>(write_mask & 0xf);
268 if (!(cb_blend >> 30 & 1)) return t;
269 const bool separate = cb_blend >> 29 & 1;
270 const std::uint32_t cs = cb_blend & 31, cf = cb_blend >> 5 & 7, cd = cb_blend >> 8 & 31;
271 const std::uint32_t as = separate ? cb_blend >> 16 & 31 : cs, af = separate ? cb_blend >> 21 & 7 : cf,
272 ad = separate ? cb_blend >> 24 & 31 : cd;
273 t.enable = true;
274 t.src = d3d12_blend_factor(cs, false);
275 t.dst = d3d12_blend_factor(cd, false);
276 t.op = d3d12_blend_op(cf);
277 t.src_alpha = d3d12_blend_factor(as, true);
278 t.dst_alpha = d3d12_blend_factor(ad, true);
279 t.op_alpha = d3d12_blend_op(af);
280 if (!t.src || !t.dst || !t.op || !t.src_alpha || !t.dst_alpha || !t.op_alpha) return std::nullopt;
281 return t;
282}
283
284// A DXGI_FORMAT with UINT or SINT channels. The colour block does not blend those (RDNA2 bypasses blending for integer
285// targets), and D3D12 refuses a PSO that enables blending on one.
286inline bool dxgi_integer_format(std::uint32_t f) {
287 switch (f) {
288 case 3: case 4: case 7: case 8: case 12: case 14: case 17: case 18: case 25: case 30: case 32: case 36:
289 case 38: case 42: case 43: case 50: case 52: case 57: case 59: case 62: case 64:
290 return true;
291 default:
292 return false;
293 }
294}
295
296// The targets 0..count-1 of `r` in D3D12 terms, or empty when one of them cannot be expressed: the pipeline then keeps
297// the defaults (blending off, every component written) for all of its targets, as before blob A was read. A target
298// with an integer format (`formats`, DXGI values) keeps its write mask and has blending off, as on the console.
299inline std::optional<std::array<TargetBlend, 8>> d3d12_blend(const BlendRegisters& r, unsigned count,
300 const std::array<std::uint8_t, 8>& formats = {}) {
301 std::array<TargetBlend, 8> out{};
302 for (unsigned i = 0; i < count && i < out.size(); ++i) {
303 const std::uint32_t mask = r.target_mask >> (4 * i);
304 const auto t = dxgi_integer_format(formats[i]) ? d3d12_target_blend(r.blend[i] & ~(1u << 30), mask)
305 : d3d12_target_blend(r.blend[i], mask);
306 if (!t) return std::nullopt;
307 out[i] = *t;
308 }
309 return out;
310}
311
312// The depth, stencil and raster state in D3D12 terms, with D3D12_COMPARISON_FUNC, D3D12_STENCIL_OP and D3D12_CULL_MODE
313// values (d3d12.h). The defaults are the factory's state before blob A was read.
314struct StencilFace {
315 std::uint8_t fail = 1, depth_fail = 1, pass = 1; // D3D12_STENCIL_OP_KEEP
316 std::uint8_t func = 8; // D3D12_COMPARISON_FUNC_ALWAYS
317};
318struct DepthRaster {
319 bool depth_enable = true; // the factory also turns it off without a DSV
320 bool depth_write = true; // D3D12_DEPTH_WRITE_MASK_ALL
321 std::uint8_t depth_func = 8; // D3D12_COMPARISON_FUNC_ALWAYS
322 bool stencil_enable = false;
323 std::uint8_t read_mask = 0xff, write_mask = 0xff;
324 StencilFace front, back;
325 std::uint8_t cull = 1; // D3D12_CULL_MODE_NONE
326 bool front_ccw = false;
327 bool depth_clip = true;
328};
329
330// An RDNA2 stencil op (V_02842C_STENCIL_*) as a D3D12_STENCIL_OP, or 0. The adding and subtracting ops take
331// STENCILOPVAL as their operand, so they are INCR/DECR only with an operand of 1 (all 6,213 stencil records measured);
332// REPLACE_TEST writes the reference value as D3D12's REPLACE does. ONES, REPLACE_OP and the logic ops have no D3D12 op.
333inline std::uint8_t d3d12_stencil_op(std::uint32_t op, std::uint32_t operand) {
334 switch (op) {
335 case 0: return 1; // KEEP
336 case 1: return 2; // ZERO
337 case 3: return 3; // REPLACE_TEST -> REPLACE
338 case 5: return operand == 1 ? 4 : 0; // ADD_CLAMP -> INCR_SAT
339 case 6: return operand == 1 ? 5 : 0; // SUB_CLAMP -> DECR_SAT
340 case 7: return 6; // INVERT
341 case 8: return operand == 1 ? 7 : 0; // ADD_WRAP -> INCR
342 case 9: return operand == 1 ? 8 : 0; // SUB_WRAP -> DECR
343 default: return 0;
344 }
345}
346
347// Empty for a state D3D12 cannot express here: clip space other than D3D's, only one of the near/far z clips off,
348// a polygon mode, culling both faces, depth bounds, the colour-write-on-depth flags, a stencil op without a D3D12 op,
349// or front and back stencil masks that differ (D3D12_DEPTH_STENCIL_DESC has one pair).
350// PA_CL_CLIP_CNTL: DX_CLIP_SPACE_DEF [19], ZCLIP_NEAR_DISABLE [26], ZCLIP_FAR_DISABLE [27].
351// PA_SU_SC_MODE_CNTL: CULL_FRONT [0], CULL_BACK [1], FACE [2] (1: clockwise is front), POLY_MODE [4:3].
352// DB_DEPTH_CONTROL: STENCIL_ENABLE [0], Z_ENABLE [1], Z_WRITE_ENABLE [2], DEPTH_BOUNDS_ENABLE [3], ZFUNC [6:4],
353// BACKFACE_ENABLE [7], STENCILFUNC [10:8], STENCILFUNC_BF [22:20], bits 30 and 31 the colour-write flags.
354// DB_STENCIL_CONTROL: STENCILFAIL [3:0], STENCILZPASS [7:4], STENCILZFAIL [11:8], and the _BF ones at +12.
355// DB_STENCILREFMASK: STENCILMASK [15:8], STENCILWRITEMASK [23:16], STENCILOPVAL [31:24].
356// RDNA2 compare functions run NEVER..ALWAYS as 0..7, D3D12's as 1..8.
357inline std::optional<DepthRaster> d3d12_depth_raster(const DepthRasterRegisters& r) {
358 DepthRaster s;
359 const std::uint32_t clip = r.clip_cntl, mode = r.mode_cntl, d = r.depth_control;
360 if (!(clip >> 19 & 1) || (clip >> 26 & 1) != (clip >> 27 & 1)) return std::nullopt;
361 s.depth_clip = !(clip >> 26 & 1);
362 if (mode >> 3 & 3 || (mode & 3) == 3) return std::nullopt;
363 s.cull = (mode & 1) ? 2 : (mode & 2) ? 3 : 1; // FRONT, BACK, NONE
364 s.front_ccw = !(mode >> 2 & 1);
365 if (d >> 3 & 1 || d >> 30) return std::nullopt;
366 s.depth_enable = d >> 1 & 1;
367 s.depth_write = d >> 2 & 1;
368 s.depth_func = static_cast<std::uint8_t>((d >> 4 & 7) + 1);
369 s.stencil_enable = d & 1;
370 if (!s.stencil_enable) return s;
371 if ((r.stencil_ref_mask & 0x00ffff00) != (r.stencil_ref_mask_bf & 0x00ffff00)) return std::nullopt;
372 s.read_mask = static_cast<std::uint8_t>(r.stencil_ref_mask >> 8);
373 s.write_mask = static_cast<std::uint8_t>(r.stencil_ref_mask >> 16);
374 const auto face = [&](std::uint32_t ops, std::uint32_t func, std::uint32_t operand) -> std::optional<StencilFace> {
375 StencilFace f;
376 f.fail = d3d12_stencil_op(ops & 15, operand);
377 f.pass = d3d12_stencil_op(ops >> 4 & 15, operand);
378 f.depth_fail = d3d12_stencil_op(ops >> 8 & 15, operand);
379 f.func = static_cast<std::uint8_t>(func + 1);
380 if (!f.fail || !f.pass || !f.depth_fail) return std::nullopt;
381 return f;
382 };
383 const auto front = face(r.stencil_control, d >> 8 & 7, r.stencil_ref_mask >> 24);
384 const auto back = (d >> 7 & 1) ? face(r.stencil_control >> 12, d >> 20 & 7, r.stencil_ref_mask_bf >> 24) : front;
385 if (!front || !back) return std::nullopt;
386 s.front = *front;
387 s.back = *back;
388 return s;
389}
390
391using Digest = std::array<std::uint8_t, 16>;
392
393// Every 16 bytes that follow a 4-aligned 0x43 word, without duplicates. A register number can also read 0x43, so
394// all candidates are returned and the map decides which one names a container.
395inline std::vector<Digest> record_digests(std::span<const std::uint8_t> records) {
396 std::vector<Digest> out;
397 std::set<Digest> seen;
398 for (std::size_t at = 0; at + 4 + 16 <= records.size(); at += 4) {
399 if (read_u32(records, at) != 0x43) continue;
400 Digest d;
401 std::memcpy(d.data(), records.data() + at + 4, 16);
402 if (seen.insert(d).second) out.push_back(d);
403 }
404 return out;
405}
406
407inline std::string hex(const Digest& d) {
408 static constexpr char kHex[] = "0123456789abcdef";
409 std::string s;
410 for (const std::uint8_t b : d) {
411 s += kHex[b >> 4];
412 s += kHex[b & 15];
413 }
414 return s;
415}
416
417inline std::optional<Digest> parse_digest(std::string_view text) {
418 if (text.size() != 32) return std::nullopt;
419 Digest d{};
420 for (std::size_t i = 0; i < 32; ++i) {
421 const char c = text[i];
422 int v = c >= '0' && c <= '9' ? c - '0' : c >= 'a' && c <= 'f' ? c - 'a' + 10 : -1;
423 if (v < 0) return std::nullopt;
424 d[i / 2] = static_cast<std::uint8_t>(d[i / 2] << 4 | v);
425 }
426 return d;
427}
428
429struct ShaderRef {
430 Digest digest;
431 std::string stage; // the translator's stage: "vs", "ps", "gs", "ms", "cs"
432 std::string path; // the container, relative to the map file's folder, '/' separated
433};
434
435// native_hashes.txt, written by tools/native_pso_hashes.py next to the translator's index.json: a first line
436// "# native_pso_hashes 1", then one "<32 hex digest>\t<stage>\t<relative container path>" line per digest.
437class HashMap {
438public:
439 static constexpr std::string_view kHeader = "# native_pso_hashes 1";
440
441 bool parse(std::string_view text, std::string* error = nullptr) {
442 const auto fail = [&](std::string why) {
443 if (error) *error = std::move(why);
444 map_.clear();
445 return false;
446 };
447 map_.clear();
448 std::size_t line_no = 0;
449 bool header = false;
450 while (!text.empty()) {
451 const std::size_t end = text.find('\n');
452 std::string_view line = text.substr(0, end);
453 text = end == std::string_view::npos ? std::string_view{} : text.substr(end + 1);
454 ++line_no;
455 if (!line.empty() && line.back() == '\r') line.remove_suffix(1);
456 if (line_no == 1) {
457 if (line != kHeader) return fail("native_hashes.txt: unknown header");
458 header = true;
459 continue;
460 }
461 if (line.empty() || line.front() == '#') continue;
462 const std::size_t t1 = line.find('\t');
463 const std::size_t t2 = t1 == std::string_view::npos ? t1 : line.find('\t', t1 + 1);
464 if (t2 == std::string_view::npos || t2 + 1 >= line.size())
465 return fail("native_hashes.txt line " + std::to_string(line_no) + ": expected three fields");
466 const auto digest = parse_digest(line.substr(0, t1));
467 const std::string_view stage = line.substr(t1 + 1, t2 - t1 - 1);
468 if (!digest || stage.empty())
469 return fail("native_hashes.txt line " + std::to_string(line_no) + ": bad digest or stage");
470 const std::string_view path = line.substr(t2 + 1);
471 const auto [it, inserted] = map_.try_emplace(*digest, ShaderRef{*digest, std::string(stage), std::string(path)});
472 if (!inserted && (it->second.stage != stage || it->second.path != path))
473 return fail("native_hashes.txt line " + std::to_string(line_no) + ": conflicting digest");
474 }
475 if (!header) return fail("native_hashes.txt is empty");
476 return true;
477 }
478
479 const ShaderRef* find(const Digest& d) const {
480 const auto it = map_.find(d);
481 return it == map_.end() ? nullptr : &it->second;
482 }
483
484 std::size_t size() const { return map_.size(); }
485
486private:
487 std::map<Digest, ShaderRef> map_;
488};
489
490struct PlannedStage {
491 std::size_t block = 0;
492 const ShaderRef* shader = nullptr;
493};
494
495enum class PlanStatus {
496 ok,
497 malformed, // a pair is malformed or blob B does not decode
498 missing, // a stage has no records, or its digest names no translated container
499 ambiguous, // a stage's records name two different containers
500 unsupported, // a stage kind this path does not build (hs, ds, cs), two of one kind, or no VS/MS
501};
502
503struct Plan {
504 PlanStatus status = PlanStatus::malformed;
505 FixedState state;
506 std::vector<PlannedStage> stages; // in block order
507 std::size_t failed_block = 0; // for missing/ambiguous/unsupported/malformed blocks
508 const char* reason = ""; // why a description is malformed
509 bool mesh = false; // an MS stage: the pipeline goes through a pipeline state stream
510
511 const ShaderRef* stage(std::string_view name) const {
512 for (const PlannedStage& s : stages)
513 if (s.shader->stage == name) return s.shader;
514 return nullptr;
515 }
516};
517
518inline Plan plan(const GraphicsDesc& desc, const HashMap& map) {
519 Plan p;
520 if (pair_state(desc.state_a) == PairState::malformed) {
521 p.reason = "blob A pair malformed";
522 return p;
523 }
524 if (pair_state(desc.state_b) != PairState::present) {
525 p.reason = "blob B pair absent or malformed";
526 return p;
527 }
528 auto state = decode_state_b(bytes(desc.state_b), &p.reason);
529 if (!state) return p;
530 p.state = std::move(*state);
531 if (pair_state(desc.state_a) == PairState::present) {
532 p.state.blend = decode_state_a_blend(bytes(desc.state_a));
533 p.state.depth_raster = decode_state_a_depth_raster(bytes(desc.state_a));
534 }
535 for (std::size_t k = 0; k < kStageBlocks; ++k) {
536 const StageBlock& block = desc.stages[k];
537 const PairState code = pair_state(block.code), records = pair_state(block.records);
538 p.failed_block = k;
539 if (code == PairState::malformed || records == PairState::malformed) {
540 p.reason = "a stage pair malformed";
541 return p;
542 }
543 if (code == PairState::absent && records == PairState::absent) continue;
544 if (records != PairState::present) { // code without records: nothing names its container
545 p.status = PlanStatus::missing;
546 return p;
547 }
548 const ShaderRef* found = nullptr;
549 for (const Digest& d : record_digests(bytes(block.records))) {
550 const ShaderRef* ref = map.find(d);
551 if (!ref) continue;
552 if (found && found != ref) {
553 p.status = PlanStatus::ambiguous;
554 p.failed_block = k;
555 return p;
556 }
557 found = ref;
558 }
559 p.failed_block = k;
560 if (!found) {
561 p.status = PlanStatus::missing;
562 return p;
563 }
564 const std::string& s = found->stage;
565 if (!(s == "vs" || s == "ps" || s == "gs" || s == "ms") || p.stage(s)) {
566 p.status = PlanStatus::unsupported;
567 return p;
568 }
569 p.stages.push_back({k, found});
570 }
571 const bool vs = p.stage("vs"), ms = p.stage("ms");
572 if (vs == ms || (ms && p.stage("gs"))) {
573 p.status = PlanStatus::unsupported;
574 return p;
575 }
576 p.mesh = ms;
577 p.status = PlanStatus::ok;
578 return p;
579}
580
581} // namespace leonida::native_pso
diff --git a/runtime/src/pe_loader.cpp b/runtime/src/pe_loader.cpp
index cc4ae88aa..3558cffb5 100644
--- a/runtime/src/pe_loader.cpp
+++ b/runtime/src/pe_loader.cpp
@@ -19,6 +19,8 @@
19#include "../shims/shims.h" 19#include "../shims/shims.h"
20#include "../shims/startup_trace.h" 20#include "../shims/startup_trace.h"
21#include "base_reservation.h" 21#include "base_reservation.h"
22#include "clzero_patch.h"
23#include "cpu_emulation.h"
22 24
23namespace rt { 25namespace rt {
24 26
@@ -126,8 +128,29 @@ IMAGE_TLS_DIRECTORY64* tls_directory(Module& m) {
126// reuses that index for the mapped image. When more than one manually mapped module uses static TLS at once, the loader 128// reuses that index for the mapped image. When more than one manually mapped module uses static TLS at once, the loader
127// clones gta6rt_tls_host.dll to a per-process temporary path on demand and loads it, so the OS assigns an independent 129// clones gta6rt_tls_host.dll to a per-process temporary path on demand and loads it, so the OS assigns an independent
128// module TLS index for each simultaneous module (up to kMaxMappedTlsModules). 130// module TLS index for each simultaneous module (up to kMaxMappedTlsModules).
131//
132// A mapped executable is different: MSVC code built with /GA (an EXE-only optimisation) skips _tls_index and reads
133// TEB->ThreadLocalStoragePointer[0] directly (mov rax, gs:[58h]; mov rax, [rax]), because Windows always gives the
134// process executable module TLS index 0. Measured with a `thread_local int v = 42;` EXE built /O2 /GA /MD: natively
135// tls_index=0 value=42; mapped with a helper index (6) the code still read slot 0 and printed value=0. Index 0
136// belongs to the runtime's own EXE (gta6rt.exe: a 1398-byte template when measured, no TLS callbacks; so does each
137// test EXE that links this file), and every TLS read in its disassembly goes through _tls_index (the only direct
138// gs:[58h] read is module_tls_slots below, which wants the array itself). reserve_tls_index0 therefore moves the owner
139// off index 0, once, at process start: it loads the home clone (make_home_clone_image), whose TLS template is a copy of
140// the owner's, and on the calling thread swaps slots 0 and home and writes home into the owner's _tls_index. From then on every thread the OS
141// starts has a fresh copy of the owner's template at home, which is where the owner looks, from its first instruction:
142// nothing has to run on a new thread first. Slot 0 holds a block nobody reads, which the mapped executable's copy
143// replaces (kMainImageSlot) exactly as a DLL's copy replaces a helper's, and the OS frees both slots at thread exit.
144// It has to happen before any other thread has run the owner's code: MSVC keeps &ThreadLocalStoragePointer[_tls_index]
145// across calls (zlib_inflate in shader_library.h saves it at [rbp-80h] across memset, push_back and inflate_codes, then
146// reads _Init_thread_epoch through it), so a running thread cannot be moved safely, wherever it is stopped. Such a
147// thread's TLS would also stay where it was, at index 0.
129constexpr DWORD kMaxModuleTlsSlots = 64; 148constexpr DWORD kMaxModuleTlsSlots = 64;
130constexpr size_t kMaxMappedTlsModules = 16; 149constexpr size_t kMaxMappedTlsModules = 16;
150// The slot for a mapped executable, which reads module TLS index 0 (see above). Only one at a time; a second
151// executable mapped while one is live gets an ordinary helper slot. kTlsSlotCount sizes the per-slot tables.
152constexpr size_t kMainImageSlot = kMaxMappedTlsModules;
153constexpr size_t kTlsSlotCount = kMaxMappedTlsModules + 1;
131void** module_tls_slots() { return reinterpret_cast<void**>(__readgsqword(0x58)); } 154void** module_tls_slots() { return reinterpret_cast<void**>(__readgsqword(0x58)); }
132 155
133void __cdecl on_host_thread_event(DWORD reason); 156void __cdecl on_host_thread_event(DWORD reason);
@@ -135,6 +158,7 @@ void __cdecl on_host_thread_event(DWORD reason);
135struct TlsHostModule { 158struct TlsHostModule {
136 HMODULE module = nullptr; 159 HMODULE module = nullptr;
137 DWORD index = TLS_OUT_OF_INDEXES; 160 DWORD index = TLS_OUT_OF_INDEXES;
161 bool hooked = false; // its DllMain reports thread events to on_host_thread_event
138}; 162};
139 163
140std::filesystem::path tls_host_base_path() { 164std::filesystem::path tls_host_base_path() {
@@ -167,20 +191,39 @@ struct TlsCloneRecord {
167 191
168std::mutex g_tls_alloc_mutex; 192std::mutex g_tls_alloc_mutex;
169std::array<TlsHostModule, kMaxMappedTlsModules> g_tls_hosts{}; 193std::array<TlsHostModule, kMaxMappedTlsModules> g_tls_hosts{};
170std::array<std::atomic<Module*>, kMaxMappedTlsModules> g_tls_slot_owners{}; 194std::array<std::atomic<Module*>, kTlsSlotCount> g_tls_slot_owners{};
171std::array<std::atomic<uint64_t>, kMaxMappedTlsModules> g_tls_slot_generations{}; 195std::array<std::atomic<uint64_t>, kTlsSlotCount> g_tls_slot_generations{};
172std::atomic<uint64_t> g_next_tls_generation{1}; 196std::atomic<uint64_t> g_next_tls_generation{1};
173std::vector<TlsCloneRecord> g_tls_clones; 197// Allocated with the first clone and never destroyed: cleanup_tls_clones_at_exit runs from the atexit table, and a
198// static vector's destructor (registered when its dynamic initializer ran) could run before it. Under
199// g_tls_alloc_mutex, as are its records.
200std::vector<TlsCloneRecord>* g_tls_clones = nullptr;
201
202// The move of module TLS index 0 (see kMainImageSlot): done at most once, by reserve_tls_index0 under
203// g_tls_alloc_mutex. `why` is the reason it was not done, for the executable that then maps with a helper index.
204// Constant-initialized only (no std::string): gta6rt reserves from a CRT initializer that runs before the dynamic
205// initializers of this file, which would otherwise reset what it wrote.
206struct Index0Move {
207 bool moved = false;
208 bool traced = false; // the startup trace opens after the move; the first executable map reports it
209 TlsHostModule home; // the clone whose index holds the owner's TLS from now on; never freed
210 char owner[260] = {}; // UTF-8 file name of the image that held index 0
211 char why[160] = "reserve_tls_index0 was not called at process start";
212};
213Index0Move g_index0;
174 214
175// Frees every TLS helper clone this process loaded and deletes its files. load() registers the wrapper with atexit; 215// Frees every TLS helper clone recorded for a mapped DLL's slot and deletes its files. ensure_tls_host registers the
176// the --run path in main() must also call this directly before ExitProcess, which skips the atexit table. Call it 216// wrapper with atexit when it records the first clone; the --run path in main() must also call this directly before
177// only when no mapped code can run again: it unmaps the helper images. 217// ExitProcess, which skips the atexit table. Call it only when no mapped code can run again: it unmaps the helper
218// images. The home clone is not recorded (reserve_index0): it stays loaded, so its file outlives the process and the
219// next run's sweep deletes it.
178void cleanup_tls_clones_internal() { 220void cleanup_tls_clones_internal() {
179 for (const auto& rec : g_tls_clones) { 221 if (!g_tls_clones) return;
222 for (const auto& rec : *g_tls_clones) {
180 if (rec.module) FreeLibrary(rec.module); 223 if (rec.module) FreeLibrary(rec.module);
181 if (!rec.path.empty()) DeleteFileW(rec.path.c_str()); 224 if (!rec.path.empty()) DeleteFileW(rec.path.c_str());
182 } 225 }
183 g_tls_clones.clear(); 226 g_tls_clones->clear();
184} 227}
185 228
186void cleanup_tls_clones_at_exit() { cleanup_tls_clones_internal(); } 229void cleanup_tls_clones_at_exit() { cleanup_tls_clones_internal(); }
@@ -204,10 +247,14 @@ DWORD clone_owner_pid(const wchar_t* name) {
204bool process_alive(DWORD pid) { 247bool process_alive(DWORD pid) {
205 // PROCESS_QUERY_LIMITED_INFORMATION needs no handle rights a normal process could deny; a failure means the 248 // PROCESS_QUERY_LIMITED_INFORMATION needs no handle rights a normal process could deny; a failure means the
206 // process is gone. A still-mapped or still-open file is caught by the checks below even for a misjudged PID. 249 // process is gone. A still-mapped or still-open file is caught by the checks below even for a misjudged PID.
250 // OpenProcess also succeeds on a process that has ended while another process still holds a handle to it (a
251 // parent waiting on its exit code, as CMake's execute_process does), so the exit code decides.
207 HANDLE p = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid); 252 HANDLE p = OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid);
208 if (!p) return false; 253 if (!p) return false;
254 DWORD code = 0;
255 const bool alive = !GetExitCodeProcess(p, &code) || code == STILL_ACTIVE;
209 CloseHandle(p); 256 CloseHandle(p);
210 return true; 257 return alive;
211} 258}
212 259
213// Deletes clones left behind by processes that have exited. Deletion is scoped to files whose owner is gone: a 260// Deletes clones left behind by processes that have exited. Deletion is scoped to files whose owner is gone: a
@@ -262,45 +309,66 @@ TlsHostModule load_tls_host_image(const std::filesystem::path& path, bool hook_t
262 if (hook_thread_events) { 309 if (hook_thread_events) {
263 // Only the primary helper reports thread attach/detach events; on_host_thread_event iterates all active slots. 310 // Only the primary helper reports thread attach/detach events; on_host_thread_event iterates all active slots.
264 using SetThreadEvent = void(__cdecl*)(void(__cdecl*)(DWORD)); 311 using SetThreadEvent = void(__cdecl*)(void(__cdecl*)(DWORD));
265 if (auto set = reinterpret_cast<SetThreadEvent>(GetProcAddress(host.module, "gta6rt_tls_host_set_thread_event"))) 312 auto set = reinterpret_cast<SetThreadEvent>(GetProcAddress(host.module, "gta6rt_tls_host_set_thread_event"));
313 if (set) {
266 set(&on_host_thread_event); 314 set(&on_host_thread_event);
315 host.hooked = true;
316 }
267 } 317 }
268 return host; 318 return host;
269} 319}
270 320
271// Must be called with g_tls_alloc_mutex held and WITHOUT g_tls_lock held (LoadLibraryExW takes the Windows loader lock). 321// The primary helper: slot 0's index, and the only helper whose DllMain reports thread events (on_host_thread_event
272TlsHostModule ensure_tls_host(size_t slot) { 322// covers every slot). Must be called with g_tls_alloc_mutex held and WITHOUT g_tls_lock held (LoadLibraryExW takes the
273 if (slot >= kMaxMappedTlsModules) return {}; 323// Windows loader lock).
274 if (g_tls_hosts[slot].index != TLS_OUT_OF_INDEXES) return g_tls_hosts[slot]; 324// A helper without the thread-event export is refused: no thread started later would get its copies.
275 325bool ensure_primary_tls_host() {
326 if (g_tls_hosts[0].index != TLS_OUT_OF_INDEXES) return true;
276 const std::filesystem::path primary = tls_host_base_path(); 327 const std::filesystem::path primary = tls_host_base_path();
277 if (primary.empty()) return {}; 328 if (primary.empty()) return false;
278 329 TlsHostModule host = load_tls_host_image(primary, true);
279 if (slot == 0) { 330 if (host.index != TLS_OUT_OF_INDEXES && !host.hooked) {
280 g_tls_hosts[0] = load_tls_host_image(primary, true); 331 FreeLibrary(host.module);
281 return g_tls_hosts[0]; 332 return false;
282 }
283
284 // Ensure slot 0 is loaded first so thread attach/detach events are hooked.
285 if (g_tls_hosts[0].index == TLS_OUT_OF_INDEXES) {
286 g_tls_hosts[0] = load_tls_host_image(primary, true);
287 if (g_tls_hosts[0].index == TLS_OUT_OF_INDEXES) return {};
288 } 333 }
334 g_tls_hosts[0] = host;
335 return host.index != TLS_OUT_OF_INDEXES;
336}
289 337
338// Copies gta6rt_tls_host.dll (or writes `image`, a changed copy of it) to "leonida_tls_host_<pid>_<tag>.dll" in the
339// clone directory and loads it, so the OS gives the copy an index of its own. On failure the file is gone again and
340// the result has no index. The caller records the clone (g_tls_clones) if it is to be freed at exit. Same locking rule
341// as ensure_primary_tls_host.
342TlsHostModule load_tls_host_clone(const std::wstring& tag, std::filesystem::path& clone_path,
343 const std::vector<uint8_t>* image = nullptr) {
344 const std::filesystem::path primary = tls_host_base_path();
345 if (primary.empty()) return {};
290 // Clone gta6rt_tls_host.dll to a distinct path using CopyFileW (Wine 9 lacks CopyFile2 used by std::filesystem). 346 // Clone gta6rt_tls_host.dll to a distinct path using CopyFileW (Wine 9 lacks CopyFile2 used by std::filesystem).
291 const std::filesystem::path dir = tls_host_clone_dir(); 347 const std::filesystem::path dir = tls_host_clone_dir();
292 static bool swept = false; 348 static bool swept = false;
293 if (!swept) { 349 if (!swept) {
294 swept = true; 350 swept = true;
295 sweep_stale_tls_clones(dir); 351 sweep_stale_tls_clones(dir);
296 std::atexit(&cleanup_tls_clones_at_exit);
297 } 352 }
298 const std::wstring name = 353 const std::wstring name = L"leonida_tls_host_" + std::to_wstring(GetCurrentProcessId()) + L"_" + tag + L".dll";
299 L"leonida_tls_host_" + std::to_wstring(GetCurrentProcessId()) + L"_" + std::to_wstring(slot) + L".dll"; 354 clone_path = dir / name;
300 const std::filesystem::path clone_path = dir / name;
301 // The staging name must not match the sweep pattern, which only covers final clone names ending in .dll. 355 // The staging name must not match the sweep pattern, which only covers final clone names ending in .dll.
302 const std::filesystem::path staging = clone_path.wstring() + L".new"; 356 const std::filesystem::path staging = clone_path.wstring() + L".new";
303 if (!CopyFileW(primary.c_str(), staging.c_str(), FALSE)) return {}; 357 if (image) {
358 HANDLE out =
359 CreateFileW(staging.c_str(), GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr);
360 if (out == INVALID_HANDLE_VALUE) return {};
361 DWORD written = 0;
362 const bool ok = WriteFile(out, image->data(), static_cast<DWORD>(image->size()), &written, nullptr) &&
363 written == image->size();
364 CloseHandle(out);
365 if (!ok) {
366 DeleteFileW(staging.c_str());
367 return {};
368 }
369 } else if (!CopyFileW(primary.c_str(), staging.c_str(), FALSE)) {
370 return {};
371 }
304 372
305 // Open the guard before the clone exists under its final name and hold it across LoadLibraryExW: the rename 373 // Open the guard before the clone exists under its final name and hold it across LoadLibraryExW: the rename
306 // below needs DELETE access, which the handle's FILE_SHARE_DELETE grants, and no purge can remove the clone 374 // below needs DELETE access, which the handle's FILE_SHARE_DELETE grants, and no purge can remove the clone
@@ -320,18 +388,34 @@ TlsHostModule ensure_tls_host(size_t slot) {
320 TlsHostModule loaded = load_tls_host_image(clone_path, false); 388 TlsHostModule loaded = load_tls_host_image(clone_path, false);
321 CloseHandle(guard); 389 CloseHandle(guard);
322 390
323 if (loaded.index == TLS_OUT_OF_INDEXES) { 391 if (loaded.index == TLS_OUT_OF_INDEXES) DeleteFileW(clone_path.c_str());
392 return loaded;
393}
394
395// Must be called with g_tls_alloc_mutex held and WITHOUT g_tls_lock held (LoadLibraryExW takes the Windows loader lock).
396TlsHostModule ensure_tls_host(size_t slot) {
397 if (slot >= kMaxMappedTlsModules) return {};
398 if (g_tls_hosts[slot].index != TLS_OUT_OF_INDEXES) return g_tls_hosts[slot];
399 // Slot 0 is the primary helper; it is loaded first in any case so thread attach/detach events are hooked.
400 if (!ensure_primary_tls_host()) return {};
401 if (slot == 0) return g_tls_hosts[0];
402
403 std::filesystem::path clone_path;
404 TlsHostModule loaded = load_tls_host_clone(std::to_wstring(slot), clone_path);
405 if (loaded.index == TLS_OUT_OF_INDEXES) return {};
406 // Index 0 is the runtime EXE's, and after the move the home clone's index holds that EXE's TLS.
407 bool taken = loaded.index == 0 || loaded.index == g_index0.home.index;
408 for (size_t i = 0; i < kMaxMappedTlsModules; ++i) taken |= i != slot && g_tls_hosts[i].index == loaded.index;
409 if (taken) {
410 FreeLibrary(loaded.module);
324 DeleteFileW(clone_path.c_str()); 411 DeleteFileW(clone_path.c_str());
325 return {}; 412 return {};
326 } 413 }
327 for (size_t i = 0; i < kMaxMappedTlsModules; ++i) { 414 if (!g_tls_clones) {
328 if (i != slot && g_tls_hosts[i].index == loaded.index) { 415 g_tls_clones = new std::vector<TlsCloneRecord>;
329 FreeLibrary(loaded.module); 416 std::atexit(&cleanup_tls_clones_at_exit);
330 DeleteFileW(clone_path.c_str());
331 return {};
332 }
333 } 417 }
334 g_tls_clones.push_back({loaded.module, clone_path}); 418 g_tls_clones->push_back({loaded.module, clone_path});
335 g_tls_hosts[slot] = loaded; 419 g_tls_hosts[slot] = loaded;
336 return g_tls_hosts[slot]; 420 return g_tls_hosts[slot];
337} 421}
@@ -347,7 +431,7 @@ struct ThreadTlsSlot {
347}; 431};
348 432
349// Per-thread installation state for each reserved TLS slot. 433// Per-thread installation state for each reserved TLS slot.
350thread_local std::array<ThreadTlsSlot, kMaxMappedTlsModules> g_thread_tls_slots{}; 434thread_local std::array<ThreadTlsSlot, kTlsSlotCount> g_thread_tls_slots{};
351 435
352// Orders the TLS owners' publication, their `initialised` flags and their retirement against the thread events. Shared 436// Orders the TLS owners' publication, their `initialised` flags and their retirement against the thread events. Shared
353// in on_host_thread_event, exclusive only for those short writes (no allocation and no call that takes the Windows 437// in on_host_thread_event, exclusive only for those short writes (no allocation and no call that takes the Windows
@@ -366,10 +450,185 @@ struct ExclusiveTlsLock {
366 ExclusiveTlsLock& operator=(const ExclusiveTlsLock&) = delete; 450 ExclusiveTlsLock& operator=(const ExclusiveTlsLock&) = delete;
367}; 451};
368 452
453// gta6rt_tls_host.dll's exports that the home clone's TLS directory is pointed at (tls_host.cpp): a zero array in its
454// .rdata and that array's size.
455constexpr char kHomeTemplateExport[] = "gta6rt_tls_home_template";
456constexpr char kHomeTemplateSizeExport[] = "gta6rt_tls_home_template_size";
457
458// File offset of `len` bytes at `rva` in an image file held in memory, or SIZE_MAX when they are not all inside one
459// section's raw data.
460size_t file_offset(const std::vector<uint8_t>& file, const IMAGE_NT_HEADERS64* nt, uint64_t rva, uint64_t len) {
461 const auto* sec = IMAGE_FIRST_SECTION(nt);
462 for (unsigned i = 0; i < nt->FileHeader.NumberOfSections; ++i, ++sec) {
463 if (reinterpret_cast<const uint8_t*>(sec + 1) > file.data() + file.size()) break;
464 if (rva < sec->VirtualAddress || rva + len > static_cast<uint64_t>(sec->VirtualAddress) + sec->SizeOfRawData)
465 continue;
466 const uint64_t off = sec->PointerToRawData + (rva - sec->VirtualAddress);
467 return off + len <= file.size() ? static_cast<size_t>(off) : SIZE_MAX;
468 }
469 return SIZE_MAX;
470}
471
472// The RVA of a named export in an image file held in memory, 0 when it has none.
473uint32_t file_export(const std::vector<uint8_t>& file, const IMAGE_NT_HEADERS64* nt, const char* wanted) {
474 const auto dir = directory(nt, IMAGE_DIRECTORY_ENTRY_EXPORT);
475 const size_t ed_off = file_offset(file, nt, dir.VirtualAddress, sizeof(IMAGE_EXPORT_DIRECTORY));
476 if (!dir.Size || ed_off == SIZE_MAX) return 0;
477 const auto* ed = reinterpret_cast<const IMAGE_EXPORT_DIRECTORY*>(file.data() + ed_off);
478 const size_t names = file_offset(file, nt, ed->AddressOfNames, uint64_t{4} * ed->NumberOfNames);
479 const size_t ords = file_offset(file, nt, ed->AddressOfNameOrdinals, uint64_t{2} * ed->NumberOfNames);
480 const size_t funcs = file_offset(file, nt, ed->AddressOfFunctions, uint64_t{4} * ed->NumberOfFunctions);
481 if (names == SIZE_MAX || ords == SIZE_MAX || funcs == SIZE_MAX) return 0;
482 const size_t wanted_len = std::strlen(wanted) + 1;
483 for (uint32_t i = 0; i < ed->NumberOfNames; ++i) {
484 uint32_t name_rva, func_rva;
485 uint16_t ord;
486 std::memcpy(&name_rva, file.data() + names + 4 * i, 4);
487 std::memcpy(&ord, file.data() + ords + 2 * i, 2);
488 const size_t name = file_offset(file, nt, name_rva, wanted_len);
489 if (name == SIZE_MAX || std::memcmp(file.data() + name, wanted, wanted_len) != 0) continue;
490 if (ord >= ed->NumberOfFunctions) return 0;
491 std::memcpy(&func_rva, file.data() + funcs + 4 * ord, 4);
492 return func_rva;
493 }
494 return 0;
495}
496
497// Turns gta6rt_tls_host.dll's bytes into the home clone: its TLS directory now covers gta6rt_tls_home_template, which
498// starts with a copy of the owner's template (taken from the mapped owner, so its pointers are already relocated; the
499// array itself has no relocations), and takes the owner's alignment. The OS then gives every thread, at the home
500// index, a block that is a fresh copy of the owner's TLS. The zero fill goes into the covered range too:
501// LdrpAllocateTls allocates and copies End - Start only (Windows 11 26300) and ignores SizeOfZeroFill. The directory's
502// Start and End have base relocations, so they follow the clone wherever it loads. Empty on success, else why not.
503std::string make_home_clone_image(std::vector<uint8_t>& file, const IMAGE_TLS_DIRECTORY64& owner) {
504 if (file.size() < sizeof(IMAGE_DOS_HEADER)) return "gta6rt_tls_host.dll is truncated";
505 const auto* dos = reinterpret_cast<const IMAGE_DOS_HEADER*>(file.data());
506 if (dos->e_magic != IMAGE_DOS_SIGNATURE || dos->e_lfanew < 0 ||
507 static_cast<size_t>(dos->e_lfanew) + sizeof(IMAGE_NT_HEADERS64) > file.size())
508 return "gta6rt_tls_host.dll has no PE header";
509 auto* nt = reinterpret_cast<IMAGE_NT_HEADERS64*>(file.data() + dos->e_lfanew);
510 if (nt->Signature != IMAGE_NT_SIGNATURE || nt->OptionalHeader.Magic != IMAGE_NT_OPTIONAL_HDR64_MAGIC)
511 return "gta6rt_tls_host.dll is not a 64-bit image";
512 const uint32_t array_rva = file_export(file, nt, kHomeTemplateExport);
513 const uint32_t size_rva = file_export(file, nt, kHomeTemplateSizeExport);
514 const size_t size_off = file_offset(file, nt, size_rva, sizeof(uint32_t));
515 if (!array_rva || !size_rva || size_off == SIZE_MAX)
516 return "gta6rt_tls_host.dll has no gta6rt_tls_home_template";
517 uint32_t capacity;
518 std::memcpy(&capacity, file.data() + size_off, sizeof(capacity));
519 const uint64_t raw = owner.EndAddressOfRawData - owner.StartAddressOfRawData;
520 const uint64_t total = raw + owner.SizeOfZeroFill;
521 if (owner.EndAddressOfRawData < owner.StartAddressOfRawData || total > capacity)
522 return "the owner's TLS (" + std::to_string(total) + " bytes) does not fit gta6rt_tls_home_template (" +
523 std::to_string(capacity) + " bytes)";
524 const size_t array_off = file_offset(file, nt, array_rva, capacity);
525 const auto tls_dir = directory(nt, IMAGE_DIRECTORY_ENTRY_TLS);
526 const size_t tls_off = file_offset(file, nt, tls_dir.VirtualAddress, sizeof(IMAGE_TLS_DIRECTORY64));
527 if (array_off == SIZE_MAX || !tls_dir.Size || tls_off == SIZE_MAX)
528 return "gta6rt_tls_host.dll's TLS directory or home template lies outside its file";
529 std::memcpy(file.data() + array_off, reinterpret_cast<const void*>(owner.StartAddressOfRawData), raw);
530 std::memset(file.data() + array_off + raw, 0, capacity - raw);
531 auto* tls = reinterpret_cast<IMAGE_TLS_DIRECTORY64*>(file.data() + tls_off);
532 tls->StartAddressOfRawData = nt->OptionalHeader.ImageBase + array_rva;
533 tls->EndAddressOfRawData = tls->StartAddressOfRawData + total;
534 tls->SizeOfZeroFill = 0;
535 tls->Characteristics =
536 (tls->Characteristics & ~IMAGE_SCN_ALIGN_MASK) | (owner.Characteristics & IMAGE_SCN_ALIGN_MASK);
537 return {};
538}
539
540std::string module_file_name(HMODULE module) {
541 wchar_t path[MAX_PATH];
542 const DWORD n = GetModuleFileNameW(module, path, MAX_PATH);
543 if (!n || n >= MAX_PATH) return "?";
544 const wchar_t* name = path;
545 for (const wchar_t* p = path; *p; ++p)
546 if (*p == L'\\' || *p == L'/') name = p + 1;
547 const int bytes = WideCharToMultiByte(CP_UTF8, 0, name, -1, nullptr, 0, nullptr, nullptr);
548 if (bytes <= 1) return "?";
549 std::string out(static_cast<size_t>(bytes - 1), '\0');
550 WideCharToMultiByte(CP_UTF8, 0, name, -1, out.data(), bytes, nullptr, nullptr);
551 return out;
552}
553
554// The move on the calling thread, kept apart so that no frame of reserve_index0 holds a slot address across it. After
555// it the owner's live block is at `home` and slot 0 holds the home clone's fresh copy, which nothing reads.
556__declspec(noinline) void move_index0_on_this_thread(DWORD* owner_index, DWORD home) {
557 void** slots = module_tls_slots();
558 std::swap(slots[0], slots[home]);
559 *owner_index = home;
560}
561
562// See reserve_tls_index0. Empty on success, else why not; nothing has changed then. g_tls_alloc_mutex held. It reads
563// no thread_local data and runs no code that does, before or after the move.
564std::string reserve_index0() {
565 // Windows gives index 0 to the process executable when it has TLS; a DLL can only hold it in a process whose EXE
566 // has none, and a DLL that is still loading or was loaded without its references resolved shows 0 too.
567 const HMODULE exe = GetModuleHandleW(nullptr);
568 auto* base = reinterpret_cast<uint8_t*>(exe);
569 auto* nt = at<IMAGE_NT_HEADERS64>(base, reinterpret_cast<IMAGE_DOS_HEADER*>(base)->e_lfanew);
570 const auto dir = directory(nt, IMAGE_DIRECTORY_ENTRY_TLS);
571 if (!dir.Size || !dir.VirtualAddress) return "the process executable has no TLS, so index 0 is not its";
572 const IMAGE_TLS_DIRECTORY64 owner = *at<IMAGE_TLS_DIRECTORY64>(base, dir.VirtualAddress);
573 auto* owner_index = reinterpret_cast<DWORD*>(owner.AddressOfIndex);
574 if (!owner_index) return "the process executable's TLS directory has no index";
575 if (*owner_index != 0) return "the process executable's _tls_index is " + std::to_string(*owner_index) + ", not 0";
576 if (!module_tls_slots()) return "this thread has no TLS array";
577 if (!ensure_primary_tls_host())
578 return "gta6rt_tls_host.dll is missing, has no module TLS index or lacks gta6rt_tls_host_set_thread_event";
579
580 std::vector<uint8_t> image;
581 try {
582 image = read_file(tls_host_base_path());
583 } catch (const std::exception& e) {
584 return e.what();
585 }
586 if (std::string why = make_home_clone_image(image, owner); !why.empty()) return why;
587 std::filesystem::path path;
588 const TlsHostModule home = load_tls_host_clone(L"home", path, &image);
589 if (home.index == TLS_OUT_OF_INDEXES) return "the home clone of gta6rt_tls_host.dll cannot be loaded";
590 auto drop = [&](std::string why) {
591 FreeLibrary(home.module); // safe until the move below: nothing lives at its index yet
592 DeleteFileW(path.c_str());
593 return why;
594 };
595 bool taken = home.index == 0 || home.index >= kMaxModuleTlsSlots;
596 for (const auto& host : g_tls_hosts) taken |= host.index == home.index;
597 if (taken) return drop("the home clone got an unusable module TLS index");
598 // The OS must have taken the changed directory: the mapped clone's template is the owner's, at full size.
599 auto* home_base = reinterpret_cast<uint8_t*>(home.module);
600 auto* home_nt = at<IMAGE_NT_HEADERS64>(home_base, reinterpret_cast<IMAGE_DOS_HEADER*>(home_base)->e_lfanew);
601 const auto* home_tls =
602 at<IMAGE_TLS_DIRECTORY64>(home_base, directory(home_nt, IMAGE_DIRECTORY_ENTRY_TLS).VirtualAddress);
603 const uint64_t raw = owner.EndAddressOfRawData - owner.StartAddressOfRawData;
604 if (home_tls->EndAddressOfRawData - home_tls->StartAddressOfRawData != raw + owner.SizeOfZeroFill ||
605 std::memcmp(reinterpret_cast<const void*>(home_tls->StartAddressOfRawData),
606 reinterpret_cast<const void*>(owner.StartAddressOfRawData), raw) != 0)
607 return drop("the home clone's mapped TLS template is not the owner's");
608
609 // Everything that can throw comes first: past the move this records the result and nothing more.
610 const std::string name = module_file_name(exe);
611 // _tls_index sits in .data; made writable first in case a linker merged it into a read-only section.
612 DWORD old_protect = 0;
613 if (!VirtualProtect(owner_index, sizeof(DWORD), PAGE_READWRITE, &old_protect))
614 return drop("the owner's _tls_index cannot be written");
615 move_index0_on_this_thread(owner_index, home.index);
616 VirtualProtect(owner_index, sizeof(DWORD), old_protect, &old_protect);
617
618 // Kept loaded for the process lifetime: FreeLibrary would make the OS free every thread's block at its index, the
619 // owner's from now on. Not in g_tls_clones for that reason. Its file cannot be deleted while it is mapped
620 // (DeleteFileW and a POSIX-semantics delete both fail with ERROR_ACCESS_DENIED on Windows 11), so it stays until
621 // a later run's sweep.
622 g_index0.home = home;
623 std::snprintf(g_index0.owner, sizeof(g_index0.owner), "%s", name.c_str());
624 g_index0.moved = true;
625 return {};
626}
627
369// Puts the helper DLL's own block back in this thread's slot and frees the copy that replaced it. Uses only this 628// Puts the helper DLL's own block back in this thread's slot and frees the copy that replaced it. Uses only this
370// thread's record, so it also works after the module that installed the copy is gone. 629// thread's record, so it also works after the module that installed the copy is gone.
371void release_thread_slot(size_t slot) { 630void release_thread_slot(size_t slot) {
372 if (slot >= kMaxMappedTlsModules) return; 631 if (slot >= kTlsSlotCount) return;
373 ThreadTlsSlot& entry = g_thread_tls_slots[slot]; 632 ThreadTlsSlot& entry = g_thread_tls_slots[slot];
374 if (!entry.module && !entry.block) return; 633 if (!entry.module && !entry.block) return;
375 if (entry.ga_view) { 634 if (entry.ga_view) {
@@ -438,7 +697,7 @@ void** make_ga_view(const Module& m, void* block) {
438} 697}
439 698
440void install_thread_block(Module& m) { 699void install_thread_block(Module& m) {
441 if (m.tls_slot >= kMaxMappedTlsModules) return; 700 if (m.tls_slot >= kTlsSlotCount) return;
442 const size_t slot = m.tls_slot; 701 const size_t slot = m.tls_slot;
443 ThreadTlsSlot& entry = g_thread_tls_slots[slot]; 702 ThreadTlsSlot& entry = g_thread_tls_slots[slot];
444 if (entry.module == &m && entry.generation == m.tls_generation) return; 703 if (entry.module == &m && entry.generation == m.tls_generation) return;
@@ -530,7 +789,7 @@ bool ga_tls_patch_enabled() {
530} 789}
531 790
532void uninstall_thread_block(Module& m) { 791void uninstall_thread_block(Module& m) {
533 if (m.tls_slot >= kMaxMappedTlsModules) return; 792 if (m.tls_slot >= kTlsSlotCount) return;
534 const size_t slot = m.tls_slot; 793 const size_t slot = m.tls_slot;
535 ThreadTlsSlot& entry = g_thread_tls_slots[slot]; 794 ThreadTlsSlot& entry = g_thread_tls_slots[slot];
536 if (entry.module != &m || entry.generation != m.tls_generation) return; 795 if (entry.module != &m || entry.generation != m.tls_generation) return;
@@ -697,7 +956,7 @@ constexpr size_t kMaxEndedThreads = 1024;
697// load(): every other running thread gets its own copy of m's template. Not fatal where it cannot be done. 956// load(): every other running thread gets its own copy of m's template. Not fatal where it cannot be done.
698void install_on_existing_threads(Module& m) { 957void install_on_existing_threads(Module& m) {
699 const uint64_t total = static_cast<uint64_t>(m.tls_raw_size) + m.tls_zero_fill; 958 const uint64_t total = static_cast<uint64_t>(m.tls_raw_size) + m.tls_zero_fill;
700 if (!total || m.tls_index >= kMaxModuleTlsSlots || m.tls_slot >= kMaxMappedTlsModules) return; 959 if (!total || m.tls_index >= kMaxModuleTlsSlots || m.tls_slot >= kTlsSlotCount) return;
701 // Stays ahead of the TLS lock: the first call resolves the function with GetModuleHandle and GetProcAddress, which 960 // Stays ahead of the TLS lock: the first call resolves the function with GetModuleHandle and GetProcAddress, which
702 // take the Windows loader lock, and a thread inside its attach event holds that lock while it waits for ours. 961 // take the Windows loader lock, and a thread inside its attach event holds that lock while it waits for ours.
703 if (!query_thread_fn()) return; 962 if (!query_thread_fn()) return;
@@ -882,7 +1141,11 @@ void release_existing_blocks_of_this_thread() {
882// Runs in gta6rt_tls_host.dll's DllMain for each thread the process starts or ends once the helper is loaded, under 1141// Runs in gta6rt_tls_host.dll's DllMain for each thread the process starts or ends once the helper is loaded, under
883// the Windows loader lock, on that thread. A new thread gets its own copy of each active TLS owner's template; an 1142// the Windows loader lock, on that thread. A new thread gets its own copy of each active TLS owner's template; an
884// ending one gives each helper's block back before the Windows loader frees it. TLS callbacks get the thread events 1143// ending one gives each helper's block back before the Windows loader frees it. TLS callbacks get the thread events
885// only after the module's DLL_PROCESS_ATTACH (initialise()), as the Windows loader orders them. 1144// only after the module's DLL_PROCESS_ATTACH (initialise()), as the Windows loader orders them. Windows allocates
1145// every module's block before the first DllMain of a new thread, and runs an EXE's TLS callbacks after every DllMain,
1146// for attach and for detach (measured on Windows 11 26300). So attach installs all copies first and then runs the
1147// callbacks, the DLL slots in order and the executable's last; detach runs the DLL slots in reverse and then the
1148// executable's slot, each releasing its copy after its callbacks.
886void __cdecl on_host_thread_event(DWORD reason) { 1149void __cdecl on_host_thread_event(DWORD reason) {
887 SharedTlsLock lock; 1150 SharedTlsLock lock;
888 // The try/catch is per slot: a throw from one module's install or callbacks must not take the thread events 1151 // The try/catch is per slot: a throw from one module's install or callbacks must not take the thread events
@@ -893,14 +1156,25 @@ void __cdecl on_host_thread_event(DWORD reason) {
893 } catch (const std::exception& e) { 1156 } catch (const std::exception& e) {
894 std::fprintf(stderr, "[rt] loader: thread attach: %s\n", e.what()); 1157 std::fprintf(stderr, "[rt] loader: thread attach: %s\n", e.what());
895 } 1158 }
896 for (size_t slot = 0; slot < kMaxMappedTlsModules; ++slot) { 1159 std::array<Module*, kTlsSlotCount> installed{};
1160 for (size_t slot = 0; slot < kTlsSlotCount; ++slot) {
897 Module* m = g_tls_slot_owners[slot].load(); 1161 Module* m = g_tls_slot_owners[slot].load();
898 if (!m) continue; 1162 if (!m) continue;
899 try { 1163 try {
900 install_thread_block(*m); 1164 install_thread_block(*m);
901 if (m->initialised) run_callbacks(*m, DLL_THREAD_ATTACH); 1165 installed[slot] = m;
1166 } catch (const std::exception& e) {
1167 // The thread runs on without this module's TLS (and its callbacks); later slots still get theirs.
1168 std::fprintf(stderr, "[rt] loader: thread attach, slot %zu (%s): %s\n", slot, m->name.c_str(),
1169 e.what());
1170 }
1171 }
1172 for (size_t slot = 0; slot < kTlsSlotCount; ++slot) {
1173 Module* m = installed[slot];
1174 if (!m || !m->initialised) continue;
1175 try {
1176 run_callbacks(*m, DLL_THREAD_ATTACH);
902 } catch (const std::exception& e) { 1177 } catch (const std::exception& e) {
903 // The thread runs on without this module's TLS; later slots still get theirs.
904 std::fprintf(stderr, "[rt] loader: thread attach, slot %zu (%s): %s\n", slot, m->name.c_str(), 1178 std::fprintf(stderr, "[rt] loader: thread attach, slot %zu (%s): %s\n", slot, m->name.c_str(),
905 e.what()); 1179 e.what());
906 } 1180 }
@@ -913,7 +1187,8 @@ void __cdecl on_host_thread_event(DWORD reason) {
913 } catch (const std::exception& e) { 1187 } catch (const std::exception& e) {
914 std::fprintf(stderr, "[rt] loader: thread detach: %s\n", e.what()); 1188 std::fprintf(stderr, "[rt] loader: thread detach: %s\n", e.what());
915 } 1189 }
916 for (size_t i = kMaxMappedTlsModules; i-- > 0;) { 1190 for (size_t step = 0; step < kTlsSlotCount; ++step) {
1191 const size_t i = step < kMaxMappedTlsModules ? kMaxMappedTlsModules - 1 - step : kMainImageSlot;
917 Module* m = g_tls_slot_owners[i].load(); 1192 Module* m = g_tls_slot_owners[i].load();
918 if (m && g_thread_tls_slots[i].module == m && 1193 if (m && g_thread_tls_slots[i].module == m &&
919 g_thread_tls_slots[i].generation == m->tls_generation) { 1194 g_thread_tls_slots[i].generation == m->tls_generation) {
@@ -1017,6 +1292,26 @@ void redirect_pc_to_file_header_at(const void* resolved) {
1017// Declared in pe_loader.h; the body needs the internal clone registry above. 1292// Declared in pe_loader.h; the body needs the internal clone registry above.
1018void cleanup_tls_clones() { cleanup_tls_clones_internal(); } 1293void cleanup_tls_clones() { cleanup_tls_clones_internal(); }
1019 1294
1295bool reserve_tls_index0(std::string* why) {
1296 std::lock_guard alloc_lock(g_tls_alloc_mutex);
1297 static bool attempted = false; // once: a later attempt could meet threads that already run this EXE's code
1298 if (!attempted) {
1299 attempted = true;
1300 // A throw (std::filesystem::temp_directory_path when GetTempPathW fails, an allocation) is a failed
1301 // reservation like any other: gta6rt calls this before main, where an exception would end it with no message.
1302 try {
1303 const std::string reason = reserve_index0();
1304 std::snprintf(g_index0.why, sizeof(g_index0.why), "%s", reason.c_str());
1305 } catch (const std::exception& e) {
1306 std::snprintf(g_index0.why, sizeof(g_index0.why), "%s", e.what());
1307 } catch (...) {
1308 std::snprintf(g_index0.why, sizeof(g_index0.why), "an unknown error while reserving it");
1309 }
1310 }
1311 if (why) *why = g_index0.moved ? std::string() : std::string(g_index0.why);
1312 return g_index0.moved;
1313}
1314
1020namespace { 1315namespace {
1021bool lookup_in_loader(void* ctx, uint64_t address, std::string& module, uint32_t& rva) { 1316bool lookup_in_loader(void* ctx, uint64_t address, std::string& module, uint32_t& rva) {
1022 return static_cast<Loader*>(ctx)->find_address(address, module, rva); 1317 return static_cast<Loader*>(ctx)->find_address(address, module, rva);
@@ -1099,7 +1394,7 @@ Loader::~Loader() {
1099 shims::remove_module_lookup(this); 1394 shims::remove_module_lookup(this);
1100 for (auto* m : order_) { 1395 for (auto* m : order_) {
1101 // TLS state must go away before the image and its TLS block are unmapped. 1396 // TLS state must go away before the image and its TLS block are unmapped.
1102 if (m->tls_index != kNoTlsIndex && m->tls_slot < kMaxMappedTlsModules) { 1397 if (m->tls_index != kNoTlsIndex && m->tls_slot < kTlsSlotCount) {
1103 // Retired first, under the lock: no thread event installs it or runs its callbacks after this, and a 1398 // Retired first, under the lock: no thread event installs it or runs its callbacks after this, and a
1104 // thread that still holds a copy frees it when it ends (on_host_thread_event). 1399 // thread that still holds a copy frees it when it ends (on_host_thread_event).
1105 { 1400 {
@@ -1514,7 +1809,7 @@ Module& Loader::map_image(const std::filesystem::path& path, const std::string&
1514// Only the OS loader can allocate that module index, so the loader reuses the index the OS assigned to 1809// Only the OS loader can allocate that module index, so the loader reuses the index the OS assigned to
1515// gta6rt_tls_host.dll and maps a fresh clone of the helper for every additional simultaneous TLS module, each clone 1810// gta6rt_tls_host.dll and maps a fresh clone of the helper for every additional simultaneous TLS module, each clone
1516// getting its own index. All kMaxMappedTlsModules slots can be live at once; a further module is rejected rather than 1811// getting its own index. All kMaxMappedTlsModules slots can be live at once; a further module is rejected rather than
1517// silently sharing (and corrupting) a slot. 1812// silently sharing (and corrupting) a slot. An executable takes index 0 instead (kMainImageSlot), as on Windows.
1518void Loader::initialize_tls(Module& m) { 1813void Loader::initialize_tls(Module& m) {
1519 auto* tls = tls_directory(m); 1814 auto* tls = tls_directory(m);
1520 if (!tls) return; 1815 if (!tls) return;
@@ -1543,26 +1838,51 @@ void Loader::initialize_tls(Module& m) {
1543 1838
1544 if (!module_tls_slots()) throw std::runtime_error(m.name + ": this thread has no TLS array"); 1839 if (!module_tls_slots()) throw std::runtime_error(m.name + ": this thread has no TLS array");
1545 1840
1546 size_t slot = kMaxMappedTlsModules; 1841 auto* nt = at<IMAGE_NT_HEADERS64>(m.base, reinterpret_cast<IMAGE_DOS_HEADER*>(m.base)->e_lfanew);
1842 const bool executable = (nt->FileHeader.Characteristics & IMAGE_FILE_DLL) == 0;
1843
1844 size_t slot = kTlsSlotCount;
1547 DWORD index = TLS_OUT_OF_INDEXES; 1845 DWORD index = TLS_OUT_OF_INDEXES;
1548 { 1846 {
1549 std::lock_guard alloc_lock(g_tls_alloc_mutex); 1847 std::lock_guard alloc_lock(g_tls_alloc_mutex);
1550 for (size_t i = 0; i < kMaxMappedTlsModules; ++i) { 1848 if (executable) {
1551 if (g_tls_slot_owners[i].load() == nullptr) { 1849 if (g_index0.moved && g_tls_slot_owners[kMainImageSlot].load() == nullptr) {
1552 slot = i; 1850 slot = kMainImageSlot;
1553 break; 1851 index = 0;
1852 if (!g_index0.traced && startup_trace::enabled()) {
1853 g_index0.traced = true;
1854 startup_trace::event("tls_index0", "\"owner\":" + startup_trace::quote(g_index0.owner) +
1855 ",\"moved_to\":" + std::to_string(g_index0.home.index));
1856 }
1857 } else {
1858 // Mapped on as a DLL is: its code that reads _tls_index works, but its /GA code would read and write
1859 // the block in slot 0, which is the runtime's own TLS or the other executable's. gta6rt refuses to
1860 // run such an image (main.cpp); a Loader user must not run its code either.
1861 std::fprintf(stderr,
1862 "[rt] loader: %s does not get module TLS index 0 (%s); its code built with /GA would use "
1863 "another module's TLS\n",
1864 m.name.c_str(), g_index0.moved ? "another mapped executable holds it" : g_index0.why);
1554 } 1865 }
1555 } 1866 }
1556 if (slot >= kMaxMappedTlsModules) 1867 if (slot == kTlsSlotCount) {
1557 throw std::runtime_error(m.name + ": all " + std::to_string(kMaxMappedTlsModules) + 1868 for (size_t i = 0; i < kMaxMappedTlsModules; ++i) {
1558 " manually mapped static TLS slots are in use"); 1869 if (g_tls_slot_owners[i].load() == nullptr) {
1559 1870 slot = i;
1560 // Load/clone gta6rt_tls_host.dll OUTSIDE ExclusiveTlsLock so LoadLibraryExW cannot deadlock with 1871 break;
1561 // on_host_thread_event (which runs under the Windows loader lock and takes SharedTlsLock). 1872 }
1562 index = ensure_tls_host(slot).index; 1873 }
1563 if (index == TLS_OUT_OF_INDEXES) 1874 if (slot >= kMaxMappedTlsModules)
1564 throw std::runtime_error(m.name + ": gta6rt_tls_host.dll is missing or has no module TLS index"); 1875 throw std::runtime_error(m.name + ": all " + std::to_string(kMaxMappedTlsModules) +
1565 if (index >= kMaxModuleTlsSlots) throw std::runtime_error(m.name + ": reserved TLS index is out of range"); 1876 " manually mapped static TLS slots are in use");
1877
1878 // Load/clone gta6rt_tls_host.dll OUTSIDE ExclusiveTlsLock so LoadLibraryExW cannot deadlock with
1879 // on_host_thread_event (which runs under the Windows loader lock and takes SharedTlsLock).
1880 index = ensure_tls_host(slot).index;
1881 if (index == TLS_OUT_OF_INDEXES)
1882 throw std::runtime_error(m.name + ": gta6rt_tls_host.dll is missing or has no module TLS index");
1883 if (index >= kMaxModuleTlsSlots)
1884 throw std::runtime_error(m.name + ": reserved TLS index is out of range");
1885 }
1566 1886
1567 // The fields are complete before a thread event can see the owner. 1887 // The fields are complete before a thread event can see the owner.
1568 ExclusiveTlsLock lock; 1888 ExclusiveTlsLock lock;
@@ -1864,6 +2184,24 @@ void Loader::bind_imports(Module& m) {
1864void Loader::protect_sections(Module& m) { 2184void Loader::protect_sections(Module& m) {
1865 auto* nt = at<IMAGE_NT_HEADERS64>(m.base, reinterpret_cast<IMAGE_DOS_HEADER*>(m.base)->e_lfanew); 2185 auto* nt = at<IMAGE_NT_HEADERS64>(m.base, reinterpret_cast<IMAGE_DOS_HEADER*>(m.base)->e_lfanew);
1866 DWORD old; 2186 DWORD old;
2187 // On a CPU without CLZERO, the image's CLZERO loops run from stubs instead of taking a #UD per cache line
2188 // (clzero_patch.h). The sections are still writable here, and none of the image's code has run.
2189 static const bool clzero_missing = !rt::cpu_emulation::detect_host().clzero;
2190 if (clzero_missing && rt::clzero_patch::enabled()) {
2191 std::vector<std::pair<uint8_t*, size_t>> code;
2192 const IMAGE_SECTION_HEADER* cs = IMAGE_FIRST_SECTION(nt);
2193 for (unsigned i = 0; i < nt->FileHeader.NumberOfSections; ++i, ++cs) {
2194 if (!(cs->Characteristics & IMAGE_SCN_MEM_EXECUTE) || cs->VirtualAddress >= m.size) continue;
2195 const uint64_t size = std::min<uint64_t>(std::min(cs->Misc.VirtualSize, cs->SizeOfRawData),
2196 m.size - cs->VirtualAddress);
2197 if (size) code.push_back({m.base + cs->VirtualAddress, static_cast<size_t>(size)});
2198 }
2199 const auto patched = rt::clzero_patch::patch(code, uint64_t(m.base), uint64_t(m.base) + m.size);
2200 if (patched.sites)
2201 std::fprintf(stderr,
2202 "[rt] loader: %s: %zu CLZERO loops run from stubs at %p (%zu bytes), not as a #UD per line\n",
2203 m.name.c_str(), patched.sites, static_cast<void*>(patched.stubs), patched.stub_bytes);
2204 }
1867 VirtualProtect(m.base, nt->OptionalHeader.SizeOfHeaders, PAGE_READONLY, &old); 2205 VirtualProtect(m.base, nt->OptionalHeader.SizeOfHeaders, PAGE_READONLY, &old);
1868 auto* sec = IMAGE_FIRST_SECTION(nt); 2206 auto* sec = IMAGE_FIRST_SECTION(nt);
1869 for (unsigned i = 0; i < nt->FileHeader.NumberOfSections; ++i, ++sec) { 2207 for (unsigned i = 0; i < nt->FileHeader.NumberOfSections; ++i, ++sec) {
diff --git a/runtime/src/pe_loader.h b/runtime/src/pe_loader.h
index fda924440..f75426e41 100644
--- a/runtime/src/pe_loader.h
+++ b/runtime/src/pe_loader.h
@@ -54,11 +54,15 @@ struct Module {
54 // the image's _tls_index. tls_index names TEB->ThreadLocalStoragePointer[tls_index], the array 54 // the image's _tls_index. tls_index names TEB->ThreadLocalStoragePointer[tls_index], the array
55 // __declspec(thread) reads; it is not a TlsAlloc slot. The loader reserves distinct indices by loading 55 // __declspec(thread) reads; it is not a TlsAlloc slot. The loader reserves distinct indices by loading
56 // gta6rt_tls_host.dll (and cloning it on demand for additional simultaneous TLS modules, up to 16 at a time). 56 // gta6rt_tls_host.dll (and cloning it on demand for additional simultaneous TLS modules, up to 16 at a time).
57 // An executable gets index 0, as Windows gives the process EXE, because code built with /GA reads slot 0 without
58 // _tls_index. That needs reserve_tls_index0() at process start; without it, and for a second executable mapped
59 // while one holds index 0, the executable gets a helper index and a note on stderr, and its /GA code would use
60 // another module's TLS, so its code must not run (gta6rt refuses).
57 // Every thread started after load() gets its own copy through the helper's DLL_THREAD_ATTACH, and gives it back 61 // Every thread started after load() gets its own copy through the helper's DLL_THREAD_ATTACH, and gives it back
58 // at DLL_THREAD_DETACH. A thread that was already running gets its copy from load() itself, as it would from 62 // at DLL_THREAD_DETACH. A thread that was already running gets its copy from load() itself, as it would from
59 // Windows for a DLL Windows loads: a block, no DLL_THREAD_ATTACH, and DLL_THREAD_DETACH when it ends. 63 // Windows for a DLL Windows loads: a block, no DLL_THREAD_ATTACH, and DLL_THREAD_DETACH when it ends.
60 uint32_t tls_index = kNoTlsIndex; 64 uint32_t tls_index = kNoTlsIndex;
61 uint32_t tls_slot = kNoTlsIndex; // index into the loader's reserved TLS-host slot pool 65 uint32_t tls_slot = kNoTlsIndex; // index into the loader's reserved TLS-host slot pool ; 16 is index 0, an executable's
62 uint64_t tls_generation = 0; // unique token per TLS initialisation, distinguishing reused slots/addresses 66 uint64_t tls_generation = 0; // unique token per TLS initialisation, distinguishing reused slots/addresses
63 void* tls_block = nullptr; // calling thread's copy of the image's template 67 void* tls_block = nullptr; // calling thread's copy of the image's template
64 void* tls_saved_block = nullptr; // helper DLL block replaced in that thread, restored by ~Loader 68 void* tls_saved_block = nullptr; // helper DLL block replaced in that thread, restored by ~Loader
@@ -182,6 +186,14 @@ private:
182// skips the atexit table. Call it when no mapped code can run again: it unmaps the helper images. 186// skips the atexit table. Call it when no mapped code can run again: it unmaps the helper images.
183void cleanup_tls_clones(); 187void cleanup_tls_clones();
184 188
189// Moves the runtime's own EXE off module TLS index 0, which Windows gave it, so that a mapped executable can have it
190// (Module::tls_index): its TLS moves to the index of one more helper clone, whose template is a copy of the EXE's.
191// Call it once at process start, before any other thread has run this EXE's code (gta6rt does it from a CRT
192// initializer): MSVC code keeps the address of its TLS slot across calls, so a thread that is already running cannot
193// be moved, and its TLS would stay at index 0. Returns false, with the reason in *why, when it cannot; later calls
194// return the first result.
195bool reserve_tls_index0(std::string* why = nullptr);
196
185std::string lower(std::string s); 197std::string lower(std::string s);
186 198
187} // namespace rt 199} // namespace rt
diff --git a/runtime/src/pipeline_cache_file.h b/runtime/src/pipeline_cache_file.h
new file mode 100644
index 000000000..98e5788a8
--- /dev/null
+++ b/runtime/src/pipeline_cache_file.h
@@ -0,0 +1,68 @@
1// Publish a checkpoint only after every byte has reached a closed, same-directory staging file.
2//
3// Used by vk_pipeline_check (its corpus checkpoints) and by the runtime, which writes the session cache on device
4// teardown (pipeline_cache_store.h; a reader of the old file keeps it open until its rename completes) and fills a
5// mapped session staging file directly (d3d12_pipeline_checkpoint.h).
6#pragma once
7
8#include <algorithm>
9#include <cerrno>
10#include <chrono>
11#include <cstdio>
12#include <filesystem>
13#include <string>
14#include <system_error>
15
16#ifdef _WIN32
17#include <thread>
18#include <windows.h>
19#endif
20
21inline std::error_code write_pipeline_cache_file(const std::filesystem::path& destination,
22 const char* data, size_t size) {
23 namespace fs = std::filesystem;
24 const auto stamp = std::chrono::steady_clock::now().time_since_epoch().count();
25 fs::path staged;
26 std::FILE* file = nullptr;
27 for (int attempt = 0; attempt < 8; ++attempt) {
28 staged = destination;
29 staged += ".tmp." + std::to_string(stamp) + "." + std::to_string(attempt);
30#ifdef _WIN32
31 file = _wfopen(staged.c_str(), L"wbx");
32#else
33 file = std::fopen(staged.c_str(), "wbx");
34#endif
35 if (file || errno != EEXIST) break;
36 }
37 if (!file) return {errno, std::generic_category()};
38
39 std::error_code error;
40 // Keep individual CRT writes small even when the cache is several GiB.
41 while (size > 0) {
42 const size_t chunk = (std::min)(size, size_t{16} << 20);
43 if (std::fwrite(data, 1, chunk, file) != chunk || std::ferror(file)) {
44 error = {errno ? errno : EIO, std::generic_category()};
45 break;
46 }
47 data += chunk;
48 size -= chunk;
49 }
50 if (std::fflush(file) != 0 && !error) error = {errno ? errno : EIO, std::generic_category()};
51 if (std::fclose(file) != 0 && !error) error = {errno ? errno : EIO, std::generic_category()};
52 if (!error) {
53 fs::rename(staged, destination, error);
54#ifdef _WIN32
55 // A checker reading the previous cache can briefly block replacement if it did not share delete access.
56 for (int retry = 0; retry < 8; ++retry) {
57 if (error != std::errc::permission_denied && error.value() != ERROR_SHARING_VIOLATION) break;
58 std::this_thread::sleep_for(std::chrono::milliseconds(25));
59 fs::rename(staged, destination, error);
60 }
61#endif
62 }
63 if (error) {
64 std::error_code ignored;
65 fs::remove(staged, ignored);
66 }
67 return error;
68}
diff --git a/runtime/src/pipeline_cache_store.h b/runtime/src/pipeline_cache_store.h
new file mode 100644
index 000000000..6d519d99b
--- /dev/null
+++ b/runtime/src/pipeline_cache_store.h
@@ -0,0 +1,69 @@
1// Persisting the runtime's VkPipelineCache across launches (D3D-704).
2//
3// Two files sit beside gta6rt.exe, and they are not interchangeable:
4//
5// pipeline_cache.bin the offline corpus seed the `pipelines` build stage writes (#367). Read only.
6// pipeline_cache.session.bin what the runtime compiled last time. Written on device teardown.
7//
8// Keeping them apart means a run can never replace the multi-GB corpus cache with the handful of pipelines it
9// happened to compile. On the next launch both are loaded and merged, so the offline entries and the previous
10// session's entries are available together.
11//
12// This header is pure stdlib on purpose (it does not include vulkan.h): pipeline_cache_store_test builds on hosts
13// where CMake has no Vulkan headers. The byte layout below is VkPipelineCacheHeaderVersionOne, whose 32 bytes are
14// part of Vulkan's ABI, not something a driver chooses.
15#pragma once
16
17#include <cstddef>
18#include <cstdint>
19#include <cstring>
20#include <limits>
21
22#include "cached_pso.h"
23
24namespace leonida::pipeline_cache_store {
25
26// A session cache normally holds what one boot compiled (a few MB to a few hundred MB). The cap is what keeps a
27// cache seeded from the multi-GB corpus file -- whose data comes back as the whole union -- from being rewritten
28// at every exit. Past it the previous session file is left alone; raise the limit with
29// LEONIDA_PIPELINE_CACHE_BYTES when a session really compiles that much.
30inline constexpr std::size_t default_save_limit = std::size_t{256} << 20; // 256 MiB
31
32struct SaveLimit {
33 std::size_t bytes = default_save_limit;
34 bool valid = true; // false when the text was not a byte count; bytes then stays at the default
35};
36
37// LEONIDA_PIPELINE_CACHE_BYTES: a decimal byte count, 0 turning the session file off entirely. Empty or absent
38// means the default; stray text, a sign or an overflow is reported by the caller and the default is used.
39inline SaveLimit parse_save_limit(const char* text) {
40 if (!text || !*text) return {};
41 std::size_t value = 0;
42 for (const char* p = text; *p; ++p) {
43 if (*p < '0' || *p > '9') return {default_save_limit, false};
44 const std::size_t digit = static_cast<std::size_t>(*p - '0');
45 if (value > (std::numeric_limits<std::size_t>::max() - digit) / 10) return {default_save_limit, false};
46 value = value * 10 + digit;
47 }
48 return {value, true};
49}
50
51inline constexpr std::size_t header_bytes = 32;
52inline constexpr std::uint32_t header_version_one = 1;
53
54inline std::uint32_t read_u32(const std::uint8_t* p) {
55 return std::uint32_t(p[0]) | (std::uint32_t(p[1]) << 8) | (std::uint32_t(p[2]) << 16) |
56 (std::uint32_t(p[3]) << 24);
57}
58
59// True when the blob's header names this physical device and pipeline-cache UUID, which is what a driver requires
60// before it will read the opaque payload. The header is little-endian, like the host.
61inline bool header_matches(const void* data, std::size_t size, const cached_pso::Identity& identity) {
62 if (!data || size < header_bytes) return false;
63 const auto* bytes = static_cast<const std::uint8_t*>(data);
64 return read_u32(bytes) == header_bytes && read_u32(bytes + 4) == header_version_one &&
65 read_u32(bytes + 8) == identity.vendor && read_u32(bytes + 12) == identity.device &&
66 std::memcmp(bytes + 16, identity.cache_uuid, sizeof(identity.cache_uuid)) == 0;
67}
68
69} // namespace leonida::pipeline_cache_store
diff --git a/runtime/src/pipeline_profile.h b/runtime/src/pipeline_profile.h
new file mode 100644
index 000000000..f81c00c7d
--- /dev/null
+++ b/runtime/src/pipeline_profile.h
@@ -0,0 +1,70 @@
1// Optional driver-call timing. Match begin/end by id even when startup warmup and replay overlap.
2#pragma once
3
4#include <atomic>
5#include <chrono>
6#include <cstdio>
7#include <cstdlib>
8#include <cstring>
9#ifdef _WIN32
10#include <windows.h>
11#endif
12
13namespace leonida::pipeline_profile {
14
15inline bool enabled() {
16 static const bool enable = [] {
17 const char* value = std::getenv("LEONIDA_PSO_PROFILE");
18 return value && std::strcmp(value, "1") == 0;
19 }();
20 return enable;
21}
22
23inline long long unix_ms() {
24 return std::chrono::duration_cast<std::chrono::milliseconds>(
25 std::chrono::system_clock::now().time_since_epoch()).count();
26}
27
28// CPU charged to the calling thread distinguishes synchronous compilation from time waiting in the driver.
29inline long long thread_cpu_us() {
30#ifdef _WIN32
31 FILETIME creation{}, exit{}, kernel{}, user{};
32 if (GetThreadTimes(GetCurrentThread(), &creation, &exit, &kernel, &user)) {
33 const auto ticks = [](FILETIME t) {
34 return (static_cast<unsigned long long>(t.dwHighDateTime) << 32) | t.dwLowDateTime;
35 };
36 return static_cast<long long>((ticks(kernel) + ticks(user)) / 10);
37 }
38#endif
39 return -1;
40}
41
42class DriverCall {
43public:
44 DriverCall(const char* stage, const char* origin, const char* program, const char* fragment = "-",
45 unsigned unbound = 0) {
46 if (!enabled()) return;
47 static std::atomic<unsigned long long> sequence{0};
48 id_ = sequence.fetch_add(1, std::memory_order_relaxed) + 1;
49 start_ = std::chrono::steady_clock::now();
50 cpu_start_ = thread_cpu_us();
51 std::fprintf(stderr, "[rt] pso-driver begin id=%llu unix_ms=%lld stage=%s origin=%s program=%s ps=%s mask=%u\n",
52 id_, unix_ms(), stage, origin, program, fragment, unbound);
53 }
54
55 void finish(int result) const {
56 if (!id_) return;
57 const auto us = std::chrono::duration_cast<std::chrono::microseconds>(
58 std::chrono::steady_clock::now() - start_).count();
59 const long long cpu = thread_cpu_us();
60 std::fprintf(stderr, "[rt] pso-driver end id=%llu unix_ms=%lld us=%lld cpu_us=%lld result=%d\n",
61 id_, unix_ms(), static_cast<long long>(us), cpu >= 0 && cpu_start_ >= 0 ? cpu - cpu_start_ : -1,
62 result);
63 }
64private:
65 unsigned long long id_ = 0;
66 long long cpu_start_ = -1;
67 std::chrono::steady_clock::time_point start_{};
68};
69
70} // namespace leonida::pipeline_profile
diff --git a/runtime/src/pipeline_workers.h b/runtime/src/pipeline_workers.h
new file mode 100644
index 000000000..664bfe0b8
--- /dev/null
+++ b/runtime/src/pipeline_workers.h
@@ -0,0 +1,173 @@
1// A bounded pool that compiles the pipelines of one submission side by side (docs/d3d12_vulkan.md, "Pipeline creation").
2//
3// run() is a blocking parallel loop: the calling thread works on its own batch beside the workers, so a batch completes
4// even with no worker left (no thread could be started, or stop() was called), and nothing outlives the call. Several
5// threads may call run() at once; they share the workers. The workers are started by the first batch that can use them,
6// so a device that never compiles at draw time has none. They are plain std::threads: a driver's compiler needs the 8 MB
7// of stack the loader's header gives those (docs/pipeline_check.md, "Stack reserve").
8#pragma once
9
10#include <algorithm>
11#include <condition_variable>
12#include <cstddef>
13#include <cstdint>
14#include <deque>
15#include <exception>
16#include <functional>
17#include <mutex>
18#include <system_error>
19#include <thread>
20#include <utility>
21#include <vector>
22
23namespace leonida {
24
25class PipelineWorkers {
26public:
27 static constexpr unsigned kMaxThreads = 64;
28
29 // What the pool has done: batches handed to the workers, the jobs in them, and the jobs running now.
30 struct Stats {
31 unsigned threads = 0; // the most workers the pool starts
32 std::size_t started = 0; // the workers it has started
33 std::uint64_t batches = 0;
34 std::uint64_t jobs = 0;
35 std::size_t running = 0;
36 };
37
38 explicit PipelineWorkers(unsigned threads) : limit_(std::min(threads, kMaxThreads)) {}
39 ~PipelineWorkers() { stop(); }
40 PipelineWorkers(const PipelineWorkers&) = delete;
41 PipelineWorkers& operator=(const PipelineWorkers&) = delete;
42
43 unsigned threads() const { return limit_; }
44
45 // Calls job(0) .. job(count - 1) and returns when every call has returned. When calls threw, rethrows what the
46 // lowest of them threw, after the last has returned. With no workers or a single job the calls are made in order on
47 // this thread, and the first exception ends them.
48 void run(std::size_t count, const std::function<void(std::size_t)>& job) {
49 if (!limit_ || count < 2) {
50 for (std::size_t i = 0; i < count; ++i) job(i);
51 return;
52 }
53 Batch batch{&job, count};
54 std::unique_lock lock(mutex_);
55 queue_.push_back(&batch);
56 ++batches_;
57 jobs_ += count;
58 start(count - 1);
59 work_.notify_all();
60 while (batch.next < batch.count) step(batch, lock);
61 batch.done.wait(lock, [&] { return !batch.running; });
62 lock.unlock();
63 if (batch.error) std::rethrow_exception(batch.error);
64 }
65
66 // Ends the workers once each has finished the job it is in. A run() in progress on another thread finishes its
67 // remaining jobs itself, and so does every later one.
68 void stop() {
69 std::vector<std::thread> threads;
70 {
71 std::lock_guard lock(mutex_);
72 stopping_ = true;
73 threads.swap(threads_);
74 }
75 work_.notify_all();
76 for (std::thread& thread : threads) thread.join();
77 }
78
79 Stats stats() {
80 std::lock_guard lock(mutex_);
81 return {limit_, started_, batches_, jobs_, running_};
82 }
83
84private:
85 struct Batch { // on the stack of the run() that made it; guarded by mutex_
86 const std::function<void(std::size_t)>* job;
87 std::size_t count;
88 std::size_t next = 0;
89 std::size_t running = 0;
90 std::exception_ptr error{};
91 std::size_t error_index = 0;
92 std::condition_variable done{};
93 };
94
95 // With mutex_ held: enough workers for `wanted` more jobs, within the limit.
96 void start(std::size_t wanted) {
97 wanted = std::min<std::size_t>(wanted, limit_);
98 while (!stopping_ && !exhausted_ && threads_.size() < wanted) {
99 try {
100 threads_.emplace_back([this] { work(); });
101 ++started_;
102 } catch (const std::system_error&) {
103 exhausted_ = true; // the workers there are, and the callers, do it all
104 }
105 }
106 }
107
108 void work() {
109 std::unique_lock lock(mutex_);
110 for (;;) {
111 work_.wait(lock, [this] { return stopping_ || !queue_.empty(); });
112 if (stopping_) return;
113 step(*queue_.front(), lock);
114 }
115 }
116
117 // Takes the next job of `batch` (there is one), runs it unlocked, and returns locked. The batch leaves the queue
118 // with its last job, so no worker can reach it once run() has seen nothing left and nothing running.
119 void step(Batch& batch, std::unique_lock<std::mutex>& lock) {
120 const std::size_t index = batch.next++;
121 if (batch.next == batch.count) std::erase(queue_, &batch);
122 ++batch.running;
123 ++running_;
124 lock.unlock();
125 std::exception_ptr error;
126 try {
127 (*batch.job)(index);
128 } catch (...) {
129 error = std::current_exception();
130 }
131 lock.lock();
132 --running_;
133 if (error && (!batch.error || index < batch.error_index)) {
134 batch.error = std::move(error);
135 batch.error_index = index;
136 }
137 // Notified with the mutex held: run() cannot return, and end the batch, before this has.
138 if (!--batch.running && batch.next == batch.count) batch.done.notify_all();
139 }
140
141 const unsigned limit_;
142 std::mutex mutex_;
143 std::condition_variable work_;
144 std::deque<Batch*> queue_; // batches with jobs nobody has taken yet
145 std::vector<std::thread> threads_;
146 bool stopping_ = false;
147 bool exhausted_ = false;
148 std::size_t started_ = 0;
149 std::uint64_t batches_ = 0;
150 std::uint64_t jobs_ = 0;
151 std::size_t running_ = 0;
152};
153
154// LEONIDA_PIPELINE_THREADS: how many workers, 0 for none (pipelines compile on the thread that submits, as before).
155// Unset or empty: half the logical processors and at most 8, past which the compiles of one submission gained little
156// (docs/d3d12_vulkan.md). `valid` is false for text that is not a number, which counts as unset.
157struct PipelineThreads {
158 unsigned count = 0;
159 bool valid = true;
160};
161
162inline PipelineThreads pipeline_threads(const char* text, unsigned logical_processors) {
163 const unsigned automatic = std::min(8u, logical_processors / 2);
164 if (!text || !*text) return {automatic, true};
165 unsigned value = 0;
166 for (const char* c = text; *c; ++c) {
167 if (*c < '0' || *c > '9') return {automatic, false};
168 value = std::min(PipelineWorkers::kMaxThreads, value * 10 + unsigned(*c - '0'));
169 }
170 return {value, true};
171}
172
173} // namespace leonida
diff --git a/runtime/src/present_dump.h b/runtime/src/present_dump.h
new file mode 100644
index 000000000..2e594fcb5
--- /dev/null
+++ b/runtime/src/present_dump.h
@@ -0,0 +1,256 @@
1#pragma once
2
3// LEONIDA_PRESENT_DUMP: the final swapchain texels, encoded on a worker after their frame fence signals.
4#include <vulkan/vulkan.h>
5
6#include <algorithm>
7#include <array>
8#include <atomic>
9#include <charconv>
10#include <cmath>
11#include <cstdint>
12#include <cstdio>
13#include <cstdlib>
14#include <cstring>
15#include <filesystem>
16#include <memory>
17#include <mutex>
18#include <span>
19#include <string>
20#include <thread>
21#include <vector>
22
23namespace leonida::present_dump {
24
25inline unsigned texel_size(VkFormat format) {
26 switch (format) {
27 case VK_FORMAT_B8G8R8A8_UNORM: case VK_FORMAT_B8G8R8A8_SRGB:
28 case VK_FORMAT_R8G8B8A8_UNORM: case VK_FORMAT_R8G8B8A8_SRGB:
29 case VK_FORMAT_A2B10G10R10_UNORM_PACK32: case VK_FORMAT_A2R10G10B10_UNORM_PACK32: return 4;
30 case VK_FORMAT_R16G16B16A16_SFLOAT: return 8;
31 case VK_FORMAT_R32G32B32A32_SFLOAT: return 16;
32 default: return 0;
33 }
34}
35
36inline std::uint8_t unorm8(float v) {
37 return v > 0 ? std::uint8_t(std::min(v, 1.0f) * 255 + 0.5f) : 0;
38}
39
40inline std::uint8_t half_unorm8(std::uint16_t bits) {
41 const int exponent = bits >> 10;
42 const int fraction = bits & 1023;
43 if (bits >= 0x8000 || !exponent || (exponent == 31 && fraction)) return 0;
44 return unorm8(std::ldexp(float(1024 + fraction), exponent - 25));
45}
46
47inline void rgba_row(std::uint8_t* dst, const std::uint8_t* src, unsigned width, VkFormat format, bool pq) {
48 if (format == VK_FORMAT_R8G8B8A8_UNORM || format == VK_FORMAT_R8G8B8A8_SRGB) {
49 std::memcpy(dst, src, size_t(width) * 4);
50 return;
51 }
52 const unsigned stride = texel_size(format);
53 for (unsigned x = 0; x < width; ++x, src += stride, dst += 4) {
54 if (format == VK_FORMAT_B8G8R8A8_UNORM || format == VK_FORMAT_B8G8R8A8_SRGB) {
55 dst[0] = src[2]; dst[1] = src[1]; dst[2] = src[0]; dst[3] = src[3];
56 } else if (format == VK_FORMAT_R16G16B16A16_SFLOAT) {
57 std::uint16_t v[4];
58 std::memcpy(v, src, sizeof(v));
59 std::transform(v, v + 4, dst, half_unorm8);
60 } else if (format == VK_FORMAT_R32G32B32A32_SFLOAT) {
61 float v[4];
62 std::memcpy(v, src, sizeof(v));
63 std::transform(v, v + 4, dst, unorm8);
64 } else {
65 // A cheap HDR10 preview: decode ST.2084 per component, clip at 203 nits and encode for SDR.
66 // Keep the source primaries. A 10-bit SDR swapchain just scales its code values to eight bits.
67 static const auto pq_to_sdr = [] {
68 std::array<std::uint8_t, 1024> table{};
69 for (unsigned i = 0; i < table.size(); ++i) {
70 const double p = std::pow(i / 1023.0, 1.0 / 78.84375);
71 const double linear = (10000.0 / 203.0) *
72 std::pow(std::max(0.0, p - 0.8359375) / (18.8515625 - 18.6875 * p), 1.0 / 0.1593017578125);
73 const double srgb = linear <= 0.0031308 ? 12.92 * linear : 1.055 * std::pow(linear, 1.0 / 2.4) - 0.055;
74 table[i] = unorm8(float(srgb));
75 }
76 return table;
77 }();
78 std::uint32_t packed;
79 std::memcpy(&packed, src, sizeof(packed));
80 for (unsigned channel = 0; channel < 3; ++channel) {
81 const unsigned bits = (packed >> (10 * channel)) & 1023;
82 dst[channel] = pq ? pq_to_sdr[bits] : std::uint8_t((bits * 255 + 511) / 1023);
83 }
84 if (format == VK_FORMAT_A2R10G10B10_UNORM_PACK32) std::swap(dst[0], dst[2]);
85 dst[3] = std::uint8_t((packed >> 30) * 85);
86 }
87 }
88}
89
90inline std::array<std::uint8_t, 4> big_endian(std::uint32_t n) {
91 return {std::uint8_t(n >> 24), std::uint8_t(n >> 16), std::uint8_t(n >> 8), std::uint8_t(n)};
92}
93
94inline bool chunk(std::FILE* file, const char (&type)[5], std::span<const std::uint8_t> data,
95 std::span<const std::uint8_t> prefix = {}) {
96 static constexpr auto crc_table = [] {
97 std::array<std::uint32_t, 256> table{};
98 for (unsigned i = 0; i < table.size(); ++i) {
99 unsigned c = i;
100 for (int bit = 0; bit < 8; ++bit) c = (c >> 1) ^ ((c & 1) ? 0xedb88320u : 0);
101 table[i] = c;
102 }
103 return table;
104 }();
105 std::uint32_t crc = ~0u;
106 const auto write = [&](std::span<const std::uint8_t> bytes) {
107 for (auto b : bytes) crc = crc_table[(crc ^ b) & 255] ^ (crc >> 8);
108 return bytes.empty() || std::fwrite(bytes.data(), 1, bytes.size(), file) == bytes.size();
109 };
110 return std::fwrite(big_endian(std::uint32_t(prefix.size() + data.size())).data(), 1, 4, file) == 4 &&
111 write({reinterpret_cast<const std::uint8_t*>(type), 4}) && write(prefix) && write(data) &&
112 std::fwrite(big_endian(~crc).data(), 1, 4, file) == 4;
113}
114
115inline bool write_png(std::FILE* file, VkExtent2D extent, VkFormat format, bool pq, const std::uint8_t* src) {
116 constexpr std::uint8_t signature[]{137, 80, 78, 71, 13, 10, 26, 10};
117 std::array<std::uint8_t, 13> ihdr{};
118 const auto w = big_endian(extent.width), h = big_endian(extent.height);
119 std::copy(w.begin(), w.end(), ihdr.begin());
120 std::copy(h.begin(), h.end(), ihdr.begin() + 4);
121 ihdr[8] = 8;
122 ihdr[9] = 6; // 8-bit RGBA
123 constexpr std::uint8_t zlib_header[]{0x78, 0x01};
124 if (std::fwrite(signature, 1, sizeof(signature), file) != sizeof(signature) ||
125 !chunk(file, "IHDR", ihdr) || !chunk(file, "IDAT", zlib_header)) return false;
126
127 // IDAT chunks concatenate to one zlib stream. Each scanline starts with PNG filter 0 and occupies
128 // one or more stored DEFLATE blocks (16-bit little-endian length and its ones' complement).
129 std::vector<std::uint8_t> row(1 + size_t(extent.width) * 4);
130 std::uint32_t a = 1, b = 0;
131 for (unsigned y = 0; y < extent.height; ++y, src += size_t(extent.width) * texel_size(format)) {
132 rgba_row(row.data() + 1, src, extent.width, format, pq);
133 std::span<const std::uint8_t> rest(row);
134 while (!rest.empty()) {
135 auto block = rest.first(std::min<size_t>(rest.size(), 65535));
136 rest = rest.subspan(block.size());
137 const auto len = std::uint16_t(block.size());
138 const std::uint8_t header[]{std::uint8_t(y + 1 == extent.height && rest.empty()),
139 std::uint8_t(len), std::uint8_t(len >> 8), std::uint8_t(~len), std::uint8_t((len >> 8) ^ 255)};
140 for (auto byte : block) {
141 a = (a + byte) % 65521;
142 b = (b + a) % 65521;
143 }
144 if (!chunk(file, "IDAT", block, header)) return false;
145 }
146 }
147 return chunk(file, "IDAT", big_endian((b << 16) | a)) && chunk(file, "IEND", {});
148}
149
150class PresentDump {
151public:
152 PresentDump() {
153#ifdef _WIN32
154 wchar_t* env = nullptr;
155 size_t length = 0;
156 if (_wdupenv_s(&env, &length, L"LEONIDA_PRESENT_DUMP") != 0) {
157 bad_value();
158 return;
159 }
160 const std::unique_ptr<wchar_t, decltype(&std::free)> owned(env, &std::free);
161#else
162 const auto* env = std::getenv("LEONIDA_PRESENT_DUMP");
163#endif
164 if (!env) return;
165 try {
166 auto value = std::filesystem::path(env).native();
167 std::uint64_t interval = 60;
168 const auto comma = value.rfind(',');
169 if (comma != value.npos) {
170 const auto n = std::filesystem::path(value.substr(comma + 1)).string();
171 const auto end = n.data() + n.size();
172 const auto parsed = std::from_chars(n.data(), end, interval);
173 if (parsed.ec != std::errc{} || parsed.ptr != end || !interval) {
174 bad_value();
175 return;
176 }
177 value.resize(comma);
178 }
179 if (value.empty()) {
180 bad_value();
181 return;
182 }
183 dir_ = std::filesystem::absolute(value);
184 std::filesystem::create_directories(dir_);
185 interval_ = interval;
186 } catch (const std::exception&) { bad_value(); }
187 }
188
189 bool enabled() const { return interval_ != 0; }
190 bool due(std::uint64_t frames_shown) const {
191 const auto n = interval_.load();
192 return n && frames_shown % n == 0;
193 }
194 void disable(const char* why) {
195 if (interval_.exchange(0)) std::fprintf(stderr, "[rt] present: %s; LEONIDA_PRESENT_DUMP disabled\n", why);
196 }
197 void save(std::uint64_t frame, VkExtent2D extent, VkFormat format, bool pq, const std::uint8_t* src, size_t size) {
198 try {
199 // Bound memory to one outstanding write even at N=1. Teardown joins the final writer.
200 if (writer_.joinable()) writer_.join();
201 if (!enabled()) return;
202 char name[48];
203 std::snprintf(name, sizeof(name), "present_%06llu.png", static_cast<unsigned long long>(frame));
204 writer_ = std::jthread([this, frame, extent, format, pq, path = dir_ / name,
205 bytes = std::vector<std::uint8_t>(src, src + size)] {
206 try {
207 if (publish(path, extent, format, pq, bytes.data())) {
208 const auto utf8 = path.u8string();
209 std::fprintf(stderr, "[rt] present: dumped frame %llu to %s\n",
210 static_cast<unsigned long long>(frame), reinterpret_cast<const char*>(utf8.c_str()));
211 return;
212 }
213 } catch (const std::exception&) {}
214 disable("could not write the present dump");
215 });
216 } catch (const std::exception&) { disable("could not queue the present dump"); }
217 }
218
219private:
220 static void bad_value() {
221 static std::once_flag once;
222 std::call_once(once, [] {
223 std::fprintf(stderr, "[rt] present: invalid LEONIDA_PRESENT_DUMP (expected a writable dir[,N], N > 0); disabled\n");
224 });
225 }
226 static bool publish(const std::filesystem::path& path, VkExtent2D extent, VkFormat format, bool pq,
227 const std::uint8_t* src) {
228 // Never open an existing output for writing: it could be a link to a file outside the dump directory.
229 // Build a complete sibling exclusively, then replace the directory entry in a single rename.
230 auto tmp = path;
231 tmp += ".tmp";
232#ifdef _WIN32
233 std::FILE* file = nullptr;
234 _wfopen_s(&file, tmp.c_str(), L"wbx");
235#else
236 auto* file = std::fopen(tmp.c_str(), "wbx");
237#endif
238 if (!file) return false;
239 bool ok = false;
240 try { ok = write_png(file, extent, format, pq, src); } catch (const std::exception&) {}
241 if (std::fclose(file) != 0) ok = false;
242 std::error_code ec;
243 if (ok) {
244 std::filesystem::rename(tmp, path, ec);
245 if (!ec) return true;
246 }
247 std::filesystem::remove(tmp, ec);
248 return false;
249 }
250
251 std::filesystem::path dir_;
252 std::atomic<std::uint64_t> interval_{0};
253 std::jthread writer_; // joined before the state it uses is destroyed
254};
255
256} // namespace leonida::present_dump
diff --git a/runtime/src/quad_index_expand.comp b/runtime/src/quad_index_expand.comp
new file mode 100644
index 000000000..697cf7665
--- /dev/null
+++ b/runtime/src/quad_index_expand.comp
@@ -0,0 +1,44 @@
1// Expand the index buffer of a console quad list into triangle-list indices without reading it on the CPU
2// (quad_index_expand.h). Each quad (i0 i1 i2 i3) becomes (i0 i1 i2) (i0 i2 i3) as six 32-bit indices: both
3// triangles start at the quad's first vertex, the one a flat input is taken from.
4#version 460
5#extension GL_EXT_buffer_reference : require
6layout(local_size_x = 64) in;
7layout(buffer_reference, std430, buffer_reference_align = 4) readonly buffer WordsIn {
8 uint data[];
9};
10layout(buffer_reference, std430, buffer_reference_align = 4) writeonly buffer WordsOut {
11 uint data[];
12};
13layout(push_constant) uniform Params {
14 WordsIn source; // the 4-byte aligned word that holds this dispatch's first index
15 WordsOut triangles; // six words for each quad of this dispatch
16 uint first_half; // 16-bit indices: 1 when the first index is the high half of its word
17 uint index_bits; // 16 or 32
18 uint limit; // how many of this dispatch's indices the index buffer view holds; the rest read 0
19 uint quads;
20} p;
21
22uint index_at(uint i) {
23 if (i >= p.limit) return 0u;
24 if (p.index_bits == 32u) return p.source.data[i];
25 const uint slot = i + p.first_half;
26 return (p.source.data[slot >> 1u] >> ((slot & 1u) * 16u)) & 0xffffu;
27}
28
29void main() {
30 const uint quad = gl_GlobalInvocationID.x;
31 if (quad >= p.quads) return;
32 const uint first = quad * 4u;
33 const uint i0 = index_at(first);
34 const uint i1 = index_at(first + 1u);
35 const uint i2 = index_at(first + 2u);
36 const uint i3 = index_at(first + 3u);
37 const uint target = quad * 6u;
38 p.triangles.data[target] = i0;
39 p.triangles.data[target + 1u] = i1;
40 p.triangles.data[target + 2u] = i2;
41 p.triangles.data[target + 3u] = i0;
42 p.triangles.data[target + 4u] = i2;
43 p.triangles.data[target + 5u] = i3;
44}
diff --git a/runtime/src/quad_index_expand.h b/runtime/src/quad_index_expand.h
new file mode 100644
index 000000000..3c539a540
--- /dev/null
+++ b/runtime/src/quad_index_expand.h
@@ -0,0 +1,182 @@
1// Indexed console quad lists (D3D_PRIMITIVE_TOPOLOGY 19) on Vulkan, which has no quad primitive.
2//
3// A quad is four indices and Vulkan can only draw it as triangles. A triangle fan per quad reads the application's
4// index buffer in place, but gets two things wrong: a fan takes a flat input from each triangle's own first vertex
5// (the quad's second and third), where the quad takes it from its first, and one draw per quad runs every instance
6// of quad 0 before quad 1, where D3D12 draws instance by instance (visible when instances overlap). So the indices
7// are rewritten instead: a compute pass (quad_index_expand.comp) reads the application's index buffer on the GPU and
8// writes (i0 i1 i2) (i0 i2 i3) for each quad as 32-bit indices into scratch that lives until the submission
9// completes (vulkan_scratch.h), and the draw is one indexed triangle list over that scratch with the application's
10// instance count, base vertex and first instance. Both triangles start at the quad's first vertex, so a flat input
11// is the first vertex's over the whole quad, and one draw keeps D3D12's instance order.
12//
13// The indices are read on the GPU, never on the host: an index buffer can be written by a copy or a shader earlier
14// in the same list. Index values are copied as they are (a 16-bit index is zero-extended), so VertexIndex -
15// BaseVertex is still the application's index. That includes the strip-cut value: 0xFFFF and 0xFFFFFFFF are
16// ordinary indices in a quad list, as in every list topology (the replay enables primitive restart for strips only),
17// and 0xFFFF stays vertex 65535 after the widening. An index past the end of the index buffer view reads 0, as
18// D3D12 defines it, and a draw's last one to three indices that do not make a quad are dropped.
19//
20// Needs bufferDeviceAddress (the pass reads and writes through device addresses, no descriptors) and scratch with
21// INDEX_BUFFER and SHADER_DEVICE_ADDRESS usage. Non-indexed quad lists do not come here: they draw from a shared
22// constant index buffer (ReplayFunctions::quad_indices).
23#pragma once
24#ifndef VK_NO_PROTOTYPES
25#define VK_NO_PROTOTYPES
26#endif
27#include <vulkan/vulkan.h>
28#include <algorithm>
29#include <cstdint>
30#include "quad_index_expand_spv.h"
31
32namespace leonida {
33
34// One indexed quad-list draw's expansion. `buffer` is null for a draw that needs none.
35struct QuadIndexExpansion {
36 VkBuffer buffer = VK_NULL_HANDLE; // the triangle-list indices, 32-bit: six for each quad
37 VkDeviceSize offset = 0;
38 VkDeviceAddress source = 0; // the 4-byte aligned word that holds the draw's first index
39 VkDeviceAddress triangles = 0; // `buffer` + `offset`
40 std::uint64_t readable = 0; // indices from the draw's first one that the index buffer view holds
41 std::uint32_t first_half = 0; // 16-bit indices: 1 when the first index is the high half of its word
42 std::uint32_t index_bits = 0; // 16 or 32
43 std::uint32_t quads = 0;
44};
45
46class QuadIndexExpander {
47public:
48 static constexpr std::uint32_t indices_per_quad = 6;
49 // vkCmdDrawIndexed counts the expanded indices in 32 bits.
50 static constexpr std::uint32_t max_quads = UINT32_MAX / indices_per_quad;
51 // The scratch bytes `quads` quads expand into.
52 static constexpr VkDeviceSize bytes(std::uint32_t quads) {
53 return VkDeviceSize(quads) * indices_per_quad * sizeof(std::uint32_t);
54 }
55
56 QuadIndexExpander(PFN_vkGetDeviceProcAddr get, VkDevice device, const VkPhysicalDeviceLimits& limits)
57 : get_(get), device_(device), limits_(limits) {}
58 ~QuadIndexExpander() {
59 if (pipeline_) fn<PFN_vkDestroyPipeline>("vkDestroyPipeline")(device_, pipeline_, nullptr);
60 if (layout_) fn<PFN_vkDestroyPipelineLayout>("vkDestroyPipelineLayout")(device_, layout_, nullptr);
61 }
62 QuadIndexExpander(const QuadIndexExpander&) = delete;
63 QuadIndexExpander& operator=(const QuadIndexExpander&) = delete;
64
65 // `quads` quads from the indices at `index_offset` in `indices` (the draw's first index), of which the view holds
66 // `readable`, into bytes(quads) of `scratch` at `scratch_offset`. The pipeline is made on the first call; the
67 // caller serializes calls. False, with `out` cleared, when the draw cannot be expanded.
68 bool prepare(VkBuffer indices, VkDeviceSize index_offset, VkIndexType type, std::uint64_t readable,
69 std::uint32_t quads, VkBuffer scratch, VkDeviceSize scratch_offset, QuadIndexExpansion& out) {
70 out = {};
71 const std::uint32_t index_bytes = type == VK_INDEX_TYPE_UINT16 ? 2 : type == VK_INDEX_TYPE_UINT32 ? 4 : 0;
72 if (!indices || !scratch || !index_bytes || !quads || quads > max_quads || index_offset % index_bytes ||
73 scratch_offset % sizeof(std::uint32_t) || !limits_.maxComputeWorkGroupCount[0] || !make_pipeline())
74 return false;
75 const auto address = fn<PFN_vkGetBufferDeviceAddress>("vkGetBufferDeviceAddress");
76 VkBufferDeviceAddressInfo info{VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO};
77 info.buffer = indices;
78 const VkDeviceAddress source = address(device_, &info);
79 info.buffer = scratch;
80 const VkDeviceAddress target = address(device_, &info);
81 if (!source || !target || index_offset > UINT64_MAX - source || scratch_offset > UINT64_MAX - target ||
82 (source % sizeof(std::uint32_t)) || (target % sizeof(std::uint32_t)))
83 return false;
84 out.buffer = scratch;
85 out.offset = scratch_offset;
86 // The shader reads whole words: a 16-bit index at an address of 2 modulo 4 is the high half of its word.
87 out.source = (source + index_offset) & ~VkDeviceAddress(3);
88 out.first_half = std::uint32_t((index_offset & 3) / 2);
89 out.triangles = target + scratch_offset;
90 out.readable = readable;
91 out.index_bits = index_bytes * 8;
92 out.quads = quads;
93 return true;
94 }
95
96 // Records the pass: outside a render pass, before the draw that binds job.buffer as its index buffer.
97 void emit(VkCommandBuffer cb, const QuadIndexExpansion& job) const {
98 const auto barrier = fn<PFN_vkCmdPipelineBarrier>("vkCmdPipelineBarrier");
99 // Whatever wrote the application's indices earlier in the command buffer (a copy, a shader) is visible.
100 VkMemoryBarrier before{VK_STRUCTURE_TYPE_MEMORY_BARRIER};
101 before.srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT;
102 before.dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
103 barrier(cb, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
104 0, 1, &before, 0, nullptr, 0, nullptr);
105 fn<PFN_vkCmdBindPipeline>("vkCmdBindPipeline")(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline_);
106 struct Push {
107 VkDeviceAddress source, triangles;
108 std::uint32_t first_half, index_bits, limit, quads;
109 };
110 static_assert(sizeof(Push) == push_bytes);
111 // A dispatch indexes its quads and their indices in 32 bits: 4 * quad + 4 and 6 * quad + 5 must fit.
112 constexpr VkDeviceSize index_limit = 1u << 28;
113 const VkDeviceSize chunk_limit =
114 std::min(VkDeviceSize(limits_.maxComputeWorkGroupCount[0]) * group_size, index_limit);
115 for (VkDeviceSize first = 0; first < job.quads;) {
116 const std::uint32_t quads = std::uint32_t(std::min<VkDeviceSize>(chunk_limit, job.quads - first));
117 const VkDeviceSize first_index = first * 4;
118 // 16-bit indices: `first_index` is even, so the chunk starts at the same half of a word as the draw.
119 const VkDeviceSize source_bytes = first_index * (job.index_bits / 8);
120 const std::uint64_t left = job.readable > first_index ? job.readable - first_index : 0;
121 const Push push{job.source + source_bytes, job.triangles + first * indices_per_quad * 4,
122 job.first_half, job.index_bits, std::uint32_t(std::min<std::uint64_t>(left, UINT32_MAX)),
123 quads};
124 fn<PFN_vkCmdPushConstants>("vkCmdPushConstants")(cb, layout_, VK_SHADER_STAGE_COMPUTE_BIT, 0,
125 sizeof(push), &push);
126 fn<PFN_vkCmdDispatch>("vkCmdDispatch")(cb, (quads - 1u) / group_size + 1u, 1, 1);
127 first += quads;
128 }
129 VkMemoryBarrier after{VK_STRUCTURE_TYPE_MEMORY_BARRIER};
130 after.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT;
131 after.dstAccessMask = VK_ACCESS_INDEX_READ_BIT;
132 barrier(cb, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_VERTEX_INPUT_BIT,
133 0, 1, &after, 0, nullptr, 0, nullptr);
134 }
135
136private:
137 static constexpr std::uint32_t group_size = 64; // local_size_x of quad_index_expand.comp
138 static constexpr std::uint32_t push_bytes = 32;
139 template<typename T> T fn(const char* name) const { return reinterpret_cast<T>(get_(device_, name)); }
140 bool make_pipeline() {
141 if (pipeline_) return true;
142 for (const char* name : {"vkGetBufferDeviceAddress", "vkCreateShaderModule", "vkDestroyShaderModule",
143 "vkCreatePipelineLayout", "vkDestroyPipelineLayout", "vkCreateComputePipelines", "vkDestroyPipeline",
144 "vkCmdPipelineBarrier", "vkCmdBindPipeline", "vkCmdPushConstants", "vkCmdDispatch"})
145 if (!get_(device_, name)) return false;
146 VkShaderModule module = VK_NULL_HANDLE;
147 VkPipelineLayout layout = VK_NULL_HANDLE;
148 VkPipeline pipeline = VK_NULL_HANDLE;
149 VkShaderModuleCreateInfo shader{VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO};
150 shader.codeSize = sizeof(quad_index_expand_spirv);
151 shader.pCode = quad_index_expand_spirv;
152 bool ok = fn<PFN_vkCreateShaderModule>("vkCreateShaderModule")(device_, &shader, nullptr, &module) == VK_SUCCESS;
153 const VkPushConstantRange range{VK_SHADER_STAGE_COMPUTE_BIT, 0, push_bytes};
154 VkPipelineLayoutCreateInfo layout_info{VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO};
155 layout_info.pushConstantRangeCount = 1;
156 layout_info.pPushConstantRanges = &range;
157 ok = ok && fn<PFN_vkCreatePipelineLayout>("vkCreatePipelineLayout")(device_, &layout_info, nullptr, &layout) == VK_SUCCESS;
158 VkComputePipelineCreateInfo info{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO};
159 info.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO};
160 info.stage.stage = VK_SHADER_STAGE_COMPUTE_BIT;
161 info.stage.module = module;
162 info.stage.pName = "main";
163 info.layout = layout;
164 ok = ok && fn<PFN_vkCreateComputePipelines>("vkCreateComputePipelines")(
165 device_, VK_NULL_HANDLE, 1, &info, nullptr, &pipeline) == VK_SUCCESS;
166 if (module) fn<PFN_vkDestroyShaderModule>("vkDestroyShaderModule")(device_, module, nullptr);
167 if (!ok) {
168 if (pipeline) fn<PFN_vkDestroyPipeline>("vkDestroyPipeline")(device_, pipeline, nullptr);
169 if (layout) fn<PFN_vkDestroyPipelineLayout>("vkDestroyPipelineLayout")(device_, layout, nullptr);
170 return false;
171 }
172 layout_ = layout;
173 pipeline_ = pipeline;
174 return true;
175 }
176 PFN_vkGetDeviceProcAddr get_;
177 VkDevice device_;
178 VkPhysicalDeviceLimits limits_;
179 VkPipelineLayout layout_ = VK_NULL_HANDLE;
180 VkPipeline pipeline_ = VK_NULL_HANDLE;
181};
182} // namespace leonida
diff --git a/runtime/src/quad_index_expand_spv.h b/runtime/src/quad_index_expand_spv.h
new file mode 100644
index 000000000..c7bb4b5c5
--- /dev/null
+++ b/runtime/src/quad_index_expand_spv.h
@@ -0,0 +1,148 @@
1// Generated with glslang 16.6.0: glslangValidator -V --target-env vulkan1.2 -Os --spirv-val quad_index_expand.comp
2#pragma once
3#include <cstdint>
4namespace leonida {
5inline constexpr std::uint32_t quad_index_expand_spirv[] = {
6 0x07230203u, 0x00010500u, 0x0008000bu, 0x00000149u, 0x00000000u, 0x00020011u, 0x00000001u, 0x00020011u,
7 0x000014e3u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu, 0x00000000u, 0x0003000eu,
8 0x000014e4u, 0x00000001u, 0x0007000fu, 0x00000005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00000015u,
9 0x0000004au, 0x00060010u, 0x00000004u, 0x00000011u, 0x00000040u, 0x00000001u, 0x00000001u, 0x00030003u,
10 0x00000002u, 0x000001ccu, 0x00070004u, 0x455f4c47u, 0x625f5458u, 0x65666675u, 0x65725f72u, 0x65726566u,
11 0x0065636eu, 0x00040005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00040005u, 0x0000000fu, 0x61726150u,
12 0x0000736du, 0x00050006u, 0x0000000fu, 0x00000000u, 0x72756f73u, 0x00006563u, 0x00060006u, 0x0000000fu,
13 0x00000001u, 0x61697274u, 0x656c676eu, 0x00000073u, 0x00060006u, 0x0000000fu, 0x00000002u, 0x73726966u,
14 0x61685f74u, 0x0000666cu, 0x00060006u, 0x0000000fu, 0x00000003u, 0x65646e69u, 0x69625f78u, 0x00007374u,
15 0x00050006u, 0x0000000fu, 0x00000004u, 0x696d696cu, 0x00000074u, 0x00050006u, 0x0000000fu, 0x00000005u,
16 0x64617571u, 0x00000073u, 0x00040005u, 0x00000011u, 0x64726f57u, 0x006e4973u, 0x00050006u, 0x00000011u,
17 0x00000000u, 0x61746164u, 0x00000000u, 0x00050005u, 0x00000013u, 0x64726f57u, 0x74754f73u, 0x00000000u,
18 0x00050006u, 0x00000013u, 0x00000000u, 0x61746164u, 0x00000000u, 0x00030005u, 0x00000015u, 0x00000070u,
19 0x00080005u, 0x0000004au, 0x475f6c67u, 0x61626f6cu, 0x766e496cu, 0x7461636fu, 0x496e6f69u, 0x00000044u,
20 0x00030047u, 0x0000000fu, 0x00000002u, 0x00050048u, 0x0000000fu, 0x00000000u, 0x00000023u, 0x00000000u,
21 0x00050048u, 0x0000000fu, 0x00000001u, 0x00000023u, 0x00000008u, 0x00050048u, 0x0000000fu, 0x00000002u,
22 0x00000023u, 0x00000010u, 0x00050048u, 0x0000000fu, 0x00000003u, 0x00000023u, 0x00000014u, 0x00050048u,
23 0x0000000fu, 0x00000004u, 0x00000023u, 0x00000018u, 0x00050048u, 0x0000000fu, 0x00000005u, 0x00000023u,
24 0x0000001cu, 0x00040047u, 0x00000010u, 0x00000006u, 0x00000004u, 0x00030047u, 0x00000011u, 0x00000002u,
25 0x00040048u, 0x00000011u, 0x00000000u, 0x00000018u, 0x00050048u, 0x00000011u, 0x00000000u, 0x00000023u,
26 0x00000000u, 0x00040047u, 0x00000012u, 0x00000006u, 0x00000004u, 0x00030047u, 0x00000013u, 0x00000002u,
27 0x00040048u, 0x00000013u, 0x00000000u, 0x00000019u, 0x00050048u, 0x00000013u, 0x00000000u, 0x00000023u,
28 0x00000000u, 0x00040047u, 0x0000004au, 0x0000000bu, 0x0000001cu, 0x00040047u, 0x0000009au, 0x0000000bu,
29 0x00000019u, 0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u, 0x00000002u, 0x00040015u, 0x00000006u,
30 0x00000020u, 0x00000000u, 0x00030027u, 0x0000000du, 0x000014e5u, 0x00030027u, 0x0000000eu, 0x000014e5u,
31 0x0008001eu, 0x0000000fu, 0x0000000du, 0x0000000eu, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u,
32 0x0003001du, 0x00000010u, 0x00000006u, 0x0003001eu, 0x00000011u, 0x00000010u, 0x00040020u, 0x0000000du,
33 0x000014e5u, 0x00000011u, 0x0003001du, 0x00000012u, 0x00000006u, 0x0003001eu, 0x00000013u, 0x00000012u,
34 0x00040020u, 0x0000000eu, 0x000014e5u, 0x00000013u, 0x00040020u, 0x00000014u, 0x00000009u, 0x0000000fu,
35 0x0004003bu, 0x00000014u, 0x00000015u, 0x00000009u, 0x00040015u, 0x00000016u, 0x00000020u, 0x00000001u,
36 0x0004002bu, 0x00000016u, 0x00000017u, 0x00000004u, 0x00040020u, 0x00000018u, 0x00000009u, 0x00000006u,
37 0x00020014u, 0x0000001bu, 0x0004002bu, 0x00000006u, 0x0000001fu, 0x00000000u, 0x0004002bu, 0x00000016u,
38 0x00000021u, 0x00000003u, 0x0004002bu, 0x00000006u, 0x00000024u, 0x00000020u, 0x0004002bu, 0x00000016u,
39 0x00000028u, 0x00000000u, 0x00040020u, 0x00000029u, 0x00000009u, 0x0000000du, 0x00040020u, 0x0000002du,
40 0x000014e5u, 0x00000006u, 0x0004002bu, 0x00000016u, 0x00000033u, 0x00000002u, 0x0004002bu, 0x00000006u,
41 0x0000003au, 0x00000001u, 0x0004002bu, 0x00000006u, 0x00000040u, 0x00000010u, 0x0004002bu, 0x00000006u,
42 0x00000043u, 0x0000ffffu, 0x00040017u, 0x00000048u, 0x00000006u, 0x00000003u, 0x00040020u, 0x00000049u,
43 0x00000001u, 0x00000048u, 0x0004003bu, 0x00000049u, 0x0000004au, 0x00000001u, 0x00040020u, 0x0000004bu,
44 0x00000001u, 0x00000006u, 0x0004002bu, 0x00000016u, 0x0000004fu, 0x00000005u, 0x0004002bu, 0x00000006u,
45 0x00000058u, 0x00000004u, 0x0004002bu, 0x00000006u, 0x00000065u, 0x00000002u, 0x0004002bu, 0x00000006u,
46 0x0000006bu, 0x00000003u, 0x0004002bu, 0x00000006u, 0x00000071u, 0x00000006u, 0x0004002bu, 0x00000016u,
47 0x00000073u, 0x00000001u, 0x00040020u, 0x00000074u, 0x00000009u, 0x0000000eu, 0x0004002bu, 0x00000006u,
48 0x00000095u, 0x00000005u, 0x0004002bu, 0x00000006u, 0x00000099u, 0x00000040u, 0x0006002cu, 0x00000048u,
49 0x0000009au, 0x00000099u, 0x0000003au, 0x0000003au, 0x00050036u, 0x00000002u, 0x00000004u, 0x00000000u,
50 0x00000003u, 0x000200f8u, 0x00000005u, 0x000300f7u, 0x0000009bu, 0x00000000u, 0x000300fbu, 0x0000001fu,
51 0x0000009cu, 0x000200f8u, 0x0000009cu, 0x00050041u, 0x0000004bu, 0x0000004cu, 0x0000004au, 0x0000001fu,
52 0x0004003du, 0x00000006u, 0x0000004du, 0x0000004cu, 0x00050041u, 0x00000018u, 0x00000050u, 0x00000015u,
53 0x0000004fu, 0x0004003du, 0x00000006u, 0x00000051u, 0x00000050u, 0x000500aeu, 0x0000001bu, 0x00000052u,
54 0x0000004du, 0x00000051u, 0x000300f7u, 0x00000054u, 0x00000000u, 0x000400fau, 0x00000052u, 0x00000053u,
55 0x00000054u, 0x000200f8u, 0x00000053u, 0x000200f9u, 0x0000009bu, 0x000200f8u, 0x00000054u, 0x00050084u,
56 0x00000006u, 0x00000059u, 0x0000004du, 0x00000058u, 0x000300f7u, 0x000000cbu, 0x00000000u, 0x000300fbu,
57 0x0000001fu, 0x000000abu, 0x000200f8u, 0x000000abu, 0x00050041u, 0x00000018u, 0x000000adu, 0x00000015u,
58 0x00000017u, 0x0004003du, 0x00000006u, 0x000000aeu, 0x000000adu, 0x000500aeu, 0x0000001bu, 0x000000afu,
59 0x00000059u, 0x000000aeu, 0x000300f7u, 0x000000b1u, 0x00000000u, 0x000400fau, 0x000000afu, 0x000000b0u,
60 0x000000b1u, 0x000200f8u, 0x000000b0u, 0x000200f9u, 0x000000cbu, 0x000200f8u, 0x000000b1u, 0x00050041u,
61 0x00000018u, 0x000000b2u, 0x00000015u, 0x00000021u, 0x0004003du, 0x00000006u, 0x000000b3u, 0x000000b2u,
62 0x000500aau, 0x0000001bu, 0x000000b4u, 0x000000b3u, 0x00000024u, 0x000300f7u, 0x000000bbu, 0x00000000u,
63 0x000400fau, 0x000000b4u, 0x000000b5u, 0x000000bbu, 0x000200f8u, 0x000000b5u, 0x00050041u, 0x00000029u,
64 0x000000b6u, 0x00000015u, 0x00000028u, 0x0004003du, 0x0000000du, 0x000000b7u, 0x000000b6u, 0x00060041u,
65 0x0000002du, 0x000000b9u, 0x000000b7u, 0x00000028u, 0x00000059u, 0x0006003du, 0x00000006u, 0x000000bau,
66 0x000000b9u, 0x00000002u, 0x00000004u, 0x000200f9u, 0x000000cbu, 0x000200f8u, 0x000000bbu, 0x00050041u,
67 0x00000018u, 0x000000bdu, 0x00000015u, 0x00000033u, 0x0004003du, 0x00000006u, 0x000000beu, 0x000000bdu,
68 0x00050080u, 0x00000006u, 0x000000bfu, 0x00000059u, 0x000000beu, 0x00050041u, 0x00000029u, 0x000000c0u,
69 0x00000015u, 0x00000028u, 0x0004003du, 0x0000000du, 0x000000c1u, 0x000000c0u, 0x000500c2u, 0x00000006u,
70 0x000000c3u, 0x000000bfu, 0x0000003au, 0x00060041u, 0x0000002du, 0x000000c4u, 0x000000c1u, 0x00000028u,
71 0x000000c3u, 0x0006003du, 0x00000006u, 0x000000c5u, 0x000000c4u, 0x00000002u, 0x00000004u, 0x000500c7u,
72 0x00000006u, 0x000000c7u, 0x000000bfu, 0x0000003au, 0x00050084u, 0x00000006u, 0x000000c8u, 0x000000c7u,
73 0x00000040u, 0x000500c2u, 0x00000006u, 0x000000c9u, 0x000000c5u, 0x000000c8u, 0x000500c7u, 0x00000006u,
74 0x000000cau, 0x000000c9u, 0x00000043u, 0x000200f9u, 0x000000cbu, 0x000200f8u, 0x000000cbu, 0x000900f5u,
75 0x00000006u, 0x00000142u, 0x0000001fu, 0x000000b0u, 0x000000bau, 0x000000b5u, 0x000000cau, 0x000000bbu,
76 0x00050080u, 0x00000006u, 0x00000060u, 0x00000059u, 0x0000003au, 0x000300f7u, 0x000000f2u, 0x00000000u,
77 0x000300fbu, 0x0000001fu, 0x000000d2u, 0x000200f8u, 0x000000d2u, 0x000500aeu, 0x0000001bu, 0x000000d6u,
78 0x00000060u, 0x000000aeu, 0x000300f7u, 0x000000d8u, 0x00000000u, 0x000400fau, 0x000000d6u, 0x000000d7u,
79 0x000000d8u, 0x000200f8u, 0x000000d7u, 0x000200f9u, 0x000000f2u, 0x000200f8u, 0x000000d8u, 0x00050041u,
80 0x00000018u, 0x000000d9u, 0x00000015u, 0x00000021u, 0x0004003du, 0x00000006u, 0x000000dau, 0x000000d9u,
81 0x000500aau, 0x0000001bu, 0x000000dbu, 0x000000dau, 0x00000024u, 0x000300f7u, 0x000000e2u, 0x00000000u,
82 0x000400fau, 0x000000dbu, 0x000000dcu, 0x000000e2u, 0x000200f8u, 0x000000dcu, 0x00050041u, 0x00000029u,
83 0x000000ddu, 0x00000015u, 0x00000028u, 0x0004003du, 0x0000000du, 0x000000deu, 0x000000ddu, 0x00060041u,
84 0x0000002du, 0x000000e0u, 0x000000deu, 0x00000028u, 0x00000060u, 0x0006003du, 0x00000006u, 0x000000e1u,
85 0x000000e0u, 0x00000002u, 0x00000004u, 0x000200f9u, 0x000000f2u, 0x000200f8u, 0x000000e2u, 0x00050041u,
86 0x00000018u, 0x000000e4u, 0x00000015u, 0x00000033u, 0x0004003du, 0x00000006u, 0x000000e5u, 0x000000e4u,
87 0x00050080u, 0x00000006u, 0x000000e6u, 0x00000060u, 0x000000e5u, 0x00050041u, 0x00000029u, 0x000000e7u,
88 0x00000015u, 0x00000028u, 0x0004003du, 0x0000000du, 0x000000e8u, 0x000000e7u, 0x000500c2u, 0x00000006u,
89 0x000000eau, 0x000000e6u, 0x0000003au, 0x00060041u, 0x0000002du, 0x000000ebu, 0x000000e8u, 0x00000028u,
90 0x000000eau, 0x0006003du, 0x00000006u, 0x000000ecu, 0x000000ebu, 0x00000002u, 0x00000004u, 0x000500c7u,
91 0x00000006u, 0x000000eeu, 0x000000e6u, 0x0000003au, 0x00050084u, 0x00000006u, 0x000000efu, 0x000000eeu,
92 0x00000040u, 0x000500c2u, 0x00000006u, 0x000000f0u, 0x000000ecu, 0x000000efu, 0x000500c7u, 0x00000006u,
93 0x000000f1u, 0x000000f0u, 0x00000043u, 0x000200f9u, 0x000000f2u, 0x000200f8u, 0x000000f2u, 0x000900f5u,
94 0x00000006u, 0x00000144u, 0x0000001fu, 0x000000d7u, 0x000000e1u, 0x000000dcu, 0x000000f1u, 0x000000e2u,
95 0x00050080u, 0x00000006u, 0x00000066u, 0x00000059u, 0x00000065u, 0x000300f7u, 0x00000119u, 0x00000000u,
96 0x000300fbu, 0x0000001fu, 0x000000f9u, 0x000200f8u, 0x000000f9u, 0x000500aeu, 0x0000001bu, 0x000000fdu,
97 0x00000066u, 0x000000aeu, 0x000300f7u, 0x000000ffu, 0x00000000u, 0x000400fau, 0x000000fdu, 0x000000feu,
98 0x000000ffu, 0x000200f8u, 0x000000feu, 0x000200f9u, 0x00000119u, 0x000200f8u, 0x000000ffu, 0x00050041u,
99 0x00000018u, 0x00000100u, 0x00000015u, 0x00000021u, 0x0004003du, 0x00000006u, 0x00000101u, 0x00000100u,
100 0x000500aau, 0x0000001bu, 0x00000102u, 0x00000101u, 0x00000024u, 0x000300f7u, 0x00000109u, 0x00000000u,
101 0x000400fau, 0x00000102u, 0x00000103u, 0x00000109u, 0x000200f8u, 0x00000103u, 0x00050041u, 0x00000029u,
102 0x00000104u, 0x00000015u, 0x00000028u, 0x0004003du, 0x0000000du, 0x00000105u, 0x00000104u, 0x00060041u,
103 0x0000002du, 0x00000107u, 0x00000105u, 0x00000028u, 0x00000066u, 0x0006003du, 0x00000006u, 0x00000108u,
104 0x00000107u, 0x00000002u, 0x00000004u, 0x000200f9u, 0x00000119u, 0x000200f8u, 0x00000109u, 0x00050041u,
105 0x00000018u, 0x0000010bu, 0x00000015u, 0x00000033u, 0x0004003du, 0x00000006u, 0x0000010cu, 0x0000010bu,
106 0x00050080u, 0x00000006u, 0x0000010du, 0x00000066u, 0x0000010cu, 0x00050041u, 0x00000029u, 0x0000010eu,
107 0x00000015u, 0x00000028u, 0x0004003du, 0x0000000du, 0x0000010fu, 0x0000010eu, 0x000500c2u, 0x00000006u,
108 0x00000111u, 0x0000010du, 0x0000003au, 0x00060041u, 0x0000002du, 0x00000112u, 0x0000010fu, 0x00000028u,
109 0x00000111u, 0x0006003du, 0x00000006u, 0x00000113u, 0x00000112u, 0x00000002u, 0x00000004u, 0x000500c7u,
110 0x00000006u, 0x00000115u, 0x0000010du, 0x0000003au, 0x00050084u, 0x00000006u, 0x00000116u, 0x00000115u,
111 0x00000040u, 0x000500c2u, 0x00000006u, 0x00000117u, 0x00000113u, 0x00000116u, 0x000500c7u, 0x00000006u,
112 0x00000118u, 0x00000117u, 0x00000043u, 0x000200f9u, 0x00000119u, 0x000200f8u, 0x00000119u, 0x000900f5u,
113 0x00000006u, 0x00000146u, 0x0000001fu, 0x000000feu, 0x00000108u, 0x00000103u, 0x00000118u, 0x00000109u,
114 0x00050080u, 0x00000006u, 0x0000006cu, 0x00000059u, 0x0000006bu, 0x000300f7u, 0x00000140u, 0x00000000u,
115 0x000300fbu, 0x0000001fu, 0x00000120u, 0x000200f8u, 0x00000120u, 0x000500aeu, 0x0000001bu, 0x00000124u,
116 0x0000006cu, 0x000000aeu, 0x000300f7u, 0x00000126u, 0x00000000u, 0x000400fau, 0x00000124u, 0x00000125u,
117 0x00000126u, 0x000200f8u, 0x00000125u, 0x000200f9u, 0x00000140u, 0x000200f8u, 0x00000126u, 0x00050041u,
118 0x00000018u, 0x00000127u, 0x00000015u, 0x00000021u, 0x0004003du, 0x00000006u, 0x00000128u, 0x00000127u,
119 0x000500aau, 0x0000001bu, 0x00000129u, 0x00000128u, 0x00000024u, 0x000300f7u, 0x00000130u, 0x00000000u,
120 0x000400fau, 0x00000129u, 0x0000012au, 0x00000130u, 0x000200f8u, 0x0000012au, 0x00050041u, 0x00000029u,
121 0x0000012bu, 0x00000015u, 0x00000028u, 0x0004003du, 0x0000000du, 0x0000012cu, 0x0000012bu, 0x00060041u,
122 0x0000002du, 0x0000012eu, 0x0000012cu, 0x00000028u, 0x0000006cu, 0x0006003du, 0x00000006u, 0x0000012fu,
123 0x0000012eu, 0x00000002u, 0x00000004u, 0x000200f9u, 0x00000140u, 0x000200f8u, 0x00000130u, 0x00050041u,
124 0x00000018u, 0x00000132u, 0x00000015u, 0x00000033u, 0x0004003du, 0x00000006u, 0x00000133u, 0x00000132u,
125 0x00050080u, 0x00000006u, 0x00000134u, 0x0000006cu, 0x00000133u, 0x00050041u, 0x00000029u, 0x00000135u,
126 0x00000015u, 0x00000028u, 0x0004003du, 0x0000000du, 0x00000136u, 0x00000135u, 0x000500c2u, 0x00000006u,
127 0x00000138u, 0x00000134u, 0x0000003au, 0x00060041u, 0x0000002du, 0x00000139u, 0x00000136u, 0x00000028u,
128 0x00000138u, 0x0006003du, 0x00000006u, 0x0000013au, 0x00000139u, 0x00000002u, 0x00000004u, 0x000500c7u,
129 0x00000006u, 0x0000013cu, 0x00000134u, 0x0000003au, 0x00050084u, 0x00000006u, 0x0000013du, 0x0000013cu,
130 0x00000040u, 0x000500c2u, 0x00000006u, 0x0000013eu, 0x0000013au, 0x0000013du, 0x000500c7u, 0x00000006u,
131 0x0000013fu, 0x0000013eu, 0x00000043u, 0x000200f9u, 0x00000140u, 0x000200f8u, 0x00000140u, 0x000900f5u,
132 0x00000006u, 0x00000148u, 0x0000001fu, 0x00000125u, 0x0000012fu, 0x0000012au, 0x0000013fu, 0x00000130u,
133 0x00050084u, 0x00000006u, 0x00000072u, 0x0000004du, 0x00000071u, 0x00050041u, 0x00000074u, 0x00000075u,
134 0x00000015u, 0x00000073u, 0x0004003du, 0x0000000eu, 0x00000076u, 0x00000075u, 0x00060041u, 0x0000002du,
135 0x00000079u, 0x00000076u, 0x00000028u, 0x00000072u, 0x0005003eu, 0x00000079u, 0x00000142u, 0x00000002u,
136 0x00000004u, 0x00050080u, 0x00000006u, 0x0000007du, 0x00000072u, 0x0000003au, 0x00060041u, 0x0000002du,
137 0x0000007fu, 0x00000076u, 0x00000028u, 0x0000007du, 0x0005003eu, 0x0000007fu, 0x00000144u, 0x00000002u,
138 0x00000004u, 0x00050080u, 0x00000006u, 0x00000083u, 0x00000072u, 0x00000065u, 0x00060041u, 0x0000002du,
139 0x00000085u, 0x00000076u, 0x00000028u, 0x00000083u, 0x0005003eu, 0x00000085u, 0x00000146u, 0x00000002u,
140 0x00000004u, 0x00050080u, 0x00000006u, 0x00000089u, 0x00000072u, 0x0000006bu, 0x00060041u, 0x0000002du,
141 0x0000008bu, 0x00000076u, 0x00000028u, 0x00000089u, 0x0005003eu, 0x0000008bu, 0x00000142u, 0x00000002u,
142 0x00000004u, 0x00050080u, 0x00000006u, 0x0000008fu, 0x00000072u, 0x00000058u, 0x00060041u, 0x0000002du,
143 0x00000091u, 0x00000076u, 0x00000028u, 0x0000008fu, 0x0005003eu, 0x00000091u, 0x00000146u, 0x00000002u,
144 0x00000004u, 0x00050080u, 0x00000006u, 0x00000096u, 0x00000072u, 0x00000095u, 0x00060041u, 0x0000002du,
145 0x00000098u, 0x00000076u, 0x00000028u, 0x00000096u, 0x0005003eu, 0x00000098u, 0x00000148u, 0x00000002u,
146 0x00000004u, 0x000200f9u, 0x0000009bu, 0x000200f8u, 0x0000009bu, 0x000100fdu, 0x00010038u,
147};
148} // namespace leonida
diff --git a/runtime/src/queue_families.h b/runtime/src/queue_families.h
index 3148d0ad1..5682d9e54 100644
--- a/runtime/src/queue_families.h
+++ b/runtime/src/queue_families.h
@@ -8,10 +8,33 @@
8#include <cstddef> 8#include <cstddef>
9#include <cstdint> 9#include <cstdint>
10#include <initializer_list> 10#include <initializer_list>
11#include <optional>
11#include <span> 12#include <span>
12 13
13namespace leonida { 14namespace leonida {
14 15
16constexpr std::uint32_t queue_family_timestamp_bits(std::span<const std::uint32_t> bits, std::uint32_t family) {
17 return family < bits.size() ? bits[family] : 0;
18}
19
20// A copy queue can lease from either family. Caller-owned devices may supply only the graphics queue.
21constexpr bool copy_queue_timestamp_families_supported(std::span<const std::uint32_t> bits,
22 std::uint32_t graphics,
23 std::optional<std::uint32_t> dedicated_copy) {
24 return queue_family_timestamp_bits(bits, graphics) != 0 &&
25 (!dedicated_copy || queue_family_timestamp_bits(bits, *dedicated_copy) != 0);
26}
27
28// The device's distinct family indices. An object used on more than one family keeps its contents
29// across fenced D3D12 queue handoffs without explicit Vulkan ownership transfers.
30template<typename CreateInfo>
31void share_across_queue_families(CreateInfo& create, std::span<const std::uint32_t> families) {
32 if (families.size() < 2) return;
33 create.sharingMode = VK_SHARING_MODE_CONCURRENT;
34 create.queueFamilyIndexCount = static_cast<std::uint32_t>(families.size());
35 create.pQueueFamilyIndices = families.data();
36}
37
15// Queue families for D3D12's three queue types. Direct needs graphics. Compute prefers a family with compute and no 38// Queue families for D3D12's three queue types. Direct needs graphics. Compute prefers a family with compute and no
16// graphics (async compute), copy one with transfer and neither (a DMA engine); each falls back to a more capable 39// graphics (async compute), copy one with transfer and neither (a DMA engine); each falls back to a more capable
17// family, ending at the graphics one. A dedicated copy family is only used when its image transfer granularity is 40// family, ending at the graphics one. A dedicated copy family is only used when its image transfer granularity is
diff --git a/runtime/src/rect_list_geometry.h b/runtime/src/rect_list_geometry.h
new file mode 100644
index 000000000..c807fb2bc
--- /dev/null
+++ b/runtime/src/rect_list_geometry.h
@@ -0,0 +1,263 @@
1#pragma once
2
3// Console rectangle lists on Vulkan, which has no such primitive.
4//
5// A rectangle is three corners (v1, v2, v3) of a screen-aligned rectangle and the hardware makes the fourth, for the
6// position and for every interpolant, after the vertex stage. A list topology of rectangles (D3D_PRIMITIVE_TOPOLOGY
7// 17) and a pipeline whose topology type is 19 are console-only. The fact comes from xvalkyrie (GPL-3.0, commit
8// 53af7df77c10, notes in its backlog); no code is taken from it. The corner between the other two (the right angle)
9// is not always v1: the title's own full-screen blit (VS_Blit_6e5520d1) gives (-1, 1) (-1, -1) (1, -1), the corner
10// at v2, and xcl's notes say the same of a retail title's full-screen pass and list v1, v2 and v3 as possible
11// (learned from its docs and tests, GPL-2.0-only, no code taken). Taking v1 there made the parallelogram
12// v2 + v3 - v1 = (1, -3), of which only the lower-left half of the screen is on screen.
13//
14// The fourth vertex depends on what the vertex stage wrote, not on what it read, so the expansion has to sit after
15// the vertex stage: a pre-pass over the vertex buffers is wrong for any shader that is not linear in its inputs (and
16// the translated vertex shaders fetch by V# themselves, so there is no vertex buffer to expand). The pipeline gets a
17// small geometry stage instead, built here from the vertex shader's own SPIR-V: it takes the triangle (v1, v2, v3)
18// the list draws, finds the corner between the other two as the one opposite the longest side (from the positions'
19// x and y; a degenerate triangle takes v1), makes the fourth corner v4 = the other two's sum minus that corner, and
20// emits the rectangle as two triangles with the winding of (v1, v2, v3) that both start at v1, so a flat input
21// (taken from a triangle's first vertex) is v1's over the whole rectangle:
22// corner v1: (v1, v2, v4) (v1, v4, v3); corner v2: (v1, v2, v3) (v1, v3, v4); corner v3: (v1, v2, v3) (v1, v4, v2). Every Location output of the vertex stage is a vec4 float in the translator's output (rdna2spirv.py),
23// and so is the stage's Position; the generated stage reads and writes exactly those.
24//
25// Not covered, and refused with a reason: a vertex stage that writes ClipDistance, CullDistance, Layer or
26// ViewportIndex, or a Location output that is not a vec4 float.
27//
28// Plain word editing, standard library only.
29
30#include <algorithm>
31#include <array>
32#include <cstdint>
33#include <initializer_list>
34#include <map>
35#include <set>
36#include <string>
37#include <vector>
38
39namespace leonida {
40
41// D3D_PRIMITIVE_TOPOLOGY values and the PSO topology type of the console's rectangle and quad lists.
42constexpr std::uint32_t topology_rect_list = 17;
43constexpr std::uint32_t topology_quad_list = 19;
44constexpr std::uint32_t topology_type_rect_list = 19;
45constexpr std::array<std::uint32_t, 6> quad_triangle_indices{0, 1, 2, 0, 2, 3};
46
47// The geometry stage for `vertex_words`' outputs; empty, with `why` set, when the vertex stage cannot be expanded.
48inline std::vector<std::uint32_t> rect_list_geometry(const std::vector<std::uint32_t>& vertex_words, std::string& why) {
49 enum : std::uint32_t {
50 op_entry_point = 15, op_type_void = 19, op_type_int = 21, op_type_float = 22,
51 op_type_vector = 23, op_type_array = 28, op_type_pointer = 32, op_type_function = 33, op_constant = 43,
52 op_type_bool = 20, op_composite_construct = 80, op_composite_extract = 81, op_fmul = 133,
53 op_logical_and = 167, op_logical_not = 168, op_select = 169, op_ford_greater_than_equal = 190,
54 op_function = 54, op_function_end = 56, op_variable = 59, op_load = 61, op_store = 62, op_access_chain = 65,
55 op_decorate = 71, op_fadd = 129, op_fsub = 131, op_emit_vertex = 218, op_end_primitive = 219, op_label = 248, op_return = 253,
56 op_capability = 17, op_memory_model = 14, op_execution_mode = 16,
57 deco_builtin = 11, deco_location = 30, builtin_position = 0, builtin_point_size = 1,
58 storage_input = 1, storage_output = 3
59 };
60 why.clear();
61 if (vertex_words.size() < 6 || vertex_words[0] != 0x07230203u) {
62 why = "the vertex shader is not a SPIR-V module";
63 return {};
64 }
65 // What the vertex stage declares: types, Output variables, and the decorations that name them.
66 struct Type { std::uint32_t op = 0, component = 0, count = 0, width = 0; };
67 std::map<std::uint32_t, Type> types;
68 std::map<std::uint32_t, std::uint32_t> variable_type; // Output variable -> its pointer type
69 std::map<std::uint32_t, std::uint32_t> location, builtin; // variable id -> value
70 std::set<std::uint32_t> outputs;
71 for (std::size_t i = 5; i < vertex_words.size();) {
72 const std::uint32_t op = vertex_words[i] & 0xffffu, n = vertex_words[i] >> 16;
73 if (!n || i + n > vertex_words.size()) {
74 why = "the vertex shader's SPIR-V is cut short";
75 return {};
76 }
77 const std::uint32_t* w = &vertex_words[i];
78 if (op == op_type_float && n >= 3) types[w[1]] = {op, 0, 0, w[2]};
79 else if (op == op_type_vector && n >= 4) types[w[1]] = {op, w[2], w[3], 0};
80 else if (op == op_type_pointer && n >= 4) types[w[1]] = {op, w[3], w[2], 0};
81 else if (op == op_variable && n >= 4 && w[3] == storage_output) outputs.insert(w[2]), variable_type[w[2]] = w[1];
82 else if (op == op_decorate && n >= 4 && w[2] == deco_location) location[w[1]] = w[3];
83 else if (op == op_decorate && n >= 4 && w[2] == deco_builtin) builtin[w[1]] = w[3];
84 i += n;
85 }
86 std::uint32_t position = 0;
87 std::vector<std::uint32_t> params; // Location values, ascending
88 for (std::uint32_t id : outputs) {
89 const auto b = builtin.find(id);
90 if (b != builtin.end()) {
91 if (b->second == builtin_position) position = id;
92 else if (b->second != builtin_point_size) {
93 why = "the vertex shader writes ClipDistance, CullDistance, Layer or ViewportIndex";
94 return {};
95 }
96 continue;
97 }
98 const auto l = location.find(id);
99 if (l == location.end()) continue;
100 const Type& ptr = types[variable_type[id]];
101 const Type& vec = types[ptr.component];
102 const Type& scalar = types[vec.component];
103 // Known limit: every vec4 float output gets the plain a + b - p corner. The translator can export an attribute
104 // as the register's raw bits with two packed f16 halves (only the pixel shader knows, through per_vertex in
105 // tools/rdna2spirv.py), and nothing on the vertex side tells those apart, so such an output would get a wrong
106 // fourth corner. Fixing it needs the pixel shader's words here and a per-channel marker from the translator.
107 if (vec.op != op_type_vector || vec.count != 4 || scalar.op != op_type_float || scalar.width != 32) {
108 why = "a vertex output is not a vec4 float";
109 return {};
110 }
111 params.push_back(l->second);
112 }
113 if (!position) {
114 why = "the vertex shader writes no Position";
115 return {};
116 }
117 std::sort(params.begin(), params.end());
118 params.erase(std::unique(params.begin(), params.end()), params.end());
119
120 // The module: a fixed prelude, then per variable ids, then the body. Ids count up from 1.
121 std::uint32_t next = 1;
122 const auto id = [&] { return next++; };
123 std::vector<std::uint32_t> head, annotations, globals, body;
124 const auto emit = [](std::vector<std::uint32_t>& to, std::uint32_t op, std::initializer_list<std::uint32_t> args) {
125 to.push_back((std::uint32_t(args.size()) + 1) << 16 | op);
126 to.insert(to.end(), args.begin(), args.end());
127 };
128 const std::uint32_t t_void = id(), t_fn = id(), t_uint = id(), t_float = id(), t_v4 = id(),
129 c3 = id(), t_arr = id(), t_pin_arr = id(), t_pin_v4 = id(),
130 t_pout_v4 = id(), c0 = id(), c1 = id(), c2 = id();
131 emit(globals, op_type_void, {t_void});
132 emit(globals, op_type_function, {t_fn, t_void});
133 emit(globals, op_type_int, {t_uint, 32, 0});
134 emit(globals, op_type_float, {t_float, 32});
135 emit(globals, op_type_vector, {t_v4, t_float, 4});
136 emit(globals, op_constant, {t_uint, c3, 3});
137 emit(globals, op_constant, {t_uint, c0, 0});
138 emit(globals, op_constant, {t_uint, c1, 1});
139 emit(globals, op_constant, {t_uint, c2, 2});
140 emit(globals, op_type_array, {t_arr, t_v4, c3});
141 emit(globals, op_type_pointer, {t_pin_arr, storage_input, t_arr});
142 emit(globals, op_type_pointer, {t_pin_v4, storage_input, t_v4});
143 emit(globals, op_type_pointer, {t_pout_v4, storage_output, t_v4});
144
145 struct Var { std::uint32_t in, out; bool is_position; };
146 std::vector<Var> vars;
147 vars.push_back({id(), id(), true});
148 for (std::size_t i = 0; i < params.size(); ++i) vars.push_back({id(), id(), false});
149 std::vector<std::uint32_t> io_vars;
150 emit(annotations, op_decorate, {vars[0].in, deco_builtin, builtin_position});
151 emit(annotations, op_decorate, {vars[0].out, deco_builtin, builtin_position});
152 for (std::size_t i = 0; i < params.size(); ++i) {
153 emit(annotations, op_decorate, {vars[i + 1].in, deco_location, params[i]});
154 emit(annotations, op_decorate, {vars[i + 1].out, deco_location, params[i]});
155 }
156 for (const Var& v : vars) {
157 emit(globals, op_variable, {t_pin_arr, v.in, storage_input});
158 emit(globals, op_variable, {t_pout_v4, v.out, storage_output});
159 io_vars.push_back(v.in);
160 io_vars.push_back(v.out);
161 }
162
163 const std::uint32_t main_fn = id(), entry_label = id();
164 emit(body, op_function, {t_void, main_fn, 0, t_fn});
165 emit(body, op_label, {entry_label});
166 // Per variable: the three corners.
167 struct Corners { std::uint32_t v[3]; };
168 std::vector<Corners> corners;
169 const std::uint32_t cs[3] = {c0, c1, c2};
170 for (const Var& v : vars) {
171 Corners c{};
172 for (int k = 0; k < 3; ++k) {
173 const std::uint32_t ptr = id();
174 c.v[k] = id();
175 emit(body, op_access_chain, {t_pin_v4, ptr, v.in, cs[k]});
176 emit(body, op_load, {t_v4, c.v[k], ptr});
177 }
178 corners.push_back(c);
179 }
180 // The corner between the other two, opposite the longest side: squared lengths from the positions' x and y.
181 const std::uint32_t t_bool = id(), t_bv4 = id();
182 emit(globals, op_type_bool, {t_bool});
183 emit(globals, op_type_vector, {t_bv4, t_bool, 4});
184 const auto extract = [&](std::uint32_t vector, std::uint32_t component) {
185 const std::uint32_t r = id();
186 emit(body, op_composite_extract, {t_float, r, vector, component});
187 return r;
188 };
189 const auto length2 = [&](std::uint32_t a, std::uint32_t b) {
190 const std::uint32_t d = id(), xx = id(), yy = id(), sum = id();
191 emit(body, op_fsub, {t_v4, d, a, b});
192 const std::uint32_t x = extract(d, 0), y = extract(d, 1);
193 emit(body, op_fmul, {t_float, xx, x, x});
194 emit(body, op_fmul, {t_float, yy, y, y});
195 emit(body, op_fadd, {t_float, sum, xx, yy});
196 return sum;
197 };
198 const auto at_least = [&](std::uint32_t a, std::uint32_t b) {
199 const std::uint32_t r = id();
200 emit(body, op_ford_greater_than_equal, {t_bool, r, a, b});
201 return r;
202 };
203 const auto both = [&](std::uint32_t a, std::uint32_t b) {
204 const std::uint32_t r = id();
205 emit(body, op_logical_and, {t_bool, r, a, b});
206 return r;
207 };
208 const auto splat = [&](std::uint32_t b) { // OpSelect on vectors takes a vector condition before SPIR-V 1.4
209 const std::uint32_t r = id();
210 emit(body, op_composite_construct, {t_bv4, r, b, b, b, b});
211 return r;
212 };
213 const std::uint32_t* p = corners[0].v; // vars[0] is the Position
214 const std::uint32_t l12 = length2(p[0], p[1]), l23 = length2(p[1], p[2]), l31 = length2(p[2], p[0]);
215 const std::uint32_t at_v1 = both(at_least(l23, l12), at_least(l23, l31)), not_v1 = id();
216 emit(body, op_logical_not, {t_bool, not_v1, at_v1});
217 const std::uint32_t at_v2 = both(not_v1, at_least(l31, l12));
218 const std::uint32_t c_v1 = splat(at_v1), c_v2 = splat(at_v2);
219 const auto pick = [&](std::uint32_t condition, std::uint32_t yes, std::uint32_t no) {
220 const std::uint32_t r = id();
221 emit(body, op_select, {t_v4, r, condition, yes, no});
222 return r;
223 };
224 // Per variable: the fourth corner, v1 + v2 + v3 - 2 * corner, and the six vertices of the two triangles.
225 std::vector<std::array<std::uint32_t, 6>> emitted;
226 for (const Corners& c : corners) {
227 const std::uint32_t corner = pick(c_v1, c.v[0], pick(c_v2, c.v[1], c.v[2]));
228 const std::uint32_t s12 = id(), s123 = id(), less = id(), fourth = id();
229 emit(body, op_fadd, {t_v4, s12, c.v[0], c.v[1]});
230 emit(body, op_fadd, {t_v4, s123, s12, c.v[2]});
231 emit(body, op_fsub, {t_v4, less, s123, corner});
232 emit(body, op_fsub, {t_v4, fourth, less, corner});
233 emitted.push_back({c.v[0], c.v[1], pick(c_v1, fourth, c.v[2]),
234 c.v[0], pick(c_v2, c.v[2], fourth), pick(c_v1, c.v[2], pick(c_v2, fourth, c.v[1]))});
235 }
236 for (int triangle = 0; triangle < 2; ++triangle) {
237 for (int k = 0; k < 3; ++k) {
238 for (std::size_t i = 0; i < vars.size(); ++i) emit(body, op_store, {vars[i].out, emitted[i][triangle * 3 + k]});
239 emit(body, op_emit_vertex, {});
240 }
241 emit(body, op_end_primitive, {});
242 }
243 emit(body, op_return, {});
244 emit(body, op_function_end, {});
245
246 std::vector<std::uint32_t> out{0x07230203u, 0x00010000u, 0, next, 0};
247 emit(out, op_capability, {2}); // Geometry
248 emit(out, op_memory_model, {0, 1}); // Logical, GLSL450
249 std::vector<std::uint32_t> entry{3, main_fn, 0x6e69616du, 0}; // Geometry, %main, "main"
250 entry.insert(entry.end(), io_vars.begin(), io_vars.end());
251 out.push_back((std::uint32_t(entry.size()) + 1) << 16 | op_entry_point);
252 out.insert(out.end(), entry.begin(), entry.end());
253 emit(out, op_execution_mode, {main_fn, 22}); // Triangles
254 emit(out, op_execution_mode, {main_fn, 0, 1}); // Invocations 1
255 emit(out, op_execution_mode, {main_fn, 29}); // OutputTriangleStrip
256 emit(out, op_execution_mode, {main_fn, 26, 6}); // OutputVertices 6
257 out.insert(out.end(), annotations.begin(), annotations.end());
258 out.insert(out.end(), globals.begin(), globals.end());
259 out.insert(out.end(), body.begin(), body.end());
260 return out;
261}
262
263} // namespace leonida
diff --git a/runtime/src/rgba4_fragment.h b/runtime/src/rgba4_fragment.h
new file mode 100644
index 000000000..b62162848
--- /dev/null
+++ b/runtime/src/rgba4_fragment.h
@@ -0,0 +1,81 @@
1#pragma once
2#include <array>
3#include <bit>
4#include <cstdint>
5#include <cstring>
6#include <map>
7#include <string>
8#include <vector>
9namespace leonida::rgba4 {
10using Inst=std::vector<std::uint32_t>;
11inline Inst instruction(std::uint32_t op,std::initializer_list<std::uint32_t> args) {
12 Inst w{(std::uint32_t(args.size()+1)<<16)|op};w.insert(w.end(),args);return w;
13}
14// Quantize only written color outputs at the requested locations. For a wider fallback attachment
15// this reproduces four-bit UNORM writes for pipelines whose affected attachments use no blending.
16inline bool quantize(Inst& words,unsigned mask) {
17 if(!mask)return true;
18 if(words.size()<5 || words[0]!=0x07230203)return false;
19 std::vector<Inst> code,declarations;
20 std::map<unsigned,unsigned> locations, pointer_type, width, scalar, variables;
21 unsigned import_id=0,next=words[3],float_type=0;
22 for(std::size_t at=5;at<words.size();) {
23 const unsigned n=words[at]>>16,op=words[at]&65535u;
24 if(!n || n>words.size()-at)return false;
25 Inst i(words.begin()+at,words.begin()+at+n);at+=n;
26 if(op==11 && n>=3) {
27 const char* s=reinterpret_cast<const char*>(i.data()+2);const auto bytes=(n-2)*4;
28 if(bytes>=13 && std::memcmp(s,"GLSL.std.450",13)==0)import_id=i[1];
29 } else if(op==71 && n==4 && i[2]==30)locations[i[1]]=i[3];
30 else if(op==22 && n==3 && i[2]==32){float_type=i[1];width[i[1]]=1;scalar[i[1]]=i[1];}
31 else if(op==23 && n==4){width[i[1]]=i[3];scalar[i[1]]=i[2];}
32 else if(op==32 && n==4 && i[2]==3)pointer_type[i[1]]=i[3];
33 else if(op==59 && n>=4 && i[3]==3)variables[i[2]]=i[1];
34 code.push_back(std::move(i));
35 }
36 if(!float_type)return false;
37 std::map<unsigned,unsigned> outputs;
38 for(auto [id,ptr]:variables)if(locations.count(id)&&locations[id]<8&&(mask&(1u<<locations[id]))&&pointer_type.count(ptr))
39 outputs[id]=pointer_type[ptr];
40 if(outputs.empty())return true;
41 const bool add_import=!import_id;if(add_import)import_id=next++;
42 std::map<unsigned,std::array<unsigned,4>> constants;
43 auto components=[&](unsigned type) -> const std::array<unsigned,4>& {
44 auto [it,inserted]=constants.try_emplace(type);
45 if(!inserted)return it->second;
46 constexpr std::array<float,4> vals{0.f,1.f,15.f,1.f/15.f};
47 std::array<unsigned,4> base{};
48 for(unsigned j=0;j<4;++j){base[j]=next++;declarations.push_back(instruction(43,{scalar[type],base[j],std::bit_cast<unsigned>(vals[j])}));}
49 if(width[type]==1){it->second=base;return it->second;}
50 for(unsigned j=0;j<4;++j){const auto id=next++;Inst c=instruction(44,{type,id});c.resize(3+width[type],base[j]);c[0]=(unsigned(c.size())<<16)|44u;declarations.push_back(std::move(c));it->second[j]=id;}
51 return it->second;
52 };
53 std::vector<Inst> rewritten;bool changed=false;
54 for(auto& i:code) {
55 const auto op=i[0]&65535u;
56 if((op==65||op==66||op==83) && i.size()>=4 && outputs.count(i[3]) && pointer_type.count(i[1]))
57 outputs[i[2]]=pointer_type[i[1]];
58 if(op==63 && i.size()>=3 && outputs.count(i[1]))return false;
59 if(op==62 && i.size()>=3 && outputs.count(i[1])) {
60 const auto type=outputs[i[1]];
61 if(!width.count(type)||width[type]<1||width[type]>4||scalar[type]!=float_type)return false;
62 const auto& c=components(type);
63 const auto clamped=next++,scaled=next++,rounded=next++,value=next++;
64 rewritten.push_back(instruction(12,{type,clamped,import_id,43,i[2],c[0],c[1]})); // GLSL FClamp
65 rewritten.push_back(instruction(133,{type,scaled,clamped,c[2]}));
66 rewritten.push_back(instruction(12,{type,rounded,import_id,2,scaled})); // GLSL RoundEven
67 rewritten.push_back(instruction(133,{type,value,rounded,c[3]}));i[2]=value;changed=true;
68 }
69 rewritten.push_back(std::move(i));
70 }
71 if(!changed)return false;
72 Inst result(words.begin(),words.begin()+5);result[3]=next;bool declared=false;
73 for(const auto& i:rewritten) {
74 const auto op=i[0]&65535u;
75 if(op==14 && add_import){Inst imp=instruction(11,{import_id,0,0,0,0});std::memcpy(imp.data()+2,"GLSL.std.450",13);result.insert(result.end(),imp.begin(),imp.end());}
76 if(op==54&&!declared){for(const auto& dec:declarations)result.insert(result.end(),dec.begin(),dec.end());declared=true;}
77 result.insert(result.end(),i.begin(),i.end());
78 }
79 if(!declared)return false;words=std::move(result);return true;
80}
81}
diff --git a/runtime/src/root_signature.cpp b/runtime/src/root_signature.cpp
index a0eb96cce..10dd1e02c 100644
--- a/runtime/src/root_signature.cpp
+++ b/runtime/src/root_signature.cpp
@@ -59,10 +59,18 @@ StagePackResult pack_stage(const RootSignature& sig, Stage stage) {
59 } 59 }
60 uint64_t cost = 0; // 64-bit, as in pack() 60 uint64_t cost = 0; // 64-bit, as in pack()
61 uint64_t next = out.base; 61 uint64_t next = out.base;
62 uint64_t spill_next = 0;
63 bool spilling = false;
62 std::vector<uint32_t> first; 64 std::vector<uint32_t> first;
65 std::vector<uint32_t> spill;
63 first.reserve(sig.params.size()); 66 first.reserve(sig.params.size());
67 spill.reserve(sig.params.size());
64 for (size_t i = 0; i < sig.params.size(); ++i) { 68 for (size_t i = 0; i < sig.params.size(); ++i) {
65 const RootParameter& p = sig.params[i]; 69 const RootParameter& p = sig.params[i];
70 if (p.type != ParamType::Constants && p.type != ParamType::Descriptor && p.type != ParamType::Table) {
71 out.error = "unknown root parameter type";
72 return out;
73 }
66 if (p.type == ParamType::Constants && p.num_values == 0) { 74 if (p.type == ParamType::Constants && p.num_values == 0) {
67 out.error = "root constant parameter needs at least 1 dword"; 75 out.error = "root constant parameter needs at least 1 dword";
68 return out; 76 return out;
@@ -73,18 +81,27 @@ StagePackResult pack_stage(const RootSignature& sig, Stage stage) {
73 return out; 81 return out;
74 } 82 }
75 const uint64_t dwords = stage_dwords(p.type, p.num_values); 83 const uint64_t dwords = stage_dwords(p.type, p.num_values);
76 if (next + dwords > kMaxUserSgprs) { 84 if (!spilling && next + dwords <= kMaxUserSgprs) {
77 // The console moves this parameter and every later one to the spill array behind s[0:1]; that array's 85 first.push_back(static_cast<uint32_t>(next));
78 // layout is not modelled here, so refuse rather than drop arguments. 86 spill.push_back(kNoSpill);
87 next += dwords;
88 } else if (stage == Stage::Compute) {
89 // Compute packs this parameter and every later one contiguously into the spill array behind s[0:1]
90 // (docs/d3d12_vulkan.md §3.5 & §7). Total spill stays bounded by kMaxD3d12Cost (<= 64 dwords).
91 spilling = true;
92 first.push_back(kNoSgpr);
93 spill.push_back(static_cast<uint32_t>(spill_next));
94 spill_next += dwords;
95 } else {
79 out.error = "root parameter " + std::to_string(i) + " does not fit in the user SGPRs from s" + 96 out.error = "root parameter " + std::to_string(i) + " does not fit in the user SGPRs from s" +
80 std::to_string(out.base) + " (spill array not modelled)"; 97 std::to_string(out.base) + " (spill array not modelled)";
81 return out; 98 return out;
82 } 99 }
83 first.push_back(static_cast<uint32_t>(next));
84 next += dwords;
85 } 100 }
86 out.first_sgpr = std::move(first); 101 out.first_sgpr = std::move(first);
102 out.spill_dword = std::move(spill);
87 out.end_sgpr = static_cast<uint32_t>(next); 103 out.end_sgpr = static_cast<uint32_t>(next);
104 out.spill_dwords = static_cast<uint32_t>(spill_next);
88 out.d3d12_cost = static_cast<uint32_t>(cost); 105 out.d3d12_cost = static_cast<uint32_t>(cost);
89 out.ok = true; 106 out.ok = true;
90 return out; 107 return out;
diff --git a/runtime/src/root_signature.h b/runtime/src/root_signature.h
index 376962940..e7976fc73 100644
--- a/runtime/src/root_signature.h
+++ b/runtime/src/root_signature.h
@@ -129,10 +129,15 @@ constexpr uint32_t kMaxD3d12Cost = 64;
129// in this layout equals the program's RSRC2 USER_SGPR count in 29 of 29, and the programs read the tables and 129// in this layout equals the program's RSRC2 USER_SGPR count in 29 of 29, and the programs read the tables and
130// root CBVs at exactly these SGPRs (tools/rootsig_census.py --disasm). The game's compute census agrees (lowest 130// root CBVs at exactly these SGPRs (tools/rootsig_census.py --disasm). The game's compute census agrees (lowest
131// pointer s4, one-dword tables). 131// pointer s4, one-dword tables).
132// - vertex/pixel/geometry s8 and mesh s16: a hypothesis from the corpus census only (lowest pointer SGPR per stage); 132// - vertex/pixel/geometry s8 and mesh s16: from the corpus census (lowest pointer SGPR per stage) and one live
133// no signature confirms them, and visibility is not modelled (every parameter takes its place in every stage). 133// retail frame (a VS and PS reading their tables at s8, s9, s10; issue #14, comment 7131556366); no serialized
134// signature confirms them yet, and visibility is not modelled (every parameter takes its place in every stage).
135// The graphics bind point uses Stage::Pixel (s8, as vertex and geometry); a mesh shader reads the same dwords
136// through its translator-side window (docs/d3d12_vulkan.md section 3.5).
134// A parameter that does not fit goes to the console's spill array behind s[0:1] (compute, section 7) together with 137// A parameter that does not fit goes to the console's spill array behind s[0:1] (compute, section 7) together with
135// every parameter after it; that array is not modelled, so such a signature is refused, never truncated. 138// every parameter after it. For compute that packed spill array (1 dword per 32-bit constant, 2 per root descriptor,
139// 1 per descriptor table, no alignment padding) is modelled in StagePackResult; non-compute stages still refuse spills
140// because their spill pointer SGPR is unmeasured.
136enum class Stage : uint32_t { Vertex = 0, Pixel = 1, Geometry = 2, Compute = 3, Mesh = 4 }; 141enum class Stage : uint32_t { Vertex = 0, Pixel = 1, Geometry = 2, Compute = 3, Mesh = 4 };
137 142
138[[nodiscard]] constexpr uint32_t stage_base(Stage stage) noexcept { 143[[nodiscard]] constexpr uint32_t stage_base(Stage stage) noexcept {
@@ -163,19 +168,23 @@ enum class Stage : uint32_t { Vertex = 0, Pixel = 1, Geometry = 2, Compute = 3,
163} 168}
164 169
165constexpr uint32_t kNoSgpr = 0xFFFFFFFFu; 170constexpr uint32_t kNoSgpr = 0xFFFFFFFFu;
171constexpr uint32_t kNoSpill = 0xFFFFFFFFu;
166 172
167struct StagePackResult { 173struct StagePackResult {
168 bool ok = false; 174 bool ok = false;
169 std::string error; // set when !ok; names the refusing parameter 175 std::string error; // set when !ok; names the refusing parameter
170 Stage stage = Stage::Compute; 176 Stage stage = Stage::Compute;
171 uint32_t base = 0; // stage_base(stage) 177 uint32_t base = 0; // stage_base(stage)
172 std::vector<uint32_t> first_sgpr; // per parameter: its first user SGPR (kNoSgpr when the signature is refused) 178 std::vector<uint32_t> first_sgpr; // per parameter: its first user SGPR (kNoSgpr when spilled or refused)
173 uint32_t end_sgpr = 0; // one past the last SGPR used: the RSRC2 USER_SGPR count the layout implies 179 std::vector<uint32_t> spill_dword; // per parameter: dword offset in s[0:1] spill array (kNoSpill when inline)
174 uint32_t d3d12_cost = 0; // cost against the 64-dword D3D12 limit 180 uint32_t end_sgpr = 0; // one past the last inline SGPR used: the RSRC2 USER_SGPR count
181 uint32_t spill_dwords = 0; // total dwords in the packed spill array (0 when nothing spills)
182 uint32_t d3d12_cost = 0; // cost against the 64-dword D3D12 limit
175}; 183};
176 184
177// Lays the parameters out for `stage` in the console layout. Fails like pack() on more than 64 parameters, a 185// Lays the parameters out for `stage` in the console layout. Fails like pack() on more than 64 parameters, an
178// constant parameter of 0 values or the 64-dword cost limit, and on any parameter that would spill. 186// unknown parameter type, a constant parameter of 0 values, or the 64-dword cost limit. Compute spills any trailing
187// parameters from the first one that does not fit whole into spill_dword; non-compute stages refuse any spill.
179[[nodiscard]] StagePackResult pack_stage(const RootSignature& sig, Stage stage); 188[[nodiscard]] StagePackResult pack_stage(const RootSignature& sig, Stage stage);
180 189
181// D3D12 cost of one parameter against the 64-dword limit. 190// D3D12 cost of one parameter against the 64-dword limit.
diff --git a/runtime/src/shader_directory.h b/runtime/src/shader_directory.h
new file mode 100644
index 000000000..ed7412898
--- /dev/null
+++ b/runtime/src/shader_directory.h
@@ -0,0 +1,56 @@
1// Shared shader-library location for the Vulkan and DirectStorage runtimes.
2#pragma once
3#include <windows.h>
4#include <bit>
5#include <filesystem>
6#include <fstream>
7#include <iterator>
8#include <memory>
9#include <string>
10
11namespace leonida::shader_paths {
12// The folder make_game recorded in shader_path.txt at `config`, or empty without one. Throws when the path cannot be
13// converted: MSVC's STL reports a Windows path that is not UTF-8 as std::system_error, libstdc++ as filesystem_error.
14inline std::filesystem::path shader_directory_from_file(const std::filesystem::path& config) {
15 std::ifstream file(config, std::ios::binary);
16 if (!file) return {};
17 const std::string text{std::istreambuf_iterator<char>(file), std::istreambuf_iterator<char>()};
18 if (text.empty() || text.find('\0') != std::string::npos) return {};
19
20 // make_game records an absolute Unix path on Linux. Resolve it inside the running Wine prefix.
21 if (text.front() == '/') {
22 using WineDosPath = wchar_t* (CDECL*)(const char*);
23 const auto to_dos = std::bit_cast<WineDosPath>(
24 ::GetProcAddress(::GetModuleHandleW(L"kernel32.dll"), "wine_get_dos_file_name"));
25 if (!to_dos) return {};
26 const auto release = [](wchar_t* path) { ::HeapFree(::GetProcessHeap(), 0, path); };
27 const std::unique_ptr<wchar_t, decltype(release)> path(to_dos(text.c_str()), release);
28 if (path) return std::filesystem::path(path.get());
29 return {};
30 }
31 return std::filesystem::path(std::u8string(text.begin(), text.end()));
32}
33
34inline std::filesystem::path configured(std::string* error = nullptr, const std::filesystem::path& config = {}) {
35 try {
36 constexpr wchar_t env_name[] = L"LEONIDA_SHADERS";
37 if (const DWORD size = ::GetEnvironmentVariableW(env_name, nullptr, 0)) {
38 std::wstring value(size, L'\0');
39 const DWORD length = ::GetEnvironmentVariableW(env_name, value.data(), size);
40 if (length && length < size) {
41 value.resize(length);
42 return std::filesystem::path(value);
43 }
44 }
45 if (!config.empty()) return shader_directory_from_file(config);
46 std::wstring exe(32768, L'\0');
47 const DWORD length = ::GetModuleFileNameW(nullptr, exe.data(), static_cast<DWORD>(exe.size()));
48 if (!length || length >= exe.size()) return {};
49 exe.resize(length);
50 return shader_directory_from_file(std::filesystem::path(exe).parent_path() / L"shader_path.txt");
51 } catch (const std::exception& e) {
52 if (error) *error = e.what();
53 return {};
54 }
55}
56} // namespace leonida::shader_paths
diff --git a/runtime/src/shader_library.h b/runtime/src/shader_library.h
index 596ad0ae9..a359287cb 100644
--- a/runtime/src/shader_library.h
+++ b/runtime/src/shader_library.h
@@ -8,6 +8,7 @@
8// writes into `spirv/index.json`, next to `<name>.spv`. This header needs no Windows, Vulkan or third-party code: 8// writes into `spirv/index.json`, next to `<name>.spv`. This header needs no Windows, Vulkan or third-party code:
9// it carries its own inflate (RFC 1950/1951), SHA-256 (FIPS 180-4) and a minimal JSON reader. 9// it carries its own inflate (RFC 1950/1951), SHA-256 (FIPS 180-4) and a minimal JSON reader.
10 10
11#include "descriptor_table.h"
11#include "spirv_words.h" 12#include "spirv_words.h"
12 13
13#include <algorithm> 14#include <algorithm>
@@ -220,7 +221,7 @@ inline int decode(BitReader& in, const Huffman& h) {
220} 221}
221 222
222inline ZlibError inflate_codes(BitReader& in, std::vector<std::uint8_t>& out, const Huffman& lengths, 223inline ZlibError inflate_codes(BitReader& in, std::vector<std::uint8_t>& out, const Huffman& lengths,
223 const Huffman& distances, std::size_t limit) { 224 const Huffman& distances, std::size_t limit, bool bulk = true) {
224 static constexpr std::int16_t length_base[29] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 225 static constexpr std::int16_t length_base[29] = {3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27,
225 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258}; 226 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258};
226 static constexpr std::int16_t length_extra[29] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 227 static constexpr std::int16_t length_extra[29] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2,
@@ -247,8 +248,25 @@ inline ZlibError inflate_codes(BitReader& in, std::vector<std::uint8_t>& out, co
247 const std::size_t distance = std::size_t(distance_base[d]) + in.bits(distance_extra[d]); 248 const std::size_t distance = std::size_t(distance_base[d]) + in.bits(distance_extra[d]);
248 if (in.failed() || distance > out.size()) return ZlibError::data; 249 if (in.failed() || distance > out.size()) return ZlibError::data;
249 if (out.size() > limit || length > limit - out.size()) return ZlibError::limit; 250 if (out.size() > limit || length > limit - out.size()) return ZlibError::limit;
250 const std::size_t from = out.size() - distance; 251 const std::size_t start = out.size();
251 for (std::size_t i = 0; i < length; ++i) out.push_back(out[from + i]); 252 if (!bulk) {
253 for (std::size_t i = 0; i < length; ++i) out.push_back(out[start - distance + i]);
254 continue;
255 }
256 out.resize(start + length);
257 auto* dest = out.data() + start;
258 if (distance == 1) {
259 std::fill_n(dest, length, dest[-1]);
260 } else {
261 // Overlapping matches repeat their first distance bytes. Each copy reads only completed output.
262 std::size_t copied = std::min(distance, length);
263 std::memcpy(dest, dest - distance, copied);
264 while (copied < length) {
265 const auto count = std::min(copied, length - copied);
266 std::memcpy(dest + copied, dest, count);
267 copied += count;
268 }
269 }
252 } 270 }
253} 271}
254 272
@@ -260,7 +278,7 @@ inline ZlibError inflate_codes(BitReader& in, std::vector<std::uint8_t>& out, co
260// dictionary), `data` for the deflate data or a missing trailer, `checksum` for an Adler-32 mismatch, `limit` for 278// dictionary), `data` for the deflate data or a missing trailer, `checksum` for an Adler-32 mismatch, `limit` for
261// output beyond `limit`. Bytes after the Adler-32 trailer are not read. 279// output beyond `limit`. Bytes after the Adler-32 trailer are not read.
262inline bool zlib_inflate(std::span<const std::uint8_t> in, std::vector<std::uint8_t>& out, 280inline bool zlib_inflate(std::span<const std::uint8_t> in, std::vector<std::uint8_t>& out,
263 std::size_t limit = std::size_t(1) << 30, ZlibError* why = nullptr) { 281 std::size_t limit = std::size_t(1) << 30, ZlibError* why = nullptr, bool bulk = true) {
264 out.clear(); 282 out.clear();
265 const auto fail = [why](ZlibError reason) { 283 const auto fail = [why](ZlibError reason) {
266 if (why) *why = reason; 284 if (why) *why = reason;
@@ -303,7 +321,7 @@ inline bool zlib_inflate(std::span<const std::uint8_t> in, std::vector<std::uint
303 detail::build_huffman(t.second, lengths, 30); 321 detail::build_huffman(t.second, lengths, 30);
304 return t; 322 return t;
305 }(); 323 }();
306 if (const ZlibError e = detail::inflate_codes(reader, out, tables.first, tables.second, limit); e != ZlibError::none) 324 if (const ZlibError e = detail::inflate_codes(reader, out, tables.first, tables.second, limit, bulk); e != ZlibError::none)
307 return fail(e); 325 return fail(e);
308 } else if (type == 2) { // dynamic Huffman 326 } else if (type == 2) { // dynamic Huffman
309 const int literal_count = int(reader.bits(5)) + 257, distance_count = int(reader.bits(5)) + 1; 327 const int literal_count = int(reader.bits(5)) + 257, distance_count = int(reader.bits(5)) + 1;
@@ -340,7 +358,7 @@ inline bool zlib_inflate(std::span<const std::uint8_t> in, std::vector<std::uint
340 if (!detail::build_huffman(literal, lengths, literal_count) || 358 if (!detail::build_huffman(literal, lengths, literal_count) ||
341 !detail::build_huffman(distance, lengths + literal_count, distance_count)) 359 !detail::build_huffman(distance, lengths + literal_count, distance_count))
342 return fail(ZlibError::data); 360 return fail(ZlibError::data);
343 if (const ZlibError e = detail::inflate_codes(reader, out, literal, distance, limit); e != ZlibError::none) 361 if (const ZlibError e = detail::inflate_codes(reader, out, literal, distance, limit, bulk); e != ZlibError::none)
344 return fail(e); 362 return fail(e);
345 } else { 363 } else {
346 return fail(ZlibError::data); 364 return fail(ZlibError::data);
@@ -351,9 +369,23 @@ inline bool zlib_inflate(std::span<const std::uint8_t> in, std::vector<std::uint
351 const std::size_t at = 2 + reader.position(); 369 const std::size_t at = 2 + reader.position();
352 if (at > in.size() || in.size() - at < 4) return fail(ZlibError::data); 370 if (at > in.size() || in.size() - at < 4) return fail(ZlibError::data);
353 std::uint32_t a = 1, b = 0; 371 std::uint32_t a = 1, b = 0;
354 for (const std::uint8_t x : out) { 372 if (bulk) {
355 a = (a + x) % 65521; 373 // At most 5,552 bytes of 0xff fit in both 32-bit accumulators between reductions.
356 b = (b + a) % 65521; 374 for (std::span<const std::uint8_t> tail(out); !tail.empty();) {
375 const auto block = tail.first(std::min<std::size_t>(tail.size(), 5552));
376 for (const auto x : block) {
377 a += x;
378 b += a;
379 }
380 a %= 65521;
381 b %= 65521;
382 tail = tail.subspan(block.size());
383 }
384 } else {
385 for (const std::uint8_t x : out) {
386 a = (a + x) % 65521;
387 b = (b + a) % 65521;
388 }
357 } 389 }
358 const std::uint32_t expected = (std::uint32_t(in[at]) << 24) | (std::uint32_t(in[at + 1]) << 16) | 390 const std::uint32_t expected = (std::uint32_t(in[at]) << 24) | (std::uint32_t(in[at + 1]) << 16) |
359 (std::uint32_t(in[at + 2]) << 8) | in[at + 3]; 391 (std::uint32_t(in[at + 2]) << 8) | in[at + 3];
@@ -808,7 +840,8 @@ struct SignatureElement {
808 840
809struct ShaderEntry { 841struct ShaderEntry {
810 std::string name; 842 std::string name;
811 std::string stage; // "vs", "ps", "cs", "ms", "gs" 843 std::string spv_file; // optional "<prefix><spv>" filename when the index key is a hash
844 std::string stage; // "vs", "ps", "cs", "ms", "gs"
812 std::string fssm_sha256; 845 std::string fssm_sha256;
813 std::string fspx_code_sha256; // an FSPX program (docs/fspx.md): the SHA-256 of its kind-6 bytes 846 std::string fspx_code_sha256; // an FSPX program (docs/fspx.md): the SHA-256 of its kind-6 bytes
814 std::string fspx_state_sha256; // and of its kind-0 entry (dispatch state) 847 std::string fspx_state_sha256; // and of its kind-0 entry (dispatch state)
@@ -819,6 +852,7 @@ struct ShaderEntry {
819 // pipeline needs it at or under the device's maxComputeSharedMemorySize (32768 on some drivers). 852 // pipeline needs it at or under the device's maxComputeSharedMemorySize (32768 on some drivers).
820 std::uint32_t lds_bytes = 0; 853 std::uint32_t lds_bytes = 0;
821 bool uses_code_base = false; 854 bool uses_code_base = false;
855 bool code_base_known = false;
822 bool wave64 = false; 856 bool wave64 = false;
823 // The subgroup size the translator assumed (64 for a wave64 shader, 32 otherwise); 0 when the entry says null, 857 // The subgroup size the translator assumed (64 for a wave64 shader, 32 otherwise); 0 when the entry says null,
824 // as one translated with --wave64-emulate does, or has none. 858 // as one translated with --wave64-emulate does, or has none.
@@ -826,7 +860,14 @@ struct ShaderEntry {
826 // "workgroup" for a shader translated with --wave64-emulate: it uses no subgroup operation and is exact on any 860 // "workgroup" for a shader translated with --wave64-emulate: it uses no subgroup operation and is exact on any
827 // subgroup size. Empty for a native translation. 861 // subgroup size. Empty for a native translation.
828 std::string wave64_exchange; 862 std::string wave64_exchange;
863 // Wave64 VS/PS/GS only: the translator's partition-invariance tier (index.json `wave64_graphics`; docs/design.md,
864 // "Wave64 graphics"). A and B are exact when the wave is cut into two 32-lane halves, C is not. Empty for other
865 // stages or an index written without the analysis.
866 std::string wave64_graphics;
829 bool emulated() const { return wave64_exchange == "workgroup"; } 867 bool emulated() const { return wave64_exchange == "workgroup"; }
868 // Mesh shaders: the index's "root_window" is {"sgpr": 16, "dword": 8}, so the module reads its root arguments
869 // from the graphics window (push dword 8 = root dword 0, D3D-448 follow-up). False for one translated before it.
870 bool graphics_root_window = false;
830 std::vector<SignatureElement> input_signature; // vertex shaders: what the input layout must feed 871 std::vector<SignatureElement> input_signature; // vertex shaders: what the input layout must feed
831 std::vector<std::uint32_t> inputs; // pixel shaders: input locations declared 872 std::vector<std::uint32_t> inputs; // pixel shaders: input locations declared
832 std::vector<std::uint32_t> outputs; // pixel/vertex shaders: output locations written 873 std::vector<std::uint32_t> outputs; // pixel/vertex shaders: output locations written
@@ -841,18 +882,55 @@ struct ShaderEntry {
841 std::uint32_t max_primitives = 0; 882 std::uint32_t max_primitives = 0;
842}; 883};
843 884
885// Which descriptor-table hash finalizer the loaded modules probe with (descriptor_table.h). Each module's index.json
886// meta may carry `"descriptor_hash": "fnv1a_fmix32"`; an absent key means the old bare `"fnv1a"`. The runtime has one
887// table for all shaders, so it counts the kinds over every loaded module (the root index and each sub-index) and picks
888// the majority; a mixed library still works, because the minority's lookups simply miss to index 0.
889struct DescriptorHashCensus {
890 std::size_t fnv1a = 0;
891 std::size_t fnv1a_fmix32 = 0;
892 std::size_t total() const { return fnv1a + fnv1a_fmix32; }
893};
894
895// The kind most modules declare. A tie (or no modules) is fnv1a, the behaviour before the marker existed.
896inline DescriptorHashKind majority_descriptor_hash_kind(const DescriptorHashCensus& census) {
897 return census.fnv1a_fmix32 > census.fnv1a ? DescriptorHashKind::fnv1a_fmix32 : DescriptorHashKind::fnv1a;
898}
899
900// LEONIDA_DESCRIPTOR_HASH=fnv1a|fnv1a_fmix32 overrides the modules' majority. False when `value` is null, empty or not
901// one of the two kinds (an unrecognised value is ignored rather than failing startup).
902inline bool descriptor_hash_kind_from_env(const char* value, DescriptorHashKind* kind) {
903 if (!value || !*value) return false;
904 if (std::strcmp(value, "fnv1a_fmix32") == 0) {
905 if (kind) *kind = DescriptorHashKind::fnv1a_fmix32;
906 return true;
907 }
908 if (std::strcmp(value, "fnv1a") == 0) {
909 if (kind) *kind = DescriptorHashKind::fnv1a;
910 return true;
911 }
912 return false;
913}
914
844class ShaderLibrary { 915class ShaderLibrary {
845public: 916public:
846 // Reads <dir>/index.json, then the indexes of the programs make_game.py translates from the package's DLLs, each 917 // Reads <dir>/index.json, then the indexes of the programs make_game.py translates from the package's DLLs and the
847 // when it is there: 918 // game executable, each when it is there:
848 // - <dir>/fspx/index.json, the FidelityFX DLL's FSPX programs, entries named "fspx/<name>" (docs/fspx.md); 919 // - <dir>/fspx/index.json, the FidelityFX DLL's FSPX programs, entries named "fspx/<name>" (docs/fspx.md);
920 // - <dir>/fspx_compute/index.json, the compute programs from shaders.rpf's pipeline library;
921 // - <dir>/fspx_gfx/index.json, the graphics programs from the same library;
849 // - <dir>/bvh/index.json, XboxBvhBuilder.dll's FSSM programs, entries named "bvh/<name>" and found by 922 // - <dir>/bvh/index.json, XboxBvhBuilder.dll's FSSM programs, entries named "bvh/<name>" and found by
850 // fssm_sha256 like the game's own shaders (docs/embedded_shaders.md); 923 // fssm_sha256 like the game's own shaders (docs/embedded_shaders.md);
924 // - <dir>/exe/index.json, game_scarlett_master.exe's own DXBC containers, entries named "exe/<name>" and found
925 // the same way (docs/embedded_shaders.md, "Retail executable");
851 // - <dir>/library/index.json, the compute programs of the pipeline library in shaders.rpf, which the executable 926 // - <dir>/library/index.json, the compute programs of the pipeline library in shaders.rpf, which the executable
852 // creates with slot 67; entries named "library/<name>" and found by fspx_code_sha256 and fspx_state_sha256 927 // creates with slot 67; entries named "library/<name>" and found by fspx_code_sha256 and fspx_state_sha256
853 // like the FSPX ones (docs/shader_library.md). 928 // like the FSPX ones (docs/shader_library.md).
854 // Entries with neither fssm_sha256 nor fspx_code_sha256 cannot be found by content and are skipped. Both folders 929 // fspx_compute/ and library/ are two builds of the same slot-67 programs (make_game.py's library_shaders() writes
855 // are optional: a missing or unreadable index there leaves the main one, and the other folder's, loaded. 930 // library/; fspx_compute/ is the set translated from every console-path miss): both go into the same FSPX lookup
931 // by kind-6 and kind-0 SHA-256, and fspx_compute/ is read first, so its entry is the one found when both hold a
932 // program. Entries with neither fssm_sha256 nor fspx_code_sha256 cannot be found by content and are skipped. The
933 // sub-indexes are optional: a missing or unreadable index there leaves the main one and the other folders loaded.
856 bool load(const std::filesystem::path& dir, std::string* error = nullptr) { 934 bool load(const std::filesystem::path& dir, std::string* error = nullptr) {
857 const auto fail = [&](const std::string& why) { 935 const auto fail = [&](const std::string& why) {
858 if (error) *error = why; 936 if (error) *error = why;
@@ -870,7 +948,7 @@ public:
870 } catch (...) { 948 } catch (...) {
871 return fail("index.json could not be read"); 949 return fail("index.json could not be read");
872 } 950 }
873 for (const char* sub_folder : {"fspx", "bvh", "library"}) { 951 for (const char* sub_folder : {"fspx", "fspx_compute", "fspx_gfx", "bvh", "exe", "library"}) {
874 try { 952 try {
875 const auto ignore = [](const std::string&) { return false; }; 953 const auto ignore = [](const std::string&) { return false; };
876 const std::filesystem::path sub = folder / sub_folder; 954 const std::filesystem::path sub = folder / sub_folder;
@@ -882,17 +960,53 @@ public:
882 return true; 960 return true;
883 } 961 }
884 962
963 // Loads only the optional FSPX sub-indexes (<dir>/fspx/index.json and <dir>/fspx_gfx/index.json) without parsing
964 // the 26,565-entry main index.json, for fast stage/hash lookups in the Xbox device proxy.
965 bool load_fspx_only(const std::filesystem::path& dir) {
966 dir_ = dir;
967 entries_.clear();
968 fspx_entries_.clear();
969 count_ = 0;
970 fspx_count_ = 0;
971 fspx_compute_count_ = 0;
972 fspx_gfx_count_ = 0;
973 bvh_count_ = 0;
974 exe_count_ = 0;
975 descriptor_hash_census_ = {};
976 for (const char* folder : {"fspx", "fspx_gfx"}) {
977 try {
978 const auto ignore = [](const std::string&) { return false; };
979 const std::filesystem::path sub = dir / folder;
980 if (std::ifstream(sub / "index.json", std::ios::binary))
981 load_index(sub, std::string(folder) + "/", ignore);
982 } catch (...) {
983 }
984 }
985 return (fspx_count_ + fspx_gfx_count_) > 0;
986 }
987
885 bool loaded() const { return !dir_.empty(); } 988 bool loaded() const { return !dir_.empty(); }
886 // The folder load() read, made absolute; empty before. 989 // The folder load() read, made absolute; empty before.
887 const std::filesystem::path& directory() const { return dir_; } 990 const std::filesystem::path& directory() const { return dir_; }
888 std::size_t size() const { return count_; } 991 std::size_t size() const { return count_; }
992 // The descriptor-hash kinds the loaded modules declare, and the kind the majority of them probe with (fnv1a when
993 // they tie or none declares one). The device takes this once, before its descriptor table's first insert, unless
994 // LEONIDA_DESCRIPTOR_HASH names a kind.
995 const DescriptorHashCensus& descriptor_hash_census() const { return descriptor_hash_census_; }
996 DescriptorHashKind descriptor_hash_kind() const { return majority_descriptor_hash_kind(descriptor_hash_census_); }
889 // Entries loaded from <dir>/fspx/index.json and <dir>/library/index.json. A corpus of RPF containers never 997 // Entries loaded from <dir>/fspx/index.json and <dir>/library/index.json. A corpus of RPF containers never
890 // reaches these: their programs come from FidelityFX DLLs and the pipeline library, so callers comparing reached 998 // reaches these: their programs come from FidelityFX DLLs and the pipeline library, so callers comparing reached
891 // entries with size() must leave them out. 999 // entries with size() must leave them out.
892 std::size_t fspx_size() const { return fspx_count_; } 1000 std::size_t fspx_size() const { return fspx_count_; }
1001 std::size_t fspx_compute_size() const { return fspx_compute_count_; }
1002 // Entries loaded from <dir>/fspx_gfx/index.json (graphics FSPX programs from shaders.rpf's pipeline library).
1003 std::size_t fspx_gfx_size() const { return fspx_gfx_count_; }
893 // Entries loaded from <dir>/bvh/index.json. No RPF container reaches these either: XboxBvhBuilder.dll passes 1004 // Entries loaded from <dir>/bvh/index.json. No RPF container reaches these either: XboxBvhBuilder.dll passes
894 // their containers itself. 1005 // their containers itself.
895 std::size_t bvh_size() const { return bvh_count_; } 1006 std::size_t bvh_size() const { return bvh_count_; }
1007 // Entries loaded from <dir>/exe/index.json: game_scarlett_master.exe's inline containers, which no shader
1008 // archive holds.
1009 std::size_t exe_size() const { return exe_count_; }
896 1010
897 // The first entry for this program. Two containers can hold the same FSSM program with different input 1011 // The first entry for this program. Two containers can hold the same FSSM program with different input
898 // signatures; `candidates` returns all of them. 1012 // signatures; `candidates` returns all of them.
@@ -910,6 +1024,15 @@ public:
910 return lookup(fspx_entries_, stage, fspx_code_sha256); 1024 return lookup(fspx_entries_, stage, fspx_code_sha256);
911 } 1025 }
912 1026
1027 // Finds an FSPX program by its kind-6 SHA-256 across all stages so the stage comes from the index entry itself.
1028 const ShaderEntry* find_fspx_by_code(std::string_view fspx_code_sha256) const {
1029 for (std::string_view st : {"vs", "ps", "ms", "gs", "cs"}) {
1030 const auto all = fspx_candidates(st, fspx_code_sha256);
1031 if (!all.empty()) return all.front();
1032 }
1033 return nullptr;
1034 }
1035
913 // The entries for a program compute_program() found, by the key of its kind (docs/fspx.md, "Build and run-time 1036 // The entries for a program compute_program() found, by the key of its kind (docs/fspx.md, "Build and run-time
914 // lookup"): 1037 // lookup"):
915 // - FSSM: by fssm_sha256, as before; 1038 // - FSSM: by fssm_sha256, as before;
@@ -946,11 +1069,30 @@ public:
946 return all; 1069 return all;
947 } 1070 }
948 1071
1072 // The size of the module's file in bytes, or 0 when it is missing: what spirv() would read, without reading it.
1073 std::size_t spirv_bytes(const ShaderEntry& entry) const {
1074 std::error_code ec;
1075 auto path = dir_;
1076 path += "/" + entry.name + ".spv";
1077 auto size = std::filesystem::file_size(path, ec);
1078 if (ec && !entry.spv_file.empty()) {
1079 auto alt = dir_;
1080 alt += "/" + entry.spv_file;
1081 size = std::filesystem::file_size(alt, ec);
1082 }
1083 return ec ? 0 : static_cast<std::size_t>(size);
1084 }
1085
949 // The module's words, or empty when <dir>/<name>.spv is missing or not SPIR-V. 1086 // The module's words, or empty when <dir>/<name>.spv is missing or not SPIR-V.
950 std::vector<std::uint32_t> spirv(const ShaderEntry& entry) const { 1087 std::vector<std::uint32_t> spirv(const ShaderEntry& entry) const {
951 auto path = dir_; 1088 auto path = dir_;
952 path += "/" + entry.name + ".spv"; 1089 path += "/" + entry.name + ".spv";
953 std::ifstream file(path, std::ios::binary | std::ios::ate); 1090 std::ifstream file(path, std::ios::binary | std::ios::ate);
1091 if (!file && !entry.spv_file.empty()) {
1092 auto alt = dir_;
1093 alt += "/" + entry.spv_file;
1094 file.open(alt, std::ios::binary | std::ios::ate);
1095 }
954 return read_spirv_words(file, file.tellg()); 1096 return read_spirv_words(file, file.tellg());
955 } 1097 }
956 1098
@@ -999,7 +1141,11 @@ private:
999 fspx_entries_.clear(); 1141 fspx_entries_.clear();
1000 count_ = 0; 1142 count_ = 0;
1001 fspx_count_ = 0; 1143 fspx_count_ = 0;
1144 fspx_compute_count_ = 0;
1145 fspx_gfx_count_ = 0;
1002 bvh_count_ = 0; 1146 bvh_count_ = 0;
1147 exe_count_ = 0;
1148 descriptor_hash_census_ = {};
1003 } 1149 }
1004 for (const auto& [name, meta] : root.object) { 1150 for (const auto& [name, meta] : root.object) {
1005 const Json* hash = meta.find("fssm_sha256"); 1151 const Json* hash = meta.find("fssm_sha256");
@@ -1010,6 +1156,8 @@ private:
1010 if ((!by_fssm && !by_fspx) || !stage || stage->kind != Json::Kind::string) continue; 1156 if ((!by_fssm && !by_fspx) || !stage || stage->kind != Json::Kind::string) continue;
1011 ShaderEntry e; 1157 ShaderEntry e;
1012 e.name = prefix + name; 1158 e.name = prefix + name;
1159 if (const Json* spv = meta.find("spv"); spv && spv->kind == Json::Kind::string && !spv->string.empty())
1160 e.spv_file = prefix + spv->string;
1013 e.stage = stage->string; 1161 e.stage = stage->string;
1014 if (by_fssm) e.fssm_sha256 = hash->string; 1162 if (by_fssm) e.fssm_sha256 = hash->string;
1015 if (by_fspx) e.fspx_code_sha256 = code_hash->string; 1163 if (by_fspx) e.fspx_code_sha256 = code_hash->string;
@@ -1020,12 +1168,26 @@ private:
1020 e.lds_bytes = u32(meta.find("lds_bytes")); 1168 e.lds_bytes = u32(meta.find("lds_bytes"));
1021 if (const Json* l = meta.find("local_size"); l && l->kind == Json::Kind::array) 1169 if (const Json* l = meta.find("local_size"); l && l->kind == Json::Kind::array)
1022 for (std::size_t i = 0; i < l->array.size() && i < 3; ++i) e.local_size[i] = u32(&l->array[i]); 1170 for (std::size_t i = 0; i < l->array.size() && i < 3; ++i) e.local_size[i] = u32(&l->array[i]);
1023 if (const Json* c = meta.find("uses_code_base"); c && c->kind == Json::Kind::boolean) e.uses_code_base = c->boolean; 1171 // The paired FSPX translator emits uses_code_base only when true. Older
1172 // key-only indexes have no such contract; retain their program bytes.
1173 e.code_base_known = !e.fspx_state_sha256.empty();
1174 if (const Json* c = meta.find("uses_code_base"); c && c->kind == Json::Kind::boolean) {
1175 e.uses_code_base = c->boolean;
1176 e.code_base_known = true;
1177 }
1024 if (const Json* w = meta.find("wave64"); w && w->kind == Json::Kind::boolean) e.wave64 = w->boolean; 1178 if (const Json* w = meta.find("wave64"); w && w->kind == Json::Kind::boolean) e.wave64 = w->boolean;
1025 if (const Json* g = meta.find("subgroup_size"); g && g->kind == Json::Kind::number) 1179 if (const Json* g = meta.find("subgroup_size"); g && g->kind == Json::Kind::number)
1026 e.subgroup_size = u32(g); 1180 e.subgroup_size = u32(g);
1027 if (const Json* x = meta.find("wave64_exchange"); x && x->kind == Json::Kind::string) 1181 if (const Json* x = meta.find("wave64_exchange"); x && x->kind == Json::Kind::string)
1028 e.wave64_exchange = x->string; 1182 e.wave64_exchange = x->string;
1183 if (const Json* r = meta.find("root_window"); r && r->kind == Json::Kind::object) {
1184 const Json* sgpr = r->find("sgpr");
1185 const Json* dword = r->find("dword");
1186 e.graphics_root_window = sgpr && dword && sgpr->kind == Json::Kind::number &&
1187 dword->kind == Json::Kind::number && u32(sgpr) == 16 && u32(dword) == 8;
1188 }
1189 if (const Json* wg = meta.find("wave64_graphics"); wg && wg->kind == Json::Kind::string)
1190 e.wave64_graphics = wg->string;
1029 if (const Json* s = meta.find("input_signature"); s && s->kind == Json::Kind::array) { 1191 if (const Json* s = meta.find("input_signature"); s && s->kind == Json::Kind::array) {
1030 for (const Json& item : s->array) { 1192 for (const Json& item : s->array) {
1031 SignatureElement element; 1193 SignatureElement element;
@@ -1072,10 +1234,20 @@ private:
1072 } 1234 }
1073 e.max_vertices = u32(meta.find("max_vertices")); 1235 e.max_vertices = u32(meta.find("max_vertices"));
1074 e.max_primitives = u32(meta.find("max_primitives")); 1236 e.max_primitives = u32(meta.find("max_primitives"));
1237 // Which finalizer this module's shader probes the descriptor table with (descriptor_table.h). Absent, or not
1238 // a kind this runtime knows, is the old bare FNV-1a.
1239 if (const Json* dh = meta.find("descriptor_hash");
1240 dh && dh->kind == Json::Kind::string && dh->string == "fnv1a_fmix32")
1241 ++descriptor_hash_census_.fnv1a_fmix32;
1242 else
1243 ++descriptor_hash_census_.fnv1a;
1075 if (by_fspx) fspx_entries_[{e.stage, e.fspx_code_sha256}].push_back(e); 1244 if (by_fspx) fspx_entries_[{e.stage, e.fspx_code_sha256}].push_back(e);
1076 if (by_fssm) entries_[{e.stage, e.fssm_sha256}].push_back(std::move(e)); 1245 if (by_fssm) entries_[{e.stage, e.fssm_sha256}].push_back(std::move(e));
1077 if (by_fspx && (prefix == "fspx/" || prefix == "library/")) ++fspx_count_; 1246 if (by_fspx && (prefix == "fspx/" || prefix == "library/")) ++fspx_count_;
1247 if (by_fspx && prefix == "fspx_compute/") ++fspx_compute_count_;
1248 if (by_fspx && prefix == "fspx_gfx/") ++fspx_gfx_count_;
1078 if (prefix == "bvh/") ++bvh_count_; 1249 if (prefix == "bvh/") ++bvh_count_;
1250 if (prefix == "exe/") ++exe_count_;
1079 ++count_; 1251 ++count_;
1080 } 1252 }
1081 return true; 1253 return true;
@@ -1084,10 +1256,14 @@ private:
1084 std::filesystem::path dir_; 1256 std::filesystem::path dir_;
1085 std::size_t count_ = 0; 1257 std::size_t count_ = 0;
1086 std::size_t fspx_count_ = 0; 1258 std::size_t fspx_count_ = 0;
1259 std::size_t fspx_compute_count_ = 0;
1260 std::size_t fspx_gfx_count_ = 0;
1087 std::size_t bvh_count_ = 0; 1261 std::size_t bvh_count_ = 0;
1262 std::size_t exe_count_ = 0;
1088 // Entries by (stage, fssm_sha256) and by (stage, fspx_code_sha256), in index order. 1263 // Entries by (stage, fssm_sha256) and by (stage, fspx_code_sha256), in index order.
1089 Entries entries_; 1264 Entries entries_;
1090 Entries fspx_entries_; 1265 Entries fspx_entries_;
1266 DescriptorHashCensus descriptor_hash_census_;
1091}; 1267};
1092 1268
1093} // namespace leonida 1269} // namespace leonida
diff --git a/runtime/src/subgroup_size.h b/runtime/src/subgroup_size.h
index c391b7e63..0241c4db8 100644
--- a/runtime/src/subgroup_size.h
+++ b/runtime/src/subgroup_size.h
@@ -61,6 +61,14 @@ inline VkShaderStageFlagBits subgroup_stage_bit(std::string_view stage) {
61 return VkShaderStageFlagBits(0); 61 return VkShaderStageFlagBits(0);
62} 62}
63 63
64// A wave64 VS/PS/GS that the translator's partition-invariance analysis (index.json `wave64_graphics`; docs/design.md,
65// "Wave64 graphics") puts in tier A or B: observable results do not change when the GPU cuts the wave into two 32-lane
66// halves, so the device's 32-wide size is exact for it. Tier C and entries without the analysis stay conservative.
67inline bool graphics_partition_invariant(const ShaderEntry& entry) {
68 if (entry.stage != "vs" && entry.stage != "ps" && entry.stage != "gs") return false;
69 return entry.wave64 && (entry.wave64_graphics == "A" || entry.wave64_graphics == "B");
70}
71
64enum class SubgroupOutcome { 72enum class SubgroupOutcome {
65 emulated, // --wave64-emulate: exact on any size, nothing is required 73 emulated, // --wave64-emulate: exact on any size, nothing is required
66 required, // the stage asks for `size` 74 required, // the stage asks for `size`
diff --git a/runtime/src/submit_phases.h b/runtime/src/submit_phases.h
new file mode 100644
index 000000000..84ea77b02
--- /dev/null
+++ b/runtime/src/submit_phases.h
@@ -0,0 +1,133 @@
1#pragma once
2// Where a submission's CPU time goes, always on and cheap: each phase of VulkanQueue::execute_now adds its time here
3// (two steady_clock reads and two relaxed atomic adds), and every LEONIDA_SUBMIT_PHASES_SECONDS (5 by default, 0 turns
4// the line off) one line says, since the last line, how many submissions there were, how many per second, the
5// milliseconds per submission of each phase with the largest single one, and the share of the wall time the
6// submitting threads spent in them. The time is the process's age (GetProcessTimes), so it lines up with the boot.
7#ifdef _WIN32
8#ifndef NOMINMAX
9#define NOMINMAX
10#endif
11#include <windows.h>
12#endif
13#include <atomic>
14#include <chrono>
15#include <cstdint>
16#include <cstdio>
17#include <cstdlib>
18
19namespace leonida::submit_phases {
20
21enum Phase : unsigned {
22 wait_room, // VulkanQueue::wait_for_room: the queue at its cap waits for the GPU
23 heaps, // DeviceState::refresh_console_heaps
24 shadows, // slot-133 shadow buffers and title windows (ShadowPages::refresh)
25 geometry, // GeometryViews::refresh
26 textures, // Device::refresh_title_textures
27 replay, // the rest of execute_now: preparing, recording and submitting the lists
28 kCount
29};
30
31inline const char* name(unsigned p) {
32 static const char* const names[kCount] = {"wait", "heaps", "shadows", "geometry", "textures", "replay"};
33 return p < kCount ? names[p] : "?";
34}
35
36struct Totals {
37 std::atomic<std::uint64_t> ns[kCount]{};
38 std::atomic<std::uint64_t> max_ns[kCount]{};
39 std::atomic<std::uint64_t> submissions{0}, all_submissions{0};
40 std::atomic<std::int64_t> last_log{0};
41 std::atomic<std::uint64_t> presents{0}; // frames the presenter showed (VulkanPresenter), since the last line
42 std::atomic<std::uint64_t> present_serial{0}; // the same, never reset (LEONIDA_REFRESH_PER_FRAME)
43 std::atomic<std::uint32_t> thread{0}; // the thread of the last submission (the thread sampler reports it apart)
44};
45inline Totals& totals() {
46 static Totals t;
47 return t;
48}
49
50inline std::int64_t now_ns() {
51 return std::chrono::duration_cast<std::chrono::nanoseconds>(std::chrono::steady_clock::now().time_since_epoch())
52 .count();
53}
54
55// Seconds since the process started.
56inline double process_age() {
57#ifdef _WIN32
58 FILETIME created{}, exited{}, kernel{}, user{}, now{};
59 if (!GetProcessTimes(GetCurrentProcess(), &created, &exited, &kernel, &user)) return 0;
60 GetSystemTimeAsFileTime(&now);
61 const auto ticks = [](const FILETIME& f) { return (std::uint64_t(f.dwHighDateTime) << 32) | f.dwLowDateTime; };
62 return double(ticks(now) - ticks(created)) * 1e-7;
63#else
64 return 0;
65#endif
66}
67
68inline std::int64_t period_ns() {
69 static const std::int64_t value = [] {
70 const char* text = std::getenv("LEONIDA_SUBMIT_PHASES_SECONDS");
71 const unsigned long long s = text && *text ? std::strtoull(text, nullptr, 10) : 5;
72 return std::int64_t(s) * 1000000000;
73 }();
74 return value;
75}
76
77inline void add(Phase p, std::uint64_t ns) {
78 Totals& t = totals();
79 t.ns[p].fetch_add(ns, std::memory_order_relaxed);
80 std::uint64_t m = t.max_ns[p].load(std::memory_order_relaxed);
81 while (ns > m && !t.max_ns[p].compare_exchange_weak(m, ns, std::memory_order_relaxed)) {
82 }
83}
84
85// Times its own lifetime into a phase.
86struct Scope {
87 Phase phase;
88 std::int64_t start = now_ns();
89 explicit Scope(Phase p) : phase(p) {}
90 ~Scope() { add(phase, std::uint64_t(now_ns() - start)); }
91 Scope(const Scope&) = delete;
92 Scope& operator=(const Scope&) = delete;
93};
94
95// After each submission: counts it, and prints the line when the period has passed. One thread wins the line.
96inline void submitted() {
97 Totals& t = totals();
98 t.submissions.fetch_add(1, std::memory_order_relaxed);
99 t.all_submissions.fetch_add(1, std::memory_order_relaxed);
100#ifdef _WIN32
101 t.thread.store(GetCurrentThreadId(), std::memory_order_relaxed);
102#endif
103 const std::int64_t period = period_ns();
104 if (!period) return;
105 const std::int64_t now = now_ns();
106 std::int64_t last = t.last_log.load(std::memory_order_relaxed);
107 if (!last) {
108 t.last_log.compare_exchange_strong(last, now, std::memory_order_relaxed);
109 return;
110 }
111 if (now - last < period || !t.last_log.compare_exchange_strong(last, now, std::memory_order_relaxed)) return;
112 const double seconds = double(now - last) * 1e-9;
113 const std::uint64_t n = t.submissions.exchange(0, std::memory_order_relaxed);
114 const std::uint64_t frames = t.presents.exchange(0, std::memory_order_relaxed);
115 double ms[kCount], max_ms[kCount], all = 0;
116 for (unsigned p = 0; p < kCount; ++p) {
117 const double total = double(t.ns[p].exchange(0, std::memory_order_relaxed)) * 1e-6;
118 max_ms[p] = double(t.max_ns[p].exchange(0, std::memory_order_relaxed)) * 1e-6;
119 ms[p] = n ? total / double(n) : 0;
120 all += total;
121 }
122 std::fprintf(stderr,
123 "[rt] submit phases t=%.0fs: %llu submissions in %.1f s (%.2f/s, %llu in all), %.2f frames/s; ms per submission "
124 "(max): %s %.2f (%.0f) %s %.2f (%.0f) %s %.2f (%.0f) %s %.2f (%.0f) %s %.2f (%.0f) %s %.2f (%.0f); "
125 "%.0f%% of the wall time\n",
126 process_age(), static_cast<unsigned long long>(n), seconds, double(n) / seconds,
127 static_cast<unsigned long long>(t.all_submissions.load(std::memory_order_relaxed)),
128 double(frames) / seconds, name(0), ms[0],
129 max_ms[0], name(1), ms[1], max_ms[1], name(2), ms[2], max_ms[2], name(3), ms[3], max_ms[3], name(4),
130 ms[4], max_ms[4], name(5), ms[5], max_ms[5], 100.0 * all * 1e-3 / seconds);
131}
132
133} // namespace leonida::submit_phases
diff --git a/runtime/src/thread_sampler.h b/runtime/src/thread_sampler.h
new file mode 100644
index 000000000..282eb20dd
--- /dev/null
+++ b/runtime/src/thread_sampler.h
@@ -0,0 +1,404 @@
1#pragma once
2// LEONIDA_SAMPLE_MS=<ms> (diagnostic, off by default): where the process's busy threads spend their CPU, without a
3// debugger or perf. A thread wakes every <ms>, and for each thread of the process that used CPU since its last look
4// suspends it, copies its context and resumes it at once; the stack is then unwound outside the suspension (through
5// the .pdata every module registers, the title's included), under __try, since the thread runs on meanwhile. Every
6// LEONIDA_SAMPLE_REPORT_S seconds (10) one block lists the busiest threads (CPU share) and the most frequent call
7// chains (up to eight frames, innermost first): title frames as t+RVA of the function, others as module+RVA. Nothing is
8// allocated or logged while a thread is suspended, so a suspended thread's locks are never waited for.
9#ifndef NOMINMAX
10#define NOMINMAX
11#endif
12#include <windows.h>
13#include <tlhelp32.h>
14
15#include <algorithm>
16#include <array>
17#include <cstdint>
18#include <cstdio>
19#include <cstdlib>
20#include <map>
21#include <string>
22#include <vector>
23
24#include "submit_phases.h"
25
26namespace leonida::thread_sampler {
27
28constexpr int kFrames = 8;
29using Chain = std::array<std::uint64_t, kFrames>; // function starts (or addresses), innermost first
30// LEONIDA_SAMPLE_SHIMS=1 (with LEONIDA_SAMPLE_MS): each sample is unwound this deep to tell whether a title thread
31// is inside our runtime (a frame of this executable called, at any depth, from title code), and where.
32constexpr int kDeepFrames = 48;
33using DeepChain = std::array<std::uint64_t, kDeepFrames>;
34
35
36struct Sampler {
37 std::uint8_t* title = nullptr;
38 std::uint64_t title_size = 0;
39 DWORD period_ms = 10;
40 DWORD report_ms = 10000;
41 bool waits = false; // LEONIDA_SAMPLE_WAITS=1: every thread, busy or waiting (where the wall time goes)
42 bool shims = false; // LEONIDA_SAMPLE_SHIMS=1: per title thread, the share of its samples inside our runtime
43 std::uint64_t self_base = 0, self_size = 0; // this executable (the runtime)
44 // LEONIDA_SAMPLE_DETAIL=<id>[,<id>...]: for these threads, the 10 most frequent chains, 16 frames deep, each as a
45 // share of that thread's samples (thread ids are stable from boot to boot: the title's main, render and submit).
46 std::vector<DWORD> detail;
47};
48
49// Per title thread (one with a title frame in its chain): how many samples were inside our runtime, and through which
50// entry (the runtime frame the title called) and which runtime function was innermost.
51struct ShimCounts {
52 std::uint64_t title = 0; // samples with a title frame
53 std::uint64_t ours = 0; // ... of which inside our runtime
54 std::uint64_t ours_busy = 0; // ... while the thread used CPU since the previous look
55 std::uint64_t busy = 0; // samples with a title frame while the thread used CPU
56 std::map<std::pair<std::uint64_t, std::uint64_t>, std::uint64_t> entries; // (our entry, title caller) -> samples
57 std::map<std::uint64_t, std::uint64_t> inner; // innermost runtime function -> samples
58 std::map<std::uint64_t, std::uint64_t> leaves; // innermost frame (any module) -> samples
59};
60
61// Classifies one deep chain (innermost first) for LEONIDA_SAMPLE_SHIMS.
62inline void count_shims(const Sampler& s, const DeepChain& chain, int n, bool moved, ShimCounts& c) {
63 const auto title = reinterpret_cast<std::uint64_t>(s.title);
64 const auto in_title = [&](std::uint64_t a) { return a >= title && a < title + s.title_size; };
65 const auto in_self = [&](std::uint64_t a) { return a >= s.self_base && a < s.self_base + s.self_size; };
66 int first_title = -1;
67 for (int i = 0; i < n; ++i)
68 if (in_title(chain[i])) {
69 first_title = i;
70 break;
71 }
72 if (first_title < 0) return;
73 ++c.title;
74 c.busy += moved;
75 int entry = -1, innermost = -1;
76 for (int i = 0; i < first_title; ++i)
77 if (in_self(chain[i])) {
78 if (innermost < 0) innermost = i;
79 entry = i; // the outermost runtime frame below the title's
80 }
81 if (entry < 0) return;
82 ++c.ours;
83 c.ours_busy += moved;
84 ++c.entries[{chain[entry], chain[first_title]}];
85 ++c.inner[chain[innermost]];
86 ++c.leaves[chain[0]];
87}
88
89// The chain of a context copied from a suspended thread: unwound under __try (its stack may be changing).
90template <std::size_t N>
91inline int unwind(CONTEXT context, std::array<std::uint64_t, N>& chain) {
92 int n = 0;
93 __try {
94 for (; n < int(N); ++n) {
95 const DWORD64 pc = context.Rip;
96 if (!pc) break;
97 DWORD64 image = 0;
98 PRUNTIME_FUNCTION entry = RtlLookupFunctionEntry(pc, &image, nullptr);
99 chain[n] = entry ? image + entry->BeginAddress : pc;
100 if (!entry) { // a leaf, or code with no unwind data: take the return address at the stack pointer
101 context.Rip = *reinterpret_cast<const DWORD64*>(context.Rsp);
102 context.Rsp += 8;
103 continue;
104 }
105 void* handler_data = nullptr;
106 DWORD64 frame = 0;
107 RtlVirtualUnwind(UNW_FLAG_NHANDLER, image, pc, entry, &context, &handler_data, &frame, nullptr);
108 }
109 } __except (EXCEPTION_EXECUTE_HANDLER) {
110 }
111 return n;
112}
113
114inline std::string name_of(const Sampler& s, std::uint64_t at) {
115 char text[96];
116 const auto title = reinterpret_cast<std::uint64_t>(s.title);
117 if (at >= title && at < title + s.title_size) {
118 std::snprintf(text, sizeof(text), "t+%llx", static_cast<unsigned long long>(at - title));
119 return text;
120 }
121 HMODULE module = nullptr;
122 if (GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT,
123 reinterpret_cast<LPCWSTR>(at), &module) &&
124 module) {
125 wchar_t path[MAX_PATH] = {};
126 GetModuleFileNameW(module, path, MAX_PATH);
127 const wchar_t* base = path;
128 for (const wchar_t* p = path; *p; ++p)
129 if (*p == L'\\' || *p == L'/') base = p + 1;
130 std::snprintf(text, sizeof(text), "%ls+%llx", base,
131 static_cast<unsigned long long>(at - reinterpret_cast<std::uint64_t>(module)));
132 return text;
133 }
134 std::snprintf(text, sizeof(text), "0x%llx", static_cast<unsigned long long>(at));
135 return text;
136}
137
138inline DWORD WINAPI run(LPVOID parameter) {
139 const Sampler s = *static_cast<Sampler*>(parameter);
140 SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_TIME_CRITICAL);
141 const DWORD self = GetCurrentThreadId(), pid = GetCurrentProcessId();
142 struct Thread {
143 HANDLE handle = nullptr;
144 std::uint64_t cpu = 0; // 100 ns, at the last look
145 std::uint64_t used = 0; // since the last report
146 std::uint64_t samples = 0;
147 };
148 std::map<DWORD, Thread> threads;
149 std::map<std::pair<DWORD, Chain>, std::uint64_t> chains;
150 std::map<DWORD, ShimCounts> shim_counts;
151 constexpr int kDetailFrames = 16;
152 using DetailChain = std::array<std::uint64_t, kDetailFrames>;
153 std::map<std::pair<DWORD, DetailChain>, std::uint64_t> detail_chains;
154 std::uint64_t total = 0;
155 ULONGLONG listed = 0, reported = GetTickCount64();
156 const auto cpu_of = [](HANDLE h) {
157 FILETIME created{}, exited{}, kernel{}, user{};
158 if (!GetThreadTimes(h, &created, &exited, &kernel, &user)) return std::uint64_t(0);
159 const auto ticks = [](const FILETIME& f) { return (std::uint64_t(f.dwHighDateTime) << 32) | f.dwLowDateTime; };
160 return ticks(kernel) + ticks(user);
161 };
162 for (;;) {
163 Sleep(s.period_ms);
164 const ULONGLONG now = GetTickCount64();
165 if (now - listed >= 2000) { // the thread list, every 2 s
166 listed = now;
167 const HANDLE snap = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
168 if (snap != INVALID_HANDLE_VALUE) {
169 THREADENTRY32 e{sizeof(e)};
170 for (BOOL ok = Thread32First(snap, &e); ok; ok = Thread32Next(snap, &e)) {
171 if (e.th32OwnerProcessID != pid || e.th32ThreadID == self || threads.count(e.th32ThreadID)) continue;
172 const HANDLE h = OpenThread(THREAD_SUSPEND_RESUME | THREAD_GET_CONTEXT | THREAD_QUERY_INFORMATION,
173 FALSE, e.th32ThreadID);
174 if (h) threads[e.th32ThreadID] = {h, cpu_of(h)};
175 e.dwSize = sizeof(e);
176 }
177 CloseHandle(snap);
178 }
179 }
180 for (auto it = threads.begin(); it != threads.end();) {
181 Thread& t = it->second;
182 const std::uint64_t cpu = cpu_of(t.handle);
183 DWORD code = 0;
184 if (GetExitCodeThread(t.handle, &code) && code != STILL_ACTIVE) {
185 CloseHandle(t.handle);
186 it = threads.erase(it);
187 continue;
188 }
189 const bool moved = cpu != t.cpu;
190 const bool busy = moved || s.waits;
191 t.used += cpu - t.cpu;
192 t.cpu = cpu;
193 if (busy) {
194 CONTEXT context{};
195 context.ContextFlags = CONTEXT_CONTROL | CONTEXT_INTEGER;
196 bool got = false;
197 if (SuspendThread(t.handle) != DWORD(-1)) {
198 got = GetThreadContext(t.handle, &context) != FALSE;
199 ResumeThread(t.handle);
200 }
201 if (got) {
202 Chain chain{};
203 if (std::find(s.detail.begin(), s.detail.end(), it->first) != s.detail.end()) {
204 DetailChain deep{};
205 unwind(context, deep);
206 ++detail_chains[{it->first, deep}];
207 }
208 if (s.shims) {
209 DeepChain deep{};
210 const int n = unwind(context, deep);
211 std::copy_n(deep.begin(), kFrames, chain.begin());
212 count_shims(s, deep, n, moved, shim_counts[it->first]);
213 } else {
214 unwind(context, chain);
215 }
216 ++chains[{it->first, chain}];
217 ++t.samples;
218 ++total;
219 }
220 }
221 ++it;
222 }
223 if (now - reported < s.report_ms || !total) continue;
224 const double seconds = double(now - reported) / 1000.0;
225 reported = now;
226 std::vector<std::pair<std::uint64_t, DWORD>> busiest;
227 for (auto& [id, t] : threads)
228 if (t.used) busiest.emplace_back(t.used, id);
229 std::sort(busiest.rbegin(), busiest.rend());
230 std::string line;
231 for (std::size_t i = 0; i < busiest.size() && i < 8; ++i) {
232 char text[64];
233 std::snprintf(text, sizeof(text), "%s%lu %.0f%%", i ? ", " : "", busiest[i].second,
234 double(busiest[i].first) * 1e-5 / seconds);
235 line += text;
236 }
237 std::fprintf(stderr, "[rt] sampler: %llu samples in %.0f s; CPU by thread: %s\n",
238 static_cast<unsigned long long>(total), seconds, line.c_str());
239 std::vector<std::pair<std::uint64_t, const std::pair<DWORD, Chain>*>> top;
240 for (const auto& c : chains) top.emplace_back(c.second, &c.first);
241 std::sort(top.begin(), top.end(), [](const auto& a, const auto& b) { return a.first > b.first; });
242 const auto print = [&](const auto& entry, std::uint64_t of, const char* what) {
243 std::string frames;
244 for (int f = 0; f < kFrames && entry.second->second[f]; ++f)
245 frames += (f ? " < " : "") + name_of(s, entry.second->second[f]);
246 std::fprintf(stderr, "[rt] sampler: %s %5.1f%% thread %lu: %s\n", what, 100.0 * double(entry.first) / double(of),
247 entry.second->first, frames.c_str());
248 };
249 for (std::size_t i = 0; i < top.size() && i < 16; ++i) print(top[i], total, " ");
250 // Apart: the submitting thread's chains, and the two busiest threads', each as a share of that thread's samples.
251 std::vector<DWORD> apart;
252 if (const DWORD submitter = submit_phases::totals().thread.load(std::memory_order_relaxed)) apart.push_back(submitter);
253 for (std::size_t i = 0; i < busiest.size() && i < 2; ++i)
254 if (std::find(apart.begin(), apart.end(), busiest[i].second) == apart.end()) apart.push_back(busiest[i].second);
255 // With waiting threads sampled: each thread's own most frequent chain, busiest first, so a thread that waits
256 // (the title's main thread behind its render thread, a render thread behind a lock) shows where.
257 if (s.waits) {
258 std::vector<std::pair<std::uint64_t, DWORD>> all;
259 for (auto& [id, t] : threads)
260 if (t.samples) all.emplace_back(t.used, id);
261 std::sort(all.rbegin(), all.rend());
262 std::size_t listed = 0;
263 for (const auto& [used, id] : all) {
264 if (listed++ >= 24) break;
265 const auto it = threads.find(id);
266 if (it == threads.end() || !it->second.samples) continue;
267 for (const auto& entry : top)
268 if (entry.second->first == id) {
269 print(entry, it->second.samples, "thread");
270 break;
271 }
272 }
273 }
274 for (const DWORD id : apart) {
275 const auto it = threads.find(id);
276 if (it == threads.end() || !it->second.samples) continue;
277 std::size_t shown = 0;
278 for (const auto& entry : top)
279 if (entry.second->first == id && shown++ < 8)
280 print(entry, it->second.samples, id == apart.front() && submit_phases::totals().thread.load() == id
281 ? "submit"
282 : "busy ");
283 }
284 for (const DWORD id : s.detail) {
285 std::vector<std::pair<std::uint64_t, const DetailChain*>> mine;
286 std::uint64_t all = 0;
287 for (const auto& [key, n] : detail_chains)
288 if (key.first == id) {
289 mine.emplace_back(n, &key.second);
290 all += n;
291 }
292 std::sort(mine.begin(), mine.end(), [](const auto& a, const auto& b) { return a.first > b.first; });
293 for (std::size_t i = 0; i < mine.size() && i < 10; ++i) {
294 std::string frames;
295 for (int f = 0; f < kDetailFrames && (*mine[i].second)[f]; ++f)
296 frames += (f ? " < " : "") + name_of(s, (*mine[i].second)[f]);
297 std::fprintf(stderr, "[rt] sampler: detail thread %lu %5.1f%%: %s\n", id,
298 100.0 * double(mine[i].first) / double(all), frames.c_str());
299 }
300 }
301 detail_chains.clear();
302 if (s.shims) {
303 // Title threads by their samples inside our runtime: where the title's own threads (its main, render and
304 // Subrender workers, streaming) spend time in our shims, waiting or running.
305 const auto top_of = [&](const auto& counts, std::size_t limit, bool pair_key) {
306 std::vector<std::pair<std::uint64_t, std::string>> v;
307 for (const auto& [key, n] : counts) {
308 std::string name;
309 if constexpr (requires { key.first; }) {
310 name = name_of(s, key.first) + "<-" + name_of(s, key.second);
311 } else {
312 name = name_of(s, key);
313 }
314 v.emplace_back(n, std::move(name));
315 }
316 (void)pair_key;
317 std::sort(v.begin(), v.end(), [](const auto& a, const auto& b) { return a.first > b.first; });
318 std::string text;
319 for (std::size_t i = 0; i < v.size() && i < limit; ++i) {
320 char n[24];
321 std::snprintf(n, sizeof(n), " %llu", static_cast<unsigned long long>(v[i].first));
322 text += (i ? ", " : "") + v[i].second + n;
323 }
324 return text;
325 };
326 std::vector<std::pair<std::uint64_t, DWORD>> order;
327 ShimCounts all;
328 for (const auto& [id, c] : shim_counts) {
329 if (!c.title) continue;
330 order.emplace_back(c.ours, id);
331 all.title += c.title;
332 all.ours += c.ours;
333 all.ours_busy += c.ours_busy;
334 all.busy += c.busy;
335 for (const auto& [k, n] : c.entries) all.entries[k] += n;
336 for (const auto& [k, n] : c.inner) all.inner[k] += n;
337 for (const auto& [k, n] : c.leaves) all.leaves[k] += n;
338 }
339 std::sort(order.rbegin(), order.rend());
340 std::fprintf(stderr, "[rt] sampler: shims: title-thread samples inside our runtime %llu of %llu (%.1f%%), "
341 "%llu of them while the thread used CPU\n",
342 static_cast<unsigned long long>(all.ours), static_cast<unsigned long long>(all.title),
343 all.title ? 100.0 * double(all.ours) / double(all.title) : 0.0,
344 static_cast<unsigned long long>(all.ours_busy));
345 for (std::size_t i = 0; i < order.size() && i < 12 && order[i].first; ++i) {
346 const ShimCounts& c = shim_counts[order[i].second];
347 std::fprintf(stderr, "[rt] sampler: shims thread %lu: %llu of %llu samples ours (%.0f%%; %llu busy), "
348 "thread busy in %llu; entries: %s; innermost ours: %s; leaves: %s\n",
349 order[i].second, static_cast<unsigned long long>(c.ours),
350 static_cast<unsigned long long>(c.title), 100.0 * double(c.ours) / double(c.title),
351 static_cast<unsigned long long>(c.ours_busy), static_cast<unsigned long long>(c.busy),
352 top_of(c.entries, 5, true).c_str(), top_of(c.inner, 5, false).c_str(),
353 top_of(c.leaves, 3, false).c_str());
354 }
355 std::fprintf(stderr, "[rt] sampler: shims all: entries: %s\n", top_of(all.entries, 16, true).c_str());
356 std::fprintf(stderr, "[rt] sampler: shims all: innermost ours: %s\n", top_of(all.inner, 16, false).c_str());
357 std::fprintf(stderr, "[rt] sampler: shims all: leaves: %s\n", top_of(all.leaves, 12, false).c_str());
358 shim_counts.clear();
359 }
360 chains.clear();
361 total = 0;
362 for (auto& [id, t] : threads) t.used = t.samples = 0;
363 }
364}
365
366// From main, once the title is mapped. Does nothing without LEONIDA_SAMPLE_MS.
367inline void start(std::uint8_t* title, std::uint64_t title_size) {
368 char text[16] = {};
369 const DWORD n = GetEnvironmentVariableA("LEONIDA_SAMPLE_MS", text, sizeof(text));
370 if (!n || n >= sizeof(text)) return;
371 static Sampler s;
372 s.title = title;
373 s.title_size = title_size;
374 s.period_ms = (std::max)(1ul, std::strtoul(text, nullptr, 10));
375 char report[16] = {};
376 if (GetEnvironmentVariableA("LEONIDA_SAMPLE_REPORT_S", report, sizeof(report)) > 0)
377 s.report_ms = (std::max)(1ul, std::strtoul(report, nullptr, 10)) * 1000;
378 char waits[4] = {};
379 s.waits = GetEnvironmentVariableA("LEONIDA_SAMPLE_WAITS", waits, sizeof(waits)) == 1 && waits[0] == '1';
380 char detail[128] = {};
381 if (const DWORD n = GetEnvironmentVariableA("LEONIDA_SAMPLE_DETAIL", detail, sizeof(detail)); n && n < sizeof(detail))
382 for (char* at = detail; *at;) {
383 char* end = nullptr;
384 const unsigned long id = std::strtoul(at, &end, 10);
385 if (end == at) break;
386 if (id) s.detail.push_back(DWORD(id));
387 at = *end == ',' ? end + 1 : end;
388 }
389 char shims[4] = {};
390 s.shims = GetEnvironmentVariableA("LEONIDA_SAMPLE_SHIMS", shims, sizeof(shims)) == 1 && shims[0] == '1';
391 if (const auto self = reinterpret_cast<const std::uint8_t*>(GetModuleHandleW(nullptr))) {
392 const auto* dos = reinterpret_cast<const IMAGE_DOS_HEADER*>(self);
393 const auto* nt = reinterpret_cast<const IMAGE_NT_HEADERS64*>(self + dos->e_lfanew);
394 s.self_base = reinterpret_cast<std::uint64_t>(self);
395 s.self_size = nt->OptionalHeader.SizeOfImage;
396 }
397 if (const HANDLE h = CreateThread(nullptr, 0, &run, &s, 0, nullptr)) {
398 CloseHandle(h);
399 std::fprintf(stderr, "[rt] sampler: every %lu ms, report every %lu s%s%s\n", s.period_ms, s.report_ms / 1000,
400 s.waits ? ", waiting threads too" : "", s.shims ? ", title threads inside our runtime" : "");
401 }
402}
403
404} // namespace leonida::thread_sampler
diff --git a/runtime/src/thread_stacks.cpp b/runtime/src/thread_stacks.cpp
new file mode 100644
index 000000000..67188d908
--- /dev/null
+++ b/runtime/src/thread_stacks.cpp
@@ -0,0 +1,237 @@
1#include "thread_stacks.h"
2
3#include <windows.h>
4#include <tlhelp32.h>
5
6#include <algorithm>
7#include <array>
8#include <charconv>
9#include <chrono>
10#include <condition_variable>
11#include <cstdio>
12#include <mutex>
13#include <string>
14
15#include "../shims/shims.h"
16#include "../shims/startup_trace.h"
17
18namespace rt {
19namespace {
20
21using Clock = std::chrono::steady_clock;
22using GetDescription = HRESULT(WINAPI*)(HANDLE, PWSTR*);
23using QueryThread = LONG(NTAPI*)(HANDLE, int, void*, ULONG, ULONG*);
24
25struct CopiedStack {
26 DWORD64 copy = 0; // Where the bytes are now.
27 DWORD64 original = 0; // Where they were in the thread: [original, original + size).
28 size_t size = 0;
29};
30
31// Suspended section: system calls and a copy only.
32bool copy_context_and_stack(HANDLE thread, CONTEXT& context, std::byte* buffer, CopiedStack& stack) {
33 if (SuspendThread(thread) == DWORD(-1)) return false;
34 context.ContextFlags = CONTEXT_FULL;
35 MEMORY_BASIC_INFORMATION region{};
36 bool copied = false;
37 if (GetThreadContext(thread, &context) &&
38 VirtualQuery(reinterpret_cast<void*>(context.Rsp), &region, sizeof(region)) &&
39 region.State == MEM_COMMIT && !(region.Protect & (PAGE_GUARD | PAGE_NOACCESS))) {
40 // From RSP (rounded down to keep the 16-byte alignment the copy buffer also has) to the top of the committed
41 // run of stack pages, at most kMaxStackBytes.
42 stack.original = context.Rsp & ~DWORD64(15);
43 const DWORD64 top = reinterpret_cast<DWORD64>(region.BaseAddress) + region.RegionSize;
44 stack.size = static_cast<size_t>(std::min<DWORD64>(StackSampler::kMaxStackBytes, top - stack.original));
45 SIZE_T read = 0;
46 copied = ReadProcessMemory(GetCurrentProcess(), reinterpret_cast<void*>(stack.original), buffer, stack.size,
47 &read) && read == stack.size;
48 }
49 ResumeThread(thread);
50 stack.copy = reinterpret_cast<DWORD64>(buffer);
51 return copied;
52}
53
54// A frame's code can be unloaded after its thread resumes and a damaged stack can hand the unwinder a bad pointer:
55// both are access violations here, and end the walk.
56bool unwind_frame(CONTEXT& context) {
57 __try {
58 DWORD64 image_base = 0;
59 if (const auto* entry = RtlLookupFunctionEntry(context.Rip, &image_base, nullptr)) {
60 void* handler_data = nullptr;
61 DWORD64 establisher = 0;
62 RtlVirtualUnwind(UNW_FLAG_NHANDLER, image_base, context.Rip, const_cast<PRUNTIME_FUNCTION>(entry),
63 &context, &handler_data, &establisher, nullptr);
64 } else {
65 // No function entry: a leaf (or a thunk without unwind data) that has not moved RSP.
66 context.Rip = *reinterpret_cast<const DWORD64*>(context.Rsp);
67 context.Rsp += sizeof(DWORD64);
68 }
69 } __except (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION || GetExceptionCode() == EXCEPTION_IN_PAGE_ERROR
70 ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH) {
71 return false;
72 }
73 return true;
74}
75
76size_t walk_copy(CONTEXT& context, const CopiedStack& stack, std::uint64_t* frames) {
77 // An address in the copied range now names the same word in the copy.
78 const auto rebase = [&](DWORD64& address) {
79 if (address >= stack.original && address - stack.original < stack.size) address += stack.copy - stack.original;
80 };
81 const auto in_copy = [&](DWORD64 address) {
82 return address >= stack.copy && address - stack.copy + sizeof(DWORD64) <= stack.size;
83 };
84 size_t count = 0;
85 rebase(context.Rsp);
86 while (context.Rip && count < StackSampler::kMaxFrames) {
87 frames[count++] = context.Rip;
88 if (!in_copy(context.Rsp)) break;
89 const DWORD64 rsp = context.Rsp;
90 // Any nonvolatile register can be a frame pointer, including one just restored from the copy's bytes.
91 for (DWORD64* reg : {&context.Rbx, &context.Rbp, &context.Rsi, &context.Rdi,
92 &context.R12, &context.R13, &context.R14, &context.R15})
93 rebase(*reg);
94 if (!unwind_frame(context)) break;
95 rebase(context.Rsp); // A machine frame restores RSP from the copy as well.
96 if (context.Rsp <= rsp) break;
97 }
98 return count;
99}
100
101std::string thread_label(HANDLE thread, GetDescription describe, QueryThread query) {
102 if (describe) {
103 PWSTR description = nullptr;
104 if (SUCCEEDED(describe(thread, &description)) && description) {
105 std::string name = startup_trace::detail::utf8_from_wide(description, static_cast<int>(wcslen(description)));
106 LocalFree(description);
107 if (!name.empty()) return name;
108 }
109 }
110 constexpr int kWin32StartAddress = 9; // ThreadQuerySetWin32StartAddress
111 DWORD64 start = 0;
112 if (query && query(thread, kWin32StartAddress, &start, sizeof(start), nullptr) >= 0 && start)
113 return "start " + shims::module_offset(start);
114 return "start unknown";
115}
116
117struct ThreadTrace {
118 DWORD tid = 0;
119 std::string label;
120 std::array<std::uint64_t, StackSampler::kMaxFrames> frames{};
121 size_t count = 0;
122};
123
124void print_traces(unsigned at, const std::vector<ThreadTrace>& traces) {
125 std::string out = "[rt] stacks t=" + std::to_string(at) + ": " + std::to_string(traces.size()) + " threads\n";
126 for (auto it = traces.begin(); it != traces.end(); ++it) {
127 out += "[rt] stacks t=" + std::to_string(at) + " thread " + std::to_string(it->tid) + " (" + it->label + "):\n";
128 const auto same = std::find_if(traces.begin(), it, [&](const ThreadTrace& earlier) {
129 return it->count && it->count == earlier.count &&
130 std::equal(it->frames.begin(), it->frames.begin() + it->count, earlier.frames.begin());
131 });
132 if (same != it) {
133 out += " same as thread " + std::to_string(same->tid) + "\n";
134 } else if (!it->count) {
135 out += " stack unavailable\n";
136 } else {
137 for (size_t i = 0; i < it->count; ++i)
138 out += " #" + std::to_string(i) + " " + shims::module_offset(it->frames[i]) + "\n";
139 }
140 }
141 std::fputs(out.c_str(), stderr);
142 std::fflush(stderr);
143}
144
145void snapshot_threads(unsigned at, StackSampler& sampler, GetDescription describe, QueryThread query) {
146 const HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD, 0);
147 if (snapshot == INVALID_HANDLE_VALUE) {
148 std::fprintf(stderr, "[rt] stacks t=%u: thread list failed (error %lu)\n", at, GetLastError());
149 return;
150 }
151 std::vector<ThreadTrace> traces;
152 traces.reserve(512);
153 const DWORD pid = GetCurrentProcessId();
154 const DWORD self = GetCurrentThreadId();
155 THREADENTRY32 entry{};
156 entry.dwSize = sizeof(entry);
157 for (BOOL ok = Thread32First(snapshot, &entry); ok; ok = Thread32Next(snapshot, &entry)) {
158 entry.dwSize = sizeof(entry);
159 if (entry.th32OwnerProcessID != pid || entry.th32ThreadID == self) continue;
160 const HANDLE thread = OpenThread(THREAD_SUSPEND_RESUME | THREAD_GET_CONTEXT | THREAD_QUERY_INFORMATION,
161 FALSE, entry.th32ThreadID);
162 if (!thread) continue;
163 if (GetProcessIdOfThread(thread) == pid) { // The listed thread may have exited and its ID been reused.
164 ThreadTrace& trace = traces.emplace_back();
165 trace.tid = entry.th32ThreadID;
166 trace.label = thread_label(thread, describe, query); // Before sampling: it allocates.
167 trace.count = sampler.sample(thread, trace.frames.data());
168 }
169 CloseHandle(thread);
170 }
171 CloseHandle(snapshot);
172 print_traces(at, traces);
173}
174
175} // namespace
176
177StackSampler::StackSampler() : stack_(std::make_unique_for_overwrite<std::byte[]>(kMaxStackBytes)) {}
178
179std::size_t StackSampler::sample(void* thread, std::uint64_t* frames) {
180 CONTEXT context{};
181 CopiedStack stack;
182 if (!copy_context_and_stack(static_cast<HANDLE>(thread), context, stack_.get(), stack)) {
183 if (!context.Rip) return 0;
184 frames[0] = context.Rip; // The context without its stack: the innermost frame only.
185 return 1;
186 }
187 return walk_copy(context, stack, frames);
188}
189
190bool parse_stack_times(std::string_view text, std::vector<unsigned>& seconds) {
191 seconds.clear();
192 for (;;) {
193 const auto comma = text.find(',');
194 const auto token = text.substr(0, comma);
195 unsigned value = 0;
196 const auto [end, error] = std::from_chars(token.data(), token.data() + token.size(), value);
197 if (token.empty() || error != std::errc{} || end != token.data() + token.size()) {
198 seconds.clear();
199 return false;
200 }
201 seconds.push_back(value);
202 if (comma == std::string_view::npos) break;
203 text.remove_prefix(comma + 1);
204 }
205 std::sort(seconds.begin(), seconds.end());
206 seconds.erase(std::unique(seconds.begin(), seconds.end()), seconds.end());
207 return true;
208}
209
210std::jthread start_thread_stacks() {
211 const auto start = Clock::now();
212 char spec[1024];
213 const DWORD length = GetEnvironmentVariableA("LEONIDA_STACKS", spec, sizeof(spec));
214 if (!length) return {};
215 std::vector<unsigned> times;
216 if (length >= sizeof(spec) || !parse_stack_times(std::string_view(spec, length), times)) {
217 std::fprintf(stderr, "[rt] LEONIDA_STACKS: expected comma-separated whole seconds\n");
218 return {};
219 }
220 return std::jthread([start, times = std::move(times)](std::stop_token stop) {
221 const auto describe = reinterpret_cast<GetDescription>(reinterpret_cast<void*>(
222 GetProcAddress(GetModuleHandleW(L"kernel32.dll"), "GetThreadDescription")));
223 const auto query = reinterpret_cast<QueryThread>(reinterpret_cast<void*>(
224 GetProcAddress(GetModuleHandleW(L"ntdll.dll"), "NtQueryInformationThread")));
225 StackSampler sampler;
226 std::condition_variable_any wake;
227 std::mutex mutex;
228 std::unique_lock lock(mutex);
229 for (const unsigned at : times) {
230 wake.wait_until(lock, stop, start + std::chrono::seconds(at), [] { return false; });
231 if (stop.stop_requested()) break;
232 snapshot_threads(at, sampler, describe, query);
233 }
234 });
235}
236
237} // namespace rt
diff --git a/runtime/src/thread_stacks.h b/runtime/src/thread_stacks.h
new file mode 100644
index 000000000..523c7b266
--- /dev/null
+++ b/runtime/src/thread_stacks.h
@@ -0,0 +1,38 @@
1#pragma once
2
3#include <cstddef>
4#include <cstdint>
5#include <memory>
6#include <string_view>
7#include <thread>
8#include <vector>
9
10namespace rt {
11
12// One thread's call chain, taken without stopping the thread for longer than a context and stack copy.
13class StackSampler {
14public:
15 static constexpr std::size_t kMaxFrames = 40;
16 static constexpr std::size_t kMaxStackBytes = 8 * 1024 * 1024;
17
18 StackSampler(); // Allocates the stack copy once, so sample() allocates nothing.
19
20 // `thread` needs THREAD_SUSPEND_RESUME | THREAD_GET_CONTEXT. While it is suspended this makes system calls only
21 // (GetThreadContext, VirtualQuery, ReadProcessMemory): no heap, stdio or user-mode locks, which the suspended
22 // thread may hold. After ResumeThread it unwinds the copy with RtlLookupFunctionEntry/RtlVirtualUnwind, reading
23 // stack words from the copy rather than the live stack, which has moved on. Writes up to kMaxFrames addresses
24 // (the instruction pointer, then return addresses) and returns how many; 0 if the thread could not be sampled.
25 std::size_t sample(void* thread, std::uint64_t* frames);
26
27private:
28 std::unique_ptr<std::byte[]> stack_;
29};
30
31// Parses LEONIDA_STACKS: comma-separated whole seconds. Returns false (and leaves `seconds` empty) on bad text.
32bool parse_stack_times(std::string_view text, std::vector<unsigned>& seconds);
33
34// LEONIDA_STACKS: snapshots of every thread at the listed times since this call, printed to stderr. Destroy the
35// sampler before unmapping the title image.
36std::jthread start_thread_stacks();
37
38} // namespace rt
diff --git a/runtime/src/title_geometry_watch.h b/runtime/src/title_geometry_watch.h
new file mode 100644
index 000000000..d01439776
--- /dev/null
+++ b/runtime/src/title_geometry_watch.h
@@ -0,0 +1,138 @@
1#pragma once
2
3#include "title_page_watch.h"
4#include <array>
5#include <vector>
6
7namespace leonida::geometry_writes {
8
9constexpr std::uintptr_t tile_size = 65536, page_size = 4096;
10using Aliases = void (*)(std::uintptr_t, std::vector<std::uintptr_t>&);
11inline std::atomic<Aliases> aliases{};
12
13struct Cell {
14 std::atomic<std::uint64_t> version{1}, mapping{1};
15 std::array<DWORD, tile_size / page_size> restore{};
16 unsigned refs = 0;
17};
18struct State {
19 std::mutex mutex;
20 host_heap::map<std::uintptr_t, Cell> cells;
21 std::atomic<std::uint64_t> serial{1};
22 std::atomic<std::size_t> count{0};
23};
24inline State& state() { static State s; return s; }
25
26inline Cell* acquire(std::uintptr_t va) {
27 auto& s = state();
28 std::lock_guard lock(s.mutex);
29 auto& c = s.cells[va];
30 ++c.refs;
31 s.count.store(s.cells.size(), std::memory_order_release);
32 return &c;
33}
34
35// Restore only protections this watch installed. A guest remap or explicit new protection supersedes them.
36inline DWORD read_only(DWORD protection) {
37 switch (protection & 255u) {
38 case PAGE_READWRITE: case PAGE_WRITECOPY: return (protection & ~255u) | PAGE_READONLY;
39 case PAGE_EXECUTE_READWRITE: case PAGE_EXECUTE_WRITECOPY: return (protection & ~255u) | PAGE_EXECUTE_READ;
40 default: return 0;
41 }
42}
43// True when it made a page writable again.
44inline bool reopen(std::uintptr_t va, Cell& c) {
45 bool opened = false;
46 for (std::size_t i = 0; i < c.restore.size(); ++i) {
47 if (!c.restore[i]) continue;
48 void* p = reinterpret_cast<void*>(va + i * page_size);
49 MEMORY_BASIC_INFORMATION m{};
50 DWORD old{};
51 if (!VirtualQuery(p, &m, sizeof m)) continue;
52 if (m.State == MEM_COMMIT && m.Protect == read_only(c.restore[i])) {
53 if (!VirtualProtect(p, page_size, c.restore[i], &old)) continue;
54 opened = true;
55 }
56 c.restore[i] = 0;
57 }
58 return opened;
59}
60inline void release(std::uintptr_t va) {
61 auto& s = state();
62 std::lock_guard lock(s.mutex);
63 auto it = s.cells.find(va);
64 if (it != s.cells.end() && !--it->second.refs) {
65 // A page reopened here may also be one a slot-133 shadow keeps read-only (both guard the title's geometry):
66 // it is writable now with no fault to tell that shadow, which then walks its pages again.
67 if (reopen(va, it->second)) title_memory_map::changed(va, va + tile_size);
68 s.cells.erase(it);
69 s.count.store(s.cells.size(), std::memory_order_release);
70 }
71}
72enum class Event { write, open, fault, mapping, replaced };
73// `restored` (open and fault): set when a tile's pages were made writable again. A tile reopens all of its pages, and
74// a page of it a slot-133 shadow also keeps read-only (both can guard one page: each queries, then protects, under its
75// own lock) is writable then without that shadow knowing; the caller has the shadows reopen the whole tiles too.
76inline bool notify(std::uintptr_t begin, std::uintptr_t end, Event event, bool* restored = nullptr) {
77 auto& s = state();
78 if (!s.count.load(std::memory_order_acquire) || end <= begin) return false;
79 std::lock_guard lock(s.mutex);
80 auto it = s.cells.lower_bound(begin & ~(tile_size - 1));
81 if (it == s.cells.end() || it->first >= end) return false;
82 const auto version = s.serial.load(std::memory_order_relaxed) + 1;
83 bool opened = false;
84 for (; it != s.cells.end() && it->first < end; ++it) {
85 auto& cell = it->second;
86 if (event == Event::open || event == Event::fault) {
87 if (reopen(it->first, cell) && restored) *restored = true;
88 if (event == Event::fault) {
89 MEMORY_BASIC_INFORMATION m{};
90 opened = VirtualQuery(reinterpret_cast<void*>(begin), &m, sizeof m) &&
91 m.State == MEM_COMMIT && !(m.Protect & PAGE_GUARD) && read_only(m.Protect);
92 }
93 }
94 if (event == Event::replaced) {
95 for (unsigned i = 0; i < cell.restore.size(); ++i) {
96 auto p = it->first + i * page_size;
97 if (p < end && p + page_size > begin) cell.restore[i] = 0;
98 }
99 }
100 if (event == Event::mapping || event == Event::replaced) cell.mapping.store(version, std::memory_order_release);
101 cell.version.store(version, std::memory_order_release);
102 }
103 s.serial.store(version, std::memory_order_release);
104 return opened;
105}
106
107// Arm under the same lock as the write-fault path. A kernel destination may only be guarded again after its pin ends.
108inline bool arm(std::uintptr_t va, Cell& c) {
109 auto& s = state();
110 // Querying an OVERLAPPED can fault into xmem. Never do it with the watch lock held.
111 const auto version = c.version.load(std::memory_order_acquire);
112 bool pinned = false;
113 kernel_writes::for_each_pin(va, va + tile_size, [&](auto, auto) { pinned = true; });
114 std::lock_guard lock(s.mutex);
115 if (pinned || version != c.version.load(std::memory_order_relaxed)) return false;
116 for (std::size_t i = 0; i < c.restore.size();) {
117 auto p = va + i * page_size;
118 MEMORY_BASIC_INFORMATION m{};
119 if (!VirtualQuery(reinterpret_cast<void*>(p), &m, sizeof m)) return false;
120 const auto end = (std::min)(va + tile_size, reinterpret_cast<std::uintptr_t>(m.BaseAddress) + m.RegionSize);
121 if (end <= p) return false;
122 const auto next = (end - va) / page_size;
123 const DWORD guarded = read_only(m.Protect);
124 if (m.State == MEM_COMMIT && !(m.Protect & PAGE_GUARD) && guarded) {
125 DWORD old{};
126 if (!VirtualProtect(reinterpret_cast<void*>(p), end - p, guarded, &old)) return false;
127 // What the query saw, not `old`: VirtualProtect returns the first page's protection only, and a slot-133
128 // shadow (which guards these pages under its own lock) may have made that page read-only in between. A
129 // read-only `old` then marked every page of the run as read-only already, so reopen() never gave them back
130 // and they stayed read-only with no guard to answer for them: title writes and kernel writes into them
131 // failed for good. Such a page has two guards now; reopening it tells the shadows (notify's `restored`).
132 for (auto j = i; j < next; ++j) c.restore[j] = m.Protect;
133 }
134 i = next;
135 }
136 return true;
137}
138} // namespace leonida::geometry_writes
diff --git a/runtime/src/title_page_watch.h b/runtime/src/title_page_watch.h
new file mode 100644
index 000000000..ccc085466
--- /dev/null
+++ b/runtime/src/title_page_watch.h
@@ -0,0 +1,941 @@
1#pragma once
2// What the D3D12 layer's slot-133 shadow buffers (ShadowPages in d3d12_vulkan_device.cpp) need from the rest of the
3// runtime to see every write to the title's pages.
4//
5// A shadow notices the title's writes by asking the kernel which pages were written, where xmem reserved them with
6// MEM_WRITE_WATCH (title_write_watch, below), and elsewhere by making the buffer's pages read-only between
7// submissions: a write faults, the layer's handler makes the page writable again and the page is copied at the next
8// submission. Two kinds of write don't fault there, and are reported here instead:
9//
10// 1. Aliases (title_page_aliases). xmem maps one physical page at as many VAs as the title asks
11// (XMemMapPhysicalPages): a write through one VA changes what the others read without touching them. xmem
12// reports each 64 KiB page mapped at more than one address; a shadow copies those at every submission.
13//
14// 2. Kernel writes (kernel_writes). A read-only page makes ReadFile fail with ERROR_NOACCESS instead of faulting
15// into a user-mode handler. The file shims (read_file and the rest, below) pin the destination before the kernel
16// writes it: the layer makes its pages writable and doesn't protect them again until the pin ends, when the
17// call returns or, for an overlapped read, once its OVERLAPPED says it completed. A read that still fails with
18// ERROR_NOACCESS is retried once after the destination is opened again and xmem has committed the physical pages
19// mapped there that wait for their first touch (they are reserved until then, and a kernel write does not fault
20// them in either: measured on Windows 11, the title's 258 MiB effect-database read failed this way forever).
21//
22// Any other host code that has the kernel write title memory (a DirectStorage queue that ReadFiles straight into
23// a request's destination, for one) does the same: kernel_writes::read_file instead of ::ReadFile, or
24// begin_write(destination, bytes, overlapped) before the call and end_write(id, pending) after it. A host thread's
25// own copy into title memory (a DirectStorage request decompressed into its destination) goes through
26// kernel_writes::write: pinned the same way, so it takes no write fault per guarded block and is retried once after
27// reopen() if it faults anyway.
28//
29// A pin made with an OVERLAPPED lasts until the call returns, whatever the OVERLAPPED says meanwhile: until
30// ReadFile stores STATUS_PENDING in it, it reads as a completed request (zero, or the status of the title's last
31// request through it), and a refresh that dropped the pin then could guard the destination again before the kernel
32// wrote it (natively, DirectStorage reads failing with E_DSTORAGE_ACCESS_VIOLATION on a read-only destination).
33//
34// A page left read-only with no guard to answer for it (each guard reopens only what it protected) would fail every
35// kernel write and fault every write for good. In xmem's physical-page views, where the protection a page should
36// have is known (its window's), kernel_writes' unguarder (rt::xmem::reopen_unowned) makes such a page writable
37// again: reopen() calls it before a retry, and the D3D12 layer's write-fault handler when no guard reopened the
38// faulting page.
39//
40// Successful title memory map changes also invalidate the shadows' cached protection state. The shadows' own
41// protection changes stay local to their trackers.
42//
43// The shadows themselves are brought up to date in one place, DeviceState::refresh_shadows in
44// d3d12_vulkan_device.cpp, which VulkanQueue::execute_now calls (VulkanContext::set_before_execute) before every
45// submission of command lists.
46//
47// Header-only, so the D3D12 layer, xmem and the file shims share one state in a process without linking each other.
48#include <windows.h>
49
50#include "guarded_copy.h"
51
52#include <algorithm>
53#include <atomic>
54#include <cstdint>
55#include <cstdio>
56#include <cstdlib>
57#include <cstring>
58#include <functional>
59#include <map>
60#include <mutex>
61#include <new>
62#include <shared_mutex>
63#include <tuple>
64#include <unordered_set>
65#include <utility>
66#include <vector>
67
68// The runtime's own heap (host_heap) for the state the D3D12 layer's write-fault handler waits behind. A thread can take
69// a write fault on a guarded title page while it holds the process heap's lock: XMemAlloc is _aligned_malloc, so
70// HeapAlloc and HeapFree write block headers on the title's pages. Its handler then waits for the tracker's lock
71// (ShadowPages::reopen) and the list of trackers (g_shadow_pages_lock). So a thread that holds either of those, or any
72// lock such a thread waits for (the record and journal of title_write_watch, title_page_aliases, kernel_writes' pins),
73// must never wait for the process heap: it would wait for the faulting thread, which waits for it. Their containers
74// allocate here instead, from a heap the title never touches and on whose lock no thread faults.
75namespace leonida::host_heap {
76
77inline HANDLE handle() {
78 static const HANDLE heap = [] {
79 const HANDLE created = HeapCreate(0, 0, 0);
80 if (!created) // the process heap brings back the deadlock this heap avoids: write watching stays off
81 std::fprintf(stderr, "[rt] host heap: HeapCreate failed (%lu); write watching is off\n", GetLastError());
82 return created ? created : GetProcessHeap();
83 }();
84 return heap;
85}
86
87template <class T>
88struct Allocator {
89 using value_type = T;
90 Allocator() noexcept { handle(); } // created before any lock is taken
91 template <class U>
92 Allocator(const Allocator<U>&) noexcept {}
93 T* allocate(std::size_t n) {
94 if (n > std::size_t(-1) / sizeof(T)) throw std::bad_array_new_length();
95 if (void* p = HeapAlloc(handle(), 0, n * sizeof(T))) return static_cast<T*>(p);
96 throw std::bad_alloc();
97 }
98 void deallocate(T* p, std::size_t) noexcept { HeapFree(handle(), 0, p); }
99 template <class U>
100 bool operator==(const Allocator<U>&) const noexcept {
101 return true;
102 }
103};
104
105template <class T>
106using vector = std::vector<T, Allocator<T>>;
107template <class K, class V>
108using map = std::map<K, V, std::less<K>, Allocator<std::pair<const K, V>>>;
109
110} // namespace leonida::host_heap
111
112// Changes to what the title's address space shows (a view mapped or unmapped, pages committed, decommitted, allocated,
113// freed or given another protection by the title), each numbered by the generation it moved to, with its address
114// range. A reader that remembers the generation it last looked at asks which ranges changed since (changes_since):
115// only what overlaps its own pages needs looking at again, where a bare generation said "everything". The last
116// kJournal changes are kept; a reader further behind is told so and looks at everything, as before. changed() with no
117// range is a change anywhere.
118namespace leonida::title_memory_map {
119
120inline std::atomic<std::uint64_t> map_generation{0};
121
122struct Change {
123 std::uintptr_t from, to;
124};
125constexpr std::size_t kJournal = 1 << 16; // 1 MiB
126struct Journal {
127 SRWLOCK lock = SRWLOCK_INIT;
128 Change at[kJournal] = {};
129};
130inline Journal& journal() {
131 static Journal j;
132 return j;
133}
134
135inline std::uint64_t generation() { return map_generation.load(std::memory_order_acquire); }
136
137// [from, to) changed. No allocation and no title memory touched: the write-fault handler calls it.
138inline void changed(std::uintptr_t from, std::uintptr_t to) {
139 if (from >= to) return;
140 from &= ~std::uintptr_t(0xfff); // whole host pages, as the kernel changes them
141 to = to > UINTPTR_MAX - 0xfff ? UINTPTR_MAX : (to + 0xfff) & ~std::uintptr_t(0xfff);
142 Journal& j = journal();
143 AcquireSRWLockExclusive(&j.lock);
144 const std::uint64_t next = map_generation.load(std::memory_order_relaxed) + 1;
145 j.at[next % kJournal] = {from, to};
146 map_generation.store(next, std::memory_order_release);
147 ReleaseSRWLockExclusive(&j.lock);
148}
149inline void changed(const void* at, std::size_t bytes) {
150 const auto from = reinterpret_cast<std::uintptr_t>(at);
151 changed(from, bytes > UINTPTR_MAX - from ? UINTPTR_MAX : from + bytes);
152}
153inline void changed() { changed(std::uintptr_t(0), std::uintptr_t(UINTPTR_MAX)); }
154
155// The changes after generation `since` that overlap [from, to): f(begin, end) for each, clipped to [from, to), with
156// `now` set to the generation they go up to. False, with nothing called, when the journal no longer holds them all
157// (the caller takes everything as changed).
158template <class F>
159bool changes_since(std::uint64_t since, std::uint64_t& now, std::uintptr_t from, std::uintptr_t to, F&& f) {
160 Journal& j = journal();
161 AcquireSRWLockShared(&j.lock);
162 now = map_generation.load(std::memory_order_relaxed);
163 if (now < since || now - since > kJournal) {
164 ReleaseSRWLockShared(&j.lock);
165 return false;
166 }
167 for (std::uint64_t g = since + 1; g <= now; ++g) {
168 const Change c = j.at[g % kJournal];
169 if (c.from < to && from < c.to) f((std::max)(c.from, from), (std::min)(c.to, to));
170 }
171 ReleaseSRWLockShared(&j.lock);
172 return true;
173}
174
175} // namespace leonida::title_memory_map
176
177namespace leonida::title_page_aliases {
178
179constexpr std::uintptr_t kPageSize = 0x10000;
180
181struct State {
182 std::shared_mutex mutex;
183 // 64 KiB-aligned VAs
184 std::unordered_set<std::uintptr_t, std::hash<std::uintptr_t>, std::equal_to<std::uintptr_t>,
185 host_heap::Allocator<std::uintptr_t>>
186 aliased;
187 std::atomic<std::uint64_t> generation{0};
188};
189
190inline State& state() {
191 static State s;
192 return s;
193}
194
195// The 64 KiB page at `va` (rounded down) shows a page that is also mapped elsewhere (true), or no longer does.
196inline void set(std::uintptr_t va, bool aliased) {
197 State& s = state();
198 va &= ~(kPageSize - 1);
199 std::unique_lock lock(s.mutex);
200 const bool changed = aliased ? s.aliased.insert(va).second : s.aliased.erase(va) != 0;
201 if (changed) s.generation.fetch_add(1, std::memory_order_release);
202}
203
204// Bumped by every change of set().
205inline std::uint64_t generation() { return state().generation.load(std::memory_order_acquire); }
206
207// Calls `f(va)` for each aliased 64 KiB page overlapping [begin, end).
208template<class F>
209void for_each_in(std::uintptr_t begin, std::uintptr_t end, F&& f) {
210 State& s = state();
211 std::shared_lock lock(s.mutex);
212 if (s.aliased.empty()) return;
213 for (std::uintptr_t va = begin & ~(kPageSize - 1); va < end; va += kPageSize)
214 if (s.aliased.count(va)) f(va);
215}
216
217} // namespace leonida::title_page_aliases
218
219// 3. GPU-only views (title_gpu_views). The title reserves some memory twice: a range the CPU maps physical pages into
220// and a GPU-only range of the same size (PAGE_NOACCESS | PAGE_GRAPHICS_NOACCESS) that the console's GPU page
221// tables map to the same pages, and it hands the GPU-only address to the GPU (the texture stream pool: slot-133
222// placements, slot-70 views, DirectStorage destinations; gfxres notes section 5). Nothing maps the GPU-only range
223// for the host CPU, so the D3D12 layer reads such memory at the CPU range's address: to_cpu. xmem pairs each
224// GPU-only reservation with the CPU-mappable reservation of the same size made just before it, as
225// five-star-recomp does (docs/gpu-resources.md "Addresses", XMemReservation.CpuView; GPL-3.0-or-later).
226namespace leonida::title_gpu_views {
227
228struct View {
229 std::uintptr_t gpu, cpu, size;
230 bool independent_pages; // queue slot 31 maps physical pages at the GPU address itself
231};
232
233struct State {
234 std::shared_mutex mutex;
235 std::vector<View> views;
236 std::atomic<std::size_t> count{0};
237 std::uintptr_t last_cpu = 0, last_cpu_size = 0; // the last CPU-mappable reservation
238};
239
240inline State& state() {
241 static State s;
242 return s;
243}
244
245// xmem: a reservation the title made, GPU-only or not. Returns true when it paired a GPU-only one.
246inline bool note_reservation(std::uintptr_t base, std::uintptr_t size, bool gpu_only, bool independent_pages = false) {
247 State& s = state();
248 std::unique_lock lock(s.mutex);
249 if (!gpu_only) {
250 s.last_cpu = base;
251 s.last_cpu_size = size;
252 return false;
253 }
254 if (!s.last_cpu || s.last_cpu_size != size) return false;
255 s.views.push_back({base, s.last_cpu, size, independent_pages});
256 s.count.store(s.views.size(), std::memory_order_release);
257 s.last_cpu = s.last_cpu_size = 0;
258 return true;
259}
260
261// Marks the pair whose GPU-only range starts at `gpu` as one whose GPU-only range has pages of its own (queue slot 31
262// or XMemMapPhysicalPages map them at that address, not through the CPU view): the host reads it there (to_cpu) and
263// a slot-133 buffer over it is a shadow, not an import (independently_mapped). False when no pair starts at `gpu`.
264// Nothing in the runtime marks a pair yet: which of the title's pairs are independent is not decided (a pair xmem
265// makes is the legacy kind, read at its CPU view), so only tests that model an independent window call it.
266inline bool set_independent_pages(std::uintptr_t gpu, bool independent = true) {
267 State& s = state();
268 std::unique_lock lock(s.mutex);
269 for (View& v : s.views) {
270 if (v.gpu != gpu) continue;
271 v.independent_pages = independent;
272 return true;
273 }
274 return false;
275}
276
277// Where the host reads a GPU address. Slot 31 maps its window directly; legacy pairs use the CPU view.
278inline std::uintptr_t to_cpu(std::uintptr_t va, std::uintptr_t bytes = 1) {
279 State& s = state();
280 if (!s.count.load(std::memory_order_acquire)) return va;
281 std::shared_lock lock(s.mutex);
282 for (const View& v : s.views)
283 if (va >= v.gpu && va - v.gpu < v.size && bytes <= v.size - (va - v.gpu))
284 return v.independent_pages ? va : va - v.gpu + v.cpu;
285 return va;
286}
287
288// A host-pointer import would pin the old physical pages across a queue remap. Use the
289// ordinary dirty-page shadow for buffers in these GPU windows.
290inline bool independently_mapped(std::uintptr_t va, std::uint64_t bytes) {
291 State& s = state();
292 if (!bytes || !s.count.load(std::memory_order_acquire)) return false;
293 std::shared_lock lock(s.mutex);
294 for (const View& v : s.views)
295 if (v.independent_pages && (va >= v.gpu ? va - v.gpu < v.size : v.gpu - va < bytes)) return true;
296 return false;
297}
298
299// A paired range: [gpu, gpu + size) and [cpu, cpu + size) are the title's two names for the same pages.
300struct Range {
301 std::uintptr_t gpu, cpu, size;
302 bool independent_pages;
303};
304
305// The paired reservation that holds [va, va + bytes), from either of its addresses. False outside every pair.
306inline bool view_at(std::uintptr_t va, std::uintptr_t bytes, Range& out) {
307 State& s = state();
308 if (!s.count.load(std::memory_order_acquire)) return false;
309 std::shared_lock lock(s.mutex);
310 for (const View& v : s.views) {
311 if ((va >= v.gpu && va - v.gpu < v.size && bytes <= v.size - (va - v.gpu)) ||
312 (va >= v.cpu && va - v.cpu < v.size && bytes <= v.size - (va - v.cpu))) {
313 out = {v.gpu, v.cpu, v.size, v.independent_pages};
314 return true;
315 }
316 }
317 return false;
318}
319
320// The other address of memory in a paired range: the CPU view's address for a GPU-only one and the GPU-only
321// address for a CPU view's; 0 outside every pair.
322inline std::uintptr_t other_view(std::uintptr_t va) {
323 State& s = state();
324 if (!s.count.load(std::memory_order_acquire)) return 0;
325 std::shared_lock lock(s.mutex);
326 for (const View& v : s.views) {
327 if (va >= v.gpu && va - v.gpu < v.size) return va - v.gpu + v.cpu;
328 if (va >= v.cpu && va - v.cpu < v.size) return va - v.cpu + v.gpu;
329 }
330 return 0;
331}
332
333// The address of the pages at `va` through the CPU view of their pair (the stream-pool rule B described in
334// docs/d3d12_vulkan.md):
335// the host reads the frames there, so a buffer made over them is host-importable and shared with every other view
336// naming that range, and a copy made from them reads what the title wrote. `va` itself when it is in no pair, or when
337// the CPU view has no committed page and the GPU-only one has (queue slot 31 maps the frames at the alias).
338inline std::uintptr_t to_host_view(std::uintptr_t va, std::uintptr_t bytes = 1) {
339 Range range{};
340 if (!view_at(va, bytes, range)) return va;
341 const auto offset = va >= range.gpu && va - range.gpu < range.size ? va - range.gpu : va - range.cpu;
342 const auto cpu = range.cpu + offset, gpu = range.gpu + offset;
343 const auto readable = [](std::uintptr_t address) {
344 MEMORY_BASIC_INFORMATION region{};
345 return VirtualQuery(reinterpret_cast<const void*>(address), &region, sizeof(region)) &&
346 region.State == MEM_COMMIT && region.Protect && !(region.Protect & (PAGE_NOACCESS | PAGE_GUARD));
347 };
348 if (cpu != va && readable(cpu)) return cpu;
349 return readable(gpu) ? gpu : va;
350}
351
352} // namespace leonida::title_gpu_views
353
354// 4. Texel writes (title_texel_writes). The title writes texels into its own texture memory through XG's
355// CopyIntoSubresource (xg_xs.cpp) and through the pointer Map gives it; the D3D12 layer fills a texture's image
356// from that memory again when told (Device::refresh_title_textures drains these ranges before a submission), so a
357// small update (a glyph in a font cache) is not left to a hash that samples the bytes.
358namespace leonida::title_texel_writes {
359
360struct State {
361 std::mutex mutex;
362 std::vector<std::pair<std::uintptr_t, std::uintptr_t>> ranges; // [begin, end)
363 bool overflow = false; // too many to keep: check everything
364 std::atomic<bool> pending{false};
365};
366
367inline State& state() {
368 static State s;
369 return s;
370}
371
372inline void note(const void* begin, std::size_t bytes) {
373 if (!begin || !bytes) return;
374 State& s = state();
375 std::lock_guard lock(s.mutex);
376 const auto at = reinterpret_cast<std::uintptr_t>(begin);
377 if (s.ranges.size() < 4096) s.ranges.emplace_back(at, at + bytes);
378 else s.overflow = true;
379 s.pending.store(true, std::memory_order_release);
380}
381
382// The ranges noted since the last call; `overflow` says some were dropped.
383inline std::vector<std::pair<std::uintptr_t, std::uintptr_t>> take(bool& overflow) {
384 State& s = state();
385 overflow = false;
386 if (!s.pending.load(std::memory_order_acquire)) return {};
387 std::lock_guard lock(s.mutex);
388 overflow = std::exchange(s.overflow, false);
389 s.pending.store(false, std::memory_order_relaxed);
390 return std::exchange(s.ranges, {});
391}
392
393} // namespace leonida::title_texel_writes
394
395// 5. XG layouts by shape (title_xg_layouts). A texture the title locks and writes with the CPU through Map is laid out
396// as the XG computer the title made for it says (its lock computes the layout with XGCreateTextureComputer right
397// before it maps, gfxres notes section 5), which a slot-133 description (Layout 0) does not tell: measured, the
398// 2048x2048 and 1024x1024 A8 glyph caches are LINEAR (0x100) while XG's default for that description is 4KB_S.
399// xg_xs records the Layout word of every computer by the texture's shape; the D3D12 layer takes the latest one of
400// a mapped texture's shape when no slot-70 view has given it a layout.
401namespace leonida::title_xg_layouts {
402
403struct Shape {
404 std::uint32_t dimension, format, height, depth, mips;
405 std::uint64_t width;
406 bool operator<(const Shape& o) const {
407 return std::tie(dimension, format, width, height, depth, mips) <
408 std::tie(o.dimension, o.format, o.width, o.height, o.depth, o.mips);
409 }
410};
411
412struct State {
413 std::mutex mutex;
414 std::map<Shape, std::uint32_t> layouts;
415};
416
417inline State& state() {
418 static State s;
419 return s;
420}
421
422inline void note(const Shape& shape, std::uint32_t layout) {
423 State& s = state();
424 std::lock_guard lock(s.mutex);
425 if (s.layouts.size() < 65536 || s.layouts.count(shape)) s.layouts[shape] = layout;
426}
427
428// The Layout word of the latest computer of this shape, or false.
429inline bool find(const Shape& shape, std::uint32_t& layout) {
430 State& s = state();
431 std::lock_guard lock(s.mutex);
432 const auto it = s.layouts.find(shape);
433 if (it == s.layouts.end()) return false;
434 layout = it->second;
435 return true;
436}
437
438} // namespace leonida::title_xg_layouts
439
440// 6. Write-watched title memory (title_write_watch). xmem reserves the title's ordinary memory (the XMemVirtualAlloc
441// and VirtualAlloc reservations that are not placeholders or physical-page windows) with MEM_WRITE_WATCH, and the
442// kernel keeps a dirty bit per 4 KiB page there: GetWriteWatch with WRITE_WATCH_FLAG_RESET returns the pages
443// written since and clears them. A shadow over such pages asks the kernel instead of making them read-only: no
444// write fault, no VirtualProtect, and a kernel write (ReadFile) into them neither fails nor needs opening first.
445// Sections (xmem's physical-page views) can't be write-watched, and keep the read-only guard.
446//
447// Several shadows can cover one page (a console descriptor heap's mirror next to a slot-133 buffer, two devices),
448// and one asking clears the kernel's bits for all of them. So what each asking found is kept in a journal: per
449// page, the number of the last asking that found it written. A reader (a shadow's tracker) was written to since its
450// own last asking where a page's number is above it. As VIctory does (crates/victory-gpu/src/watch.rs,
451// GPL-3.0-or-later). A reservation is numbered the same way when it is recorded: a reader whose last asking is
452// older takes all of its pages as written. A reservation the title releases and reserves again at the same address
453// is then new to the shadows, though its pages are write-watched both before and after and the new one's kernel
454// bits are clear (what the old one's pages held is gone: they read as zeros now).
455//
456// LEONIDA_WRITE_WATCH=0 reserves without MEM_WRITE_WATCH: every shadow keeps the read-only guard, as before. Under
457// Wine that is the default (=1 turns write watching on).
458namespace leonida::title_write_watch {
459
460constexpr std::uintptr_t kPage = 0x1000; // the kernel's unit
461// The journal is pruned of what every reader has seen once it doubles. Past kMaxPages it forgets askings more than
462// kKeep old even if a reader hasn't seen them: that reader then takes all of its pages as written, once.
463constexpr std::size_t kMaxPages = std::size_t(1) << 18;
464constexpr std::uint64_t kKeep = std::uint64_t(1) << 16;
465
466// On by default on Windows; off under Wine, whose write watching was not measured here (LEONIDA_WRITE_WATCH=1 turns it
467// on there). Off with LEONIDA_WRITE_WATCH=0.
468inline bool enabled() {
469 static const bool on = [] {
470 char value[8] = {};
471 std::size_t length = 0;
472 if (host_heap::handle() == GetProcessHeap()) return false; // no private heap: see host_heap
473 if (getenv_s(&length, value, sizeof(value), "LEONIDA_WRITE_WATCH") == 0 && length > 1) return value[0] != '0';
474 const HMODULE ntdll = GetModuleHandleW(L"ntdll.dll");
475 return !(ntdll && GetProcAddress(ntdll, "wine_get_version"));
476 }();
477 return on;
478}
479
480// A reservation made with MEM_WRITE_WATCH: its end, and the number it was recorded with (an asking's, see ask).
481struct Region {
482 std::uintptr_t end;
483 std::uint64_t born;
484};
485
486// The containers allocate from host_heap: the D3D12 layer takes these locks while it holds a tracker's lock, which its
487// write-fault handler waits for, and a faulting thread may hold the process heap's lock.
488struct State {
489 std::shared_mutex mutex; // regions
490 host_heap::map<std::uintptr_t, Region> regions; // base -> the reservation at base
491 std::atomic<std::uint64_t> generation{0}; // bumped by every change of regions
492 std::atomic<std::size_t> count{0}; // regions.size(), read without the lock
493
494 // The last number given to an asking (or to a recorded reservation, which takes one without the journal's lock).
495 std::atomic<std::uint64_t> asked{0};
496 std::mutex journal; // everything below
497 std::uint64_t floor = 0; // askings up to this one were forgotten before every reader saw them
498 host_heap::map<std::uintptr_t, std::uint64_t> written; // page address -> the last asking that found it written
499 std::size_t pruned_size = 0; // written.size() after the last pruning
500 std::uint64_t pruned_at = 0; // the asking of the last pruning
501 host_heap::map<std::uint64_t, std::uint64_t> readers; // reader -> its last asking
502 std::uint64_t next_reader = 1;
503 host_heap::vector<void*> found; // room for the kernel's answer
504 host_heap::vector<std::uint8_t> refusals; // per run of an asking: the kernel refused it
505};
506
507inline State& state() {
508 static State s;
509 return s;
510}
511
512// xmem: [base, base + size) was reserved with MEM_WRITE_WATCH for the shadows. A reservation the title asked to be
513// write-watched itself is not added: its bits are the title's. Every reader takes its pages as written at its next
514// asking (they are not the pages it copied, even at the same address).
515inline void add(std::uintptr_t base, std::uintptr_t size) {
516 if (!size) return;
517 State& s = state();
518 const std::uintptr_t end = base + ((size + kPage - 1) & ~(kPage - 1));
519 std::unique_lock lock(s.mutex);
520 // A reservation released without remove() overlapping the new one is gone.
521 auto it = s.regions.lower_bound(base);
522 if (it != s.regions.begin() && std::prev(it)->second.end > base) --it;
523 while (it != s.regions.end() && it->first < end) it = s.regions.erase(it);
524 // Numbered under the lock: an asking that finds the reservation took its own number later (see ask).
525 s.regions[base] = Region{end, s.asked.fetch_add(1, std::memory_order_acq_rel) + 1};
526 s.count.store(s.regions.size(), std::memory_order_release);
527 s.generation.fetch_add(1, std::memory_order_release);
528}
529
530// xmem: the reservation holding `address` was released.
531inline void remove(std::uintptr_t address) {
532 State& s = state();
533 if (!s.count.load(std::memory_order_acquire)) return;
534 std::unique_lock lock(s.mutex);
535 auto it = s.regions.upper_bound(address);
536 if (it == s.regions.begin() || (--it)->second.end <= address) return;
537 s.regions.erase(it);
538 s.count.store(s.regions.size(), std::memory_order_release);
539 s.generation.fetch_add(1, std::memory_order_release);
540}
541
542inline std::uint64_t generation() { return state().generation.load(std::memory_order_acquire); }
543
544// Whether `address` is in a write-watched reservation.
545inline bool contains(std::uintptr_t address) {
546 State& s = state();
547 if (!s.count.load(std::memory_order_acquire)) return false;
548 std::shared_lock lock(s.mutex);
549 auto it = s.regions.upper_bound(address);
550 return it != s.regions.begin() && (--it)->second.end > address;
551}
552
553// The end of the write-watched reservation holding `address`, or 0.
554inline std::uintptr_t end_of(std::uintptr_t address) {
555 State& s = state();
556 if (!s.count.load(std::memory_order_acquire)) return 0;
557 std::shared_lock lock(s.mutex);
558 auto it = s.regions.upper_bound(address);
559 return it != s.regions.begin() && (--it)->second.end > address ? it->second.end : 0;
560}
561
562// Calls `f(from, to)` for each write-watched part of [begin, end): each inside one reservation.
563template <class F>
564void for_each_in(std::uintptr_t begin, std::uintptr_t end, F&& f) {
565 State& s = state();
566 if (!s.count.load(std::memory_order_acquire)) return;
567 std::shared_lock lock(s.mutex);
568 auto it = s.regions.upper_bound(begin);
569 if (it != s.regions.begin() && std::prev(it)->second.end > begin) --it;
570 for (; it != s.regions.end() && it->first < end; ++it) {
571 const std::uintptr_t from = (std::max)(it->first, begin), to = (std::min)(it->second.end, end);
572 if (from < to) f(from, to);
573 }
574}
575
576// xmem: [from, to) of a write-watched reservation changed with no write the kernel sees (decommitted, committed again,
577// reset): every reader takes its pages as written at its next asking. Past kKeep pages, every reader takes all of its
578// write-watched pages as written instead.
579inline void mark(std::uintptr_t from, std::uintptr_t to) {
580 from &= ~(kPage - 1);
581 to = (to + kPage - 1) & ~(kPage - 1);
582 if (from >= to || !contains(from)) return;
583 State& s = state();
584 std::lock_guard lock(s.journal);
585 const std::uint64_t now = s.asked.fetch_add(1, std::memory_order_acq_rel) + 1;
586 if ((to - from) / kPage > kKeep) {
587 s.floor = now;
588 return;
589 }
590 for (std::uintptr_t p = from; p < to; p += kPage) s.written[p] = now;
591}
592
593// A new reader, which has seen everything asked so far (its pages are not known yet: it copies them all first).
594inline std::uint64_t open_reader() {
595 State& s = state();
596 std::lock_guard lock(s.journal);
597 const std::uint64_t id = s.next_reader++;
598 s.readers[id] = s.asked.load(std::memory_order_acquire);
599 return id;
600}
601
602inline void close_reader(std::uint64_t reader) {
603 State& s = state();
604 std::lock_guard lock(s.journal);
605 s.readers.erase(reader);
606}
607
608// `reader` takes over what `other` has not seen yet (a tracker absorbing another's pages).
609inline void merge_reader(std::uint64_t reader, std::uint64_t other) {
610 State& s = state();
611 std::lock_guard lock(s.journal);
612 const auto a = s.readers.find(reader), b = s.readers.find(other);
613 if (a != s.readers.end() && b != s.readers.end()) a->second = (std::min)(a->second, b->second);
614}
615
616// When the reservation holding `address` was recorded (see ask), or 0 when no recorded one holds it.
617inline std::uint64_t born(std::uintptr_t address) {
618 State& s = state();
619 if (!s.count.load(std::memory_order_acquire)) return 0;
620 std::shared_lock lock(s.mutex);
621 auto it = s.regions.upper_bound(address);
622 return it != s.regions.begin() && (--it)->second.end > address ? it->second.born : 0;
623}
624
625// One asking for `reader`: the kernel's written pages of each run (4 KiB aligned, each inside one reservation from
626// for_each_in) are taken and cleared, then `dirty(from, to)` gets the pages of the runs written since the reader's
627// last asking, the kernel's answer now and the earlier askings of other readers alike, and all of a run whose
628// reservation was recorded since then (or is not recorded: reserved again, not added yet). `refused(from, to)` gets
629// a run the kernel refused (no longer write-watched: released), for which dirty is not called. Returns the asking's
630// number. `runs` is a vector of (from, to) pairs.
631template <class Runs, class Dirty, class Refused>
632std::uint64_t ask(std::uint64_t reader, const Runs& runs, Dirty&& dirty, Refused&& refused) {
633 State& s = state();
634 std::lock_guard lock(s.journal);
635 const auto me = s.readers.find(reader);
636 const std::uint64_t since = me != s.readers.end() ? me->second : 0;
637 const std::uint64_t now = s.asked.fetch_add(1, std::memory_order_acq_rel) + 1;
638 s.refusals.assign(runs.size(), 0);
639 for (std::size_t r = 0; r < runs.size(); ++r) {
640 const auto [from, to] = runs[r];
641 ULONG_PTR count = (to - from) / kPage;
642 if (s.found.size() < count) s.found.resize(count);
643 ULONG granularity = 0;
644 if (GetWriteWatch(WRITE_WATCH_FLAG_RESET, reinterpret_cast<void*>(from), to - from, s.found.data(), &count,
645 &granularity) != 0) {
646 s.refusals[r] = 1;
647 continue;
648 }
649 for (ULONG_PTR k = 0; k < count; ++k)
650 s.written[reinterpret_cast<std::uintptr_t>(s.found[k]) & ~(kPage - 1)] = now;
651 }
652 for (std::size_t r = 0; r < runs.size(); ++r) {
653 const auto [from, to] = runs[r];
654 if (s.refusals[r]) {
655 refused(from, to);
656 continue;
657 }
658 // Forgotten before this reader saw it, or a reservation new to it: all of it. Looked up after `now` was
659 // taken, so a reservation recorded later has a higher number and is all written at the next asking too.
660 const std::uint64_t reserved = born(from);
661 if (since < s.floor || !reserved || reserved > since) {
662 dirty(from, to);
663 continue;
664 }
665 std::uintptr_t run_from = 0, run_to = 0;
666 for (auto it = s.written.lower_bound(from); it != s.written.end() && it->first < to; ++it) {
667 if (it->second <= since) continue;
668 if (it->first != run_to) {
669 if (run_from != run_to) dirty(run_from, run_to);
670 run_from = it->first;
671 }
672 run_to = it->first + kPage;
673 }
674 if (run_from != run_to) dirty(run_from, run_to);
675 }
676 if (me != s.readers.end()) me->second = now;
677 // What every reader has seen goes, once the journal doubled or every kPruneEvery askings (a pruning that dropped
678 // little, readers being behind then, must not stop the next); past kMaxPages, what is more than kKeep askings old
679 // goes too.
680 constexpr std::uint64_t kPruneEvery = 256;
681 if (s.written.size() > 4096 && (s.written.size() > 2 * s.pruned_size || now - s.pruned_at >= kPruneEvery)) {
682 s.pruned_at = now;
683 std::uint64_t seen = now;
684 for (const auto& [id, last] : s.readers) seen = (std::min)(seen, last);
685 if (s.written.size() > kMaxPages && now > kKeep && seen < now - kKeep) {
686 seen = now - kKeep;
687 s.floor = (std::max)(s.floor, seen);
688 }
689 std::erase_if(s.written, [seen](const auto& entry) { return entry.second <= seen; });
690 s.pruned_size = s.written.size();
691 }
692 return now;
693}
694
695} // namespace leonida::title_write_watch
696
697namespace leonida::kernel_writes {
698
699// The layer's side: makes every watched page in [begin, end) writable. Set once the first shadow exists.
700using Opener = void (*)(std::uintptr_t begin, std::uintptr_t end);
701
702// xmem's side: commits the physical pages mapped in [address, address + bytes) that are still waiting for their first
703// touch (rt::xmem::commit_physical_range; pages xmem does not map are left as they are). gta6rt sets it at start.
704using Committer = bool (*)(const void* address, std::size_t bytes);
705
706// xmem's side: makes the pages of its physical-page views in [begin, end) that are read-only although their window is
707// writable, with no guard left to reopen them, writable again (rt::xmem::reopen_unowned). True when such a page there
708// is writable now. Called from the write-fault handler: it must not wait for the process heap or g_phys_mutex.
709using Unguarder = bool (*)(std::uintptr_t begin, std::uintptr_t end);
710
711struct Pin {
712 std::uintptr_t begin, end;
713 const OVERLAPPED* overlapped; // null: ends when the call returns
714 std::uint64_t id;
715 bool returned; // the call returned with the request pending: from now on the OVERLAPPED says when it ends
716};
717
718struct State {
719 std::atomic<Opener> opener{nullptr};
720 std::atomic<Committer> committer{nullptr};
721 std::atomic<Unguarder> unguarder{nullptr};
722 std::mutex mutex;
723 host_heap::vector<Pin> pins; // host_heap: see there
724 std::uint64_t next_id = 1;
725 std::atomic<std::size_t> count{0}; // pins.size(), read without the lock
726};
727
728inline State& state() {
729 static State s;
730 return s;
731}
732
733inline void set_opener(Opener opener) { state().opener.store(opener, std::memory_order_release); }
734inline void set_committer(Committer committer) { state().committer.store(committer, std::memory_order_release); }
735inline void set_unguarder(Unguarder unguarder) { state().unguarder.store(unguarder, std::memory_order_release); }
736
737// Whether an overlapped request is still in flight. Its OVERLAPPED is the title's and may be gone by now: a read that
738// faults counts as completed (the title doesn't free an OVERLAPPED it is still waiting on).
739inline bool overlapped_pending(const OVERLAPPED* overlapped) {
740 __try { // the read is a call (src/guarded_copy.h): clang-cl does not cover an inline load without /EHa
741 return guarded::read_word(&overlapped->Internal) == static_cast<ULONG_PTR>(STATUS_PENDING);
742 } __except (EXCEPTION_EXECUTE_HANDLER) {
743 return false;
744 }
745}
746
747// The pinned ranges overlapping [begin, end), for the layer's refresh. Overlapped pins whose call returned and whose
748// request completed since are dropped first; one whose call is still running stays (see the top of this file).
749template<class F>
750void for_each_pin(std::uintptr_t begin, std::uintptr_t end, F&& f) {
751 State& s = state();
752 if (!s.count.load(std::memory_order_acquire)) return;
753 std::lock_guard lock(s.mutex);
754 std::erase_if(s.pins, [](const Pin& pin) {
755 return pin.overlapped && pin.returned && !overlapped_pending(pin.overlapped);
756 });
757 s.count.store(s.pins.size(), std::memory_order_release);
758 for (const Pin& pin : s.pins)
759 if (pin.begin < end && begin < pin.end) f((std::max)(pin.begin, begin), (std::min)(pin.end, end));
760}
761
762// Before the kernel writes [buffer, buffer + bytes): pins the range (until end_write(), or until `overlapped` completes
763// when it is not null) and opens it. Returns the pin's id, 0 when nothing was pinned.
764inline std::uint64_t begin_write(const void* buffer, std::size_t bytes, const OVERLAPPED* overlapped) {
765 State& s = state();
766 const Opener opener = s.opener.load(std::memory_order_acquire);
767 if (!opener || !buffer || !bytes) return 0;
768 const auto begin = reinterpret_cast<std::uintptr_t>(buffer);
769 std::uint64_t id = 0;
770 {
771 std::lock_guard lock(s.mutex);
772 id = s.next_id++;
773 s.pins.push_back({begin, begin + bytes, overlapped, id, false});
774 s.count.store(s.pins.size(), std::memory_order_release);
775 }
776 // After the pin: a refresh that runs from here on leaves the range writable.
777 opener(begin, begin + bytes);
778 return id;
779}
780
781// The call is over: a synchronous pin ends. An overlapped pin whose request is still pending stays until it completes.
782inline void end_write(std::uint64_t id, bool pending) {
783 if (!id) return;
784 State& s = state();
785 std::lock_guard lock(s.mutex);
786 for (auto it = s.pins.begin(); it != s.pins.end(); ++it) {
787 if (it->id != id) continue;
788 if (pending && it->overlapped)
789 it->returned = true;
790 else
791 s.pins.erase(it);
792 break;
793 }
794 s.count.store(s.pins.size(), std::memory_order_release);
795}
796
797// For as long as the GPU may use [buffer, buffer + bytes) as host memory (the D3D12 layer's VK_EXT_external_memory_host
798// imports): pins the range until release() and opens it. Unlike begin_write it records the pin before any tracker
799// exists, so a tracker made later passes over the pages too. RADV checks an import's pages again at every submission,
800// and once one of them is read-only the kernel rejects that submission and every later one ("The CS has been
801// rejected", then VK_ERROR_DEVICE_LOST; found and measured by NateWeav, #14), so no guard may land on them. Returns
802// the pin's id, 0 for an empty range.
803inline std::uint64_t hold(const void* buffer, std::size_t bytes) {
804 if (!buffer || !bytes) return 0;
805 State& s = state();
806 const auto begin = reinterpret_cast<std::uintptr_t>(buffer);
807 std::uint64_t id = 0;
808 {
809 std::lock_guard lock(s.mutex);
810 id = s.next_id++;
811 s.pins.push_back({begin, begin + bytes, nullptr, id});
812 s.count.store(s.pins.size(), std::memory_order_release);
813 }
814 // After the pin: a guard a refresh made before it is lifted, and no refresh from here on makes one.
815 if (const Opener opener = s.opener.load(std::memory_order_acquire)) opener(begin, begin + bytes);
816 return id;
817}
818
819// The import is freed: its pin ends.
820inline void release(std::uint64_t id) { end_write(id, false); }
821
822// Readies [buffer, buffer + bytes) for a retry after ERROR_NOACCESS: commits xmem's pages that wait for their first
823// touch (the kernel's write does not fault them in), opens watched pages again, and then makes xmem's pages that are
824// still read-only with no guard to answer for it writable. false: no side is set.
825inline bool reopen(const void* buffer, std::size_t bytes) {
826 if (!buffer || !bytes) return false;
827 const State& s = state();
828 const Committer committer = s.committer.load(std::memory_order_acquire);
829 const Opener opener = s.opener.load(std::memory_order_acquire);
830 const Unguarder unguarder = s.unguarder.load(std::memory_order_acquire);
831 const auto begin = reinterpret_cast<std::uintptr_t>(buffer);
832 if (committer) committer(buffer, bytes);
833 if (opener) opener(begin, begin + bytes);
834 if (unguarder) unguarder(begin, begin + bytes);
835 return committer || opener || unguarder;
836}
837
838namespace detail {
839// memmove that reports an access violation instead of raising it (after the vectored handlers declined it). No C++
840// objects here: a function with __try cannot have any that need unwinding. leonida::guarded::move, not the CRT's
841// memmove: under Wine a fault inside ucrtbase never reaches this __except (src/guarded_copy.h).
842inline bool move_guarded(void* destination, const void* source, std::size_t bytes) {
843 __try {
844 guarded::move(destination, source, bytes);
845 return true;
846 } __except (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ? EXCEPTION_EXECUTE_HANDLER
847 : EXCEPTION_CONTINUE_SEARCH) {
848 return false;
849 }
850}
851
852// An aligned 4- or 8-byte store (guarded::store32/store64) that reports an access violation the same way.
853inline bool store_guarded(void* destination, std::uint64_t value, std::size_t bytes) {
854 __try {
855 if (bytes == 8)
856 guarded::store64(destination, value);
857 else
858 guarded::store32(destination, static_cast<std::uint32_t>(value));
859 return true;
860 } __except (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ? EXCEPTION_EXECUTE_HANDLER
861 : EXCEPTION_CONTINUE_SEARCH) {
862 return false;
863 }
864}
865} // namespace detail
866
867// A host thread's copy of `bytes` from `source` into the title's memory at `destination`: pinned and opened as a
868// kernel write is, so the guards over it are lifted first, the copies take the bytes at the next submission and no
869// refresh guards it again mid-copy; retried once after reopen() if it faults anyway (not when the two ranges overlap:
870// the part copied before the fault changed the source). False when it still faults (the destination, or the source,
871// is not memory it can copy).
872inline bool write(void* destination, const void* source, std::size_t bytes) {
873 if (!bytes) return true;
874 const auto to = reinterpret_cast<std::uintptr_t>(destination), from = reinterpret_cast<std::uintptr_t>(source);
875 const bool overlap = to < from + bytes && from < to + bytes;
876 const std::uint64_t pin = begin_write(destination, bytes, nullptr);
877 bool ok = detail::move_guarded(destination, source, bytes);
878 if (!ok && !overlap && reopen(destination, bytes)) ok = detail::move_guarded(destination, source, bytes);
879 end_write(pin, false);
880 return ok;
881}
882
883// write() of a 4- or 8-byte value (the low `bytes` of `value`). Aligned, it is stored in one locked access, so a
884// title thread polling it never reads a mix of the old and the new value; pinned and retried the same way.
885inline bool store(void* destination, std::uint64_t value, std::size_t bytes) {
886 const auto to = reinterpret_cast<std::uintptr_t>(destination);
887 if ((bytes != 4 && bytes != 8) || to % bytes) return write(destination, &value, bytes);
888 const std::uint64_t pin = begin_write(destination, bytes, nullptr);
889 bool ok = detail::store_guarded(destination, value, bytes);
890 if (!ok && reopen(destination, bytes)) ok = detail::store_guarded(destination, value, bytes);
891 end_write(pin, false);
892 return ok;
893}
894
895// The file shims' reads into title memory (file_system.cpp): ReadFile, ReadFileEx and ReadFileScatter with their
896// destination pinned and opened first, and retried once if it fails with ERROR_NOACCESS anyway (after committing
897// first-touch pages: the title retries such a read forever, `0x314200`, so the retry has to change something).
898inline BOOL read_file(HANDLE file, LPVOID buffer, DWORD bytes, LPDWORD read, LPOVERLAPPED overlapped) {
899 const std::uint64_t pin = begin_write(buffer, bytes, overlapped);
900 BOOL ok = ::ReadFile(file, buffer, bytes, read, overlapped);
901 if (!ok && GetLastError() == ERROR_NOACCESS && reopen(buffer, bytes))
902 ok = ::ReadFile(file, buffer, bytes, read, overlapped);
903 const DWORD error = GetLastError();
904 end_write(pin, !ok && error == ERROR_IO_PENDING);
905 SetLastError(error);
906 return ok;
907}
908
909inline BOOL read_file_ex(HANDLE file, LPVOID buffer, DWORD bytes, LPOVERLAPPED overlapped,
910 LPOVERLAPPED_COMPLETION_ROUTINE routine) {
911 const std::uint64_t pin = begin_write(buffer, bytes, overlapped);
912 BOOL ok = ::ReadFileEx(file, buffer, bytes, overlapped, routine);
913 if (!ok && GetLastError() == ERROR_NOACCESS && reopen(buffer, bytes))
914 ok = ::ReadFileEx(file, buffer, bytes, overlapped, routine);
915 const DWORD error = GetLastError();
916 end_write(pin, bool(ok)); // queued: pending until the OVERLAPPED says otherwise
917 SetLastError(error);
918 return ok;
919}
920
921// Each segment is one system page.
922inline BOOL read_file_scatter(HANDLE file, FILE_SEGMENT_ELEMENT segments[], DWORD bytes, LPDWORD reserved,
923 LPOVERLAPPED overlapped) {
924 SYSTEM_INFO info{};
925 GetSystemInfo(&info);
926 std::vector<std::uint64_t> pins;
927 const DWORD count = segments ? (bytes + info.dwPageSize - 1) / info.dwPageSize : 0;
928 for (DWORD i = 0; i < count; ++i)
929 pins.push_back(begin_write(segments[i].Buffer, info.dwPageSize, overlapped));
930 BOOL ok = ::ReadFileScatter(file, segments, bytes, reserved, overlapped);
931 if (!ok && GetLastError() == ERROR_NOACCESS && count) {
932 for (DWORD i = 0; i < count; ++i) reopen(segments[i].Buffer, info.dwPageSize);
933 ok = ::ReadFileScatter(file, segments, bytes, reserved, overlapped);
934 }
935 const DWORD error = GetLastError();
936 for (const std::uint64_t pin : pins) end_write(pin, bool(ok) || error == ERROR_IO_PENDING);
937 SetLastError(error);
938 return ok;
939}
940
941} // namespace leonida::kernel_writes
diff --git a/runtime/src/title_texture_memory.h b/runtime/src/title_texture_memory.h
new file mode 100644
index 000000000..a97e5bed6
--- /dev/null
+++ b/runtime/src/title_texture_memory.h
@@ -0,0 +1,62 @@
1#pragma once
2#include <windows.h>
3#include <cstddef>
4#include <cstdint>
5#include <limits>
6
7namespace leonida {
8
9// Keep negative probes until the title changes the map or a writer reports this footprint. With cache_success,
10// positive ones too: a caller that is told of every map change over the footprint (retry) and reads it under a guard
11// (a page gone since faults into a defer) need not walk the pages before every read.
12class TextureReadability {
13public:
14 template<class Probe>
15 bool check(std::uint64_t generation, bool cache_failure, Probe probe, bool cache_success = false) {
16 if (cache_failure && pending_ && !retry_ && generation_ == generation) return false;
17 if (cache_success && probed_ && !pending_ && !retry_ && generation_ == generation) return true;
18 generation_ = generation; // snapshot before the probe so a concurrent map change is noticed
19 retry_ = false;
20 probed_ = true;
21 pending_ = !probe();
22 return !pending_;
23 }
24 void defer() { pending_ = true; } // mapping disappeared between the probe and the read
25 void retry() { retry_ = true; }
26 bool pending() const { return pending_; }
27private:
28 std::uint64_t generation_ = 0;
29 bool pending_ = false, retry_ = false, probed_ = false;
30};
31
32using TexturePageCommitter = bool (*)(const void*, std::size_t);
33
34// Check the whole footprint. A committed first page says nothing about a streamed mip farther on.
35inline bool texture_memory_readable(std::uintptr_t base, std::uint64_t size, TexturePageCommitter commit = nullptr) {
36 if (!base || !size || size > (std::numeric_limits<std::uintptr_t>::max)() - base) return false;
37 const auto end = base + size;
38 for (auto at = base; at < end;) {
39 MEMORY_BASIC_INFORMATION region{};
40 const auto* address = reinterpret_cast<const void*>(at);
41 if (!VirtualQuery(address, &region, sizeof(region))) return false;
42 // A persistent Map can name an xmem section whose physical pages commit on first touch.
43 // Only xmem may commit them. A bare reservation or an inaccessible page must still defer.
44 if (commit && region.State == MEM_RESERVE && region.Type == MEM_MAPPED) {
45 if (!commit(address, end - at) || !VirtualQuery(address, &region, sizeof(region))) return false;
46 }
47 if (region.State != MEM_COMMIT || (region.Protect & PAGE_GUARD)) return false;
48 switch (region.Protect & 0xff) {
49 case PAGE_READONLY: case PAGE_READWRITE: case PAGE_WRITECOPY:
50 case PAGE_EXECUTE_READ: case PAGE_EXECUTE_READWRITE: case PAGE_EXECUTE_WRITECOPY: break;
51 default: return false;
52 }
53 const auto start = reinterpret_cast<std::uintptr_t>(region.BaseAddress);
54 if (at < start || at - start >= region.RegionSize) return false;
55 const auto available = region.RegionSize - (at - start);
56 if (available >= end - at) return true;
57 at += available;
58 }
59 return true;
60}
61
62} // namespace leonida
diff --git a/runtime/src/title_texture_refresh.h b/runtime/src/title_texture_refresh.h
new file mode 100644
index 000000000..ed7c0f2b6
--- /dev/null
+++ b/runtime/src/title_texture_refresh.h
@@ -0,0 +1,63 @@
1#pragma once
2#include <algorithm>
3#include <cstdint>
4#include <utility>
5#include <vector>
6
7namespace leonida {
8
9using TitleWriteRanges = std::vector<std::pair<std::uintptr_t, std::uintptr_t>>;
10
11// Sorted, disjoint half-open intervals let each texture find its first possible writer by end address.
12inline void merge_title_writes(TitleWriteRanges& writes) {
13 std::sort(writes.begin(), writes.end());
14 std::size_t count = 0;
15 for (const auto [begin, end] : writes) {
16 if (begin >= end) continue;
17 if (count && begin <= writes[count - 1].second)
18 writes[count - 1].second = std::max(writes[count - 1].second, end);
19 else
20 writes[count++] = {begin, end};
21 }
22 writes.resize(count);
23}
24
25inline bool title_write_overlaps(const TitleWriteRanges& writes, std::uintptr_t begin, std::uintptr_t end) {
26 const auto it = std::upper_bound(writes.begin(), writes.end(), begin,
27 [](auto address, const auto& range) { return address < range.second; });
28 return begin < end && it != writes.end() && it->first < end;
29}
30
31// The registry's entries as one pass will visit them, in placement order. A pass cannot walk the registry itself: a
32// fill it makes can submit, a submission destroys a retired image, and that image's destructor erases its entry
33// (DeviceState::title_texture_gone). Windows' mutex is recursive for its owner, so the erase lands inside the pass and
34// the walk would step through a freed node. The list holds a reference to each entry, so an entry erased during the
35// pass is still alive when its turn comes.
36template<class Registry>
37std::vector<std::pair<std::uint64_t, typename Registry::mapped_type>> title_texture_snapshot(const Registry& textures) {
38 std::vector<std::pair<std::uint64_t, typename Registry::mapped_type>> entries;
39 entries.reserve(textures.size());
40 for (const auto& [address, texture] : textures) entries.emplace_back(address, texture);
41 return entries;
42}
43
44// Poll unmarked textures of a snapshot in placement order. A time or byte limit resumes the next pass at
45// the following address. The cursor also survives insertion or removal between passes.
46template<class Entry, class Visit, class Exhausted>
47void poll_title_textures(const std::vector<Entry>& entries, std::uint64_t& cursor, Visit visit, Exhausted exhausted) {
48 if (entries.empty()) return;
49 // A snapshot of a std::map comes out sorted by address.
50 const auto first = std::lower_bound(entries.begin(), entries.end(), cursor,
51 [](const Entry& entry, std::uint64_t at) { return entry.first < at; });
52 auto index = std::size_t(first - entries.begin());
53 if (index == entries.size()) index = 0; // the cursor is past the last address: resume at the first
54 for (auto left = entries.size(); left; --left) {
55 const auto& [address, texture] = entries[index];
56 cursor = address + 1;
57 if (!texture->mapped && !texture->stale) visit(*texture);
58 if (exhausted()) break; // advance at least one registry entry even if a deadline already passed
59 index = index + 1 == entries.size() ? 0 : index + 1;
60 }
61}
62
63} // namespace leonida
diff --git a/runtime/src/title_va_alias.h b/runtime/src/title_va_alias.h
new file mode 100644
index 000000000..b3de5ce70
--- /dev/null
+++ b/runtime/src/title_va_alias.h
@@ -0,0 +1,375 @@
1#pragma once
2// Buffer addresses in the title's own memory and the console VA a translated shader reaches them by
3// (docs/d3d12_vulkan.md section 3.3, "Title-chosen addresses").
4//
5// A translated shader computes heap_base + console_va, with heap_base the GPU address arena's device address. The
6// layer chooses every console VA it hands out, so they all land in the arena. The title does not always use them:
7// - device slot 133 places a buffer at the CPU address of the title's own pages (a user-mode Windows address, far above 4 GiB);
8// - the title points V#s and root views at its own memory (a per-frame constant ring, #8862 section 3.5).
9// Both are far past the arena, so heap_base + VA reads nothing the layer made. An address inside such a range is
10// therefore replaced, wherever the layer can see it, by the console VA of a GPU copy of that range: its arena offset
11// when the copy is an arena range (a slot-133 shadow, or a window of the title's pages copied before every
12// submission), or its device address minus heap_base (mod 2^64) when it has its own memory (an imported slot-133
13// buffer). Addresses that are not in the title's memory are passed through unchanged.
14//
15// The table is process-wide, like the title's address space. The device behind it registers two hooks: a resolver
16// that makes a GPU copy for an address in the title's memory that has none yet, and a scanner that rewrites the
17// buffer V#s of a bound descriptor table before a submission. Without hooks the table only translates what was
18// added to it, so it is tested without a GPU (title_va_alias_test).
19#include <algorithm>
20#include <array>
21#include <atomic>
22#include <cstddef>
23#include <cstdint>
24#include <iterator>
25#include <map>
26#include <mutex>
27#include <shared_mutex>
28#include <utility>
29#include <vector>
30
31namespace leonida {
32
33class TitleVaAliases {
34public:
35 // Where the layer saw the address, for the counters.
36 enum Kind : unsigned { root_view, created_view, table_view, vertex_view, index_view, bvh_address, kind_count };
37 static constexpr const char* kKindNames[kind_count] = {"root view", "created view", "table V#", "vertex view",
38 "index view", "BVH build address"};
39
40 // An address in the title's memory: true, with `shader_va` what a shader must be given (0 when no copy can be
41 // made: the view is then written with a zero-size range, never with the raw address). False: not the title's
42 // memory (an arena VA, a buffer of the layer's).
43 using Resolver = bool (*)(void* context, std::uint64_t va, std::uint64_t bytes, std::uint64_t& shader_va);
44 using TableScanner = void (*)(void* context, std::uint64_t table_va, std::uint32_t descriptors);
45
46 // [title_va, title_va + bytes) is reached as [shader_va, shader_va + bytes). A range that overlaps a live one
47 // replaces it (the title has placed a new buffer over pages it released). False for an empty or wrapping range.
48 bool add(std::uint64_t title_va, std::uint64_t bytes, std::uint64_t shader_va) {
49 if (!bytes || title_va > UINT64_MAX - bytes) return false;
50 std::unique_lock lock(mutex_);
51 erase_overlapping(title_va, title_va + bytes);
52 ranges_[title_va] = {title_va + bytes, shader_va};
53 count_.store(ranges_.size(), std::memory_order_release);
54 return true;
55 }
56
57 // The two addresses of one stream-pool extent (a GPU-only alias and the CPU view of the same pages, gfxgeom
58 // section 3): both name the same shader VA, so a title view carrying either resolves to the one mapping.
59 bool add_twin(std::uint64_t va, std::uint64_t twin, std::uint64_t bytes, std::uint64_t shader_va) {
60 if (va == twin) return add(va, bytes, shader_va);
61 const bool first = add(va, bytes, shader_va);
62 return add(twin, bytes, shader_va) && first;
63 }
64
65 // Forgets the range that starts at title_va, if it still maps to shader_va (a newer range at the same VA keeps
66 // its own entry).
67 void remove(std::uint64_t title_va, std::uint64_t shader_va) {
68 std::unique_lock lock(mutex_);
69 const auto it = ranges_.find(title_va);
70 if (it != ranges_.end() && it->second.shader_va == shader_va) {
71 ranges_.erase(it);
72 invalidations_.fetch_add(1, std::memory_order_release);
73 }
74 count_.store(ranges_.size(), std::memory_order_release);
75 }
76
77 // The address a shader must be given for `va` from the ranges added so far: translated inside one, unchanged
78 // elsewhere. No copy is made here.
79 std::uint64_t shader_va(std::uint64_t va, std::uint64_t bytes = 1) const {
80 if (!count_.load(std::memory_order_acquire)) return va; // the common case: no title range at all
81 std::shared_lock lock(mutex_);
82 auto it = ranges_.upper_bound(va);
83 if (it == ranges_.begin()) return va;
84 --it;
85 if (va >= it->second.end || bytes > it->second.end - va) return va;
86 return it->second.shader_va + (va - it->first);
87 }
88
89 // The range that holds `va`: true with `shader_va` what `va` becomes and `available` the bytes from `va` to the
90 // range's end, all reached through the one copy. False when no range holds `va`.
91 bool range_of(std::uint64_t va, std::uint64_t& shader_va, std::uint64_t& available) const {
92 if (!count_.load(std::memory_order_acquire)) return false;
93 std::shared_lock lock(mutex_);
94 auto it = ranges_.upper_bound(va);
95 if (it == ranges_.begin()) return false;
96 --it;
97 if (va >= it->second.end) return false;
98 shader_va = it->second.shader_va + (va - it->first);
99 available = it->second.end - va;
100 return true;
101 }
102
103 // Every range, in title-VA order (they never overlap): what a GPU pass that finds title addresses in memory
104 // (the BLAS address of a TLAS build's instance descs) translates them with.
105 struct Mapping {
106 std::uint64_t title_va, end, shader_va;
107 };
108 void mappings(std::vector<Mapping>& out) const {
109 out.clear();
110 if (!count_.load(std::memory_order_acquire)) return;
111 std::shared_lock lock(mutex_);
112 out.reserve(ranges_.size());
113 for (const auto& [start, range] : ranges_) out.push_back({start, range.end, range.shader_va});
114 }
115
116 // Debug-only inverse lookup. V#s retain 48 bits, so an import below heap_base wraps.
117 bool source_of_vsharp(std::uint64_t base, std::uint64_t& title, std::uint64_t& available) const {
118 constexpr std::uint64_t mask = (1ull << 48) - 1;
119 std::shared_lock lock(mutex_);
120 for (const auto& [start, range] : ranges_) {
121 const auto delta = (base - range.shader_va) & mask;
122 if (delta >= range.end - start) continue;
123 title = start + delta;
124 available = range.end - title;
125 return true;
126 }
127 return false;
128 }
129
130 // The free span around `va` (not in any range): [lo, hi). A copy made for `va` must stay inside it, so it never
131 // replaces a range another buffer still uses.
132 void gap(std::uint64_t va, std::uint64_t& lo, std::uint64_t& hi) const {
133 std::shared_lock lock(mutex_);
134 lo = 0;
135 hi = UINT64_MAX;
136 auto it = ranges_.upper_bound(va);
137 if (it != ranges_.end()) hi = it->first;
138 if (it != ranges_.begin()) lo = std::prev(it)->second.end;
139 }
140
141 // shader_va, and when `va` is in the title's memory with no copy yet, a copy made by the device's resolver.
142 // A resolver that cannot back the address (no window or geometry copy fits) answers 0: the view is then written
143 // with a zero-size range, never with the raw title address (heap_base + a raw VA is no allocation a shader can
144 // read or write). Counted by kind: translated, or in the title's memory and left as it was.
145 std::uint64_t resolve(std::uint64_t va, std::uint64_t bytes, Kind kind) {
146 if (!va) return va;
147 std::uint64_t to = shader_va(va);
148 if (to != va) {
149 translated_[kind].fetch_add(1, std::memory_order_relaxed);
150 return to;
151 }
152 Resolver resolver;
153 void* context;
154 {
155 std::lock_guard lock(hook_mutex_);
156 resolver = resolver_;
157 context = hook_context_;
158 }
159 if (!resolver || !resolver(context, va, bytes, to)) return va;
160 (to != va ? translated_ : untranslated_)[kind].fetch_add(1, std::memory_order_relaxed);
161 return to;
162 }
163
164 // Counts an address that the layer resolves through its buffer index instead (vertex and index views): only
165 // whether it is in a title range.
166 void note(std::uint64_t va, Kind kind) {
167 if (va && shader_va(va) != va) untranslated_[kind].fetch_add(1, std::memory_order_relaxed);
168 }
169
170 // Before a submission: the device rewrites the buffer V#s of the `descriptors` slots the root signature declares
171 // for the table at `table_va` (a console VA in one of its shader-visible CBV/SRV/UAV heaps).
172 void scan_table(std::uint64_t table_va, std::uint32_t descriptors) {
173 TableScanner scanner;
174 void* context;
175 {
176 std::lock_guard lock(hook_mutex_);
177 scanner = scanner_;
178 context = hook_context_;
179 }
180 if (scanner) scanner(context, table_va, descriptors);
181 }
182
183 // The scan's cost, per ExecuteCommandLists that had tables to scan.
184 void note_scan(std::uint64_t nanoseconds) {
185 scans_.fetch_add(1, std::memory_order_relaxed);
186 scan_ns_.fetch_add(nanoseconds, std::memory_order_relaxed);
187 std::uint64_t seen = scan_max_ns_.load(std::memory_order_relaxed);
188 while (nanoseconds > seen && !scan_max_ns_.compare_exchange_weak(seen, nanoseconds)) {
189 }
190 }
191 std::uint64_t scans() const { return scans_.load(std::memory_order_relaxed); }
192 std::uint64_t scan_ns() const { return scan_ns_.load(std::memory_order_relaxed); }
193 std::uint64_t scan_max_ns() const { return scan_max_ns_.load(std::memory_order_relaxed); }
194
195 // The title's own memory, as the xmem shims hand it out (XMemAlloc, XMemVirtualAlloc, the title's VirtualAlloc):
196 // only an address in one of these ranges gets a copy. A base anywhere else (the runtime's own heap, a host DLL)
197 // is left as it was and counted.
198 void add_title_memory(std::uint64_t base, std::uint64_t bytes) {
199 if (!base || !bytes || base > UINT64_MAX - bytes) return;
200 std::uint64_t begin = base, end = base + bytes;
201 std::unique_lock lock(memory_mutex_);
202 // A commit inside a reserved range, or two that overlap, are one range.
203 auto it = memory_.upper_bound(begin);
204 if (it != memory_.begin() && std::prev(it)->second > begin) --it;
205 while (it != memory_.end() && it->first < end) {
206 begin = std::min(begin, it->first);
207 end = std::max(end, it->second);
208 it = memory_.erase(it);
209 }
210 memory_[begin] = end;
211 }
212 void remove_title_memory(std::uint64_t base) {
213 std::unique_lock lock(memory_mutex_);
214 memory_.erase(base);
215 }
216 // LOCAL DIAGNOSTIC (mem probe): every title range, [begin, end), in address order.
217 std::vector<std::pair<std::uint64_t, std::uint64_t>> title_memory_ranges() const {
218 std::shared_lock lock(memory_mutex_);
219 return {memory_.begin(), memory_.end()};
220 }
221 // The title range that holds `va`: [lo, hi). False when none does.
222 bool title_memory(std::uint64_t va, std::uint64_t& lo, std::uint64_t& hi) const {
223 std::shared_lock lock(memory_mutex_);
224 auto it = memory_.upper_bound(va);
225 if (it == memory_.begin()) return false;
226 --it;
227 if (va >= it->second) return false;
228 lo = it->first;
229 hi = it->second;
230 return true;
231 }
232
233 // A title that gives a descriptor heap its own backing memory (__XMemAllocationHooks__) writes descriptors there
234 // itself, while shaders read the layer's heap. The layer that keeps that mapping registers a source: before a
235 // bound table is scanned, it copies the slots the title wrote in its own memory over the layer's copy
236 // ([real, real + bytes) is the layer heap's CPU memory). Returns how many slots it copied.
237 using DescriptorSource = std::uint64_t (*)(void* context, std::uint8_t* real, std::size_t bytes);
238 void set_descriptor_source(void* context, DescriptorSource source) {
239 std::lock_guard lock(hook_mutex_);
240 source_context_ = context;
241 source_ = source;
242 }
243 void pull_descriptors(std::uint8_t* real, std::size_t bytes) {
244 DescriptorSource source;
245 void* context;
246 {
247 std::lock_guard lock(hook_mutex_);
248 source = source_;
249 context = source_context_;
250 }
251 if (source) pulled_.fetch_add(source(context, real, bytes), std::memory_order_relaxed);
252 }
253 std::uint64_t pulled() const { return pulled_.load(std::memory_order_relaxed); }
254
255 // The end of the first title range that overlaps [lo, hi), or 0 when none does. The GPU address arena keeps its
256 // own allocations out of these ranges, so one number is never both an arena address and a title address.
257 std::uint64_t title_overlap_end(std::uint64_t lo, std::uint64_t hi) const {
258 std::shared_lock lock(memory_mutex_);
259 auto it = memory_.upper_bound(lo);
260 if (it != memory_.begin() && std::prev(it)->second > lo) return std::prev(it)->second;
261 if (it != memory_.end() && it->first < hi) return it->second;
262 return 0;
263 }
264
265 // A vertex or index buffer view at `va`. On the console every page of the title's memory is GPU memory, so a view
266 // may name any address: the retail title binds vertex data that lives in its own CPU heap, with no D3D12 resource
267 // over it. When `va` is in the title's memory the device's maker makes sure a buffer covers it (found with a
268 // debugger: the address a draw could not resolve was a field of a vertex-buffer object in the title's heap,
269 // docs/re/answers.md).
270 using BufferMaker = void (*)(void* context, std::uint64_t va, std::uint64_t bytes);
271 void set_buffer_maker(void* context, BufferMaker maker) {
272 std::lock_guard lock(hook_mutex_);
273 maker_context_ = context;
274 maker_ = maker;
275 }
276 void clear_buffer_maker(void* context) {
277 std::lock_guard lock(hook_mutex_);
278 if (maker_context_ != context) return;
279 maker_context_ = nullptr;
280 maker_ = nullptr;
281 }
282 void want_buffer(std::uint64_t va, std::uint64_t bytes) {
283 if (!va) return;
284 std::uint64_t lo = 0, hi = 0;
285 if (!title_memory(va, lo, hi)) return;
286 BufferMaker maker;
287 void* context;
288 {
289 std::lock_guard lock(hook_mutex_);
290 maker = maker_;
291 context = maker_context_;
292 }
293 if (maker) maker(context, va, bytes);
294 }
295
296 // The first device to register keeps the hooks until it clears them.
297 void set_hooks(void* context, Resolver resolver, TableScanner scanner) {
298 std::lock_guard lock(hook_mutex_);
299 if (hook_context_) return;
300 hook_context_ = context;
301 resolver_ = resolver;
302 scanner_ = scanner;
303 }
304 void clear_hooks(void* context) {
305 std::lock_guard lock(hook_mutex_);
306 if (hook_context_ != context) return;
307 hook_context_ = nullptr;
308 resolver_ = nullptr;
309 scanner_ = nullptr;
310 }
311 // The resolver alone, for a device that scans its descriptor tables itself.
312 void set_resolver(void* context, Resolver resolver) { set_hooks(context, resolver, nullptr); }
313 void clear_resolver(void* context) { clear_hooks(context); }
314
315 std::size_t size() const { return count_.load(std::memory_order_acquire); }
316 std::uint64_t invalidations() const { return invalidations_.load(std::memory_order_acquire); }
317 void note_translation(Kind kind) { translated_[kind].fetch_add(1, std::memory_order_relaxed); }
318 std::uint64_t translated(Kind kind) const { return translated_[kind].load(std::memory_order_relaxed); }
319 std::uint64_t untranslated(Kind kind) const { return untranslated_[kind].load(std::memory_order_relaxed); }
320
321private:
322 struct Range {
323 std::uint64_t end; // exclusive
324 std::uint64_t shader_va; // what the range's first byte becomes
325 };
326
327 void erase_overlapping(std::uint64_t begin, std::uint64_t end) {
328 auto it = ranges_.lower_bound(begin);
329 if (it != ranges_.begin()) {
330 auto previous = std::prev(it);
331 if (previous->second.end > begin) it = previous;
332 }
333 if (it != ranges_.end() && it->first < end) invalidations_.fetch_add(1, std::memory_order_release);
334 while (it != ranges_.end() && it->first < end) it = ranges_.erase(it);
335 }
336
337 mutable std::shared_mutex mutex_;
338 std::map<std::uint64_t, Range> ranges_; // by title VA
339 std::atomic<std::size_t> count_{0};
340 std::atomic<std::uint64_t> invalidations_{};
341 std::mutex hook_mutex_;
342 void* hook_context_ = nullptr;
343 void* maker_context_ = nullptr;
344 BufferMaker maker_ = nullptr;
345 Resolver resolver_ = nullptr;
346 TableScanner scanner_ = nullptr;
347 void* source_context_ = nullptr;
348 DescriptorSource source_ = nullptr;
349 std::atomic<std::uint64_t> pulled_{0};
350 std::array<std::atomic<std::uint64_t>, kind_count> translated_{};
351 std::array<std::atomic<std::uint64_t>, kind_count> untranslated_{};
352 std::atomic<std::uint64_t> scans_{0}, scan_ns_{0}, scan_max_ns_{0};
353 mutable std::shared_mutex memory_mutex_;
354 std::map<std::uint64_t, std::uint64_t> memory_; // the title's memory: base -> end
355};
356
357// The process's table: the device's title ranges and hooks, read by the command lists and descriptor writers.
358inline TitleVaAliases& title_va_aliases() {
359 static TitleVaAliases aliases;
360 return aliases;
361}
362
363// One diagnostic per descriptor-writing path.
364inline void note_unbacked_view(const char* site, std::uint64_t va, std::uint64_t bytes) {
365 static std::mutex mutex;
366 static std::map<std::string, bool> sites;
367 {
368 std::lock_guard lock(mutex);
369 if (!sites.emplace(site, true).second) return;
370 }
371 std::fprintf(stderr, "[rt] d3d12: %s: address 0x%llx (%llu bytes) has no GPU copy; zero records\n",
372 site, static_cast<unsigned long long>(va), static_cast<unsigned long long>(bytes));
373}
374
375} // namespace leonida
diff --git a/runtime/src/title_window_plan.h b/runtime/src/title_window_plan.h
new file mode 100644
index 000000000..cd17bc596
--- /dev/null
+++ b/runtime/src/title_window_plan.h
@@ -0,0 +1,66 @@
1#pragma once
2// Where a title-window mapping sits and how much of a stream pool one mapping serves, without a device
3// (docs/d3d12_vulkan.md section 3.3 "Title-chosen addresses").
4//
5// The device's resolve_title_memory makes the mapping; these decide its range first, so a test can count mappings
6// without Vulkan. Two rules matter here:
7// - a window is page-aligned, capped at one request's maximum and charged to LEONIDA_TITLE_WINDOWS_MB; one that
8// does not fit is not made, and the address is backed another way or written as a zero-size view, never raw;
9// - a stream pool (the title's CPU view paired with a GPU-only alias, gfxgeom section 3) is one reservation of
10// 16-24 GiB, so it cannot be one allocation: one mapping serves a page-aligned readable run of it, and every
11// request inside that run reuses it instead of asking for a 128 KiB window each.
12#include <algorithm>
13#include <cstdint>
14
15namespace leonida {
16
17// A page-aligned mapping of the title's memory: [start, start + size).
18struct TitleWindowRange {
19 std::uint64_t start{};
20 std::uint64_t size{};
21};
22
23// `size` bytes more fit in the title-window budget [used, cap).
24inline bool title_window_fits(std::uint64_t cap, std::uint64_t used, std::uint64_t size) {
25 return used <= cap && size <= cap - used;
26}
27
28// The page-aligned range a window made for [va, va + bytes) covers: inside the free span [lo, hi), aligned to
29// `align`, at most `most` bytes of the request, and charged against [used, cap). False when the span holds no page
30// for it or the budget has no room.
31inline bool title_window_range(std::uint64_t va, std::uint64_t bytes, std::uint64_t lo, std::uint64_t hi,
32 std::uint64_t align, std::uint64_t most, std::uint64_t cap, std::uint64_t used,
33 TitleWindowRange& out) {
34 if (!align || (align & (align - 1)) != 0 || !most || va < lo || hi <= va) return false;
35 const std::uint64_t want = (std::min)(bytes ? bytes : std::uint64_t(1), most);
36 const std::uint64_t start = (std::max)(va & ~(align - 1), lo);
37 const std::uint64_t raw_end = want > UINT64_MAX - va ? UINT64_MAX : va + want;
38 std::uint64_t end = raw_end > UINT64_MAX - (align - 1) ? UINT64_MAX : (raw_end + align - 1) & ~(align - 1);
39 end = (std::min)(end, hi);
40 if (end <= va || end <= start) return false;
41 const TitleWindowRange range{start, end - start};
42 if (!title_window_fits(cap, used, range.size)) return false;
43 out = range;
44 return true;
45}
46
47// The extent of a stream pool one mapping serves for the request at `va`: from its page to the end of the readable
48// run (`readable_end`, exclusive), at most `most` bytes, inside the pool [pool_lo, pool_hi). The same extent comes
49// back for every request inside it, so each extent costs one mapping, not one per request.
50inline bool title_pool_extent(std::uint64_t pool_lo, std::uint64_t pool_hi, std::uint64_t va,
51 std::uint64_t readable_end, std::uint64_t align, std::uint64_t most,
52 TitleWindowRange& out) {
53 if (!align || (align & (align - 1)) != 0 || pool_hi <= pool_lo || va < pool_lo || va >= pool_hi ||
54 readable_end <= va)
55 return false;
56 const std::uint64_t start = (std::max)(va & ~(align - 1), pool_lo);
57 std::uint64_t end = (std::min)(readable_end, pool_hi);
58 end = end > UINT64_MAX - (align - 1) ? UINT64_MAX : (end + align - 1) & ~(align - 1);
59 if (most) end = (std::min)(end, start > UINT64_MAX - most ? UINT64_MAX : start + most);
60 end = (std::min)(end, pool_hi);
61 if (end <= va || end <= start) return false;
62 out = {start, end - start};
63 return true;
64}
65
66} // namespace leonida
diff --git a/runtime/src/tls_host.cpp b/runtime/src/tls_host.cpp
index ab234cbd9..6cf5e70ae 100644
--- a/runtime/src/tls_host.cpp
+++ b/runtime/src/tls_host.cpp
@@ -5,6 +5,12 @@
5// __declspec(thread) access in mapped code reads a valid TEB slot. The anchor itself is never used; the loader saves 5// __declspec(thread) access in mapped code reads a valid TEB slot. The anchor itself is never used; the loader saves
6// and restores the helper's own block, so the helper's CRT TLS state is not disturbed. 6// and restores the helper's own block, so the helper's CRT TLS state is not disturbed.
7// 7//
8// One more clone, leonida_tls_host_<pid>_home.dll, is made at process start by reserve_tls_index0: its TLS directory
9// is pointed at gta6rt_tls_home_template below, filled with a copy of the runtime EXE's template, and the runtime EXE
10// moves its TLS from index 0 (which Windows gave it) to that clone's index, so a mapped executable can take index 0.
11// That clone stays loaded until the process ends, and its slot then holds the runtime's live TLS, so nothing in this
12// DLL may read or write its own TLS (gta6rt_tls_host_keep is never called).
13//
8// The Windows loader also calls this DLL's DllMain with DLL_THREAD_ATTACH on every new thread (after it has built that 14// The Windows loader also calls this DLL's DllMain with DLL_THREAD_ATTACH on every new thread (after it has built that
9// thread's TLS array) and with DLL_THREAD_DETACH when a thread exits (before it frees the array). The loader registers 15// thread's TLS array) and with DLL_THREAD_DETACH when a thread exits (before it frees the array). The loader registers
10// a callback here so it can give each new thread its own copy of the mapped image's TLS, and put this DLL's block back 16// a callback here so it can give each new thread its own copy of the mapped image's TLS, and put this DLL's block back
@@ -26,6 +32,13 @@ void* volatile g_thread_event = nullptr;
26// the linker without making DllMain touch TLS during thread attach/detach. 32// the linker without making DllMain touch TLS during thread attach/detach.
27extern "C" __declspec(dllexport) void gta6rt_tls_host_keep() { g_tls_host_anchor = 1; } 33extern "C" __declspec(dllexport) void gta6rt_tls_host_keep() { g_tls_host_anchor = 1; }
28 34
35// The home clone's TLS template (pe_loader.cpp, make_home_clone_image): zeros here, the runtime EXE's template in the
36// clone's file. 16 KiB: gta6rt.exe's own TLS template was 1398 bytes when measured; the loader refuses the move when
37// the EXE's TLS does not fit. Each thread gets a block of the EXE's size, not of this array's. Clones of this DLL for
38// mapped DLLs keep the 514-byte TLS directory and do not use the array.
39extern "C" __declspec(dllexport) const unsigned char gta6rt_tls_home_template[16384] = {};
40extern "C" __declspec(dllexport) const unsigned int gta6rt_tls_home_template_size = sizeof(gta6rt_tls_home_template);
41
29// Called by the loader. `fn` runs inside DllMain (under the Windows loader lock) for DLL_THREAD_ATTACH and 42// Called by the loader. `fn` runs inside DllMain (under the Windows loader lock) for DLL_THREAD_ATTACH and
30// DLL_THREAD_DETACH; nullptr stops the calls. 43// DLL_THREAD_DETACH; nullptr stops the calls.
31extern "C" __declspec(dllexport) void gta6rt_tls_host_set_thread_event(ThreadEventFn fn) { 44extern "C" __declspec(dllexport) void gta6rt_tls_host_set_thread_event(ThreadEventFn fn) {
diff --git a/runtime/src/value_write_sink.h b/runtime/src/value_write_sink.h
new file mode 100644
index 000000000..d6db3989b
--- /dev/null
+++ b/runtime/src/value_write_sink.h
@@ -0,0 +1,77 @@
1#pragma once
2// Where a console value write (list slots 71 and 72) lands when its target is not memory a plain host store reaches:
3// - the GPU address arena: the title names a default-heap buffer by its arena offset, which is not a host address, so
4// a host store at that number would write whatever host memory is there. The D3D12 device that owns the arena
5// answers for its range (set_arena) and writes through its own mapping.
6// - a page of the title's memory that xmem maps PAGE_NOACCESS (a GPU-only window): the title's view refuses the CPU,
7// and xmem writes through its own mapping of the physical page (set_title_pages, rt::xmem::write_title_bytes).
8// Two writers use it: the list values' pump (shims/d3d12_xs_list_values.h), which lands the writes of the lists it
9// tracks, and the GPU-label path (vulkan_gpu_labels.h, LEONIDA_GPU_LABELS=1), for lists it does not track.
10// Portable: no Windows or Vulkan headers, so both sides and the tests without a GPU can include it.
11
12#include <atomic>
13#include <cstddef>
14#include <cstdint>
15#include <mutex>
16
17namespace leonida::value_sink {
18
19enum class Landing {
20 elsewhere, // not the arena's: the caller stores it as before
21 landed, // the arena took it
22 refused, // the arena's, but its bytes cannot be written there (reserved, sparse, past the end): dropped
23};
24
25// `device` is the context set_arena was given; `address` the title's address of the value, `size` 4 or 8.
26using ArenaWrite = Landing (*)(void* device, std::uint64_t address, const void* bytes, unsigned size);
27// True when the bytes were written; false when the range is not one of the shim's pages.
28using TitlePagesWrite = bool (*)(const void* address, const void* bytes, std::size_t size);
29
30struct State {
31 // Held across an arena write, so a device that goes away (clear_arena) waits for one in progress.
32 std::mutex mutex;
33 ArenaWrite arena = nullptr;
34 void* device = nullptr;
35 std::atomic<TitlePagesWrite> title_pages{nullptr};
36};
37
38inline State& state() {
39 static State s;
40 return s;
41}
42
43// The device that owns the arena. The last device to set it answers; clear_arena(device) ends its turn.
44inline void set_arena(ArenaWrite write, void* device) {
45 State& s = state();
46 const std::lock_guard lock(s.mutex);
47 s.arena = write;
48 s.device = device;
49}
50
51inline void clear_arena(void* device) {
52 State& s = state();
53 const std::lock_guard lock(s.mutex);
54 if (s.device != device) return;
55 s.arena = nullptr;
56 s.device = nullptr;
57}
58
59// Asked before any host store of a value write: an arena offset must never reach one.
60inline Landing arena(std::uint64_t address, const void* bytes, unsigned size) {
61 State& s = state();
62 const std::lock_guard lock(s.mutex);
63 if (!s.arena) return Landing::elsewhere;
64 return s.arena(s.device, address, bytes, size);
65}
66
67// xmem sets it when it is linked into the process (shims/xmem.cpp).
68inline void set_title_pages(TitlePagesWrite write) { state().title_pages.store(write, std::memory_order_release); }
69
70// The fallback after a host store into the title's memory failed: the page may be one of xmem's that the title's view
71// keeps PAGE_NOACCESS. False without xmem, or when the page is not xmem's.
72inline bool title_pages(const void* address, const void* bytes, std::size_t size) {
73 const TitlePagesWrite write = state().title_pages.load(std::memory_order_acquire);
74 return write && write(address, bytes, size);
75}
76
77} // namespace leonida::value_sink
diff --git a/runtime/src/vulkan13_features.h b/runtime/src/vulkan13_features.h
index ea65caa2d..8f2dd61f8 100644
--- a/runtime/src/vulkan13_features.h
+++ b/runtime/src/vulkan13_features.h
@@ -32,6 +32,8 @@ public:
32 Vulkan13Features& operator=(const Vulkan13Features&) = delete; 32 Vulkan13Features& operator=(const Vulkan13Features&) = delete;
33 33
34 bool core = false; // a Vulkan 1.3 device: the features are core 34 bool core = false; // a Vulkan 1.3 device: the features are core
35 bool pipeline_cache_control = false;
36 bool enable_pipeline_cache_control = false;
35 bool dynamic_rendering = false; // supported, as a core feature or through VK_KHR_dynamic_rendering 37 bool dynamic_rendering = false; // supported, as a core feature or through VK_KHR_dynamic_rendering
36 bool synchronization2 = false; // supported, as a core feature or through VK_KHR_synchronization2 38 bool synchronization2 = false; // supported, as a core feature or through VK_KHR_synchronization2
37 // Optional 1.3 core features, available through VK_EXT_subgroup_size_control on a 1.2 device. 39 // Optional 1.3 core features, available through VK_EXT_subgroup_size_control on a 1.2 device.
@@ -45,6 +47,7 @@ public:
45 void query(VkPhysicalDevice physical, std::uint32_t api_version, PFN_vkGetPhysicalDeviceFeatures2 features2, 47 void query(VkPhysicalDevice physical, std::uint32_t api_version, PFN_vkGetPhysicalDeviceFeatures2 features2,
46 PFN_vkEnumerateDeviceExtensionProperties enumerate_extensions) { 48 PFN_vkEnumerateDeviceExtensionProperties enumerate_extensions) {
47 core = api_version >= VK_API_VERSION_1_3; 49 core = api_version >= VK_API_VERSION_1_3;
50 pipeline_cache_control=false;enable_pipeline_cache_control=false;
48 dynamic_rendering = synchronization2 = subgroup_size_control = compute_full_subgroups = false; 51 dynamic_rendering = synchronization2 = subgroup_size_control = compute_full_subgroups = false;
49 extended_dynamic_state = false; 52 extended_dynamic_state = false;
50 if (!features2) return; 53 if (!features2) return;
@@ -53,6 +56,7 @@ public:
53 VkPhysicalDeviceFeatures2 query{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, &f13}; 56 VkPhysicalDeviceFeatures2 query{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2, &f13};
54 features2(physical, &query); 57 features2(physical, &query);
55 dynamic_rendering = f13.dynamicRendering == VK_TRUE; 58 dynamic_rendering = f13.dynamicRendering == VK_TRUE;
59 pipeline_cache_control = f13.pipelineCreationCacheControl == VK_TRUE;
56 synchronization2 = f13.synchronization2 == VK_TRUE; 60 synchronization2 = f13.synchronization2 == VK_TRUE;
57 subgroup_size_control = f13.subgroupSizeControl == VK_TRUE; 61 subgroup_size_control = f13.subgroupSizeControl == VK_TRUE;
58 compute_full_subgroups = f13.computeFullSubgroups == VK_TRUE; 62 compute_full_subgroups = f13.computeFullSubgroups == VK_TRUE;
@@ -98,6 +102,7 @@ public:
98 // Copies the flags of the device query() chose (a later query() for another candidate overwrites them). 102 // Copies the flags of the device query() chose (a later query() for another candidate overwrites them).
99 void choose(const Vulkan13Features& from) { 103 void choose(const Vulkan13Features& from) {
100 core = from.core; 104 core = from.core;
105 pipeline_cache_control=from.pipeline_cache_control;enable_pipeline_cache_control=false;
101 dynamic_rendering = from.dynamic_rendering; 106 dynamic_rendering = from.dynamic_rendering;
102 synchronization2 = from.synchronization2; 107 synchronization2 = from.synchronization2;
103 subgroup_size_control = from.subgroup_size_control; 108 subgroup_size_control = from.subgroup_size_control;
@@ -111,6 +116,7 @@ public:
111 if (core) { 116 if (core) {
112 enable13_.pNext = chain; 117 enable13_.pNext = chain;
113 enable13_.dynamicRendering = VK_TRUE; 118 enable13_.dynamicRendering = VK_TRUE;
119 enable13_.pipelineCreationCacheControl = pipeline_cache_control && enable_pipeline_cache_control ? VK_TRUE : VK_FALSE;
114 enable13_.synchronization2 = VK_TRUE; 120 enable13_.synchronization2 = VK_TRUE;
115 enable13_.subgroupSizeControl = subgroup_size_control ? VK_TRUE : VK_FALSE; 121 enable13_.subgroupSizeControl = subgroup_size_control ? VK_TRUE : VK_FALSE;
116 enable13_.computeFullSubgroups = compute_full_subgroups ? VK_TRUE : VK_FALSE; 122 enable13_.computeFullSubgroups = compute_full_subgroups ? VK_TRUE : VK_FALSE;
diff --git a/runtime/src/vulkan_aftermath.cpp b/runtime/src/vulkan_aftermath.cpp
new file mode 100644
index 000000000..82c166136
--- /dev/null
+++ b/runtime/src/vulkan_aftermath.cpp
@@ -0,0 +1,822 @@
1// NVIDIA Nsight Aftermath GPU crash dumps for the Vulkan device (vulkan_aftermath.h). Without LEONIDA_HAVE_AFTERMATH
2// (no -DLEONIDA_AFTERMATH_SDK at configure time) this file only has the do-nothing versions.
3#include "vulkan_aftermath.h"
4
5#include "vulkan_device_fault.h"
6
7#ifdef LEONIDA_HAVE_AFTERMATH
8
9#include "shader_library.h" // leonida::Json, leonida::JsonReader
10
11#include <windows.h>
12
13#include <GFSDK_Aftermath.h>
14#include <GFSDK_Aftermath_GpuCrashDump.h>
15#include <GFSDK_Aftermath_GpuCrashDumpDecoding.h>
16
17#include <atomic>
18#include <chrono>
19#include <cinttypes>
20#include <condition_variable>
21#include <cstdio>
22#include <cstring>
23#include <filesystem>
24#include <fstream>
25#include <map>
26#include <mutex>
27#include <string>
28#include <thread>
29#include <unordered_map>
30#include <vector>
31
32#ifndef LEONIDA_AFTERMATH_DLL_DEFAULT
33#define LEONIDA_AFTERMATH_DLL_DEFAULT ""
34#endif
35#ifndef LEONIDA_AFTERMATH_APP_VERSION
36#define LEONIDA_AFTERMATH_APP_VERSION "unknown"
37#endif
38
39namespace leonida::aftermath {
40namespace {
41
42using Clock = std::chrono::steady_clock;
43constexpr auto wait_limit = std::chrono::seconds(10);
44
45std::wstring env_w(const wchar_t* name) {
46 wchar_t buffer[32768];
47 const DWORD n = GetEnvironmentVariableW(name, buffer, DWORD(std::size(buffer)));
48 return n && n < std::size(buffer) ? std::wstring(buffer, n) : std::wstring();
49}
50
51bool env_is(const wchar_t* name, wchar_t value) {
52 const std::wstring v = env_w(name);
53 return v.size() == 1 && v[0] == value;
54}
55
56std::filesystem::path from_utf8(std::string_view text) {
57 return std::filesystem::path(std::u8string(reinterpret_cast<const char8_t*>(text.data()), text.size()));
58}
59
60std::string narrow(const std::filesystem::path& path) {
61 const std::u8string s = path.u8string();
62 return std::string(s.begin(), s.end());
63}
64
65struct Library {
66 HMODULE module = nullptr;
67 PFN_GFSDK_Aftermath_EnableGpuCrashDumps EnableGpuCrashDumps = nullptr;
68 PFN_GFSDK_Aftermath_GetCrashDumpStatus GetCrashDumpStatus = nullptr;
69 PFN_GFSDK_Aftermath_GetShaderHashSpirv GetShaderHashSpirv = nullptr;
70 PFN_GFSDK_Aftermath_GetShaderDebugInfoIdentifier GetShaderDebugInfoIdentifier = nullptr;
71 PFN_GFSDK_Aftermath_GpuCrashDump_CreateDecoder CreateDecoder = nullptr;
72 PFN_GFSDK_Aftermath_GpuCrashDump_DestroyDecoder DestroyDecoder = nullptr;
73 PFN_GFSDK_Aftermath_GpuCrashDump_GetBaseInfo GetBaseInfo = nullptr;
74 PFN_GFSDK_Aftermath_GpuCrashDump_GetDeviceInfo GetDeviceInfo = nullptr;
75 PFN_GFSDK_Aftermath_GpuCrashDump_GetPageFaultInfo GetPageFaultInfo = nullptr;
76 PFN_GFSDK_Aftermath_GpuCrashDump_GetPageFaultResourceInfo GetPageFaultResourceInfo = nullptr;
77 PFN_GFSDK_Aftermath_GpuCrashDump_GetActiveShadersInfoCount GetActiveShadersInfoCount = nullptr;
78 PFN_GFSDK_Aftermath_GpuCrashDump_GetActiveShadersInfo GetActiveShadersInfo = nullptr;
79 PFN_GFSDK_Aftermath_GetShaderHashForShaderInfo GetShaderHashForShaderInfo = nullptr;
80 PFN_GFSDK_Aftermath_GpuCrashDump_GenerateJSON GenerateJSON = nullptr;
81 PFN_GFSDK_Aftermath_GpuCrashDump_GetJSON GetJSON = nullptr;
82
83 bool load(const std::wstring& path) {
84 module = path.find_first_of(L"\\/") != std::wstring::npos
85 ? LoadLibraryExW(path.c_str(), nullptr, LOAD_WITH_ALTERED_SEARCH_PATH)
86 : LoadLibraryW(path.c_str());
87 if (!module) return false;
88 bool ok = true;
89 const auto get = [&](auto& fn, const char* name) {
90 fn = reinterpret_cast<std::remove_reference_t<decltype(fn)>>(GetProcAddress(module, name));
91 if (!fn) {
92 std::fprintf(stderr, "[rt] aftermath: %s is missing from the library\n", name);
93 ok = false;
94 }
95 };
96 get(EnableGpuCrashDumps, "GFSDK_Aftermath_EnableGpuCrashDumps");
97 get(GetCrashDumpStatus, "GFSDK_Aftermath_GetCrashDumpStatus");
98 get(GetShaderHashSpirv, "GFSDK_Aftermath_GetShaderHashSpirv");
99 get(GetShaderDebugInfoIdentifier, "GFSDK_Aftermath_GetShaderDebugInfoIdentifier");
100 get(CreateDecoder, "GFSDK_Aftermath_GpuCrashDump_CreateDecoder");
101 get(DestroyDecoder, "GFSDK_Aftermath_GpuCrashDump_DestroyDecoder");
102 get(GetBaseInfo, "GFSDK_Aftermath_GpuCrashDump_GetBaseInfo");
103 get(GetDeviceInfo, "GFSDK_Aftermath_GpuCrashDump_GetDeviceInfo");
104 get(GetPageFaultInfo, "GFSDK_Aftermath_GpuCrashDump_GetPageFaultInfo");
105 get(GetPageFaultResourceInfo, "GFSDK_Aftermath_GpuCrashDump_GetPageFaultResourceInfo");
106 get(GetActiveShadersInfoCount, "GFSDK_Aftermath_GpuCrashDump_GetActiveShadersInfoCount");
107 get(GetActiveShadersInfo, "GFSDK_Aftermath_GpuCrashDump_GetActiveShadersInfo");
108 get(GetShaderHashForShaderInfo, "GFSDK_Aftermath_GetShaderHashForShaderInfo");
109 get(GenerateJSON, "GFSDK_Aftermath_GpuCrashDump_GenerateJSON");
110 get(GetJSON, "GFSDK_Aftermath_GpuCrashDump_GetJSON");
111 return ok;
112 }
113};
114
115struct Shader {
116 std::string name;
117 std::vector<std::uint32_t> words; // only with LEONIDA_AFTERMATH_KEEP_SPIRV=1
118};
119
120struct State {
121 Library lib;
122 std::filesystem::path dir;
123 std::filesystem::path shader_dir; // LEONIDA_SHADERS: where a module's SPIR-V is read back for the decoder
124 bool keep_spirv = false;
125 VkDeviceDiagnosticsConfigFlagsNV extra_flags = 0;
126 std::atomic<bool> enabled{false};
127 std::atomic<PFN_vkCreateShaderModule> real_create{nullptr};
128 std::atomic<PFN_vkGetDeviceProcAddr> real_get{nullptr};
129
130 std::mutex shaders_mutex; // leaf
131 std::unordered_map<std::uint64_t, Shader> shaders;
132 std::atomic<std::uint64_t> registered{0}, hash_failures{0};
133
134 std::mutex debug_mutex; // leaf
135 std::map<std::pair<std::uint64_t, std::uint64_t>, std::vector<std::uint8_t>> debug_info;
136
137 std::mutex dump_mutex; // leaf, guards everything below
138 std::condition_variable dump_cv;
139 std::vector<std::uint8_t> dump;
140 std::filesystem::path dump_path;
141 bool have_dump = false, decoded = false;
142 std::string summary;
143
144 std::mutex wait_mutex; // held by the first device-loss waiter; later ones queue behind it
145 bool waited = false;
146};
147
148State& state() {
149 static State* s = new State; // never destroyed: Aftermath's threads may call back during exit
150 return *s;
151}
152
153std::string hex64(std::uint64_t v) {
154 char buffer[24];
155 std::snprintf(buffer, sizeof buffer, "%016" PRIx64, v);
156 return buffer;
157}
158
159std::string stamp() {
160 SYSTEMTIME t{};
161 GetLocalTime(&t);
162 char buffer[64];
163 std::snprintf(buffer, sizeof buffer, "%04u%02u%02u-%02u%02u%02u-%03u-pid%lu", t.wYear, t.wMonth, t.wDay, t.wHour,
164 t.wMinute, t.wSecond, t.wMilliseconds, GetCurrentProcessId());
165 return buffer;
166}
167
168bool write_file(const std::filesystem::path& path, const void* data, std::size_t size) {
169 std::error_code ec;
170 std::filesystem::create_directories(path.parent_path(), ec);
171 std::ofstream out(path, std::ios::binary | std::ios::trunc);
172 out.write(static_cast<const char*>(data), std::streamsize(size));
173 return bool(out);
174}
175
176std::uint64_t spirv_hash(const void* code, std::size_t bytes) {
177 State& s = state();
178 GFSDK_Aftermath_SpirvCode spirv{};
179 spirv.pData = code;
180 spirv.size = std::uint32_t(bytes);
181 GFSDK_Aftermath_ShaderBinaryHash hash{};
182 if (!GFSDK_Aftermath_SUCCEED(s.lib.GetShaderHashSpirv(GFSDK_Aftermath_Version_API, &spirv, &hash))) return 0;
183 return hash.hash;
184}
185
186const char* status_name(GFSDK_Aftermath_Device_Status status) {
187 switch (status) {
188 case GFSDK_Aftermath_Device_Status_Active: return "Active";
189 case GFSDK_Aftermath_Device_Status_Timeout: return "Timeout";
190 case GFSDK_Aftermath_Device_Status_OutOfMemory: return "OutOfMemory";
191 case GFSDK_Aftermath_Device_Status_PageFault: return "PageFault";
192 case GFSDK_Aftermath_Device_Status_Stopped: return "Stopped";
193 case GFSDK_Aftermath_Device_Status_Reset: return "Reset";
194 case GFSDK_Aftermath_Device_Status_DmaFault: return "DmaFault";
195 case GFSDK_Aftermath_Device_Status_DeviceRemovedNoGpuFault: return "DeviceRemovedNoGpuFault";
196 default: return "Unknown";
197 }
198}
199
200const char* fault_name(GFSDK_Aftermath_FaultType type) {
201 switch (type) {
202 case GFSDK_Aftermath_FaultType_AddressTranslationError: return "AddressTranslationError";
203 case GFSDK_Aftermath_FaultType_IllegalAccessError: return "IllegalAccessError";
204 default: return "Unknown";
205 }
206}
207
208const char* access_name(GFSDK_Aftermath_AccessType type) {
209 switch (type) {
210 case GFSDK_Aftermath_AccessType_Read: return "Read";
211 case GFSDK_Aftermath_AccessType_Write: return "Write";
212 case GFSDK_Aftermath_AccessType_Atomic: return "Atomic";
213 default: return "Unknown";
214 }
215}
216
217const char* engine_name(GFSDK_Aftermath_Engine engine) {
218 switch (engine) {
219 case GFSDK_Aftermath_Engine_Graphics: return "Graphics";
220 case GFSDK_Aftermath_Engine_GraphicsCompute: return "GraphicsCompute";
221 case GFSDK_Aftermath_Engine_Display: return "Display";
222 case GFSDK_Aftermath_Engine_CopyEngine: return "CopyEngine";
223 case GFSDK_Aftermath_Engine_VideoDecoder: return "VideoDecoder";
224 case GFSDK_Aftermath_Engine_VideoEncoder: return "VideoEncoder";
225 case GFSDK_Aftermath_Engine_Other: return "Other";
226 default: return "Unknown";
227 }
228}
229
230const char* client_name(GFSDK_Aftermath_Client client) {
231 switch (client) {
232 case GFSDK_Aftermath_Client_HostInterface: return "HostInterface";
233 case GFSDK_Aftermath_Client_FrontEnd: return "FrontEnd";
234 case GFSDK_Aftermath_Client_PrimitiveDistributor: return "PrimitiveDistributor";
235 case GFSDK_Aftermath_Client_GraphicsProcessingCluster: return "GraphicsProcessingCluster";
236 case GFSDK_Aftermath_Client_PolymorphEngine: return "PolymorphEngine";
237 case GFSDK_Aftermath_Client_RasterEngine: return "RasterEngine";
238 case GFSDK_Aftermath_Client_Rasterizer2D: return "Rasterizer2D";
239 case GFSDK_Aftermath_Client_RenderOutputUnit: return "RenderOutputUnit";
240 case GFSDK_Aftermath_Client_TextureProcessingCluster: return "TextureProcessingCluster";
241 case GFSDK_Aftermath_Client_CopyEngine: return "CopyEngine";
242 case GFSDK_Aftermath_Client_VideoDecoder: return "VideoDecoder";
243 case GFSDK_Aftermath_Client_VideoEncoder: return "VideoEncoder";
244 case GFSDK_Aftermath_Client_Other: return "Other";
245 default: return "Unknown";
246 }
247}
248
249const char* shader_type_name(GFSDK_Aftermath_ShaderType type) {
250 switch (type) {
251 case GFSDK_Aftermath_ShaderType_Vertex: return "vertex";
252 case GFSDK_Aftermath_ShaderType_Tessellation_Control: return "hull";
253 case GFSDK_Aftermath_ShaderType_Tessellation_Evaluation: return "domain";
254 case GFSDK_Aftermath_ShaderType_Geometry: return "geometry";
255 case GFSDK_Aftermath_ShaderType_Fragment: return "pixel";
256 case GFSDK_Aftermath_ShaderType_Compute: return "compute";
257 case GFSDK_Aftermath_ShaderType_Mesh: return "mesh";
258 case GFSDK_Aftermath_ShaderType_Task: return "task";
259 default: return type >= GFSDK_Aftermath_ShaderType_RayTracing_RayGeneration &&
260 type <= GFSDK_Aftermath_ShaderType_RayTracing_Internal
261 ? "ray tracing"
262 : "unknown";
263 }
264}
265
266const char* residency_name(GFSDK_Aftermath_ResourceResidency residency) {
267 switch (residency) {
268 case GFSDK_Aftermath_ResourceResidency_FullyResident: return "resident";
269 case GFSDK_Aftermath_ResourceResidency_Evicted: return "evicted";
270 case GFSDK_Aftermath_ResourceResidency_MemoryFreed: return "memory freed";
271 case GFSDK_Aftermath_ResourceResidency_MemoryUnbound: return "memory unbound";
272 default: return "unknown";
273 }
274}
275
276std::string shader_name(std::uint64_t hash) {
277 State& s = state();
278 std::lock_guard lock(s.shaders_mutex);
279 const auto it = s.shaders.find(hash);
280 return it == s.shaders.end() ? "unregistered" : it->second.name;
281}
282
283// ---- decoding ----
284
285struct DecodeContext {
286 std::map<std::uint64_t, std::vector<std::uint32_t>> binaries; // alive until the decoder is destroyed
287 std::vector<std::string> written;
288};
289
290// The module's SPIR-V for the decoder: the kept copy, else <LEONIDA_SHADERS>/<name>.spv when its hash matches (a
291// patched module, such as a depth24 pixel shader, does not).
292std::vector<std::uint32_t> find_binary(std::uint64_t hash) {
293 State& s = state();
294 std::string name;
295 {
296 std::lock_guard lock(s.shaders_mutex);
297 const auto it = s.shaders.find(hash);
298 if (it == s.shaders.end()) return {};
299 if (!it->second.words.empty()) return it->second.words;
300 name = it->second.name;
301 }
302 if (s.shader_dir.empty() || name.empty() || name.front() == '(') return {};
303 const std::filesystem::path path = s.shader_dir / from_utf8(name + ".spv");
304 std::ifstream file(path, std::ios::binary | std::ios::ate);
305 if (!file) return {};
306 const auto size = std::size_t(file.tellg());
307 if (!size || size % 4 || size > (256u << 20)) return {};
308 std::vector<std::uint32_t> words(size / 4);
309 file.seekg(0);
310 file.read(reinterpret_cast<char*>(words.data()), std::streamsize(size));
311 if (!file || spirv_hash(words.data(), size) != hash) return {};
312 return words;
313}
314
315void GFSDK_AFTERMATH_CALL lookup_debug_info(const GFSDK_Aftermath_ShaderDebugInfoIdentifier* id,
316 PFN_GFSDK_Aftermath_SetData set, void*) {
317 State& s = state();
318 std::lock_guard lock(s.debug_mutex);
319 const auto it = s.debug_info.find({id->id[0], id->id[1]});
320 if (it != s.debug_info.end()) set(it->second.data(), std::uint32_t(it->second.size()));
321}
322
323void GFSDK_AFTERMATH_CALL lookup_shader(const GFSDK_Aftermath_ShaderBinaryHash* hash, PFN_GFSDK_Aftermath_SetData set,
324 void* user) {
325 auto& context = *static_cast<DecodeContext*>(user);
326 auto it = context.binaries.find(hash->hash);
327 if (it == context.binaries.end()) {
328 it = context.binaries.emplace(hash->hash, find_binary(hash->hash)).first;
329 if (!it->second.empty()) {
330 // Next to the dump, for nv-aftermath-format -b <dir> and Nsight Graphics.
331 const auto path = state().dir / (hex64(hash->hash) + ".spv");
332 if (write_file(path, it->second.data(), it->second.size() * 4)) context.written.push_back(narrow(path));
333 }
334 }
335 if (!it->second.empty()) set(it->second.data(), std::uint32_t(it->second.size() * 4));
336}
337
338std::string lower(std::string_view text) {
339 std::string out(text);
340 for (char& c : out) c = char(std::tolower(static_cast<unsigned char>(c)));
341 return out;
342}
343
344std::string scalar(const Json& value) {
345 switch (value.kind) {
346 case Json::Kind::string: return value.string;
347 case Json::Kind::boolean: return value.boolean ? "true" : "false";
348 case Json::Kind::number: {
349 char buffer[32];
350 if (value.number >= 0 && value.number < 18446744073709551616.0 && value.number == double(std::uint64_t(value.number)))
351 std::snprintf(buffer, sizeof buffer, "%" PRIu64, std::uint64_t(value.number));
352 else
353 std::snprintf(buffer, sizeof buffer, "%g", value.number);
354 return buffer;
355 }
356 default: return {};
357 }
358}
359
360// One line per object: its scalar fields, and the scalars of objects nested one level down.
361std::string flatten(const Json& object) {
362 std::string out;
363 const auto add = [&out](std::string_view key, std::string value) {
364 for (char& c : value)
365 if (c == '\n' || c == '\r') c = ' ';
366 if (!value.empty()) out += (out.empty() ? "" : " ") + std::string(key) + "=" + value;
367 };
368 for (const auto& [key, value] : object.object) {
369 if (value.kind == Json::Kind::object)
370 for (const auto& [inner_key, inner] : value.object) add(key + "." + inner_key, scalar(inner));
371 else if (value.kind != Json::Kind::array)
372 add(key, scalar(value));
373 }
374 return out;
375}
376
377// The decoder writes 64-bit values (shader hashes, pointers) as JSON integers, which a double cannot hold. Every
378// unsigned integer literal of 16 or more digits is quoted, so it reaches the reader exactly, as a string.
379std::string quote_big_integers(std::string_view json) {
380 std::string out;
381 out.reserve(json.size() + 256);
382 bool in_string = false, escaped = false;
383 for (std::size_t i = 0; i < json.size();) {
384 const char c = json[i];
385 if (in_string) {
386 out += c;
387 ++i;
388 if (escaped) escaped = false;
389 else if (c == '\\') escaped = true;
390 else if (c == '"') in_string = false;
391 continue;
392 }
393 if (c == '"') {
394 in_string = true;
395 out += c;
396 ++i;
397 continue;
398 }
399 if (c >= '0' && c <= '9') {
400 std::size_t j = i;
401 while (j < json.size() && json[j] >= '0' && json[j] <= '9') ++j;
402 const bool integer = j == json.size() || (json[j] != '.' && json[j] != 'e' && json[j] != 'E');
403 const bool quote = integer && j - i >= 16 && (i == 0 || json[i - 1] != '-');
404 if (quote) out += '"';
405 out.append(json.substr(i, j - i));
406 if (quote) out += '"';
407 i = j;
408 continue;
409 }
410 out += c;
411 ++i;
412 }
413 return out;
414}
415
416const Json* field(const Json& object, std::string_view needle) {
417 for (const auto& [key, value] : object.object)
418 if (lower(key).find(needle) != std::string::npos) return &value;
419 return nullptr;
420}
421
422// Records under a key naming warps ("Faulted Warps", "Active Warps"), and the shader table entries ("Shader infos":
423// objects with a "Shader name" and a "Shader hash"). The SDK does not specify the JSON layout; this is the one the
424// 2026.3 decoder writes, read loosely.
425void walk(const Json& node, std::string_view key, std::vector<std::pair<std::string, const Json*>>& warps,
426 std::map<std::string, std::uint64_t>& shader_hashes, int depth = 0) {
427 if (depth > 16) return;
428 if (node.kind == Json::Kind::array) {
429 if (lower(key).find("warp") != std::string::npos)
430 for (const Json& item : node.array)
431 if (item.kind == Json::Kind::object) warps.emplace_back(std::string(key), &item);
432 for (const Json& item : node.array) walk(item, key, warps, shader_hashes, depth + 1);
433 } else if (node.kind == Json::Kind::object) {
434 const Json* name = node.find("Shader name");
435 const Json* hash = node.find("Shader hash");
436 if (name && hash) shader_hashes[scalar(*name)] = std::strtoull(scalar(*hash).c_str(), nullptr, 0);
437 for (const auto& [k, v] : node.object) walk(v, k, warps, shader_hashes, depth + 1);
438 }
439}
440
441void decode_and_report() noexcept {
442 State& s = state();
443 std::vector<std::uint8_t> dump;
444 std::filesystem::path dump_path;
445 {
446 std::lock_guard lock(s.dump_mutex);
447 if (s.decoded || !s.have_dump) return;
448 dump = s.dump;
449 dump_path = s.dump_path;
450 }
451 std::string summary;
452 const auto line = [&summary](const char* format, auto... args) {
453 char buffer[1024];
454 std::snprintf(buffer, sizeof buffer, format, args...);
455 summary += "[rt] aftermath: ";
456 summary += buffer;
457 summary += '\n';
458 };
459 try {
460 GFSDK_Aftermath_GpuCrashDump_Decoder decoder = nullptr;
461 const auto created =
462 s.lib.CreateDecoder(GFSDK_Aftermath_Version_API, dump.data(), std::uint32_t(dump.size()), &decoder);
463 if (!GFSDK_Aftermath_SUCCEED(created)) {
464 line("GPU crash dump %s could not be decoded (0x%x)", narrow(dump_path).c_str(), unsigned(created));
465 } else {
466 GFSDK_Aftermath_GpuCrashDump_DeviceInfo device{};
467 const bool have_device = GFSDK_Aftermath_SUCCEED(s.lib.GetDeviceInfo(decoder, &device));
468 line("GPU crash dump %s (%zu bytes): device status %s, adapter reset %s, engine reset %s",
469 narrow(dump_path).c_str(), dump.size(), have_device ? status_name(device.status) : "unknown",
470 have_device && device.adapterReset ? "yes" : "no", have_device && device.engineReset ? "yes" : "no");
471
472 // Active shaders, by our module names.
473 std::uint32_t count = 0;
474 std::vector<GFSDK_Aftermath_GpuCrashDump_ShaderInfo> shaders;
475 if (GFSDK_Aftermath_SUCCEED(s.lib.GetActiveShadersInfoCount(decoder, &count)) && count) {
476 shaders.resize(count);
477 if (!GFSDK_Aftermath_SUCCEED(s.lib.GetActiveShadersInfo(decoder, count, shaders.data()))) shaders.clear();
478 }
479 struct Named {
480 std::string name; // our module name
481 std::string binary; // Aftermath shader binary hash, hex
482 };
483 std::unordered_map<std::uint64_t, Named> by_dump_hash; // ShaderInfo::shaderHash -> module
484 std::vector<std::string> active;
485 for (const auto& info : shaders) {
486 GFSDK_Aftermath_ShaderBinaryHash hash{};
487 const bool mapped = GFSDK_Aftermath_SUCCEED(s.lib.GetShaderHashForShaderInfo(decoder, &info, &hash));
488 const std::string name = info.isInternal ? "(driver internal)"
489 : mapped ? shader_name(hash.hash)
490 : "unmapped";
491 by_dump_hash[info.shaderHash] = {name, mapped ? hex64(hash.hash) : "-"};
492 char buffer[512];
493 std::snprintf(buffer, sizeof buffer, "%s %s hash=%s", shader_type_name(info.shaderType), name.c_str(),
494 mapped ? hex64(hash.hash).c_str() : "-");
495 active.emplace_back(buffer);
496 }
497
498 // Warps, from the JSON (the C API has no per-warp pc). Shader mapping info asks lookup_shader for binaries.
499 DecodeContext context;
500 std::uint32_t json_size = 0;
501 std::string json;
502 const auto generated = s.lib.GenerateJSON(
503 decoder, GFSDK_Aftermath_GpuCrashDumpDecoderFlags_ALL_INFO,
504 GFSDK_Aftermath_GpuCrashDumpFormatterFlags_UTF8_OUTPUT, lookup_debug_info, lookup_shader, nullptr,
505 &context, &json_size);
506 if (GFSDK_Aftermath_SUCCEED(generated) && json_size) {
507 json.resize(json_size);
508 if (!GFSDK_Aftermath_SUCCEED(s.lib.GetJSON(decoder, json_size, json.data()))) json.clear();
509 while (!json.empty() && json.back() == '\0') json.pop_back();
510 }
511 std::filesystem::path json_path = dump_path;
512 json_path.replace_extension(".json");
513 if (!json.empty()) write_file(json_path, json.data(), json.size());
514
515 Json root;
516 std::vector<std::pair<std::string, const Json*>> warps;
517 std::map<std::string, std::uint64_t> shader_hashes; // the dump's shader name ("compute_02") -> dump hash
518 if (!json.empty() && JsonReader(quote_big_integers(json)).parse(root))
519 walk(root, {}, warps, shader_hashes);
520 std::stable_partition(warps.begin(), warps.end(),
521 [](const auto& warp) { return lower(warp.first).find("fault") != std::string::npos; });
522 if (warps.empty()) line("no warp records in the dump (%s)", json.empty() ? "no JSON" : "see the JSON");
523 std::size_t shown = 0;
524 for (const auto& [key, warp] : warps) {
525 if (shown++ == 16) {
526 line("... %zu more warp records in %s", warps.size() - 16, narrow(json_path).c_str());
527 break;
528 }
529 // "GPU PC Address": "<dump shader name> @ 0x<pc>", the name keyed in the shader table.
530 const Json* pc_field = field(*warp, "pc address");
531 const std::string address = pc_field ? scalar(*pc_field) : std::string();
532 const auto at = address.find(" @ ");
533 const std::string dump_name = at == std::string::npos ? address : address.substr(0, at);
534 const std::string pc = at == std::string::npos ? "?" : address.substr(at + 3);
535 Named module{"?", "-"};
536 if (const auto h = shader_hashes.find(dump_name); h != shader_hashes.end())
537 if (const auto m = by_dump_hash.find(h->second); m != by_dump_hash.end()) module = m->second;
538 const Json* mapping = field(*warp, "mapping");
539 const Json* warp_count = field(*warp, "count");
540 const Json* fault_name = field(*warp, "fault name");
541 const bool faulted = lower(key).find("fault") != std::string::npos;
542 if (!pc_field) {
543 line("%s: %s", key.c_str(), flatten(*warp).c_str());
544 } else if (faulted) {
545 line("faulting shader %s (hash %s, %s) pc %s spirv %s: %s", module.name.c_str(),
546 module.binary.c_str(), dump_name.c_str(), pc.c_str(),
547 mapping ? scalar(*mapping).c_str() : "-", fault_name ? scalar(*fault_name).c_str() : key.c_str());
548 } else {
549 line("%s: shader %s (hash %s, %s) pc %s spirv %s warps %s", key.c_str(), module.name.c_str(),
550 module.binary.c_str(), dump_name.c_str(), pc.c_str(),
551 mapping ? scalar(*mapping).c_str() : "-", warp_count ? scalar(*warp_count).c_str() : "?");
552 }
553 }
554
555 GFSDK_Aftermath_GpuCrashDump_PageFaultInfo fault{};
556 if (GFSDK_Aftermath_SUCCEED(s.lib.GetPageFaultInfo(decoder, &fault))) {
557 line("page fault va=0x%016" PRIx64 " fault=%s access=%s engine=%s client=%s resources=%u",
558 fault.faultingGpuVA, fault_name(fault.faultType), access_name(fault.accessType),
559 engine_name(fault.engine), client_name(fault.client), fault.resourceInfoCount);
560 std::vector<GFSDK_Aftermath_GpuCrashDump_ResourceInfo> resources(fault.resourceInfoCount);
561 if (!resources.empty() &&
562 GFSDK_Aftermath_SUCCEED(s.lib.GetPageFaultResourceInfo(decoder, fault.resourceInfoCount,
563 resources.data())))
564 for (std::size_t i = 0; i < resources.size(); ++i) {
565 const auto& r = resources[i];
566 line("page fault resource[%zu] va=0x%016" PRIx64 " size=0x%" PRIx64
567 " %ux%ux%u mips=%u format=%u handle=0x%016" PRIx64
568 " name=\"%s\" %s%s%s%s",
569 i, r.gpuVa, r.size, r.width, r.height, r.depth, r.mipLevels, r.format, r.apiResource,
570 r.debugName, residency_name(r.residency), r.bWasDestroyed ? ", destroyed" : "",
571 r.bPlacedResource ? ", placed" : "", r.bIsBufferHeap ? ", buffer heap" : "");
572 }
573 } else {
574 line("no page fault information in the dump");
575 }
576 for (std::size_t i = 0; i < active.size(); ++i) line("active shader[%zu] %s", i, active[i].c_str());
577 {
578 // The hash -> name table next to the dump, for matching it offline (nv-aftermath-format, Nsight).
579 std::string table;
580 std::lock_guard lock(s.shaders_mutex);
581 for (const auto& [hash, shader] : s.shaders) table += hex64(hash) + '\t' + shader.name + '\n';
582 std::filesystem::path table_path = dump_path;
583 table_path.replace_extension(".shaders.tsv");
584 const bool table_written = write_file(table_path, table.data(), table.size());
585 line("%llu SPIR-V modules registered (%zu distinct, table %s), %llu not hashed",
586 static_cast<unsigned long long>(s.registered.load()), s.shaders.size(),
587 table_written ? narrow(table_path).c_str() : "not written",
588 static_cast<unsigned long long>(s.hash_failures.load()));
589 }
590 for (const auto& path : context.written) line("wrote %s", path.c_str());
591 if (!json.empty()) line("decoded JSON %s", narrow(json_path).c_str());
592 s.lib.DestroyDecoder(decoder);
593 }
594 } catch (...) {
595 line("decoding failed");
596 }
597 std::fputs(summary.c_str(), stderr);
598 std::fflush(stderr);
599 std::lock_guard lock(s.dump_mutex);
600 s.summary = std::move(summary);
601 s.decoded = true;
602 s.dump_cv.notify_all();
603}
604
605// ---- callbacks (free-threaded, on Aftermath's threads) ----
606
607void GFSDK_AFTERMATH_CALL on_crash_dump(const void* data, const std::uint32_t size, void*) {
608 State& s = state();
609 const auto path = s.dir / (stamp() + ".nv-gpudmp");
610 const bool written = write_file(path, data, size);
611 std::fprintf(stderr, "[rt] aftermath: GPU crash dump, %u bytes%s %s\n", size, written ? " written to" : ", cannot write",
612 narrow(path).c_str());
613 {
614 std::lock_guard lock(s.dump_mutex);
615 if (s.have_dump) return; // one decode per process: the first crash is the one that matters
616 const auto bytes = static_cast<const std::uint8_t*>(data);
617 s.dump.assign(bytes, bytes + size);
618 s.dump_path = path;
619 s.have_dump = true;
620 }
621 // Decode once Aftermath is done (the deferred shader debug info callbacks may still follow this one).
622 std::thread([] {
623 State& st = state();
624 const auto start = Clock::now();
625 for (;;) {
626 GFSDK_Aftermath_CrashDump_Status status = GFSDK_Aftermath_CrashDump_Status_Unknown;
627 st.lib.GetCrashDumpStatus(&status);
628 if (status == GFSDK_Aftermath_CrashDump_Status_Finished ||
629 status == GFSDK_Aftermath_CrashDump_Status_CollectingDataFailed ||
630 status == GFSDK_Aftermath_CrashDump_Status_NotStarted || Clock::now() - start > std::chrono::seconds(5))
631 break;
632 std::this_thread::sleep_for(std::chrono::milliseconds(20));
633 }
634 decode_and_report();
635 }).detach();
636}
637
638void GFSDK_AFTERMATH_CALL on_shader_debug_info(const void* data, const std::uint32_t size, void*) {
639 State& s = state();
640 GFSDK_Aftermath_ShaderDebugInfoIdentifier id{};
641 if (!GFSDK_Aftermath_SUCCEED(s.lib.GetShaderDebugInfoIdentifier(GFSDK_Aftermath_Version_API, data, size, &id)))
642 return;
643 write_file(s.dir / ("shader-" + hex64(id.id[0]) + "-" + hex64(id.id[1]) + ".nvdbg"), data, size);
644 const auto bytes = static_cast<const std::uint8_t*>(data);
645 std::lock_guard lock(s.debug_mutex);
646 s.debug_info[{id.id[0], id.id[1]}].assign(bytes, bytes + size);
647}
648
649void GFSDK_AFTERMATH_CALL on_description(PFN_GFSDK_Aftermath_AddGpuCrashDumpDescription add, void*) {
650 add(GFSDK_Aftermath_GpuCrashDumpDescriptionKey_ApplicationName, "Leonida gta6rt");
651 add(GFSDK_Aftermath_GpuCrashDumpDescriptionKey_ApplicationVersion, LEONIDA_AFTERMATH_APP_VERSION);
652}
653
654VKAPI_ATTR VkResult VKAPI_CALL create_shader_module(VkDevice device, const VkShaderModuleCreateInfo* info,
655 const VkAllocationCallbacks* allocator, VkShaderModule* module) {
656 const VkResult result = state().real_create.load(std::memory_order_relaxed)(device, info, allocator, module);
657 if (result == VK_SUCCESS && info) register_spirv(info->pCode, info->codeSize, detail::shader_name);
658 return result;
659}
660
661VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL get_device_proc_addr(VkDevice device, const char* name) {
662 const PFN_vkVoidFunction function = state().real_get.load(std::memory_order_relaxed)(device, name);
663 if (!function || !name || std::strcmp(name, "vkCreateShaderModule") != 0) return function;
664 return reinterpret_cast<PFN_vkVoidFunction>(
665 wrap_create_shader_module(reinterpret_cast<PFN_vkCreateShaderModule>(function)));
666}
667
668void device_lost() noexcept { wait_for_dump(); }
669
670} // namespace
671
672bool available() noexcept { return true; }
673
674bool enable() noexcept {
675 static const bool on = []() noexcept {
676 if (!env_is(L"LEONIDA_AFTERMATH", L'1')) return false;
677 try {
678 State& s = state();
679 std::wstring dll = env_w(L"LEONIDA_AFTERMATH_DLL");
680 if (dll.empty()) {
681 const std::filesystem::path built = from_utf8(LEONIDA_AFTERMATH_DLL_DEFAULT);
682 std::error_code ec;
683 dll = !built.empty() && std::filesystem::exists(built, ec) ? built.wstring()
684 : L"GFSDK_Aftermath_Lib.x64.dll";
685 }
686 if (!s.lib.load(dll)) {
687 std::fprintf(stderr, "[rt] aftermath: cannot load %s (error %lu); crash dumps are off\n",
688 narrow(dll).c_str(), GetLastError());
689 return false;
690 }
691 const std::wstring dir = env_w(L"LEONIDA_AFTERMATH_DIR");
692 s.dir = dir.empty() ? std::filesystem::temp_directory_path() / L"leonida-aftermath" : std::filesystem::path(dir);
693 std::error_code ec;
694 std::filesystem::create_directories(s.dir, ec);
695 s.shader_dir = env_w(L"LEONIDA_SHADERS");
696 s.keep_spirv = env_is(L"LEONIDA_AFTERMATH_KEEP_SPIRV", L'1');
697 if (env_is(L"LEONIDA_AFTERMATH_SHADER_ERRORS", L'1'))
698 s.extra_flags |= VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV;
699 const auto result = s.lib.EnableGpuCrashDumps(
700 GFSDK_Aftermath_Version_API, GFSDK_Aftermath_GpuCrashDumpWatchedApiFlags_Vulkan,
701 GFSDK_Aftermath_GpuCrashDumpFeatureFlags_DeferDebugInfoCallbacks, on_crash_dump, on_shader_debug_info,
702 on_description, nullptr, nullptr);
703 if (!GFSDK_Aftermath_SUCCEED(result)) {
704 std::fprintf(stderr, "[rt] aftermath: GFSDK_Aftermath_EnableGpuCrashDumps failed (0x%x)\n",
705 unsigned(result));
706 return false;
707 }
708 s.enabled.store(true, std::memory_order_release);
709 device_lost_hook.store(device_lost, std::memory_order_release);
710 std::fprintf(stderr, "[rt] aftermath: GPU crash dumps on (%s), written to %s%s\n", narrow(dll).c_str(),
711 narrow(s.dir).c_str(), s.keep_spirv ? ", SPIR-V kept" : "");
712 return true;
713 } catch (...) {
714 std::fprintf(stderr, "[rt] aftermath: setup failed\n");
715 return false;
716 }
717 }();
718 return on;
719}
720
721bool enabled() noexcept { return state().enabled.load(std::memory_order_acquire); }
722
723VkDeviceDiagnosticsConfigFlagsNV extra_config_flags() noexcept { return enabled() ? state().extra_flags : 0; }
724
725PFN_vkCreateShaderModule wrap_create_shader_module(PFN_vkCreateShaderModule real) noexcept {
726 if (!enabled() || !real || real == create_shader_module) return real;
727 PFN_vkCreateShaderModule expected = nullptr;
728 State& s = state();
729 if (!s.real_create.compare_exchange_strong(expected, real) && expected != real) return real;
730 return create_shader_module;
731}
732
733PFN_vkGetDeviceProcAddr wrap_get_device_proc_addr(PFN_vkGetDeviceProcAddr real) noexcept {
734 if (!enabled() || !real || real == get_device_proc_addr) return real;
735 PFN_vkGetDeviceProcAddr expected = nullptr;
736 State& s = state();
737 if (!s.real_get.compare_exchange_strong(expected, real) && expected != real) return real;
738 return get_device_proc_addr;
739}
740
741void register_spirv(const void* code, std::size_t bytes, const char* name) noexcept {
742 if (!enabled() || !code || !bytes) return;
743 try {
744 State& s = state();
745 const std::uint64_t hash = spirv_hash(code, bytes);
746 if (!hash) {
747 s.hash_failures.fetch_add(1, std::memory_order_relaxed);
748 return;
749 }
750 s.registered.fetch_add(1, std::memory_order_relaxed);
751 std::vector<std::uint32_t> words;
752 // The runtime's own modules are few and small, and not in LEONIDA_SHADERS: always kept for the decoder.
753 if (s.keep_spirv || (name && std::strncmp(name, "(runtime)", 9) == 0)) {
754 const auto first = static_cast<const std::uint32_t*>(code);
755 words.assign(first, first + bytes / 4);
756 }
757 std::lock_guard lock(s.shaders_mutex);
758 auto& shader = s.shaders[hash];
759 if (shader.name.empty() || name) shader.name = name ? name : "(runtime)";
760 if (!words.empty()) shader.words = std::move(words);
761 } catch (...) {
762 }
763}
764
765void wait_for_dump() noexcept {
766 if (!enabled()) return;
767 State& s = state();
768 std::lock_guard wait(s.wait_mutex);
769 if (s.waited) return;
770 s.waited = true;
771 std::fprintf(stderr, "[rt] aftermath: device lost, waiting for the GPU crash dump (at most %lld s)\n",
772 static_cast<long long>(wait_limit.count()));
773 const auto deadline = Clock::now() + wait_limit;
774 GFSDK_Aftermath_CrashDump_Status status = GFSDK_Aftermath_CrashDump_Status_Unknown;
775 for (;;) {
776 {
777 std::unique_lock lock(s.dump_mutex);
778 if (s.dump_cv.wait_for(lock, std::chrono::milliseconds(50), [&s] { return s.decoded; })) break;
779 if (Clock::now() >= deadline) break;
780 if (status == GFSDK_Aftermath_CrashDump_Status_Finished && !s.have_dump) break;
781 }
782 s.lib.GetCrashDumpStatus(&status);
783 if (status == GFSDK_Aftermath_CrashDump_Status_CollectingDataFailed) break;
784 }
785 std::lock_guard lock(s.dump_mutex);
786 if (!s.decoded)
787 std::fprintf(stderr, "[rt] aftermath: no GPU crash dump after the wait (status %u%s)\n", unsigned(status),
788 s.have_dump ? ", dump written but not decoded yet" : "");
789}
790
791std::string last_dump_path() {
792 State& s = state();
793 std::lock_guard lock(s.dump_mutex);
794 return s.have_dump ? narrow(s.dump_path) : std::string();
795}
796
797std::string last_summary() {
798 State& s = state();
799 std::lock_guard lock(s.dump_mutex);
800 return s.summary;
801}
802
803} // namespace leonida::aftermath
804
805#else // !LEONIDA_HAVE_AFTERMATH
806
807namespace leonida::aftermath {
808
809bool available() noexcept { return false; }
810bool enable() noexcept { return false; }
811bool enabled() noexcept { return false; }
812VkDeviceDiagnosticsConfigFlagsNV extra_config_flags() noexcept { return 0; }
813PFN_vkCreateShaderModule wrap_create_shader_module(PFN_vkCreateShaderModule real) noexcept { return real; }
814PFN_vkGetDeviceProcAddr wrap_get_device_proc_addr(PFN_vkGetDeviceProcAddr real) noexcept { return real; }
815void register_spirv(const void*, std::size_t, const char*) noexcept {}
816void wait_for_dump() noexcept {}
817std::string last_dump_path() { return {}; }
818std::string last_summary() { return {}; }
819
820} // namespace leonida::aftermath
821
822#endif
diff --git a/runtime/src/vulkan_aftermath.h b/runtime/src/vulkan_aftermath.h
new file mode 100644
index 000000000..ebf95ed4d
--- /dev/null
+++ b/runtime/src/vulkan_aftermath.h
@@ -0,0 +1,77 @@
1#pragma once
2
3// Optional NVIDIA Nsight Aftermath GPU crash dumps (LEONIDA_AFTERMATH=1). The SDK is never part of the build unless
4// CMake is given -DLEONIDA_AFTERMATH_SDK=<dir>; then vulkan_aftermath.cpp is compiled with LEONIDA_HAVE_AFTERMATH and
5// loads GFSDK_Aftermath_Lib.x64.dll at run time (LEONIDA_AFTERMATH_DLL, else the SDK's lib/x64, else the DLL search
6// path). Without the SDK, or without the DLL or an NVIDIA driver, every function here does nothing.
7//
8// Environment:
9// LEONIDA_AFTERMATH=1 enable GPU crash dumps for the Vulkan device (before vkCreateDevice)
10// LEONIDA_AFTERMATH_DIR=<dir> where dumps go (default leonida-aftermath under the system temp directory): <stamp>.nv-gpudmp, the decoded
11// <stamp>.json, shader-<id>.nvdbg debug info, and <hash>.spv for the active shaders
12// LEONIDA_AFTERMATH_DLL=<file> the Aftermath library to load
13// LEONIDA_AFTERMATH_SHADER_ERRORS=1 also set VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV
14// (reports more shader errors, so it can fault where a run does not)
15// LEONIDA_AFTERMATH_KEEP_SPIRV=1 keep a copy of every SPIR-V module created, for the decoder (it needs the binary
16// to map a pc to a SPIR-V instruction). Off by default, as the game creates GBs of
17// them: the decoder then reads <LEONIDA_SHADERS>/<name>.spv back when its hash
18// matches the module's (true for unpatched library shaders)
19
20#include <vulkan/vulkan.h>
21
22#include <cstddef>
23#include <cstdint>
24#include <string>
25
26namespace leonida::aftermath {
27
28// True when this build has the Aftermath integration (LEONIDA_HAVE_AFTERMATH).
29bool available() noexcept;
30
31// LEONIDA_AFTERMATH=1: loads the library and calls GFSDK_Aftermath_EnableGpuCrashDumps for Vulkan. Must run before
32// vkCreateDevice. The first call decides; returns whether crash dumps are enabled. Also installs the device-lost hook
33// of vulkan_device_fault.h.
34bool enable() noexcept;
35bool enabled() noexcept;
36
37// VK_NV_device_diagnostics_config flags to add to the device-fault defaults (shader debug info, resource tracking,
38// automatic checkpoints), 0 when Aftermath is off.
39VkDeviceDiagnosticsConfigFlagsNV extra_config_flags() noexcept;
40
41// Returns a vkCreateShaderModule that also records the module's Aftermath shader hash under the name in
42// ShaderName, or `real` itself when Aftermath is off. Process-wide: the first `real` wins.
43PFN_vkCreateShaderModule wrap_create_shader_module(PFN_vkCreateShaderModule real) noexcept;
44
45// Returns a vkGetDeviceProcAddr that hands out the wrapper above for "vkCreateShaderModule", so every function table
46// loaded through it (the runtime's helpers load their own) records its modules; `real` itself when Aftermath is off.
47PFN_vkGetDeviceProcAddr wrap_get_device_proc_addr(PFN_vkGetDeviceProcAddr real) noexcept;
48
49// Records a SPIR-V module created outside the wrapper.
50void register_spirv(const void* code, std::size_t bytes, const char* name) noexcept;
51
52// Blocks until Aftermath has written and decoded the GPU crash dump, at most ~10 s. Any thread, any number of times:
53// the first device loss waits, later calls return at once (or wait for the first one to finish).
54void wait_for_dump() noexcept;
55
56// For tests: the last dump written and the summary printed for it (empty before a dump).
57std::string last_dump_path();
58std::string last_summary();
59
60namespace detail {
61inline thread_local const char* shader_name = nullptr;
62}
63
64// Names the shader modules this thread creates while it is in scope (the wrapper above reads it).
65class ShaderName {
66public:
67 explicit ShaderName(const char* name) noexcept : previous_(detail::shader_name) { detail::shader_name = name; }
68 explicit ShaderName(const std::string& name) noexcept : ShaderName(name.c_str()) {}
69 ~ShaderName() { detail::shader_name = previous_; }
70 ShaderName(const ShaderName&) = delete;
71 ShaderName& operator=(const ShaderName&) = delete;
72
73private:
74 const char* previous_;
75};
76
77} // namespace leonida::aftermath
diff --git a/runtime/src/vulkan_backend.h b/runtime/src/vulkan_backend.h
index ab6786a51..d0a863421 100644
--- a/runtime/src/vulkan_backend.h
+++ b/runtime/src/vulkan_backend.h
@@ -1,4 +1,5 @@
1#pragma once 1#pragma once
2#include "vulkan_gpu_labels.h"
2 3
3// The execution side of the D3D12 layer, without COM: the per-device Vulkan context (resources, layout tracker, 4// The execution side of the D3D12 layer, without COM: the per-device Vulkan context (resources, layout tracker,
4// image views), queues that execute command lists, and timeline-semaphore fences. The COM objects in 5// image views), queues that execute command lists, and timeline-semaphore fences. The COM objects in
@@ -11,17 +12,25 @@
11#endif 12#endif
12#include "binary_occlusion_spirv.h" 13#include "binary_occlusion_spirv.h"
13#include "buffer_va_index.h" 14#include "buffer_va_index.h"
15#include "image_memory.h"
14#include "occlusion_sum_spirv.h" 16#include "occlusion_sum_spirv.h"
17#include "pipeline_workers.h"
18#include "vulkan_aftermath.h"
15#include "queue_holds.h" 19#include "queue_holds.h"
16#include "retire_tickets.h" 20#include "retire_tickets.h"
17#include "statistics_sum_spirv.h" 21#include "statistics_sum_spirv.h"
18#include "vulkan13_features.h" 22#include "vulkan13_features.h"
19#include "vulkan_depth24.h" 23#include "vulkan_depth24.h"
24#include "vulkan_title_image_pool.h"
20#include "vulkan_indirect_dispatch_count.h" 25#include "vulkan_indirect_dispatch_count.h"
26#include "vulkan_indirect_clamp.h"
21#include "vulkan_scratch.h" 27#include "vulkan_scratch.h"
22#include "vulkan_replay.h" 28#include "vulkan_replay.h"
23#include "queue_families.h" 29#include "queue_families.h"
24#include "resource_tiling.h" 30#include "resource_tiling.h"
31#include "pipeline_profile.h"
32#include "submit_phases.h"
33#include "title_va_alias.h"
25#include "xdxr_build.h" 34#include "xdxr_build.h"
26 35
27#include <algorithm> 36#include <algorithm>
@@ -29,12 +38,14 @@
29#include <condition_variable> 38#include <condition_variable>
30#include <cstdint> 39#include <cstdint>
31#include <cstdio> 40#include <cstdio>
41#include <cstdlib>
32#include <cstring> 42#include <cstring>
33#include <deque> 43#include <deque>
34#include <functional> 44#include <functional>
35#include <map> 45#include <map>
36#include <memory> 46#include <memory>
37#include <mutex> 47#include <mutex>
48#include <chrono>
38#include <unordered_set> 49#include <unordered_set>
39#include <shared_mutex> 50#include <shared_mutex>
40#include <span> 51#include <span>
@@ -46,13 +57,24 @@
46 57
47namespace leonida { 58namespace leonida {
48 59
60// Which check of the queue's replay refused a batch ("ExecuteCommandLists failed: unsupported"), by source line,
61// the first time each one does. The batch is then not submitted at all.
62inline ReplayResult queue_unsupported(int line) {
63 static std::atomic<bool> seen[4096];
64 if (line < 0 || line >= 4096 || !seen[line].exchange(true, std::memory_order_relaxed))
65 std::fprintf(stderr, "[rt] d3d12: queue replay refused a batch at vulkan_backend.h:%d\n", line);
66 return ReplayResult::unsupported;
67}
68
49// A CPU-written Vulkan-address instance pointer array, kept until the submission that builds with it completes. 69// A CPU-written Vulkan-address instance pointer array, kept until the submission that builds with it completes.
50// Completed stages are pooled per queue and reused, so a per-frame TLAS build does not allocate memory each frame. 70// Completed stages are pooled per queue and reused, so a per-frame TLAS build does not allocate memory each frame.
71// The same stages carry the title-memory translation table of an XDXR TLAS build (VulkanQueue::stage_xdxr_table).
51struct KhrInstanceStage { 72struct KhrInstanceStage {
52 VkBuffer buffer = VK_NULL_HANDLE; 73 VkBuffer buffer = VK_NULL_HANDLE;
53 VkDeviceMemory memory = VK_NULL_HANDLE; 74 VkDeviceMemory memory = VK_NULL_HANDLE;
54 VkDeviceAddress address = 0; 75 VkDeviceAddress address = 0;
55 std::uint64_t size = 0; // bytes available in buffer, so a larger later list can be refused for a new stage 76 std::uint64_t size = 0; // bytes available in buffer, so a larger later list can be refused for a new stage
77 VkBufferUsageFlags usage = 0; // a pooled stage is reused only for the same usage
56}; 78};
57 79
58// One per-queue query pool of VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR, retained on the 80// One per-queue query pool of VK_QUERY_TYPE_ACCELERATION_STRUCTURE_COMPACTED_SIZE_KHR, retained on the
@@ -85,7 +107,7 @@ struct VulkanDeviceFunctions {
85 X(vkCmdClearAttachments) X(vkDeviceWaitIdle) X(vkCreateImage) X(vkDestroyImage) \ 107 X(vkCmdClearAttachments) X(vkDeviceWaitIdle) X(vkCreateImage) X(vkDestroyImage) \
86 X(vkGetImageMemoryRequirements) X(vkBindImageMemory) X(vkCreateBuffer) X(vkDestroyBuffer) \ 108 X(vkGetImageMemoryRequirements) X(vkBindImageMemory) X(vkCreateBuffer) X(vkDestroyBuffer) \
87 X(vkGetBufferMemoryRequirements) X(vkBindBufferMemory) X(vkAllocateMemory) X(vkFreeMemory) X(vkMapMemory) \ 109 X(vkGetBufferMemoryRequirements) X(vkBindBufferMemory) X(vkAllocateMemory) X(vkFreeMemory) X(vkMapMemory) \
88 X(vkUnmapMemory) X(vkCmdCopyBuffer) X(vkCmdCopyBufferToImage) X(vkCmdCopyImageToBuffer) X(vkCmdCopyImage) \ 110 X(vkUnmapMemory) X(vkCmdCopyBuffer) X(vkCmdCopyBufferToImage) X(vkCmdCopyImageToBuffer) X(vkCmdCopyImage) X(vkCmdBlitImage) \
89 X(vkCmdResolveImage) X(vkCmdFillBuffer) X(vkCmdUpdateBuffer) X(vkCreateSampler) X(vkDestroySampler) \ 111 X(vkCmdResolveImage) X(vkCmdFillBuffer) X(vkCmdUpdateBuffer) X(vkCreateSampler) X(vkDestroySampler) \
90 X(vkCmdBeginConditionalRenderingEXT) X(vkCmdEndConditionalRenderingEXT) X(vkCreateQueryPool) \ 112 X(vkCmdBeginConditionalRenderingEXT) X(vkCmdEndConditionalRenderingEXT) X(vkCreateQueryPool) \
91 X(vkDestroyQueryPool) X(vkCmdResetQueryPool) X(vkCmdBeginQuery) X(vkCmdEndQuery) X(vkCmdWriteTimestamp) \ 113 X(vkDestroyQueryPool) X(vkCmdResetQueryPool) X(vkCmdBeginQuery) X(vkCmdEndQuery) X(vkCmdWriteTimestamp) \
@@ -105,7 +127,7 @@ struct VulkanDeviceFunctions {
105 X(vkCmdSetPrimitiveTopology) X(vkCmdSetPrimitiveRestartEnable) X(vkCmdSetStencilReference) \ 127 X(vkCmdSetPrimitiveTopology) X(vkCmdSetPrimitiveRestartEnable) X(vkCmdSetStencilReference) \
106 X(vkCmdSetBlendConstants) X(vkCmdDraw) \ 128 X(vkCmdSetBlendConstants) X(vkCmdDraw) \
107 X(vkCmdDrawIndexed) X(vkCreateGraphicsPipelines) X(vkQueueBindSparse) X(vkGetImageSparseMemoryRequirements) \ 129 X(vkCmdDrawIndexed) X(vkCreateGraphicsPipelines) X(vkQueueBindSparse) X(vkGetImageSparseMemoryRequirements) \
108 X(vkCreatePipelineCache) X(vkDestroyPipelineCache) \ 130 X(vkCreatePipelineCache) X(vkDestroyPipelineCache) X(vkGetPipelineCacheData) X(vkMergePipelineCaches) \
109 X(vkCreateEvent) X(vkDestroyEvent) X(vkResetEvent) X(vkCmdSetEvent) X(vkCmdWaitEvents) X(vkCmdDrawMeshTasksEXT) \ 131 X(vkCreateEvent) X(vkDestroyEvent) X(vkResetEvent) X(vkCmdSetEvent) X(vkCmdWaitEvents) X(vkCmdDrawMeshTasksEXT) \
110 X(vkCreateRenderPass2) X(vkDestroyRenderPass) X(vkCreateFramebuffer) X(vkDestroyFramebuffer) \ 132 X(vkCreateRenderPass2) X(vkDestroyRenderPass) X(vkCreateFramebuffer) X(vkDestroyFramebuffer) \
111 X(vkCmdBeginRenderPass) X(vkCmdEndRenderPass) 133 X(vkCmdBeginRenderPass) X(vkCmdEndRenderPass)
@@ -353,6 +375,7 @@ private:
353 module.codeSize = code.size_bytes(); 375 module.codeSize = code.size_bytes();
354 module.pCode = code.data(); 376 module.pCode = code.data();
355 VkShaderModule shader = VK_NULL_HANDLE; 377 VkShaderModule shader = VK_NULL_HANDLE;
378 const aftermath::ShaderName aftermath_name("(runtime) occlusion resolve");
356 if (vk_.vkCreateShaderModule(device_, &module, nullptr, &shader) != VK_SUCCESS) return false; 379 if (vk_.vkCreateShaderModule(device_, &module, nullptr, &shader) != VK_SUCCESS) return false;
357 VkComputePipelineCreateInfo pipeline{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO}; 380 VkComputePipelineCreateInfo pipeline{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO};
358 pipeline.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, nullptr, 0, 381 pipeline.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, nullptr, 0,
@@ -426,6 +449,7 @@ private:
426}; 449};
427 450
428struct SparseResource; 451struct SparseResource;
452using ImageMemory = ImageMemoryPool<VkDeviceMemory>;
429 453
430// Zero-allocation O(1) Ring Buffer deferred deletion queue tied to the device timeline semaphore. 454// Zero-allocation O(1) Ring Buffer deferred deletion queue tied to the device timeline semaphore.
431class DeferredDeletionQueue { 455class DeferredDeletionQueue {
@@ -435,8 +459,10 @@ public:
435 image_view, 459 image_view,
436 image, 460 image,
437 sparse_resource, 461 sparse_resource,
462 pooled_title_image,
438 buffer, 463 buffer,
439 device_memory, 464 device_memory,
465 image_memory, // an ImageMemory::Range*, deleted: its bytes go back to their block
440 acceleration_structure, 466 acceleration_structure,
441 framebuffer, 467 framebuffer,
442 }; 468 };
@@ -512,6 +538,9 @@ public:
512 case Kind::image: 538 case Kind::image:
513 vk.vkDestroyImage(device, reinterpret_cast<VkImage>(item.handle), nullptr); 539 vk.vkDestroyImage(device, reinterpret_cast<VkImage>(item.handle), nullptr);
514 break; 540 break;
541 case Kind::pooled_title_image:
542 delete reinterpret_cast<PooledTitleImage*>(item.handle);
543 break;
515 case Kind::sparse_resource: 544 case Kind::sparse_resource:
516 // Releases the resource and its page backing together after outstanding submissions. 545 // Releases the resource and its page backing together after outstanding submissions.
517 delete reinterpret_cast<std::shared_ptr<SparseResource>*>(item.handle); 546 delete reinterpret_cast<std::shared_ptr<SparseResource>*>(item.handle);
@@ -522,6 +551,9 @@ public:
522 case Kind::device_memory: 551 case Kind::device_memory:
523 vk.vkFreeMemory(device, reinterpret_cast<VkDeviceMemory>(item.handle), nullptr); 552 vk.vkFreeMemory(device, reinterpret_cast<VkDeviceMemory>(item.handle), nullptr);
524 break; 553 break;
554 case Kind::image_memory:
555 delete reinterpret_cast<ImageMemory::Range*>(item.handle);
556 break;
525 case Kind::acceleration_structure: 557 case Kind::acceleration_structure:
526 if (vk.vkDestroyAccelerationStructureKHR) 558 if (vk.vkDestroyAccelerationStructureKHR)
527 vk.vkDestroyAccelerationStructureKHR( 559 vk.vkDestroyAccelerationStructureKHR(
@@ -550,6 +582,98 @@ private:
550 void* bindless_release_user_ = nullptr; 582 void* bindless_release_user_ = nullptr;
551}; 583};
552 584
585// Sets a device's lost flag and says so once, on stderr, at the moment it is first seen. From then on every fence of
586// the device reads UINT64_MAX and device calls return DXGI_ERROR_DEVICE_REMOVED, so a title takes its own
587// device-removed path (on the retail boot an int3 at game_scarlett_master.exe+0x2474606, reached from its frame wait
588// reading a fence's completed value as ~0); without this line that later stop is the first sign of the loss.
589// True when this call set the flag. device_lost_reports counts the lines said in this process (for tests).
590inline std::atomic<unsigned> device_lost_reports{0};
591inline bool set_device_lost(std::atomic<bool>& flag, const char* where) noexcept {
592 if (flag.exchange(true, std::memory_order_acq_rel)) return false;
593 device_lost_reports.fetch_add(1, std::memory_order_relaxed);
594 std::fprintf(stderr,
595 "[rt] vulkan: the device was lost (%s); its fences now read UINT64_MAX and device calls return "
596 "DXGI_ERROR_DEVICE_REMOVED\n",
597 where);
598 return true;
599}
600// LEONIDA_GPU_LATENCY=1 (diagnostic): for each queue kind, how long the GPU took from a submission's vkQueueSubmit to
601// the dispatcher seeing it done, and how much of the wall time the queue had work (in-order queue: a submission is
602// busy from the later of its submit and the previous one's completion to its own). One line per kind every 10 s.
603namespace gpu_latency {
604inline bool enabled() {
605 static const bool on = [] {
606 const char* v = std::getenv("LEONIDA_GPU_LATENCY");
607 return v && std::strcmp(v, "1") == 0;
608 }();
609 return on;
610}
611struct Stats {
612 std::mutex mutex;
613 std::uint64_t count = 0;
614 double sum_ms = 0, max_ms = 0, busy_ms = 0;
615 std::chrono::steady_clock::time_point last_done{}, since = std::chrono::steady_clock::now();
616};
617inline Stats& stats(int kind) {
618 static Stats s[3];
619 return s[kind < 0 || kind > 2 ? 0 : kind];
620}
621inline void done(int kind, std::chrono::steady_clock::time_point submitted) {
622 using clock = std::chrono::steady_clock;
623 const auto now = clock::now();
624 const auto ms = [](clock::duration d) { return std::chrono::duration<double, std::milli>(d).count(); };
625 Stats& s = stats(kind);
626 std::lock_guard lock(s.mutex);
627 const double latency = ms(now - submitted);
628 ++s.count;
629 s.sum_ms += latency;
630 s.max_ms = (std::max)(s.max_ms, latency);
631 s.busy_ms += ms(now - (std::max)(submitted, s.last_done));
632 s.last_done = now;
633 if (now - s.since >= std::chrono::seconds(10)) {
634 const double wall = ms(now - s.since);
635 std::fprintf(stderr, "[rt] gpu latency (%s): %llu submissions in %.0f s, submit to done %.2f ms on average, "
636 "%.1f ms the longest; the queue had work %.1f%% of the time\n",
637 kind == 0 ? "direct" : kind == 1 ? "compute" : "copy",
638 static_cast<unsigned long long>(s.count), wall / 1000.0, s.sum_ms / double(s.count), s.max_ms,
639 100.0 * s.busy_ms / wall);
640 s.count = 0;
641 s.sum_ms = s.max_ms = s.busy_ms = 0;
642 s.since = now;
643 }
644}
645// A held queue operation (Wait before Signal), released: how long it waited on the CPU before it could run.
646inline void held(int kind, int op, std::chrono::steady_clock::time_point at) {
647 using clock = std::chrono::steady_clock;
648 struct Held {
649 std::mutex mutex;
650 std::uint64_t count[3] = {};
651 double sum_ms = 0, max_ms = 0;
652 clock::time_point since = clock::now();
653 };
654 static Held h[3];
655 Held& s = h[kind < 0 || kind > 2 ? 0 : kind];
656 const auto now = clock::now();
657 const double ms = std::chrono::duration<double, std::milli>(now - at).count();
658 std::lock_guard lock(s.mutex);
659 ++s.count[op < 0 || op > 2 ? 0 : op];
660 s.sum_ms += ms;
661 s.max_ms = (std::max)(s.max_ms, ms);
662 if (now - s.since >= std::chrono::seconds(10)) {
663 const std::uint64_t all = s.count[0] + s.count[1] + s.count[2];
664 std::fprintf(stderr, "[rt] gpu latency (%s): %llu held operations released in %.0f s (%llu batches, %llu "
665 "signals, %llu markers), held %.2f ms on average, %.1f ms the longest\n",
666 kind == 0 ? "direct" : kind == 1 ? "compute" : "copy", static_cast<unsigned long long>(all),
667 std::chrono::duration<double>(now - s.since).count(), static_cast<unsigned long long>(s.count[0]),
668 static_cast<unsigned long long>(s.count[1]), static_cast<unsigned long long>(s.count[2]),
669 all ? s.sum_ms / double(all) : 0.0, s.max_ms);
670 s.count[0] = s.count[1] = s.count[2] = 0;
671 s.sum_ms = s.max_ms = 0;
672 s.since = now;
673 }
674}
675} // namespace gpu_latency
676
553// Centralized single-thread fence dispatcher using Vulkan 1.2 vkWaitSemaphores(VK_SEMAPHORE_WAIT_ANY_BIT). 677// Centralized single-thread fence dispatcher using Vulkan 1.2 vkWaitSemaphores(VK_SEMAPHORE_WAIT_ANY_BIT).
554// Eliminates per-fence OS threads and 10ms polling: a synthetic timeline semaphore (wakeup_sem_) at index 0 678// Eliminates per-fence OS threads and 10ms polling: a synthetic timeline semaphore (wakeup_sem_) at index 0
555// wakes vkWaitSemaphores immediately whenever a new wait, a released fence, or shutdown arrives while waiting_ == true. 679// wakes vkWaitSemaphores immediately whenever a new wait, a released fence, or shutdown arrives while waiting_ == true.
@@ -601,6 +725,8 @@ public:
601 FenceWaitDispatcher(const FenceWaitDispatcher&) = delete; 725 FenceWaitDispatcher(const FenceWaitDispatcher&) = delete;
602 FenceWaitDispatcher& operator=(const FenceWaitDispatcher&) = delete; 726 FenceWaitDispatcher& operator=(const FenceWaitDispatcher&) = delete;
603 727
728 void set_device_fault(DeviceFaultDiagnostics* diagnostics) { diagnostics_ = diagnostics; }
729
604 void set_signal_event_fn(SignalEventFn fn) { 730 void set_signal_event_fn(SignalEventFn fn) {
605 std::lock_guard lock(mutex_); 731 std::lock_guard lock(mutex_);
606 signal_event_ = fn; 732 signal_event_ = fn;
@@ -777,7 +903,8 @@ private:
777 VkSemaphoreSignalInfo si{VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO}; 903 VkSemaphoreSignalInfo si{VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO};
778 si.semaphore = wakeup_sem_; 904 si.semaphore = wakeup_sem_;
779 si.value = next; 905 si.value = next;
780 vk_.vkSignalSemaphore(device_, &si); 906 DeviceFaultDiagnostics::observe(diagnostics_, vk_.vkSignalSemaphore(device_, &si),
907 "vkSignalSemaphore (fence wakeup)");
781 } 908 }
782 909
783 void run() { 910 void run() {
@@ -814,7 +941,8 @@ private:
814 // is pending (d3d12_queue_wait_timeout's _Exit, or quitting with a fence outstanding) never finishes 941 // is pending (d3d12_queue_wait_timeout's _Exit, or quitting with a fence outstanding) never finishes
815 // exiting, and TerminateProcess cannot end it either. A timeout returns here and the loop re-arms the 942 // exiting, and TerminateProcess cannot end it either. A timeout returns here and the loop re-arms the
816 // same wait; completions still wake it at once through the ANY wait. 943 // same wait; completions still wake it at once through the ANY wait.
817 const VkResult res = vk_.vkWaitSemaphores(device_, &wi, kWaitSliceNs); 944 const VkResult res = DeviceFaultDiagnostics::observe(
945 diagnostics_, vk_.vkWaitSemaphores(device_, &wi, kWaitSliceNs), "vkWaitSemaphores (fence dispatcher)");
818 946
819 lock.lock(); 947 lock.lock();
820 waiting_ = false; 948 waiting_ = false;
@@ -822,7 +950,7 @@ private:
822 epoch_cv_.notify_all(); 950 epoch_cv_.notify_all();
823 951
824 if (res == VK_ERROR_DEVICE_LOST || device_lost_.load(std::memory_order_acquire)) { 952 if (res == VK_ERROR_DEVICE_LOST || device_lost_.load(std::memory_order_acquire)) {
825 device_lost_.store(true, std::memory_order_release); 953 set_device_lost(device_lost_, "vkWaitSemaphores in the fence dispatcher returned VK_ERROR_DEVICE_LOST");
826 std::vector<Entry> drained = std::move(pending_); 954 std::vector<Entry> drained = std::move(pending_);
827 pending_.clear(); 955 pending_.clear();
828 dispatch_outside_lock(lock, drained, signal_event_); 956 dispatch_outside_lock(lock, drained, signal_event_);
@@ -835,7 +963,9 @@ private:
835 std::size_t write = 0; 963 std::size_t write = 0;
836 for (std::size_t i = 0; i < pending_.size(); ++i) { 964 for (std::size_t i = 0; i < pending_.size(); ++i) {
837 std::uint64_t done = 0; 965 std::uint64_t done = 0;
838 const VkResult cr = vk_.vkGetSemaphoreCounterValue(device_, pending_[i].semaphore, &done); 966 const VkResult cr = DeviceFaultDiagnostics::observe(
967 diagnostics_, vk_.vkGetSemaphoreCounterValue(device_, pending_[i].semaphore, &done),
968 "vkGetSemaphoreCounterValue (fence dispatcher)");
839 if (cr == VK_ERROR_DEVICE_LOST) { 969 if (cr == VK_ERROR_DEVICE_LOST) {
840 lost = true; 970 lost = true;
841 for (std::size_t j = i; j < pending_.size(); ++j) ready.push_back(std::move(pending_[j])); 971 for (std::size_t j = i; j < pending_.size(); ++j) ready.push_back(std::move(pending_[j]));
@@ -852,7 +982,8 @@ private:
852 pending_.resize(write); 982 pending_.resize(write);
853 for (Entry& e : pending_) ready.push_back(std::move(e)); 983 for (Entry& e : pending_) ready.push_back(std::move(e));
854 pending_.clear(); 984 pending_.clear();
855 device_lost_.store(true, std::memory_order_release); 985 set_device_lost(device_lost_,
986 "vkGetSemaphoreCounterValue in the fence dispatcher returned VK_ERROR_DEVICE_LOST");
856 dispatch_outside_lock(lock, ready, signal_event_); 987 dispatch_outside_lock(lock, ready, signal_event_);
857 return; 988 return;
858 } 989 }
@@ -867,6 +998,7 @@ private:
867 VkDevice device_; 998 VkDevice device_;
868 const VulkanDeviceFunctions& vk_; 999 const VulkanDeviceFunctions& vk_;
869 std::atomic<bool>& device_lost_; 1000 std::atomic<bool>& device_lost_;
1001 DeviceFaultDiagnostics* diagnostics_ = nullptr; // configured before the dispatcher starts
870 SignalEventFn signal_event_ = nullptr; 1002 SignalEventFn signal_event_ = nullptr;
871 VkSemaphore wakeup_sem_ = VK_NULL_HANDLE; 1003 VkSemaphore wakeup_sem_ = VK_NULL_HANDLE;
872 std::uint64_t wakeup_val_ = 0; 1004 std::uint64_t wakeup_val_ = 0;
@@ -935,6 +1067,15 @@ struct TileRange {
935#pragma warning(push) 1067#pragma warning(push)
936#pragma warning(disable : 4324) // intentional alignas(64) cache-line padding to prevent false sharing 1068#pragma warning(disable : 4324) // intentional alignas(64) cache-line padding to prevent false sharing
937#endif 1069#endif
1070struct GraphicsIndirectCapabilities {
1071 bool first_instance = false;
1072 bool multiple = false;
1073 bool count_buffer = false;
1074 std::uint32_t max_count = 1;
1075 bool robust_index_view = false;
1076 bool require_clamp = false;
1077};
1078
938class VulkanContext { 1079class VulkanContext {
939public: 1080public:
940 // mesh_queries: VK_EXT_mesh_shader's meshShaderQueries feature is enabled on `device`, so a mesh segment's 1081 // mesh_queries: VK_EXT_mesh_shader's meshShaderQueries feature is enabled on `device`, so a mesh segment's
@@ -945,9 +1086,13 @@ public:
945 // ray_tracing: VK_KHR_acceleration_structure + VK_KHR_ray_query are enabled on `device`. 1086 // ray_tracing: VK_KHR_acceleration_structure + VK_KHR_ray_query are enabled on `device`.
946 // xdxr: acceleration-structure builds write XDXR BVH4 records (xdxr_build.h) instead; needs bufferDeviceAddress. 1087 // xdxr: acceleration-structure builds write XDXR BVH4 records (xdxr_build.h) instead; needs bufferDeviceAddress.
947 VulkanContext(PFN_vkGetDeviceProcAddr get, VkDevice device, bool separate_depth_stencil_layouts, 1088 VulkanContext(PFN_vkGetDeviceProcAddr get, VkDevice device, bool separate_depth_stencil_layouts,
948 bool conditional_rendering = false, bool ray_tracing = false, bool xdxr = false) 1089 bool conditional_rendering = false, bool ray_tracing = false, bool xdxr = false,
1090 GraphicsIndirectCapabilities indirect = {})
949 : device_(device), tracker_(separate_depth_stencil_layouts), ray_tracing_(ray_tracing) { 1091 : device_(device), tracker_(separate_depth_stencil_layouts), ray_tracing_(ray_tracing) {
950 loaded_ = vk.load(get, device); 1092 loaded_ = vk.load(get, device);
1093 if (loaded_ && gpu_labels_.initialize(device, get)) {
1094 replay_.gpu_label = [this](VkCommandBuffer cb, const label::Write& write) { gpu_labels_.record(cb, write); };
1095 }
951 replay_.pipeline_barrier = vk.vkCmdPipelineBarrier; 1096 replay_.pipeline_barrier = vk.vkCmdPipelineBarrier;
952 replay_.clear_color_image = vk.vkCmdClearColorImage; 1097 replay_.clear_color_image = vk.vkCmdClearColorImage;
953 replay_.clear_depth_stencil_image = vk.vkCmdClearDepthStencilImage; 1098 replay_.clear_depth_stencil_image = vk.vkCmdClearDepthStencilImage;
@@ -959,11 +1104,17 @@ public:
959 replay_.copy_buffer_to_image = vk.vkCmdCopyBufferToImage; 1104 replay_.copy_buffer_to_image = vk.vkCmdCopyBufferToImage;
960 replay_.copy_image_to_buffer = vk.vkCmdCopyImageToBuffer; 1105 replay_.copy_image_to_buffer = vk.vkCmdCopyImageToBuffer;
961 replay_.copy_image = vk.vkCmdCopyImage; 1106 replay_.copy_image = vk.vkCmdCopyImage;
1107 replay_.blit_image = vk.vkCmdBlitImage;
962 replay_.resolve_image = vk.vkCmdResolveImage; 1108 replay_.resolve_image = vk.vkCmdResolveImage;
963 replay_.fill_buffer = vk.vkCmdFillBuffer; 1109 replay_.fill_buffer = vk.vkCmdFillBuffer;
964 replay_.update_buffer = vk.vkCmdUpdateBuffer; 1110 replay_.update_buffer = vk.vkCmdUpdateBuffer;
965 replay_.draw_indirect = vk.vkCmdDrawIndirect; 1111 replay_.draw_indirect = vk.vkCmdDrawIndirect;
966 replay_.draw_indexed_indirect = vk.vkCmdDrawIndexedIndirect; 1112 replay_.draw_indexed_indirect = vk.vkCmdDrawIndexedIndirect;
1113 replay_.draw_indirect_first_instance = indirect.first_instance;
1114 replay_.multi_draw_indirect = indirect.multiple;
1115 replay_.draw_indirect_count_enabled = indirect.count_buffer;
1116 replay_.max_draw_indirect_count = indirect.max_count;
1117 replay_.require_indirect_clamp = indirect.require_clamp;
967 replay_.draw_indirect_count = vk.vkCmdDrawIndirectCount; 1118 replay_.draw_indirect_count = vk.vkCmdDrawIndirectCount;
968 replay_.draw_indexed_indirect_count = vk.vkCmdDrawIndexedIndirectCount; 1119 replay_.draw_indexed_indirect_count = vk.vkCmdDrawIndexedIndirectCount;
969 replay_.dispatch_indirect = vk.vkCmdDispatchIndirect; 1120 replay_.dispatch_indirect = vk.vkCmdDispatchIndirect;
@@ -986,6 +1137,9 @@ public:
986 }; 1137 };
987 replay_.bind_vertex_buffers2 = vk.vkCmdBindVertexBuffers2; 1138 replay_.bind_vertex_buffers2 = vk.vkCmdBindVertexBuffers2;
988 replay_.bind_index_buffer = vk.vkCmdBindIndexBuffer; 1139 replay_.bind_index_buffer = vk.vkCmdBindIndexBuffer;
1140 if (indirect.robust_index_view)
1141 replay_.bind_robust_index_view = reinterpret_cast<decltype(replay_.bind_robust_index_view)>(
1142 get(device, "vkCmdBindIndexBuffer2KHR"));
989 replay_.set_viewport = vk.vkCmdSetViewport; 1143 replay_.set_viewport = vk.vkCmdSetViewport;
990 replay_.set_scissor = vk.vkCmdSetScissor; 1144 replay_.set_scissor = vk.vkCmdSetScissor;
991 replay_.set_viewport_with_count = vk.vkCmdSetViewportWithCount; 1145 replay_.set_viewport_with_count = vk.vkCmdSetViewportWithCount;
@@ -1040,9 +1194,12 @@ public:
1040 b.dst_va && b.scratch_va && (!b.is_tlas || !b.instance_count || b.instances_va) && 1194 b.dst_va && b.scratch_va && (!b.is_tlas || !b.instance_count || b.instances_va) &&
1041 (!b.update || (b.build_flags & VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR) != 0); 1195 (!b.update || (b.build_flags & VK_BUILD_ACCELERATION_STRUCTURE_ALLOW_UPDATE_BIT_KHR) != 0);
1042 }; 1196 };
1043 replay_.xdxr_record = [this](VkCommandBuffer cb, const BuildAccelerationStructure& b) { 1197 replay_.xdxr_record = [this](VkCommandBuffer cb, const BuildAccelerationStructure& b,
1044 // Every address is a console VA in the GPU address arena: the device address is heap_base + VA, 1198 const XdxrBlasTable& blases) {
1045 // and the BLAS addresses in instance descs get the same bias. 1199 // Every address is the VA shaders reach the memory by: an arena VA, or for the title's own memory
1200 // the VA of its GPU copy, resolved when the build was recorded (Device::resolve_xdxr_build). The
1201 // device address is heap_base + VA, and the BLAS addresses in instance descs, which are the
1202 // title's, go through `blases` and get the same bias.
1046 const std::uint64_t base = replay_.heap_base; 1203 const std::uint64_t base = replay_.heap_base;
1047 XdxrLayout layout; 1204 XdxrLayout layout;
1048 layout.compute(xdxr_elements(b), b.is_tlas, xdxr_box16(b)); 1205 layout.compute(xdxr_elements(b), b.is_tlas, xdxr_box16(b));
@@ -1051,7 +1208,7 @@ public:
1051 const std::uint64_t from = b.update ? base + (b.src_va ? b.src_va : b.dst_va) : 0; 1208 const std::uint64_t from = b.update ? base + (b.src_va ? b.src_va : b.dst_va) : 0;
1052 if (b.is_tlas) { 1209 if (b.is_tlas) {
1053 xdxr_->record_tlas(cb, layout, b.instances_va ? base + b.instances_va : 0, base + b.dst_va, 1210 xdxr_->record_tlas(cb, layout, b.instances_va ? base + b.instances_va : 0, base + b.dst_va,
1054 base + b.scratch_va, base, from); 1211 base + b.scratch_va, base, from, &blases);
1055 } else { 1212 } else {
1056 std::vector<XdxrTriangles> geometries; 1213 std::vector<XdxrTriangles> geometries;
1057 xdxr_inputs(b, &geometries, base); 1214 xdxr_inputs(b, &geometries, base);
@@ -1106,6 +1263,8 @@ public:
1106 } 1263 }
1107 1264
1108 ~VulkanContext() { 1265 ~VulkanContext() {
1266 progress_watch_ = {}; // stop before queues, timelines or diagnostic state go away
1267 gpu_labels_.stop(device_);
1109 fence_dispatcher_.reset(); 1268 fence_dispatcher_.reset();
1110 deletion_queue_.drain(UINT64_MAX, device_, vk); 1269 deletion_queue_.drain(UINT64_MAX, device_, vk);
1111 for (const auto& [key, framebuffer] : resolve_framebuffers_) 1270 for (const auto& [key, framebuffer] : resolve_framebuffers_)
@@ -1118,6 +1277,22 @@ public:
1118 VulkanContext& operator=(const VulkanContext&) = delete; 1277 VulkanContext& operator=(const VulkanContext&) = delete;
1119 1278
1120 bool loaded() const { return loaded_; } 1279 bool loaded() const { return loaded_; }
1280
1281 void configure_device_fault(PFN_vkGetDeviceProcAddr get, DeviceFaultExtensions enabled) {
1282 device_fault_ = std::make_unique<DeviceFaultDiagnostics>(get, device_, enabled);
1283 if (fence_dispatcher_) fence_dispatcher_->set_device_fault(device_fault_.get());
1284 if (loaded_) progress_watch_ = std::jthread([this](std::stop_token stop) { watch_queue_progress(stop); });
1285 }
1286
1287 void add_diagnostic_queue(VkQueue queue) {
1288 if (device_fault_) device_fault_->add_queue(queue);
1289 }
1290
1291 DeviceFaultDiagnostics* device_fault() const { return device_fault_.get(); }
1292
1293 VkResult observe_result(VkResult result, const char* operation) const noexcept {
1294 return DeviceFaultDiagnostics::observe(device_fault_.get(), result, operation);
1295 }
1121 void configure_predication(PFN_vkGetDeviceProcAddr get, const VkPhysicalDeviceMemoryProperties& memory, 1296 void configure_predication(PFN_vkGetDeviceProcAddr get, const VkPhysicalDeviceMemoryProperties& memory,
1122 VkDeviceSize max_range, std::uint32_t family) { 1297 VkDeviceSize max_range, std::uint32_t family) {
1123 std::unique_lock lock(resource_mutex_); 1298 std::unique_lock lock(resource_mutex_);
@@ -1136,6 +1311,38 @@ public:
1136 std::unique_lock lock(resource_mutex_); 1311 std::unique_lock lock(resource_mutex_);
1137 counted_dispatch_ = std::make_unique<IndirectDispatchCounter>(get, device_, memory, limits); 1312 counted_dispatch_ = std::make_unique<IndirectDispatchCounter>(get, device_, memory, limits);
1138 } 1313 }
1314 // Indexed quad lists are drawn from triangle indices a compute pass writes into the copy scratch
1315 // (quad_index_expand.h). Call only with bufferDeviceAddress enabled and after an enable_copy_scratch whose chunks
1316 // have INDEX_BUFFER and SHADER_DEVICE_ADDRESS usage on memory allocated with a device address.
1317 void configure_quad_indices(PFN_vkGetDeviceProcAddr get, const VkPhysicalDeviceLimits& limits) {
1318 std::unique_lock lock(resource_mutex_);
1319 quad_indices_ = std::make_unique<QuadIndexExpander>(get, device_, limits);
1320
1321 }
1322
1323 // Every ExecuteIndirect's arguments are clamped on the GPU into scratch before the indirect command reads them
1324 // (vulkan_indirect_clamp.h), so a stale or garbage record from a skipped compute pass cannot reset the display
1325 // driver. Needs bufferDeviceAddress and a compute-capable queue; `allocate` gives the record scratch
1326 // device-local memory, and must set VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT. LEONIDA_INDIRECT_CLAMP=0 turns the
1327 // pass off at replay time.
1328 void enable_indirect_clamp(PFN_vkGetDeviceProcAddr get, const VkPhysicalDeviceMemoryProperties& memory,
1329 const VkPhysicalDeviceLimits& limits, ScratchBuffers::Allocate allocate,
1330 std::vector<std::uint32_t> families = {}) {
1331 std::unique_lock lock(resource_mutex_);
1332 replay_.require_indirect_clamp = indirect_clamp_enabled();
1333 if (!replay_.require_indirect_clamp) return;
1334 indirect_clamp_ = std::make_unique<IndirectArgumentClamp>(get, device_, memory, limits, std::move(allocate),
1335 device_fault_.get(), std::move(families));
1336 if (!indirect_clamp_->loaded()) {
1337 indirect_clamp_.reset();
1338 return;
1339 }
1340 // The preparation callback needs this submission's counter-slot batch, so it is set per ExecuteCommandLists
1341 // (execute()); recording the pass has no per-submission state.
1342 replay_.emit_indirect_clamp = [this](VkCommandBuffer command_buffer, const ClampedIndirect& job) {
1343 indirect_clamp_->emit(command_buffer, job);
1344 };
1345 }
1139 VkDevice device() const { return device_; } 1346 VkDevice device() const { return device_; }
1140 1347
1141 // Debug markers become labels from here on; call before any queue or list uses the context. Incomplete sets 1348 // Debug markers become labels from here on; call before any queue or list uses the context. Incomplete sets
@@ -1155,6 +1362,11 @@ public:
1155 std::unique_lock lock(resource_mutex_); 1362 std::unique_lock lock(resource_mutex_);
1156 set_resource_locked(id, binding); 1363 set_resource_locked(id, binding);
1157 } 1364 }
1365 // Whether `va` is in a buffer this context knows by VA (the index buffer_at searches).
1366 bool knows_buffer_va(std::uint64_t va, std::uint64_t bytes = 1) {
1367 std::shared_lock lock(resource_mutex_);
1368 return buffer_vas_.covers(va, bytes);
1369 }
1158 void add_resource(ResourceId id, const ResourceBinding& binding, VkImageLayout current_layout) { 1370 void add_resource(ResourceId id, const ResourceBinding& binding, VkImageLayout current_layout) {
1159 std::unique_lock rlock(resource_mutex_); 1371 std::unique_lock rlock(resource_mutex_);
1160 set_resource_locked(id, binding); 1372 set_resource_locked(id, binding);
@@ -1216,6 +1428,7 @@ public:
1216 } 1428 }
1217 { 1429 {
1218 std::lock_guard lock(storage_mutex_); // a buffer destroyed before any submission is not filled 1430 std::lock_guard lock(storage_mutex_); // a buffer destroyed before any submission is not filled
1431 storage_pending_.erase(id);
1219 std::erase_if(zero_pending_, [id](const PendingZero& zero) { return zero.id == id; }); 1432 std::erase_if(zero_pending_, [id](const PendingZero& zero) { return zero.id == id; });
1220 } 1433 }
1221 if (img) { 1434 if (img) {
@@ -1275,9 +1488,12 @@ public:
1275 1488
1276 // The device address of the GPU address arena: console VAs are offsets from it (docs section 3.3). 1489 // The device address of the GPU address arena: console VAs are offsets from it (docs section 3.3).
1277 // execute() copies replay_ under a shared resource_mutex_, so writers hold it uniquely. 1490 // execute() copies replay_ under a shared resource_mutex_, so writers hold it uniquely.
1278 void set_heap_base(std::uint64_t heap_base) { 1491 // `heap_size`: the arena's bytes, below which a VA a GPU pass finds in memory (a TLAS instance's BLAS) is an arena
1492 // VA; 0 when unknown (such a VA is then taken as one whatever its value).
1493 void set_heap_base(std::uint64_t heap_base, std::uint64_t heap_size = 0) {
1279 std::unique_lock lock(resource_mutex_); 1494 std::unique_lock lock(resource_mutex_);
1280 replay_.heap_base = heap_base; 1495 replay_.heap_base = heap_base;
1496 replay_.heap_size = heap_size;
1281 } 1497 }
1282 1498
1283 // Zeroed memory for unbound vertex and index buffers to read (ReplayFunctions::zero_buffer). 1499 // Zeroed memory for unbound vertex and index buffers to read (ReplayFunctions::zero_buffer).
@@ -1293,6 +1509,32 @@ public:
1293 replay_.depth_range_unrestricted = enabled; 1509 replay_.depth_range_unrestricted = enabled;
1294 } 1510 }
1295 1511
1512 struct GeometryUpload {
1513 std::uint64_t source{}, size{};
1514 VkBuffer buffer{};
1515 VkDeviceSize offset{};
1516 std::shared_ptr<void> owner;
1517 };
1518 using GeometryProvider = std::function<bool(std::uint64_t,std::uint64_t,GeometryUpload&)>;
1519 void set_geometry_provider(GeometryProvider provider) {
1520 std::unique_lock lock(resource_mutex_);
1521 geometry_provider_=std::move(provider);
1522 }
1523
1524 // LOCAL: the copy-in fallback for vertex and index views in title memory (ReplayFunctions::title_memory).
1525 void set_title_memory(std::function<bool(std::uint64_t, std::uint64_t, VkBuffer&, VkDeviceSize&)> copy) {
1526 std::unique_lock lock(resource_mutex_);
1527 replay_.title_memory = std::move(copy);
1528 }
1529
1530 // Pre-expanded 32-bit triangle indices for non-indexed quad lists (ReplayFunctions::quad_indices).
1531 void set_quad_indices(VkBuffer buffer, VkDeviceSize offset, std::uint32_t count) {
1532 std::unique_lock lock(resource_mutex_);
1533 replay_.quad_indices = buffer;
1534 replay_.quad_indices_offset = offset;
1535 replay_.quad_index_count = count;
1536 }
1537
1296 // Physical-device COLOR_ATTACHMENT format check for reinterpreted UAV clears. 1538 // Physical-device COLOR_ATTACHMENT format check for reinterpreted UAV clears.
1297 void set_color_attachment_format(std::function<bool(VkFormat)> check) { 1539 void set_color_attachment_format(std::function<bool(VkFormat)> check) {
1298 std::unique_lock lock(resource_mutex_); 1540 std::unique_lock lock(resource_mutex_);
@@ -1304,24 +1546,90 @@ public:
1304 } 1546 }
1305 1547
1306 // Pipelines are registered by an opaque id (the PSO object) for as long as the PSO lives. 1548 // Pipelines are registered by an opaque id (the PSO object) for as long as the PSO lives.
1307 void add_pipeline(std::uintptr_t id, const ComputePipeline& pipeline) { 1549 // Guarded by pipeline_mutex_ (separate from resource_mutex_) so shader compilation on one queue does not block
1308 std::unique_lock lock(resource_mutex_); 1550 // resource registration or destruction on the render thread.
1551 void add_pipeline(std::uintptr_t id, const ComputePipeline& pipeline, const char* shader = nullptr) {
1552 std::unique_lock lock(pipeline_mutex_);
1309 pipelines_[id] = pipeline; 1553 pipelines_[id] = pipeline;
1554 if (shader && device_fault_) device_fault_->pipeline_names[id] = {shader};
1310 } 1555 }
1311 void remove_pipeline(std::uintptr_t id) { 1556 void remove_pipeline(std::uintptr_t id) {
1312 std::unique_lock lock(resource_mutex_); 1557 std::unique_lock lock(pipeline_mutex_);
1313 pipelines_.erase(id); 1558 pipelines_.erase(id);
1314 graphics_pipelines_.erase(id); 1559 graphics_pipelines_.erase(id);
1560 if (device_fault_) device_fault_->pipeline_names.erase(id);
1315 } 1561 }
1316 void add_graphics_pipeline(std::uintptr_t id, const GraphicsPipeline& pipeline) { 1562 void add_graphics_pipeline(std::uintptr_t id, const GraphicsPipeline& pipeline,
1317 std::unique_lock lock(resource_mutex_); 1563 const CheckpointShaders* shaders = nullptr) {
1564 std::unique_lock lock(pipeline_mutex_);
1318 graphics_pipelines_[id] = pipeline; 1565 graphics_pipelines_[id] = pipeline;
1566 if (shaders && device_fault_) device_fault_->pipeline_names[id] = *shaders;
1567 }
1568 // Workers for the pipelines a submission needs and that are not built yet. Null (the default): compiled serially on
1569 // the submitting thread once resource_mutex_ is released. Replacing it waits for submissions that are compiling, and
1570 // ends the workers it had.
1571 void set_pipeline_workers(std::unique_ptr<PipelineWorkers> workers) {
1572 std::unique_lock lock(pipeline_mutex_);
1573 pipeline_workers_.swap(workers);
1574 }
1575 PipelineWorkers::Stats pipeline_worker_stats() {
1576 std::shared_lock lock(pipeline_mutex_);
1577 return pipeline_workers_ ? pipeline_workers_->stats() : PipelineWorkers::Stats{};
1319 } 1578 }
1320 // Configure before queue creation, when the selected queue family supports compute. 1579 // Configure before queue creation, when the selected queue family supports compute.
1321 void set_occlusion_resolve_memory(const VkPhysicalDeviceMemoryProperties& memory) { 1580 void set_occlusion_resolve_memory(const VkPhysicalDeviceMemoryProperties& memory) {
1322 occlusion_resolve_memory_ = memory; 1581 occlusion_resolve_memory_ = memory;
1323 } 1582 }
1324 1583
1584 struct HostTextureStats { std::uint64_t copies = 0, waits = 0; };
1585 HostTextureStats host_texture_stats() {
1586 std::lock_guard lock(submit_mutex_);
1587 return host_texture_stats_;
1588 }
1589
1590 // CPU writes to a title texture have no application fence. Prevent another queue from
1591 // claiming a new layout or submitting work between the completion check and the host copy.
1592 // An unsatisfied console Wait lives in QueueHolds, outside the Vulkan queues.
1593 template<class Copy>
1594 VkResult write_host_texture(ResourceId id, std::uint32_t subresource, Copy&& copy) {
1595 std::lock_guard layout_lock(tracker_mutex_);
1596 std::lock_guard queue_lock(submit_mutex_);
1597 if (tracker_.layout(id, subresource) != VK_IMAGE_LAYOUT_GENERAL) return VK_NOT_READY;
1598 if (image_work_pending_) {
1599 ++host_texture_stats_.waits;
1600 const auto result = observe_result(vk.vkDeviceWaitIdle(device_), "vkDeviceWaitIdle (title texture upload)");
1601 if (result != VK_SUCCESS) return result;
1602 image_work_pending_ = false;
1603 }
1604 if (!copy()) return VK_ERROR_UNKNOWN;
1605 ++host_texture_stats_.copies;
1606 return VK_SUCCESS;
1607 }
1608
1609 // A complete CPU-side replacement of these color subresources. Serialize with replay and
1610 // present while recording the old layouts, finishing prior reads and publishing the copy.
1611 template<class Copy>
1612 VkResult write_staged_title_image(ResourceId id, const VkImageSubresourceRange& range, Copy&& copy) {
1613 std::lock_guard layout_lock(tracker_mutex_);
1614 std::lock_guard queue_lock(submit_mutex_);
1615 LayoutPieces pieces;
1616 if (!tracker_.pieces(id, range, pieces) || pieces.empty()) return VK_ERROR_UNKNOWN;
1617 if (image_work_pending_) {
1618 const auto r = observe_result(vk.vkDeviceWaitIdle(device_), "vkDeviceWaitIdle (title staging)");
1619 if (r != VK_SUCCESS) return r;
1620 image_work_pending_ = false;
1621 }
1622 const auto r = observe_result(copy(replay_, pieces), "title staging upload");
1623 if (r == VK_SUCCESS) {
1624 for (const auto& p : pieces)
1625 if (p.layout == VK_IMAGE_LAYOUT_UNDEFINED) tracker_.set(id, p.range, VK_IMAGE_LAYOUT_GENERAL);
1626 }
1627 return r;
1628 }
1629
1630 // Present and probe submissions have their own fences, outside the queue retirement timelines.
1631 void note_image_work_locked() { image_work_pending_ = true; }
1632
1325 // For tests and traces. 1633 // For tests and traces.
1326 VkImageLayout layout(ResourceId id, std::uint32_t subresource) { 1634 VkImageLayout layout(ResourceId id, std::uint32_t subresource) {
1327 std::lock_guard lock(tracker_mutex_); 1635 std::lock_guard lock(tracker_mutex_);
@@ -1333,6 +1641,23 @@ public:
1333 return resources_.find(id) != resources_.end(); 1641 return resources_.find(id) != resources_.end();
1334 } 1642 }
1335 1643
1644 // The registered buffer whose VA range holds `va`, preferring one that holds [va, va + bytes) as buffer_at does: its
1645 // ID, first VA and size in bytes. False when none does, or when `acquire(id)` returns false. `acquire` runs with
1646 // the registry locked, so the resource cannot finish being removed under it: it takes the caller's reference
1647 // (Resource's destructor removes its entry first, which waits for this lock). Used where a console call names a
1648 // buffer by VA only (Xbox device slot 70).
1649 template<class Acquire>
1650 bool buffer_resource_at(std::uint64_t va, std::uint64_t bytes, ResourceId& id, std::uint64_t& start,
1651 std::uint64_t& size, Acquire&& acquire) {
1652 std::shared_lock lock(resource_mutex_);
1653 BufferVaIndex<ResourceId>::Hit hit{};
1654 if (!buffer_vas_.find(va, hit, bytes) || !acquire(hit.id)) return false;
1655 id = hit.id;
1656 start = hit.start;
1657 size = hit.size;
1658 return true;
1659 }
1660
1336 bool ray_tracing_supported() const { return ray_tracing_ && vk.vkCmdBuildAccelerationStructuresKHR != nullptr; } 1661 bool ray_tracing_supported() const { return ray_tracing_ && vk.vkCmdBuildAccelerationStructuresKHR != nullptr; }
1337 bool xdxr_acceleration_structures() const { return xdxr_ != nullptr; } 1662 bool xdxr_acceleration_structures() const { return xdxr_ != nullptr; }
1338 1663
@@ -1407,6 +1732,56 @@ public:
1407 // written: the device brings the bindless set 0 of the translated shaders up to date there (vulkan_bindless.h) 1732 // written: the device brings the bindless set 0 of the translated shaders up to date there (vulkan_bindless.h)
1408 // and records what the set needs first. When it fails, nothing of that call is executed. 1733 // and records what the set needs first. When it fails, nothing of that call is executed.
1409 void set_transfer_only_family(std::uint32_t family) { transfer_only_family_ = family; } 1734 void set_transfer_only_family(std::uint32_t family) { transfer_only_family_ = family; }
1735 void set_graphics_family(std::uint32_t family) { graphics_family_ = family; }
1736 void set_compute_copy_aspects(std::function<VkImageAspectFlags(VkFormat)> check) {
1737 replay_.compute_copy_aspects = std::move(check);
1738 }
1739
1740 // `before` is called at the start of every submission of command lists (a held batch: when it is released),
1741 // before any lock here is taken: the device re-copies its slot-133 shadow buffers from the title's pages there.
1742 // Set once, before the first queue exists.
1743 void set_before_execute(std::function<void()> before) { before_execute_ = std::move(before); }
1744
1745 // Table VAs are offsets in this device's arena. Install its scanner before creating any queues.
1746 // (The per-device scan is from the patch descriptor-table-refresh, part 2, of
1747 // Sigtryggur-Mani-Gudmundsson/graphics-runtime-patches at d9a0bc1b, GPL-3.0.)
1748 using TableScanner = std::function<void(std::uint64_t, std::uint32_t)>;
1749 void set_table_scanner(TableScanner scan) { table_scanner_ = std::move(scan); }
1750 void set_cpu_texture_publisher(std::function<bool()> f) { cpu_texture_publisher_ = std::move(f); }
1751 bool publish_cpu_textures() const { return !cpu_texture_publisher_ || cpu_texture_publisher_(); }
1752 void set_sample_table_resolver(std::function<bool(std::uint64_t,std::uint32_t)> f) { sample_table_resolver_ = std::move(f); }
1753 bool prepare_sample_table(std::uint64_t address, std::uint32_t count) const {
1754 return !sample_table_resolver_ || sample_table_resolver_(address,count);
1755 }
1756 // False when this context has no scanner of its own.
1757 bool scan_table(std::uint64_t va, std::uint32_t descriptors) const {
1758 if (!table_scanner_) return false;
1759 table_scanner_(va, descriptors);
1760 return true;
1761 }
1762
1763 // `before` is called at the start of every submission of command lists (a held batch: when it is released),
1764 // before any lock here is taken: the device re-copies its slot-133 shadow buffers from the title's pages there.
1765 // Set once, before the first queue exists.
1766 using InputProbe = std::function<void(std::span<const CommandList* const>, std::uint64_t, const char*)>;
1767 void set_input_probe(InputProbe probe) { input_probe_ = std::move(probe); }
1768 bool diagnostic_buffer(std::uint64_t va, std::uint64_t& host, std::uint64_t& room) {
1769 std::shared_lock lock(resource_mutex_);
1770 BufferVaIndex<ResourceId>::Hit hit{};
1771 if (!buffer_vas_.find(va, hit)) return false;
1772 const auto* b = resolve(hit.id);
1773 if (!b || va - b->va >= b->size) return false;
1774 const auto offset = va - b->va;
1775 host = b->host ? reinterpret_cast<std::uint64_t>(b->host + offset) : 0;
1776 room = b->size - offset;
1777 return true;
1778 }
1779 const char* diagnostic_compute_name(std::uintptr_t id) {
1780 std::shared_lock lock(pipeline_mutex_);
1781 if (!device_fault_) return nullptr;
1782 const auto it = device_fault_->pipeline_names.find(id);
1783 return it == device_fault_->pipeline_names.end() ? nullptr : it->second[0];
1784 }
1410 1785
1411 void set_bindless_prepare(std::function<bool(VkCommandBuffer)> prepare) { 1786 void set_bindless_prepare(std::function<bool(VkCommandBuffer)> prepare) {
1412 std::unique_lock lock(resource_mutex_); 1787 std::unique_lock lock(resource_mutex_);
@@ -1418,7 +1793,8 @@ public:
1418 void enable_depth24(PFN_vkGetDeviceProcAddr get, Depth24Converter::Allocate allocate, 1793 void enable_depth24(PFN_vkGetDeviceProcAddr get, Depth24Converter::Allocate allocate,
1419 std::uint64_t max_storage_range = 1u << 27) { 1794 std::uint64_t max_storage_range = 1u << 27) {
1420 std::unique_lock lock(resource_mutex_); 1795 std::unique_lock lock(resource_mutex_);
1421 depth24_ = std::make_unique<Depth24Converter>(get, device_, std::move(allocate), max_storage_range); 1796 depth24_ = std::make_unique<Depth24Converter>(get, device_, std::move(allocate), max_storage_range,
1797 device_fault_.get());
1422 if (!depth24_->loaded()) { 1798 if (!depth24_->loaded()) {
1423 depth24_.reset(); 1799 depth24_.reset();
1424 return; 1800 return;
@@ -1430,10 +1806,13 @@ public:
1430 } 1806 }
1431 1807
1432 // Copies the replay stages through a buffer (depth <-> colour, vulkan_replay.h) take device-local scratch from 1808 // Copies the replay stages through a buffer (depth <-> colour, vulkan_replay.h) take device-local scratch from
1433 // `allocate`. Without this such a copy is refused as unsupported. 1809 // `allocate`. Without this such a copy is refused as unsupported. `extra_usage` is added to the chunks' transfer
1434 void enable_copy_scratch(PFN_vkGetDeviceProcAddr get, ScratchBuffers::Allocate allocate) { 1810 // usage, for configure_quad_indices.
1811 void enable_copy_scratch(PFN_vkGetDeviceProcAddr get, ScratchBuffers::Allocate allocate,
1812 VkBufferUsageFlags extra_usage = 0, std::vector<std::uint32_t> families = {}) {
1435 std::unique_lock lock(resource_mutex_); 1813 std::unique_lock lock(resource_mutex_);
1436 scratch_ = std::make_unique<ScratchBuffers>(get, device_, std::move(allocate)); 1814 scratch_ = std::make_unique<ScratchBuffers>(get, device_, std::move(allocate), extra_usage, std::move(families),
1815 device_fault_.get());
1437 if (!scratch_->loaded()) scratch_.reset(); 1816 if (!scratch_->loaded()) scratch_.reset();
1438 } 1817 }
1439 1818
@@ -1497,7 +1876,8 @@ public:
1497 wait.semaphoreCount = std::uint32_t(semaphores.size()); 1876 wait.semaphoreCount = std::uint32_t(semaphores.size());
1498 wait.pSemaphores = semaphores.data(); 1877 wait.pSemaphores = semaphores.data();
1499 wait.pValues = values.data(); 1878 wait.pValues = values.data();
1500 vk.vkWaitSemaphores(device_, &wait, UINT64_MAX); // outside submit_mutex_: a signal may need it 1879 // Outside submit_mutex_: a signal may need it.
1880 observe_result(vk.vkWaitSemaphores(device_, &wait, UINT64_MAX), "vkWaitSemaphores (retirement)");
1501 } 1881 }
1502 return completed_retire_ticket(); 1882 return completed_retire_ticket();
1503 } 1883 }
@@ -1515,7 +1895,8 @@ public:
1515 if (is_device_lost()) return 0; 1895 if (is_device_lost()) return 0;
1516 ticket = retire_tickets_.completed([this, &lost](VkSemaphore semaphore, std::uint64_t value) { 1896 ticket = retire_tickets_.completed([this, &lost](VkSemaphore semaphore, std::uint64_t value) {
1517 std::uint64_t done = 0; 1897 std::uint64_t done = 0;
1518 const VkResult result = vk.vkGetSemaphoreCounterValue(device_, semaphore, &done); 1898 const VkResult result = observe_result(vk.vkGetSemaphoreCounterValue(device_, semaphore, &done),
1899 "vkGetSemaphoreCounterValue (retirement)");
1519 if (result == VK_ERROR_DEVICE_LOST) lost = true; 1900 if (result == VK_ERROR_DEVICE_LOST) lost = true;
1520 return result == VK_SUCCESS && done >= value; 1901 return result == VK_SUCCESS && done >= value;
1521 }); 1902 });
@@ -1531,11 +1912,22 @@ public:
1531 deletion_queue_.drain(current_ticket, device_, vk); 1912 deletion_queue_.drain(current_ticket, device_, vk);
1532 } 1913 }
1533 1914
1915 // True when the VA names a sparse resource: the sparse pass binds its memory, not the arena's mapping, so the
1916 // host's bytes at that offset are not the resource's. The console's value writes skip those.
1917 bool is_sparse_va(std::uint64_t va) {
1918 const std::shared_lock lock(resource_mutex_);
1919 BufferVaIndex<ResourceId>::Hit hit{};
1920 if (!buffer_vas_.find(va, hit)) return false;
1921 const ResourceBinding* const b = resolve(hit.id);
1922 return b && b->sparse_buffer;
1923 }
1924
1534 // Both methods are called with submit_mutex_ held. A queue's own progress timeline is 1925 // Both methods are called with submit_mutex_ held. A queue's own progress timeline is
1535 // monotonic even when another queue completes first; global tickets are retired in order. 1926 // monotonic even when another queue completes first; global tickets are retired in order.
1536 void record_submit_locked(VkSemaphore progress, std::uint64_t value) { 1927 void record_submit_locked(VkSemaphore progress, std::uint64_t value) {
1537 const auto ticket = submitted_ticket_.fetch_add(1, std::memory_order_acq_rel) + 1; 1928 const auto ticket = submitted_ticket_.fetch_add(1, std::memory_order_acq_rel) + 1;
1538 retire_tickets_.record(ticket, progress, value); 1929 retire_tickets_.record(ticket, progress, value);
1930 note_image_work_locked();
1539 } 1931 }
1540 void retire_queue_idle_locked(VkSemaphore progress) { 1932 void retire_queue_idle_locked(VkSemaphore progress) {
1541 retire_tickets_.queue_idle(progress); 1933 retire_tickets_.queue_idle(progress);
@@ -1546,8 +1938,9 @@ public:
1546 // Vulkan requires external synchronisation of a VkQueue; every D3D12 queue of the device may share one. 1938 // Vulkan requires external synchronisation of a VkQueue; every D3D12 queue of the device may share one.
1547 std::mutex& submit_mutex() { return submit_mutex_; } 1939 std::mutex& submit_mutex() { return submit_mutex_; }
1548 1940
1549 void mark_device_lost() noexcept { 1941 void mark_device_lost(const char* where = "a Vulkan call returned VK_ERROR_DEVICE_LOST") noexcept {
1550 device_lost_.store(true, std::memory_order_release); 1942 set_device_lost(device_lost_, where);
1943 run_device_lost_hook(); // LEONIDA_AFTERMATH: the GPU crash dump is written before waiters wake
1551 if (fence_dispatcher_) { 1944 if (fence_dispatcher_) {
1552 try { 1945 try {
1553 fence_dispatcher_->notify_device_lost(); 1946 fence_dispatcher_->notify_device_lost();
@@ -1605,7 +1998,14 @@ private:
1605 1998
1606 const ResourceBinding* resolve(ResourceId id) const { 1999 const ResourceBinding* resolve(ResourceId id) const {
1607 const auto it = resources_.find(id); 2000 const auto it = resources_.find(id);
1608 return it == resources_.end() ? nullptr : &it->second; 2001 if (it == resources_.end()) return nullptr;
2002 const auto& binding = it->second;
2003 if (auto* memory = binding.deferred_memory; memory && !memory->ensure()) return nullptr;
2004 // The caller holds resource_mutex_, so the registered owner's lifetime includes this bind.
2005 if (binding.ensure_residency && !binding.ensure_residency(binding.residency_owner)) return nullptr;
2006 if (auto* seen = binding.replay_seen; seen && !seen->load(std::memory_order_relaxed))
2007 seen->store(true, std::memory_order_relaxed);
2008 return &binding;
1609 } 2009 }
1610 2010
1611 // Called from prepare; protected by views_mutex_ so concurrent shared_lock readers are safe. 2011 // Called from prepare; protected by views_mutex_ so concurrent shared_lock readers are safe.
@@ -1693,18 +2093,94 @@ private:
1693 return framebuffer; 2093 return framebuffer;
1694 } 2094 }
1695 2095
2096 std::uint64_t poll_retirement_locked(VkResult& result) {
2097 return retire_tickets_.completed([&](VkSemaphore semaphore, std::uint64_t value) {
2098 std::uint64_t done = 0;
2099 result = observe_result(vk.vkGetSemaphoreCounterValue(device_, semaphore, &done),
2100 "vkGetSemaphoreCounterValue (retirement)");
2101 return result == VK_SUCCESS && done >= value;
2102 });
2103 }
2104
2105 void watch_queue_progress(std::stop_token stop) {
2106 using Watch = SubmissionProgressWatch;
2107 Watch watch;
2108 std::uint64_t retired = 0;
2109 std::mutex timer_mutex;
2110 std::condition_variable_any timer;
2111 std::unique_lock timer_lock(timer_mutex);
2112 while (!stop.stop_requested()) {
2113 timer.wait_for(timer_lock, stop, std::chrono::seconds(1), [] { return false; });
2114 if (stop.stop_requested() || is_device_lost()) break;
2115 auto state = Watch::State::submit_lock_busy;
2116 VkResult result = VK_SUCCESS;
2117 std::uint64_t submitted;
2118 {
2119 // Keep queue timelines alive as in completed_retire_ticket(). A submit or idle wait
2120 // blocked inside the driver can hold this mutex indefinitely.
2121 std::unique_lock lock(submit_mutex_, std::try_to_lock);
2122 submitted = submitted_retire_ticket();
2123 if (lock.owns_lock()) {
2124 if (is_device_lost()) break;
2125 retired = poll_retirement_locked(result);
2126 state = retired < submitted ? Watch::State::pending : Watch::State::idle;
2127 }
2128 }
2129 if (result == VK_ERROR_DEVICE_LOST) {
2130 mark_device_lost();
2131 break;
2132 }
2133 // A failed counter query does not measure GPU progress.
2134 if (result != VK_SUCCESS) state = Watch::State::idle;
2135 // LEONIDA_HANG_EXIT_S=<s> (for boots): work pending and retirement still for s seconds is a GPU hang
2136 // the driver may recover from without Vulkan ever reporting the device lost (Xid 109: the title then
2137 // waits forever, the window frozen). The stall is reported (with the checkpoints under
2138 // LEONIDA_STALL_CHECKPOINTS=1) and the process ends, so the boot does not sit to its time limit.
2139 {
2140 static const long hang_exit_s = [] {
2141 const char* v = std::getenv("LEONIDA_HANG_EXIT_S");
2142 return v && *v ? std::strtol(v, nullptr, 10) : 0l;
2143 }();
2144 static std::uint64_t last_retired = ~std::uint64_t(0);
2145 static auto still_since = Watch::Clock::now();
2146 const auto now = Watch::Clock::now();
2147 if (state != Watch::State::pending || retired != last_retired) {
2148 last_retired = retired;
2149 still_since = now;
2150 } else if (hang_exit_s > 0 && now - still_since >= std::chrono::seconds(hang_exit_s)) {
2151 std::fprintf(stderr, "[rt] hang watchdog: queue retirement still for %ld s with work pending "
2152 "(submitted ticket %llu, retired %llu): ending the process\n",
2153 hang_exit_s, static_cast<unsigned long long>(submitted),
2154 static_cast<unsigned long long>(retired));
2155 device_fault_->report_stall("hang watchdog", submitted, retired);
2156 std::fflush(stderr);
2157 std::_Exit(0x47); // 'HANG' (portable immediate process termination)
2158 }
2159 }
2160 if (watch.sample(state, retired, Watch::Clock::now()))
2161 device_fault_->report_stall(state == Watch::State::pending ? "queue retirement has not advanced"
2162 : "could not sample the submit lock",
2163 submitted, retired);
2164 }
2165 }
2166
1696 VkDevice device_; 2167 VkDevice device_;
1697 bool loaded_ = false; 2168 bool loaded_ = false;
1698 bool ray_tracing_ = false; 2169 bool ray_tracing_ = false;
1699 std::unique_ptr<XdxrBuilder> xdxr_; // set: acceleration structures are XDXR BVH4 records 2170 std::unique_ptr<XdxrBuilder> xdxr_; // set: acceleration structures are XDXR BVH4 records
1700 std::atomic<bool> device_lost_{false}; 2171 std::atomic<bool> device_lost_{false};
2172 alignas(64) std::shared_mutex pipeline_mutex_; // shared for prepare/compile/emit pipeline lookups, unique for add/remove/workers
1701 alignas(64) std::shared_mutex resource_mutex_; // shared for prepare lookups, unique for add/remove 2173 alignas(64) std::shared_mutex resource_mutex_; // shared for prepare lookups, unique for add/remove
1702 alignas(64) std::mutex tracker_mutex_; 2174 alignas(64) std::mutex tracker_mutex_;
1703 alignas(64) std::mutex views_mutex_; 2175 alignas(64) std::mutex views_mutex_;
1704 alignas(64) std::mutex submit_mutex_; 2176 alignas(64) std::mutex submit_mutex_;
2177 bool image_work_pending_ = false; // under submit_mutex_
2178 HostTextureStats host_texture_stats_; // under submit_mutex_
1705 RetireTickets<VkSemaphore> retire_tickets_; 2179 RetireTickets<VkSemaphore> retire_tickets_;
1706 std::atomic<std::uint64_t> submitted_ticket_{0}; 2180 std::atomic<std::uint64_t> submitted_ticket_{0};
1707 DeferredDeletionQueue deletion_queue_; 2181 DeferredDeletionQueue deletion_queue_;
2182 std::unique_ptr<DeviceFaultDiagnostics> device_fault_;
2183 std::jthread progress_watch_;
1708 std::unique_ptr<FenceWaitDispatcher> fence_dispatcher_; 2184 std::unique_ptr<FenceWaitDispatcher> fence_dispatcher_;
1709 QueueHolds<VkSemaphore> holds_; 2185 QueueHolds<VkSemaphore> holds_;
1710 std::unordered_map<ResourceId, ResourceBinding> resources_; 2186 std::unordered_map<ResourceId, ResourceBinding> resources_;
@@ -1712,6 +2188,7 @@ private:
1712 std::unordered_map<ResourceId, std::shared_ptr<SparseResource>> sparse_resources_; 2188 std::unordered_map<ResourceId, std::shared_ptr<SparseResource>> sparse_resources_;
1713 std::unordered_map<std::uintptr_t, ComputePipeline> pipelines_; 2189 std::unordered_map<std::uintptr_t, ComputePipeline> pipelines_;
1714 std::unordered_map<std::uintptr_t, GraphicsPipeline> graphics_pipelines_; 2190 std::unordered_map<std::uintptr_t, GraphicsPipeline> graphics_pipelines_;
2191 std::unique_ptr<PipelineWorkers> pipeline_workers_;
1715 std::unordered_map<std::uint64_t, VkAccelerationStructureKHR> acceleration_structures_; 2192 std::unordered_map<std::uint64_t, VkAccelerationStructureKHR> acceleration_structures_;
1716 LayoutTracker tracker_; 2193 LayoutTracker tracker_;
1717 std::mutex storage_mutex_; // a leaf lock: guards storage_pending_ and zero_pending_ only 2194 std::mutex storage_mutex_; // a leaf lock: guards storage_pending_ and zero_pending_ only
@@ -1732,6 +2209,12 @@ private:
1732 std::map<std::tuple<VkFormat, std::uint32_t, VkImageLayout, VkImageLayout, VkResolveModeFlagBits>, VkRenderPass> 2209 std::map<std::tuple<VkFormat, std::uint32_t, VkImageLayout, VkImageLayout, VkResolveModeFlagBits>, VkRenderPass>
1733 resolve_passes_; 2210 resolve_passes_;
1734 std::map<std::tuple<VkImage, VkImage, VkImageView, VkImageView, VkRenderPass>, VkFramebuffer> resolve_framebuffers_; 2211 std::map<std::tuple<VkImage, VkImage, VkImageView, VkImageView, VkRenderPass>, VkFramebuffer> resolve_framebuffers_;
2212 std::function<void()> before_execute_;
2213 InputProbe input_probe_;
2214 TableScanner table_scanner_;
2215 GeometryProvider geometry_provider_;
2216 std::function<bool(std::uint64_t,std::uint32_t)> sample_table_resolver_;
2217 std::function<bool()> cpu_texture_publisher_;
1735 std::function<bool(VkCommandBuffer)> bindless_prepare_; 2218 std::function<bool(VkCommandBuffer)> bindless_prepare_;
1736 std::function<VkDescriptorSet()> bindless_current_; 2219 std::function<VkDescriptorSet()> bindless_current_;
1737 bool bindless_upload_pending_ = false; // tracker_mutex_ 2220 bool bindless_upload_pending_ = false; // tracker_mutex_
@@ -1747,12 +2230,16 @@ private:
1747 double timestamp_period_ = 0; 2230 double timestamp_period_ = 0;
1748 bool order_timestamp_copies_ = false; 2231 bool order_timestamp_copies_ = false;
1749 VkPhysicalDeviceMemoryProperties occlusion_resolve_memory_{}; 2232 VkPhysicalDeviceMemoryProperties occlusion_resolve_memory_{};
2233 label::Completions gpu_labels_;
1750 ReplayFunctions replay_; 2234 ReplayFunctions replay_;
1751 std::unique_ptr<PredicateReducer> predicate_reducer_; 2235 std::unique_ptr<PredicateReducer> predicate_reducer_;
1752 std::unique_ptr<PredicatedBufferCopier> predicated_copier_; 2236 std::unique_ptr<PredicatedBufferCopier> predicated_copier_;
1753 std::unique_ptr<IndirectDispatchCounter> counted_dispatch_; 2237 std::unique_ptr<IndirectDispatchCounter> counted_dispatch_;
2238 std::unique_ptr<QuadIndexExpander> quad_indices_;
2239 std::unique_ptr<IndirectArgumentClamp> indirect_clamp_;
1754 std::uint32_t predicate_family_ = UINT32_MAX; 2240 std::uint32_t predicate_family_ = UINT32_MAX;
1755 std::uint32_t transfer_only_family_ = UINT32_MAX; 2241 std::uint32_t transfer_only_family_ = UINT32_MAX;
2242 std::uint32_t graphics_family_ = UINT32_MAX;
1756 DebugLabelFunctions labels_; 2243 DebugLabelFunctions labels_;
1757}; 2244};
1758#ifdef _MSC_VER 2245#ifdef _MSC_VER
@@ -1784,12 +2271,29 @@ public:
1784 std::uint64_t completed() const { 2271 std::uint64_t completed() const {
1785 if (context_.is_device_lost()) return UINT64_MAX; 2272 if (context_.is_device_lost()) return UINT64_MAX;
1786 std::uint64_t value = 0; 2273 std::uint64_t value = 0;
1787 const VkResult result = context_.vk.vkGetSemaphoreCounterValue(context_.device(), semaphore_, &value); 2274 const VkResult result = context_.observe_result(
2275 context_.vk.vkGetSemaphoreCounterValue(context_.device(), semaphore_, &value), "vkGetSemaphoreCounterValue");
1788 if (result == VK_ERROR_DEVICE_LOST) { 2276 if (result == VK_ERROR_DEVICE_LOST) {
1789 context_.mark_device_lost(); 2277 context_.mark_device_lost();
1790 return UINT64_MAX; 2278 return UINT64_MAX;
1791 } 2279 }
1792 if (result != VK_SUCCESS) return 0; 2280 if (result != VK_SUCCESS) return 0;
2281 if (value == UINT64_MAX) {
2282 // A lost device can show itself here first: measured on NVIDIA 621.24 and reported on 617.14, the counter
2283 // query succeeds with UINT64_MAX (and vkWaitSemaphores with a zero timeout succeeds too) before any call
2284 // has returned VK_ERROR_DEVICE_LOST. vkDeviceWaitIdle is what then says so, and it is also what a driver
2285 // needs to have returned before vkGetDeviceFaultInfoEXT answers (LEONIDA_DEVICE_FAULT=1). When
2286 // vkDeviceWaitIdle succeeds, nothing is recorded and the value is returned as the driver gave it.
2287 VkResult idle = VK_SUCCESS;
2288 {
2289 std::lock_guard lock(context_.submit_mutex());
2290 idle = context_.observe_result(context_.vk.vkDeviceWaitIdle(context_.device()),
2291 "vkDeviceWaitIdle (a fence counter of UINT64_MAX)");
2292 }
2293 if (idle == VK_ERROR_DEVICE_LOST)
2294 context_.mark_device_lost(
2295 "a fence's counter read UINT64_MAX and vkDeviceWaitIdle then returned VK_ERROR_DEVICE_LOST");
2296 }
1793 return value; 2297 return value;
1794 } 2298 }
1795 2299
@@ -1800,13 +2304,15 @@ public:
1800 // it marks the context lost on a query error and prevents the dispatcher from waking. 2304 // it marks the context lost on a query error and prevents the dispatcher from waking.
1801 if (context_.is_device_lost()) return false; 2305 if (context_.is_device_lost()) return false;
1802 std::uint64_t current = 0; 2306 std::uint64_t current = 0;
1803 if (context_.vk.vkGetSemaphoreCounterValue(context_.device(), semaphore_, &current) == VK_SUCCESS && 2307 if (context_.observe_result(context_.vk.vkGetSemaphoreCounterValue(context_.device(), semaphore_, &current),
2308 "vkGetSemaphoreCounterValue") == VK_SUCCESS &&
1804 value <= current) 2309 value <= current)
1805 return false; 2310 return false;
1806 VkSemaphoreSignalInfo info{VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO}; 2311 VkSemaphoreSignalInfo info{VK_STRUCTURE_TYPE_SEMAPHORE_SIGNAL_INFO};
1807 info.semaphore = semaphore_; 2312 info.semaphore = semaphore_;
1808 info.value = value; 2313 info.value = value;
1809 const VkResult result = context_.vk.vkSignalSemaphore(context_.device(), &info); 2314 const VkResult result = context_.observe_result(context_.vk.vkSignalSemaphore(context_.device(), &info),
2315 "vkSignalSemaphore");
1810 if (result == VK_ERROR_DEVICE_LOST) context_.mark_device_lost(); 2316 if (result == VK_ERROR_DEVICE_LOST) context_.mark_device_lost();
1811 if (result != VK_SUCCESS) return false; 2317 if (result != VK_SUCCESS) return false;
1812 context_.holds().signaled(semaphore_, value); // queues that held a batch for this value run it now 2318 context_.holds().signaled(semaphore_, value); // queues that held a batch for this value run it now
@@ -1820,7 +2326,8 @@ public:
1820 info.semaphoreCount = 1; 2326 info.semaphoreCount = 1;
1821 info.pSemaphores = &semaphore_; 2327 info.pSemaphores = &semaphore_;
1822 info.pValues = &value; 2328 info.pValues = &value;
1823 const VkResult result = context_.vk.vkWaitSemaphores(context_.device(), &info, timeout_ns); 2329 const VkResult result = context_.observe_result(
2330 context_.vk.vkWaitSemaphores(context_.device(), &info, timeout_ns), "vkWaitSemaphores");
1824 if (result == VK_ERROR_DEVICE_LOST) context_.mark_device_lost(); 2331 if (result == VK_ERROR_DEVICE_LOST) context_.mark_device_lost();
1825 return result == VK_SUCCESS; 2332 return result == VK_SUCCESS;
1826 } 2333 }
@@ -1893,7 +2400,7 @@ public:
1893 if (queue_) { 2400 if (queue_) {
1894 std::lock_guard lock(context_.submit_mutex()); 2401 std::lock_guard lock(context_.submit_mutex());
1895 for (; open_labels_; --open_labels_) context_.labels_.queue_end(queue_); 2402 for (; open_labels_; --open_labels_) context_.labels_.queue_end(queue_);
1896 const VkResult idle_result = vk.vkQueueWaitIdle(queue_); 2403 const VkResult idle_result = context_.observe_result(vk.vkQueueWaitIdle(queue_), "vkQueueWaitIdle");
1897 if (idle_result == VK_SUCCESS) { 2404 if (idle_result == VK_SUCCESS) {
1898 if (progress_) context_.retire_queue_idle_locked(progress_); 2405 if (progress_) context_.retire_queue_idle_locked(progress_);
1899 } else { 2406 } else {
@@ -1904,6 +2411,7 @@ public:
1904 std::lock_guard lock(context_.tracker_mutex_); 2411 std::lock_guard lock(context_.tracker_mutex_);
1905 if (context_.depth24_) context_.depth24_->forget(progress_); // its scratch is idle now 2412 if (context_.depth24_) context_.depth24_->forget(progress_); // its scratch is idle now
1906 if (context_.scratch_) context_.scratch_->forget(progress_); 2413 if (context_.scratch_) context_.scratch_->forget(progress_);
2414 if (context_.indirect_clamp_) context_.indirect_clamp_->forget(progress_);
1907 } 2415 }
1908 if (progress_) { 2416 if (progress_) {
1909 // This queue is idle, so whatever initialisation it published (storage images, zero-filled buffers) has 2417 // This queue is idle, so whatever initialisation it published (storage images, zero-filled buffers) has
@@ -2014,18 +2522,21 @@ public:
2014 using PinFn = std::function<std::shared_ptr<void>()>; 2522 using PinFn = std::function<std::shared_ptr<void>()>;
2015 2523
2016 ReplayResult execute(std::span<const CommandList* const> lists, const PinFn& pin = {}) { 2524 ReplayResult execute(std::span<const CommandList* const> lists, const PinFn& pin = {}) {
2525 auto* diagnostics = context_.device_fault();
2526 const auto execute_call = diagnostics ? diagnostics->next_execute_call() : 0;
2017 ReplayResult result = ReplayResult::success; 2527 ReplayResult result = ReplayResult::success;
2018 bool held = false; 2528 bool held = false;
2019 std::vector<std::shared_ptr<void>> retired; // destroyed after state_mutex_ is released 2529 std::vector<std::shared_ptr<void>> retired; // destroyed after state_mutex_ is released
2020 { 2530 {
2021 std::lock_guard state(state_mutex_); 2531 std::lock_guard state(state_mutex_);
2022 if (!must_hold()) { 2532 if (!must_hold()) {
2023 result = execute_now(lists); 2533 result = execute_now(lists, execute_call);
2024 } else if (context_.is_device_lost()) { 2534 } else if (context_.is_device_lost()) {
2025 result = ReplayResult::unsupported; 2535 result = queue_unsupported(__LINE__);
2026 } else { 2536 } else {
2027 Deferred op; 2537 Deferred op;
2028 op.kind = Deferred::Kind::batch; 2538 op.kind = Deferred::Kind::batch;
2539 op.execute_call = execute_call;
2029 op.lists.reserve(lists.size()); 2540 op.lists.reserve(lists.size());
2030 for (const CommandList* list : lists) op.lists.push_back(*list); 2541 for (const CommandList* list : lists) op.lists.push_back(*list);
2031 if (pin) op.pins.push_back(pin()); 2542 if (pin) op.pins.push_back(pin());
@@ -2104,7 +2615,7 @@ public:
2104 2615
2105 bool idle() { 2616 bool idle() {
2106 std::lock_guard lock(context_.submit_mutex()); 2617 std::lock_guard lock(context_.submit_mutex());
2107 return context_.vk.vkQueueWaitIdle(queue_) == VK_SUCCESS; 2618 return context_.observe_result(context_.vk.vkQueueWaitIdle(queue_), "vkQueueWaitIdle") == VK_SUCCESS;
2108 } 2619 }
2109 2620
2110private: 2621private:
@@ -2112,6 +2623,7 @@ private:
2112 // state_mutex_ (including the deferred/held release paths), so no extra lock is needed. 2623 // state_mutex_ (including the deferred/held release paths), so no extra lock is needed.
2113 std::vector<KhrInstanceStage> khr_stage_pool_; 2624 std::vector<KhrInstanceStage> khr_stage_pool_;
2114 std::vector<KhrAsQueryPool> khr_as_query_pool_; 2625 std::vector<KhrAsQueryPool> khr_as_query_pool_;
2626 std::vector<TitleVaAliases::Mapping> xdxr_ranges_; // stage_xdxr_table's snapshot, kept for its capacity
2115 2627
2116 void destroy_khr_stages(std::vector<KhrInstanceStage>& stages) { 2628 void destroy_khr_stages(std::vector<KhrInstanceStage>& stages) {
2117 for (const auto& stage : stages) { 2629 for (const auto& stage : stages) {
@@ -2180,6 +2692,122 @@ private:
2180 return true; 2692 return true;
2181 } 2693 }
2182 2694
2695 void destroy_stage(KhrInstanceStage& stage) {
2696 if (stage.memory) context_.vk.vkFreeMemory(context_.device(), stage.memory, nullptr);
2697 if (stage.buffer) context_.vk.vkDestroyBuffer(context_.device(), stage.buffer, nullptr);
2698 stage = {};
2699 }
2700
2701 // A host-visible, device-addressable stage of at least `bytes`: a completed one of the same usage from the pool
2702 // when one is large enough (a per-frame TLAS rebuild then reuses the same buffer and memory instead of making a
2703 // new vkAllocateMemory call every frame), a new one otherwise. False, with `stage` empty, when none can be made.
2704 bool acquire_stage(std::uint64_t bytes, VkBufferUsageFlags usage, KhrInstanceStage& stage) {
2705 const auto& funcs = context_.vk;
2706 stage = {};
2707 if (!funcs.vkCreateBuffer || !funcs.vkDestroyBuffer || !funcs.vkGetBufferMemoryRequirements ||
2708 !funcs.vkAllocateMemory || !funcs.vkFreeMemory || !funcs.vkBindBufferMemory || !bytes)
2709 return false;
2710 for (auto it = khr_stage_pool_.begin(); it != khr_stage_pool_.end(); ++it) {
2711 if (it->size >= bytes && it->usage == usage) {
2712 stage = std::move(*it);
2713 khr_stage_pool_.erase(it);
2714 return true;
2715 }
2716 }
2717 VkBufferCreateInfo info{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO};
2718 info.size = bytes;
2719 info.usage = usage;
2720 if (funcs.vkCreateBuffer(context_.device(), &info, nullptr, &stage.buffer) != VK_SUCCESS) {
2721 stage = {};
2722 return false;
2723 }
2724 VkMemoryRequirements requirements{};
2725 funcs.vkGetBufferMemoryRequirements(context_.device(), stage.buffer, &requirements);
2726 const auto& memory = context_.occlusion_resolve_memory_;
2727 constexpr VkMemoryPropertyFlags host_flags =
2728 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
2729 std::uint32_t type = memory.memoryTypeCount;
2730 for (std::uint32_t i = 0; i < memory.memoryTypeCount; ++i) {
2731 if (!(requirements.memoryTypeBits & (1u << i))) continue;
2732 if ((memory.memoryTypes[i].propertyFlags & host_flags) == host_flags) {
2733 type = i;
2734 break;
2735 }
2736 }
2737 VkMemoryAllocateFlagsInfo flags{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO};
2738 flags.flags = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT;
2739 VkMemoryAllocateInfo allocation{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, &flags};
2740 allocation.allocationSize = requirements.size;
2741 allocation.memoryTypeIndex = type;
2742 if (type == memory.memoryTypeCount ||
2743 funcs.vkAllocateMemory(context_.device(), &allocation, nullptr, &stage.memory) != VK_SUCCESS ||
2744 funcs.vkBindBufferMemory(context_.device(), stage.buffer, stage.memory, 0) != VK_SUCCESS) {
2745 destroy_stage(stage);
2746 return false;
2747 }
2748 stage.size = bytes;
2749 stage.usage = usage;
2750 return true;
2751 }
2752
2753 // The table an XDXR TLAS build translates its instances' BLAS addresses with (xdxr_build.comp blas_address):
2754 // every range of the title's memory the layer reaches through a copy (src/title_va_alias.h), as 24-byte entries
2755 // {title VA, end, shader VA} in title-VA order, staged like the KHR pointer lists and kept until the submission
2756 // completes. `count` 0 and `address` 0 when there are no ranges, or the stage could not be made.
2757 ReplayResult stage_xdxr_table(std::vector<KhrInstanceStage>& stages, VkDeviceAddress& address,
2758 std::uint32_t& count) {
2759 const auto& funcs = context_.vk;
2760 address = 0;
2761 count = 0;
2762 // Without a table the build still runs: a BLAS in the title's memory is then unreachable (an instance with
2763 // no BLAS), never read through heap_base + its title address.
2764 const auto none = [] {
2765 static std::atomic<bool> logged{false};
2766 if (!logged.exchange(true))
2767 std::fprintf(stderr, "[rt] d3d12: could not stage the title-memory table of an XDXR TLAS build; its "
2768 "instances in the title's memory get no BLAS\n");
2769 return ReplayResult::success;
2770 };
2771 // A member, not thread_local: a C++ thread_local with a destructor in gta6rt.exe adds TLS callbacks to the
2772 // image the loader's TLS index-0 move must not have (pe_loader.cpp reserve_tls_index0).
2773 auto& ranges = xdxr_ranges_;
2774 title_va_aliases().mappings(ranges);
2775 if (ranges.empty()) return ReplayResult::success;
2776 if (ranges.size() > 0xffffffffull / 24 || !funcs.vkMapMemory || !funcs.vkUnmapMemory ||
2777 !funcs.vkGetBufferDeviceAddress)
2778 return none();
2779 const std::uint64_t bytes = 24ull * ranges.size();
2780 KhrInstanceStage stage{};
2781 if (!acquire_stage(bytes, VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT | VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
2782 stage))
2783 return none();
2784 void* mapped = nullptr;
2785 if (funcs.vkMapMemory(context_.device(), stage.memory, 0, bytes, 0, &mapped) != VK_SUCCESS) {
2786 destroy_stage(stage);
2787 return none();
2788 }
2789 auto* out = static_cast<std::uint8_t*>(mapped);
2790 for (const auto& range : ranges) {
2791 const std::uint64_t entry[3] = {range.title_va, range.end, range.shader_va};
2792 std::memcpy(out, entry, sizeof(entry));
2793 out += sizeof(entry);
2794 }
2795 funcs.vkUnmapMemory(context_.device(), stage.memory);
2796 if (!stage.address) {
2797 VkBufferDeviceAddressInfo info{VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO};
2798 info.buffer = stage.buffer;
2799 stage.address = funcs.vkGetBufferDeviceAddress(context_.device(), &info);
2800 }
2801 if (!stage.address) {
2802 destroy_stage(stage);
2803 return none();
2804 }
2805 address = stage.address;
2806 count = std::uint32_t(ranges.size());
2807 stages.push_back(std::move(stage));
2808 return ReplayResult::success;
2809 }
2810
2183 // A KHR TLAS built with D3D12_ELEMENTS_LAYOUT_ARRAY_OF_POINTERS holds console VAs in its pointer list; Vulkan 2811 // A KHR TLAS built with D3D12_ELEMENTS_LAYOUT_ARRAY_OF_POINTERS holds console VAs in its pointer list; Vulkan
2184 // reads those 8-byte entries as device addresses. Stage a translated copy in our own host-visible buffer instead 2812 // reads those 8-byte entries as device addresses. Stage a translated copy in our own host-visible buffer instead
2185 // of editing the guest's input. The caller keeps the stage until the submission that builds with it completes. 2813 // of editing the guest's input. The caller keeps the stage until the submission that builds with it completes.
@@ -2190,68 +2818,25 @@ private:
2190 !funcs.vkAllocateMemory || !funcs.vkFreeMemory || !funcs.vkBindBufferMemory || !funcs.vkMapMemory || 2818 !funcs.vkAllocateMemory || !funcs.vkFreeMemory || !funcs.vkBindBufferMemory || !funcs.vkMapMemory ||
2191 !funcs.vkUnmapMemory || !funcs.vkGetBufferDeviceAddress || !vk.host_at || !vk.buffer_at || 2819 !funcs.vkUnmapMemory || !funcs.vkGetBufferDeviceAddress || !vk.host_at || !vk.buffer_at ||
2192 !build.instance_count) 2820 !build.instance_count)
2193 return ReplayResult::unsupported; 2821 return queue_unsupported(__LINE__);
2194 const std::uint64_t bytes = 8ull * build.instance_count; 2822 const std::uint64_t bytes = 8ull * build.instance_count;
2195 const std::uint8_t* guest = nullptr; 2823 const std::uint8_t* guest = nullptr;
2196 const HostReadStatus status = vk.host_at(build.instances_va, bytes, guest); 2824 const HostReadStatus status = vk.host_at(build.instances_va, bytes, guest);
2197 if (status == HostReadStatus::not_cpu_written) return ReplayResult::unsupported; 2825 if (status == HostReadStatus::not_cpu_written) return queue_unsupported(__LINE__);
2198 if (status != HostReadStatus::ok) return ReplayResult::invalid_copy; 2826 if (status != HostReadStatus::ok) return ReplayResult::invalid_copy;
2199 2827
2200 KhrInstanceStage stage{}; 2828 KhrInstanceStage stage{};
2201 const auto discard = [&] { 2829 const auto discard = [&] { destroy_stage(stage); };
2202 if (stage.memory) funcs.vkFreeMemory(context_.device(), stage.memory, nullptr); 2830 if (!acquire_stage(bytes,
2203 if (stage.buffer) funcs.vkDestroyBuffer(context_.device(), stage.buffer, nullptr); 2831 VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT |
2204 }; 2832 VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR,
2205 // Reuse a completed stage that is already large enough. A per-frame TLAS rebuild then reuses the same buffer 2833 stage))
2206 // and memory instead of making a new vkAllocateMemory call every frame. 2834 return queue_unsupported(__LINE__);
2207 for (auto it = khr_stage_pool_.begin(); it != khr_stage_pool_.end(); ++it) {
2208 if (it->size >= bytes) {
2209 stage = std::move(*it);
2210 khr_stage_pool_.erase(it);
2211 break;
2212 }
2213 }
2214 if (!stage.buffer) {
2215 VkBufferCreateInfo info{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO};
2216 info.size = bytes;
2217 info.usage = VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT |
2218 VK_BUFFER_USAGE_ACCELERATION_STRUCTURE_BUILD_INPUT_READ_ONLY_BIT_KHR;
2219 if (funcs.vkCreateBuffer(context_.device(), &info, nullptr, &stage.buffer) != VK_SUCCESS)
2220 return ReplayResult::unsupported;
2221 VkMemoryRequirements requirements{};
2222 funcs.vkGetBufferMemoryRequirements(context_.device(), stage.buffer, &requirements);
2223 const auto& memory = context_.occlusion_resolve_memory_;
2224 constexpr VkMemoryPropertyFlags host_flags =
2225 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
2226 std::uint32_t type = memory.memoryTypeCount;
2227 for (std::uint32_t i = 0; i < memory.memoryTypeCount; ++i) {
2228 if (!(requirements.memoryTypeBits & (1u << i))) continue;
2229 if ((memory.memoryTypes[i].propertyFlags & host_flags) == host_flags) {
2230 type = i;
2231 break;
2232 }
2233 }
2234 if (type == memory.memoryTypeCount) {
2235 discard();
2236 return ReplayResult::unsupported;
2237 }
2238 VkMemoryAllocateFlagsInfo flags{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_FLAGS_INFO};
2239 flags.flags = VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT;
2240 VkMemoryAllocateInfo allocation{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO, &flags};
2241 allocation.allocationSize = requirements.size;
2242 allocation.memoryTypeIndex = type;
2243 if (funcs.vkAllocateMemory(context_.device(), &allocation, nullptr, &stage.memory) != VK_SUCCESS ||
2244 funcs.vkBindBufferMemory(context_.device(), stage.buffer, stage.memory, 0) != VK_SUCCESS) {
2245 discard();
2246 return ReplayResult::unsupported;
2247 }
2248 stage.size = bytes;
2249 }
2250 2835
2251 void* mapped = nullptr; 2836 void* mapped = nullptr;
2252 if (funcs.vkMapMemory(context_.device(), stage.memory, 0, bytes, 0, &mapped) != VK_SUCCESS) { 2837 if (funcs.vkMapMemory(context_.device(), stage.memory, 0, bytes, 0, &mapped) != VK_SUCCESS) {
2253 discard(); 2838 discard();
2254 return ReplayResult::unsupported; 2839 return queue_unsupported(__LINE__);
2255 } 2840 }
2256 // Validate and translate in one pass straight into the staging buffer; no second vector of addresses. 2841 // Validate and translate in one pass straight into the staging buffer; no second vector of addresses.
2257 for (std::uint32_t i = 0; i < build.instance_count; ++i) { 2842 for (std::uint32_t i = 0; i < build.instance_count; ++i) {
@@ -2277,21 +2862,36 @@ private:
2277 stage.address = funcs.vkGetBufferDeviceAddress(context_.device(), &device_address); 2862 stage.address = funcs.vkGetBufferDeviceAddress(context_.device(), &device_address);
2278 if (!stage.address) { 2863 if (!stage.address) {
2279 discard(); 2864 discard();
2280 return ReplayResult::unsupported; 2865 return queue_unsupported(__LINE__);
2281 } 2866 }
2282 stages.push_back(std::move(stage)); 2867 stages.push_back(std::move(stage));
2283 address = stages.back().address; 2868 address = stages.back().address;
2284 return ReplayResult::success; 2869 return ReplayResult::success;
2285 } 2870 }
2286 2871
2287 ReplayResult execute_now(std::span<const CommandList* const> lists) { 2872 ReplayResult execute_now(std::span<const CommandList* const> lists, std::uint64_t execute_call) {
2288 if (context_.is_device_lost() || !wait_for_room()) return ReplayResult::unsupported; 2873 {
2874 const submit_phases::Scope waited(submit_phases::wait_room);
2875 if (context_.is_device_lost() || !wait_for_room()) return queue_unsupported(__LINE__);
2876 }
2877 if (context_.before_execute_) context_.before_execute_();
2878 // The rest of this call is the replay phase; the submission is counted when it returns, however it returns.
2879 struct Replayed {
2880 std::int64_t start = submit_phases::now_ns();
2881 ~Replayed() {
2882 submit_phases::add(submit_phases::replay, std::uint64_t(submit_phases::now_ns() - start));
2883 submit_phases::submitted();
2884 }
2885 } replayed;
2886 if (context_.input_probe_)
2887 context_.input_probe_(lists, execute_call, kind_ == QueueKind::direct ? "direct" :
2888 kind_ == QueueKind::compute ? "compute" : "copy");
2289 if (kind_ != QueueKind::direct) 2889 if (kind_ != QueueKind::direct)
2290 for (const auto* list : lists) 2890 for (const auto* list : lists)
2291 for (const auto& command : list->commands()) 2891 for (const auto& command : list->commands())
2292 if (std::holds_alternative<ClearRenderTarget>(command) || 2892 if (std::holds_alternative<ClearRenderTarget>(command) ||
2293 std::holds_alternative<ClearDepthStencil>(command)) 2893 std::holds_alternative<ClearDepthStencil>(command))
2294 return ReplayResult::unsupported; 2894 return queue_unsupported(__LINE__);
2295 VkCommandBuffer command_buffer = VK_NULL_HANDLE; 2895 VkCommandBuffer command_buffer = VK_NULL_HANDLE;
2296 struct KhrGuard { 2896 struct KhrGuard {
2297 VulkanQueue* queue; 2897 VulkanQueue* queue;
@@ -2303,11 +2903,15 @@ private:
2303 } 2903 }
2304 } khr_guard{this}; 2904 } khr_guard{this};
2305 std::function<void(bool)> bindless_commit; 2905 std::function<void(bool)> bindless_commit;
2306 // Lock hierarchy: resource_mutex_ -> tracker_mutex_ -> submit_mutex_. 2906 // Lock hierarchy: state_mutex_ -> pipeline_mutex_ -> resource_mutex_ -> tracker_mutex_ -> submit_mutex_.
2307 // Shared read-lock allows concurrent prepare() across queues; tracker_mutex_ is acquired lazily during 2907 // Shared pipeline_lock keeps registered pipelines, pipeline_names, and pipeline_workers_ alive across
2308 // prepare() only if a list actually converts a depth24_as_float copy, and otherwise right before 2908 // preparation, compilation, and emit. Shared resource_lock allows concurrent prepare() across queues and is
2309 // bindless_prepare_/emit() through submit() so bindless flushes, layout emits, and submissions stay in order. 2909 // released while unbuilt pipelines compile so add_resource()/remove_resource() never stall behind shader
2310 std::shared_lock resource_lock(context_.resource_mutex_); 2910 // compiles; tracker_mutex_ is acquired lazily during prepare() only if a list uses a shared helper, and
2911 // otherwise right before bindless_prepare_/emit() through submit() so bindless flushes, layout emits, and
2912 // submissions stay in order.
2913 std::shared_lock pipeline_lock(context_.pipeline_mutex_);
2914 std::shared_lock resource_lock(context_.resource_mutex_, std::defer_lock);
2311 std::unique_lock tracker_lock(context_.tracker_mutex_, std::defer_lock); 2915 std::unique_lock tracker_lock(context_.tracker_mutex_, std::defer_lock);
2312 // Declared after tracker_lock so any early return after depth24_->prepare() retires uncommitted scratch/pools 2916 // Declared after tracker_lock so any early return after depth24_->prepare() retires uncommitted scratch/pools
2313 // with ticket 0 while tracker_lock is still held. 2917 // with ticket 0 while tracker_lock is still held.
@@ -2318,7 +2922,7 @@ private:
2318 ~Depth24Guard() { 2922 ~Depth24Guard() {
2319 if (active && d24) d24->retire(progress, 0); 2923 if (active && d24) d24->retire(progress, 0);
2320 } 2924 }
2321 } depth24_guard{context_.depth24_.get(), progress_, false}; 2925 } depth24_guard{nullptr, progress_, false};
2322 struct ScratchGuard { // the same for the copy scratch 2926 struct ScratchGuard { // the same for the copy scratch
2323 ScratchBuffers* scratch = nullptr; 2927 ScratchBuffers* scratch = nullptr;
2324 VkSemaphore progress = VK_NULL_HANDLE; 2928 VkSemaphore progress = VK_NULL_HANDLE;
@@ -2326,9 +2930,16 @@ private:
2326 ~ScratchGuard() { 2930 ~ScratchGuard() {
2327 if (active && scratch) scratch->retire(progress, 0); 2931 if (active && scratch) scratch->retire(progress, 0);
2328 } 2932 }
2329 } scratch_guard{context_.scratch_.get(), progress_, false}; 2933 } scratch_guard{nullptr, progress_, false};
2934 struct ClampGuard { // and for the ExecuteIndirect clamp's record scratch
2935 IndirectArgumentClamp* clamp = nullptr;
2936 VkSemaphore progress = VK_NULL_HANDLE;
2937 bool active = false;
2938 ~ClampGuard() {
2939 if (active && clamp) clamp->retire(progress, 0);
2940 }
2941 } clamp_guard{nullptr, progress_, false};
2330 const bool transfer_only = family_ == context_.transfer_only_family_; 2942 const bool transfer_only = family_ == context_.transfer_only_family_;
2331 if (!transfer_only) bindless_commit = context_.bindless_commit_;
2332 // Kept between executions: prepare refills each list's entries in the storage the last execution left, where 2943 // Kept between executions: prepare refills each list's entries in the storage the last execution left, where
2333 // making them fresh for every command was about half the layer's CPU cost per command (replay_cpu_bench). 2944 // making them fresh for every command was about half the layer's CPU cost per command (replay_cpu_bench).
2334 auto& prepared = prepared_; 2945 auto& prepared = prepared_;
@@ -2336,20 +2947,9 @@ private:
2336 // a queue that sees 8 lists and then 1 in every frame would rebuild them on each execution. The loops below 2947 // a queue that sees 8 lists and then 1 in every frame would rebuild them on each execution. The loops below
2337 // use only the first lists.size() entries, so stale entries are never prepared, queried or emitted. 2948 // use only the first lists.size() entries, so stale entries are never prepared, queried or emitted.
2338 if (prepared.size() < lists.size()) prepared.resize(lists.size()); 2949 if (prepared.size() < lists.size()) prepared.resize(lists.size());
2339 ReplayFunctions replay = context_.replay_; 2950 ReplayFunctions replay{};
2340 replay.queue_stages = kind_ == QueueKind::copy ? detail::queue_stages_copy 2951 unsigned mesh_draws = 0;
2341 : kind_ == QueueKind::compute ? detail::queue_stages_compute 2952 std::vector<VulkanContext::GeometryUpload> geometry;
2342 : 0;
2343 replay.prepare_khr_instances = [this, &replay, &khr_guard](const BuildAccelerationStructure& build,
2344 VkDeviceAddress& address) {
2345 return stage_khr_instances(replay, build, khr_guard.stages, address);
2346 };
2347 if (replay.write_acceleration_structures_properties) {
2348 replay.prepare_khr_postbuild = [this, &khr_guard](std::uint32_t count, VkQueryPool& pool,
2349 std::uint32_t& first) {
2350 return allocate_khr_as_queries(count, khr_guard.as_queries, pool, first);
2351 };
2352 }
2353 std::uint64_t captures = 0; 2953 std::uint64_t captures = 0;
2354 for (const auto* list : lists) 2954 for (const auto* list : lists)
2355 for (const auto& command : list->commands()) 2955 for (const auto& command : list->commands())
@@ -2357,102 +2957,236 @@ private:
2357 std::unique_ptr<PredicateReducer::Batch> batch; 2957 std::unique_ptr<PredicateReducer::Batch> batch;
2358 std::unique_ptr<PredicatedBufferCopier::Batch> copy_batch; 2958 std::unique_ptr<PredicatedBufferCopier::Batch> copy_batch;
2359 std::unique_ptr<IndirectDispatchCounter::Batch> counted_batch; 2959 std::unique_ptr<IndirectDispatchCounter::Batch> counted_batch;
2360 if (captures) { 2960 std::unique_ptr<IndirectArgumentClamp::Batch> clamp_batch;
2361 if (kind_ == QueueKind::copy || !context_.predicate_reducer_ || family_ != context_.predicate_family_) 2961 const auto& occlusion_memory = context_.occlusion_resolve_memory_;
2362 return ReplayResult::unsupported; 2962 const bool can_resolve_occlusion = occlusion_memory.memoryTypeCount != 0;
2363 // The helper's lazy pipeline is shared by queues. Serialize preparation with the tracker lock, 2963 const auto resolve = [this](ResourceId id) { return context_.resolve(id); };
2364 // retaining main's resource -> tracker -> submit lock order through emit and submission. 2964 std::uint32_t segments = 0, statistics_segments = 0;
2365 if (!tracker_lock.owns_lock()) tracker_lock.lock(); 2965 bool has_queries = false;
2366 batch = context_.predicate_reducer_->batch(captures); 2966 const auto run_compiles = [this](std::size_t count, const std::function<void(std::size_t)>& job) {
2367 if (!batch) return ReplayResult::unsupported; 2967 context_.pipeline_workers_->run(count, job);
2368 replay.prepare_predicate = [&](VkBuffer buffer, VkDeviceSize offset, PredicateCapture& out) { 2968 };
2369 return batch->prepare(buffer, offset, out); 2969 PipelineCompiles prior_compiles;
2970 bool has_prior_compiles = false;
2971 for (int pass = 0;; ++pass) {
2972 resource_lock.lock();
2973 bindless_commit = !transfer_only ? context_.bindless_commit_ : std::function<void(bool)>{};
2974 replay = context_.replay_;
2975 mesh_draws = 0;
2976 if (pipeline_profile::enabled()) replay.mesh_draw_count = &mesh_draws;
2977 if (context_.geometry_provider_) {
2978 replay.title_memory = [&](std::uint64_t va, std::uint64_t bytes, VkBuffer& buffer, VkDeviceSize& offset) {
2979 if (!va || !bytes || bytes>UINT64_MAX-va) return false;
2980 for (const auto& upload : geometry) {
2981 if (va < upload.source || va-upload.source > upload.size || bytes > upload.size-(va-upload.source)) continue;
2982 buffer=upload.buffer; offset=upload.offset+(va-upload.source);
2983 return true;
2984 }
2985 VulkanContext::GeometryUpload upload;
2986 if (!context_.geometry_provider_(va,bytes,upload)) return false;
2987 buffer=upload.buffer;offset=upload.offset;
2988 geometry.push_back(std::move(upload));
2989 return true;
2990 };
2991 }
2992 replay.graphics_family = family_ == context_.graphics_family_;
2993 replay.queue_stages = kind_ == QueueKind::copy ? detail::queue_stages_copy
2994 : kind_ == QueueKind::compute ? detail::queue_stages_compute
2995 : 0;
2996 replay.prepare_khr_instances = [this, &replay, &khr_guard](const BuildAccelerationStructure& build,
2997 VkDeviceAddress& address) {
2998 return stage_khr_instances(replay, build, khr_guard.stages, address);
2370 }; 2999 };
2371 replay.capture_predicate = [&](VkCommandBuffer cb, const PredicateCapture& p) { 3000 replay.prepare_xdxr_table = [this, &khr_guard](VkDeviceAddress& address, std::uint32_t& count) {
2372 context_.predicate_reducer_->capture(cb, p); 3001 return stage_xdxr_table(khr_guard.stages, address, count);
2373 }; 3002 };
2374 if (context_.predicated_copier_) { 3003 if (replay.write_acceleration_structures_properties) {
2375 copy_batch = context_.predicated_copier_->batch(); 3004 replay.prepare_khr_postbuild = [this, &khr_guard](std::uint32_t count, VkQueryPool& pool,
2376 replay.prepare_predicated_copy = [&](VkBuffer source, VkBuffer destination, VkDeviceSize src, 3005 std::uint32_t& first) {
2377 VkDeviceSize dst, VkDeviceSize size, 3006 return allocate_khr_as_queries(count, khr_guard.as_queries, pool, first);
2378 std::vector<PredicatedCopyDispatch>& out) {
2379 return copy_batch->prepare(source, destination, src, dst, size, out);
2380 };
2381 replay.emit_predicated_copy = [&](VkCommandBuffer cb, const std::vector<PredicatedCopyDispatch>& jobs) {
2382 context_.predicated_copier_->emit(cb, jobs);
2383 }; 3007 };
2384 } 3008 }
2385 } 3009 if (captures) {
2386 if (context_.scratch_) { 3010 if (kind_ == QueueKind::copy || !context_.predicate_reducer_ || family_ != context_.predicate_family_)
2387 replay.copy_scratch = [this, &tracker_lock, &scratch_guard](VkDeviceSize bytes, VkBuffer& buffer, 3011 return queue_unsupported(__LINE__);
2388 VkDeviceSize& offset) { 3012 // The helper's lazy pipeline is shared by queues. Serialize preparation with the tracker lock,
3013 // retaining pipeline -> resource -> tracker -> submit lock order through emit and submission.
2389 if (!tracker_lock.owns_lock()) tracker_lock.lock(); 3014 if (!tracker_lock.owns_lock()) tracker_lock.lock();
2390 if (!scratch_guard.active) { 3015 batch = context_.predicate_reducer_->batch(captures);
2391 context_.scratch_->collect(); 3016 if (!batch) return queue_unsupported(__LINE__);
2392 scratch_guard.active = true; 3017 replay.prepare_predicate = [&](VkBuffer buffer, VkDeviceSize offset, PredicateCapture& out) {
3018 return batch->prepare(buffer, offset, out);
3019 };
3020 replay.capture_predicate = [&](VkCommandBuffer cb, const PredicateCapture& p) {
3021 context_.predicate_reducer_->capture(cb, p);
3022 };
3023 if (context_.predicated_copier_) {
3024 copy_batch = context_.predicated_copier_->batch();
3025 replay.prepare_predicated_copy = [&](VkBuffer source, VkBuffer destination, VkDeviceSize src,
3026 VkDeviceSize dst, VkDeviceSize size,
3027 std::vector<PredicatedCopyDispatch>& out) {
3028 return copy_batch->prepare(source, destination, src, dst, size, out);
3029 };
3030 replay.emit_predicated_copy = [&](VkCommandBuffer cb, const std::vector<PredicatedCopyDispatch>& jobs) {
3031 context_.predicated_copier_->emit(cb, jobs);
3032 };
2393 } 3033 }
2394 return context_.scratch_->get(bytes, buffer, offset); 3034 }
2395 }; 3035 if (context_.scratch_) {
2396 } 3036 replay.copy_scratch = [this, &tracker_lock, &scratch_guard](VkDeviceSize bytes, VkBuffer& buffer,
2397 if (kind_ != QueueKind::copy && context_.counted_dispatch_) { 3037 VkDeviceSize& offset) {
2398 replay.prepare_counted_dispatch = [this, &tracker_lock, &counted_batch]( 3038 if (!tracker_lock.owns_lock()) tracker_lock.lock();
2399 VkBuffer args, VkDeviceSize args_offset, VkBuffer count, VkDeviceSize count_offset, 3039 if (!scratch_guard.active) {
2400 std::uint32_t stride, std::uint32_t maximum, CountedDispatch& out) { 3040 scratch_guard.scratch = context_.scratch_.get();
2401 // Pipeline creation is lazy and shared across queues; serialize it with other replay preparation. 3041 context_.scratch_->collect();
2402 if (!tracker_lock.owns_lock()) tracker_lock.lock(); 3042 scratch_guard.active = true;
2403 if (!counted_batch) counted_batch = context_.counted_dispatch_->batch(); 3043 }
2404 return counted_batch->prepare(args, args_offset, count, count_offset, stride, maximum, out); 3044 return context_.scratch_->get(bytes, buffer, offset);
2405 }; 3045 };
2406 replay.emit_counted_dispatch = [this](VkCommandBuffer cb, const CountedDispatch& job) { 3046 }
2407 context_.counted_dispatch_->emit(cb, job); 3047 if (kind_ != QueueKind::copy && context_.indirect_clamp_) {
2408 }; 3048 // The record scratch belongs to this submission: collected here, retired below with its ticket. The
2409 } 3049 // counter slots are read back once that ticket completes (the batch's destructor).
2410 if (context_.depth24_ && !transfer_only) { 3050 replay.prepare_indirect_clamp = [this, &tracker_lock, &clamp_batch, &clamp_guard](
2411 replay.depth24_prepare = [this, &tracker_lock, &depth24_guard](Depth24Job& job, 3051 VkBuffer arguments, VkDeviceSize argument_offset, VkBuffer count,
2412 std::vector<Depth24Job>& parts) { 3052 VkDeviceSize count_offset, std::uint32_t kind, std::uint32_t stride,
2413 if (!tracker_lock.owns_lock()) tracker_lock.lock(); 3053 std::uint32_t max_count, ClampedIndirect& out) {
2414 if (!depth24_guard.active) { 3054 // Pipeline creation is lazy and shared across queues; serialize it with other replay preparation.
2415 context_.depth24_->collect(); 3055 if (!tracker_lock.owns_lock()) tracker_lock.lock();
2416 depth24_guard.active = true; 3056 if (!clamp_batch) clamp_batch = context_.indirect_clamp_->batch();
3057 if (!clamp_guard.active) {
3058 clamp_guard.clamp = context_.indirect_clamp_.get();
3059 context_.indirect_clamp_->collect();
3060 clamp_guard.active = true;
3061 }
3062 return clamp_batch->prepare(arguments, argument_offset, count, count_offset, kind, stride,
3063 max_count, out);
3064 };
3065 }
3066 if (kind_ != QueueKind::copy && context_.counted_dispatch_) {
3067 replay.prepare_counted_dispatch = [this, &tracker_lock, &counted_batch](
3068 VkBuffer args, VkDeviceSize args_offset, VkBuffer count, VkDeviceSize count_offset,
3069 std::uint32_t stride, std::uint32_t maximum, CountedDispatch& out) {
3070 // Pipeline creation is lazy and shared across queues; serialize it with other replay preparation.
3071 if (!tracker_lock.owns_lock()) tracker_lock.lock();
3072 if (!counted_batch) counted_batch = context_.counted_dispatch_->batch();
3073 return counted_batch->prepare(args, args_offset, count, count_offset, stride, maximum, out);
3074 };
3075 replay.emit_counted_dispatch = [this](VkCommandBuffer cb, const CountedDispatch& job) {
3076 context_.counted_dispatch_->emit(cb, job);
3077 };
3078 }
3079 if (kind_ != QueueKind::copy && context_.quad_indices_ && context_.scratch_) {
3080 replay.prepare_quad_indices = [this, &tracker_lock](
3081 VkBuffer indices, VkDeviceSize offset, VkIndexType type, std::uint64_t readable, std::uint32_t quads,
3082 VkBuffer scratch, VkDeviceSize scratch_offset, QuadIndexExpansion& out) {
3083 // Pipeline creation is lazy and shared across queues; serialize it with other replay preparation.
3084 if (!tracker_lock.owns_lock()) tracker_lock.lock();
3085 return context_.quad_indices_->prepare(indices, offset, type, readable, quads, scratch,
3086 scratch_offset, out);
3087 };
3088 replay.emit_quad_indices = [this](VkCommandBuffer cb, const QuadIndexExpansion& job) {
3089 context_.quad_indices_->emit(cb, job);
3090 };
3091 }
3092 if (context_.depth24_ && !transfer_only) {
3093 replay.depth24_prepare = [this, &tracker_lock, &depth24_guard](Depth24Job& job,
3094 std::vector<Depth24Job>& parts) {
3095 if (!tracker_lock.owns_lock()) tracker_lock.lock();
3096 if (!depth24_guard.active) {
3097 depth24_guard.d24 = context_.depth24_.get();
3098 context_.depth24_->collect();
3099 depth24_guard.active = true;
3100 }
3101 return context_.depth24_->prepare(job, parts);
3102 };
3103 }
3104 if (can_resolve_occlusion) {
3105 replay.sum_occlusion = [this](VkCommandBuffer cb, VkQueryPool pool, std::uint32_t first,
3106 std::uint32_t count, VkBuffer dst, VkDeviceSize offset) {
3107 occlusion_resolve_->sum(cb, pool, first, count, dst, offset);
3108 };
3109 replay.resolve_binary_occlusion = [this](VkCommandBuffer cb, VkQueryPool pool, std::uint32_t first,
3110 std::uint32_t count, VkBuffer dst, VkDeviceSize offset) {
3111 occlusion_resolve_->normalize(cb, pool, first, count, dst, offset);
3112 };
3113 replay.sum_statistics = [this](VkCommandBuffer cb, VkQueryPool pool, VkQueryPool mesh_pool,
3114 VkQueryPool primitives_pool, const std::uint8_t* mesh,
3115 std::uint32_t first, std::uint32_t count, VkBuffer dst,
3116 VkDeviceSize offset) {
3117 occlusion_resolve_->sum_statistics(cb, pool, mesh_pool, primitives_pool, mesh, first, count, dst,
3118 offset);
3119 };
3120 replay.sum_binary_occlusion = [this](VkCommandBuffer cb, VkQueryPool pool, std::uint32_t first,
3121 std::uint32_t count, VkBuffer dst, VkDeviceSize offset) {
3122 occlusion_resolve_->sum_binary(cb, pool, first, count, dst, offset);
3123 };
3124 }
3125 segments = 0;
3126 statistics_segments = 0;
3127 has_queries = false;
3128 // Collect unbuilt pipelines via PipelineCompiles (whether pipeline_workers_ is enabled or serial).
3129 // On pass 0, if any pipeline must be compiled, release pass-0 transient state along with tracker_lock
3130 // and resource_lock before invoking the compiler (keeping pipeline_lock so registered pipelines and
3131 // workers stay alive), then re-prepare on pass 1 against current resources.
3132 PipelineCompiles compiles;
3133 replay.compiles = &compiles;
3134 ReplayResult prepare_result = ReplayResult::success;
3135 for (std::size_t i = 0; i < lists.size(); ++i) {
3136 const auto result = prepare(*lists[i], resolve, replay, prepared[i], can_resolve_occlusion);
3137 if (result != ReplayResult::success) {
3138 prepare_result = result;
3139 break;
2417 } 3140 }
2418 return context_.depth24_->prepare(job, parts); 3141 if (prepared[i].segment_count > UINT32_MAX - segments ||
2419 }; 3142 prepared[i].statistics_segment_count > UINT32_MAX - statistics_segments)
2420 } 3143 return queue_unsupported(__LINE__);
2421 const auto& occlusion_memory = context_.occlusion_resolve_memory_; 3144 segments += prepared[i].segment_count;
2422 const bool can_resolve_occlusion = occlusion_memory.memoryTypeCount != 0; 3145 statistics_segments += prepared[i].statistics_segment_count;
2423 if (can_resolve_occlusion) { 3146 has_queries = has_queries || !prepared[i].queries.empty();
2424 replay.sum_occlusion = [this](VkCommandBuffer cb, VkQueryPool pool, std::uint32_t first, 3147 }
2425 std::uint32_t count, VkBuffer dst, VkDeviceSize offset) { 3148 if (pass == 0 && !compiles.empty()) {
2426 occlusion_resolve_->sum(cb, pool, first, count, dst, offset); 3149 if (depth24_guard.active) {
2427 }; 3150 context_.depth24_->retire(progress_, 0);
2428 replay.resolve_binary_occlusion = [this](VkCommandBuffer cb, VkQueryPool pool, std::uint32_t first, 3151 depth24_guard.active = false;
2429 std::uint32_t count, VkBuffer dst, VkDeviceSize offset) { 3152 }
2430 occlusion_resolve_->normalize(cb, pool, first, count, dst, offset); 3153 if (scratch_guard.active) {
2431 }; 3154 context_.scratch_->retire(progress_, 0);
2432 replay.sum_statistics = [this](VkCommandBuffer cb, VkQueryPool pool, VkQueryPool mesh_pool, 3155 scratch_guard.active = false;
2433 VkQueryPool primitives_pool, const std::uint8_t* mesh, 3156 }
2434 std::uint32_t first, std::uint32_t count, VkBuffer dst, 3157 if (clamp_guard.active) {
2435 VkDeviceSize offset) { 3158 context_.indirect_clamp_->retire(progress_, 0);
2436 occlusion_resolve_->sum_statistics(cb, pool, mesh_pool, primitives_pool, mesh, first, count, dst, 3159 clamp_guard.active = false;
2437 offset); 3160 }
2438 }; 3161 batch.reset();
2439 replay.sum_binary_occlusion = [this](VkCommandBuffer cb, VkQueryPool pool, std::uint32_t first, 3162 copy_batch.reset();
2440 std::uint32_t count, VkBuffer dst, VkDeviceSize offset) { 3163 counted_batch.reset();
2441 occlusion_resolve_->sum_binary(cb, pool, first, count, dst, offset); 3164 clamp_batch.reset();
2442 }; 3165 if (tracker_lock.owns_lock()) tracker_lock.unlock();
2443 } 3166 resource_lock.unlock();
2444 const auto resolve = [this](ResourceId id) { return context_.resolve(id); }; 3167 recycle_khr_stages(khr_guard.stages);
2445 std::uint32_t segments = 0, statistics_segments = 0; 3168 recycle_khr_as_queries(khr_guard.as_queries);
2446 bool has_queries = false; 3169 geometry.clear();
2447 for (std::size_t i = 0; i < lists.size(); ++i) { 3170
2448 const auto result = prepare(*lists[i], resolve, replay, prepared[i], can_resolve_occlusion); 3171 if (context_.pipeline_workers_)
2449 if (result != ReplayResult::success) return result; 3172 compiles.build(run_compiles);
2450 if (prepared[i].segment_count > UINT32_MAX - segments || 3173 else
2451 prepared[i].statistics_segment_count > UINT32_MAX - statistics_segments) 3174 compiles.build_serial();
2452 return ReplayResult::unsupported; 3175 const ReplayResult compile_result = check_compiled_pipelines(compiles, prepare_result);
2453 segments += prepared[i].segment_count; 3176 if (compile_result != ReplayResult::success) return compile_result;
2454 statistics_segments += prepared[i].statistics_segment_count; 3177 prior_compiles = std::move(compiles);
2455 has_queries = has_queries || !prepared[i].queries.empty(); 3178 has_prior_compiles = true;
3179 continue;
3180 }
3181 const PipelineCompiles* prior = has_prior_compiles ? &prior_compiles : nullptr;
3182 prepare_result = context_.pipeline_workers_
3183 ? build_pipelines(compiles, std::span(prepared).first(lists.size()), prepare_result,
3184 run_compiles, prior)
3185 : build_pipelines_serial(compiles, std::span(prepared).first(lists.size()),
3186 prepare_result, prior);
3187 replay.compiles = nullptr;
3188 if (prepare_result != ReplayResult::success) return prepare_result;
3189 break;
2456 } 3190 }
2457 const auto segment_pool = [this](VkQueryType type, std::uint32_t count, 3191 const auto segment_pool = [this](VkQueryType type, std::uint32_t count,
2458 std::shared_ptr<OcclusionSegmentPool>& out) { 3192 std::shared_ptr<OcclusionSegmentPool>& out) {
@@ -2469,12 +3203,12 @@ private:
2469 return vk.vkCreateQueryPool(out->device, &info, nullptr, &out->pool) == VK_SUCCESS; 3203 return vk.vkCreateQueryPool(out->device, &info, nullptr, &out->pool) == VK_SUCCESS;
2470 }; 3204 };
2471 std::shared_ptr<OcclusionSegmentPool> physical, statistics; 3205 std::shared_ptr<OcclusionSegmentPool> physical, statistics;
2472 if (segments && !segment_pool(VK_QUERY_TYPE_OCCLUSION, segments, physical)) return ReplayResult::unsupported; 3206 if (segments && !segment_pool(VK_QUERY_TYPE_OCCLUSION, segments, physical)) return queue_unsupported(__LINE__);
2473 // Without the compute helper a split query could not be summed: leave statistics queries whole, as before 3207 // Without the compute helper a split query could not be summed: leave statistics queries whole, as before
2474 // (QueryReplay::plan refuses a list whose statistics query holds a mesh draw then). 3208 // (QueryReplay::plan refuses a list whose statistics query holds a mesh draw then).
2475 if (statistics_segments && can_resolve_occlusion) { 3209 if (statistics_segments && can_resolve_occlusion) {
2476 if (!segment_pool(VK_QUERY_TYPE_PIPELINE_STATISTICS, statistics_segments, statistics)) 3210 if (!segment_pool(VK_QUERY_TYPE_PIPELINE_STATISTICS, statistics_segments, statistics))
2477 return ReplayResult::unsupported; 3211 return queue_unsupported(__LINE__);
2478 for (const auto& list : prepared) 3212 for (const auto& list : prepared)
2479 statistics->mesh.insert(statistics->mesh.end(), list.statistics_mesh.begin(), 3213 statistics->mesh.insert(statistics->mesh.end(), list.statistics_mesh.begin(),
2480 list.statistics_mesh.end()); 3214 list.statistics_mesh.end());
@@ -2489,7 +3223,7 @@ private:
2489 info.pipelineStatistics = kMeshStatisticsFlags; 3223 info.pipelineStatistics = kMeshStatisticsFlags;
2490 if (context_.vk.vkCreateQueryPool(statistics->device, &info, nullptr, &statistics->mesh_pool) != 3224 if (context_.vk.vkCreateQueryPool(statistics->device, &info, nullptr, &statistics->mesh_pool) !=
2491 VK_SUCCESS) 3225 VK_SUCCESS)
2492 return ReplayResult::unsupported; 3226 return queue_unsupported(__LINE__);
2493 // The mesh-primitives count of a mesh segment (D3D-MESH-CLIPPING-COUNTER): a query of its own type, 3227 // The mesh-primitives count of a mesh segment (D3D-MESH-CLIPPING-COUNTER): a query of its own type,
2494 // which the pipeline-statistics pool cannot hold. The device needs the meshShaderQueries feature, 3228 // which the pipeline-statistics pool cannot hold. The device needs the meshShaderQueries feature,
2495 // or the clipping field of a mesh segment stays 0. 3229 // or the clipping field of a mesh segment stays 0.
@@ -2499,7 +3233,7 @@ private:
2499 primitives.queryCount = statistics_segments; 3233 primitives.queryCount = statistics_segments;
2500 if (context_.vk.vkCreateQueryPool(statistics->device, &primitives, nullptr, 3234 if (context_.vk.vkCreateQueryPool(statistics->device, &primitives, nullptr,
2501 &statistics->primitives_pool) != VK_SUCCESS) 3235 &statistics->primitives_pool) != VK_SUCCESS)
2502 return ReplayResult::unsupported; 3236 return queue_unsupported(__LINE__);
2503 } 3237 }
2504 } 3238 }
2505 } 3239 }
@@ -2519,16 +3253,16 @@ private:
2519 if (queries.needs_sum || queries.needs_binary || queries.needs_statistics_sum || queries.needs_sum_binary) { 3253 if (queries.needs_sum || queries.needs_binary || queries.needs_statistics_sum || queries.needs_sum_binary) {
2520 if (!occlusion_resolve_) { 3254 if (!occlusion_resolve_) {
2521 auto helper = std::make_unique<OcclusionResolve>(context_.vk, context_.device()); 3255 auto helper = std::make_unique<OcclusionResolve>(context_.vk, context_.device());
2522 if (!helper->initialize(occlusion_memory)) return ReplayResult::unsupported; 3256 if (!helper->initialize(occlusion_memory)) return queue_unsupported(__LINE__);
2523 occlusion_resolve_ = std::move(helper); 3257 occlusion_resolve_ = std::move(helper);
2524 } 3258 }
2525 if (!occlusion_resolve_->prepare(queries.needs_sum, queries.needs_binary, queries.needs_statistics_sum, 3259 if (!occlusion_resolve_->prepare(queries.needs_sum, queries.needs_binary, queries.needs_statistics_sum,
2526 queries.needs_sum_binary)) 3260 queries.needs_sum_binary))
2527 return ReplayResult::unsupported; 3261 return queue_unsupported(__LINE__);
2528 } 3262 }
2529 3263
2530 CommandSlot* slot = acquire(); 3264 CommandSlot* slot = acquire();
2531 if (!slot) return ReplayResult::unsupported; 3265 if (!slot) return queue_unsupported(__LINE__);
2532 slot->khr_instances = std::move(khr_guard.stages); // freed when this slot is reused 3266 slot->khr_instances = std::move(khr_guard.stages); // freed when this slot is reused
2533 khr_guard.stages.clear(); 3267 khr_guard.stages.clear();
2534 slot->khr_as_queries = std::move(khr_guard.as_queries); 3268 slot->khr_as_queries = std::move(khr_guard.as_queries);
@@ -2557,9 +3291,11 @@ private:
2557 }; 3291 };
2558 VkCommandBufferBeginInfo begin{VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO}; 3292 VkCommandBufferBeginInfo begin{VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO};
2559 begin.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; 3293 begin.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
2560 if (context_.vk.vkBeginCommandBuffer(command_buffer, &begin) != VK_SUCCESS) { 3294 context_.gpu_labels_.begin_record(command_buffer);
3295 if (context_.observe_result(context_.vk.vkBeginCommandBuffer(command_buffer, &begin),
3296 "vkBeginCommandBuffer") != VK_SUCCESS) {
2561 discard(); 3297 discard();
2562 return ReplayResult::unsupported; 3298 return queue_unsupported(__LINE__);
2563 } 3299 }
2564 // D3D12 ends every ExecuteCommandLists with all its work done and its writes visible to the next one on the 3300 // D3D12 ends every ExecuteCommandLists with all its work done and its writes visible to the next one on the
2565 // queue (implicit state decay relies on it), and a list may then touch the same memory without a barrier: 3301 // queue (implicit state decay relies on it), and a list may then touch the same memory without a barrier:
@@ -2575,8 +3311,10 @@ private:
2575 } 3311 }
2576 if (!tracker_lock.owns_lock()) tracker_lock.lock(); 3312 if (!tracker_lock.owns_lock()) tracker_lock.lock();
2577 if (!transfer_only && context_.bindless_prepare_ && !context_.bindless_prepare_(command_buffer)) { 3313 if (!transfer_only && context_.bindless_prepare_ && !context_.bindless_prepare_(command_buffer)) {
2578 const bool ended = context_.vk.vkEndCommandBuffer(command_buffer) == VK_SUCCESS; 3314 const bool ended = context_.observe_result(context_.vk.vkEndCommandBuffer(command_buffer),
3315 "vkEndCommandBuffer") == VK_SUCCESS;
2579 resource_lock.unlock(); 3316 resource_lock.unlock();
3317 pipeline_lock.unlock();
2580 const bool submitted = ended && submit(command_buffer, VK_NULL_HANDLE, 0); 3318 const bool submitted = ended && submit(command_buffer, VK_NULL_HANDLE, 0);
2581 if (!submitted) discard(); 3319 if (!submitted) discard();
2582 if (depth24_guard.active) { 3320 if (depth24_guard.active) {
@@ -2587,19 +3325,33 @@ private:
2587 context_.scratch_->retire(progress_, 0); 3325 context_.scratch_->retire(progress_, 0);
2588 scratch_guard.active = false; 3326 scratch_guard.active = false;
2589 } 3327 }
3328 if (clamp_guard.active) {
3329 context_.indirect_clamp_->retire(progress_, 0);
3330 clamp_guard.active = false;
3331 }
2590 if (bindless_commit) bindless_commit(submitted); 3332 if (bindless_commit) bindless_commit(submitted);
2591 tracker_lock.unlock(); 3333 tracker_lock.unlock();
2592 return ReplayResult::unsupported; 3334 return queue_unsupported(__LINE__);
2593 } 3335 }
2594 replay.bindless_set = context_.bindless_current_ ? context_.bindless_current_() : VK_NULL_HANDLE; 3336 replay.bindless_set = context_.bindless_current_ ? context_.bindless_current_() : VK_NULL_HANDLE;
2595 const bool bindless_uploaded = std::exchange(context_.bindless_upload_pending_, false); 3337 const bool bindless_uploaded = std::exchange(context_.bindless_upload_pending_, false);
2596 auto next_tracker = context_.tracker_; 3338 // Layout changes go into the tracker itself, journalled, and are undone unless the submission reaches the
3339 // queue (tracker_mutex_ is held from here to the commit, so nothing else sees them meanwhile).
3340 auto& next_tracker = context_.tracker_;
3341 next_tracker.begin();
3342 struct TrackerTransaction {
3343 LayoutTracker& tracker;
3344 bool done = false;
3345 ~TrackerTransaction() {
3346 if (!done) tracker.rollback();
3347 }
3348 } tracker_transaction{next_tracker};
2597 // Bindless images that may already be visible to shaders are initialized on a submission that runs shaders. 3349 // Bindless images that may already be visible to shaders are initialized on a submission that runs shaders.
2598 // initialize() zeroes committed storage images and only transitions sparse images. 3350 // initialize() zeroes committed storage images and only transitions sparse images.
2599 bool runs_shaders = false; 3351 bool runs_shaders = false;
2600 for (const CommandList* list : lists) 3352 for (const CommandList* list : lists)
2601 for (const auto& command : list->commands()) 3353 for (const auto& command : list->commands())
2602 runs_shaders |= std::holds_alternative<Dispatch>(command) || std::holds_alternative<Draw>(command) || 3354 runs_shaders |= std::holds_alternative<Dispatch>(command) || draw_command(command).state ||
2603 std::holds_alternative<ExecuteIndirect>(command); 3355 std::holds_alternative<ExecuteIndirect>(command);
2604 std::vector<ResourceId> storage_images; 3356 std::vector<ResourceId> storage_images;
2605 std::vector<VulkanContext::PendingZero> zero_buffers; 3357 std::vector<VulkanContext::PendingZero> zero_buffers;
@@ -2612,8 +3364,7 @@ private:
2612 storage_init_seen_ = context_.storage_init_version_; 3364 storage_init_seen_ = context_.storage_init_version_;
2613 } 3365 }
2614 // The set this submission binds may be a new generation whose table another queue's submission uploads: 3366 // The set this submission binds may be a new generation whose table another queue's submission uploads:
2615 // wait for that one, as for the storage images (the table's buffers are used by one queue family only: 3367 // wait for that one, as for the storage images. The table and fallback images share the device's families.
2616 // every D3D12 queue of the device is made in info.queue_family).
2617 if (context_.bindless_upload_semaphore_ && context_.bindless_upload_semaphore_ != progress_ && 3368 if (context_.bindless_upload_semaphore_ && context_.bindless_upload_semaphore_ != progress_ &&
2618 context_.bindless_upload_version_ != bindless_upload_seen_) { 3369 context_.bindless_upload_version_ != bindless_upload_seen_) {
2619 waits_.push_back(context_.bindless_upload_semaphore_); 3370 waits_.push_back(context_.bindless_upload_semaphore_);
@@ -2644,9 +3395,23 @@ private:
2644 bool wrote_readback = false; 3395 bool wrote_readback = false;
2645 VkPipelineStageFlags2 readback_stages = 0; 3396 VkPipelineStageFlags2 readback_stages = 0;
2646 std::uint32_t open_labels = 0; // events may span the lists of one ExecuteCommandLists 3397 std::uint32_t open_labels = 0; // events may span the lists of one ExecuteCommandLists
3398 CheckpointSubmission diagnostics;
3399 PFN_vkCmdSetCheckpointNV checkpoint = nullptr;
3400 if (execute_call) {
3401 auto& fault = *context_.device_fault();
3402 checkpoint = fault.checkpoint_command();
3403 const char* queue_kind = kind_ == QueueKind::direct ? "direct" :
3404 kind_ == QueueKind::compute ? "compute" : "copy";
3405 diagnostics = fault.begin_submission(execute_call, queue_, queue_kind, lists.size());
3406 }
2647 for (std::size_t i = 0; i < lists.size(); ++i) { 3407 for (std::size_t i = 0; i < lists.size(); ++i) {
2648 const auto& list = prepared[i]; 3408 const auto& list = prepared[i];
2649 emit(list, command_buffer, replay, &next_tracker, &open_labels); 3409 if (execute_call && i < diagnostics.lists.size()) {
3410 const CheckpointRecorder recorder{checkpoint, diagnostics, context_.device_fault()->pipeline_names, i};
3411 emit_commands<true>(list, command_buffer, replay, &next_tracker, &open_labels, &recorder);
3412 } else {
3413 emit(list, command_buffer, replay, &next_tracker, &open_labels);
3414 }
2650 wrote_readback |= list.wrote_readback; 3415 wrote_readback |= list.wrote_readback;
2651 readback_stages |= list.readback_src_stages; 3416 readback_stages |= list.readback_src_stages;
2652 } 3417 }
@@ -2681,14 +3446,20 @@ private:
2681 0, 1, &host, 0, nullptr, 0, nullptr); 3446 0, 1, &host, 0, nullptr, 0, nullptr);
2682 } 3447 }
2683 } 3448 }
2684 const bool ended = context_.vk.vkEndCommandBuffer(command_buffer) == VK_SUCCESS; 3449 const bool ended = context_.observe_result(context_.vk.vkEndCommandBuffer(command_buffer),
2685 resource_lock.unlock(); // release resource_mutex_ before vkQueueSubmit while keeping tracker_lock held 3450 "vkEndCommandBuffer") == VK_SUCCESS;
3451 resource_lock.unlock(); // release resource_mutex_ and pipeline_mutex_ before vkQueueSubmit while keeping tracker_lock held
3452 pipeline_lock.unlock();
2686 const bool wait_previous = ordered_timestamps && submitted_; 3453 const bool wait_previous = ordered_timestamps && submitted_;
2687 if (wait_previous) { 3454 if (wait_previous) {
2688 waits_.push_back(progress_); 3455 waits_.push_back(progress_);
2689 wait_values_.push_back(submitted_); 3456 wait_values_.push_back(submitted_);
2690 } 3457 }
2691 const bool submitted = ended && submit(command_buffer, VK_NULL_HANDLE, 0); 3458 const bool submitted = ended && submit(command_buffer, VK_NULL_HANDLE, 0,
3459 execute_call ? &diagnostics : nullptr);
3460 if (mesh_draws)
3461 std::fprintf(stderr, "[rt] pso-mesh unix_ms=%lld draws=%u submitted=%d\n",
3462 pipeline_profile::unix_ms(), mesh_draws, int(submitted));
2692 if (!submitted && (!storage_images.empty() || !zero_buffers.empty())) { 3463 if (!submitted && (!storage_images.empty() || !zero_buffers.empty())) {
2693 // not initialized after all: try again with the next submission 3464 // not initialized after all: try again with the next submission
2694 std::lock_guard lock(context_.storage_mutex_); 3465 std::lock_guard lock(context_.storage_mutex_);
@@ -2714,13 +3485,18 @@ private:
2714 wait_values_.pop_back(); 3485 wait_values_.pop_back();
2715 } 3486 }
2716 if (submitted) { 3487 if (submitted) {
2717 context_.tracker_ = std::move(next_tracker); 3488 next_tracker.commit();
3489 tracker_transaction.done = true;
2718 slot->predicate = std::move(batch); 3490 slot->predicate = std::move(batch);
2719 slot->predicated_copy = std::move(copy_batch); 3491 slot->predicated_copy = std::move(copy_batch);
2720 slot->counted_dispatch = std::move(counted_batch); 3492 slot->counted_dispatch = std::move(counted_batch);
3493 slot->indirect_clamp = std::move(clamp_batch);
2721 queries.commit(); 3494 queries.commit();
2722 slot->segments = std::move(queries.retained); 3495 slot->segments = std::move(queries.retained);
3496 slot->geometry = std::move(geometry);
2723 } else { 3497 } else {
3498 next_tracker.rollback(); // here, under tracker_mutex_ (unlocked below, before the guard's scope ends)
3499 tracker_transaction.done = true;
2724 discard(); 3500 discard();
2725 } 3501 }
2726 if (depth24_guard.active) { 3502 if (depth24_guard.active) {
@@ -2731,11 +3507,15 @@ private:
2731 context_.scratch_->retire(progress_, submitted ? submitted_ : 0); 3507 context_.scratch_->retire(progress_, submitted ? submitted_ : 0);
2732 scratch_guard.active = false; 3508 scratch_guard.active = false;
2733 } 3509 }
3510 if (clamp_guard.active) {
3511 context_.indirect_clamp_->retire(progress_, submitted ? submitted_ : 0);
3512 clamp_guard.active = false;
3513 }
2734 // Under tracker_mutex_, so no other flush comes between this submit and the set's note of whether it reached 3514 // Under tracker_mutex_, so no other flush comes between this submit and the set's note of whether it reached
2735 // the queue (it keeps a single upload obligation). 3515 // the queue (it keeps a single upload obligation).
2736 if (bindless_commit) bindless_commit(submitted); 3516 if (bindless_commit) bindless_commit(submitted);
2737 tracker_lock.unlock(); 3517 tracker_lock.unlock();
2738 return submitted ? ReplayResult::success : ReplayResult::unsupported; 3518 return submitted ? ReplayResult::success : queue_unsupported(__LINE__);
2739 } 3519 }
2740 3520
2741 void marker_now(DebugMarker::Kind kind, const char* label) { 3521 void marker_now(DebugMarker::Kind kind, const char* label) {
@@ -2763,6 +3543,7 @@ private:
2763 enum class Kind : std::uint8_t { batch, signal, marker }; 3543 enum class Kind : std::uint8_t { batch, signal, marker };
2764 Kind kind = Kind::batch; 3544 Kind kind = Kind::batch;
2765 std::uint64_t seq = 0; // QueueHolds::next_seq(): the order operations were held in, across queues 3545 std::uint64_t seq = 0; // QueueHolds::next_seq(): the order operations were held in, across queues
3546 std::uint64_t execute_call = 0; // original ExecuteCommandLists call for a held batch
2766 std::vector<VkSemaphore> waits; 3547 std::vector<VkSemaphore> waits;
2767 std::vector<std::uint64_t> wait_values; 3548 std::vector<std::uint64_t> wait_values;
2768 std::vector<CommandList> lists; // batch: copies, so the application may Reset its lists after the call 3549 std::vector<CommandList> lists; // batch: copies, so the application may Reset its lists after the call
@@ -2774,6 +3555,7 @@ private:
2774 // signatures of the lists (the application may release them right after the call). 3555 // signatures of the lists (the application may release them right after the call).
2775 std::vector<std::shared_ptr<void>> pins; 3556 std::vector<std::shared_ptr<void>> pins;
2776 std::vector<std::shared_ptr<void>> wait_pins; // the fences of `waits` 3557 std::vector<std::shared_ptr<void>> wait_pins; // the fences of `waits`
3558 std::chrono::steady_clock::time_point held_at{}; // LEONIDA_GPU_LATENCY: when it was held
2777 }; 3559 };
2778 3560
2779 bool waits_pending(const std::vector<VkSemaphore>& semaphores, const std::vector<std::uint64_t>& values) const { 3561 bool waits_pending(const std::vector<VkSemaphore>& semaphores, const std::vector<std::uint64_t>& values) const {
@@ -2827,6 +3609,7 @@ private:
2827 wait_values_.clear(); 3609 wait_values_.clear();
2828 wait_pins_.clear(); 3610 wait_pins_.clear();
2829 } 3611 }
3612 if (gpu_latency::enabled()) op.held_at = std::chrono::steady_clock::now();
2830 held_.push_back(std::move(op)); 3613 held_.push_back(std::move(op));
2831 context_.holds().held_changed(1); 3614 context_.holds().held_changed(1);
2832 } 3615 }
@@ -2847,7 +3630,7 @@ private:
2847 for (const CommandList& list : op.lists) lists.push_back(&list); 3630 for (const CommandList& list : op.lists) lists.push_back(&list);
2848 // The pipeline states and root signatures of the lists are in op.pins (see execute()): they live until 3631 // The pipeline states and root signatures of the lists are in op.pins (see execute()): they live until
2849 // the batch has been recorded and then, with the fences, until its submission has completed (below). 3632 // the batch has been recorded and then, with the fences, until its submission has completed (below).
2850 const ReplayResult result = execute_now(lists); 3633 const ReplayResult result = execute_now(lists, op.execute_call);
2851 if (result != ReplayResult::success) { 3634 if (result != ReplayResult::success) {
2852 int none = static_cast<int>(ReplayResult::success); 3635 int none = static_cast<int>(ReplayResult::success);
2853 held_failure_.compare_exchange_strong(none, static_cast<int>(result)); 3636 held_failure_.compare_exchange_strong(none, static_cast<int>(result));
@@ -2883,6 +3666,7 @@ private:
2883 Deferred op = std::move(held_.front()); 3666 Deferred op = std::move(held_.front());
2884 held_.pop_front(); 3667 held_.pop_front();
2885 context_.holds().held_changed(-1); 3668 context_.holds().held_changed(-1);
3669 if (gpu_latency::enabled()) gpu_latency::held(int(kind_), int(op.kind), op.held_at);
2886 if (!context_.is_device_lost()) run(op); 3670 if (!context_.is_device_lost()) run(op);
2887 released = true; 3671 released = true;
2888 } 3672 }
@@ -2951,9 +3735,11 @@ private:
2951 std::vector<VkEvent> events; // order_timestamp_copy's, reset and reused once the slot completes 3735 std::vector<VkEvent> events; // order_timestamp_copy's, reset and reused once the slot completes
2952 std::unique_ptr<PredicatedBufferCopier::Batch> predicated_copy; 3736 std::unique_ptr<PredicatedBufferCopier::Batch> predicated_copy;
2953 std::unique_ptr<IndirectDispatchCounter::Batch> counted_dispatch; 3737 std::unique_ptr<IndirectDispatchCounter::Batch> counted_dispatch;
3738 std::unique_ptr<IndirectArgumentClamp::Batch> indirect_clamp; // counter slots, read once this slot completes
2954 std::unique_ptr<PredicateReducer::Batch> predicate; // retained until this slot completes 3739 std::unique_ptr<PredicateReducer::Batch> predicate; // retained until this slot completes
2955 std::vector<KhrInstanceStage> khr_instances; // KHR ARRAY_OF_POINTERS staging, same lifetime 3740 std::vector<KhrInstanceStage> khr_instances; // KHR ARRAY_OF_POINTERS staging, same lifetime
2956 std::vector<KhrAsQueryPool> khr_as_queries; // KHR postbuild COMPACTED_SIZE query pools, same lifetime 3741 std::vector<KhrAsQueryPool> khr_as_queries; // KHR postbuild COMPACTED_SIZE query pools, same lifetime
3742 std::vector<VulkanContext::GeometryUpload> geometry;
2957 }; 3743 };
2958 3744
2959 struct PendingBindings { 3745 struct PendingBindings {
@@ -2976,6 +3762,7 @@ private:
2976 auto& vk = context_.vk; 3762 auto& vk = context_.vk;
2977 VkCommandBufferBeginInfo begin{VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO}; 3763 VkCommandBufferBeginInfo begin{VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO};
2978 begin.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT; 3764 begin.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
3765 context_.gpu_labels_.begin_record(command_buffer);
2979 if (vk.vkBeginCommandBuffer(command_buffer, &begin) != VK_SUCCESS) { 3766 if (vk.vkBeginCommandBuffer(command_buffer, &begin) != VK_SUCCESS) {
2980 slot->ticket = 0; 3767 slot->ticket = 0;
2981 return false; 3768 return false;
@@ -3071,7 +3858,8 @@ private:
3071 pending_bindings_.push_back(std::move(pending)); 3858 pending_bindings_.push_back(std::move(pending));
3072 { 3859 {
3073 std::lock_guard lock(context_.submit_mutex()); 3860 std::lock_guard lock(context_.submit_mutex());
3074 const auto result = vk.vkQueueBindSparse(queue_, 1, &info, VK_NULL_HANDLE); 3861 const auto result = context_.observe_result(vk.vkQueueBindSparse(queue_, 1, &info, VK_NULL_HANDLE),
3862 "vkQueueBindSparse");
3075 if (result != VK_SUCCESS) { 3863 if (result != VK_SUCCESS) {
3076 if (result == VK_ERROR_DEVICE_LOST) context_.mark_device_lost(); 3864 if (result == VK_ERROR_DEVICE_LOST) context_.mark_device_lost();
3077 pending_bindings_.pop_back(); 3865 pending_bindings_.pop_back();
@@ -3093,7 +3881,8 @@ private:
3093 std::uint64_t completed() const { 3881 std::uint64_t completed() const {
3094 if (context_.is_device_lost()) return 0; 3882 if (context_.is_device_lost()) return 0;
3095 std::uint64_t done = 0; 3883 std::uint64_t done = 0;
3096 const VkResult result = context_.vk.vkGetSemaphoreCounterValue(context_.device(), progress_, &done); 3884 const VkResult result = context_.observe_result(
3885 context_.vk.vkGetSemaphoreCounterValue(context_.device(), progress_, &done), "vkGetSemaphoreCounterValue");
3097 if (result == VK_ERROR_DEVICE_LOST) context_.mark_device_lost(); 3886 if (result == VK_ERROR_DEVICE_LOST) context_.mark_device_lost();
3098 // A failed timeline query cannot be used as a resource-retirement or command-buffer reuse ticket. 3887 // A failed timeline query cannot be used as a resource-retirement or command-buffer reuse ticket.
3099 return result == VK_SUCCESS ? done : 0; 3888 return result == VK_SUCCESS ? done : 0;
@@ -3114,6 +3903,7 @@ private:
3114 for (auto& slot : buffers_) { 3903 for (auto& slot : buffers_) {
3115 if (slot.ticket > done) continue; 3904 if (slot.ticket > done) continue;
3116 slot.segments.clear(); 3905 slot.segments.clear();
3906 slot.geometry.clear();
3117 recycle_khr_stages(slot.khr_instances); 3907 recycle_khr_stages(slot.khr_instances);
3118 recycle_khr_as_queries(slot.khr_as_queries); 3908 recycle_khr_as_queries(slot.khr_as_queries);
3119 for (VkEvent event : slot.events) 3909 for (VkEvent event : slot.events)
@@ -3161,7 +3951,8 @@ private:
3161 info.semaphoreCount = 1; 3951 info.semaphoreCount = 1;
3162 info.pSemaphores = &progress_; 3952 info.pSemaphores = &progress_;
3163 info.pValues = &oldest; 3953 info.pValues = &oldest;
3164 return context_.vk.vkWaitSemaphores(context_.device(), &info, kQueuedWaitNs); 3954 return context_.observe_result(context_.vk.vkWaitSemaphores(context_.device(), &info, kQueuedWaitNs),
3955 "vkWaitSemaphores (queue progress)");
3165 } 3956 }
3166 3957
3167 CommandSlot* acquire() { 3958 CommandSlot* acquire() {
@@ -3173,6 +3964,7 @@ private:
3173 reuse->predicate.reset(); 3964 reuse->predicate.reset();
3174 reuse->predicated_copy.reset(); 3965 reuse->predicated_copy.reset();
3175 reuse->counted_dispatch.reset(); 3966 reuse->counted_dispatch.reset();
3967 reuse->indirect_clamp.reset();
3176 reuse->ticket = UINT64_MAX; // in use until submitted 3968 reuse->ticket = UINT64_MAX; // in use until submitted
3177 return reuse; 3969 return reuse;
3178 } 3970 }
@@ -3201,7 +3993,43 @@ private:
3201 return event; 3993 return event;
3202 } 3994 }
3203 3995
3204 bool submit(VkCommandBuffer command_buffer, VkSemaphore fence, std::uint64_t value) { 3996 static void pass_trace(const CheckpointSubmission& d) {
3997 static const std::uint64_t every = [] {
3998 const char* v = std::getenv("LEONIDA_PASS_TRACE");
3999 return v && *v ? std::strtoull(v, nullptr, 10) : 0ull;
4000 }();
4001 if (!every) return;
4002 const std::uint64_t present = submit_phases::totals().present_serial.load(std::memory_order_relaxed);
4003 if (present % every != 1 % every) return;
4004 std::string line;
4005 const char* last = nullptr;
4006 unsigned run = 0;
4007 const auto flush = [&] {
4008 if (!last) return;
4009 char text[96];
4010 std::snprintf(text, sizeof(text), run > 1 ? " %s x%u" : " %s", last, run);
4011 line += text;
4012 };
4013 for (const auto& x : d.dispatches) {
4014 const char* name = x.shader ? x.shader : "-";
4015 if (const char* slash = std::strrchr(name, '/')) name = slash + 1;
4016 if (last && std::strcmp(last, name) == 0) {
4017 ++run;
4018 continue;
4019 }
4020 flush();
4021 last = name;
4022 run = 1;
4023 }
4024 flush();
4025 std::fprintf(stderr, "[rt] passes: present %llu execute %llu (%s) %zu dispatches%s:%s\n",
4026 static_cast<unsigned long long>(present), static_cast<unsigned long long>(d.execute_call),
4027 d.queue_kind ? d.queue_kind : "?", d.dispatch_count,
4028 d.dispatch_count > d.dispatches.size() ? " (last 64)" : "", line.empty() ? " none" : line.c_str());
4029 }
4030
4031 bool submit(VkCommandBuffer command_buffer, VkSemaphore fence, std::uint64_t value,
4032 CheckpointSubmission* diagnostics = nullptr) {
3205 if (context_.is_device_lost()) return false; 4033 if (context_.is_device_lost()) return false;
3206 const std::uint64_t ticket = submitted_ + 1; 4034 const std::uint64_t ticket = submitted_ + 1;
3207 if (last_sparse_) { 4035 if (last_sparse_) {
@@ -3250,7 +4078,15 @@ private:
3250 submit.pCommandBuffers = &command_buffer; 4078 submit.pCommandBuffers = &command_buffer;
3251 submit.signalSemaphoreCount = signal_count; 4079 submit.signalSemaphoreCount = signal_count;
3252 submit.pSignalSemaphores = signals; 4080 submit.pSignalSemaphores = signals;
3253 res = context_.vk.vkQueueSubmit(queue_, 1, &submit, VK_NULL_HANDLE); 4081 // LEONIDA_PASS_TRACE=<n> (with LEONIDA_DEVICE_FAULT=1): in the frame after every n-th present, each
4082 // submission logs its compute programs in order (repeats folded), for the frame's pass order.
4083 if (diagnostics) pass_trace(*diagnostics);
4084 // Publish before the driver can execute a marker or a concurrent fence wait can see the loss.
4085 if (diagnostics) context_.device_fault()->publish(std::move(*diagnostics));
4086 const auto label_fence=context_.gpu_labels_.submit_fence(command_buffer);
4087 res = context_.observe_result(context_.vk.vkQueueSubmit(queue_, 1, &submit, label_fence),
4088 "vkQueueSubmit");
4089 context_.gpu_labels_.submitted(command_buffer,res==VK_SUCCESS);
3254 if (res == VK_SUCCESS) { 4090 if (res == VK_SUCCESS) {
3255 context_.record_submit_locked(progress_, ticket); 4091 context_.record_submit_locked(progress_, ticket);
3256 if (signals_fence) context_.holds().signaled(fence, value); 4092 if (signals_fence) context_.holds().signaled(fence, value);
@@ -3262,6 +4098,12 @@ private:
3262 return false; 4098 return false;
3263 } 4099 }
3264 const bool ok = (res == VK_SUCCESS); 4100 const bool ok = (res == VK_SUCCESS);
4101 if (ok && gpu_latency::enabled()) {
4102 // LEONIDA_GPU_LATENCY=1: when the GPU finished this submission, measured from the submit.
4103 const auto kind = int(kind_);
4104 const auto at = std::chrono::steady_clock::now();
4105 context_.enqueue_fence_callback(progress_, ticket, [kind, at] { gpu_latency::done(kind, at); });
4106 }
3265 if (ok) { 4107 if (ok) {
3266 submitted_ = ticket; 4108 submitted_ = ticket;
3267 clear_waits(ticket); 4109 clear_waits(ticket);
@@ -3292,7 +4134,8 @@ private:
3292 std::vector<PreparedList> prepared_; 4134 std::vector<PreparedList> prepared_;
3293 std::uint32_t open_labels_ = 0; // queue labels begun and not ended 4135 std::uint32_t open_labels_ = 0; // queue labels begun and not ended
3294 bool ok_ = false; 4136 bool ok_ = false;
3295 // Wait-before-Signal. state_mutex_ is outermost (before resource_mutex_ -> tracker_mutex_ -> submit_mutex_) and 4137 // Wait-before-Signal. state_mutex_ is outermost (before pipeline_mutex_ -> resource_mutex_ -> tracker_mutex_ ->
4138 // submit_mutex_) and
3296 // guards the members above that execute, signal, wait and marker touch. 4139 // guards the members above that execute, signal, wait and marker touch.
3297 std::mutex state_mutex_; 4140 std::mutex state_mutex_;
3298 std::deque<Deferred> held_; 4141 std::deque<Deferred> held_;
diff --git a/runtime/src/vulkan_bindless.h b/runtime/src/vulkan_bindless.h
index cb5b61f65..e72225396 100644
--- a/runtime/src/vulkan_bindless.h
+++ b/runtime/src/vulkan_bindless.h
@@ -8,11 +8,13 @@
8// 2 the descriptor hash table 1 7 3D r32ui storage images 256 8// 2 the descriptor hash table 1 7 3D r32ui storage images 256
9// 3 sampled 2D-array images 1024 8 + 3 * dimension + class 256 each: 9// 3 sampled 2D-array images 1024 8 + 3 * dimension + class 256 each:
10// 4 2D r32ui storage images 1024 storage images by component class 10// 4 2D r32ui storage images 1024 storage images by component class
11// dimension: 0 = 2D, 1 = 2D array, 2 = 3D, 3 = 1D (the translator's STORE_DIMS); class: 0 = float, 1 = uint, 2 = sint. 11// dimension: 0 = 2D, 1 = 2D array, 2 = 3D, 3 = 1D (the first four STORE_DIMS); class: 0 = float, 1 = uint, 2 = sint.
12// bindings 20/21: sampled multisample 2D images / 2D arrays, 256 each (runtime SRVs). 12// bindings 20/21: sampled multisample 2D images / 2D arrays, 256 each (runtime SRVs).
13// bindings 22/23 and 24/25 are their UINT and SINT equivalents on devices supporting those classes. 13// bindings 22/23 and 24/25 are their UINT and SINT equivalents on devices supporting those classes.
14// These are the default counts (BindlessFeatures::counts). size_bindings() sizes the 2D, sampler and storage arrays 14// bindings 26-28: storage-only 1D-array images by component class, 256 each (STORE_DIMS index 4).
15// from the device's limits instead; the shaders declare runtime arrays, so any count works for them. 15// These are the default counts (BindlessFeatures::counts). size_bindings() sizes the sampled arrays of every
16// single-sample dimension, the samplers and the storage arrays from the device's limits instead; the shaders declare
17// runtime arrays, so any count works for them.
16// 18//
17// A shader turns a T# or S# into an index through the hash table (descriptor_table.h) and uses that index in 19// A shader turns a T# or S# into an index through the hash table (descriptor_table.h) and uses that index in
18// whichever binding the instruction calls for: the sampled array of the image's dimension, or one of its storage 20// whichever binding the instruction calls for: the sampled array of the image's dimension, or one of its storage
@@ -23,6 +25,14 @@
23// and samplers it adds and keeps them alive while they are in the set; this class owns only the fallbacks and the 25// and samplers it adds and keeps them alive while they are in the set; this class owns only the fallbacks and the
24// table's buffer. 26// table's buffer.
25// 27//
28// The fallbacks stand for the console's null descriptors (a zero T#, a T# whose image the layer refused or never
29// saw): each is of the kind the instruction asks for, since the translator picks the binding by the instruction's
30// dimension and the view by the T#'s numeric class, and a miss at any of them reads zeros. On the console a store or
31// atomic through a null descriptor is dropped and a later read still gives zeros. So the storage fallbacks never
32// share an image with the sampled ones (a store through a null UAV would otherwise show in every null SRV of that
33// dimension), and with BindlessFeatures::null_descriptor (VK_EXT_robustness2 nullDescriptor) they are null
34// descriptors, whose stores Vulkan discards and whose reads are zero.
35//
26// Device features: runtimeDescriptorArray for the shaders. With BindlessFeatures::update_after_bind 36// Device features: runtimeDescriptorArray for the shaders. With BindlessFeatures::update_after_bind
27// (descriptorBindingSampledImageUpdateAfterBind, ...StorageImage..., ...StorageBuffer...) flush() may run while 37// (descriptorBindingSampledImageUpdateAfterBind, ...StorageImage..., ...StorageBuffer...) flush() may run while
28// command buffers that use the set are pending, as long as no descriptor they use changes and 38// command buffers that use the set are pending, as long as no descriptor they use changes and
@@ -37,12 +47,22 @@
37// flush() takes the command buffer that will use the set: it uploads only the slots that changed, from a mapped 47// flush() takes the command buffer that will use the set: it uploads only the slots that changed, from a mapped
38// staging buffer, and barriers the copy before the draws. The table at creation is empty until that first flush. 48// staging buffer, and barriers the copy before the draws. The table at creation is empty until that first flush.
39// 49//
50// When device-local memory runs out (a title that fills VRAM), a new generation's table goes to HOST_VISIBLE memory
51// instead: slower lookups beat no table. Released generations are kept as spares (at most max_spares) and reused,
52// pool and buffers, by the next replacing flush, so steady churn allocates nothing. If a generation still cannot be
53// made, flush() rewrites the current table in place when every submission that could read it is done, and otherwise
54// degrades: the descriptors are written, the table keeps its last uploaded contents (keys added since find the
55// fallback, index 0; keys rebound since keep their previous index, whose views stay alive; removed indices are not
56// given out again meanwhile) and the change waits for a later flush. A flush never fails the submission for want of
57// memory (last_flush_degraded(), degraded_flushes()).
58//
40// Not thread-safe: the owner serialises calls. 59// Not thread-safe: the owner serialises calls.
41 60
42#ifndef VK_NO_PROTOTYPES 61#ifndef VK_NO_PROTOTYPES
43#define VK_NO_PROTOTYPES 62#define VK_NO_PROTOTYPES
44#endif 63#endif
45#include "descriptor_table.h" 64#include "descriptor_table.h"
65#include "queue_families.h"
46 66
47#include <vulkan/vulkan.h> 67#include <vulkan/vulkan.h>
48 68
@@ -52,12 +72,13 @@
52#include <cstring> 72#include <cstring>
53#include <functional> 73#include <functional>
54#include <unordered_map> 74#include <unordered_map>
75#include <utility>
55#include <vector> 76#include <vector>
56 77
57namespace leonida { 78namespace leonida {
58 79
59// The first four dimensions are the translator's STORE_DIMS indices. A cube is a 2D array of six layers. 80// The first five dimensions are the translator's STORE_DIMS indices. A cube is a 2D array of six layers.
60enum class ImageDimension : std::uint32_t { dim_2d, dim_2d_array, dim_3d, dim_1d, dim_2d_ms, dim_2d_ms_array }; 81enum class ImageDimension : std::uint32_t { dim_2d, dim_2d_array, dim_3d, dim_1d, dim_1d_array, dim_2d_ms, dim_2d_ms_array };
61 82
62// Storage views of one image by the component type a shader reads or writes it with (the translator picks by the 83// Storage views of one image by the component type a shader reads or writes it with (the translator picks by the
63// T# format at run time). r32ui is for the atomic instructions, whose image type is R32ui (2D and 3D only). 84// T# format at run time). r32ui is for the atomic instructions, whose image type is R32ui (2D and 3D only).
@@ -70,13 +91,17 @@ struct StorageViews {
70}; 91};
71 92
72namespace bindless { 93namespace bindless {
73inline constexpr std::uint32_t binding_count = 26; 94inline constexpr std::uint32_t binding_count = 29;
74constexpr std::array<std::uint32_t, binding_count> default_counts(); 95constexpr std::array<std::uint32_t, binding_count> default_counts();
75} // namespace bindless 96} // namespace bindless
76 97
77struct BindlessFeatures { 98struct BindlessFeatures {
78 bool update_after_bind = false; 99 bool update_after_bind = false;
79 bool partially_bound = false; 100 bool partially_bound = false;
101 // VK_EXT_robustness2's nullDescriptor is enabled on the device: the storage arrays' fallbacks are null
102 // descriptors (stores and atomics through them are discarded, loads read zero). Without it they are 1x1 images
103 // of their own, apart from the sampled fallbacks, which no store reaches.
104 bool null_descriptor = false;
80 // Fallback sample counts for RGBA8_UNORM, R32_UINT, R32_SINT. A single sample omits that class's MS bindings. 105 // Fallback sample counts for RGBA8_UNORM, R32_UINT, R32_SINT. A single sample omits that class's MS bindings.
81 std::array<VkSampleCountFlagBits, 3> ms_samples{ 106 std::array<VkSampleCountFlagBits, 3> ms_samples{
82 VK_SAMPLE_COUNT_1_BIT, VK_SAMPLE_COUNT_1_BIT, VK_SAMPLE_COUNT_1_BIT}; 107 VK_SAMPLE_COUNT_1_BIT, VK_SAMPLE_COUNT_1_BIT, VK_SAMPLE_COUNT_1_BIT};
@@ -94,10 +119,12 @@ struct Binding {
94inline constexpr std::uint32_t table_binding = 2; 119inline constexpr std::uint32_t table_binding = 2;
95inline constexpr std::uint32_t sampler_binding = 1; 120inline constexpr std::uint32_t sampler_binding = 1;
96inline constexpr std::uint32_t first_ms_binding = 20; 121inline constexpr std::uint32_t first_ms_binding = 20;
122inline constexpr std::uint32_t ms_binding_count = 6;
123inline constexpr std::uint32_t first_1d_array_storage_binding = first_ms_binding + ms_binding_count;
97inline constexpr std::uint32_t no_binding = 0xffffffffu; 124inline constexpr std::uint32_t no_binding = 0xffffffffu;
98 125
99// Indexed by binding number. 126// Indexed by binding number. Keep the literal extent for tools/spirv_metal_set0.py.
100inline constexpr std::array<Binding, 26> bindings = {{ 127inline constexpr std::array<Binding, 29> bindings = {{
101 {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 4096}, {VK_DESCRIPTOR_TYPE_SAMPLER, 1024}, 128 {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 4096}, {VK_DESCRIPTOR_TYPE_SAMPLER, 1024},
102 {VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1}, {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1024}, 129 {VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1}, {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1024},
103 {VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 1024}, {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 256}, 130 {VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 1024}, {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 256},
@@ -111,6 +138,8 @@ inline constexpr std::array<Binding, 26> bindings = {{
111 {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 256}, {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 256}, 138 {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 256}, {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 256},
112 {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 256}, {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 256}, 139 {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 256}, {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 256},
113 {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 256}, {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 256}, 140 {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 256}, {VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 256},
141 {VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 256}, {VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 256},
142 {VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 256},
114}}; 143}};
115 144
116static_assert(bindings.size() == binding_count); 145static_assert(bindings.size() == binding_count);
@@ -121,8 +150,12 @@ constexpr std::array<std::uint32_t, binding_count> default_counts() {
121 return counts; 150 return counts;
122} 151}
123 152
153constexpr bool ms_binding(std::uint32_t binding) {
154 return binding >= first_ms_binding && binding < first_ms_binding + ms_binding_count;
155}
156
124constexpr bool binding_enabled(std::uint32_t binding, const BindlessFeatures& features) { 157constexpr bool binding_enabled(std::uint32_t binding, const BindlessFeatures& features) {
125 return binding < first_ms_binding || features.ms_samples[(binding - first_ms_binding) / 2] != VK_SAMPLE_COUNT_1_BIT; 158 return !ms_binding(binding) || features.ms_samples[(binding - first_ms_binding) / 2] != VK_SAMPLE_COUNT_1_BIT;
126} 159}
127 160
128// Every binding is visible to every shader stage. Preserve the single-sample layout on devices whose 161// Every binding is visible to every shader stage. Preserve the single-sample layout on devices whose
@@ -131,7 +164,8 @@ constexpr void limit_ms_bindings(BindlessFeatures& features, std::uint32_t sampl
131 std::uint32_t resource_limit) { 164 std::uint32_t resource_limit) {
132 const auto& counts = features.counts; 165 const auto& counts = features.counts;
133 std::uint32_t sampled = 0, total = 0; 166 std::uint32_t sampled = 0, total = 0;
134 for (std::uint32_t b = 0; b < first_ms_binding; ++b) { 167 for (std::uint32_t b = 0; b < binding_count; ++b) {
168 if (ms_binding(b)) continue;
135 if (bindings[b].type == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE) sampled += counts[b]; 169 if (bindings[b].type == VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE) sampled += counts[b];
136 if (bindings[b].type != VK_DESCRIPTOR_TYPE_SAMPLER) total += counts[b]; 170 if (bindings[b].type != VK_DESCRIPTOR_TYPE_SAMPLER) total += counts[b];
137 } 171 }
@@ -153,12 +187,13 @@ constexpr bool multisampled(ImageDimension dimension) {
153} 187}
154 188
155constexpr std::uint32_t sampled_binding(ImageDimension dimension, std::uint32_t component_class = 0) { 189constexpr std::uint32_t sampled_binding(ImageDimension dimension, std::uint32_t component_class = 0) {
156 constexpr std::uint32_t by_dimension[] = {0, 3, 6, 5, first_ms_binding, first_ms_binding + 1}; 190 constexpr std::uint32_t by_dimension[] = {0, 3, 6, 5, no_binding, first_ms_binding, first_ms_binding + 1};
157 return by_dimension[std::uint32_t(dimension)] + (multisampled(dimension) ? component_class * 2 : 0); 191 return by_dimension[std::uint32_t(dimension)] + (multisampled(dimension) ? component_class * 2 : 0);
158} 192}
159 193
160// component_class: 0 = float, 1 = uint, 2 = sint. 194// component_class: 0 = float, 1 = uint, 2 = sint.
161constexpr std::uint32_t storage_binding(ImageDimension dimension, std::uint32_t component_class) { 195constexpr std::uint32_t storage_binding(ImageDimension dimension, std::uint32_t component_class) {
196 if (dimension == ImageDimension::dim_1d_array) return first_1d_array_storage_binding + component_class;
162 return multisampled(dimension) ? no_binding : 8 + 3 * std::uint32_t(dimension) + component_class; 197 return multisampled(dimension) ? no_binding : 8 + 3 * std::uint32_t(dimension) + component_class;
163} 198}
164 199
@@ -196,8 +231,13 @@ struct SetLayout {
196}; 231};
197 232
198// What size_bindings() grows to where the device's limits allow. At 32-64 bytes a descriptor the whole set is then 233// What size_bindings() grows to where the device's limits allow. At 32-64 bytes a descriptor the whole set is then
199// 3-6 MiB (93793 descriptors on an RTX 5070). 234// 5-10 MiB with 153697 descriptors when all MS classes and array bindings reach their limits (an RTX 5070).
200inline constexpr std::uint32_t max_2d_images = 65536; 235inline constexpr std::uint32_t max_2d_images = 65536;
236// The other single-sample dimensions: a title streams far more cube maps and texture arrays (and 1D lookup
237// textures) than the 1024 and 256 of the defaults, each distinct T# of one taking its own index.
238inline constexpr std::uint32_t max_2d_array_images = 16384;
239inline constexpr std::uint32_t max_3d_images = 4096;
240inline constexpr std::uint32_t max_1d_images = 4096;
201inline constexpr std::uint32_t max_storage_indices = 4096; // in each storage array, at most its dimension's images 241inline constexpr std::uint32_t max_storage_indices = 4096; // in each storage array, at most its dimension's images
202// A full D3D12 shader-visible sampler heap (2048) and room for literal and static S#s, within what the device can 242// A full D3D12 shader-visible sampler heap (2048) and room for literal and static S#s, within what the device can
203// create (maxSamplerAllocationCount, at least 4000) less the samplers that are not in the set. 243// create (maxSamplerAllocationCount, at least 4000) less the samplers that are not in the set.
@@ -212,10 +252,12 @@ inline constexpr std::uint32_t growth_headroom = 64;
212// standalone samplers do not, though they count in an update-after-bind pool. 252// standalone samplers do not, though they count in an update-after-bind pool.
213// 1. The default counts, or as much of them as the device holds: samplers, then storage, then 2D images. 253// 1. The default counts, or as much of them as the device holds: samplers, then storage, then 2D images.
214// 2. The MS pairs that fit beside them (limit_ms_bindings, which may turn classes off). 254// 2. The MS pairs that fit beside them (limit_ms_bindings, which may turn classes off).
215// 3. Growth towards the maximums above, in the same order, within maxPerSetDescriptors. That limit only says 255// 3. Growth towards the maximums above, in the same order, then the 2D-array, 3D and 1D images, within
216// what is sure to work (vkGetDescriptorSetLayoutSupport may allow more), so it never shrinks step 1. 256// maxPerSetDescriptors. That limit only says what is sure to work (vkGetDescriptorSetLayoutSupport may allow
217// A storage array holds the smaller of the storage count and its dimension's images: add_image never gives a 257// more), so it never shrinks step 1.
218// storage view an index past the sampled array. The other bindings keep their default counts. 258// A storage array holds the smaller of the storage count and its dimension's sampled count: add_image never
259// gives a storage view an index past the sampled array. The storage-only 1D array is capped at its default of 256.
260// The other bindings keep their default counts.
219// layout_supported, when given, answers vkGetDescriptorSetLayoutSupport for set 0 at the counts in its argument: 261// layout_supported, when given, answers vkGetDescriptorSetLayoutSupport for set 0 at the counts in its argument:
220// step 3 then also grows past maxPerSetDescriptors where the device says the layout works (Intel's Xe-LP reports 262// step 3 then also grows past maxPerSetDescriptors where the device says the layout works (Intel's Xe-LP reports
221// 6159 and supports the full sizes, D3D-219). It is asked only once the sum is above maxPerSetDescriptors. 263// 6159 and supports the full sizes, D3D-219). It is asked only once the sum is above maxPerSetDescriptors.
@@ -243,15 +285,24 @@ inline bool size_bindings(BindlessFeatures& features, const VkPhysicalDeviceLimi
243 auto& counts = features.counts; 285 auto& counts = features.counts;
244 counts = default_counts(); 286 counts = default_counts();
245 std::uint32_t images = 1, samplers = 1, storage = 1; 287 std::uint32_t images = 1, samplers = 1, storage = 1;
288 std::uint32_t arrays = counts[sampled_binding(ImageDimension::dim_2d_array)];
289 std::uint32_t volumes = counts[sampled_binding(ImageDimension::dim_3d)];
290 std::uint32_t lines = counts[sampled_binding(ImageDimension::dim_1d)];
246 // Until the end the 2D storage arrays are not capped by the 2D images, which grow after them: capping can only 291 // Until the end the 2D storage arrays are not capped by the 2D images, which grow after them: capping can only
247 // take descriptors away. 292 // take descriptors away.
248 const auto apply = [&](bool final) { 293 const auto apply = [&](bool final) {
249 counts[sampled_binding(ImageDimension::dim_2d)] = images; 294 counts[sampled_binding(ImageDimension::dim_2d)] = images;
295 counts[sampled_binding(ImageDimension::dim_2d_array)] = arrays;
296 counts[sampled_binding(ImageDimension::dim_3d)] = volumes;
297 counts[sampled_binding(ImageDimension::dim_1d)] = lines;
250 counts[sampler_binding] = samplers; 298 counts[sampler_binding] = samplers;
251 for (std::uint32_t d = 0; d < 4; ++d) { 299 for (std::uint32_t d = 0; d <= std::uint32_t(ImageDimension::dim_1d_array); ++d) {
252 const auto dimension = ImageDimension(d); 300 const auto dimension = ImageDimension(d);
301 const auto sampled_at = sampled_binding(dimension);
302 const auto capacity = sampled_at == no_binding ? bindings[storage_binding(dimension, 0)].count
303 : counts[sampled_at];
253 const bool capped = final || dimension != ImageDimension::dim_2d; 304 const bool capped = final || dimension != ImageDimension::dim_2d;
254 const std::uint32_t held = capped ? std::min(storage, counts[sampled_binding(dimension)]) : storage; 305 const std::uint32_t held = capped ? std::min(storage, capacity) : storage;
255 for (std::uint32_t c = 0; c < 3; ++c) counts[storage_binding(dimension, c)] = held; 306 for (std::uint32_t c = 0; c < 3; ++c) counts[storage_binding(dimension, c)] = held;
256 if (r32ui_binding(dimension) != no_binding) counts[r32ui_binding(dimension)] = held; 307 if (r32ui_binding(dimension) != no_binding) counts[r32ui_binding(dimension)] = held;
257 } 308 }
@@ -305,6 +356,9 @@ inline bool size_bindings(BindlessFeatures& features, const VkPhysicalDeviceLimi
305 grow(samplers, std::max(samplers, std::min(max_samplers, creatable)), growth_headroom, set_limit); 356 grow(samplers, std::max(samplers, std::min(max_samplers, creatable)), growth_headroom, set_limit);
306 grow(images, std::max(images, max_2d_images), growth_headroom, set_limit); 357 grow(images, std::max(images, max_2d_images), growth_headroom, set_limit);
307 grow(storage, std::max(storage, max_storage_indices), growth_headroom, set_limit); 358 grow(storage, std::max(storage, max_storage_indices), growth_headroom, set_limit);
359 grow(arrays, std::max(arrays, max_2d_array_images), growth_headroom, set_limit);
360 grow(volumes, std::max(volumes, max_3d_images), growth_headroom, set_limit);
361 grow(lines, std::max(lines, max_1d_images), growth_headroom, set_limit);
308 apply(true); 362 apply(true);
309 return full; 363 return full;
310} 364}
@@ -313,21 +367,29 @@ inline bool size_bindings(BindlessFeatures& features, const VkPhysicalDeviceLimi
313 367
314class BindlessSet { 368class BindlessSet {
315public: 369public:
370 // `descriptor_hash` is the finalizer the shaders of this device probe the table with (descriptor_table.h); it is
371 // handed to the table before its first key is inserted, so every insert, lookup and rehash agrees with them.
316 BindlessSet(PFN_vkGetDeviceProcAddr get, VkDevice device, const VkPhysicalDeviceMemoryProperties& memory, 372 BindlessSet(PFN_vkGetDeviceProcAddr get, VkDevice device, const VkPhysicalDeviceMemoryProperties& memory,
317 BindlessFeatures features = {}) 373 BindlessFeatures features = {}, DescriptorHashKind descriptor_hash = DescriptorHashKind::fnv1a,
318 : device_(device), memory_(memory), features_(features) { 374 std::vector<std::uint32_t> families = {})
375 : device_(device), memory_(memory), features_(features), families_(std::move(families)),
376 table_(64, descriptor_hash) {
319 ok_ = vk_.load(get, device) && create_layout() && create_fallbacks() && create_table_buffers() && fill(); 377 ok_ = vk_.load(get, device) && create_layout() && create_fallbacks() && create_table_buffers() && fill();
320 } 378 }
321 379
322 ~BindlessSet() { 380 ~BindlessSet() {
323 release_retired(); 381 release_retired();
382 for (Generation& spare : spares_) destroy(spare);
383 spares_.clear();
324 destroy(table_buffers_); 384 destroy(table_buffers_);
325 if (fallback_sampler_) vk_.vkDestroySampler(device_, fallback_sampler_, nullptr); 385 if (fallback_sampler_) vk_.vkDestroySampler(device_, fallback_sampler_, nullptr);
326 for (const VkImageView view : fallback_views_) vk_.vkDestroyImageView(device_, view, nullptr); 386 for (const VkImageView view : fallback_views_) vk_.vkDestroyImageView(device_, view, nullptr);
327 for (const auto& image : fallback_images_) { 387 const auto destroy_image = [&](const FallbackImage& image) {
328 if (image.image) vk_.vkDestroyImage(device_, image.image, nullptr); 388 if (image.image) vk_.vkDestroyImage(device_, image.image, nullptr);
329 if (image.memory) vk_.vkFreeMemory(device_, image.memory, nullptr); 389 if (image.memory) vk_.vkFreeMemory(device_, image.memory, nullptr);
330 } 390 };
391 for (const auto& image : fallback_images_) destroy_image(image);
392 for (const auto& image : storage_fallback_images_) destroy_image(image);
331 if (pool_) vk_.vkDestroyDescriptorPool(device_, pool_, nullptr); // frees the set 393 if (pool_) vk_.vkDestroyDescriptorPool(device_, pool_, nullptr); // frees the set
332 if (layout_) vk_.vkDestroyDescriptorSetLayout(device_, layout_, nullptr); 394 if (layout_) vk_.vkDestroyDescriptorSetLayout(device_, layout_, nullptr);
333 } 395 }
@@ -342,7 +404,8 @@ public:
342 // How many images of a dimension the set holds, the fallback included, and how many of the lowest of those 404 // How many images of a dimension the set holds, the fallback included, and how many of the lowest of those
343 // indices its storage arrays hold (0 for the MS dimensions, which have none). The same for samplers. 405 // indices its storage arrays hold (0 for the MS dimensions, which have none). The same for samplers.
344 std::uint32_t image_capacity(ImageDimension dimension) const { 406 std::uint32_t image_capacity(ImageDimension dimension) const {
345 return features_.counts[bindless::sampled_binding(dimension)]; 407 const auto binding = bindless::sampled_binding(dimension);
408 return binding == bindless::no_binding ? storage_capacity(dimension) : features_.counts[binding];
346 } 409 }
347 std::uint32_t storage_capacity(ImageDimension dimension) const { 410 std::uint32_t storage_capacity(ImageDimension dimension) const {
348 return bindless::multisampled(dimension) ? 0 : features_.counts[bindless::storage_binding(dimension, 0)]; 411 return bindless::multisampled(dimension) ? 0 : features_.counts[bindless::storage_binding(dimension, 0)];
@@ -369,8 +432,12 @@ public:
369 void record_fallback_init(VkCommandBuffer command_buffer) { 432 void record_fallback_init(VkCommandBuffer command_buffer) {
370 fallbacks_ready_ = true; 433 fallbacks_ready_ = true;
371 std::vector<VkImageMemoryBarrier> barriers; 434 std::vector<VkImageMemoryBarrier> barriers;
372 for (const auto& image : fallback_images_) { 435 std::vector<const FallbackImage*> images;
373 if (!image.image) continue; // unsupported multisample component class 436 for (const auto& image : fallback_images_) images.push_back(&image);
437 for (const auto& image : storage_fallback_images_) images.push_back(&image);
438 for (const FallbackImage* fallback : images) {
439 const FallbackImage& image = *fallback;
440 if (!image.image) continue; // an unused class, or a storage fallback that is a null descriptor
374 VkImageMemoryBarrier barrier{VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER}; 441 VkImageMemoryBarrier barrier{VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER};
375 barrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT; 442 barrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
376 barrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED; 443 barrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
@@ -401,6 +468,7 @@ public:
401 std::uint32_t add_image(ImageDimension dimension, VkImageView sampled, VkImageLayout sampled_layout, 468 std::uint32_t add_image(ImageDimension dimension, VkImageView sampled, VkImageLayout sampled_layout,
402 const StorageViews& storage = {}, std::uint32_t sampled_class = 0) { 469 const StorageViews& storage = {}, std::uint32_t sampled_class = 0) {
403 const bool stores = storage.as_float || storage.as_uint || storage.as_sint || storage.r32ui; 470 const bool stores = storage.as_float || storage.as_uint || storage.as_sint || storage.r32ui;
471 if (!stores && bindless::sampled_binding(dimension) == bindless::no_binding) return 0;
404 if (bindless::multisampled(dimension) && (stores || !supports_ms_class(sampled_class))) return 0; 472 if (bindless::multisampled(dimension) && (stores || !supports_ms_class(sampled_class))) return 0;
405 auto& used = image_used_[std::uint32_t(dimension)]; 473 auto& used = image_used_[std::uint32_t(dimension)];
406 const std::uint32_t low_end = std::min(std::uint32_t(used.size()), storage_capacity(dimension)); 474 const std::uint32_t low_end = std::min(std::uint32_t(used.size()), storage_capacity(dimension));
@@ -414,16 +482,20 @@ public:
414 void update_image(ImageDimension dimension, std::uint32_t index, VkImageView sampled, VkImageLayout sampled_layout, 482 void update_image(ImageDimension dimension, std::uint32_t index, VkImageView sampled, VkImageLayout sampled_layout,
415 const StorageViews& storage = {}, std::uint32_t sampled_class = 0) { 483 const StorageViews& storage = {}, std::uint32_t sampled_class = 0) {
416 const auto& used = image_used_[std::uint32_t(dimension)]; 484 const auto& used = image_used_[std::uint32_t(dimension)];
417 if (index && index < used.size() && used[index]) 485 if (index && index < used.size() && used[index] == in_use)
418 write_image(dimension, index, sampled, sampled_layout, storage, sampled_class); 486 write_image(dimension, index, sampled, sampled_layout, storage, sampled_class);
419 } 487 }
420 488
421 // Returns the index to the fallback and frees it. The caller removes the image's keys with erase_key() first. 489 // Returns the index to the fallback and frees it. The caller removes the image's keys with erase_key() first.
490 // While the table has changes the GPU's copy lacks (an erased key may still name the index there), the index is
491 // held until a flush has brought the table up to date (one that did not degrade), so that no new image answers
492 // that key; otherwise it is free at once.
422 void remove_image(ImageDimension dimension, std::uint32_t index) { 493 void remove_image(ImageDimension dimension, std::uint32_t index) {
423 auto& used = image_used_[std::uint32_t(dimension)]; 494 auto& used = image_used_[std::uint32_t(dimension)];
424 if (!index || index >= used.size() || !used[index]) return; 495 if (!index || index >= used.size() || used[index] != in_use) return;
425 write_image(dimension, index, VK_NULL_HANDLE, VK_IMAGE_LAYOUT_GENERAL, {}, 0); 496 write_image(dimension, index, VK_NULL_HANDLE, VK_IMAGE_LAYOUT_GENERAL, {}, 0);
426 used[index] = 0; 497 used[index] = table_dirty_ ? held : 0;
498 if (table_dirty_) held_images_.push_back({dimension, index});
427 } 499 }
428 500
429 // 0 when the sampler array is full. 501 // 0 when the sampler array is full.
@@ -434,9 +506,10 @@ public:
434 } 506 }
435 507
436 void remove_sampler(std::uint32_t index) { 508 void remove_sampler(std::uint32_t index) {
437 if (!index || index >= sampler_used_.size() || !sampler_used_[index]) return; 509 if (!index || index >= sampler_used_.size() || sampler_used_[index] != in_use) return;
438 write_sampler(index, fallback_sampler_); 510 write_sampler(index, fallback_sampler_);
439 sampler_used_[index] = 0; 511 sampler_used_[index] = table_dirty_ ? held : 0;
512 if (table_dirty_) held_samplers_.push_back(index);
440 } 513 }
441 514
442 // T# and S# keys to the indices above: the table of binding 2 (descriptor_table.h). Changes reach the shaders 515 // T# and S# keys to the indices above: the table of binding 2 (descriptor_table.h). Changes reach the shaders
@@ -479,7 +552,10 @@ public:
479 void table_upload_result(bool submitted) { 552 void table_upload_result(bool submitted) {
480 if (!upload_in_flight_) return; 553 if (!upload_in_flight_) return;
481 upload_in_flight_ = false; 554 upload_in_flight_ = false;
482 if (submitted) return; 555 if (submitted) {
556 table_on_gpu_ = true; // the current buffers hold a table the GPU was given
557 return;
558 }
483 table_dirty_ = true; 559 table_dirty_ = true;
484 force_full_upload_ = true; 560 force_full_upload_ = true;
485 } 561 }
@@ -488,17 +564,42 @@ public:
488 // the set are recorded after it. When flush_replaces_table() was true this starts a new generation (table 564 // the set are recorded after it. When flush_replaces_table() was true this starts a new generation (table
489 // buffers, descriptor set, binding 2 and every descriptor written so far) and puts the previous one on the retire 565 // buffers, descriptor set, binding 2 and every descriptor written so far) and puts the previous one on the retire
490 // list, stamped `retire_ticket`: the owner's number for "every submission made so far", which release_retired() 566 // list, stamped `retire_ticket`: the owner's number for "every submission made so far", which release_retired()
491 // compares with what has completed. False when the new generation cannot be made: the set then still has the 567 // compares with what has completed.
492 // table as of the last flush. 568 // When the new generation cannot be made (no memory for its buffers or descriptor pool) and `completed_ticket` is
493 bool flush(VkCommandBuffer command_buffer, std::uint64_t retire_ticket = 0) { 569 // given, it is asked what has completed: the generations retired up to there are released (to the spares) and
570 // the generation is tried again; when everything up to `retire_ticket` is done, nothing reads the current table
571 // and it is rewritten in place if it is large enough. Failing both, the flush degrades instead of failing: the
572 // descriptors are written in place, as on a flush that does not replace the table (add_image writes new indices,
573 // which no key of the GPU's table reaches; remove_image writes the fallback, and the index stays held until a
574 // flush that does not degrade), the table keeps what it had, and its changes wait for a later flush
575 // (last_flush_degraded()). False only without a command buffer, when nothing can be recorded.
576 bool flush(VkCommandBuffer command_buffer, std::uint64_t retire_ticket = 0,
577 const std::function<std::uint64_t()>& completed_ticket = {}) {
578 if (!command_buffer) return false;
494 bool replaced = false; 579 bool replaced = false;
495 bool written = true; 580 bool written = true;
496 const bool must_replace = flush_replaces_table(); 581 const bool must_replace = flush_replaces_table();
582 last_flush_degraded_ = false;
497 if (table_dirty_ || !table_uploaded_) written = upload_table(command_buffer, retire_ticket, replaced); 583 if (table_dirty_ || !table_uploaded_) written = upload_table(command_buffer, retire_ticket, replaced);
584 if (!written && must_replace && completed_ticket) {
585 const std::uint64_t completed = completed_ticket();
586 if (!retired_.empty()) {
587 release_retired(completed);
588 written = upload_table(command_buffer, retire_ticket, replaced);
589 }
590 if (!written && completed >= retire_ticket) written = rewrite_table_in_place(command_buffer);
591 }
498 last_flush_replaced_ = replaced; 592 last_flush_replaced_ = replaced;
499 // The new generation could not be made: the current set is the one running work reads, so its descriptors are 593 // Degrading keeps what the current buffers hold, so only once they hold a table that reached the queue: a
500 // not written in place either. The pending writes and the table's changes stay for the next flush. 594 // first flush under full memory, or one after a failed submission of the only upload, has nothing on the GPU
501 if (!written && must_replace) return false; 595 // (word 0 is the probe mask) and refuses as before (review of #64).
596 if (!written && must_replace && !table_on_gpu_) return false;
597 if (!written && must_replace) {
598 // The current set is the one running work reads, and the table's changes may move or rebind live keys:
599 // they stay for a later flush, and keys added since find the fallback until then.
600 ++degraded_flushes_;
601 last_flush_degraded_ = true;
602 }
502 for (const Pending& pending : pending_) { 603 for (const Pending& pending : pending_) {
503 if (pending.binding >= shadow_.size() || pending.index >= shadow_[pending.binding].size()) continue; 604 if (pending.binding >= shadow_.size() || pending.index >= shadow_[pending.binding].size()) continue;
504 shadow_[pending.binding][pending.index] = pending.info; 605 shadow_[pending.binding][pending.index] = pending.info;
@@ -521,17 +622,29 @@ public:
521 } 622 }
522 pending_.clear(); 623 pending_.clear();
523 pending_slots_.clear(); 624 pending_slots_.clear();
524 return written; 625 if (!last_flush_degraded_) {
626 // The table this flush leaves on the GPU names no removed index any more: they can be given out again.
627 for (const auto& [dimension, index] : held_images_) image_used_[std::uint32_t(dimension)][index] = 0;
628 for (const std::uint32_t index : held_samplers_) sampler_used_[index] = 0;
629 held_images_.clear();
630 held_samplers_.clear();
631 }
632 return true;
525 } 633 }
526 634
527 // Frees the generations (table buffers and descriptor set) that flush() retired with a ticket up to `completed`. 635 // Releases the generations (table buffers and descriptor set) that flush() retired with a ticket up to
528 // The default frees all of them: when nothing submitted before the last flush() still runs. 636 // `completed`: up to max_spares of them, large enough for the table, are kept for the next replacing flush to
637 // reuse; the others are freed. The default releases all of them: when nothing submitted before the last flush()
638 // still runs.
529 void release_retired(std::uint64_t completed = UINT64_MAX) { 639 void release_retired(std::uint64_t completed = UINT64_MAX) {
530 std::size_t kept = 0; 640 std::size_t kept = 0;
531 for (auto& generation : retired_) { 641 for (auto& generation : retired_) {
532 if (generation.ticket <= completed) { 642 if (generation.ticket <= completed) {
533 destroy(generation.buffers); 643 if (spares_.size() < max_spares && generation.pool && generation.buffers.staging.mapped &&
534 if (generation.pool) vk_.vkDestroyDescriptorPool(device_, generation.pool, nullptr); 644 generation.buffers.table.size >= table_.size_bytes())
645 spares_.push_back(generation);
646 else
647 destroy(generation);
535 } else { 648 } else {
536 retired_[kept++] = generation; 649 retired_[kept++] = generation;
537 } 650 }
@@ -548,11 +661,32 @@ public:
548 std::uint64_t generations_made() const { return generations_made_; } 661 std::uint64_t generations_made() const { return generations_made_; }
549 std::size_t retired_count() const { return retired_.size(); } 662 std::size_t retired_count() const { return retired_.size(); }
550 663
664 // Released generations kept for reuse, and how many replacing flushes reused one instead of allocating. One: the
665 // current generation and a spare are the two a replacing flush has at its peak anyway (the new one, and the one
666 // retired until its work completes), and a grown table can be large (64 MiB at a million slots).
667 static constexpr std::size_t max_spares = 1;
668 std::size_t spare_count() const { return spares_.size(); }
669 std::uint64_t spares_reused() const { return spares_reused_; }
670 // Flushes that could not make the generation they needed and kept the previous table (see flush()), and whether
671 // the last one did; flushes that rewrote the table in place instead, every submission being done.
672 std::uint64_t degraded_flushes() const { return degraded_flushes_; }
673 bool last_flush_degraded() const { return last_flush_degraded_; }
674 std::uint64_t in_place_rewrites() const { return in_place_rewrites_; }
675 // Table buffers placed in HOST_VISIBLE memory because the DEVICE_LOCAL allocation failed.
676 std::uint64_t table_host_fallbacks() const { return table_host_fallbacks_; }
677 // What the last generation that could not be made failed to get: "table buffer", "staging buffer" or
678 // "descriptor set" (nullptr before any failure), and the Vulkan result of that call.
679 const char* last_failure() const { return last_failure_; }
680 VkResult last_failure_result() const { return last_failure_result_; }
681 // Bytes of the current table buffer (the table grows by doubling its slots: size_bytes() of table()).
682 std::size_t table_buffer_bytes() const { return table_buffers_.table.size; }
683
551private: 684private:
552 struct Functions { 685 struct Functions {
553#define LEONIDA_BINDLESS_FUNCTIONS(X) \ 686#define LEONIDA_BINDLESS_FUNCTIONS(X) \
554 X(vkCreateDescriptorSetLayout) X(vkDestroyDescriptorSetLayout) X(vkCreateDescriptorPool) \ 687 X(vkCreateDescriptorSetLayout) X(vkDestroyDescriptorSetLayout) X(vkCreateDescriptorPool) \
555 X(vkDestroyDescriptorPool) X(vkAllocateDescriptorSets) X(vkUpdateDescriptorSets) X(vkCreateBuffer) \ 688 X(vkDestroyDescriptorPool) X(vkResetDescriptorPool) X(vkAllocateDescriptorSets) X(vkUpdateDescriptorSets) \
689 X(vkCreateBuffer) \
556 X(vkDestroyBuffer) X(vkGetBufferMemoryRequirements) X(vkBindBufferMemory) X(vkAllocateMemory) \ 690 X(vkDestroyBuffer) X(vkGetBufferMemoryRequirements) X(vkBindBufferMemory) X(vkAllocateMemory) \
557 X(vkFreeMemory) X(vkMapMemory) X(vkCreateImage) X(vkDestroyImage) X(vkGetImageMemoryRequirements) \ 691 X(vkFreeMemory) X(vkMapMemory) X(vkCreateImage) X(vkDestroyImage) X(vkGetImageMemoryRequirements) \
558 X(vkBindImageMemory) X(vkCreateImageView) X(vkDestroyImageView) X(vkCreateSampler) X(vkDestroySampler) \ 692 X(vkBindImageMemory) X(vkCreateImageView) X(vkDestroyImageView) X(vkCreateSampler) X(vkDestroySampler) \
@@ -583,6 +717,7 @@ private:
583 VkDeviceMemory memory = VK_NULL_HANDLE; 717 VkDeviceMemory memory = VK_NULL_HANDLE;
584 void* mapped = nullptr; 718 void* mapped = nullptr;
585 std::size_t size = 0; 719 std::size_t size = 0;
720 bool device_local = false; // the memory is DEVICE_LOCAL
586 }; 721 };
587 722
588 // The table and the mapped staging copy the CPU writes before vkCmdCopyBuffer moves the changes. 723 // The table and the mapped staging copy the CPU writes before vkCmdCopyBuffer moves the changes.
@@ -591,13 +726,23 @@ private:
591 TableBuffer staging; // HOST_VISIBLE | HOST_COHERENT 726 TableBuffer staging; // HOST_VISIBLE | HOST_COHERENT
592 }; 727 };
593 728
729 struct Generation { // what a replaced table leaves for release_retired()
730 TableBuffers buffers;
731 VkDescriptorPool pool = VK_NULL_HANDLE; // owns the descriptor set
732 VkDescriptorSet set = VK_NULL_HANDLE;
733 std::uint64_t ticket = 0;
734 };
735
594 struct Pending { 736 struct Pending {
595 std::uint32_t binding; 737 std::uint32_t binding;
596 std::uint32_t index; 738 std::uint32_t index;
597 VkDescriptorImageInfo info; 739 VkDescriptorImageInfo info;
598 }; 740 };
599 741
600 static constexpr std::uint32_t dimensions = 6, classes = 3; 742 static constexpr std::uint32_t dimensions = 7, classes = 3;
743 // image_used_ and sampler_used_: 0 free, in_use, or held (removed while the table was dirty: free after the next
744 // flush that does not degrade).
745 static constexpr std::uint8_t in_use = 1, held = 2;
601 746
602 // The first free index in [begin, end), marked used; 0 when there is none. 747 // The first free index in [begin, end), marked used; 0 when there is none.
603 static std::uint32_t allocate(std::vector<std::uint8_t>& used, std::uint32_t begin, std::uint32_t end) { 748 static std::uint32_t allocate(std::vector<std::uint8_t>& used, std::uint32_t begin, std::uint32_t end) {
@@ -645,21 +790,35 @@ private:
645 pool_info.maxSets = 1; 790 pool_info.maxSets = 1;
646 pool_info.poolSizeCount = pool_size_count_; 791 pool_info.poolSizeCount = pool_size_count_;
647 pool_info.pPoolSizes = pool_sizes_.data(); 792 pool_info.pPoolSizes = pool_sizes_.data();
648 if (vk_.vkCreateDescriptorPool(device_, &pool_info, nullptr, &pool) != VK_SUCCESS) { 793 if (const VkResult result = vk_.vkCreateDescriptorPool(device_, &pool_info, nullptr, &pool);
794 result != VK_SUCCESS) {
649 pool = VK_NULL_HANDLE; 795 pool = VK_NULL_HANDLE;
796 note_failure("descriptor set", result);
650 return false; 797 return false;
651 } 798 }
799 if (allocate_set(pool, set)) return true;
800 vk_.vkDestroyDescriptorPool(device_, pool, nullptr);
801 pool = VK_NULL_HANDLE;
802 return false;
803 }
804
805 bool allocate_set(VkDescriptorPool pool, VkDescriptorSet& set) const {
652 VkDescriptorSetAllocateInfo set_info{VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO}; 806 VkDescriptorSetAllocateInfo set_info{VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO};
653 set_info.descriptorPool = pool; 807 set_info.descriptorPool = pool;
654 set_info.descriptorSetCount = 1; 808 set_info.descriptorSetCount = 1;
655 set_info.pSetLayouts = &layout_; 809 set_info.pSetLayouts = &layout_;
656 if (vk_.vkAllocateDescriptorSets(device_, &set_info, &set) == VK_SUCCESS) return true; 810 const VkResult result = vk_.vkAllocateDescriptorSets(device_, &set_info, &set);
657 vk_.vkDestroyDescriptorPool(device_, pool, nullptr); 811 if (result == VK_SUCCESS) return true;
658 pool = VK_NULL_HANDLE;
659 set = VK_NULL_HANDLE; 812 set = VK_NULL_HANDLE;
813 note_failure("descriptor set", result);
660 return false; 814 return false;
661 } 815 }
662 816
817 void note_failure(const char* what, VkResult result) const {
818 last_failure_ = what;
819 last_failure_result_ = result;
820 }
821
663 // Writes every descriptor written so far (the shadow) into the current set, one update per run of written 822 // Writes every descriptor written so far (the shadow) into the current set, one update per run of written
664 // elements: the set was just made, and unwritten elements stay unwritten, as partially_bound allows. 823 // elements: the set was just made, and unwritten elements stay unwritten, as partially_bound allows.
665 void write_shadow() const { 824 void write_shadow() const {
@@ -688,59 +847,82 @@ private:
688 vk_.vkUpdateDescriptorSets(device_, std::uint32_t(writes.size()), writes.data(), 0, nullptr); 847 vk_.vkUpdateDescriptorSets(device_, std::uint32_t(writes.size()), writes.data(), 0, nullptr);
689 } 848 }
690 849
691 // One 1x1 image for each image type and component class, and the views of them every binding needs. 850 // The fallbacks of every binding (the class comment): a 1x1 sampled image for each image type (each MS class
851 // its own), and the storage arrays' 1x1 images of each type and component class, or null descriptors with
852 // features_.null_descriptor. A sampled and a storage fallback never share an image.
692 bool create_fallbacks() { 853 bool create_fallbacks() {
693 // Each MS class shares one sampled-only fallback between its 2D and 2D-array views. 854 // Each MS class shares one sampled-only fallback between its 2D and 2D-array views; so does each single-sample
855 // type between its 2D and 2D-array views, sampled and storage alike.
694 constexpr VkImageType types[] = {VK_IMAGE_TYPE_2D, VK_IMAGE_TYPE_3D, VK_IMAGE_TYPE_1D, VK_IMAGE_TYPE_2D}; 856 constexpr VkImageType types[] = {VK_IMAGE_TYPE_2D, VK_IMAGE_TYPE_3D, VK_IMAGE_TYPE_1D, VK_IMAGE_TYPE_2D};
695 constexpr std::uint32_t ms_type = 3; 857 constexpr std::uint32_t ms_type = 3;
696 constexpr VkFormat formats[classes] = {VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_R32_UINT, VK_FORMAT_R32_SINT}; 858 constexpr VkFormat formats[classes] = {VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_R32_UINT, VK_FORMAT_R32_SINT};
697 // dimension -> (index into types, view type) 859 // dimension -> (index into types, view type)
698 constexpr std::uint32_t type_of[dimensions] = {0, 0, 1, 2, ms_type, ms_type}; 860 constexpr std::uint32_t type_of[dimensions] = {0, 0, 1, 2, 2, ms_type, ms_type};
699 constexpr VkImageViewType view_types[dimensions] = {VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_VIEW_TYPE_2D_ARRAY, 861 constexpr VkImageViewType view_types[dimensions] = {VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_VIEW_TYPE_2D_ARRAY,
700 VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_1D, 862 VK_IMAGE_VIEW_TYPE_3D, VK_IMAGE_VIEW_TYPE_1D,
701 VK_IMAGE_VIEW_TYPE_2D, VK_IMAGE_VIEW_TYPE_2D_ARRAY}; 863 VK_IMAGE_VIEW_TYPE_1D_ARRAY, VK_IMAGE_VIEW_TYPE_2D,
864 VK_IMAGE_VIEW_TYPE_2D_ARRAY};
865 const auto create_image = [&](FallbackImage& image, std::uint32_t t, std::uint32_t c, VkImageUsageFlags usage) {
866 VkImageCreateInfo info{VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO};
867 info.imageType = types[t];
868 info.format = formats[c];
869 info.extent = {1, 1, 1};
870 info.mipLevels = 1;
871 info.arrayLayers = 1;
872 info.samples = t == ms_type ? features_.ms_samples[c] : VK_SAMPLE_COUNT_1_BIT;
873 info.usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT | usage;
874 share_across_queue_families(info, families_);
875 if (vk_.vkCreateImage(device_, &info, nullptr, &image.image) != VK_SUCCESS) return false;
876 VkMemoryRequirements requirements{};
877 vk_.vkGetImageMemoryRequirements(device_, image.image, &requirements);
878 VkMemoryAllocateInfo allocation{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO};
879 allocation.allocationSize = requirements.size;
880 allocation.memoryTypeIndex = memory_type(requirements.memoryTypeBits, 0);
881 return allocation.memoryTypeIndex != 0xffffffffu &&
882 vk_.vkAllocateMemory(device_, &allocation, nullptr, &image.memory) == VK_SUCCESS &&
883 vk_.vkBindImageMemory(device_, image.image, image.memory, 0) == VK_SUCCESS;
884 };
885 const auto create_view = [&](const FallbackImage& image, std::uint32_t d, std::uint32_t c, VkImageView& view) {
886 VkImageViewCreateInfo info{VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO};
887 info.image = image.image;
888 info.viewType = view_types[d];
889 info.format = formats[c];
890 info.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1};
891 if (vk_.vkCreateImageView(device_, &info, nullptr, &view) != VK_SUCCESS) return false;
892 fallback_views_.push_back(view);
893 return true;
894 };
702 for (std::uint32_t t = 0; t < std::size(types); ++t) { 895 for (std::uint32_t t = 0; t < std::size(types); ++t) {
703 for (std::uint32_t c = 0; c < classes; ++c) { 896 for (std::uint32_t c = 0; c < classes; ++c) {
704 if (t == ms_type && !supports_ms_class(c)) continue; 897 // Sampled: class 0 of the single-sample types (the translator reads a miss through the float view),
705 VkImageCreateInfo info{VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO}; 898 // every supported class of MS.
706 info.imageType = types[t]; 899 if (t == ms_type ? supports_ms_class(c) : c == 0) {
707 info.format = formats[c]; 900 if (!create_image(fallback_images_[t * classes + c], t, c, VK_IMAGE_USAGE_SAMPLED_BIT)) return false;
708 info.extent = {1, 1, 1}; 901 }
709 info.mipLevels = 1; 902 if (t != ms_type && !features_.null_descriptor &&
710 info.arrayLayers = 1; 903 !create_image(storage_fallback_images_[t * classes + c], t, c, VK_IMAGE_USAGE_STORAGE_BIT))
711 info.samples = t == ms_type ? features_.ms_samples[c] : VK_SAMPLE_COUNT_1_BIT;
712 info.usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT;
713 if (t != ms_type) info.usage |= VK_IMAGE_USAGE_STORAGE_BIT;
714 if (t == ms_type || c == 0) info.usage |= VK_IMAGE_USAGE_SAMPLED_BIT;
715 FallbackImage& image = fallback_images_[t * classes + c];
716 if (vk_.vkCreateImage(device_, &info, nullptr, &image.image) != VK_SUCCESS) return false;
717 VkMemoryRequirements requirements{};
718 vk_.vkGetImageMemoryRequirements(device_, image.image, &requirements);
719 VkMemoryAllocateInfo allocation{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO};
720 allocation.allocationSize = requirements.size;
721 allocation.memoryTypeIndex = memory_type(requirements.memoryTypeBits, 0);
722 if (allocation.memoryTypeIndex == 0xffffffffu ||
723 vk_.vkAllocateMemory(device_, &allocation, nullptr, &image.memory) != VK_SUCCESS ||
724 vk_.vkBindImageMemory(device_, image.image, image.memory, 0) != VK_SUCCESS)
725 return false; 904 return false;
726 } 905 }
727 } 906 }
728 for (std::uint32_t d = 0; d < dimensions; ++d) { 907 for (std::uint32_t d = 0; d < dimensions; ++d) {
729 const ImageDimension dimension{d}; 908 const ImageDimension dimension{d};
730 for (std::uint32_t c = 0; c < classes; ++c) { 909 for (std::uint32_t c = 0; c < classes; ++c) {
731 VkImageViewCreateInfo info{VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO}; 910 const FallbackImage& sampled = fallback_images_[type_of[d] * classes + c];
732 info.image = fallback_images_[type_of[d] * classes + c].image; 911 if (sampled.image) {
733 if (!info.image) continue; 912 VkImageView view = VK_NULL_HANDLE;
734 info.viewType = view_types[d]; 913 if (!create_view(sampled, d, c, view)) return false;
735 info.format = formats[c]; 914 const auto sampled_at = bindless::sampled_binding(dimension, c);
736 info.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}; 915 if (sampled_at != bindless::no_binding && (c == 0 || bindless::multisampled(dimension)))
737 VkImageView view = VK_NULL_HANDLE; 916 fallback_by_binding_[sampled_at] = view;
738 if (vk_.vkCreateImageView(device_, &info, nullptr, &view) != VK_SUCCESS) return false; 917 }
739 fallback_views_.push_back(view);
740 if (c == 0 || bindless::multisampled(dimension))
741 fallback_by_binding_[bindless::sampled_binding(dimension, c)] = view;
742 const auto storage_at = bindless::storage_binding(dimension, c); 918 const auto storage_at = bindless::storage_binding(dimension, c);
743 if (storage_at != bindless::no_binding) fallback_by_binding_[storage_at] = view; 919 if (storage_at == bindless::no_binding) continue; // MS: no storage arrays
920 // With null_descriptor the storage fallbacks stay VK_NULL_HANDLE: null descriptors.
921 VkImageView view = VK_NULL_HANDLE;
922 if (!features_.null_descriptor &&
923 !create_view(storage_fallback_images_[type_of[d] * classes + c], d, c, view))
924 return false;
925 fallback_by_binding_[storage_at] = view;
744 const auto r32ui_at = bindless::r32ui_binding(dimension); 926 const auto r32ui_at = bindless::r32ui_binding(dimension);
745 if (c == 1 && r32ui_at != bindless::no_binding) fallback_by_binding_[r32ui_at] = view; 927 if (c == 1 && r32ui_at != bindless::no_binding) fallback_by_binding_[r32ui_at] = view;
746 } 928 }
@@ -753,36 +935,54 @@ private:
753 return vk_.vkCreateSampler(device_, &sampler, nullptr, &fallback_sampler_) == VK_SUCCESS; 935 return vk_.vkCreateSampler(device_, &sampler, nullptr, &fallback_sampler_) == VK_SUCCESS;
754 } 936 }
755 937
756 bool create(TableBuffer& out, std::size_t bytes, bool device_local, bool* got_device_local = nullptr) const { 938 // device_local: the table (DEVICE_LOCAL, else HOST_VISIBLE when the device has no such type or that heap is out
939 // of memory); otherwise the mapped staging buffer (HOST_VISIBLE | HOST_COHERENT).
940 bool create(TableBuffer& out, std::size_t bytes, bool device_local) {
941 constexpr VkMemoryPropertyFlags host = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
942 const char* what = device_local ? "table buffer" : "staging buffer";
757 VkBufferCreateInfo info{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO}; 943 VkBufferCreateInfo info{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO};
758 info.size = bytes; 944 info.size = bytes;
759 info.usage = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | 945 info.usage = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT |
760 (device_local ? VK_BUFFER_USAGE_TRANSFER_DST_BIT : VK_BUFFER_USAGE_TRANSFER_SRC_BIT); 946 (device_local ? VK_BUFFER_USAGE_TRANSFER_DST_BIT : VK_BUFFER_USAGE_TRANSFER_SRC_BIT);
761 TableBuffer made; 947 TableBuffer made;
762 made.size = bytes; 948 made.size = bytes;
763 if (vk_.vkCreateBuffer(device_, &info, nullptr, &made.buffer) != VK_SUCCESS) return false; 949 share_across_queue_families(info, families_);
950 if (const VkResult result = vk_.vkCreateBuffer(device_, &info, nullptr, &made.buffer); result != VK_SUCCESS) {
951 made.buffer = VK_NULL_HANDLE;
952 note_failure(what, result);
953 return false;
954 }
764 VkMemoryRequirements requirements{}; 955 VkMemoryRequirements requirements{};
765 vk_.vkGetBufferMemoryRequirements(device_, made.buffer, &requirements); 956 vk_.vkGetBufferMemoryRequirements(device_, made.buffer, &requirements);
766 VkMemoryAllocateInfo allocation{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO}; 957 VkMemoryAllocateInfo allocation{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO};
767 allocation.allocationSize = requirements.size; 958 allocation.allocationSize = requirements.size;
768 allocation.memoryTypeIndex = 959 const auto allocate = [&](std::uint32_t type) {
769 device_local ? memory_type(requirements.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) 960 if (type == 0xffffffffu) return VK_ERROR_OUT_OF_DEVICE_MEMORY;
770 : memory_type(requirements.memoryTypeBits, 961 allocation.memoryTypeIndex = type;
771 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT); 962 const VkResult result = vk_.vkAllocateMemory(device_, &allocation, nullptr, &made.memory);
772 if (device_local && allocation.memoryTypeIndex == 0xffffffffu) 963 if (result != VK_SUCCESS) made.memory = VK_NULL_HANDLE;
773 allocation.memoryTypeIndex = memory_type(requirements.memoryTypeBits, 964 return result;
774 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | 965 };
775 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT); 966 const std::uint32_t local = device_local
776 if (got_device_local) 967 ? memory_type(requirements.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)
777 *got_device_local = allocation.memoryTypeIndex != 0xffffffffu && 968 : 0xffffffffu;
778 (memory_.memoryTypes[allocation.memoryTypeIndex].propertyFlags & 969 VkResult result = device_local ? allocate(local) : allocate(memory_type(requirements.memoryTypeBits, host));
970 if (result != VK_SUCCESS && device_local) {
971 const std::uint32_t fallback = memory_type(requirements.memoryTypeBits, host);
972 if (fallback != local) {
973 result = allocate(fallback);
974 if (result == VK_SUCCESS && local != 0xffffffffu) ++table_host_fallbacks_;
975 }
976 }
977 if (result == VK_SUCCESS) {
978 made.device_local = (memory_.memoryTypes[allocation.memoryTypeIndex].propertyFlags &
779 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) != 0; 979 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) != 0;
780 bool ready = allocation.memoryTypeIndex != 0xffffffffu && 980 result = vk_.vkBindBufferMemory(device_, made.buffer, made.memory, 0);
781 vk_.vkAllocateMemory(device_, &allocation, nullptr, &made.memory) == VK_SUCCESS && 981 }
782 vk_.vkBindBufferMemory(device_, made.buffer, made.memory, 0) == VK_SUCCESS; 982 if (result == VK_SUCCESS && !device_local)
783 if (ready && !device_local) 983 result = vk_.vkMapMemory(device_, made.memory, 0, VK_WHOLE_SIZE, 0, &made.mapped);
784 ready = vk_.vkMapMemory(device_, made.memory, 0, VK_WHOLE_SIZE, 0, &made.mapped) == VK_SUCCESS; 984 if (result != VK_SUCCESS) {
785 if (!ready) { 985 note_failure(what, result);
786 destroy(made); 986 destroy(made);
787 return false; 987 return false;
788 } 988 }
@@ -801,17 +1001,55 @@ private:
801 destroy(buffers.table); 1001 destroy(buffers.table);
802 } 1002 }
803 1003
1004 void destroy(Generation& generation) const {
1005 destroy(generation.buffers);
1006 if (generation.pool) vk_.vkDestroyDescriptorPool(device_, generation.pool, nullptr); // frees the set
1007 generation.pool = VK_NULL_HANDLE;
1008 generation.set = VK_NULL_HANDLE;
1009 }
1010
1011 // A generation for a table of `bytes`: a spare when one is large enough (its pool reset for a fresh set), else
1012 // new buffers and a new pool. Spares too small for the table are freed: the table never shrinks.
1013 bool make_generation(std::size_t bytes, TableBuffers& buffers, VkDescriptorPool& pool, VkDescriptorSet& set) {
1014 std::size_t kept = 0;
1015 bool found = false;
1016 for (Generation& spare : spares_) {
1017 if (spare.buffers.table.size < bytes || spare.buffers.staging.size < bytes) {
1018 destroy(spare);
1019 continue;
1020 }
1021 if (!found && vk_.vkResetDescriptorPool(device_, spare.pool, 0) == VK_SUCCESS &&
1022 allocate_set(spare.pool, set)) {
1023 buffers = spare.buffers;
1024 pool = spare.pool;
1025 found = true;
1026 ++spares_reused_;
1027 continue;
1028 }
1029 spares_[kept++] = spare;
1030 }
1031 spares_.resize(kept);
1032 if (found) return true;
1033 TableBuffers made;
1034 if (!create(made.table, bytes, true) || !create(made.staging, bytes, false) || !make_set(pool, set)) {
1035 destroy(made);
1036 return false;
1037 }
1038 buffers = made;
1039 return true;
1040 }
1041
804 bool create_table_buffers() { 1042 bool create_table_buffers() {
805 const std::size_t bytes = table_.size_bytes(); 1043 const std::size_t bytes = table_.size_bytes();
806 TableBuffers made; 1044 TableBuffers made;
807 bool device_local = false; 1045 if (!create(made.table, bytes, true) || !create(made.staging, bytes, false)) {
808 if (!create(made.table, bytes, true, &device_local) || !create(made.staging, bytes, false)) {
809 destroy(made); 1046 destroy(made);
810 return false; 1047 return false;
811 } 1048 }
812 table_buffers_ = made; 1049 table_buffers_ = made;
813 table_device_local_ = device_local; 1050 table_device_local_ = made.table.device_local;
814 table_uploaded_ = false; // the first flush() uploads it, in the command buffer that will use it 1051 table_uploaded_ = false; // the first flush() uploads it, in the command buffer that will use it
1052 table_on_gpu_ = false;
815 table_dirty_ = existing_entries_changed_ = false; 1053 table_dirty_ = existing_entries_changed_ = false;
816 return true; 1054 return true;
817 } 1055 }
@@ -829,15 +1067,11 @@ private:
829 TableBuffers larger; 1067 TableBuffers larger;
830 VkDescriptorPool pool = VK_NULL_HANDLE; 1068 VkDescriptorPool pool = VK_NULL_HANDLE;
831 VkDescriptorSet set = VK_NULL_HANDLE; 1069 VkDescriptorSet set = VK_NULL_HANDLE;
832 bool device_local = false; 1070 if (!make_generation(bytes, larger, pool, set)) return false;
833 if (!create(larger.table, bytes, true, &device_local) || !create(larger.staging, bytes, false) || 1071 table_device_local_ = larger.table.device_local;
834 !make_set(pool, set)) {
835 destroy(larger);
836 return false;
837 }
838 table_device_local_ = device_local;
839 retired_.push_back({table_buffers_, pool_, set_, retire_ticket}); 1072 retired_.push_back({table_buffers_, pool_, set_, retire_ticket});
840 table_buffers_ = larger; 1073 table_buffers_ = larger;
1074 table_on_gpu_ = false; // until this generation's upload is submitted (table_upload_result)
841 pool_ = pool; 1075 pool_ = pool;
842 set_ = set; 1076 set_ = set;
843 write_table_binding(table_buffers_.table.buffer); 1077 write_table_binding(table_buffers_.table.buffer);
@@ -893,6 +1127,25 @@ private:
893 return true; 1127 return true;
894 } 1128 }
895 1129
1130 // The whole table into the current generation's buffers, for a flush whose new generation could not be made,
1131 // once every submission that could read the current table is done (flush()). False when the table outgrew them.
1132 bool rewrite_table_in_place(VkCommandBuffer command_buffer) {
1133 const std::size_t bytes = table_.size_bytes();
1134 if (bytes > table_buffers_.table.size || bytes > table_buffers_.staging.size || !table_buffers_.staging.mapped)
1135 return false;
1136 table_.take_changes(); // all of it goes
1137 // Nothing still runs that copies from the staging buffer or reads the table.
1138 table_.write_to_buffer(table_buffers_.staging.mapped);
1139 copy_table_range(command_buffer, 0, bytes);
1140 record_table_barrier(command_buffer);
1141 upload_in_flight_ = true;
1142 table_dirty_ = existing_entries_changed_ = false;
1143 table_uploaded_ = true;
1144 force_full_upload_ = false;
1145 ++in_place_rewrites_;
1146 return true;
1147 }
1148
896 // Copies the data into the command buffer while recording (64 KiB per call, the Vulkan limit), so no staging 1149 // Copies the data into the command buffer while recording (64 KiB per call, the Vulkan limit), so no staging
897 // buffer is read at execution: a later flush can rewrite its own staging without racing a pending copy. 1150 // buffer is read at execution: a later flush can rewrite its own staging without racing a pending copy.
898 void update_table_range(VkCommandBuffer command_buffer, VkDeviceSize offset, const void* data, 1151 void update_table_range(VkCommandBuffer command_buffer, VkDeviceSize offset, const void* data,
@@ -998,8 +1251,9 @@ private:
998 return; 1251 return;
999 } 1252 }
1000 const std::uint32_t sampled_at = bindless::sampled_binding(dimension); 1253 const std::uint32_t sampled_at = bindless::sampled_binding(dimension);
1001 queue(sampled_at, index, 1254 if (sampled_at != bindless::no_binding)
1002 sampled ? VkDescriptorImageInfo{VK_NULL_HANDLE, sampled, sampled_layout} : fallback_info(sampled_at)); 1255 queue(sampled_at, index,
1256 sampled ? VkDescriptorImageInfo{VK_NULL_HANDLE, sampled, sampled_layout} : fallback_info(sampled_at));
1003 const auto store = [&](std::uint32_t binding, VkImageView view) { 1257 const auto store = [&](std::uint32_t binding, VkImageView view) {
1004 if (binding == bindless::no_binding || index >= features_.counts[binding]) return; 1258 if (binding == bindless::no_binding || index >= features_.counts[binding]) return;
1005 queue(binding, index, 1259 queue(binding, index,
@@ -1014,37 +1268,45 @@ private:
1014 VkDevice device_; 1268 VkDevice device_;
1015 VkPhysicalDeviceMemoryProperties memory_; 1269 VkPhysicalDeviceMemoryProperties memory_;
1016 BindlessFeatures features_; 1270 BindlessFeatures features_;
1271 std::vector<std::uint32_t> families_;
1017 Functions vk_; 1272 Functions vk_;
1018 bool ok_ = false; 1273 bool ok_ = false;
1019 VkDescriptorSetLayout layout_ = VK_NULL_HANDLE; 1274 VkDescriptorSetLayout layout_ = VK_NULL_HANDLE;
1020 VkDescriptorPool pool_ = VK_NULL_HANDLE; 1275 VkDescriptorPool pool_ = VK_NULL_HANDLE;
1021 VkDescriptorSet set_ = VK_NULL_HANDLE; 1276 VkDescriptorSet set_ = VK_NULL_HANDLE;
1022 std::array<FallbackImage, 4 * classes> fallback_images_{}; // [2D, 3D, 1D, 2D MS][class] 1277 std::array<FallbackImage, 4 * classes> fallback_images_{}; // sampled: [2D, 3D, 1D, 2D MS][class]
1278 // Storage, without null_descriptor: [2D, 3D, 1D][class]. Never the image of a sampled fallback.
1279 std::array<FallbackImage, 3 * classes> storage_fallback_images_{};
1023 std::vector<VkImageView> fallback_views_; 1280 std::vector<VkImageView> fallback_views_;
1024 std::array<VkImageView, bindless::bindings.size()> fallback_by_binding_{}; 1281 std::array<VkImageView, bindless::bindings.size()> fallback_by_binding_{};
1025 VkSampler fallback_sampler_ = VK_NULL_HANDLE; 1282 VkSampler fallback_sampler_ = VK_NULL_HANDLE;
1026 bool fallbacks_ready_ = false; 1283 bool fallbacks_ready_ = false;
1027 std::array<std::vector<std::uint8_t>, dimensions> image_used_; 1284 std::array<std::vector<std::uint8_t>, dimensions> image_used_;
1028 std::vector<std::uint8_t> sampler_used_; 1285 std::vector<std::uint8_t> sampler_used_;
1286 std::vector<std::pair<ImageDimension, std::uint32_t>> held_images_; // removed, not yet free (remove_image)
1287 std::vector<std::uint32_t> held_samplers_;
1029 std::vector<Pending> pending_; 1288 std::vector<Pending> pending_;
1030 std::unordered_map<std::uint64_t, std::size_t> pending_slots_; // binding and index -> place in pending_ 1289 std::unordered_map<std::uint64_t, std::size_t> pending_slots_; // binding and index -> place in pending_
1031 DescriptorTable table_{64}; 1290 DescriptorTable table_; // 64 slots, and the device's hash kind, from the constructor
1032 TableBuffers table_buffers_; 1291 TableBuffers table_buffers_;
1033 bool table_uploaded_ = false; // the table's current contents are in table_buffers_.table 1292 bool table_uploaded_ = false; // the table's current contents are in table_buffers_.table
1293 bool table_on_gpu_ = false; // an upload into the current table buffers reached the queue (degrading is safe)
1034 bool table_device_local_ = false; 1294 bool table_device_local_ = false;
1035 bool table_dirty_ = false; // the table differs from the buffer 1295 bool table_dirty_ = false; // the table differs from the buffer
1036 bool existing_entries_changed_ = false; // ... and not only by entries added 1296 bool existing_entries_changed_ = false; // ... and not only by entries added
1037 bool upload_in_flight_ = false; // a copy is recorded, not yet known to have reached the queue 1297 bool upload_in_flight_ = false; // a copy is recorded, not yet known to have reached the queue
1038 bool force_full_upload_ = false; // the last submit failed: rebuild the whole table on the next flush 1298 bool force_full_upload_ = false; // the last submit failed: rebuild the whole table on the next flush
1039 struct Generation { // what a replaced table leaves for release_retired()
1040 TableBuffers buffers;
1041 VkDescriptorPool pool = VK_NULL_HANDLE; // owns the descriptor set
1042 VkDescriptorSet set = VK_NULL_HANDLE;
1043 std::uint64_t ticket = 0;
1044 };
1045 std::vector<Generation> retired_; 1299 std::vector<Generation> retired_;
1300 std::vector<Generation> spares_; // released generations kept for reuse (release_retired)
1046 std::uint64_t generations_made_ = 0; 1301 std::uint64_t generations_made_ = 0;
1047 bool last_flush_replaced_ = false; 1302 bool last_flush_replaced_ = false;
1303 bool last_flush_degraded_ = false;
1304 std::uint64_t spares_reused_ = 0;
1305 std::uint64_t degraded_flushes_ = 0;
1306 std::uint64_t in_place_rewrites_ = 0;
1307 std::uint64_t table_host_fallbacks_ = 0;
1308 mutable const char* last_failure_ = nullptr;
1309 mutable VkResult last_failure_result_ = VK_SUCCESS;
1048 std::array<VkDescriptorPoolSize, bindless::bindings.size()> pool_sizes_{}; 1310 std::array<VkDescriptorPoolSize, bindless::bindings.size()> pool_sizes_{};
1049 std::uint32_t pool_size_count_ = 0; 1311 std::uint32_t pool_size_count_ = 0;
1050 // Every descriptor written to the set (the table's binding aside), to fill the next generation's set. 1312 // Every descriptor written to the set (the table's binding aside), to fill the next generation's set.
diff --git a/runtime/src/vulkan_depth24.h b/runtime/src/vulkan_depth24.h
index 988b79d9f..3c8a13cf7 100644
--- a/runtime/src/vulkan_depth24.h
+++ b/runtime/src/vulkan_depth24.h
@@ -12,6 +12,8 @@
12#endif 12#endif
13#include <vulkan/vulkan.h> 13#include <vulkan/vulkan.h>
14 14
15#include "vulkan_device_fault.h"
16
15#include <algorithm> 17#include <algorithm>
16#include <cstdint> 18#include <cstdint>
17#include <functional> 19#include <functional>
@@ -20,6 +22,7 @@
20 22
21#include "depth24.h" 23#include "depth24.h"
22#include "depth24_convert_spv.h" 24#include "depth24_convert_spv.h"
25#include "vulkan_aftermath.h"
23 26
24namespace leonida { 27namespace leonida {
25 28
@@ -29,14 +32,15 @@ public:
29 using Allocate = std::function<VkDeviceMemory(const VkMemoryRequirements&)>; 32 using Allocate = std::function<VkDeviceMemory(const VkMemoryRequirements&)>;
30 33
31 // `max_range`: the device's maxStorageBufferRange; a copy is split into dispatches that stay inside it. 34 // `max_range`: the device's maxStorageBufferRange; a copy is split into dispatches that stay inside it.
32 Depth24Converter(PFN_vkGetDeviceProcAddr get, VkDevice device, Allocate allocate, std::uint64_t max_range = 1u << 27) 35 Depth24Converter(PFN_vkGetDeviceProcAddr get, VkDevice device, Allocate allocate,
33 : device_(device), allocate_(std::move(allocate)), max_range_(max_range) { 36 std::uint64_t max_range = 1u << 27, DeviceFaultDiagnostics* diagnostics = nullptr)
37 : device_(device), diagnostics_(diagnostics), allocate_(std::move(allocate)), max_range_(max_range) {
34 loaded_ = vk_.load(get, device); 38 loaded_ = vk_.load(get, device);
35 } 39 }
36 40
37 ~Depth24Converter() { 41 ~Depth24Converter() {
38 if (!loaded_) return; 42 if (!loaded_) return;
39 vk_.vkDeviceWaitIdle(device_); 43 DeviceFaultDiagnostics::observe(diagnostics_, vk_.vkDeviceWaitIdle(device_), "vkDeviceWaitIdle");
40 release(current_); 44 release(current_);
41 for (auto& batch : retired_) release(batch); 45 for (auto& batch : retired_) release(batch);
42 for (auto& chunk : spare_) destroy(chunk); 46 for (auto& chunk : spare_) destroy(chunk);
@@ -146,7 +150,9 @@ public:
146 if (retired_[i].ticket != 0) { 150 if (retired_[i].ticket != 0) {
147 std::uint64_t done = 0; 151 std::uint64_t done = 0;
148 if (!retired_[i].timeline || 152 if (!retired_[i].timeline ||
149 vk_.vkGetSemaphoreCounterValue(device_, retired_[i].timeline, &done) != VK_SUCCESS || 153 DeviceFaultDiagnostics::observe(diagnostics_,
154 vk_.vkGetSemaphoreCounterValue(device_, retired_[i].timeline, &done),
155 "vkGetSemaphoreCounterValue (scratch)") != VK_SUCCESS ||
150 done < retired_[i].ticket) { 156 done < retired_[i].ticket) {
151 ++i; 157 ++i;
152 continue; 158 continue;
@@ -225,7 +231,8 @@ private:
225 bool ok = vk_.vkCreateDescriptorSetLayout(device_, &set_info, nullptr, &set_layout_) == VK_SUCCESS; 231 bool ok = vk_.vkCreateDescriptorSetLayout(device_, &set_info, nullptr, &set_layout_) == VK_SUCCESS;
226 layout_info.pSetLayouts = &set_layout_; 232 layout_info.pSetLayouts = &set_layout_;
227 ok = ok && vk_.vkCreatePipelineLayout(device_, &layout_info, nullptr, &pipeline_layout_) == VK_SUCCESS && 233 ok = ok && vk_.vkCreatePipelineLayout(device_, &layout_info, nullptr, &pipeline_layout_) == VK_SUCCESS &&
228 vk_.vkCreateShaderModule(device_, &module_info, nullptr, &module) == VK_SUCCESS; 234 (aftermath::ShaderName("(runtime) depth24_convert.comp"),
235 vk_.vkCreateShaderModule(device_, &module_info, nullptr, &module) == VK_SUCCESS);
229 if (ok) { 236 if (ok) {
230 VkComputePipelineCreateInfo info{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO}; 237 VkComputePipelineCreateInfo info{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO};
231 info.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, nullptr, 0, VK_SHADER_STAGE_COMPUTE_BIT, 238 info.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, nullptr, 0, VK_SHADER_STAGE_COMPUTE_BIT,
@@ -354,6 +361,7 @@ private:
354 } 361 }
355 362
356 VkDevice device_; 363 VkDevice device_;
364 DeviceFaultDiagnostics* diagnostics_;
357 Allocate allocate_; 365 Allocate allocate_;
358 std::uint64_t max_range_; 366 std::uint64_t max_range_;
359 Functions vk_; 367 Functions vk_;
diff --git a/runtime/src/vulkan_device_fault.h b/runtime/src/vulkan_device_fault.h
new file mode 100644
index 000000000..d60367491
--- /dev/null
+++ b/runtime/src/vulkan_device_fault.h
@@ -0,0 +1,484 @@
1#pragma once
2
3#include <vulkan/vulkan.h>
4
5#include <algorithm>
6#include <array>
7#include <atomic>
8#include <chrono>
9#include <cinttypes>
10#include <cstddef>
11#include <cstdint>
12#include <cstdio>
13#include <cstdlib>
14#include <functional>
15#include <cstring>
16#include <mutex>
17#include <span>
18#include <unordered_map>
19#include <utility>
20#include <vector>
21
22namespace leonida {
23
24struct DeviceFaultExtensions {
25 bool fault = false;
26 bool checkpoints = false;
27 bool diagnostics_config = false;
28};
29
30// What a device asks for. LEONIDA_DEVICE_FAULT=1 wants all of it; LEONIDA_AFTERMATH=1 alone (vulkan_aftermath.h) only
31// needs the NVIDIA diagnostics config, whose flags turn on the Aftermath features of the GPU crash dump.
32struct DeviceFaultRequest {
33 bool fault = true; // VK_EXT_device_fault and VK_NV_device_diagnostic_checkpoints
34 bool diagnostics_config = true; // VK_NV_device_diagnostics_config
35 VkDeviceDiagnosticsConfigFlagsNV extra_flags = 0; // added to the default config flags below
36};
37
38// Owns the feature structures until vkCreateDevice returns.
39struct DeviceFaultFeatures {
40 VkPhysicalDeviceFaultFeaturesEXT fault{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FAULT_FEATURES_EXT};
41 VkPhysicalDeviceDiagnosticsConfigFeaturesNV diagnostics{
42 VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DIAGNOSTICS_CONFIG_FEATURES_NV};
43 VkDeviceDiagnosticsConfigCreateInfoNV config{VK_STRUCTURE_TYPE_DEVICE_DIAGNOSTICS_CONFIG_CREATE_INFO_NV};
44
45 DeviceFaultExtensions enable(VkPhysicalDevice physical, PFN_vkGetPhysicalDeviceFeatures2 query,
46 std::span<const VkExtensionProperties> advertised,
47 std::vector<const char*>& extensions, VkDeviceCreateInfo& device,
48 DeviceFaultRequest request = {}) {
49 const auto has = [&](const char* name) {
50 return std::any_of(advertised.begin(), advertised.end(), [name](const auto& ext) {
51 return std::strcmp(ext.extensionName, name) == 0;
52 });
53 };
54 const bool has_fault = request.fault && has(VK_EXT_DEVICE_FAULT_EXTENSION_NAME);
55 const bool has_config = request.diagnostics_config && has(VK_NV_DEVICE_DIAGNOSTICS_CONFIG_EXTENSION_NAME);
56 if (has_fault || has_config) {
57 diagnostics.pNext = nullptr;
58 fault.pNext = has_config ? &diagnostics : nullptr;
59 VkPhysicalDeviceFeatures2 features{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FEATURES_2};
60 features.pNext = has_fault ? static_cast<void*>(&fault) : static_cast<void*>(&diagnostics);
61 query(physical, &features);
62 }
63 const DeviceFaultExtensions enabled{has_fault && fault.deviceFault == VK_TRUE,
64 request.fault && has(VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME),
65 has_config && diagnostics.diagnosticsConfig == VK_TRUE};
66 if (enabled.fault) {
67 extensions.push_back(VK_EXT_DEVICE_FAULT_EXTENSION_NAME);
68 fault.pNext = const_cast<void*>(device.pNext);
69 device.pNext = &fault;
70 }
71 if (enabled.checkpoints) extensions.push_back(VK_NV_DEVICE_DIAGNOSTIC_CHECKPOINTS_EXTENSION_NAME);
72 if (enabled.diagnostics_config) {
73 extensions.push_back(VK_NV_DEVICE_DIAGNOSTICS_CONFIG_EXTENSION_NAME);
74 diagnostics.pNext = const_cast<void*>(device.pNext);
75 config.pNext = &diagnostics;
76 config.flags = VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_DEBUG_INFO_BIT_NV |
77 VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_RESOURCE_TRACKING_BIT_NV |
78 VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_AUTOMATIC_CHECKPOINTS_BIT_NV | request.extra_flags;
79 device.pNext = &config;
80 }
81 return enabled;
82 }
83};
84
85enum class CheckpointKind : std::uint8_t { draw = 1, dispatch, copy, resolve, clear };
86
87struct CheckpointMarker {
88 static constexpr std::uint32_t max_list = 0xff;
89 static constexpr std::uint32_t max_command = 0x1ffff;
90 static constexpr std::uint64_t tag = 0xa;
91
92 std::uint32_t submission = 0;
93 std::uint32_t list = 0;
94 std::uint32_t command = 0;
95 CheckpointKind kind{};
96
97 // Vulkan treats the value as an opaque pointer. The runtime never dereferences it.
98 static constexpr std::uintptr_t encode(std::uint32_t submission, std::size_t list, std::size_t command,
99 CheckpointKind kind) {
100 if (sizeof(void*) < 8 || !submission || list > max_list || command > max_command) return 0;
101 return static_cast<std::uintptr_t>((tag << 60) | (std::uint64_t{submission} << 28) |
102 (std::uint64_t{list} << 20) | (std::uint64_t{command} << 3) |
103 static_cast<std::uint8_t>(kind));
104 }
105
106 static constexpr CheckpointMarker decode(std::uintptr_t marker) {
107 const std::uint64_t bits = marker;
108 const auto kind = static_cast<CheckpointKind>(bits & 7);
109 if ((bits >> 60) != tag || kind < CheckpointKind::draw || kind > CheckpointKind::clear) return {};
110 return {static_cast<std::uint32_t>(bits >> 28), static_cast<std::uint32_t>((bits >> 20) & max_list),
111 static_cast<std::uint32_t>((bits >> 3) & max_command), kind};
112 }
113
114 const char* kind_name() const {
115 switch (kind) {
116 case CheckpointKind::draw: return "draw";
117 case CheckpointKind::dispatch: return "dispatch";
118 case CheckpointKind::copy: return "copy";
119 case CheckpointKind::resolve: return "resolve";
120 case CheckpointKind::clear: return "clear";
121 default: return "unknown";
122 }
123 }
124};
125
126using CheckpointShaders = std::array<const char*, 3>; // Immutable ShaderLibrary names, valid until context teardown.
127
128struct CheckpointPipeline {
129 VkPipeline handle = VK_NULL_HANDLE;
130 std::uintptr_t id = 0;
131 CheckpointShaders shaders{};
132};
133
134struct CheckpointList {
135 struct ShaderChange {
136 std::uint32_t command;
137 CheckpointPipeline pipeline;
138 };
139 std::vector<ShaderChange> shaders;
140};
141
142// CPU record of work handed to vkQueueSubmit. A driver checkpoint can identify which
143// entry it reached; on drivers without checkpoints these remain submitted candidates.
144struct CheckpointDispatch {
145 std::uint64_t execute_call;
146 VkQueue queue;
147 const char* queue_kind;
148 std::size_t list, command;
149 const char* shader;
150 std::array<std::uint32_t, 3> groups;
151 std::uintptr_t argument_buffer, count_buffer;
152 std::uint64_t argument_offset, count_offset;
153 std::uint32_t max_count, stride;
154 std::array<std::uint32_t, 32> roots;
155 bool indirect;
156};
157
158struct CheckpointSubmission {
159 std::uint32_t sequence = 0;
160 std::uint64_t execute_call = 0;
161 VkQueue queue = VK_NULL_HANDLE;
162 const char* queue_kind = nullptr;
163 std::size_t list_count = 0;
164 std::vector<CheckpointList> lists;
165 std::vector<CheckpointDispatch> dispatches;
166 std::size_t dispatch_count = 0;
167 static constexpr std::size_t dispatch_limit = 64;
168
169 void append_dispatch(CheckpointDispatch d) {
170 if (dispatches.size() < dispatch_limit) dispatches.push_back(d);
171 else dispatches[dispatch_count % dispatch_limit] = d;
172 ++dispatch_count;
173 }
174};
175
176struct CheckpointRecorder {
177 PFN_vkCmdSetCheckpointNV set;
178 CheckpointSubmission& submission;
179 const std::unordered_map<std::uintptr_t, CheckpointShaders>& pipeline_names;
180 std::size_t list;
181
182 void record(VkCommandBuffer buffer, std::size_t command, CheckpointKind kind,
183 VkPipeline pipeline = VK_NULL_HANDLE, std::uintptr_t id = 0) const {
184 if (!set) return;
185 const auto marker = CheckpointMarker::encode(submission.sequence, list, command, kind);
186 if (!marker) return;
187 if (kind == CheckpointKind::draw || kind == CheckpointKind::dispatch) {
188 auto& shaders = submission.lists[list].shaders;
189 if (shaders.empty() || shaders.back().pipeline.handle != pipeline || shaders.back().pipeline.id != id) {
190 const auto names = pipeline_names.find(id);
191 shaders.push_back({static_cast<std::uint32_t>(command),
192 {pipeline, id, names != pipeline_names.end() ? names->second : CheckpointShaders{}}});
193 }
194 }
195 set(buffer, reinterpret_cast<const void*>(marker));
196 }
197
198 void dispatch(VkCommandBuffer buffer, std::size_t command, VkPipeline pipeline, std::uintptr_t id,
199 const std::array<std::uint32_t, 32>& roots, std::array<std::uint32_t, 3> groups,
200 bool indirect = false, std::uintptr_t args = 0, std::uint64_t offset = 0,
201 std::uintptr_t count = 0, std::uint64_t count_offset = 0,
202 std::uint32_t max_count = 0, std::uint32_t stride = 0) const {
203 const auto names = pipeline_names.find(id);
204 submission.append_dispatch({submission.execute_call, submission.queue, submission.queue_kind, list, command,
205 names != pipeline_names.end() ? names->second[0] : nullptr, groups, args, count,
206 offset, count_offset, max_count, stride, roots, indirect});
207 record(buffer, command, CheckpointKind::dispatch, pipeline, id);
208 }
209};
210
211// A D3D fence may stay unsignalled by design. Only queue retirement tickets represent
212// work that actually reached vkQueueSubmit.
213class SubmissionProgressWatch {
214public:
215 using Clock = std::chrono::steady_clock;
216 enum class State { idle, pending, submit_lock_busy };
217
218 bool sample(State state, std::uint64_t retired, Clock::time_point now) {
219 if (state == State::idle || state != state_ || retired != retired_) {
220 state_ = state;
221 retired_ = retired;
222 since_ = now;
223 reported_ = false;
224 return false;
225 }
226 if (reported_ || now - since_ < std::chrono::seconds(15)) return false;
227 reported_ = true;
228 return true;
229 }
230
231private:
232 State state_ = State::idle;
233 std::uint64_t retired_ = 0;
234 Clock::time_point since_{};
235 bool reported_ = false;
236};
237
238// Runs on every VK_ERROR_DEVICE_LOST that DeviceFaultDiagnostics::observe or VulkanContext::mark_device_lost sees,
239// with or without LEONIDA_DEVICE_FAULT. Set before the device exists by the Aftermath integration
240// (vulkan_aftermath.h), which blocks there until its GPU crash dump is written.
241inline std::atomic<void (*)() noexcept> device_lost_hook{nullptr};
242
243inline void run_device_lost_hook() noexcept {
244 if (const auto hook = device_lost_hook.load(std::memory_order_acquire)) hook();
245}
246
247class DeviceFaultDiagnostics {
248public:
249 DeviceFaultDiagnostics(PFN_vkGetDeviceProcAddr get, VkDevice device, DeviceFaultExtensions enabled)
250 : device_(device) {
251#define LEONIDA_FAULT_LOAD(name) name = reinterpret_cast<PFN_##name>(get(device, #name))
252 if (enabled.fault) LEONIDA_FAULT_LOAD(vkGetDeviceFaultInfoEXT);
253 if (enabled.checkpoints) {
254 LEONIDA_FAULT_LOAD(vkCmdSetCheckpointNV);
255 LEONIDA_FAULT_LOAD(vkGetQueueCheckpointDataNV);
256 }
257#undef LEONIDA_FAULT_LOAD
258 std::fprintf(stderr, "[rt] device-fault: enabled (fault info %s, checkpoints %s, NVIDIA diagnostics config %s)\n",
259 vkGetDeviceFaultInfoEXT ? "on" : "unavailable", checkpoint_command() ? "on" : "unavailable",
260 enabled.diagnostics_config ? "on" : "unavailable");
261 }
262
263 PFN_vkCmdSetCheckpointNV checkpoint_command() const {
264 return sizeof(void*) >= 8 && vkGetQueueCheckpointDataNV ? vkCmdSetCheckpointNV : nullptr;
265 }
266
267 void add_queue(VkQueue queue) {
268 if (!queue || !vkGetQueueCheckpointDataNV) return;
269 std::lock_guard lock(mutex_);
270 if (std::find(queues_.begin(), queues_.end(), queue) == queues_.end()) queues_.push_back(queue);
271 }
272
273 std::uint64_t next_execute_call() { return ++execute_calls_; }
274
275 // Accessed under the context's resource lock. Reports read the names copied into the ring instead.
276 std::unordered_map<std::uintptr_t, CheckpointShaders> pipeline_names;
277
278 // Called under the context's tracker lock, in replay order.
279 CheckpointSubmission begin_submission(std::uint64_t call, VkQueue queue, const char* kind, std::size_t lists) {
280 if (!++sequence_) ++sequence_; // 0 is reserved for invalid markers
281 return {sequence_, call, queue, kind, lists,
282 std::vector<CheckpointList>(std::min(lists, std::size_t{CheckpointMarker::max_list} + 1))};
283 }
284
285 void publish(CheckpointSubmission&& submission) {
286 std::lock_guard lock(mutex_);
287 for (std::size_t i = submission.dispatch_count - submission.dispatches.size(); i < submission.dispatch_count; ++i)
288 dispatches_[dispatch_count_++ % dispatches_.size()] = submission.dispatches[i % submission.dispatch_limit];
289 submission.dispatches.clear();
290 recent_[submission.sequence % recent_.size()] = std::move(submission);
291 }
292
293 static VkResult observe(DeviceFaultDiagnostics* diagnostics, VkResult result, const char* operation) noexcept {
294 if (result == VK_ERROR_DEVICE_LOST) {
295 if (diagnostics) diagnostics->report(operation);
296 run_device_lost_hook();
297 }
298 return result;
299 }
300
301 void report_stall(const char* reason, std::uint64_t submitted, std::uint64_t retired) {
302 std::fprintf(stderr, "[rt] device-stall: %s for 15 s; submitted ticket %" PRIu64
303 ", last observed retired ticket %" PRIu64 "\n", reason, submitted, retired);
304 // NV checkpoints and EXT fault data require a lost device. The CPU ring is valid at any time.
305 dump_dispatches();
306 // LEONIDA_STALL_CHECKPOINTS=1 (diagnostic): ask for the checkpoints anyway. A hang (Xid 109) the driver
307 // recovers from without losing the device otherwise names no program; outside the lost state the call is
308 // out of the extension's contract, which the NVIDIA driver has answered so far.
309 static const bool stall_checkpoints = [] {
310 const char* v = std::getenv("LEONIDA_STALL_CHECKPOINTS");
311 return v && std::strcmp(v, "1") == 0;
312 }();
313 if (!stall_checkpoints || !vkGetQueueCheckpointDataNV) return;
314 try {
315 std::lock_guard lock(mutex_);
316 for (VkQueue queue : queues_) report_queue(queue);
317 } catch (...) {
318 std::fprintf(stderr, "[rt] device-fault: checkpoint collection failed\n");
319 }
320 }
321
322private:
323 void dump_dispatches() {
324 std::lock_guard lock(mutex_);
325 const auto n = std::min(dispatch_count_, dispatches_.size());
326 for (std::size_t i = dispatch_count_ - n; i < dispatch_count_; ++i) {
327 const auto& d = dispatches_[i % dispatches_.size()];
328 std::fprintf(stderr, "[rt] device-fault: submitted dispatch seq=%zu execute=%" PRIu64
329 " queue=%p (%s) list=%zu command=%zu shader=%s ", i + 1, d.execute_call,
330 static_cast<void*>(d.queue), d.queue_kind, d.list, d.command, d.shader ? d.shader : "-");
331 if (d.indirect)
332 std::fprintf(stderr, "indirect args=0x%" PRIxPTR "+0x%" PRIx64 " count=0x%" PRIxPTR
333 "+0x%" PRIx64 " max=%u stride=%u", d.argument_buffer, d.argument_offset,
334 d.count_buffer, d.count_offset, d.max_count, d.stride);
335 else std::fprintf(stderr, "groups=%u,%u,%u", d.groups[0], d.groups[1], d.groups[2]);
336 if (include_roots_) {
337 std::fputs(" roots=", stderr);
338 for (auto word : d.roots) std::fprintf(stderr, "%08x ", word);
339 }
340 std::fputc('\n', stderr);
341 }
342 }
343
344public:
345 // LOCAL DIAGNOSTIC: run once after a loss is reported (the compute input probe rechecks the descriptors it saw).
346 void set_lost_hook(std::function<void()> hook) {
347 std::lock_guard lock(mutex_);
348 lost_hook_ = std::move(hook);
349 }
350
351private:
352 std::function<void()> lost_hook_;
353
354 void report(const char* operation) noexcept {
355 if (reported_.exchange(true, std::memory_order_relaxed)) return;
356 std::fprintf(stderr, "[rt] device-fault: VK_ERROR_DEVICE_LOST from %s\n", operation);
357 dump_dispatches();
358 try {
359 std::function<void()> hook;
360 {
361 std::lock_guard lock(mutex_);
362 hook = lost_hook_;
363 }
364 if (hook) hook();
365 } catch (...) {
366 }
367 try {
368 if (vkGetDeviceFaultInfoEXT) report_fault();
369 } catch (...) {
370 std::fprintf(stderr, "[rt] device-fault: fault info collection failed\n");
371 }
372 try {
373 std::lock_guard lock(mutex_);
374 for (VkQueue queue : queues_) report_queue(queue);
375 } catch (...) {
376 std::fprintf(stderr, "[rt] device-fault: checkpoint collection failed\n");
377 }
378 }
379
380 void report_fault() const {
381 VkDeviceFaultCountsEXT counts{VK_STRUCTURE_TYPE_DEVICE_FAULT_COUNTS_EXT};
382 VkResult result = vkGetDeviceFaultInfoEXT(device_, &counts, nullptr);
383 if (result != VK_SUCCESS) {
384 std::fprintf(stderr, "[rt] device-fault: vkGetDeviceFaultInfoEXT counts failed (%d)\n", int(result));
385 return;
386 }
387 std::fprintf(stderr, "[rt] device-fault: vendor binary size %" PRIu64 " bytes\n", counts.vendorBinarySize);
388 std::vector<VkDeviceFaultAddressInfoEXT> addresses(counts.addressInfoCount);
389 std::vector<VkDeviceFaultVendorInfoEXT> vendors(counts.vendorInfoCount);
390 std::vector<std::byte> binary;
391 // Keep collecting addresses and vendor records if the crash binary cannot be allocated.
392 try {
393 if (counts.vendorBinarySize <= binary.max_size())
394 binary.resize(static_cast<std::size_t>(counts.vendorBinarySize));
395 } catch (...) {
396 }
397 counts.vendorBinarySize = binary.size();
398 VkDeviceFaultInfoEXT fault{VK_STRUCTURE_TYPE_DEVICE_FAULT_INFO_EXT};
399 fault.pAddressInfos = addresses.data();
400 fault.pVendorInfos = vendors.data();
401 fault.pVendorBinaryData = binary.data();
402 result = vkGetDeviceFaultInfoEXT(device_, &counts, &fault);
403 if (result != VK_SUCCESS && result != VK_INCOMPLETE) {
404 std::fprintf(stderr, "[rt] device-fault: vkGetDeviceFaultInfoEXT data failed (%d)\n", int(result));
405 return;
406 }
407 std::fprintf(stderr, "[rt] device-fault: description: %.*s%s\n", int(sizeof(fault.description)),
408 fault.description, result == VK_INCOMPLETE ? " (partial report)" : "");
409 for (std::size_t i = 0; i < counts.addressInfoCount; ++i) {
410 const auto& address = addresses[i];
411 std::fprintf(stderr, "[rt] device-fault: address[%zu] type=%d address=0x%" PRIx64
412 " precision=%" PRIu64 "\n",
413 i, int(address.addressType), address.reportedAddress, address.addressPrecision);
414 }
415 for (std::size_t i = 0; i < counts.vendorInfoCount; ++i) {
416 const auto& vendor = vendors[i];
417 std::fprintf(stderr, "[rt] device-fault: vendor[%zu] %.*s code=0x%" PRIx64 " data=0x%" PRIx64 "\n",
418 i, int(sizeof(vendor.description)), vendor.description, vendor.vendorFaultCode,
419 vendor.vendorFaultData);
420 }
421 }
422
423 void report_queue(VkQueue queue) const {
424 std::uint32_t count = 0;
425 vkGetQueueCheckpointDataNV(queue, &count, nullptr);
426 std::vector<VkCheckpointDataNV> data(count, {VK_STRUCTURE_TYPE_CHECKPOINT_DATA_NV});
427 if (count) vkGetQueueCheckpointDataNV(queue, &count, data.data());
428 std::fprintf(stderr, "[rt] device-fault: queue %p checkpoints=%u\n", static_cast<void*>(queue), count);
429 for (std::uint32_t i = 0; i < count; ++i) {
430 const auto& checkpoint = data[i];
431 const auto stage = static_cast<std::uint64_t>(checkpoint.stage);
432 const auto marker = CheckpointMarker::decode(reinterpret_cast<std::uintptr_t>(checkpoint.pCheckpointMarker));
433 if (!marker.submission) {
434 std::fprintf(stderr, "[rt] device-fault: stage=0x%" PRIx64 " marker=%p (unrecognized)\n",
435 stage, checkpoint.pCheckpointMarker);
436 continue;
437 }
438 std::fprintf(stderr, "[rt] device-fault: stage=0x%" PRIx64 " submission=%u list=%u command=%u kind=%s\n",
439 stage, marker.submission, marker.list, marker.command, marker.kind_name());
440 const auto& entry = recent_[marker.submission % recent_.size()];
441 if (entry.sequence != marker.submission || entry.queue != queue || marker.list >= entry.lists.size()) {
442 std::fprintf(stderr, "[rt] device-fault: submission metadata unavailable\n");
443 continue;
444 }
445 std::fprintf(stderr, "[rt] device-fault: ExecuteCommandLists #%" PRIu64 " queue=%p (%s) lists=%zu\n",
446 entry.execute_call, static_cast<void*>(entry.queue), entry.queue_kind, entry.list_count);
447 const auto& shaders = entry.lists[marker.list].shaders;
448 const auto next = std::upper_bound(shaders.begin(), shaders.end(), marker.command,
449 [](auto command, const auto& change) { return command < change.command; });
450 if (next != shaders.begin()) {
451 const auto& pipeline = (next - 1)->pipeline;
452 std::fprintf(stderr, "[rt] device-fault: last shader pipeline=0x%" PRIx64 " shaders=%s %s %s\n",
453 pipeline_handle(pipeline.handle), pipeline.shaders[0] ? pipeline.shaders[0] : "-",
454 pipeline.shaders[1] ? pipeline.shaders[1] : "-",
455 pipeline.shaders[2] ? pipeline.shaders[2] : "-");
456 }
457 }
458 }
459
460 template<typename Handle>
461 static std::uint64_t pipeline_handle(Handle handle) {
462 if constexpr (VK_USE_64_BIT_PTR_DEFINES) return reinterpret_cast<std::uintptr_t>(handle);
463 else return handle;
464 }
465
466 VkDevice device_;
467 PFN_vkGetDeviceFaultInfoEXT vkGetDeviceFaultInfoEXT = nullptr;
468 PFN_vkCmdSetCheckpointNV vkCmdSetCheckpointNV = nullptr;
469 PFN_vkGetQueueCheckpointDataNV vkGetQueueCheckpointDataNV = nullptr;
470 std::atomic<bool> reported_{false};
471 std::atomic<std::uint64_t> execute_calls_{0};
472 std::uint32_t sequence_ = 0;
473 std::mutex mutex_; // leaf lock, guards queues_ and recent_
474 std::vector<VkQueue> queues_;
475 const bool include_roots_ = [] {
476 const char* value = std::getenv("LEONIDA_DEVICE_FAULT_ROOTS");
477 return value && !std::strcmp(value, "1");
478 }();
479 std::array<CheckpointDispatch, CheckpointSubmission::dispatch_limit> dispatches_{};
480 std::size_t dispatch_count_ = 0;
481 std::array<CheckpointSubmission, 64> recent_;
482};
483
484} // namespace leonida
diff --git a/runtime/src/vulkan_gpu_labels.h b/runtime/src/vulkan_gpu_labels.h
new file mode 100644
index 000000000..60953417f
--- /dev/null
+++ b/runtime/src/vulkan_gpu_labels.h
@@ -0,0 +1,321 @@
1#pragma once
2#include "gpu_label_memory.h"
3#include "value_write_sink.h"
4#include <vulkan/vulkan.h>
5#include <algorithm>
6#include <atomic>
7#include <chrono>
8#include <condition_variable>
9#include <cstdio>
10#include <cstdlib>
11#include <memory>
12#include <mutex>
13#include <thread>
14#include <unordered_map>
15#include <utility>
16#include <vector>
17#ifdef _WIN32
18#ifndef NOMINMAX
19#define NOMINMAX
20#endif
21#include <windows.h>
22#include "title_page_watch.h"
23#endif
24
25namespace leonida::label {
26// LEONIDA_GPU_LABELS=1 records list slots 71 and 72 here, for the lists the list values (shims/d3d12_xs_list_values.h,
27// LEONIDA_LIST_VALUES) do not track: those land their writes themselves, and one address has one writer.
28inline bool enabled() {
29 static const bool active = [] {
30 const char *v = std::getenv("LEONIDA_GPU_LABELS");
31 return v && v[0] == '1';
32 }();
33 return active;
34}
35// Stores a completed label into the title's memory: only into a committed, private, writable page of the allocation
36// the label was captured in, and only while that allocation's generation is the captured one (Memory::publish).
37//
38// A page the D3D12 layer watches for the title's writes is read-only while it waits (title_page_watch.h), and it is
39// writable as far as the title knows. Such a page is announced and opened the way a kernel write is
40// (kernel_writes::begin_write), so the label reaches it and the layer copies the page again; a page that stays
41// read-only after that is the title's own doing and the label is dropped, as before. Called with no shadow lock held.
42inline bool store_value(const Target &target, std::uint64_t value) {
43 // The runtime's own memory first (src/value_write_sink.h): an arena offset is not a host address, so it goes to the
44 // arena and never to the store below; a page xmem maps PAGE_NOACCESS is written through xmem's own mapping. The
45 // value is written little-endian, the way the console's x64 writes it: the low 'width' bytes of the word. A
46 // target neither takes - the title's own private pages - is left to the path below, which opens a read-only page
47 // the way a kernel write does.
48 {
49 const std::uint64_t word = value;
50 bool refused = false;
51 if (memory().publish(target, [&](std::uintptr_t address, unsigned width, std::uintptr_t) {
52 const value_sink::Landing landing = value_sink::arena(address, &word, width);
53 if (landing != value_sink::Landing::elsewhere) {
54 refused = landing == value_sink::Landing::refused;
55 return !refused;
56 }
57 return value_sink::title_pages(reinterpret_cast<const void *>(address), &word, width);
58 }))
59 return true;
60 if (refused) return false;
61 }
62#ifdef _WIN32
63 return memory().publish(target, [&](std::uintptr_t address, unsigned width, std::uintptr_t allocation_base) {
64 MEMORY_BASIC_INFORMATION mbi{};
65 const auto in_allocation = [&] {
66 return VirtualQuery(reinterpret_cast<const void *>(address), &mbi, sizeof(mbi)) && mbi.State == MEM_COMMIT &&
67 mbi.Type == MEM_PRIVATE && reinterpret_cast<std::uintptr_t>(mbi.AllocationBase) == allocation_base &&
68 !(mbi.Protect & PAGE_GUARD);
69 };
70 if (!in_allocation()) return false;
71 std::uint64_t pin = 0;
72 if ((mbi.Protect & 0xff) == PAGE_READONLY) {
73 pin = kernel_writes::begin_write(reinterpret_cast<const void *>(address), width, nullptr);
74 if (!pin || !in_allocation()) {
75 kernel_writes::end_write(pin, false);
76 return false;
77 }
78 }
79 const auto begin = reinterpret_cast<std::uintptr_t>(mbi.BaseAddress);
80 const bool writable = (mbi.Protect & 0xff) == PAGE_READWRITE || (mbi.Protect & 0xff) == PAGE_WRITECOPY;
81 const bool inside = address >= begin && address - begin <= mbi.RegionSize &&
82 mbi.RegionSize - (address - begin) >= width;
83 if (writable && inside) {
84 if (width == 4)
85 InterlockedExchange(reinterpret_cast<volatile LONG *>(address), static_cast<LONG>(value));
86 else
87 InterlockedExchange64(reinterpret_cast<volatile LONG64 *>(address), static_cast<LONG64>(value));
88 }
89 kernel_writes::end_write(pin, false);
90 return writable && inside;
91 });
92#else
93 (void)target;
94 (void)value;
95 return false;
96#endif
97}
98
99// Each submitted Vulkan command buffer owns a fence and its query slots until the GPU finishes it.
100// The CPU destination is a generation-checked title data allocation. No guest pointer is a GPU command destination.
101class Completions {
102 static constexpr unsigned per_pool = 64;
103 struct Batch {
104 VkFence fence{};
105 std::vector<VkQueryPool> pools;
106 std::vector<Write> labels;
107 };
108 std::mutex mutex_;
109 std::condition_variable changed_;
110 bool closing_ = false;
111 std::thread worker_;
112 VkDevice device_{};
113 std::unordered_map<VkCommandBuffer, std::unique_ptr<Batch>> recording_;
114 std::vector<std::unique_ptr<Batch>> pending_;
115 std::vector<VkQueryPool> idle_pools_;
116 std::vector<VkFence> idle_fences_;
117 PFN_vkCreateQueryPool create_pool_{};
118 PFN_vkDestroyQueryPool destroy_pool_{};
119 PFN_vkCmdResetQueryPool reset_query_{};
120 PFN_vkCmdWriteTimestamp timestamp_{};
121 PFN_vkGetQueryPoolResults results_{};
122 PFN_vkCreateFence create_fence_{};
123 PFN_vkDestroyFence destroy_fence_{};
124 PFN_vkGetFenceStatus fence_status_{};
125 PFN_vkResetFences reset_fences_{};
126 PFN_vkDeviceWaitIdle device_idle_{};
127 std::uint64_t expired_ = 0, errors_ = 0;
128 VkQueryPool pool() {
129 if (!idle_pools_.empty()) {
130 auto h = idle_pools_.back();
131 idle_pools_.pop_back();
132 return h;
133 }
134 VkQueryPoolCreateInfo c{VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO};
135 c.queryType = VK_QUERY_TYPE_TIMESTAMP;
136 c.queryCount = per_pool;
137 VkQueryPool p{};
138 return create_pool_(device_, &c, nullptr, &p) == VK_SUCCESS ? p : VK_NULL_HANDLE;
139 }
140 VkFence fence() {
141 if (!idle_fences_.empty()) {
142 auto f = idle_fences_.back();
143 idle_fences_.pop_back();
144 if (reset_fences_(device_, 1, &f) == VK_SUCCESS) return f;
145 destroy_fence_(device_, f, nullptr);
146 }
147 VkFenceCreateInfo c{VK_STRUCTURE_TYPE_FENCE_CREATE_INFO};
148 VkFence f{};
149 return create_fence_(device_, &c, nullptr, &f) == VK_SUCCESS ? f : VK_NULL_HANDLE;
150 }
151 void recycle(Batch &b) {
152 for (auto p : b.pools)
153 idle_pools_.push_back(p);
154 if (b.fence) idle_fences_.push_back(b.fence);
155 }
156 static bool store(const Target &target, std::uint64_t value) { return store_value(target, value); }
157 void publish(const Batch &batch) {
158 for (std::size_t i = 0; i < batch.labels.size(); ++i) {
159 const Write &op = batch.labels[i];
160 std::uint64_t value = op.value;
161 if (op.clock == 1) {
162 if (results_(device_, batch.pools[i / per_pool], static_cast<unsigned>(i % per_pool), 1, sizeof(value),
163 &value, sizeof(value), VK_QUERY_RESULT_64_BIT) != VK_SUCCESS) {
164 ++errors_;
165 continue;
166 }
167 } else if (op.clock == 2) {
168#ifdef _WIN32
169 LARGE_INTEGER qpc{};
170 if (!QueryPerformanceCounter(&qpc)) {
171 ++errors_;
172 continue;
173 }
174 value = static_cast<std::uint64_t>(qpc.QuadPart);
175#else
176 ++errors_;
177 continue;
178#endif
179 }
180 if (!store(op.target, value)) ++expired_;
181 }
182 }
183 void run() {
184 std::unique_lock lock(mutex_);
185 for (;;) {
186 if (pending_.empty() && !closing_) changed_.wait(lock, [&] { return closing_ || !pending_.empty(); });
187 for (auto i = pending_.begin(); i != pending_.end();) {
188 auto &b = **i;
189 const auto status = fence_status_(device_, b.fence);
190 if (status == VK_NOT_READY && !closing_) {
191 ++i;
192 continue;
193 }
194 if (status == VK_SUCCESS)
195 publish(b);
196 else
197 ++errors_;
198 recycle(b);
199 i = pending_.erase(i);
200 }
201 if (closing_) return;
202 if (!pending_.empty()) changed_.wait_for(lock, std::chrono::milliseconds(1));
203 }
204 }
205
206 public:
207 ~Completions() { stop(device_); }
208
209 bool initialize(VkDevice dev, PFN_vkGetDeviceProcAddr get) {
210 if (!enabled() || !dev || !get) return false;
211 std::lock_guard lock(mutex_);
212 if (device_) return device_ == dev;
213#define LABEL_FN(name) reinterpret_cast<PFN_##name>(get(dev, #name))
214 create_pool_ = LABEL_FN(vkCreateQueryPool);
215 destroy_pool_ = LABEL_FN(vkDestroyQueryPool);
216 reset_query_ = LABEL_FN(vkCmdResetQueryPool);
217 timestamp_ = LABEL_FN(vkCmdWriteTimestamp);
218 results_ = LABEL_FN(vkGetQueryPoolResults);
219 create_fence_ = LABEL_FN(vkCreateFence);
220 destroy_fence_ = LABEL_FN(vkDestroyFence);
221 fence_status_ = LABEL_FN(vkGetFenceStatus);
222 reset_fences_ = LABEL_FN(vkResetFences);
223 device_idle_ = LABEL_FN(vkDeviceWaitIdle);
224#undef LABEL_FN
225 if (!create_pool_ || !destroy_pool_ || !reset_query_ || !timestamp_ || !results_ || !create_fence_ ||
226 !destroy_fence_ || !fence_status_ || !reset_fences_ || !device_idle_)
227 return false;
228 device_ = dev;
229 closing_ = false;
230 worker_ = std::thread([this] { run(); });
231 return true;
232 }
233 void begin_record(VkCommandBuffer cb) {
234 if (!enabled()) return;
235 std::lock_guard lock(mutex_);
236 auto i = recording_.find(cb);
237 if (i != recording_.end()) {
238 recycle(*i->second);
239 recording_.erase(i);
240 }
241 }
242 void record(VkCommandBuffer cb, const Write &op) {
243 if (!enabled()) return;
244 std::lock_guard lock(mutex_);
245 if (!device_ || closing_) {
246 ++errors_;
247 return;
248 }
249 auto &slot = recording_[cb];
250 if (!slot) {
251 slot = std::make_unique<Batch>();
252 slot->fence = fence();
253 }
254 if (!slot->fence) {
255 ++errors_;
256 return;
257 }
258 const auto i = slot->labels.size();
259 const auto j = static_cast<unsigned>(i % per_pool);
260 if (!j) {
261 auto p = pool();
262 if (!p) {
263 ++errors_;
264 return;
265 }
266 slot->pools.push_back(p);
267 }
268 auto p = slot->pools[i / per_pool];
269 reset_query_(cb, p, j, 1);
270 timestamp_(cb, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, p, j);
271 slot->labels.push_back(op);
272 }
273 VkFence submit_fence(VkCommandBuffer cb) {
274 if (!enabled() || !cb) return VK_NULL_HANDLE;
275 std::lock_guard lock(mutex_);
276 auto i = recording_.find(cb);
277 return i == recording_.end() ? VK_NULL_HANDLE : i->second->fence;
278 }
279 void submitted(VkCommandBuffer cb, bool ok) {
280 if (!enabled() || !cb) return;
281 std::lock_guard lock(mutex_);
282 auto i = recording_.find(cb);
283 if (i == recording_.end()) return;
284 if (ok && i->second->fence) {
285 pending_.push_back(std::move(i->second));
286 changed_.notify_one();
287 } else
288 recycle(*i->second);
289 recording_.erase(i);
290 }
291 void stop(VkDevice dev) {
292 {
293 std::lock_guard lock(mutex_);
294 if (!dev || device_ != dev) return;
295 }
296 device_idle_(dev);
297 {
298 std::lock_guard lock(mutex_);
299 closing_ = true;
300 changed_.notify_all();
301 }
302 if (worker_.joinable()) worker_.join();
303 std::lock_guard lock(mutex_);
304 for (auto &pair : recording_)
305 recycle(*pair.second);
306 recording_.clear();
307 for (auto f : idle_fences_)
308 destroy_fence_(dev, f, nullptr);
309 idle_fences_.clear();
310 for (auto p : idle_pools_)
311 destroy_pool_(dev, p, nullptr);
312 idle_pools_.clear();
313 if (errors_) {
314 std::fprintf(stderr, "[rt] d3d12: %llu GPU label operations failed, %llu destinations expired\n",
315 static_cast<unsigned long long>(errors_), static_cast<unsigned long long>(expired_));
316 }
317 expired_ = errors_ = 0;
318 device_ = VK_NULL_HANDLE;
319 }
320};
321} // namespace leonida::label
diff --git a/runtime/src/vulkan_graphics_shader_modules.h b/runtime/src/vulkan_graphics_shader_modules.h
new file mode 100644
index 000000000..f3f7ef742
--- /dev/null
+++ b/runtime/src/vulkan_graphics_shader_modules.h
@@ -0,0 +1,65 @@
1#pragma once
2
3#include <vulkan/vulkan.h>
4#include <algorithm>
5#include <cstdint>
6#include <memory>
7#include <mutex>
8#include <span>
9#include <unordered_map>
10#include <vector>
11
12namespace leonida {
13class GraphicsShaderModules {
14 public:
15 struct Module {
16 VkDevice device;
17 PFN_vkDestroyShaderModule destroy;
18 std::vector<std::uint32_t> words;
19 VkShaderModule handle = VK_NULL_HANDLE;
20 Module(VkDevice d, PFN_vkDestroyShaderModule fn, std::span<const std::uint32_t> input)
21 : device(d), destroy(fn), words(input.begin(), input.end()) {}
22 ~Module() {
23 if (handle) destroy(device, handle, nullptr);
24 }
25 };
26 using Reference = std::shared_ptr<const Module>;
27 Reference acquire(VkDevice device, PFN_vkCreateShaderModule create, PFN_vkDestroyShaderModule destroy,
28 std::span<const std::uint32_t> words) {
29 if (words.empty()) return {};
30 std::uint64_t hash = 14695981039346656037ull;
31 for (std::uint32_t word : words)
32 hash = (hash ^ word) * 1099511628211ull;
33 {
34 std::lock_guard lock(mutex_);
35 if (auto found = find_locked(hash, words)) return found;
36 }
37 auto result = std::make_shared<Module>(device, destroy, words);
38 VkShaderModuleCreateInfo info{VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO};
39 info.pCode = words.data();
40 info.codeSize = words.size_bytes();
41 if (create(device, &info, nullptr, &result->handle) != VK_SUCCESS) {
42 result->handle = VK_NULL_HANDLE;
43 return {};
44 }
45 std::lock_guard lock(mutex_);
46 if (auto found = find_locked(hash, words)) return found;
47 if ((++created_ % 1024) == 0) std::erase_if(modules_, [](const auto &entry) { return entry.second.expired(); });
48 modules_.emplace(hash, result);
49 return result;
50 }
51
52 private:
53 Reference find_locked(std::uint64_t hash, std::span<const std::uint32_t> words) {
54 const auto [first, last] = modules_.equal_range(hash);
55 for (auto i = first; i != last; ++i)
56 if (auto live = i->second.lock();
57 live && std::equal(words.begin(), words.end(), live->words.begin(), live->words.end()))
58 return live;
59 return {};
60 }
61 std::mutex mutex_;
62 std::unordered_multimap<std::uint64_t, std::weak_ptr<const Module>> modules_;
63 std::uint64_t created_ = 0;
64};
65} // namespace leonida
diff --git a/runtime/src/vulkan_index_view.h b/runtime/src/vulkan_index_view.h
new file mode 100644
index 000000000..b9e72349b
--- /dev/null
+++ b/runtime/src/vulkan_index_view.h
@@ -0,0 +1,21 @@
1// Device creation policy for bounded D3D12 indexed-indirect draws. No work per draw.
2#pragma once
3
4#include <vulkan/vulkan.h>
5
6namespace leonida {
7
8inline bool can_enable_robust_index_view(VkPhysicalDevice device, PFN_vkGetPhysicalDeviceProperties2 properties,
9 bool sized_indirect, bool robust_access, bool storage_update_after_bind) {
10 if (!sized_indirect || !robust_access) return false;
11 if (!storage_update_after_bind) return true;
12 // VUID-VkDeviceCreateInfo-robustBufferAccess-10247: preserve bindless rather than disabling
13 // descriptorBindingStorageBufferUpdateAfterBind on a device that cannot combine the two.
14 if (!properties) return false;
15 VkPhysicalDeviceVulkan12Properties indexed{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES};
16 VkPhysicalDeviceProperties2 query{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, &indexed};
17 properties(device, &query);
18 return indexed.robustBufferAccessUpdateAfterBind == VK_TRUE;
19}
20
21} // namespace leonida
diff --git a/runtime/src/vulkan_indirect_clamp.h b/runtime/src/vulkan_indirect_clamp.h
new file mode 100644
index 000000000..3eb192d0f
--- /dev/null
+++ b/runtime/src/vulkan_indirect_clamp.h
@@ -0,0 +1,613 @@
1// GPU-side clamping of D3D12 ExecuteIndirect arguments, for the replay (vulkan_replay.h).
2//
3// The title's own compute passes write most of these arguments, and a pass the replay drops (an async pipeline that
4// is not built yet, a stub pipeline, LEONIDA_SKIP_COMPUTE) or mistranslates leaves whatever the memory held: a stale
5// or garbage record makes a dispatch of billions of groups or a draw of four billion vertices run until the host
6// resets the display driver (TDR, device loss). So, just before the indirect command, one tiny compute pass copies
7// the active records into device-local scratch with their values bounded - 2^24 vertices or indices, 2^26 vertex
8// instances, 65 535 groups per dimension, 2^20 groups per dispatch, and a 2^27-unit work budget per command
9// list (the shader is indirect_clamp.comp) - and the indirect command reads that scratch. The application's argument
10// and count buffers are left untouched, so values within the limits replay bit-identically.
11//
12// One pass covers all four argument kinds the layer can emit (draw, draw indexed, dispatch, mesh dispatch) and the
13// counted variants, whose count is clamped to max_command_count as well (a *Count draw then reads a count the scratch
14// really holds).
15//
16// LEONIDA_INDIRECT_CLAMP=0 disables it: the indirect command reads the application's argument buffer, as before.
17//
18// The pass is recorded before anything reads the arguments, and before the drawing scope an indirect draw opens
19// around itself (vkCmdCopyBuffer and a memory barrier with a transfer access are not allowed inside a
20// dynamic-rendering scope, VUID-vkCmdCopyBuffer-renderpass / VUID-vkCmdPipelineBarrier-None-09586). That is where
21// `vulkan_replay.h` emits it for the legacy ExecuteIndirect commands, and where a stateful indirect draw - the
22// workspace branch that records a Draw with the arguments it reads, opening its own rendering scope - emits it too:
23// the same prepare/emit pair, from `Prepared` or its own prepared draw, before vkCmdBeginRendering. Nothing here
24// depends on that branch.
25//
26// Scratch comes from a per-submission pool (vulkan_scratch.h): handed out while a list is prepared, retired with the
27// submission's timeline ticket, reused once the GPU is past it - so a list with many indirect calls allocates no
28// buffer per call. The only other state per call is a 16-byte counter slot in one persistent host-visible buffer,
29// read (and logged rate-limited) once the submission that used it has completed. The counters are diagnostics: a call
30// that finds no free slot is still clamped, without its counters.
31#pragma once
32#ifndef VK_NO_PROTOTYPES
33#define VK_NO_PROTOTYPES
34#endif
35#include <vulkan/vulkan.h>
36
37#include <algorithm>
38#include <cstdint>
39#include <cstdio>
40#include <cstdlib>
41#include <cstring>
42#include <memory>
43#include <mutex>
44#include <vector>
45
46#include "submit_phases.h"
47#include "indirect_clamp_spv.h"
48#include "vulkan_indirect_dispatch_count.h"
49#include "vulkan_aftermath.h"
50#include "vulkan_memory.h"
51#include "vulkan_scratch.h"
52
53namespace leonida {
54
55// Argument kinds, numbered as leonida::IndirectKind (command_list.h): the shader reads them.
56inline constexpr std::uint32_t indirect_clamp_draw = 0;
57inline constexpr std::uint32_t indirect_clamp_draw_indexed = 1;
58inline constexpr std::uint32_t indirect_clamp_dispatch = 2;
59inline constexpr std::uint32_t indirect_clamp_mesh = 3;
60
61// What the pass bounds, as indirect_clamp.comp states them.
62inline constexpr std::uint32_t indirect_clamp_max_vertices = 1u << 24;
63inline constexpr std::uint32_t indirect_clamp_max_vertex_instances = 1u << 26;
64inline constexpr std::uint32_t indirect_clamp_max_group_dimension = 65535u;
65inline constexpr std::uint32_t indirect_clamp_max_groups = 1u << 20;
66inline constexpr std::uint32_t indirect_clamp_budget = 1u << 27;
67
68// The largest scratch allocation accepted for one ExecuteIndirect call.
69inline constexpr std::uint64_t indirect_clamp_max_scratch_bytes = std::uint64_t(64) << 20;
70
71// Read once: LEONIDA_INDIRECT_CLAMP=0 leaves the application's argument buffer to the indirect command.
72inline bool indirect_clamp_enabled() {
73 static const bool enabled = [] {
74#ifdef _WIN32
75 char value[3]{};
76 std::size_t length = 0;
77 if (getenv_s(&length, value, sizeof value, "LEONIDA_INDIRECT_CLAMP") != 0 || !length) return true;
78 return !(length == 2 && value[0] == '0' && !value[1]);
79#else
80 const char* value = std::getenv("LEONIDA_INDIRECT_CLAMP");
81 return !value || value[0] != '0' || value[1];
82#endif
83 }();
84 return enabled;
85}
86
87// The record size of each kind, as Vulkan's indirect commands define it and D3D12's argument structs match.
88inline constexpr std::uint32_t indirect_clamp_record_size(std::uint32_t kind) {
89 return kind == indirect_clamp_draw ? 4u * 4u : kind == indirect_clamp_draw_indexed ? 5u * 4u : 3u * 4u;
90}
91
92// Where a clamped ExecuteIndirect call's arguments are, and what its clamp pass needs to record it.
93struct ClampedIndirect {
94 // The command the replay then emits: the clamped records, and for a counted draw the clamped count word.
95 VkBuffer buffer = VK_NULL_HANDLE;
96 VkDeviceSize offset = 0;
97 VkBuffer count_buffer = VK_NULL_HANDLE;
98 VkDeviceSize count_offset = 0;
99 std::uint32_t stride = 0; // bytes per clamped record: 3, 4 or 5 words by kind
100 std::uint32_t records = 0; // max_command_count
101 bool counted = false;
102
103 // The clamp pass itself (emit_indirect_clamp).
104 VkDeviceAddress arguments = 0; // the application's first record
105 VkDeviceAddress count = 0; // the application's count word, 0 when uncounted
106 VkDeviceAddress records_out = 0;
107 VkDeviceAddress count_out = 0;
108 VkDeviceAddress stats = 0;
109 VkDeviceAddress list_budget = 0;
110 void share_list_budget(VkDeviceAddress& first) {
111 if (!first) first = list_budget;
112 list_budget = first;
113 }
114 VkBuffer stats_buffer = VK_NULL_HANDLE; // the host-visible counter slot the pass copies its counters to
115 VkDeviceSize stats_offset = 0;
116 VkDeviceSize stats_scratch_offset = 0; // where in `buffer` the pass's own counters are
117 std::uint32_t kind = 0;
118 std::uint32_t stride_words = 0;
119 std::uint32_t max_records = 0;
120};
121
122// One device's clamp: the pass's pipeline (made on the first call), the per-submission record pool, and the counter
123// slots. Single-threaded per list, as the replay's preparation is: the caller holds the context's tracker lock for
124// prepare and emit, and the batch destructor only touches the slot bookkeeping under `mutex_`.
125class IndirectArgumentClamp {
126private:
127 struct Slot {
128 std::uint32_t area;
129 std::uint32_t index;
130 };
131 static constexpr std::uint32_t no_slot = UINT32_MAX; // Slot::area of a call clamped without counters
132
133public:
134 using Allocate = ScratchBuffers::Allocate;
135
136 IndirectArgumentClamp(PFN_vkGetDeviceProcAddr get, VkDevice device, const VkPhysicalDeviceMemoryProperties& memory,
137 const VkPhysicalDeviceLimits& limits, Allocate allocate,
138 DeviceFaultDiagnostics* diagnostics = nullptr,
139 std::vector<std::uint32_t> families = {});
140 ~IndirectArgumentClamp();
141 IndirectArgumentClamp(const IndirectArgumentClamp&) = delete;
142 IndirectArgumentClamp& operator=(const IndirectArgumentClamp&) = delete;
143
144 // False when the pass cannot run on this device (no device addresses, no compute): the replay then keeps the
145 // application's buffer.
146 bool loaded() const { return scratch_.loaded() && limits_.maxComputeWorkGroupCount[0] != 0; }
147
148 // The record pool's life cycle, as the copy scratch's (vulkan_scratch.h).
149 void collect() { scratch_.collect(); }
150 void retire(VkSemaphore timeline, std::uint64_t ticket) { scratch_.retire(timeline, ticket); }
151 void forget(VkSemaphore timeline) { scratch_.forget(timeline); }
152
153 // What the pass found since the process started. `records_clamped` counts the records whose values the pass
154 // changed (the ones it emptied included).
155 struct Counters {
156 std::uint64_t calls = 0;
157 std::uint64_t records = 0;
158 std::uint64_t records_clamped = 0;
159 std::uint64_t counts_clamped = 0;
160 std::uint64_t over_budget = 0;
161 std::uint64_t zeroed = 0;
162 std::uint64_t unclamped_calls = 0; // the fallbacks: calls the pool or the limits left to the replay
163 std::uint64_t uncounted_calls = 0; // clamped with no counter slot free: their counters are not read back
164 };
165
166 // One submission's clamp state: the counter slots its calls claimed, read and released together once that
167 // submission has completed. Retained by the command-buffer slot until its timeline ticket does.
168 class Batch {
169 public:
170 explicit Batch(IndirectArgumentClamp& owner) : owner_(owner) {}
171 ~Batch() { owner_.release(slots_, true); }
172 Batch(const Batch&) = delete;
173 Batch& operator=(const Batch&) = delete;
174
175 // Reserve scratch for one command. A host-visible counter slot is optional.
176 bool prepare(VkBuffer arguments, VkDeviceSize argument_offset, VkBuffer count, VkDeviceSize count_offset,
177 std::uint32_t kind, std::uint32_t stride, std::uint32_t max_count, ClampedIndirect& out) {
178 // LOCAL FIX (post-load device loss): a submission after the story load carries thousands of
179 // ExecuteIndirect calls, far more than the counter slots, and each call that found none used to fall back
180 // to the application's buffer - unclamped, over arguments that skipped compute never wrote, while one
181 // submission blocked in the driver for 10 s and the device was lost. Out of slots, the call is clamped all
182 // the same; only its counters are not read back.
183 Slot slot{};
184 const bool counted = owner_.claim_slot(slot);
185 if (!counted) {
186 owner_.note_uncounted();
187 slot = Slot{no_slot, 0};
188 }
189 if (!owner_.prepare(arguments, argument_offset, count, count_offset, kind, stride, max_count, slot, out)) {
190 if (counted) owner_.release_one(slot);
191 return false;
192 }
193 if (counted) {
194 try {
195 slots_.push_back(slot);
196 } catch (...) {
197 owner_.release_one(slot);
198 throw;
199 }
200 }
201 return true;
202 }
203
204 std::size_t calls() const { return slots_.size(); }
205
206 private:
207 IndirectArgumentClamp& owner_;
208 std::vector<Slot> slots_;
209 };
210
211 std::unique_ptr<Batch> batch() { return std::make_unique<Batch>(*this); }
212
213 // Records one clamp pass: its counters filled, the dispatch, and the counters copied back to their slot. Emitted
214 // before the indirect command that reads `job`, and before any rendering scope that command runs in.
215 void emit(VkCommandBuffer cb, const ClampedIndirect& job);
216
217 Counters counters() const {
218 std::lock_guard lock(mutex_);
219 return counters_;
220 }
221
222private:
223 // A host-visible buffer of counter slots: what the pass's counters are copied into, 16 bytes each.
224 struct HostArea {
225 VkBuffer buffer = VK_NULL_HANDLE;
226 VkDeviceMemory memory = VK_NULL_HANDLE;
227 std::uint8_t* host = nullptr;
228 std::uint32_t slots = 0;
229 static constexpr std::uint32_t slot_bytes = 32; // 16 bytes of counters, 16 of padding
230 };
231 static constexpr std::uint32_t slots_per_area = 64;
232 // 4,096 slots (128 KiB of host memory): enough for a submission's ExecuteIndirect calls after the load, and the
233 // calls past them are still clamped (no_slot).
234 static constexpr std::uint32_t max_areas = 64;
235
236 template<typename T> T fn(const char* name) const { return reinterpret_cast<T>(get_(device_, name)); }
237 bool make_pipeline();
238 bool make_area();
239 bool claim_slot(Slot& out);
240 void release_one(Slot slot);
241 void release(std::vector<Slot>& slots, bool read);
242 bool prepare(VkBuffer arguments, VkDeviceSize argument_offset, VkBuffer count, VkDeviceSize count_offset,
243 std::uint32_t kind, std::uint32_t stride, std::uint32_t max_count, Slot slot, ClampedIndirect& out);
244 void fallback(const char* reason);
245 void note_uncounted();
246
247 PFN_vkGetDeviceProcAddr get_;
248 VkDevice device_;
249 VkPhysicalDeviceMemoryProperties memory_{};
250 VkPhysicalDeviceLimits limits_{};
251 std::vector<std::uint32_t> families_;
252 ScratchBuffers scratch_;
253 VkPipelineLayout layout_ = VK_NULL_HANDLE;
254 VkPipeline pipeline_ = VK_NULL_HANDLE;
255
256 mutable std::mutex mutex_; // the slot bookkeeping and the counters
257 std::vector<HostArea> areas_;
258 std::vector<Slot> free_slots_;
259 Counters counters_{};
260 std::uint64_t next_report_frame_ = 0;
261};
262
263namespace detail {
264
265// One clamp pass's push-constant block. The shader's block is the same: five device addresses, then the six words.
266struct IndirectClampPush {
267 VkDeviceAddress arguments;
268 VkDeviceAddress count;
269 VkDeviceAddress records_out;
270 VkDeviceAddress count_out;
271 VkDeviceAddress stats;
272 VkDeviceAddress list_budget;
273 std::uint32_t kind;
274 std::uint32_t stride_words;
275 std::uint32_t records;
276 std::uint32_t first_record;
277 std::uint32_t max_records;
278 std::uint32_t flags;
279};
280static_assert(sizeof(IndirectClampPush) == 72);
281
282inline constexpr VkBufferUsageFlags indirect_clamp_scratch_usage =
283 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT |
284 VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT |
285 VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT;
286
287} // namespace detail
288
289inline IndirectArgumentClamp::IndirectArgumentClamp(PFN_vkGetDeviceProcAddr get, VkDevice device,
290 const VkPhysicalDeviceMemoryProperties& memory,
291 const VkPhysicalDeviceLimits& limits, Allocate allocate,
292 DeviceFaultDiagnostics* diagnostics,
293 std::vector<std::uint32_t> families)
294 : get_(get), device_(device), memory_(memory), limits_(limits), families_(std::move(families)),
295 scratch_(get, device, std::move(allocate), diagnostics, detail::indirect_clamp_scratch_usage, families_) {}
296
297inline IndirectArgumentClamp::~IndirectArgumentClamp() {
298 const auto destroy_pipeline = fn<PFN_vkDestroyPipeline>("vkDestroyPipeline");
299 const auto destroy_layout = fn<PFN_vkDestroyPipelineLayout>("vkDestroyPipelineLayout");
300 if (pipeline_ && destroy_pipeline) destroy_pipeline(device_, pipeline_, nullptr);
301 if (layout_ && destroy_layout) destroy_layout(device_, layout_, nullptr);
302 const auto destroy_buffer = fn<PFN_vkDestroyBuffer>("vkDestroyBuffer");
303 const auto free_memory = fn<PFN_vkFreeMemory>("vkFreeMemory");
304 for (auto& area : areas_) {
305 if (area.buffer && destroy_buffer) destroy_buffer(device_, area.buffer, nullptr);
306 if (area.memory && free_memory) free_memory(device_, area.memory, nullptr);
307 }
308}
309
310inline bool IndirectArgumentClamp::make_pipeline() {
311 if (pipeline_) return true;
312 for (const char* name : {"vkCreateBuffer", "vkDestroyBuffer", "vkGetBufferMemoryRequirements",
313 "vkAllocateMemory", "vkFreeMemory", "vkBindBufferMemory", "vkMapMemory", "vkUnmapMemory",
314 "vkGetBufferDeviceAddress", "vkCreateShaderModule", "vkDestroyShaderModule", "vkCreatePipelineLayout",
315 "vkDestroyPipelineLayout", "vkCreateComputePipelines", "vkDestroyPipeline", "vkCmdPipelineBarrier",
316 "vkCmdBindPipeline", "vkCmdPushConstants", "vkCmdDispatch", "vkCmdFillBuffer", "vkCmdCopyBuffer"})
317 if (!get_(device_, name)) return false;
318 VkShaderModule module = VK_NULL_HANDLE;
319 VkShaderModuleCreateInfo shader{VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO};
320 shader.codeSize = sizeof(indirect_clamp_spirv);
321 shader.pCode = indirect_clamp_spirv;
322 const aftermath::ShaderName aftermath_name("(runtime) indirect_clamp");
323 bool ok = fn<PFN_vkCreateShaderModule>("vkCreateShaderModule")(device_, &shader, nullptr, &module) == VK_SUCCESS;
324 VkPipelineLayout layout = VK_NULL_HANDLE;
325 const VkPushConstantRange range{VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(detail::IndirectClampPush)};
326 VkPipelineLayoutCreateInfo layout_info{VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO};
327 layout_info.pushConstantRangeCount = 1;
328 layout_info.pPushConstantRanges = &range;
329 ok = ok && fn<PFN_vkCreatePipelineLayout>("vkCreatePipelineLayout")(device_, &layout_info, nullptr, &layout) ==
330 VK_SUCCESS;
331 VkPipeline pipeline = VK_NULL_HANDLE;
332 VkComputePipelineCreateInfo info{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO};
333 info.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO};
334 info.stage.stage = VK_SHADER_STAGE_COMPUTE_BIT;
335 info.stage.module = module;
336 info.stage.pName = "main";
337 info.layout = layout;
338 ok = ok && fn<PFN_vkCreateComputePipelines>("vkCreateComputePipelines")(device_, VK_NULL_HANDLE, 1, &info, nullptr,
339 &pipeline) == VK_SUCCESS;
340 if (module) fn<PFN_vkDestroyShaderModule>("vkDestroyShaderModule")(device_, module, nullptr);
341 if (!ok) {
342 if (pipeline) fn<PFN_vkDestroyPipeline>("vkDestroyPipeline")(device_, pipeline, nullptr);
343 if (layout) fn<PFN_vkDestroyPipelineLayout>("vkDestroyPipelineLayout")(device_, layout, nullptr);
344 return false;
345 }
346 layout_ = layout;
347 pipeline_ = pipeline;
348 return true;
349}
350
351// One host-visible buffer of counter slots: a coherent mapping the pass's counters are copied into.
352inline bool IndirectArgumentClamp::make_area() {
353 if (areas_.size() >= max_areas) return false;
354 const auto create_buffer = fn<PFN_vkCreateBuffer>("vkCreateBuffer");
355 const auto requirements_fn = fn<PFN_vkGetBufferMemoryRequirements>("vkGetBufferMemoryRequirements");
356 const auto bind_fn = fn<PFN_vkBindBufferMemory>("vkBindBufferMemory");
357 const auto allocate_fn = fn<PFN_vkAllocateMemory>("vkAllocateMemory");
358 const auto map_fn = fn<PFN_vkMapMemory>("vkMapMemory");
359 if (!create_buffer || !requirements_fn || !bind_fn || !allocate_fn || !map_fn || !memory_.memoryTypeCount)
360 return false;
361 HostArea area{};
362 area.slots = slots_per_area;
363 VkBufferCreateInfo info{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO};
364 info.size = VkDeviceSize(area.slots) * HostArea::slot_bytes;
365 info.usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT;
366 // Direct and async-compute queues copy counter slots into the same HostArea buffer concurrently.
367 share_across_queue_families(info, families_);
368 if (create_buffer(device_, &info, nullptr, &area.buffer) != VK_SUCCESS) return false;
369 const auto destroy_buffer = fn<PFN_vkDestroyBuffer>("vkDestroyBuffer");
370 const auto free_memory = fn<PFN_vkFreeMemory>("vkFreeMemory");
371 const auto cleanup = [&] {
372 if (area.buffer && destroy_buffer) destroy_buffer(device_, area.buffer, nullptr);
373 if (area.memory && free_memory) free_memory(device_, area.memory, nullptr);
374 area.buffer = VK_NULL_HANDLE;
375 area.memory = VK_NULL_HANDLE;
376 };
377 VkMemoryRequirements requirements{};
378 requirements_fn(device_, area.buffer, &requirements);
379 VkMemoryAllocateInfo allocation{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO};
380 allocation.allocationSize = requirements.size;
381 bool bound = false;
382 for (const std::uint32_t type : memory_type_order(memory_, requirements.memoryTypeBits,
383 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
384 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
385 0, requirements.size)) {
386 allocation.memoryTypeIndex = type;
387 if (allocate_fn(device_, &allocation, nullptr, &area.memory) != VK_SUCCESS) {
388 area.memory = VK_NULL_HANDLE;
389 continue;
390 }
391 bound = bind_fn(device_, area.buffer, area.memory, 0) == VK_SUCCESS;
392 if (bound) break;
393 if (free_memory) free_memory(device_, area.memory, nullptr);
394 area.memory = VK_NULL_HANDLE;
395 }
396 if (!bound || map_fn(device_, area.memory, 0, info.size, 0, reinterpret_cast<void**>(&area.host)) != VK_SUCCESS) {
397 cleanup();
398 return false;
399 }
400 std::memset(area.host, 0, size_t(info.size));
401 try {
402 free_slots_.reserve(free_slots_.size() + area.slots);
403 areas_.reserve(areas_.size() + 1);
404 } catch (...) {
405 cleanup();
406 throw;
407 }
408 const auto area_index = std::uint32_t(areas_.size());
409 for (std::uint32_t i = 0; i < area.slots; ++i) free_slots_.push_back({area_index, i});
410 areas_.push_back(area);
411 return true;
412}
413
414inline bool IndirectArgumentClamp::claim_slot(Slot& out) {
415 std::lock_guard lock(mutex_);
416 if (free_slots_.empty() && !make_area()) return false;
417 out = free_slots_.back();
418 free_slots_.pop_back();
419 return true;
420}
421
422inline void IndirectArgumentClamp::release_one(Slot slot) {
423 std::lock_guard lock(mutex_);
424 free_slots_.push_back(slot);
425}
426
427// Reads the counters a submission's clamp passes wrote, adds them to the process totals, and hands the slots back.
428// Called when the submission's timeline ticket has been reached, so the GPU is past the copies.
429inline void IndirectArgumentClamp::release(std::vector<Slot>& slots, bool read) {
430 Counters delta{};
431 const std::size_t calls = slots.size();
432 {
433 std::lock_guard lock(mutex_);
434 for (const Slot& slot : slots) {
435 if (read && slot.area < areas_.size() && slot.index < areas_[slot.area].slots) {
436 const HostArea& area = areas_[slot.area];
437 auto* words =
438 reinterpret_cast<std::uint32_t*>(area.host + std::size_t(slot.index) * HostArea::slot_bytes);
439 delta.records_clamped += words[0];
440 delta.counts_clamped += words[1];
441 delta.over_budget += words[2];
442 delta.zeroed += words[3];
443 // Clear after reading so a later aborted batch that reuses this slot without submitting never
444 // double-counts a previous submission's counters.
445 std::memset(words, 0, 4 * sizeof(std::uint32_t));
446 }
447 free_slots_.push_back(slot);
448 }
449 counters_.records_clamped += delta.records_clamped;
450 counters_.counts_clamped += delta.counts_clamped;
451 counters_.over_budget += delta.over_budget;
452 counters_.zeroed += delta.zeroed;
453 const auto frame = submit_phases::totals().present_serial.load(std::memory_order_relaxed);
454 if (read && calls && frame >= next_report_frame_) {
455 next_report_frame_ = frame + 60;
456 std::fprintf(stderr, "[rt] indirect clamp: frame %llu, observed %llu records clamped, %llu zeroed, %llu over list budget\n",
457 static_cast<unsigned long long>(frame), static_cast<unsigned long long>(counters_.records_clamped),
458 static_cast<unsigned long long>(counters_.zeroed), static_cast<unsigned long long>(counters_.over_budget));
459 }
460 }
461 slots.clear();
462}
463
464// A call clamped with no counter slot free: logged at the 1st, 2nd, 4th... such call.
465inline void IndirectArgumentClamp::note_uncounted() {
466 std::uint64_t total = 0;
467 {
468 std::lock_guard lock(mutex_);
469 total = ++counters_.uncounted_calls;
470 }
471 if (total & (total - 1)) return;
472 std::fprintf(stderr, "[rt] indirect clamp: %llu execute-indirect call(s) clamped without counters (no counter slot "
473 "free); the clamp still bounds them\n", static_cast<unsigned long long>(total));
474}
475
476// A call the pass leaves to the replay: logged at the 1st, 2nd, 4th... fallback.
477inline void IndirectArgumentClamp::fallback(const char* reason) {
478 std::uint64_t total = 0;
479 {
480 std::lock_guard lock(mutex_);
481 total = ++counters_.unclamped_calls;
482 }
483 if (total & (total - 1)) return;
484 std::fprintf(stderr, "[rt] indirect clamp: %llu execute-indirect call(s) not clamped (%s); the replay refuses the "
485 "indirect command\n", static_cast<unsigned long long>(total), reason);
486}
487
488inline bool IndirectArgumentClamp::prepare(VkBuffer arguments, VkDeviceSize argument_offset, VkBuffer count,
489 VkDeviceSize count_offset, std::uint32_t kind, std::uint32_t stride,
490 std::uint32_t max_count, Slot slot, ClampedIndirect& out) {
491 out = {};
492 const std::uint32_t record_size = indirect_clamp_record_size(kind);
493 if (kind > indirect_clamp_mesh || !arguments || !max_count || stride < record_size || stride % 4 ||
494 (argument_offset % 4) != 0 || (count && (count_offset % 4) != 0)) {
495 fallback("an argument stride or offset this pass does not handle");
496 return false;
497 }
498 const VkDeviceSize records_bytes = VkDeviceSize(max_count) * record_size;
499 // The clamped records start the slice (the indirect command reads them there), then the clamped count word and
500 // the pass's counters, each on a cache line of its own.
501 const VkDeviceSize count_scratch = (records_bytes + 63) / 64 * 64;
502 const VkDeviceSize stats_scratch = count_scratch + 64;
503 if (stats_scratch + 64 > indirect_clamp_max_scratch_bytes) {
504 fallback("an argument batch past the scratch cap");
505 return false;
506 }
507 VkBuffer buffer = VK_NULL_HANDLE;
508 VkDeviceSize offset = 0;
509 VkDeviceAddress address = 0;
510 if (!scratch_.get(stats_scratch + 64, buffer, offset, address)) {
511 fallback("no scratch");
512 return false;
513 }
514 const auto arguments_address = [&](VkBuffer b) {
515 VkBufferDeviceAddressInfo info{VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO};
516 info.buffer = b;
517 return fn<PFN_vkGetBufferDeviceAddress>("vkGetBufferDeviceAddress")(device_, &info);
518 };
519 if (!make_pipeline()) {
520 fallback("no compute pipeline");
521 return false;
522 }
523 const VkDeviceAddress arguments_va = arguments_address(arguments);
524 const VkDeviceAddress count_va = count ? arguments_address(count) : 0;
525 if (!arguments_va || (count && !count_va) || argument_offset > UINT64_MAX - arguments_va ||
526 (count && count_offset > UINT64_MAX - count_va)) {
527 fallback("an argument buffer without a device address");
528 return false;
529 }
530 out.kind = kind;
531 out.stride_words = stride / 4;
532 out.max_records = max_count;
533 out.records = max_count;
534 out.stride = record_size;
535 out.counted = count != VK_NULL_HANDLE;
536 out.buffer = buffer;
537 out.offset = offset; // the clamped records, compact
538 out.count_buffer = count ? buffer : VK_NULL_HANDLE;
539 out.count_offset = count ? offset + count_scratch : 0;
540 out.arguments = arguments_va + argument_offset;
541 out.count = count_va ? count_va + count_offset : 0;
542 out.records_out = address;
543 out.count_out = address + count_scratch;
544 out.stats = address + stats_scratch;
545 out.list_budget = out.stats + 4 * sizeof(std::uint32_t);
546 out.stats_scratch_offset = offset + stats_scratch;
547 out.stats_offset = slot.area == no_slot ? 0 : VkDeviceSize(slot.index) * HostArea::slot_bytes;
548 {
549 std::lock_guard lock(mutex_);
550 out.stats_buffer = slot.area == no_slot ? VK_NULL_HANDLE : areas_[slot.area].buffer; // no_slot: no copy-back
551 ++counters_.calls;
552 counters_.records += max_count;
553 }
554 return true;
555}
556
557inline void IndirectArgumentClamp::emit(VkCommandBuffer cb, const ClampedIndirect& job) {
558 const auto barrier = fn<PFN_vkCmdPipelineBarrier>("vkCmdPipelineBarrier");
559 const auto bind = fn<PFN_vkCmdBindPipeline>("vkCmdBindPipeline");
560 const auto push = fn<PFN_vkCmdPushConstants>("vkCmdPushConstants");
561 const auto dispatch = fn<PFN_vkCmdDispatch>("vkCmdDispatch");
562 // The counters start at zero: the budget's compare-and-swap and the record counts accumulate into them. A
563 // transfer write, ordered to the compute stage by the barrier below, like the arguments' own writes.
564 fn<PFN_vkCmdFillBuffer>("vkCmdFillBuffer")(cb, job.buffer, job.stats_scratch_offset, job.list_budget == job.stats + 16 ? 20 : 16, 0);
565 VkMemoryBarrier before{VK_STRUCTURE_TYPE_MEMORY_BARRIER};
566 before.srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT; // every earlier write: the compute that wrote these arguments
567 before.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
568 barrier(cb, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 1, &before, 0, nullptr, 0,
569 nullptr);
570 bind(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline_);
571 const VkDeviceSize dispatch_limit = VkDeviceSize(limits_.maxComputeWorkGroupCount[0]) * 64;
572 // Bound per-dispatch indexing to 32 bits, even when the D3D12 stride is very large.
573 const std::uint32_t index_limit = (UINT32_MAX - 4u) / std::max<std::uint32_t>(1u, job.stride_words);
574 const VkDeviceSize chunk_limit = std::max<VkDeviceSize>(1, std::min(dispatch_limit, VkDeviceSize(index_limit)));
575 const std::uint32_t tags = job.kind <= indirect_clamp_draw_indexed ? (job.kind == indirect_clamp_draw ? 4u : 5u)
576 : 3u;
577 for (VkDeviceSize first = 0; first < job.max_records;) {
578 const std::uint32_t records = std::uint32_t(std::min<VkDeviceSize>(chunk_limit, job.max_records - first));
579 // Use local word offsets within each chunk. Only the count comparison needs the global record index.
580 const detail::IndirectClampPush constants{job.arguments + first * job.stride_words * 4,
581 job.count,
582 job.records_out + first * tags * 4,
583 job.count_out,
584 job.stats,
585 job.list_budget,
586 job.kind,
587 job.stride_words,
588 records,
589 std::uint32_t(first),
590 job.max_records,
591 (job.kind == indirect_clamp_dispatch ? indirect_group_budget() << 1 : 0u) |
592 (job.counted ? 1u : 0u)};
593 push(cb, layout_, VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(constants), &constants);
594 dispatch(cb, (records - 1u) / 64u + 1u, 1, 1);
595 first += records;
596 }
597 if (job.stats_buffer) { // none for a call clamped without a counter slot
598 VkMemoryBarrier after_copy{VK_STRUCTURE_TYPE_MEMORY_BARRIER};
599 after_copy.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT;
600 after_copy.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
601 barrier(cb, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1, &after_copy, 0, nullptr,
602 0, nullptr);
603 VkBufferCopy copy{job.stats_scratch_offset, job.stats_offset, 4 * sizeof(std::uint32_t)};
604 fn<PFN_vkCmdCopyBuffer>("vkCmdCopyBuffer")(cb, job.buffer, job.stats_buffer, 1, &copy);
605 }
606 // The indirect command reads the records, and nothing else may read them while it does.
607 VkMemoryBarrier done{VK_STRUCTURE_TYPE_MEMORY_BARRIER};
608 done.srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT;
609 done.dstAccessMask = VK_ACCESS_INDIRECT_COMMAND_READ_BIT | VK_ACCESS_MEMORY_READ_BIT;
610 barrier(cb, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 0, 1, &done, 0, nullptr, 0,
611 nullptr);
612}
613} // namespace leonida
diff --git a/runtime/src/vulkan_indirect_dispatch_count.h b/runtime/src/vulkan_indirect_dispatch_count.h
index 510a4dcad..8e0f7d4aa 100644
--- a/runtime/src/vulkan_indirect_dispatch_count.h
+++ b/runtime/src/vulkan_indirect_dispatch_count.h
@@ -8,14 +8,33 @@
8#include <vulkan/vulkan.h> 8#include <vulkan/vulkan.h>
9#include <algorithm> 9#include <algorithm>
10#include <cstdint> 10#include <cstdint>
11#include <cstdlib>
12#include <charconv>
13#include <string_view>
11#include <limits> 14#include <limits>
12#include <memory> 15#include <memory>
13#include <vector> 16#include <vector>
14#include "indirect_dispatch_count_spv.h" 17#include "indirect_dispatch_count_spv.h"
18#include "vulkan_aftermath.h"
15#include "vulkan_memory.h" 19#include "vulkan_memory.h"
16 20
17namespace leonida { 21namespace leonida {
18 22
23// Vulkan guarantees at least 65535 groups along each axis. A total budget
24// at or below it bounds both the workload and every dimension.
25inline std::uint32_t indirect_group_budget() {
26 static const auto budget = []() -> std::uint32_t {
27 const char* value = std::getenv("LEONIDA_INDIRECT_GROUP_BUDGET");
28 if (!value) return 0;
29 const std::string_view text(value);
30 std::uint32_t groups{};
31 const auto end = value + text.size();
32 const auto parsed = std::from_chars(value, end, groups);
33 return parsed.ec == std::errc{} && parsed.ptr == end ? std::min(groups, 65535u) : 0;
34 }();
35 return budget;
36}
37
19struct CountedDispatch { 38struct CountedDispatch {
20 VkBuffer indirect = VK_NULL_HANDLE; 39 VkBuffer indirect = VK_NULL_HANDLE;
21 VkDeviceSize offset = 0; 40 VkDeviceSize offset = 0;
@@ -61,7 +80,7 @@ public:
61 CountedDispatch& out) { 80 CountedDispatch& out) {
62 out = {}; 81 out = {};
63 constexpr VkDeviceSize record_bytes = 3 * sizeof(std::uint32_t); 82 constexpr VkDeviceSize record_bytes = 3 * sizeof(std::uint32_t);
64 if (!arguments || !count || stride < record_bytes || stride % 4 || 83 if (!arguments || (!count && !indirect_group_budget()) || stride < record_bytes || stride % 4 ||
65 (argument_offset % 4) != 0 || (count_offset % 4) != 0 || !max_count || 84 (argument_offset % 4) != 0 || (count_offset % 4) != 0 || !max_count ||
66 !owner.limits_.maxComputeWorkGroupCount[0] || !owner.make_pipeline()) return false; 85 !owner.limits_.maxComputeWorkGroupCount[0] || !owner.make_pipeline()) return false;
67 if (VkDeviceSize(max_count) > std::numeric_limits<VkDeviceSize>::max() / record_bytes) 86 if (VkDeviceSize(max_count) > std::numeric_limits<VkDeviceSize>::max() / record_bytes)
@@ -100,10 +119,10 @@ public:
100 addr.buffer = arguments; 119 addr.buffer = arguments;
101 const VkDeviceAddress args_va = address(owner.device_, &addr); 120 const VkDeviceAddress args_va = address(owner.device_, &addr);
102 addr.buffer = count; 121 addr.buffer = count;
103 const VkDeviceAddress count_va = address(owner.device_, &addr); 122 const VkDeviceAddress count_va = count ? address(owner.device_, &addr) : 0;
104 addr.buffer = a.buffer; 123 addr.buffer = a.buffer;
105 const VkDeviceAddress output_va = address(owner.device_, &addr); 124 const VkDeviceAddress output_va = address(owner.device_, &addr);
106 if (!args_va || !count_va || !output_va || 125 if (!args_va || (count && !count_va) || !output_va ||
107 argument_offset > UINT64_MAX - args_va || count_offset > UINT64_MAX - count_va) 126 argument_offset > UINT64_MAX - args_va || count_offset > UINT64_MAX - count_va)
108 return false; 127 return false;
109 out = {a.buffer, 0, args_va + argument_offset, count_va + count_offset, 128 out = {a.buffer, 0, args_va + argument_offset, count_va + count_offset,
@@ -124,9 +143,9 @@ public:
124 fn<PFN_vkCmdBindPipeline>("vkCmdBindPipeline")(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline_); 143 fn<PFN_vkCmdBindPipeline>("vkCmdBindPipeline")(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline_);
125 struct Push { 144 struct Push {
126 VkDeviceAddress arguments, count, output; 145 VkDeviceAddress arguments, count, output;
127 std::uint32_t stride_words, first_record, records; 146 std::uint32_t stride_words, first_record, records, budget, has_count;
128 }; 147 };
129 static_assert(sizeof(Push) == 40); 148 static_assert(sizeof(Push) == 48);
130 const VkDeviceSize dispatch_limit = VkDeviceSize(limits_.maxComputeWorkGroupCount[0]) * 64; 149 const VkDeviceSize dispatch_limit = VkDeviceSize(limits_.maxComputeWorkGroupCount[0]) * 64;
131 // Bound per-dispatch indexing to 32 bits, even when the D3D12 stride is very large. 150 // Bound per-dispatch indexing to 32 bits, even when the D3D12 stride is very large.
132 // The shader loads and stores three consecutive dwords per record, so leave room for the final +2. 151 // The shader loads and stores three consecutive dwords per record, so leave room for the final +2.
@@ -136,7 +155,7 @@ public:
136 for (VkDeviceSize first = 0; first < job.max_count;) { 155 for (VkDeviceSize first = 0; first < job.max_count;) {
137 const std::uint32_t count = std::uint32_t(std::min<VkDeviceSize>(chunk_limit, job.max_count - first)); 156 const std::uint32_t count = std::uint32_t(std::min<VkDeviceSize>(chunk_limit, job.max_count - first));
138 const Push push{job.arguments + first * job.stride, job.count, job.output + first * 12, 157 const Push push{job.arguments + first * job.stride, job.count, job.output + first * 12,
139 job.stride / 4, std::uint32_t(first), count}; 158 job.stride / 4, std::uint32_t(first), count, indirect_group_budget(), job.count != 0};
140 fn<PFN_vkCmdPushConstants>("vkCmdPushConstants")(cb, layout_, VK_SHADER_STAGE_COMPUTE_BIT, 159 fn<PFN_vkCmdPushConstants>("vkCmdPushConstants")(cb, layout_, VK_SHADER_STAGE_COMPUTE_BIT,
141 0, sizeof(push), &push); 160 0, sizeof(push), &push);
142 fn<PFN_vkCmdDispatch>("vkCmdDispatch")(cb, (count - 1u) / 64u + 1u, 1, 1); 161 fn<PFN_vkCmdDispatch>("vkCmdDispatch")(cb, (count - 1u) / 64u + 1u, 1, 1);
@@ -166,8 +185,9 @@ private:
166 VkShaderModuleCreateInfo shader{VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO}; 185 VkShaderModuleCreateInfo shader{VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO};
167 shader.codeSize = sizeof(indirect_dispatch_count_spirv); 186 shader.codeSize = sizeof(indirect_dispatch_count_spirv);
168 shader.pCode = indirect_dispatch_count_spirv; 187 shader.pCode = indirect_dispatch_count_spirv;
188 const aftermath::ShaderName aftermath_name("(runtime) indirect_dispatch_count");
169 bool ok = fn<PFN_vkCreateShaderModule>("vkCreateShaderModule")(device_, &shader, nullptr, &module) == VK_SUCCESS; 189 bool ok = fn<PFN_vkCreateShaderModule>("vkCreateShaderModule")(device_, &shader, nullptr, &module) == VK_SUCCESS;
170 const VkPushConstantRange range{VK_SHADER_STAGE_COMPUTE_BIT, 0, 40}; 190 const VkPushConstantRange range{VK_SHADER_STAGE_COMPUTE_BIT, 0, 48};
171 VkPipelineLayoutCreateInfo layout_info{VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO}; 191 VkPipelineLayoutCreateInfo layout_info{VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO};
172 layout_info.pushConstantRangeCount = 1; 192 layout_info.pushConstantRangeCount = 1;
173 layout_info.pPushConstantRanges = &range; 193 layout_info.pPushConstantRanges = &range;
diff --git a/runtime/src/vulkan_memory.h b/runtime/src/vulkan_memory.h
index 08c764d33..a818ce205 100644
--- a/runtime/src/vulkan_memory.h
+++ b/runtime/src/vulkan_memory.h
@@ -56,6 +56,12 @@ inline std::vector<std::uint32_t> memory_type_order(const VkPhysicalDeviceMemory
56 return order; 56 return order;
57} 57}
58 58
59// The size of the blocks that textures share (image_memory.h): 64 MiB, or a sixteenth of a small heap, such as the BAR
60// window of a GPU without Resizable BAR. A texture larger than an eighth of a block has its own allocation.
61inline VkDeviceSize image_block_bytes(VkDeviceSize heap) {
62 return std::min<VkDeviceSize>(VkDeviceSize(64) << 20, heap / 16) & ~VkDeviceSize(0xffff);
63}
64
59// D3D-299: true when an allocation that preferred DEVICE_LOCAL without needing host access (a texture, a default-heap 65// D3D-299: true when an allocation that preferred DEVICE_LOCAL without needing host access (a texture, a default-heap
60// buffer outside the arena) got a type without it, so the GPU now reads it from system memory. A host-visible 66// buffer outside the arena) got a type without it, so the GPU now reads it from system memory. A host-visible
61// allocation (the arena, an upload heap) in system memory is the memory type policy without Resizable BAR, not this. 67// allocation (the arena, an upload heap) in system memory is the memory type policy without Resizable BAR, not this.
diff --git a/runtime/src/vulkan_predicate.h b/runtime/src/vulkan_predicate.h
index cedb8af81..87d58b546 100644
--- a/runtime/src/vulkan_predicate.h
+++ b/runtime/src/vulkan_predicate.h
@@ -8,6 +8,7 @@
8#include <memory> 8#include <memory>
9#include <initializer_list> 9#include <initializer_list>
10#include "predicate_reduce_spv.h" 10#include "predicate_reduce_spv.h"
11#include "vulkan_aftermath.h"
11 12
12namespace leonida { 13namespace leonida {
13struct PredicateCapture { 14struct PredicateCapture {
@@ -156,6 +157,7 @@ private:
156 ok = ok && fn<PFN_vkCreatePipelineLayout>("vkCreatePipelineLayout")(device_, &layout_info, nullptr, &layout) == VK_SUCCESS; 157 ok = ok && fn<PFN_vkCreatePipelineLayout>("vkCreatePipelineLayout")(device_, &layout_info, nullptr, &layout) == VK_SUCCESS;
157 VkShaderModuleCreateInfo module{VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO}; 158 VkShaderModuleCreateInfo module{VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO};
158 module.codeSize = sizeof(predicate_reduce_spirv); module.pCode = predicate_reduce_spirv; 159 module.codeSize = sizeof(predicate_reduce_spirv); module.pCode = predicate_reduce_spirv;
160 const aftermath::ShaderName aftermath_name("(runtime) predicate_reduce");
159 ok = ok && fn<PFN_vkCreateShaderModule>("vkCreateShaderModule")(device_, &module, nullptr, &shader) == VK_SUCCESS; 161 ok = ok && fn<PFN_vkCreateShaderModule>("vkCreateShaderModule")(device_, &module, nullptr, &shader) == VK_SUCCESS;
160 VkComputePipelineCreateInfo info{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO}; 162 VkComputePipelineCreateInfo info{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO};
161 info.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO}; 163 info.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO};
diff --git a/runtime/src/vulkan_predicated_copy.h b/runtime/src/vulkan_predicated_copy.h
index 6a225ced7..1da4f8f6a 100644
--- a/runtime/src/vulkan_predicated_copy.h
+++ b/runtime/src/vulkan_predicated_copy.h
@@ -10,6 +10,7 @@
10#include <initializer_list> 10#include <initializer_list>
11#include <vector> 11#include <vector>
12#include "predicated_copy_spv.h" 12#include "predicated_copy_spv.h"
13#include "vulkan_aftermath.h"
13namespace leonida { 14namespace leonida {
14struct PredicatedCopyDispatch { 15struct PredicatedCopyDispatch {
15 VkDescriptorSet set = VK_NULL_HANDLE; 16 VkDescriptorSet set = VK_NULL_HANDLE;
@@ -128,6 +129,7 @@ private:
128 ok = ok && fn<PFN_vkCreatePipelineLayout>("vkCreatePipelineLayout")(device_, &layout_info, nullptr, &layout) == VK_SUCCESS; 129 ok = ok && fn<PFN_vkCreatePipelineLayout>("vkCreatePipelineLayout")(device_, &layout_info, nullptr, &layout) == VK_SUCCESS;
129 VkShaderModuleCreateInfo module{VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO}; 130 VkShaderModuleCreateInfo module{VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO};
130 module.codeSize = sizeof(predicated_copy_spirv); module.pCode = predicated_copy_spirv; 131 module.codeSize = sizeof(predicated_copy_spirv); module.pCode = predicated_copy_spirv;
132 const aftermath::ShaderName aftermath_name("(runtime) predicated_copy");
131 ok = ok && fn<PFN_vkCreateShaderModule>("vkCreateShaderModule")(device_, &module, nullptr, &shader) == VK_SUCCESS; 133 ok = ok && fn<PFN_vkCreateShaderModule>("vkCreateShaderModule")(device_, &module, nullptr, &shader) == VK_SUCCESS;
132 VkComputePipelineCreateInfo info{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO}; 134 VkComputePipelineCreateInfo info{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO};
133 info.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO}; 135 info.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO};
diff --git a/runtime/src/vulkan_present.h b/runtime/src/vulkan_present.h
index 97c365b5f..d494233d3 100644
--- a/runtime/src/vulkan_present.h
+++ b/runtime/src/vulkan_present.h
@@ -27,6 +27,9 @@
27 27
28#include "vulkan_backend.h" 28#include "vulkan_backend.h"
29#include "vulkan_present_compose.h" 29#include "vulkan_present_compose.h"
30#include "fsdraw_probe.h" // LOCAL DIAGNOSTIC
31#include "local_diagnostics.h"
32#include "present_dump.h"
30 33
31// Use the original EXT spellings. They are aliases of the promoted KHR types and are available in older headers. 34// Use the original EXT spellings. They are aliases of the promoted KHR types and are available in older headers.
32#if defined(VK_EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME) && defined(VK_EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME) 35#if defined(VK_EXT_SWAPCHAIN_MAINTENANCE_1_EXTENSION_NAME) && defined(VK_EXT_SURFACE_MAINTENANCE_1_EXTENSION_NAME)
@@ -185,6 +188,11 @@ public:
185 if (const char* limit = std::getenv("LEONIDA_CAPTURE_LIMIT")) capture_limit_ = std::max(1, std::atoi(limit)); 188 if (const char* limit = std::getenv("LEONIDA_CAPTURE_LIMIT")) capture_limit_ = std::max(1, std::atoi(limit));
186 std::fprintf(stderr, "[rt] present: capture on: every %d presented frame(s), at most %d, into %s\n", 189 std::fprintf(stderr, "[rt] present: capture on: every %d presented frame(s), at most %d, into %s\n",
187 capture_every_, capture_limit_, capture_dir_.c_str()); 190 capture_every_, capture_limit_, capture_dir_.c_str());
191 // LOCAL DIAGNOSTIC: LEONIDA_CAPTURE_SOURCE=1 also reads back the presented source texture itself.
192 if (const char* source = std::getenv("LEONIDA_CAPTURE_SOURCE"); source && *source && *source != '0') {
193 probe_source_ = true;
194 std::fprintf(stderr, "[rt] present-probe: source capture on\n");
195 }
188 } 196 }
189 ok_ = recreate(true, false); 197 ok_ = recreate(true, false);
190 if (!ok_ && capture_to_disk_) { 198 if (!ok_ && capture_to_disk_) {
@@ -204,7 +212,7 @@ public:
204 const VkDevice device = context_.device(); 212 const VkDevice device = context_.device();
205 { 213 {
206 std::lock_guard lock(context_.submit_mutex()); 214 std::lock_guard lock(context_.submit_mutex());
207 vk.vkQueueWaitIdle(queue_); 215 context_.observe_result(vk.vkQueueWaitIdle(queue_), "vkQueueWaitIdle (present)");
208 // A WSI layer may perform a device-wide idle while destroying the swapchain. 216 // A WSI layer may perform a device-wide idle while destroying the swapchain.
209 // Keep that implicit idle serialized with submits from every context queue. 217 // Keep that implicit idle serialized with submits from every context queue.
210 release(swapchain_); 218 release(swapchain_);
@@ -219,6 +227,7 @@ public:
219 if (frame.done) vkDestroyFence_(device, frame.done, nullptr); 227 if (frame.done) vkDestroyFence_(device, frame.done, nullptr);
220 if (frame.acquired) vk.vkDestroySemaphore(device, frame.acquired, nullptr); 228 if (frame.acquired) vk.vkDestroySemaphore(device, frame.acquired, nullptr);
221 } 229 }
230 if (probe_fence_) vkDestroyFence_(device, probe_fence_, nullptr); // LOCAL DIAGNOSTIC
222 if (pool_) vk.vkDestroyCommandPool(device, pool_, nullptr); 231 if (pool_) vk.vkDestroyCommandPool(device, pool_, nullptr);
223 if (surface_ && vkDestroySurfaceKHR_) vkDestroySurfaceKHR_(instance_, surface_, nullptr); 232 if (surface_ && vkDestroySurfaceKHR_) vkDestroySurfaceKHR_(instance_, surface_, nullptr);
224 } 233 }
@@ -340,6 +349,7 @@ public:
340 bool enable_capture() { 349 bool enable_capture() {
341 std::lock_guard lock(present_mutex_); 350 std::lock_guard lock(present_mutex_);
342 if (!ok_) return false; 351 if (!ok_) return false;
352 splash_capture_only_ = false;
343 capture_ = true; 353 capture_ = true;
344 stale_ = true; 354 stale_ = true;
345 if (!recreate(vsync_, swapchain_srgb_, swapchain_hdr_req_) || (swapchain_ && !capture_buffer_)) { 355 if (!recreate(vsync_, swapchain_srgb_, swapchain_hdr_req_) || (swapchain_ && !capture_buffer_)) {
@@ -349,6 +359,9 @@ public:
349 return true; 359 return true;
350 } 360 }
351 361
362 // Present the shell image immediately. Keep it on screen until the window has a non-black title frame.
363 bool present_splash(ResourceId source, std::shared_ptr<void> owner);
364
352 // The last presented frame as the swapchain stores it (4 bytes a texel, rows tightly packed, format() order). 365 // The last presented frame as the swapchain stores it (4 bytes a texel, rows tightly packed, format() order).
353 // Waits for the frame to finish. False when nothing was presented since enable_capture(), after a present 366 // Waits for the frame to finish. False when nothing was presented since enable_capture(), after a present
354 // that was skipped because the window is minimised (it returned VK_SUCCESS but showed nothing), until the next 367 // that was skipped because the window is minimised (it returned VK_SUCCESS but showed nothing), until the next
@@ -357,7 +370,8 @@ public:
357 std::lock_guard lock(present_mutex_); 370 std::lock_guard lock(present_mutex_);
358 if (!capture_ || !capture_ptr_ || !captured_) return false; 371 if (!capture_ || !capture_ptr_ || !captured_) return false;
359 const Frame& frame = frames_[(frame_index_ + frames_.size() - 1) % frames_.size()]; 372 const Frame& frame = frames_[(frame_index_ + frames_.size() - 1) % frames_.size()];
360 if (vkWaitForFences_(context_.device(), 1, &frame.done, VK_TRUE, UINT64_MAX) != VK_SUCCESS) 373 if (context_.observe_result(vkWaitForFences_(context_.device(), 1, &frame.done, VK_TRUE, UINT64_MAX),
374 "vkWaitForFences (present readback)") != VK_SUCCESS)
361 return false; 375 return false;
362 pixels.assign(capture_ptr_, capture_ptr_ + std::size_t(captured_extent_.width) * captured_extent_.height * 4); 376 pixels.assign(capture_ptr_, capture_ptr_ + std::size_t(captured_extent_.width) * captured_extent_.height * 4);
363 if (extent) *extent = captured_extent_; 377 if (extent) *extent = captured_extent_;
@@ -393,6 +407,9 @@ public:
393 if (source_rect) pending.rect = *source_rect; 407 if (source_rect) pending.rect = *source_rect;
394 if (planes) pending.planes = *planes; 408 if (planes) pending.planes = *planes;
395 deferred_.push_back(pending); 409 deferred_.push_back(pending);
410 if (const std::uint64_t n = ++probe_deferred_; local_diagnostics() && (n <= 8 || n % 600 == 0))
411 std::fprintf(stderr, "[rt] present-probe: present #%llu queued behind held work (%zu queued)\n",
412 static_cast<unsigned long long>(n), deferred_.size());
396 last_tore_ = false; 413 last_tore_ = false;
397 context_.holds().after_held(this, [this] { run_deferred(); }); 414 context_.holds().after_held(this, [this] { run_deferred(); });
398 return VK_SUCCESS; 415 return VK_SUCCESS;
@@ -455,6 +472,7 @@ private:
455 VkResult submit_now(const ResourceBinding* binding, ResourceId source, bool vsync, const PresentRect* source_rect, 472 VkResult submit_now(const ResourceBinding* binding, ResourceId source, bool vsync, const PresentRect* source_rect,
456 bool srgb, bool tear = false, const PresentPlanes* planes = nullptr) { 473 bool srgb, bool tear = false, const PresentPlanes* planes = nullptr) {
457 last_tore_ = false; 474 last_tore_ = false;
475 probe_path(binding, source, planes); // LOCAL DIAGNOSTIC
458 if (!ok_) return VK_ERROR_INITIALIZATION_FAILED; 476 if (!ok_) return VK_ERROR_INITIALIZATION_FAILED;
459 if (surface_lost_) { // the window's display went away under a presented swapchain 477 if (surface_lost_) { // the window's display went away under a presented swapchain
460 // Try to make a new surface for the same window (the hwnd is retained by the factory's callback). 478 // Try to make a new surface for the same window (the hwnd is retained by the factory's callback).
@@ -478,7 +496,7 @@ private:
478 if (vsync != vsync_ || stale_ || srgb != swapchain_srgb_ || want_hdr != swapchain_hdr_req_) { 496 if (vsync != vsync_ || stale_ || srgb != swapchain_srgb_ || want_hdr != swapchain_hdr_req_) {
479 // The swapchain's colour encoding is only recorded once the new swapchain exists, so a failed 497 // The swapchain's colour encoding is only recorded once the new swapchain exists, so a failed
480 // recreate is tried again at the next present. 498 // recreate is tried again at the next present.
481 if (!recreate(vsync, srgb, want_hdr)) return VK_ERROR_OUT_OF_DATE_KHR; 499 if (!recreate_for_present(vsync, srgb, want_hdr)) return VK_ERROR_OUT_OF_DATE_KHR;
482 } 500 }
483 if (!swapchain_) { // minimised: try again next frame 501 if (!swapchain_) { // minimised: try again next frame
484 stale_ = true; 502 stale_ = true;
@@ -492,7 +510,9 @@ private:
492 auto& vk = context_.vk; 510 auto& vk = context_.vk;
493 const VkDevice device = context_.device(); 511 const VkDevice device = context_.device();
494 Frame& frame = frames_[frame_index_ % frames_.size()]; 512 Frame& frame = frames_[frame_index_ % frames_.size()];
495 if (const VkResult waited = vkWaitForFences_(device, 1, &frame.done, VK_TRUE, UINT64_MAX); waited != VK_SUCCESS) 513 if (const VkResult waited = context_.observe_result(
514 vkWaitForFences_(device, 1, &frame.done, VK_TRUE, UINT64_MAX), "vkWaitForFences (present)");
515 waited != VK_SUCCESS)
496 return stop(waited); 516 return stop(waited);
497 // Every submit copies into the same mapped buffer, even if its frame is outside the disk capture stride. 517 // Every submit copies into the same mapped buffer, even if its frame is outside the disk capture stride.
498 if (const VkResult r = finish_pending_capture(); r != VK_SUCCESS) return stop(r); 518 if (const VkResult r = finish_pending_capture(); r != VK_SUCCESS) return stop(r);
@@ -500,7 +520,7 @@ private:
500 std::uint32_t image = 0; 520 std::uint32_t image = 0;
501 VkResult acquired = acquire(frame.acquired, &image); 521 VkResult acquired = acquire(frame.acquired, &image);
502 if (acquired == VK_ERROR_OUT_OF_DATE_KHR) { 522 if (acquired == VK_ERROR_OUT_OF_DATE_KHR) {
503 if (!recreate(vsync, swapchain_srgb_, swapchain_hdr_req_)) return acquired; 523 if (!recreate_for_present(vsync, swapchain_srgb_, swapchain_hdr_req_)) return acquired;
504 if (!swapchain_) { // minimised since the last present: skipped, as above 524 if (!swapchain_) { // minimised since the last present: skipped, as above
505 captured_ = false; 525 captured_ = false;
506 return VK_SUCCESS; 526 return VK_SUCCESS;
@@ -571,7 +591,8 @@ private:
571 plane_rollbacks[i].layout); 591 plane_rollbacks[i].layout);
572 }; 592 };
573 if (!recorded) return give_back(frame, VK_ERROR_UNKNOWN); // released by another thread since presentable() 593 if (!recorded) return give_back(frame, VK_ERROR_UNKNOWN); // released by another thread since presentable()
574 if (const VkResult reset = vkResetFences_(device, 1, &frame.done); reset != VK_SUCCESS) { 594 if (const VkResult reset = context_.observe_result(vkResetFences_(device, 1, &frame.done),
595 "vkResetFences (present)"); reset != VK_SUCCESS) {
575 rollback(); 596 rollback();
576 return stop(reset); 597 return stop(reset);
577 } 598 }
@@ -603,22 +624,51 @@ private:
603 const bool tearing = false; 624 const bool tearing = false;
604 (void)tear; 625 (void)tear;
605#endif 626#endif
627 const bool inspect = splash_owner_ && capture_ptr_;
628 bool show_title = false;
629 if (inspect) {
630 submit_info.signalSemaphoreCount = 0; // signal ready only after choosing the image the window will show
631 if (!tracker_lock.owns_lock()) tracker_lock.lock();
632 }
606 VkResult submitted, result = VK_SUCCESS; 633 VkResult submitted, result = VK_SUCCESS;
607 { 634 {
608 std::lock_guard lock(context_.submit_mutex()); 635 std::lock_guard lock(context_.submit_mutex());
609 submitted = vk.vkQueueSubmit(queue_, 1, &submit_info, frame.done); 636 submitted = context_.observe_result(vk.vkQueueSubmit(queue_, 1, &submit_info, frame.done),
637 "vkQueueSubmit (present)");
638 if (submitted == VK_SUCCESS) context_.note_image_work_locked();
610 if (submitted != VK_SUCCESS) rollback(); 639 if (submitted != VK_SUCCESS) rollback();
611 // Commit/rollback happened before releasing tracker_mutex_ inside submit_mutex(), preserving submission 640 if (submitted == VK_SUCCESS && inspect) {
612 // order without holding tracker_mutex_ across vkQueuePresentKHR. 641 result = finish_startup_frame(frame, image, show_title);
642 if (result != VK_SUCCESS) return stop(result);
643 }
613 if (tracker_lock.owns_lock()) tracker_lock.unlock(); 644 if (tracker_lock.owns_lock()) tracker_lock.unlock();
614 if (submitted == VK_SUCCESS) result = vkQueuePresentKHR_(queue_, &present); 645 if (submitted == VK_SUCCESS)
646 result = context_.observe_result(vkQueuePresentKHR_(queue_, &present), "vkQueuePresentKHR");
647 }
648 if (show_title && (result == VK_SUCCESS || result == VK_SUBOPTIMAL_KHR)) {
649 splash_owner_.reset();
650 if (splash_capture_only_) {
651 splash_capture_only_ = false;
652 capture_ = false;
653 release_capture();
654 }
615 } 655 }
616 if (submitted != VK_SUCCESS) return give_back(frame, submitted); 656 if (submitted != VK_SUCCESS) return give_back(frame, submitted);
617 ++frame_index_; 657 ++frame_index_;
618 // Only a present the engine took counts (SUBOPTIMAL is shown too). OUT_OF_DATE was not shown: the swapchain 658 // Only a present the engine took counts (SUBOPTIMAL is shown too). OUT_OF_DATE was not shown: the swapchain
619 // is recreated next time, and the caller sees VK_SUCCESS, since its work was submitted. 659 // is recreated next time, and the caller sees VK_SUCCESS, since its work was submitted.
620 if (result == VK_SUCCESS || result == VK_SUBOPTIMAL_KHR) { 660 if (result == VK_SUCCESS || result == VK_SUBOPTIMAL_KHR) {
621 ++presented_; 661 const auto shown = ++presented_;
662 submit_phases::totals().presents.fetch_add(1, std::memory_order_relaxed); // frames a second, phase line
663 submit_phases::totals().present_serial.fetch_add(1, std::memory_order_relaxed);
664 if (dump_.due(shown - 1)) {
665 // Presentation is already queued and the queue/tracker locks are released. A sampled frame
666 // may stall here for its transfer fence and a private CPU copy. PNG and disk I/O run on a worker.
667 if (vkWaitForFences_(device, 1, &frame.done, VK_TRUE, UINT64_MAX) == VK_SUCCESS)
668 dump_.save(shown, extent_, format_, dump_pq_, capture_ptr_, size_t(capture_size_));
669 else
670 dump_.disable("present dump fence wait failed");
671 }
622 if (planes) ++composed_; 672 if (planes) ++composed_;
623 if (tearing) { 673 if (tearing) {
624 last_tore_ = true; 674 last_tore_ = true;
@@ -648,6 +698,310 @@ private:
648 } 698 }
649 699
650private: 700private:
701 // ---- LOCAL DIAGNOSTIC (not for upstream): which path each present takes, and the source texture's contents ----
702 bool probe_source_ = false;
703 std::uint64_t probe_calls_ = 0, probe_blit_ = 0, probe_compose_ = 0, probe_blank_ = 0, probe_unresolved_ = 0;
704 std::atomic<std::uint64_t> probe_deferred_{0};
705 int probe_written_ = 0;
706 VkCommandBuffer probe_commands_ = VK_NULL_HANDLE;
707 VkFence probe_fence_ = VK_NULL_HANDLE;
708
709 static float probe_half(std::uint16_t h) {
710 const std::uint32_t sign = (h >> 15) & 1, exponent = (h >> 10) & 0x1f, mantissa = h & 0x3ff;
711 float v;
712 if (exponent == 0) v = std::ldexp(float(mantissa), -24);
713 else if (exponent == 31) v = mantissa ? 0.0f : 65504.0f; // NaN reads as 0, inf as the largest half
714 else v = std::ldexp(float(mantissa | 0x400), int(exponent) - 25);
715 return sign ? -v : v;
716 }
717 static float probe_uf11(std::uint32_t bits, int mantissa_bits) { // B10G11R11 channels (5-bit exponent)
718 const std::uint32_t exponent = (bits >> mantissa_bits) & 0x1f, mantissa = bits & ((1u << mantissa_bits) - 1);
719 if (exponent == 0) return std::ldexp(float(mantissa), -14 - mantissa_bits);
720 if (exponent == 31) return 65504.0f;
721 return std::ldexp(float(mantissa | (1u << mantissa_bits)), int(exponent) - 15 - mantissa_bits);
722 }
723 // RGB in 0..1 (float formats unclamped) of one texel; false for a format this probe does not decode.
724 static bool probe_decode(VkFormat format, const std::uint8_t* t, float rgb[3]) {
725 switch (format) {
726 case VK_FORMAT_B8G8R8A8_UNORM: case VK_FORMAT_B8G8R8A8_SRGB:
727 rgb[0] = t[2] / 255.0f; rgb[1] = t[1] / 255.0f; rgb[2] = t[0] / 255.0f; return true;
728 case VK_FORMAT_R8G8B8A8_UNORM: case VK_FORMAT_R8G8B8A8_SRGB:
729 rgb[0] = t[0] / 255.0f; rgb[1] = t[1] / 255.0f; rgb[2] = t[2] / 255.0f; return true;
730 case VK_FORMAT_A2B10G10R10_UNORM_PACK32: case VK_FORMAT_A2R10G10B10_UNORM_PACK32: {
731 std::uint32_t w; std::memcpy(&w, t, 4);
732 const float lo = (w & 0x3ff) / 1023.0f, mid = ((w >> 10) & 0x3ff) / 1023.0f, hi = ((w >> 20) & 0x3ff) / 1023.0f;
733 const bool bgra = format == VK_FORMAT_A2R10G10B10_UNORM_PACK32;
734 rgb[0] = bgra ? hi : lo; rgb[1] = mid; rgb[2] = bgra ? lo : hi; return true;
735 }
736 case VK_FORMAT_R16G16B16A16_SFLOAT: {
737 std::uint16_t h[3]; std::memcpy(h, t, 6);
738 for (int i = 0; i < 3; ++i) rgb[i] = probe_half(h[i]);
739 return true;
740 }
741 case VK_FORMAT_R16G16B16A16_UNORM: {
742 std::uint16_t h[3]; std::memcpy(h, t, 6);
743 for (int i = 0; i < 3; ++i) rgb[i] = h[i] / 65535.0f;
744 return true;
745 }
746 case VK_FORMAT_B10G11R11_UFLOAT_PACK32: {
747 std::uint32_t w; std::memcpy(&w, t, 4);
748 rgb[0] = probe_uf11(w & 0x7ff, 6); rgb[1] = probe_uf11((w >> 11) & 0x7ff, 6); rgb[2] = probe_uf11(w >> 22, 5);
749 return true;
750 }
751 case VK_FORMAT_R32G32B32A32_SFLOAT:
752 std::memcpy(rgb, t, 12); return true;
753 default:
754 return false;
755 }
756 }
757
758 // Called at the top of submit_now(), so after any held work it was queued behind.
759 void probe_path(const ResourceBinding* binding, ResourceId source, const PresentPlanes* planes) {
760 const std::uint64_t n = ++probe_calls_;
761 const char* path = planes ? "present_planes(compose)" : binding ? "present(blit)" : "present_blank";
762 (planes ? probe_compose_ : binding ? probe_blit_ : probe_blank_)++;
763 const ResourceId id = planes ? planes->plane[0].source : binding ? source : ResourceId{};
764 ResourceBinding found{};
765 bool resolved = false;
766 if (id) {
767 std::shared_lock lock(context_.resource_mutex_);
768 if (const ResourceBinding* b = context_.resolve(id)) {
769 found = *b;
770 resolved = true;
771 }
772 }
773 if (id && !resolved) ++probe_unresolved_;
774 if (local_diagnostics() && (n <= 6 || n % 600 == 0))
775 std::fprintf(stderr,
776 "[rt] present-probe: submit #%llu path %s source 0x%llx resolved %d image %p format %d %ux%u "
777 "mips %u layers %u samples %u sampled %d (blit %llu compose %llu blank %llu unresolved %llu)\n",
778 static_cast<unsigned long long>(n), path, static_cast<unsigned long long>(id), int(resolved),
779 reinterpret_cast<void*>(found.image), int(found.format), found.width, found.height,
780 found.mip_levels, found.array_layers, found.samples, int(found.sampled),
781 static_cast<unsigned long long>(probe_blit_), static_cast<unsigned long long>(probe_compose_),
782 static_cast<unsigned long long>(probe_blank_), static_cast<unsigned long long>(probe_unresolved_));
783 // The same frames the swapchain capture takes: the one presented_ becomes when this present is shown.
784 if (probe_source_ && resolved && found.image && probe_written_ < capture_limit_ &&
785 presented_ % std::uint64_t(capture_every_) == 0)
786 {
787 probe_read_source(id, presented_ + 1, path);
788 // LOCAL DIAGNOSTIC (fsdraw): the render targets of the frame's fullscreen draws, read back with it.
789 for (const std::uint64_t target : fsdraw::targets())
790 if (target != id) probe_read_source(target, presented_ + 1, "fullscreen-draw target", "target");
791 }
792 }
793
794 // Copies mip 0, layer 0 of `id` to host memory on the presenter's queue (waited for), logs and writes it.
795 void probe_read_source(ResourceId id, std::uint64_t number, const char* path, const char* prefix = "source") {
796 const bool is_source = std::strcmp(prefix, "source") == 0;
797 auto& vk = context_.vk;
798 const VkDevice device = context_.device();
799 const ReplayFunctions& fn = context_.replay_;
800 if (!probe_commands_) {
801 VkCommandBufferAllocateInfo allocate{VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO};
802 allocate.commandPool = pool_;
803 allocate.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
804 allocate.commandBufferCount = 1;
805 VkFenceCreateInfo fence{VK_STRUCTURE_TYPE_FENCE_CREATE_INFO};
806 if (vk.vkAllocateCommandBuffers(device, &allocate, &probe_commands_) != VK_SUCCESS ||
807 vkCreateFence_(device, &fence, nullptr, &probe_fence_) != VK_SUCCESS) {
808 std::fprintf(stderr, "[rt] present-probe: cannot make the readback command buffer\n");
809 probe_source_ = false;
810 return;
811 }
812 }
813 std::shared_lock resource_lock(context_.resource_mutex_);
814 const ResourceBinding* found = context_.resolve(id);
815 if (!found || !found->image) return;
816 const ResourceBinding binding = *found;
817 const BlockFormat bf = block_format(binding.format, VK_IMAGE_ASPECT_COLOR_BIT);
818 // Held only while the copy is recorded (fsdraw: holding them through the wait, the slow host reads and the
819 // file write stalled every resource creation and the boot ran out of memory).
820 std::unique_lock tracker_lock(context_.tracker_mutex_);
821 const bool tracked = context_.tracker_.tracked(id);
822 const VkImageSubresourceRange range{VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1};
823 const VkImageLayout common = image_layout(binding, VK_IMAGE_LAYOUT_GENERAL);
824 LayoutPieces pieces = detail::current(&context_.tracker_, id, range, common);
825 const VkImageLayout layout = pieces.empty() ? VK_IMAGE_LAYOUT_UNDEFINED : pieces[0].layout;
826 std::fprintf(stderr,
827 "[rt] present-probe: %s frame %llu via %s: id 0x%llx format %d %ux%u mips %u layers %u samples %u "
828 "texel bytes %u tracked %d layout %d\n",
829 prefix, static_cast<unsigned long long>(number), path, static_cast<unsigned long long>(id),
830 int(binding.format), binding.width, binding.height, binding.mip_levels, binding.array_layers,
831 binding.samples, bf.bytes, int(tracked), int(layout));
832 if (layout == VK_IMAGE_LAYOUT_UNDEFINED) {
833 std::fprintf(stderr, "[rt] present-probe: %s frame %llu is UNDEFINED in the tracker: no tracked GPU "
834 "operation ever wrote it (the present zero-fills it)\n",
835 prefix, static_cast<unsigned long long>(number));
836 if (is_source) ++probe_written_;
837 return;
838 }
839 if (binding.samples > 1 || bf.block != 1 || !bf.bytes) {
840 std::fprintf(stderr, "[rt] present-probe: %s format %d not read back\n", prefix, int(binding.format));
841 return;
842 }
843 const VkDeviceSize size = VkDeviceSize(binding.width) * binding.height * bf.bytes;
844 VkBuffer buffer = VK_NULL_HANDLE;
845 VkDeviceMemory memory = VK_NULL_HANDLE;
846 void* mapped = nullptr;
847 VkBufferCreateInfo info{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO};
848 info.size = size;
849 info.usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT;
850 if (vk.vkCreateBuffer(device, &info, nullptr, &buffer) != VK_SUCCESS) return;
851 VkMemoryRequirements requirements{};
852 vk.vkGetBufferMemoryRequirements(device, buffer, &requirements);
853 VkPhysicalDeviceMemoryProperties props{};
854 vkGetPhysicalDeviceMemoryProperties_(physical_, &props);
855 constexpr VkMemoryPropertyFlags wanted = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
856 std::uint32_t type = UINT32_MAX;
857 // Host-cached system memory first (fsdraw): a resizable-BAR type is uncached for host reads.
858 for (int pass = 0; pass < 2 && type == UINT32_MAX; ++pass)
859 for (std::uint32_t i = 0; i < props.memoryTypeCount; ++i) {
860 const VkMemoryPropertyFlags f = props.memoryTypes[i].propertyFlags;
861 const bool cached = (f & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) && !(f & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
862 if ((requirements.memoryTypeBits & (1u << i)) && (f & wanted) == wanted && (pass || cached)) {
863 type = i;
864 break;
865 }
866 }
867 VkMemoryAllocateInfo allocate{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO};
868 allocate.allocationSize = requirements.size;
869 allocate.memoryTypeIndex = type;
870 const auto cleanup = [&] {
871 if (memory) vk.vkFreeMemory(device, memory, nullptr);
872 if (buffer) vk.vkDestroyBuffer(device, buffer, nullptr);
873 };
874 if (type == UINT32_MAX || vk.vkAllocateMemory(device, &allocate, nullptr, &memory) != VK_SUCCESS ||
875 vk.vkBindBufferMemory(device, buffer, memory, 0) != VK_SUCCESS ||
876 vk.vkMapMemory(device, memory, 0, VK_WHOLE_SIZE, 0, &mapped) != VK_SUCCESS) {
877 cleanup();
878 return;
879 }
880 VkCommandBuffer commands = probe_commands_;
881 vk.vkResetCommandBuffer(commands, 0);
882 VkCommandBufferBeginInfo begin{VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO};
883 begin.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
884 vk.vkBeginCommandBuffer(commands, &begin);
885 constexpr VkAccessFlags any = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT;
886 for (const auto& piece : pieces)
887 detail::image_barrier(fn, commands, binding, piece.range, piece.layout, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
888 any, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, VK_ACCESS_TRANSFER_READ_BIT,
889 VK_PIPELINE_STAGE_TRANSFER_BIT);
890 VkBufferImageCopy copy{};
891 copy.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 0, 1};
892 copy.imageExtent = {binding.width, binding.height, 1};
893 fn.copy_image_to_buffer(commands, binding.image, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, buffer, 1, &copy);
894 for (const auto& piece : pieces)
895 detail::image_barrier(fn, commands, binding, piece.range, VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, piece.layout,
896 VK_ACCESS_TRANSFER_READ_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, any,
897 VK_PIPELINE_STAGE_ALL_COMMANDS_BIT);
898 VkBufferMemoryBarrier to_host{VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER};
899 to_host.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
900 to_host.dstAccessMask = VK_ACCESS_HOST_READ_BIT;
901 to_host.srcQueueFamilyIndex = to_host.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
902 to_host.buffer = buffer;
903 to_host.size = VK_WHOLE_SIZE;
904 fn.pipeline_barrier(commands, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_HOST_BIT, 0, 0, nullptr, 1,
905 &to_host, 0, nullptr);
906 vk.vkEndCommandBuffer(commands);
907 tracker_lock.unlock();
908 resource_lock.unlock();
909 vkResetFences_(device, 1, &probe_fence_);
910 VkSubmitInfo submit_info{VK_STRUCTURE_TYPE_SUBMIT_INFO};
911 submit_info.commandBufferCount = 1;
912 submit_info.pCommandBuffers = &commands;
913 VkResult submitted;
914 {
915 std::lock_guard lock(context_.submit_mutex());
916 submitted = context_.observe_result(vk.vkQueueSubmit(queue_, 1, &submit_info, probe_fence_),
917 "vkQueueSubmit (present probe)");
918 if (submitted == VK_SUCCESS) context_.note_image_work_locked();
919 }
920 if (submitted != VK_SUCCESS ||
921 context_.observe_result(vkWaitForFences_(device, 1, &probe_fence_, VK_TRUE, 5'000'000'000ull),
922 "vkWaitForFences (present probe)") != VK_SUCCESS) {
923 std::fprintf(stderr, "[rt] present-probe: readback submit/wait failed (%d)\n", int(submitted));
924 cleanup();
925 return;
926 }
927 const std::size_t texels = std::size_t(binding.width) * binding.height;
928 const auto* bytes = static_cast<const std::uint8_t*>(mapped);
929 std::vector<std::uint8_t> rgb(texels * 3);
930 double sum[3] = {0, 0, 0};
931 float peak = 0.0f;
932 std::size_t nonzero = 0;
933 bool decoded = true;
934 for (std::size_t i = 0; i < texels && decoded; ++i) {
935 float c[3];
936 if (!probe_decode(binding.format, bytes + i * bf.bytes, c)) {
937 decoded = false;
938 break;
939 }
940 bool any_set = false;
941 for (int k = 0; k < 3; ++k) {
942 sum[k] += c[k];
943 peak = std::max(peak, c[k]);
944 if (c[k] != 0.0f) any_set = true;
945 rgb[i * 3 + k] = std::uint8_t(std::clamp(c[k], 0.0f, 1.0f) * 255.0f + 0.5f);
946 }
947 nonzero += any_set;
948 }
949 // Raw bytes too: a format the probe cannot decode still says whether anything was written.
950 std::size_t raw_nonzero = 0;
951 std::size_t first_nonzero = SIZE_MAX;
952 for (std::size_t i = 0; i < std::size_t(size); ++i)
953 if (bytes[i]) {
954 if (first_nonzero == SIZE_MAX) first_nonzero = i;
955 ++raw_nonzero;
956 }
957 { // LOCAL DIAGNOSTIC (fsdraw): raw texels at the centre and at the first non-zero byte
958 const std::size_t centre = (std::size_t(binding.height / 2) * binding.width + binding.width / 2) * bf.bytes;
959 std::string c, f;
960 char b[8];
961 for (std::uint32_t k = 0; k < bf.bytes && k < 16; ++k) {
962 std::snprintf(b, sizeof b, "%02x", bytes[centre + k]);
963 c += b;
964 }
965 if (first_nonzero != SIZE_MAX) {
966 const std::size_t t = first_nonzero / bf.bytes * bf.bytes;
967 for (std::uint32_t k = 0; k < bf.bytes && k < 16; ++k) {
968 std::snprintf(b, sizeof b, "%02x", bytes[t + k]);
969 f += b;
970 }
971 }
972 std::fprintf(stderr, "[rt] present-probe: %s frame %llu raw centre texel %s first non-zero texel %lld (%s)\n",
973 prefix, static_cast<unsigned long long>(number), c.c_str(),
974 first_nonzero == SIZE_MAX ? -1ll : static_cast<long long>(first_nonzero / bf.bytes), f.c_str());
975 }
976 cleanup();
977 const double scale = 255.0 / double(texels);
978 std::fprintf(stderr,
979 "[rt] present-probe: %s frame %llu mean rgb %.2f %.2f %.2f (0..255 scale) peak %.3f nonzero "
980 "texels %zu of %zu, nonzero bytes %zu of %llu%s\n",
981 prefix, static_cast<unsigned long long>(number), sum[0] * scale, sum[1] * scale, sum[2] * scale, peak,
982 nonzero, texels, raw_nonzero, static_cast<unsigned long long>(size),
983 decoded ? "" : " (format not decoded)");
984 std::string dir = capture_dir_;
985 if (dir.back() != '/' && dir.back() != '\\') dir += '/';
986 if (decoded && (is_source || nonzero)) {
987 char name[64];
988 std::snprintf(name, sizeof name, "%s_%05llu.ppm", prefix, static_cast<unsigned long long>(number));
989 std::ofstream file(dir + name, std::ios::binary | std::ios::trunc);
990 if (file) {
991 file << "P6\n" << binding.width << ' ' << binding.height << "\n255\n";
992 file.write(reinterpret_cast<const char*>(rgb.data()), std::streamsize(rgb.size()));
993 }
994 }
995 std::ofstream index(dir + "source_index.txt", std::ios::app);
996 if (index)
997 index << prefix << " frame " << number << " id 0x" << std::hex << id << std::dec << " path " << path << " format " << int(binding.format) << " extent "
998 << binding.width << 'x' << binding.height << " layout " << int(layout) << " mean rgb " << std::fixed
999 << std::setprecision(2) << sum[0] * scale << ' ' << sum[1] * scale << ' ' << sum[2] * scale
1000 << " nonzero texels " << nonzero << " nonzero bytes " << raw_nonzero << '\n';
1001 if (is_source) ++probe_written_;
1002 }
1003 // ---- end LOCAL DIAGNOSTIC ----
1004
651 struct Frame { 1005 struct Frame {
652 VkCommandBuffer commands = VK_NULL_HANDLE; 1006 VkCommandBuffer commands = VK_NULL_HANDLE;
653 VkFence done = VK_NULL_HANDLE; 1007 VkFence done = VK_NULL_HANDLE;
@@ -655,6 +1009,9 @@ private:
655 std::array<VkImageView, 2> views{}; // the plane views of the last composed present, until the frame is reused 1009 std::array<VkImageView, 2> views{}; // the plane views of the last composed present, until the frame is reused
656 }; 1010 };
657 1011
1012 bool recreate_for_present(bool vsync, bool srgb, bool hdr);
1013 VkResult finish_startup_frame(Frame& frame, std::uint32_t image, bool& show_title);
1014
658 // Whether `source` is a colour texture the device knows, so present() can refuse it before acquiring an image. 1015 // Whether `source` is a colour texture the device knows, so present() can refuse it before acquiring an image.
659 bool presentable(ResourceId source) { 1016 bool presentable(ResourceId source) {
660 std::shared_lock lock(context_.resource_mutex_); // the resource table (vulkan_backend.h) 1017 std::shared_lock lock(context_.resource_mutex_); // the resource table (vulkan_backend.h)
@@ -667,7 +1024,8 @@ private:
667 // present, which gives back the image that was never presented. Returns `failure`, the error to report. 1024 // present, which gives back the image that was never presented. Returns `failure`, the error to report.
668 VkResult give_back(Frame& frame, VkResult failure) { 1025 VkResult give_back(Frame& frame, VkResult failure) {
669 const VkDevice device = context_.device(); 1026 const VkDevice device = context_.device();
670 if (vkResetFences_(device, 1, &frame.done) != VK_SUCCESS) return stop(failure); 1027 if (context_.observe_result(vkResetFences_(device, 1, &frame.done), "vkResetFences (present)") != VK_SUCCESS)
1028 return stop(failure);
671 const VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT; 1029 const VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT;
672 VkSubmitInfo submit_info{VK_STRUCTURE_TYPE_SUBMIT_INFO}; 1030 VkSubmitInfo submit_info{VK_STRUCTURE_TYPE_SUBMIT_INFO};
673 submit_info.waitSemaphoreCount = 1; 1031 submit_info.waitSemaphoreCount = 1;
@@ -676,7 +1034,8 @@ private:
676 VkResult submitted; 1034 VkResult submitted;
677 { 1035 {
678 std::lock_guard lock(context_.submit_mutex()); 1036 std::lock_guard lock(context_.submit_mutex());
679 submitted = context_.vk.vkQueueSubmit(queue_, 1, &submit_info, frame.done); 1037 submitted = context_.observe_result(context_.vk.vkQueueSubmit(queue_, 1, &submit_info, frame.done),
1038 "vkQueueSubmit (return present image)");
680 } 1039 }
681 if (submitted != VK_SUCCESS) return stop(failure); 1040 if (submitted != VK_SUCCESS) return stop(failure);
682 stale_ = true; 1041 stale_ = true;
@@ -707,7 +1066,8 @@ private:
707 const VkDevice device = context_.device(); 1066 const VkDevice device = context_.device();
708 { 1067 {
709 std::lock_guard lock(context_.submit_mutex()); 1068 std::lock_guard lock(context_.submit_mutex());
710 vk.vkQueueWaitIdle(queue_); // the old swapchain's images and semaphores may still be in use 1069 // The old swapchain's images and semaphores may still be in use.
1070 context_.observe_result(vk.vkQueueWaitIdle(queue_), "vkQueueWaitIdle (present)");
711 release(swapchain_); 1071 release(swapchain_);
712 } 1072 }
713 swapchain_ = VK_NULL_HANDLE; 1073 swapchain_ = VK_NULL_HANDLE;
@@ -796,7 +1156,8 @@ private:
796 return true; 1156 return true;
797 { 1157 {
798 std::lock_guard lock(context_.submit_mutex()); 1158 std::lock_guard lock(context_.submit_mutex());
799 context_.vk.vkQueueWaitIdle(queue_); // the old target may still be in use 1159 // The old target may still be in use.
1160 context_.observe_result(context_.vk.vkQueueWaitIdle(queue_), "vkQueueWaitIdle (present)");
800 } 1161 }
801 bool changed = false; 1162 bool changed = false;
802 return composer_->ensure_target(extent_, changed); 1163 return composer_->ensure_target(extent_, changed);
@@ -921,8 +1282,9 @@ private:
921 1282
922 VkResult acquire(VkSemaphore semaphore, std::uint32_t* image) { 1283 VkResult acquire(VkSemaphore semaphore, std::uint32_t* image) {
923 for (;;) { 1284 for (;;) {
924 const VkResult result = vkAcquireNextImageKHR_(context_.device(), swapchain_, 50'000'000, semaphore, 1285 const VkResult result = context_.observe_result(
925 VK_NULL_HANDLE, image); 1286 vkAcquireNextImageKHR_(context_.device(), swapchain_, 50'000'000, semaphore, VK_NULL_HANDLE, image),
1287 "vkAcquireNextImageKHR");
926 if (result != VK_TIMEOUT && result != VK_NOT_READY) return result; 1288 if (result != VK_TIMEOUT && result != VK_NOT_READY) return result;
927 if (should_abort()) return VK_NOT_READY; 1289 if (should_abort()) return VK_NOT_READY;
928 } 1290 }
@@ -953,7 +1315,7 @@ private:
953 const VkImageSubresourceRange range{VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1}; 1315 const VkImageSubresourceRange range{VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1};
954 VkImageLayout layout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL; 1316 VkImageLayout layout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
955 VkAccessFlags access = VK_ACCESS_TRANSFER_WRITE_BIT; 1317 VkAccessFlags access = VK_ACCESS_TRANSFER_WRITE_BIT;
956 if (capture_ && capture_buffer_) { 1318 if (capture_buffer_ && (capture_ || dump_.due(presented_))) {
957 // Two frames may be in flight and share `capture_buffer_`: serialize the prior frame's capture copy 1319 // Two frames may be in flight and share `capture_buffer_`: serialize the prior frame's capture copy
958 // before overwriting it, while moving this frame's swapchain image to TRANSFER_SRC. 1320 // before overwriting it, while moving this frame's swapchain image to TRANSFER_SRC.
959 VkBufferMemoryBarrier capture_waw{VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER}; 1321 VkBufferMemoryBarrier capture_waw{VK_STRUCTURE_TYPE_BUFFER_MEMORY_BARRIER};
@@ -980,6 +1342,10 @@ private:
980 copy.imageExtent = {extent_.width, extent_.height, 1}; 1342 copy.imageExtent = {extent_.width, extent_.height, 1};
981 fn.copy_image_to_buffer(commands, images_[image], VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, capture_buffer_, 1, 1343 fn.copy_image_to_buffer(commands, images_[image], VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL, capture_buffer_, 1,
982 &copy); 1344 &copy);
1345 auto to_host = capture_waw;
1346 to_host.dstAccessMask = VK_ACCESS_HOST_READ_BIT;
1347 fn.pipeline_barrier(commands, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_HOST_BIT, 0,
1348 0, nullptr, 1, &to_host, 0, nullptr);
983 layout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL; 1349 layout = VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL;
984 access = VK_ACCESS_TRANSFER_READ_BIT; 1350 access = VK_ACCESS_TRANSFER_READ_BIT;
985 } 1351 }
@@ -992,7 +1358,7 @@ private:
992 release_capture(); 1358 release_capture();
993 auto& vk = context_.vk; 1359 auto& vk = context_.vk;
994 const VkDevice device = context_.device(); 1360 const VkDevice device = context_.device();
995 capture_size_ = VkDeviceSize(extent_.width) * extent_.height * 4; 1361 capture_size_ = VkDeviceSize(extent_.width) * extent_.height * present_dump::texel_size(format_);
996 VkBufferCreateInfo info{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO}; 1362 VkBufferCreateInfo info{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO};
997 info.size = capture_size_; 1363 info.size = capture_size_;
998 info.usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT; 1364 info.usage = VK_BUFFER_USAGE_TRANSFER_DST_BIT;
@@ -1050,7 +1416,8 @@ private:
1050 1416
1051 VkResult finish_pending_capture() { 1417 VkResult finish_pending_capture() {
1052 if (!pending_capture_) return VK_SUCCESS; 1418 if (!pending_capture_) return VK_SUCCESS;
1053 const VkResult waited = vkWaitForFences_(context_.device(), 1, &pending_capture_, VK_TRUE, UINT64_MAX); 1419 const VkResult waited = context_.observe_result(
1420 vkWaitForFences_(context_.device(), 1, &pending_capture_, VK_TRUE, UINT64_MAX), "vkWaitForFences (capture)");
1054 pending_capture_ = VK_NULL_HANDLE; 1421 pending_capture_ = VK_NULL_HANDLE;
1055 if (waited == VK_SUCCESS) write_capture(); 1422 if (waited == VK_SUCCESS) write_capture();
1056 return waited; 1423 return waited;
@@ -1145,7 +1512,8 @@ private:
1145 const VkDevice device = context_.device(); 1512 const VkDevice device = context_.device();
1146 { 1513 {
1147 std::lock_guard lock(context_.submit_mutex()); 1514 std::lock_guard lock(context_.submit_mutex());
1148 vk.vkQueueWaitIdle(queue_); // the old swapchain's images and semaphores may still be in use 1515 // The old swapchain's images and semaphores may still be in use.
1516 context_.observe_result(vk.vkQueueWaitIdle(queue_), "vkQueueWaitIdle (present)");
1149 } 1517 }
1150 if (finish_pending_capture() != VK_SUCCESS) return false; 1518 if (finish_pending_capture() != VK_SUCCESS) return false;
1151 stale_ = true; // until this succeeds 1519 stale_ = true; // until this succeeds
@@ -1180,7 +1548,9 @@ private:
1180 return true; 1548 return true;
1181 } 1549 }
1182 VkImageUsageFlags usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT; 1550 VkImageUsageFlags usage = VK_IMAGE_USAGE_TRANSFER_DST_BIT;
1183 if (capture_) usage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT; 1551 if (dump_.enabled() && !(caps.supportedUsageFlags & VK_IMAGE_USAGE_TRANSFER_SRC_BIT))
1552 dump_.disable("surface does not support swapchain readback");
1553 if (capture_ || dump_.enabled()) usage |= VK_IMAGE_USAGE_TRANSFER_SRC_BIT;
1184 if ((caps.supportedUsageFlags & usage) != usage) return false; 1554 if ((caps.supportedUsageFlags & usage) != usage) return false;
1185 // Not used by the presenter itself (it blits or copies into the images), but overlays that hook the swapchain 1555 // Not used by the presenter itself (it blits or copies into the images), but overlays that hook the swapchain
1186 // draw their own frame into its images through a framebuffer, which needs COLOR_ATTACHMENT: without it 1556 // draw their own frame into its images through a framebuffer, which needs COLOR_ATTACHMENT: without it
@@ -1288,7 +1658,8 @@ private:
1288 swapchain_ = VK_NULL_HANDLE; 1658 swapchain_ = VK_NULL_HANDLE;
1289 info.oldSwapchain = old; 1659 info.oldSwapchain = old;
1290 VkSwapchainKHR fresh = VK_NULL_HANDLE; 1660 VkSwapchainKHR fresh = VK_NULL_HANDLE;
1291 const VkResult created = vkCreateSwapchainKHR_(device, &info, nullptr, &fresh); 1661 const VkResult created = context_.observe_result(vkCreateSwapchainKHR_(device, &info, nullptr, &fresh),
1662 "vkCreateSwapchainKHR");
1292 { 1663 {
1293 std::lock_guard lock(context_.submit_mutex()); 1664 std::lock_guard lock(context_.submit_mutex());
1294 release(old); // retired by the creation attempt, whether or not it succeeded 1665 release(old); // retired by the creation attempt, whether or not it succeeded
@@ -1324,13 +1695,14 @@ private:
1324 extent_ = extent; 1695 extent_ = extent;
1325 extent_packed_ = (std::uint64_t(extent.width) << 32) | extent.height; 1696 extent_packed_ = (std::uint64_t(extent.width) << 32) | extent.height;
1326 hdr_active_ = chose_hdr; 1697 hdr_active_ = chose_hdr;
1327 if (capture_) { 1698 dump_pq_ = chosen.colorSpace == VK_COLOR_SPACE_HDR10_ST2084_EXT;
1328 // A capture that cannot be made fails the recreation with the swapchain in place and stale_ still set. 1699 if (capture_ || dump_.enabled()) {
1329 const bool four_bytes = format_ == VK_FORMAT_B8G8R8A8_UNORM || format_ == VK_FORMAT_R8G8B8A8_UNORM || 1700 const auto stride = present_dump::texel_size(format_);
1330 format_ == VK_FORMAT_B8G8R8A8_SRGB || format_ == VK_FORMAT_R8G8B8A8_SRGB || 1701 if (capture_ && stride != 4) return false; // read_back() promises four bytes per texel
1331 format_ == VK_FORMAT_A2B10G10R10_UNORM_PACK32 || 1702 if (!stride || !make_capture_buffer()) {
1332 format_ == VK_FORMAT_A2R10G10B10_UNORM_PACK32; 1703 dump_.disable("cannot read back this swapchain format or allocate its capture buffer");
1333 if (!four_bytes || !make_capture_buffer()) return false; 1704 if (capture_) return false;
1705 }
1334 } 1706 }
1335 vsync_ = vsync; 1707 vsync_ = vsync;
1336 swapchain_srgb_ = srgb; 1708 swapchain_srgb_ = srgb;
@@ -1440,7 +1812,13 @@ private:
1440 bool surface_lost_ = false; // set by mark_surface_lost(); cleared once a new surface was created 1812 bool surface_lost_ = false; // set by mark_surface_lost(); cleared once a new surface was created
1441 std::map<VkFormat, VkFormatFeatureFlags> features_; 1813 std::map<VkFormat, VkFormatFeatureFlags> features_;
1442 bool warned_srgb_ = false; 1814 bool warned_srgb_ = false;
1815 std::shared_ptr<void> splash_owner_;
1816 ResourceBinding splash_binding_{};
1817 ResourceId splash_source_{};
1818 bool splash_capture_only_ = false;
1443 bool capture_ = false; 1819 bool capture_ = false;
1820 present_dump::PresentDump dump_;
1821 bool dump_pq_ = false;
1444 VkBuffer capture_buffer_ = VK_NULL_HANDLE; 1822 VkBuffer capture_buffer_ = VK_NULL_HANDLE;
1445 VkDeviceMemory capture_memory_ = VK_NULL_HANDLE; 1823 VkDeviceMemory capture_memory_ = VK_NULL_HANDLE;
1446 VkDeviceSize capture_size_ = 0; 1824 VkDeviceSize capture_size_ = 0;
@@ -1479,3 +1857,5 @@ private:
1479}; 1857};
1480 1858
1481} // namespace leonida 1859} // namespace leonida
1860
1861#include "vulkan_present_splash.h"
diff --git a/runtime/src/vulkan_present_compose.h b/runtime/src/vulkan_present_compose.h
index 3b2bb2b8e..c71c06021 100644
--- a/runtime/src/vulkan_present_compose.h
+++ b/runtime/src/vulkan_present_compose.h
@@ -8,6 +8,7 @@
8 8
9#include "vulkan_backend.h" 9#include "vulkan_backend.h"
10#include "present_compose_spv.h" 10#include "present_compose_spv.h"
11#include "vulkan_aftermath.h"
11 12
12#include <array> 13#include <array>
13#include <cstdint> 14#include <cstdint>
@@ -98,6 +99,7 @@ public:
98 module_info.codeSize = sizeof(present_compose_spirv); 99 module_info.codeSize = sizeof(present_compose_spirv);
99 module_info.pCode = present_compose_spirv; 100 module_info.pCode = present_compose_spirv;
100 VkShaderModule module = VK_NULL_HANDLE; 101 VkShaderModule module = VK_NULL_HANDLE;
102 const aftermath::ShaderName aftermath_name("(runtime) present_compose");
101 if (vk.vkCreateShaderModule(device, &module_info, nullptr, &module) != VK_SUCCESS) return false; 103 if (vk.vkCreateShaderModule(device, &module_info, nullptr, &module) != VK_SUCCESS) return false;
102 VkComputePipelineCreateInfo pipeline_info{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO}; 104 VkComputePipelineCreateInfo pipeline_info{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO};
103 pipeline_info.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, nullptr, 0, 105 pipeline_info.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, nullptr, 0,
diff --git a/runtime/src/vulkan_present_splash.h b/runtime/src/vulkan_present_splash.h
new file mode 100644
index 000000000..affc9a92b
--- /dev/null
+++ b/runtime/src/vulkan_present_splash.h
@@ -0,0 +1,74 @@
1#pragma once
2
3#include "vulkan_present.h"
4
5namespace leonida {
6
7inline bool VulkanPresenter::present_splash(ResourceId source, std::shared_ptr<void> owner) {
8 std::lock_guard lock(present_mutex_);
9 if (!deferred_.empty() || context_.holds().any_held()) return false;
10 {
11 std::shared_lock resources(context_.resource_mutex_);
12 const auto* binding = context_.resolve(source);
13 if (!binding || !binding->image) return false;
14 splash_binding_ = *binding;
15 }
16 if (!capture_) splash_capture_only_ = enable_capture();
17 const auto before = presented();
18 if (present(source, true) != VK_SUCCESS || presented() == before) return false;
19 const Frame& frame = frames_[(frame_index_ - 1) % frames_.size()];
20 if (vkWaitForFences_(context_.device(), 1, &frame.done, VK_TRUE, UINT64_MAX) != VK_SUCCESS ||
21 finish_pending_capture() != VK_SUCCESS) return false;
22 if (capture_ptr_) {
23 splash_source_ = source;
24 splash_owner_ = std::move(owner);
25 }
26 return true;
27}
28
29// A changed surface or colour format may not support readback. Keep the title able to present on it.
30inline bool VulkanPresenter::recreate_for_present(bool vsync, bool srgb, bool hdr) {
31 if (recreate(vsync, srgb, hdr)) return true;
32 if (!splash_capture_only_) return false;
33 splash_owner_.reset();
34 splash_capture_only_ = false;
35 capture_ = false;
36 return recreate(vsync, srgb, hdr);
37}
38
39// Called only during the launch handoff, with the tracker and queue locked. Check the composed pixels so a
40// transparent overlay or a clear with nonzero alpha cannot dismiss the splash. Later black frames are genuine.
41inline VkResult VulkanPresenter::finish_startup_frame(Frame& frame, std::uint32_t image, bool& show_title) {
42 const VkDevice device = context_.device();
43 VkResult result = vkWaitForFences_(device, 1, &frame.done, VK_TRUE, UINT64_MAX);
44 if (result != VK_SUCCESS) return result;
45 const bool ten_bit = format_ == VK_FORMAT_A2B10G10R10_UNORM_PACK32 || format_ == VK_FORMAT_A2R10G10B10_UNORM_PACK32;
46 const std::uint32_t rgb = ten_bit ? 0x3fffffffu : 0xffffffu;
47 // Every 8th pixel of every 8th row: the capture is read back from host-visible memory, and reading all of it at
48 // every present while the title's frames are black took 75-90 % of the present thread under Proton and doubled
49 // the title's start-up (speed-3: 2 M pixels a present, under the submit lock). Content smaller than 8x8 pixels
50 // keeps the splash a few frames longer.
51 const auto* pixels = reinterpret_cast<const std::uint32_t*>(capture_ptr_);
52 show_title = false;
53 for (std::uint32_t y = 0; y < extent_.height && !show_title; y += 8) {
54 const std::uint32_t* row = pixels + std::size_t(y) * extent_.width;
55 for (std::uint32_t x = 0; x < extent_.width; x += 8)
56 if (row[x] & rgb) {
57 show_title = true;
58 break;
59 }
60 }
61 VkSubmitInfo ready{VK_STRUCTURE_TYPE_SUBMIT_INFO};
62 ready.signalSemaphoreCount = 1;
63 ready.pSignalSemaphores = &ready_[image];
64 if (show_title) return context_.vk.vkQueueSubmit(queue_, 1, &ready, VK_NULL_HANDLE);
65 // The acquire was consumed and the title commands finished. Overwrite the same image before presenting it.
66 record(frame.commands, splash_binding_, splash_source_, image, nullptr);
67 result = vkResetFences_(device, 1, &frame.done);
68 if (result != VK_SUCCESS) return result;
69 ready.commandBufferCount = 1;
70 ready.pCommandBuffers = &frame.commands;
71 return context_.vk.vkQueueSubmit(queue_, 1, &ready, frame.done);
72}
73
74} // namespace leonida
diff --git a/runtime/src/vulkan_replay.h b/runtime/src/vulkan_replay.h
index 7dcc7e2c0..b735fbaa6 100644
--- a/runtime/src/vulkan_replay.h
+++ b/runtime/src/vulkan_replay.h
@@ -1,4 +1,7 @@
1#pragma once 1#pragma once
2#include <atomic>
3#include <cfloat>
4#include <cstdlib>
2 5
3#include "resource_tiling.h" 6#include "resource_tiling.h"
4 7
@@ -31,22 +34,33 @@
31// A list that needs a missing function fails with ReplayResult::unsupported before anything is written. 34// A list that needs a missing function fails with ReplayResult::unsupported before anything is written.
32 35
33#include "command_list.h" 36#include "command_list.h"
37#include "indirect_draw_stats.h"
38#include "deferred_image_binding.h"
39#include "vulkan_device_fault.h"
34#include "depth24.h" 40#include "depth24.h"
41#include "quad_index_expand.h"
42#include "rect_list_geometry.h"
35#include "uav_clear.h" 43#include "uav_clear.h"
36 44
37#include <vulkan/vulkan.h> 45#include <vulkan/vulkan.h>
38#include "vulkan_predicate.h" 46#include "vulkan_predicate.h"
39#include "vulkan_predicated_copy.h" 47#include "vulkan_predicated_copy.h"
40#include "vulkan_indirect_dispatch_count.h" 48#include "vulkan_indirect_dispatch_count.h"
49#include "vulkan_indirect_clamp.h"
50#include "xdxr_build.h"
41 51
42#include <algorithm> 52#include <algorithm>
43#include <array> 53#include <array>
54#include <atomic>
44#include <cmath> 55#include <cmath>
45#include <cstdint> 56#include <cstdint>
57#include <cstdio>
58#include <cstdlib>
46#include <functional> 59#include <functional>
47#include <limits> 60#include <limits>
48#include <map> 61#include <map>
49#include <memory> 62#include <memory>
63#include <optional>
50#include <type_traits> 64#include <type_traits>
51#include <unordered_map> 65#include <unordered_map>
52#include <utility> 66#include <utility>
@@ -97,6 +111,16 @@ struct ResourceBinding {
97 bool sampled = false; // has SAMPLED usage (no DENY_SHADER_RESOURCE): the present compose pass reads it 111 bool sampled = false; // has SAMPLED usage (no DENY_SHADER_RESOURCE): the present compose pass reads it
98 bool host_readable = false; // D3D12_HEAP_TYPE_READBACK (or CUSTOM write-back): needs host-read flush 112 bool host_readable = false; // D3D12_HEAP_TYPE_READBACK (or CUSTOM write-back): needs host-read flush
99 bool sparse_buffer = false; 113 bool sparse_buffer = false;
114 DeferredImageBinding* deferred_memory = nullptr; // Owned by the placed resource until it leaves the context.
115 std::atomic<bool>* replay_seen = nullptr; // Optional census of placed image use under the resource lock.
116 bool xbox_depth16_stencil8=false;
117 bool rgba4_render_fallback=false;
118 // The two independently addressable storage images of an Xbox depth/stencil UAV.
119 ResourceId depth_uav = 0, stencil_uav = 0;
120 void* residency_owner = nullptr;
121 bool (*ensure_residency)(void*) = nullptr;
122 ResourceId depth_conversion = 0; // R32_FLOAT transfer image for a widened Xbox D16+S8 attachment
123 bool indirect_arguments = false; // the backing VkBuffer was created with INDIRECT_BUFFER usage
100}; 124};
101 125
102struct VulkanAccess { 126struct VulkanAccess {
@@ -465,11 +489,16 @@ inline BlockFormat block_format(VkFormat format, VkImageAspectFlags aspect) {
465 case VK_FORMAT_R16_SINT: 489 case VK_FORMAT_R16_SINT:
466 case VK_FORMAT_A4R4G4B4_UNORM_PACK16: 490 case VK_FORMAT_A4R4G4B4_UNORM_PACK16:
467 case VK_FORMAT_R4G4B4A4_UNORM_PACK16: 491 case VK_FORMAT_R4G4B4A4_UNORM_PACK16:
492 case VK_FORMAT_D16_UNORM_S8_UINT:
468 case VK_FORMAT_D16_UNORM: return {2, 1}; 493 case VK_FORMAT_D16_UNORM: return {2, 1};
469 case VK_FORMAT_R8_UNORM: 494 case VK_FORMAT_R8_UNORM:
470 case VK_FORMAT_R8_SNORM: 495 case VK_FORMAT_R8_SNORM:
471 case VK_FORMAT_R8_UINT: 496 case VK_FORMAT_R8_UINT:
472 case VK_FORMAT_R8_SINT: return {1, 1}; 497 case VK_FORMAT_R8_SINT:
498#ifdef VK_KHR_MAINTENANCE_5_EXTENSION_NAME
499 case VK_FORMAT_A8_UNORM_KHR: // an A8_UNORM render target (VulkanDeviceInfo::a8_render_target)
500#endif
501 return {1, 1};
473 case VK_FORMAT_BC1_RGBA_UNORM_BLOCK: 502 case VK_FORMAT_BC1_RGBA_UNORM_BLOCK:
474 case VK_FORMAT_BC1_RGBA_SRGB_BLOCK: 503 case VK_FORMAT_BC1_RGBA_SRGB_BLOCK:
475 case VK_FORMAT_BC4_UNORM_BLOCK: 504 case VK_FORMAT_BC4_UNORM_BLOCK:
@@ -504,6 +533,42 @@ inline bool two_planes(const ResourceBinding& resource) {
504// R32_FLOAT/UINT/SINT (R32_TYPELESS) and D16_UNORM with R16_FLOAT/UNORM/SNORM/UINT/SINT (R16_TYPELESS). Single-sampled, single-plane depth only: D24 and D32 with stencil have two planes, and a D24 533// R32_FLOAT/UINT/SINT (R32_TYPELESS) and D16_UNORM with R16_FLOAT/UNORM/SNORM/UINT/SINT (R16_TYPELESS). Single-sampled, single-plane depth only: D24 and D32 with stencil have two planes, and a D24
505// stored as D32 would need the depth24 conversion. Vulkan's vkCmdCopyImage refuses mismatched aspects, so the replay 534// stored as D32 would need the depth24 conversion. Vulkan's vkCmdCopyImage refuses mismatched aspects, so the replay
506// stages these through a buffer. 535// stages these through a buffer.
536// An A8_UNORM texture is a VK_FORMAT_A8_UNORM_KHR image when it is a render target (VulkanDeviceInfo::
537// a8_render_target) and an R8_UNORM image otherwise; D3D12 copies between the two as between any two A8_UNORM
538// textures. Vulkan puts A8 in a compatibility class of its own, so vkCmdCopyImage refuses the pair
539// (VUID-vkCmdCopyImage-srcImage-01548) although both have one byte per texel: the replay stages it through a buffer,
540// as it does a depth <-> colour pair.
541inline bool a8_mixed_backing(VkFormat a, VkFormat b) {
542#ifdef VK_KHR_MAINTENANCE_5_EXTENSION_NAME
543 return a != b && (a == VK_FORMAT_A8_UNORM_KHR || b == VK_FORMAT_A8_UNORM_KHR);
544#else
545 (void)a;
546 (void)b;
547 return false;
548#endif
549}
550
551// Two depth formats whose depth aspect has the same encoding but which are not the same VkFormat: D32_SFLOAT and
552// D32_SFLOAT_S8_UINT, D16_UNORM and D16_UNORM_S8_UINT, X8_D24_UNORM_PACK32 and D24_UNORM_S8_UINT. D3D12 copies the
553// depth plane between them; Vulkan's vkCmdCopyImage requires depth/stencil formats to match exactly
554// (VUID-vkCmdCopyImage-srcImage-01548), and an NVIDIA driver handed D32_SFLOAT_S8_UINT -> D32_SFLOAT writes past the
555// end of the D32 image (the world-start WRITE_INVALID). The replay stages these through a buffer, where the depth
556// aspect has the same texel layout on both sides.
557inline bool depth_format_pair(VkFormat a, VkFormat b) {
558 const auto encoding = [](VkFormat format) -> int {
559 switch (format) {
560 case VK_FORMAT_D32_SFLOAT:
561 case VK_FORMAT_D32_SFLOAT_S8_UINT: return 32;
562 case VK_FORMAT_X8_D24_UNORM_PACK32:
563 case VK_FORMAT_D24_UNORM_S8_UINT: return 24;
564 case VK_FORMAT_D16_UNORM:
565 case VK_FORMAT_D16_UNORM_S8_UINT: return 16;
566 default: return 0;
567 }
568 };
569 return a != b && encoding(a) && encoding(a) == encoding(b);
570}
571
507inline bool depth_colour_pair(const ResourceBinding& a, const ResourceBinding& b) { 572inline bool depth_colour_pair(const ResourceBinding& a, const ResourceBinding& b) {
508 const auto family = [](VkFormat format) -> int { 573 const auto family = [](VkFormat format) -> int {
509 switch (format) { 574 switch (format) {
@@ -623,13 +688,40 @@ public:
623 bool separate_depth_stencil_layouts() const { return separate_; } 688 bool separate_depth_stencil_layouts() const { return separate_; }
624 689
625 void track(ResourceId id, const ResourceBinding& resource, VkImageLayout layout) { 690 void track(ResourceId id, const ResourceBinding& resource, VkImageLayout layout) {
691 save(id);
626 Entry entry{resource.mip_levels, resource.array_layers, two_planes(resource) ? 2u : 1u, 692 Entry entry{resource.mip_levels, resource.array_layers, two_planes(resource) ? 2u : 1u,
627 separate_ && two_planes(resource), {}}; 693 separate_ && two_planes(resource), {}};
628 entry.layouts.assign(std::size_t(entry.mips) * entry.layers * (entry.two_planes ? 2 : 1), layout); 694 entry.layouts.assign(std::size_t(entry.mips) * entry.layers * (entry.two_planes ? 2 : 1), layout);
629 entries_[id] = std::move(entry); 695 entries_[id] = std::move(entry);
630 } 696 }
631 697
632 void forget(ResourceId id) { entries_.erase(id); } 698 void forget(ResourceId id) {
699 save(id);
700 entries_.erase(id);
701 }
702
703 // A submission records its layout changes into the tracker itself and undoes them when it does not reach the
704 // queue. Between begin() and commit()/rollback(), the first change to each image keeps its earlier state, so a
705 // rollback restores exactly what was there (the queue once copied the whole map, every image of the title, at
706 // each submission: ~20,000-30,000 entries and two allocations each, under tracker_mutex_).
707 void begin() {
708 journal_.clear();
709 journaling_ = true;
710 }
711 void commit() {
712 journal_.clear();
713 journaling_ = false;
714 }
715 void rollback() {
716 journaling_ = false;
717 for (auto& [id, old] : journal_) {
718 if (old)
719 entries_[id] = std::move(*old);
720 else
721 entries_.erase(id);
722 }
723 journal_.clear();
724 }
633 bool tracked(ResourceId id) const { return entries_.count(id) != 0; } 725 bool tracked(ResourceId id) const { return entries_.count(id) != 0; }
634 726
635 // Current layout of one D3D12 subresource; UNDEFINED when the resource or index is unknown. 727 // Current layout of one D3D12 subresource; UNDEFINED when the resource or index is unknown.
@@ -672,6 +764,7 @@ public:
672 void set(ResourceId id, const VkImageSubresourceRange& range, VkImageLayout layout) { 764 void set(ResourceId id, const VkImageSubresourceRange& range, VkImageLayout layout) {
673 const auto it = entries_.find(id); 765 const auto it = entries_.find(id);
674 if (it == entries_.end()) return; 766 if (it == entries_.end()) return;
767 if (journaling_ && !journal_.contains(id)) journal_.emplace(id, it->second);
675 Entry& e = it->second; 768 Entry& e = it->second;
676 visit(e, range, [&](std::size_t index, VkImageAspectFlags, std::uint32_t, std::uint32_t) { 769 visit(e, range, [&](std::size_t index, VkImageAspectFlags, std::uint32_t, std::uint32_t) {
677 e.layouts[index] = layout; 770 e.layouts[index] = layout;
@@ -706,8 +799,16 @@ private:
706 } 799 }
707 } 800 }
708 801
802 void save(ResourceId id) {
803 if (!journaling_ || journal_.contains(id)) return;
804 const auto it = entries_.find(id);
805 journal_.emplace(id, it == entries_.end() ? std::optional<Entry>() : std::optional<Entry>(it->second));
806 }
807
709 bool separate_; 808 bool separate_;
710 std::unordered_map<ResourceId, Entry> entries_; 809 std::unordered_map<ResourceId, Entry> entries_;
810 bool journaling_ = false;
811 std::unordered_map<ResourceId, std::optional<Entry>> journal_; // state before the open submission's first change
711}; 812};
712 813
713// Each physical slot records one non-overlapping interval. Logical queries can share slots. 814// Each physical slot records one non-overlapping interval. Logical queries can share slots.
@@ -759,6 +860,16 @@ struct ComputePipeline {
759 VkPipelineLayout layout = VK_NULL_HANDLE; 860 VkPipelineLayout layout = VK_NULL_HANDLE;
760 std::uint64_t code_base = 0; 861 std::uint64_t code_base = 0;
761 VkDescriptorSet bindless_set = VK_NULL_HANDLE; // set 0 of the layout, bound at every dispatch; null: none 862 VkDescriptorSet bindless_set = VK_NULL_HANDLE; // set 0 of the layout, bound at every dispatch; null: none
863 // A pipeline built on first use: with `pipeline` null, `build(build_context)` returns the handle (building it if
864 // nobody has yet), or null when it cannot be built. Null `build`: `pipeline` is final.
865 VkPipeline (*build)(void*) = nullptr;
866 void* build_context = nullptr;
867 bool async_build = false; // a null handle may be waiting for the compile worker
868 // What `build` would return when it is built already and nobody is building it, else null; builds nothing. Null: a
869 // first use is always built where prepare() meets it. Not used with async_build. See PipelineCompiles.
870 VkPipeline (*built)(void*) = nullptr;
871 bool large = false; // compiled one after another with the other large ones (PipelineCompiles)
872 bool skipped = false; // never built on request (LEONIDA_SKIP_COMPUTE): its dispatches are dropped
762}; 873};
763 874
764// A graphics pipeline as replay needs it: the formats its attachments must have and which vertex-input slots it 875// A graphics pipeline as replay needs it: the formats its attachments must have and which vertex-input slots it
@@ -781,8 +892,17 @@ struct GraphicsPipeline {
781 // unbound (D3D12 allows it; dynamic rendering needs the formats to agree). Bit i: colour slot i, bit 8: depth 892 // unbound (D3D12 allows it; dynamic rendering needs the formats to agree). Bit i: colour slot i, bit 8: depth
782 // and stencil. Null when it cannot be built. 893 // and stencil. Null when it cannot be built.
783 static constexpr std::uint32_t unbound_depth = 1u << 8; 894 static constexpr std::uint32_t unbound_depth = 1u << 8;
784 std::function<VkPipeline(std::uint32_t unbound)> variant; 895 static constexpr std::uint32_t rectangle_stage = 1u << 9;
896 // IA topology requiring a fourth-corner geometry stage. Zero when the PSO already contains the stage.
897 std::uint32_t rectangle_variant_topology = 0;
898 std::function<VkPipeline(std::uint32_t flags)> variant;
899 // What `variant` would return when it is built already and nobody is building one, else null; builds nothing. See
900 // ComputePipeline::built.
901 std::function<VkPipeline(std::uint32_t flags)> built;
902 bool large = false; // as ComputePipeline::large
785 std::uint32_t samples = 1; // rasterizationSamples; every bound attachment must have this count 903 std::uint32_t samples = 1; // rasterizationSamples; every bound attachment must have this count
904 bool async_build = false;
905 bool nonunit_vertex_divisor = false; // an actual instance divisor > 1, not a zero-stride emulation
786}; 906};
787 907
788// The 144-byte push-constant block every translated shader declares: s0..s31, heap base, code base. 908// The 144-byte push-constant block every translated shader declares: s0..s31, heap base, code base.
@@ -811,7 +931,172 @@ enum class ReplayResult {
811 unsupported 931 unsupported
812}; 932};
813 933
934// LOCAL DIAGNOSTIC: which check called a resource unresolved, by source line, logged at the 1st, 2nd, 4th, 8th...
935// time it fires (a list that fails this way is not submitted at all, so the first lines name what stops rendering).
936// LEONIDA_STRICT_REPLAY=1: an unresolvable draw or dispatch fails its list again instead of being dropped. Read with
937// the C runtime, not the Win32 API: this header is built into tests without windows.h too.
938inline bool strict_replay() {
939 static const bool strict = [] {
940#ifdef _WIN32
941 char value[2]{};
942 std::size_t length = 0;
943 return getenv_s(&length, value, sizeof value, "LEONIDA_STRICT_REPLAY") == 0 && length == 2 && value[0] == '1';
944#else
945 const char* value = std::getenv("LEONIDA_STRICT_REPLAY");
946 return value && value[0] == '1' && !value[1];
947#endif
948 }();
949 return strict;
950}
951
952inline bool order_buffer_copies() {
953 static const bool enabled = [] {
954#ifdef _WIN32
955 char value[2]{};
956 std::size_t length = 0;
957 return getenv_s(&length, value, sizeof value, "LEONIDA_ORDER_BUFFER_COPIES") != 0 || length != 2 || value[0] != '0';
958#else
959 const char* value = std::getenv("LEONIDA_ORDER_BUFFER_COPIES");
960 return !value || value[0] != '0' || value[1];
961#endif
962 }();
963 return enabled;
964}
965
966inline ReplayResult unresolved_at(int line) {
967 static std::atomic<unsigned> seen[8192];
968 if (line >= 0 && line < 8192) {
969 const unsigned count = seen[line].fetch_add(1, std::memory_order_relaxed) + 1;
970 if ((count & (count - 1)) == 0)
971 std::fprintf(stderr, "[rt] replay: unresolved resource at vulkan_replay.h:%d (x%u)\n", line, count);
972 }
973 return ReplayResult::unresolved_resource;
974}
975
976// LOCAL DIAGNOSTIC, as unresolved_at: which check called a command list unsupported (the whole list is then not
977// submitted: "ExecuteCommandLists failed: unsupported"), by source line, at the 1st, 2nd, 4th, 8th... time.
978inline ReplayResult unsupported_at(int line) {
979 static std::atomic<unsigned> seen[8192];
980 if (line >= 0 && line < 8192) {
981 const unsigned count = seen[line].fetch_add(1, std::memory_order_relaxed) + 1;
982 if ((count & (count - 1)) == 0)
983 std::fprintf(stderr, "[rt] replay: unsupported at vulkan_replay.h:%d (x%u)\n", line, count);
984 }
985 return ReplayResult::unsupported;
986}
987
988
989// The pipelines of a submission that are not built yet. prepare() adds each of them once and goes on; build_pipelines()
990// then compiles them all and puts them where prepare() left them out. Holds pointers to registered pipelines: valid
991// while the context's pipeline lock is held.
992class PipelineCompiles {
993public:
994 // Where a prepared command finds its pipeline: an index for `built`, plus one; 0 when it needs none.
995 using Ticket = std::uint32_t;
996 // Which command needs a pipeline: it decides what a pipeline that cannot be built means (build_pipelines).
997 enum class User : std::uint8_t { draw, dispatch, indirect_dispatch };
998 struct Use {
999 Ticket ticket;
1000 User user;
1001 };
1002 // A compile takes the driver some hundred bytes of memory for each byte of SPIR-V (docs/pipeline_check.md): graphics
1003 // pipelines of this much or more are `large`.
1004 static constexpr std::uint64_t large_spirv_bytes = 1u << 20;
1005
1006 Ticket add(const GraphicsPipeline& pipeline, std::uint32_t flags) {
1007 return add({&pipeline, nullptr, flags}, User::draw);
1008 }
1009 Ticket add(const ComputePipeline& pipeline, User user) { return add({nullptr, &pipeline, 0}, user); }
1010
1011 bool empty() const { return jobs_.empty(); }
1012 std::size_t size() const { return jobs_.size(); }
1013 VkPipeline built(Ticket ticket) const { return jobs_[ticket - 1].built; }
1014 const std::vector<Use>& uses() const { return uses_; } // in the order of the commands
1015
1016 // Whether this batch already attempted (pipeline, flags); writes its outcome (built handle or VK_NULL_HANDLE) to `out`.
1017 bool lookup(const GraphicsPipeline* graphics, const ComputePipeline* compute, std::uint32_t flags,
1018 VkPipeline& out) const {
1019 const void* const pipeline = graphics ? static_cast<const void*>(graphics) : compute;
1020 const auto it = tickets_.find({pipeline, flags});
1021 if (it == tickets_.end()) return false;
1022 out = jobs_[it->second - 1].built;
1023 return true;
1024 }
1025
1026 // Whether this batch already attempted the job named by `other`'s `ticket`.
1027 bool contains_ticket(const PipelineCompiles& other, Ticket ticket) const {
1028 VkPipeline unused = VK_NULL_HANDLE;
1029 const Job& job = other.jobs_[ticket - 1];
1030 return lookup(job.graphics, job.compute, job.flags, unused);
1031 }
1032
1033 // Compiles all of them through run(count, job) (PipelineWorkers::run): the large ones one after another, as without
1034 // workers, beside the others. Jobs already attempted in `prior` reuse that outcome without re-invoking build().
1035 template<typename Run>
1036 void build(Run&& run, const PipelineCompiles* prior = nullptr) {
1037 std::vector<std::size_t> single, large;
1038 for (std::size_t i = 0; i < jobs_.size(); ++i) {
1039 if (prior && prior->lookup(jobs_[i].graphics, jobs_[i].compute, jobs_[i].flags, jobs_[i].built)) continue;
1040 (is_large(jobs_[i]) ? large : single).push_back(i);
1041 }
1042 if (single.empty() && large.empty()) return;
1043 const auto compile = [this](std::size_t i) {
1044 Job& job = jobs_[i];
1045 job.built = job.graphics ? job.graphics->variant(job.flags) : job.compute->build(job.compute->build_context);
1046 };
1047 const std::size_t chain = large.empty() ? 0 : 1; // the large ones are one unit, the first
1048 run(chain + single.size(), [&](std::size_t i) {
1049 if (i >= chain)
1050 compile(single[i - chain]);
1051 else
1052 for (const std::size_t each : large) compile(each);
1053 });
1054 }
1055
1056 // Compiles jobs serially in command order without workers, stopping at the first fatal refusal (a failed draw, a
1057 // failed indirect dispatch, or any failed dispatch under strict_replay()). Matches serial prepare() short-circuit
1058 // semantics while allowing the caller to compile outside resource_mutex_.
1059 void build_serial(const PipelineCompiles* prior = nullptr) {
1060 std::vector<bool> done(jobs_.size(), false);
1061 for (const Use& use : uses_) {
1062 const std::size_t i = use.ticket - 1;
1063 if (!done[i]) {
1064 done[i] = true;
1065 Job& job = jobs_[i];
1066 if (!prior || !prior->lookup(job.graphics, job.compute, job.flags, job.built)) {
1067 job.built =
1068 job.graphics ? job.graphics->variant(job.flags) : job.compute->build(job.compute->build_context);
1069 }
1070 }
1071 if (!jobs_[i].built && (use.user == User::draw || use.user == User::indirect_dispatch || strict_replay()))
1072 return;
1073 }
1074 }
1075
1076private:
1077 struct Job {
1078 const GraphicsPipeline* graphics; // one of the two
1079 const ComputePipeline* compute;
1080 std::uint32_t flags;
1081 VkPipeline built = VK_NULL_HANDLE;
1082 };
1083 static bool is_large(const Job& job) { return job.graphics ? job.graphics->large : job.compute->large; }
1084 Ticket add(const Job& job, User user) {
1085 const void* const pipeline = job.graphics ? static_cast<const void*>(job.graphics) : job.compute;
1086 const auto [it, added] = tickets_.try_emplace({pipeline, job.flags}, Ticket(jobs_.size() + 1));
1087 if (added) jobs_.push_back(job);
1088 uses_.push_back({it->second, user});
1089 return it->second;
1090 }
1091 std::vector<Job> jobs_;
1092 std::vector<Use> uses_;
1093 std::map<std::pair<const void*, std::uint32_t>, Ticket> tickets_;
1094};
1095
814struct ReplayFunctions { 1096struct ReplayFunctions {
1097 // Set: prepare() leaves pipelines that are not built to it instead of building each on the spot.
1098 PipelineCompiles* compiles = nullptr;
1099 std::function<void(VkCommandBuffer, const label::Write&)> gpu_label;
815 // Set 0 for the pipelines that declare one (their own `bindless_set` is only the marker): the device's current 1100 // Set 0 for the pipelines that declare one (their own `bindless_set` is only the marker): the device's current
816 // generation of it, which a flush may have replaced since the pipeline was made. Null: the pipeline's. 1101 // generation of it, which a flush may have replaced since the pipeline was made. Null: the pipeline's.
817 VkDescriptorSet bindless_set = VK_NULL_HANDLE; 1102 VkDescriptorSet bindless_set = VK_NULL_HANDLE;
@@ -822,6 +1107,9 @@ struct ReplayFunctions {
822 // Optional; a list that needs a missing one is rejected with ReplayResult::unsupported. 1107 // Optional; a list that needs a missing one is rejected with ReplayResult::unsupported.
823 PFN_vkCmdPipelineBarrier2 pipeline_barrier2 = nullptr; // enhanced barriers 1108 PFN_vkCmdPipelineBarrier2 pipeline_barrier2 = nullptr; // enhanced barriers
824 VkPipelineStageFlags2 queue_stages = 0; 1109 VkPipelineStageFlags2 queue_stages = 0;
1110 bool graphics_family = true;
1111 // Aspects with maintenance10 depth/stencil transfer support on a dedicated compute family.
1112 std::function<VkImageAspectFlags(VkFormat)> compute_copy_aspects;
825 PFN_vkCmdBeginRendering begin_rendering = nullptr; // rectangle clears 1113 PFN_vkCmdBeginRendering begin_rendering = nullptr; // rectangle clears
826 PFN_vkCmdEndRendering end_rendering = nullptr; 1114 PFN_vkCmdEndRendering end_rendering = nullptr;
827 PFN_vkCmdClearAttachments clear_attachments = nullptr; 1115 PFN_vkCmdClearAttachments clear_attachments = nullptr;
@@ -829,6 +1117,7 @@ struct ReplayFunctions {
829 PFN_vkCmdCopyBufferToImage copy_buffer_to_image = nullptr; 1117 PFN_vkCmdCopyBufferToImage copy_buffer_to_image = nullptr;
830 PFN_vkCmdCopyImageToBuffer copy_image_to_buffer = nullptr; 1118 PFN_vkCmdCopyImageToBuffer copy_image_to_buffer = nullptr;
831 PFN_vkCmdCopyImage copy_image = nullptr; 1119 PFN_vkCmdCopyImage copy_image = nullptr;
1120 PFN_vkCmdBlitImage blit_image = nullptr;
832 PFN_vkCmdResolveImage resolve_image = nullptr; // resolves 1121 PFN_vkCmdResolveImage resolve_image = nullptr; // resolves
833 PFN_vkCmdFillBuffer fill_buffer = nullptr; // unordered-access buffer clears, with copy_buffer 1122 PFN_vkCmdFillBuffer fill_buffer = nullptr; // unordered-access buffer clears, with copy_buffer
834 PFN_vkCmdUpdateBuffer update_buffer = nullptr; // WriteBufferImmediate, unordered-access clears 1123 PFN_vkCmdUpdateBuffer update_buffer = nullptr; // WriteBufferImmediate, unordered-access clears
@@ -857,6 +1146,9 @@ struct ReplayFunctions {
857 std::function<const ComputePipeline*(std::uintptr_t)> compute_pipeline; 1146 std::function<const ComputePipeline*(std::uintptr_t)> compute_pipeline;
858 PFN_vkCmdBindVertexBuffers2 bind_vertex_buffers2 = nullptr; // draws 1147 PFN_vkCmdBindVertexBuffers2 bind_vertex_buffers2 = nullptr; // draws
859 PFN_vkCmdBindIndexBuffer bind_index_buffer = nullptr; 1148 PFN_vkCmdBindIndexBuffer bind_index_buffer = nullptr;
1149 // vkCmdBindIndexBuffer2KHR, installed only with maintenance5 and robustBufferAccess2 enabled.
1150 // Spell out the signature so a build with pre-maintenance5 headers can still use the direct path.
1151 void (VKAPI_PTR *bind_robust_index_view)(VkCommandBuffer, VkBuffer, VkDeviceSize, VkDeviceSize, VkIndexType) = nullptr;
860 PFN_vkCmdSetViewport set_viewport = nullptr; 1152 PFN_vkCmdSetViewport set_viewport = nullptr;
861 PFN_vkCmdSetScissor set_scissor = nullptr; 1153 PFN_vkCmdSetScissor set_scissor = nullptr;
862 PFN_vkCmdSetViewportWithCount set_viewport_with_count = nullptr; 1154 PFN_vkCmdSetViewportWithCount set_viewport_with_count = nullptr;
@@ -866,6 +1158,7 @@ struct ReplayFunctions {
866 PFN_vkCmdSetStencilReference set_stencil_reference = nullptr; 1158 PFN_vkCmdSetStencilReference set_stencil_reference = nullptr;
867 PFN_vkCmdSetBlendConstants set_blend_constants = nullptr; 1159 PFN_vkCmdSetBlendConstants set_blend_constants = nullptr;
868 PFN_vkCmdDraw draw = nullptr; 1160 PFN_vkCmdDraw draw = nullptr;
1161 unsigned* mesh_draw_count = nullptr; // opt-in count for this submission
869 PFN_vkCmdDrawMeshTasksEXT draw_mesh_tasks = nullptr; // VK_EXT_mesh_shader; null: mesh draws are unsupported 1162 PFN_vkCmdDrawMeshTasksEXT draw_mesh_tasks = nullptr; // VK_EXT_mesh_shader; null: mesh draws are unsupported
870 PFN_vkCmdDrawIndexed draw_indexed = nullptr; 1163 PFN_vkCmdDrawIndexed draw_indexed = nullptr;
871 std::function<const GraphicsPipeline*(std::uintptr_t)> graphics_pipeline; 1164 std::function<const GraphicsPipeline*(std::uintptr_t)> graphics_pipeline;
@@ -873,6 +1166,10 @@ struct ReplayFunctions {
873 // cut to what the buffer holds from there: vertex and index views use what fits, WriteBufferImmediate needs all 1166 // cut to what the buffer holds from there: vertex and index views use what fits, WriteBufferImmediate needs all
874 // of it. 1167 // of it.
875 std::function<bool(std::uint64_t va, std::uint64_t& size, VkBuffer&, VkDeviceSize&)> buffer_at; 1168 std::function<bool(std::uint64_t va, std::uint64_t& size, VkBuffer&, VkDeviceSize&)> buffer_at;
1169 // A vertex or index view whose VA is the title's own CPU memory, not a registered buffer (on the console
1170 // the GPU reads title memory directly). Copies [va, va + size) into a GPU-visible ring and names the copy; false
1171 // when the range is not readable host memory.
1172 std::function<bool(std::uint64_t va, std::uint64_t size, VkBuffer&, VkDeviceSize&)> title_memory;
876 // Host bytes for a whole console VA range; `not_cpu_written` when it names GPU-writable memory. For small 1173 // Host bytes for a whole console VA range; `not_cpu_written` when it names GPU-writable memory. For small
877 // CPU-written inputs, such as the pointer list of an ARRAY_OF_POINTERS TLAS build. 1174 // CPU-written inputs, such as the pointer list of an ARRAY_OF_POINTERS TLAS build.
878 std::function<HostReadStatus(std::uint64_t va, std::uint64_t bytes, const std::uint8_t*&)> host_at; 1175 std::function<HostReadStatus(std::uint64_t va, std::uint64_t bytes, const std::uint8_t*&)> host_at;
@@ -880,7 +1177,12 @@ struct ReplayFunctions {
880 VkBuffer zero_buffer = VK_NULL_HANDLE; 1177 VkBuffer zero_buffer = VK_NULL_HANDLE;
881 VkDeviceSize zero_offset = 0; 1178 VkDeviceSize zero_offset = 0;
882 VkDeviceSize zero_size = 0; 1179 VkDeviceSize zero_size = 0;
1180 // 32-bit triangle indices for non-indexed quad lists: 0, 1, 2, 0, 2, 3, then the same pattern for each quad.
1181 VkBuffer quad_indices = VK_NULL_HANDLE;
1182 VkDeviceSize quad_indices_offset = 0;
1183 std::uint32_t quad_index_count = 0;
883 std::uint64_t heap_base = 0; // device address of the GPU address arena (push-constant dwords 32-33) 1184 std::uint64_t heap_base = 0; // device address of the GPU address arena (push-constant dwords 32-33)
1185 std::uint64_t heap_size = 0; // its bytes (0: unknown)
884 // Resolves available binary-occlusion queries to 64-bit 0/1 values, outside conditional rendering. 1186 // Resolves available binary-occlusion queries to 64-bit 0/1 values, outside conditional rendering.
885 std::function<void(VkCommandBuffer, VkQueryPool, std::uint32_t first, std::uint32_t count, 1187 std::function<void(VkCommandBuffer, VkQueryPool, std::uint32_t first, std::uint32_t count,
886 VkBuffer dst, VkDeviceSize offset)> resolve_binary_occlusion; 1188 VkBuffer dst, VkDeviceSize offset)> resolve_binary_occlusion;
@@ -903,6 +1205,10 @@ struct ReplayFunctions {
903 PFN_vkCmdEndDebugUtilsLabelEXT end_label = nullptr; 1205 PFN_vkCmdEndDebugUtilsLabelEXT end_label = nullptr;
904 // ExecuteIndirect (Vulkan 1.0/1.2 core). 1206 // ExecuteIndirect (Vulkan 1.0/1.2 core).
905 PFN_vkCmdDrawIndirect draw_indirect = nullptr; 1207 PFN_vkCmdDrawIndirect draw_indirect = nullptr;
1208 bool draw_indirect_first_instance = false; // enabled device feature, not just physical-device support
1209 bool multi_draw_indirect = false;
1210 bool draw_indirect_count_enabled = false;
1211 std::uint32_t max_draw_indirect_count = 1;
906 PFN_vkCmdDrawIndexedIndirect draw_indexed_indirect = nullptr; 1212 PFN_vkCmdDrawIndexedIndirect draw_indexed_indirect = nullptr;
907 PFN_vkCmdDrawIndirectCount draw_indirect_count = nullptr; 1213 PFN_vkCmdDrawIndirectCount draw_indirect_count = nullptr;
908 PFN_vkCmdDrawIndexedIndirectCount draw_indexed_indirect_count = nullptr; 1214 PFN_vkCmdDrawIndexedIndirectCount draw_indexed_indirect_count = nullptr;
@@ -912,6 +1218,22 @@ struct ReplayFunctions {
912 std::function<bool(VkBuffer, VkDeviceSize, VkBuffer, VkDeviceSize, std::uint32_t, std::uint32_t, 1218 std::function<bool(VkBuffer, VkDeviceSize, VkBuffer, VkDeviceSize, std::uint32_t, std::uint32_t,
913 CountedDispatch&)> prepare_counted_dispatch; 1219 CountedDispatch&)> prepare_counted_dispatch;
914 std::function<void(VkCommandBuffer, const CountedDispatch&)> emit_counted_dispatch; 1220 std::function<void(VkCommandBuffer, const CountedDispatch&)> emit_counted_dispatch;
1221 // An indexed quad list draws from triangle-list indices that a compute prepass writes from the application's
1222 // index buffer (quad_index_expand.h): the index buffer and the offset of the draw's first index, the index type,
1223 // how many indices from there the view holds, the quads, and QuadIndexExpander::bytes(quads) of `copy_scratch`.
1224 // That scratch must be usable as an index buffer and through its device address. Without both such a draw is
1225 // unsupported.
1226 std::function<bool(VkBuffer, VkDeviceSize, VkIndexType, std::uint64_t, std::uint32_t, VkBuffer, VkDeviceSize,
1227 QuadIndexExpansion&)> prepare_quad_indices;
1228 std::function<void(VkCommandBuffer, const QuadIndexExpansion&)> emit_quad_indices;
1229 // ExecuteIndirect arguments clamped on the GPU before the indirect command reads them (vulkan_indirect_clamp.h):
1230 // `prepare_indirect_clamp` claims scratch for one call (arguments, their offset, count buffer, its offset, the
1231 // IndirectKind, the argument stride and max_command_count), `emit_indirect_clamp` records its pass. Both unset, or
1232 // LEONIDA_INDIRECT_CLAMP=0: the indirect command reads the application's argument buffer.
1233 std::function<bool(VkBuffer, VkDeviceSize, VkBuffer, VkDeviceSize, std::uint32_t, std::uint32_t, std::uint32_t,
1234 ClampedIndirect&)> prepare_indirect_clamp;
1235 std::function<void(VkCommandBuffer, const ClampedIndirect&)> emit_indirect_clamp;
1236 bool require_indirect_clamp = false; // an enabled device refuses an indirect if scratch preparation fails
915 // Optional VK_KHR_acceleration_structure: BuildRaytracingAccelerationStructure. 1237 // Optional VK_KHR_acceleration_structure: BuildRaytracingAccelerationStructure.
916 PFN_vkCmdBuildAccelerationStructuresKHR build_acceleration_structures = nullptr; 1238 PFN_vkCmdBuildAccelerationStructuresKHR build_acceleration_structures = nullptr;
917 // A KHR TLAS built from D3D12_ELEMENTS_LAYOUT_ARRAY_OF_POINTERS needs a pointer array whose entries are Vulkan 1239 // A KHR TLAS built from D3D12_ELEMENTS_LAYOUT_ARRAY_OF_POINTERS needs a pointer array whose entries are Vulkan
@@ -920,8 +1242,11 @@ struct ReplayFunctions {
920 std::function<ReplayResult(const BuildAccelerationStructure&, VkDeviceAddress&)> prepare_khr_instances; 1242 std::function<ReplayResult(const BuildAccelerationStructure&, VkDeviceAddress&)> prepare_khr_instances;
921 // XDXR BVH4 builds (xdxr_build.h), used instead of the KHR ones when set: `xdxr_check` refuses inputs the builder 1243 // XDXR BVH4 builds (xdxr_build.h), used instead of the KHR ones when set: `xdxr_check` refuses inputs the builder
922 // cannot read while the list is prepared, `xdxr_record` records the build. 1244 // cannot read while the list is prepared, `xdxr_record` records the build.
1245 // `xdxr_record` gets the title-memory table a TLAS build translates its instances' BLAS addresses with
1246 // (`prepare_xdxr_table` stages it at prepare; a BLAS build gets an empty one).
923 std::function<bool(const BuildAccelerationStructure&)> xdxr_check; 1247 std::function<bool(const BuildAccelerationStructure&)> xdxr_check;
924 std::function<void(VkCommandBuffer, const BuildAccelerationStructure&)> xdxr_record; 1248 std::function<void(VkCommandBuffer, const BuildAccelerationStructure&, const XdxrBlasTable&)> xdxr_record;
1249 std::function<ReplayResult(VkDeviceAddress& address, std::uint32_t& count)> prepare_xdxr_table;
925 // CopyRaytracingAccelerationStructure (CLONE, COMPACT) of XDXR structures: `bytes` is the room the destination 1250 // CopyRaytracingAccelerationStructure (CLONE, COMPACT) of XDXR structures: `bytes` is the room the destination
926 // resource has; and one postbuild value (COMPACTED_SIZE, CURRENT_SIZE) of the structure at `src` to `dest`. 1251 // resource has; and one postbuild value (COMPACTED_SIZE, CURRENT_SIZE) of the structure at `src` to `dest`.
927 std::function<void(VkCommandBuffer, std::uint64_t src_va, std::uint64_t dst_va, std::uint64_t bytes)> xdxr_copy; 1252 std::function<void(VkCommandBuffer, std::uint64_t src_va, std::uint64_t dst_va, std::uint64_t bytes)> xdxr_copy;
@@ -955,7 +1280,8 @@ struct ReplayFunctions {
955 std::function<bool(Depth24Job&, std::vector<Depth24Job>&)> depth24_prepare; // whole copy in, dispatches out 1280 std::function<bool(Depth24Job&, std::vector<Depth24Job>&)> depth24_prepare; // whole copy in, dispatches out
956 std::function<void(VkCommandBuffer, const Depth24Job&)> depth24_run; 1281 std::function<void(VkCommandBuffer, const Depth24Job&)> depth24_run;
957 // `bytes` of transfer scratch that stays alive until the submission completes (vulkan_scratch.h): depth <-> colour 1282 // `bytes` of transfer scratch that stays alive until the submission completes (vulkan_scratch.h): depth <-> colour
958 // copies go through it, image to buffer to image. Without it such a copy is unsupported. 1283 // copies go through it, image to buffer to image. Without it such a copy is unsupported. The expanded indices of
1284 // an indexed quad list are written there too (prepare_quad_indices).
959 std::function<bool(VkDeviceSize bytes, VkBuffer&, VkDeviceSize&)> copy_scratch; 1285 std::function<bool(VkDeviceSize bytes, VkBuffer&, VkDeviceSize&)> copy_scratch;
960 // Returns the query heap with that ID, or nullptr; it stays valid while the lists that use it run. 1286 // Returns the query heap with that ID, or nullptr; it stays valid while the lists that use it run.
961 std::function<QueryPool*(QueryHeapId)> query_pool; 1287 std::function<QueryPool*(QueryHeapId)> query_pool;
@@ -1011,6 +1337,7 @@ struct Prepared {
1011 PredicateCapture predicate; 1337 PredicateCapture predicate;
1012 std::vector<PredicatedCopyDispatch> predicated_copy; 1338 std::vector<PredicatedCopyDispatch> predicated_copy;
1013 CountedDispatch counted_dispatch; 1339 CountedDispatch counted_dispatch;
1340 ClampedIndirect indirect_clamp; // ExecuteIndirect: the clamped arguments the command reads, or null
1014 ResourceBinding binding; 1341 ResourceBinding binding;
1015 VkImageSubresourceRange range{}; // the barrier range, or the cleared view (cleared aspects only) 1342 VkImageSubresourceRange range{}; // the barrier range, or the cleared view (cleared aspects only)
1016 VkImageView view = VK_NULL_HANDLE; 1343 VkImageView view = VK_NULL_HANDLE;
@@ -1041,6 +1368,7 @@ struct Prepared {
1041 // A depth <-> colour copy: the source into `staged` (image to buffer), then `staged` into the destination. 1368 // A depth <-> colour copy: the source into `staged` (image to buffer), then `staged` into the destination.
1042 VkBuffer staged = VK_NULL_HANDLE; 1369 VkBuffer staged = VK_NULL_HANDLE;
1043 std::vector<VkBufferImageCopy> staged_reads, staged_writes; 1370 std::vector<VkBufferImageCopy> staged_reads, staged_writes;
1371 VkDeviceSize clear_pattern_bytes = 0; // staged transfer UAV clear (compute-only rects or sliced/rect 3D)
1044 std::vector<VkImageSubresourceRange> discards; // DiscardResource: the subresources to discard 1372 std::vector<VkImageSubresourceRange> discards; // DiscardResource: the subresources to discard
1045 VkBuffer write_buffer = VK_NULL_HANDLE; // WriteBufferImmediate: where the address lands 1373 VkBuffer write_buffer = VK_NULL_HANDLE; // WriteBufferImmediate: where the address lands
1046 VkDeviceSize write_offset = 0; 1374 VkDeviceSize write_offset = 0;
@@ -1051,14 +1379,38 @@ struct Prepared {
1051 VkDeviceSize fill_scratch_offset = 0; 1379 VkDeviceSize fill_scratch_offset = 0;
1052 QueryPool* queries = nullptr; // query commands: the heap 1380 QueryPool* queries = nullptr; // query commands: the heap
1053 ComputePipeline pipeline; // dispatches 1381 ComputePipeline pipeline; // dispatches
1382 PipelineCompiles::Ticket compile = 0; // dispatches: where the pipeline comes from when it was not built yet
1054 std::uint32_t draw = 0; // draws: its PreparedDraw in PreparedList::draws 1383 std::uint32_t draw = 0; // draws: its PreparedDraw in PreparedList::draws
1384 std::uint32_t depth_uav_copy = UINT32_MAX;
1385 bool order_depth_uav = false;
1055 VkAccelerationStructureKHR accel_dst = VK_NULL_HANDLE; 1386 VkAccelerationStructureKHR accel_dst = VK_NULL_HANDLE;
1056 VkDeviceAddress khr_instances = 0; // staged ARRAY_OF_POINTERS instance list for a KHR TLAS; 0: use the VA directly 1387 VkDeviceAddress khr_instances = 0; // staged ARRAY_OF_POINTERS instance list for a KHR TLAS; 0: use the VA directly
1057 std::uint64_t xdxr_bytes = 0; // CopyAccelerationStructure: the most bytes the copy may write 1388 std::uint64_t xdxr_bytes = 0; // CopyAccelerationStructure: the most bytes the copy may write
1389 XdxrBlasTable xdxr_blases; // an XDXR TLAS build: how its instances' BLAS addresses are translated
1058 VkAccelerationStructureKHR accel_src = VK_NULL_HANDLE; 1390 VkAccelerationStructureKHR accel_src = VK_NULL_HANDLE;
1059 std::uint32_t khr_postbuild = ~0u; // index into PreparedList::khr_postbuilds; ~0u: skipped or XDXR 1391 std::uint32_t khr_postbuild = ~0u; // index into PreparedList::khr_postbuilds; ~0u: skipped or XDXR
1060}; 1392};
1061 1393
1394struct DepthUavCopy {
1395 std::array<ResourceBinding, 2> storage;
1396 ResourceBinding conversion{};
1397 VkBuffer scratch;
1398 VkDeviceSize offset;
1399 bool to_storage;
1400};
1401
1402inline bool texture_uav_layout(std::uint32_t layout) {
1403 return layout == d3d12_layout::unordered_access || layout == d3d12_layout::direct_queue_unordered_access ||
1404 layout == d3d12_layout::compute_queue_unordered_access;
1405}
1406
1407inline bool unsupported_depth_uav_access(std::uint32_t layout, std::uint32_t access) {
1408 // A queue-specific COMMON layout permits implicit storage writes. Generic COMMON permits only
1409 // sampling and copies, even when the access scope is COMMON (zero).
1410 return layout == d3d12_layout::direct_queue_common || layout == d3d12_layout::compute_queue_common ||
1411 (layout == d3d12_layout::common && (access & d3d12_access::unordered_access));
1412}
1413
1062inline constexpr std::size_t max_render_targets = 8; // D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT 1414inline constexpr std::size_t max_render_targets = 8; // D3D12_SIMULTANEOUS_RENDER_TARGET_COUNT
1063 1415
1064// What a draw needs beyond Prepared, kept apart in PreparedList::draws: every command's entry is refilled on every 1416// What a draw needs beyond Prepared, kept apart in PreparedList::draws: every command's entry is refilled on every
@@ -1074,20 +1426,32 @@ struct PreparedDraw {
1074 // lock across both), so it is not copied. 1426 // lock across both), so it is not copied.
1075 const GraphicsPipeline* graphics = nullptr; 1427 const GraphicsPipeline* graphics = nullptr;
1076 VkPipeline pipeline = VK_NULL_HANDLE; // graphics->pipeline, or its variant for the slots the draw leaves unbound 1428 VkPipeline pipeline = VK_NULL_HANDLE; // graphics->pipeline, or its variant for the slots the draw leaves unbound
1429 PipelineCompiles::Ticket compile = 0; // where `pipeline` comes from when it was not built yet
1077 std::vector<Attachment> colors; // by slot; id 0 = unbound 1430 std::vector<Attachment> colors; // by slot; id 0 = unbound
1078 Attachment depth; 1431 Attachment depth;
1079 std::vector<VkBuffer> vertex_buffers; 1432 std::vector<VkBuffer> vertex_buffers;
1080 std::vector<VkDeviceSize> vertex_offsets, vertex_sizes, vertex_strides; 1433 std::vector<VkDeviceSize> vertex_offsets, vertex_sizes, vertex_strides;
1081 VkBuffer index_buffer = VK_NULL_HANDLE; 1434 VkBuffer index_buffer = VK_NULL_HANDLE;
1082 VkDeviceSize index_offset = 0; 1435 VkDeviceSize index_offset = 0;
1436 VkDeviceSize index_size = 0; // the bytes of the index buffer view inside its buffer; 0 with no index buffer
1083 VkIndexType index_type = VK_INDEX_TYPE_UINT16; 1437 VkIndexType index_type = VK_INDEX_TYPE_UINT16;
1438 QuadIndexExpansion quad_indices; // an indexed quad list: the triangle indices its draw binds instead
1439 VkBuffer indirect_buffer = VK_NULL_HANDLE;
1440 VkDeviceSize indirect_offset = 0;
1441 VkBuffer indirect_count_buffer = VK_NULL_HANDLE;
1442 VkDeviceSize indirect_count_offset = 0;
1084 VkExtent2D area{}; 1443 VkExtent2D area{};
1085 std::uint32_t layers = 1; // the fewest layers any bound attachment view has 1444 std::uint32_t layers = 1; // the fewest layers any bound attachment view has
1445 // The draw is dropped at emit: its pipeline, a vertex buffer or its index buffer could not be resolved (see
1446 // skip_unresolved in prepare).
1447 bool skipped = false;
1086 1448
1087 // Back to a new draw's state, keeping the vectors' storage. 1449 // Back to a new draw's state, keeping the vectors' storage.
1088 void reset() { 1450 void reset() {
1451 skipped = false;
1089 graphics = nullptr; 1452 graphics = nullptr;
1090 pipeline = VK_NULL_HANDLE; 1453 pipeline = VK_NULL_HANDLE;
1454 compile = 0;
1091 colors.clear(); 1455 colors.clear();
1092 depth = {}; 1456 depth = {};
1093 vertex_buffers.clear(); 1457 vertex_buffers.clear();
@@ -1096,7 +1460,13 @@ struct PreparedDraw {
1096 vertex_strides.clear(); 1460 vertex_strides.clear();
1097 index_buffer = VK_NULL_HANDLE; 1461 index_buffer = VK_NULL_HANDLE;
1098 index_offset = 0; 1462 index_offset = 0;
1463 index_size = 0;
1099 index_type = VK_INDEX_TYPE_UINT16; 1464 index_type = VK_INDEX_TYPE_UINT16;
1465 quad_indices = {};
1466 indirect_buffer = VK_NULL_HANDLE;
1467 indirect_offset = 0;
1468 indirect_count_buffer = VK_NULL_HANDLE;
1469 indirect_count_offset = 0;
1100 area = {}; 1470 area = {};
1101 layers = 1; 1471 layers = 1;
1102 } 1472 }
@@ -1172,6 +1542,9 @@ inline VkClearColorValue render_target_clear_color(VkFormat format, const ClearC
1172 case VK_FORMAT_R8G8_UNORM: 1542 case VK_FORMAT_R8G8_UNORM:
1173 case VK_FORMAT_R8G8B8A8_UNORM: 1543 case VK_FORMAT_R8G8B8A8_UNORM:
1174 case VK_FORMAT_B8G8R8A8_UNORM: is_integer = false; unorm = {255, 255, 255, 255}; break; 1544 case VK_FORMAT_B8G8R8A8_UNORM: is_integer = false; unorm = {255, 255, 255, 255}; break;
1545#ifdef VK_KHR_MAINTENANCE_5_EXTENSION_NAME
1546 case VK_FORMAT_A8_UNORM_KHR: is_integer = false; unorm = {0, 0, 0, 255}; break; // alpha only
1547#endif
1175 case VK_FORMAT_R8G8B8A8_SRGB: 1548 case VK_FORMAT_R8G8B8A8_SRGB:
1176 case VK_FORMAT_B8G8R8A8_SRGB: // the colour channels go through the sRGB curve on the GPU 1549 case VK_FORMAT_B8G8R8A8_SRGB: // the colour channels go through the sRGB curve on the GPU
1177 is_integer = false; 1550 is_integer = false;
@@ -1280,6 +1653,13 @@ inline VkExtent2D mip_extent(const ResourceBinding& resource, std::uint32_t mip)
1280 return {std::max(1u, resource.width >> mip), std::max(1u, resource.height >> mip)}; 1653 return {std::max(1u, resource.width >> mip), std::max(1u, resource.height >> mip)};
1281} 1654}
1282 1655
1656// Nonempty, clipped rectangle. The entire constant pattern fits in one vkCmdUpdateBuffer for wide texels.
1657inline VkExtent2D volume_clear_tile(VkExtent2D rect, std::uint32_t texel_bytes) {
1658 const std::uint32_t max_texels = 65536 / texel_bytes;
1659 const auto width = std::min(rect.width, max_texels);
1660 return {width, std::min(rect.height, max_texels / width)};
1661}
1662
1283// Into `out`, replacing what it held: a kept PreparedList entry reuses the vector's storage. 1663// Into `out`, replacing what it held: a kept PreparedList entry reuses the vector's storage.
1284inline void clip(std::span<const Rect> rects, VkExtent2D extent, std::uint32_t layers, std::vector<VkClearRect>& out) { 1664inline void clip(std::span<const Rect> rects, VkExtent2D extent, std::uint32_t layers, std::vector<VkClearRect>& out) {
1285 out.clear(); 1665 out.clear();
@@ -1370,14 +1750,12 @@ inline LayoutPieces current(const LayoutTracker* tracker, ResourceId id, const V
1370 return out; 1750 return out;
1371} 1751}
1372 1752
1373// Zero-fills a block-compressed image range via vkCmdCopyBufferToImage from either the device's zero page 1753// Copies zeroes from the device's zero page or transfer scratch. A buffer can initialize block-compressed
1374// (`vk.zero_buffer`) or a zeroed transfer-scratch chunk (`vk.copy_scratch` + `vk.fill_buffer`). Vulkan forbids 1754// images and, with maintenance10, a depth or stencil aspect on a compute-only queue where a clear is illegal.
1375// vkCmdClearColorImage on BC formats, yet D3D12 committed resources start zeroed unless CREATE_NOT_ZEROED is set 1755inline bool zero_image_aspect(const ReplayFunctions& vk, VkCommandBuffer command_buffer,
1376// (D3D-220). 1756 const ResourceBinding& resource, const VkImageSubresourceRange& range,
1377inline bool zero_compressed_image(const ReplayFunctions& vk, VkCommandBuffer command_buffer, 1757 VkImageAspectFlags aspect, VkImageLayout dst_layout) {
1378 const ResourceBinding& resource, const VkImageSubresourceRange& range, 1758 const BlockFormat fmt = block_format(resource.format, aspect);
1379 VkImageLayout dst_layout) {
1380 const BlockFormat fmt = block_format(resource.format, VK_IMAGE_ASPECT_COLOR_BIT);
1381 if (fmt.block < 1 || !fmt.bytes || !vk.copy_buffer_to_image) return false; 1759 if (fmt.block < 1 || !fmt.bytes || !vk.copy_buffer_to_image) return false;
1382 const std::uint32_t mip_begin = range.baseMipLevel; 1760 const std::uint32_t mip_begin = range.baseMipLevel;
1383 const std::uint32_t mip_end = 1761 const std::uint32_t mip_end =
@@ -1411,7 +1789,7 @@ inline bool zero_compressed_image(const ReplayFunctions& vk, VkCommandBuffer com
1411 VkDeviceSize zero_off = 0; 1789 VkDeviceSize zero_off = 0;
1412 VkDeviceSize zero_cap = 0; 1790 VkDeviceSize zero_cap = 0;
1413 if (vk.zero_buffer && vk.zero_size >= fmt.bytes) { 1791 if (vk.zero_buffer && vk.zero_size >= fmt.bytes) {
1414 const VkDeviceSize align = fmt.bytes; 1792 const VkDeviceSize align = std::max<VkDeviceSize>(4, fmt.bytes);
1415 const VkDeviceSize pad = (align - (vk.zero_offset % align)) % align; 1793 const VkDeviceSize pad = (align - (vk.zero_offset % align)) % align;
1416 if (vk.zero_size >= pad + fmt.bytes) { 1794 if (vk.zero_size >= pad + fmt.bytes) {
1417 zero_buf = vk.zero_buffer; 1795 zero_buf = vk.zero_buffer;
@@ -1420,20 +1798,23 @@ inline bool zero_compressed_image(const ReplayFunctions& vk, VkCommandBuffer com
1420 } 1798 }
1421 } 1799 }
1422 if (!zero_buf && vk.copy_scratch && vk.fill_buffer) { 1800 if (!zero_buf && vk.copy_scratch && vk.fill_buffer) {
1423 // Round up to a multiple of fmt.bytes (8 or 16, always a multiple of 4 for vkCmdFillBuffer). 1801 // vkCmdFillBuffer requires 4-byte aligned dstOffset and size (VUID-vkCmdFillBuffer-dstOffset-00024 /
1424 const VkDeviceSize fill_bytes = ((needed + fmt.bytes - 1) / fmt.bytes) * fmt.bytes; 1802 // -size-00028), while vkCmdCopyBufferToImage requires fmt.bytes alignment (1, 2, 4, 8, or 16).
1803 // Uncompressed 1B/2B color formats reach this path on copy-only queues (!can_clear).
1804 const VkDeviceSize align = std::max<VkDeviceSize>(4, fmt.bytes);
1805 const VkDeviceSize fill_bytes = ((needed + align - 1) / align) * align;
1425 VkBuffer scratch = VK_NULL_HANDLE; 1806 VkBuffer scratch = VK_NULL_HANDLE;
1426 VkDeviceSize offset = 0; 1807 VkDeviceSize offset = 0;
1427 if (vk.copy_scratch(fill_bytes, scratch, offset)) { 1808 if (vk.copy_scratch(fill_bytes, scratch, offset)) {
1428 const VkDeviceSize align = fmt.bytes;
1429 const VkDeviceSize pad = (align - (offset % align)) % align; 1809 const VkDeviceSize pad = (align - (offset % align)) % align;
1430 if (fill_bytes >= pad + fmt.bytes) { 1810 const VkDeviceSize usable = fill_bytes > pad ? ((fill_bytes - pad) / align) * align : 0;
1431 vk.fill_buffer(command_buffer, scratch, offset + pad, fill_bytes - pad, 0); 1811 if (usable >= fmt.bytes) {
1812 vk.fill_buffer(command_buffer, scratch, offset + pad, usable, 0);
1432 memory_barrier(vk, command_buffer, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 1813 memory_barrier(vk, command_buffer, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT,
1433 VK_ACCESS_TRANSFER_READ_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT); 1814 VK_ACCESS_TRANSFER_READ_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT);
1434 zero_buf = scratch; 1815 zero_buf = scratch;
1435 zero_off = offset + pad; 1816 zero_off = offset + pad;
1436 zero_cap = fill_bytes - pad; 1817 zero_cap = usable;
1437 } 1818 }
1438 } 1819 }
1439 } 1820 }
@@ -1450,7 +1831,7 @@ inline bool zero_compressed_image(const ReplayFunctions& vk, VkCommandBuffer com
1450 layer_count <= zero_cap / (slice_bytes * mip_d)) { 1831 layer_count <= zero_cap / (slice_bytes * mip_d)) {
1451 VkBufferImageCopy r{}; 1832 VkBufferImageCopy r{};
1452 r.bufferOffset = zero_off; 1833 r.bufferOffset = zero_off;
1453 r.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, mip, layer_begin, layer_count}; 1834 r.imageSubresource = {aspect, mip, layer_begin, layer_count};
1454 r.imageExtent = {ext.width, ext.height, mip_d}; 1835 r.imageExtent = {ext.width, ext.height, mip_d};
1455 regions.push_back(r); 1836 regions.push_back(r);
1456 continue; 1837 continue;
@@ -1463,7 +1844,7 @@ inline bool zero_compressed_image(const ReplayFunctions& vk, VkCommandBuffer com
1463 for (std::uint32_t z = 0; z < mip_d; z += slices_per_copy) { 1844 for (std::uint32_t z = 0; z < mip_d; z += slices_per_copy) {
1464 VkBufferImageCopy r{}; 1845 VkBufferImageCopy r{};
1465 r.bufferOffset = zero_off; 1846 r.bufferOffset = zero_off;
1466 r.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, mip, layer, 1}; 1847 r.imageSubresource = {aspect, mip, layer, 1};
1467 r.imageOffset = {0, 0, std::int32_t(z)}; 1848 r.imageOffset = {0, 0, std::int32_t(z)};
1468 r.imageExtent = {ext.width, ext.height, std::min(slices_per_copy, mip_d - z)}; 1849 r.imageExtent = {ext.width, ext.height, std::min(slices_per_copy, mip_d - z)};
1469 regions.push_back(r); 1850 regions.push_back(r);
@@ -1477,7 +1858,7 @@ inline bool zero_compressed_image(const ReplayFunctions& vk, VkCommandBuffer com
1477 const std::uint32_t eh = std::min<std::uint32_t>(rows_per_copy * fmt.block, ext.height - oy); 1858 const std::uint32_t eh = std::min<std::uint32_t>(rows_per_copy * fmt.block, ext.height - oy);
1478 VkBufferImageCopy r{}; 1859 VkBufferImageCopy r{};
1479 r.bufferOffset = zero_off; 1860 r.bufferOffset = zero_off;
1480 r.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, mip, layer, 1}; 1861 r.imageSubresource = {aspect, mip, layer, 1};
1481 r.imageOffset = {0, std::int32_t(oy), std::int32_t(z)}; 1862 r.imageOffset = {0, std::int32_t(oy), std::int32_t(z)};
1482 r.imageExtent = {ext.width, eh, 1}; 1863 r.imageExtent = {ext.width, eh, 1};
1483 regions.push_back(r); 1864 regions.push_back(r);
@@ -1496,7 +1877,7 @@ inline bool zero_compressed_image(const ReplayFunctions& vk, VkCommandBuffer com
1496 std::min<std::uint32_t>(cols_per_copy * fmt.block, ext.width - ox); 1877 std::min<std::uint32_t>(cols_per_copy * fmt.block, ext.width - ox);
1497 VkBufferImageCopy r{}; 1878 VkBufferImageCopy r{};
1498 r.bufferOffset = zero_off; 1879 r.bufferOffset = zero_off;
1499 r.imageSubresource = {VK_IMAGE_ASPECT_COLOR_BIT, mip, layer, 1}; 1880 r.imageSubresource = {aspect, mip, layer, 1};
1500 r.imageOffset = {std::int32_t(ox), std::int32_t(oy), std::int32_t(z)}; 1881 r.imageOffset = {std::int32_t(ox), std::int32_t(oy), std::int32_t(z)};
1501 r.imageExtent = {ew, eh, 1}; 1882 r.imageExtent = {ew, eh, 1};
1502 regions.push_back(r); 1883 regions.push_back(r);
@@ -1512,6 +1893,14 @@ inline bool zero_compressed_image(const ReplayFunctions& vk, VkCommandBuffer com
1512 return true; 1893 return true;
1513} 1894}
1514 1895
1896// The colour aspect of a block-compressed image: Vulkan forbids vkCmdClearColorImage on BC formats, yet D3D12
1897// committed resources start zeroed unless CREATE_NOT_ZEROED is set (D3D-220).
1898inline bool zero_compressed_image(const ReplayFunctions& vk, VkCommandBuffer command_buffer,
1899 const ResourceBinding& resource, const VkImageSubresourceRange& range,
1900 VkImageLayout dst_layout) {
1901 return zero_image_aspect(vk, command_buffer, resource, range, VK_IMAGE_ASPECT_COLOR_BIT, dst_layout);
1902}
1903
1515// Images registered with the tracker in UNDEFINED have never been used. D3D12 committed resources start zeroed, 1904// Images registered with the tracker in UNDEFINED have never been used. D3D12 committed resources start zeroed,
1516// so each such piece is zero-filled (clear for uncompressed images, zero-buffer copy for block-compressed formats 1905// so each such piece is zero-filled (clear for uncompressed images, zero-buffer copy for block-compressed formats
1517// when a zero page or transfer scratch is available) and moved to `layout`, the layout the operation about to run 1906// when a zero page or transfer scratch is available) and moved to `layout`, the layout the operation about to run
@@ -1523,12 +1912,15 @@ inline void initialize(const ReplayFunctions& vk, VkCommandBuffer command_buffer
1523 if (piece.layout != VK_IMAGE_LAYOUT_UNDEFINED) continue; 1912 if (piece.layout != VK_IMAGE_LAYOUT_UNDEFINED) continue;
1524 const BlockFormat fmt = block_format(resource.format, VK_IMAGE_ASPECT_COLOR_BIT); 1913 const BlockFormat fmt = block_format(resource.format, VK_IMAGE_ASPECT_COLOR_BIT);
1525 const bool color = piece.range.aspectMask & VK_IMAGE_ASPECT_COLOR_BIT; 1914 const bool color = piece.range.aspectMask & VK_IMAGE_ASPECT_COLOR_BIT;
1526 const bool can_clear = !vk.queue_stages || ((vk.queue_stages & VK_PIPELINE_STAGE_2_CLEAR_BIT) && color); 1915 const bool can_clear = !vk.queue_stages || ((vk.queue_stages & VK_PIPELINE_STAGE_2_CLEAR_BIT) && color) ||
1527 const bool compressed = fmt.block > 1 || (!can_clear && color); 1916 (resource.depth_uav && vk.graphics_family);
1528 if (resource.not_zeroed || (!can_clear && !color)) { 1917 const bool compute_depth = !color && resource.depth_uav && !vk.graphics_family &&
1918 (vk.queue_stages & VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT) && vk.compute_copy_aspects &&
1919 (vk.compute_copy_aspects(resource.format) & piece.range.aspectMask) == piece.range.aspectMask;
1920 if (resource.not_zeroed || (!can_clear && !color && !compute_depth)) {
1529 image_barrier(vk, command_buffer, resource, piece.range, VK_IMAGE_LAYOUT_UNDEFINED, layout, 0, 1921 image_barrier(vk, command_buffer, resource, piece.range, VK_IMAGE_LAYOUT_UNDEFINED, layout, 0,
1530 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, any_memory, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT); 1922 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, any_memory, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT);
1531 } else if (compressed) { 1923 } else if (fmt.block > 1 || !can_clear) {
1532 const bool can_zero = 1924 const bool can_zero =
1533 vk.copy_buffer_to_image && 1925 vk.copy_buffer_to_image &&
1534 ((vk.zero_buffer && vk.zero_size >= fmt.bytes) || (vk.copy_scratch && vk.fill_buffer)); 1926 ((vk.zero_buffer && vk.zero_size >= fmt.bytes) || (vk.copy_scratch && vk.fill_buffer));
@@ -1537,7 +1929,10 @@ inline void initialize(const ReplayFunctions& vk, VkCommandBuffer command_buffer
1537 image_barrier(vk, command_buffer, resource, piece.range, VK_IMAGE_LAYOUT_UNDEFINED, dst, 0, 1929 image_barrier(vk, command_buffer, resource, piece.range, VK_IMAGE_LAYOUT_UNDEFINED, dst, 0,
1538 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_ACCESS_TRANSFER_WRITE_BIT, 1930 VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, VK_ACCESS_TRANSFER_WRITE_BIT,
1539 VK_PIPELINE_STAGE_TRANSFER_BIT); 1931 VK_PIPELINE_STAGE_TRANSFER_BIT);
1540 const bool zeroed = zero_compressed_image(vk, command_buffer, resource, piece.range, dst); 1932 bool zeroed = true;
1933 for (auto aspect : {VK_IMAGE_ASPECT_COLOR_BIT, VK_IMAGE_ASPECT_DEPTH_BIT, VK_IMAGE_ASPECT_STENCIL_BIT})
1934 if (piece.range.aspectMask & aspect)
1935 zeroed &= zero_image_aspect(vk, command_buffer, resource, piece.range, aspect, dst);
1541 image_barrier(vk, command_buffer, resource, piece.range, dst, layout, 1936 image_barrier(vk, command_buffer, resource, piece.range, dst, layout,
1542 zeroed ? VK_ACCESS_TRANSFER_WRITE_BIT : 0, 1937 zeroed ? VK_ACCESS_TRANSFER_WRITE_BIT : 0,
1543 zeroed ? VK_PIPELINE_STAGE_TRANSFER_BIT : VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, any_memory, 1938 zeroed ? VK_PIPELINE_STAGE_TRANSFER_BIT : VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, any_memory,
@@ -1602,7 +1997,7 @@ inline ReplayResult prepare_buffer_uav_clear(const ClearUnorderedAccess& clear,
1602 const std::uint64_t size = std::min(view.size, p.binding.size - view.offset); 1997 const std::uint64_t size = std::min(view.size, p.binding.size - view.offset);
1603 if (view.format) { 1998 if (view.format) {
1604 if (!uav_clear::encode(VkFormat(view.format), clear.is_float, clear.values, p.element)) 1999 if (!uav_clear::encode(VkFormat(view.format), clear.is_float, clear.values, p.element))
1605 return ReplayResult::unsupported; 2000 return unsupported_at(__LINE__);
1606 if (view.element_size != p.element.size) return ReplayResult::invalid_clear; 2001 if (view.element_size != p.element.size) return ReplayResult::invalid_clear;
1607 } else { 2002 } else {
1608 p.element = uav_clear::raw_element(clear.values); 2003 p.element = uav_clear::raw_element(clear.values);
@@ -1616,7 +2011,7 @@ inline ReplayResult prepare_buffer_uav_clear(const ClearUnorderedAccess& clear,
1616 offset += p.binding.buffer_offset; // the view is relative to the resource, which starts at buffer_offset 2011 offset += p.binding.buffer_offset; // the view is relative to the resource, which starts at buffer_offset
1617 if (offset % std::min(e, 4u)) return ReplayResult::unsupported; 2012 if (offset % std::min(e, 4u)) return ReplayResult::unsupported;
1618 if (e > 4 && bytes % 4) { 2013 if (e > 4 && bytes % 4) {
1619 return ReplayResult::unsupported; 2014 return unsupported_at(__LINE__);
1620 } 2015 }
1621 p.fills.push_back({offset, bytes}); 2016 p.fills.push_back({offset, bytes});
1622 return ReplayResult::success; 2017 return ReplayResult::success;
@@ -1824,7 +2219,7 @@ inline ReplayResult prepare_texture_copy(const CopyTexture& copy, Prepared& p) {
1824 const BlockFormat format = copy_block_format(image, range.aspectMask); 2219 const BlockFormat format = copy_block_format(image, range.aspectMask);
1825 // A 12-byte texel does not divide D3D12's 256-byte pitches; an rgb96 copy hands Vulkan the scratch buffer of 2220 // A 12-byte texel does not divide D3D12's 256-byte pitches; an rgb96 copy hands Vulkan the scratch buffer of
1826 // the repack, never this pitch, and the pass reads the footprint in words. 2221 // the repack, never this pitch, and the pass reads the footprint in words.
1827 if (!format.bytes || placed.row_pitch % (image.rgb96 ? 4 : format.bytes)) return ReplayResult::unsupported; 2222 if (!format.bytes || placed.row_pitch % (image.rgb96 ? 4 : format.bytes)) return unsupported_at(__LINE__);
1828 const VkExtent2D mip = mip_extent(image, range.baseMipLevel); 2223 const VkExtent2D mip = mip_extent(image, range.baseMipLevel);
1829 const auto mip_depth = std::max(1u, image.depth >> range.baseMipLevel); 2224 const auto mip_depth = std::max(1u, image.depth >> range.baseMipLevel);
1830 // The box is in the source's coordinates: the footprint for an upload, the texture for a readback. 2225 // The box is in the source's coordinates: the footprint for an upload, the texture for a readback.
@@ -1857,7 +2252,7 @@ inline ReplayResult prepare_texture_copy(const CopyTexture& copy, Prepared& p) {
1857 // Vulkan wants a buffer offset that is a multiple of the texel size (VUID-vkCmdCopyBufferToImage-dstImage-07975), 2252 // Vulkan wants a buffer offset that is a multiple of the texel size (VUID-vkCmdCopyBufferToImage-dstImage-07975),
1858 // which D3D12's 512-byte placement does not give a 12-byte texel: one more reason an rgb96 copy is repacked. 2253 // which D3D12's 512-byte placement does not give a 12-byte texel: one more reason an rgb96 copy is repacked.
1859 const std::uint32_t alignment = (range.aspectMask & depth_stencil_aspects) || image.rgb96 ? 4 : format.bytes; 2254 const std::uint32_t alignment = (range.aspectMask & depth_stencil_aspects) || image.rgb96 ? 4 : format.bytes;
1860 if (offset % alignment && !copy.tile_footprint) return ReplayResult::unsupported; 2255 if (offset % alignment && !copy.tile_footprint) return unsupported_at(__LINE__);
1861 const std::uint64_t rows = (std::uint64_t(h) + format.block - 1) / format.block; 2256 const std::uint64_t rows = (std::uint64_t(h) + format.block - 1) / format.block;
1862 const std::uint64_t row_bytes = (std::uint64_t(w) + format.block - 1) / format.block * format.bytes; 2257 const std::uint64_t row_bytes = (std::uint64_t(w) + format.block - 1) / format.block * format.bytes;
1863 if (!rows || !row_bytes || !within(std::uint64_t(placed_x / format.block) * format.bytes, row_bytes, placed.row_pitch) || 2258 if (!rows || !row_bytes || !within(std::uint64_t(placed_x / format.block) * format.bytes, row_bytes, placed.row_pitch) ||
@@ -1866,7 +2261,9 @@ inline ReplayResult prepare_texture_copy(const CopyTexture& copy, Prepared& p) {
1866 return ReplayResult::invalid_copy; 2261 return ReplayResult::invalid_copy;
1867 if (buffer.size > UINT64_MAX - buffer.buffer_offset) return ReplayResult::invalid_copy; 2262 if (buffer.size > UINT64_MAX - buffer.buffer_offset) return ReplayResult::invalid_copy;
1868 const VkDeviceSize backing_offset = buffer.buffer_offset + offset; 2263 const VkDeviceSize backing_offset = buffer.buffer_offset + offset;
1869 if (backing_offset % alignment && !copy.tile_footprint) return ReplayResult::unsupported; 2264 // A host-import prefix may be word aligned without being texel aligned (e.g. +4 for RGBA16).
2265 // The replay stages those copies through aligned scratch; VkBufferCopy still needs word alignment.
2266 if (backing_offset % alignment && backing_offset % 4 && !copy.tile_footprint) return unsupported_at(__LINE__);
1870 VkBufferImageCopy region{}; 2267 VkBufferImageCopy region{};
1871 region.bufferOffset = backing_offset; 2268 region.bufferOffset = backing_offset;
1872 region.bufferRowLength = placed.row_pitch / format.bytes * format.block; 2269 region.bufferRowLength = placed.row_pitch / format.bytes * format.block;
@@ -1875,7 +2272,7 @@ inline ReplayResult prepare_texture_copy(const CopyTexture& copy, Prepared& p) {
1875 region.imageOffset = {std::int32_t(texture_x), std::int32_t(texture_y), std::int32_t(texture_z)}; 2272 region.imageOffset = {std::int32_t(texture_x), std::int32_t(texture_y), std::int32_t(texture_z)};
1876 region.imageExtent = {w, h, depth}; 2273 region.imageExtent = {w, h, depth};
1877 if (image.rgb96) { // the repack's scratch replaces this buffer in the copy; these are for the pass 2274 if (image.rgb96) { // the repack's scratch replaces this buffer in the copy; these are for the pass
1878 if (placed.row_pitch / 4 > UINT32_MAX || slice_pitch / 4 > UINT32_MAX) return ReplayResult::unsupported; 2275 if (placed.row_pitch / 4 > UINT32_MAX || slice_pitch / 4 > UINT32_MAX) return unsupported_at(__LINE__);
1879 p.rgb96_row_words = std::uint32_t(placed.row_pitch / 4); 2276 p.rgb96_row_words = std::uint32_t(placed.row_pitch / 4);
1880 p.rgb96_slice_words = std::uint32_t(slice_pitch / 4); 2277 p.rgb96_slice_words = std::uint32_t(slice_pitch / 4);
1881 region.bufferRowLength = 0; 2278 region.bufferRowLength = 0;
@@ -1886,13 +2283,13 @@ inline ReplayResult prepare_texture_copy(const CopyTexture& copy, Prepared& p) {
1886 return ReplayResult::success; 2283 return ReplayResult::success;
1887} 2284}
1888 2285
1889// CopyTiles accepts arbitrary byte offsets into its linear buffer, while VkBufferImageCopy requires texel/block 2286// CopyTiles byte offsets and word-aligned imported host prefixes may violate VkBufferImageCopy texel/block
1890// alignment (VUID-vkCmdCopyBufferToImage-dstImage-07975). Stage only the occupied texels/blocks through aligned 2287// alignment (VUID-vkCmdCopyBufferToImage-dstImage-07975). Stage only the occupied texels/blocks through aligned
1891// transfer scratch; leave partial-tile padding alone. 2288// transfer scratch; leave partial-tile padding alone.
1892inline bool stage_unaligned_tile(const ReplayFunctions& vk, Prepared& p, const ResourceBinding& image, 2289inline bool stage_unaligned_tile(const ReplayFunctions& vk, Prepared& p, const ResourceBinding& image,
1893 const BlockFormat& fmt, bool upload) { 2290 const BlockFormat& fmt, bool upload) {
1894 auto& region = p.buffer_image_copies.front(); 2291 auto& region = p.buffer_image_copies.front();
1895 if (!fmt.bytes || !fmt.block || image.rgb96 || 2292 if (!vk.copy_buffer || !fmt.bytes || !fmt.block || image.rgb96 ||
1896 (image.depth24_as_float && region.imageSubresource.aspectMask == VK_IMAGE_ASPECT_DEPTH_BIT)) 2293 (image.depth24_as_float && region.imageSubresource.aspectMask == VK_IMAGE_ASPECT_DEPTH_BIT))
1897 return false; 2294 return false;
1898 const VkDeviceSize blocks_w = (VkDeviceSize(region.imageExtent.width) + fmt.block - 1) / fmt.block; 2295 const VkDeviceSize blocks_w = (VkDeviceSize(region.imageExtent.width) + fmt.block - 1) / fmt.block;
@@ -2006,15 +2403,15 @@ inline ReplayResult prepare_resolve(const ResolveSubresource& resolve, Prepared&
2006 } else if (from.width != to.width || from.height != to.height) { 2403 } else if (from.width != to.width || from.height != to.height) {
2007 return ReplayResult::invalid_copy; 2404 return ReplayResult::invalid_copy;
2008 } 2405 }
2009 if (src.aspectMask != dst.aspectMask || p.source.format != p.binding.format) return ReplayResult::unsupported; 2406 if (src.aspectMask != dst.aspectMask || p.source.format != p.binding.format) return unsupported_at(__LINE__);
2010 const auto& region = resolve.region; 2407 const auto& region = resolve.region;
2011 if (src.aspectMask == VK_IMAGE_ASPECT_COLOR_BIT) { 2408 if (src.aspectMask == VK_IMAGE_ASPECT_COLOR_BIT) {
2012 if (region && region->mode != d3d12_resolve_mode::average) return ReplayResult::unsupported; 2409 if (region && region->mode != d3d12_resolve_mode::average) return unsupported_at(__LINE__);
2013 } else { 2410 } else {
2014 // A rendering scope resolves each pixel in place, so the destination offset must be the source's. 2411 // A rendering scope resolves each pixel in place, so the destination offset must be the source's.
2015 if (!region || dst_offset.x != src_offset.x || dst_offset.y != src_offset.y || 2412 if (!region || dst_offset.x != src_offset.x || dst_offset.y != src_offset.y ||
2016 (region->mode == d3d12_resolve_mode::average && src.aspectMask != VK_IMAGE_ASPECT_DEPTH_BIT)) 2413 (region->mode == d3d12_resolve_mode::average && src.aspectMask != VK_IMAGE_ASPECT_DEPTH_BIT))
2017 return ReplayResult::unsupported; 2414 return unsupported_at(__LINE__);
2018 p.resolve_mode = region->mode == d3d12_resolve_mode::minimum ? VK_RESOLVE_MODE_MIN_BIT 2415 p.resolve_mode = region->mode == d3d12_resolve_mode::minimum ? VK_RESOLVE_MODE_MIN_BIT
2019 : region->mode == d3d12_resolve_mode::maximum ? VK_RESOLVE_MODE_MAX_BIT 2416 : region->mode == d3d12_resolve_mode::maximum ? VK_RESOLVE_MODE_MAX_BIT
2020 : VK_RESOLVE_MODE_AVERAGE_BIT; 2417 : VK_RESOLVE_MODE_AVERAGE_BIT;
@@ -2058,7 +2455,7 @@ inline ReplayResult keep_around_resolve(const ReplayFunctions& vk, Prepared& p)
2058 VkDeviceSize base = 0; 2455 VkDeviceSize base = 0;
2059 if (!texel || !vk.copy_image_to_buffer || !vk.copy_buffer_to_image || !vk.copy_scratch || 2456 if (!texel || !vk.copy_image_to_buffer || !vk.copy_buffer_to_image || !vk.copy_scratch ||
2060 !vk.copy_scratch(total, p.staged, base)) 2457 !vk.copy_scratch(total, p.staged, base))
2061 return ReplayResult::unsupported; 2458 return unsupported_at(__LINE__);
2062 for (VkBufferImageCopy& region : p.staged_reads) region.bufferOffset += base; 2459 for (VkBufferImageCopy& region : p.staged_reads) region.bufferOffset += base;
2063 return ReplayResult::success; 2460 return ReplayResult::success;
2064} 2461}
@@ -2123,6 +2520,77 @@ void round_trip(const ReplayFunctions& vk, VkCommandBuffer command_buffer, const
2123 } 2520 }
2124} 2521}
2125 2522
2523// Vulkan cannot copy a depth or stencil image aspect directly to or from a color image. The transfer
2524// buffer preserves the native D16, D32 or S8 bits. Only the requested layers and planes are copied, even when the device
2525// requires both parent aspects to transition layouts together. A storage descriptor always names GENERAL.
2526inline void copy_depth_uav(const ReplayFunctions& vk, VkCommandBuffer cb, const Prepared& p, const DepthUavCopy& copy,
2527 VkImageLayout parent_layout, LayoutTracker* tracker) {
2528 constexpr auto all = VK_PIPELINE_STAGE_ALL_COMMANDS_BIT;
2529 constexpr auto transfer = VK_PIPELINE_STAGE_TRANSFER_BIT;
2530 constexpr VkAccessFlags any = VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT;
2531 const auto parent_access = copy.to_storage ? VK_ACCESS_TRANSFER_READ_BIT : VK_ACCESS_TRANSFER_WRITE_BIT;
2532 const auto child_access = copy.to_storage ? VK_ACCESS_TRANSFER_WRITE_BIT : VK_ACCESS_TRANSFER_READ_BIT;
2533 const auto parent_range = planes_for_layout(p.binding, p.range, vk.separate_depth_stencil_layouts);
2534 image_barrier(vk, cb, p.binding, parent_range, parent_layout, VK_IMAGE_LAYOUT_GENERAL,
2535 any, all, parent_access, transfer);
2536 auto color = p.range;
2537 color.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
2538 for (unsigned plane = 0; plane < copy.storage.size(); ++plane) {
2539 const ResourceBinding& child = copy.storage[plane];
2540 if (!child.image) continue;
2541 const ResourceId child_id = plane ? p.binding.stencil_uav : p.binding.depth_uav;
2542 auto pieces = current(tracker, child_id, color, VK_IMAGE_LAYOUT_GENERAL);
2543 if (!copy.to_storage) initialize(vk, cb, child, child_id, pieces, VK_IMAGE_LAYOUT_GENERAL, tracker);
2544 for (const auto& piece : pieces)
2545 image_barrier(vk, cb, child, piece.range, piece.layout, VK_IMAGE_LAYOUT_GENERAL,
2546 piece.layout == VK_IMAGE_LAYOUT_UNDEFINED ? 0 : any, all, child_access, transfer);
2547 if (tracker) tracker->set(child_id, color, VK_IMAGE_LAYOUT_GENERAL);
2548 VkBufferImageCopy parent_region{};
2549 parent_region.bufferOffset = copy.offset;
2550 const VkImageAspectFlags aspect = plane ? VK_IMAGE_ASPECT_STENCIL_BIT : VK_IMAGE_ASPECT_DEPTH_BIT;
2551 parent_region.imageSubresource = {aspect, p.range.baseMipLevel, p.range.baseArrayLayer, p.range.layerCount};
2552 parent_region.imageExtent = {p.binding.width, p.binding.height, 1};
2553 VkBufferImageCopy child_region = parent_region;
2554 child_region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
2555 // Last use of this staging range was a read by CopyBufferToImage, possibly on the previous barrier.
2556 memory_barrier(vk, cb, VK_ACCESS_TRANSFER_READ_BIT, transfer, VK_ACCESS_TRANSFER_WRITE_BIT, transfer);
2557 // A D32 depth aspect and R32_FLOAT colour carry the same bits through transfer scratch. The
2558 // intermediate colour image permits a real normalized blit between R32_FLOAT and R16_UNORM;
2559 // shaders see the latter's exact bits through an R16_UINT view.
2560 const bool convert = plane == 0 && copy.conversion.image;
2561 const VkImage colour = convert ? copy.conversion.image : child.image;
2562 VkImageBlit blit{};
2563 if (convert) {
2564 const auto id = p.binding.depth_conversion;
2565 const auto previous = current(tracker, id, color, VK_IMAGE_LAYOUT_UNDEFINED);
2566 for (const auto& piece : previous)
2567 image_barrier(vk, cb, copy.conversion, piece.range, piece.layout, VK_IMAGE_LAYOUT_GENERAL,
2568 piece.layout == VK_IMAGE_LAYOUT_UNDEFINED ? 0 : any, all,
2569 VK_ACCESS_TRANSFER_READ_BIT | VK_ACCESS_TRANSFER_WRITE_BIT, transfer);
2570 if (tracker) tracker->set(id, color, VK_IMAGE_LAYOUT_GENERAL);
2571 blit.srcSubresource = blit.dstSubresource = child_region.imageSubresource;
2572 blit.srcOffsets[1] = blit.dstOffsets[1] = {int32_t(p.binding.width), int32_t(p.binding.height), 1};
2573 if (!copy.to_storage) {
2574 vk.blit_image(cb, child.image, VK_IMAGE_LAYOUT_GENERAL, colour, VK_IMAGE_LAYOUT_GENERAL, 1, &blit, VK_FILTER_NEAREST);
2575 memory_barrier(vk, cb, VK_ACCESS_TRANSFER_WRITE_BIT, transfer, VK_ACCESS_TRANSFER_READ_BIT, transfer);
2576 }
2577 }
2578 vk.copy_image_to_buffer(cb, copy.to_storage ? p.binding.image : colour, VK_IMAGE_LAYOUT_GENERAL,
2579 copy.scratch, 1, copy.to_storage ? &parent_region : &child_region);
2580 memory_barrier(vk, cb, VK_ACCESS_TRANSFER_WRITE_BIT, transfer, VK_ACCESS_TRANSFER_READ_BIT, transfer);
2581 vk.copy_buffer_to_image(cb, copy.scratch, copy.to_storage ? colour : p.binding.image, VK_IMAGE_LAYOUT_GENERAL,
2582 1, copy.to_storage ? &child_region : &parent_region);
2583 if (convert && copy.to_storage) {
2584 memory_barrier(vk, cb, VK_ACCESS_TRANSFER_WRITE_BIT, transfer, VK_ACCESS_TRANSFER_READ_BIT, transfer);
2585 vk.blit_image(cb, colour, VK_IMAGE_LAYOUT_GENERAL, child.image, VK_IMAGE_LAYOUT_GENERAL, 1, &blit, VK_FILTER_NEAREST);
2586 }
2587 image_barrier(vk, cb, child, color, VK_IMAGE_LAYOUT_GENERAL, VK_IMAGE_LAYOUT_GENERAL,
2588 child_access, transfer, any, all);
2589 }
2590 image_barrier(vk, cb, p.binding, parent_range, VK_IMAGE_LAYOUT_GENERAL, parent_layout,
2591 parent_access, transfer, any, all);
2592}
2593
2126} // namespace detail 2594} // namespace detail
2127 2595
2128namespace detail { 2596namespace detail {
@@ -2130,21 +2598,77 @@ namespace detail {
2130// Resolves a draw's pipeline, attachments and buffers. Attachment views take the pipeline's formats, so a 2598// Resolves a draw's pipeline, attachments and buffers. Attachment views take the pipeline's formats, so a
2131// typeless texture is viewed as the format the pipeline renders. 2599// typeless texture is viewed as the format the pipeline renders.
2132template<typename Resolve> 2600template<typename Resolve>
2133ReplayResult prepare_draw(const Draw& draw, Resolve&& resolve, const ReplayFunctions& vk, PreparedDraw& p) { 2601ReplayResult prepare_draw(const Draw& draw, const IndirectDrawArgs* arguments, Resolve&& resolve,
2602 const ReplayFunctions& vk, PreparedDraw& p) {
2603 if (arguments) {
2604 const IndirectDrawArgs& arg = *arguments;
2605 const VkDeviceSize record_size = draw.indexed ? sizeof(VkDrawIndexedIndirectCommand) : sizeof(VkDrawIndirectCommand);
2606 if (!arg.argument_buffer || !arg.max_count || arg.stride < record_size ||
2607 (arg.stride | arg.argument_offset | arg.count_offset) % 4 || (!arg.count_buffer && arg.count_offset))
2608 return ReplayResult::invalid_indirect_arguments;
2609 // No CPU peek or readback. VUID-countBuffer-02717 limits the *raw* uint32 at execution,
2610 // independently of the supplied maxDrawCount. On a device with a smaller limit an
2611 // arbitrary D3D12 count requires a GPU clamp pass; keep that case guarded for now.
2612 const bool counted = arg.count_buffer != 0;
2613 const bool entry_available = counted ? (draw.indexed ? vk.draw_indexed_indirect_count : vk.draw_indirect_count) != nullptr
2614 : (draw.indexed ? vk.draw_indexed_indirect : vk.draw_indirect) != nullptr;
2615 // The GPU supplies firstIndex/indexCount at execution (VUID-08798). A sized binding alone
2616 // does not guarantee a robust fetch, and the legacy binding covers the backing buffer's tail.
2617 const auto skip = [&](indirect_stats::Reason reason) {
2618 indirect_stats::skip(indirect_stats::Event::replay_skip, reason);
2619 p.skipped = true;
2620 return ReplayResult::success;
2621 };
2622 if (draw.mesh) return skip(indirect_stats::mesh);
2623 static_assert(indirect_stats::topology_supported(topology_rect_list) &&
2624 !indirect_stats::topology_supported(topology_quad_list));
2625 if (!indirect_stats::topology_supported(draw.topology)) return skip(indirect_stats::topology);
2626 if (!vk.draw_indirect_first_instance) return skip(indirect_stats::first_instance);
2627 if (!entry_available) return skip(indirect_stats::entry);
2628 if (draw.indexed && !vk.bind_robust_index_view) return skip(indirect_stats::robust_index);
2629 if (arg.max_count > vk.max_draw_indirect_count) return skip(indirect_stats::count_limit);
2630 if (!counted && arg.max_count > 1 && !vk.multi_draw_indirect) return skip(indirect_stats::multi_draw);
2631 if (counted && !vk.draw_indirect_count_enabled) return skip(indirect_stats::count_feature);
2632 if (counted && vk.max_draw_indirect_count != UINT32_MAX) return skip(indirect_stats::raw_count_limit);
2633 const ResourceBinding* binding = resolve(arg.argument_buffer);
2634 if (!binding || !binding->buffer) return unresolved_at(__LINE__);
2635 // Both factors are uint32_t and the cast precedes multiplication; the last
2636 // record only needs its payload, not trailing stride padding.
2637 const VkDeviceSize bytes = VkDeviceSize(arg.max_count - 1) * arg.stride + record_size;
2638 if (!indirect_range(*binding, arg.argument_offset, bytes)) return ReplayResult::invalid_indirect_arguments;
2639 if (!binding->indirect_arguments) return skip(indirect_stats::argument_usage);
2640 p.indirect_buffer = binding->buffer;
2641 p.indirect_offset = binding->buffer_offset + arg.argument_offset;
2642 if (counted) {
2643 const ResourceBinding* count = resolve(arg.count_buffer);
2644 if (!count || !count->buffer) return unresolved_at(__LINE__);
2645 if (!indirect_range(*count, arg.count_offset, sizeof(std::uint32_t)))
2646 return ReplayResult::invalid_indirect_arguments;
2647 if (!count->indirect_arguments) return skip(indirect_stats::count_usage);
2648 p.indirect_count_buffer = count->buffer;
2649 p.indirect_count_offset = count->buffer_offset + arg.count_offset;
2650 }
2651 }
2134 if (!vk.graphics_pipeline || !vk.buffer_at || !vk.image_view || !vk.begin_rendering || !vk.end_rendering || 2652 if (!vk.graphics_pipeline || !vk.buffer_at || !vk.image_view || !vk.begin_rendering || !vk.end_rendering ||
2135 !vk.bind_vertex_buffers2 || !vk.bind_index_buffer || !vk.set_viewport || !vk.set_scissor || 2653 !vk.bind_vertex_buffers2 || !vk.bind_index_buffer || !vk.set_viewport || !vk.set_scissor ||
2136 !vk.set_primitive_topology || !vk.set_primitive_restart_enable || !vk.set_stencil_reference || 2654 !vk.set_primitive_topology || !vk.set_primitive_restart_enable || !vk.set_stencil_reference ||
2137 !vk.set_blend_constants || !vk.draw || 2655 !vk.set_blend_constants || !vk.draw ||
2138 !vk.draw_indexed || !vk.bind_pipeline || !vk.push_constants) 2656 !vk.draw_indexed || !vk.bind_pipeline || !vk.push_constants)
2139 return ReplayResult::unsupported; 2657 return unsupported_at(__LINE__);
2140 const GraphicsPipeline* pipeline = vk.graphics_pipeline(draw.pipeline); 2658 const GraphicsPipeline* pipeline = vk.graphics_pipeline(draw.pipeline);
2141 if (!pipeline || !pipeline->pipeline) return ReplayResult::unresolved_resource; 2659 // A null pipeline with a variant builder is one built at its first draw: variant 0 (all slots bound).
2660 if (!pipeline || (!pipeline->pipeline && !pipeline->variant)) return unresolved_at(__LINE__);
2661 if (arguments && pipeline->nonunit_vertex_divisor) {
2662 indirect_stats::skip(indirect_stats::Event::replay_skip, indirect_stats::divisor);
2663 p.skipped = true;
2664 return ReplayResult::success;
2665 }
2142 if (pipeline->mesh != draw.mesh) return ReplayResult::invalid_draw; 2666 if (pipeline->mesh != draw.mesh) return ReplayResult::invalid_draw;
2143 if (draw.mesh && !vk.draw_mesh_tasks) return ReplayResult::unsupported; 2667 if (draw.mesh && !vk.draw_mesh_tasks) return unsupported_at(__LINE__);
2144 if (pipeline->viewport_with_count && (!vk.set_viewport_with_count || !vk.set_scissor_with_count)) 2668 if (pipeline->viewport_with_count && (!vk.set_viewport_with_count || !vk.set_scissor_with_count))
2145 return ReplayResult::unsupported; 2669 return unsupported_at(__LINE__);
2146 if (pipeline->bindless_set && !vk.bind_descriptor_sets) return ReplayResult::unsupported; 2670 if (pipeline->bindless_set && !vk.bind_descriptor_sets) return unsupported_at(__LINE__);
2147 if (pipeline->color_formats.size() > max_render_targets) return ReplayResult::unsupported; 2671 if (pipeline->color_formats.size() > max_render_targets) return unsupported_at(__LINE__);
2148 p.graphics = pipeline; 2672 p.graphics = pipeline;
2149 p.pipeline = pipeline->pipeline; 2673 p.pipeline = pipeline->pipeline;
2150 p.area = {UINT32_MAX, UINT32_MAX}; 2674 p.area = {UINT32_MAX, UINT32_MAX};
@@ -2161,7 +2685,7 @@ ReplayResult prepare_draw(const Draw& draw, Resolve&& resolve, const ReplayFunct
2161 const TargetView& target = draw.views->render_targets[slot]; 2685 const TargetView& target = draw.views->render_targets[slot];
2162 if (!target.resource) continue; 2686 if (!target.resource) continue;
2163 const ResourceBinding* binding = resolve(target.resource); 2687 const ResourceBinding* binding = resolve(target.resource);
2164 if (!binding) return ReplayResult::unresolved_resource; 2688 if (!binding) return unresolved_at(__LINE__);
2165 auto& a = p.colors[slot]; 2689 auto& a = p.colors[slot];
2166 a.binding = *binding; 2690 a.binding = *binding;
2167 a.id = target.resource; 2691 a.id = target.resource;
@@ -2173,12 +2697,12 @@ ReplayResult prepare_draw(const Draw& draw, Resolve&& resolve, const ReplayFunct
2173 ResourceBinding viewed = a.binding; 2697 ResourceBinding viewed = a.binding;
2174 if (pipeline->color_formats[slot] != VK_FORMAT_UNDEFINED) viewed.format = pipeline->color_formats[slot]; 2698 if (pipeline->color_formats[slot] != VK_FORMAT_UNDEFINED) viewed.format = pipeline->color_formats[slot];
2175 a.view = vk.image_view(viewed, a.range); 2699 a.view = vk.image_view(viewed, a.range);
2176 if (!a.view) return ReplayResult::unsupported; 2700 if (!a.view) return unsupported_at(__LINE__);
2177 shrink(a.binding, target, a.range); 2701 shrink(a.binding, target, a.range);
2178 } 2702 }
2179 if (draw.depth.resource && pipeline->depth_format != VK_FORMAT_UNDEFINED) { 2703 if (draw.depth.resource && pipeline->depth_format != VK_FORMAT_UNDEFINED) {
2180 const ResourceBinding* binding = resolve(draw.depth.resource); 2704 const ResourceBinding* binding = resolve(draw.depth.resource);
2181 if (!binding) return ReplayResult::unresolved_resource; 2705 if (!binding) return unresolved_at(__LINE__);
2182 auto& a = p.depth; 2706 auto& a = p.depth;
2183 a.binding = *binding; 2707 a.binding = *binding;
2184 a.id = draw.depth.resource; 2708 a.id = draw.depth.resource;
@@ -2188,7 +2712,7 @@ ReplayResult prepare_draw(const Draw& draw, Resolve&& resolve, const ReplayFunct
2188 ResourceBinding viewed = a.binding; 2712 ResourceBinding viewed = a.binding;
2189 viewed.format = pipeline->depth_format; 2713 viewed.format = pipeline->depth_format;
2190 a.view = vk.image_view(viewed, a.range); 2714 a.view = vk.image_view(viewed, a.range);
2191 if (!a.view) return ReplayResult::unsupported; 2715 if (!a.view) return unsupported_at(__LINE__);
2192 shrink(a.binding, draw.depth, a.range); 2716 shrink(a.binding, draw.depth, a.range);
2193 } 2717 }
2194 if (p.area.width == UINT32_MAX) { // no attachment: the viewports bound the rendering 2718 if (p.area.width == UINT32_MAX) { // no attachment: the viewports bound the rendering
@@ -2208,12 +2732,30 @@ ReplayResult prepare_draw(const Draw& draw, Resolve&& resolve, const ReplayFunct
2208 // Slots the pipeline has a format for but the draw leaves unbound take a variant whose format there is 2732 // Slots the pipeline has a format for but the draw leaves unbound take a variant whose format there is
2209 // VK_FORMAT_UNDEFINED: D3D12 discards those writes, Vulkan wants the formats to match the attachments. 2733 // VK_FORMAT_UNDEFINED: D3D12 discards those writes, Vulkan wants the formats to match the attachments.
2210 std::uint32_t unbound = 0; 2734 std::uint32_t unbound = 0;
2735 if (pipeline->rectangle_variant_topology && draw.topology == pipeline->rectangle_variant_topology)
2736 unbound |= GraphicsPipeline::rectangle_stage;
2211 for (std::size_t slot = 0; slot < p.colors.size(); ++slot) 2737 for (std::size_t slot = 0; slot < p.colors.size(); ++slot)
2212 if (pipeline->color_formats[slot] != VK_FORMAT_UNDEFINED && !p.colors[slot].id) unbound |= 1u << slot; 2738 if (pipeline->color_formats[slot] != VK_FORMAT_UNDEFINED && !p.colors[slot].id) unbound |= 1u << slot;
2213 if (pipeline->depth_format != VK_FORMAT_UNDEFINED && !p.depth.id) unbound |= GraphicsPipeline::unbound_depth; 2739 if (pipeline->depth_format != VK_FORMAT_UNDEFINED && !p.depth.id) unbound |= GraphicsPipeline::unbound_depth;
2214 if (unbound) { 2740 if (unbound || !p.pipeline) {
2215 p.pipeline = pipeline->variant ? pipeline->variant(unbound) : VK_NULL_HANDLE; 2741 const bool indirect_rect_variant = arguments && (unbound & GraphicsPipeline::rectangle_stage);
2216 if (!p.pipeline) return ReplayResult::unsupported; 2742 if (vk.compiles && pipeline->variant && pipeline->built && !pipeline->async_build && !indirect_rect_variant) {
2743 p.pipeline = pipeline->built(unbound);
2744 if (!p.pipeline) p.compile = vk.compiles->add(*pipeline, unbound);
2745 } else {
2746 p.pipeline = pipeline->variant ? pipeline->variant(unbound) : VK_NULL_HANDLE;
2747 if (!p.pipeline && pipeline->async_build && !strict_replay()) {
2748 if (arguments) indirect_stats::skip(indirect_stats::Event::replay_skip, indirect_stats::pending_pipeline);
2749 p.skipped = true;
2750 return ReplayResult::success;
2751 }
2752 if (!p.pipeline && !pipeline->async_build && indirect_rect_variant) {
2753 indirect_stats::skip(indirect_stats::Event::replay_skip, indirect_stats::topology);
2754 p.skipped = true;
2755 return ReplayResult::success;
2756 }
2757 if (!p.pipeline) return unsupported_at(__LINE__);
2758 }
2217 } 2759 }
2218 2760
2219 // An unbound vertex-buffer slot reads zeros, as in D3D12: the zero page with stride 0. Per-instance slots with 2761 // An unbound vertex-buffer slot reads zeros, as in D3D12: the zero page with stride 0. Per-instance slots with
@@ -2227,7 +2769,7 @@ ReplayResult prepare_draw(const Draw& draw, Resolve&& resolve, const ReplayFunct
2227 const bool bound = draw.views && slot < draw.views->vertex_buffers.size() && 2769 const bool bound = draw.views && slot < draw.views->vertex_buffers.size() &&
2228 draw.views->vertex_buffers[slot].va; 2770 draw.views->vertex_buffers[slot].va;
2229 if (!bound) { 2771 if (!bound) {
2230 if (!vk.zero_buffer) return ReplayResult::unresolved_resource; 2772 if (!vk.zero_buffer) return unresolved_at(__LINE__);
2231 p.vertex_buffers[slot] = vk.zero_buffer; 2773 p.vertex_buffers[slot] = vk.zero_buffer;
2232 p.vertex_offsets[slot] = vk.zero_offset; 2774 p.vertex_offsets[slot] = vk.zero_offset;
2233 p.vertex_sizes[slot] = vk.zero_size; 2775 p.vertex_sizes[slot] = vk.zero_size;
@@ -2236,28 +2778,102 @@ ReplayResult prepare_draw(const Draw& draw, Resolve&& resolve, const ReplayFunct
2236 } 2778 }
2237 const VertexBufferView& view = draw.views->vertex_buffers[slot]; 2779 const VertexBufferView& view = draw.views->vertex_buffers[slot];
2238 std::uint64_t size = view.size; 2780 std::uint64_t size = view.size;
2239 if (!vk.buffer_at(view.va, size, p.vertex_buffers[slot], p.vertex_offsets[slot])) 2781 if (!vk.buffer_at(view.va, size, p.vertex_buffers[slot], p.vertex_offsets[slot])) {
2240 return ReplayResult::unresolved_resource; 2782 size = view.size;
2783 if (!vk.title_memory || !vk.title_memory(view.va, size, p.vertex_buffers[slot], p.vertex_offsets[slot])) {
2784 static std::atomic<unsigned> logged{0}; // LOCAL DIAGNOSTIC: where the unresolved vertex data lives
2785 if (logged.fetch_add(1, std::memory_order_relaxed) < 24)
2786 std::fprintf(stderr, "[rt] replay: vertex buffer slot %u va 0x%llx size %llu stride %u names no buffer\n",
2787 slot, static_cast<unsigned long long>(view.va),
2788 static_cast<unsigned long long>(view.size), unsigned(view.stride));
2789 return unresolved_at(__LINE__);
2790 }
2791 }
2241 p.vertex_sizes[slot] = size; 2792 p.vertex_sizes[slot] = size;
2242 p.vertex_strides[slot] = (pipeline->zero_step_slots & (1u << slot)) ? 0 : view.stride; 2793 p.vertex_strides[slot] = (pipeline->zero_step_slots & (1u << slot)) ? 0 : view.stride;
2243 } 2794 }
2795 // A non-indexed quad list is drawn from the shared triangle index buffer (emit).
2796 if (!draw.indexed && !draw.mesh && draw.topology == topology_quad_list && !vk.quad_indices)
2797 return unresolved_at(__LINE__);
2244 if (draw.indexed) { 2798 if (draw.indexed) {
2799 if (arguments && (!draw.index.va || (draw.index.format != 57 && draw.index.format != 42) ||
2800 draw.index.size < (draw.index.format == 57 ? 2u : 4u) ||
2801 !within(draw.index.va, draw.index.size, UINT64_MAX))) {
2802 indirect_stats::skip(indirect_stats::Event::replay_skip, indirect_stats::index_view);
2803 p.skipped = true;
2804 return ReplayResult::success;
2805 }
2245 if (draw.index.format == 57) p.index_type = VK_INDEX_TYPE_UINT16; 2806 if (draw.index.format == 57) p.index_type = VK_INDEX_TYPE_UINT16;
2246 else if (draw.index.format == 42) p.index_type = VK_INDEX_TYPE_UINT32; 2807 else if (draw.index.format == 42) p.index_type = VK_INDEX_TYPE_UINT32;
2247 else if (draw.index.va) return ReplayResult::unsupported; 2808 else if (draw.index.va) return unsupported_at(__LINE__);
2248 if (!draw.index.va) { // no index buffer: every index reads 0 2809 if (!draw.index.va) { // no index buffer: every index reads 0
2249 if (!vk.zero_buffer) return ReplayResult::unresolved_resource; 2810 if (!vk.zero_buffer) return unresolved_at(__LINE__);
2250 p.index_buffer = vk.zero_buffer; 2811 p.index_buffer = vk.zero_buffer;
2251 p.index_offset = vk.zero_offset; 2812 p.index_offset = vk.zero_offset;
2252 } else { 2813 } else {
2253 std::uint64_t size = draw.index.size; 2814 std::uint64_t size = draw.index.size;
2254 if (!vk.buffer_at(draw.index.va, size, p.index_buffer, p.index_offset)) 2815 if (!vk.buffer_at(draw.index.va, size, p.index_buffer, p.index_offset)) {
2255 return ReplayResult::unresolved_resource; 2816 size = draw.index.size;
2817 if (!vk.title_memory || !vk.title_memory(draw.index.va, size, p.index_buffer, p.index_offset)) {
2818 static std::atomic<unsigned> logged{0}; // LOCAL DIAGNOSTIC
2819 if (logged.fetch_add(1, std::memory_order_relaxed) < 24)
2820 std::fprintf(stderr, "[rt] replay: index buffer va 0x%llx size %llu names no buffer\n",
2821 static_cast<unsigned long long>(draw.index.va),
2822 static_cast<unsigned long long>(draw.index.size));
2823 return unresolved_at(__LINE__);
2824 }
2825 }
2826 p.index_size = size;
2827 if (arguments && (!p.index_buffer || size < draw.index.size ||
2828 !within(p.index_offset, draw.index.size, UINT64_MAX) ||
2829 p.index_offset % (draw.index.format == 57 ? 2u : 4u))) {
2830 indirect_stats::skip(indirect_stats::Event::replay_skip, indirect_stats::index_range);
2831 p.skipped = true;
2832 return ReplayResult::success;
2833 }
2256 } 2834 }
2257 } 2835 }
2258 return ReplayResult::success; 2836 return ReplayResult::success;
2259} 2837}
2260 2838
2839// A compute pipeline that is built on first use: the one built already, the one vk.compiles will build with the
2840// submission's others (true, with p.compile set and no pipeline yet), or the one built here.
2841inline bool first_use(const ComputePipeline& pipeline, PipelineCompiles::User user, const ReplayFunctions& vk, Prepared& p) {
2842 if (p.pipeline.pipeline || !pipeline.build) return p.pipeline.pipeline != VK_NULL_HANDLE;
2843 if (vk.compiles && pipeline.built && !pipeline.async_build && !pipeline.skipped &&
2844 (!pipeline.bindless_set || vk.bind_descriptor_sets)) {
2845 p.pipeline.pipeline = pipeline.built(pipeline.build_context);
2846 if (!p.pipeline.pipeline) p.compile = vk.compiles->add(pipeline, user);
2847 return true;
2848 }
2849 p.pipeline.pipeline = pipeline.build(pipeline.build_context);
2850 return p.pipeline.pipeline != VK_NULL_HANDLE;
2851}
2852
2853// An indexed quad list (D3D_PRIMITIVE_TOPOLOGY 19): the scratch and the compute job that turn the application's
2854// indices into triangle-list indices (quad_index_expand.h). `p` is the draw as prepare_draw left it. A draw of
2855// fewer than four indices has no quad and needs nothing.
2856inline ReplayResult prepare_quad_indices(const Draw& draw, const ReplayFunctions& vk, PreparedDraw& p) {
2857 const std::uint32_t quads = draw.count / 4;
2858 if (!quads) return ReplayResult::success;
2859 if (!vk.prepare_quad_indices || !vk.emit_quad_indices || !vk.copy_scratch ||
2860 quads > QuadIndexExpander::max_quads)
2861 return ReplayResult::unsupported;
2862 // The indices from the draw's first one that the view holds; the pass reads the rest as 0, like D3D12. With no
2863 // index buffer (the zero page) that is all of them.
2864 const std::uint32_t index_bytes = p.index_type == VK_INDEX_TYPE_UINT16 ? 2 : 4;
2865 const std::uint64_t in_view = p.index_size / index_bytes;
2866 const std::uint64_t readable = in_view > draw.first ? in_view - draw.first : 0;
2867 const VkDeviceSize first = readable ? p.index_offset + VkDeviceSize(draw.first) * index_bytes : p.index_offset;
2868 VkBuffer scratch = VK_NULL_HANDLE;
2869 VkDeviceSize scratch_offset = 0;
2870 if (!vk.copy_scratch(QuadIndexExpander::bytes(quads), scratch, scratch_offset) ||
2871 !vk.prepare_quad_indices(p.index_buffer, first, p.index_type, readable, quads, scratch, scratch_offset,
2872 p.quad_indices))
2873 return ReplayResult::unsupported;
2874 return ReplayResult::success;
2875}
2876
2261inline bool strip_topology(VkPrimitiveTopology topology) { 2877inline bool strip_topology(VkPrimitiveTopology topology) {
2262 return topology == VK_PRIMITIVE_TOPOLOGY_LINE_STRIP || topology == VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP || 2878 return topology == VK_PRIMITIVE_TOPOLOGY_LINE_STRIP || topology == VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP ||
2263 topology == VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY || 2879 topology == VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY ||
@@ -2275,6 +2891,10 @@ inline VkPrimitiveTopology vulkan_topology(std::uint32_t topology) {
2275 case 11: return VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY; 2891 case 11: return VK_PRIMITIVE_TOPOLOGY_LINE_STRIP_WITH_ADJACENCY;
2276 case 12: return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY; 2892 case 12: return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST_WITH_ADJACENCY;
2277 case 13: return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY; 2893 case 13: return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_STRIP_WITH_ADJACENCY;
2894 // Rectangles draw as triangle lists through a geometry stage, quads as triangle lists through indices: the
2895 // shared ones for a non-indexed draw, the application's own, expanded, for an indexed one (emit).
2896 case topology_rect_list: return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
2897 case topology_quad_list: return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
2278 default: return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST; 2898 default: return VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
2279 } 2899 }
2280} 2900}
@@ -2332,6 +2952,7 @@ public:
2332 // The draws' own data, by Prepared::draw. Kept from one execution to the next like the PreparedList itself: the 2952 // The draws' own data, by Prepared::draw. Kept from one execution to the next like the PreparedList itself: the
2333 // first draw_count entries are this list's, and the rest keep their vectors' storage for later draws. 2953 // first draw_count entries are this list's, and the rest keep their vectors' storage for later draws.
2334 std::vector<detail::PreparedDraw> draws; 2954 std::vector<detail::PreparedDraw> draws;
2955 std::vector<detail::DepthUavCopy> depth_uav_copies;
2335 std::size_t draw_count = 0; 2956 std::size_t draw_count = 0;
2336 std::vector<detail::PreparedQuery> queries; 2957 std::vector<detail::PreparedQuery> queries;
2337 VkQueryPool segment_pool = VK_NULL_HANDLE; 2958 VkQueryPool segment_pool = VK_NULL_HANDLE;
@@ -2360,6 +2981,52 @@ public:
2360 std::vector<detail::PreparedKhrPostbuild> khr_postbuilds; 2981 std::vector<detail::PreparedKhrPostbuild> khr_postbuilds;
2361}; 2982};
2362 2983
2984// Checks the outcomes of a compiled PipelineCompiles batch against `result` (the first prepare() failure, if any).
2985// Every use in `compiles` comes from a command before the one that failed, so a pipeline that cannot be built counts
2986// first, at the earliest command that uses it: it fails the list of a draw or an indirect dispatch, and a dispatch is
2987// dropped as prepare() drops one. Non-strict failed dispatches already logged in `prior` are not logged twice.
2988inline ReplayResult check_compiled_pipelines(const PipelineCompiles& compiles, ReplayResult result,
2989 const PipelineCompiles* prior = nullptr) {
2990 for (const PipelineCompiles::Use& use : compiles.uses()) {
2991 if (compiles.built(use.ticket)) continue;
2992 if (use.user == PipelineCompiles::User::draw) return unsupported_at(__LINE__);
2993 if (use.user == PipelineCompiles::User::indirect_dispatch || strict_replay()) return unresolved_at(__LINE__);
2994 if (!prior || !prior->contains_ticket(compiles, use.ticket)) unresolved_at(__LINE__);
2995 }
2996 return result;
2997}
2998
2999inline ReplayResult finish_compiled_pipelines(const PipelineCompiles& compiles, std::span<PreparedList> lists,
3000 ReplayResult result, const PipelineCompiles* prior = nullptr) {
3001 const ReplayResult checked = check_compiled_pipelines(compiles, result, prior);
3002 if (checked != ReplayResult::success) return checked;
3003 for (PreparedList& list : lists) {
3004 for (detail::Prepared& command : list.commands)
3005 if (command.compile) command.pipeline.pipeline = compiles.built(command.compile);
3006 for (std::size_t i = 0; i < list.draw_count; ++i)
3007 if (list.draws[i].compile) list.draws[i].pipeline = compiles.built(list.draws[i].compile);
3008 }
3009 return checked;
3010}
3011
3012// Ends the preparation of a submission whose prepare() calls used `compiles` and returned `result` (the first that
3013// failed, if any): builds the pipelines through run(count, job), puts them into `lists`, and returns what the calls would
3014// have returned had they built each pipeline themselves.
3015template<typename Run>
3016ReplayResult build_pipelines(PipelineCompiles& compiles, std::span<PreparedList> lists, ReplayResult result,
3017 Run&& run, const PipelineCompiles* prior = nullptr) {
3018 if (compiles.empty()) return result;
3019 compiles.build(run, prior);
3020 return finish_compiled_pipelines(compiles, lists, result, prior);
3021}
3022
3023inline ReplayResult build_pipelines_serial(PipelineCompiles& compiles, std::span<PreparedList> lists,
3024 ReplayResult result, const PipelineCompiles* prior = nullptr) {
3025 if (compiles.empty()) return result;
3026 compiles.build_serial(prior);
3027 return finish_compiled_pipelines(compiles, lists, result, prior);
3028}
3029
2363inline ReplayResult plan_occlusion_segments(PreparedList& out) { 3030inline ReplayResult plan_occlusion_segments(PreparedList& out) {
2364 // Active logical queries cover a contiguous range of physical slots. A Begin or End closes the old 3031 // Active logical queries cover a contiguous range of physical slots. A Begin or End closes the old
2365 // slot and opens a new one if any query remains active. Each shared interval is recorded only once. 3032 // slot and opens a new one if any query remains active. Each shared interval is recorded only once.
@@ -2391,6 +3058,17 @@ inline ReplayResult plan_occlusion_segments(PreparedList& out) {
2391 return active.empty() ? ReplayResult::success : ReplayResult::invalid_query; 3058 return active.empty() ? ReplayResult::success : ReplayResult::invalid_query;
2392} 3059}
2393 3060
3061// True for a command that records a compute dispatch of the layer's own before the application's work: a predicate
3062// capture, a predicated copy, a depth24 or rgb96 conversion, the count clamp of an ExecuteIndirect dispatch, or the
3063// index expansion of an indexed quad list (which is also a draw).
3064inline bool has_helper_dispatch(const PreparedList& out, std::size_t i) {
3065 const auto& p = out.commands[i];
3066 if (p.predicate.scratch || !p.predicated_copy.empty() || p.has_depth24 || p.counted_dispatch.indirect)
3067 return true;
3068 return std::holds_alternative<Draw>(out.list->commands()[i]) && p.draw < out.draws.size() &&
3069 out.draws[p.draw].quad_indices.buffer;
3070}
3071
2394// Helper dispatches must not contribute to the application's CSInvocations (D3D-162). Query resolves and 3072// Helper dispatches must not contribute to the application's CSInvocations (D3D-162). Query resolves and
2395// ordinary helper commands share one sequence of physical statistics segments. Resolve dispatch requirements 3073// ordinary helper commands share one sequence of physical statistics segments. Resolve dispatch requirements
2396// depend on heap state at planning time, so every non-timestamp resolve splits conservatively. 3074// depend on heap state at planning time, so every non-timestamp resolve splits conservatively.
@@ -2426,14 +3104,13 @@ inline void plan_statistics_segments(PreparedList& out) {
2426 const auto commands = out.list->commands(); 3104 const auto commands = out.list->commands();
2427 for (std::size_t i = 0; i < out.commands.size(); ++i) { 3105 for (std::size_t i = 0; i < out.commands.size(); ++i) {
2428 auto& p = out.commands[i]; 3106 auto& p = out.commands[i];
2429 if (begin && (p.predicate.scratch || !p.predicated_copy.empty() || p.has_depth24 || 3107 if (begin && (has_helper_dispatch(out, i) || p.indirect_clamp.buffer)) {
2430 p.counted_dispatch.indirect)) {
2431 inner.push_back({&p.statistics_end, &p.statistics_begin, -1}); 3108 inner.push_back({&p.statistics_end, &p.statistics_begin, -1});
2432 splits = true; 3109 splits = true;
2433 } 3110 }
2434 if (begin) { 3111 if (begin) {
2435 int kind = -1; 3112 int kind = -1;
2436 if (const auto* draw = std::get_if<Draw>(&commands[i])) kind = draw->mesh ? 1 : 0; 3113 if (const auto* draw = draw_command(commands[i]).state) kind = draw->mesh ? 1 : 0;
2437 else if (const auto* indirect = std::get_if<ExecuteIndirect>(&commands[i])) 3114 else if (const auto* indirect = std::get_if<ExecuteIndirect>(&commands[i]))
2438 kind = indirect->kind == IndirectKind::dispatch ? -1 : 0; 3115 kind = indirect->kind == IndirectKind::dispatch ? -1 : 0;
2439 if (kind >= 0) inner.push_back({&p.statistics_end, &p.statistics_begin, kind}); 3116 if (kind >= 0) inner.push_back({&p.statistics_end, &p.statistics_begin, kind});
@@ -2512,17 +3189,23 @@ inline ReplayResult plan_overlapping_statistics_segments(PreparedList& out) {
2512 query = &out.queries[next_query++]; 3189 query = &out.queries[next_query++];
2513 if (!query) { 3190 if (!query) {
2514 // A helper dispatch while a query runs would be counted into it (D3D-162): close the shared physical 3191 // A helper dispatch while a query runs would be counted into it (D3D-162): close the shared physical
2515 // segment before it and open a new one after, the way resolves do. 3192 // segment before it and open a new one after, the way resolves do. An indexed quad list is a helper and
2516 if (!active.empty() && (p.predicate.scratch || !p.predicated_copy.empty() || p.has_depth24 || 3193 // a draw: the new segment is the one its draw runs in, and its kind is recorded below.
2517 p.counted_dispatch.indirect)) { 3194 if (!active.empty() && has_helper_dispatch(out, i)) {
3195 p.statistics_end = current;
3196 current = open();
3197 p.statistics_begin = current;
3198 } else if (!active.empty() && p.indirect_clamp.buffer) {
2518 p.statistics_end = current; 3199 p.statistics_end = current;
2519 current = open(); 3200 current = open();
2520 p.statistics_begin = current; 3201 p.statistics_begin = current;
3202 // A clamped draw is also the first vertex draw of this segment.
3203 if (draw_command(commands[i]).state) kind = 0;
2521 continue; 3204 continue;
2522 } 3205 }
2523 // A draw of the other kind than the open segment's starts a segment in its own pool (D3D-291). 3206 // A draw of the other kind than the open segment's starts a segment in its own pool (D3D-291).
2524 int draw = -1; 3207 int draw = -1;
2525 if (const auto* d = std::get_if<Draw>(&commands[i])) draw = d->mesh ? 1 : 0; 3208 if (const auto* d = draw_command(commands[i]).state) draw = d->mesh ? 1 : 0;
2526 else if (const auto* indirect = std::get_if<ExecuteIndirect>(&commands[i])) 3209 else if (const auto* indirect = std::get_if<ExecuteIndirect>(&commands[i]))
2527 draw = indirect->kind == IndirectKind::dispatch ? -1 : 0; 3210 draw = indirect->kind == IndirectKind::dispatch ? -1 : 0;
2528 if (!active.empty() && draw >= 0) { 3211 if (!active.empty() && draw >= 0) {
@@ -2610,6 +3293,13 @@ inline bool zero_clear_unavailable(const PreparedList& prepared, const ReplayFun
2610 }, 3293 },
2611 command); 3294 command);
2612 if (missing(id, p.binding, p.range)) return true; 3295 if (missing(id, p.binding, p.range)) return true;
3296 if (p.depth_uav_copy != UINT32_MAX) {
3297 const auto& copy = prepared.depth_uav_copies[p.depth_uav_copy];
3298 auto color = p.range;
3299 color.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
3300 if (!copy.to_storage && (missing(p.binding.depth_uav, copy.storage[0], color) ||
3301 missing(p.binding.stencil_uav, copy.storage[1], color))) return true;
3302 }
2613 } 3303 }
2614 return false; 3304 return false;
2615} 3305}
@@ -2627,6 +3317,7 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2627 out.list = &list; 3317 out.list = &list;
2628 out.commands.assign(commands.size(), {}); 3318 out.commands.assign(commands.size(), {});
2629 out.draw_count = 0; 3319 out.draw_count = 0;
3320 out.depth_uav_copies.clear();
2630 out.queries.clear(); 3321 out.queries.clear();
2631 out.segment_pool = VK_NULL_HANDLE; 3322 out.segment_pool = VK_NULL_HANDLE;
2632 out.segment_base = out.segment_count = 0; 3323 out.segment_base = out.segment_count = 0;
@@ -2652,11 +3343,66 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2652 // segment pool, and overlapping statistics split into the statistics pool (D3D-252); a physical query of a 3343 // segment pool, and overlapping statistics split into the statistics pool (D3D-252); a physical query of a
2653 // type is still open at most once at any point, because each event closes the one open slot and opens a new 3344 // type is still open at most once at any point, because each event closes the one open slot and opens a new
2654 // one. The occlusion kinds share their D3D12 heap, statistics have their own, so their states are separate. 3345 // one. The occlusion kinds share their D3D12 heap, statistics have their own, so their states are separate.
3346 VkDeviceAddress indirect_list_budget = 0;
2655 std::size_t ordinary_active = 0, binary_active = 0, statistics_active_count = 0; 3347 std::size_t ordinary_active = 0, binary_active = 0, statistics_active_count = 0;
2656 bool overlaps = false, statistics_overlaps = false, statistics_active = false; 3348 bool overlaps = false, statistics_overlaps = false, statistics_active = false;
2657 out.wrote_readback = false; 3349 out.wrote_readback = false;
2658 out.readback_src_stages = 0; 3350 out.readback_src_stages = 0;
2659 3351
3352 // Successive plane transfers use the same transient range and order their buffer accesses in emit().
3353 VkBuffer plane_scratch = VK_NULL_HANDLE;
3354 VkDeviceSize plane_capacity = 0, plane_offset = 0;
3355 const auto prepare_depth_uav = [&](detail::Prepared& p, bool before, bool after) {
3356 if (!p.binding.depth_uav && !p.binding.stencil_uav) return ReplayResult::success;
3357 if (before == after) {
3358 p.order_depth_uav = after;
3359 return ReplayResult::success;
3360 }
3361 if (!vk.copy_image_to_buffer || !vk.copy_buffer_to_image || !vk.copy_scratch)
3362 return ReplayResult::unsupported;
3363 if (!vk.graphics_family) {
3364 // Coupled layouts can also need to zero-initialize the sibling plane on first use.
3365 const auto aspects = detail::planes_for_layout(p.binding, p.range, vk.separate_depth_stencil_layouts).aspectMask;
3366 if (!(vk.queue_stages & VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT) || !vk.compute_copy_aspects ||
3367 (vk.compute_copy_aspects(p.binding.format) & aspects) != aspects)
3368 return ReplayResult::unsupported;
3369 }
3370 if (p.range.baseMipLevel || p.range.levelCount != 1) return ReplayResult::unsupported;
3371 detail::DepthUavCopy copy{};
3372 if (p.binding.depth_conversion && (p.range.aspectMask & VK_IMAGE_ASPECT_DEPTH_BIT)) {
3373 if (!vk.graphics_family || !vk.blit_image) return ReplayResult::unsupported;
3374 const auto* middle = resolve(p.binding.depth_conversion);
3375 if (!middle || !middle->image) return ReplayResult::unresolved_resource;
3376 copy.conversion = *middle;
3377 }
3378 const ResourceId ids[] = {p.binding.depth_uav, p.binding.stencil_uav};
3379 for (unsigned plane = 0; plane < 2; ++plane) {
3380 const auto aspect = plane ? VK_IMAGE_ASPECT_STENCIL_BIT : VK_IMAGE_ASPECT_DEPTH_BIT;
3381 if (!(p.range.aspectMask & aspect)) continue;
3382 const auto* child = resolve(ids[plane]);
3383 if (!child || !child->image) return ReplayResult::unresolved_resource;
3384 copy.storage[plane] = *child;
3385 }
3386 const VkDeviceSize texels = VkDeviceSize(p.binding.width) * p.binding.height;
3387 const auto largest_aspect = p.range.aspectMask & VK_IMAGE_ASPECT_DEPTH_BIT ? VK_IMAGE_ASPECT_DEPTH_BIT :
3388 VK_IMAGE_ASPECT_STENCIL_BIT;
3389 const VkDeviceSize bytes_per_texel = block_format(p.binding.format, largest_aspect).bytes;
3390 if (!texels || !bytes_per_texel || texels > UINT64_MAX / bytes_per_texel / p.range.layerCount)
3391 return ReplayResult::unsupported;
3392 const VkDeviceSize bytes = texels * bytes_per_texel * p.range.layerCount;
3393 if (bytes > plane_capacity) {
3394 if (!vk.copy_scratch(bytes, plane_scratch, plane_offset) || !plane_scratch || plane_offset % 4)
3395 return ReplayResult::unsupported;
3396 plane_capacity = bytes;
3397 }
3398 copy.scratch = plane_scratch;
3399 copy.offset = plane_offset;
3400 copy.to_storage = after;
3401 p.depth_uav_copy = static_cast<std::uint32_t>(out.depth_uav_copies.size());
3402 out.depth_uav_copies.push_back(copy);
3403 return ReplayResult::success;
3404 };
3405
2660 for (std::size_t i = 0; i < commands.size(); ++i) { 3406 for (std::size_t i = 0; i < commands.size(); ++i) {
2661 const auto& command = commands[i]; 3407 const auto& command = commands[i];
2662 auto& p = out.commands[i]; 3408 auto& p = out.commands[i];
@@ -2667,7 +3413,7 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2667 }; 3413 };
2668 const auto rect_view = [&](std::span<const Rect> rects, const TargetView& target, VkImageAspectFlags view_aspects) { 3414 const auto rect_view = [&](std::span<const Rect> rects, const TargetView& target, VkImageAspectFlags view_aspects) {
2669 if (rects.empty()) return ReplayResult::success; 3415 if (rects.empty()) return ReplayResult::success;
2670 if (!rendering) return ReplayResult::unsupported; 3416 if (!rendering) return unsupported_at(__LINE__);
2671 detail::clip(rects, detail::mip_extent(p.binding, target.mip), target.layer_count, p.rects); 3417 detail::clip(rects, detail::mip_extent(p.binding, target.mip), target.layer_count, p.rects);
2672 if (p.rects.empty()) { 3418 if (p.rects.empty()) {
2673 p.skip = true; 3419 p.skip = true;
@@ -2687,24 +3433,39 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2687 }; 3433 };
2688 3434
2689 if (const auto* transition = std::get_if<TransitionBarrier>(&command)) { 3435 if (const auto* transition = std::get_if<TransitionBarrier>(&command)) {
2690 if (!bind(transition->resource)) return ReplayResult::unresolved_resource; 3436 if (!bind(transition->resource)) return unresolved_at(__LINE__);
2691 if (p.binding.image == VK_NULL_HANDLE) { 3437 if (p.binding.image == VK_NULL_HANDLE) {
2692 if (transition->subresource != 0 && transition->subresource != all_subresources) 3438 if (transition->subresource != 0 && transition->subresource != all_subresources)
2693 return ReplayResult::invalid_subresource; 3439 return ReplayResult::invalid_subresource;
2694 } else if (!image_range(p.binding, transition->subresource, p.range)) { 3440 } else if (!image_range(p.binding, transition->subresource, p.range)) {
2695 return ReplayResult::invalid_subresource; 3441 return ReplayResult::invalid_subresource;
2696 } 3442 }
3443 const auto result = prepare_depth_uav(p, transition->before & d3d12_state::unordered_access,
3444 transition->after & d3d12_state::unordered_access);
3445 if (result != ReplayResult::success) return result;
2697 } else if (std::holds_alternative<GlobalBarrier>(command) || std::holds_alternative<BufferBarrier>(command)) { 3446 } else if (std::holds_alternative<GlobalBarrier>(command) || std::holds_alternative<BufferBarrier>(command)) {
2698 if (!vk.pipeline_barrier2) return ReplayResult::unsupported; 3447 if (!vk.pipeline_barrier2) return unsupported_at(__LINE__);
2699 if (const auto* buffer_barrier = std::get_if<BufferBarrier>(&command)) 3448 if (const auto* buffer_barrier = std::get_if<BufferBarrier>(&command))
2700 if (!bind(buffer_barrier->resource)) return ReplayResult::unresolved_resource; 3449 if (!bind(buffer_barrier->resource)) return unresolved_at(__LINE__);
2701 } else if (const auto* texture = std::get_if<TextureBarrier>(&command)) { 3450 } else if (const auto* texture = std::get_if<TextureBarrier>(&command)) {
2702 if (!vk.pipeline_barrier2) return ReplayResult::unsupported; 3451 if (!vk.pipeline_barrier2) return unsupported_at(__LINE__);
2703 if (!bind(texture->resource)) return ReplayResult::unresolved_resource; 3452 if (!bind(texture->resource)) return unresolved_at(__LINE__);
2704 if (!p.binding.image || !barrier_range(p.binding, texture->range, p.range)) 3453 if (!p.binding.image || !barrier_range(p.binding, texture->range, p.range))
2705 return ReplayResult::invalid_subresource; 3454 return ReplayResult::invalid_subresource;
3455 // In a queue-specific COMMON layout shaders can write a UAV then read the SRV or copy the
3456 // parent after only a global barrier. Bindless shaders need no per-resource bind command, so
3457 // there is no observable ownership transition at which to synchronize the two images.
3458 if (p.binding.depth_uav &&
3459 (detail::unsupported_depth_uav_access(texture->layout_before, texture->access_before) ||
3460 detail::unsupported_depth_uav_access(texture->layout_after, texture->access_after)))
3461 return ReplayResult::unsupported;
3462 if (!(texture->flags & texture_barrier_discard) && texture->layout_before != d3d12_layout::undefined) {
3463 const auto result = prepare_depth_uav(p, detail::texture_uav_layout(texture->layout_before),
3464 detail::texture_uav_layout(texture->layout_after));
3465 if (result != ReplayResult::success) return result;
3466 }
2706 } else if (const auto* color_clear = std::get_if<ClearRenderTarget>(&command)) { 3467 } else if (const auto* color_clear = std::get_if<ClearRenderTarget>(&command)) {
2707 if (!bind(color_clear->target.resource)) return ReplayResult::unresolved_resource; 3468 if (!bind(color_clear->target.resource)) return unresolved_at(__LINE__);
2708 if (!p.binding.image || p.binding.aspects != VK_IMAGE_ASPECT_COLOR_BIT) return ReplayResult::invalid_clear; 3469 if (!p.binding.image || p.binding.aspects != VK_IMAGE_ASPECT_COLOR_BIT) return ReplayResult::invalid_clear;
2709 if (!detail::view_range(p.binding, color_clear->target, VK_IMAGE_ASPECT_COLOR_BIT, p.range)) 3470 if (!detail::view_range(p.binding, color_clear->target, VK_IMAGE_ASPECT_COLOR_BIT, p.range))
2710 return ReplayResult::invalid_subresource; 3471 return ReplayResult::invalid_subresource;
@@ -2724,9 +3485,9 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2724 VK_IMAGE_ASPECT_COLOR_BIT); r != ReplayResult::success) return r; 3485 VK_IMAGE_ASPECT_COLOR_BIT); r != ReplayResult::success) return r;
2725 } else if (const auto r = rect_view(clear_rects(color_clear->rects), color_clear->target, VK_IMAGE_ASPECT_COLOR_BIT); 3486 } else if (const auto r = rect_view(clear_rects(color_clear->rects), color_clear->target, VK_IMAGE_ASPECT_COLOR_BIT);
2726 r != ReplayResult::success) return r; 3487 r != ReplayResult::success) return r;
2727 if (!p.skip && p.rects.empty() && !vk.clear_color_image) return ReplayResult::unsupported; 3488 if (!p.skip && p.rects.empty() && !vk.clear_color_image) return unsupported_at(__LINE__);
2728 } else if (const auto* depth_clear = std::get_if<ClearDepthStencil>(&command)) { 3489 } else if (const auto* depth_clear = std::get_if<ClearDepthStencil>(&command)) {
2729 if (!bind(depth_clear->target.resource)) return ReplayResult::unresolved_resource; 3490 if (!bind(depth_clear->target.resource)) return unresolved_at(__LINE__);
2730 VkImageAspectFlags aspects = 0; 3491 VkImageAspectFlags aspects = 0;
2731 if (depth_clear->flags & clear_depth) aspects |= VK_IMAGE_ASPECT_DEPTH_BIT; 3492 if (depth_clear->flags & clear_depth) aspects |= VK_IMAGE_ASPECT_DEPTH_BIT;
2732 if (depth_clear->flags & clear_stencil) aspects |= VK_IMAGE_ASPECT_STENCIL_BIT; 3493 if (depth_clear->flags & clear_stencil) aspects |= VK_IMAGE_ASPECT_STENCIL_BIT;
@@ -2743,12 +3504,12 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2743 if (const auto r = rect_view(clear_rects(depth_clear->rects), depth_clear->target, p.binding.aspects); 3504 if (const auto r = rect_view(clear_rects(depth_clear->rects), depth_clear->target, p.binding.aspects);
2744 r != ReplayResult::success) 3505 r != ReplayResult::success)
2745 return r; 3506 return r;
2746 if (!p.skip && p.rects.empty() && !vk.clear_depth_stencil_image) return ReplayResult::unsupported; 3507 if (!p.skip && p.rects.empty() && !vk.clear_depth_stencil_image) return unsupported_at(__LINE__);
2747 } else if (const auto* uav = std::get_if<ClearUnorderedAccess>(&command)) { 3508 } else if (const auto* uav = std::get_if<ClearUnorderedAccess>(&command)) {
2748 const UavView& view = uav->view; 3509 const UavView& view = uav->view;
2749 if (!bind(view.resource)) return ReplayResult::unresolved_resource; 3510 if (!bind(view.resource)) return unresolved_at(__LINE__);
2750 if (view.buffer) { 3511 if (view.buffer) {
2751 if (!vk.fill_buffer || !vk.update_buffer || !vk.copy_buffer) return ReplayResult::unsupported; 3512 if (!vk.fill_buffer || !vk.update_buffer || !vk.copy_buffer) return unsupported_at(__LINE__);
2752 if (predicated) ++out.unpredicated_copies; // fills and copies are transfer commands 3513 if (predicated) ++out.unpredicated_copies; // fills and copies are transfer commands
2753 if (const auto r = detail::prepare_buffer_uav_clear(*uav, p); r != ReplayResult::success) return r; 3514 if (const auto r = detail::prepare_buffer_uav_clear(*uav, p); r != ReplayResult::success) return r;
2754 const bool short_fill = std::any_of(p.fills.begin(), p.fills.end(), [&](const auto& fill) { 3515 const bool short_fill = std::any_of(p.fills.begin(), p.fills.end(), [&](const auto& fill) {
@@ -2757,7 +3518,7 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2757 if (short_fill && (!vk.copy_scratch || 3518 if (short_fill && (!vk.copy_scratch ||
2758 !vk.copy_scratch(8, p.fill_scratch, p.fill_scratch_offset) || !p.fill_scratch || 3519 !vk.copy_scratch(8, p.fill_scratch, p.fill_scratch_offset) || !p.fill_scratch ||
2759 p.fill_scratch_offset % 4 || p.fill_scratch_offset > UINT64_MAX - 8)) 3520 p.fill_scratch_offset % 4 || p.fill_scratch_offset > UINT64_MAX - 8))
2760 return ReplayResult::unsupported; 3521 return unsupported_at(__LINE__);
2761 if (!p.skip && !p.fills.empty() && p.binding.host_readable) { 3522 if (!p.skip && !p.fills.empty() && p.binding.host_readable) {
2762 out.wrote_readback = true; 3523 out.wrote_readback = true;
2763 out.readback_src_stages |= VK_PIPELINE_STAGE_2_TRANSFER_BIT; 3524 out.readback_src_stages |= VK_PIPELINE_STAGE_2_TRANSFER_BIT;
@@ -2775,22 +3536,67 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2775 // Emulated R9G9B9E5_SHAREDEXP images (backed by R32_UINT) lack COLOR_ATTACHMENT on E5B9G9R9 and keep the 3536 // Emulated R9G9B9E5_SHAREDEXP images (backed by R32_UINT) lack COLOR_ATTACHMENT on E5B9G9R9 and keep the
2776 // bit-exact R32_UINT backing path. 3537 // bit-exact R32_UINT backing path.
2777 const VkFormat view_format = view.format ? VkFormat(view.format) : p.binding.format; 3538 const VkFormat view_format = view.format ? VkFormat(view.format) : p.binding.format;
3539 const bool packed_rgb9e5 = view_format == VK_FORMAT_E5B9G9R9_UFLOAT_PACK32 &&
3540 p.binding.format == VK_FORMAT_R32_UINT;
2778 if (!uav_clear::encode(view_format, uav->is_float, uav->values, p.element)) 3541 if (!uav_clear::encode(view_format, uav->is_float, uav->values, p.element))
2779 return ReplayResult::unsupported; 3542 return unsupported_at(__LINE__);
2780 const auto* image_layout = uav_clear::layout(p.binding.format); 3543 const auto* image_layout = uav_clear::layout(p.binding.format);
2781 if (!image_layout || image_layout->bytes != p.element.size) 3544 if (!image_layout || image_layout->bytes != p.element.size)
2782 return ReplayResult::unsupported; 3545 return unsupported_at(__LINE__);
2783 const bool attachment = p.binding.color_attachment && !p.binding.volume; 3546 // The UAV attachment path supports 1D-array and 2D-array views. Keep 3D clears on the transfer
3547 // path and retain the exact-format restriction for 1D/3D UAVs below.
3548 const bool attachment = p.binding.color_attachment && !p.binding.volume &&
3549 (!view.exact_clear_format || p.binding.line);
2784 const bool view_attachable = vk.color_attachment_format 3550 const bool view_attachable = vk.color_attachment_format
2785 ? vk.color_attachment_format(view_format) 3551 ? vk.color_attachment_format(view_format)
2786 : view_format != VK_FORMAT_E5B9G9R9_UFLOAT_PACK32; 3552 : view_format != VK_FORMAT_E5B9G9R9_UFLOAT_PACK32;
2787 const bool reinterpret = view_format != p.binding.format && attachment && view_attachable; 3553 const bool reinterpret = view_format != p.binding.format && attachment && view_attachable && !packed_rgb9e5;
3554 if (view.exact_clear_format && view_format != p.binding.format && !packed_rgb9e5)
3555 return unsupported_at(__LINE__);
2788 const VkFormat clear_format = reinterpret ? view_format : p.binding.format; 3556 const VkFormat clear_format = reinterpret ? view_format : p.binding.format;
2789 if (!uav_clear::decode(clear_format, p.element, p.clear_color)) 3557 if (!uav_clear::decode(clear_format, p.element, p.clear_color))
2790 return ReplayResult::unsupported; 3558 return unsupported_at(__LINE__);
2791 if (reinterpret) p.clear_format = view_format; 3559 if (reinterpret) p.clear_format = view_format;
3560 // A 3D transfer clear covers a whole mip and a compute-only queue cannot render rectangles.
3561 // Copy the encoded texel bits instead. These copies cannot implement a predicated clear.
3562 const bool sliced = p.binding.volume && view.layer_count != std::max(1u, p.binding.depth >> view.mip);
3563 const bool stage_volume = p.binding.volume && (sliced || !uav->rects.empty());
3564 const bool stage_compute = (vk.queue_stages & VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT) &&
3565 (!uav->rects.empty() || reinterpret || predicated);
3566 if (stage_volume || stage_compute) {
3567 if (predicated) return unsupported_at(__LINE__);
3568 if (stage_volume && view_format != p.binding.format && !packed_rgb9e5)
3569 return unsupported_at(__LINE__);
3570 if (!vk.copy_scratch || !vk.copy_buffer_to_image ||
3571 (p.element.size <= 4 ? !vk.fill_buffer : (!stage_volume || !vk.update_buffer)))
3572 return unsupported_at(__LINE__);
3573 const auto rects = uav->rects.empty() ? std::span<const Rect>(&whole_view, 1) :
3574 std::span<const Rect>(uav->rects);
3575 detail::clip(rects, detail::mip_extent(p.binding, view.mip), p.range.layerCount, p.rects);
3576 if (p.rects.empty()) { p.skip = true; continue; }
3577 for (const auto& rect : p.rects) {
3578 VkBufferImageCopy region{};
3579 region.imageSubresource = {p.range.aspectMask, view.mip, p.range.baseArrayLayer, p.range.layerCount};
3580 region.imageOffset = {rect.rect.offset.x, rect.rect.offset.y, 0};
3581 region.imageExtent = {rect.rect.extent.width, rect.rect.extent.height, 1};
3582 const auto tile = stage_volume ? detail::volume_clear_tile(rect.rect.extent, p.element.size)
3583 : rect.rect.extent;
3584 const VkDeviceSize pixels = VkDeviceSize(tile.width) * tile.height;
3585 const VkDeviceSize stride = VkDeviceSize(p.range.layerCount) * p.element.size;
3586 if (pixels > (UINT64_MAX - 3) / stride) return unsupported_at(__LINE__);
3587 // Pad only the private pattern for vkCmdFillBuffer; copies use the exact image extent.
3588 p.clear_pattern_bytes = std::max(p.clear_pattern_bytes, (pixels * stride + 3) & ~VkDeviceSize(3));
3589 p.staged_writes.push_back(region);
3590 }
3591 VkDeviceSize offset = 0;
3592 if (!vk.copy_scratch(p.clear_pattern_bytes, p.staged, offset) || !p.staged ||
3593 offset % std::max(4u, p.element.size) || offset > UINT64_MAX - p.clear_pattern_bytes)
3594 return unsupported_at(__LINE__);
3595 for (auto& region : p.staged_writes) region.bufferOffset = offset;
3596 continue;
3597 }
2792 if (!uav->rects.empty() && !attachment) 3598 if (!uav->rects.empty() && !attachment)
2793 return ReplayResult::unsupported; 3599 return unsupported_at(__LINE__);
2794 // Under a predicate a whole view is cleared as one rectangle where the image can be an attachment, as 3600 // Under a predicate a whole view is cleared as one rectangle where the image can be an attachment, as
2795 // render targets are; otherwise vkCmdClearColorImage runs unconditionally and is counted. 3601 // render targets are; otherwise vkCmdClearColorImage runs unconditionally and is counted.
2796 if (predicated && uav->rects.empty() && !attachment) ++out.unpredicated_copies; 3602 if (predicated && uav->rects.empty() && !attachment) ++out.unpredicated_copies;
@@ -2799,14 +3605,14 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2799 : attachment ? clear_rects(uav->rects) : std::span<const Rect>(uav->rects); 3605 : attachment ? clear_rects(uav->rects) : std::span<const Rect>(uav->rects);
2800 if (const auto r = rect_view(rects, target, VK_IMAGE_ASPECT_COLOR_BIT); r != ReplayResult::success) 3606 if (const auto r = rect_view(rects, target, VK_IMAGE_ASPECT_COLOR_BIT); r != ReplayResult::success)
2801 return r; 3607 return r;
2802 if (!p.skip && p.rects.empty() && !vk.clear_color_image) return ReplayResult::unsupported; 3608 if (!p.skip && p.rects.empty() && !vk.clear_color_image) return unsupported_at(__LINE__);
2803 } else if (std::holds_alternative<CopyBuffer>(command) || std::holds_alternative<CopyTexture>(command) || 3609 } else if (std::holds_alternative<CopyBuffer>(command) || std::holds_alternative<CopyTexture>(command) ||
2804 std::holds_alternative<CopyResource>(command)) { 3610 std::holds_alternative<CopyResource>(command)) {
2805 if (!copies) return ReplayResult::unsupported; 3611 if (!copies) return unsupported_at(__LINE__);
2806 if (predicated && !std::holds_alternative<CopyBuffer>(command)) ++out.unpredicated_copies; 3612 if (predicated && !std::holds_alternative<CopyBuffer>(command)) ++out.unpredicated_copies;
2807 const auto [dst_id, src_id] = copy_ids(command); 3613 const auto [dst_id, src_id] = copy_ids(command);
2808 const ResourceBinding* source = resolve(src_id); 3614 const ResourceBinding* source = resolve(src_id);
2809 if (!bind(dst_id) || !source) return ReplayResult::unresolved_resource; 3615 if (!bind(dst_id) || !source) return unresolved_at(__LINE__);
2810 p.source = *source; 3616 p.source = *source;
2811 ReplayResult result = ReplayResult::success; 3617 ReplayResult result = ReplayResult::success;
2812 if (const auto* buffer_copy = std::get_if<CopyBuffer>(&command)) { 3618 if (const auto* buffer_copy = std::get_if<CopyBuffer>(&command)) {
@@ -2830,7 +3636,7 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2830 if (predicated) { 3636 if (predicated) {
2831 if ((statistics_active && !statistics_helpers) || !vk.prepare_predicated_copy || !vk.emit_predicated_copy || 3637 if ((statistics_active && !statistics_helpers) || !vk.prepare_predicated_copy || !vk.emit_predicated_copy ||
2832 !vk.prepare_predicated_copy(p.source.buffer, p.binding.buffer, src, dst, buffer_copy->size, p.predicated_copy)) 3638 !vk.prepare_predicated_copy(p.source.buffer, p.binding.buffer, src, dst, buffer_copy->size, p.predicated_copy))
2833 return ReplayResult::unsupported; 3639 return unsupported_at(__LINE__);
2834 } else p.buffer_copies.push_back({src, dst, buffer_copy->size}); 3640 } else p.buffer_copies.push_back({src, dst, buffer_copy->size});
2835 } else if (const auto* texture_copy = std::get_if<CopyTexture>(&command)) { 3641 } else if (const auto* texture_copy = std::get_if<CopyTexture>(&command)) {
2836 result = detail::prepare_texture_copy(*texture_copy, p); 3642 result = detail::prepare_texture_copy(*texture_copy, p);
@@ -2850,23 +3656,48 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2850 } 3656 }
2851 // A depth plane footprint of a D24 texture stored as D32: words of 24-bit UNORM, floats in the image. 3657 // A depth plane footprint of a D24 texture stored as D32: words of 24-bit UNORM, floats in the image.
2852 const bool upload = texture_copy->src.footprint; 3658 const bool upload = texture_copy->src.footprint;
3659 // Diagnostic: a texture-to-buffer copy into a buffer whose GPU writes are not handed back (a slot-133
3660 // shadow: host bytes but not host_readable). The title would read zeros in its own memory there
3661 // (upstream's GPU-to-title read-back case).
3662 if (result == ReplayResult::success && !upload && p.binding.buffer && p.binding.host &&
3663 !p.binding.host_readable) {
3664 static std::atomic<std::uint64_t> one_way{0};
3665 const std::uint64_t n = one_way.fetch_add(1, std::memory_order_relaxed) + 1;
3666 if (n <= 8 || !(n & (n - 1)))
3667 std::fprintf(stderr, "[rt] replay: texture copy into a one-way shadow buffer (title va 0x%llx, "
3668 "%llu bytes; %llu so far): the title does not see these texels\n",
3669 static_cast<unsigned long long>(p.binding.va),
3670 static_cast<unsigned long long>(p.binding.size),
3671 static_cast<unsigned long long>(n));
3672 }
2853 const ResourceBinding& image = upload ? p.binding : p.source; 3673 const ResourceBinding& image = upload ? p.binding : p.source;
2854 if (result == ReplayResult::success && texture_copy->tile_footprint && !p.buffer_image_copies.empty()) { 3674 if (result == ReplayResult::success && !p.buffer_image_copies.empty()) {
2855 const auto& region = p.buffer_image_copies.front(); 3675 const auto& region = p.buffer_image_copies.front();
2856 const BlockFormat fmt = copy_block_format(image, region.imageSubresource.aspectMask); 3676 const BlockFormat fmt = copy_block_format(image, region.imageSubresource.aspectMask);
2857 const std::uint32_t alignment = 3677 const std::uint32_t alignment =
2858 (region.imageSubresource.aspectMask & depth_stencil_aspects) || image.rgb96 ? 4 : fmt.bytes; 3678 (region.imageSubresource.aspectMask & depth_stencil_aspects) || image.rgb96 ? 4 : fmt.bytes;
2859 if (alignment > 1 && region.bufferOffset % alignment && 3679 if (alignment > 1 && region.bufferOffset % alignment &&
2860 !detail::stage_unaligned_tile(vk, p, image, fmt, upload)) 3680 !detail::stage_unaligned_tile(vk, p, image, fmt, upload))
2861 return ReplayResult::unsupported; 3681 return unsupported_at(__LINE__);
2862 } 3682 }
3683 // A B4G4R4A4 target stored as RGBA8 moves 4-byte texels in a footprint copy, not packed 16-bit ones.
3684 // The copy is made all the same, as the retail boot was measured with it;
3685 // LEONIDA_RGBA4_COPY_REFUSE=1 refuses it instead.
3686 static const bool refuse_rgba4_copy = [] {
3687 const char* v = std::getenv("LEONIDA_RGBA4_COPY_REFUSE");
3688 return v && *v == '1';
3689 }();
3690 if (result == ReplayResult::success && image.rgba4_render_fallback && refuse_rgba4_copy)
3691 return ReplayResult::unsupported;
3692 if(result==ReplayResult::success && image.xbox_depth16_stencil8 && image.format!=VK_FORMAT_D16_UNORM_S8_UINT &&
3693 !p.buffer_image_copies.empty() && p.buffer_image_copies[0].imageSubresource.aspectMask==VK_IMAGE_ASPECT_DEPTH_BIT) return ReplayResult::unsupported;
2863 const bool depth24_footprint = result == ReplayResult::success && image.depth24_as_float && 3694 const bool depth24_footprint = result == ReplayResult::success && image.depth24_as_float &&
2864 !p.buffer_image_copies.empty() && 3695 !p.buffer_image_copies.empty() &&
2865 p.buffer_image_copies[0].imageSubresource.aspectMask == VK_IMAGE_ASPECT_DEPTH_BIT; 3696 p.buffer_image_copies[0].imageSubresource.aspectMask == VK_IMAGE_ASPECT_DEPTH_BIT;
2866 const bool rgb96_footprint = result == ReplayResult::success && image.rgb96 && 3697 const bool rgb96_footprint = result == ReplayResult::success && image.rgb96 &&
2867 !p.buffer_image_copies.empty(); 3698 !p.buffer_image_copies.empty();
2868 // Without a segment pool, refuse before allocating conversion scratch/descriptors. 3699 // Without a segment pool, refuse before allocating conversion scratch/descriptors.
2869 if (statistics_active && !statistics_helpers && (depth24_footprint || rgb96_footprint)) return ReplayResult::unsupported; 3700 if (statistics_active && !statistics_helpers && (depth24_footprint || rgb96_footprint)) return unsupported_at(__LINE__);
2870 if (depth24_footprint) { 3701 if (depth24_footprint) {
2871 const VkBufferImageCopy& region = p.buffer_image_copies[0]; 3702 const VkBufferImageCopy& region = p.buffer_image_copies[0];
2872 const ResourceBinding& buffer = upload ? p.source : p.binding; 3703 const ResourceBinding& buffer = upload ? p.source : p.binding;
@@ -2880,7 +3711,7 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2880 job.slices = region.imageExtent.depth; 3711 job.slices = region.imageExtent.depth;
2881 job.app_row_words = region.bufferRowLength ? region.bufferRowLength : job.width; 3712 job.app_row_words = region.bufferRowLength ? region.bufferRowLength : job.width;
2882 job.app_slice_words = job.app_row_words * (region.bufferImageHeight ? region.bufferImageHeight : job.height); 3713 job.app_slice_words = job.app_row_words * (region.bufferImageHeight ? region.bufferImageHeight : job.height);
2883 if (!vk.depth24_prepare || !vk.depth24_run || !vk.depth24_prepare(job, p.depth24_parts)) return ReplayResult::unsupported; 3714 if (!vk.depth24_prepare || !vk.depth24_run || !vk.depth24_prepare(job, p.depth24_parts)) return unsupported_at(__LINE__);
2884 p.has_depth24 = true; 3715 p.has_depth24 = true;
2885 } else if (rgb96_footprint) { 3716 } else if (rgb96_footprint) {
2886 // A footprint of a 96-bit texture: 12-byte texels, 16 in the image. The same pass and scratch. 3717 // A footprint of a 96-bit texture: 12-byte texels, 16 in the image. The same pass and scratch.
@@ -2897,16 +3728,20 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2897 job.slices = region.imageExtent.depth; 3728 job.slices = region.imageExtent.depth;
2898 job.app_row_words = p.rgb96_row_words; 3729 job.app_row_words = p.rgb96_row_words;
2899 job.app_slice_words = p.rgb96_slice_words; 3730 job.app_slice_words = p.rgb96_slice_words;
2900 if (!vk.depth24_prepare || !vk.depth24_run || !vk.depth24_prepare(job, p.depth24_parts)) return ReplayResult::unsupported; 3731 if (!vk.depth24_prepare || !vk.depth24_run || !vk.depth24_prepare(job, p.depth24_parts)) return unsupported_at(__LINE__);
2901 p.has_depth24 = true; 3732 p.has_depth24 = true;
2902 } 3733 }
2903 } else { 3734 } else {
2904 result = detail::prepare_resource_copy(p); 3735 result = detail::prepare_resource_copy(p);
2905 } 3736 }
2906 if (result == ReplayResult::success && !p.image_copies.empty() && 3737 if (result == ReplayResult::success && !p.image_copies.empty() &&
2907 p.image_copies[0].srcSubresource.aspectMask != p.image_copies[0].dstSubresource.aspectMask) { 3738 (p.image_copies[0].srcSubresource.aspectMask != p.image_copies[0].dstSubresource.aspectMask ||
3739 a8_mixed_backing(p.source.format, p.binding.format) ||
3740 depth_format_pair(p.source.format, p.binding.format))) {
2908 // Depth <-> colour: vkCmdCopyImage cannot mix aspects, so each region goes image -> scratch -> image, 3741 // Depth <-> colour: vkCmdCopyImage cannot mix aspects, so each region goes image -> scratch -> image,
2909 // tightly packed. Depth aspects want 4-byte buffer offsets; 16 covers every texel size here. 3742 // tightly packed. Depth aspects want 4-byte buffer offsets; 16 covers every texel size here. The two
3743 // backings of A8_UNORM take the same route: one byte per texel on both sides, but Vulkan does not
3744 // count VK_FORMAT_A8_UNORM_KHR as size-compatible with R8_UNORM (VUID-vkCmdCopyImage-srcImage-01548).
2910 const std::uint32_t texel = 3745 const std::uint32_t texel =
2911 block_format(p.source.format, p.image_copies[0].srcSubresource.aspectMask).bytes; 3746 block_format(p.source.format, p.image_copies[0].srcSubresource.aspectMask).bytes;
2912 VkDeviceSize total = 0; 3747 VkDeviceSize total = 0;
@@ -2918,7 +3753,7 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2918 } 3753 }
2919 VkDeviceSize base = 0; 3754 VkDeviceSize base = 0;
2920 if (!texel || !vk.copy_scratch || !vk.copy_scratch(total, p.staged, base)) 3755 if (!texel || !vk.copy_scratch || !vk.copy_scratch(total, p.staged, base))
2921 return ReplayResult::unsupported; 3756 return unsupported_at(__LINE__);
2922 for (std::size_t r = 0; r < p.image_copies.size(); ++r) { 3757 for (std::size_t r = 0; r < p.image_copies.size(); ++r) {
2923 const VkImageCopy& c = p.image_copies[r]; 3758 const VkImageCopy& c = p.image_copies[r];
2924 VkBufferImageCopy region{}; 3759 VkBufferImageCopy region{};
@@ -2942,18 +3777,18 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2942 ? VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT : VK_PIPELINE_STAGE_2_COPY_BIT; 3777 ? VK_PIPELINE_STAGE_2_COMPUTE_SHADER_BIT : VK_PIPELINE_STAGE_2_COPY_BIT;
2943 } 3778 }
2944 } else if (const auto* resolve_command = std::get_if<ResolveSubresource>(&command)) { 3779 } else if (const auto* resolve_command = std::get_if<ResolveSubresource>(&command)) {
2945 if (!vk.resolve_image) return ReplayResult::unsupported; 3780 if (!vk.resolve_image) return unsupported_at(__LINE__);
2946 if (predicated) ++out.unpredicated_copies; // a transfer command, like the copies 3781 if (predicated) ++out.unpredicated_copies; // a transfer command, like the copies
2947 const ResourceBinding* source = resolve(resolve_command->src); 3782 const ResourceBinding* source = resolve(resolve_command->src);
2948 if (!bind(resolve_command->dst) || !source) return ReplayResult::unresolved_resource; 3783 if (!bind(resolve_command->dst) || !source) return unresolved_at(__LINE__);
2949 p.source = *source; 3784 p.source = *source;
2950 if (const auto result = detail::prepare_resolve(*resolve_command, p); result != ReplayResult::success) 3785 if (const auto result = detail::prepare_resolve(*resolve_command, p); result != ReplayResult::success)
2951 return result; 3786 return result;
2952 if (p.resolve_mode != VK_RESOLVE_MODE_NONE) { 3787 if (p.resolve_mode != VK_RESOLVE_MODE_NONE) {
2953 if (!vk.begin_rendering || !vk.end_rendering || !vk.image_view) return ReplayResult::unsupported; 3788 if (!vk.begin_rendering || !vk.end_rendering || !vk.image_view) return unsupported_at(__LINE__);
2954 p.view = vk.image_view(p.source, p.source_range); 3789 p.view = vk.image_view(p.source, p.source_range);
2955 p.resolve_view = vk.image_view(p.binding, p.range); 3790 p.resolve_view = vk.image_view(p.binding, p.range);
2956 if (!p.view || !p.resolve_view) return ReplayResult::unsupported; 3791 if (!p.view || !p.resolve_view) return unsupported_at(__LINE__);
2957 if (const auto result = detail::keep_around_resolve(vk, p); result != ReplayResult::success) 3792 if (const auto result = detail::keep_around_resolve(vk, p); result != ReplayResult::success)
2958 return result; 3793 return result;
2959 // D3D-417, a driver workaround: AMD's Windows driver (32.0.21042.62, Radeon RDNA2 iGPU) resolves a 3794 // D3D-417, a driver workaround: AMD's Windows driver (32.0.21042.62, Radeon RDNA2 iGPU) resolves a
@@ -2971,12 +3806,12 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2971 p.binding, p.resolve_view, 3806 p.binding, p.resolve_view,
2972 image_layout(p.binding, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL), p.resolve_mode, 3807 image_layout(p.binding, VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL), p.resolve_mode,
2973 {std::min(from.width, to.width), std::min(from.height, to.height)}, p.resolve_pass); 3808 {std::min(from.width, to.width), std::min(from.height, to.height)}, p.resolve_pass);
2974 if (!p.resolve_framebuffer) return ReplayResult::unsupported; 3809 if (!p.resolve_framebuffer) return unsupported_at(__LINE__);
2975 } 3810 }
2976 } 3811 }
2977 } else if (const auto* discard = std::get_if<DiscardResource>(&command)) { 3812 } else if (const auto* discard = std::get_if<DiscardResource>(&command)) {
2978 // Buffers and partial (rectangle) discards keep their contents, which "undefined" allows. 3813 // Buffers and partial (rectangle) discards keep their contents, which "undefined" allows.
2979 if (!bind(discard->resource)) return ReplayResult::unresolved_resource; 3814 if (!bind(discard->resource)) return unresolved_at(__LINE__);
2980 const std::uint64_t end = std::uint64_t(discard->first_subresource) + discard->count; 3815 const std::uint64_t end = std::uint64_t(discard->first_subresource) + discard->count;
2981 if (!p.binding.image) { 3816 if (!p.binding.image) {
2982 if (!discard->whole && end > 1) return ReplayResult::invalid_subresource; 3817 if (!discard->whole && end > 1) return ReplayResult::invalid_subresource;
@@ -2992,27 +3827,29 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
2992 if (!discard->partial) p.discards.push_back(range); 3827 if (!discard->partial) p.discards.push_back(range);
2993 } 3828 }
2994 } 3829 }
3830 } else if (std::holds_alternative<label::Write>(command)) {
3831 if (!vk.gpu_label) return ReplayResult::unsupported;
2995 } else if (const auto* write = std::get_if<WriteImmediate>(&command)) { 3832 } else if (const auto* write = std::get_if<WriteImmediate>(&command)) {
2996 if (!vk.update_buffer || !vk.buffer_at) return ReplayResult::unsupported; 3833 if (!vk.update_buffer || !vk.buffer_at) return unsupported_at(__LINE__);
2997 std::uint64_t bytes = 4; 3834 std::uint64_t bytes = 4;
2998 if (!vk.buffer_at(write->address, bytes, p.write_buffer, p.write_offset) || bytes < 4) 3835 if (!vk.buffer_at(write->address, bytes, p.write_buffer, p.write_offset) || bytes < 4)
2999 return ReplayResult::unresolved_resource; 3836 return unresolved_at(__LINE__);
3000 if (p.write_offset % 4) return ReplayResult::invalid_copy; 3837 if (p.write_offset % 4) return ReplayResult::invalid_copy;
3001 // WriteBufferImmediate resolves by VA and may target a readback buffer in COPY_DEST. 3838 // WriteBufferImmediate resolves by VA and may target a readback buffer in COPY_DEST.
3002 out.wrote_readback = true; 3839 out.wrote_readback = true;
3003 out.readback_src_stages |= VK_PIPELINE_STAGE_2_TRANSFER_BIT; 3840 out.readback_src_stages |= VK_PIPELINE_STAGE_2_TRANSFER_BIT;
3004 } else if (const auto* atomic = std::get_if<AtomicCopyBuffer>(&command)) { 3841 } else if (const auto* atomic = std::get_if<AtomicCopyBuffer>(&command)) {
3005 if (!vk.copy_buffer) return ReplayResult::unsupported; 3842 if (!vk.copy_buffer) return unsupported_at(__LINE__);
3006 if (predicated) ++out.unpredicated_copies; // a transfer command, like the copies 3843 if (predicated) ++out.unpredicated_copies; // a transfer command, like the copies
3007 const ResourceBinding* source = resolve(atomic->src); 3844 const ResourceBinding* source = resolve(atomic->src);
3008 if (!bind(atomic->dst) || !source) return ReplayResult::unresolved_resource; 3845 if (!bind(atomic->dst) || !source) return unresolved_at(__LINE__);
3009 p.source = *source; 3846 p.source = *source;
3010 if (!p.binding.buffer || !p.source.buffer || !detail::within(atomic->dst_offset, atomic->bytes, p.binding.size) || 3847 if (!p.binding.buffer || !p.source.buffer || !detail::within(atomic->dst_offset, atomic->bytes, p.binding.size) ||
3011 !detail::within(atomic->src_offset, atomic->bytes, p.source.size)) 3848 !detail::within(atomic->src_offset, atomic->bytes, p.source.size))
3012 return ReplayResult::invalid_copy; 3849 return ReplayResult::invalid_copy;
3013 for (const auto& d : atomic->dependencies) { 3850 for (const auto& d : atomic->dependencies) {
3014 const ResourceBinding* dependent = resolve(d.resource); 3851 const ResourceBinding* dependent = resolve(d.resource);
3015 if (!dependent) return ReplayResult::unresolved_resource; 3852 if (!dependent) return unresolved_at(__LINE__);
3016 if (!dependent->image) { 3853 if (!dependent->image) {
3017 const std::uint64_t end = d.end == UINT64_MAX ? dependent->size : d.end; 3854 const std::uint64_t end = d.end == UINT64_MAX ? dependent->size : d.end;
3018 if (d.subresource != 0 || d.begin >= end || end > dependent->size) 3855 if (d.subresource != 0 || d.begin >= end || end > dependent->size)
@@ -3028,26 +3865,26 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
3028 } else if (const auto* predication = std::get_if<Predication>(&command)) { 3865 } else if (const auto* predication = std::get_if<Predication>(&command)) {
3029 predicated = predication->buffer != 0; 3866 predicated = predication->buffer != 0;
3030 if (!predicated) continue; 3867 if (!predicated) continue;
3031 if (!conditional) return ReplayResult::unsupported; 3868 if (!conditional) return unsupported_at(__LINE__);
3032 // Without physical segments the capture dispatch would pollute CSInvocations. 3869 // Without physical segments the capture dispatch would pollute CSInvocations.
3033 if (statistics_active && !statistics_helpers) return ReplayResult::unsupported; 3870 if (statistics_active && !statistics_helpers) return unsupported_at(__LINE__);
3034 if (!bind(predication->buffer)) return ReplayResult::unresolved_resource; 3871 if (!bind(predication->buffer)) return unresolved_at(__LINE__);
3035 if (!p.binding.buffer || !detail::within(predication->offset, 8, p.binding.size) || 3872 if (!p.binding.buffer || !detail::within(predication->offset, 8, p.binding.size) ||
3036 predication->offset > UINT64_MAX - p.binding.buffer_offset) 3873 predication->offset > UINT64_MAX - p.binding.buffer_offset)
3037 return ReplayResult::invalid_predication; 3874 return ReplayResult::invalid_predication;
3038 if (!vk.prepare_predicate || !vk.capture_predicate || 3875 if (!vk.prepare_predicate || !vk.capture_predicate ||
3039 !vk.prepare_predicate(p.binding.buffer, p.binding.buffer_offset + predication->offset, p.predicate)) 3876 !vk.prepare_predicate(p.binding.buffer, p.binding.buffer_offset + predication->offset, p.predicate))
3040 return ReplayResult::unsupported; 3877 return unsupported_at(__LINE__);
3041 } else if (const QueryRange range = query_range(command); range.count) { 3878 } else if (const QueryRange range = query_range(command); range.count) {
3042 // BeginQuery, EndQuery and ResolveQueryData are not among D3D12's predicated calls, so a predicate does 3879 // BeginQuery, EndQuery and ResolveQueryData are not among D3D12's predicated calls, so a predicate does
3043 // not suppress them (emit_query suspends conditional rendering around ResolveQueryData). 3880 // not suppress them (emit_query suspends conditional rendering around ResolveQueryData).
3044 if (!queries) return ReplayResult::unsupported; 3881 if (!queries) return unsupported_at(__LINE__);
3045 QueryPool* heap = vk.query_pool(range.heap); 3882 QueryPool* heap = vk.query_pool(range.heap);
3046 if (!heap) return ReplayResult::unresolved_resource; 3883 if (!heap) return unresolved_at(__LINE__);
3047 if (!query_fits_heap(heap->heap_type, range.type)) return ReplayResult::invalid_query; 3884 if (!query_fits_heap(heap->heap_type, range.type)) return ReplayResult::invalid_query;
3048 if (range.first >= heap->count || range.count > heap->count - range.first) 3885 if (range.first >= heap->count || range.count > heap->count - range.first)
3049 return ReplayResult::invalid_query; 3886 return ReplayResult::invalid_query;
3050 if (!query_result_size(range.type)) return ReplayResult::unsupported; 3887 if (!query_result_size(range.type)) return unsupported_at(__LINE__);
3051 if (range.type != d3d12_query::timestamp && !std::holds_alternative<ResolveQueries>(command)) { 3888 if (range.type != d3d12_query::timestamp && !std::holds_alternative<ResolveQueries>(command)) {
3052 const bool begin = std::holds_alternative<BeginQuery>(command); 3889 const bool begin = std::holds_alternative<BeginQuery>(command);
3053 if (range.type == d3d12_query::occlusion) { 3890 if (range.type == d3d12_query::occlusion) {
@@ -3066,7 +3903,7 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
3066 } 3903 }
3067 if (const auto* resolve_queries = std::get_if<ResolveQueries>(&command)) { 3904 if (const auto* resolve_queries = std::get_if<ResolveQueries>(&command)) {
3068 // The destination is a buffer, as D3D12 requires, large enough for every result. 3905 // The destination is a buffer, as D3D12 requires, large enough for every result.
3069 if (!bind(resolve_queries->dst)) return ReplayResult::unresolved_resource; 3906 if (!bind(resolve_queries->dst)) return unresolved_at(__LINE__);
3070 const std::uint64_t bytes = std::uint64_t(range.count) * query_result_size(range.type); 3907 const std::uint64_t bytes = std::uint64_t(range.count) * query_result_size(range.type);
3071 if (!p.binding.buffer || p.binding.buffer_offset % 8 || 3908 if (!p.binding.buffer || p.binding.buffer_offset % 8 ||
3072 !detail::within(resolve_queries->offset, bytes, p.binding.size) || 3909 !detail::within(resolve_queries->offset, bytes, p.binding.size) ||
@@ -3076,7 +3913,7 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
3076 // Inside a pipeline-statistics query, QueryReplay::plan checks that the helper dispatch is kept out 3913 // Inside a pipeline-statistics query, QueryReplay::plan checks that the helper dispatch is kept out
3077 // of the application's counters. 3914 // of the application's counters.
3078 if (range.type == d3d12_query::binary_occlusion && !vk.resolve_binary_occlusion) 3915 if (range.type == d3d12_query::binary_occlusion && !vk.resolve_binary_occlusion)
3079 return ReplayResult::unsupported; 3916 return unsupported_at(__LINE__);
3080 if (p.binding.host_readable) { 3917 if (p.binding.host_readable) {
3081 out.wrote_readback = true; 3918 out.wrote_readback = true;
3082 out.readback_src_stages |= VK_PIPELINE_STAGE_2_COPY_BIT | VK_PIPELINE_STAGE_2_TRANSFER_BIT; 3919 out.readback_src_stages |= VK_PIPELINE_STAGE_2_COPY_BIT | VK_PIPELINE_STAGE_2_TRANSFER_BIT;
@@ -3084,7 +3921,7 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
3084 } 3921 }
3085 out.queries.push_back({i, heap, statistics_active}); 3922 out.queries.push_back({i, heap, statistics_active});
3086 } else if (const auto* ind = std::get_if<ExecuteIndirect>(&command)) { 3923 } else if (const auto* ind = std::get_if<ExecuteIndirect>(&command)) {
3087 if (!bind(ind->argument_buffer) || !p.binding.buffer) return ReplayResult::unresolved_resource; 3924 if (!bind(ind->argument_buffer) || !p.binding.buffer) return unresolved_at(__LINE__);
3088 const VkDeviceSize record_size = detail::indirect_record_size(ind->kind); 3925 const VkDeviceSize record_size = detail::indirect_record_size(ind->kind);
3089 if (!record_size || ind->stride < record_size || ind->stride % sizeof(std::uint32_t)) 3926 if (!record_size || ind->stride < record_size || ind->stride % sizeof(std::uint32_t))
3090 return ReplayResult::invalid_indirect_arguments; 3927 return ReplayResult::invalid_indirect_arguments;
@@ -3098,69 +3935,90 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
3098 return ReplayResult::invalid_indirect_arguments; 3935 return ReplayResult::invalid_indirect_arguments;
3099 if (ind->count_buffer) { 3936 if (ind->count_buffer) {
3100 const ResourceBinding* cnt = resolve(ind->count_buffer); 3937 const ResourceBinding* cnt = resolve(ind->count_buffer);
3101 if (!cnt || !cnt->buffer) return ReplayResult::unresolved_resource; 3938 if (!cnt || !cnt->buffer) return unresolved_at(__LINE__);
3102 if (!detail::indirect_range(*cnt, ind->count_offset, sizeof(std::uint32_t))) 3939 if (!detail::indirect_range(*cnt, ind->count_offset, sizeof(std::uint32_t)))
3103 return ReplayResult::invalid_indirect_arguments; 3940 return ReplayResult::invalid_indirect_arguments;
3104 p.source = *cnt; 3941 p.source = *cnt;
3105 if (ind->kind == IndirectKind::dispatch) {
3106 // Vulkan lacks vkCmdDispatchIndirectCount. Copy the GPU-visible commands to private scratch
3107 // and replace commands past min(count, max_count) with zero-group dispatches.
3108 if (!ind->pipeline || !vk.dispatch_indirect || !vk.prepare_counted_dispatch ||
3109 !vk.emit_counted_dispatch || (statistics_active && !statistics_helpers) ||
3110 !vk.prepare_counted_dispatch(p.binding.buffer, p.binding.buffer_offset + ind->argument_offset,
3111 p.source.buffer, p.source.buffer_offset + ind->count_offset,
3112 ind->stride, ind->max_count, p.counted_dispatch))
3113 return ReplayResult::unsupported;
3114 } else if ((ind->kind == IndirectKind::draw && !vk.draw_indirect_count) ||
3115 (ind->kind == IndirectKind::draw_indexed && !vk.draw_indexed_indirect_count)) {
3116 return ReplayResult::unsupported;
3117 }
3118 } else {
3119 if ((ind->kind == IndirectKind::draw && !vk.draw_indirect) ||
3120 (ind->kind == IndirectKind::draw_indexed && !vk.draw_indexed_indirect) ||
3121 (ind->kind == IndirectKind::dispatch && !vk.dispatch_indirect))
3122 return ReplayResult::unsupported;
3123 } 3942 }
3124 if (ind->kind == IndirectKind::dispatch && ind->pipeline) { // the pipeline and root arguments it was recorded 3943 if (ind->kind == IndirectKind::dispatch && ind->pipeline) { // the pipeline and root arguments it was recorded
3125 if (!vk.bind_pipeline || !vk.push_constants || !vk.compute_pipeline) return ReplayResult::unsupported; 3944 if (!vk.bind_pipeline || !vk.push_constants || !vk.compute_pipeline) return unsupported_at(__LINE__);
3126 const ComputePipeline* pipeline = vk.compute_pipeline(ind->pipeline); 3945 const ComputePipeline* pipeline = vk.compute_pipeline(ind->pipeline);
3127 if (!pipeline || !pipeline->pipeline) return ReplayResult::unresolved_resource; 3946 if (!pipeline) return unresolved_at(__LINE__);
3128 if (pipeline->bindless_set && !vk.bind_descriptor_sets) return ReplayResult::unsupported;
3129 p.pipeline = *pipeline; 3947 p.pipeline = *pipeline;
3948 const bool found = detail::first_use(*pipeline, PipelineCompiles::User::indirect_dispatch, vk, p);
3949 if (!found && p.pipeline.skipped) continue; // dropped on request, strict or not
3950 if (!found && p.pipeline.async_build && !strict_replay()) continue;
3951 if (!found) return unresolved_at(__LINE__);
3952 if (pipeline->bindless_set && !vk.bind_descriptor_sets) return unsupported_at(__LINE__);
3130 } 3953 }
3954 if (ind->kind == IndirectKind::dispatch && vk.require_indirect_clamp) {
3955 if (!ind->pipeline || !vk.dispatch_indirect || !vk.prepare_indirect_clamp || !vk.emit_indirect_clamp ||
3956 (statistics_active && !statistics_helpers) ||
3957 !vk.prepare_indirect_clamp(p.binding.buffer, p.binding.buffer_offset + ind->argument_offset,
3958 p.source.buffer, p.source.buffer_offset + ind->count_offset, indirect_clamp_dispatch,
3959 ind->stride, ind->max_count, p.indirect_clamp))
3960 return unsupported_at(__LINE__);
3961 p.indirect_clamp.share_list_budget(indirect_list_budget);
3962 } else if (ind->kind == IndirectKind::dispatch && (ind->count_buffer || indirect_group_budget())) {
3963 // Vulkan lacks vkCmdDispatchIndirectCount. Copy the GPU-visible commands to private scratch
3964 // and replace commands past min(count, max_count) with zero-group dispatches.
3965 if (!ind->pipeline || !vk.dispatch_indirect || !vk.prepare_counted_dispatch ||
3966 !vk.emit_counted_dispatch || (statistics_active && !statistics_helpers) ||
3967 !vk.prepare_counted_dispatch(p.binding.buffer, p.binding.buffer_offset + ind->argument_offset,
3968 p.source.buffer, p.source.buffer_offset + ind->count_offset,
3969 ind->stride, ind->max_count, p.counted_dispatch))
3970 return unsupported_at(__LINE__);
3971 } else if (ind->kind == IndirectKind::dispatch && !vk.dispatch_indirect) {
3972 return unsupported_at(__LINE__);
3973 }
3974 // Legacy graphics IR carries no graphics state. Validate its resource ranges above,
3975 // but never emit it; stateful graphics indirects use Draw and its rendering scope.
3131 } else if (const auto* build = std::get_if<BuildAccelerationStructure>(&command)) { 3976 } else if (const auto* build = std::get_if<BuildAccelerationStructure>(&command)) {
3132 p.khr_instances = 0; 3977 p.khr_instances = 0;
3133 if (vk.xdxr_check) { 3978 if (vk.xdxr_check) {
3134 if (!vk.xdxr_check(*build)) return ReplayResult::unsupported; 3979 if (!vk.xdxr_check(*build)) return unsupported_at(__LINE__);
3980 p.xdxr_blases = {};
3981 if (build->is_tlas && build->instance_count) {
3982 // The BLAS addresses in the instance descs are the title's: in its own memory they are reached
3983 // through the copies the layer made, and past the arena through nothing (xdxr_build.comp).
3984 p.xdxr_blases.translate = true;
3985 p.xdxr_blases.bound = vk.heap_size;
3986 if (vk.prepare_xdxr_table) {
3987 const ReplayResult staged = vk.prepare_xdxr_table(p.xdxr_blases.address, p.xdxr_blases.count);
3988 if (staged != ReplayResult::success) return staged;
3989 }
3990 }
3135 } else { 3991 } else {
3136 if (!vk.build_acceleration_structures || !vk.resolve_acceleration_structure) 3992 if (!vk.build_acceleration_structures || !vk.resolve_acceleration_structure)
3137 return ReplayResult::unsupported; 3993 return unsupported_at(__LINE__);
3138 p.accel_dst = vk.resolve_acceleration_structure(build->dst_va); 3994 p.accel_dst = vk.resolve_acceleration_structure(build->dst_va);
3139 if (!p.accel_dst) return ReplayResult::unresolved_resource; 3995 if (!p.accel_dst) return unresolved_at(__LINE__);
3140 if (build->update && build->src_va) { 3996 if (build->update && build->src_va) {
3141 p.accel_src = vk.resolve_acceleration_structure(build->src_va); 3997 p.accel_src = vk.resolve_acceleration_structure(build->src_va);
3142 if (!p.accel_src) return ReplayResult::unresolved_resource; 3998 if (!p.accel_src) return unresolved_at(__LINE__);
3143 } 3999 }
3144 if (build->is_tlas && build->instance_pointers && build->instance_count) { 4000 if (build->is_tlas && build->instance_pointers && build->instance_count) {
3145 if (!vk.prepare_khr_instances || !vk.host_at || !vk.buffer_at) return ReplayResult::unsupported; 4001 if (!vk.prepare_khr_instances || !vk.host_at || !vk.buffer_at) return unsupported_at(__LINE__);
3146 return vk.prepare_khr_instances(*build, p.khr_instances); 4002 return vk.prepare_khr_instances(*build, p.khr_instances);
3147 } 4003 }
3148 } 4004 }
3149 } else if (const auto* copy = std::get_if<CopyAccelerationStructure>(&command)) { 4005 } else if (const auto* copy = std::get_if<CopyAccelerationStructure>(&command)) {
3150 if (vk.xdxr_copy) { 4006 if (vk.xdxr_copy) {
3151 // XDXR structures: the destination's room bounds the copy, as the size is only known to the GPU. 4007 // XDXR structures: the destination's room bounds the copy, as the size is only known to the GPU. A
3152 if (!vk.buffer_at || copy->mode > 1) return ReplayResult::unsupported; 4008 // side the layer resolved into a copy of the title's memory brings its room (CopyAccelerationStructure).
3153 std::uint64_t room = ~std::uint64_t(0); 4009 if (!vk.buffer_at || copy->mode > 1) return unsupported_at(__LINE__);
4010 std::uint64_t room = copy->dst_room ? copy->dst_room : ~std::uint64_t(0);
3154 VkBuffer buffer = VK_NULL_HANDLE; 4011 VkBuffer buffer = VK_NULL_HANDLE;
3155 VkDeviceSize offset = 0; 4012 VkDeviceSize offset = 0;
3156 if (!vk.buffer_at(copy->dst_va, room, buffer, offset)) return ReplayResult::unresolved_resource; 4013 if (!copy->dst_room && !vk.buffer_at(copy->dst_va, room, buffer, offset)) return unresolved_at(__LINE__);
3157 std::uint64_t source = ~std::uint64_t(0); 4014 std::uint64_t source = copy->src_room ? copy->src_room : ~std::uint64_t(0);
3158 if (!vk.buffer_at(copy->src_va, source, buffer, offset)) return ReplayResult::unresolved_resource; 4015 if (!copy->src_room && !vk.buffer_at(copy->src_va, source, buffer, offset))
4016 return unresolved_at(__LINE__);
3159 p.xdxr_bytes = std::min(room, source); 4017 p.xdxr_bytes = std::min(room, source);
3160 } else { 4018 } else {
3161 if (vk.queue_stages == detail::queue_stages_copy || !vk.copy_acceleration_structure || 4019 if (vk.queue_stages == detail::queue_stages_copy || !vk.copy_acceleration_structure ||
3162 !vk.resolve_acceleration_structure || copy->mode > 1) 4020 !vk.resolve_acceleration_structure || copy->mode > 1)
3163 return ReplayResult::unsupported; 4021 return unsupported_at(__LINE__);
3164 p.accel_dst = vk.resolve_acceleration_structure(copy->dst_va); 4022 p.accel_dst = vk.resolve_acceleration_structure(copy->dst_va);
3165 p.accel_src = vk.resolve_acceleration_structure(copy->src_va); 4023 p.accel_src = vk.resolve_acceleration_structure(copy->src_va);
3166 if (!p.accel_dst || !p.accel_src) return ReplayResult::unresolved_resource; 4024 if (!p.accel_dst || !p.accel_src) return ReplayResult::unresolved_resource;
@@ -3169,11 +4027,12 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
3169 } 4027 }
3170 } else if (const auto* info = std::get_if<AccelerationStructurePostbuild>(&command)) { 4028 } else if (const auto* info = std::get_if<AccelerationStructurePostbuild>(&command)) {
3171 if (vk.xdxr_postbuild) { 4029 if (vk.xdxr_postbuild) {
3172 if (!vk.buffer_at || (info->type != 0 && info->type != 3)) return ReplayResult::unsupported; 4030 if (!vk.buffer_at || (info->type != 0 && info->type != 3)) return unsupported_at(__LINE__);
3173 std::uint64_t room = 8 * info->sources.size(); 4031 std::uint64_t room = info->dest_room ? info->dest_room : 8 * info->sources.size();
3174 VkBuffer buffer = VK_NULL_HANDLE; 4032 VkBuffer buffer = VK_NULL_HANDLE;
3175 VkDeviceSize offset = 0; 4033 VkDeviceSize offset = 0;
3176 if (!vk.buffer_at(info->dest_va, room, buffer, offset)) return ReplayResult::unresolved_resource; 4034 if (!info->dest_room && !vk.buffer_at(info->dest_va, room, buffer, offset))
4035 return unresolved_at(__LINE__);
3177 if (room < 8 * info->sources.size()) return ReplayResult::invalid_copy; 4036 if (room < 8 * info->sources.size()) return ReplayResult::invalid_copy;
3178 if (!info->sources.empty()) { 4037 if (!info->sources.empty()) {
3179 // dest_va is resolved by VA and may target a host-readable buffer; XDXR postbuild writes from compute. 4038 // dest_va is resolved by VA and may target a host-readable buffer; XDXR postbuild writes from compute.
@@ -3185,7 +4044,7 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
3185 vk.pipeline_barrier && vk.buffer_at && vk.prepare_khr_postbuild) { 4044 vk.pipeline_barrier && vk.buffer_at && vk.prepare_khr_postbuild) {
3186 if (vk.queue_stages == detail::queue_stages_copy || info->sources.empty() || 4045 if (vk.queue_stages == detail::queue_stages_copy || info->sources.empty() ||
3187 info->sources.size() > std::numeric_limits<std::uint32_t>::max() / 8u) 4046 info->sources.size() > std::numeric_limits<std::uint32_t>::max() / 8u)
3188 return ReplayResult::unsupported; 4047 return unsupported_at(__LINE__);
3189 const std::uint64_t need = 8ull * info->sources.size(); 4048 const std::uint64_t need = 8ull * info->sources.size();
3190 std::uint64_t room = need; 4049 std::uint64_t room = need;
3191 detail::PreparedKhrPostbuild pb; 4050 detail::PreparedKhrPostbuild pb;
@@ -3203,7 +4062,7 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
3203 if (!vk.prepare_khr_postbuild(static_cast<std::uint32_t>(pb.sources.size()), pb.query_pool, 4062 if (!vk.prepare_khr_postbuild(static_cast<std::uint32_t>(pb.sources.size()), pb.query_pool,
3204 pb.first_query) || 4063 pb.first_query) ||
3205 !pb.query_pool) 4064 !pb.query_pool)
3206 return ReplayResult::unsupported; 4065 return unsupported_at(__LINE__);
3207 p.khr_postbuild = static_cast<std::uint32_t>(out.khr_postbuilds.size()); 4066 p.khr_postbuild = static_cast<std::uint32_t>(out.khr_postbuilds.size());
3208 out.khr_postbuilds.push_back(std::move(pb)); 4067 out.khr_postbuilds.push_back(std::move(pb));
3209 // dest_va is resolved by VA and may target a host-readable buffer in COPY_DEST. 4068 // dest_va is resolved by VA and may target a host-readable buffer in COPY_DEST.
@@ -3215,18 +4074,59 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
3215 } 4074 }
3216 } else if (const auto* dispatch = std::get_if<Dispatch>(&command)) { 4075 } else if (const auto* dispatch = std::get_if<Dispatch>(&command)) {
3217 if (!vk.bind_pipeline || !vk.push_constants || !vk.dispatch || !vk.compute_pipeline) 4076 if (!vk.bind_pipeline || !vk.push_constants || !vk.dispatch || !vk.compute_pipeline)
3218 return ReplayResult::unsupported; 4077 return unsupported_at(__LINE__);
3219 const ComputePipeline* pipeline = vk.compute_pipeline(dispatch->pipeline); 4078 const ComputePipeline* pipeline = vk.compute_pipeline(dispatch->pipeline);
3220 if (!pipeline || !pipeline->pipeline) return ReplayResult::unresolved_resource; 4079 // A dispatch or draw this runtime cannot resolve (a pipeline it could not make: an untranslated
3221 if (pipeline->bindless_set && !vk.bind_descriptor_sets) return ReplayResult::unsupported; 4080 // program, an amplification shader; a vertex or index buffer address that names memory it has no
4081 // buffer for) is dropped, logged by unresolved_at, and the rest of the list is submitted. Failing the
4082 // list instead loses every other draw of the frame: the retail title's lists mix such draws in.
4083 // LEONIDA_STRICT_REPLAY=1 restores the failure.
4084 const bool strict = strict_replay();
4085 if (!pipeline) {
4086 if (strict) return unresolved_at(__LINE__);
4087 unresolved_at(__LINE__);
4088 p.pipeline = {};
4089 continue;
4090 }
3222 p.pipeline = *pipeline; 4091 p.pipeline = *pipeline;
3223 } else if (const auto* draw = std::get_if<Draw>(&command)) { 4092 const bool found = detail::first_use(*pipeline, PipelineCompiles::User::dispatch, vk, p);
4093 if (!found && p.pipeline.skipped) continue; // dropped on request, strict or not
4094 if (!found) {
4095 if (strict) return unresolved_at(__LINE__);
4096 if (!p.pipeline.async_build) unresolved_at(__LINE__);
4097 continue;
4098 }
4099 if (pipeline->bindless_set && !vk.bind_descriptor_sets) return unsupported_at(__LINE__);
4100 } else if (const auto draw = draw_command(command); draw.state) {
3224 if (out.draw_count == out.draws.size()) out.draws.emplace_back(); 4101 if (out.draw_count == out.draws.size()) out.draws.emplace_back();
3225 auto& prepared_draw = out.draws[out.draw_count]; 4102 auto& prepared_draw = out.draws[out.draw_count];
3226 prepared_draw.reset(); 4103 prepared_draw.reset();
3227 p.draw = std::uint32_t(out.draw_count++); 4104 p.draw = std::uint32_t(out.draw_count++);
3228 if (const auto r = detail::prepare_draw(*draw, resolve, vk, prepared_draw); r != ReplayResult::success) 4105 if (const auto r = detail::prepare_draw(*draw.state, draw.arguments, resolve, vk, prepared_draw);
3229 return r; 4106 r != ReplayResult::success) {
4107 const bool strict = strict_replay();
4108 if (r != ReplayResult::unresolved_resource || strict) return r;
4109 prepared_draw.skipped = true; // dropped at emit (see the dispatch branch above)
4110 } else if (draw.state->indexed && !draw.state->mesh && draw.state->topology == topology_quad_list) {
4111 // The index expansion is a helper dispatch: inside a statistics query it needs the segment pool.
4112 if (statistics_active && !statistics_helpers && draw.state->count >= 4) return ReplayResult::unsupported;
4113 if (const auto r = detail::prepare_quad_indices(*draw.state, vk, prepared_draw); r != ReplayResult::success)
4114 return r;
4115 }
4116 if (draw.arguments && !prepared_draw.skipped && vk.require_indirect_clamp) {
4117 const auto& arg = *draw.arguments;
4118 if (!vk.prepare_indirect_clamp || !vk.emit_indirect_clamp || (statistics_active && !statistics_helpers) ||
4119 !vk.prepare_indirect_clamp(prepared_draw.indirect_buffer, prepared_draw.indirect_offset,
4120 prepared_draw.indirect_count_buffer, prepared_draw.indirect_count_offset,
4121 draw.state->indexed ? indirect_clamp_draw_indexed : indirect_clamp_draw,
4122 arg.stride, arg.max_count, p.indirect_clamp))
4123 return unsupported_at(__LINE__);
4124 p.indirect_clamp.share_list_budget(indirect_list_budget);
4125 prepared_draw.indirect_buffer = p.indirect_clamp.buffer;
4126 prepared_draw.indirect_offset = p.indirect_clamp.offset;
4127 prepared_draw.indirect_count_buffer = p.indirect_clamp.count_buffer;
4128 prepared_draw.indirect_count_offset = p.indirect_clamp.count_offset;
4129 }
3230 } 4130 }
3231 } 4131 }
3232 if (ordinary_active || binary_active) return ReplayResult::invalid_query; 4132 if (ordinary_active || binary_active) return ReplayResult::invalid_query;
@@ -3239,7 +4139,7 @@ ReplayResult prepare(const CommandList& list, Resolve&& resolve, const ReplayFun
3239 } 4139 }
3240 if (overlaps) { 4140 if (overlaps) {
3241 if (!vk.sum_occlusion || out.queries.size() >= detail::PreparedQuery::no_segment) 4141 if (!vk.sum_occlusion || out.queries.size() >= detail::PreparedQuery::no_segment)
3242 return ReplayResult::unsupported; 4142 return unsupported_at(__LINE__);
3243 return plan_occlusion_segments(out); 4143 return plan_occlusion_segments(out);
3244 } 4144 }
3245 return ReplayResult::success; 4145 return ReplayResult::success;
@@ -3256,7 +4156,7 @@ public:
3256 const std::shared_ptr<const OcclusionSegmentPool>& statistics_pool = {}, 4156 const std::shared_ptr<const OcclusionSegmentPool>& statistics_pool = {},
3257 std::uint32_t statistics_base = 0) { 4157 std::uint32_t statistics_base = 0) {
3258 if (list.segment_count) { 4158 if (list.segment_count) {
3259 if (!pool) return ReplayResult::unsupported; 4159 if (!pool) return unsupported_at(__LINE__);
3260 retain(pool); 4160 retain(pool);
3261 list.segment_pool = pool->pool; 4161 list.segment_pool = pool->pool;
3262 list.segment_base = base; 4162 list.segment_base = base;
@@ -3272,14 +4172,14 @@ public:
3272 list.statistics_base = statistics_base; 4172 list.statistics_base = statistics_base;
3273 } else if (mesh) { 4173 } else if (mesh) {
3274 // Unsplit, the query would be active around a mesh draw with counters Vulkan forbids there. 4174 // Unsplit, the query would be active around a mesh draw with counters Vulkan forbids there.
3275 return ReplayResult::unsupported; 4175 return unsupported_at(__LINE__);
3276 } else if (list.statistics_overlaps) { 4176 } else if (list.statistics_overlaps) {
3277 // Whole queries on the heap pool would keep two pipeline-statistics queries active at once. 4177 // Whole queries on the heap pool would keep two pipeline-statistics queries active at once.
3278 return ReplayResult::unsupported; 4178 return unsupported_at(__LINE__);
3279 } else { 4179 } else {
3280 for (const auto& command : list.commands) 4180 for (const auto& command : list.commands)
3281 if (command.statistics_end != detail::PreparedQuery::no_segment) 4181 if (command.statistics_end != detail::PreparedQuery::no_segment)
3282 return ReplayResult::unsupported; 4182 return unsupported_at(__LINE__);
3283 for (auto& query : list.queries) { 4183 for (auto& query : list.queries) {
3284 query.statistics_end = query.statistics_begin = detail::PreparedQuery::no_segment; 4184 query.statistics_end = query.statistics_begin = detail::PreparedQuery::no_segment;
3285 query.statistics_count = 0; 4185 query.statistics_count = 0;
@@ -3311,7 +4211,7 @@ public:
3311 for (std::uint32_t i = 0; i < resolve.count; ++i) { 4211 for (std::uint32_t i = 0; i < resolve.count; ++i) {
3312 const auto index = resolve.first + i; 4212 const auto index = resolve.first + i;
3313 const auto value = lookup(*query.heap, index); 4213 const auto value = lookup(*query.heap, index);
3314 if (binary && value.ended && !uncounted) return ReplayResult::unsupported; 4214 if (binary && value.ended && !uncounted) return unsupported_at(__LINE__);
3315 needs_binary |= binary && value.ended; 4215 needs_binary |= binary && value.ended;
3316 detail::QueryResolveRun run{value.ended ? query.heap->pool : VK_NULL_HANDLE, 4216 detail::QueryResolveRun run{value.ended ? query.heap->pool : VK_NULL_HANDLE,
3317 index, 1, offset + VkDeviceSize(i) * size}; 4217 index, 1, offset + VkDeviceSize(i) * size};
@@ -3328,7 +4228,7 @@ public:
3328 saved.count > 1 || any_mesh, saved.segments->mesh_pool, 4228 saved.count > 1 || any_mesh, saved.segments->mesh_pool,
3329 saved.segments->primitives_pool, kinds}; 4229 saved.segments->primitives_pool, kinds};
3330 if (any_mesh && !statistics) return ReplayResult::invalid_query; 4230 if (any_mesh && !statistics) return ReplayResult::invalid_query;
3331 if (!can_sum || (run.sum && !uncounted)) return ReplayResult::unsupported; 4231 if (!can_sum || (run.sum && !uncounted)) return unsupported_at(__LINE__);
3332 if (statistics) needs_statistics_sum |= run.sum; 4232 if (statistics) needs_statistics_sum |= run.sum;
3333 else if (binary) (run.sum ? needs_sum_binary : needs_binary) = true; 4233 else if (binary) (run.sum ? needs_sum_binary : needs_binary) = true;
3334 else needs_sum |= run.sum; 4234 else needs_sum |= run.sum;
@@ -3497,8 +4397,9 @@ inline void close_labels(VkCommandBuffer command_buffer, const ReplayFunctions&
3497// `open_labels` counts the debug labels begun and not yet ended in this command buffer: an EndEvent with none open 4397// `open_labels` counts the debug labels begun and not yet ended in this command buffer: an EndEvent with none open
3498// is dropped (Vulkan requires a matching begin), and the caller ends what is still open before it ends the buffer 4398// is dropped (Vulkan requires a matching begin), and the caller ends what is still open before it ends the buffer
3499// (close_labels). Without it, the list's own events are balanced at its end. 4399// (close_labels). Without it, the list's own events are balanced at its end.
3500inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, const ReplayFunctions& vk, 4400template<bool Checkpoints>
3501 LayoutTracker* tracker = nullptr, std::uint32_t* open_labels = nullptr) { 4401inline void emit_commands(const PreparedList& prepared, VkCommandBuffer command_buffer, const ReplayFunctions& vk,
4402 LayoutTracker* tracker, std::uint32_t* open_labels, const CheckpointRecorder* checkpoints) {
3502 std::uint32_t own_labels = 0; 4403 std::uint32_t own_labels = 0;
3503 std::uint32_t& labels = open_labels ? *open_labels : own_labels; 4404 std::uint32_t& labels = open_labels ? *open_labels : own_labels;
3504 const auto commands = prepared.list->commands(); 4405 const auto commands = prepared.list->commands();
@@ -3515,11 +4416,24 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
3515 vk.depth24_run(command_buffer, job); 4416 vk.depth24_run(command_buffer, job);
3516 if (predicate.buffer) vk.begin_conditional_rendering(command_buffer, &predicate); 4417 if (predicate.buffer) vk.begin_conditional_rendering(command_buffer, &predicate);
3517 }; 4418 };
4419 const auto finish_depth_uav_barrier = [&](const detail::Prepared& p, VkImageLayout layout) {
4420 if (p.depth_uav_copy != UINT32_MAX) {
4421 detail::copy_depth_uav(vk, command_buffer, p, prepared.depth_uav_copies[p.depth_uav_copy], layout, tracker);
4422 } else if (p.order_depth_uav) {
4423 // A UAV-to-UAV texture barrier names the parent, but the actual shader accesses target its children.
4424 detail::memory_barrier(vk, command_buffer, VK_ACCESS_MEMORY_WRITE_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
4425 VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT);
4426 }
4427 };
3518 4428
3519 for (std::size_t i = 0; i < commands.size(); ++i) { 4429 for (std::size_t i = 0; i < commands.size(); ++i) {
3520 const auto& command = commands[i]; 4430 const auto& command = commands[i];
3521 const auto& p = prepared.commands[i]; 4431 const auto& p = prepared.commands[i];
4432 const auto raster = draw_command(command);
3522 if (next_query < prepared.queries.size() && prepared.queries[next_query].command == i) { 4433 if (next_query < prepared.queries.size() && prepared.queries[next_query].command == i) {
4434 if constexpr (Checkpoints)
4435 if (std::holds_alternative<ResolveQueries>(command))
4436 checkpoints->record(command_buffer, i, CheckpointKind::resolve);
3523 emit_query(prepared, prepared.queries[next_query++], command_buffer, vk, predicate); 4437 emit_query(prepared, prepared.queries[next_query++], command_buffer, vk, predicate);
3524 continue; 4438 continue;
3525 } 4439 }
@@ -3531,9 +4445,19 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
3531 detail::begin_statistics_segment(prepared, p.statistics_begin, command_buffer, vk); 4445 detail::begin_statistics_segment(prepared, p.statistics_begin, command_buffer, vk);
3532 }; 4446 };
3533 // A draw of the other kind inside a statistics query starts a segment in its pool (D3D-291), before the 4447 // A draw of the other kind inside a statistics query starts a segment in its pool (D3D-291), before the
3534 // draw's own rendering scope begins. 4448 // draw's own rendering scope begins. The index expansion of an indexed quad list runs here too: outside the
3535 if (std::holds_alternative<Draw>(command) || std::holds_alternative<ExecuteIndirect>(command)) { 4449 // rendering scope, and between the segments so that no query counts its dispatch (D3D-162). It stays inside
4450 // the predicate, which skips it together with its draw.
4451 if (p.indirect_clamp.buffer) {
4452 end_statistics();
4453 if (predicate.buffer) vk.end_conditional_rendering(command_buffer);
4454 vk.emit_indirect_clamp(command_buffer, p.indirect_clamp);
4455 if (predicate.buffer) vk.begin_conditional_rendering(command_buffer, &predicate);
4456 begin_statistics();
4457 } else if (!p.counted_dispatch.indirect && (raster.state || std::holds_alternative<ExecuteIndirect>(command))) {
3536 end_statistics(); 4458 end_statistics();
4459 if (raster.state && prepared.draws[p.draw].quad_indices.buffer)
4460 vk.emit_quad_indices(command_buffer, prepared.draws[p.draw].quad_indices);
3537 begin_statistics(); 4461 begin_statistics();
3538 } 4462 }
3539 if (const auto* predication = std::get_if<Predication>(&command)) { 4463 if (const auto* predication = std::get_if<Predication>(&command)) {
@@ -3582,6 +4506,7 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
3582 detail::image_barrier(vk, command_buffer, p.binding, piece.range, piece.layout, new_layout, 4506 detail::image_barrier(vk, command_buffer, p.binding, piece.range, piece.layout, new_layout,
3583 from.access, from.stages, to.access, to.stages); 4507 from.access, from.stages, to.access, to.stages);
3584 if (tracker) tracker->set(id, range, new_layout); 4508 if (tracker) tracker->set(id, range, new_layout);
4509 finish_depth_uav_barrier(p, new_layout);
3585 } else if (std::holds_alternative<UavBarrier>(command)) { 4510 } else if (std::holds_alternative<UavBarrier>(command)) {
3586 const VulkanAccess uav = vulkan_access(d3d12_state::unordered_access, false); 4511 const VulkanAccess uav = vulkan_access(d3d12_state::unordered_access, false);
3587 VkAccessFlags src_access = VK_ACCESS_SHADER_WRITE_BIT; 4512 VkAccessFlags src_access = VK_ACCESS_SHADER_WRITE_BIT;
@@ -3598,7 +4523,10 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
3598 detail::memory_barrier(vk, command_buffer, VK_ACCESS_MEMORY_WRITE_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 4523 detail::memory_barrier(vk, command_buffer, VK_ACCESS_MEMORY_WRITE_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
3599 VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT, 4524 VK_ACCESS_MEMORY_READ_BIT | VK_ACCESS_MEMORY_WRITE_BIT,
3600 VK_PIPELINE_STAGE_ALL_COMMANDS_BIT); 4525 VK_PIPELINE_STAGE_ALL_COMMANDS_BIT);
3601 } else if (std::holds_alternative<GlobalBarrier>(command) || std::holds_alternative<BufferBarrier>(command)) { 4526 } else if (const auto* texture_memory = std::get_if<TextureBarrier>(&command);
4527 std::holds_alternative<GlobalBarrier>(command) || std::holds_alternative<BufferBarrier>(command) ||
4528 (texture_memory && p.binding.depth_uav && texture_memory->layout_before == d3d12_layout::undefined &&
4529 texture_memory->layout_after == d3d12_layout::undefined)) {
3602 const auto [sync_before, sync_after, access_before, access_after] = std::visit( 4530 const auto [sync_before, sync_after, access_before, access_after] = std::visit(
3603 [](const auto& c) -> std::array<std::uint32_t, 4> { 4531 [](const auto& c) -> std::array<std::uint32_t, 4> {
3604 if constexpr (requires { c.sync_before; }) 4532 if constexpr (requires { c.sync_before; })
@@ -3634,10 +4562,13 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
3634 const VkImageLayout new_layout = 4562 const VkImageLayout new_layout =
3635 image_layout(p.binding, vulkan_layout(texture->layout_after, p.binding.presentable)); 4563 image_layout(p.binding, vulkan_layout(texture->layout_after, p.binding.presentable));
3636 LayoutPieces pieces; 4564 LayoutPieces pieces;
3637 if (discard && !release) 4565 // With coupled layouts, discarding a single plane must preserve the other plane's data.
4566 const bool keep_sibling = p.binding.depth_uav && range.aspectMask != p.range.aspectMask;
4567 if (discard && !release && !keep_sibling)
3638 pieces.push_back({range, VK_IMAGE_LAYOUT_UNDEFINED}); 4568 pieces.push_back({range, VK_IMAGE_LAYOUT_UNDEFINED});
3639 else { 4569 else {
3640 const VkImageLayout before = 4570 const VkImageLayout before =
4571 texture->layout_before == d3d12_layout::undefined ? VK_IMAGE_LAYOUT_GENERAL :
3641 image_layout(p.binding, vulkan_layout(texture->layout_before, p.binding.presentable)); 4572 image_layout(p.binding, vulkan_layout(texture->layout_before, p.binding.presentable));
3642 pieces = detail::current(tracker, id, range, before); 4573 pieces = detail::current(tracker, id, range, before);
3643 if (!release) detail::initialize(vk, command_buffer, p.binding, id, pieces, before, tracker); 4574 if (!release) detail::initialize(vk, command_buffer, p.binding, id, pieces, before, tracker);
@@ -3675,12 +4606,17 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
3675 vk.pipeline_barrier2(command_buffer, &dependency); 4606 vk.pipeline_barrier2(command_buffer, &dependency);
3676 } 4607 }
3677 if (tracker && !release) tracker->set(id, range, new_layout); 4608 if (tracker && !release) tracker->set(id, range, new_layout);
4609 if (!release) finish_depth_uav_barrier(p, new_layout);
3678 } else if (const auto* color_clear = std::get_if<ClearRenderTarget>(&command)) { 4610 } else if (const auto* color_clear = std::get_if<ClearRenderTarget>(&command)) {
3679 if (p.skip) continue; 4611 if (p.skip) continue;
4612 if constexpr (Checkpoints) checkpoints->record(command_buffer, i, CheckpointKind::clear);
3680 const VulkanAccess state = vulkan_access(d3d12_state::render_target, false); 4613 const VulkanAccess state = vulkan_access(d3d12_state::render_target, false);
3681 auto pieces = detail::current(tracker, id, p.range, image_layout(p.binding, state.layout)); 4614 auto pieces = detail::current(tracker, id, p.range, image_layout(p.binding, state.layout));
3682 detail::initialize(vk, command_buffer, p.binding, id, pieces, image_layout(p.binding, state.layout), tracker); 4615 detail::initialize(vk, command_buffer, p.binding, id, pieces, image_layout(p.binding, state.layout), tracker);
3683 const VkClearColorValue color = detail::render_target_clear_color(p.clear_format, color_clear->color); 4616 auto clear_value=color_clear->color;
4617 if(p.binding.rgba4_render_fallback)for(auto& channel:clear_value)
4618 channel=std::nearbyint(std::clamp(channel,0.0f,1.0f)*15.0f)/15.0f;
4619 const VkClearColorValue color=detail::render_target_clear_color(p.clear_format,clear_value);
3684 if (p.rects.empty()) { 4620 if (p.rects.empty()) {
3685 detail::round_trip(vk, command_buffer, p.binding, pieces, image_layout(p.binding, transfer_dst.layout), 4621 detail::round_trip(vk, command_buffer, p.binding, pieces, image_layout(p.binding, transfer_dst.layout),
3686 state, transfer_dst.access, transfer_dst.stages, [&] { 4622 state, transfer_dst.access, transfer_dst.stages, [&] {
@@ -3710,12 +4646,13 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
3710 }); 4646 });
3711 } else if (const auto* depth_clear = std::get_if<ClearDepthStencil>(&command)) { 4647 } else if (const auto* depth_clear = std::get_if<ClearDepthStencil>(&command)) {
3712 if (p.skip) continue; 4648 if (p.skip) continue;
4649 if constexpr (Checkpoints) checkpoints->record(command_buffer, i, CheckpointKind::clear);
3713 // With separate layouts only the cleared planes move; otherwise both do. 4650 // With separate layouts only the cleared planes move; otherwise both do.
3714 const auto range = detail::planes_for_layout(p.binding, p.range, separate); 4651 const auto range = detail::planes_for_layout(p.binding, p.range, separate);
3715 const VulkanAccess state = vulkan_access(d3d12_state::depth_write, false); 4652 const VulkanAccess state = vulkan_access(d3d12_state::depth_write, false);
3716 auto pieces = detail::current(tracker, id, range, image_layout(p.binding, state.layout)); 4653 auto pieces = detail::current(tracker, id, range, image_layout(p.binding, state.layout));
3717 detail::initialize(vk, command_buffer, p.binding, id, pieces, image_layout(p.binding, state.layout), tracker); 4654 detail::initialize(vk, command_buffer, p.binding, id, pieces, image_layout(p.binding, state.layout), tracker);
3718 float depth = p.binding.depth24 ? depth24_clear_value(depth_clear->depth) // see depth24.h 4655 float depth = p.binding.xbox_depth16_stencil8 ? std::round(std::clamp(depth_clear->depth,0.0f,1.0f)*65535.0f)/65535.0f : p.binding.depth24 ? depth24_clear_value(depth_clear->depth) // see depth24.h
3719 : p.binding.format == VK_FORMAT_D16_UNORM 4656 : p.binding.format == VK_FORMAT_D16_UNORM
3720 ? detail::quantize_unorm(depth_clear->depth, 65535.0) // see quantize_unorm 4657 ? detail::quantize_unorm(depth_clear->depth, 65535.0) // see quantize_unorm
3721 : depth_clear->depth; 4658 : depth_clear->depth;
@@ -3752,6 +4689,7 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
3752 }); 4689 });
3753 } else if (const auto* uav = std::get_if<ClearUnorderedAccess>(&command)) { 4690 } else if (const auto* uav = std::get_if<ClearUnorderedAccess>(&command)) {
3754 if (p.skip) continue; 4691 if (p.skip) continue;
4692 if constexpr (Checkpoints) checkpoints->record(command_buffer, i, CheckpointKind::clear);
3755 // The UAV state, widened to transfers: a later barrier from SYNC_CLEAR_UNORDERED_ACCESS_VIEW names the 4693 // The UAV state, widened to transfers: a later barrier from SYNC_CLEAR_UNORDERED_ACCESS_VIEW names the
3756 // clear stage, which is a transfer stage in the legacy masks. 4694 // clear stage, which is a transfer stage in the legacy masks.
3757 VulkanAccess state = vulkan_access(d3d12_state::unordered_access, false); 4695 VulkanAccess state = vulkan_access(d3d12_state::unordered_access, false);
@@ -3776,6 +4714,41 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
3776 const VkImageLayout layout = image_layout(p.binding, state.layout); 4714 const VkImageLayout layout = image_layout(p.binding, state.layout);
3777 auto pieces = detail::current(tracker, id, p.range, layout); 4715 auto pieces = detail::current(tracker, id, p.range, layout);
3778 detail::initialize(vk, command_buffer, p.binding, id, pieces, layout, tracker); 4716 detail::initialize(vk, command_buffer, p.binding, id, pieces, layout, tracker);
4717 if (p.clear_pattern_bytes) {
4718 detail::round_trip(vk, command_buffer, p.binding, pieces, layout, state, VK_ACCESS_TRANSFER_WRITE_BIT,
4719 VK_PIPELINE_STAGE_TRANSFER_BIT, [&] {
4720 detail::emit_buffer_fill(vk, command_buffer, p.staged, p.element, p.staged_writes.front().bufferOffset,
4721 p.clear_pattern_bytes);
4722 for (const auto& region : p.staged_writes) {
4723 // The fill must be visible, and two clear rectangles may overlap.
4724 detail::memory_barrier(vk, command_buffer, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT,
4725 VK_ACCESS_TRANSFER_READ_BIT | VK_ACCESS_TRANSFER_WRITE_BIT,
4726 VK_PIPELINE_STAGE_TRANSFER_BIT);
4727 if (!p.binding.volume) {
4728 vk.copy_buffer_to_image(command_buffer, p.staged, p.binding.image, layout, 1, &region);
4729 continue;
4730 }
4731 // Tiles within this rectangle are disjoint. Reuse the same scratch texels for every
4732 // tile and W slice; keep only one region per clipped rectangle in the prepared list.
4733 const auto tile = detail::volume_clear_tile({region.imageExtent.width, region.imageExtent.height},
4734 p.element.size);
4735 auto piece = region;
4736 for (std::uint32_t z = 0; z < uav->view.layer_count; ++z) {
4737 piece.imageOffset.z = std::int32_t(uav->view.first_layer + z);
4738 for (std::uint32_t y = 0; y < region.imageExtent.height; y += tile.height) {
4739 piece.imageOffset.y = region.imageOffset.y + std::int32_t(y);
4740 piece.imageExtent.height = std::min(tile.height, region.imageExtent.height - y);
4741 for (std::uint32_t x = 0; x < region.imageExtent.width; x += tile.width) {
4742 piece.imageOffset.x = region.imageOffset.x + std::int32_t(x);
4743 piece.imageExtent.width = std::min(tile.width, region.imageExtent.width - x);
4744 vk.copy_buffer_to_image(command_buffer, p.staged, p.binding.image, layout, 1, &piece);
4745 }
4746 }
4747 }
4748 }
4749 });
4750 continue;
4751 }
3779 if (p.rects.empty()) { 4752 if (p.rects.empty()) {
3780 detail::round_trip(vk, command_buffer, p.binding, pieces, layout, state, 4753 detail::round_trip(vk, command_buffer, p.binding, pieces, layout, state,
3781 VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, [&] { 4754 VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, [&] {
@@ -3804,12 +4777,21 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
3804 }); 4777 });
3805 } else if (std::holds_alternative<CopyBuffer>(command) || std::holds_alternative<CopyTexture>(command) || 4778 } else if (std::holds_alternative<CopyBuffer>(command) || std::holds_alternative<CopyTexture>(command) ||
3806 std::holds_alternative<CopyResource>(command)) { 4779 std::holds_alternative<CopyResource>(command)) {
4780 if constexpr (Checkpoints) checkpoints->record(command_buffer, i, CheckpointKind::copy);
3807 const auto [dst_id, src_id] = copy_ids(command); 4781 const auto [dst_id, src_id] = copy_ids(command);
3808 if (!p.predicated_copy.empty()) { 4782 if (!p.predicated_copy.empty()) {
3809 end_statistics(); 4783 end_statistics();
3810 vk.emit_predicated_copy(command_buffer, p.predicated_copy); 4784 vk.emit_predicated_copy(command_buffer, p.predicated_copy);
3811 begin_statistics(); 4785 begin_statistics();
3812 } else if (!p.buffer_copies.empty()) { 4786 } else if (!p.buffer_copies.empty()) {
4787 // Transfer dependency from natterman12, ubiquitarianism/leonida PR #354 (GPL-3.0).
4788 // D3D12 orders buffer copies even across lists on one queue. A previous transfer write can
4789 // overlap this copy's source or destination without an application barrier.
4790 if (vk.pipeline_barrier && order_buffer_copies()) {
4791 detail::memory_barrier(vk, command_buffer, VK_ACCESS_TRANSFER_WRITE_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT,
4792 VK_ACCESS_TRANSFER_READ_BIT | VK_ACCESS_TRANSFER_WRITE_BIT,
4793 VK_PIPELINE_STAGE_TRANSFER_BIT);
4794 }
3813 vk.copy_buffer(command_buffer, p.source.buffer, p.binding.buffer, std::uint32_t(p.buffer_copies.size()), 4795 vk.copy_buffer(command_buffer, p.source.buffer, p.binding.buffer, std::uint32_t(p.buffer_copies.size()),
3814 p.buffer_copies.data()); 4796 p.buffer_copies.data());
3815 } else if (p.staged) { 4797 } else if (p.staged) {
@@ -3927,6 +4909,7 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
3927 } 4909 }
3928 } 4910 }
3929 } else if (std::holds_alternative<ResolveSubresource>(command)) { 4911 } else if (std::holds_alternative<ResolveSubresource>(command)) {
4912 if constexpr (Checkpoints) checkpoints->record(command_buffer, i, CheckpointKind::resolve);
3930 // resolve_source and resolve_dest are the transfer layouts, as copy_source and copy_dest are. 4913 // resolve_source and resolve_dest are the transfer layouts, as copy_source and copy_dest are.
3931 const auto [dst_id, src_id] = copy_ids(command); 4914 const auto [dst_id, src_id] = copy_ids(command);
3932 if (p.resolve_mode != VK_RESOLVE_MODE_NONE) { 4915 if (p.resolve_mode != VK_RESOLVE_MODE_NONE) {
@@ -4047,6 +5030,8 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
4047 piece.layout, VK_ACCESS_MEMORY_WRITE_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT, 5030 piece.layout, VK_ACCESS_MEMORY_WRITE_BIT, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
4048 any_memory, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT); 5031 any_memory, VK_PIPELINE_STAGE_ALL_COMMANDS_BIT);
4049 } 5032 }
5033 } else if (const auto* label_write=std::get_if<label::Write>(&command)) {
5034 vk.gpu_label(command_buffer, *label_write);
4050 } else if (const auto* write = std::get_if<WriteImmediate>(&command)) { 5035 } else if (const auto* write = std::get_if<WriteImmediate>(&command)) {
4051 // vkCmdUpdateBuffer runs in the transfer stage. MARKER_OUT waits for every earlier command to finish 5036 // vkCmdUpdateBuffer runs in the transfer stage. MARKER_OUT waits for every earlier command to finish
4052 // and sees its writes. MARKER_IN only needs them started, which Vulkan cannot express (TOP_OF_PIPE in a 5037 // and sees its writes. MARKER_IN only needs them started, which Vulkan cannot express (TOP_OF_PIPE in a
@@ -4065,6 +5050,7 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
4065 vk.update_buffer(command_buffer, p.write_buffer, p.write_offset, 4, &write->value); 5050 vk.update_buffer(command_buffer, p.write_buffer, p.write_offset, 4, &write->value);
4066 if (predicate.buffer) vk.begin_conditional_rendering(command_buffer, &predicate); 5051 if (predicate.buffer) vk.begin_conditional_rendering(command_buffer, &predicate);
4067 } else if (std::holds_alternative<AtomicCopyBuffer>(command)) { 5052 } else if (std::holds_alternative<AtomicCopyBuffer>(command)) {
5053 if constexpr (Checkpoints) checkpoints->record(command_buffer, i, CheckpointKind::copy);
4068 // Every earlier write, to the dependent resources among others, finishes and is visible before the copy. 5054 // Every earlier write, to the dependent resources among others, finishes and is visible before the copy.
4069 // Vulkan promises no atomicity for a transfer; that a naturally aligned 4- or 8-byte copy is one write 5055 // Vulkan promises no atomicity for a transfer; that a naturally aligned 4- or 8-byte copy is one write
4070 // is an assumption about the hardware (docs/d3d12_vulkan.md, section 4.2). 5056 // is an assumption about the hardware (docs/d3d12_vulkan.md, section 4.2).
@@ -4073,54 +5059,49 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
4073 VK_PIPELINE_STAGE_TRANSFER_BIT); 5059 VK_PIPELINE_STAGE_TRANSFER_BIT);
4074 vk.copy_buffer(command_buffer, p.source.buffer, p.binding.buffer, 1, p.buffer_copies.data()); 5060 vk.copy_buffer(command_buffer, p.source.buffer, p.binding.buffer, 1, p.buffer_copies.data());
4075 } else if (const auto* ind = std::get_if<ExecuteIndirect>(&command)) { 5061 } else if (const auto* ind = std::get_if<ExecuteIndirect>(&command)) {
5062 if (ind->kind != IndirectKind::dispatch) {
5063 indirect_stats::skip(indirect_stats::Event::replay_skip, indirect_stats::stateless);
5064 continue;
5065 }
5066 if (ind->pipeline && !p.pipeline.pipeline && (p.pipeline.async_build || p.pipeline.skipped)) continue;
5067 if constexpr (Checkpoints)
5068 checkpoints->dispatch(command_buffer, i, p.pipeline.pipeline, ind->pipeline, ind->user_data, {}, true,
5069 ind->argument_buffer, ind->argument_offset, ind->count_buffer,
5070 ind->count_offset, ind->max_count, ind->stride);
4076 const VkDeviceSize arguments = p.binding.buffer_offset + ind->argument_offset; 5071 const VkDeviceSize arguments = p.binding.buffer_offset + ind->argument_offset;
4077 if (ind->count_buffer && ind->kind != IndirectKind::dispatch) { 5072 if (p.counted_dispatch.indirect) {
4078 const VkDeviceSize count = p.source.buffer_offset + ind->count_offset; 5073 // No D3D12 query must count this internal compute pass as an application dispatch.
4079 if (ind->kind == IndirectKind::draw) { 5074 end_statistics();
4080 vk.draw_indirect_count(command_buffer, p.binding.buffer, arguments, p.source.buffer, 5075 vk.emit_counted_dispatch(command_buffer, p.counted_dispatch);
4081 count, ind->max_count, ind->stride); 5076 begin_statistics();
4082 } else if (ind->kind == IndirectKind::draw_indexed) { 5077 }
4083 vk.draw_indexed_indirect_count(command_buffer, p.binding.buffer, arguments, 5078 if (ind->pipeline) {
4084 p.source.buffer, count, ind->max_count, ind->stride); 5079 ShaderUserData data{};
4085 } 5080 std::copy(ind->user_data.begin(), ind->user_data.end(), data.s);
4086 } else { 5081 data.heap_base = vk.heap_base;
4087 if (ind->kind == IndirectKind::draw) { 5082 data.code_base = p.pipeline.code_base;
4088 vk.draw_indirect(command_buffer, p.binding.buffer, arguments, ind->max_count, ind->stride); 5083 vk.bind_pipeline(command_buffer, VK_PIPELINE_BIND_POINT_COMPUTE, p.pipeline.pipeline);
4089 } else if (ind->kind == IndirectKind::draw_indexed) { 5084 if (p.pipeline.bindless_set) {
4090 vk.draw_indexed_indirect(command_buffer, p.binding.buffer, arguments, ind->max_count, ind->stride); 5085 const VkDescriptorSet set0 = vk.bindless_set ? vk.bindless_set : p.pipeline.bindless_set;
4091 } else if (ind->kind == IndirectKind::dispatch) { 5086 vk.bind_descriptor_sets(command_buffer, VK_PIPELINE_BIND_POINT_COMPUTE, p.pipeline.layout, 0,
4092 if (ind->count_buffer) { 5087 1, &set0, 0, nullptr);
4093 // No D3D12 query must count this internal compute pass as an application dispatch.
4094 end_statistics();
4095 vk.emit_counted_dispatch(command_buffer, p.counted_dispatch);
4096 begin_statistics();
4097 }
4098 if (ind->pipeline) {
4099 ShaderUserData data{};
4100 std::copy(ind->user_data.begin(), ind->user_data.end(), data.s);
4101 data.heap_base = vk.heap_base;
4102 data.code_base = p.pipeline.code_base;
4103 vk.bind_pipeline(command_buffer, VK_PIPELINE_BIND_POINT_COMPUTE, p.pipeline.pipeline);
4104 if (p.pipeline.bindless_set) {
4105 const VkDescriptorSet set0 = vk.bindless_set ? vk.bindless_set : p.pipeline.bindless_set;
4106 vk.bind_descriptor_sets(command_buffer, VK_PIPELINE_BIND_POINT_COMPUTE, p.pipeline.layout, 0,
4107 1, &set0, 0, nullptr);
4108 }
4109 vk.push_constants(command_buffer, p.pipeline.layout, VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(data),
4110 &data);
4111 }
4112 for (std::uint32_t k = 0; k < ind->max_count; ++k) {
4113 vk.dispatch_indirect(command_buffer,
4114 ind->count_buffer ? p.counted_dispatch.indirect : p.binding.buffer,
4115 (ind->count_buffer ? p.counted_dispatch.offset + VkDeviceSize(k) * 12
4116 : arguments + VkDeviceSize(k) * ind->stride));
4117 }
4118 } 5088 }
5089 vk.push_constants(command_buffer, p.pipeline.layout, VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(data),
5090 &data);
5091 }
5092 for (std::uint32_t k = 0; k < ind->max_count; ++k) {
5093 vk.dispatch_indirect(command_buffer,
5094 p.indirect_clamp.buffer ? p.indirect_clamp.buffer :
5095 p.counted_dispatch.indirect ? p.counted_dispatch.indirect : p.binding.buffer,
5096 (p.indirect_clamp.buffer ? p.indirect_clamp.offset + VkDeviceSize(k) * p.indirect_clamp.stride
5097 : p.counted_dispatch.indirect ? p.counted_dispatch.offset + VkDeviceSize(k) * 12
5098 : arguments + VkDeviceSize(k) * ind->stride));
4119 } 5099 }
4120 } else if (const auto* xdxr_build = std::get_if<BuildAccelerationStructure>(&command); 5100 } else if (const auto* xdxr_build = std::get_if<BuildAccelerationStructure>(&command);
4121 xdxr_build && vk.xdxr_record) { 5101 xdxr_build && vk.xdxr_record) {
4122 vk.xdxr_record(command_buffer, *xdxr_build); 5102 vk.xdxr_record(command_buffer, *xdxr_build, p.xdxr_blases);
4123 } else if (const auto* copy = std::get_if<CopyAccelerationStructure>(&command)) { 5103 } else if (const auto* copy = std::get_if<CopyAccelerationStructure>(&command)) {
5104 if constexpr (Checkpoints) checkpoints->record(command_buffer, i, CheckpointKind::copy);
4124 if (vk.xdxr_copy) { 5105 if (vk.xdxr_copy) {
4125 vk.xdxr_copy(command_buffer, copy->src_va, copy->dst_va, p.xdxr_bytes); 5106 vk.xdxr_copy(command_buffer, copy->src_va, copy->dst_va, p.xdxr_bytes);
4126 } else { 5107 } else {
@@ -4216,6 +5197,10 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
4216 const VkAccelerationStructureBuildRangeInfoKHR* range_ptr = ranges.data(); 5197 const VkAccelerationStructureBuildRangeInfoKHR* range_ptr = ranges.data();
4217 vk.build_acceleration_structures(command_buffer, 1, &info, &range_ptr); 5198 vk.build_acceleration_structures(command_buffer, 1, &info, &range_ptr);
4218 } else if (const auto* dispatch = std::get_if<Dispatch>(&command)) { 5199 } else if (const auto* dispatch = std::get_if<Dispatch>(&command)) {
5200 if (!p.pipeline.pipeline) continue; // could not be resolved in prepare: dropped
5201 if constexpr (Checkpoints)
5202 checkpoints->dispatch(command_buffer, i, p.pipeline.pipeline, dispatch->pipeline, dispatch->user_data,
5203 {dispatch->x, dispatch->y, dispatch->z});
4219 ShaderUserData data{}; 5204 ShaderUserData data{};
4220 std::copy(dispatch->user_data.begin(), dispatch->user_data.end(), data.s); 5205 std::copy(dispatch->user_data.begin(), dispatch->user_data.end(), data.s);
4221 data.heap_base = vk.heap_base; 5206 data.heap_base = vk.heap_base;
@@ -4228,8 +5213,13 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
4228 } 5213 }
4229 vk.push_constants(command_buffer, p.pipeline.layout, VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(data), &data); 5214 vk.push_constants(command_buffer, p.pipeline.layout, VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(data), &data);
4230 vk.dispatch(command_buffer, dispatch->x, dispatch->y, dispatch->z); 5215 vk.dispatch(command_buffer, dispatch->x, dispatch->y, dispatch->z);
4231 } else if (const auto* draw = std::get_if<Draw>(&command)) { 5216 } else if (raster.state) {
5217 const Draw* draw = raster.state;
4232 const detail::PreparedDraw& d = prepared.draws[p.draw]; 5218 const detail::PreparedDraw& d = prepared.draws[p.draw];
5219 if (d.skipped) continue; // could not be resolved in prepare: dropped
5220 if constexpr (Checkpoints)
5221 checkpoints->record(command_buffer, i, CheckpointKind::draw,
5222 d.pipeline, draw->pipeline);
4233 constexpr VkAccessFlags color_access = 5223 constexpr VkAccessFlags color_access =
4234 VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT; 5224 VK_ACCESS_COLOR_ATTACHMENT_READ_BIT | VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
4235 constexpr VkAccessFlags depth_access = 5225 constexpr VkAccessFlags depth_access =
@@ -4325,7 +5315,8 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
4325 // A mesh pipeline has no input assembly: its topology comes from the shader, and neither the topology 5315 // A mesh pipeline has no input assembly: its topology comes from the shader, and neither the topology
4326 // nor primitive restart is dynamic state there (VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07065). 5316 // nor primitive restart is dynamic state there (VUID-VkGraphicsPipelineCreateInfo-pDynamicStates-07065).
4327 if (!draw->mesh) { 5317 if (!draw->mesh) {
4328 const VkPrimitiveTopology topology = detail::vulkan_topology(draw->topology); 5318 const VkPrimitiveTopology topology = draw->topology == topology_quad_list && !draw->indexed
5319 ? VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST : detail::vulkan_topology(draw->topology);
4329 vk.set_primitive_topology(command_buffer, topology); 5320 vk.set_primitive_topology(command_buffer, topology);
4330 const bool restart = draw->indexed && detail::strip_topology(topology) && 5321 const bool restart = draw->indexed && detail::strip_topology(topology) &&
4331 ((graphics.strip_cut == 1 && d.index_type == VK_INDEX_TYPE_UINT16) || 5322 ((graphics.strip_cut == 1 && d.index_type == VK_INDEX_TYPE_UINT16) ||
@@ -4340,8 +5331,54 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
4340 vk.bind_vertex_buffers2(command_buffer, slot, 1, &d.vertex_buffers[slot], &d.vertex_offsets[slot], 5331 vk.bind_vertex_buffers2(command_buffer, slot, 1, &d.vertex_buffers[slot], &d.vertex_offsets[slot],
4341 &d.vertex_sizes[slot], &d.vertex_strides[slot]); 5332 &d.vertex_sizes[slot], &d.vertex_strides[slot]);
4342 } 5333 }
4343 if (draw->mesh) { 5334 if (raster.arguments) {
5335 indirect_stats::note(indirect_stats::Event::emitted);
5336 const auto& arg = *raster.arguments;
5337 if (draw->indexed) {
5338 // Bind only complete indices in the captured D3D12 view, never any trailing storage.
5339 const VkDeviceSize width = d.index_type == VK_INDEX_TYPE_UINT16 ? 2 : 4;
5340 const VkDeviceSize bytes = draw->index.size - draw->index.size % width;
5341 vk.bind_robust_index_view(command_buffer, d.index_buffer, d.index_offset, bytes, d.index_type);
5342 }
5343 const auto stride = p.indirect_clamp.buffer ? p.indirect_clamp.stride : arg.stride;
5344 if (arg.count_buffer) {
5345 const auto emit_counted = draw->indexed ? vk.draw_indexed_indirect_count : vk.draw_indirect_count;
5346 emit_counted(command_buffer, d.indirect_buffer, d.indirect_offset, d.indirect_count_buffer,
5347 d.indirect_count_offset, arg.max_count, stride);
5348 } else {
5349 const auto emit_fixed = draw->indexed ? vk.draw_indexed_indirect : vk.draw_indirect;
5350 emit_fixed(command_buffer, d.indirect_buffer, d.indirect_offset, arg.max_count, stride);
5351 }
5352 } else if (draw->mesh) {
4344 vk.draw_mesh_tasks(command_buffer, draw->count, draw->instances, draw->first); 5353 vk.draw_mesh_tasks(command_buffer, draw->count, draw->instances, draw->first);
5354 if (vk.mesh_draw_count) ++*vk.mesh_draw_count;
5355 } else if (draw->topology == topology_quad_list) {
5356 if (draw->indexed) {
5357 // The triangle indices the compute pass wrote before this rendering scope, (i0 i1 i2) (i0 i2 i3)
5358 // for each quad of the application's indices from draw->first on: one draw, so instances run
5359 // in D3D12's order, flat inputs come from each quad's first vertex, and VertexIndex - BaseVertex
5360 // is still the application's index. A draw of fewer than four indices has no quad.
5361 const QuadIndexExpansion& quads = d.quad_indices;
5362 if (quads.buffer) {
5363 vk.bind_index_buffer(command_buffer, quads.buffer, quads.offset, VK_INDEX_TYPE_UINT32);
5364 vk.draw_indexed(command_buffer, quads.quads * QuadIndexExpander::indices_per_quad,
5365 draw->instances, 0, draw->base_vertex, draw->first_instance);
5366 }
5367 } else {
5368 // Both triangles start at the quad's first vertex for flat inputs. One draw also preserves
5369 // the original instance order, and VertexIndex - BaseVertex still gives 4q + k.
5370 constexpr auto indices_per_quad = std::uint32_t(quad_triangle_indices.size());
5371 const std::uint32_t wanted = draw->count / 4;
5372 const std::uint32_t quads = std::min(wanted, vk.quad_index_count / indices_per_quad);
5373 if (quads < wanted)
5374 std::fprintf(stderr, "[rt] d3d12: a non-indexed quad list of %u quads draws only the first %u\n",
5375 wanted, quads);
5376 if (quads) {
5377 vk.bind_index_buffer(command_buffer, vk.quad_indices, vk.quad_indices_offset, VK_INDEX_TYPE_UINT32);
5378 vk.draw_indexed(command_buffer, quads * indices_per_quad, draw->instances, 0,
5379 std::int32_t(draw->first), draw->first_instance);
5380 }
5381 }
4345 } else if (draw->indexed) { 5382 } else if (draw->indexed) {
4346 vk.bind_index_buffer(command_buffer, d.index_buffer, d.index_offset, d.index_type); 5383 vk.bind_index_buffer(command_buffer, d.index_buffer, d.index_offset, d.index_type);
4347 vk.draw_indexed(command_buffer, draw->count, draw->instances, draw->first, draw->base_vertex, 5384 vk.draw_indexed(command_buffer, draw->count, draw->instances, draw->first, draw->base_vertex,
@@ -4357,6 +5394,11 @@ inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, c
4357 if (!open_labels) close_labels(command_buffer, vk, own_labels); 5394 if (!open_labels) close_labels(command_buffer, vk, own_labels);
4358} 5395}
4359 5396
5397inline void emit(const PreparedList& prepared, VkCommandBuffer command_buffer, const ReplayFunctions& vk,
5398 LayoutTracker* tracker = nullptr, std::uint32_t* open_labels = nullptr) {
5399 emit_commands<false>(prepared, command_buffer, vk, tracker, open_labels, nullptr);
5400}
5401
4360// prepare + emit for one list. A failed replay leaves the command buffer and the tracker untouched. 5402// prepare + emit for one list. A failed replay leaves the command buffer and the tracker untouched.
4361// With `keep` and vk.create_segment_pool (and the sum helpers) set, overlapping occlusion or statistics queries get 5403// With `keep` and vk.create_segment_pool (and the sum helpers) set, overlapping occlusion or statistics queries get
4362// segment pools as in the batched path; the caller holds `keep` until the command buffer has completed. 5404// segment pools as in the batched path; the caller holds `keep` until the command buffer has completed.
@@ -4365,20 +5407,20 @@ ReplayResult replay(const CommandList& list, VkCommandBuffer command_buffer, Res
4365 const ReplayFunctions& vk, LayoutTracker* tracker = nullptr, 5407 const ReplayFunctions& vk, LayoutTracker* tracker = nullptr,
4366 std::vector<std::shared_ptr<const OcclusionSegmentPool>>* keep = nullptr) { 5408 std::vector<std::shared_ptr<const OcclusionSegmentPool>>* keep = nullptr) {
4367 if (tracker && tracker->separate_depth_stencil_layouts() != vk.separate_depth_stencil_layouts) 5409 if (tracker && tracker->separate_depth_stencil_layouts() != vk.separate_depth_stencil_layouts)
4368 return ReplayResult::unsupported; 5410 return unsupported_at(__LINE__);
4369 const bool pools = keep && vk.create_segment_pool && vk.sum_occlusion && vk.resolve_binary_occlusion && 5411 const bool pools = keep && vk.create_segment_pool && vk.sum_occlusion && vk.resolve_binary_occlusion &&
4370 vk.sum_statistics && vk.sum_binary_occlusion; 5412 vk.sum_statistics && vk.sum_binary_occlusion;
4371 PreparedList prepared; 5413 PreparedList prepared;
4372 if (const auto result = prepare(list, resolve, vk, prepared, pools); result != ReplayResult::success) 5414 if (const auto result = prepare(list, resolve, vk, prepared, pools); result != ReplayResult::success)
4373 return result; 5415 return result;
4374 if (tracker && zero_clear_unavailable(prepared, vk, *tracker)) return ReplayResult::unsupported; 5416 if (tracker && zero_clear_unavailable(prepared, vk, *tracker)) return unsupported_at(__LINE__);
4375 std::shared_ptr<const OcclusionSegmentPool> physical, statistics; 5417 std::shared_ptr<const OcclusionSegmentPool> physical, statistics;
4376 if (pools && prepared.segment_count && 5418 if (pools && prepared.segment_count &&
4377 !(physical = vk.create_segment_pool(VK_QUERY_TYPE_OCCLUSION, prepared.segment_count))) 5419 !(physical = vk.create_segment_pool(VK_QUERY_TYPE_OCCLUSION, prepared.segment_count)))
4378 return ReplayResult::unsupported; 5420 return unsupported_at(__LINE__);
4379 if (pools && prepared.statistics_segment_count && 5421 if (pools && prepared.statistics_segment_count &&
4380 !(statistics = vk.create_segment_pool(VK_QUERY_TYPE_PIPELINE_STATISTICS, prepared.statistics_segment_count))) 5422 !(statistics = vk.create_segment_pool(VK_QUERY_TYPE_PIPELINE_STATISTICS, prepared.statistics_segment_count)))
4381 return ReplayResult::unsupported; 5423 return unsupported_at(__LINE__);
4382 QueryReplay queries; 5424 QueryReplay queries;
4383 if (const auto result = queries.plan(prepared, physical, 0, pools, statistics, 0); result != ReplayResult::success) 5425 if (const auto result = queries.plan(prepared, physical, 0, pools, statistics, 0); result != ReplayResult::success)
4384 return result; 5426 return result;
diff --git a/runtime/src/vulkan_scratch.h b/runtime/src/vulkan_scratch.h
index 33d84bf72..958f27ca5 100644
--- a/runtime/src/vulkan_scratch.h
+++ b/runtime/src/vulkan_scratch.h
@@ -1,14 +1,20 @@
1// Scratch buffers that live until the submission that used them has completed: device-local chunks handed out 1// Scratch buffers that live until the submission that used them has completed: device-local chunks handed out
2// while a list is prepared, retired with the submission's timeline value, and reused (or freed) once the GPU is past 2// while a list is prepared, retired with the submission's timeline value, and reused (or freed) once the GPU is past
3// it. The replay stages copies Vulkan cannot do in one command through them (vulkan_replay.h, depth <-> colour 3// it. The replay stages copies Vulkan cannot do in one command through them (vulkan_replay.h, depth <-> colour
4// copies). Single-threaded: the caller holds the context's lock. The same life cycle as the depth24 converter's own 4// copies), and the ExecuteIndirect argument clamp keeps its record scratch in one too (vulkan_indirect_clamp.h).
5// Single-threaded: the caller holds the context's lock. The same life cycle as the depth24 converter's own
5// scratch (vulkan_depth24.h), which also needs descriptor pools and exists only on GPUs without D24. 6// scratch (vulkan_depth24.h), which also needs descriptor pools and exists only on GPUs without D24.
7// The chunks are transfer sources and destinations; `extra_usage` adds what another user needs (the expanded indices
8// of quad lists, quad_index_expand.h: an index buffer written through its device address).
6#pragma once 9#pragma once
7 10
8#ifndef VK_NO_PROTOTYPES 11#ifndef VK_NO_PROTOTYPES
9#define VK_NO_PROTOTYPES 12#define VK_NO_PROTOTYPES
10#endif 13#endif
11#include <vulkan/vulkan.h> 14#include <vulkan/vulkan.h>
15#include "queue_families.h"
16
17#include "vulkan_device_fault.h"
12 18
13#include <algorithm> 19#include <algorithm>
14#include <cstdint> 20#include <cstdint>
@@ -22,15 +28,36 @@ class ScratchBuffers {
22public: 28public:
23 // A device-local allocation for a chunk; null on failure. 29 // A device-local allocation for a chunk; null on failure.
24 using Allocate = std::function<VkDeviceMemory(const VkMemoryRequirements&)>; 30 using Allocate = std::function<VkDeviceMemory(const VkMemoryRequirements&)>;
31 // What the copy staging needs: transfer both ways.
32 static constexpr VkBufferUsageFlags transfer_usage =
33 VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;
34
35 // Legacy copy-scratch constructor. `extra_usage` is added to the transfer usage, and
36 // `families` keeps retired chunks shareable across queue families.
37 ScratchBuffers(PFN_vkGetDeviceProcAddr get, VkDevice device, Allocate allocate, VkBufferUsageFlags extra_usage = 0,
38 std::vector<std::uint32_t> families = {}, DeviceFaultDiagnostics* diagnostics = nullptr)
39 : device_(device), diagnostics_(diagnostics), allocate_(std::move(allocate)),
40 usage_(transfer_usage | extra_usage), families_(std::move(families)) {
41 loaded_ = vk_.load(get, device, false);
42 addressable_ = (usage_ & VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT) && vk_.vkGetBufferDeviceAddress;
43 }
25 44
26 ScratchBuffers(PFN_vkGetDeviceProcAddr get, VkDevice device, Allocate allocate) 45 // `usage` is what the chunks are created with. A chunk that declares VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT
27 : device_(device), allocate_(std::move(allocate)) { 46 // gets its device address from get() as well, and its memory must have been allocated with
28 loaded_ = vk_.load(get, device); 47 // VK_MEMORY_ALLOCATE_DEVICE_ADDRESS_BIT (the allocate callback's job). `families` keeps retired chunks shareable
48 // across queue families (graphics + async compute).
49 ScratchBuffers(PFN_vkGetDeviceProcAddr get, VkDevice device, Allocate allocate,
50 DeviceFaultDiagnostics* diagnostics, VkBufferUsageFlags usage,
51 std::vector<std::uint32_t> families = {})
52 : device_(device), diagnostics_(diagnostics), allocate_(std::move(allocate)), usage_(usage),
53 families_(std::move(families)),
54 addressable_((usage & VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT) != 0) {
55 loaded_ = vk_.load(get, device, addressable_);
29 } 56 }
30 57
31 ~ScratchBuffers() { 58 ~ScratchBuffers() {
32 if (!loaded_) return; 59 if (!loaded_) return;
33 vk_.vkDeviceWaitIdle(device_); 60 DeviceFaultDiagnostics::observe(diagnostics_, vk_.vkDeviceWaitIdle(device_), "vkDeviceWaitIdle");
34 release(current_); 61 release(current_);
35 for (auto& batch : retired_) release(batch); 62 for (auto& batch : retired_) release(batch);
36 for (auto& chunk : spare_) destroy(chunk); 63 for (auto& chunk : spare_) destroy(chunk);
@@ -41,36 +68,14 @@ public:
41 68
42 bool loaded() const { return loaded_; } 69 bool loaded() const { return loaded_; }
43 70
44 // `bytes` of transfer scratch for the next submission, at a 256-byte aligned offset (more than any copy needs). 71 // `bytes` of scratch for the next submission, at a 256-byte aligned offset (more than any copy needs).
45 bool get(std::uint64_t bytes, VkBuffer& buffer, VkDeviceSize& offset) { 72 bool get(std::uint64_t bytes, VkBuffer& buffer, VkDeviceSize& offset) {
46 constexpr VkDeviceSize alignment = 256, minimum = 4u << 20; 73 return claim(bytes, buffer, offset, nullptr);
47 if (!loaded_ || !bytes) return false; 74 }
48 for (auto& chunk : current_.chunks) { 75
49 const VkDeviceSize rem = chunk.used % alignment; 76 // The same for chunks created with a device address: `address` is the device address of the returned offset.
50 const VkDeviceSize pad = rem ? alignment - rem : 0; 77 bool get(std::uint64_t bytes, VkBuffer& buffer, VkDeviceSize& offset, VkDeviceAddress& address) {
51 if (pad <= chunk.size - chunk.used) { 78 return claim(bytes, buffer, offset, &address);
52 const VkDeviceSize start = chunk.used + pad;
53 if (bytes <= chunk.size - start) {
54 chunk.used = start + bytes;
55 buffer = chunk.buffer;
56 offset = start;
57 return true;
58 }
59 }
60 }
61 Chunk chunk;
62 for (std::size_t i = 0; i < spare_.size(); ++i)
63 if (spare_[i].size >= bytes) {
64 chunk = spare_[i];
65 spare_.erase(spare_.begin() + std::ptrdiff_t(i));
66 break;
67 }
68 if (!chunk.buffer && !make_chunk(std::max<std::uint64_t>(bytes, minimum), chunk)) return false;
69 chunk.used = bytes;
70 buffer = chunk.buffer;
71 offset = 0;
72 current_.chunks.push_back(chunk);
73 return true;
74 } 79 }
75 80
76 // The chunks handed out since the last call belong to a submission that `timeline` reaches `ticket` for 81 // The chunks handed out since the last call belong to a submission that `timeline` reaches `ticket` for
@@ -101,7 +106,9 @@ public:
101 if (retired_[i].ticket != 0) { 106 if (retired_[i].ticket != 0) {
102 std::uint64_t done = 0; 107 std::uint64_t done = 0;
103 if (!retired_[i].timeline || 108 if (!retired_[i].timeline ||
104 vk_.vkGetSemaphoreCounterValue(device_, retired_[i].timeline, &done) != VK_SUCCESS || 109 DeviceFaultDiagnostics::observe(diagnostics_,
110 vk_.vkGetSemaphoreCounterValue(device_, retired_[i].timeline, &done),
111 "vkGetSemaphoreCounterValue (scratch)") != VK_SUCCESS ||
105 done < retired_[i].ticket) { 112 done < retired_[i].ticket) {
106 ++i; 113 ++i;
107 continue; 114 continue;
@@ -136,8 +143,9 @@ private:
136#define LEONIDA_SCRATCH_MEMBER(name) PFN_##name name = nullptr; 143#define LEONIDA_SCRATCH_MEMBER(name) PFN_##name name = nullptr;
137 LEONIDA_SCRATCH_FUNCTIONS(LEONIDA_SCRATCH_MEMBER) 144 LEONIDA_SCRATCH_FUNCTIONS(LEONIDA_SCRATCH_MEMBER)
138#undef LEONIDA_SCRATCH_MEMBER 145#undef LEONIDA_SCRATCH_MEMBER
146 PFN_vkGetBufferDeviceAddress vkGetBufferDeviceAddress = nullptr; // optional: addressable pools only
139 147
140 bool load(PFN_vkGetDeviceProcAddr get, VkDevice device) { 148 bool load(PFN_vkGetDeviceProcAddr get, VkDevice device, bool addressable) {
141 bool all = true; 149 bool all = true;
142#define LEONIDA_SCRATCH_LOAD(name) \ 150#define LEONIDA_SCRATCH_LOAD(name) \
143 name = reinterpret_cast<PFN_##name>(get(device, #name)); \ 151 name = reinterpret_cast<PFN_##name>(get(device, #name)); \
@@ -145,14 +153,60 @@ private:
145 LEONIDA_SCRATCH_FUNCTIONS(LEONIDA_SCRATCH_LOAD) 153 LEONIDA_SCRATCH_FUNCTIONS(LEONIDA_SCRATCH_LOAD)
146#undef LEONIDA_SCRATCH_LOAD 154#undef LEONIDA_SCRATCH_LOAD
147#undef LEONIDA_SCRATCH_FUNCTIONS 155#undef LEONIDA_SCRATCH_FUNCTIONS
148 return all; 156 // Only an addressable pool (the indirect clamp's) needs the addresses: a Vulkan 1.0/1.1 device without
157 // bufferDeviceAddress keeps the transfer scratch.
158 this->vkGetBufferDeviceAddress =
159 reinterpret_cast<PFN_vkGetBufferDeviceAddress>(get(device, "vkGetBufferDeviceAddress"));
160 return all && (!addressable || this->vkGetBufferDeviceAddress != nullptr);
149 } 161 }
150 }; 162 };
151 163
164 // Hands out `bytes` from this submission's chunks, making a new chunk where none fits.
165 bool claim(std::uint64_t bytes, VkBuffer& buffer, VkDeviceSize& offset, VkDeviceAddress* address) {
166 constexpr VkDeviceSize alignment = 256, minimum = 4u << 20;
167 if (!loaded_ || !bytes) return false;
168 if (address && !addressable_) return false;
169 for (auto& chunk : current_.chunks) {
170 const VkDeviceSize rem = chunk.used % alignment;
171 const VkDeviceSize pad = rem ? alignment - rem : 0;
172 if (pad > chunk.size - chunk.used) continue;
173 const VkDeviceSize start = chunk.used + pad;
174 if (bytes <= chunk.size - start) {
175 chunk.used = start + bytes;
176 buffer = chunk.buffer;
177 offset = start;
178 if (address) *address = device_address(chunk.buffer) + start;
179 return true;
180 }
181 }
182 Chunk chunk;
183 for (std::size_t i = 0; i < spare_.size(); ++i)
184 if (spare_[i].size >= bytes) {
185 chunk = spare_[i];
186 spare_.erase(spare_.begin() + std::ptrdiff_t(i));
187 break;
188 }
189 if (!chunk.buffer && !make_chunk(std::max<std::uint64_t>(bytes, minimum), chunk)) return false;
190 chunk.used = bytes;
191 buffer = chunk.buffer;
192 offset = 0;
193 current_.chunks.push_back(chunk);
194 if (address) *address = device_address(buffer);
195 return true;
196 }
197
198 VkDeviceAddress device_address(VkBuffer buffer) const {
199 VkBufferDeviceAddressInfo info{VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO};
200 info.buffer = buffer;
201 return vk_.vkGetBufferDeviceAddress(device_, &info);
202 }
203
152 bool make_chunk(std::uint64_t size, Chunk& out) { 204 bool make_chunk(std::uint64_t size, Chunk& out) {
153 VkBufferCreateInfo info{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO}; 205 VkBufferCreateInfo info{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO};
154 info.size = size; 206 info.size = size;
155 info.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT; 207 info.usage = usage_;
208 // A retired chunk can be reused by a submission on a different queue family.
209 share_across_queue_families(info, families_);
156 if (vk_.vkCreateBuffer(device_, &info, nullptr, &out.buffer) != VK_SUCCESS) return false; 210 if (vk_.vkCreateBuffer(device_, &info, nullptr, &out.buffer) != VK_SUCCESS) return false;
157 VkMemoryRequirements requirements{}; 211 VkMemoryRequirements requirements{};
158 vk_.vkGetBufferMemoryRequirements(device_, out.buffer, &requirements); 212 vk_.vkGetBufferMemoryRequirements(device_, out.buffer, &requirements);
@@ -175,7 +229,11 @@ private:
175 } 229 }
176 230
177 VkDevice device_; 231 VkDevice device_;
232 DeviceFaultDiagnostics* diagnostics_;
178 Allocate allocate_; 233 Allocate allocate_;
234 VkBufferUsageFlags usage_ = transfer_usage;
235 std::vector<std::uint32_t> families_;
236 bool addressable_ = false;
179 Functions vk_; 237 Functions vk_;
180 bool loaded_ = false; 238 bool loaded_ = false;
181 Batch current_; // handed out, not yet submitted 239 Batch current_; // handed out, not yet submitted
diff --git a/runtime/src/vulkan_title_image_pool.h b/runtime/src/vulkan_title_image_pool.h
new file mode 100644
index 000000000..94308f687
--- /dev/null
+++ b/runtime/src/vulkan_title_image_pool.h
@@ -0,0 +1,113 @@
1#pragma once
2
3#include <vulkan/vulkan.h>
4
5#include <algorithm>
6#include <bit>
7#include <cstdint>
8#include <map>
9#include <memory>
10#include <mutex>
11#include <vector>
12
13namespace leonida {
14
15// Only optimal-tiled, non-sparse images go in a page. A slot is returned after the owning
16// image is destroyed by the device's normal GPU retirement queue.
17struct TitleImagePage {
18 VkDevice device{};
19 VkDeviceMemory memory{};
20 PFN_vkFreeMemory free_memory{};
21 std::uint32_t type = 0, capacity = 0, allocated = 0;
22 std::mutex mutex;
23 std::vector<std::uint32_t> returned;
24
25 ~TitleImagePage() {
26 if (memory) free_memory(device, memory, nullptr);
27 }
28
29 bool take(std::uint32_t& slot) {
30 std::lock_guard lock(mutex);
31 if (!returned.empty()) {
32 slot = returned.back();
33 returned.pop_back();
34 } else if (allocated < capacity) {
35 slot = allocated++;
36 } else {
37 return false;
38 }
39 return true;
40 }
41
42 void release(std::uint32_t slot) {
43 std::lock_guard lock(mutex);
44 returned.push_back(slot); // the page reserves capacity at creation
45 }
46};
47
48struct PooledTitleImage {
49 PooledTitleImage() = default;
50 PooledTitleImage(const PooledTitleImage&) = delete;
51 PooledTitleImage& operator=(const PooledTitleImage&) = delete;
52
53 std::shared_ptr<TitleImagePage> page;
54 std::uint32_t slot = 0;
55 VkImage image{};
56 PFN_vkDestroyImage destroy_image{};
57
58 ~PooledTitleImage() {
59 if (image) destroy_image(page->device, image, nullptr);
60 if (page) page->release(slot);
61 }
62};
63
64class TitleImagePool {
65public:
66 // The caller has already excluded dedicated-only images. All allocations in one page have
67 // identical stride, compatible memory types and non-overlapping, individually aligned ranges.
68 template<class Allocate>
69 std::unique_ptr<PooledTitleImage> bind(VkDevice device, VkImage image, const VkMemoryRequirements& req,
70 PFN_vkBindImageMemory bind_image, PFN_vkDestroyImage destroy_image,
71 PFN_vkFreeMemory free_memory, Allocate allocate) {
72 constexpr VkDeviceSize largest_slot = VkDeviceSize{2} << 20;
73 const VkDeviceSize needed = std::max(req.size, req.alignment);
74 if (!needed || needed > largest_slot || !req.memoryTypeBits) return {};
75 // Eight size classes per power of two keep padding below one eighth (besides required alignment).
76 const VkDeviceSize quantum = std::max(req.alignment, std::max(VkDeviceSize{1}, std::bit_floor(needed) / 8));
77 const VkDeviceSize stride = (needed + quantum - 1) & ~(quantum - 1);
78 const VkDeviceSize page_size = std::min(VkDeviceSize{8} << 20, 256 * stride);
79 auto allocation = std::make_unique<PooledTitleImage>();
80 std::lock_guard lock(mutex_);
81 auto& pages = classes_[stride];
82 std::erase_if(pages, [](const auto& page) { return page.expired(); });
83 for (const auto& weak : pages) {
84 auto page = weak.lock();
85 if (page && (req.memoryTypeBits & (1u << page->type)) && page->take(allocation->slot)) {
86 allocation->page = std::move(page);
87 break;
88 }
89 }
90 if (!allocation->page) {
91 auto page = std::make_shared<TitleImagePage>();
92 page->device = device;
93 page->free_memory = free_memory;
94 page->capacity = static_cast<std::uint32_t>(page_size / stride);
95 page->returned.reserve(page->capacity);
96 page->memory = allocate(page_size, page->type);
97 if (!page->memory) return {};
98 pages.push_back(page);
99 page->take(allocation->slot);
100 allocation->page = std::move(page);
101 }
102 if (bind_image(device, image, allocation->page->memory, stride * allocation->slot) != VK_SUCCESS) return {};
103 allocation->destroy_image = destroy_image;
104 allocation->image = image;
105 return allocation;
106 }
107
108private:
109 std::mutex mutex_;
110 std::map<VkDeviceSize, std::vector<std::weak_ptr<TitleImagePage>>> classes_;
111};
112
113} // namespace leonida
diff --git a/runtime/src/xdxr_build.comp b/runtime/src/xdxr_build.comp
index 22a3a1334..dcbeca14d 100644
--- a/runtime/src/xdxr_build.comp
+++ b/runtime/src/xdxr_build.comp
@@ -84,7 +84,7 @@ const uint INVALID = 0xffffffffu;
84const uint TRI0 = 0u, TRI1 = 1u, BOX16 = 4u, BOX32 = 5u, INSTANCE = 6u; 84const uint TRI0 = 0u, TRI1 = 1u, BOX16 = 4u, BOX32 = 5u, INSTANCE = 6u;
85const uint LEAF = 0x80000000u; // a binary child that is a sorted element, not an inner node 85const uint LEAF = 0x80000000u; // a binary child that is a sorted element, not an inner node
86const uint REMAP_IDENTITY = 0x09u; 86const uint REMAP_IDENTITY = 0x09u;
87const uint FLAG_TLAS = 1u, FLAG_BOX16 = 2u, FLAG_PAIR = 4u; // pc.flags; xdxr_build.h XdxrBuilder flag_* 87const uint FLAG_TLAS = 1u, FLAG_BOX16 = 2u, FLAG_PAIR = 4u, FLAG_TRANSLATE = 8u; // pc.flags; xdxr_build.h flag_*
88const uint FLAG_BOTTOM_LEVEL = 0x80000000u, VERSION_2403 = 6u, INST_IDENTITY_ROTATION = 0x80000000u, 88const uint FLAG_BOTTOM_LEVEL = 0x80000000u, VERSION_2403 = 6u, INST_IDENTITY_ROTATION = 0x80000000u,
89 INST_FLAGS_MASK = 0xc0000000u; 89 INST_FLAGS_MASK = 0xc0000000u;
90 90
@@ -92,14 +92,14 @@ layout(push_constant) uniform Push {
92 uvec2 dst; // the acceleration structure (header at byte 0) 92 uvec2 dst; // the acceleration structure (header at byte 0)
93 uvec2 scratch; // xdxr_build.h XdxrLayout scratch words 93 uvec2 scratch; // xdxr_build.h XdxrLayout scratch words
94 uvec2 src0; // triangles: vertices; instances: the instance descs 94 uvec2 src0; // triangles: vertices; instances: the instance descs
95 uvec2 src1; // triangles: indices (0 = none) 95 uvec2 src1; // triangles: indices (0 = none); instances with FLAG_TRANSLATE: the BLAS address table
96 uvec2 src2; // triangles: 3x4 transform (0 = none) 96 uvec2 src2; // triangles: 3x4 transform (0 = none); instances with FLAG_TRANSLATE: the arena bound
97 uvec2 bias; // added to addresses read from memory 97 uvec2 bias; // added to addresses read from memory
98 uint mode; 98 uint mode;
99 uint count; // threads of this dispatch 99 uint count; // threads of this dispatch
100 uint first; // triangles: first element; radix: the pass (0..7) 100 uint first; // triangles: first element; radix: the pass (0..7)
101 uint arg0; // triangles: vertex stride; otherwise the most nodes the layout has room for 101 uint arg0; // triangles: vertex stride; otherwise the most nodes the layout has room for
102 uint arg1; // triangles: 0 = R32G32B32_FLOAT, 1 = R32G32_FLOAT 102 uint arg1; // triangles: 0 = R32G32B32_FLOAT, 1 = R32G32_FLOAT; instances: table entries
103 uint arg2; // triangles: index type (0 none, 1 u16, 2 u32); header: 1 = an update (bounds only) 103 uint arg2; // triangles: index type (0 none, 1 u16, 2 u32); header: 1 = an update (bounds only)
104 uint geometry; // triangles: geometry index << 8 | D3D12_RAYTRACING_GEOMETRY_FLAGS 104 uint geometry; // triangles: geometry index << 8 | D3D12_RAYTRACING_GEOMETRY_FLAGS
105 uint elements; // element count N 105 uint elements; // element count N
@@ -109,7 +109,8 @@ layout(push_constant) uniform Push {
109 uint parents_off; 109 uint parents_off;
110 uint total_size; 110 uint total_size;
111 uint flags; // FLAG_TLAS: elements are 128-byte instances; FLAG_BOX16: inner nodes are 64-byte BOX16; 111 uint flags; // FLAG_TLAS: elements are 128-byte instances; FLAG_BOX16: inner nodes are 64-byte BOX16;
112 // FLAG_PAIR: pair sibling triangles that share an edge into TRI0/TRI1 leaves 112 // FLAG_PAIR: pair sibling triangles that share an edge into TRI0/TRI1 leaves;
113 // FLAG_TRANSLATE (instances): BLAS addresses go through blas_address
113} pc; 114} pc;
114 115
115// ---- 64-bit addresses as uvec2 ---- 116// ---- 64-bit addresses as uvec2 ----
@@ -128,6 +129,12 @@ uint load(uvec2 base, uint byte_offset) { return at(base, byte_offset).w[0]; }
128void store(uvec2 base, uint byte_offset, uint v) { at(base, byte_offset).w[0] = v; } 129void store(uvec2 base, uint byte_offset, uint v) { at(base, byte_offset).w[0] = v; }
129void storef(uvec2 base, uint byte_offset, float v) { store(base, byte_offset, floatBitsToUint(v)); } 130void storef(uvec2 base, uint byte_offset, float v) { store(base, byte_offset, floatBitsToUint(v)); }
130bool is_null(uvec2 a) { return a.x == 0u && a.y == 0u; } 131bool is_null(uvec2 a) { return a.x == 0u && a.y == 0u; }
132bool less64(uvec2 a, uvec2 b) { return a.y < b.y || (a.y == b.y && a.x < b.x); }
133uvec2 sub64(uvec2 a, uvec2 b) {
134 uint borrow;
135 uint lo = usubBorrow(a.x, b.x, borrow);
136 return uvec2(lo, a.y - b.y - borrow);
137}
131 138
132// ---- scratch: centroid bounds (6 ordered words at 0) and the node count (word 6), keys and element indices twice 139// ---- scratch: centroid bounds (6 ordered words at 0) and the node count (word 6), keys and element indices twice
133// (the radix sort's two sides; the sorted result is back in the first after an even number of passes), digit 140// (the radix sort's two sides; the sorted result is back in the first after an even number of passes), digit
@@ -273,6 +280,38 @@ void build_triangle(uint t) {
273} 280}
274 281
275// ---- MODE_INSTANCES ---- 282// ---- MODE_INSTANCES ----
283// The VA shaders reach the BLAS at the application's VA `va` by (xdxr_build.h XdxrBlasTable). Without
284// FLAG_TRANSLATE, `va` itself. With it: inside a range of the table at src1 (arg1 entries of 6 words {title VA, end,
285// shader VA}, in title-VA order), that range's shader VA, when its 64-byte header lies in the range; outside every
286// range, `va` when the header lies below the arena bound src2 (0: no bound). Anything else, and a VA the INSTANCE
287// record cannot hold (40 bits in 256-byte units), is not reachable (false): nothing is read through it.
288bool blas_address(uvec2 va, out uvec2 shader_va) {
289 shader_va = va;
290 if ((pc.flags & FLAG_TRANSLATE) == 0u) return true;
291 uint lo = 0u, hi = pc.arg1; // the first entry that starts past va
292 while (lo < hi) {
293 uint mid = (lo + hi) >> 1u;
294 uvec2 start = uvec2(load(pc.src1, 24u * mid), load(pc.src1, 24u * mid + 4u));
295 if (less64(va, start)) hi = mid; else lo = mid + 1u;
296 }
297 uvec2 last = add(va, 64u);
298 if (less64(last, va)) return false; // wraps
299 bool found = false;
300 if (lo > 0u) {
301 uint e = 24u * (lo - 1u);
302 uvec2 end = uvec2(load(pc.src1, e + 8u), load(pc.src1, e + 12u));
303 if (less64(va, end)) {
304 if (less64(end, last)) return false; // the header runs past the copy
305 uvec2 start = uvec2(load(pc.src1, e), load(pc.src1, e + 4u));
306 uvec2 to = uvec2(load(pc.src1, e + 16u), load(pc.src1, e + 20u));
307 shader_va = add64(to, sub64(va, start));
308 found = true;
309 }
310 }
311 if (!found && !is_null(pc.src2) && less64(pc.src2, last)) return false;
312 return (shader_va.x & 255u) == 0u && shader_va.y < 256u;
313}
314
276void build_instance(uint i) { 315void build_instance(uint i) {
277 uint d = 64u * i; 316 uint d = 64u * i;
278 float m[12]; 317 float m[12];
@@ -285,8 +324,10 @@ void build_instance(uint i) {
285 store(pc.dst, o + 52u, contrib); 324 store(pc.dst, o + 52u, contrib);
286 vec3 lo = vec3(uintBitsToFloat(0x7f800000u)), hi = -lo; 325 vec3 lo = vec3(uintBitsToFloat(0x7f800000u)), hi = -lo;
287 uint root = INVALID; 326 uint root = INVALID;
288 if (!is_null(blas_va)) { 327 uvec2 blas_sva = blas_va;
289 uvec2 blas = add64(blas_va, pc.bias); 328 bool reached = !is_null(blas_va) && blas_address(blas_va, blas_sva);
329 if (reached) {
330 uvec2 blas = add64(blas_sva, pc.bias);
290 root = load(blas, 48u); 331 root = load(blas, 48u);
291 vec3 blo = vec3(uintBitsToFloat(load(blas, 16u)), uintBitsToFloat(load(blas, 20u)), uintBitsToFloat(load(blas, 24u))); 332 vec3 blo = vec3(uintBitsToFloat(load(blas, 16u)), uintBitsToFloat(load(blas, 20u)), uintBitsToFloat(load(blas, 24u)));
292 vec3 bhi = vec3(uintBitsToFloat(load(blas, 28u)), uintBitsToFloat(load(blas, 32u)), uintBitsToFloat(load(blas, 36u))); 333 vec3 bhi = vec3(uintBitsToFloat(load(blas, 28u)), uintBitsToFloat(load(blas, 32u)), uintBitsToFloat(load(blas, 36u)));
@@ -303,8 +344,10 @@ void build_instance(uint i) {
303 bool identity = m[0] == 1.0 && m[1] == 0.0 && m[2] == 0.0 && m[4] == 0.0 && m[5] == 1.0 && m[6] == 0.0 && 344 bool identity = m[0] == 1.0 && m[1] == 0.0 && m[2] == 0.0 && m[4] == 0.0 && m[5] == 1.0 && m[6] == 0.0 &&
304 m[8] == 0.0 && m[9] == 0.0 && m[10] == 1.0; 345 m[8] == 0.0 && m[9] == 0.0 && m[10] == 1.0;
305 store(pc.dst, o + 56u, (root & ~INST_FLAGS_MASK) | (identity ? INST_IDENTITY_ROTATION : 0u)); 346 store(pc.dst, o + 56u, (root & ~INST_FLAGS_MASK) | (identity ? INST_IDENTITY_ROTATION : 0u));
306 // The record holds the BLAS address in 256-byte units: the application's address, as the game wrote it. 347 // The record holds the BLAS address in 256-byte units: the application's address, as the game wrote it, or with
307 store(pc.dst, o + 60u, (blas_va.x >> 8) | (blas_va.y << 24)); 348 // FLAG_TRANSLATE the one shaders reach it by (0 when there is none: a null BLAS).
349 if (!reached) blas_sva = uvec2(0u);
350 store(pc.dst, o + 60u, (blas_sva.x >> 8) | (blas_sva.y << 24));
308 // world-to-object: the inverse of the affine transform 351 // world-to-object: the inverse of the affine transform
309 mat3 a = mat3(m[0], m[4], m[8], m[1], m[5], m[9], m[2], m[6], m[10]); // columns 352 mat3 a = mat3(m[0], m[4], m[8], m[1], m[5], m[9], m[2], m[6], m[10]); // columns
310 float det = determinant(a); 353 float det = determinant(a);
diff --git a/runtime/src/xdxr_build.h b/runtime/src/xdxr_build.h
index e1c1a233e..08623f52a 100644
--- a/runtime/src/xdxr_build.h
+++ b/runtime/src/xdxr_build.h
@@ -24,6 +24,7 @@
24 24
25#include <vulkan/vulkan.h> 25#include <vulkan/vulkan.h>
26 26
27#include "vulkan_aftermath.h"
27#include "xdxr_build_spv.h" 28#include "xdxr_build_spv.h"
28 29
29namespace leonida { 30namespace leonida {
@@ -105,6 +106,20 @@ struct XdxrTriangles {
105 std::uint32_t flags = 0; // D3D12_RAYTRACING_GEOMETRY_FLAGS (bit 0 opaque) 106 std::uint32_t flags = 0; // D3D12_RAYTRACING_GEOMETRY_FLAGS (bit 0 opaque)
106}; 107};
107 108
109// How a top-level build reaches the BLAS addresses its instance descs hold (xdxr_build.comp blas_address). They are
110// the application's GPU VAs; with `translate`, one inside a range of `address` (`count` 24-byte entries {title VA,
111// end, shader VA}, in title-VA order, none overlapping: src/title_va_alias.h) becomes that range's shader VA, one
112// outside every range is kept below `bound` (an arena VA; `bound` 0: any VA is kept), and any other is not reachable:
113// that instance is built with no BLAS (an empty box, never hit) and nothing is read through its address. The record
114// then holds the shader VA, which is what the traversal shaders add heap_base to. Without `translate` every address
115// is kept, as before.
116struct XdxrBlasTable {
117 bool translate = false;
118 std::uint64_t address = 0; // device address of the entries
119 std::uint32_t count = 0;
120 std::uint64_t bound = 0;
121};
122
108class XdxrBuilder { 123class XdxrBuilder {
109public: 124public:
110 XdxrBuilder(PFN_vkGetDeviceProcAddr get, VkDevice device) : device_(device) { 125 XdxrBuilder(PFN_vkGetDeviceProcAddr get, VkDevice device) : device_(device) {
@@ -166,9 +181,11 @@ public:
166 } 181 }
167 182
168 // Records a top-level build from `count` D3D12_RAYTRACING_INSTANCE_DESCs at `instances`. 183 // Records a top-level build from `count` D3D12_RAYTRACING_INSTANCE_DESCs at `instances`.
169 // `update_from`: as for record_blas; the instances may move, and name other BLASes. 184 // `update_from`: as for record_blas; the instances may move, and name other BLASes. `blases`: how the BLAS
185 // addresses in the descs are reached (XdxrBlasTable); null keeps them as they are.
170 bool record_tlas(VkCommandBuffer cb, const XdxrLayout& layout, std::uint64_t instances, std::uint64_t dst, 186 bool record_tlas(VkCommandBuffer cb, const XdxrLayout& layout, std::uint64_t instances, std::uint64_t dst,
171 std::uint64_t scratch, std::uint64_t bias = 0, std::uint64_t update_from = 0) { 187 std::uint64_t scratch, std::uint64_t bias = 0, std::uint64_t update_from = 0,
188 const XdxrBlasTable* blases = nullptr) {
172 if (!loaded_ || !layout.tlas || !layout.size || !dst || !scratch || (layout.elements && !instances)) 189 if (!loaded_ || !layout.tlas || !layout.size || !dst || !scratch || (layout.elements && !instances))
173 return false; 190 return false;
174 Push p = base(layout, dst, scratch); 191 Push p = base(layout, dst, scratch);
@@ -179,6 +196,12 @@ public:
179 t.mode = mode_instances; 196 t.mode = mode_instances;
180 t.count = layout.elements; 197 t.count = layout.elements;
181 t.src0 = split(instances); 198 t.src0 = split(instances);
199 if (blases && blases->translate) {
200 t.flags |= flag_translate;
201 t.src1 = split(blases->count ? blases->address : 0);
202 t.arg1 = blases->address ? blases->count : 0;
203 t.src2 = split(blases->bound);
204 }
182 dispatch(cb, t, t.count); 205 dispatch(cb, t, t.count);
183 } 206 }
184 if (update_from) refit_finish(cb, layout, p); else finish(cb, layout, p); 207 if (update_from) refit_finish(cb, layout, p); else finish(cb, layout, p);
@@ -231,7 +254,7 @@ private:
231 std::uint32_t mode = 0, count = 0, first = 0, arg0 = 0, arg1 = 0, arg2 = 0, geometry = 0, elements = 0, 254 std::uint32_t mode = 0, count = 0, first = 0, arg0 = 0, arg1 = 0, arg2 = 0, geometry = 0, elements = 0,
232 sort_size = 0, elements_off = 0, nodes_off = 0, parents_off = 0, total_size = 0, flags = 0; 255 sort_size = 0, elements_off = 0, nodes_off = 0, parents_off = 0, total_size = 0, flags = 0;
233 }; 256 };
234 enum : std::uint32_t { flag_tlas = 1, flag_box16 = 2, flag_pair = 4 }; // xdxr_build.comp FLAG_* 257 enum : std::uint32_t { flag_tlas = 1, flag_box16 = 2, flag_pair = 4, flag_translate = 8 }; // xdxr_build.comp FLAG_*
235 static_assert(sizeof(Push) == 104, "push constants must match xdxr_build.comp"); 258 static_assert(sizeof(Push) == 104, "push constants must match xdxr_build.comp");
236 259
237 static Addr split(std::uint64_t a) { return {std::uint32_t(a), std::uint32_t(a >> 32)}; } 260 static Addr split(std::uint64_t a) { return {std::uint32_t(a), std::uint32_t(a >> 32)}; }
@@ -388,6 +411,7 @@ private:
388 module_info.codeSize = sizeof(xdxr_build_spirv); 411 module_info.codeSize = sizeof(xdxr_build_spirv);
389 module_info.pCode = xdxr_build_spirv; 412 module_info.pCode = xdxr_build_spirv;
390 VkShaderModule module = VK_NULL_HANDLE; 413 VkShaderModule module = VK_NULL_HANDLE;
414 const aftermath::ShaderName aftermath_name("(runtime) xdxr_build.comp");
391 if (vk_.vkCreateShaderModule(device_, &module_info, nullptr, &module) != VK_SUCCESS) return false; 415 if (vk_.vkCreateShaderModule(device_, &module_info, nullptr, &module) != VK_SUCCESS) return false;
392 VkComputePipelineCreateInfo info{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO}; 416 VkComputePipelineCreateInfo info{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO};
393 info.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, nullptr, 0, VK_SHADER_STAGE_COMPUTE_BIT, 417 info.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO, nullptr, 0, VK_SHADER_STAGE_COMPUTE_BIT,
diff --git a/runtime/src/xdxr_build.inc b/runtime/src/xdxr_build.inc
index f6b8f949c..e17aecfea 100644
--- a/runtime/src/xdxr_build.inc
+++ b/runtime/src/xdxr_build.inc
@@ -1,46 +1,46 @@
1{0x07230203,0x00010500,0x000d000b,0x00005ce9, 1{0x07230203,0x00010500,0x000d000b,0x00006129,
20x00000000,0x00020011,0x00000001,0x00020011, 20x00000000,0x00020011,0x00000001,0x00020011,
30x000014e3,0x0006000b,0x00000001,0x4c534c47, 30x000014e3,0x0006000b,0x00000001,0x4c534c47,
40x6474732e,0x3035342e,0x00000000,0x0003000e, 40x6474732e,0x3035342e,0x00000000,0x0003000e,
50x000014e4,0x00000001,0x0011000f,0x00000005, 50x000014e4,0x00000001,0x0011000f,0x00000005,
60x00000004,0x6e69616d,0x00000000,0x00000180, 60x00000004,0x6e69616d,0x00000000,0x000001b9,
70x00000825,0x0000083a,0x00000919,0x00000980, 70x00000924,0x00000939,0x00000a18,0x00000a7f,
80x000009d5,0x00000a2e,0x00000d70,0x00000e00, 80x00000ad4,0x00000b2d,0x00000e6f,0x00000eff,
90x000011db,0x000011e4,0x000011e5,0x00060010, 90x000012da,0x000012e3,0x000012e4,0x00060010,
100x00000004,0x00000011,0x00000040,0x00000001, 100x00000004,0x00000011,0x00000040,0x00000001,
110x00000001,0x00040047,0x00000015,0x00000006, 110x00000001,0x00040047,0x00000015,0x00000006,
120x00000004,0x00030047,0x00000016,0x00000002, 120x00000004,0x00030047,0x00000016,0x00000002,
130x00050048,0x00000016,0x00000000,0x00000023, 130x00050048,0x00000016,0x00000000,0x00000023,
140x00000000,0x00030047,0x0000017e,0x00000002, 140x00000000,0x00030047,0x000001b7,0x00000002,
150x00050048,0x0000017e,0x00000000,0x00000023, 150x00050048,0x000001b7,0x00000000,0x00000023,
160x00000000,0x00050048,0x0000017e,0x00000001, 160x00000000,0x00050048,0x000001b7,0x00000001,
170x00000023,0x00000008,0x00050048,0x0000017e, 170x00000023,0x00000008,0x00050048,0x000001b7,
180x00000002,0x00000023,0x00000010,0x00050048, 180x00000002,0x00000023,0x00000010,0x00050048,
190x0000017e,0x00000003,0x00000023,0x00000018, 190x000001b7,0x00000003,0x00000023,0x00000018,
200x00050048,0x0000017e,0x00000004,0x00000023, 200x00050048,0x000001b7,0x00000004,0x00000023,
210x00000020,0x00050048,0x0000017e,0x00000005, 210x00000020,0x00050048,0x000001b7,0x00000005,
220x00000023,0x00000028,0x00050048,0x0000017e, 220x00000023,0x00000028,0x00050048,0x000001b7,
230x00000006,0x00000023,0x00000030,0x00050048, 230x00000006,0x00000023,0x00000030,0x00050048,
240x0000017e,0x00000007,0x00000023,0x00000034, 240x000001b7,0x00000007,0x00000023,0x00000034,
250x00050048,0x0000017e,0x00000008,0x00000023, 250x00050048,0x000001b7,0x00000008,0x00000023,
260x00000038,0x00050048,0x0000017e,0x00000009, 260x00000038,0x00050048,0x000001b7,0x00000009,
270x00000023,0x0000003c,0x00050048,0x0000017e, 270x00000023,0x0000003c,0x00050048,0x000001b7,
280x0000000a,0x00000023,0x00000040,0x00050048, 280x0000000a,0x00000023,0x00000040,0x00050048,
290x0000017e,0x0000000b,0x00000023,0x00000044, 290x000001b7,0x0000000b,0x00000023,0x00000044,
300x00050048,0x0000017e,0x0000000c,0x00000023, 300x00050048,0x000001b7,0x0000000c,0x00000023,
310x00000048,0x00050048,0x0000017e,0x0000000d, 310x00000048,0x00050048,0x000001b7,0x0000000d,
320x00000023,0x0000004c,0x00050048,0x0000017e, 320x00000023,0x0000004c,0x00050048,0x000001b7,
330x0000000e,0x00000023,0x00000050,0x00050048, 330x0000000e,0x00000023,0x00000050,0x00050048,
340x0000017e,0x0000000f,0x00000023,0x00000054, 340x000001b7,0x0000000f,0x00000023,0x00000054,
350x00050048,0x0000017e,0x00000010,0x00000023, 350x00050048,0x000001b7,0x00000010,0x00000023,
360x00000058,0x00050048,0x0000017e,0x00000011, 360x00000058,0x00050048,0x000001b7,0x00000011,
370x00000023,0x0000005c,0x00050048,0x0000017e, 370x00000023,0x0000005c,0x00050048,0x000001b7,
380x00000012,0x00000023,0x00000060,0x00050048, 380x00000012,0x00000023,0x00000060,0x00050048,
390x0000017e,0x00000013,0x00000023,0x00000064, 390x000001b7,0x00000013,0x00000023,0x00000064,
400x00040047,0x000011db,0x0000000b,0x0000001c, 400x00040047,0x000012da,0x0000000b,0x0000001c,
410x00040047,0x000011e4,0x0000000b,0x0000001a, 410x00040047,0x000012e3,0x0000000b,0x0000001a,
420x00040047,0x000011e5,0x0000000b,0x0000001b, 420x00040047,0x000012e4,0x0000000b,0x0000001b,
430x00040047,0x000012fc,0x0000000b,0x00000019, 430x00040047,0x000013fb,0x0000000b,0x00000019,
440x00020013,0x00000002,0x00030021,0x00000003, 440x00020013,0x00000002,0x00030021,0x00000003,
450x00000002,0x00040015,0x00000006,0x00000020, 450x00000002,0x00040015,0x00000006,0x00000020,
460x00000000,0x00040017,0x00000007,0x00000006, 460x00000000,0x00040017,0x00000007,0x00000006,
@@ -51,7530 +51,7849 @@
510x000014e5,0x00000016,0x00030016,0x00000027, 510x000014e5,0x00000016,0x00030016,0x00000027,
520x00000020,0x00040020,0x00000028,0x00000007, 520x00000020,0x00040020,0x00000028,0x00000007,
530x00000027,0x00020014,0x0000002f,0x00040017, 530x00000027,0x00020014,0x0000002f,0x00040017,
540x00000063,0x00000027,0x00000003,0x00040020, 540x0000006c,0x00000027,0x00000003,0x00040020,
550x00000064,0x00000007,0x00000063,0x00040020, 550x0000006d,0x00000007,0x0000006c,0x00040020,
560x0000008d,0x00000007,0x0000002f,0x00040017, 560x00000096,0x00000007,0x0000002f,0x00040017,
570x000000d2,0x00000006,0x00000003,0x00040020, 570x000000df,0x00000006,0x00000003,0x00040020,
580x000000d8,0x00000007,0x000000d2,0x0004002b, 580x000000e5,0x00000007,0x000000df,0x0004002b,
590x00000006,0x000000df,0x00000004,0x0004001c, 590x00000006,0x000000ec,0x00000004,0x0004001c,
600x000000e0,0x00000006,0x000000df,0x00040020, 600x000000ed,0x00000006,0x000000ec,0x00040020,
610x000000e1,0x00000007,0x000000e0,0x00040015, 610x000000ee,0x00000007,0x000000ed,0x00040015,
620x000000e7,0x00000020,0x00000001,0x0004002b, 620x000000f4,0x00000020,0x00000001,0x0004002b,
630x00000006,0x0000012b,0x00000000,0x0004001e, 630x00000006,0x00000138,0x00000000,0x0004001e,
640x00000130,0x00000006,0x00000006,0x0004002b, 640x0000013d,0x00000006,0x00000006,0x0004002b,
650x00000006,0x00000135,0x00000001,0x0004002b, 650x00000006,0x00000142,0x00000001,0x0004002b,
660x000000e7,0x0000015e,0x00000000,0x00040020, 660x000000f4,0x0000016b,0x00000000,0x00040020,
670x0000015f,0x000014e5,0x00000006,0x0016001e, 670x0000016c,0x000014e5,0x00000006,0x0016001e,
680x0000017e,0x00000007,0x00000007,0x00000007, 680x000001b7,0x00000007,0x00000007,0x00000007,
690x00000007,0x00000007,0x00000007,0x00000006, 690x00000007,0x00000007,0x00000007,0x00000006,
700x00000006,0x00000006,0x00000006,0x00000006, 700x00000006,0x00000006,0x00000006,0x00000006,
710x00000006,0x00000006,0x00000006,0x00000006, 710x00000006,0x00000006,0x00000006,0x00000006,
720x00000006,0x00000006,0x00000006,0x00000006, 720x00000006,0x00000006,0x00000006,0x00000006,
730x00000006,0x00040020,0x0000017f,0x00000009, 730x00000006,0x00040020,0x000001b8,0x00000009,
740x0000017e,0x0004003b,0x0000017f,0x00000180, 740x000001b7,0x0004003b,0x000001b8,0x000001b9,
750x00000009,0x0004002b,0x000000e7,0x00000181, 750x00000009,0x0004002b,0x000000f4,0x000001ba,
760x0000000e,0x00040020,0x00000182,0x00000009, 760x0000000e,0x00040020,0x000001bb,0x00000009,
770x00000006,0x0004002b,0x00000006,0x00000185, 770x00000006,0x0004002b,0x00000006,0x000001be,
780x00000100,0x0004002b,0x00000006,0x0000018b, 780x00000100,0x0004002b,0x00000006,0x000001c4,
790x00000040,0x0004002b,0x00000006,0x00000194, 790x00000040,0x0004002b,0x00000006,0x000001cd,
800x00000008,0x0004002b,0x00000006,0x0000019b, 800x00000008,0x0004002b,0x00000006,0x000001d4,
810x0000000c,0x0004002b,0x00000006,0x000001a2, 810x0000000c,0x0004002b,0x00000006,0x000001db,
820x00000010,0x0004002b,0x00000006,0x000001b6, 820x00000010,0x0004002b,0x00000006,0x000001ef,
830x00000018,0x0004002b,0x000000e7,0x000001b7, 830x00000018,0x0004002b,0x000000f4,0x000001f0,
840x0000000d,0x0004002b,0x00000006,0x000001cc, 840x0000000d,0x0004002b,0x00000006,0x00000205,
850x00000020,0x0004002b,0x000000e7,0x000001cd, 850x00000020,0x0004002b,0x000000f4,0x00000206,
860x00000009,0x0004002b,0x00000006,0x00000208, 860x00000009,0x0004002b,0x00000006,0x00000241,
870x80000000,0x0004002b,0x00000006,0x0000021d, 870x80000000,0x0004002b,0x00000006,0x00000256,
880x7fffffff,0x0004002b,0x000000e7,0x0000022b, 880x7fffffff,0x0004002b,0x000000f4,0x00000264,
890x00000001,0x00040020,0x0000022d,0x00000009, 890x00000001,0x00040020,0x00000266,0x00000009,
900x00000007,0x0004002b,0x00000006,0x00000247, 900x00000007,0x0004002b,0x00000006,0x00000280,
910x00000002,0x0004002b,0x00000006,0x00000260, 910x00000002,0x0004002b,0x00000006,0x00000299,
920x00000014,0x0004002b,0x00000027,0x000002c4, 920x00000014,0x0004002b,0x00000027,0x000002fd,
930x3f000000,0x0004002b,0x000000e7,0x000002dc, 930x3f000000,0x0004002b,0x000000f4,0x00000315,
940x00000002,0x0004002b,0x000000e7,0x000002e4, 940x00000002,0x0004002b,0x000000f4,0x0000031d,
950x00000003,0x0004002b,0x000000e7,0x000002ec, 950x00000003,0x0004002b,0x000000f4,0x00000325,
960x00000004,0x0004002b,0x000000e7,0x000002f4, 960x00000004,0x0004002b,0x000000f4,0x0000032d,
970x00000005,0x0004002b,0x000000e7,0x000002fb, 970x00000005,0x0004002b,0x000000f4,0x00000334,
980x00000013,0x0004002b,0x00000006,0x00000309, 980x00000013,0x0004002b,0x00000006,0x00000342,
990x00000080,0x0004002b,0x000000e7,0x00000311, 990x00000080,0x0004002b,0x000000f4,0x0000034a,
1000x0000000f,0x0004002b,0x000000e7,0x00000318, 1000x0000000f,0x0004002b,0x000000f4,0x00000351,
1010x00000006,0x0004002b,0x00000006,0x0000031c, 1010x00000006,0x0004002b,0x00000006,0x00000355,
1020x00000006,0x0004002b,0x000000e7,0x00000321, 1020x00000006,0x0004002b,0x000000f4,0x0000035a,
1030x00000010,0x0004002b,0x00000006,0x0000032b, 1030x00000010,0x0004002b,0x00000006,0x00000364,
1040x00000005,0x0004002b,0x00000006,0x0000033a, 1040x00000005,0x0004002b,0x00000006,0x00000373,
1050x00008000,0x0004002b,0x00000006,0x00000345, 1050x00008000,0x0004002b,0x00000006,0x0000037e,
1060x7f800000,0x0004002b,0x00000006,0x0000034a, 1060x7f800000,0x0004002b,0x00000006,0x00000383,
1070x00007e00,0x0004002b,0x000000e7,0x00000355, 1070x00007e00,0x0004002b,0x000000f4,0x0000038e,
1080x00000017,0x0004002b,0x000000e7,0x00000358, 1080x00000017,0x0004002b,0x000000f4,0x00000391,
1090x0000007f,0x0004002b,0x00000006,0x00000360, 1090x0000007f,0x0004002b,0x00000006,0x00000399,
1100x00007c00,0x0004002b,0x00000006,0x00000361, 1100x00007c00,0x0004002b,0x00000006,0x0000039a,
1110x00007bff,0x0004002b,0x000000e7,0x00000366, 1110x00007bff,0x0004002b,0x000000f4,0x0000039f,
1120xfffffff2,0x0004002b,0x00000006,0x0000036f, 1120xfffffff2,0x0004002b,0x00000006,0x000003a8,
1130x00000400,0x0004002b,0x00000006,0x00000377, 1130x00000400,0x0004002b,0x00000006,0x000003b0,
1140x007fffff,0x0004002b,0x000000e7,0x0000037d, 1140x007fffff,0x0004002b,0x000000f4,0x000003b6,
1150x0000000a,0x0004002b,0x00000006,0x00000386, 1150x0000000a,0x0004002b,0x00000006,0x000003bf,
1160x00001fff,0x0003002a,0x0000002f,0x00000393, 1160x00001fff,0x0003002a,0x0000002f,0x000003cc,
1170x00030029,0x0000002f,0x000003ae,0x0004002b, 1170x00030029,0x0000002f,0x000003e7,0x0004002b,
1180x00000027,0x000003ed,0x00000000,0x0004002b, 1180x00000027,0x00000426,0x00000000,0x0004002b,
1190x000000e7,0x000003fb,0x0000000b,0x0004002b, 1190x000000f4,0x00000434,0x0000000b,0x0004002b,
1200x00000006,0x00000423,0x0000ffff,0x0004002b, 1200x00000006,0x0000045c,0x0000ffff,0x0004002b,
1210x00000006,0x00000437,0x00000003,0x00040017, 1210x00000006,0x00000470,0x00000003,0x00040017,
1220x0000043c,0x00000027,0x00000004,0x0004001c, 1220x00000475,0x00000027,0x00000004,0x0004001c,
1230x00000476,0x00000063,0x00000437,0x00040020, 1230x000004af,0x0000006c,0x00000470,0x00040020,
1240x00000477,0x00000007,0x00000476,0x0004002b, 1240x000004b0,0x00000007,0x000004af,0x0004002b,
1250x000000e7,0x00000488,0x00000008,0x0004002b, 1250x000000f4,0x000004c1,0x00000008,0x0004002b,
1260x00000006,0x000004c7,0x00000024,0x0004002b, 1260x00000006,0x00000500,0x00000024,0x0004002b,
1270x00000006,0x000004d2,0x00000028,0x0004002b, 1270x00000006,0x0000050b,0x00000028,0x0004002b,
1280x00000006,0x000004dd,0x0000002c,0x0004002b, 1280x00000006,0x00000516,0x0000002c,0x0004002b,
1290x00000006,0x000004e8,0x00000030,0x0004002b, 1290x00000006,0x00000521,0x00000030,0x0004002b,
1300x000000e7,0x000004ea,0x0000000c,0x0004002b, 1300x000000f4,0x00000523,0x0000000c,0x0004002b,
1310x00000006,0x000004f4,0x00000034,0x0004002b, 1310x00000006,0x0000052d,0x00000034,0x0004002b,
1320x00000006,0x000004fe,0x00000038,0x0004002b, 1320x00000006,0x00000537,0x00000038,0x0004002b,
1330x00000006,0x00000500,0xffffffff,0x0004002b, 1330x00000006,0x00000539,0xffffffff,0x0004002b,
1340x00000006,0x00000508,0x0000003c,0x0004002b, 1340x00000006,0x00000541,0x0000003c,0x0004002b,
1350x00000006,0x0000050a,0x00000009,0x00040017, 1350x00000006,0x00000543,0x00000009,0x00040017,
1360x00000514,0x0000002f,0x00000003,0x0004002b, 1360x0000054d,0x0000002f,0x00000003,0x0004002b,
1370x00000027,0x0000053c,0x7f800000,0x0006002c, 1370x00000027,0x00000575,0x7f800000,0x0006002c,
1380x00000063,0x0000053d,0x0000053c,0x0000053c, 1380x0000006c,0x00000576,0x00000575,0x00000575,
1390x0000053c,0x0004001c,0x00000557,0x00000027, 1390x00000575,0x0004002b,0x00000006,0x0000062f,
1400x0000019b,0x00040020,0x00000558,0x00000007, 1400x000000ff,0x0004001c,0x00000645,0x00000027,
1410x00000557,0x0004002b,0x00000006,0x000005df, 1410x000001d4,0x00040020,0x00000646,0x00000007,
1420x0000001c,0x0004002b,0x000000e7,0x000005f9, 1420x00000645,0x0004002b,0x00000006,0x000006d9,
1430x00000018,0x0004002b,0x000000e7,0x00000653, 1430x0000001c,0x0004002b,0x000000f4,0x000006f3,
1440x00000007,0x0004002b,0x00000027,0x00000677, 1440x00000018,0x0004002b,0x000000f4,0x0000074d,
1450x3f800000,0x0004002b,0x00000006,0x000006ac, 1450x00000007,0x0004002b,0x00000027,0x00000771,
1460x3fffffff,0x00040018,0x000006c6,0x00000063, 1460x3f800000,0x0004002b,0x00000006,0x000007a6,
1470x00000003,0x00040020,0x000006c7,0x00000007, 1470x3fffffff,0x0005002c,0x00000007,0x000007b5,
1480x000006c6,0x0006002c,0x00000063,0x000006eb, 1480x00000138,0x00000138,0x00040018,0x000007c5,
1490x000003ed,0x000003ed,0x000003ed,0x0006002c, 1490x0000006c,0x00000003,0x00040020,0x000007c6,
1500x000006c6,0x000006ec,0x000006eb,0x000006eb, 1500x00000007,0x000007c5,0x0006002c,0x0000006c,
1510x000006eb,0x0004002b,0x00000006,0x00000712, 1510x000007ea,0x00000426,0x00000426,0x00000426,
1520x00000044,0x0004002b,0x00000006,0x00000721, 1520x0006002c,0x000007c5,0x000007eb,0x000007ea,
1530x00000048,0x0004002b,0x00000006,0x00000730, 1530x000007ea,0x000007ea,0x0004002b,0x00000006,
1540x0000004c,0x0004002b,0x00000006,0x00000741, 1540x00000811,0x00000044,0x0004002b,0x00000006,
1550x00000070,0x0004002b,0x00000006,0x0000074b, 1550x00000820,0x00000048,0x0004002b,0x00000006,
1560x00000074,0x0004002b,0x00000006,0x00000754, 1560x0000082f,0x0000004c,0x0004002b,0x00000006,
1570x00000078,0x0004002b,0x00000006,0x0000075d, 1570x00000840,0x00000070,0x0004002b,0x00000006,
1580x0000007c,0x0004002b,0x00000006,0x00000777, 1580x0000084a,0x00000074,0x0004002b,0x00000006,
1590x000003ff,0x0004002b,0x00000006,0x0000077e, 1590x00000853,0x00000078,0x0004002b,0x00000006,
1600x030000ff,0x0004002b,0x00000006,0x00000784, 1600x0000085c,0x0000007c,0x0004002b,0x00000006,
1610x0300f00f,0x0004002b,0x00000006,0x0000078a, 1610x00000876,0x000003ff,0x0004002b,0x00000006,
1620x030c30c3,0x0004002b,0x00000006,0x00000790, 1620x0000087d,0x030000ff,0x0004002b,0x00000006,
1630x09249249,0x0004002b,0x00000027,0x000007d3, 1630x00000883,0x0300f00f,0x0004002b,0x00000006,
1640x0da24260,0x0006002c,0x00000063,0x000007d4, 1640x00000889,0x030c30c3,0x0004002b,0x00000006,
1650x000007d3,0x000007d3,0x000007d3,0x0004002b, 1650x0000088f,0x09249249,0x0004002b,0x00000027,
1660x00000027,0x000007e2,0x447fc000,0x0004001c, 1660x000008d2,0x0da24260,0x0006002c,0x0000006c,
1670x00000823,0x00000006,0x0000036f,0x00040020, 1670x000008d3,0x000008d2,0x000008d2,0x000008d2,
1680x00000824,0x00000004,0x00000823,0x0004003b, 1680x0004002b,0x00000027,0x000008e1,0x447fc000,
1690x00000824,0x00000825,0x00000004,0x00040020, 1690x0004001c,0x00000922,0x00000006,0x000003a8,
1700x00000838,0x00000004,0x00000006,0x0004003b, 1700x00040020,0x00000923,0x00000004,0x00000922,
1710x00000824,0x0000083a,0x00000004,0x0004002b, 1710x0004003b,0x00000923,0x00000924,0x00000004,
1720x00000006,0x00000850,0x00000108,0x0004002b, 1720x00040020,0x00000937,0x00000004,0x00000006,
1730x00000006,0x0000090f,0x0000000f,0x0004001c, 1730x0004003b,0x00000923,0x00000939,0x00000004,
1740x00000917,0x00000006,0x000001a2,0x00040020, 1740x0004002b,0x00000006,0x0000094f,0x00000108,
1750x00000918,0x00000004,0x00000917,0x0004003b, 1750x0004002b,0x00000006,0x00000a0e,0x0000000f,
1760x00000918,0x00000919,0x00000004,0x0004002b, 1760x0004001c,0x00000a16,0x00000006,0x000001db,
1770x00000006,0x00000957,0x0000003f,0x0004001c, 1770x00040020,0x00000a17,0x00000004,0x00000a16,
1780x0000097e,0x00000006,0x0000018b,0x00040020, 1780x0004003b,0x00000a17,0x00000a18,0x00000004,
1790x0000097f,0x00000004,0x0000097e,0x0004003b, 1790x0004002b,0x00000006,0x00000a56,0x0000003f,
1800x0000097f,0x00000980,0x00000004,0x0004003b, 1800x0004001c,0x00000a7d,0x00000006,0x000001c4,
1810x00000918,0x000009d5,0x00000004,0x0004001c, 1810x00040020,0x00000a7e,0x00000004,0x00000a7d,
1820x00000a2c,0x0000097e,0x000001a2,0x00040020, 1820x0004003b,0x00000a7e,0x00000a7f,0x00000004,
1830x00000a2d,0x00000004,0x00000a2c,0x0004003b, 1830x0004003b,0x00000a17,0x00000ad4,0x00000004,
1840x00000a2d,0x00000a2e,0x00000004,0x00040020, 1840x0004001c,0x00000b2b,0x00000a7d,0x000001db,
1850x00000a4a,0x00000007,0x00000917,0x0004002b, 1850x00040020,0x00000b2c,0x00000004,0x00000b2b,
1860x000000e7,0x00000a9c,0x0000003f,0x0004001c, 1860x0004003b,0x00000b2c,0x00000b2d,0x00000004,
1870x00000af6,0x0000002f,0x000000df,0x00040020, 1870x00040020,0x00000b49,0x00000007,0x00000a16,
1880x00000af7,0x00000007,0x00000af6,0x0004001c, 1880x0004002b,0x000000f4,0x00000b9b,0x0000003f,
1890x00000b09,0x000000d2,0x00000437,0x0004001c, 1890x0004001c,0x00000bf5,0x0000002f,0x000000ec,
1900x00000b0a,0x00000b09,0x000000df,0x00040020, 1900x00040020,0x00000bf6,0x00000007,0x00000bf5,
1910x00000b0b,0x00000007,0x00000b0a,0x0006002c, 1910x0004001c,0x00000c08,0x000000df,0x00000470,
1920x000000d2,0x00000b0f,0x0000012b,0x0000012b, 1920x0004001c,0x00000c09,0x00000c08,0x000000ec,
1930x0000012b,0x0004002b,0x00000006,0x00000c2c, 1930x00040020,0x00000c0a,0x00000007,0x00000c09,
1940x00000007,0x0004002b,0x00000006,0x00000c46, 1940x0006002c,0x000000df,0x00000c0e,0x00000138,
1950xfffffff8,0x0004002b,0x000000e7,0x00000c68, 1950x00000138,0x00000138,0x0004002b,0x00000006,
1960xffffffff,0x0004002b,0x000000e7,0x00000c77, 1960x00000d2b,0x00000007,0x0004002b,0x00000006,
1970x00000040,0x0004002b,0x000000e7,0x00000c7f, 1970x00000d45,0xfffffff8,0x0004002b,0x000000f4,
1980x0000001f,0x0004003b,0x00000838,0x00000d70, 1980x00000d67,0xffffffff,0x0004002b,0x000000f4,
1990x00000004,0x0004003b,0x0000097f,0x00000e00, 1990x00000d76,0x00000040,0x0004002b,0x000000f4,
2000x00000004,0x0007002c,0x000000e0,0x00000ed6, 2000x00000d7e,0x0000001f,0x0004003b,0x00000937,
2010x00000500,0x00000500,0x00000500,0x00000500, 2010x00000e6f,0x00000004,0x0004003b,0x00000a7e,
2020x0004001c,0x00000f0e,0x00000006,0x00000247, 2020x00000eff,0x00000004,0x0007002c,0x000000ed,
2030x00040020,0x00000f0f,0x00000007,0x00000f0e, 2030x00000fd5,0x00000539,0x00000539,0x00000539,
2040x0004002b,0x000000e7,0x00000fbf,0x00000011, 2040x00000539,0x0004001c,0x0000100d,0x00000006,
2050x0004001c,0x00001031,0x00000006,0x0000031c, 2050x00000280,0x00040020,0x0000100e,0x00000007,
2060x00040020,0x00001032,0x00000007,0x00001031, 2060x0000100d,0x0004002b,0x000000f4,0x000010be,
2070x00040020,0x000011da,0x00000001,0x000000d2, 2070x00000011,0x0004001c,0x00001130,0x00000006,
2080x0004003b,0x000011da,0x000011db,0x00000001, 2080x00000355,0x00040020,0x00001131,0x00000007,
2090x00040020,0x000011dc,0x00000001,0x00000006, 2090x00001130,0x00040020,0x000012d9,0x00000001,
2100x0004003b,0x000011da,0x000011e4,0x00000001, 2100x000000df,0x0004003b,0x000012d9,0x000012da,
2110x0004003b,0x000011da,0x000011e5,0x00000001, 2110x00000001,0x00040020,0x000012db,0x00000001,
2120x0004002b,0x00000006,0x0000120f,0x0000000a, 2120x00000006,0x0004003b,0x000012d9,0x000012e3,
2130x0004002b,0x00000006,0x0000121a,0x0000000e, 2130x00000001,0x0004003b,0x000012d9,0x000012e4,
2140x0004002b,0x00000006,0x00001258,0x0000000d, 2140x00000001,0x0004002b,0x00000006,0x0000130e,
2150x0004002b,0x00000006,0x000012eb,0x00000011, 2150x0000000a,0x0004002b,0x00000006,0x00001319,
2160x0004002b,0x00000006,0x000012f5,0x00000012, 2160x0000000e,0x0004002b,0x00000006,0x00001357,
2170x0006002c,0x000000d2,0x000012fc,0x0000018b, 2170x0000000d,0x0004002b,0x00000006,0x000013ea,
2180x00000135,0x00000135,0x0006002c,0x00000063, 2180x00000011,0x0004002b,0x00000006,0x000013f4,
2190x00005cc0,0x00000677,0x00000677,0x00000677, 2190x00000012,0x0006002c,0x000000df,0x000013fb,
2200x0004002b,0x00000027,0x00005cc1,0xff800000, 2200x000001c4,0x00000142,0x00000142,0x0006002c,
2210x0006002c,0x00000063,0x00005cc2,0x00005cc1, 2210x0000006c,0x000060fc,0x00000771,0x00000771,
2220x00005cc1,0x00005cc1,0x0004002b,0x00000006, 2220x00000771,0x0004002b,0x00000027,0x000060fd,
2230x00005cc3,0x000000ff,0x0004002b,0x000000e7, 2230xff800000,0x0006002c,0x0000006c,0x000060fe,
2240x00005cc4,0xffffff90,0x0004002b,0x00000006, 2240x000060fd,0x000060fd,0x000060fd,0x0004002b,
2250x00005cc5,0xff800000,0x0004002b,0x00000006, 2250x000000f4,0x000060ff,0xffffff90,0x0004002b,
2260x00005cd3,0x80000006,0x0004002b,0x00000006, 2260x00000006,0x00006100,0xff800000,0x0004002b,
2270x00005cd7,0x7bff7bff,0x0004002b,0x00000006, 2270x00000006,0x0000610e,0x80000006,0x0004002b,
2280x00005cd9,0xfbff7bff,0x0004002b,0x00000006, 2280x00000006,0x00006112,0x7bff7bff,0x0004002b,
2290x00005cda,0xfbfffbff,0x00050036,0x00000002, 2290x00000006,0x00006114,0xfbff7bff,0x0004002b,
2300x00000004,0x00000000,0x00000003,0x000200f8, 2300x00000006,0x00006115,0xfbfffbff,0x00040017,
2310x00000005,0x0004003b,0x00001032,0x00005579, 2310x0000611e,0x0000002f,0x00000002,0x00050036,
2320x00000007,0x0004003b,0x00000af7,0x000041c5, 2320x00000002,0x00000004,0x00000000,0x00000003,
2330x00000007,0x0004003b,0x00000af7,0x000041c6, 2330x000200f8,0x00000005,0x0004003b,0x00001131,
2340x00000007,0x0004003b,0x000000e1,0x000041c7, 2340x00005905,0x00000007,0x0004003b,0x00000bf6,
2350x00000007,0x0004003b,0x00000b0b,0x000041c9, 2350x00004551,0x00000007,0x0004003b,0x00000bf6,
2360x00000007,0x0004003b,0x000000e1,0x00003c67, 2360x00004552,0x00000007,0x0004003b,0x000000ee,
2370x00000007,0x0004003b,0x000000e1,0x00003c68, 2370x00004553,0x00000007,0x0004003b,0x00000c0a,
2380x00000007,0x0004003b,0x00000f0f,0x00003c72, 2380x00004555,0x00000007,0x0004003b,0x000000ee,
2390x00000007,0x0004003b,0x00000f0f,0x00003c79, 2390x00003ff3,0x00000007,0x0004003b,0x000000ee,
2400x00000007,0x0004003b,0x000000e1,0x00003c82, 2400x00003ff4,0x00000007,0x0004003b,0x0000100e,
2410x00000007,0x0004003b,0x000000e1,0x00003c83, 2410x00003ffe,0x00000007,0x0004003b,0x0000100e,
2420x00000007,0x0004003b,0x00000558,0x00002b2c, 2420x00004005,0x00000007,0x0004003b,0x000000ee,
2430x00000007,0x0004003b,0x000006c7,0x00002b6d, 2430x0000400e,0x00000007,0x0004003b,0x000000ee,
2440x00000007,0x0004003b,0x00000064,0x00002b70, 2440x0000400f,0x00000007,0x0004003b,0x00000646,
2450x00000007,0x0004003b,0x00000064,0x000026bf, 2450x00002c30,0x00000007,0x0004003b,0x000007c6,
2460x00000007,0x0004003b,0x00000477,0x000024d6, 2460x00002c75,0x00000007,0x0004003b,0x0000006d,
2470x00000007,0x0004003b,0x00001032,0x0000202d, 2470x00002c78,0x00000007,0x0004003b,0x0000006d,
2480x00000007,0x0004003b,0x00000a4a,0x00001508, 2480x000027c3,0x00000007,0x0004003b,0x000004b0,
2490x00000007,0x000300f7,0x000012fe,0x00000000, 2490x000025da,0x00000007,0x0004003b,0x00001131,
2500x000300fb,0x0000012b,0x000012ff,0x000200f8, 2500x00002131,0x00000007,0x0004003b,0x00000b49,
2510x000012ff,0x00050041,0x000011dc,0x000011dd, 2510x0000160c,0x00000007,0x000300f7,0x000013fd,
2520x000011db,0x0000012b,0x0004003d,0x00000006, 2520x00000000,0x000300fb,0x00000138,0x000013fe,
2530x000011de,0x000011dd,0x00050041,0x00000182, 2530x000200f8,0x000013fe,0x00050041,0x000012db,
2540x000011df,0x00000180,0x00000318,0x0004003d, 2540x000012dc,0x000012da,0x00000138,0x0004003d,
2550x00000006,0x000011e0,0x000011df,0x000500aa, 2550x00000006,0x000012dd,0x000012dc,0x00050041,
2560x0000002f,0x000011e1,0x000011e0,0x00000c2c, 2560x000001bb,0x000012de,0x000001b9,0x00000351,
2570x000300f7,0x000011e3,0x00000000,0x000400fa, 2570x0004003d,0x00000006,0x000012df,0x000012de,
2580x000011e1,0x000011e2,0x000011e3,0x000200f8, 2580x000500aa,0x0000002f,0x000012e0,0x000012df,
2590x000011e2,0x00050041,0x000011dc,0x000011e7, 2590x00000d2b,0x000300f7,0x000012e2,0x00000000,
2600x000011e4,0x0000012b,0x0004003d,0x00000006, 2600x000400fa,0x000012e0,0x000012e1,0x000012e2,
2610x000011e8,0x000011e7,0x00050041,0x000011dc, 2610x000200f8,0x000012e1,0x00050041,0x000012db,
2620x000011ea,0x000011e5,0x0000012b,0x0004003d, 2620x000012e6,0x000012e3,0x00000138,0x0004003d,
2630x00000006,0x000011eb,0x000011ea,0x000500b0, 2630x00000006,0x000012e7,0x000012e6,0x00050041,
2640x0000002f,0x00001339,0x000011eb,0x000001a2, 2640x000012db,0x000012e9,0x000012e4,0x00000138,
2650x000300f7,0x0000133d,0x00000000,0x000400fa, 2650x0004003d,0x00000006,0x000012ea,0x000012e9,
2660x00001339,0x0000133a,0x0000133d,0x000200f8, 2660x000500b0,0x0000002f,0x0000143d,0x000012ea,
2670x0000133a,0x00050041,0x00000838,0x0000133c, 2670x000001db,0x000300f7,0x00001441,0x00000000,
2680x00000919,0x000011eb,0x0003003e,0x0000133c, 2680x000400fa,0x0000143d,0x0000143e,0x00001441,
2690x0000012b,0x000200f9,0x0000133d,0x000200f8, 2690x000200f8,0x0000143e,0x00050041,0x00000937,
2700x0000133d,0x000400e0,0x00000247,0x00000247, 2700x00001440,0x00000a18,0x000012ea,0x0003003e,
2710x00000850,0x00050084,0x00000006,0x0000133f, 2710x00001440,0x00000138,0x000200f9,0x00001441,
2720x000011e8,0x00000185,0x00050080,0x00000006, 2720x000200f8,0x00001441,0x000400e0,0x00000280,
2730x00001341,0x0000133f,0x00000185,0x00050041, 2730x00000280,0x0000094f,0x00050084,0x00000006,
2740x00000182,0x00001342,0x00000180,0x00000181, 2740x00001443,0x000012e7,0x000001be,0x00050080,
2750x0004003d,0x00000006,0x00001343,0x00001342, 2750x00000006,0x00001445,0x00001443,0x000001be,
2760x0007000c,0x00000006,0x00001344,0x00000001, 2760x00050041,0x000001bb,0x00001446,0x000001b9,
2770x00000026,0x00001341,0x00001343,0x00050080, 2770x000001ba,0x0004003d,0x00000006,0x00001447,
2780x00000006,0x00001347,0x0000133f,0x000011eb, 2780x00001446,0x0007000c,0x00000006,0x00001448,
2790x000200f9,0x00001348,0x000200f8,0x00001348, 2790x00000001,0x00000026,0x00001445,0x00001447,
2800x000700f5,0x00000006,0x00005ba2,0x00001347, 2800x00050080,0x00000006,0x0000144b,0x00001443,
2810x0000133d,0x0000135a,0x00001358,0x000500b0, 2810x000012ea,0x000200f9,0x0000144c,0x000200f8,
2820x0000002f,0x0000134c,0x00005ba2,0x00001344, 2820x0000144c,0x000700f5,0x00000006,0x00005fd2,
2830x000400f6,0x0000135b,0x00001358,0x00000000, 2830x0000144b,0x00001441,0x0000145e,0x0000145c,
2840x000400fa,0x0000134c,0x0000134d,0x0000135b, 2840x000500b0,0x0000002f,0x00001450,0x00005fd2,
2850x000200f8,0x0000134d,0x00050041,0x00000182, 2850x00001448,0x000400f6,0x0000145f,0x0000145c,
2860x00001371,0x00000180,0x00000488,0x0004003d, 2860x00000000,0x000400fa,0x00001450,0x00001451,
2870x00000006,0x00001372,0x00001371,0x000500c7, 2870x0000145f,0x000200f8,0x00001451,0x00050041,
2880x00000006,0x00001373,0x00001372,0x00000135, 2880x000001bb,0x00001475,0x000001b9,0x000004c1,
2890x000500aa,0x0000002f,0x00001374,0x00001373, 2890x0004003d,0x00000006,0x00001476,0x00001475,
2900x0000012b,0x000300f7,0x00001379,0x00000000, 2900x000500c7,0x00000006,0x00001477,0x00001476,
2910x000400fa,0x00001374,0x00001375,0x00001377, 2910x00000142,0x000500aa,0x0000002f,0x00001478,
2920x000200f8,0x00001377,0x00050084,0x00000006, 2920x00001477,0x00000138,0x000300f7,0x0000147d,
2930x00001381,0x00000194,0x00001343,0x00050080, 2930x00000000,0x000400fa,0x00001478,0x00001479,
2940x00000006,0x00001382,0x0000018b,0x00001381, 2940x0000147b,0x000200f8,0x0000147b,0x00050084,
2950x000200f9,0x00001379,0x000200f8,0x00001375, 2950x00000006,0x00001485,0x000001cd,0x00001447,
2960x000200f9,0x00001379,0x000200f8,0x00001379, 2960x00050080,0x00000006,0x00001486,0x000001c4,
2970x000700f5,0x00000006,0x00005ba3,0x0000018b, 2970x00001485,0x000200f9,0x0000147d,0x000200f8,
2980x00001375,0x00001382,0x00001377,0x00050084, 2980x00001479,0x000200f9,0x0000147d,0x000200f8,
2990x00000006,0x00001350,0x000000df,0x00005ba2, 2990x0000147d,0x000700f5,0x00000006,0x00005fd3,
3000x00050080,0x00000006,0x00001351,0x00005ba3, 3000x000001c4,0x00001479,0x00001486,0x0000147b,
3010x00001350,0x00050041,0x0000022d,0x00001352, 3010x00050084,0x00000006,0x00001454,0x000000ec,
3020x00000180,0x0000022b,0x0004003d,0x00000007, 3020x00005fd2,0x00050080,0x00000006,0x00001455,
3030x00001353,0x00001352,0x00050051,0x00000006, 3030x00005fd3,0x00001454,0x00050041,0x00000266,
3040x00001399,0x00001353,0x00000000,0x00050095, 3040x00001456,0x000001b9,0x00000264,0x0004003d,
3050x00000130,0x0000139b,0x00001399,0x00001351, 3050x00000007,0x00001457,0x00001456,0x00050051,
3060x00050051,0x00000006,0x0000139c,0x0000139b, 3060x00000006,0x0000149d,0x00001457,0x00000000,
3070x00000001,0x00050051,0x00000006,0x0000139d, 3070x00050095,0x0000013d,0x0000149f,0x0000149d,
3080x0000139b,0x00000000,0x00050051,0x00000006, 3080x00001455,0x00050051,0x00000006,0x000014a0,
3090x000013a0,0x00001353,0x00000001,0x00050080, 3090x0000149f,0x00000001,0x00050051,0x00000006,
3100x00000006,0x000013a2,0x000013a0,0x0000139c, 3100x000014a1,0x0000149f,0x00000000,0x00050051,
3110x00050050,0x00000007,0x000013a3,0x0000139d, 3110x00000006,0x000014a4,0x00001457,0x00000001,
3120x000013a2,0x0004007c,0x00000014,0x00001393, 3120x00050080,0x00000006,0x000014a6,0x000014a4,
3130x000013a3,0x00060041,0x0000015f,0x0000138a, 3130x000014a0,0x00050050,0x00000007,0x000014a7,
3140x00001393,0x0000015e,0x0000015e,0x0006003d, 3140x000014a1,0x000014a6,0x0004007c,0x00000014,
3150x00000006,0x0000138b,0x0000138a,0x00000002, 3150x00001497,0x000014a7,0x00060041,0x0000016c,
3160x00000004,0x00050084,0x00000006,0x000013a9, 3160x0000148e,0x00001497,0x0000016b,0x0000016b,
3170x000000df,0x00001372,0x000500c2,0x00000006, 3170x0006003d,0x00000006,0x0000148f,0x0000148e,
3180x000013aa,0x0000138b,0x000013a9,0x000500c7, 3180x00000002,0x00000004,0x00050084,0x00000006,
3190x00000006,0x000013ab,0x000013aa,0x0000090f, 3190x000014ad,0x000000ec,0x00001476,0x000500c2,
3200x00050041,0x00000838,0x00001356,0x00000919, 3200x00000006,0x000014ae,0x0000148f,0x000014ad,
3210x000013ab,0x000700ea,0x00000006,0x00001357, 3210x000500c7,0x00000006,0x000014af,0x000014ae,
3220x00001356,0x00000135,0x0000012b,0x00000135, 3220x00000a0e,0x00050041,0x00000937,0x0000145a,
3230x000200f9,0x00001358,0x000200f8,0x00001358, 3230x00000a18,0x000014af,0x000700ea,0x00000006,
3240x00050080,0x00000006,0x0000135a,0x00005ba2, 3240x0000145b,0x0000145a,0x00000142,0x00000138,
3250x0000018b,0x000200f9,0x00001348,0x000200f8, 3250x00000142,0x000200f9,0x0000145c,0x000200f8,
3260x0000135b,0x000400e0,0x00000247,0x00000247, 3260x0000145c,0x00050080,0x00000006,0x0000145e,
3270x00000850,0x000300f7,0x0000136d,0x00000000, 3270x00005fd2,0x000001c4,0x000200f9,0x0000144c,
3280x000400fa,0x00001339,0x0000135e,0x0000136d, 3280x000200f8,0x0000145f,0x000400e0,0x00000280,
3290x000200f8,0x0000135e,0x00050084,0x00000006, 3290x00000280,0x0000094f,0x000300f7,0x00001471,
3300x000013b0,0x000001a2,0x00001343,0x00050080, 3300x00000000,0x000400fa,0x0000143d,0x00001462,
3310x00000006,0x000013b1,0x0000018b,0x000013b0, 3310x00001471,0x000200f8,0x00001462,0x00050084,
3320x00050080,0x00000006,0x000013b7,0x00001343, 3320x00000006,0x000014b4,0x000001db,0x00001447,
3330x00005cc3,0x00050086,0x00000006,0x000013b8, 3330x00050080,0x00000006,0x000014b5,0x000001c4,
3340x000013b7,0x00000185,0x00050084,0x00000006, 3340x000014b4,0x00050080,0x00000006,0x000014bb,
3350x00001362,0x000011eb,0x000013b8,0x00050080, 3350x00001447,0x0000062f,0x00050086,0x00000006,
3360x00000006,0x00001364,0x00001362,0x000011e8, 3360x000014bc,0x000014bb,0x000001be,0x00050084,
3370x00050084,0x00000006,0x00001365,0x000000df, 3370x00000006,0x00001466,0x000012ea,0x000014bc,
3380x00001364,0x00050080,0x00000006,0x00001366, 3380x00050080,0x00000006,0x00001468,0x00001466,
3390x000013b1,0x00001365,0x00050041,0x0000022d, 3390x000012e7,0x00050084,0x00000006,0x00001469,
3400x00001368,0x00000180,0x0000022b,0x0004003d, 3400x000000ec,0x00001468,0x00050080,0x00000006,
3410x00000007,0x00001369,0x00001368,0x00050041, 3410x0000146a,0x000014b5,0x00001469,0x00050041,
3420x00000838,0x0000136a,0x00000919,0x000011eb, 3420x00000266,0x0000146c,0x000001b9,0x00000264,
3430x0004003d,0x00000006,0x0000136b,0x0000136a, 3430x0004003d,0x00000007,0x0000146d,0x0000146c,
3440x00050051,0x00000006,0x000013ce,0x00001369, 3440x00050041,0x00000937,0x0000146e,0x00000a18,
3450x00000000,0x00050095,0x00000130,0x000013d0, 3450x000012ea,0x0004003d,0x00000006,0x0000146f,
3460x000013ce,0x00001366,0x00050051,0x00000006, 3460x0000146e,0x00050051,0x00000006,0x000014d2,
3470x000013d1,0x000013d0,0x00000001,0x00050051, 3470x0000146d,0x00000000,0x00050095,0x0000013d,
3480x00000006,0x000013d2,0x000013d0,0x00000000, 3480x000014d4,0x000014d2,0x0000146a,0x00050051,
3490x00050051,0x00000006,0x000013d5,0x00001369, 3490x00000006,0x000014d5,0x000014d4,0x00000001,
3500x00000001,0x00050080,0x00000006,0x000013d7, 3500x00050051,0x00000006,0x000014d6,0x000014d4,
3510x000013d5,0x000013d1,0x00050050,0x00000007, 3510x00000000,0x00050051,0x00000006,0x000014d9,
3520x000013d8,0x000013d2,0x000013d7,0x0004007c, 3520x0000146d,0x00000001,0x00050080,0x00000006,
3530x00000014,0x000013c8,0x000013d8,0x00060041, 3530x000014db,0x000014d9,0x000014d5,0x00050050,
3540x0000015f,0x000013c0,0x000013c8,0x0000015e, 3540x00000007,0x000014dc,0x000014d6,0x000014db,
3550x0000015e,0x0005003e,0x000013c0,0x0000136b, 3550x0004007c,0x00000014,0x000014cc,0x000014dc,
3560x00000002,0x00000004,0x000200f9,0x0000136d, 3560x00060041,0x0000016c,0x000014c4,0x000014cc,
3570x000200f8,0x0000136d,0x000200f9,0x000012fe, 3570x0000016b,0x0000016b,0x0005003e,0x000014c4,
3580x000200f8,0x000011e3,0x000500aa,0x0000002f, 3580x0000146f,0x00000002,0x00000004,0x000200f9,
3590x000011f0,0x000011e0,0x00000194,0x000300f7, 3590x00001471,0x000200f8,0x00001471,0x000200f9,
3600x000011f2,0x00000000,0x000400fa,0x000011f0, 3600x000013fd,0x000200f8,0x000012e2,0x000500aa,
3610x000011f1,0x000011f2,0x000200f8,0x000011f1, 3610x0000002f,0x000012ef,0x000012df,0x000001cd,
3620x00050041,0x00000182,0x000013db,0x00000180, 3620x000300f7,0x000012f1,0x00000000,0x000400fa,
3630x00000181,0x0004003d,0x00000006,0x000013dc, 3630x000012ef,0x000012f0,0x000012f1,0x000200f8,
3640x000013db,0x00050084,0x00000006,0x000013dd, 3640x000012f0,0x00050041,0x000001bb,0x000014df,
3650x000001a2,0x000013dc,0x00050080,0x00000006, 3650x000001b9,0x000001ba,0x0004003d,0x00000006,
3660x000013de,0x0000018b,0x000013dd,0x00050080, 3660x000014e0,0x000014df,0x00050084,0x00000006,
3670x00000006,0x000013f0,0x000013dc,0x00005cc3, 3670x000014e1,0x000001db,0x000014e0,0x00050080,
3680x00050086,0x00000006,0x000013f1,0x000013f0, 3680x00000006,0x000014e2,0x000001c4,0x000014e1,
3690x00000185,0x00050084,0x00000006,0x000013e3, 3690x00050080,0x00000006,0x000014f4,0x000014e0,
3700x0000018b,0x000013f1,0x00050080,0x00000006, 3700x0000062f,0x00050086,0x00000006,0x000014f5,
3710x000013e4,0x000013de,0x000013e3,0x00050084, 3710x000014f4,0x000001be,0x00050084,0x00000006,
3720x00000006,0x000011f6,0x000001a2,0x000013f1, 3720x000014e7,0x000001c4,0x000014f5,0x00050080,
3730x00050041,0x000011dc,0x000011f8,0x000011e5, 3730x00000006,0x000014e8,0x000014e2,0x000014e7,
3740x0000012b,0x0004003d,0x00000006,0x000011f9, 3740x00050084,0x00000006,0x000012f5,0x000001db,
3750x000011f8,0x00050080,0x00000006,0x00001410, 3750x000014f5,0x00050041,0x000012db,0x000012f7,
3760x000011f6,0x00000957,0x00050086,0x00000006, 3760x000012e4,0x00000138,0x0004003d,0x00000006,
3770x00001411,0x00001410,0x0000018b,0x00050084, 3770x000012f8,0x000012f7,0x00050080,0x00000006,
3780x00000006,0x00001414,0x000011f9,0x00001411, 3780x00001514,0x000012f5,0x00000a56,0x00050086,
3790x0007000c,0x00000006,0x00001416,0x00000001, 3790x00000006,0x00001515,0x00001514,0x000001c4,
3800x00000026,0x00001414,0x000011f6,0x00050080, 3800x00050084,0x00000006,0x00001518,0x000012f8,
3810x00000006,0x00001419,0x00001416,0x00001411, 3810x00001515,0x0007000c,0x00000006,0x0000151a,
3820x0007000c,0x00000006,0x0000141b,0x00000001, 3820x00000001,0x00000026,0x00001518,0x000012f5,
3830x00000026,0x00001419,0x000011f6,0x000200f9, 3830x00050080,0x00000006,0x0000151d,0x0000151a,
3840x0000141d,0x000200f8,0x0000141d,0x000700f5, 3840x00001515,0x0007000c,0x00000006,0x0000151f,
3850x00000006,0x00005b9d,0x0000012b,0x000011f1, 3850x00000001,0x00000026,0x0000151d,0x000012f5,
3860x0000142b,0x00001422,0x000700f5,0x00000006, 3860x000200f9,0x00001521,0x000200f8,0x00001521,
3870x00005b9c,0x00001416,0x000011f1,0x0000142e, 3870x000700f5,0x00000006,0x00005fcd,0x00000138,
3880x00001422,0x000500b0,0x0000002f,0x00001421, 3880x000012f0,0x0000152f,0x00001526,0x000700f5,
3890x00005b9c,0x0000141b,0x000400f6,0x0000142f, 3890x00000006,0x00005fcc,0x0000151a,0x000012f0,
3900x00001422,0x00000000,0x000400fa,0x00001421, 3900x00001532,0x00001526,0x000500b0,0x0000002f,
3910x00001422,0x0000142f,0x000200f8,0x00001422, 3910x00001525,0x00005fcc,0x0000151f,0x000400f6,
3920x00050084,0x00000006,0x00001425,0x000000df, 3920x00001533,0x00001526,0x00000000,0x000400fa,
3930x00005b9c,0x00050080,0x00000006,0x00001426, 3930x00001525,0x00001526,0x00001533,0x000200f8,
3940x000013de,0x00001425,0x00050041,0x0000022d, 3940x00001526,0x00050084,0x00000006,0x00001529,
3950x00001427,0x00000180,0x0000022b,0x0004003d, 3950x000000ec,0x00005fcc,0x00050080,0x00000006,
3960x00000007,0x00001428,0x00001427,0x00050051, 3960x0000152a,0x000014e2,0x00001529,0x00050041,
3970x00000006,0x00001488,0x00001428,0x00000000, 3970x00000266,0x0000152b,0x000001b9,0x00000264,
3980x00050095,0x00000130,0x0000148a,0x00001488, 3980x0004003d,0x00000007,0x0000152c,0x0000152b,
3990x00001426,0x00050051,0x00000006,0x0000148b, 3990x00050051,0x00000006,0x0000158c,0x0000152c,
4000x0000148a,0x00000001,0x00050051,0x00000006, 4000x00000000,0x00050095,0x0000013d,0x0000158e,
4010x0000148c,0x0000148a,0x00000000,0x00050051, 4010x0000158c,0x0000152a,0x00050051,0x00000006,
4020x00000006,0x0000148f,0x00001428,0x00000001, 4020x0000158f,0x0000158e,0x00000001,0x00050051,
4030x00050080,0x00000006,0x00001491,0x0000148f, 4030x00000006,0x00001590,0x0000158e,0x00000000,
4040x0000148b,0x00050050,0x00000007,0x00001492, 4040x00050051,0x00000006,0x00001593,0x0000152c,
4050x0000148c,0x00001491,0x0004007c,0x00000014, 4050x00000001,0x00050080,0x00000006,0x00001595,
4060x00001482,0x00001492,0x00060041,0x0000015f, 4060x00001593,0x0000158f,0x00050050,0x00000007,
4070x00001479,0x00001482,0x0000015e,0x0000015e, 4070x00001596,0x00001590,0x00001595,0x0004007c,
4080x0006003d,0x00000006,0x0000147a,0x00001479, 4080x00000014,0x00001586,0x00001596,0x00060041,
4090x0000016c,0x0000157d,0x00001586,0x0000016b,
4100x0000016b,0x0006003d,0x00000006,0x0000157e,
4110x0000157d,0x00000002,0x00000004,0x00050080,
4120x00000006,0x0000152f,0x00005fcd,0x0000157e,
4130x00050080,0x00000006,0x00001532,0x00005fcc,
4140x00000264,0x000200f9,0x00001521,0x000200f8,
4150x00001533,0x00050041,0x00000937,0x00001536,
4160x00000a7f,0x000012f8,0x0003003e,0x00001536,
4170x00005fcd,0x000400e0,0x00000280,0x00000280,
4180x0000094f,0x000500aa,0x0000002f,0x00001538,
4190x000012f8,0x00000138,0x000300f7,0x00001555,
4200x00000000,0x000400fa,0x00001538,0x00001539,
4210x00001555,0x000200f8,0x00001539,0x000200f9,
4220x0000153a,0x000200f8,0x0000153a,0x000700f5,
4230x00000006,0x00005fcf,0x00000138,0x00001539,
4240x00001547,0x0000153e,0x000700f5,0x00000006,
4250x00005fce,0x00000138,0x00001539,0x0000154a,
4260x0000153e,0x000500b0,0x0000002f,0x0000153d,
4270x00005fce,0x000001c4,0x000400f6,0x0000154b,
4280x0000153e,0x00000000,0x000400fa,0x0000153d,
4290x0000153e,0x0000154b,0x000200f8,0x0000153e,
4300x00050041,0x00000937,0x00001540,0x00000a7f,
4310x00005fce,0x0004003d,0x00000006,0x00001541,
4320x00001540,0x0003003e,0x00001540,0x00005fcf,
4330x00050080,0x00000006,0x00001547,0x00005fcf,
4340x00001541,0x00050080,0x00000006,0x0000154a,
4350x00005fce,0x00000264,0x000200f9,0x0000153a,
4360x000200f8,0x0000154b,0x000200f9,0x00001555,
4370x000200f8,0x00001555,0x000400e0,0x00000280,
4380x00000280,0x0000094f,0x0004003d,0x00000006,
4390x00001558,0x00001536,0x000200f9,0x0000155a,
4400x000200f8,0x0000155a,0x000700f5,0x00000006,
4410x00005fd1,0x00001558,0x00001555,0x00001571,
4420x0000155f,0x000700f5,0x00000006,0x00005fd0,
4430x0000151a,0x00001555,0x00001574,0x0000155f,
4440x000500b0,0x0000002f,0x0000155e,0x00005fd0,
4450x0000151f,0x000400f6,0x00001575,0x0000155f,
4460x00000000,0x000400fa,0x0000155e,0x0000155f,
4470x00001575,0x000200f8,0x0000155f,0x00050084,
4480x00000006,0x00001562,0x000000ec,0x00005fd0,
4490x00050080,0x00000006,0x00001563,0x000014e2,
4500x00001562,0x00050041,0x00000266,0x00001564,
4510x000001b9,0x00000264,0x0004003d,0x00000007,
4520x00001565,0x00001564,0x00050051,0x00000006,
4530x000015cd,0x00001565,0x00000000,0x00050095,
4540x0000013d,0x000015cf,0x000015cd,0x00001563,
4550x00050051,0x00000006,0x000015d0,0x000015cf,
4560x00000001,0x00050051,0x00000006,0x000015d1,
4570x000015cf,0x00000000,0x00050051,0x00000006,
4580x000015d4,0x00001565,0x00000001,0x00050080,
4590x00000006,0x000015d6,0x000015d4,0x000015d0,
4600x00050050,0x00000007,0x000015d7,0x000015d1,
4610x000015d6,0x0004007c,0x00000014,0x000015c7,
4620x000015d7,0x00060041,0x0000016c,0x000015be,
4630x000015c7,0x0000016b,0x0000016b,0x0006003d,
4640x00000006,0x000015bf,0x000015be,0x00000002,
4650x00000004,0x00050080,0x00000006,0x0000156a,
4660x000014e8,0x00001562,0x00050095,0x0000013d,
4670x000015ef,0x000015cd,0x0000156a,0x00050051,
4680x00000006,0x000015f0,0x000015ef,0x00000001,
4690x00050051,0x00000006,0x000015f1,0x000015ef,
4700x00000000,0x00050080,0x00000006,0x000015f6,
4710x000015d4,0x000015f0,0x00050050,0x00000007,
4720x000015f7,0x000015f1,0x000015f6,0x0004007c,
4730x00000014,0x000015e7,0x000015f7,0x00060041,
4740x0000016c,0x000015df,0x000015e7,0x0000016b,
4750x0000016b,0x0005003e,0x000015df,0x00005fd1,
4090x00000002,0x00000004,0x00050080,0x00000006, 4760x00000002,0x00000004,0x00050080,0x00000006,
4100x0000142b,0x00005b9d,0x0000147a,0x00050080, 4770x00001571,0x00005fd1,0x000015bf,0x00050080,
4110x00000006,0x0000142e,0x00005b9c,0x0000022b, 4780x00000006,0x00001574,0x00005fd0,0x00000264,
4120x000200f9,0x0000141d,0x000200f8,0x0000142f, 4790x000200f9,0x0000155a,0x000200f8,0x00001575,
4130x00050041,0x00000838,0x00001432,0x00000980, 4800x000200f9,0x000013fd,0x000200f8,0x000012f1,
4140x000011f9,0x0003003e,0x00001432,0x00005b9d, 4810x000500aa,0x0000002f,0x00001301,0x000012df,
4150x000400e0,0x00000247,0x00000247,0x00000850, 4820x00000543,0x000300f7,0x00001303,0x00000000,
4160x000500aa,0x0000002f,0x00001434,0x000011f9, 4830x000400fa,0x00001301,0x00001302,0x00001303,
4170x0000012b,0x000300f7,0x00001451,0x00000000, 4840x000200f8,0x00001302,0x00050041,0x000012db,
4180x000400fa,0x00001434,0x00001435,0x00001451, 4850x00001305,0x000012e3,0x00000138,0x0004003d,
4190x000200f8,0x00001435,0x000200f9,0x00001436, 4860x00000006,0x00001306,0x00001305,0x00050041,
4200x000200f8,0x00001436,0x000700f5,0x00000006, 4870x000012db,0x00001308,0x000012e4,0x00000138,
4210x00005b9f,0x0000012b,0x00001435,0x00001443, 4880x0004003d,0x00000006,0x00001309,0x00001308,
4220x0000143a,0x000700f5,0x00000006,0x00005b9e, 4890x000500b0,0x0000002f,0x00001618,0x00001309,
4230x0000012b,0x00001435,0x00001446,0x0000143a, 4900x000001db,0x000300f7,0x00001627,0x00000000,
4240x000500b0,0x0000002f,0x00001439,0x00005b9e, 4910x000400fa,0x00001618,0x00001619,0x00001627,
4250x0000018b,0x000400f6,0x00001447,0x0000143a, 4920x000200f8,0x00001619,0x00050041,0x000001bb,
4260x00000000,0x000400fa,0x00001439,0x0000143a, 4930x000016cf,0x000001b9,0x000001ba,0x0004003d,
4270x00001447,0x000200f8,0x0000143a,0x00050041, 4940x00000006,0x000016d0,0x000016cf,0x00050084,
4280x00000838,0x0000143c,0x00000980,0x00005b9e, 4950x00000006,0x000016d1,0x000001db,0x000016d0,
4290x0004003d,0x00000006,0x0000143d,0x0000143c, 4960x00050080,0x00000006,0x000016d2,0x000001c4,
4300x0003003e,0x0000143c,0x00005b9f,0x00050080, 4970x000016d1,0x00050080,0x00000006,0x000016d8,
4310x00000006,0x00001443,0x00005b9f,0x0000143d, 4980x000016d0,0x0000062f,0x00050086,0x00000006,
4320x00050080,0x00000006,0x00001446,0x00005b9e, 4990x000016d9,0x000016d8,0x000001be,0x00050084,
4330x0000022b,0x000200f9,0x00001436,0x000200f8, 5000x00000006,0x000016cb,0x000001c4,0x000016d9,
4340x00001447,0x000200f9,0x00001451,0x000200f8, 5010x00050080,0x00000006,0x000016cc,0x000016d2,
4350x00001451,0x000400e0,0x00000247,0x00000247, 5020x000016cb,0x00050084,0x00000006,0x0000161e,
4360x00000850,0x0004003d,0x00000006,0x00001454, 5030x00001309,0x000016d9,0x00050080,0x00000006,
4370x00001432,0x000200f9,0x00001456,0x000200f8, 5040x00001620,0x0000161e,0x00001306,0x00050084,
4380x00001456,0x000700f5,0x00000006,0x00005ba1, 5050x00000006,0x00001621,0x000000ec,0x00001620,
4390x00001454,0x00001451,0x0000146d,0x0000145b, 5060x00050080,0x00000006,0x00001622,0x000016cc,
4400x000700f5,0x00000006,0x00005ba0,0x00001416, 5070x00001621,0x00050041,0x00000266,0x00001623,
4410x00001451,0x00001470,0x0000145b,0x000500b0, 5080x000001b9,0x00000264,0x0004003d,0x00000007,
4420x0000002f,0x0000145a,0x00005ba0,0x0000141b, 5090x00001624,0x00001623,0x00050051,0x00000006,
4430x000400f6,0x00001471,0x0000145b,0x00000000, 5100x000016f7,0x00001624,0x00000000,0x00050095,
4440x000400fa,0x0000145a,0x0000145b,0x00001471, 5110x0000013d,0x000016f9,0x000016f7,0x00001622,
4450x000200f8,0x0000145b,0x00050084,0x00000006, 5120x00050051,0x00000006,0x000016fa,0x000016f9,
4460x0000145e,0x000000df,0x00005ba0,0x00050080, 5130x00000001,0x00050051,0x00000006,0x000016fb,
4470x00000006,0x0000145f,0x000013de,0x0000145e, 5140x000016f9,0x00000000,0x00050051,0x00000006,
4480x00050041,0x0000022d,0x00001460,0x00000180, 5150x000016fe,0x00001624,0x00000001,0x00050080,
4490x0000022b,0x0004003d,0x00000007,0x00001461, 5160x00000006,0x00001700,0x000016fe,0x000016fa,
4500x00001460,0x00050051,0x00000006,0x000014c9, 5170x00050050,0x00000007,0x00001701,0x000016fb,
4510x00001461,0x00000000,0x00050095,0x00000130, 5180x00001700,0x0004007c,0x00000014,0x000016f1,
4520x000014cb,0x000014c9,0x0000145f,0x00050051, 5190x00001701,0x00060041,0x0000016c,0x000016e8,
4530x00000006,0x000014cc,0x000014cb,0x00000001, 5200x000016f1,0x0000016b,0x0000016b,0x0006003d,
4540x00050051,0x00000006,0x000014cd,0x000014cb, 5210x00000006,0x000016e9,0x000016e8,0x00000002,
4550x00000000,0x00050051,0x00000006,0x000014d0, 5220x00000004,0x00050041,0x00000937,0x00001626,
4560x00001461,0x00000001,0x00050080,0x00000006, 5230x00000ad4,0x00001309,0x0003003e,0x00001626,
4570x000014d2,0x000014d0,0x000014cc,0x00050050, 5240x000016e9,0x000200f9,0x00001627,0x000200f8,
4580x00000007,0x000014d3,0x000014cd,0x000014d2, 5250x00001627,0x00050084,0x00000006,0x00001629,
4590x0004007c,0x00000014,0x000014c3,0x000014d3, 5260x00001306,0x000001be,0x00050080,0x00000006,
4600x00060041,0x0000015f,0x000014ba,0x000014c3, 5270x0000162b,0x00001629,0x000001be,0x00050041,
4610x0000015e,0x0000015e,0x0006003d,0x00000006, 5280x000001bb,0x0000162c,0x000001b9,0x000001ba,
4620x000014bb,0x000014ba,0x00000002,0x00000004, 5290x0004003d,0x00000006,0x0000162d,0x0000162c,
4630x00050080,0x00000006,0x00001466,0x000013e4, 5300x0007000c,0x00000006,0x0000162e,0x00000001,
4640x0000145e,0x00050095,0x00000130,0x000014eb, 5310x00000026,0x0000162b,0x0000162d,0x000200f9,
4650x000014c9,0x00001466,0x00050051,0x00000006, 5320x00001630,0x000200f8,0x00001630,0x000700f5,
4660x000014ec,0x000014eb,0x00000001,0x00050051, 5330x00000006,0x00005fb3,0x00001629,0x00001627,
4670x00000006,0x000014ed,0x000014eb,0x00000000, 5340x000016c5,0x000016c3,0x000500b0,0x0000002f,
4680x00050080,0x00000006,0x000014f2,0x000014d0, 5350x00001634,0x00005fb3,0x0000162e,0x000400f6,
4690x000014ec,0x00050050,0x00000007,0x000014f3, 5360x000016c6,0x000016c3,0x00000000,0x000400fa,
4700x000014ed,0x000014f2,0x0004007c,0x00000014, 5370x00001634,0x00001635,0x000016c6,0x000200f8,
4710x000014e3,0x000014f3,0x00060041,0x0000015f, 5380x00001635,0x00050080,0x00000006,0x00001638,
4720x000014db,0x000014e3,0x0000015e,0x0000015e, 5390x00005fb3,0x00001309,0x000500b0,0x0000002f,
4730x0005003e,0x000014db,0x00005ba1,0x00000002, 5400x0000163b,0x00001638,0x0000162e,0x000300f7,
4740x00000004,0x00050080,0x00000006,0x0000146d, 5410x00001646,0x00000000,0x000400fa,0x0000163b,
4750x00005ba1,0x000014bb,0x00050080,0x00000006, 5420x0000163d,0x00001645,0x000200f8,0x00001645,
4760x00001470,0x00005ba0,0x0000022b,0x000200f9, 5430x000200f9,0x00001646,0x000200f8,0x0000163d,
4770x00001456,0x000200f8,0x00001471,0x000200f9, 5440x00050041,0x000001bb,0x00001705,0x000001b9,
4780x000012fe,0x000200f8,0x000011f2,0x000500aa, 5450x000004c1,0x0004003d,0x00000006,0x00001706,
4790x0000002f,0x00001202,0x000011e0,0x0000050a, 5460x00001705,0x000500c7,0x00000006,0x00001707,
4800x000300f7,0x00001204,0x00000000,0x000400fa, 5470x00001706,0x00000142,0x000500aa,0x0000002f,
4810x00001202,0x00001203,0x00001204,0x000200f8, 5480x00001708,0x00001707,0x00000138,0x000300f7,
4820x00001203,0x00050041,0x000011dc,0x00001206, 5490x0000170d,0x00000000,0x000400fa,0x00001708,
4830x000011e4,0x0000012b,0x0004003d,0x00000006, 5500x00001709,0x0000170b,0x000200f8,0x0000170b,
4840x00001207,0x00001206,0x00050041,0x000011dc, 5510x00050084,0x00000006,0x00001715,0x000001cd,
4850x00001209,0x000011e5,0x0000012b,0x0004003d, 5520x0000162d,0x00050080,0x00000006,0x00001716,
4860x00000006,0x0000120a,0x00001209,0x000500b0, 5530x000001c4,0x00001715,0x000200f9,0x0000170d,
4870x0000002f,0x00001514,0x0000120a,0x000001a2, 5540x000200f8,0x00001709,0x000200f9,0x0000170d,
4880x000300f7,0x00001523,0x00000000,0x000400fa, 5550x000200f8,0x0000170d,0x000700f5,0x00000006,
4890x00001514,0x00001515,0x00001523,0x000200f8, 5560x00005fb4,0x000001c4,0x00001709,0x00001716,
4900x00001515,0x00050041,0x00000182,0x000015cb, 5570x0000170b,0x00050084,0x00000006,0x00001640,
4910x00000180,0x00000181,0x0004003d,0x00000006, 5580x000000ec,0x00001638,0x00050080,0x00000006,
4920x000015cc,0x000015cb,0x00050084,0x00000006, 5590x00001641,0x00005fb4,0x00001640,0x00050041,
4930x000015cd,0x000001a2,0x000015cc,0x00050080, 5600x00000266,0x00001642,0x000001b9,0x00000264,
4940x00000006,0x000015ce,0x0000018b,0x000015cd, 5610x0004003d,0x00000007,0x00001643,0x00001642,
4950x00050080,0x00000006,0x000015d4,0x000015cc, 5620x00050051,0x00000006,0x0000172d,0x00001643,
4960x00005cc3,0x00050086,0x00000006,0x000015d5, 5630x00000000,0x00050095,0x0000013d,0x0000172f,
4970x000015d4,0x00000185,0x00050084,0x00000006, 5640x0000172d,0x00001641,0x00050051,0x00000006,
4980x000015c7,0x0000018b,0x000015d5,0x00050080, 5650x00001730,0x0000172f,0x00000001,0x00050051,
4990x00000006,0x000015c8,0x000015ce,0x000015c7, 5660x00000006,0x00001731,0x0000172f,0x00000000,
5000x00050084,0x00000006,0x0000151a,0x0000120a, 5670x00050051,0x00000006,0x00001734,0x00001643,
5010x000015d5,0x00050080,0x00000006,0x0000151c, 5680x00000001,0x00050080,0x00000006,0x00001736,
5020x0000151a,0x00001207,0x00050084,0x00000006, 5690x00001734,0x00001730,0x00050050,0x00000007,
5030x0000151d,0x000000df,0x0000151c,0x00050080, 5700x00001737,0x00001731,0x00001736,0x0004007c,
5040x00000006,0x0000151e,0x000015c8,0x0000151d, 5710x00000014,0x00001727,0x00001737,0x00060041,
5050x00050041,0x0000022d,0x0000151f,0x00000180, 5720x0000016c,0x0000171e,0x00001727,0x0000016b,
5060x0000022b,0x0004003d,0x00000007,0x00001520, 5730x0000016b,0x0006003d,0x00000006,0x0000171f,
5070x0000151f,0x00050051,0x00000006,0x000015f3, 5740x0000171e,0x00000002,0x00000004,0x000200f9,
5080x00001520,0x00000000,0x00050095,0x00000130, 5750x00001646,0x000200f8,0x00001646,0x000700f5,
5090x000015f5,0x000015f3,0x0000151e,0x00050051, 5760x00000006,0x00005fb5,0x0000171f,0x0000170d,
5100x00000006,0x000015f6,0x000015f5,0x00000001, 5770x00000138,0x00001645,0x000300f7,0x00001652,
5110x00050051,0x00000006,0x000015f7,0x000015f5, 5780x00000000,0x000400fa,0x0000163b,0x00001649,
5120x00000000,0x00050051,0x00000006,0x000015fa, 5790x00001651,0x000200f8,0x00001651,0x000200f9,
5130x00001520,0x00000001,0x00050080,0x00000006, 5800x00001652,0x000200f8,0x00001649,0x00050041,
5140x000015fc,0x000015fa,0x000015f6,0x00050050, 5810x000001bb,0x0000173b,0x000001b9,0x000004c1,
5150x00000007,0x000015fd,0x000015f7,0x000015fc, 5820x0004003d,0x00000006,0x0000173c,0x0000173b,
5160x0004007c,0x00000014,0x000015ed,0x000015fd, 5830x000500c7,0x00000006,0x0000173d,0x0000173c,
5170x00060041,0x0000015f,0x000015e4,0x000015ed, 5840x00000142,0x000500aa,0x0000002f,0x0000173e,
5180x0000015e,0x0000015e,0x0006003d,0x00000006, 5850x0000173d,0x00000138,0x000300f7,0x00001743,
5190x000015e5,0x000015e4,0x00000002,0x00000004, 5860x00000000,0x000400fa,0x0000173e,0x0000173f,
5200x00050041,0x00000838,0x00001522,0x000009d5, 5870x00001741,0x000200f8,0x00001741,0x00050084,
5210x0000120a,0x0003003e,0x00001522,0x000015e5, 5880x00000006,0x0000174f,0x000001d4,0x0000162d,
5220x000200f9,0x00001523,0x000200f8,0x00001523, 5890x00050080,0x00000006,0x00001750,0x000001c4,
5230x00050084,0x00000006,0x00001525,0x00001207, 5900x0000174f,0x000200f9,0x00001743,0x000200f8,
5240x00000185,0x00050080,0x00000006,0x00001527, 5910x0000173f,0x00050084,0x00000006,0x00001749,
5250x00001525,0x00000185,0x00050041,0x00000182, 5920x000000ec,0x0000162d,0x00050080,0x00000006,
5260x00001528,0x00000180,0x00000181,0x0004003d, 5930x0000174a,0x000001c4,0x00001749,0x000200f9,
5270x00000006,0x00001529,0x00001528,0x0007000c, 5940x00001743,0x000200f8,0x00001743,0x000700f5,
5280x00000006,0x0000152a,0x00000001,0x00000026, 5950x00000006,0x00005fb6,0x0000174a,0x0000173f,
5290x00001527,0x00001529,0x000200f9,0x0000152c, 5960x00001750,0x00001741,0x00050084,0x00000006,
5300x000200f8,0x0000152c,0x000700f5,0x00000006, 5970x0000164c,0x000000ec,0x00001638,0x00050080,
5310x00005b83,0x00001525,0x00001523,0x000015c1, 5980x00000006,0x0000164d,0x00005fb6,0x0000164c,
5320x000015bf,0x000500b0,0x0000002f,0x00001530, 5990x00050041,0x00000266,0x0000164e,0x000001b9,
5330x00005b83,0x0000152a,0x000400f6,0x000015c2, 6000x00000264,0x0004003d,0x00000007,0x0000164f,
5340x000015bf,0x00000000,0x000400fa,0x00001530, 6010x0000164e,0x00050051,0x00000006,0x00001767,
5350x00001531,0x000015c2,0x000200f8,0x00001531, 6020x0000164f,0x00000000,0x00050095,0x0000013d,
5360x00050080,0x00000006,0x00001534,0x00005b83, 6030x00001769,0x00001767,0x0000164d,0x00050051,
5370x0000120a,0x000500b0,0x0000002f,0x00001537, 6040x00000006,0x0000176a,0x00001769,0x00000001,
5380x00001534,0x0000152a,0x000300f7,0x00001542, 6050x00050051,0x00000006,0x0000176b,0x00001769,
5390x00000000,0x000400fa,0x00001537,0x00001539, 6060x00000000,0x00050051,0x00000006,0x0000176e,
5400x00001541,0x000200f8,0x00001541,0x000200f9, 6070x0000164f,0x00000001,0x00050080,0x00000006,
5410x00001542,0x000200f8,0x00001539,0x00050041, 6080x00001770,0x0000176e,0x0000176a,0x00050050,
5420x00000182,0x00001601,0x00000180,0x00000488, 6090x00000007,0x00001771,0x0000176b,0x00001770,
5430x0004003d,0x00000006,0x00001602,0x00001601, 6100x0004007c,0x00000014,0x00001761,0x00001771,
5440x000500c7,0x00000006,0x00001603,0x00001602, 6110x00060041,0x0000016c,0x00001758,0x00001761,
5450x00000135,0x000500aa,0x0000002f,0x00001604, 6120x0000016b,0x0000016b,0x0006003d,0x00000006,
5460x00001603,0x0000012b,0x000300f7,0x00001609, 6130x00001759,0x00001758,0x00000002,0x00000004,
5470x00000000,0x000400fa,0x00001604,0x00001605, 6140x000200f9,0x00001652,0x000200f8,0x00001652,
5480x00001607,0x000200f8,0x00001607,0x00050084, 6150x000700f5,0x00000006,0x00005fb7,0x00001759,
5490x00000006,0x00001611,0x00000194,0x00001529, 6160x00001743,0x00000138,0x00001651,0x00050041,
5500x00050080,0x00000006,0x00001612,0x0000018b, 6170x000001bb,0x00001775,0x000001b9,0x000004c1,
5510x00001611,0x000200f9,0x00001609,0x000200f8, 6180x0004003d,0x00000006,0x00001776,0x00001775,
5520x00001605,0x000200f9,0x00001609,0x000200f8, 6190x00050084,0x00000006,0x00001777,0x000000ec,
5530x00001609,0x000700f5,0x00000006,0x00005b84, 6200x00001776,0x000500c2,0x00000006,0x00001778,
5540x0000018b,0x00001605,0x00001612,0x00001607, 6210x00005fb5,0x00001777,0x000500c7,0x00000006,
5550x00050084,0x00000006,0x0000153c,0x000000df, 6220x00001779,0x00001778,0x00000a0e,0x000200f9,
5560x00001534,0x00050080,0x00000006,0x0000153d, 6230x00001656,0x000200f8,0x00001656,0x000700f5,
5570x00005b84,0x0000153c,0x00050041,0x0000022d, 6240x00000006,0x00005fb8,0x00000138,0x00001652,
5580x0000153e,0x00000180,0x0000022b,0x0004003d, 6250x00001666,0x0000165a,0x000500b0,0x0000002f,
5590x00000007,0x0000153f,0x0000153e,0x00050051, 6260x00001659,0x00005fb8,0x000001db,0x000400f6,
5600x00000006,0x00001629,0x0000153f,0x00000000, 6270x00001667,0x0000165a,0x00000000,0x000400fa,
5610x00050095,0x00000130,0x0000162b,0x00001629, 6280x00001659,0x0000165a,0x00001667,0x000200f8,
5620x0000153d,0x00050051,0x00000006,0x0000162c, 6290x0000165a,0x000500aa,0x0000002f,0x00001660,
5630x0000162b,0x00000001,0x00050051,0x00000006, 6300x00005fb8,0x00001779,0x000500a7,0x0000002f,
5640x0000162d,0x0000162b,0x00000000,0x00050051, 6310x00001661,0x0000163b,0x00001660,0x000600a9,
5650x00000006,0x00001630,0x0000153f,0x00000001, 6320x00000006,0x00001662,0x00001661,0x00000142,
5660x00050080,0x00000006,0x00001632,0x00001630, 6330x00000138,0x00060041,0x00000937,0x00001663,
5670x0000162c,0x00050050,0x00000007,0x00001633, 6340x00000b2d,0x00005fb8,0x00001309,0x0003003e,
5680x0000162d,0x00001632,0x0004007c,0x00000014, 6350x00001663,0x00001662,0x00050080,0x00000006,
5690x00001623,0x00001633,0x00060041,0x0000015f, 6360x00001666,0x00005fb8,0x00000264,0x000200f9,
5700x0000161a,0x00001623,0x0000015e,0x0000015e, 6370x00001656,0x000200f8,0x00001667,0x000400e0,
5710x0006003d,0x00000006,0x0000161b,0x0000161a, 6380x00000280,0x00000280,0x0000094f,0x000200f9,
5720x00000002,0x00000004,0x000200f9,0x00001542, 6390x00001668,0x000200f8,0x00001668,0x000700f5,
5730x000200f8,0x00001542,0x000700f5,0x00000006, 6400x00000006,0x00005fb9,0x00000142,0x00001667,
5740x00005b85,0x0000161b,0x00001609,0x0000012b, 6410x00001699,0x00001697,0x000500b0,0x0000002f,
5750x00001541,0x000300f7,0x0000154e,0x00000000, 6420x0000166b,0x00005fb9,0x000001c4,0x000400f6,
5760x000400fa,0x00001537,0x00001545,0x0000154d, 6430x0000169a,0x00001697,0x00000000,0x000400fa,
5770x000200f8,0x0000154d,0x000200f9,0x0000154e, 6440x0000166b,0x0000166c,0x0000169a,0x000200f8,
5780x000200f8,0x00001545,0x00050041,0x00000182, 6450x0000166c,0x000200f9,0x0000166d,0x000200f8,
5790x00001637,0x00000180,0x00000488,0x0004003d, 6460x0000166d,0x000700f5,0x00000006,0x00005fc6,
5800x00000006,0x00001638,0x00001637,0x000500c7, 6470x00000138,0x0000166c,0x00001683,0x00001681,
5810x00000006,0x00001639,0x00001638,0x00000135, 6480x000500b0,0x0000002f,0x00001670,0x00005fc6,
5820x000500aa,0x0000002f,0x0000163a,0x00001639, 6490x000001db,0x000400f6,0x00001684,0x00001681,
5830x0000012b,0x000300f7,0x0000163f,0x00000000, 6500x00000000,0x000400fa,0x00001670,0x00001671,
5840x000400fa,0x0000163a,0x0000163b,0x0000163d, 6510x00001684,0x000200f8,0x00001671,0x000500ae,
5850x000200f8,0x0000163d,0x00050084,0x00000006, 6520x0000002f,0x00001675,0x00001309,0x00005fb9,
5860x0000164b,0x0000019b,0x00001529,0x00050080, 6530x000300f7,0x0000167e,0x00000000,0x000400fa,
5870x00000006,0x0000164c,0x0000018b,0x0000164b, 6540x00001675,0x00001676,0x0000167d,0x000200f8,
5880x000200f9,0x0000163f,0x000200f8,0x0000163b, 6550x0000167d,0x000200f9,0x0000167e,0x000200f8,
5890x00050084,0x00000006,0x00001645,0x000000df, 6560x00001676,0x00050082,0x00000006,0x0000167a,
5900x00001529,0x00050080,0x00000006,0x00001646, 6570x00001309,0x00005fb9,0x00060041,0x00000937,
5910x0000018b,0x00001645,0x000200f9,0x0000163f, 6580x0000167b,0x00000b2d,0x00005fc6,0x0000167a,
5920x000200f8,0x0000163f,0x000700f5,0x00000006, 6590x0004003d,0x00000006,0x0000167c,0x0000167b,
5930x00005b86,0x00001646,0x0000163b,0x0000164c, 6600x000200f9,0x0000167e,0x000200f8,0x0000167e,
5940x0000163d,0x00050084,0x00000006,0x00001548, 6610x000700f5,0x00000006,0x00005fca,0x0000167c,
5950x000000df,0x00001534,0x00050080,0x00000006, 6620x00001676,0x00000138,0x0000167d,0x00050041,
5960x00001549,0x00005b86,0x00001548,0x00050041, 6630x00000009,0x00001680,0x0000160c,0x00005fc6,
5970x0000022d,0x0000154a,0x00000180,0x0000022b, 6640x0003003e,0x00001680,0x00005fca,0x000200f9,
5980x0004003d,0x00000007,0x0000154b,0x0000154a, 6650x00001681,0x000200f8,0x00001681,0x00050080,
5990x00050051,0x00000006,0x00001663,0x0000154b, 6660x00000006,0x00001683,0x00005fc6,0x00000264,
6000x00000000,0x00050095,0x00000130,0x00001665, 6670x000200f9,0x0000166d,0x000200f8,0x00001684,
6010x00001663,0x00001549,0x00050051,0x00000006, 6680x000400e0,0x00000280,0x00000280,0x0000094f,
6020x00001666,0x00001665,0x00000001,0x00050051, 6690x000200f9,0x00001685,0x000200f8,0x00001685,
6030x00000006,0x00001667,0x00001665,0x00000000, 6700x000700f5,0x00000006,0x00005fc7,0x00000138,
6040x00050051,0x00000006,0x0000166a,0x0000154b, 6710x00001684,0x00001695,0x00001689,0x000500b0,
6050x00000001,0x00050080,0x00000006,0x0000166c, 6720x0000002f,0x00001688,0x00005fc7,0x000001db,
6060x0000166a,0x00001666,0x00050050,0x00000007, 6730x000400f6,0x00001696,0x00001689,0x00000000,
6070x0000166d,0x00001667,0x0000166c,0x0004007c, 6740x000400fa,0x00001688,0x00001689,0x00001696,
6080x00000014,0x0000165d,0x0000166d,0x00060041, 6750x000200f8,0x00001689,0x00050041,0x00000009,
6090x0000015f,0x00001654,0x0000165d,0x0000015e, 6760x0000168d,0x0000160c,0x00005fc7,0x0004003d,
6100x0000015e,0x0006003d,0x00000006,0x00001655, 6770x00000006,0x0000168e,0x0000168d,0x00060041,
6110x00001654,0x00000002,0x00000004,0x000200f9, 6780x00000937,0x0000168f,0x00000b2d,0x00005fc7,
6120x0000154e,0x000200f8,0x0000154e,0x000700f5, 6790x00001309,0x0004003d,0x00000006,0x00001690,
6130x00000006,0x00005b87,0x00001655,0x0000163f, 6800x0000168f,0x00050080,0x00000006,0x00001691,
6140x0000012b,0x0000154d,0x00050041,0x00000182, 6810x00001690,0x0000168e,0x0003003e,0x0000168f,
6150x00001671,0x00000180,0x00000488,0x0004003d, 6820x00001691,0x00050080,0x00000006,0x00001695,
6160x00000006,0x00001672,0x00001671,0x00050084, 6830x00005fc7,0x00000264,0x000200f9,0x00001685,
6170x00000006,0x00001673,0x000000df,0x00001672, 6840x000200f8,0x00001696,0x000400e0,0x00000280,
6180x000500c2,0x00000006,0x00001674,0x00005b85, 6850x00000280,0x0000094f,0x000200f9,0x00001697,
6190x00001673,0x000500c7,0x00000006,0x00001675, 6860x000200f8,0x00001697,0x000500c4,0x00000006,
6200x00001674,0x0000090f,0x000200f9,0x00001552, 6870x00001699,0x00005fb9,0x00000264,0x000200f9,
6210x000200f8,0x00001552,0x000700f5,0x00000006, 6880x00001668,0x000200f8,0x0000169a,0x000300f7,
6220x00005b88,0x0000012b,0x0000154e,0x00001562, 6890x000016b6,0x00000000,0x000400fa,0x0000163b,
6230x00001556,0x000500b0,0x0000002f,0x00001555, 6900x0000169c,0x000016b6,0x000200f8,0x0000169c,
6240x00005b88,0x000001a2,0x000400f6,0x00001563, 6910x00050041,0x00000937,0x0000169e,0x00000ad4,
6250x00001556,0x00000000,0x000400fa,0x00001555, 6920x00001779,0x0004003d,0x00000006,0x0000169f,
6260x00001556,0x00001563,0x000200f8,0x00001556, 6930x0000169e,0x00060041,0x00000937,0x000016a2,
6270x000500aa,0x0000002f,0x0000155c,0x00005b88, 6940x00000b2d,0x00001779,0x00001309,0x0004003d,
6280x00001675,0x000500a7,0x0000002f,0x0000155d, 6950x00000006,0x000016a3,0x000016a2,0x00050080,
6290x00001537,0x0000155c,0x000600a9,0x00000006, 6960x00000006,0x000016a4,0x0000169f,0x000016a3,
6300x0000155e,0x0000155d,0x00000135,0x0000012b, 6970x00050082,0x00000006,0x000016a5,0x000016a4,
6310x00060041,0x00000838,0x0000155f,0x00000a2e, 6980x00000142,0x000500c7,0x00000006,0x0000177f,
6320x00005b88,0x0000120a,0x0003003e,0x0000155f, 6990x00001776,0x00000142,0x000500aa,0x0000002f,
6330x0000155e,0x00050080,0x00000006,0x00001562, 7000x00001780,0x0000177f,0x00000138,0x000300f7,
6340x00005b88,0x0000022b,0x000200f9,0x00001552, 7010x00001785,0x00000000,0x000400fa,0x00001780,
6350x000200f8,0x00001563,0x000400e0,0x00000247, 7020x00001781,0x00001783,0x000200f8,0x00001783,
6360x00000247,0x00000850,0x000200f9,0x00001564, 7030x000200f9,0x00001785,0x000200f8,0x00001781,
6370x000200f8,0x00001564,0x000700f5,0x00000006, 7040x00050084,0x00000006,0x0000178b,0x000001cd,
6380x00005b89,0x00000135,0x00001563,0x00001595, 7050x0000162d,0x00050080,0x00000006,0x0000178c,
6390x00001593,0x000500b0,0x0000002f,0x00001567, 7060x000001c4,0x0000178b,0x000200f9,0x00001785,
6400x00005b89,0x0000018b,0x000400f6,0x00001596, 7070x000200f8,0x00001785,0x000700f5,0x00000006,
6410x00001593,0x00000000,0x000400fa,0x00001567, 7080x00005fba,0x0000178c,0x00001781,0x000001c4,
6420x00001568,0x00001596,0x000200f8,0x00001568, 7090x00001783,0x00050084,0x00000006,0x000016a8,
6430x000200f9,0x00001569,0x000200f8,0x00001569, 7100x000000ec,0x000016a5,0x00050080,0x00000006,
6440x000700f5,0x00000006,0x00005b96,0x0000012b, 7110x000016a9,0x00005fba,0x000016a8,0x00050041,
6450x00001568,0x0000157f,0x0000157d,0x000500b0, 7120x00000266,0x000016aa,0x000001b9,0x00000264,
6460x0000002f,0x0000156c,0x00005b96,0x000001a2, 7130x0004003d,0x00000007,0x000016ab,0x000016aa,
6470x000400f6,0x00001580,0x0000157d,0x00000000, 7140x00050051,0x00000006,0x000017a4,0x000016ab,
6480x000400fa,0x0000156c,0x0000156d,0x00001580, 7150x00000000,0x00050095,0x0000013d,0x000017a6,
6490x000200f8,0x0000156d,0x000500ae,0x0000002f, 7160x000017a4,0x000016a9,0x00050051,0x00000006,
6500x00001571,0x0000120a,0x00005b89,0x000300f7, 7170x000017a7,0x000017a6,0x00000001,0x00050051,
6510x0000157a,0x00000000,0x000400fa,0x00001571, 7180x00000006,0x000017a8,0x000017a6,0x00000000,
6520x00001572,0x00001579,0x000200f8,0x00001579, 7190x00050051,0x00000006,0x000017ab,0x000016ab,
6530x000200f9,0x0000157a,0x000200f8,0x00001572, 7200x00000001,0x00050080,0x00000006,0x000017ad,
6540x00050082,0x00000006,0x00001576,0x0000120a, 7210x000017ab,0x000017a7,0x00050050,0x00000007,
6550x00005b89,0x00060041,0x00000838,0x00001577, 7220x000017ae,0x000017a8,0x000017ad,0x0004007c,
6560x00000a2e,0x00005b96,0x00001576,0x0004003d, 7230x00000014,0x0000179e,0x000017ae,0x00060041,
6570x00000006,0x00001578,0x00001577,0x000200f9, 7240x0000016c,0x00001796,0x0000179e,0x0000016b,
6580x0000157a,0x000200f8,0x0000157a,0x000700f5, 7250x0000016b,0x0005003e,0x00001796,0x00005fb5,
6590x00000006,0x00005b9a,0x00001578,0x00001572, 7260x00000002,0x00000004,0x000300f7,0x000017ba,
6600x0000012b,0x00001579,0x00050041,0x00000009, 7270x00000000,0x000400fa,0x00001780,0x000017b6,
6610x0000157c,0x00001508,0x00005b96,0x0003003e, 7280x000017b8,0x000200f8,0x000017b8,0x00050084,
6620x0000157c,0x00005b9a,0x000200f9,0x0000157d, 7290x00000006,0x000017c6,0x000000ec,0x0000162d,
6630x000200f8,0x0000157d,0x00050080,0x00000006, 7300x00050080,0x00000006,0x000017c7,0x000001c4,
6640x0000157f,0x00005b96,0x0000022b,0x000200f9, 7310x000017c6,0x000200f9,0x000017ba,0x000200f8,
6650x00001569,0x000200f8,0x00001580,0x000400e0, 7320x000017b6,0x00050084,0x00000006,0x000017c0,
6660x00000247,0x00000247,0x00000850,0x000200f9, 7330x000001d4,0x0000162d,0x00050080,0x00000006,
6670x00001581,0x000200f8,0x00001581,0x000700f5, 7340x000017c1,0x000001c4,0x000017c0,0x000200f9,
6680x00000006,0x00005b97,0x0000012b,0x00001580, 7350x000017ba,0x000200f8,0x000017ba,0x000700f5,
6690x00001591,0x00001585,0x000500b0,0x0000002f, 7360x00000006,0x00005fbb,0x000017c1,0x000017b6,
6700x00001584,0x00005b97,0x000001a2,0x000400f6, 7370x000017c7,0x000017b8,0x00050080,0x00000006,
6710x00001592,0x00001585,0x00000000,0x000400fa, 7380x000016b1,0x00005fbb,0x000016a8,0x00050095,
6720x00001584,0x00001585,0x00001592,0x000200f8, 7390x0000013d,0x000017df,0x000017a4,0x000016b1,
6730x00001585,0x00050041,0x00000009,0x00001589, 7400x00050051,0x00000006,0x000017e0,0x000017df,
6740x00001508,0x00005b97,0x0004003d,0x00000006, 7410x00000001,0x00050051,0x00000006,0x000017e1,
6750x0000158a,0x00001589,0x00060041,0x00000838, 7420x000017df,0x00000000,0x00050080,0x00000006,
6760x0000158b,0x00000a2e,0x00005b97,0x0000120a, 7430x000017e6,0x000017ab,0x000017e0,0x00050050,
6770x0004003d,0x00000006,0x0000158c,0x0000158b, 7440x00000007,0x000017e7,0x000017e1,0x000017e6,
6780x00050080,0x00000006,0x0000158d,0x0000158c, 7450x0004007c,0x00000014,0x000017d7,0x000017e7,
6790x0000158a,0x0003003e,0x0000158b,0x0000158d, 7460x00060041,0x0000016c,0x000017cf,0x000017d7,
6800x00050080,0x00000006,0x00001591,0x00005b97, 7470x0000016b,0x0000016b,0x0005003e,0x000017cf,
6810x0000022b,0x000200f9,0x00001581,0x000200f8, 7480x00005fb7,0x00000002,0x00000004,0x000200f9,
6820x00001592,0x000400e0,0x00000247,0x00000247, 7490x000016b6,0x000200f8,0x000016b6,0x000400e0,
6830x00000850,0x000200f9,0x00001593,0x000200f8, 7500x00000280,0x00000280,0x0000094f,0x000300f7,
6840x00001593,0x000500c4,0x00000006,0x00001595, 7510x000016c2,0x00000000,0x000400fa,0x00001618,
6850x00005b89,0x0000022b,0x000200f9,0x00001564, 7520x000016b9,0x000016c2,0x000200f8,0x000016b9,
6860x000200f8,0x00001596,0x000300f7,0x000015b2, 7530x00060041,0x00000937,0x000016bc,0x00000b2d,
6870x00000000,0x000400fa,0x00001537,0x00001598, 7540x00001309,0x00000b9b,0x0004003d,0x00000006,
6880x000015b2,0x000200f8,0x00001598,0x00050041, 7550x000016bd,0x000016bc,0x00050041,0x00000937,
6890x00000838,0x0000159a,0x000009d5,0x00001675, 7560x000016be,0x00000ad4,0x00001309,0x0004003d,
6900x0004003d,0x00000006,0x0000159b,0x0000159a, 7570x00000006,0x000016bf,0x000016be,0x00050080,
6910x00060041,0x00000838,0x0000159e,0x00000a2e, 7580x00000006,0x000016c0,0x000016bf,0x000016bd,
6920x00001675,0x0000120a,0x0004003d,0x00000006, 7590x0003003e,0x000016be,0x000016c0,0x000200f9,
6930x0000159f,0x0000159e,0x00050080,0x00000006, 7600x000016c2,0x000200f8,0x000016c2,0x000400e0,
6940x000015a0,0x0000159b,0x0000159f,0x00050082, 7610x00000280,0x00000280,0x0000094f,0x000200f9,
6950x00000006,0x000015a1,0x000015a0,0x00000135, 7620x000016c3,0x000200f8,0x000016c3,0x00050080,
6960x000500c7,0x00000006,0x0000167b,0x00001672, 7630x00000006,0x000016c5,0x00005fb3,0x000001c4,
6970x00000135,0x000500aa,0x0000002f,0x0000167c, 7640x000200f9,0x00001630,0x000200f8,0x000016c6,
6980x0000167b,0x0000012b,0x000300f7,0x00001681, 7650x000200f9,0x000013fd,0x000200f8,0x00001303,
6990x00000000,0x000400fa,0x0000167c,0x0000167d, 7660x000500aa,0x0000002f,0x0000130f,0x000012df,
7000x0000167f,0x000200f8,0x0000167f,0x000200f9, 7670x0000130e,0x000300f7,0x00001311,0x00000000,
7010x00001681,0x000200f8,0x0000167d,0x00050084, 7680x000400fa,0x0000130f,0x00001310,0x00001311,
7020x00000006,0x00001687,0x00000194,0x00001529, 7690x000200f8,0x00001310,0x00050041,0x000012db,
7030x00050080,0x00000006,0x00001688,0x0000018b, 7700x00001313,0x000012e4,0x00000138,0x0004003d,
7040x00001687,0x000200f9,0x00001681,0x000200f8, 7710x00000006,0x00001314,0x00001313,0x00050041,
7050x00001681,0x000700f5,0x00000006,0x00005b8a, 7720x000001bb,0x00001802,0x000001b9,0x000001ba,
7060x00001688,0x0000167d,0x0000018b,0x0000167f, 7730x0004003d,0x00000006,0x00001803,0x00001802,
7070x00050084,0x00000006,0x000015a4,0x000000df, 7740x000200f9,0x00001804,0x000200f8,0x00001804,
7080x000015a1,0x00050080,0x00000006,0x000015a5, 7750x000700f5,0x00000006,0x00005f9e,0x00000142,
7090x00005b8a,0x000015a4,0x00050041,0x0000022d, 7760x00001310,0x0000180b,0x00001809,0x000500b0,
7100x000015a6,0x00000180,0x0000022b,0x0004003d, 7770x0000002f,0x00001808,0x00005f9e,0x00001803,
7110x00000007,0x000015a7,0x000015a6,0x00050051, 7780x000400f6,0x0000180d,0x00001809,0x00000000,
7120x00000006,0x000016a0,0x000015a7,0x00000000, 7790x000400fa,0x00001808,0x00001809,0x0000180d,
7130x00050095,0x00000130,0x000016a2,0x000016a0, 7800x000200f8,0x00001809,0x000500c4,0x00000006,
7140x000015a5,0x00050051,0x00000006,0x000016a3, 7810x0000180b,0x00005f9e,0x00000264,0x000200f9,
7150x000016a2,0x00000001,0x00050051,0x00000006, 7820x00001804,0x000200f8,0x0000180d,0x000200f9,
7160x000016a4,0x000016a2,0x00000000,0x00050051, 7830x0000180f,0x000200f8,0x0000180f,0x000700f5,
7170x00000006,0x000016a7,0x000015a7,0x00000001, 7840x00000006,0x00005f9f,0x00001314,0x0000180d,
7180x00050080,0x00000006,0x000016a9,0x000016a7, 7850x00001837,0x00001835,0x000500b0,0x0000002f,
7190x000016a3,0x00050050,0x00000007,0x000016aa, 7860x00001813,0x00005f9f,0x00005f9e,0x000400f6,
7200x000016a4,0x000016a9,0x0004007c,0x00000014, 7870x00001838,0x00001835,0x00000000,0x000400fa,
7210x0000169a,0x000016aa,0x00060041,0x0000015f, 7880x00001813,0x00001814,0x00001838,0x000200f8,
7220x00001692,0x0000169a,0x0000015e,0x0000015e, 7890x00001814,0x000500b0,0x0000002f,0x00001818,
7230x0005003e,0x00001692,0x00005b85,0x00000002, 7900x00005f9f,0x00001803,0x000300f7,0x00001822,
7240x00000004,0x000300f7,0x000016b6,0x00000000, 7910x00000000,0x000400fa,0x00001818,0x00001819,
7250x000400fa,0x0000167c,0x000016b2,0x000016b4, 7920x00001821,0x000200f8,0x00001821,0x000200f9,
7260x000200f8,0x000016b4,0x00050084,0x00000006, 7930x00001822,0x000200f8,0x00001819,0x00050084,
7270x000016c2,0x000000df,0x00001529,0x00050080, 7940x00000006,0x0000181c,0x000000ec,0x00005f9f,
7280x00000006,0x000016c3,0x0000018b,0x000016c2, 7950x00050080,0x00000006,0x0000181d,0x000001c4,
7290x000200f9,0x000016b6,0x000200f8,0x000016b2, 7960x0000181c,0x00050041,0x00000266,0x0000181e,
7300x00050084,0x00000006,0x000016bc,0x0000019b, 7970x000001b9,0x00000264,0x0004003d,0x00000007,
7310x00001529,0x00050080,0x00000006,0x000016bd, 7980x0000181f,0x0000181e,0x00050051,0x00000006,
7320x0000018b,0x000016bc,0x000200f9,0x000016b6, 7990x000018c6,0x0000181f,0x00000000,0x00050095,
7330x000200f8,0x000016b6,0x000700f5,0x00000006, 8000x0000013d,0x000018c8,0x000018c6,0x0000181d,
7340x00005b8b,0x000016bd,0x000016b2,0x000016c3, 8010x00050051,0x00000006,0x000018c9,0x000018c8,
7350x000016b4,0x00050080,0x00000006,0x000015ad, 8020x00000001,0x00050051,0x00000006,0x000018ca,
7360x00005b8b,0x000015a4,0x00050095,0x00000130, 8030x000018c8,0x00000000,0x00050051,0x00000006,
7370x000016db,0x000016a0,0x000015ad,0x00050051, 8040x000018cd,0x0000181f,0x00000001,0x00050080,
7380x00000006,0x000016dc,0x000016db,0x00000001, 8050x00000006,0x000018cf,0x000018cd,0x000018c9,
7390x00050051,0x00000006,0x000016dd,0x000016db, 8060x00050050,0x00000007,0x000018d0,0x000018ca,
7400x00000000,0x00050080,0x00000006,0x000016e2, 8070x000018cf,0x0004007c,0x00000014,0x000018c0,
7410x000016a7,0x000016dc,0x00050050,0x00000007, 8080x000018d0,0x00060041,0x0000016c,0x000018b7,
7420x000016e3,0x000016dd,0x000016e2,0x0004007c, 8090x000018c0,0x0000016b,0x0000016b,0x0006003d,
7430x00000014,0x000016d3,0x000016e3,0x00060041, 8100x00000006,0x000018b8,0x000018b7,0x00000002,
7440x0000015f,0x000016cb,0x000016d3,0x0000015e, 8110x00000004,0x000200f9,0x00001822,0x000200f8,
7450x0000015e,0x0005003e,0x000016cb,0x00005b87, 8120x00001822,0x000700f5,0x00000006,0x00005faf,
7460x00000002,0x00000004,0x000200f9,0x000015b2, 8130x000018b8,0x00001819,0x00000539,0x00001821,
7470x000200f8,0x000015b2,0x000400e0,0x00000247, 8140x00050041,0x00000937,0x00001824,0x00000924,
7480x00000247,0x00000850,0x000300f7,0x000015be, 8150x00005f9f,0x0003003e,0x00001824,0x00005faf,
7490x00000000,0x000400fa,0x00001514,0x000015b5, 8160x000300f7,0x00001832,0x00000000,0x000400fa,
7500x000015be,0x000200f8,0x000015b5,0x00060041, 8170x00001818,0x00001829,0x00001831,0x000200f8,
7510x00000838,0x000015b8,0x00000a2e,0x0000120a, 8180x00001831,0x000200f9,0x00001832,0x000200f8,
7520x00000a9c,0x0004003d,0x00000006,0x000015b9, 8190x00001829,0x00050084,0x00000006,0x000018d5,
7530x000015b8,0x00050041,0x00000838,0x000015ba, 8200x000000ec,0x00001803,0x00050080,0x00000006,
7540x000009d5,0x0000120a,0x0004003d,0x00000006, 8210x000018d6,0x000001c4,0x000018d5,0x00050084,
7550x000015bb,0x000015ba,0x00050080,0x00000006, 8220x00000006,0x0000182c,0x000000ec,0x00005f9f,
7560x000015bc,0x000015bb,0x000015b9,0x0003003e, 8230x00050080,0x00000006,0x0000182d,0x000018d6,
7570x000015ba,0x000015bc,0x000200f9,0x000015be, 8240x0000182c,0x00050041,0x00000266,0x0000182e,
7580x000200f8,0x000015be,0x000400e0,0x00000247, 8250x000001b9,0x00000264,0x0004003d,0x00000007,
7590x00000247,0x00000850,0x000200f9,0x000015bf, 8260x0000182f,0x0000182e,0x00050051,0x00000006,
7600x000200f8,0x000015bf,0x00050080,0x00000006, 8270x000018ed,0x0000182f,0x00000000,0x00050095,
7610x000015c1,0x00005b83,0x0000018b,0x000200f9, 8280x0000013d,0x000018ef,0x000018ed,0x0000182d,
7620x0000152c,0x000200f8,0x000015c2,0x000200f9, 8290x00050051,0x00000006,0x000018f0,0x000018ef,
7630x000012fe,0x000200f8,0x00001204,0x000500aa, 8300x00000001,0x00050051,0x00000006,0x000018f1,
7640x0000002f,0x00001210,0x000011e0,0x0000120f, 8310x000018ef,0x00000000,0x00050051,0x00000006,
7650x000300f7,0x00001212,0x00000000,0x000400fa, 8320x000018f4,0x0000182f,0x00000001,0x00050080,
7660x00001210,0x00001211,0x00001212,0x000200f8, 8330x00000006,0x000018f6,0x000018f4,0x000018f0,
7670x00001211,0x00050041,0x000011dc,0x00001214, 8340x00050050,0x00000007,0x000018f7,0x000018f1,
7680x000011e5,0x0000012b,0x0004003d,0x00000006, 8350x000018f6,0x0004007c,0x00000014,0x000018e7,
7690x00001215,0x00001214,0x00050041,0x00000182, 8360x000018f7,0x00060041,0x0000016c,0x000018de,
7700x000016fe,0x00000180,0x00000181,0x0004003d, 8370x000018e7,0x0000016b,0x0000016b,0x0006003d,
7710x00000006,0x000016ff,0x000016fe,0x000200f9, 8380x00000006,0x000018df,0x000018de,0x00000002,
7720x00001700,0x000200f8,0x00001700,0x000700f5, 8390x00000004,0x000200f9,0x00001832,0x000200f8,
7730x00000006,0x00005b6e,0x00000135,0x00001211, 8400x00001832,0x000700f5,0x00000006,0x00005fb1,
7740x00001707,0x00001705,0x000500b0,0x0000002f, 8410x000018df,0x00001829,0x00000539,0x00001831,
7750x00001704,0x00005b6e,0x000016ff,0x000400f6, 8420x00050041,0x00000937,0x00001834,0x00000939,
7760x00001709,0x00001705,0x00000000,0x000400fa, 8430x00005f9f,0x0003003e,0x00001834,0x00005fb1,
7770x00001704,0x00001705,0x00001709,0x000200f8, 8440x000200f9,0x00001835,0x000200f8,0x00001835,
7780x00001705,0x000500c4,0x00000006,0x00001707, 8450x00050080,0x00000006,0x00001837,0x00005f9f,
7790x00005b6e,0x0000022b,0x000200f9,0x00001700, 8460x000001c4,0x000200f9,0x0000180f,0x000200f8,
7800x000200f8,0x00001709,0x000200f9,0x0000170b, 8470x00001838,0x000400e0,0x00000280,0x00000280,
7810x000200f8,0x0000170b,0x000700f5,0x00000006, 8480x0000094f,0x000200f9,0x00001839,0x000200f8,
7820x00005b6f,0x00001215,0x00001709,0x00001733, 8490x00001839,0x000700f5,0x00000006,0x00005fa1,
7830x00001731,0x000500b0,0x0000002f,0x0000170f, 8500x00000280,0x00001838,0x0000188d,0x0000188b,
7840x00005b6f,0x00005b6e,0x000400f6,0x00001734, 8510x000500b2,0x0000002f,0x0000183d,0x00005fa1,
7850x00001731,0x00000000,0x000400fa,0x0000170f, 8520x00005f9e,0x000400f6,0x0000188e,0x0000188b,
7860x00001710,0x00001734,0x000200f8,0x00001710, 8530x00000000,0x000400fa,0x0000183d,0x0000183e,
7870x000500b0,0x0000002f,0x00001714,0x00005b6f, 8540x0000188e,0x000200f8,0x0000183e,0x000500c2,
7880x000016ff,0x000300f7,0x0000171e,0x00000000, 8550x00000006,0x00001840,0x00005fa1,0x00000264,
7890x000400fa,0x00001714,0x00001715,0x0000171d, 8560x000200f9,0x00001841,0x000200f8,0x00001841,
7900x000200f8,0x0000171d,0x000200f9,0x0000171e, 8570x000700f5,0x00000006,0x00005fa4,0x00001840,
7910x000200f8,0x00001715,0x00050084,0x00000006, 8580x0000183e,0x00001889,0x00001887,0x000500ac,
7920x00001718,0x000000df,0x00005b6f,0x00050080, 8590x0000002f,0x00001844,0x00005fa4,0x00000138,
7930x00000006,0x00001719,0x0000018b,0x00001718, 8600x000400f6,0x0000188a,0x00001887,0x00000000,
7940x00050041,0x0000022d,0x0000171a,0x00000180, 8610x000400fa,0x00001844,0x00001845,0x0000188a,
7950x0000022b,0x0004003d,0x00000007,0x0000171b, 8620x000200f8,0x00001845,0x000200f9,0x00001847,
7960x0000171a,0x00050051,0x00000006,0x000017c2, 8630x000200f8,0x00001847,0x000700f5,0x00000006,
7970x0000171b,0x00000000,0x00050095,0x00000130, 8640x00005fa6,0x00001314,0x00001845,0x00001885,
7980x000017c4,0x000017c2,0x00001719,0x00050051, 8650x00001883,0x000500b0,0x0000002f,0x0000184b,
7990x00000006,0x000017c5,0x000017c4,0x00000001, 8660x00005fa6,0x00005f9e,0x000400f6,0x00001886,
8000x00050051,0x00000006,0x000017c6,0x000017c4, 8670x00001883,0x00000000,0x000400fa,0x0000184b,
8010x00000000,0x00050051,0x00000006,0x000017c9, 8680x0000184c,0x00001886,0x000200f8,0x0000184c,
8020x0000171b,0x00000001,0x00050080,0x00000006, 8690x000500c6,0x00000006,0x0000184f,0x00005fa6,
8030x000017cb,0x000017c9,0x000017c5,0x00050050, 8700x00005fa4,0x000500ac,0x0000002f,0x00001852,
8040x00000007,0x000017cc,0x000017c6,0x000017cb, 8710x0000184f,0x00005fa6,0x000300f7,0x00001882,
8050x0004007c,0x00000014,0x000017bc,0x000017cc, 8720x00000000,0x000400fa,0x00001852,0x00001853,
8060x00060041,0x0000015f,0x000017b3,0x000017bc, 8730x00001882,0x000200f8,0x00001853,0x00050041,
8070x0000015e,0x0000015e,0x0006003d,0x00000006, 8740x00000937,0x00001855,0x00000924,0x00005fa6,
8080x000017b4,0x000017b3,0x00000002,0x00000004, 8750x0004003d,0x00000006,0x00001856,0x00001855,
8090x000200f9,0x0000171e,0x000200f8,0x0000171e, 8760x00050041,0x00000937,0x00001858,0x00000924,
8100x000700f5,0x00000006,0x00005b7f,0x000017b4, 8770x0000184f,0x0004003d,0x00000006,0x00001859,
8110x00001715,0x00000500,0x0000171d,0x00050041, 8780x00001858,0x00050041,0x00000937,0x0000185b,
8120x00000838,0x00001720,0x00000825,0x00005b6f, 8790x00000939,0x00005fa6,0x0004003d,0x00000006,
8130x0003003e,0x00001720,0x00005b7f,0x000300f7, 8800x0000185c,0x0000185b,0x00050041,0x00000937,
8140x0000172e,0x00000000,0x000400fa,0x00001714, 8810x0000185e,0x00000939,0x0000184f,0x0004003d,
8150x00001725,0x0000172d,0x000200f8,0x0000172d, 8820x00000006,0x0000185f,0x0000185e,0x000500ac,
8160x000200f9,0x0000172e,0x000200f8,0x00001725, 8830x0000002f,0x00001862,0x00001856,0x00001859,
8170x00050084,0x00000006,0x000017d1,0x000000df, 8840x000400a8,0x0000002f,0x00001863,0x00001862,
8180x000016ff,0x00050080,0x00000006,0x000017d2, 8850x000300f7,0x0000186c,0x00000000,0x000400fa,
8190x0000018b,0x000017d1,0x00050084,0x00000006, 8860x00001863,0x00001864,0x0000186c,0x000200f8,
8200x00001728,0x000000df,0x00005b6f,0x00050080, 8870x00001864,0x000500aa,0x0000002f,0x00001867,
8210x00000006,0x00001729,0x000017d2,0x00001728, 8880x00001856,0x00001859,0x000500ac,0x0000002f,
8220x00050041,0x0000022d,0x0000172a,0x00000180, 8890x0000186a,0x0000185c,0x0000185f,0x000500a7,
8230x0000022b,0x0004003d,0x00000007,0x0000172b, 8900x0000002f,0x0000186b,0x00001867,0x0000186a,
8240x0000172a,0x00050051,0x00000006,0x000017e9, 8910x000200f9,0x0000186c,0x000200f8,0x0000186c,
8250x0000172b,0x00000000,0x00050095,0x00000130, 8920x000700f5,0x0000002f,0x0000186d,0x00001862,
8260x000017eb,0x000017e9,0x00001729,0x00050051, 8930x00001853,0x0000186b,0x00001864,0x000500c7,
8270x00000006,0x000017ec,0x000017eb,0x00000001, 8940x00000006,0x00001871,0x00005fa6,0x00005fa1,
8280x00050051,0x00000006,0x000017ed,0x000017eb, 8950x000500aa,0x0000002f,0x00001872,0x00001871,
8290x00000000,0x00050051,0x00000006,0x000017f0, 8960x00000138,0x000500a4,0x0000002f,0x00001873,
8300x0000172b,0x00000001,0x00050080,0x00000006, 8970x0000186d,0x00001872,0x000300f7,0x00001881,
8310x000017f2,0x000017f0,0x000017ec,0x00050050, 8980x00000000,0x000400fa,0x00001873,0x00001874,
8320x00000007,0x000017f3,0x000017ed,0x000017f2, 8990x00001881,0x000200f8,0x00001874,0x0003003e,
8330x0004007c,0x00000014,0x000017e3,0x000017f3, 9000x00001855,0x00001859,0x0003003e,0x00001858,
8340x00060041,0x0000015f,0x000017da,0x000017e3, 9010x00001856,0x0003003e,0x0000185b,0x0000185f,
8350x0000015e,0x0000015e,0x0006003d,0x00000006, 9020x0003003e,0x0000185e,0x0000185c,0x000200f9,
8360x000017db,0x000017da,0x00000002,0x00000004, 9030x00001881,0x000200f8,0x00001881,0x000200f9,
8370x000200f9,0x0000172e,0x000200f8,0x0000172e, 9040x00001882,0x000200f8,0x00001882,0x000200f9,
8380x000700f5,0x00000006,0x00005b81,0x000017db, 9050x00001883,0x000200f8,0x00001883,0x00050080,
8390x00001725,0x00000500,0x0000172d,0x00050041, 9060x00000006,0x00001885,0x00005fa6,0x000001c4,
8400x00000838,0x00001730,0x0000083a,0x00005b6f, 9070x000200f9,0x00001847,0x000200f8,0x00001886,
8410x0003003e,0x00001730,0x00005b81,0x000200f9, 9080x000400e0,0x00000280,0x00000280,0x0000094f,
8420x00001731,0x000200f8,0x00001731,0x00050080, 9090x000200f9,0x00001887,0x000200f8,0x00001887,
8430x00000006,0x00001733,0x00005b6f,0x0000018b, 9100x000500c2,0x00000006,0x00001889,0x00005fa4,
8440x000200f9,0x0000170b,0x000200f8,0x00001734, 9110x00000264,0x000200f9,0x00001841,0x000200f8,
8450x000400e0,0x00000247,0x00000247,0x00000850, 9120x0000188a,0x000200f9,0x0000188b,0x000200f8,
8460x000200f9,0x00001735,0x000200f8,0x00001735, 9130x0000188b,0x000500c4,0x00000006,0x0000188d,
8470x000700f5,0x00000006,0x00005b71,0x00000247, 9140x00005fa1,0x00000264,0x000200f9,0x00001839,
8480x00001734,0x00001789,0x00001787,0x000500b2, 9150x000200f8,0x0000188e,0x000200f9,0x00001890,
8490x0000002f,0x00001739,0x00005b71,0x00005b6e, 9160x000200f8,0x00001890,0x000700f5,0x00000006,
8500x000400f6,0x0000178a,0x00001787,0x00000000, 9170x00005fa3,0x00001314,0x0000188e,0x000018ac,
8510x000400fa,0x00001739,0x0000173a,0x0000178a, 9180x00001895,0x000500b0,0x0000002f,0x00001894,
8520x000200f8,0x0000173a,0x000500c2,0x00000006, 9190x00005fa3,0x00001803,0x000400f6,0x000018ad,
8530x0000173c,0x00005b71,0x0000022b,0x000200f9, 9200x00001895,0x00000000,0x000400fa,0x00001894,
8540x0000173d,0x000200f8,0x0000173d,0x000700f5, 9210x00001895,0x000018ad,0x000200f8,0x00001895,
8550x00000006,0x00005b74,0x0000173c,0x0000173a, 9220x00050084,0x00000006,0x00001898,0x000000ec,
8560x00001785,0x00001783,0x000500ac,0x0000002f, 9230x00005fa3,0x00050080,0x00000006,0x00001899,
8570x00001740,0x00005b74,0x0000012b,0x000400f6, 9240x000001c4,0x00001898,0x00050041,0x00000266,
8580x00001786,0x00001783,0x00000000,0x000400fa, 9250x0000189b,0x000001b9,0x00000264,0x0004003d,
8590x00001740,0x00001741,0x00001786,0x000200f8, 9260x00000007,0x0000189c,0x0000189b,0x00050041,
8600x00001741,0x000200f9,0x00001743,0x000200f8, 9270x00000937,0x0000189d,0x00000924,0x00005fa3,
8610x00001743,0x000700f5,0x00000006,0x00005b76, 9280x0004003d,0x00000006,0x0000189e,0x0000189d,
8620x00001215,0x00001741,0x00001781,0x0000177f, 9290x00050051,0x00000006,0x0000190f,0x0000189c,
8630x000500b0,0x0000002f,0x00001747,0x00005b76, 9300x00000000,0x00050095,0x0000013d,0x00001911,
8640x00005b6e,0x000400f6,0x00001782,0x0000177f, 9310x0000190f,0x00001899,0x00050051,0x00000006,
8650x00000000,0x000400fa,0x00001747,0x00001748, 9320x00001912,0x00001911,0x00000001,0x00050051,
8660x00001782,0x000200f8,0x00001748,0x000500c6, 9330x00000006,0x00001913,0x00001911,0x00000000,
8670x00000006,0x0000174b,0x00005b76,0x00005b74, 9340x00050051,0x00000006,0x00001916,0x0000189c,
8680x000500ac,0x0000002f,0x0000174e,0x0000174b, 9350x00000001,0x00050080,0x00000006,0x00001918,
8690x00005b76,0x000300f7,0x0000177e,0x00000000, 9360x00001916,0x00001912,0x00050050,0x00000007,
8700x000400fa,0x0000174e,0x0000174f,0x0000177e, 9370x00001919,0x00001913,0x00001918,0x0004007c,
8710x000200f8,0x0000174f,0x00050041,0x00000838, 9380x00000014,0x00001909,0x00001919,0x00060041,
8720x00001751,0x00000825,0x00005b76,0x0004003d, 9390x0000016c,0x00001901,0x00001909,0x0000016b,
8730x00000006,0x00001752,0x00001751,0x00050041, 9400x0000016b,0x0005003e,0x00001901,0x0000189e,
8740x00000838,0x00001754,0x00000825,0x0000174b, 9410x00000002,0x00000004,0x00050084,0x00000006,
8750x0004003d,0x00000006,0x00001755,0x00001754, 9420x0000191e,0x000000ec,0x00001803,0x00050080,
8760x00050041,0x00000838,0x00001757,0x0000083a, 9430x00000006,0x0000191f,0x000001c4,0x0000191e,
8770x00005b76,0x0004003d,0x00000006,0x00001758, 9440x00050080,0x00000006,0x000018a3,0x0000191f,
8780x00001757,0x00050041,0x00000838,0x0000175a, 9450x00001898,0x00050041,0x00000937,0x000018a7,
8790x0000083a,0x0000174b,0x0004003d,0x00000006, 9460x00000939,0x00005fa3,0x0004003d,0x00000006,
8800x0000175b,0x0000175a,0x000500ac,0x0000002f, 9470x000018a8,0x000018a7,0x00050095,0x0000013d,
8810x0000175e,0x00001752,0x00001755,0x000400a8, 9480x00001937,0x0000190f,0x000018a3,0x00050051,
8820x0000002f,0x0000175f,0x0000175e,0x000300f7, 9490x00000006,0x00001938,0x00001937,0x00000001,
8830x00001768,0x00000000,0x000400fa,0x0000175f, 9500x00050051,0x00000006,0x00001939,0x00001937,
8840x00001760,0x00001768,0x000200f8,0x00001760, 9510x00000000,0x00050080,0x00000006,0x0000193e,
8850x000500aa,0x0000002f,0x00001763,0x00001752, 9520x00001916,0x00001938,0x00050050,0x00000007,
8860x00001755,0x000500ac,0x0000002f,0x00001766, 9530x0000193f,0x00001939,0x0000193e,0x0004007c,
8870x00001758,0x0000175b,0x000500a7,0x0000002f, 9540x00000014,0x0000192f,0x0000193f,0x00060041,
8880x00001767,0x00001763,0x00001766,0x000200f9, 9550x0000016c,0x00001927,0x0000192f,0x0000016b,
8890x00001768,0x000200f8,0x00001768,0x000700f5, 9560x0000016b,0x0005003e,0x00001927,0x000018a8,
8900x0000002f,0x00001769,0x0000175e,0x0000174f,
8910x00001767,0x00001760,0x000500c7,0x00000006,
8920x0000176d,0x00005b76,0x00005b71,0x000500aa,
8930x0000002f,0x0000176e,0x0000176d,0x0000012b,
8940x000500a4,0x0000002f,0x0000176f,0x00001769,
8950x0000176e,0x000300f7,0x0000177d,0x00000000,
8960x000400fa,0x0000176f,0x00001770,0x0000177d,
8970x000200f8,0x00001770,0x0003003e,0x00001751,
8980x00001755,0x0003003e,0x00001754,0x00001752,
8990x0003003e,0x00001757,0x0000175b,0x0003003e,
9000x0000175a,0x00001758,0x000200f9,0x0000177d,
9010x000200f8,0x0000177d,0x000200f9,0x0000177e,
9020x000200f8,0x0000177e,0x000200f9,0x0000177f,
9030x000200f8,0x0000177f,0x00050080,0x00000006,
9040x00001781,0x00005b76,0x0000018b,0x000200f9,
9050x00001743,0x000200f8,0x00001782,0x000400e0,
9060x00000247,0x00000247,0x00000850,0x000200f9,
9070x00001783,0x000200f8,0x00001783,0x000500c2,
9080x00000006,0x00001785,0x00005b74,0x0000022b,
9090x000200f9,0x0000173d,0x000200f8,0x00001786,
9100x000200f9,0x00001787,0x000200f8,0x00001787,
9110x000500c4,0x00000006,0x00001789,0x00005b71,
9120x0000022b,0x000200f9,0x00001735,0x000200f8,
9130x0000178a,0x000200f9,0x0000178c,0x000200f8,
9140x0000178c,0x000700f5,0x00000006,0x00005b73,
9150x00001215,0x0000178a,0x000017a8,0x00001791,
9160x000500b0,0x0000002f,0x00001790,0x00005b73,
9170x000016ff,0x000400f6,0x000017a9,0x00001791,
9180x00000000,0x000400fa,0x00001790,0x00001791,
9190x000017a9,0x000200f8,0x00001791,0x00050084,
9200x00000006,0x00001794,0x000000df,0x00005b73,
9210x00050080,0x00000006,0x00001795,0x0000018b,
9220x00001794,0x00050041,0x0000022d,0x00001797,
9230x00000180,0x0000022b,0x0004003d,0x00000007,
9240x00001798,0x00001797,0x00050041,0x00000838,
9250x00001799,0x00000825,0x00005b73,0x0004003d,
9260x00000006,0x0000179a,0x00001799,0x00050051,
9270x00000006,0x0000180b,0x00001798,0x00000000,
9280x00050095,0x00000130,0x0000180d,0x0000180b,
9290x00001795,0x00050051,0x00000006,0x0000180e,
9300x0000180d,0x00000001,0x00050051,0x00000006,
9310x0000180f,0x0000180d,0x00000000,0x00050051,
9320x00000006,0x00001812,0x00001798,0x00000001,
9330x00050080,0x00000006,0x00001814,0x00001812,
9340x0000180e,0x00050050,0x00000007,0x00001815,
9350x0000180f,0x00001814,0x0004007c,0x00000014,
9360x00001805,0x00001815,0x00060041,0x0000015f,
9370x000017fd,0x00001805,0x0000015e,0x0000015e,
9380x0005003e,0x000017fd,0x0000179a,0x00000002,
9390x00000004,0x00050084,0x00000006,0x0000181a,
9400x000000df,0x000016ff,0x00050080,0x00000006,
9410x0000181b,0x0000018b,0x0000181a,0x00050080,
9420x00000006,0x0000179f,0x0000181b,0x00001794,
9430x00050041,0x00000838,0x000017a3,0x0000083a,
9440x00005b73,0x0004003d,0x00000006,0x000017a4,
9450x000017a3,0x00050095,0x00000130,0x00001833,
9460x0000180b,0x0000179f,0x00050051,0x00000006,
9470x00001834,0x00001833,0x00000001,0x00050051,
9480x00000006,0x00001835,0x00001833,0x00000000,
9490x00050080,0x00000006,0x0000183a,0x00001812,
9500x00001834,0x00050050,0x00000007,0x0000183b,
9510x00001835,0x0000183a,0x0004007c,0x00000014,
9520x0000182b,0x0000183b,0x00060041,0x0000015f,
9530x00001823,0x0000182b,0x0000015e,0x0000015e,
9540x0005003e,0x00001823,0x000017a4,0x00000002,
9550x00000004,0x00050080,0x00000006,0x000017a8,
9560x00005b73,0x0000018b,0x000200f9,0x0000178c,
9570x000200f8,0x000017a9,0x000200f9,0x000012fe,
9580x000200f8,0x00001212,0x000500aa,0x0000002f,
9590x0000121b,0x000011e0,0x0000121a,0x000300f7,
9600x0000121d,0x00000000,0x000400fa,0x0000121b,
9610x0000121c,0x0000121d,0x000200f8,0x0000121c,
9620x00050041,0x000011dc,0x0000121f,0x000011e4,
9630x0000012b,0x0004003d,0x00000006,0x00001220,
9640x0000121f,0x00050041,0x000011dc,0x00001222,
9650x000011e5,0x0000012b,0x0004003d,0x00000006,
9660x00001223,0x00001222,0x000500aa,0x0000002f,
9670x0000184f,0x00001223,0x0000012b,0x000300f7,
9680x00001851,0x00000000,0x000400fa,0x0000184f,
9690x00001850,0x00001851,0x000200f8,0x00001850,
9700x0003003e,0x00000d70,0x0000012b,0x000200f9,
9710x00001851,0x000200f8,0x00001851,0x000400e0,
9720x00000247,0x00000247,0x00000850,0x00050084,
9730x00000006,0x00001853,0x00001220,0x00000185,
9740x00050080,0x00000006,0x00001855,0x00001853,
9750x00000185,0x00050041,0x00000182,0x000018a1,
9760x00000180,0x000001b7,0x0004003d,0x00000006,
9770x000018a2,0x000018a1,0x000500ac,0x0000002f,
9780x000018a3,0x000018a2,0x00000135,0x000300f7,
9790x000018a9,0x00000000,0x000400fa,0x000018a3,
9800x000018a4,0x000018a8,0x000200f8,0x000018a8,
9810x000200f9,0x000018a9,0x000200f8,0x000018a4,
9820x00050082,0x00000006,0x000018a7,0x000018a2,
9830x00000135,0x000200f9,0x000018a9,0x000200f8,
9840x000018a9,0x000700f5,0x00000006,0x00005b50,
9850x000018a7,0x000018a4,0x0000012b,0x000018a8,
9860x0007000c,0x00000006,0x00001857,0x00000001,
9870x00000026,0x00001855,0x00005b50,0x00050080,
9880x00000006,0x0000185a,0x00001853,0x00001223,
9890x000200f9,0x0000185b,0x000200f8,0x0000185b,
9900x000700f5,0x00000006,0x00005b51,0x0000185a,
9910x000018a9,0x00001890,0x0000188e,0x000500b0,
9920x0000002f,0x0000185f,0x00005b51,0x00001857,
9930x000400f6,0x00001891,0x0000188e,0x00000000,
9940x000400fa,0x0000185f,0x00001860,0x00001891,
9950x000200f8,0x00001860,0x00050041,0x00000182,
9960x000018d3,0x00000180,0x00000181,0x0004003d,
9970x00000006,0x000018d4,0x000018d3,0x00050084,
9980x00000006,0x000018d5,0x000001a2,0x000018d4,
9990x00050080,0x00000006,0x000018d6,0x0000018b,
10000x000018d5,0x00050080,0x00000006,0x000018dc,
10010x000018d4,0x00005cc3,0x00050086,0x00000006,
10020x000018dd,0x000018dc,0x00000185,0x00050084,
10030x00000006,0x000018cf,0x0000018b,0x000018dd,
10040x00050080,0x00000006,0x000018d0,0x000018d6,
10050x000018cf,0x00050080,0x00000006,0x000018ca,
10060x000018d0,0x000018cf,0x00050084,0x00000006,
10070x000018c3,0x000001b6,0x000018a2,0x00050080,
10080x00000006,0x000018c4,0x000018ca,0x000018c3,
10090x00050041,0x00000182,0x000018ba,0x00000180,
10100x000001cd,0x0004003d,0x00000006,0x000018bb,
10110x000018ba,0x00050084,0x00000006,0x000018bc,
10120x000001cc,0x000018bb,0x00050080,0x00000006,
10130x000018bd,0x000018c4,0x000018bc,0x000300f7,
10140x000018f0,0x00000000,0x000400fa,0x000018a3,
10150x000018eb,0x000018ef,0x000200f8,0x000018ef,
10160x000200f9,0x000018f0,0x000200f8,0x000018eb,
10170x00050082,0x00000006,0x000018ee,0x000018a2,
10180x00000135,0x000200f9,0x000018f0,0x000200f8,
10190x000018f0,0x000700f5,0x00000006,0x00005b57,
10200x000018ee,0x000018eb,0x0000012b,0x000018ef,
10210x00050084,0x00000006,0x000018b5,0x000000df,
10220x00005b57,0x00050080,0x00000006,0x000018b6,
10230x000018bd,0x000018b5,0x000300f7,0x000018fd,
10240x00000000,0x000400fa,0x000018a3,0x000018f8,
10250x000018fc,0x000200f8,0x000018fc,0x000200f9,
10260x000018fd,0x000200f8,0x000018f8,0x00050082,
10270x00000006,0x000018fb,0x000018a2,0x00000135,
10280x000200f9,0x000018fd,0x000200f8,0x000018fd,
10290x000700f5,0x00000006,0x00005b58,0x000018fb,
10300x000018f8,0x0000012b,0x000018fc,0x00050084,
10310x00000006,0x000018af,0x000000df,0x00005b58,
10320x00050080,0x00000006,0x000018b0,0x000018b6,
10330x000018af,0x00050084,0x00000006,0x00001863,
10340x000000df,0x00005b51,0x00050080,0x00000006,
10350x00001864,0x000018b0,0x00001863,0x00050041,
10360x0000022d,0x00001865,0x00000180,0x0000022b,
10370x0004003d,0x00000007,0x00001866,0x00001865,
10380x00050051,0x00000006,0x00001915,0x00001866,
10390x00000000,0x00050095,0x00000130,0x00001917,
10400x00001915,0x00001864,0x00050051,0x00000006,
10410x00001918,0x00001917,0x00000001,0x00050051,
10420x00000006,0x00001919,0x00001917,0x00000000,
10430x00050051,0x00000006,0x0000191c,0x00001866,
10440x00000001,0x00050080,0x00000006,0x0000191e,
10450x0000191c,0x00001918,0x00050050,0x00000007,
10460x0000191f,0x00001919,0x0000191e,0x0004007c,
10470x00000014,0x0000190f,0x0000191f,0x00060041,
10480x0000015f,0x00001906,0x0000190f,0x0000015e,
10490x0000015e,0x0006003d,0x00000006,0x00001907,
10500x00001906,0x00000002,0x00000004,0x000200f9,
10510x00001868,0x000200f8,0x00001868,0x000700f5,
10520x00000006,0x00005b5d,0x0000012b,0x000018fd,
10530x00001871,0x00001879,0x000700f5,0x00000006,
10540x00005b5c,0x0000012b,0x000018fd,0x0000187b,
10550x00001879,0x000700f5,0x00000006,0x00005b5b,
10560x00001907,0x000018fd,0x0000197c,0x00001879,
10570x000500ab,0x0000002f,0x0000186b,0x00005b5b,
10580x00000500,0x000500b0,0x0000002f,0x0000186d,
10590x00005b5c,0x00000309,0x000500a7,0x0000002f,
10600x0000186e,0x0000186b,0x0000186d,0x000400f6,
10610x0000187c,0x00001879,0x00000000,0x000400fa,
10620x0000186e,0x0000186f,0x0000187c,0x000200f8,
10630x0000186f,0x00050080,0x00000006,0x00001871,
10640x00005b5d,0x0000022b,0x000300f7,0x00001965,
10650x00000000,0x000400fa,0x000018a3,0x00001960,
10660x00001964,0x000200f8,0x00001964,0x000200f9,
10670x00001965,0x000200f8,0x00001960,0x00050082,
10680x00000006,0x00001963,0x000018a2,0x00000135,
10690x000200f9,0x00001965,0x000200f8,0x00001965,
10700x000700f5,0x00000006,0x00005b68,0x00001963,
10710x00001960,0x0000012b,0x00001964,0x00050084,
10720x00000006,0x0000192a,0x000000df,0x00005b68,
10730x00050080,0x00000006,0x0000192b,0x000018bd,
10740x0000192a,0x000300f7,0x00001972,0x00000000,
10750x000400fa,0x000018a3,0x0000196d,0x00001971,
10760x000200f8,0x00001971,0x000200f9,0x00001972,
10770x000200f8,0x0000196d,0x00050082,0x00000006,
10780x00001970,0x000018a2,0x00000135,0x000200f9,
10790x00001972,0x000200f8,0x00001972,0x000700f5,
10800x00000006,0x00005b69,0x00001970,0x0000196d,
10810x0000012b,0x00001971,0x00050084,0x00000006,
10820x00001924,0x000000df,0x00005b69,0x00050080,
10830x00000006,0x00001925,0x0000192b,0x00001924,
10840x00050084,0x00000006,0x00001874,0x000000df,
10850x00005b5b,0x00050080,0x00000006,0x00001875,
10860x00001925,0x00001874,0x00050095,0x00000130,
10870x0000198c,0x00001915,0x00001875,0x00050051,
10880x00000006,0x0000198d,0x0000198c,0x00000001,
10890x00050051,0x00000006,0x0000198e,0x0000198c,
10900x00000000,0x00050080,0x00000006,0x00001993,
10910x0000191c,0x0000198d,0x00050050,0x00000007,
10920x00001994,0x0000198e,0x00001993,0x0004007c,
10930x00000014,0x00001984,0x00001994,0x00060041,
10940x0000015f,0x0000197b,0x00001984,0x0000015e,
10950x0000015e,0x0006003d,0x00000006,0x0000197c,
10960x0000197b,0x00000002,0x00000004,0x000200f9,
10970x00001879,0x000200f8,0x00001879,0x00050080,
10980x00000006,0x0000187b,0x00005b5c,0x0000022b,
10990x000200f9,0x00001868,0x000200f8,0x0000187c,
11000x000500c7,0x00000006,0x0000187e,0x00005b5d,
11010x00000135,0x000500aa,0x0000002f,0x0000187f,
11020x0000187e,0x0000012b,0x000600a9,0x00000006,
11030x00001880,0x0000187f,0x00000135,0x0000012b,
11040x000300f7,0x000019e0,0x00000000,0x000400fa,
11050x000018a3,0x000019db,0x000019df,0x000200f8,
11060x000019df,0x000200f9,0x000019e0,0x000200f8,
11070x000019db,0x00050082,0x00000006,0x000019de,
11080x000018a2,0x00000135,0x000200f9,0x000019e0,
11090x000200f8,0x000019e0,0x000700f5,0x00000006,
11100x00005b60,0x000019de,0x000019db,0x0000012b,
11110x000019df,0x00050084,0x00000006,0x000019a5,
11120x000000df,0x00005b60,0x00050080,0x00000006,
11130x000019a6,0x000018bd,0x000019a5,0x000300f7,
11140x000019ed,0x00000000,0x000400fa,0x000018a3,
11150x000019e8,0x000019ec,0x000200f8,0x000019ec,
11160x000200f9,0x000019ed,0x000200f8,0x000019e8,
11170x00050082,0x00000006,0x000019eb,0x000018a2,
11180x00000135,0x000200f9,0x000019ed,0x000200f8,
11190x000019ed,0x000700f5,0x00000006,0x00005b61,
11200x000019eb,0x000019e8,0x0000012b,0x000019ec,
11210x00050084,0x00000006,0x0000199f,0x000000df,
11220x00005b61,0x00050080,0x00000006,0x000019a0,
11230x000019a6,0x0000199f,0x000300f7,0x000019fa,
11240x00000000,0x000400fa,0x000018a3,0x000019f5,
11250x000019f9,0x000200f8,0x000019f9,0x000200f9,
11260x000019fa,0x000200f8,0x000019f5,0x00050082,
11270x00000006,0x000019f8,0x000018a2,0x00000135,
11280x000200f9,0x000019fa,0x000200f8,0x000019fa,
11290x000700f5,0x00000006,0x00005b62,0x000019f8,
11300x000019f5,0x0000012b,0x000019f9,0x00050084,
11310x00000006,0x00001999,0x000000df,0x00005b62,
11320x00050080,0x00000006,0x0000199a,0x000019a0,
11330x00001999,0x00050080,0x00000006,0x00001884,
11340x0000199a,0x00001863,0x00050095,0x00000130,
11350x00001a13,0x00001915,0x00001884,0x00050051,
11360x00000006,0x00001a14,0x00001a13,0x00000001,
11370x00050051,0x00000006,0x00001a15,0x00001a13,
11380x00000000,0x00050080,0x00000006,0x00001a1a,
11390x0000191c,0x00001a14,0x00050050,0x00000007,
11400x00001a1b,0x00001a15,0x00001a1a,0x0004007c,
11410x00000014,0x00001a0b,0x00001a1b,0x00060041,
11420x0000015f,0x00001a03,0x00001a0b,0x0000015e,
11430x0000015e,0x0005003e,0x00001a03,0x00001880,
11440x00000002,0x00000004,0x000300f7,0x0000188d,
11450x00000000,0x000400fa,0x0000187f,0x0000188b,
11460x0000188d,0x000200f8,0x0000188b,0x000700ea,
11470x00000006,0x0000188c,0x00000d70,0x00000135,
11480x0000012b,0x00000135,0x000200f9,0x0000188d,
11490x000200f8,0x0000188d,0x000200f9,0x0000188e,
11500x000200f8,0x0000188e,0x00050080,0x00000006,
11510x00001890,0x00005b51,0x0000018b,0x000200f9,
11520x0000185b,0x000200f8,0x00001891,0x000400e0,
11530x00000247,0x00000247,0x00000850,0x000300f7,
11540x0000189d,0x00000000,0x000400fa,0x0000184f,
11550x00001894,0x0000189d,0x000200f8,0x00001894,
11560x00050041,0x00000182,0x00001a56,0x00000180,
11570x00000181,0x0004003d,0x00000006,0x00001a57,
11580x00001a56,0x00050084,0x00000006,0x00001a58,
11590x000001a2,0x00001a57,0x00050080,0x00000006,
11600x00001a59,0x0000018b,0x00001a58,0x00050080,
11610x00000006,0x00001a5f,0x00001a57,0x00005cc3,
11620x00050086,0x00000006,0x00001a60,0x00001a5f,
11630x00000185,0x00050084,0x00000006,0x00001a52,
11640x0000018b,0x00001a60,0x00050080,0x00000006,
11650x00001a53,0x00001a59,0x00001a52,0x00050080,
11660x00000006,0x00001a4d,0x00001a53,0x00001a52,
11670x00050084,0x00000006,0x00001a46,0x000001b6,
11680x000018a2,0x00050080,0x00000006,0x00001a47,
11690x00001a4d,0x00001a46,0x00050041,0x00000182,
11700x00001a3d,0x00000180,0x000001cd,0x0004003d,
11710x00000006,0x00001a3e,0x00001a3d,0x00050084,
11720x00000006,0x00001a3f,0x000001cc,0x00001a3e,
11730x00050080,0x00000006,0x00001a40,0x00001a47,
11740x00001a3f,0x000300f7,0x00001a73,0x00000000,
11750x000400fa,0x000018a3,0x00001a6e,0x00001a72,
11760x000200f8,0x00001a72,0x000200f9,0x00001a73,
11770x000200f8,0x00001a6e,0x00050082,0x00000006,
11780x00001a71,0x000018a2,0x00000135,0x000200f9,
11790x00001a73,0x000200f8,0x00001a73,0x000700f5,
11800x00000006,0x00005b52,0x00001a71,0x00001a6e,
11810x0000012b,0x00001a72,0x00050084,0x00000006,
11820x00001a38,0x000000df,0x00005b52,0x00050080,
11830x00000006,0x00001a39,0x00001a40,0x00001a38,
11840x000300f7,0x00001a80,0x00000000,0x000400fa,
11850x000018a3,0x00001a7b,0x00001a7f,0x000200f8,
11860x00001a7f,0x000200f9,0x00001a80,0x000200f8,
11870x00001a7b,0x00050082,0x00000006,0x00001a7e,
11880x000018a2,0x00000135,0x000200f9,0x00001a80,
11890x000200f8,0x00001a80,0x000700f5,0x00000006,
11900x00005b53,0x00001a7e,0x00001a7b,0x0000012b,
11910x00001a7f,0x00050084,0x00000006,0x00001a32,
11920x000000df,0x00005b53,0x00050080,0x00000006,
11930x00001a33,0x00001a39,0x00001a32,0x000300f7,
11940x00001a8d,0x00000000,0x000400fa,0x000018a3,
11950x00001a88,0x00001a8c,0x000200f8,0x00001a8c,
11960x000200f9,0x00001a8d,0x000200f8,0x00001a88,
11970x00050082,0x00000006,0x00001a8b,0x000018a2,
11980x00000135,0x000200f9,0x00001a8d,0x000200f8,
11990x00001a8d,0x000700f5,0x00000006,0x00005b54,
12000x00001a8b,0x00001a88,0x0000012b,0x00001a8c,
12010x00050084,0x00000006,0x00001a2c,0x000000df,
12020x00005b54,0x00050080,0x00000006,0x00001a2d,
12030x00001a33,0x00001a2c,0x000300f7,0x00001a9a,
12040x00000000,0x000400fa,0x000018a3,0x00001a95,
12050x00001a99,0x000200f8,0x00001a99,0x000200f9,
12060x00001a9a,0x000200f8,0x00001a95,0x00050082,
12070x00000006,0x00001a98,0x000018a2,0x00000135,
12080x000200f9,0x00001a9a,0x000200f8,0x00001a9a,
12090x000700f5,0x00000006,0x00005b55,0x00001a98,
12100x00001a95,0x0000012b,0x00001a99,0x00050084,
12110x00000006,0x00001a26,0x000000df,0x00005b55,
12120x00050080,0x00000006,0x00001a27,0x00001a2d,
12130x00001a26,0x000300f7,0x00001aa7,0x00000000,
12140x000400fa,0x000018a3,0x00001aa2,0x00001aa6,
12150x000200f8,0x00001aa6,0x000200f9,0x00001aa7,
12160x000200f8,0x00001aa2,0x00050082,0x00000006,
12170x00001aa5,0x000018a2,0x00000135,0x000200f9,
12180x00001aa7,0x000200f8,0x00001aa7,0x000700f5,
12190x00000006,0x00005b56,0x00001aa5,0x00001aa2,
12200x0000012b,0x00001aa6,0x00050084,0x00000006,
12210x00001a20,0x000000df,0x00005b56,0x00050080,
12220x00000006,0x00001a21,0x00001a27,0x00001a20,
12230x00050084,0x00000006,0x00001897,0x000000df,
12240x00001220,0x00050080,0x00000006,0x00001898,
12250x00001a21,0x00001897,0x00050041,0x0000022d,
12260x00001899,0x00000180,0x0000022b,0x0004003d,
12270x00000007,0x0000189a,0x00001899,0x0004003d,
12280x00000006,0x0000189b,0x00000d70,0x00050051,
12290x00000006,0x00001abe,0x0000189a,0x00000000,
12300x00050095,0x00000130,0x00001ac0,0x00001abe,
12310x00001898,0x00050051,0x00000006,0x00001ac1,
12320x00001ac0,0x00000001,0x00050051,0x00000006,
12330x00001ac2,0x00001ac0,0x00000000,0x00050051,
12340x00000006,0x00001ac5,0x0000189a,0x00000001,
12350x00050080,0x00000006,0x00001ac7,0x00001ac5,
12360x00001ac1,0x00050050,0x00000007,0x00001ac8,
12370x00001ac2,0x00001ac7,0x0004007c,0x00000014,
12380x00001ab8,0x00001ac8,0x00060041,0x0000015f,
12390x00001ab0,0x00001ab8,0x0000015e,0x0000015e,
12400x0005003e,0x00001ab0,0x0000189b,0x00000002,
12410x00000004,0x000200f9,0x0000189d,0x000200f8,
12420x0000189d,0x000200f9,0x000012fe,0x000200f8,
12430x0000121d,0x000500aa,0x0000002f,0x00001228,
12440x000011e0,0x0000090f,0x000300f7,0x0000122a,
12450x00000000,0x000400fa,0x00001228,0x00001229,
12460x0000122a,0x000200f8,0x00001229,0x00050041,
12470x00000182,0x00001b03,0x00000180,0x00000181,
12480x0004003d,0x00000006,0x00001b04,0x00001b03,
12490x00050084,0x00000006,0x00001b05,0x000001a2,
12500x00001b04,0x00050080,0x00000006,0x00001b06,
12510x0000018b,0x00001b05,0x00050080,0x00000006,
12520x00001b0c,0x00001b04,0x00005cc3,0x00050086,
12530x00000006,0x00001b0d,0x00001b0c,0x00000185,
12540x00050084,0x00000006,0x00001aff,0x0000018b,
12550x00001b0d,0x00050080,0x00000006,0x00001b00,
12560x00001b06,0x00001aff,0x00050080,0x00000006,
12570x00001afa,0x00001b00,0x00001aff,0x00050041,
12580x00000182,0x00001af1,0x00000180,0x000001b7,
12590x0004003d,0x00000006,0x00001af2,0x00001af1,
12600x00050084,0x00000006,0x00001af3,0x000001b6,
12610x00001af2,0x00050080,0x00000006,0x00001af4,
12620x00001afa,0x00001af3,0x00050041,0x00000182,
12630x00001aea,0x00000180,0x000001cd,0x0004003d,
12640x00000006,0x00001aeb,0x00001aea,0x00050084,
12650x00000006,0x00001aec,0x000001cc,0x00001aeb,
12660x00050080,0x00000006,0x00001aed,0x00001af4,
12670x00001aec,0x000500ac,0x0000002f,0x00001b1a,
12680x00001af2,0x00000135,0x000300f7,0x00001b20,
12690x00000000,0x000400fa,0x00001b1a,0x00001b1b,
12700x00001b1f,0x000200f8,0x00001b1f,0x000200f9,
12710x00001b20,0x000200f8,0x00001b1b,0x00050082,
12720x00000006,0x00001b1e,0x00001af2,0x00000135,
12730x000200f9,0x00001b20,0x000200f8,0x00001b20,
12740x000700f5,0x00000006,0x00005b3e,0x00001b1e,
12750x00001b1b,0x0000012b,0x00001b1f,0x00050084,
12760x00000006,0x00001ae5,0x000000df,0x00005b3e,
12770x00050080,0x00000006,0x00001ae6,0x00001aed,
12780x00001ae5,0x000300f7,0x00001b2d,0x00000000,
12790x000400fa,0x00001b1a,0x00001b28,0x00001b2c,
12800x000200f8,0x00001b2c,0x000200f9,0x00001b2d,
12810x000200f8,0x00001b28,0x00050082,0x00000006,
12820x00001b2b,0x00001af2,0x00000135,0x000200f9,
12830x00001b2d,0x000200f8,0x00001b2d,0x000700f5,
12840x00000006,0x00005b3f,0x00001b2b,0x00001b28,
12850x0000012b,0x00001b2c,0x00050084,0x00000006,
12860x00001adf,0x000000df,0x00005b3f,0x00050080,
12870x00000006,0x00001ae0,0x00001ae6,0x00001adf,
12880x000300f7,0x00001b3a,0x00000000,0x000400fa,
12890x00001b1a,0x00001b35,0x00001b39,0x000200f8,
12900x00001b39,0x000200f9,0x00001b3a,0x000200f8,
12910x00001b35,0x00050082,0x00000006,0x00001b38,
12920x00001af2,0x00000135,0x000200f9,0x00001b3a,
12930x000200f8,0x00001b3a,0x000700f5,0x00000006,
12940x00005b40,0x00001b38,0x00001b35,0x0000012b,
12950x00001b39,0x00050084,0x00000006,0x00001ad9,
12960x000000df,0x00005b40,0x00050080,0x00000006,
12970x00001ada,0x00001ae0,0x00001ad9,0x000300f7,
12980x00001b47,0x00000000,0x000400fa,0x00001b1a,
12990x00001b42,0x00001b46,0x000200f8,0x00001b46,
13000x000200f9,0x00001b47,0x000200f8,0x00001b42,
13010x00050082,0x00000006,0x00001b45,0x00001af2,
13020x00000135,0x000200f9,0x00001b47,0x000200f8,
13030x00001b47,0x000700f5,0x00000006,0x00005b41,
13040x00001b45,0x00001b42,0x0000012b,0x00001b46,
13050x00050084,0x00000006,0x00001ad3,0x000000df,
13060x00005b41,0x00050080,0x00000006,0x00001ad4,
13070x00001ada,0x00001ad3,0x000300f7,0x00001b54,
13080x00000000,0x000400fa,0x00001b1a,0x00001b4f,
13090x00001b53,0x000200f8,0x00001b53,0x000200f9,
13100x00001b54,0x000200f8,0x00001b4f,0x00050082,
13110x00000006,0x00001b52,0x00001af2,0x00000135,
13120x000200f9,0x00001b54,0x000200f8,0x00001b54,
13130x000700f5,0x00000006,0x00005b42,0x00001b52,
13140x00001b4f,0x0000012b,0x00001b53,0x00050084,
13150x00000006,0x00001acd,0x000000df,0x00005b42,
13160x00050080,0x00000006,0x00001ace,0x00001ad4,
13170x00001acd,0x000300f7,0x00001bb3,0x00000000,
13180x000400fa,0x00001b1a,0x00001bae,0x00001bb2,
13190x000200f8,0x00001bb2,0x000200f9,0x00001bb3,
13200x000200f8,0x00001bae,0x00050082,0x00000006,
13210x00001bb1,0x00001af2,0x00000135,0x000200f9,
13220x00001bb3,0x000200f8,0x00001bb3,0x000700f5,
13230x00000006,0x00005b43,0x00001bb1,0x00001bae,
13240x0000012b,0x00001bb2,0x00050084,0x00000006,
13250x00001b78,0x000000df,0x00005b43,0x00050080,
13260x00000006,0x00001b79,0x00001aed,0x00001b78,
13270x000300f7,0x00001bc0,0x00000000,0x000400fa,
13280x00001b1a,0x00001bbb,0x00001bbf,0x000200f8,
13290x00001bbf,0x000200f9,0x00001bc0,0x000200f8,
13300x00001bbb,0x00050082,0x00000006,0x00001bbe,
13310x00001af2,0x00000135,0x000200f9,0x00001bc0,
13320x000200f8,0x00001bc0,0x000700f5,0x00000006,
13330x00005b44,0x00001bbe,0x00001bbb,0x0000012b,
13340x00001bbf,0x00050084,0x00000006,0x00001b72,
13350x000000df,0x00005b44,0x00050080,0x00000006,
13360x00001b73,0x00001b79,0x00001b72,0x000300f7,
13370x00001bcd,0x00000000,0x000400fa,0x00001b1a,
13380x00001bc8,0x00001bcc,0x000200f8,0x00001bcc,
13390x000200f9,0x00001bcd,0x000200f8,0x00001bc8,
13400x00050082,0x00000006,0x00001bcb,0x00001af2,
13410x00000135,0x000200f9,0x00001bcd,0x000200f8,
13420x00001bcd,0x000700f5,0x00000006,0x00005b45,
13430x00001bcb,0x00001bc8,0x0000012b,0x00001bcc,
13440x00050084,0x00000006,0x00001b6c,0x000000df,
13450x00005b45,0x00050080,0x00000006,0x00001b6d,
13460x00001b73,0x00001b6c,0x000300f7,0x00001bda,
13470x00000000,0x000400fa,0x00001b1a,0x00001bd5,
13480x00001bd9,0x000200f8,0x00001bd9,0x000200f9,
13490x00001bda,0x000200f8,0x00001bd5,0x00050082,
13500x00000006,0x00001bd8,0x00001af2,0x00000135,
13510x000200f9,0x00001bda,0x000200f8,0x00001bda,
13520x000700f5,0x00000006,0x00005b46,0x00001bd8,
13530x00001bd5,0x0000012b,0x00001bd9,0x00050084,
13540x00000006,0x00001b66,0x000000df,0x00005b46,
13550x00050080,0x00000006,0x00001b67,0x00001b6d,
13560x00001b66,0x000300f7,0x00001be7,0x00000000,
13570x000400fa,0x00001b1a,0x00001be2,0x00001be6,
13580x000200f8,0x00001be6,0x000200f9,0x00001be7,
13590x000200f8,0x00001be2,0x00050082,0x00000006,
13600x00001be5,0x00001af2,0x00000135,0x000200f9,
13610x00001be7,0x000200f8,0x00001be7,0x000700f5,
13620x00000006,0x00005b47,0x00001be5,0x00001be2,
13630x0000012b,0x00001be6,0x00050084,0x00000006,
13640x00001b60,0x000000df,0x00005b47,0x00050080,
13650x00000006,0x00001b61,0x00001b67,0x00001b60,
13660x000300f7,0x00001bfa,0x00000000,0x000400fa,
13670x00001b1a,0x00001bf5,0x00001bf9,0x000200f8,
13680x00001bf9,0x000200f9,0x00001bfa,0x000200f8,
13690x00001bf5,0x00050082,0x00000006,0x00001bf8,
13700x00001af2,0x00000135,0x000200f9,0x00001bfa,
13710x000200f8,0x00001bfa,0x000700f5,0x00000006,
13720x00005b48,0x00001bf8,0x00001bf5,0x0000012b,
13730x00001bf9,0x00050080,0x00000006,0x00001bed,
13740x00005b48,0x00005cc3,0x00050086,0x00000006,
13750x00001bee,0x00001bed,0x00000185,0x00050084,
13760x00000006,0x00001b5a,0x000000df,0x00001bee,
13770x00050080,0x00000006,0x00001b5b,0x00001b61,
13780x00001b5a,0x000300f7,0x00001c0d,0x00000000,
13790x000400fa,0x00001b1a,0x00001c08,0x00001c0c,
13800x000200f8,0x00001c0c,0x000200f9,0x00001c0d,
13810x000200f8,0x00001c08,0x00050082,0x00000006,
13820x00001c0b,0x00001af2,0x00000135,0x000200f9,
13830x00001c0d,0x000200f8,0x00001c0d,0x000700f5,
13840x00000006,0x00005b49,0x00001c0b,0x00001c08,
13850x0000012b,0x00001c0c,0x00050080,0x00000006,
13860x00001c00,0x00005b49,0x00005cc3,0x00050086,
13870x00000006,0x00001c01,0x00001c00,0x00000185,
13880x00050041,0x000011dc,0x0000122f,0x000011e5,
13890x0000012b,0x0004003d,0x00000006,0x00001230,
13900x0000122f,0x00050080,0x00000006,0x00001c26,
13910x00001c01,0x00000957,0x00050086,0x00000006,
13920x00001c27,0x00001c26,0x0000018b,0x00050084,
13930x00000006,0x00001c2a,0x00001230,0x00001c27,
13940x0007000c,0x00000006,0x00001c2c,0x00000001,
13950x00000026,0x00001c2a,0x00001c01,0x00050080,
13960x00000006,0x00001c2f,0x00001c2c,0x00001c27,
13970x0007000c,0x00000006,0x00001c31,0x00000001,
13980x00000026,0x00001c2f,0x00001c01,0x000200f9,
13990x00001c33,0x000200f8,0x00001c33,0x000700f5,
14000x00000006,0x00005b4b,0x0000012b,0x00001c0d,
14010x00001c41,0x00001c38,0x000700f5,0x00000006,
14020x00005b4a,0x00001c2c,0x00001c0d,0x00001c44,
14030x00001c38,0x000500b0,0x0000002f,0x00001c37,
14040x00005b4a,0x00001c31,0x000400f6,0x00001c45,
14050x00001c38,0x00000000,0x000400fa,0x00001c37,
14060x00001c38,0x00001c45,0x000200f8,0x00001c38,
14070x00050084,0x00000006,0x00001c3b,0x000000df,
14080x00005b4a,0x00050080,0x00000006,0x00001c3c,
14090x00001ace,0x00001c3b,0x00050041,0x0000022d,
14100x00001c3d,0x00000180,0x0000022b,0x0004003d,
14110x00000007,0x00001c3e,0x00001c3d,0x00050051,
14120x00000006,0x00001c9e,0x00001c3e,0x00000000,
14130x00050095,0x00000130,0x00001ca0,0x00001c9e,
14140x00001c3c,0x00050051,0x00000006,0x00001ca1,
14150x00001ca0,0x00000001,0x00050051,0x00000006,
14160x00001ca2,0x00001ca0,0x00000000,0x00050051,
14170x00000006,0x00001ca5,0x00001c3e,0x00000001,
14180x00050080,0x00000006,0x00001ca7,0x00001ca5,
14190x00001ca1,0x00050050,0x00000007,0x00001ca8,
14200x00001ca2,0x00001ca7,0x0004007c,0x00000014,
14210x00001c98,0x00001ca8,0x00060041,0x0000015f,
14220x00001c8f,0x00001c98,0x0000015e,0x0000015e,
14230x0006003d,0x00000006,0x00001c90,0x00001c8f,
14240x00000002,0x00000004,0x00050080,0x00000006, 9570x00000002,0x00000004,0x00050080,0x00000006,
14250x00001c41,0x00005b4b,0x00001c90,0x00050080, 9580x000018ac,0x00005fa3,0x000001c4,0x000200f9,
14260x00000006,0x00001c44,0x00005b4a,0x0000022b, 9590x00001890,0x000200f8,0x000018ad,0x000200f9,
14270x000200f9,0x00001c33,0x000200f8,0x00001c45, 9600x000013fd,0x000200f8,0x00001311,0x000500aa,
14280x00050041,0x00000838,0x00001c48,0x00000980, 9610x0000002f,0x0000131a,0x000012df,0x00001319,
14290x00001230,0x0003003e,0x00001c48,0x00005b4b, 9620x000300f7,0x0000131c,0x00000000,0x000400fa,
14300x000400e0,0x00000247,0x00000247,0x00000850, 9630x0000131a,0x0000131b,0x0000131c,0x000200f8,
14310x000500aa,0x0000002f,0x00001c4a,0x00001230, 9640x0000131b,0x00050041,0x000012db,0x0000131e,
14320x0000012b,0x000300f7,0x00001c67,0x00000000, 9650x000012e3,0x00000138,0x0004003d,0x00000006,
14330x000400fa,0x00001c4a,0x00001c4b,0x00001c67, 9660x0000131f,0x0000131e,0x00050041,0x000012db,
14340x000200f8,0x00001c4b,0x000200f9,0x00001c4c, 9670x00001321,0x000012e4,0x00000138,0x0004003d,
14350x000200f8,0x00001c4c,0x000700f5,0x00000006, 9680x00000006,0x00001322,0x00001321,0x000500aa,
14360x00005b4d,0x0000012b,0x00001c4b,0x00001c59, 9690x0000002f,0x00001953,0x00001322,0x00000138,
14370x00001c50,0x000700f5,0x00000006,0x00005b4c, 9700x000300f7,0x00001955,0x00000000,0x000400fa,
14380x0000012b,0x00001c4b,0x00001c5c,0x00001c50, 9710x00001953,0x00001954,0x00001955,0x000200f8,
14390x000500b0,0x0000002f,0x00001c4f,0x00005b4c, 9720x00001954,0x0003003e,0x00000e6f,0x00000138,
14400x0000018b,0x000400f6,0x00001c5d,0x00001c50, 9730x000200f9,0x00001955,0x000200f8,0x00001955,
14410x00000000,0x000400fa,0x00001c4f,0x00001c50, 9740x000400e0,0x00000280,0x00000280,0x0000094f,
14420x00001c5d,0x000200f8,0x00001c50,0x00050041, 9750x00050084,0x00000006,0x00001957,0x0000131f,
14430x00000838,0x00001c52,0x00000980,0x00005b4c, 9760x000001be,0x00050080,0x00000006,0x00001959,
14440x0004003d,0x00000006,0x00001c53,0x00001c52, 9770x00001957,0x000001be,0x00050041,0x000001bb,
14450x0003003e,0x00001c52,0x00005b4d,0x00050080, 9780x000019a5,0x000001b9,0x000001f0,0x0004003d,
14460x00000006,0x00001c59,0x00005b4d,0x00001c53, 9790x00000006,0x000019a6,0x000019a5,0x000500ac,
14470x00050080,0x00000006,0x00001c5c,0x00005b4c, 9800x0000002f,0x000019a7,0x000019a6,0x00000142,
14480x0000022b,0x000200f9,0x00001c4c,0x000200f8, 9810x000300f7,0x000019ad,0x00000000,0x000400fa,
14490x00001c5d,0x00050041,0x0000022d,0x00001c61, 9820x000019a7,0x000019a8,0x000019ac,0x000200f8,
14500x00000180,0x0000022b,0x0004003d,0x00000007, 9830x000019ac,0x000200f9,0x000019ad,0x000200f8,
14510x00001c62,0x00001c61,0x00050051,0x00000006, 9840x000019a8,0x00050082,0x00000006,0x000019ab,
14520x00001cbe,0x00001c62,0x00000000,0x00050095, 9850x000019a6,0x00000142,0x000200f9,0x000019ad,
14530x00000130,0x00001cc0,0x00001cbe,0x000001b6, 9860x000200f8,0x000019ad,0x000700f5,0x00000006,
14540x00050051,0x00000006,0x00001cc1,0x00001cc0, 9870x00005f80,0x000019ab,0x000019a8,0x00000138,
14550x00000001,0x00050051,0x00000006,0x00001cc2, 9880x000019ac,0x0007000c,0x00000006,0x0000195b,
14560x00001cc0,0x00000000,0x00050051,0x00000006, 9890x00000001,0x00000026,0x00001959,0x00005f80,
14570x00001cc5,0x00001c62,0x00000001,0x00050080, 9900x00050080,0x00000006,0x0000195e,0x00001957,
14580x00000006,0x00001cc7,0x00001cc5,0x00001cc1, 9910x00001322,0x000200f9,0x0000195f,0x000200f8,
14590x00050050,0x00000007,0x00001cc8,0x00001cc2, 9920x0000195f,0x000700f5,0x00000006,0x00005f81,
14600x00001cc7,0x0004007c,0x00000014,0x00001cb8, 9930x0000195e,0x000019ad,0x00001994,0x00001992,
14610x00001cc8,0x00060041,0x0000015f,0x00001cb0, 9940x000500b0,0x0000002f,0x00001963,0x00005f81,
14620x00001cb8,0x0000015e,0x0000015e,0x0005003e, 9950x0000195b,0x000400f6,0x00001995,0x00001992,
14630x00001cb0,0x00005b4d,0x00000002,0x00000004, 9960x00000000,0x000400fa,0x00001963,0x00001964,
14640x000200f9,0x00001c67,0x000200f8,0x00001c67, 9970x00001995,0x000200f8,0x00001964,0x00050041,
14650x000400e0,0x00000247,0x00000247,0x00000850, 9980x000001bb,0x000019d7,0x000001b9,0x000001ba,
14660x0004003d,0x00000006,0x00001c6a,0x00001c48, 9990x0004003d,0x00000006,0x000019d8,0x000019d7,
14670x000200f9,0x00001c6c,0x000200f8,0x00001c6c, 10000x00050084,0x00000006,0x000019d9,0x000001db,
14680x000700f5,0x00000006,0x00005b4f,0x00001c6a, 10010x000019d8,0x00050080,0x00000006,0x000019da,
14690x00001c67,0x00001c83,0x00001c71,0x000700f5, 10020x000001c4,0x000019d9,0x00050080,0x00000006,
14700x00000006,0x00005b4e,0x00001c2c,0x00001c67, 10030x000019e0,0x000019d8,0x0000062f,0x00050086,
14710x00001c86,0x00001c71,0x000500b0,0x0000002f, 10040x00000006,0x000019e1,0x000019e0,0x000001be,
14720x00001c70,0x00005b4e,0x00001c31,0x000400f6, 10050x00050084,0x00000006,0x000019d3,0x000001c4,
14730x00001c87,0x00001c71,0x00000000,0x000400fa, 10060x000019e1,0x00050080,0x00000006,0x000019d4,
14740x00001c70,0x00001c71,0x00001c87,0x000200f8, 10070x000019da,0x000019d3,0x00050080,0x00000006,
14750x00001c71,0x00050084,0x00000006,0x00001c74, 10080x000019ce,0x000019d4,0x000019d3,0x00050084,
14760x000000df,0x00005b4e,0x00050080,0x00000006, 10090x00000006,0x000019c7,0x000001ef,0x000019a6,
14770x00001c75,0x00001ace,0x00001c74,0x00050041, 10100x00050080,0x00000006,0x000019c8,0x000019ce,
14780x0000022d,0x00001c76,0x00000180,0x0000022b, 10110x000019c7,0x00050041,0x000001bb,0x000019be,
14790x0004003d,0x00000007,0x00001c77,0x00001c76, 10120x000001b9,0x00000206,0x0004003d,0x00000006,
14800x00050051,0x00000006,0x00001cdf,0x00001c77, 10130x000019bf,0x000019be,0x00050084,0x00000006,
14810x00000000,0x00050095,0x00000130,0x00001ce1, 10140x000019c0,0x00000205,0x000019bf,0x00050080,
14820x00001cdf,0x00001c75,0x00050051,0x00000006, 10150x00000006,0x000019c1,0x000019c8,0x000019c0,
14830x00001ce2,0x00001ce1,0x00000001,0x00050051, 10160x000300f7,0x000019f4,0x00000000,0x000400fa,
14840x00000006,0x00001ce3,0x00001ce1,0x00000000, 10170x000019a7,0x000019ef,0x000019f3,0x000200f8,
14850x00050051,0x00000006,0x00001ce6,0x00001c77, 10180x000019f3,0x000200f9,0x000019f4,0x000200f8,
14860x00000001,0x00050080,0x00000006,0x00001ce8, 10190x000019ef,0x00050082,0x00000006,0x000019f2,
14870x00001ce6,0x00001ce2,0x00050050,0x00000007, 10200x000019a6,0x00000142,0x000200f9,0x000019f4,
14880x00001ce9,0x00001ce3,0x00001ce8,0x0004007c, 10210x000200f8,0x000019f4,0x000700f5,0x00000006,
14890x00000014,0x00001cd9,0x00001ce9,0x00060041, 10220x00005f87,0x000019f2,0x000019ef,0x00000138,
14900x0000015f,0x00001cd0,0x00001cd9,0x0000015e, 10230x000019f3,0x00050084,0x00000006,0x000019b9,
14910x0000015e,0x0006003d,0x00000006,0x00001cd1, 10240x000000ec,0x00005f87,0x00050080,0x00000006,
14920x00001cd0,0x00000002,0x00000004,0x00050080, 10250x000019ba,0x000019c1,0x000019b9,0x000300f7,
14930x00000006,0x00001c7c,0x00001b5b,0x00001c74, 10260x00001a01,0x00000000,0x000400fa,0x000019a7,
14940x00050095,0x00000130,0x00001d01,0x00001cdf, 10270x000019fc,0x00001a00,0x000200f8,0x00001a00,
14950x00001c7c,0x00050051,0x00000006,0x00001d02, 10280x000200f9,0x00001a01,0x000200f8,0x000019fc,
14960x00001d01,0x00000001,0x00050051,0x00000006, 10290x00050082,0x00000006,0x000019ff,0x000019a6,
14970x00001d03,0x00001d01,0x00000000,0x00050080, 10300x00000142,0x000200f9,0x00001a01,0x000200f8,
14980x00000006,0x00001d08,0x00001ce6,0x00001d02, 10310x00001a01,0x000700f5,0x00000006,0x00005f88,
14990x00050050,0x00000007,0x00001d09,0x00001d03, 10320x000019ff,0x000019fc,0x00000138,0x00001a00,
15000x00001d08,0x0004007c,0x00000014,0x00001cf9, 10330x00050084,0x00000006,0x000019b3,0x000000ec,
15010x00001d09,0x00060041,0x0000015f,0x00001cf1, 10340x00005f88,0x00050080,0x00000006,0x000019b4,
15020x00001cf9,0x0000015e,0x0000015e,0x0005003e, 10350x000019ba,0x000019b3,0x00050084,0x00000006,
15030x00001cf1,0x00005b4f,0x00000002,0x00000004, 10360x00001967,0x000000ec,0x00005f81,0x00050080,
15040x00050080,0x00000006,0x00001c83,0x00005b4f, 10370x00000006,0x00001968,0x000019b4,0x00001967,
15050x00001cd1,0x00050080,0x00000006,0x00001c86, 10380x00050041,0x00000266,0x00001969,0x000001b9,
15060x00005b4e,0x0000022b,0x000200f9,0x00001c6c, 10390x00000264,0x0004003d,0x00000007,0x0000196a,
15070x000200f8,0x00001c87,0x000200f9,0x000012fe, 10400x00001969,0x00050051,0x00000006,0x00001a19,
15080x000200f8,0x0000122a,0x000500aa,0x0000002f, 10410x0000196a,0x00000000,0x00050095,0x0000013d,
15090x00001239,0x000011e0,0x000001a2,0x000300f7, 10420x00001a1b,0x00001a19,0x00001968,0x00050051,
15100x0000123b,0x00000000,0x000400fa,0x00001239, 10430x00000006,0x00001a1c,0x00001a1b,0x00000001,
15110x0000123a,0x0000123b,0x000200f8,0x0000123a, 10440x00050051,0x00000006,0x00001a1d,0x00001a1b,
15120x00050041,0x000011dc,0x0000123d,0x000011e4, 10450x00000000,0x00050051,0x00000006,0x00001a20,
15130x0000012b,0x0004003d,0x00000006,0x0000123e, 10460x0000196a,0x00000001,0x00050080,0x00000006,
15140x0000123d,0x00050041,0x000011dc,0x00001240, 10470x00001a22,0x00001a20,0x00001a1c,0x00050050,
15150x000011e5,0x0000012b,0x0004003d,0x00000006, 10480x00000007,0x00001a23,0x00001a1d,0x00001a22,
15160x00001241,0x00001240,0x00050041,0x00000182, 10490x0004007c,0x00000014,0x00001a13,0x00001a23,
15170x00001db8,0x00000180,0x00000181,0x0004003d, 10500x00060041,0x0000016c,0x00001a0a,0x00001a13,
15180x00000006,0x00001db9,0x00001db8,0x00050084, 10510x0000016b,0x0000016b,0x0006003d,0x00000006,
15190x00000006,0x00001dba,0x000001a2,0x00001db9, 10520x00001a0b,0x00001a0a,0x00000002,0x00000004,
15200x00050080,0x00000006,0x00001dbb,0x0000018b, 10530x000200f9,0x0000196c,0x000200f8,0x0000196c,
15210x00001dba,0x00050080,0x00000006,0x00001dc1, 10540x000700f5,0x00000006,0x00005f8d,0x00000138,
15220x00001db9,0x00005cc3,0x00050086,0x00000006, 10550x00001a01,0x00001975,0x0000197d,0x000700f5,
15230x00001dc2,0x00001dc1,0x00000185,0x00050084, 10560x00000006,0x00005f8c,0x00000138,0x00001a01,
15240x00000006,0x00001db4,0x0000018b,0x00001dc2, 10570x0000197f,0x0000197d,0x000700f5,0x00000006,
15250x00050080,0x00000006,0x00001db5,0x00001dbb, 10580x00005f8b,0x00001a0b,0x00001a01,0x00001a80,
15260x00001db4,0x00050080,0x00000006,0x00001daf, 10590x0000197d,0x000500ab,0x0000002f,0x0000196f,
15270x00001db5,0x00001db4,0x00050041,0x00000182, 10600x00005f8b,0x00000539,0x000500b0,0x0000002f,
15280x00001da6,0x00000180,0x000001b7,0x0004003d, 10610x00001971,0x00005f8c,0x00000342,0x000500a7,
15290x00000006,0x00001da7,0x00001da6,0x00050084, 10620x0000002f,0x00001972,0x0000196f,0x00001971,
15300x00000006,0x00001da8,0x000001b6,0x00001da7, 10630x000400f6,0x00001980,0x0000197d,0x00000000,
15310x00050080,0x00000006,0x00001da9,0x00001daf, 10640x000400fa,0x00001972,0x00001973,0x00001980,
15320x00001da8,0x00050041,0x00000182,0x00001d9f, 10650x000200f8,0x00001973,0x00050080,0x00000006,
15330x00000180,0x000001cd,0x0004003d,0x00000006, 10660x00001975,0x00005f8d,0x00000264,0x000300f7,
15340x00001da0,0x00001d9f,0x00050084,0x00000006, 10670x00001a69,0x00000000,0x000400fa,0x000019a7,
15350x00001da1,0x000001cc,0x00001da0,0x00050080, 10680x00001a64,0x00001a68,0x000200f8,0x00001a68,
15360x00000006,0x00001da2,0x00001da9,0x00001da1, 10690x000200f9,0x00001a69,0x000200f8,0x00001a64,
15370x000500ac,0x0000002f,0x00001dcf,0x00001da7, 10700x00050082,0x00000006,0x00001a67,0x000019a6,
15380x00000135,0x000300f7,0x00001dd5,0x00000000, 10710x00000142,0x000200f9,0x00001a69,0x000200f8,
15390x000400fa,0x00001dcf,0x00001dd0,0x00001dd4, 10720x00001a69,0x000700f5,0x00000006,0x00005f98,
15400x000200f8,0x00001dd4,0x000200f9,0x00001dd5, 10730x00001a67,0x00001a64,0x00000138,0x00001a68,
15410x000200f8,0x00001dd0,0x00050082,0x00000006, 10740x00050084,0x00000006,0x00001a2e,0x000000ec,
15420x00001dd3,0x00001da7,0x00000135,0x000200f9, 10750x00005f98,0x00050080,0x00000006,0x00001a2f,
15430x00001dd5,0x000200f8,0x00001dd5,0x000700f5, 10760x000019c1,0x00001a2e,0x000300f7,0x00001a76,
15440x00000006,0x00005b15,0x00001dd3,0x00001dd0, 10770x00000000,0x000400fa,0x000019a7,0x00001a71,
15450x0000012b,0x00001dd4,0x00050084,0x00000006, 10780x00001a75,0x000200f8,0x00001a75,0x000200f9,
15460x00001d9a,0x000000df,0x00005b15,0x00050080, 10790x00001a76,0x000200f8,0x00001a71,0x00050082,
15470x00000006,0x00001d9b,0x00001da2,0x00001d9a, 10800x00000006,0x00001a74,0x000019a6,0x00000142,
15480x000300f7,0x00001de2,0x00000000,0x000400fa, 10810x000200f9,0x00001a76,0x000200f8,0x00001a76,
15490x00001dcf,0x00001ddd,0x00001de1,0x000200f8, 10820x000700f5,0x00000006,0x00005f99,0x00001a74,
15500x00001de1,0x000200f9,0x00001de2,0x000200f8, 10830x00001a71,0x00000138,0x00001a75,0x00050084,
15510x00001ddd,0x00050082,0x00000006,0x00001de0, 10840x00000006,0x00001a28,0x000000ec,0x00005f99,
15520x00001da7,0x00000135,0x000200f9,0x00001de2, 10850x00050080,0x00000006,0x00001a29,0x00001a2f,
15530x000200f8,0x00001de2,0x000700f5,0x00000006, 10860x00001a28,0x00050084,0x00000006,0x00001978,
15540x00005b16,0x00001de0,0x00001ddd,0x0000012b, 10870x000000ec,0x00005f8b,0x00050080,0x00000006,
15550x00001de1,0x00050084,0x00000006,0x00001d94, 10880x00001979,0x00001a29,0x00001978,0x00050095,
15560x000000df,0x00005b16,0x00050080,0x00000006, 10890x0000013d,0x00001a90,0x00001a19,0x00001979,
15570x00001d95,0x00001d9b,0x00001d94,0x000300f7, 10900x00050051,0x00000006,0x00001a91,0x00001a90,
15580x00001def,0x00000000,0x000400fa,0x00001dcf, 10910x00000001,0x00050051,0x00000006,0x00001a92,
15590x00001dea,0x00001dee,0x000200f8,0x00001dee, 10920x00001a90,0x00000000,0x00050080,0x00000006,
15600x000200f9,0x00001def,0x000200f8,0x00001dea, 10930x00001a97,0x00001a20,0x00001a91,0x00050050,
15610x00050082,0x00000006,0x00001ded,0x00001da7, 10940x00000007,0x00001a98,0x00001a92,0x00001a97,
15620x00000135,0x000200f9,0x00001def,0x000200f8, 10950x0004007c,0x00000014,0x00001a88,0x00001a98,
15630x00001def,0x000700f5,0x00000006,0x00005b17, 10960x00060041,0x0000016c,0x00001a7f,0x00001a88,
15640x00001ded,0x00001dea,0x0000012b,0x00001dee, 10970x0000016b,0x0000016b,0x0006003d,0x00000006,
15650x00050084,0x00000006,0x00001d8e,0x000000df, 10980x00001a80,0x00001a7f,0x00000002,0x00000004,
15660x00005b17,0x00050080,0x00000006,0x00001d8f, 10990x000200f9,0x0000197d,0x000200f8,0x0000197d,
15670x00001d95,0x00001d8e,0x000300f7,0x00001dfc, 11000x00050080,0x00000006,0x0000197f,0x00005f8c,
15680x00000000,0x000400fa,0x00001dcf,0x00001df7, 11010x00000264,0x000200f9,0x0000196c,0x000200f8,
15690x00001dfb,0x000200f8,0x00001dfb,0x000200f9, 11020x00001980,0x000500c7,0x00000006,0x00001982,
15700x00001dfc,0x000200f8,0x00001df7,0x00050082, 11030x00005f8d,0x00000142,0x000500aa,0x0000002f,
15710x00000006,0x00001dfa,0x00001da7,0x00000135, 11040x00001983,0x00001982,0x00000138,0x000600a9,
15720x000200f9,0x00001dfc,0x000200f8,0x00001dfc, 11050x00000006,0x00001984,0x00001983,0x00000142,
15730x000700f5,0x00000006,0x00005b18,0x00001dfa, 11060x00000138,0x000300f7,0x00001ae4,0x00000000,
15740x00001df7,0x0000012b,0x00001dfb,0x00050084, 11070x000400fa,0x000019a7,0x00001adf,0x00001ae3,
15750x00000006,0x00001d88,0x000000df,0x00005b18, 11080x000200f8,0x00001ae3,0x000200f9,0x00001ae4,
15760x00050080,0x00000006,0x00001d89,0x00001d8f, 11090x000200f8,0x00001adf,0x00050082,0x00000006,
15770x00001d88,0x000300f7,0x00001e09,0x00000000, 11100x00001ae2,0x000019a6,0x00000142,0x000200f9,
15780x000400fa,0x00001dcf,0x00001e04,0x00001e08, 11110x00001ae4,0x000200f8,0x00001ae4,0x000700f5,
15790x000200f8,0x00001e08,0x000200f9,0x00001e09, 11120x00000006,0x00005f90,0x00001ae2,0x00001adf,
15800x000200f8,0x00001e04,0x00050082,0x00000006, 11130x00000138,0x00001ae3,0x00050084,0x00000006,
15810x00001e07,0x00001da7,0x00000135,0x000200f9, 11140x00001aa9,0x000000ec,0x00005f90,0x00050080,
15820x00001e09,0x000200f8,0x00001e09,0x000700f5, 11150x00000006,0x00001aaa,0x000019c1,0x00001aa9,
15830x00000006,0x00005b19,0x00001e07,0x00001e04, 11160x000300f7,0x00001af1,0x00000000,0x000400fa,
15840x0000012b,0x00001e08,0x00050084,0x00000006, 11170x000019a7,0x00001aec,0x00001af0,0x000200f8,
15850x00001d82,0x000000df,0x00005b19,0x00050080, 11180x00001af0,0x000200f9,0x00001af1,0x000200f8,
15860x00000006,0x00001d83,0x00001d89,0x00001d82, 11190x00001aec,0x00050082,0x00000006,0x00001aef,
15870x000300f7,0x00001e1c,0x00000000,0x000400fa, 11200x000019a6,0x00000142,0x000200f9,0x00001af1,
15880x00001dcf,0x00001e17,0x00001e1b,0x000200f8, 11210x000200f8,0x00001af1,0x000700f5,0x00000006,
15890x00001e1b,0x000200f9,0x00001e1c,0x000200f8, 11220x00005f91,0x00001aef,0x00001aec,0x00000138,
15900x00001e17,0x00050082,0x00000006,0x00001e1a, 11230x00001af0,0x00050084,0x00000006,0x00001aa3,
15910x00001da7,0x00000135,0x000200f9,0x00001e1c, 11240x000000ec,0x00005f91,0x00050080,0x00000006,
15920x000200f8,0x00001e1c,0x000700f5,0x00000006, 11250x00001aa4,0x00001aaa,0x00001aa3,0x000300f7,
15930x00005b1a,0x00001e1a,0x00001e17,0x0000012b, 11260x00001afe,0x00000000,0x000400fa,0x000019a7,
15940x00001e1b,0x00050080,0x00000006,0x00001e0f, 11270x00001af9,0x00001afd,0x000200f8,0x00001afd,
15950x00005b1a,0x00005cc3,0x00050086,0x00000006, 11280x000200f9,0x00001afe,0x000200f8,0x00001af9,
15960x00001e10,0x00001e0f,0x00000185,0x00050084, 11290x00050082,0x00000006,0x00001afc,0x000019a6,
15970x00000006,0x00001d7c,0x000000df,0x00001e10, 11300x00000142,0x000200f9,0x00001afe,0x000200f8,
15980x00050080,0x00000006,0x00001d7d,0x00001d83, 11310x00001afe,0x000700f5,0x00000006,0x00005f92,
15990x00001d7c,0x00050084,0x00000006,0x00001d1e, 11320x00001afc,0x00001af9,0x00000138,0x00001afd,
16000x000000df,0x0000123e,0x00050080,0x00000006, 11330x00050084,0x00000006,0x00001a9d,0x000000ec,
16010x00001d1f,0x00001d7d,0x00001d1e,0x00050041, 11340x00005f92,0x00050080,0x00000006,0x00001a9e,
16020x0000022d,0x00001d20,0x00000180,0x0000022b, 11350x00001aa4,0x00001a9d,0x00050080,0x00000006,
16030x0004003d,0x00000007,0x00001d21,0x00001d20, 11360x00001988,0x00001a9e,0x00001967,0x00050095,
16040x00050051,0x00000006,0x00001e34,0x00001d21, 11370x0000013d,0x00001b17,0x00001a19,0x00001988,
16050x00000000,0x00050095,0x00000130,0x00001e36, 11380x00050051,0x00000006,0x00001b18,0x00001b17,
16060x00001e34,0x00001d1f,0x00050051,0x00000006, 11390x00000001,0x00050051,0x00000006,0x00001b19,
16070x00001e37,0x00001e36,0x00000001,0x00050051, 11400x00001b17,0x00000000,0x00050080,0x00000006,
16080x00000006,0x00001e38,0x00001e36,0x00000000, 11410x00001b1e,0x00001a20,0x00001b18,0x00050050,
16090x00050051,0x00000006,0x00001e3b,0x00001d21, 11420x00000007,0x00001b1f,0x00001b19,0x00001b1e,
16100x00000001,0x00050080,0x00000006,0x00001e3d, 11430x0004007c,0x00000014,0x00001b0f,0x00001b1f,
16110x00001e3b,0x00001e37,0x00050050,0x00000007, 11440x00060041,0x0000016c,0x00001b07,0x00001b0f,
16120x00001e3e,0x00001e38,0x00001e3d,0x0004007c, 11450x0000016b,0x0000016b,0x0005003e,0x00001b07,
16130x00000014,0x00001e2e,0x00001e3e,0x00060041, 11460x00001984,0x00000002,0x00000004,0x000300f7,
16140x0000015f,0x00001e25,0x00001e2e,0x0000015e, 11470x00001991,0x00000000,0x000400fa,0x00001983,
16150x0000015e,0x0006003d,0x00000006,0x00001e26, 11480x0000198f,0x00001991,0x000200f8,0x0000198f,
16160x00001e25,0x00000002,0x00000004,0x00050084, 11490x000700ea,0x00000006,0x00001990,0x00000e6f,
16170x00000006,0x00001d24,0x0000123e,0x00000185, 11500x00000142,0x00000138,0x00000142,0x000200f9,
16180x00050080,0x00000006,0x00001d26,0x00001d24, 11510x00001991,0x000200f8,0x00001991,0x000200f9,
16190x00000185,0x000300f7,0x00001e4a,0x00000000, 11520x00001992,0x000200f8,0x00001992,0x00050080,
16200x000400fa,0x00001dcf,0x00001e45,0x00001e49, 11530x00000006,0x00001994,0x00005f81,0x000001c4,
16210x000200f8,0x00001e49,0x000200f9,0x00001e4a, 11540x000200f9,0x0000195f,0x000200f8,0x00001995,
16220x000200f8,0x00001e45,0x00050082,0x00000006, 11550x000400e0,0x00000280,0x00000280,0x0000094f,
16230x00001e48,0x00001da7,0x00000135,0x000200f9, 11560x000300f7,0x000019a1,0x00000000,0x000400fa,
16240x00001e4a,0x000200f8,0x00001e4a,0x000700f5, 11570x00001953,0x00001998,0x000019a1,0x000200f8,
16250x00000006,0x00005b1b,0x00001e48,0x00001e45, 11580x00001998,0x00050041,0x000001bb,0x00001b5a,
16260x0000012b,0x00001e49,0x0007000c,0x00000006, 11590x000001b9,0x000001ba,0x0004003d,0x00000006,
16270x00001d28,0x00000001,0x00000026,0x00001d26, 11600x00001b5b,0x00001b5a,0x00050084,0x00000006,
16280x00005b1b,0x000200f9,0x00001d2a,0x000200f8, 11610x00001b5c,0x000001db,0x00001b5b,0x00050080,
16290x00001d2a,0x000700f5,0x00000006,0x00005b2f, 11620x00000006,0x00001b5d,0x000001c4,0x00001b5c,
16300x00001e26,0x00001e4a,0x00001d73,0x00001d74, 11630x00050080,0x00000006,0x00001b63,0x00001b5b,
16310x000700f5,0x00000006,0x00005b1c,0x00001d24, 11640x0000062f,0x00050086,0x00000006,0x00001b64,
16320x00001e4a,0x00001d76,0x00001d74,0x000500b0, 11650x00001b63,0x000001be,0x00050084,0x00000006,
16330x0000002f,0x00001d2e,0x00005b1c,0x00001d28, 11660x00001b56,0x000001c4,0x00001b64,0x00050080,
16340x000400f6,0x00001d77,0x00001d74,0x00000000, 11670x00000006,0x00001b57,0x00001b5d,0x00001b56,
16350x000400fa,0x00001d2e,0x00001d2f,0x00001d77, 11680x00050080,0x00000006,0x00001b51,0x00001b57,
16360x000200f8,0x00001d2f,0x00050080,0x00000006, 11690x00001b56,0x00050084,0x00000006,0x00001b4a,
16370x00001d32,0x00005b1c,0x00001241,0x000500b0, 11700x000001ef,0x000019a6,0x00050080,0x00000006,
16380x0000002f,0x00001d35,0x00001d32,0x00001d28, 11710x00001b4b,0x00001b51,0x00001b4a,0x00050041,
16390x000300f7,0x00001d3f,0x00000000,0x000400fa, 11720x000001bb,0x00001b41,0x000001b9,0x00000206,
16400x00001d35,0x00001d36,0x00001d3e,0x000200f8, 11730x0004003d,0x00000006,0x00001b42,0x00001b41,
16410x00001d3e,0x000200f9,0x00001d3f,0x000200f8, 11740x00050084,0x00000006,0x00001b43,0x00000205,
16420x00001d36,0x000300f7,0x00001e97,0x00000000, 11750x00001b42,0x00050080,0x00000006,0x00001b44,
16430x000400fa,0x00001dcf,0x00001e92,0x00001e96, 11760x00001b4b,0x00001b43,0x000300f7,0x00001b77,
16440x000200f8,0x00001e96,0x000200f9,0x00001e97, 11770x00000000,0x000400fa,0x000019a7,0x00001b72,
16450x000200f8,0x00001e92,0x00050082,0x00000006, 11780x00001b76,0x000200f8,0x00001b76,0x000200f9,
16460x00001e95,0x00001da7,0x00000135,0x000200f9, 11790x00001b77,0x000200f8,0x00001b72,0x00050082,
16470x00001e97,0x000200f8,0x00001e97,0x000700f5, 11800x00000006,0x00001b75,0x000019a6,0x00000142,
16480x00000006,0x00005b1d,0x00001e95,0x00001e92, 11810x000200f9,0x00001b77,0x000200f8,0x00001b77,
16490x0000012b,0x00001e96,0x00050084,0x00000006, 11820x000700f5,0x00000006,0x00005f82,0x00001b75,
16500x00001e5c,0x000000df,0x00005b1d,0x00050080, 11830x00001b72,0x00000138,0x00001b76,0x00050084,
16510x00000006,0x00001e5d,0x00001da2,0x00001e5c, 11840x00000006,0x00001b3c,0x000000ec,0x00005f82,
16520x000300f7,0x00001ea4,0x00000000,0x000400fa, 11850x00050080,0x00000006,0x00001b3d,0x00001b44,
16530x00001dcf,0x00001e9f,0x00001ea3,0x000200f8, 11860x00001b3c,0x000300f7,0x00001b84,0x00000000,
16540x00001ea3,0x000200f9,0x00001ea4,0x000200f8, 11870x000400fa,0x000019a7,0x00001b7f,0x00001b83,
16550x00001e9f,0x00050082,0x00000006,0x00001ea2, 11880x000200f8,0x00001b83,0x000200f9,0x00001b84,
16560x00001da7,0x00000135,0x000200f9,0x00001ea4, 11890x000200f8,0x00001b7f,0x00050082,0x00000006,
16570x000200f8,0x00001ea4,0x000700f5,0x00000006, 11900x00001b82,0x000019a6,0x00000142,0x000200f9,
16580x00005b1e,0x00001ea2,0x00001e9f,0x0000012b, 11910x00001b84,0x000200f8,0x00001b84,0x000700f5,
16590x00001ea3,0x00050084,0x00000006,0x00001e56, 11920x00000006,0x00005f83,0x00001b82,0x00001b7f,
16600x000000df,0x00005b1e,0x00050080,0x00000006, 11930x00000138,0x00001b83,0x00050084,0x00000006,
16610x00001e57,0x00001e5d,0x00001e56,0x000300f7, 11940x00001b36,0x000000ec,0x00005f83,0x00050080,
16620x00001eb1,0x00000000,0x000400fa,0x00001dcf, 11950x00000006,0x00001b37,0x00001b3d,0x00001b36,
16630x00001eac,0x00001eb0,0x000200f8,0x00001eb0, 11960x000300f7,0x00001b91,0x00000000,0x000400fa,
16640x000200f9,0x00001eb1,0x000200f8,0x00001eac, 11970x000019a7,0x00001b8c,0x00001b90,0x000200f8,
16650x00050082,0x00000006,0x00001eaf,0x00001da7, 11980x00001b90,0x000200f9,0x00001b91,0x000200f8,
16660x00000135,0x000200f9,0x00001eb1,0x000200f8, 11990x00001b8c,0x00050082,0x00000006,0x00001b8f,
16670x00001eb1,0x000700f5,0x00000006,0x00005b1f, 12000x000019a6,0x00000142,0x000200f9,0x00001b91,
16680x00001eaf,0x00001eac,0x0000012b,0x00001eb0, 12010x000200f8,0x00001b91,0x000700f5,0x00000006,
16690x00050084,0x00000006,0x00001e50,0x000000df, 12020x00005f84,0x00001b8f,0x00001b8c,0x00000138,
16700x00005b1f,0x00050080,0x00000006,0x00001e51, 12030x00001b90,0x00050084,0x00000006,0x00001b30,
16710x00001e57,0x00001e50,0x00050084,0x00000006, 12040x000000ec,0x00005f84,0x00050080,0x00000006,
16720x00001d39,0x000000df,0x00001d32,0x00050080, 12050x00001b31,0x00001b37,0x00001b30,0x000300f7,
16730x00000006,0x00001d3a,0x00001e51,0x00001d39, 12060x00001b9e,0x00000000,0x000400fa,0x000019a7,
16740x00050095,0x00000130,0x00001ecb,0x00001e34, 12070x00001b99,0x00001b9d,0x000200f8,0x00001b9d,
16750x00001d3a,0x00050051,0x00000006,0x00001ecc, 12080x000200f9,0x00001b9e,0x000200f8,0x00001b99,
16760x00001ecb,0x00000001,0x00050051,0x00000006, 12090x00050082,0x00000006,0x00001b9c,0x000019a6,
16770x00001ecd,0x00001ecb,0x00000000,0x00050080, 12100x00000142,0x000200f9,0x00001b9e,0x000200f8,
16780x00000006,0x00001ed2,0x00001e3b,0x00001ecc, 12110x00001b9e,0x000700f5,0x00000006,0x00005f85,
16790x00050050,0x00000007,0x00001ed3,0x00001ecd, 12120x00001b9c,0x00001b99,0x00000138,0x00001b9d,
16800x00001ed2,0x0004007c,0x00000014,0x00001ec3, 12130x00050084,0x00000006,0x00001b2a,0x000000ec,
16810x00001ed3,0x00060041,0x0000015f,0x00001eba, 12140x00005f85,0x00050080,0x00000006,0x00001b2b,
16820x00001ec3,0x0000015e,0x0000015e,0x0006003d, 12150x00001b31,0x00001b2a,0x000300f7,0x00001bab,
16830x00000006,0x00001ebb,0x00001eba,0x00000002, 12160x00000000,0x000400fa,0x000019a7,0x00001ba6,
16840x00000004,0x000200f9,0x00001d3f,0x000200f8, 12170x00001baa,0x000200f8,0x00001baa,0x000200f9,
16850x00001d3f,0x000700f5,0x00000006,0x00005b20, 12180x00001bab,0x000200f8,0x00001ba6,0x00050082,
16860x00001ebb,0x00001eb1,0x0000012b,0x00001d3e, 12190x00000006,0x00001ba9,0x000019a6,0x00000142,
16870x00050041,0x00000838,0x00001d43,0x00000e00, 12200x000200f9,0x00001bab,0x000200f8,0x00001bab,
16880x00001241,0x0003003e,0x00001d43,0x00005b20, 12210x000700f5,0x00000006,0x00005f86,0x00001ba9,
16890x000400e0,0x00000247,0x00000247,0x00000850, 12220x00001ba6,0x00000138,0x00001baa,0x00050084,
16900x000200f9,0x00001d44,0x000200f8,0x00001d44, 12230x00000006,0x00001b24,0x000000ec,0x00005f86,
16910x000700f5,0x00000006,0x00005b21,0x00000135, 12240x00050080,0x00000006,0x00001b25,0x00001b2b,
16920x00001d3f,0x00001d5d,0x00001d5b,0x000500b0, 12250x00001b24,0x00050084,0x00000006,0x0000199b,
16930x0000002f,0x00001d47,0x00005b21,0x0000018b, 12260x000000ec,0x0000131f,0x00050080,0x00000006,
16940x000400f6,0x00001d5e,0x00001d5b,0x00000000, 12270x0000199c,0x00001b25,0x0000199b,0x00050041,
16950x000400fa,0x00001d47,0x00001d48,0x00001d5e, 12280x00000266,0x0000199d,0x000001b9,0x00000264,
16960x000200f8,0x00001d48,0x000500ae,0x0000002f, 12290x0004003d,0x00000007,0x0000199e,0x0000199d,
16970x00001d4b,0x00001241,0x00005b21,0x000300f7, 12300x0004003d,0x00000006,0x0000199f,0x00000e6f,
16980x00001d53,0x00000000,0x000400fa,0x00001d4b, 12310x00050051,0x00000006,0x00001bc2,0x0000199e,
16990x00001d4c,0x00001d52,0x000200f8,0x00001d52, 12320x00000000,0x00050095,0x0000013d,0x00001bc4,
17000x000200f9,0x00001d53,0x000200f8,0x00001d4c, 12330x00001bc2,0x0000199c,0x00050051,0x00000006,
17010x00050082,0x00000006,0x00001d4f,0x00001241, 12340x00001bc5,0x00001bc4,0x00000001,0x00050051,
17020x00005b21,0x00050041,0x00000838,0x00001d50, 12350x00000006,0x00001bc6,0x00001bc4,0x00000000,
17030x00000e00,0x00001d4f,0x0004003d,0x00000006, 12360x00050051,0x00000006,0x00001bc9,0x0000199e,
17040x00001d51,0x00001d50,0x000200f9,0x00001d53, 12370x00000001,0x00050080,0x00000006,0x00001bcb,
17050x000200f8,0x00001d53,0x000700f5,0x00000006, 12380x00001bc9,0x00001bc5,0x00050050,0x00000007,
17060x00005b3c,0x00001d51,0x00001d4c,0x0000012b, 12390x00001bcc,0x00001bc6,0x00001bcb,0x0004007c,
17070x00001d52,0x000400e0,0x00000247,0x00000247, 12400x00000014,0x00001bbc,0x00001bcc,0x00060041,
17080x00000850,0x0004003d,0x00000006,0x00001d58, 12410x0000016c,0x00001bb4,0x00001bbc,0x0000016b,
17090x00001d43,0x00050080,0x00000006,0x00001d59, 12420x0000016b,0x0005003e,0x00001bb4,0x0000199f,
17100x00001d58,0x00005b3c,0x0003003e,0x00001d43, 12430x00000002,0x00000004,0x000200f9,0x000019a1,
17110x00001d59,0x000400e0,0x00000247,0x00000247, 12440x000200f8,0x000019a1,0x000200f9,0x000013fd,
17120x00000850,0x000200f9,0x00001d5b,0x000200f8, 12450x000200f8,0x0000131c,0x000500aa,0x0000002f,
17130x00001d5b,0x000500c4,0x00000006,0x00001d5d, 12460x00001327,0x000012df,0x00000a0e,0x000300f7,
17140x00005b21,0x0000022b,0x000200f9,0x00001d44, 12470x00001329,0x00000000,0x000400fa,0x00001327,
17150x000200f8,0x00001d5e,0x000500ab,0x0000002f, 12480x00001328,0x00001329,0x000200f8,0x00001328,
17160x00001d60,0x00005b20,0x0000012b,0x000300f7, 12490x00050041,0x000001bb,0x00001c07,0x000001b9,
17170x00001d6f,0x00000000,0x000400fa,0x00001d60, 12500x000001ba,0x0004003d,0x00000006,0x00001c08,
17180x00001d61,0x00001d6f,0x000200f8,0x00001d61, 12510x00001c07,0x00050084,0x00000006,0x00001c09,
17190x000300f7,0x00001f25,0x00000000,0x000400fa, 12520x000001db,0x00001c08,0x00050080,0x00000006,
17200x00001dcf,0x00001f20,0x00001f24,0x000200f8, 12530x00001c0a,0x000001c4,0x00001c09,0x00050080,
17210x00001f24,0x000200f9,0x00001f25,0x000200f8, 12540x00000006,0x00001c10,0x00001c08,0x0000062f,
17220x00001f20,0x00050082,0x00000006,0x00001f23, 12550x00050086,0x00000006,0x00001c11,0x00001c10,
17230x00001da7,0x00000135,0x000200f9,0x00001f25, 12560x000001be,0x00050084,0x00000006,0x00001c03,
17240x000200f8,0x00001f25,0x000700f5,0x00000006, 12570x000001c4,0x00001c11,0x00050080,0x00000006,
17250x00005b22,0x00001f23,0x00001f20,0x0000012b, 12580x00001c04,0x00001c0a,0x00001c03,0x00050080,
17260x00001f24,0x00050084,0x00000006,0x00001eea, 12590x00000006,0x00001bfe,0x00001c04,0x00001c03,
17270x000000df,0x00005b22,0x00050080,0x00000006, 12600x00050041,0x000001bb,0x00001bf5,0x000001b9,
17280x00001eeb,0x00001da2,0x00001eea,0x000300f7, 12610x000001f0,0x0004003d,0x00000006,0x00001bf6,
17290x00001f32,0x00000000,0x000400fa,0x00001dcf, 12620x00001bf5,0x00050084,0x00000006,0x00001bf7,
17300x00001f2d,0x00001f31,0x000200f8,0x00001f31, 12630x000001ef,0x00001bf6,0x00050080,0x00000006,
17310x000200f9,0x00001f32,0x000200f8,0x00001f2d, 12640x00001bf8,0x00001bfe,0x00001bf7,0x00050041,
17320x00050082,0x00000006,0x00001f30,0x00001da7, 12650x000001bb,0x00001bee,0x000001b9,0x00000206,
17330x00000135,0x000200f9,0x00001f32,0x000200f8, 12660x0004003d,0x00000006,0x00001bef,0x00001bee,
17340x00001f32,0x000700f5,0x00000006,0x00005b23, 12670x00050084,0x00000006,0x00001bf0,0x00000205,
17350x00001f30,0x00001f2d,0x0000012b,0x00001f31, 12680x00001bef,0x00050080,0x00000006,0x00001bf1,
17360x00050084,0x00000006,0x00001ee4,0x000000df, 12690x00001bf8,0x00001bf0,0x000500ac,0x0000002f,
17370x00005b23,0x00050080,0x00000006,0x00001ee5, 12700x00001c1e,0x00001bf6,0x00000142,0x000300f7,
17380x00001eeb,0x00001ee4,0x000300f7,0x00001f3f, 12710x00001c24,0x00000000,0x000400fa,0x00001c1e,
17390x00000000,0x000400fa,0x00001dcf,0x00001f3a, 12720x00001c1f,0x00001c23,0x000200f8,0x00001c23,
17400x00001f3e,0x000200f8,0x00001f3e,0x000200f9, 12730x000200f9,0x00001c24,0x000200f8,0x00001c1f,
17410x00001f3f,0x000200f8,0x00001f3a,0x00050082, 12740x00050082,0x00000006,0x00001c22,0x00001bf6,
17420x00000006,0x00001f3d,0x00001da7,0x00000135, 12750x00000142,0x000200f9,0x00001c24,0x000200f8,
17430x000200f9,0x00001f3f,0x000200f8,0x00001f3f, 12760x00001c24,0x000700f5,0x00000006,0x00005f6e,
17440x000700f5,0x00000006,0x00005b24,0x00001f3d, 12770x00001c22,0x00001c1f,0x00000138,0x00001c23,
17450x00001f3a,0x0000012b,0x00001f3e,0x00050084, 12780x00050084,0x00000006,0x00001be9,0x000000ec,
17460x00000006,0x00001ede,0x000000df,0x00005b24, 12790x00005f6e,0x00050080,0x00000006,0x00001bea,
17470x00050080,0x00000006,0x00001edf,0x00001ee5, 12800x00001bf1,0x00001be9,0x000300f7,0x00001c31,
17480x00001ede,0x000300f7,0x00001f4c,0x00000000, 12810x00000000,0x000400fa,0x00001c1e,0x00001c2c,
17490x000400fa,0x00001dcf,0x00001f47,0x00001f4b, 12820x00001c30,0x000200f8,0x00001c30,0x000200f9,
17500x000200f8,0x00001f4b,0x000200f9,0x00001f4c, 12830x00001c31,0x000200f8,0x00001c2c,0x00050082,
17510x000200f8,0x00001f47,0x00050082,0x00000006, 12840x00000006,0x00001c2f,0x00001bf6,0x00000142,
17520x00001f4a,0x00001da7,0x00000135,0x000200f9, 12850x000200f9,0x00001c31,0x000200f8,0x00001c31,
17530x00001f4c,0x000200f8,0x00001f4c,0x000700f5, 12860x000700f5,0x00000006,0x00005f6f,0x00001c2f,
17540x00000006,0x00005b25,0x00001f4a,0x00001f47, 12870x00001c2c,0x00000138,0x00001c30,0x00050084,
17550x0000012b,0x00001f4b,0x00050084,0x00000006, 12880x00000006,0x00001be3,0x000000ec,0x00005f6f,
17560x00001ed8,0x000000df,0x00005b25,0x00050080, 12890x00050080,0x00000006,0x00001be4,0x00001bea,
17570x00000006,0x00001ed9,0x00001edf,0x00001ed8, 12900x00001be3,0x000300f7,0x00001c3e,0x00000000,
17580x00050084,0x00000006,0x00001d64,0x000000df, 12910x000400fa,0x00001c1e,0x00001c39,0x00001c3d,
17590x00001d32,0x00050080,0x00000006,0x00001d65, 12920x000200f8,0x00001c3d,0x000200f9,0x00001c3e,
17600x00001ed9,0x00001d64,0x0004003d,0x00000006, 12930x000200f8,0x00001c39,0x00050082,0x00000006,
17610x00001d69,0x00001d43,0x00050080,0x00000006, 12940x00001c3c,0x00001bf6,0x00000142,0x000200f9,
17620x00001d6a,0x00005b2f,0x00001d69,0x00050082, 12950x00001c3e,0x000200f8,0x00001c3e,0x000700f5,
17630x00000006,0x00001d6b,0x00001d6a,0x00000135, 12960x00000006,0x00005f70,0x00001c3c,0x00001c39,
17640x00050095,0x00000130,0x00001f65,0x00001e34, 12970x00000138,0x00001c3d,0x00050084,0x00000006,
17650x00001d65,0x00050051,0x00000006,0x00001f66, 12980x00001bdd,0x000000ec,0x00005f70,0x00050080,
17660x00001f65,0x00000001,0x00050051,0x00000006, 12990x00000006,0x00001bde,0x00001be4,0x00001bdd,
17670x00001f67,0x00001f65,0x00000000,0x00050080, 13000x000300f7,0x00001c4b,0x00000000,0x000400fa,
17680x00000006,0x00001f6c,0x00001e3b,0x00001f66, 13010x00001c1e,0x00001c46,0x00001c4a,0x000200f8,
17690x00050050,0x00000007,0x00001f6d,0x00001f67, 13020x00001c4a,0x000200f9,0x00001c4b,0x000200f8,
17700x00001f6c,0x0004007c,0x00000014,0x00001f5d, 13030x00001c46,0x00050082,0x00000006,0x00001c49,
17710x00001f6d,0x00060041,0x0000015f,0x00001f55, 13040x00001bf6,0x00000142,0x000200f9,0x00001c4b,
17720x00001f5d,0x0000015e,0x0000015e,0x0005003e, 13050x000200f8,0x00001c4b,0x000700f5,0x00000006,
17730x00001f55,0x00001d6b,0x00000002,0x00000004, 13060x00005f71,0x00001c49,0x00001c46,0x00000138,
17740x000200f9,0x00001d6f,0x000200f8,0x00001d6f, 13070x00001c4a,0x00050084,0x00000006,0x00001bd7,
17750x00050041,0x00000838,0x00001d70,0x00000e00, 13080x000000ec,0x00005f71,0x00050080,0x00000006,
17760x00000a9c,0x0004003d,0x00000006,0x00001d71, 13090x00001bd8,0x00001bde,0x00001bd7,0x000300f7,
17770x00001d70,0x00050080,0x00000006,0x00001d73, 13100x00001c58,0x00000000,0x000400fa,0x00001c1e,
17780x00005b2f,0x00001d71,0x000400e0,0x00000247, 13110x00001c53,0x00001c57,0x000200f8,0x00001c57,
17790x00000247,0x00000850,0x000200f9,0x00001d74, 13120x000200f9,0x00001c58,0x000200f8,0x00001c53,
17800x000200f8,0x00001d74,0x00050080,0x00000006, 13130x00050082,0x00000006,0x00001c56,0x00001bf6,
17810x00001d76,0x00005b1c,0x0000018b,0x000200f9, 13140x00000142,0x000200f9,0x00001c58,0x000200f8,
17820x00001d2a,0x000200f8,0x00001d77,0x000200f9, 13150x00001c58,0x000700f5,0x00000006,0x00005f72,
17830x000012fe,0x000200f8,0x0000123b,0x000500aa, 13160x00001c56,0x00001c53,0x00000138,0x00001c57,
17840x0000002f,0x00001246,0x000011e0,0x0000031c, 13170x00050084,0x00000006,0x00001bd1,0x000000ec,
17850x000300f7,0x00001248,0x00000000,0x000400fa, 13180x00005f72,0x00050080,0x00000006,0x00001bd2,
17860x00001246,0x00001247,0x00001248,0x000200f8, 13190x00001bd8,0x00001bd1,0x000300f7,0x00001cb7,
17870x00001247,0x000500aa,0x0000002f,0x0000124a, 13200x00000000,0x000400fa,0x00001c1e,0x00001cb2,
17880x000011de,0x0000012b,0x000300f7,0x0000124c, 13210x00001cb6,0x000200f8,0x00001cb6,0x000200f9,
17890x00000000,0x000400fa,0x0000124a,0x0000124b, 13220x00001cb7,0x000200f8,0x00001cb2,0x00050082,
17900x0000124c,0x000200f8,0x0000124b,0x000300f7, 13230x00000006,0x00001cb5,0x00001bf6,0x00000142,
17910x00002028,0x00000000,0x000300fb,0x0000012b, 13240x000200f9,0x00001cb7,0x000200f8,0x00001cb7,
17920x00001faf,0x000200f8,0x00001faf,0x000300f7, 13250x000700f5,0x00000006,0x00005f73,0x00001cb5,
17930x00002063,0x00000000,0x000300fb,0x0000012b, 13260x00001cb2,0x00000138,0x00001cb6,0x00050084,
17940x00002035,0x000200f8,0x00002035,0x00050041, 13270x00000006,0x00001c7c,0x000000ec,0x00005f73,
17950x00000182,0x00002084,0x00000180,0x00000181, 13280x00050080,0x00000006,0x00001c7d,0x00001bf1,
17960x0004003d,0x00000006,0x00002085,0x00002084, 13290x00001c7c,0x000300f7,0x00001cc4,0x00000000,
17970x00050084,0x00000006,0x00002086,0x000001a2, 13300x000400fa,0x00001c1e,0x00001cbf,0x00001cc3,
17980x00002085,0x00050080,0x00000006,0x00002087, 13310x000200f8,0x00001cc3,0x000200f9,0x00001cc4,
17990x0000018b,0x00002086,0x00050080,0x00000006, 13320x000200f8,0x00001cbf,0x00050082,0x00000006,
18000x0000208d,0x00002085,0x00005cc3,0x00050086, 13330x00001cc2,0x00001bf6,0x00000142,0x000200f9,
18010x00000006,0x0000208e,0x0000208d,0x00000185, 13340x00001cc4,0x000200f8,0x00001cc4,0x000700f5,
18020x00050084,0x00000006,0x00002080,0x0000018b, 13350x00000006,0x00005f74,0x00001cc2,0x00001cbf,
18030x0000208e,0x00050080,0x00000006,0x00002081, 13360x00000138,0x00001cc3,0x00050084,0x00000006,
18040x00002087,0x00002080,0x00050080,0x00000006, 13370x00001c76,0x000000ec,0x00005f74,0x00050080,
18050x0000207b,0x00002081,0x00002080,0x00050041, 13380x00000006,0x00001c77,0x00001c7d,0x00001c76,
18060x00000182,0x00002072,0x00000180,0x000001b7, 13390x000300f7,0x00001cd1,0x00000000,0x000400fa,
18070x0004003d,0x00000006,0x00002073,0x00002072, 13400x00001c1e,0x00001ccc,0x00001cd0,0x000200f8,
18080x00050084,0x00000006,0x00002074,0x000001b6, 13410x00001cd0,0x000200f9,0x00001cd1,0x000200f8,
18090x00002073,0x00050080,0x00000006,0x00002075, 13420x00001ccc,0x00050082,0x00000006,0x00001ccf,
18100x0000207b,0x00002074,0x00050041,0x0000022d, 13430x00001bf6,0x00000142,0x000200f9,0x00001cd1,
18110x0000206c,0x00000180,0x0000022b,0x0004003d, 13440x000200f8,0x00001cd1,0x000700f5,0x00000006,
18120x00000007,0x0000206d,0x0000206c,0x00050051, 13450x00005f75,0x00001ccf,0x00001ccc,0x00000138,
18130x00000006,0x000020a3,0x0000206d,0x00000000, 13460x00001cd0,0x00050084,0x00000006,0x00001c70,
18140x00050095,0x00000130,0x000020a5,0x000020a3, 13470x000000ec,0x00005f75,0x00050080,0x00000006,
18150x00002075,0x00050051,0x00000006,0x000020a6, 13480x00001c71,0x00001c77,0x00001c70,0x000300f7,
18160x000020a5,0x00000001,0x00050051,0x00000006, 13490x00001cde,0x00000000,0x000400fa,0x00001c1e,
18170x000020a7,0x000020a5,0x00000000,0x00050051, 13500x00001cd9,0x00001cdd,0x000200f8,0x00001cdd,
18180x00000006,0x000020aa,0x0000206d,0x00000001, 13510x000200f9,0x00001cde,0x000200f8,0x00001cd9,
18190x00050080,0x00000006,0x000020ac,0x000020aa, 13520x00050082,0x00000006,0x00001cdc,0x00001bf6,
18200x000020a6,0x00050050,0x00000007,0x000020ad, 13530x00000142,0x000200f9,0x00001cde,0x000200f8,
18210x000020a7,0x000020ac,0x0004007c,0x00000014, 13540x00001cde,0x000700f5,0x00000006,0x00005f76,
18220x0000209d,0x000020ad,0x000200f9,0x00002038, 13550x00001cdc,0x00001cd9,0x00000138,0x00001cdd,
18230x000200f8,0x00002038,0x000700f5,0x00000006, 13560x00050084,0x00000006,0x00001c6a,0x000000ec,
18240x00005b05,0x0000012b,0x00002035,0x00002046, 13570x00005f76,0x00050080,0x00000006,0x00001c6b,
18250x0000203c,0x000500b0,0x0000002f,0x0000203b, 13580x00001c71,0x00001c6a,0x000300f7,0x00001ceb,
18260x00005b05,0x0000031c,0x000400f6,0x00002047, 13590x00000000,0x000400fa,0x00001c1e,0x00001ce6,
18270x0000203c,0x00000000,0x000400fa,0x0000203b, 13600x00001cea,0x000200f8,0x00001cea,0x000200f9,
18280x0000203c,0x00002047,0x000200f8,0x0000203c, 13610x00001ceb,0x000200f8,0x00001ce6,0x00050082,
18290x00050080,0x00000006,0x00002040,0x00000135, 13620x00000006,0x00001ce9,0x00001bf6,0x00000142,
18300x00005b05,0x00060041,0x0000015f,0x00002041, 13630x000200f9,0x00001ceb,0x000200f8,0x00001ceb,
18310x0000209d,0x0000015e,0x00002040,0x000700f1, 13640x000700f5,0x00000006,0x00005f77,0x00001ce9,
18320x00000006,0x00002042,0x00002041,0x00000135, 13650x00001ce6,0x00000138,0x00001cea,0x00050084,
18330x0000012b,0x0000012b,0x00050041,0x00000009, 13660x00000006,0x00001c64,0x000000ec,0x00005f77,
18340x00002043,0x0000202d,0x00005b05,0x0003003e, 13670x00050080,0x00000006,0x00001c65,0x00001c6b,
18350x00002043,0x00002042,0x00050080,0x00000006, 13680x00001c64,0x000300f7,0x00001cfe,0x00000000,
18360x00002046,0x00005b05,0x0000022b,0x000200f9, 13690x000400fa,0x00001c1e,0x00001cf9,0x00001cfd,
18370x00002038,0x000200f8,0x00002047,0x00050041, 13700x000200f8,0x00001cfd,0x000200f9,0x00001cfe,
18380x00000009,0x00002048,0x0000202d,0x0000015e, 13710x000200f8,0x00001cf9,0x00050082,0x00000006,
18390x0004003d,0x00000006,0x00002049,0x00002048, 13720x00001cfc,0x00001bf6,0x00000142,0x000200f9,
18400x000500aa,0x0000002f,0x0000204a,0x00002049, 13730x00001cfe,0x000200f8,0x00001cfe,0x000700f5,
18410x00000500,0x000300f7,0x0000204e,0x00000000, 13740x00000006,0x00005f78,0x00001cfc,0x00001cf9,
18420x000400fa,0x0000204a,0x0000204b,0x0000204e, 13750x00000138,0x00001cfd,0x00050080,0x00000006,
18430x000200f8,0x0000204b,0x000200f9,0x00002063, 13760x00001cf1,0x00005f78,0x0000062f,0x00050086,
18440x000200f8,0x0000204e,0x0004003d,0x00000006, 13770x00000006,0x00001cf2,0x00001cf1,0x000001be,
18450x00002050,0x00002048,0x000500c7,0x00000006, 13780x00050084,0x00000006,0x00001c5e,0x000000ec,
18460x000020b2,0x00002050,0x00000208,0x000500ab, 13790x00001cf2,0x00050080,0x00000006,0x00001c5f,
18470x0000002f,0x000020b3,0x000020b2,0x0000012b, 13800x00001c65,0x00001c5e,0x000300f7,0x00001d11,
18480x000300f7,0x000020ba,0x00000000,0x000400fa, 13810x00000000,0x000400fa,0x00001c1e,0x00001d0c,
18490x000020b3,0x000020b4,0x000020b7,0x000200f8, 13820x00001d10,0x000200f8,0x00001d10,0x000200f9,
18500x000020b7,0x000400c8,0x00000006,0x000020b9, 13830x00001d11,0x000200f8,0x00001d0c,0x00050082,
18510x00002050,0x000200f9,0x000020ba,0x000200f8, 13840x00000006,0x00001d0f,0x00001bf6,0x00000142,
18520x000020b4,0x000500c7,0x00000006,0x000020b6, 13850x000200f9,0x00001d11,0x000200f8,0x00001d11,
18530x00002050,0x0000021d,0x000200f9,0x000020ba, 13860x000700f5,0x00000006,0x00005f79,0x00001d0f,
18540x000200f8,0x000020ba,0x000700f5,0x00000006, 13870x00001d0c,0x00000138,0x00001d10,0x00050080,
18550x00005b06,0x000020b6,0x000020b4,0x000020b9, 13880x00000006,0x00001d04,0x00005f79,0x0000062f,
18560x000020b7,0x0004007c,0x00000027,0x000020bc, 13890x00050086,0x00000006,0x00001d05,0x00001d04,
18570x00005b06,0x00050041,0x00000009,0x00002052, 13900x000001be,0x00050041,0x000012db,0x0000132e,
18580x0000202d,0x0000022b,0x0004003d,0x00000006, 13910x000012e4,0x00000138,0x0004003d,0x00000006,
18590x00002053,0x00002052,0x000500c7,0x00000006, 13920x0000132f,0x0000132e,0x00050080,0x00000006,
18600x000020c1,0x00002053,0x00000208,0x000500ab, 13930x00001d2a,0x00001d05,0x00000a56,0x00050086,
18610x0000002f,0x000020c2,0x000020c1,0x0000012b, 13940x00000006,0x00001d2b,0x00001d2a,0x000001c4,
18620x000300f7,0x000020c9,0x00000000,0x000400fa, 13950x00050084,0x00000006,0x00001d2e,0x0000132f,
18630x000020c2,0x000020c3,0x000020c6,0x000200f8, 13960x00001d2b,0x0007000c,0x00000006,0x00001d30,
18640x000020c6,0x000400c8,0x00000006,0x000020c8, 13970x00000001,0x00000026,0x00001d2e,0x00001d05,
18650x00002053,0x000200f9,0x000020c9,0x000200f8, 13980x00050080,0x00000006,0x00001d33,0x00001d30,
18660x000020c3,0x000500c7,0x00000006,0x000020c5, 13990x00001d2b,0x0007000c,0x00000006,0x00001d35,
18670x00002053,0x0000021d,0x000200f9,0x000020c9, 14000x00000001,0x00000026,0x00001d33,0x00001d05,
18680x000200f8,0x000020c9,0x000700f5,0x00000006, 14010x000200f9,0x00001d37,0x000200f8,0x00001d37,
18690x00005b07,0x000020c5,0x000020c3,0x000020c8, 14020x000700f5,0x00000006,0x00005f7b,0x00000138,
18700x000020c6,0x0004007c,0x00000027,0x000020cb, 14030x00001d11,0x00001d45,0x00001d3c,0x000700f5,
18710x00005b07,0x00050041,0x00000009,0x00002055, 14040x00000006,0x00005f7a,0x00001d30,0x00001d11,
18720x0000202d,0x000002dc,0x0004003d,0x00000006, 14050x00001d48,0x00001d3c,0x000500b0,0x0000002f,
18730x00002056,0x00002055,0x000500c7,0x00000006, 14060x00001d3b,0x00005f7a,0x00001d35,0x000400f6,
18740x000020d0,0x00002056,0x00000208,0x000500ab, 14070x00001d49,0x00001d3c,0x00000000,0x000400fa,
18750x0000002f,0x000020d1,0x000020d0,0x0000012b, 14080x00001d3b,0x00001d3c,0x00001d49,0x000200f8,
18760x000300f7,0x000020d8,0x00000000,0x000400fa, 14090x00001d3c,0x00050084,0x00000006,0x00001d3f,
18770x000020d1,0x000020d2,0x000020d5,0x000200f8, 14100x000000ec,0x00005f7a,0x00050080,0x00000006,
18780x000020d5,0x000400c8,0x00000006,0x000020d7, 14110x00001d40,0x00001bd2,0x00001d3f,0x00050041,
18790x00002056,0x000200f9,0x000020d8,0x000200f8, 14120x00000266,0x00001d41,0x000001b9,0x00000264,
18800x000020d2,0x000500c7,0x00000006,0x000020d4, 14130x0004003d,0x00000007,0x00001d42,0x00001d41,
18810x00002056,0x0000021d,0x000200f9,0x000020d8, 14140x00050051,0x00000006,0x00001da2,0x00001d42,
18820x000200f8,0x000020d8,0x000700f5,0x00000006, 14150x00000000,0x00050095,0x0000013d,0x00001da4,
18830x00005b08,0x000020d4,0x000020d2,0x000020d7, 14160x00001da2,0x00001d40,0x00050051,0x00000006,
18840x000020d5,0x0004007c,0x00000027,0x000020da, 14170x00001da5,0x00001da4,0x00000001,0x00050051,
18850x00005b08,0x00060050,0x00000063,0x00002058, 14180x00000006,0x00001da6,0x00001da4,0x00000000,
18860x000020bc,0x000020cb,0x000020da,0x00050041, 14190x00050051,0x00000006,0x00001da9,0x00001d42,
18870x00000009,0x00002059,0x0000202d,0x000002e4, 14200x00000001,0x00050080,0x00000006,0x00001dab,
18880x0004003d,0x00000006,0x0000205a,0x00002059, 14210x00001da9,0x00001da5,0x00050050,0x00000007,
18890x000500c7,0x00000006,0x000020df,0x0000205a, 14220x00001dac,0x00001da6,0x00001dab,0x0004007c,
18900x00000208,0x000500ab,0x0000002f,0x000020e0, 14230x00000014,0x00001d9c,0x00001dac,0x00060041,
18910x000020df,0x0000012b,0x000300f7,0x000020e7, 14240x0000016c,0x00001d93,0x00001d9c,0x0000016b,
18920x00000000,0x000400fa,0x000020e0,0x000020e1, 14250x0000016b,0x0006003d,0x00000006,0x00001d94,
18930x000020e4,0x000200f8,0x000020e4,0x000400c8, 14260x00001d93,0x00000002,0x00000004,0x00050080,
18940x00000006,0x000020e6,0x0000205a,0x000200f9, 14270x00000006,0x00001d45,0x00005f7b,0x00001d94,
18950x000020e7,0x000200f8,0x000020e1,0x000500c7, 14280x00050080,0x00000006,0x00001d48,0x00005f7a,
18960x00000006,0x000020e3,0x0000205a,0x0000021d, 14290x00000264,0x000200f9,0x00001d37,0x000200f8,
18970x000200f9,0x000020e7,0x000200f8,0x000020e7, 14300x00001d49,0x00050041,0x00000937,0x00001d4c,
18980x000700f5,0x00000006,0x00005b09,0x000020e3, 14310x00000a7f,0x0000132f,0x0003003e,0x00001d4c,
18990x000020e1,0x000020e6,0x000020e4,0x0004007c, 14320x00005f7b,0x000400e0,0x00000280,0x00000280,
19000x00000027,0x000020e9,0x00005b09,0x00050041, 14330x0000094f,0x000500aa,0x0000002f,0x00001d4e,
19010x00000009,0x0000205c,0x0000202d,0x000002ec, 14340x0000132f,0x00000138,0x000300f7,0x00001d6b,
19020x0004003d,0x00000006,0x0000205d,0x0000205c, 14350x00000000,0x000400fa,0x00001d4e,0x00001d4f,
19030x000500c7,0x00000006,0x000020ee,0x0000205d, 14360x00001d6b,0x000200f8,0x00001d4f,0x000200f9,
19040x00000208,0x000500ab,0x0000002f,0x000020ef, 14370x00001d50,0x000200f8,0x00001d50,0x000700f5,
19050x000020ee,0x0000012b,0x000300f7,0x000020f6, 14380x00000006,0x00005f7d,0x00000138,0x00001d4f,
19060x00000000,0x000400fa,0x000020ef,0x000020f0, 14390x00001d5d,0x00001d54,0x000700f5,0x00000006,
19070x000020f3,0x000200f8,0x000020f3,0x000400c8, 14400x00005f7c,0x00000138,0x00001d4f,0x00001d60,
19080x00000006,0x000020f5,0x0000205d,0x000200f9, 14410x00001d54,0x000500b0,0x0000002f,0x00001d53,
19090x000020f6,0x000200f8,0x000020f0,0x000500c7, 14420x00005f7c,0x000001c4,0x000400f6,0x00001d61,
19100x00000006,0x000020f2,0x0000205d,0x0000021d, 14430x00001d54,0x00000000,0x000400fa,0x00001d53,
19110x000200f9,0x000020f6,0x000200f8,0x000020f6, 14440x00001d54,0x00001d61,0x000200f8,0x00001d54,
19120x000700f5,0x00000006,0x00005b0a,0x000020f2, 14450x00050041,0x00000937,0x00001d56,0x00000a7f,
19130x000020f0,0x000020f5,0x000020f3,0x0004007c, 14460x00005f7c,0x0004003d,0x00000006,0x00001d57,
19140x00000027,0x000020f8,0x00005b0a,0x00050041, 14470x00001d56,0x0003003e,0x00001d56,0x00005f7d,
19150x00000009,0x0000205f,0x0000202d,0x000002f4, 14480x00050080,0x00000006,0x00001d5d,0x00005f7d,
19160x0004003d,0x00000006,0x00002060,0x0000205f, 14490x00001d57,0x00050080,0x00000006,0x00001d60,
19170x000500c7,0x00000006,0x000020fd,0x00002060, 14500x00005f7c,0x00000264,0x000200f9,0x00001d50,
19180x00000208,0x000500ab,0x0000002f,0x000020fe, 14510x000200f8,0x00001d61,0x00050041,0x00000266,
19190x000020fd,0x0000012b,0x000300f7,0x00002105, 14520x00001d65,0x000001b9,0x00000264,0x0004003d,
19200x00000000,0x000400fa,0x000020fe,0x000020ff, 14530x00000007,0x00001d66,0x00001d65,0x00050051,
19210x00002102,0x000200f8,0x00002102,0x000400c8, 14540x00000006,0x00001dc2,0x00001d66,0x00000000,
19220x00000006,0x00002104,0x00002060,0x000200f9, 14550x00050095,0x0000013d,0x00001dc4,0x00001dc2,
19230x00002105,0x000200f8,0x000020ff,0x000500c7, 14560x000001ef,0x00050051,0x00000006,0x00001dc5,
19240x00000006,0x00002101,0x00002060,0x0000021d, 14570x00001dc4,0x00000001,0x00050051,0x00000006,
19250x000200f9,0x00002105,0x000200f8,0x00002105, 14580x00001dc6,0x00001dc4,0x00000000,0x00050051,
19260x000700f5,0x00000006,0x00005b0b,0x00002101, 14590x00000006,0x00001dc9,0x00001d66,0x00000001,
19270x000020ff,0x00002104,0x00002102,0x0004007c, 14600x00050080,0x00000006,0x00001dcb,0x00001dc9,
19280x00000027,0x00002107,0x00005b0b,0x00060050, 14610x00001dc5,0x00050050,0x00000007,0x00001dcc,
19290x00000063,0x00002062,0x000020e9,0x000020f8, 14620x00001dc6,0x00001dcb,0x0004007c,0x00000014,
19300x00002107,0x000200f9,0x00002063,0x000200f8, 14630x00001dbc,0x00001dcc,0x00060041,0x0000016c,
19310x00002063,0x000700f5,0x00000063,0x00005b10, 14640x00001db4,0x00001dbc,0x0000016b,0x0000016b,
19320x00005cc2,0x0000204b,0x00002062,0x00002105, 14650x0005003e,0x00001db4,0x00005f7d,0x00000002,
19330x000700f5,0x00000063,0x00005b0c,0x0000053d, 14660x00000004,0x000200f9,0x00001d6b,0x000200f8,
19340x0000204b,0x00002058,0x00002105,0x00050041, 14670x00001d6b,0x000400e0,0x00000280,0x00000280,
19350x0000022d,0x00001fb3,0x00000180,0x0000015e, 14680x0000094f,0x0004003d,0x00000006,0x00001d6e,
19360x0004003d,0x00000007,0x00001fb4,0x00001fb3, 14690x00001d4c,0x000200f9,0x00001d70,0x000200f8,
19370x00050051,0x00000027,0x00001fb6,0x00005b0c, 14700x00001d70,0x000700f5,0x00000006,0x00005f7f,
19380x00000000,0x0004007c,0x00000006,0x0000210d, 14710x00001d6e,0x00001d6b,0x00001d87,0x00001d75,
19390x00001fb6,0x00050051,0x00000006,0x00002126, 14720x000700f5,0x00000006,0x00005f7e,0x00001d30,
19400x00001fb4,0x00000000,0x00050095,0x00000130, 14730x00001d6b,0x00001d8a,0x00001d75,0x000500b0,
19410x00002128,0x00002126,0x000001a2,0x00050051, 14740x0000002f,0x00001d74,0x00005f7e,0x00001d35,
19420x00000006,0x00002129,0x00002128,0x00000001, 14750x000400f6,0x00001d8b,0x00001d75,0x00000000,
19430x00050051,0x00000006,0x0000212a,0x00002128, 14760x000400fa,0x00001d74,0x00001d75,0x00001d8b,
19440x00000000,0x00050051,0x00000006,0x0000212d, 14770x000200f8,0x00001d75,0x00050084,0x00000006,
19450x00001fb4,0x00000001,0x00050080,0x00000006, 14780x00001d78,0x000000ec,0x00005f7e,0x00050080,
19460x0000212f,0x0000212d,0x00002129,0x00050050, 14790x00000006,0x00001d79,0x00001bd2,0x00001d78,
19470x00000007,0x00002130,0x0000212a,0x0000212f, 14800x00050041,0x00000266,0x00001d7a,0x000001b9,
19480x0004007c,0x00000014,0x00002120,0x00002130, 14810x00000264,0x0004003d,0x00000007,0x00001d7b,
19490x00060041,0x0000015f,0x00002118,0x00002120, 14820x00001d7a,0x00050051,0x00000006,0x00001de3,
19500x0000015e,0x0000015e,0x0005003e,0x00002118, 14830x00001d7b,0x00000000,0x00050095,0x0000013d,
19510x0000210d,0x00000002,0x00000004,0x00050051, 14840x00001de5,0x00001de3,0x00001d79,0x00050051,
19520x00000027,0x00001fbb,0x00005b0c,0x00000001, 14850x00000006,0x00001de6,0x00001de5,0x00000001,
19530x0004007c,0x00000006,0x00002136,0x00001fbb, 14860x00050051,0x00000006,0x00001de7,0x00001de5,
19540x00050095,0x00000130,0x00002151,0x00002126, 14870x00000000,0x00050051,0x00000006,0x00001dea,
19550x00000260,0x00050051,0x00000006,0x00002152, 14880x00001d7b,0x00000001,0x00050080,0x00000006,
19560x00002151,0x00000001,0x00050051,0x00000006, 14890x00001dec,0x00001dea,0x00001de6,0x00050050,
19570x00002153,0x00002151,0x00000000,0x00050080, 14900x00000007,0x00001ded,0x00001de7,0x00001dec,
19580x00000006,0x00002158,0x0000212d,0x00002152, 14910x0004007c,0x00000014,0x00001ddd,0x00001ded,
19590x00050050,0x00000007,0x00002159,0x00002153, 14920x00060041,0x0000016c,0x00001dd4,0x00001ddd,
19600x00002158,0x0004007c,0x00000014,0x00002149, 14930x0000016b,0x0000016b,0x0006003d,0x00000006,
19610x00002159,0x00060041,0x0000015f,0x00002141, 14940x00001dd5,0x00001dd4,0x00000002,0x00000004,
19620x00002149,0x0000015e,0x0000015e,0x0005003e, 14950x00050080,0x00000006,0x00001d80,0x00001c5f,
19630x00002141,0x00002136,0x00000002,0x00000004, 14960x00001d78,0x00050095,0x0000013d,0x00001e05,
19640x00050051,0x00000027,0x00001fc0,0x00005b0c, 14970x00001de3,0x00001d80,0x00050051,0x00000006,
19650x00000002,0x0004007c,0x00000006,0x0000215f, 14980x00001e06,0x00001e05,0x00000001,0x00050051,
19660x00001fc0,0x00050095,0x00000130,0x0000217a, 14990x00000006,0x00001e07,0x00001e05,0x00000000,
19670x00002126,0x000001b6,0x00050051,0x00000006, 15000x00050080,0x00000006,0x00001e0c,0x00001dea,
19680x0000217b,0x0000217a,0x00000001,0x00050051, 15010x00001e06,0x00050050,0x00000007,0x00001e0d,
19690x00000006,0x0000217c,0x0000217a,0x00000000, 15020x00001e07,0x00001e0c,0x0004007c,0x00000014,
19700x00050080,0x00000006,0x00002181,0x0000212d, 15030x00001dfd,0x00001e0d,0x00060041,0x0000016c,
19710x0000217b,0x00050050,0x00000007,0x00002182, 15040x00001df5,0x00001dfd,0x0000016b,0x0000016b,
19720x0000217c,0x00002181,0x0004007c,0x00000014, 15050x0005003e,0x00001df5,0x00005f7f,0x00000002,
19730x00002172,0x00002182,0x00060041,0x0000015f, 15060x00000004,0x00050080,0x00000006,0x00001d87,
19740x0000216a,0x00002172,0x0000015e,0x0000015e, 15070x00005f7f,0x00001dd5,0x00050080,0x00000006,
19750x0005003e,0x0000216a,0x0000215f,0x00000002, 15080x00001d8a,0x00005f7e,0x00000264,0x000200f9,
19760x00000004,0x00050051,0x00000027,0x00001fc5, 15090x00001d70,0x000200f8,0x00001d8b,0x000200f9,
19770x00005b10,0x00000000,0x0004007c,0x00000006, 15100x000013fd,0x000200f8,0x00001329,0x000500aa,
19780x00002188,0x00001fc5,0x00050095,0x00000130, 15110x0000002f,0x00001338,0x000012df,0x000001db,
19790x000021a3,0x00002126,0x000005df,0x00050051, 15120x000300f7,0x0000133a,0x00000000,0x000400fa,
19800x00000006,0x000021a4,0x000021a3,0x00000001, 15130x00001338,0x00001339,0x0000133a,0x000200f8,
19810x00050051,0x00000006,0x000021a5,0x000021a3, 15140x00001339,0x00050041,0x000012db,0x0000133c,
19820x00000000,0x00050080,0x00000006,0x000021aa, 15150x000012e3,0x00000138,0x0004003d,0x00000006,
19830x0000212d,0x000021a4,0x00050050,0x00000007, 15160x0000133d,0x0000133c,0x00050041,0x000012db,
19840x000021ab,0x000021a5,0x000021aa,0x0004007c, 15170x0000133f,0x000012e4,0x00000138,0x0004003d,
19850x00000014,0x0000219b,0x000021ab,0x00060041, 15180x00000006,0x00001340,0x0000133f,0x00050041,
19860x0000015f,0x00002193,0x0000219b,0x0000015e, 15190x000001bb,0x00001ebc,0x000001b9,0x000001ba,
19870x0000015e,0x0005003e,0x00002193,0x00002188, 15200x0004003d,0x00000006,0x00001ebd,0x00001ebc,
15210x00050084,0x00000006,0x00001ebe,0x000001db,
15220x00001ebd,0x00050080,0x00000006,0x00001ebf,
15230x000001c4,0x00001ebe,0x00050080,0x00000006,
15240x00001ec5,0x00001ebd,0x0000062f,0x00050086,
15250x00000006,0x00001ec6,0x00001ec5,0x000001be,
15260x00050084,0x00000006,0x00001eb8,0x000001c4,
15270x00001ec6,0x00050080,0x00000006,0x00001eb9,
15280x00001ebf,0x00001eb8,0x00050080,0x00000006,
15290x00001eb3,0x00001eb9,0x00001eb8,0x00050041,
15300x000001bb,0x00001eaa,0x000001b9,0x000001f0,
15310x0004003d,0x00000006,0x00001eab,0x00001eaa,
15320x00050084,0x00000006,0x00001eac,0x000001ef,
15330x00001eab,0x00050080,0x00000006,0x00001ead,
15340x00001eb3,0x00001eac,0x00050041,0x000001bb,
15350x00001ea3,0x000001b9,0x00000206,0x0004003d,
15360x00000006,0x00001ea4,0x00001ea3,0x00050084,
15370x00000006,0x00001ea5,0x00000205,0x00001ea4,
15380x00050080,0x00000006,0x00001ea6,0x00001ead,
15390x00001ea5,0x000500ac,0x0000002f,0x00001ed3,
15400x00001eab,0x00000142,0x000300f7,0x00001ed9,
15410x00000000,0x000400fa,0x00001ed3,0x00001ed4,
15420x00001ed8,0x000200f8,0x00001ed8,0x000200f9,
15430x00001ed9,0x000200f8,0x00001ed4,0x00050082,
15440x00000006,0x00001ed7,0x00001eab,0x00000142,
15450x000200f9,0x00001ed9,0x000200f8,0x00001ed9,
15460x000700f5,0x00000006,0x00005f45,0x00001ed7,
15470x00001ed4,0x00000138,0x00001ed8,0x00050084,
15480x00000006,0x00001e9e,0x000000ec,0x00005f45,
15490x00050080,0x00000006,0x00001e9f,0x00001ea6,
15500x00001e9e,0x000300f7,0x00001ee6,0x00000000,
15510x000400fa,0x00001ed3,0x00001ee1,0x00001ee5,
15520x000200f8,0x00001ee5,0x000200f9,0x00001ee6,
15530x000200f8,0x00001ee1,0x00050082,0x00000006,
15540x00001ee4,0x00001eab,0x00000142,0x000200f9,
15550x00001ee6,0x000200f8,0x00001ee6,0x000700f5,
15560x00000006,0x00005f46,0x00001ee4,0x00001ee1,
15570x00000138,0x00001ee5,0x00050084,0x00000006,
15580x00001e98,0x000000ec,0x00005f46,0x00050080,
15590x00000006,0x00001e99,0x00001e9f,0x00001e98,
15600x000300f7,0x00001ef3,0x00000000,0x000400fa,
15610x00001ed3,0x00001eee,0x00001ef2,0x000200f8,
15620x00001ef2,0x000200f9,0x00001ef3,0x000200f8,
15630x00001eee,0x00050082,0x00000006,0x00001ef1,
15640x00001eab,0x00000142,0x000200f9,0x00001ef3,
15650x000200f8,0x00001ef3,0x000700f5,0x00000006,
15660x00005f47,0x00001ef1,0x00001eee,0x00000138,
15670x00001ef2,0x00050084,0x00000006,0x00001e92,
15680x000000ec,0x00005f47,0x00050080,0x00000006,
15690x00001e93,0x00001e99,0x00001e92,0x000300f7,
15700x00001f00,0x00000000,0x000400fa,0x00001ed3,
15710x00001efb,0x00001eff,0x000200f8,0x00001eff,
15720x000200f9,0x00001f00,0x000200f8,0x00001efb,
15730x00050082,0x00000006,0x00001efe,0x00001eab,
15740x00000142,0x000200f9,0x00001f00,0x000200f8,
15750x00001f00,0x000700f5,0x00000006,0x00005f48,
15760x00001efe,0x00001efb,0x00000138,0x00001eff,
15770x00050084,0x00000006,0x00001e8c,0x000000ec,
15780x00005f48,0x00050080,0x00000006,0x00001e8d,
15790x00001e93,0x00001e8c,0x000300f7,0x00001f0d,
15800x00000000,0x000400fa,0x00001ed3,0x00001f08,
15810x00001f0c,0x000200f8,0x00001f0c,0x000200f9,
15820x00001f0d,0x000200f8,0x00001f08,0x00050082,
15830x00000006,0x00001f0b,0x00001eab,0x00000142,
15840x000200f9,0x00001f0d,0x000200f8,0x00001f0d,
15850x000700f5,0x00000006,0x00005f49,0x00001f0b,
15860x00001f08,0x00000138,0x00001f0c,0x00050084,
15870x00000006,0x00001e86,0x000000ec,0x00005f49,
15880x00050080,0x00000006,0x00001e87,0x00001e8d,
15890x00001e86,0x000300f7,0x00001f20,0x00000000,
15900x000400fa,0x00001ed3,0x00001f1b,0x00001f1f,
15910x000200f8,0x00001f1f,0x000200f9,0x00001f20,
15920x000200f8,0x00001f1b,0x00050082,0x00000006,
15930x00001f1e,0x00001eab,0x00000142,0x000200f9,
15940x00001f20,0x000200f8,0x00001f20,0x000700f5,
15950x00000006,0x00005f4a,0x00001f1e,0x00001f1b,
15960x00000138,0x00001f1f,0x00050080,0x00000006,
15970x00001f13,0x00005f4a,0x0000062f,0x00050086,
15980x00000006,0x00001f14,0x00001f13,0x000001be,
15990x00050084,0x00000006,0x00001e80,0x000000ec,
16000x00001f14,0x00050080,0x00000006,0x00001e81,
16010x00001e87,0x00001e80,0x00050084,0x00000006,
16020x00001e22,0x000000ec,0x0000133d,0x00050080,
16030x00000006,0x00001e23,0x00001e81,0x00001e22,
16040x00050041,0x00000266,0x00001e24,0x000001b9,
16050x00000264,0x0004003d,0x00000007,0x00001e25,
16060x00001e24,0x00050051,0x00000006,0x00001f38,
16070x00001e25,0x00000000,0x00050095,0x0000013d,
16080x00001f3a,0x00001f38,0x00001e23,0x00050051,
16090x00000006,0x00001f3b,0x00001f3a,0x00000001,
16100x00050051,0x00000006,0x00001f3c,0x00001f3a,
16110x00000000,0x00050051,0x00000006,0x00001f3f,
16120x00001e25,0x00000001,0x00050080,0x00000006,
16130x00001f41,0x00001f3f,0x00001f3b,0x00050050,
16140x00000007,0x00001f42,0x00001f3c,0x00001f41,
16150x0004007c,0x00000014,0x00001f32,0x00001f42,
16160x00060041,0x0000016c,0x00001f29,0x00001f32,
16170x0000016b,0x0000016b,0x0006003d,0x00000006,
16180x00001f2a,0x00001f29,0x00000002,0x00000004,
16190x00050084,0x00000006,0x00001e28,0x0000133d,
16200x000001be,0x00050080,0x00000006,0x00001e2a,
16210x00001e28,0x000001be,0x000300f7,0x00001f4e,
16220x00000000,0x000400fa,0x00001ed3,0x00001f49,
16230x00001f4d,0x000200f8,0x00001f4d,0x000200f9,
16240x00001f4e,0x000200f8,0x00001f49,0x00050082,
16250x00000006,0x00001f4c,0x00001eab,0x00000142,
16260x000200f9,0x00001f4e,0x000200f8,0x00001f4e,
16270x000700f5,0x00000006,0x00005f4b,0x00001f4c,
16280x00001f49,0x00000138,0x00001f4d,0x0007000c,
16290x00000006,0x00001e2c,0x00000001,0x00000026,
16300x00001e2a,0x00005f4b,0x000200f9,0x00001e2e,
16310x000200f8,0x00001e2e,0x000700f5,0x00000006,
16320x00005f5f,0x00001f2a,0x00001f4e,0x00001e77,
16330x00001e78,0x000700f5,0x00000006,0x00005f4c,
16340x00001e28,0x00001f4e,0x00001e7a,0x00001e78,
16350x000500b0,0x0000002f,0x00001e32,0x00005f4c,
16360x00001e2c,0x000400f6,0x00001e7b,0x00001e78,
16370x00000000,0x000400fa,0x00001e32,0x00001e33,
16380x00001e7b,0x000200f8,0x00001e33,0x00050080,
16390x00000006,0x00001e36,0x00005f4c,0x00001340,
16400x000500b0,0x0000002f,0x00001e39,0x00001e36,
16410x00001e2c,0x000300f7,0x00001e43,0x00000000,
16420x000400fa,0x00001e39,0x00001e3a,0x00001e42,
16430x000200f8,0x00001e42,0x000200f9,0x00001e43,
16440x000200f8,0x00001e3a,0x000300f7,0x00001f9b,
16450x00000000,0x000400fa,0x00001ed3,0x00001f96,
16460x00001f9a,0x000200f8,0x00001f9a,0x000200f9,
16470x00001f9b,0x000200f8,0x00001f96,0x00050082,
16480x00000006,0x00001f99,0x00001eab,0x00000142,
16490x000200f9,0x00001f9b,0x000200f8,0x00001f9b,
16500x000700f5,0x00000006,0x00005f4d,0x00001f99,
16510x00001f96,0x00000138,0x00001f9a,0x00050084,
16520x00000006,0x00001f60,0x000000ec,0x00005f4d,
16530x00050080,0x00000006,0x00001f61,0x00001ea6,
16540x00001f60,0x000300f7,0x00001fa8,0x00000000,
16550x000400fa,0x00001ed3,0x00001fa3,0x00001fa7,
16560x000200f8,0x00001fa7,0x000200f9,0x00001fa8,
16570x000200f8,0x00001fa3,0x00050082,0x00000006,
16580x00001fa6,0x00001eab,0x00000142,0x000200f9,
16590x00001fa8,0x000200f8,0x00001fa8,0x000700f5,
16600x00000006,0x00005f4e,0x00001fa6,0x00001fa3,
16610x00000138,0x00001fa7,0x00050084,0x00000006,
16620x00001f5a,0x000000ec,0x00005f4e,0x00050080,
16630x00000006,0x00001f5b,0x00001f61,0x00001f5a,
16640x000300f7,0x00001fb5,0x00000000,0x000400fa,
16650x00001ed3,0x00001fb0,0x00001fb4,0x000200f8,
16660x00001fb4,0x000200f9,0x00001fb5,0x000200f8,
16670x00001fb0,0x00050082,0x00000006,0x00001fb3,
16680x00001eab,0x00000142,0x000200f9,0x00001fb5,
16690x000200f8,0x00001fb5,0x000700f5,0x00000006,
16700x00005f4f,0x00001fb3,0x00001fb0,0x00000138,
16710x00001fb4,0x00050084,0x00000006,0x00001f54,
16720x000000ec,0x00005f4f,0x00050080,0x00000006,
16730x00001f55,0x00001f5b,0x00001f54,0x00050084,
16740x00000006,0x00001e3d,0x000000ec,0x00001e36,
16750x00050080,0x00000006,0x00001e3e,0x00001f55,
16760x00001e3d,0x00050095,0x0000013d,0x00001fcf,
16770x00001f38,0x00001e3e,0x00050051,0x00000006,
16780x00001fd0,0x00001fcf,0x00000001,0x00050051,
16790x00000006,0x00001fd1,0x00001fcf,0x00000000,
16800x00050080,0x00000006,0x00001fd6,0x00001f3f,
16810x00001fd0,0x00050050,0x00000007,0x00001fd7,
16820x00001fd1,0x00001fd6,0x0004007c,0x00000014,
16830x00001fc7,0x00001fd7,0x00060041,0x0000016c,
16840x00001fbe,0x00001fc7,0x0000016b,0x0000016b,
16850x0006003d,0x00000006,0x00001fbf,0x00001fbe,
16860x00000002,0x00000004,0x000200f9,0x00001e43,
16870x000200f8,0x00001e43,0x000700f5,0x00000006,
16880x00005f50,0x00001fbf,0x00001fb5,0x00000138,
16890x00001e42,0x00050041,0x00000937,0x00001e47,
16900x00000eff,0x00001340,0x0003003e,0x00001e47,
16910x00005f50,0x000400e0,0x00000280,0x00000280,
16920x0000094f,0x000200f9,0x00001e48,0x000200f8,
16930x00001e48,0x000700f5,0x00000006,0x00005f51,
16940x00000142,0x00001e43,0x00001e61,0x00001e5f,
16950x000500b0,0x0000002f,0x00001e4b,0x00005f51,
16960x000001c4,0x000400f6,0x00001e62,0x00001e5f,
16970x00000000,0x000400fa,0x00001e4b,0x00001e4c,
16980x00001e62,0x000200f8,0x00001e4c,0x000500ae,
16990x0000002f,0x00001e4f,0x00001340,0x00005f51,
17000x000300f7,0x00001e57,0x00000000,0x000400fa,
17010x00001e4f,0x00001e50,0x00001e56,0x000200f8,
17020x00001e56,0x000200f9,0x00001e57,0x000200f8,
17030x00001e50,0x00050082,0x00000006,0x00001e53,
17040x00001340,0x00005f51,0x00050041,0x00000937,
17050x00001e54,0x00000eff,0x00001e53,0x0004003d,
17060x00000006,0x00001e55,0x00001e54,0x000200f9,
17070x00001e57,0x000200f8,0x00001e57,0x000700f5,
17080x00000006,0x00005f6c,0x00001e55,0x00001e50,
17090x00000138,0x00001e56,0x000400e0,0x00000280,
17100x00000280,0x0000094f,0x0004003d,0x00000006,
17110x00001e5c,0x00001e47,0x00050080,0x00000006,
17120x00001e5d,0x00001e5c,0x00005f6c,0x0003003e,
17130x00001e47,0x00001e5d,0x000400e0,0x00000280,
17140x00000280,0x0000094f,0x000200f9,0x00001e5f,
17150x000200f8,0x00001e5f,0x000500c4,0x00000006,
17160x00001e61,0x00005f51,0x00000264,0x000200f9,
17170x00001e48,0x000200f8,0x00001e62,0x000500ab,
17180x0000002f,0x00001e64,0x00005f50,0x00000138,
17190x000300f7,0x00001e73,0x00000000,0x000400fa,
17200x00001e64,0x00001e65,0x00001e73,0x000200f8,
17210x00001e65,0x000300f7,0x00002029,0x00000000,
17220x000400fa,0x00001ed3,0x00002024,0x00002028,
17230x000200f8,0x00002028,0x000200f9,0x00002029,
17240x000200f8,0x00002024,0x00050082,0x00000006,
17250x00002027,0x00001eab,0x00000142,0x000200f9,
17260x00002029,0x000200f8,0x00002029,0x000700f5,
17270x00000006,0x00005f52,0x00002027,0x00002024,
17280x00000138,0x00002028,0x00050084,0x00000006,
17290x00001fee,0x000000ec,0x00005f52,0x00050080,
17300x00000006,0x00001fef,0x00001ea6,0x00001fee,
17310x000300f7,0x00002036,0x00000000,0x000400fa,
17320x00001ed3,0x00002031,0x00002035,0x000200f8,
17330x00002035,0x000200f9,0x00002036,0x000200f8,
17340x00002031,0x00050082,0x00000006,0x00002034,
17350x00001eab,0x00000142,0x000200f9,0x00002036,
17360x000200f8,0x00002036,0x000700f5,0x00000006,
17370x00005f53,0x00002034,0x00002031,0x00000138,
17380x00002035,0x00050084,0x00000006,0x00001fe8,
17390x000000ec,0x00005f53,0x00050080,0x00000006,
17400x00001fe9,0x00001fef,0x00001fe8,0x000300f7,
17410x00002043,0x00000000,0x000400fa,0x00001ed3,
17420x0000203e,0x00002042,0x000200f8,0x00002042,
17430x000200f9,0x00002043,0x000200f8,0x0000203e,
17440x00050082,0x00000006,0x00002041,0x00001eab,
17450x00000142,0x000200f9,0x00002043,0x000200f8,
17460x00002043,0x000700f5,0x00000006,0x00005f54,
17470x00002041,0x0000203e,0x00000138,0x00002042,
17480x00050084,0x00000006,0x00001fe2,0x000000ec,
17490x00005f54,0x00050080,0x00000006,0x00001fe3,
17500x00001fe9,0x00001fe2,0x000300f7,0x00002050,
17510x00000000,0x000400fa,0x00001ed3,0x0000204b,
17520x0000204f,0x000200f8,0x0000204f,0x000200f9,
17530x00002050,0x000200f8,0x0000204b,0x00050082,
17540x00000006,0x0000204e,0x00001eab,0x00000142,
17550x000200f9,0x00002050,0x000200f8,0x00002050,
17560x000700f5,0x00000006,0x00005f55,0x0000204e,
17570x0000204b,0x00000138,0x0000204f,0x00050084,
17580x00000006,0x00001fdc,0x000000ec,0x00005f55,
17590x00050080,0x00000006,0x00001fdd,0x00001fe3,
17600x00001fdc,0x00050084,0x00000006,0x00001e68,
17610x000000ec,0x00001e36,0x00050080,0x00000006,
17620x00001e69,0x00001fdd,0x00001e68,0x0004003d,
17630x00000006,0x00001e6d,0x00001e47,0x00050080,
17640x00000006,0x00001e6e,0x00005f5f,0x00001e6d,
17650x00050082,0x00000006,0x00001e6f,0x00001e6e,
17660x00000142,0x00050095,0x0000013d,0x00002069,
17670x00001f38,0x00001e69,0x00050051,0x00000006,
17680x0000206a,0x00002069,0x00000001,0x00050051,
17690x00000006,0x0000206b,0x00002069,0x00000000,
17700x00050080,0x00000006,0x00002070,0x00001f3f,
17710x0000206a,0x00050050,0x00000007,0x00002071,
17720x0000206b,0x00002070,0x0004007c,0x00000014,
17730x00002061,0x00002071,0x00060041,0x0000016c,
17740x00002059,0x00002061,0x0000016b,0x0000016b,
17750x0005003e,0x00002059,0x00001e6f,0x00000002,
17760x00000004,0x000200f9,0x00001e73,0x000200f8,
17770x00001e73,0x00050041,0x00000937,0x00001e74,
17780x00000eff,0x00000b9b,0x0004003d,0x00000006,
17790x00001e75,0x00001e74,0x00050080,0x00000006,
17800x00001e77,0x00005f5f,0x00001e75,0x000400e0,
17810x00000280,0x00000280,0x0000094f,0x000200f9,
17820x00001e78,0x000200f8,0x00001e78,0x00050080,
17830x00000006,0x00001e7a,0x00005f4c,0x000001c4,
17840x000200f9,0x00001e2e,0x000200f8,0x00001e7b,
17850x000200f9,0x000013fd,0x000200f8,0x0000133a,
17860x000500aa,0x0000002f,0x00001345,0x000012df,
17870x00000355,0x000300f7,0x00001347,0x00000000,
17880x000400fa,0x00001345,0x00001346,0x00001347,
17890x000200f8,0x00001346,0x000500aa,0x0000002f,
17900x00001349,0x000012dd,0x00000138,0x000300f7,
17910x0000134b,0x00000000,0x000400fa,0x00001349,
17920x0000134a,0x0000134b,0x000200f8,0x0000134a,
17930x000300f7,0x0000212c,0x00000000,0x000300fb,
17940x00000138,0x000020b3,0x000200f8,0x000020b3,
17950x000300f7,0x00002167,0x00000000,0x000300fb,
17960x00000138,0x00002139,0x000200f8,0x00002139,
17970x00050041,0x000001bb,0x00002188,0x000001b9,
17980x000001ba,0x0004003d,0x00000006,0x00002189,
17990x00002188,0x00050084,0x00000006,0x0000218a,
18000x000001db,0x00002189,0x00050080,0x00000006,
18010x0000218b,0x000001c4,0x0000218a,0x00050080,
18020x00000006,0x00002191,0x00002189,0x0000062f,
18030x00050086,0x00000006,0x00002192,0x00002191,
18040x000001be,0x00050084,0x00000006,0x00002184,
18050x000001c4,0x00002192,0x00050080,0x00000006,
18060x00002185,0x0000218b,0x00002184,0x00050080,
18070x00000006,0x0000217f,0x00002185,0x00002184,
18080x00050041,0x000001bb,0x00002176,0x000001b9,
18090x000001f0,0x0004003d,0x00000006,0x00002177,
18100x00002176,0x00050084,0x00000006,0x00002178,
18110x000001ef,0x00002177,0x00050080,0x00000006,
18120x00002179,0x0000217f,0x00002178,0x00050041,
18130x00000266,0x00002170,0x000001b9,0x00000264,
18140x0004003d,0x00000007,0x00002171,0x00002170,
18150x00050051,0x00000006,0x000021a7,0x00002171,
18160x00000000,0x00050095,0x0000013d,0x000021a9,
18170x000021a7,0x00002179,0x00050051,0x00000006,
18180x000021aa,0x000021a9,0x00000001,0x00050051,
18190x00000006,0x000021ab,0x000021a9,0x00000000,
18200x00050051,0x00000006,0x000021ae,0x00002171,
18210x00000001,0x00050080,0x00000006,0x000021b0,
18220x000021ae,0x000021aa,0x00050050,0x00000007,
18230x000021b1,0x000021ab,0x000021b0,0x0004007c,
18240x00000014,0x000021a1,0x000021b1,0x000200f9,
18250x0000213c,0x000200f8,0x0000213c,0x000700f5,
18260x00000006,0x00005f35,0x00000138,0x00002139,
18270x0000214a,0x00002140,0x000500b0,0x0000002f,
18280x0000213f,0x00005f35,0x00000355,0x000400f6,
18290x0000214b,0x00002140,0x00000000,0x000400fa,
18300x0000213f,0x00002140,0x0000214b,0x000200f8,
18310x00002140,0x00050080,0x00000006,0x00002144,
18320x00000142,0x00005f35,0x00060041,0x0000016c,
18330x00002145,0x000021a1,0x0000016b,0x00002144,
18340x000700f1,0x00000006,0x00002146,0x00002145,
18350x00000142,0x00000138,0x00000138,0x00050041,
18360x00000009,0x00002147,0x00002131,0x00005f35,
18370x0003003e,0x00002147,0x00002146,0x00050080,
18380x00000006,0x0000214a,0x00005f35,0x00000264,
18390x000200f9,0x0000213c,0x000200f8,0x0000214b,
18400x00050041,0x00000009,0x0000214c,0x00002131,
18410x0000016b,0x0004003d,0x00000006,0x0000214d,
18420x0000214c,0x000500aa,0x0000002f,0x0000214e,
18430x0000214d,0x00000539,0x000300f7,0x00002152,
18440x00000000,0x000400fa,0x0000214e,0x0000214f,
18450x00002152,0x000200f8,0x0000214f,0x000200f9,
18460x00002167,0x000200f8,0x00002152,0x0004003d,
18470x00000006,0x00002154,0x0000214c,0x000500c7,
18480x00000006,0x000021b6,0x00002154,0x00000241,
18490x000500ab,0x0000002f,0x000021b7,0x000021b6,
18500x00000138,0x000300f7,0x000021be,0x00000000,
18510x000400fa,0x000021b7,0x000021b8,0x000021bb,
18520x000200f8,0x000021bb,0x000400c8,0x00000006,
18530x000021bd,0x00002154,0x000200f9,0x000021be,
18540x000200f8,0x000021b8,0x000500c7,0x00000006,
18550x000021ba,0x00002154,0x00000256,0x000200f9,
18560x000021be,0x000200f8,0x000021be,0x000700f5,
18570x00000006,0x00005f36,0x000021ba,0x000021b8,
18580x000021bd,0x000021bb,0x0004007c,0x00000027,
18590x000021c0,0x00005f36,0x00050041,0x00000009,
18600x00002156,0x00002131,0x00000264,0x0004003d,
18610x00000006,0x00002157,0x00002156,0x000500c7,
18620x00000006,0x000021c5,0x00002157,0x00000241,
18630x000500ab,0x0000002f,0x000021c6,0x000021c5,
18640x00000138,0x000300f7,0x000021cd,0x00000000,
18650x000400fa,0x000021c6,0x000021c7,0x000021ca,
18660x000200f8,0x000021ca,0x000400c8,0x00000006,
18670x000021cc,0x00002157,0x000200f9,0x000021cd,
18680x000200f8,0x000021c7,0x000500c7,0x00000006,
18690x000021c9,0x00002157,0x00000256,0x000200f9,
18700x000021cd,0x000200f8,0x000021cd,0x000700f5,
18710x00000006,0x00005f37,0x000021c9,0x000021c7,
18720x000021cc,0x000021ca,0x0004007c,0x00000027,
18730x000021cf,0x00005f37,0x00050041,0x00000009,
18740x00002159,0x00002131,0x00000315,0x0004003d,
18750x00000006,0x0000215a,0x00002159,0x000500c7,
18760x00000006,0x000021d4,0x0000215a,0x00000241,
18770x000500ab,0x0000002f,0x000021d5,0x000021d4,
18780x00000138,0x000300f7,0x000021dc,0x00000000,
18790x000400fa,0x000021d5,0x000021d6,0x000021d9,
18800x000200f8,0x000021d9,0x000400c8,0x00000006,
18810x000021db,0x0000215a,0x000200f9,0x000021dc,
18820x000200f8,0x000021d6,0x000500c7,0x00000006,
18830x000021d8,0x0000215a,0x00000256,0x000200f9,
18840x000021dc,0x000200f8,0x000021dc,0x000700f5,
18850x00000006,0x00005f38,0x000021d8,0x000021d6,
18860x000021db,0x000021d9,0x0004007c,0x00000027,
18870x000021de,0x00005f38,0x00060050,0x0000006c,
18880x0000215c,0x000021c0,0x000021cf,0x000021de,
18890x00050041,0x00000009,0x0000215d,0x00002131,
18900x0000031d,0x0004003d,0x00000006,0x0000215e,
18910x0000215d,0x000500c7,0x00000006,0x000021e3,
18920x0000215e,0x00000241,0x000500ab,0x0000002f,
18930x000021e4,0x000021e3,0x00000138,0x000300f7,
18940x000021eb,0x00000000,0x000400fa,0x000021e4,
18950x000021e5,0x000021e8,0x000200f8,0x000021e8,
18960x000400c8,0x00000006,0x000021ea,0x0000215e,
18970x000200f9,0x000021eb,0x000200f8,0x000021e5,
18980x000500c7,0x00000006,0x000021e7,0x0000215e,
18990x00000256,0x000200f9,0x000021eb,0x000200f8,
19000x000021eb,0x000700f5,0x00000006,0x00005f39,
19010x000021e7,0x000021e5,0x000021ea,0x000021e8,
19020x0004007c,0x00000027,0x000021ed,0x00005f39,
19030x00050041,0x00000009,0x00002160,0x00002131,
19040x00000325,0x0004003d,0x00000006,0x00002161,
19050x00002160,0x000500c7,0x00000006,0x000021f2,
19060x00002161,0x00000241,0x000500ab,0x0000002f,
19070x000021f3,0x000021f2,0x00000138,0x000300f7,
19080x000021fa,0x00000000,0x000400fa,0x000021f3,
19090x000021f4,0x000021f7,0x000200f8,0x000021f7,
19100x000400c8,0x00000006,0x000021f9,0x00002161,
19110x000200f9,0x000021fa,0x000200f8,0x000021f4,
19120x000500c7,0x00000006,0x000021f6,0x00002161,
19130x00000256,0x000200f9,0x000021fa,0x000200f8,
19140x000021fa,0x000700f5,0x00000006,0x00005f3a,
19150x000021f6,0x000021f4,0x000021f9,0x000021f7,
19160x0004007c,0x00000027,0x000021fc,0x00005f3a,
19170x00050041,0x00000009,0x00002163,0x00002131,
19180x0000032d,0x0004003d,0x00000006,0x00002164,
19190x00002163,0x000500c7,0x00000006,0x00002201,
19200x00002164,0x00000241,0x000500ab,0x0000002f,
19210x00002202,0x00002201,0x00000138,0x000300f7,
19220x00002209,0x00000000,0x000400fa,0x00002202,
19230x00002203,0x00002206,0x000200f8,0x00002206,
19240x000400c8,0x00000006,0x00002208,0x00002164,
19250x000200f9,0x00002209,0x000200f8,0x00002203,
19260x000500c7,0x00000006,0x00002205,0x00002164,
19270x00000256,0x000200f9,0x00002209,0x000200f8,
19280x00002209,0x000700f5,0x00000006,0x00005f3b,
19290x00002205,0x00002203,0x00002208,0x00002206,
19300x0004007c,0x00000027,0x0000220b,0x00005f3b,
19310x00060050,0x0000006c,0x00002166,0x000021ed,
19320x000021fc,0x0000220b,0x000200f9,0x00002167,
19330x000200f8,0x00002167,0x000700f5,0x0000006c,
19340x00005f40,0x000060fe,0x0000214f,0x00002166,
19350x00002209,0x000700f5,0x0000006c,0x00005f3c,
19360x00000576,0x0000214f,0x0000215c,0x00002209,
19370x00050041,0x00000266,0x000020b7,0x000001b9,
19380x0000016b,0x0004003d,0x00000007,0x000020b8,
19390x000020b7,0x00050051,0x00000027,0x000020ba,
19400x00005f3c,0x00000000,0x0004007c,0x00000006,
19410x00002211,0x000020ba,0x00050051,0x00000006,
19420x0000222a,0x000020b8,0x00000000,0x00050095,
19430x0000013d,0x0000222c,0x0000222a,0x000001db,
19440x00050051,0x00000006,0x0000222d,0x0000222c,
19450x00000001,0x00050051,0x00000006,0x0000222e,
19460x0000222c,0x00000000,0x00050051,0x00000006,
19470x00002231,0x000020b8,0x00000001,0x00050080,
19480x00000006,0x00002233,0x00002231,0x0000222d,
19490x00050050,0x00000007,0x00002234,0x0000222e,
19500x00002233,0x0004007c,0x00000014,0x00002224,
19510x00002234,0x00060041,0x0000016c,0x0000221c,
19520x00002224,0x0000016b,0x0000016b,0x0005003e,
19530x0000221c,0x00002211,0x00000002,0x00000004,
19540x00050051,0x00000027,0x000020bf,0x00005f3c,
19550x00000001,0x0004007c,0x00000006,0x0000223a,
19560x000020bf,0x00050095,0x0000013d,0x00002255,
19570x0000222a,0x00000299,0x00050051,0x00000006,
19580x00002256,0x00002255,0x00000001,0x00050051,
19590x00000006,0x00002257,0x00002255,0x00000000,
19600x00050080,0x00000006,0x0000225c,0x00002231,
19610x00002256,0x00050050,0x00000007,0x0000225d,
19620x00002257,0x0000225c,0x0004007c,0x00000014,
19630x0000224d,0x0000225d,0x00060041,0x0000016c,
19640x00002245,0x0000224d,0x0000016b,0x0000016b,
19650x0005003e,0x00002245,0x0000223a,0x00000002,
19660x00000004,0x00050051,0x00000027,0x000020c4,
19670x00005f3c,0x00000002,0x0004007c,0x00000006,
19680x00002263,0x000020c4,0x00050095,0x0000013d,
19690x0000227e,0x0000222a,0x000001ef,0x00050051,
19700x00000006,0x0000227f,0x0000227e,0x00000001,
19710x00050051,0x00000006,0x00002280,0x0000227e,
19720x00000000,0x00050080,0x00000006,0x00002285,
19730x00002231,0x0000227f,0x00050050,0x00000007,
19740x00002286,0x00002280,0x00002285,0x0004007c,
19750x00000014,0x00002276,0x00002286,0x00060041,
19760x0000016c,0x0000226e,0x00002276,0x0000016b,
19770x0000016b,0x0005003e,0x0000226e,0x00002263,
19880x00000002,0x00000004,0x00050051,0x00000027, 19780x00000002,0x00000004,0x00050051,0x00000027,
19890x00001fca,0x00005b10,0x00000001,0x0004007c, 19790x000020c9,0x00005f40,0x00000000,0x0004007c,
19900x00000006,0x000021b1,0x00001fca,0x00050095, 19800x00000006,0x0000228c,0x000020c9,0x00050095,
19910x00000130,0x000021cc,0x00002126,0x000001cc, 19810x0000013d,0x000022a7,0x0000222a,0x000006d9,
19920x00050051,0x00000006,0x000021cd,0x000021cc, 19820x00050051,0x00000006,0x000022a8,0x000022a7,
19930x00000001,0x00050051,0x00000006,0x000021ce, 19830x00000001,0x00050051,0x00000006,0x000022a9,
19940x000021cc,0x00000000,0x00050080,0x00000006, 19840x000022a7,0x00000000,0x00050080,0x00000006,
19950x000021d3,0x0000212d,0x000021cd,0x00050050, 19850x000022ae,0x00002231,0x000022a8,0x00050050,
19960x00000007,0x000021d4,0x000021ce,0x000021d3, 19860x00000007,0x000022af,0x000022a9,0x000022ae,
19970x0004007c,0x00000014,0x000021c4,0x000021d4, 19870x0004007c,0x00000014,0x0000229f,0x000022af,
19980x00060041,0x0000015f,0x000021bc,0x000021c4, 19880x00060041,0x0000016c,0x00002297,0x0000229f,
19990x0000015e,0x0000015e,0x0005003e,0x000021bc, 19890x0000016b,0x0000016b,0x0005003e,0x00002297,
20000x000021b1,0x00000002,0x00000004,0x00050051, 19900x0000228c,0x00000002,0x00000004,0x00050051,
20010x00000027,0x00001fcf,0x00005b10,0x00000002, 19910x00000027,0x000020ce,0x00005f40,0x00000001,
20020x0004007c,0x00000006,0x000021da,0x00001fcf, 19920x0004007c,0x00000006,0x000022b5,0x000020ce,
20030x00050095,0x00000130,0x000021f5,0x00002126, 19930x00050095,0x0000013d,0x000022d0,0x0000222a,
20040x000004c7,0x00050051,0x00000006,0x000021f6, 19940x00000205,0x00050051,0x00000006,0x000022d1,
20050x000021f5,0x00000001,0x00050051,0x00000006, 19950x000022d0,0x00000001,0x00050051,0x00000006,
20060x000021f7,0x000021f5,0x00000000,0x00050080, 19960x000022d2,0x000022d0,0x00000000,0x00050080,
20070x00000006,0x000021fc,0x0000212d,0x000021f6, 19970x00000006,0x000022d7,0x00002231,0x000022d1,
20080x00050050,0x00000007,0x000021fd,0x000021f7, 19980x00050050,0x00000007,0x000022d8,0x000022d2,
20090x000021fc,0x0004007c,0x00000014,0x000021ed, 19990x000022d7,0x0004007c,0x00000014,0x000022c8,
20100x000021fd,0x00060041,0x0000015f,0x000021e5, 20000x000022d8,0x00060041,0x0000016c,0x000022c0,
20110x000021ed,0x0000015e,0x0000015e,0x0005003e, 20010x000022c8,0x0000016b,0x0000016b,0x0005003e,
20120x000021e5,0x000021da,0x00000002,0x00000004, 20020x000022c0,0x000022b5,0x00000002,0x00000004,
20130x00050041,0x00000182,0x00001fd1,0x00000180, 20030x00050051,0x00000027,0x000020d3,0x00005f40,
20140x000003fb,0x0004003d,0x00000006,0x00001fd2, 20040x00000002,0x0004007c,0x00000006,0x000022de,
20150x00001fd1,0x000500aa,0x0000002f,0x00001fd3, 20050x000020d3,0x00050095,0x0000013d,0x000022f9,
20160x00001fd2,0x00000135,0x000300f7,0x00001fd5, 20060x0000222a,0x00000500,0x00050051,0x00000006,
20170x00000000,0x000400fa,0x00001fd3,0x00001fd4, 20070x000022fa,0x000022f9,0x00000001,0x00050051,
20180x00001fd5,0x000200f8,0x00001fd4,0x000200f9, 20080x00000006,0x000022fb,0x000022f9,0x00000000,
20190x00002028,0x000200f8,0x00001fd5,0x000500b2, 20090x00050080,0x00000006,0x00002300,0x00002231,
20200x0000002f,0x00001fd8,0x00002073,0x00000135, 20100x000022fa,0x00050050,0x00000007,0x00002301,
20210x000300f7,0x00001fde,0x00000000,0x000400fa, 20110x000022fb,0x00002300,0x0004007c,0x00000014,
20220x00001fd8,0x00001fd9,0x00001fda,0x000200f8, 20120x000022f1,0x00002301,0x00060041,0x0000016c,
20230x00001fda,0x00050095,0x00000130,0x00002216, 20130x000022e9,0x000022f1,0x0000016b,0x0000016b,
20240x000020a3,0x000001b6,0x00050051,0x00000006, 20140x0005003e,0x000022e9,0x000022de,0x00000002,
20250x00002217,0x00002216,0x00000001,0x00050051, 20150x00000004,0x00050041,0x000001bb,0x000020d5,
20260x00000006,0x00002218,0x00002216,0x00000000, 20160x000001b9,0x00000434,0x0004003d,0x00000006,
20270x00050080,0x00000006,0x0000221d,0x000020aa, 20170x000020d6,0x000020d5,0x000500aa,0x0000002f,
20280x00002217,0x00050050,0x00000007,0x0000221e, 20180x000020d7,0x000020d6,0x00000142,0x000300f7,
20290x00002218,0x0000221d,0x0004007c,0x00000014, 20190x000020d9,0x00000000,0x000400fa,0x000020d7,
20300x0000220e,0x0000221e,0x00060041,0x0000015f, 20200x000020d8,0x000020d9,0x000200f8,0x000020d8,
20310x00002205,0x0000220e,0x0000015e,0x0000015e, 20210x000200f9,0x0000212c,0x000200f8,0x000020d9,
20320x0006003d,0x00000006,0x00002206,0x00002205, 20220x000500b2,0x0000002f,0x000020dc,0x00002177,
20330x00000002,0x00000004,0x000200f9,0x00001fde, 20230x00000142,0x000300f7,0x000020e2,0x00000000,
20340x000200f8,0x00001fd9,0x000200f9,0x00001fde, 20240x000400fa,0x000020dc,0x000020dd,0x000020de,
20350x000200f8,0x00001fde,0x000700f5,0x00000006, 20250x000200f8,0x000020de,0x00050095,0x0000013d,
20360x00005b11,0x00000135,0x00001fd9,0x00002206, 20260x0000231a,0x000021a7,0x000001ef,0x00050051,
20370x00001fda,0x00050041,0x00000182,0x00001fe0, 20270x00000006,0x0000231b,0x0000231a,0x00000001,
20380x00000180,0x00000321,0x0004003d,0x00000006, 20280x00050051,0x00000006,0x0000231c,0x0000231a,
20390x00001fe1,0x00001fe0,0x00050041,0x00000182, 20290x00000000,0x00050080,0x00000006,0x00002321,
20400x00002225,0x00000180,0x000002fb,0x0004003d, 20300x000021ae,0x0000231b,0x00050050,0x00000007,
20410x00000006,0x00002226,0x00002225,0x000500c7, 20310x00002322,0x0000231c,0x00002321,0x0004007c,
20420x00000006,0x00002227,0x00002226,0x00000247, 20320x00000014,0x00002312,0x00002322,0x00060041,
20430x000500ab,0x0000002f,0x00002228,0x00002227, 20330x0000016c,0x00002309,0x00002312,0x0000016b,
20440x0000012b,0x000600a9,0x00000006,0x00002222, 20340x0000016b,0x0006003d,0x00000006,0x0000230a,
20450x00002228,0x0000018b,0x00000309,0x00050084, 20350x00002309,0x00000002,0x00000004,0x000200f9,
20460x00000006,0x00001fe4,0x00002222,0x00005b11, 20360x000020e2,0x000200f8,0x000020dd,0x000200f9,
20470x00050080,0x00000006,0x00001fe5,0x00001fe1, 20370x000020e2,0x000200f8,0x000020e2,0x000700f5,
20480x00001fe4,0x000300f7,0x00001ffa,0x00000000, 20380x00000006,0x00005f41,0x00000142,0x000020dd,
20490x000400fa,0x00002228,0x00001fe7,0x00001ffa, 20390x0000230a,0x000020de,0x00050041,0x000001bb,
20500x000200f8,0x00001fe7,0x000200f9,0x00001fe8, 20400x000020e4,0x000001b9,0x0000035a,0x0004003d,
20510x000200f8,0x00001fe8,0x000700f5,0x00000006, 20410x00000006,0x000020e5,0x000020e4,0x00050041,
20520x00005b12,0x0000012b,0x00001fe7,0x00001ff6, 20420x000001bb,0x00002329,0x000001b9,0x00000334,
20530x00001fec,0x000500b0,0x0000002f,0x00001feb, 20430x0004003d,0x00000006,0x0000232a,0x00002329,
20540x00005b12,0x000001a2,0x000400f6,0x00001ff7, 20440x000500c7,0x00000006,0x0000232b,0x0000232a,
20550x00001fec,0x00000000,0x000400fa,0x00001feb, 20450x00000280,0x000500ab,0x0000002f,0x0000232c,
20560x00001fec,0x00001ff7,0x000200f8,0x00001fec, 20460x0000232b,0x00000138,0x000600a9,0x00000006,
20570x00050084,0x00000006,0x00001fef,0x000000df, 20470x00002326,0x0000232c,0x000001c4,0x00000342,
20580x00005b12,0x00050080,0x00000006,0x00001ff0, 20480x00050084,0x00000006,0x000020e8,0x00002326,
20590x00001fe5,0x00001fef,0x00050095,0x00000130, 20490x00005f41,0x00050080,0x00000006,0x000020e9,
20600x00002246,0x00002126,0x00001ff0,0x00050051, 20500x000020e5,0x000020e8,0x000300f7,0x000020fe,
20610x00000006,0x00002247,0x00002246,0x00000001, 20510x00000000,0x000400fa,0x0000232c,0x000020eb,
20620x00050051,0x00000006,0x00002248,0x00002246, 20520x000020fe,0x000200f8,0x000020eb,0x000200f9,
20630x00000000,0x00050080,0x00000006,0x0000224d, 20530x000020ec,0x000200f8,0x000020ec,0x000700f5,
20640x0000212d,0x00002247,0x00050050,0x00000007, 20540x00000006,0x00005f42,0x00000138,0x000020eb,
20650x0000224e,0x00002248,0x0000224d,0x0004007c, 20550x000020fa,0x000020f0,0x000500b0,0x0000002f,
20660x00000014,0x0000223e,0x0000224e,0x00060041, 20560x000020ef,0x00005f42,0x000001db,0x000400f6,
20670x0000015f,0x00002236,0x0000223e,0x0000015e, 20570x000020fb,0x000020f0,0x00000000,0x000400fa,
20680x0000015e,0x0005003e,0x00002236,0x0000012b, 20580x000020ef,0x000020f0,0x000020fb,0x000200f8,
20690x00000002,0x00000004,0x00050080,0x00000006, 20590x000020f0,0x00050084,0x00000006,0x000020f3,
20700x00001ff6,0x00005b12,0x0000022b,0x000200f9, 20600x000000ec,0x00005f42,0x00050080,0x00000006,
20710x00001fe8,0x000200f8,0x00001ff7,0x00050080, 20610x000020f4,0x000020e9,0x000020f3,0x00050095,
20720x00000006,0x00001ff9,0x00001fe5,0x0000018b, 20620x0000013d,0x0000234a,0x0000222a,0x000020f4,
20730x000200f9,0x00001ffa,0x000200f8,0x00001ffa, 20630x00050051,0x00000006,0x0000234b,0x0000234a,
20740x000700f5,0x00000006,0x00005b14,0x00001fe5, 20640x00000001,0x00050051,0x00000006,0x0000234c,
20750x00001fde,0x00001ff9,0x00001ff7,0x000500c7, 20650x0000234a,0x00000000,0x00050080,0x00000006,
20760x00000006,0x00002253,0x00002226,0x00000135, 20660x00002351,0x00002231,0x0000234b,0x00050050,
20770x000500ab,0x0000002f,0x00002254,0x00002253, 20670x00000007,0x00002352,0x0000234c,0x00002351,
20780x0000012b,0x000600a9,0x00000006,0x00001ffd, 20680x0004007c,0x00000014,0x00002342,0x00002352,
20790x00002254,0x0000031c,0x00005cd3,0x00050095, 20690x00060041,0x0000016c,0x0000233a,0x00002342,
20800x00000130,0x0000226c,0x00002126,0x0000012b, 20700x0000016b,0x0000016b,0x0005003e,0x0000233a,
20810x00050051,0x00000006,0x0000226d,0x0000226c, 20710x00000138,0x00000002,0x00000004,0x00050080,
20820x00000001,0x00050051,0x00000006,0x0000226e, 20720x00000006,0x000020fa,0x00005f42,0x00000264,
20830x0000226c,0x00000000,0x00050080,0x00000006, 20730x000200f9,0x000020ec,0x000200f8,0x000020fb,
20840x00002273,0x0000212d,0x0000226d,0x00050050, 20740x00050080,0x00000006,0x000020fd,0x000020e9,
20850x00000007,0x00002274,0x0000226e,0x00002273, 20750x000001c4,0x000200f9,0x000020fe,0x000200f8,
20860x0004007c,0x00000014,0x00002264,0x00002274, 20760x000020fe,0x000700f5,0x00000006,0x00005f44,
20870x00060041,0x0000015f,0x0000225c,0x00002264, 20770x000020e9,0x000020e2,0x000020fd,0x000020fb,
20880x0000015e,0x0000015e,0x0005003e,0x0000225c, 20780x000500c7,0x00000006,0x00002357,0x0000232a,
20890x00001ffd,0x00000002,0x00000004,0x00050086, 20790x00000142,0x000500ab,0x0000002f,0x00002358,
20900x00000006,0x00002002,0x00005b14,0x0000018b, 20800x00002357,0x00000138,0x000600a9,0x00000006,
20910x00050082,0x00000006,0x00002003,0x00002002, 20810x00002101,0x00002358,0x00000355,0x0000610e,
20920x00000135,0x00050095,0x00000130,0x0000228c, 20820x00050095,0x0000013d,0x00002370,0x0000222a,
20930x00002126,0x000000df,0x00050051,0x00000006, 20830x00000138,0x00050051,0x00000006,0x00002371,
20940x0000228d,0x0000228c,0x00000001,0x00050051, 20840x00002370,0x00000001,0x00050051,0x00000006,
20950x00000006,0x0000228e,0x0000228c,0x00000000, 20850x00002372,0x00002370,0x00000000,0x00050080,
20960x00050080,0x00000006,0x00002293,0x0000212d, 20860x00000006,0x00002377,0x00002231,0x00002371,
20970x0000228d,0x00050050,0x00000007,0x00002294, 20870x00050050,0x00000007,0x00002378,0x00002372,
20980x0000228e,0x00002293,0x0004007c,0x00000014, 20880x00002377,0x0004007c,0x00000014,0x00002368,
20990x00002284,0x00002294,0x00060041,0x0000015f, 20890x00002378,0x00060041,0x0000016c,0x00002360,
21000x0000227c,0x00002284,0x0000015e,0x0000015e, 20900x00002368,0x0000016b,0x0000016b,0x0005003e,
21010x0005003e,0x0000227c,0x00002003,0x00000002, 20910x00002360,0x00002101,0x00000002,0x00000004,
21020x00000004,0x00050095,0x00000130,0x000022ac, 20920x00050086,0x00000006,0x00002106,0x00005f44,
21030x00002126,0x00000194,0x00050051,0x00000006, 20930x000001c4,0x00050082,0x00000006,0x00002107,
21040x000022ad,0x000022ac,0x00000001,0x00050051, 20940x00002106,0x00000142,0x00050095,0x0000013d,
21050x00000006,0x000022ae,0x000022ac,0x00000000, 20950x00002390,0x0000222a,0x000000ec,0x00050051,
21060x00050080,0x00000006,0x000022b3,0x0000212d, 20960x00000006,0x00002391,0x00002390,0x00000001,
21070x000022ad,0x00050050,0x00000007,0x000022b4, 20970x00050051,0x00000006,0x00002392,0x00002390,
21080x000022ae,0x000022b3,0x0004007c,0x00000014, 20980x00000000,0x00050080,0x00000006,0x00002397,
21090x000022a4,0x000022b4,0x00060041,0x0000015f, 20990x00002231,0x00002391,0x00050050,0x00000007,
21100x0000229c,0x000022a4,0x0000015e,0x0000015e, 21000x00002398,0x00002392,0x00002397,0x0004007c,
21110x0005003e,0x0000229c,0x0000012b,0x00000002, 21010x00000014,0x00002388,0x00002398,0x00060041,
21120x00000004,0x00050095,0x00000130,0x000022cc, 21020x0000016c,0x00002380,0x00002388,0x0000016b,
21130x00002126,0x0000019b,0x00050051,0x00000006, 21030x0000016b,0x0005003e,0x00002380,0x00002107,
21140x000022cd,0x000022cc,0x00000001,0x00050051, 21040x00000002,0x00000004,0x00050095,0x0000013d,
21150x00000006,0x000022ce,0x000022cc,0x00000000, 21050x000023b0,0x0000222a,0x000001cd,0x00050051,
21160x00050080,0x00000006,0x000022d3,0x0000212d, 21060x00000006,0x000023b1,0x000023b0,0x00000001,
21170x000022cd,0x00050050,0x00000007,0x000022d4, 21070x00050051,0x00000006,0x000023b2,0x000023b0,
21180x000022ce,0x000022d3,0x0004007c,0x00000014, 21080x00000000,0x00050080,0x00000006,0x000023b7,
21190x000022c4,0x000022d4,0x00060041,0x0000015f, 21090x00002231,0x000023b1,0x00050050,0x00000007,
21200x000022bc,0x000022c4,0x0000015e,0x0000015e, 21100x000023b8,0x000023b2,0x000023b7,0x0004007c,
21210x0005003e,0x000022bc,0x00002073,0x00000002, 21110x00000014,0x000023a8,0x000023b8,0x00060041,
21220x00000004,0x00050095,0x00000130,0x000022ec, 21120x0000016c,0x000023a0,0x000023a8,0x0000016b,
21230x00002126,0x000004d2,0x00050051,0x00000006, 21130x0000016b,0x0005003e,0x000023a0,0x00000138,
21240x000022ed,0x000022ec,0x00000001,0x00050051, 21140x00000002,0x00000004,0x00050095,0x0000013d,
21250x00000006,0x000022ee,0x000022ec,0x00000000, 21150x000023d0,0x0000222a,0x000001d4,0x00050051,
21260x00050080,0x00000006,0x000022f3,0x0000212d, 21160x00000006,0x000023d1,0x000023d0,0x00000001,
21270x000022ed,0x00050050,0x00000007,0x000022f4, 21170x00050051,0x00000006,0x000023d2,0x000023d0,
21280x000022ee,0x000022f3,0x0004007c,0x00000014, 21180x00000000,0x00050080,0x00000006,0x000023d7,
21290x000022e4,0x000022f4,0x00060041,0x0000015f, 21190x00002231,0x000023d1,0x00050050,0x00000007,
21300x000022dc,0x000022e4,0x0000015e,0x0000015e, 21200x000023d8,0x000023d2,0x000023d7,0x0004007c,
21310x0005003e,0x000022dc,0x00001fe1,0x00000002, 21210x00000014,0x000023c8,0x000023d8,0x00060041,
21320x00000004,0x00050095,0x00000130,0x0000230c, 21220x0000016c,0x000023c0,0x000023c8,0x0000016b,
21330x00002126,0x000004dd,0x00050051,0x00000006, 21230x0000016b,0x0005003e,0x000023c0,0x00002177,
21340x0000230d,0x0000230c,0x00000001,0x00050051, 21240x00000002,0x00000004,0x00050095,0x0000013d,
21350x00000006,0x0000230e,0x0000230c,0x00000000, 21250x000023f0,0x0000222a,0x0000050b,0x00050051,
21360x00050080,0x00000006,0x00002313,0x0000212d, 21260x00000006,0x000023f1,0x000023f0,0x00000001,
21370x0000230d,0x00050050,0x00000007,0x00002314, 21270x00050051,0x00000006,0x000023f2,0x000023f0,
21380x0000230e,0x00002313,0x0004007c,0x00000014, 21280x00000000,0x00050080,0x00000006,0x000023f7,
21390x00002304,0x00002314,0x00060041,0x0000015f, 21290x00002231,0x000023f1,0x00050050,0x00000007,
21400x000022fc,0x00002304,0x0000015e,0x0000015e, 21300x000023f8,0x000023f2,0x000023f7,0x0004007c,
21410x0005003e,0x000022fc,0x0000012b,0x00000002, 21310x00000014,0x000023e8,0x000023f8,0x00060041,
21420x00000004,0x000500c2,0x00000006,0x0000231d, 21320x0000016c,0x000023e0,0x000023e8,0x0000016b,
21430x00001fe1,0x00000318,0x000500c4,0x00000006, 21330x0000016b,0x0005003e,0x000023e0,0x000020e5,
21440x0000231e,0x0000231d,0x000002e4,0x000600a9, 21340x00000002,0x00000004,0x00050095,0x0000013d,
21450x00000006,0x00002320,0x00002228,0x000000df, 21350x00002410,0x0000222a,0x00000516,0x00050051,
21460x0000032b,0x000500c5,0x00000006,0x00002321, 21360x00000006,0x00002411,0x00002410,0x00000001,
21470x0000231e,0x00002320,0x00050095,0x00000130, 21370x00050051,0x00000006,0x00002412,0x00002410,
21480x00002349,0x00002126,0x000004e8,0x00050051, 21380x00000000,0x00050080,0x00000006,0x00002417,
21490x00000006,0x0000234a,0x00002349,0x00000001, 21390x00002231,0x00002411,0x00050050,0x00000007,
21500x00050051,0x00000006,0x0000234b,0x00002349, 21400x00002418,0x00002412,0x00002417,0x0004007c,
21510x00000000,0x00050080,0x00000006,0x00002350, 21410x00000014,0x00002408,0x00002418,0x00060041,
21520x0000212d,0x0000234a,0x00050050,0x00000007, 21420x0000016c,0x00002400,0x00002408,0x0000016b,
21530x00002351,0x0000234b,0x00002350,0x0004007c, 21430x0000016b,0x0005003e,0x00002400,0x00000138,
21540x00000014,0x00002341,0x00002351,0x00060041, 21440x00000002,0x00000004,0x000500c2,0x00000006,
21550x0000015f,0x00002339,0x00002341,0x0000015e, 21450x00002421,0x000020e5,0x00000351,0x000500c4,
21560x0000015e,0x0005003e,0x00002339,0x00002321, 21460x00000006,0x00002422,0x00002421,0x0000031d,
21570x00000002,0x00000004,0x00050041,0x00000182, 21470x000600a9,0x00000006,0x00002424,0x0000232c,
21580x0000201d,0x00000180,0x00000311,0x0004003d, 21480x000000ec,0x00000364,0x000500c5,0x00000006,
21590x00000006,0x0000201e,0x0000201d,0x00050095, 21490x00002425,0x00002422,0x00002424,0x00050095,
21600x00000130,0x00002369,0x00002126,0x000004f4, 21500x0000013d,0x0000244d,0x0000222a,0x00000521,
21610x00050051,0x00000006,0x0000236a,0x00002369, 21510x00050051,0x00000006,0x0000244e,0x0000244d,
21620x00000001,0x00050051,0x00000006,0x0000236b, 21520x00000001,0x00050051,0x00000006,0x0000244f,
21630x00002369,0x00000000,0x00050080,0x00000006, 21530x0000244d,0x00000000,0x00050080,0x00000006,
21640x00002370,0x0000212d,0x0000236a,0x00050050, 21540x00002454,0x00002231,0x0000244e,0x00050050,
21650x00000007,0x00002371,0x0000236b,0x00002370, 21550x00000007,0x00002455,0x0000244f,0x00002454,
21660x0004007c,0x00000014,0x00002361,0x00002371, 21560x0004007c,0x00000014,0x00002445,0x00002455,
21670x00060041,0x0000015f,0x00002359,0x00002361, 21570x00060041,0x0000016c,0x0000243d,0x00002445,
21680x0000015e,0x0000015e,0x0005003e,0x00002359, 21580x0000016b,0x0000016b,0x0005003e,0x0000243d,
21690x0000201e,0x00000002,0x00000004,0x00050041, 21590x00002425,0x00000002,0x00000004,0x00050041,
21700x00000182,0x00002022,0x00000180,0x00000fbf, 21600x000001bb,0x00002121,0x000001b9,0x0000034a,
21710x0004003d,0x00000006,0x00002023,0x00002022, 21610x0004003d,0x00000006,0x00002122,0x00002121,
21720x00050095,0x00000130,0x00002389,0x00002126, 21620x00050095,0x0000013d,0x0000246d,0x0000222a,
21730x000004fe,0x00050051,0x00000006,0x0000238a, 21630x0000052d,0x00050051,0x00000006,0x0000246e,
21740x00002389,0x00000001,0x00050051,0x00000006, 21640x0000246d,0x00000001,0x00050051,0x00000006,
21750x0000238b,0x00002389,0x00000000,0x00050080, 21650x0000246f,0x0000246d,0x00000000,0x00050080,
21760x00000006,0x00002390,0x0000212d,0x0000238a, 21660x00000006,0x00002474,0x00002231,0x0000246e,
21770x00050050,0x00000007,0x00002391,0x0000238b, 21670x00050050,0x00000007,0x00002475,0x0000246f,
21780x00002390,0x0004007c,0x00000014,0x00002381, 21680x00002474,0x0004007c,0x00000014,0x00002465,
21790x00002391,0x00060041,0x0000015f,0x00002379, 21690x00002475,0x00060041,0x0000016c,0x0000245d,
21800x00002381,0x0000015e,0x0000015e,0x0005003e, 21700x00002465,0x0000016b,0x0000016b,0x0005003e,
21810x00002379,0x00002023,0x00000002,0x00000004, 21710x0000245d,0x00002122,0x00000002,0x00000004,
21820x00050095,0x00000130,0x000023a9,0x00002126, 21720x00050041,0x000001bb,0x00002126,0x000001b9,
21830x00000508,0x00050051,0x00000006,0x000023aa, 21730x000010be,0x0004003d,0x00000006,0x00002127,
21840x000023a9,0x00000001,0x00050051,0x00000006, 21740x00002126,0x00050095,0x0000013d,0x0000248d,
21850x000023ab,0x000023a9,0x00000000,0x00050080, 21750x0000222a,0x00000537,0x00050051,0x00000006,
21860x00000006,0x000023b0,0x0000212d,0x000023aa, 21760x0000248e,0x0000248d,0x00000001,0x00050051,
21870x00050050,0x00000007,0x000023b1,0x000023ab, 21770x00000006,0x0000248f,0x0000248d,0x00000000,
21880x000023b0,0x0004007c,0x00000014,0x000023a1, 21780x00050080,0x00000006,0x00002494,0x00002231,
21890x000023b1,0x00060041,0x0000015f,0x00002399, 21790x0000248e,0x00050050,0x00000007,0x00002495,
21900x000023a1,0x0000015e,0x0000015e,0x0005003e, 21800x0000248f,0x00002494,0x0004007c,0x00000014,
21910x00002399,0x0000012b,0x00000002,0x00000004, 21810x00002485,0x00002495,0x00060041,0x0000016c,
21920x000200f9,0x00002028,0x000200f8,0x00002028, 21820x0000247d,0x00002485,0x0000016b,0x0000016b,
21930x000200f9,0x0000124c,0x000200f8,0x0000124c, 21830x0005003e,0x0000247d,0x00002127,0x00000002,
21940x000200f9,0x000012fe,0x000200f8,0x00001248, 21840x00000004,0x00050095,0x0000013d,0x000024ad,
21950x00050041,0x00000182,0x00001250,0x00000180, 21850x0000222a,0x00000541,0x00050051,0x00000006,
21960x00000653,0x0004003d,0x00000006,0x00001251, 21860x000024ae,0x000024ad,0x00000001,0x00050051,
21970x00001250,0x000500ae,0x0000002f,0x00001252, 21870x00000006,0x000024af,0x000024ad,0x00000000,
21980x000011de,0x00001251,0x000300f7,0x00001254, 21880x00050080,0x00000006,0x000024b4,0x00002231,
21990x00000000,0x000400fa,0x00001252,0x00001253, 21890x000024ae,0x00050050,0x00000007,0x000024b5,
22000x00001254,0x000200f8,0x00001253,0x000200f9, 21900x000024af,0x000024b4,0x0004007c,0x00000014,
22010x000012fe,0x000200f8,0x00001254,0x000500aa, 21910x000024a5,0x000024b5,0x00060041,0x0000016c,
22020x0000002f,0x00001259,0x000011e0,0x00001258, 21920x0000249d,0x000024a5,0x0000016b,0x0000016b,
22030x000300f7,0x0000125b,0x00000000,0x000400fa, 21930x0005003e,0x0000249d,0x00000138,0x00000002,
22040x00001259,0x0000125a,0x0000125b,0x000200f8, 21940x00000004,0x000200f9,0x0000212c,0x000200f8,
22050x0000125a,0x000500aa,0x0000002f,0x0000125d, 21950x0000212c,0x000200f9,0x0000134b,0x000200f8,
22060x000011de,0x0000012b,0x000300f7,0x0000125f, 21960x0000134b,0x000200f9,0x000013fd,0x000200f8,
22070x00000000,0x000400fa,0x0000125d,0x0000125e, 21970x00001347,0x00050041,0x000001bb,0x0000134f,
22080x0000125f,0x000200f8,0x0000125e,0x00050041, 21980x000001b9,0x0000074d,0x0004003d,0x00000006,
22090x0000022d,0x00001261,0x00000180,0x000002dc, 21990x00001350,0x0000134f,0x000500ae,0x0000002f,
22100x0004003d,0x00000007,0x00001262,0x00001261, 22000x00001351,0x000012dd,0x00001350,0x000300f7,
22110x00050051,0x00000006,0x000023c8,0x00001262, 22010x00001353,0x00000000,0x000400fa,0x00001351,
22120x00000000,0x00050095,0x00000130,0x000023ca, 22020x00001352,0x00001353,0x000200f8,0x00001352,
22130x000023c8,0x000000df,0x00050051,0x00000006, 22030x000200f9,0x000013fd,0x000200f8,0x00001353,
22140x000023cb,0x000023ca,0x00000001,0x00050051, 22040x000500aa,0x0000002f,0x00001358,0x000012df,
22150x00000006,0x000023cc,0x000023ca,0x00000000, 22050x00001357,0x000300f7,0x0000135a,0x00000000,
22160x00050051,0x00000006,0x000023cf,0x00001262, 22060x000400fa,0x00001358,0x00001359,0x0000135a,
22170x00000001,0x00050080,0x00000006,0x000023d1, 22070x000200f8,0x00001359,0x000500aa,0x0000002f,
22180x000023cf,0x000023cb,0x00050050,0x00000007, 22080x0000135c,0x000012dd,0x00000138,0x000300f7,
22190x000023d2,0x000023cc,0x000023d1,0x0004007c, 22090x0000135e,0x00000000,0x000400fa,0x0000135c,
22200x00000014,0x000023c2,0x000023d2,0x00060041, 22100x0000135d,0x0000135e,0x000200f8,0x0000135d,
22210x0000015f,0x000023b9,0x000023c2,0x0000015e, 22110x00050041,0x00000266,0x00001360,0x000001b9,
22220x0000015e,0x0006003d,0x00000006,0x000023ba, 22120x00000315,0x0004003d,0x00000007,0x00001361,
22230x000023b9,0x00000002,0x00000004,0x00050080, 22130x00001360,0x00050051,0x00000006,0x000024cc,
22240x00000006,0x00001265,0x000023ba,0x00000135, 22140x00001361,0x00000000,0x00050095,0x0000013d,
22250x00050084,0x00000006,0x00001266,0x00001265, 22150x000024ce,0x000024cc,0x000000ec,0x00050051,
22260x0000018b,0x00050041,0x0000022d,0x00001268, 22160x00000006,0x000024cf,0x000024ce,0x00000001,
22270x00000180,0x0000015e,0x0004003d,0x00000007, 22170x00050051,0x00000006,0x000024d0,0x000024ce,
22280x00001269,0x00001268,0x00050051,0x00000006, 22180x00000000,0x00050051,0x00000006,0x000024d3,
22290x000023e8,0x00001269,0x00000000,0x00050095, 22190x00001361,0x00000001,0x00050080,0x00000006,
22300x00000130,0x000023ea,0x000023e8,0x0000012b, 22200x000024d5,0x000024d3,0x000024cf,0x00050050,
22310x00050051,0x00000006,0x000023eb,0x000023ea, 22210x00000007,0x000024d6,0x000024d0,0x000024d5,
22320x00000001,0x00050051,0x00000006,0x000023ec, 22220x0004007c,0x00000014,0x000024c6,0x000024d6,
22330x000023ea,0x00000000,0x00050051,0x00000006, 22230x00060041,0x0000016c,0x000024bd,0x000024c6,
22340x000023ef,0x00001269,0x00000001,0x00050080, 22240x0000016b,0x0000016b,0x0006003d,0x00000006,
22350x00000006,0x000023f1,0x000023ef,0x000023eb, 22250x000024be,0x000024bd,0x00000002,0x00000004,
22360x00050050,0x00000007,0x000023f2,0x000023ec, 22260x00050080,0x00000006,0x00001364,0x000024be,
22370x000023f1,0x0004007c,0x00000014,0x000023e2, 22270x00000142,0x00050084,0x00000006,0x00001365,
22380x000023f2,0x00060041,0x0000015f,0x000023da, 22280x00001364,0x000001c4,0x00050041,0x00000266,
22390x000023e2,0x0000015e,0x0000015e,0x0005003e, 22290x00001367,0x000001b9,0x0000016b,0x0004003d,
22400x000023da,0x00001266,0x00000002,0x00000004, 22300x00000007,0x00001368,0x00001367,0x00050051,
22410x00050095,0x00000130,0x0000240a,0x000023e8, 22310x00000006,0x000024ec,0x00001368,0x00000000,
22420x000000df,0x00050051,0x00000006,0x0000240b, 22320x00050095,0x0000013d,0x000024ee,0x000024ec,
22430x0000240a,0x00000001,0x00050051,0x00000006, 22330x00000138,0x00050051,0x00000006,0x000024ef,
22440x0000240c,0x0000240a,0x00000000,0x00050080, 22340x000024ee,0x00000001,0x00050051,0x00000006,
22450x00000006,0x00002411,0x000023ef,0x0000240b, 22350x000024f0,0x000024ee,0x00000000,0x00050051,
22460x00050050,0x00000007,0x00002412,0x0000240c, 22360x00000006,0x000024f3,0x00001368,0x00000001,
22470x00002411,0x0004007c,0x00000014,0x00002402, 22370x00050080,0x00000006,0x000024f5,0x000024f3,
22480x00002412,0x00060041,0x0000015f,0x000023fa, 22380x000024ef,0x00050050,0x00000007,0x000024f6,
22490x00002402,0x0000015e,0x0000015e,0x0005003e, 22390x000024f0,0x000024f5,0x0004007c,0x00000014,
22500x000023fa,0x0000012b,0x00000002,0x00000004, 22400x000024e6,0x000024f6,0x00060041,0x0000016c,
22510x000200f9,0x0000125f,0x000200f8,0x0000125f, 22410x000024de,0x000024e6,0x0000016b,0x0000016b,
22520x000200f9,0x000012fe,0x000200f8,0x0000125b, 22420x0005003e,0x000024de,0x00001365,0x00000002,
22530x000500aa,0x0000002f,0x00001276,0x000011e0, 22430x00000004,0x00050095,0x0000013d,0x0000250e,
22540x0000019b,0x000300f7,0x00001278,0x00000000, 22440x000024ec,0x000000ec,0x00050051,0x00000006,
22550x000400fa,0x00001276,0x00001277,0x00001278, 22450x0000250f,0x0000250e,0x00000001,0x00050051,
22560x000200f8,0x00001277,0x00050084,0x00000006, 22460x00000006,0x00002510,0x0000250e,0x00000000,
22570x0000127a,0x000000df,0x000011de,0x00050041, 22470x00050080,0x00000006,0x00002515,0x000024f3,
22580x0000022d,0x0000127c,0x00000180,0x000002dc, 22480x0000250f,0x00050050,0x00000007,0x00002516,
22590x0004003d,0x00000007,0x0000127d,0x0000127c, 22490x00002510,0x00002515,0x0004007c,0x00000014,
22600x00050051,0x00000006,0x00002429,0x0000127d, 22500x00002506,0x00002516,0x00060041,0x0000016c,
22610x00000000,0x00050095,0x00000130,0x0000242b, 22510x000024fe,0x00002506,0x0000016b,0x0000016b,
22620x00002429,0x000000df,0x00050051,0x00000006, 22520x0005003e,0x000024fe,0x00000138,0x00000002,
22630x0000242c,0x0000242b,0x00000001,0x00050051, 22530x00000004,0x000200f9,0x0000135e,0x000200f8,
22640x00000006,0x0000242d,0x0000242b,0x00000000, 22540x0000135e,0x000200f9,0x000013fd,0x000200f8,
22650x00050051,0x00000006,0x00002430,0x0000127d, 22550x0000135a,0x000500aa,0x0000002f,0x00001375,
22660x00000001,0x00050080,0x00000006,0x00002432, 22560x000012df,0x000001d4,0x000300f7,0x00001377,
22670x00002430,0x0000242c,0x00050050,0x00000007, 22570x00000000,0x000400fa,0x00001375,0x00001376,
22680x00002433,0x0000242d,0x00002432,0x0004007c, 22580x00001377,0x000200f8,0x00001376,0x00050084,
22690x00000014,0x00002423,0x00002433,0x00060041, 22590x00000006,0x00001379,0x000000ec,0x000012dd,
22700x0000015f,0x0000241a,0x00002423,0x0000015e, 22600x00050041,0x00000266,0x0000137b,0x000001b9,
22710x0000015e,0x0006003d,0x00000006,0x0000241b, 22610x00000315,0x0004003d,0x00000007,0x0000137c,
22720x0000241a,0x00000002,0x00000004,0x00050080, 22620x0000137b,0x00050051,0x00000006,0x0000252d,
22730x00000006,0x00001280,0x0000241b,0x00000135, 22630x0000137c,0x00000000,0x00050095,0x0000013d,
22740x00050084,0x00000006,0x00001281,0x00001280, 22640x0000252f,0x0000252d,0x000000ec,0x00050051,
22750x0000018b,0x000500b0,0x0000002f,0x00001282, 22650x00000006,0x00002530,0x0000252f,0x00000001,
22760x0000127a,0x00001281,0x000300f7,0x00001284, 22660x00050051,0x00000006,0x00002531,0x0000252f,
22770x00000000,0x000400fa,0x00001282,0x00001283, 22670x00000000,0x00050051,0x00000006,0x00002534,
22780x00001284,0x000200f8,0x00001283,0x00050095, 22680x0000137c,0x00000001,0x00050080,0x00000006,
22790x00000130,0x0000244c,0x00002429,0x0000127a, 22690x00002536,0x00002534,0x00002530,0x00050050,
22800x00050051,0x00000006,0x0000244d,0x0000244c, 22700x00000007,0x00002537,0x00002531,0x00002536,
22810x00000001,0x00050051,0x00000006,0x0000244e, 22710x0004007c,0x00000014,0x00002527,0x00002537,
22820x0000244c,0x00000000,0x00050080,0x00000006, 22720x00060041,0x0000016c,0x0000251e,0x00002527,
22830x00002453,0x00002430,0x0000244d,0x00050050, 22730x0000016b,0x0000016b,0x0006003d,0x00000006,
22840x00000007,0x00002454,0x0000244e,0x00002453, 22740x0000251f,0x0000251e,0x00000002,0x00000004,
22850x0004007c,0x00000014,0x00002444,0x00002454, 22750x00050080,0x00000006,0x0000137f,0x0000251f,
22860x00060041,0x0000015f,0x0000243b,0x00002444, 22760x00000142,0x00050084,0x00000006,0x00001380,
22870x0000015e,0x0000015e,0x0006003d,0x00000006, 22770x0000137f,0x000001c4,0x000500b0,0x0000002f,
22880x0000243c,0x0000243b,0x00000002,0x00000004, 22780x00001381,0x00001379,0x00001380,0x000300f7,
22890x00050041,0x0000022d,0x0000128f,0x00000180, 22790x00001383,0x00000000,0x000400fa,0x00001381,
22900x0000015e,0x0004003d,0x00000007,0x00001290, 22800x00001382,0x00001383,0x000200f8,0x00001382,
22910x0000128f,0x00050051,0x00000006,0x0000246a, 22810x00050095,0x0000013d,0x00002550,0x0000252d,
22920x00001290,0x00000000,0x00050095,0x00000130, 22820x00001379,0x00050051,0x00000006,0x00002551,
22930x0000246c,0x0000246a,0x0000127a,0x00050051, 22830x00002550,0x00000001,0x00050051,0x00000006,
22940x00000006,0x0000246d,0x0000246c,0x00000001, 22840x00002552,0x00002550,0x00000000,0x00050080,
22950x00050051,0x00000006,0x0000246e,0x0000246c, 22850x00000006,0x00002557,0x00002534,0x00002551,
22960x00000000,0x00050051,0x00000006,0x00002471, 22860x00050050,0x00000007,0x00002558,0x00002552,
22970x00001290,0x00000001,0x00050080,0x00000006, 22870x00002557,0x0004007c,0x00000014,0x00002548,
22980x00002473,0x00002471,0x0000246d,0x00050050, 22880x00002558,0x00060041,0x0000016c,0x0000253f,
22990x00000007,0x00002474,0x0000246e,0x00002473, 22890x00002548,0x0000016b,0x0000016b,0x0006003d,
23000x0004007c,0x00000014,0x00002464,0x00002474, 22900x00000006,0x00002540,0x0000253f,0x00000002,
23010x00060041,0x0000015f,0x0000245c,0x00002464, 22910x00000004,0x00050041,0x00000266,0x0000138e,
23020x0000015e,0x0000015e,0x0005003e,0x0000245c, 22920x000001b9,0x0000016b,0x0004003d,0x00000007,
23030x0000243c,0x00000002,0x00000004,0x000200f9, 22930x0000138f,0x0000138e,0x00050051,0x00000006,
23040x00001284,0x000200f8,0x00001284,0x000200f9, 22940x0000256e,0x0000138f,0x00000000,0x00050095,
23050x000012fe,0x000200f8,0x00001278,0x000500aa, 22950x0000013d,0x00002570,0x0000256e,0x00001379,
23060x0000002f,0x00001297,0x000011e0,0x0000012b, 22960x00050051,0x00000006,0x00002571,0x00002570,
23070x000300f7,0x00001299,0x00000000,0x000400fa, 22970x00000001,0x00050051,0x00000006,0x00002572,
23080x00001297,0x00001298,0x000012ba,0x000200f8, 22980x00002570,0x00000000,0x00050051,0x00000006,
23090x000012ba,0x000500aa,0x0000002f,0x000012bd, 22990x00002575,0x0000138f,0x00000001,0x00050080,
23100x000011e0,0x00000135,0x000300f7,0x000012bf, 23000x00000006,0x00002577,0x00002575,0x00002571,
23110x00000000,0x000400fa,0x000012bd,0x000012be, 23010x00050050,0x00000007,0x00002578,0x00002572,
23120x000012c3,0x000200f8,0x000012c3,0x000500aa, 23020x00002577,0x0004007c,0x00000014,0x00002568,
23130x0000002f,0x000012c6,0x000011e0,0x00000247, 23030x00002578,0x00060041,0x0000016c,0x00002560,
23140x000300f7,0x000012c8,0x00000000,0x000400fa, 23040x00002568,0x0000016b,0x0000016b,0x0005003e,
23150x000012c6,0x000012c7,0x000012cc,0x000200f8, 23050x00002560,0x00002540,0x00000002,0x00000004,
23160x000012cc,0x000500aa,0x0000002f,0x000012cf, 23060x000200f9,0x00001383,0x000200f8,0x00001383,
23170x000011e0,0x00000437,0x000300f7,0x000012d1, 23070x000200f9,0x000013fd,0x000200f8,0x00001377,
23180x00000000,0x000400fa,0x000012cf,0x000012d0, 23080x000500aa,0x0000002f,0x00001396,0x000012df,
23190x000012d5,0x000200f8,0x000012d5,0x000500aa, 23090x00000138,0x000300f7,0x00001398,0x00000000,
23200x0000002f,0x000012d8,0x000011e0,0x000000df, 23100x000400fa,0x00001396,0x00001397,0x000013b9,
23210x000300f7,0x000012da,0x00000000,0x000400fa, 23110x000200f8,0x000013b9,0x000500aa,0x0000002f,
23220x000012d8,0x000012d9,0x000012df,0x000200f8, 23120x000013bc,0x000012df,0x00000142,0x000300f7,
23230x000012df,0x000500aa,0x0000002f,0x000012e2, 23130x000013be,0x00000000,0x000400fa,0x000013bc,
23240x000011e0,0x0000032b,0x000300f7,0x000012e4, 23140x000013bd,0x000013c2,0x000200f8,0x000013c2,
23250x00000000,0x000400fa,0x000012e2,0x000012e3, 23150x000500aa,0x0000002f,0x000013c5,0x000012df,
23260x000012e8,0x000200f8,0x000012e8,0x000500aa, 23160x00000280,0x000300f7,0x000013c7,0x00000000,
23270x0000002f,0x000012ec,0x000011e0,0x000012eb, 23170x000400fa,0x000013c5,0x000013c6,0x000013cb,
23280x000300f7,0x000012ee,0x00000000,0x000400fa, 23180x000200f8,0x000013cb,0x000500aa,0x0000002f,
23290x000012ec,0x000012ed,0x000012f2,0x000200f8, 23190x000013ce,0x000012df,0x00000470,0x000300f7,
23300x000012f2,0x000500aa,0x0000002f,0x000012f6, 23200x000013d0,0x00000000,0x000400fa,0x000013ce,
23310x000011e0,0x000012f5,0x000300f7,0x000012f8, 23210x000013cf,0x000013d4,0x000200f8,0x000013d4,
23320x00000000,0x000400fa,0x000012f6,0x000012f7, 23220x000500aa,0x0000002f,0x000013d7,0x000012df,
23330x000012f8,0x000200f8,0x000012f7,0x00050041, 23230x000000ec,0x000300f7,0x000013d9,0x00000000,
23340x00000182,0x000056be,0x00000180,0x00000181, 23240x000400fa,0x000013d7,0x000013d8,0x000013de,
23350x0004003d,0x00000006,0x000056bf,0x000056be, 23250x000200f8,0x000013de,0x000500aa,0x0000002f,
23360x00050084,0x00000006,0x000056c0,0x000001a2, 23260x000013e1,0x000012df,0x00000364,0x000300f7,
23370x000056bf,0x00050080,0x00000006,0x000056c1, 23270x000013e3,0x00000000,0x000400fa,0x000013e1,
23380x0000018b,0x000056c0,0x00050080,0x00000006, 23280x000013e2,0x000013e7,0x000200f8,0x000013e7,
23390x000056c7,0x000056bf,0x00005cc3,0x00050086, 23290x000500aa,0x0000002f,0x000013eb,0x000012df,
23400x00000006,0x000056c8,0x000056c7,0x00000185, 23300x000013ea,0x000300f7,0x000013ed,0x00000000,
23410x00050084,0x00000006,0x000056ba,0x0000018b, 23310x000400fa,0x000013eb,0x000013ec,0x000013f1,
23420x000056c8,0x00050080,0x00000006,0x000056bb, 23320x000200f8,0x000013f1,0x000500aa,0x0000002f,
23430x000056c1,0x000056ba,0x00050080,0x00000006, 23330x000013f5,0x000012df,0x000013f4,0x000300f7,
23440x000056b5,0x000056bb,0x000056ba,0x00050041, 23340x000013f7,0x00000000,0x000400fa,0x000013f5,
23450x00000182,0x000056ac,0x00000180,0x000001b7, 23350x000013f6,0x000013f7,0x000200f8,0x000013f6,
23460x0004003d,0x00000006,0x000056ad,0x000056ac, 23360x00050041,0x000001bb,0x00005a4a,0x000001b9,
23470x00050084,0x00000006,0x000056ae,0x000001b6, 23370x000001ba,0x0004003d,0x00000006,0x00005a4b,
23480x000056ad,0x00050080,0x00000006,0x000056af, 23380x00005a4a,0x00050084,0x00000006,0x00005a4c,
23490x000056b5,0x000056ae,0x00050084,0x00000006, 23390x000001db,0x00005a4b,0x00050080,0x00000006,
23500x000056a4,0x000001cc,0x000011de,0x00050080, 23400x00005a4d,0x000001c4,0x00005a4c,0x00050080,
23510x00000006,0x000056a5,0x000056af,0x000056a4, 23410x00000006,0x00005a53,0x00005a4b,0x0000062f,
23520x00050041,0x0000022d,0x000056a6,0x00000180, 23420x00050086,0x00000006,0x00005a54,0x00005a53,
23530x0000022b,0x0004003d,0x00000007,0x000056a7, 23430x000001be,0x00050084,0x00000006,0x00005a46,
23540x000056a6,0x00050051,0x00000006,0x000056dd, 23440x000001c4,0x00005a54,0x00050080,0x00000006,
23550x000056a7,0x00000000,0x00050095,0x00000130, 23450x00005a47,0x00005a4d,0x00005a46,0x00050080,
23560x000056df,0x000056dd,0x000056a5,0x00050051, 23460x00000006,0x00005a41,0x00005a47,0x00005a46,
23570x00000006,0x000056e0,0x000056df,0x00000001, 23470x00050041,0x000001bb,0x00005a38,0x000001b9,
23580x00050051,0x00000006,0x000056e1,0x000056df, 23480x000001f0,0x0004003d,0x00000006,0x00005a39,
23590x00000000,0x00050051,0x00000006,0x000056e4, 23490x00005a38,0x00050084,0x00000006,0x00005a3a,
23600x000056a7,0x00000001,0x00050080,0x00000006, 23500x000001ef,0x00005a39,0x00050080,0x00000006,
23610x000056e6,0x000056e4,0x000056e0,0x00050050, 23510x00005a3b,0x00005a41,0x00005a3a,0x00050084,
23620x00000007,0x000056e7,0x000056e1,0x000056e6, 23520x00000006,0x00005a30,0x00000205,0x000012dd,
23630x0004007c,0x00000014,0x000056d7,0x000056e7, 23530x00050080,0x00000006,0x00005a31,0x00005a3b,
23640x00060041,0x0000015f,0x00005691,0x000056d7, 23540x00005a30,0x00050041,0x00000266,0x00005a32,
23650x0000015e,0x0000015e,0x0005003e,0x00005691, 23550x000001b9,0x00000264,0x0004003d,0x00000007,
23660x0000012b,0x00000002,0x00000004,0x00060041, 23560x00005a33,0x00005a32,0x00050051,0x00000006,
23670x0000015f,0x00005693,0x000056d7,0x0000015e, 23570x00005a69,0x00005a33,0x00000000,0x00050095,
23680x0000022b,0x0005003e,0x00005693,0x00000500, 23580x0000013d,0x00005a6b,0x00005a69,0x00005a31,
23690x00000002,0x00000004,0x00060041,0x0000015f, 23590x00050051,0x00000006,0x00005a6c,0x00005a6b,
23700x00005695,0x000056d7,0x0000015e,0x000002dc, 23600x00000001,0x00050051,0x00000006,0x00005a6d,
23710x0005003e,0x00005695,0x00000500,0x00000002, 23610x00005a6b,0x00000000,0x00050051,0x00000006,
23720x00000004,0x00060041,0x0000015f,0x00005697, 23620x00005a70,0x00005a33,0x00000001,0x00050080,
23730x000056d7,0x0000015e,0x000002e4,0x0005003e, 23630x00000006,0x00005a72,0x00005a70,0x00005a6c,
23740x00005697,0x00000500,0x00000002,0x00000004, 23640x00050050,0x00000007,0x00005a73,0x00005a6d,
23750x00060041,0x0000015f,0x00005699,0x000056d7, 23650x00005a72,0x0004007c,0x00000014,0x00005a63,
23760x0000015e,0x000002ec,0x0005003e,0x00005699, 23660x00005a73,0x00060041,0x0000016c,0x00005a1d,
23770x0000012b,0x00000002,0x00000004,0x00060041, 23670x00005a63,0x0000016b,0x0000016b,0x0005003e,
23780x0000015f,0x0000569b,0x000056d7,0x0000015e, 23680x00005a1d,0x00000138,0x00000002,0x00000004,
23790x000002f4,0x0005003e,0x0000569b,0x0000012b, 23690x00060041,0x0000016c,0x00005a1f,0x00005a63,
23800x00000002,0x00000004,0x00060041,0x0000015f, 23700x0000016b,0x00000264,0x0005003e,0x00005a1f,
23810x0000569d,0x000056d7,0x0000015e,0x00000318, 23710x00000539,0x00000002,0x00000004,0x00060041,
23820x0005003e,0x0000569d,0x0000012b,0x00000002, 23720x0000016c,0x00005a21,0x00005a63,0x0000016b,
23830x00000004,0x000200f9,0x000012f8,0x000200f8, 23730x00000315,0x0005003e,0x00005a21,0x00000539,
23840x000012f8,0x000200f9,0x000012ee,0x000200f8, 23740x00000002,0x00000004,0x00060041,0x0000016c,
23850x000012ed,0x000300f7,0x00004e17,0x00000000, 23750x00005a23,0x00005a63,0x0000016b,0x0000031d,
23860x000300fb,0x0000012b,0x00004d82,0x000200f8, 23760x0005003e,0x00005a23,0x00000539,0x00000002,
23870x00004d82,0x00050041,0x00000182,0x00004d83, 23770x00000004,0x00060041,0x0000016c,0x00005a25,
23880x00000180,0x000003fb,0x0004003d,0x00000006, 23780x00005a63,0x0000016b,0x00000325,0x0005003e,
23890x00004d84,0x00004d83,0x000500aa,0x0000002f, 23790x00005a25,0x00000138,0x00000002,0x00000004,
23900x00004d85,0x00004d84,0x00000135,0x000300f7, 23800x00060041,0x0000016c,0x00005a27,0x00005a63,
23910x00004d91,0x00000000,0x000400fa,0x00004d85, 23810x0000016b,0x0000032d,0x0005003e,0x00005a27,
23920x00004d86,0x00004d89,0x000200f8,0x00004d89, 23820x00000138,0x00000002,0x00000004,0x00060041,
23930x00050041,0x00000182,0x00004e7b,0x00000180, 23830x0000016c,0x00005a29,0x00005a63,0x0000016b,
23940x00000181,0x0004003d,0x00000006,0x00004e7c, 23840x00000351,0x0005003e,0x00005a29,0x00000138,
23950x00004e7b,0x00050084,0x00000006,0x00004e7d, 23850x00000002,0x00000004,0x000200f9,0x000013f7,
23960x000001a2,0x00004e7c,0x00050080,0x00000006, 23860x000200f8,0x000013f7,0x000200f9,0x000013ed,
23970x00004e7e,0x0000018b,0x00004e7d,0x00050080, 23870x000200f8,0x000013ec,0x000300f7,0x000051a3,
23980x00000006,0x00004e84,0x00004e7c,0x00005cc3, 23880x00000000,0x000300fb,0x00000138,0x0000510e,
23990x00050086,0x00000006,0x00004e85,0x00004e84, 23890x000200f8,0x0000510e,0x00050041,0x000001bb,
24000x00000185,0x00050084,0x00000006,0x00004e77, 23900x0000510f,0x000001b9,0x00000434,0x0004003d,
24010x0000018b,0x00004e85,0x00050080,0x00000006, 23910x00000006,0x00005110,0x0000510f,0x000500aa,
24020x00004e78,0x00004e7e,0x00004e77,0x00050080, 23920x0000002f,0x00005111,0x00005110,0x00000142,
24030x00000006,0x00004e72,0x00004e78,0x00004e77, 23930x000300f7,0x0000511d,0x00000000,0x000400fa,
24040x00050041,0x00000182,0x00004e69,0x00000180, 23940x00005111,0x00005112,0x00005115,0x000200f8,
24050x000001b7,0x0004003d,0x00000006,0x00004e6a, 23950x00005115,0x00050041,0x000001bb,0x00005207,
24060x00004e69,0x00050084,0x00000006,0x00004e6b, 23960x000001b9,0x000001ba,0x0004003d,0x00000006,
24070x000001b6,0x00004e6a,0x00050080,0x00000006, 23970x00005208,0x00005207,0x00050084,0x00000006,
24080x00004e6c,0x00004e72,0x00004e6b,0x00050041, 23980x00005209,0x000001db,0x00005208,0x00050080,
24090x00000182,0x00004e62,0x00000180,0x000001cd, 23990x00000006,0x0000520a,0x000001c4,0x00005209,
24100x0004003d,0x00000006,0x00004e63,0x00004e62, 24000x00050080,0x00000006,0x00005210,0x00005208,
24110x00050084,0x00000006,0x00004e64,0x000001cc, 24010x0000062f,0x00050086,0x00000006,0x00005211,
24120x00004e63,0x00050080,0x00000006,0x00004e65, 24020x00005210,0x000001be,0x00050084,0x00000006,
24130x00004e6c,0x00004e64,0x000500ac,0x0000002f, 24030x00005203,0x000001c4,0x00005211,0x00050080,
24140x00004e92,0x00004e6a,0x00000135,0x000300f7, 24040x00000006,0x00005204,0x0000520a,0x00005203,
24150x00004e98,0x00000000,0x000400fa,0x00004e92, 24050x00050080,0x00000006,0x000051fe,0x00005204,
24160x00004e93,0x00004e97,0x000200f8,0x00004e97, 24060x00005203,0x00050041,0x000001bb,0x000051f5,
24170x000200f9,0x00004e98,0x000200f8,0x00004e93, 24070x000001b9,0x000001f0,0x0004003d,0x00000006,
24180x00050082,0x00000006,0x00004e96,0x00004e6a, 24080x000051f6,0x000051f5,0x00050084,0x00000006,
24190x00000135,0x000200f9,0x00004e98,0x000200f8, 24090x000051f7,0x000001ef,0x000051f6,0x00050080,
24200x00004e98,0x000700f5,0x00000006,0x0000591b, 24100x00000006,0x000051f8,0x000051fe,0x000051f7,
24210x00004e96,0x00004e93,0x0000012b,0x00004e97, 24110x00050041,0x000001bb,0x000051ee,0x000001b9,
24220x00050084,0x00000006,0x00004e5d,0x000000df, 24120x00000206,0x0004003d,0x00000006,0x000051ef,
24230x0000591b,0x00050080,0x00000006,0x00004e5e, 24130x000051ee,0x00050084,0x00000006,0x000051f0,
24240x00004e65,0x00004e5d,0x000300f7,0x00004ea5, 24140x00000205,0x000051ef,0x00050080,0x00000006,
24250x00000000,0x000400fa,0x00004e92,0x00004ea0, 24150x000051f1,0x000051f8,0x000051f0,0x000500ac,
24260x00004ea4,0x000200f8,0x00004ea4,0x000200f9, 24160x0000002f,0x0000521e,0x000051f6,0x00000142,
24270x00004ea5,0x000200f8,0x00004ea0,0x00050082, 24170x000300f7,0x00005224,0x00000000,0x000400fa,
24280x00000006,0x00004ea3,0x00004e6a,0x00000135, 24180x0000521e,0x0000521f,0x00005223,0x000200f8,
24290x000200f9,0x00004ea5,0x000200f8,0x00004ea5, 24190x00005223,0x000200f9,0x00005224,0x000200f8,
24300x000700f5,0x00000006,0x0000591c,0x00004ea3, 24200x0000521f,0x00050082,0x00000006,0x00005222,
24310x00004ea0,0x0000012b,0x00004ea4,0x00050084, 24210x000051f6,0x00000142,0x000200f9,0x00005224,
24320x00000006,0x00004e57,0x000000df,0x0000591c, 24220x000200f8,0x00005224,0x000700f5,0x00000006,
24330x00050080,0x00000006,0x00004e58,0x00004e5e, 24230x00005ce3,0x00005222,0x0000521f,0x00000138,
24340x00004e57,0x000300f7,0x00004eb2,0x00000000, 24240x00005223,0x00050084,0x00000006,0x000051e9,
24350x000400fa,0x00004e92,0x00004ead,0x00004eb1, 24250x000000ec,0x00005ce3,0x00050080,0x00000006,
24360x000200f8,0x00004eb1,0x000200f9,0x00004eb2, 24260x000051ea,0x000051f1,0x000051e9,0x000300f7,
24370x000200f8,0x00004ead,0x00050082,0x00000006, 24270x00005231,0x00000000,0x000400fa,0x0000521e,
24380x00004eb0,0x00004e6a,0x00000135,0x000200f9, 24280x0000522c,0x00005230,0x000200f8,0x00005230,
24390x00004eb2,0x000200f8,0x00004eb2,0x000700f5, 24290x000200f9,0x00005231,0x000200f8,0x0000522c,
24400x00000006,0x0000591d,0x00004eb0,0x00004ead, 24300x00050082,0x00000006,0x0000522f,0x000051f6,
24410x0000012b,0x00004eb1,0x00050084,0x00000006, 24310x00000142,0x000200f9,0x00005231,0x000200f8,
24420x00004e51,0x000000df,0x0000591d,0x00050080, 24320x00005231,0x000700f5,0x00000006,0x00005ce4,
24430x00000006,0x00004e52,0x00004e58,0x00004e51, 24330x0000522f,0x0000522c,0x00000138,0x00005230,
24440x000300f7,0x00004ebf,0x00000000,0x000400fa, 24340x00050084,0x00000006,0x000051e3,0x000000ec,
24450x00004e92,0x00004eba,0x00004ebe,0x000200f8, 24350x00005ce4,0x00050080,0x00000006,0x000051e4,
24460x00004ebe,0x000200f9,0x00004ebf,0x000200f8, 24360x000051ea,0x000051e3,0x000300f7,0x0000523e,
24470x00004eba,0x00050082,0x00000006,0x00004ebd, 24370x00000000,0x000400fa,0x0000521e,0x00005239,
24480x00004e6a,0x00000135,0x000200f9,0x00004ebf, 24380x0000523d,0x000200f8,0x0000523d,0x000200f9,
24490x000200f8,0x00004ebf,0x000700f5,0x00000006, 24390x0000523e,0x000200f8,0x00005239,0x00050082,
24500x0000591e,0x00004ebd,0x00004eba,0x0000012b, 24400x00000006,0x0000523c,0x000051f6,0x00000142,
24510x00004ebe,0x00050084,0x00000006,0x00004e4b, 24410x000200f9,0x0000523e,0x000200f8,0x0000523e,
24520x000000df,0x0000591e,0x00050080,0x00000006, 24420x000700f5,0x00000006,0x00005ce5,0x0000523c,
24530x00004e4c,0x00004e52,0x00004e4b,0x000300f7, 24430x00005239,0x00000138,0x0000523d,0x00050084,
24540x00004ecc,0x00000000,0x000400fa,0x00004e92, 24440x00000006,0x000051dd,0x000000ec,0x00005ce5,
24550x00004ec7,0x00004ecb,0x000200f8,0x00004ecb, 24450x00050080,0x00000006,0x000051de,0x000051e4,
24560x000200f9,0x00004ecc,0x000200f8,0x00004ec7, 24460x000051dd,0x000300f7,0x0000524b,0x00000000,
24570x00050082,0x00000006,0x00004eca,0x00004e6a, 24470x000400fa,0x0000521e,0x00005246,0x0000524a,
24580x00000135,0x000200f9,0x00004ecc,0x000200f8, 24480x000200f8,0x0000524a,0x000200f9,0x0000524b,
24590x00004ecc,0x000700f5,0x00000006,0x0000591f, 24490x000200f8,0x00005246,0x00050082,0x00000006,
24600x00004eca,0x00004ec7,0x0000012b,0x00004ecb, 24500x00005249,0x000051f6,0x00000142,0x000200f9,
24610x00050084,0x00000006,0x00004e45,0x000000df, 24510x0000524b,0x000200f8,0x0000524b,0x000700f5,
24620x0000591f,0x00050080,0x00000006,0x00004e46, 24520x00000006,0x00005ce6,0x00005249,0x00005246,
24630x00004e4c,0x00004e45,0x000300f7,0x00004edf, 24530x00000138,0x0000524a,0x00050084,0x00000006,
24640x00000000,0x000400fa,0x00004e92,0x00004eda, 24540x000051d7,0x000000ec,0x00005ce6,0x00050080,
24650x00004ede,0x000200f8,0x00004ede,0x000200f9, 24550x00000006,0x000051d8,0x000051de,0x000051d7,
24660x00004edf,0x000200f8,0x00004eda,0x00050082, 24560x000300f7,0x00005258,0x00000000,0x000400fa,
24670x00000006,0x00004edd,0x00004e6a,0x00000135, 24570x0000521e,0x00005253,0x00005257,0x000200f8,
24680x000200f9,0x00004edf,0x000200f8,0x00004edf, 24580x00005257,0x000200f9,0x00005258,0x000200f8,
24690x000700f5,0x00000006,0x00005920,0x00004edd, 24590x00005253,0x00050082,0x00000006,0x00005256,
24700x00004eda,0x0000012b,0x00004ede,0x00050080, 24600x000051f6,0x00000142,0x000200f9,0x00005258,
24710x00000006,0x00004ed2,0x00005920,0x00005cc3, 24610x000200f8,0x00005258,0x000700f5,0x00000006,
24720x00050086,0x00000006,0x00004ed3,0x00004ed2, 24620x00005ce7,0x00005256,0x00005253,0x00000138,
24730x00000185,0x00050084,0x00000006,0x00004e3f, 24630x00005257,0x00050084,0x00000006,0x000051d1,
24740x000000df,0x00004ed3,0x00050080,0x00000006, 24640x000000ec,0x00005ce7,0x00050080,0x00000006,
24750x00004e40,0x00004e46,0x00004e3f,0x000300f7, 24650x000051d2,0x000051d8,0x000051d1,0x000300f7,
24760x00004ef2,0x00000000,0x000400fa,0x00004e92, 24660x0000526b,0x00000000,0x000400fa,0x0000521e,
24770x00004eed,0x00004ef1,0x000200f8,0x00004ef1, 24670x00005266,0x0000526a,0x000200f8,0x0000526a,
24780x000200f9,0x00004ef2,0x000200f8,0x00004eed, 24680x000200f9,0x0000526b,0x000200f8,0x00005266,
24790x00050082,0x00000006,0x00004ef0,0x00004e6a, 24690x00050082,0x00000006,0x00005269,0x000051f6,
24800x00000135,0x000200f9,0x00004ef2,0x000200f8, 24700x00000142,0x000200f9,0x0000526b,0x000200f8,
24810x00004ef2,0x000700f5,0x00000006,0x00005921, 24710x0000526b,0x000700f5,0x00000006,0x00005ce8,
24820x00004ef0,0x00004eed,0x0000012b,0x00004ef1, 24720x00005269,0x00005266,0x00000138,0x0000526a,
24830x00050080,0x00000006,0x00004ee5,0x00005921, 24730x00050080,0x00000006,0x0000525e,0x00005ce8,
24840x00005cc3,0x00050086,0x00000006,0x00004ee6, 24740x0000062f,0x00050086,0x00000006,0x0000525f,
24850x00004ee5,0x00000185,0x00050084,0x00000006, 24750x0000525e,0x000001be,0x00050084,0x00000006,
24860x00004e39,0x000000df,0x00004ee6,0x00050080, 24760x000051cb,0x000000ec,0x0000525f,0x00050080,
24870x00000006,0x00004e3a,0x00004e40,0x00004e39, 24770x00000006,0x000051cc,0x000051d2,0x000051cb,
24880x00050084,0x00000006,0x00004d8c,0x000000df, 24780x000300f7,0x0000527e,0x00000000,0x000400fa,
24890x000011de,0x00050080,0x00000006,0x00004d8d, 24790x0000521e,0x00005279,0x0000527d,0x000200f8,
24900x00004e3a,0x00004d8c,0x00050041,0x0000022d, 24800x0000527d,0x000200f9,0x0000527e,0x000200f8,
24910x00004d8e,0x00000180,0x0000022b,0x0004003d, 24810x00005279,0x00050082,0x00000006,0x0000527c,
24920x00000007,0x00004d8f,0x00004d8e,0x00050051, 24820x000051f6,0x00000142,0x000200f9,0x0000527e,
24930x00000006,0x00004f0a,0x00004d8f,0x00000000, 24830x000200f8,0x0000527e,0x000700f5,0x00000006,
24940x00050095,0x00000130,0x00004f0c,0x00004f0a, 24840x00005ce9,0x0000527c,0x00005279,0x00000138,
24950x00004d8d,0x00050051,0x00000006,0x00004f0d, 24850x0000527d,0x00050080,0x00000006,0x00005271,
24960x00004f0c,0x00000001,0x00050051,0x00000006, 24860x00005ce9,0x0000062f,0x00050086,0x00000006,
24970x00004f0e,0x00004f0c,0x00000000,0x00050051, 24870x00005272,0x00005271,0x000001be,0x00050084,
24980x00000006,0x00004f11,0x00004d8f,0x00000001, 24880x00000006,0x000051c5,0x000000ec,0x00005272,
24990x00050080,0x00000006,0x00004f13,0x00004f11, 24890x00050080,0x00000006,0x000051c6,0x000051cc,
25000x00004f0d,0x00050050,0x00000007,0x00004f14, 24900x000051c5,0x00050084,0x00000006,0x00005118,
25010x00004f0e,0x00004f13,0x0004007c,0x00000014, 24910x000000ec,0x000012dd,0x00050080,0x00000006,
25020x00004f04,0x00004f14,0x00060041,0x0000015f, 24920x00005119,0x000051c6,0x00005118,0x00050041,
25030x00004efb,0x00004f04,0x0000015e,0x0000015e, 24930x00000266,0x0000511a,0x000001b9,0x00000264,
25040x0006003d,0x00000006,0x00004efc,0x00004efb, 24940x0004003d,0x00000007,0x0000511b,0x0000511a,
25050x00000002,0x00000004,0x000200f9,0x00004d91, 24950x00050051,0x00000006,0x00005296,0x0000511b,
25060x000200f8,0x00004d86,0x00050041,0x00000182, 24960x00000000,0x00050095,0x0000013d,0x00005298,
25070x00004e1a,0x00000180,0x00000311,0x0004003d, 24970x00005296,0x00005119,0x00050051,0x00000006,
25080x00000006,0x00004e1b,0x00004e1a,0x00050041, 24980x00005299,0x00005298,0x00000001,0x00050051,
25090x00000182,0x00004e2b,0x00000180,0x000002fb, 24990x00000006,0x0000529a,0x00005298,0x00000000,
25100x0004003d,0x00000006,0x00004e2c,0x00004e2b, 25000x00050051,0x00000006,0x0000529d,0x0000511b,
25110x000500c7,0x00000006,0x00004e2d,0x00004e2c, 25010x00000001,0x00050080,0x00000006,0x0000529f,
25120x00000135,0x000500ab,0x0000002f,0x00004e2e, 25020x0000529d,0x00005299,0x00050050,0x00000007,
25130x00004e2d,0x0000012b,0x000600a9,0x00000006, 25030x000052a0,0x0000529a,0x0000529f,0x0004007c,
25140x00004e28,0x00004e2e,0x00000309,0x0000018b, 25040x00000014,0x00005290,0x000052a0,0x00060041,
25150x00050084,0x00000006,0x00004e1e,0x000011de, 25050x0000016c,0x00005287,0x00005290,0x0000016b,
25160x00004e28,0x00050080,0x00000006,0x00004e1f, 25060x0000016b,0x0006003d,0x00000006,0x00005288,
25170x00004e1b,0x00004e1e,0x000500c2,0x00000006, 25070x00005287,0x00000002,0x00000004,0x000200f9,
25180x00004e20,0x00004e1f,0x00000318,0x000500c4, 25080x0000511d,0x000200f8,0x00005112,0x00050041,
25190x00000006,0x00004e21,0x00004e20,0x000002e4, 25090x000001bb,0x000051a6,0x000001b9,0x0000034a,
25200x000600a9,0x00000006,0x00004e23,0x00004e2e, 25100x0004003d,0x00000006,0x000051a7,0x000051a6,
25210x0000031c,0x0000012b,0x000500c5,0x00000006, 25110x00050041,0x000001bb,0x000051b7,0x000001b9,
25220x00004e24,0x00004e21,0x00004e23,0x000200f9, 25120x00000334,0x0004003d,0x00000006,0x000051b8,
25230x00004d91,0x000200f8,0x00004d91,0x000700f5, 25130x000051b7,0x000500c7,0x00000006,0x000051b9,
25240x00000006,0x00005922,0x00004e24,0x00004d86, 25140x000051b8,0x00000142,0x000500ab,0x0000002f,
25250x00004efc,0x00004ef2,0x00050041,0x00000182, 25150x000051ba,0x000051b9,0x00000138,0x000600a9,
25260x00004f5a,0x00000180,0x00000181,0x0004003d, 25160x00000006,0x000051b4,0x000051ba,0x00000342,
25270x00000006,0x00004f5b,0x00004f5a,0x00050084, 25170x000001c4,0x00050084,0x00000006,0x000051aa,
25280x00000006,0x00004f5c,0x000001a2,0x00004f5b, 25180x000012dd,0x000051b4,0x00050080,0x00000006,
25290x00050080,0x00000006,0x00004f5d,0x0000018b, 25190x000051ab,0x000051a7,0x000051aa,0x000500c2,
25300x00004f5c,0x00050080,0x00000006,0x00004f63, 25200x00000006,0x000051ac,0x000051ab,0x00000351,
25310x00004f5b,0x00005cc3,0x00050086,0x00000006, 25210x000500c4,0x00000006,0x000051ad,0x000051ac,
25320x00004f64,0x00004f63,0x00000185,0x00050084, 25220x0000031d,0x000600a9,0x00000006,0x000051af,
25330x00000006,0x00004f56,0x0000018b,0x00004f64, 25230x000051ba,0x00000355,0x00000138,0x000500c5,
25340x00050080,0x00000006,0x00004f57,0x00004f5d, 25240x00000006,0x000051b0,0x000051ad,0x000051af,
25350x00004f56,0x00050080,0x00000006,0x00004f51, 25250x000200f9,0x0000511d,0x000200f8,0x0000511d,
25360x00004f57,0x00004f56,0x00050084,0x00000006, 25260x000700f5,0x00000006,0x00005cea,0x000051b0,
25370x00004f25,0x000001b6,0x000011de,0x00050080, 25270x00005112,0x00005288,0x0000527e,0x00050041,
25380x00000006,0x00004f26,0x00004f51,0x00004f25, 25280x000001bb,0x000052e6,0x000001b9,0x000001ba,
25390x00050041,0x0000022d,0x00004f27,0x00000180, 25290x0004003d,0x00000006,0x000052e7,0x000052e6,
25400x0000022b,0x0004003d,0x00000007,0x00004f28, 25300x00050084,0x00000006,0x000052e8,0x000001db,
25410x00004f27,0x00050051,0x00000006,0x00004f82, 25310x000052e7,0x00050080,0x00000006,0x000052e9,
25420x00004f28,0x00000000,0x00050095,0x00000130, 25320x000001c4,0x000052e8,0x00050080,0x00000006,
25430x00004f84,0x00004f82,0x00004f26,0x00050051, 25330x000052ef,0x000052e7,0x0000062f,0x00050086,
25440x00000006,0x00004f85,0x00004f84,0x00000001, 25340x00000006,0x000052f0,0x000052ef,0x000001be,
25450x00050051,0x00000006,0x00004f86,0x00004f84, 25350x00050084,0x00000006,0x000052e2,0x000001c4,
25460x00000000,0x00050051,0x00000006,0x00004f89, 25360x000052f0,0x00050080,0x00000006,0x000052e3,
25470x00004f28,0x00000001,0x00050080,0x00000006, 25370x000052e9,0x000052e2,0x00050080,0x00000006,
25480x00004f8b,0x00004f89,0x00004f85,0x00050050, 25380x000052dd,0x000052e3,0x000052e2,0x00050084,
25490x00000007,0x00004f8c,0x00004f86,0x00004f8b, 25390x00000006,0x000052b1,0x000001ef,0x000012dd,
25500x0004007c,0x00000014,0x00004f7c,0x00004f8c, 25400x00050080,0x00000006,0x000052b2,0x000052dd,
25510x00060041,0x0000015f,0x00004f73,0x00004f7c, 25410x000052b1,0x00050041,0x00000266,0x000052b3,
25520x0000015e,0x0000015e,0x0006003d,0x00000006, 25420x000001b9,0x00000264,0x0004003d,0x00000007,
25530x00004f74,0x00004f73,0x00000002,0x00000004, 25430x000052b4,0x000052b3,0x00050051,0x00000006,
25540x0004007c,0x00000027,0x00004f2b,0x00004f74, 25440x0000530e,0x000052b4,0x00000000,0x00050095,
25550x00050080,0x00000006,0x00004f2d,0x00004f26, 25450x0000013d,0x00005310,0x0000530e,0x000052b2,
25560x000000df,0x00050095,0x00000130,0x00004fa5, 25460x00050051,0x00000006,0x00005311,0x00005310,
25570x00004f82,0x00004f2d,0x00050051,0x00000006, 25470x00000001,0x00050051,0x00000006,0x00005312,
25580x00004fa6,0x00004fa5,0x00000001,0x00050051, 25480x00005310,0x00000000,0x00050051,0x00000006,
25590x00000006,0x00004fa7,0x00004fa5,0x00000000, 25490x00005315,0x000052b4,0x00000001,0x00050080,
25600x00050080,0x00000006,0x00004fac,0x00004f89, 25500x00000006,0x00005317,0x00005315,0x00005311,
25610x00004fa6,0x00050050,0x00000007,0x00004fad, 25510x00050050,0x00000007,0x00005318,0x00005312,
25620x00004fa7,0x00004fac,0x0004007c,0x00000014, 25520x00005317,0x0004007c,0x00000014,0x00005308,
25630x00004f9d,0x00004fad,0x00060041,0x0000015f, 25530x00005318,0x00060041,0x0000016c,0x000052ff,
25640x00004f94,0x00004f9d,0x0000015e,0x0000015e, 25540x00005308,0x0000016b,0x0000016b,0x0006003d,
25650x0006003d,0x00000006,0x00004f95,0x00004f94, 25550x00000006,0x00005300,0x000052ff,0x00000002,
25660x00000002,0x00000004,0x0004007c,0x00000027, 25560x00000004,0x0004007c,0x00000027,0x000052b7,
25670x00004f31,0x00004f95,0x00050080,0x00000006, 25570x00005300,0x00050080,0x00000006,0x000052b9,
25680x00004f33,0x00004f26,0x00000194,0x00050095, 25580x000052b2,0x000000ec,0x00050095,0x0000013d,
25690x00000130,0x00004fc6,0x00004f82,0x00004f33, 25590x00005331,0x0000530e,0x000052b9,0x00050051,
25700x00050051,0x00000006,0x00004fc7,0x00004fc6, 25600x00000006,0x00005332,0x00005331,0x00000001,
25710x00000001,0x00050051,0x00000006,0x00004fc8, 25610x00050051,0x00000006,0x00005333,0x00005331,
25720x00004fc6,0x00000000,0x00050080,0x00000006, 25620x00000000,0x00050080,0x00000006,0x00005338,
25730x00004fcd,0x00004f89,0x00004fc7,0x00050050, 25630x00005315,0x00005332,0x00050050,0x00000007,
25740x00000007,0x00004fce,0x00004fc8,0x00004fcd, 25640x00005339,0x00005333,0x00005338,0x0004007c,
25750x0004007c,0x00000014,0x00004fbe,0x00004fce, 25650x00000014,0x00005329,0x00005339,0x00060041,
25760x00060041,0x0000015f,0x00004fb5,0x00004fbe, 25660x0000016c,0x00005320,0x00005329,0x0000016b,
25770x0000015e,0x0000015e,0x0006003d,0x00000006, 25670x0000016b,0x0006003d,0x00000006,0x00005321,
25780x00004fb6,0x00004fb5,0x00000002,0x00000004, 25680x00005320,0x00000002,0x00000004,0x0004007c,
25790x0004007c,0x00000027,0x00004f37,0x00004fb6, 25690x00000027,0x000052bd,0x00005321,0x00050080,
25800x00060050,0x00000063,0x00004f38,0x00004f2b, 25700x00000006,0x000052bf,0x000052b2,0x000001cd,
25810x00004f31,0x00004f37,0x00050080,0x00000006, 25710x00050095,0x0000013d,0x00005352,0x0000530e,
25820x00004f3a,0x00004f26,0x0000019b,0x00050095, 25720x000052bf,0x00050051,0x00000006,0x00005353,
25830x00000130,0x00004fe7,0x00004f82,0x00004f3a, 25730x00005352,0x00000001,0x00050051,0x00000006,
25840x00050051,0x00000006,0x00004fe8,0x00004fe7, 25740x00005354,0x00005352,0x00000000,0x00050080,
25850x00000001,0x00050051,0x00000006,0x00004fe9, 25750x00000006,0x00005359,0x00005315,0x00005353,
25860x00004fe7,0x00000000,0x00050080,0x00000006, 25760x00050050,0x00000007,0x0000535a,0x00005354,
25870x00004fee,0x00004f89,0x00004fe8,0x00050050, 25770x00005359,0x0004007c,0x00000014,0x0000534a,
25880x00000007,0x00004fef,0x00004fe9,0x00004fee, 25780x0000535a,0x00060041,0x0000016c,0x00005341,
25890x0004007c,0x00000014,0x00004fdf,0x00004fef, 25790x0000534a,0x0000016b,0x0000016b,0x0006003d,
25900x00060041,0x0000015f,0x00004fd6,0x00004fdf, 25800x00000006,0x00005342,0x00005341,0x00000002,
25910x0000015e,0x0000015e,0x0006003d,0x00000006, 25810x00000004,0x0004007c,0x00000027,0x000052c3,
25920x00004fd7,0x00004fd6,0x00000002,0x00000004, 25820x00005342,0x00060050,0x0000006c,0x000052c4,
25930x0004007c,0x00000027,0x00004f3e,0x00004fd7, 25830x000052b7,0x000052bd,0x000052c3,0x00050080,
25940x00050080,0x00000006,0x00004f40,0x00004f26, 25840x00000006,0x000052c6,0x000052b2,0x000001d4,
25950x000001a2,0x00050095,0x00000130,0x00005008, 25850x00050095,0x0000013d,0x00005373,0x0000530e,
25960x00004f82,0x00004f40,0x00050051,0x00000006, 25860x000052c6,0x00050051,0x00000006,0x00005374,
25970x00005009,0x00005008,0x00000001,0x00050051, 25870x00005373,0x00000001,0x00050051,0x00000006,
25980x00000006,0x0000500a,0x00005008,0x00000000, 25880x00005375,0x00005373,0x00000000,0x00050080,
25990x00050080,0x00000006,0x0000500f,0x00004f89, 25890x00000006,0x0000537a,0x00005315,0x00005374,
26000x00005009,0x00050050,0x00000007,0x00005010, 25900x00050050,0x00000007,0x0000537b,0x00005375,
26010x0000500a,0x0000500f,0x0004007c,0x00000014, 25910x0000537a,0x0004007c,0x00000014,0x0000536b,
26020x00005000,0x00005010,0x00060041,0x0000015f, 25920x0000537b,0x00060041,0x0000016c,0x00005362,
26030x00004ff7,0x00005000,0x0000015e,0x0000015e, 25930x0000536b,0x0000016b,0x0000016b,0x0006003d,
26040x0006003d,0x00000006,0x00004ff8,0x00004ff7, 25940x00000006,0x00005363,0x00005362,0x00000002,
26050x00000002,0x00000004,0x0004007c,0x00000027, 25950x00000004,0x0004007c,0x00000027,0x000052ca,
26060x00004f44,0x00004ff8,0x00050080,0x00000006, 25960x00005363,0x00050080,0x00000006,0x000052cc,
26070x00004f46,0x00004f26,0x00000260,0x00050095, 25970x000052b2,0x000001db,0x00050095,0x0000013d,
26080x00000130,0x00005029,0x00004f82,0x00004f46, 25980x00005394,0x0000530e,0x000052cc,0x00050051,
26090x00050051,0x00000006,0x0000502a,0x00005029, 25990x00000006,0x00005395,0x00005394,0x00000001,
26100x00000001,0x00050051,0x00000006,0x0000502b, 26000x00050051,0x00000006,0x00005396,0x00005394,
26110x00005029,0x00000000,0x00050080,0x00000006, 26010x00000000,0x00050080,0x00000006,0x0000539b,
26120x00005030,0x00004f89,0x0000502a,0x00050050, 26020x00005315,0x00005395,0x00050050,0x00000007,
26130x00000007,0x00005031,0x0000502b,0x00005030, 26030x0000539c,0x00005396,0x0000539b,0x0004007c,
26140x0004007c,0x00000014,0x00005021,0x00005031, 26040x00000014,0x0000538c,0x0000539c,0x00060041,
26150x00060041,0x0000015f,0x00005018,0x00005021, 26050x0000016c,0x00005383,0x0000538c,0x0000016b,
26160x0000015e,0x0000015e,0x0006003d,0x00000006, 26060x0000016b,0x0006003d,0x00000006,0x00005384,
26170x00005019,0x00005018,0x00000002,0x00000004, 26070x00005383,0x00000002,0x00000004,0x0004007c,
26180x0004007c,0x00000027,0x00004f4a,0x00005019, 26080x00000027,0x000052d0,0x00005384,0x00050080,
26190x00060050,0x00000063,0x00004f4b,0x00004f3e, 26090x00000006,0x000052d2,0x000052b2,0x00000299,
26200x00004f44,0x00004f4a,0x00050041,0x00000182, 26100x00050095,0x0000013d,0x000053b5,0x0000530e,
26210x00005037,0x00000180,0x00000fbf,0x0004003d, 26110x000052d2,0x00050051,0x00000006,0x000053b6,
26220x00000006,0x00005038,0x00005037,0x000500c2, 26120x000053b5,0x00000001,0x00050051,0x00000006,
26230x00000006,0x00005047,0x00005922,0x000002e4, 26130x000053b7,0x000053b5,0x00000000,0x00050080,
26240x00050041,0x00000182,0x0000503b,0x00000180, 26140x00000006,0x000053bc,0x00005315,0x000053b6,
26250x00000311,0x0004003d,0x00000006,0x0000503c, 26150x00050050,0x00000007,0x000053bd,0x000053b7,
26260x0000503b,0x00050086,0x00000006,0x0000503d, 26160x000053bc,0x0004007c,0x00000014,0x000053ad,
26270x0000503c,0x0000018b,0x00050082,0x00000006, 26170x000053bd,0x00060041,0x0000016c,0x000053a4,
26280x0000503e,0x00005047,0x0000503d,0x00050084, 26180x000053ad,0x0000016b,0x0000016b,0x0006003d,
26290x00000006,0x0000503f,0x000000df,0x0000503e, 26190x00000006,0x000053a5,0x000053a4,0x00000002,
26300x00050080,0x00000006,0x00005040,0x00005038, 26200x00000004,0x0004007c,0x00000027,0x000052d6,
26310x0000503f,0x00050041,0x0000022d,0x00005041, 26210x000053a5,0x00060050,0x0000006c,0x000052d7,
26320x00000180,0x0000015e,0x0004003d,0x00000007, 26220x000052ca,0x000052d0,0x000052d6,0x00050041,
26330x00005042,0x00005041,0x00050051,0x00000006, 26230x000001bb,0x000053c3,0x000001b9,0x000010be,
26340x0000505e,0x00005042,0x00000000,0x00050095, 26240x0004003d,0x00000006,0x000053c4,0x000053c3,
26350x00000130,0x00005060,0x0000505e,0x00005040, 26250x000500c2,0x00000006,0x000053d3,0x00005cea,
26360x00050051,0x00000006,0x00005061,0x00005060, 26260x0000031d,0x00050041,0x000001bb,0x000053c7,
26370x00000001,0x00050051,0x00000006,0x00005062, 26270x000001b9,0x0000034a,0x0004003d,0x00000006,
26380x00005060,0x00000000,0x00050051,0x00000006, 26280x000053c8,0x000053c7,0x00050086,0x00000006,
26390x00005065,0x00005042,0x00000001,0x00050080, 26290x000053c9,0x000053c8,0x000001c4,0x00050082,
26400x00000006,0x00005067,0x00005065,0x00005061, 26300x00000006,0x000053ca,0x000053d3,0x000053c9,
26410x00050050,0x00000007,0x00005068,0x00005062, 26310x00050084,0x00000006,0x000053cb,0x000000ec,
26420x00005067,0x0004007c,0x00000014,0x00005058, 26320x000053ca,0x00050080,0x00000006,0x000053cc,
26430x00005068,0x00060041,0x0000015f,0x0000504f, 26330x000053c4,0x000053cb,0x00050041,0x00000266,
26440x00005058,0x0000015e,0x0000015e,0x0006003d, 26340x000053cd,0x000001b9,0x0000016b,0x0004003d,
26450x00000006,0x00005050,0x0000504f,0x00000002, 26350x00000007,0x000053ce,0x000053cd,0x00050051,
26460x00000004,0x00050041,0x00000182,0x0000506b, 26360x00000006,0x000053ea,0x000053ce,0x00000000,
26470x00000180,0x000002fb,0x0004003d,0x00000006, 26370x00050095,0x0000013d,0x000053ec,0x000053ea,
26480x0000506c,0x0000506b,0x000500c7,0x00000006, 26380x000053cc,0x00050051,0x00000006,0x000053ed,
26490x0000506d,0x0000506c,0x00000135,0x000500ab, 26390x000053ec,0x00000001,0x00050051,0x00000006,
26500x0000002f,0x0000506e,0x0000506d,0x0000012b, 26400x000053ee,0x000053ec,0x00000000,0x00050051,
26510x000300f7,0x00004da5,0x00000000,0x000400fa, 26410x00000006,0x000053f1,0x000053ce,0x00000001,
26520x0000506e,0x00004d9a,0x00004da5,0x000200f8, 26420x00050080,0x00000006,0x000053f3,0x000053f1,
26530x00004d9a,0x00050084,0x00000006,0x00004d9e, 26430x000053ed,0x00050050,0x00000007,0x000053f4,
26540x00000309,0x000011de,0x00050080,0x00000006, 26440x000053ee,0x000053f3,0x0004007c,0x00000014,
26550x00004d9f,0x0000503c,0x00004d9e,0x00050080, 26450x000053e4,0x000053f4,0x00060041,0x0000016c,
26560x00000006,0x00004da0,0x00004d9f,0x0000074b, 26460x000053db,0x000053e4,0x0000016b,0x0000016b,
26570x00050095,0x00000130,0x00005086,0x0000505e, 26470x0006003d,0x00000006,0x000053dc,0x000053db,
26580x00004da0,0x00050051,0x00000006,0x00005087, 26480x00000002,0x00000004,0x00050041,0x000001bb,
26590x00005086,0x00000001,0x00050051,0x00000006, 26490x000053f7,0x000001b9,0x00000334,0x0004003d,
26600x00005088,0x00005086,0x00000000,0x00050080, 26500x00000006,0x000053f8,0x000053f7,0x000500c7,
26610x00000006,0x0000508d,0x00005065,0x00005087, 26510x00000006,0x000053f9,0x000053f8,0x00000142,
26620x00050050,0x00000007,0x0000508e,0x00005088, 26520x000500ab,0x0000002f,0x000053fa,0x000053f9,
26630x0000508d,0x0004007c,0x00000014,0x0000507e, 26530x00000138,0x000300f7,0x00005131,0x00000000,
26640x0000508e,0x00060041,0x0000015f,0x00005076, 26540x000400fa,0x000053fa,0x00005126,0x00005131,
26650x0000507e,0x0000015e,0x0000015e,0x0005003e, 26550x000200f8,0x00005126,0x00050084,0x00000006,
26660x00005076,0x00005050,0x00000002,0x00000004, 26560x0000512a,0x00000342,0x000012dd,0x00050080,
26670x000200f9,0x00004da5,0x000200f8,0x00004da5, 26570x00000006,0x0000512b,0x000053c8,0x0000512a,
26680x000200f9,0x00004da6,0x000200f8,0x00004da6, 26580x00050080,0x00000006,0x0000512c,0x0000512b,
26690x000700f5,0x00000063,0x0000592c,0x00004f4b, 26590x0000084a,0x00050095,0x0000013d,0x00005412,
26700x00004da5,0x00005954,0x00004e11,0x000700f5, 26600x000053ea,0x0000512c,0x00050051,0x00000006,
26710x00000063,0x00005929,0x00004f38,0x00004da5,
26720x00005950,0x00004e11,0x000700f5,0x00000006,
26730x00005925,0x0000012b,0x00004da5,0x00004e13,
26740x00004e11,0x000700f5,0x00000006,0x00005923,
26750x00005050,0x00004da5,0x00005672,0x00004e11,
26760x000700f5,0x00000006,0x00005996,0x00005922,
26770x00004da5,0x00005923,0x00004e11,0x000500ab,
26780x0000002f,0x00004da9,0x00005923,0x00000500,
26790x000500b0,0x0000002f,0x00004dab,0x00005925,
26800x00000309,0x000500a7,0x0000002f,0x00004dac,
26810x00004da9,0x00004dab,0x000400f6,0x00004e14,
26820x00004e11,0x00000000,0x000400fa,0x00004dac,
26830x00004dad,0x00004e14,0x000200f8,0x00004dad,
26840x000500c2,0x00000006,0x00005092,0x00005923,
26850x000002e4,0x00050084,0x00000006,0x00004db0,
26860x00005092,0x0000018b,0x000200f9,0x00004db1,
26870x000200f8,0x00004db1,0x000700f5,0x00000006,
26880x00005942,0x0000012b,0x00004dad,0x00005bf6,
26890x00004dcf,0x000700f5,0x00000006,0x00005926,
26900x0000012b,0x00004dad,0x00004dd1,0x00004dcf,
26910x000500b0,0x0000002f,0x00004db4,0x00005926,
26920x000000df,0x000400f6,0x00004dd2,0x00004dcf,
26930x00000000,0x000400fa,0x00004db4,0x00004db5,
26940x00004dd2,0x000200f8,0x00004db5,0x00050084,
26950x00000006,0x00004db8,0x000000df,0x00005926,
26960x00050080,0x00000006,0x00004db9,0x00004db0,
26970x00004db8,0x00050095,0x00000130,0x000050ab,
26980x0000505e,0x00004db9,0x00050051,0x00000006,
26990x000050ac,0x000050ab,0x00000001,0x00050051,
27000x00000006,0x000050ad,0x000050ab,0x00000000,
27010x00050080,0x00000006,0x000050b2,0x00005065,
27020x000050ac,0x00050050,0x00000007,0x000050b3,
27030x000050ad,0x000050b2,0x0004007c,0x00000014,
27040x000050a3,0x000050b3,0x00060041,0x0000015f,
27050x0000509a,0x000050a3,0x0000015e,0x0000015e,
27060x0006003d,0x00000006,0x0000509b,0x0000509a,
27070x00000002,0x00000004,0x000500aa,0x0000002f,
27080x00004dbe,0x0000509b,0x00000500,0x000300f7,
27090x00004dc0,0x00000000,0x000400fa,0x00004dbe,
27100x00004dbf,0x00004dc0,0x000200f8,0x00004dbf,
27110x000200f9,0x00004dcf,0x000200f8,0x00004dc0,
27120x00050080,0x00000006,0x00004dc2,0x00005942,
27130x0000022b,0x000500aa,0x0000002f,0x00004dc5,
27140x0000509b,0x00005996,0x000300f7,0x00004dce,
27150x00000000,0x000400fa,0x00004dc5,0x00004dc6,
27160x00004dce,0x000200f8,0x00004dc6,0x000500c7,
27170x00000006,0x000050b7,0x00005923,0x00000c2c,
27180x000500aa,0x0000002f,0x000050b8,0x000050b7,
27190x000000df,0x000300f7,0x0000510b,0x00000000,
27200x000300fb,0x0000012b,0x000050d1,0x000200f8,
27210x000050d1,0x000300f7,0x000050dc,0x00000000,
27220x000400fa,0x000050b8,0x000050d3,0x000050dc,
27230x000200f8,0x000050d3,0x00050080,0x00000006,
27240x000050d5,0x00004db0,0x000001a2,0x00050084,
27250x00000006,0x000050d7,0x0000019b,0x00005926,
27260x00050080,0x00000006,0x000050d8,0x000050d5,
27270x000050d7,0x00050051,0x00000027,0x00005123,
27280x00005929,0x00000000,0x000300f7,0x0000519a,
27290x00000000,0x000300fb,0x0000012b,0x00005154,
27300x000200f8,0x00005154,0x0004007c,0x00000006,
27310x00005156,0x00005123,0x000500c2,0x00000006,
27320x00005158,0x00005156,0x00000321,0x000500c7,
27330x00000006,0x00005159,0x00005158,0x0000033a,
27340x000500c7,0x00000006,0x0000515b,0x00005156,
27350x0000021d,0x000500ab,0x0000002f,0x0000515e,
27360x00005159,0x0000012b,0x000500ac,0x0000002f,
27370x00005161,0x0000515b,0x00000345,0x000300f7,
27380x00005165,0x00000000,0x000400fa,0x00005161,
27390x00005162,0x00005165,0x000200f8,0x00005162,
27400x000500c5,0x00000006,0x00005164,0x00005159,
27410x0000034a,0x000200f9,0x0000519a,0x000200f8,
27420x00005165,0x000500aa,0x0000002f,0x00005167,
27430x0000515b,0x0000012b,0x000300f7,0x0000516a,
27440x00000000,0x000400fa,0x00005167,0x00005168,
27450x0000516a,0x000200f8,0x00005168,0x000200f9,
27460x0000519a,0x000200f8,0x0000516a,0x000500c2,
27470x00000006,0x0000516c,0x0000515b,0x00000355,
27480x0004007c,0x000000e7,0x0000516d,0x0000516c,
27490x00050082,0x000000e7,0x0000516e,0x0000516d,
27500x00000358,0x000500af,0x0000002f,0x00005170,
27510x0000516e,0x00000321,0x000300f7,0x00005176,
27520x00000000,0x000400fa,0x00005170,0x00005171,
27530x00005176,0x000200f8,0x00005171,0x000600a9,
27540x00000006,0x00005174,0x0000515e,0x00000360,
27550x00000361,0x000500c5,0x00000006,0x00005175,
27560x00005159,0x00005174,0x000200f9,0x0000519a,
27570x000200f8,0x00005176,0x000500b1,0x0000002f,
27580x00005178,0x0000516e,0x00000366,0x000300f7,
27590x00005182,0x00000000,0x000400fa,0x00005178,
27600x00005179,0x00005182,0x000200f8,0x00005179,
27610x000300f7,0x00005180,0x00000000,0x000400fa,
27620x0000515e,0x0000517b,0x0000517e,0x000200f8,
27630x0000517e,0x000200f9,0x00005180,0x000200f8,
27640x0000517b,0x000500c5,0x00000006,0x0000517d,
27650x00005159,0x0000036f,0x000200f9,0x00005180,
27660x000200f8,0x00005180,0x000700f5,0x00000006,
27670x0000599a,0x0000517d,0x0000517b,0x00005159,
27680x0000517e,0x000200f9,0x0000519a,0x000200f8,
27690x00005182,0x000500c7,0x00000006,0x00005184,
27700x00005156,0x00000377,0x00050080,0x000000e7,
27710x00005186,0x0000516d,0x00005cc4,0x0004007c,
27720x00000006,0x00005187,0x00005186,0x000500c4,
27730x00000006,0x00005188,0x00005187,0x0000037d,
27740x000500c2,0x00000006,0x0000518a,0x00005184,
27750x000001b7,0x000500c5,0x00000006,0x0000518b,
27760x00005188,0x0000518a,0x000300f7,0x00005191,
27770x00000000,0x000400fa,0x0000515e,0x0000518d,
27780x00005191,0x000200f8,0x0000518d,0x000500c7,
27790x00000006,0x0000518f,0x00005156,0x00000386,
27800x000500ab,0x0000002f,0x00005190,0x0000518f,
27810x0000012b,0x000200f9,0x00005191,0x000200f8,
27820x00005191,0x000700f5,0x0000002f,0x00005192,
27830x0000515e,0x00005182,0x00005190,0x0000518d,
27840x000300f7,0x00005196,0x00000000,0x000400fa,
27850x00005192,0x00005193,0x00005196,0x000200f8,
27860x00005193,0x00050080,0x00000006,0x00005195,
27870x0000518b,0x00000135,0x000200f9,0x00005196,
27880x000200f8,0x00005196,0x000700f5,0x00000006,
27890x00005999,0x0000518b,0x00005191,0x00005195,
27900x00005193,0x000500c5,0x00000006,0x00005199,
27910x00005159,0x00005999,0x000200f9,0x0000519a,
27920x000200f8,0x0000519a,0x000d00f5,0x00000006,
27930x0000599b,0x00005164,0x00005162,0x00005159,
27940x00005168,0x00005175,0x00005171,0x0000599a,
27950x00005180,0x00005199,0x00005196,0x00050051,
27960x00000027,0x00005126,0x00005929,0x00000001,
27970x000300f7,0x000051ee,0x00000000,0x000300fb,
27980x0000012b,0x000051a8,0x000200f8,0x000051a8,
27990x0004007c,0x00000006,0x000051aa,0x00005126,
28000x000500c2,0x00000006,0x000051ac,0x000051aa,
28010x00000321,0x000500c7,0x00000006,0x000051ad,
28020x000051ac,0x0000033a,0x000500c7,0x00000006,
28030x000051af,0x000051aa,0x0000021d,0x000500ab,
28040x0000002f,0x000051b2,0x000051ad,0x0000012b,
28050x000500ac,0x0000002f,0x000051b5,0x000051af,
28060x00000345,0x000300f7,0x000051b9,0x00000000,
28070x000400fa,0x000051b5,0x000051b6,0x000051b9,
28080x000200f8,0x000051b6,0x000500c5,0x00000006,
28090x000051b8,0x000051ad,0x0000034a,0x000200f9,
28100x000051ee,0x000200f8,0x000051b9,0x000500aa,
28110x0000002f,0x000051bb,0x000051af,0x0000012b,
28120x000300f7,0x000051be,0x00000000,0x000400fa,
28130x000051bb,0x000051bc,0x000051be,0x000200f8,
28140x000051bc,0x000200f9,0x000051ee,0x000200f8,
28150x000051be,0x000500c2,0x00000006,0x000051c0,
28160x000051af,0x00000355,0x0004007c,0x000000e7,
28170x000051c1,0x000051c0,0x00050082,0x000000e7,
28180x000051c2,0x000051c1,0x00000358,0x000500af,
28190x0000002f,0x000051c4,0x000051c2,0x00000321,
28200x000300f7,0x000051ca,0x00000000,0x000400fa,
28210x000051c4,0x000051c5,0x000051ca,0x000200f8,
28220x000051c5,0x000600a9,0x00000006,0x000051c8,
28230x000051b2,0x00000360,0x00000361,0x000500c5,
28240x00000006,0x000051c9,0x000051ad,0x000051c8,
28250x000200f9,0x000051ee,0x000200f8,0x000051ca,
28260x000500b1,0x0000002f,0x000051cc,0x000051c2,
28270x00000366,0x000300f7,0x000051d6,0x00000000,
28280x000400fa,0x000051cc,0x000051cd,0x000051d6,
28290x000200f8,0x000051cd,0x000300f7,0x000051d4,
28300x00000000,0x000400fa,0x000051b2,0x000051cf,
28310x000051d2,0x000200f8,0x000051d2,0x000200f9,
28320x000051d4,0x000200f8,0x000051cf,0x000500c5,
28330x00000006,0x000051d1,0x000051ad,0x0000036f,
28340x000200f9,0x000051d4,0x000200f8,0x000051d4,
28350x000700f5,0x00000006,0x0000599e,0x000051d1,
28360x000051cf,0x000051ad,0x000051d2,0x000200f9,
28370x000051ee,0x000200f8,0x000051d6,0x000500c7,
28380x00000006,0x000051d8,0x000051aa,0x00000377,
28390x00050080,0x000000e7,0x000051da,0x000051c1,
28400x00005cc4,0x0004007c,0x00000006,0x000051db,
28410x000051da,0x000500c4,0x00000006,0x000051dc,
28420x000051db,0x0000037d,0x000500c2,0x00000006,
28430x000051de,0x000051d8,0x000001b7,0x000500c5,
28440x00000006,0x000051df,0x000051dc,0x000051de,
28450x000300f7,0x000051e5,0x00000000,0x000400fa,
28460x000051b2,0x000051e1,0x000051e5,0x000200f8,
28470x000051e1,0x000500c7,0x00000006,0x000051e3,
28480x000051aa,0x00000386,0x000500ab,0x0000002f,
28490x000051e4,0x000051e3,0x0000012b,0x000200f9,
28500x000051e5,0x000200f8,0x000051e5,0x000700f5,
28510x0000002f,0x000051e6,0x000051b2,0x000051d6,
28520x000051e4,0x000051e1,0x000300f7,0x000051ea,
28530x00000000,0x000400fa,0x000051e6,0x000051e7,
28540x000051ea,0x000200f8,0x000051e7,0x00050080,
28550x00000006,0x000051e9,0x000051df,0x00000135,
28560x000200f9,0x000051ea,0x000200f8,0x000051ea,
28570x000700f5,0x00000006,0x0000599d,0x000051df,
28580x000051e5,0x000051e9,0x000051e7,0x000500c5,
28590x00000006,0x000051ed,0x000051ad,0x0000599d,
28600x000200f9,0x000051ee,0x000200f8,0x000051ee,
28610x000d00f5,0x00000006,0x0000599f,0x000051b8,
28620x000051b6,0x000051ad,0x000051bc,0x000051c9,
28630x000051c5,0x0000599e,0x000051d4,0x000051ed,
28640x000051ea,0x000500c4,0x00000006,0x00005128,
28650x0000599f,0x00000321,0x000500c5,0x00000006,
28660x00005129,0x0000599b,0x00005128,0x00050095,
28670x00000130,0x00005207,0x0000505e,0x000050d8,
28680x00050051,0x00000006,0x00005208,0x00005207,
28690x00000001,0x00050051,0x00000006,0x00005209,
28700x00005207,0x00000000,0x00050080,0x00000006,
28710x0000520e,0x00005065,0x00005208,0x00050050,
28720x00000007,0x0000520f,0x00005209,0x0000520e,
28730x0004007c,0x00000014,0x000051ff,0x0000520f,
28740x00060041,0x0000015f,0x000051f7,0x000051ff,
28750x0000015e,0x0000015e,0x0005003e,0x000051f7,
28760x00005129,0x00000002,0x00000004,0x00050080,
28770x00000006,0x0000512f,0x000050d8,0x000000df,
28780x00050051,0x00000027,0x00005131,0x00005929,
28790x00000002,0x000300f7,0x00005262,0x00000000,
28800x000300fb,0x0000012b,0x0000521c,0x000200f8,
28810x0000521c,0x0004007c,0x00000006,0x0000521e,
28820x00005131,0x000500c2,0x00000006,0x00005220,
28830x0000521e,0x00000321,0x000500c7,0x00000006,
28840x00005221,0x00005220,0x0000033a,0x000500c7,
28850x00000006,0x00005223,0x0000521e,0x0000021d,
28860x000500ab,0x0000002f,0x00005226,0x00005221,
28870x0000012b,0x000500ac,0x0000002f,0x00005229,
28880x00005223,0x00000345,0x000300f7,0x0000522d,
28890x00000000,0x000400fa,0x00005229,0x0000522a,
28900x0000522d,0x000200f8,0x0000522a,0x000500c5,
28910x00000006,0x0000522c,0x00005221,0x0000034a,
28920x000200f9,0x00005262,0x000200f8,0x0000522d,
28930x000500aa,0x0000002f,0x0000522f,0x00005223,
28940x0000012b,0x000300f7,0x00005232,0x00000000,
28950x000400fa,0x0000522f,0x00005230,0x00005232,
28960x000200f8,0x00005230,0x000200f9,0x00005262,
28970x000200f8,0x00005232,0x000500c2,0x00000006,
28980x00005234,0x00005223,0x00000355,0x0004007c,
28990x000000e7,0x00005235,0x00005234,0x00050082,
29000x000000e7,0x00005236,0x00005235,0x00000358,
29010x000500af,0x0000002f,0x00005238,0x00005236,
29020x00000321,0x000300f7,0x0000523e,0x00000000,
29030x000400fa,0x00005238,0x00005239,0x0000523e,
29040x000200f8,0x00005239,0x000600a9,0x00000006,
29050x0000523c,0x00005226,0x00000360,0x00000361,
29060x000500c5,0x00000006,0x0000523d,0x00005221,
29070x0000523c,0x000200f9,0x00005262,0x000200f8,
29080x0000523e,0x000500b1,0x0000002f,0x00005240,
29090x00005236,0x00000366,0x000300f7,0x0000524a,
29100x00000000,0x000400fa,0x00005240,0x00005241,
29110x0000524a,0x000200f8,0x00005241,0x000300f7,
29120x00005248,0x00000000,0x000400fa,0x00005226,
29130x00005243,0x00005246,0x000200f8,0x00005246,
29140x000200f9,0x00005248,0x000200f8,0x00005243,
29150x000500c5,0x00000006,0x00005245,0x00005221,
29160x0000036f,0x000200f9,0x00005248,0x000200f8,
29170x00005248,0x000700f5,0x00000006,0x000059a2,
29180x00005245,0x00005243,0x00005221,0x00005246,
29190x000200f9,0x00005262,0x000200f8,0x0000524a,
29200x000500c7,0x00000006,0x0000524c,0x0000521e,
29210x00000377,0x00050080,0x000000e7,0x0000524e,
29220x00005235,0x00005cc4,0x0004007c,0x00000006,
29230x0000524f,0x0000524e,0x000500c4,0x00000006,
29240x00005250,0x0000524f,0x0000037d,0x000500c2,
29250x00000006,0x00005252,0x0000524c,0x000001b7,
29260x000500c5,0x00000006,0x00005253,0x00005250,
29270x00005252,0x000300f7,0x00005259,0x00000000,
29280x000400fa,0x00005226,0x00005255,0x00005259,
29290x000200f8,0x00005255,0x000500c7,0x00000006,
29300x00005257,0x0000521e,0x00000386,0x000500ab,
29310x0000002f,0x00005258,0x00005257,0x0000012b,
29320x000200f9,0x00005259,0x000200f8,0x00005259,
29330x000700f5,0x0000002f,0x0000525a,0x00005226,
29340x0000524a,0x00005258,0x00005255,0x000300f7,
29350x0000525e,0x00000000,0x000400fa,0x0000525a,
29360x0000525b,0x0000525e,0x000200f8,0x0000525b,
29370x00050080,0x00000006,0x0000525d,0x00005253,
29380x00000135,0x000200f9,0x0000525e,0x000200f8,
29390x0000525e,0x000700f5,0x00000006,0x000059a1,
29400x00005253,0x00005259,0x0000525d,0x0000525b,
29410x000500c5,0x00000006,0x00005261,0x00005221,
29420x000059a1,0x000200f9,0x00005262,0x000200f8,
29430x00005262,0x000d00f5,0x00000006,0x000059a3,
29440x0000522c,0x0000522a,0x00005221,0x00005230,
29450x0000523d,0x00005239,0x000059a2,0x00005248,
29460x00005261,0x0000525e,0x00050051,0x00000027,
29470x00005134,0x0000592c,0x00000000,0x000300f7,
29480x000052b6,0x00000000,0x000300fb,0x0000012b,
29490x00005270,0x000200f8,0x00005270,0x0004007c,
29500x00000006,0x00005272,0x00005134,0x000500c2,
29510x00000006,0x00005274,0x00005272,0x00000321,
29520x000500c7,0x00000006,0x00005275,0x00005274,
29530x0000033a,0x000500c7,0x00000006,0x00005277,
29540x00005272,0x0000021d,0x000500aa,0x0000002f,
29550x0000527b,0x00005275,0x0000012b,0x000500ac,
29560x0000002f,0x0000527d,0x00005277,0x00000345,
29570x000300f7,0x00005281,0x00000000,0x000400fa,
29580x0000527d,0x0000527e,0x00005281,0x000200f8,
29590x0000527e,0x000500c5,0x00000006,0x00005280,
29600x00005275,0x0000034a,0x000200f9,0x000052b6,
29610x000200f8,0x00005281,0x000500aa,0x0000002f,
29620x00005283,0x00005277,0x0000012b,0x000300f7,
29630x00005286,0x00000000,0x000400fa,0x00005283,
29640x00005284,0x00005286,0x000200f8,0x00005284,
29650x000200f9,0x000052b6,0x000200f8,0x00005286,
29660x000500c2,0x00000006,0x00005288,0x00005277,
29670x00000355,0x0004007c,0x000000e7,0x00005289,
29680x00005288,0x00050082,0x000000e7,0x0000528a,
29690x00005289,0x00000358,0x000500af,0x0000002f,
29700x0000528c,0x0000528a,0x00000321,0x000300f7,
29710x00005292,0x00000000,0x000400fa,0x0000528c,
29720x0000528d,0x00005292,0x000200f8,0x0000528d,
29730x000600a9,0x00000006,0x00005290,0x0000527b,
29740x00000360,0x00000361,0x000500c5,0x00000006,
29750x00005291,0x00005275,0x00005290,0x000200f9,
29760x000052b6,0x000200f8,0x00005292,0x000500b1,
29770x0000002f,0x00005294,0x0000528a,0x00000366,
29780x000300f7,0x0000529e,0x00000000,0x000400fa,
29790x00005294,0x00005295,0x0000529e,0x000200f8,
29800x00005295,0x000300f7,0x0000529c,0x00000000,
29810x000400fa,0x0000527b,0x00005297,0x0000529a,
29820x000200f8,0x0000529a,0x000200f9,0x0000529c,
29830x000200f8,0x00005297,0x000500c5,0x00000006,
29840x00005299,0x00005275,0x0000036f,0x000200f9,
29850x0000529c,0x000200f8,0x0000529c,0x000700f5,
29860x00000006,0x000059a6,0x00005299,0x00005297,
29870x00005275,0x0000529a,0x000200f9,0x000052b6,
29880x000200f8,0x0000529e,0x000500c7,0x00000006,
29890x000052a0,0x00005272,0x00000377,0x00050080,
29900x000000e7,0x000052a2,0x00005289,0x00005cc4,
29910x0004007c,0x00000006,0x000052a3,0x000052a2,
29920x000500c4,0x00000006,0x000052a4,0x000052a3,
29930x0000037d,0x000500c2,0x00000006,0x000052a6,
29940x000052a0,0x000001b7,0x000500c5,0x00000006,
29950x000052a7,0x000052a4,0x000052a6,0x000300f7,
29960x000052ad,0x00000000,0x000400fa,0x0000527b,
29970x000052a9,0x000052ad,0x000200f8,0x000052a9,
29980x000500c7,0x00000006,0x000052ab,0x00005272,
29990x00000386,0x000500ab,0x0000002f,0x000052ac,
30000x000052ab,0x0000012b,0x000200f9,0x000052ad,
30010x000200f8,0x000052ad,0x000700f5,0x0000002f,
30020x000052ae,0x0000527b,0x0000529e,0x000052ac,
30030x000052a9,0x000300f7,0x000052b2,0x00000000,
30040x000400fa,0x000052ae,0x000052af,0x000052b2,
30050x000200f8,0x000052af,0x00050080,0x00000006,
30060x000052b1,0x000052a7,0x00000135,0x000200f9,
30070x000052b2,0x000200f8,0x000052b2,0x000700f5,
30080x00000006,0x000059a5,0x000052a7,0x000052ad,
30090x000052b1,0x000052af,0x000500c5,0x00000006,
30100x000052b5,0x00005275,0x000059a5,0x000200f9,
30110x000052b6,0x000200f8,0x000052b6,0x000d00f5,
30120x00000006,0x000059a7,0x00005280,0x0000527e,
30130x00005275,0x00005284,0x00005291,0x0000528d,
30140x000059a6,0x0000529c,0x000052b5,0x000052b2,
30150x000500c4,0x00000006,0x00005136,0x000059a7,
30160x00000321,0x000500c5,0x00000006,0x00005137,
30170x000059a3,0x00005136,0x00050095,0x00000130,
30180x000052cf,0x0000505e,0x0000512f,0x00050051,
30190x00000006,0x000052d0,0x000052cf,0x00000001,
30200x00050051,0x00000006,0x000052d1,0x000052cf,
30210x00000000,0x00050080,0x00000006,0x000052d6,
30220x00005065,0x000052d0,0x00050050,0x00000007,
30230x000052d7,0x000052d1,0x000052d6,0x0004007c,
30240x00000014,0x000052c7,0x000052d7,0x00060041,
30250x0000015f,0x000052bf,0x000052c7,0x0000015e,
30260x0000015e,0x0005003e,0x000052bf,0x00005137,
30270x00000002,0x00000004,0x00050080,0x00000006,
30280x0000513c,0x000050d8,0x00000194,0x00050051,
30290x00000027,0x0000513e,0x0000592c,0x00000001,
30300x000300f7,0x0000532a,0x00000000,0x000300fb,
30310x0000012b,0x000052e4,0x000200f8,0x000052e4,
30320x0004007c,0x00000006,0x000052e6,0x0000513e,
30330x000500c2,0x00000006,0x000052e8,0x000052e6,
30340x00000321,0x000500c7,0x00000006,0x000052e9,
30350x000052e8,0x0000033a,0x000500c7,0x00000006,
30360x000052eb,0x000052e6,0x0000021d,0x000500aa,
30370x0000002f,0x000052ef,0x000052e9,0x0000012b,
30380x000500ac,0x0000002f,0x000052f1,0x000052eb,
30390x00000345,0x000300f7,0x000052f5,0x00000000,
30400x000400fa,0x000052f1,0x000052f2,0x000052f5,
30410x000200f8,0x000052f2,0x000500c5,0x00000006,
30420x000052f4,0x000052e9,0x0000034a,0x000200f9,
30430x0000532a,0x000200f8,0x000052f5,0x000500aa,
30440x0000002f,0x000052f7,0x000052eb,0x0000012b,
30450x000300f7,0x000052fa,0x00000000,0x000400fa,
30460x000052f7,0x000052f8,0x000052fa,0x000200f8,
30470x000052f8,0x000200f9,0x0000532a,0x000200f8,
30480x000052fa,0x000500c2,0x00000006,0x000052fc,
30490x000052eb,0x00000355,0x0004007c,0x000000e7,
30500x000052fd,0x000052fc,0x00050082,0x000000e7,
30510x000052fe,0x000052fd,0x00000358,0x000500af,
30520x0000002f,0x00005300,0x000052fe,0x00000321,
30530x000300f7,0x00005306,0x00000000,0x000400fa,
30540x00005300,0x00005301,0x00005306,0x000200f8,
30550x00005301,0x000600a9,0x00000006,0x00005304,
30560x000052ef,0x00000360,0x00000361,0x000500c5,
30570x00000006,0x00005305,0x000052e9,0x00005304,
30580x000200f9,0x0000532a,0x000200f8,0x00005306,
30590x000500b1,0x0000002f,0x00005308,0x000052fe,
30600x00000366,0x000300f7,0x00005312,0x00000000,
30610x000400fa,0x00005308,0x00005309,0x00005312,
30620x000200f8,0x00005309,0x000300f7,0x00005310,
30630x00000000,0x000400fa,0x000052ef,0x0000530b,
30640x0000530e,0x000200f8,0x0000530e,0x000200f9,
30650x00005310,0x000200f8,0x0000530b,0x000500c5,
30660x00000006,0x0000530d,0x000052e9,0x0000036f,
30670x000200f9,0x00005310,0x000200f8,0x00005310,
30680x000700f5,0x00000006,0x000059aa,0x0000530d,
30690x0000530b,0x000052e9,0x0000530e,0x000200f9,
30700x0000532a,0x000200f8,0x00005312,0x000500c7,
30710x00000006,0x00005314,0x000052e6,0x00000377,
30720x00050080,0x000000e7,0x00005316,0x000052fd,
30730x00005cc4,0x0004007c,0x00000006,0x00005317,
30740x00005316,0x000500c4,0x00000006,0x00005318,
30750x00005317,0x0000037d,0x000500c2,0x00000006,
30760x0000531a,0x00005314,0x000001b7,0x000500c5,
30770x00000006,0x0000531b,0x00005318,0x0000531a,
30780x000300f7,0x00005321,0x00000000,0x000400fa,
30790x000052ef,0x0000531d,0x00005321,0x000200f8,
30800x0000531d,0x000500c7,0x00000006,0x0000531f,
30810x000052e6,0x00000386,0x000500ab,0x0000002f,
30820x00005320,0x0000531f,0x0000012b,0x000200f9,
30830x00005321,0x000200f8,0x00005321,0x000700f5,
30840x0000002f,0x00005322,0x000052ef,0x00005312,
30850x00005320,0x0000531d,0x000300f7,0x00005326,
30860x00000000,0x000400fa,0x00005322,0x00005323,
30870x00005326,0x000200f8,0x00005323,0x00050080,
30880x00000006,0x00005325,0x0000531b,0x00000135,
30890x000200f9,0x00005326,0x000200f8,0x00005326,
30900x000700f5,0x00000006,0x000059a9,0x0000531b,
30910x00005321,0x00005325,0x00005323,0x000500c5,
30920x00000006,0x00005329,0x000052e9,0x000059a9,
30930x000200f9,0x0000532a,0x000200f8,0x0000532a,
30940x000d00f5,0x00000006,0x000059ab,0x000052f4,
30950x000052f2,0x000052e9,0x000052f8,0x00005305,
30960x00005301,0x000059aa,0x00005310,0x00005329,
30970x00005326,0x00050051,0x00000027,0x00005141,
30980x0000592c,0x00000002,0x000300f7,0x0000537e,
30990x00000000,0x000300fb,0x0000012b,0x00005338,
31000x000200f8,0x00005338,0x0004007c,0x00000006,
31010x0000533a,0x00005141,0x000500c2,0x00000006,
31020x0000533c,0x0000533a,0x00000321,0x000500c7,
31030x00000006,0x0000533d,0x0000533c,0x0000033a,
31040x000500c7,0x00000006,0x0000533f,0x0000533a,
31050x0000021d,0x000500aa,0x0000002f,0x00005343,
31060x0000533d,0x0000012b,0x000500ac,0x0000002f,
31070x00005345,0x0000533f,0x00000345,0x000300f7,
31080x00005349,0x00000000,0x000400fa,0x00005345,
31090x00005346,0x00005349,0x000200f8,0x00005346,
31100x000500c5,0x00000006,0x00005348,0x0000533d,
31110x0000034a,0x000200f9,0x0000537e,0x000200f8,
31120x00005349,0x000500aa,0x0000002f,0x0000534b,
31130x0000533f,0x0000012b,0x000300f7,0x0000534e,
31140x00000000,0x000400fa,0x0000534b,0x0000534c,
31150x0000534e,0x000200f8,0x0000534c,0x000200f9,
31160x0000537e,0x000200f8,0x0000534e,0x000500c2,
31170x00000006,0x00005350,0x0000533f,0x00000355,
31180x0004007c,0x000000e7,0x00005351,0x00005350,
31190x00050082,0x000000e7,0x00005352,0x00005351,
31200x00000358,0x000500af,0x0000002f,0x00005354,
31210x00005352,0x00000321,0x000300f7,0x0000535a,
31220x00000000,0x000400fa,0x00005354,0x00005355,
31230x0000535a,0x000200f8,0x00005355,0x000600a9,
31240x00000006,0x00005358,0x00005343,0x00000360,
31250x00000361,0x000500c5,0x00000006,0x00005359,
31260x0000533d,0x00005358,0x000200f9,0x0000537e,
31270x000200f8,0x0000535a,0x000500b1,0x0000002f,
31280x0000535c,0x00005352,0x00000366,0x000300f7,
31290x00005366,0x00000000,0x000400fa,0x0000535c,
31300x0000535d,0x00005366,0x000200f8,0x0000535d,
31310x000300f7,0x00005364,0x00000000,0x000400fa,
31320x00005343,0x0000535f,0x00005362,0x000200f8,
31330x00005362,0x000200f9,0x00005364,0x000200f8,
31340x0000535f,0x000500c5,0x00000006,0x00005361,
31350x0000533d,0x0000036f,0x000200f9,0x00005364,
31360x000200f8,0x00005364,0x000700f5,0x00000006,
31370x000059ae,0x00005361,0x0000535f,0x0000533d,
31380x00005362,0x000200f9,0x0000537e,0x000200f8,
31390x00005366,0x000500c7,0x00000006,0x00005368,
31400x0000533a,0x00000377,0x00050080,0x000000e7,
31410x0000536a,0x00005351,0x00005cc4,0x0004007c,
31420x00000006,0x0000536b,0x0000536a,0x000500c4,
31430x00000006,0x0000536c,0x0000536b,0x0000037d,
31440x000500c2,0x00000006,0x0000536e,0x00005368,
31450x000001b7,0x000500c5,0x00000006,0x0000536f,
31460x0000536c,0x0000536e,0x000300f7,0x00005375,
31470x00000000,0x000400fa,0x00005343,0x00005371,
31480x00005375,0x000200f8,0x00005371,0x000500c7,
31490x00000006,0x00005373,0x0000533a,0x00000386,
31500x000500ab,0x0000002f,0x00005374,0x00005373,
31510x0000012b,0x000200f9,0x00005375,0x000200f8,
31520x00005375,0x000700f5,0x0000002f,0x00005376,
31530x00005343,0x00005366,0x00005374,0x00005371,
31540x000300f7,0x0000537a,0x00000000,0x000400fa,
31550x00005376,0x00005377,0x0000537a,0x000200f8,
31560x00005377,0x00050080,0x00000006,0x00005379,
31570x0000536f,0x00000135,0x000200f9,0x0000537a,
31580x000200f8,0x0000537a,0x000700f5,0x00000006,
31590x000059ad,0x0000536f,0x00005375,0x00005379,
31600x00005377,0x000500c5,0x00000006,0x0000537d,
31610x0000533d,0x000059ad,0x000200f9,0x0000537e,
31620x000200f8,0x0000537e,0x000d00f5,0x00000006,
31630x000059af,0x00005348,0x00005346,0x0000533d,
31640x0000534c,0x00005359,0x00005355,0x000059ae,
31650x00005364,0x0000537d,0x0000537a,0x000500c4,
31660x00000006,0x00005143,0x000059af,0x00000321,
31670x000500c5,0x00000006,0x00005144,0x000059ab,
31680x00005143,0x00050095,0x00000130,0x00005397,
31690x0000505e,0x0000513c,0x00050051,0x00000006,
31700x00005398,0x00005397,0x00000001,0x00050051,
31710x00000006,0x00005399,0x00005397,0x00000000,
31720x00050080,0x00000006,0x0000539e,0x00005065,
31730x00005398,0x00050050,0x00000007,0x0000539f,
31740x00005399,0x0000539e,0x0004007c,0x00000014,
31750x0000538f,0x0000539f,0x00060041,0x0000015f,
31760x00005387,0x0000538f,0x0000015e,0x0000015e,
31770x0005003e,0x00005387,0x00005144,0x00000002,
31780x00000004,0x000200f9,0x0000510b,0x000200f8,
31790x000050dc,0x00050080,0x00000006,0x000050de,
31800x00004db0,0x000001a2,0x00050084,0x00000006,
31810x000050e0,0x000001b6,0x00005926,0x00050080,
31820x00000006,0x000050e1,0x000050de,0x000050e0,
31830x00050051,0x00000027,0x000050e6,0x00005929,
31840x00000000,0x0004007c,0x00000006,0x000053a5,
31850x000050e6,0x00050095,0x00000130,0x000053c0,
31860x0000505e,0x000050e1,0x00050051,0x00000006,
31870x000053c1,0x000053c0,0x00000001,0x00050051,
31880x00000006,0x000053c2,0x000053c0,0x00000000,
31890x00050080,0x00000006,0x000053c7,0x00005065,
31900x000053c1,0x00050050,0x00000007,0x000053c8,
31910x000053c2,0x000053c7,0x0004007c,0x00000014,
31920x000053b8,0x000053c8,0x00060041,0x0000015f,
31930x000053b0,0x000053b8,0x0000015e,0x0000015e,
31940x0005003e,0x000053b0,0x000053a5,0x00000002,
31950x00000004,0x00050080,0x00000006,0x000050e9,
31960x000050e1,0x000000df,0x00050051,0x00000027,
31970x000050ed,0x00005929,0x00000001,0x0004007c,
31980x00000006,0x000053ce,0x000050ed,0x00050095,
31990x00000130,0x000053e9,0x0000505e,0x000050e9,
32000x00050051,0x00000006,0x000053ea,0x000053e9,
32010x00000001,0x00050051,0x00000006,0x000053eb,
32020x000053e9,0x00000000,0x00050080,0x00000006,
32030x000053f0,0x00005065,0x000053ea,0x00050050,
32040x00000007,0x000053f1,0x000053eb,0x000053f0,
32050x0004007c,0x00000014,0x000053e1,0x000053f1,
32060x00060041,0x0000015f,0x000053d9,0x000053e1,
32070x0000015e,0x0000015e,0x0005003e,0x000053d9,
32080x000053ce,0x00000002,0x00000004,0x00050080,
32090x00000006,0x000050f0,0x000050e1,0x00000194,
32100x00050051,0x00000027,0x000050f4,0x00005929,
32110x00000002,0x0004007c,0x00000006,0x000053f7,
32120x000050f4,0x00050095,0x00000130,0x00005412,
32130x0000505e,0x000050f0,0x00050051,0x00000006,
32140x00005413,0x00005412,0x00000001,0x00050051, 26610x00005413,0x00005412,0x00000001,0x00050051,
32150x00000006,0x00005414,0x00005412,0x00000000, 26620x00000006,0x00005414,0x00005412,0x00000000,
32160x00050080,0x00000006,0x00005419,0x00005065, 26630x00050080,0x00000006,0x00005419,0x000053f1,
32170x00005413,0x00050050,0x00000007,0x0000541a, 26640x00005413,0x00050050,0x00000007,0x0000541a,
32180x00005414,0x00005419,0x0004007c,0x00000014, 26650x00005414,0x00005419,0x0004007c,0x00000014,
32190x0000540a,0x0000541a,0x00060041,0x0000015f, 26660x0000540a,0x0000541a,0x00060041,0x0000016c,
32200x00005402,0x0000540a,0x0000015e,0x0000015e, 26670x00005402,0x0000540a,0x0000016b,0x0000016b,
32210x0005003e,0x00005402,0x000053f7,0x00000002, 26680x0005003e,0x00005402,0x000053dc,0x00000002,
32220x00000004,0x00050080,0x00000006,0x000050f7, 26690x00000004,0x000200f9,0x00005131,0x000200f8,
32230x000050e1,0x0000019b,0x00050051,0x00000027, 26700x00005131,0x000200f9,0x00005132,0x000200f8,
32240x000050fb,0x0000592c,0x00000000,0x0004007c, 26710x00005132,0x000700f5,0x0000006c,0x00005cf4,
32250x00000006,0x00005420,0x000050fb,0x00050095, 26720x000052d7,0x00005131,0x00005d1c,0x0000519d,
32260x00000130,0x0000543b,0x0000505e,0x000050f7, 26730x000700f5,0x0000006c,0x00005cf1,0x000052c4,
32270x00050051,0x00000006,0x0000543c,0x0000543b, 26740x00005131,0x00005d18,0x0000519d,0x000700f5,
32280x00000001,0x00050051,0x00000006,0x0000543d, 26750x00000006,0x00005ced,0x00000138,0x00005131,
32290x0000543b,0x00000000,0x00050080,0x00000006, 26760x0000519f,0x0000519d,0x000700f5,0x00000006,
32300x00005442,0x00005065,0x0000543c,0x00050050, 26770x00005ceb,0x000053dc,0x00005131,0x000059fe,
32310x00000007,0x00005443,0x0000543d,0x00005442, 26780x0000519d,0x000700f5,0x00000006,0x00005d5e,
32320x0004007c,0x00000014,0x00005433,0x00005443, 26790x00005cea,0x00005131,0x00005ceb,0x0000519d,
32330x00060041,0x0000015f,0x0000542b,0x00005433, 26800x000500ab,0x0000002f,0x00005135,0x00005ceb,
32340x0000015e,0x0000015e,0x0005003e,0x0000542b, 26810x00000539,0x000500b0,0x0000002f,0x00005137,
32350x00005420,0x00000002,0x00000004,0x00050080, 26820x00005ced,0x00000342,0x000500a7,0x0000002f,
32360x00000006,0x000050fe,0x000050e1,0x000001a2, 26830x00005138,0x00005135,0x00005137,0x000400f6,
32370x00050051,0x00000027,0x00005102,0x0000592c, 26840x000051a0,0x0000519d,0x00000000,0x000400fa,
32380x00000001,0x0004007c,0x00000006,0x00005449, 26850x00005138,0x00005139,0x000051a0,0x000200f8,
32390x00005102,0x00050095,0x00000130,0x00005464, 26860x00005139,0x000500c2,0x00000006,0x0000541e,
32400x0000505e,0x000050fe,0x00050051,0x00000006, 26870x00005ceb,0x0000031d,0x00050084,0x00000006,
32410x00005465,0x00005464,0x00000001,0x00050051, 26880x0000513c,0x0000541e,0x000001c4,0x000200f9,
32420x00000006,0x00005466,0x00005464,0x00000000, 26890x0000513d,0x000200f8,0x0000513d,0x000700f5,
32430x00050080,0x00000006,0x0000546b,0x00005065, 26900x00000006,0x00005d0a,0x00000138,0x00005139,
32440x00005465,0x00050050,0x00000007,0x0000546c, 26910x00006026,0x0000515b,0x000700f5,0x00000006,
32450x00005466,0x0000546b,0x0004007c,0x00000014, 26920x00005cee,0x00000138,0x00005139,0x0000515d,
32460x0000545c,0x0000546c,0x00060041,0x0000015f, 26930x0000515b,0x000500b0,0x0000002f,0x00005140,
32470x00005454,0x0000545c,0x0000015e,0x0000015e, 26940x00005cee,0x000000ec,0x000400f6,0x0000515e,
32480x0005003e,0x00005454,0x00005449,0x00000002, 26950x0000515b,0x00000000,0x000400fa,0x00005140,
32490x00000004,0x00050080,0x00000006,0x00005105, 26960x00005141,0x0000515e,0x000200f8,0x00005141,
32500x000050e1,0x00000260,0x00050051,0x00000027, 26970x00050084,0x00000006,0x00005144,0x000000ec,
32510x00005109,0x0000592c,0x00000002,0x0004007c, 26980x00005cee,0x00050080,0x00000006,0x00005145,
32520x00000006,0x00005472,0x00005109,0x00050095, 26990x0000513c,0x00005144,0x00050095,0x0000013d,
32530x00000130,0x0000548d,0x0000505e,0x00005105, 27000x00005437,0x000053ea,0x00005145,0x00050051,
32540x00050051,0x00000006,0x0000548e,0x0000548d, 27010x00000006,0x00005438,0x00005437,0x00000001,
32550x00000001,0x00050051,0x00000006,0x0000548f, 27020x00050051,0x00000006,0x00005439,0x00005437,
32560x0000548d,0x00000000,0x00050080,0x00000006, 27030x00000000,0x00050080,0x00000006,0x0000543e,
32570x00005494,0x00005065,0x0000548e,0x00050050, 27040x000053f1,0x00005438,0x00050050,0x00000007,
32580x00000007,0x00005495,0x0000548f,0x00005494, 27050x0000543f,0x00005439,0x0000543e,0x0004007c,
32590x0004007c,0x00000014,0x00005485,0x00005495, 27060x00000014,0x0000542f,0x0000543f,0x00060041,
32600x00060041,0x0000015f,0x0000547d,0x00005485, 27070x0000016c,0x00005426,0x0000542f,0x0000016b,
32610x0000015e,0x0000015e,0x0005003e,0x0000547d, 27080x0000016b,0x0006003d,0x00000006,0x00005427,
32620x00005472,0x00000002,0x00000004,0x000200f9, 27090x00005426,0x00000002,0x00000004,0x000500aa,
32630x0000510b,0x000200f8,0x0000510b,0x000200f9, 27100x0000002f,0x0000514a,0x00005427,0x00000539,
32640x00004dce,0x000200f8,0x00004dce,0x000200f9, 27110x000300f7,0x0000514c,0x00000000,0x000400fa,
32650x00004dcf,0x000200f8,0x00004dcf,0x000700f5, 27120x0000514a,0x0000514b,0x0000514c,0x000200f8,
32660x00000006,0x00005bf6,0x00005942,0x00004dbf, 27130x0000514b,0x000200f9,0x0000515b,0x000200f8,
32670x00004dc2,0x00004dce,0x00050080,0x00000006, 27140x0000514c,0x00050080,0x00000006,0x0000514e,
32680x00004dd1,0x00005926,0x0000022b,0x000200f9, 27150x00005d0a,0x00000264,0x000500aa,0x0000002f,
32690x00004db1,0x000200f8,0x00004dd2,0x00050041, 27160x00005151,0x00005427,0x00005d5e,0x000300f7,
32700x00000182,0x0000549d,0x00000180,0x00000321, 27170x0000515a,0x00000000,0x000400fa,0x00005151,
32710x0004003d,0x00000006,0x0000549e,0x0000549d, 27180x00005152,0x0000515a,0x000200f8,0x00005152,
32720x00050082,0x00000006,0x0000549f,0x00004db0, 27190x000500c7,0x00000006,0x00005443,0x00005ceb,
32730x0000549e,0x000500c7,0x00000006,0x000054ab, 27200x00000d2b,0x000500aa,0x0000002f,0x00005444,
32740x00005923,0x00000c2c,0x000500aa,0x0000002f, 27210x00005443,0x000000ec,0x000300f7,0x00005497,
32750x000054ac,0x000054ab,0x000000df,0x000600a9, 27220x00000000,0x000300fb,0x00000138,0x0000545d,
32760x00000006,0x000054a2,0x000054ac,0x0000018b, 27230x000200f8,0x0000545d,0x000300f7,0x00005468,
32770x00000309,0x00050086,0x00000006,0x000054a3, 27240x00000000,0x000400fa,0x00005444,0x0000545f,
32780x0000549f,0x000054a2,0x00050041,0x00000182, 27250x00005468,0x000200f8,0x0000545f,0x00050080,
32790x000054bb,0x00000180,0x000001b7,0x0004003d, 27260x00000006,0x00005461,0x0000513c,0x000001db,
32800x00000006,0x000054bc,0x000054bb,0x00050084, 27270x00050084,0x00000006,0x00005463,0x000001d4,
32810x00000006,0x000054bd,0x000001b6,0x000054bc, 27280x00005cee,0x00050080,0x00000006,0x00005464,
32820x00050080,0x00000006,0x000054be,0x00004f51, 27290x00005461,0x00005463,0x00050051,0x00000027,
32830x000054bd,0x00050084,0x00000006,0x000054b3, 27300x000054af,0x00005cf1,0x00000000,0x000300f7,
32840x000001cc,0x000054a3,0x00050080,0x00000006, 27310x00005526,0x00000000,0x000300fb,0x00000138,
32850x000054b4,0x000054be,0x000054b3,0x00050095, 27320x000054e0,0x000200f8,0x000054e0,0x0004007c,
32860x00000130,0x000054ee,0x00004f82,0x000054b4, 27330x00000006,0x000054e2,0x000054af,0x000500c2,
32870x00050051,0x00000006,0x000054ef,0x000054ee, 27340x00000006,0x000054e4,0x000054e2,0x0000035a,
32880x00000001,0x00050051,0x00000006,0x000054f0, 27350x000500c7,0x00000006,0x000054e5,0x000054e4,
32890x000054ee,0x00000000,0x00050080,0x00000006, 27360x00000373,0x000500c7,0x00000006,0x000054e7,
32900x000054f5,0x00004f89,0x000054ef,0x00050050, 27370x000054e2,0x00000256,0x000500ab,0x0000002f,
32910x00000007,0x000054f6,0x000054f0,0x000054f5, 27380x000054ea,0x000054e5,0x00000138,0x000500ac,
32920x0004007c,0x00000014,0x000054e6,0x000054f6, 27390x0000002f,0x000054ed,0x000054e7,0x0000037e,
32930x00050051,0x00000027,0x000054fa,0x00005929, 27400x000300f7,0x000054f1,0x00000000,0x000400fa,
32940x00000000,0x00050051,0x00000027,0x000054fc, 27410x000054ed,0x000054ee,0x000054f1,0x000200f8,
32950x0000592c,0x00000000,0x000500bc,0x0000002f, 27420x000054ee,0x000500c5,0x00000006,0x000054f0,
32960x000054fd,0x000054fa,0x000054fc,0x000300f7, 27430x000054e5,0x00000383,0x000200f9,0x00005526,
32970x00005504,0x00000000,0x000400fa,0x000054fd, 27440x000200f8,0x000054f1,0x000500aa,0x0000002f,
32980x000054fe,0x00005504,0x000200f8,0x000054fe, 27450x000054f3,0x000054e7,0x00000138,0x000300f7,
32990x00050051,0x00000027,0x00005500,0x00005929, 27460x000054f6,0x00000000,0x000400fa,0x000054f3,
33000x00000001,0x00050051,0x00000027,0x00005502, 27470x000054f4,0x000054f6,0x000200f8,0x000054f4,
33010x0000592c,0x00000001,0x000500bc,0x0000002f, 27480x000200f9,0x00005526,0x000200f8,0x000054f6,
33020x00005503,0x00005500,0x00005502,0x000200f9, 27490x000500c2,0x00000006,0x000054f8,0x000054e7,
33030x00005504,0x000200f8,0x00005504,0x000700f5, 27500x0000038e,0x0004007c,0x000000f4,0x000054f9,
33040x0000002f,0x00005505,0x000054fd,0x00004dd2, 27510x000054f8,0x00050082,0x000000f4,0x000054fa,
33050x00005503,0x000054fe,0x000300f7,0x0000550c, 27520x000054f9,0x00000391,0x000500af,0x0000002f,
33060x00000000,0x000400fa,0x00005505,0x00005506, 27530x000054fc,0x000054fa,0x0000035a,0x000300f7,
33070x0000550c,0x000200f8,0x00005506,0x00050051, 27540x00005502,0x00000000,0x000400fa,0x000054fc,
33080x00000027,0x00005508,0x00005929,0x00000002, 27550x000054fd,0x00005502,0x000200f8,0x000054fd,
33090x00050051,0x00000027,0x0000550a,0x0000592c, 27560x000600a9,0x00000006,0x00005500,0x000054ea,
33100x00000002,0x000500bc,0x0000002f,0x0000550b, 27570x00000399,0x0000039a,0x000500c5,0x00000006,
33110x00005508,0x0000550a,0x000200f9,0x0000550c, 27580x00005501,0x000054e5,0x00005500,0x000200f9,
33120x000200f8,0x0000550c,0x000700f5,0x0000002f, 27590x00005526,0x000200f8,0x00005502,0x000500b1,
33130x0000550d,0x00005505,0x00005504,0x0000550b, 27600x0000002f,0x00005504,0x000054fa,0x0000039f,
33140x00005506,0x000300f7,0x00004e00,0x00000000, 27610x000300f7,0x0000550e,0x00000000,0x000400fa,
33150x000400fa,0x0000550d,0x00004ddb,0x00004e00, 27620x00005504,0x00005505,0x0000550e,0x000200f8,
33160x000200f8,0x00004ddb,0x00060041,0x0000015f, 27630x00005505,0x000300f7,0x0000550c,0x00000000,
33170x00004ddd,0x000054e6,0x0000015e,0x0000022b, 27640x000400fa,0x000054ea,0x00005507,0x0000550a,
33180x0004007c,0x00000006,0x00005514,0x000054fa, 27650x000200f8,0x0000550a,0x000200f9,0x0000550c,
33190x000500c7,0x00000006,0x00005516,0x00005514, 27660x000200f8,0x00005507,0x000500c5,0x00000006,
33200x00000208,0x000500ab,0x0000002f,0x00005517, 27670x00005509,0x000054e5,0x000003a8,0x000200f9,
33210x00005516,0x0000012b,0x000300f7,0x0000551e, 27680x0000550c,0x000200f8,0x0000550c,0x000700f5,
33220x00000000,0x000400fa,0x00005517,0x00005518, 27690x00000006,0x00005d62,0x00005509,0x00005507,
33230x0000551b,0x000200f8,0x0000551b,0x000500c5, 27700x000054e5,0x0000550a,0x000200f9,0x00005526,
33240x00000006,0x0000551d,0x00005514,0x00000208, 27710x000200f8,0x0000550e,0x000500c7,0x00000006,
33250x000200f9,0x0000551e,0x000200f8,0x00005518, 27720x00005510,0x000054e2,0x000003b0,0x00050080,
33260x000400c8,0x00000006,0x0000551a,0x00005514, 27730x000000f4,0x00005512,0x000054f9,0x000060ff,
33270x000200f9,0x0000551e,0x000200f8,0x0000551e, 27740x0004007c,0x00000006,0x00005513,0x00005512,
33280x000700f5,0x00000006,0x00005930,0x0000551a, 27750x000500c4,0x00000006,0x00005514,0x00005513,
33290x00005518,0x0000551d,0x0000551b,0x000700ed, 27760x000003b6,0x000500c2,0x00000006,0x00005516,
33300x00000006,0x00004de1,0x00004ddd,0x00000135, 27770x00005510,0x000001f0,0x000500c5,0x00000006,
33310x0000012b,0x00005930,0x00060041,0x0000015f, 27780x00005517,0x00005514,0x00005516,0x000300f7,
33320x00004de3,0x000054e6,0x0000015e,0x000002dc, 27790x0000551d,0x00000000,0x000400fa,0x000054ea,
33330x00050051,0x00000027,0x00004de5,0x00005929, 27800x00005519,0x0000551d,0x000200f8,0x00005519,
33340x00000001,0x0004007c,0x00000006,0x00005525, 27810x000500c7,0x00000006,0x0000551b,0x000054e2,
33350x00004de5,0x000500c7,0x00000006,0x00005527, 27820x000003bf,0x000500ab,0x0000002f,0x0000551c,
33360x00005525,0x00000208,0x000500ab,0x0000002f, 27830x0000551b,0x00000138,0x000200f9,0x0000551d,
33370x00005528,0x00005527,0x0000012b,0x000300f7, 27840x000200f8,0x0000551d,0x000700f5,0x0000002f,
33380x0000552f,0x00000000,0x000400fa,0x00005528, 27850x0000551e,0x000054ea,0x0000550e,0x0000551c,
33390x00005529,0x0000552c,0x000200f8,0x0000552c, 27860x00005519,0x000300f7,0x00005522,0x00000000,
33400x000500c5,0x00000006,0x0000552e,0x00005525, 27870x000400fa,0x0000551e,0x0000551f,0x00005522,
33410x00000208,0x000200f9,0x0000552f,0x000200f8, 27880x000200f8,0x0000551f,0x00050080,0x00000006,
33420x00005529,0x000400c8,0x00000006,0x0000552b, 27890x00005521,0x00005517,0x00000142,0x000200f9,
33430x00005525,0x000200f9,0x0000552f,0x000200f8, 27900x00005522,0x000200f8,0x00005522,0x000700f5,
33440x0000552f,0x000700f5,0x00000006,0x00005932, 27910x00000006,0x00005d61,0x00005517,0x0000551d,
33450x0000552b,0x00005529,0x0000552e,0x0000552c, 27920x00005521,0x0000551f,0x000500c5,0x00000006,
33460x000700ed,0x00000006,0x00004de7,0x00004de3, 27930x00005525,0x000054e5,0x00005d61,0x000200f9,
33470x00000135,0x0000012b,0x00005932,0x00060041, 27940x00005526,0x000200f8,0x00005526,0x000d00f5,
33480x0000015f,0x00004de9,0x000054e6,0x0000015e, 27950x00000006,0x00005d63,0x000054f0,0x000054ee,
33490x000002e4,0x00050051,0x00000027,0x00004deb, 27960x000054e5,0x000054f4,0x00005501,0x000054fd,
33500x00005929,0x00000002,0x0004007c,0x00000006, 27970x00005d62,0x0000550c,0x00005525,0x00005522,
33510x00005536,0x00004deb,0x000500c7,0x00000006, 27980x00050051,0x00000027,0x000054b2,0x00005cf1,
33520x00005538,0x00005536,0x00000208,0x000500ab, 27990x00000001,0x000300f7,0x0000557a,0x00000000,
33530x0000002f,0x00005539,0x00005538,0x0000012b, 28000x000300fb,0x00000138,0x00005534,0x000200f8,
33540x000300f7,0x00005540,0x00000000,0x000400fa, 28010x00005534,0x0004007c,0x00000006,0x00005536,
33550x00005539,0x0000553a,0x0000553d,0x000200f8, 28020x000054b2,0x000500c2,0x00000006,0x00005538,
33560x0000553d,0x000500c5,0x00000006,0x0000553f, 28030x00005536,0x0000035a,0x000500c7,0x00000006,
33570x00005536,0x00000208,0x000200f9,0x00005540, 28040x00005539,0x00005538,0x00000373,0x000500c7,
33580x000200f8,0x0000553a,0x000400c8,0x00000006, 28050x00000006,0x0000553b,0x00005536,0x00000256,
33590x0000553c,0x00005536,0x000200f9,0x00005540, 28060x000500ab,0x0000002f,0x0000553e,0x00005539,
33600x000200f8,0x00005540,0x000700f5,0x00000006, 28070x00000138,0x000500ac,0x0000002f,0x00005541,
33610x00005934,0x0000553c,0x0000553a,0x0000553f, 28080x0000553b,0x0000037e,0x000300f7,0x00005545,
33620x0000553d,0x000700ed,0x00000006,0x00004ded, 28090x00000000,0x000400fa,0x00005541,0x00005542,
33630x00004de9,0x00000135,0x0000012b,0x00005934, 28100x00005545,0x000200f8,0x00005542,0x000500c5,
33640x00060041,0x0000015f,0x00004def,0x000054e6, 28110x00000006,0x00005544,0x00005539,0x00000383,
33650x0000015e,0x000002ec,0x0004007c,0x00000006, 28120x000200f9,0x0000557a,0x000200f8,0x00005545,
33660x00005547,0x000054fc,0x000500c7,0x00000006, 28130x000500aa,0x0000002f,0x00005547,0x0000553b,
33670x00005549,0x00005547,0x00000208,0x000500ab, 28140x00000138,0x000300f7,0x0000554a,0x00000000,
33680x0000002f,0x0000554a,0x00005549,0x0000012b, 28150x000400fa,0x00005547,0x00005548,0x0000554a,
33690x000300f7,0x00005551,0x00000000,0x000400fa, 28160x000200f8,0x00005548,0x000200f9,0x0000557a,
33700x0000554a,0x0000554b,0x0000554e,0x000200f8, 28170x000200f8,0x0000554a,0x000500c2,0x00000006,
33710x0000554e,0x000500c5,0x00000006,0x00005550, 28180x0000554c,0x0000553b,0x0000038e,0x0004007c,
33720x00005547,0x00000208,0x000200f9,0x00005551, 28190x000000f4,0x0000554d,0x0000554c,0x00050082,
33730x000200f8,0x0000554b,0x000400c8,0x00000006, 28200x000000f4,0x0000554e,0x0000554d,0x00000391,
33740x0000554d,0x00005547,0x000200f9,0x00005551, 28210x000500af,0x0000002f,0x00005550,0x0000554e,
33750x000200f8,0x00005551,0x000700f5,0x00000006, 28220x0000035a,0x000300f7,0x00005556,0x00000000,
33760x0000593a,0x0000554d,0x0000554b,0x00005550, 28230x000400fa,0x00005550,0x00005551,0x00005556,
33770x0000554e,0x000700ef,0x00000006,0x00004df3, 28240x000200f8,0x00005551,0x000600a9,0x00000006,
33780x00004def,0x00000135,0x0000012b,0x0000593a, 28250x00005554,0x0000553e,0x00000399,0x0000039a,
33790x00060041,0x0000015f,0x00004df5,0x000054e6, 28260x000500c5,0x00000006,0x00005555,0x00005539,
33800x0000015e,0x000002f4,0x00050051,0x00000027, 28270x00005554,0x000200f9,0x0000557a,0x000200f8,
33810x00004df7,0x0000592c,0x00000001,0x0004007c, 28280x00005556,0x000500b1,0x0000002f,0x00005558,
33820x00000006,0x00005558,0x00004df7,0x000500c7, 28290x0000554e,0x0000039f,0x000300f7,0x00005562,
33830x00000006,0x0000555a,0x00005558,0x00000208, 28300x00000000,0x000400fa,0x00005558,0x00005559,
33840x000500ab,0x0000002f,0x0000555b,0x0000555a, 28310x00005562,0x000200f8,0x00005559,0x000300f7,
33850x0000012b,0x000300f7,0x00005562,0x00000000, 28320x00005560,0x00000000,0x000400fa,0x0000553e,
33860x000400fa,0x0000555b,0x0000555c,0x0000555f, 28330x0000555b,0x0000555e,0x000200f8,0x0000555e,
33870x000200f8,0x0000555f,0x000500c5,0x00000006, 28340x000200f9,0x00005560,0x000200f8,0x0000555b,
33880x00005561,0x00005558,0x00000208,0x000200f9, 28350x000500c5,0x00000006,0x0000555d,0x00005539,
33890x00005562,0x000200f8,0x0000555c,0x000400c8, 28360x000003a8,0x000200f9,0x00005560,0x000200f8,
33900x00000006,0x0000555e,0x00005558,0x000200f9, 28370x00005560,0x000700f5,0x00000006,0x00005d66,
33910x00005562,0x000200f8,0x00005562,0x000700f5, 28380x0000555d,0x0000555b,0x00005539,0x0000555e,
33920x00000006,0x0000593c,0x0000555e,0x0000555c, 28390x000200f9,0x0000557a,0x000200f8,0x00005562,
33930x00005561,0x0000555f,0x000700ef,0x00000006, 28400x000500c7,0x00000006,0x00005564,0x00005536,
33940x00004df9,0x00004df5,0x00000135,0x0000012b, 28410x000003b0,0x00050080,0x000000f4,0x00005566,
33950x0000593c,0x00060041,0x0000015f,0x00004dfb, 28420x0000554d,0x000060ff,0x0004007c,0x00000006,
33960x000054e6,0x0000015e,0x00000318,0x00050051, 28430x00005567,0x00005566,0x000500c4,0x00000006,
33970x00000027,0x00004dfd,0x0000592c,0x00000002, 28440x00005568,0x00005567,0x000003b6,0x000500c2,
33980x0004007c,0x00000006,0x00005569,0x00004dfd, 28450x00000006,0x0000556a,0x00005564,0x000001f0,
33990x000500c7,0x00000006,0x0000556b,0x00005569, 28460x000500c5,0x00000006,0x0000556b,0x00005568,
34000x00000208,0x000500ab,0x0000002f,0x0000556c, 28470x0000556a,0x000300f7,0x00005571,0x00000000,
34010x0000556b,0x0000012b,0x000300f7,0x00005573, 28480x000400fa,0x0000553e,0x0000556d,0x00005571,
34020x00000000,0x000400fa,0x0000556c,0x0000556d, 28490x000200f8,0x0000556d,0x000500c7,0x00000006,
34030x00005570,0x000200f8,0x00005570,0x000500c5, 28500x0000556f,0x00005536,0x000003bf,0x000500ab,
34040x00000006,0x00005572,0x00005569,0x00000208, 28510x0000002f,0x00005570,0x0000556f,0x00000138,
34050x000200f9,0x00005573,0x000200f8,0x0000556d, 28520x000200f9,0x00005571,0x000200f8,0x00005571,
34060x000400c8,0x00000006,0x0000556f,0x00005569, 28530x000700f5,0x0000002f,0x00005572,0x0000553e,
34070x000200f9,0x00005573,0x000200f8,0x00005573, 28540x00005562,0x00005570,0x0000556d,0x000300f7,
34080x000700f5,0x00000006,0x0000593e,0x0000556f, 28550x00005576,0x00000000,0x000400fa,0x00005572,
34090x0000556d,0x00005572,0x00005570,0x000700ef, 28560x00005573,0x00005576,0x000200f8,0x00005573,
34100x00000006,0x00004dff,0x00004dfb,0x00000135, 28570x00050080,0x00000006,0x00005575,0x0000556b,
34110x0000012b,0x0000593e,0x000200f9,0x00004e00, 28580x00000142,0x000200f9,0x00005576,0x000200f8,
34120x000200f8,0x00004e00,0x00060041,0x0000015f, 28590x00005576,0x000700f5,0x00000006,0x00005d65,
34130x00004e02,0x000054e6,0x0000015e,0x0000015e, 28600x0000556b,0x00005571,0x00005575,0x00005573,
34140x000700ea,0x00000006,0x00004e03,0x00004e02, 28610x000500c5,0x00000006,0x00005579,0x00005539,
34150x0000022b,0x00000721,0x00000135,0x00050080, 28620x00005d65,0x000200f9,0x0000557a,0x000200f8,
34160x00000006,0x00004e05,0x00004e03,0x00000135, 28630x0000557a,0x000d00f5,0x00000006,0x00005d67,
34170x000500ab,0x0000002f,0x00004e07,0x00004e05, 28640x00005544,0x00005542,0x00005539,0x00005548,
34180x00005942,0x000300f7,0x00004e09,0x00000000, 28650x00005555,0x00005551,0x00005d66,0x00005560,
34190x000400fa,0x00004e07,0x00004e08,0x00004e09, 28660x00005579,0x00005576,0x000500c4,0x00000006,
34200x000200f8,0x00004e08,0x000200f9,0x00004e14, 28670x000054b4,0x00005d67,0x0000035a,0x000500c5,
34210x000200f8,0x00004e09,0x000300f7,0x000055af, 28680x00000006,0x000054b5,0x00005d63,0x000054b4,
34220x00000000,0x000300fb,0x0000012b,0x00005581, 28690x00050095,0x0000013d,0x00005593,0x000053ea,
34230x000200f8,0x00005581,0x000200f9,0x00005584, 28700x00005464,0x00050051,0x00000006,0x00005594,
34240x000200f8,0x00005584,0x000700f5,0x00000006, 28710x00005593,0x00000001,0x00050051,0x00000006,
34250x00005949,0x0000012b,0x00005581,0x00005592, 28720x00005595,0x00005593,0x00000000,0x00050080,
34260x00005588,0x000500b0,0x0000002f,0x00005587, 28730x00000006,0x0000559a,0x000053f1,0x00005594,
34270x00005949,0x0000031c,0x000400f6,0x00005593, 28740x00050050,0x00000007,0x0000559b,0x00005595,
34280x00005588,0x00000000,0x000400fa,0x00005587, 28750x0000559a,0x0004007c,0x00000014,0x0000558b,
34290x00005588,0x00005593,0x000200f8,0x00005588, 28760x0000559b,0x00060041,0x0000016c,0x00005583,
34300x00050080,0x00000006,0x0000558c,0x00000135, 28770x0000558b,0x0000016b,0x0000016b,0x0005003e,
34310x00005949,0x00060041,0x0000015f,0x0000558d, 28780x00005583,0x000054b5,0x00000002,0x00000004,
34320x000054e6,0x0000015e,0x0000558c,0x000700f1, 28790x00050080,0x00000006,0x000054bb,0x00005464,
34330x00000006,0x0000558e,0x0000558d,0x00000135, 28800x000000ec,0x00050051,0x00000027,0x000054bd,
34340x0000012b,0x0000012b,0x00050041,0x00000009, 28810x00005cf1,0x00000002,0x000300f7,0x000055ee,
34350x0000558f,0x00005579,0x00005949,0x0003003e, 28820x00000000,0x000300fb,0x00000138,0x000055a8,
34360x0000558f,0x0000558e,0x00050080,0x00000006, 28830x000200f8,0x000055a8,0x0004007c,0x00000006,
34370x00005592,0x00005949,0x0000022b,0x000200f9, 28840x000055aa,0x000054bd,0x000500c2,0x00000006,
34380x00005584,0x000200f8,0x00005593,0x00050041, 28850x000055ac,0x000055aa,0x0000035a,0x000500c7,
34390x00000009,0x00005594,0x00005579,0x0000015e, 28860x00000006,0x000055ad,0x000055ac,0x00000373,
34400x0004003d,0x00000006,0x00005595,0x00005594, 28870x000500c7,0x00000006,0x000055af,0x000055aa,
34410x000500aa,0x0000002f,0x00005596,0x00005595, 28880x00000256,0x000500ab,0x0000002f,0x000055b2,
34420x00000500,0x000300f7,0x0000559a,0x00000000, 28890x000055ad,0x00000138,0x000500ac,0x0000002f,
34430x000400fa,0x00005596,0x00005597,0x0000559a, 28900x000055b5,0x000055af,0x0000037e,0x000300f7,
34440x000200f8,0x00005597,0x000200f9,0x000055af, 28910x000055b9,0x00000000,0x000400fa,0x000055b5,
34450x000200f8,0x0000559a,0x0004003d,0x00000006, 28920x000055b6,0x000055b9,0x000200f8,0x000055b6,
34460x0000559c,0x00005594,0x000500c7,0x00000006, 28930x000500c5,0x00000006,0x000055b8,0x000055ad,
34470x000055fe,0x0000559c,0x00000208,0x000500ab, 28940x00000383,0x000200f9,0x000055ee,0x000200f8,
34480x0000002f,0x000055ff,0x000055fe,0x0000012b, 28950x000055b9,0x000500aa,0x0000002f,0x000055bb,
34490x000300f7,0x00005606,0x00000000,0x000400fa, 28960x000055af,0x00000138,0x000300f7,0x000055be,
34500x000055ff,0x00005600,0x00005603,0x000200f8, 28970x00000000,0x000400fa,0x000055bb,0x000055bc,
34510x00005603,0x000400c8,0x00000006,0x00005605, 28980x000055be,0x000200f8,0x000055bc,0x000200f9,
34520x0000559c,0x000200f9,0x00005606,0x000200f8, 28990x000055ee,0x000200f8,0x000055be,0x000500c2,
34530x00005600,0x000500c7,0x00000006,0x00005602, 29000x00000006,0x000055c0,0x000055af,0x0000038e,
34540x0000559c,0x0000021d,0x000200f9,0x00005606, 29010x0004007c,0x000000f4,0x000055c1,0x000055c0,
34550x000200f8,0x00005606,0x000700f5,0x00000006, 29020x00050082,0x000000f4,0x000055c2,0x000055c1,
34560x0000594a,0x00005602,0x00005600,0x00005605, 29030x00000391,0x000500af,0x0000002f,0x000055c4,
34570x00005603,0x0004007c,0x00000027,0x00005608, 29040x000055c2,0x0000035a,0x000300f7,0x000055ca,
34580x0000594a,0x00050041,0x00000009,0x0000559e, 29050x00000000,0x000400fa,0x000055c4,0x000055c5,
34590x00005579,0x0000022b,0x0004003d,0x00000006, 29060x000055ca,0x000200f8,0x000055c5,0x000600a9,
34600x0000559f,0x0000559e,0x000500c7,0x00000006, 29070x00000006,0x000055c8,0x000055b2,0x00000399,
34610x0000560d,0x0000559f,0x00000208,0x000500ab, 29080x0000039a,0x000500c5,0x00000006,0x000055c9,
34620x0000002f,0x0000560e,0x0000560d,0x0000012b, 29090x000055ad,0x000055c8,0x000200f9,0x000055ee,
34630x000300f7,0x00005615,0x00000000,0x000400fa, 29100x000200f8,0x000055ca,0x000500b1,0x0000002f,
34640x0000560e,0x0000560f,0x00005612,0x000200f8, 29110x000055cc,0x000055c2,0x0000039f,0x000300f7,
34650x00005612,0x000400c8,0x00000006,0x00005614, 29120x000055d6,0x00000000,0x000400fa,0x000055cc,
34660x0000559f,0x000200f9,0x00005615,0x000200f8, 29130x000055cd,0x000055d6,0x000200f8,0x000055cd,
34670x0000560f,0x000500c7,0x00000006,0x00005611, 29140x000300f7,0x000055d4,0x00000000,0x000400fa,
34680x0000559f,0x0000021d,0x000200f9,0x00005615, 29150x000055b2,0x000055cf,0x000055d2,0x000200f8,
34690x000200f8,0x00005615,0x000700f5,0x00000006, 29160x000055d2,0x000200f9,0x000055d4,0x000200f8,
34700x0000594b,0x00005611,0x0000560f,0x00005614, 29170x000055cf,0x000500c5,0x00000006,0x000055d1,
34710x00005612,0x0004007c,0x00000027,0x00005617, 29180x000055ad,0x000003a8,0x000200f9,0x000055d4,
34720x0000594b,0x00050041,0x00000009,0x000055a1, 29190x000200f8,0x000055d4,0x000700f5,0x00000006,
34730x00005579,0x000002dc,0x0004003d,0x00000006, 29200x00005d6a,0x000055d1,0x000055cf,0x000055ad,
34740x000055a2,0x000055a1,0x000500c7,0x00000006, 29210x000055d2,0x000200f9,0x000055ee,0x000200f8,
34750x0000561c,0x000055a2,0x00000208,0x000500ab, 29220x000055d6,0x000500c7,0x00000006,0x000055d8,
34760x0000002f,0x0000561d,0x0000561c,0x0000012b, 29230x000055aa,0x000003b0,0x00050080,0x000000f4,
34770x000300f7,0x00005624,0x00000000,0x000400fa, 29240x000055da,0x000055c1,0x000060ff,0x0004007c,
34780x0000561d,0x0000561e,0x00005621,0x000200f8, 29250x00000006,0x000055db,0x000055da,0x000500c4,
34790x00005621,0x000400c8,0x00000006,0x00005623, 29260x00000006,0x000055dc,0x000055db,0x000003b6,
34800x000055a2,0x000200f9,0x00005624,0x000200f8, 29270x000500c2,0x00000006,0x000055de,0x000055d8,
34810x0000561e,0x000500c7,0x00000006,0x00005620, 29280x000001f0,0x000500c5,0x00000006,0x000055df,
34820x000055a2,0x0000021d,0x000200f9,0x00005624, 29290x000055dc,0x000055de,0x000300f7,0x000055e5,
34830x000200f8,0x00005624,0x000700f5,0x00000006, 29300x00000000,0x000400fa,0x000055b2,0x000055e1,
34840x0000594c,0x00005620,0x0000561e,0x00005623, 29310x000055e5,0x000200f8,0x000055e1,0x000500c7,
34850x00005621,0x0004007c,0x00000027,0x00005626, 29320x00000006,0x000055e3,0x000055aa,0x000003bf,
34860x0000594c,0x00060050,0x00000063,0x000055a4, 29330x000500ab,0x0000002f,0x000055e4,0x000055e3,
34870x00005608,0x00005617,0x00005626,0x00050041, 29340x00000138,0x000200f9,0x000055e5,0x000200f8,
34880x00000009,0x000055a5,0x00005579,0x000002e4, 29350x000055e5,0x000700f5,0x0000002f,0x000055e6,
34890x0004003d,0x00000006,0x000055a6,0x000055a5, 29360x000055b2,0x000055d6,0x000055e4,0x000055e1,
34900x000500c7,0x00000006,0x0000562b,0x000055a6, 29370x000300f7,0x000055ea,0x00000000,0x000400fa,
34910x00000208,0x000500ab,0x0000002f,0x0000562c, 29380x000055e6,0x000055e7,0x000055ea,0x000200f8,
34920x0000562b,0x0000012b,0x000300f7,0x00005633, 29390x000055e7,0x00050080,0x00000006,0x000055e9,
34930x00000000,0x000400fa,0x0000562c,0x0000562d, 29400x000055df,0x00000142,0x000200f9,0x000055ea,
34940x00005630,0x000200f8,0x00005630,0x000400c8, 29410x000200f8,0x000055ea,0x000700f5,0x00000006,
34950x00000006,0x00005632,0x000055a6,0x000200f9, 29420x00005d69,0x000055df,0x000055e5,0x000055e9,
34960x00005633,0x000200f8,0x0000562d,0x000500c7, 29430x000055e7,0x000500c5,0x00000006,0x000055ed,
34970x00000006,0x0000562f,0x000055a6,0x0000021d, 29440x000055ad,0x00005d69,0x000200f9,0x000055ee,
34980x000200f9,0x00005633,0x000200f8,0x00005633, 29450x000200f8,0x000055ee,0x000d00f5,0x00000006,
34990x000700f5,0x00000006,0x0000594d,0x0000562f, 29460x00005d6b,0x000055b8,0x000055b6,0x000055ad,
35000x0000562d,0x00005632,0x00005630,0x0004007c, 29470x000055bc,0x000055c9,0x000055c5,0x00005d6a,
35010x00000027,0x00005635,0x0000594d,0x00050041, 29480x000055d4,0x000055ed,0x000055ea,0x00050051,
35020x00000009,0x000055a8,0x00005579,0x000002ec, 29490x00000027,0x000054c0,0x00005cf4,0x00000000,
35030x0004003d,0x00000006,0x000055a9,0x000055a8, 29500x000300f7,0x00005642,0x00000000,0x000300fb,
35040x000500c7,0x00000006,0x0000563a,0x000055a9, 29510x00000138,0x000055fc,0x000200f8,0x000055fc,
35050x00000208,0x000500ab,0x0000002f,0x0000563b, 29520x0004007c,0x00000006,0x000055fe,0x000054c0,
35060x0000563a,0x0000012b,0x000300f7,0x00005642, 29530x000500c2,0x00000006,0x00005600,0x000055fe,
35070x00000000,0x000400fa,0x0000563b,0x0000563c, 29540x0000035a,0x000500c7,0x00000006,0x00005601,
35080x0000563f,0x000200f8,0x0000563f,0x000400c8, 29550x00005600,0x00000373,0x000500c7,0x00000006,
35090x00000006,0x00005641,0x000055a9,0x000200f9, 29560x00005603,0x000055fe,0x00000256,0x000500aa,
35100x00005642,0x000200f8,0x0000563c,0x000500c7, 29570x0000002f,0x00005607,0x00005601,0x00000138,
35110x00000006,0x0000563e,0x000055a9,0x0000021d, 29580x000500ac,0x0000002f,0x00005609,0x00005603,
29590x0000037e,0x000300f7,0x0000560d,0x00000000,
29600x000400fa,0x00005609,0x0000560a,0x0000560d,
29610x000200f8,0x0000560a,0x000500c5,0x00000006,
29620x0000560c,0x00005601,0x00000383,0x000200f9,
29630x00005642,0x000200f8,0x0000560d,0x000500aa,
29640x0000002f,0x0000560f,0x00005603,0x00000138,
29650x000300f7,0x00005612,0x00000000,0x000400fa,
29660x0000560f,0x00005610,0x00005612,0x000200f8,
29670x00005610,0x000200f9,0x00005642,0x000200f8,
29680x00005612,0x000500c2,0x00000006,0x00005614,
29690x00005603,0x0000038e,0x0004007c,0x000000f4,
29700x00005615,0x00005614,0x00050082,0x000000f4,
29710x00005616,0x00005615,0x00000391,0x000500af,
29720x0000002f,0x00005618,0x00005616,0x0000035a,
29730x000300f7,0x0000561e,0x00000000,0x000400fa,
29740x00005618,0x00005619,0x0000561e,0x000200f8,
29750x00005619,0x000600a9,0x00000006,0x0000561c,
29760x00005607,0x00000399,0x0000039a,0x000500c5,
29770x00000006,0x0000561d,0x00005601,0x0000561c,
29780x000200f9,0x00005642,0x000200f8,0x0000561e,
29790x000500b1,0x0000002f,0x00005620,0x00005616,
29800x0000039f,0x000300f7,0x0000562a,0x00000000,
29810x000400fa,0x00005620,0x00005621,0x0000562a,
29820x000200f8,0x00005621,0x000300f7,0x00005628,
29830x00000000,0x000400fa,0x00005607,0x00005623,
29840x00005626,0x000200f8,0x00005626,0x000200f9,
29850x00005628,0x000200f8,0x00005623,0x000500c5,
29860x00000006,0x00005625,0x00005601,0x000003a8,
29870x000200f9,0x00005628,0x000200f8,0x00005628,
29880x000700f5,0x00000006,0x00005d6e,0x00005625,
29890x00005623,0x00005601,0x00005626,0x000200f9,
29900x00005642,0x000200f8,0x0000562a,0x000500c7,
29910x00000006,0x0000562c,0x000055fe,0x000003b0,
29920x00050080,0x000000f4,0x0000562e,0x00005615,
29930x000060ff,0x0004007c,0x00000006,0x0000562f,
29940x0000562e,0x000500c4,0x00000006,0x00005630,
29950x0000562f,0x000003b6,0x000500c2,0x00000006,
29960x00005632,0x0000562c,0x000001f0,0x000500c5,
29970x00000006,0x00005633,0x00005630,0x00005632,
29980x000300f7,0x00005639,0x00000000,0x000400fa,
29990x00005607,0x00005635,0x00005639,0x000200f8,
30000x00005635,0x000500c7,0x00000006,0x00005637,
30010x000055fe,0x000003bf,0x000500ab,0x0000002f,
30020x00005638,0x00005637,0x00000138,0x000200f9,
30030x00005639,0x000200f8,0x00005639,0x000700f5,
30040x0000002f,0x0000563a,0x00005607,0x0000562a,
30050x00005638,0x00005635,0x000300f7,0x0000563e,
30060x00000000,0x000400fa,0x0000563a,0x0000563b,
30070x0000563e,0x000200f8,0x0000563b,0x00050080,
30080x00000006,0x0000563d,0x00005633,0x00000142,
30090x000200f9,0x0000563e,0x000200f8,0x0000563e,
30100x000700f5,0x00000006,0x00005d6d,0x00005633,
30110x00005639,0x0000563d,0x0000563b,0x000500c5,
30120x00000006,0x00005641,0x00005601,0x00005d6d,
35120x000200f9,0x00005642,0x000200f8,0x00005642, 30130x000200f9,0x00005642,0x000200f8,0x00005642,
35130x000700f5,0x00000006,0x0000594e,0x0000563e, 30140x000d00f5,0x00000006,0x00005d6f,0x0000560c,
35140x0000563c,0x00005641,0x0000563f,0x0004007c, 30150x0000560a,0x00005601,0x00005610,0x0000561d,
35150x00000027,0x00005644,0x0000594e,0x00050041, 30160x00005619,0x00005d6e,0x00005628,0x00005641,
35160x00000009,0x000055ab,0x00005579,0x000002f4, 30170x0000563e,0x000500c4,0x00000006,0x000054c2,
35170x0004003d,0x00000006,0x000055ac,0x000055ab, 30180x00005d6f,0x0000035a,0x000500c5,0x00000006,
35180x000500c7,0x00000006,0x00005649,0x000055ac, 30190x000054c3,0x00005d6b,0x000054c2,0x00050095,
35190x00000208,0x000500ab,0x0000002f,0x0000564a, 30200x0000013d,0x0000565b,0x000053ea,0x000054bb,
35200x00005649,0x0000012b,0x000300f7,0x00005651, 30210x00050051,0x00000006,0x0000565c,0x0000565b,
35210x00000000,0x000400fa,0x0000564a,0x0000564b, 30220x00000001,0x00050051,0x00000006,0x0000565d,
35220x0000564e,0x000200f8,0x0000564e,0x000400c8, 30230x0000565b,0x00000000,0x00050080,0x00000006,
35230x00000006,0x00005650,0x000055ac,0x000200f9, 30240x00005662,0x000053f1,0x0000565c,0x00050050,
35240x00005651,0x000200f8,0x0000564b,0x000500c7, 30250x00000007,0x00005663,0x0000565d,0x00005662,
35250x00000006,0x0000564d,0x000055ac,0x0000021d, 30260x0004007c,0x00000014,0x00005653,0x00005663,
35260x000200f9,0x00005651,0x000200f8,0x00005651, 30270x00060041,0x0000016c,0x0000564b,0x00005653,
35270x000700f5,0x00000006,0x0000594f,0x0000564d, 30280x0000016b,0x0000016b,0x0005003e,0x0000564b,
35280x0000564b,0x00005650,0x0000564e,0x0004007c, 30290x000054c3,0x00000002,0x00000004,0x00050080,
35290x00000027,0x00005653,0x0000594f,0x00060050, 30300x00000006,0x000054c8,0x00005464,0x000001cd,
35300x00000063,0x000055ae,0x00005635,0x00005644, 30310x00050051,0x00000027,0x000054ca,0x00005cf4,
35310x00005653,0x000200f9,0x000055af,0x000200f8, 30320x00000001,0x000300f7,0x000056b6,0x00000000,
35320x000055af,0x000700f5,0x00000063,0x00005954, 30330x000300fb,0x00000138,0x00005670,0x000200f8,
35330x00005cc2,0x00005597,0x000055ae,0x00005651, 30340x00005670,0x0004007c,0x00000006,0x00005672,
35340x000700f5,0x00000063,0x00005950,0x0000053d, 30350x000054ca,0x000500c2,0x00000006,0x00005674,
35350x00005597,0x000055a4,0x00005651,0x00050082, 30360x00005672,0x0000035a,0x000500c7,0x00000006,
35360x00000006,0x00005660,0x00005092,0x0000503d, 30370x00005675,0x00005674,0x00000373,0x000500c7,
35370x00050084,0x00000006,0x00005661,0x000000df, 30380x00000006,0x00005677,0x00005672,0x00000256,
35380x00005660,0x00050080,0x00000006,0x00005662, 30390x000500aa,0x0000002f,0x0000567b,0x00005675,
35390x00005038,0x00005661,0x00050095,0x00000130, 30400x00000138,0x000500ac,0x0000002f,0x0000567d,
35400x00005682,0x0000505e,0x00005662,0x00050051, 30410x00005677,0x0000037e,0x000300f7,0x00005681,
35410x00000006,0x00005683,0x00005682,0x00000001, 30420x00000000,0x000400fa,0x0000567d,0x0000567e,
35420x00050051,0x00000006,0x00005684,0x00005682, 30430x00005681,0x000200f8,0x0000567e,0x000500c5,
35430x00000000,0x00050080,0x00000006,0x00005689, 30440x00000006,0x00005680,0x00005675,0x00000383,
35440x00005065,0x00005683,0x00050050,0x00000007, 30450x000200f9,0x000056b6,0x000200f8,0x00005681,
35450x0000568a,0x00005684,0x00005689,0x0004007c, 30460x000500aa,0x0000002f,0x00005683,0x00005677,
35460x00000014,0x0000567a,0x0000568a,0x00060041, 30470x00000138,0x000300f7,0x00005686,0x00000000,
35470x0000015f,0x00005671,0x0000567a,0x0000015e, 30480x000400fa,0x00005683,0x00005684,0x00005686,
35480x0000015e,0x0006003d,0x00000006,0x00005672, 30490x000200f8,0x00005684,0x000200f9,0x000056b6,
35490x00005671,0x00000002,0x00000004,0x000200f9, 30500x000200f8,0x00005686,0x000500c2,0x00000006,
35500x00004e11,0x000200f8,0x00004e11,0x00050080, 30510x00005688,0x00005677,0x0000038e,0x0004007c,
35510x00000006,0x00004e13,0x00005925,0x0000022b, 30520x000000f4,0x00005689,0x00005688,0x00050082,
35520x000200f9,0x00004da6,0x000200f8,0x00004e14, 30530x000000f4,0x0000568a,0x00005689,0x00000391,
35530x000700f5,0x0000002f,0x00005978,0x00000393, 30540x000500af,0x0000002f,0x0000568c,0x0000568a,
35540x00004da6,0x000003ae,0x00004e08,0x000300f7, 30550x0000035a,0x000300f7,0x00005692,0x00000000,
35550x00004e16,0x00000000,0x000400fa,0x00005978, 30560x000400fa,0x0000568c,0x0000568d,0x00005692,
35560x00004e17,0x00004e16,0x000200f8,0x00004e16, 30570x000200f8,0x0000568d,0x000600a9,0x00000006,
35570x000200f9,0x00004e17,0x000200f8,0x00004e17, 30580x00005690,0x0000567b,0x00000399,0x0000039a,
35580x000200f9,0x000012ee,0x000200f8,0x000012ee, 30590x000500c5,0x00000006,0x00005691,0x00005675,
35590x000200f9,0x000012e4,0x000200f8,0x000012e3, 30600x00005690,0x000200f9,0x000056b6,0x000200f8,
35600x000300f7,0x00003d8d,0x00000000,0x000300fb, 30610x00005692,0x000500b1,0x0000002f,0x00005694,
35610x0000012b,0x00003c9f,0x000200f8,0x00003c9f, 30620x0000568a,0x0000039f,0x000300f7,0x0000569e,
35620x0003003e,0x00003c67,0x00000ed6,0x0003003e, 30630x00000000,0x000400fa,0x00005694,0x00005695,
35630x00003c68,0x00000ed6,0x00050041,0x00000182, 30640x0000569e,0x000200f8,0x00005695,0x000300f7,
35640x00003ca0,0x00000180,0x000001b7,0x0004003d, 30650x0000569c,0x00000000,0x000400fa,0x0000567b,
35650x00000006,0x00003ca1,0x00003ca0,0x000500b2, 30660x00005697,0x0000569a,0x000200f8,0x0000569a,
35660x0000002f,0x00003ca2,0x00003ca1,0x00000135, 30670x000200f9,0x0000569c,0x000200f8,0x00005697,
35670x000300f7,0x00003d22,0x00000000,0x000400fa, 30680x000500c5,0x00000006,0x00005699,0x00005675,
35680x00003ca2,0x00003ca3,0x00003cb2,0x000200f8, 30690x000003a8,0x000200f9,0x0000569c,0x000200f8,
35690x00003cb2,0x00050041,0x00000182,0x00003e00, 30700x0000569c,0x000700f5,0x00000006,0x00005d72,
35700x00000180,0x00000181,0x0004003d,0x00000006, 30710x00005699,0x00005697,0x00005675,0x0000569a,
35710x00003e01,0x00003e00,0x00050084,0x00000006, 30720x000200f9,0x000056b6,0x000200f8,0x0000569e,
35720x00003e02,0x000001a2,0x00003e01,0x00050080, 30730x000500c7,0x00000006,0x000056a0,0x00005672,
35730x00000006,0x00003e03,0x0000018b,0x00003e02, 30740x000003b0,0x00050080,0x000000f4,0x000056a2,
35740x00050080,0x00000006,0x00003e09,0x00003e01, 30750x00005689,0x000060ff,0x0004007c,0x00000006,
35750x00005cc3,0x00050086,0x00000006,0x00003e0a, 30760x000056a3,0x000056a2,0x000500c4,0x00000006,
35760x00003e09,0x00000185,0x00050084,0x00000006, 30770x000056a4,0x000056a3,0x000003b6,0x000500c2,
35770x00003dfc,0x0000018b,0x00003e0a,0x00050080, 30780x00000006,0x000056a6,0x000056a0,0x000001f0,
35780x00000006,0x00003dfd,0x00003e03,0x00003dfc, 30790x000500c5,0x00000006,0x000056a7,0x000056a4,
35790x00050080,0x00000006,0x00003df7,0x00003dfd, 30800x000056a6,0x000300f7,0x000056ad,0x00000000,
35800x00003dfc,0x00050084,0x00000006,0x00003df0, 30810x000400fa,0x0000567b,0x000056a9,0x000056ad,
35810x000001b6,0x00003ca1,0x00050080,0x00000006, 30820x000200f8,0x000056a9,0x000500c7,0x00000006,
35820x00003df1,0x00003df7,0x00003df0,0x00050041, 30830x000056ab,0x00005672,0x000003bf,0x000500ab,
35830x00000182,0x00003de7,0x00000180,0x000001cd, 30840x0000002f,0x000056ac,0x000056ab,0x00000138,
35840x0004003d,0x00000006,0x00003de8,0x00003de7, 30850x000200f9,0x000056ad,0x000200f8,0x000056ad,
35850x00050084,0x00000006,0x00003de9,0x000001cc, 30860x000700f5,0x0000002f,0x000056ae,0x0000567b,
35860x00003de8,0x00050080,0x00000006,0x00003dea, 30870x0000569e,0x000056ac,0x000056a9,0x000300f7,
35870x00003df1,0x00003de9,0x000500ac,0x0000002f, 30880x000056b2,0x00000000,0x000400fa,0x000056ae,
35880x00003e17,0x00003ca1,0x00000135,0x000300f7, 30890x000056af,0x000056b2,0x000200f8,0x000056af,
35890x00003e1d,0x00000000,0x000400fa,0x00003e17, 30900x00050080,0x00000006,0x000056b1,0x000056a7,
35900x00003e18,0x00003e1c,0x000200f8,0x00003e1c, 30910x00000142,0x000200f9,0x000056b2,0x000200f8,
35910x000200f9,0x00003e1d,0x000200f8,0x00003e18, 30920x000056b2,0x000700f5,0x00000006,0x00005d71,
35920x00050082,0x00000006,0x00003e1b,0x00003ca1, 30930x000056a7,0x000056ad,0x000056b1,0x000056af,
35930x00000135,0x000200f9,0x00003e1d,0x000200f8, 30940x000500c5,0x00000006,0x000056b5,0x00005675,
35940x00003e1d,0x000700f5,0x00000006,0x000059cb, 30950x00005d71,0x000200f9,0x000056b6,0x000200f8,
35950x00003e1b,0x00003e18,0x0000012b,0x00003e1c, 30960x000056b6,0x000d00f5,0x00000006,0x00005d73,
35960x00050084,0x00000006,0x00003de2,0x000000df, 30970x00005680,0x0000567e,0x00005675,0x00005684,
35970x000059cb,0x00050080,0x00000006,0x00003de3, 30980x00005691,0x0000568d,0x00005d72,0x0000569c,
35980x00003dea,0x00003de2,0x000300f7,0x00003e2a, 30990x000056b5,0x000056b2,0x00050051,0x00000027,
35990x00000000,0x000400fa,0x00003e17,0x00003e25, 31000x000054cd,0x00005cf4,0x00000002,0x000300f7,
36000x00003e29,0x000200f8,0x00003e29,0x000200f9, 31010x0000570a,0x00000000,0x000300fb,0x00000138,
36010x00003e2a,0x000200f8,0x00003e25,0x00050082, 31020x000056c4,0x000200f8,0x000056c4,0x0004007c,
36020x00000006,0x00003e28,0x00003ca1,0x00000135, 31030x00000006,0x000056c6,0x000054cd,0x000500c2,
36030x000200f9,0x00003e2a,0x000200f8,0x00003e2a, 31040x00000006,0x000056c8,0x000056c6,0x0000035a,
36040x000700f5,0x00000006,0x000059cc,0x00003e28, 31050x000500c7,0x00000006,0x000056c9,0x000056c8,
36050x00003e25,0x0000012b,0x00003e29,0x00050084, 31060x00000373,0x000500c7,0x00000006,0x000056cb,
36060x00000006,0x00003ddc,0x000000df,0x000059cc, 31070x000056c6,0x00000256,0x000500aa,0x0000002f,
36070x00050080,0x00000006,0x00003ddd,0x00003de3, 31080x000056cf,0x000056c9,0x00000138,0x000500ac,
36080x00003ddc,0x000300f7,0x00003e37,0x00000000, 31090x0000002f,0x000056d1,0x000056cb,0x0000037e,
36090x000400fa,0x00003e17,0x00003e32,0x00003e36, 31100x000300f7,0x000056d5,0x00000000,0x000400fa,
36100x000200f8,0x00003e36,0x000200f9,0x00003e37, 31110x000056d1,0x000056d2,0x000056d5,0x000200f8,
36110x000200f8,0x00003e32,0x00050082,0x00000006, 31120x000056d2,0x000500c5,0x00000006,0x000056d4,
36120x00003e35,0x00003ca1,0x00000135,0x000200f9, 31130x000056c9,0x00000383,0x000200f9,0x0000570a,
36130x00003e37,0x000200f8,0x00003e37,0x000700f5, 31140x000200f8,0x000056d5,0x000500aa,0x0000002f,
36140x00000006,0x000059cd,0x00003e35,0x00003e32, 31150x000056d7,0x000056cb,0x00000138,0x000300f7,
36150x0000012b,0x00003e36,0x00050084,0x00000006, 31160x000056da,0x00000000,0x000400fa,0x000056d7,
36160x00003dd6,0x000000df,0x000059cd,0x00050080, 31170x000056d8,0x000056da,0x000200f8,0x000056d8,
36170x00000006,0x00003dd7,0x00003ddd,0x00003dd6, 31180x000200f9,0x0000570a,0x000200f8,0x000056da,
36180x00050084,0x00000006,0x00003cb5,0x000000df, 31190x000500c2,0x00000006,0x000056dc,0x000056cb,
36190x000011de,0x00050080,0x00000006,0x00003cb6, 31200x0000038e,0x0004007c,0x000000f4,0x000056dd,
36200x00003dd7,0x00003cb5,0x00050041,0x0000022d, 31210x000056dc,0x00050082,0x000000f4,0x000056de,
36210x00003cb7,0x00000180,0x0000022b,0x0004003d, 31220x000056dd,0x00000391,0x000500af,0x0000002f,
36220x00000007,0x00003cb8,0x00003cb7,0x00050051, 31230x000056e0,0x000056de,0x0000035a,0x000300f7,
36230x00000006,0x00003e4f,0x00003cb8,0x00000000, 31240x000056e6,0x00000000,0x000400fa,0x000056e0,
36240x00050095,0x00000130,0x00003e51,0x00003e4f, 31250x000056e1,0x000056e6,0x000200f8,0x000056e1,
36250x00003cb6,0x00050051,0x00000006,0x00003e52, 31260x000600a9,0x00000006,0x000056e4,0x000056cf,
36260x00003e51,0x00000001,0x00050051,0x00000006, 31270x00000399,0x0000039a,0x000500c5,0x00000006,
36270x00003e53,0x00003e51,0x00000000,0x00050051, 31280x000056e5,0x000056c9,0x000056e4,0x000200f9,
36280x00000006,0x00003e56,0x00003cb8,0x00000001, 31290x0000570a,0x000200f8,0x000056e6,0x000500b1,
36290x00050080,0x00000006,0x00003e58,0x00003e56, 31300x0000002f,0x000056e8,0x000056de,0x0000039f,
36300x00003e52,0x00050050,0x00000007,0x00003e59, 31310x000300f7,0x000056f2,0x00000000,0x000400fa,
36310x00003e53,0x00003e58,0x0004007c,0x00000014, 31320x000056e8,0x000056e9,0x000056f2,0x000200f8,
36320x00003e49,0x00003e59,0x00060041,0x0000015f, 31330x000056e9,0x000300f7,0x000056f0,0x00000000,
36330x00003e40,0x00003e49,0x0000015e,0x0000015e, 31340x000400fa,0x000056cf,0x000056eb,0x000056ee,
36340x0006003d,0x00000006,0x00003e41,0x00003e40, 31350x000200f8,0x000056ee,0x000200f9,0x000056f0,
36350x00000002,0x00000004,0x000500aa,0x0000002f, 31360x000200f8,0x000056eb,0x000500c5,0x00000006,
36360x00003cba,0x00003e41,0x0000012b,0x000300f7, 31370x000056ed,0x000056c9,0x000003a8,0x000200f9,
36370x00003cbc,0x00000000,0x000400fa,0x00003cba, 31380x000056f0,0x000200f8,0x000056f0,0x000700f5,
36380x00003cbb,0x00003cbc,0x000200f8,0x00003cbb, 31390x00000006,0x00005d76,0x000056ed,0x000056eb,
36390x000200f9,0x00003d8d,0x000200f8,0x00003cbc, 31400x000056c9,0x000056ee,0x000200f9,0x0000570a,
36400x000300f7,0x00003eab,0x00000000,0x000400fa, 31410x000200f8,0x000056f2,0x000500c7,0x00000006,
36410x00003e17,0x00003ea6,0x00003eaa,0x000200f8, 31420x000056f4,0x000056c6,0x000003b0,0x00050080,
36420x00003eaa,0x000200f9,0x00003eab,0x000200f8, 31430x000000f4,0x000056f6,0x000056dd,0x000060ff,
36430x00003ea6,0x00050082,0x00000006,0x00003ea9, 31440x0004007c,0x00000006,0x000056f7,0x000056f6,
36440x00003ca1,0x00000135,0x000200f9,0x00003eab, 31450x000500c4,0x00000006,0x000056f8,0x000056f7,
36450x000200f8,0x00003eab,0x000700f5,0x00000006, 31460x000003b6,0x000500c2,0x00000006,0x000056fa,
36460x000059ce,0x00003ea9,0x00003ea6,0x0000012b, 31470x000056f4,0x000001f0,0x000500c5,0x00000006,
36470x00003eaa,0x00050084,0x00000006,0x00003e70, 31480x000056fb,0x000056f8,0x000056fa,0x000300f7,
36480x000000df,0x000059ce,0x00050080,0x00000006, 31490x00005701,0x00000000,0x000400fa,0x000056cf,
36490x00003e71,0x00003dea,0x00003e70,0x000300f7, 31500x000056fd,0x00005701,0x000200f8,0x000056fd,
36500x00003eb8,0x00000000,0x000400fa,0x00003e17, 31510x000500c7,0x00000006,0x000056ff,0x000056c6,
36510x00003eb3,0x00003eb7,0x000200f8,0x00003eb7, 31520x000003bf,0x000500ab,0x0000002f,0x00005700,
36520x000200f9,0x00003eb8,0x000200f8,0x00003eb3, 31530x000056ff,0x00000138,0x000200f9,0x00005701,
36530x00050082,0x00000006,0x00003eb6,0x00003ca1, 31540x000200f8,0x00005701,0x000700f5,0x0000002f,
36540x00000135,0x000200f9,0x00003eb8,0x000200f8, 31550x00005702,0x000056cf,0x000056f2,0x00005700,
36550x00003eb8,0x000700f5,0x00000006,0x000059cf, 31560x000056fd,0x000300f7,0x00005706,0x00000000,
36560x00003eb6,0x00003eb3,0x0000012b,0x00003eb7, 31570x000400fa,0x00005702,0x00005703,0x00005706,
36570x00050084,0x00000006,0x00003e6a,0x000000df, 31580x000200f8,0x00005703,0x00050080,0x00000006,
36580x000059cf,0x00050080,0x00000006,0x00003e6b, 31590x00005705,0x000056fb,0x00000142,0x000200f9,
36590x00003e71,0x00003e6a,0x000300f7,0x00003ec5, 31600x00005706,0x000200f8,0x00005706,0x000700f5,
36600x00000000,0x000400fa,0x00003e17,0x00003ec0, 31610x00000006,0x00005d75,0x000056fb,0x00005701,
36610x00003ec4,0x000200f8,0x00003ec4,0x000200f9, 31620x00005705,0x00005703,0x000500c5,0x00000006,
36620x00003ec5,0x000200f8,0x00003ec0,0x00050082, 31630x00005709,0x000056c9,0x00005d75,0x000200f9,
36630x00000006,0x00003ec3,0x00003ca1,0x00000135, 31640x0000570a,0x000200f8,0x0000570a,0x000d00f5,
36640x000200f9,0x00003ec5,0x000200f8,0x00003ec5, 31650x00000006,0x00005d77,0x000056d4,0x000056d2,
36650x000700f5,0x00000006,0x000059d0,0x00003ec3, 31660x000056c9,0x000056d8,0x000056e5,0x000056e1,
36660x00003ec0,0x0000012b,0x00003ec4,0x00050084, 31670x00005d76,0x000056f0,0x00005709,0x00005706,
36670x00000006,0x00003e64,0x000000df,0x000059d0, 31680x000500c4,0x00000006,0x000054cf,0x00005d77,
36680x00050080,0x00000006,0x00003e65,0x00003e6b, 31690x0000035a,0x000500c5,0x00000006,0x000054d0,
36690x00003e64,0x000300f7,0x00003ed2,0x00000000, 31700x00005d73,0x000054cf,0x00050095,0x0000013d,
36700x000400fa,0x00003e17,0x00003ecd,0x00003ed1, 31710x00005723,0x000053ea,0x000054c8,0x00050051,
36710x000200f8,0x00003ed1,0x000200f9,0x00003ed2, 31720x00000006,0x00005724,0x00005723,0x00000001,
36720x000200f8,0x00003ecd,0x00050082,0x00000006, 31730x00050051,0x00000006,0x00005725,0x00005723,
36730x00003ed0,0x00003ca1,0x00000135,0x000200f9, 31740x00000000,0x00050080,0x00000006,0x0000572a,
36740x00003ed2,0x000200f8,0x00003ed2,0x000700f5, 31750x000053f1,0x00005724,0x00050050,0x00000007,
36750x00000006,0x000059d1,0x00003ed0,0x00003ecd, 31760x0000572b,0x00005725,0x0000572a,0x0004007c,
36760x0000012b,0x00003ed1,0x00050084,0x00000006, 31770x00000014,0x0000571b,0x0000572b,0x00060041,
36770x00003e5e,0x000000df,0x000059d1,0x00050080, 31780x0000016c,0x00005713,0x0000571b,0x0000016b,
36780x00000006,0x00003e5f,0x00003e65,0x00003e5e, 31790x0000016b,0x0005003e,0x00005713,0x000054d0,
36790x00050080,0x00000006,0x00003cc0,0x00003e5f, 31800x00000002,0x00000004,0x000200f9,0x00005497,
36800x00003cb5,0x00050095,0x00000130,0x00003eec, 31810x000200f8,0x00005468,0x00050080,0x00000006,
36810x00003e4f,0x00003cc0,0x00050051,0x00000006, 31820x0000546a,0x0000513c,0x000001db,0x00050084,
36820x00003eed,0x00003eec,0x00000001,0x00050051, 31830x00000006,0x0000546c,0x000001ef,0x00005cee,
36830x00000006,0x00003eee,0x00003eec,0x00000000, 31840x00050080,0x00000006,0x0000546d,0x0000546a,
36840x00050080,0x00000006,0x00003ef3,0x00003e56, 31850x0000546c,0x00050051,0x00000027,0x00005472,
36850x00003eed,0x00050050,0x00000007,0x00003ef4, 31860x00005cf1,0x00000000,0x0004007c,0x00000006,
36860x00003eee,0x00003ef3,0x0004007c,0x00000014, 31870x00005731,0x00005472,0x00050095,0x0000013d,
36870x00003ee4,0x00003ef4,0x00060041,0x0000015f, 31880x0000574c,0x000053ea,0x0000546d,0x00050051,
36880x00003edb,0x00003ee4,0x0000015e,0x0000015e, 31890x00000006,0x0000574d,0x0000574c,0x00000001,
36890x0006003d,0x00000006,0x00003edc,0x00003edb, 31900x00050051,0x00000006,0x0000574e,0x0000574c,
36900x00000002,0x00000004,0x000500ae,0x0000002f, 31910x00000000,0x00050080,0x00000006,0x00005753,
36910x00003cc7,0x00003edc,0x00003de8,0x000300f7, 31920x000053f1,0x0000574d,0x00050050,0x00000007,
36920x00003cc9,0x00000000,0x000400fa,0x00003cc7, 31930x00005754,0x0000574e,0x00005753,0x0004007c,
36930x00003cc8,0x00003cc9,0x000200f8,0x00003cc8, 31940x00000014,0x00005744,0x00005754,0x00060041,
36940x000200f9,0x00003d8d,0x000200f8,0x00003cc9, 31950x0000016c,0x0000573c,0x00005744,0x0000016b,
36950x00050080,0x00000006,0x00003ccd,0x00003dea, 31960x0000016b,0x0005003e,0x0000573c,0x00005731,
36960x00003cb5,0x00050095,0x00000130,0x00003f3b, 31970x00000002,0x00000004,0x00050080,0x00000006,
36970x00003e4f,0x00003ccd,0x00050051,0x00000006, 31980x00005475,0x0000546d,0x000000ec,0x00050051,
36980x00003f3c,0x00003f3b,0x00000001,0x00050051, 31990x00000027,0x00005479,0x00005cf1,0x00000001,
36990x00000006,0x00003f3d,0x00003f3b,0x00000000, 32000x0004007c,0x00000006,0x0000575a,0x00005479,
37000x00050080,0x00000006,0x00003f42,0x00003e56, 32010x00050095,0x0000013d,0x00005775,0x000053ea,
37010x00003f3c,0x00050050,0x00000007,0x00003f43, 32020x00005475,0x00050051,0x00000006,0x00005776,
37020x00003f3d,0x00003f42,0x0004007c,0x00000014, 32030x00005775,0x00000001,0x00050051,0x00000006,
37030x00003f33,0x00003f43,0x00060041,0x0000015f, 32040x00005777,0x00005775,0x00000000,0x00050080,
37040x00003f2a,0x00003f33,0x0000015e,0x0000015e, 32050x00000006,0x0000577c,0x000053f1,0x00005776,
37050x0006003d,0x00000006,0x00003f2b,0x00003f2a, 32060x00050050,0x00000007,0x0000577d,0x00005777,
37060x00000002,0x00000004,0x000300f7,0x00003f83, 32070x0000577c,0x0004007c,0x00000014,0x0000576d,
37070x00000000,0x000400fa,0x00003e17,0x00003f7e, 32080x0000577d,0x00060041,0x0000016c,0x00005765,
37080x00003f82,0x000200f8,0x00003f82,0x000200f9, 32090x0000576d,0x0000016b,0x0000016b,0x0005003e,
37090x00003f83,0x000200f8,0x00003f7e,0x00050082, 32100x00005765,0x0000575a,0x00000002,0x00000004,
37100x00000006,0x00003f81,0x00003ca1,0x00000135, 32110x00050080,0x00000006,0x0000547c,0x0000546d,
37110x000200f9,0x00003f83,0x000200f8,0x00003f83, 32120x000001cd,0x00050051,0x00000027,0x00005480,
37120x000700f5,0x00000006,0x000059d2,0x00003f81, 32130x00005cf1,0x00000002,0x0004007c,0x00000006,
37130x00003f7e,0x0000012b,0x00003f82,0x00050084, 32140x00005783,0x00005480,0x00050095,0x0000013d,
37140x00000006,0x00003f48,0x000000df,0x000059d2, 32150x0000579e,0x000053ea,0x0000547c,0x00050051,
37150x00050080,0x00000006,0x00003f49,0x00003dea, 32160x00000006,0x0000579f,0x0000579e,0x00000001,
37160x00003f48,0x00050080,0x00000006,0x00003cd4, 32170x00050051,0x00000006,0x000057a0,0x0000579e,
37170x00003f49,0x00003cb5,0x00050095,0x00000130, 32180x00000000,0x00050080,0x00000006,0x000057a5,
37180x00003f9d,0x00003e4f,0x00003cd4,0x00050051, 32190x000053f1,0x0000579f,0x00050050,0x00000007,
37190x00000006,0x00003f9e,0x00003f9d,0x00000001, 32200x000057a6,0x000057a0,0x000057a5,0x0004007c,
37200x00050051,0x00000006,0x00003f9f,0x00003f9d, 32210x00000014,0x00005796,0x000057a6,0x00060041,
37210x00000000,0x00050080,0x00000006,0x00003fa4, 32220x0000016c,0x0000578e,0x00005796,0x0000016b,
37220x00003e56,0x00003f9e,0x00050050,0x00000007, 32230x0000016b,0x0005003e,0x0000578e,0x00005783,
37230x00003fa5,0x00003f9f,0x00003fa4,0x0004007c, 32240x00000002,0x00000004,0x00050080,0x00000006,
37240x00000014,0x00003f95,0x00003fa5,0x00060041, 32250x00005483,0x0000546d,0x000001d4,0x00050051,
37250x0000015f,0x00003f8c,0x00003f95,0x0000015e, 32260x00000027,0x00005487,0x00005cf4,0x00000000,
37260x0000015e,0x0006003d,0x00000006,0x00003f8d, 32270x0004007c,0x00000006,0x000057ac,0x00005487,
37270x00003f8c,0x00000002,0x00000004,0x00050050, 32280x00050095,0x0000013d,0x000057c7,0x000053ea,
37280x00000f0e,0x00003cd8,0x00003f2b,0x00003f8d, 32290x00005483,0x00050051,0x00000006,0x000057c8,
37290x0003003e,0x00003c72,0x00003cd8,0x000200f9, 32300x000057c7,0x00000001,0x00050051,0x00000006,
37300x00003cd9,0x000200f8,0x00003cd9,0x000700f5, 32310x000057c9,0x000057c7,0x00000000,0x00050080,
37310x00000006,0x000059d3,0x0000012b,0x00003f83, 32320x00000006,0x000057ce,0x000053f1,0x000057c8,
37320x00003d11,0x00003d0f,0x000700f5,0x00000006, 32330x00050050,0x00000007,0x000057cf,0x000057c9,
37330x000059fc,0x0000012b,0x00003f83,0x000059fa, 32340x000057ce,0x0004007c,0x00000014,0x000057bf,
37340x00003d0f,0x000500b0,0x0000002f,0x00003cdc, 32350x000057cf,0x00060041,0x0000016c,0x000057b7,
37350x000059d3,0x00000247,0x000400f6,0x00003d12, 32360x000057bf,0x0000016b,0x0000016b,0x0005003e,
37360x00003d0f,0x00000000,0x000400fa,0x00003cdc, 32370x000057b7,0x000057ac,0x00000002,0x00000004,
37370x00003cdd,0x00003d12,0x000200f8,0x00003cdd, 32380x00050080,0x00000006,0x0000548a,0x0000546d,
37380x00050041,0x00000009,0x00003cdf,0x00003c72, 32390x000001db,0x00050051,0x00000027,0x0000548e,
37390x000059d3,0x0004003d,0x00000006,0x00003ce0, 32400x00005cf4,0x00000001,0x0004007c,0x00000006,
37400x00003cdf,0x00050050,0x00000f0e,0x00003ce2, 32410x000057d5,0x0000548e,0x00050095,0x0000013d,
37410x00003ce0,0x00003ce0,0x0003003e,0x00003c79, 32420x000057f0,0x000053ea,0x0000548a,0x00050051,
37420x00003ce2,0x000500c7,0x00000006,0x00003ce4, 32430x00000006,0x000057f1,0x000057f0,0x00000001,
37430x00003ce0,0x00000208,0x000500aa,0x0000002f, 32440x00050051,0x00000006,0x000057f2,0x000057f0,
37440x00003ce5,0x00003ce4,0x0000012b,0x000300f7, 32450x00000000,0x00050080,0x00000006,0x000057f7,
37450x00003cf7,0x00000000,0x000400fa,0x00003ce5, 32460x000053f1,0x000057f1,0x00050050,0x00000007,
37460x00003ce6,0x00003cf7,0x000200f8,0x00003ce6, 32470x000057f8,0x000057f2,0x000057f7,0x0004007c,
37470x00050084,0x00000006,0x00003ce9,0x000000df, 32480x00000014,0x000057e8,0x000057f8,0x00060041,
37480x00003ce0,0x00050080,0x00000006,0x00003cea, 32490x0000016c,0x000057e0,0x000057e8,0x0000016b,
37490x00003dea,0x00003ce9,0x00050095,0x00000130, 32500x0000016b,0x0005003e,0x000057e0,0x000057d5,
37500x00003fec,0x00003e4f,0x00003cea,0x00050051, 32510x00000002,0x00000004,0x00050080,0x00000006,
37510x00000006,0x00003fed,0x00003fec,0x00000001, 32520x00005491,0x0000546d,0x00000299,0x00050051,
37520x00050051,0x00000006,0x00003fee,0x00003fec, 32530x00000027,0x00005495,0x00005cf4,0x00000002,
37530x00000000,0x00050080,0x00000006,0x00003ff3, 32540x0004007c,0x00000006,0x000057fe,0x00005495,
37540x00003e56,0x00003fed,0x00050050,0x00000007, 32550x00050095,0x0000013d,0x00005819,0x000053ea,
37550x00003ff4,0x00003fee,0x00003ff3,0x0004007c, 32560x00005491,0x00050051,0x00000006,0x0000581a,
37560x00000014,0x00003fe4,0x00003ff4,0x00060041, 32570x00005819,0x00000001,0x00050051,0x00000006,
37570x0000015f,0x00003fdb,0x00003fe4,0x0000015e, 32580x0000581b,0x00005819,0x00000000,0x00050080,
37580x0000015e,0x0006003d,0x00000006,0x00003fdc, 32590x00000006,0x00005820,0x000053f1,0x0000581a,
37590x00003fdb,0x00000002,0x00000004,0x00050041, 32600x00050050,0x00000007,0x00005821,0x0000581b,
37600x00000009,0x00003cee,0x00003c79,0x0000015e, 32610x00005820,0x0004007c,0x00000014,0x00005811,
37610x0003003e,0x00003cee,0x00003fdc,0x000300f7, 32620x00005821,0x00060041,0x0000016c,0x00005809,
37620x00004034,0x00000000,0x000400fa,0x00003e17, 32630x00005811,0x0000016b,0x0000016b,0x0005003e,
37630x0000402f,0x00004033,0x000200f8,0x00004033, 32640x00005809,0x000057fe,0x00000002,0x00000004,
37640x000200f9,0x00004034,0x000200f8,0x0000402f, 32650x000200f9,0x00005497,0x000200f8,0x00005497,
37650x00050082,0x00000006,0x00004032,0x00003ca1, 32660x000200f9,0x0000515a,0x000200f8,0x0000515a,
37660x00000135,0x000200f9,0x00004034,0x000200f8, 32670x000200f9,0x0000515b,0x000200f8,0x0000515b,
37670x00004034,0x000700f5,0x00000006,0x000059f3, 32680x000700f5,0x00000006,0x00006026,0x00005d0a,
37680x00004032,0x0000402f,0x0000012b,0x00004033, 32690x0000514b,0x0000514e,0x0000515a,0x00050080,
37690x00050084,0x00000006,0x00003ff9,0x000000df, 32700x00000006,0x0000515d,0x00005cee,0x00000264,
37700x000059f3,0x00050080,0x00000006,0x00003ffa, 32710x000200f9,0x0000513d,0x000200f8,0x0000515e,
37710x00003dea,0x00003ff9,0x00050080,0x00000006, 32720x00050041,0x000001bb,0x00005829,0x000001b9,
37720x00003cf2,0x00003ffa,0x00003ce9,0x00050095, 32730x0000035a,0x0004003d,0x00000006,0x0000582a,
37730x00000130,0x0000404e,0x00003e4f,0x00003cf2, 32740x00005829,0x00050082,0x00000006,0x0000582b,
37740x00050051,0x00000006,0x0000404f,0x0000404e, 32750x0000513c,0x0000582a,0x000500c7,0x00000006,
37750x00000001,0x00050051,0x00000006,0x00004050, 32760x00005837,0x00005ceb,0x00000d2b,0x000500aa,
37760x0000404e,0x00000000,0x00050080,0x00000006, 32770x0000002f,0x00005838,0x00005837,0x000000ec,
37770x00004055,0x00003e56,0x0000404f,0x00050050, 32780x000600a9,0x00000006,0x0000582e,0x00005838,
37780x00000007,0x00004056,0x00004050,0x00004055, 32790x000001c4,0x00000342,0x00050086,0x00000006,
37790x0004007c,0x00000014,0x00004046,0x00004056, 32800x0000582f,0x0000582b,0x0000582e,0x00050041,
37800x00060041,0x0000015f,0x0000403d,0x00004046, 32810x000001bb,0x00005847,0x000001b9,0x000001f0,
37810x0000015e,0x0000015e,0x0006003d,0x00000006, 32820x0004003d,0x00000006,0x00005848,0x00005847,
37820x0000403e,0x0000403d,0x00000002,0x00000004, 32830x00050084,0x00000006,0x00005849,0x000001ef,
37830x00050041,0x00000009,0x00003cf6,0x00003c79, 32840x00005848,0x00050080,0x00000006,0x0000584a,
37840x0000022b,0x0003003e,0x00003cf6,0x0000403e, 32850x000052dd,0x00005849,0x00050084,0x00000006,
37850x000200f9,0x00003cf7,0x000200f8,0x00003cf7, 32860x0000583f,0x00000205,0x0000582f,0x00050080,
37860x000600a9,0x00000006,0x00005cdb,0x00003ce5, 32870x00000006,0x00005840,0x0000584a,0x0000583f,
37870x00000247,0x00000135,0x000200f9,0x00003cf8, 32880x00050095,0x0000013d,0x0000587a,0x0000530e,
37880x000200f8,0x00003cf8,0x000700f5,0x00000006, 32890x00005840,0x00050051,0x00000006,0x0000587b,
37890x000059fa,0x000059fc,0x00003cf7,0x00003d05, 32900x0000587a,0x00000001,0x00050051,0x00000006,
37900x00003d0b,0x000700f5,0x00000006,0x000059f4, 32910x0000587c,0x0000587a,0x00000000,0x00050080,
37910x0000012b,0x00003cf7,0x00003d0d,0x00003d0b, 32920x00000006,0x00005881,0x00005315,0x0000587b,
37920x000500b0,0x0000002f,0x00003cfc,0x000059f4, 32930x00050050,0x00000007,0x00005882,0x0000587c,
37930x00005cdb,0x000400f6,0x00003d0e,0x00003d0b, 32940x00005881,0x0004007c,0x00000014,0x00005872,
37940x00000000,0x000400fa,0x00003cfc,0x00003cfd, 32950x00005882,0x00050051,0x00000027,0x00005886,
37950x00003d0e,0x000200f8,0x00003cfd,0x00050041, 32960x00005cf1,0x00000000,0x00050051,0x00000027,
37960x00000009,0x00003d00,0x00003c79,0x000059f4, 32970x00005888,0x00005cf4,0x00000000,0x000500bc,
37970x0004003d,0x00000006,0x00003d01,0x00003d00, 32980x0000002f,0x00005889,0x00005886,0x00005888,
37980x000500c7,0x00000006,0x0000405d,0x00003d01, 32990x000300f7,0x00005890,0x00000000,0x000400fa,
37990x00000208,0x000500ab,0x0000002f,0x0000405e, 33000x00005889,0x0000588a,0x00005890,0x000200f8,
38000x0000405d,0x0000012b,0x000300f7,0x00004069, 33010x0000588a,0x00050051,0x00000027,0x0000588c,
38010x00000000,0x000400fa,0x0000405e,0x0000405f, 33020x00005cf1,0x00000001,0x00050051,0x00000027,
38020x00004068,0x000200f8,0x00004068,0x000200f9, 33030x0000588e,0x00005cf4,0x00000001,0x000500bc,
38030x00004069,0x000200f8,0x0000405f,0x00050084, 33040x0000002f,0x0000588f,0x0000588c,0x0000588e,
38040x00000006,0x0000406f,0x000000df,0x00003e01, 33050x000200f9,0x00005890,0x000200f8,0x00005890,
38050x00050080,0x00000006,0x00004070,0x0000018b, 33060x000700f5,0x0000002f,0x00005891,0x00005889,
38060x0000406f,0x000500c7,0x00000006,0x00004062, 33070x0000515e,0x0000588f,0x0000588a,0x000300f7,
38070x00003d01,0x0000021d,0x00050084,0x00000006, 33080x00005898,0x00000000,0x000400fa,0x00005891,
38080x00004063,0x000000df,0x00004062,0x00050080, 33090x00005892,0x00005898,0x000200f8,0x00005892,
38090x00000006,0x00004064,0x00004070,0x00004063, 33100x00050051,0x00000027,0x00005894,0x00005cf1,
38100x00050095,0x00000130,0x00004089,0x00003e4f, 33110x00000002,0x00050051,0x00000027,0x00005896,
38110x00004064,0x00050051,0x00000006,0x0000408a, 33120x00005cf4,0x00000002,0x000500bc,0x0000002f,
38120x00004089,0x00000001,0x00050051,0x00000006, 33130x00005897,0x00005894,0x00005896,0x000200f9,
38130x0000408b,0x00004089,0x00000000,0x00050080, 33140x00005898,0x000200f8,0x00005898,0x000700f5,
38140x00000006,0x00004090,0x00003e56,0x0000408a, 33150x0000002f,0x00005899,0x00005891,0x00005890,
38150x00050050,0x00000007,0x00004091,0x0000408b, 33160x00005897,0x00005892,0x000300f7,0x0000518c,
38160x00004090,0x0004007c,0x00000014,0x00004081, 33170x00000000,0x000400fa,0x00005899,0x00005167,
38170x00004091,0x00060041,0x0000015f,0x00004078, 33180x0000518c,0x000200f8,0x00005167,0x00060041,
38180x00004081,0x0000015e,0x0000015e,0x0006003d, 33190x0000016c,0x00005169,0x00005872,0x0000016b,
38190x00000006,0x00004079,0x00004078,0x00000002, 33200x00000264,0x0004007c,0x00000006,0x000058a0,
38200x00000004,0x000200f9,0x00004069,0x000200f8, 33210x00005886,0x000500c7,0x00000006,0x000058a2,
38210x00004069,0x000700f5,0x00000006,0x000059ff, 33220x000058a0,0x00000241,0x000500ab,0x0000002f,
38220x00004079,0x0000405f,0x00000500,0x00004068, 33230x000058a3,0x000058a2,0x00000138,0x000300f7,
38230x00050041,0x00000009,0x00003d03,0x00003c68, 33240x000058aa,0x00000000,0x000400fa,0x000058a3,
38240x000059fa,0x0003003e,0x00003d03,0x000059ff, 33250x000058a4,0x000058a7,0x000200f8,0x000058a7,
38250x00050080,0x00000006,0x00003d05,0x000059fa, 33260x000500c5,0x00000006,0x000058a9,0x000058a0,
38260x0000022b,0x0004003d,0x00000006,0x00003d08, 33270x00000241,0x000200f9,0x000058aa,0x000200f8,
38270x00003d00,0x000300f7,0x000040ac,0x00000000, 33280x000058a4,0x000400c8,0x00000006,0x000058a6,
38280x000300fb,0x0000012b,0x0000409b,0x000200f8, 33290x000058a0,0x000200f9,0x000058aa,0x000200f8,
38290x0000409b,0x000500c7,0x00000006,0x0000409d, 33300x000058aa,0x000700f5,0x00000006,0x00005cf8,
38300x00003d08,0x00000208,0x000500ab,0x0000002f, 33310x000058a6,0x000058a4,0x000058a9,0x000058a7,
38310x0000409e,0x0000409d,0x0000012b,0x000300f7, 33320x000700ed,0x00000006,0x0000516d,0x00005169,
38320x000040a3,0x00000000,0x000400fa,0x0000409e, 33330x00000142,0x00000138,0x00005cf8,0x00060041,
38330x0000409f,0x000040a3,0x000200f8,0x0000409f, 33340x0000016c,0x0000516f,0x00005872,0x0000016b,
38340x000300f7,0x000040c0,0x00000000,0x000400fa, 33350x00000315,0x00050051,0x00000027,0x00005171,
38350x0000409e,0x000040b6,0x000040bf,0x000200f8, 33360x00005cf1,0x00000001,0x0004007c,0x00000006,
38360x000040bf,0x000200f9,0x000040c0,0x000200f8, 33370x000058b1,0x00005171,0x000500c7,0x00000006,
38370x000040b6,0x00050084,0x00000006,0x000040c6, 33380x000058b3,0x000058b1,0x00000241,0x000500ab,
38380x000000df,0x00003e01,0x00050080,0x00000006, 33390x0000002f,0x000058b4,0x000058b3,0x00000138,
38390x000040c7,0x0000018b,0x000040c6,0x000500c7, 33400x000300f7,0x000058bb,0x00000000,0x000400fa,
38400x00000006,0x000040b9,0x00003d08,0x0000021d, 33410x000058b4,0x000058b5,0x000058b8,0x000200f8,
38410x00050084,0x00000006,0x000040ba,0x000000df, 33420x000058b8,0x000500c5,0x00000006,0x000058ba,
38420x000040b9,0x00050080,0x00000006,0x000040bb, 33430x000058b1,0x00000241,0x000200f9,0x000058bb,
38430x000040c7,0x000040ba,0x00050095,0x00000130, 33440x000200f8,0x000058b5,0x000400c8,0x00000006,
38440x000040e0,0x00003e4f,0x000040bb,0x00050051, 33450x000058b7,0x000058b1,0x000200f9,0x000058bb,
38450x00000006,0x000040e1,0x000040e0,0x00000001, 33460x000200f8,0x000058bb,0x000700f5,0x00000006,
38460x00050051,0x00000006,0x000040e2,0x000040e0, 33470x00005cfa,0x000058b7,0x000058b5,0x000058ba,
38470x00000000,0x00050080,0x00000006,0x000040e7, 33480x000058b8,0x000700ed,0x00000006,0x00005173,
38480x00003e56,0x000040e1,0x00050050,0x00000007, 33490x0000516f,0x00000142,0x00000138,0x00005cfa,
38490x000040e8,0x000040e2,0x000040e7,0x0004007c, 33500x00060041,0x0000016c,0x00005175,0x00005872,
38500x00000014,0x000040d8,0x000040e8,0x00060041, 33510x0000016b,0x0000031d,0x00050051,0x00000027,
38510x0000015f,0x000040cf,0x000040d8,0x0000015e, 33520x00005177,0x00005cf1,0x00000002,0x0004007c,
38520x0000015e,0x0006003d,0x00000006,0x000040d0, 33530x00000006,0x000058c2,0x00005177,0x000500c7,
38530x000040cf,0x00000002,0x00000004,0x000200f9, 33540x00000006,0x000058c4,0x000058c2,0x00000241,
38540x000040c0,0x000200f8,0x000040c0,0x000700f5, 33550x000500ab,0x0000002f,0x000058c5,0x000058c4,
38550x00000006,0x00005a06,0x000040d0,0x000040b6, 33560x00000138,0x000300f7,0x000058cc,0x00000000,
38560x00000500,0x000040bf,0x00050041,0x00000182, 33570x000400fa,0x000058c5,0x000058c6,0x000058c9,
38570x000040eb,0x00000180,0x00000311,0x0004003d, 33580x000200f8,0x000058c9,0x000500c5,0x00000006,
38580x00000006,0x000040ec,0x000040eb,0x00050041, 33590x000058cb,0x000058c2,0x00000241,0x000200f9,
38590x00000182,0x000040fc,0x00000180,0x000002fb, 33600x000058cc,0x000200f8,0x000058c6,0x000400c8,
38600x0004003d,0x00000006,0x000040fd,0x000040fc, 33610x00000006,0x000058c8,0x000058c2,0x000200f9,
38610x000500c7,0x00000006,0x000040fe,0x000040fd, 33620x000058cc,0x000200f8,0x000058cc,0x000700f5,
38620x00000135,0x000500ab,0x0000002f,0x000040ff, 33630x00000006,0x00005cfc,0x000058c8,0x000058c6,
38630x000040fe,0x0000012b,0x000600a9,0x00000006, 33640x000058cb,0x000058c9,0x000700ed,0x00000006,
38640x000040f9,0x000040ff,0x00000309,0x0000018b, 33650x00005179,0x00005175,0x00000142,0x00000138,
38650x00050084,0x00000006,0x000040ef,0x00005a06, 33660x00005cfc,0x00060041,0x0000016c,0x0000517b,
38660x000040f9,0x00050080,0x00000006,0x000040f0, 33670x00005872,0x0000016b,0x00000325,0x0004007c,
38670x000040ec,0x000040ef,0x000500c2,0x00000006, 33680x00000006,0x000058d3,0x00005888,0x000500c7,
38680x000040f1,0x000040f0,0x00000318,0x000500c4, 33690x00000006,0x000058d5,0x000058d3,0x00000241,
38690x00000006,0x000040f2,0x000040f1,0x000002e4, 33700x000500ab,0x0000002f,0x000058d6,0x000058d5,
38700x000600a9,0x00000006,0x000040f4,0x000040ff, 33710x00000138,0x000300f7,0x000058dd,0x00000000,
38710x0000031c,0x0000012b,0x000500c5,0x00000006, 33720x000400fa,0x000058d6,0x000058d7,0x000058da,
38720x000040f5,0x000040f2,0x000040f4,0x000200f9, 33730x000200f8,0x000058da,0x000500c5,0x00000006,
38730x000040ac,0x000200f8,0x000040a3,0x000300f7, 33740x000058dc,0x000058d3,0x00000241,0x000200f9,
38740x00004157,0x00000000,0x000400fa,0x00003e17, 33750x000058dd,0x000200f8,0x000058d7,0x000400c8,
38750x00004152,0x00004156,0x000200f8,0x00004156, 33760x00000006,0x000058d9,0x000058d3,0x000200f9,
38760x000200f9,0x00004157,0x000200f8,0x00004152, 33770x000058dd,0x000200f8,0x000058dd,0x000700f5,
38770x00050082,0x00000006,0x00004155,0x00003ca1, 33780x00000006,0x00005d02,0x000058d9,0x000058d7,
38780x00000135,0x000200f9,0x00004157,0x000200f8, 33790x000058dc,0x000058da,0x000700ef,0x00000006,
38790x00004157,0x000700f5,0x00000006,0x00005a02, 33800x0000517f,0x0000517b,0x00000142,0x00000138,
38800x00004155,0x00004152,0x0000012b,0x00004156, 33810x00005d02,0x00060041,0x0000016c,0x00005181,
38810x00050084,0x00000006,0x0000411c,0x000000df, 33820x00005872,0x0000016b,0x0000032d,0x00050051,
38820x00005a02,0x00050080,0x00000006,0x0000411d, 33830x00000027,0x00005183,0x00005cf4,0x00000001,
38830x00003dea,0x0000411c,0x000300f7,0x00004164, 33840x0004007c,0x00000006,0x000058e4,0x00005183,
38840x00000000,0x000400fa,0x00003e17,0x0000415f, 33850x000500c7,0x00000006,0x000058e6,0x000058e4,
38850x00004163,0x000200f8,0x00004163,0x000200f9, 33860x00000241,0x000500ab,0x0000002f,0x000058e7,
38860x00004164,0x000200f8,0x0000415f,0x00050082, 33870x000058e6,0x00000138,0x000300f7,0x000058ee,
38870x00000006,0x00004162,0x00003ca1,0x00000135, 33880x00000000,0x000400fa,0x000058e7,0x000058e8,
38880x000200f9,0x00004164,0x000200f8,0x00004164, 33890x000058eb,0x000200f8,0x000058eb,0x000500c5,
38890x000700f5,0x00000006,0x00005a03,0x00004162, 33900x00000006,0x000058ed,0x000058e4,0x00000241,
38900x0000415f,0x0000012b,0x00004163,0x00050084, 33910x000200f9,0x000058ee,0x000200f8,0x000058e8,
38910x00000006,0x00004116,0x000000df,0x00005a03, 33920x000400c8,0x00000006,0x000058ea,0x000058e4,
38920x00050080,0x00000006,0x00004117,0x0000411d, 33930x000200f9,0x000058ee,0x000200f8,0x000058ee,
38930x00004116,0x000300f7,0x00004171,0x00000000, 33940x000700f5,0x00000006,0x00005d04,0x000058ea,
38940x000400fa,0x00003e17,0x0000416c,0x00004170, 33950x000058e8,0x000058ed,0x000058eb,0x000700ef,
38950x000200f8,0x00004170,0x000200f9,0x00004171, 33960x00000006,0x00005185,0x00005181,0x00000142,
38960x000200f8,0x0000416c,0x00050082,0x00000006, 33970x00000138,0x00005d04,0x00060041,0x0000016c,
38970x0000416f,0x00003ca1,0x00000135,0x000200f9, 33980x00005187,0x00005872,0x0000016b,0x00000351,
38980x00004171,0x000200f8,0x00004171,0x000700f5, 33990x00050051,0x00000027,0x00005189,0x00005cf4,
38990x00000006,0x00005a04,0x0000416f,0x0000416c, 34000x00000002,0x0004007c,0x00000006,0x000058f5,
39000x0000012b,0x00004170,0x00050084,0x00000006, 34010x00005189,0x000500c7,0x00000006,0x000058f7,
39010x00004110,0x000000df,0x00005a04,0x00050080, 34020x000058f5,0x00000241,0x000500ab,0x0000002f,
39020x00000006,0x00004111,0x00004117,0x00004110, 34030x000058f8,0x000058f7,0x00000138,0x000300f7,
39030x000300f7,0x0000417e,0x00000000,0x000400fa, 34040x000058ff,0x00000000,0x000400fa,0x000058f8,
39040x00003e17,0x00004179,0x0000417d,0x000200f8, 34050x000058f9,0x000058fc,0x000200f8,0x000058fc,
39050x0000417d,0x000200f9,0x0000417e,0x000200f8, 34060x000500c5,0x00000006,0x000058fe,0x000058f5,
39060x00004179,0x00050082,0x00000006,0x0000417c, 34070x00000241,0x000200f9,0x000058ff,0x000200f8,
39070x00003ca1,0x00000135,0x000200f9,0x0000417e, 34080x000058f9,0x000400c8,0x00000006,0x000058fb,
39080x000200f8,0x0000417e,0x000700f5,0x00000006, 34090x000058f5,0x000200f9,0x000058ff,0x000200f8,
39090x00005a05,0x0000417c,0x00004179,0x0000012b, 34100x000058ff,0x000700f5,0x00000006,0x00005d06,
39100x0000417d,0x00050084,0x00000006,0x0000410a, 34110x000058fb,0x000058f9,0x000058fe,0x000058fc,
39110x000000df,0x00005a05,0x00050080,0x00000006, 34120x000700ef,0x00000006,0x0000518b,0x00005187,
39120x0000410b,0x00004111,0x0000410a,0x00050084, 34130x00000142,0x00000138,0x00005d06,0x000200f9,
39130x00000006,0x000040a6,0x000000df,0x00003d08, 34140x0000518c,0x000200f8,0x0000518c,0x00060041,
39140x00050080,0x00000006,0x000040a7,0x0000410b, 34150x0000016c,0x0000518e,0x00005872,0x0000016b,
39150x000040a6,0x00050095,0x00000130,0x00004198, 34160x0000016b,0x000700ea,0x00000006,0x0000518f,
39160x00003e4f,0x000040a7,0x00050051,0x00000006, 34170x0000518e,0x00000264,0x00000820,0x00000142,
39170x00004199,0x00004198,0x00000001,0x00050051, 34180x00050080,0x00000006,0x00005191,0x0000518f,
39180x00000006,0x0000419a,0x00004198,0x00000000, 34190x00000142,0x000500ab,0x0000002f,0x00005193,
39190x00050080,0x00000006,0x0000419f,0x00003e56, 34200x00005191,0x00005d0a,0x000300f7,0x00005195,
39200x00004199,0x00050050,0x00000007,0x000041a0, 34210x00000000,0x000400fa,0x00005193,0x00005194,
39210x0000419a,0x0000419f,0x0004007c,0x00000014, 34220x00005195,0x000200f8,0x00005194,0x000200f9,
39220x00004190,0x000041a0,0x00060041,0x0000015f, 34230x000051a0,0x000200f8,0x00005195,0x000300f7,
39230x00004187,0x00004190,0x0000015e,0x0000015e, 34240x0000593b,0x00000000,0x000300fb,0x00000138,
39240x0006003d,0x00000006,0x00004188,0x00004187, 34250x0000590d,0x000200f8,0x0000590d,0x000200f9,
39250x00000002,0x00000004,0x00050041,0x00000182, 34260x00005910,0x000200f8,0x00005910,0x000700f5,
39260x000041a3,0x00000180,0x00000321,0x0004003d, 34270x00000006,0x00005d11,0x00000138,0x0000590d,
39270x00000006,0x000041a4,0x000041a3,0x00050041, 34280x0000591e,0x00005914,0x000500b0,0x0000002f,
39280x00000182,0x000041b4,0x00000180,0x000002fb, 34290x00005913,0x00005d11,0x00000355,0x000400f6,
39290x0004003d,0x00000006,0x000041b5,0x000041b4, 34300x0000591f,0x00005914,0x00000000,0x000400fa,
39300x000500c7,0x00000006,0x000041b6,0x000041b5, 34310x00005913,0x00005914,0x0000591f,0x000200f8,
39310x00000247,0x000500ab,0x0000002f,0x000041b7, 34320x00005914,0x00050080,0x00000006,0x00005918,
39320x000041b6,0x0000012b,0x000600a9,0x00000006, 34330x00000142,0x00005d11,0x00060041,0x0000016c,
39330x000041b1,0x000041b7,0x0000018b,0x00000309, 34340x00005919,0x00005872,0x0000016b,0x00005918,
39340x00050084,0x00000006,0x000041a7,0x00004188, 34350x000700f1,0x00000006,0x0000591a,0x00005919,
39350x000041b1,0x00050080,0x00000006,0x000041a8, 34360x00000142,0x00000138,0x00000138,0x00050041,
39360x000041a4,0x000041a7,0x000500c2,0x00000006, 34370x00000009,0x0000591b,0x00005905,0x00005d11,
39370x000041a9,0x000041a8,0x00000318,0x000500c4, 34380x0003003e,0x0000591b,0x0000591a,0x00050080,
39380x00000006,0x000041aa,0x000041a9,0x000002e4, 34390x00000006,0x0000591e,0x00005d11,0x00000264,
39390x000600a9,0x00000006,0x000041ac,0x000041b7, 34400x000200f9,0x00005910,0x000200f8,0x0000591f,
39400x000000df,0x0000032b,0x000500c5,0x00000006, 34410x00050041,0x00000009,0x00005920,0x00005905,
39410x000041ad,0x000041aa,0x000041ac,0x000200f9, 34420x0000016b,0x0004003d,0x00000006,0x00005921,
39420x000040ac,0x000200f8,0x000040ac,0x000700f5, 34430x00005920,0x000500aa,0x0000002f,0x00005922,
39430x00000006,0x00005a07,0x000040f5,0x000040c0, 34440x00005921,0x00000539,0x000300f7,0x00005926,
39440x000041ad,0x0000417e,0x00050041,0x00000009, 34450x00000000,0x000400fa,0x00005922,0x00005923,
39450x00003d0a,0x00003c67,0x000059fa,0x0003003e, 34460x00005926,0x000200f8,0x00005923,0x000200f9,
39460x00003d0a,0x00005a07,0x000200f9,0x00003d0b, 34470x0000593b,0x000200f8,0x00005926,0x0004003d,
39470x000200f8,0x00003d0b,0x00050080,0x00000006, 34480x00000006,0x00005928,0x00005920,0x000500c7,
39480x00003d0d,0x000059f4,0x0000022b,0x000200f9, 34490x00000006,0x0000598a,0x00005928,0x00000241,
39490x00003cf8,0x000200f8,0x00003d0e,0x000200f9, 34500x000500ab,0x0000002f,0x0000598b,0x0000598a,
39500x00003d0f,0x000200f8,0x00003d0f,0x00050080, 34510x00000138,0x000300f7,0x00005992,0x00000000,
39510x00000006,0x00003d11,0x000059d3,0x0000022b, 34520x000400fa,0x0000598b,0x0000598c,0x0000598f,
39520x000200f9,0x00003cd9,0x000200f8,0x00003d12, 34530x000200f8,0x0000598f,0x000400c8,0x00000006,
39530x00050041,0x00000182,0x000041c0,0x00000180, 34540x00005991,0x00005928,0x000200f9,0x00005992,
39540x000002fb,0x0004003d,0x00000006,0x000041c1, 34550x000200f8,0x0000598c,0x000500c7,0x00000006,
39550x000041c0,0x000500c7,0x00000006,0x000041c2, 34560x0000598e,0x00005928,0x00000256,0x000200f9,
39560x000041c1,0x00000135,0x000500aa,0x0000002f, 34570x00005992,0x000200f8,0x00005992,0x000700f5,
39570x00003d14,0x000041c2,0x0000012b,0x000300f7, 34580x00000006,0x00005d12,0x0000598e,0x0000598c,
39580x00003d1a,0x00000000,0x000400fa,0x00003d14, 34590x00005991,0x0000598f,0x0004007c,0x00000027,
39590x00003d15,0x00003d1a,0x000200f8,0x00003d15, 34600x00005994,0x00005d12,0x00050041,0x00000009,
39600x000500c7,0x00000006,0x00003d18,0x000041c1, 34610x0000592a,0x00005905,0x00000264,0x0004003d,
39610x000000df,0x000500ab,0x0000002f,0x00003d19, 34620x00000006,0x0000592b,0x0000592a,0x000500c7,
39620x00003d18,0x0000012b,0x000200f9,0x00003d1a, 34630x00000006,0x00005999,0x0000592b,0x00000241,
39630x000200f8,0x00003d1a,0x000700f5,0x0000002f, 34640x000500ab,0x0000002f,0x0000599a,0x00005999,
39640x00003d1b,0x00003d14,0x00003d12,0x00003d19, 34650x00000138,0x000300f7,0x000059a1,0x00000000,
39650x00003d15,0x000300f7,0x00003d21,0x00000000, 34660x000400fa,0x0000599a,0x0000599b,0x0000599e,
39660x000400fa,0x00003d1b,0x00003d1c,0x00003d21, 34670x000200f8,0x0000599e,0x000400c8,0x00000006,
39670x000200f8,0x00003d1c,0x0004003d,0x000000e0, 34680x000059a0,0x0000592b,0x000200f9,0x000059a1,
39680x00003d1d,0x00003c68,0x0003003e,0x00003c82, 34690x000200f8,0x0000599b,0x000500c7,0x00000006,
39690x00003d1d,0x0004003d,0x000000e0,0x00003d1e, 34700x0000599d,0x0000592b,0x00000256,0x000200f9,
39700x00003c67,0x0003003e,0x00003c83,0x00003d1e, 34710x000059a1,0x000200f8,0x000059a1,0x000700f5,
39710x000200f9,0x000041f9,0x000200f8,0x000041f9, 34720x00000006,0x00005d13,0x0000599d,0x0000599b,
39720x000700f5,0x00000006,0x000059d4,0x0000012b, 34730x000059a0,0x0000599e,0x0004007c,0x00000027,
39730x00003d1c,0x0000423f,0x0000423d,0x000500b0, 34740x000059a3,0x00005d13,0x00050041,0x00000009,
39740x0000002f,0x000041fc,0x000059d4,0x000000df, 34750x0000592d,0x00005905,0x00000315,0x0004003d,
39750x000400f6,0x00004240,0x0000423d,0x00000000, 34760x00000006,0x0000592e,0x0000592d,0x000500c7,
39760x000400fa,0x000041fc,0x000041fd,0x00004240, 34770x00000006,0x000059a8,0x0000592e,0x00000241,
39770x000200f8,0x000041fd,0x00050041,0x0000008d, 34780x000500ab,0x0000002f,0x000059a9,0x000059a8,
39780x000041ff,0x000041c5,0x000059d4,0x0003003e, 34790x00000138,0x000300f7,0x000059b0,0x00000000,
39790x000041ff,0x00000393,0x00050041,0x0000008d, 34800x000400fa,0x000059a9,0x000059aa,0x000059ad,
39800x00004201,0x000041c6,0x000059d4,0x0003003e, 34810x000200f8,0x000059ad,0x000400c8,0x00000006,
39810x00004201,0x00000393,0x00050041,0x00000009, 34820x000059af,0x0000592e,0x000200f9,0x000059b0,
39820x00004203,0x000041c7,0x000059d4,0x0003003e, 34830x000200f8,0x000059aa,0x000500c7,0x00000006,
39830x00004203,0x0000012b,0x000200f9,0x00004204, 34840x000059ac,0x0000592e,0x00000256,0x000200f9,
39840x000200f8,0x00004204,0x000700f5,0x00000006, 34850x000059b0,0x000200f8,0x000059b0,0x000700f5,
39850x000059ec,0x0000012b,0x000041fd,0x0000420e, 34860x00000006,0x00005d14,0x000059ac,0x000059aa,
39860x00004208,0x000500b0,0x0000002f,0x00004207, 34870x000059af,0x000059ad,0x0004007c,0x00000027,
39870x000059ec,0x00000437,0x000400f6,0x0000420f, 34880x000059b2,0x00005d14,0x00060050,0x0000006c,
39880x00004208,0x00000000,0x000400fa,0x00004207, 34890x00005930,0x00005994,0x000059a3,0x000059b2,
39890x00004208,0x0000420f,0x000200f8,0x00004208, 34900x00050041,0x00000009,0x00005931,0x00005905,
39900x00060041,0x000000d8,0x0000420b,0x000041c9, 34910x0000031d,0x0004003d,0x00000006,0x00005932,
39910x000059d4,0x000059ec,0x0003003e,0x0000420b, 34920x00005931,0x000500c7,0x00000006,0x000059b7,
39920x00000b0f,0x00050080,0x00000006,0x0000420e, 34930x00005932,0x00000241,0x000500ab,0x0000002f,
39930x000059ec,0x0000022b,0x000200f9,0x00004204, 34940x000059b8,0x000059b7,0x00000138,0x000300f7,
39940x000200f8,0x0000420f,0x00050041,0x00000009, 34950x000059bf,0x00000000,0x000400fa,0x000059b8,
39950x00004211,0x00003c82,0x000059d4,0x0004003d, 34960x000059b9,0x000059bc,0x000200f8,0x000059bc,
39960x00000006,0x00004212,0x00004211,0x000500aa, 34970x000400c8,0x00000006,0x000059be,0x00005932,
39970x0000002f,0x00004213,0x00004212,0x00000500, 34980x000200f9,0x000059bf,0x000200f8,0x000059b9,
39980x000300f7,0x00004215,0x00000000,0x000400fa, 34990x000500c7,0x00000006,0x000059bb,0x00005932,
39990x00004213,0x00004214,0x00004215,0x000200f8, 35000x00000256,0x000200f9,0x000059bf,0x000200f8,
40000x00004214,0x000200f9,0x0000423d,0x000200f8, 35010x000059bf,0x000700f5,0x00000006,0x00005d15,
40010x00004215,0x0004003d,0x00000006,0x00004219, 35020x000059bb,0x000059b9,0x000059be,0x000059bc,
40020x00004211,0x00050041,0x00000182,0x00004319, 35030x0004007c,0x00000027,0x000059c1,0x00005d15,
40030x00000180,0x00000311,0x0004003d,0x00000006, 35040x00050041,0x00000009,0x00005934,0x00005905,
40040x0000431a,0x00004319,0x00050084,0x00000006, 35050x00000325,0x0004003d,0x00000006,0x00005935,
40050x0000431c,0x0000018b,0x00004219,0x00050080, 35060x00005934,0x000500c7,0x00000006,0x000059c6,
40060x00000006,0x0000431d,0x0000431a,0x0000431c, 35070x00005935,0x00000241,0x000500ab,0x0000002f,
40070x00050080,0x00000006,0x0000421b,0x0000431d, 35080x000059c7,0x000059c6,0x00000138,0x000300f7,
40080x000004e8,0x00050041,0x0000022d,0x0000421c, 35090x000059ce,0x00000000,0x000400fa,0x000059c7,
40090x00000180,0x0000015e,0x0004003d,0x00000007, 35100x000059c8,0x000059cb,0x000200f8,0x000059cb,
40100x0000421d,0x0000421c,0x00050051,0x00000006, 35110x000400c8,0x00000006,0x000059cd,0x00005935,
40110x00004334,0x0000421d,0x00000000,0x00050095, 35120x000200f9,0x000059ce,0x000200f8,0x000059c8,
40120x00000130,0x00004336,0x00004334,0x0000421b, 35130x000500c7,0x00000006,0x000059ca,0x00005935,
40130x00050051,0x00000006,0x00004337,0x00004336, 35140x00000256,0x000200f9,0x000059ce,0x000200f8,
40140x00000001,0x00050051,0x00000006,0x00004338, 35150x000059ce,0x000700f5,0x00000006,0x00005d16,
40150x00004336,0x00000000,0x00050051,0x00000006, 35160x000059ca,0x000059c8,0x000059cd,0x000059cb,
40160x0000433b,0x0000421d,0x00000001,0x00050080, 35170x0004007c,0x00000027,0x000059d0,0x00005d16,
40170x00000006,0x0000433d,0x0000433b,0x00004337, 35180x00050041,0x00000009,0x00005937,0x00005905,
40180x00050050,0x00000007,0x0000433e,0x00004338, 35190x0000032d,0x0004003d,0x00000006,0x00005938,
40190x0000433d,0x0004007c,0x00000014,0x0000432e, 35200x00005937,0x000500c7,0x00000006,0x000059d5,
40200x0000433e,0x00060041,0x0000015f,0x00004325, 35210x00005938,0x00000241,0x000500ab,0x0000002f,
40210x0000432e,0x0000015e,0x0000015e,0x0006003d, 35220x000059d6,0x000059d5,0x00000138,0x000300f7,
40220x00000006,0x00004326,0x00004325,0x00000002, 35230x000059dd,0x00000000,0x000400fa,0x000059d6,
40230x00000004,0x0003003e,0x00004203,0x00004326, 35240x000059d7,0x000059da,0x000200f8,0x000059da,
40240x000200f9,0x00004220,0x000200f8,0x00004220, 35250x000400c8,0x00000006,0x000059dc,0x00005938,
40250x000700f5,0x00000006,0x000059ee,0x0000012b, 35260x000200f9,0x000059dd,0x000200f8,0x000059d7,
40260x00004215,0x0000422f,0x00004224,0x000500b0, 35270x000500c7,0x00000006,0x000059d9,0x00005938,
40270x0000002f,0x00004223,0x000059ee,0x00000437, 35280x00000256,0x000200f9,0x000059dd,0x000200f8,
40280x000400f6,0x00004230,0x00004224,0x00000000, 35290x000059dd,0x000700f5,0x00000006,0x00005d17,
40290x000400fa,0x00004223,0x00004224,0x00004230, 35300x000059d9,0x000059d7,0x000059dc,0x000059da,
40300x000200f8,0x00004224,0x0004003d,0x00000006, 35310x0004007c,0x00000027,0x000059df,0x00005d17,
40310x00004229,0x00004211,0x00050084,0x00000006, 35320x00060050,0x0000006c,0x0000593a,0x000059c1,
40320x00004362,0x0000018b,0x00004229,0x00050080, 35330x000059d0,0x000059df,0x000200f9,0x0000593b,
40330x00000006,0x00004363,0x0000431a,0x00004362, 35340x000200f8,0x0000593b,0x000700f5,0x0000006c,
40340x00050084,0x00000006,0x0000434c,0x0000019b, 35350x00005d1c,0x000060fe,0x00005923,0x0000593a,
40350x000059ee,0x00050080,0x00000006,0x0000434d, 35360x000059dd,0x000700f5,0x0000006c,0x00005d18,
40360x00004363,0x0000434c,0x00050095,0x00000130, 35370x00000576,0x00005923,0x00005930,0x000059dd,
40370x0000437c,0x00004334,0x0000434d,0x00050051, 35380x00050082,0x00000006,0x000059ec,0x0000541e,
40380x00000006,0x0000437d,0x0000437c,0x00000001, 35390x000053c9,0x00050084,0x00000006,0x000059ed,
40390x00050051,0x00000006,0x0000437e,0x0000437c, 35400x000000ec,0x000059ec,0x00050080,0x00000006,
40400x00000000,0x00050080,0x00000006,0x00004383, 35410x000059ee,0x000053c4,0x000059ed,0x00050095,
40410x0000433b,0x0000437d,0x00050050,0x00000007, 35420x0000013d,0x00005a0e,0x000053ea,0x000059ee,
40420x00004384,0x0000437e,0x00004383,0x0004007c, 35430x00050051,0x00000006,0x00005a0f,0x00005a0e,
40430x00000014,0x00004374,0x00004384,0x00060041, 35440x00000001,0x00050051,0x00000006,0x00005a10,
40440x0000015f,0x0000436b,0x00004374,0x0000015e, 35450x00005a0e,0x00000000,0x00050080,0x00000006,
40450x0000015e,0x0006003d,0x00000006,0x0000436c, 35460x00005a15,0x000053f1,0x00005a0f,0x00050050,
40460x0000436b,0x00000002,0x00000004,0x00050080, 35470x00000007,0x00005a16,0x00005a10,0x00005a15,
40470x00000006,0x00004353,0x0000434d,0x000000df, 35480x0004007c,0x00000014,0x00005a06,0x00005a16,
40480x00050095,0x00000130,0x0000439d,0x00004334, 35490x00060041,0x0000016c,0x000059fd,0x00005a06,
40490x00004353,0x00050051,0x00000006,0x0000439e, 35500x0000016b,0x0000016b,0x0006003d,0x00000006,
40500x0000439d,0x00000001,0x00050051,0x00000006, 35510x000059fe,0x000059fd,0x00000002,0x00000004,
40510x0000439f,0x0000439d,0x00000000,0x00050080, 35520x000200f9,0x0000519d,0x000200f8,0x0000519d,
40520x00000006,0x000043a4,0x0000433b,0x0000439e, 35530x00050080,0x00000006,0x0000519f,0x00005ced,
40530x00050050,0x00000007,0x000043a5,0x0000439f, 35540x00000264,0x000200f9,0x00005132,0x000200f8,
40540x000043a4,0x0004007c,0x00000014,0x00004395, 35550x000051a0,0x000700f5,0x0000002f,0x00005d40,
40550x000043a5,0x00060041,0x0000015f,0x0000438c, 35560x000003cc,0x00005132,0x000003e7,0x00005194,
40560x00004395,0x0000015e,0x0000015e,0x0006003d, 35570x000300f7,0x000051a2,0x00000000,0x000400fa,
40570x00000006,0x0000438d,0x0000438c,0x00000002, 35580x00005d40,0x000051a3,0x000051a2,0x000200f8,
40580x00000004,0x00050080,0x00000006,0x00004358, 35590x000051a2,0x000200f9,0x000051a3,0x000200f8,
40590x0000434d,0x00000194,0x00050095,0x00000130, 35600x000051a3,0x000200f9,0x000013ed,0x000200f8,
40600x000043be,0x00004334,0x00004358,0x00050051, 35610x000013ed,0x000200f9,0x000013e3,0x000200f8,
40610x00000006,0x000043bf,0x000043be,0x00000001, 35620x000013e2,0x000300f7,0x00004119,0x00000000,
40620x00050051,0x00000006,0x000043c0,0x000043be, 35630x000300fb,0x00000138,0x0000402b,0x000200f8,
40630x00000000,0x00050080,0x00000006,0x000043c5, 35640x0000402b,0x0003003e,0x00003ff3,0x00000fd5,
40640x0000433b,0x000043bf,0x00050050,0x00000007, 35650x0003003e,0x00003ff4,0x00000fd5,0x00050041,
40650x000043c6,0x000043c0,0x000043c5,0x0004007c, 35660x000001bb,0x0000402c,0x000001b9,0x000001f0,
40660x00000014,0x000043b6,0x000043c6,0x00060041, 35670x0004003d,0x00000006,0x0000402d,0x0000402c,
40670x0000015f,0x000043ad,0x000043b6,0x0000015e, 35680x000500b2,0x0000002f,0x0000402e,0x0000402d,
40680x0000015e,0x0006003d,0x00000006,0x000043ae, 35690x00000142,0x000300f7,0x000040ae,0x00000000,
40690x000043ad,0x00000002,0x00000004,0x00060050, 35700x000400fa,0x0000402e,0x0000402f,0x0000403e,
40700x000000d2,0x0000435c,0x0000436c,0x0000438d, 35710x000200f8,0x0000403e,0x00050041,0x000001bb,
40710x000043ae,0x00060041,0x000000d8,0x0000422c, 35720x0000418c,0x000001b9,0x000001ba,0x0004003d,
40720x000041c9,0x000059d4,0x000059ee,0x0003003e, 35730x00000006,0x0000418d,0x0000418c,0x00050084,
40730x0000422c,0x0000435c,0x00050080,0x00000006, 35740x00000006,0x0000418e,0x000001db,0x0000418d,
40740x0000422f,0x000059ee,0x0000022b,0x000200f9, 35750x00050080,0x00000006,0x0000418f,0x000001c4,
40750x00004220,0x000200f8,0x00004230,0x0004003d, 35760x0000418e,0x00050080,0x00000006,0x00004195,
40760x00000006,0x00004233,0x00004211,0x00050084, 35770x0000418d,0x0000062f,0x00050086,0x00000006,
40770x00000006,0x000043d7,0x000001b6,0x00004233, 35780x00004196,0x00004195,0x000001be,0x00050084,
40780x00050080,0x00000006,0x000043d8,0x00003df7, 35790x00000006,0x00004188,0x000001c4,0x00004196,
40790x000043d7,0x00050095,0x00000130,0x00004436, 35800x00050080,0x00000006,0x00004189,0x0000418f,
40800x00003e4f,0x000043d8,0x00050051,0x00000006, 35810x00004188,0x00050080,0x00000006,0x00004183,
40810x00004437,0x00004436,0x00000001,0x00050051, 35820x00004189,0x00004188,0x00050084,0x00000006,
40820x00000006,0x00004438,0x00004436,0x00000000, 35830x0000417c,0x000001ef,0x0000402d,0x00050080,
40830x00050080,0x00000006,0x0000443d,0x00003e56, 35840x00000006,0x0000417d,0x00004183,0x0000417c,
40840x00004437,0x00050050,0x00000007,0x0000443e, 35850x00050041,0x000001bb,0x00004173,0x000001b9,
40850x00004438,0x0000443d,0x0004007c,0x00000014, 35860x00000206,0x0004003d,0x00000006,0x00004174,
40860x0000442e,0x0000443e,0x00060041,0x0000015f, 35870x00004173,0x00050084,0x00000006,0x00004175,
40870x00004425,0x0000442e,0x0000015e,0x0000015e, 35880x00000205,0x00004174,0x00050080,0x00000006,
40880x0006003d,0x00000006,0x00004426,0x00004425, 35890x00004176,0x0000417d,0x00004175,0x000500ac,
40890x00000002,0x00000004,0x0004007c,0x00000027, 35900x0000002f,0x000041a3,0x0000402d,0x00000142,
40900x000043dd,0x00004426,0x00050080,0x00000006, 35910x000300f7,0x000041a9,0x00000000,0x000400fa,
40910x000043df,0x000043d8,0x000000df,0x00050095, 35920x000041a3,0x000041a4,0x000041a8,0x000200f8,
40920x00000130,0x00004457,0x00003e4f,0x000043df, 35930x000041a8,0x000200f9,0x000041a9,0x000200f8,
40930x00050051,0x00000006,0x00004458,0x00004457, 35940x000041a4,0x00050082,0x00000006,0x000041a7,
40940x00000001,0x00050051,0x00000006,0x00004459, 35950x0000402d,0x00000142,0x000200f9,0x000041a9,
40950x00004457,0x00000000,0x00050080,0x00000006, 35960x000200f8,0x000041a9,0x000700f5,0x00000006,
40960x0000445e,0x00003e56,0x00004458,0x00050050, 35970x00005d93,0x000041a7,0x000041a4,0x00000138,
40970x00000007,0x0000445f,0x00004459,0x0000445e, 35980x000041a8,0x00050084,0x00000006,0x0000416e,
40980x0004007c,0x00000014,0x0000444f,0x0000445f, 35990x000000ec,0x00005d93,0x00050080,0x00000006,
40990x00060041,0x0000015f,0x00004446,0x0000444f, 36000x0000416f,0x00004176,0x0000416e,0x000300f7,
41000x0000015e,0x0000015e,0x0006003d,0x00000006, 36010x000041b6,0x00000000,0x000400fa,0x000041a3,
41010x00004447,0x00004446,0x00000002,0x00000004, 36020x000041b1,0x000041b5,0x000200f8,0x000041b5,
41020x0004007c,0x00000027,0x000043e3,0x00004447, 36030x000200f9,0x000041b6,0x000200f8,0x000041b1,
41030x00050080,0x00000006,0x000043e5,0x000043d8, 36040x00050082,0x00000006,0x000041b4,0x0000402d,
41040x00000194,0x00050095,0x00000130,0x00004478, 36050x00000142,0x000200f9,0x000041b6,0x000200f8,
41050x00003e4f,0x000043e5,0x00050051,0x00000006, 36060x000041b6,0x000700f5,0x00000006,0x00005d94,
41060x00004479,0x00004478,0x00000001,0x00050051, 36070x000041b4,0x000041b1,0x00000138,0x000041b5,
41070x00000006,0x0000447a,0x00004478,0x00000000, 36080x00050084,0x00000006,0x00004168,0x000000ec,
41080x00050080,0x00000006,0x0000447f,0x00003e56, 36090x00005d94,0x00050080,0x00000006,0x00004169,
41090x00004479,0x00050050,0x00000007,0x00004480, 36100x0000416f,0x00004168,0x000300f7,0x000041c3,
41100x0000447a,0x0000447f,0x0004007c,0x00000014, 36110x00000000,0x000400fa,0x000041a3,0x000041be,
41110x00004470,0x00004480,0x00060041,0x0000015f, 36120x000041c2,0x000200f8,0x000041c2,0x000200f9,
41120x00004467,0x00004470,0x0000015e,0x0000015e, 36130x000041c3,0x000200f8,0x000041be,0x00050082,
41130x0006003d,0x00000006,0x00004468,0x00004467, 36140x00000006,0x000041c1,0x0000402d,0x00000142,
41140x00000002,0x00000004,0x0004007c,0x00000027, 36150x000200f9,0x000041c3,0x000200f8,0x000041c3,
41150x000043e9,0x00004468,0x00050080,0x00000006, 36160x000700f5,0x00000006,0x00005d95,0x000041c1,
41160x000043ec,0x000043d8,0x0000019b,0x00050095, 36170x000041be,0x00000138,0x000041c2,0x00050084,
41170x00000130,0x00004499,0x00003e4f,0x000043ec, 36180x00000006,0x00004162,0x000000ec,0x00005d95,
41180x00050051,0x00000006,0x0000449a,0x00004499, 36190x00050080,0x00000006,0x00004163,0x00004169,
41190x00000001,0x00050051,0x00000006,0x0000449b, 36200x00004162,0x00050084,0x00000006,0x00004041,
41200x00004499,0x00000000,0x00050080,0x00000006, 36210x000000ec,0x000012dd,0x00050080,0x00000006,
41210x000044a0,0x00003e56,0x0000449a,0x00050050, 36220x00004042,0x00004163,0x00004041,0x00050041,
41220x00000007,0x000044a1,0x0000449b,0x000044a0, 36230x00000266,0x00004043,0x000001b9,0x00000264,
41230x0004007c,0x00000014,0x00004491,0x000044a1, 36240x0004003d,0x00000007,0x00004044,0x00004043,
41240x00060041,0x0000015f,0x00004488,0x00004491, 36250x00050051,0x00000006,0x000041db,0x00004044,
41250x0000015e,0x0000015e,0x0006003d,0x00000006, 36260x00000000,0x00050095,0x0000013d,0x000041dd,
41260x00004489,0x00004488,0x00000002,0x00000004, 36270x000041db,0x00004042,0x00050051,0x00000006,
41270x0004007c,0x00000027,0x000043f0,0x00004489, 36280x000041de,0x000041dd,0x00000001,0x00050051,
41280x00050080,0x00000006,0x000043f2,0x000043d8, 36290x00000006,0x000041df,0x000041dd,0x00000000,
41290x000001a2,0x00050095,0x00000130,0x000044ba, 36300x00050051,0x00000006,0x000041e2,0x00004044,
41300x00003e4f,0x000043f2,0x00050051,0x00000006, 36310x00000001,0x00050080,0x00000006,0x000041e4,
41310x000044bb,0x000044ba,0x00000001,0x00050051, 36320x000041e2,0x000041de,0x00050050,0x00000007,
41320x00000006,0x000044bc,0x000044ba,0x00000000, 36330x000041e5,0x000041df,0x000041e4,0x0004007c,
41330x00050080,0x00000006,0x000044c1,0x00003e56, 36340x00000014,0x000041d5,0x000041e5,0x00060041,
41340x000044bb,0x00050050,0x00000007,0x000044c2, 36350x0000016c,0x000041cc,0x000041d5,0x0000016b,
41350x000044bc,0x000044c1,0x0004007c,0x00000014, 36360x0000016b,0x0006003d,0x00000006,0x000041cd,
41360x000044b2,0x000044c2,0x00060041,0x0000015f, 36370x000041cc,0x00000002,0x00000004,0x000500aa,
41370x000044a9,0x000044b2,0x0000015e,0x0000015e, 36380x0000002f,0x00004046,0x000041cd,0x00000138,
41380x0006003d,0x00000006,0x000044aa,0x000044a9, 36390x000300f7,0x00004048,0x00000000,0x000400fa,
41390x00000002,0x00000004,0x0004007c,0x00000027, 36400x00004046,0x00004047,0x00004048,0x000200f8,
41400x000043f6,0x000044aa,0x00050080,0x00000006, 36410x00004047,0x000200f9,0x00004119,0x000200f8,
41410x000043f8,0x000043d8,0x00000260,0x00050095, 36420x00004048,0x000300f7,0x00004237,0x00000000,
41420x00000130,0x000044db,0x00003e4f,0x000043f8, 36430x000400fa,0x000041a3,0x00004232,0x00004236,
41430x00050051,0x00000006,0x000044dc,0x000044db, 36440x000200f8,0x00004236,0x000200f9,0x00004237,
41440x00000001,0x00050051,0x00000006,0x000044dd, 36450x000200f8,0x00004232,0x00050082,0x00000006,
41450x000044db,0x00000000,0x00050080,0x00000006, 36460x00004235,0x0000402d,0x00000142,0x000200f9,
41460x000044e2,0x00003e56,0x000044dc,0x00050050, 36470x00004237,0x000200f8,0x00004237,0x000700f5,
41470x00000007,0x000044e3,0x000044dd,0x000044e2, 36480x00000006,0x00005d96,0x00004235,0x00004232,
41480x0004007c,0x00000014,0x000044d3,0x000044e3, 36490x00000138,0x00004236,0x00050084,0x00000006,
41490x00060041,0x0000015f,0x000044ca,0x000044d3, 36500x000041fc,0x000000ec,0x00005d96,0x00050080,
41500x0000015e,0x0000015e,0x0006003d,0x00000006, 36510x00000006,0x000041fd,0x00004176,0x000041fc,
41510x000044cb,0x000044ca,0x00000002,0x00000004, 36520x000300f7,0x00004244,0x00000000,0x000400fa,
41520x0004007c,0x00000027,0x000043fc,0x000044cb, 36530x000041a3,0x0000423f,0x00004243,0x000200f8,
41530x000500bc,0x0000002f,0x000044ea,0x000043dd, 36540x00004243,0x000200f9,0x00004244,0x000200f8,
41540x000043f0,0x000300f7,0x000044f1,0x00000000, 36550x0000423f,0x00050082,0x00000006,0x00004242,
41550x000400fa,0x000044ea,0x000044eb,0x000044f1, 36560x0000402d,0x00000142,0x000200f9,0x00004244,
41560x000200f8,0x000044eb,0x000500bc,0x0000002f, 36570x000200f8,0x00004244,0x000700f5,0x00000006,
41570x000044f0,0x000043e3,0x000043f6,0x000200f9, 36580x00005d97,0x00004242,0x0000423f,0x00000138,
41580x000044f1,0x000200f8,0x000044f1,0x000700f5, 36590x00004243,0x00050084,0x00000006,0x000041f6,
41590x0000002f,0x000044f2,0x000044ea,0x00004230, 36600x000000ec,0x00005d97,0x00050080,0x00000006,
41600x000044f0,0x000044eb,0x000300f7,0x000044f9, 36610x000041f7,0x000041fd,0x000041f6,0x000300f7,
41610x00000000,0x000400fa,0x000044f2,0x000044f3, 36620x00004251,0x00000000,0x000400fa,0x000041a3,
41620x000044f9,0x000200f8,0x000044f3,0x000500bc, 36630x0000424c,0x00004250,0x000200f8,0x00004250,
41630x0000002f,0x000044f8,0x000043e9,0x000043fc, 36640x000200f9,0x00004251,0x000200f8,0x0000424c,
41640x000200f9,0x000044f9,0x000200f8,0x000044f9, 36650x00050082,0x00000006,0x0000424f,0x0000402d,
41650x000700f5,0x0000002f,0x000044fa,0x000044f2, 36660x00000142,0x000200f9,0x00004251,0x000200f8,
41660x000044f1,0x000044f8,0x000044f3,0x0003003e, 36670x00004251,0x000700f5,0x00000006,0x00005d98,
41670x000041ff,0x000044fa,0x000200f9,0x0000423d, 36680x0000424f,0x0000424c,0x00000138,0x00004250,
41680x000200f8,0x0000423d,0x00050080,0x00000006, 36690x00050084,0x00000006,0x000041f0,0x000000ec,
41690x0000423f,0x000059d4,0x0000022b,0x000200f9, 36700x00005d98,0x00050080,0x00000006,0x000041f1,
41700x000041f9,0x000200f8,0x00004240,0x000200f9, 36710x000041f7,0x000041f0,0x000300f7,0x0000425e,
41710x00004241,0x000200f8,0x00004241,0x000700f5, 36720x00000000,0x000400fa,0x000041a3,0x00004259,
41720x00000006,0x000059d5,0x0000012b,0x00004240, 36730x0000425d,0x000200f8,0x0000425d,0x000200f9,
41730x00004315,0x00004313,0x000500b0,0x0000002f, 36740x0000425e,0x000200f8,0x00004259,0x00050082,
41740x00004244,0x000059d5,0x000000df,0x000400f6, 36750x00000006,0x0000425c,0x0000402d,0x00000142,
41750x00004316,0x00004313,0x00000000,0x000400fa, 36760x000200f9,0x0000425e,0x000200f8,0x0000425e,
41760x00004244,0x00004245,0x00004316,0x000200f8, 36770x000700f5,0x00000006,0x00005d99,0x0000425c,
41770x00004245,0x00050041,0x0000008d,0x00004247, 36780x00004259,0x00000138,0x0000425d,0x00050084,
41780x000041c6,0x000059d5,0x0004003d,0x0000002f, 36790x00000006,0x000041ea,0x000000ec,0x00005d99,
41790x00004248,0x00004247,0x000400a8,0x0000002f, 36800x00050080,0x00000006,0x000041eb,0x000041f1,
41800x00004249,0x00004248,0x000300f7,0x0000424f, 36810x000041ea,0x00050080,0x00000006,0x0000404c,
41810x00000000,0x000400fa,0x00004249,0x0000424a, 36820x000041eb,0x00004041,0x00050095,0x0000013d,
41820x0000424f,0x000200f8,0x0000424a,0x00050041, 36830x00004278,0x000041db,0x0000404c,0x00050051,
41830x0000008d,0x0000424c,0x000041c5,0x000059d5, 36840x00000006,0x00004279,0x00004278,0x00000001,
41840x0004003d,0x0000002f,0x0000424d,0x0000424c, 36850x00050051,0x00000006,0x0000427a,0x00004278,
41850x000400a8,0x0000002f,0x0000424e,0x0000424d, 36860x00000000,0x00050080,0x00000006,0x0000427f,
41860x000200f9,0x0000424f,0x000200f8,0x0000424f, 36870x000041e2,0x00004279,0x00050050,0x00000007,
41870x000700f5,0x0000002f,0x00004250,0x00004248, 36880x00004280,0x0000427a,0x0000427f,0x0004007c,
41880x00004245,0x0000424e,0x0000424a,0x000300f7, 36890x00000014,0x00004270,0x00004280,0x00060041,
41890x00004252,0x00000000,0x000400fa,0x00004250, 36900x0000016c,0x00004267,0x00004270,0x0000016b,
41900x00004251,0x00004252,0x000200f8,0x00004251, 36910x0000016b,0x0006003d,0x00000006,0x00004268,
41910x000200f9,0x00004313,0x000200f8,0x00004252, 36920x00004267,0x00000002,0x00000004,0x000500ae,
41920x0003003e,0x00004247,0x000003ae,0x00050080, 36930x0000002f,0x00004053,0x00004268,0x00004174,
41930x00000006,0x00004256,0x000059d5,0x00000135, 36940x000300f7,0x00004055,0x00000000,0x000400fa,
41940x000200f9,0x00004257,0x000200f8,0x00004257, 36950x00004053,0x00004054,0x00004055,0x000200f8,
41950x000700f5,0x00000006,0x000059d7,0x00004256, 36960x00004054,0x000200f9,0x00004119,0x000200f8,
41960x00004252,0x00004311,0x0000430f,0x000500b0, 36970x00004055,0x00050080,0x00000006,0x00004059,
41970x0000002f,0x0000425a,0x000059d7,0x000000df, 36980x00004176,0x00004041,0x00050095,0x0000013d,
41980x000400f6,0x00004312,0x0000430f,0x00000000, 36990x000042c7,0x000041db,0x00004059,0x00050051,
41990x000400fa,0x0000425a,0x0000425b,0x00004312, 37000x00000006,0x000042c8,0x000042c7,0x00000001,
42000x000200f8,0x0000425b,0x00050041,0x0000008d, 37010x00050051,0x00000006,0x000042c9,0x000042c7,
42010x0000425d,0x000041c6,0x000059d7,0x0004003d, 37020x00000000,0x00050080,0x00000006,0x000042ce,
42020x0000002f,0x0000425e,0x0000425d,0x000400a8, 37030x000041e2,0x000042c8,0x00050050,0x00000007,
42030x0000002f,0x0000425f,0x0000425e,0x000300f7, 37040x000042cf,0x000042c9,0x000042ce,0x0004007c,
42040x00004265,0x00000000,0x000400fa,0x0000425f, 37050x00000014,0x000042bf,0x000042cf,0x00060041,
42050x00004260,0x00004265,0x000200f8,0x00004260, 37060x0000016c,0x000042b6,0x000042bf,0x0000016b,
42060x00050041,0x0000008d,0x00004262,0x000041c5, 37070x0000016b,0x0006003d,0x00000006,0x000042b7,
42070x000059d7,0x0004003d,0x0000002f,0x00004263, 37080x000042b6,0x00000002,0x00000004,0x000300f7,
42080x00004262,0x000400a8,0x0000002f,0x00004264, 37090x0000430f,0x00000000,0x000400fa,0x000041a3,
42090x00004263,0x000200f9,0x00004265,0x000200f8, 37100x0000430a,0x0000430e,0x000200f8,0x0000430e,
42100x00004265,0x000700f5,0x0000002f,0x00004266, 37110x000200f9,0x0000430f,0x000200f8,0x0000430a,
42110x0000425e,0x0000425b,0x00004264,0x00004260, 37120x00050082,0x00000006,0x0000430d,0x0000402d,
42120x000400a8,0x0000002f,0x00004267,0x00004266, 37130x00000142,0x000200f9,0x0000430f,0x000200f8,
42130x000300f7,0x00004270,0x00000000,0x000400fa, 37140x0000430f,0x000700f5,0x00000006,0x00005d9a,
42140x00004267,0x00004268,0x00004270,0x000200f8, 37150x0000430d,0x0000430a,0x00000138,0x0000430e,
42150x00004268,0x00050041,0x00000009,0x0000426a, 37160x00050084,0x00000006,0x000042d4,0x000000ec,
42160x000041c7,0x000059d7,0x0004003d,0x00000006, 37170x00005d9a,0x00050080,0x00000006,0x000042d5,
42170x0000426b,0x0000426a,0x00050041,0x00000009, 37180x00004176,0x000042d4,0x00050080,0x00000006,
42180x0000426d,0x000041c7,0x000059d5,0x0004003d, 37190x00004060,0x000042d5,0x00004041,0x00050095,
42190x00000006,0x0000426e,0x0000426d,0x000500ab, 37200x0000013d,0x00004329,0x000041db,0x00004060,
42200x0000002f,0x0000426f,0x0000426b,0x0000426e, 37210x00050051,0x00000006,0x0000432a,0x00004329,
42210x000200f9,0x00004270,0x000200f8,0x00004270, 37220x00000001,0x00050051,0x00000006,0x0000432b,
42220x000700f5,0x0000002f,0x00004271,0x00004266, 37230x00004329,0x00000000,0x00050080,0x00000006,
42230x00004265,0x0000426f,0x00004268,0x000300f7, 37240x00004330,0x000041e2,0x0000432a,0x00050050,
42240x00004273,0x00000000,0x000400fa,0x00004271, 37250x00000007,0x00004331,0x0000432b,0x00004330,
42250x00004272,0x00004273,0x000200f8,0x00004272, 37260x0004007c,0x00000014,0x00004321,0x00004331,
42260x000200f9,0x0000430f,0x000200f8,0x00004273, 37270x00060041,0x0000016c,0x00004318,0x00004321,
42270x000200f9,0x00004274,0x000200f8,0x00004274, 37280x0000016b,0x0000016b,0x0006003d,0x00000006,
42280x000700f5,0x00000006,0x000059e1,0x00000437, 37290x00004319,0x00004318,0x00000002,0x00000004,
42290x00004273,0x00005c6e,0x000042ac,0x000700f5, 37300x00050050,0x0000100d,0x00004064,0x000042b7,
42300x00000006,0x000059dc,0x00000437,0x00004273, 37310x00004319,0x0003003e,0x00003ffe,0x00004064,
42310x00005c63,0x000042ac,0x000700f5,0x00000006, 37320x000200f9,0x00004065,0x000200f8,0x00004065,
42320x000059db,0x0000012b,0x00004273,0x000042ae, 37330x000700f5,0x00000006,0x00005d9b,0x00000138,
42330x000042ac,0x000500b0,0x0000002f,0x00004277, 37340x0000430f,0x0000409d,0x0000409b,0x000700f5,
42340x000059db,0x00000437,0x000500aa,0x0000002f, 37350x00000006,0x00005dc4,0x00000138,0x0000430f,
42350x00004279,0x000059dc,0x00000437,0x000500a7, 37360x00005dc2,0x0000409b,0x000500b0,0x0000002f,
42360x0000002f,0x0000427a,0x00004277,0x00004279, 37370x00004068,0x00005d9b,0x00000280,0x000400f6,
42370x000400f6,0x000042af,0x000042ac,0x00000000, 37380x0000409e,0x0000409b,0x00000000,0x000400fa,
42380x000400fa,0x0000427a,0x0000427b,0x000042af, 37390x00004068,0x00004069,0x0000409e,0x000200f8,
42390x000200f8,0x0000427b,0x00060041,0x000000d8, 37400x00004069,0x00050041,0x00000009,0x0000406b,
42400x0000427e,0x000041c9,0x000059d5,0x000059db, 37410x00003ffe,0x00005d9b,0x0004003d,0x00000006,
42410x0004003d,0x000000d2,0x0000427f,0x0000427e, 37420x0000406c,0x0000406b,0x00050050,0x0000100d,
42420x00050080,0x00000006,0x00004282,0x000059db, 37430x0000406e,0x0000406c,0x0000406c,0x0003003e,
42430x00000135,0x00050089,0x00000006,0x00004283, 37440x00004005,0x0000406e,0x000500c7,0x00000006,
42440x00004282,0x00000437,0x00060041,0x000000d8, 37450x00004070,0x0000406c,0x00000241,0x000500aa,
42450x00004284,0x000041c9,0x000059d5,0x00004283, 37460x0000002f,0x00004071,0x00004070,0x00000138,
42460x0004003d,0x000000d2,0x00004285,0x00004284, 37470x000300f7,0x00004083,0x00000000,0x000400fa,
42470x000500aa,0x00000514,0x00004288,0x0000427f, 37480x00004071,0x00004072,0x00004083,0x000200f8,
42480x00004285,0x0004009b,0x0000002f,0x00004289, 37490x00004072,0x00050084,0x00000006,0x00004075,
42490x00004288,0x000300f7,0x0000428b,0x00000000, 37500x000000ec,0x0000406c,0x00050080,0x00000006,
42500x000400fa,0x00004289,0x0000428a,0x0000428b, 37510x00004076,0x00004176,0x00004075,0x00050095,
42510x000200f8,0x0000428a,0x000200f9,0x000042ac, 37520x0000013d,0x00004378,0x000041db,0x00004076,
42520x000200f8,0x0000428b,0x000200f9,0x0000428c, 37530x00050051,0x00000006,0x00004379,0x00004378,
42530x000200f8,0x0000428c,0x000700f5,0x00000006, 37540x00000001,0x00050051,0x00000006,0x0000437a,
42540x000059e2,0x0000012b,0x0000428b,0x000042aa, 37550x00004378,0x00000000,0x00050080,0x00000006,
42550x000042a8,0x000500b0,0x0000002f,0x0000428f, 37560x0000437f,0x000041e2,0x00004379,0x00050050,
42560x000059e2,0x00000437,0x000400f6,0x000042ab, 37570x00000007,0x00004380,0x0000437a,0x0000437f,
42570x000042a8,0x00000000,0x000400fa,0x0000428f, 37580x0004007c,0x00000014,0x00004370,0x00004380,
42580x00004290,0x000042ab,0x000200f8,0x00004290, 37590x00060041,0x0000016c,0x00004367,0x00004370,
42590x00060041,0x000000d8,0x00004293,0x000041c9, 37600x0000016b,0x0000016b,0x0006003d,0x00000006,
42600x000059d7,0x000059e2,0x0004003d,0x000000d2, 37610x00004368,0x00004367,0x00000002,0x00000004,
42610x00004294,0x00004293,0x000500aa,0x00000514, 37620x00050041,0x00000009,0x0000407a,0x00004005,
42620x00004296,0x00004294,0x00004285,0x0004009b, 37630x0000016b,0x0003003e,0x0000407a,0x00004368,
42630x0000002f,0x00004297,0x00004296,0x000300f7, 37640x000300f7,0x000043c0,0x00000000,0x000400fa,
42640x000042a2,0x00000000,0x000400fa,0x00004297, 37650x000041a3,0x000043bb,0x000043bf,0x000200f8,
42650x00004298,0x000042a2,0x000200f8,0x00004298, 37660x000043bf,0x000200f9,0x000043c0,0x000200f8,
42660x00050080,0x00000006,0x0000429b,0x000059e2, 37670x000043bb,0x00050082,0x00000006,0x000043be,
42670x00000135,0x00050089,0x00000006,0x0000429c, 37680x0000402d,0x00000142,0x000200f9,0x000043c0,
42680x0000429b,0x00000437,0x00060041,0x000000d8, 37690x000200f8,0x000043c0,0x000700f5,0x00000006,
42690x0000429d,0x000041c9,0x000059d7,0x0000429c, 37700x00005dbb,0x000043be,0x000043bb,0x00000138,
42700x0004003d,0x000000d2,0x0000429e,0x0000429d, 37710x000043bf,0x00050084,0x00000006,0x00004385,
42710x000500aa,0x00000514,0x000042a0,0x0000429e, 37720x000000ec,0x00005dbb,0x00050080,0x00000006,
42720x0000427f,0x0004009b,0x0000002f,0x000042a1, 37730x00004386,0x00004176,0x00004385,0x00050080,
42730x000042a0,0x000200f9,0x000042a2,0x000200f8, 37740x00000006,0x0000407e,0x00004386,0x00004075,
42740x000042a2,0x000700f5,0x0000002f,0x000042a3, 37750x00050095,0x0000013d,0x000043da,0x000041db,
42750x00004297,0x00004290,0x000042a1,0x00004298, 37760x0000407e,0x00050051,0x00000006,0x000043db,
42760x000300f7,0x000042a7,0x00000000,0x000400fa, 37770x000043da,0x00000001,0x00050051,0x00000006,
42770x000042a3,0x000042a4,0x000042a7,0x000200f8, 37780x000043dc,0x000043da,0x00000000,0x00050080,
42780x000042a4,0x000200f9,0x000042ab,0x000200f8, 37790x00000006,0x000043e1,0x000041e2,0x000043db,
42790x000042a7,0x000200f9,0x000042a8,0x000200f8, 37800x00050050,0x00000007,0x000043e2,0x000043dc,
42800x000042a8,0x00050080,0x00000006,0x000042aa, 37810x000043e1,0x0004007c,0x00000014,0x000043d2,
42810x000059e2,0x0000022b,0x000200f9,0x0000428c, 37820x000043e2,0x00060041,0x0000016c,0x000043c9,
42820x000200f8,0x000042ab,0x000700f5,0x00000006, 37830x000043d2,0x0000016b,0x0000016b,0x0006003d,
42830x00005c6f,0x000059e1,0x0000428c,0x000059e2, 37840x00000006,0x000043ca,0x000043c9,0x00000002,
42840x000042a4,0x000700f5,0x00000006,0x00005c64, 37850x00000004,0x00050041,0x00000009,0x00004082,
42850x000059dc,0x0000428c,0x000059db,0x000042a4, 37860x00004005,0x00000264,0x0003003e,0x00004082,
42860x000200f9,0x000042ac,0x000200f8,0x000042ac, 37870x000043ca,0x000200f9,0x00004083,0x000200f8,
42870x000700f5,0x00000006,0x00005c6e,0x000059e1, 37880x00004083,0x000600a9,0x00000006,0x00006116,
42880x0000428a,0x00005c6f,0x000042ab,0x000700f5, 37890x00004071,0x00000280,0x00000142,0x000200f9,
42890x00000006,0x00005c63,0x000059dc,0x0000428a, 37900x00004084,0x000200f8,0x00004084,0x000700f5,
42900x00005c64,0x000042ab,0x00050080,0x00000006, 37910x00000006,0x00005dc2,0x00005dc4,0x00004083,
42910x000042ae,0x000059db,0x0000022b,0x000200f9, 37920x00004091,0x00004097,0x000700f5,0x00000006,
42920x00004274,0x000200f8,0x000042af,0x000300f7, 37930x00005dbc,0x00000138,0x00004083,0x00004099,
42930x000042b3,0x00000000,0x000400fa,0x00004279, 37940x00004097,0x000500b0,0x0000002f,0x00004088,
42940x000042b2,0x000042b3,0x000200f8,0x000042b2, 37950x00005dbc,0x00006116,0x000400f6,0x0000409a,
42950x000200f9,0x0000430f,0x000200f8,0x000042b3, 37960x00004097,0x00000000,0x000400fa,0x00004088,
42960x0003003e,0x0000425d,0x000003ae,0x00050080, 37970x00004089,0x0000409a,0x000200f8,0x00004089,
42970x00000006,0x000042b9,0x000059dc,0x00000247, 37980x00050041,0x00000009,0x0000408c,0x00004005,
42980x00050089,0x00000006,0x000042ba,0x000042b9, 37990x00005dbc,0x0004003d,0x00000006,0x0000408d,
42990x00000437,0x00050041,0x00000009,0x000042bb, 38000x0000408c,0x000500c7,0x00000006,0x000043e9,
43000x00003c82,0x000059d5,0x0004003d,0x00000006, 38010x0000408d,0x00000241,0x000500ab,0x0000002f,
43010x000042bc,0x000042bb,0x00060041,0x000000d8, 38020x000043ea,0x000043e9,0x00000138,0x000300f7,
43020x000042bd,0x000041c9,0x000059d5,0x000042ba, 38030x000043f5,0x00000000,0x000400fa,0x000043ea,
43030x0004003d,0x000000d2,0x000042be,0x000042bd, 38040x000043eb,0x000043f4,0x000200f8,0x000043f4,
43040x00050041,0x00000182,0x00004523,0x00000180, 38050x000200f9,0x000043f5,0x000200f8,0x000043eb,
43050x00000311,0x0004003d,0x00000006,0x00004524, 38060x00050084,0x00000006,0x000043fb,0x000000ec,
43060x00004523,0x00050084,0x00000006,0x00004526, 38070x0000418d,0x00050080,0x00000006,0x000043fc,
43070x0000018b,0x000042bc,0x00050080,0x00000006, 38080x000001c4,0x000043fb,0x000500c7,0x00000006,
43080x00004527,0x00004524,0x00004526,0x00050041, 38090x000043ee,0x0000408d,0x00000256,0x00050084,
43090x0000022d,0x0000450d,0x00000180,0x0000015e, 38100x00000006,0x000043ef,0x000000ec,0x000043ee,
43100x0004003d,0x00000007,0x0000450e,0x0000450d, 38110x00050080,0x00000006,0x000043f0,0x000043fc,
43110x00050051,0x00000006,0x00004511,0x000042be, 38120x000043ef,0x00050095,0x0000013d,0x00004415,
43120x00000000,0x00050051,0x00000006,0x0000453d, 38130x000041db,0x000043f0,0x00050051,0x00000006,
43130x0000450e,0x00000000,0x00050095,0x00000130, 38140x00004416,0x00004415,0x00000001,0x00050051,
43140x0000453f,0x0000453d,0x00004527,0x00050051, 38150x00000006,0x00004417,0x00004415,0x00000000,
43150x00000006,0x00004540,0x0000453f,0x00000001, 38160x00050080,0x00000006,0x0000441c,0x000041e2,
43160x00050051,0x00000006,0x00004541,0x0000453f, 38170x00004416,0x00050050,0x00000007,0x0000441d,
43170x00000000,0x00050051,0x00000006,0x00004544, 38180x00004417,0x0000441c,0x0004007c,0x00000014,
43180x0000450e,0x00000001,0x00050080,0x00000006, 38190x0000440d,0x0000441d,0x00060041,0x0000016c,
43190x00004546,0x00004544,0x00004540,0x00050050, 38200x00004404,0x0000440d,0x0000016b,0x0000016b,
43200x00000007,0x00004547,0x00004541,0x00004546, 38210x0006003d,0x00000006,0x00004405,0x00004404,
43210x0004007c,0x00000014,0x00004537,0x00004547, 38220x00000002,0x00000004,0x000200f9,0x000043f5,
43220x00060041,0x0000015f,0x0000452f,0x00004537, 38230x000200f8,0x000043f5,0x000700f5,0x00000006,
43230x0000015e,0x0000015e,0x0005003e,0x0000452f, 38240x00005dc7,0x00004405,0x000043eb,0x00000539,
43240x00004511,0x00000002,0x00000004,0x00050080, 38250x000043f4,0x00050041,0x00000009,0x0000408f,
43250x00000006,0x00004514,0x00004527,0x000000df, 38260x00003ff4,0x00005dc2,0x0003003e,0x0000408f,
43260x00050051,0x00000006,0x00004518,0x000042be, 38270x00005dc7,0x00050080,0x00000006,0x00004091,
43270x00000001,0x00050095,0x00000130,0x0000455f, 38280x00005dc2,0x00000264,0x0004003d,0x00000006,
43280x0000453d,0x00004514,0x00050051,0x00000006, 38290x00004094,0x0000408c,0x000300f7,0x00004438,
43290x00004560,0x0000455f,0x00000001,0x00050051, 38300x00000000,0x000300fb,0x00000138,0x00004427,
43300x00000006,0x00004561,0x0000455f,0x00000000, 38310x000200f8,0x00004427,0x000500c7,0x00000006,
43310x00050080,0x00000006,0x00004566,0x00004544, 38320x00004429,0x00004094,0x00000241,0x000500ab,
43320x00004560,0x00050050,0x00000007,0x00004567, 38330x0000002f,0x0000442a,0x00004429,0x00000138,
43330x00004561,0x00004566,0x0004007c,0x00000014, 38340x000300f7,0x0000442f,0x00000000,0x000400fa,
43340x00004557,0x00004567,0x00060041,0x0000015f, 38350x0000442a,0x0000442b,0x0000442f,0x000200f8,
43350x0000454f,0x00004557,0x0000015e,0x0000015e, 38360x0000442b,0x000300f7,0x0000444c,0x00000000,
43360x0005003e,0x0000454f,0x00004518,0x00000002, 38370x000400fa,0x0000442a,0x00004442,0x0000444b,
43370x00000004,0x00050080,0x00000006,0x0000451b, 38380x000200f8,0x0000444b,0x000200f9,0x0000444c,
43380x00004527,0x00000194,0x00050051,0x00000006, 38390x000200f8,0x00004442,0x00050084,0x00000006,
43390x0000451f,0x000042be,0x00000002,0x00050095, 38400x00004452,0x000000ec,0x0000418d,0x00050080,
43400x00000130,0x0000457f,0x0000453d,0x0000451b, 38410x00000006,0x00004453,0x000001c4,0x00004452,
43410x00050051,0x00000006,0x00004580,0x0000457f, 38420x000500c7,0x00000006,0x00004445,0x00004094,
43420x00000001,0x00050051,0x00000006,0x00004581, 38430x00000256,0x00050084,0x00000006,0x00004446,
43430x0000457f,0x00000000,0x00050080,0x00000006, 38440x000000ec,0x00004445,0x00050080,0x00000006,
43440x00004586,0x00004544,0x00004580,0x00050050, 38450x00004447,0x00004453,0x00004446,0x00050095,
43450x00000007,0x00004587,0x00004581,0x00004586, 38460x0000013d,0x0000446c,0x000041db,0x00004447,
43460x0004007c,0x00000014,0x00004577,0x00004587, 38470x00050051,0x00000006,0x0000446d,0x0000446c,
43470x00060041,0x0000015f,0x0000456f,0x00004577, 38480x00000001,0x00050051,0x00000006,0x0000446e,
43480x0000015e,0x0000015e,0x0005003e,0x0000456f, 38490x0000446c,0x00000000,0x00050080,0x00000006,
43490x0000451f,0x00000002,0x00000004,0x0004003d, 38500x00004473,0x000041e2,0x0000446d,0x00050050,
43500x00000006,0x000042c4,0x000042bb,0x00060041, 38510x00000007,0x00004474,0x0000446e,0x00004473,
43510x000000d8,0x000042c5,0x000041c9,0x000059d5, 38520x0004007c,0x00000014,0x00004464,0x00004474,
43520x000059dc,0x0004003d,0x000000d2,0x000042c6, 38530x00060041,0x0000016c,0x0000445b,0x00004464,
43530x000042c5,0x00050084,0x00000006,0x000045b2, 38540x0000016b,0x0000016b,0x0006003d,0x00000006,
43540x0000018b,0x000042c4,0x00050080,0x00000006, 38550x0000445c,0x0000445b,0x00000002,0x00000004,
43550x000045b3,0x00004524,0x000045b2,0x00050080, 38560x000200f9,0x0000444c,0x000200f8,0x0000444c,
43560x00000006,0x00004598,0x000045b3,0x0000019b, 38570x000700f5,0x00000006,0x00005dce,0x0000445c,
43570x00050051,0x00000006,0x0000459d,0x000042c6, 38580x00004442,0x00000539,0x0000444b,0x00050041,
43580x00000000,0x00050095,0x00000130,0x000045cb, 38590x000001bb,0x00004477,0x000001b9,0x0000034a,
43590x0000453d,0x00004598,0x00050051,0x00000006, 38600x0004003d,0x00000006,0x00004478,0x00004477,
43600x000045cc,0x000045cb,0x00000001,0x00050051, 38610x00050041,0x000001bb,0x00004488,0x000001b9,
43610x00000006,0x000045cd,0x000045cb,0x00000000, 38620x00000334,0x0004003d,0x00000006,0x00004489,
43620x00050080,0x00000006,0x000045d2,0x00004544, 38630x00004488,0x000500c7,0x00000006,0x0000448a,
43630x000045cc,0x00050050,0x00000007,0x000045d3, 38640x00004489,0x00000142,0x000500ab,0x0000002f,
43640x000045cd,0x000045d2,0x0004007c,0x00000014, 38650x0000448b,0x0000448a,0x00000138,0x000600a9,
43650x000045c3,0x000045d3,0x00060041,0x0000015f, 38660x00000006,0x00004485,0x0000448b,0x00000342,
43660x000045bb,0x000045c3,0x0000015e,0x0000015e, 38670x000001c4,0x00050084,0x00000006,0x0000447b,
43670x0005003e,0x000045bb,0x0000459d,0x00000002, 38680x00005dce,0x00004485,0x00050080,0x00000006,
43680x00000004,0x00050080,0x00000006,0x000045a0, 38690x0000447c,0x00004478,0x0000447b,0x000500c2,
43690x000045b3,0x000001a2,0x00050051,0x00000006, 38700x00000006,0x0000447d,0x0000447c,0x00000351,
43700x000045a4,0x000042c6,0x00000001,0x00050095, 38710x000500c4,0x00000006,0x0000447e,0x0000447d,
43710x00000130,0x000045eb,0x0000453d,0x000045a0, 38720x0000031d,0x000600a9,0x00000006,0x00004480,
43720x00050051,0x00000006,0x000045ec,0x000045eb, 38730x0000448b,0x00000355,0x00000138,0x000500c5,
43730x00000001,0x00050051,0x00000006,0x000045ed, 38740x00000006,0x00004481,0x0000447e,0x00004480,
43740x000045eb,0x00000000,0x00050080,0x00000006, 38750x000200f9,0x00004438,0x000200f8,0x0000442f,
43750x000045f2,0x00004544,0x000045ec,0x00050050, 38760x000300f7,0x000044e3,0x00000000,0x000400fa,
43760x00000007,0x000045f3,0x000045ed,0x000045f2, 38770x000041a3,0x000044de,0x000044e2,0x000200f8,
43770x0004007c,0x00000014,0x000045e3,0x000045f3, 38780x000044e2,0x000200f9,0x000044e3,0x000200f8,
43780x00060041,0x0000015f,0x000045db,0x000045e3, 38790x000044de,0x00050082,0x00000006,0x000044e1,
43790x0000015e,0x0000015e,0x0005003e,0x000045db, 38800x0000402d,0x00000142,0x000200f9,0x000044e3,
43800x000045a4,0x00000002,0x00000004,0x00050080, 38810x000200f8,0x000044e3,0x000700f5,0x00000006,
43810x00000006,0x000045a7,0x000045b3,0x00000260, 38820x00005dca,0x000044e1,0x000044de,0x00000138,
43820x00050051,0x00000006,0x000045ab,0x000042c6, 38830x000044e2,0x00050084,0x00000006,0x000044a8,
43830x00000002,0x00050095,0x00000130,0x0000460b, 38840x000000ec,0x00005dca,0x00050080,0x00000006,
43840x0000453d,0x000045a7,0x00050051,0x00000006, 38850x000044a9,0x00004176,0x000044a8,0x000300f7,
43850x0000460c,0x0000460b,0x00000001,0x00050051, 38860x000044f0,0x00000000,0x000400fa,0x000041a3,
43860x00000006,0x0000460d,0x0000460b,0x00000000, 38870x000044eb,0x000044ef,0x000200f8,0x000044ef,
43870x00050080,0x00000006,0x00004612,0x00004544, 38880x000200f9,0x000044f0,0x000200f8,0x000044eb,
43880x0000460c,0x00050050,0x00000007,0x00004613, 38890x00050082,0x00000006,0x000044ee,0x0000402d,
43890x0000460d,0x00004612,0x0004007c,0x00000014, 38900x00000142,0x000200f9,0x000044f0,0x000200f8,
43900x00004603,0x00004613,0x00060041,0x0000015f, 38910x000044f0,0x000700f5,0x00000006,0x00005dcb,
43910x000045fb,0x00004603,0x0000015e,0x0000015e, 38920x000044ee,0x000044eb,0x00000138,0x000044ef,
43920x0005003e,0x000045fb,0x000045ab,0x00000002, 38930x00050084,0x00000006,0x000044a2,0x000000ec,
43930x00000004,0x00050080,0x00000006,0x000042cb, 38940x00005dcb,0x00050080,0x00000006,0x000044a3,
43940x000059dc,0x00000135,0x00050089,0x00000006, 38950x000044a9,0x000044a2,0x000300f7,0x000044fd,
43950x000042cc,0x000042cb,0x00000437,0x0004003d, 38960x00000000,0x000400fa,0x000041a3,0x000044f8,
43960x00000006,0x000042ce,0x000042bb,0x00060041, 38970x000044fc,0x000200f8,0x000044fc,0x000200f9,
43970x000000d8,0x000042cf,0x000041c9,0x000059d5, 38980x000044fd,0x000200f8,0x000044f8,0x00050082,
43980x000042cc,0x0004003d,0x000000d2,0x000042d0, 38990x00000006,0x000044fb,0x0000402d,0x00000142,
43990x000042cf,0x00050084,0x00000006,0x0000463e, 39000x000200f9,0x000044fd,0x000200f8,0x000044fd,
44000x0000018b,0x000042ce,0x00050080,0x00000006, 39010x000700f5,0x00000006,0x00005dcc,0x000044fb,
44010x0000463f,0x00004524,0x0000463e,0x00050080, 39020x000044f8,0x00000138,0x000044fc,0x00050084,
44020x00000006,0x00004624,0x0000463f,0x000001b6, 39030x00000006,0x0000449c,0x000000ec,0x00005dcc,
44030x00050051,0x00000006,0x00004629,0x000042d0, 39040x00050080,0x00000006,0x0000449d,0x000044a3,
44040x00000000,0x00050095,0x00000130,0x00004657, 39050x0000449c,0x000300f7,0x0000450a,0x00000000,
44050x0000453d,0x00004624,0x00050051,0x00000006, 39060x000400fa,0x000041a3,0x00004505,0x00004509,
44060x00004658,0x00004657,0x00000001,0x00050051, 39070x000200f8,0x00004509,0x000200f9,0x0000450a,
44070x00000006,0x00004659,0x00004657,0x00000000, 39080x000200f8,0x00004505,0x00050082,0x00000006,
44080x00050080,0x00000006,0x0000465e,0x00004544, 39090x00004508,0x0000402d,0x00000142,0x000200f9,
44090x00004658,0x00050050,0x00000007,0x0000465f, 39100x0000450a,0x000200f8,0x0000450a,0x000700f5,
44100x00004659,0x0000465e,0x0004007c,0x00000014, 39110x00000006,0x00005dcd,0x00004508,0x00004505,
44110x0000464f,0x0000465f,0x00060041,0x0000015f, 39120x00000138,0x00004509,0x00050084,0x00000006,
44120x00004647,0x0000464f,0x0000015e,0x0000015e, 39130x00004496,0x000000ec,0x00005dcd,0x00050080,
44130x0005003e,0x00004647,0x00004629,0x00000002, 39140x00000006,0x00004497,0x0000449d,0x00004496,
44140x00000004,0x00050080,0x00000006,0x0000462c, 39150x00050084,0x00000006,0x00004432,0x000000ec,
44150x0000463f,0x000005df,0x00050051,0x00000006, 39160x00004094,0x00050080,0x00000006,0x00004433,
44160x00004630,0x000042d0,0x00000001,0x00050095, 39170x00004497,0x00004432,0x00050095,0x0000013d,
44170x00000130,0x00004677,0x0000453d,0x0000462c, 39180x00004524,0x000041db,0x00004433,0x00050051,
44180x00050051,0x00000006,0x00004678,0x00004677, 39190x00000006,0x00004525,0x00004524,0x00000001,
44190x00000001,0x00050051,0x00000006,0x00004679, 39200x00050051,0x00000006,0x00004526,0x00004524,
44200x00004677,0x00000000,0x00050080,0x00000006, 39210x00000000,0x00050080,0x00000006,0x0000452b,
44210x0000467e,0x00004544,0x00004678,0x00050050, 39220x000041e2,0x00004525,0x00050050,0x00000007,
44220x00000007,0x0000467f,0x00004679,0x0000467e, 39230x0000452c,0x00004526,0x0000452b,0x0004007c,
44230x0004007c,0x00000014,0x0000466f,0x0000467f, 39240x00000014,0x0000451c,0x0000452c,0x00060041,
44240x00060041,0x0000015f,0x00004667,0x0000466f, 39250x0000016c,0x00004513,0x0000451c,0x0000016b,
44250x0000015e,0x0000015e,0x0005003e,0x00004667, 39260x0000016b,0x0006003d,0x00000006,0x00004514,
44260x00004630,0x00000002,0x00000004,0x00050080, 39270x00004513,0x00000002,0x00000004,0x00050041,
44270x00000006,0x00004633,0x0000463f,0x000001cc, 39280x000001bb,0x0000452f,0x000001b9,0x0000035a,
44280x00050051,0x00000006,0x00004637,0x000042d0, 39290x0004003d,0x00000006,0x00004530,0x0000452f,
44290x00000002,0x00050095,0x00000130,0x00004697, 39300x00050041,0x000001bb,0x00004540,0x000001b9,
44300x0000453d,0x00004633,0x00050051,0x00000006, 39310x00000334,0x0004003d,0x00000006,0x00004541,
44310x00004698,0x00004697,0x00000001,0x00050051, 39320x00004540,0x000500c7,0x00000006,0x00004542,
44320x00000006,0x00004699,0x00004697,0x00000000, 39330x00004541,0x00000280,0x000500ab,0x0000002f,
44330x00050080,0x00000006,0x0000469e,0x00004544, 39340x00004543,0x00004542,0x00000138,0x000600a9,
44340x00004698,0x00050050,0x00000007,0x0000469f, 39350x00000006,0x0000453d,0x00004543,0x000001c4,
44350x00004699,0x0000469e,0x0004007c,0x00000014, 39360x00000342,0x00050084,0x00000006,0x00004533,
44360x0000468f,0x0000469f,0x00060041,0x0000015f, 39370x00004514,0x0000453d,0x00050080,0x00000006,
44370x00004687,0x0000468f,0x0000015e,0x0000015e, 39380x00004534,0x00004530,0x00004533,0x000500c2,
44380x0005003e,0x00004687,0x00004637,0x00000002, 39390x00000006,0x00004535,0x00004534,0x00000351,
44390x00000004,0x00050080,0x00000006,0x000042d5, 39400x000500c4,0x00000006,0x00004536,0x00004535,
44400x000059e1,0x00000247,0x00050089,0x00000006, 39410x0000031d,0x000600a9,0x00000006,0x00004538,
44410x000042d6,0x000042d5,0x00000437,0x0004003d, 39420x00004543,0x000000ec,0x00000364,0x000500c5,
44420x00000006,0x000042d8,0x000042bb,0x00060041, 39430x00000006,0x00004539,0x00004536,0x00004538,
44430x000000d8,0x000042d9,0x000041c9,0x000059d7, 39440x000200f9,0x00004438,0x000200f8,0x00004438,
44440x000042d6,0x0004003d,0x000000d2,0x000042da, 39450x000700f5,0x00000006,0x00005dcf,0x00004481,
44450x000042d9,0x00050084,0x00000006,0x000046ca, 39460x0000444c,0x00004539,0x0000450a,0x00050041,
44460x0000018b,0x000042d8,0x00050080,0x00000006, 39470x00000009,0x00004096,0x00003ff3,0x00005dc2,
44470x000046cb,0x00004524,0x000046ca,0x00050080, 39480x0003003e,0x00004096,0x00005dcf,0x000200f9,
44480x00000006,0x000046b0,0x000046cb,0x000004c7, 39490x00004097,0x000200f8,0x00004097,0x00050080,
44490x00050051,0x00000006,0x000046b5,0x000042da, 39500x00000006,0x00004099,0x00005dbc,0x00000264,
44500x00000000,0x00050095,0x00000130,0x000046e3, 39510x000200f9,0x00004084,0x000200f8,0x0000409a,
44510x0000453d,0x000046b0,0x00050051,0x00000006, 39520x000200f9,0x0000409b,0x000200f8,0x0000409b,
44520x000046e4,0x000046e3,0x00000001,0x00050051, 39530x00050080,0x00000006,0x0000409d,0x00005d9b,
44530x00000006,0x000046e5,0x000046e3,0x00000000, 39540x00000264,0x000200f9,0x00004065,0x000200f8,
44540x00050080,0x00000006,0x000046ea,0x00004544, 39550x0000409e,0x00050041,0x000001bb,0x0000454c,
44550x000046e4,0x00050050,0x00000007,0x000046eb, 39560x000001b9,0x00000334,0x0004003d,0x00000006,
44560x000046e5,0x000046ea,0x0004007c,0x00000014, 39570x0000454d,0x0000454c,0x000500c7,0x00000006,
44570x000046db,0x000046eb,0x00060041,0x0000015f, 39580x0000454e,0x0000454d,0x00000142,0x000500aa,
44580x000046d3,0x000046db,0x0000015e,0x0000015e, 39590x0000002f,0x000040a0,0x0000454e,0x00000138,
44590x0005003e,0x000046d3,0x000046b5,0x00000002, 39600x000300f7,0x000040a6,0x00000000,0x000400fa,
44600x00000004,0x00050080,0x00000006,0x000046b8, 39610x000040a0,0x000040a1,0x000040a6,0x000200f8,
44610x000046cb,0x000004d2,0x00050051,0x00000006, 39620x000040a1,0x000500c7,0x00000006,0x000040a4,
44620x000046bc,0x000042da,0x00000001,0x00050095, 39630x0000454d,0x000000ec,0x000500ab,0x0000002f,
44630x00000130,0x00004703,0x0000453d,0x000046b8, 39640x000040a5,0x000040a4,0x00000138,0x000200f9,
44640x00050051,0x00000006,0x00004704,0x00004703, 39650x000040a6,0x000200f8,0x000040a6,0x000700f5,
44650x00000001,0x00050051,0x00000006,0x00004705, 39660x0000002f,0x000040a7,0x000040a0,0x0000409e,
44660x00004703,0x00000000,0x00050080,0x00000006, 39670x000040a5,0x000040a1,0x000300f7,0x000040ad,
44670x0000470a,0x00004544,0x00004704,0x00050050, 39680x00000000,0x000400fa,0x000040a7,0x000040a8,
44680x00000007,0x0000470b,0x00004705,0x0000470a, 39690x000040ad,0x000200f8,0x000040a8,0x0004003d,
44690x0004007c,0x00000014,0x000046fb,0x0000470b, 39700x000000ed,0x000040a9,0x00003ff4,0x0003003e,
44700x00060041,0x0000015f,0x000046f3,0x000046fb, 39710x0000400e,0x000040a9,0x0004003d,0x000000ed,
44710x0000015e,0x0000015e,0x0005003e,0x000046f3, 39720x000040aa,0x00003ff3,0x0003003e,0x0000400f,
44720x000046bc,0x00000002,0x00000004,0x00050080, 39730x000040aa,0x000200f9,0x00004585,0x000200f8,
44730x00000006,0x000046bf,0x000046cb,0x000004dd, 39740x00004585,0x000700f5,0x00000006,0x00005d9c,
44740x00050051,0x00000006,0x000046c3,0x000042da, 39750x00000138,0x000040a8,0x000045cb,0x000045c9,
44750x00000002,0x00050095,0x00000130,0x00004723, 39760x000500b0,0x0000002f,0x00004588,0x00005d9c,
44760x0000453d,0x000046bf,0x00050051,0x00000006, 39770x000000ec,0x000400f6,0x000045cc,0x000045c9,
44770x00004724,0x00004723,0x00000001,0x00050051, 39780x00000000,0x000400fa,0x00004588,0x00004589,
44780x00000006,0x00004725,0x00004723,0x00000000, 39790x000045cc,0x000200f8,0x00004589,0x00050041,
44790x00050080,0x00000006,0x0000472a,0x00004544, 39800x00000096,0x0000458b,0x00004551,0x00005d9c,
44800x00004724,0x00050050,0x00000007,0x0000472b, 39810x0003003e,0x0000458b,0x000003cc,0x00050041,
44810x00004725,0x0000472a,0x0004007c,0x00000014, 39820x00000096,0x0000458d,0x00004552,0x00005d9c,
44820x0000471b,0x0000472b,0x00060041,0x0000015f, 39830x0003003e,0x0000458d,0x000003cc,0x00050041,
44830x00004713,0x0000471b,0x0000015e,0x0000015e, 39840x00000009,0x0000458f,0x00004553,0x00005d9c,
44840x0005003e,0x00004713,0x000046c3,0x00000002, 39850x0003003e,0x0000458f,0x00000138,0x000200f9,
44850x00000004,0x0004003d,0x00000006,0x000042de, 39860x00004590,0x000200f8,0x00004590,0x000700f5,
44860x000042bb,0x00050084,0x00000006,0x00004731, 39870x00000006,0x00005db4,0x00000138,0x00004589,
44870x0000018b,0x000042de,0x00050080,0x00000006, 39880x0000459a,0x00004594,0x000500b0,0x0000002f,
44880x00004732,0x00004524,0x00004731,0x00050080, 39890x00004593,0x00005db4,0x00000470,0x000400f6,
44890x00000006,0x000042e0,0x00004732,0x000004fe, 39900x0000459b,0x00004594,0x00000000,0x000400fa,
44900x00050041,0x00000009,0x000042e2,0x00003c82, 39910x00004593,0x00004594,0x0000459b,0x000200f8,
44910x000059d7,0x0004003d,0x00000006,0x000042e3, 39920x00004594,0x00060041,0x000000e5,0x00004597,
44920x000042e2,0x00050084,0x00000006,0x00004738, 39930x00004555,0x00005d9c,0x00005db4,0x0003003e,
44930x0000018b,0x000042e3,0x00050080,0x00000006, 39940x00004597,0x00000c0e,0x00050080,0x00000006,
44940x00004739,0x00004524,0x00004738,0x00050080, 39950x0000459a,0x00005db4,0x00000264,0x000200f9,
44950x00000006,0x000042e5,0x00004739,0x000004f4, 39960x00004590,0x000200f8,0x0000459b,0x00050041,
44960x00050095,0x00000130,0x00004752,0x0000453d, 39970x00000009,0x0000459d,0x0000400e,0x00005d9c,
44970x000042e5,0x00050051,0x00000006,0x00004753, 39980x0004003d,0x00000006,0x0000459e,0x0000459d,
44980x00004752,0x00000001,0x00050051,0x00000006, 39990x000500aa,0x0000002f,0x0000459f,0x0000459e,
44990x00004754,0x00004752,0x00000000,0x00050080, 40000x00000539,0x000300f7,0x000045a1,0x00000000,
45000x00000006,0x00004759,0x00004544,0x00004753, 40010x000400fa,0x0000459f,0x000045a0,0x000045a1,
45010x00050050,0x00000007,0x0000475a,0x00004754, 40020x000200f8,0x000045a0,0x000200f9,0x000045c9,
45020x00004759,0x0004007c,0x00000014,0x0000474a, 40030x000200f8,0x000045a1,0x0004003d,0x00000006,
45030x0000475a,0x00060041,0x0000015f,0x00004741, 40040x000045a5,0x0000459d,0x00050041,0x000001bb,
45040x0000474a,0x0000015e,0x0000015e,0x0006003d, 40050x000046a5,0x000001b9,0x0000034a,0x0004003d,
45050x00000006,0x00004742,0x00004741,0x00000002, 40060x00000006,0x000046a6,0x000046a5,0x00050084,
45060x00000004,0x00050095,0x00000130,0x00004772, 40070x00000006,0x000046a8,0x000001c4,0x000045a5,
45070x0000453d,0x000042e0,0x00050051,0x00000006, 40080x00050080,0x00000006,0x000046a9,0x000046a6,
45080x00004773,0x00004772,0x00000001,0x00050051, 40090x000046a8,0x00050080,0x00000006,0x000045a7,
45090x00000006,0x00004774,0x00004772,0x00000000, 40100x000046a9,0x00000521,0x00050041,0x00000266,
45100x00050080,0x00000006,0x00004779,0x00004544, 40110x000045a8,0x000001b9,0x0000016b,0x0004003d,
45110x00004773,0x00050050,0x00000007,0x0000477a, 40120x00000007,0x000045a9,0x000045a8,0x00050051,
45120x00004774,0x00004779,0x0004007c,0x00000014, 40130x00000006,0x000046c0,0x000045a9,0x00000000,
45130x0000476a,0x0000477a,0x00060041,0x0000015f, 40140x00050095,0x0000013d,0x000046c2,0x000046c0,
45140x00004762,0x0000476a,0x0000015e,0x0000015e, 40150x000045a7,0x00050051,0x00000006,0x000046c3,
45150x0005003e,0x00004762,0x00004742,0x00000002, 40160x000046c2,0x00000001,0x00050051,0x00000006,
45160x00000004,0x00050082,0x00000006,0x000042ed, 40170x000046c4,0x000046c2,0x00000000,0x00050051,
45170x0000032b,0x000059dc,0x00050089,0x00000006, 40180x00000006,0x000046c7,0x000045a9,0x00000001,
45180x000042ee,0x000042ed,0x00000437,0x00050082, 40190x00050080,0x00000006,0x000046c9,0x000046c7,
45190x00000006,0x000042f0,0x0000031c,0x000059dc, 40200x000046c3,0x00050050,0x00000007,0x000046ca,
45200x00050089,0x00000006,0x000042f1,0x000042f0, 40210x000046c4,0x000046c9,0x0004007c,0x00000014,
45210x00000437,0x000500c4,0x00000006,0x000042f2, 40220x000046ba,0x000046ca,0x00060041,0x0000016c,
45220x000042f1,0x000002dc,0x000500c5,0x00000006, 40230x000046b1,0x000046ba,0x0000016b,0x0000016b,
45230x000042f3,0x000042ee,0x000042f2,0x00050082, 40240x0006003d,0x00000006,0x000046b2,0x000046b1,
45240x00000006,0x000042f5,0x0000031c,0x000059e1, 40250x00000002,0x00000004,0x0003003e,0x0000458f,
45250x00050089,0x00000006,0x000042f6,0x000042f5, 40260x000046b2,0x000200f9,0x000045ac,0x000200f8,
45260x00000437,0x00050082,0x00000006,0x000042f8, 40270x000045ac,0x000700f5,0x00000006,0x00005db6,
45270x00000c2c,0x000059e1,0x00050089,0x00000006, 40280x00000138,0x000045a1,0x000045bb,0x000045b0,
45280x000042f9,0x000042f8,0x00000437,0x000500c4, 40290x000500b0,0x0000002f,0x000045af,0x00005db6,
45290x00000006,0x000042fa,0x000042f9,0x000002dc, 40300x00000470,0x000400f6,0x000045bc,0x000045b0,
45300x000500c5,0x00000006,0x000042fb,0x000042f6, 40310x00000000,0x000400fa,0x000045af,0x000045b0,
45310x000042fa,0x0004003d,0x00000006,0x000042fe, 40320x000045bc,0x000200f8,0x000045b0,0x0004003d,
45320x000042bb,0x00050084,0x00000006,0x00004780, 40330x00000006,0x000045b5,0x0000459d,0x00050084,
45330x0000018b,0x000042fe,0x00050080,0x00000006, 40340x00000006,0x000046ee,0x000001c4,0x000045b5,
45340x00004781,0x00004524,0x00004780,0x00050080, 40350x00050080,0x00000006,0x000046ef,0x000046a6,
45350x00000006,0x00004300,0x00004781,0x00000508, 40360x000046ee,0x00050084,0x00000006,0x000046d8,
45360x000500c4,0x00000006,0x00004303,0x000042fb, 40370x000001d4,0x00005db6,0x00050080,0x00000006,
45370x00000488,0x000500c5,0x00000006,0x00004304, 40380x000046d9,0x000046ef,0x000046d8,0x00050095,
45380x000042f3,0x00004303,0x00050095,0x00000130, 40390x0000013d,0x00004708,0x000046c0,0x000046d9,
45390x00004799,0x0000453d,0x00004300,0x00050051, 40400x00050051,0x00000006,0x00004709,0x00004708,
45400x00000006,0x0000479a,0x00004799,0x00000001, 40410x00000001,0x00050051,0x00000006,0x0000470a,
45410x00050051,0x00000006,0x0000479b,0x00004799, 40420x00004708,0x00000000,0x00050080,0x00000006,
45420x00000000,0x00050080,0x00000006,0x000047a0, 40430x0000470f,0x000046c7,0x00004709,0x00050050,
45430x00004544,0x0000479a,0x00050050,0x00000007, 40440x00000007,0x00004710,0x0000470a,0x0000470f,
45440x000047a1,0x0000479b,0x000047a0,0x0004007c, 40450x0004007c,0x00000014,0x00004700,0x00004710,
45450x00000014,0x00004791,0x000047a1,0x00060041, 40460x00060041,0x0000016c,0x000046f7,0x00004700,
45460x0000015f,0x00004789,0x00004791,0x0000015e, 40470x0000016b,0x0000016b,0x0006003d,0x00000006,
45470x0000015e,0x0005003e,0x00004789,0x00004304, 40480x000046f8,0x000046f7,0x00000002,0x00000004,
45480x00000002,0x00000004,0x00050041,0x00000009, 40490x00050080,0x00000006,0x000046df,0x000046d9,
45490x0000430a,0x00003c83,0x000059d5,0x0004003d, 40500x000000ec,0x00050095,0x0000013d,0x00004729,
45500x00000006,0x0000430b,0x0000430a,0x000500c7, 40510x000046c0,0x000046df,0x00050051,0x00000006,
45510x00000006,0x0000430c,0x0000430b,0x00000c46, 40520x0000472a,0x00004729,0x00000001,0x00050051,
45520x000500c5,0x00000006,0x0000430d,0x0000430c, 40530x00000006,0x0000472b,0x00004729,0x00000000,
45530x00000135,0x00050041,0x00000009,0x0000430e, 40540x00050080,0x00000006,0x00004730,0x000046c7,
45540x00003c83,0x000059d7,0x0003003e,0x0000430e, 40550x0000472a,0x00050050,0x00000007,0x00004731,
45550x0000430d,0x000200f9,0x00004312,0x000200f8, 40560x0000472b,0x00004730,0x0004007c,0x00000014,
45560x0000430f,0x00050080,0x00000006,0x00004311, 40570x00004721,0x00004731,0x00060041,0x0000016c,
45570x000059d7,0x0000022b,0x000200f9,0x00004257, 40580x00004718,0x00004721,0x0000016b,0x0000016b,
45580x000200f8,0x00004312,0x000200f9,0x00004313, 40590x0006003d,0x00000006,0x00004719,0x00004718,
45590x000200f8,0x00004313,0x00050080,0x00000006, 40600x00000002,0x00000004,0x00050080,0x00000006,
45600x00004315,0x000059d5,0x0000022b,0x000200f9, 40610x000046e4,0x000046d9,0x000001cd,0x00050095,
45610x00004241,0x000200f8,0x00004316,0x0004003d, 40620x0000013d,0x0000474a,0x000046c0,0x000046e4,
45620x000000e0,0x00003d20,0x00003c83,0x0003003e, 40630x00050051,0x00000006,0x0000474b,0x0000474a,
45630x00003c67,0x00003d20,0x000200f9,0x00003d21, 40640x00000001,0x00050051,0x00000006,0x0000474c,
45640x000200f8,0x00003d21,0x000200f9,0x00003d22, 40650x0000474a,0x00000000,0x00050080,0x00000006,
45650x000200f8,0x00003ca3,0x000500aa,0x0000002f, 40660x00004751,0x000046c7,0x0000474b,0x00050050,
45660x00003ca6,0x00003ca1,0x00000135,0x000300f7, 40670x00000007,0x00004752,0x0000474c,0x00004751,
45670x00003cb1,0x00000000,0x000400fa,0x00003ca6, 40680x0004007c,0x00000014,0x00004742,0x00004752,
45680x00003ca7,0x00003cb1,0x000200f8,0x00003ca7, 40690x00060041,0x0000016c,0x00004739,0x00004742,
45690x00050041,0x00000182,0x00003d90,0x00000180, 40700x0000016b,0x0000016b,0x0006003d,0x00000006,
45700x00000181,0x0004003d,0x00000006,0x00003d91, 40710x0000473a,0x00004739,0x00000002,0x00000004,
45710x00003d90,0x00050084,0x00000006,0x00003d92, 40720x00060050,0x000000df,0x000046e8,0x000046f8,
45720x000000df,0x00003d91,0x00050080,0x00000006, 40730x00004719,0x0000473a,0x00060041,0x000000e5,
45730x00003d93,0x0000018b,0x00003d92,0x00050041, 40740x000045b8,0x00004555,0x00005d9c,0x00005db6,
45740x0000022d,0x00003ca9,0x00000180,0x0000022b, 40750x0003003e,0x000045b8,0x000046e8,0x00050080,
45750x0004003d,0x00000007,0x00003caa,0x00003ca9, 40760x00000006,0x000045bb,0x00005db6,0x00000264,
45760x00050051,0x00000006,0x00003daa,0x00003caa, 40770x000200f9,0x000045ac,0x000200f8,0x000045bc,
45770x00000000,0x00050095,0x00000130,0x00003dac, 40780x0004003d,0x00000006,0x000045bf,0x0000459d,
45780x00003daa,0x00003d93,0x00050051,0x00000006, 40790x00050084,0x00000006,0x00004763,0x000001ef,
45790x00003dad,0x00003dac,0x00000001,0x00050051, 40800x000045bf,0x00050080,0x00000006,0x00004764,
45800x00000006,0x00003dae,0x00003dac,0x00000000, 40810x00004183,0x00004763,0x00050095,0x0000013d,
45810x00050051,0x00000006,0x00003db1,0x00003caa, 40820x000047c2,0x000041db,0x00004764,0x00050051,
45820x00000001,0x00050080,0x00000006,0x00003db3, 40830x00000006,0x000047c3,0x000047c2,0x00000001,
45830x00003db1,0x00003dad,0x00050050,0x00000007, 40840x00050051,0x00000006,0x000047c4,0x000047c2,
45840x00003db4,0x00003dae,0x00003db3,0x0004007c, 40850x00000000,0x00050080,0x00000006,0x000047c9,
45850x00000014,0x00003da4,0x00003db4,0x00060041, 40860x000041e2,0x000047c3,0x00050050,0x00000007,
45860x0000015f,0x00003d9b,0x00003da4,0x0000015e, 40870x000047ca,0x000047c4,0x000047c9,0x0004007c,
45870x0000015e,0x0006003d,0x00000006,0x00003d9c, 40880x00000014,0x000047ba,0x000047ca,0x00060041,
45880x00003d9b,0x00000002,0x00000004,0x00050041, 40890x0000016c,0x000047b1,0x000047ba,0x0000016b,
45890x00000009,0x00003cac,0x00003c68,0x0000015e, 40900x0000016b,0x0006003d,0x00000006,0x000047b2,
45900x0003003e,0x00003cac,0x00003d9c,0x0004003d, 40910x000047b1,0x00000002,0x00000004,0x0004007c,
45910x00000006,0x00003cae,0x00003cac,0x00050041, 40920x00000027,0x00004769,0x000047b2,0x00050080,
45920x00000182,0x00003db7,0x00000180,0x00000311, 40930x00000006,0x0000476b,0x00004764,0x000000ec,
45930x0004003d,0x00000006,0x00003db8,0x00003db7, 40940x00050095,0x0000013d,0x000047e3,0x000041db,
45940x00050041,0x00000182,0x00003dc8,0x00000180, 40950x0000476b,0x00050051,0x00000006,0x000047e4,
45950x000002fb,0x0004003d,0x00000006,0x00003dc9, 40960x000047e3,0x00000001,0x00050051,0x00000006,
45960x00003dc8,0x000500c7,0x00000006,0x00003dca, 40970x000047e5,0x000047e3,0x00000000,0x00050080,
45970x00003dc9,0x00000135,0x000500ab,0x0000002f, 40980x00000006,0x000047ea,0x000041e2,0x000047e4,
45980x00003dcb,0x00003dca,0x0000012b,0x000600a9, 40990x00050050,0x00000007,0x000047eb,0x000047e5,
45990x00000006,0x00003dc5,0x00003dcb,0x00000309, 41000x000047ea,0x0004007c,0x00000014,0x000047db,
46000x0000018b,0x00050084,0x00000006,0x00003dbb, 41010x000047eb,0x00060041,0x0000016c,0x000047d2,
46010x00003cae,0x00003dc5,0x00050080,0x00000006, 41020x000047db,0x0000016b,0x0000016b,0x0006003d,
46020x00003dbc,0x00003db8,0x00003dbb,0x000500c2, 41030x00000006,0x000047d3,0x000047d2,0x00000002,
46030x00000006,0x00003dbd,0x00003dbc,0x00000318, 41040x00000004,0x0004007c,0x00000027,0x0000476f,
46040x000500c4,0x00000006,0x00003dbe,0x00003dbd, 41050x000047d3,0x00050080,0x00000006,0x00004771,
46050x000002e4,0x000600a9,0x00000006,0x00003dc0, 41060x00004764,0x000001cd,0x00050095,0x0000013d,
46060x00003dcb,0x0000031c,0x0000012b,0x000500c5, 41070x00004804,0x000041db,0x00004771,0x00050051,
46070x00000006,0x00003dc1,0x00003dbe,0x00003dc0, 41080x00000006,0x00004805,0x00004804,0x00000001,
46080x00050041,0x00000009,0x00003cb0,0x00003c67, 41090x00050051,0x00000006,0x00004806,0x00004804,
46090x0000015e,0x0003003e,0x00003cb0,0x00003dc1, 41100x00000000,0x00050080,0x00000006,0x0000480b,
46100x000200f9,0x00003cb1,0x000200f8,0x00003cb1, 41110x000041e2,0x00004805,0x00050050,0x00000007,
46110x000200f9,0x00003d22,0x000200f8,0x00003d22, 41120x0000480c,0x00004806,0x0000480b,0x0004007c,
46120x000700f5,0x00000006,0x00005a10,0x0000012b, 41130x00000014,0x000047fc,0x0000480c,0x00060041,
46130x00003cb1,0x00003edc,0x00003d21,0x000200f9, 41140x0000016c,0x000047f3,0x000047fc,0x0000016b,
46140x00003d23,0x000200f8,0x00003d23,0x000700f5, 41150x0000016b,0x0006003d,0x00000006,0x000047f4,
46150x00000006,0x00005a0e,0x0000012b,0x00003d22, 41160x000047f3,0x00000002,0x00000004,0x0004007c,
46160x00003d3c,0x00003d3a,0x000500b0,0x0000002f, 41170x00000027,0x00004775,0x000047f4,0x00050080,
46170x00003d26,0x00005a0e,0x000000df,0x000400f6, 41180x00000006,0x00004778,0x00004764,0x000001d4,
46180x00003d3d,0x00003d3a,0x00000000,0x000400fa, 41190x00050095,0x0000013d,0x00004825,0x000041db,
46190x00003d26,0x00003d27,0x00003d3d,0x000200f8, 41200x00004778,0x00050051,0x00000006,0x00004826,
46200x00003d27,0x00050041,0x00000009,0x00003d29, 41210x00004825,0x00000001,0x00050051,0x00000006,
46210x00003c68,0x00005a0e,0x0004003d,0x00000006, 41220x00004827,0x00004825,0x00000000,0x00050080,
46220x00003d2a,0x00003d29,0x000500ab,0x0000002f, 41230x00000006,0x0000482c,0x000041e2,0x00004826,
46230x00003d2b,0x00003d2a,0x00000500,0x000300f7, 41240x00050050,0x00000007,0x0000482d,0x00004827,
46240x00003d39,0x00000000,0x000400fa,0x00003d2b, 41250x0000482c,0x0004007c,0x00000014,0x0000481d,
46250x00003d2c,0x00003d39,0x000200f8,0x00003d2c, 41260x0000482d,0x00060041,0x0000016c,0x00004814,
46260x00050041,0x00000182,0x000047e8,0x00000180, 41270x0000481d,0x0000016b,0x0000016b,0x0006003d,
46270x00000181,0x0004003d,0x00000006,0x000047e9, 41280x00000006,0x00004815,0x00004814,0x00000002,
46280x000047e8,0x00050084,0x00000006,0x000047ea, 41290x00000004,0x0004007c,0x00000027,0x0000477c,
46290x000001a2,0x000047e9,0x00050080,0x00000006, 41300x00004815,0x00050080,0x00000006,0x0000477e,
46300x000047eb,0x0000018b,0x000047ea,0x00050080, 41310x00004764,0x000001db,0x00050095,0x0000013d,
46310x00000006,0x000047f1,0x000047e9,0x00005cc3, 41320x00004846,0x000041db,0x0000477e,0x00050051,
46320x00050086,0x00000006,0x000047f2,0x000047f1, 41330x00000006,0x00004847,0x00004846,0x00000001,
46330x00000185,0x00050084,0x00000006,0x000047e4, 41340x00050051,0x00000006,0x00004848,0x00004846,
46340x0000018b,0x000047f2,0x00050080,0x00000006, 41350x00000000,0x00050080,0x00000006,0x0000484d,
46350x000047e5,0x000047eb,0x000047e4,0x00050080, 41360x000041e2,0x00004847,0x00050050,0x00000007,
46360x00000006,0x000047df,0x000047e5,0x000047e4, 41370x0000484e,0x00004848,0x0000484d,0x0004007c,
46370x00050084,0x00000006,0x000047d8,0x000001b6, 41380x00000014,0x0000483e,0x0000484e,0x00060041,
46380x00003ca1,0x00050080,0x00000006,0x000047d9, 41390x0000016c,0x00004835,0x0000483e,0x0000016b,
46390x000047df,0x000047d8,0x00050041,0x00000182, 41400x0000016b,0x0006003d,0x00000006,0x00004836,
46400x000047cf,0x00000180,0x000001cd,0x0004003d, 41410x00004835,0x00000002,0x00000004,0x0004007c,
46410x00000006,0x000047d0,0x000047cf,0x00050084, 41420x00000027,0x00004782,0x00004836,0x00050080,
46420x00000006,0x000047d1,0x000001cc,0x000047d0, 41430x00000006,0x00004784,0x00004764,0x00000299,
46430x00050080,0x00000006,0x000047d2,0x000047d9, 41440x00050095,0x0000013d,0x00004867,0x000041db,
46440x000047d1,0x000500ac,0x0000002f,0x000047ff, 41450x00004784,0x00050051,0x00000006,0x00004868,
46450x00003ca1,0x00000135,0x000300f7,0x00004805, 41460x00004867,0x00000001,0x00050051,0x00000006,
46460x00000000,0x000400fa,0x000047ff,0x00004800, 41470x00004869,0x00004867,0x00000000,0x00050080,
46470x00004804,0x000200f8,0x00004804,0x000200f9, 41480x00000006,0x0000486e,0x000041e2,0x00004868,
46480x00004805,0x000200f8,0x00004800,0x00050082, 41490x00050050,0x00000007,0x0000486f,0x00004869,
46490x00000006,0x00004803,0x00003ca1,0x00000135, 41500x0000486e,0x0004007c,0x00000014,0x0000485f,
46500x000200f9,0x00004805,0x000200f8,0x00004805, 41510x0000486f,0x00060041,0x0000016c,0x00004856,
46510x000700f5,0x00000006,0x00005a6a,0x00004803, 41520x0000485f,0x0000016b,0x0000016b,0x0006003d,
46520x00004800,0x0000012b,0x00004804,0x00050084, 41530x00000006,0x00004857,0x00004856,0x00000002,
46530x00000006,0x000047ca,0x000000df,0x00005a6a, 41540x00000004,0x0004007c,0x00000027,0x00004788,
46540x00050080,0x00000006,0x000047cb,0x000047d2, 41550x00004857,0x000500bc,0x0000002f,0x00004876,
46550x000047ca,0x000300f7,0x00004812,0x00000000, 41560x00004769,0x0000477c,0x000300f7,0x0000487d,
46560x000400fa,0x000047ff,0x0000480d,0x00004811, 41570x00000000,0x000400fa,0x00004876,0x00004877,
46570x000200f8,0x00004811,0x000200f9,0x00004812, 41580x0000487d,0x000200f8,0x00004877,0x000500bc,
46580x000200f8,0x0000480d,0x00050082,0x00000006, 41590x0000002f,0x0000487c,0x0000476f,0x00004782,
46590x00004810,0x00003ca1,0x00000135,0x000200f9, 41600x000200f9,0x0000487d,0x000200f8,0x0000487d,
46600x00004812,0x000200f8,0x00004812,0x000700f5, 41610x000700f5,0x0000002f,0x0000487e,0x00004876,
46610x00000006,0x00005a6b,0x00004810,0x0000480d, 41620x000045bc,0x0000487c,0x00004877,0x000300f7,
46620x0000012b,0x00004811,0x00050084,0x00000006, 41630x00004885,0x00000000,0x000400fa,0x0000487e,
46630x000047c4,0x000000df,0x00005a6b,0x00050080, 41640x0000487f,0x00004885,0x000200f8,0x0000487f,
46640x00000006,0x000047c5,0x000047cb,0x000047c4, 41650x000500bc,0x0000002f,0x00004884,0x00004775,
46650x000300f7,0x0000481f,0x00000000,0x000400fa, 41660x00004788,0x000200f9,0x00004885,0x000200f8,
46660x000047ff,0x0000481a,0x0000481e,0x000200f8, 41670x00004885,0x000700f5,0x0000002f,0x00004886,
46670x0000481e,0x000200f9,0x0000481f,0x000200f8, 41680x0000487e,0x0000487d,0x00004884,0x0000487f,
46680x0000481a,0x00050082,0x00000006,0x0000481d, 41690x0003003e,0x0000458b,0x00004886,0x000200f9,
46690x00003ca1,0x00000135,0x000200f9,0x0000481f, 41700x000045c9,0x000200f8,0x000045c9,0x00050080,
46700x000200f8,0x0000481f,0x000700f5,0x00000006, 41710x00000006,0x000045cb,0x00005d9c,0x00000264,
46710x00005a6c,0x0000481d,0x0000481a,0x0000012b, 41720x000200f9,0x00004585,0x000200f8,0x000045cc,
46720x0000481e,0x00050084,0x00000006,0x000047be, 41730x000200f9,0x000045cd,0x000200f8,0x000045cd,
46730x000000df,0x00005a6c,0x00050080,0x00000006, 41740x000700f5,0x00000006,0x00005d9d,0x00000138,
46740x000047bf,0x000047c5,0x000047be,0x000300f7, 41750x000045cc,0x000046a1,0x0000469f,0x000500b0,
46750x0000482c,0x00000000,0x000400fa,0x000047ff, 41760x0000002f,0x000045d0,0x00005d9d,0x000000ec,
46760x00004827,0x0000482b,0x000200f8,0x0000482b, 41770x000400f6,0x000046a2,0x0000469f,0x00000000,
46770x000200f9,0x0000482c,0x000200f8,0x00004827, 41780x000400fa,0x000045d0,0x000045d1,0x000046a2,
46780x00050082,0x00000006,0x0000482a,0x00003ca1, 41790x000200f8,0x000045d1,0x00050041,0x00000096,
46790x00000135,0x000200f9,0x0000482c,0x000200f8, 41800x000045d3,0x00004552,0x00005d9d,0x0004003d,
46800x0000482c,0x000700f5,0x00000006,0x00005a6d, 41810x0000002f,0x000045d4,0x000045d3,0x000400a8,
46810x0000482a,0x00004827,0x0000012b,0x0000482b, 41820x0000002f,0x000045d5,0x000045d4,0x000300f7,
46820x00050084,0x00000006,0x000047b8,0x000000df, 41830x000045db,0x00000000,0x000400fa,0x000045d5,
46830x00005a6d,0x00050080,0x00000006,0x000047b9, 41840x000045d6,0x000045db,0x000200f8,0x000045d6,
46840x000047bf,0x000047b8,0x000300f7,0x00004839, 41850x00050041,0x00000096,0x000045d8,0x00004551,
46850x00000000,0x000400fa,0x000047ff,0x00004834, 41860x00005d9d,0x0004003d,0x0000002f,0x000045d9,
46860x00004838,0x000200f8,0x00004838,0x000200f9, 41870x000045d8,0x000400a8,0x0000002f,0x000045da,
46870x00004839,0x000200f8,0x00004834,0x00050082, 41880x000045d9,0x000200f9,0x000045db,0x000200f8,
46880x00000006,0x00004837,0x00003ca1,0x00000135, 41890x000045db,0x000700f5,0x0000002f,0x000045dc,
46890x000200f9,0x00004839,0x000200f8,0x00004839, 41900x000045d4,0x000045d1,0x000045da,0x000045d6,
46900x000700f5,0x00000006,0x00005a6e,0x00004837, 41910x000300f7,0x000045de,0x00000000,0x000400fa,
46910x00004834,0x0000012b,0x00004838,0x00050084, 41920x000045dc,0x000045dd,0x000045de,0x000200f8,
46920x00000006,0x000047b2,0x000000df,0x00005a6e, 41930x000045dd,0x000200f9,0x0000469f,0x000200f8,
46930x00050080,0x00000006,0x000047b3,0x000047b9, 41940x000045de,0x0003003e,0x000045d3,0x000003e7,
46940x000047b2,0x000300f7,0x0000484c,0x00000000, 41950x00050080,0x00000006,0x000045e2,0x00005d9d,
46950x000400fa,0x000047ff,0x00004847,0x0000484b, 41960x00000142,0x000200f9,0x000045e3,0x000200f8,
46960x000200f8,0x0000484b,0x000200f9,0x0000484c, 41970x000045e3,0x000700f5,0x00000006,0x00005d9f,
46970x000200f8,0x00004847,0x00050082,0x00000006, 41980x000045e2,0x000045de,0x0000469d,0x0000469b,
46980x0000484a,0x00003ca1,0x00000135,0x000200f9, 41990x000500b0,0x0000002f,0x000045e6,0x00005d9f,
46990x0000484c,0x000200f8,0x0000484c,0x000700f5, 42000x000000ec,0x000400f6,0x0000469e,0x0000469b,
47000x00000006,0x00005a6f,0x0000484a,0x00004847, 42010x00000000,0x000400fa,0x000045e6,0x000045e7,
47010x0000012b,0x0000484b,0x00050080,0x00000006, 42020x0000469e,0x000200f8,0x000045e7,0x00050041,
47020x0000483f,0x00005a6f,0x00005cc3,0x00050086, 42030x00000096,0x000045e9,0x00004552,0x00005d9f,
47030x00000006,0x00004840,0x0000483f,0x00000185, 42040x0004003d,0x0000002f,0x000045ea,0x000045e9,
47040x00050084,0x00000006,0x000047ac,0x000000df, 42050x000400a8,0x0000002f,0x000045eb,0x000045ea,
47050x00004840,0x00050080,0x00000006,0x000047ad, 42060x000300f7,0x000045f1,0x00000000,0x000400fa,
47060x000047b3,0x000047ac,0x000300f7,0x0000485f, 42070x000045eb,0x000045ec,0x000045f1,0x000200f8,
47070x00000000,0x000400fa,0x000047ff,0x0000485a, 42080x000045ec,0x00050041,0x00000096,0x000045ee,
47080x0000485e,0x000200f8,0x0000485e,0x000200f9, 42090x00004551,0x00005d9f,0x0004003d,0x0000002f,
47090x0000485f,0x000200f8,0x0000485a,0x00050082, 42100x000045ef,0x000045ee,0x000400a8,0x0000002f,
47100x00000006,0x0000485d,0x00003ca1,0x00000135, 42110x000045f0,0x000045ef,0x000200f9,0x000045f1,
47110x000200f9,0x0000485f,0x000200f8,0x0000485f, 42120x000200f8,0x000045f1,0x000700f5,0x0000002f,
47120x000700f5,0x00000006,0x00005a70,0x0000485d, 42130x000045f2,0x000045ea,0x000045e7,0x000045f0,
47130x0000485a,0x0000012b,0x0000485e,0x00050080, 42140x000045ec,0x000400a8,0x0000002f,0x000045f3,
47140x00000006,0x00004852,0x00005a70,0x00005cc3, 42150x000045f2,0x000300f7,0x000045fc,0x00000000,
47150x00050086,0x00000006,0x00004853,0x00004852, 42160x000400fa,0x000045f3,0x000045f4,0x000045fc,
47160x00000185,0x00050084,0x00000006,0x000047a6, 42170x000200f8,0x000045f4,0x00050041,0x00000009,
47170x000000df,0x00004853,0x00050080,0x00000006, 42180x000045f6,0x00004553,0x00005d9f,0x0004003d,
47180x000047a7,0x000047ad,0x000047a6,0x0004003d, 42190x00000006,0x000045f7,0x000045f6,0x00050041,
47190x00000006,0x00003d30,0x00003d29,0x00050084, 42200x00000009,0x000045f9,0x00004553,0x00005d9d,
47200x00000006,0x00003d31,0x000000df,0x00003d30, 42210x0004003d,0x00000006,0x000045fa,0x000045f9,
47210x00050080,0x00000006,0x00003d32,0x000047a7, 42220x000500ab,0x0000002f,0x000045fb,0x000045f7,
47220x00003d31,0x00050041,0x0000022d,0x00003d34, 42230x000045fa,0x000200f9,0x000045fc,0x000200f8,
47230x00000180,0x0000022b,0x0004003d,0x00000007, 42240x000045fc,0x000700f5,0x0000002f,0x000045fd,
47240x00003d35,0x00003d34,0x00050041,0x00000009, 42250x000045f2,0x000045f1,0x000045fb,0x000045f4,
47250x00003d36,0x00003c67,0x00005a0e,0x0004003d, 42260x000300f7,0x000045ff,0x00000000,0x000400fa,
47260x00000006,0x00003d37,0x00003d36,0x00050051, 42270x000045fd,0x000045fe,0x000045ff,0x000200f8,
47270x00000006,0x00004876,0x00003d35,0x00000000, 42280x000045fe,0x000200f9,0x0000469b,0x000200f8,
47280x00050095,0x00000130,0x00004878,0x00004876, 42290x000045ff,0x000200f9,0x00004600,0x000200f8,
47290x00003d32,0x00050051,0x00000006,0x00004879, 42300x00004600,0x000700f5,0x00000006,0x00005da9,
47300x00004878,0x00000001,0x00050051,0x00000006, 42310x00000470,0x000045ff,0x0000609e,0x00004638,
47310x0000487a,0x00004878,0x00000000,0x00050051, 42320x000700f5,0x00000006,0x00005da4,0x00000470,
47320x00000006,0x0000487d,0x00003d35,0x00000001, 42330x000045ff,0x00006093,0x00004638,0x000700f5,
47330x00050080,0x00000006,0x0000487f,0x0000487d, 42340x00000006,0x00005da3,0x00000138,0x000045ff,
47340x00004879,0x00050050,0x00000007,0x00004880, 42350x0000463a,0x00004638,0x000500b0,0x0000002f,
47350x0000487a,0x0000487f,0x0004007c,0x00000014, 42360x00004603,0x00005da3,0x00000470,0x000500aa,
47360x00004870,0x00004880,0x00060041,0x0000015f, 42370x0000002f,0x00004605,0x00005da4,0x00000470,
47370x00004868,0x00004870,0x0000015e,0x0000015e, 42380x000500a7,0x0000002f,0x00004606,0x00004603,
47380x0005003e,0x00004868,0x00003d37,0x00000002, 42390x00004605,0x000400f6,0x0000463b,0x00004638,
47390x00000004,0x000200f9,0x00003d39,0x000200f8, 42400x00000000,0x000400fa,0x00004606,0x00004607,
47400x00003d39,0x000200f9,0x00003d3a,0x000200f8, 42410x0000463b,0x000200f8,0x00004607,0x00060041,
47410x00003d3a,0x00050080,0x00000006,0x00003d3c, 42420x000000e5,0x0000460a,0x00004555,0x00005d9d,
47420x00005a0e,0x0000022b,0x000200f9,0x00003d23, 42430x00005da3,0x0004003d,0x000000df,0x0000460b,
47430x000200f8,0x00003d3d,0x00050041,0x00000182, 42440x0000460a,0x00050080,0x00000006,0x0000460e,
47440x00004883,0x00000180,0x00000321,0x0004003d, 42450x00005da3,0x00000142,0x00050089,0x00000006,
47450x00000006,0x00004884,0x00004883,0x00050041, 42460x0000460f,0x0000460e,0x00000470,0x00060041,
47460x00000182,0x00004894,0x00000180,0x000002fb, 42470x000000e5,0x00004610,0x00004555,0x00005d9d,
47470x0004003d,0x00000006,0x00004895,0x00004894, 42480x0000460f,0x0004003d,0x000000df,0x00004611,
47480x000500c7,0x00000006,0x00004896,0x00004895, 42490x00004610,0x000500aa,0x0000054d,0x00004614,
47490x00000247,0x000500ab,0x0000002f,0x00004897, 42500x0000460b,0x00004611,0x0004009b,0x0000002f,
47500x00004896,0x0000012b,0x000600a9,0x00000006, 42510x00004615,0x00004614,0x000300f7,0x00004617,
47510x00004891,0x00004897,0x0000018b,0x00000309, 42520x00000000,0x000400fa,0x00004615,0x00004616,
47520x00050084,0x00000006,0x00004887,0x00005a10, 42530x00004617,0x000200f8,0x00004616,0x000200f9,
47530x00004891,0x00050080,0x00000006,0x00004888, 42540x00004638,0x000200f8,0x00004617,0x000200f9,
47540x00004884,0x00004887,0x000500c2,0x00000006, 42550x00004618,0x000200f8,0x00004618,0x000700f5,
47550x00004889,0x00004888,0x00000318,0x000500c4, 42560x00000006,0x00005daa,0x00000138,0x00004617,
47560x00000006,0x0000488a,0x00004889,0x000002e4, 42570x00004636,0x00004634,0x000500b0,0x0000002f,
47570x000600a9,0x00000006,0x0000488c,0x00004897, 42580x0000461b,0x00005daa,0x00000470,0x000400f6,
47580x000000df,0x0000032b,0x000500c5,0x00000006, 42590x00004637,0x00004634,0x00000000,0x000400fa,
47590x0000488d,0x0000488a,0x0000488c,0x000200f9, 42600x0000461b,0x0000461c,0x00004637,0x000200f8,
47600x00003d46,0x000200f8,0x00003d46,0x000700f5, 42610x0000461c,0x00060041,0x000000e5,0x0000461f,
47610x00000006,0x00005a33,0x0000012b,0x00003d3d, 42620x00004555,0x00005d9f,0x00005daa,0x0004003d,
47620x00003d74,0x00003d72,0x000500b0,0x0000002f, 42630x000000df,0x00004620,0x0000461f,0x000500aa,
47630x00003d49,0x00005a33,0x000000df,0x000400f6, 42640x0000054d,0x00004622,0x00004620,0x00004611,
47640x00003d75,0x00003d72,0x00000000,0x000400fa, 42650x0004009b,0x0000002f,0x00004623,0x00004622,
47650x00003d49,0x00003d4a,0x00003d75,0x000200f8, 42660x000300f7,0x0000462e,0x00000000,0x000400fa,
47660x00003d4a,0x00050084,0x00000006,0x00003d4d, 42670x00004623,0x00004624,0x0000462e,0x000200f8,
47670x000000df,0x00005a33,0x00050080,0x00000006, 42680x00004624,0x00050080,0x00000006,0x00004627,
47680x00003d4e,0x00004888,0x00003d4d,0x00050041, 42690x00005daa,0x00000142,0x00050089,0x00000006,
47690x0000022d,0x00003d50,0x00000180,0x0000015e, 42700x00004628,0x00004627,0x00000470,0x00060041,
47700x0004003d,0x00000007,0x00003d51,0x00003d50, 42710x000000e5,0x00004629,0x00004555,0x00005d9f,
47710x00050041,0x00000009,0x00003d52,0x00003c67, 42720x00004628,0x0004003d,0x000000df,0x0000462a,
47720x00005a33,0x0004003d,0x00000006,0x00003d53, 42730x00004629,0x000500aa,0x0000054d,0x0000462c,
47730x00003d52,0x00050051,0x00000006,0x000048bd, 42740x0000462a,0x0000460b,0x0004009b,0x0000002f,
47740x00003d51,0x00000000,0x00050095,0x00000130, 42750x0000462d,0x0000462c,0x000200f9,0x0000462e,
47750x000048bf,0x000048bd,0x00003d4e,0x00050051, 42760x000200f8,0x0000462e,0x000700f5,0x0000002f,
47760x00000006,0x000048c0,0x000048bf,0x00000001, 42770x0000462f,0x00004623,0x0000461c,0x0000462d,
47770x00050051,0x00000006,0x000048c1,0x000048bf, 42780x00004624,0x000300f7,0x00004633,0x00000000,
47780x00000000,0x00050051,0x00000006,0x000048c4, 42790x000400fa,0x0000462f,0x00004630,0x00004633,
47790x00003d51,0x00000001,0x00050080,0x00000006, 42800x000200f8,0x00004630,0x000200f9,0x00004637,
47800x000048c6,0x000048c4,0x000048c0,0x00050050, 42810x000200f8,0x00004633,0x000200f9,0x00004634,
47810x00000007,0x000048c7,0x000048c1,0x000048c6, 42820x000200f8,0x00004634,0x00050080,0x00000006,
47820x0004007c,0x00000014,0x000048b7,0x000048c7, 42830x00004636,0x00005daa,0x00000264,0x000200f9,
47830x00060041,0x0000015f,0x000048af,0x000048b7, 42840x00004618,0x000200f8,0x00004637,0x000700f5,
47840x0000015e,0x0000015e,0x0005003e,0x000048af, 42850x00000006,0x0000609f,0x00005da9,0x00004618,
47850x00003d53,0x00000002,0x00000004,0x0004003d, 42860x00005daa,0x00004630,0x000700f5,0x00000006,
47860x00000006,0x00003d57,0x00003d52,0x000500ab, 42870x00006094,0x00005da4,0x00004618,0x00005da3,
47870x0000002f,0x00003d58,0x00003d57,0x00000500, 42880x00004630,0x000200f9,0x00004638,0x000200f8,
47880x000300f7,0x00003d6a,0x00000000,0x000400fa, 42890x00004638,0x000700f5,0x00000006,0x0000609e,
47890x00003d58,0x00003d59,0x00003d6a,0x000200f8, 42900x00005da9,0x00004616,0x0000609f,0x00004637,
47900x00003d59,0x00050041,0x00000182,0x00003d5a, 42910x000700f5,0x00000006,0x00006093,0x00005da4,
47910x00000180,0x00000fbf,0x0004003d,0x00000006, 42920x00004616,0x00006094,0x00004637,0x00050080,
47920x00003d5b,0x00003d5a,0x0004003d,0x00000006, 42930x00000006,0x0000463a,0x00005da3,0x00000264,
47930x00003d5e,0x00003d52,0x000500c2,0x00000006, 42940x000200f9,0x00004600,0x000200f8,0x0000463b,
47940x000048cb,0x00003d5e,0x000002e4,0x00050041, 42950x000300f7,0x0000463f,0x00000000,0x000400fa,
47950x00000182,0x00003d60,0x00000180,0x00000311, 42960x00004605,0x0000463e,0x0000463f,0x000200f8,
47960x0004003d,0x00000006,0x00003d61,0x00003d60, 42970x0000463e,0x000200f9,0x0000469b,0x000200f8,
47970x00050086,0x00000006,0x00003d62,0x00003d61, 42980x0000463f,0x0003003e,0x000045e9,0x000003e7,
47980x0000018b,0x00050082,0x00000006,0x00003d63, 42990x00050080,0x00000006,0x00004645,0x00005da4,
47990x000048cb,0x00003d62,0x00050084,0x00000006, 43000x00000280,0x00050089,0x00000006,0x00004646,
48000x00003d64,0x000000df,0x00003d63,0x00050080, 43010x00004645,0x00000470,0x00050041,0x00000009,
48010x00000006,0x00003d65,0x00003d5b,0x00003d64, 43020x00004647,0x0000400e,0x00005d9d,0x0004003d,
48020x00050095,0x00000130,0x000048e3,0x000048bd, 43030x00000006,0x00004648,0x00004647,0x00060041,
48030x00003d65,0x00050051,0x00000006,0x000048e4, 43040x000000e5,0x00004649,0x00004555,0x00005d9d,
48040x000048e3,0x00000001,0x00050051,0x00000006, 43050x00004646,0x0004003d,0x000000df,0x0000464a,
48050x000048e5,0x000048e3,0x00000000,0x00050080, 43060x00004649,0x00050041,0x000001bb,0x000048af,
48060x00000006,0x000048ea,0x000048c4,0x000048e4, 43070x000001b9,0x0000034a,0x0004003d,0x00000006,
48070x00050050,0x00000007,0x000048eb,0x000048e5, 43080x000048b0,0x000048af,0x00050084,0x00000006,
48080x000048ea,0x0004007c,0x00000014,0x000048db, 43090x000048b2,0x000001c4,0x00004648,0x00050080,
48090x000048eb,0x00060041,0x0000015f,0x000048d3, 43100x00000006,0x000048b3,0x000048b0,0x000048b2,
48100x000048db,0x0000015e,0x0000015e,0x0005003e, 43110x00050041,0x00000266,0x00004899,0x000001b9,
48110x000048d3,0x0000488d,0x00000002,0x00000004, 43120x0000016b,0x0004003d,0x00000007,0x0000489a,
48120x000200f9,0x00003d72,0x000200f8,0x00003d6a, 43130x00004899,0x00050051,0x00000006,0x0000489d,
48130x000300f7,0x00004944,0x00000000,0x000300fb, 43140x0000464a,0x00000000,0x00050051,0x00000006,
48140x0000012b,0x0000490a,0x000200f8,0x0000490a, 43150x000048c9,0x0000489a,0x00000000,0x00050095,
48150x000300f7,0x00004915,0x00000000,0x000400fa, 43160x0000013d,0x000048cb,0x000048c9,0x000048b3,
48160x00004897,0x0000490c,0x00004915,0x000200f8, 43170x00050051,0x00000006,0x000048cc,0x000048cb,
48170x0000490c,0x00050080,0x00000006,0x0000490e, 43180x00000001,0x00050051,0x00000006,0x000048cd,
48180x00004888,0x000001a2,0x00050084,0x00000006, 43190x000048cb,0x00000000,0x00050051,0x00000006,
48190x00004910,0x0000019b,0x00005a33,0x00050080, 43200x000048d0,0x0000489a,0x00000001,0x00050080,
48200x00000006,0x00004911,0x0000490e,0x00004910, 43210x00000006,0x000048d2,0x000048d0,0x000048cc,
48210x00050095,0x00000130,0x00004a40,0x000048bd, 43220x00050050,0x00000007,0x000048d3,0x000048cd,
48220x00004911,0x00050051,0x00000006,0x00004a41, 43230x000048d2,0x0004007c,0x00000014,0x000048c3,
48230x00004a40,0x00000001,0x00050051,0x00000006, 43240x000048d3,0x00060041,0x0000016c,0x000048bb,
48240x00004a42,0x00004a40,0x00000000,0x00050080, 43250x000048c3,0x0000016b,0x0000016b,0x0005003e,
48250x00000006,0x00004a47,0x000048c4,0x00004a41, 43260x000048bb,0x0000489d,0x00000002,0x00000004,
48260x00050050,0x00000007,0x00004a48,0x00004a42, 43270x00050080,0x00000006,0x000048a0,0x000048b3,
48270x00004a47,0x0004007c,0x00000014,0x00004a38, 43280x000000ec,0x00050051,0x00000006,0x000048a4,
48280x00004a48,0x00060041,0x0000015f,0x00004a30, 43290x0000464a,0x00000001,0x00050095,0x0000013d,
48290x00004a38,0x0000015e,0x0000015e,0x0005003e, 43300x000048eb,0x000048c9,0x000048a0,0x00050051,
48300x00004a30,0x00005cd7,0x00000002,0x00000004, 43310x00000006,0x000048ec,0x000048eb,0x00000001,
48310x00050080,0x00000006,0x00004968,0x00004911, 43320x00050051,0x00000006,0x000048ed,0x000048eb,
48320x000000df,0x00050095,0x00000130,0x00004b08, 43330x00000000,0x00050080,0x00000006,0x000048f2,
48330x000048bd,0x00004968,0x00050051,0x00000006, 43340x000048d0,0x000048ec,0x00050050,0x00000007,
48340x00004b09,0x00004b08,0x00000001,0x00050051, 43350x000048f3,0x000048ed,0x000048f2,0x0004007c,
48350x00000006,0x00004b0a,0x00004b08,0x00000000, 43360x00000014,0x000048e3,0x000048f3,0x00060041,
48360x00050080,0x00000006,0x00004b0f,0x000048c4, 43370x0000016c,0x000048db,0x000048e3,0x0000016b,
48370x00004b09,0x00050050,0x00000007,0x00004b10, 43380x0000016b,0x0005003e,0x000048db,0x000048a4,
48380x00004b0a,0x00004b0f,0x0004007c,0x00000014, 43390x00000002,0x00000004,0x00050080,0x00000006,
48390x00004b00,0x00004b10,0x00060041,0x0000015f, 43400x000048a7,0x000048b3,0x000001cd,0x00050051,
48400x00004af8,0x00004b00,0x0000015e,0x0000015e, 43410x00000006,0x000048ab,0x0000464a,0x00000002,
48410x0005003e,0x00004af8,0x00005cd9,0x00000002, 43420x00050095,0x0000013d,0x0000490b,0x000048c9,
48420x00000004,0x00050080,0x00000006,0x00004975, 43430x000048a7,0x00050051,0x00000006,0x0000490c,
48430x00004911,0x00000194,0x00050095,0x00000130, 43440x0000490b,0x00000001,0x00050051,0x00000006,
48440x00004bd0,0x000048bd,0x00004975,0x00050051, 43450x0000490d,0x0000490b,0x00000000,0x00050080,
48450x00000006,0x00004bd1,0x00004bd0,0x00000001, 43460x00000006,0x00004912,0x000048d0,0x0000490c,
48460x00050051,0x00000006,0x00004bd2,0x00004bd0, 43470x00050050,0x00000007,0x00004913,0x0000490d,
48470x00000000,0x00050080,0x00000006,0x00004bd7, 43480x00004912,0x0004007c,0x00000014,0x00004903,
48480x000048c4,0x00004bd1,0x00050050,0x00000007, 43490x00004913,0x00060041,0x0000016c,0x000048fb,
48490x00004bd8,0x00004bd2,0x00004bd7,0x0004007c, 43500x00004903,0x0000016b,0x0000016b,0x0005003e,
48500x00000014,0x00004bc8,0x00004bd8,0x00060041, 43510x000048fb,0x000048ab,0x00000002,0x00000004,
48510x0000015f,0x00004bc0,0x00004bc8,0x0000015e, 43520x0004003d,0x00000006,0x00004650,0x00004647,
48520x0000015e,0x0005003e,0x00004bc0,0x00005cda, 43530x00060041,0x000000e5,0x00004651,0x00004555,
48530x00000002,0x00000004,0x000200f9,0x00004944, 43540x00005d9d,0x00005da4,0x0004003d,0x000000df,
48540x000200f8,0x00004915,0x00050080,0x00000006, 43550x00004652,0x00004651,0x00050084,0x00000006,
48550x00004917,0x00004888,0x000001a2,0x00050084, 43560x0000493e,0x000001c4,0x00004650,0x00050080,
48560x00000006,0x00004919,0x000001b6,0x00005a33, 43570x00000006,0x0000493f,0x000048b0,0x0000493e,
48570x00050080,0x00000006,0x0000491a,0x00004917, 43580x00050080,0x00000006,0x00004924,0x0000493f,
48580x00004919,0x00050095,0x00000130,0x00004bf9, 43590x000001d4,0x00050051,0x00000006,0x00004929,
48590x000048bd,0x0000491a,0x00050051,0x00000006, 43600x00004652,0x00000000,0x00050095,0x0000013d,
48600x00004bfa,0x00004bf9,0x00000001,0x00050051, 43610x00004957,0x000048c9,0x00004924,0x00050051,
48610x00000006,0x00004bfb,0x00004bf9,0x00000000, 43620x00000006,0x00004958,0x00004957,0x00000001,
48620x00050080,0x00000006,0x00004c00,0x000048c4, 43630x00050051,0x00000006,0x00004959,0x00004957,
48630x00004bfa,0x00050050,0x00000007,0x00004c01, 43640x00000000,0x00050080,0x00000006,0x0000495e,
48640x00004bfb,0x00004c00,0x0004007c,0x00000014, 43650x000048d0,0x00004958,0x00050050,0x00000007,
48650x00004bf1,0x00004c01,0x00060041,0x0000015f, 43660x0000495f,0x00004959,0x0000495e,0x0004007c,
48660x00004be9,0x00004bf1,0x0000015e,0x0000015e, 43670x00000014,0x0000494f,0x0000495f,0x00060041,
48670x0005003e,0x00004be9,0x00000345,0x00000002, 43680x0000016c,0x00004947,0x0000494f,0x0000016b,
48680x00000004,0x00050080,0x00000006,0x00004922, 43690x0000016b,0x0005003e,0x00004947,0x00004929,
48690x0000491a,0x000000df,0x00050095,0x00000130, 43700x00000002,0x00000004,0x00050080,0x00000006,
48700x00004c22,0x000048bd,0x00004922,0x00050051, 43710x0000492c,0x0000493f,0x000001db,0x00050051,
48710x00000006,0x00004c23,0x00004c22,0x00000001, 43720x00000006,0x00004930,0x00004652,0x00000001,
48720x00050051,0x00000006,0x00004c24,0x00004c22, 43730x00050095,0x0000013d,0x00004977,0x000048c9,
48730x00000000,0x00050080,0x00000006,0x00004c29, 43740x0000492c,0x00050051,0x00000006,0x00004978,
48740x000048c4,0x00004c23,0x00050050,0x00000007, 43750x00004977,0x00000001,0x00050051,0x00000006,
48750x00004c2a,0x00004c24,0x00004c29,0x0004007c, 43760x00004979,0x00004977,0x00000000,0x00050080,
48760x00000014,0x00004c1a,0x00004c2a,0x00060041, 43770x00000006,0x0000497e,0x000048d0,0x00004978,
48770x0000015f,0x00004c12,0x00004c1a,0x0000015e, 43780x00050050,0x00000007,0x0000497f,0x00004979,
48780x0000015e,0x0005003e,0x00004c12,0x00000345, 43790x0000497e,0x0004007c,0x00000014,0x0000496f,
43800x0000497f,0x00060041,0x0000016c,0x00004967,
43810x0000496f,0x0000016b,0x0000016b,0x0005003e,
43820x00004967,0x00004930,0x00000002,0x00000004,
43830x00050080,0x00000006,0x00004933,0x0000493f,
43840x00000299,0x00050051,0x00000006,0x00004937,
43850x00004652,0x00000002,0x00050095,0x0000013d,
43860x00004997,0x000048c9,0x00004933,0x00050051,
43870x00000006,0x00004998,0x00004997,0x00000001,
43880x00050051,0x00000006,0x00004999,0x00004997,
43890x00000000,0x00050080,0x00000006,0x0000499e,
43900x000048d0,0x00004998,0x00050050,0x00000007,
43910x0000499f,0x00004999,0x0000499e,0x0004007c,
43920x00000014,0x0000498f,0x0000499f,0x00060041,
43930x0000016c,0x00004987,0x0000498f,0x0000016b,
43940x0000016b,0x0005003e,0x00004987,0x00004937,
43950x00000002,0x00000004,0x00050080,0x00000006,
43960x00004657,0x00005da4,0x00000142,0x00050089,
43970x00000006,0x00004658,0x00004657,0x00000470,
43980x0004003d,0x00000006,0x0000465a,0x00004647,
43990x00060041,0x000000e5,0x0000465b,0x00004555,
44000x00005d9d,0x00004658,0x0004003d,0x000000df,
44010x0000465c,0x0000465b,0x00050084,0x00000006,
44020x000049ca,0x000001c4,0x0000465a,0x00050080,
44030x00000006,0x000049cb,0x000048b0,0x000049ca,
44040x00050080,0x00000006,0x000049b0,0x000049cb,
44050x000001ef,0x00050051,0x00000006,0x000049b5,
44060x0000465c,0x00000000,0x00050095,0x0000013d,
44070x000049e3,0x000048c9,0x000049b0,0x00050051,
44080x00000006,0x000049e4,0x000049e3,0x00000001,
44090x00050051,0x00000006,0x000049e5,0x000049e3,
44100x00000000,0x00050080,0x00000006,0x000049ea,
44110x000048d0,0x000049e4,0x00050050,0x00000007,
44120x000049eb,0x000049e5,0x000049ea,0x0004007c,
44130x00000014,0x000049db,0x000049eb,0x00060041,
44140x0000016c,0x000049d3,0x000049db,0x0000016b,
44150x0000016b,0x0005003e,0x000049d3,0x000049b5,
48790x00000002,0x00000004,0x00050080,0x00000006, 44160x00000002,0x00000004,0x00050080,0x00000006,
48800x00004929,0x0000491a,0x00000194,0x00050095, 44170x000049b8,0x000049cb,0x000006d9,0x00050051,
48810x00000130,0x00004c4b,0x000048bd,0x00004929, 44180x00000006,0x000049bc,0x0000465c,0x00000001,
44190x00050095,0x0000013d,0x00004a03,0x000048c9,
44200x000049b8,0x00050051,0x00000006,0x00004a04,
44210x00004a03,0x00000001,0x00050051,0x00000006,
44220x00004a05,0x00004a03,0x00000000,0x00050080,
44230x00000006,0x00004a0a,0x000048d0,0x00004a04,
44240x00050050,0x00000007,0x00004a0b,0x00004a05,
44250x00004a0a,0x0004007c,0x00000014,0x000049fb,
44260x00004a0b,0x00060041,0x0000016c,0x000049f3,
44270x000049fb,0x0000016b,0x0000016b,0x0005003e,
44280x000049f3,0x000049bc,0x00000002,0x00000004,
44290x00050080,0x00000006,0x000049bf,0x000049cb,
44300x00000205,0x00050051,0x00000006,0x000049c3,
44310x0000465c,0x00000002,0x00050095,0x0000013d,
44320x00004a23,0x000048c9,0x000049bf,0x00050051,
44330x00000006,0x00004a24,0x00004a23,0x00000001,
44340x00050051,0x00000006,0x00004a25,0x00004a23,
44350x00000000,0x00050080,0x00000006,0x00004a2a,
44360x000048d0,0x00004a24,0x00050050,0x00000007,
44370x00004a2b,0x00004a25,0x00004a2a,0x0004007c,
44380x00000014,0x00004a1b,0x00004a2b,0x00060041,
44390x0000016c,0x00004a13,0x00004a1b,0x0000016b,
44400x0000016b,0x0005003e,0x00004a13,0x000049c3,
44410x00000002,0x00000004,0x00050080,0x00000006,
44420x00004661,0x00005da9,0x00000280,0x00050089,
44430x00000006,0x00004662,0x00004661,0x00000470,
44440x0004003d,0x00000006,0x00004664,0x00004647,
44450x00060041,0x000000e5,0x00004665,0x00004555,
44460x00005d9f,0x00004662,0x0004003d,0x000000df,
44470x00004666,0x00004665,0x00050084,0x00000006,
44480x00004a56,0x000001c4,0x00004664,0x00050080,
44490x00000006,0x00004a57,0x000048b0,0x00004a56,
44500x00050080,0x00000006,0x00004a3c,0x00004a57,
44510x00000500,0x00050051,0x00000006,0x00004a41,
44520x00004666,0x00000000,0x00050095,0x0000013d,
44530x00004a6f,0x000048c9,0x00004a3c,0x00050051,
44540x00000006,0x00004a70,0x00004a6f,0x00000001,
44550x00050051,0x00000006,0x00004a71,0x00004a6f,
44560x00000000,0x00050080,0x00000006,0x00004a76,
44570x000048d0,0x00004a70,0x00050050,0x00000007,
44580x00004a77,0x00004a71,0x00004a76,0x0004007c,
44590x00000014,0x00004a67,0x00004a77,0x00060041,
44600x0000016c,0x00004a5f,0x00004a67,0x0000016b,
44610x0000016b,0x0005003e,0x00004a5f,0x00004a41,
44620x00000002,0x00000004,0x00050080,0x00000006,
44630x00004a44,0x00004a57,0x0000050b,0x00050051,
44640x00000006,0x00004a48,0x00004666,0x00000001,
44650x00050095,0x0000013d,0x00004a8f,0x000048c9,
44660x00004a44,0x00050051,0x00000006,0x00004a90,
44670x00004a8f,0x00000001,0x00050051,0x00000006,
44680x00004a91,0x00004a8f,0x00000000,0x00050080,
44690x00000006,0x00004a96,0x000048d0,0x00004a90,
44700x00050050,0x00000007,0x00004a97,0x00004a91,
44710x00004a96,0x0004007c,0x00000014,0x00004a87,
44720x00004a97,0x00060041,0x0000016c,0x00004a7f,
44730x00004a87,0x0000016b,0x0000016b,0x0005003e,
44740x00004a7f,0x00004a48,0x00000002,0x00000004,
44750x00050080,0x00000006,0x00004a4b,0x00004a57,
44760x00000516,0x00050051,0x00000006,0x00004a4f,
44770x00004666,0x00000002,0x00050095,0x0000013d,
44780x00004aaf,0x000048c9,0x00004a4b,0x00050051,
44790x00000006,0x00004ab0,0x00004aaf,0x00000001,
44800x00050051,0x00000006,0x00004ab1,0x00004aaf,
44810x00000000,0x00050080,0x00000006,0x00004ab6,
44820x000048d0,0x00004ab0,0x00050050,0x00000007,
44830x00004ab7,0x00004ab1,0x00004ab6,0x0004007c,
44840x00000014,0x00004aa7,0x00004ab7,0x00060041,
44850x0000016c,0x00004a9f,0x00004aa7,0x0000016b,
44860x0000016b,0x0005003e,0x00004a9f,0x00004a4f,
44870x00000002,0x00000004,0x0004003d,0x00000006,
44880x0000466a,0x00004647,0x00050084,0x00000006,
44890x00004abd,0x000001c4,0x0000466a,0x00050080,
44900x00000006,0x00004abe,0x000048b0,0x00004abd,
44910x00050080,0x00000006,0x0000466c,0x00004abe,
44920x00000537,0x00050041,0x00000009,0x0000466e,
44930x0000400e,0x00005d9f,0x0004003d,0x00000006,
44940x0000466f,0x0000466e,0x00050084,0x00000006,
44950x00004ac4,0x000001c4,0x0000466f,0x00050080,
44960x00000006,0x00004ac5,0x000048b0,0x00004ac4,
44970x00050080,0x00000006,0x00004671,0x00004ac5,
44980x0000052d,0x00050095,0x0000013d,0x00004ade,
44990x000048c9,0x00004671,0x00050051,0x00000006,
45000x00004adf,0x00004ade,0x00000001,0x00050051,
45010x00000006,0x00004ae0,0x00004ade,0x00000000,
45020x00050080,0x00000006,0x00004ae5,0x000048d0,
45030x00004adf,0x00050050,0x00000007,0x00004ae6,
45040x00004ae0,0x00004ae5,0x0004007c,0x00000014,
45050x00004ad6,0x00004ae6,0x00060041,0x0000016c,
45060x00004acd,0x00004ad6,0x0000016b,0x0000016b,
45070x0006003d,0x00000006,0x00004ace,0x00004acd,
45080x00000002,0x00000004,0x00050095,0x0000013d,
45090x00004afe,0x000048c9,0x0000466c,0x00050051,
45100x00000006,0x00004aff,0x00004afe,0x00000001,
45110x00050051,0x00000006,0x00004b00,0x00004afe,
45120x00000000,0x00050080,0x00000006,0x00004b05,
45130x000048d0,0x00004aff,0x00050050,0x00000007,
45140x00004b06,0x00004b00,0x00004b05,0x0004007c,
45150x00000014,0x00004af6,0x00004b06,0x00060041,
45160x0000016c,0x00004aee,0x00004af6,0x0000016b,
45170x0000016b,0x0005003e,0x00004aee,0x00004ace,
45180x00000002,0x00000004,0x00050082,0x00000006,
45190x00004679,0x00000364,0x00005da4,0x00050089,
45200x00000006,0x0000467a,0x00004679,0x00000470,
45210x00050082,0x00000006,0x0000467c,0x00000355,
45220x00005da4,0x00050089,0x00000006,0x0000467d,
45230x0000467c,0x00000470,0x000500c4,0x00000006,
45240x0000467e,0x0000467d,0x00000315,0x000500c5,
45250x00000006,0x0000467f,0x0000467a,0x0000467e,
45260x00050082,0x00000006,0x00004681,0x00000355,
45270x00005da9,0x00050089,0x00000006,0x00004682,
45280x00004681,0x00000470,0x00050082,0x00000006,
45290x00004684,0x00000d2b,0x00005da9,0x00050089,
45300x00000006,0x00004685,0x00004684,0x00000470,
45310x000500c4,0x00000006,0x00004686,0x00004685,
45320x00000315,0x000500c5,0x00000006,0x00004687,
45330x00004682,0x00004686,0x0004003d,0x00000006,
45340x0000468a,0x00004647,0x00050084,0x00000006,
45350x00004b0c,0x000001c4,0x0000468a,0x00050080,
45360x00000006,0x00004b0d,0x000048b0,0x00004b0c,
45370x00050080,0x00000006,0x0000468c,0x00004b0d,
45380x00000541,0x000500c4,0x00000006,0x0000468f,
45390x00004687,0x000004c1,0x000500c5,0x00000006,
45400x00004690,0x0000467f,0x0000468f,0x00050095,
45410x0000013d,0x00004b25,0x000048c9,0x0000468c,
45420x00050051,0x00000006,0x00004b26,0x00004b25,
45430x00000001,0x00050051,0x00000006,0x00004b27,
45440x00004b25,0x00000000,0x00050080,0x00000006,
45450x00004b2c,0x000048d0,0x00004b26,0x00050050,
45460x00000007,0x00004b2d,0x00004b27,0x00004b2c,
45470x0004007c,0x00000014,0x00004b1d,0x00004b2d,
45480x00060041,0x0000016c,0x00004b15,0x00004b1d,
45490x0000016b,0x0000016b,0x0005003e,0x00004b15,
45500x00004690,0x00000002,0x00000004,0x00050041,
45510x00000009,0x00004696,0x0000400f,0x00005d9d,
45520x0004003d,0x00000006,0x00004697,0x00004696,
45530x000500c7,0x00000006,0x00004698,0x00004697,
45540x00000d45,0x000500c5,0x00000006,0x00004699,
45550x00004698,0x00000142,0x00050041,0x00000009,
45560x0000469a,0x0000400f,0x00005d9f,0x0003003e,
45570x0000469a,0x00004699,0x000200f9,0x0000469e,
45580x000200f8,0x0000469b,0x00050080,0x00000006,
45590x0000469d,0x00005d9f,0x00000264,0x000200f9,
45600x000045e3,0x000200f8,0x0000469e,0x000200f9,
45610x0000469f,0x000200f8,0x0000469f,0x00050080,
45620x00000006,0x000046a1,0x00005d9d,0x00000264,
45630x000200f9,0x000045cd,0x000200f8,0x000046a2,
45640x0004003d,0x000000ed,0x000040ac,0x0000400f,
45650x0003003e,0x00003ff3,0x000040ac,0x000200f9,
45660x000040ad,0x000200f8,0x000040ad,0x000200f9,
45670x000040ae,0x000200f8,0x0000402f,0x000500aa,
45680x0000002f,0x00004032,0x0000402d,0x00000142,
45690x000300f7,0x0000403d,0x00000000,0x000400fa,
45700x00004032,0x00004033,0x0000403d,0x000200f8,
45710x00004033,0x00050041,0x000001bb,0x0000411c,
45720x000001b9,0x000001ba,0x0004003d,0x00000006,
45730x0000411d,0x0000411c,0x00050084,0x00000006,
45740x0000411e,0x000000ec,0x0000411d,0x00050080,
45750x00000006,0x0000411f,0x000001c4,0x0000411e,
45760x00050041,0x00000266,0x00004035,0x000001b9,
45770x00000264,0x0004003d,0x00000007,0x00004036,
45780x00004035,0x00050051,0x00000006,0x00004136,
45790x00004036,0x00000000,0x00050095,0x0000013d,
45800x00004138,0x00004136,0x0000411f,0x00050051,
45810x00000006,0x00004139,0x00004138,0x00000001,
45820x00050051,0x00000006,0x0000413a,0x00004138,
45830x00000000,0x00050051,0x00000006,0x0000413d,
45840x00004036,0x00000001,0x00050080,0x00000006,
45850x0000413f,0x0000413d,0x00004139,0x00050050,
45860x00000007,0x00004140,0x0000413a,0x0000413f,
45870x0004007c,0x00000014,0x00004130,0x00004140,
45880x00060041,0x0000016c,0x00004127,0x00004130,
45890x0000016b,0x0000016b,0x0006003d,0x00000006,
45900x00004128,0x00004127,0x00000002,0x00000004,
45910x00050041,0x00000009,0x00004038,0x00003ff4,
45920x0000016b,0x0003003e,0x00004038,0x00004128,
45930x0004003d,0x00000006,0x0000403a,0x00004038,
45940x00050041,0x000001bb,0x00004143,0x000001b9,
45950x0000034a,0x0004003d,0x00000006,0x00004144,
45960x00004143,0x00050041,0x000001bb,0x00004154,
45970x000001b9,0x00000334,0x0004003d,0x00000006,
45980x00004155,0x00004154,0x000500c7,0x00000006,
45990x00004156,0x00004155,0x00000142,0x000500ab,
46000x0000002f,0x00004157,0x00004156,0x00000138,
46010x000600a9,0x00000006,0x00004151,0x00004157,
46020x00000342,0x000001c4,0x00050084,0x00000006,
46030x00004147,0x0000403a,0x00004151,0x00050080,
46040x00000006,0x00004148,0x00004144,0x00004147,
46050x000500c2,0x00000006,0x00004149,0x00004148,
46060x00000351,0x000500c4,0x00000006,0x0000414a,
46070x00004149,0x0000031d,0x000600a9,0x00000006,
46080x0000414c,0x00004157,0x00000355,0x00000138,
46090x000500c5,0x00000006,0x0000414d,0x0000414a,
46100x0000414c,0x00050041,0x00000009,0x0000403c,
46110x00003ff3,0x0000016b,0x0003003e,0x0000403c,
46120x0000414d,0x000200f9,0x0000403d,0x000200f8,
46130x0000403d,0x000200f9,0x000040ae,0x000200f8,
46140x000040ae,0x000700f5,0x00000006,0x00005dd8,
46150x00000138,0x0000403d,0x00004268,0x000040ad,
46160x000200f9,0x000040af,0x000200f8,0x000040af,
46170x000700f5,0x00000006,0x00005dd6,0x00000138,
46180x000040ae,0x000040c8,0x000040c6,0x000500b0,
46190x0000002f,0x000040b2,0x00005dd6,0x000000ec,
46200x000400f6,0x000040c9,0x000040c6,0x00000000,
46210x000400fa,0x000040b2,0x000040b3,0x000040c9,
46220x000200f8,0x000040b3,0x00050041,0x00000009,
46230x000040b5,0x00003ff4,0x00005dd6,0x0004003d,
46240x00000006,0x000040b6,0x000040b5,0x000500ab,
46250x0000002f,0x000040b7,0x000040b6,0x00000539,
46260x000300f7,0x000040c5,0x00000000,0x000400fa,
46270x000040b7,0x000040b8,0x000040c5,0x000200f8,
46280x000040b8,0x00050041,0x000001bb,0x00004b74,
46290x000001b9,0x000001ba,0x0004003d,0x00000006,
46300x00004b75,0x00004b74,0x00050084,0x00000006,
46310x00004b76,0x000001db,0x00004b75,0x00050080,
46320x00000006,0x00004b77,0x000001c4,0x00004b76,
46330x00050080,0x00000006,0x00004b7d,0x00004b75,
46340x0000062f,0x00050086,0x00000006,0x00004b7e,
46350x00004b7d,0x000001be,0x00050084,0x00000006,
46360x00004b70,0x000001c4,0x00004b7e,0x00050080,
46370x00000006,0x00004b71,0x00004b77,0x00004b70,
46380x00050080,0x00000006,0x00004b6b,0x00004b71,
46390x00004b70,0x00050084,0x00000006,0x00004b64,
46400x000001ef,0x0000402d,0x00050080,0x00000006,
46410x00004b65,0x00004b6b,0x00004b64,0x00050041,
46420x000001bb,0x00004b5b,0x000001b9,0x00000206,
46430x0004003d,0x00000006,0x00004b5c,0x00004b5b,
46440x00050084,0x00000006,0x00004b5d,0x00000205,
46450x00004b5c,0x00050080,0x00000006,0x00004b5e,
46460x00004b65,0x00004b5d,0x000500ac,0x0000002f,
46470x00004b8b,0x0000402d,0x00000142,0x000300f7,
46480x00004b91,0x00000000,0x000400fa,0x00004b8b,
46490x00004b8c,0x00004b90,0x000200f8,0x00004b90,
46500x000200f9,0x00004b91,0x000200f8,0x00004b8c,
46510x00050082,0x00000006,0x00004b8f,0x0000402d,
46520x00000142,0x000200f9,0x00004b91,0x000200f8,
46530x00004b91,0x000700f5,0x00000006,0x00005e32,
46540x00004b8f,0x00004b8c,0x00000138,0x00004b90,
46550x00050084,0x00000006,0x00004b56,0x000000ec,
46560x00005e32,0x00050080,0x00000006,0x00004b57,
46570x00004b5e,0x00004b56,0x000300f7,0x00004b9e,
46580x00000000,0x000400fa,0x00004b8b,0x00004b99,
46590x00004b9d,0x000200f8,0x00004b9d,0x000200f9,
46600x00004b9e,0x000200f8,0x00004b99,0x00050082,
46610x00000006,0x00004b9c,0x0000402d,0x00000142,
46620x000200f9,0x00004b9e,0x000200f8,0x00004b9e,
46630x000700f5,0x00000006,0x00005e33,0x00004b9c,
46640x00004b99,0x00000138,0x00004b9d,0x00050084,
46650x00000006,0x00004b50,0x000000ec,0x00005e33,
46660x00050080,0x00000006,0x00004b51,0x00004b57,
46670x00004b50,0x000300f7,0x00004bab,0x00000000,
46680x000400fa,0x00004b8b,0x00004ba6,0x00004baa,
46690x000200f8,0x00004baa,0x000200f9,0x00004bab,
46700x000200f8,0x00004ba6,0x00050082,0x00000006,
46710x00004ba9,0x0000402d,0x00000142,0x000200f9,
46720x00004bab,0x000200f8,0x00004bab,0x000700f5,
46730x00000006,0x00005e34,0x00004ba9,0x00004ba6,
46740x00000138,0x00004baa,0x00050084,0x00000006,
46750x00004b4a,0x000000ec,0x00005e34,0x00050080,
46760x00000006,0x00004b4b,0x00004b51,0x00004b4a,
46770x000300f7,0x00004bb8,0x00000000,0x000400fa,
46780x00004b8b,0x00004bb3,0x00004bb7,0x000200f8,
46790x00004bb7,0x000200f9,0x00004bb8,0x000200f8,
46800x00004bb3,0x00050082,0x00000006,0x00004bb6,
46810x0000402d,0x00000142,0x000200f9,0x00004bb8,
46820x000200f8,0x00004bb8,0x000700f5,0x00000006,
46830x00005e35,0x00004bb6,0x00004bb3,0x00000138,
46840x00004bb7,0x00050084,0x00000006,0x00004b44,
46850x000000ec,0x00005e35,0x00050080,0x00000006,
46860x00004b45,0x00004b4b,0x00004b44,0x000300f7,
46870x00004bc5,0x00000000,0x000400fa,0x00004b8b,
46880x00004bc0,0x00004bc4,0x000200f8,0x00004bc4,
46890x000200f9,0x00004bc5,0x000200f8,0x00004bc0,
46900x00050082,0x00000006,0x00004bc3,0x0000402d,
46910x00000142,0x000200f9,0x00004bc5,0x000200f8,
46920x00004bc5,0x000700f5,0x00000006,0x00005e36,
46930x00004bc3,0x00004bc0,0x00000138,0x00004bc4,
46940x00050084,0x00000006,0x00004b3e,0x000000ec,
46950x00005e36,0x00050080,0x00000006,0x00004b3f,
46960x00004b45,0x00004b3e,0x000300f7,0x00004bd8,
46970x00000000,0x000400fa,0x00004b8b,0x00004bd3,
46980x00004bd7,0x000200f8,0x00004bd7,0x000200f9,
46990x00004bd8,0x000200f8,0x00004bd3,0x00050082,
47000x00000006,0x00004bd6,0x0000402d,0x00000142,
47010x000200f9,0x00004bd8,0x000200f8,0x00004bd8,
47020x000700f5,0x00000006,0x00005e37,0x00004bd6,
47030x00004bd3,0x00000138,0x00004bd7,0x00050080,
47040x00000006,0x00004bcb,0x00005e37,0x0000062f,
47050x00050086,0x00000006,0x00004bcc,0x00004bcb,
47060x000001be,0x00050084,0x00000006,0x00004b38,
47070x000000ec,0x00004bcc,0x00050080,0x00000006,
47080x00004b39,0x00004b3f,0x00004b38,0x000300f7,
47090x00004beb,0x00000000,0x000400fa,0x00004b8b,
47100x00004be6,0x00004bea,0x000200f8,0x00004bea,
47110x000200f9,0x00004beb,0x000200f8,0x00004be6,
47120x00050082,0x00000006,0x00004be9,0x0000402d,
47130x00000142,0x000200f9,0x00004beb,0x000200f8,
47140x00004beb,0x000700f5,0x00000006,0x00005e38,
47150x00004be9,0x00004be6,0x00000138,0x00004bea,
47160x00050080,0x00000006,0x00004bde,0x00005e38,
47170x0000062f,0x00050086,0x00000006,0x00004bdf,
47180x00004bde,0x000001be,0x00050084,0x00000006,
47190x00004b32,0x000000ec,0x00004bdf,0x00050080,
47200x00000006,0x00004b33,0x00004b39,0x00004b32,
47210x0004003d,0x00000006,0x000040bc,0x000040b5,
47220x00050084,0x00000006,0x000040bd,0x000000ec,
47230x000040bc,0x00050080,0x00000006,0x000040be,
47240x00004b33,0x000040bd,0x00050041,0x00000266,
47250x000040c0,0x000001b9,0x00000264,0x0004003d,
47260x00000007,0x000040c1,0x000040c0,0x00050041,
47270x00000009,0x000040c2,0x00003ff3,0x00005dd6,
47280x0004003d,0x00000006,0x000040c3,0x000040c2,
47290x00050051,0x00000006,0x00004c02,0x000040c1,
47300x00000000,0x00050095,0x0000013d,0x00004c04,
47310x00004c02,0x000040be,0x00050051,0x00000006,
47320x00004c05,0x00004c04,0x00000001,0x00050051,
47330x00000006,0x00004c06,0x00004c04,0x00000000,
47340x00050051,0x00000006,0x00004c09,0x000040c1,
47350x00000001,0x00050080,0x00000006,0x00004c0b,
47360x00004c09,0x00004c05,0x00050050,0x00000007,
47370x00004c0c,0x00004c06,0x00004c0b,0x0004007c,
47380x00000014,0x00004bfc,0x00004c0c,0x00060041,
47390x0000016c,0x00004bf4,0x00004bfc,0x0000016b,
47400x0000016b,0x0005003e,0x00004bf4,0x000040c3,
47410x00000002,0x00000004,0x000200f9,0x000040c5,
47420x000200f8,0x000040c5,0x000200f9,0x000040c6,
47430x000200f8,0x000040c6,0x00050080,0x00000006,
47440x000040c8,0x00005dd6,0x00000264,0x000200f9,
47450x000040af,0x000200f8,0x000040c9,0x00050041,
47460x000001bb,0x00004c0f,0x000001b9,0x0000035a,
47470x0004003d,0x00000006,0x00004c10,0x00004c0f,
47480x00050041,0x000001bb,0x00004c20,0x000001b9,
47490x00000334,0x0004003d,0x00000006,0x00004c21,
47500x00004c20,0x000500c7,0x00000006,0x00004c22,
47510x00004c21,0x00000280,0x000500ab,0x0000002f,
47520x00004c23,0x00004c22,0x00000138,0x000600a9,
47530x00000006,0x00004c1d,0x00004c23,0x000001c4,
47540x00000342,0x00050084,0x00000006,0x00004c13,
47550x00005dd8,0x00004c1d,0x00050080,0x00000006,
47560x00004c14,0x00004c10,0x00004c13,0x000500c2,
47570x00000006,0x00004c15,0x00004c14,0x00000351,
47580x000500c4,0x00000006,0x00004c16,0x00004c15,
47590x0000031d,0x000600a9,0x00000006,0x00004c18,
47600x00004c23,0x000000ec,0x00000364,0x000500c5,
47610x00000006,0x00004c19,0x00004c16,0x00004c18,
47620x000200f9,0x000040d2,0x000200f8,0x000040d2,
47630x000700f5,0x00000006,0x00005dfb,0x00000138,
47640x000040c9,0x00004100,0x000040fe,0x000500b0,
47650x0000002f,0x000040d5,0x00005dfb,0x000000ec,
47660x000400f6,0x00004101,0x000040fe,0x00000000,
47670x000400fa,0x000040d5,0x000040d6,0x00004101,
47680x000200f8,0x000040d6,0x00050084,0x00000006,
47690x000040d9,0x000000ec,0x00005dfb,0x00050080,
47700x00000006,0x000040da,0x00004c14,0x000040d9,
47710x00050041,0x00000266,0x000040dc,0x000001b9,
47720x0000016b,0x0004003d,0x00000007,0x000040dd,
47730x000040dc,0x00050041,0x00000009,0x000040de,
47740x00003ff3,0x00005dfb,0x0004003d,0x00000006,
47750x000040df,0x000040de,0x00050051,0x00000006,
47760x00004c49,0x000040dd,0x00000000,0x00050095,
47770x0000013d,0x00004c4b,0x00004c49,0x000040da,
48820x00050051,0x00000006,0x00004c4c,0x00004c4b, 47780x00050051,0x00000006,0x00004c4c,0x00004c4b,
48830x00000001,0x00050051,0x00000006,0x00004c4d, 47790x00000001,0x00050051,0x00000006,0x00004c4d,
48840x00004c4b,0x00000000,0x00050080,0x00000006, 47800x00004c4b,0x00000000,0x00050051,0x00000006,
48850x00004c52,0x000048c4,0x00004c4c,0x00050050, 47810x00004c50,0x000040dd,0x00000001,0x00050080,
48860x00000007,0x00004c53,0x00004c4d,0x00004c52, 47820x00000006,0x00004c52,0x00004c50,0x00004c4c,
48870x0004007c,0x00000014,0x00004c43,0x00004c53, 47830x00050050,0x00000007,0x00004c53,0x00004c4d,
48880x00060041,0x0000015f,0x00004c3b,0x00004c43, 47840x00004c52,0x0004007c,0x00000014,0x00004c43,
48890x0000015e,0x0000015e,0x0005003e,0x00004c3b, 47850x00004c53,0x00060041,0x0000016c,0x00004c3b,
48900x00000345,0x00000002,0x00000004,0x00050080, 47860x00004c43,0x0000016b,0x0000016b,0x0005003e,
48910x00000006,0x00004930,0x0000491a,0x0000019b, 47870x00004c3b,0x000040df,0x00000002,0x00000004,
48920x00050095,0x00000130,0x00004c74,0x000048bd, 47880x0004003d,0x00000006,0x000040e3,0x000040de,
48930x00004930,0x00050051,0x00000006,0x00004c75, 47890x000500ab,0x0000002f,0x000040e4,0x000040e3,
48940x00004c74,0x00000001,0x00050051,0x00000006, 47900x00000539,0x000300f7,0x000040f6,0x00000000,
48950x00004c76,0x00004c74,0x00000000,0x00050080, 47910x000400fa,0x000040e4,0x000040e5,0x000040f6,
48960x00000006,0x00004c7b,0x000048c4,0x00004c75, 47920x000200f8,0x000040e5,0x00050041,0x000001bb,
48970x00050050,0x00000007,0x00004c7c,0x00004c76, 47930x000040e6,0x000001b9,0x000010be,0x0004003d,
48980x00004c7b,0x0004007c,0x00000014,0x00004c6c, 47940x00000006,0x000040e7,0x000040e6,0x0004003d,
48990x00004c7c,0x00060041,0x0000015f,0x00004c64, 47950x00000006,0x000040ea,0x000040de,0x000500c2,
49000x00004c6c,0x0000015e,0x0000015e,0x0005003e, 47960x00000006,0x00004c57,0x000040ea,0x0000031d,
49010x00004c64,0x00005cc5,0x00000002,0x00000004, 47970x00050041,0x000001bb,0x000040ec,0x000001b9,
49020x00050080,0x00000006,0x00004937,0x0000491a, 47980x0000034a,0x0004003d,0x00000006,0x000040ed,
49030x000001a2,0x00050095,0x00000130,0x00004c9d, 47990x000040ec,0x00050086,0x00000006,0x000040ee,
49040x000048bd,0x00004937,0x00050051,0x00000006, 48000x000040ed,0x000001c4,0x00050082,0x00000006,
49050x00004c9e,0x00004c9d,0x00000001,0x00050051, 48010x000040ef,0x00004c57,0x000040ee,0x00050084,
49060x00000006,0x00004c9f,0x00004c9d,0x00000000, 48020x00000006,0x000040f0,0x000000ec,0x000040ef,
49070x00050080,0x00000006,0x00004ca4,0x000048c4, 48030x00050080,0x00000006,0x000040f1,0x000040e7,
49080x00004c9e,0x00050050,0x00000007,0x00004ca5, 48040x000040f0,0x00050095,0x0000013d,0x00004c6f,
49090x00004c9f,0x00004ca4,0x0004007c,0x00000014, 48050x00004c49,0x000040f1,0x00050051,0x00000006,
49100x00004c95,0x00004ca5,0x00060041,0x0000015f, 48060x00004c70,0x00004c6f,0x00000001,0x00050051,
49110x00004c8d,0x00004c95,0x0000015e,0x0000015e, 48070x00000006,0x00004c71,0x00004c6f,0x00000000,
49120x0005003e,0x00004c8d,0x00005cc5,0x00000002, 48080x00050080,0x00000006,0x00004c76,0x00004c50,
49130x00000004,0x00050080,0x00000006,0x0000493e, 48090x00004c70,0x00050050,0x00000007,0x00004c77,
49140x0000491a,0x00000260,0x00050095,0x00000130, 48100x00004c71,0x00004c76,0x0004007c,0x00000014,
49150x00004cc6,0x000048bd,0x0000493e,0x00050051, 48110x00004c67,0x00004c77,0x00060041,0x0000016c,
49160x00000006,0x00004cc7,0x00004cc6,0x00000001, 48120x00004c5f,0x00004c67,0x0000016b,0x0000016b,
49170x00050051,0x00000006,0x00004cc8,0x00004cc6, 48130x0005003e,0x00004c5f,0x00004c19,0x00000002,
49180x00000000,0x00050080,0x00000006,0x00004ccd, 48140x00000004,0x000200f9,0x000040fe,0x000200f8,
49190x000048c4,0x00004cc7,0x00050050,0x00000007, 48150x000040f6,0x000300f7,0x00004cd0,0x00000000,
49200x00004cce,0x00004cc8,0x00004ccd,0x0004007c, 48160x000300fb,0x00000138,0x00004c96,0x000200f8,
49210x00000014,0x00004cbe,0x00004cce,0x00060041, 48170x00004c96,0x000300f7,0x00004ca1,0x00000000,
49220x0000015f,0x00004cb6,0x00004cbe,0x0000015e, 48180x000400fa,0x00004c23,0x00004c98,0x00004ca1,
49230x0000015e,0x0005003e,0x00004cb6,0x00005cc5, 48190x000200f8,0x00004c98,0x00050080,0x00000006,
49240x00000002,0x00000004,0x000200f9,0x00004944, 48200x00004c9a,0x00004c14,0x000001db,0x00050084,
49250x000200f8,0x00004944,0x000200f9,0x00003d72, 48210x00000006,0x00004c9c,0x000001d4,0x00005dfb,
49260x000200f8,0x00003d72,0x00050080,0x00000006, 48220x00050080,0x00000006,0x00004c9d,0x00004c9a,
49270x00003d74,0x00005a33,0x0000022b,0x000200f9, 48230x00004c9c,0x00050095,0x0000013d,0x00004dcc,
49280x00003d46,0x000200f8,0x00003d75,0x000400a8, 48240x00004c49,0x00004c9d,0x00050051,0x00000006,
49290x0000002f,0x00003d77,0x00004897,0x000300f7, 48250x00004dcd,0x00004dcc,0x00000001,0x00050051,
49300x00003d8a,0x00000000,0x000400fa,0x00003d77, 48260x00000006,0x00004dce,0x00004dcc,0x00000000,
49310x00003d78,0x00003d8a,0x000200f8,0x00003d78, 48270x00050080,0x00000006,0x00004dd3,0x00004c50,
49320x000200f9,0x00003d79,0x000200f8,0x00003d79, 48280x00004dcd,0x00050050,0x00000007,0x00004dd4,
49330x000700f5,0x00000006,0x00005a34,0x0000012b, 48290x00004dce,0x00004dd3,0x0004007c,0x00000014,
49340x00003d78,0x00003d88,0x00003d7d,0x000500b0, 48300x00004dc4,0x00004dd4,0x00060041,0x0000016c,
49350x0000002f,0x00003d7c,0x00005a34,0x000000df, 48310x00004dbc,0x00004dc4,0x0000016b,0x0000016b,
49360x000400f6,0x00003d89,0x00003d7d,0x00000000, 48320x0005003e,0x00004dbc,0x00006112,0x00000002,
49370x000400fa,0x00003d7c,0x00003d7d,0x00003d89, 48330x00000004,0x00050080,0x00000006,0x00004cf4,
49380x000200f8,0x00003d7d,0x00050080,0x00000006, 48340x00004c9d,0x000000ec,0x00050095,0x0000013d,
49390x00003d7f,0x00004888,0x00000741,0x00050084, 48350x00004e94,0x00004c49,0x00004cf4,0x00050051,
49400x00000006,0x00003d81,0x000000df,0x00005a34, 48360x00000006,0x00004e95,0x00004e94,0x00000001,
49410x00050080,0x00000006,0x00003d82,0x00003d7f, 48370x00050051,0x00000006,0x00004e96,0x00004e94,
49420x00003d81,0x00050041,0x0000022d,0x00003d83, 48380x00000000,0x00050080,0x00000006,0x00004e9b,
49430x00000180,0x0000015e,0x0004003d,0x00000007, 48390x00004c50,0x00004e95,0x00050050,0x00000007,
49440x00003d84,0x00003d83,0x00050051,0x00000006, 48400x00004e9c,0x00004e96,0x00004e9b,0x0004007c,
49450x00004cea,0x00003d84,0x00000000,0x00050095, 48410x00000014,0x00004e8c,0x00004e9c,0x00060041,
49460x00000130,0x00004cec,0x00004cea,0x00003d82, 48420x0000016c,0x00004e84,0x00004e8c,0x0000016b,
49470x00050051,0x00000006,0x00004ced,0x00004cec, 48430x0000016b,0x0005003e,0x00004e84,0x00006114,
49480x00000001,0x00050051,0x00000006,0x00004cee, 48440x00000002,0x00000004,0x00050080,0x00000006,
49490x00004cec,0x00000000,0x00050051,0x00000006, 48450x00004d01,0x00004c9d,0x000001cd,0x00050095,
49500x00004cf1,0x00003d84,0x00000001,0x00050080, 48460x0000013d,0x00004f5c,0x00004c49,0x00004d01,
49510x00000006,0x00004cf3,0x00004cf1,0x00004ced, 48470x00050051,0x00000006,0x00004f5d,0x00004f5c,
49520x00050050,0x00000007,0x00004cf4,0x00004cee, 48480x00000001,0x00050051,0x00000006,0x00004f5e,
49530x00004cf3,0x0004007c,0x00000014,0x00004ce4, 48490x00004f5c,0x00000000,0x00050080,0x00000006,
49540x00004cf4,0x00060041,0x0000015f,0x00004cdc, 48500x00004f63,0x00004c50,0x00004f5d,0x00050050,
49550x00004ce4,0x0000015e,0x0000015e,0x0005003e, 48510x00000007,0x00004f64,0x00004f5e,0x00004f63,
49560x00004cdc,0x0000012b,0x00000002,0x00000004, 48520x0004007c,0x00000014,0x00004f54,0x00004f64,
49570x00050080,0x00000006,0x00003d88,0x00005a34, 48530x00060041,0x0000016c,0x00004f4c,0x00004f54,
49580x0000022b,0x000200f9,0x00003d79,0x000200f8, 48540x0000016b,0x0000016b,0x0005003e,0x00004f4c,
49590x00003d89,0x000200f9,0x00003d8a,0x000200f8, 48550x00006115,0x00000002,0x00000004,0x000200f9,
49600x00003d8a,0x00050041,0x00000182,0x00004d28, 48560x00004cd0,0x000200f8,0x00004ca1,0x00050080,
49610x00000180,0x00000181,0x0004003d,0x00000006, 48570x00000006,0x00004ca3,0x00004c14,0x000001db,
49620x00004d29,0x00004d28,0x00050084,0x00000006, 48580x00050084,0x00000006,0x00004ca5,0x000001ef,
49630x00004d2a,0x000001a2,0x00004d29,0x00050080, 48590x00005dfb,0x00050080,0x00000006,0x00004ca6,
49640x00000006,0x00004d2b,0x0000018b,0x00004d2a, 48600x00004ca3,0x00004ca5,0x00050095,0x0000013d,
49650x00050080,0x00000006,0x00004d31,0x00004d29, 48610x00004f85,0x00004c49,0x00004ca6,0x00050051,
49660x00005cc3,0x00050086,0x00000006,0x00004d32, 48620x00000006,0x00004f86,0x00004f85,0x00000001,
49670x00004d31,0x00000185,0x00050084,0x00000006, 48630x00050051,0x00000006,0x00004f87,0x00004f85,
49680x00004d24,0x0000018b,0x00004d32,0x00050080, 48640x00000000,0x00050080,0x00000006,0x00004f8c,
49690x00000006,0x00004d25,0x00004d2b,0x00004d24, 48650x00004c50,0x00004f86,0x00050050,0x00000007,
49700x00050080,0x00000006,0x00004d1f,0x00004d25, 48660x00004f8d,0x00004f87,0x00004f8c,0x0004007c,
49710x00004d24,0x00050084,0x00000006,0x00004d18, 48670x00000014,0x00004f7d,0x00004f8d,0x00060041,
49720x000001b6,0x00003ca1,0x00050080,0x00000006, 48680x0000016c,0x00004f75,0x00004f7d,0x0000016b,
49730x00004d19,0x00004d1f,0x00004d18,0x00050084, 48690x0000016b,0x0005003e,0x00004f75,0x0000037e,
49740x00000006,0x00004d0e,0x000001cc,0x00005a10, 48700x00000002,0x00000004,0x00050080,0x00000006,
49750x00050080,0x00000006,0x00004d0f,0x00004d19, 48710x00004cae,0x00004ca6,0x000000ec,0x00050095,
49760x00004d0e,0x00050041,0x0000022d,0x00004d10, 48720x0000013d,0x00004fae,0x00004c49,0x00004cae,
49770x00000180,0x0000022b,0x0004003d,0x00000007, 48730x00050051,0x00000006,0x00004faf,0x00004fae,
49780x00004d11,0x00004d10,0x00050051,0x00000006, 48740x00000001,0x00050051,0x00000006,0x00004fb0,
49790x00004d47,0x00004d11,0x00000000,0x00050095, 48750x00004fae,0x00000000,0x00050080,0x00000006,
49800x00000130,0x00004d49,0x00004d47,0x00004d0f, 48760x00004fb5,0x00004c50,0x00004faf,0x00050050,
49810x00050051,0x00000006,0x00004d4a,0x00004d49, 48770x00000007,0x00004fb6,0x00004fb0,0x00004fb5,
49820x00000001,0x00050051,0x00000006,0x00004d4b, 48780x0004007c,0x00000014,0x00004fa6,0x00004fb6,
49830x00004d49,0x00000000,0x00050051,0x00000006, 48790x00060041,0x0000016c,0x00004f9e,0x00004fa6,
49840x00004d4e,0x00004d11,0x00000001,0x00050080, 48800x0000016b,0x0000016b,0x0005003e,0x00004f9e,
49850x00000006,0x00004d50,0x00004d4e,0x00004d4a, 48810x0000037e,0x00000002,0x00000004,0x00050080,
49860x00050050,0x00000007,0x00004d51,0x00004d4b, 48820x00000006,0x00004cb5,0x00004ca6,0x000001cd,
49870x00004d50,0x0004007c,0x00000014,0x00004d41, 48830x00050095,0x0000013d,0x00004fd7,0x00004c49,
49880x00004d51,0x00060041,0x0000015f,0x00004cfb, 48840x00004cb5,0x00050051,0x00000006,0x00004fd8,
49890x00004d41,0x0000015e,0x0000015e,0x0005003e, 48850x00004fd7,0x00000001,0x00050051,0x00000006,
49900x00004cfb,0x0000012b,0x00000002,0x00000004, 48860x00004fd9,0x00004fd7,0x00000000,0x00050080,
49910x00060041,0x0000015f,0x00004cfd,0x00004d41, 48870x00000006,0x00004fde,0x00004c50,0x00004fd8,
49920x0000015e,0x0000022b,0x0005003e,0x00004cfd, 48880x00050050,0x00000007,0x00004fdf,0x00004fd9,
49930x00000500,0x00000002,0x00000004,0x00060041, 48890x00004fde,0x0004007c,0x00000014,0x00004fcf,
49940x0000015f,0x00004cff,0x00004d41,0x0000015e, 48900x00004fdf,0x00060041,0x0000016c,0x00004fc7,
49950x000002dc,0x0005003e,0x00004cff,0x00000500, 48910x00004fcf,0x0000016b,0x0000016b,0x0005003e,
49960x00000002,0x00000004,0x00060041,0x0000015f, 48920x00004fc7,0x0000037e,0x00000002,0x00000004,
49970x00004d01,0x00004d41,0x0000015e,0x000002e4, 48930x00050080,0x00000006,0x00004cbc,0x00004ca6,
49980x0005003e,0x00004d01,0x00000500,0x00000002, 48940x000001d4,0x00050095,0x0000013d,0x00005000,
49990x00000004,0x00060041,0x0000015f,0x00004d03, 48950x00004c49,0x00004cbc,0x00050051,0x00000006,
50000x00004d41,0x0000015e,0x000002ec,0x0005003e, 48960x00005001,0x00005000,0x00000001,0x00050051,
50010x00004d03,0x0000012b,0x00000002,0x00000004, 48970x00000006,0x00005002,0x00005000,0x00000000,
50020x00060041,0x0000015f,0x00004d05,0x00004d41, 48980x00050080,0x00000006,0x00005007,0x00004c50,
50030x0000015e,0x000002f4,0x0005003e,0x00004d05, 48990x00005001,0x00050050,0x00000007,0x00005008,
50040x0000012b,0x00000002,0x00000004,0x00060041, 49000x00005002,0x00005007,0x0004007c,0x00000014,
50050x0000015f,0x00004d07,0x00004d41,0x0000015e, 49010x00004ff8,0x00005008,0x00060041,0x0000016c,
50060x00000318,0x0005003e,0x00004d07,0x0000012b, 49020x00004ff0,0x00004ff8,0x0000016b,0x0000016b,
50070x00000002,0x00000004,0x000200f9,0x00003d8d, 49030x0005003e,0x00004ff0,0x00006100,0x00000002,
50080x000200f8,0x00003d8d,0x000200f9,0x000012e4, 49040x00000004,0x00050080,0x00000006,0x00004cc3,
50090x000200f8,0x000012e4,0x000200f9,0x000012da, 49050x00004ca6,0x000001db,0x00050095,0x0000013d,
50100x000200f8,0x000012d9,0x0004007c,0x000000e7, 49060x00005029,0x00004c49,0x00004cc3,0x00050051,
50110x000012dc,0x000011de,0x00050080,0x000000e7, 49070x00000006,0x0000502a,0x00005029,0x00000001,
50120x000035dc,0x000012dc,0x0000022b,0x000300f7, 49080x00050051,0x00000006,0x0000502b,0x00005029,
50130x000036bf,0x00000000,0x000300fb,0x0000012b, 49090x00000000,0x00050080,0x00000006,0x00005030,
50140x0000369d,0x000200f8,0x0000369d,0x000500b1, 49100x00004c50,0x0000502a,0x00050050,0x00000007,
50150x0000002f,0x0000369f,0x000035dc,0x0000015e, 49110x00005031,0x0000502b,0x00005030,0x0004007c,
50160x000400a8,0x0000002f,0x000036a0,0x0000369f, 49120x00000014,0x00005021,0x00005031,0x00060041,
50170x000300f7,0x000036a7,0x00000000,0x000400fa, 49130x0000016c,0x00005019,0x00005021,0x0000016b,
50180x000036a0,0x000036a1,0x000036a7,0x000200f8, 49140x0000016b,0x0005003e,0x00005019,0x00006100,
50190x000036a1,0x00050041,0x00000182,0x000036a3, 49150x00000002,0x00000004,0x00050080,0x00000006,
50200x00000180,0x000001b7,0x0004003d,0x00000006, 49160x00004cca,0x00004ca6,0x00000299,0x00050095,
50210x000036a4,0x000036a3,0x0004007c,0x000000e7, 49170x0000013d,0x00005052,0x00004c49,0x00004cca,
50220x000036a5,0x000036a4,0x000500af,0x0000002f, 49180x00050051,0x00000006,0x00005053,0x00005052,
50230x000036a6,0x000035dc,0x000036a5,0x000200f9, 49190x00000001,0x00050051,0x00000006,0x00005054,
50240x000036a7,0x000200f8,0x000036a7,0x000700f5, 49200x00005052,0x00000000,0x00050080,0x00000006,
50250x0000002f,0x000036a8,0x0000369f,0x0000369d, 49210x00005059,0x00004c50,0x00005053,0x00050050,
50260x000036a6,0x000036a1,0x000300f7,0x000036aa, 49220x00000007,0x0000505a,0x00005054,0x00005059,
50270x00000000,0x000400fa,0x000036a8,0x000036a9, 49230x0004007c,0x00000014,0x0000504a,0x0000505a,
50280x000036aa,0x000200f8,0x000036a9,0x000200f9, 49240x00060041,0x0000016c,0x00005042,0x0000504a,
50290x000036bf,0x000200f8,0x000036aa,0x00050084, 49250x0000016b,0x0000016b,0x0005003e,0x00005042,
50300x00000006,0x000036c8,0x000000df,0x000011de, 49260x00006100,0x00000002,0x00000004,0x000200f9,
50310x00050080,0x00000006,0x000036c9,0x0000018b, 49270x00004cd0,0x000200f8,0x00004cd0,0x000200f9,
50320x000036c8,0x00050041,0x0000022d,0x000036ca, 49280x000040fe,0x000200f8,0x000040fe,0x00050080,
50330x00000180,0x0000022b,0x0004003d,0x00000007, 49290x00000006,0x00004100,0x00005dfb,0x00000264,
50340x000036cb,0x000036ca,0x00050051,0x00000006, 49300x000200f9,0x000040d2,0x000200f8,0x00004101,
50350x000036e5,0x000036cb,0x00000000,0x00050095, 49310x000400a8,0x0000002f,0x00004103,0x00004c23,
50360x00000130,0x000036e7,0x000036e5,0x000036c9, 49320x000300f7,0x00004116,0x00000000,0x000400fa,
50370x00050051,0x00000006,0x000036e8,0x000036e7, 49330x00004103,0x00004104,0x00004116,0x000200f8,
50380x00000001,0x00050051,0x00000006,0x000036e9, 49340x00004104,0x000200f9,0x00004105,0x000200f8,
50390x000036e7,0x00000000,0x00050051,0x00000006, 49350x00004105,0x000700f5,0x00000006,0x00005dfc,
50400x000036ec,0x000036cb,0x00000001,0x00050080, 49360x00000138,0x00004104,0x00004114,0x00004109,
50410x00000006,0x000036ee,0x000036ec,0x000036e8, 49370x000500b0,0x0000002f,0x00004108,0x00005dfc,
50420x00050050,0x00000007,0x000036ef,0x000036e9, 49380x000000ec,0x000400f6,0x00004115,0x00004109,
50430x000036ee,0x0004007c,0x00000014,0x000036df, 49390x00000000,0x000400fa,0x00004108,0x00004109,
50440x000036ef,0x00060041,0x0000015f,0x000036d6, 49400x00004115,0x000200f8,0x00004109,0x00050080,
50450x000036df,0x0000015e,0x0000015e,0x0006003d, 49410x00000006,0x0000410b,0x00004c14,0x00000840,
50460x00000006,0x000036d7,0x000036d6,0x00000002, 49420x00050084,0x00000006,0x0000410d,0x000000ec,
50470x00000004,0x0004007c,0x00000006,0x000036f6, 49430x00005dfc,0x00050080,0x00000006,0x0000410e,
50480x000035dc,0x00050084,0x00000006,0x000036f7, 49440x0000410b,0x0000410d,0x00050041,0x00000266,
50490x000000df,0x000036f6,0x00050080,0x00000006, 49450x0000410f,0x000001b9,0x0000016b,0x0004003d,
50500x000036f8,0x0000018b,0x000036f7,0x00050095, 49460x00000007,0x00004110,0x0000410f,0x00050051,
50510x00000130,0x00003716,0x000036e5,0x000036f8, 49470x00000006,0x00005076,0x00004110,0x00000000,
50520x00050051,0x00000006,0x00003717,0x00003716, 49480x00050095,0x0000013d,0x00005078,0x00005076,
50530x00000001,0x00050051,0x00000006,0x00003718, 49490x0000410e,0x00050051,0x00000006,0x00005079,
50540x00003716,0x00000000,0x00050080,0x00000006, 49500x00005078,0x00000001,0x00050051,0x00000006,
50550x0000371d,0x000036ec,0x00003717,0x00050050, 49510x0000507a,0x00005078,0x00000000,0x00050051,
50560x00000007,0x0000371e,0x00003718,0x0000371d, 49520x00000006,0x0000507d,0x00004110,0x00000001,
50570x0004007c,0x00000014,0x0000370e,0x0000371e, 49530x00050080,0x00000006,0x0000507f,0x0000507d,
50580x00060041,0x0000015f,0x00003705,0x0000370e, 49540x00005079,0x00050050,0x00000007,0x00005080,
50590x0000015e,0x0000015e,0x0006003d,0x00000006, 49550x0000507a,0x0000507f,0x0004007c,0x00000014,
50600x00003706,0x00003705,0x00000002,0x00000004, 49560x00005070,0x00005080,0x00060041,0x0000016c,
50610x000500aa,0x0000002f,0x000036b1,0x000036d7, 49570x00005068,0x00005070,0x0000016b,0x0000016b,
50620x00003706,0x000300f7,0x000036b9,0x00000000, 49580x0005003e,0x00005068,0x00000138,0x00000002,
50630x000400fa,0x000036b1,0x000036b2,0x000036b9, 49590x00000004,0x00050080,0x00000006,0x00004114,
50640x000200f8,0x000036b2,0x000500c6,0x000000e7, 49600x00005dfc,0x00000264,0x000200f9,0x00004105,
50650x000036b5,0x000012dc,0x000035dc,0x0004007c, 49610x000200f8,0x00004115,0x000200f9,0x00004116,
50660x00000006,0x000036b6,0x000036b5,0x0006000c, 49620x000200f8,0x00004116,0x00050041,0x000001bb,
50670x000000e7,0x000036b7,0x00000001,0x0000004b, 49630x000050b4,0x000001b9,0x000001ba,0x0004003d,
50680x000036b6,0x00050082,0x000000e7,0x000036b8, 49640x00000006,0x000050b5,0x000050b4,0x00050084,
50690x00000c77,0x000036b7,0x000200f9,0x000036bf, 49650x00000006,0x000050b6,0x000001db,0x000050b5,
50700x000200f8,0x000036b9,0x000500c6,0x00000006, 49660x00050080,0x00000006,0x000050b7,0x000001c4,
50710x000036bc,0x000036d7,0x00003706,0x0006000c, 49670x000050b6,0x00050080,0x00000006,0x000050bd,
50720x000000e7,0x000036bd,0x00000001,0x0000004b, 49680x000050b5,0x0000062f,0x00050086,0x00000006,
50730x000036bc,0x00050082,0x000000e7,0x000036be, 49690x000050be,0x000050bd,0x000001be,0x00050084,
50740x00000c7f,0x000036bd,0x000200f9,0x000036bf, 49700x00000006,0x000050b0,0x000001c4,0x000050be,
50750x000200f8,0x000036bf,0x000900f5,0x000000e7, 49710x00050080,0x00000006,0x000050b1,0x000050b7,
50760x00005a79,0x00000c68,0x000036a9,0x000036b8, 49720x000050b0,0x00050080,0x00000006,0x000050ab,
50770x000036b2,0x000036be,0x000036b9,0x00050082, 49730x000050b1,0x000050b0,0x00050084,0x00000006,
50780x000000e7,0x000035e0,0x000012dc,0x0000022b, 49740x000050a4,0x000001ef,0x0000402d,0x00050080,
50790x000300f7,0x00003749,0x00000000,0x000300fb, 49750x00000006,0x000050a5,0x000050ab,0x000050a4,
50800x0000012b,0x00003727,0x000200f8,0x00003727, 49760x00050084,0x00000006,0x0000509a,0x00000205,
50810x000500b1,0x0000002f,0x00003729,0x000035e0, 49770x00005dd8,0x00050080,0x00000006,0x0000509b,
50820x0000015e,0x000400a8,0x0000002f,0x0000372a, 49780x000050a5,0x0000509a,0x00050041,0x00000266,
50830x00003729,0x000300f7,0x00003731,0x00000000, 49790x0000509c,0x000001b9,0x00000264,0x0004003d,
50840x000400fa,0x0000372a,0x0000372b,0x00003731, 49800x00000007,0x0000509d,0x0000509c,0x00050051,
50850x000200f8,0x0000372b,0x00050041,0x00000182, 49810x00000006,0x000050d3,0x0000509d,0x00000000,
50860x0000372d,0x00000180,0x000001b7,0x0004003d, 49820x00050095,0x0000013d,0x000050d5,0x000050d3,
50870x00000006,0x0000372e,0x0000372d,0x0004007c, 49830x0000509b,0x00050051,0x00000006,0x000050d6,
50880x000000e7,0x0000372f,0x0000372e,0x000500af, 49840x000050d5,0x00000001,0x00050051,0x00000006,
50890x0000002f,0x00003730,0x000035e0,0x0000372f, 49850x000050d7,0x000050d5,0x00000000,0x00050051,
50900x000200f9,0x00003731,0x000200f8,0x00003731, 49860x00000006,0x000050da,0x0000509d,0x00000001,
50910x000700f5,0x0000002f,0x00003732,0x00003729, 49870x00050080,0x00000006,0x000050dc,0x000050da,
50920x00003727,0x00003730,0x0000372b,0x000300f7, 49880x000050d6,0x00050050,0x00000007,0x000050dd,
50930x00003734,0x00000000,0x000400fa,0x00003732, 49890x000050d7,0x000050dc,0x0004007c,0x00000014,
50940x00003733,0x00003734,0x000200f8,0x00003733, 49900x000050cd,0x000050dd,0x00060041,0x0000016c,
50950x000200f9,0x00003749,0x000200f8,0x00003734, 49910x00005087,0x000050cd,0x0000016b,0x0000016b,
50960x00050084,0x00000006,0x00003752,0x000000df, 49920x0005003e,0x00005087,0x00000138,0x00000002,
50970x000011de,0x00050080,0x00000006,0x00003753, 49930x00000004,0x00060041,0x0000016c,0x00005089,
50980x0000018b,0x00003752,0x00050041,0x0000022d, 49940x000050cd,0x0000016b,0x00000264,0x0005003e,
50990x00003754,0x00000180,0x0000022b,0x0004003d, 49950x00005089,0x00000539,0x00000002,0x00000004,
51000x00000007,0x00003755,0x00003754,0x00050051, 49960x00060041,0x0000016c,0x0000508b,0x000050cd,
51010x00000006,0x0000376f,0x00003755,0x00000000, 49970x0000016b,0x00000315,0x0005003e,0x0000508b,
51020x00050095,0x00000130,0x00003771,0x0000376f, 49980x00000539,0x00000002,0x00000004,0x00060041,
51030x00003753,0x00050051,0x00000006,0x00003772, 49990x0000016c,0x0000508d,0x000050cd,0x0000016b,
51040x00003771,0x00000001,0x00050051,0x00000006, 50000x0000031d,0x0005003e,0x0000508d,0x00000539,
51050x00003773,0x00003771,0x00000000,0x00050051, 50010x00000002,0x00000004,0x00060041,0x0000016c,
51060x00000006,0x00003776,0x00003755,0x00000001, 50020x0000508f,0x000050cd,0x0000016b,0x00000325,
51070x00050080,0x00000006,0x00003778,0x00003776, 50030x0005003e,0x0000508f,0x00000138,0x00000002,
51080x00003772,0x00050050,0x00000007,0x00003779, 50040x00000004,0x00060041,0x0000016c,0x00005091,
51090x00003773,0x00003778,0x0004007c,0x00000014, 50050x000050cd,0x0000016b,0x0000032d,0x0005003e,
51100x00003769,0x00003779,0x00060041,0x0000015f, 50060x00005091,0x00000138,0x00000002,0x00000004,
51110x00003760,0x00003769,0x0000015e,0x0000015e, 50070x00060041,0x0000016c,0x00005093,0x000050cd,
51120x0006003d,0x00000006,0x00003761,0x00003760, 50080x0000016b,0x00000351,0x0005003e,0x00005093,
50090x00000138,0x00000002,0x00000004,0x000200f9,
50100x00004119,0x000200f8,0x00004119,0x000200f9,
50110x000013e3,0x000200f8,0x000013e3,0x000200f9,
50120x000013d9,0x000200f8,0x000013d8,0x0004007c,
50130x000000f4,0x000013db,0x000012dd,0x00050080,
50140x000000f4,0x00003968,0x000013db,0x00000264,
50150x000300f7,0x00003a4b,0x00000000,0x000300fb,
50160x00000138,0x00003a29,0x000200f8,0x00003a29,
50170x000500b1,0x0000002f,0x00003a2b,0x00003968,
50180x0000016b,0x000400a8,0x0000002f,0x00003a2c,
50190x00003a2b,0x000300f7,0x00003a33,0x00000000,
50200x000400fa,0x00003a2c,0x00003a2d,0x00003a33,
50210x000200f8,0x00003a2d,0x00050041,0x000001bb,
50220x00003a2f,0x000001b9,0x000001f0,0x0004003d,
50230x00000006,0x00003a30,0x00003a2f,0x0004007c,
50240x000000f4,0x00003a31,0x00003a30,0x000500af,
50250x0000002f,0x00003a32,0x00003968,0x00003a31,
50260x000200f9,0x00003a33,0x000200f8,0x00003a33,
50270x000700f5,0x0000002f,0x00003a34,0x00003a2b,
50280x00003a29,0x00003a32,0x00003a2d,0x000300f7,
50290x00003a36,0x00000000,0x000400fa,0x00003a34,
50300x00003a35,0x00003a36,0x000200f8,0x00003a35,
50310x000200f9,0x00003a4b,0x000200f8,0x00003a36,
50320x00050084,0x00000006,0x00003a54,0x000000ec,
50330x000012dd,0x00050080,0x00000006,0x00003a55,
50340x000001c4,0x00003a54,0x00050041,0x00000266,
50350x00003a56,0x000001b9,0x00000264,0x0004003d,
50360x00000007,0x00003a57,0x00003a56,0x00050051,
50370x00000006,0x00003a71,0x00003a57,0x00000000,
50380x00050095,0x0000013d,0x00003a73,0x00003a71,
50390x00003a55,0x00050051,0x00000006,0x00003a74,
50400x00003a73,0x00000001,0x00050051,0x00000006,
50410x00003a75,0x00003a73,0x00000000,0x00050051,
50420x00000006,0x00003a78,0x00003a57,0x00000001,
50430x00050080,0x00000006,0x00003a7a,0x00003a78,
50440x00003a74,0x00050050,0x00000007,0x00003a7b,
50450x00003a75,0x00003a7a,0x0004007c,0x00000014,
50460x00003a6b,0x00003a7b,0x00060041,0x0000016c,
50470x00003a62,0x00003a6b,0x0000016b,0x0000016b,
50480x0006003d,0x00000006,0x00003a63,0x00003a62,
51130x00000002,0x00000004,0x0004007c,0x00000006, 50490x00000002,0x00000004,0x0004007c,0x00000006,
51140x00003780,0x000035e0,0x00050084,0x00000006, 50500x00003a82,0x00003968,0x00050084,0x00000006,
51150x00003781,0x000000df,0x00003780,0x00050080, 50510x00003a83,0x000000ec,0x00003a82,0x00050080,
51160x00000006,0x00003782,0x0000018b,0x00003781, 50520x00000006,0x00003a84,0x000001c4,0x00003a83,
51170x00050095,0x00000130,0x000037a0,0x0000376f, 50530x00050095,0x0000013d,0x00003aa2,0x00003a71,
51180x00003782,0x00050051,0x00000006,0x000037a1, 50540x00003a84,0x00050051,0x00000006,0x00003aa3,
51190x000037a0,0x00000001,0x00050051,0x00000006, 50550x00003aa2,0x00000001,0x00050051,0x00000006,
51200x000037a2,0x000037a0,0x00000000,0x00050080, 50560x00003aa4,0x00003aa2,0x00000000,0x00050080,
51210x00000006,0x000037a7,0x00003776,0x000037a1, 50570x00000006,0x00003aa9,0x00003a78,0x00003aa3,
51220x00050050,0x00000007,0x000037a8,0x000037a2, 50580x00050050,0x00000007,0x00003aaa,0x00003aa4,
51230x000037a7,0x0004007c,0x00000014,0x00003798, 50590x00003aa9,0x0004007c,0x00000014,0x00003a9a,
51240x000037a8,0x00060041,0x0000015f,0x0000378f, 50600x00003aaa,0x00060041,0x0000016c,0x00003a91,
51250x00003798,0x0000015e,0x0000015e,0x0006003d, 50610x00003a9a,0x0000016b,0x0000016b,0x0006003d,
51260x00000006,0x00003790,0x0000378f,0x00000002, 50620x00000006,0x00003a92,0x00003a91,0x00000002,
51270x00000004,0x000500aa,0x0000002f,0x0000373b, 50630x00000004,0x000500aa,0x0000002f,0x00003a3d,
51280x00003761,0x00003790,0x000300f7,0x00003743, 50640x00003a63,0x00003a92,0x000300f7,0x00003a45,
51290x00000000,0x000400fa,0x0000373b,0x0000373c, 50650x00000000,0x000400fa,0x00003a3d,0x00003a3e,
51300x00003743,0x000200f8,0x0000373c,0x000500c6, 50660x00003a45,0x000200f8,0x00003a3e,0x000500c6,
51310x000000e7,0x0000373f,0x000012dc,0x000035e0, 50670x000000f4,0x00003a41,0x000013db,0x00003968,
51320x0004007c,0x00000006,0x00003740,0x0000373f, 50680x0004007c,0x00000006,0x00003a42,0x00003a41,
51330x0006000c,0x000000e7,0x00003741,0x00000001, 50690x0006000c,0x000000f4,0x00003a43,0x00000001,
51340x0000004b,0x00003740,0x00050082,0x000000e7, 50700x0000004b,0x00003a42,0x00050082,0x000000f4,
51350x00003742,0x00000c77,0x00003741,0x000200f9, 50710x00003a44,0x00000d76,0x00003a43,0x000200f9,
51360x00003749,0x000200f8,0x00003743,0x000500c6, 50720x00003a4b,0x000200f8,0x00003a45,0x000500c6,
51370x00000006,0x00003746,0x00003761,0x00003790, 50730x00000006,0x00003a48,0x00003a63,0x00003a92,
51380x0006000c,0x000000e7,0x00003747,0x00000001, 50740x0006000c,0x000000f4,0x00003a49,0x00000001,
51390x0000004b,0x00003746,0x00050082,0x000000e7, 50750x0000004b,0x00003a48,0x00050082,0x000000f4,
51400x00003748,0x00000c7f,0x00003747,0x000200f9, 50760x00003a4a,0x00000d7e,0x00003a49,0x000200f9,
51410x00003749,0x000200f8,0x00003749,0x000900f5, 50770x00003a4b,0x000200f8,0x00003a4b,0x000900f5,
51420x000000e7,0x00005a7a,0x00000c68,0x00003733, 50780x000000f4,0x00005e41,0x00000d67,0x00003a35,
51430x00003742,0x0000373c,0x00003748,0x00003743, 50790x00003a44,0x00003a3e,0x00003a4a,0x00003a45,
51440x00050082,0x000000e7,0x000035e3,0x00005a79, 50800x00050082,0x000000f4,0x0000396c,0x000013db,
51450x00005a7a,0x000500ad,0x0000002f,0x000035e4, 50810x00000264,0x000300f7,0x00003ad5,0x00000000,
51460x000035e3,0x0000015e,0x000600a9,0x000000e7, 50820x000300fb,0x00000138,0x00003ab3,0x000200f8,
51470x000035e5,0x000035e4,0x0000022b,0x00000c68, 50830x00003ab3,0x000500b1,0x0000002f,0x00003ab5,
51480x00050082,0x000000e7,0x000035e8,0x000012dc, 50840x0000396c,0x0000016b,0x000400a8,0x0000002f,
51490x000035e5,0x000300f7,0x000037d3,0x00000000, 50850x00003ab6,0x00003ab5,0x000300f7,0x00003abd,
51500x000300fb,0x0000012b,0x000037b1,0x000200f8, 50860x00000000,0x000400fa,0x00003ab6,0x00003ab7,
51510x000037b1,0x000500b1,0x0000002f,0x000037b3, 50870x00003abd,0x000200f8,0x00003ab7,0x00050041,
51520x000035e8,0x0000015e,0x000400a8,0x0000002f, 50880x000001bb,0x00003ab9,0x000001b9,0x000001f0,
51530x000037b4,0x000037b3,0x000300f7,0x000037bb, 50890x0004003d,0x00000006,0x00003aba,0x00003ab9,
51540x00000000,0x000400fa,0x000037b4,0x000037b5, 50900x0004007c,0x000000f4,0x00003abb,0x00003aba,
51550x000037bb,0x000200f8,0x000037b5,0x00050041, 50910x000500af,0x0000002f,0x00003abc,0x0000396c,
51560x00000182,0x000037b7,0x00000180,0x000001b7, 50920x00003abb,0x000200f9,0x00003abd,0x000200f8,
51570x0004003d,0x00000006,0x000037b8,0x000037b7, 50930x00003abd,0x000700f5,0x0000002f,0x00003abe,
51580x0004007c,0x000000e7,0x000037b9,0x000037b8, 50940x00003ab5,0x00003ab3,0x00003abc,0x00003ab7,
51590x000500af,0x0000002f,0x000037ba,0x000035e8, 50950x000300f7,0x00003ac0,0x00000000,0x000400fa,
51600x000037b9,0x000200f9,0x000037bb,0x000200f8, 50960x00003abe,0x00003abf,0x00003ac0,0x000200f8,
51610x000037bb,0x000700f5,0x0000002f,0x000037bc, 50970x00003abf,0x000200f9,0x00003ad5,0x000200f8,
51620x000037b3,0x000037b1,0x000037ba,0x000037b5, 50980x00003ac0,0x00050084,0x00000006,0x00003ade,
51630x000300f7,0x000037be,0x00000000,0x000400fa, 50990x000000ec,0x000012dd,0x00050080,0x00000006,
51640x000037bc,0x000037bd,0x000037be,0x000200f8, 51000x00003adf,0x000001c4,0x00003ade,0x00050041,
51650x000037bd,0x000200f9,0x000037d3,0x000200f8, 51010x00000266,0x00003ae0,0x000001b9,0x00000264,
51660x000037be,0x00050084,0x00000006,0x000037dc, 51020x0004003d,0x00000007,0x00003ae1,0x00003ae0,
51670x000000df,0x000011de,0x00050080,0x00000006, 51030x00050051,0x00000006,0x00003afb,0x00003ae1,
51680x000037dd,0x0000018b,0x000037dc,0x00050041, 51040x00000000,0x00050095,0x0000013d,0x00003afd,
51690x0000022d,0x000037de,0x00000180,0x0000022b, 51050x00003afb,0x00003adf,0x00050051,0x00000006,
51700x0004003d,0x00000007,0x000037df,0x000037de, 51060x00003afe,0x00003afd,0x00000001,0x00050051,
51710x00050051,0x00000006,0x000037f9,0x000037df, 51070x00000006,0x00003aff,0x00003afd,0x00000000,
51720x00000000,0x00050095,0x00000130,0x000037fb, 51080x00050051,0x00000006,0x00003b02,0x00003ae1,
51730x000037f9,0x000037dd,0x00050051,0x00000006, 51090x00000001,0x00050080,0x00000006,0x00003b04,
51740x000037fc,0x000037fb,0x00000001,0x00050051, 51100x00003b02,0x00003afe,0x00050050,0x00000007,
51750x00000006,0x000037fd,0x000037fb,0x00000000, 51110x00003b05,0x00003aff,0x00003b04,0x0004007c,
51760x00050051,0x00000006,0x00003800,0x000037df, 51120x00000014,0x00003af5,0x00003b05,0x00060041,
51770x00000001,0x00050080,0x00000006,0x00003802, 51130x0000016c,0x00003aec,0x00003af5,0x0000016b,
51780x00003800,0x000037fc,0x00050050,0x00000007, 51140x0000016b,0x0006003d,0x00000006,0x00003aed,
51790x00003803,0x000037fd,0x00003802,0x0004007c, 51150x00003aec,0x00000002,0x00000004,0x0004007c,
51800x00000014,0x000037f3,0x00003803,0x00060041, 51160x00000006,0x00003b0c,0x0000396c,0x00050084,
51810x0000015f,0x000037ea,0x000037f3,0x0000015e, 51170x00000006,0x00003b0d,0x000000ec,0x00003b0c,
51820x0000015e,0x0006003d,0x00000006,0x000037eb, 51180x00050080,0x00000006,0x00003b0e,0x000001c4,
51830x000037ea,0x00000002,0x00000004,0x0004007c, 51190x00003b0d,0x00050095,0x0000013d,0x00003b2c,
51840x00000006,0x0000380a,0x000035e8,0x00050084, 51200x00003afb,0x00003b0e,0x00050051,0x00000006,
51850x00000006,0x0000380b,0x000000df,0x0000380a, 51210x00003b2d,0x00003b2c,0x00000001,0x00050051,
51860x00050080,0x00000006,0x0000380c,0x0000018b, 51220x00000006,0x00003b2e,0x00003b2c,0x00000000,
51870x0000380b,0x00050095,0x00000130,0x0000382a, 51230x00050080,0x00000006,0x00003b33,0x00003b02,
51880x000037f9,0x0000380c,0x00050051,0x00000006, 51240x00003b2d,0x00050050,0x00000007,0x00003b34,
51890x0000382b,0x0000382a,0x00000001,0x00050051, 51250x00003b2e,0x00003b33,0x0004007c,0x00000014,
51900x00000006,0x0000382c,0x0000382a,0x00000000, 51260x00003b24,0x00003b34,0x00060041,0x0000016c,
51910x00050080,0x00000006,0x00003831,0x00003800, 51270x00003b1b,0x00003b24,0x0000016b,0x0000016b,
51920x0000382b,0x00050050,0x00000007,0x00003832, 51280x0006003d,0x00000006,0x00003b1c,0x00003b1b,
51930x0000382c,0x00003831,0x0004007c,0x00000014,
51940x00003822,0x00003832,0x00060041,0x0000015f,
51950x00003819,0x00003822,0x0000015e,0x0000015e,
51960x0006003d,0x00000006,0x0000381a,0x00003819,
51970x00000002,0x00000004,0x000500aa,0x0000002f,
51980x000037c5,0x000037eb,0x0000381a,0x000300f7,
51990x000037cd,0x00000000,0x000400fa,0x000037c5,
52000x000037c6,0x000037cd,0x000200f8,0x000037c6,
52010x000500c6,0x000000e7,0x000037c9,0x000012dc,
52020x000035e8,0x0004007c,0x00000006,0x000037ca,
52030x000037c9,0x0006000c,0x000000e7,0x000037cb,
52040x00000001,0x0000004b,0x000037ca,0x00050082,
52050x000000e7,0x000037cc,0x00000c77,0x000037cb,
52060x000200f9,0x000037d3,0x000200f8,0x000037cd,
52070x000500c6,0x00000006,0x000037d0,0x000037eb,
52080x0000381a,0x0006000c,0x000000e7,0x000037d1,
52090x00000001,0x0000004b,0x000037d0,0x00050082,
52100x000000e7,0x000037d2,0x00000c7f,0x000037d1,
52110x000200f9,0x000037d3,0x000200f8,0x000037d3,
52120x000900f5,0x000000e7,0x00005a7b,0x00000c68,
52130x000037bd,0x000037cc,0x000037c6,0x000037d2,
52140x000037cd,0x000200f9,0x000035eb,0x000200f8,
52150x000035eb,0x000700f5,0x000000e7,0x00005a7c,
52160x000002dc,0x000037d3,0x000035f8,0x000035f6,
52170x000400f6,0x000035fa,0x000035f6,0x00000000,
52180x000200f9,0x000035ec,0x000200f8,0x000035ec,
52190x00050084,0x000000e7,0x000035f0,0x00005a7c,
52200x000035e5,0x00050080,0x000000e7,0x000035f1,
52210x000012dc,0x000035f0,0x000300f7,0x0000385d,
52220x00000000,0x000300fb,0x0000012b,0x0000383b,
52230x000200f8,0x0000383b,0x000500b1,0x0000002f,
52240x0000383d,0x000035f1,0x0000015e,0x000400a8,
52250x0000002f,0x0000383e,0x0000383d,0x000300f7,
52260x00003845,0x00000000,0x000400fa,0x0000383e,
52270x0000383f,0x00003845,0x000200f8,0x0000383f,
52280x00050041,0x00000182,0x00003841,0x00000180,
52290x000001b7,0x0004003d,0x00000006,0x00003842,
52300x00003841,0x0004007c,0x000000e7,0x00003843,
52310x00003842,0x000500af,0x0000002f,0x00003844,
52320x000035f1,0x00003843,0x000200f9,0x00003845,
52330x000200f8,0x00003845,0x000700f5,0x0000002f,
52340x00003846,0x0000383d,0x0000383b,0x00003844,
52350x0000383f,0x000300f7,0x00003848,0x00000000,
52360x000400fa,0x00003846,0x00003847,0x00003848,
52370x000200f8,0x00003847,0x000200f9,0x0000385d,
52380x000200f8,0x00003848,0x00050084,0x00000006,
52390x00003866,0x000000df,0x000011de,0x00050080,
52400x00000006,0x00003867,0x0000018b,0x00003866,
52410x00050041,0x0000022d,0x00003868,0x00000180,
52420x0000022b,0x0004003d,0x00000007,0x00003869,
52430x00003868,0x00050051,0x00000006,0x00003883,
52440x00003869,0x00000000,0x00050095,0x00000130,
52450x00003885,0x00003883,0x00003867,0x00050051,
52460x00000006,0x00003886,0x00003885,0x00000001,
52470x00050051,0x00000006,0x00003887,0x00003885,
52480x00000000,0x00050051,0x00000006,0x0000388a,
52490x00003869,0x00000001,0x00050080,0x00000006,
52500x0000388c,0x0000388a,0x00003886,0x00050050,
52510x00000007,0x0000388d,0x00003887,0x0000388c,
52520x0004007c,0x00000014,0x0000387d,0x0000388d,
52530x00060041,0x0000015f,0x00003874,0x0000387d,
52540x0000015e,0x0000015e,0x0006003d,0x00000006,
52550x00003875,0x00003874,0x00000002,0x00000004,
52560x0004007c,0x00000006,0x00003894,0x000035f1,
52570x00050084,0x00000006,0x00003895,0x000000df,
52580x00003894,0x00050080,0x00000006,0x00003896,
52590x0000018b,0x00003895,0x00050095,0x00000130,
52600x000038b4,0x00003883,0x00003896,0x00050051,
52610x00000006,0x000038b5,0x000038b4,0x00000001,
52620x00050051,0x00000006,0x000038b6,0x000038b4,
52630x00000000,0x00050080,0x00000006,0x000038bb,
52640x0000388a,0x000038b5,0x00050050,0x00000007,
52650x000038bc,0x000038b6,0x000038bb,0x0004007c,
52660x00000014,0x000038ac,0x000038bc,0x00060041,
52670x0000015f,0x000038a3,0x000038ac,0x0000015e,
52680x0000015e,0x0006003d,0x00000006,0x000038a4,
52690x000038a3,0x00000002,0x00000004,0x000500aa,
52700x0000002f,0x0000384f,0x00003875,0x000038a4,
52710x000300f7,0x00003857,0x00000000,0x000400fa,
52720x0000384f,0x00003850,0x00003857,0x000200f8,
52730x00003850,0x000500c6,0x000000e7,0x00003853,
52740x000012dc,0x000035f1,0x0004007c,0x00000006,
52750x00003854,0x00003853,0x0006000c,0x000000e7,
52760x00003855,0x00000001,0x0000004b,0x00003854,
52770x00050082,0x000000e7,0x00003856,0x00000c77,
52780x00003855,0x000200f9,0x0000385d,0x000200f8,
52790x00003857,0x000500c6,0x00000006,0x0000385a,
52800x00003875,0x000038a4,0x0006000c,0x000000e7,
52810x0000385b,0x00000001,0x0000004b,0x0000385a,
52820x00050082,0x000000e7,0x0000385c,0x00000c7f,
52830x0000385b,0x000200f9,0x0000385d,0x000200f8,
52840x0000385d,0x000900f5,0x000000e7,0x00005a7d,
52850x00000c68,0x00003847,0x00003856,0x00003850,
52860x0000385c,0x00003857,0x000500ad,0x0000002f,
52870x000035f5,0x00005a7d,0x00005a7b,0x000400fa,
52880x000035f5,0x000035f6,0x000035fa,0x000200f8,
52890x000035f6,0x000500c4,0x000000e7,0x000035f8,
52900x00005a7c,0x0000022b,0x000200f9,0x000035eb,
52910x000200f8,0x000035fa,0x000500c3,0x000000e7,
52920x000035fc,0x00005a7c,0x0000022b,0x000200f9,
52930x000035fd,0x000200f8,0x000035fd,0x000700f5,
52940x000000e7,0x00005a81,0x0000015e,0x000035fa,
52950x00005cdc,0x00003612,0x000700f5,0x000000e7,
52960x00005a80,0x000035fc,0x000035fa,0x00003614,
52970x00003612,0x000500af,0x0000002f,0x00003600,
52980x00005a80,0x0000022b,0x000400f6,0x00003615,
52990x00003612,0x00000000,0x000400fa,0x00003600,
53000x00003601,0x00003615,0x000200f8,0x00003601,
53010x00050080,0x000000e7,0x00003605,0x00005a81,
53020x00005a80,0x00050084,0x000000e7,0x00003607,
53030x00003605,0x000035e5,0x00050080,0x000000e7,
53040x00003608,0x000012dc,0x00003607,0x000300f7,
53050x000038e7,0x00000000,0x000300fb,0x0000012b,
53060x000038c5,0x000200f8,0x000038c5,0x000500b1,
53070x0000002f,0x000038c7,0x00003608,0x0000015e,
53080x000400a8,0x0000002f,0x000038c8,0x000038c7,
53090x000300f7,0x000038cf,0x00000000,0x000400fa,
53100x000038c8,0x000038c9,0x000038cf,0x000200f8,
53110x000038c9,0x00050041,0x00000182,0x000038cb,
53120x00000180,0x000001b7,0x0004003d,0x00000006,
53130x000038cc,0x000038cb,0x0004007c,0x000000e7,
53140x000038cd,0x000038cc,0x000500af,0x0000002f,
53150x000038ce,0x00003608,0x000038cd,0x000200f9,
53160x000038cf,0x000200f8,0x000038cf,0x000700f5,
53170x0000002f,0x000038d0,0x000038c7,0x000038c5,
53180x000038ce,0x000038c9,0x000300f7,0x000038d2,
53190x00000000,0x000400fa,0x000038d0,0x000038d1,
53200x000038d2,0x000200f8,0x000038d1,0x000200f9,
53210x000038e7,0x000200f8,0x000038d2,0x00050084,
53220x00000006,0x000038f0,0x000000df,0x000011de,
53230x00050080,0x00000006,0x000038f1,0x0000018b,
53240x000038f0,0x00050041,0x0000022d,0x000038f2,
53250x00000180,0x0000022b,0x0004003d,0x00000007,
53260x000038f3,0x000038f2,0x00050051,0x00000006,
53270x0000390d,0x000038f3,0x00000000,0x00050095,
53280x00000130,0x0000390f,0x0000390d,0x000038f1,
53290x00050051,0x00000006,0x00003910,0x0000390f,
53300x00000001,0x00050051,0x00000006,0x00003911,
53310x0000390f,0x00000000,0x00050051,0x00000006,
53320x00003914,0x000038f3,0x00000001,0x00050080,
53330x00000006,0x00003916,0x00003914,0x00003910,
53340x00050050,0x00000007,0x00003917,0x00003911,
53350x00003916,0x0004007c,0x00000014,0x00003907,
53360x00003917,0x00060041,0x0000015f,0x000038fe,
53370x00003907,0x0000015e,0x0000015e,0x0006003d,
53380x00000006,0x000038ff,0x000038fe,0x00000002,
53390x00000004,0x0004007c,0x00000006,0x0000391e,
53400x00003608,0x00050084,0x00000006,0x0000391f,
53410x000000df,0x0000391e,0x00050080,0x00000006,
53420x00003920,0x0000018b,0x0000391f,0x00050095,
53430x00000130,0x0000393e,0x0000390d,0x00003920,
53440x00050051,0x00000006,0x0000393f,0x0000393e,
53450x00000001,0x00050051,0x00000006,0x00003940,
53460x0000393e,0x00000000,0x00050080,0x00000006,
53470x00003945,0x00003914,0x0000393f,0x00050050,
53480x00000007,0x00003946,0x00003940,0x00003945,
53490x0004007c,0x00000014,0x00003936,0x00003946,
53500x00060041,0x0000015f,0x0000392d,0x00003936,
53510x0000015e,0x0000015e,0x0006003d,0x00000006,
53520x0000392e,0x0000392d,0x00000002,0x00000004,
53530x000500aa,0x0000002f,0x000038d9,0x000038ff,
53540x0000392e,0x000300f7,0x000038e1,0x00000000,
53550x000400fa,0x000038d9,0x000038da,0x000038e1,
53560x000200f8,0x000038da,0x000500c6,0x000000e7,
53570x000038dd,0x000012dc,0x00003608,0x0004007c,
53580x00000006,0x000038de,0x000038dd,0x0006000c,
53590x000000e7,0x000038df,0x00000001,0x0000004b,
53600x000038de,0x00050082,0x000000e7,0x000038e0,
53610x00000c77,0x000038df,0x000200f9,0x000038e7,
53620x000200f8,0x000038e1,0x000500c6,0x00000006,
53630x000038e4,0x000038ff,0x0000392e,0x0006000c,
53640x000000e7,0x000038e5,0x00000001,0x0000004b,
53650x000038e4,0x00050082,0x000000e7,0x000038e6,
53660x00000c7f,0x000038e5,0x000200f9,0x000038e7,
53670x000200f8,0x000038e7,0x000900f5,0x000000e7,
53680x00005a97,0x00000c68,0x000038d1,0x000038e0,
53690x000038da,0x000038e6,0x000038e1,0x000500ad,
53700x0000002f,0x0000360c,0x00005a97,0x00005a7b,
53710x000600a9,0x000000e7,0x00005cdc,0x0000360c,
53720x00003605,0x00005a81,0x000200f9,0x00003612,
53730x000200f8,0x00003612,0x000500c3,0x000000e7,
53740x00003614,0x00005a80,0x0000022b,0x000200f9,
53750x000035fd,0x000200f8,0x00003615,0x00050084,
53760x000000e7,0x00003619,0x00005a81,0x000035e5,
53770x00050080,0x000000e7,0x0000361a,0x000012dc,
53780x00003619,0x000300f7,0x00003971,0x00000000,
53790x000300fb,0x0000012b,0x0000394f,0x000200f8,
53800x0000394f,0x000500b1,0x0000002f,0x00003951,
53810x0000361a,0x0000015e,0x000400a8,0x0000002f,
53820x00003952,0x00003951,0x000300f7,0x00003959,
53830x00000000,0x000400fa,0x00003952,0x00003953,
53840x00003959,0x000200f8,0x00003953,0x00050041,
53850x00000182,0x00003955,0x00000180,0x000001b7,
53860x0004003d,0x00000006,0x00003956,0x00003955,
53870x0004007c,0x000000e7,0x00003957,0x00003956,
53880x000500af,0x0000002f,0x00003958,0x0000361a,
53890x00003957,0x000200f9,0x00003959,0x000200f8,
53900x00003959,0x000700f5,0x0000002f,0x0000395a,
53910x00003951,0x0000394f,0x00003958,0x00003953,
53920x000300f7,0x0000395c,0x00000000,0x000400fa,
53930x0000395a,0x0000395b,0x0000395c,0x000200f8,
53940x0000395b,0x000200f9,0x00003971,0x000200f8,
53950x0000395c,0x00050084,0x00000006,0x0000397a,
53960x000000df,0x000011de,0x00050080,0x00000006,
53970x0000397b,0x0000018b,0x0000397a,0x00050041,
53980x0000022d,0x0000397c,0x00000180,0x0000022b,
53990x0004003d,0x00000007,0x0000397d,0x0000397c,
54000x00050051,0x00000006,0x00003997,0x0000397d,
54010x00000000,0x00050095,0x00000130,0x00003999,
54020x00003997,0x0000397b,0x00050051,0x00000006,
54030x0000399a,0x00003999,0x00000001,0x00050051,
54040x00000006,0x0000399b,0x00003999,0x00000000,
54050x00050051,0x00000006,0x0000399e,0x0000397d,
54060x00000001,0x00050080,0x00000006,0x000039a0,
54070x0000399e,0x0000399a,0x00050050,0x00000007,
54080x000039a1,0x0000399b,0x000039a0,0x0004007c,
54090x00000014,0x00003991,0x000039a1,0x00060041,
54100x0000015f,0x00003988,0x00003991,0x0000015e,
54110x0000015e,0x0006003d,0x00000006,0x00003989,
54120x00003988,0x00000002,0x00000004,0x0004007c,
54130x00000006,0x000039a8,0x0000361a,0x00050084,
54140x00000006,0x000039a9,0x000000df,0x000039a8,
54150x00050080,0x00000006,0x000039aa,0x0000018b,
54160x000039a9,0x00050095,0x00000130,0x000039c8,
54170x00003997,0x000039aa,0x00050051,0x00000006,
54180x000039c9,0x000039c8,0x00000001,0x00050051,
54190x00000006,0x000039ca,0x000039c8,0x00000000,
54200x00050080,0x00000006,0x000039cf,0x0000399e,
54210x000039c9,0x00050050,0x00000007,0x000039d0,
54220x000039ca,0x000039cf,0x0004007c,0x00000014,
54230x000039c0,0x000039d0,0x00060041,0x0000015f,
54240x000039b7,0x000039c0,0x0000015e,0x0000015e,
54250x0006003d,0x00000006,0x000039b8,0x000039b7,
54260x00000002,0x00000004,0x000500aa,0x0000002f, 51290x00000002,0x00000004,0x000500aa,0x0000002f,
54270x00003963,0x00003989,0x000039b8,0x000300f7, 51300x00003ac7,0x00003aed,0x00003b1c,0x000300f7,
54280x0000396b,0x00000000,0x000400fa,0x00003963, 51310x00003acf,0x00000000,0x000400fa,0x00003ac7,
54290x00003964,0x0000396b,0x000200f8,0x00003964, 51320x00003ac8,0x00003acf,0x000200f8,0x00003ac8,
54300x000500c6,0x000000e7,0x00003967,0x000012dc, 51330x000500c6,0x000000f4,0x00003acb,0x000013db,
54310x0000361a,0x0004007c,0x00000006,0x00003968, 51340x0000396c,0x0004007c,0x00000006,0x00003acc,
54320x00003967,0x0006000c,0x000000e7,0x00003969, 51350x00003acb,0x0006000c,0x000000f4,0x00003acd,
54330x00000001,0x0000004b,0x00003968,0x00050082, 51360x00000001,0x0000004b,0x00003acc,0x00050082,
54340x000000e7,0x0000396a,0x00000c77,0x00003969, 51370x000000f4,0x00003ace,0x00000d76,0x00003acd,
54350x000200f9,0x00003971,0x000200f8,0x0000396b, 51380x000200f9,0x00003ad5,0x000200f8,0x00003acf,
54360x000500c6,0x00000006,0x0000396e,0x00003989, 51390x000500c6,0x00000006,0x00003ad2,0x00003aed,
54370x000039b8,0x0006000c,0x000000e7,0x0000396f, 51400x00003b1c,0x0006000c,0x000000f4,0x00003ad3,
54380x00000001,0x0000004b,0x0000396e,0x00050082, 51410x00000001,0x0000004b,0x00003ad2,0x00050082,
54390x000000e7,0x00003970,0x00000c7f,0x0000396f, 51420x000000f4,0x00003ad4,0x00000d7e,0x00003ad3,
54400x000200f9,0x00003971,0x000200f8,0x00003971, 51430x000200f9,0x00003ad5,0x000200f8,0x00003ad5,
54410x000900f5,0x000000e7,0x00005a82,0x00000c68, 51440x000900f5,0x000000f4,0x00005e42,0x00000d67,
54420x0000395b,0x0000396a,0x00003964,0x00003970, 51450x00003abf,0x00003ace,0x00003ac8,0x00003ad4,
54430x0000396b,0x000200f9,0x0000361f,0x000200f8, 51460x00003acf,0x00050082,0x000000f4,0x0000396f,
54440x0000361f,0x000700f5,0x000000e7,0x00005a86, 51470x00005e41,0x00005e42,0x000500ad,0x0000002f,
54450x0000015e,0x00003971,0x00005cdd,0x00003634, 51480x00003970,0x0000396f,0x0000016b,0x000600a9,
54460x000700f5,0x000000e7,0x00005a85,0x00005a81, 51490x000000f4,0x00003971,0x00003970,0x00000264,
54470x00003971,0x00003623,0x00003634,0x000400f6, 51500x00000d67,0x00050082,0x000000f4,0x00003974,
54480x00003637,0x00003634,0x00000000,0x000200f9, 51510x000013db,0x00003971,0x000300f7,0x00003b5f,
54490x00003620,0x000200f8,0x00003620,0x00050080, 51520x00000000,0x000300fb,0x00000138,0x00003b3d,
54500x000000e7,0x00003622,0x00005a85,0x0000022b, 51530x000200f8,0x00003b3d,0x000500b1,0x0000002f,
54510x000500c3,0x000000e7,0x00003623,0x00003622, 51540x00003b3f,0x00003974,0x0000016b,0x000400a8,
54520x0000022b,0x00050080,0x000000e7,0x00003627, 51550x0000002f,0x00003b40,0x00003b3f,0x000300f7,
54530x00005a86,0x00003623,0x00050084,0x000000e7, 51560x00003b47,0x00000000,0x000400fa,0x00003b40,
54540x00003629,0x00003627,0x000035e5,0x00050080, 51570x00003b41,0x00003b47,0x000200f8,0x00003b41,
54550x000000e7,0x0000362a,0x000012dc,0x00003629, 51580x00050041,0x000001bb,0x00003b43,0x000001b9,
54560x000300f7,0x000039fb,0x00000000,0x000300fb, 51590x000001f0,0x0004003d,0x00000006,0x00003b44,
54570x0000012b,0x000039d9,0x000200f8,0x000039d9, 51600x00003b43,0x0004007c,0x000000f4,0x00003b45,
54580x000500b1,0x0000002f,0x000039db,0x0000362a, 51610x00003b44,0x000500af,0x0000002f,0x00003b46,
54590x0000015e,0x000400a8,0x0000002f,0x000039dc, 51620x00003974,0x00003b45,0x000200f9,0x00003b47,
54600x000039db,0x000300f7,0x000039e3,0x00000000, 51630x000200f8,0x00003b47,0x000700f5,0x0000002f,
54610x000400fa,0x000039dc,0x000039dd,0x000039e3, 51640x00003b48,0x00003b3f,0x00003b3d,0x00003b46,
54620x000200f8,0x000039dd,0x00050041,0x00000182, 51650x00003b41,0x000300f7,0x00003b4a,0x00000000,
54630x000039df,0x00000180,0x000001b7,0x0004003d, 51660x000400fa,0x00003b48,0x00003b49,0x00003b4a,
54640x00000006,0x000039e0,0x000039df,0x0004007c, 51670x000200f8,0x00003b49,0x000200f9,0x00003b5f,
54650x000000e7,0x000039e1,0x000039e0,0x000500af, 51680x000200f8,0x00003b4a,0x00050084,0x00000006,
54660x0000002f,0x000039e2,0x0000362a,0x000039e1, 51690x00003b68,0x000000ec,0x000012dd,0x00050080,
54670x000200f9,0x000039e3,0x000200f8,0x000039e3, 51700x00000006,0x00003b69,0x000001c4,0x00003b68,
54680x000700f5,0x0000002f,0x000039e4,0x000039db, 51710x00050041,0x00000266,0x00003b6a,0x000001b9,
54690x000039d9,0x000039e2,0x000039dd,0x000300f7, 51720x00000264,0x0004003d,0x00000007,0x00003b6b,
54700x000039e6,0x00000000,0x000400fa,0x000039e4, 51730x00003b6a,0x00050051,0x00000006,0x00003b85,
54710x000039e5,0x000039e6,0x000200f8,0x000039e5, 51740x00003b6b,0x00000000,0x00050095,0x0000013d,
54720x000200f9,0x000039fb,0x000200f8,0x000039e6, 51750x00003b87,0x00003b85,0x00003b69,0x00050051,
54730x00050084,0x00000006,0x00003a04,0x000000df, 51760x00000006,0x00003b88,0x00003b87,0x00000001,
54740x000011de,0x00050080,0x00000006,0x00003a05, 51770x00050051,0x00000006,0x00003b89,0x00003b87,
54750x0000018b,0x00003a04,0x00050041,0x0000022d, 51780x00000000,0x00050051,0x00000006,0x00003b8c,
54760x00003a06,0x00000180,0x0000022b,0x0004003d, 51790x00003b6b,0x00000001,0x00050080,0x00000006,
54770x00000007,0x00003a07,0x00003a06,0x00050051, 51800x00003b8e,0x00003b8c,0x00003b88,0x00050050,
54780x00000006,0x00003a21,0x00003a07,0x00000000, 51810x00000007,0x00003b8f,0x00003b89,0x00003b8e,
54790x00050095,0x00000130,0x00003a23,0x00003a21, 51820x0004007c,0x00000014,0x00003b7f,0x00003b8f,
54800x00003a05,0x00050051,0x00000006,0x00003a24, 51830x00060041,0x0000016c,0x00003b76,0x00003b7f,
54810x00003a23,0x00000001,0x00050051,0x00000006, 51840x0000016b,0x0000016b,0x0006003d,0x00000006,
54820x00003a25,0x00003a23,0x00000000,0x00050051, 51850x00003b77,0x00003b76,0x00000002,0x00000004,
54830x00000006,0x00003a28,0x00003a07,0x00000001, 51860x0004007c,0x00000006,0x00003b96,0x00003974,
54840x00050080,0x00000006,0x00003a2a,0x00003a28, 51870x00050084,0x00000006,0x00003b97,0x000000ec,
54850x00003a24,0x00050050,0x00000007,0x00003a2b, 51880x00003b96,0x00050080,0x00000006,0x00003b98,
54860x00003a25,0x00003a2a,0x0004007c,0x00000014, 51890x000001c4,0x00003b97,0x00050095,0x0000013d,
54870x00003a1b,0x00003a2b,0x00060041,0x0000015f, 51900x00003bb6,0x00003b85,0x00003b98,0x00050051,
54880x00003a12,0x00003a1b,0x0000015e,0x0000015e, 51910x00000006,0x00003bb7,0x00003bb6,0x00000001,
54890x0006003d,0x00000006,0x00003a13,0x00003a12, 51920x00050051,0x00000006,0x00003bb8,0x00003bb6,
51930x00000000,0x00050080,0x00000006,0x00003bbd,
51940x00003b8c,0x00003bb7,0x00050050,0x00000007,
51950x00003bbe,0x00003bb8,0x00003bbd,0x0004007c,
51960x00000014,0x00003bae,0x00003bbe,0x00060041,
51970x0000016c,0x00003ba5,0x00003bae,0x0000016b,
51980x0000016b,0x0006003d,0x00000006,0x00003ba6,
51990x00003ba5,0x00000002,0x00000004,0x000500aa,
52000x0000002f,0x00003b51,0x00003b77,0x00003ba6,
52010x000300f7,0x00003b59,0x00000000,0x000400fa,
52020x00003b51,0x00003b52,0x00003b59,0x000200f8,
52030x00003b52,0x000500c6,0x000000f4,0x00003b55,
52040x000013db,0x00003974,0x0004007c,0x00000006,
52050x00003b56,0x00003b55,0x0006000c,0x000000f4,
52060x00003b57,0x00000001,0x0000004b,0x00003b56,
52070x00050082,0x000000f4,0x00003b58,0x00000d76,
52080x00003b57,0x000200f9,0x00003b5f,0x000200f8,
52090x00003b59,0x000500c6,0x00000006,0x00003b5c,
52100x00003b77,0x00003ba6,0x0006000c,0x000000f4,
52110x00003b5d,0x00000001,0x0000004b,0x00003b5c,
52120x00050082,0x000000f4,0x00003b5e,0x00000d7e,
52130x00003b5d,0x000200f9,0x00003b5f,0x000200f8,
52140x00003b5f,0x000900f5,0x000000f4,0x00005e43,
52150x00000d67,0x00003b49,0x00003b58,0x00003b52,
52160x00003b5e,0x00003b59,0x000200f9,0x00003977,
52170x000200f8,0x00003977,0x000700f5,0x000000f4,
52180x00005e44,0x00000315,0x00003b5f,0x00003984,
52190x00003982,0x000400f6,0x00003986,0x00003982,
52200x00000000,0x000200f9,0x00003978,0x000200f8,
52210x00003978,0x00050084,0x000000f4,0x0000397c,
52220x00005e44,0x00003971,0x00050080,0x000000f4,
52230x0000397d,0x000013db,0x0000397c,0x000300f7,
52240x00003be9,0x00000000,0x000300fb,0x00000138,
52250x00003bc7,0x000200f8,0x00003bc7,0x000500b1,
52260x0000002f,0x00003bc9,0x0000397d,0x0000016b,
52270x000400a8,0x0000002f,0x00003bca,0x00003bc9,
52280x000300f7,0x00003bd1,0x00000000,0x000400fa,
52290x00003bca,0x00003bcb,0x00003bd1,0x000200f8,
52300x00003bcb,0x00050041,0x000001bb,0x00003bcd,
52310x000001b9,0x000001f0,0x0004003d,0x00000006,
52320x00003bce,0x00003bcd,0x0004007c,0x000000f4,
52330x00003bcf,0x00003bce,0x000500af,0x0000002f,
52340x00003bd0,0x0000397d,0x00003bcf,0x000200f9,
52350x00003bd1,0x000200f8,0x00003bd1,0x000700f5,
52360x0000002f,0x00003bd2,0x00003bc9,0x00003bc7,
52370x00003bd0,0x00003bcb,0x000300f7,0x00003bd4,
52380x00000000,0x000400fa,0x00003bd2,0x00003bd3,
52390x00003bd4,0x000200f8,0x00003bd3,0x000200f9,
52400x00003be9,0x000200f8,0x00003bd4,0x00050084,
52410x00000006,0x00003bf2,0x000000ec,0x000012dd,
52420x00050080,0x00000006,0x00003bf3,0x000001c4,
52430x00003bf2,0x00050041,0x00000266,0x00003bf4,
52440x000001b9,0x00000264,0x0004003d,0x00000007,
52450x00003bf5,0x00003bf4,0x00050051,0x00000006,
52460x00003c0f,0x00003bf5,0x00000000,0x00050095,
52470x0000013d,0x00003c11,0x00003c0f,0x00003bf3,
52480x00050051,0x00000006,0x00003c12,0x00003c11,
52490x00000001,0x00050051,0x00000006,0x00003c13,
52500x00003c11,0x00000000,0x00050051,0x00000006,
52510x00003c16,0x00003bf5,0x00000001,0x00050080,
52520x00000006,0x00003c18,0x00003c16,0x00003c12,
52530x00050050,0x00000007,0x00003c19,0x00003c13,
52540x00003c18,0x0004007c,0x00000014,0x00003c09,
52550x00003c19,0x00060041,0x0000016c,0x00003c00,
52560x00003c09,0x0000016b,0x0000016b,0x0006003d,
52570x00000006,0x00003c01,0x00003c00,0x00000002,
52580x00000004,0x0004007c,0x00000006,0x00003c20,
52590x0000397d,0x00050084,0x00000006,0x00003c21,
52600x000000ec,0x00003c20,0x00050080,0x00000006,
52610x00003c22,0x000001c4,0x00003c21,0x00050095,
52620x0000013d,0x00003c40,0x00003c0f,0x00003c22,
52630x00050051,0x00000006,0x00003c41,0x00003c40,
52640x00000001,0x00050051,0x00000006,0x00003c42,
52650x00003c40,0x00000000,0x00050080,0x00000006,
52660x00003c47,0x00003c16,0x00003c41,0x00050050,
52670x00000007,0x00003c48,0x00003c42,0x00003c47,
52680x0004007c,0x00000014,0x00003c38,0x00003c48,
52690x00060041,0x0000016c,0x00003c2f,0x00003c38,
52700x0000016b,0x0000016b,0x0006003d,0x00000006,
52710x00003c30,0x00003c2f,0x00000002,0x00000004,
52720x000500aa,0x0000002f,0x00003bdb,0x00003c01,
52730x00003c30,0x000300f7,0x00003be3,0x00000000,
52740x000400fa,0x00003bdb,0x00003bdc,0x00003be3,
52750x000200f8,0x00003bdc,0x000500c6,0x000000f4,
52760x00003bdf,0x000013db,0x0000397d,0x0004007c,
52770x00000006,0x00003be0,0x00003bdf,0x0006000c,
52780x000000f4,0x00003be1,0x00000001,0x0000004b,
52790x00003be0,0x00050082,0x000000f4,0x00003be2,
52800x00000d76,0x00003be1,0x000200f9,0x00003be9,
52810x000200f8,0x00003be3,0x000500c6,0x00000006,
52820x00003be6,0x00003c01,0x00003c30,0x0006000c,
52830x000000f4,0x00003be7,0x00000001,0x0000004b,
52840x00003be6,0x00050082,0x000000f4,0x00003be8,
52850x00000d7e,0x00003be7,0x000200f9,0x00003be9,
52860x000200f8,0x00003be9,0x000900f5,0x000000f4,
52870x00005e45,0x00000d67,0x00003bd3,0x00003be2,
52880x00003bdc,0x00003be8,0x00003be3,0x000500ad,
52890x0000002f,0x00003981,0x00005e45,0x00005e43,
52900x000400fa,0x00003981,0x00003982,0x00003986,
52910x000200f8,0x00003982,0x000500c4,0x000000f4,
52920x00003984,0x00005e44,0x00000264,0x000200f9,
52930x00003977,0x000200f8,0x00003986,0x000500c3,
52940x000000f4,0x00003988,0x00005e44,0x00000264,
52950x000200f9,0x00003989,0x000200f8,0x00003989,
52960x000700f5,0x000000f4,0x00005e49,0x0000016b,
52970x00003986,0x00006117,0x0000399e,0x000700f5,
52980x000000f4,0x00005e48,0x00003988,0x00003986,
52990x000039a0,0x0000399e,0x000500af,0x0000002f,
53000x0000398c,0x00005e48,0x00000264,0x000400f6,
53010x000039a1,0x0000399e,0x00000000,0x000400fa,
53020x0000398c,0x0000398d,0x000039a1,0x000200f8,
53030x0000398d,0x00050080,0x000000f4,0x00003991,
53040x00005e49,0x00005e48,0x00050084,0x000000f4,
53050x00003993,0x00003991,0x00003971,0x00050080,
53060x000000f4,0x00003994,0x000013db,0x00003993,
53070x000300f7,0x00003c73,0x00000000,0x000300fb,
53080x00000138,0x00003c51,0x000200f8,0x00003c51,
53090x000500b1,0x0000002f,0x00003c53,0x00003994,
53100x0000016b,0x000400a8,0x0000002f,0x00003c54,
53110x00003c53,0x000300f7,0x00003c5b,0x00000000,
53120x000400fa,0x00003c54,0x00003c55,0x00003c5b,
53130x000200f8,0x00003c55,0x00050041,0x000001bb,
53140x00003c57,0x000001b9,0x000001f0,0x0004003d,
53150x00000006,0x00003c58,0x00003c57,0x0004007c,
53160x000000f4,0x00003c59,0x00003c58,0x000500af,
53170x0000002f,0x00003c5a,0x00003994,0x00003c59,
53180x000200f9,0x00003c5b,0x000200f8,0x00003c5b,
53190x000700f5,0x0000002f,0x00003c5c,0x00003c53,
53200x00003c51,0x00003c5a,0x00003c55,0x000300f7,
53210x00003c5e,0x00000000,0x000400fa,0x00003c5c,
53220x00003c5d,0x00003c5e,0x000200f8,0x00003c5d,
53230x000200f9,0x00003c73,0x000200f8,0x00003c5e,
53240x00050084,0x00000006,0x00003c7c,0x000000ec,
53250x000012dd,0x00050080,0x00000006,0x00003c7d,
53260x000001c4,0x00003c7c,0x00050041,0x00000266,
53270x00003c7e,0x000001b9,0x00000264,0x0004003d,
53280x00000007,0x00003c7f,0x00003c7e,0x00050051,
53290x00000006,0x00003c99,0x00003c7f,0x00000000,
53300x00050095,0x0000013d,0x00003c9b,0x00003c99,
53310x00003c7d,0x00050051,0x00000006,0x00003c9c,
53320x00003c9b,0x00000001,0x00050051,0x00000006,
53330x00003c9d,0x00003c9b,0x00000000,0x00050051,
53340x00000006,0x00003ca0,0x00003c7f,0x00000001,
53350x00050080,0x00000006,0x00003ca2,0x00003ca0,
53360x00003c9c,0x00050050,0x00000007,0x00003ca3,
53370x00003c9d,0x00003ca2,0x0004007c,0x00000014,
53380x00003c93,0x00003ca3,0x00060041,0x0000016c,
53390x00003c8a,0x00003c93,0x0000016b,0x0000016b,
53400x0006003d,0x00000006,0x00003c8b,0x00003c8a,
54900x00000002,0x00000004,0x0004007c,0x00000006, 53410x00000002,0x00000004,0x0004007c,0x00000006,
54910x00003a32,0x0000362a,0x00050084,0x00000006, 53420x00003caa,0x00003994,0x00050084,0x00000006,
54920x00003a33,0x000000df,0x00003a32,0x00050080, 53430x00003cab,0x000000ec,0x00003caa,0x00050080,
54930x00000006,0x00003a34,0x0000018b,0x00003a33, 53440x00000006,0x00003cac,0x000001c4,0x00003cab,
54940x00050095,0x00000130,0x00003a52,0x00003a21, 53450x00050095,0x0000013d,0x00003cca,0x00003c99,
54950x00003a34,0x00050051,0x00000006,0x00003a53, 53460x00003cac,0x00050051,0x00000006,0x00003ccb,
54960x00003a52,0x00000001,0x00050051,0x00000006, 53470x00003cca,0x00000001,0x00050051,0x00000006,
54970x00003a54,0x00003a52,0x00000000,0x00050080, 53480x00003ccc,0x00003cca,0x00000000,0x00050080,
54980x00000006,0x00003a59,0x00003a28,0x00003a53, 53490x00000006,0x00003cd1,0x00003ca0,0x00003ccb,
54990x00050050,0x00000007,0x00003a5a,0x00003a54, 53500x00050050,0x00000007,0x00003cd2,0x00003ccc,
55000x00003a59,0x0004007c,0x00000014,0x00003a4a, 53510x00003cd1,0x0004007c,0x00000014,0x00003cc2,
55010x00003a5a,0x00060041,0x0000015f,0x00003a41, 53520x00003cd2,0x00060041,0x0000016c,0x00003cb9,
55020x00003a4a,0x0000015e,0x0000015e,0x0006003d, 53530x00003cc2,0x0000016b,0x0000016b,0x0006003d,
55030x00000006,0x00003a42,0x00003a41,0x00000002, 53540x00000006,0x00003cba,0x00003cb9,0x00000002,
55040x00000004,0x000500aa,0x0000002f,0x000039ed, 53550x00000004,0x000500aa,0x0000002f,0x00003c65,
55050x00003a13,0x00003a42,0x000300f7,0x000039f5, 53560x00003c8b,0x00003cba,0x000300f7,0x00003c6d,
55060x00000000,0x000400fa,0x000039ed,0x000039ee, 53570x00000000,0x000400fa,0x00003c65,0x00003c66,
55070x000039f5,0x000200f8,0x000039ee,0x000500c6, 53580x00003c6d,0x000200f8,0x00003c66,0x000500c6,
55080x000000e7,0x000039f1,0x000012dc,0x0000362a, 53590x000000f4,0x00003c69,0x000013db,0x00003994,
55090x0004007c,0x00000006,0x000039f2,0x000039f1, 53600x0004007c,0x00000006,0x00003c6a,0x00003c69,
55100x0006000c,0x000000e7,0x000039f3,0x00000001, 53610x0006000c,0x000000f4,0x00003c6b,0x00000001,
55110x0000004b,0x000039f2,0x00050082,0x000000e7, 53620x0000004b,0x00003c6a,0x00050082,0x000000f4,
55120x000039f4,0x00000c77,0x000039f3,0x000200f9, 53630x00003c6c,0x00000d76,0x00003c6b,0x000200f9,
55130x000039fb,0x000200f8,0x000039f5,0x000500c6, 53640x00003c73,0x000200f8,0x00003c6d,0x000500c6,
55140x00000006,0x000039f8,0x00003a13,0x00003a42, 53650x00000006,0x00003c70,0x00003c8b,0x00003cba,
55150x0006000c,0x000000e7,0x000039f9,0x00000001, 53660x0006000c,0x000000f4,0x00003c71,0x00000001,
55160x0000004b,0x000039f8,0x00050082,0x000000e7, 53670x0000004b,0x00003c70,0x00050082,0x000000f4,
55170x000039fa,0x00000c7f,0x000039f9,0x000200f9, 53680x00003c72,0x00000d7e,0x00003c71,0x000200f9,
55180x000039fb,0x000200f8,0x000039fb,0x000900f5, 53690x00003c73,0x000200f8,0x00003c73,0x000900f5,
55190x000000e7,0x00005a87,0x00000c68,0x000039e5, 53700x000000f4,0x00005e5f,0x00000d67,0x00003c5d,
55200x000039f4,0x000039ee,0x000039fa,0x000039f5, 53710x00003c6c,0x00003c66,0x00003c72,0x00003c6d,
55210x000500ad,0x0000002f,0x0000362e,0x00005a87, 53720x000500ad,0x0000002f,0x00003998,0x00005e5f,
55220x00005a82,0x000600a9,0x000000e7,0x00005cdd, 53730x00005e43,0x000600a9,0x000000f4,0x00006117,
55230x0000362e,0x00003627,0x00005a86,0x000200f9, 53740x00003998,0x00003991,0x00005e49,0x000200f9,
55240x00003634,0x000200f8,0x00003634,0x000500ad, 53750x0000399e,0x000200f8,0x0000399e,0x000500c3,
55250x0000002f,0x00003636,0x00003623,0x0000022b, 53760x000000f4,0x000039a0,0x00005e48,0x00000264,
55260x000400fa,0x00003636,0x0000361f,0x00003637, 53770x000200f9,0x00003989,0x000200f8,0x000039a1,
55270x000200f8,0x00003637,0x00050084,0x000000e7, 53780x00050084,0x000000f4,0x000039a5,0x00005e49,
55280x0000363b,0x00005cdd,0x000035e5,0x00050080, 53790x00003971,0x00050080,0x000000f4,0x000039a6,
55290x000000e7,0x0000363c,0x000012dc,0x0000363b, 53800x000013db,0x000039a5,0x000300f7,0x00003cfd,
55300x0007000c,0x000000e7,0x0000363e,0x00000001, 53810x00000000,0x000300fb,0x00000138,0x00003cdb,
55310x00000027,0x000035e5,0x0000015e,0x00050080, 53820x000200f8,0x00003cdb,0x000500b1,0x0000002f,
55320x000000e7,0x0000363f,0x0000363c,0x0000363e, 53830x00003cdd,0x000039a6,0x0000016b,0x000400a8,
55330x0007000c,0x000000e7,0x00003642,0x00000001, 53840x0000002f,0x00003cde,0x00003cdd,0x000300f7,
55340x00000027,0x000012dc,0x0000361a,0x000500aa, 53850x00003ce5,0x00000000,0x000400fa,0x00003cde,
55350x0000002f,0x00003644,0x00003642,0x0000363f, 53860x00003cdf,0x00003ce5,0x000200f8,0x00003cdf,
55360x000300f7,0x0000364c,0x00000000,0x000400fa, 53870x00050041,0x000001bb,0x00003ce1,0x000001b9,
55370x00003644,0x00003645,0x00003649,0x000200f8, 53880x000001f0,0x0004003d,0x00000006,0x00003ce2,
55380x00003649,0x0004007c,0x00000006,0x0000364b, 53890x00003ce1,0x0004007c,0x000000f4,0x00003ce3,
55390x0000363f,0x000200f9,0x0000364c,0x000200f8, 53900x00003ce2,0x000500af,0x0000002f,0x00003ce4,
55400x00003645,0x0004007c,0x00000006,0x00003647, 53910x000039a6,0x00003ce3,0x000200f9,0x00003ce5,
55410x0000363f,0x000500c5,0x00000006,0x00003648, 53920x000200f8,0x00003ce5,0x000700f5,0x0000002f,
55420x00000208,0x00003647,0x000200f9,0x0000364c, 53930x00003ce6,0x00003cdd,0x00003cdb,0x00003ce4,
55430x000200f8,0x0000364c,0x000700f5,0x00000006, 53940x00003cdf,0x000300f7,0x00003ce8,0x00000000,
55440x00005a8e,0x00003648,0x00003645,0x0000364b, 53950x000400fa,0x00003ce6,0x00003ce7,0x00003ce8,
55450x00003649,0x0007000c,0x000000e7,0x00003650, 53960x000200f8,0x00003ce7,0x000200f9,0x00003cfd,
55460x00000001,0x0000002a,0x000012dc,0x0000361a, 53970x000200f8,0x00003ce8,0x00050084,0x00000006,
55470x00050080,0x000000e7,0x00003652,0x0000363f, 53980x00003d06,0x000000ec,0x000012dd,0x00050080,
55480x0000022b,0x000500aa,0x0000002f,0x00003653, 53990x00000006,0x00003d07,0x000001c4,0x00003d06,
55490x00003650,0x00003652,0x000300f7,0x0000365d, 54000x00050041,0x00000266,0x00003d08,0x000001b9,
55500x00000000,0x000400fa,0x00003653,0x00003654, 54010x00000264,0x0004003d,0x00000007,0x00003d09,
55510x00003659,0x000200f8,0x00003659,0x0004007c, 54020x00003d08,0x00050051,0x00000006,0x00003d23,
55520x00000006,0x0000365c,0x00003652,0x000200f9, 54030x00003d09,0x00000000,0x00050095,0x0000013d,
55530x0000365d,0x000200f8,0x00003654,0x0004007c, 54040x00003d25,0x00003d23,0x00003d07,0x00050051,
55540x00000006,0x00003657,0x00003652,0x000500c5, 54050x00000006,0x00003d26,0x00003d25,0x00000001,
55550x00000006,0x00003658,0x00000208,0x00003657, 54060x00050051,0x00000006,0x00003d27,0x00003d25,
55560x000200f9,0x0000365d,0x000200f8,0x0000365d, 54070x00000000,0x00050051,0x00000006,0x00003d2a,
55570x000700f5,0x00000006,0x00005a8f,0x00003658, 54080x00003d09,0x00000001,0x00050080,0x00000006,
55580x00003654,0x0000365c,0x00003659,0x00050041, 54090x00003d2c,0x00003d2a,0x00003d26,0x00050050,
55590x00000182,0x00003a77,0x00000180,0x00000181, 54100x00000007,0x00003d2d,0x00003d27,0x00003d2c,
55600x0004003d,0x00000006,0x00003a78,0x00003a77, 54110x0004007c,0x00000014,0x00003d1d,0x00003d2d,
55610x00050084,0x00000006,0x00003a79,0x000001a2, 54120x00060041,0x0000016c,0x00003d14,0x00003d1d,
55620x00003a78,0x00050080,0x00000006,0x00003a7a, 54130x0000016b,0x0000016b,0x0006003d,0x00000006,
55630x0000018b,0x00003a79,0x00050080,0x00000006, 54140x00003d15,0x00003d14,0x00000002,0x00000004,
55640x00003a80,0x00003a78,0x00005cc3,0x00050086, 54150x0004007c,0x00000006,0x00003d34,0x000039a6,
55650x00000006,0x00003a81,0x00003a80,0x00000185, 54160x00050084,0x00000006,0x00003d35,0x000000ec,
55660x00050084,0x00000006,0x00003a73,0x0000018b, 54170x00003d34,0x00050080,0x00000006,0x00003d36,
55670x00003a81,0x00050080,0x00000006,0x00003a74, 54180x000001c4,0x00003d35,0x00050095,0x0000013d,
55680x00003a7a,0x00003a73,0x00050080,0x00000006, 54190x00003d54,0x00003d23,0x00003d36,0x00050051,
55690x00003a6e,0x00003a74,0x00003a73,0x00050041, 54200x00000006,0x00003d55,0x00003d54,0x00000001,
55700x00000182,0x00003a65,0x00000180,0x000001b7, 54210x00050051,0x00000006,0x00003d56,0x00003d54,
55710x0004003d,0x00000006,0x00003a66,0x00003a65, 54220x00000000,0x00050080,0x00000006,0x00003d5b,
55720x00050084,0x00000006,0x00003a67,0x000001b6, 54230x00003d2a,0x00003d55,0x00050050,0x00000007,
55730x00003a66,0x00050080,0x00000006,0x00003a68, 54240x00003d5c,0x00003d56,0x00003d5b,0x0004007c,
55740x00003a6e,0x00003a67,0x00050041,0x00000182, 54250x00000014,0x00003d4c,0x00003d5c,0x00060041,
55750x00003a5e,0x00000180,0x000001cd,0x0004003d, 54260x0000016c,0x00003d43,0x00003d4c,0x0000016b,
55760x00000006,0x00003a5f,0x00003a5e,0x00050084, 54270x0000016b,0x0006003d,0x00000006,0x00003d44,
55770x00000006,0x00003a60,0x000001cc,0x00003a5f, 54280x00003d43,0x00000002,0x00000004,0x000500aa,
55780x00050080,0x00000006,0x00003a61,0x00003a68, 54290x0000002f,0x00003cef,0x00003d15,0x00003d44,
55790x00003a60,0x00050084,0x00000006,0x00003662, 54300x000300f7,0x00003cf7,0x00000000,0x000400fa,
55800x000000df,0x000011de,0x00050080,0x00000006, 54310x00003cef,0x00003cf0,0x00003cf7,0x000200f8,
55810x00003663,0x00003a61,0x00003662,0x00050041, 54320x00003cf0,0x000500c6,0x000000f4,0x00003cf3,
55820x0000022d,0x00003664,0x00000180,0x0000022b, 54330x000013db,0x000039a6,0x0004007c,0x00000006,
55830x0004003d,0x00000007,0x00003665,0x00003664, 54340x00003cf4,0x00003cf3,0x0006000c,0x000000f4,
55840x00050051,0x00000006,0x00003a9e,0x00003665, 54350x00003cf5,0x00000001,0x0000004b,0x00003cf4,
55850x00000000,0x00050095,0x00000130,0x00003aa0, 54360x00050082,0x000000f4,0x00003cf6,0x00000d76,
55860x00003a9e,0x00003663,0x00050051,0x00000006, 54370x00003cf5,0x000200f9,0x00003cfd,0x000200f8,
55870x00003aa1,0x00003aa0,0x00000001,0x00050051, 54380x00003cf7,0x000500c6,0x00000006,0x00003cfa,
55880x00000006,0x00003aa2,0x00003aa0,0x00000000, 54390x00003d15,0x00003d44,0x0006000c,0x000000f4,
55890x00050051,0x00000006,0x00003aa5,0x00003665, 54400x00003cfb,0x00000001,0x0000004b,0x00003cfa,
55900x00000001,0x00050080,0x00000006,0x00003aa7, 54410x00050082,0x000000f4,0x00003cfc,0x00000d7e,
55910x00003aa5,0x00003aa1,0x00050050,0x00000007, 54420x00003cfb,0x000200f9,0x00003cfd,0x000200f8,
55920x00003aa8,0x00003aa2,0x00003aa7,0x0004007c, 54430x00003cfd,0x000900f5,0x000000f4,0x00005e4a,
55930x00000014,0x00003a98,0x00003aa8,0x00060041, 54440x00000d67,0x00003ce7,0x00003cf6,0x00003cf0,
55940x0000015f,0x00003a90,0x00003a98,0x0000015e, 54450x00003cfc,0x00003cf7,0x000200f9,0x000039ab,
55950x0000015e,0x0005003e,0x00003a90,0x00005a8e, 54460x000200f8,0x000039ab,0x000700f5,0x000000f4,
55960x00000002,0x00000004,0x000500ac,0x0000002f, 54470x00005e4e,0x0000016b,0x00003cfd,0x00006118,
55970x00003ae2,0x00003a66,0x00000135,0x000300f7, 54480x000039c0,0x000700f5,0x000000f4,0x00005e4d,
55980x00003ae8,0x00000000,0x000400fa,0x00003ae2, 54490x00005e49,0x00003cfd,0x000039af,0x000039c0,
55990x00003ae3,0x00003ae7,0x000200f8,0x00003ae7, 54500x000400f6,0x000039c3,0x000039c0,0x00000000,
56000x000200f9,0x00003ae8,0x000200f8,0x00003ae3, 54510x000200f9,0x000039ac,0x000200f8,0x000039ac,
56010x00050082,0x00000006,0x00003ae6,0x00003a66, 54520x00050080,0x000000f4,0x000039ae,0x00005e4d,
56020x00000135,0x000200f9,0x00003ae8,0x000200f8, 54530x00000264,0x000500c3,0x000000f4,0x000039af,
56030x00003ae8,0x000700f5,0x00000006,0x00005a90, 54540x000039ae,0x00000264,0x00050080,0x000000f4,
56040x00003ae6,0x00003ae3,0x0000012b,0x00003ae7, 54550x000039b3,0x00005e4e,0x000039af,0x00050084,
56050x00050084,0x00000006,0x00003aad,0x000000df, 54560x000000f4,0x000039b5,0x000039b3,0x00003971,
56060x00005a90,0x00050080,0x00000006,0x00003aae, 54570x00050080,0x000000f4,0x000039b6,0x000013db,
56070x00003a61,0x00003aad,0x00050080,0x00000006, 54580x000039b5,0x000300f7,0x00003d87,0x00000000,
56080x0000366c,0x00003aae,0x00003662,0x00050095, 54590x000300fb,0x00000138,0x00003d65,0x000200f8,
56090x00000130,0x00003b01,0x00003a9e,0x0000366c, 54600x00003d65,0x000500b1,0x0000002f,0x00003d67,
56100x00050051,0x00000006,0x00003b02,0x00003b01, 54610x000039b6,0x0000016b,0x000400a8,0x0000002f,
56110x00000001,0x00050051,0x00000006,0x00003b03, 54620x00003d68,0x00003d67,0x000300f7,0x00003d6f,
56120x00003b01,0x00000000,0x00050080,0x00000006, 54630x00000000,0x000400fa,0x00003d68,0x00003d69,
56130x00003b08,0x00003aa5,0x00003b02,0x00050050, 54640x00003d6f,0x000200f8,0x00003d69,0x00050041,
56140x00000007,0x00003b09,0x00003b03,0x00003b08, 54650x000001bb,0x00003d6b,0x000001b9,0x000001f0,
56150x0004007c,0x00000014,0x00003af9,0x00003b09, 54660x0004003d,0x00000006,0x00003d6c,0x00003d6b,
56160x00060041,0x0000015f,0x00003af1,0x00003af9, 54670x0004007c,0x000000f4,0x00003d6d,0x00003d6c,
56170x0000015e,0x0000015e,0x0005003e,0x00003af1, 54680x000500af,0x0000002f,0x00003d6e,0x000039b6,
56180x00005a8f,0x00000002,0x00000004,0x000500c7, 54690x00003d6d,0x000200f9,0x00003d6f,0x000200f8,
56190x00000006,0x00003672,0x00005a8e,0x00000208, 54700x00003d6f,0x000700f5,0x0000002f,0x00003d70,
56200x000500aa,0x0000002f,0x00003673,0x00003672, 54710x00003d67,0x00003d65,0x00003d6e,0x00003d69,
56210x0000012b,0x000300f7,0x0000367e,0x00000000, 54720x000300f7,0x00003d72,0x00000000,0x000400fa,
56220x000400fa,0x00003673,0x00003674,0x0000367e, 54730x00003d70,0x00003d71,0x00003d72,0x000200f8,
56230x000200f8,0x00003674,0x000300f7,0x00003b4f, 54740x00003d71,0x000200f9,0x00003d87,0x000200f8,
56240x00000000,0x000400fa,0x00003ae2,0x00003b4a, 54750x00003d72,0x00050084,0x00000006,0x00003d90,
56250x00003b4e,0x000200f8,0x00003b4e,0x000200f9, 54760x000000ec,0x000012dd,0x00050080,0x00000006,
56260x00003b4f,0x000200f8,0x00003b4a,0x00050082, 54770x00003d91,0x000001c4,0x00003d90,0x00050041,
56270x00000006,0x00003b4d,0x00003a66,0x00000135, 54780x00000266,0x00003d92,0x000001b9,0x00000264,
56280x000200f9,0x00003b4f,0x000200f8,0x00003b4f, 54790x0004003d,0x00000007,0x00003d93,0x00003d92,
56290x000700f5,0x00000006,0x00005a91,0x00003b4d, 54800x00050051,0x00000006,0x00003dad,0x00003d93,
56300x00003b4a,0x0000012b,0x00003b4e,0x00050084, 54810x00000000,0x00050095,0x0000013d,0x00003daf,
56310x00000006,0x00003b14,0x000000df,0x00005a91, 54820x00003dad,0x00003d91,0x00050051,0x00000006,
56320x00050080,0x00000006,0x00003b15,0x00003a61, 54830x00003db0,0x00003daf,0x00000001,0x00050051,
56330x00003b14,0x000300f7,0x00003b5c,0x00000000, 54840x00000006,0x00003db1,0x00003daf,0x00000000,
56340x000400fa,0x00003ae2,0x00003b57,0x00003b5b, 54850x00050051,0x00000006,0x00003db4,0x00003d93,
56350x000200f8,0x00003b5b,0x000200f9,0x00003b5c, 54860x00000001,0x00050080,0x00000006,0x00003db6,
56360x000200f8,0x00003b57,0x00050082,0x00000006, 54870x00003db4,0x00003db0,0x00050050,0x00000007,
56370x00003b5a,0x00003a66,0x00000135,0x000200f9, 54880x00003db7,0x00003db1,0x00003db6,0x0004007c,
56380x00003b5c,0x000200f8,0x00003b5c,0x000700f5, 54890x00000014,0x00003da7,0x00003db7,0x00060041,
56390x00000006,0x00005a92,0x00003b5a,0x00003b57, 54900x0000016c,0x00003d9e,0x00003da7,0x0000016b,
56400x0000012b,0x00003b5b,0x00050084,0x00000006, 54910x0000016b,0x0006003d,0x00000006,0x00003d9f,
56410x00003b0e,0x000000df,0x00005a92,0x00050080, 54920x00003d9e,0x00000002,0x00000004,0x0004007c,
56420x00000006,0x00003b0f,0x00003b15,0x00003b0e, 54930x00000006,0x00003dbe,0x000039b6,0x00050084,
56430x00050084,0x00000006,0x00003677,0x000000df, 54940x00000006,0x00003dbf,0x000000ec,0x00003dbe,
56440x00005a8e,0x00050080,0x00000006,0x00003678, 54950x00050080,0x00000006,0x00003dc0,0x000001c4,
56450x00003b0f,0x00003677,0x00050095,0x00000130, 54960x00003dbf,0x00050095,0x0000013d,0x00003dde,
56460x00003b75,0x00003a9e,0x00003678,0x00050051, 54970x00003dad,0x00003dc0,0x00050051,0x00000006,
56470x00000006,0x00003b76,0x00003b75,0x00000001, 54980x00003ddf,0x00003dde,0x00000001,0x00050051,
56480x00050051,0x00000006,0x00003b77,0x00003b75, 54990x00000006,0x00003de0,0x00003dde,0x00000000,
56490x00000000,0x00050080,0x00000006,0x00003b7c, 55000x00050080,0x00000006,0x00003de5,0x00003db4,
56500x00003aa5,0x00003b76,0x00050050,0x00000007, 55010x00003ddf,0x00050050,0x00000007,0x00003de6,
56510x00003b7d,0x00003b77,0x00003b7c,0x0004007c, 55020x00003de0,0x00003de5,0x0004007c,0x00000014,
56520x00000014,0x00003b6d,0x00003b7d,0x00060041, 55030x00003dd6,0x00003de6,0x00060041,0x0000016c,
56530x0000015f,0x00003b65,0x00003b6d,0x0000015e, 55040x00003dcd,0x00003dd6,0x0000016b,0x0000016b,
56540x0000015e,0x0005003e,0x00003b65,0x000011de, 55050x0006003d,0x00000006,0x00003dce,0x00003dcd,
56550x00000002,0x00000004,0x000200f9,0x0000367e, 55060x00000002,0x00000004,0x000500aa,0x0000002f,
56560x000200f8,0x0000367e,0x000500c7,0x00000006, 55070x00003d79,0x00003d9f,0x00003dce,0x000300f7,
56570x00003680,0x00005a8f,0x00000208,0x000500aa, 55080x00003d81,0x00000000,0x000400fa,0x00003d79,
56580x0000002f,0x00003681,0x00003680,0x0000012b, 55090x00003d7a,0x00003d81,0x000200f8,0x00003d7a,
56590x000300f7,0x0000368c,0x00000000,0x000400fa, 55100x000500c6,0x000000f4,0x00003d7d,0x000013db,
56600x00003681,0x00003682,0x0000368c,0x000200f8, 55110x000039b6,0x0004007c,0x00000006,0x00003d7e,
56610x00003682,0x000300f7,0x00003bc3,0x00000000, 55120x00003d7d,0x0006000c,0x000000f4,0x00003d7f,
56620x000400fa,0x00003ae2,0x00003bbe,0x00003bc2, 55130x00000001,0x0000004b,0x00003d7e,0x00050082,
56630x000200f8,0x00003bc2,0x000200f9,0x00003bc3, 55140x000000f4,0x00003d80,0x00000d76,0x00003d7f,
56640x000200f8,0x00003bbe,0x00050082,0x00000006, 55150x000200f9,0x00003d87,0x000200f8,0x00003d81,
56650x00003bc1,0x00003a66,0x00000135,0x000200f9, 55160x000500c6,0x00000006,0x00003d84,0x00003d9f,
56660x00003bc3,0x000200f8,0x00003bc3,0x000700f5, 55170x00003dce,0x0006000c,0x000000f4,0x00003d85,
56670x00000006,0x00005a93,0x00003bc1,0x00003bbe, 55180x00000001,0x0000004b,0x00003d84,0x00050082,
56680x0000012b,0x00003bc2,0x00050084,0x00000006, 55190x000000f4,0x00003d86,0x00000d7e,0x00003d85,
56690x00003b88,0x000000df,0x00005a93,0x00050080, 55200x000200f9,0x00003d87,0x000200f8,0x00003d87,
56700x00000006,0x00003b89,0x00003a61,0x00003b88, 55210x000900f5,0x000000f4,0x00005e4f,0x00000d67,
56710x000300f7,0x00003bd0,0x00000000,0x000400fa, 55220x00003d71,0x00003d80,0x00003d7a,0x00003d86,
56720x00003ae2,0x00003bcb,0x00003bcf,0x000200f8, 55230x00003d81,0x000500ad,0x0000002f,0x000039ba,
56730x00003bcf,0x000200f9,0x00003bd0,0x000200f8, 55240x00005e4f,0x00005e4a,0x000600a9,0x000000f4,
56740x00003bcb,0x00050082,0x00000006,0x00003bce, 55250x00006118,0x000039ba,0x000039b3,0x00005e4e,
56750x00003a66,0x00000135,0x000200f9,0x00003bd0, 55260x000200f9,0x000039c0,0x000200f8,0x000039c0,
56760x000200f8,0x00003bd0,0x000700f5,0x00000006, 55270x000500ad,0x0000002f,0x000039c2,0x000039af,
56770x00005a94,0x00003bce,0x00003bcb,0x0000012b, 55280x00000264,0x000400fa,0x000039c2,0x000039ab,
56780x00003bcf,0x00050084,0x00000006,0x00003b82, 55290x000039c3,0x000200f8,0x000039c3,0x00050084,
56790x000000df,0x00005a94,0x00050080,0x00000006, 55300x000000f4,0x000039c7,0x00006118,0x00003971,
56800x00003b83,0x00003b89,0x00003b82,0x00050084, 55310x00050080,0x000000f4,0x000039c8,0x000013db,
56810x00000006,0x00003685,0x000000df,0x00005a8f, 55320x000039c7,0x0007000c,0x000000f4,0x000039ca,
56820x00050080,0x00000006,0x00003686,0x00003b83, 55330x00000001,0x00000027,0x00003971,0x0000016b,
56830x00003685,0x00050095,0x00000130,0x00003be9, 55340x00050080,0x000000f4,0x000039cb,0x000039c8,
56840x00003a9e,0x00003686,0x00050051,0x00000006, 55350x000039ca,0x0007000c,0x000000f4,0x000039ce,
56850x00003bea,0x00003be9,0x00000001,0x00050051, 55360x00000001,0x00000027,0x000013db,0x000039a6,
56860x00000006,0x00003beb,0x00003be9,0x00000000, 55370x000500aa,0x0000002f,0x000039d0,0x000039ce,
56870x00050080,0x00000006,0x00003bf0,0x00003aa5, 55380x000039cb,0x000300f7,0x000039d8,0x00000000,
56880x00003bea,0x00050050,0x00000007,0x00003bf1, 55390x000400fa,0x000039d0,0x000039d1,0x000039d5,
56890x00003beb,0x00003bf0,0x0004007c,0x00000014, 55400x000200f8,0x000039d5,0x0004007c,0x00000006,
56900x00003be1,0x00003bf1,0x00060041,0x0000015f, 55410x000039d7,0x000039cb,0x000200f9,0x000039d8,
56910x00003bd9,0x00003be1,0x0000015e,0x0000015e, 55420x000200f8,0x000039d1,0x0004007c,0x00000006,
56920x0005003e,0x00003bd9,0x000011de,0x00000002, 55430x000039d3,0x000039cb,0x000500c5,0x00000006,
56930x00000004,0x000200f9,0x0000368c,0x000200f8, 55440x000039d4,0x00000241,0x000039d3,0x000200f9,
56940x0000368c,0x000500aa,0x0000002f,0x0000368e, 55450x000039d8,0x000200f8,0x000039d8,0x000700f5,
56950x000012dc,0x0000015e,0x000300f7,0x00003694, 55460x00000006,0x00005e56,0x000039d4,0x000039d1,
56960x00000000,0x000400fa,0x0000368e,0x0000368f, 55470x000039d7,0x000039d5,0x0007000c,0x000000f4,
56970x00003694,0x000200f8,0x0000368f,0x000300f7, 55480x000039dc,0x00000001,0x0000002a,0x000013db,
56980x00003c37,0x00000000,0x000400fa,0x00003ae2, 55490x000039a6,0x00050080,0x000000f4,0x000039de,
56990x00003c32,0x00003c36,0x000200f8,0x00003c36, 55500x000039cb,0x00000264,0x000500aa,0x0000002f,
57000x000200f9,0x00003c37,0x000200f8,0x00003c32, 55510x000039df,0x000039dc,0x000039de,0x000300f7,
57010x00050082,0x00000006,0x00003c35,0x00003a66, 55520x000039e9,0x00000000,0x000400fa,0x000039df,
57020x00000135,0x000200f9,0x00003c37,0x000200f8, 55530x000039e0,0x000039e5,0x000200f8,0x000039e5,
57030x00003c37,0x000700f5,0x00000006,0x00005a95, 55540x0004007c,0x00000006,0x000039e8,0x000039de,
57040x00003c35,0x00003c32,0x0000012b,0x00003c36, 55550x000200f9,0x000039e9,0x000200f8,0x000039e0,
57050x00050084,0x00000006,0x00003bfc,0x000000df, 55560x0004007c,0x00000006,0x000039e3,0x000039de,
57060x00005a95,0x00050080,0x00000006,0x00003bfd, 55570x000500c5,0x00000006,0x000039e4,0x00000241,
57070x00003a61,0x00003bfc,0x000300f7,0x00003c44, 55580x000039e3,0x000200f9,0x000039e9,0x000200f8,
57080x00000000,0x000400fa,0x00003ae2,0x00003c3f, 55590x000039e9,0x000700f5,0x00000006,0x00005e57,
57090x00003c43,0x000200f8,0x00003c43,0x000200f9, 55600x000039e4,0x000039e0,0x000039e8,0x000039e5,
57100x00003c44,0x000200f8,0x00003c3f,0x00050082, 55610x00050041,0x000001bb,0x00003e03,0x000001b9,
57110x00000006,0x00003c42,0x00003a66,0x00000135, 55620x000001ba,0x0004003d,0x00000006,0x00003e04,
57120x000200f9,0x00003c44,0x000200f8,0x00003c44, 55630x00003e03,0x00050084,0x00000006,0x00003e05,
57130x000700f5,0x00000006,0x00005a96,0x00003c42, 55640x000001db,0x00003e04,0x00050080,0x00000006,
57140x00003c3f,0x0000012b,0x00003c43,0x00050084, 55650x00003e06,0x000001c4,0x00003e05,0x00050080,
57150x00000006,0x00003bf6,0x000000df,0x00005a96, 55660x00000006,0x00003e0c,0x00003e04,0x0000062f,
57160x00050080,0x00000006,0x00003bf7,0x00003bfd, 55670x00050086,0x00000006,0x00003e0d,0x00003e0c,
57170x00003bf6,0x00050095,0x00000130,0x00003c5d, 55680x000001be,0x00050084,0x00000006,0x00003dff,
57180x00003a9e,0x00003bf7,0x00050051,0x00000006, 55690x000001c4,0x00003e0d,0x00050080,0x00000006,
57190x00003c5e,0x00003c5d,0x00000001,0x00050051, 55700x00003e00,0x00003e06,0x00003dff,0x00050080,
57200x00000006,0x00003c5f,0x00003c5d,0x00000000, 55710x00000006,0x00003dfa,0x00003e00,0x00003dff,
57210x00050080,0x00000006,0x00003c64,0x00003aa5, 55720x00050041,0x000001bb,0x00003df1,0x000001b9,
57220x00003c5e,0x00050050,0x00000007,0x00003c65, 55730x000001f0,0x0004003d,0x00000006,0x00003df2,
57230x00003c5f,0x00003c64,0x0004007c,0x00000014, 55740x00003df1,0x00050084,0x00000006,0x00003df3,
57240x00003c55,0x00003c65,0x00060041,0x0000015f, 55750x000001ef,0x00003df2,0x00050080,0x00000006,
57250x00003c4d,0x00003c55,0x0000015e,0x0000015e, 55760x00003df4,0x00003dfa,0x00003df3,0x00050041,
57260x0005003e,0x00003c4d,0x00000500,0x00000002, 55770x000001bb,0x00003dea,0x000001b9,0x00000206,
57270x00000004,0x000200f9,0x00003694,0x000200f8, 55780x0004003d,0x00000006,0x00003deb,0x00003dea,
57280x00003694,0x000200f9,0x000012da,0x000200f8, 55790x00050084,0x00000006,0x00003dec,0x00000205,
57290x000012da,0x000200f9,0x000012d1,0x000200f8, 55800x00003deb,0x00050080,0x00000006,0x00003ded,
57300x000012d0,0x00050041,0x00000182,0x000033ba, 55810x00003df4,0x00003dec,0x00050084,0x00000006,
57310x00000180,0x00000181,0x0004003d,0x00000006, 55820x000039ee,0x000000ec,0x000012dd,0x00050080,
57320x000033bb,0x000033ba,0x00050084,0x00000006, 55830x00000006,0x000039ef,0x00003ded,0x000039ee,
57330x000033bc,0x000001a2,0x000033bb,0x00050080, 55840x00050041,0x00000266,0x000039f0,0x000001b9,
57340x00000006,0x000033bd,0x0000018b,0x000033bc, 55850x00000264,0x0004003d,0x00000007,0x000039f1,
57350x00050080,0x00000006,0x000033c3,0x000033bb, 55860x000039f0,0x00050051,0x00000006,0x00003e2a,
57360x00005cc3,0x00050086,0x00000006,0x000033c4, 55870x000039f1,0x00000000,0x00050095,0x0000013d,
57370x000033c3,0x00000185,0x00050084,0x00000006, 55880x00003e2c,0x00003e2a,0x000039ef,0x00050051,
57380x000033b6,0x0000018b,0x000033c4,0x00050080, 55890x00000006,0x00003e2d,0x00003e2c,0x00000001,
57390x00000006,0x000033b7,0x000033bd,0x000033b6, 55900x00050051,0x00000006,0x00003e2e,0x00003e2c,
57400x00050080,0x00000006,0x000033b1,0x000033b7, 55910x00000000,0x00050051,0x00000006,0x00003e31,
57410x000033b6,0x00050084,0x00000006,0x00003385, 55920x000039f1,0x00000001,0x00050080,0x00000006,
57420x000001b6,0x000011de,0x00050080,0x00000006, 55930x00003e33,0x00003e31,0x00003e2d,0x00050050,
57430x00003386,0x000033b1,0x00003385,0x00050041, 55940x00000007,0x00003e34,0x00003e2e,0x00003e33,
57440x0000022d,0x00003387,0x00000180,0x0000022b, 55950x0004007c,0x00000014,0x00003e24,0x00003e34,
57450x0004003d,0x00000007,0x00003388,0x00003387, 55960x00060041,0x0000016c,0x00003e1c,0x00003e24,
57460x00050051,0x00000006,0x000033e2,0x00003388, 55970x0000016b,0x0000016b,0x0005003e,0x00003e1c,
57470x00000000,0x00050095,0x00000130,0x000033e4, 55980x00005e56,0x00000002,0x00000004,0x000500ac,
57480x000033e2,0x00003386,0x00050051,0x00000006, 55990x0000002f,0x00003e6e,0x00003df2,0x00000142,
57490x000033e5,0x000033e4,0x00000001,0x00050051, 56000x000300f7,0x00003e74,0x00000000,0x000400fa,
57500x00000006,0x000033e6,0x000033e4,0x00000000, 56010x00003e6e,0x00003e6f,0x00003e73,0x000200f8,
57510x00050051,0x00000006,0x000033e9,0x00003388, 56020x00003e73,0x000200f9,0x00003e74,0x000200f8,
57520x00000001,0x00050080,0x00000006,0x000033eb, 56030x00003e6f,0x00050082,0x00000006,0x00003e72,
57530x000033e9,0x000033e5,0x00050050,0x00000007, 56040x00003df2,0x00000142,0x000200f9,0x00003e74,
57540x000033ec,0x000033e6,0x000033eb,0x0004007c, 56050x000200f8,0x00003e74,0x000700f5,0x00000006,
57550x00000014,0x000033dc,0x000033ec,0x00060041, 56060x00005e58,0x00003e72,0x00003e6f,0x00000138,
57560x0000015f,0x000033d3,0x000033dc,0x0000015e, 56070x00003e73,0x00050084,0x00000006,0x00003e39,
57570x0000015e,0x0006003d,0x00000006,0x000033d4, 56080x000000ec,0x00005e58,0x00050080,0x00000006,
57580x000033d3,0x00000002,0x00000004,0x0004007c, 56090x00003e3a,0x00003ded,0x00003e39,0x00050080,
57590x00000027,0x0000338b,0x000033d4,0x00050080, 56100x00000006,0x000039f8,0x00003e3a,0x000039ee,
57600x00000006,0x0000338d,0x00003386,0x000000df, 56110x00050095,0x0000013d,0x00003e8d,0x00003e2a,
57610x00050095,0x00000130,0x00003405,0x000033e2, 56120x000039f8,0x00050051,0x00000006,0x00003e8e,
57620x0000338d,0x00050051,0x00000006,0x00003406, 56130x00003e8d,0x00000001,0x00050051,0x00000006,
57630x00003405,0x00000001,0x00050051,0x00000006, 56140x00003e8f,0x00003e8d,0x00000000,0x00050080,
57640x00003407,0x00003405,0x00000000,0x00050080, 56150x00000006,0x00003e94,0x00003e31,0x00003e8e,
57650x00000006,0x0000340c,0x000033e9,0x00003406, 56160x00050050,0x00000007,0x00003e95,0x00003e8f,
57660x00050050,0x00000007,0x0000340d,0x00003407, 56170x00003e94,0x0004007c,0x00000014,0x00003e85,
57670x0000340c,0x0004007c,0x00000014,0x000033fd, 56180x00003e95,0x00060041,0x0000016c,0x00003e7d,
57680x0000340d,0x00060041,0x0000015f,0x000033f4, 56190x00003e85,0x0000016b,0x0000016b,0x0005003e,
57690x000033fd,0x0000015e,0x0000015e,0x0006003d, 56200x00003e7d,0x00005e57,0x00000002,0x00000004,
57700x00000006,0x000033f5,0x000033f4,0x00000002, 56210x000500c7,0x00000006,0x000039fe,0x00005e56,
57710x00000004,0x0004007c,0x00000027,0x00003391, 56220x00000241,0x000500aa,0x0000002f,0x000039ff,
57720x000033f5,0x00050080,0x00000006,0x00003393, 56230x000039fe,0x00000138,0x000300f7,0x00003a0a,
57730x00003386,0x00000194,0x00050095,0x00000130, 56240x00000000,0x000400fa,0x000039ff,0x00003a00,
57740x00003426,0x000033e2,0x00003393,0x00050051, 56250x00003a0a,0x000200f8,0x00003a00,0x000300f7,
57750x00000006,0x00003427,0x00003426,0x00000001, 56260x00003edb,0x00000000,0x000400fa,0x00003e6e,
57760x00050051,0x00000006,0x00003428,0x00003426, 56270x00003ed6,0x00003eda,0x000200f8,0x00003eda,
57770x00000000,0x00050080,0x00000006,0x0000342d, 56280x000200f9,0x00003edb,0x000200f8,0x00003ed6,
57780x000033e9,0x00003427,0x00050050,0x00000007, 56290x00050082,0x00000006,0x00003ed9,0x00003df2,
57790x0000342e,0x00003428,0x0000342d,0x0004007c, 56300x00000142,0x000200f9,0x00003edb,0x000200f8,
57800x00000014,0x0000341e,0x0000342e,0x00060041, 56310x00003edb,0x000700f5,0x00000006,0x00005e59,
57810x0000015f,0x00003415,0x0000341e,0x0000015e, 56320x00003ed9,0x00003ed6,0x00000138,0x00003eda,
57820x0000015e,0x0006003d,0x00000006,0x00003416, 56330x00050084,0x00000006,0x00003ea0,0x000000ec,
57830x00003415,0x00000002,0x00000004,0x0004007c, 56340x00005e59,0x00050080,0x00000006,0x00003ea1,
57840x00000027,0x00003397,0x00003416,0x00060050, 56350x00003ded,0x00003ea0,0x000300f7,0x00003ee8,
57850x00000063,0x00003398,0x0000338b,0x00003391, 56360x00000000,0x000400fa,0x00003e6e,0x00003ee3,
57860x00003397,0x00050080,0x00000006,0x0000339a, 56370x00003ee7,0x000200f8,0x00003ee7,0x000200f9,
57870x00003386,0x0000019b,0x00050095,0x00000130, 56380x00003ee8,0x000200f8,0x00003ee3,0x00050082,
57880x00003447,0x000033e2,0x0000339a,0x00050051, 56390x00000006,0x00003ee6,0x00003df2,0x00000142,
57890x00000006,0x00003448,0x00003447,0x00000001, 56400x000200f9,0x00003ee8,0x000200f8,0x00003ee8,
57900x00050051,0x00000006,0x00003449,0x00003447, 56410x000700f5,0x00000006,0x00005e5a,0x00003ee6,
57910x00000000,0x00050080,0x00000006,0x0000344e, 56420x00003ee3,0x00000138,0x00003ee7,0x00050084,
57920x000033e9,0x00003448,0x00050050,0x00000007, 56430x00000006,0x00003e9a,0x000000ec,0x00005e5a,
57930x0000344f,0x00003449,0x0000344e,0x0004007c, 56440x00050080,0x00000006,0x00003e9b,0x00003ea1,
57940x00000014,0x0000343f,0x0000344f,0x00060041, 56450x00003e9a,0x00050084,0x00000006,0x00003a03,
57950x0000015f,0x00003436,0x0000343f,0x0000015e, 56460x000000ec,0x00005e56,0x00050080,0x00000006,
57960x0000015e,0x0006003d,0x00000006,0x00003437, 56470x00003a04,0x00003e9b,0x00003a03,0x00050095,
57970x00003436,0x00000002,0x00000004,0x0004007c, 56480x0000013d,0x00003f01,0x00003e2a,0x00003a04,
57980x00000027,0x0000339e,0x00003437,0x00050080, 56490x00050051,0x00000006,0x00003f02,0x00003f01,
57990x00000006,0x000033a0,0x00003386,0x000001a2, 56500x00000001,0x00050051,0x00000006,0x00003f03,
58000x00050095,0x00000130,0x00003468,0x000033e2, 56510x00003f01,0x00000000,0x00050080,0x00000006,
58010x000033a0,0x00050051,0x00000006,0x00003469, 56520x00003f08,0x00003e31,0x00003f02,0x00050050,
58020x00003468,0x00000001,0x00050051,0x00000006, 56530x00000007,0x00003f09,0x00003f03,0x00003f08,
58030x0000346a,0x00003468,0x00000000,0x00050080, 56540x0004007c,0x00000014,0x00003ef9,0x00003f09,
58040x00000006,0x0000346f,0x000033e9,0x00003469, 56550x00060041,0x0000016c,0x00003ef1,0x00003ef9,
58050x00050050,0x00000007,0x00003470,0x0000346a, 56560x0000016b,0x0000016b,0x0005003e,0x00003ef1,
58060x0000346f,0x0004007c,0x00000014,0x00003460, 56570x000012dd,0x00000002,0x00000004,0x000200f9,
58070x00003470,0x00060041,0x0000015f,0x00003457, 56580x00003a0a,0x000200f8,0x00003a0a,0x000500c7,
58080x00003460,0x0000015e,0x0000015e,0x0006003d, 56590x00000006,0x00003a0c,0x00005e57,0x00000241,
58090x00000006,0x00003458,0x00003457,0x00000002, 56600x000500aa,0x0000002f,0x00003a0d,0x00003a0c,
58100x00000004,0x0004007c,0x00000027,0x000033a4, 56610x00000138,0x000300f7,0x00003a18,0x00000000,
58110x00003458,0x00050080,0x00000006,0x000033a6, 56620x000400fa,0x00003a0d,0x00003a0e,0x00003a18,
58120x00003386,0x00000260,0x00050095,0x00000130, 56630x000200f8,0x00003a0e,0x000300f7,0x00003f4f,
58130x00003489,0x000033e2,0x000033a6,0x00050051, 56640x00000000,0x000400fa,0x00003e6e,0x00003f4a,
58140x00000006,0x0000348a,0x00003489,0x00000001, 56650x00003f4e,0x000200f8,0x00003f4e,0x000200f9,
58150x00050051,0x00000006,0x0000348b,0x00003489, 56660x00003f4f,0x000200f8,0x00003f4a,0x00050082,
58160x00000000,0x00050080,0x00000006,0x00003490, 56670x00000006,0x00003f4d,0x00003df2,0x00000142,
58170x000033e9,0x0000348a,0x00050050,0x00000007, 56680x000200f9,0x00003f4f,0x000200f8,0x00003f4f,
58180x00003491,0x0000348b,0x00003490,0x0004007c, 56690x000700f5,0x00000006,0x00005e5b,0x00003f4d,
58190x00000014,0x00003481,0x00003491,0x00060041, 56700x00003f4a,0x00000138,0x00003f4e,0x00050084,
58200x0000015f,0x00003478,0x00003481,0x0000015e, 56710x00000006,0x00003f14,0x000000ec,0x00005e5b,
58210x0000015e,0x0006003d,0x00000006,0x00003479, 56720x00050080,0x00000006,0x00003f15,0x00003ded,
58220x00003478,0x00000002,0x00000004,0x0004007c, 56730x00003f14,0x000300f7,0x00003f5c,0x00000000,
58230x00000027,0x000033aa,0x00003479,0x00060050, 56740x000400fa,0x00003e6e,0x00003f57,0x00003f5b,
58240x00000063,0x000033ab,0x0000339e,0x000033a4, 56750x000200f8,0x00003f5b,0x000200f9,0x00003f5c,
58250x000033aa,0x000500bc,0x0000002f,0x00003498, 56760x000200f8,0x00003f57,0x00050082,0x00000006,
58260x0000338b,0x0000339e,0x000300f7,0x0000349f, 56770x00003f5a,0x00003df2,0x00000142,0x000200f9,
58270x00000000,0x000400fa,0x00003498,0x00003499, 56780x00003f5c,0x000200f8,0x00003f5c,0x000700f5,
58280x0000349f,0x000200f8,0x00003499,0x000500bc, 56790x00000006,0x00005e5c,0x00003f5a,0x00003f57,
58290x0000002f,0x0000349e,0x00003391,0x000033a4, 56800x00000138,0x00003f5b,0x00050084,0x00000006,
58300x000200f9,0x0000349f,0x000200f8,0x0000349f, 56810x00003f0e,0x000000ec,0x00005e5c,0x00050080,
58310x000700f5,0x0000002f,0x000034a0,0x00003498, 56820x00000006,0x00003f0f,0x00003f15,0x00003f0e,
58320x000012d0,0x0000349e,0x00003499,0x000300f7, 56830x00050084,0x00000006,0x00003a11,0x000000ec,
58330x000034a7,0x00000000,0x000400fa,0x000034a0, 56840x00005e57,0x00050080,0x00000006,0x00003a12,
58340x000034a1,0x000034a7,0x000200f8,0x000034a1, 56850x00003f0f,0x00003a11,0x00050095,0x0000013d,
58350x000500bc,0x0000002f,0x000034a6,0x00003397, 56860x00003f75,0x00003e2a,0x00003a12,0x00050051,
58360x000033aa,0x000200f9,0x000034a7,0x000200f8, 56870x00000006,0x00003f76,0x00003f75,0x00000001,
58370x000034a7,0x000700f5,0x0000002f,0x000034a8, 56880x00050051,0x00000006,0x00003f77,0x00003f75,
58380x000034a0,0x0000349f,0x000034a6,0x000034a1, 56890x00000000,0x00050080,0x00000006,0x00003f7c,
58390x000300f7,0x00003364,0x00000000,0x000400fa, 56900x00003e31,0x00003f76,0x00050050,0x00000007,
58400x000034a8,0x00003328,0x00003364,0x000200f8, 56910x00003f7d,0x00003f77,0x00003f7c,0x0004007c,
58410x00003328,0x00050095,0x00000130,0x000034b9, 56920x00000014,0x00003f6d,0x00003f7d,0x00060041,
58420x000033e2,0x0000012b,0x00050051,0x00000006, 56930x0000016c,0x00003f65,0x00003f6d,0x0000016b,
58430x000034ba,0x000034b9,0x00000001,0x00050051, 56940x0000016b,0x0005003e,0x00003f65,0x000012dd,
58440x00000006,0x000034bb,0x000034b9,0x00000000, 56950x00000002,0x00000004,0x000200f9,0x00003a18,
58450x00050080,0x00000006,0x000034c0,0x000033e9, 56960x000200f8,0x00003a18,0x000500aa,0x0000002f,
58460x000034ba,0x00050050,0x00000007,0x000034c1, 56970x00003a1a,0x000013db,0x0000016b,0x000300f7,
58470x000034bb,0x000034c0,0x0004007c,0x00000014, 56980x00003a20,0x00000000,0x000400fa,0x00003a1a,
58480x000034b1,0x000034c1,0x00060041,0x0000015f, 56990x00003a1b,0x00003a20,0x000200f8,0x00003a1b,
58490x0000332d,0x000034b1,0x0000015e,0x0000015e, 57000x000300f7,0x00003fc3,0x00000000,0x000400fa,
58500x0006003d,0x00000006,0x0000332e,0x0000332d, 57010x00003e6e,0x00003fbe,0x00003fc2,0x000200f8,
58510x00000002,0x00000004,0x000500c7,0x00000006, 57020x00003fc2,0x000200f9,0x00003fc3,0x000200f8,
58520x000034c6,0x0000332e,0x00000208,0x000500ab, 57030x00003fbe,0x00050082,0x00000006,0x00003fc1,
58530x0000002f,0x000034c7,0x000034c6,0x0000012b, 57040x00003df2,0x00000142,0x000200f9,0x00003fc3,
58540x000300f7,0x000034ce,0x00000000,0x000400fa, 57050x000200f8,0x00003fc3,0x000700f5,0x00000006,
58550x000034c7,0x000034c8,0x000034cb,0x000200f8, 57060x00005e5d,0x00003fc1,0x00003fbe,0x00000138,
58560x000034cb,0x000400c8,0x00000006,0x000034cd, 57070x00003fc2,0x00050084,0x00000006,0x00003f88,
58570x0000332e,0x000200f9,0x000034ce,0x000200f8, 57080x000000ec,0x00005e5d,0x00050080,0x00000006,
58580x000034c8,0x000500c7,0x00000006,0x000034ca, 57090x00003f89,0x00003ded,0x00003f88,0x000300f7,
58590x0000332e,0x0000021d,0x000200f9,0x000034ce, 57100x00003fd0,0x00000000,0x000400fa,0x00003e6e,
58600x000200f8,0x000034ce,0x000700f5,0x00000006, 57110x00003fcb,0x00003fcf,0x000200f8,0x00003fcf,
58610x00005a9d,0x000034ca,0x000034c8,0x000034cd, 57120x000200f9,0x00003fd0,0x000200f8,0x00003fcb,
58620x000034cb,0x0004007c,0x00000027,0x000034d0, 57130x00050082,0x00000006,0x00003fce,0x00003df2,
58630x00005a9d,0x00060041,0x0000015f,0x00003331, 57140x00000142,0x000200f9,0x00003fd0,0x000200f8,
58640x000034b1,0x0000015e,0x0000022b,0x0006003d, 57150x00003fd0,0x000700f5,0x00000006,0x00005e5e,
58650x00000006,0x00003332,0x00003331,0x00000002, 57160x00003fce,0x00003fcb,0x00000138,0x00003fcf,
58660x00000004,0x000500c7,0x00000006,0x000034d5, 57170x00050084,0x00000006,0x00003f82,0x000000ec,
58670x00003332,0x00000208,0x000500ab,0x0000002f, 57180x00005e5e,0x00050080,0x00000006,0x00003f83,
58680x000034d6,0x000034d5,0x0000012b,0x000300f7, 57190x00003f89,0x00003f82,0x00050095,0x0000013d,
58690x000034dd,0x00000000,0x000400fa,0x000034d6, 57200x00003fe9,0x00003e2a,0x00003f83,0x00050051,
58700x000034d7,0x000034da,0x000200f8,0x000034da, 57210x00000006,0x00003fea,0x00003fe9,0x00000001,
58710x000400c8,0x00000006,0x000034dc,0x00003332, 57220x00050051,0x00000006,0x00003feb,0x00003fe9,
58720x000200f9,0x000034dd,0x000200f8,0x000034d7, 57230x00000000,0x00050080,0x00000006,0x00003ff0,
58730x000500c7,0x00000006,0x000034d9,0x00003332, 57240x00003e31,0x00003fea,0x00050050,0x00000007,
58740x0000021d,0x000200f9,0x000034dd,0x000200f8, 57250x00003ff1,0x00003feb,0x00003ff0,0x0004007c,
58750x000034dd,0x000700f5,0x00000006,0x00005a9e, 57260x00000014,0x00003fe1,0x00003ff1,0x00060041,
58760x000034d9,0x000034d7,0x000034dc,0x000034da, 57270x0000016c,0x00003fd9,0x00003fe1,0x0000016b,
58770x0004007c,0x00000027,0x000034df,0x00005a9e, 57280x0000016b,0x0005003e,0x00003fd9,0x00000539,
58780x00060041,0x0000015f,0x00003335,0x000034b1, 57290x00000002,0x00000004,0x000200f9,0x00003a20,
58790x0000015e,0x000002dc,0x0006003d,0x00000006, 57300x000200f8,0x00003a20,0x000200f9,0x000013d9,
58800x00003336,0x00003335,0x00000002,0x00000004, 57310x000200f8,0x000013d9,0x000200f9,0x000013d0,
58810x000500c7,0x00000006,0x000034e4,0x00003336, 57320x000200f8,0x000013cf,0x00050041,0x000001bb,
58820x00000208,0x000500ab,0x0000002f,0x000034e5, 57330x00003746,0x000001b9,0x000001ba,0x0004003d,
58830x000034e4,0x0000012b,0x000300f7,0x000034ec, 57340x00000006,0x00003747,0x00003746,0x00050084,
58840x00000000,0x000400fa,0x000034e5,0x000034e6, 57350x00000006,0x00003748,0x000001db,0x00003747,
58850x000034e9,0x000200f8,0x000034e9,0x000400c8, 57360x00050080,0x00000006,0x00003749,0x000001c4,
58860x00000006,0x000034eb,0x00003336,0x000200f9, 57370x00003748,0x00050080,0x00000006,0x0000374f,
58870x000034ec,0x000200f8,0x000034e6,0x000500c7, 57380x00003747,0x0000062f,0x00050086,0x00000006,
58880x00000006,0x000034e8,0x00003336,0x0000021d, 57390x00003750,0x0000374f,0x000001be,0x00050084,
58890x000200f9,0x000034ec,0x000200f8,0x000034ec, 57400x00000006,0x00003742,0x000001c4,0x00003750,
58900x000700f5,0x00000006,0x00005a9f,0x000034e8, 57410x00050080,0x00000006,0x00003743,0x00003749,
58910x000034e6,0x000034eb,0x000034e9,0x0004007c, 57420x00003742,0x00050080,0x00000006,0x0000373d,
58920x00000027,0x000034ee,0x00005a9f,0x00060050, 57430x00003743,0x00003742,0x00050084,0x00000006,
58930x00000063,0x00003338,0x000034d0,0x000034df, 57440x00003711,0x000001ef,0x000012dd,0x00050080,
58940x000034ee,0x00060041,0x0000015f,0x0000333a, 57450x00000006,0x00003712,0x0000373d,0x00003711,
58950x000034b1,0x0000015e,0x000002e4,0x0006003d, 57460x00050041,0x00000266,0x00003713,0x000001b9,
58960x00000006,0x0000333b,0x0000333a,0x00000002, 57470x00000264,0x0004003d,0x00000007,0x00003714,
58970x00000004,0x000500c7,0x00000006,0x000034f3, 57480x00003713,0x00050051,0x00000006,0x0000376e,
58980x0000333b,0x00000208,0x000500ab,0x0000002f, 57490x00003714,0x00000000,0x00050095,0x0000013d,
58990x000034f4,0x000034f3,0x0000012b,0x000300f7, 57500x00003770,0x0000376e,0x00003712,0x00050051,
59000x000034fb,0x00000000,0x000400fa,0x000034f4, 57510x00000006,0x00003771,0x00003770,0x00000001,
59010x000034f5,0x000034f8,0x000200f8,0x000034f8, 57520x00050051,0x00000006,0x00003772,0x00003770,
59020x000400c8,0x00000006,0x000034fa,0x0000333b, 57530x00000000,0x00050051,0x00000006,0x00003775,
59030x000200f9,0x000034fb,0x000200f8,0x000034f5, 57540x00003714,0x00000001,0x00050080,0x00000006,
59040x000500c7,0x00000006,0x000034f7,0x0000333b, 57550x00003777,0x00003775,0x00003771,0x00050050,
59050x0000021d,0x000200f9,0x000034fb,0x000200f8, 57560x00000007,0x00003778,0x00003772,0x00003777,
59060x000034fb,0x000700f5,0x00000006,0x00005aa0, 57570x0004007c,0x00000014,0x00003768,0x00003778,
59070x000034f7,0x000034f5,0x000034fa,0x000034f8, 57580x00060041,0x0000016c,0x0000375f,0x00003768,
59080x0004007c,0x00000027,0x000034fd,0x00005aa0, 57590x0000016b,0x0000016b,0x0006003d,0x00000006,
59090x00060041,0x0000015f,0x0000333e,0x000034b1, 57600x00003760,0x0000375f,0x00000002,0x00000004,
59100x0000015e,0x000002ec,0x0006003d,0x00000006, 57610x0004007c,0x00000027,0x00003717,0x00003760,
59110x0000333f,0x0000333e,0x00000002,0x00000004, 57620x00050080,0x00000006,0x00003719,0x00003712,
59120x000500c7,0x00000006,0x00003502,0x0000333f, 57630x000000ec,0x00050095,0x0000013d,0x00003791,
59130x00000208,0x000500ab,0x0000002f,0x00003503, 57640x0000376e,0x00003719,0x00050051,0x00000006,
59140x00003502,0x0000012b,0x000300f7,0x0000350a, 57650x00003792,0x00003791,0x00000001,0x00050051,
59150x00000000,0x000400fa,0x00003503,0x00003504, 57660x00000006,0x00003793,0x00003791,0x00000000,
59160x00003507,0x000200f8,0x00003507,0x000400c8, 57670x00050080,0x00000006,0x00003798,0x00003775,
59170x00000006,0x00003509,0x0000333f,0x000200f9, 57680x00003792,0x00050050,0x00000007,0x00003799,
59180x0000350a,0x000200f8,0x00003504,0x000500c7, 57690x00003793,0x00003798,0x0004007c,0x00000014,
59190x00000006,0x00003506,0x0000333f,0x0000021d, 57700x00003789,0x00003799,0x00060041,0x0000016c,
59200x000200f9,0x0000350a,0x000200f8,0x0000350a, 57710x00003780,0x00003789,0x0000016b,0x0000016b,
59210x000700f5,0x00000006,0x00005aa1,0x00003506, 57720x0006003d,0x00000006,0x00003781,0x00003780,
59220x00003504,0x00003509,0x00003507,0x0004007c,
59230x00000027,0x0000350c,0x00005aa1,0x00060041,
59240x0000015f,0x00003342,0x000034b1,0x0000015e,
59250x000002f4,0x0006003d,0x00000006,0x00003343,
59260x00003342,0x00000002,0x00000004,0x000500c7,
59270x00000006,0x00003511,0x00003343,0x00000208,
59280x000500ab,0x0000002f,0x00003512,0x00003511,
59290x0000012b,0x000300f7,0x00003519,0x00000000,
59300x000400fa,0x00003512,0x00003513,0x00003516,
59310x000200f8,0x00003516,0x000400c8,0x00000006,
59320x00003518,0x00003343,0x000200f9,0x00003519,
59330x000200f8,0x00003513,0x000500c7,0x00000006,
59340x00003515,0x00003343,0x0000021d,0x000200f9,
59350x00003519,0x000200f8,0x00003519,0x000700f5,
59360x00000006,0x00005aa2,0x00003515,0x00003513,
59370x00003518,0x00003516,0x0004007c,0x00000027,
59380x0000351b,0x00005aa2,0x00060050,0x00000063,
59390x00003345,0x000034fd,0x0000350c,0x0000351b,
59400x00050083,0x00000063,0x00003348,0x00003345,
59410x00003338,0x0007000c,0x00000063,0x00003349,
59420x00000001,0x00000028,0x00003348,0x000007d4,
59430x00050081,0x00000063,0x0000334c,0x00003398,
59440x000033ab,0x0005008e,0x00000063,0x0000334d,
59450x0000334c,0x000002c4,0x00050083,0x00000063,
59460x0000334f,0x0000334d,0x00003338,0x00050088,
59470x00000063,0x00003351,0x0000334f,0x00003349,
59480x0008000c,0x00000063,0x00003354,0x00000001,
59490x0000002b,0x00003351,0x000006eb,0x00005cc0,
59500x0005008e,0x00000063,0x00003355,0x00003354,
59510x000007e2,0x0004006d,0x000000d2,0x00003356,
59520x00003355,0x00050051,0x00000006,0x00003358,
59530x00003356,0x00000000,0x000500c7,0x00000006,
59540x0000351f,0x00003358,0x00000777,0x000500c4,
59550x00000006,0x00003522,0x0000351f,0x00000321,
59560x000500c5,0x00000006,0x00003523,0x0000351f,
59570x00003522,0x000500c7,0x00000006,0x00003524,
59580x00003523,0x0000077e,0x000500c4,0x00000006,
59590x00003527,0x00003524,0x00000488,0x000500c5,
59600x00000006,0x00003528,0x00003524,0x00003527,
59610x000500c7,0x00000006,0x00003529,0x00003528,
59620x00000784,0x000500c4,0x00000006,0x0000352c,
59630x00003529,0x000002ec,0x000500c5,0x00000006,
59640x0000352d,0x00003529,0x0000352c,0x000500c7,
59650x00000006,0x0000352e,0x0000352d,0x0000078a,
59660x000500c4,0x00000006,0x00003531,0x0000352e,
59670x000002dc,0x000500c5,0x00000006,0x00003532,
59680x0000352e,0x00003531,0x000500c7,0x00000006,
59690x00003533,0x00003532,0x00000790,0x000500c4,
59700x00000006,0x0000335a,0x00003533,0x000002dc,
59710x00050051,0x00000006,0x0000335c,0x00003356,
59720x00000001,0x000500c7,0x00000006,0x00003538,
59730x0000335c,0x00000777,0x000500c4,0x00000006,
59740x0000353b,0x00003538,0x00000321,0x000500c5,
59750x00000006,0x0000353c,0x00003538,0x0000353b,
59760x000500c7,0x00000006,0x0000353d,0x0000353c,
59770x0000077e,0x000500c4,0x00000006,0x00003540,
59780x0000353d,0x00000488,0x000500c5,0x00000006,
59790x00003541,0x0000353d,0x00003540,0x000500c7,
59800x00000006,0x00003542,0x00003541,0x00000784,
59810x000500c4,0x00000006,0x00003545,0x00003542,
59820x000002ec,0x000500c5,0x00000006,0x00003546,
59830x00003542,0x00003545,0x000500c7,0x00000006,
59840x00003547,0x00003546,0x0000078a,0x000500c4,
59850x00000006,0x0000354a,0x00003547,0x000002dc,
59860x000500c5,0x00000006,0x0000354b,0x00003547,
59870x0000354a,0x000500c7,0x00000006,0x0000354c,
59880x0000354b,0x00000790,0x000500c4,0x00000006,
59890x0000335e,0x0000354c,0x0000022b,0x000500c5,
59900x00000006,0x0000335f,0x0000335a,0x0000335e,
59910x00050051,0x00000006,0x00003361,0x00003356,
59920x00000002,0x000500c7,0x00000006,0x00003551,
59930x00003361,0x00000777,0x000500c4,0x00000006,
59940x00003554,0x00003551,0x00000321,0x000500c5,
59950x00000006,0x00003555,0x00003551,0x00003554,
59960x000500c7,0x00000006,0x00003556,0x00003555,
59970x0000077e,0x000500c4,0x00000006,0x00003559,
59980x00003556,0x00000488,0x000500c5,0x00000006,
59990x0000355a,0x00003556,0x00003559,0x000500c7,
60000x00000006,0x0000355b,0x0000355a,0x00000784,
60010x000500c4,0x00000006,0x0000355e,0x0000355b,
60020x000002ec,0x000500c5,0x00000006,0x0000355f,
60030x0000355b,0x0000355e,0x000500c7,0x00000006,
60040x00003560,0x0000355f,0x0000078a,0x000500c4,
60050x00000006,0x00003563,0x00003560,0x000002dc,
60060x000500c5,0x00000006,0x00003564,0x00003560,
60070x00003563,0x000500c7,0x00000006,0x00003565,
60080x00003564,0x00000790,0x000500c5,0x00000006,
60090x00003363,0x0000335f,0x00003565,0x000200f9,
60100x00003364,0x000200f8,0x00003364,0x000700f5,
60110x00000006,0x00005aa3,0x000006ac,0x000034a7,
60120x00003363,0x00003519,0x00050084,0x00000006,
60130x00003367,0x000000df,0x000011de,0x00050080,
60140x00000006,0x00003368,0x0000018b,0x00003367,
60150x00050095,0x00000130,0x00003580,0x000033e2,
60160x00003368,0x00050051,0x00000006,0x00003581,
60170x00003580,0x00000001,0x00050051,0x00000006,
60180x00003582,0x00003580,0x00000000,0x00050080,
60190x00000006,0x00003587,0x000033e9,0x00003581,
60200x00050050,0x00000007,0x00003588,0x00003582,
60210x00003587,0x0004007c,0x00000014,0x00003578,
60220x00003588,0x00060041,0x0000015f,0x00003570,
60230x00003578,0x0000015e,0x0000015e,0x0005003e,
60240x00003570,0x00005aa3,0x00000002,0x00000004,
60250x00050084,0x00000006,0x0000358d,0x000000df,
60260x000033bb,0x00050080,0x00000006,0x0000358e,
60270x0000018b,0x0000358d,0x00050080,0x00000006,
60280x00003370,0x0000358e,0x00003367,0x00050095,
60290x00000130,0x000035a6,0x000033e2,0x00003370,
60300x00050051,0x00000006,0x000035a7,0x000035a6,
60310x00000001,0x00050051,0x00000006,0x000035a8,
60320x000035a6,0x00000000,0x00050080,0x00000006,
60330x000035ad,0x000033e9,0x000035a7,0x00050050,
60340x00000007,0x000035ae,0x000035a8,0x000035ad,
60350x0004007c,0x00000014,0x0000359e,0x000035ae,
60360x00060041,0x0000015f,0x00003596,0x0000359e,
60370x0000015e,0x0000015e,0x0005003e,0x00003596,
60380x000011de,0x00000002,0x00000004,0x000200f9,
60390x000012d1,0x000200f8,0x000012d1,0x000200f9,
60400x000012c8,0x000200f8,0x000012c7,0x00050084,
60410x00000006,0x00002b91,0x0000018b,0x000011de,
60420x000200f9,0x00002b92,0x000200f8,0x00002b92,
60430x000700f5,0x00000006,0x00005aa6,0x0000012b,
60440x000012c7,0x00002ba3,0x00002b96,0x000500b0,
60450x0000002f,0x00002b95,0x00005aa6,0x0000019b,
60460x000400f6,0x00002ba4,0x00002b96,0x00000000,
60470x000400fa,0x00002b95,0x00002b96,0x00002ba4,
60480x000200f8,0x00002b96,0x00050084,0x00000006,
60490x00002b9a,0x000000df,0x00005aa6,0x00050080,
60500x00000006,0x00002b9b,0x00002b91,0x00002b9a,
60510x00050041,0x0000022d,0x00002b9c,0x00000180,
60520x000002dc,0x0004003d,0x00000007,0x00002b9d,
60530x00002b9c,0x00050051,0x00000006,0x00002d5a,
60540x00002b9d,0x00000000,0x00050095,0x00000130,
60550x00002d5c,0x00002d5a,0x00002b9b,0x00050051,
60560x00000006,0x00002d5d,0x00002d5c,0x00000001,
60570x00050051,0x00000006,0x00002d5e,0x00002d5c,
60580x00000000,0x00050051,0x00000006,0x00002d61,
60590x00002b9d,0x00000001,0x00050080,0x00000006,
60600x00002d63,0x00002d61,0x00002d5d,0x00050050,
60610x00000007,0x00002d64,0x00002d5e,0x00002d63,
60620x0004007c,0x00000014,0x00002d54,0x00002d64,
60630x00060041,0x0000015f,0x00002d4b,0x00002d54,
60640x0000015e,0x0000015e,0x0006003d,0x00000006,
60650x00002d4c,0x00002d4b,0x00000002,0x00000004,
60660x0004007c,0x00000027,0x00002b9f,0x00002d4c,
60670x00050041,0x00000028,0x00002ba0,0x00002b2c,
60680x00005aa6,0x0003003e,0x00002ba0,0x00002b9f,
60690x00050080,0x00000006,0x00002ba3,0x00005aa6,
60700x0000022b,0x000200f9,0x00002b92,0x000200f8,
60710x00002ba4,0x00050080,0x00000006,0x00002ba6,
60720x00002b91,0x000004e8,0x00050041,0x0000022d,
60730x00002ba7,0x00000180,0x000002dc,0x0004003d,
60740x00000007,0x00002ba8,0x00002ba7,0x00050051,
60750x00000006,0x00002d7b,0x00002ba8,0x00000000,
60760x00050095,0x00000130,0x00002d7d,0x00002d7b,
60770x00002ba6,0x00050051,0x00000006,0x00002d7e,
60780x00002d7d,0x00000001,0x00050051,0x00000006,
60790x00002d7f,0x00002d7d,0x00000000,0x00050051,
60800x00000006,0x00002d82,0x00002ba8,0x00000001,
60810x00050080,0x00000006,0x00002d84,0x00002d82,
60820x00002d7e,0x00050050,0x00000007,0x00002d85,
60830x00002d7f,0x00002d84,0x0004007c,0x00000014,
60840x00002d75,0x00002d85,0x00060041,0x0000015f,
60850x00002d6c,0x00002d75,0x0000015e,0x0000015e,
60860x0006003d,0x00000006,0x00002d6d,0x00002d6c,
60870x00000002,0x00000004,0x00050080,0x00000006,
60880x00002bab,0x00002b91,0x000004f4,0x00050095,
60890x00000130,0x00002d9e,0x00002d7b,0x00002bab,
60900x00050051,0x00000006,0x00002d9f,0x00002d9e,
60910x00000001,0x00050051,0x00000006,0x00002da0,
60920x00002d9e,0x00000000,0x00050080,0x00000006,
60930x00002da5,0x00002d82,0x00002d9f,0x00050050,
60940x00000007,0x00002da6,0x00002da0,0x00002da5,
60950x0004007c,0x00000014,0x00002d96,0x00002da6,
60960x00060041,0x0000015f,0x00002d8d,0x00002d96,
60970x0000015e,0x0000015e,0x0006003d,0x00000006,
60980x00002d8e,0x00002d8d,0x00000002,0x00000004,
60990x00050080,0x00000006,0x00002bb0,0x00002b91,
61000x000004fe,0x00050095,0x00000130,0x00002dbf,
61010x00002d7b,0x00002bb0,0x00050051,0x00000006,
61020x00002dc0,0x00002dbf,0x00000001,0x00050051,
61030x00000006,0x00002dc1,0x00002dbf,0x00000000,
61040x00050080,0x00000006,0x00002dc6,0x00002d82,
61050x00002dc0,0x00050050,0x00000007,0x00002dc7,
61060x00002dc1,0x00002dc6,0x0004007c,0x00000014,
61070x00002db7,0x00002dc7,0x00060041,0x0000015f,
61080x00002dae,0x00002db7,0x0000015e,0x0000015e,
61090x0006003d,0x00000006,0x00002daf,0x00002dae,
61100x00000002,0x00000004,0x00050080,0x00000006,
61110x00002bb5,0x00002b91,0x00000508,0x00050095,
61120x00000130,0x00002de0,0x00002d7b,0x00002bb5,
61130x00050051,0x00000006,0x00002de1,0x00002de0,
61140x00000001,0x00050051,0x00000006,0x00002de2,
61150x00002de0,0x00000000,0x00050080,0x00000006,
61160x00002de7,0x00002d82,0x00002de1,0x00050050,
61170x00000007,0x00002de8,0x00002de2,0x00002de7,
61180x0004007c,0x00000014,0x00002dd8,0x00002de8,
61190x00060041,0x0000015f,0x00002dcf,0x00002dd8,
61200x0000015e,0x0000015e,0x0006003d,0x00000006,
61210x00002dd0,0x00002dcf,0x00000002,0x00000004,
61220x00050041,0x00000182,0x00002bba,0x00000180,
61230x00000311,0x0004003d,0x00000006,0x00002bbb,
61240x00002bba,0x00050084,0x00000006,0x00002bbd,
61250x00000309,0x000011de,0x00050080,0x00000006,
61260x00002bbe,0x00002bbb,0x00002bbd,0x000200f9,
61270x00002bbf,0x000200f8,0x00002bbf,0x000700f5,
61280x00000006,0x00005aa7,0x0000012b,0x00002ba4,
61290x00002bd0,0x00002bc3,0x000500b0,0x0000002f,
61300x00002bc2,0x00005aa7,0x0000019b,0x000400f6,
61310x00002bd1,0x00002bc3,0x00000000,0x000400fa,
61320x00002bc2,0x00002bc3,0x00002bd1,0x000200f8,
61330x00002bc3,0x00050084,0x00000006,0x00002bc6,
61340x000000df,0x00005aa7,0x00050080,0x00000006,
61350x00002bc7,0x00002bbe,0x00002bc6,0x00050041,
61360x0000022d,0x00002bc9,0x00000180,0x0000015e,
61370x0004003d,0x00000007,0x00002bca,0x00002bc9,
61380x00050041,0x00000028,0x00002bcb,0x00002b2c,
61390x00005aa7,0x0004003d,0x00000027,0x00002bcc,
61400x00002bcb,0x0004007c,0x00000006,0x00002dee,
61410x00002bcc,0x00050051,0x00000006,0x00002e07,
61420x00002bca,0x00000000,0x00050095,0x00000130,
61430x00002e09,0x00002e07,0x00002bc7,0x00050051,
61440x00000006,0x00002e0a,0x00002e09,0x00000001,
61450x00050051,0x00000006,0x00002e0b,0x00002e09,
61460x00000000,0x00050051,0x00000006,0x00002e0e,
61470x00002bca,0x00000001,0x00050080,0x00000006,
61480x00002e10,0x00002e0e,0x00002e0a,0x00050050,
61490x00000007,0x00002e11,0x00002e0b,0x00002e10,
61500x0004007c,0x00000014,0x00002e01,0x00002e11,
61510x00060041,0x0000015f,0x00002df9,0x00002e01,
61520x0000015e,0x0000015e,0x0005003e,0x00002df9,
61530x00002dee,0x00000002,0x00000004,0x00050080,
61540x00000006,0x00002bd0,0x00005aa7,0x0000022b,
61550x000200f9,0x00002bbf,0x000200f8,0x00002bd1,
61560x00050080,0x00000006,0x00002bd3,0x00002bbe,
61570x000004e8,0x00050041,0x0000022d,0x00002bd4,
61580x00000180,0x0000015e,0x0004003d,0x00000007,
61590x00002bd5,0x00002bd4,0x00050051,0x00000006,
61600x00002e27,0x00002bd5,0x00000000,0x00050095,
61610x00000130,0x00002e29,0x00002e27,0x00002bd3,
61620x00050051,0x00000006,0x00002e2a,0x00002e29,
61630x00000001,0x00050051,0x00000006,0x00002e2b,
61640x00002e29,0x00000000,0x00050051,0x00000006,
61650x00002e2e,0x00002bd5,0x00000001,0x00050080,
61660x00000006,0x00002e30,0x00002e2e,0x00002e2a,
61670x00050050,0x00000007,0x00002e31,0x00002e2b,
61680x00002e30,0x0004007c,0x00000014,0x00002e21,
61690x00002e31,0x00060041,0x0000015f,0x00002e19,
61700x00002e21,0x0000015e,0x0000015e,0x0005003e,
61710x00002e19,0x00002d6d,0x00000002,0x00000004,
61720x00050080,0x00000006,0x00002bd9,0x00002bbe,
61730x000004f4,0x00050095,0x00000130,0x00002e49,
61740x00002e27,0x00002bd9,0x00050051,0x00000006,
61750x00002e4a,0x00002e49,0x00000001,0x00050051,
61760x00000006,0x00002e4b,0x00002e49,0x00000000,
61770x00050080,0x00000006,0x00002e50,0x00002e2e,
61780x00002e4a,0x00050050,0x00000007,0x00002e51,
61790x00002e4b,0x00002e50,0x0004007c,0x00000014,
61800x00002e41,0x00002e51,0x00060041,0x0000015f,
61810x00002e39,0x00002e41,0x0000015e,0x0000015e,
61820x0005003e,0x00002e39,0x00002d8e,0x00000002,
61830x00000004,0x000500aa,0x0000002f,0x00002e56,
61840x00002daf,0x0000012b,0x000300f7,0x00002e5b,
61850x00000000,0x000400fa,0x00002e56,0x00002e57,
61860x00002e5b,0x000200f8,0x00002e57,0x000500aa,
61870x0000002f,0x00002e5a,0x00002dd0,0x0000012b,
61880x000200f9,0x00002e5b,0x000200f8,0x00002e5b,
61890x000700f5,0x0000002f,0x00002e5c,0x00002e56,
61900x00002bd1,0x00002e5a,0x00002e57,0x000400a8,
61910x0000002f,0x00002be2,0x00002e5c,0x000300f7,
61920x00002c78,0x00000000,0x000400fa,0x00002be2,
61930x00002be3,0x00002c78,0x000200f8,0x00002be3,
61940x00050041,0x0000022d,0x00002be5,0x00000180,
61950x000002f4,0x0004003d,0x00000007,0x00002be6,
61960x00002be5,0x00050051,0x00000006,0x00002e64,
61970x00002be6,0x00000000,0x00050095,0x00000130,
61980x00002e65,0x00002daf,0x00002e64,0x00050051,
61990x00000006,0x00002e66,0x00002e65,0x00000001,
62000x00050051,0x00000006,0x00002e67,0x00002e65,
62010x00000000,0x00050051,0x00000006,0x00002e6c,
62020x00002be6,0x00000001,0x00050080,0x00000006,
62030x00002e6d,0x00002dd0,0x00002e6c,0x00050080,
62040x00000006,0x00002e6f,0x00002e6d,0x00002e66,
62050x00050095,0x00000130,0x00002e89,0x00002e67,
62060x000004e8,0x00050051,0x00000006,0x00002e8a,
62070x00002e89,0x00000001,0x00050051,0x00000006,
62080x00002e8b,0x00002e89,0x00000000,0x00050080,
62090x00000006,0x00002e90,0x00002e6f,0x00002e8a,
62100x00050050,0x00000007,0x00002e91,0x00002e8b,
62110x00002e90,0x0004007c,0x00000014,0x00002e81,
62120x00002e91,0x00060041,0x0000015f,0x00002e78,
62130x00002e81,0x0000015e,0x0000015e,0x0006003d,
62140x00000006,0x00002e79,0x00002e78,0x00000002,
62150x00000004,0x00050095,0x00000130,0x00002eaa,
62160x00002e67,0x000001a2,0x00050051,0x00000006,
62170x00002eab,0x00002eaa,0x00000001,0x00050051,
62180x00000006,0x00002eac,0x00002eaa,0x00000000,
62190x00050080,0x00000006,0x00002eb1,0x00002e6f,
62200x00002eab,0x00050050,0x00000007,0x00002eb2,
62210x00002eac,0x00002eb1,0x0004007c,0x00000014,
62220x00002ea2,0x00002eb2,0x00060041,0x0000015f,
62230x00002e99,0x00002ea2,0x0000015e,0x0000015e,
62240x0006003d,0x00000006,0x00002e9a,0x00002e99,
62250x00000002,0x00000004,0x0004007c,0x00000027, 57730x00000002,0x00000004,0x0004007c,0x00000027,
62260x00002bec,0x00002e9a,0x00050095,0x00000130, 57740x0000371d,0x00003781,0x00050080,0x00000006,
62270x00002ecb,0x00002e67,0x00000260,0x00050051, 57750x0000371f,0x00003712,0x000001cd,0x00050095,
62280x00000006,0x00002ecc,0x00002ecb,0x00000001, 57760x0000013d,0x000037b2,0x0000376e,0x0000371f,
62290x00050051,0x00000006,0x00002ecd,0x00002ecb, 57770x00050051,0x00000006,0x000037b3,0x000037b2,
62300x00000000,0x00050080,0x00000006,0x00002ed2, 57780x00000001,0x00050051,0x00000006,0x000037b4,
62310x00002e6f,0x00002ecc,0x00050050,0x00000007, 57790x000037b2,0x00000000,0x00050080,0x00000006,
62320x00002ed3,0x00002ecd,0x00002ed2,0x0004007c, 57800x000037b9,0x00003775,0x000037b3,0x00050050,
62330x00000014,0x00002ec3,0x00002ed3,0x00060041, 57810x00000007,0x000037ba,0x000037b4,0x000037b9,
62340x0000015f,0x00002eba,0x00002ec3,0x0000015e, 57820x0004007c,0x00000014,0x000037aa,0x000037ba,
62350x0000015e,0x0006003d,0x00000006,0x00002ebb, 57830x00060041,0x0000016c,0x000037a1,0x000037aa,
62360x00002eba,0x00000002,0x00000004,0x0004007c, 57840x0000016b,0x0000016b,0x0006003d,0x00000006,
62370x00000027,0x00002bef,0x00002ebb,0x00050095, 57850x000037a2,0x000037a1,0x00000002,0x00000004,
62380x00000130,0x00002eec,0x00002e67,0x000001b6, 57860x0004007c,0x00000027,0x00003723,0x000037a2,
62390x00050051,0x00000006,0x00002eed,0x00002eec, 57870x00060050,0x0000006c,0x00003724,0x00003717,
62400x00000001,0x00050051,0x00000006,0x00002eee, 57880x0000371d,0x00003723,0x00050080,0x00000006,
62410x00002eec,0x00000000,0x00050080,0x00000006, 57890x00003726,0x00003712,0x000001d4,0x00050095,
62420x00002ef3,0x00002e6f,0x00002eed,0x00050050, 57900x0000013d,0x000037d3,0x0000376e,0x00003726,
62430x00000007,0x00002ef4,0x00002eee,0x00002ef3, 57910x00050051,0x00000006,0x000037d4,0x000037d3,
62440x0004007c,0x00000014,0x00002ee4,0x00002ef4, 57920x00000001,0x00050051,0x00000006,0x000037d5,
62450x00060041,0x0000015f,0x00002edb,0x00002ee4, 57930x000037d3,0x00000000,0x00050080,0x00000006,
62460x0000015e,0x0000015e,0x0006003d,0x00000006, 57940x000037da,0x00003775,0x000037d4,0x00050050,
62470x00002edc,0x00002edb,0x00000002,0x00000004, 57950x00000007,0x000037db,0x000037d5,0x000037da,
62480x0004007c,0x00000027,0x00002bf2,0x00002edc, 57960x0004007c,0x00000014,0x000037cb,0x000037db,
62490x00050095,0x00000130,0x00002f0d,0x00002e67, 57970x00060041,0x0000016c,0x000037c2,0x000037cb,
62500x000005df,0x00050051,0x00000006,0x00002f0e, 57980x0000016b,0x0000016b,0x0006003d,0x00000006,
62510x00002f0d,0x00000001,0x00050051,0x00000006, 57990x000037c3,0x000037c2,0x00000002,0x00000004,
62520x00002f0f,0x00002f0d,0x00000000,0x00050080, 58000x0004007c,0x00000027,0x0000372a,0x000037c3,
62530x00000006,0x00002f14,0x00002e6f,0x00002f0e, 58010x00050080,0x00000006,0x0000372c,0x00003712,
62540x00050050,0x00000007,0x00002f15,0x00002f0f, 58020x000001db,0x00050095,0x0000013d,0x000037f4,
62550x00002f14,0x0004007c,0x00000014,0x00002f05, 58030x0000376e,0x0000372c,0x00050051,0x00000006,
62560x00002f15,0x00060041,0x0000015f,0x00002efc, 58040x000037f5,0x000037f4,0x00000001,0x00050051,
62570x00002f05,0x0000015e,0x0000015e,0x0006003d, 58050x00000006,0x000037f6,0x000037f4,0x00000000,
62580x00000006,0x00002efd,0x00002efc,0x00000002, 58060x00050080,0x00000006,0x000037fb,0x00003775,
62590x00000004,0x0004007c,0x00000027,0x00002bf6, 58070x000037f5,0x00050050,0x00000007,0x000037fc,
62600x00002efd,0x00050095,0x00000130,0x00002f2e, 58080x000037f6,0x000037fb,0x0004007c,0x00000014,
62610x00002e67,0x000001cc,0x00050051,0x00000006, 58090x000037ec,0x000037fc,0x00060041,0x0000016c,
62620x00002f2f,0x00002f2e,0x00000001,0x00050051, 58100x000037e3,0x000037ec,0x0000016b,0x0000016b,
62630x00000006,0x00002f30,0x00002f2e,0x00000000, 58110x0006003d,0x00000006,0x000037e4,0x000037e3,
62640x00050080,0x00000006,0x00002f35,0x00002e6f,
62650x00002f2f,0x00050050,0x00000007,0x00002f36,
62660x00002f30,0x00002f35,0x0004007c,0x00000014,
62670x00002f26,0x00002f36,0x00060041,0x0000015f,
62680x00002f1d,0x00002f26,0x0000015e,0x0000015e,
62690x0006003d,0x00000006,0x00002f1e,0x00002f1d,
62700x00000002,0x00000004,0x0004007c,0x00000027, 58120x00000002,0x00000004,0x0004007c,0x00000027,
62710x00002bf9,0x00002f1e,0x00050095,0x00000130, 58130x00003730,0x000037e4,0x00050080,0x00000006,
62720x00002f4f,0x00002e67,0x000004c7,0x00050051, 58140x00003732,0x00003712,0x00000299,0x00050095,
62730x00000006,0x00002f50,0x00002f4f,0x00000001, 58150x0000013d,0x00003815,0x0000376e,0x00003732,
62740x00050051,0x00000006,0x00002f51,0x00002f4f, 58160x00050051,0x00000006,0x00003816,0x00003815,
62750x00000000,0x00050080,0x00000006,0x00002f56, 58170x00000001,0x00050051,0x00000006,0x00003817,
62760x00002e6f,0x00002f50,0x00050050,0x00000007, 58180x00003815,0x00000000,0x00050080,0x00000006,
62770x00002f57,0x00002f51,0x00002f56,0x0004007c, 58190x0000381c,0x00003775,0x00003816,0x00050050,
62780x00000014,0x00002f47,0x00002f57,0x00060041, 58200x00000007,0x0000381d,0x00003817,0x0000381c,
62790x0000015f,0x00002f3e,0x00002f47,0x0000015e, 58210x0004007c,0x00000014,0x0000380d,0x0000381d,
62800x0000015e,0x0006003d,0x00000006,0x00002f3f, 58220x00060041,0x0000016c,0x00003804,0x0000380d,
62810x00002f3e,0x00000002,0x00000004,0x0004007c, 58230x0000016b,0x0000016b,0x0006003d,0x00000006,
62820x00000027,0x00002bfc,0x00002f3f,0x000500bc, 58240x00003805,0x00003804,0x00000002,0x00000004,
62830x0000002f,0x00002f5e,0x00002bec,0x00002bf6, 58250x0004007c,0x00000027,0x00003736,0x00003805,
62840x000300f7,0x00002f65,0x00000000,0x000400fa, 58260x00060050,0x0000006c,0x00003737,0x0000372a,
62850x00002f5e,0x00002f5f,0x00002f65,0x000200f8, 58270x00003730,0x00003736,0x000500bc,0x0000002f,
62860x00002f5f,0x000500bc,0x0000002f,0x00002f64, 58280x00003824,0x00003717,0x0000372a,0x000300f7,
62870x00002bef,0x00002bf9,0x000200f9,0x00002f65, 58290x0000382b,0x00000000,0x000400fa,0x00003824,
62880x000200f8,0x00002f65,0x000700f5,0x0000002f, 58300x00003825,0x0000382b,0x000200f8,0x00003825,
62890x00002f66,0x00002f5e,0x00002be3,0x00002f64, 58310x000500bc,0x0000002f,0x0000382a,0x0000371d,
62900x00002f5f,0x000300f7,0x00002f6d,0x00000000, 58320x00003730,0x000200f9,0x0000382b,0x000200f8,
62910x000400fa,0x00002f66,0x00002f67,0x00002f6d, 58330x0000382b,0x000700f5,0x0000002f,0x0000382c,
62920x000200f8,0x00002f67,0x000500bc,0x0000002f, 58340x00003824,0x000013cf,0x0000382a,0x00003825,
62930x00002f6c,0x00002bf2,0x00002bfc,0x000200f9, 58350x000300f7,0x00003833,0x00000000,0x000400fa,
62940x00002f6d,0x000200f8,0x00002f6d,0x000700f5, 58360x0000382c,0x0000382d,0x00003833,0x000200f8,
62950x0000002f,0x00002f6e,0x00002f66,0x00002f65, 58370x0000382d,0x000500bc,0x0000002f,0x00003832,
62960x00002f6c,0x00002f67,0x000300f7,0x00002c06, 58380x00003723,0x00003736,0x000200f9,0x00003833,
62970x00000000,0x000400fa,0x00002f6e,0x00002c02, 58390x000200f8,0x00003833,0x000700f5,0x0000002f,
62980x00002c06,0x000200f8,0x00002c02,0x000500c2, 58400x00003834,0x0000382c,0x0000382b,0x00003832,
62990x00000006,0x00002c04,0x00002d6d,0x000005f9, 58410x0000382d,0x000300f7,0x000036f0,0x00000000,
63000x000500ab,0x0000002f,0x00002c05,0x00002c04, 58420x000400fa,0x00003834,0x000036b4,0x000036f0,
63010x0000012b,0x000200f9,0x00002c06,0x000200f8, 58430x000200f8,0x000036b4,0x00050095,0x0000013d,
63020x00002c06,0x000700f5,0x0000002f,0x00002c07, 58440x00003845,0x0000376e,0x00000138,0x00050051,
63030x00002f6e,0x00002f6d,0x00002c05,0x00002c02, 58450x00000006,0x00003846,0x00003845,0x00000001,
63040x000300f7,0x00002c77,0x00000000,0x000400fa, 58460x00050051,0x00000006,0x00003847,0x00003845,
63050x00002c07,0x00002c08,0x00002c77,0x000200f8, 58470x00000000,0x00050080,0x00000006,0x0000384c,
63060x00002c08,0x000200f9,0x00002c09,0x000200f8, 58480x00003775,0x00003846,0x00050050,0x00000007,
63070x00002c09,0x000700f5,0x00000063,0x00005add, 58490x0000384d,0x00003847,0x0000384c,0x0004007c,
63080x00005cc2,0x00002c08,0x00002c72,0x00002c0d, 58500x00000014,0x0000383d,0x0000384d,0x00060041,
63090x000700f5,0x00000063,0x00005acb,0x0000053d, 58510x0000016c,0x000036b9,0x0000383d,0x0000016b,
63100x00002c08,0x00002c6f,0x00002c0d,0x000700f5, 58520x0000016b,0x0006003d,0x00000006,0x000036ba,
63110x00000006,0x00005aa8,0x0000012b,0x00002c08, 58530x000036b9,0x00000002,0x00000004,0x000500c7,
63120x00002c75,0x00002c0d,0x000500b0,0x0000002f, 58540x00000006,0x00003852,0x000036ba,0x00000241,
63130x00002c0c,0x00005aa8,0x00000194,0x000400f6, 58550x000500ab,0x0000002f,0x00003853,0x00003852,
63140x00002c76,0x00002c0d,0x00000000,0x000400fa, 58560x00000138,0x000300f7,0x0000385a,0x00000000,
63150x00002c0c,0x00002c0d,0x00002c76,0x000200f8, 58570x000400fa,0x00003853,0x00003854,0x00003857,
63160x00002c0d,0x000500c7,0x00000006,0x00002c0f, 58580x000200f8,0x00003857,0x000400c8,0x00000006,
63170x00005aa8,0x00000135,0x000500ab,0x0000002f, 58590x00003859,0x000036ba,0x000200f9,0x0000385a,
63180x00002c10,0x00002c0f,0x0000012b,0x000600a9, 58600x000200f8,0x00003854,0x000500c7,0x00000006,
63190x00000027,0x00005cde,0x00002c10,0x00002bf6, 58610x00003856,0x000036ba,0x00000256,0x000200f9,
63200x00002bec,0x000500c7,0x00000006,0x00002c1a, 58620x0000385a,0x000200f8,0x0000385a,0x000700f5,
63210x00005aa8,0x00000247,0x000500ab,0x0000002f, 58630x00000006,0x00005e65,0x00003856,0x00003854,
63220x00002c1b,0x00002c1a,0x0000012b,0x000600a9, 58640x00003859,0x00003857,0x0004007c,0x00000027,
63230x00000027,0x00005cdf,0x00002c1b,0x00002bf9, 58650x0000385c,0x00005e65,0x00060041,0x0000016c,
63240x00002bef,0x000500c7,0x00000006,0x00002c25, 58660x000036bd,0x0000383d,0x0000016b,0x00000264,
63250x00005aa8,0x000000df,0x000500ab,0x0000002f, 58670x0006003d,0x00000006,0x000036be,0x000036bd,
63260x00002c26,0x00002c25,0x0000012b,0x000600a9, 58680x00000002,0x00000004,0x000500c7,0x00000006,
63270x00000027,0x00005ce0,0x00002c26,0x00002bfc, 58690x00003861,0x000036be,0x00000241,0x000500ab,
63280x00002bf2,0x00050041,0x00000028,0x00002c30, 58700x0000002f,0x00003862,0x00003861,0x00000138,
63290x00002b2c,0x0000015e,0x0004003d,0x00000027, 58710x000300f7,0x00003869,0x00000000,0x000400fa,
63300x00002c31,0x00002c30,0x00050085,0x00000027, 58720x00003862,0x00003863,0x00003866,0x000200f8,
63310x00002c34,0x00002c31,0x00005cde,0x00050041, 58730x00003866,0x000400c8,0x00000006,0x00003868,
63320x00000028,0x00002c35,0x00002b2c,0x0000022b, 58740x000036be,0x000200f9,0x00003869,0x000200f8,
63330x0004003d,0x00000027,0x00002c36,0x00002c35, 58750x00003863,0x000500c7,0x00000006,0x00003865,
63340x00050085,0x00000027,0x00002c39,0x00002c36, 58760x000036be,0x00000256,0x000200f9,0x00003869,
63350x00005cdf,0x00050081,0x00000027,0x00002c3a, 58770x000200f8,0x00003869,0x000700f5,0x00000006,
63360x00002c34,0x00002c39,0x00050041,0x00000028, 58780x00005e66,0x00003865,0x00003863,0x00003868,
63370x00002c3b,0x00002b2c,0x000002dc,0x0004003d, 58790x00003866,0x0004007c,0x00000027,0x0000386b,
63380x00000027,0x00002c3c,0x00002c3b,0x00050085, 58800x00005e66,0x00060041,0x0000016c,0x000036c1,
63390x00000027,0x00002c3f,0x00002c3c,0x00005ce0, 58810x0000383d,0x0000016b,0x00000315,0x0006003d,
63400x00050081,0x00000027,0x00002c40,0x00002c3a, 58820x00000006,0x000036c2,0x000036c1,0x00000002,
63410x00002c3f,0x00050041,0x00000028,0x00002c41, 58830x00000004,0x000500c7,0x00000006,0x00003870,
63420x00002b2c,0x000002e4,0x0004003d,0x00000027, 58840x000036c2,0x00000241,0x000500ab,0x0000002f,
63430x00002c42,0x00002c41,0x00050081,0x00000027, 58850x00003871,0x00003870,0x00000138,0x000300f7,
63440x00002c43,0x00002c40,0x00002c42,0x00050041, 58860x00003878,0x00000000,0x000400fa,0x00003871,
63450x00000028,0x00002c44,0x00002b2c,0x000002ec, 58870x00003872,0x00003875,0x000200f8,0x00003875,
63460x0004003d,0x00000027,0x00002c45,0x00002c44, 58880x000400c8,0x00000006,0x00003877,0x000036c2,
63470x00050085,0x00000027,0x00002c48,0x00002c45, 58890x000200f9,0x00003878,0x000200f8,0x00003872,
63480x00005cde,0x00050041,0x00000028,0x00002c49, 58900x000500c7,0x00000006,0x00003874,0x000036c2,
63490x00002b2c,0x000002f4,0x0004003d,0x00000027, 58910x00000256,0x000200f9,0x00003878,0x000200f8,
63500x00002c4a,0x00002c49,0x00050085,0x00000027, 58920x00003878,0x000700f5,0x00000006,0x00005e67,
63510x00002c4d,0x00002c4a,0x00005cdf,0x00050081, 58930x00003874,0x00003872,0x00003877,0x00003875,
63520x00000027,0x00002c4e,0x00002c48,0x00002c4d, 58940x0004007c,0x00000027,0x0000387a,0x00005e67,
63530x00050041,0x00000028,0x00002c4f,0x00002b2c, 58950x00060050,0x0000006c,0x000036c4,0x0000385c,
63540x00000318,0x0004003d,0x00000027,0x00002c50, 58960x0000386b,0x0000387a,0x00060041,0x0000016c,
63550x00002c4f,0x00050085,0x00000027,0x00002c53, 58970x000036c6,0x0000383d,0x0000016b,0x0000031d,
63560x00002c50,0x00005ce0,0x00050081,0x00000027, 58980x0006003d,0x00000006,0x000036c7,0x000036c6,
63570x00002c54,0x00002c4e,0x00002c53,0x00050041, 58990x00000002,0x00000004,0x000500c7,0x00000006,
63580x00000028,0x00002c55,0x00002b2c,0x00000653, 59000x0000387f,0x000036c7,0x00000241,0x000500ab,
63590x0004003d,0x00000027,0x00002c56,0x00002c55, 59010x0000002f,0x00003880,0x0000387f,0x00000138,
63600x00050081,0x00000027,0x00002c57,0x00002c54, 59020x000300f7,0x00003887,0x00000000,0x000400fa,
63610x00002c56,0x00050041,0x00000028,0x00002c58, 59030x00003880,0x00003881,0x00003884,0x000200f8,
63620x00002b2c,0x00000488,0x0004003d,0x00000027, 59040x00003884,0x000400c8,0x00000006,0x00003886,
63630x00002c59,0x00002c58,0x00050085,0x00000027, 59050x000036c7,0x000200f9,0x00003887,0x000200f8,
63640x00002c5c,0x00002c59,0x00005cde,0x00050041, 59060x00003881,0x000500c7,0x00000006,0x00003883,
63650x00000028,0x00002c5d,0x00002b2c,0x000001cd, 59070x000036c7,0x00000256,0x000200f9,0x00003887,
63660x0004003d,0x00000027,0x00002c5e,0x00002c5d, 59080x000200f8,0x00003887,0x000700f5,0x00000006,
63670x00050085,0x00000027,0x00002c61,0x00002c5e, 59090x00005e68,0x00003883,0x00003881,0x00003886,
63680x00005cdf,0x00050081,0x00000027,0x00002c62, 59100x00003884,0x0004007c,0x00000027,0x00003889,
63690x00002c5c,0x00002c61,0x00050041,0x00000028, 59110x00005e68,0x00060041,0x0000016c,0x000036ca,
63700x00002c63,0x00002b2c,0x0000037d,0x0004003d, 59120x0000383d,0x0000016b,0x00000325,0x0006003d,
63710x00000027,0x00002c64,0x00002c63,0x00050085, 59130x00000006,0x000036cb,0x000036ca,0x00000002,
63720x00000027,0x00002c67,0x00002c64,0x00005ce0, 59140x00000004,0x000500c7,0x00000006,0x0000388e,
63730x00050081,0x00000027,0x00002c68,0x00002c62, 59150x000036cb,0x00000241,0x000500ab,0x0000002f,
63740x00002c67,0x00050041,0x00000028,0x00002c69, 59160x0000388f,0x0000388e,0x00000138,0x000300f7,
63750x00002b2c,0x000003fb,0x0004003d,0x00000027, 59170x00003896,0x00000000,0x000400fa,0x0000388f,
63760x00002c6a,0x00002c69,0x00050081,0x00000027, 59180x00003890,0x00003893,0x000200f8,0x00003893,
63770x00002c6b,0x00002c68,0x00002c6a,0x00060050, 59190x000400c8,0x00000006,0x00003895,0x000036cb,
63780x00000063,0x00002c6c,0x00002c43,0x00002c57, 59200x000200f9,0x00003896,0x000200f8,0x00003890,
63790x00002c6b,0x0007000c,0x00000063,0x00002c6f, 59210x000500c7,0x00000006,0x00003892,0x000036cb,
63800x00000001,0x00000025,0x00005acb,0x00002c6c, 59220x00000256,0x000200f9,0x00003896,0x000200f8,
63810x0007000c,0x00000063,0x00002c72,0x00000001, 59230x00003896,0x000700f5,0x00000006,0x00005e69,
63820x00000028,0x00005add,0x00002c6c,0x00050080, 59240x00003892,0x00003890,0x00003895,0x00003893,
63830x00000006,0x00002c75,0x00005aa8,0x0000022b, 59250x0004007c,0x00000027,0x00003898,0x00005e69,
63840x000200f9,0x00002c09,0x000200f8,0x00002c76, 59260x00060041,0x0000016c,0x000036ce,0x0000383d,
63850x000200f9,0x00002c77,0x000200f8,0x00002c77, 59270x0000016b,0x0000032d,0x0006003d,0x00000006,
63860x000700f5,0x00000063,0x00005ad9,0x00005cc2, 59280x000036cf,0x000036ce,0x00000002,0x00000004,
63870x00002c06,0x00005add,0x00002c76,0x000700f5, 59290x000500c7,0x00000006,0x0000389d,0x000036cf,
63880x00000063,0x00005ac7,0x0000053d,0x00002c06, 59300x00000241,0x000500ab,0x0000002f,0x0000389e,
63890x00005acb,0x00002c76,0x000200f9,0x00002c78, 59310x0000389d,0x00000138,0x000300f7,0x000038a5,
63900x000200f8,0x00002c78,0x000700f5,0x00000063, 59320x00000000,0x000400fa,0x0000389e,0x0000389f,
63910x00005ad7,0x00005cc2,0x00002e5b,0x00005ad9, 59330x000038a2,0x000200f8,0x000038a2,0x000400c8,
63920x00002c77,0x000700f5,0x00000063,0x00005ac5, 59340x00000006,0x000038a4,0x000036cf,0x000200f9,
63930x0000053d,0x00002e5b,0x00005ac7,0x00002c77, 59350x000038a5,0x000200f8,0x0000389f,0x000500c7,
63940x000700f5,0x00000006,0x00005ab1,0x00000500, 59360x00000006,0x000038a1,0x000036cf,0x00000256,
63950x00002e5b,0x00002e79,0x00002c77,0x00050041, 59370x000200f9,0x000038a5,0x000200f8,0x000038a5,
63960x00000028,0x00002c79,0x00002b2c,0x0000015e, 59380x000700f5,0x00000006,0x00005e6a,0x000038a1,
63970x0004003d,0x00000027,0x00002c7a,0x00002c79, 59390x0000389f,0x000038a4,0x000038a2,0x0004007c,
63980x000500b4,0x0000002f,0x00002c7b,0x00002c7a, 59400x00000027,0x000038a7,0x00005e6a,0x00060050,
63990x00000677,0x000300f7,0x00002c80,0x00000000, 59410x0000006c,0x000036d1,0x00003889,0x00003898,
64000x000400fa,0x00002c7b,0x00002c7c,0x00002c80, 59420x000038a7,0x00050083,0x0000006c,0x000036d4,
64010x000200f8,0x00002c7c,0x00050041,0x00000028, 59430x000036d1,0x000036c4,0x0007000c,0x0000006c,
64020x00002c7d,0x00002b2c,0x0000022b,0x0004003d, 59440x000036d5,0x00000001,0x00000028,0x000036d4,
64030x00000027,0x00002c7e,0x00002c7d,0x000500b4, 59450x000008d3,0x00050081,0x0000006c,0x000036d8,
64040x0000002f,0x00002c7f,0x00002c7e,0x000003ed, 59460x00003724,0x00003737,0x0005008e,0x0000006c,
64050x000200f9,0x00002c80,0x000200f8,0x00002c80, 59470x000036d9,0x000036d8,0x000002fd,0x00050083,
64060x000700f5,0x0000002f,0x00002c81,0x00002c7b, 59480x0000006c,0x000036db,0x000036d9,0x000036c4,
64070x00002c78,0x00002c7f,0x00002c7c,0x000300f7, 59490x00050088,0x0000006c,0x000036dd,0x000036db,
64080x00002c86,0x00000000,0x000400fa,0x00002c81, 59500x000036d5,0x0008000c,0x0000006c,0x000036e0,
64090x00002c82,0x00002c86,0x000200f8,0x00002c82, 59510x00000001,0x0000002b,0x000036dd,0x000007ea,
64100x00050041,0x00000028,0x00002c83,0x00002b2c, 59520x000060fc,0x0005008e,0x0000006c,0x000036e1,
64110x000002dc,0x0004003d,0x00000027,0x00002c84, 59530x000036e0,0x000008e1,0x0004006d,0x000000df,
64120x00002c83,0x000500b4,0x0000002f,0x00002c85, 59540x000036e2,0x000036e1,0x00050051,0x00000006,
64130x00002c84,0x000003ed,0x000200f9,0x00002c86, 59550x000036e4,0x000036e2,0x00000000,0x000500c7,
64140x000200f8,0x00002c86,0x000700f5,0x0000002f, 59560x00000006,0x000038ab,0x000036e4,0x00000876,
64150x00002c87,0x00002c81,0x00002c80,0x00002c85, 59570x000500c4,0x00000006,0x000038ae,0x000038ab,
64160x00002c82,0x000300f7,0x00002c8c,0x00000000, 59580x0000035a,0x000500c5,0x00000006,0x000038af,
64170x000400fa,0x00002c87,0x00002c88,0x00002c8c, 59590x000038ab,0x000038ae,0x000500c7,0x00000006,
64180x000200f8,0x00002c88,0x00050041,0x00000028, 59600x000038b0,0x000038af,0x0000087d,0x000500c4,
64190x00002c89,0x00002b2c,0x000002ec,0x0004003d, 59610x00000006,0x000038b3,0x000038b0,0x000004c1,
64200x00000027,0x00002c8a,0x00002c89,0x000500b4, 59620x000500c5,0x00000006,0x000038b4,0x000038b0,
64210x0000002f,0x00002c8b,0x00002c8a,0x000003ed, 59630x000038b3,0x000500c7,0x00000006,0x000038b5,
64220x000200f9,0x00002c8c,0x000200f8,0x00002c8c, 59640x000038b4,0x00000883,0x000500c4,0x00000006,
64230x000700f5,0x0000002f,0x00002c8d,0x00002c87, 59650x000038b8,0x000038b5,0x00000325,0x000500c5,
64240x00002c86,0x00002c8b,0x00002c88,0x000300f7, 59660x00000006,0x000038b9,0x000038b5,0x000038b8,
64250x00002c92,0x00000000,0x000400fa,0x00002c8d, 59670x000500c7,0x00000006,0x000038ba,0x000038b9,
64260x00002c8e,0x00002c92,0x000200f8,0x00002c8e, 59680x00000889,0x000500c4,0x00000006,0x000038bd,
64270x00050041,0x00000028,0x00002c8f,0x00002b2c, 59690x000038ba,0x00000315,0x000500c5,0x00000006,
64280x000002f4,0x0004003d,0x00000027,0x00002c90, 59700x000038be,0x000038ba,0x000038bd,0x000500c7,
64290x00002c8f,0x000500b4,0x0000002f,0x00002c91, 59710x00000006,0x000038bf,0x000038be,0x0000088f,
64300x00002c90,0x00000677,0x000200f9,0x00002c92, 59720x000500c4,0x00000006,0x000036e6,0x000038bf,
64310x000200f8,0x00002c92,0x000700f5,0x0000002f, 59730x00000315,0x00050051,0x00000006,0x000036e8,
64320x00002c93,0x00002c8d,0x00002c8c,0x00002c91, 59740x000036e2,0x00000001,0x000500c7,0x00000006,
64330x00002c8e,0x000300f7,0x00002c98,0x00000000, 59750x000038c4,0x000036e8,0x00000876,0x000500c4,
64340x000400fa,0x00002c93,0x00002c94,0x00002c98, 59760x00000006,0x000038c7,0x000038c4,0x0000035a,
64350x000200f8,0x00002c94,0x00050041,0x00000028, 59770x000500c5,0x00000006,0x000038c8,0x000038c4,
64360x00002c95,0x00002b2c,0x00000318,0x0004003d, 59780x000038c7,0x000500c7,0x00000006,0x000038c9,
64370x00000027,0x00002c96,0x00002c95,0x000500b4, 59790x000038c8,0x0000087d,0x000500c4,0x00000006,
64380x0000002f,0x00002c97,0x00002c96,0x000003ed, 59800x000038cc,0x000038c9,0x000004c1,0x000500c5,
64390x000200f9,0x00002c98,0x000200f8,0x00002c98, 59810x00000006,0x000038cd,0x000038c9,0x000038cc,
64400x000700f5,0x0000002f,0x00002c99,0x00002c93, 59820x000500c7,0x00000006,0x000038ce,0x000038cd,
64410x00002c92,0x00002c97,0x00002c94,0x000300f7, 59830x00000883,0x000500c4,0x00000006,0x000038d1,
64420x00002c9e,0x00000000,0x000400fa,0x00002c99, 59840x000038ce,0x00000325,0x000500c5,0x00000006,
64430x00002c9a,0x00002c9e,0x000200f8,0x00002c9a, 59850x000038d2,0x000038ce,0x000038d1,0x000500c7,
64440x00050041,0x00000028,0x00002c9b,0x00002b2c, 59860x00000006,0x000038d3,0x000038d2,0x00000889,
64450x00000488,0x0004003d,0x00000027,0x00002c9c, 59870x000500c4,0x00000006,0x000038d6,0x000038d3,
64460x00002c9b,0x000500b4,0x0000002f,0x00002c9d, 59880x00000315,0x000500c5,0x00000006,0x000038d7,
64470x00002c9c,0x000003ed,0x000200f9,0x00002c9e, 59890x000038d3,0x000038d6,0x000500c7,0x00000006,
64480x000200f8,0x00002c9e,0x000700f5,0x0000002f, 59900x000038d8,0x000038d7,0x0000088f,0x000500c4,
64490x00002c9f,0x00002c99,0x00002c98,0x00002c9d, 59910x00000006,0x000036ea,0x000038d8,0x00000264,
64500x00002c9a,0x000300f7,0x00002ca4,0x00000000, 59920x000500c5,0x00000006,0x000036eb,0x000036e6,
64510x000400fa,0x00002c9f,0x00002ca0,0x00002ca4, 59930x000036ea,0x00050051,0x00000006,0x000036ed,
64520x000200f8,0x00002ca0,0x00050041,0x00000028, 59940x000036e2,0x00000002,0x000500c7,0x00000006,
64530x00002ca1,0x00002b2c,0x000001cd,0x0004003d, 59950x000038dd,0x000036ed,0x00000876,0x000500c4,
64540x00000027,0x00002ca2,0x00002ca1,0x000500b4, 59960x00000006,0x000038e0,0x000038dd,0x0000035a,
64550x0000002f,0x00002ca3,0x00002ca2,0x000003ed, 59970x000500c5,0x00000006,0x000038e1,0x000038dd,
64560x000200f9,0x00002ca4,0x000200f8,0x00002ca4, 59980x000038e0,0x000500c7,0x00000006,0x000038e2,
64570x000700f5,0x0000002f,0x00002ca5,0x00002c9f, 59990x000038e1,0x0000087d,0x000500c4,0x00000006,
64580x00002c9e,0x00002ca3,0x00002ca0,0x000300f7, 60000x000038e5,0x000038e2,0x000004c1,0x000500c5,
64590x00002caa,0x00000000,0x000400fa,0x00002ca5, 60010x00000006,0x000038e6,0x000038e2,0x000038e5,
64600x00002ca6,0x00002caa,0x000200f8,0x00002ca6, 60020x000500c7,0x00000006,0x000038e7,0x000038e6,
64610x00050041,0x00000028,0x00002ca7,0x00002b2c, 60030x00000883,0x000500c4,0x00000006,0x000038ea,
64620x0000037d,0x0004003d,0x00000027,0x00002ca8, 60040x000038e7,0x00000325,0x000500c5,0x00000006,
64630x00002ca7,0x000500b4,0x0000002f,0x00002ca9, 60050x000038eb,0x000038e7,0x000038ea,0x000500c7,
64640x00002ca8,0x00000677,0x000200f9,0x00002caa, 60060x00000006,0x000038ec,0x000038eb,0x00000889,
64650x000200f8,0x00002caa,0x000700f5,0x0000002f, 60070x000500c4,0x00000006,0x000038ef,0x000038ec,
64660x00002cab,0x00002ca5,0x00002ca4,0x00002ca9, 60080x00000315,0x000500c5,0x00000006,0x000038f0,
64670x00002ca6,0x00050080,0x00000006,0x00002cad, 60090x000038ec,0x000038ef,0x000500c7,0x00000006,
64680x00002bbe,0x000004fe,0x000500c7,0x00000006, 60100x000038f1,0x000038f0,0x0000088f,0x000500c5,
64690x00002caf,0x00005ab1,0x000006ac,0x000600a9, 60110x00000006,0x000036ef,0x000036eb,0x000038f1,
64700x00000006,0x00002cb1,0x00002cab,0x00000208, 60120x000200f9,0x000036f0,0x000200f8,0x000036f0,
64710x0000012b,0x000500c5,0x00000006,0x00002cb2, 60130x000700f5,0x00000006,0x00005e6b,0x000007a6,
64720x00002caf,0x00002cb1,0x00050095,0x00000130, 60140x00003833,0x000036ef,0x000038a5,0x00050084,
64730x00002f87,0x00002e27,0x00002cad,0x00050051, 60150x00000006,0x000036f3,0x000000ec,0x000012dd,
64740x00000006,0x00002f88,0x00002f87,0x00000001, 60160x00050080,0x00000006,0x000036f4,0x000001c4,
64750x00050051,0x00000006,0x00002f89,0x00002f87, 60170x000036f3,0x00050095,0x0000013d,0x0000390c,
64760x00000000,0x00050080,0x00000006,0x00002f8e, 60180x0000376e,0x000036f4,0x00050051,0x00000006,
64770x00002e2e,0x00002f88,0x00050050,0x00000007, 60190x0000390d,0x0000390c,0x00000001,0x00050051,
64780x00002f8f,0x00002f89,0x00002f8e,0x0004007c, 60200x00000006,0x0000390e,0x0000390c,0x00000000,
64790x00000014,0x00002f7f,0x00002f8f,0x00060041, 60210x00050080,0x00000006,0x00003913,0x00003775,
64800x0000015f,0x00002f77,0x00002f7f,0x0000015e, 60220x0000390d,0x00050050,0x00000007,0x00003914,
64810x0000015e,0x0005003e,0x00002f77,0x00002cb2, 60230x0000390e,0x00003913,0x0004007c,0x00000014,
64820x00000002,0x00000004,0x00050080,0x00000006, 60240x00003904,0x00003914,0x00060041,0x0000016c,
64830x00002cb7,0x00002bbe,0x00000508,0x000500c2, 60250x000038fc,0x00003904,0x0000016b,0x0000016b,
64840x00000006,0x00002cba,0x00002daf,0x00000488, 60260x0005003e,0x000038fc,0x00005e6b,0x00000002,
64850x000500c4,0x00000006,0x00002cbd,0x00002dd0, 60270x00000004,0x00050084,0x00000006,0x00003919,
64860x000005f9,0x000500c5,0x00000006,0x00002cbe, 60280x000000ec,0x00003747,0x00050080,0x00000006,
64870x00002cba,0x00002cbd,0x00050095,0x00000130, 60290x0000391a,0x000001c4,0x00003919,0x00050080,
64880x00002fa7,0x00002e27,0x00002cb7,0x00050051, 60300x00000006,0x000036fc,0x0000391a,0x000036f3,
64890x00000006,0x00002fa8,0x00002fa7,0x00000001, 60310x00050095,0x0000013d,0x00003932,0x0000376e,
64900x00050051,0x00000006,0x00002fa9,0x00002fa7, 60320x000036fc,0x00050051,0x00000006,0x00003933,
64910x00000000,0x00050080,0x00000006,0x00002fae, 60330x00003932,0x00000001,0x00050051,0x00000006,
64920x00002e2e,0x00002fa8,0x00050050,0x00000007, 60340x00003934,0x00003932,0x00000000,0x00050080,
64930x00002faf,0x00002fa9,0x00002fae,0x0004007c, 60350x00000006,0x00003939,0x00003775,0x00003933,
64940x00000014,0x00002f9f,0x00002faf,0x00060041, 60360x00050050,0x00000007,0x0000393a,0x00003934,
64950x0000015f,0x00002f97,0x00002f9f,0x0000015e, 60370x00003939,0x0004007c,0x00000014,0x0000392a,
64960x0000015e,0x0005003e,0x00002f97,0x00002cbe, 60380x0000393a,0x00060041,0x0000016c,0x00003922,
64970x00000002,0x00000004,0x0004003d,0x00000027, 60390x0000392a,0x0000016b,0x0000016b,0x0005003e,
64980x00002cc3,0x00002c79,0x00050041,0x00000028, 60400x00003922,0x000012dd,0x00000002,0x00000004,
64990x00002cc4,0x00002b2c,0x000002ec,0x0004003d, 60410x000200f9,0x000013d0,0x000200f8,0x000013d0,
65000x00000027,0x00002cc5,0x00002cc4,0x00050041, 60420x000200f9,0x000013c7,0x000200f8,0x000013c6,
65010x00000028,0x00002cc6,0x00002b2c,0x00000488, 60430x00050084,0x00000006,0x00002c99,0x000001c4,
65020x0004003d,0x00000027,0x00002cc7,0x00002cc6, 60440x000012dd,0x000200f9,0x00002c9a,0x000200f8,
65030x00050041,0x00000028,0x00002cc8,0x00002b2c, 60450x00002c9a,0x000700f5,0x00000006,0x00005e6e,
65040x0000022b,0x0004003d,0x00000027,0x00002cc9, 60460x00000138,0x000013c6,0x00002cab,0x00002c9e,
65050x00002cc8,0x00050041,0x00000028,0x00002cca, 60470x000500b0,0x0000002f,0x00002c9d,0x00005e6e,
65060x00002b2c,0x000002f4,0x0004003d,0x00000027, 60480x000001d4,0x000400f6,0x00002cac,0x00002c9e,
65070x00002ccb,0x00002cca,0x00050041,0x00000028, 60490x00000000,0x000400fa,0x00002c9d,0x00002c9e,
65080x00002ccc,0x00002b2c,0x000001cd,0x0004003d, 60500x00002cac,0x000200f8,0x00002c9e,0x00050084,
65090x00000027,0x00002ccd,0x00002ccc,0x00050041, 60510x00000006,0x00002ca2,0x000000ec,0x00005e6e,
65100x00000028,0x00002cce,0x00002b2c,0x000002dc, 60520x00050080,0x00000006,0x00002ca3,0x00002c99,
65110x0004003d,0x00000027,0x00002ccf,0x00002cce, 60530x00002ca2,0x00050041,0x00000266,0x00002ca4,
65120x00050041,0x00000028,0x00002cd0,0x00002b2c, 60540x000001b9,0x00000315,0x0004003d,0x00000007,
65130x00000318,0x0004003d,0x00000027,0x00002cd1, 60550x00002ca5,0x00002ca4,0x00050051,0x00000006,
65140x00002cd0,0x00050041,0x00000028,0x00002cd2, 60560x00002e6e,0x00002ca5,0x00000000,0x00050095,
65150x00002b2c,0x0000037d,0x0004003d,0x00000027, 60570x0000013d,0x00002e70,0x00002e6e,0x00002ca3,
65160x00002cd3,0x00002cd2,0x00060050,0x00000063, 60580x00050051,0x00000006,0x00002e71,0x00002e70,
65170x00002cd4,0x00002cc3,0x00002cc5,0x00002cc7, 60590x00000001,0x00050051,0x00000006,0x00002e72,
65180x00060050,0x00000063,0x00002cd5,0x00002cc9, 60600x00002e70,0x00000000,0x00050051,0x00000006,
65190x00002ccb,0x00002ccd,0x00060050,0x00000063, 60610x00002e75,0x00002ca5,0x00000001,0x00050080,
65200x00002cd6,0x00002ccf,0x00002cd1,0x00002cd3, 60620x00000006,0x00002e77,0x00002e75,0x00002e71,
65210x00060050,0x000006c6,0x00002cd7,0x00002cd4, 60630x00050050,0x00000007,0x00002e78,0x00002e72,
65220x00002cd5,0x00002cd6,0x0006000c,0x00000027, 60640x00002e77,0x0004007c,0x00000014,0x00002e68,
65230x00002cd9,0x00000001,0x00000021,0x00002cd7, 60650x00002e78,0x00060041,0x0000016c,0x00002e5f,
65240x000500b7,0x0000002f,0x00002cdb,0x00002cd9, 60660x00002e68,0x0000016b,0x0000016b,0x0006003d,
65250x000003ed,0x000300f7,0x00002ce0,0x00000000, 60670x00000006,0x00002e60,0x00002e5f,0x00000002,
65260x000400fa,0x00002cdb,0x00002cdc,0x00002cdf, 60680x00000004,0x0004007c,0x00000027,0x00002ca7,
65270x000200f8,0x00002cdf,0x000200f9,0x00002ce0, 60690x00002e60,0x00050041,0x00000028,0x00002ca8,
65280x000200f8,0x00002cdc,0x0006000c,0x000006c6, 60700x00002c30,0x00005e6e,0x0003003e,0x00002ca8,
65290x00002cde,0x00000001,0x00000022,0x00002cd7, 60710x00002ca7,0x00050080,0x00000006,0x00002cab,
65300x000200f9,0x00002ce0,0x000200f8,0x00002ce0, 60720x00005e6e,0x00000264,0x000200f9,0x00002c9a,
65310x000700f5,0x000006c6,0x00005ab8,0x00002cde, 60730x000200f8,0x00002cac,0x00050080,0x00000006,
65320x00002cdc,0x000006ec,0x00002cdf,0x0003003e, 60740x00002cae,0x00002c99,0x00000521,0x00050041,
65330x00002b6d,0x00005ab8,0x00050041,0x00000028, 60750x00000266,0x00002caf,0x000001b9,0x00000315,
65340x00002ce2,0x00002b2c,0x000002e4,0x0004003d, 60760x0004003d,0x00000007,0x00002cb0,0x00002caf,
65350x00000027,0x00002ce3,0x00002ce2,0x00050041, 60770x00050051,0x00000006,0x00002e8f,0x00002cb0,
65360x00000028,0x00002ce4,0x00002b2c,0x00000653, 60780x00000000,0x00050095,0x0000013d,0x00002e91,
65370x0004003d,0x00000027,0x00002ce5,0x00002ce4, 60790x00002e8f,0x00002cae,0x00050051,0x00000006,
65380x00050041,0x00000028,0x00002ce6,0x00002b2c, 60800x00002e92,0x00002e91,0x00000001,0x00050051,
65390x000003fb,0x0004003d,0x00000027,0x00002ce7, 60810x00000006,0x00002e93,0x00002e91,0x00000000,
65400x00002ce6,0x00060050,0x00000063,0x00002ce8, 60820x00050051,0x00000006,0x00002e96,0x00002cb0,
65410x00002ce3,0x00002ce5,0x00002ce7,0x00050091, 60830x00000001,0x00050080,0x00000006,0x00002e98,
65420x00000063,0x00002ceb,0x00005ab8,0x00002ce8, 60840x00002e96,0x00002e92,0x00050050,0x00000007,
65430x0004007f,0x00000063,0x00002cec,0x00002ceb, 60850x00002e99,0x00002e93,0x00002e98,0x0004007c,
65440x0003003e,0x00002b70,0x00002cec,0x000200f9, 60860x00000014,0x00002e89,0x00002e99,0x00060041,
65450x00002ced,0x000200f8,0x00002ced,0x000700f5, 60870x0000016c,0x00002e80,0x00002e89,0x0000016b,
65460x00000006,0x00005ab9,0x0000012b,0x00002ce0, 60880x0000016b,0x0006003d,0x00000006,0x00002e81,
65470x00002d20,0x00002cf1,0x000500b0,0x0000002f, 60890x00002e80,0x00000002,0x00000004,0x00050080,
65480x00002cf0,0x00005ab9,0x00000437,0x000400f6, 60900x00000006,0x00002cb3,0x00002c99,0x0000052d,
65490x00002d21,0x00002cf1,0x00000000,0x000400fa, 60910x00050095,0x0000013d,0x00002eb2,0x00002e8f,
65500x00002cf0,0x00002cf1,0x00002d21,0x000200f8, 60920x00002cb3,0x00050051,0x00000006,0x00002eb3,
65510x00002cf1,0x00050080,0x00000006,0x00002cf3, 60930x00002eb2,0x00000001,0x00050051,0x00000006,
65520x00002bbe,0x0000018b,0x00050084,0x00000006, 60940x00002eb4,0x00002eb2,0x00000000,0x00050080,
65530x00002cf5,0x000001a2,0x00005ab9,0x00050080, 60950x00000006,0x00002eb9,0x00002e96,0x00002eb3,
65540x00000006,0x00002cf6,0x00002cf3,0x00002cf5, 60960x00050050,0x00000007,0x00002eba,0x00002eb4,
65550x00060041,0x00000028,0x00002cfa,0x00002b6d, 60970x00002eb9,0x0004007c,0x00000014,0x00002eaa,
65560x0000015e,0x00005ab9,0x0004003d,0x00000027, 60980x00002eba,0x00060041,0x0000016c,0x00002ea1,
65570x00002cfb,0x00002cfa,0x0004007c,0x00000006, 60990x00002eaa,0x0000016b,0x0000016b,0x0006003d,
65580x00002fb5,0x00002cfb,0x00050095,0x00000130, 61000x00000006,0x00002ea2,0x00002ea1,0x00000002,
65590x00002fd0,0x00002e27,0x00002cf6,0x00050051, 61010x00000004,0x00050080,0x00000006,0x00002cb8,
65600x00000006,0x00002fd1,0x00002fd0,0x00000001, 61020x00002c99,0x00000537,0x00050095,0x0000013d,
65610x00050051,0x00000006,0x00002fd2,0x00002fd0, 61030x00002ed3,0x00002e8f,0x00002cb8,0x00050051,
65620x00000000,0x00050080,0x00000006,0x00002fd7, 61040x00000006,0x00002ed4,0x00002ed3,0x00000001,
65630x00002e2e,0x00002fd1,0x00050050,0x00000007, 61050x00050051,0x00000006,0x00002ed5,0x00002ed3,
65640x00002fd8,0x00002fd2,0x00002fd7,0x0004007c, 61060x00000000,0x00050080,0x00000006,0x00002eda,
65650x00000014,0x00002fc8,0x00002fd8,0x00060041, 61070x00002e96,0x00002ed4,0x00050050,0x00000007,
65660x0000015f,0x00002fc0,0x00002fc8,0x0000015e, 61080x00002edb,0x00002ed5,0x00002eda,0x0004007c,
65670x0000015e,0x0005003e,0x00002fc0,0x00002fb5, 61090x00000014,0x00002ecb,0x00002edb,0x00060041,
65680x00000002,0x00000004,0x00050080,0x00000006, 61100x0000016c,0x00002ec2,0x00002ecb,0x0000016b,
65690x00002cfe,0x00002bbe,0x00000712,0x00050080, 61110x0000016b,0x0006003d,0x00000006,0x00002ec3,
65700x00000006,0x00002d01,0x00002cfe,0x00002cf5, 61120x00002ec2,0x00000002,0x00000004,0x00050080,
65710x00060041,0x00000028,0x00002d05,0x00002b6d, 61130x00000006,0x00002cbd,0x00002c99,0x00000541,
65720x0000022b,0x00005ab9,0x0004003d,0x00000027, 61140x00050095,0x0000013d,0x00002ef4,0x00002e8f,
65730x00002d06,0x00002d05,0x0004007c,0x00000006, 61150x00002cbd,0x00050051,0x00000006,0x00002ef5,
65740x00002fde,0x00002d06,0x00050095,0x00000130, 61160x00002ef4,0x00000001,0x00050051,0x00000006,
65750x00002ff9,0x00002e27,0x00002d01,0x00050051, 61170x00002ef6,0x00002ef4,0x00000000,0x00050080,
65760x00000006,0x00002ffa,0x00002ff9,0x00000001, 61180x00000006,0x00002efb,0x00002e96,0x00002ef5,
65770x00050051,0x00000006,0x00002ffb,0x00002ff9, 61190x00050050,0x00000007,0x00002efc,0x00002ef6,
65780x00000000,0x00050080,0x00000006,0x00003000, 61200x00002efb,0x0004007c,0x00000014,0x00002eec,
65790x00002e2e,0x00002ffa,0x00050050,0x00000007, 61210x00002efc,0x00060041,0x0000016c,0x00002ee3,
65800x00003001,0x00002ffb,0x00003000,0x0004007c, 61220x00002eec,0x0000016b,0x0000016b,0x0006003d,
65810x00000014,0x00002ff1,0x00003001,0x00060041, 61230x00000006,0x00002ee4,0x00002ee3,0x00000002,
65820x0000015f,0x00002fe9,0x00002ff1,0x0000015e, 61240x00000004,0x00050050,0x00000007,0x00002cc1,
65830x0000015e,0x0005003e,0x00002fe9,0x00002fde, 61250x00002ec3,0x00002ee4,0x00050041,0x000001bb,
61260x00002cc2,0x000001b9,0x0000034a,0x0004003d,
61270x00000006,0x00002cc3,0x00002cc2,0x00050084,
61280x00000006,0x00002cc5,0x00000342,0x000012dd,
61290x00050080,0x00000006,0x00002cc6,0x00002cc3,
61300x00002cc5,0x000200f9,0x00002cc7,0x000200f8,
61310x00002cc7,0x000700f5,0x00000006,0x00005e6f,
61320x00000138,0x00002cac,0x00002cd8,0x00002ccb,
61330x000500b0,0x0000002f,0x00002cca,0x00005e6f,
61340x000001d4,0x000400f6,0x00002cd9,0x00002ccb,
61350x00000000,0x000400fa,0x00002cca,0x00002ccb,
61360x00002cd9,0x000200f8,0x00002ccb,0x00050084,
61370x00000006,0x00002cce,0x000000ec,0x00005e6f,
61380x00050080,0x00000006,0x00002ccf,0x00002cc6,
61390x00002cce,0x00050041,0x00000266,0x00002cd1,
61400x000001b9,0x0000016b,0x0004003d,0x00000007,
61410x00002cd2,0x00002cd1,0x00050041,0x00000028,
61420x00002cd3,0x00002c30,0x00005e6f,0x0004003d,
61430x00000027,0x00002cd4,0x00002cd3,0x0004007c,
61440x00000006,0x00002f02,0x00002cd4,0x00050051,
61450x00000006,0x00002f1b,0x00002cd2,0x00000000,
61460x00050095,0x0000013d,0x00002f1d,0x00002f1b,
61470x00002ccf,0x00050051,0x00000006,0x00002f1e,
61480x00002f1d,0x00000001,0x00050051,0x00000006,
61490x00002f1f,0x00002f1d,0x00000000,0x00050051,
61500x00000006,0x00002f22,0x00002cd2,0x00000001,
61510x00050080,0x00000006,0x00002f24,0x00002f22,
61520x00002f1e,0x00050050,0x00000007,0x00002f25,
61530x00002f1f,0x00002f24,0x0004007c,0x00000014,
61540x00002f15,0x00002f25,0x00060041,0x0000016c,
61550x00002f0d,0x00002f15,0x0000016b,0x0000016b,
61560x0005003e,0x00002f0d,0x00002f02,0x00000002,
61570x00000004,0x00050080,0x00000006,0x00002cd8,
61580x00005e6f,0x00000264,0x000200f9,0x00002cc7,
61590x000200f8,0x00002cd9,0x00050080,0x00000006,
61600x00002cdb,0x00002cc6,0x00000521,0x00050041,
61610x00000266,0x00002cdc,0x000001b9,0x0000016b,
61620x0004003d,0x00000007,0x00002cdd,0x00002cdc,
61630x00050051,0x00000006,0x00002f3b,0x00002cdd,
61640x00000000,0x00050095,0x0000013d,0x00002f3d,
61650x00002f3b,0x00002cdb,0x00050051,0x00000006,
61660x00002f3e,0x00002f3d,0x00000001,0x00050051,
61670x00000006,0x00002f3f,0x00002f3d,0x00000000,
61680x00050051,0x00000006,0x00002f42,0x00002cdd,
61690x00000001,0x00050080,0x00000006,0x00002f44,
61700x00002f42,0x00002f3e,0x00050050,0x00000007,
61710x00002f45,0x00002f3f,0x00002f44,0x0004007c,
61720x00000014,0x00002f35,0x00002f45,0x00060041,
61730x0000016c,0x00002f2d,0x00002f35,0x0000016b,
61740x0000016b,0x0005003e,0x00002f2d,0x00002e81,
65840x00000002,0x00000004,0x00050080,0x00000006, 61750x00000002,0x00000004,0x00050080,0x00000006,
65850x00002d09,0x00002bbe,0x00000721,0x00050080, 61760x00002ce1,0x00002cc6,0x0000052d,0x00050095,
65860x00000006,0x00002d0c,0x00002d09,0x00002cf5, 61770x0000013d,0x00002f5d,0x00002f3b,0x00002ce1,
65870x00060041,0x00000028,0x00002d10,0x00002b6d, 61780x00050051,0x00000006,0x00002f5e,0x00002f5d,
65880x000002dc,0x00005ab9,0x0004003d,0x00000027, 61790x00000001,0x00050051,0x00000006,0x00002f5f,
65890x00002d11,0x00002d10,0x0004007c,0x00000006, 61800x00002f5d,0x00000000,0x00050080,0x00000006,
65900x00003007,0x00002d11,0x00050095,0x00000130, 61810x00002f64,0x00002f42,0x00002f5e,0x00050050,
65910x00003022,0x00002e27,0x00002d0c,0x00050051, 61820x00000007,0x00002f65,0x00002f5f,0x00002f64,
65920x00000006,0x00003023,0x00003022,0x00000001, 61830x0004007c,0x00000014,0x00002f55,0x00002f65,
65930x00050051,0x00000006,0x00003024,0x00003022, 61840x00060041,0x0000016c,0x00002f4d,0x00002f55,
65940x00000000,0x00050080,0x00000006,0x00003029, 61850x0000016b,0x0000016b,0x0005003e,0x00002f4d,
65950x00002e2e,0x00003023,0x00050050,0x00000007, 61860x00002ea2,0x00000002,0x00000004,0x000500aa,
65960x0000302a,0x00003024,0x00003029,0x0004007c, 61870x0000002f,0x00002f6a,0x00002ec3,0x00000138,
65970x00000014,0x0000301a,0x0000302a,0x00060041, 61880x000300f7,0x00002f6f,0x00000000,0x000400fa,
65980x0000015f,0x00003012,0x0000301a,0x0000015e, 61890x00002f6a,0x00002f6b,0x00002f6f,0x000200f8,
65990x0000015e,0x0005003e,0x00003012,0x00003007, 61900x00002f6b,0x000500aa,0x0000002f,0x00002f6e,
61910x00002ee4,0x00000138,0x000200f9,0x00002f6f,
61920x000200f8,0x00002f6f,0x000700f5,0x0000002f,
61930x00002f70,0x00002f6a,0x00002cd9,0x00002f6e,
61940x00002f6b,0x000400a8,0x0000002f,0x00002ceb,
61950x00002f70,0x000300f7,0x00002cf0,0x00000000,
61960x000400fa,0x00002ceb,0x00002cec,0x00002cf0,
61970x000200f8,0x00002cec,0x000300f7,0x00003024,
61980x00000000,0x000300fb,0x00000138,0x00002fa0,
61990x000200f8,0x00002fa0,0x00050041,0x000001bb,
62000x00002fa2,0x000001b9,0x00000334,0x0004003d,
62010x00000006,0x00002fa3,0x00002fa2,0x000500c7,
62020x00000006,0x00002fa4,0x00002fa3,0x000001cd,
62030x000500aa,0x0000002f,0x00002fa5,0x00002fa4,
62040x00000138,0x000300f7,0x00002fa7,0x00000000,
62050x000400fa,0x00002fa5,0x00002fa6,0x00002fa7,
62060x000200f8,0x00002fa6,0x000200f9,0x00003024,
62070x000200f8,0x00002fa7,0x00050041,0x000001bb,
62080x00002fa8,0x000001b9,0x000003b6,0x0004003d,
62090x00000006,0x00002fa9,0x00002fa8,0x000200f9,
62100x00002faa,0x000200f8,0x00002faa,0x000700f5,
62110x00000006,0x00005e71,0x00002fa9,0x00002fa7,
62120x00006119,0x00002fc9,0x000700f5,0x00000006,
62130x00005e70,0x00000138,0x00002fa7,0x000060d9,
62140x00002fc9,0x000500b0,0x0000002f,0x00002fae,
62150x00005e70,0x00005e71,0x000400f6,0x00002fca,
62160x00002fc9,0x00000000,0x000400fa,0x00002fae,
62170x00002faf,0x00002fca,0x000200f8,0x00002faf,
62180x00050080,0x00000006,0x00002fb2,0x00005e70,
62190x00005e71,0x000500c2,0x00000006,0x00002fb3,
62200x00002fb2,0x00000142,0x00050084,0x00000006,
62210x00002fb5,0x000001ef,0x00002fb3,0x00050041,
62220x00000266,0x00002fb6,0x000001b9,0x0000031d,
62230x0004003d,0x00000007,0x00002fb7,0x00002fb6,
62240x00050051,0x00000006,0x0000303c,0x00002fb7,
62250x00000000,0x00050095,0x0000013d,0x0000303e,
62260x0000303c,0x00002fb5,0x00050051,0x00000006,
62270x0000303f,0x0000303e,0x00000001,0x00050051,
62280x00000006,0x00003040,0x0000303e,0x00000000,
62290x00050051,0x00000006,0x00003043,0x00002fb7,
62300x00000001,0x00050080,0x00000006,0x00003045,
62310x00003043,0x0000303f,0x00050050,0x00000007,
62320x00003046,0x00003040,0x00003045,0x0004007c,
62330x00000014,0x00003036,0x00003046,0x00060041,
62340x0000016c,0x0000302d,0x00003036,0x0000016b,
62350x0000016b,0x0006003d,0x00000006,0x0000302e,
62360x0000302d,0x00000002,0x00000004,0x00050080,
62370x00000006,0x00002fbb,0x00002fb5,0x000000ec,
62380x00050095,0x0000013d,0x0000305f,0x0000303c,
62390x00002fbb,0x00050051,0x00000006,0x00003060,
62400x0000305f,0x00000001,0x00050051,0x00000006,
62410x00003061,0x0000305f,0x00000000,0x00050080,
62420x00000006,0x00003066,0x00003043,0x00003060,
62430x00050050,0x00000007,0x00003067,0x00003061,
62440x00003066,0x0004007c,0x00000014,0x00003057,
62450x00003067,0x00060041,0x0000016c,0x0000304e,
62460x00003057,0x0000016b,0x0000016b,0x0006003d,
62470x00000006,0x0000304f,0x0000304e,0x00000002,
62480x00000004,0x000500b0,0x0000002f,0x0000306e,
62490x00002ee4,0x0000304f,0x000400a8,0x0000002f,
62500x0000306f,0x0000306e,0x000300f7,0x0000307e,
62510x00000000,0x000400fa,0x0000306f,0x00003070,
62520x0000307e,0x000200f8,0x00003070,0x000500aa,
62530x0000002f,0x00003075,0x00002ee4,0x0000304f,
62540x000300f7,0x0000307c,0x00000000,0x000400fa,
62550x00003075,0x00003076,0x0000307c,0x000200f8,
62560x00003076,0x000500b0,0x0000002f,0x0000307b,
62570x00002ec3,0x0000302e,0x000200f9,0x0000307c,
62580x000200f8,0x0000307c,0x000700f5,0x0000002f,
62590x0000307d,0x00003075,0x00003070,0x0000307b,
62600x00003076,0x000200f9,0x0000307e,0x000200f8,
62610x0000307e,0x000700f5,0x0000002f,0x0000307f,
62620x0000306e,0x00002faf,0x0000307d,0x0000307c,
62630x000300f7,0x00002fc8,0x00000000,0x000400fa,
62640x0000307f,0x00002fc3,0x00002fc5,0x000200f8,
62650x00002fc5,0x00050080,0x00000006,0x00002fc7,
62660x00002fb3,0x00000142,0x000200f9,0x00002fc8,
62670x000200f8,0x00002fc3,0x000200f9,0x00002fc8,
62680x000200f8,0x00002fc8,0x000700f5,0x00000006,
62690x000060d9,0x00005e70,0x00002fc3,0x00002fc7,
62700x00002fc5,0x000600a9,0x00000006,0x00006119,
62710x0000307f,0x00002fb3,0x00005e71,0x000200f9,
62720x00002fc9,0x000200f8,0x00002fc9,0x000200f9,
62730x00002faa,0x000200f8,0x00002fca,0x00050095,
62740x0000013d,0x00003087,0x00002ec3,0x000001c4,
62750x00050051,0x00000006,0x00003088,0x00003087,
62760x00000001,0x00050051,0x00000006,0x00003089,
62770x00003087,0x00000000,0x00050080,0x00000006,
62780x0000308e,0x00002ee4,0x00003088,0x000500b0,
62790x0000002f,0x00003096,0x0000308e,0x00002ee4,
62800x000400a8,0x0000002f,0x00003097,0x00003096,
62810x000300f7,0x000030a6,0x00000000,0x000400fa,
62820x00003097,0x00003098,0x000030a6,0x000200f8,
62830x00003098,0x000500aa,0x0000002f,0x0000309d,
62840x0000308e,0x00002ee4,0x000300f7,0x000030a4,
62850x00000000,0x000400fa,0x0000309d,0x0000309e,
62860x000030a4,0x000200f8,0x0000309e,0x000500b0,
62870x0000002f,0x000030a3,0x00003089,0x00002ec3,
62880x000200f9,0x000030a4,0x000200f8,0x000030a4,
62890x000700f5,0x0000002f,0x000030a5,0x0000309d,
62900x00003098,0x000030a3,0x0000309e,0x000200f9,
62910x000030a6,0x000200f8,0x000030a6,0x000700f5,
62920x0000002f,0x000030a7,0x00003096,0x00002fca,
62930x000030a5,0x000030a4,0x000300f7,0x00002fd1,
62940x00000000,0x000400fa,0x000030a7,0x00002fd0,
62950x00002fd1,0x000200f8,0x00002fd0,0x000200f9,
62960x00003024,0x000200f8,0x00002fd1,0x000500ac,
62970x0000002f,0x00002fd3,0x00005e70,0x00000138,
62980x000300f7,0x00003007,0x00000000,0x000400fa,
62990x00002fd3,0x00002fd4,0x00003007,0x000200f8,
63000x00002fd4,0x00050082,0x00000006,0x00002fd6,
63010x00005e70,0x00000142,0x00050084,0x00000006,
63020x00002fd7,0x000001ef,0x00002fd6,0x00050080,
63030x00000006,0x00002fd9,0x00002fd7,0x000001cd,
63040x00050041,0x00000266,0x00002fda,0x000001b9,
63050x0000031d,0x0004003d,0x00000007,0x00002fdb,
63060x00002fda,0x00050051,0x00000006,0x000030be,
63070x00002fdb,0x00000000,0x00050095,0x0000013d,
63080x000030c0,0x000030be,0x00002fd9,0x00050051,
63090x00000006,0x000030c1,0x000030c0,0x00000001,
63100x00050051,0x00000006,0x000030c2,0x000030c0,
63110x00000000,0x00050051,0x00000006,0x000030c5,
63120x00002fdb,0x00000001,0x00050080,0x00000006,
63130x000030c7,0x000030c5,0x000030c1,0x00050050,
63140x00000007,0x000030c8,0x000030c2,0x000030c7,
63150x0004007c,0x00000014,0x000030b8,0x000030c8,
63160x00060041,0x0000016c,0x000030af,0x000030b8,
63170x0000016b,0x0000016b,0x0006003d,0x00000006,
63180x000030b0,0x000030af,0x00000002,0x00000004,
63190x00050080,0x00000006,0x00002fde,0x00002fd7,
63200x000001d4,0x00050095,0x0000013d,0x000030e1,
63210x000030be,0x00002fde,0x00050051,0x00000006,
63220x000030e2,0x000030e1,0x00000001,0x00050051,
63230x00000006,0x000030e3,0x000030e1,0x00000000,
63240x00050080,0x00000006,0x000030e8,0x000030c5,
63250x000030e2,0x00050050,0x00000007,0x000030e9,
63260x000030e3,0x000030e8,0x0004007c,0x00000014,
63270x000030d9,0x000030e9,0x00060041,0x0000016c,
63280x000030d0,0x000030d9,0x0000016b,0x0000016b,
63290x0006003d,0x00000006,0x000030d1,0x000030d0,
63300x00000002,0x00000004,0x000500b0,0x0000002f,
63310x000030f0,0x00002ee4,0x000030d1,0x000400a8,
63320x0000002f,0x000030f1,0x000030f0,0x000300f7,
63330x00003100,0x00000000,0x000400fa,0x000030f1,
63340x000030f2,0x00003100,0x000200f8,0x000030f2,
63350x000500aa,0x0000002f,0x000030f7,0x00002ee4,
63360x000030d1,0x000300f7,0x000030fe,0x00000000,
63370x000400fa,0x000030f7,0x000030f8,0x000030fe,
63380x000200f8,0x000030f8,0x000500b0,0x0000002f,
63390x000030fd,0x00002ec3,0x000030b0,0x000200f9,
63400x000030fe,0x000200f8,0x000030fe,0x000700f5,
63410x0000002f,0x000030ff,0x000030f7,0x000030f2,
63420x000030fd,0x000030f8,0x000200f9,0x00003100,
63430x000200f8,0x00003100,0x000700f5,0x0000002f,
63440x00003101,0x000030f0,0x00002fd4,0x000030ff,
63450x000030fe,0x000300f7,0x00003006,0x00000000,
63460x000400fa,0x00003101,0x00002fe6,0x00003006,
63470x000200f8,0x00002fe6,0x000500b0,0x0000002f,
63480x00003108,0x000030d1,0x0000308e,0x000400a8,
63490x0000002f,0x00003109,0x00003108,0x000300f7,
63500x00003118,0x00000000,0x000400fa,0x00003109,
63510x0000310a,0x00003118,0x000200f8,0x0000310a,
63520x000500aa,0x0000002f,0x0000310f,0x000030d1,
63530x0000308e,0x000300f7,0x00003116,0x00000000,
63540x000400fa,0x0000310f,0x00003110,0x00003116,
63550x000200f8,0x00003110,0x000500b0,0x0000002f,
63560x00003115,0x000030b0,0x00003089,0x000200f9,
63570x00003116,0x000200f8,0x00003116,0x000700f5,
63580x0000002f,0x00003117,0x0000310f,0x0000310a,
63590x00003115,0x00003110,0x000200f9,0x00003118,
63600x000200f8,0x00003118,0x000700f5,0x0000002f,
63610x00003119,0x00003108,0x00002fe6,0x00003117,
63620x00003116,0x000300f7,0x00002feb,0x00000000,
63630x000400fa,0x00003119,0x00002fea,0x00002feb,
63640x000200f8,0x00002fea,0x000200f9,0x00003024,
63650x000200f8,0x00002feb,0x00050095,0x0000013d,
63660x00003132,0x000030be,0x00002fd7,0x00050051,
63670x00000006,0x00003133,0x00003132,0x00000001,
63680x00050051,0x00000006,0x00003134,0x00003132,
63690x00000000,0x00050080,0x00000006,0x00003139,
63700x000030c5,0x00003133,0x00050050,0x00000007,
63710x0000313a,0x00003134,0x00003139,0x0004007c,
63720x00000014,0x0000312a,0x0000313a,0x00060041,
63730x0000016c,0x00003121,0x0000312a,0x0000016b,
63740x0000016b,0x0006003d,0x00000006,0x00003122,
63750x00003121,0x00000002,0x00000004,0x00050080,
63760x00000006,0x00002ff1,0x00002fd7,0x000000ec,
63770x00050095,0x0000013d,0x00003153,0x000030be,
63780x00002ff1,0x00050051,0x00000006,0x00003154,
63790x00003153,0x00000001,0x00050051,0x00000006,
63800x00003155,0x00003153,0x00000000,0x00050080,
63810x00000006,0x0000315a,0x000030c5,0x00003154,
63820x00050050,0x00000007,0x0000315b,0x00003155,
63830x0000315a,0x0004007c,0x00000014,0x0000314b,
63840x0000315b,0x00060041,0x0000016c,0x00003142,
63850x0000314b,0x0000016b,0x0000016b,0x0006003d,
63860x00000006,0x00003143,0x00003142,0x00000002,
63870x00000004,0x00050080,0x00000006,0x00002ff7,
63880x00002fd7,0x000001db,0x00050095,0x0000013d,
63890x00003174,0x000030be,0x00002ff7,0x00050051,
63900x00000006,0x00003175,0x00003174,0x00000001,
63910x00050051,0x00000006,0x00003176,0x00003174,
63920x00000000,0x00050080,0x00000006,0x0000317b,
63930x000030c5,0x00003175,0x00050050,0x00000007,
63940x0000317c,0x00003176,0x0000317b,0x0004007c,
63950x00000014,0x0000316c,0x0000317c,0x00060041,
63960x0000016c,0x00003163,0x0000316c,0x0000016b,
63970x0000016b,0x0006003d,0x00000006,0x00003164,
63980x00003163,0x00000002,0x00000004,0x00050080,
63990x00000006,0x00002ffc,0x00002fd7,0x00000299,
64000x00050095,0x0000013d,0x00003195,0x000030be,
64010x00002ffc,0x00050051,0x00000006,0x00003196,
64020x00003195,0x00000001,0x00050051,0x00000006,
64030x00003197,0x00003195,0x00000000,0x00050080,
64040x00000006,0x0000319c,0x000030c5,0x00003196,
64050x00050050,0x00000007,0x0000319d,0x00003197,
64060x0000319c,0x0004007c,0x00000014,0x0000318d,
64070x0000319d,0x00060041,0x0000016c,0x00003184,
64080x0000318d,0x0000016b,0x0000016b,0x0006003d,
64090x00000006,0x00003185,0x00003184,0x00000002,
64100x00000004,0x00050096,0x0000013d,0x000031a6,
64110x00002ec3,0x00003122,0x00050051,0x00000006,
64120x000031a7,0x000031a6,0x00000001,0x00050051,
64130x00000006,0x000031a8,0x000031a6,0x00000000,
64140x00050082,0x00000006,0x000031ae,0x00002ee4,
64150x00003143,0x00050082,0x00000006,0x000031b0,
64160x000031ae,0x000031a7,0x00050095,0x0000013d,
64170x000031ba,0x00003164,0x000031a8,0x00050051,
64180x00000006,0x000031bb,0x000031ba,0x00000001,
64190x00050051,0x00000006,0x000031bc,0x000031ba,
64200x00000000,0x00050080,0x00000006,0x000031c2,
64210x00003185,0x000031b0,0x00050080,0x00000006,
64220x000031c4,0x000031c2,0x000031bb,0x00050050,
64230x00000007,0x000031c5,0x000031bc,0x000031c4,
64240x000200f9,0x00003006,0x000200f8,0x00003006,
64250x000700f5,0x00000007,0x00005e7e,0x00002cc1,
64260x00003100,0x000031c5,0x00002feb,0x000200f9,
64270x00003007,0x000200f8,0x00003007,0x000700f5,
64280x00000007,0x00005e7a,0x00002cc1,0x00002fd1,
64290x00005e7e,0x00003006,0x000700f5,0x0000002f,
64300x00005e74,0x000003cc,0x00002fd1,0x00003101,
64310x00003006,0x000400a8,0x0000002f,0x00003009,
64320x00005e74,0x000300f7,0x0000300f,0x00000000,
64330x000400fa,0x00003009,0x0000300a,0x0000300f,
64340x000200f8,0x0000300a,0x00050041,0x00000266,
64350x0000300b,0x000001b9,0x00000325,0x0004003d,
64360x00000007,0x0000300c,0x0000300b,0x00050051,
64370x00000006,0x000031c9,0x0000300c,0x00000000,
64380x000500aa,0x0000002f,0x000031ca,0x000031c9,
64390x00000138,0x000300f7,0x000031cf,0x00000000,
64400x000400fa,0x000031ca,0x000031cb,0x000031cf,
64410x000200f8,0x000031cb,0x00050051,0x00000006,
64420x000031cd,0x0000300c,0x00000001,0x000500aa,
64430x0000002f,0x000031ce,0x000031cd,0x00000138,
64440x000200f9,0x000031cf,0x000200f8,0x000031cf,
64450x000700f5,0x0000002f,0x000031d0,0x000031ca,
64460x0000300a,0x000031ce,0x000031cb,0x000400a8,
64470x0000002f,0x0000300e,0x000031d0,0x000200f9,
64480x0000300f,0x000200f8,0x0000300f,0x000700f5,
64490x0000002f,0x00003010,0x00003009,0x00003007,
64500x0000300e,0x000031cf,0x000300f7,0x00003016,
64510x00000000,0x000400fa,0x00003010,0x00003011,
64520x00003016,0x000200f8,0x00003011,0x00050041,
64530x00000266,0x00003012,0x000001b9,0x00000325,
64540x0004003d,0x00000007,0x00003013,0x00003012,
64550x00050051,0x00000006,0x000031d4,0x00003013,
64560x00000001,0x000500b0,0x0000002f,0x000031d7,
64570x000031d4,0x0000308e,0x000400a8,0x0000002f,
64580x000031d8,0x000031d7,0x000300f7,0x000031e7,
64590x00000000,0x000400fa,0x000031d8,0x000031d9,
64600x000031e7,0x000200f8,0x000031d9,0x000500aa,
64610x0000002f,0x000031de,0x000031d4,0x0000308e,
64620x000300f7,0x000031e5,0x00000000,0x000400fa,
64630x000031de,0x000031df,0x000031e5,0x000200f8,
64640x000031df,0x00050051,0x00000006,0x000031e1,
64650x00003013,0x00000000,0x000500b0,0x0000002f,
64660x000031e4,0x000031e1,0x00003089,0x000200f9,
64670x000031e5,0x000200f8,0x000031e5,0x000700f5,
64680x0000002f,0x000031e6,0x000031de,0x000031d9,
64690x000031e4,0x000031df,0x000200f9,0x000031e7,
64700x000200f8,0x000031e7,0x000700f5,0x0000002f,
64710x000031e8,0x000031d7,0x00003011,0x000031e6,
64720x000031e5,0x000200f9,0x00003016,0x000200f8,
64730x00003016,0x000700f5,0x0000002f,0x00003017,
64740x00003010,0x0000300f,0x000031e8,0x000031e7,
64750x000300f7,0x00003019,0x00000000,0x000400fa,
64760x00003017,0x00003018,0x00003019,0x000200f8,
64770x00003018,0x000200f9,0x00003024,0x000200f8,
64780x00003019,0x00050051,0x00000006,0x0000301b,
64790x00005e7a,0x00000000,0x000500c7,0x00000006,
64800x0000301c,0x0000301b,0x0000062f,0x000500aa,
64810x0000002f,0x0000301d,0x0000301c,0x00000138,
64820x000300f7,0x00003022,0x00000000,0x000400fa,
64830x0000301d,0x0000301e,0x00003022,0x000200f8,
64840x0000301e,0x00050051,0x00000006,0x00003020,
64850x00005e7a,0x00000001,0x000500b0,0x0000002f,
64860x00003021,0x00003020,0x000001be,0x000200f9,
64870x00003022,0x000200f8,0x00003022,0x000700f5,
64880x0000002f,0x00003023,0x0000301d,0x00003019,
64890x00003021,0x0000301e,0x000200f9,0x00003024,
64900x000200f8,0x00003024,0x000d00f5,0x00000007,
64910x00005e85,0x00002cc1,0x00002fa6,0x00002cc1,
64920x00002fd0,0x00002cc1,0x00002fea,0x00005e7a,
64930x00003018,0x00005e7a,0x00003022,0x000d00f5,
64940x0000002f,0x00005e84,0x000003e7,0x00002fa6,
64950x000003cc,0x00002fd0,0x000003cc,0x00002fea,
64960x000003cc,0x00003018,0x00003023,0x00003022,
64970x000200f9,0x00002cf0,0x000200f8,0x00002cf0,
64980x000700f5,0x00000007,0x00005e89,0x00002cc1,
64990x00002f6f,0x00005e85,0x00003024,0x000700f5,
65000x0000002f,0x00002cf1,0x00002ceb,0x00002f6f,
65010x00005e84,0x00003024,0x000300f7,0x00002d88,
65020x00000000,0x000400fa,0x00002cf1,0x00002cf3,
65030x00002d88,0x000200f8,0x00002cf3,0x00050041,
65040x00000266,0x00002cf5,0x000001b9,0x0000032d,
65050x0004003d,0x00000007,0x00002cf6,0x00002cf5,
65060x00050051,0x00000006,0x000031ee,0x00005e89,
65070x00000000,0x00050051,0x00000006,0x000031f0,
65080x00002cf6,0x00000000,0x00050095,0x0000013d,
65090x000031f1,0x000031ee,0x000031f0,0x00050051,
65100x00000006,0x000031f2,0x000031f1,0x00000001,
65110x00050051,0x00000006,0x000031f3,0x000031f1,
65120x00000000,0x00050051,0x00000006,0x000031f6,
65130x00005e89,0x00000001,0x00050051,0x00000006,
65140x000031f8,0x00002cf6,0x00000001,0x00050080,
65150x00000006,0x000031f9,0x000031f6,0x000031f8,
65160x00050080,0x00000006,0x000031fb,0x000031f9,
65170x000031f2,0x00050095,0x0000013d,0x00003215,
65180x000031f3,0x00000521,0x00050051,0x00000006,
65190x00003216,0x00003215,0x00000001,0x00050051,
65200x00000006,0x00003217,0x00003215,0x00000000,
65210x00050080,0x00000006,0x0000321c,0x000031fb,
65220x00003216,0x00050050,0x00000007,0x0000321d,
65230x00003217,0x0000321c,0x0004007c,0x00000014,
65240x0000320d,0x0000321d,0x00060041,0x0000016c,
65250x00003204,0x0000320d,0x0000016b,0x0000016b,
65260x0006003d,0x00000006,0x00003205,0x00003204,
65270x00000002,0x00000004,0x00050095,0x0000013d,
65280x00003236,0x000031f3,0x000001db,0x00050051,
65290x00000006,0x00003237,0x00003236,0x00000001,
65300x00050051,0x00000006,0x00003238,0x00003236,
65310x00000000,0x00050080,0x00000006,0x0000323d,
65320x000031fb,0x00003237,0x00050050,0x00000007,
65330x0000323e,0x00003238,0x0000323d,0x0004007c,
65340x00000014,0x0000322e,0x0000323e,0x00060041,
65350x0000016c,0x00003225,0x0000322e,0x0000016b,
65360x0000016b,0x0006003d,0x00000006,0x00003226,
65370x00003225,0x00000002,0x00000004,0x0004007c,
65380x00000027,0x00002cfc,0x00003226,0x00050095,
65390x0000013d,0x00003257,0x000031f3,0x00000299,
65400x00050051,0x00000006,0x00003258,0x00003257,
65410x00000001,0x00050051,0x00000006,0x00003259,
65420x00003257,0x00000000,0x00050080,0x00000006,
65430x0000325e,0x000031fb,0x00003258,0x00050050,
65440x00000007,0x0000325f,0x00003259,0x0000325e,
65450x0004007c,0x00000014,0x0000324f,0x0000325f,
65460x00060041,0x0000016c,0x00003246,0x0000324f,
65470x0000016b,0x0000016b,0x0006003d,0x00000006,
65480x00003247,0x00003246,0x00000002,0x00000004,
65490x0004007c,0x00000027,0x00002cff,0x00003247,
65500x00050095,0x0000013d,0x00003278,0x000031f3,
65510x000001ef,0x00050051,0x00000006,0x00003279,
65520x00003278,0x00000001,0x00050051,0x00000006,
65530x0000327a,0x00003278,0x00000000,0x00050080,
65540x00000006,0x0000327f,0x000031fb,0x00003279,
65550x00050050,0x00000007,0x00003280,0x0000327a,
65560x0000327f,0x0004007c,0x00000014,0x00003270,
65570x00003280,0x00060041,0x0000016c,0x00003267,
65580x00003270,0x0000016b,0x0000016b,0x0006003d,
65590x00000006,0x00003268,0x00003267,0x00000002,
65600x00000004,0x0004007c,0x00000027,0x00002d02,
65610x00003268,0x00050095,0x0000013d,0x00003299,
65620x000031f3,0x000006d9,0x00050051,0x00000006,
65630x0000329a,0x00003299,0x00000001,0x00050051,
65640x00000006,0x0000329b,0x00003299,0x00000000,
65650x00050080,0x00000006,0x000032a0,0x000031fb,
65660x0000329a,0x00050050,0x00000007,0x000032a1,
65670x0000329b,0x000032a0,0x0004007c,0x00000014,
65680x00003291,0x000032a1,0x00060041,0x0000016c,
65690x00003288,0x00003291,0x0000016b,0x0000016b,
65700x0006003d,0x00000006,0x00003289,0x00003288,
65710x00000002,0x00000004,0x0004007c,0x00000027,
65720x00002d06,0x00003289,0x00050095,0x0000013d,
65730x000032ba,0x000031f3,0x00000205,0x00050051,
65740x00000006,0x000032bb,0x000032ba,0x00000001,
65750x00050051,0x00000006,0x000032bc,0x000032ba,
65760x00000000,0x00050080,0x00000006,0x000032c1,
65770x000031fb,0x000032bb,0x00050050,0x00000007,
65780x000032c2,0x000032bc,0x000032c1,0x0004007c,
65790x00000014,0x000032b2,0x000032c2,0x00060041,
65800x0000016c,0x000032a9,0x000032b2,0x0000016b,
65810x0000016b,0x0006003d,0x00000006,0x000032aa,
65820x000032a9,0x00000002,0x00000004,0x0004007c,
65830x00000027,0x00002d09,0x000032aa,0x00050095,
65840x0000013d,0x000032db,0x000031f3,0x00000500,
65850x00050051,0x00000006,0x000032dc,0x000032db,
65860x00000001,0x00050051,0x00000006,0x000032dd,
65870x000032db,0x00000000,0x00050080,0x00000006,
65880x000032e2,0x000031fb,0x000032dc,0x00050050,
65890x00000007,0x000032e3,0x000032dd,0x000032e2,
65900x0004007c,0x00000014,0x000032d3,0x000032e3,
65910x00060041,0x0000016c,0x000032ca,0x000032d3,
65920x0000016b,0x0000016b,0x0006003d,0x00000006,
65930x000032cb,0x000032ca,0x00000002,0x00000004,
65940x0004007c,0x00000027,0x00002d0c,0x000032cb,
65950x000500bc,0x0000002f,0x000032ea,0x00002cfc,
65960x00002d06,0x000300f7,0x000032f1,0x00000000,
65970x000400fa,0x000032ea,0x000032eb,0x000032f1,
65980x000200f8,0x000032eb,0x000500bc,0x0000002f,
65990x000032f0,0x00002cff,0x00002d09,0x000200f9,
66000x000032f1,0x000200f8,0x000032f1,0x000700f5,
66010x0000002f,0x000032f2,0x000032ea,0x00002cf3,
66020x000032f0,0x000032eb,0x000300f7,0x000032f9,
66030x00000000,0x000400fa,0x000032f2,0x000032f3,
66040x000032f9,0x000200f8,0x000032f3,0x000500bc,
66050x0000002f,0x000032f8,0x00002d02,0x00002d0c,
66060x000200f9,0x000032f9,0x000200f8,0x000032f9,
66070x000700f5,0x0000002f,0x000032fa,0x000032f2,
66080x000032f1,0x000032f8,0x000032f3,0x000300f7,
66090x00002d16,0x00000000,0x000400fa,0x000032fa,
66100x00002d12,0x00002d16,0x000200f8,0x00002d12,
66110x000500c2,0x00000006,0x00002d14,0x00002e81,
66120x000006f3,0x000500ab,0x0000002f,0x00002d15,
66130x00002d14,0x00000138,0x000200f9,0x00002d16,
66140x000200f8,0x00002d16,0x000700f5,0x0000002f,
66150x00002d17,0x000032fa,0x000032f9,0x00002d15,
66160x00002d12,0x000300f7,0x00002d87,0x00000000,
66170x000400fa,0x00002d17,0x00002d18,0x00002d87,
66180x000200f8,0x00002d18,0x000200f9,0x00002d19,
66190x000200f8,0x00002d19,0x000700f5,0x0000006c,
66200x00005f0d,0x000060fe,0x00002d18,0x00002d82,
66210x00002d1d,0x000700f5,0x0000006c,0x00005ee6,
66220x00000576,0x00002d18,0x00002d7f,0x00002d1d,
66230x000700f5,0x00000006,0x00005e8b,0x00000138,
66240x00002d18,0x00002d85,0x00002d1d,0x000500b0,
66250x0000002f,0x00002d1c,0x00005e8b,0x000001cd,
66260x000400f6,0x00002d86,0x00002d1d,0x00000000,
66270x000400fa,0x00002d1c,0x00002d1d,0x00002d86,
66280x000200f8,0x00002d1d,0x000500c7,0x00000006,
66290x00002d1f,0x00005e8b,0x00000142,0x000500ab,
66300x0000002f,0x00002d20,0x00002d1f,0x00000138,
66310x000600a9,0x00000027,0x0000611b,0x00002d20,
66320x00002d06,0x00002cfc,0x000500c7,0x00000006,
66330x00002d2a,0x00005e8b,0x00000280,0x000500ab,
66340x0000002f,0x00002d2b,0x00002d2a,0x00000138,
66350x000600a9,0x00000027,0x0000611c,0x00002d2b,
66360x00002d09,0x00002cff,0x000500c7,0x00000006,
66370x00002d35,0x00005e8b,0x000000ec,0x000500ab,
66380x0000002f,0x00002d36,0x00002d35,0x00000138,
66390x000600a9,0x00000027,0x0000611d,0x00002d36,
66400x00002d0c,0x00002d02,0x00050041,0x00000028,
66410x00002d40,0x00002c30,0x0000016b,0x0004003d,
66420x00000027,0x00002d41,0x00002d40,0x00050085,
66430x00000027,0x00002d44,0x00002d41,0x0000611b,
66440x00050041,0x00000028,0x00002d45,0x00002c30,
66450x00000264,0x0004003d,0x00000027,0x00002d46,
66460x00002d45,0x00050085,0x00000027,0x00002d49,
66470x00002d46,0x0000611c,0x00050081,0x00000027,
66480x00002d4a,0x00002d44,0x00002d49,0x00050041,
66490x00000028,0x00002d4b,0x00002c30,0x00000315,
66500x0004003d,0x00000027,0x00002d4c,0x00002d4b,
66510x00050085,0x00000027,0x00002d4f,0x00002d4c,
66520x0000611d,0x00050081,0x00000027,0x00002d50,
66530x00002d4a,0x00002d4f,0x00050041,0x00000028,
66540x00002d51,0x00002c30,0x0000031d,0x0004003d,
66550x00000027,0x00002d52,0x00002d51,0x00050081,
66560x00000027,0x00002d53,0x00002d50,0x00002d52,
66570x00050041,0x00000028,0x00002d54,0x00002c30,
66580x00000325,0x0004003d,0x00000027,0x00002d55,
66590x00002d54,0x00050085,0x00000027,0x00002d58,
66600x00002d55,0x0000611b,0x00050041,0x00000028,
66610x00002d59,0x00002c30,0x0000032d,0x0004003d,
66620x00000027,0x00002d5a,0x00002d59,0x00050085,
66630x00000027,0x00002d5d,0x00002d5a,0x0000611c,
66640x00050081,0x00000027,0x00002d5e,0x00002d58,
66650x00002d5d,0x00050041,0x00000028,0x00002d5f,
66660x00002c30,0x00000351,0x0004003d,0x00000027,
66670x00002d60,0x00002d5f,0x00050085,0x00000027,
66680x00002d63,0x00002d60,0x0000611d,0x00050081,
66690x00000027,0x00002d64,0x00002d5e,0x00002d63,
66700x00050041,0x00000028,0x00002d65,0x00002c30,
66710x0000074d,0x0004003d,0x00000027,0x00002d66,
66720x00002d65,0x00050081,0x00000027,0x00002d67,
66730x00002d64,0x00002d66,0x00050041,0x00000028,
66740x00002d68,0x00002c30,0x000004c1,0x0004003d,
66750x00000027,0x00002d69,0x00002d68,0x00050085,
66760x00000027,0x00002d6c,0x00002d69,0x0000611b,
66770x00050041,0x00000028,0x00002d6d,0x00002c30,
66780x00000206,0x0004003d,0x00000027,0x00002d6e,
66790x00002d6d,0x00050085,0x00000027,0x00002d71,
66800x00002d6e,0x0000611c,0x00050081,0x00000027,
66810x00002d72,0x00002d6c,0x00002d71,0x00050041,
66820x00000028,0x00002d73,0x00002c30,0x000003b6,
66830x0004003d,0x00000027,0x00002d74,0x00002d73,
66840x00050085,0x00000027,0x00002d77,0x00002d74,
66850x0000611d,0x00050081,0x00000027,0x00002d78,
66860x00002d72,0x00002d77,0x00050041,0x00000028,
66870x00002d79,0x00002c30,0x00000434,0x0004003d,
66880x00000027,0x00002d7a,0x00002d79,0x00050081,
66890x00000027,0x00002d7b,0x00002d78,0x00002d7a,
66900x00060050,0x0000006c,0x00002d7c,0x00002d53,
66910x00002d67,0x00002d7b,0x0007000c,0x0000006c,
66920x00002d7f,0x00000001,0x00000025,0x00005ee6,
66930x00002d7c,0x0007000c,0x0000006c,0x00002d82,
66940x00000001,0x00000028,0x00005f0d,0x00002d7c,
66950x00050080,0x00000006,0x00002d85,0x00005e8b,
66960x00000264,0x000200f9,0x00002d19,0x000200f8,
66970x00002d86,0x000200f9,0x00002d87,0x000200f8,
66980x00002d87,0x000700f5,0x0000006c,0x00005f09,
66990x000060fe,0x00002d16,0x00005f0d,0x00002d86,
67000x000700f5,0x0000006c,0x00005ee2,0x00000576,
67010x00002d16,0x00005ee6,0x00002d86,0x000200f9,
67020x00002d88,0x000200f8,0x00002d88,0x000700f5,
67030x0000006c,0x00005ef3,0x000060fe,0x00002cf0,
67040x00005f09,0x00002d87,0x000700f5,0x0000006c,
67050x00005ecc,0x00000576,0x00002cf0,0x00005ee2,
67060x00002d87,0x000700f5,0x00000006,0x00005e94,
67070x00000539,0x00002cf0,0x00003205,0x00002d87,
67080x00050041,0x00000028,0x00002d89,0x00002c30,
67090x0000016b,0x0004003d,0x00000027,0x00002d8a,
67100x00002d89,0x000500b4,0x0000002f,0x00002d8b,
67110x00002d8a,0x00000771,0x000300f7,0x00002d90,
67120x00000000,0x000400fa,0x00002d8b,0x00002d8c,
67130x00002d90,0x000200f8,0x00002d8c,0x00050041,
67140x00000028,0x00002d8d,0x00002c30,0x00000264,
67150x0004003d,0x00000027,0x00002d8e,0x00002d8d,
67160x000500b4,0x0000002f,0x00002d8f,0x00002d8e,
67170x00000426,0x000200f9,0x00002d90,0x000200f8,
67180x00002d90,0x000700f5,0x0000002f,0x00002d91,
67190x00002d8b,0x00002d88,0x00002d8f,0x00002d8c,
67200x000300f7,0x00002d96,0x00000000,0x000400fa,
67210x00002d91,0x00002d92,0x00002d96,0x000200f8,
67220x00002d92,0x00050041,0x00000028,0x00002d93,
67230x00002c30,0x00000315,0x0004003d,0x00000027,
67240x00002d94,0x00002d93,0x000500b4,0x0000002f,
67250x00002d95,0x00002d94,0x00000426,0x000200f9,
67260x00002d96,0x000200f8,0x00002d96,0x000700f5,
67270x0000002f,0x00002d97,0x00002d91,0x00002d90,
67280x00002d95,0x00002d92,0x000300f7,0x00002d9c,
67290x00000000,0x000400fa,0x00002d97,0x00002d98,
67300x00002d9c,0x000200f8,0x00002d98,0x00050041,
67310x00000028,0x00002d99,0x00002c30,0x00000325,
67320x0004003d,0x00000027,0x00002d9a,0x00002d99,
67330x000500b4,0x0000002f,0x00002d9b,0x00002d9a,
67340x00000426,0x000200f9,0x00002d9c,0x000200f8,
67350x00002d9c,0x000700f5,0x0000002f,0x00002d9d,
67360x00002d97,0x00002d96,0x00002d9b,0x00002d98,
67370x000300f7,0x00002da2,0x00000000,0x000400fa,
67380x00002d9d,0x00002d9e,0x00002da2,0x000200f8,
67390x00002d9e,0x00050041,0x00000028,0x00002d9f,
67400x00002c30,0x0000032d,0x0004003d,0x00000027,
67410x00002da0,0x00002d9f,0x000500b4,0x0000002f,
67420x00002da1,0x00002da0,0x00000771,0x000200f9,
67430x00002da2,0x000200f8,0x00002da2,0x000700f5,
67440x0000002f,0x00002da3,0x00002d9d,0x00002d9c,
67450x00002da1,0x00002d9e,0x000300f7,0x00002da8,
67460x00000000,0x000400fa,0x00002da3,0x00002da4,
67470x00002da8,0x000200f8,0x00002da4,0x00050041,
67480x00000028,0x00002da5,0x00002c30,0x00000351,
67490x0004003d,0x00000027,0x00002da6,0x00002da5,
67500x000500b4,0x0000002f,0x00002da7,0x00002da6,
67510x00000426,0x000200f9,0x00002da8,0x000200f8,
67520x00002da8,0x000700f5,0x0000002f,0x00002da9,
67530x00002da3,0x00002da2,0x00002da7,0x00002da4,
67540x000300f7,0x00002dae,0x00000000,0x000400fa,
67550x00002da9,0x00002daa,0x00002dae,0x000200f8,
67560x00002daa,0x00050041,0x00000028,0x00002dab,
67570x00002c30,0x000004c1,0x0004003d,0x00000027,
67580x00002dac,0x00002dab,0x000500b4,0x0000002f,
67590x00002dad,0x00002dac,0x00000426,0x000200f9,
67600x00002dae,0x000200f8,0x00002dae,0x000700f5,
67610x0000002f,0x00002daf,0x00002da9,0x00002da8,
67620x00002dad,0x00002daa,0x000300f7,0x00002db4,
67630x00000000,0x000400fa,0x00002daf,0x00002db0,
67640x00002db4,0x000200f8,0x00002db0,0x00050041,
67650x00000028,0x00002db1,0x00002c30,0x00000206,
67660x0004003d,0x00000027,0x00002db2,0x00002db1,
67670x000500b4,0x0000002f,0x00002db3,0x00002db2,
67680x00000426,0x000200f9,0x00002db4,0x000200f8,
67690x00002db4,0x000700f5,0x0000002f,0x00002db5,
67700x00002daf,0x00002dae,0x00002db3,0x00002db0,
67710x000300f7,0x00002dba,0x00000000,0x000400fa,
67720x00002db5,0x00002db6,0x00002dba,0x000200f8,
67730x00002db6,0x00050041,0x00000028,0x00002db7,
67740x00002c30,0x000003b6,0x0004003d,0x00000027,
67750x00002db8,0x00002db7,0x000500b4,0x0000002f,
67760x00002db9,0x00002db8,0x00000771,0x000200f9,
67770x00002dba,0x000200f8,0x00002dba,0x000700f5,
67780x0000002f,0x00002dbb,0x00002db5,0x00002db4,
67790x00002db9,0x00002db6,0x00050080,0x00000006,
67800x00002dbd,0x00002cc6,0x00000537,0x000500c7,
67810x00000006,0x00002dbf,0x00005e94,0x000007a6,
67820x000600a9,0x00000006,0x00002dc1,0x00002dbb,
67830x00000241,0x00000138,0x000500c5,0x00000006,
67840x00002dc2,0x00002dbf,0x00002dc1,0x00050095,
67850x0000013d,0x00003313,0x00002f3b,0x00002dbd,
67860x00050051,0x00000006,0x00003314,0x00003313,
67870x00000001,0x00050051,0x00000006,0x00003315,
67880x00003313,0x00000000,0x00050080,0x00000006,
67890x0000331a,0x00002f42,0x00003314,0x00050050,
67900x00000007,0x0000331b,0x00003315,0x0000331a,
67910x0004007c,0x00000014,0x0000330b,0x0000331b,
67920x00060041,0x0000016c,0x00003303,0x0000330b,
67930x0000016b,0x0000016b,0x0005003e,0x00003303,
67940x00002dc2,0x00000002,0x00000004,0x000400a8,
67950x0000002f,0x00002dc7,0x00002cf1,0x00050050,
67960x0000611e,0x0000611f,0x00002dc7,0x00002dc7,
67970x000600a9,0x00000007,0x00006120,0x0000611f,
67980x000007b5,0x00005e89,0x00050080,0x00000006,
67990x00002dcb,0x00002cc6,0x00000541,0x00050051,
68000x00000006,0x00002dcd,0x00006120,0x00000000,
68010x000500c2,0x00000006,0x00002dce,0x00002dcd,
68020x000004c1,0x00050051,0x00000006,0x00002dd0,
68030x00006120,0x00000001,0x000500c4,0x00000006,
68040x00002dd1,0x00002dd0,0x000006f3,0x000500c5,
68050x00000006,0x00002dd2,0x00002dce,0x00002dd1,
68060x00050095,0x0000013d,0x00003333,0x00002f3b,
68070x00002dcb,0x00050051,0x00000006,0x00003334,
68080x00003333,0x00000001,0x00050051,0x00000006,
68090x00003335,0x00003333,0x00000000,0x00050080,
68100x00000006,0x0000333a,0x00002f42,0x00003334,
68110x00050050,0x00000007,0x0000333b,0x00003335,
68120x0000333a,0x0004007c,0x00000014,0x0000332b,
68130x0000333b,0x00060041,0x0000016c,0x00003323,
68140x0000332b,0x0000016b,0x0000016b,0x0005003e,
68150x00003323,0x00002dd2,0x00000002,0x00000004,
68160x0004003d,0x00000027,0x00002dd7,0x00002d89,
68170x00050041,0x00000028,0x00002dd8,0x00002c30,
68180x00000325,0x0004003d,0x00000027,0x00002dd9,
68190x00002dd8,0x00050041,0x00000028,0x00002dda,
68200x00002c30,0x000004c1,0x0004003d,0x00000027,
68210x00002ddb,0x00002dda,0x00050041,0x00000028,
68220x00002ddc,0x00002c30,0x00000264,0x0004003d,
68230x00000027,0x00002ddd,0x00002ddc,0x00050041,
68240x00000028,0x00002dde,0x00002c30,0x0000032d,
68250x0004003d,0x00000027,0x00002ddf,0x00002dde,
68260x00050041,0x00000028,0x00002de0,0x00002c30,
68270x00000206,0x0004003d,0x00000027,0x00002de1,
68280x00002de0,0x00050041,0x00000028,0x00002de2,
68290x00002c30,0x00000315,0x0004003d,0x00000027,
68300x00002de3,0x00002de2,0x00050041,0x00000028,
68310x00002de4,0x00002c30,0x00000351,0x0004003d,
68320x00000027,0x00002de5,0x00002de4,0x00050041,
68330x00000028,0x00002de6,0x00002c30,0x000003b6,
68340x0004003d,0x00000027,0x00002de7,0x00002de6,
68350x00060050,0x0000006c,0x00002de8,0x00002dd7,
68360x00002dd9,0x00002ddb,0x00060050,0x0000006c,
68370x00002de9,0x00002ddd,0x00002ddf,0x00002de1,
68380x00060050,0x0000006c,0x00002dea,0x00002de3,
68390x00002de5,0x00002de7,0x00060050,0x000007c5,
68400x00002deb,0x00002de8,0x00002de9,0x00002dea,
68410x0006000c,0x00000027,0x00002ded,0x00000001,
68420x00000021,0x00002deb,0x000500b7,0x0000002f,
68430x00002def,0x00002ded,0x00000426,0x000300f7,
68440x00002df4,0x00000000,0x000400fa,0x00002def,
68450x00002df0,0x00002df3,0x000200f8,0x00002df3,
68460x000200f9,0x00002df4,0x000200f8,0x00002df0,
68470x0006000c,0x000007c5,0x00002df2,0x00000001,
68480x00000022,0x00002deb,0x000200f9,0x00002df4,
68490x000200f8,0x00002df4,0x000700f5,0x000007c5,
68500x00005ebe,0x00002df2,0x00002df0,0x000007eb,
68510x00002df3,0x0003003e,0x00002c75,0x00005ebe,
68520x00050041,0x00000028,0x00002df6,0x00002c30,
68530x0000031d,0x0004003d,0x00000027,0x00002df7,
68540x00002df6,0x00050041,0x00000028,0x00002df8,
68550x00002c30,0x0000074d,0x0004003d,0x00000027,
68560x00002df9,0x00002df8,0x00050041,0x00000028,
68570x00002dfa,0x00002c30,0x00000434,0x0004003d,
68580x00000027,0x00002dfb,0x00002dfa,0x00060050,
68590x0000006c,0x00002dfc,0x00002df7,0x00002df9,
68600x00002dfb,0x00050091,0x0000006c,0x00002dff,
68610x00005ebe,0x00002dfc,0x0004007f,0x0000006c,
68620x00002e00,0x00002dff,0x0003003e,0x00002c78,
68630x00002e00,0x000200f9,0x00002e01,0x000200f8,
68640x00002e01,0x000700f5,0x00000006,0x00005ebf,
68650x00000138,0x00002df4,0x00002e34,0x00002e05,
68660x000500b0,0x0000002f,0x00002e04,0x00005ebf,
68670x00000470,0x000400f6,0x00002e35,0x00002e05,
68680x00000000,0x000400fa,0x00002e04,0x00002e05,
68690x00002e35,0x000200f8,0x00002e05,0x00050080,
68700x00000006,0x00002e07,0x00002cc6,0x000001c4,
68710x00050084,0x00000006,0x00002e09,0x000001db,
68720x00005ebf,0x00050080,0x00000006,0x00002e0a,
68730x00002e07,0x00002e09,0x00060041,0x00000028,
68740x00002e0e,0x00002c75,0x0000016b,0x00005ebf,
68750x0004003d,0x00000027,0x00002e0f,0x00002e0e,
68760x0004007c,0x00000006,0x00003341,0x00002e0f,
68770x00050095,0x0000013d,0x0000335c,0x00002f3b,
68780x00002e0a,0x00050051,0x00000006,0x0000335d,
68790x0000335c,0x00000001,0x00050051,0x00000006,
68800x0000335e,0x0000335c,0x00000000,0x00050080,
68810x00000006,0x00003363,0x00002f42,0x0000335d,
68820x00050050,0x00000007,0x00003364,0x0000335e,
68830x00003363,0x0004007c,0x00000014,0x00003354,
68840x00003364,0x00060041,0x0000016c,0x0000334c,
68850x00003354,0x0000016b,0x0000016b,0x0005003e,
68860x0000334c,0x00003341,0x00000002,0x00000004,
68870x00050080,0x00000006,0x00002e12,0x00002cc6,
68880x00000811,0x00050080,0x00000006,0x00002e15,
68890x00002e12,0x00002e09,0x00060041,0x00000028,
68900x00002e19,0x00002c75,0x00000264,0x00005ebf,
68910x0004003d,0x00000027,0x00002e1a,0x00002e19,
68920x0004007c,0x00000006,0x0000336a,0x00002e1a,
68930x00050095,0x0000013d,0x00003385,0x00002f3b,
68940x00002e15,0x00050051,0x00000006,0x00003386,
68950x00003385,0x00000001,0x00050051,0x00000006,
68960x00003387,0x00003385,0x00000000,0x00050080,
68970x00000006,0x0000338c,0x00002f42,0x00003386,
68980x00050050,0x00000007,0x0000338d,0x00003387,
68990x0000338c,0x0004007c,0x00000014,0x0000337d,
69000x0000338d,0x00060041,0x0000016c,0x00003375,
69010x0000337d,0x0000016b,0x0000016b,0x0005003e,
69020x00003375,0x0000336a,0x00000002,0x00000004,
69030x00050080,0x00000006,0x00002e1d,0x00002cc6,
69040x00000820,0x00050080,0x00000006,0x00002e20,
69050x00002e1d,0x00002e09,0x00060041,0x00000028,
69060x00002e24,0x00002c75,0x00000315,0x00005ebf,
69070x0004003d,0x00000027,0x00002e25,0x00002e24,
69080x0004007c,0x00000006,0x00003393,0x00002e25,
69090x00050095,0x0000013d,0x000033ae,0x00002f3b,
69100x00002e20,0x00050051,0x00000006,0x000033af,
69110x000033ae,0x00000001,0x00050051,0x00000006,
69120x000033b0,0x000033ae,0x00000000,0x00050080,
69130x00000006,0x000033b5,0x00002f42,0x000033af,
69140x00050050,0x00000007,0x000033b6,0x000033b0,
69150x000033b5,0x0004007c,0x00000014,0x000033a6,
69160x000033b6,0x00060041,0x0000016c,0x0000339e,
69170x000033a6,0x0000016b,0x0000016b,0x0005003e,
69180x0000339e,0x00003393,0x00000002,0x00000004,
69190x00050080,0x00000006,0x00002e28,0x00002cc6,
69200x0000082f,0x00050080,0x00000006,0x00002e2b,
69210x00002e28,0x00002e09,0x00050041,0x00000028,
69220x00002e2f,0x00002c78,0x00005ebf,0x0004003d,
69230x00000027,0x00002e30,0x00002e2f,0x0004007c,
69240x00000006,0x000033bc,0x00002e30,0x00050095,
69250x0000013d,0x000033d7,0x00002f3b,0x00002e2b,
69260x00050051,0x00000006,0x000033d8,0x000033d7,
69270x00000001,0x00050051,0x00000006,0x000033d9,
69280x000033d7,0x00000000,0x00050080,0x00000006,
69290x000033de,0x00002f42,0x000033d8,0x00050050,
69300x00000007,0x000033df,0x000033d9,0x000033de,
69310x0004007c,0x00000014,0x000033cf,0x000033df,
69320x00060041,0x0000016c,0x000033c7,0x000033cf,
69330x0000016b,0x0000016b,0x0005003e,0x000033c7,
69340x000033bc,0x00000002,0x00000004,0x00050080,
69350x00000006,0x00002e34,0x00005ebf,0x00000264,
69360x000200f9,0x00002e01,0x000200f8,0x00002e35,
69370x00050080,0x00000006,0x00002e37,0x00002cc6,
69380x00000840,0x00050095,0x0000013d,0x000033f7,
69390x00002f3b,0x00002e37,0x00050051,0x00000006,
69400x000033f8,0x000033f7,0x00000001,0x00050051,
69410x00000006,0x000033f9,0x000033f7,0x00000000,
69420x00050080,0x00000006,0x000033fe,0x00002f42,
69430x000033f8,0x00050050,0x00000007,0x000033ff,
69440x000033f9,0x000033fe,0x0004007c,0x00000014,
69450x000033ef,0x000033ff,0x00060041,0x0000016c,
69460x000033e7,0x000033ef,0x0000016b,0x0000016b,
69470x0005003e,0x000033e7,0x000012dd,0x00000002,
69480x00000004,0x00050080,0x00000006,0x00002e3d,
69490x00002cc6,0x0000084a,0x00050095,0x0000013d,
69500x00003417,0x00002f3b,0x00002e3d,0x00050051,
69510x00000006,0x00003418,0x00003417,0x00000001,
69520x00050051,0x00000006,0x00003419,0x00003417,
69530x00000000,0x00050080,0x00000006,0x0000341e,
69540x00002f42,0x00003418,0x00050050,0x00000007,
69550x0000341f,0x00003419,0x0000341e,0x0004007c,
69560x00000014,0x0000340f,0x0000341f,0x00060041,
69570x0000016c,0x00003407,0x0000340f,0x0000016b,
69580x0000016b,0x0005003e,0x00003407,0x00000539,
66000x00000002,0x00000004,0x00050080,0x00000006, 69590x00000002,0x00000004,0x00050080,0x00000006,
66010x00002d14,0x00002bbe,0x00000730,0x00050080, 69600x00002e42,0x00002cc6,0x00000853,0x00050095,
66020x00000006,0x00002d17,0x00002d14,0x00002cf5, 69610x0000013d,0x00003437,0x00002f3b,0x00002e42,
66030x00050041,0x00000028,0x00002d1b,0x00002b70, 69620x00050051,0x00000006,0x00003438,0x00003437,
66040x00005ab9,0x0004003d,0x00000027,0x00002d1c, 69630x00000001,0x00050051,0x00000006,0x00003439,
66050x00002d1b,0x0004007c,0x00000006,0x00003030, 69640x00003437,0x00000000,0x00050080,0x00000006,
66060x00002d1c,0x00050095,0x00000130,0x0000304b, 69650x0000343e,0x00002f42,0x00003438,0x00050050,
66070x00002e27,0x00002d17,0x00050051,0x00000006, 69660x00000007,0x0000343f,0x00003439,0x0000343e,
66080x0000304c,0x0000304b,0x00000001,0x00050051, 69670x0004007c,0x00000014,0x0000342f,0x0000343f,
66090x00000006,0x0000304d,0x0000304b,0x00000000, 69680x00060041,0x0000016c,0x00003427,0x0000342f,
66100x00050080,0x00000006,0x00003052,0x00002e2e, 69690x0000016b,0x0000016b,0x0005003e,0x00003427,
66110x0000304c,0x00050050,0x00000007,0x00003053, 69700x00000138,0x00000002,0x00000004,0x00050080,
66120x0000304d,0x00003052,0x0004007c,0x00000014, 69710x00000006,0x00002e47,0x00002cc6,0x0000085c,
66130x00003043,0x00003053,0x00060041,0x0000015f, 69720x00050095,0x0000013d,0x00003457,0x00002f3b,
66140x0000303b,0x00003043,0x0000015e,0x0000015e, 69730x00002e47,0x00050051,0x00000006,0x00003458,
66150x0005003e,0x0000303b,0x00003030,0x00000002, 69740x00003457,0x00000001,0x00050051,0x00000006,
66160x00000004,0x00050080,0x00000006,0x00002d20, 69750x00003459,0x00003457,0x00000000,0x00050080,
66170x00005ab9,0x0000022b,0x000200f9,0x00002ced, 69760x00000006,0x0000345e,0x00002f42,0x00003458,
66180x000200f8,0x00002d21,0x00050080,0x00000006, 69770x00050050,0x00000007,0x0000345f,0x00003459,
66190x00002d23,0x00002bbe,0x00000741,0x00050095, 69780x0000345e,0x0004007c,0x00000014,0x0000344f,
66200x00000130,0x0000306b,0x00002e27,0x00002d23, 69790x0000345f,0x00060041,0x0000016c,0x00003447,
66210x00050051,0x00000006,0x0000306c,0x0000306b, 69800x0000344f,0x0000016b,0x0000016b,0x0005003e,
66220x00000001,0x00050051,0x00000006,0x0000306d, 69810x00003447,0x00000138,0x00000002,0x00000004,
66230x0000306b,0x00000000,0x00050080,0x00000006, 69820x000500b4,0x0000002f,0x00002e4c,0x00002ded,
66240x00003072,0x00002e2e,0x0000306c,0x00050050, 69830x00000426,0x00060050,0x0000054d,0x00006121,
66250x00000007,0x00003073,0x0000306d,0x00003072, 69840x00002e4c,0x00002e4c,0x00002e4c,0x000600a9,
66260x0004007c,0x00000014,0x00003063,0x00003073, 69850x0000006c,0x00006122,0x00006121,0x000060fe,
66270x00060041,0x0000015f,0x0000305b,0x00003063, 69860x00005ef3,0x000600a9,0x0000006c,0x00006124,
66280x0000015e,0x0000015e,0x0005003e,0x0000305b, 69870x00006121,0x00000576,0x00005ecc,0x00050041,
66290x000011de,0x00000002,0x00000004,0x00050080, 69880x000001bb,0x000034af,0x000001b9,0x000001ba,
66300x00000006,0x00002d29,0x00002bbe,0x0000074b, 69890x0004003d,0x00000006,0x000034b0,0x000034af,
66310x00050095,0x00000130,0x0000308b,0x00002e27, 69900x00050084,0x00000006,0x000034b1,0x000001db,
66320x00002d29,0x00050051,0x00000006,0x0000308c, 69910x000034b0,0x00050080,0x00000006,0x000034b2,
66330x0000308b,0x00000001,0x00050051,0x00000006, 69920x000001c4,0x000034b1,0x00050080,0x00000006,
66340x0000308d,0x0000308b,0x00000000,0x00050080, 69930x000034b8,0x000034b0,0x0000062f,0x00050086,
66350x00000006,0x00003092,0x00002e2e,0x0000308c, 69940x00000006,0x000034b9,0x000034b8,0x000001be,
66360x00050050,0x00000007,0x00003093,0x0000308d, 69950x00050084,0x00000006,0x000034ab,0x000001c4,
66370x00003092,0x0004007c,0x00000014,0x00003083, 69960x000034b9,0x00050080,0x00000006,0x000034ac,
66380x00003093,0x00060041,0x0000015f,0x0000307b, 69970x000034b2,0x000034ab,0x00050080,0x00000006,
66390x00003083,0x0000015e,0x0000015e,0x0005003e, 69980x000034a6,0x000034ac,0x000034ab,0x00050084,
66400x0000307b,0x00000500,0x00000002,0x00000004, 69990x00000006,0x00003476,0x000001ef,0x000012dd,
66410x00050080,0x00000006,0x00002d2e,0x00002bbe, 70000x00050080,0x00000006,0x00003477,0x000034a6,
66420x00000754,0x00050095,0x00000130,0x000030ab, 70010x00003476,0x00050041,0x00000266,0x00003478,
66430x00002e27,0x00002d2e,0x00050051,0x00000006, 70020x000001b9,0x00000264,0x0004003d,0x00000007,
66440x000030ac,0x000030ab,0x00000001,0x00050051, 70030x00003479,0x00003478,0x00050051,0x00000027,
66450x00000006,0x000030ad,0x000030ab,0x00000000, 70040x0000347c,0x00006124,0x00000000,0x0004007c,
66460x00050080,0x00000006,0x000030b2,0x00002e2e, 70050x00000006,0x000034c6,0x0000347c,0x00050051,
66470x000030ac,0x00050050,0x00000007,0x000030b3, 70060x00000006,0x000034df,0x00003479,0x00000000,
66480x000030ad,0x000030b2,0x0004007c,0x00000014, 70070x00050095,0x0000013d,0x000034e1,0x000034df,
66490x000030a3,0x000030b3,0x00060041,0x0000015f, 70080x00003477,0x00050051,0x00000006,0x000034e2,
66500x0000309b,0x000030a3,0x0000015e,0x0000015e, 70090x000034e1,0x00000001,0x00050051,0x00000006,
66510x0005003e,0x0000309b,0x0000012b,0x00000002, 70100x000034e3,0x000034e1,0x00000000,0x00050051,
66520x00000004,0x00050080,0x00000006,0x00002d33, 70110x00000006,0x000034e6,0x00003479,0x00000001,
66530x00002bbe,0x0000075d,0x00050095,0x00000130, 70120x00050080,0x00000006,0x000034e8,0x000034e6,
66540x000030cb,0x00002e27,0x00002d33,0x00050051, 70130x000034e2,0x00050050,0x00000007,0x000034e9,
66550x00000006,0x000030cc,0x000030cb,0x00000001, 70140x000034e3,0x000034e8,0x0004007c,0x00000014,
66560x00050051,0x00000006,0x000030cd,0x000030cb, 70150x000034d9,0x000034e9,0x00060041,0x0000016c,
66570x00000000,0x00050080,0x00000006,0x000030d2, 70160x000034d1,0x000034d9,0x0000016b,0x0000016b,
66580x00002e2e,0x000030cc,0x00050050,0x00000007, 70170x0005003e,0x000034d1,0x000034c6,0x00000002,
66590x000030d3,0x000030cd,0x000030d2,0x0004007c, 70180x00000004,0x00050080,0x00000006,0x0000347f,
66600x00000014,0x000030c3,0x000030d3,0x00060041, 70190x00003477,0x000000ec,0x00050051,0x00000027,
66610x0000015f,0x000030bb,0x000030c3,0x0000015e, 70200x00003483,0x00006124,0x00000001,0x0004007c,
66620x0000015e,0x0005003e,0x000030bb,0x0000012b, 70210x00000006,0x000034ef,0x00003483,0x00050095,
66630x00000002,0x00000004,0x000500b4,0x0000002f, 70220x0000013d,0x0000350a,0x000034df,0x0000347f,
66640x00002d38,0x00002cd9,0x000003ed,0x00060050, 70230x00050051,0x00000006,0x0000350b,0x0000350a,
66650x00000514,0x00005ce1,0x00002d38,0x00002d38, 70240x00000001,0x00050051,0x00000006,0x0000350c,
66660x00002d38,0x000600a9,0x00000063,0x00005ce2, 70250x0000350a,0x00000000,0x00050080,0x00000006,
66670x00005ce1,0x00005cc2,0x00005ad7,0x000600a9, 70260x00003511,0x000034e6,0x0000350b,0x00050050,
66680x00000063,0x00005ce4,0x00005ce1,0x0000053d, 70270x00000007,0x00003512,0x0000350c,0x00003511,
66690x00005ac5,0x00050041,0x00000182,0x00003123, 70280x0004007c,0x00000014,0x00003502,0x00003512,
66700x00000180,0x00000181,0x0004003d,0x00000006, 70290x00060041,0x0000016c,0x000034fa,0x00003502,
66710x00003124,0x00003123,0x00050084,0x00000006, 70300x0000016b,0x0000016b,0x0005003e,0x000034fa,
66720x00003125,0x000001a2,0x00003124,0x00050080, 70310x000034ef,0x00000002,0x00000004,0x00050080,
66730x00000006,0x00003126,0x0000018b,0x00003125, 70320x00000006,0x00003486,0x00003477,0x000001cd,
66740x00050080,0x00000006,0x0000312c,0x00003124, 70330x00050051,0x00000027,0x0000348a,0x00006124,
66750x00005cc3,0x00050086,0x00000006,0x0000312d, 70340x00000002,0x0004007c,0x00000006,0x00003518,
66760x0000312c,0x00000185,0x00050084,0x00000006, 70350x0000348a,0x00050095,0x0000013d,0x00003533,
66770x0000311f,0x0000018b,0x0000312d,0x00050080, 70360x000034df,0x00003486,0x00050051,0x00000006,
66780x00000006,0x00003120,0x00003126,0x0000311f, 70370x00003534,0x00003533,0x00000001,0x00050051,
66790x00050080,0x00000006,0x0000311a,0x00003120, 70380x00000006,0x00003535,0x00003533,0x00000000,
66800x0000311f,0x00050084,0x00000006,0x000030ea, 70390x00050080,0x00000006,0x0000353a,0x000034e6,
66810x000001b6,0x000011de,0x00050080,0x00000006, 70400x00003534,0x00050050,0x00000007,0x0000353b,
66820x000030eb,0x0000311a,0x000030ea,0x00050041, 70410x00003535,0x0000353a,0x0004007c,0x00000014,
66830x0000022d,0x000030ec,0x00000180,0x0000022b, 70420x0000352b,0x0000353b,0x00060041,0x0000016c,
66840x0004003d,0x00000007,0x000030ed,0x000030ec, 70430x00003523,0x0000352b,0x0000016b,0x0000016b,
66850x00050051,0x00000027,0x000030f0,0x00005ce4, 70440x0005003e,0x00003523,0x00003518,0x00000002,
66860x00000000,0x0004007c,0x00000006,0x0000313a, 70450x00000004,0x00050080,0x00000006,0x0000348d,
66870x000030f0,0x00050051,0x00000006,0x00003153, 70460x00003477,0x000001d4,0x00050051,0x00000027,
66880x000030ed,0x00000000,0x00050095,0x00000130, 70470x00003491,0x00006122,0x00000000,0x0004007c,
66890x00003155,0x00003153,0x000030eb,0x00050051, 70480x00000006,0x00003541,0x00003491,0x00050095,
66900x00000006,0x00003156,0x00003155,0x00000001, 70490x0000013d,0x0000355c,0x000034df,0x0000348d,
66910x00050051,0x00000006,0x00003157,0x00003155, 70500x00050051,0x00000006,0x0000355d,0x0000355c,
66920x00000000,0x00050051,0x00000006,0x0000315a, 70510x00000001,0x00050051,0x00000006,0x0000355e,
66930x000030ed,0x00000001,0x00050080,0x00000006, 70520x0000355c,0x00000000,0x00050080,0x00000006,
66940x0000315c,0x0000315a,0x00003156,0x00050050, 70530x00003563,0x000034e6,0x0000355d,0x00050050,
66950x00000007,0x0000315d,0x00003157,0x0000315c, 70540x00000007,0x00003564,0x0000355e,0x00003563,
66960x0004007c,0x00000014,0x0000314d,0x0000315d, 70550x0004007c,0x00000014,0x00003554,0x00003564,
66970x00060041,0x0000015f,0x00003145,0x0000314d, 70560x00060041,0x0000016c,0x0000354c,0x00003554,
66980x0000015e,0x0000015e,0x0005003e,0x00003145, 70570x0000016b,0x0000016b,0x0005003e,0x0000354c,
66990x0000313a,0x00000002,0x00000004,0x00050080, 70580x00003541,0x00000002,0x00000004,0x00050080,
67000x00000006,0x000030f3,0x000030eb,0x000000df, 70590x00000006,0x00003494,0x00003477,0x000001db,
67010x00050051,0x00000027,0x000030f7,0x00005ce4, 70600x00050051,0x00000027,0x00003498,0x00006122,
67020x00000001,0x0004007c,0x00000006,0x00003163, 70610x00000001,0x0004007c,0x00000006,0x0000356a,
67030x000030f7,0x00050095,0x00000130,0x0000317e, 70620x00003498,0x00050095,0x0000013d,0x00003585,
67040x00003153,0x000030f3,0x00050051,0x00000006, 70630x000034df,0x00003494,0x00050051,0x00000006,
67050x0000317f,0x0000317e,0x00000001,0x00050051, 70640x00003586,0x00003585,0x00000001,0x00050051,
67060x00000006,0x00003180,0x0000317e,0x00000000, 70650x00000006,0x00003587,0x00003585,0x00000000,
67070x00050080,0x00000006,0x00003185,0x0000315a, 70660x00050080,0x00000006,0x0000358c,0x000034e6,
67080x0000317f,0x00050050,0x00000007,0x00003186, 70670x00003586,0x00050050,0x00000007,0x0000358d,
67090x00003180,0x00003185,0x0004007c,0x00000014, 70680x00003587,0x0000358c,0x0004007c,0x00000014,
67100x00003176,0x00003186,0x00060041,0x0000015f, 70690x0000357d,0x0000358d,0x00060041,0x0000016c,
67110x0000316e,0x00003176,0x0000015e,0x0000015e, 70700x00003575,0x0000357d,0x0000016b,0x0000016b,
67120x0005003e,0x0000316e,0x00003163,0x00000002, 70710x0005003e,0x00003575,0x0000356a,0x00000002,
67130x00000004,0x00050080,0x00000006,0x000030fa, 70720x00000004,0x00050080,0x00000006,0x0000349b,
67140x000030eb,0x00000194,0x00050051,0x00000027, 70730x00003477,0x00000299,0x00050051,0x00000027,
67150x000030fe,0x00005ce4,0x00000002,0x0004007c, 70740x0000349f,0x00006122,0x00000002,0x0004007c,
67160x00000006,0x0000318c,0x000030fe,0x00050095, 70750x00000006,0x00003593,0x0000349f,0x00050095,
67170x00000130,0x000031a7,0x00003153,0x000030fa, 70760x0000013d,0x000035ae,0x000034df,0x0000349b,
67180x00050051,0x00000006,0x000031a8,0x000031a7, 70770x00050051,0x00000006,0x000035af,0x000035ae,
67190x00000001,0x00050051,0x00000006,0x000031a9, 70780x00000001,0x00050051,0x00000006,0x000035b0,
67200x000031a7,0x00000000,0x00050080,0x00000006, 70790x000035ae,0x00000000,0x00050080,0x00000006,
67210x000031ae,0x0000315a,0x000031a8,0x00050050, 70800x000035b5,0x000034e6,0x000035af,0x00050050,
67220x00000007,0x000031af,0x000031a9,0x000031ae, 70810x00000007,0x000035b6,0x000035b0,0x000035b5,
67230x0004007c,0x00000014,0x0000319f,0x000031af, 70820x0004007c,0x00000014,0x000035a6,0x000035b6,
67240x00060041,0x0000015f,0x00003197,0x0000319f, 70830x00060041,0x0000016c,0x0000359e,0x000035a6,
67250x0000015e,0x0000015e,0x0005003e,0x00003197, 70840x0000016b,0x0000016b,0x0005003e,0x0000359e,
67260x0000318c,0x00000002,0x00000004,0x00050080, 70850x00003593,0x00000002,0x00000004,0x000300f7,
67270x00000006,0x00003101,0x000030eb,0x0000019b, 70860x000035f6,0x00000000,0x000300fb,0x00000138,
67280x00050051,0x00000027,0x00003105,0x00005ce2, 70870x000035c5,0x000200f8,0x000035c5,0x000500bc,
67290x00000000,0x0004007c,0x00000006,0x000031b5, 70880x0000002f,0x000035fd,0x0000347c,0x00003491,
67300x00003105,0x00050095,0x00000130,0x000031d0, 70890x000300f7,0x00003604,0x00000000,0x000400fa,
67310x00003153,0x00003101,0x00050051,0x00000006, 70900x000035fd,0x000035fe,0x00003604,0x000200f8,
67320x000031d1,0x000031d0,0x00000001,0x00050051, 70910x000035fe,0x000500bc,0x0000002f,0x00003603,
67330x00000006,0x000031d2,0x000031d0,0x00000000, 70920x00003483,0x00003498,0x000200f9,0x00003604,
67340x00050080,0x00000006,0x000031d7,0x0000315a, 70930x000200f8,0x00003604,0x000700f5,0x0000002f,
67350x000031d1,0x00050050,0x00000007,0x000031d8, 70940x00003605,0x000035fd,0x000035c5,0x00003603,
67360x000031d2,0x000031d7,0x0004007c,0x00000014, 70950x000035fe,0x000300f7,0x0000360c,0x00000000,
67370x000031c8,0x000031d8,0x00060041,0x0000015f, 70960x000400fa,0x00003605,0x00003606,0x0000360c,
67380x000031c0,0x000031c8,0x0000015e,0x0000015e, 70970x000200f8,0x00003606,0x000500bc,0x0000002f,
67390x0005003e,0x000031c0,0x000031b5,0x00000002, 70980x0000360b,0x0000348a,0x0000349f,0x000200f9,
67400x00000004,0x00050080,0x00000006,0x00003108, 70990x0000360c,0x000200f8,0x0000360c,0x000700f5,
67410x000030eb,0x000001a2,0x00050051,0x00000027, 71000x0000002f,0x0000360d,0x00003605,0x00003604,
67420x0000310c,0x00005ce2,0x00000001,0x0004007c, 71010x0000360b,0x00003606,0x000400a8,0x0000002f,
67430x00000006,0x000031de,0x0000310c,0x00050095, 71020x0000360e,0x0000360d,0x000300f7,0x000035ca,
67440x00000130,0x000031f9,0x00003153,0x00003108, 71030x00000000,0x000400fa,0x0000360e,0x000035c9,
67450x00050051,0x00000006,0x000031fa,0x000031f9, 71040x000035ca,0x000200f8,0x000035c9,0x000200f9,
67460x00000001,0x00050051,0x00000006,0x000031fb, 71050x000035f6,0x000200f8,0x000035ca,0x00050081,
67470x000031f9,0x00000000,0x00050080,0x00000006, 71060x0000006c,0x000035cd,0x00006124,0x00006122,
67480x00003200,0x0000315a,0x000031fa,0x00050050, 71070x0005008e,0x0000006c,0x000035ce,0x000035cd,
67490x00000007,0x00003201,0x000031fb,0x00003200, 71080x000002fd,0x00050095,0x0000013d,0x0000361e,
67500x0004007c,0x00000014,0x000031f1,0x00003201, 71090x000034df,0x00000138,0x00050051,0x00000006,
67510x00060041,0x0000015f,0x000031e9,0x000031f1, 71100x0000361f,0x0000361e,0x00000001,0x00050051,
67520x0000015e,0x0000015e,0x0005003e,0x000031e9, 71110x00000006,0x00003620,0x0000361e,0x00000000,
67530x000031de,0x00000002,0x00000004,0x00050080, 71120x00050080,0x00000006,0x00003625,0x000034e6,
67540x00000006,0x0000310f,0x000030eb,0x00000260, 71130x0000361f,0x00050050,0x00000007,0x00003626,
67550x00050051,0x00000027,0x00003113,0x00005ce2, 71140x00003620,0x00003625,0x0004007c,0x00000014,
67560x00000002,0x0004007c,0x00000006,0x00003207, 71150x00003616,0x00003626,0x00060041,0x0000016c,
67570x00003113,0x00050095,0x00000130,0x00003222, 71160x000035d3,0x00003616,0x0000016b,0x0000016b,
67580x00003153,0x0000310f,0x00050051,0x00000006, 71170x00050051,0x00000027,0x000035d5,0x000035ce,
67590x00003223,0x00003222,0x00000001,0x00050051, 71180x00000000,0x0004007c,0x00000006,0x0000362c,
67600x00000006,0x00003224,0x00003222,0x00000000, 71190x000035d5,0x000500c7,0x00000006,0x0000362e,
67610x00050080,0x00000006,0x00003229,0x0000315a, 71200x0000362c,0x00000241,0x000500ab,0x0000002f,
67620x00003223,0x00050050,0x00000007,0x0000322a, 71210x0000362f,0x0000362e,0x00000138,0x000300f7,
67630x00003224,0x00003229,0x0004007c,0x00000014, 71220x00003636,0x00000000,0x000400fa,0x0000362f,
67640x0000321a,0x0000322a,0x00060041,0x0000015f, 71230x00003630,0x00003633,0x000200f8,0x00003633,
67650x00003212,0x0000321a,0x0000015e,0x0000015e, 71240x000500c5,0x00000006,0x00003635,0x0000362c,
67660x0005003e,0x00003212,0x00003207,0x00000002, 71250x00000241,0x000200f9,0x00003636,0x000200f8,
67670x00000004,0x000300f7,0x0000326a,0x00000000, 71260x00003630,0x000400c8,0x00000006,0x00003632,
67680x000300fb,0x0000012b,0x00003239,0x000200f8, 71270x0000362c,0x000200f9,0x00003636,0x000200f8,
67690x00003239,0x000500bc,0x0000002f,0x00003271, 71280x00003636,0x000700f5,0x00000006,0x00005f0e,
67700x000030f0,0x00003105,0x000300f7,0x00003278, 71290x00003632,0x00003630,0x00003635,0x00003633,
67710x00000000,0x000400fa,0x00003271,0x00003272, 71300x000700ed,0x00000006,0x000035d7,0x000035d3,
67720x00003278,0x000200f8,0x00003272,0x000500bc, 71310x00000142,0x00000138,0x00005f0e,0x00060041,
67730x0000002f,0x00003277,0x000030f7,0x0000310c, 71320x0000016c,0x000035d9,0x00003616,0x0000016b,
67740x000200f9,0x00003278,0x000200f8,0x00003278, 71330x00000264,0x00050051,0x00000027,0x000035db,
67750x000700f5,0x0000002f,0x00003279,0x00003271, 71340x000035ce,0x00000001,0x0004007c,0x00000006,
67760x00003239,0x00003277,0x00003272,0x000300f7, 71350x0000363d,0x000035db,0x000500c7,0x00000006,
67770x00003280,0x00000000,0x000400fa,0x00003279, 71360x0000363f,0x0000363d,0x00000241,0x000500ab,
67780x0000327a,0x00003280,0x000200f8,0x0000327a, 71370x0000002f,0x00003640,0x0000363f,0x00000138,
67790x000500bc,0x0000002f,0x0000327f,0x000030fe, 71380x000300f7,0x00003647,0x00000000,0x000400fa,
67800x00003113,0x000200f9,0x00003280,0x000200f8, 71390x00003640,0x00003641,0x00003644,0x000200f8,
67810x00003280,0x000700f5,0x0000002f,0x00003281, 71400x00003644,0x000500c5,0x00000006,0x00003646,
67820x00003279,0x00003278,0x0000327f,0x0000327a, 71410x0000363d,0x00000241,0x000200f9,0x00003647,
67830x000400a8,0x0000002f,0x00003282,0x00003281, 71420x000200f8,0x00003641,0x000400c8,0x00000006,
67840x000300f7,0x0000323e,0x00000000,0x000400fa, 71430x00003643,0x0000363d,0x000200f9,0x00003647,
67850x00003282,0x0000323d,0x0000323e,0x000200f8, 71440x000200f8,0x00003647,0x000700f5,0x00000006,
67860x0000323d,0x000200f9,0x0000326a,0x000200f8, 71450x00005f0f,0x00003643,0x00003641,0x00003646,
67870x0000323e,0x00050081,0x00000063,0x00003241, 71460x00003644,0x000700ed,0x00000006,0x000035dd,
67880x00005ce4,0x00005ce2,0x0005008e,0x00000063, 71470x000035d9,0x00000142,0x00000138,0x00005f0f,
67890x00003242,0x00003241,0x000002c4,0x00050095, 71480x00060041,0x0000016c,0x000035df,0x00003616,
67900x00000130,0x00003292,0x00003153,0x0000012b, 71490x0000016b,0x00000315,0x00050051,0x00000027,
67910x00050051,0x00000006,0x00003293,0x00003292, 71500x000035e1,0x000035ce,0x00000002,0x0004007c,
67920x00000001,0x00050051,0x00000006,0x00003294, 71510x00000006,0x0000364e,0x000035e1,0x000500c7,
67930x00003292,0x00000000,0x00050080,0x00000006, 71520x00000006,0x00003650,0x0000364e,0x00000241,
67940x00003299,0x0000315a,0x00003293,0x00050050, 71530x000500ab,0x0000002f,0x00003651,0x00003650,
67950x00000007,0x0000329a,0x00003294,0x00003299, 71540x00000138,0x000300f7,0x00003658,0x00000000,
67960x0004007c,0x00000014,0x0000328a,0x0000329a, 71550x000400fa,0x00003651,0x00003652,0x00003655,
67970x00060041,0x0000015f,0x00003247,0x0000328a, 71560x000200f8,0x00003655,0x000500c5,0x00000006,
67980x0000015e,0x0000015e,0x00050051,0x00000027, 71570x00003657,0x0000364e,0x00000241,0x000200f9,
67990x00003249,0x00003242,0x00000000,0x0004007c, 71580x00003658,0x000200f8,0x00003652,0x000400c8,
68000x00000006,0x000032a0,0x00003249,0x000500c7, 71590x00000006,0x00003654,0x0000364e,0x000200f9,
68010x00000006,0x000032a2,0x000032a0,0x00000208, 71600x00003658,0x000200f8,0x00003658,0x000700f5,
68020x000500ab,0x0000002f,0x000032a3,0x000032a2, 71610x00000006,0x00005f10,0x00003654,0x00003652,
68030x0000012b,0x000300f7,0x000032aa,0x00000000, 71620x00003657,0x00003655,0x000700ed,0x00000006,
68040x000400fa,0x000032a3,0x000032a4,0x000032a7, 71630x000035e3,0x000035df,0x00000142,0x00000138,
68050x000200f8,0x000032a7,0x000500c5,0x00000006, 71640x00005f10,0x00060041,0x0000016c,0x000035e5,
68060x000032a9,0x000032a0,0x00000208,0x000200f9, 71650x00003616,0x0000016b,0x0000031d,0x000300f7,
68070x000032aa,0x000200f8,0x000032a4,0x000400c8, 71660x00003669,0x00000000,0x000400fa,0x0000362f,
68080x00000006,0x000032a6,0x000032a0,0x000200f9, 71670x00003663,0x00003666,0x000200f8,0x00003666,
68090x000032aa,0x000200f8,0x000032aa,0x000700f5, 71680x000500c5,0x00000006,0x00003668,0x0000362c,
68100x00000006,0x00005ade,0x000032a6,0x000032a4, 71690x00000241,0x000200f9,0x00003669,0x000200f8,
68110x000032a9,0x000032a7,0x000700ed,0x00000006, 71700x00003663,0x000400c8,0x00000006,0x00003665,
68120x0000324b,0x00003247,0x00000135,0x0000012b, 71710x0000362c,0x000200f9,0x00003669,0x000200f8,
68130x00005ade,0x00060041,0x0000015f,0x0000324d, 71720x00003669,0x000700f5,0x00000006,0x00005f11,
68140x0000328a,0x0000015e,0x0000022b,0x00050051, 71730x00003665,0x00003663,0x00003668,0x00003666,
68150x00000027,0x0000324f,0x00003242,0x00000001, 71740x000700ef,0x00000006,0x000035e9,0x000035e5,
68160x0004007c,0x00000006,0x000032b1,0x0000324f, 71750x00000142,0x00000138,0x00005f11,0x00060041,
68170x000500c7,0x00000006,0x000032b3,0x000032b1, 71760x0000016c,0x000035eb,0x00003616,0x0000016b,
68180x00000208,0x000500ab,0x0000002f,0x000032b4, 71770x00000325,0x000300f7,0x0000367a,0x00000000,
68190x000032b3,0x0000012b,0x000300f7,0x000032bb, 71780x000400fa,0x00003640,0x00003674,0x00003677,
68200x00000000,0x000400fa,0x000032b4,0x000032b5, 71790x000200f8,0x00003677,0x000500c5,0x00000006,
68210x000032b8,0x000200f8,0x000032b8,0x000500c5, 71800x00003679,0x0000363d,0x00000241,0x000200f9,
68220x00000006,0x000032ba,0x000032b1,0x00000208, 71810x0000367a,0x000200f8,0x00003674,0x000400c8,
68230x000200f9,0x000032bb,0x000200f8,0x000032b5, 71820x00000006,0x00003676,0x0000363d,0x000200f9,
68240x000400c8,0x00000006,0x000032b7,0x000032b1, 71830x0000367a,0x000200f8,0x0000367a,0x000700f5,
68250x000200f9,0x000032bb,0x000200f8,0x000032bb, 71840x00000006,0x00005f12,0x00003676,0x00003674,
68260x000700f5,0x00000006,0x00005adf,0x000032b7, 71850x00003679,0x00003677,0x000700ef,0x00000006,
68270x000032b5,0x000032ba,0x000032b8,0x000700ed, 71860x000035ef,0x000035eb,0x00000142,0x00000138,
68280x00000006,0x00003251,0x0000324d,0x00000135, 71870x00005f12,0x00060041,0x0000016c,0x000035f1,
68290x0000012b,0x00005adf,0x00060041,0x0000015f, 71880x00003616,0x0000016b,0x0000032d,0x000300f7,
68300x00003253,0x0000328a,0x0000015e,0x000002dc, 71890x0000368b,0x00000000,0x000400fa,0x00003651,
68310x00050051,0x00000027,0x00003255,0x00003242, 71900x00003685,0x00003688,0x000200f8,0x00003688,
68320x00000002,0x0004007c,0x00000006,0x000032c2, 71910x000500c5,0x00000006,0x0000368a,0x0000364e,
68330x00003255,0x000500c7,0x00000006,0x000032c4, 71920x00000241,0x000200f9,0x0000368b,0x000200f8,
68340x000032c2,0x00000208,0x000500ab,0x0000002f, 71930x00003685,0x000400c8,0x00000006,0x00003687,
68350x000032c5,0x000032c4,0x0000012b,0x000300f7, 71940x0000364e,0x000200f9,0x0000368b,0x000200f8,
68360x000032cc,0x00000000,0x000400fa,0x000032c5, 71950x0000368b,0x000700f5,0x00000006,0x00005f13,
68370x000032c6,0x000032c9,0x000200f8,0x000032c9, 71960x00003687,0x00003685,0x0000368a,0x00003688,
68380x000500c5,0x00000006,0x000032cb,0x000032c2, 71970x000700ef,0x00000006,0x000035f5,0x000035f1,
68390x00000208,0x000200f9,0x000032cc,0x000200f8, 71980x00000142,0x00000138,0x00005f13,0x000200f9,
68400x000032c6,0x000400c8,0x00000006,0x000032c8, 71990x000035f6,0x000200f8,0x000035f6,0x000200f9,
68410x000032c2,0x000200f9,0x000032cc,0x000200f8, 72000x000013c7,0x000200f8,0x000013c7,0x000200f9,
68420x000032cc,0x000700f5,0x00000006,0x00005ae0, 72010x000013be,0x000200f8,0x000013bd,0x000200f9,
68430x000032c8,0x000032c6,0x000032cb,0x000032c9, 72020x00002608,0x000200f8,0x00002608,0x000700f5,
68440x000700ed,0x00000006,0x00003257,0x00003253, 72030x00000006,0x00005f20,0x00000138,0x000013bd,
68450x00000135,0x0000012b,0x00005ae0,0x00060041, 72040x00002618,0x00002616,0x000500b0,0x0000002f,
68460x0000015f,0x00003259,0x0000328a,0x0000015e, 72050x0000260b,0x00005f20,0x00000470,0x000400f6,
68470x000002e4,0x000300f7,0x000032dd,0x00000000, 72060x00002619,0x00002616,0x00000000,0x000400fa,
68480x000400fa,0x000032a3,0x000032d7,0x000032da, 72070x0000260b,0x0000260c,0x00002619,0x000200f8,
68490x000200f8,0x000032da,0x000500c5,0x00000006, 72080x0000260c,0x00050084,0x00000006,0x0000260f,
68500x000032dc,0x000032a0,0x00000208,0x000200f9, 72090x00000470,0x000012dd,0x00050080,0x00000006,
68510x000032dd,0x000200f8,0x000032d7,0x000400c8, 72100x00002611,0x0000260f,0x00005f20,0x000300f7,
68520x00000006,0x000032d9,0x000032a0,0x000200f9, 72110x000026d4,0x00000000,0x000300fb,0x00000138,
68530x000032dd,0x000200f8,0x000032dd,0x000700f5, 72120x000026b2,0x000200f8,0x000026b2,0x00050041,
68540x00000006,0x00005ae1,0x000032d9,0x000032d7, 72130x000001bb,0x000026b3,0x000001b9,0x00000434,
68550x000032dc,0x000032da,0x000700ef,0x00000006, 72140x0004003d,0x00000006,0x000026b4,0x000026b3,
68560x0000325d,0x00003259,0x00000135,0x0000012b, 72150x000500aa,0x0000002f,0x000026b5,0x000026b4,
68570x00005ae1,0x00060041,0x0000015f,0x0000325f, 72160x00000138,0x000300f7,0x000026b8,0x00000000,
68580x0000328a,0x0000015e,0x000002ec,0x000300f7, 72170x000400fa,0x000026b5,0x000026b6,0x000026b8,
68590x000032ee,0x00000000,0x000400fa,0x000032b4, 72180x000200f8,0x000026b6,0x000200f9,0x000026d4,
68600x000032e8,0x000032eb,0x000200f8,0x000032eb, 72190x000200f8,0x000026b8,0x000500aa,0x0000002f,
68610x000500c5,0x00000006,0x000032ed,0x000032b1, 72200x000026bb,0x000026b4,0x00000280,0x000300f7,
68620x00000208,0x000200f9,0x000032ee,0x000200f8, 72210x000026c2,0x00000000,0x000400fa,0x000026bb,
68630x000032e8,0x000400c8,0x00000006,0x000032ea, 72220x000026bc,0x000026c2,0x000200f8,0x000026bc,
68640x000032b1,0x000200f9,0x000032ee,0x000200f8, 72230x00050084,0x00000006,0x000026be,0x000000ec,
68650x000032ee,0x000700f5,0x00000006,0x00005ae2, 72240x00002611,0x00050041,0x00000266,0x000026bf,
68660x000032ea,0x000032e8,0x000032ed,0x000032eb, 72250x000001b9,0x0000031d,0x0004003d,0x00000007,
68670x000700ef,0x00000006,0x00003263,0x0000325f, 72260x000026c0,0x000026bf,0x00050051,0x00000006,
68680x00000135,0x0000012b,0x00005ae2,0x00060041, 72270x000026ec,0x000026c0,0x00000000,0x00050095,
68690x0000015f,0x00003265,0x0000328a,0x0000015e, 72280x0000013d,0x000026ee,0x000026ec,0x000026be,
68700x000002f4,0x000300f7,0x000032ff,0x00000000, 72290x00050051,0x00000006,0x000026ef,0x000026ee,
68710x000400fa,0x000032c5,0x000032f9,0x000032fc, 72300x00000001,0x00050051,0x00000006,0x000026f0,
68720x000200f8,0x000032fc,0x000500c5,0x00000006, 72310x000026ee,0x00000000,0x00050051,0x00000006,
68730x000032fe,0x000032c2,0x00000208,0x000200f9, 72320x000026f3,0x000026c0,0x00000001,0x00050080,
68740x000032ff,0x000200f8,0x000032f9,0x000400c8, 72330x00000006,0x000026f5,0x000026f3,0x000026ef,
68750x00000006,0x000032fb,0x000032c2,0x000200f9, 72340x00050050,0x00000007,0x000026f6,0x000026f0,
68760x000032ff,0x000200f8,0x000032ff,0x000700f5, 72350x000026f5,0x0004007c,0x00000014,0x000026e6,
68770x00000006,0x00005ae3,0x000032fb,0x000032f9, 72360x000026f6,0x00060041,0x0000016c,0x000026dd,
68780x000032fe,0x000032fc,0x000700ef,0x00000006, 72370x000026e6,0x0000016b,0x0000016b,0x0006003d,
68790x00003269,0x00003265,0x00000135,0x0000012b, 72380x00000006,0x000026de,0x000026dd,0x00000002,
68800x00005ae3,0x000200f9,0x0000326a,0x000200f8, 72390x00000004,0x000200f9,0x000026d4,0x000200f8,
68810x0000326a,0x000200f9,0x000012c8,0x000200f8, 72400x000026c2,0x000500c2,0x00000006,0x000026c4,
68820x000012c8,0x000200f9,0x000012bf,0x000200f8, 72410x00002611,0x00000264,0x00050084,0x00000006,
68830x000012be,0x000200f9,0x00002504,0x000200f8, 72420x000026c5,0x000000ec,0x000026c4,0x00050041,
68840x00002504,0x000700f5,0x00000006,0x00005af0, 72430x00000266,0x000026c6,0x000001b9,0x0000031d,
68850x0000012b,0x000012be,0x00002514,0x00002512, 72440x0004003d,0x00000007,0x000026c7,0x000026c6,
68860x000500b0,0x0000002f,0x00002507,0x00005af0, 72450x00050051,0x00000006,0x0000270d,0x000026c7,
68870x00000437,0x000400f6,0x00002515,0x00002512, 72460x00000000,0x00050095,0x0000013d,0x0000270f,
68880x00000000,0x000400fa,0x00002507,0x00002508, 72470x0000270d,0x000026c5,0x00050051,0x00000006,
68890x00002515,0x000200f8,0x00002508,0x00050084, 72480x00002710,0x0000270f,0x00000001,0x00050051,
68900x00000006,0x0000250b,0x00000437,0x000011de, 72490x00000006,0x00002711,0x0000270f,0x00000000,
68910x00050080,0x00000006,0x0000250d,0x0000250b, 72500x00050051,0x00000006,0x00002714,0x000026c7,
68920x00005af0,0x000300f7,0x000025d0,0x00000000, 72510x00000001,0x00050080,0x00000006,0x00002716,
68930x000300fb,0x0000012b,0x000025ae,0x000200f8, 72520x00002714,0x00002710,0x00050050,0x00000007,
68940x000025ae,0x00050041,0x00000182,0x000025af, 72530x00002717,0x00002711,0x00002716,0x0004007c,
68950x00000180,0x000003fb,0x0004003d,0x00000006, 72540x00000014,0x00002707,0x00002717,0x00060041,
68960x000025b0,0x000025af,0x000500aa,0x0000002f, 72550x0000016c,0x000026fe,0x00002707,0x0000016b,
68970x000025b1,0x000025b0,0x0000012b,0x000300f7, 72560x0000016b,0x0006003d,0x00000006,0x000026ff,
68980x000025b4,0x00000000,0x000400fa,0x000025b1, 72570x000026fe,0x00000002,0x00000004,0x000500c7,
68990x000025b2,0x000025b4,0x000200f8,0x000025b2, 72580x00000006,0x000026ca,0x00002611,0x00000142,
69000x000200f9,0x000025d0,0x000200f8,0x000025b4, 72590x000500ab,0x0000002f,0x000026cb,0x000026ca,
69010x000500aa,0x0000002f,0x000025b7,0x000025b0, 72600x00000138,0x000300f7,0x000026d2,0x00000000,
69020x00000247,0x000300f7,0x000025be,0x00000000, 72610x000400fa,0x000026cb,0x000026cc,0x000026cf,
69030x000400fa,0x000025b7,0x000025b8,0x000025be, 72620x000200f8,0x000026cf,0x000500c7,0x00000006,
69040x000200f8,0x000025b8,0x00050084,0x00000006, 72630x000026d1,0x000026ff,0x0000045c,0x000200f9,
69050x000025ba,0x000000df,0x0000250d,0x00050041, 72640x000026d2,0x000200f8,0x000026cc,0x000500c2,
69060x0000022d,0x000025bb,0x00000180,0x000002e4, 72650x00000006,0x000026ce,0x000026ff,0x0000035a,
69070x0004003d,0x00000007,0x000025bc,0x000025bb, 72660x000200f9,0x000026d2,0x000200f8,0x000026d2,
69080x00050051,0x00000006,0x000025e8,0x000025bc, 72670x000700f5,0x00000006,0x00005f2a,0x000026ce,
69090x00000000,0x00050095,0x00000130,0x000025ea, 72680x000026cc,0x000026d1,0x000026cf,0x000200f9,
69100x000025e8,0x000025ba,0x00050051,0x00000006, 72690x000026d4,0x000200f8,0x000026d4,0x000900f5,
69110x000025eb,0x000025ea,0x00000001,0x00050051, 72700x00000006,0x00005f2b,0x00002611,0x000026b6,
69120x00000006,0x000025ec,0x000025ea,0x00000000, 72710x000026de,0x000026bc,0x00005f2a,0x000026d2,
69130x00050051,0x00000006,0x000025ef,0x000025bc, 72720x00050041,0x000001bb,0x00002728,0x000001b9,
69140x00000001,0x00050080,0x00000006,0x000025f1, 72730x00000206,0x0004003d,0x00000006,0x00002729,
69150x000025ef,0x000025eb,0x00050050,0x00000007, 72740x00002728,0x00050084,0x00000006,0x0000272a,
69160x000025f2,0x000025ec,0x000025f1,0x0004007c, 72750x00005f2b,0x00002729,0x00050041,0x00000266,
69170x00000014,0x000025e2,0x000025f2,0x00060041, 72760x0000272b,0x000001b9,0x00000315,0x0004003d,
69180x0000015f,0x000025d9,0x000025e2,0x0000015e, 72770x00000007,0x0000272c,0x0000272b,0x00050051,
69190x0000015e,0x0006003d,0x00000006,0x000025da, 72780x00000006,0x00002747,0x0000272c,0x00000000,
69200x000025d9,0x00000002,0x00000004,0x000200f9, 72790x00050095,0x0000013d,0x00002749,0x00002747,
69210x000025d0,0x000200f8,0x000025be,0x000500c2, 72800x0000272a,0x00050051,0x00000006,0x0000274a,
69220x00000006,0x000025c0,0x0000250d,0x0000022b, 72810x00002749,0x00000001,0x00050051,0x00000006,
69230x00050084,0x00000006,0x000025c1,0x000000df, 72820x0000274b,0x00002749,0x00000000,0x00050051,
69240x000025c0,0x00050041,0x0000022d,0x000025c2, 72830x00000006,0x0000274e,0x0000272c,0x00000001,
69250x00000180,0x000002e4,0x0004003d,0x00000007, 72840x00050080,0x00000006,0x00002750,0x0000274e,
69260x000025c3,0x000025c2,0x00050051,0x00000006, 72850x0000274a,0x00050095,0x0000013d,0x0000276a,
69270x00002609,0x000025c3,0x00000000,0x00050095, 72860x0000274b,0x00000138,0x00050051,0x00000006,
69280x00000130,0x0000260b,0x00002609,0x000025c1, 72870x0000276b,0x0000276a,0x00000001,0x00050051,
69290x00050051,0x00000006,0x0000260c,0x0000260b, 72880x00000006,0x0000276c,0x0000276a,0x00000000,
69300x00000001,0x00050051,0x00000006,0x0000260d, 72890x00050080,0x00000006,0x00002771,0x00002750,
69310x0000260b,0x00000000,0x00050051,0x00000006, 72900x0000276b,0x00050050,0x00000007,0x00002772,
69320x00002610,0x000025c3,0x00000001,0x00050080, 72910x0000276c,0x00002771,0x0004007c,0x00000014,
69330x00000006,0x00002612,0x00002610,0x0000260c, 72920x00002762,0x00002772,0x00060041,0x0000016c,
69340x00050050,0x00000007,0x00002613,0x0000260d, 72930x00002759,0x00002762,0x0000016b,0x0000016b,
69350x00002612,0x0004007c,0x00000014,0x00002603, 72940x0006003d,0x00000006,0x0000275a,0x00002759,
69360x00002613,0x00060041,0x0000015f,0x000025fa, 72950x00000002,0x00000004,0x0004007c,0x00000027,
69370x00002603,0x0000015e,0x0000015e,0x0006003d, 72960x00002730,0x0000275a,0x00050095,0x0000013d,
69380x00000006,0x000025fb,0x000025fa,0x00000002, 72970x0000278b,0x0000274b,0x000000ec,0x00050051,
69390x00000004,0x000500c7,0x00000006,0x000025c6, 72980x00000006,0x0000278c,0x0000278b,0x00000001,
69400x0000250d,0x00000135,0x000500ab,0x0000002f, 72990x00050051,0x00000006,0x0000278d,0x0000278b,
69410x000025c7,0x000025c6,0x0000012b,0x000300f7, 73000x00000000,0x00050080,0x00000006,0x00002792,
69420x000025ce,0x00000000,0x000400fa,0x000025c7, 73010x00002750,0x0000278c,0x00050050,0x00000007,
69430x000025c8,0x000025cb,0x000200f8,0x000025cb, 73020x00002793,0x0000278d,0x00002792,0x0004007c,
69440x000500c7,0x00000006,0x000025cd,0x000025fb, 73030x00000014,0x00002783,0x00002793,0x00060041,
69450x00000423,0x000200f9,0x000025ce,0x000200f8, 73040x0000016c,0x0000277a,0x00002783,0x0000016b,
69460x000025c8,0x000500c2,0x00000006,0x000025ca, 73050x0000016b,0x0006003d,0x00000006,0x0000277b,
69470x000025fb,0x00000321,0x000200f9,0x000025ce, 73060x0000277a,0x00000002,0x00000004,0x0004007c,
69480x000200f8,0x000025ce,0x000700f5,0x00000006, 73070x00000027,0x00002733,0x0000277b,0x00050041,
69490x00005afa,0x000025ca,0x000025c8,0x000025cd, 73080x000001bb,0x00002734,0x000001b9,0x000003b6,
69500x000025cb,0x000200f9,0x000025d0,0x000200f8, 73090x0004003d,0x00000006,0x00002735,0x00002734,
69510x000025d0,0x000900f5,0x00000006,0x00005afb, 73100x000500aa,0x0000002f,0x00002736,0x00002735,
69520x0000250d,0x000025b2,0x000025da,0x000025b8, 73110x00000142,0x000300f7,0x0000273c,0x00000000,
69530x00005afa,0x000025ce,0x00050041,0x00000182, 73120x000400fa,0x00002736,0x00002737,0x00002738,
69540x00002624,0x00000180,0x000001cd,0x0004003d, 73130x000200f8,0x00002738,0x00050095,0x0000013d,
69550x00000006,0x00002625,0x00002624,0x00050084, 73140x000027ac,0x0000274b,0x000001cd,0x00050051,
69560x00000006,0x00002626,0x00005afb,0x00002625, 73150x00000006,0x000027ad,0x000027ac,0x00000001,
69570x00050041,0x0000022d,0x00002627,0x00000180, 73160x00050051,0x00000006,0x000027ae,0x000027ac,
69580x000002dc,0x0004003d,0x00000007,0x00002628, 73170x00000000,0x00050080,0x00000006,0x000027b3,
69590x00002627,0x00050051,0x00000006,0x00002643, 73180x00002750,0x000027ad,0x00050050,0x00000007,
69600x00002628,0x00000000,0x00050095,0x00000130, 73190x000027b4,0x000027ae,0x000027b3,0x0004007c,
69610x00002645,0x00002643,0x00002626,0x00050051, 73200x00000014,0x000027a4,0x000027b4,0x00060041,
69620x00000006,0x00002646,0x00002645,0x00000001, 73210x0000016c,0x0000279b,0x000027a4,0x0000016b,
69630x00050051,0x00000006,0x00002647,0x00002645, 73220x0000016b,0x0006003d,0x00000006,0x0000279c,
69640x00000000,0x00050051,0x00000006,0x0000264a, 73230x0000279b,0x00000002,0x00000004,0x0004007c,
69650x00002628,0x00000001,0x00050080,0x00000006, 73240x00000027,0x0000273b,0x0000279c,0x000200f9,
69660x0000264c,0x0000264a,0x00002646,0x00050095, 73250x0000273c,0x000200f8,0x00002737,0x000200f9,
69670x00000130,0x00002666,0x00002647,0x0000012b, 73260x0000273c,0x000200f8,0x0000273c,0x000700f5,
69680x00050051,0x00000006,0x00002667,0x00002666, 73270x00000027,0x00005f2c,0x00000426,0x00002737,
69690x00000001,0x00050051,0x00000006,0x00002668, 73280x0000273b,0x00002738,0x00060050,0x0000006c,
69700x00002666,0x00000000,0x00050080,0x00000006, 73290x00002741,0x00002730,0x00002733,0x00005f2c,
69710x0000266d,0x0000264c,0x00002667,0x00050050, 73300x000300f7,0x000027fa,0x00000000,0x000300fb,
69720x00000007,0x0000266e,0x00002668,0x0000266d, 73310x00000138,0x000027c6,0x000200f8,0x000027c6,
69730x0004007c,0x00000014,0x0000265e,0x0000266e, 73320x00050041,0x00000266,0x000027c7,0x000001b9,
69740x00060041,0x0000015f,0x00002655,0x0000265e, 73330x00000325,0x0004003d,0x00000007,0x000027c8,
69750x0000015e,0x0000015e,0x0006003d,0x00000006, 73340x000027c7,0x00050051,0x00000006,0x000027ff,
69760x00002656,0x00002655,0x00000002,0x00000004, 73350x000027c8,0x00000000,0x000500aa,0x0000002f,
69770x0004007c,0x00000027,0x0000262c,0x00002656, 73360x00002800,0x000027ff,0x00000138,0x000300f7,
69780x00050095,0x00000130,0x00002687,0x00002647, 73370x00002805,0x00000000,0x000400fa,0x00002800,
69790x000000df,0x00050051,0x00000006,0x00002688, 73380x00002801,0x00002805,0x000200f8,0x00002801,
69800x00002687,0x00000001,0x00050051,0x00000006, 73390x00050051,0x00000006,0x00002803,0x000027c8,
69810x00002689,0x00002687,0x00000000,0x00050080, 73400x00000001,0x000500aa,0x0000002f,0x00002804,
69820x00000006,0x0000268e,0x0000264c,0x00002688, 73410x00002803,0x00000138,0x000200f9,0x00002805,
69830x00050050,0x00000007,0x0000268f,0x00002689, 73420x000200f8,0x00002805,0x000700f5,0x0000002f,
69840x0000268e,0x0004007c,0x00000014,0x0000267f, 73430x00002806,0x00002800,0x000027c6,0x00002804,
69850x0000268f,0x00060041,0x0000015f,0x00002676, 73440x00002801,0x000300f7,0x000027cc,0x00000000,
69860x0000267f,0x0000015e,0x0000015e,0x0006003d, 73450x000400fa,0x00002806,0x000027ca,0x000027cc,
69870x00000006,0x00002677,0x00002676,0x00000002, 73460x000200f8,0x000027ca,0x000200f9,0x000027fa,
69880x00000004,0x0004007c,0x00000027,0x0000262f, 73470x000200f8,0x000027cc,0x000200f9,0x000027cd,
69890x00002677,0x00050041,0x00000182,0x00002630, 73480x000200f8,0x000027cd,0x000700f5,0x00000006,
69900x00000180,0x0000037d,0x0004003d,0x00000006, 73490x00005f2d,0x00000138,0x000027cc,0x000027f7,
69910x00002631,0x00002630,0x000500aa,0x0000002f, 73500x000027d1,0x000500b0,0x0000002f,0x000027d0,
69920x00002632,0x00002631,0x00000135,0x000300f7, 73510x00005f2d,0x00000470,0x000400f6,0x000027f8,
69930x00002638,0x00000000,0x000400fa,0x00002632, 73520x000027d1,0x00000000,0x000400fa,0x000027d0,
69940x00002633,0x00002634,0x000200f8,0x00002634, 73530x000027d1,0x000027f8,0x000200f8,0x000027d1,
69950x00050095,0x00000130,0x000026a8,0x00002647, 73540x00050084,0x00000006,0x000027d3,0x000001db,
69960x00000194,0x00050051,0x00000006,0x000026a9, 73550x00005f2d,0x00050095,0x0000013d,0x0000281f,
69970x000026a8,0x00000001,0x00050051,0x00000006, 73560x000027ff,0x000027d3,0x00050051,0x00000006,
69980x000026aa,0x000026a8,0x00000000,0x00050080, 73570x00002820,0x0000281f,0x00000001,0x00050051,
69990x00000006,0x000026af,0x0000264c,0x000026a9, 73580x00000006,0x00002821,0x0000281f,0x00000000,
70000x00050050,0x00000007,0x000026b0,0x000026aa, 73590x00050051,0x00000006,0x00002824,0x000027c8,
70010x000026af,0x0004007c,0x00000014,0x000026a0, 73600x00000001,0x00050080,0x00000006,0x00002826,
70020x000026b0,0x00060041,0x0000015f,0x00002697, 73610x00002824,0x00002820,0x00050050,0x00000007,
70030x000026a0,0x0000015e,0x0000015e,0x0006003d, 73620x00002827,0x00002821,0x00002826,0x0004007c,
70040x00000006,0x00002698,0x00002697,0x00000002, 73630x00000014,0x00002817,0x00002827,0x00060041,
70050x00000004,0x0004007c,0x00000027,0x00002637, 73640x0000016c,0x0000280e,0x00002817,0x0000016b,
70060x00002698,0x000200f9,0x00002638,0x000200f8, 73650x0000016b,0x0006003d,0x00000006,0x0000280f,
70070x00002633,0x000200f9,0x00002638,0x000200f8, 73660x0000280e,0x00000002,0x00000004,0x0004007c,
70080x00002638,0x000700f5,0x00000027,0x00005afc, 73670x00000027,0x000027d8,0x0000280f,0x00050080,
70090x000003ed,0x00002633,0x00002637,0x00002634, 73680x00000006,0x000027da,0x000027d3,0x000000ec,
70100x00060050,0x00000063,0x0000263d,0x0000262c, 73690x00050095,0x0000013d,0x00002840,0x000027ff,
70110x0000262f,0x00005afc,0x000300f7,0x000026f6, 73700x000027da,0x00050051,0x00000006,0x00002841,
70120x00000000,0x000300fb,0x0000012b,0x000026c2, 73710x00002840,0x00000001,0x00050051,0x00000006,
70130x000200f8,0x000026c2,0x00050041,0x0000022d, 73720x00002842,0x00002840,0x00000000,0x00050080,
70140x000026c3,0x00000180,0x000002ec,0x0004003d, 73730x00000006,0x00002847,0x00002824,0x00002841,
70150x00000007,0x000026c4,0x000026c3,0x00050051, 73740x00050050,0x00000007,0x00002848,0x00002842,
70160x00000006,0x000026fb,0x000026c4,0x00000000, 73750x00002847,0x0004007c,0x00000014,0x00002838,
70170x000500aa,0x0000002f,0x000026fc,0x000026fb, 73760x00002848,0x00060041,0x0000016c,0x0000282f,
70180x0000012b,0x000300f7,0x00002701,0x00000000, 73770x00002838,0x0000016b,0x0000016b,0x0006003d,
70190x000400fa,0x000026fc,0x000026fd,0x00002701, 73780x00000006,0x00002830,0x0000282f,0x00000002,
70200x000200f8,0x000026fd,0x00050051,0x00000006, 73790x00000004,0x0004007c,0x00000027,0x000027de,
70210x000026ff,0x000026c4,0x00000001,0x000500aa, 73800x00002830,0x00050080,0x00000006,0x000027e0,
70220x0000002f,0x00002700,0x000026ff,0x0000012b, 73810x000027d3,0x000001cd,0x00050095,0x0000013d,
70230x000200f9,0x00002701,0x000200f8,0x00002701, 73820x00002861,0x000027ff,0x000027e0,0x00050051,
70240x000700f5,0x0000002f,0x00002702,0x000026fc, 73830x00000006,0x00002862,0x00002861,0x00000001,
70250x000026c2,0x00002700,0x000026fd,0x000300f7, 73840x00050051,0x00000006,0x00002863,0x00002861,
70260x000026c8,0x00000000,0x000400fa,0x00002702, 73850x00000000,0x00050080,0x00000006,0x00002868,
70270x000026c6,0x000026c8,0x000200f8,0x000026c6, 73860x00002824,0x00002862,0x00050050,0x00000007,
70280x000200f9,0x000026f6,0x000200f8,0x000026c8, 73870x00002869,0x00002863,0x00002868,0x0004007c,
70290x000200f9,0x000026c9,0x000200f8,0x000026c9, 73880x00000014,0x00002859,0x00002869,0x00060041,
70300x000700f5,0x00000006,0x00005afd,0x0000012b, 73890x0000016c,0x00002850,0x00002859,0x0000016b,
70310x000026c8,0x000026f3,0x000026cd,0x000500b0, 73900x0000016b,0x0006003d,0x00000006,0x00002851,
70320x0000002f,0x000026cc,0x00005afd,0x00000437, 73910x00002850,0x00000002,0x00000004,0x0004007c,
70330x000400f6,0x000026f4,0x000026cd,0x00000000, 73920x00000027,0x000027e4,0x00002851,0x00050080,
70340x000400fa,0x000026cc,0x000026cd,0x000026f4, 73930x00000006,0x000027e6,0x000027d3,0x000001d4,
70350x000200f8,0x000026cd,0x00050084,0x00000006, 73940x00050095,0x0000013d,0x00002882,0x000027ff,
70360x000026cf,0x000001a2,0x00005afd,0x00050095, 73950x000027e6,0x00050051,0x00000006,0x00002883,
70370x00000130,0x0000271b,0x000026fb,0x000026cf, 73960x00002882,0x00000001,0x00050051,0x00000006,
70380x00050051,0x00000006,0x0000271c,0x0000271b, 73970x00002884,0x00002882,0x00000000,0x00050080,
70390x00000001,0x00050051,0x00000006,0x0000271d, 73980x00000006,0x00002889,0x00002824,0x00002883,
70400x0000271b,0x00000000,0x00050051,0x00000006, 73990x00050050,0x00000007,0x0000288a,0x00002884,
70410x00002720,0x000026c4,0x00000001,0x00050080, 74000x00002889,0x0004007c,0x00000014,0x0000287a,
70420x00000006,0x00002722,0x00002720,0x0000271c, 74010x0000288a,0x00060041,0x0000016c,0x00002871,
70430x00050050,0x00000007,0x00002723,0x0000271d, 74020x0000287a,0x0000016b,0x0000016b,0x0006003d,
70440x00002722,0x0004007c,0x00000014,0x00002713, 74030x00000006,0x00002872,0x00002871,0x00000002,
70450x00002723,0x00060041,0x0000015f,0x0000270a, 74040x00000004,0x0004007c,0x00000027,0x000027ea,
70460x00002713,0x0000015e,0x0000015e,0x0006003d, 74050x00002872,0x00070050,0x00000475,0x000027eb,
70470x00000006,0x0000270b,0x0000270a,0x00000002, 74060x000027d8,0x000027de,0x000027e4,0x000027ea,
70480x00000004,0x0004007c,0x00000027,0x000026d4, 74070x0008004f,0x0000006c,0x000027ee,0x000027eb,
70490x0000270b,0x00050080,0x00000006,0x000026d6, 74080x000027eb,0x00000000,0x00000001,0x00000002,
70500x000026cf,0x000000df,0x00050095,0x00000130, 74090x00050094,0x00000027,0x000027f0,0x000027ee,
70510x0000273c,0x000026fb,0x000026d6,0x00050051, 74100x00002741,0x00050081,0x00000027,0x000027f3,
70520x00000006,0x0000273d,0x0000273c,0x00000001, 74110x000027f0,0x000027ea,0x00050041,0x00000028,
70530x00050051,0x00000006,0x0000273e,0x0000273c, 74120x000027f4,0x000027c3,0x00005f2d,0x0003003e,
70540x00000000,0x00050080,0x00000006,0x00002743, 74130x000027f4,0x000027f3,0x00050080,0x00000006,
70550x00002720,0x0000273d,0x00050050,0x00000007, 74140x000027f7,0x00005f2d,0x00000264,0x000200f9,
70560x00002744,0x0000273e,0x00002743,0x0004007c, 74150x000027cd,0x000200f8,0x000027f8,0x0004003d,
70570x00000014,0x00002734,0x00002744,0x00060041, 74160x0000006c,0x000027f9,0x000027c3,0x000200f9,
70580x0000015f,0x0000272b,0x00002734,0x0000015e, 74170x000027fa,0x000200f8,0x000027fa,0x000700f5,
70590x0000015e,0x0006003d,0x00000006,0x0000272c, 74180x0000006c,0x00005f2e,0x00002741,0x000027ca,
70600x0000272b,0x00000002,0x00000004,0x0004007c, 74190x000027f9,0x000027f8,0x00050041,0x0000006d,
70610x00000027,0x000026da,0x0000272c,0x00050080, 74200x00002615,0x000025da,0x00005f20,0x0003003e,
70620x00000006,0x000026dc,0x000026cf,0x00000194, 74210x00002615,0x00005f2e,0x000200f9,0x00002616,
70630x00050095,0x00000130,0x0000275d,0x000026fb, 74220x000200f8,0x00002616,0x00050080,0x00000006,
70640x000026dc,0x00050051,0x00000006,0x0000275e, 74230x00002618,0x00005f20,0x00000264,0x000200f9,
70650x0000275d,0x00000001,0x00050051,0x00000006, 74240x00002608,0x000200f8,0x00002619,0x00050041,
70660x0000275f,0x0000275d,0x00000000,0x00050080, 74250x000001bb,0x0000261a,0x000001b9,0x000004c1,
70670x00000006,0x00002764,0x00002720,0x0000275e, 74260x0004003d,0x00000006,0x0000261b,0x0000261a,
70680x00050050,0x00000007,0x00002765,0x0000275f, 74270x00050080,0x00000006,0x0000261d,0x0000261b,
70690x00002764,0x0004007c,0x00000014,0x00002755, 74280x000012dd,0x00050041,0x000001bb,0x0000261e,
70700x00002765,0x00060041,0x0000015f,0x0000274c, 74290x000001b9,0x0000034a,0x0004003d,0x00000006,
70710x00002755,0x0000015e,0x0000015e,0x0006003d, 74300x0000261f,0x0000261e,0x00050084,0x00000006,
70720x00000006,0x0000274d,0x0000274c,0x00000002, 74310x00002621,0x000001c4,0x0000261d,0x00050080,
70730x00000004,0x0004007c,0x00000027,0x000026e0, 74320x00000006,0x00002622,0x0000261f,0x00002621,
70740x0000274d,0x00050080,0x00000006,0x000026e2, 74330x000200f9,0x00002623,0x000200f8,0x00002623,
70750x000026cf,0x0000019b,0x00050095,0x00000130, 74340x000700f5,0x00000006,0x00005f21,0x00000138,
70760x0000277e,0x000026fb,0x000026e2,0x00050051, 74350x00002619,0x0000264a,0x00002627,0x000500b0,
70770x00000006,0x0000277f,0x0000277e,0x00000001, 74360x0000002f,0x00002626,0x00005f21,0x00000470,
70780x00050051,0x00000006,0x00002780,0x0000277e, 74370x000400f6,0x0000264b,0x00002627,0x00000000,
70790x00000000,0x00050080,0x00000006,0x00002785, 74380x000400fa,0x00002626,0x00002627,0x0000264b,
70800x00002720,0x0000277f,0x00050050,0x00000007, 74390x000200f8,0x00002627,0x00050084,0x00000006,
70810x00002786,0x00002780,0x00002785,0x0004007c, 74400x0000262a,0x000001d4,0x00005f21,0x00050080,
70820x00000014,0x00002776,0x00002786,0x00060041, 74410x00000006,0x0000262b,0x00002622,0x0000262a,
70830x0000015f,0x0000276d,0x00002776,0x0000015e, 74420x00050041,0x00000266,0x0000262d,0x000001b9,
70840x0000015e,0x0006003d,0x00000006,0x0000276e, 74430x0000016b,0x0004003d,0x00000007,0x0000262e,
70850x0000276d,0x00000002,0x00000004,0x0004007c, 74440x0000262d,0x00060041,0x00000028,0x0000262f,
70860x00000027,0x000026e6,0x0000276e,0x00070050, 74450x000025da,0x00005f21,0x00000138,0x0004003d,
70870x0000043c,0x000026e7,0x000026d4,0x000026da, 74460x00000027,0x00002630,0x0000262f,0x0004007c,
70880x000026e0,0x000026e6,0x0008004f,0x00000063, 74470x00000006,0x00002890,0x00002630,0x00050051,
70890x000026ea,0x000026e7,0x000026e7,0x00000000, 74480x00000006,0x000028a9,0x0000262e,0x00000000,
70900x00000001,0x00000002,0x00050094,0x00000027, 74490x00050095,0x0000013d,0x000028ab,0x000028a9,
70910x000026ec,0x000026ea,0x0000263d,0x00050081, 74500x0000262b,0x00050051,0x00000006,0x000028ac,
70920x00000027,0x000026ef,0x000026ec,0x000026e6, 74510x000028ab,0x00000001,0x00050051,0x00000006,
70930x00050041,0x00000028,0x000026f0,0x000026bf, 74520x000028ad,0x000028ab,0x00000000,0x00050051,
70940x00005afd,0x0003003e,0x000026f0,0x000026ef, 74530x00000006,0x000028b0,0x0000262e,0x00000001,
70950x00050080,0x00000006,0x000026f3,0x00005afd, 74540x00050080,0x00000006,0x000028b2,0x000028b0,
70960x0000022b,0x000200f9,0x000026c9,0x000200f8, 74550x000028ac,0x00050050,0x00000007,0x000028b3,
70970x000026f4,0x0004003d,0x00000063,0x000026f5, 74560x000028ad,0x000028b2,0x0004007c,0x00000014,
70980x000026bf,0x000200f9,0x000026f6,0x000200f8, 74570x000028a3,0x000028b3,0x00060041,0x0000016c,
70990x000026f6,0x000700f5,0x00000063,0x00005afe, 74580x0000289b,0x000028a3,0x0000016b,0x0000016b,
71000x0000263d,0x000026c6,0x000026f5,0x000026f4, 74590x0005003e,0x0000289b,0x00002890,0x00000002,
71010x00050041,0x00000064,0x00002511,0x000024d6, 74600x00000004,0x00050080,0x00000006,0x00002636,
71020x00005af0,0x0003003e,0x00002511,0x00005afe, 74610x0000262b,0x000000ec,0x00060041,0x00000028,
71030x000200f9,0x00002512,0x000200f8,0x00002512, 74620x0000263a,0x000025da,0x00005f21,0x00000142,
71040x00050080,0x00000006,0x00002514,0x00005af0, 74630x0004003d,0x00000027,0x0000263b,0x0000263a,
71050x0000022b,0x000200f9,0x00002504,0x000200f8, 74640x0004007c,0x00000006,0x000028b9,0x0000263b,
71060x00002515,0x00050041,0x00000182,0x00002516, 74650x00050095,0x0000013d,0x000028d4,0x000028a9,
71070x00000180,0x00000488,0x0004003d,0x00000006, 74660x00002636,0x00050051,0x00000006,0x000028d5,
71080x00002517,0x00002516,0x00050080,0x00000006, 74670x000028d4,0x00000001,0x00050051,0x00000006,
71090x00002519,0x00002517,0x000011de,0x00050041, 74680x000028d6,0x000028d4,0x00000000,0x00050080,
71100x00000182,0x0000251a,0x00000180,0x00000311, 74690x00000006,0x000028db,0x000028b0,0x000028d5,
71110x0004003d,0x00000006,0x0000251b,0x0000251a, 74700x00050050,0x00000007,0x000028dc,0x000028d6,
71120x00050084,0x00000006,0x0000251d,0x0000018b, 74710x000028db,0x0004007c,0x00000014,0x000028cc,
71130x00002519,0x00050080,0x00000006,0x0000251e, 74720x000028dc,0x00060041,0x0000016c,0x000028c4,
71140x0000251b,0x0000251d,0x000200f9,0x0000251f, 74730x000028cc,0x0000016b,0x0000016b,0x0005003e,
71150x000200f8,0x0000251f,0x000700f5,0x00000006, 74740x000028c4,0x000028b9,0x00000002,0x00000004,
71160x00005af1,0x0000012b,0x00002515,0x00002546, 74750x00050080,0x00000006,0x00002641,0x0000262b,
71170x00002523,0x000500b0,0x0000002f,0x00002522, 74760x000001cd,0x00060041,0x00000028,0x00002645,
71180x00005af1,0x00000437,0x000400f6,0x00002547, 74770x000025da,0x00005f21,0x00000280,0x0004003d,
71190x00002523,0x00000000,0x000400fa,0x00002522, 74780x00000027,0x00002646,0x00002645,0x0004007c,
71200x00002523,0x00002547,0x000200f8,0x00002523, 74790x00000006,0x000028e2,0x00002646,0x00050095,
71210x00050084,0x00000006,0x00002526,0x0000019b, 74800x0000013d,0x000028fd,0x000028a9,0x00002641,
71220x00005af1,0x00050080,0x00000006,0x00002527, 74810x00050051,0x00000006,0x000028fe,0x000028fd,
71230x0000251e,0x00002526,0x00050041,0x0000022d, 74820x00000001,0x00050051,0x00000006,0x000028ff,
71240x00002529,0x00000180,0x0000015e,0x0004003d, 74830x000028fd,0x00000000,0x00050080,0x00000006,
71250x00000007,0x0000252a,0x00002529,0x00060041, 74840x00002904,0x000028b0,0x000028fe,0x00050050,
71260x00000028,0x0000252b,0x000024d6,0x00005af1, 74850x00000007,0x00002905,0x000028ff,0x00002904,
71270x0000012b,0x0004003d,0x00000027,0x0000252c, 74860x0004007c,0x00000014,0x000028f5,0x00002905,
71280x0000252b,0x0004007c,0x00000006,0x0000278c, 74870x00060041,0x0000016c,0x000028ed,0x000028f5,
71290x0000252c,0x00050051,0x00000006,0x000027a5, 74880x0000016b,0x0000016b,0x0005003e,0x000028ed,
71300x0000252a,0x00000000,0x00050095,0x00000130, 74890x000028e2,0x00000002,0x00000004,0x00050080,
71310x000027a7,0x000027a5,0x00002527,0x00050051, 74900x00000006,0x0000264a,0x00005f21,0x00000264,
71320x00000006,0x000027a8,0x000027a7,0x00000001, 74910x000200f9,0x00002623,0x000200f8,0x0000264b,
71330x00050051,0x00000006,0x000027a9,0x000027a7, 74920x00050080,0x00000006,0x0000264d,0x00002622,
71340x00000000,0x00050051,0x00000006,0x000027ac, 74930x00000500,0x00050041,0x00000266,0x0000264e,
71350x0000252a,0x00000001,0x00050080,0x00000006, 74940x000001b9,0x0000016b,0x0004003d,0x00000007,
71360x000027ae,0x000027ac,0x000027a8,0x00050050, 74950x0000264f,0x0000264e,0x00060041,0x00000028,
71370x00000007,0x000027af,0x000027a9,0x000027ae, 74960x00002650,0x000025da,0x00000315,0x00000138,
71380x0004007c,0x00000014,0x0000279f,0x000027af, 74970x0004003d,0x00000027,0x00002651,0x00002650,
71390x00060041,0x0000015f,0x00002797,0x0000279f, 74980x0004007c,0x00000006,0x0000290b,0x00002651,
71400x0000015e,0x0000015e,0x0005003e,0x00002797, 74990x00050051,0x00000006,0x00002924,0x0000264f,
71410x0000278c,0x00000002,0x00000004,0x00050080, 75000x00000000,0x00050095,0x0000013d,0x00002926,
71420x00000006,0x00002532,0x00002527,0x000000df, 75010x00002924,0x0000264d,0x00050051,0x00000006,
71430x00060041,0x00000028,0x00002536,0x000024d6, 75020x00002927,0x00002926,0x00000001,0x00050051,
71440x00005af1,0x00000135,0x0004003d,0x00000027, 75030x00000006,0x00002928,0x00002926,0x00000000,
71450x00002537,0x00002536,0x0004007c,0x00000006, 75040x00050051,0x00000006,0x0000292b,0x0000264f,
71460x000027b5,0x00002537,0x00050095,0x00000130, 75050x00000001,0x00050080,0x00000006,0x0000292d,
71470x000027d0,0x000027a5,0x00002532,0x00050051, 75060x0000292b,0x00002927,0x00050050,0x00000007,
71480x00000006,0x000027d1,0x000027d0,0x00000001, 75070x0000292e,0x00002928,0x0000292d,0x0004007c,
71490x00050051,0x00000006,0x000027d2,0x000027d0, 75080x00000014,0x0000291e,0x0000292e,0x00060041,
71500x00000000,0x00050080,0x00000006,0x000027d7, 75090x0000016c,0x00002916,0x0000291e,0x0000016b,
71510x000027ac,0x000027d1,0x00050050,0x00000007, 75100x0000016b,0x0005003e,0x00002916,0x0000290b,
71520x000027d8,0x000027d2,0x000027d7,0x0004007c,
71530x00000014,0x000027c8,0x000027d8,0x00060041,
71540x0000015f,0x000027c0,0x000027c8,0x0000015e,
71550x0000015e,0x0005003e,0x000027c0,0x000027b5,
71560x00000002,0x00000004,0x00050080,0x00000006, 75110x00000002,0x00000004,0x00050080,0x00000006,
71570x0000253d,0x00002527,0x00000194,0x00060041, 75120x00002654,0x00002622,0x0000050b,0x00060041,
71580x00000028,0x00002541,0x000024d6,0x00005af1, 75130x00000028,0x00002657,0x000025da,0x00000315,
71590x00000247,0x0004003d,0x00000027,0x00002542, 75140x00000142,0x0004003d,0x00000027,0x00002658,
71600x00002541,0x0004007c,0x00000006,0x000027de, 75150x00002657,0x0004007c,0x00000006,0x00002934,
71610x00002542,0x00050095,0x00000130,0x000027f9, 75160x00002658,0x00050095,0x0000013d,0x0000294f,
71620x000027a5,0x0000253d,0x00050051,0x00000006, 75170x00002924,0x00002654,0x00050051,0x00000006,
71630x000027fa,0x000027f9,0x00000001,0x00050051, 75180x00002950,0x0000294f,0x00000001,0x00050051,
71640x00000006,0x000027fb,0x000027f9,0x00000000, 75190x00000006,0x00002951,0x0000294f,0x00000000,
71650x00050080,0x00000006,0x00002800,0x000027ac, 75200x00050080,0x00000006,0x00002956,0x0000292b,
71660x000027fa,0x00050050,0x00000007,0x00002801, 75210x00002950,0x00050050,0x00000007,0x00002957,
71670x000027fb,0x00002800,0x0004007c,0x00000014, 75220x00002951,0x00002956,0x0004007c,0x00000014,
71680x000027f1,0x00002801,0x00060041,0x0000015f, 75230x00002947,0x00002957,0x00060041,0x0000016c,
71690x000027e9,0x000027f1,0x0000015e,0x0000015e, 75240x0000293f,0x00002947,0x0000016b,0x0000016b,
71700x0005003e,0x000027e9,0x000027de,0x00000002, 75250x0005003e,0x0000293f,0x00002934,0x00000002,
71710x00000004,0x00050080,0x00000006,0x00002546, 75260x00000004,0x00050080,0x00000006,0x0000265b,
71720x00005af1,0x0000022b,0x000200f9,0x0000251f, 75270x00002622,0x00000516,0x00060041,0x00000028,
71730x000200f8,0x00002547,0x00050080,0x00000006, 75280x0000265e,0x000025da,0x00000315,0x00000280,
71740x00002549,0x0000251e,0x000004c7,0x00050041, 75290x0004003d,0x00000027,0x0000265f,0x0000265e,
71750x0000022d,0x0000254a,0x00000180,0x0000015e, 75300x0004007c,0x00000006,0x0000295d,0x0000265f,
71760x0004003d,0x00000007,0x0000254b,0x0000254a, 75310x00050095,0x0000013d,0x00002978,0x00002924,
71770x00060041,0x00000028,0x0000254c,0x000024d6, 75320x0000265b,0x00050051,0x00000006,0x00002979,
71780x000002dc,0x0000012b,0x0004003d,0x00000027, 75330x00002978,0x00000001,0x00050051,0x00000006,
71790x0000254d,0x0000254c,0x0004007c,0x00000006, 75340x0000297a,0x00002978,0x00000000,0x00050080,
71800x00002807,0x0000254d,0x00050051,0x00000006, 75350x00000006,0x0000297f,0x0000292b,0x00002979,
71810x00002820,0x0000254b,0x00000000,0x00050095, 75360x00050050,0x00000007,0x00002980,0x0000297a,
71820x00000130,0x00002822,0x00002820,0x00002549, 75370x0000297f,0x0004007c,0x00000014,0x00002970,
71830x00050051,0x00000006,0x00002823,0x00002822, 75380x00002980,0x00060041,0x0000016c,0x00002968,
71840x00000001,0x00050051,0x00000006,0x00002824, 75390x00002970,0x0000016b,0x0000016b,0x0005003e,
71850x00002822,0x00000000,0x00050051,0x00000006, 75400x00002968,0x0000295d,0x00000002,0x00000004,
71860x00002827,0x0000254b,0x00000001,0x00050080, 75410x00050080,0x00000006,0x00002662,0x00002622,
71870x00000006,0x00002829,0x00002827,0x00002823, 75420x00000521,0x00050041,0x000001bb,0x00002665,
71880x00050050,0x00000007,0x0000282a,0x00002824, 75430x000001b9,0x00000523,0x0004003d,0x00000006,
71890x00002829,0x0004007c,0x00000014,0x0000281a, 75440x00002666,0x00002665,0x00050095,0x0000013d,
71900x0000282a,0x00060041,0x0000015f,0x00002812, 75450x00002998,0x00002924,0x00002662,0x00050051,
71910x0000281a,0x0000015e,0x0000015e,0x0005003e, 75460x00000006,0x00002999,0x00002998,0x00000001,
71920x00002812,0x00002807,0x00000002,0x00000004, 75470x00050051,0x00000006,0x0000299a,0x00002998,
71930x00050080,0x00000006,0x00002550,0x0000251e, 75480x00000000,0x00050080,0x00000006,0x0000299f,
71940x000004d2,0x00060041,0x00000028,0x00002553, 75490x0000292b,0x00002999,0x00050050,0x00000007,
71950x000024d6,0x000002dc,0x00000135,0x0004003d, 75500x000029a0,0x0000299a,0x0000299f,0x0004007c,
71960x00000027,0x00002554,0x00002553,0x0004007c, 75510x00000014,0x00002990,0x000029a0,0x00060041,
71970x00000006,0x00002830,0x00002554,0x00050095, 75520x0000016c,0x00002988,0x00002990,0x0000016b,
71980x00000130,0x0000284b,0x00002820,0x00002550, 75530x0000016b,0x0005003e,0x00002988,0x00002666,
71990x00050051,0x00000006,0x0000284c,0x0000284b,
72000x00000001,0x00050051,0x00000006,0x0000284d,
72010x0000284b,0x00000000,0x00050080,0x00000006,
72020x00002852,0x00002827,0x0000284c,0x00050050,
72030x00000007,0x00002853,0x0000284d,0x00002852,
72040x0004007c,0x00000014,0x00002843,0x00002853,
72050x00060041,0x0000015f,0x0000283b,0x00002843,
72060x0000015e,0x0000015e,0x0005003e,0x0000283b,
72070x00002830,0x00000002,0x00000004,0x00050080,
72080x00000006,0x00002557,0x0000251e,0x000004dd,
72090x00060041,0x00000028,0x0000255a,0x000024d6,
72100x000002dc,0x00000247,0x0004003d,0x00000027,
72110x0000255b,0x0000255a,0x0004007c,0x00000006,
72120x00002859,0x0000255b,0x00050095,0x00000130,
72130x00002874,0x00002820,0x00002557,0x00050051,
72140x00000006,0x00002875,0x00002874,0x00000001,
72150x00050051,0x00000006,0x00002876,0x00002874,
72160x00000000,0x00050080,0x00000006,0x0000287b,
72170x00002827,0x00002875,0x00050050,0x00000007,
72180x0000287c,0x00002876,0x0000287b,0x0004007c,
72190x00000014,0x0000286c,0x0000287c,0x00060041,
72200x0000015f,0x00002864,0x0000286c,0x0000015e,
72210x0000015e,0x0005003e,0x00002864,0x00002859,
72220x00000002,0x00000004,0x00050080,0x00000006, 75540x00000002,0x00000004,0x00050080,0x00000006,
72230x0000255e,0x0000251e,0x000004e8,0x00050041, 75550x00002669,0x00002622,0x0000052d,0x00050095,
72240x00000182,0x00002561,0x00000180,0x000004ea, 75560x0000013d,0x000029b8,0x00002924,0x00002669,
72250x0004003d,0x00000006,0x00002562,0x00002561, 75570x00050051,0x00000006,0x000029b9,0x000029b8,
72260x00050095,0x00000130,0x00002894,0x00002820, 75580x00000001,0x00050051,0x00000006,0x000029ba,
72270x0000255e,0x00050051,0x00000006,0x00002895, 75590x000029b8,0x00000000,0x00050080,0x00000006,
72280x00002894,0x00000001,0x00050051,0x00000006, 75600x000029bf,0x0000292b,0x000029b9,0x00050050,
72290x00002896,0x00002894,0x00000000,0x00050080, 75610x00000007,0x000029c0,0x000029ba,0x000029bf,
72300x00000006,0x0000289b,0x00002827,0x00002895, 75620x0004007c,0x00000014,0x000029b0,0x000029c0,
72310x00050050,0x00000007,0x0000289c,0x00002896, 75630x00060041,0x0000016c,0x000029a8,0x000029b0,
72320x0000289b,0x0004007c,0x00000014,0x0000288c, 75640x0000016b,0x0000016b,0x0005003e,0x000029a8,
72330x0000289c,0x00060041,0x0000015f,0x00002884, 75650x000012dd,0x00000002,0x00000004,0x00050080,
72340x0000288c,0x0000015e,0x0000015e,0x0005003e, 75660x00000006,0x0000266f,0x00002622,0x00000537,
72350x00002884,0x00002562,0x00000002,0x00000004, 75670x00050095,0x0000013d,0x000029d8,0x00002924,
72360x00050080,0x00000006,0x00002565,0x0000251e, 75680x0000266f,0x00050051,0x00000006,0x000029d9,
72370x000004f4,0x00050095,0x00000130,0x000028b4, 75690x000029d8,0x00000001,0x00050051,0x00000006,
72380x00002820,0x00002565,0x00050051,0x00000006, 75700x000029da,0x000029d8,0x00000000,0x00050080,
72390x000028b5,0x000028b4,0x00000001,0x00050051, 75710x00000006,0x000029df,0x0000292b,0x000029d9,
72400x00000006,0x000028b6,0x000028b4,0x00000000, 75720x00050050,0x00000007,0x000029e0,0x000029da,
72410x00050080,0x00000006,0x000028bb,0x00002827, 75730x000029df,0x0004007c,0x00000014,0x000029d0,
72420x000028b5,0x00050050,0x00000007,0x000028bc, 75740x000029e0,0x00060041,0x0000016c,0x000029c8,
72430x000028b6,0x000028bb,0x0004007c,0x00000014, 75750x000029d0,0x0000016b,0x0000016b,0x0005003e,
72440x000028ac,0x000028bc,0x00060041,0x0000015f, 75760x000029c8,0x00000539,0x00000002,0x00000004,
72450x000028a4,0x000028ac,0x0000015e,0x0000015e, 75770x00050080,0x00000006,0x00002674,0x00002622,
72460x0005003e,0x000028a4,0x000011de,0x00000002, 75780x00000541,0x00050095,0x0000013d,0x000029f8,
72470x00000004,0x00050080,0x00000006,0x0000256b, 75790x00002924,0x00002674,0x00050051,0x00000006,
72480x0000251e,0x000004fe,0x00050095,0x00000130, 75800x000029f9,0x000029f8,0x00000001,0x00050051,
72490x000028d4,0x00002820,0x0000256b,0x00050051, 75810x00000006,0x000029fa,0x000029f8,0x00000000,
72500x00000006,0x000028d5,0x000028d4,0x00000001, 75820x00050080,0x00000006,0x000029ff,0x0000292b,
72510x00050051,0x00000006,0x000028d6,0x000028d4, 75830x000029f9,0x00050050,0x00000007,0x00002a00,
72520x00000000,0x00050080,0x00000006,0x000028db, 75840x000029fa,0x000029ff,0x0004007c,0x00000014,
72530x00002827,0x000028d5,0x00050050,0x00000007, 75850x000029f0,0x00002a00,0x00060041,0x0000016c,
72540x000028dc,0x000028d6,0x000028db,0x0004007c, 75860x000029e8,0x000029f0,0x0000016b,0x0000016b,
72550x00000014,0x000028cc,0x000028dc,0x00060041, 75870x0005003e,0x000029e8,0x00000543,0x00000002,
72560x0000015f,0x000028c4,0x000028cc,0x0000015e, 75880x00000004,0x00050041,0x0000006d,0x00002678,
72570x0000015e,0x0005003e,0x000028c4,0x00000500, 75890x000025da,0x0000016b,0x0004003d,0x0000006c,
75900x00002679,0x00002678,0x0004009c,0x0000054d,
75910x0000267a,0x00002679,0x0004009a,0x0000002f,
75920x0000267b,0x0000267a,0x000400a8,0x0000002f,
75930x0000267c,0x0000267b,0x000300f7,0x00002682,
75940x00000000,0x000400fa,0x0000267c,0x0000267d,
75950x00002682,0x000200f8,0x0000267d,0x00050041,
75960x0000006d,0x0000267e,0x000025da,0x00000264,
75970x0004003d,0x0000006c,0x0000267f,0x0000267e,
75980x0004009c,0x0000054d,0x00002680,0x0000267f,
75990x0004009a,0x0000002f,0x00002681,0x00002680,
76000x000200f9,0x00002682,0x000200f8,0x00002682,
76010x000700f5,0x0000002f,0x00002683,0x0000267b,
76020x0000264b,0x00002681,0x0000267d,0x000400a8,
76030x0000002f,0x00002684,0x00002683,0x000300f7,
76040x0000268a,0x00000000,0x000400fa,0x00002684,
76050x00002685,0x0000268a,0x000200f8,0x00002685,
76060x00050041,0x0000006d,0x00002686,0x000025da,
76070x00000315,0x0004003d,0x0000006c,0x00002687,
76080x00002686,0x0004009c,0x0000054d,0x00002688,
76090x00002687,0x0004009a,0x0000002f,0x00002689,
76100x00002688,0x000200f9,0x0000268a,0x000200f8,
76110x0000268a,0x000700f5,0x0000002f,0x0000268b,
76120x00002683,0x00002682,0x00002689,0x00002685,
76130x0004003d,0x0000006c,0x0000268d,0x00002678,
76140x00050041,0x0000006d,0x0000268e,0x000025da,
76150x00000264,0x0004003d,0x0000006c,0x0000268f,
76160x0000268e,0x0007000c,0x0000006c,0x00002690,
76170x00000001,0x00000025,0x0000268d,0x0000268f,
76180x00050041,0x0000006d,0x00002691,0x000025da,
76190x00000315,0x0004003d,0x0000006c,0x00002692,
76200x00002691,0x0007000c,0x0000006c,0x00002693,
76210x00000001,0x00000025,0x00002690,0x00002692,
76220x0004003d,0x0000006c,0x00002695,0x00002678,
76230x0004003d,0x0000006c,0x00002697,0x0000268e,
76240x0007000c,0x0000006c,0x00002698,0x00000001,
76250x00000028,0x00002695,0x00002697,0x0004003d,
76260x0000006c,0x0000269a,0x00002691,0x0007000c,
76270x0000006c,0x0000269b,0x00000001,0x00000028,
76280x00002698,0x0000269a,0x00060050,0x0000054d,
76290x00006125,0x0000268b,0x0000268b,0x0000268b,
76300x000600a9,0x0000006c,0x00006126,0x00006125,
76310x000060fe,0x0000269b,0x000600a9,0x0000006c,
76320x00006128,0x00006125,0x00000576,0x00002693,
76330x00050041,0x000001bb,0x00002a50,0x000001b9,
76340x000001ba,0x0004003d,0x00000006,0x00002a51,
76350x00002a50,0x00050084,0x00000006,0x00002a52,
76360x000001db,0x00002a51,0x00050080,0x00000006,
76370x00002a53,0x000001c4,0x00002a52,0x00050080,
76380x00000006,0x00002a59,0x00002a51,0x0000062f,
76390x00050086,0x00000006,0x00002a5a,0x00002a59,
76400x000001be,0x00050084,0x00000006,0x00002a4c,
76410x000001c4,0x00002a5a,0x00050080,0x00000006,
76420x00002a4d,0x00002a53,0x00002a4c,0x00050080,
76430x00000006,0x00002a47,0x00002a4d,0x00002a4c,
76440x00050084,0x00000006,0x00002a17,0x000001ef,
76450x0000261d,0x00050080,0x00000006,0x00002a18,
76460x00002a47,0x00002a17,0x00050041,0x00000266,
76470x00002a19,0x000001b9,0x00000264,0x0004003d,
76480x00000007,0x00002a1a,0x00002a19,0x00050051,
76490x00000027,0x00002a1d,0x00006128,0x00000000,
76500x0004007c,0x00000006,0x00002a67,0x00002a1d,
76510x00050051,0x00000006,0x00002a80,0x00002a1a,
76520x00000000,0x00050095,0x0000013d,0x00002a82,
76530x00002a80,0x00002a18,0x00050051,0x00000006,
76540x00002a83,0x00002a82,0x00000001,0x00050051,
76550x00000006,0x00002a84,0x00002a82,0x00000000,
76560x00050051,0x00000006,0x00002a87,0x00002a1a,
76570x00000001,0x00050080,0x00000006,0x00002a89,
76580x00002a87,0x00002a83,0x00050050,0x00000007,
76590x00002a8a,0x00002a84,0x00002a89,0x0004007c,
76600x00000014,0x00002a7a,0x00002a8a,0x00060041,
76610x0000016c,0x00002a72,0x00002a7a,0x0000016b,
76620x0000016b,0x0005003e,0x00002a72,0x00002a67,
72580x00000002,0x00000004,0x00050080,0x00000006, 76630x00000002,0x00000004,0x00050080,0x00000006,
72590x00002570,0x0000251e,0x00000508,0x00050095, 76640x00002a20,0x00002a18,0x000000ec,0x00050051,
72600x00000130,0x000028f4,0x00002820,0x00002570, 76650x00000027,0x00002a24,0x00006128,0x00000001,
72610x00050051,0x00000006,0x000028f5,0x000028f4, 76660x0004007c,0x00000006,0x00002a90,0x00002a24,
72620x00000001,0x00050051,0x00000006,0x000028f6, 76670x00050095,0x0000013d,0x00002aab,0x00002a80,
72630x000028f4,0x00000000,0x00050080,0x00000006, 76680x00002a20,0x00050051,0x00000006,0x00002aac,
72640x000028fb,0x00002827,0x000028f5,0x00050050, 76690x00002aab,0x00000001,0x00050051,0x00000006,
72650x00000007,0x000028fc,0x000028f6,0x000028fb, 76700x00002aad,0x00002aab,0x00000000,0x00050080,
72660x0004007c,0x00000014,0x000028ec,0x000028fc, 76710x00000006,0x00002ab2,0x00002a87,0x00002aac,
72670x00060041,0x0000015f,0x000028e4,0x000028ec, 76720x00050050,0x00000007,0x00002ab3,0x00002aad,
72680x0000015e,0x0000015e,0x0005003e,0x000028e4, 76730x00002ab2,0x0004007c,0x00000014,0x00002aa3,
72690x0000050a,0x00000002,0x00000004,0x00050041, 76740x00002ab3,0x00060041,0x0000016c,0x00002a9b,
72700x00000064,0x00002574,0x000024d6,0x0000015e, 76750x00002aa3,0x0000016b,0x0000016b,0x0005003e,
72710x0004003d,0x00000063,0x00002575,0x00002574, 76760x00002a9b,0x00002a90,0x00000002,0x00000004,
72720x0004009c,0x00000514,0x00002576,0x00002575, 76770x00050080,0x00000006,0x00002a27,0x00002a18,
72730x0004009a,0x0000002f,0x00002577,0x00002576, 76780x000001cd,0x00050051,0x00000027,0x00002a2b,
72740x000400a8,0x0000002f,0x00002578,0x00002577, 76790x00006128,0x00000002,0x0004007c,0x00000006,
72750x000300f7,0x0000257e,0x00000000,0x000400fa, 76800x00002ab9,0x00002a2b,0x00050095,0x0000013d,
72760x00002578,0x00002579,0x0000257e,0x000200f8, 76810x00002ad4,0x00002a80,0x00002a27,0x00050051,
72770x00002579,0x00050041,0x00000064,0x0000257a, 76820x00000006,0x00002ad5,0x00002ad4,0x00000001,
72780x000024d6,0x0000022b,0x0004003d,0x00000063, 76830x00050051,0x00000006,0x00002ad6,0x00002ad4,
72790x0000257b,0x0000257a,0x0004009c,0x00000514, 76840x00000000,0x00050080,0x00000006,0x00002adb,
72800x0000257c,0x0000257b,0x0004009a,0x0000002f, 76850x00002a87,0x00002ad5,0x00050050,0x00000007,
72810x0000257d,0x0000257c,0x000200f9,0x0000257e, 76860x00002adc,0x00002ad6,0x00002adb,0x0004007c,
72820x000200f8,0x0000257e,0x000700f5,0x0000002f, 76870x00000014,0x00002acc,0x00002adc,0x00060041,
72830x0000257f,0x00002577,0x00002547,0x0000257d, 76880x0000016c,0x00002ac4,0x00002acc,0x0000016b,
72840x00002579,0x000400a8,0x0000002f,0x00002580, 76890x0000016b,0x0005003e,0x00002ac4,0x00002ab9,
72850x0000257f,0x000300f7,0x00002586,0x00000000,
72860x000400fa,0x00002580,0x00002581,0x00002586,
72870x000200f8,0x00002581,0x00050041,0x00000064,
72880x00002582,0x000024d6,0x000002dc,0x0004003d,
72890x00000063,0x00002583,0x00002582,0x0004009c,
72900x00000514,0x00002584,0x00002583,0x0004009a,
72910x0000002f,0x00002585,0x00002584,0x000200f9,
72920x00002586,0x000200f8,0x00002586,0x000700f5,
72930x0000002f,0x00002587,0x0000257f,0x0000257e,
72940x00002585,0x00002581,0x0004003d,0x00000063,
72950x00002589,0x00002574,0x00050041,0x00000064,
72960x0000258a,0x000024d6,0x0000022b,0x0004003d,
72970x00000063,0x0000258b,0x0000258a,0x0007000c,
72980x00000063,0x0000258c,0x00000001,0x00000025,
72990x00002589,0x0000258b,0x00050041,0x00000064,
73000x0000258d,0x000024d6,0x000002dc,0x0004003d,
73010x00000063,0x0000258e,0x0000258d,0x0007000c,
73020x00000063,0x0000258f,0x00000001,0x00000025,
73030x0000258c,0x0000258e,0x0004003d,0x00000063,
73040x00002591,0x00002574,0x0004003d,0x00000063,
73050x00002593,0x0000258a,0x0007000c,0x00000063,
73060x00002594,0x00000001,0x00000028,0x00002591,
73070x00002593,0x0004003d,0x00000063,0x00002596,
73080x0000258d,0x0007000c,0x00000063,0x00002597,
73090x00000001,0x00000028,0x00002594,0x00002596,
73100x00060050,0x00000514,0x00005ce5,0x00002587,
73110x00002587,0x00002587,0x000600a9,0x00000063,
73120x00005ce6,0x00005ce5,0x00005cc2,0x00002597,
73130x000600a9,0x00000063,0x00005ce8,0x00005ce5,
73140x0000053d,0x0000258f,0x00050041,0x00000182,
73150x0000294c,0x00000180,0x00000181,0x0004003d,
73160x00000006,0x0000294d,0x0000294c,0x00050084,
73170x00000006,0x0000294e,0x000001a2,0x0000294d,
73180x00050080,0x00000006,0x0000294f,0x0000018b,
73190x0000294e,0x00050080,0x00000006,0x00002955,
73200x0000294d,0x00005cc3,0x00050086,0x00000006,
73210x00002956,0x00002955,0x00000185,0x00050084,
73220x00000006,0x00002948,0x0000018b,0x00002956,
73230x00050080,0x00000006,0x00002949,0x0000294f,
73240x00002948,0x00050080,0x00000006,0x00002943,
73250x00002949,0x00002948,0x00050084,0x00000006,
73260x00002913,0x000001b6,0x00002519,0x00050080,
73270x00000006,0x00002914,0x00002943,0x00002913,
73280x00050041,0x0000022d,0x00002915,0x00000180,
73290x0000022b,0x0004003d,0x00000007,0x00002916,
73300x00002915,0x00050051,0x00000027,0x00002919,
73310x00005ce8,0x00000000,0x0004007c,0x00000006,
73320x00002963,0x00002919,0x00050051,0x00000006,
73330x0000297c,0x00002916,0x00000000,0x00050095,
73340x00000130,0x0000297e,0x0000297c,0x00002914,
73350x00050051,0x00000006,0x0000297f,0x0000297e,
73360x00000001,0x00050051,0x00000006,0x00002980,
73370x0000297e,0x00000000,0x00050051,0x00000006,
73380x00002983,0x00002916,0x00000001,0x00050080,
73390x00000006,0x00002985,0x00002983,0x0000297f,
73400x00050050,0x00000007,0x00002986,0x00002980,
73410x00002985,0x0004007c,0x00000014,0x00002976,
73420x00002986,0x00060041,0x0000015f,0x0000296e,
73430x00002976,0x0000015e,0x0000015e,0x0005003e,
73440x0000296e,0x00002963,0x00000002,0x00000004,
73450x00050080,0x00000006,0x0000291c,0x00002914,
73460x000000df,0x00050051,0x00000027,0x00002920,
73470x00005ce8,0x00000001,0x0004007c,0x00000006,
73480x0000298c,0x00002920,0x00050095,0x00000130,
73490x000029a7,0x0000297c,0x0000291c,0x00050051,
73500x00000006,0x000029a8,0x000029a7,0x00000001,
73510x00050051,0x00000006,0x000029a9,0x000029a7,
73520x00000000,0x00050080,0x00000006,0x000029ae,
73530x00002983,0x000029a8,0x00050050,0x00000007,
73540x000029af,0x000029a9,0x000029ae,0x0004007c,
73550x00000014,0x0000299f,0x000029af,0x00060041,
73560x0000015f,0x00002997,0x0000299f,0x0000015e,
73570x0000015e,0x0005003e,0x00002997,0x0000298c,
73580x00000002,0x00000004,0x00050080,0x00000006, 76900x00000002,0x00000004,0x00050080,0x00000006,
73590x00002923,0x00002914,0x00000194,0x00050051, 76910x00002a2e,0x00002a18,0x000001d4,0x00050051,
73600x00000027,0x00002927,0x00005ce8,0x00000002, 76920x00000027,0x00002a32,0x00006126,0x00000000,
73610x0004007c,0x00000006,0x000029b5,0x00002927, 76930x0004007c,0x00000006,0x00002ae2,0x00002a32,
73620x00050095,0x00000130,0x000029d0,0x0000297c, 76940x00050095,0x0000013d,0x00002afd,0x00002a80,
73630x00002923,0x00050051,0x00000006,0x000029d1, 76950x00002a2e,0x00050051,0x00000006,0x00002afe,
73640x000029d0,0x00000001,0x00050051,0x00000006, 76960x00002afd,0x00000001,0x00050051,0x00000006,
73650x000029d2,0x000029d0,0x00000000,0x00050080, 76970x00002aff,0x00002afd,0x00000000,0x00050080,
73660x00000006,0x000029d7,0x00002983,0x000029d1, 76980x00000006,0x00002b04,0x00002a87,0x00002afe,
73670x00050050,0x00000007,0x000029d8,0x000029d2, 76990x00050050,0x00000007,0x00002b05,0x00002aff,
73680x000029d7,0x0004007c,0x00000014,0x000029c8, 77000x00002b04,0x0004007c,0x00000014,0x00002af5,
73690x000029d8,0x00060041,0x0000015f,0x000029c0, 77010x00002b05,0x00060041,0x0000016c,0x00002aed,
73700x000029c8,0x0000015e,0x0000015e,0x0005003e, 77020x00002af5,0x0000016b,0x0000016b,0x0005003e,
73710x000029c0,0x000029b5,0x00000002,0x00000004, 77030x00002aed,0x00002ae2,0x00000002,0x00000004,
73720x00050080,0x00000006,0x0000292a,0x00002914, 77040x00050080,0x00000006,0x00002a35,0x00002a18,
73730x0000019b,0x00050051,0x00000027,0x0000292e, 77050x000001db,0x00050051,0x00000027,0x00002a39,
73740x00005ce6,0x00000000,0x0004007c,0x00000006, 77060x00006126,0x00000001,0x0004007c,0x00000006,
73750x000029de,0x0000292e,0x00050095,0x00000130, 77070x00002b0b,0x00002a39,0x00050095,0x0000013d,
73760x000029f9,0x0000297c,0x0000292a,0x00050051, 77080x00002b26,0x00002a80,0x00002a35,0x00050051,
73770x00000006,0x000029fa,0x000029f9,0x00000001, 77090x00000006,0x00002b27,0x00002b26,0x00000001,
73780x00050051,0x00000006,0x000029fb,0x000029f9, 77100x00050051,0x00000006,0x00002b28,0x00002b26,
73790x00000000,0x00050080,0x00000006,0x00002a00, 77110x00000000,0x00050080,0x00000006,0x00002b2d,
73800x00002983,0x000029fa,0x00050050,0x00000007, 77120x00002a87,0x00002b27,0x00050050,0x00000007,
73810x00002a01,0x000029fb,0x00002a00,0x0004007c, 77130x00002b2e,0x00002b28,0x00002b2d,0x0004007c,
73820x00000014,0x000029f1,0x00002a01,0x00060041, 77140x00000014,0x00002b1e,0x00002b2e,0x00060041,
73830x0000015f,0x000029e9,0x000029f1,0x0000015e, 77150x0000016c,0x00002b16,0x00002b1e,0x0000016b,
73840x0000015e,0x0005003e,0x000029e9,0x000029de, 77160x0000016b,0x0005003e,0x00002b16,0x00002b0b,
73850x00000002,0x00000004,0x00050080,0x00000006, 77170x00000002,0x00000004,0x00050080,0x00000006,
73860x00002931,0x00002914,0x000001a2,0x00050051, 77180x00002a3c,0x00002a18,0x00000299,0x00050051,
73870x00000027,0x00002935,0x00005ce6,0x00000001, 77190x00000027,0x00002a40,0x00006126,0x00000002,
73880x0004007c,0x00000006,0x00002a07,0x00002935, 77200x0004007c,0x00000006,0x00002b34,0x00002a40,
73890x00050095,0x00000130,0x00002a22,0x0000297c, 77210x00050095,0x0000013d,0x00002b4f,0x00002a80,
73900x00002931,0x00050051,0x00000006,0x00002a23, 77220x00002a3c,0x00050051,0x00000006,0x00002b50,
73910x00002a22,0x00000001,0x00050051,0x00000006, 77230x00002b4f,0x00000001,0x00050051,0x00000006,
73920x00002a24,0x00002a22,0x00000000,0x00050080, 77240x00002b51,0x00002b4f,0x00000000,0x00050080,
73930x00000006,0x00002a29,0x00002983,0x00002a23, 77250x00000006,0x00002b56,0x00002a87,0x00002b50,
73940x00050050,0x00000007,0x00002a2a,0x00002a24, 77260x00050050,0x00000007,0x00002b57,0x00002b51,
73950x00002a29,0x0004007c,0x00000014,0x00002a1a, 77270x00002b56,0x0004007c,0x00000014,0x00002b47,
73960x00002a2a,0x00060041,0x0000015f,0x00002a12, 77280x00002b57,0x00060041,0x0000016c,0x00002b3f,
73970x00002a1a,0x0000015e,0x0000015e,0x0005003e, 77290x00002b47,0x0000016b,0x0000016b,0x0005003e,
73980x00002a12,0x00002a07,0x00000002,0x00000004, 77300x00002b3f,0x00002b34,0x00000002,0x00000004,
73990x00050080,0x00000006,0x00002938,0x00002914, 77310x000300f7,0x00002b97,0x00000000,0x000300fb,
74000x00000260,0x00050051,0x00000027,0x0000293c, 77320x00000138,0x00002b66,0x000200f8,0x00002b66,
74010x00005ce6,0x00000002,0x0004007c,0x00000006, 77330x000500bc,0x0000002f,0x00002b9e,0x00002a1d,
74020x00002a30,0x0000293c,0x00050095,0x00000130, 77340x00002a32,0x000300f7,0x00002ba5,0x00000000,
74030x00002a4b,0x0000297c,0x00002938,0x00050051, 77350x000400fa,0x00002b9e,0x00002b9f,0x00002ba5,
74040x00000006,0x00002a4c,0x00002a4b,0x00000001, 77360x000200f8,0x00002b9f,0x000500bc,0x0000002f,
74050x00050051,0x00000006,0x00002a4d,0x00002a4b, 77370x00002ba4,0x00002a24,0x00002a39,0x000200f9,
74060x00000000,0x00050080,0x00000006,0x00002a52, 77380x00002ba5,0x000200f8,0x00002ba5,0x000700f5,
74070x00002983,0x00002a4c,0x00050050,0x00000007, 77390x0000002f,0x00002ba6,0x00002b9e,0x00002b66,
74080x00002a53,0x00002a4d,0x00002a52,0x0004007c, 77400x00002ba4,0x00002b9f,0x000300f7,0x00002bad,
74090x00000014,0x00002a43,0x00002a53,0x00060041, 77410x00000000,0x000400fa,0x00002ba6,0x00002ba7,
74100x0000015f,0x00002a3b,0x00002a43,0x0000015e, 77420x00002bad,0x000200f8,0x00002ba7,0x000500bc,
74110x0000015e,0x0005003e,0x00002a3b,0x00002a30, 77430x0000002f,0x00002bac,0x00002a2b,0x00002a40,
74120x00000002,0x00000004,0x000300f7,0x00002a93, 77440x000200f9,0x00002bad,0x000200f8,0x00002bad,
74130x00000000,0x000300fb,0x0000012b,0x00002a62, 77450x000700f5,0x0000002f,0x00002bae,0x00002ba6,
74140x000200f8,0x00002a62,0x000500bc,0x0000002f, 77460x00002ba5,0x00002bac,0x00002ba7,0x000400a8,
74150x00002a9a,0x00002919,0x0000292e,0x000300f7, 77470x0000002f,0x00002baf,0x00002bae,0x000300f7,
74160x00002aa1,0x00000000,0x000400fa,0x00002a9a, 77480x00002b6b,0x00000000,0x000400fa,0x00002baf,
74170x00002a9b,0x00002aa1,0x000200f8,0x00002a9b, 77490x00002b6a,0x00002b6b,0x000200f8,0x00002b6a,
74180x000500bc,0x0000002f,0x00002aa0,0x00002920, 77500x000200f9,0x00002b97,0x000200f8,0x00002b6b,
74190x00002935,0x000200f9,0x00002aa1,0x000200f8, 77510x00050081,0x0000006c,0x00002b6e,0x00006128,
74200x00002aa1,0x000700f5,0x0000002f,0x00002aa2, 77520x00006126,0x0005008e,0x0000006c,0x00002b6f,
74210x00002a9a,0x00002a62,0x00002aa0,0x00002a9b, 77530x00002b6e,0x000002fd,0x00050095,0x0000013d,
74220x000300f7,0x00002aa9,0x00000000,0x000400fa, 77540x00002bbf,0x00002a80,0x00000138,0x00050051,
74230x00002aa2,0x00002aa3,0x00002aa9,0x000200f8, 77550x00000006,0x00002bc0,0x00002bbf,0x00000001,
74240x00002aa3,0x000500bc,0x0000002f,0x00002aa8, 77560x00050051,0x00000006,0x00002bc1,0x00002bbf,
74250x00002927,0x0000293c,0x000200f9,0x00002aa9, 77570x00000000,0x00050080,0x00000006,0x00002bc6,
74260x000200f8,0x00002aa9,0x000700f5,0x0000002f, 77580x00002a87,0x00002bc0,0x00050050,0x00000007,
74270x00002aaa,0x00002aa2,0x00002aa1,0x00002aa8, 77590x00002bc7,0x00002bc1,0x00002bc6,0x0004007c,
74280x00002aa3,0x000400a8,0x0000002f,0x00002aab, 77600x00000014,0x00002bb7,0x00002bc7,0x00060041,
74290x00002aaa,0x000300f7,0x00002a67,0x00000000, 77610x0000016c,0x00002b74,0x00002bb7,0x0000016b,
74300x000400fa,0x00002aab,0x00002a66,0x00002a67, 77620x0000016b,0x00050051,0x00000027,0x00002b76,
74310x000200f8,0x00002a66,0x000200f9,0x00002a93, 77630x00002b6f,0x00000000,0x0004007c,0x00000006,
74320x000200f8,0x00002a67,0x00050081,0x00000063, 77640x00002bcd,0x00002b76,0x000500c7,0x00000006,
74330x00002a6a,0x00005ce8,0x00005ce6,0x0005008e, 77650x00002bcf,0x00002bcd,0x00000241,0x000500ab,
74340x00000063,0x00002a6b,0x00002a6a,0x000002c4, 77660x0000002f,0x00002bd0,0x00002bcf,0x00000138,
74350x00050095,0x00000130,0x00002abb,0x0000297c, 77670x000300f7,0x00002bd7,0x00000000,0x000400fa,
74360x0000012b,0x00050051,0x00000006,0x00002abc, 77680x00002bd0,0x00002bd1,0x00002bd4,0x000200f8,
74370x00002abb,0x00000001,0x00050051,0x00000006, 77690x00002bd4,0x000500c5,0x00000006,0x00002bd6,
74380x00002abd,0x00002abb,0x00000000,0x00050080, 77700x00002bcd,0x00000241,0x000200f9,0x00002bd7,
74390x00000006,0x00002ac2,0x00002983,0x00002abc, 77710x000200f8,0x00002bd1,0x000400c8,0x00000006,
74400x00050050,0x00000007,0x00002ac3,0x00002abd, 77720x00002bd3,0x00002bcd,0x000200f9,0x00002bd7,
74410x00002ac2,0x0004007c,0x00000014,0x00002ab3, 77730x000200f8,0x00002bd7,0x000700f5,0x00000006,
74420x00002ac3,0x00060041,0x0000015f,0x00002a70, 77740x00005f24,0x00002bd3,0x00002bd1,0x00002bd6,
74430x00002ab3,0x0000015e,0x0000015e,0x00050051, 77750x00002bd4,0x000700ed,0x00000006,0x00002b78,
74440x00000027,0x00002a72,0x00002a6b,0x00000000, 77760x00002b74,0x00000142,0x00000138,0x00005f24,
74450x0004007c,0x00000006,0x00002ac9,0x00002a72, 77770x00060041,0x0000016c,0x00002b7a,0x00002bb7,
74460x000500c7,0x00000006,0x00002acb,0x00002ac9, 77780x0000016b,0x00000264,0x00050051,0x00000027,
74470x00000208,0x000500ab,0x0000002f,0x00002acc, 77790x00002b7c,0x00002b6f,0x00000001,0x0004007c,
74480x00002acb,0x0000012b,0x000300f7,0x00002ad3, 77800x00000006,0x00002bde,0x00002b7c,0x000500c7,
74490x00000000,0x000400fa,0x00002acc,0x00002acd, 77810x00000006,0x00002be0,0x00002bde,0x00000241,
74500x00002ad0,0x000200f8,0x00002ad0,0x000500c5, 77820x000500ab,0x0000002f,0x00002be1,0x00002be0,
74510x00000006,0x00002ad2,0x00002ac9,0x00000208, 77830x00000138,0x000300f7,0x00002be8,0x00000000,
74520x000200f9,0x00002ad3,0x000200f8,0x00002acd, 77840x000400fa,0x00002be1,0x00002be2,0x00002be5,
74530x000400c8,0x00000006,0x00002acf,0x00002ac9, 77850x000200f8,0x00002be5,0x000500c5,0x00000006,
74540x000200f9,0x00002ad3,0x000200f8,0x00002ad3, 77860x00002be7,0x00002bde,0x00000241,0x000200f9,
74550x000700f5,0x00000006,0x00005af4,0x00002acf, 77870x00002be8,0x000200f8,0x00002be2,0x000400c8,
74560x00002acd,0x00002ad2,0x00002ad0,0x000700ed, 77880x00000006,0x00002be4,0x00002bde,0x000200f9,
74570x00000006,0x00002a74,0x00002a70,0x00000135, 77890x00002be8,0x000200f8,0x00002be8,0x000700f5,
74580x0000012b,0x00005af4,0x00060041,0x0000015f, 77900x00000006,0x00005f25,0x00002be4,0x00002be2,
74590x00002a76,0x00002ab3,0x0000015e,0x0000022b, 77910x00002be7,0x00002be5,0x000700ed,0x00000006,
74600x00050051,0x00000027,0x00002a78,0x00002a6b, 77920x00002b7e,0x00002b7a,0x00000142,0x00000138,
74610x00000001,0x0004007c,0x00000006,0x00002ada, 77930x00005f25,0x00060041,0x0000016c,0x00002b80,
74620x00002a78,0x000500c7,0x00000006,0x00002adc, 77940x00002bb7,0x0000016b,0x00000315,0x00050051,
74630x00002ada,0x00000208,0x000500ab,0x0000002f, 77950x00000027,0x00002b82,0x00002b6f,0x00000002,
74640x00002add,0x00002adc,0x0000012b,0x000300f7, 77960x0004007c,0x00000006,0x00002bef,0x00002b82,
74650x00002ae4,0x00000000,0x000400fa,0x00002add, 77970x000500c7,0x00000006,0x00002bf1,0x00002bef,
74660x00002ade,0x00002ae1,0x000200f8,0x00002ae1, 77980x00000241,0x000500ab,0x0000002f,0x00002bf2,
74670x000500c5,0x00000006,0x00002ae3,0x00002ada, 77990x00002bf1,0x00000138,0x000300f7,0x00002bf9,
74680x00000208,0x000200f9,0x00002ae4,0x000200f8, 78000x00000000,0x000400fa,0x00002bf2,0x00002bf3,
74690x00002ade,0x000400c8,0x00000006,0x00002ae0, 78010x00002bf6,0x000200f8,0x00002bf6,0x000500c5,
74700x00002ada,0x000200f9,0x00002ae4,0x000200f8, 78020x00000006,0x00002bf8,0x00002bef,0x00000241,
74710x00002ae4,0x000700f5,0x00000006,0x00005af5, 78030x000200f9,0x00002bf9,0x000200f8,0x00002bf3,
74720x00002ae0,0x00002ade,0x00002ae3,0x00002ae1, 78040x000400c8,0x00000006,0x00002bf5,0x00002bef,
74730x000700ed,0x00000006,0x00002a7a,0x00002a76, 78050x000200f9,0x00002bf9,0x000200f8,0x00002bf9,
74740x00000135,0x0000012b,0x00005af5,0x00060041, 78060x000700f5,0x00000006,0x00005f26,0x00002bf5,
74750x0000015f,0x00002a7c,0x00002ab3,0x0000015e, 78070x00002bf3,0x00002bf8,0x00002bf6,0x000700ed,
74760x000002dc,0x00050051,0x00000027,0x00002a7e, 78080x00000006,0x00002b84,0x00002b80,0x00000142,
74770x00002a6b,0x00000002,0x0004007c,0x00000006, 78090x00000138,0x00005f26,0x00060041,0x0000016c,
74780x00002aeb,0x00002a7e,0x000500c7,0x00000006, 78100x00002b86,0x00002bb7,0x0000016b,0x0000031d,
74790x00002aed,0x00002aeb,0x00000208,0x000500ab, 78110x000300f7,0x00002c0a,0x00000000,0x000400fa,
74800x0000002f,0x00002aee,0x00002aed,0x0000012b, 78120x00002bd0,0x00002c04,0x00002c07,0x000200f8,
74810x000300f7,0x00002af5,0x00000000,0x000400fa, 78130x00002c07,0x000500c5,0x00000006,0x00002c09,
74820x00002aee,0x00002aef,0x00002af2,0x000200f8, 78140x00002bcd,0x00000241,0x000200f9,0x00002c0a,
74830x00002af2,0x000500c5,0x00000006,0x00002af4, 78150x000200f8,0x00002c04,0x000400c8,0x00000006,
74840x00002aeb,0x00000208,0x000200f9,0x00002af5, 78160x00002c06,0x00002bcd,0x000200f9,0x00002c0a,
74850x000200f8,0x00002aef,0x000400c8,0x00000006, 78170x000200f8,0x00002c0a,0x000700f5,0x00000006,
74860x00002af1,0x00002aeb,0x000200f9,0x00002af5, 78180x00005f27,0x00002c06,0x00002c04,0x00002c09,
74870x000200f8,0x00002af5,0x000700f5,0x00000006, 78190x00002c07,0x000700ef,0x00000006,0x00002b8a,
74880x00005af6,0x00002af1,0x00002aef,0x00002af4, 78200x00002b86,0x00000142,0x00000138,0x00005f27,
74890x00002af2,0x000700ed,0x00000006,0x00002a80, 78210x00060041,0x0000016c,0x00002b8c,0x00002bb7,
74900x00002a7c,0x00000135,0x0000012b,0x00005af6, 78220x0000016b,0x00000325,0x000300f7,0x00002c1b,
74910x00060041,0x0000015f,0x00002a82,0x00002ab3, 78230x00000000,0x000400fa,0x00002be1,0x00002c15,
74920x0000015e,0x000002e4,0x000300f7,0x00002b06, 78240x00002c18,0x000200f8,0x00002c18,0x000500c5,
74930x00000000,0x000400fa,0x00002acc,0x00002b00, 78250x00000006,0x00002c1a,0x00002bde,0x00000241,
74940x00002b03,0x000200f8,0x00002b03,0x000500c5, 78260x000200f9,0x00002c1b,0x000200f8,0x00002c15,
74950x00000006,0x00002b05,0x00002ac9,0x00000208, 78270x000400c8,0x00000006,0x00002c17,0x00002bde,
74960x000200f9,0x00002b06,0x000200f8,0x00002b00, 78280x000200f9,0x00002c1b,0x000200f8,0x00002c1b,
74970x000400c8,0x00000006,0x00002b02,0x00002ac9, 78290x000700f5,0x00000006,0x00005f28,0x00002c17,
74980x000200f9,0x00002b06,0x000200f8,0x00002b06, 78300x00002c15,0x00002c1a,0x00002c18,0x000700ef,
74990x000700f5,0x00000006,0x00005af7,0x00002b02, 78310x00000006,0x00002b90,0x00002b8c,0x00000142,
75000x00002b00,0x00002b05,0x00002b03,0x000700ef, 78320x00000138,0x00005f28,0x00060041,0x0000016c,
75010x00000006,0x00002a86,0x00002a82,0x00000135, 78330x00002b92,0x00002bb7,0x0000016b,0x0000032d,
75020x0000012b,0x00005af7,0x00060041,0x0000015f, 78340x000300f7,0x00002c2c,0x00000000,0x000400fa,
75030x00002a88,0x00002ab3,0x0000015e,0x000002ec, 78350x00002bf2,0x00002c26,0x00002c29,0x000200f8,
75040x000300f7,0x00002b17,0x00000000,0x000400fa, 78360x00002c29,0x000500c5,0x00000006,0x00002c2b,
75050x00002add,0x00002b11,0x00002b14,0x000200f8, 78370x00002bef,0x00000241,0x000200f9,0x00002c2c,
75060x00002b14,0x000500c5,0x00000006,0x00002b16, 78380x000200f8,0x00002c26,0x000400c8,0x00000006,
75070x00002ada,0x00000208,0x000200f9,0x00002b17, 78390x00002c28,0x00002bef,0x000200f9,0x00002c2c,
75080x000200f8,0x00002b11,0x000400c8,0x00000006, 78400x000200f8,0x00002c2c,0x000700f5,0x00000006,
75090x00002b13,0x00002ada,0x000200f9,0x00002b17, 78410x00005f29,0x00002c28,0x00002c26,0x00002c2b,
75100x000200f8,0x00002b17,0x000700f5,0x00000006, 78420x00002c29,0x000700ef,0x00000006,0x00002b96,
75110x00005af8,0x00002b13,0x00002b11,0x00002b16, 78430x00002b92,0x00000142,0x00000138,0x00005f29,
75120x00002b14,0x000700ef,0x00000006,0x00002a8c, 78440x000200f9,0x00002b97,0x000200f8,0x00002b97,
75130x00002a88,0x00000135,0x0000012b,0x00005af8, 78450x000200f9,0x000013be,0x000200f8,0x000013be,
75140x00060041,0x0000015f,0x00002a8e,0x00002ab3, 78460x000200f9,0x00001398,0x000200f8,0x00001397,
75150x0000015e,0x000002f4,0x000300f7,0x00002b28, 78470x00050041,0x000001bb,0x00001399,0x000001b9,
75160x00000000,0x000400fa,0x00002aee,0x00002b22, 78480x000010be,0x0004003d,0x00000006,0x0000139a,
75170x00002b25,0x000200f8,0x00002b25,0x000500c5, 78490x00001399,0x00050084,0x00000006,0x0000139c,
75180x00000006,0x00002b27,0x00002aeb,0x00000208, 78500x000000ec,0x000012dd,0x00050080,0x00000006,
75190x000200f9,0x00002b28,0x000200f8,0x00002b22, 78510x0000139d,0x0000139a,0x0000139c,0x00050041,
75200x000400c8,0x00000006,0x00002b24,0x00002aeb, 78520x00000266,0x0000139f,0x000001b9,0x0000016b,
75210x000200f9,0x00002b28,0x000200f8,0x00002b28, 78530x0004003d,0x00000007,0x000013a0,0x0000139f,
75220x000700f5,0x00000006,0x00005af9,0x00002b24, 78540x00050051,0x00000006,0x0000258e,0x000013a0,
75230x00002b22,0x00002b27,0x00002b25,0x000700ef, 78550x00000000,0x00050095,0x0000013d,0x00002590,
75240x00000006,0x00002a92,0x00002a8e,0x00000135, 78560x0000258e,0x0000139d,0x00050051,0x00000006,
75250x0000012b,0x00005af9,0x000200f9,0x00002a93, 78570x00002591,0x00002590,0x00000001,0x00050051,
75260x000200f8,0x00002a93,0x000200f9,0x000012bf, 78580x00000006,0x00002592,0x00002590,0x00000000,
75270x000200f8,0x000012bf,0x000200f9,0x00001299, 78590x00050051,0x00000006,0x00002595,0x000013a0,
75280x000200f8,0x00001298,0x00050041,0x00000182, 78600x00000001,0x00050080,0x00000006,0x00002597,
75290x0000129a,0x00000180,0x00000fbf,0x0004003d, 78610x00002595,0x00002591,0x00050050,0x00000007,
75300x00000006,0x0000129b,0x0000129a,0x00050084, 78620x00002598,0x00002592,0x00002597,0x0004007c,
75310x00000006,0x0000129d,0x000000df,0x000011de, 78630x00000014,0x00002588,0x00002598,0x00060041,
75320x00050080,0x00000006,0x0000129e,0x0000129b, 78640x0000016c,0x00002580,0x00002588,0x0000016b,
75330x0000129d,0x00050041,0x0000022d,0x000012a0, 78650x0000016b,0x0005003e,0x00002580,0x00000539,
75340x00000180,0x0000015e,0x0004003d,0x00000007, 78660x00000002,0x00000004,0x000500b0,0x0000002f,
75350x000012a1,0x000012a0,0x00050051,0x00000006, 78670x000013a5,0x000012dd,0x00000470,0x000300f7,
75360x0000248a,0x000012a1,0x00000000,0x00050095, 78680x000013a7,0x00000000,0x000400fa,0x000013a5,
75370x00000130,0x0000248c,0x0000248a,0x0000129e, 78690x000013a6,0x000013a7,0x000200f8,0x000013a6,
75380x00050051,0x00000006,0x0000248d,0x0000248c, 78700x00050041,0x00000266,0x000013ab,0x000001b9,
75390x00000001,0x00050051,0x00000006,0x0000248e, 78710x00000264,0x0004003d,0x00000007,0x000013ac,
75400x0000248c,0x00000000,0x00050051,0x00000006, 78720x000013ab,0x00050051,0x00000006,0x000025ae,
75410x00002491,0x000012a1,0x00000001,0x00050080, 78730x000013ac,0x00000000,0x00050095,0x0000013d,
75420x00000006,0x00002493,0x00002491,0x0000248d, 78740x000025b0,0x000025ae,0x0000139c,0x00050051,
75430x00050050,0x00000007,0x00002494,0x0000248e, 78750x00000006,0x000025b1,0x000025b0,0x00000001,
75440x00002493,0x0004007c,0x00000014,0x00002484, 78760x00050051,0x00000006,0x000025b2,0x000025b0,
75450x00002494,0x00060041,0x0000015f,0x0000247c, 78770x00000000,0x00050051,0x00000006,0x000025b5,
75460x00002484,0x0000015e,0x0000015e,0x0005003e, 78780x000013ac,0x00000001,0x00050080,0x00000006,
75470x0000247c,0x00000500,0x00000002,0x00000004, 78790x000025b7,0x000025b5,0x000025b1,0x00050050,
75480x000500b0,0x0000002f,0x000012a6,0x000011de, 78800x00000007,0x000025b8,0x000025b2,0x000025b7,
75490x00000437,0x000300f7,0x000012a8,0x00000000, 78810x0004007c,0x00000014,0x000025a8,0x000025b8,
75500x000400fa,0x000012a6,0x000012a7,0x000012a8, 78820x00060041,0x0000016c,0x000025a0,0x000025a8,
75510x000200f8,0x000012a7,0x00050041,0x0000022d, 78830x0000016b,0x0000016b,0x0005003e,0x000025a0,
75520x000012ac,0x00000180,0x0000022b,0x0004003d, 78840x00000539,0x00000002,0x00000004,0x00050080,
75530x00000007,0x000012ad,0x000012ac,0x00050051, 78850x00000006,0x000013b2,0x000001d4,0x0000139c,
75540x00000006,0x000024aa,0x000012ad,0x00000000, 78860x00050095,0x0000013d,0x000025d0,0x000025ae,
75550x00050095,0x00000130,0x000024ac,0x000024aa, 78870x000013b2,0x00050051,0x00000006,0x000025d1,
75560x0000129d,0x00050051,0x00000006,0x000024ad, 78880x000025d0,0x00000001,0x00050051,0x00000006,
75570x000024ac,0x00000001,0x00050051,0x00000006, 78890x000025d2,0x000025d0,0x00000000,0x00050080,
75580x000024ae,0x000024ac,0x00000000,0x00050051, 78900x00000006,0x000025d7,0x000025b5,0x000025d1,
75590x00000006,0x000024b1,0x000012ad,0x00000001, 78910x00050050,0x00000007,0x000025d8,0x000025d2,
75600x00050080,0x00000006,0x000024b3,0x000024b1, 78920x000025d7,0x0004007c,0x00000014,0x000025c8,
75610x000024ad,0x00050050,0x00000007,0x000024b4, 78930x000025d8,0x00060041,0x0000016c,0x000025c0,
75620x000024ae,0x000024b3,0x0004007c,0x00000014, 78940x000025c8,0x0000016b,0x0000016b,0x0005003e,
75630x000024a4,0x000024b4,0x00060041,0x0000015f, 78950x000025c0,0x00000138,0x00000002,0x00000004,
75640x0000249c,0x000024a4,0x0000015e,0x0000015e, 78960x000200f9,0x000013a7,0x000200f8,0x000013a7,
75650x0005003e,0x0000249c,0x00000500,0x00000002, 78970x000200f9,0x00001398,0x000200f8,0x00001398,
75660x00000004,0x00050080,0x00000006,0x000012b3, 78980x000200f9,0x000013fd,0x000200f8,0x000013fd,
75670x0000019b,0x0000129d,0x00050095,0x00000130, 78990x000100fd,0x00010038}
75680x000024cc,0x000024aa,0x000012b3,0x00050051,
75690x00000006,0x000024cd,0x000024cc,0x00000001,
75700x00050051,0x00000006,0x000024ce,0x000024cc,
75710x00000000,0x00050080,0x00000006,0x000024d3,
75720x000024b1,0x000024cd,0x00050050,0x00000007,
75730x000024d4,0x000024ce,0x000024d3,0x0004007c,
75740x00000014,0x000024c4,0x000024d4,0x00060041,
75750x0000015f,0x000024bc,0x000024c4,0x0000015e,
75760x0000015e,0x0005003e,0x000024bc,0x0000012b,
75770x00000002,0x00000004,0x000200f9,0x000012a8,
75780x000200f8,0x000012a8,0x000200f9,0x00001299,
75790x000200f8,0x00001299,0x000200f9,0x000012fe,
75800x000200f8,0x000012fe,0x000100fd,0x00010038}