upleb.uk

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

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Trencansky <jan.trencansky@protonmail.com>2026-11-26 16:55:04 -0500
committerJan Trencansky <jan.trencansky@protonmail.com>2026-11-26 16:55:04 -0500
commitdf92abca8ee2a8f9093efea7fcaa4dadc3ddaebc (patch)
tree97ef8f95544fe263049d3f7360823f16100de209
parent49a0b69fcdb80db1f2a44ce7ca0ab8dfdec1e403 (diff)
parente5a7c8942678b323f655939c81f5d8855d20c248 (diff)
Merge main e5a7c8942 into shadow-aliased-guard (#1867)
One conflict, runtime/README.md: this branch rewrote the LEONIDA_SHADOW_ALIAS_MS row, main (#2163) added the LEONIDA_SHADOW_KEEP row after it. Both rows kept; the keep row's "aliased" now reads "aliased while they can't be guarded at every address", since aliased pages are no longer copied without a sign of a write. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
-rw-r--r--docs/README.md1
-rw-r--r--docs/audio_hal_exe_calls.md20
-rw-r--r--docs/bvh.md5
-rw-r--r--docs/d3d12_vulkan.md317
-rw-r--r--docs/design.md8
-rw-r--r--docs/directstorage.md29
-rw-r--r--docs/gameinput.md22
-rw-r--r--docs/linux_proton.md70
-rw-r--r--docs/running.md158
-rw-r--r--docs/runtime_imports.md26
-rw-r--r--make_game.py67
-rw-r--r--runtime/CMakeLists.txt166
-rw-r--r--runtime/README.md20
-rw-r--r--runtime/cmake/opus_decoder.cmake23
-rw-r--r--runtime/opus_decoder/Cargo.lock16
-rw-r--r--runtime/opus_decoder/Cargo.toml16
-rw-r--r--runtime/opus_decoder/README.md33
-rw-r--r--runtime/opus_decoder/leonida_opus_decoder.h44
-rw-r--r--runtime/opus_decoder/src/lib.rs244
-rw-r--r--runtime/shims/d3d12_com.h3
-rw-r--r--runtime/shims/d3d12_geometry_views.h62
-rw-r--r--runtime/shims/d3d12_precompile.h6
-rw-r--r--runtime/shims/d3d12_title_buffer_windows.h57
-rw-r--r--runtime/shims/d3d12_vulkan_device.cpp1454
-rw-r--r--runtime/shims/d3d12_xs_device.cpp66
-rw-r--r--runtime/shims/d3d12_xs_list_values.h167
-rw-r--r--runtime/shims/dstorage.cpp172
-rw-r--r--runtime/shims/gameinput.cpp77
-rw-r--r--runtime/shims/gameinput_no_sdl.cpp96
-rw-r--r--runtime/shims/gameinput_script.h30
-rw-r--r--runtime/shims/process.cpp35
-rw-r--r--runtime/shims/xapu_chad.cpp123
-rw-r--r--runtime/shims/xapu_queue.cpp438
-rw-r--r--runtime/shims/xgameruntime_gamesave.cpp25
-rw-r--r--runtime/shims/xmem.cpp55
-rw-r--r--runtime/shims/xmem.h2
-rw-r--r--runtime/src/address_guard.h163
-rw-r--r--runtime/src/conservative_raster.h17
-rw-r--r--runtime/src/console_heap_slot_records.h227
-rw-r--r--runtime/src/console_heap_vsharp_slots.h115
-rw-r--r--runtime/src/depth24_fragment.h56
-rw-r--r--runtime/src/descriptor_range_changes.h46
-rw-r--r--runtime/src/dstorage_hold.h23
-rw-r--r--runtime/src/heavy_pipeline_cache.h94
-rw-r--r--runtime/src/indirect_clamp.comp48
-rw-r--r--runtime/src/indirect_clamp_spv.h611
-rw-r--r--runtime/src/list_value_wait_budget.h251
-rw-r--r--runtime/src/main.cpp9
-rw-r--r--runtime/src/mem_probe.h65
-rw-r--r--runtime/src/memory_breakdown.h152
-rw-r--r--runtime/src/pipeline_cache_store.h17
-rw-r--r--runtime/src/shadow_keep.h72
-rw-r--r--runtime/src/title_geometry_watch.h18
-rw-r--r--runtime/src/title_texture_memory.h28
-rw-r--r--runtime/src/title_va_alias.h71
-rw-r--r--runtime/src/vulkan_backend.h1
-rw-r--r--runtime/src/vulkan_bindless.h59
-rw-r--r--runtime/src/vulkan_indirect_clamp.h71
-rw-r--r--runtime/src/vulkan_replay.h12
-rw-r--r--runtime/src/xdxr_build.comp51
-rw-r--r--runtime/src/xdxr_build.h59
-rw-r--r--runtime/src/xdxr_build.inc16094
-rw-r--r--runtime/test/address_guard_test.cpp127
-rw-r--r--runtime/test/bindless_sizing_test.cpp54
-rw-r--r--runtime/test/check_atexit.cmake10
-rw-r--r--runtime/test/check_precompile_skip_list.cmake123
-rw-r--r--runtime/test/conservative_raster_test.cpp13
-rw-r--r--runtime/test/console_heap_slot_records_test.cpp347
-rw-r--r--runtime/test/console_heap_vsharp_slots_test.cpp259
-rw-r--r--runtime/test/cs_group_marker_spv.h43
-rw-r--r--runtime/test/d3d12_existing_heap_test.cpp137
-rw-r--r--runtime/test/d3d12_mesh_test.cpp30
-rw-r--r--runtime/test/d3d12_title_va_test.cpp272
-rw-r--r--runtime/test/d3d12_translated_draw_test.cpp1
-rw-r--r--runtime/test/d3d12_unmapped_vsharp_test.cpp78
-rw-r--r--runtime/test/d3d12_xmem_placed_test.cpp77
-rw-r--r--runtime/test/depth24_fragment_test.cpp608
-rw-r--r--runtime/test/dstorage_test.cpp255
-rw-r--r--runtime/test/fixtures/tiny_atexit.cpp13
-rw-r--r--runtime/test/gameinput_no_sdl_test.cpp47
-rw-r--r--runtime/test/gameinput_test.cpp31
-rw-r--r--runtime/test/geometry_views_test.cpp136
-rw-r--r--runtime/test/glsl/cs_bindless_dimensions.comp30
-rw-r--r--runtime/test/glsl/cs_group_marker.comp16
-rw-r--r--runtime/test/heavy_pipeline_cache_test.cpp109
-rw-r--r--runtime/test/indirect_clamp_test.cpp203
-rw-r--r--runtime/test/list_value_wait_budget_test.cpp348
-rw-r--r--runtime/test/memory_breakdown_test.cpp118
-rw-r--r--runtime/test/pipeline_cache_store_test.cpp8
-rw-r--r--runtime/test/shaders/check.py4
-rw-r--r--runtime/test/shaders/cs_address_guard.asm57
-rw-r--r--runtime/test/shaders/cs_dpp_cmpx.asm24
-rw-r--r--runtime/test/shadow_keep_test.cpp141
-rw-r--r--runtime/test/title_memory_map_test.cpp45
-rw-r--r--runtime/test/title_va_alias_test.cpp57
-rw-r--r--runtime/test/vk_bindless_dimensions_test.cpp421
-rw-r--r--runtime/test/vk_bindless_test.cpp9
-rw-r--r--runtime/test/vk_test_device.h10
-rw-r--r--runtime/test/vk_xdxr_build_test.cpp53
-rw-r--r--runtime/test/xapu_chad_test.cpp261
-rw-r--r--runtime/test/xapu_opus_test.cpp193
-rw-r--r--runtime/test/xgameruntime_gamesave_test.cpp14
-rw-r--r--runtime/test/xmem_test.cpp46
-rw-r--r--runtime/test/xs_proxy_mock_test.cpp79
-rw-r--r--scripts/build_runtime.ps12
-rw-r--r--scripts/run_address_guard_gpu_test.py133
-rw-r--r--scripts/run_gpu_tests.py5
-rw-r--r--scripts/windows-boot/boot.ps110
-rw-r--r--tests/conftest.py15
-rw-r--r--tests/semantic/fixtures/disasm/cs_address_guard.s35
-rw-r--r--tests/semantic/fixtures/disasm/cs_dpp_cmpx.s15
-rw-r--r--tests/semantic/fixtures/wave64_single_wave_barrier.asm22
-rw-r--r--tests/semantic/test_address_guard.py177
-rw-r--r--tests/semantic/test_dpp_compare.py152
-rw-r--r--tests/semantic/test_fma_mix_literal.py14
-rw-r--r--tests/semantic/test_library_compute_forms.py10
-rw-r--r--tests/semantic/test_loop_ballot_barrier.py21
-rw-r--r--tests/semantic/test_loop_iteration_guard.py9
-rw-r--r--tests/semantic/test_wave64_emulate_opt.py68
-rw-r--r--tests/semantic/test_wave64_halves.py20
-rw-r--r--tests/semantic/test_wave64_single_wave_barrier.py123
-rw-r--r--tests/test_dds_png_dx10.py109
-rw-r--r--tests/test_dstorage_history.py52
-rw-r--r--tests/test_indirect_clamp_telemetry.py5
-rw-r--r--tests/test_make_game_wave64.py70
-rw-r--r--tests/test_tex_export.py30
-rw-r--r--tests/test_tex_headers.py6
-rw-r--r--tests/test_translate.py22
-rw-r--r--tools/address_guard.py110
-rw-r--r--tools/bcpack_history_calib.py2
-rw-r--r--tools/build_dstorage_history.py159
-rw-r--r--tools/dds_png.py224
-rw-r--r--tools/rdna2spirv.py342
-rw-r--r--tools/tex_export.py8
-rw-r--r--tools/tex_headers.py3
-rw-r--r--tools/wave64_emulate_opt.py12
-rw-r--r--tools/wave64_halves.py10
137 files changed, 19934 insertions, 9551 deletions
diff --git a/docs/README.md b/docs/README.md
index 8db9cc080..3aec00ea9 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -13,6 +13,7 @@ method, scope and caveats. No game data is included.
13| [boot_leads.md](boot_leads.md) | Open leads that may move the retail boot further (TLS at module index 0, feature level at device creation, command-list replay, descriptor words, shader corpus count, frame pacing), each with where it lands, how to implement it and how to test it. Hypotheses, not measurements. | 13| [boot_leads.md](boot_leads.md) | Open leads that may move the retail boot further (TLS at module index 0, feature level at device creation, command-list replay, descriptor words, shader corpus count, frame pacing), each with where it lands, how to implement it and how to test it. Hypotheses, not measurements. |
14| [rpf.md](rpf.md) | RPF9 archive layout, the carve tools and the unreadable encrypted TOC. | 14| [rpf.md](rpf.md) | RPF9 archive layout, the carve tools and the unreadable encrypted TOC. |
15| [linux.md](linux.md) | Linux in one page: what runs natively and what runs under Wine or Proton, the Ubuntu packages, `Build.sh`, the runtime cross-build, and why there is no native Linux `gta6rt`. | 15| [linux.md](linux.md) | Linux in one page: what runs natively and what runs under Wine or Proton, the Ubuntu packages, `Build.sh`, the runtime cross-build, and why there is no native Linux `gta6rt`. |
16| [running.md](running.md) | Running the game per platform and GPU (Linux/Wine with AMD, Linux/Proton and Windows with NVIDIA, Windows with AMD, Intel, macOS): build, shaders, pipeline pre-compile, driver settings, environment, what to expect; each value measured by us, reported by others (linked) or TBD. |
16| [testing.md](testing.md) | Running the GPU tests on your own GPU: setup per OS, wave64 emulation, running without a GPU on Mesa llvmpipe, and known problems. | 17| [testing.md](testing.md) | Running the GPU tests on your own GPU: setup per OS, wave64 emulation, running without a GPU on Mesa llvmpipe, and known problems. |
17| [gpu_test_results.md](gpu_test_results.md) | Published GPU test results by hardware, driver and commit, with pass, skip and failure counts. | 18| [gpu_test_results.md](gpu_test_results.md) | Published GPU test results by hardware, driver and commit, with pass, skip and failure counts. |
18| [modding.md](modding.md) | The mod format: `mods/<folder>/mod.json`, checked and loaded in name order by `gta6rt`; a swap takes effect once the game's archetype lookup is hooked (needs the executable, RT-5). A mod names game models and holds no game data. | 19| [modding.md](modding.md) | The mod format: `mods/<folder>/mod.json`, checked and loaded in name order by `gta6rt`; a swap takes effect once the game's archetype lookup is hooked (needs the executable, RT-5). A mod names game models and holds no game data. |
diff --git a/docs/audio_hal_exe_calls.md b/docs/audio_hal_exe_calls.md
index c04943c7d..a500e16fc 100644
--- a/docs/audio_hal_exe_calls.md
+++ b/docs/audio_hal_exe_calls.md
@@ -52,6 +52,26 @@ turns such an address back into a pointer. That is an inference from the shapes;
52`XApuEnqueueCommand` and `XApuDequeueResult` share one handle global, which `XApuDisconnect` clears: a command queue 52`XApuEnqueueCommand` and `XApuDequeueResult` share one handle global, which `XApuDisconnect` clears: a command queue
53with a result queue, connected once and torn down once. How `chad.dll`'s handle relates to it is not read. 53with a result queue, connected once and torn down once. How `chad.dll`'s handle relates to it is not read.
54 54
55`runtime/shims/xapu_queue.cpp` serves the five `xapu.dll` imports and `runtime/shims/xapu_chad.cpp` the five
56`chad.dll` ones.
57The `xapu.dll` signatures, structure layouts, command kinds, option bits and error codes come from Marvisak/VIctory
58(<https://github.com/Marvisak/VIctory>, GPL-3.0-or-later, `crates/victory-hle/src/modules/apu.rs` at commit `ffe310e`),
59which runs the retail executable through these calls. Only the facts are used (see
60[related_projects.md](related_projects.md)); the top of `xapu_queue.cpp` lists them. They agree with the shapes above:
61
62| Shape measured here | What the layout says |
63|---|---|
64| `XApuConnect`: a 24-byte title global first, a 16-byte output second | the global is an input of six dwords (processing kind, streams, commands per stream, memory bytes, frames per output, options); the output is the zeroed memory and a result event |
65| `XApuEnqueueCommand`: a stack-built command whose first dword is 1, 2 or 3 and second a stream slot, then 0 | a 24-byte command id (kind, stream, sequence, options, context): 1 activates, 2 deactivates, 3 processes an Opus packet; the third argument is an optional count of the commands accepted |
66| `XApuDequeueResult`: a 0x50-byte result, read at +0, +4 and +0x34 | the command id at +0, the output byte count at +0x34; `0x8AC81001` while none is ready |
67| `XApuDisconnect`: the handle, then `0x20` | the second argument is not read |
68
69What the results carry is the shim's own: each accepted command gets one result in command order, with the error codes
70of the layout. A process result carries the frame count and PCM when `runtime/opus_decoder` is built, and otherwise the
71frame count of the Opus packet's table-of-contents byte (RFC 6716, section 3.1) with zeros in its output (silence).
72`xapu_chad_test` covers the layouts and the silent path; `xapu_opus_test` covers the decoded path with a generated
73packet.
74
55## `xg_xs.dll` and `XCRDAPI.dll` 75## `xg_xs.dll` and `XCRDAPI.dll`
56 76
57| Import | Sites | What the sites show | 77| Import | Sites | What the sites show |
diff --git a/docs/bvh.md b/docs/bvh.md
index ee4316672..a32b55f9e 100644
--- a/docs/bvh.md
+++ b/docs/bvh.md
@@ -1125,7 +1125,10 @@ elements, so with N elements there are at most (3N - 2) / 4 nodes. `XdxrLayout`
1125sizes for that many when the build is recorded, and the same numbers answer 1125sizes for that many when the build is recorded, and the same numbers answer
1126`GetRaytracingAccelerationStructurePrebuildInfo`. The header's `totalSizeIn64BNodes` counts only the nodes the build 1126`GetRaytracingAccelerationStructurePrebuildInfo`. The header's `totalSizeIn64BNodes` counts only the nodes the build
1127wrote. 1127wrote.
1128A triangle with a NaN vertex gets an empty box (D3D12 treats it as inactive). So do an instance with mask 0, one with 1128A triangle with a NaN vertex gets an empty box (D3D12 treats it as inactive). So does a triangle with a vertex
1129index at or past the geometry's `VertexCount` (every triangle when it is 0): the builder reads no vertex for it, as
1130the index would address past the vertex buffer, possibly by gigabytes (`vk_xdxr_build_test` case
1131`blas_vertex_count`). So do an instance with mask 0, one with
1129no BLAS and one with a singular transform. An instance record holds its BLAS address in 256-byte units in 32 bits, 1132no BLAS and one with a singular transform. An instance record holds its BLAS address in 256-byte units in 32 bits,
1130so BLAS addresses must be below 2^40, as console GPU addresses are. Where device addresses are wider (llvmpipe's are 1133so BLAS addresses must be below 2^40, as console GPU addresses are. Where device addresses are wider (llvmpipe's are
1131host pointers), the builder takes a bias that is added to the addresses read from instance descs. 1134host pointers), the builder takes a bias that is added to the addresses read from instance descs.
diff --git a/docs/d3d12_vulkan.md b/docs/d3d12_vulkan.md
index 43886af30..45d4b4be4 100644
--- a/docs/d3d12_vulkan.md
+++ b/docs/d3d12_vulkan.md
@@ -680,9 +680,13 @@ side inwards:
680 covers a full 2048-sampler D3D12 heap plus room for literal and static S#s. 680 covers a full 2048-sampler D3D12 heap plus room for literal and static S#s.
681 - 2D images: up to 65536. 681 - 2D images: up to 65536.
682 - storage arrays: up to 4096 each, capped by their dimension's sampled array or by 256 for storage-only 1D arrays. 682 - storage arrays: up to 4096 each, capped by their dimension's sampled array or by 256 for storage-only 1D arrays.
683 - 2D-array images up to 16384, 3D and 1D images up to 4096 each (the title streams more cube maps, texture 683 - 2D-array, 3D and 1D images: up to 65536 each, as many as 2D, grown together (one count for the three while the
684 arrays and 1D lookups than the defaults hold: each distinct T# of one takes its own index, and a native boot 684 limits stop them short of it), so no dimension is favoured. A texture keeps an index for each distinct T# of
685 filled the 1024 2D-array and 256 1D indices during the story load). 685 it for as long as it lives, and which dimensions its textures have is the title's choice: a native boot
686 filled the default 1024 2D-array and 256 1D indices during the story load, and world runs filled the 4096 1D
687 indices of the sizes before this with 4092 T#s of 4090 live 1D textures. The bound is memory, not the
688 device's limits (RADV allows 8388606 sampled images): every element of every array is in each generation's
689 descriptor pool, used or not.
686 690
687 Growth leaves 64 descriptors of each limit to the other sets of a pipeline layout. It also stays within 691 Growth leaves 64 descriptors of each limit to the other sets of a pipeline layout. It also stays within
688 `maxPerSetDescriptors`, which never shrinks the default counts, because a layout past it may still be 692 `maxPerSetDescriptors`, which never shrinks the default counts, because a layout past it may still be
@@ -698,9 +702,18 @@ side inwards:
698 shader reads the fallback. `d3d12_descriptor_test` then fills each short array to its last index and checks that 702 shader reads the fallback. `d3d12_descriptor_test` then fills each short array to its last index and checks that
699 the next view and sampler are refused. 703 the next view and sampler are refused.
700 The MS arrays keep their default counts. On an RTX 5070 (driver 621.24, 1048576 of each type 704 The MS arrays keep their default counts. On an RTX 5070 (driver 621.24, 1048576 of each type
701 and 4000 samplers) the set has 65536 2D images, 3936 samplers, 16384 2D-array, 4096 3D and 4096 1D images and 705 and 4000 samplers) the set has 65536 2D, 2D-array, 3D and 1D images each, 3936 samplers and 4096 storage indices
702 4096 storage indices in each dimension: 152929 descriptors, 5-10 MiB at 32-64 bytes a descriptor. The device prints the counts it chose, and 706 in each dimension: 325729 descriptors with the MS pairs, 10-20 MiB at 32-64 bytes a descriptor. RADV (Mesa 26.3,
703 `bindless_sizing_test` checks the rules on synthetic limits. 707 the Raphael iGPU and the RX 7900 XTX) and llvmpipe get the same image counts and 4096 samplers. The device prints
708 the counts it chose (`bindless set:`), `bindless_sizing_test` checks the rules on synthetic limits, and
709 `vk_bindless_dimensions_test` reads 5000 live 1D, 2D-array and 3D images each through their indices in a set
710 sized from the device's own limits.
711 - A T# the title writes into a console descriptor heap that set 0 has no room for is refused, and counted in the
712 heap's `unbound T#s by reason` line, as `the bindless array of the T#'s dimension is full` (or `the bindless
713 storage arrays of the T#'s dimension are full` for a UAV whose dimension has free indices only above the shorter
714 storage arrays), not as `no view for the T#'s format or range`. The first such refusal of a dimension also logs
715 `a bindless image array is full; dimension N (name)` with the indices, the T#s and textures that hold them and how
716 many of those textures are still registered at their address (a texture's indices go back when it goes).
704 - An image view has one index in its dimension (2D, 2D array, 3D, 1D, 2DMS, 2DMS array or 1D array), shared by the 717 - An image view has one index in its dimension (2D, 2D array, 3D, 1D, 2DMS, 2DMS array or 1D array), shared by the
705 bindings for that dimension. The runtime adds sampled-image bindings in pairs for 2DMS and 2DMS array: 718 bindings for that dimension. The runtime adds sampled-image bindings in pairs for 2DMS and 2DMS array:
706 20/21 for floating-point and normalized color, 22/23 for unsigned integers, and 24/25 for signed integers. 719 20/21 for floating-point and normalized color, 22/23 for unsigned integers, and 24/25 for signed integers.
@@ -961,7 +974,8 @@ The compute path, end to end:
961 primitive overestimation no greater than `0.5 - 1/512` pixels, leaving half a minimum grid step within the 974 primitive overestimation no greater than `0.5 - 1/512` pixels, leaving half a minimum grid step within the
962 Tier 1 uncertainty bound. `ConservativeRaster=ON` uses overestimate mode with zero extra overestimation, 975 Tier 1 uncertainty bound. `ConservativeRaster=ON` uses overestimate mode with zero extra overestimation,
963 including unbound-attachment variants. OFF keeps the ordinary pipeline. Missing support, unknown modes, 976 including unbound-attachment variants. OFF keeps the ordinary pipeline. Missing support, unknown modes,
964 wireframe and non-triangle PSOs are refused; conservative TIR (`ForcedSampleCount != 0`) remains `E_NOTIMPL`. 977 wireframe and non-triangle PSOs are refused (a mesh PSO needs no topology type: its module has to output
978 triangles, `conservative_raster::mesh_outputs_triangles`); conservative TIR (`ForcedSampleCount != 0`) remains `E_NOTIMPL`.
965 Tier 2 additionally requires `degenerateTrianglesRasterized` and primitive overestimation plus half a 979 Tier 2 additionally requires `degenerateTrianglesRasterized` and primitive overestimation plus half a
966 device subpixel step no greater than 1/256 pixel. Other eligible devices retain Tier 1. The standalone 980 device subpixel step no greater than 1/256 pixel. Other eligible devices retain Tier 1. The standalone
967 device does not expose Tier 3: the Xbox `SV_InnerCoverage` input mapping has not been confirmed. See 981 device does not expose Tier 3: the Xbox `SV_InnerCoverage` input mapping has not been confirmed. See
@@ -1301,7 +1315,8 @@ and any validation error fails them.
1301- `indirect_clamp_test`: the `ExecuteIndirect` argument clamp pass itself (section 4.7), with no game files: every 1315- `indirect_clamp_test`: the `ExecuteIndirect` argument clamp pass itself (section 4.7), with no game files: every
1302 argument kind (draw, draw indexed, dispatch, mesh dispatch) and the counted variants, in-range records 1316 argument kind (draw, draw indexed, dispatch, mesh dispatch) and the counted variants, in-range records
1303 bit-identical, garbage records bounded, records and counts past `max_command_count` empty, and the per-batch work 1317 bit-identical, garbage records bounded, records and counts past `max_command_count` empty, and the per-batch work
1304 budget saturating; clean SKIP without a Vulkan device. 1318 budget saturating; dispatch records bounded by the device's `maxComputeWorkGroupCount` (70 000 x 1 x 1 kept and run
1319 where the device allows it, cut and counted where it does not); clean SKIP without a Vulkan device.
1305- `d3d12_gcl8_test`: the public `ID3D12GraphicsCommandList8` surface: `QueryInterface` for its IID, 1320- `d3d12_gcl8_test`: the public `ID3D12GraphicsCommandList8` surface: `QueryInterface` for its IID,
1306 `OMSetFrontAndBackStencilRef(1, 2)` with the recorded values, and the reference count around the query. It 1321 `OMSetFrontAndBackStencilRef(1, 2)` with the recorded values, and the reference count around the query. It
1307 creates only an allocator and a list, so it needs no GPU or Vulkan loader. 1322 creates only an allocator and a list, so it needs no GPU or Vulkan loader.
@@ -1697,6 +1712,21 @@ The copies:
1697 cannot fit between the title's address reservations can use a separate mapped buffer. The buffer's device address 1712 cannot fit between the title's address reservations can use a separate mapped buffer. The buffer's device address
1698 must fit as a positive 47-bit offset from the arena base. The same window cap and dirty-page refresh apply. 1713 must fit as a positive 47-bit offset from the arena base. The same window cap and dirty-page refresh apply.
1699 `LEONIDA_STREAM_BUFFER_WINDOWS=0` requires the window to fit in the arena. 1714 `LEONIDA_STREAM_BUFFER_WINDOWS=0` requires the window to fit in the arena.
1715- **What the GPU wrote goes back.** The same return copy serves slot-133 shadows (a buffer the driver would not
1716 import, a compute result the title reads again): the ranges are recorded through the alias of the buffer's pages and
1717 the tracker there carries them back. `d3d12_placed_write_back` covers it. A copy is a read-side mirror, so a UAV or a raw write into a window would land in
1718 the copy and the title would never see it ([#1537](https://github.com/ubiquitarianism/leonida/issues/1537), the
1719 `WRITE_INVALID` stop at the world start). Every title range a submission's bindings reach is kept, and the next
1720 refresh copies those ranges from the copy to the title's pages *before* it copies the pages forward, so a page the
1721 title itself wrote in between keeps the title's newer bytes and its GPU result is dropped. The copy back asks the
1722 write watch first (the refresh's own asking comes after it, so a hot page's last answer is a submission old), passes
1723 over pages whose mapping changed, that a kernel write may be filling or that xmem maps at another address too, and
1724 writes only the 256-byte pieces where the copy differs from the title's bytes: a read-only view writes nothing and
1725 its pages stay guarded. Up to 8,192 ranges and 64 MiB a submission (a V# has no read/write bit, so every view
1726 reached is compared; past the caps the ranges are left behind, logged once). `LEONIDA_TITLE_WRITEBACK=0` turns it off. A batch is fenced: it is kept with the ticket
1727 of the submission that will use it and copied back only when the context reports that ticket retired, so a range
1728 another submission is still writing is never read half done. A queue held deep (console ordering) can leave batches
1729 waiting: past 64 of them the oldest go back without their ticket, logged once.
1700- A **window that is refused** (the budget is spent, the arena is full, or the pages are not committed yet) is backed 1730- A **window that is refused** (the budget is spent, the arena is full, or the pages are not committed yet) is backed
1701 by a persistent geometry copy of exactly the requested range (`LEONIDA_GEOMETRY_MB`) instead; when no copy can be 1731 by a persistent geometry copy of exactly the requested range (`LEONIDA_GEOMETRY_MB`) instead; when no copy can be
1702 made either, the view is written with **no base and no records** — loads return 0 and stores are dropped. A raw 1732 made either, the view is written with **no base and no records** — loads return 0 and stores are dropped. A raw
@@ -1719,6 +1749,19 @@ The copies:
1719 encoding reuses only an independently established geometry view. An explicit table or placed SRV can 1749 encoding reuses only an independently established geometry view. An explicit table or placed SRV can
1720 establish that view. The Vulkan memory probe reports populated views, payload and reserved bytes, 1750 establish that view. The Vulkan memory probe reports populated views, payload and reserved bytes,
1721 upload totals, cap refusals and allocation failures. 1751 upload totals, cap refusals and allocation failures.
1752 - **Where the copies live**: device-local memory through the BAR by default. `LEONIDA_GEOMETRY_HOST=1` puts them
1753 in system memory outside VRAM (write-back where the device offers a cached host type, `=2` write-combined),
1754 as VIctory keeps its copies of title memory (approach only). In a world run on the RX 7900 XTX the copies held
1755 4.4-6 GB of VRAM. The cost moves to the bus: the GPU reads every vertex and index of a copy from system memory,
1756 so a geometry-heavy pass can take longer; measure frame time with and without it before making it a default.
1757 - **When a copy goes**: a view is retired when its title range is freed, decommitted or unmapped. A remap of
1758 physical pages retires nothing: the copies follow the new pages through the refresh. A retired
1759 view leaves the lookups at once, its alias ranges and translated heap slots are invalidated, its stream-pool
1760 extent is forgotten, and its memory is freed only after every ExecuteCommandLists replay in progress at the
1761 retirement has recorded its submissions and those have completed (`kAfterExecutes`). Before it leaves the
1762 refresh it is copied once more from its pages if they are still readable (a heap block freed in memory that
1763 stays committed). The next view of the range makes a new copy.
1764 `geometry_views_test` cases 14-16 cover this without a GPU.
1722- **Which pages changed** since the last refresh: where xmem reserved the title's memory with `MEM_WRITE_WATCH` 1765- **Which pages changed** since the last refresh: where xmem reserved the title's memory with `MEM_WRITE_WATCH`
1723 (`XMemVirtualAlloc`'s ordinary regions and the title's `VirtualAlloc` reservations, not placeholders or 1766 (`XMemVirtualAlloc`'s ordinary regions and the title's `VirtualAlloc` reservations, not placeholders or
1724 physical-page windows), the kernel says (`GetWriteWatch` with reset, its answers kept for every copy over the page: 1767 physical-page windows), the kernel says (`GetWriteWatch` with reset, its answers kept for every copy over the page:
@@ -1730,6 +1773,15 @@ The copies:
1730 write-fault handler waits for the trackers' locks while the faulting thread may hold the process heap's lock (the 1773 write-fault handler waits for the trackers' locks while the faulting thread may hold the process heap's lock (the
1731 title's `XMemAlloc` blocks are `_aligned_malloc`'s), so the state changed under those locks allocates from a heap of 1774 title's `XMemAlloc` blocks are `_aligned_malloc`'s), so the state changed under those locks allocates from a heap of
1732 the runtime's own (`leonida::host_heap`), never the process heap. 1775 the runtime's own (`leonida::host_heap`), never the process heap.
1776- **What the GPU wrote into a copy stays** until the title changes the bytes under it. Some pages are copied at
1777 every refresh without a sign that the title wrote them (mapped at two addresses, left writable, reopened with the
1778 64 KiB around a written page, write-watched or pinned); copied whole, they overwrote a value a compute program had
1779 stored in the copy for the next frame with the title's unchanged bytes, so it read back as the title's old value
1780 every other frame. `ShadowPages` keeps a 64-bit sum per 256-byte piece of the bytes it copied last
1781 (`runtime/src/shadow_keep.h`) and copies a piece only when the title's bytes differ; a piece zeroed because its page
1782 went away is copied again in full once it comes back. Limit: a title that writes the same bytes again to reset a
1783 value the GPU changed is not seen (that needs the GPU's writes to reach the title's pages). `LEONIDA_SHADOW_KEEP=0`
1784 copies every page as before.
1733- **Only the title's memory** gets a copy: the blocks and ranges the xmem shims hand the title (`XMemAlloc`, 1785- **Only the title's memory** gets a copy: the blocks and ranges the xmem shims hand the title (`XMemAlloc`,
1734 `XMemAllocDefault`, `XMemVirtualAlloc`, the title's `VirtualAlloc`). An address anywhere else, the runtime's or a 1786 `XMemAllocDefault`, `XMemVirtualAlloc`, the title's `VirtualAlloc`). An address anywhere else, the runtime's or a
1735 host DLL's memory included, is left as it was and counted, as is an arena VA or a buffer the layer made. 1787 host DLL's memory included, is left as it was and counted, as is an arena VA or a buffer the layer made.
@@ -1805,6 +1857,178 @@ fit on smaller PC GPUs. This is a product requirement, not something the layer c
1805compatible single-mip RGBA8 2D textures (section 4.2). Other descriptions have fully allocated backing. Wider 1857compatible single-mip RGBA8 2D textures (section 4.2). Other descriptions have fully allocated backing. Wider
1806texture coverage and the game's use of tile streaming remain open. 1858texture coverage and the game's use of tile streaming remain open.
1807 1859
1860**Diagnostics for descriptors the title builds itself** (all off by default, logging only unless said otherwise):
1861
1862- `LEONIDA_UNKNOWN_TSHARP=1`: one line for each distinct base address a title-written T# names with no texture there
1863 (its shape, the tiling bits and whether the address is title memory), up to 300 addresses, and every 8192 such
1864 lookups a summary by format, type and tiling.
1865- `LEONIDA_UNBACKED_VSHARP=1`: the buffer V#s `fix_vsharp` writes empty because nothing backs their base; one line for
1866 each of the first 120 distinct bases and every 8192 a summary by 4 GiB range of the base.
1867- `LEONIDA_UPLOAD_LOG=1` (`d3d12_xs_device.cpp`): each upload chunk (CPU base, device address, size) and the first 96,
1868 then every 8192nd, `AllocateUploadMemory` result as an offset into its chunk.
1869- `LEONIDA_UPLOAD_ALIAS=1` (an experiment, changes behaviour): enters each upload chunk's CPU range in the title VA
1870 table, so a V# the title wrote with the CPU pointer `AllocateUploadMemory` handed it is rewritten to the chunk
1871 instead of left empty. A chunk below the arena needs `LEONIDA_IMPORT_BELOW_ARENA=1` as well.
1872
1873#### Address guard (`LEONIDA_ADDRESS_GUARD=1`, `rdna2spirv.py --address-guard`)
1874
1875**Prototype, off by default.**
1876
1877**Why.** The layer rewrites the addresses it can see: root views, the V#s it writes, and the V#s the title writes into
1878shader-visible heaps. It writes an empty V# when nothing backs an address (above). The translator checks a V#'s
1879record count but not its base. Any other address becomes `heap_base` plus an arbitrary value:
1880- a V# a shader builds in SGPRs from data;
1881- a raw `global_`/`flat_` address (530 of the 26,503 shaders of package 1.0.2.1, 69 of the 2,684 pipeline-library
1882 programs);
1883- a stale or offset-like value.
1884
1885On RADV such an access page-faults. Two RX 7900 XTX runs (Mesa 26.3.1, under Wine) ended with the same sequence:
1886- a `gfxhub` fault from client TCP with PERMISSION_FAULTS 0x3;
1887- a compute-ring timeout and "MES failed to respond";
1888- a MODE1 reset ("VRAM is lost").
1889
1890Both faults were 4.8 GiB and 20 GiB above `heap_base`, past the arena's end.
1891
1892"Inside the arena" is not the right bound. Several buffers are legitimately outside it, at a positive offset from
1893`heap_base` (a negative one with `LEONIDA_IMPORT_BELOW_ARENA=1`):
1894- geometry copies;
1895- upload and readback buffers;
1896- imported title memory;
1897- separate window buffers.
1898
1899The guard checks each access against what the runtime actually backs. An access that fails reads 0 and drops its
1900store, so a wild address never reaches the GPU. The overall process follows VIctory
1901([`crates/victory-gpu/src/memory.rs`](https://github.com/marvisak/victory), GPL-3.0). Its page table of 64 KiB pages
1902routes every computed address, and memory no copy holds reads 0 and takes no writes. The structure below is our own:
1903VIctory's table names descriptor views, this one is a bitmap over device addresses.
1904
1905**Structure: a two-level page table of 4 KiB pages over the 48-bit offset space, behind an arena compare.** The
1906check works on the heap offset, the sign-extended 48-bit value `Gen.host_addr` adds to `heap_base`:
1907- **Level 1:** 65,536 words indexed by offset bits 47..32. Each word names the level-2 block of one 4 GiB chunk.
1908- **Level 2:** blocks of 32,768 words, one bit per 4 KiB page (bits 31..12).
1909- **Two fixed blocks:** block 0 is empty and block 1 is full; allocated blocks start at 2.
1910- **Size:** the table is a host-visible buffer of its own, 256 KiB plus 128 KiB per block (8.25 MiB for 62 blocks).
1911
1912Why this structure:
1913- **Pages of 4 KiB** are the GPU's own mapping granularity. A page any byte of a backing touches is mapped as a whole,
1914 so marking pages outward is exact for faults. A 64 KiB page would mark memory that may not be mapped.
1915- **Level 1 by 4 GiB chunk** covers the whole signed 48-bit space (negative offsets index from 0x8000 up). A real run
1916 touches a handful of chunks, so the table stays small.
1917- **Other structures cost more per access.** A sorted range table needs a binary search: about 10 dependent loads for
1918 a thousand backings, against 2 here. A coarse region bitmap plus a fine range table needs a search in the fine part.
1919- **The arena needs no lookup.** It is one fully bound `VkBuffer`, so any offset below its size passes on a compare.
1920 That is the common case: descriptor heaps, default-heap buffers and windows in the arena.
1921
1922**The header.** It sits at arena offset `0x70000`, after the zero page and the quad indices, and holds:
1923- a 64-bit magic (`"LGUARD01"`);
1924- the arena's size (the compare's limit);
1925- the table's address minus `heap_base`;
1926- a refusal count and the last refused offset, which the shaders write.
1927
1928Two sinks follow the header: `0x71000` (zero area, what refused loads read) and `0x78000` (dump area, where refused
1929stores and atomics go). None of `[0x70000, 0x80000)` is handed out. With `LEONIDA_ARENA_NULL_MB` the range lies in the
1930null region, so its offset never moves. `runtime/src/address_guard.h` and `tools/address_guard.py` (the Python
1931reference) hold the format.
1932
1933**Each access.** `Gen.host_addr` takes the access kind (load, store or atomic) and its span. Under `--address-guard`
1934it calls one function per module, `%guard_fn`, which is straight-line at the call site, so no caller's block
1935structure changes. The function computes `end = offset + span - 1` and then decides:
1936- **Passes on a compare:** the runtime's guard is off (no magic), or `offset` and `end` are both below the limit. The
1937 result is `heap_base + offset`. The cost is a 64-bit add, two 64-bit compares and a select.
1938- **Otherwise, a lookup:** the bits of the pages of `offset` and of `end`. That is two independent pairs of dependent
1939 32-bit loads (level 1, then level 2).
1940- **Refused:** an access whose bits are not both set adds 1 to the header's count, writes its offset, and goes to the
1941 zero area (a load) or the dump area (a store or atomic), at its offset within its page. Alignment is kept, and every
1942 span fits inside a sink.
1943- **Atomics** run on the dump area, and their returned value is replaced by 0 (`Gen.guard_zero`). The CAS loops (float
1944 min/max, inc/dec) end there too, as on any other memory.
1945
1946The entry block reads the header's first six dwords once per invocation, from the arena, so that read is always
1947backed. When the base is uniform, as for `s_load`, `s_buffer_load` and a V# from SGPRs plus a uniform offset, the
1948compiler keeps the whole check scalar: one check per instruction, not per lane. A per-lane address (`global_` with a
1949VGPR address, `offen`/`idxen`) is checked per lane, and the slow path runs only for lanes outside the arena.
1950
1951**What is checked.** Every `heap_base` access goes through `host_addr`:
1952- buffer loads and stores (dword, sub-dword, typed, format; swizzled spans are computed at run time);
1953- `global_` loads, stores, sub-dword and atomics;
1954- buffer atomics, `_x2` included;
1955- `s_load` and `s_buffer_load`;
1956- the BVH node reads of `image_bvh*_intersect_ray` (span by node type).
1957
1958These are not checked:
1959- images (T#s go through the hash table, not an address);
1960- LDS;
1961- the `--mesh-compute` output buffer (a runtime address);
1962- `s_getpc` code reads.
1963
1964The translator does not translate `flat_` instructions (they raise `Unsupported`), so none reaches memory today. A
1965translation added later must go through `host_addr` like `global_` does.
1966
1967**Keeping the table current.** The spans are the same backings the console heap pass's backed table uses
1968(`update_gpu_backed`):
1969- every `gpu_backings` entry outside the arena (upload and readback buffers, imports, slot-133 buffers, windows
1970 outside the arena);
1971- the geometry copies' blocks;
1972- the separate window buffers' blocks.
1973
1974`update_address_guard` runs in the queue's `before_execute`, after the heap refresh, the windows and the geometry
1975copies. It differs from that table in four ways:
1976- It rebuilds whenever `backing_generation` or a block layout changed, with no 100 ms limit, because a backing made
1977 since the last submission must not read 0.
1978- It writes only the words that changed, level 2 before level 1.
1979- A chunk keeps its block for good, so a submission still in flight never reads a block that now means another chunk.
1980- When the 62 blocks run out, a new chunk gets the full block (unchecked, as without the guard), and that is logged.
1981
1982A release clears its bits at the next submission. D3D12 forbids releasing memory the GPU still uses, so only a wild
1983access in flight at that moment could still pass.
1984
1985**Cost per access:**
1986- **Fast path:** about 8 scalar or vector ALU operations.
1987- **Outside the arena:** about 40 operations and 4 loads, from a table small enough to stay in cache.
1988- **Per invocation:** 6 uniform header loads.
1989- **Per submission (runtime):** nothing until a backing changes, then a rebuild of the used blocks (128 KiB each)
1990 and a diff.
1991
1992**Switches.**
1993- `--address-guard` records `"address_guard": true` in `index.json`.
1994- `LEONIDA_ADDRESS_GUARD=1` makes the runtime reserve the range, create the table and write the header.
1995- Either alone does nothing: a guarded module on a runtime without the guard finds no magic, and every access passes
1996 after one compare.
1997- Without the flag the module is byte for byte what it was.
1998
1999**What a run with the guard shows.**
2000- One line when the device is made: `[rt] d3d12: address guard on ...`.
2001- At most one line a second: `[rt] d3d12: address guard: N access(es) refused so far (+k), the last at heap offset
2002 0x...`. Each refusal is a wild access that would have reached the GPU. The offset says where to look (above the
2003 arena's end, as in the two faults).
2004- A run that reset the GPU before should keep going, with wrong pixels where a refused access mattered.
2005
2006**Risks and open points.**
2007- A refused access that mattered (a backing the layer never registered) now reads 0 instead of faulting. That is
2008 silent apart from the count.
2009- An access is checked as a whole. A multi-dword load whose first dwords are inside a V# and a backing, but whose
2010 last dword is past both on an unbacked page, reads 0 in full.
2011- The table is read through the GPU's caches. A page whose bit changes while a submission is in flight can be seen
2012 either way by that submission.
2013- Sparse buffers outside the arena are guarded only if they are registered as backings.
2014
2015**Checked:**
2016- `tests/semantic/test_address_guard.py`: the fixture `cs_address_guard` with the guard on, with it off at run time
2017 and without the flag, through `spirv_mini_interp`; the kind and span of each instruction family; the table model;
2018 the constants shared by the translator, the runtime and `tools/address_guard.py`.
2019- `runtime/test/address_guard_test.cpp`: the page table, incremental writes, negative offsets, wrap, chunks and
2020 overflow.
2021- `scripts/run_address_guard_gpu_test.py`: the fixture on a 2 MiB heap whose table backs one page outside the
2022 "arena". Every address it touches is inside the buffer, so no run can fault. With the guard on, the refused loads
2023 read 0 although memory is there, the store and the atomic land in the dump area and the count is 6. With the guard
2024 off, the same module reads that memory. It passed on lavapipe (Mesa 26.3.1).
2025- Corpus (package 1.0.2.1, 2026-11-26):
2026 - `--shard 0/8` of the shaders: 3,313 translated and 3,313 `spirv-val`-valid, with the guard and without.
2027 - The pipeline library: 2,683 of 2,684 translated and valid, with the guard and without (the same one fails
2028 either way).
2029 - Without the flag, every module is byte for byte the same as before the change.
2030 - With it, the SPIR-V grows by 1.8% (shaders) and 1.6% (library).
2031
1808### 3.4 Descriptor heaps and the bindless model 2032### 3.4 Descriptor heaps and the bindless model
1809 2033
1810The game can use D3D12 descriptors in three ways, and the layer must handle all of them: 2034The game can use D3D12 descriptors in three ways, and the layer must handle all of them:
@@ -1874,8 +2098,18 @@ The game can use D3D12 descriptors in three ways, and the layer must handle all
1874 heap pointers read by the mesh and pixel stages after a rebind. `d3d12_mesh_test` checks the recorded dwords 2098 heap pointers read by the mesh and pixel stages after a rebind. `d3d12_mesh_test` checks the recorded dwords
1875 for a vertex draw, a resource-only rebind, a signature ending at s30 and one on the s0 layout. 2099 for a vertex draw, a resource-only rebind, a signature ending at s30 and one on the s0 layout.
1876 Set `LEONIDA_GRAPHICS_DIRECT_HEAPS=0` to restore the previous draw arguments. 2100 Set `LEONIDA_GRAPHICS_DIRECT_HEAPS=0` to restore the previous draw arguments.
1877 Missing console V# backing leaves a settled zero descriptor. Every 32 submissions a heap probes up to 2101 Missing console V# backing leaves a zero descriptor in the copy. Each V# half of a console resource heap's copy
1878 eight of these slots in round-robin order, including independent UAV-counter failures. 2102 (the buffer V# and the UAV counter) has a record in host RAM of what it resolved to: the title's base and span,
2103 the device address its copy names, and whether it resolved or waits (`src/console_heap_slot_records.h`, written
2104 only by `fix_console_slot`). Two indexes find the halves near a range, by base and by target, per power-of-two
2105 span class and 64 KiB-or-larger granule. Releases (a backing, a title-window or geometry block), alias ranges
2106 removed or replaced (`TitleVaAliases` tells its listeners as it happens, `forget_copy` included) and additions
2107 (a backing, an alias range, title memory) go on an unbounded per-device list; at the next submission each heap
2108 fixes again exactly the slots whose records a change touches: a release or removal every half naming it, an
2109 addition the waiting halves over it. Nothing walks the heap or reads the copy for this. A zeroed range, a slot
2110 the title rewrote and a heap destroyed drop their records. `console_heap_slot_records_test` checks that a release
2111 of a buffer 10 of 60,010 slots name looks at those 10, and compares the copy with a full re-resolution through
2112 random writes, releases, additions and alias changes.
1879 Console resource heap copies and shader-visible CBV/SRV/UAV heaps with at least 65,536 slots request 2113 Console resource heap copies and shader-visible CBV/SRV/UAV heaps with at least 65,536 slots request
1880 64 MiB of zeroed padding after their last descriptor. `LEONIDA_HEAP_GUARD_MB` sets the padding in MiB 2114 64 MiB of zeroed padding after their last descriptor. `LEONIDA_HEAP_GUARD_MB` sets the padding in MiB
1881 (0 disables it). When arena space is tight, allocation can fall back to the heap alone. Only indices 2115 (0 disables it). When arena space is tight, allocation can fall back to the heap alone. Only indices
@@ -2413,13 +2647,33 @@ Pipeline creation:
2413 merges into the offline seed. `LEONIDA_DIRECT_SESSION_CACHE=0` also uses a merge when only the session exists. 2647 merges into the offline seed. `LEONIDA_DIRECT_SESSION_CACHE=0` also uses a merge when only the session exists.
2414 The files must match the Vulkan vendor, device and pipeline-cache UUID. Vulkan supplies an opaque snapshot. 2648 The files must match the Vulkan vendor, device and pipeline-cache UUID. Vulkan supplies an opaque snapshot.
2415 Replacing part of the previous file would corrupt it. 2649 Replacing part of the previous file would corrupt it.
2416 `LEONIDA_PIPELINE_CACHE_BYTES` caps session writes (256 MiB by default, zero disables the session file). 2650 `LEONIDA_PIPELINE_CACHE_BYTES` caps what a session adds, at a checkpoint or at teardown (an offline `pipeline_cache.bin` seed, which the driver hands back as part of the union, is not counted; 4 GiB by default, zero disables
2651 the session file).
2652 The session file can't keep a crashed run's compiles: it is written at teardown and at the optional checkpoints
2653 below only. The heavy pipeline cache (RT-HEAVY-PIPELINE-CACHE, `runtime/src/heavy_pipeline_cache.h`) keeps the graphics ones; compute pipelines go to the per-pipeline journal
2654 described below. Every graphics build first asks the corpus cache with
2655 `VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT`. A pipeline the corpus doesn't have is built against a
2656 second cache, seeded from `pipeline_cache.heavy.bin` next to `pipeline_cache.bin`, so that cache holds only the
2657 corpus's misses.
2658 A build that takes at least `LEONIDA_HEAVY_PIPELINE_CACHE_MS` (500 by default) marks the heavy cache for writing.
2659 A thread of its own writes it whole: 3 s after the newest slow build, and no later than 20 s after the first unwritten
2660 one, through the same staging file and rename as the session cache. A crash therefore loses at most the last 20 s
2661 of slow builds, and the next launch starts with the rest. A write that fails, or whose
2662 `vkGetPipelineCacheData` returns anything but `VK_SUCCESS` (`VK_INCOMPLETE` means the cache grew after the size
2663 query, so the blob is truncated), leaves the previous file in place and the cache dirty: it is tried again 5 s
2664 later, the delay doubling with each failure in a row up to 2 min, so the cache is not left unsaved until teardown
2665 and a write that keeps failing does not spin. At device teardown the thread stops, and the cache is
2666 written if any build went into it. Fast builds are kept that way: without an offline seed every build is a miss,
2667 so they no longer reach `pipeline_cache.session.bin`. `LEONIDA_HEAVY_PIPELINE_CACHE_MS=0` turns the heavy cache off, and with it the
2668 `pipelineCreationCacheControl` feature unless `LEONIDA_PIPELINE_COMPILE=cache-only` asks for it. A cache-only create
2669 (`cache-only`) is left as it is.
2417 `LEONIDA_SKIP_COMPUTE=<part of a name>[,<part>...]` (`all`: every compute program) never builds the matching 2670 `LEONIDA_SKIP_COMPUTE=<part of a name>[,<part>...]` (`all`: every compute program) never builds the matching
2418 compute programs and drops their dispatches, direct and indirect; the first dropped dispatch of each is logged. 2671 compute programs at play and drops their dispatches, direct and indirect; the first dropped dispatch of each is
2419 It is a way past a program that hangs the GPU while the program or its input is fixed, not a fix. 2672 logged. It is a way past a program that hangs the GPU while the program or its input is fixed, not a fix.
2673 `--precompile-pipelines` (below) builds them anyway unless it is given `--skip-listed`.
2420 `LEONIDA_STARTUP_CACHE_CHECKPOINTS=1` also schedules a snapshot after a successful pipeline build, 2674 `LEONIDA_STARTUP_CACHE_CHECKPOINTS=1` also schedules a snapshot after a successful pipeline build,
2421 at most once per 120 seconds. It starts on the compile worker when queued builds have drained and the device 2675 at most once per 120 seconds. It starts on the compile worker when queued builds have drained and the device
2422 has no active builds. These snapshots have an additional 512 MiB ceiling. The driver fills a mapped staging 2676 has no active builds. The driver fills a mapped staging
2423 file directly. A successful snapshot atomically replaces the session. An interrupted write preserves the 2677 file directly. A successful snapshot atomically replaces the session. An interrupted write preserves the
2424 previous cache; the next launch removes unheld staging files older than ten minutes. 2678 previous cache; the next launch removes unheld staging files older than ten minutes.
2425 While the compute warm-up has builds queued that idle checkpoint never starts, and a boot that ends by a crash, 2679 While the compute warm-up has builds queued that idle checkpoint never starts, and a boot that ends by a crash,
@@ -2455,7 +2709,8 @@ Pipeline creation:
2455 folders can share one; the file names and the driver's checks keep a pipeline from one build from being taken 2709 folders can share one; the file names and the driver's checks keep a pipeline from one build from being taken
2456 for another's. 2710 for another's.
2457 `gta6rt --precompile-pipelines [--threads N] [--big-threads N] [--all] [--smallest-first] [--limit N] 2711 `gta6rt --precompile-pipelines [--threads N] [--big-threads N] [--all] [--smallest-first] [--limit N]
2458 [--min-bytes N] [--max-bytes N] [--filter PART]... [--list]` fills the journal ahead of play, with no game: it 2712 [--min-bytes N] [--max-bytes N] [--filter PART]... [--skip-listed] [--list]` fills the journal ahead of play, with
2713 no game: it
2459 creates the Vulkan device as `--run` does (so the same environment gives the same journal names and driver keys: 2714 creates the Vulkan device as `--run` does (so the same environment gives the same journal names and driver keys:
2460 LEONIDA_SHADERS, LEONIDA_PIPELINE_CACHE_DIR, and LEONIDA_DEVICE_FAULT/LEONIDA_AFTERMATH, whose diagnostics config 2715 LEONIDA_SHADERS, LEONIDA_PIPELINE_CACHE_DIR, and LEONIDA_DEVICE_FAULT/LEONIDA_AFTERMATH, whose diagnostics config
2461 makes other pipelines) and builds every compute entry of the library through the dispatch path 2716 makes other pipelines) and builds every compute entry of the library through the dispatch path
@@ -2465,6 +2720,19 @@ Pipeline creation:
2465 4 threads: modules of 3.6-5.8 MB took 46-145 s each, 12 in 312 s, about 3.5 GB of host memory each while in the 2720 4 threads: modules of 3.6-5.8 MB took 46-145 s each, 12 in 312 s, about 3.5 GB of host memory each while in the
2466 driver (14.5 GB peak for four). Graphics pipelines are not covered: they are built at a title's draw from its PSO 2721 driver (14.5 GB peak for four). Graphics pipelines are not covered: they are built at a title's draw from its PSO
2467 description and the bound formats, and take milliseconds. 2722 description and the bound formats, and take milliseconds.
2723 `LEONIDA_SKIP_COMPUTE` does not narrow the build: it is a play-time setting, players run the pre-compile with the
2724 game's environment, and a program left out here would stay out of the journal after the list is shortened. The run
2725 says how many entries the list names and builds them; `--skip-listed` leaves them out on purpose. The last line
2726 counts what was built (compiled, or found in a cache), what was journaled already or being built by another
2727 process, what failed, and what was left out and why: by `--skip-listed`, not buildable on this device (no SPIR-V,
2728 set-0 bindings without a bindless set, workgroup memory over the limit), or filtered out (`--filter`, the size
2729 bounds, `--limit`). The 89-167 s per program behind the skip list of the large `library/` programs came from
2730 wave64-emulated packs. Measured with a native wave64 pack on an RX 7900 XTX (RADV, Mesa 26.3.1, Wine): all 721
2731 programs of 2 MiB or more built, 360 of them in 170 s on 32 threads, 2.5-32 s each, the largest (13 MiB) in 28.5 s
2732 alone, at a peak of 14 GiB of RAM for the process. With all of them in the journal and no skip list, two world runs
2733 took them all from the journal (none built in the game) and ended as runs with the skip list do, in an idle-queue
2734 device loss or a stop with the GPU idle ([running.md](running.md#settings-every-platform-needs)); whether their
2735 output is correct is not measured.
2468 `LEONIDA_COMPILE_HELPER=1` (`shims/d3d12_compile_helper.h`) keeps first-ever compiles out of the title's process: 2736 `LEONIDA_COMPILE_HELPER=1` (`shims/d3d12_compile_helper.h`) keeps first-ever compiles out of the title's process:
2469 the driver's locks, which a long `vkCreateComputePipelines` holds and a `vkQueueSubmit` of the same process waits 2737 the driver's locks, which a long `vkCreateComputePipelines` holds and a `vkQueueSubmit` of the same process waits
2470 for, are per process. A compute build of `LEONIDA_COMPILE_HELPER_MIN_BYTES` or more (128 KiB) with no journal file 2738 for, are per process. A compute build of `LEONIDA_COMPILE_HELPER_MIN_BYTES` or more (128 KiB) with no journal file
@@ -4098,11 +4366,22 @@ Not implemented yet:
4098 `LEONIDA_SKIP_COMPUTE`) or mistranslates leaves whatever the memory held: a dispatch of billions of groups or a 4366 `LEONIDA_SKIP_COMPUTE`) or mistranslates leaves whatever the memory held: a dispatch of billions of groups or a
4099 draw of four billion vertices runs until the host resets the display driver. One small compute pass per 4367 draw of four billion vertices runs until the host resets the display driver. One small compute pass per
4100 `ExecuteIndirect` call copies the active records into device-local scratch with their values bounded - 2^24 4368 `ExecuteIndirect` call copies the active records into device-local scratch with their values bounded - 2^24
4101 vertices or indices, 2^26 vertex instances (count times instances), 65 535 groups per dimension, 2^20 groups per 4369 vertices or indices, 2^26 vertex instances (count times instances), the device's `maxComputeWorkGroupCount` groups
4102 dispatch and a 2^27-unit work budget per call that saturates through an atomic compare-and-swap - and writes an 4370 per dimension for a dispatch (65 535 for a mesh dispatch), 2^20 groups per dispatch and a 2^27-unit work budget per
4371 call that saturates through an atomic compare-and-swap - and writes an
4103 empty record past `min(count, max_command_count)` and past the budget, and the clamped count word a `*Count` draw 4372 empty record past `min(count, max_command_count)` and past the budget, and the clamped count word a `*Count` draw
4104 then reads (so the count is at most `maxDrawCount`, VUID-vkCmdDrawIndirectCount-countBuffer-02717). The indirect 4373 then reads (so the count is at most `maxDrawCount`, VUID-vkCmdDrawIndirectCount-countBuffer-02717). A draw record
4105 command reads that scratch. A draw emits the pass before its rendering scope opens: `vkCmdCopyBuffer` and a 4374 of 2^23 vertices or indices an instance or more is a slot the title has not filled: it runs empty and charges
4375 nothing (RT-INDIRECT-DRAW-UNFILLED-COUNT). Before, each was cut to 2^24 and charged that, so eight of them used up
4376 the budget and every later draw in the list ran empty; a census in a VIctory fork found 90 such records in one
4377 list. A dispatch record's groups per dimension follow the device (#2230): the title's tile
4378 passes ask for 67 440 groups in x at 2560x1440 (found in the VIctory-Belobug-AMD fork of VIctory,
4379 `crates/victory-gpu/src/indirect.rs`), RADV runs 2^32 - 1 in x in one dispatch, and the cut at 65 535 dropped the
4380 last 1 905 tiles of the pass. A device that allows less (llvmpipe: 65 535) still gets the record cut at its
4381 limit: running the rest would take more dispatches with a group-ID base the translated shader does not read. The
4382 counters' `indirect clamp dispatch:` line (every 10 s while dispatch records are clamped) gives the records, those
4383 wider than 65 535 in x, the widest x that ran and those cut at the device's limits, so a run shows which case it
4384 is. The indirect command reads that scratch. A draw emits the pass before its rendering scope opens: `vkCmdCopyBuffer` and a
4106 memory barrier with a transfer access are not allowed inside a dynamic-rendering scope. The records are 4385 memory barrier with a transfer access are not allowed inside a dynamic-rendering scope. The records are
4107 bit-identical to the application's when they are within the limits, the argument and count buffers are left 4386 bit-identical to the application's when they are within the limits, the argument and count buffers are left
4108 untouched, and the scratch comes from a per-submission pool (`vulkan_scratch.h`) that a list with many indirect 4387 untouched, and the scratch comes from a per-submission pool (`vulkan_scratch.h`) that a list with many indirect
diff --git a/docs/design.md b/docs/design.md
index eee5be2cc..7bff52e7f 100644
--- a/docs/design.md
+++ b/docs/design.md
@@ -303,7 +303,7 @@ How the generated SPIR-V expects the runtime to work:
303| `s_load_dword*` with `vcc` 64-bit base pointer | SMEM `s_load_dword*` accepts `vcc` (`{vcc_lo, vcc_hi}`, hardware `s[106:107]`) as its 64-bit base pointer in `Gen.scalar_load`, loading `%vcc` as the low dword and `%vcc_hi` as the high dword; `s_buffer_load*` still requires a 4-dword V# and rejects 2-dword `vcc`. Source: RDNA2 ISA SMEM `SBASE` encoding (`sbase = 53` -> `s[106:107] = vcc`). Confirmed by corpus count over the 2,684-shader pipeline library compute corpus (79 shaders use `vcc` as the `s_load` base: 72 `s_load_dwordx4 sgpr, vcc`, 6 `s_load_dwordx8 sgpr, vcc`, 1 `s_load_dwordx4 slist, vcc`; all 79 translate and pass `spirv-val` under `--wave64-emulate`) and CPU-checked by `tests/semantic/test_sload_vcc_base.py` (`spirv-as` + `spirv-val`) and `tests/semantic/test_scalar_mem_smem.py` (both halves and the resulting addresses); **not GPU-verified**: the synthetic `runtime/test/shaders/cs_smem_vcc_base.asm` reads back eight seeded words through the pair in the standard GPU runner. | 303| `s_load_dword*` with `vcc` 64-bit base pointer | SMEM `s_load_dword*` accepts `vcc` (`{vcc_lo, vcc_hi}`, hardware `s[106:107]`) as its 64-bit base pointer in `Gen.scalar_load`, loading `%vcc` as the low dword and `%vcc_hi` as the high dword; `s_buffer_load*` still requires a 4-dword V# and rejects 2-dword `vcc`. Source: RDNA2 ISA SMEM `SBASE` encoding (`sbase = 53` -> `s[106:107] = vcc`). Confirmed by corpus count over the 2,684-shader pipeline library compute corpus (79 shaders use `vcc` as the `s_load` base: 72 `s_load_dwordx4 sgpr, vcc`, 6 `s_load_dwordx8 sgpr, vcc`, 1 `s_load_dwordx4 slist, vcc`; all 79 translate and pass `spirv-val` under `--wave64-emulate`) and CPU-checked by `tests/semantic/test_sload_vcc_base.py` (`spirv-as` + `spirv-val`) and `tests/semantic/test_scalar_mem_smem.py` (both halves and the resulting addresses); **not GPU-verified**: the synthetic `runtime/test/shaders/cs_smem_vcc_base.asm` reads back eight seeded words through the pair in the standard GPU runner. |
304| Execution model | One invocation = one lane. Compute and mesh waves derive lanes from the workgroup-local index; other stages use the subgroup lane. A wave = a subgroup, so cross-lane ops (`ds_swizzle`, `v_permlane*`, `v_readlane`/`v_writelane`, `v_mbcnt`) become subgroup shuffles. Wave32 pixel shaders split a 64-lane physical subgroup into two logical waves: lane IDs are `SubgroupLocalInvocationId & 31`, shuffle sources retain the current half (`& 32`), and ballots/votes use that half's 32-bit word. A value the translator knows is uniform (the bindless descriptor index) is read from the half's first running lane, never from a fixed lane, which need not be running (SHADER-1016). Other stage/wave combinations still require subgroup size == wave size or wave64 emulation. **Requires subgroup size == wave size** (wave32 maps directly onto NVIDIA GPUs; wave64 shaders need a 64-wide subgroup or emulation). `v_readlane_b32`/`v_writelane_b32` mask the lane select with 63 in wave64 (`S1[5:0]`) and 31 in wave32 (`S1[4:0]`); until SHADER-52 both used 63, so a wave32 select ≥ 32 pointed past a 32-wide subgroup. GPU-checked with `cs_w32_lane_wrap.asm` (lane 40 → 8). For the fragment-half rule, `ps_bitmask_perm` produced 4096/4096 exact pixels on an AMD Radeon RX 5700 XT; Vulkan reported a default subgroup size of 64 (range 32..64), but does not permit pinning fragment subgroup size on this device. CPU semantic tests compare a 64-lane wave32 pixel subgroup against two 32-lane subgroups for reads/writes, permutations, ballots, and votes. | 304| Execution model | One invocation = one lane. Compute and mesh waves derive lanes from the workgroup-local index; other stages use the subgroup lane. A wave = a subgroup, so cross-lane ops (`ds_swizzle`, `v_permlane*`, `v_readlane`/`v_writelane`, `v_mbcnt`) become subgroup shuffles. Wave32 pixel shaders split a 64-lane physical subgroup into two logical waves: lane IDs are `SubgroupLocalInvocationId & 31`, shuffle sources retain the current half (`& 32`), and ballots/votes use that half's 32-bit word. A value the translator knows is uniform (the bindless descriptor index) is read from the half's first running lane, never from a fixed lane, which need not be running (SHADER-1016). Other stage/wave combinations still require subgroup size == wave size or wave64 emulation. **Requires subgroup size == wave size** (wave32 maps directly onto NVIDIA GPUs; wave64 shaders need a 64-wide subgroup or emulation). `v_readlane_b32`/`v_writelane_b32` mask the lane select with 63 in wave64 (`S1[5:0]`) and 31 in wave32 (`S1[4:0]`); until SHADER-52 both used 63, so a wave32 select ≥ 32 pointed past a 32-wide subgroup. GPU-checked with `cs_w32_lane_wrap.asm` (lane 40 → 8). For the fragment-half rule, `ps_bitmask_perm` produced 4096/4096 exact pixels on an AMD Radeon RX 5700 XT; Vulkan reported a default subgroup size of 64 (range 32..64), but does not permit pinning fragment subgroup size on this device. CPU semantic tests compare a 64-lane wave32 pixel subgroup against two 32-lane subgroups for reads/writes, permutations, ballots, and votes. |
305| DPP | VOP1/VOP2 `_dpp` applies to src0. DPP16 controls (`quad_perm`, `row_shl/shr/ror/share/xmask/mirror/half_mirror`) and DPP8 (`dpp8` + `fi`) select the source lane, then `row_mask` (one bit per 16-lane row) and `bank_mask` (one bit per 4-lane bank) decide which destination lanes update. A lane whose row/bank is off is not written. A source lane outside the row is invalid: `bound_ctrl` 1 uses 0 as src0, otherwise the lane is not written. Hardware applies src0 float modifiers (`neg`/`abs`) after the invalid-lane zero selection, so `-src0` on an invalid lane yields `-0.0f` (`0x80000000`) and `\|src0\|` yields `+0.0f` (HW-DPP-NEG-INVALID-LANE, measured on RDNA3 (gfx1101) RX 7800 XT, RDNA2 not measured; tested by `tests/semantic/test_dpp_bound_ctrl_modifiers.py`). A source lane inactive under EXEC is used when `fi` is 1; otherwise `bound_ctrl` decides. DPP8 always writes an enabled lane: `fi` 1 reads the inactive source, `fi` 0 uses 0. DPP16/8 never leaves its 16/8-lane group, so this is exact on every subgroup at least that wide; under `--wave64-emulate` the exchange goes through the workgroup buffer like the other cross-lane ops. GPU-checked with `runtime/test/shaders/cs_dpp*.asm` on an RTX 3070 and hardware-measured on an RX 6800. On an RX 6700 XT (gfx1031), `tools/crosslane_fuzz.py --dpp-sweep --oracle hw` checks every DPP16 control × `bound_ctrl` × `fi`, every `row_mask`/`bank_mask` pair and the DPP8 selects in wave32 and wave64: 14,412 cases, all matching these rules (BUILD-162, `docs/shader_validation.md` FUZZ-7). The ballot of the source lanes' EXEC bits and the shuffle are each stored to a Function variable of their own (`Gen.eager`): SPIRV-Cross (MoltenVK) inlines a single-use result into the expression that uses it, which put the ballot on the right of a short-circuiting `&&` and the shuffle in a ternary's arm, so lanes out of their row skipped the ballot and row_shr:1's lane 1 found lane 0 inactive (`cs_dpp_ops` on MoltenVK; SHADER-529). A store is a statement every lane runs. For native FI=0, the source-lane ballot bit also selects the shuffle index: an absent or EXEC-off source is redirected to the current subgroup lane before `OpGroupNonUniformShuffle`, because masking an undefined shuffle result afterwards is not sufficient; FI=1 is unchanged. CPU-checked by `tests/semantic/test_dpp_eager_subgroup.py::test_fi0_shuffle_index_is_ballot_safe` with a hand-written `quad_perm` case whose active lane 6 reads absent lane 7 in a seven-invocation wave; **not GPU-verified**. Checked in SPIRV-Cross 1.3.239's MSL for the `cs_dpp*` tests (each op is now its own statement) and by `tests/semantic/test_dpp_eager_subgroup.py`; not yet run on a Mac. Semantics from the RDNA2 ISA, AMD LLVM modifier syntax and the GPUOpen DPP notes. | 305| DPP | VOP1/VOP2 `_dpp` applies to src0. DPP16 controls (`quad_perm`, `row_shl/shr/ror/share/xmask/mirror/half_mirror`) and DPP8 (`dpp8` + `fi`) select the source lane, then `row_mask` (one bit per 16-lane row) and `bank_mask` (one bit per 4-lane bank) decide which destination lanes update. A lane whose row/bank is off is not written. A source lane outside the row is invalid: `bound_ctrl` 1 uses 0 as src0, otherwise the lane is not written. Hardware applies src0 float modifiers (`neg`/`abs`) after the invalid-lane zero selection, so `-src0` on an invalid lane yields `-0.0f` (`0x80000000`) and `\|src0\|` yields `+0.0f` (HW-DPP-NEG-INVALID-LANE, measured on RDNA3 (gfx1101) RX 7800 XT, RDNA2 not measured; tested by `tests/semantic/test_dpp_bound_ctrl_modifiers.py`). A source lane inactive under EXEC is used when `fi` is 1; otherwise `bound_ctrl` decides. DPP8 always writes an enabled lane: `fi` 1 reads the inactive source, `fi` 0 uses 0. DPP16/8 never leaves its 16/8-lane group, so this is exact on every subgroup at least that wide; under `--wave64-emulate` the exchange goes through the workgroup buffer like the other cross-lane ops. GPU-checked with `runtime/test/shaders/cs_dpp*.asm` on an RTX 3070 and hardware-measured on an RX 6800. On an RX 6700 XT (gfx1031), `tools/crosslane_fuzz.py --dpp-sweep --oracle hw` checks every DPP16 control × `bound_ctrl` × `fi`, every `row_mask`/`bank_mask` pair and the DPP8 selects in wave32 and wave64: 14,412 cases, all matching these rules (BUILD-162, `docs/shader_validation.md` FUZZ-7). The ballot of the source lanes' EXEC bits and the shuffle are each stored to a Function variable of their own (`Gen.eager`): SPIRV-Cross (MoltenVK) inlines a single-use result into the expression that uses it, which put the ballot on the right of a short-circuiting `&&` and the shuffle in a ternary's arm, so lanes out of their row skipped the ballot and row_shr:1's lane 1 found lane 0 inactive (`cs_dpp_ops` on MoltenVK; SHADER-529). A store is a statement every lane runs. For native FI=0, the source-lane ballot bit also selects the shuffle index: an absent or EXEC-off source is redirected to the current subgroup lane before `OpGroupNonUniformShuffle`, because masking an undefined shuffle result afterwards is not sufficient; FI=1 is unchanged. CPU-checked by `tests/semantic/test_dpp_eager_subgroup.py::test_fi0_shuffle_index_is_ballot_safe` with a hand-written `quad_perm` case whose active lane 6 reads absent lane 7 in a seven-invocation wave; **not GPU-verified**. Checked in SPIRV-Cross 1.3.239's MSL for the `cs_dpp*` tests (each op is now its own statement) and by `tests/semantic/test_dpp_eager_subgroup.py`; not yet run on a Mac. Semantics from the RDNA2 ISA, AMD LLVM modifier syntax and the GPUOpen DPP notes. |
306| DPP on a VOPC compare | A VOPC compare whose src0 field is a DPP marker (250 for DPP16, 233/234 for DPP8) takes src0 through the DPP lane selection of the row above and writes VCC: a lane's bit is `compare(src0 of the selected lane, its own src1)`, with 0 for src0 when the selected lane is out of its row or inactive (`bound_ctrl` 1, or DPP8 with `fi` 0). The second word has the layout of a VOP2's DPP word. `llvm-mc` has no decoding for it on gfx10 (LLVM 21.1.8 rejects the first word for `gfx1013`; LLVM defines the form from GFX11 on), so `tools/shader_disasm.py` prints it: it decodes the pair with the first word turned into `v_max_f32` into `v0`, which takes the same second word, and gives the line the compare's name, a `vcc_lo` destination and the real encoding back (`with_vopc_dpp`); `tools/rdna2_decode.py` decodes it directly. **Only the forms where every lane writes its bit are translated**: `row_mask` and `bank_mask` 0xF and either `bound_ctrl` 1 or DPP8. Any other form, and `v_cmpx`, is refused (`DPP compare with lanes that keep their mask bit`), because what a lane DPP leaves unwritten does to its VCC bit is not measured. Found in 3 of the 2,684 pipeline-library compute programs of 1.0.2.1: 4 `v_cmp_gt_f32` each, with `quad_perm:[1,0,3,2]`, `quad_perm:[2,3,0,1]`, `row_ror:8` (all `bound_ctrl:1`, masks 0xF) and `dpp8:[4,5,6,7,0,1,2,3]`, beside `v_min/max_f32_dpp` and `v_mov_b32_dpp` on the same lanes. **Not measured on hardware**: the rule follows from the encoding, from LLVM's GFX11 definition of the same form and from the VOP2 DPP rules measured in the row above; the sweep that measured those (`tools/crosslane_fuzz.py --dpp-sweep --oracle hw`) does not cover compares. Lane values are checked in `tests/semantic/test_dpp_compare.py` (the SPIR-V interpreter) and on a GPU with `runtime/test/shaders/cs_dpp_cmp.asm`. | 306| DPP on a VOPC compare | A VOPC compare whose src0 field is a DPP marker (250 for DPP16, 233/234 for DPP8) takes src0 through the DPP lane selection of the row above and writes VCC: a lane's bit is `compare(src0 of the selected lane, its own src1)`, with 0 for src0 when the selected lane is out of its row or inactive (`bound_ctrl` 1, or DPP8 with `fi` 0). The second word has the layout of a VOP2's DPP word. `llvm-mc` has no decoding for it on gfx10 (LLVM 21.1.8 rejects the first word for `gfx1013`; LLVM defines the form from GFX11 on), so `tools/shader_disasm.py` prints it: it decodes the pair with the first word turned into `v_max_f32` into `v0`, which takes the same second word, and gives the line the compare's name, a `vcc_lo` destination and the real encoding back (`with_vopc_dpp`); `tools/rdna2_decode.py` decodes it directly. **Only the forms where every lane writes its bit are translated**: `row_mask` and `bank_mask` 0xF and either `bound_ctrl` 1 or DPP8. Any other form is refused (`DPP compare with lanes DPP leaves unwritten`), because what such a lane writes is measured only on RDNA3, not on RDNA2. On RDNA3 (gfx1101, RX 7800 XT, `tools/hw_oracle`, wave32 and wave64; [measurement](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7161289307)) a lane DPP leaves unwritten does not keep its bit: `v_cmp` writes 0 to its VCC bit and `v_cmpx` turns it off in EXEC. That holds for an invalid source with `bound_ctrl` 0, and for a lane `row_mask` or `bank_mask` turns off, even with `bound_ctrl` 1. Translating these forms on RDNA2 (gfx1013) would need the same measurement there. `v_cmpx` in DPP form takes the same lane selection and the same forms, and writes EXEC as the plain `v_cmpx` does (a lane that was off stays off); it prints no destination, so its src0 is the first operand (SHADER-VOPCX-DPP). Found in 3 of the 2,684 pipeline-library compute programs of 1.0.2.1: 4 `v_cmp_gt_f32` each, with `quad_perm:[1,0,3,2]`, `quad_perm:[2,3,0,1]`, `row_ror:8` (all `bound_ctrl:1`, masks 0xF) and `dpp8:[4,5,6,7,0,1,2,3]`, beside `v_min/max_f32_dpp` and `v_mov_b32_dpp` on the same lanes. `v_cmpx` in DPP form is in 78 of the 18,837 graphics programs of the pipeline library (all pixel shaders, 113 instructions), all `v_cmpx_gt_f32_dpp vN, -vM quad_perm:[2,3,0,1] row_mask:0xf bank_mask:0xf bound_ctrl:1 fi:1`, a compare against the lane two above or below in its quad. **Not measured on RDNA2 hardware**: the rule follows from the encoding, from LLVM's GFX11 definition of the same form and from the VOP2 DPP rules measured in the row above; the sweep that measured those (`tools/crosslane_fuzz.py --dpp-sweep --oracle hw`) does not cover compares. The RDNA3 measurement above also ran the translated forms (`bound_ctrl` 1, masks 0xF): an invalid source lane gets the compare of a 0 source, as the rule says. Lane values are checked in `tests/semantic/test_dpp_compare.py` (the SPIR-V interpreter) and on a GPU with `runtime/test/shaders/cs_dpp_cmp.asm` and, for `v_cmpx`, `cs_dpp_cmpx.asm` (RTX 4070 Laptop, native wave32 and `--wave64-emulate`). |
307| EXEC | A per-invocation `active` flag. VALU writes and exports are masked by it, scalar ops aren't, and `v_cmpx`, saveexec and EXEC writes update it. Measured on native gfx1100 (8 threads): a `v_mov_b32` under `EXEC=0x0F` leaves the other lanes untouched, `EXEC=0` writes nothing, a store writes only active lanes and `v_cmpx_gt_u32` narrows EXEC (4 of 4 cases); note that AMD clang 20 rejects `v_add_co_u32`, `v_sub_co_u32`, `v_add_co_ci_u32` and `v_mad_u64_u32` for `gfx1100`, `gfx1101` and `gfx1102`, so this toolchain could not reproduce the RX 7600 result below, which leaves open whether those parts support the opcodes and says only that they could not be assembled here. **A pixel is written when its lane was on in EXEC at the last `exp ... vm` the path executed (if it executed one) and at the last export to the color target; a path with no export at all goes by EXEC at the end.** The `vm` half is the RDNA2 ISA reference guide's rule (30-November-2020, §11.1 and §11.2.1: EXEC at the export is the valid mask and the final one sent is used; an `exp null ... vm` carries only the mask). The color half is measured: an export sends data only for the lanes that are on, a later export to the same target replaces the earlier one for the whole wave, and a lane with no data from the last one is not written even when a later `exp null done vm` marks it valid. So `exp mrt0 done` (no `vm`) with every lane on, followed by an EXEC write, still writes every pixel, and EXEC off at that export and back on afterwards writes none. **Measured on RDNA2** (AMD Radeon iGPU, gfx1036, driver 26.10.1) with the pixel-shader oracle of #3061 (`ps_oracle.py`), hand-written ISA as the pixel shader of a real draw (wave64 stage): 18 programs that cut EXEC to half of the target before, between or after `exp mrt0` (with and without `vm` and `done`) and `exp null done vm`; all 18 fit the rule, 6 of them differed from the translator, which until 2026-11-23 discarded by EXEC at the end on a path without `vm` and kept the older export's value (or the output's initial value) for a lane that was off at the last color export. The latches (`%vm_mask`, `%col_mask_mrtN`) are only emitted where a path can write EXEC after a `vm` or color export; everywhere else EXEC at the end is the same mask and the SPIR-V is unchanged. With several color targets a pixel stays when any target got an export from its lane (Vulkan cannot skip one attachment per pixel; not measured, the oracle's pipeline has one target); `mrtz` is not part of the color mask (not measured). **Measuring exports needs `s_waitcnt expcnt(0)` after each one**: an export is asynchronous, and without the wait the hardware takes the data and the EXEC of a later moment (`v_mov v9, A; exp mrt0 v9 done vm; v_mov v9, B` shows B, and an EXEC write right after the export decides which pixels are written, which looks like "EXEC at the end decides"); 64 `s_nop 15` have the same effect as the wait. Checked on the CPU by `tests/semantic/test_export_valid_mask.py` and on the GPU by `runtime/test/shaders/ps_exp_color_mask.asm` (RTX 5080 and the Radeon). VALU scalar lane-mask destinations (`v_cmp_*`, `v_add_co_u32`, `v_add_co_ci_u32`, `v_sub_co_u32`, `v_sub_co_ci_u32`, `v_subrev_co_u32`, `v_subrev_co_ci_u32`, `v_mad_u64_u32`, `v_mad_i64_i32`) write 0 for lanes off in EXEC (`SDST[lane] = EXEC[lane] ? bit : 0`, AMD RDNA2 ISA). Until 2026-11-22 the six `*_co_*` ops and `v_mad_u64_u32`/`v_mad_i64_i32` did not AND the carry/sign bit with `active`, so inactive lanes leaked 1 bits into `VCC`/SGPR masks (`s_bcnt1`, `s_cbranch_vccz`, `v_cndmask_b32`). Checked on the CPU by `tests/semantic/test_carry_exec_mask.py` (wave32, wave64, and `--wave64-emulate` structure), and **hardware-verified on an AMD RX 7600 (gfx1102)** with `v_add_co_u32` and `v_add_co_ci_u32` carrying on every active lane: VCC reads `0xffffffff` with full EXEC, `0x0000ffff` for the mask `0x0000ffff` and `0xaaaaaaaa` for `0xaaaaaaaa` in wave32, `vcc_lo = 0x0000ffff` with `vcc_hi = 0x0000000f` for the same partial mask in wave64, and `0` when EXEC is 0 even with VCC preloaded to all ones; with one carrying lane under mask `0x0000ffff` VCC is `0x00000001`, and `v_sub_co_u32`/`v_subrev_co_u32` with a borrow under that mask give `0x0000ffff` too. The `*_co_ci_` forms, `v_mad_u64_u32` and `v_mad_i64_i32` share the same path but were not measured separately; it is also GPU-verified on native RDNA2 (gfx1036, AMD Radeon Graphics) with partial EXEC masks (inactive lanes write 0 in sdst for `v_add_co_u32` and `v_mad_u64_u32`). In a shader that writes EXEC, a run of two or more lane-local VALU instructions (no cross-lane read, no lane-mask, SCC, carry or EXEC write) sits inside one `if (active)` and writes its VGPRs directly, instead of an `OpSelect(active, new, old)` per write: the same result, but the driver predicates the run with its own EXEC instead of keeping both values live. On an RX 5700 XT (RADV) a pixel shader with 8 divergent if/else regions of `v_fma`/`v_mul`/`v_add`/`v_min`/`v_max` went from 0.85 ms to 0.69 ms (the same program as native SPIR-V: 0.65 ms). Not under `--wave64-emulate`. Checked by `tests/semantic/test_active_runs.py`. | 307| EXEC | A per-invocation `active` flag. VALU writes and exports are masked by it, scalar ops aren't, and `v_cmpx`, saveexec and EXEC writes update it. Measured on native gfx1100 (8 threads): a `v_mov_b32` under `EXEC=0x0F` leaves the other lanes untouched, `EXEC=0` writes nothing, a store writes only active lanes and `v_cmpx_gt_u32` narrows EXEC (4 of 4 cases); note that AMD clang 20 rejects `v_add_co_u32`, `v_sub_co_u32`, `v_add_co_ci_u32` and `v_mad_u64_u32` for `gfx1100`, `gfx1101` and `gfx1102`, so this toolchain could not reproduce the RX 7600 result below, which leaves open whether those parts support the opcodes and says only that they could not be assembled here. **A pixel is written when its lane was on in EXEC at the last `exp ... vm` the path executed (if it executed one) and at the last export to the color target; a path with no export at all goes by EXEC at the end.** The `vm` half is the RDNA2 ISA reference guide's rule (30-November-2020, §11.1 and §11.2.1: EXEC at the export is the valid mask and the final one sent is used; an `exp null ... vm` carries only the mask). The color half is measured: an export sends data only for the lanes that are on, a later export to the same target replaces the earlier one for the whole wave, and a lane with no data from the last one is not written even when a later `exp null done vm` marks it valid. So `exp mrt0 done` (no `vm`) with every lane on, followed by an EXEC write, still writes every pixel, and EXEC off at that export and back on afterwards writes none. **Measured on RDNA2** (AMD Radeon iGPU, gfx1036, driver 26.10.1) with the pixel-shader oracle of #3061 (`ps_oracle.py`), hand-written ISA as the pixel shader of a real draw (wave64 stage): 18 programs that cut EXEC to half of the target before, between or after `exp mrt0` (with and without `vm` and `done`) and `exp null done vm`; all 18 fit the rule, 6 of them differed from the translator, which until 2026-11-23 discarded by EXEC at the end on a path without `vm` and kept the older export's value (or the output's initial value) for a lane that was off at the last color export. The latches (`%vm_mask`, `%col_mask_mrtN`) are only emitted where a path can write EXEC after a `vm` or color export; everywhere else EXEC at the end is the same mask and the SPIR-V is unchanged. With several color targets a pixel stays when any target got an export from its lane (Vulkan cannot skip one attachment per pixel; not measured, the oracle's pipeline has one target); `mrtz` is not part of the color mask (not measured). **Measuring exports needs `s_waitcnt expcnt(0)` after each one**: an export is asynchronous, and without the wait the hardware takes the data and the EXEC of a later moment (`v_mov v9, A; exp mrt0 v9 done vm; v_mov v9, B` shows B, and an EXEC write right after the export decides which pixels are written, which looks like "EXEC at the end decides"); 64 `s_nop 15` have the same effect as the wait. Checked on the CPU by `tests/semantic/test_export_valid_mask.py` and on the GPU by `runtime/test/shaders/ps_exp_color_mask.asm` (RTX 5080 and the Radeon). VALU scalar lane-mask destinations (`v_cmp_*`, `v_add_co_u32`, `v_add_co_ci_u32`, `v_sub_co_u32`, `v_sub_co_ci_u32`, `v_subrev_co_u32`, `v_subrev_co_ci_u32`, `v_mad_u64_u32`, `v_mad_i64_i32`) write 0 for lanes off in EXEC (`SDST[lane] = EXEC[lane] ? bit : 0`, AMD RDNA2 ISA). Until 2026-11-22 the six `*_co_*` ops and `v_mad_u64_u32`/`v_mad_i64_i32` did not AND the carry/sign bit with `active`, so inactive lanes leaked 1 bits into `VCC`/SGPR masks (`s_bcnt1`, `s_cbranch_vccz`, `v_cndmask_b32`). Checked on the CPU by `tests/semantic/test_carry_exec_mask.py` (wave32, wave64, and `--wave64-emulate` structure), and **hardware-verified on an AMD RX 7600 (gfx1102)** with `v_add_co_u32` and `v_add_co_ci_u32` carrying on every active lane: VCC reads `0xffffffff` with full EXEC, `0x0000ffff` for the mask `0x0000ffff` and `0xaaaaaaaa` for `0xaaaaaaaa` in wave32, `vcc_lo = 0x0000ffff` with `vcc_hi = 0x0000000f` for the same partial mask in wave64, and `0` when EXEC is 0 even with VCC preloaded to all ones; with one carrying lane under mask `0x0000ffff` VCC is `0x00000001`, and `v_sub_co_u32`/`v_subrev_co_u32` with a borrow under that mask give `0x0000ffff` too. The `*_co_ci_` forms, `v_mad_u64_u32` and `v_mad_i64_i32` share the same path but were not measured separately; it is also GPU-verified on native RDNA2 (gfx1036, AMD Radeon Graphics) with partial EXEC masks (inactive lanes write 0 in sdst for `v_add_co_u32` and `v_mad_u64_u32`). In a shader that writes EXEC, a run of two or more lane-local VALU instructions (no cross-lane read, no lane-mask, SCC, carry or EXEC write) sits inside one `if (active)` and writes its VGPRs directly, instead of an `OpSelect(active, new, old)` per write: the same result, but the driver predicates the run with its own EXEC instead of keeping both values live. On an RX 5700 XT (RADV) a pixel shader with 8 divergent if/else regions of `v_fma`/`v_mul`/`v_add`/`v_min`/`v_max` went from 0.85 ms to 0.69 ms (the same program as native SPIR-V: 0.65 ms). Not under `--wave64-emulate`. Checked by `tests/semantic/test_active_runs.py`. |
308| `s_*_saveexec_b32/b64`, `s_andn1/andn2_wrexec_b32/b64` | RDNA2 ISA SOP1. saveexec: `D = EXEC; EXEC = f(S0, EXEC); SCC = (EXEC != 0)`. wrexec: `EXEC = f(S0, EXEC); D = EXEC`. `f` is one of `and`, `or`, `xor`, `andn1` (`~S0 & EXEC`), `andn2` (`S0 & ~EXEC`), `orn1` (`~S0 \| EXEC`), `orn2` (`S0 \| ~EXEC`), `nand`, `nor`, `xnor`, the table in `Gen.EXEC_LOGIC`. The definitions match `tools/cf_ref.py` `_SAVEEXEC`, the FUZZ-8 model. Each invocation holds its own lane's bit (0 or ~0), so `f` is the bitwise op on that bit. A lane EXEC had off becomes active when `f` gives 1 for it (`nand`, `nor`, `orn1`, `orn2`, `xnor`, ...), as on hardware, and SCC is the wave vote. Until 2026-11-22 only `and`/`or`/`andn2_saveexec` and `andn2_wrexec` were translated. CPU-checked by `tests/semantic/test_saveexec_variants.py` (all ten saveexec kinds in wave32 and wave64, both wrexec kinds, partial EXEC and S0, an empty result, every lane against `cf_ref._SAVEEXEC`) and by `tools/cf_diff.py` (300 programs × wave32/64 still pass). Hardware-verified on native RDNA2 (`gfx1036`, Windows 11, driver `32.0.21045.29003`, wave32 & wave64, 0 mismatches): all 10 `saveexec` kinds and both `wrexec` kinds (`andn1`/`andn2`) match bit-for-bit on non-symmetric masks (`src0 = 0x0F0F0F0F`, `exec = 0x33333333` in wave32; `0x0F0F0F0F_00FF00FF` / `0x33333333_55555555` in wave64), zero-result `SCC = 0`, wave64 upper-32-bit-only `new_exec = 0x00000001_00000000` setting `SCC = 1`, and `sdst == src0` register aliasing (`s4, s4` and `s[4:5], s[4:5]`) reading original `src0` before writing old `EXEC` to `sdst`. **Not GPU-verified** for the seven new kinds. Measured on native gfx1100 (single 8-lane workgroup, 36 programs): all ten `saveexec` kinds and both `wrexec` forms follow `f` for three `S0`/`EXEC` pairs, including lanes `EXEC` had off being switched back on (`nand` with `S0=0x03`, `EXEC=0x0F` leaves `0xFFFFFFFC`, activating lanes 4-7), `D` holding the old `EXEC` for `saveexec` and the new one for `wrexec`, and `SCC` the `EXEC != 0` vote. | 308| `s_*_saveexec_b32/b64`, `s_andn1/andn2_wrexec_b32/b64` | RDNA2 ISA SOP1. saveexec: `D = EXEC; EXEC = f(S0, EXEC); SCC = (EXEC != 0)`. wrexec: `EXEC = f(S0, EXEC); D = EXEC`. `f` is one of `and`, `or`, `xor`, `andn1` (`~S0 & EXEC`), `andn2` (`S0 & ~EXEC`), `orn1` (`~S0 \| EXEC`), `orn2` (`S0 \| ~EXEC`), `nand`, `nor`, `xnor`, the table in `Gen.EXEC_LOGIC`. The definitions match `tools/cf_ref.py` `_SAVEEXEC`, the FUZZ-8 model. Each invocation holds its own lane's bit (0 or ~0), so `f` is the bitwise op on that bit. A lane EXEC had off becomes active when `f` gives 1 for it (`nand`, `nor`, `orn1`, `orn2`, `xnor`, ...), as on hardware, and SCC is the wave vote. Until 2026-11-22 only `and`/`or`/`andn2_saveexec` and `andn2_wrexec` were translated. CPU-checked by `tests/semantic/test_saveexec_variants.py` (all ten saveexec kinds in wave32 and wave64, both wrexec kinds, partial EXEC and S0, an empty result, every lane against `cf_ref._SAVEEXEC`) and by `tools/cf_diff.py` (300 programs × wave32/64 still pass). Hardware-verified on native RDNA2 (`gfx1036`, Windows 11, driver `32.0.21045.29003`, wave32 & wave64, 0 mismatches): all 10 `saveexec` kinds and both `wrexec` kinds (`andn1`/`andn2`) match bit-for-bit on non-symmetric masks (`src0 = 0x0F0F0F0F`, `exec = 0x33333333` in wave32; `0x0F0F0F0F_00FF00FF` / `0x33333333_55555555` in wave64), zero-result `SCC = 0`, wave64 upper-32-bit-only `new_exec = 0x00000001_00000000` setting `SCC = 1`, and `sdst == src0` register aliasing (`s4, s4` and `s[4:5], s[4:5]`) reading original `src0` before writing old `EXEC` to `sdst`. **Not GPU-verified** for the seven new kinds. Measured on native gfx1100 (single 8-lane workgroup, 36 programs): all ten `saveexec` kinds and both `wrexec` forms follow `f` for three `S0`/`EXEC` pairs, including lanes `EXEC` had off being switched back on (`nand` with `S0=0x03`, `EXEC=0x0F` leaves `0xFFFFFFFC`, activating lanes 4-7), `D` holding the old `EXEC` for `saveexec` and the new one for `wrexec`, and `SCC` the `EXEC != 0` vote. |
309| Control flow | Reducible graphs use structured branches and natural loops. Irreducible graphs use the dispatch-loop form, which can also be forced with `--dispatch-loop` for comparisons. The control-flow unit test checks 18,228 generated graphs. Irreducible graphs use node splitting (`cfg_structure.split_irreducible`, up to `min(2*N, N+64)` blocks) and fall back to the dispatch-loop form when capped; it can also be forced with `--dispatch-loop` for comparisons. `cfg_structure.structure`, `cfg_structure.run`, and `rdna2spirv.assemble`'s structured emitter are iterative and hoist each guarded member's dominated tail continuation out of its enclosing guard (exact by strict dominance: no block outside the guard's subtree can target the continuation), keeping `OpSelectionMerge` nesting O(1) on sequential diamond/loop chains instead of nesting O(N) deep and hitting Python's recursion limit on multi-thousand-block shaders (e.g. 2,000 sequential diamonds nest to depth 2 instead of 2,000). The control-flow unit test (`tests/test_cfg_structure.py`) checks 20,000 generated graphs plus 2,000-diamond, 1,200-loop, and 1,500-early-exit chains. `capped_tree()` also runs `cfg_structure.unwrap_known_pc_guards` (shared with `wave64_emulate_opt`) to unwrap tautological `("guard", g, ...)` nodes whenever abstract interpretation proves `%pc == g` on all incoming paths (e.g. post-dominating merge blocks after diamonds and loops); this keeps `ms_wave_info_s3`'s `s_barrier` in uniform top-level control flow (fixing an AMD Windows LLPC `0xC0000005` pipeline-creation crash on AMD Ryzen 5 7600 RDNA2 iGPU driver `24.10.24`, `4096/4096` exact on AMD RDNA2 and RTX 4070 SUPER) and avoids false `needs_barrier_rounds` triggers (`SHADER-STRUCTURED-PC-UNWRAP`). AMD A/B checks compare the two forms for selected pixel shaders with defined test inputs. For shaders that never export colour, the comparison checks pixel coverage. **Nesting is bounded (SHADER-299):** a tree deeper than `MAX_STRUCTURED_DEPTH` (16) is emitted in the dispatch-loop form instead, since `spirv-val` time grows roughly with the cube of the measured nesting depth. **Nesting is bounded (SHADER-299, SHADER-427):** a tree deeper than `MAX_STRUCTURED_DEPTH` (64; `--max-structured-depth N`, 0 = no bound) is emitted in the dispatch-loop form instead, since `spirv-val` time grows roughly with the cube of the measured nesting depth. Before #1904, over the 1.0.2.1 corpus (26,503 modules, `spirv-val` 2026.4): the deepest block of a module is nested 118 constructs deep, 12,963 modules are structured (median 15) and 6,000 of those are deeper than 16; an estimated 85% of the corpus's `spirv-val` time is in modules nested 20 or deeper. Median `spirv-val` time for the same module in each form: depth 20 181 -> 129 ms (1.4x), 30 507 -> 371 (1.4x), 50 1,712 -> 738 (2.3x), 64 2,692 -> 1,163 (2.3x), 77 5,122 -> 1,130 (4.5x), and the deepest (118) 13,683 -> 1,352 ms (10.1x). Depth 5-12 shows no gain (at depth 6 the flat form is slightly slower), which is why the bound first sat at 16. Since #1904 (`cfg_structure` hoists tails) the deepest tree in the corpus is 29: of 12,944 structured modules, 1,031 are deeper than 16 (747 CS, 284 PS), 57 deeper than 20, 24 deeper than 24. For those 1,031 the flat form saves only 12% of `spirv-val` time (1,235 -> 1,091 s summed, slowest module 8.3 -> 5.9 s), while on an RTX 5070 Ti (NVIDIA 621.24) it compiles slower: the 284 pixel shaders 1.67x (827 -> 1,382 s summed, two rounds), four compute modules at depth 19-24 2.0x (297 -> 591 s, 1.6-2.7x each), so the bound now sits above the corpus (SHADER-427). Both forms pass `spirv-val` on a 200-shader slice (200/200 each), and `gen.nesting` records the tree depth. AMD's Windows driver adds a reason to keep the structured form (SHADER-995): on a Radeon gfx1036 iGPU (32.0.21042.62) the dispatch-loop module of `XboxBvhBuilder.dll`'s `LeafRehydration` (tree depth 18, a 581-case switch) takes 34 minutes to create (XXDESIGN), where its structured module is created in 2.9 s; ten other programs of that DLL compile in the dispatch-loop form there in 0.4-40 s, 2.5-5x their structured time ([embedded_shaders.md](embedded_shaders.md), section 7). | 309| Control flow | Reducible graphs use structured branches and natural loops. Irreducible graphs use the dispatch-loop form, which can also be forced with `--dispatch-loop` for comparisons. The control-flow unit test checks 18,228 generated graphs. Irreducible graphs use node splitting (`cfg_structure.split_irreducible`, up to `min(2*N, N+64)` blocks) and fall back to the dispatch-loop form when capped; it can also be forced with `--dispatch-loop` for comparisons. `cfg_structure.structure`, `cfg_structure.run`, and `rdna2spirv.assemble`'s structured emitter are iterative and hoist each guarded member's dominated tail continuation out of its enclosing guard (exact by strict dominance: no block outside the guard's subtree can target the continuation), keeping `OpSelectionMerge` nesting O(1) on sequential diamond/loop chains instead of nesting O(N) deep and hitting Python's recursion limit on multi-thousand-block shaders (e.g. 2,000 sequential diamonds nest to depth 2 instead of 2,000). The control-flow unit test (`tests/test_cfg_structure.py`) checks 20,000 generated graphs plus 2,000-diamond, 1,200-loop, and 1,500-early-exit chains. `capped_tree()` also runs `cfg_structure.unwrap_known_pc_guards` (shared with `wave64_emulate_opt`) to unwrap tautological `("guard", g, ...)` nodes whenever abstract interpretation proves `%pc == g` on all incoming paths (e.g. post-dominating merge blocks after diamonds and loops); this keeps `ms_wave_info_s3`'s `s_barrier` in uniform top-level control flow (fixing an AMD Windows LLPC `0xC0000005` pipeline-creation crash on AMD Ryzen 5 7600 RDNA2 iGPU driver `24.10.24`, `4096/4096` exact on AMD RDNA2 and RTX 4070 SUPER) and avoids false `needs_barrier_rounds` triggers (`SHADER-STRUCTURED-PC-UNWRAP`). AMD A/B checks compare the two forms for selected pixel shaders with defined test inputs. For shaders that never export colour, the comparison checks pixel coverage. **Nesting is bounded (SHADER-299):** a tree deeper than `MAX_STRUCTURED_DEPTH` (16) is emitted in the dispatch-loop form instead, since `spirv-val` time grows roughly with the cube of the measured nesting depth. **Nesting is bounded (SHADER-299, SHADER-427):** a tree deeper than `MAX_STRUCTURED_DEPTH` (64; `--max-structured-depth N`, 0 = no bound) is emitted in the dispatch-loop form instead, since `spirv-val` time grows roughly with the cube of the measured nesting depth. Before #1904, over the 1.0.2.1 corpus (26,503 modules, `spirv-val` 2026.4): the deepest block of a module is nested 118 constructs deep, 12,963 modules are structured (median 15) and 6,000 of those are deeper than 16; an estimated 85% of the corpus's `spirv-val` time is in modules nested 20 or deeper. Median `spirv-val` time for the same module in each form: depth 20 181 -> 129 ms (1.4x), 30 507 -> 371 (1.4x), 50 1,712 -> 738 (2.3x), 64 2,692 -> 1,163 (2.3x), 77 5,122 -> 1,130 (4.5x), and the deepest (118) 13,683 -> 1,352 ms (10.1x). Depth 5-12 shows no gain (at depth 6 the flat form is slightly slower), which is why the bound first sat at 16. Since #1904 (`cfg_structure` hoists tails) the deepest tree in the corpus is 29: of 12,944 structured modules, 1,031 are deeper than 16 (747 CS, 284 PS), 57 deeper than 20, 24 deeper than 24. For those 1,031 the flat form saves only 12% of `spirv-val` time (1,235 -> 1,091 s summed, slowest module 8.3 -> 5.9 s), while on an RTX 5070 Ti (NVIDIA 621.24) it compiles slower: the 284 pixel shaders 1.67x (827 -> 1,382 s summed, two rounds), four compute modules at depth 19-24 2.0x (297 -> 591 s, 1.6-2.7x each), so the bound now sits above the corpus (SHADER-427). Both forms pass `spirv-val` on a 200-shader slice (200/200 each), and `gen.nesting` records the tree depth. AMD's Windows driver adds a reason to keep the structured form (SHADER-995): on a Radeon gfx1036 iGPU (32.0.21042.62) the dispatch-loop module of `XboxBvhBuilder.dll`'s `LeafRehydration` (tree depth 18, a 581-case switch) takes 34 minutes to create (XXDESIGN), where its structured module is created in 2.9 s; ten other programs of that DLL compile in the dispatch-loop form there in 0.4-40 s, 2.5-5x their structured time ([embedded_shaders.md](embedded_shaders.md), section 7). |
@@ -313,7 +313,7 @@ How the generated SPIR-V expects the runtime to work:
313| Xbox GPU addresses | Shaders build Xbox GPU virtual addresses, and some force the high dword to 0 (descriptor tables in the low 4 GB). Every memory access goes to **heap base + Xbox VA**, so the runtime maps the console's GPU address window into one host buffer-device-address allocation. | 313| Xbox GPU addresses | Shaders build Xbox GPU virtual addresses, and some force the high dword to 0 (descriptor tables in the low 4 GB). Every memory access goes to **heap base + Xbox VA**, so the runtime maps the console's GPU address window into one host buffer-device-address allocation. |
314| Code-embedded data | 155 VS/PS had "undecodable words". They're **constant tables inside the code range** (float values like 0x3EF7…, plus zeros), read through `s_getpc_b64` + `s_add_u32`/`s_addc_u32` + `s_load` (147 of 155). The translator re-anchors each instruction to its true FSSM offset by matching encodings (when the llvm-mc messages give one offset per rejected word, `shader_ir.parse_file`'s `invalid_at`, those words are skipped exactly and nothing is searched forward: a forward search let a data word printed as a copy of a later instruction take that instruction's place and lose every one after it; counted on the 1.0.2.1 pipeline library with #327's vcc-tuple decoding, 36 compute programs that stopped at "cannot re-anchor" now translate and pass `spirv-val`, none lost; `tests/semantic/test_reanchor_llvm_offsets.py`), translates only code reachable from entry (a branch into data is rejected), and turns `s_getpc_b64` into code base + next-instruction offset. **The runtime uploads each shader's FSSM blob into the heap and passes that VA as the code base.** Re-anchoring compares bytes exactly, except that VOP3P `op_sel_hi[2]` (bit 14) is ignored on two-source packed ops: the compiler stores 0 there, and LLVM prints its default of 1. Unused VOP3/VOP3P `SRC1` (bits 49:41) and `SRC2` (bits 58:50) fields are also ignored when stored as 0 and printed as `0x80`: LLVM 23 re-encodes a source it doesn't read as inline constant 0 (one-source `v_rcp`/`v_log`/`v_sqrt_f32_e64`, two-source `v_sub_f32_e64`/`v_cmp_*_e64`/`v_mul_lo_u32`/`v_pk_mul_f16`). Both checks for clean listings and re-anchoring use the parsed operand count to apply this exception only to unused sources. A used source encoded as 0 reads `s0` and is never treated as inline zero. `tests/semantic/test_printed_encoding.py` checks used `SRC1`/`SRC2` and an unused field with synthetic listings. Confirmed by a count over the corpus with LLVM 23.1.5: without it, 1,471 of the 1,473 shaders with embedded data are rejected ("reachable instruction with normalized encoding"); with it, all 1,473 translate and pass `spirv-val`. Runs with LLVM 21 already translated all of them, so older LLVMs presumably print the stored 0 (not re-checked). Data words that decode with ignored fields set are printed re-encoded (e.g. `0xbe8d2242` as `s_rfe_b64` `0xbe802242`), so they can never match. Since the decoder consumed the same length, they are anchored in sequence and marked. A shader that can *reach* a marked word is rejected; none of the corpus does. All 155 now translate. A reachable instruction that falls through into words llvm-mc skipped (it printed no instruction there) is rejected too, as `fall-through into undecodable words`: until SHADER-813 the reachable path ended there without a word, so everything after the gap (exports, stores) was dropped from a module that still passed `spirv-val`. No VS/PS of the corpus has such a gap on a reachable path; in the FidelityFX FSPX programs it is the `v_dot4_i32_i8 ... op_sel` words LLVM 23 cannot decode (`docs/fspx.md`), so those programs are now refused instead of translated without their stores, until those words are decoded (#2038, #2323). `tests/test_rdna2spirv_decode.py` (`test_fall_through_into_undecodable_words_is_refused`). The exact re-anchoring path tries the same repair as the forward search for a `v_dot4_i32_i8` with an inline-integer S1 whose stored op_sel_hi (5) llvm-mc prints as the default (7), `restore_dot4_inline_sel`, before it marks the word: without it such a program is refused as "reachable instruction with normalized encoding" whenever its listing also reports rejected words. Counted on the 29 FidelityFX DLL programs (1.0.2.1, LLVM 21.1.8): 22 translate without it, 24 with it, all 24 pass `spirv-val`; `tests/semantic/test_reanchor_dot4_inline_sel.py`. | 314| Code-embedded data | 155 VS/PS had "undecodable words". They're **constant tables inside the code range** (float values like 0x3EF7…, plus zeros), read through `s_getpc_b64` + `s_add_u32`/`s_addc_u32` + `s_load` (147 of 155). The translator re-anchors each instruction to its true FSSM offset by matching encodings (when the llvm-mc messages give one offset per rejected word, `shader_ir.parse_file`'s `invalid_at`, those words are skipped exactly and nothing is searched forward: a forward search let a data word printed as a copy of a later instruction take that instruction's place and lose every one after it; counted on the 1.0.2.1 pipeline library with #327's vcc-tuple decoding, 36 compute programs that stopped at "cannot re-anchor" now translate and pass `spirv-val`, none lost; `tests/semantic/test_reanchor_llvm_offsets.py`), translates only code reachable from entry (a branch into data is rejected), and turns `s_getpc_b64` into code base + next-instruction offset. **The runtime uploads each shader's FSSM blob into the heap and passes that VA as the code base.** Re-anchoring compares bytes exactly, except that VOP3P `op_sel_hi[2]` (bit 14) is ignored on two-source packed ops: the compiler stores 0 there, and LLVM prints its default of 1. Unused VOP3/VOP3P `SRC1` (bits 49:41) and `SRC2` (bits 58:50) fields are also ignored when stored as 0 and printed as `0x80`: LLVM 23 re-encodes a source it doesn't read as inline constant 0 (one-source `v_rcp`/`v_log`/`v_sqrt_f32_e64`, two-source `v_sub_f32_e64`/`v_cmp_*_e64`/`v_mul_lo_u32`/`v_pk_mul_f16`). Both checks for clean listings and re-anchoring use the parsed operand count to apply this exception only to unused sources. A used source encoded as 0 reads `s0` and is never treated as inline zero. `tests/semantic/test_printed_encoding.py` checks used `SRC1`/`SRC2` and an unused field with synthetic listings. Confirmed by a count over the corpus with LLVM 23.1.5: without it, 1,471 of the 1,473 shaders with embedded data are rejected ("reachable instruction with normalized encoding"); with it, all 1,473 translate and pass `spirv-val`. Runs with LLVM 21 already translated all of them, so older LLVMs presumably print the stored 0 (not re-checked). Data words that decode with ignored fields set are printed re-encoded (e.g. `0xbe8d2242` as `s_rfe_b64` `0xbe802242`), so they can never match. Since the decoder consumed the same length, they are anchored in sequence and marked. A shader that can *reach* a marked word is rejected; none of the corpus does. All 155 now translate. A reachable instruction that falls through into words llvm-mc skipped (it printed no instruction there) is rejected too, as `fall-through into undecodable words`: until SHADER-813 the reachable path ended there without a word, so everything after the gap (exports, stores) was dropped from a module that still passed `spirv-val`. No VS/PS of the corpus has such a gap on a reachable path; in the FidelityFX FSPX programs it is the `v_dot4_i32_i8 ... op_sel` words LLVM 23 cannot decode (`docs/fspx.md`), so those programs are now refused instead of translated without their stores, until those words are decoded (#2038, #2323). `tests/test_rdna2spirv_decode.py` (`test_fall_through_into_undecodable_words_is_refused`). The exact re-anchoring path tries the same repair as the forward search for a `v_dot4_i32_i8` with an inline-integer S1 whose stored op_sel_hi (5) llvm-mc prints as the default (7), `restore_dot4_inline_sel`, before it marks the word: without it such a program is refused as "reachable instruction with normalized encoding" whenever its listing also reports rejected words. Counted on the 29 FidelityFX DLL programs (1.0.2.1, LLVM 21.1.8): 22 translate without it, 24 with it, all 24 pass `spirv-val`; `tests/semantic/test_reanchor_dot4_inline_sel.py`. |
315| VOP3 opcode 0x140 | LLVM disassembly of the synthetic words in `tests/test_rdna2_decode.py` gives `v_mad_legacy_f32` on gfx1010 through gfx1013 and `v_fma_legacy_f32` on gfx1030. The direct decoder defaults to gfx1013, matching the disassembler CLI. Checked by the unit test `test_vop3_legacy_mad_fma_target` in `tests/test_rdna2_decode.py`, which decodes the same words directly and runs the Python disassembler backend for gfx1013 and gfx1030. | 315| VOP3 opcode 0x140 | LLVM disassembly of the synthetic words in `tests/test_rdna2_decode.py` gives `v_mad_legacy_f32` on gfx1010 through gfx1013 and `v_fma_legacy_f32` on gfx1030. The direct decoder defaults to gfx1013, matching the disassembler CLI. Checked by the unit test `test_vop3_legacy_mad_fma_target` in `tests/test_rdna2_decode.py`, which decodes the same words directly and runs the Python disassembler backend for gfx1013 and gfx1030. |
316| Printed encodings | A listing is LLVM's text for what it decoded, not the bytes it read, so the translator checks the two against each other: the re-anchoring above for listings with undecodable words, and, for every other listing whose header names its code range and whose blob sits next to it (`fssm/`, or `fspx/` for FSPX), each instruction's printed encoding against the bytes at its offset, with the same exceptions (`same_encoding`). A difference is `Unsupported`, naming the instruction, its offset and both byte strings, instead of a translation of the field as 0. The case that prompted it: llvm-mc's gfx1013 decoder (LLVM 21.1.8) drops the VOP3 `op_sel` bits (word 0, bits 14:11) of a 16-bit VOPC compare: `0a 08 a9 d4 01 05 02 00` disassembles as `v_cmp_lt_u16_e64 s10, v1, v2` and re-encodes with the bits cleared (its assembler rejects `op_sel` on VOPC for gfx1013 and gfx1030 alike). Counted over the 1.0.2.1 corpus: the 25,030 clean listings hold 30,335,381 instructions, and none differs from its bytes beyond those exceptions (754); the 166 16-bit VOPC compares (154 shaders, all `f16`) have `op_sel` clear. Hand-written listings, `run_gpu_tests.py`'s `code 0x0..0x0 (synthetic)` listings and a blob that doesn't hold the listing's code range (the tests' header-only FSSM) are not checked. `tests/semantic/test_printed_encoding.py` (a dropped VOPC `op_sel`, a later instruction, the SRC2 exception, and the unchecked cases). One difference is repaired instead of refused: a `v_fma_mix*` literal that llvm-mc prints cut to its low 16 bits (and re-encodes with a zero high half). llvm-mc 23.1.5 prints some of these literals in full as `lit(V)` (an f32 source, or a low half that is an inline constant; LLVM 21 printed the inline constant and dropped the literal word) and still re-encodes only the low half: `tools/shader_ir.py` reads `lit(V)` as V, and the same repair applies (5,733 such operands in the pipeline library, [shader_library.md](shader_library.md)). When the 8 instruction bytes match (`same_encoding` with all three sources counted as used, so a live `s0` can't pass as an inline 0) and the printed literal is the stored one's low half, every source the bytes encode as the literal (SRC field `0xff`) takes the stored 32 bits, so a source with `op_sel_hi` and `op_sel` set reads the high half instead of +0.0. Seen in one program of the FidelityFX DLL's `FSPX` code ([fspx.md](fspx.md)): src0 the low half, src2 the high half; the game's clean listings have no such difference (the count above). That the hardware gives op_sel's high half of the literal to that source is not measured; it is what Mesa's ACO compiler relies on (public: `optimize_constants()` in `src/amd/compiler/aco_optimizer.cpp`, Mesa `main` at `bb986060`, packs two constants as the two f16 halves of one literal, read through `v_fma_mix`'s `op_sel_hi` with the second source extracting the high half), and what the console compiler emitted here. `tools/fma_mix_literal_probe.py --oracle hw` measures it on an AMD GPU (the instruction's exact bytes through `tools/hw_oracle`; not run on one yet). `tests/semantic/test_fma_mix_literal.py` (the value through the interpreter, the re-anchoring path, an inline constant with the literal's printed value left alone, and the refused cases, a live source printed as inline 0 among them). A second shape is repaired too (`mix_inline_literal`): LLVM 21's form above. llvm-mc 21.1.8 (`-mcpu=gfx1013`) prints a `v_fma_mix*` literal whose low 16 bits are the f16 value of an inline constant as that constant and re-encodes the instruction in **8** bytes: every SRC field that held `0xff` holds the inline code, and the literal word is gone (`0x3f800000`, 1.0 as an f32 source, prints as `0`; `0x3c003800` as `0.5`, losing the high half 1.0). Swept with llvm-mc 21.1.8 over all 65,536 low halves under three high halves: exactly 90 low halves print this way (0..64, -1..-16, ±0.5, ±1.0, ±2.0, ±4.0, 1/(2π) as f16: `MIX_INLINE_F16`), whatever the high half; llvm-mc 23.1.6 prints all of them as `lit(V)`. The printed 8 bytes are 4 short of what the decoder read, so the later offsets of a clean listing were 4 low and its first such instruction was refused as a dropped field (one FSPX program, `tupacfan04`'s count in #8683). When every differing SRC field is `0xff` in the blob and the inline code of the stored literal's low half in the print, and the rest of the 8 bytes match exactly (`same_encoding`, all three sources live), each such source reads the stored 32 bits with the stored neg and abs (`NEG_HI`) bits, the instruction takes the 12 stored bytes, and the following offsets move up by 4 (also on the re-anchoring path). Any other difference stays `Unsupported`. CPU-checked by `tests/semantic/test_fma_mix_literal.py` (`FmaMixInlineLiteralTest`: an f32 source, two f16 halves, neg and abs, all 90 codes, both listing paths, the refused cases). | 316| Printed encodings | A listing is LLVM's text for what it decoded, not the bytes it read, so the translator checks the two against each other: the re-anchoring above for listings with undecodable words, and, for every other listing whose header names its code range and whose blob sits next to it (`fssm/`, or `fspx/` for FSPX), each instruction's printed encoding against the bytes at its offset, with the same exceptions (`same_encoding`). A difference is `Unsupported`, naming the instruction, its offset and both byte strings, instead of a translation of the field as 0. The case that prompted it: llvm-mc's gfx1013 decoder (LLVM 21.1.8) drops the VOP3 `op_sel` bits (word 0, bits 14:11) of a 16-bit VOPC compare: `0a 08 a9 d4 01 05 02 00` disassembles as `v_cmp_lt_u16_e64 s10, v1, v2` and re-encodes with the bits cleared (its assembler rejects `op_sel` on VOPC for gfx1013 and gfx1030 alike). Counted over the 1.0.2.1 corpus: the 25,030 clean listings hold 30,335,381 instructions, and none differs from its bytes beyond those exceptions (754); the 166 16-bit VOPC compares (154 shaders, all `f16`) have `op_sel` clear. Hand-written listings, `run_gpu_tests.py`'s `code 0x0..0x0 (synthetic)` listings and a blob that doesn't hold the listing's code range (the tests' header-only FSSM) are not checked. `tests/semantic/test_printed_encoding.py` (a dropped VOPC `op_sel`, a later instruction, the SRC2 exception, and the unchecked cases). One difference is repaired instead of refused: a `v_fma_mix*` literal that llvm-mc prints cut to its low 16 bits (and re-encodes with a zero high half). llvm-mc 23.1.5 prints some of these literals in full as `lit(V)` (an f32 source, or a low half that is an inline constant; LLVM 21 printed the inline constant and dropped the literal word) and still re-encodes only the low half: `tools/shader_ir.py` reads `lit(V)` as V, and the same repair applies (5,733 such operands in the pipeline library, [shader_library.md](shader_library.md)). When the 8 instruction bytes match (`same_encoding` with all three sources counted as used, so a live `s0` can't pass as an inline 0) and the printed literal is the stored one's low half, every source the bytes encode as the literal (SRC field `0xff`) takes the stored 32 bits, so a source with `op_sel_hi` and `op_sel` set reads the high half instead of +0.0. Seen in one program of the FidelityFX DLL's `FSPX` code ([fspx.md](fspx.md)): src0 the low half, src2 the high half; the game's clean listings have no such difference (the count above). That the hardware gives op_sel's high half of the literal to that source is not measured; it is what Mesa's ACO compiler relies on (public: `optimize_constants()` in `src/amd/compiler/aco_optimizer.cpp`, Mesa `main` at `bb986060`, packs two constants as the two f16 halves of one literal, read through `v_fma_mix`'s `op_sel_hi` with the second source extracting the high half), and what the console compiler emitted here. `tools/fma_mix_literal_probe.py --oracle hw` measures it on an AMD GPU (the instruction's exact bytes through `tools/hw_oracle`; not run on one yet). `tests/semantic/test_fma_mix_literal.py` (the value through the interpreter, the re-anchoring path, an inline constant with the literal's printed value left alone, and the refused cases, a live source printed as inline 0 among them). A second shape is repaired too (`mix_inline_literal`): LLVM 21's form above. llvm-mc 21.1.8 (`-mcpu=gfx1013`) prints a `v_fma_mix*` literal whose low 16 bits are the f16 value of an inline constant as that constant and re-encodes the instruction in **8** bytes: every SRC field that held `0xff` holds the inline code, and the literal word is gone (`0x3f800000`, 1.0 as an f32 source, prints as `0`; `0x3c003800` as `0.5`, losing the high half 1.0). Swept with llvm-mc 21.1.8 over all 65,536 low halves under three high halves: exactly 90 low halves print this way (0..64, -1..-16, ±0.5, ±1.0, ±2.0, ±4.0, 1/(2π) as f16: `MIX_INLINE_F16`), whatever the high half; llvm-mc 23.1.6 prints all of them as `lit(V)`. The printed 8 bytes are 4 short of what the decoder read, so the later offsets of a clean listing were 4 low and its first such instruction was refused as a dropped field (one FSPX program, `tupacfan04`'s count in #8683). When every differing SRC field is `0xff` in the blob and the inline code of the stored literal's low half in the print, and the rest of the 8 bytes match exactly (`same_encoding`, all three sources live), each such source reads the stored 32 bits with the stored neg and abs (`NEG_HI`) bits, the instruction takes the 12 stored bytes, and the following offsets move up by 4 (also on the re-anchoring path). Any other difference stays `Unsupported`. CPU-checked by `tests/semantic/test_fma_mix_literal.py` (`FmaMixInlineLiteralTest`: an f32 source, two f16 halves, neg and abs, all 90 codes, both listing paths, the refused cases). A third shape needs no blob: llvm-mc 21.1.8 also prints such a literal cut to its low 16 bits in the text while its printed encoding keeps all 32, so the printed-encoding check passes and the text alone read the high half as +0.0 (an f16 source reads 0 instead of its high half, an f32 source a denormal instead of its value). `restore_text_cut_mix_literal` takes the literal from the printed encoding, on the clean and the re-anchoring paths. Counted on one work folder's listings of 1.0.2.1: 47,910 instructions in 1,218 pipeline-library programs and 6 in one FSPX program, none in the game's own shaders. CPU-checked by `test_text_cut_but_printed_encoding_whole` (with and without a blob) and `test_text_immediate_other_than_the_low_half_is_left_alone`. |
317| Global memory | `global_load/store_dword*`: address = (64-bit SGPR base + zero-extended 32-bit VGPR offset, or a 64-bit VGPR address) + the instruction offset, translated through the heap base. Inactive lanes don't access memory, and loads merge their previous values with OpPhi. The offset is the **signed 12-bit** byte value as llvm-mc prints it, -2048..2047 (`offset:-4` is the field 0xffc; llvm-mc rejects `offset:0xffc` and disassembles that field as `offset:-4`, so no repo path delivers the raw unsigned field), added to the address as is; a tool that printed the raw field (`0xffc`) would mean the same offset, and a value outside 12 bits is rejected. Measured on an AMD Radeon RX 6800 (gfx1030) running `global_load_dword` as a raw compute kernel, wave32 and wave64 alike, with the dword at byte n = 0x10000000+n and the pointer at 0x1000: offset 0 reads 0x10001000, -4 0x10000ffc, -2048 0x10000800, 2044 0x100017fc, -1024 0x10000c00. The translator used to subtract 0x1000 from an already negative value (4096 bytes too low). Checked by `tests/semantic/test_global_mem_offset.py` (both addressing modes, dword/x2/x4, byte/short loads and stores at -4, -2048, 2047 and 0) and the GPU test `runtime/test/shaders/cs_global_neg_offset.asm` (`vk_compute_test ... 40 dump`). | 317| Global memory | `global_load/store_dword*`: address = (64-bit SGPR base + zero-extended 32-bit VGPR offset, or a 64-bit VGPR address) + the instruction offset, translated through the heap base. Inactive lanes don't access memory, and loads merge their previous values with OpPhi. The offset is the **signed 12-bit** byte value as llvm-mc prints it, -2048..2047 (`offset:-4` is the field 0xffc; llvm-mc rejects `offset:0xffc` and disassembles that field as `offset:-4`, so no repo path delivers the raw unsigned field), added to the address as is; a tool that printed the raw field (`0xffc`) would mean the same offset, and a value outside 12 bits is rejected. Measured on an AMD Radeon RX 6800 (gfx1030) running `global_load_dword` as a raw compute kernel, wave32 and wave64 alike, with the dword at byte n = 0x10000000+n and the pointer at 0x1000: offset 0 reads 0x10001000, -4 0x10000ffc, -2048 0x10000800, 2044 0x100017fc, -1024 0x10000c00. The translator used to subtract 0x1000 from an already negative value (4096 bytes too low). Checked by `tests/semantic/test_global_mem_offset.py` (both addressing modes, dword/x2/x4, byte/short loads and stores at -4, -2048, 2047 and 0) and the GPU test `runtime/test/shaders/cs_global_neg_offset.asm` (`vk_compute_test ... 40 dump`). |
318| Global atomics (`global_atomic_*`, 32-bit) | `add`, `sub`, `smin/umin`, `smax/umax`, `and`, `or`, `xor`, `swap` and `cmpswap` at the `global_load/store` address (same `Gen.global_address`: saddr pair plus zero-extended vaddr, or a 64-bit vaddr with `off`, plus the signed 12-bit offset), as one `OpAtomic*` on the PhysicalStorageBuffer dword, device scope, guarded so inactive lanes don't touch memory. `fmin` and `fmax` (32-bit float) lower to a structured `OpAtomicCompareExchange` CAS loop using GLSL.std.450 `NMin`/`NMax` (no Vulkan float-atomic extension needed; NaN returns the non-NaN operand, `-0.0 < +0.0`). `inc` and `dec` (32-bit unsigned wrapping against `DATA`: `inc` gives `(M >= DATA) ? 0 : M + 1`, `dec` gives `(M == 0 \|\| M > DATA) ? DATA : M + 1`, `dec` gives `(M == 0 With `glc` the pre-op value lands in `vdst`, the first operand; without `glc` there is no `vdst`, and the first-read analysis counts operand 0 as the address (a source). `cmpswap` takes `vdata` as the pair {DATA, CMP}: `M = (M == CMP) ? DATA : M`, as `buffer_atomic_cmpswap`. Still `Unsupported`: the `_x2` 64-bit forms, `inc`/`dec`, the float atomics, and `slc`/`dlc`. `and/or/xor/swap_x2` work on a 64-bit element (two dwords, low first) as one 32-bit atomic per dword, with no Int64 atomics: a bitwise op leaves the same memory that way, since its bits are independent. **Approximation:** an exchange can tear, since two lanes swapping into one element at once can leave one's low dword with the other's high dword (A.lo, B.lo, B.hi, A.hi), and the returned pair comes from two reads, so another lane's 64-bit op on the same element between them can show up half done (as for `ds_and/or/xor_b64`). **Approximation:** the returned pair comes from two reads, so another lane's 64-bit op on the same element between them can show up half done (as for `ds_and/or/xor_b64`). Still `Unsupported`: the other `_x2` forms (`add/sub/min/max/fmin/fmax_x2` carry or compare across the dwords, and `cmpswap_x2` compares all 64 bits), `inc`/`dec`, `fcmpswap`, and `slc`/`dlc`. Until 2026-11-22 every global atomic was rejected. CPU-checked by `tests/semantic/test_global_atomics.py` (all ten ops on a value grid with and without `glc`, `cmpswap`, offsets from -2048 to 2044, `off` addressing, seeded values, rejected forms, the first-read analysis). CPU-checked by `tests/semantic/test_global_atomics.py` (all ten integer ops plus `fmin`/`fmax` on a value grid with and without `glc`, NaN/±0/±inf, multi-lane CAS contention, `cmpswap`, offsets from -2048 to 2044, `off` addressing, seeded values, rejected forms, the first-read analysis) and `tests/semantic/test_global_atomics_x2.py` (the four `_x2` forms with and without `glc`, an offset, seeded values, the carrying forms rejected), and validated with `spirv-val` (native and `--wave64-emulate`). **Not GPU-verified.** \|\| M > DATA) ? DATA : M - 1`, RDNA2 ISA) also lower to a structured `OpAtomicCompareExchange` CAS loop via `Gen.atomic_inc_dec_cas` for both `global_atomic_{inc,dec}` and MUBUF `buffer_atomic_{inc,dec}` (preserving MUBUF bounds checks: OOB/inactive lanes leave memory untouched and return 0 with `glc`). With `glc` the pre-op value lands in `vdst`, the first operand; without `glc` there is no `vdst`, and the first-read analysis counts operand 0 as the address (a source). `cmpswap` takes `vdata` as the pair {DATA, CMP}: `M = (M == CMP) ? DATA : M`, as `buffer_atomic_cmpswap`. `and/or/xor/swap_x2` work on a 64-bit element (two dwords, low first) as one 32-bit atomic per dword: a bitwise op or an exchange leaves the same memory that way, with no Int64 atomics. **Approximation:** the returned pair comes from two reads, so another lane's 64-bit op on the same element between them can show up half done (as for `ds_and/or/xor_b64`). Still `Unsupported`: the other `_x2` forms (`add/sub/min/max/inc/dec/fmin/fmax_x2` carry or compare across the dwords, and `cmpswap_x2` compares all 64 bits), `fcmpswap`, and `slc`/`dlc`. Until 2026-11-22 every global atomic was rejected. CPU-checked by `tests/semantic/test_global_atomics.py` (all ten integer ops plus `fmin`/`fmax` on a value grid with and without `glc`, NaN/±0/±inf, multi-lane CAS contention, `cmpswap`, offsets from -2048 to 2044, `off` addressing, seeded values, rejected forms, the first-read analysis), `tests/semantic/test_atomic_inc_dec.py` (`global_atomic_{inc,dec}` and `buffer_atomic_{inc,dec}` edge grid, wraparound, `glc` vs non-`glc`, signed offsets, `off` addressing, MUBUF bounds/OOB, inactive lanes, multi-lane CAS contention, first-read analysis, rejected `_x2`/`slc`/`dlc` forms), and `tests/semantic/test_global_atomics_x2.py` (the four `_x2` forms with and without `glc`, an offset, seeded values, the carrying forms rejected), and validated with `spirv-val` (native and `--wave64-emulate`). **Not GPU-verified.** | 318| Global atomics (`global_atomic_*`, 32-bit) | `add`, `sub`, `smin/umin`, `smax/umax`, `and`, `or`, `xor`, `swap` and `cmpswap` at the `global_load/store` address (same `Gen.global_address`: saddr pair plus zero-extended vaddr, or a 64-bit vaddr with `off`, plus the signed 12-bit offset), as one `OpAtomic*` on the PhysicalStorageBuffer dword, device scope, guarded so inactive lanes don't touch memory. `fmin` and `fmax` (32-bit float) lower to a structured `OpAtomicCompareExchange` CAS loop using GLSL.std.450 `NMin`/`NMax` (no Vulkan float-atomic extension needed; NaN returns the non-NaN operand, `-0.0 < +0.0`). `inc` and `dec` (32-bit unsigned wrapping against `DATA`: `inc` gives `(M >= DATA) ? 0 : M + 1`, `dec` gives `(M == 0 \|\| M > DATA) ? DATA : M + 1`, `dec` gives `(M == 0 With `glc` the pre-op value lands in `vdst`, the first operand; without `glc` there is no `vdst`, and the first-read analysis counts operand 0 as the address (a source). `cmpswap` takes `vdata` as the pair {DATA, CMP}: `M = (M == CMP) ? DATA : M`, as `buffer_atomic_cmpswap`. Still `Unsupported`: the `_x2` 64-bit forms, `inc`/`dec`, the float atomics, and `slc`/`dlc`. `and/or/xor/swap_x2` work on a 64-bit element (two dwords, low first) as one 32-bit atomic per dword, with no Int64 atomics: a bitwise op leaves the same memory that way, since its bits are independent. **Approximation:** an exchange can tear, since two lanes swapping into one element at once can leave one's low dword with the other's high dword (A.lo, B.lo, B.hi, A.hi), and the returned pair comes from two reads, so another lane's 64-bit op on the same element between them can show up half done (as for `ds_and/or/xor_b64`). **Approximation:** the returned pair comes from two reads, so another lane's 64-bit op on the same element between them can show up half done (as for `ds_and/or/xor_b64`). Still `Unsupported`: the other `_x2` forms (`add/sub/min/max/fmin/fmax_x2` carry or compare across the dwords, and `cmpswap_x2` compares all 64 bits), `inc`/`dec`, `fcmpswap`, and `slc`/`dlc`. Until 2026-11-22 every global atomic was rejected. CPU-checked by `tests/semantic/test_global_atomics.py` (all ten ops on a value grid with and without `glc`, `cmpswap`, offsets from -2048 to 2044, `off` addressing, seeded values, rejected forms, the first-read analysis). CPU-checked by `tests/semantic/test_global_atomics.py` (all ten integer ops plus `fmin`/`fmax` on a value grid with and without `glc`, NaN/±0/±inf, multi-lane CAS contention, `cmpswap`, offsets from -2048 to 2044, `off` addressing, seeded values, rejected forms, the first-read analysis) and `tests/semantic/test_global_atomics_x2.py` (the four `_x2` forms with and without `glc`, an offset, seeded values, the carrying forms rejected), and validated with `spirv-val` (native and `--wave64-emulate`). **Not GPU-verified.** \|\| M > DATA) ? DATA : M - 1`, RDNA2 ISA) also lower to a structured `OpAtomicCompareExchange` CAS loop via `Gen.atomic_inc_dec_cas` for both `global_atomic_{inc,dec}` and MUBUF `buffer_atomic_{inc,dec}` (preserving MUBUF bounds checks: OOB/inactive lanes leave memory untouched and return 0 with `glc`). With `glc` the pre-op value lands in `vdst`, the first operand; without `glc` there is no `vdst`, and the first-read analysis counts operand 0 as the address (a source). `cmpswap` takes `vdata` as the pair {DATA, CMP}: `M = (M == CMP) ? DATA : M`, as `buffer_atomic_cmpswap`. `and/or/xor/swap_x2` work on a 64-bit element (two dwords, low first) as one 32-bit atomic per dword: a bitwise op or an exchange leaves the same memory that way, with no Int64 atomics. **Approximation:** the returned pair comes from two reads, so another lane's 64-bit op on the same element between them can show up half done (as for `ds_and/or/xor_b64`). Still `Unsupported`: the other `_x2` forms (`add/sub/min/max/inc/dec/fmin/fmax_x2` carry or compare across the dwords, and `cmpswap_x2` compares all 64 bits), `fcmpswap`, and `slc`/`dlc`. Until 2026-11-22 every global atomic was rejected. CPU-checked by `tests/semantic/test_global_atomics.py` (all ten integer ops plus `fmin`/`fmax` on a value grid with and without `glc`, NaN/±0/±inf, multi-lane CAS contention, `cmpswap`, offsets from -2048 to 2044, `off` addressing, seeded values, rejected forms, the first-read analysis), `tests/semantic/test_atomic_inc_dec.py` (`global_atomic_{inc,dec}` and `buffer_atomic_{inc,dec}` edge grid, wraparound, `glc` vs non-`glc`, signed offsets, `off` addressing, MUBUF bounds/OOB, inactive lanes, multi-lane CAS contention, first-read analysis, rejected `_x2`/`slc`/`dlc` forms), and `tests/semantic/test_global_atomics_x2.py` (the four `_x2` forms with and without `glc`, an offset, seeded values, the carrying forms rejected), and validated with `spirv-val` (native and `--wave64-emulate`). **Not GPU-verified.** |
319| `global_atomic_csub`, `buffer_atomic_csub` (GFX10.3) | `tmp = M; M = (DATA > tmp) ? 0 : tmp - DATA`, unsigned: a subtract clamped at 0 that never wraps; with `glc` the old M comes back. Measured on gfx1036 by @Vonsek (#3193): 162/162 (memory, data) pairs over both forms. Same `OpAtomicCompareExchange` loop as `inc`/`dec` (`Gen.atomic_inc_dec_cas`), so exact under contention; operands, inactive lanes, buffer bounds and `glc` as `inc`/`dec`. Until 2026-11-22 both raised `Unsupported`. CPU-checked by `tests/semantic/test_atomic_csub.py` (a 9×9 value grid, no `glc`, buffer bounds, 32 lanes on one dword against 32 sequential subtracts, seeded values). The translation is not GPU-verified. | 319| `global_atomic_csub`, `buffer_atomic_csub` (GFX10.3) | `tmp = M; M = (DATA > tmp) ? 0 : tmp - DATA`, unsigned: a subtract clamped at 0 that never wraps; with `glc` the old M comes back. Measured on gfx1036 by @Vonsek (#3193): 162/162 (memory, data) pairs over both forms. Same `OpAtomicCompareExchange` loop as `inc`/`dec` (`Gen.atomic_inc_dec_cas`), so exact under contention; operands, inactive lanes, buffer bounds and `glc` as `inc`/`dec`. Until 2026-11-22 both raised `Unsupported`. CPU-checked by `tests/semantic/test_atomic_csub.py` (a 9×9 value grid, no `glc`, buffer bounds, 32 lanes on one dword against 32 sequential subtracts, seeded values). The translation is not GPU-verified. |
@@ -372,6 +372,7 @@ How the generated SPIR-V expects the runtime to work:
372| Integer clamp | The VOP3 `clamp` bit on `v_add_nc_u32`, `v_sub_nc_u32`, `v_subrev_nc_u32` saturates the result to [0, 0xFFFFFFFF], and on `v_add_nc_i32`/`v_sub_nc_i32` to [0x80000000, 0x7FFFFFFF]; without it they wrap. GFX9+ semantics: LLVM selects `uaddsat`/`usubsat` and `saddsat`/`ssubsat` to exactly these ops with clamp set. **Until this change clamp was silently ignored on the unsigned ops** (and the signed ones were `Unsupported`). Checked on the CPU by `tests/semantic/test_alu_add_nc_clamp.py`. The carry-out unsigned ops (`v_add_co_u32`, `v_sub_co_u32`, `v_subrev_co_u32`, `v_add_co_ci_u32`, `v_sub_co_ci_u32`, `v_subrev_co_ci_u32`) with VOP3 `clamp` likewise saturate D to `0xFFFFFFFF` on add carry or `0` on sub borrow while still reporting the real carry/borrow bit in `sdst` (**until 2026-11-22 the translator ignored `clamp` on all six**); confirmed natively on RDNA2 (AMD Radeon 680M `gfx1035` wave32 & wave64 via `tools/hw_oracle`, and independently on `gfx1036` in #1746) and CPU-checked by `tests/semantic/test_alu_add_co_clamp.py`. The 16-bit unsigned add/sub (`v_add_nc_u16`, `v_sub_nc_u16`, and the `v_add_u16`/`v_sub_u16`/`v_subrev_u16` `_e64` names) saturate to [0, 0xFFFF] with `clamp` (llvm-mc 21 gfx1030 encodes the bit on them, and LLVM selects i16 `uaddsat`/`usubsat` to them); **until 2026-11-22 the translator wrapped instead**. `clamp` on any other 16-bit integer op raises `Unsupported`. CPU-checked by `tests/semantic/test_alu_u16_clamp.py` (the high half of the destination is kept), **not GPU-verified**. CPU-checked by `tests/semantic/test_alu_u16_clamp.py` (the high half of the destination is kept), and **Hardware-verified on RDNA2** (AMD Radeon 680M, `gfx1035`, Windows 11, driver `26.5.1`, wave32 and wave64 via `tools/int_hw_probe.py --oracle both`, SHADER-137): all 32-bit and 16-bit `*_nc_*` `clamp` cases (including `op_sel` and kept destination half on u16) match hardware bit-for-bit. **Open divergence measured on the same hardware:** `v_add_co_u32`, `v_sub_co_u32`, `v_subrev_co_u32`, `v_add_co_ci_u32`, `v_sub_co_ci_u32` and `v_subrev_co_ci_u32` with `clamp` saturate D (`0xFFFFFFFF` / `0`) while still reporting the real carry/borrow in `sdst`, whereas the translator currently ignores `clamp` on these carry-out ops. | 372| Integer clamp | The VOP3 `clamp` bit on `v_add_nc_u32`, `v_sub_nc_u32`, `v_subrev_nc_u32` saturates the result to [0, 0xFFFFFFFF], and on `v_add_nc_i32`/`v_sub_nc_i32` to [0x80000000, 0x7FFFFFFF]; without it they wrap. GFX9+ semantics: LLVM selects `uaddsat`/`usubsat` and `saddsat`/`ssubsat` to exactly these ops with clamp set. **Until this change clamp was silently ignored on the unsigned ops** (and the signed ones were `Unsupported`). Checked on the CPU by `tests/semantic/test_alu_add_nc_clamp.py`. The carry-out unsigned ops (`v_add_co_u32`, `v_sub_co_u32`, `v_subrev_co_u32`, `v_add_co_ci_u32`, `v_sub_co_ci_u32`, `v_subrev_co_ci_u32`) with VOP3 `clamp` likewise saturate D to `0xFFFFFFFF` on add carry or `0` on sub borrow while still reporting the real carry/borrow bit in `sdst` (**until 2026-11-22 the translator ignored `clamp` on all six**); confirmed natively on RDNA2 (AMD Radeon 680M `gfx1035` wave32 & wave64 via `tools/hw_oracle`, and independently on `gfx1036` in #1746) and CPU-checked by `tests/semantic/test_alu_add_co_clamp.py`. The 16-bit unsigned add/sub (`v_add_nc_u16`, `v_sub_nc_u16`, and the `v_add_u16`/`v_sub_u16`/`v_subrev_u16` `_e64` names) saturate to [0, 0xFFFF] with `clamp` (llvm-mc 21 gfx1030 encodes the bit on them, and LLVM selects i16 `uaddsat`/`usubsat` to them); **until 2026-11-22 the translator wrapped instead**. `clamp` on any other 16-bit integer op raises `Unsupported`. CPU-checked by `tests/semantic/test_alu_u16_clamp.py` (the high half of the destination is kept), **not GPU-verified**. CPU-checked by `tests/semantic/test_alu_u16_clamp.py` (the high half of the destination is kept), and **Hardware-verified on RDNA2** (AMD Radeon 680M, `gfx1035`, Windows 11, driver `26.5.1`, wave32 and wave64 via `tools/int_hw_probe.py --oracle both`, SHADER-137): all 32-bit and 16-bit `*_nc_*` `clamp` cases (including `op_sel` and kept destination half on u16) match hardware bit-for-bit. **Open divergence measured on the same hardware:** `v_add_co_u32`, `v_sub_co_u32`, `v_subrev_co_u32`, `v_add_co_ci_u32`, `v_sub_co_ci_u32` and `v_subrev_co_ci_u32` with `clamp` saturate D (`0xFFFFFFFF` / `0`) while still reporting the real carry/borrow in `sdst`, whereas the translator currently ignores `clamp` on these carry-out ops. |
373| Carry-out subtract of a register from itself | `v_sub_co_u32`, `v_subrev_co_u32`, `v_sub_co_ci_u32` and `v_subrev_co_ci_u32` whose two sources are the same operand (`vD, sdst, vX, vX`) are written out as what x - x gives: D = 0 - carry in and borrow out = carry in (D = 0 and no borrow without a carry in; `clamp` saturates D to 0 on that borrow), with no `OpISubBorrow %x %x`. The values are the same as before; the form is there for AMD's Windows driver, whose compiler dies with an access violation (`0xC0000005` in `amdvlk64.dll`, at `0xafeb87` in 32.0.21037.1004 and `0xaff2d7` in 32.0.21045.29003, Radeon iGPU of a Ryzen 9 9950X3D, gfx1036) creating a native wave64 compute pipeline in which the borrow of an `OpISubBorrow` of one value with itself predicates the value operand of an `OpGroupNonUniformShuffle`. Measured by editing the translated module of a reduced `crosslane_fuzz.py` program (`v_sub_co_u32_e64 v4, s[18:19], v1, v1`, `s_and_saveexec_b64`, `ds_bpermute_b32`): `OpISubBorrow %x %x` crashes 3 of 3, also with the same id written twice, while a borrow of two different registers, `x < x`, `x != x`, `x - 0`, a literal `false` mask, the shuffle of a literal 0 and the same module without the shuffle all compile and run. The `--wave64-emulate` form of the same programs has no shuffle and never crashed. Found with `crosslane_fuzz.py --seed 880317 --wave 64 --w64-native --no-maskdata --dpp --ext --programs 400`: programs 1 and 181 were harness errors (exit 3221225477) on both drivers and match with this form (399 of 400 match, the other one differs only in a hypothesis op, as before). Checked on the CPU by `tests/semantic/test_sub_co_same_operand.py` (wave32 and native wave64 run, the emulated form by its text). **Not counted over the corpus**: whether a game shader subtracts a register from itself with a carry out is unmeasured (no package here), and other ways for that driver to see an `OpISubBorrow` of two equal values (two registers holding the same value) are not covered. | 373| Carry-out subtract of a register from itself | `v_sub_co_u32`, `v_subrev_co_u32`, `v_sub_co_ci_u32` and `v_subrev_co_ci_u32` whose two sources are the same operand (`vD, sdst, vX, vX`) are written out as what x - x gives: D = 0 - carry in and borrow out = carry in (D = 0 and no borrow without a carry in; `clamp` saturates D to 0 on that borrow), with no `OpISubBorrow %x %x`. The values are the same as before; the form is there for AMD's Windows driver, whose compiler dies with an access violation (`0xC0000005` in `amdvlk64.dll`, at `0xafeb87` in 32.0.21037.1004 and `0xaff2d7` in 32.0.21045.29003, Radeon iGPU of a Ryzen 9 9950X3D, gfx1036) creating a native wave64 compute pipeline in which the borrow of an `OpISubBorrow` of one value with itself predicates the value operand of an `OpGroupNonUniformShuffle`. Measured by editing the translated module of a reduced `crosslane_fuzz.py` program (`v_sub_co_u32_e64 v4, s[18:19], v1, v1`, `s_and_saveexec_b64`, `ds_bpermute_b32`): `OpISubBorrow %x %x` crashes 3 of 3, also with the same id written twice, while a borrow of two different registers, `x < x`, `x != x`, `x - 0`, a literal `false` mask, the shuffle of a literal 0 and the same module without the shuffle all compile and run. The `--wave64-emulate` form of the same programs has no shuffle and never crashed. Found with `crosslane_fuzz.py --seed 880317 --wave 64 --w64-native --no-maskdata --dpp --ext --programs 400`: programs 1 and 181 were harness errors (exit 3221225477) on both drivers and match with this form (399 of 400 match, the other one differs only in a hypothesis op, as before). Checked on the CPU by `tests/semantic/test_sub_co_same_operand.py` (wave32 and native wave64 run, the emulated form by its text). **Not counted over the corpus**: whether a game shader subtracts a register from itself with a carry out is unmeasured (no package here), and other ways for that driver to see an `OpISubBorrow` of two equal values (two registers holding the same value) are not covered. |
374| Push-constant tail as a uniform block (`--pc-tail-ubo`) | For devices whose `maxPushConstantsSize` is 128, Vulkan's minimum, which can't take the 144-byte block (152 with `--mesh-compute`): AMD's older Windows drivers on RDNA2 iGPUs (Radeon 680M on 22.40.84.06, 610M on 24.10.16.14, the Ryzen 5 7600's iGPU on 24.10.24; a 610M on 26.11.2 reports 256) and some Intel Arc drivers (D3D-14, `push_constants_need_fallback` in `d3d12_vulkan_device.cpp`). The push-constant block keeps dwords 0–31 (s0–s31, 128 bytes). The tail that follows them by default, the heap base and code base and, with `--mesh-compute`, the output address, becomes `%pc_tail`: a uniform block at **set 1, binding 0** with the same members in the same order at offsets 0, 4, … (16 bytes, 24 with `--mesh-compute`). Set 1 is otherwise unused, so set 0's update-after-bind table doesn't change. The block is declared, and listed in the entry point's interface, only when the shader reads the tail (a memory access through the heap base, `s_getpc_b64`, or the `--mesh-compute` epilogue); the index then records `"pc_tail": {"set": 1, "binding": 0, "bytes": 16}`, and `"push_constant_bytes"` is 128 for every module. `"bindings"` still lists set 0 only. Without the flag nothing changes. **Checked:** `tests/test_pc_tail_ubo.py` (on `cs_store` and `ps_m15`: the block, its interface entry, `spirv-val`, the metadata, no block without a tail read, and the `--mesh-compute` address). The whole hand-written GPU test set in `runtime/test/shaders` is translated with the flag by `build.py` or `scripts/run_gpu_tests.py` under `LEONIDA_PC_TAIL_UBO=1`, and the index's `pc_tail` entries say which modules read the tail; how many do changes as shaders are added, so no count is kept here. The GPU test programs bind the block (`runtime/test/vk_pc_tail.h`; the list is in docs/testing.md), except with `--mesh-compute`, whose tests skip. The D3D12 layer does not yet: it refuses pipelines on a device with fewer than 144 push-constant bytes (`push_constants_fit` in `d3d12_vulkan_device.cpp`). | 374| Push-constant tail as a uniform block (`--pc-tail-ubo`) | For devices whose `maxPushConstantsSize` is 128, Vulkan's minimum, which can't take the 144-byte block (152 with `--mesh-compute`): AMD's older Windows drivers on RDNA2 iGPUs (Radeon 680M on 22.40.84.06, 610M on 24.10.16.14, the Ryzen 5 7600's iGPU on 24.10.24; a 610M on 26.11.2 reports 256) and some Intel Arc drivers (D3D-14, `push_constants_need_fallback` in `d3d12_vulkan_device.cpp`). The push-constant block keeps dwords 0–31 (s0–s31, 128 bytes). The tail that follows them by default, the heap base and code base and, with `--mesh-compute`, the output address, becomes `%pc_tail`: a uniform block at **set 1, binding 0** with the same members in the same order at offsets 0, 4, … (16 bytes, 24 with `--mesh-compute`). Set 1 is otherwise unused, so set 0's update-after-bind table doesn't change. The block is declared, and listed in the entry point's interface, only when the shader reads the tail (a memory access through the heap base, `s_getpc_b64`, or the `--mesh-compute` epilogue); the index then records `"pc_tail": {"set": 1, "binding": 0, "bytes": 16}`, and `"push_constant_bytes"` is 128 for every module. `"bindings"` still lists set 0 only. Without the flag nothing changes. **Checked:** `tests/test_pc_tail_ubo.py` (on `cs_store` and `ps_m15`: the block, its interface entry, `spirv-val`, the metadata, no block without a tail read, and the `--mesh-compute` address). The whole hand-written GPU test set in `runtime/test/shaders` is translated with the flag by `build.py` or `scripts/run_gpu_tests.py` under `LEONIDA_PC_TAIL_UBO=1`, and the index's `pc_tail` entries say which modules read the tail; how many do changes as shaders are added, so no count is kept here. The GPU test programs bind the block (`runtime/test/vk_pc_tail.h`; the list is in docs/testing.md), except with `--mesh-compute`, whose tests skip. The D3D12 layer does not yet: it refuses pipelines on a device with fewer than 144 push-constant bytes (`push_constants_fit` in `d3d12_vulkan_device.cpp`). |
375| Address guard (`--address-guard`) | **Prototype, off by default.** Every `Gen.host_addr` access (buffer, `global_`, scalar and BVH loads, stores and atomics) calls `%guard_fn` with the access's sign-extended 48-bit heap offset, its kind and its span. An access whose first and last byte are below the arena's size passes after one compare. Any other access looks up the 4 KiB pages of its first and last byte in the runtime's two-level page table (level 1 by offset bits 47..32, level 2 one bit per page). A refused load reads the zero area at `heap_base + 0x71000`. A refused store or atomic goes to the dump area at `+ 0x78000`, and an atomic returns 0. Each refusal is counted in the header at `+ 0x70000`. The entry block reads that header once. Without its magic (runtime `LEONIDA_ADDRESS_GUARD` unset) every access passes, and without the flag the module is unchanged byte for byte. The index records `"address_guard": true`. Format: `runtime/src/address_guard.h`, `tools/address_guard.py`; design and costs: `docs/d3d12_vulkan.md` 3.3, "Address guard". **Checked:** `tests/semantic/test_address_guard.py` (fixture `cs_address_guard` through `spirv_mini_interp` with the guard on, off at run time and without the flag; kinds and spans per instruction family; the table model), `runtime/test/address_guard_test.cpp`, and `scripts/run_address_guard_gpu_test.py` (lavapipe, Mesa 26.3.1: the refused loads read 0 over real memory, and the store and the atomic land in the dump area). |
375| `v_mad_u32_u16` / `v_mad_i32_i16` op_sel on S2 and D, and clamp | D = S0.half · S1.half + S2, the halves zero- (u16) or sign-extended (i16), op_sel bit 0 / 1 reading the high half of S0 / S1. The other bits and `clamp` were refused (`Unsupported: op_sel/clamp`) until their results were measured on RDNA2 (AMD Radeon iGPU, gfx1036, Windows driver 26.10.1, raw kernels through `tools/hw_oracle`, wave32 and wave64 alike; EGEN-HW-MAD-U32-U16, 44 words): **op_sel bit 2 adds S2[31:16] zero-extended, in the i16 op too** (`v_mad_i32_i16 d, 3, 3, 0xffff8000 op_sel:[0,0,1,0]` gives `0x00010008`, not 8); an inline float constant there is its f32 pattern (`1.0` adds `0x3f80`); **op_sel bit 3 writes the result shifted left by 16** (low half 0, the old D not kept); **`clamp` saturates the 32-bit sum** to [0, 0xffffffff] (u16) or [0x80000000, 0x7fffffff] (i16), before that shift (the 16-bit product itself never overflows). GPU-checked with `runtime/test/shaders/ps_valu16_mad_sel.asm` (4096/4096 on NVIDIA GeForce RTX 5080, driver 616.92, and the gfx1036 iGPU); CPU-checked by `tests/semantic/test_alu_mad_32_16.py` (40 seeded cases against a Python reference) and `tests/semantic/test_value_semantics.py`. | 376| `v_mad_u32_u16` / `v_mad_i32_i16` op_sel on S2 and D, and clamp | D = S0.half · S1.half + S2, the halves zero- (u16) or sign-extended (i16), op_sel bit 0 / 1 reading the high half of S0 / S1. The other bits and `clamp` were refused (`Unsupported: op_sel/clamp`) until their results were measured on RDNA2 (AMD Radeon iGPU, gfx1036, Windows driver 26.10.1, raw kernels through `tools/hw_oracle`, wave32 and wave64 alike; EGEN-HW-MAD-U32-U16, 44 words): **op_sel bit 2 adds S2[31:16] zero-extended, in the i16 op too** (`v_mad_i32_i16 d, 3, 3, 0xffff8000 op_sel:[0,0,1,0]` gives `0x00010008`, not 8); an inline float constant there is its f32 pattern (`1.0` adds `0x3f80`); **op_sel bit 3 writes the result shifted left by 16** (low half 0, the old D not kept); **`clamp` saturates the 32-bit sum** to [0, 0xffffffff] (u16) or [0x80000000, 0x7fffffff] (i16), before that shift (the 16-bit product itself never overflows). GPU-checked with `runtime/test/shaders/ps_valu16_mad_sel.asm` (4096/4096 on NVIDIA GeForce RTX 5080, driver 616.92, and the gfx1036 iGPU); CPU-checked by `tests/semantic/test_alu_mad_32_16.py` (40 seeded cases against a Python reference) and `tests/semantic/test_value_semantics.py`. |
376| `v_add_nc_i16`, `v_sub_nc_i16` | GFX10 VOP3-only signed 16-bit add and subtract. Without `clamp` they are bit-identical to `v_add_nc_u16`/`v_sub_nc_u16` (the low 16 bits wrap) and take the same path: `op_sel:[s0,s1,dst]` picks each source's half and the destination half, and the other half of D is kept. With `clamp`, the exact sum or difference of the sign-extended halves saturates to [-32768, 32767] (`SClamp`), where the u16 forms saturate to [0, 0xFFFF]. RDNA2 (GFX10.3) dropped reversed 16-bit integer subtraction (`v_subrev_nc_u16` / `v_subrev_nc_i16` do not exist on hardware; `v_subrev_f16` is the only 16-bit reverse subtract opcode). Checked by `tests/semantic/test_valu_add_sub_nc_i16.py` (a value grid with and without `clamp`, `op_sel`, literals, SGPR sources, and untouched half preservation) and **Hardware-verified on AMD RDNA2** (`gfx1036`, wave32 and wave64 via `tools/int_hw_probe.py`, `valu_add_nc_clamp/v_add_sub_nc_i16_clamp`): signed saturation to [-32768, 32767], `op_sel` source selection, and untouched destination half preservation match hardware bit-for-bit. Until 2026-11-22 both raised `Unsupported`. CPU-checked by `tests/semantic/test_valu_add_sub_nc_i16.py` (a value grid with and without `clamp`, `op_sel` including the destination half, and equality with the u16 forms without `clamp`). **GPU-verified** on native RDNA2 (gfx1036, the Radeon iGPU of a Ryzen 7 9800X3D, Windows driver 32.0.21042.62) through `tools/hw_oracle`, one-thread raw kernels: 112 of 112 directed cases (both ops; 0x7FFF+1, 0x8000+1, 0x8000+0xFFFF, 0x7FFF+0x7FFF, 0x8000+0x8000 and others, each with and without `clamp` and with `op_sel` `[0,0,0]`, `[1,0,1]`, `[0,1,0]` and `[1,1,1]`, the destination preset to 0xA5A5A5A5). For example `v_add_nc_i16(0x7FFF, 1)` gives 0x8000 wrapped and 0x7FFF with `clamp`, `v_sub_nc_i16(0x8000, 1) clamp` gives 0x8000, and the destination half `op_sel` doesn't pick keeps its 0xA5A5. `tools/pk16_diff.py --oracle translator,hw --ops v_add_nc_i16,v_sub_nc_i16 --programs 3000 --seed 1`: 3000 of 3000 programs agree with the hardware and the translator. **Not GPU-verified.** Measured on native gfx1100: `clamp` saturates the exact sign-extended sum to [-32768, 32767] and the other half of D is kept. | 377| `v_add_nc_i16`, `v_sub_nc_i16` | GFX10 VOP3-only signed 16-bit add and subtract. Without `clamp` they are bit-identical to `v_add_nc_u16`/`v_sub_nc_u16` (the low 16 bits wrap) and take the same path: `op_sel:[s0,s1,dst]` picks each source's half and the destination half, and the other half of D is kept. With `clamp`, the exact sum or difference of the sign-extended halves saturates to [-32768, 32767] (`SClamp`), where the u16 forms saturate to [0, 0xFFFF]. RDNA2 (GFX10.3) dropped reversed 16-bit integer subtraction (`v_subrev_nc_u16` / `v_subrev_nc_i16` do not exist on hardware; `v_subrev_f16` is the only 16-bit reverse subtract opcode). Checked by `tests/semantic/test_valu_add_sub_nc_i16.py` (a value grid with and without `clamp`, `op_sel`, literals, SGPR sources, and untouched half preservation) and **Hardware-verified on AMD RDNA2** (`gfx1036`, wave32 and wave64 via `tools/int_hw_probe.py`, `valu_add_nc_clamp/v_add_sub_nc_i16_clamp`): signed saturation to [-32768, 32767], `op_sel` source selection, and untouched destination half preservation match hardware bit-for-bit. Until 2026-11-22 both raised `Unsupported`. CPU-checked by `tests/semantic/test_valu_add_sub_nc_i16.py` (a value grid with and without `clamp`, `op_sel` including the destination half, and equality with the u16 forms without `clamp`). **GPU-verified** on native RDNA2 (gfx1036, the Radeon iGPU of a Ryzen 7 9800X3D, Windows driver 32.0.21042.62) through `tools/hw_oracle`, one-thread raw kernels: 112 of 112 directed cases (both ops; 0x7FFF+1, 0x8000+1, 0x8000+0xFFFF, 0x7FFF+0x7FFF, 0x8000+0x8000 and others, each with and without `clamp` and with `op_sel` `[0,0,0]`, `[1,0,1]`, `[0,1,0]` and `[1,1,1]`, the destination preset to 0xA5A5A5A5). For example `v_add_nc_i16(0x7FFF, 1)` gives 0x8000 wrapped and 0x7FFF with `clamp`, `v_sub_nc_i16(0x8000, 1) clamp` gives 0x8000, and the destination half `op_sel` doesn't pick keeps its 0xA5A5. `tools/pk16_diff.py --oracle translator,hw --ops v_add_nc_i16,v_sub_nc_i16 --programs 3000 --seed 1`: 3000 of 3000 programs agree with the hardware and the translator. **Not GPU-verified.** Measured on native gfx1100: `clamp` saturates the exact sign-extended sum to [-32768, 32767] and the other half of D is kept. |
377| Gather sampler LOD | Before choosing the mip for the four fetches in `image_gather4_l(_o)`, clamp the requested LOD to S# word 1's MIN_LOD [11:0] and MAX_LOD [23:12] (unsigned 4.8). `ps_gather_sampler_lod.asm` reads the S# from the heap. On RTX 5080 and Radeon Graphics, a maximum of 0.25 selects the base quadrants and a minimum of 0.75 selects the cyan mip across the 64×64 draw. Without these bounds half of each frame reads the wrong level. Radeon also agreed with native `OpImageGather Lod` (`VK_AMD_texture_gather_bias_lod`) for those bounds. At exactly 0.5, with bounds [0,1], that native draw selected mip 1; the emulation now computes the mip as `Floor(LOD + 0.5)`, ties up, and also selects mip 1 (before SHADER-152 it used `RoundEven`, which selected mip 0). It computes `floor(LOD) + (LOD - floor(LOD) >= 0.5)`, which is exact in binary32, not `Floor(LOD + 0.5)`: that sum rounds `0x3effffff` up to 1.0, and on an RTX 5070 (621.24) the gather then read mip 1 where native `image_sample_l` at the same LOD reads mip 0. | 378| Gather sampler LOD | Before choosing the mip for the four fetches in `image_gather4_l(_o)`, clamp the requested LOD to S# word 1's MIN_LOD [11:0] and MAX_LOD [23:12] (unsigned 4.8). `ps_gather_sampler_lod.asm` reads the S# from the heap. On RTX 5080 and Radeon Graphics, a maximum of 0.25 selects the base quadrants and a minimum of 0.75 selects the cyan mip across the 64×64 draw. Without these bounds half of each frame reads the wrong level. Radeon also agreed with native `OpImageGather Lod` (`VK_AMD_texture_gather_bias_lod`) for those bounds. At exactly 0.5, with bounds [0,1], that native draw selected mip 1; the emulation now computes the mip as `Floor(LOD + 0.5)`, ties up, and also selects mip 1 (before SHADER-152 it used `RoundEven`, which selected mip 0). It computes `floor(LOD) + (LOD - floor(LOD) >= 0.5)`, which is exact in binary32, not `Floor(LOD + 0.5)`: that sum rounds `0x3effffff` up to 1.0, and on an RTX 5070 (621.24) the gather then read mip 1 where native `image_sample_l` at the same LOD reads mip 0. |
@@ -430,7 +431,7 @@ How the generated SPIR-V expects the runtime to work:
430| Wave64 handling | Wave size is detected per shader from the code (64-bit EXEC writes, `exec_hi`, `v_mbcnt_hi`, `*_saveexec_b64`/`*_wrexec_b64`, and 64-bit lane-mask SOP ops `s_bcnt[01]_i32_b64` / `s_ff[01]_i32_b64` / `s_wqm_b64` / `s_bfm_b64` even when the mask is an ordinary SGPR pair; mesh shaders are always wave64). In wave32 code (a header or FSPX dispatch state that says so) `s_bfm_b64` is 64-bit data instead: the translator writes `((1 << (S0 & 63)) - 1) << (S1 & 63)` to the pair, `tools/lane_masks.py` leaves it data, and it doesn't count against an FSPX program's wave32 state. The pipeline library's wave32 compute programs build an S# in place with it (`s_bfm_b64 s[88:89], 2, 54`, then `s_mov_b64` of words 2-3; 958 programs, [shader_library.md](shader_library.md)). Only constant operands are translated there; none other is seen. `tests/semantic/test_wave32_bfm64_data.py`. Wave size comes from the sidecar `fssm/<name>.fssm` header flags word `u32[0xD4]` bit 5 (`0x20` = wave32, `0` = wave64; `fssm_header.wave_size()`), cross-checked against wave64/wave32 code markers (`WAVE64_RE` / `WAVE32_RE`: a contradicting header and code listing raises `Unsupported`), and falls back to the code-marker heuristic (64-bit EXEC/VCC writes, `exec_hi`, `v_mbcnt_hi`, `*_saveexec_b64`/`*_wrexec_b64`, and 64-bit lane-mask SOP ops `s_bcnt[01]_i32_b64` / `s_ff[01]_i32_b64` / `s_wqm_b64` / `s_bfm_b64`, plus wave64 for mesh shaders) when no `FSSM`-magic sidecar is present (synthetic listings). **An FSPX program** (the FidelityFX DLL's, no FSSM blob) takes its wave size from its dispatch state instead: kind 0 word 4 bit 20, set = wave32 (`fspx/<name>.json` `wave32`). Only a strict marker (`WAVE64_RE` against wave32, `WAVE32_RE` against wave64) contradicts it and raises `Unsupported`; a `_b64` op on `vcc` or `exec` does not, since these programs move `vcc` as an ordinary SGPR pair. Without that field the heuristic stays. Confirmed on the 29 programs of 1.0.2.1: strict markers never contradict the bit, the `RSRC1` VGPR granule fits it in all 21 programs that decode cleanly, and `PSV0` lane counts agree with it in all 5 that state one ([fspx.md](fspx.md), "Kind 0: dispatch state"). Translated with the bit, the 4 programs the heuristic got wrong change size, and the other 22 translated modules are byte-identical. CPU-checked by `tests/semantic/test_fspx_wave_size.py`, including a `v_readlane_b32` whose result differs between the two sizes; `vk_pipeline_check` builds all 26 modules. Not GPU-checked on these programs' own data. Confirmed across all 26,503 corpus blobs with 0 contradictions against GFX10 SOP1/SOP2/SOPC/VOP3 encodings: 23,841 wave64 (1,154 CS, 195 GS, 9,282 MS, 10,974 PS, 2,236 VS) and 2,662 wave32 (1,535 CS, 1,127 PS); the code-marker heuristic alone misclassified 2,287 markerless wave64 shaders as wave32 (287 CS: 162 straight-line and 125 branchy, including 11 with `v_readlane_b32`, 35 `v_readfirstlane_b32`, 29 `ds_swizzle_b32`, 14 `s_barrier`; 943 PS: 906 straight-line and 37 branchy; 1,057 VS: 1,020 straight-line and 37 branchy); CPU-checked by `tests/test_fssm_header.py` and `tests/test_fssm_wave_size.py`. Until 2026-11-21 a mask-only wave64 program with no EXEC markers was translated as wave32, so `s_bcnt1_i32_b64` counted one half (#210). GPU-checked with `runtime/test/shaders/cs_w64_mask_detect.asm` (48 set bits of `(lane & 5) != 0`) on NVIDIA GeForce RTX 5060 under `LEONIDA_W64_EMULATE=1`. The hardware lane is exact in compute and mesh shaders (LocalInvocationIndex mod 64 or 32) and is used by `v_mbcnt` and EXEC writes. In other stages it's the subgroup lane. Constant EXEC writes (`s_mov_b32 exec_lo/exec_hi, K`) set each lane from its own bit of K, as `(K >> lane) & 1` (shift and mask: Intel's Windows driver evaluated `OpBitFieldUExtract` of a constant that fits in 16 bits with the lane taken mod 16, so `exec_lo = 0xffff` ran all 32 lanes; GPU-checked with `runtime/test/shaders/cs_exec_const.asm` on Intel UHD Graphics 770, driver 32.0.101.6129, and NVIDIA GeForce RTX 4080 SUPER); before, any non-zero constant turned every lane on. A register written to `exec_hi` sets lanes 32–63 only. VCC's halves follow the same rule while VCC holds a lane mask: a 32-bit write to `vcc_lo` sets lanes 0–31 of the mask and one to `vcc_hi` lanes 32–63 (until 2026-11-22 a `vcc_lo` write set all 64 lanes and a `vcc_hi` write never reached the mask that `s_cbranch_vccz`/`v_cndmask` read; CPU-checked by `tests/semantic/test_wave64_vcc_half_write.py`, not GPU-checked). Mask and `0`/`-1` half-writes to `vcc_lo`/`vcc_hi` keep VCC tracked as a lane mask across subsequent ops (`s_bcnt1_i32_b64`, further half-writes), whereas plain-data writes (`s_buffer_load_dword vcc_lo`, `s_load_dword`, scalar ALU, non-mask constants) end VCC's mask state and store the scalar word across all 64 lanes instead of updating only one mask half (confirmed on 1 wave64 PS in the 1.0.2.1 corpus and `tests/semantic/test_wave64_vcc_half_write.py`). GPU-checked with `runtime/test/shaders/cs_exec64.asm`: lanes 16–47 enabled from two constants, exact on a 32-wide-subgroup GPU. Still approximate on 32-wide subgroups: cross-lane ops between the two halves of a wave64 (readlane/permlane/DPP/shuffles across lane 31/32, wave-wide reductions). The metadata index marks every wave64 shader so a runtime can request `requiredSubgroupSize = 64` where supported (AMD), which makes those exact too. | 431| Wave64 handling | Wave size is detected per shader from the code (64-bit EXEC writes, `exec_hi`, `v_mbcnt_hi`, `*_saveexec_b64`/`*_wrexec_b64`, and 64-bit lane-mask SOP ops `s_bcnt[01]_i32_b64` / `s_ff[01]_i32_b64` / `s_wqm_b64` / `s_bfm_b64` even when the mask is an ordinary SGPR pair; mesh shaders are always wave64). In wave32 code (a header or FSPX dispatch state that says so) `s_bfm_b64` is 64-bit data instead: the translator writes `((1 << (S0 & 63)) - 1) << (S1 & 63)` to the pair, `tools/lane_masks.py` leaves it data, and it doesn't count against an FSPX program's wave32 state. The pipeline library's wave32 compute programs build an S# in place with it (`s_bfm_b64 s[88:89], 2, 54`, then `s_mov_b64` of words 2-3; 958 programs, [shader_library.md](shader_library.md)). Only constant operands are translated there; none other is seen. `tests/semantic/test_wave32_bfm64_data.py`. Wave size comes from the sidecar `fssm/<name>.fssm` header flags word `u32[0xD4]` bit 5 (`0x20` = wave32, `0` = wave64; `fssm_header.wave_size()`), cross-checked against wave64/wave32 code markers (`WAVE64_RE` / `WAVE32_RE`: a contradicting header and code listing raises `Unsupported`), and falls back to the code-marker heuristic (64-bit EXEC/VCC writes, `exec_hi`, `v_mbcnt_hi`, `*_saveexec_b64`/`*_wrexec_b64`, and 64-bit lane-mask SOP ops `s_bcnt[01]_i32_b64` / `s_ff[01]_i32_b64` / `s_wqm_b64` / `s_bfm_b64`, plus wave64 for mesh shaders) when no `FSSM`-magic sidecar is present (synthetic listings). **An FSPX program** (the FidelityFX DLL's, no FSSM blob) takes its wave size from its dispatch state instead: kind 0 word 4 bit 20, set = wave32 (`fspx/<name>.json` `wave32`). Only a strict marker (`WAVE64_RE` against wave32, `WAVE32_RE` against wave64) contradicts it and raises `Unsupported`; a `_b64` op on `vcc` or `exec` does not, since these programs move `vcc` as an ordinary SGPR pair. Without that field the heuristic stays. Confirmed on the 29 programs of 1.0.2.1: strict markers never contradict the bit, the `RSRC1` VGPR granule fits it in all 21 programs that decode cleanly, and `PSV0` lane counts agree with it in all 5 that state one ([fspx.md](fspx.md), "Kind 0: dispatch state"). Translated with the bit, the 4 programs the heuristic got wrong change size, and the other 22 translated modules are byte-identical. CPU-checked by `tests/semantic/test_fspx_wave_size.py`, including a `v_readlane_b32` whose result differs between the two sizes; `vk_pipeline_check` builds all 26 modules. Not GPU-checked on these programs' own data. Confirmed across all 26,503 corpus blobs with 0 contradictions against GFX10 SOP1/SOP2/SOPC/VOP3 encodings: 23,841 wave64 (1,154 CS, 195 GS, 9,282 MS, 10,974 PS, 2,236 VS) and 2,662 wave32 (1,535 CS, 1,127 PS); the code-marker heuristic alone misclassified 2,287 markerless wave64 shaders as wave32 (287 CS: 162 straight-line and 125 branchy, including 11 with `v_readlane_b32`, 35 `v_readfirstlane_b32`, 29 `ds_swizzle_b32`, 14 `s_barrier`; 943 PS: 906 straight-line and 37 branchy; 1,057 VS: 1,020 straight-line and 37 branchy); CPU-checked by `tests/test_fssm_header.py` and `tests/test_fssm_wave_size.py`. Until 2026-11-21 a mask-only wave64 program with no EXEC markers was translated as wave32, so `s_bcnt1_i32_b64` counted one half (#210). GPU-checked with `runtime/test/shaders/cs_w64_mask_detect.asm` (48 set bits of `(lane & 5) != 0`) on NVIDIA GeForce RTX 5060 under `LEONIDA_W64_EMULATE=1`. The hardware lane is exact in compute and mesh shaders (LocalInvocationIndex mod 64 or 32) and is used by `v_mbcnt` and EXEC writes. In other stages it's the subgroup lane. Constant EXEC writes (`s_mov_b32 exec_lo/exec_hi, K`) set each lane from its own bit of K, as `(K >> lane) & 1` (shift and mask: Intel's Windows driver evaluated `OpBitFieldUExtract` of a constant that fits in 16 bits with the lane taken mod 16, so `exec_lo = 0xffff` ran all 32 lanes; GPU-checked with `runtime/test/shaders/cs_exec_const.asm` on Intel UHD Graphics 770, driver 32.0.101.6129, and NVIDIA GeForce RTX 4080 SUPER); before, any non-zero constant turned every lane on. A register written to `exec_hi` sets lanes 32–63 only. VCC's halves follow the same rule while VCC holds a lane mask: a 32-bit write to `vcc_lo` sets lanes 0–31 of the mask and one to `vcc_hi` lanes 32–63 (until 2026-11-22 a `vcc_lo` write set all 64 lanes and a `vcc_hi` write never reached the mask that `s_cbranch_vccz`/`v_cndmask` read; CPU-checked by `tests/semantic/test_wave64_vcc_half_write.py`, not GPU-checked). Mask and `0`/`-1` half-writes to `vcc_lo`/`vcc_hi` keep VCC tracked as a lane mask across subsequent ops (`s_bcnt1_i32_b64`, further half-writes), whereas plain-data writes (`s_buffer_load_dword vcc_lo`, `s_load_dword`, scalar ALU, non-mask constants) end VCC's mask state and store the scalar word across all 64 lanes instead of updating only one mask half (confirmed on 1 wave64 PS in the 1.0.2.1 corpus and `tests/semantic/test_wave64_vcc_half_write.py`). GPU-checked with `runtime/test/shaders/cs_exec64.asm`: lanes 16–47 enabled from two constants, exact on a 32-wide-subgroup GPU. Still approximate on 32-wide subgroups: cross-lane ops between the two halves of a wave64 (readlane/permlane/DPP/shuffles across lane 31/32, wave-wide reductions). The metadata index marks every wave64 shader so a runtime can request `requiredSubgroupSize = 64` where supported (AMD), which makes those exact too. |
431| Lane select (`v_readlane_b32` / `v_writelane_b32`) | The lane is **S1[4:0] in wave32** and S1[5:0] in wave64, from an SGPR or a constant, and EXEC is ignored (RDNA 3 ISA guide pseudocode for both opcodes; RDNA 2 has the same encoding and gives no pseudocode). **Until #488 (SHADER-52) a wave32 shader masked with 63 as well**: a lane select of 32 or more wrote no lane, and a read shuffled from a lane past the end of a 32-wide subgroup, which SPIR-V leaves undefined (NVIDIA wraps it, so reads happened to come out right there). Found by the FUZZ-7 cross-lane fuzzer: 23 of 100 random wave32 programs, each minimized to `s_mov_b32 s28, K; v_writelane_b32 vD, x, s28` with K ≥ 32. GPU-checked with `runtime/test/shaders/cs_w32_lane_wrap.asm` (25 16 777 777) on NVIDIA GeForce RTX 5060 (#488) and RTX 4090 (subgroup 32, driver 621.14); `tests/test_translate.py` checks the masks in the SPIR-V, and `tests/semantic/test_wave32_lane_select.py` runs the shader across 32 lanes, where a mask of 63 is an out-of-range shuffle. | 432| Lane select (`v_readlane_b32` / `v_writelane_b32`) | The lane is **S1[4:0] in wave32** and S1[5:0] in wave64, from an SGPR or a constant, and EXEC is ignored (RDNA 3 ISA guide pseudocode for both opcodes; RDNA 2 has the same encoding and gives no pseudocode). **Until #488 (SHADER-52) a wave32 shader masked with 63 as well**: a lane select of 32 or more wrote no lane, and a read shuffled from a lane past the end of a 32-wide subgroup, which SPIR-V leaves undefined (NVIDIA wraps it, so reads happened to come out right there). Found by the FUZZ-7 cross-lane fuzzer: 23 of 100 random wave32 programs, each minimized to `s_mov_b32 s28, K; v_writelane_b32 vD, x, s28` with K ≥ 32. GPU-checked with `runtime/test/shaders/cs_w32_lane_wrap.asm` (25 16 777 777) on NVIDIA GeForce RTX 5060 (#488) and RTX 4090 (subgroup 32, driver 621.14); `tests/test_translate.py` checks the masks in the SPIR-V, and `tests/semantic/test_wave32_lane_select.py` runs the shader across 32 lanes, where a mask of 63 is an out-of-range shuffle. |
432| First active lane in a vertex shader (`v_readfirstlane_b32`, MoltenVK) | A native `v_readfirstlane_b32` is a ballot of the EXEC lanes, its lowest set bit, and a shuffle from that lane (lane 0 when no lane is on). **In a vertex shader the lowest bit is taken with `FindILsb` over the ballot's four words** (the lowest non-zero word wins), not with `OpGroupNonUniformBallotFindLSB`. The two give the same lane, because a ballot has no bit at or above the subgroup size. Other stages keep `BallotFindLSB`; the `--wave64-emulate` form already used `FindILsb` on its two mask words. Why: MoltenVK lowers `BallotFindLSB`, like the `SubgroupSize` built-in, to Metal's `threads_per_simdgroup` input, which a vertex function can't declare ("invalid 'threads_per_simdgroup' attribute for input declaration in a vertex function"), so every VS with a readfirstlane failed to compile there. **Confirmed on an Apple M4 (MoltenVK 1.4.2):** hand-written VS with `subgroupBallotFindLSB` or `gl_SubgroupSize` fail, and ballot, shuffle, broadcast-first, elect, votes, and ballot + `findLSB` + shuffle (32- and 64-lane forms) create. Corpus (1.0.2.1, translated from `4eb6155d`): 572 of the 2,236 VS contain `v_readfirstlane_b32`, and exactly those 572 modules change; all 2,236 stay `spirv-val`-valid. VS pipelines on the M4 go from 667 to 672 of 2,236 on main (the rest fail on the subgroup lane built-in, #1784), and from 1,662 to 2,233 with #1784's vertex-subgroup workaround (its flag is not on main) (the 571 `threads_per_simdgroup` failures are gone). `tests/semantic/test_vs_readfirstlane.py` runs it on the wave interpreter with the first EXEC lane in word 0 and word 1. | 433| First active lane in a vertex shader (`v_readfirstlane_b32`, MoltenVK) | A native `v_readfirstlane_b32` is a ballot of the EXEC lanes, its lowest set bit, and a shuffle from that lane (lane 0 when no lane is on). **In a vertex shader the lowest bit is taken with `FindILsb` over the ballot's four words** (the lowest non-zero word wins), not with `OpGroupNonUniformBallotFindLSB`. The two give the same lane, because a ballot has no bit at or above the subgroup size. Other stages keep `BallotFindLSB`; the `--wave64-emulate` form already used `FindILsb` on its two mask words. Why: MoltenVK lowers `BallotFindLSB`, like the `SubgroupSize` built-in, to Metal's `threads_per_simdgroup` input, which a vertex function can't declare ("invalid 'threads_per_simdgroup' attribute for input declaration in a vertex function"), so every VS with a readfirstlane failed to compile there. **Confirmed on an Apple M4 (MoltenVK 1.4.2):** hand-written VS with `subgroupBallotFindLSB` or `gl_SubgroupSize` fail, and ballot, shuffle, broadcast-first, elect, votes, and ballot + `findLSB` + shuffle (32- and 64-lane forms) create. Corpus (1.0.2.1, translated from `4eb6155d`): 572 of the 2,236 VS contain `v_readfirstlane_b32`, and exactly those 572 modules change; all 2,236 stay `spirv-val`-valid. VS pipelines on the M4 go from 667 to 672 of 2,236 on main (the rest fail on the subgroup lane built-in, #1784), and from 1,662 to 2,233 with #1784's vertex-subgroup workaround (its flag is not on main) (the 571 `threads_per_simdgroup` failures are gone). `tests/semantic/test_vs_readfirstlane.py` runs it on the wave interpreter with the first EXEC lane in word 0 and word 1. |
433| Wave64 emulation (`--wave64-emulate`) | Wave64 compute and mesh shaders exact on **any** subgroup size (32-wide NVIDIA, Intel, AMD in wave32 mode), with no subgroup operation at all. One invocation is still one lane. Everything a lane needs from the rest of its wave goes through a Workgroup buffer `%x_buf`: votes (`s_cbranch_vccz/vccnz/execz/execnz`, SCC of mask ops, `s_cmp` of masks), whole-mask words (`s_bcnt1`, `s_ff1`, `v_mbcnt`), `v_readlane`, `v_readfirstlane`, `ds_bpermute`, `ds_swizzle`, `v_permlane16/x16`. The program runs in rounds: in each round every wave that is neither done nor waiting at `s_barrier` runs one segment of its program (a basic block, cut at each cross-lane op), then the whole workgroup meets at one `OpControlBarrier` (Workgroup, AcquireRelease, workgroup + uniform + image memory) that sits in uniform control flow, because every invocation runs every round. A cross-lane op ends its segment after the lane has stored its value (per-lane data, double-buffered by round parity) or ORed its bit (two mask words per wave, three slots by round mod 3, each slot cleared two rounds after it was read); the code after it runs one round later, when all 64 lanes have written. SSA values live across a cut go through Function variables. `s_barrier` is a scheduler state: the wave stops running segments until every wave that isn't done is waiting, which is also how hardware counts finished waves. A memory access that conflicts with an earlier one in the same segment (read after write, write after read, write after write; LDS and buffer/image memory separately) starts a new round, so two halves of a wave in different subgroups access memory in instruction order, as the lanes of one hardware wave do. A scalar load (`s_load*`, `s_buffer_load*`) counts as a buffer read: until #1587 it was left out, so a store and a later scalar load of the same address shared a segment and the half in the other subgroup could load before this half had stored (`valu_fuzz.py --family mem --emulate`: lanes 32-63 read the fill pattern after an `s_buffer_load`/`s_load` of the slot lane 0 had written, on RDNA1 RADV and an RTX 5060; `v_readfirstlane_b32`, which gives that slot, already reads the whole wave). Pinned by `tests/semantic/test_w64x_scalar_load_order.py` (no segment of the emitted rounds accesses buffer memory after a write or writes after a read; three of its five cases fail without the rule). Confirmed by that CPU test and the ordering argument above; the race does not show on an RX 7900 XTX (AMD 26.10.1 LLPC, Windows 11): `valu_fuzz.py --family mem --seed 5 --programs 21 --wave 64 --emulate` matches 21/21 before and after the rule (3 runs each), so a GPU reproduction on RDNA1/RADV (where #1587 was found) is still pending. Not ordered: sampling an image the wave wrote. The missing lanes of a partial last wave read as 0. Without the flag the output is unchanged, apart from two fixes that apply to every wave64 compute/mesh shader: `v_writelane_b32` selects the lane by the wave lane (on a 32-wide subgroup writes to lanes 32–63 were lost; `cs_w64x_writelane`), and `ds_bpermute_b32` (see the LDS row). Fewer rounds, same results: a whole-mask read (`s_bcnt1`, `v_mbcnt_lo/hi`, ...) of the value of the same register (or EXEC) that an earlier read in the block already exchanged reuses that exchange (the value's identity is the SSA id last stored to the register, forgotten at block start and at any label); and a block that ends in a voted branch (`s_cbranch_vccz/vccnz/execz/execnz`) runs its successor in the round that reads the vote, since that segment only reads the vote and picks the next block (an inner loop in the scheduler, flag `%x_chain`). Both rules are pinned by `cs_w64x_mask_reuse` (a mask register and EXEC rewritten between reads), `cs_w64x_mask_reuse2` (EXEC read twice, a read after a buffer store, one half of a mask pair rewritten while the other is kept, a voted branch whose successor starts with a load of the other half's earlier store) and `cs_w64x_chain_barrier` (a voted branch whose successor starts with `s_barrier`, two waves): expected values from the ISA, first run on the AMD 880M with its native 64-wide subgroup, then emulated on both GPUs; `tests/test_translate.py` counts the exchanges in the SPIR-V (one per value, a new one after a rewrite of the register or EXEC), and the translator refuses (`Unsupported`) a voted branch whose segment was not started by the vote's own round. Under `--wave64-emulate`, `tools/wave64_emulate_opt.py` runs three exact CFG/dataflow passes to eliminate redundant scheduler rounds and global `OpSwitch` blow-up (#884): (1) backward `SCC` liveness skips `scc_from_mask` / `scc_any_half` votes on lane-mask ops (`s_*_saveexec_*`, `s_andn1/andn2_wrexec_*`, `s_and/or/xor/andn2/orn2/nand/nor/xnor/not_b64`, `s_wqm_*`) whenever `SCC` is dead-out (never read before an unconditional overwrite or `s_endpgm`), (2) safe lane-local `s_cbranch_execz`/`execnz` region folding inlines single-entry, single-exit post-dominated regions with no cross-lane ops, no `s_barrier`, no unmasked side effects, no `write_all_lanes` mask spills, no `EXEC`-widening, no live-out scalars, and for each memory domain (`mem`/`lds`) either read-only accesses or an acyclic single write/atomic behind `if (%active)` (issuing any uniform `x_memory_order` split/barrier before the branch — including scalar `s_load*`/`s_buffer_load*` per #1587 — and chaining single-predecessor continuations), and (3) structured emulation (`plan_structured_emulation`, `control_flow = "emulated wave64 structured"`) removes the global round-loop `OpSwitch` on multi-superblock reducible CFGs without non-uniform 32-bit half-mask SCC: single-wave workgroups (`<= 64` threads) run 100% inline structured SPIR-V with direct workgroup barriers (`0` `OpSwitch`, `0` `x_spill`, strictly monotone GEN/KILL 4-bit `dirty_in` memory ordering across blocks and loop back-edges), while multi-wave workgroups (`> 64` threads, without divergent `s_barrier`) emit post-dominating spine blocks and barrier-free guards/loops (including live-out scalars, single-write stores, `EXEC`-widening, and read-only loops) inline and isolate any remaining wave-divergent barrier regions into local mini-schedulers (or a tail scheduler at early `s_endpgm`). Checked on the CPU by `tests/semantic/test_wave64_emulate_opt.py` (40/64/128/256-thread workgroup interpreter with strict uniform barrier checks, ScreenProbes-shaped chains, nested/reused `saveexec` folds, single-store WAR/RAW ordering, single-wave `inline_all` loop-carried WAR, monotone `dirty_in` regression after `x_round`, multi-wave `structured_hybrid` + local `mini_scheduler`, divergent `s_barrier` fallback, `cs_w64x_saveexec_b64.s` fixture, and negative controls; **not yet GPU-verified** for the structured emulation pass). In addition, `wave64_emulate_opt.py` excludes lane-mask `s_flbit_i32_b32`/`s_flbit_i32` and mixed mask+data `s_cmp_eq_u64`/`s_cmp_lg_u64` from folded/sync-free blocks and `Gen.x_memory_order` skips `ds_nop` (matching `_x_memory_order_access`), pinned by `tests/semantic/test_wave64_emulate_barriers.py` (CPU workgroup interpreter only, not GPU-checked). (1) backward `SCC` liveness skips `scc_from_mask` / `scc_any_half` votes on lane-mask ops (`s_*_saveexec_*`, `s_andn1/andn2_wrexec_*`, `s_and/or/xor/andn2/orn2/nand/nor/xnor/not_b64`, `s_wqm_*`) whenever `SCC` is dead-out (never read before an unconditional overwrite or `s_endpgm`), and (2) safe lane-local `s_cbranch_execz`/`execnz` region folding inlines single-entry, single-exit post-dominated regions with no cross-lane ops, no `s_barrier`, no memory/LDS writes, no unmasked side effects, no `write_all_lanes` mask spills, no `EXEC`-widening, and no live-out scalars behind `if (%active)` (issuing any uniform `x_memory_order` split before the branch — including scalar `s_load*`/`s_buffer_load*` per #1587 — and chaining single-predecessor continuations), keeping all 64 lanes of each wave in the same scheduler round. Checked on the CPU by `tests/semantic/test_wave64_emulate_opt.py` (64-thread and 128-thread workgroup interpreter with uniform barrier checks, ScreenProbes-shaped chains, nested/reused `saveexec` folds, internal loop, `cs_w64x_saveexec_b64.s` fixture, RAW memory/scalar-load ordering, and negative controls for live-out scalars, stores, cross-lane ops, and EXEC-widening). `scripts/bench_wave64.py` times `cs_bench_mix` native and emulated and checks the emulated output bytes against the native AMD run. Cost: one workgroup barrier per segment, and `%x_buf` = (2·L + 6·W + 7) dwords for L invocations in W waves, counted in `lds_bytes`. GPU-checked on NVIDIA GeForce RTX 5070 Laptop (subgroup 32, driver 617.42) and AMD Radeon 880M (subgroup 64, AMD driver 26.11.2 LLPC): `check.py` 38/39 (the mesh test runs in the other script) and `scripts/run_gpu_tests.py` 40/40 on both with `LEONIDA_W64_EMULATE=1`, including every wave64 test (`cs_wavemask`, `cs_wave64_ballot`, `cs_wm_*`) and the cross-half suite `cs_w64x_*` / `ms_w64x_ballot`: readlane and writelane at lanes ≥ 32, readfirstlane with only upper lanes active, branches voted by one lane of either half, ballot + `v_mbcnt_lo/hi` compaction over 64 lanes (also in a mesh shader, 4096/4096 pixels), a 128-thread workgroup whose two waves take different branches, `s_barrier` between waves with different loop counts, LDS read-after-write and write-after-read across the halves without a barrier, a load, ballot and load in one block, and a partial wave (group 40). Without the flag the same RTX 5070 passes 19/37 (the wave64 tests skip there). Not covered: VS/PS/GS (no workgroup memory or barrier there). Known driver bug: AMD's Windows shader compiler for RDNA2 crashes (access violation in `vkCreateComputePipelines`) on many emulated compute shaders with LDS (#857: drivers 32.0.21030 to 32.0.21045.29003, iGPUs and RX 6000; 23.20.44, RDNA3, RDNA4, RADV and NVIDIA are fine), so `make_game.py --wave64-emulate auto` leaves emulation off when the runtime's GPU is such a device and runs wave64 natively (`rdna2_amd_windows` in `tools/vk_subgroup_info.py`, by PCI device ID and driver ID). | 434| Wave64 emulation (`--wave64-emulate`) | Wave64 compute and mesh shaders exact on **any** subgroup size (32-wide NVIDIA, Intel, AMD in wave32 mode), with no subgroup operation at all. One invocation is still one lane. Everything a lane needs from the rest of its wave goes through a Workgroup buffer `%x_buf`: votes (`s_cbranch_vccz/vccnz/execz/execnz`, SCC of mask ops, `s_cmp` of masks), whole-mask words (`s_bcnt1`, `s_ff1`, `v_mbcnt`), `v_readlane`, `v_readfirstlane`, `ds_bpermute`, `ds_swizzle`, `v_permlane16/x16`. The program runs in rounds: in each round every wave that is neither done nor waiting at `s_barrier` runs one segment of its program (a basic block, cut at each cross-lane op), then the whole workgroup meets at one `OpControlBarrier` (Workgroup, AcquireRelease, workgroup + uniform + image memory) that sits in uniform control flow, because every invocation runs every round. A cross-lane op ends its segment after the lane has stored its value (per-lane data, double-buffered by round parity) or ORed its bit (two mask words per wave, three slots by round mod 3, each slot cleared two rounds after it was read); the code after it runs one round later, when all 64 lanes have written. SSA values live across a cut go through Function variables. `s_barrier` is a scheduler state: the wave stops running segments until every wave that isn't done is waiting, which is also how hardware counts finished waves. A memory access that conflicts with an earlier one in the same segment (read after write, write after read, write after write; LDS and buffer/image memory separately) starts a new round, so two halves of a wave in different subgroups access memory in instruction order, as the lanes of one hardware wave do. A scalar load (`s_load*`, `s_buffer_load*`) counts as a buffer read: until #1587 it was left out, so a store and a later scalar load of the same address shared a segment and the half in the other subgroup could load before this half had stored (`valu_fuzz.py --family mem --emulate`: lanes 32-63 read the fill pattern after an `s_buffer_load`/`s_load` of the slot lane 0 had written, on RDNA1 RADV and an RTX 5060; `v_readfirstlane_b32`, which gives that slot, already reads the whole wave). Pinned by `tests/semantic/test_w64x_scalar_load_order.py` (no segment of the emitted rounds accesses buffer memory after a write or writes after a read; three of its five cases fail without the rule). Confirmed by that CPU test and the ordering argument above; the race does not show on an RX 7900 XTX (AMD 26.10.1 LLPC, Windows 11): `valu_fuzz.py --family mem --seed 5 --programs 21 --wave 64 --emulate` matches 21/21 before and after the rule (3 runs each), so a GPU reproduction on RDNA1/RADV (where #1587 was found) is still pending. Not ordered: sampling an image the wave wrote. The missing lanes of a partial last wave read as 0. Without the flag the output is unchanged, apart from two fixes that apply to every wave64 compute/mesh shader: `v_writelane_b32` selects the lane by the wave lane (on a 32-wide subgroup writes to lanes 32–63 were lost; `cs_w64x_writelane`), and `ds_bpermute_b32` (see the LDS row). Fewer rounds, same results: a whole-mask read (`s_bcnt1`, `v_mbcnt_lo/hi`, ...) of the value of the same register (or EXEC) that an earlier read in the block already exchanged reuses that exchange (the value's identity is the SSA id last stored to the register, forgotten at block start and at any label); and a block that ends in a voted branch (`s_cbranch_vccz/vccnz/execz/execnz`) runs its successor in the round that reads the vote, since that segment only reads the vote and picks the next block (an inner loop in the scheduler, flag `%x_chain`). Both rules are pinned by `cs_w64x_mask_reuse` (a mask register and EXEC rewritten between reads), `cs_w64x_mask_reuse2` (EXEC read twice, a read after a buffer store, one half of a mask pair rewritten while the other is kept, a voted branch whose successor starts with a load of the other half's earlier store) and `cs_w64x_chain_barrier` (a voted branch whose successor starts with `s_barrier`, two waves): expected values from the ISA, first run on the AMD 880M with its native 64-wide subgroup, then emulated on both GPUs; `tests/test_translate.py` counts the exchanges in the SPIR-V (one per value, a new one after a rewrite of the register or EXEC), and the translator refuses (`Unsupported`) a voted branch whose segment was not started by the vote's own round. Under `--wave64-emulate`, `tools/wave64_emulate_opt.py` runs three exact CFG/dataflow passes to eliminate redundant scheduler rounds and global `OpSwitch` blow-up (#884): (1) backward `SCC` liveness skips `scc_from_mask` / `scc_any_half` votes on lane-mask ops (`s_*_saveexec_*`, `s_andn1/andn2_wrexec_*`, `s_and/or/xor/andn2/orn2/nand/nor/xnor/not_b64`, `s_wqm_*`) whenever `SCC` is dead-out (never read before an unconditional overwrite or `s_endpgm`), (2) safe lane-local `s_cbranch_execz`/`execnz` region folding inlines single-entry, single-exit post-dominated regions with no cross-lane ops, no `s_barrier`, no unmasked side effects, no `write_all_lanes` mask spills, no `EXEC`-widening, no live-out scalars, and for each memory domain (`mem`/`lds`) either read-only accesses or an acyclic single write/atomic behind `if (%active)` (issuing any uniform `x_memory_order` split/barrier before the branch — including scalar `s_load*`/`s_buffer_load*` per #1587 — and chaining single-predecessor continuations), and (3) structured emulation (`plan_structured_emulation`, `control_flow = "emulated wave64 structured"`) removes the global round-loop `OpSwitch` on multi-superblock reducible CFGs without non-uniform 32-bit half-mask SCC: single-wave workgroups (`<= 64` threads) run 100% inline structured SPIR-V with direct workgroup barriers (`0` `OpSwitch`, `0` `x_spill`, strictly monotone GEN/KILL 4-bit `dirty_in` memory ordering across blocks and loop back-edges), while multi-wave workgroups (`> 64` threads) emit post-dominating spine blocks and barrier-free guards/loops (including live-out scalars, single-write stores, `EXEC`-widening, and read-only loops) inline and isolate any remaining wave-divergent barrier regions into local mini-schedulers (or a tail scheduler from the first early `s_endpgm`, or the first `s_barrier` under a guard or in a loop, to the end: waves on different paths may meet at different `s_barrier` sites, which only the rounds model; the NGG mesh epilogue, `s_cbranch_vccnz` over an `s_barrier`, is the common case). Checked on the CPU by `tests/semantic/test_wave64_emulate_opt.py` (40/64/128/256-thread workgroup interpreter with strict uniform barrier checks, ScreenProbes-shaped chains, nested/reused `saveexec` folds, single-store WAR/RAW ordering, single-wave `inline_all` loop-carried WAR, monotone `dirty_in` regression after `x_round`, multi-wave `structured_hybrid` + local `mini_scheduler`, divergent `s_barrier` in the tail rounds, guarded `s_barrier` epilogue, `cs_w64x_saveexec_b64.s` fixture, and negative controls; **not yet GPU-verified** for the structured emulation pass). In addition, `wave64_emulate_opt.py` excludes lane-mask `s_flbit_i32_b32`/`s_flbit_i32` and mixed mask+data `s_cmp_eq_u64`/`s_cmp_lg_u64` from folded/sync-free blocks and `Gen.x_memory_order` skips `ds_nop` (matching `_x_memory_order_access`), pinned by `tests/semantic/test_wave64_emulate_barriers.py` (CPU workgroup interpreter only, not GPU-checked). (1) backward `SCC` liveness skips `scc_from_mask` / `scc_any_half` votes on lane-mask ops (`s_*_saveexec_*`, `s_andn1/andn2_wrexec_*`, `s_and/or/xor/andn2/orn2/nand/nor/xnor/not_b64`, `s_wqm_*`) whenever `SCC` is dead-out (never read before an unconditional overwrite or `s_endpgm`), and (2) safe lane-local `s_cbranch_execz`/`execnz` region folding inlines single-entry, single-exit post-dominated regions with no cross-lane ops, no `s_barrier`, no memory/LDS writes, no unmasked side effects, no `write_all_lanes` mask spills, no `EXEC`-widening, and no live-out scalars behind `if (%active)` (issuing any uniform `x_memory_order` split before the branch — including scalar `s_load*`/`s_buffer_load*` per #1587 — and chaining single-predecessor continuations), keeping all 64 lanes of each wave in the same scheduler round. Checked on the CPU by `tests/semantic/test_wave64_emulate_opt.py` (64-thread and 128-thread workgroup interpreter with uniform barrier checks, ScreenProbes-shaped chains, nested/reused `saveexec` folds, internal loop, `cs_w64x_saveexec_b64.s` fixture, RAW memory/scalar-load ordering, and negative controls for live-out scalars, stores, cross-lane ops, and EXEC-widening). `scripts/bench_wave64.py` times `cs_bench_mix` native and emulated and checks the emulated output bytes against the native AMD run. Cost: one workgroup barrier per segment, and `%x_buf` = (2·L + 6·W + 7) dwords for L invocations in W waves, counted in `lds_bytes`. GPU-checked on NVIDIA GeForce RTX 5070 Laptop (subgroup 32, driver 617.42) and AMD Radeon 880M (subgroup 64, AMD driver 26.11.2 LLPC): `check.py` 38/39 (the mesh test runs in the other script) and `scripts/run_gpu_tests.py` 40/40 on both with `LEONIDA_W64_EMULATE=1`, including every wave64 test (`cs_wavemask`, `cs_wave64_ballot`, `cs_wm_*`) and the cross-half suite `cs_w64x_*` / `ms_w64x_ballot`: readlane and writelane at lanes ≥ 32, readfirstlane with only upper lanes active, branches voted by one lane of either half, ballot + `v_mbcnt_lo/hi` compaction over 64 lanes (also in a mesh shader, 4096/4096 pixels), a 128-thread workgroup whose two waves take different branches, `s_barrier` between waves with different loop counts, LDS read-after-write and write-after-read across the halves without a barrier, a load, ballot and load in one block, and a partial wave (group 40). Without the flag the same RTX 5070 passes 19/37 (the wave64 tests skip there). Not covered: VS/PS/GS (no workgroup memory or barrier there). Known driver bug: AMD's Windows shader compiler for RDNA2 crashes (access violation in `vkCreateComputePipelines`) on many emulated compute shaders with LDS (#857: drivers 32.0.21030 to 32.0.21045.29003, iGPUs and RX 6000; 23.20.44, RDNA3, RDNA4, RADV and NVIDIA are fine), so `make_game.py --wave64-emulate auto` leaves emulation off when the runtime's GPU is such a device and runs wave64 natively (`rdna2_amd_windows` in `tools/vk_subgroup_info.py`, by PCI device ID and driver ID). |
434| Workgroup memory limit (SHADER-309) | A compute shader's Workgroup variables, the LDS array plus `%x_buf` (the wave64 exchange, 2·L + 6·W + 7 dwords, or the 3 barrier-round counts, which move into the LDS array when they would push the total past 16,384 B: see "Barrier-round count in LDS (SHADER-579)"), must fit in the device's `maxComputeSharedMemorySize`. `spirv-val` does not check device limits, and RADV (Mesa 27.0.0-devel, RX 7600) dies with SIGFPE in `vkCreateComputePipelines` on a module 4 bytes over 64 KiB (#1721, hand-built repro by YaBulochka). The limit differs per device: 65536 on RADV and NVIDIA, 32768 on the AMD Windows driver (RX 9070 XT, 32.0.32029.2010) and Intel (UHD 770, 101.7092), measured by towade in #1745; the Vulkan minimum is 16384. The translator runs offline, so it has two parts. (1) `rdna2spirv.py` keeps every module under a hard cap, `MAX_SHARED_BYTES` (`--max-shared-memory`, default 65536): the LDS array is the program's need (RSRC2 LDS_SIZE, or the end of the furthest constant-offset access, counted exactly from the offset and the access width: a b32 at offset 65,532 ends at 16,384 dwords) rounded up to a power of two; when that plus `%x_buf` is over the cap but the need still fits, the array shrinks to the RSRC2 allocation and its accesses are bounds-checked (below); when the need itself does not fit (a 64 KiB LDS under `--wave64-emulate`) the shader is refused (`Unsupported`, with the byte counts). The array is clipped to 16,384 dwords, but an RSRC2 allocation over the cap (LDS_SIZE above 128 units, so 66,048 B or more) is counted at its full size and refused, native or emulated, instead of being cut. LDS bounds: RDNA2 LDS does not wrap, and an access outside the workgroup's allocation reads 0 and its write is dropped (RDNA2 ISA sections 3.6.1 and 3.6.6). The wrapped power-of-two array aliases such an access onto a valid word, so when a program's constant offsets reach past its RSRC2 allocation, or the array was shrunk, the array is the allocation and `Gen.lds_access` checks every dword (`index < allocation`, else a read or an atomic's old value is 0 and the write or atomic is skipped): `ds_read*`/`ds_write*` of every width (b64/b96/b128 and read2/write2 per dword), the sub-dword reads and writes, every LDS atomic, `ds_cmpst`, `ds_mskor`, `ds_wrxchg*`. `ds_swizzle`/`ds_bpermute`/`ds_permute` do not use `%lds`; `ds_append`/`ds_consume` were already refused. Every other shader keeps the wrapped array and emits no check, as before. **No game shader takes this path.** Counted over a 1.0.2.1 corpus by towade (#1882, counts only), and again at `main` `aa2988cc` by running `translate()` on every CS: with the exact need (offset + access width), none of the 485 LDS-using CS reaches past its RSRC2 allocation with a constant offset, and none is shrunk, natively or with `--wave64-emulate`. So none gets a bounds check (no `OpULessThan` added), and only the synthetic tests below exercise it. The earlier "16 of 486" came from the older offset + 4-dword estimate; at `aa2988cc` that bound flags 37 of the 485, all inside their allocation. Hypothesis, not yet counted over the corpus: the 16 of 486 LDS-using CS that index past LDS_SIZE with constant offsets (the Compute shaders row) now read 0 there, as the ISA says, where they used to read the wrapped word. Counted over a 1.0.2.1 corpus by towade (#1882, counts only): with the exact need (offset + access width) none of the 485 LDS-using CS reaches past its RSRC2 allocation with a constant offset, so none gets a bounds check (no `OpULessThan` added, native or emulated); the "16 of 486" in the Compute shaders row came from the older offset + 4-dword estimate. `%x_buf` is already sized to the workgroup's waves, so it has nothing to give back. `lds_bytes` in `index.json` is the module's whole Workgroup total (LDS, `%x_buf`, a mesh shader's `%ms_counts`). (2) The D3D12 shim's `create_compute` compares `lds_bytes` with the device's `maxComputeSharedMemorySize` and refuses the pipeline with a log line (`E_NOTIMPL`) instead of creating an invalid one. Pinned by `tests/semantic/test_cs_shared_memory_limit.py` (Workgroup bytes counted from the emitted SPIR-V: under the cap unchanged, shrunk to the 51,200 B allocation and bounds-checked, the exact-cap boundary, an access ending at 64 KiB counted exactly, a 64 KiB LDS refused when emulated and accepted natively, a native 66,048 B allocation refused, run through `spirv_mini_interp`: an out-of-range write dropped with the word it would wrap to intact, out-of-range reads (b32, u16) giving 0, a b64 write straddling the allocation's end, out-of-range atomics returning 0 and changing nothing, and an in-range shader with no check; `lds_bytes` equal to the SPIR-V total) and `shader_library_test` (`lds_bytes` read from the index). Confirmed by those CPU tests only; GPU runs (RADV; AMD Windows and Intel at 32 KiB) are pending. Not covered: mesh shaders against `maxMeshSharedMemorySize`. | 435| Workgroup memory limit (SHADER-309) | A compute shader's Workgroup variables, the LDS array plus `%x_buf` (the wave64 exchange, 2·L + 6·W + 7 dwords, or the 3 barrier-round counts, which move into the LDS array when they would push the total past 16,384 B: see "Barrier-round count in LDS (SHADER-579)"), must fit in the device's `maxComputeSharedMemorySize`. `spirv-val` does not check device limits, and RADV (Mesa 27.0.0-devel, RX 7600) dies with SIGFPE in `vkCreateComputePipelines` on a module 4 bytes over 64 KiB (#1721, hand-built repro by YaBulochka). The limit differs per device: 65536 on RADV and NVIDIA, 32768 on the AMD Windows driver (RX 9070 XT, 32.0.32029.2010) and Intel (UHD 770, 101.7092), measured by towade in #1745; the Vulkan minimum is 16384. The translator runs offline, so it has two parts. (1) `rdna2spirv.py` keeps every module under a hard cap, `MAX_SHARED_BYTES` (`--max-shared-memory`, default 65536): the LDS array is the program's need (RSRC2 LDS_SIZE, or the end of the furthest constant-offset access, counted exactly from the offset and the access width: a b32 at offset 65,532 ends at 16,384 dwords) rounded up to a power of two; when that plus `%x_buf` is over the cap but the need still fits, the array shrinks to the RSRC2 allocation and its accesses are bounds-checked (below); when the need itself does not fit (a 64 KiB LDS under `--wave64-emulate`) the shader is refused (`Unsupported`, with the byte counts). The array is clipped to 16,384 dwords, but an RSRC2 allocation over the cap (LDS_SIZE above 128 units, so 66,048 B or more) is counted at its full size and refused, native or emulated, instead of being cut. LDS bounds: RDNA2 LDS does not wrap, and an access outside the workgroup's allocation reads 0 and its write is dropped (RDNA2 ISA sections 3.6.1 and 3.6.6). The wrapped power-of-two array aliases such an access onto a valid word, so when a program's constant offsets reach past its RSRC2 allocation, or the array was shrunk, the array is the allocation and `Gen.lds_access` checks every dword (`index < allocation`, else a read or an atomic's old value is 0 and the write or atomic is skipped): `ds_read*`/`ds_write*` of every width (b64/b96/b128 and read2/write2 per dword), the sub-dword reads and writes, every LDS atomic, `ds_cmpst`, `ds_mskor`, `ds_wrxchg*`. `ds_swizzle`/`ds_bpermute`/`ds_permute` do not use `%lds`; `ds_append`/`ds_consume` were already refused. Every other shader keeps the wrapped array and emits no check, as before. **No game shader takes this path.** Counted over a 1.0.2.1 corpus by towade (#1882, counts only), and again at `main` `aa2988cc` by running `translate()` on every CS: with the exact need (offset + access width), none of the 485 LDS-using CS reaches past its RSRC2 allocation with a constant offset, and none is shrunk, natively or with `--wave64-emulate`. So none gets a bounds check (no `OpULessThan` added), and only the synthetic tests below exercise it. The earlier "16 of 486" came from the older offset + 4-dword estimate; at `aa2988cc` that bound flags 37 of the 485, all inside their allocation. Hypothesis, not yet counted over the corpus: the 16 of 486 LDS-using CS that index past LDS_SIZE with constant offsets (the Compute shaders row) now read 0 there, as the ISA says, where they used to read the wrapped word. Counted over a 1.0.2.1 corpus by towade (#1882, counts only): with the exact need (offset + access width) none of the 485 LDS-using CS reaches past its RSRC2 allocation with a constant offset, so none gets a bounds check (no `OpULessThan` added, native or emulated); the "16 of 486" in the Compute shaders row came from the older offset + 4-dword estimate. `%x_buf` is already sized to the workgroup's waves, so it has nothing to give back. `lds_bytes` in `index.json` is the module's whole Workgroup total (LDS, `%x_buf`, a mesh shader's `%ms_counts`). (2) The D3D12 shim's `create_compute` compares `lds_bytes` with the device's `maxComputeSharedMemorySize` and refuses the pipeline with a log line (`E_NOTIMPL`) instead of creating an invalid one. Pinned by `tests/semantic/test_cs_shared_memory_limit.py` (Workgroup bytes counted from the emitted SPIR-V: under the cap unchanged, shrunk to the 51,200 B allocation and bounds-checked, the exact-cap boundary, an access ending at 64 KiB counted exactly, a 64 KiB LDS refused when emulated and accepted natively, a native 66,048 B allocation refused, run through `spirv_mini_interp`: an out-of-range write dropped with the word it would wrap to intact, out-of-range reads (b32, u16) giving 0, a b64 write straddling the allocation's end, out-of-range atomics returning 0 and changing nothing, and an in-range shader with no check; `lds_bytes` equal to the SPIR-V total) and `shader_library_test` (`lds_bytes` read from the index). Confirmed by those CPU tests only; GPU runs (RADV; AMD Windows and Intel at 32 KiB) are pending. Not covered: mesh shaders against `maxMeshSharedMemorySize`. |
435| Wave64 leading-bit scans | With `--wave64-emulate`, `s_flbit_i32_b32` and `s_flbit_i32` of a lane mask use the same wave-wide exchange as `s_bcnt1` and `s_ff1`. These reads prevent lane-local EXEC-zero folding and require synchronized scheduling in wave-divergent blocks. Plain scalar inputs still allow the fold. Hand-written compute shaders in `tests/semantic/test_wave64_emulate_opt.py` check EXECZ at 64 and 128 threads and a branch on SCC taken by just one wave at 128 threads. The strict CPU workgroup interpreter observes the unsigned scan of VCC_LO = 8 returning 28 in the expected invocations. Both scan forms pass `spirv-val --target-env vulkan1.2`. | 436| Wave64 leading-bit scans | With `--wave64-emulate`, `s_flbit_i32_b32` and `s_flbit_i32` of a lane mask use the same wave-wide exchange as `s_bcnt1` and `s_ff1`. These reads prevent lane-local EXEC-zero folding and require synchronized scheduling in wave-divergent blocks. Plain scalar inputs still allow the fold. Hand-written compute shaders in `tests/semantic/test_wave64_emulate_opt.py` check EXECZ at 64 and 128 threads and a branch on SCC taken by just one wave at 128 threads. The strict CPU workgroup interpreter observes the unsigned scan of VCC_LO = 8 returning 28 in the expected invocations. Both scan forms pass `spirv-val --target-env vulkan1.2`. |
436| Wave64 emulation: scalar exits from a folded EXECZ region | A folded lane-local `s_cbranch_execz`/`execnz` region may leave to its join from inside, for example `s_cmp` + `s_cbranch_scc0/scc1` straight to the label that restores EXEC. The ISA then skips the rest of the region for the whole wave. `find_local_exec_folds` in `tools/wave64_emulate_opt.py` builds the region's sub-CFG with an exit node for every edge to the join, so `cfg_structure.structure` puts each later block of the region behind a `%pc` guard; the exit node itself emits nothing. Before this the edge was dropped and the block after the branch ran whenever the lane was active. Confirmed on the CPU against the native wave64 translation and the ISA: `tests/semantic/test_wave64_emulate_opt.py` `test_folded_region_scalar_branch_to_join_skips_the_rest` (taken and not-taken `scc0`/`scc1`, 64 and 128 threads, the region still folded) fails before the change on the four taken cases. **Not GPU-verified.** | 437| Wave64 emulation: scalar exits from a folded EXECZ region | A folded lane-local `s_cbranch_execz`/`execnz` region may leave to its join from inside, for example `s_cmp` + `s_cbranch_scc0/scc1` straight to the label that restores EXEC. The ISA then skips the rest of the region for the whole wave. `find_local_exec_folds` in `tools/wave64_emulate_opt.py` builds the region's sub-CFG with an exit node for every edge to the join, so `cfg_structure.structure` puts each later block of the region behind a `%pc` guard; the exit node itself emits nothing. Before this the edge was dropped and the block after the branch ran whenever the lane was active. Confirmed on the CPU against the native wave64 translation and the ISA: `tests/semantic/test_wave64_emulate_opt.py` `test_folded_region_scalar_branch_to_join_skips_the_rest` (taken and not-taken `scc0`/`scc1`, 64 and 128 threads, the region still folded) fails before the change on the four taken cases. **Not GPU-verified.** |
@@ -444,6 +445,7 @@ How the generated SPIR-V expects the runtime to work:
444| Scalar copies through VCC | SGPRs 106 and 107 can hold two data words, including a buffer descriptor's count and format. A 64-bit move through VCC preserves both when its reads within the block use them as data. Predicate users and live-out VCC constrain this inference. A wide scalar load into a tuple ending in VCC writes both physical words. The synthetic descriptor fixture checks numeric copies, a round trip, and a subsequent tuple load on wave32 and emulated wave64. | 445| Scalar copies through VCC | SGPRs 106 and 107 can hold two data words, including a buffer descriptor's count and format. A 64-bit move through VCC preserves both when its reads within the block use them as data. Predicate users and live-out VCC constrain this inference. A wide scalar load into a tuple ending in VCC writes both physical words. The synthetic descriptor fixture checks numeric copies, a round trip, and a subsequent tuple load on wave32 and emulated wave64. |
445| Signed-byte dot products | `v_dot4_i32_i8 D, S0, S1, S2` (VOP3P) is S2 plus the sum of the four products of the sign-extended bytes of S0 and S1, modulo 2^32; `v_dot4c_i32_i8 D, S0, S1` (VOP2) adds the same sum to D. Emitted as four pairs of `OpBitFieldSExtract`, `OpIMul` and `OpIAdd`. **Confirmed on RDNA2 hardware** (gfx1036, raw kernels through `tools/hw_oracle`): 10 operand sets, both instructions and both source orders of the accumulating one, with sign-mixed bytes and sums that wrap; the measured words are the table in `tests/semantic/test_alu_dot4_i8.py`. `clamp` and `op_sel`/`op_sel_hi` are translated and checked against the same `gfx1036` hardware table: `clamp` saturates `v_dot4_i32_i8` to signed 32-bit `[-2^31, 2^31-1]` (both overflowing sets), and `op_sel`/`op_sel_hi` pick the 16-bit half of S0/S1 for byte pairs 0..1 and 2..3 (e.g. `op_sel` 2 / `op_sel_hi` 5 exchanges the 16-bit halves of S1, matching all 5 measured sets — the form of the 89 words `llvm-mc` does not decode, [fspx.md](fspx.md)); non-default S2 half selection stays refused. How each `op_sel`/`op_sel_hi` form that can reach the translator is confirmed: (1) `op_sel` 2 / `op_sel_hi` 5 without `clamp` or `neg`, which `llvm-mc` rejects: measured on `gfx1036` (the 5 sets above); `shader_disasm.py` prints it with its real encoding (`tests/semantic/test_fspx_dot4_op_sel_disasm.py`) and `skipped_form` recovers it from a gap in a listing made without that pass. (2) `op_sel` 0 / `op_sel_hi` 5 with an inline integer S1 and no `clamp` or `neg`, which `llvm-mc` decodes but prints with the default `op_sel_hi` 7: `restore_dot4_inline_sel` takes the stored field back, in a clean listing (`check_printed_encodings`) and in both re-anchoring paths; `op_sel_hi[1]` clear makes byte pairs 2..3 read S1's low half, the selection measured in (1), but the word itself was not run on hardware; confirmed by a count over the corpus (29 FidelityFX DLL programs, 1.0.2.1, LLVM 21.1.8: 22 translate without it, 24 with it, all 24 pass `spirv-val`; Code-embedded data row) and pinned by `tests/semantic/test_reanchor_dot4_inline_sel.py`. (3) Every other form `llvm-mc` decodes but prints with the default fields (for example `op_sel_hi` 5 with a VGPR S1, or `op_sel` 1 / `op_sel_hi` 6) is not measured and is refused as a dropped field; `tests/semantic/test_dot4_printed_op_sel.py` checks forms (2) and (3) with hand-built words. A general rule that took the stored fields of any such word (from luizwidmer/palmetto) was not taken for that reason. `neg_lo`/`neg_hi`, which `llvm-mc` accepts on `v_dot4_i32_i8` only, are not ignored (`neg_lo` flips bit 15 and `neg_hi` bit 31 of S0 or S1, and on S2 `neg_hi` clears bit 31 before `neg_lo` flips it; 5 sets under 8 forms, 45 words): any set bit stays Unsupported, while an all-zero field is the plain instruction. Counts: the 29 FSPX programs use the pair 27,271 times (`v_dot4c_i32_i8` 25,813, `v_dot4_i32_i8` 1,458), all in 13 programs; none of the game's own 26,503 shaders has either encoding (0 of the 12,791 words `llvm-mc` cannot decode there with gfx1013). The measured unclamped `op_sel` 2 / `op_sel_hi` 5 form is also recovered from the bytes on a gap in a listing that `shader_disasm.py` did not print it into (`skipped_form`, #984). | 446| Signed-byte dot products | `v_dot4_i32_i8 D, S0, S1, S2` (VOP3P) is S2 plus the sum of the four products of the sign-extended bytes of S0 and S1, modulo 2^32; `v_dot4c_i32_i8 D, S0, S1` (VOP2) adds the same sum to D. Emitted as four pairs of `OpBitFieldSExtract`, `OpIMul` and `OpIAdd`. **Confirmed on RDNA2 hardware** (gfx1036, raw kernels through `tools/hw_oracle`): 10 operand sets, both instructions and both source orders of the accumulating one, with sign-mixed bytes and sums that wrap; the measured words are the table in `tests/semantic/test_alu_dot4_i8.py`. `clamp` and `op_sel`/`op_sel_hi` are translated and checked against the same `gfx1036` hardware table: `clamp` saturates `v_dot4_i32_i8` to signed 32-bit `[-2^31, 2^31-1]` (both overflowing sets), and `op_sel`/`op_sel_hi` pick the 16-bit half of S0/S1 for byte pairs 0..1 and 2..3 (e.g. `op_sel` 2 / `op_sel_hi` 5 exchanges the 16-bit halves of S1, matching all 5 measured sets — the form of the 89 words `llvm-mc` does not decode, [fspx.md](fspx.md)); non-default S2 half selection stays refused. How each `op_sel`/`op_sel_hi` form that can reach the translator is confirmed: (1) `op_sel` 2 / `op_sel_hi` 5 without `clamp` or `neg`, which `llvm-mc` rejects: measured on `gfx1036` (the 5 sets above); `shader_disasm.py` prints it with its real encoding (`tests/semantic/test_fspx_dot4_op_sel_disasm.py`) and `skipped_form` recovers it from a gap in a listing made without that pass. (2) `op_sel` 0 / `op_sel_hi` 5 with an inline integer S1 and no `clamp` or `neg`, which `llvm-mc` decodes but prints with the default `op_sel_hi` 7: `restore_dot4_inline_sel` takes the stored field back, in a clean listing (`check_printed_encodings`) and in both re-anchoring paths; `op_sel_hi[1]` clear makes byte pairs 2..3 read S1's low half, the selection measured in (1), but the word itself was not run on hardware; confirmed by a count over the corpus (29 FidelityFX DLL programs, 1.0.2.1, LLVM 21.1.8: 22 translate without it, 24 with it, all 24 pass `spirv-val`; Code-embedded data row) and pinned by `tests/semantic/test_reanchor_dot4_inline_sel.py`. (3) Every other form `llvm-mc` decodes but prints with the default fields (for example `op_sel_hi` 5 with a VGPR S1, or `op_sel` 1 / `op_sel_hi` 6) is not measured and is refused as a dropped field; `tests/semantic/test_dot4_printed_op_sel.py` checks forms (2) and (3) with hand-built words. A general rule that took the stored fields of any such word (from luizwidmer/palmetto) was not taken for that reason. `neg_lo`/`neg_hi`, which `llvm-mc` accepts on `v_dot4_i32_i8` only, are not ignored (`neg_lo` flips bit 15 and `neg_hi` bit 31 of S0 or S1, and on S2 `neg_hi` clears bit 31 before `neg_lo` flips it; 5 sets under 8 forms, 45 words): any set bit stays Unsupported, while an all-zero field is the plain instruction. Counts: the 29 FSPX programs use the pair 27,271 times (`v_dot4c_i32_i8` 25,813, `v_dot4_i32_i8` 1,458), all in 13 programs; none of the game's own 26,503 shaders has either encoding (0 of the 12,791 words `llvm-mc` cannot decode there with gfx1013). The measured unclamped `op_sel` 2 / `op_sel_hi` 5 form is also recovered from the bytes on a gap in a listing that `shader_disasm.py` did not print it into (`skipped_form`, #984). |
446| Workgroup barriers | `s_barrier` (cs/ms) is one `OpControlBarrier` (workgroup scope, workgroup memory). On RDNA every `s_barrier` counts against the same workgroup barrier and a wave that has ended no longer counts, while Vulkan requires a barrier to be reached by every invocation in uniform control flow. Under `--wave64-emulate` the round loop keeps a single barrier at the top level, so this holds. **Native wave32 compute shaders run in barrier rounds** when an `s_barrier` sits anywhere but a top-level block of the structured tree (one every invocation runs): under a guard, in a loop, or in the dispatch loop (`needs_barrier_rounds`, `bar_scheduler`). That is the emulated loop without its cross-lane part: `s_barrier` ends a segment, each invocation runs its blocks until its next `s_barrier` or the end, then the whole workgroup meets at one `OpControlBarrier` (the same workgroup/acquire-release/workgroup-memory semantics) at the end of the round. A wave that is done no longer holds the others, and a per-round count of the invocations not done (three `Workgroup` words, by round mod 3) ends the loop. A wave that is done no longer holds the others, and a per-round count of the invocations not done (three `Workgroup` words, by round mod 3, or a borrowed LDS word with a large LDS: "Barrier-round count in LDS (SHADER-579)") ends the loop. Cross-lane operations stay subgroup operations, as in the dispatch loop, since a wave's lanes run the same segment. A barrier in a top-level block keeps the single `OpControlBarrier` in place. In the 1.0.2.1 corpus 43 of the 55 wave32 cs shaders with `s_barrier` have one nested (SHADER-91's count), so those 43 now run in rounds. Why: an Intel GPU does not survive the nested form. `cs_barrier_divergent.asm` (two barrier sites in different branches), `cs_barrier_early_end.asm` (the other waves end without a barrier) and `cs_barrier_loop.asm` (a barrier in a loop whose trip count differs per wave) each lose the device (`vkQueueWaitIdle` → `VK_ERROR_DEVICE_LOST`) on an Intel Arrow Lake Xe-LPG iGPU (Windows 32.0.101.8132), and `cs_barrier_divergent` hangs or writes nothing on a UHD 770 (101.6129, #634). With barrier rounds all three pass there and on an RTX 5070 Ti Laptop (617.42). NVIDIA passed them before too (RTX 4070 Ti on 610.88 and 621.24, RTX 5090 on Linux 595.99, RTX 5070 Ti). **Still not proven on the native wave64 path** (wave64 cs and every ms, run natively only on AMD's 64-wide subgroups): there the barrier stays where `s_barrier` is, inside a selection or loop construct in every ms and most wave64 cs shaders of the corpus. Branches are scalar, so whole waves take the same path, and RDNA's own barrier counts the way the shader expects. | 447| Workgroup barriers | `s_barrier` (cs/ms) is one `OpControlBarrier` (workgroup scope, workgroup memory). On RDNA every `s_barrier` counts against the same workgroup barrier and a wave that has ended no longer counts, while Vulkan requires a barrier to be reached by every invocation in uniform control flow. Under `--wave64-emulate` the round loop keeps a single barrier at the top level, so this holds. **Native wave32 compute shaders run in barrier rounds** when an `s_barrier` sits anywhere but a top-level block of the structured tree (one every invocation runs): under a guard, in a loop, or in the dispatch loop (`needs_barrier_rounds`, `bar_scheduler`). That is the emulated loop without its cross-lane part: `s_barrier` ends a segment, each invocation runs its blocks until its next `s_barrier` or the end, then the whole workgroup meets at one `OpControlBarrier` (the same workgroup/acquire-release/workgroup-memory semantics) at the end of the round. A wave that is done no longer holds the others, and a per-round count of the invocations not done (three `Workgroup` words, by round mod 3) ends the loop. A wave that is done no longer holds the others, and a per-round count of the invocations not done (three `Workgroup` words, by round mod 3, or a borrowed LDS word with a large LDS: "Barrier-round count in LDS (SHADER-579)") ends the loop. Cross-lane operations stay subgroup operations, as in the dispatch loop, since a wave's lanes run the same segment. A barrier in a top-level block keeps the single `OpControlBarrier` in place. In the 1.0.2.1 corpus 43 of the 55 wave32 cs shaders with `s_barrier` have one nested (SHADER-91's count), so those 43 now run in rounds. Why: an Intel GPU does not survive the nested form. `cs_barrier_divergent.asm` (two barrier sites in different branches), `cs_barrier_early_end.asm` (the other waves end without a barrier) and `cs_barrier_loop.asm` (a barrier in a loop whose trip count differs per wave) each lose the device (`vkQueueWaitIdle` → `VK_ERROR_DEVICE_LOST`) on an Intel Arrow Lake Xe-LPG iGPU (Windows 32.0.101.8132), and `cs_barrier_divergent` hangs or writes nothing on a UHD 770 (101.6129, #634). With barrier rounds all three pass there and on an RTX 5070 Ti Laptop (617.42). NVIDIA passed them before too (RTX 4070 Ti on 610.88 and 621.24, RTX 5090 on Linux 595.99, RTX 5070 Ti). **Still not proven on the native wave64 path** (wave64 cs and every ms, run natively only on AMD's 64-wide subgroups): there the barrier stays where `s_barrier` is, inside a selection or loop construct in every ms and most wave64 cs shaders of the corpus. Branches are scalar, so whole waves take the same path, and RDNA's own barrier counts the way the shader expects. |
448| Wave64 emulation: single-wave barrier fallback | `translate()` re-translates an emulated compute program as the round loop (`Gen.x_scheduler`) when its inline structured form has an `OpControlBarrier` inside a selection or loop construct (`barriers_under_control_flow`), because a barrier only part of the workgroup reaches hangs NVIDIA (Xid 109). That fallback applies **only to multi-wave plans**. A single-wave workgroup (`plan_structured_emulation` mode `inline_all`, `x_lanes == 64`, also a partial group of fewer than 64 threads) is one wave: `%pc` between blocks comes from scalar state and votes read back from `%x_buf`, so every invocation takes the same path, and lane-local `%pc` exists only inside `emit_folded_region`'s `if (%active)` bodies, which emit no exchange and no barrier. Its barriers stay where the exchanges are, at the top level or under `%pc`-only guards. Why: the round loop keeps nearly the whole register file live across its back edge and through a switch over every segment (thousands of cases in large programs); on RADV/ACO (RX 7900 XTX, Mesa 26.3.1, offline `vk_pipeline_check` compiles only) that drove `aco::spill` past a 12 GiB cap (53 GB uncapped) on a large single-wave program the structured form compiles in 7–8.5 min under 3 GiB, and past 12 GiB in 35 s on a 4.9 MB one that compiles in 5 s at 0.3 GiB structured. ACO's static latency for single-wave programs with loops was 17 to 280 times that of the structured form, with VGPR spills each round, and three such programs (loops of up to thousands of iterations, one round per block visited) hung game runs on that GPU. Confirmed by a count over the 1.0.2.1 corpus: of the 820 single-wave emulated compute shaders of the main set that the fallback had put in the round loop, 666 get an `inline_all` plan, and in all 666 every barrier is at the top level or under constructs whose conditions load only `%pc` (none reads `%active`, a VGPR or `local_id`); the other 154 have no plan and stay rounds either way. Re-translated with this rule, exactly those 666 come out structured, the pipeline library's single-wave rounds drop from 818 to 171 (all 297 of them with loops are structured), and the translated and `spirv-val`-valid counts are unchanged (26,503 main, 2,683 library); recompiled, the 4.9 MB program takes 3.6 s at 0.37 GiB. CPU-checked by `tests/semantic/test_wave64_single_wave_barrier.py` (`wave64_single_wave_barrier.asm`: a cross-half `v_readlane_b32` in a uniform loop and a uniform branch, structured and round forms give the same words, every barrier guard loads only `%pc`), `test_wave64_emulate_opt.py` (`cs_inline_64`/`cs_inline_40`, both wave orders) and `test_loop_ballot_barrier.py`. **Not GPU-verified on NVIDIA**, the platform the fallback was written for. |
447| Barrier-round count in LDS (SHADER-579) | Barrier rounds (see "Workgroup barriers") count the invocations not done in `%x_buf`, three `Workgroup` dwords (#930). On a full 32 KiB LDS that made 32,780 B, 12 bytes over the 32,768 B `maxComputeSharedMemorySize` of the AMD Windows (RX 9070 XT) and Intel (UHD 770) drivers, so the runtime refused those pipelines (2 native wave32 cs in towade's 1.0.2.1 corpus, [finding](https://github.com/ItsNotRexed/Leonida/pull/1882#issuecomment-7084298032)). Rule (`bar_counts_in_lds`): when the shader uses its LDS and the LDS array plus 12 bytes is over 16,384 B (the Vulkan minimum limit, so in practice an array of 16, 32 or 64 KiB), there is no `%x_buf`. The count borrows LDS word 0 at the end of each round (`bar_scheduler_tail`): after the round's barrier every invocation is done or waits at `s_barrier`, so no shader code runs; invocation 0 saves the word in a Function variable and clears it, barrier, every invocation not done adds 1 atomically, barrier, all read the count, barrier, invocation 0 stores the saved word back, barrier. The shader sees its LDS bit for bit as before, and the four extra barriers sit where the whole workgroup already waits, so `s_barrier`'s semantics are unchanged; the cost is four more `OpControlBarrier`s per round in those shaders only. Below the threshold `%x_buf` stays (12 bytes fit every device) with one barrier per round; a shader that never touches its LDS also keeps it (no array to borrow from, 12 B in all). A 32 KiB LDS is now exactly 32,768 B and a 64 KiB one 65,536 B (before: 65,548 B, refused or shrunk to its allocation). Not chosen: putting the count in LDS the shader never touches (unprovable with dynamic addresses), or deciding per device (the translator runs offline). Pinned by `tests/semantic/test_cs_barrier_counts_lds.py` (Workgroup bytes from the emitted SPIR-V and `lds_bytes` for 32 KiB, 64 KiB and small LDS, under a 32 KiB `--max-shared-memory`; ring shifts across 10 barriers that read word 0 and an early-ending wave in the workgroup interpreter, whose LDS starts as 0xDEADBEEF, in both wave orders). Confirmed by those CPU tests only; GPU runs on the 32 KiB devices are pending. | 449| Barrier-round count in LDS (SHADER-579) | Barrier rounds (see "Workgroup barriers") count the invocations not done in `%x_buf`, three `Workgroup` dwords (#930). On a full 32 KiB LDS that made 32,780 B, 12 bytes over the 32,768 B `maxComputeSharedMemorySize` of the AMD Windows (RX 9070 XT) and Intel (UHD 770) drivers, so the runtime refused those pipelines (2 native wave32 cs in towade's 1.0.2.1 corpus, [finding](https://github.com/ItsNotRexed/Leonida/pull/1882#issuecomment-7084298032)). Rule (`bar_counts_in_lds`): when the shader uses its LDS and the LDS array plus 12 bytes is over 16,384 B (the Vulkan minimum limit, so in practice an array of 16, 32 or 64 KiB), there is no `%x_buf`. The count borrows LDS word 0 at the end of each round (`bar_scheduler_tail`): after the round's barrier every invocation is done or waits at `s_barrier`, so no shader code runs; invocation 0 saves the word in a Function variable and clears it, barrier, every invocation not done adds 1 atomically, barrier, all read the count, barrier, invocation 0 stores the saved word back, barrier. The shader sees its LDS bit for bit as before, and the four extra barriers sit where the whole workgroup already waits, so `s_barrier`'s semantics are unchanged; the cost is four more `OpControlBarrier`s per round in those shaders only. Below the threshold `%x_buf` stays (12 bytes fit every device) with one barrier per round; a shader that never touches its LDS also keeps it (no array to borrow from, 12 B in all). A 32 KiB LDS is now exactly 32,768 B and a 64 KiB one 65,536 B (before: 65,548 B, refused or shrunk to its allocation). Not chosen: putting the count in LDS the shader never touches (unprovable with dynamic addresses), or deciding per device (the translator runs offline). Pinned by `tests/semantic/test_cs_barrier_counts_lds.py` (Workgroup bytes from the emitted SPIR-V and `lds_bytes` for 32 KiB, 64 KiB and small LDS, under a 32 KiB `--max-shared-memory`; ring shifts across 10 barriers that read word 0 and an early-ending wave in the workgroup interpreter, whose LDS starts as 0xDEADBEEF, in both wave orders). Confirmed by those CPU tests only; GPU runs on the 32 KiB devices are pending. |
448| LDS | A `Workgroup` uint array sized from LDS_SIZE, rounded up to a power of two that also covers every constant offset (15 of 486 shaders index past LDS_SIZE). Covers `ds_read/write_b32..b128`, `read2/write2` (+`st64`), `u16`/`i16`/`u8`/`i8` reads (also `ds_read_u16_d16`/`_d16_hi` and, since SHADER-85, `ds_read_u8_d16`/`_d16_hi` and `ds_read_i8_d16`/`_d16_hi`: the byte is zero- or sign-extended 8→16 into one half of the destination VGPR and the other half is kept, per the RDNA2 ISA DS opcode descriptions (opcodes 162–165) and as for the u16 d16 reads; GPU-checked with `cs_w32_lds_u8_d16.asm`, byte values 0x80/0xFF/0x7F with a non-zero `offset:`), `b16`/`b8` writes (atomic and/or, so neighbouring lanes don't race; a 16-bit read or write at byte 3 of a dword also reads or writes byte 0 of the next dword, as llc-15 `-mcpu=gfx1030 -mattr=+unaligned-access-mode` emits one `ds_read_u16`/`ds_write_b16 ... offset:3` for an align-1 halfword; until 2026-11-22 the reads extracted 16 bits at bit 24, undefined in SPIR-V, and the writes kept only byte 3; `tests/semantic/test_lds_u16_cross_dword.py`), the add/sub/min/max/and/or/xor atomics with and without return, `wrxchg`, `cmpst` (`OpAtomicCompareExchange` with DATA as comparator and DATA2 as value), and `ds_bpermute_b32` as a subgroup shuffle. GPU-checked with `cs_w32_lds_u8_d16.asm`, byte values 0x80/0xFF/0x7F with a non-zero `offset:`), `b16`/`b8` writes (atomic and/or, so neighbouring lanes don't race), the add/sub/min/max/and/or/xor atomics with and without return, `wrxchg`, `cmpst` (`OpAtomicCompareExchange` with DATA as comparator and DATA2 as value), and `ds_bpermute_b32` as a subgroup shuffle. `ds_permute_b32`, its forward (scatter) form, has no Vulkan equivalent: each source lane that is on in EXEC publishes `((vAddr + offset) >> 2) mod 32` and each destination lane scans the 32 sources of its half and keeps the last one that targets it (a shuffle of target and data per source lane; under `--wave64-emulate` two buffer rounds and a Function variable instead). Per the ISA pseudocode (`tmp[0..63] = 0`; `next if !EXEC[i]` on the source; `VGPR[VDST][i] = tmp[i]` only `if EXEC[i]`): a destination lane nobody targets gets 0, an off source sends nothing, an off destination keeps its VDST, and the half rule above applies as for `ds_bpermute_b32`. When several sources target one lane the ISA leaves the winner unpredictable ("the value from one of the writers"; its pseudocode says the highest-numbered); the translator takes the highest, and nothing may depend on it. Confirmed by the GPU tests `cs_w32_permute.asm` and, per half of a wave64, `cs_w64x_permute.asm` (SHADER-90: rotation, offset, unwritten lane = 0, off destination keeps its value, off source does not win), `cs_w32_partial_permute.asm` (a 20-thread wave32: a launched lane whose source lane was never launched gets 0, and a send to a missing lane is lost; the same words from a raw 20-thread `hw_oracle` kernel on `gfx1036`) and `tests/semantic/test_ds_permute.py`. **Hardware-verified on RDNA2 (`gfx1036`, AMD Ryzen 7 9800X3D iGPU, Linux AMDGPU DRM via `tools/hw_oracle`, wave32 and wave64, SHADER-133)** with `tools/ds_permute_probe.py` (9/9 cases exact in both wave sizes): unaddressed active lanes get 0, off destinations keep VDST, off sources send nothing, 2-/4-/32-way collisions deterministically take the highest-numbered active lane in the 32-lane half (matching the translator), `vAddr + offset` carries from the low 2 bits before `>> 2` mod 32, wave64 runs as two independent 32-lane halves (`+32` wraps within each half), and missing lanes of a partial wave (20 threads in wave32, 40 in wave64) send nothing. A source lane that is off in EXEC reads 0 and an off destination lane keeps its value (RDNA ISA §10.4.4), in wave32 as in wave64. In wave64 the permute also runs as two wave32s: each half reads lanes of its own half. Until 2026-11-21 lanes 32–63 of a 64-wide subgroup read the low half and inactive sources kept their value (`cs_w64x_bpermute`, AMD Radeon 880M); the wave32 path shuffled the raw value until the same day (`cs_bpermute32`: wave32, EXEC without lanes 8–15, so lane 6 reads 0; GPU-checked on RTX 5070 and Radeon 880M). A source lane that doesn't exist, in the missing lanes of a partial wave, also reads 0: the shuffle result is kept only where a ballot of the running invocations has the source lane, since SPIR-V leaves a shuffle from an invocation that isn't running undefined. Before this, RADV returned stale register values that changed between runs (`cs_w64x_partial`, a 40-thread group, native wave64 on AMD RX 6700 XT, RADV Mesa 26.3.1). Writes and atomics run only in active lanes. Indices wrap at the array size, where hardware would return 0 for out-of-range reads. `s_barrier` = `OpControlBarrier` Workgroup/Workgroup, AcquireRelease + WorkgroupMemory. | 450| LDS | A `Workgroup` uint array sized from LDS_SIZE, rounded up to a power of two that also covers every constant offset (15 of 486 shaders index past LDS_SIZE). Covers `ds_read/write_b32..b128`, `read2/write2` (+`st64`), `u16`/`i16`/`u8`/`i8` reads (also `ds_read_u16_d16`/`_d16_hi` and, since SHADER-85, `ds_read_u8_d16`/`_d16_hi` and `ds_read_i8_d16`/`_d16_hi`: the byte is zero- or sign-extended 8→16 into one half of the destination VGPR and the other half is kept, per the RDNA2 ISA DS opcode descriptions (opcodes 162–165) and as for the u16 d16 reads; GPU-checked with `cs_w32_lds_u8_d16.asm`, byte values 0x80/0xFF/0x7F with a non-zero `offset:`), `b16`/`b8` writes (atomic and/or, so neighbouring lanes don't race; a 16-bit read or write at byte 3 of a dword also reads or writes byte 0 of the next dword, as llc-15 `-mcpu=gfx1030 -mattr=+unaligned-access-mode` emits one `ds_read_u16`/`ds_write_b16 ... offset:3` for an align-1 halfword; until 2026-11-22 the reads extracted 16 bits at bit 24, undefined in SPIR-V, and the writes kept only byte 3; `tests/semantic/test_lds_u16_cross_dword.py`), the add/sub/min/max/and/or/xor atomics with and without return, `wrxchg`, `cmpst` (`OpAtomicCompareExchange` with DATA as comparator and DATA2 as value), and `ds_bpermute_b32` as a subgroup shuffle. GPU-checked with `cs_w32_lds_u8_d16.asm`, byte values 0x80/0xFF/0x7F with a non-zero `offset:`), `b16`/`b8` writes (atomic and/or, so neighbouring lanes don't race), the add/sub/min/max/and/or/xor atomics with and without return, `wrxchg`, `cmpst` (`OpAtomicCompareExchange` with DATA as comparator and DATA2 as value), and `ds_bpermute_b32` as a subgroup shuffle. `ds_permute_b32`, its forward (scatter) form, has no Vulkan equivalent: each source lane that is on in EXEC publishes `((vAddr + offset) >> 2) mod 32` and each destination lane scans the 32 sources of its half and keeps the last one that targets it (a shuffle of target and data per source lane; under `--wave64-emulate` two buffer rounds and a Function variable instead). Per the ISA pseudocode (`tmp[0..63] = 0`; `next if !EXEC[i]` on the source; `VGPR[VDST][i] = tmp[i]` only `if EXEC[i]`): a destination lane nobody targets gets 0, an off source sends nothing, an off destination keeps its VDST, and the half rule above applies as for `ds_bpermute_b32`. When several sources target one lane the ISA leaves the winner unpredictable ("the value from one of the writers"; its pseudocode says the highest-numbered); the translator takes the highest, and nothing may depend on it. Confirmed by the GPU tests `cs_w32_permute.asm` and, per half of a wave64, `cs_w64x_permute.asm` (SHADER-90: rotation, offset, unwritten lane = 0, off destination keeps its value, off source does not win), `cs_w32_partial_permute.asm` (a 20-thread wave32: a launched lane whose source lane was never launched gets 0, and a send to a missing lane is lost; the same words from a raw 20-thread `hw_oracle` kernel on `gfx1036`) and `tests/semantic/test_ds_permute.py`. **Hardware-verified on RDNA2 (`gfx1036`, AMD Ryzen 7 9800X3D iGPU, Linux AMDGPU DRM via `tools/hw_oracle`, wave32 and wave64, SHADER-133)** with `tools/ds_permute_probe.py` (9/9 cases exact in both wave sizes): unaddressed active lanes get 0, off destinations keep VDST, off sources send nothing, 2-/4-/32-way collisions deterministically take the highest-numbered active lane in the 32-lane half (matching the translator), `vAddr + offset` carries from the low 2 bits before `>> 2` mod 32, wave64 runs as two independent 32-lane halves (`+32` wraps within each half), and missing lanes of a partial wave (20 threads in wave32, 40 in wave64) send nothing. A source lane that is off in EXEC reads 0 and an off destination lane keeps its value (RDNA ISA §10.4.4), in wave32 as in wave64. In wave64 the permute also runs as two wave32s: each half reads lanes of its own half. Until 2026-11-21 lanes 32–63 of a 64-wide subgroup read the low half and inactive sources kept their value (`cs_w64x_bpermute`, AMD Radeon 880M); the wave32 path shuffled the raw value until the same day (`cs_bpermute32`: wave32, EXEC without lanes 8–15, so lane 6 reads 0; GPU-checked on RTX 5070 and Radeon 880M). A source lane that doesn't exist, in the missing lanes of a partial wave, also reads 0: the shuffle result is kept only where a ballot of the running invocations has the source lane, since SPIR-V leaves a shuffle from an invocation that isn't running undefined. Before this, RADV returned stale register values that changed between runs (`cs_w64x_partial`, a 40-thread group, native wave64 on AMD RX 6700 XT, RADV Mesa 26.3.1). Writes and atomics run only in active lanes. Indices wrap at the array size, where hardware would return 0 for out-of-range reads. `s_barrier` = `OpControlBarrier` Workgroup/Workgroup, AcquireRelease + WorkgroupMemory. |
449| LDS access order within a wave (`Volatile`) | RDNA2 runs a wave in lockstep with an in-order LDS queue, so a `ds_read` issued after a `ds_write` sees every lane's write with no `s_barrier` between them (`cs_w64x_lds_raw`), and a `ds_write` issued after a `ds_read` does not change what that read returned (`cs_w64x_lds_war`). Translated, a lane is an invocation, and the Vulkan memory model orders nothing between invocations without a barrier or an atomic, so a driver's compiler may move an invocation's load ahead of its own earlier store to another address, or merge two loads of one address. Results consistent with these optimizations were observed with AMD's Windows driver 24.30.46 (LLPC, Vulkan 1.3.302) on a Radeon 880M (RDNA3.5, native 64-wide compute subgroups): on `main` `561b65a8` both tests failed on every run with uninitialized Workgroup memory in all eight words, and in `cs_w64x_lds_war` the second read returned the same words as the first. Rule: every plain LDS `OpLoad` and `OpStore` (`lds_load`, `lds_store` and the two ADDTID forms) carries the `Volatile` memory operand, which prevents elimination, duplication or combination of the access ([SPIR-V memory operands](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#Memory_Access)). This rule applies to plain accesses only. On that GPU and driver `Volatile` on the store alone or on the load alone made `cs_w64x_lds_raw` return its expected words (hand-edited SPIR-V, 3 of 3 runs each, against 0 of 4 unmodified), and with the rule both tests pass: `run_gpu_tests.py` goes from 210 to 212 of 232 passed with none failing (20 skipped), native and with `LEONIDA_W64_EMULATE=1`. An RTX 5070 Laptop (NVIDIA 621.01) gives the same results before and after (183 of 232 native, 214 emulated; `ms_wave_info_s3` fails both times). The operand changes 17 of the 238 test shaders and nothing but those loads and stores. A [full Xbox 1.0.2.1 corpus comparison](https://github.com/ItsNotRexed/Leonida/pull/6714#issuecomment-7107280378) translated and validated all 26,503 shaders at both 561b65a8 and 58deee34. Only the added operands differed in the 484 compute and 5 mesh modules that changed. The RAW and WAR results establish a workaround on the tested driver. Portable ordering between invocations requires synchronization appropriate to the accesses (see #2345). Under `--wave64-emulate` the halves meet at the round barriers as before; the operand is emitted there too. CPU-checked by `tests/semantic/test_lds_volatile.py` (every plain access form on the wave32, wave64 and emulated paths, and no other access is Volatile). | 451| LDS access order within a wave (`Volatile`) | RDNA2 runs a wave in lockstep with an in-order LDS queue, so a `ds_read` issued after a `ds_write` sees every lane's write with no `s_barrier` between them (`cs_w64x_lds_raw`), and a `ds_write` issued after a `ds_read` does not change what that read returned (`cs_w64x_lds_war`). Translated, a lane is an invocation, and the Vulkan memory model orders nothing between invocations without a barrier or an atomic, so a driver's compiler may move an invocation's load ahead of its own earlier store to another address, or merge two loads of one address. Results consistent with these optimizations were observed with AMD's Windows driver 24.30.46 (LLPC, Vulkan 1.3.302) on a Radeon 880M (RDNA3.5, native 64-wide compute subgroups): on `main` `561b65a8` both tests failed on every run with uninitialized Workgroup memory in all eight words, and in `cs_w64x_lds_war` the second read returned the same words as the first. Rule: every plain LDS `OpLoad` and `OpStore` (`lds_load`, `lds_store` and the two ADDTID forms) carries the `Volatile` memory operand, which prevents elimination, duplication or combination of the access ([SPIR-V memory operands](https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#Memory_Access)). This rule applies to plain accesses only. On that GPU and driver `Volatile` on the store alone or on the load alone made `cs_w64x_lds_raw` return its expected words (hand-edited SPIR-V, 3 of 3 runs each, against 0 of 4 unmodified), and with the rule both tests pass: `run_gpu_tests.py` goes from 210 to 212 of 232 passed with none failing (20 skipped), native and with `LEONIDA_W64_EMULATE=1`. An RTX 5070 Laptop (NVIDIA 621.01) gives the same results before and after (183 of 232 native, 214 emulated; `ms_wave_info_s3` fails both times). The operand changes 17 of the 238 test shaders and nothing but those loads and stores. A [full Xbox 1.0.2.1 corpus comparison](https://github.com/ItsNotRexed/Leonida/pull/6714#issuecomment-7107280378) translated and validated all 26,503 shaders at both 561b65a8 and 58deee34. Only the added operands differed in the 484 compute and 5 mesh modules that changed. The RAW and WAR results establish a workaround on the tested driver. Portable ordering between invocations requires synchronization appropriate to the accesses (see #2345). Under `--wave64-emulate` the halves meet at the round barriers as before; the operand is emitted there too. CPU-checked by `tests/semantic/test_lds_volatile.py` (every plain access form on the wave32, wave64 and emulated paths, and no other access is Volatile). |
diff --git a/docs/directstorage.md b/docs/directstorage.md
index 919d52282..1618d221f 100644
--- a/docs/directstorage.md
+++ b/docs/directstorage.md
@@ -84,6 +84,19 @@ The first boot with the executable settles most of this: the dry-run report show
84 `DSTORAGE_QUEUE_OPTIONS::AutoSubmitDisabled`). An enqueue into a full queue waits for space, as the reference 84 `DSTORAGE_QUEUE_OPTIONS::AutoSubmitDisabled`). An enqueue into a full queue waits for space, as the reference
85 says; with auto-submit disabled only a `Submit` from another thread frees it. One worker thread per queue runs 85 says; with auto-submit disabled only a `Submit` from another thread frees it. One worker thread per queue runs
86 the submitted entries in order, so every notification follows all the entries before it. 86 the submitted entries in order, so every notification follows all the entries before it.
87- **Reads into physical pages wait for `Submit`**: an automatic submit stops at the first request whose
88 destination is a physical page list; that request and every entry behind it wait for the title's own `Submit`.
89 A title may fill the page-number table such a list points into only in its submit path, so an early read finds
90 page 0 (the entry fails) or the number the slot held before (the data lands in a page that now belongs to
91 something else, with no error). A full queue submits the held entries too, since the title cannot call `Submit`
92 while it waits in an enqueue, and so does `Close`. The idea is from VIctory (`Marvisak/VIctory` `eddde73`, also
93 in `fxceless/victory-fork` `79cfdd9`); the queue here keeps its order, so entries behind a held read wait with
94 it. `LEONIDA_DSTORAGE_HOLD_PAGES=0` restores the automatic submit of everything. A hold ends after
95 `LEONIDA_DSTORAGE_HOLD_MS` milliseconds without a `Submit` (2000 unless set): the held entries are submitted with
96 their page lists as they are, as a timed release, so a path that never calls `Submit` cannot stall for good. `0`
97 is no time limit (a hold of five seconds is then logged once). The `[rt] ds-hold` line counts automatic submits,
98 reads held, full-queue and timed releases, and destination lists that named page 0 when written (`event=`, at
99 each power of two of the counter that moved).
87- **Requests**: copied at enqueue. A file request reads `SourceSize` bytes at `FileOffset` into `Destination`; a 100- **Requests**: copied at enqueue. A file request reads `SourceSize` bytes at `FileOffset` into `Destination`; a
88 memory request copies `Source` to `Destination` (`memmove`, so an overlapping pair is safe); a zlib request 101 memory request copies `Source` to `Destination` (`memmove`, so an overlapping pair is safe); a zlib request
89 inflates those `SourceSize` bytes into `Destination` (below). Checked in this order when the worker reaches the 102 inflates those `SourceSize` bytes into `Destination` (below). Checked in this order when the worker reaches the
@@ -190,7 +203,16 @@ The first boot with the executable settles most of this: the dry-run report show
190 256 blocks of a stream. It combines adjacent mips from the same layer with full-stream index anchor 203 256 blocks of a stream. It combines adjacent mips from the same layer with full-stream index anchor
191 and shared-p-bit constraints. A shared p-bit can relate low red endpoint bits even when its sibling 204 and shared-p-bit constraints. A shared p-bit can relate low red endpoint bits even when its sibling
192 mip supplies only the leading bits. These local fits preserve the recorded precision and exact reference 205 mip supplies only the leading bits. These local fits preserve the recorded precision and exact reference
193 bits. A profile can still lack endpoint values or exceed the reference consistency tolerance. Such a request reports a decompression error before publication. 206 bits. A packed tail whose larger mips are BCPack-coded too has no raw or zlib sibling, so a history field that
207 only such tails use stayed unknown: in the game runs of 2026-11-25 two BC7 tail streams of one pool failed
208 with `missing-endpoint` (alpha fields of two history entries). For the streams that still start a chain at a
209 missing field, the fitter now decodes the nearest BCPack sibling with the profile so far and fits against it,
210 repeating while a round adds fields. The sibling may sit in the same refused BC7 stream: every block whose
211 chains start elsewhere is still determined, and the undetermined ones are left out of the reference. Those
212 fields are fitted, never confirmed, and fill only what the other fits left empty. On the 1.0.2.1 package this
213 raised the BC7 endpoint fields from 4,228 to 4,406 of 6,144; the runtime decoder then refuses 8 of 5,167 BC7
214 streams instead of 60 (both failing requests decode), and the 268 BC6H streams are unchanged (10 refused; a
215 refused BC6H sibling is not used as a reference yet). A profile can still lack endpoint values or exceed the reference consistency tolerance. Such a request reports a decompression error before publication.
194- The four swizzle modes interleave stripes from request-wide component planes into 16 KiB (mode 1) or 216- The four swizzle modes interleave stripes from request-wide component planes into 16 KiB (mode 1) or
195 32 KiB (modes 2–4) groups. The enum names give the successive stripe widths. The shipped BC4 sample 217 32 KiB (modes 2–4) groups. The enum names give the successive stripe widths. The shipped BC4 sample
196 separates its endpoint planes from indices across the inflated source. The title's compute shader does 218 separates its endpoint planes from indices across the inflated source. The title's compute shader does
@@ -213,8 +235,9 @@ The first boot with the executable settles most of this: the dry-run report show
213 235
214`runtime/test/dstorage_test.cpp` (ctest `dstorage`) runs on synthetic files in `%TEMP%` through the registry entries 236`runtime/test/dstorage_test.cpp` (ctest `dstorage`) runs on synthetic files in `%TEMP%` through the registry entries
215under all three module names: `GAME:` reads with an overlay copy winning, offsets, zero size, a range past the end, 237under all three module names: `GAME:` reads with an overlay copy winning, offsets, zero size, a range past the end,
216cancellation, auto-submit, a full queue, status arrays, fences (a CPU fence object that checks the data is in place 238cancellation, auto-submit, reads into physical pages held for `Submit` (a page list changed or filled before it,
217when it is signalled), events, error records, file and queue close with requests in flight, a destination the 239a full queue, the time limit, the switch), a full queue, status arrays, fences (a CPU fence object that checks the
240data is in place when it is signalled), events, error records, file and queue close with requests in flight, a destination the
218process cannot write, four threads enqueueing at once, the interface-id policy (unknown and system ids refused by 241process cannot write, four threads enqueueing at once, the interface-id policy (unknown and system ids refused by
219`QueryInterface`, learned by creating calls), a `GetHandle` handle with its own file position, an event closed (and 242`QueryInterface`, learned by creating calls), a `GetHandle` handle with its own file position, an event closed (and
220its handle value reused) before it is set, and cancelled requests that also had an enqueue error. zlib requests use 243its handle value reused) before it is set, and cancelled requests that also had an enqueue error. zlib requests use
diff --git a/docs/gameinput.md b/docs/gameinput.md
index 1301a4a49..e0df71085 100644
--- a/docs/gameinput.md
+++ b/docs/gameinput.md
@@ -55,10 +55,13 @@ scripted pad, driven by the script alone:
55 shim, or through `IGameInputDispatcher::Dispatch` once the title made a dispatcher) and found by `FindDeviceFromId`. 55 shim, or through `IGameInputDispatcher::Dispatch` once the title made a dispatcher) and found by `FindDeviceFromId`.
56 It is already connected, so a callback registered without enumeration hears nothing. 56 It is already connected, so a callback registered without enumeration hears nothing.
57- **The readings:** `GetCurrentReading`, `GetNextReading` and `GetPreviousReading`, with gamepad, UI navigation, 57- **The readings:** `GetCurrentReading`, `GetNextReading` and `GetPreviousReading`, with gamepad, UI navigation,
58 controller axis and controller button state. A reading is taken when the title asks for one and the script's state 58 controller axis and controller button state. A reading is taken when the title asks for one, so no thread polls,
59 has changed since the last, so no thread polls; the history keeps the last 64 readings. 59 but it first adds one reading for every change the script made since the last, stamped with the script's own time:
60 a press that starts and ends between two reads of the title is still in the history, where `GetNextReading` finds
61 it, and the readings are the same however often the title reads. The history keeps the last 64 readings.
60- **The timeline:** the same as with SDL3 (`runtime/shims/gameinput_script.h` holds the parser, the timeline and the 62- **The timeline:** the same as with SDL3 (`runtime/shims/gameinput_script.h` holds the parser, the timeline and the
61 log lines for both): seconds from the first `GameInputCreate`, each press held 300 ms, then released. 63 log lines for both): seconds from the first `GameInputCreate`, each press held 300 ms (or its own `:hold`, see
64 `LEONIDA_INPUT_SCRIPT` below), then released.
62- **Not served:** reading callbacks, aggregate devices, rumble and every other device. Those slots answer `E_NOTIMPL` 65- **Not served:** reading callbacks, aggregate devices, rumble and every other device. Those slots answer `E_NOTIMPL`
63 and log the slot once. Controllers and the [keyboard pad](#keyboard-pad) still need SDL3. 66 and log the slot once. Controllers and the [keyboard pad](#keyboard-pad) still need SDL3.
64 67
@@ -70,10 +73,17 @@ The start of the run logs one line with the counts, and each press logs the same
70[rt] gameinput: press a@40.0 (Scripted pad (Leonida)) 73[rt] gameinput: press a@40.0 (Scripted pad (Leonida))
71``` 74```
72 75
73A press is logged when the title reads it, so a press the title never reads is not logged. `LEONIDA_INPUT_LOG=0` 76A press is logged at the next reading the title asks for, with the script's time of the press, so a press is logged
74turns the `press` lines off. Without `LEONIDA_INPUT_SCRIPT`, the shim serves no devices and answers `E_NOTIMPL` for 77once the title reads its pad again. `LEONIDA_INPUT_LOG=0` turns the `press` lines off. `LEONIDA_INPUT_TRACE=1`
78(diagnostic, this shim only) logs what the title asks for: the first 128 `GetCurrentReading`, `GetNextReading` and
79`GetPreviousReading` calls, then every one that returns a pressed button and every 1000th, the device callbacks and
80`RegisterDeviceCallback` calls, and the first few calls of each reading method. Without `LEONIDA_INPUT_SCRIPT`, the shim serves no devices and answers `E_NOTIMPL` for
75every slot past `Release`, as before. 81every slot past `Release`, as before.
76 82
83`LEONIDA_INPUT_FILE=<path>` drives a run whose display takes no keyboard input (a headless session): every line
84appended to that file names one button of the script's table (`a`, `down`, ...) and becomes a press at once, held
85like a scripted one. The file is read again at most every 250 ms. It is for local runs only.
86
77`scripts/build_runtime.ps1` (what `make_game.py` runs) builds the shim only on its CMake path, when Visual Studio's 87`scripts/build_runtime.ps1` (what `make_game.py` runs) builds the shim only on its CMake path, when Visual Studio's
78C++ CMake tools are installed. Its direct-`cl.exe` fallback compiles a fixed file list without the shim and warns 88C++ CMake tools are installed. Its direct-`cl.exe` fallback compiles a fixed file list without the shim and warns
79about it. 89about it.
@@ -335,7 +345,7 @@ line is logged when it takes effect); tracking goes on underneath, so clearing i
335| `LEONIDA_PROMPTS_SWITCH_MS` | `300` | shortest time between two changes of the active input family, 0..2000 ms | 345| `LEONIDA_PROMPTS_SWITCH_MS` | `300` | shortest time between two changes of the active input family, 0..2000 ms |
336| `LEONIDA_GAMEINPUT_THREAD` | `1` | `0` stops the background poll thread; only `rt::gameinput::poll()` then reads the pads (tests) | 346| `LEONIDA_GAMEINPUT_THREAD` | `1` | `0` stops the background poll thread; only `rt::gameinput::poll()` then reads the pads (tests) |
337| `LEONIDA_KEYBOARD_PAD` | `off` | `1` adds the [keyboard pad](#keyboard-pad), read while this process has focus; `always` reads keys whatever has focus | 347| `LEONIDA_KEYBOARD_PAD` | `off` | `1` adds the [keyboard pad](#keyboard-pad), read while this process has focus; `always` reads keys whatever has focus |
338| `LEONIDA_INPUT_SCRIPT` | unset | Comma-separated `button@seconds` entries, e.g. `a@2,a@4,start@6`. With SDL3 they drive the keyboard pad, which has to be enabled; without SDL3 they drive [one scripted pad](#scripted-input-without-sdl3), the only device. The first pad update (without SDL3, the first `GameInputCreate`) reads the script once at startup and starts the clock. `reload_config()` does not reread it. Each press lasts 300 ms. Buttons are `a b x y start back lb rb up down left right`. Spaces around entries are allowed. Empty entries, unknown buttons and invalid times (including negative or non-finite values) are counted and ignored. | 348| `LEONIDA_INPUT_SCRIPT` | unset | Comma-separated `button@seconds` entries, e.g. `a@2,a@4,start@6`. With SDL3 they drive the keyboard pad, which has to be enabled; without SDL3 they drive [one scripted pad](#scripted-input-without-sdl3), the only device. The first pad update (without SDL3, the first `GameInputCreate`) reads the script once at startup and starts the clock. `reload_config()` does not reread it. Each press lasts 300 ms, or `hold` seconds when the entry is `button@seconds:hold` (more than 0, at most 600). With SDL3 a press then stays down until the title has read the pads six times since it began, but never past 5 s from its start (or its hold, if longer). A title reads its pad once a frame, so at a few seconds a frame a 300 ms press can fall between two reads and never arrive: on the retail title's "Couldn't autosave" prompt, three 300 ms `b` presses did nothing, while 120 presses 0.5 s apart got through; one `b@1100:3` replaces them. Buttons are `a b x y start back lb rb up down left right`. Spaces around entries are allowed. Empty entries, unknown buttons, invalid times (including negative or non-finite values) and invalid holds (0 or less, more than 600, not a number) are counted and ignored. |
339| `LEONIDA_MOUSE_SENSITIVITY` | `1` | scales how far the mouse moves the keyboard pad's right stick, 0.1..10 | 349| `LEONIDA_MOUSE_SENSITIVITY` | `1` | scales how far the mouse moves the keyboard pad's right stick, 0.1..10 |
340 350
341SDL's own hints (`SDL_JOYSTICK_*`, see SDL's `SDL_hints.h`) also apply, for example `SDL_JOYSTICK_HIDAPI_PS5=0` to 351SDL's own hints (`SDL_JOYSTICK_*`, see SDL's `SDL_hints.h`) also apply, for example `SDL_JOYSTICK_HIDAPI_PS5=0` to
diff --git a/docs/linux_proton.md b/docs/linux_proton.md
index de4760d70..42487ed49 100644
--- a/docs/linux_proton.md
+++ b/docs/linux_proton.md
@@ -150,6 +150,10 @@ Each item was a stop on at least one of the machines. Tests named in the pull re
150 150
151## Where it stops 151## Where it stops
152 152
153- **Writes into title memory.** A window is a read-side copy, so a UAV or raw write used to stop at the copy: the
154 missing return copy is the `WRITE_INVALID` device loss of #1537. The layer now copies the reached ranges back to
155 the title's pages at the next refresh, before the forward copy, and the title's own newer words win. Not yet
156 measured on a GPU with the world phase in front of it.
153- **Streamed memory that reaches its destination late or not at all.** The title calls queue slot 31 157- **Streamed memory that reaches its destination late or not at all.** The title calls queue slot 31
154 (`CopyPageMappingsBatchX`) about 300 times per boot. With #968 this branch maps each batch's pool pages at the 158 (`CopyPageMappingsBatchX`) about 300 times per boot. With #968 this branch maps each batch's pool pages at the
155 destination and at the paired CPU view the layer reads (`docs/d3d12_vulkan.md`, section 4.9), so most streamed 159 destination and at the paired CPU view the layer reads (`docs/d3d12_vulkan.md`, section 4.9), so most streamed
@@ -166,6 +170,72 @@ Each item was a stop on at least one of the machines. Tests named in the pull re
166- **Under Wine** a thread that takes an access violation while holding the process heap lock can still deadlock 170- **Under Wine** a thread that takes an access violation while holding the process heap lock can still deadlock
167 with xmem's fault handler; the test for it is skipped there. 171 with xmem's fault handler; the test for it is skipped there.
168 172
173## AMD on Linux: what got the world drawn
174
175On 2026-11-26 a Linux machine with an RX 7900 XTX (and a Ryzen 9 7950X3D's RDNA2 iGPU), Mesa 26.3.1 (RADV) and Wine
176drew the first world frames: the opening night street and a sunset street with palms, cars and a character, over
177eight minutes in the world without a GPU hang, at about one frame per six seconds. The runtime was `main` `a73a57e13`
178with #1914, #1957, #1972, #2044, #2097, #2124, #2129, #2144, #2162, #2195 and #2240 merged; they went into `main`
179together with this section. Each step below removed a stop that ended every earlier run; they are in the order
180they were found.
181
1821. **Raise amdgpu's GPU timeout.** `modinfo amdgpu -p` shows `lockup_timeout` with a default of 2000 ms: the kernel
183 resets any ring whose job runs over 2 s. World frames take seconds, so a run ended about 30 s into the world with
184 `ring gfx_0.0.0 timeout` in `journalctl -k`, no page fault, and a black last frame. Raise it as root and reboot:
185 `amdgpu.lockup_timeout=30000,60000,10000,10000` on the kernel command line (graphics, compute, SDMA, video, in
186 ms), or `options amdgpu lockup_timeout=30000,60000,10000,10000` in a file under `/etc/modprobe.d/` followed by an
187 initramfs rebuild. A real hang then freezes that ring, and a desktop on the same GPU, for up to that long, so don't
188 make it unlimited. Windows reporters raise `TdrDelay` for the same reason.
1892. **Native wave64 shaders.** On a GPU that runs wave64 natively (AMD RDNA), translate with
190 `make_game.py --stages shaders --wave64-emulate off`. Before `max_subgroup_decider` (`make_game.py`), the auto
191 mode took the smallest `maxSubgroupSize` over every Vulkan device, so an installed llvmpipe (8) turned emulation on for all
192 23,841 wave64 shaders. Emulated single-wave compute programs were then translated in the round-loop form, which
193 hung the GPU on several library programs and drove RADV's compiler past 12 GiB (53 GB uncapped) on the largest; the
194 translator no longer does that for single-wave programs ([design.md](design.md), row "Wave64 emulation:
195 single-wave barrier fallback").
196 The auto mode now leaves CPU devices out when a GPU is listed and names the device that decided.
1973. **Fill the pipeline journal with the runtime itself.** `gta6rt --precompile-pipelines --threads 16`, under Wine,
198 with the environment of the game run (`LEONIDA_SHADERS`, `LEONIDA_PIPELINE_CACHE_DIR`, `LEONIDA_DEVICE_FAULT`;
199 `--precompile-pipelines` in [d3d12_vulkan.md](d3d12_vulkan.md)). It built 3,693 compute pipelines; the next boot took
200 1,900 of them from the journal in 0.1 s of driver time, and the menus ran at 30 frames/s instead of under one.
201 That run left out the programs `LEONIDA_SKIP_COMPUTE` named, which kept them out of the journal; the pre-compile
202 now builds them too unless it is given `--skip-listed`.
203 The `pipeline_cache.bin` that `make_game.py`'s pipelines stage writes with `vk_pipeline_check` gave no hits: 0 of
204 5,526 journal pipeline keys were in its 29,861 objects (9 shader binaries were identical, so the machine code
205 matched and the keys did not). Each of three differences is enough for a miss on RADV:
206 - **The set of shaders:** the runtime's warm-up builds the library's compute programs (`library/index.json`,
207 2,683 modules); the stage builds the main index and `bvh/`, and only 25 library modules are byte-identical to a
208 main-index one.
209 - **Robustness:** on RADV the runtime enables `robustBufferAccess`, `robustBufferAccess2` and `nullDescriptor`;
210 `vk_pipeline_check` turns `robustBufferAccess` off and leaves robustness2 off. RADV puts the robustness state into
211 every shader stage key, so every pipeline, compute and graphics, misses.
212 - **Layout and subgroup request:** for compute with set-0 bindings (2,244 of the 2,683) the checker builds set 0
213 from default bindless features and requests the subgroup size without the runtime's full-subgroups flag; RADV
214 hashes the whole set layout and the stage flags. Graphics would miss anyway: the checker pairs each stage with a
215 stub and fixed state, and RADV hashes the full graphics state.
2164. **Leave out the ray-tracing programs.** 724 library compute programs have 2 MiB of SPIR-V or more (676 of them
217 ray-tracing resolve). The 89-167 s each in the driver were measured with wave64-emulated packs; with the native
218 pack of step 2 they build in seconds, so compile time is not the reason any more. Measured afterwards on the same
219 machine (RX 7900 XTX, RADV, Mesa 26.3.1, Wine): all 721 such programs of that pack built, 360 of them in 170 s on 32
220 threads, 2.5-32 s each, the largest (13 MiB) in 28.5 s alone, at a peak of 14 GiB of RAM. Two world runs with all
221 of them in the journal and no skip list (one run per build) took them all from the journal and got no further
222 than runs with the skip list: one stopped submitting after 404 s with the GPU idle, the other lost the device
223 about 214 s in with every queue idle, a loss that also happens with the skip list set
224 ([running.md](running.md#settings-every-platform-needs)). Whether their output is correct is not measured, so the
225 longest runs still leave them out. `LEONIDA_RT_AS=off` drops acceleration-structure builds and copies, and
226 `LEONIDA_SKIP_COMPUTE=<name>,<name>,...` with those programs' `lib_cs_NNNNN` names (picked by module size from
227 `library/index.json`) drops their dispatches at play. The picture then lacks whatever those passes draw.
2285. **Keep the title's hang watchdog kicked.** The title exits on purpose (a write to address 0) when its main loop has
229 not reported for 30 s, which a world load under the runtime exceeds. `LEONIDA_TITLE_WATCHDOG=0` defuses it only
230 together with `LEONIDA_TITLE_WATCHDOG_KICK=<trap RVA>,<kick RVA>` (hex; `runtime/src/main.cpp`); the two values are
231 measured locally and never committed. With `=0` alone the loader logs that the watchdog stays armed.
232
233The rest of that run's environment came from a Linux/Proton report on an RTX 3090: `LEONIDA_ASYNC_PIPELINES=0`,
234`LEONIDA_DEVICE_TYPE=6`, `LEONIDA_MAP_READBACK=1`, `LEONIDA_TITLE_WINDOWS_MB=4096`, `LEONIDA_FRAME_PACING=1` and
235`LEONIDA_PRESENT_NO_TEAR=1`. Still wrong after it: frames alternate between white-out, a correct picture and black;
236some geometry is drawn in the wrong place; VRAM reached 18.3 of 22.3 GB; the run ended on a breakpoint in the title
237after 12 minutes.
238
169## Reporting a result 239## Reporting a result
170 240
171Say the machine (OS, GPU and driver, RAM), the commit, the environment switches that differ from the defaults, and 241Say the machine (OS, GPU and driver, RAM), the commit, the environment switches that differ from the defaults, and
diff --git a/docs/running.md b/docs/running.md
new file mode 100644
index 000000000..161e3153d
--- /dev/null
+++ b/docs/running.md
@@ -0,0 +1,158 @@
1# Running the game, per platform and GPU
2
3How the retail game has been run on each platform and GPU so far: the build, the shader pack, the pipeline
4pre-compile, the driver and OS settings, the environment and what to expect. Every value is marked:
5
6- **measured by us**: by the maintainers who wrote this page, on the machine named in that section;
7- **reported by others**: from a public issue or comment, linked; not checked by us;
8- **TBD**: nobody has reported it yet. A report fills it in ([Reporting](#reporting)).
9
10Paths are placeholders: `<checkout>` is the repository, `<build>` the folder with `gta6rt.exe` and
11`gta6rt_tls_host.dll`, `<work>` the work folder `make_game.py` writes, `<cache>` a folder for pipeline caches,
12`<package>` the game's package folder and `<exe>` its executable. Under Wine, a Linux path is passed as `Z:<path>`.
13
14## Settings every platform needs
15
16- **The title's hang watchdog.** The title exits on purpose (a write to address 0) when its main loop has not reported
17 for 30 s, which a world load under the runtime exceeds. `LEONIDA_TITLE_WATCHDOG=0` keeps it from firing only together
18 with `LEONIDA_TITLE_WATCHDOG_KICK=<trap RVA>,<kick RVA>` (hex), two addresses in the executable that each person
19 measures in their own copy (`runtime/src/main.cpp` describes the trap instruction the first must point at). The
20 values are never committed. With `=0` alone the loader logs that the watchdog stays armed. (Measured by us; the
21 watchdog was identified in [#2019](https://github.com/ubiquitarianism/leonida/issues/2019#issuecomment-7172996360).)
22- **The GPU timeout.** World frames take seconds each. The OS's GPU timeout must be longer, or the driver resets the
23 GPU: amdgpu's `lockup_timeout` on Linux, `TdrDelay` on Windows (sections below).
24- **Large ray-tracing programs.** 724 library compute programs have 2 MiB of SPIR-V or more (676 of them ray-tracing
25 resolve). With wave64 emulation they took 89-167 s each in the driver ([reported by others](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7184700506);
26 the count of 724 also measured by us). With a native wave64 pack compile time is no reason to leave them out: on an
27 RX 7900 XTX (RADV, Mesa 26.3.1, Wine) all 721 such programs of that pack built, 360 of them in 170 s on 32 threads,
28 2.5-32 s each, the largest (13 MiB) in 28.5 s alone, at a peak of 14 GiB of RAM (measured by us). The pipeline
29 pre-compile builds them with the rest. Dispatched at play (measured by us, one run per condition: RX 7900 XTX 24 GB,
30 `LEONIDA_RT_AS=off`, no skip list, all 721 in the journal), they all came from the journal (2,700 compute
31 pipelines from it against 1,900 with the skip list set; none built in the game) and the load reached the world.
32 One run (a local build of `main` with four then-open pull requests) stopped submitting after 404 s with the GPU idle
33 and no GPU fault; the other (`main` `bd6ba97ab`) lost the device about 214 s in, after a read page fault, with
34 every queue idle in the dispatch markers. The same idle-queue device loss also happens with the skip list set, so
35 it is not shown to come from these programs, and running them got no further than the skip list's best runs
36 (about 11 minutes, ending on a title breakpoint). Whether their output is correct is not measured. Our longest
37 runs used `LEONIDA_SKIP_COMPUTE=<name>,<name>,...` with those programs' names (picked by module size from
38 `<work>/shaders/spirv/library/index.json`), which drops their dispatches at play, and `LEONIDA_RT_AS=off`, which
39 drops acceleration-structure builds. The picture then lacks what they draw.
40
41## Linux, Wine, AMD RX 7900 XTX (RADV)
42
43Measured by us on 2026-11-26: RX 7900 XTX, Ryzen 9 7950X3D, Linux 7.3, Mesa 26.3.1 (RADV), Wine. Details and the
44reasons behind each step: [linux_proton.md](linux_proton.md#amd-on-linux-what-got-the-world-drawn).
45
46- **Build:** the clang-cl + xwin cross-build ([testing.md](testing.md#the-windows-runtime-on-linux-under-wine-or-proton)),
47 with SDL3 for the keyboard pad.
48- **Shaders:** `python -I make_game.py --stages shaders --wave64-emulate off --work <work> --out <out>`. The GPU runs
49 wave64 natively; emulation is not needed. (`auto` picks the same here since llvmpipe no longer decides.)
50- **Pipeline pre-compile:** `wine <build>/gta6rt.exe --precompile-pipelines --threads 16` with the run's
51 `LEONIDA_SHADERS`, `LEONIDA_PIPELINE_CACHE_DIR` and `LEONIDA_DEVICE_FAULT`, before the first run. It built 3,693
52 compute pipelines. Not `make_game.py --stages pipelines`: its cache never matches the runtime's driver keys.
53 The pre-compile builds the programs `LEONIDA_SKIP_COMPUTE` names too (`--skip-listed` leaves them out) and ends
54 with one line that counts what it built, what was journaled already and what it left out.
55- **Driver and OS:** `amdgpu.lockup_timeout=30000,60000,10000,10000` on the kernel command line (the default is
56 2000 ms; reboot needed).
57- **Environment:**
58
59 | Setting | Why |
60 |---|---|
61 | `LEONIDA_D3D12=vulkan` | the Vulkan backend |
62 | `LEONIDA_SHADERS=Z:<work>/shaders/spirv` | the native pack |
63 | `LEONIDA_PIPELINE_CACHE_DIR=Z:<cache>/pso` | the journal the pre-compile filled |
64 | `MESA_SHADER_CACHE_DIR=<cache>/mesa`, `MESA_SHADER_CACHE_MAX_SIZE=16G` | RADV's own cache, large enough for the pack |
65 | `LEONIDA_STARTUP_CACHE_CHECKPOINTS=1` | session cache snapshots during the boot |
66 | `LEONIDA_ASYNC_PIPELINES=0` | draws wait for their pipeline instead of being skipped |
67 | `LEONIDA_SERIAL_BIG_COMPILES=0`, `LEONIDA_COMPUTE_WARMUP_MAX_BYTES=8388608` | warm-up limits, as in the NVIDIA report below |
68 | `LEONIDA_RT_AS=off`, `LEONIDA_SKIP_COMPUTE=<list>` | the large ray-tracing programs, left out at play as in our longest runs ([above](#settings-every-platform-needs)) |
69 | `LEONIDA_TITLE_WATCHDOG=0`, `LEONIDA_TITLE_WATCHDOG_KICK=<trap RVA>,<kick RVA>` | the title's hang watchdog ([above](#settings-every-platform-needs)) |
70 | `LEONIDA_DEVICE_TYPE=6`, `LEONIDA_MAP_READBACK=1`, `LEONIDA_FRAME_PACING=1`, `LEONIDA_PRESENT_NO_TEAR=1` | taken over from the NVIDIA report below; their effect on AMD was not measured one by one |
71 | `LEONIDA_ARENA_MB=4095`, `LEONIDA_TITLE_WINDOWS_MB=4096`, `LEONIDA_GEOMETRY_MB=6144` | room for the title's buffers in the world |
72 | `LEONIDA_SHADOW_ALIAS_MS=5000`, `LEONIDA_CONSOLE_FIX_US=0` | carried from earlier boot runs; their effect here was not measured one by one |
73 | `LEONIDA_DEVICE_FAULT=1` | a device-loss report if the GPU hangs |
74 | `LEONIDA_KEYBOARD_PAD=always` | the keyboard as the pad |
75
76- **Command:** from `<package>`, `wine <build>/gta6rt.exe --run Z:<exe> --game-dir Z:<package>`.
77- **What to expect:** menus at 30 frames/s with no in-game compiling; the world after the story load, over eight
78 minutes without a GPU hang, at about one frame per six seconds.
79- **Known problems:** frames alternate between white-out, a correct picture and black; some geometry is drawn in the
80 wrong place; VRAM reached 18.3 of 22.3 GB; the run ended on a breakpoint (`int3`) in the title after 12 minutes.
81
82## Linux, Wine, AMD RDNA2 iGPU (Ryzen 7000, RADV)
83
84Measured by us on 2026-11-25/26, the same machine's integrated GPU (gfx1036), headless, before the watchdog's KICK
85was known. The settings that drew the world on the RX 7900 XTX have not been tried here: TBD.
86
87- **Build, shaders, pipeline pre-compile:** as for the RX 7900 XTX; the iGPU also runs wave64 natively.
88- **Driver and OS:** the same `lockup_timeout` applies (TBD whether the values above are enough here).
89- **Environment:** select the iGPU with `MESA_VK_DEVICE_SELECT=1002:164e` and
90 `MESA_VK_DEVICE_SELECT_FORCE_DEFAULT_DEVICE=1`. A cold compute warm-up made the title crawl at 0.12 frames/s behind
91 our own warm-ups; `LEONIDA_COMPUTE_WARMUP_LIVE_MAX_BYTES=131072` holds large warm-ups back while the title submits
92 (191 frames/s in the menus with it, measured on the RX 7900 XTX).
93- **What to expect:** the boot, the first-run pages and the story load's loading screen (about 1,100 s into a run with
94 a partly warm cache). Every run then ended in the title's watchdog exit, about two minutes into the world load,
95 because only `LEONIDA_TITLE_WATCHDOG=0` was set. World frames: TBD.
96- **Known problems:** TBD beyond the above.
97
98## Linux, Proton, NVIDIA
99
100Reported by others: [#1608, comment 7184700506](https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7184700506)
101(RTX 3090 24 GB, NVIDIA 590.48.01, GE-Proton11-14, Debian 13). Not run by us.
102
103- **Build:** clang-cl + xwin cross-build; `main` plus several pull requests and two local changes (listed in the report).
104- **Shaders:** the main corpus, the library and FSPX with llvm-mc 23.1.6. Wave64 emulation: TBD from the report (it is
105 needed on NVIDIA's 32-wide subgroups; `auto` turns it on there).
106- **Pipeline pre-compile:** caches warm from two earlier runs; no separate pre-compile is reported.
107- **Driver and OS:** TBD.
108- **Environment:** `LEONIDA_ASYNC_PIPELINES=0`, `LEONIDA_RT_AS=off`, `LEONIDA_SKIP_COMPUTE=<the 724 programs>`,
109 `LEONIDA_DEVICE_TYPE=6`, `LEONIDA_TITLE_WATCHDOG=0`, `LEONIDA_MAP_READBACK=1`, `LEONIDA_HOST_IMAGE_COPY=0`,
110 `LEONIDA_ARENA_MB=4095`, `LEONIDA_TITLE_WINDOWS_MB=4096`, `LEONIDA_SERIAL_BIG_COMPILES=0`, `LEONIDA_FRAME_PACING=1`,
111 `LEONIDA_PRESENT_NO_TEAR=1`. The report gives the reason for the skip list only: without it the world start waits
112 hours on the ray-tracing programs; with asynchronous pipelines instead the screen stayed black. Those compile times
113 are the report's pack; a native wave64 pack builds them in seconds each ([above](#settings-every-platform-needs)).
114 Where they still take minutes, `gta6rt --precompile-pipelines --big-threads N` bounds how many build at once (each
115 held about 3.5 GB of host memory on an RTX 4070 Ti) and `--skip-listed` leaves the listed ones out.
116- **Command:** TBD.
117- **What to expect:** the opening night street from about 650 s, at 0.1-0.2 frames/s, no device loss through 934 s.
118 The black stretch before it is graphics pipelines of 1-2.6 MB SPIR-V compiling one at a time, 5-10 s each.
119- **Known problems:** nothing ray-traced is in the picture.
120
121## Windows, NVIDIA
122
123Reported by others: [#2019](https://github.com/ubiquitarianism/leonida/issues/2019) (RTX 5090 32 GB, driver 616.92,
124Windows 11). Not run by us.
125
126- **Build:** `scripts/build_runtime.ps1` with SDL3, RelWithDebInfo.
127- **Shaders:** `make_game.py --stages check,shaders,runtime` (26,503 shaders translated); wave64 emulation as `auto`
128 decides (on for NVIDIA).
129- **Pipeline pre-compile:** TBD.
130- **Driver and OS:** `TdrDelay` and `TdrDdiDelay` raised to 60 s, after which an 8.9 s pipeline build no longer
131 reset the device.
132- **Environment:** `LEONIDA_D3D12=vulkan`, `LEONIDA_KEYBOARD_PAD=always`; the rest TBD.
133- **Command:** `gta6rt.exe --first-run-ui game_scarlett_master.exe` from the package folder.
134- **What to expect:** the first-run UI, then the title's watchdog exit at 145-204 s. With `LEONIDA_TITLE_WATCHDOG=0`
135 (before the KICK variable existed) the boot went on at about 24 frames/s and the machine then bugchecked
136 (`CRITICAL_PROCESS_DIED`) before a world frame. With the KICK values: TBD.
137- **Known problems:** TBD.
138
139## Windows, AMD
140
141TBD: no public report of a game run on Windows with an AMD GPU is known to us. What the code does: on RDNA1 and RDNA2
142under AMD's Windows driver, `make_game.py`'s `auto` translates native wave64, because that driver crashes on many
143emulated wave64 compute pipelines (#857). `TdrDelay` applies as for NVIDIA.
144
145## Intel
146
147TBD.
148
149## macOS (MoltenVK)
150
151TBD.
152
153## Reporting
154
155Post a run in the coordination issue, with the fields of these sections: machine (OS, GPU, driver, RAM), the commit,
156how the shaders were made, the pipeline pre-compile, the OS and driver settings, every `LEONIDA_*` variable that
157differs from the defaults (never the watchdog's RVA values), and how far the run got with its frame rate. Keep logs,
158traces and screenshots on your machine ([linux_proton.md](linux_proton.md#reporting-a-result)).
diff --git a/docs/runtime_imports.md b/docs/runtime_imports.md
index e38dfbf74..e408d223d 100644
--- a/docs/runtime_imports.md
+++ b/docs/runtime_imports.md
@@ -170,7 +170,7 @@ policy "other" (none is counted as returning an `HRESULT`), and they come from s
170| `xg_xs.dll` | 2: `XGCreateTextureComputer`, `XGSuggestSwizzleMode` | texture layout computation | 170| `xg_xs.dll` | 2: `XGCreateTextureComputer`, `XGSuggestSwizzleMode` | texture layout computation |
171| `XCRDAPI.dll` | 1: `DStorageGetFactory` | DirectStorage | 171| `XCRDAPI.dll` | 1: `DStorageGetFactory` | DirectStorage |
172| `chad.dll` | 5: `XDspActivate`, `XDspConnectWithMaximumStreamLimit`, `XDspDeactivate`, `XDspDisconnect`, `XDspSubmitCommand` | the audio DSP | 172| `chad.dll` | 5: `XDspActivate`, `XDspConnectWithMaximumStreamLimit`, `XDspDeactivate`, `XDspDisconnect`, `XDspSubmitCommand` | the audio DSP |
173| `xapu.dll` | 5: `XApuConnect`, `XApuDequeueResult`, `XApuDisconnect`, `XApuEnqueueCommand`, `XApuGetResultCount` | the audio processing unit | 173| `xapu.dll` | 5: `XApuConnect`, `XApuDequeueResult`, `XApuDisconnect`, `XApuEnqueueCommand`, `XApuGetResultCount` | the audio processing unit (Opus decode when `runtime/opus_decoder` is built) |
174| `AcpHal.dll` | 9: `AcpHalAllocateShapeContexts`, `AcpHalCreate`, `AcpHalReleaseShapeContexts`, `ApuAlloc`, `ApuCreateHeap`, `ApuFree`, `ApuIsVirtualAddressValid`, `ApuMapApuAddress`, `ApuMapVirtualAddress` | the audio hardware layer | 174| `AcpHal.dll` | 9: `AcpHalAllocateShapeContexts`, `AcpHalCreate`, `AcpHalReleaseShapeContexts`, `ApuAlloc`, `ApuCreateHeap`, `ApuFree`, `ApuIsVirtualAddressValid`, `ApuMapApuAddress`, `ApuMapVirtualAddress` | the audio hardware layer |
175 175
176The game executable imports two functions from `xg_xs.dll`, the console's texture layout library: 176The game executable imports two functions from `xg_xs.dll`, the console's texture layout library:
@@ -203,17 +203,19 @@ again at detach (reason 0), and there is no `exception`, `error` or `unimplement
203unimplemented imports is reached by the TLS callbacks or the `DllMain`s. 203unimplemented imports is reached by the TLS callbacks or the `DllMain`s.
204 204
205The executable's audio imports `xapu.dll` (`XApuConnect`, `XApuDequeueResult`, `XApuDisconnect`, 205The executable's audio imports `xapu.dll` (`XApuConnect`, `XApuDequeueResult`, `XApuDisconnect`,
206`XApuEnqueueCommand`, `XApuGetResultCount`) and `chad.dll` (`XDspActivate`, `XDspConnectWithMaximumStreamLimit`, 206`XApuEnqueueCommand`, `XApuGetResultCount`) are served by `runtime/shims/xapu_queue.cpp`; `chad.dll`
207`XDspDeactivate`, `XDspDisconnect`, `XDspSubmitCommand`) are served by `runtime/shims/xapu_chad.cpp`. The shapes were 207(`XDspActivate`, `XDspConnectWithMaximumStreamLimit`, `XDspDeactivate`, `XDspDisconnect`, `XDspSubmitCommand`) by
208read statically from the executable's call sites: one each, four for `XApuEnqueueCommand`. Both connects succeed with 208`runtime/shims/xapu_chad.cpp`. The shapes were read statically from the executable's call sites: one each, four for
209a handle; the APU connect also returns a zeroed shared buffer the title writes stream input to and reads output from. 209`XApuEnqueueCommand`. `XApuConnect` reads the title's 24-byte `ConnectInput` (process 1 = Opus at 48 kHz, stream
210Commands are accepted and not processed, so the audio stays silent. A stream open (type 1) and a stream close 210count, commands per stream, a shared buffer, options) and returns `{shared buffer, result event}`; it never writes the
211(type 2) each queue one result of the same type and slot, because the title frees a stream id only when the close 211input. Activate, process, deactivate and reset commands are copied from the title's stack command, and each queues one
212result arrives. `XDspActivate` writes its two outputs as pointers to zeroed memory, which the title reads as "command 212result in order. A process command decodes its Opus packet through `runtime/opus_decoder` (Rust over the BSD-3-Clause
213done" after each `XDspSubmitCommand`. `XApuConnect` leaves its first argument, a global of the title, untouched. The 213`opus-pure`) into the slot's output, honouring first frame, frame count, output length and the deinterleaved option;
214buffer size (128 stream slots), the two results and the zeroed DSP status are hypotheses, explained in the file. 214without the crate the result carries the table-of-contents frame count and silence. The layouts follow Marvisak/VIctory
215`xapu_chad_test` calls all ten in those shapes. With `--trace`, the first call of each, and the first command of each type, is an 215`crates/victory-hle/src/modules/apu.rs` (GPL-3.0-or-later). `XDspActivate` writes its two outputs as pointers to zeroed
216`audio_queue` event. 216memory, which the title reads as "command done" after each `XDspSubmitCommand`; the DSP stays silent. `xapu_chad_test`
217covers the layouts, the queue and the silent path; `xapu_opus_test` the decoded path. With `--trace`, the first call of
218each, and the first command of each type, is an `audio_queue` event.
217The table above was measured before this shim and still lists these ten as unimplemented; they are served now. The call shapes agree with `docs/audio_hal_exe_calls.md`, which was measured with `tools/import_call_sites.py`. 219The table above was measured before this shim and still lists these ten as unimplemented; they are served now. The call shapes agree with `docs/audio_hal_exe_calls.md`, which was measured with `tools/import_call_sites.py`.
218 220
219What this does not show: `--run` has not been run, so the entry point has not been called and no import is known to be 221What this does not show: `--run` has not been run, so the entry point has not been called and no import is known to be
diff --git a/make_game.py b/make_game.py
index 03d93a2b8..f1af5a172 100644
--- a/make_game.py
+++ b/make_game.py
@@ -1879,26 +1879,54 @@ def keep_recorded_fallback(flag: str, work: str) -> bool:
1879 return True 1879 return True
1880 1880
1881 1881
1882def smallest_max_subgroup(vulkaninfo_text: str): 1882def max_subgroup_decider(vulkaninfo_text: str):
1883 """The smallest maxSubgroupSize vulkaninfo reports over all devices (text or --json output), or None.""" 1883 """(size, device, left_out): the smallest maxSubgroupSize vulkaninfo reports (text or --json output), the name
1884 of the device that reports it (None when the output names no devices), and the names of the CPU devices left
1885 out. A CPU device (llvmpipe, lavapipe, SwiftShader) only counts when no other device is listed: the runtime
1886 ranks it below every GPU (runtime/src/vulkan_device_filter.h, tools/vk_subgroup_info.py device_rank), and
1887 llvmpipe's maxSubgroupSize of 8 would otherwise turn emulation on beside a GPU with native wave64. size is
1888 None when it can't be told."""
1884 size = r'maxSubgroupSize"?\s*[=:]\s*(\d+)' 1889 size = r'maxSubgroupSize"?\s*[=:]\s*(\d+)'
1885 # A device's own name is the least indented one; deeper ones (VK_KHR_maintenance7's layered APIs, e.g. 1890 # A device's own name is the least indented one; deeper ones (VK_KHR_maintenance7's layered APIs, e.g.
1886 # MoltenVK's Metal device, in both the text and the --json output) belong to the device above them. 1891 # MoltenVK's Metal device, in both the text and the --json output) belong to the device above them.
1887 names = list(re.finditer(r'(?m)^([ \t]*)"?deviceName"?\s*[=:]', vulkaninfo_text)) 1892 names = list(re.finditer(r'(?m)^([ \t]*)"?deviceName"?\s*[=:]\s*"?([^"\n]*)', vulkaninfo_text))
1888 depth = min((len(m.group(1)) for m in names), default=0) 1893 depth = min((len(m.group(1)) for m in names), default=0)
1889 starts = [m.start() for m in names if len(m.group(1)) == depth] 1894 devices = [m for m in names if len(m.group(1)) == depth]
1890 if not starts: 1895 if not devices:
1891 sizes = [int(n) for n in re.findall(size, vulkaninfo_text)] 1896 sizes = [int(n) for n in re.findall(size, vulkaninfo_text)]
1892 return min(sizes) if sizes else None 1897 return (min(sizes) if sizes else None), None, []
1898 # deviceType sits beside deviceName in VkPhysicalDeviceProperties (just before it in the text output; the
1899 # --json output may order the keys differently), so each device takes the nearest one at the same depth.
1900 types = [(m.start(), m.group(2)) for m in
1901 re.finditer(r'(?m)^([ \t]*)"?deviceType"?\s*[=:]\s*"?([A-Z_0-9]+)', vulkaninfo_text)
1902 if len(m.group(1)) == depth]
1903
1904 def is_cpu(pos):
1905 if not types:
1906 return False
1907 kind = min(types, key=lambda t: abs(t[0] - pos))[1]
1908 return kind.endswith("TYPE_CPU") or kind == "4"
1909
1893 # One section per device (a 1.3 device can print the size twice, in two property structs): one value each, 1910 # One section per device (a 1.3 device can print the size twice, in two property structs): one value each,
1894 # and a device that prints none makes the answer unknown rather than being left out of the smallest. 1911 # and a device that prints none makes the answer unknown rather than being left out of the smallest.
1895 per_device = [] 1912 per_device = []
1896 for a, b in zip(starts, starts[1:] + [len(vulkaninfo_text)]): 1913 ends = [m.start() for m in devices[1:]] + [len(vulkaninfo_text)]
1897 sizes = [int(n) for n in re.findall(size, vulkaninfo_text[a:b])] 1914 for m, end in zip(devices, ends):
1898 if not sizes: 1915 sizes = [int(n) for n in re.findall(size, vulkaninfo_text[m.start():end])]
1899 return None 1916 per_device.append((min(sizes) if sizes else None, m.group(2).strip().rstrip(","), is_cpu(m.start())))
1900 per_device.append(min(sizes)) 1917 gpus = [d for d in per_device if not d[2]]
1901 return min(per_device) 1918 left_out = [d[1] for d in per_device if d[2]] if gpus else []
1919 counted = gpus or per_device
1920 if any(d[0] is None for d in counted):
1921 return None, None, left_out
1922 smallest = min(counted, key=lambda d: d[0])
1923 return smallest[0], smallest[1], left_out
1924
1925
1926def smallest_max_subgroup(vulkaninfo_text: str):
1927 """The smallest maxSubgroupSize vulkaninfo reports (text or --json output), or None; CPU devices only count when
1928 no GPU is listed (max_subgroup_decider)."""
1929 return max_subgroup_decider(vulkaninfo_text)[0]
1902 1930
1903 1931
1904def wave64_settings(mode: str, *, mesh_compute: bool = False) -> tuple[bool, bool]: 1932def wave64_settings(mode: str, *, mesh_compute: bool = False) -> tuple[bool, bool]:
@@ -1906,7 +1934,8 @@ def wave64_settings(mode: str, *, mesh_compute: bool = False) -> tuple[bool, boo
1906 shader is only exact without it when the GPU gives it 64-wide subgroups; with it, it is exact on any subgroup 1934 shader is only exact without it when the GPU gives it 64-wide subgroups; with it, it is exact on any subgroup
1907 size, at the cost of a workgroup barrier per segment. "auto" keeps emulation off on native-wave64 RDNA1/2 1935 size, at the cost of a workgroup barrier per segment. "auto" keeps emulation off on native-wave64 RDNA1/2
1908 under the AMD Windows driver. Elsewhere it turns emulation on unless every Vulkan device reports 1936 under the AMD Windows driver. Elsewhere it turns emulation on unless every Vulkan device reports
1909 maxSubgroupSize >= 64 and the runtime probe does not rule out native wave64.""" 1937 maxSubgroupSize >= 64 and the runtime probe does not rule out native wave64; a CPU device (llvmpipe) only
1938 counts when no GPU is listed (max_subgroup_decider)."""
1910 if mode == "on": 1939 if mode == "on":
1911 return True, False 1940 return True, False
1912 if mode == "off": 1941 if mode == "off":
@@ -1927,24 +1956,28 @@ def wave64_settings(mode: str, *, mesh_compute: bool = False) -> tuple[bool, boo
1927 "(#857), so auto uses native wave64 and rebuilds emulated outputs (--wave64-emulate on to force emulation)") 1956 "(#857), so auto uses native wave64 and rebuilds emulated outputs (--wave64-emulate on to force emulation)")
1928 return False, False 1957 return False, False
1929 exe = shutil.which("vulkaninfo") 1958 exe = shutil.which("vulkaninfo")
1930 size = None 1959 size, decider, left_out = None, None, []
1931 if exe: 1960 if exe:
1932 try: 1961 try:
1933 r = subprocess.run([exe], capture_output=True, text=True, errors="replace", timeout=120) 1962 r = subprocess.run([exe], capture_output=True, text=True, errors="replace", timeout=120)
1934 size = smallest_max_subgroup(r.stdout) 1963 size, decider, left_out = max_subgroup_decider(r.stdout)
1935 except (OSError, subprocess.SubprocessError): 1964 except (OSError, subprocess.SubprocessError):
1936 size = None 1965 size = None
1966 if left_out:
1967 log(f"shaders: left out of the wave64 choice, as the runtime never picks a CPU device beside a GPU: "
1968 f"{', '.join(left_out)}")
1937 if size is None: 1969 if size is None:
1938 log("shaders: couldn't read the GPU's subgroup size from vulkaninfo: wave64 emulation on " 1970 log("shaders: couldn't read the GPU's subgroup size from vulkaninfo: wave64 emulation on "
1939 "(exact on every GPU; --wave64-emulate off to skip it on a GPU with 64-wide subgroups)") 1971 "(exact on every GPU; --wave64-emulate off to skip it on a GPU with 64-wide subgroups)")
1940 return True, True 1972 return True, True
1941 on = size < 64 1973 on = size < 64
1974 by = f" ({decider})" if decider else ""
1942 if not on and native64 is False: 1975 if not on and native64 is False:
1943 stages = "compute" if compute_only else "both compute and mesh" 1976 stages = "compute" if compute_only else "both compute and mesh"
1944 log(f"shaders: smallest maximum subgroup size is {size}, but the Vulkan query found no 64-wide path for " 1977 log(f"shaders: smallest maximum subgroup size is {size}{by}, but the Vulkan query found no 64-wide path for "
1945 f"{stages} (fixed default size or required-size control): wave64 emulation on") 1978 f"{stages} (fixed default size or required-size control): wave64 emulation on")
1946 return True, True 1979 return True, True
1947 log(f"shaders: smallest maximum subgroup size is {size}: wave64 emulation {'on' if on else 'off'}") 1980 log(f"shaders: smallest maximum subgroup size is {size}{by}: wave64 emulation {'on' if on else 'off'}")
1948 return on, True 1981 return on, True
1949 1982
1950 1983
diff --git a/runtime/CMakeLists.txt b/runtime/CMakeLists.txt
index 10ee582b1..f8edc3508 100644
--- a/runtime/CMakeLists.txt
+++ b/runtime/CMakeLists.txt
@@ -158,6 +158,54 @@ if(WIN32 AND LEONIDA_BUILD_WINDOWS_RUNTIME)
158 message(FATAL_ERROR "LEONIDA_REQUIRE_XMA2_DECODER is enabled, but the Rust XMA2 decoder is unavailable") 158 message(FATAL_ERROR "LEONIDA_REQUIRE_XMA2_DECODER is enabled, but the Rust XMA2 decoder is unavailable")
159 endif() 159 endif()
160 160
161 # Rust Opus decoder (runtime/opus_decoder), the same pattern as the XMA2 decoder: cargo at
162 # configure time, a prebuilt -DLEONIDA_OPUS_DECODER_LIB, or the silent path in xapu_queue.cpp.
163 option(LEONIDA_REQUIRE_OPUS_DECODER "Fail configure if the Rust Opus decoder is unavailable" OFF)
164 set(LEONIDA_OPUS_DECODER_LIB "" CACHE FILEPATH
165 "Prebuilt leonida_opus_decoder.lib (skips running cargo at configure time)")
166 include("${CMAKE_CURRENT_SOURCE_DIR}/cmake/opus_decoder.cmake")
167 leonida_resolve_prebuilt_opus_decoder("${LEONIDA_OPUS_DECODER_LIB}" "${CMAKE_BINARY_DIR}" _opus_lib_resolved)
168 if(_opus_lib_resolved)
169 message(STATUS "Using prebuilt Rust Opus decoder: ${_opus_lib_resolved}")
170 else()
171 if(NOT LEONIDA_CARGO)
172 find_program(LEONIDA_CARGO cargo)
173 endif()
174 if(LEONIDA_CARGO)
175 set(_opus_target x86_64-pc-windows-msvc)
176 set(_opus_target_dir ${CMAKE_BINARY_DIR}/opus_decoder)
177 set(_opus_lib ${_opus_target_dir}/${_opus_target}/release/leonida_opus_decoder.lib)
178 set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS
179 ${CMAKE_CURRENT_SOURCE_DIR}/opus_decoder/Cargo.toml
180 ${CMAKE_CURRENT_SOURCE_DIR}/opus_decoder/Cargo.lock
181 ${CMAKE_CURRENT_SOURCE_DIR}/opus_decoder/src/lib.rs)
182 execute_process(
183 COMMAND ${LEONIDA_CARGO} build --release --locked --target ${_opus_target}
184 --manifest-path ${CMAKE_CURRENT_SOURCE_DIR}/opus_decoder/Cargo.toml
185 --target-dir ${_opus_target_dir}
186 TIMEOUT 300
187 RESULT_VARIABLE _opus_result)
188 if(_opus_result STREQUAL "0" AND EXISTS "${_opus_lib}")
189 set(_opus_lib_resolved "${_opus_lib}")
190 else()
191 message(WARNING "cargo build of runtime/opus_decoder failed: the XAPU Opus path will be silent")
192 endif()
193 else()
194 message(STATUS "cargo not found: runtime/opus_decoder not built, the XAPU Opus path will be silent")
195 endif()
196 endif()
197 if(_opus_lib_resolved)
198 add_library(leonida_opus_decoder STATIC IMPORTED)
199 set_target_properties(leonida_opus_decoder PROPERTIES
200 IMPORTED_LOCATION "${_opus_lib_resolved}"
201 INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/opus_decoder"
202 INTERFACE_COMPILE_DEFINITIONS LEONIDA_HAVE_OPUS_DECODER=1
203 INTERFACE_LINK_LIBRARIES "kernel32;ntdll;userenv;ws2_32;dbghelp;synchronization")
204 endif()
205 if(LEONIDA_REQUIRE_OPUS_DECODER AND NOT TARGET leonida_opus_decoder)
206 message(FATAL_ERROR "LEONIDA_REQUIRE_OPUS_DECODER is enabled, but the Rust Opus decoder is unavailable")
207 endif()
208
161 find_package(Python3 COMPONENTS Interpreter REQUIRED) 209 find_package(Python3 COMPONENTS Interpreter REQUIRED)
162 set(bcpack_tools "${CMAKE_CURRENT_SOURCE_DIR}/../tools") 210 set(bcpack_tools "${CMAKE_CURRENT_SOURCE_DIR}/../tools")
163 set(bcpack_tables "${CMAKE_CURRENT_BINARY_DIR}/bcpack_tables.inc") 211 set(bcpack_tables "${CMAKE_CURRENT_BINARY_DIR}/bcpack_tables.inc")
@@ -199,6 +247,7 @@ if(WIN32 AND LEONIDA_BUILD_WINDOWS_RUNTIME)
199 shims/com_shim.cpp 247 shims/com_shim.cpp
200 shims/silent_audio.cpp 248 shims/silent_audio.cpp
201 shims/bcrypt_rng.cpp 249 shims/bcrypt_rng.cpp
250 shims/xapu_queue.cpp
202 shims/xapu_chad.cpp 251 shims/xapu_chad.cpp
203 shims/dstorage.cpp 252 shims/dstorage.cpp
204 ) 253 )
@@ -352,6 +401,9 @@ if(WIN32 AND LEONIDA_BUILD_WINDOWS_RUNTIME)
352 target_link_libraries(gta6rt PRIVATE leonida_xma2_decoder) 401 target_link_libraries(gta6rt PRIVATE leonida_xma2_decoder)
353 target_link_libraries(acphal_test PRIVATE leonida_xma2_decoder) 402 target_link_libraries(acphal_test PRIVATE leonida_xma2_decoder)
354 endif() 403 endif()
404 if(TARGET leonida_opus_decoder)
405 target_link_libraries(gta6rt PRIVATE leonida_opus_decoder)
406 endif()
355 407
356 # The Zen 2 instructions a desktop CPU may lack (src/cpu_emulation.h): decoded, emulated on a CONTEXT, and run for 408 # The Zen 2 instructions a desktop CPU may lack (src/cpu_emulation.h): decoded, emulated on a CONTEXT, and run for
357 # real with the #UD handler installed, so an Intel host takes the emulated path and an AMD one the native path. 409 # real with the #UD handler installed, so an Intel host takes the emulated path and an AMD one the native path.
@@ -382,9 +434,11 @@ if(WIN32 AND LEONIDA_BUILD_WINDOWS_RUNTIME)
382 target_link_options(dstorage_test PRIVATE /OPT:NOREF) 434 target_link_options(dstorage_test PRIVATE /OPT:NOREF)
383 target_link_libraries(dstorage_test PRIVATE gta6rt_bcpack psapi) 435 target_link_libraries(dstorage_test PRIVATE gta6rt_bcpack psapi)
384 436
385 # xapu.dll and chad.dll, the APU and audio DSP command queues, resolved through the registry like xmem_test. 437 # xapu.dll and chad.dll, the APU and audio DSP command queues, resolved through the registry like xmem_test; Opus
438 # frame counts from hand-made packets.
386 add_executable(xapu_chad_test 439 add_executable(xapu_chad_test
387 test/xapu_chad_test.cpp 440 test/xapu_chad_test.cpp
441 shims/xapu_queue.cpp
388 shims/xapu_chad.cpp 442 shims/xapu_chad.cpp
389 shims/registry.cpp 443 shims/registry.cpp
390 ) 444 )
@@ -393,6 +447,20 @@ if(WIN32 AND LEONIDA_BUILD_WINDOWS_RUNTIME)
393 target_compile_options(xapu_chad_test PRIVATE /W4 /permissive- /utf-8) 447 target_compile_options(xapu_chad_test PRIVATE /W4 /permissive- /utf-8)
394 target_link_options(xapu_chad_test PRIVATE /OPT:NOREF) 448 target_link_options(xapu_chad_test PRIVATE /OPT:NOREF)
395 449
450 if(TARGET leonida_opus_decoder)
451 # xapu_queue.cpp with the decoder compiled in, against the generated Opus tone.
452 add_executable(xapu_opus_test
453 test/xapu_opus_test.cpp
454 shims/xapu_queue.cpp
455 shims/registry.cpp
456 )
457 target_include_directories(xapu_opus_test PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/shims)
458 target_compile_definitions(xapu_opus_test PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX)
459 target_compile_options(xapu_opus_test PRIVATE /W4 /permissive- /utf-8)
460 target_link_options(xapu_opus_test PRIVATE /OPT:NOREF)
461 target_link_libraries(xapu_opus_test PRIVATE leonida_opus_decoder)
462 endif()
463
396 # The boot stack's earlier xapu.dll and chad.dll shims (shims/xapu.cpp, shims/chad.cpp), which gta6rt no longer 464 # The boot stack's earlier xapu.dll and chad.dll shims (shims/xapu.cpp, shims/chad.cpp), which gta6rt no longer
397 # links (it serves both DLLs from xapu_chad.cpp): their ABI tests stay as tests of those files. 465 # links (it serves both DLLs from xapu_chad.cpp): their ABI tests stay as tests of those files.
398 # xapu shim ABI test: resolves the registered xapu.dll exports through the registry. 466 # xapu shim ABI test: resolves the registered xapu.dll exports through the registry.
@@ -814,6 +882,9 @@ if(BUILD_TESTING)
814 add_executable(pipeline_cache_store_test test/pipeline_cache_store_test.cpp) 882 add_executable(pipeline_cache_store_test test/pipeline_cache_store_test.cpp)
815 add_test(NAME pipeline_cache_store COMMAND pipeline_cache_store_test) 883 add_test(NAME pipeline_cache_store COMMAND pipeline_cache_store_test)
816 884
885 add_executable(heavy_pipeline_cache_test test/heavy_pipeline_cache_test.cpp)
886 add_test(NAME heavy_pipeline_cache COMMAND heavy_pipeline_cache_test)
887
817 # The per-pipeline journal files compute pipelines are kept in: naming, header check, atomic replacement. 888 # The per-pipeline journal files compute pipelines are kept in: naming, header check, atomic replacement.
818 add_executable(pipeline_cache_journal_test test/pipeline_cache_journal_test.cpp) 889 add_executable(pipeline_cache_journal_test test/pipeline_cache_journal_test.cpp)
819 add_test(NAME pipeline_cache_journal COMMAND pipeline_cache_journal_test) 890 add_test(NAME pipeline_cache_journal COMMAND pipeline_cache_journal_test)
@@ -825,6 +896,10 @@ if(BUILD_TESTING)
825 add_test(NAME compile_helper COMMAND compile_helper_test) 896 add_test(NAME compile_helper COMMAND compile_helper_test)
826 endif() 897 endif()
827 898
899 # D24/D16 fragment depth quantisation and bias SPIR-V patcher (runtime/src/depth24_fragment.h): pure stdlib.
900 add_executable(depth24_fragment_test test/depth24_fragment_test.cpp)
901 add_test(NAME depth24_fragment COMMAND depth24_fragment_test)
902
828 add_executable(xdxr_build_output_test test/xdxr_build_output_test.cpp) 903 add_executable(xdxr_build_output_test test/xdxr_build_output_test.cpp)
829 add_test(NAME xdxr_build_output COMMAND xdxr_build_output_test) 904 add_test(NAME xdxr_build_output COMMAND xdxr_build_output_test)
830 905
@@ -1434,6 +1509,8 @@ if(BUILD_TESTING)
1434 # Which SPIR-V modules declare a storage image or buffer they may write (src/spirv_stores.h), on hand-built words. 1509 # Which SPIR-V modules declare a storage image or buffer they may write (src/spirv_stores.h), on hand-built words.
1435 add_executable(spirv_stores_test test/spirv_stores_test.cpp) 1510 add_executable(spirv_stores_test test/spirv_stores_test.cpp)
1436 add_test(NAME spirv_stores COMMAND spirv_stores_test) 1511 add_test(NAME spirv_stores COMMAND spirv_stores_test)
1512 add_executable(list_value_wait_budget_test test/list_value_wait_budget_test.cpp)
1513 add_test(NAME list_value_wait_budget COMMAND list_value_wait_budget_test)
1437 add_executable(shader_fixture_path_test test/shader_fixture_path_test.cpp) 1514 add_executable(shader_fixture_path_test test/shader_fixture_path_test.cpp)
1438 add_test(NAME shader_fixture_path COMMAND shader_fixture_path_test) 1515 add_test(NAME shader_fixture_path COMMAND shader_fixture_path_test)
1439 add_executable(resource_tiling_test test/resource_tiling_test.cpp) 1516 add_executable(resource_tiling_test test/resource_tiling_test.cpp)
@@ -1596,6 +1673,9 @@ if(BUILD_TESTING)
1596 if(WIN32 AND TARGET xapu_chad_test) 1673 if(WIN32 AND TARGET xapu_chad_test)
1597 add_test(NAME xapu_chad COMMAND xapu_chad_test) 1674 add_test(NAME xapu_chad COMMAND xapu_chad_test)
1598 endif() 1675 endif()
1676 if(WIN32 AND TARGET xapu_opus_test)
1677 add_test(NAME xapu_opus COMMAND xapu_opus_test)
1678 endif()
1599 if(WIN32 AND TARGET xapu_test) 1679 if(WIN32 AND TARGET xapu_test)
1600 add_test(NAME xapu COMMAND xapu_test) 1680 add_test(NAME xapu COMMAND xapu_test)
1601 endif() 1681 endif()
@@ -2204,6 +2284,34 @@ if(TARGET Vulkan::Headers)
2204 add_test(NAME vk_null_descriptor COMMAND vk_null_descriptor_test) 2284 add_test(NAME vk_null_descriptor COMMAND vk_null_descriptor_test)
2205 set_tests_properties(vk_null_descriptor PROPERTIES SKIP_RETURN_CODE 77) 2285 set_tests_properties(vk_null_descriptor PROPERTIES SKIP_RETURN_CODE 77)
2206 endif() 2286 endif()
2287 # More than 4096 live 1D, 2D-array and 3D images, each read through its bindless index, in a set sized from the
2288 # device's limits; a full array's refusal reason and indices coming back. The shader is GLSL; without
2289 # glslangValidator the test skips.
2290 add_executable(vk_bindless_dimensions_test test/vk_bindless_dimensions_test.cpp)
2291 target_link_libraries(vk_bindless_dimensions_test PRIVATE Vulkan::Headers ${CMAKE_DL_LIBS})
2292 if(WIN32)
2293 target_compile_definitions(vk_bindless_dimensions_test PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX)
2294 endif()
2295 if(MSVC)
2296 target_compile_options(vk_bindless_dimensions_test PRIVATE /W4 /permissive- /utf-8)
2297 endif()
2298 if(Vulkan_GLSLANG_VALIDATOR_EXECUTABLE)
2299 set(_bindless_dimensions_spv ${CMAKE_CURRENT_BINARY_DIR}/generated/cs_bindless_dimensions.spv)
2300 add_custom_command(OUTPUT ${_bindless_dimensions_spv}
2301 COMMAND ${Vulkan_GLSLANG_VALIDATOR_EXECUTABLE} -V --target-env vulkan1.3 -o ${_bindless_dimensions_spv}
2302 ${CMAKE_CURRENT_SOURCE_DIR}/test/glsl/cs_bindless_dimensions.comp
2303 DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/test/glsl/cs_bindless_dimensions.comp
2304 COMMENT "Compiling the bindless dimensions test shader" VERBATIM)
2305 target_sources(vk_bindless_dimensions_test PRIVATE ${_bindless_dimensions_spv})
2306 target_compile_definitions(vk_bindless_dimensions_test PRIVATE
2307 LEONIDA_TEST_BINDLESS_DIMENSIONS_SPV="${_bindless_dimensions_spv}")
2308 else()
2309 message(STATUS "glslangValidator not found: vk_bindless_dimensions_test skips")
2310 endif()
2311 if(BUILD_TESTING)
2312 add_test(NAME vk_bindless_dimensions COMMAND vk_bindless_dimensions_test)
2313 set_tests_properties(vk_bindless_dimensions PROPERTIES SKIP_RETURN_CODE 77)
2314 endif()
2207 # CPU-only: the bindless set's array sizes from synthetic device limits. 2315 # CPU-only: the bindless set's array sizes from synthetic device limits.
2208 add_executable(bindless_sizing_test test/bindless_sizing_test.cpp) 2316 add_executable(bindless_sizing_test test/bindless_sizing_test.cpp)
2209 target_link_libraries(bindless_sizing_test PRIVATE Vulkan::Headers) 2317 target_link_libraries(bindless_sizing_test PRIVATE Vulkan::Headers)
@@ -3824,6 +3932,19 @@ if(TARGET Vulkan::Headers)
3824 # is written zero-size, and a dispatch through it reads zeros. 3932 # is written zero-size, and a dispatch through it reads zeros.
3825 add_test(NAME d3d12_title_window_cap COMMAND d3d12_title_va_test --window-cap) 3933 add_test(NAME d3d12_title_window_cap COMMAND d3d12_title_va_test --window-cap)
3826 set_tests_properties(d3d12_title_window_cap PROPERTIES SKIP_RETURN_CODE 77 ENVIRONMENT "LEONIDA_TITLE_WINDOWS_MB=0") 3934 set_tests_properties(d3d12_title_window_cap PROPERTIES SKIP_RETURN_CODE 77 ENVIRONMENT "LEONIDA_TITLE_WINDOWS_MB=0")
3935 # A window is a read-side mirror refreshed before every submission: what a shader writes into it goes back to
3936 # the title's pages at the next refresh, and the title's own newer words still win (#1537, WRITE_INVALID).
3937 add_test(NAME d3d12_title_window_write_back COMMAND d3d12_title_va_test --window-writeback)
3938 set_tests_properties(d3d12_title_window_write_back PROPERTIES SKIP_RETURN_CODE 77)
3939 # The same return copy for a slot-133 buffer's shadow (the write-back of a compute result the title reads again).
3940 add_test(NAME d3d12_placed_write_back COMMAND d3d12_title_va_test --placed-writeback)
3941 set_tests_properties(d3d12_placed_write_back PROPERTIES SKIP_RETURN_CODE 77)
3942 # Two shadows over one page share their sums: a newly filled one must still follow the title's bytes, with
3943 # LEONIDA_SHADOW_KEEP on and off (review by lixonik).
3944 add_test(NAME d3d12_shadow_keep_refill COMMAND d3d12_title_va_test --shadow-keep-refill)
3945 set_tests_properties(d3d12_shadow_keep_refill PROPERTIES SKIP_RETURN_CODE 77 ENVIRONMENT "LEONIDA_SHADOW_KEEP=1")
3946 add_test(NAME d3d12_shadow_keep_refill_off COMMAND d3d12_title_va_test --shadow-keep-refill)
3947 set_tests_properties(d3d12_shadow_keep_refill_off PROPERTIES SKIP_RETURN_CODE 77 ENVIRONMENT "LEONIDA_SHADOW_KEEP=0")
3827 add_test(NAME d3d12_api_descriptor_copy COMMAND d3d12_title_va_test --api-descriptor-copy) 3948 add_test(NAME d3d12_api_descriptor_copy COMMAND d3d12_title_va_test --api-descriptor-copy)
3828 set_tests_properties(d3d12_api_descriptor_copy PROPERTIES SKIP_RETURN_CODE 77 ENVIRONMENT "LEONIDA_DESC_MIRROR=1") 3949 set_tests_properties(d3d12_api_descriptor_copy PROPERTIES SKIP_RETURN_CODE 77 ENVIRONMENT "LEONIDA_DESC_MIRROR=1")
3829 add_test(NAME d3d12_api_descriptor_copy_off COMMAND d3d12_title_va_test --api-descriptor-copy-off) 3950 add_test(NAME d3d12_api_descriptor_copy_off COMMAND d3d12_title_va_test --api-descriptor-copy-off)
@@ -4179,6 +4300,11 @@ if(TARGET Vulkan::Headers)
4179 target_compile_options(d3d12_mesh_test PRIVATE /W4 /permissive- /utf-8) 4300 target_compile_options(d3d12_mesh_test PRIVATE /W4 /permissive- /utf-8)
4180 add_test(NAME d3d12_mesh COMMAND d3d12_mesh_test) 4301 add_test(NAME d3d12_mesh COMMAND d3d12_mesh_test)
4181 set_tests_properties(d3d12_mesh PROPERTIES SKIP_RETURN_CODE 77) 4302 set_tests_properties(d3d12_mesh PROPERTIES SKIP_RETURN_CODE 77)
4303 # The same draws through the heavy pipeline cache (src/heavy_pipeline_cache.h): every build first asks the
4304 # offline cache without compiling, and a miss is built against the heavy cache in a folder of its own.
4305 add_test(NAME d3d12_mesh_heavy_cache COMMAND d3d12_mesh_test)
4306 set_tests_properties(d3d12_mesh_heavy_cache PROPERTIES SKIP_RETURN_CODE 77 ENVIRONMENT
4307 "LEONIDA_HEAVY_PIPELINE_CACHE_MS=1;LEONIDA_PIPELINE_CACHE_DIR=${CMAKE_CURRENT_BINARY_DIR}/heavy_cache_test")
4182 else() 4308 else()
4183 message(STATUS "glslangValidator not found: d3d12_compute_test, d3d12_draw_test, d3d12_set0_compute_test and d3d12_mesh_test are not built") 4309 message(STATUS "glslangValidator not found: d3d12_compute_test, d3d12_draw_test, d3d12_set0_compute_test and d3d12_mesh_test are not built")
4184 endif() 4310 endif()
@@ -4269,6 +4395,18 @@ if(TARGET Vulkan::Headers)
4269 target_link_libraries(gta6rt PRIVATE gta6rt_d3d12_com user32) # user32: the PresentX window 4395 target_link_libraries(gta6rt PRIVATE gta6rt_d3d12_com user32) # user32: the PresentX window
4270 target_compile_definitions(gta6rt PRIVATE LEONIDA_VULKAN_DEVICE) 4396 target_compile_definitions(gta6rt PRIVATE LEONIDA_VULKAN_DEVICE)
4271 4397
4398 # gta6rt --precompile-pipelines builds the programs LEONIDA_SKIP_COMPUTE names unless --skip-listed is given,
4399 # and its last line counts both (shims/d3d12_precompile.h). Two synthetic compute modules, three runs.
4400 if(TARGET gta6rt_compute_journal_shader)
4401 add_dependencies(gta6rt gta6rt_indirect_count_shader gta6rt_compute_journal_shader)
4402 add_test(NAME precompile_skip_list COMMAND ${CMAKE_COMMAND}
4403 "-DGTA6RT=$<TARGET_FILE:gta6rt>" "-DRUNNER=${CMAKE_CROSSCOMPILING_EMULATOR}"
4404 "-DSPV_A=${_indirect_count_spv}" "-DSPV_B=${_journal_second_spv}"
4405 "-DTEST_DIR=${CMAKE_CURRENT_BINARY_DIR}/precompile_skip_list"
4406 -P "${CMAKE_CURRENT_SOURCE_DIR}/test/check_precompile_skip_list.cmake")
4407 set_tests_properties(precompile_skip_list PROPERTIES TIMEOUT 240 SKIP_REGULAR_EXPRESSION "SKIP: ")
4408 endif()
4409
4272 # A stand-in title that imports d3d12_xs.dll!D3D12XboxCreateDevice and runs a clear and a readback on the 4410 # A stand-in title that imports d3d12_xs.dll!D3D12XboxCreateDevice and runs a clear and a readback on the
4273 # device it gets, mapped and run by `gta6rt --run` with LEONIDA_D3D12=vulkan: the loader, the game thread, the 4411 # device it gets, mapped and run by `gta6rt --run` with LEONIDA_D3D12=vulkan: the loader, the game thread, the
4274 # proxies and the Vulkan device in one process. check_tiny_frame.py reads the verdict, the binding and the 4412 # proxies and the Vulkan device in one process. check_tiny_frame.py reads the verdict, the binding and the
@@ -4579,17 +4717,35 @@ if(TARGET Vulkan::Headers)
4579 target_compile_options(arena_blocks_test PRIVATE /W4 /permissive- /utf-8) 4717 target_compile_options(arena_blocks_test PRIVATE /W4 /permissive- /utf-8)
4580 endif() 4718 endif()
4581 add_test(NAME arena_blocks COMMAND arena_blocks_test) 4719 add_test(NAME arena_blocks COMMAND arena_blocks_test)
4720 # The mem probe's breakdown line: the tally by consumer, the owner scopes and the text (src/memory_breakdown.h).
4721 add_executable(memory_breakdown_test test/memory_breakdown_test.cpp)
4722 if(WIN32 AND MSVC)
4723 target_compile_options(memory_breakdown_test PRIVATE /W4 /permissive- /utf-8)
4724 endif()
4725 add_test(NAME memory_breakdown COMMAND memory_breakdown_test)
4726 # The address guard's page table (src/address_guard.h; docs/d3d12_vulkan.md, "Address guard").
4727 add_executable(address_guard_test test/address_guard_test.cpp)
4728 if(WIN32 AND MSVC)
4729 target_compile_options(address_guard_test PRIVATE /W4 /permissive- /utf-8)
4730 endif()
4731 add_test(NAME address_guard COMMAND address_guard_test)
4582 add_executable(title_window_plan_bounds_test test/title_window_plan_bounds_test.cpp) 4732 add_executable(title_window_plan_bounds_test test/title_window_plan_bounds_test.cpp)
4583 if(WIN32 AND MSVC) 4733 if(WIN32 AND MSVC)
4584 target_compile_options(title_window_plan_bounds_test PRIVATE /W4 /permissive- /utf-8) 4734 target_compile_options(title_window_plan_bounds_test PRIVATE /W4 /permissive- /utf-8)
4585 endif() 4735 endif()
4586 add_test(NAME title_window_plan_bounds COMMAND title_window_plan_bounds_test) 4736 add_test(NAME title_window_plan_bounds COMMAND title_window_plan_bounds_test)
4587 # Host-RAM bitset of live console resource-heap V# slots (src/console_heap_vsharp_slots.h). 4737 # What each console resource-heap V# resolved to, and the slots a change touches (src/console_heap_slot_records.h).
4588 add_executable(console_heap_vsharp_slots_test test/console_heap_vsharp_slots_test.cpp) 4738 add_executable(console_heap_slot_records_test test/console_heap_slot_records_test.cpp)
4739 if(WIN32 AND MSVC)
4740 target_compile_options(console_heap_slot_records_test PRIVATE /W4 /permissive- /utf-8)
4741 endif()
4742 add_test(NAME console_heap_slot_records COMMAND console_heap_slot_records_test)
4743 # A slot-133 shadow keeps a GPU write until the title's bytes under it change (src/shadow_keep.h).
4744 add_executable(shadow_keep_test test/shadow_keep_test.cpp)
4589 if(WIN32 AND MSVC) 4745 if(WIN32 AND MSVC)
4590 target_compile_options(console_heap_vsharp_slots_test PRIVATE /W4 /permissive- /utf-8) 4746 target_compile_options(shadow_keep_test PRIVATE /W4 /permissive- /utf-8)
4591 endif() 4747 endif()
4592 add_test(NAME console_heap_vsharp_slots COMMAND console_heap_vsharp_slots_test) 4748 add_test(NAME shadow_keep COMMAND shadow_keep_test)
4593 # Queue construction cleans its Vulkan handles if holder registration runs out of host memory. 4749 # Queue construction cleans its Vulkan handles if holder registration runs out of host memory.
4594 add_executable(vk_host_texture_order_test test/vk_host_texture_order_test.cpp) 4750 add_executable(vk_host_texture_order_test test/vk_host_texture_order_test.cpp)
4595 target_link_libraries(vk_host_texture_order_test PRIVATE Vulkan::Headers ${CMAKE_DL_LIBS}) 4751 target_link_libraries(vk_host_texture_order_test PRIVATE Vulkan::Headers ${CMAKE_DL_LIBS})
diff --git a/runtime/README.md b/runtime/README.md
index 28304408f..b440230c8 100644
--- a/runtime/README.md
+++ b/runtime/README.md
@@ -353,10 +353,12 @@ ones marked *diagnostic* only add log lines or exist to compare a run with and w
353| `LEONIDA_POOL_DIAG_AT` | unset | *Diagnostic.* `<module>+0x<offset>` of the title's transient-pool assert, as the trace prints it (measured locally): the trace dumps the pool's resource list when that int3 is hit (`shims/startup_trace.h`). | 353| `LEONIDA_POOL_DIAG_AT` | unset | *Diagnostic.* `<module>+0x<offset>` of the title's transient-pool assert, as the trace prints it (measured locally): the trace dumps the pool's resource list when that int3 is hit (`shims/startup_trace.h`). |
354| `LEONIDA_PEEK` | unset | *Diagnostic.* `<rva>[:n],<rva>,...` (hex): a thread prints the 8-byte values at these RVAs of the title's image (`:n` = n consecutive values) every `LEONIDA_PEEK_SECONDS` (`src/main.cpp`). The RVAs are measured locally and not kept in the repository. `scripts/windows-boot/boot.ps1` no longer sets the game-state and session-state RVAs by default: it sets `LEONIDA_PEEK` only from `LEONIDA_GAME_STATE_RVA` and `LEONIDA_SESSION_STATE_RVA`, and without them its RESULT states read `?` ([scripts/windows-boot/README.md](../scripts/windows-boot/README.md)). | 354| `LEONIDA_PEEK` | unset | *Diagnostic.* `<rva>[:n],<rva>,...` (hex): a thread prints the 8-byte values at these RVAs of the title's image (`:n` = n consecutive values) every `LEONIDA_PEEK_SECONDS` (`src/main.cpp`). The RVAs are measured locally and not kept in the repository. `scripts/windows-boot/boot.ps1` no longer sets the game-state and session-state RVAs by default: it sets `LEONIDA_PEEK` only from `LEONIDA_GAME_STATE_RVA` and `LEONIDA_SESSION_STATE_RVA`, and without them its RESULT states read `?` ([scripts/windows-boot/README.md](../scripts/windows-boot/README.md)). |
355| `LEONIDA_PEEK_SECONDS` | `10` | *Diagnostic.* The period of the `LEONIDA_PEEK` thread (`src/main.cpp`), which prints 8-byte values of the title's image. | 355| `LEONIDA_PEEK_SECONDS` | `10` | *Diagnostic.* The period of the `LEONIDA_PEEK` thread (`src/main.cpp`), which prints 8-byte values of the title's image. |
356| `LEONIDA_INPUT_SCRIPT` | unset | Timed pad presses, `button@seconds` separated by commas (`a@70,a@85,start@120`), each held 300 ms; the clock starts with the shim. Works with and without SDL3: with SDL3 it drives the keyboard pad (`LEONIDA_KEYBOARD_PAD=always`), without SDL3 one scripted pad that is the only device. Controllers and the keyboard pad still need SDL3. Format and buttons in [docs/gameinput.md](../docs/gameinput.md#environment-variables). | 356| `LEONIDA_INPUT_SCRIPT` | unset | Timed pad presses, `button@seconds` separated by commas (`a@70,a@85,start@120`), each held 300 ms or its own `button@seconds:hold`; the clock starts with the shim. Works with and without SDL3: with SDL3 it drives the keyboard pad (`LEONIDA_KEYBOARD_PAD=always`), without SDL3 one scripted pad that is the only device. Controllers and the keyboard pad still need SDL3. Format and buttons in [docs/gameinput.md](../docs/gameinput.md#environment-variables). |
357| `LEONIDA_INPUT_LOG` | on | The GameInput shim logs every press in `LEONIDA_INPUT_SCRIPT`'s form (`name@seconds`), so a session played by hand can be replayed. `0` turns the lines off. | 357| `LEONIDA_INPUT_LOG` | on | The GameInput shim logs every press in `LEONIDA_INPUT_SCRIPT`'s form (`name@seconds`), so a session played by hand can be replayed. `0` turns the lines off. |
358| `LEONIDA_INPUT_TRACE` | unset | `1` (diagnostic, the GameInput shim built without SDL3) logs the title's reading calls on the scripted pad: the first 128, then each one with a button down and every 1000th. Details in [docs/gameinput.md](../docs/gameinput.md#scripted-input-without-sdl3). |
358| `LEONIDA_LOG_ALLOCINFO` | unset | *Diagnostic.* `1` logs every device slot 25 call (`GetResourceAllocationInfo`) with its thread, description and sizes (`shims/d3d12_xs_device.cpp`). | 359| `LEONIDA_LOG_ALLOCINFO` | unset | *Diagnostic.* `1` logs every device slot 25 call (`GetResourceAllocationInfo`) with its thread, description and sizes (`shims/d3d12_xs_device.cpp`). |
359| `LEONIDA_LOG_EXE_PIPELINES` | unset | *Diagnostic.* When set, one line per distinct graphics pipeline that uses a program translated from the executable's inline containers. | 360| `LEONIDA_LOG_EXE_PIPELINES` | unset | *Diagnostic.* When set, one line per distinct graphics pipeline that uses a program translated from the executable's inline containers. |
361| `LEONIDA_MEM_PROBE` | unset | *Diagnostic.* `<seconds>`: every that many seconds the memory probe (`src/mem_probe.h`) logs `[rt] mem-probe t=` (live pipelines, shader modules and `VkDeviceMemory` per memory type), `[rt] mem-probe breakdown t=` (the same allocated bytes by consumer: the arena with its reserved, bound and in-use MiB, geometry copies, title windows and shadows, upload heaps, staging, texture blocks, sampled textures, render targets and depth, and `other`, which add up to the allocated total; `src/memory_breakdown.h`) and `[rt] mem-probe smaps` (the process's resident memory by kind). |
360| `LEONIDA_MEM_PROBE_CACHE` | unset | *Diagnostic.* `1` adds the pipeline cache's size to the memory probe's report; the driver serializes the whole cache to answer. | 362| `LEONIDA_MEM_PROBE_CACHE` | unset | *Diagnostic.* `1` adds the pipeline cache's size to the memory probe's report; the driver serializes the whole cache to answer. |
361| `LEONIDA_TEXTURE_PROBE` | unset | *Diagnostic.* Logs a `[rt] texture-probe` line for every shader resource view of a texture in the title's memory. | 363| `LEONIDA_TEXTURE_PROBE` | unset | *Diagnostic.* Logs a `[rt] texture-probe` line for every shader resource view of a texture in the title's memory. |
362| `LEONIDA_LOCAL_DIAGNOSTICS` | unset | *Diagnostic.* `1` turns on the boot diagnostics that write to stderr from the draw, clear, present and descriptor paths (the lines tagged `present-probe`, `fsdraw`, `heap-probe`, `desc-probe` and `PresentX diag`; `src/local_diagnostics.h`). They follow a frame of the title from its draws to the window and cost a lock and a line per draw, so they are off by default. The full-screen draw targets that `LEONIDA_CAPTURE_SOURCE` reads back are only collected with it. | 364| `LEONIDA_LOCAL_DIAGNOSTICS` | unset | *Diagnostic.* `1` turns on the boot diagnostics that write to stderr from the draw, clear, present and descriptor paths (the lines tagged `present-probe`, `fsdraw`, `heap-probe`, `desc-probe` and `PresentX diag`; `src/local_diagnostics.h`). They follow a frame of the title from its draws to the window and cost a lock and a line per draw, so they are off by default. The full-screen draw targets that `LEONIDA_CAPTURE_SOURCE` reads back are only collected with it. |
@@ -379,9 +381,11 @@ ones marked *diagnostic* only add log lines or exist to compare a run with and w
379| `LEONIDA_CONSOLE_FIX_US` | `0` | Microseconds one submission may spend fixing the changed slots of a console descriptor heap's copy; `0` sets no limit. Past it, each further changed slot is written as a null descriptor and queued for `LEONIDA_CONSOLE_RETRY_US`, so a shader reads it as empty until its turn comes: a limit changes results, and can hang the GPU. | 381| `LEONIDA_CONSOLE_FIX_US` | `0` | Microseconds one submission may spend fixing the changed slots of a console descriptor heap's copy; `0` sets no limit. Past it, each further changed slot is written as a null descriptor and queued for `LEONIDA_CONSOLE_RETRY_US`, so a shader reads it as empty until its turn comes: a limit changes results, and can hang the GPU. |
380| `LEONIDA_CONSOLE_RETRY_US` | `500` | Microseconds one submission may spend retrying, round robin, the console heap slots not settled yet (a T# whose texture does not exist yet, or one deferred by `LEONIDA_CONSOLE_FIX_US`). `0` retries all of them at every submission. | 382| `LEONIDA_CONSOLE_RETRY_US` | `500` | Microseconds one submission may spend retrying, round robin, the console heap slots not settled yet (a T# whose texture does not exist yet, or one deferred by `LEONIDA_CONSOLE_FIX_US`). `0` retries all of them at every submission. |
381| `LEONIDA_SHADOW_ALIAS_MS` | `0` | The shortest time, in milliseconds, between two copies of the title-memory pages that XMem maps at two addresses into the slot-133 shadows and title windows: pages a write reached since they were guarded at every address, or every time while they can't be (a page pinned for a kernel write). `0` copies them at every submission; a larger value lets a GPU read of them be up to that many milliseconds behind the title's writes. | 383| `LEONIDA_SHADOW_ALIAS_MS` | `0` | The shortest time, in milliseconds, between two copies of the title-memory pages that XMem maps at two addresses into the slot-133 shadows and title windows: pages a write reached since they were guarded at every address, or every time while they can't be (a page pinned for a kernel write). `0` copies them at every submission; a larger value lets a GPU read of them be up to that many milliseconds behind the title's writes. |
384| `LEONIDA_SHADOW_KEEP` | on | The slot-133 shadows and title windows copy a page only in the 256-byte pieces where the title's bytes changed since the last copy, so what a shader stored in the copy stays, also on pages copied without a sign that the title wrote them (aliased while they can't be guarded at every address, unguarded, pinned). A title writing the same bytes again to reset such a value is not seen. `0` copies those pages whole, as before, overwriting the GPU's writes. |
382| `LEONIDA_REFRESH_PER_FRAME` | `0` | Trades correctness for speed. `1`: the slot-133 shadows, title windows and geometry copies are brought up to date only by the first submission after each present, not by every submission; `2`: the console descriptor heaps too. A GPU read of them can then be a frame behind the title's writes (wrong pixels). `0` refreshes all of them at every submission. | 385| `LEONIDA_REFRESH_PER_FRAME` | `0` | Trades correctness for speed. `1`: the slot-133 shadows, title windows and geometry copies are brought up to date only by the first submission after each present, not by every submission; `2`: the console descriptor heaps too. A GPU read of them can then be a frame behind the title's writes (wrong pixels). `0` refreshes all of them at every submission. |
383| `LEONIDA_GEOMETRY_ASYNC` | unset | Trades correctness for speed. `1` refreshes the geometry copies (`shims/d3d12_geometry_views.h`) on a worker thread of the layer, started at submission and not waited for, instead of on the title's submitting thread. A draw may read a copy the worker is still writing: wrong vertices for a frame. | 386| `LEONIDA_GEOMETRY_ASYNC` | unset | Trades correctness for speed. `1` refreshes the geometry copies (`shims/d3d12_geometry_views.h`) on a worker thread of the layer, started at submission and not waited for, instead of on the title's submitting thread. A draw may read a copy the worker is still writing: wrong vertices for a frame. |
384| `LEONIDA_GEOMETRY_WHOLE_VIEWS` | unset | A geometry copy that is already filled copies only the 64 KiB tiles of title memory written since the last refresh (`shims/d3d12_geometry_views.h`). Any value other than `0` copies every view over a written tile whole, as before. | 387| `LEONIDA_GEOMETRY_WHOLE_VIEWS` | unset | A geometry copy that is already filled copies only the 64 KiB tiles of title memory written since the last refresh (`shims/d3d12_geometry_views.h`). Any value other than `0` copies every view over a written tile whole, as before. |
388| `LEONIDA_GEOMETRY_HOST` | unset | Where the geometry copies (`shims/d3d12_geometry_views.h`, under `LEONIDA_GEOMETRY_MB`) live. Unset or `0`: device-local memory through the BAR while the driver gives it (several GB of VRAM in a world run). `1`: system memory outside VRAM, write-back where the device offers a cached host type; `2`: system memory, write-combined. The GPU then reads every vertex and index of a copy over the bus, which can cost frame time in geometry-heavy passes. A device whose host-visible memory is all device-local (an integrated GPU) keeps its types. The choice is logged once and in the `geometry buffers` line. |
385| `LEONIDA_TITLE_FILL_ASYNC` | unset | Trades correctness for speed. `1` stops device slot 70 views from hashing and filling the texture they name on the title's thread: a texture never filled or known stale is queued for a worker thread that fills one texture at a time. Until then a shader samples the image as it is, empty or a frame behind. | 389| `LEONIDA_TITLE_FILL_ASYNC` | unset | Trades correctness for speed. `1` stops device slot 70 views from hashing and filling the texture they name on the title's thread: a texture never filled or known stale is queued for a worker thread that fills one texture at a time. Until then a shader samples the image as it is, empty or a frame behind. |
386| `LEONIDA_TITLE_VIEW_REFRESH_MS` | `0` | The shortest time, in milliseconds, between two checks of a title texture's bytes when a device slot 70 view of it is written. `0` checks at every view. The periodic pass still checks the texture on its own period, and a texture known stale is checked at once. Has no effect with `LEONIDA_TITLE_FILL_ASYNC=1`. | 390| `LEONIDA_TITLE_VIEW_REFRESH_MS` | `0` | The shortest time, in milliseconds, between two checks of a title texture's bytes when a device slot 70 view of it is written. `0` checks at every view. The periodic pass still checks the texture on its own period, and a texture known stale is checked at once. Has no effect with `LEONIDA_TITLE_FILL_ASYNC=1`. |
387| `LEONIDA_TITLE_EVERY_BUDGET_US` | `0` | Microseconds one pass over the textures filled from the title's memory may spend on the textures it visits every pass (mapped by the title, or known stale), resuming where the last pass stopped; the texture that crosses the limit is finished. A mapped texture never filled yet is visited first whatever the limit. `0` visits all of them every pass. It limits the synchronous pass only: with `LEONIDA_TEXTURE_REFRESH_ASYNC=1` the pass runs on the refresh worker, and the limit does not apply. | 391| `LEONIDA_TITLE_EVERY_BUDGET_US` | `0` | Microseconds one pass over the textures filled from the title's memory may spend on the textures it visits every pass (mapped by the title, or known stale), resuming where the last pass stopped; the texture that crosses the limit is finished. A mapped texture never filled yet is visited first whatever the limit. `0` visits all of them every pass. It limits the synchronous pass only: with `LEONIDA_TEXTURE_REFRESH_ASYNC=1` the pass runs on the refresh worker, and the limit does not apply. |
@@ -422,8 +426,7 @@ ones marked *diagnostic* only add log lines or exist to compare a run with and w
422| `LEONIDA_CONSOLE_HEAP_ARENA` | unset | With `LEONIDA_CONSOLE_HEAP_GPU=1`, `1` puts a console heap's GPU copy and its guard in the arena (device-local where the device has ReBAR) instead of an import of host memory. No room in the arena: the import. | 426| `LEONIDA_CONSOLE_HEAP_ARENA` | unset | With `LEONIDA_CONSOLE_HEAP_GPU=1`, `1` puts a console heap's GPU copy and its guard in the arena (device-local where the device has ReBAR) instead of an import of host memory. No room in the arena: the import. |
423| `LEONIDA_CONSOLE_GPU_TSHARPS` | on | With `LEONIDA_CONSOLE_HEAP_GPU=1`, the T#s of changed slots are registered by the resolver thread and the refresh only decodes them. `0` registers them on the submitting thread, under the fix budget. | 427| `LEONIDA_CONSOLE_GPU_TSHARPS` | on | With `LEONIDA_CONSOLE_HEAP_GPU=1`, the T#s of changed slots are registered by the resolver thread and the refresh only decodes them. `0` registers them on the submitting thread, under the fix budget. |
424| `LEONIDA_CONSOLE_GPU_RETRY_MS` | `2000` | With `LEONIDA_CONSOLE_HEAP_GPU=1`, how often V# words that got no backing are asked for again, on a timer that bounds the cost per submission. | 428| `LEONIDA_CONSOLE_GPU_RETRY_MS` | `2000` | With `LEONIDA_CONSOLE_HEAP_GPU=1`, how often V# words that got no backing are asked for again, on a timer that bounds the cost per submission. |
425| `LEONIDA_CONSOLE_GPU_FILTER` | `LEONIDA_CONSOLE_RELEASE_FILTER`'s value | With `LEONIDA_CONSOLE_HEAP_GPU=1`, `1`: a released backing, an alias range that went or a word answered since asks for a rescan of only the slots it touches, not of every V# slot. Overflows and key resets still rescan everything. | 429| `LEONIDA_CONSOLE_GPU_FILTER` | unset | With `LEONIDA_CONSOLE_HEAP_GPU=1`, `1`: a released backing, an alias range that went or a word answered since asks for a rescan of only the slots it touches, not of every V# slot. Overflows and key resets still rescan everything. |
426| `LEONIDA_CONSOLE_RELEASE_FILTER` | unset | `1`: when a backing is released, only the console-heap slots whose V#s point into it are fixed again (by actual Vulkan address), instead of every V# slot of the heap. The heap log line counts the sweeps, live slots, fixes and full fallbacks. |
427| `LEONIDA_SHADOW_GPU` | unset | `1`: aliased pages of the slot-133 shadows are copied on the GPU at the start of a submission, from an import of the mapped title section (`VK_EXT_external_memory_host`, per 2 MiB window, kept while xmem's map journal shows no change over it). Destinations outside the arena and pages that do not import are copied by the CPU as before. | 430| `LEONIDA_SHADOW_GPU` | unset | `1`: aliased pages of the slot-133 shadows are copied on the GPU at the start of a submission, from an import of the mapped title section (`VK_EXT_external_memory_host`, per 2 MiB window, kept while xmem's map journal shows no change over it). Destinations outside the arena and pages that do not import are copied by the CPU as before. |
428| `LEONIDA_SHADOW_GPU_MB` | `1024` | With `LEONIDA_SHADOW_GPU=1`, the MiB of title memory imported for those copies at most. | 431| `LEONIDA_SHADOW_GPU_MB` | `1024` | With `LEONIDA_SHADOW_GPU=1`, the MiB of title memory imported for those copies at most. |
429| `LEONIDA_SHADOW_JOIN` | unset | `1`: pieces of one shadow copy job that continue where the one before ended, in the pages and in the copy, are one copy (one GPU region); one the GPU refuses is copied by the CPU whole. | 432| `LEONIDA_SHADOW_JOIN` | unset | `1`: pieces of one shadow copy job that continue where the one before ended, in the pages and in the copy, are one copy (one GPU region); one the GPU refuses is copied by the CPU whole. |
@@ -580,9 +583,14 @@ The game's `atexit` handlers and static destructors go to a table of the run's o
580shared with gta6rt): `exit` and a return from `main` run them newest first before the run ends, `_cexit` runs them and 583shared with gta6rt): `exit` and a return from `main` run them newest first before the run ends, `_cexit` runs them and
581returns, and `_exit`, `quick_exit`, `ExitProcess` and `abort` skip them, as natively. `run_tiny_atexit` runs a stand-in 584returns, and `_exit`, `quick_exit`, `ExitProcess` and `abort` skip them, as natively. `run_tiny_atexit` runs a stand-in
582program natively and through `--run` for each of those paths (and for `_exit` from a second thread during `exit`) and 585program natively and through `--run` for each of those paths (and for `_exit` from a second thread during `exit`) and
583holds both to the Windows sequence (under Wine, whose CRT differs, a native difference is only reported). Not covered 586holds both to the Windows sequence (under Wine, whose CRT differs, a native difference is only reported). The
584yet: `at_quick_exit` handlers (`quick_exit` runs none) and the thread-local destructor callback 587executable's thread-local destructor callback (`_register_thread_local_exe_atexit_callback`) is kept by the run too:
585(`_register_thread_local_exe_atexit_callback`); both still reach the host CRT. 588the host UCRT accepts one per process and fast-fails the second, and gta6rt's own startup registers the first. `exit`
589and `_cexit` call it once, as `(nullptr, DLL_PROCESS_DETACH, nullptr)`, before the atexit handlers, as the UCRT does,
590so the leaving thread's `thread_local` objects end before the static ones; `_exit`, `quick_exit`, `ExitProcess` and
591`abort` do not. Other threads' `thread_local` objects end through the loader's thread-detach notification, which calls
592the same function from the executable's TLS directory. `run_tiny_atexit` covers `exit` and `_cexit` with a
593`thread_local` object. `at_quick_exit` handlers are not covered (`quick_exit` runs none).
586`run_tiny_frame` does it with a stand-in that imports `d3d12_xs.dll!D3D12XboxCreateDevice` and, with 594`run_tiny_frame` does it with a stand-in that imports `d3d12_xs.dll!D3D12XboxCreateDevice` and, with
587`LEONIDA_D3D12=vulkan`, clears a render target and reads it back on the Vulkan device: the loader, the game thread, 595`LEONIDA_D3D12=vulkan`, clears a render target and reads it back on the Vulkan device: the loader, the game thread,
588the Xbox-ABI proxies and the device in one process (`test/fixtures/tiny_frame.cpp`; `test/check_tiny_frame.py` checks 596the Xbox-ABI proxies and the device in one process (`test/fixtures/tiny_frame.cpp`; `test/check_tiny_frame.py` checks
diff --git a/runtime/cmake/opus_decoder.cmake b/runtime/cmake/opus_decoder.cmake
new file mode 100644
index 000000000..1286b15fa
--- /dev/null
+++ b/runtime/cmake/opus_decoder.cmake
@@ -0,0 +1,23 @@
1# Resolves -DLEONIDA_OPUS_DECODER_LIB=<path> for runtime/CMakeLists.txt.
2#
3# When LEONIDA_OPUS_DECODER_LIB is set, the runtime links that prebuilt static library directly and
4# skips running cargo at configure time. A value that does not name an existing file is a configure
5# error rather than a silent fallback to silent XAPU output.
6function(leonida_resolve_prebuilt_opus_decoder lib_input base_dir out_var)
7 if(NOT lib_input)
8 set(${out_var} "" PARENT_SCOPE)
9 return()
10 endif()
11 if(IS_ABSOLUTE "${lib_input}")
12 set(_resolved "${lib_input}")
13 else()
14 cmake_path(ABSOLUTE_PATH lib_input BASE_DIRECTORY "${base_dir}" NORMALIZE OUTPUT_VARIABLE _resolved)
15 endif()
16 if(EXISTS "${_resolved}" AND NOT IS_DIRECTORY "${_resolved}")
17 set(${out_var} "${_resolved}" PARENT_SCOPE)
18 else()
19 message(FATAL_ERROR
20 "LEONIDA_OPUS_DECODER_LIB does not point to an existing file: ${_resolved} "
21 "(pass the path to leonida_opus_decoder.lib or leave it empty to build with cargo)")
22 endif()
23endfunction()
diff --git a/runtime/opus_decoder/Cargo.lock b/runtime/opus_decoder/Cargo.lock
new file mode 100644
index 000000000..1659ab14e
--- /dev/null
+++ b/runtime/opus_decoder/Cargo.lock
@@ -0,0 +1,16 @@
1# This file is automatically @generated by Cargo.
2# It is not intended for manual editing.
3version = 4
4
5[[package]]
6name = "leonida-opus-decoder"
7version = "0.1.0"
8dependencies = [
9 "opus-pure",
10]
11
12[[package]]
13name = "opus-pure"
14version = "0.2.5"
15source = "registry+https://github.com/rust-lang/crates.io-index"
16checksum = "2da6dcc20af557d030b6f206e75c764bcda8c28a5bd03c73935c7e8fcf5f4f4a"
diff --git a/runtime/opus_decoder/Cargo.toml b/runtime/opus_decoder/Cargo.toml
new file mode 100644
index 000000000..e3ed59bc3
--- /dev/null
+++ b/runtime/opus_decoder/Cargo.toml
@@ -0,0 +1,16 @@
1[package]
2name = "leonida-opus-decoder"
3version = "0.1.0"
4edition = "2021"
5license = "GPL-3.0-or-later"
6publish = false
7
8[lib]
9name = "leonida_opus_decoder"
10crate-type = ["staticlib", "rlib"]
11
12[dependencies]
13opus-pure = "0.2.4"
14
15[profile.release]
16panic = "unwind"
diff --git a/runtime/opus_decoder/README.md b/runtime/opus_decoder/README.md
new file mode 100644
index 000000000..2b516e496
--- /dev/null
+++ b/runtime/opus_decoder/README.md
@@ -0,0 +1,33 @@
1# Opus decoder C ABI
2
3This crate exposes a C ABI around the BSD-3-Clause `opus-pure` package for the console audio
4decoder (`xapu.dll`). The command protocol lives in `runtime/shims/xapu_chad.cpp`; this crate only
5decodes one Opus packet into interleaved f32 PCM, resets the decoder, and (for tests) encodes a
6synthetic tone.
7
8## Build
9
10```sh
11cargo fmt --manifest-path runtime/opus_decoder/Cargo.toml -- --check
12cargo test --manifest-path runtime/opus_decoder/Cargo.toml --locked
13cargo build --release --manifest-path runtime/opus_decoder/Cargo.toml --locked
14```
15
16`runtime/CMakeLists.txt` builds this crate for `x86_64-pc-windows-msvc` at configure time when
17`cargo` is on `PATH` and links it into `gta6rt` and `xapu_chad_test` with
18`LEONIDA_HAVE_OPUS_DECODER` defined. The first build fetches `opus-pure` from crates.io. Set
19`CARGO_NET_OFFLINE=true` for a configure that uses only the local Cargo cache.
20
21Without `cargo`, when the build fails, or with the `cl.exe` fallback of `scripts/build_runtime.ps1`,
22the XAPU path stays silent. Use `-DLEONIDA_REQUIRE_OPUS_DECODER=ON` to require the decoder in a
23CMake build.
24
25To link an already-built `leonida_opus_decoder.lib` without invoking `cargo` during CMake
26configure, pass `-DLEONIDA_OPUS_DECODER_LIB=<path>`.
27
28## Facts and credit
29
30The `xapu.dll` command protocol (connect input/output, per-stream command budget, activate /
31process / reset / deactivate, result order) follows Marvisak/VIctory
32`crates/victory-hle/src/modules/apu.rs` (GPL-3.0-or-later), which this repository already credits for
33other modules. `opus-pure` is BSD-3-Clause and stays a dependency; no code from it is copied.
diff --git a/runtime/opus_decoder/leonida_opus_decoder.h b/runtime/opus_decoder/leonida_opus_decoder.h
new file mode 100644
index 000000000..d5473510d
--- /dev/null
+++ b/runtime/opus_decoder/leonida_opus_decoder.h
@@ -0,0 +1,44 @@
1#ifndef LEONIDA_OPUS_DECODER_H
2#define LEONIDA_OPUS_DECODER_H
3
4#include <stddef.h>
5#include <stdint.h>
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10
11/* 120 ms at 48 kHz: the longest Opus packet, in samples per channel. */
12#define LEONIDA_OPUS_MAX_FRAMES 5760u
13
14typedef struct LeonidaOpusDecoder LeonidaOpusDecoder;
15
16enum LeonidaOpusStatus {
17 LEONIDA_OPUS_OK = 0,
18 LEONIDA_OPUS_INVALID_ARGUMENT = 1,
19 LEONIDA_OPUS_INVALID_FORMAT = 2,
20 LEONIDA_OPUS_DECODER_FAILURE = 3,
21 LEONIDA_OPUS_OUT_OF_MEMORY = 4,
22 LEONIDA_OPUS_PANIC = 5,
23 LEONIDA_OPUS_BUFFER_TOO_SMALL = 6,
24};
25
26int32_t leonida_opus_decoder_create(uint32_t sample_rate, uint32_t channels,
27 LeonidaOpusDecoder **out_decoder);
28uint32_t leonida_opus_decoder_channels(const LeonidaOpusDecoder *decoder);
29int32_t leonida_opus_decode_packet(LeonidaOpusDecoder *decoder,
30 const uint8_t *input, size_t input_len,
31 float *out, size_t out_capacity_frames,
32 uint32_t *out_frames);
33int32_t leonida_opus_decoder_reset(LeonidaOpusDecoder *decoder);
34void leonida_opus_decoder_destroy(LeonidaOpusDecoder *decoder);
35/* Test helper: encodes frame_count interleaved f32 frames to one packet at 48 kHz. */
36int32_t leonida_opus_encode_test(const float *input, uint32_t frame_count,
37 uint32_t channels, uint8_t *out,
38 size_t out_capacity, size_t *out_len);
39
40#ifdef __cplusplus
41}
42#endif
43
44#endif
diff --git a/runtime/opus_decoder/src/lib.rs b/runtime/opus_decoder/src/lib.rs
new file mode 100644
index 000000000..1e6c7dc83
--- /dev/null
+++ b/runtime/opus_decoder/src/lib.rs
@@ -0,0 +1,244 @@
1#![deny(unsafe_op_in_unsafe_fn)]
2
3//! C ABI around the pure-Rust `opus-pure` decoder, for the console audio decoder (`xapu.dll`).
4//!
5//! The command protocol lives in `runtime/shims/xapu_chad.cpp`; this crate only turns one Opus
6//! packet into interleaved f32 PCM, resets the decoder, and (for tests) encodes a synthetic tone.
7//! `opus-pure` is BSD-3-Clause; this wrapper is GPL-3.0-or-later, like the rest of the runtime.
8
9use std::panic::{catch_unwind, AssertUnwindSafe};
10use std::ptr;
11use std::sync::Mutex;
12
13use opus_pure::{Application, OpusDecoder, OpusEncoder};
14
15pub const LEONIDA_OPUS_OK: i32 = 0;
16pub const LEONIDA_OPUS_INVALID_ARGUMENT: i32 = 1;
17pub const LEONIDA_OPUS_INVALID_FORMAT: i32 = 2;
18pub const LEONIDA_OPUS_DECODER_FAILURE: i32 = 3;
19pub const LEONIDA_OPUS_OUT_OF_MEMORY: i32 = 4;
20pub const LEONIDA_OPUS_PANIC: i32 = 5;
21pub const LEONIDA_OPUS_BUFFER_TOO_SMALL: i32 = 6;
22
23/// 120 ms at 48 kHz, the longest Opus packet, in samples per channel.
24pub const LEONIDA_OPUS_MAX_FRAMES: usize = 5760;
25
26#[repr(C)]
27pub struct LeonidaOpusDecoder {
28 decoder: Mutex<OpusDecoder>,
29 channels: usize,
30}
31
32#[no_mangle]
33pub unsafe extern "C" fn leonida_opus_decoder_channels(decoder: *const LeonidaOpusDecoder) -> u32 {
34 if decoder.is_null() {
35 return 0;
36 }
37 unsafe { (*decoder).channels as u32 }
38}
39
40/// Creates a decoder for one mono or stereo Opus stream at `sample_rate` (the title uses 48000).
41///
42/// # Safety
43/// `out` must be writable for one pointer. The returned decoder must be destroyed once, after
44/// every call that uses it has finished.
45#[no_mangle]
46pub unsafe extern "C" fn leonida_opus_decoder_create(
47 sample_rate: u32,
48 channels: u32,
49 out: *mut *mut LeonidaOpusDecoder,
50) -> i32 {
51 if out.is_null() {
52 return LEONIDA_OPUS_INVALID_ARGUMENT;
53 }
54 unsafe { *out = ptr::null_mut() };
55 if sample_rate == 0 || sample_rate > i32::MAX as u32 || !(1..=2).contains(&channels) {
56 return LEONIDA_OPUS_INVALID_FORMAT;
57 }
58 match catch_unwind(AssertUnwindSafe(|| {
59 OpusDecoder::new(sample_rate as i32, channels as usize).map(|decoder| {
60 Box::new(LeonidaOpusDecoder {
61 decoder: Mutex::new(decoder),
62 channels: channels as usize,
63 })
64 })
65 })) {
66 Ok(Ok(decoder)) => {
67 unsafe { *out = Box::into_raw(decoder) };
68 LEONIDA_OPUS_OK
69 }
70 Ok(Err(_)) => LEONIDA_OPUS_INVALID_FORMAT,
71 Err(_) => LEONIDA_OPUS_PANIC,
72 }
73}
74
75/// Decodes one Opus packet into `out` as interleaved f32 frames.
76///
77/// # Safety
78/// `decoder` must come from `leonida_opus_decoder_create`. `input` must reference `input_len`
79/// readable bytes; `out` must hold `out_capacity_frames * channels` floats; `out_frames` must be
80/// writable. Do not destroy the decoder concurrently with this call.
81#[no_mangle]
82pub unsafe extern "C" fn leonida_opus_decode_packet(
83 decoder: *mut LeonidaOpusDecoder,
84 input: *const u8,
85 input_len: usize,
86 out: *mut f32,
87 out_capacity_frames: usize,
88 out_frames: *mut u32,
89) -> i32 {
90 if decoder.is_null()
91 || input.is_null()
92 || input_len == 0
93 || out.is_null()
94 || out_frames.is_null()
95 {
96 return LEONIDA_OPUS_INVALID_ARGUMENT;
97 }
98 let decoder = unsafe { &*decoder };
99 let channels = decoder.channels;
100 let Ok(mut guard) = decoder.decoder.lock() else {
101 return LEONIDA_OPUS_DECODER_FAILURE;
102 };
103 let packet = unsafe { std::slice::from_raw_parts(input, input_len) };
104 let mut pcm = vec![0f32; LEONIDA_OPUS_MAX_FRAMES * channels];
105 match guard.decode(packet, LEONIDA_OPUS_MAX_FRAMES, &mut pcm) {
106 Ok(frames) => {
107 if frames > out_capacity_frames {
108 return LEONIDA_OPUS_BUFFER_TOO_SMALL;
109 }
110 let samples = frames * channels;
111 unsafe {
112 ptr::copy_nonoverlapping(pcm.as_ptr(), out, samples);
113 *out_frames = frames as u32;
114 }
115 LEONIDA_OPUS_OK
116 }
117 Err(_) => LEONIDA_OPUS_DECODER_FAILURE,
118 }
119}
120
121/// # Safety
122/// `decoder` must come from `leonida_opus_decoder_create` and not be used concurrently.
123#[no_mangle]
124pub unsafe extern "C" fn leonida_opus_decoder_reset(decoder: *mut LeonidaOpusDecoder) -> i32 {
125 if decoder.is_null() {
126 return LEONIDA_OPUS_INVALID_ARGUMENT;
127 }
128 let decoder = unsafe { &*decoder };
129 let Ok(mut guard) = decoder.decoder.lock() else {
130 return LEONIDA_OPUS_DECODER_FAILURE;
131 };
132 let _ = guard.reset_state();
133 LEONIDA_OPUS_OK
134}
135
136/// # Safety
137/// `decoder` must be a live handle and must not be used after this call.
138#[no_mangle]
139pub unsafe extern "C" fn leonida_opus_decoder_destroy(decoder: *mut LeonidaOpusDecoder) {
140 if !decoder.is_null() {
141 unsafe { drop(Box::from_raw(decoder)) };
142 }
143}
144
145/// Test helper: encodes `frame_count` interleaved f32 frames to one Opus packet at 48 kHz.
146///
147/// # Safety
148/// `input` must hold `frame_count * channels` floats; `out` must hold `out_capacity` bytes;
149/// `out_len` must be writable.
150#[no_mangle]
151pub unsafe extern "C" fn leonida_opus_encode_test(
152 input: *const f32,
153 frame_count: u32,
154 channels: u32,
155 out: *mut u8,
156 out_capacity: usize,
157 out_len: *mut usize,
158) -> i32 {
159 if input.is_null()
160 || out.is_null()
161 || out_len.is_null()
162 || frame_count == 0
163 || !(1..=2).contains(&channels)
164 {
165 return LEONIDA_OPUS_INVALID_ARGUMENT;
166 }
167 let samples = frame_count as usize * channels as usize;
168 let input = unsafe { std::slice::from_raw_parts(input, samples) };
169 let mut encoder = match OpusEncoder::new(48_000, channels as usize, Application::Audio) {
170 Ok(encoder) => encoder,
171 Err(_) => return LEONIDA_OPUS_INVALID_FORMAT,
172 };
173 let mut packet = vec![0u8; out_capacity.max(4000)];
174 match encoder.encode(input, frame_count as usize, &mut packet) {
175 Ok(bytes) if bytes <= out_capacity => {
176 unsafe {
177 ptr::copy_nonoverlapping(packet.as_ptr(), out, bytes);
178 *out_len = bytes;
179 }
180 LEONIDA_OPUS_OK
181 }
182 Ok(_) => LEONIDA_OPUS_BUFFER_TOO_SMALL,
183 Err(_) => LEONIDA_OPUS_DECODER_FAILURE,
184 }
185}
186
187#[cfg(test)]
188mod tests {
189 use super::*;
190
191 #[test]
192 fn encodes_and_decodes_a_tone() {
193 const FRAMES: u32 = 960;
194 const CHANNELS: u32 = 2;
195 let mut tone = Vec::with_capacity((FRAMES * CHANNELS) as usize);
196 for i in 0..FRAMES {
197 let sample = ((i as f32) * 440.0 * std::f32::consts::TAU / 48_000.0).sin() * 0.5;
198 tone.push(sample);
199 tone.push(sample);
200 }
201 let mut packet = [0u8; 1500];
202 let mut packet_len = 0usize;
203 // SAFETY: the buffers are owned by this test.
204 let encoded = unsafe {
205 leonida_opus_encode_test(
206 tone.as_ptr(),
207 FRAMES,
208 CHANNELS,
209 packet.as_mut_ptr(),
210 packet.len(),
211 &mut packet_len,
212 )
213 };
214 assert_eq!(encoded, LEONIDA_OPUS_OK);
215 assert!(packet_len > 0);
216
217 let mut decoder = ptr::null_mut();
218 // SAFETY: `decoder` is writable for one pointer.
219 assert_eq!(
220 unsafe { leonida_opus_decoder_create(48_000, CHANNELS, &mut decoder) },
221 LEONIDA_OPUS_OK
222 );
223 let mut pcm = vec![0f32; LEONIDA_OPUS_MAX_FRAMES * CHANNELS as usize];
224 let mut frames = 0u32;
225 // SAFETY: the packet and PCM buffers are owned by this test.
226 let decoded = unsafe {
227 leonida_opus_decode_packet(
228 decoder,
229 packet.as_ptr(),
230 packet_len,
231 pcm.as_mut_ptr(),
232 LEONIDA_OPUS_MAX_FRAMES,
233 &mut frames,
234 )
235 };
236 assert_eq!(decoded, LEONIDA_OPUS_OK);
237 assert_eq!(frames, FRAMES);
238 let energy: f32 =
239 pcm[..(frames * CHANNELS) as usize].iter().map(|s| s * s).sum::<f32>() / (frames * CHANNELS) as f32;
240 assert!(energy > 0.01, "decoded a tone, energy {energy}");
241 // SAFETY: created above, destroyed once.
242 unsafe { leonida_opus_decoder_destroy(decoder) };
243 }
244}
diff --git a/runtime/shims/d3d12_com.h b/runtime/shims/d3d12_com.h
index ca2b02789..3bad0b767 100644
--- a/runtime/shims/d3d12_com.h
+++ b/runtime/shims/d3d12_com.h
@@ -169,6 +169,9 @@ struct VulkanDeviceInfo {
169 bool occlusion_query_precise = false; 169 bool occlusion_query_precise = false;
170 bool prepare_on_bind = false; 170 bool prepare_on_bind = false;
171 bool cold_graphics_compile = false; // Driver supports a cache-only create and reports when compilation is pending. 171 bool cold_graphics_compile = false; // Driver supports a cache-only create and reports when compilation is pending.
172 // pipelineCreationCacheControl is on for the heavy pipeline cache (src/heavy_pipeline_cache.h): a pipeline the
173 // offline cache does not have is created against the cache of pipeline_cache.heavy.bin, written back as it grows.
174 bool heavy_pipeline_cache = false;
172 bool pipeline_statistics_query = false; 175 bool pipeline_statistics_query = false;
173 bool presentation = false; // VK_KHR_surface + VK_KHR_win32_surface on the instance, VK_KHR_swapchain on the device 176 bool presentation = false; // VK_KHR_surface + VK_KHR_win32_surface on the instance, VK_KHR_swapchain on the device
174 // VK_KHR_swapchain_maintenance1 (or VK_EXT_swapchain_maintenance1) and its swapchainMaintenance1 feature are 177 // VK_KHR_swapchain_maintenance1 (or VK_EXT_swapchain_maintenance1) and its swapchainMaintenance1 feature are
diff --git a/runtime/shims/d3d12_geometry_views.h b/runtime/shims/d3d12_geometry_views.h
index feb4ff52e..02f9590ba 100644
--- a/runtime/shims/d3d12_geometry_views.h
+++ b/runtime/shims/d3d12_geometry_views.h
@@ -1,6 +1,7 @@
1#pragma once 1#pragma once
2 2
3#include "d3d12_title_buffer_windows.h" 3#include "d3d12_title_buffer_windows.h"
4#include "../src/memory_breakdown.h"
4#include "../src/title_geometry_watch.h" 5#include "../src/title_geometry_watch.h"
5#include <atomic> 6#include <atomic>
6#include <chrono> 7#include <chrono>
@@ -9,13 +10,14 @@
9#include <mutex> 10#include <mutex>
10#include <set> 11#include <set>
11#include <shared_mutex> 12#include <shared_mutex>
13#include <type_traits>
12#include <unordered_map> 14#include <unordered_map>
13#include <utility> 15#include <utility>
14#include <vector> 16#include <vector>
15 17
16namespace rt::d3d12 { 18namespace rt::d3d12 {
17 19
18// One persistent device-local copy for each geometry extent. The console heap retains its original indices. 20// One persistent copy for each geometry extent, in device-local memory (or system memory: LEONIDA_GEOMETRY_HOST). The console heap retains its original indices.
19// Every CPU mapping of a source tile is watched; a physical remap changes which aliases must be watched. 21// Every CPU mapping of a source tile is watched; a physical remap changes which aliases must be watched.
20// Views whose title range is released are retired immediately and their backing storage is reclaimed once 22// Views whose title range is released are retired immediately and their backing storage is reclaimed once
21// in-flight GPU submissions up to their retire ticket have completed; previously cap-refused ranges retry 23// in-flight GPU submissions up to their retire ticket have completed; previously cap-refused ranges retry
@@ -30,6 +32,7 @@ class GeometryViews {
30 struct NoopRetire { 32 struct NoopRetire {
31 void operator()(Address, std::size_t, VkDeviceSize) const noexcept {} 33 void operator()(Address, std::size_t, VkDeviceSize) const noexcept {}
32 }; 34 };
35 struct NoCopy {};
33 struct View { 36 struct View {
34 Address source{}; 37 Address source{};
35 std::size_t size{}; 38 std::size_t size{};
@@ -121,7 +124,7 @@ class GeometryViews {
121 std::atomic<std::uint64_t> free_generation_{0}; 124 std::atomic<std::uint64_t> free_generation_{0};
122 std::uint64_t serial_{}, bytes_{}, cap_refusals_{}, allocation_failures_{}, ready_{}, uploads_{}, uploaded_{}; 125 std::uint64_t serial_{}, bytes_{}, cap_refusals_{}, allocation_failures_{}, ready_{}, uploads_{}, uploaded_{};
123 std::uint64_t submissions_{}, dirty_refreshes_{}, refilled_{}, tile_fills_{}; 126 std::uint64_t submissions_{}, dirty_refreshes_{}, refilled_{}, tile_fills_{};
124 std::uint64_t evicted_{}, reaped_{}, retries_succeeded_{}; 127 std::uint64_t evicted_{}, reaped_{}, retries_succeeded_{}, final_copies_{};
125 std::unordered_map<Address, std::size_t> tile_reads_; // refresh(): offset in tile_scratch_, SIZE_MAX unreadable 128 std::unordered_map<Address, std::size_t> tile_reads_; // refresh(): offset in tile_scratch_, SIZE_MAX unreadable
126 // refresh() scratch: per view, whether it waits on a tile (pinned), is filled whole, was touched, was counted; 129 // refresh() scratch: per view, whether it waits on a tile (pinned), is filled whole, was touched, was counted;
127 // and the tiles found written, in address order. 130 // and the tiles found written, in address order.
@@ -213,6 +216,7 @@ class GeometryViews {
213 216
214public: 217public:
215 explicit GeometryViews(std::uint64_t cap_override = 0) : cap_override_(cap_override) { 218 explicit GeometryViews(std::uint64_t cap_override = 0) : cap_override_(cap_override) {
219 pool_.set_system_memory(system_memory_setting());
216 leonida::geometry_writes::subscribe(releases_); 220 leonida::geometry_writes::subscribe(releases_);
217 } 221 }
218 ~GeometryViews() { leonida::geometry_writes::unsubscribe(releases_); } 222 ~GeometryViews() { leonida::geometry_writes::unsubscribe(releases_); }
@@ -231,6 +235,16 @@ public:
231 235
232 std::uint64_t effective_cap() const { return cap_override_ ? cap_override_ : cap(); } 236 std::uint64_t effective_cap() const { return cap_override_ ? cap_override_ : cap(); }
233 237
238 // LEONIDA_GEOMETRY_HOST: where the copies live. Unset or 0: device-local memory (the BAR) while the driver gives it;
239 // 1: system memory, write-back (cached) where the device offers it; 2: system memory, write-combined. The GPU then
240 // reads the copies over the bus (VRAM saved, each read of a vertex or index slower).
241 static int system_memory_setting() {
242 const char* v = std::getenv("LEONIDA_GEOMETRY_HOST");
243 if (!v || !*v || *v == '0') return TitleBufferWindows::kDeviceLocal;
244 return *v == '2' ? TitleBufferWindows::kSystemUncached : TitleBufferWindows::kSystemCached;
245 }
246 int system_memory() const { return pool_.system_memory(); }
247
234 bool has_released() const { return leonida::geometry_writes::has_released(releases_); } 248 bool has_released() const { return leonida::geometry_writes::has_released(releases_); }
235 bool has_retired() const { return retired_count_.load(std::memory_order_acquire) != 0; } 249 bool has_retired() const { return retired_count_.load(std::memory_order_acquire) != 0; }
236 bool has_pending_reclaim() const { return has_released() || has_retired(); } 250 bool has_pending_reclaim() const { return has_released() || has_retired(); }
@@ -258,6 +272,10 @@ public:
258 std::lock_guard lock(mutex_); 272 std::lock_guard lock(mutex_);
259 return evicted_; 273 return evicted_;
260 } 274 }
275 std::uint64_t final_copies() const {
276 std::lock_guard lock(mutex_);
277 return final_copies_;
278 }
261 std::uint64_t reaped() const { 279 std::uint64_t reaped() const {
262 std::lock_guard lock(mutex_); 280 std::lock_guard lock(mutex_);
263 return reaped_; 281 return reaped_;
@@ -301,6 +319,7 @@ public:
301 VkDeviceSize va{}; 319 VkDeviceSize va{};
302 bool at_cap = false; 320 bool at_cap = false;
303 const bool over_bytes = bytes_ >= limit || bytes > limit - bytes_; 321 const bool over_bytes = bytes_ >= limit || bytes > limit - bytes_;
322 leonida::memory_breakdown::Owner owner(leonida::memory_breakdown::Consumer::geometry);
304 if (over_bytes || !pool_.allocate(device, bytes, va, mapped, true, limit, &at_cap)) { 323 if (over_bytes || !pool_.allocate(device, bytes, va, mapped, true, limit, &at_cap)) {
305 if (at_cap || over_bytes) { 324 if (at_cap || over_bytes) {
306 refused_[key] = gen; 325 refused_[key] = gen;
@@ -393,9 +412,14 @@ public:
393 // Retires every live view overlapping [begin, end), unlinking it from lookup/refresh/watch immediately and 412 // Retires every live view overlapping [begin, end), unlinking it from lookup/refresh/watch immediately and
394 // deferring its backing storage reclamation until GPU submissions through `retire_ticket` have completed 413 // deferring its backing storage reclamation until GPU submissions through `retire_ticket` have completed
395 // (kAfterExecutes: through the submissions of every replay in progress now, see execute_end). 414 // (kAfterExecutes: through the submissions of every replay in progress now, see execute_end).
396 template<class OnRetire = NoopRetire> 415 // With `final_copy` (a refresh's copy), a ready view whose title range is readable now is copied from it once more
416 // before it leaves the refresh: a released range that is still readable (a heap block freed in memory that stays
417 // committed) may hold new bytes, and a list recorded before the release that runs in a submission the view waits
418 // for reads those, as it would have read them in the console's memory. Decommitted or unmapped memory is not
419 // readable, so such a view keeps what it held.
420 template<class OnRetire = NoopRetire, class Copy = NoCopy>
397 std::size_t retire_range(Address begin, Address end, std::uint64_t retire_ticket = 0, 421 std::size_t retire_range(Address begin, Address end, std::uint64_t retire_ticket = 0,
398 OnRetire&& on_retire = {}) { 422 OnRetire&& on_retire = {}, Copy&& final_copy = {}) {
399 if (end <= begin) return 0; 423 if (end <= begin) return 0;
400 struct CallbackItem { 424 struct CallbackItem {
401 Address source; 425 Address source;
@@ -425,6 +449,13 @@ public:
425 const std::size_t first_retired = retired_.size(); 449 const std::size_t first_retired = retired_.size();
426 for (const auto id : ids) { 450 for (const auto id : ids) {
427 View& v = views_[id]; 451 View& v = views_[id];
452 if constexpr (!std::is_same_v<std::decay_t<Copy>, NoCopy>) {
453 if (v.ready && final_copy(v.dst, reinterpret_cast<const std::uint8_t*>(v.source), v.size) ==
454 GeometryCopy::copied) {
455 ++final_copies_;
456 uploaded_ += v.size;
457 }
458 }
428 detach_tiles_locked(id, v.source, v.size); 459 detach_tiles_locked(id, v.source, v.size);
429 if (v.ready) { 460 if (v.ready) {
430 --ready_; 461 --ready_;
@@ -495,21 +526,21 @@ public:
495 return freed; 526 return freed;
496 } 527 }
497 528
498 // Drains released title ranges recorded by xmem (retiring matching views at `retire_ticket`) and reaps retired 529 // Drains released title ranges recorded by xmem (retiring matching views at `retire_ticket`, with `final_copy` as
499 // views whose GPU work completed by `completed_ticket`. 530 // retire_range takes it) and reaps retired views whose GPU work completed by `completed_ticket`.
500 template<class Device, class OnRetire = NoopRetire> 531 template<class Device, class OnRetire = NoopRetire, class Copy = NoCopy>
501 void drain_released(Device& device, std::uint64_t retire_ticket, std::uint64_t completed_ticket, 532 void drain_released(Device& device, std::uint64_t retire_ticket, std::uint64_t completed_ticket,
502 OnRetire&& on_retire = {}) { 533 OnRetire&& on_retire = {}, Copy&& final_copy = {}) {
503 std::vector<std::pair<Address, Address>> ranges; 534 std::vector<std::pair<Address, Address>> ranges;
504 leonida::geometry_writes::take_released(releases_, ranges); 535 leonida::geometry_writes::take_released(releases_, ranges);
505 for (const auto& [begin, end] : ranges) { 536 for (const auto& [begin, end] : ranges) {
506 retire_range(begin, end, retire_ticket, on_retire); 537 retire_range(begin, end, retire_ticket, on_retire, final_copy);
507 leonida::title_gpu_views::Range pair{}; 538 leonida::title_gpu_views::Range pair{};
508 if (end > begin && leonida::title_gpu_views::view_at(begin, 1, pair) && 539 if (end > begin && leonida::title_gpu_views::view_at(begin, 1, pair) &&
509 begin >= pair.gpu && begin - pair.gpu < pair.size) { 540 begin >= pair.gpu && begin - pair.gpu < pair.size) {
510 const Address offset = begin - pair.gpu; 541 const Address offset = begin - pair.gpu;
511 const Address span = (std::min)(end - begin, pair.size - offset); 542 const Address span = (std::min)(end - begin, pair.size - offset);
512 retire_range(pair.cpu + offset, pair.cpu + offset + span, retire_ticket, on_retire); 543 retire_range(pair.cpu + offset, pair.cpu + offset + span, retire_ticket, on_retire, final_copy);
513 } 544 }
514 } 545 }
515 reap(device, completed_ticket); 546 reap(device, completed_ticket);
@@ -666,14 +697,17 @@ public:
666 if (!effective_cap()) return; 697 if (!effective_cap()) return;
667 std::lock_guard lock(mutex_); 698 std::lock_guard lock(mutex_);
668 std::fprintf(stderr, "[rt] geometry buffers: seen %zu, backed %zu (%llu bytes), populated %llu, cap %llu MiB, " 699 std::fprintf(stderr, "[rt] geometry buffers: seen %zu, backed %zu (%llu bytes), populated %llu, cap %llu MiB, "
669 "cap refused %llu, retried ok %llu, evicted %llu (reaped %llu, retired %zu), " 700 "cap refused %llu, retried ok %llu, evicted %llu (reaped %llu, retired %zu, copied at "
670 "allocation failures %llu, uploads %llu (%llu bytes), watched tiles %zu, reserved %llu bytes\n", 701 "retirement %llu), allocation failures %llu, uploads %llu (%llu bytes), watched tiles %zu, "
702 "reserved %llu bytes (%s)\n",
671 keys_.size() + refused_.size(), live_views_, (unsigned long long)bytes_, (unsigned long long)ready_, 703 keys_.size() + refused_.size(), live_views_, (unsigned long long)bytes_, (unsigned long long)ready_,
672 (unsigned long long)(effective_cap() >> 20), (unsigned long long)cap_refusals_, 704 (unsigned long long)(effective_cap() >> 20), (unsigned long long)cap_refusals_,
673 (unsigned long long)retries_succeeded_, (unsigned long long)evicted_, 705 (unsigned long long)retries_succeeded_, (unsigned long long)evicted_,
674 (unsigned long long)reaped_, retired_.size(), (unsigned long long)allocation_failures_, 706 (unsigned long long)reaped_, retired_.size(), (unsigned long long)final_copies_,
707 (unsigned long long)allocation_failures_,
675 (unsigned long long)uploads_, (unsigned long long)uploaded_, tiles_.size(), 708 (unsigned long long)uploads_, (unsigned long long)uploaded_, tiles_.size(),
676 static_cast<unsigned long long>(pool_.reserved())); 709 static_cast<unsigned long long>(pool_.reserved()),
710 pool_.system_memory() ? "system memory" : "device-local");
677 std::fprintf(stderr, "[rt] geometry refresh: %llu/%llu submissions uploaded dirty views, %llu bytes (%llu views by " 711 std::fprintf(stderr, "[rt] geometry refresh: %llu/%llu submissions uploaded dirty views, %llu bytes (%llu views by "
678 "their written tiles only); %.3f s checking and refreshing sources, %llu bytes cleared\n", 712 "their written tiles only); %.3f s checking and refreshing sources, %llu bytes cleared\n",
679 static_cast<unsigned long long>(dirty_refreshes_), static_cast<unsigned long long>(submissions_), 713 static_cast<unsigned long long>(dirty_refreshes_), static_cast<unsigned long long>(submissions_),
diff --git a/runtime/shims/d3d12_precompile.h b/runtime/shims/d3d12_precompile.h
index 447c4db4e..ca96bb764 100644
--- a/runtime/shims/d3d12_precompile.h
+++ b/runtime/shims/d3d12_precompile.h
@@ -8,6 +8,11 @@
8// (src/pipeline_cache_journal.h) under the name the game looks it up by, and in the driver's own disk cache, which 8// (src/pipeline_cache_journal.h) under the name the game looks it up by, and in the driver's own disk cache, which
9// NVIDIA keys by the executable's name. Entries whose journal file is there are skipped, so a run can be stopped at 9// NVIDIA keys by the executable's name. Entries whose journal file is there are skipped, so a run can be stopped at
10// any time and started again. 10// any time and started again.
11//
12// LEONIDA_SKIP_COMPUTE (the play-time list of compute programs whose dispatches are dropped) does not narrow the
13// build: a player runs this with the game's environment, and a program kept out of the journal here would stay out
14// after the list is shortened. --skip-listed leaves the listed entries out on purpose. The last line counts what was
15// built, what was journaled already and what was left out, and why.
11#pragma once 16#pragma once
12 17
13#include <cstddef> 18#include <cstddef>
@@ -25,6 +30,7 @@ struct PrecompileOptions {
25 std::size_t limit = 0; // at most this many entries (0: all) 30 std::size_t limit = 0; // at most this many entries (0: all)
26 std::size_t min_bytes = 0, max_bytes = 0; // SPIR-V size bounds (0: none) 31 std::size_t min_bytes = 0, max_bytes = 0; // SPIR-V size bounds (0: none)
27 std::vector<std::string> filters; // only entries whose name contains one of these 32 std::vector<std::string> filters; // only entries whose name contains one of these
33 bool skip_listed = false; // --skip-listed: leave out the entries LEONIDA_SKIP_COMPUTE names
28 bool dry_run = false; // --list: print the plan, build nothing 34 bool dry_run = false; // --list: print the plan, build nothing
29 bool via_helper = false; // --via-helper: as a title does with LEONIDA_COMPILE_HELPER=1 (a test) 35 bool via_helper = false; // --via-helper: as a title does with LEONIDA_COMPILE_HELPER=1 (a test)
30}; 36};
diff --git a/runtime/shims/d3d12_title_buffer_windows.h b/runtime/shims/d3d12_title_buffer_windows.h
index 06927cb4b..c85809e8e 100644
--- a/runtime/shims/d3d12_title_buffer_windows.h
+++ b/runtime/shims/d3d12_title_buffer_windows.h
@@ -38,6 +38,10 @@ class TitleBufferWindows {
38 std::chrono::steady_clock::time_point failed_at_{}; 38 std::chrono::steady_clock::time_point failed_at_{};
39 bool failed_ = false; 39 bool failed_ = false;
40 bool local_refused_ = false; // device-local blocks refused once: host memory from then on 40 bool local_refused_ = false; // device-local blocks refused once: host memory from then on
41 // SystemMemory: where a device_local allocation goes instead (set_system_memory; GeometryViews from
42 // LEONIDA_GEOMETRY_HOST).
43 int system_memory_ = 0;
44 bool system_memory_logged_ = false;
41 std::uint64_t quick_refusals_ = 0; 45 std::uint64_t quick_refusals_ = 0;
42 // The blocks' (device address, capacity), readable without the owner's lock: published in order, a slot never 46 // The blocks' (device address, capacity), readable without the owner's lock: published in order, a slot never
43 // reused before release(). A destroyed block's slot keeps its other fields and only its address goes to 0 (the 47 // reused before release(). A destroyed block's slot keeps its other fields and only its address goes to 0 (the
@@ -73,7 +77,38 @@ class TitleBufferWindows {
73 blocks_.erase(it); 77 blocks_.erase(it);
74 } 78 }
75 79
80 // The memory types a system-memory block may take: host-visible ones outside device-local memory (the GPU reads
81 // them over the bus), the write-back (cached) ones only when `cached`, else the write-combined ones only. None of
82 // them: every type `bits` allows (an integrated GPU, whose memory is all device-local).
83 template<class Device>
84 static std::uint32_t system_memory_types(const Device& d, std::uint32_t bits, bool cached) {
85 if constexpr (requires { d.memory.memoryTypes[0].propertyFlags; d.memory.memoryTypeCount; }) {
86 std::uint32_t host = 0, wanted = 0;
87 for (std::uint32_t i = 0; i < d.memory.memoryTypeCount && i < 32; ++i) {
88 if (!(bits & (1u << i))) continue;
89 const VkMemoryPropertyFlags f = d.memory.memoryTypes[i].propertyFlags;
90 if ((f & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) || !(f & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) ||
91 !(f & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT))
92 continue;
93 host |= 1u << i;
94 if (bool(f & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) == cached) wanted |= 1u << i;
95 }
96 return wanted ? wanted : host ? host : bits;
97 } else {
98 (void)d;
99 (void)cached;
100 return bits;
101 }
102 }
103
76public: 104public:
105 // Where blocks asked for as device_local go: kDeviceLocal (Resizable BAR while the driver gives it, the default),
106 // kSystemCached (host memory outside VRAM, write-back where the device offers it: what VIctory gives its copies
107 // of title memory) or kSystemUncached (host memory outside VRAM, write-combined). The GPU reads the system-memory
108 // kinds over the bus. Set before the first allocation.
109 static constexpr int kDeviceLocal = 0, kSystemCached = 1, kSystemUncached = 2;
110 void set_system_memory(int kind) { system_memory_ = kind; }
111 int system_memory() const { return system_memory_; }
77 VkDeviceSize reserved() const { return reserved_; } 112 VkDeviceSize reserved() const { return reserved_; }
78 // f(device address, capacity) for each live block; from any thread. 113 // f(device address, capacity) for each live block; from any thread.
79 template <class F> 114 template <class F>
@@ -186,10 +221,26 @@ public:
186 // story load the driver refused every 4 MiB device-local, host-visible block with a device address 221 // story load the driver refused every 4 MiB device-local, host-visible block with a device address
187 // (VK_ERROR_OUT_OF_HOST_MEMORY, speed-8/-9) while host memory still served: once that happens, later blocks 222 // (VK_ERROR_OUT_OF_HOST_MEMORY, speed-8/-9) while host memory still served: once that happens, later blocks
188 // go straight to host memory instead of through DeviceState::allocate's sleeping retries first. 223 // go straight to host memory instead of through DeviceState::allocate's sleeping retries first.
224 // A device_local request under set_system_memory takes system memory instead, out of the types that are not
225 // device-local (memory_type_order would otherwise give the first host-visible type, which can be the BAR).
189 VkMemoryPropertyFlags chosen = 0; 226 VkMemoryPropertyFlags chosen = 0;
190 const bool want_local = device_local && !local_refused_; 227 const bool system = device_local && system_memory_ != kDeviceLocal;
191 b.memory = d.allocate(req, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, 228 const bool want_local = device_local && !local_refused_ && !system;
192 want_local ? VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT : 0, &chosen, true); 229 VkMemoryRequirements types = req;
230 if (system) types.memoryTypeBits = system_memory_types(d, req.memoryTypeBits, system_memory_ == kSystemCached);
231 b.memory = d.allocate(types, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
232 want_local ? VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT
233 : system && system_memory_ == kSystemCached ? VK_MEMORY_PROPERTY_HOST_CACHED_BIT
234 : 0,
235 &chosen, true);
236 if (b.memory && system && !system_memory_logged_) {
237 system_memory_logged_ = true;
238 std::fprintf(stderr, "[rt] d3d12: title buffer copies in system memory (LEONIDA_GEOMETRY_HOST): memory "
239 "flags 0x%x (%s, %s)\n",
240 unsigned(chosen),
241 (chosen & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) ? "device-local: no other type" : "not VRAM",
242 (chosen & VK_MEMORY_PROPERTY_HOST_CACHED_BIT) ? "write-back" : "write-combined");
243 }
193 if (b.memory && want_local && !(chosen & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)) { 244 if (b.memory && want_local && !(chosen & VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT)) {
194 local_refused_ = true; 245 local_refused_ = true;
195 std::fprintf(stderr, "[rt] d3d12: title buffer windows: device-local memory refused a %llu KiB block; " 246 std::fprintf(stderr, "[rt] d3d12: title buffer windows: device-local memory refused a %llu KiB block; "
diff --git a/runtime/shims/d3d12_vulkan_device.cpp b/runtime/shims/d3d12_vulkan_device.cpp
index ca25ccc9e..f2fa3a45c 100644
--- a/runtime/shims/d3d12_vulkan_device.cpp
+++ b/runtime/shims/d3d12_vulkan_device.cpp
@@ -32,6 +32,7 @@
32#include "dxgi_com.h" 32#include "dxgi_com.h"
33#include "../src/arena_size.h" 33#include "../src/arena_size.h"
34#include "../src/value_write_sink.h" 34#include "../src/value_write_sink.h"
35#include "../src/address_guard.h"
35#include "../src/arena_blocks.h" 36#include "../src/arena_blocks.h"
36#include "../src/gfx10_descriptors.h" 37#include "../src/gfx10_descriptors.h"
37#include "../src/depth24_fragment.h" 38#include "../src/depth24_fragment.h"
@@ -47,6 +48,7 @@
47#include "../src/pipeline_cache_file.h" 48#include "../src/pipeline_cache_file.h"
48#include "../src/pipeline_profile.h" 49#include "../src/pipeline_profile.h"
49#include "../src/submit_phases.h" 50#include "../src/submit_phases.h"
51#include "../src/heavy_pipeline_cache.h"
50#include "../src/pipeline_cache_store.h" 52#include "../src/pipeline_cache_store.h"
51#include "../src/pipeline_cache_journal.h" 53#include "../src/pipeline_cache_journal.h"
52#include "../src/large_module_gate.h" 54#include "../src/large_module_gate.h"
@@ -55,6 +57,7 @@
55#include "../src/resource_detile.h" 57#include "../src/resource_detile.h"
56#include "../src/console_texture_layout.h" 58#include "../src/console_texture_layout.h"
57#include "../src/shader_library.h" 59#include "../src/shader_library.h"
60#include "../src/shadow_keep.h"
58#include "../src/dstorage_trace.h" 61#include "../src/dstorage_trace.h"
59#include "../src/title_page_watch.h" 62#include "../src/title_page_watch.h"
60#include "../src/guarded_copy.h" 63#include "../src/guarded_copy.h"
@@ -65,7 +68,7 @@
65#include "../src/spirv_f16_halves.h" 68#include "../src/spirv_f16_halves.h"
66#include "../src/spirv_stores.h" 69#include "../src/spirv_stores.h"
67#include "../src/title_va_alias.h" 70#include "../src/title_va_alias.h"
68#include "../src/console_heap_vsharp_slots.h" 71#include "../src/console_heap_slot_records.h"
69#include "../src/title_window_plan.h" 72#include "../src/title_window_plan.h"
70#include "../src/vulkan_present.h" 73#include "../src/vulkan_present.h"
71#include "../src/vulkan_device_filter.h" 74#include "../src/vulkan_device_filter.h"
@@ -127,6 +130,8 @@ constexpr VkDeviceSize kZeroPage = 64 * 1024; // zeroed: what unbound vertex an
127constexpr auto kQuadIndicesPerQuad = std::uint32_t(leonida::quad_triangle_indices.size()); 130constexpr auto kQuadIndicesPerQuad = std::uint32_t(leonida::quad_triangle_indices.size());
128constexpr std::uint32_t kQuadIndexCount = 16 * 1024 * kQuadIndicesPerQuad; 131constexpr std::uint32_t kQuadIndexCount = 16 * 1024 * kQuadIndicesPerQuad;
129constexpr VkDeviceSize kArenaReserved = kZeroPage + VkDeviceSize(kQuadIndexCount) * sizeof(std::uint32_t); 132constexpr VkDeviceSize kArenaReserved = kZeroPage + VkDeviceSize(kQuadIndexCount) * sizeof(std::uint32_t);
133// LEONIDA_ADDRESS_GUARD's header and sinks follow the quad indices (src/address_guard.h).
134static_assert(kArenaReserved <= leonida::address_guard::kGuardHeader);
130static_assert(sizeof(leonida::TargetView) <= kDescriptorSize); 135static_assert(sizeof(leonida::TargetView) <= kDescriptorSize);
131// pipeline_cache_store.h reads this layout without vulkan.h (D3D-704); remember the two. 136// pipeline_cache_store.h reads this layout without vulkan.h (D3D-704); remember the two.
132static_assert(sizeof(VkPipelineCacheHeaderVersionOne) == leonida::pipeline_cache_store::header_bytes); 137static_assert(sizeof(VkPipelineCacheHeaderVersionOne) == leonida::pipeline_cache_store::header_bytes);
@@ -159,6 +164,18 @@ void log_once(const char* what, int value) {
159 if (first_diagnostic(what, value)) std::fprintf(stderr, "[rt] d3d12: %s %d\n", what, value); 164 if (first_diagnostic(what, value)) std::fprintf(stderr, "[rt] d3d12: %s %d\n", what, value);
160} 165}
161 166
167// LEONIDA_ADDRESS_GUARD=1: the address guard (docs/d3d12_vulkan.md, "Address guard"). The arena keeps its guard
168// header and sinks at heap_base + 0x70000..0x80000 and a page table of every backing outside it is kept current
169// before each submission, so shaders translated with `rdna2spirv.py --address-guard` read 0 from, and drop stores
170// to, an address nothing backs. Without it those shaders find no header and check nothing.
171bool address_guard_enabled() {
172 static const bool on = [] {
173 wchar_t value[2]{};
174 return GetEnvironmentVariableW(L"LEONIDA_ADDRESS_GUARD", value, 2) == 1 && value[0] == L'1';
175 }();
176 return on;
177}
178
162// Matches the offset interpretation of the selected shader pack. 179// Matches the offset interpretation of the selected shader pack.
163bool signed_vsharp_offsets() { 180bool signed_vsharp_offsets() {
164 static const bool on = [] { 181 static const bool on = [] {
@@ -225,18 +242,24 @@ bool copy_guarded(std::uint8_t* to, const std::uint8_t* from, std::size_t bytes,
225// (streaming, file reads, XG copies) or whole planes (video), never a few bytes inside a page. The same sampling as 242// (streaming, file reads, XG copies) or whole planes (video), never a few bytes inside a page. The same sampling as
226// OpenScarlett's texture hash before submission (src/gpu/d3d12_xs/device_x.cpp, f8e24d4, MIT), with more samples. 243// OpenScarlett's texture hash before submission (src/gpu/d3d12_xs/device_x.cpp, f8e24d4, MIT), with more samples.
227// False when a page faults (the title unmapped it). No C++ objects here: it is a __try frame. 244// False when a page faults (the title unmapped it). No C++ objects here: it is a __try frame.
228inline std::uint64_t mix_words(std::uint64_t h, const std::uint8_t* at, std::size_t n) { 245#pragma pack(push, 1)
246struct UnalignedWord64 {
247 std::uint64_t value;
248};
249#pragma pack(pop)
250
251LEONIDA_GUARDED_NO_BUILTIN inline std::uint64_t mix_words(std::uint64_t h, const std::uint8_t* at, std::size_t n) {
229 for (std::size_t i = 0; i + 8 <= n; i += 8) { 252 for (std::size_t i = 0; i + 8 <= n; i += 8) {
230 std::uint64_t w; 253 const std::uint64_t w = reinterpret_cast<const UnalignedWord64*>(at + i)->value;
231 std::memcpy(&w, at + i, 8);
232 h = (h ^ w) * 0x100000001b3ull; 254 h = (h ^ w) * 0x100000001b3ull;
233 h ^= h >> 29; 255 h ^= h >> 29;
234 } 256 }
235 return h; 257 return h;
236} 258}
237// The reads of hash_guarded, in a frame of its own: an inline load inside the __try is not covered by clang-cl 259// The reads of hash_guarded, in a frame of its own: an inline load inside the __try is not covered by clang-cl
238// without /EHa (src/guarded_copy.h). 260// without /EHa, and a CRT memcpy call is not covered under Wine (src/guarded_copy.h).
239__declspec(noinline) std::uint64_t hash_bytes(const std::uint8_t* p, std::size_t bytes, bool every_byte) { 261__declspec(noinline) LEONIDA_GUARDED_NO_BUILTIN std::uint64_t hash_bytes(const std::uint8_t* p, std::size_t bytes,
262 bool every_byte) {
240 std::uint64_t h = 0x9e3779b97f4a7c15ull ^ bytes; 263 std::uint64_t h = 0x9e3779b97f4a7c15ull ^ bytes;
241 if (bytes <= (256u << 10) || every_byte) { 264 if (bytes <= (256u << 10) || every_byte) {
242 h = mix_words(h, p, bytes & ~std::size_t(7)); 265 h = mix_words(h, p, bytes & ~std::size_t(7));
@@ -358,6 +381,7 @@ public:
358 last_ = (end_ + kPage - 1) & ~(kPage - 1); 381 last_ = (end_ + kPage - 1) & ~(kPage - 1);
359 state_.assign((last_ - first_) / kPage, 0); 382 state_.assign((last_ - first_) / kPage, 0);
360 idle_.assign(state_.size(), 0); 383 idle_.assign(state_.size(), 0);
384 sums_.assign(state_.size() * kPieces, 0);
361 cover_.assign(state_.size(), 1); 385 cover_.assign(state_.size(), 1);
362 targets_.push_back({begin_, end_, shadow}); 386 targets_.push_back({begin_, end_, shadow});
363 index_targets(); 387 index_targets();
@@ -377,6 +401,83 @@ public:
377 ShadowPages(const ShadowPages&) = delete; 401 ShadowPages(const ShadowPages&) = delete;
378 ShadowPages& operator=(const ShadowPages&) = delete; 402 ShadowPages& operator=(const ShadowPages&) = delete;
379 403
404 // What the GPU writes into the copies of [from, to) goes back to the title's pages. Returns the bytes written.
405 // Called before the next refresh, so a page the title writes again is copied forward over the result, as on a GPU
406 // that shares the memory.
407 //
408 // Only the bytes a copy holds differently from the title's page go back, and only on a page known unchanged since
409 // it was copied: guarded (read-only since that copy), or write-watched and found unwritten by an asking made here.
410 // The asking comes first because write_back runs before refresh() asks: a hot page still carried kClean from the
411 // last asking, so the title's writes since then were copied over with the older copy. Comparing first leaves a
412 // read-only binding's pages alone (guarded, so a write the title makes meanwhile faults and waits on the lock),
413 // where opening them for a whole copy lost a write made between the opening and the copy; and of two copies of
414 // the same bytes only the one that differs is written, where the last one won.
415 std::size_t write_back(std::uintptr_t from, std::uintptr_t to) {
416 from = std::max(from, first_), to = std::min(to, last_);
417 if (from >= to) return 0;
418 AcquireSRWLockExclusive(&lock_);
419 // What changed since the last refresh, as refresh() learns it: mappings (the journal), kernel-write pins, and
420 // the write watch. A journal that no longer reaches back makes nothing known: nothing goes back.
421 std::uint64_t map_generation = leonida::title_memory_map::generation();
422 bool known = map_generation_ != ~std::uint64_t(0);
423 if (known && map_generation != map_generation_)
424 known = leonida::title_memory_map::changes_since(
425 map_generation_, map_generation, first_, last_, [&](std::uintptr_t a, std::uintptr_t b) {
426 for (std::size_t i = (a - first_) / kPage, i1 = (b - first_ + kPage - 1) / kPage;
427 i < i1 && i < state_.size(); ++i)
428 state_[i] |= kRequery;
429 });
430 if (!known) {
431 ReleaseSRWLockExclusive(&lock_);
432 return 0;
433 }
434 leonida::kernel_writes::for_each_pin(from, to, [&](std::uintptr_t a, std::uintptr_t b) {
435 for (std::uintptr_t p = std::max(a, from) & ~(kPage - 1); p < std::min(b, to); p += kPage)
436 state_[(p - first_) / kPage] |= kPinned;
437 pinned_ = true;
438 });
439 ask_written_locked();
440 // A page the title wrote since it was last copied holds the newer bytes already: its GPU result is dropped and
441 // the refresh's own copy carries the title's. So is a page whose mapping changed, one a kernel write may be
442 // filling, and one xmem maps at another address too (a write there is seen by no guard and no watch here).
443 const auto held = [&](std::size_t i) {
444 const std::uint8_t s = state_[i];
445 return (s & (kZero | kRequery | kPinned | kAliased)) || (!(s & kProtected) && !(s & kClean));
446 };
447 constexpr std::uintptr_t kPiece = 256; // compared and copied in pieces this size
448 std::size_t written = 0;
449 for (std::uintptr_t at = from & ~(kPage - 1); at < ((to + kPage - 1) & ~(kPage - 1));) {
450 std::size_t pages = 0;
451 while (at + (pages + 1) * kPage <= ((to + kPage - 1) & ~(kPage - 1)) &&
452 held((at - first_) / kPage + pages) == held((at - first_) / kPage))
453 ++pages;
454 if (!held((at - first_) / kPage)) {
455 const std::uintptr_t a = std::max(at, from), b = std::min(at + pages * kPage, to);
456 bool opened = false;
457 for (const Target& t : targets_) {
458 const std::uintptr_t x = std::max(a, t.begin), y = std::min(b, t.end);
459 if (x >= y || !t.shadow) continue;
460 for (std::uintptr_t c = x; c < y;) {
461 const std::uintptr_t e = std::min(y, (c + kPiece) & ~(kPiece - 1));
462 const std::uint8_t* copy = t.shadow + (c - t.begin);
463 if (std::memcmp(reinterpret_cast<const void*>(c), copy, e - c) != 0) {
464 if (!opened) {
465 reopen_locked(at, at + pages * kPage);
466 opened = true;
467 }
468 std::memcpy(reinterpret_cast<void*>(c), copy, e - c);
469 written += e - c;
470 }
471 c = e;
472 }
473 }
474 }
475 at += pages * kPage;
476 }
477 ReleaseSRWLockExclusive(&lock_);
478 return written;
479 }
480
380 // The bytes of all targets, and how many there are. 481 // The bytes of all targets, and how many there are.
381 std::size_t size() const { return target_bytes_; } 482 std::size_t size() const { return target_bytes_; }
382 std::size_t targets() const { return targets_.size(); } 483 std::size_t targets() const { return targets_.size(); }
@@ -453,38 +554,8 @@ public:
453 }); 554 });
454 // The write-watched pages written since the last asking are no longer clean: asked before the walk, so a write 555 // The write-watched pages written since the last asking are no longer clean: asked before the walk, so a write
455 // after this is in the next asking. 556 // after this is in the next asking.
456 const std::uint64_t watch_generation = leonida::title_write_watch::generation();
457 if (watch_generation != watch_generation_) {
458 watch_generation_ = watch_generation;
459 update_watched();
460 }
461 if (runs_stale_) rebuild_watch_runs();
462 refresh_asks_ = refresh_written_ = 0; 557 refresh_asks_ = refresh_written_ = 0;
463 if (!watch_runs_.empty()) { 558 if (ask_written_locked()) cool(); // a block it guards again leaves the runs at the next refresh
464 if (!reader_) {
465 reader_ = leonida::title_write_watch::open_reader();
466 forget_clean();
467 }
468 refresh_asks_ = watch_runs_.size();
469 leonida::title_write_watch::ask(
470 reader_, watch_runs_,
471 [&](std::uintptr_t from, std::uintptr_t to) {
472 for (std::uintptr_t p = from; p < to; p += kPage) {
473 std::uint8_t& s = state_[(p - first_) / kPage];
474 if (!(s & kHot)) continue; // asked over a gap between hot pages: guarded
475 refresh_written_ += (s & kClean) != 0;
476 s &= ~kClean;
477 warm(p);
478 }
479 },
480 [&](std::uintptr_t from, std::uintptr_t to) {
481 // Not write-watched after all (released and reserved again): guarded from now on.
482 for (std::uintptr_t p = from; p < to; p += kPage)
483 state_[(p - first_) / kPage] &= ~(kWatched | kClean | kHot);
484 runs_stale_ = true;
485 });
486 cool(); // a block it guards again leaves the runs at the next refresh
487 }
488 for (std::uintptr_t at = first_; at < last_;) { 559 for (std::uintptr_t at = first_; at < last_;) {
489 const std::size_t i0 = (at - first_) / kPage; 560 const std::size_t i0 = (at - first_) / kPage;
490 if (!cover_[i0]) { // no copy reads it: left as the title set it 561 if (!cover_[i0]) { // no copy reads it: left as the title set it
@@ -533,6 +604,7 @@ public:
533 if (state_[i] & kZero) continue; 604 if (state_[i] & kZero) continue;
534 const auto [offset, bytes] = span_of(i, i + 1); 605 const auto [offset, bytes] = span_of(i, i + 1);
535 zero_targets(offset, bytes); 606 zero_targets(offset, bytes);
607 leonida::shadow_keep::forget(sums_.data(), first_, begin_ + offset, begin_ + offset + bytes);
536 if (!zeroed_.empty() && zeroed_.back().offset + zeroed_.back().bytes == offset) 608 if (!zeroed_.empty() && zeroed_.back().offset + zeroed_.back().bytes == offset)
537 zeroed_.back().bytes += bytes; 609 zeroed_.back().bytes += bytes;
538 else 610 else
@@ -600,6 +672,10 @@ public:
600 pieces_.walk_ms = std::chrono::duration<double, std::milli>(copy_start - walk_start).count(); 672 pieces_.walk_ms = std::chrono::duration<double, std::milli>(copy_start - walk_start).count();
601 std::size_t copied = 0; 673 std::size_t copied = 0;
602 for (const Job& job : jobs_) { 674 for (const Job& job : jobs_) {
675 if (keep_gpu_writes()) { // only the pieces whose title bytes changed (src/shadow_keep.h)
676 copied += copy_changed(job);
677 continue;
678 }
603 std::uint8_t* run_dst = nullptr; 679 std::uint8_t* run_dst = nullptr;
604 const std::uint8_t* run_src = nullptr; 680 const std::uint8_t* run_src = nullptr;
605 std::size_t run_bytes = 0; 681 std::size_t run_bytes = 0;
@@ -650,12 +726,14 @@ public:
650 const std::size_t n = (first_ - first) / kPage; 726 const std::size_t n = (first_ - first) / kPage;
651 state_.insert(state_.begin(), n, std::uint8_t(0)); 727 state_.insert(state_.begin(), n, std::uint8_t(0));
652 idle_.insert(idle_.begin(), n, std::uint8_t(0)); 728 idle_.insert(idle_.begin(), n, std::uint8_t(0));
729 sums_.insert(sums_.begin(), n * kPieces, std::uint64_t(0));
653 cover_.insert(cover_.begin(), n, 0u); 730 cover_.insert(cover_.begin(), n, 0u);
654 first_ = first; 731 first_ = first;
655 } 732 }
656 if (last > last_) { 733 if (last > last_) {
657 state_.resize((last - first_) / kPage, 0); 734 state_.resize((last - first_) / kPage, 0);
658 idle_.resize(state_.size(), 0); 735 idle_.resize(state_.size(), 0);
736 sums_.resize(state_.size() * kPieces, 0);
659 cover_.resize(state_.size(), 0); 737 cover_.resize(state_.size(), 0);
660 last_ = last; 738 last_ = last;
661 } 739 }
@@ -675,6 +753,8 @@ public:
675 state_[at + i] |= other.state_[i]; 753 state_[at + i] |= other.state_[i];
676 cover_[at + i] += other.cover_[i]; 754 cover_[at + i] += other.cover_[i];
677 idle_[at + i] = other.idle_[i]; 755 idle_[at + i] = other.idle_[i];
756 std::copy_n(other.sums_.begin() + std::ptrdiff_t(i * kPieces), kPieces,
757 sums_.begin() + std::ptrdiff_t((at + i) * kPieces));
678 } 758 }
679 targets_.insert(targets_.end(), other.targets_.begin(), other.targets_.end()); 759 targets_.insert(targets_.end(), other.targets_.begin(), other.targets_.end());
680 if (other.map_generation_ != map_generation_) map_generation_ = ~std::uint64_t(0); 760 if (other.map_generation_ != map_generation_) map_generation_ = ~std::uint64_t(0);
@@ -721,15 +801,42 @@ public:
721 kind = classify(region); 801 kind = classify(region);
722 } 802 }
723 const std::uintptr_t from = std::max(at, begin), to = std::min(next, end); 803 const std::uintptr_t from = std::max(at, begin), to = std::min(next, end);
724 if (kind == Kind::zero) 804 if (kind == Kind::zero) {
725 std::memset(shadow + (from - begin), 0, to - from); 805 std::memset(shadow + (from - begin), 0, to - from);
726 else 806 } else {
727 copy_run(shadow + (from - begin), reinterpret_cast<const std::uint8_t*>(from), to - from, 807 const bool streaming = (region.Protect & PAGE_WRITECOMBINE) != 0;
728 (region.Protect & PAGE_WRITECOMBINE) != 0); 808 copy_run(shadow + (from - begin), reinterpret_cast<const std::uint8_t*>(from), to - from, streaming);
809 // The sums stand for what every target holds. The new target now holds the title's current bytes, so
810 // the pieces where those differ from the sums are brought to the other targets too, and the sums
811 // follow; otherwise a title that later writes the old bytes back would leave the new target behind.
812 // Whole pieces (inside this page, so this region) up to the targets' ends, as a refresh sums them: a
813 // piece cut at the new target's edge would be summed short and copied again at the next refresh.
814 constexpr std::uintptr_t kPiece = leonida::shadow_keep::kPiece;
815 if (keep_gpu_writes())
816 reconcile(std::max(from & ~(kPiece - 1), begin_), std::min((to + kPiece - 1) & ~(kPiece - 1), end_),
817 streaming);
818 }
729 at = next; 819 at = next;
730 } 820 }
731 } 821 }
732 822
823 // [from, to), readable title pages: the pieces whose bytes differ from the sums are copied to every target over
824 // them and their sums updated, as a refresh does.
825 void reconcile(std::uintptr_t from, std::uintptr_t to, bool streaming) {
826 alignas(64) std::uint8_t page[kPage];
827 for (std::uintptr_t va = from; va < to;) {
828 const std::size_t n = std::min<std::size_t>(to - va, kPage - (va & (kPage - 1)));
829 copy_run(page, reinterpret_cast<const std::uint8_t*>(va), n, streaming);
830 leonida::shadow_keep::copy_changed(
831 page, va, n, sums_.data(), first_, [&](std::uintptr_t a, std::uintptr_t b, const std::uint8_t* source) {
832 for_each_target(a, b, [&](const Target& t, std::uintptr_t lo, std::uintptr_t hi) {
833 std::memcpy(t.shadow + (lo - t.begin), source + (lo - a), hi - lo);
834 });
835 });
836 va += n;
837 }
838 }
839
733 // Under shadow_mutex: `shadow` is no longer a target. Pages no other target covers are made writable again and 840 // Under shadow_mutex: `shadow` is no longer a target. Pages no other target covers are made writable again and
734 // passed over from now on. False when it isn't one of this tracker's. 841 // passed over from now on. False when it isn't one of this tracker's.
735 bool remove_target(const std::uint8_t* shadow) { 842 bool remove_target(const std::uint8_t* shadow) {
@@ -858,6 +965,42 @@ private:
858 return s == kProtected || s == (kWatched | kProtected) || s == (kWatched | kHot | kClean); 965 return s == kProtected || s == (kWatched | kProtected) || s == (kWatched | kHot | kClean);
859 } 966 }
860 967
968 // One asking of the write watch, under lock_: the hot pages written since the last asking lose kClean (counted in
969 // refresh_written_). From refresh() before its walk, and from write_back() before it trusts kClean. False when no
970 // page is write-watched here.
971 bool ask_written_locked() {
972 const std::uint64_t watch_generation = leonida::title_write_watch::generation();
973 if (watch_generation != watch_generation_) {
974 watch_generation_ = watch_generation;
975 update_watched();
976 }
977 if (runs_stale_) rebuild_watch_runs();
978 if (watch_runs_.empty()) return false;
979 if (!reader_) {
980 reader_ = leonida::title_write_watch::open_reader();
981 forget_clean();
982 }
983 refresh_asks_ += watch_runs_.size();
984 leonida::title_write_watch::ask(
985 reader_, watch_runs_,
986 [&](std::uintptr_t from, std::uintptr_t to) {
987 for (std::uintptr_t p = from; p < to; p += kPage) {
988 std::uint8_t& s = state_[(p - first_) / kPage];
989 if (!(s & kHot)) continue; // asked over a gap between hot pages: guarded
990 refresh_written_ += (s & kClean) != 0;
991 s &= ~kClean;
992 warm(p);
993 }
994 },
995 [&](std::uintptr_t from, std::uintptr_t to) {
996 // Not write-watched after all (released and reserved again): guarded from now on.
997 for (std::uintptr_t p = from; p < to; p += kPage)
998 state_[(p - first_) / kPage] &= ~(kWatched | kClean | kHot);
999 runs_stale_ = true;
1000 });
1001 return true;
1002 }
1003
861 // A hot page `p` was found written: its block is not idle. 1004 // A hot page `p` was found written: its block is not idle.
862 void warm(std::uintptr_t p) { 1005 void warm(std::uintptr_t p) {
863 const std::uintptr_t block = p & ~(kBlock - 1); 1006 const std::uintptr_t block = p & ~(kBlock - 1);
@@ -1127,6 +1270,40 @@ private:
1127 jobs_.push_back({offset, bytes, streaming, aliased}); 1270 jobs_.push_back({offset, bytes, streaming, aliased});
1128 } 1271 }
1129 1272
1273 // LEONIDA_SHADOW_KEEP (on; 0: every job copied whole, as before): a job's bytes reach the copies only where they
1274 // differ from those copied last (src/shadow_keep.h), so a shader's write into a copy of pages copied without a
1275 // sign that the title wrote them stays until the title changes those bytes.
1276 // shortcut: a title that rewrites the same bytes to reset a GPU-written value is not seen; needs a real write
1277 // signal (a write-back to the title's pages) then.
1278 static bool keep_gpu_writes() {
1279 static const bool on = [] {
1280 char value[2] = {};
1281 std::size_t length = 0;
1282 return getenv_s(&length, value, sizeof(value), "LEONIDA_SHADOW_KEEP") != 0 || length == 0 ||
1283 value[0] != '0';
1284 }();
1285 return on;
1286 }
1287 static constexpr std::size_t kPieces = kPage / leonida::shadow_keep::kPiece;
1288 std::size_t copy_changed(const Job& job) {
1289 std::size_t copied = 0;
1290 alignas(64) std::uint8_t page[kPage];
1291 for (std::size_t at = job.offset, end = job.offset + job.bytes; at < end;) {
1292 const std::uintptr_t va = begin_ + at;
1293 const std::size_t n = std::min<std::size_t>(end - at, kPage - (va & (kPage - 1)));
1294 copy_run(page, reinterpret_cast<const std::uint8_t*>(va), n, job.streaming);
1295 leonida::shadow_keep::copy_changed(
1296 page, va, n, sums_.data(), first_, [&](std::uintptr_t a, std::uintptr_t b, const std::uint8_t* source) {
1297 for_each_target(a, b, [&](const Target& t, std::uintptr_t from, std::uintptr_t to) {
1298 std::memcpy(t.shadow + (from - t.begin), source + (from - a), to - from);
1299 copied += to - from;
1300 });
1301 });
1302 at += n;
1303 }
1304 return copied;
1305 }
1306
1130 // The targets sorted by start, the bytes they hold, and reach_[k], the furthest end among targets_[0..k]: the 1307 // The targets sorted by start, the bytes they hold, and reach_[k], the furthest end among targets_[0..k]: the
1131 // targets over [from, to) are found from the first whose reach passes `from`. 1308 // targets over [from, to) are found from the first whose reach passes `from`.
1132 void index_targets() { 1309 void index_targets() {
@@ -1260,6 +1437,7 @@ private:
1260 std::uint64_t reader_ = 0; 1437 std::uint64_t reader_ = 0;
1261 std::size_t watched_pages_ = 0, hot_pages_ = 0; // covered pages write-watched, and hot 1438 std::size_t watched_pages_ = 0, hot_pages_ = 0; // covered pages write-watched, and hot
1262 Vector<std::uint8_t> idle_; // per 4 KiB page: refreshes a hot page went without a write (kCool) 1439 Vector<std::uint8_t> idle_; // per 4 KiB page: refreshes a hot page went without a write (kCool)
1440 Vector<std::uint64_t> sums_; // per 256-byte piece from first_: sum of the bytes copied last, 0: not known
1263 bool runs_stale_ = false; // a page became hot or cold: watch_runs_ is rebuilt at the next refresh 1441 bool runs_stale_ = false; // a page became hot or cold: watch_runs_ is rebuilt at the next refresh
1264 std::uint64_t refresh_asks_ = 0; 1442 std::uint64_t refresh_asks_ = 0;
1265 std::uint64_t refresh_written_ = 0; 1443 std::uint64_t refresh_written_ = 0;
@@ -1499,6 +1677,30 @@ std::filesystem::path pipeline_cache_session_path() {
1499 return path; 1677 return path;
1500} 1678}
1501 1679
1680// The pipelines the offline seed does not have, kept next to it and written while the game runs
1681// (src/heavy_pipeline_cache.h).
1682std::filesystem::path pipeline_cache_heavy_path() {
1683 std::filesystem::path path = pipeline_cache_path();
1684 if (!path.empty()) path.replace_filename(L"pipeline_cache.heavy.bin");
1685 return path;
1686}
1687
1688// LEONIDA_HEAVY_PIPELINE_CACHE_MS: a compile at least this long schedules a write of the heavy cache; 0 turns the
1689// heavy cache off. One line for a value that is not a number.
1690std::uint32_t heavy_pipeline_cache_ms() {
1691 static const std::uint32_t ms = [] {
1692 char text[32] = {};
1693 size_t length = 0;
1694 const bool present = getenv_s(&length, text, "LEONIDA_HEAVY_PIPELINE_CACHE_MS") == 0 && length > 1;
1695 const auto threshold = leonida::heavy_pipeline_cache::parse_threshold(present ? text : "");
1696 if (!threshold.valid)
1697 std::fprintf(stderr, "[rt] d3d12: LEONIDA_HEAVY_PIPELINE_CACHE_MS=%s is not a number of milliseconds; "
1698 "using %u\n", text, threshold.ms);
1699 return threshold.ms;
1700 }();
1701 return ms;
1702}
1703
1502std::size_t pipeline_cache_save_limit(); 1704std::size_t pipeline_cache_save_limit();
1503 1705
1504// LOCAL FIX (pipeline journal, pipeline_cache_journal.h): where each compute pipeline's own cache file goes, beside 1706// LOCAL FIX (pipeline journal, pipeline_cache_journal.h): where each compute pipeline's own cache file goes, beside
@@ -1529,6 +1731,10 @@ const std::filesystem::path& pipeline_journal_dir() {
1529 return pipeline_journal_roots().writable; 1731 return pipeline_journal_roots().writable;
1530} 1732}
1531 1733
1734// The offline seed's size (pipeline_cache.bin) when the device cache was created from it, 0 otherwise: the save limit
1735// does not count it (pipeline_cache_store::over_save_limit).
1736std::atomic<std::size_t> g_offline_seed_bytes{0};
1737
1532// LEONIDA_PIPELINE_CACHE_BYTES, in bytes; 0 turns the session file off. One line for a value that is not a number. 1738// LEONIDA_PIPELINE_CACHE_BYTES, in bytes; 0 turns the session file off. One line for a value that is not a number.
1533std::size_t pipeline_cache_save_limit() { 1739std::size_t pipeline_cache_save_limit() {
1534 char text[32] = {}; 1740 char text[32] = {};
@@ -1601,6 +1807,7 @@ VkPipelineCache create_seeded_pipeline_cache(PFN_vkCreatePipelineCache create_ca
1601 return VK_NULL_HANDLE; 1807 return VK_NULL_HANDLE;
1602 } 1808 }
1603 std::fprintf(stderr, "[rt] d3d12: loaded %zu bytes from %s\n", seed.size(), name); 1809 std::fprintf(stderr, "[rt] d3d12: loaded %zu bytes from %s\n", seed.size(), name);
1810 if (!session) g_offline_seed_bytes.store(seed.size(), std::memory_order_relaxed);
1604 if (trace_pipeline_compile()) 1811 if (trace_pipeline_compile())
1605 std::fprintf(stderr, "[rt] pipeline-cache op=load bytes=%zu map_us=%lld driver_us=%lld file=%s\n", 1812 std::fprintf(stderr, "[rt] pipeline-cache op=load bytes=%zu map_us=%lld driver_us=%lld file=%s\n",
1606 seed.size(), mapped-start, compile_us()-mapped, name); 1813 seed.size(), mapped-start, compile_us()-mapped, name);
@@ -1649,6 +1856,7 @@ bool merge_session_pipeline_cache(const leonida::VulkanDeviceFunctions& vk, VkDe
1649// never built and every dispatch of theirs is dropped ("all" or "*": every compute program). For getting past a 1856// never built and every dispatch of theirs is dropped ("all" or "*": every compute program). For getting past a
1650// program that hangs the GPU, such as a translated loop that never ends on the input it is given here, while the 1857// program that hangs the GPU, such as a translated loop that never ends on the input it is given here, while the
1651// program or its input is being fixed. What the program would have written keeps its previous contents. 1858// program or its input is being fixed. What the program would have written keeps its previous contents.
1859// gta6rt --precompile-pipelines builds the listed programs anyway unless it is given --skip-listed.
1652bool skip_compute(const std::string& name) { 1860bool skip_compute(const std::string& name) {
1653 static const std::vector<std::string> parts = [] { 1861 static const std::vector<std::string> parts = [] {
1654 std::vector<std::string> out; 1862 std::vector<std::string> out;
@@ -1741,16 +1949,17 @@ bool startup_cache_checkpoints_enabled() {
1741void save_session_pipeline_cache(const leonida::VulkanDeviceFunctions& vk, VkDevice device, VkPipelineCache cache, 1949void save_session_pipeline_cache(const leonida::VulkanDeviceFunctions& vk, VkDevice device, VkPipelineCache cache,
1742 bool checkpoint = false, const char* op = nullptr) { 1950 bool checkpoint = false, const char* op = nullptr) {
1743 if (!cache || !vk.vkGetPipelineCacheData) return; 1951 if (!cache || !vk.vkGetPipelineCacheData) return;
1744 auto limit = pipeline_cache_save_limit(); 1952 // The output is an opaque Vulkan blob. A prefix is not an incremental cache, so past the limit nothing is written.
1745 // The output is an opaque Vulkan blob. A prefix is not an incremental cache. 1953 const auto limit = pipeline_cache_save_limit();
1746 if (checkpoint) limit = (std::min)(limit, std::size_t{512} << 20);
1747 if (!limit) return; 1954 if (!limit) return;
1748 const auto start = compile_us(); 1955 const auto start = compile_us();
1749 std::size_t size = 0; 1956 std::size_t size = 0;
1750 if (vk.vkGetPipelineCacheData(device, cache, &size, nullptr) != VK_SUCCESS || 1957 if (vk.vkGetPipelineCacheData(device, cache, &size, nullptr) != VK_SUCCESS ||
1751 size <= sizeof(VkPipelineCacheHeaderVersionOne)) return; 1958 size <= sizeof(VkPipelineCacheHeaderVersionOne)) return;
1752 if (size > limit) { 1959 const std::size_t seed = g_offline_seed_bytes.load(std::memory_order_relaxed);
1753 std::fprintf(stderr, "[rt] d3d12: pipeline cache is %zu bytes, over the %zu-byte write limit\n", size, limit); 1960 if (leonida::pipeline_cache_store::over_save_limit(size, seed, limit)) {
1961 std::fprintf(stderr, "[rt] d3d12: pipeline cache is %zu bytes (%zu of them the offline seed), over the "
1962 "%zu-byte write limit for what a session adds\n", size, seed, limit);
1754 return; 1963 return;
1755 } 1964 }
1756 const auto queried = compile_us(); 1965 const auto queried = compile_us();
@@ -1776,6 +1985,66 @@ void save_session_pipeline_cache(const leonida::VulkanDeviceFunctions& vk, VkDev
1776 else std::fprintf(stderr, "[rt] d3d12: pipeline cache snapshot incomplete (%d); previous session retained\n", int(result)); 1985 else std::fprintf(stderr, "[rt] d3d12: pipeline cache snapshot incomplete (%d); previous session retained\n", int(result));
1777} 1986}
1778 1987
1988// The heavy cache, seeded from pipeline_cache.heavy.bin when it is there and made for this device; empty otherwise.
1989VkPipelineCache create_heavy_pipeline_cache(const leonida::VulkanDeviceFunctions& vk, VkDevice device,
1990 const leonida::cached_pso::Identity& identity) {
1991 const auto path = pipeline_cache_heavy_path();
1992 clean_stale_cache_files(path);
1993 VkPipelineCache cache = VK_NULL_HANDLE;
1994 {
1995 const PipelineCacheSeed seed(path);
1996 if (seed.data() && seed.compatible(identity)) {
1997 const VkPipelineCacheCreateInfo create{VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO, nullptr, 0,
1998 seed.size(), seed.data()};
1999 if (vk.vkCreatePipelineCache(device, &create, nullptr, &cache) == VK_SUCCESS) {
2000 std::fprintf(stderr, "[rt] d3d12: loaded %zu bytes from pipeline_cache.heavy.bin\n", seed.size());
2001 return cache;
2002 }
2003 std::fprintf(stderr, "[rt] d3d12: Vulkan declined pipeline_cache.heavy.bin; starting it empty\n");
2004 } else if (seed.data()) {
2005 std::fprintf(stderr, "[rt] d3d12: pipeline_cache.heavy.bin does not match this Vulkan device; starting "
2006 "it empty\n");
2007 }
2008 }
2009 const VkPipelineCacheCreateInfo create{VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO};
2010 if (vk.vkCreatePipelineCache(device, &create, nullptr, &cache) != VK_SUCCESS) return VK_NULL_HANDLE;
2011 return cache;
2012}
2013
2014// Writes the heavy cache whole: a staging file renamed over pipeline_cache.heavy.bin, so the file on disk is always
2015// a complete blob. It only holds what the offline seed missed, so it has no size limit of its own.
2016bool save_heavy_pipeline_cache(const leonida::VulkanDeviceFunctions& vk, VkDevice device, VkPipelineCache cache,
2017 std::uint64_t compiles, std::uint64_t hits) {
2018 if (!cache || !vk.vkGetPipelineCacheData) return false;
2019 const auto path = pipeline_cache_heavy_path();
2020 if (path.empty()) return false;
2021 const auto start = compile_us();
2022 std::size_t size = 0;
2023 if (vk.vkGetPipelineCacheData(device, cache, &size, nullptr) != VK_SUCCESS ||
2024 size <= sizeof(VkPipelineCacheHeaderVersionOne))
2025 return false;
2026 CacheStagingFile staging(path, size);
2027 if (!staging.data) {
2028 std::fprintf(stderr, "[rt] d3d12: could not map a staging file for %zu heavy pipeline cache bytes\n", size);
2029 return false;
2030 }
2031 auto written = size;
2032 const VkResult result = vk.vkGetPipelineCacheData(device, cache, &written, staging.data);
2033 // VK_INCOMPLETE means the cache grew after the size query and the blob is a truncated snapshot; it must not
2034 // replace a complete file. The writer tries again later with a fresh size.
2035 const bool ok = result == VK_SUCCESS && written > sizeof(VkPipelineCacheHeaderVersionOne) && written <= size &&
2036 staging.publish(path, written);
2037 if (ok)
2038 std::fprintf(stderr, "[rt] d3d12: wrote %zu bytes to pipeline_cache.heavy.bin in %.1f s (%llu slow builds "
2039 "and %llu other builds past the offline cache so far)\n",
2040 written, double(compile_us() - start) / 1e6, static_cast<unsigned long long>(compiles),
2041 static_cast<unsigned long long>(hits));
2042 else
2043 std::fprintf(stderr, "[rt] d3d12: pipeline_cache.heavy.bin not written (%d); the previous file is kept\n",
2044 int(result));
2045 return ok;
2046}
2047
1779// A shader whose subgroup size cannot be had runs at the device's: inexact if it crosses the halves of a wave64 (or, 2048// A shader whose subgroup size cannot be had runs at the device's: inexact if it crosses the halves of a wave64 (or,
1780// for a wave32 shader on a 64-wide default, reads lanes that are not its own), unless the translator's 2049// for a wave32 shader on a 64-wide default, reads lanes that are not its own), unless the translator's
1781// partition-invariance tier says otherwise. Logged once per stage with the first shader's name, then again at 10, 100, 2050// partition-invariance tier says otherwise. Logged once per stage with the first shader's name, then again at 10, 100,
@@ -2411,6 +2680,105 @@ struct DeviceState {
2411 return pipeline_cache_handle; 2680 return pipeline_cache_handle;
2412 } 2681 }
2413 2682
2683 // The heavy pipeline cache (src/heavy_pipeline_cache.h) and the thread that writes it.
2684 std::once_flag heavy_cache_once;
2685 VkPipelineCache heavy_cache_handle = VK_NULL_HANDLE;
2686 std::mutex heavy_mutex;
2687 std::condition_variable heavy_wake;
2688 leonida::heavy_pipeline_cache::WriteSchedule heavy_schedule; // under heavy_mutex
2689 bool heavy_stop = false; // under heavy_mutex
2690 std::thread heavy_writer; // started at the first slow build
2691 std::atomic<std::uint64_t> heavy_compiles{0}, heavy_hits{0};
2692 std::atomic<bool> heavy_changed{false}; // a build went into the heavy cache since it was loaded
2693
2694 VkPipelineCache heavy_cache() {
2695 std::call_once(heavy_cache_once, [this] {
2696 if (context->vk.vkCreatePipelineCache)
2697 heavy_cache_handle = create_heavy_pipeline_cache(context->vk, info.device, pso_identity);
2698 });
2699 return heavy_cache_handle;
2700 }
2701
2702 // A build past the offline cache took `took_ms`: a slow one schedules a write.
2703 void note_heavy_build(ULONGLONG took_ms) {
2704 heavy_changed = true;
2705 if (took_ms < heavy_pipeline_cache_ms()) {
2706 ++heavy_hits;
2707 return;
2708 }
2709 ++heavy_compiles;
2710 std::lock_guard lock(heavy_mutex);
2711 if (heavy_stop) return;
2712 heavy_schedule.note_heavy(GetTickCount64());
2713 if (!heavy_writer.joinable()) {
2714 try {
2715 heavy_writer = std::thread([this] { write_heavy_cache_loop(); });
2716 } catch (const std::exception&) {
2717 return; // no thread: the cache is still written at teardown
2718 }
2719 }
2720 heavy_wake.notify_one();
2721 }
2722
2723 void write_heavy_cache_loop() {
2724 SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_BELOW_NORMAL);
2725 std::unique_lock lock(heavy_mutex);
2726 while (!heavy_stop) {
2727 if (!heavy_schedule.dirty()) {
2728 heavy_wake.wait(lock);
2729 continue;
2730 }
2731 const std::uint64_t now = GetTickCount64();
2732 if (!heavy_schedule.due(now)) {
2733 heavy_wake.wait_for(lock, std::chrono::milliseconds(heavy_schedule.due_ms() - now));
2734 continue;
2735 }
2736 const std::uint64_t generation = heavy_schedule.generation();
2737 lock.unlock();
2738 const bool saved = save_heavy_pipeline_cache(context->vk, info.device, heavy_cache_handle,
2739 heavy_compiles.load(), heavy_hits.load());
2740 lock.lock();
2741 // A failed write leaves the cache dirty: it is tried again after a growing delay, not only at teardown.
2742 if (saved) heavy_schedule.written(generation, now);
2743 else heavy_schedule.failed(now);
2744 }
2745 }
2746
2747 // At device teardown, with no build running: stop the writer and write the cache if any build went into it.
2748 // Fast builds never schedule a write, so this is where they are kept: without an offline seed every build is
2749 // a miss, and these are the builds pipeline_cache.session.bin used to keep.
2750 void finish_heavy_cache() {
2751 {
2752 std::lock_guard lock(heavy_mutex);
2753 heavy_stop = true;
2754 }
2755 heavy_wake.notify_all();
2756 if (heavy_writer.joinable()) heavy_writer.join();
2757 if (!heavy_cache_handle) return;
2758 if (heavy_changed.load() && !active_compiles.load())
2759 save_heavy_pipeline_cache(context->vk, info.device, heavy_cache_handle, heavy_compiles.load(),
2760 heavy_hits.load());
2761 context->vk.vkDestroyPipelineCache(info.device, heavy_cache_handle, nullptr);
2762 heavy_cache_handle = VK_NULL_HANDLE;
2763 }
2764
2765 // vkCreateGraphicsPipelines through `create(cache, flags)` (compute pipelines have their journal). With the heavy
2766 // cache, the offline cache is asked first without compiling; a pipeline it does not have is built against the heavy
2767 // cache, which a slow build then writes back to disk. A caller that already asked for a cache-only create keeps it.
2768 template <class Create>
2769 VkResult create_pipeline(VkPipelineCreateFlags flags, Create&& create) {
2770 constexpr VkPipelineCreateFlags cache_only = VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT;
2771 const VkPipelineCache corpus = pipeline_cache();
2772 if (!info.heavy_pipeline_cache || (flags & cache_only)) return create(corpus, flags);
2773 const VkResult cached = create(corpus, flags | cache_only);
2774 if (cached != VK_PIPELINE_COMPILE_REQUIRED) return cached;
2775 const VkPipelineCache heavy = heavy_cache();
2776 const ULONGLONG started = GetTickCount64();
2777 const VkResult built = create(heavy ? heavy : corpus, flags);
2778 if (built == VK_SUCCESS && heavy) note_heavy_build(GetTickCount64() - started);
2779 return built;
2780 }
2781
2414 QueueClock clock; // device-wide calibration entry points 2782 QueueClock clock; // device-wide calibration entry points
2415 std::vector<std::uint32_t> timestamp_bits; 2783 std::vector<std::uint32_t> timestamp_bits;
2416 2784
@@ -2548,6 +2916,7 @@ struct DeviceState {
2548 if (!pages) return; 2916 if (!pages) return;
2549 const leonida::submit_phases::Scope timed(leonida::submit_phases::shadows); 2917 const leonida::submit_phases::Scope timed(leonida::submit_phases::shadows);
2550 std::lock_guard lock(shadow_mutex); 2918 std::lock_guard lock(shadow_mutex);
2919 write_back_titles(); // what the last submission wrote in the copies, before the forward copy below
2551 if (shadows.empty()) return; 2920 if (shadows.empty()) return;
2552 const auto start = clock::now(); 2921 const auto start = clock::now();
2553 // LEONIDA_SHADOW_ALIAS_MS (0 by default: every submission): pages xmem maps at two addresses that a write 2922 // LEONIDA_SHADOW_ALIAS_MS (0 by default: every submission): pages xmem maps at two addresses that a write
@@ -2675,7 +3044,24 @@ struct DeviceState {
2675 std::atomic<std::size_t> title_window_count{0}; // title_windows.size(), read without the mutex 3044 std::atomic<std::size_t> title_window_count{0}; // title_windows.size(), read without the mutex
2676 std::uint64_t title_window_bytes = 0; 3045 std::uint64_t title_window_bytes = 0;
2677 std::uint64_t title_window_cap = 64ull << 20; 3046 std::uint64_t title_window_cap = 64ull << 20;
2678 // The stream pools' mappings (title_gpu_views): one per readable run of a pool, kept for the device's life. 3047 // What the GPU wrote into a copy of the title's memory goes back to the title's pages: the ranges reached since
3048 // the last submission (title_va_alias.h note_reached), copied back at the next refresh before the forward copy.
3049 // A window is a read-side mirror, so without this a UAV or a raw write lands in the copy and the title never sees
3050 // it (#1537, the WRITE_INVALID stop at the world start).
3051 std::mutex title_write_back_mutex; // its own: taken under shadow_mutex, never the other way round
3052 std::map<std::uint64_t, std::uint64_t> title_write_back; // start -> end, of the submission about to run
3053 std::deque<std::pair<std::uint64_t, std::map<std::uint64_t, std::uint64_t>>> title_write_back_pending; // by ticket
3054 std::uint64_t title_write_back_refused = 0; // ranges past the caps, logged once
3055 std::uint64_t title_write_back_bytes = 0; // queued for this submission
3056 std::uint64_t title_write_back_total = 0; // copied back, all submissions
3057 std::uint64_t title_write_back_calls = 0; // log line count
3058 std::uint64_t title_write_back_unfenced = 0;
3059 static constexpr std::size_t kTitleWriteBackBatches = 64; // pending batches before the oldest goes back unfenced
3060 static constexpr std::size_t kTitleWriteBackRanges = 8192; // ranges kept per submission
3061 static constexpr std::uint64_t kTitleWriteBackBytes = 64ull << 20; // bytes copied back per submission
3062 // The stream pools' mappings (title_gpu_views): one per readable run of a pool. A window is kept for the device's
3063 // life; a geometry copy goes when its view is retired (the pages were freed, unmapped or remapped:
3064 // drain_geometry_releases), and the next request for those pages makes a new one.
2679 struct PoolSpan { 3065 struct PoolSpan {
2680 std::uint64_t source; // the readable side of the pair the copy is made from 3066 std::uint64_t source; // the readable side of the pair the copy is made from
2681 std::uint64_t twin; // the extent's address in the pair's other view (0 when there is none) 3067 std::uint64_t twin; // the extent's address in the pair's other view (0 when there is none)
@@ -2686,6 +3072,7 @@ struct DeviceState {
2686 std::vector<PoolSpan> pool_spans; 3072 std::vector<PoolSpan> pool_spans;
2687 std::atomic<std::size_t> pool_span_count{0}; 3073 std::atomic<std::size_t> pool_span_count{0};
2688 std::uint64_t pool_span_bytes = 0; 3074 std::uint64_t pool_span_bytes = 0;
3075 std::uint64_t pool_spans_retired = 0; // geometry-copy extents whose view was retired (forget_pool_span)
2689 std::uint64_t title_window_refusals = 0; // windows neither the budget nor the arena allowed 3076 std::uint64_t title_window_refusals = 0; // windows neither the budget nor the arena allowed
2690 std::uint64_t unbacked_requests = 0; // title addresses no backing could be made for (zero-size views) 3077 std::uint64_t unbacked_requests = 0; // title addresses no backing could be made for (zero-size views)
2691 3078
@@ -2707,26 +3094,67 @@ struct DeviceState {
2707 // another queue's replay that translated its slots before this retirement may still name it. A ticket read here 3094 // another queue's replay that translated its slots before this retirement may still name it. A ticket read here
2708 // would be one short of this submission, which records its own only after before_execute_ (and with an idle GPU 3095 // would be one short of this submission, which records its own only after before_execute_ (and with an idle GPU
2709 // the view would be reaped in this very call). 3096 // the view would be reaped in this very call).
3097 // A retired view's last copy is made here from the title's pages as they are now, when they are still readable
3098 // (GeometryViews::retire_range).
3099 // A stream-pool extent it backed leaves pool_spans: the next request for those pages makes a new mapping.
2710 void drain_geometry_releases() { 3100 void drain_geometry_releases() {
2711 if (!context || !geometry.has_pending_reclaim()) return; 3101 if (!context || !geometry.has_pending_reclaim()) return;
2712 const std::uint64_t completed_ticket = geometry.has_retired() ? context->completed_retire_ticket() : 0; 3102 const std::uint64_t completed_ticket = geometry.has_retired() ? context->completed_retire_ticket() : 0;
2713 geometry.drain_released(*this, rt::d3d12::GeometryViews::kAfterExecutes, completed_ticket, 3103 geometry.drain_released(
2714 forget_geometry_alias); 3104 *this, rt::d3d12::GeometryViews::kAfterExecutes, completed_ticket,
3105 [this](std::uintptr_t source, std::size_t size, VkDeviceSize va) {
3106 forget_geometry_alias(source, size, va);
3107 forget_pool_span(va);
3108 },
3109 copy_geometry);
3110 }
3111 void forget_pool_span(VkDeviceSize va) {
3112 std::lock_guard windows(title_window_mutex);
3113 const auto it = std::find_if(pool_spans.begin(), pool_spans.end(),
3114 [&](const PoolSpan& span) { return span.geometry && span.shader_va == va; });
3115 if (it == pool_spans.end()) return;
3116 pool_span_bytes -= it->size;
3117 pool_spans.erase(it);
3118 pool_span_count.store(pool_spans.size(), std::memory_order_relaxed);
3119 ++pool_spans_retired;
2715 } 3120 }
2716 // ExecuteCommandLists replays in progress, for GeometryViews::kAfterExecutes (see drain_geometry_releases). 3121 // ExecuteCommandLists replays in progress, for GeometryViews::kAfterExecutes (see drain_geometry_releases).
2717 static std::vector<std::uint64_t>& geometry_execute_serials() { 3122 // A plain aggregate on purpose: a C++ thread_local with a destructor in gta6rt.exe adds TLS callbacks to the image
2718 thread_local std::vector<std::uint64_t> serials; 3123 // the loader's TLS index-0 move must not have (pe_loader.cpp reserve_tls_index0; VulkanContext::stage_xdxr_table
3124 // keeps its range list a member for the same reason). A std::vector here made the title's CRT abort at startup.
3125 struct GeometryExecuteSerials {
3126 static constexpr unsigned kCapacity = 32; // a replay has not been seen nested this deep
3127 std::uint64_t serials[kCapacity]{};
3128 unsigned count{};
3129 unsigned skipped{}; // replays begun while the stack was full: the innermost, ended first
3130 };
3131 static GeometryExecuteSerials& geometry_execute_serials() {
3132 thread_local GeometryExecuteSerials serials;
2719 return serials; 3133 return serials;
2720 } 3134 }
2721 void geometry_execute_begin() { 3135 void geometry_execute_begin() {
2722 if (!geometry.cap()) return; 3136 if (!geometry.cap()) return;
2723 geometry_execute_serials().push_back(geometry.execute_begin()); 3137 auto& serials = geometry_execute_serials();
3138 if (serials.count == GeometryExecuteSerials::kCapacity) {
3139 static std::atomic<bool> logged{false};
3140 if (!logged.exchange(true))
3141 std::fprintf(stderr, "[rt] d3d12: ExecuteCommandLists nested more than %u deep; a geometry view retired "
3142 "in the extra replay is not deferred to it\n",
3143 GeometryExecuteSerials::kCapacity);
3144 ++serials.skipped;
3145 return;
3146 }
3147 serials.serials[serials.count++] = geometry.execute_begin();
2724 } 3148 }
2725 void geometry_execute_end() { 3149 void geometry_execute_end() {
3150 if (!geometry.cap()) return;
2726 auto& serials = geometry_execute_serials(); 3151 auto& serials = geometry_execute_serials();
2727 if (!geometry.cap() || serials.empty()) return; 3152 if (serials.skipped != 0) {
2728 const std::uint64_t serial = serials.back(); 3153 --serials.skipped;
2729 serials.pop_back(); 3154 return;
3155 }
3156 if (serials.count == 0) return;
3157 const std::uint64_t serial = serials.serials[--serials.count];
2730 geometry.execute_end(serial, [this] { return context->submitted_retire_ticket(); }); 3158 geometry.execute_end(serial, [this] { return context->submitted_retire_ticket(); });
2731 } 3159 }
2732 static rt::d3d12::GeometryCopy copy_geometry(std::uint8_t* to, const std::uint8_t* from, std::size_t size) { 3160 static rt::d3d12::GeometryCopy copy_geometry(std::uint8_t* to, const std::uint8_t* from, std::size_t size) {
@@ -2818,7 +3246,8 @@ struct DeviceState {
2818 std::uint8_t* mapped{}; 3246 std::uint8_t* mapped{};
2819 if (arena_allocate(size, kTitleWindowAlign, offset, arena_buffer)) { 3247 if (arena_allocate(size, kTitleWindowAlign, offset, arena_buffer)) {
2820 mapped = arena.mapped + offset; 3248 mapped = arena.mapped + offset;
2821 } else if (stream_windows() && external_windows.allocate(*this, size, offset, mapped)) { 3249 } else if (leonida::memory_breakdown::Owner owner(leonida::memory_breakdown::Consumer::windows);
3250 stream_windows() && external_windows.allocate(*this, size, offset, mapped)) {
2822 external_window_made.store(true, std::memory_order_release); 3251 external_window_made.store(true, std::memory_order_release);
2823 } else { 3252 } else {
2824 ++title_window_refusals; 3253 ++title_window_refusals;
@@ -2840,6 +3269,93 @@ struct DeviceState {
2840 return offset; 3269 return offset;
2841 } 3270 }
2842 3271
3272 // A binding of the title's memory reached for the coming submission: keep its range for the copy back after it.
3273 // Over-inclusive on purpose (a read-only view costs a copy, a write is never missed: a V# has no read/write bit).
3274 void note_title_write(std::uint64_t va, std::uint64_t bytes) {
3275 static const bool on = [] {
3276 char value[2] = {};
3277 std::size_t length = 0;
3278 return getenv_s(&length, value, sizeof(value), "LEONIDA_TITLE_WRITEBACK") != 0 || value[0] != '0';
3279 }();
3280 if (!on || !va || !bytes) return;
3281 std::uint64_t lo = 0, hi = 0;
3282 if (!leonida::title_va_aliases().title_memory(va, lo, hi) || va >= hi) return;
3283 const std::uint64_t end = va + std::min(bytes, hi - va);
3284 std::lock_guard lock(title_write_back_mutex);
3285 auto it = title_write_back.lower_bound(va);
3286 if (it != title_write_back.begin()) {
3287 auto previous = std::prev(it);
3288 if (previous->second >= va) {
3289 if (previous->second < end) previous->second = end;
3290 return;
3291 }
3292 }
3293 if (it != title_write_back.end() && it->first <= end) {
3294 it->second = std::max(it->second, end);
3295 return;
3296 }
3297 if (title_write_back.size() >= kTitleWriteBackRanges || title_write_back_bytes >= kTitleWriteBackBytes) {
3298 if (!title_write_back_refused++)
3299 log_once("past LEONIDA_TITLE_WRITEBACK's caps: reached ranges are not copied back this submission; "
3300 "ranges refused:",
3301 1);
3302 return;
3303 }
3304 title_write_back_bytes += end - va;
3305 title_write_back.emplace(va, end);
3306 }
3307
3308 // What the GPU wrote into those copies goes back to the title's pages, so a later read by the title or the next
3309 // forward copy sees it. Only once the submission that wrote them has completed: a batch carries the ticket of the
3310 // submission after it (a submission's commands are recorded before it exists), and is copied back when the
3311 // context reports that ticket done. Runs at the start of a refresh, under shadow_mutex and before the forward
3312 // copies, so a page the title wrote again is copied forward over the result.
3313 void write_back_titles() {
3314 if (!&context) return;
3315 const std::uint64_t done = context->completed_retire_ticket();
3316 std::vector<std::pair<uint64_t, std::uint64_t>> finished; // one entry per range, collected under the lock
3317 {
3318 std::lock_guard lock(title_write_back_mutex);
3319 if (!title_write_back.empty()) {
3320 // The ranges of the submission about to execute, which is the next ticket.
3321 title_write_back_pending.push_back({context->submitted_retire_ticket() + 1,
3322 std::move(title_write_back)});
3323 title_write_back.clear();
3324 title_write_back_bytes = 0;
3325 }
3326 bool forced = false;
3327 while (!title_write_back_pending.empty() &&
3328 (title_write_back_pending.front().first <= done ||
3329 title_write_back_pending.size() > kTitleWriteBackBatches)) {
3330 forced = forced || title_write_back_pending.front().first > done;
3331 for (const auto& [begin, end] : title_write_back_pending.front().second)
3332 finished.push_back({begin, end});
3333 title_write_back_pending.pop_front();
3334 }
3335 // A queue held deep (console ordering) can leave batches waiting: the oldest go back anyway, once each.
3336 if (forced && !title_write_back_unfenced++)
3337 log_once("more than 64 title write-back batches wait on their submissions: the oldest are copied "
3338 "back without their ticket; batches:",
3339 1);
3340 }
3341 if (finished.empty()) return;
3342 std::uint64_t written = 0, ranges = 0;
3343 for (const auto& [begin, end] : finished)
3344 for (const ShadowPagesPtr& s : shadows)
3345 if (end > s->first() && begin < s->last()) {
3346 const std::uint64_t bytes = s->write_back(begin, end);
3347 written += bytes;
3348 ranges += bytes != 0;
3349 }
3350 title_write_back_total += written;
3351 if (!written) return;
3352 if (++title_write_back_calls <= 4 || !(title_write_back_calls & (title_write_back_calls - 1)))
3353 std::fprintf(stderr, "[rt] d3d12: %llu KiB of the GPU's writes in %llu reached range(s) went back to the "
3354 "title's pages (%llu KiB so far)\n",
3355 static_cast<unsigned long long>(written >> 10), static_cast<unsigned long long>(ranges),
3356 static_cast<unsigned long long>(title_write_back_total >> 10));
3357 }
3358
2843 // A stream pool's address (a CPU view paired with a GPU-only alias). Rule B 3359 // A stream pool's address (a CPU view paired with a GPU-only alias). Rule B
2844 // first: the CPU view is where the host reads the frames, so that is what the copy is made from; the GPU-only 3360 // first: the CPU view is where the host reads the frames, so that is what the copy is made from; the GPU-only
2845 // pages are the same frames through the title's queue slot 31 and are read only when the CPU view is not 3361 // pages are the same frames through the title's queue slot 31 and are read only when the CPU view is not
@@ -3199,8 +3715,8 @@ struct DeviceState {
3199 for (auto& t : b.triangles) { 3715 for (auto& t : b.triangles) {
3200 const std::uint64_t triangles = (t.index_type ? t.index_count : t.vertex_count) / 3; 3716 const std::uint64_t triangles = (t.index_type ? t.index_count : t.vertex_count) / 3;
3201 if (!triangles) continue; 3717 if (!triangles) continue;
3202 // Unindexed: three vertices a triangle. Indexed: the VertexCount the title declared (indices past 3718 // Unindexed: three vertices a triangle. Indexed: the VertexCount the title declared (an index past
3203 // it read past the buffer, as on the console). 3719 // it is not read: xdxr_build.comp vertex() makes its triangle inactive).
3204 const std::uint64_t vertices = t.index_type ? t.vertex_count : 3 * triangles; 3720 const std::uint64_t vertices = t.index_type ? t.vertex_count : 3 * triangles;
3205 const std::uint64_t element = t.vertex_format == VK_FORMAT_R32G32_SFLOAT ? 8 : 12; 3721 const std::uint64_t element = t.vertex_format == VK_FORMAT_R32G32_SFLOAT ? 8 : 12;
3206 const std::uint64_t vertex_bytes = vertices ? (vertices - 1) * t.vertex_stride + element : 0; 3722 const std::uint64_t vertex_bytes = vertices ? (vertices - 1) * t.vertex_stride + element : 0;
@@ -3485,36 +4001,67 @@ struct DeviceState {
3485 } 4001 }
3486 4002
3487 // Indexed by actual Vulkan address, never by a placed buffer's CPU address. 4003 // Indexed by actual Vulkan address, never by a placed buffer's CPU address.
3488 static bool filter_heap_releases() {
3489 static const bool on = [] {
3490 const auto* v = std::getenv("LEONIDA_CONSOLE_RELEASE_FILTER");
3491 return v && std::strcmp(v, "1") == 0;
3492 }();
3493 return on;
3494 }
3495 leonida::DescriptorRangeChanges backing_changes;
3496 std::atomic<uint64_t> released_backings{};
3497 std::atomic<uint64_t> backing_generation{}; // every add and release 4004 std::atomic<uint64_t> backing_generation{}; // every add and release
3498 std::mutex backing_mutex; 4005 std::mutex backing_mutex;
3499 leonida::BufferVaIndex<uint64_t> gpu_backings; 4006 leonida::BufferVaIndex<uint64_t> gpu_backings;
4007
4008 // What changed for the console heaps' slot records (ConsoleHeap::records) since the last submission: backings and
4009 // copies released or added, alias ranges removed or added, title memory added. Unbounded: every change is applied
4010 // at the next refresh_console_heaps, which takes the whole list. Written from any thread, under the lock of what
4011 // changed (backing_mutex, the alias table's); slot_change_mutex is taken last and nothing is taken under it.
4012 // Nothing is kept before a console resource heap with a CPU copy exists (no slot has a record then).
4013 std::mutex slot_change_mutex;
4014 std::vector<leonida::SlotChange> slot_changes;
4015 std::atomic<bool> slot_records_live{false};
4016 void note_slot_change(leonida::SlotChange::Kind kind, std::uint64_t lo, std::uint64_t bytes) {
4017 if (!bytes || !slot_records_live.load(std::memory_order_acquire)) return;
4018 const std::uint64_t hi = lo + bytes < lo ? UINT64_MAX : lo + bytes;
4019 std::lock_guard lock(slot_change_mutex);
4020 slot_changes.push_back({kind, lo, hi});
4021 }
4022 // A device range [address, address + bytes) as the V# bases that name it directly: arena offsets in the V#'s 48
4023 // bits (a buffer below the arena, as sign-extended offsets, vsharp_address). Nothing for a range no V# reaches.
4024 void note_slot_source_added(VkDeviceAddress address, std::uint64_t bytes) {
4025 constexpr std::uint64_t mask = (1ull << 48) - 1;
4026 const std::uint64_t offset = address - arena.address;
4027 if (offset <= mask) note_slot_change(leonida::SlotChange::source_added, offset, bytes);
4028 else if (offset >= ~(mask >> 1)) note_slot_change(leonida::SlotChange::source_added, offset & mask, bytes);
4029 }
4030 // The alias table's changes (TitleVaAliases::add_listener), under its lock.
4031 static void alias_changed(void* device, leonida::TitleVaAliases::Change change, std::uint64_t title_va,
4032 std::uint64_t bytes, std::uint64_t shader_va) {
4033 auto& self = *static_cast<DeviceState*>(device);
4034 using Change = leonida::TitleVaAliases::Change;
4035 if (change == Change::removed) {
4036 // What resolved through the range (by its base), and what names its copy (by the copy's address).
4037 self.note_slot_change(leonida::SlotChange::source_gone, title_va, bytes);
4038 self.note_slot_change(leonida::SlotChange::target_gone, self.arena.address + shader_va, bytes);
4039 } else {
4040 self.note_slot_change(leonida::SlotChange::source_added, title_va, bytes);
4041 }
4042 }
4043
3500 // A title-window or geometry-copy block was destroyed (TitleBufferWindows::destroy_block; its GPU work completed): 4044 // A title-window or geometry-copy block was destroyed (TitleBufferWindows::destroy_block; its GPU work completed):
3501 // as for a released backing, the backed table cuts it and the key entries and heap slots answering into it go at 4045 // as for a released backing, the backed table cuts it and the key entries and heap slots answering into it go at
3502 // the next refresh, so no table names the freed memory. 4046 // the next refresh, so no table names the freed memory.
3503 void title_block_gone(VkDeviceAddress address, VkDeviceSize bytes) { 4047 void title_block_gone(VkDeviceAddress address, VkDeviceSize bytes) {
3504 std::lock_guard lock(backing_mutex); 4048 std::lock_guard lock(backing_mutex);
3505 if (filter_heap_releases()) backing_changes.record(address, bytes);
3506 backing_generation.fetch_add(1, std::memory_order_relaxed); 4049 backing_generation.fetch_add(1, std::memory_order_relaxed);
3507 released_backings.fetch_add(1, std::memory_order_release); 4050 note_slot_change(leonida::SlotChange::target_gone, address, bytes);
3508 if (heap_gpu) released_ranges.emplace_back(address - arena.address, bytes); 4051 if (heap_gpu) released_ranges.emplace_back(address - arena.address, bytes);
3509 } 4052 }
3510 void backing(VkDeviceAddress address, uint64_t bytes, uint64_t id, bool add) { 4053 void backing(VkDeviceAddress address, uint64_t bytes, uint64_t id, bool add) {
3511 std::lock_guard lock(backing_mutex); 4054 std::lock_guard lock(backing_mutex);
3512 if (filter_heap_releases()) backing_changes.record(address, bytes);
3513 backing_generation.fetch_add(1, std::memory_order_relaxed); 4055 backing_generation.fetch_add(1, std::memory_order_relaxed);
3514 if (add) gpu_backings.insert(address, bytes, id); 4056 if (add) {
3515 else { 4057 gpu_backings.insert(address, bytes, id);
4058 // A V# that named this range before it was backed, directly or through an alias, can resolve now.
4059 note_slot_change(leonida::SlotChange::target_added, address, bytes);
4060 note_slot_source_added(address, bytes);
4061 } else {
3516 gpu_backings.erase(address, id); 4062 gpu_backings.erase(address, id);
3517 released_backings.fetch_add(1, std::memory_order_release); 4063 // The heap slots whose copy names it are fixed again at the next refresh.
4064 note_slot_change(leonida::SlotChange::target_gone, address, bytes);
3518 // LEONIDA_CONSOLE_HEAP_GPU: the key entries answering into it go at the next refresh. 4065 // LEONIDA_CONSOLE_HEAP_GPU: the key entries answering into it go at the next refresh.
3519 if (heap_gpu) released_ranges.emplace_back(address - arena.address, bytes); 4066 if (heap_gpu) released_ranges.emplace_back(address - arena.address, bytes);
3520 } 4067 }
@@ -3523,8 +4070,11 @@ struct DeviceState {
3523 enum class VsharpPath { table, shadow, scratch }; 4070 enum class VsharpPath { table, shadow, scratch };
3524 enum class VsharpResult { unchanged, rebased, empty }; 4071 enum class VsharpResult { unchanged, rebased, empty };
3525 4072
4073 // `refused` (when given): for an answer of 0, the copy an alias range named that was not backed (0: none), so the
4074 // console heap's slot record is found again when a backing is added there.
3526 uint64_t vsharp_address(uint64_t base, uint64_t bytes, leonida::TitleVaAliases::Kind kind = leonida::TitleVaAliases::created_view, 4075 uint64_t vsharp_address(uint64_t base, uint64_t bytes, leonida::TitleVaAliases::Kind kind = leonida::TitleVaAliases::created_view,
3527 bool make_window = true, bool try_geometry = false) { 4076 bool make_window = true, bool try_geometry = false, uint64_t* refused = nullptr) {
4077 if (refused) *refused = 0;
3528 if (!base || !bytes) return 0; 4078 if (!base || !bytes) return 0;
3529 auto& aliases = leonida::title_va_aliases(); 4079 auto& aliases = leonida::title_va_aliases();
3530 constexpr uint64_t mask = (1ull << 48) - 1; 4080 constexpr uint64_t mask = (1ull << 48) - 1;
@@ -3551,7 +4101,10 @@ struct DeviceState {
3551 const auto path = [this](unsigned p) { vsharp_paths[p].fetch_add(1, std::memory_order_relaxed); }; 4101 const auto path = [this](unsigned p) { vsharp_paths[p].fetch_add(1, std::memory_order_relaxed); };
3552 uint64_t to{}, room{}; 4102 uint64_t to{}, room{};
3553 if (aliases.range_of(base, to, room)) { 4103 if (aliases.range_of(base, to, room)) {
3554 if (!to || room < bytes || !backed(to)) return path(1), 0; 4104 if (!to || room < bytes || !backed(to)) {
4105 if (refused) *refused = to;
4106 return path(1), 0;
4107 }
3555 aliases.note_translation(kind); 4108 aliases.note_translation(kind);
3556 return path(0), to; 4109 return path(0), to;
3557 } 4110 }
@@ -3571,6 +4124,7 @@ struct DeviceState {
3571 uint64_t mapped{}; 4124 uint64_t mapped{};
3572 if (to && aliases.range_of(base, mapped, room) && mapped == to && room >= bytes && backed(to)) 4125 if (to && aliases.range_of(base, mapped, room) && mapped == to && room >= bytes && backed(to))
3573 return path(4), to; 4126 return path(4), to;
4127 if (refused) *refused = to;
3574 } 4128 }
3575 return path(5), 0; 4129 return path(5), 0;
3576 } 4130 }
@@ -3578,7 +4132,51 @@ struct DeviceState {
3578 static constexpr unsigned kVsharpPathCount = 6; 4132 static constexpr unsigned kVsharpPathCount = 6;
3579 std::array<std::atomic<std::uint64_t>, kVsharpPathCount> vsharp_paths{}; 4133 std::array<std::atomic<std::uint64_t>, kVsharpPathCount> vsharp_paths{};
3580 4134
3581 VsharpResult fix_vsharp(uint32_t* w, VsharpPath path) { 4135 // LEONIDA_UNBACKED_VSHARP=1 (diagnostic): the buffer V#s fix_vsharp writes empty because nothing backs their base.
4136 // One line for each of the first 120 distinct bases (span and stride), and every 8192 such V#s a summary by 4 GiB
4137 // range of the base, so the address ranges the world's data comes from can be compared with the title memory.
4138 static void note_unbacked_vsharp(uint64_t base, uint64_t span, uint32_t stride, const uint32_t* w) {
4139 static const bool on = [] {
4140 const char* v = std::getenv("LEONIDA_UNBACKED_VSHARP");
4141 return v && *v == '1';
4142 }();
4143 if (!on) return;
4144 static std::mutex mutex;
4145 static std::unordered_map<uint64_t, uint64_t> seen; // base -> span
4146 static std::map<uint64_t, uint64_t> by_range; // base >> 32 -> distinct bases
4147 static uint64_t count = 0;
4148 std::lock_guard lock(mutex);
4149 ++count;
4150 if (seen.emplace(base, span).second) {
4151 ++by_range[base >> 32];
4152 if (seen.size() <= 120)
4153 std::fprintf(stderr,
4154 "[rt] unbacked-vsharp: #%zu base 0x%llx span %llu stride %u words %08x %08x %08x %08x\n",
4155 seen.size(), static_cast<unsigned long long>(base), static_cast<unsigned long long>(span),
4156 stride, w[0], w[1], w[2], w[3]);
4157 }
4158 if (!(count % 8192)) {
4159 std::vector<std::pair<uint64_t, uint64_t>> top;
4160 for (const auto& [range, n] : by_range) top.emplace_back(n, range);
4161 std::sort(top.rbegin(), top.rend());
4162 std::string text;
4163 char item[64];
4164 for (std::size_t i = 0; i < top.size() && i < 10; ++i) {
4165 std::snprintf(item, sizeof(item), "%s0x%llx00000000 x%llu", i ? "; " : "",
4166 static_cast<unsigned long long>(top[i].second), static_cast<unsigned long long>(top[i].first));
4167 text += item;
4168 }
4169 std::fprintf(stderr, "[rt] unbacked-vsharp: %llu empty V#s, %zu distinct bases; by 4 GiB range: %s\n",
4170 static_cast<unsigned long long>(count), seen.size(), text.c_str());
4171 }
4172 }
4173
4174 // What fix_vsharp resolved a V# to, for a console heap's slot record (ConsoleHeapSlotRecords::set).
4175 struct VsharpRecord {
4176 leonida::ConsoleHeapSlotRecords::State state = leonida::ConsoleHeapSlotRecords::none;
4177 uint64_t base = 0, span = 0, target = 0;
4178 };
4179 VsharpResult fix_vsharp(uint32_t* w, VsharpPath path, VsharpRecord* record = nullptr) {
3582 if ((w[3] >> 30) || !w[2]) return VsharpResult::unchanged; // image, empty slot or raw pointer 4180 if ((w[3] >> 30) || !w[2]) return VsharpResult::unchanged; // image, empty slot or raw pointer
3583 const uint64_t base = uint64_t(w[0]) | (uint64_t(w[1] & 0xffff) << 32); 4181 const uint64_t base = uint64_t(w[0]) | (uint64_t(w[1] & 0xffff) << 32);
3584 const uint32_t stride = (w[1] >> 16) & 0x3fffu; 4182 const uint32_t stride = (w[1] >> 16) & 0x3fffu;
@@ -3587,8 +4185,16 @@ struct DeviceState {
3587 leonida::gfx10::Buffer desc{}; 4185 leonida::gfx10::Buffer desc{};
3588 const bool copy_geometry = leonida::gfx10::decode(words, desc) && 4186 const bool copy_geometry = leonida::gfx10::decode(words, desc) &&
3589 (path != VsharpPath::scratch || span <= kTitleWindowMax || (desc.format && leonida::gfx10::encode(desc) == words)); 4187 (path != VsharpPath::scratch || span <= kTitleWindowMax || (desc.format && leonida::gfx10::encode(desc) == words));
4188 uint64_t refused = 0;
3590 const auto to = vsharp_address(base, span, leonida::TitleVaAliases::table_view, 4189 const auto to = vsharp_address(base, span, leonida::TitleVaAliases::table_view,
3591 path != VsharpPath::scratch, copy_geometry); 4190 path != VsharpPath::scratch, copy_geometry, &refused);
4191 if (record) {
4192 // The copy's device address (mod 2^64: a buffer below the arena has a negative offset).
4193 record->state = to ? leonida::ConsoleHeapSlotRecords::resolved : leonida::ConsoleHeapSlotRecords::waiting;
4194 record->base = base;
4195 record->span = span;
4196 record->target = to ? arena.address + to : refused ? arena.address + refused : 0;
4197 }
3592 if (!to) { 4198 if (!to) {
3593 static std::atomic_flag noted[3]{}; 4199 static std::atomic_flag noted[3]{};
3594 if (!noted[unsigned(path)].test_and_set(std::memory_order_relaxed)) { 4200 if (!noted[unsigned(path)].test_and_set(std::memory_order_relaxed)) {
@@ -3597,6 +4203,7 @@ struct DeviceState {
3597 std::fprintf(stderr, "[rt] d3d12: %s V# at 0x%llx (%llu bytes) has no GPU backing; zero records\n", 4203 std::fprintf(stderr, "[rt] d3d12: %s V# at 0x%llx (%llu bytes) has no GPU backing; zero records\n",
3598 where, (unsigned long long)base, (unsigned long long)span); 4204 where, (unsigned long long)base, (unsigned long long)span);
3599 } 4205 }
4206 note_unbacked_vsharp(base, span, stride, w);
3600 w[0] = w[1] = w[2] = 0; 4207 w[0] = w[1] = w[2] = 0;
3601 return VsharpResult::empty; 4208 return VsharpResult::empty;
3602 } 4209 }
@@ -3792,13 +4399,13 @@ struct DeviceState {
3792 [](const PoolSpan& span) { return span.geometry; }); 4399 [](const PoolSpan& span) { return span.geometry; });
3793 std::fprintf(stderr, 4400 std::fprintf(stderr,
3794 "[rt] d3d12: title memory: %zu windows (%llu KiB of a %llu MiB budget, %llu refused), %zu " 4401 "[rt] d3d12: title memory: %zu windows (%llu KiB of a %llu MiB budget, %llu refused), %zu "
3795 "stream-pool extents (one mapping each, %llu KiB; %lld by geometry copy), %llu addresses " 4402 "stream-pool extents (one mapping each, %llu KiB; %lld by geometry copy, %llu retired with "
3796 "given a zero-size view\n", 4403 "their copy), %llu addresses given a zero-size view\n",
3797 title_windows.size(), static_cast<unsigned long long>(title_window_bytes >> 10), 4404 title_windows.size(), static_cast<unsigned long long>(title_window_bytes >> 10),
3798 static_cast<unsigned long long>(title_window_cap >> 20), 4405 static_cast<unsigned long long>(title_window_cap >> 20),
3799 static_cast<unsigned long long>(title_window_refusals), pool_spans.size(), 4406 static_cast<unsigned long long>(title_window_refusals), pool_spans.size(),
3800 static_cast<unsigned long long>(pool_span_bytes >> 10), 4407 static_cast<unsigned long long>(pool_span_bytes >> 10),
3801 static_cast<long long>(geometry_spans), 4408 static_cast<long long>(geometry_spans), static_cast<unsigned long long>(pool_spans_retired),
3802 static_cast<unsigned long long>(unbacked_requests)); 4409 static_cast<unsigned long long>(unbacked_requests));
3803 } 4410 }
3804 } 4411 }
@@ -3813,7 +4420,7 @@ struct DeviceState {
3813 backing(arena.address + offset, bytes, offset, false); 4420 backing(arena.address + offset, bytes, offset, false);
3814 arena.in_use -= bytes; 4421 arena.in_use -= bytes;
3815 arena.use_in_use[use] -= bytes; 4422 arena.use_in_use[use] -= bytes;
3816 // A heap copy re-fixes its slots when a backing has gone (released_backings): the range is no view's. 4423 // A heap copy re-fixes the slots that named a backing that has gone (slot_changes): the range is no view's.
3817 backing(arena.address + offset, bytes, offset, false); 4424 backing(arena.address + offset, bytes, offset, false);
3818 } 4425 }
3819 if (fault != leonida::ArenaBlocks::Fault::none && arena_report_due()) { 4426 if (fault != leonida::ArenaBlocks::Fault::none && arena_report_due()) {
@@ -3875,25 +4482,17 @@ struct DeviceState {
3875 VkDeviceMemory memory = VK_NULL_HANDLE; 4482 VkDeviceMemory memory = VK_NULL_HANDLE;
3876 std::uint64_t pin = 0; // the imported pages' leonida::kernel_writes pin while `memory` lives 4483 std::uint64_t pin = 0; // the imported pages' leonida::kernel_writes pin while `memory` lives
3877 std::size_t scan_at = 0; // the next slot the T# scan reads 4484 std::size_t scan_at = 0; // the next slot the T# scan reads
3878 uint64_t checked_generation{}, alias_generation{}, backing_cursor{}, alias_cursor{};
3879 uint64_t release_sweeps{}, release_candidates{}, release_fixes{}, release_rebases{}, release_full{};
3880 // copy 4485 // copy
3881 bool identity = false; 4486 bool identity = false;
3882 ShadowPagesPtr pages; 4487 ShadowPagesPtr pages;
3883 std::vector<std::uint8_t> mirror; // the title's bytes as the tracker last copied them 4488 std::vector<std::uint8_t> mirror; // the title's bytes as the tracker last copied them
3884 std::vector<std::uint8_t> made; // the title's bytes each arena slot was last made from 4489 std::vector<std::uint8_t> made; // the title's bytes each arena slot was last made from
3885 std::vector<std::uint8_t> retry; // per slot: not settled yet (fix_console_slot), in `retries` 4490 std::vector<std::uint8_t> retry; // per slot: not settled yet (fix_console_slot), in `retries`
3886 leonida::ConsoleHeapVsharpSlots live_vsharps; // slots whose GPU copy holds a live buffer V# 4491 // A resource heap's V# halves: what each resolved to (fix_console_slot), so a change of the address space
4492 // re-fixes the slots it touches (apply_slot_changes), and a V# whose buffer comes later is fixed when it does.
4493 leonida::ConsoleHeapSlotRecords records;
3887 std::vector<std::uint32_t> retries; 4494 std::vector<std::uint32_t> retries;
3888 std::set<std::uint32_t> empty_slots;
3889 std::uint32_t next_empty = 0;
3890 std::size_t retry_at = 0; // where retry_console_slots goes on 4495 std::size_t retry_at = 0; // where retry_console_slots goes on
3891 // V#s naming an address nothing backs that is not the title's memory: null in the copy, and looked at again a
3892 // few times (kUnmappedTries, at most kUnmappedRetrySlots a submission) in case their buffer is made after the
3893 // descriptor.
3894 std::vector<std::uint8_t> unmapped_tries; // per slot: 0, or the looks so far (it is in `unmapped`)
3895 std::vector<std::uint32_t> unmapped;
3896 std::size_t unmapped_at = 0;
3897 // fix_console_slots' budget, for the current refresh, and the slots it nulled since the last log line 4496 // fix_console_slots' budget, for the current refresh, and the slots it nulled since the last log line
3898 std::chrono::steady_clock::time_point fix_start{}; 4497 std::chrono::steady_clock::time_point fix_start{};
3899 bool fix_over = false; 4498 bool fix_over = false;
@@ -3908,10 +4507,11 @@ struct DeviceState {
3908 double ms = 0, pages_ms = 0, fix_ms = 0, retry_ms = 0; // ms: all; the others its parts 4507 double ms = 0, pages_ms = 0, fix_ms = 0, retry_ms = 0; // ms: all; the others its parts
3909 // Changed slots by class (before the fix budget), since the last log line: all-zero, V# pair, T#, other 4508 // Changed slots by class (before the fix budget), since the last log line: all-zero, V# pair, T#, other
3910 // words; V# halves whose 16 bytes were seen before (a direct-mapped memo of 65536 keys, so a lower bound of 4509 // words; V# halves whose 16 bytes were seen before (a direct-mapped memo of 65536 keys, so a lower bound of
3911 // how often an exact-key translation would be found again); rescans after a backing release and their cost. 4510 // how often an exact-key translation would be found again); the slot records' work: changes applied, index
4511 // entries looked at, slots fixed again, and its time.
3912 std::uint64_t changed[4] = {}, vsharp_halves = 0, vsharp_repeats = 0; 4512 std::uint64_t changed[4] = {}, vsharp_halves = 0, vsharp_repeats = 0;
3913 std::uint64_t rescans = 0, rescanned = 0; 4513 std::uint64_t record_changes = 0, record_looked = 0, record_refixed = 0;
3914 double rescan_ms = 0; 4514 double record_ms = 0;
3915 std::vector<std::array<std::uint32_t, 4>> seen_keys; 4515 std::vector<std::array<std::uint32_t, 4>> seen_keys;
3916 // LEONIDA_CONSOLE_HEAP_GPU (DeviceState::attach_console_heap_gpu): the translation pass's index of this heap 4516 // LEONIDA_CONSOLE_HEAP_GPU (DeviceState::attach_console_heap_gpu): the translation pass's index of this heap
3917 // (-1: fixed on the CPU), the import of `input` the pass reads, the slots holding a V# pair (translated again 4517 // (-1: fixed on the CPU), the import of `input` the pass reads, the slots holding a V# pair (translated again
@@ -3987,38 +4587,31 @@ struct DeviceState {
3987 return true; 4587 return true;
3988 } 4588 }
3989 4589
3990 // Slot `slot` of a heap copy, as the title wrote it, fixed up as described above. True when it is settled: not a 4590 // Slot `slot` of a heap copy, as the title wrote it, fixed up as described above, and the only writer of a
3991 // T# whose texture is still to come, nor a V# into the title's memory that got no copy. `unmapped` (when given) is 4591 // resource heap's slot records. True when it is settled: not a T# whose texture is still to come. A sampler heap
3992 // set for a V# written null because its base is neither the title's memory nor anything of the device's: settled, 4592 // holds S#s: copied as written.
3993 // but its buffer may still be made (the round-robin probe in refresh_console_heap). A sampler heap holds S#s: 4593 bool fix_console_slot(ConsoleHeap& heap, std::size_t slot) {
3994 // copied as written.
3995 bool fix_console_slot(ConsoleHeap& heap, std::size_t slot, bool* unmapped = nullptr) {
3996 std::uint32_t w[kDescriptorSize / 4]; 4594 std::uint32_t w[kDescriptorSize / 4];
3997 std::memcpy(w, heap.previous + slot * kDescriptorSize, kDescriptorSize); 4595 std::memcpy(w, heap.previous + slot * kDescriptorSize, kDescriptorSize);
3998 bool settled = true, empty = false; 4596 bool settled = true, vsharp = false;
3999 if (unmapped) *unmapped = false; 4597 VsharpRecord halves[2];
4000 const VsharpPath path = heap.scratch ? VsharpPath::scratch : VsharpPath::shadow; 4598 const VsharpPath path = heap.scratch ? VsharpPath::scratch : VsharpPath::shadow;
4001 if (!heap.resource_heap || !(w[0] | w[1] | w[2] | w[3])) { 4599 if (!heap.resource_heap || !(w[0] | w[1] | w[2] | w[3])) {
4002 // A sampler heap holds S#s (copied as written); an all-zero slot stays null. 4600 // A sampler heap holds S#s (copied as written); an all-zero slot stays null.
4003 } else if (!(w[3] >> 30)) { 4601 } else if (!(w[3] >> 30)) {
4004 // A buffer V#: rewritten to the address its bytes are backed at (fix_vsharp: the console shadow, or the 4602 // A buffer V#: rewritten to the address its bytes are backed at (fix_vsharp: the console shadow, or the
4005 // console scratch an imported heap rewrites). A base nothing backs is written with no base and no records, 4603 // console scratch an imported heap rewrites). A base nothing backs is written with no base and no records
4006 // settled, and left for the bounded round-robin probe in refresh_console_heap in case its buffer is made 4604 // and recorded as waiting: a backing, alias range or title memory added over it fixes the slot again
4007 // after the descriptor. 4605 // (apply_slot_changes).
4008 const VsharpResult result = fix_vsharp(w, path); 4606 vsharp = true;
4607 const VsharpResult result = fix_vsharp(w, path, &halves[0]);
4009 if (result == VsharpResult::rebased) ++heap.vsharps; 4608 if (result == VsharpResult::rebased) ++heap.vsharps;
4010 if (result == VsharpResult::empty) { 4609 // Only the GPU copy changes; the title's bytes (heap.previous) stay as written.
4011 // Only the GPU copy changes; the title's bytes (heap.previous) stay as written. 4610 if (result == VsharpResult::empty) ++heap.unbacked;
4012 ++heap.unbacked;
4013 empty = true;
4014 }
4015 // The slot's second V# is a UAV counter (raw, 4 bytes, in the descriptor's upper 16 bytes): a store to it at 4611 // The slot's second V# is a UAV counter (raw, 4 bytes, in the descriptor's upper 16 bytes): a store to it at
4016 // heap_base + a raw title address loses the device just as one through the buffer V# does. A counter with 4612 // heap_base + a raw title address loses the device just as one through the buffer V# does. A counter with
4017 // no backing is nulled and left to retry_console_slots. 4613 // no backing is nulled and waits as the buffer V# does.
4018 if (fix_vsharp(w + 4, path) == VsharpResult::empty) { 4614 if (fix_vsharp(w + 4, path, &halves[1]) == VsharpResult::empty) ++heap.unbacked;
4019 ++heap.unbacked;
4020 empty = true;
4021 }
4022 } else { 4615 } else {
4023 leonida::gfx10::ImageWords words; 4616 leonida::gfx10::ImageWords words;
4024 std::memcpy(words.data(), w, sizeof(words)); 4617 std::memcpy(words.data(), w, sizeof(words));
@@ -4037,15 +4630,20 @@ struct DeviceState {
4037 // Neither a buffer V# (TYPE is not 0) nor a T# the layer can decode: data the title keeps in the slot. 4630 // Neither a buffer V# (TYPE is not 0) nor a T# the layer can decode: data the title keeps in the slot.
4038 // No image is found by these words (the bindless lookup misses, as for a null T#), but a shader that 4631 // No image is found by these words (the bindless lookup misses, as for a null T#), but a shader that
4039 // takes the slot as a V# (an index from data, or one past what the title filled) adds heap_base to 4632 // takes the slot as a V# (an index from data, or one past what the title filled) adds heap_base to
4040 // words that name nothing: in the GPU copy the slot is null, and left to retry_console_slots. 4633 // words that name nothing: in the GPU copy the slot is null.
4041 ++heap.images[unsigned(TitleImage::not_tsharp)]; 4634 ++heap.images[unsigned(TitleImage::not_tsharp)];
4042 std::memset(w, 0, 16); 4635 std::memset(w, 0, 16);
4043 } 4636 }
4044 } 4637 }
4045 if (empty) heap.empty_slots.insert(std::uint32_t(slot));
4046 else if (!heap.empty_slots.empty()) heap.empty_slots.erase(std::uint32_t(slot));
4047 std::memcpy(heap.copy + slot * kDescriptorSize, w, kDescriptorSize); 4638 std::memcpy(heap.copy + slot * kDescriptorSize, w, kDescriptorSize);
4048 heap.live_vsharps.set(slot, leonida::ConsoleHeapVsharpSlots::is_live_vsharp(w)); 4639 if (heap.resource_heap) {
4640 if (vsharp)
4641 for (unsigned half = 0; half < 2; ++half)
4642 heap.records.set(slot, half, halves[half].state, halves[half].base, halves[half].span,
4643 halves[half].target);
4644 else
4645 heap.records.clear(slot);
4646 }
4049 return settled; 4647 return settled;
4050 } 4648 }
4051 4649
@@ -4100,14 +4698,19 @@ struct DeviceState {
4100 const std::size_t slot = at / kDescriptorSize; 4698 const std::size_t slot = at / kDescriptorSize;
4101 if (!std::memcmp(heap.previous + at, heap.input + at, kDescriptorSize)) continue; 4699 if (!std::memcmp(heap.previous + at, heap.input + at, kDescriptorSize)) continue;
4102 std::memcpy(heap.previous + at, heap.input + at, kDescriptorSize); 4700 std::memcpy(heap.previous + at, heap.input + at, kDescriptorSize);
4103 if (heap.unmapped_tries[slot]) heap.unmapped_tries[slot] = 1; // new words: their looks start over
4104 note_changed_slot(heap, heap.previous + at); 4701 note_changed_slot(heap, heap.previous + at);
4105 if (budget_us && !heap.fix_over && !(++heap.fix_count & 15) && 4702 if (budget_us && !heap.fix_over && !(++heap.fix_count & 15) &&
4106 std::chrono::steady_clock::now() - heap.fix_start >= std::chrono::microseconds(budget_us)) 4703 std::chrono::steady_clock::now() - heap.fix_start >= std::chrono::microseconds(budget_us))
4107 heap.fix_over = true; 4704 heap.fix_over = true;
4108 if (heap.fix_over) { 4705 // Buffer V#s (!(w3 >> 30)) only rebase address offsets, so they are fast and must never be
4706 // deferred or nulled: at the first world frame lib_cs_01144 reads its loop bound from a buffer
4707 // slot; nulling it causes an infinite loop and device loss. Only image T#s are deferred past budget.
4708 std::uint32_t w3 = 0;
4709 std::memcpy(&w3, heap.previous + at + 12, sizeof(w3));
4710 const bool is_buffer_vsharp = !(w3 >> 30);
4711 if (heap.fix_over && !is_buffer_vsharp) {
4109 std::memset(heap.copy + at, 0, kDescriptorSize); 4712 std::memset(heap.copy + at, 0, kDescriptorSize);
4110 heap.live_vsharps.clear(slot); 4713 heap.records.clear(slot);
4111 ++heap.deferred_fixes; 4714 ++heap.deferred_fixes;
4112 if (!heap.retry[slot]) { 4715 if (!heap.retry[slot]) {
4113 heap.retry[slot] = 1; 4716 heap.retry[slot] = 1;
@@ -4115,49 +4718,34 @@ struct DeviceState {
4115 } 4718 }
4116 continue; 4719 continue;
4117 } 4720 }
4118 bool unmapped = false; 4721 if (fix_console_slot(heap, slot)) {
4119 if (fix_console_slot(heap, slot, &unmapped)) {
4120 heap.retry[slot] = 0; 4722 heap.retry[slot] = 0;
4121 } else if (!heap.retry[slot]) { 4723 } else if (!heap.retry[slot]) {
4122 heap.retry[slot] = 1; 4724 heap.retry[slot] = 1;
4123 heap.retries.push_back(std::uint32_t(slot)); 4725 heap.retries.push_back(std::uint32_t(slot));
4124 } 4726 }
4125 if (unmapped && !heap.unmapped_tries[slot]) {
4126 heap.unmapped_tries[slot] = 1;
4127 heap.unmapped.push_back(std::uint32_t(slot));
4128 }
4129 }
4130 }
4131
4132 // The V#s fix_console_slot wrote null because nothing backs their base: looked at again, round robin, at most
4133 // kUnmappedRetrySlots a submission, each kUnmappedTries times at most. A descriptor the title wrote before making
4134 // its buffer (or a buffer another thread registers just after) then gets its base back; one that stays unmapped
4135 // drops out of the list, so data the title keeps in its heap does not cost a lookup at every submission.
4136 static constexpr std::size_t kUnmappedRetrySlots = 2048;
4137 static constexpr std::uint8_t kUnmappedTries = 4;
4138 void retry_unmapped_slots(ConsoleHeap& heap) {
4139 std::size_t i = heap.unmapped_at;
4140 // Each entry once a submission at most: the looks are a submission apart.
4141 const std::size_t visits = std::min(kUnmappedRetrySlots, heap.unmapped.size());
4142 for (std::size_t visited = 0; visited < visits && !heap.unmapped.empty(); ++visited) {
4143 if (i >= heap.unmapped.size()) i = 0;
4144 const std::uint32_t slot = heap.unmapped[i];
4145 // Zeroed since (unmapped_tries reset), reachable now, or out of looks: out of the list.
4146 bool done = !heap.unmapped_tries[slot];
4147 if (!done) {
4148 bool unmapped = false;
4149 fix_console_slot(heap, slot, &unmapped);
4150 done = !unmapped || ++heap.unmapped_tries[slot] > kUnmappedTries;
4151 }
4152 if (done) {
4153 heap.unmapped_tries[slot] = 0;
4154 heap.unmapped[i] = heap.unmapped.back();
4155 heap.unmapped.pop_back();
4156 } else {
4157 ++i;
4158 }
4159 } 4727 }
4160 heap.unmapped_at = i; 4728 }
4729
4730 // The changes since the last submission (slot_changes), applied to a resource heap's copy: each slot whose record
4731 // a change touches is fixed again - a V# whose backing, copy or alias range went, so the copy never names freed
4732 // memory, and a waiting V# over which a backing, alias range or title memory was added. Only the slots near the
4733 // changed ranges are looked at (ConsoleHeapSlotRecords::touched); nothing reads the copy.
4734 std::vector<std::uint32_t> slot_change_scratch; // console_heap_mutex
4735 void apply_slot_changes(ConsoleHeap& heap, const std::vector<leonida::SlotChange>& changes) {
4736 if (!heap.resource_heap || changes.empty()) return;
4737 const auto start = std::chrono::steady_clock::now();
4738 const std::uint64_t looked = heap.records.looked_at();
4739 heap.records.touched(changes.data(), changes.size(), slot_change_scratch);
4740 heap.record_changes += changes.size();
4741 heap.record_looked += heap.records.looked_at() - looked;
4742 heap.record_refixed += slot_change_scratch.size();
4743 for (const std::uint32_t slot : slot_change_scratch)
4744 if (!fix_console_slot(heap, slot) && !heap.retry[slot]) {
4745 heap.retry[slot] = 1;
4746 heap.retries.push_back(slot);
4747 }
4748 heap.record_ms += std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - start).count();
4161 } 4749 }
4162 4750
4163 // The slots of a heap copy not settled yet: fixed again, and kept while they are still not. Round robin, for at 4751 // The slots of a heap copy not settled yet: fixed again, and kept while they are still not. Round robin, for at
@@ -4199,7 +4787,9 @@ struct DeviceState {
4199 unbound_tsharp_tracker().note(heap.console_va, offset, words, why); 4787 unbound_tsharp_tracker().note(heap.console_va, offset, words, why);
4200 } 4788 }
4201 4789
4202 void refresh_console_heap(ConsoleHeap& heap) { // console_heap_mutex held 4790 // `changes`: what changed since the last submission (refresh_console_heaps took it from slot_changes), or null for
4791 // a heap's first refresh, which has no records yet.
4792 void refresh_console_heap(ConsoleHeap& heap, const std::vector<leonida::SlotChange>* changes) { // console_heap_mutex held
4203 if (heap.imported) return; // directly imported sampler heap 4793 if (heap.imported) return; // directly imported sampler heap
4204 if (heap.gpu >= 0) return refresh_console_heap_gpu(heap); 4794 if (heap.gpu >= 0) return refresh_console_heap_gpu(heap);
4205 using clock = std::chrono::steady_clock; 4795 using clock = std::chrono::steady_clock;
@@ -4213,90 +4803,20 @@ struct DeviceState {
4213 std::memset(heap.previous + offset, 0, bytes); 4803 std::memset(heap.previous + offset, 0, bytes);
4214 const auto first = std::uint32_t(offset / kDescriptorSize); 4804 const auto first = std::uint32_t(offset / kDescriptorSize);
4215 const auto end = std::uint32_t((offset + bytes) / kDescriptorSize); 4805 const auto end = std::uint32_t((offset + bytes) / kDescriptorSize);
4216 heap.empty_slots.erase(heap.empty_slots.lower_bound(first), heap.empty_slots.lower_bound(end)); 4806 for (auto slot = first; slot < end; ++slot) heap.retry[slot] = 0;
4217 for (auto slot = first; slot < end; ++slot) { 4807 if (heap.resource_heap) heap.records.clear_range(first, end);
4218 heap.retry[slot] = 0;
4219 heap.unmapped_tries[slot] = 0;
4220 }
4221 heap.live_vsharps.clear_range(first, end);
4222 }); 4808 });
4223 const auto t1 = clock::now(); 4809 const auto t1 = clock::now();
4224 heap.fix_start = t1; 4810 heap.fix_start = t1;
4225 heap.fix_over = false; 4811 heap.fix_over = false;
4226 heap.fix_count = 0; 4812 heap.fix_count = 0;
4227 heap.pages->for_each_copied([&](std::size_t offset, std::size_t bytes) { fix_console_slots(heap, offset, bytes); }); 4813 heap.pages->for_each_copied([&](std::size_t offset, std::size_t bytes) { fix_console_slots(heap, offset, bytes); });
4228 const auto generation = released_backings.load(std::memory_order_acquire); 4814 // Even an unchanged title slot may name a buffer released since the last submission: the slots the changes
4229 const auto alias_generation = leonida::title_va_aliases().invalidations(); 4815 // touch are fixed again, found by their records.
4230 if (heap.resource_heap && (generation != heap.checked_generation || alias_generation != heap.alias_generation)) { 4816 if (changes) apply_slot_changes(heap, *changes);
4231 heap.alias_generation = alias_generation;
4232 heap.checked_generation = generation;
4233 leonida::DescriptorRanges backing, aliases;
4234 bool filtered = filter_heap_releases();
4235 if (filtered) {
4236 {
4237 std::lock_guard lock(backing_mutex);
4238 filtered = backing_changes.read(heap.backing_cursor, backing);
4239 }
4240 filtered &= leonida::title_va_aliases().changed_ranges(heap.alias_cursor, aliases);
4241 backing.merge();
4242 aliases.merge();
4243 }
4244 ++heap.release_sweeps;
4245 heap.release_full += !filtered;
4246 const auto bda = [&](uint64_t base) {
4247 if (signed_vsharp_offsets() && (base & (1ull << 47))) base |= ~((1ull << 48)-1);
4248 return arena.address + base;
4249 };
4250 const auto affected = [&](const uint32_t* src, const uint32_t* dst) {
4251 if ((src[3] >> 30) || !src[2]) return false;
4252 const uint64_t base = uint64_t(src[0]) | (uint64_t(src[1] & 0xffff) << 32);
4253 const uint64_t fixed = uint64_t(dst[0]) | (uint64_t(dst[1] & 0xffff) << 32);
4254 const auto stride = (src[1] >> 16) & 0x3fff;
4255 const uint64_t bytes = uint64_t(src[2]) * (stride ? stride : 1);
4256 return aliases.overlaps(base, 1) || backing.overlaps(bda(base), bytes) ||
4257 (dst[2] && backing.overlaps(bda(fixed), bytes));
4258 };
4259 const auto before = heap.vsharps;
4260 ++heap.rescans;
4261 const auto rescan_start = clock::now();
4262 // Even an unchanged title slot may name a buffer released since the last submission.
4263 // Walk the host-RAM V# bitset instead of reading every slot of `heap.copy` (which may be uncached WC VRAM).
4264 heap.live_vsharps.for_each([&](std::size_t slot) {
4265 ++heap.release_candidates;
4266 if (filtered) {
4267 const auto at = slot * kDescriptorSize;
4268 const auto* src = reinterpret_cast<const uint32_t*>(heap.previous + at);
4269 const auto* dst = reinterpret_cast<const uint32_t*>(heap.copy + at);
4270 if (!affected(src, dst) && !affected(src + 4, dst + 4)) return;
4271 }
4272 ++heap.release_fixes;
4273 ++heap.rescanned;
4274 if (!fix_console_slot(heap, slot) && !heap.retry[slot]) {
4275 heap.retry[slot] = 1;
4276 heap.retries.push_back(uint32_t(slot));
4277 }
4278 });
4279 heap.release_rebases += heap.vsharps - before;
4280 heap.rescan_ms += ms(rescan_start, clock::now());
4281 }
4282 const auto t2 = clock::now(); 4817 const auto t2 = clock::now();
4283 // A settled zero can acquire GPU backing without a CPU map event. Probe at most eight in 4818 // T#s whose texture is not there yet, and slots the fix budget deferred.
4284 // round-robin order every 32 submissions. Keep texture and copy-budget retries independent.
4285 if ((heap.refreshes & 31) == 31 && !heap.empty_slots.empty()) {
4286 auto it = heap.empty_slots.lower_bound(heap.next_empty);
4287 const auto count = (std::min)(std::size_t{8}, heap.empty_slots.size());
4288 for (std::size_t n = 0; n < count && !heap.empty_slots.empty(); ++n) {
4289 if (it == heap.empty_slots.end()) it = heap.empty_slots.begin();
4290 const auto slot = *it++;
4291 heap.next_empty = slot + 1;
4292 if (!heap.retry[slot]) {
4293 fix_console_slot(heap, slot);
4294 ++heap.retried;
4295 }
4296 }
4297 }
4298 if (!heap.retries.empty()) retry_console_slots(heap); 4819 if (!heap.retries.empty()) retry_console_slots(heap);
4299 if (!heap.unmapped.empty()) retry_unmapped_slots(heap);
4300 const auto t3 = clock::now(); 4820 const auto t3 = clock::now();
4301 heap.pages_ms += ms(t0, t1); 4821 heap.pages_ms += ms(t0, t1);
4302 heap.fix_ms += ms(t1, t2); 4822 heap.fix_ms += ms(t1, t2);
@@ -4316,9 +4836,16 @@ struct DeviceState {
4316 if (on) state.console_heap_gpu_end(); 4836 if (on) state.console_heap_gpu_end();
4317 } 4837 }
4318 } gpu_end{*this, heap_pass}; 4838 } gpu_end{*this, heap_pass};
4839 // Every change since the last submission, for every heap; one made from now on (by another thread, or by a
4840 // fix below making a window) is applied at the next submission.
4841 std::vector<leonida::SlotChange> changes;
4842 {
4843 std::lock_guard taken(slot_change_mutex);
4844 changes.swap(slot_changes);
4845 }
4319 for (const auto& heap : console_heaps) { 4846 for (const auto& heap : console_heaps) {
4320 const auto start = std::chrono::steady_clock::now(); 4847 const auto start = std::chrono::steady_clock::now();
4321 refresh_console_heap(*heap); 4848 refresh_console_heap(*heap, &changes);
4322 heap->ms += std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - start).count(); 4849 heap->ms += std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - start).count();
4323 ++heap->refreshes; 4850 ++heap->refreshes;
4324 // A line at the first and 64th submission, then every 10 s (a crawl logs as often as a fast run). 4851 // A line at the first and 64th submission, then every 10 s (a crawl logs as often as a fast run).
@@ -4333,7 +4860,7 @@ struct DeviceState {
4333 "in %.3f ms on average (pages %.3f, fixing copied slots %.3f, %llu left to retries past the " 4860 "in %.3f ms on average (pages %.3f, fixing copied slots %.3f, %llu left to retries past the "
4334 "budget, retrying %.3f: %.1f slots a " 4861 "budget, retrying %.3f: %.1f slots a "
4335 "submission, %zu waiting), %llu write faults; %llu title V#s rebased, %llu with no copy given " 4862 "submission, %zu waiting), %llu write faults; %llu title V#s rebased, %llu with no copy given "
4336 "no records (%zu naming nothing waiting for another look), T#s %llu known, %llu bound, %llu " 4863 "no records (%zu V# halves waiting for a backing), T#s %llu known, %llu bound, %llu "
4337 "naming no texture, %llu refused, %llu words that are no V# or T# (data, null in the copy)\n", 4864 "naming no texture, %llu refused, %llu words that are no V# or T# (data, null in the copy)\n",
4338 static_cast<unsigned long long>(heap->console_va), heap->imported ? "imported" : "copy", 4865 static_cast<unsigned long long>(heap->console_va), heap->imported ? "imported" : "copy",
4339 static_cast<unsigned long long>(heap->refreshes), "copied", 4866 static_cast<unsigned long long>(heap->refreshes), "copied",
@@ -4343,41 +4870,41 @@ struct DeviceState {
4343 double(heap->retried) / count, heap->retries.size(), 4870 double(heap->retried) / count, heap->retries.size(),
4344 static_cast<unsigned long long>(heap->pages ? heap->pages->faults() : 0), 4871 static_cast<unsigned long long>(heap->pages ? heap->pages->faults() : 0),
4345 static_cast<unsigned long long>(heap->vsharps), 4872 static_cast<unsigned long long>(heap->vsharps),
4346 static_cast<unsigned long long>(heap->unbacked), heap->empty_slots.size(), 4873 static_cast<unsigned long long>(heap->unbacked), heap->records.waiting_count(),
4347 static_cast<unsigned long long>(heap->images[unsigned(TitleImage::known)]), 4874 static_cast<unsigned long long>(heap->images[unsigned(TitleImage::known)]),
4348 static_cast<unsigned long long>(heap->images[unsigned(TitleImage::bound)]), 4875 static_cast<unsigned long long>(heap->images[unsigned(TitleImage::bound)]),
4349 static_cast<unsigned long long>(heap->images[unsigned(TitleImage::unknown)]), 4876 static_cast<unsigned long long>(heap->images[unsigned(TitleImage::unknown)]),
4350 static_cast<unsigned long long>(heap->images[unsigned(TitleImage::refused)]), 4877 static_cast<unsigned long long>(heap->images[unsigned(TitleImage::refused)]),
4351 static_cast<unsigned long long>(heap->images[unsigned(TitleImage::not_tsharp)])); 4878 static_cast<unsigned long long>(heap->images[unsigned(TitleImage::not_tsharp)]));
4352 if (heap->release_sweeps && filter_heap_releases())
4353 std::fprintf(stderr, "[rt] CPU release filter: %llu sweeps, %llu live slots, %llu fixes, %llu rebases, %llu full fallbacks\n",
4354 (unsigned long long)heap->release_sweeps, (unsigned long long)heap->release_candidates,
4355 (unsigned long long)heap->release_fixes, (unsigned long long)heap->release_rebases,
4356 (unsigned long long)heap->release_full);
4357 heap->release_sweeps = heap->release_candidates = heap->release_fixes = heap->release_rebases = heap->release_full = 0;
4358 if (heap->resource_heap) { 4879 if (heap->resource_heap) {
4359 std::uint64_t paths[kVsharpPathCount]; 4880 std::uint64_t paths[kVsharpPathCount];
4360 for (unsigned i = 0; i < kVsharpPathCount; ++i) 4881 for (unsigned i = 0; i < kVsharpPathCount; ++i)
4361 paths[i] = vsharp_paths[i].exchange(0, std::memory_order_relaxed); 4882 paths[i] = vsharp_paths[i].exchange(0, std::memory_order_relaxed);
4362 std::fprintf(stderr, 4883 std::fprintf(stderr,
4363 "[rt] d3d12: console descriptor heap 0x%llx changed slots per submission: %.1f zero, %.1f " 4884 "[rt] d3d12: console descriptor heap 0x%llx changed slots per submission: %.1f zero, %.1f "
4364 "V# pairs, %.1f T#s, %.1f other; V# halves %.1f, %.1f%% seen before; rescans %llu (%.1f " 4885 "V# pairs, %.1f T#s, %.1f other; V# halves %.1f, %.1f%% seen before; V# resolutions since "
4365 "V# slots and %.3f ms each); V# resolutions since the last line: alias %llu, alias " 4886 "the last line: alias %llu, alias refused %llu, arena %llu, geometry %llu, window %llu, "
4366 "refused %llu, arena %llu, geometry %llu, window %llu, none %llu\n", 4887 "none %llu\n",
4367 static_cast<unsigned long long>(heap->console_va), double(heap->changed[0]) / count, 4888 static_cast<unsigned long long>(heap->console_va), double(heap->changed[0]) / count,
4368 double(heap->changed[1]) / count, double(heap->changed[2]) / count, 4889 double(heap->changed[1]) / count, double(heap->changed[2]) / count,
4369 double(heap->changed[3]) / count, double(heap->vsharp_halves) / count, 4890 double(heap->changed[3]) / count, double(heap->vsharp_halves) / count,
4370 heap->vsharp_halves ? 100.0 * double(heap->vsharp_repeats) / double(heap->vsharp_halves) 4891 heap->vsharp_halves ? 100.0 * double(heap->vsharp_repeats) / double(heap->vsharp_halves)
4371 : 0.0, 4892 : 0.0,
4372 static_cast<unsigned long long>(heap->rescans),
4373 heap->rescans ? double(heap->rescanned) / double(heap->rescans) : 0.0,
4374 heap->rescans ? heap->rescan_ms / double(heap->rescans) : 0.0,
4375 static_cast<unsigned long long>(paths[0]), static_cast<unsigned long long>(paths[1]), 4893 static_cast<unsigned long long>(paths[0]), static_cast<unsigned long long>(paths[1]),
4376 static_cast<unsigned long long>(paths[2]), static_cast<unsigned long long>(paths[3]), 4894 static_cast<unsigned long long>(paths[2]), static_cast<unsigned long long>(paths[3]),
4377 static_cast<unsigned long long>(paths[4]), static_cast<unsigned long long>(paths[5])); 4895 static_cast<unsigned long long>(paths[4]), static_cast<unsigned long long>(paths[5]));
4896 // What releases, alias changes and additions cost: per submission, the changes taken, the record
4897 // entries looked at to find their slots, and the slots fixed again (apply_slot_changes).
4898 std::fprintf(stderr,
4899 "[rt] d3d12: console descriptor heap 0x%llx slot records per submission: %.1f changes, "
4900 "%.1f slots looked at, %.1f fixed again, %.3f ms; %zu V# halves recorded\n",
4901 static_cast<unsigned long long>(heap->console_va), double(heap->record_changes) / count,
4902 double(heap->record_looked) / count, double(heap->record_refixed) / count,
4903 heap->record_ms / count, heap->records.recorded());
4378 for (auto& n : heap->changed) n = 0; 4904 for (auto& n : heap->changed) n = 0;
4379 heap->vsharp_halves = heap->vsharp_repeats = heap->rescans = heap->rescanned = 0; 4905 heap->vsharp_halves = heap->vsharp_repeats = 0;
4380 heap->rescan_ms = 0; 4906 heap->record_changes = heap->record_looked = heap->record_refixed = 0;
4907 heap->record_ms = 0;
4381 } 4908 }
4382 if (heap->gpu >= 0) log_console_heap_gpu(*heap, count); 4909 if (heap->gpu >= 0) log_console_heap_gpu(*heap, count);
4383 std::string refused_breakdown; 4910 std::string refused_breakdown;
@@ -4582,8 +5109,11 @@ struct DeviceState {
4582 heap->previous = heap->made.data(); 5109 heap->previous = heap->made.data();
4583 } 5110 }
4584 heap->retry.assign(std::size_t(bytes / kDescriptorSize), 0); 5111 heap->retry.assign(std::size_t(bytes / kDescriptorSize), 0);
4585 heap->live_vsharps.reset(std::size_t(bytes / kDescriptorSize)); 5112 if (resource_heap) {
4586 heap->unmapped_tries.assign(std::size_t(bytes / kDescriptorSize), 0); 5113 heap->records.reset(std::size_t(bytes / kDescriptorSize));
5114 // Changes are kept from now on, before the first refresh writes a record.
5115 slot_records_live.store(true, std::memory_order_release);
5116 }
4587 heap->pages = make_shadow_pages(reinterpret_cast<const std::uint8_t*>(static_cast<std::uintptr_t>(console_va)), 5117 heap->pages = make_shadow_pages(reinterpret_cast<const std::uint8_t*>(static_cast<std::uintptr_t>(console_va)),
4588 heap->input, std::size_t(bytes)); 5118 heap->input, std::size_t(bytes));
4589 } 5119 }
@@ -4597,7 +5127,7 @@ struct DeviceState {
4597 { 5127 {
4598 std::lock_guard lock(console_heap_mutex); 5128 std::lock_guard lock(console_heap_mutex);
4599 if (heap->gpu >= 0) gpu_heaps[std::size_t(heap->gpu)] = heap.get(); 5129 if (heap->gpu >= 0) gpu_heaps[std::size_t(heap->gpu)] = heap.get();
4600 if (!imported) refresh_console_heap(*heap); 5130 if (!imported) refresh_console_heap(*heap, nullptr);
4601 if (heap->copy) { 5131 if (heap->copy) {
4602 std::unique_lock ranges(console_copy_ranges_mutex); 5132 std::unique_lock ranges(console_copy_ranges_mutex);
4603 console_copy_ranges.emplace_back(heap->console_va, heap->bytes); 5133 console_copy_ranges.emplace_back(heap->console_va, heap->bytes);
@@ -4742,17 +5272,15 @@ struct DeviceState {
4742 std::vector<std::uint32_t> gpu_queue_scratch; 5272 std::vector<std::uint32_t> gpu_queue_scratch;
4743 bool gpu_rescan = false, gpu_rescan_after_resolve = false; 5273 bool gpu_rescan = false, gpu_rescan_after_resolve = false;
4744 std::chrono::steady_clock::time_point gpu_rescan_asked{}; 5274 std::chrono::steady_clock::time_point gpu_rescan_asked{};
4745 // LEONIDA_CONSOLE_GPU_FILTER=1 (default: LEONIDA_CONSOLE_RELEASE_FILTER's value): a release, an alias range that 5275 // LEONIDA_CONSOLE_GPU_FILTER=1 (default off): a release, an alias range that went or a word answered since asks
4746 // went or a word answered since asks for a rescan of the slots it touches (the release filter's interval rule, 5276 // for a rescan of the slots it touches (an interval rule, 8a22e92c8) instead of every V# slot: the GPU passes over
4747 // 8a22e92c8) instead of every V# slot: the GPU passes over the rest on its device-local metadata. 5277 // the rest on its device-local metadata.
4748 // gpu_filter_shader: shader-VA spans (released backings, alias copies that went); gpu_filter_title: title VAs 5278 // gpu_filter_shader: shader-VA spans (released backings, alias copies that went); gpu_filter_title: title VAs
4749 // (words backed since). Overflows and key resets still rescan everything. 5279 // (words backed since). Overflows and key resets still rescan everything.
4750 static bool gpu_filter_enabled() { 5280 static bool gpu_filter_enabled() {
4751 static const bool on = [] { 5281 static const bool on = [] {
4752 char text[8] = {}; 5282 char text[8] = {};
4753 if (GetEnvironmentVariableA("LEONIDA_CONSOLE_GPU_FILTER", text, sizeof(text)) && text[0]) 5283 return GetEnvironmentVariableA("LEONIDA_CONSOLE_GPU_FILTER", text, sizeof(text)) && text[0] == '1';
4754 return text[0] == '1';
4755 return GetEnvironmentVariableA("LEONIDA_CONSOLE_RELEASE_FILTER", text, sizeof(text)) && text[0] == '1';
4756 }(); 5284 }();
4757 return on; 5285 return on;
4758 } 5286 }
@@ -5426,6 +5954,148 @@ struct DeviceState {
5426 gpu_counts.backed_ms += std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - start).count(); 5954 gpu_counts.backed_ms += std::chrono::duration<double, std::milli>(std::chrono::steady_clock::now() - start).count();
5427 } 5955 }
5428 5956
5957 // LEONIDA_ADDRESS_GUARD=1 (docs/d3d12_vulkan.md, "Address guard"): the page table the guarded shaders read, a
5958 // host-visible buffer of its own whose address minus heap_base is in the guard header at arena offset
5959 // kGuardHeader. Built from the same backings as the console heap pass's backed table (gpu_backings, the
5960 // geometry copies' blocks and the separate window buffers), but whole and at once: a backing made since the last
5961 // submission must not read 0.
5962 struct AddressGuard {
5963 VkBuffer buffer = VK_NULL_HANDLE;
5964 VkDeviceMemory memory = VK_NULL_HANDLE;
5965 std::uint32_t* words = nullptr;
5966 std::unique_ptr<leonida::address_guard::AddressGuardTable> table;
5967 std::uint64_t generation = ~0ull, blocks = ~0ull, heaps = ~0ull; // heaps: the console heaps' ranges, hashed
5968 std::uint32_t refused_logged = 0, overflow_logged = 0;
5969 std::uint64_t updates = 0, words_written = 0;
5970 std::chrono::steady_clock::time_point logged{};
5971 std::mutex mutex;
5972 } guard;
5973
5974 // Make the page table and write the header (called once the arena is mapped). False leaves the guard off: the
5975 // header keeps no magic, so guarded shaders check nothing.
5976 bool create_address_guard() {
5977 namespace ag = leonida::address_guard;
5978 if (!context || !arena.mapped || arena.size < ag::kGuardEnd) return false;
5979 auto& vk = context->vk;
5980 guard.table = std::make_unique<ag::AddressGuardTable>();
5981 VkBufferCreateInfo create{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO};
5982 create.size = guard.table->bytes();
5983 create.usage = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT;
5984 create.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
5985 if (vk.vkCreateBuffer(info.device, &create, nullptr, &guard.buffer) != VK_SUCCESS) {
5986 guard.buffer = VK_NULL_HANDLE;
5987 return false;
5988 }
5989 VkMemoryRequirements requirements{};
5990 vk.vkGetBufferMemoryRequirements(info.device, guard.buffer, &requirements);
5991 guard.memory = allocate(requirements, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
5992 VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, nullptr, true);
5993 void* mapped = nullptr;
5994 if (!guard.memory || vk.vkBindBufferMemory(info.device, guard.buffer, guard.memory, 0) != VK_SUCCESS ||
5995 vk.vkMapMemory(info.device, guard.memory, 0, VK_WHOLE_SIZE, 0, &mapped) != VK_SUCCESS) {
5996 destroy_address_guard();
5997 return false;
5998 }
5999 guard.words = static_cast<std::uint32_t*>(mapped);
6000 std::memcpy(guard.words, guard.table->words().data(), guard.table->bytes());
6001 VkBufferDeviceAddressInfo address{VK_STRUCTURE_TYPE_BUFFER_DEVICE_ADDRESS_INFO};
6002 address.buffer = guard.buffer;
6003 const VkDeviceAddress table = vk.vkGetBufferDeviceAddress(info.device, &address);
6004 auto* header = reinterpret_cast<ag::AddressGuardHeader*>(arena.mapped + ag::kGuardHeader);
6005 std::memset(arena.mapped + ag::kGuardHeader, 0, std::size_t(ag::kGuardEnd - ag::kGuardHeader));
6006 header->limit = arena.size;
6007 header->table = table - arena.address;
6008 std::atomic_thread_fence(std::memory_order_release);
6009 header->magic = ag::magic(); // last: a shader that sees it sees the rest
6010 std::fprintf(stderr, "[rt] d3d12: address guard on (LEONIDA_ADDRESS_GUARD): %llu KiB page table, header at "
6011 "heap_base + 0x%llx; shaders translated with --address-guard read 0 from memory nothing "
6012 "backs and drop their stores there\n",
6013 static_cast<unsigned long long>(guard.table->bytes() >> 10),
6014 static_cast<unsigned long long>(ag::kGuardHeader));
6015 return true;
6016 }
6017 void destroy_address_guard() {
6018 if (!context) return;
6019 auto& vk = context->vk;
6020 if (guard.buffer) vk.vkDestroyBuffer(info.device, guard.buffer, nullptr);
6021 if (guard.memory) vk.vkFreeMemory(info.device, guard.memory, nullptr);
6022 guard.buffer = VK_NULL_HANDLE;
6023 guard.memory = VK_NULL_HANDLE;
6024 guard.words = nullptr;
6025 }
6026
6027 // Before each submission: the page table says exactly what is backed now, and refusals since the last line are
6028 // logged (at most once a second). Rebuilt only when a backing came or went; only changed words are written.
6029 void update_address_guard() {
6030 namespace ag = leonida::address_guard;
6031 if (!guard.words) return;
6032 // A console descriptor heap whose GPU copy lies outside the arena (an import of the title's pages, which
6033 // shaders read at shader_va = its device address minus heap_base) is read through heap_base + VA like a
6034 // buffer, but no gpu_backing names it: its bytes and the null guard after them are entered here. Without
6035 // this the guard refused every descriptor-table load from such a heap (run 28: a 38 MB imported heap at
6036 // shader VA 0x87e00000, past a 2 GiB arena). Collected before guard.mutex, in console_heap_mutex's order.
6037 std::vector<std::pair<std::uint64_t, std::uint64_t>> heap_spans;
6038 std::uint64_t heap_signature = 0xcbf29ce484222325ull;
6039 {
6040 std::lock_guard heaps(console_heap_mutex);
6041 for (const auto& h : console_heaps) {
6042 if (!h || !h->bytes) continue;
6043 const std::uint64_t begin = h->shader_va, end = h->shader_va + h->bytes + h->guard;
6044 heap_signature = (heap_signature ^ begin) * 0x100000001b3ull;
6045 heap_signature = (heap_signature ^ end) * 0x100000001b3ull;
6046 if (!(begin < arena.size && end <= arena.size)) heap_spans.emplace_back(begin, end);
6047 }
6048 }
6049 std::lock_guard lock(guard.mutex);
6050 const std::uint64_t generation = backing_generation.load(std::memory_order_relaxed);
6051 const std::uint64_t blocks = geometry.pool().layout_generation() + external_windows.layout_generation();
6052 if (generation != guard.generation || blocks != guard.blocks || heap_signature != guard.heaps) {
6053 guard.generation = generation;
6054 guard.blocks = blocks;
6055 guard.heaps = heap_signature;
6056 std::vector<std::pair<std::uint64_t, std::uint64_t>> spans = heap_spans;
6057 {
6058 std::lock_guard backing_lock(backing_mutex);
6059 gpu_backings.for_each([&](std::uint64_t va, std::uint64_t bytes) {
6060 const std::uint64_t offset = va - arena.address;
6061 // The arena's own ranges pass on the limit compare; only what lies outside needs pages.
6062 if (bytes && !(offset < arena.size && bytes <= arena.size - offset))
6063 spans.emplace_back(offset, offset + bytes);
6064 });
6065 }
6066 const auto block = [&](VkDeviceAddress address, VkDeviceSize bytes) {
6067 const std::uint64_t offset = address - arena.address;
6068 if (address && bytes) spans.emplace_back(offset, offset + bytes);
6069 };
6070 geometry.pool().for_each_block(block);
6071 external_windows.for_each_block(block);
6072 guard.words_written += guard.table->assign(spans, [&](std::size_t i, std::uint32_t v) {
6073 std::atomic_ref(guard.words[i]).store(v, std::memory_order_relaxed);
6074 });
6075 ++guard.updates;
6076 if (guard.table->overflowed() != guard.overflow_logged) {
6077 guard.overflow_logged = guard.table->overflowed();
6078 std::fprintf(stderr, "[rt] d3d12: address guard: %u 4 GiB chunk(s) of backings past the page table's "
6079 "%u blocks are not checked\n",
6080 guard.overflow_logged, guard.table->blocks_used());
6081 }
6082 }
6083 auto* header = reinterpret_cast<ag::AddressGuardHeader*>(arena.mapped + ag::kGuardHeader);
6084 const std::uint32_t refused = std::atomic_ref(header->refused).load(std::memory_order_relaxed);
6085 const auto now = std::chrono::steady_clock::now();
6086 if (refused != guard.refused_logged && now - guard.logged >= std::chrono::seconds(1)) {
6087 guard.logged = now;
6088 std::fprintf(stderr, "[rt] d3d12: address guard: %u access(es) refused so far (+%u), the last at heap "
6089 "offset 0x%llx by module 0x%08x; %llu table update(s), %llu word(s) written\n",
6090 refused, refused - guard.refused_logged,
6091 static_cast<unsigned long long>(header->last_refused),
6092 std::atomic_ref(header->last_module).load(std::memory_order_relaxed),
6093 static_cast<unsigned long long>(guard.updates),
6094 static_cast<unsigned long long>(guard.words_written));
6095 guard.refused_logged = refused;
6096 }
6097 }
6098
5429 // The ask table: the title's memory and both addresses of its GPU-window pairs. A V# base outside them that the 6099 // The ask table: the title's memory and both addresses of its GPU-window pairs. A V# base outside them that the
5430 // other tables do not answer is one vsharp_address could only answer 0 for. 6100 // other tables do not answer is one vsharp_address could only answer 0 for.
5431 void update_gpu_ask() { 6101 void update_gpu_ask() {
@@ -6572,7 +7242,9 @@ struct DeviceState {
6572 7242
6573 // Gives the T# `words` a view in set 0 and an entry in the hash table, unless it has them. `storage`: shaders 7243 // Gives the T# `words` a view in set 0 and an entry in the hash table, unless it has them. `storage`: shaders
6574 // write through it too (an unordered-access view), so it also goes into the storage arrays, which are 7244 // write through it too (an unordered-access view), so it also goes into the storage arrays, which are
6575 // shorter. False when set 0 cannot show the image; the descriptor then finds the fallback at index 0. 7245 // shorter. False when set 0 cannot show the image; the descriptor then finds the fallback at index 0. `why`, when
7246 // given, is set to the reason when it is that set 0 has no room (or no array) for the image's dimension, and left
7247 // alone otherwise (no view could be made for the T#).
6576 bool bind_image(const leonida::gfx10::ImageWords& words, const leonida::gfx10::Image& image, VkImage vk_image, 7248 bool bind_image(const leonida::gfx10::ImageWords& words, const leonida::gfx10::Image& image, VkImage vk_image,
6577 VkFormat image_format, VkImageAspectFlags aspects, bool storage, 7249 VkFormat image_format, VkImageAspectFlags aspects, bool storage,
6578 bool allow_channel_cast = false, VkFormat uint_backed = VK_FORMAT_UNDEFINED) { 7250 bool allow_channel_cast = false, VkFormat uint_backed = VK_FORMAT_UNDEFINED) {
@@ -6582,7 +7254,8 @@ struct DeviceState {
6582 } 7254 }
6583 bool bind_image_locked(const leonida::gfx10::ImageWords& words, const leonida::gfx10::Image& image, 7255 bool bind_image_locked(const leonida::gfx10::ImageWords& words, const leonida::gfx10::Image& image,
6584 VkImage vk_image, VkFormat image_format, VkImageAspectFlags aspects, bool storage, 7256 VkImage vk_image, VkFormat image_format, VkImageAspectFlags aspects, bool storage,
6585 bool allow_channel_cast = false, VkFormat uint_backed = VK_FORMAT_UNDEFINED) { 7257 bool allow_channel_cast = false, VkFormat uint_backed = VK_FORMAT_UNDEFINED,
7258 const char** why = nullptr) {
6586 namespace g = leonida::gfx10; 7259 namespace g = leonida::gfx10;
6587 if (!bindless) return false; 7260 if (!bindless) return false;
6588 auto pending = pending_image_keys.find(vk_image); 7261 auto pending = pending_image_keys.find(vk_image);
@@ -6627,7 +7300,7 @@ struct DeviceState {
6627 const bool sampled_only = uint_backed || (view_format != image_format && view_format != VK_FORMAT_UNDEFINED); 7300 const bool sampled_only = uint_backed || (view_format != image_format && view_format != VK_FORMAT_UNDEFINED);
6628 return bind_image_views_locked(words, image, vk_image, view_format, channels_format, 7301 return bind_image_views_locked(words, image, vk_image, view_format, channels_format,
6629 uint_backed ? image_format : view_format, aspects, true, storage, {}, 7302 uint_backed ? image_format : view_format, aspects, true, storage, {},
6630 sampled_only); 7303 sampled_only, why);
6631 } 7304 }
6632 // The same for a view whose formats the caller has worked out: `view_format` of the sampled view (made when 7305 // The same for a view whose formats the caller has worked out: `view_format` of the sampled view (made when
6633 // `sampled`), `channels_format` whose channels the T#'s swizzle selects from, `storage_format` of the storage view. 7306 // `sampled`), `channels_format` whose channels the T#'s swizzle selects from, `storage_format` of the storage view.
@@ -6641,7 +7314,7 @@ struct DeviceState {
6641 bool bind_image_views_locked(const leonida::gfx10::ImageWords& words, const leonida::gfx10::Image& image, 7314 bool bind_image_views_locked(const leonida::gfx10::ImageWords& words, const leonida::gfx10::Image& image,
6642 VkImage vk_image, VkFormat view_format, VkFormat channels_format, 7315 VkImage vk_image, VkFormat view_format, VkFormat channels_format,
6643 VkFormat storage_format, VkImageAspectFlags aspects, bool sampled, bool storage, 7316 VkFormat storage_format, VkImageAspectFlags aspects, bool sampled, bool storage,
6644 VolumeSlices slices, bool sampled_only) { 7317 VolumeSlices slices, bool sampled_only, const char** why = nullptr) {
6645 namespace g = leonida::gfx10; 7318 namespace g = leonida::gfx10;
6646 if (!bindless) { 7319 if (!bindless) {
6647 if (storage) log_once("unordered-access view needs the Vulkan bindless set; type", int(image.type)); 7320 if (storage) log_once("unordered-access view needs the Vulkan bindless set; type", int(image.type));
@@ -6796,24 +7469,37 @@ struct DeviceState {
6796 vk.vkDestroyImageView(info.device, entry.mirror_storage, nullptr); 7469 vk.vkDestroyImageView(info.device, entry.mirror_storage, nullptr);
6797 entry.mirror_storage = VK_NULL_HANDLE; 7470 entry.mirror_storage = VK_NULL_HANDLE;
6798 } 7471 }
6799 if (first_diagnostic("a bindless image array is full; dimension", int(dimension))) { 7472 using Refusal = leonida::BindlessSet::ImageRefusal;
7473 const Refusal refusal = bindless->image_refusal(dimension, entry.storage != VK_NULL_HANDLE, sampled_class);
7474 if (why)
7475 *why = refusal == Refusal::no_array ? "set 0 has no array for the T#'s dimension"
7476 : refusal == Refusal::storage_full ? "the bindless storage arrays of the T#'s dimension are full"
7477 : "the bindless array of the T#'s dimension is full";
7478 if (refusal != Refusal::no_array &&
7479 first_diagnostic("a bindless image array is full; dimension", int(dimension))) {
6800 // Whether the array holds live textures or stale views: the T#s it holds, the textures they name, 7480 // Whether the array holds live textures or stale views: the T#s it holds, the textures they name,
6801 // and the most T#s of one texture (a texture whose T#s keep changing, a streamed mip clamp say, 7481 // the most T#s of one texture (a texture whose T#s keep changing, a streamed mip clamp say, keeps an
6802 // keeps an index for each until it goes). 7482 // index for each until it goes), and how many of those textures are still the one registered at
6803 std::size_t entries = 0, replaced = 0, most = 0; 7483 // their address (a texture leaves the set when the one registered there goes: forget_image).
7484 std::size_t entries = 0, replaced = 0, most = 0, registered = 0;
6804 std::map<std::uint64_t, std::size_t> per_texture; 7485 std::map<std::uint64_t, std::size_t> per_texture;
6805 for (const auto& [key, held] : image_entries) 7486 for (const auto& [key, held] : image_entries)
6806 if (held.dimension == dimension) { 7487 if (held.dimension == dimension) {
6807 ++entries; 7488 ++entries;
6808 most = std::max(most, ++per_texture[held.address]); 7489 most = std::max(most, ++per_texture[held.address]);
6809 } 7490 }
7491 for (const auto& texture : per_texture) registered += images_by_address.count(texture.first);
6810 for (const auto& held : replaced_images) replaced += held.dimension == dimension; 7492 for (const auto& held : replaced_images) replaced += held.dimension == dimension;
7493 constexpr const char* names[] = {"2D", "2D array", "3D", "1D", "1D array", "2D MS", "2D MS array"};
6811 std::fprintf(stderr, 7494 std::fprintf(stderr,
6812 "[rt] d3d12: a bindless image array is full; dimension %d: %u indices, %zu T#s of %zu " 7495 "[rt] d3d12: a bindless image array is full; dimension %d (%s)%s: %u indices, %u in the "
6813 "textures (at most %zu T#s of one), %zu replaced views kept; further T#s of this " 7496 "storage arrays, %zu T#s of %zu textures (%zu registered at their address, at most %zu "
6814 "dimension read the fallback\n", 7497 "T#s of one), %zu replaced views kept; further T#s of this dimension read the "
6815 int(dimension), bindless->image_capacity(dimension), entries, per_texture.size(), most, 7498 "fallback\n",
6816 replaced); 7499 int(dimension), names[int(dimension)],
7500 refusal == Refusal::storage_full ? ", its storage range" : "",
7501 bindless->image_capacity(dimension), bindless->storage_capacity(dimension), entries,
7502 per_texture.size(), registered, most, replaced);
6817 } 7503 }
6818 if (entry.sampled) vk.vkDestroyImageView(info.device, entry.sampled, nullptr); 7504 if (entry.sampled) vk.vkDestroyImageView(info.device, entry.sampled, nullptr);
6819 if (entry.storage) vk.vkDestroyImageView(info.device, entry.storage, nullptr); 7505 if (entry.storage) vk.vkDestroyImageView(info.device, entry.storage, nullptr);
@@ -7079,6 +7765,12 @@ struct DeviceState {
7079 return nullptr; 7765 return nullptr;
7080 } 7766 }
7081}; 7767};
7768// TitleBufferWindows::system_memory_types reads the memory types through these (LEONIDA_GEOMETRY_HOST): without them
7769// it would leave every type allowed, the BAR included.
7770static_assert(requires(const DeviceState& d) {
7771 d.memory.memoryTypes[0].propertyFlags;
7772 d.memory.memoryTypeCount;
7773});
7082 7774
7083// The Vulkan format for a texture this layer can create, with the D24 fallback; VK_FORMAT_UNDEFINED, after a log 7775// The Vulkan format for a texture this layer can create, with the D24 fallback; VK_FORMAT_UNDEFINED, after a log
7084// line, when it cannot. Committed and placed textures share it so both refuse the same formats for the same reason. 7776// line, when it cannot. Committed and placed textures share it so both refuse the same formats for the same reason.
@@ -7848,6 +8540,8 @@ public:
7848 if (heap_.Type == D3D12_HEAP_TYPE_READBACK) host_preferred = VK_MEMORY_PROPERTY_HOST_CACHED_BIT; 8540 if (heap_.Type == D3D12_HEAP_TYPE_READBACK) host_preferred = VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
7849 if (heap_.Type == D3D12_HEAP_TYPE_UPLOAD && device_.upload_in_vram) 8541 if (heap_.Type == D3D12_HEAP_TYPE_UPLOAD && device_.upload_in_vram)
7850 host_preferred = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; 8542 host_preferred = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
8543 leonida::memory_breakdown::Owner owner(host ? leonida::memory_breakdown::Consumer::upload
8544 : leonida::memory_breakdown::current_owner());
7851 memory_ = host ? device_.allocate(requirements, 8545 memory_ = host ? device_.allocate(requirements,
7852 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, 8546 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
7853 host_preferred, &memory_flags_, addressable || need_bda) 8547 host_preferred, &memory_flags_, addressable || need_bda)
@@ -8166,6 +8860,7 @@ public:
8166 vk.vkGetBufferMemoryRequirements(device_.info.device, buffer_, &requirements); 8860 vk.vkGetBufferMemoryRequirements(device_.info.device, buffer_, &requirements);
8167 // As an upload buffer (D3D-96): the CPU writes it at every submission and the GPU reads it, so VRAM through 8861 // As an upload buffer (D3D-96): the CPU writes it at every submission and the GPU reads it, so VRAM through
8168 // Resizable BAR where there is one, system memory otherwise. 8862 // Resizable BAR where there is one, system memory otherwise.
8863 leonida::memory_breakdown::Owner owner(leonida::memory_breakdown::Consumer::windows);
8169 memory_ = device_.allocate(requirements, 8864 memory_ = device_.allocate(requirements,
8170 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, 8865 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
8171 device_.upload_in_vram ? VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT : 0, &memory_flags_, 8866 device_.upload_in_vram ? VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT : 0, &memory_flags_,
@@ -8701,6 +9396,7 @@ private:
8701 vk.vkBindImageMemory, vk.vkDestroyImage, vk.vkFreeMemory, [&](VkDeviceSize size, std::uint32_t& type) { 9396 vk.vkBindImageMemory, vk.vkDestroyImage, vk.vkFreeMemory, [&](VkDeviceSize size, std::uint32_t& type) {
8702 auto page = pool_requirements; 9397 auto page = pool_requirements;
8703 page.size = size; 9398 page.size = size;
9399 leonida::memory_breakdown::Owner owner(leonida::memory_breakdown::Consumer::image_blocks);
8704 return device_.allocate(page, 0, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, nullptr, false, &type); 9400 return device_.allocate(page, 0, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, nullptr, false, &type);
8705 }); 9401 });
8706 if (pooled_image_) memory_flags_ = device_.memory.memoryTypes[pooled_image_->page->type].propertyFlags; 9402 if (pooled_image_) memory_flags_ = device_.memory.memoryTypes[pooled_image_->page->type].propertyFlags;
@@ -9303,8 +9999,12 @@ private:
9303 }; 9999 };
9304 VkMemoryRequirements requirements{}; 10000 VkMemoryRequirements requirements{};
9305 vk.vkGetBufferMemoryRequirements(dev, staging.buffer, &requirements); 10001 vk.vkGetBufferMemoryRequirements(dev, staging.buffer, &requirements);
9306 memory = device_.allocate(requirements, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT, 10002 {
9307 write ? 0 : VK_MEMORY_PROPERTY_HOST_CACHED_BIT); 10003 leonida::memory_breakdown::Owner owner(leonida::memory_breakdown::Consumer::staging);
10004 memory = device_.allocate(requirements,
10005 VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
10006 write ? 0 : VK_MEMORY_PROPERTY_HOST_CACHED_BIT);
10007 }
9308 if (!memory || vk.vkBindBufferMemory(dev, staging.buffer, memory, 0) != VK_SUCCESS || 10008 if (!memory || vk.vkBindBufferMemory(dev, staging.buffer, memory, 0) != VK_SUCCESS ||
9309 vk.vkMapMemory(dev, memory, 0, VK_WHOLE_SIZE, 0, &mapped) != VK_SUCCESS) 10009 vk.vkMapMemory(dev, memory, 0, VK_WHOLE_SIZE, 0, &mapped) != VK_SUCCESS)
9310 return release(E_OUTOFMEMORY); 10010 return release(E_OUTOFMEMORY);
@@ -10978,10 +11678,13 @@ public:
10978 // D24_UNORM_S8_UINT stored as D32_SFLOAT_S8_UINT (no D24 on the GPU): the pixel stage writes the depth D24 11678 // D24_UNORM_S8_UINT stored as D32_SFLOAT_S8_UINT (no D24 on the GPU): the pixel stage writes the depth D24
10979 // would hold, biased in D24 units and quantised (src/depth24_fragment.h, D3D-309), and the rasterizer's own 11679 // would hold, biased in D24 units and quantised (src/depth24_fragment.h, D3D-309), and the rasterizer's own
10980 // bias is turned off. Multisampled targets keep the old path: a FragDepth write is per pixel. 11680 // bias is turned off. Multisampled targets keep the old path: a FragDepth write is per pixel.
10981 const bool d24_as_float = desc.DSVFormat != DXGI_FORMAT_UNKNOWN && 11681 const VkFormat dsv_vk = desc.DSVFormat != DXGI_FORMAT_UNKNOWN
10982 vulkan_format(desc.DSVFormat, true).format == VK_FORMAT_D24_UNORM_S8_UINT && 11682 ? vulkan_format(desc.DSVFormat, true).format
11683 : VK_FORMAT_UNDEFINED;
11684 const bool d24_as_float = dsv_vk == VK_FORMAT_D24_UNORM_S8_UINT &&
10983 !device_.depth_usable(VK_FORMAT_D24_UNORM_S8_UINT); 11685 !device_.depth_usable(VK_FORMAT_D24_UNORM_S8_UINT);
10984 const bool packed16_fallback=desc.DSVFormat==xbox_d16s8 && device_.depth_backing(VK_FORMAT_D16_UNORM_S8_UINT)!=VK_FORMAT_D16_UNORM_S8_UINT; 11686 const bool packed16_fallback = dsv_vk == VK_FORMAT_D16_UNORM_S8_UINT &&
11687 device_.depth_backing(VK_FORMAT_D16_UNORM_S8_UINT) != VK_FORMAT_D16_UNORM_S8_UINT;
10985 if(packed16_fallback && samples>1 && desc.DepthStencilState.DepthEnable) return E_NOTIMPL; 11688 if(packed16_fallback && samples>1 && desc.DepthStencilState.DepthEnable) return E_NOTIMPL;
10986 bool depth24_fragment = (d24_as_float || packed16_fallback) && desc.DepthStencilState.DepthEnable; 11689 bool depth24_fragment = (d24_as_float || packed16_fallback) && desc.DepthStencilState.DepthEnable;
10987 if (depth24_fragment && samples > 1) { 11690 if (depth24_fragment && samples > 1) {
@@ -11298,8 +12001,11 @@ public:
11298 log_once("conservative rasterization needs enabled VK_EXT_conservative_rasterization and Tier 1 precision", 1); 12001 log_once("conservative rasterization needs enabled VK_EXT_conservative_rasterization and Tier 1 precision", 1);
11299 return E_INVALIDARG; 12002 return E_INVALIDARG;
11300 } 12003 }
11301 if (r.FillMode != D3D12_FILL_MODE_SOLID || 12004 // A mesh pipeline has no input assembler, so its stream need not set the topology type: what is rasterized
11302 topology_type != D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE) return E_INVALIDARG; 12005 // is the module's output, and it has to be triangles as well.
12006 if (r.FillMode != D3D12_FILL_MODE_SOLID) return E_INVALIDARG;
12007 if (mesh ? !leonida::conservative_raster::mesh_outputs_triangles(stages[0].words)
12008 : topology_type != D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE) return E_INVALIDARG;
11303 // Target-independent rasterization is a separate pipeline path; do not silently ignore its count. 12009 // Target-independent rasterization is a separate pipeline path; do not silently ignore its count.
11304 if (r.ForcedSampleCount) 12010 if (r.ForcedSampleCount)
11305 return stream_unsupported("target-independent rasterization; forced sample count", int(r.ForcedSampleCount)); 12011 return stream_unsupported("target-independent rasterization; forced sample count", int(r.ForcedSampleCount));
@@ -12181,7 +12887,11 @@ private:
12181 const leonida::dev_status::Build dev_build(r.mesh ? "mesh pipeline" : "graphics pipeline"); 12887 const leonida::dev_status::Build dev_build(r.mesh ? "mesh pipeline" : "graphics pipeline");
12182 const leonida::pipeline_profile::DriverCall profile(r.mesh ? "ms" : "vs", lazy_ ? "lazy" : "eager", 12888 const leonida::pipeline_profile::DriverCall profile(r.mesh ? "ms" : "vs", lazy_ ? "lazy" : "eager",
12183 program, fragment, unbound); 12889 program, fragment, unbound);
12184 const auto result = device_.context->vk.vkCreateGraphicsPipelines(device_.info.device, cache, 1, &info, nullptr, &pipeline); 12890 const auto result = device_.create_pipeline(flags, [&](VkPipelineCache with, VkPipelineCreateFlags f) {
12891 info.flags = f;
12892 pipeline = VK_NULL_HANDLE;
12893 return device_.context->vk.vkCreateGraphicsPipelines(device_.info.device, with, 1, &info, nullptr, &pipeline);
12894 });
12185 if (status) *status = result; 12895 if (status) *status = result;
12186 profile.finish(int(result)); 12896 profile.finish(int(result));
12187 trace.end(trigger, profile_shaders_.c_str(), unbound, bytes, result); 12897 trace.end(trigger, profile_shaders_.c_str(), unbound, bytes, result);
@@ -12997,6 +13707,57 @@ void DeviceState::drain_titles_gone() {
12997// these words, as write_image_descriptor does. Every field the layer does not encode (tiling, compression, 13707// these words, as write_image_descriptor does. Every field the layer does not encode (tiling, compression,
12998// performance hints) only makes the key differ, so a title-built T# still finds its texture. Checked against the 13708// performance hints) only makes the key differ, so a title-built T# still finds its texture. Checked against the
12999// texture first: a view of mips, layers or a dimension it lacks would be an invalid Vulkan view. 13709// texture first: a view of mips, layers or a dimension it lacks would be an invalid Vulkan view.
13710// LEONIDA_UNKNOWN_TSHARP=1 (diagnostic): one line for each distinct base address a title-written T# names with no
13711// texture there (its shape, the tiling bits SW_MODE = dword 3 bits 20..24 by the GFX10 layout, unverified, and whether
13712// the address is title memory), up to 300 addresses, and every 8192 such lookups a summary by format, type and tiling.
13713// What a texture made from the T# on its first read would have to create.
13714void note_unknown_tsharp(const leonida::gfx10::ImageWords& words, const leonida::gfx10::Image& image) {
13715 static const bool on = [] {
13716 const char* v = std::getenv("LEONIDA_UNKNOWN_TSHARP");
13717 return v && *v == '1';
13718 }();
13719 if (!on) return;
13720 struct Shape {
13721 std::uint32_t format, type, sw, width, height, depth, mips, layers;
13722 };
13723 static std::mutex mutex;
13724 static std::unordered_map<std::uint64_t, Shape> seen;
13725 static std::map<std::string, std::uint64_t> by_shape;
13726 static std::uint64_t lookups = 0, in_title = 0;
13727 const Shape s{image.format, std::uint32_t(image.type), (words[3] >> 20) & 0x1f, image.width, image.height,
13728 image.depth, image.resource_mips, image.layer_count};
13729 std::uint64_t lo = 0, hi = 0;
13730 const bool title = leonida::title_va_aliases().title_memory(image.address, lo, hi);
13731 std::lock_guard lock(mutex);
13732 ++lookups;
13733 if (seen.emplace(image.address, s).second) {
13734 in_title += title;
13735 char key[64];
13736 std::snprintf(key, sizeof(key), "fmt %u type %u sw %u", s.format, s.type, s.sw);
13737 ++by_shape[key];
13738 if (seen.size() <= 300)
13739 std::fprintf(stderr,
13740 "[rt] unknown-tsharp: #%zu base 0x%llx fmt %u type %u sw %u %ux%ux%u mips %u layers %u%s\n",
13741 seen.size(), static_cast<unsigned long long>(image.address), s.format, s.type, s.sw, s.width,
13742 s.height, s.depth, s.mips, s.layers, title ? " (title memory)" : " (not title memory)");
13743 if (seen.size() <= 24)
13744 std::fprintf(stderr, "[rt] unknown-tsharp: #%zu words %08x %08x %08x %08x %08x %08x %08x %08x\n", seen.size(),
13745 words[0], words[1], words[2], words[3], words[4], words[5], words[6], words[7]);
13746 }
13747 if (!(lookups % 8192)) {
13748 std::vector<std::pair<std::uint64_t, std::string>> top;
13749 for (const auto& [k, n] : by_shape) top.emplace_back(n, k);
13750 std::sort(top.rbegin(), top.rend());
13751 std::string text;
13752 for (std::size_t i = 0; i < top.size() && i < 10; ++i)
13753 text += (i ? "; " : "") + top[i].second + " x" + std::to_string(top[i].first);
13754 std::fprintf(stderr,
13755 "[rt] unknown-tsharp: %llu lookups, %zu distinct addresses (%llu in title memory); by shape: %s\n",
13756 static_cast<unsigned long long>(lookups), seen.size(), static_cast<unsigned long long>(in_title),
13757 text.c_str());
13758 }
13759}
13760
13000TitleImage bind_title_image(DeviceState& device, const leonida::gfx10::ImageWords& words, const char** why) { 13761TitleImage bind_title_image(DeviceState& device, const leonida::gfx10::ImageWords& words, const char** why) {
13001 namespace g = leonida::gfx10; 13762 namespace g = leonida::gfx10;
13002 const auto refuse = [why](const char* reason) { 13763 const auto refuse = [why](const char* reason) {
@@ -13030,6 +13791,7 @@ TitleImage bind_title_image(DeviceState& device, const leonida::gfx10::ImageWord
13030 } 13791 }
13031 if (!owner) { 13792 if (!owner) {
13032 if (why) *why = "no texture at T# address"; 13793 if (why) *why = "no texture at T# address";
13794 note_unknown_tsharp(words, image);
13033 return TitleImage::unknown; 13795 return TitleImage::unknown;
13034 } 13796 }
13035 const Resource& r = *owner; 13797 const Resource& r = *owner;
@@ -13053,9 +13815,10 @@ TitleImage bind_title_image(DeviceState& device, const leonida::gfx10::ImageWord
13053 return refuse("T# names layers the texture lacks"); 13815 return refuse("T# names layers the texture lacks");
13054 const bool storage = (d.Flags & D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS) && !msaa && 13816 const bool storage = (d.Flags & D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS) && !msaa &&
13055 r.aspects() == VK_IMAGE_ASPECT_COLOR_BIT; 13817 r.aspects() == VK_IMAGE_ASPECT_COLOR_BIT;
13818 const char* unbound = "no view for the T#'s format or range"; // unless set 0 has no room (bind_image)
13056 if (!device.bind_image_locked(words, image, r.descriptor_image(), r.format(), r.aspects(), storage, 13819 if (!device.bind_image_locked(words, image, r.descriptor_image(), r.format(), r.aspects(), storage,
13057 r.has_view_format_list(), r.uint_backed())) 13820 r.has_view_format_list(), r.uint_backed(), &unbound))
13058 return refuse("no view for the T#'s format or range"); 13821 return refuse(unbound);
13059 r.note_shader_view(); // Include descriptors written directly into title heaps. 13822 r.note_shader_view(); // Include descriptors written directly into title heaps.
13060 if (r.sparse_image()) sparse = r.id(); 13823 if (r.sparse_image()) sparse = r.id();
13061 } 13824 }
@@ -13708,6 +14471,8 @@ public:
13708 const phases::Scope timed(phases::geometry); 14471 const phases::Scope timed(phases::geometry);
13709 state_.geometry.refresh(DeviceState::copy_geometry); 14472 state_.geometry.refresh(DeviceState::copy_geometry);
13710 } 14473 }
14474 // Last, once the heap refresh, the windows and the geometry copies have made what this submission reads.
14475 state_.update_address_guard();
13711 const phases::Scope timed(phases::textures); 14476 const phases::Scope timed(phases::textures);
13712 if (async_texture_refresh()) { 14477 if (async_texture_refresh()) {
13713 if (!t_in_title_textures) { 14478 if (!t_in_title_textures) {
@@ -13750,12 +14515,18 @@ public:
13750 [](void* device, std::uint64_t table, std::uint32_t descriptors) { 14515 [](void* device, std::uint64_t table, std::uint32_t descriptors) {
13751 static_cast<DeviceState*>(device)->scan_title_table(table, descriptors); 14516 static_cast<DeviceState*>(device)->scan_title_table(table, descriptors);
13752 }); 14517 });
14518 leonida::title_va_aliases().set_noter([](void* device, std::uint64_t va, std::uint64_t bytes) {
14519 static_cast<DeviceState*>(device)->note_title_write(va, bytes);
14520 });
14521 // Every device, hooks or not: its console heaps' slot records follow the alias table's changes.
14522 leonida::title_va_aliases().add_listener(&state_, &DeviceState::alias_changed);
13753 state_.image_memory = std::make_unique<leonida::ImageMemory>( 14523 state_.image_memory = std::make_unique<leonida::ImageMemory>(
13754 [device = info.device, make = state_.context->vk.vkAllocateMemory](std::uint32_t type, std::uint64_t bytes) { 14524 [device = info.device, make = state_.context->vk.vkAllocateMemory](std::uint32_t type, std::uint64_t bytes) {
13755 VkMemoryAllocateInfo block{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO}; 14525 VkMemoryAllocateInfo block{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO};
13756 block.allocationSize = bytes; 14526 block.allocationSize = bytes;
13757 block.memoryTypeIndex = type; 14527 block.memoryTypeIndex = type;
13758 VkDeviceMemory out = VK_NULL_HANDLE; 14528 VkDeviceMemory out = VK_NULL_HANDLE;
14529 leonida::memory_breakdown::Owner owner(leonida::memory_breakdown::Consumer::image_blocks);
13759 return make(device, &block, nullptr, &out) == VK_SUCCESS ? out : VkDeviceMemory(VK_NULL_HANDLE); 14530 return make(device, &block, nullptr, &out) == VK_SUCCESS ? out : VkDeviceMemory(VK_NULL_HANDLE);
13760 }, 14531 },
13761 [device = info.device, free = state_.context->vk.vkFreeMemory](VkDeviceMemory block) { 14532 [device = info.device, free = state_.context->vk.vkFreeMemory](VkDeviceMemory block) {
@@ -13859,6 +14630,21 @@ public:
13859 (unsigned long long)shadows, leonida::fsdraw::pipeline_count()); 14630 (unsigned long long)shadows, leonida::fsdraw::pipeline_count());
13860 return std::string(text); 14631 return std::string(text);
13861 }; 14632 };
14633 facts.share = [this] {
14634 leonida::memory_breakdown::DeviceShare share;
14635 DeviceState& d = state_;
14636 if (d.arena.buffer) {
14637 share.arena = true;
14638 std::lock_guard lock(d.arena.mutex);
14639 share.arena_reserved = d.arena.size;
14640 share.arena_bound = d.arena.size; // one allocation behind the whole range
14641 share.arena_in_use = d.arena.in_use;
14642 for (std::size_t i = 0; i < share.arena_use.size(); ++i) share.arena_use[i] = d.arena.use_in_use[i];
14643 }
14644 std::lock_guard lock(d.descriptor_mutex); // the bindless set's lock (ExecuteCommandLists' flush)
14645 if (const auto* bindless = d.bindless.get()) share.bindless_table_bytes = bindless->table_buffer_bytes();
14646 return share;
14647 };
13862 leonida::mem_probe::start(std::move(facts)); 14648 leonida::mem_probe::start(std::move(facts));
13863 } 14649 }
13864 if (info.conditional_rendering) { 14650 if (info.conditional_rendering) {
@@ -13895,6 +14681,7 @@ public:
13895 state_.context->enable_copy_scratch( 14681 state_.context->enable_copy_scratch(
13896 get_device, 14682 get_device,
13897 [this, index_scratch](const VkMemoryRequirements& requirements) { 14683 [this, index_scratch](const VkMemoryRequirements& requirements) {
14684 leonida::memory_breakdown::Owner owner(leonida::memory_breakdown::Consumer::staging);
13898 return state_.allocate(requirements, 0, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, nullptr, index_scratch); 14685 return state_.allocate(requirements, 0, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, nullptr, index_scratch);
13899 }, 14686 },
13900 scratch_extra, state_.families); 14687 scratch_extra, state_.families);
@@ -14322,8 +15109,11 @@ public:
14322 "device's %s\n", 15109 "device's %s\n",
14323 static_cast<unsigned long long>(size.bytes >> 20), 15110 static_cast<unsigned long long>(size.bytes >> 20),
14324 static_cast<unsigned long long>(size.requested >> 20), leonida::arena_cap_name(size.capped)); 15111 static_cast<unsigned long long>(size.requested >> 20), leonida::arena_cap_name(size.capped));
14325 arena.memory = state_.allocate(requirements, leonida::kArenaRequiredMemory, leonida::kArenaPreferredMemory, 15112 {
14326 nullptr, true, &arena.memory_type); 15113 leonida::memory_breakdown::Owner owner(leonida::memory_breakdown::Consumer::arena);
15114 arena.memory = state_.allocate(requirements, leonida::kArenaRequiredMemory,
15115 leonida::kArenaPreferredMemory, nullptr, true, &arena.memory_type);
15116 }
14327 void* mapped = nullptr; 15117 void* mapped = nullptr;
14328 if (!arena.memory || vk.vkBindBufferMemory(state_.info.device, arena.buffer, arena.memory, 0) != VK_SUCCESS || 15118 if (!arena.memory || vk.vkBindBufferMemory(state_.info.device, arena.buffer, arena.memory, 0) != VK_SUCCESS ||
14329 vk.vkMapMemory(state_.info.device, arena.memory, 0, VK_WHOLE_SIZE, 0, &mapped) != VK_SUCCESS) { 15119 vk.vkMapMemory(state_.info.device, arena.memory, 0, VK_WHOLE_SIZE, 0, &mapped) != VK_SUCCESS) {
@@ -14376,14 +15166,20 @@ public:
14376 // Under the arena's lock: an insert rebalances the tree and rewrites child links, which a walk on 15166 // Under the arena's lock: an insert rebalances the tree and rewrites child links, which a walk on
14377 // another thread must not see half done. 15167 // another thread must not see half done.
14378 std::lock_guard lock(arena.mutex); 15168 std::lock_guard lock(arena.mutex);
14379 arena.blocks.reset(null_bytes + kArenaReserved, arena.size); 15169 // LEONIDA_ADDRESS_GUARD: the guard header and sinks at [0x70000, 0x80000) are never handed out either
14380 arena.first = null_bytes + kArenaReserved; 15170 // (inside the null region when there is one, else just past the quad indices).
15171 arena.first = std::max<VkDeviceSize>(null_bytes + kArenaReserved,
15172 address_guard_enabled() ? leonida::address_guard::kGuardEnd : 0);
15173 arena.blocks.reset(arena.first, arena.size);
14381 char check[2] = {}; 15174 char check[2] = {};
14382 size_t check_length = 0; 15175 size_t check_length = 0;
14383 arena.check_all = getenv_s(&check_length, check, "LEONIDA_ARENA_CHECK") == 0 && check_length > 1 && 15176 arena.check_all = getenv_s(&check_length, check, "LEONIDA_ARENA_CHECK") == 0 && check_length > 1 &&
14384 check[0] != '0'; 15177 check[0] != '0';
14385 } 15178 }
14386 arena.peak_end = null_bytes + kArenaReserved; 15179 arena.peak_end = arena.first;
15180 if (address_guard_enabled() && !state_.create_address_guard())
15181 std::fprintf(stderr, "[rt] d3d12: LEONIDA_ADDRESS_GUARD=1 but the address guard could not be set up; "
15182 "guarded shaders check nothing\n");
14387 char log[4] = {}; 15183 char log[4] = {};
14388 length = 0; 15184 length = 0;
14389 arena.log = getenv_s(&length, log, "LEONIDA_ARENA_LOG") == 0 && length > 1 && log[0] != '0'; 15185 arena.log = getenv_s(&length, log, "LEONIDA_ARENA_LOG") == 0 && length > 1 && log[0] != '0';
@@ -14452,6 +15248,7 @@ public:
14452 compiler_use_.release(); 15248 compiler_use_.release();
14453 } 15249 }
14454 leonida::title_va_aliases().clear_hooks(&state_); 15250 leonida::title_va_aliases().clear_hooks(&state_);
15251 leonida::title_va_aliases().remove_listener(&state_);
14455 { 15252 {
14456 std::lock_guard lock(state_.title_window_mutex); 15253 std::lock_guard lock(state_.title_window_mutex);
14457 for (const auto& window : state_.title_windows) 15254 for (const auto& window : state_.title_windows)
@@ -14490,12 +15287,14 @@ public:
14490 state_.bindless.reset(); 15287 state_.bindless.reset();
14491 } 15288 }
14492 state_.report_arena(); 15289 state_.report_arena();
15290 state_.destroy_address_guard();
14493 if (state_.context && state_.arena.buffer) { 15291 if (state_.context && state_.arena.buffer) {
14494 leonida::fsdraw::forget_arena(state_.arena.mapped); 15292 leonida::fsdraw::forget_arena(state_.arena.mapped);
14495 auto& vk = state_.context->vk; 15293 auto& vk = state_.context->vk;
14496 vk.vkDestroyBuffer(state_.info.device, state_.arena.buffer, nullptr); 15294 vk.vkDestroyBuffer(state_.info.device, state_.arena.buffer, nullptr);
14497 if (state_.arena.memory) vk.vkFreeMemory(state_.info.device, state_.arena.memory, nullptr); 15295 if (state_.arena.memory) vk.vkFreeMemory(state_.info.device, state_.arena.memory, nullptr);
14498 } 15296 }
15297 state_.finish_heavy_cache();
14499 if (state_.pipeline_cache_handle) { 15298 if (state_.pipeline_cache_handle) {
14500 // Nothing should be building into the cache now (the compiler's jobs for this device are gone, and so 15299 // Nothing should be building into the cache now (the compiler's jobs for this device are gone, and so
14501 // is every PSO). If something is, its pipelines are half in the cache: keep the previous session file. 15300 // is every PSO). If something is, its pipelines are half in the cache: keep the previous session file.
@@ -15621,6 +16420,8 @@ private:
15621 const bool guard = check_pages_before_read(); 16420 const bool guard = check_pages_before_read();
15622 if (!guard && !t.memory.pending()) return true; 16421 if (!guard && !t.memory.pending()) return true;
15623 const bool mapped = t.mapped && refresh_mapped_pages(); 16422 const bool mapped = t.mapped && refresh_mapped_pages();
16423 if (!title_pass_ && guard && !mapped)
16424 t.memory.sync_map(title_map_generation_, static_cast<std::uintptr_t>(t.cpu), t.layout.layout.size);
15624 const auto commit = mapped ? leonida::kernel_writes::state().committer.load(std::memory_order_acquire) : nullptr; 16425 const auto commit = mapped ? leonida::kernel_writes::state().committer.load(std::memory_order_acquire) : nullptr;
15625 const bool waited = t.memory.pending(); 16426 const bool waited = t.memory.pending();
15626 // The answer is kept (generation 0) until a map change over the texture, a write into it or the periodic 16427 // The answer is kept (generation 0) until a map change over the texture, a write into it or the periodic
@@ -17927,7 +18728,7 @@ public:
17927 // imported, or a shadow copied from them before every submission) and kept until the device goes, up to 18728 // imported, or a shadow copied from them before every submission) and kept until the device goes, up to
17928 // LEONIDA_TITLE_BUFFERS_MB (512 by default). 18729 // LEONIDA_TITLE_BUFFERS_MB (512 by default).
17929 void make_title_buffer(std::uint64_t va, std::uint64_t bytes) { 18730 void make_title_buffer(std::uint64_t va, std::uint64_t bytes) {
17930 if (!state_.context) return; 18731 if (!&context()) return;
17931 static const bool check_size = [] { 18732 static const bool check_size = [] {
17932 wchar_t flag[2]{}; 18733 wchar_t flag[2]{};
17933 return !(GetEnvironmentVariableW(L"LEONIDA_TITLE_BUFFER_COVERAGE", flag, 2) == 1 && flag[0] == L'0'); 18734 return !(GetEnvironmentVariableW(L"LEONIDA_TITLE_BUFFER_COVERAGE", flag, 2) == 1 && flag[0] == L'0');
@@ -19933,9 +20734,10 @@ bool stop_pipeline_compiles(unsigned wait_ms) {
19933 return idle; 20734 return idle;
19934} 20735}
19935 20736
19936// How long an exit save waits for the write itself (save_session_pipeline_cache): a 77 MiB cache was measured at about 20737// How long an exit save waits for the write itself (save_session_pipeline_cache). Measured fill and publish: a 77 MiB
19937// 36 ms (fill and publish), so this only bounds a driver that blocks the read. 20738// cache about 36 ms; 1.87 GB 1.4 s and 2.9 GB 1.3-1.6 s (NVIDIA, Windows 11, NVMe), so about 2.2 s at the 4 GiB
19938constexpr unsigned kExitCacheWriteMs = 3000; 20739// default limit. The wait ends with the write; the bound only covers a driver or disk that blocks.
20740constexpr unsigned kExitCacheWriteMs = 6000;
19939 20741
19940bool save_pipeline_caches_at_exit(unsigned wait_ms) { 20742bool save_pipeline_caches_at_exit(unsigned wait_ms) {
19941 if (exit_cache_saved.exchange(true)) return false; // once: a crash during the normal exit's save does not redo it 20743 if (exit_cache_saved.exchange(true)) return false; // once: a crash during the normal exit's save does not redo it
@@ -21017,8 +21819,12 @@ HRESULT create_vulkan_device_standalone(REFIID riid, void** out, QueueTestSettin
21017 v13.compute_full_subgroups, info.subgroup); 21819 v13.compute_full_subgroups, info.subgroup);
21018 const char* compile_mode = std::getenv("LEONIDA_PIPELINE_COMPILE"); 21820 const char* compile_mode = std::getenv("LEONIDA_PIPELINE_COMPILE");
21019 const auto mode = compile_mode ? std::string_view(compile_mode) : std::string_view{}; 21821 const auto mode = compile_mode ? std::string_view(compile_mode) : std::string_view{};
21020 v13.enable_pipeline_cache_control = mode == "cache-only" && v13.core && v13.pipeline_cache_control; 21822 // pipelineCreationCacheControl: for LEONIDA_PIPELINE_COMPILE=cache-only, and for the heavy pipeline cache unless
21021 info.cold_graphics_compile = v13.enable_pipeline_cache_control; 21823 // LEONIDA_HEAVY_PIPELINE_CACHE_MS=0 turns it off.
21824 v13.enable_pipeline_cache_control =
21825 (mode == "cache-only" || heavy_pipeline_cache_ms()) && v13.core && v13.pipeline_cache_control;
21826 info.cold_graphics_compile = mode == "cache-only" && v13.enable_pipeline_cache_control;
21827 info.heavy_pipeline_cache = heavy_pipeline_cache_ms() && v13.enable_pipeline_cache_control;
21022 info.prepare_on_bind = mode == "on-demand"; 21828 info.prepare_on_bind = mode == "on-demand";
21023 void* v13_chain = v13.enable(ext_chain); 21829 void* v13_chain = v13.enable(ext_chain);
21024 // D3D-78 uses the core robustness and format-feature flags. Leave the Vulkan 1.2 extension path unchanged. 21830 // D3D-78 uses the core robustness and format-feature flags. Leave the Vulkan 1.2 extension path unchanged.
@@ -21681,10 +22487,10 @@ public:
21681 DeviceState& state() { return *device_; } 22487 DeviceState& state() { return *device_; }
21682 const leonida::ShaderLibrary* library() const { return library_; } 22488 const leonida::ShaderLibrary* library() const { return library_; }
21683 22489
21684 // Why create_compute would refuse the entry, or null. 22490 // Why create_compute could not build the entry on this device, or null. LEONIDA_SKIP_COMPUTE is not a reason here:
22491 // it drops a program's dispatches at play, and each caller decides whether it also keeps the program unbuilt.
21685 const char* unbuildable(const leonida::ShaderEntry& entry, std::size_t bytes) const { 22492 const char* unbuildable(const leonida::ShaderEntry& entry, std::size_t bytes) const {
21686 if (!bytes) return "no .spv"; 22493 if (!bytes) return "no .spv";
21687 if (skip_compute(entry.name)) return "LEONIDA_SKIP_COMPUTE";
21688 if (entry.binding_count && !with_set0_) return "set-0 bindings and no bindless set"; 22494 if (entry.binding_count && !with_set0_) return "set-0 bindings and no bindless set";
21689 if (entry.lds_bytes && max_shared_ && entry.lds_bytes > max_shared_) return "workgroup memory over the limit"; 22495 if (entry.lds_bytes && max_shared_ && entry.lds_bytes > max_shared_) return "workgroup memory over the limit";
21690 return nullptr; 22496 return nullptr;
@@ -21716,13 +22522,15 @@ int precompile_compute_pipelines(const PrecompileOptions& options) {
21716 if (!host.open()) return 1; 22522 if (!host.open()) return 1;
21717 const leonida::ShaderLibrary* library = host.library(); 22523 const leonida::ShaderLibrary* library = host.library();
21718 22524
21719 // What to build: every compute entry the runtime could create a pipeline for. 22525 // What to build: every compute entry the runtime could create a pipeline for. LEONIDA_SKIP_COMPUTE is a setting
22526 // for play (the game drops the listed programs' dispatches); the journal is kept for every program unless
22527 // --skip-listed asks to leave them out too, so a later run without the list finds them built.
21720 struct Job { 22528 struct Job {
21721 const leonida::ShaderEntry* entry; 22529 const leonida::ShaderEntry* entry;
21722 std::size_t bytes; 22530 std::size_t bytes;
21723 }; 22531 };
21724 std::vector<Job> jobs; 22532 std::vector<Job> jobs;
21725 std::size_t not_buildable = 0, filtered = 0; 22533 std::size_t not_buildable = 0, filtered = 0, listed = 0, listed_left_out = 0;
21726 for (const leonida::ShaderEntry* entry : library->stage_entries("cs")) { 22534 for (const leonida::ShaderEntry* entry : library->stage_entries("cs")) {
21727 if (!options.filters.empty() && 22535 if (!options.filters.empty() &&
21728 std::none_of(options.filters.begin(), options.filters.end(), 22536 std::none_of(options.filters.begin(), options.filters.end(),
@@ -21735,6 +22543,15 @@ int precompile_compute_pipelines(const PrecompileOptions& options) {
21735 ++filtered; 22543 ++filtered;
21736 continue; 22544 continue;
21737 } 22545 }
22546 if (skip_compute(entry->name)) {
22547 ++listed;
22548 if (options.skip_listed) {
22549 ++listed_left_out;
22550 std::fprintf(stderr, "[precompile] %s: not built (LEONIDA_SKIP_COMPUTE, --skip-listed)\n",
22551 entry->name.c_str());
22552 continue;
22553 }
22554 }
21738 if (const char* why = host.unbuildable(*entry, bytes)) { 22555 if (const char* why = host.unbuildable(*entry, bytes)) {
21739 ++not_buildable; 22556 ++not_buildable;
21740 std::fprintf(stderr, "[precompile] %s: not built (%s)\n", entry->name.c_str(), why); 22557 std::fprintf(stderr, "[precompile] %s: not built (%s)\n", entry->name.c_str(), why);
@@ -21745,14 +22562,22 @@ int precompile_compute_pipelines(const PrecompileOptions& options) {
21745 std::stable_sort(jobs.begin(), jobs.end(), [&](const Job& a, const Job& b) { 22562 std::stable_sort(jobs.begin(), jobs.end(), [&](const Job& a, const Job& b) {
21746 return options.smallest_first ? a.bytes < b.bytes : a.bytes > b.bytes; 22563 return options.smallest_first ? a.bytes < b.bytes : a.bytes > b.bytes;
21747 }); 22564 });
21748 if (options.limit && jobs.size() > options.limit) jobs.resize(options.limit); 22565 if (options.limit && jobs.size() > options.limit) {
22566 filtered += jobs.size() - options.limit;
22567 jobs.resize(options.limit);
22568 }
21749 std::uint64_t total_bytes = 0; 22569 std::uint64_t total_bytes = 0;
21750 for (const Job& job : jobs) total_bytes += job.bytes; 22570 for (const Job& job : jobs) total_bytes += job.bytes;
21751 const unsigned threads = (std::max)(1u, options.threads); 22571 const unsigned threads = (std::max)(1u, options.threads);
21752 const unsigned big_threads = options.big_threads ? (std::min)(options.big_threads, threads) : threads; 22572 const unsigned big_threads = options.big_threads ? (std::min)(options.big_threads, threads) : threads;
21753 std::fprintf(stderr, "[precompile] %zu compute entries to build (%.1f MB of SPIR-V; %zu filtered out, %zu not " 22573 if (listed && !options.skip_listed)
21754 "buildable), %s first, %u thread(s), at most %u on modules over %zu bytes; journal %ls\n", 22574 std::fprintf(stderr, "[precompile] LEONIDA_SKIP_COMPUTE names %zu of the entries: built anyway, since the list "
21755 jobs.size(), double(total_bytes) / 1e6, filtered, not_buildable, 22575 "drops their dispatches at play only (--skip-listed leaves them out of this run)\n",
22576 listed);
22577 std::fprintf(stderr, "[precompile] %zu compute entries to build (%.1f MB of SPIR-V; %zu filtered out, %zu left "
22578 "out by --skip-listed, %zu not buildable), %s first, %u thread(s), at most %u on modules over "
22579 "%zu bytes; journal %ls\n",
22580 jobs.size(), double(total_bytes) / 1e6, filtered, listed_left_out, not_buildable,
21756 options.smallest_first ? "smallest" : "largest", threads, big_threads, options.big_bytes, 22581 options.smallest_first ? "smallest" : "largest", threads, big_threads, options.big_bytes,
21757 pipeline_journal_dir().c_str()); 22582 pipeline_journal_dir().c_str());
21758 if (options.dry_run) { 22583 if (options.dry_run) {
@@ -21762,7 +22587,7 @@ int precompile_compute_pipelines(const PrecompileOptions& options) {
21762 22587
21763 std::atomic<std::size_t> next{0}; 22588 std::atomic<std::size_t> next{0};
21764 std::mutex progress_mutex; 22589 std::mutex progress_mutex;
21765 std::size_t done = 0, compiled = 0, skipped = 0, hits = 0, failed = 0; 22590 std::size_t done = 0, compiled = 0, skipped = 0, hits = 0, failed = 0, journaled = 0, elsewhere = 0;
21766 std::uint64_t done_bytes = 0; 22591 std::uint64_t done_bytes = 0;
21767 std::mutex big_mutex; 22592 std::mutex big_mutex;
21768 std::condition_variable big_free; 22593 std::condition_variable big_free;
@@ -21801,8 +22626,8 @@ int precompile_compute_pipelines(const PrecompileOptions& options) {
21801 ++done; 22626 ++done;
21802 done_bytes += job.bytes; 22627 done_bytes += job.bytes;
21803 const char* what = "failed"; 22628 const char* what = "failed";
21804 if (build.skipped) ++skipped, what = "journaled already"; 22629 if (build.skipped) ++skipped, ++journaled, what = "journaled already";
21805 else if (build.busy) ++skipped, what = "being built by another process"; 22630 else if (build.busy) ++skipped, ++elsewhere, what = "being built by another process";
21806 else if (build.result != VK_SUCCESS || (!build.pipeline && !build.skipped)) ++failed; 22631 else if (build.result != VK_SUCCESS || (!build.pipeline && !build.skipped)) ++failed;
21807 else if (build.journal_hit || build.from_shared) ++hits, what = "found in a cache"; 22632 else if (build.journal_hit || build.from_shared) ++hits, what = "found in a cache";
21808 else ++compiled, what = build.journaled ? "compiled and journaled" : "compiled (not journaled)"; 22633 else ++compiled, what = build.journaled ? "compiled and journaled" : "compiled (not journaled)";
@@ -21819,8 +22644,12 @@ int precompile_compute_pipelines(const PrecompileOptions& options) {
21819 std::vector<std::thread> pool; 22644 std::vector<std::thread> pool;
21820 for (unsigned t = 0; t < threads; ++t) pool.emplace_back(worker); 22645 for (unsigned t = 0; t < threads; ++t) pool.emplace_back(worker);
21821 for (std::thread& t : pool) t.join(); 22646 for (std::thread& t : pool) t.join();
21822 std::fprintf(stderr, "[precompile] done: %zu compiled, %zu from a cache, %zu journaled already, %zu failed, %zu " 22647 // One line for the whole run: what was built, what was there already, and what was left out and why.
21823 "not buildable, in %.0f s\n", compiled, hits, skipped, failed, not_buildable, 22648 std::fprintf(stderr, "[precompile] done: %zu built (%zu compiled, %zu from a cache), %zu journaled already, %zu "
22649 "being built by another process, %zu failed; left out: %zu of %zu listed in "
22650 "LEONIDA_SKIP_COMPUTE%s, %zu not buildable, %zu filtered out; in %.0f s\n",
22651 compiled + hits, compiled, hits, journaled, elsewhere, failed, listed_left_out, listed,
22652 options.skip_listed ? " (--skip-listed)" : "", not_buildable, filtered,
21824 std::chrono::duration<double>(Clock::now() - began).count()); 22653 std::chrono::duration<double>(Clock::now() - began).count());
21825 return failed ? 2 : 0; 22654 return failed ? 2 : 0;
21826} 22655}
@@ -21939,6 +22768,7 @@ int compile_server(const CompileServerOptions& options) {
21939 const leonida::ShaderEntry* entry = it == by_name.end() ? nullptr : it->second; 22768 const leonida::ShaderEntry* entry = it == by_name.end() ? nullptr : it->second;
21940 const std::size_t bytes = entry ? library->spirv_bytes(*entry) : 0; 22769 const std::size_t bytes = entry ? library->spirv_bytes(*entry) : 0;
21941 if (!entry) failure = "no compute entry of that name in this library"; 22770 if (!entry) failure = "no compute entry of that name in this library";
22771 else if (skip_compute(entry->name)) failure = "LEONIDA_SKIP_COMPUTE"; // the game drops its dispatches
21942 else if (const char* why = host.unbuildable(*entry, bytes)) failure = why; 22772 else if (const char* why = host.unbuildable(*entry, bytes)) failure = why;
21943 // LOCAL FIX (compile helper: the journal name was checked after the build): the name is hashed from the 22773 // LOCAL FIX (compile helper: the journal name was checked after the build): the name is hashed from the
21944 // module and this device's environment, which costs no driver call. A request from a game whose environment 22774 // module and this device's environment, which costs no driver call. A request from a game whose environment
@@ -22063,7 +22893,7 @@ int compile_server(const CompileServerOptions& options) {
22063 return; 22893 return;
22064 } 22894 }
22065 const leonida::ShaderEntry& entry = *fill_order[i]; 22895 const leonida::ShaderEntry& entry = *fill_order[i];
22066 if (host.unbuildable(entry, fill_bytes[i])) continue; 22896 if (skip_compute(entry.name) || host.unbuildable(entry, fill_bytes[i])) continue;
22067 std::error_code stat; 22897 std::error_code stat;
22068 const auto spv = library->spirv_file(entry); 22898 const auto spv = library->spirv_file(entry);
22069 const long long mtime = static_cast<long long>(std::filesystem::last_write_time(spv, stat).time_since_epoch().count()); 22899 const long long mtime = static_cast<long long>(std::filesystem::last_write_time(spv, stat).time_since_epoch().count());
diff --git a/runtime/shims/d3d12_xs_device.cpp b/runtime/shims/d3d12_xs_device.cpp
index 87cc26dd3..c5f12dc05 100644
--- a/runtime/shims/d3d12_xs_device.cpp
+++ b/runtime/shims/d3d12_xs_device.cpp
@@ -2289,6 +2289,12 @@ HRESULT queue_copy_page_mappings(ChildProxy* self, UINT count, const xmem::PageB
2289 if (!map && rt::xmem::copy_page_mappings_fn) map = &copy_page_mappings_default; 2289 if (!map && rt::xmem::copy_page_mappings_fn) map = &copy_page_mappings_default;
2290 if (!map || !count) return S_OK; 2290 if (!map || !count) return S_OK;
2291 if (!batches || flags) return E_INVALIDARG; 2291 if (!batches || flags) return E_INVALIDARG;
2292 // Which implementation remaps, once: a boot's read-fault reports belong to that route's tests.
2293 static std::atomic<bool> route_logged{false};
2294 if (!route_logged.exchange(true, std::memory_order_relaxed))
2295 std::fprintf(stderr, "[rt] d3d12_xs: CopyPageMappingsBatchX remaps through %s\n",
2296 map == &copy_page_mappings_default ? "xmem's range callback (copy_page_mappings_fn)"
2297 : "the installed batch hook (set_copy_page_mappings_hook)");
2292 auto* queue = reinterpret_cast<ID3D12CommandQueue*>(self->real); 2298 auto* queue = reinterpret_cast<ID3D12CommandQueue*>(self->real);
2293 using clock = std::chrono::steady_clock; 2299 using clock = std::chrono::steady_clock;
2294 const auto t0 = clock::now(); 2300 const auto t0 = clock::now();
@@ -2840,6 +2846,32 @@ struct UploadArena {
2840 2846
2841constexpr std::size_t kUploadChunkMin = 8 << 20; // one chunk serves a title's whole frame of uploads 2847constexpr std::size_t kUploadChunkMin = 8 << 20; // one chunk serves a title's whole frame of uploads
2842 2848
2849// LEONIDA_UPLOAD_LOG=1 (diagnostic): each upload chunk (its CPU base, device address and size), and the first 96 and
2850// then every 8192nd AllocateUploadMemory result as an offset into its chunk, so the addresses the title builds
2851// descriptors from can be matched with the memory it was handed.
2852inline bool upload_log() {
2853 static const bool on = [] {
2854 const char* v = std::getenv("LEONIDA_UPLOAD_LOG");
2855 return v && *v == '1';
2856 }();
2857 return on;
2858}
2859inline void log_upload_result(const UploadChunk* chunk, std::uint64_t result, std::uint64_t size,
2860 std::uint64_t alignment) {
2861 if (!upload_log() || !chunk) return;
2862 static std::atomic<std::uint64_t> calls{0};
2863 const std::uint64_t n = ++calls;
2864 if (n > 96 && (n % 8192)) return;
2865 const std::uint64_t base = reinterpret_cast<std::uint64_t>(chunk->cpu_base);
2866 std::fprintf(stderr,
2867 "[rt] upload-log: #%llu result 0x%llx = chunk 0x%llx + offset 0x%llx (size %llu, alignment %llu; "
2868 "chunk device address 0x%llx)\n",
2869 static_cast<unsigned long long>(n), static_cast<unsigned long long>(result),
2870 static_cast<unsigned long long>(base), static_cast<unsigned long long>(result - base),
2871 static_cast<unsigned long long>(size), static_cast<unsigned long long>(alignment),
2872 static_cast<unsigned long long>(chunk->gpu_base));
2873}
2874
2843UploadChunk* upload_chunk_new(DeviceProxy* device, std::size_t size) { 2875UploadChunk* upload_chunk_new(DeviceProxy* device, std::size_t size) {
2844 auto* chunk = new (std::nothrow) UploadChunk{}; 2876 auto* chunk = new (std::nothrow) UploadChunk{};
2845 if (!chunk) return nullptr; 2877 if (!chunk) return nullptr;
@@ -2865,6 +2897,24 @@ UploadChunk* upload_chunk_new(DeviceProxy* device, std::size_t size) {
2865 chunk->resource = resource; 2897 chunk->resource = resource;
2866 chunk->cpu_base = static_cast<std::uint8_t*>(cpu); 2898 chunk->cpu_base = static_cast<std::uint8_t*>(cpu);
2867 chunk->gpu_base = resource->GetGPUVirtualAddress(); 2899 chunk->gpu_base = resource->GetGPUVirtualAddress();
2900 // LEONIDA_UPLOAD_ALIAS=1 (experiment): the title takes the pointer AllocateUploadMemory hands it for a GPU
2901 // address too (the console's memory is unified) and writes it into the descriptors it builds itself. Entered in
2902 // the title VA table, the chunk's CPU range answers with the chunk's console VA (its device address minus
2903 // heap_base), so a V# the title wrote with such a pointer is rewritten to the chunk instead of left empty. A
2904 // chunk below the arena has a negative console VA, usable in a V# only with LEONIDA_IMPORT_BELOW_ARENA=1.
2905 static const bool alias = [] {
2906 const char* v = std::getenv("LEONIDA_UPLOAD_ALIAS");
2907 return v && *v == '1';
2908 }();
2909 if (alias) {
2910 const bool added = leonida::title_va_aliases().add(reinterpret_cast<std::uint64_t>(chunk->cpu_base),
2911 chunk->size, chunk->gpu_base);
2912 std::fprintf(stderr, "[rt] d3d12_xs: upload chunk 0x%llx (%llu bytes) entered as an alias of console VA "
2913 "0x%llx: %s\n",
2914 static_cast<unsigned long long>(reinterpret_cast<std::uint64_t>(chunk->cpu_base)),
2915 static_cast<unsigned long long>(chunk->size), static_cast<unsigned long long>(chunk->gpu_base),
2916 added ? "ok" : "refused");
2917 }
2868 return chunk; 2918 return chunk;
2869 } 2919 }
2870 if (resource) resource->Release(); 2920 if (resource) resource->Release();
@@ -2912,7 +2962,9 @@ std::uint64_t upload_alloc(DeviceProxy* device, std::uint64_t size, std::uint64_
2912 const std::size_t aligned = (chunk->used + (alignment - 1)) & ~(static_cast<std::size_t>(alignment) - 1); 2962 const std::size_t aligned = (chunk->used + (alignment - 1)) & ~(static_cast<std::size_t>(alignment) - 1);
2913 if (aligned >= chunk->used && aligned <= chunk->size && need <= chunk->size - aligned) { 2963 if (aligned >= chunk->used && aligned <= chunk->size && need <= chunk->size - aligned) {
2914 chunk->used = aligned + need; 2964 chunk->used = aligned + need;
2915 return reinterpret_cast<std::uint64_t>(chunk->cpu_base + aligned); 2965 const std::uint64_t result = reinterpret_cast<std::uint64_t>(chunk->cpu_base + aligned);
2966 log_upload_result(chunk, result, size, alignment);
2967 return result;
2916 } 2968 }
2917 } 2969 }
2918 const std::size_t chunk_size = need + alignment > kUploadChunkMin ? need + alignment : kUploadChunkMin; 2970 const std::size_t chunk_size = need + alignment > kUploadChunkMin ? need + alignment : kUploadChunkMin;
@@ -2926,7 +2978,14 @@ std::uint64_t upload_alloc(DeviceProxy* device, std::uint64_t size, std::uint64_
2926 arena->chunks = chunk; 2978 arena->chunks = chunk;
2927 const std::size_t aligned = (alignment - 1) & ~(static_cast<std::size_t>(alignment) - 1); // 0-based 2979 const std::size_t aligned = (alignment - 1) & ~(static_cast<std::size_t>(alignment) - 1); // 0-based
2928 chunk->used = aligned + need; 2980 chunk->used = aligned + need;
2929 return reinterpret_cast<std::uint64_t>(chunk->cpu_base + aligned); 2981 if (upload_log())
2982 std::fprintf(stderr, "[rt] upload-log: new chunk at 0x%llx, device address 0x%llx, %llu bytes (%s)\n",
2983 static_cast<unsigned long long>(reinterpret_cast<std::uint64_t>(chunk->cpu_base)),
2984 static_cast<unsigned long long>(chunk->gpu_base), static_cast<unsigned long long>(chunk->size),
2985 chunk->resource ? "mapped upload buffer" : "VirtualAlloc fallback");
2986 const std::uint64_t result = reinterpret_cast<std::uint64_t>(chunk->cpu_base + aligned);
2987 log_upload_result(chunk, result, size, alignment);
2988 return result;
2930} 2989}
2931 2990
2932// An address inside an upload chunk becomes the chunk's device address plus the offset; anything else — a 2991// An address inside an upload chunk becomes the chunk's device address plus the offset; anything else — a
@@ -2949,6 +3008,9 @@ void destroy_upload_state(void* upload_state) {
2949 for (UploadChunk* chunk = arena->chunks; chunk;) { 3008 for (UploadChunk* chunk = arena->chunks; chunk;) {
2950 UploadChunk* next = chunk->next; 3009 UploadChunk* next = chunk->next;
2951 if (chunk->resource) { 3010 if (chunk->resource) {
3011 const char* alias = std::getenv("LEONIDA_UPLOAD_ALIAS");
3012 if (alias && *alias == '1')
3013 leonida::title_va_aliases().remove(reinterpret_cast<std::uint64_t>(chunk->cpu_base), chunk->gpu_base);
2952 chunk->resource->Unmap(0, nullptr); 3014 chunk->resource->Unmap(0, nullptr);
2953 chunk->resource->Release(); 3015 chunk->resource->Release();
2954 } else { 3016 } else {
diff --git a/runtime/shims/d3d12_xs_list_values.h b/runtime/shims/d3d12_xs_list_values.h
index e49eefa98..b4f24bbbb 100644
--- a/runtime/shims/d3d12_xs_list_values.h
+++ b/runtime/shims/d3d12_xs_list_values.h
@@ -31,8 +31,10 @@
31// - The thread that signals a gate runs the work the layer held behind it (QueueHolds: the held lists' submission, 31// - The thread that signals a gate runs the work the layer held behind it (QueueHolds: the held lists' submission,
32// the shadow refresh, a deferred Present). That is the releaser, a second thread: the pump only decides, so 32// the shadow refresh, a deferred Present). That is the releaser, a second thread: the pump only decides, so
33// writes keep landing and other gates keep timing out while held work runs. 33// writes keep landing and other gates keep timing out while held work runs.
34// Bounded: a gate is signalled after LEONIDA_VALUE_WAIT_TIMEOUT_MS (default 200 ms) whatever memory holds, counted 34// Bounded: a gate is signalled after LEONIDA_VALUE_WAIT_TIMEOUT_MS (default 200 ms) of idle wait time, counted from
35// from when the gates before it on its queue opened, and logged once per address. Short timeouts (4 ms) go to an 35// when the gates before it on its queue opened and paused (up to a finite cap scaled with the gate's own budget) while
36// the releaser is running held work, while an acyclic matching producer write is in flight, or while unrelated
37// unblocked GPU work is running (src/list_value_wait_budget.h); logged once per address. Short timeouts (4 ms) go to an
36// address that timed out three times in a row, and, once four gates in a row timed out (the title waits for values 38// address that timed out three times in a row, and, once four gates in a row timed out (the title waits for values
37// no modelled write stores, a new address each frame), to every wait whose address was never met: a frame then pays 39// no modelled write stores, a new address each frame), to every wait whose address was never met: a frame then pays
38// a few milliseconds, not the full timeout, per such wait. A wait cut short is watched for the rest of the full 40// a few milliseconds, not the full timeout, per such wait. A wait cut short is watched for the rest of the full
@@ -56,10 +58,12 @@
56#include <memory> 58#include <memory>
57#include <mutex> 59#include <mutex>
58#include <new> 60#include <new>
61#include <span>
59#include <utility> 62#include <utility>
60#include <vector> 63#include <vector>
61 64
62#include "d3d12_xs_device.h" // console_value_met, ListValueStats 65#include "d3d12_xs_device.h" // console_value_met, ListValueStats
66#include "../src/list_value_wait_budget.h" // leonida::list_value_wait: work-aware timeout clock & producer graph
63#include "../src/title_page_watch.h" // leonida::kernel_writes::store 67#include "../src/title_page_watch.h" // leonida::kernel_writes::store
64#include "../src/value_write_sink.h" // leonida::value_sink: the arena and xmem's PAGE_NOACCESS pages 68#include "../src/value_write_sink.h" // leonida::value_sink: the arena and xmem's PAGE_NOACCESS pages
65 69
@@ -362,7 +366,8 @@ public:
362 if (writes.empty() || exiting_.load(std::memory_order_relaxed)) return; // stop(): see there 366 if (writes.empty() || exiting_.load(std::memory_order_relaxed)) return; // stop(): see there
363 { 367 {
364 std::lock_guard lock(mutex_); 368 std::lock_guard lock(mutex_);
365 writes_.push_back({std::move(queue), value, std::move(writes)}); 369 const std::uint64_t after_gate = max_pending_gate_locked(queue.get());
370 writes_.push_back({std::move(queue), value, std::move(writes), after_gate});
366 } 371 }
367 start_or_settle(); 372 start_or_settle();
368 } 373 }
@@ -396,7 +401,7 @@ public:
396 gate.value = value; 401 gate.value = value;
397 gate.started = true; 402 gate.started = true;
398 gate.since = Clock::now(); 403 gate.since = Clock::now();
399 gate.deadline = Clock::time_point::max(); 404 gate.last_tick = gate.since;
400 gate.after = after; 405 gate.after = after;
401 gate.action = std::move(action); 406 gate.action = std::move(action);
402 gates_.push_back(std::move(gate)); 407 gates_.push_back(std::move(gate));
@@ -502,13 +507,15 @@ private:
502 std::shared_ptr<QueueValues> queue; 507 std::shared_ptr<QueueValues> queue;
503 std::uint64_t value; 508 std::uint64_t value;
504 std::vector<Write> writes; 509 std::vector<Write> writes;
510 std::uint64_t after_gate = 0; // highest pending gate value on `queue` ahead of this write group
505 }; 511 };
506 struct Gate { 512 struct Gate {
507 std::shared_ptr<QueueValues> queue; 513 std::shared_ptr<QueueValues> queue;
508 std::uint64_t value = 0; 514 std::uint64_t value = 0;
509 std::vector<Wait> waits; 515 std::vector<Wait> waits;
510 Clock::time_point deadline; // set by start_gate 516 leonida::list_value_wait::GateTimeoutState timeout{}; // work-aware timeout clock (set by start_gate)
511 Clock::time_point since; 517 Clock::time_point last_tick{};
518 Clock::time_point since{};
512 bool started = false; // the gates before it on its queue have opened: its time runs 519 bool started = false; // the gates before it on its queue have opened: its time runs
513 bool cut_short = false; // given the short timeout 520 bool cut_short = false; // given the short timeout
514 std::uint64_t after = 0; // action gates: the queue's `written` value the action runs behind 521 std::uint64_t after = 0; // action gates: the queue's `written` value the action runs behind
@@ -632,12 +639,21 @@ private:
632 releasing_ = true; 639 releasing_ = true;
633 } 640 }
634 SetEvent(wake_); // the pump may be in an untimed wait: it watches the Signals from here on 641 SetEvent(wake_); // the pump may be in an untimed wait: it watches the Signals from here on
642 struct PendingReleaseGuard {
643 std::atomic<std::size_t>* count;
644 std::size_t remaining;
645 ~PendingReleaseGuard() {
646 if (remaining) count->fetch_sub(remaining, std::memory_order_release);
647 }
648 } pending_guard{&pending_releases_, batch.size()};
635 for (Release& release : batch) { 649 for (Release& release : batch) {
636 if (stop_.load(std::memory_order_relaxed)) break; 650 if (stop_.load(std::memory_order_relaxed)) break;
637 signal_value_.store(release.value, std::memory_order_relaxed); 651 signal_value_.store(release.value, std::memory_order_relaxed);
638 signal_since_ms_.store(GetTickCount64() | 1, std::memory_order_relaxed); // never 0 while inside 652 signal_since_ms_.store(GetTickCount64() | 1, std::memory_order_relaxed); // never 0 while inside
639 signal(release); 653 signal(release);
640 signal_since_ms_.store(0, std::memory_order_relaxed); 654 signal_since_ms_.store(0, std::memory_order_relaxed);
655 pending_releases_.fetch_sub(1, std::memory_order_release);
656 --pending_guard.remaining;
641 } 657 }
642 std::lock_guard lock(release_mutex_); 658 std::lock_guard lock(release_mutex_);
643 releasing_ = false; 659 releasing_ = false;
@@ -721,36 +737,114 @@ private:
721 writes_.swap(rest); 737 writes_.swap(rest);
722 } 738 }
723 739
724 // The gates whose waits are met, whose time is up or whose action's turn has come, taken off the list in each 740 // Highest pending gate value currently in `gates_` for `queue` (0 if none). Called with mutex_ held.
741 std::uint64_t max_pending_gate_locked(const QueueValues* queue) const {
742 std::uint64_t highest = 0;
743 for (const Gate& g : gates_)
744 if (g.queue.get() == queue && g.value > highest) highest = g.value;
745 return highest;
746 }
747
748 // The gates whose waits are met, whose idle time is up or whose action's turn has come, taken off the list in each
725 // queue's order (a queue's gate values rise in submission order, so a later one must not be signalled first: it 749 // queue's order (a queue's gate values rise in submission order, so a later one must not be signalled first: it
726 // would open the earlier one too). `force` (no threads): every gate, now. Called with mutex_ held. 750 // would open the earlier one too). A memory gate's timeout clock pauses while held work is being released, while
727 void take_open(bool force, std::vector<Release>& opening) { 751 // an acyclic matching producer write is in flight, or (up to a cap) while unrelated unblocked GPU work is running
728 std::vector<const QueueValues*> blocked; 752 // (src/list_value_wait_budget.h). `force` (no threads): every gate, now. Called with mutex_ held.
753 void take_open(bool force, bool landed_any, std::vector<Release>& opening) {
754 if (gates_.empty()) return;
729 const auto now = Clock::now(); 755 const auto now = Clock::now();
730 for (auto it = gates_.begin(); it != gates_.end();) { 756 namespace lvw = leonida::list_value_wait;
731 const QueueValues* queue = it->queue.get(); 757
732 if (std::find(blocked.begin(), blocked.end(), queue) != blocked.end()) { 758 // Build the lightweight producer/gate dependency view lazily only if a started memory gate is still unmet.
733 ++it; 759 bool graph_built = false;
734 continue; 760 std::vector<lvw::PendingWrite> flat_writes;
761 std::vector<lvw::PendingWriteGroup> view_writes;
762 std::vector<lvw::WaitPredicate> flat_waits;
763 std::vector<lvw::PendingGate> view_gates;
764 std::vector<std::pair<std::size_t, std::size_t>> gate_wait_ranges; // (offset, count) into flat_waits
765 const auto ensure_graph = [&] {
766 if (graph_built) return;
767 graph_built = true;
768 std::size_t total_writes = 0;
769 for (const WriteGroup& wg : writes_) total_writes += wg.writes.size();
770 flat_writes.reserve(total_writes);
771 view_writes.reserve(writes_.size());
772 for (const WriteGroup& wg : writes_) {
773 const std::size_t start = flat_writes.size();
774 for (const Write& w : wg.writes)
775 flat_writes.push_back({w.address, w.value, w.bytes, w.kind != WriteKind::value});
776 view_writes.push_back({wg.queue.get(), wg.after_gate,
777 std::span<const lvw::PendingWrite>(flat_writes).subspan(start, wg.writes.size())});
778 }
779 std::size_t total_waits = 0;
780 for (const Gate& g : gates_)
781 if (!g.action) total_waits += g.waits.size();
782 flat_waits.reserve(total_waits);
783 gate_wait_ranges.reserve(gates_.size());
784 for (const Gate& g : gates_) {
785 const std::size_t start = flat_waits.size();
786 if (!g.action) {
787 for (const Wait& w : g.waits)
788 if (!met_now(w)) flat_waits.push_back({w.address, w.reference, w.comparison, w.wide});
789 }
790 gate_wait_ranges.emplace_back(start, flat_waits.size() - start);
791 }
792 view_gates.reserve(gates_.size());
793 for (std::size_t i = 0; i < gates_.size(); ++i) {
794 const auto [off, cnt] = gate_wait_ranges[i];
795 view_gates.push_back({gates_[i].queue.get(), gates_[i].value, static_cast<bool>(gates_[i].action),
796 std::span<const lvw::WaitPredicate>(flat_waits).subspan(off, cnt)});
735 } 797 }
798 };
799
800 std::vector<const QueueValues*> blocked;
801 std::vector<bool> opened(gates_.size(), false);
802 for (std::size_t idx = 0; idx < gates_.size(); ++idx) {
803 Gate& gate = gates_[idx];
804 const QueueValues* queue = gate.queue.get();
805 if (std::find(blocked.begin(), blocked.end(), queue) != blocked.end()) continue;
736 bool open = force; 806 bool open = force;
737 if (it->action) { 807 if (gate.action) {
738 open = open || queue->written->GetCompletedValue() >= it->after; 808 open = open || queue->written->GetCompletedValue() >= gate.after;
739 } else { 809 } else {
740 if (!it->started) start_gate(*it, now); 810 if (!gate.started) start_gate(gate, now);
741 bool met = true; 811 bool met = true;
742 for (const Wait& wait : it->waits) met = met && met_now(wait); 812 for (const Wait& wait : gate.waits) met = met && met_now(wait);
743 open = open || met || now >= it->deadline; 813 bool timed_out = false;
744 if (open) note_outcome(*it, met || force); 814 if (!open && !met) {
815 const std::uint64_t dt_us =
816 now > gate.last_tick
817 ? static_cast<std::uint64_t>(
818 std::chrono::duration_cast<std::chrono::microseconds>(now - gate.last_tick).count())
819 : 0u;
820 gate.last_tick = now;
821 const bool releaser_busy =
822 landed_any || !opening.empty() || pending_releases_.load(std::memory_order_acquire) != 0;
823 lvw::PauseReason reason = lvw::PauseReason::releaser_busy;
824 if (!releaser_busy) {
825 ensure_graph();
826 reason = lvw::pause_reason(false, view_writes, view_gates, idx, console_value_met);
827 }
828 timed_out = gate.timeout.advance(dt_us, reason);
829 } else {
830 gate.last_tick = now;
831 }
832 open = open || met || timed_out;
833 if (open) note_outcome(gate, met || force, now);
745 } 834 }
746 if (open) { 835 if (open) {
747 opening.push_back({std::move(it->queue), it->value, std::move(it->action)}); 836 opening.push_back({std::move(gate.queue), gate.value, std::move(gate.action)});
748 it = gates_.erase(it); 837 opened[idx] = true;
749 } else { 838 } else {
750 blocked.push_back(queue); 839 blocked.push_back(queue);
751 ++it;
752 } 840 }
753 } 841 }
842 if (!opening.empty()) {
843 std::deque<Gate> rest;
844 for (std::size_t idx = 0; idx < gates_.size(); ++idx)
845 if (!opened[idx]) rest.push_back(std::move(gates_[idx]));
846 gates_.swap(rest);
847 }
754 } 848 }
755 849
756 // Writes landed, then gates opened: the pump's one step. `force` runs on the caller's thread when the threads do 850 // Writes landed, then gates opened: the pump's one step. `force` runs on the caller's thread when the threads do
@@ -763,12 +857,15 @@ private:
763 busy_ = true; 857 busy_ = true;
764 take_landed(force, landing); 858 take_landed(force, landing);
765 } 859 }
860 const bool landed_any = !landing.empty();
766 for (const WriteGroup& group : landing) land(group); 861 for (const WriteGroup& group : landing) land(group);
767 std::vector<Release> opening; 862 std::vector<Release> opening;
768 { 863 {
769 std::lock_guard lock(mutex_); 864 std::lock_guard lock(mutex_);
770 watch_late(); 865 watch_late();
771 take_open(force, opening); 866 take_open(force, landed_any, opening);
867 if (!force && !opening.empty())
868 pending_releases_.fetch_add(opening.size(), std::memory_order_release);
772 } 869 }
773 if (!opening.empty()) { 870 if (!opening.empty()) {
774 if (force) { 871 if (force) {
@@ -919,7 +1016,10 @@ private:
919 gate.started = true; 1016 gate.started = true;
920 gate.cut_short = cut_short; 1017 gate.cut_short = cut_short;
921 gate.since = now; 1018 gate.since = now;
922 gate.deadline = now + std::chrono::milliseconds(cut_short ? kDemotedTimeoutMs : full); 1019 gate.last_tick = now;
1020 const unsigned gate_ms = cut_short ? kDemotedTimeoutMs : full;
1021 const auto caps = leonida::list_value_wait::default_pause_caps(gate_ms, cut_short);
1022 gate.timeout.reset(static_cast<std::uint64_t>(gate_ms) * 1000u, caps.active_us, caps.max_us);
923 } 1023 }
924 1024
925 // A wait for `address` was met (in time, or late): the address has met history and its timeouts in a row end. 1025 // A wait for `address` was met (in time, or late): the address has met history and its timeouts in a row end.
@@ -961,15 +1061,15 @@ private:
961 } 1061 }
962 1062
963 // Called with mutex_ held. 1063 // Called with mutex_ held.
964 void note_outcome(const Gate& gate, bool met) { 1064 void note_outcome(const Gate& gate, bool met, Clock::time_point now) {
965 if (met) { 1065 if (met) {
966 bump(counters().gates_met); 1066 bump(counters().gates_met);
967 timeouts_in_a_row_ = 0; 1067 timeouts_in_a_row_ = 0;
968 for (const Wait& wait : gate.waits) note_met(wait.address); 1068 for (const Wait& wait : gate.waits) note_met(wait.address);
969 if (gate.cut_short && !gate.waits.empty()) lift_demotion(gate.waits.front().address); 1069 if (gate.cut_short && !gate.waits.empty()) lift_demotion(gate.waits.front().address);
970 if (logged_met_ < 4) { // the first few, to show the model at work in a boot log 1070 if (logged_met_ < 4 && !gate.waits.empty()) { // the first few, to show the model at work in a boot log
971 ++logged_met_; 1071 ++logged_met_;
972 const double ms = std::chrono::duration<double, std::milli>(Clock::now() - gate.since).count(); 1072 const double ms = std::chrono::duration<double, std::milli>(now - gate.since).count();
973 std::fprintf(stderr, "[rt] d3d12_xs: a queue's wait for 0x%llx was met after %.2f ms\n", 1073 std::fprintf(stderr, "[rt] d3d12_xs: a queue's wait for 0x%llx was met after %.2f ms\n",
974 static_cast<unsigned long long>(gate.waits.front().address), ms); 1074 static_cast<unsigned long long>(gate.waits.front().address), ms);
975 } 1075 }
@@ -990,14 +1090,14 @@ private:
990 for (const Wait& wait : gate.waits) { 1090 for (const Wait& wait : gate.waits) {
991 if (met_now(wait)) continue; 1091 if (met_now(wait)) continue;
992 if (gate.cut_short && !watched && late_.size() < kMaxLate) { 1092 if (gate.cut_short && !watched && late_.size() < kMaxLate) {
993 late_.push_back({wait, gate.since + std::chrono::milliseconds(full)}); 1093 late_.push_back({wait, now + std::chrono::milliseconds(full)});
994 watched = true; 1094 watched = true;
995 } 1095 }
996 Streak* streak = find_streak(wait.address); 1096 Streak* streak = find_streak(wait.address);
997 if (!streak) streak = add_streak(wait.address); 1097 if (!streak) streak = add_streak(wait.address);
998 ++streak->timeouts; 1098 ++streak->timeouts;
999 std::uint64_t now = 0; 1099 std::uint64_t current = 0;
1000 read_value(wait.address, wait.wide, now); 1100 read_value(wait.address, wait.wide, current);
1001 if (!streak->logged) { 1101 if (!streak->logged) {
1002 streak->logged = true; 1102 streak->logged = true;
1003 static std::atomic<unsigned> addresses{0}; 1103 static std::atomic<unsigned> addresses{0};
@@ -1008,7 +1108,7 @@ private:
1008 gate.cut_short ? kDemotedTimeoutMs : full, 1108 gate.cut_short ? kDemotedTimeoutMs : full,
1009 static_cast<unsigned long long>(wait.address), wait.wide ? 64u : 32u, 1109 static_cast<unsigned long long>(wait.address), wait.wide ? 64u : 32u,
1010 wait.comparison, static_cast<unsigned long long>(wait.reference), 1110 wait.comparison, static_cast<unsigned long long>(wait.reference),
1011 static_cast<unsigned long long>(now)); 1111 static_cast<unsigned long long>(current));
1012 } 1112 }
1013 if (streak->timeouts == kDemoteAfter) { 1113 if (streak->timeouts == kDemoteAfter) {
1014 static std::atomic<unsigned> demoted{0}; 1114 static std::atomic<unsigned> demoted{0};
@@ -1041,6 +1141,7 @@ private:
1041 std::condition_variable release_ready_; 1141 std::condition_variable release_ready_;
1042 std::deque<Release> releases_; 1142 std::deque<Release> releases_;
1043 bool releasing_ = false; 1143 bool releasing_ = false;
1144 std::atomic<std::size_t> pending_releases_{0}; // queued + active releases, read lock-free in take_open()
1044 std::atomic<std::uint64_t> signal_since_ms_{0}; // GetTickCount64 when the releaser's current Signal began, or 0 1145 std::atomic<std::uint64_t> signal_since_ms_{0}; // GetTickCount64 when the releaser's current Signal began, or 0
1045 std::atomic<std::uint64_t> signal_value_{0}; 1146 std::atomic<std::uint64_t> signal_value_{0};
1046 std::atomic<DWORD> releaser_tid_{0}; 1147 std::atomic<DWORD> releaser_tid_{0};
diff --git a/runtime/shims/dstorage.cpp b/runtime/shims/dstorage.cpp
index fe800fe68..103a5c9df 100644
--- a/runtime/shims/dstorage.cpp
+++ b/runtime/shims/dstorage.cpp
@@ -10,6 +10,8 @@
10// it has. Completion is therefore in queue order, as the API guarantees. 10// it has. Completion is therefore in queue order, as the API guarantees.
11// - Compressed requests stage RFC 1950 inflate, BCPack BC block reconstruction and DirectStorage 11// - Compressed requests stage RFC 1950 inflate, BCPack BC block reconstruction and DirectStorage
12// macro-unshuffle before publishing the destination. Physical page numbers resolve in xmem at execution. 12// macro-unshuffle before publishing the destination. Physical page numbers resolve in xmem at execution.
13// - A queue half full submits itself, but a read into physical pages and everything enqueued behind it wait for
14// the title's own Submit: the title may fill the page list only then (hold_pages below).
13// Nothing here goes online or touches the GPU. 15// Nothing here goes online or touches the GPU.
14#include <windows.h> 16#include <windows.h>
15#include <d3d12.h> 17#include <d3d12.h>
@@ -38,6 +40,7 @@
38#include "../src/shader_directory.h" 40#include "../src/shader_directory.h"
39#include "../src/dstorage_swizzle.h" 41#include "../src/dstorage_swizzle.h"
40#include "../src/dstorage_trace.h" 42#include "../src/dstorage_trace.h"
43#include "../src/dstorage_hold.h"
41#include "dstorage_xs_abi.h" 44#include "dstorage_xs_abi.h"
42#include "dstorage_staging.h" 45#include "dstorage_staging.h"
43#include "startup_trace.h" 46#include "startup_trace.h"
@@ -542,6 +545,47 @@ HRESULT read_file_range(HANDLE handle, uint64_t offset, void* destination, uint3
542 return S_OK; 545 return S_OK;
543} 546}
544 547
548// ---- Reads into physical pages wait for the title's Submit -------------------------------------------------------
549//
550// A request into physical pages names them through a pointer into the title's own page-number table, and a title may
551// fill that table for a batch only in its submit path, right before Submit. A queue that submits itself at half its
552// capacity then starts such a read early: it finds page 0 and fails, or finds the number the slot held before and
553// writes the data into a page that now belongs to something else, with no error at all. So a self-submit stops at
554// the first read into physical pages: that read and every entry behind it (the queue completes in order) wait for
555// the title's Submit. A full queue still submits everything, since the title cannot call Submit while it waits in an
556// enqueue, and Close does as before. The idea is from VIctory (Marvisak/VIctory eddde73, carried in
557// fxceless/victory-fork 79cfdd9); the code here is written anew for this queue.
558//
559// LEONIDA_DSTORAGE_HOLD_PAGES=0 restores the old self-submit of everything. A hold has a time limit, so that a
560// title path that never calls Submit and counted on the self-submit cannot stall for good: held entries that have
561// waited LEONIDA_DSTORAGE_HOLD_MS milliseconds (2000 unless set) are submitted, page lists as they are, and counted
562// as a timed release. 0 is no limit: they wait for Submit, however long. Both are read when a queue is created.
563constexpr uint32_t kDefaultHoldMs = 2000;
564
565uint32_t environment_number(const wchar_t* name, uint32_t fallback) {
566 wchar_t value[16]{};
567 const DWORD n = GetEnvironmentVariableW(name, value, 16);
568 if (n == 0 || n >= 16) return fallback;
569 wchar_t* end = nullptr;
570 const unsigned long parsed = std::wcstoul(value, &end, 10);
571 return end && *end == 0 ? static_cast<uint32_t>(parsed) : fallback;
572}
573
574// One line with every counter, at each power of two of the counter that moved: countable in a truncated log
575// without a line per event.
576void log_hold(const char* event, uint64_t n, unsigned capacity, size_t held_now) {
577 if (n & (n - 1)) return;
578 const auto& h = leonida::dstorage::hold_stats();
579 std::lock_guard lock(log_mutex());
580 std::fprintf(stderr, "[rt] ds-hold event=%s self_submits=%llu held_reads=%llu full_releases=%llu "
581 "timed_releases=%llu page0_entries=%llu capacity=%u held_now=%zu\n", event,
582 static_cast<unsigned long long>(h.self_submits.load()),
583 static_cast<unsigned long long>(h.held_reads.load()),
584 static_cast<unsigned long long>(h.full_releases.load()),
585 static_cast<unsigned long long>(h.timed_releases.load()),
586 static_cast<unsigned long long>(h.page0_entries.load()), capacity, held_now);
587}
588
545// ---- Queues ------------------------------------------------------------------------------------------------------- 589// ---- Queues -------------------------------------------------------------------------------------------------------
546 590
547// Only sampled when request tracing is enabled. Times include work done by the file/decode worker. 591// Only sampled when request tracing is enabled. Times include work done by the file/decode worker.
@@ -576,7 +620,10 @@ struct Entry {
576 620
577class Queue final : public IDStorageQueueX2 { 621class Queue final : public IDStorageQueueX2 {
578public: 622public:
579 explicit Queue(const DSTORAGE_QUEUE_DESC1& desc) : desc_(desc) { 623 explicit Queue(const DSTORAGE_QUEUE_DESC1& desc)
624 : desc_(desc),
625 hold_pages_(environment_number(L"LEONIDA_DSTORAGE_HOLD_PAGES", 1) != 0),
626 hold_release_ms_(environment_number(L"LEONIDA_DSTORAGE_HOLD_MS", kDefaultHoldMs)) {
580 error_event_ = CreateEventW(nullptr, TRUE, FALSE, nullptr); 627 error_event_ = CreateEventW(nullptr, TRUE, FALSE, nullptr);
581 clear_record_locked(); 628 clear_record_locked();
582 std::lock_guard lock(stats().mutex); 629 std::lock_guard lock(stats().mutex);
@@ -781,15 +828,64 @@ private:
781 bool auto_submit() const { return !desc_.Options.AutoSubmitDisabled; } 828 bool auto_submit() const { return !desc_.Options.AutoSubmitDisabled; }
782 size_t used_locked() const { return entries_.size() + in_flight_; } 829 size_t used_locked() const { return entries_.size() + in_flight_; }
783 830
831 // A read into physical pages: its page list may not be filled before the title's Submit (hold_pages above).
832 static bool into_pages(const Entry& e) {
833 return e.type == Entry::Type::Request && (e.request.Options.AsUINT64 & options::kDestinationPages) != 0;
834 }
835
836 // The queue has reached half its capacity and holds nothing yet. Submits up to the first read into physical
837 // pages, which waits with everything behind it for the title's Submit.
838 void self_submit_locked() {
839 auto& h = leonida::dstorage::hold_stats();
840 if (!hold_pages_) {
841 log_hold("self-submit", ++h.self_submits, desc_.Capacity, 0);
842 submit_locked();
843 return;
844 }
845 size_t end = submitted_;
846 while (end < entries_.size() && !into_pages(entries_[end])) ++end;
847 if (end < entries_.size()) {
848 uint64_t reads = 0;
849 for (size_t i = end; i < entries_.size(); ++i) reads += into_pages(entries_[i]);
850 h.held_reads += reads;
851 holding_ = true;
852 hold_warned_ = false;
853 held_since_ = std::chrono::steady_clock::now();
854 }
855 const size_t held_now = entries_.size() - end;
856 const bool hold = holding_; // submit_locked ends a hold when it submits everything
857 submit_locked(end);
858 holding_ = hold;
859 if (holding_) work_.notify_one(); // the worker starts timing the hold
860 log_hold("self-submit", ++h.self_submits, desc_.Capacity, held_now);
861 }
862
784 void enqueue(Entry&& e) { 863 void enqueue(Entry&& e) {
785 { 864 {
786 std::unique_lock lock(mutex_); 865 std::unique_lock lock(mutex_);
787 // A full queue waits for the worker to free a slot. With auto-submit on, half the queue is always 866 // A full queue waits for the worker to free a slot. With auto-submit on, half the queue was submitted
788 // submitted by then; with it off, only a Submit from another thread frees one (as the reference warns). 867 // by then, except what is held for the title's Submit: the title cannot make that call while it waits
789 space_.wait(lock, [&] { return closing_ || used_locked() < usable(); }); 868 // here, so a full queue submits the held entries too, page lists as they are. With auto-submit off,
869 // only a Submit from another thread frees a slot (as the reference warns).
870 space_.wait(lock, [&] {
871 if (closing_ || used_locked() < usable()) return true;
872 if (holding_) {
873 const size_t held_now = entries_.size() - submitted_;
874 submit_locked();
875 log_hold("full-queue", ++leonida::dstorage::hold_stats().full_releases, desc_.Capacity, held_now);
876 log_once("full-hold", "a full queue submitted reads into physical pages before the title's "
877 "Submit (their page lists may not be filled yet)");
878 }
879 return false;
880 });
790 if (!closing_) { 881 if (!closing_) {
791 entries_.push_back(std::move(e)); 882 entries_.push_back(std::move(e));
792 if (auto_submit() && entries_.size() - submitted_ >= half()) submit_locked(); 883 if (holding_) {
884 // Behind a held read: it waits with it, whatever it is. No second self-submit until the hold ends.
885 if (into_pages(entries_.back())) ++leonida::dstorage::hold_stats().held_reads;
886 } else if (auto_submit() && entries_.size() - submitted_ >= half()) {
887 self_submit_locked();
888 }
793 return; 889 return;
794 } 890 }
795 } 891 }
@@ -801,10 +897,16 @@ private:
801 release_references(e); 897 release_references(e);
802 } 898 }
803 899
804 void submit_locked() { 900 // Submits the entries before "end". Without one it submits all of them and ends a hold: the title's Submit, a
901 // full queue, Close, a hold that ran out of time.
902 void submit_locked(size_t end = SIZE_MAX) {
903 if (end >= entries_.size()) {
904 end = entries_.size();
905 holding_ = false;
906 }
805 uint32_t requests = 0; 907 uint32_t requests = 0;
806 uint64_t source_bytes = 0, destination_bytes = 0; 908 uint64_t source_bytes = 0, destination_bytes = 0;
807 for (size_t i = submitted_; i < entries_.size(); ++i) { 909 for (size_t i = submitted_; i < end; ++i) {
808 Entry& e = entries_[i]; 910 Entry& e = entries_[i];
809 if (e.file) e.file_counted = e.file->add_pending(); 911 if (e.file) e.file_counted = e.file->add_pending();
810 if (e.counted) { 912 if (e.counted) {
@@ -820,12 +922,49 @@ private:
820 p.TotalRequestSourceByteCount += source_bytes; 922 p.TotalRequestSourceByteCount += source_bytes;
821 p.TotalRequestDestinationByteCount += destination_bytes; 923 p.TotalRequestDestinationByteCount += destination_bytes;
822 } 924 }
823 if (entries_.size() > submitted_) { 925 if (end > submitted_) {
824 submitted_ = entries_.size(); 926 submitted_ = end;
825 work_.notify_one(); 927 work_.notify_one();
826 } 928 }
827 } 929 }
828 930
931 // How long the worker sleeps before it looks at a hold again: until the time limit runs out, a quarter of a
932 // second at most (and exactly that without a limit, for the five-second line).
933 std::chrono::milliseconds hold_wait_locked() const {
934 long long ms = 250;
935 if (hold_release_ms_) {
936 const auto waited = std::chrono::duration_cast<std::chrono::milliseconds>(
937 std::chrono::steady_clock::now() - held_since_).count();
938 ms = std::clamp<long long>(static_cast<long long>(hold_release_ms_) - waited, 1, 250);
939 }
940 return std::chrono::milliseconds(ms);
941 }
942
943 // On the worker while entries are held: a hold with a time limit ends when it runs out (a timed release), and
944 // one without says once that it has lasted five seconds (a title that never calls Submit would show up as this
945 // line and nothing after it).
946 void hold_tick_locked() {
947 if (!holding_) return;
948 const auto waited = std::chrono::duration_cast<std::chrono::milliseconds>(
949 std::chrono::steady_clock::now() - held_since_).count();
950 const size_t held_now = entries_.size() - submitted_;
951 if (hold_release_ms_ && waited >= static_cast<long long>(hold_release_ms_)) {
952 submit_locked();
953 log_hold("timed", ++leonida::dstorage::hold_stats().timed_releases, desc_.Capacity, held_now);
954 log_once("timed-hold", "timed release: reads into physical pages held for the title's Submit were "
955 "submitted after LEONIDA_DSTORAGE_HOLD_MS without one (their page lists may "
956 "not be filled; the ds-hold line counts these)");
957 } else if (waited >= 5000 && !hold_warned_) {
958 hold_warned_ = true;
959 std::lock_guard lock(log_mutex());
960 std::fprintf(stderr, "[rt] dstorage: %zu entries behind a read into physical pages have waited %lld ms "
961 "for the title's Submit (queue %p, capacity %u; LEONIDA_DSTORAGE_HOLD_MS=<n> "
962 "submits them after n ms, LEONIDA_DSTORAGE_HOLD_PAGES=0 never holds)\n",
963 held_now, static_cast<long long>(waited), static_cast<void*>(this),
964 unsigned(desc_.Capacity));
965 }
966 }
967
829 struct Prepared { 968 struct Prepared {
830 Entry& entry; 969 Entry& entry;
831 HRESULT result = S_OK; 970 HRESULT result = S_OK;
@@ -859,7 +998,11 @@ private:
859 bool paired = false; 998 bool paired = false;
860 { 999 {
861 std::unique_lock lock(mutex_); 1000 std::unique_lock lock(mutex_);
862 work_.wait(lock, [&] { return submitted_ > 0 || closed_; }); 1001 while (!(submitted_ > 0 || closed_)) {
1002 if (!holding_) work_.wait(lock);
1003 else if (work_.wait_for(lock, hold_wait_locked()) == std::cv_status::timeout)
1004 hold_tick_locked();
1005 }
863 if (submitted_ == 0) return; 1006 if (submitted_ == 0) return;
864 head = std::move(entries_.front()); 1007 head = std::move(entries_.front());
865 entries_.pop_front(); 1008 entries_.pop_front();
@@ -1088,6 +1231,10 @@ private:
1088 std::vector<uint64_t> numbers(1 + (buffer.size() - 1 + offset) / 65536); 1231 std::vector<uint64_t> numbers(1 + (buffer.size() - 1 + offset) / 65536);
1089 if (!guarded_move(numbers.data(), pages, numbers.size() * sizeof(numbers[0]))) 1232 if (!guarded_move(numbers.data(), pages, numbers.size() * sizeof(numbers[0])))
1090 return E_DSTORAGE_ACCESS_VIOLATION; 1233 return E_DSTORAGE_ACCESS_VIOLATION;
1234 // Page 0 is never a title page: a destination list that names it was not filled when its request ran, and
1235 // the request fails below. Counted, since each one is data the title asked for and did not get.
1236 if (write && std::find(numbers.begin(), numbers.end(), uint64_t{0}) != numbers.end())
1237 log_hold("page0", ++leonida::dstorage::hold_stats().page0_entries, 0, 0);
1091 if (rt::xmem::transfer_physical(numbers, offset, buffer, write)) return S_OK; 1238 if (rt::xmem::transfer_physical(numbers, offset, buffer, write)) return S_OK;
1092 return HRESULT_FROM_WIN32(GetLastError()); 1239 return HRESULT_FROM_WIN32(GetLastError());
1093 } 1240 }
@@ -1305,6 +1452,11 @@ private:
1305 std::condition_variable work_, space_, idle_; 1452 std::condition_variable work_, space_, idle_;
1306 std::deque<Entry> entries_; 1453 std::deque<Entry> entries_;
1307 size_t submitted_ = 0; // the first submitted_ entries are submitted 1454 size_t submitted_ = 0; // the first submitted_ entries are submitted
1455 const bool hold_pages_; // LEONIDA_DSTORAGE_HOLD_PAGES
1456 const uint32_t hold_release_ms_; // LEONIDA_DSTORAGE_HOLD_MS (kDefaultHoldMs unless set); 0: no time limit
1457 bool holding_ = false; // under mutex_: a self-submit left entries for the title's Submit
1458 bool hold_warned_ = false; // under mutex_: this hold's five-second line was written
1459 std::chrono::steady_clock::time_point held_since_{}; // under mutex_
1308 size_t in_flight_ = 0; 1460 size_t in_flight_ = 0;
1309 bool closing_ = false; 1461 bool closing_ = false;
1310 bool closed_ = false; 1462 bool closed_ = false;
diff --git a/runtime/shims/gameinput.cpp b/runtime/shims/gameinput.cpp
index fa5889d6a..c989daff4 100644
--- a/runtime/shims/gameinput.cpp
+++ b/runtime/shims/gameinput.cpp
@@ -1887,7 +1887,9 @@ void update_keyboard_pad() {
1887 clip_cursor(active && g_raw_ready && g_cursor_pos.load() == system_cursor_pos && foreground_is_ours()); 1887 clip_cursor(active && g_raw_ready && g_cursor_pos.load() == system_cursor_pos && foreground_is_ours());
1888 for (const auto& b : kKeyBindings) SDL_SetJoystickVirtualButton(g_keyboard.js, b.sdl_button, down[b.sdl_button]); 1888 for (const auto& b : kKeyBindings) SDL_SetJoystickVirtualButton(g_keyboard.js, b.sdl_button, down[b.sdl_button]);
1889 // LEONIDA_INPUT_SCRIPT="a@70,a@85,start@120" (with LEONIDA_KEYBOARD_PAD=always): timed presses on the keyboard 1889 // LEONIDA_INPUT_SCRIPT="a@70,a@85,start@120" (with LEONIDA_KEYBOARD_PAD=always): timed presses on the keyboard
1890 // pad, in seconds since the pad's first update, each held 300 ms. For unattended boots: the title's first prompt 1890 // pad, in seconds since the pad's first update, each held 300 ms or its own button@seconds:hold, and then until the
1891 // title has read the pads kReads times since it began (never past kMaxHold seconds, or the hold if it is longer, so
1892 // a title that stops reading does not keep the button). For unattended boots: the title's first prompt
1891 // waits for a button with no timeout (docs/re/notes/firstframe.md, step 5). The parser, the timeline and the 1893 // waits for a button with no timeout (docs/re/notes/firstframe.md, step 5). The parser, the timeline and the
1892 // button names are gameinput_script.h's, shared with the scripted pad of a build without SDL3. 1894 // button names are gameinput_script.h's, shared with the scripted pad of a build without SDL3.
1893 namespace script = rt::gameinput::script; 1895 namespace script = rt::gameinput::script;
@@ -1899,7 +1901,21 @@ void update_keyboard_pad() {
1899 s.presses.size(), s.rejected); 1901 s.presses.size(), s.rejected);
1900 return s; 1902 return s;
1901 }(); 1903 }();
1902 if (!scripted.empty()) { 1904 // LEONIDA_INPUT_FILE=<path> (local, for headless runs whose display takes no keyboard input): every line appended
1905 // to the file names one button of gameinput_script.h's table ("a", "down", ...) and becomes a press at once, held
1906 // like a scripted one (300 ms and six readings, at most 5 s). The file is read again at most every 250 ms.
1907 struct FilePress {
1908 uint32_t bit;
1909 double at;
1910 uint64_t began;
1911 bool started;
1912 };
1913 static std::vector<FilePress> file_presses;
1914 static const std::string input_file = [] {
1915 const char* v = std::getenv("LEONIDA_INPUT_FILE");
1916 return std::string(v ? v : "");
1917 }();
1918 if (!scripted.empty() || !input_file.empty()) {
1903 static const ULONGLONG origin = GetTickCount64(); 1919 static const ULONGLONG origin = GetTickCount64();
1904 const double now = (GetTickCount64() - origin) / 1000.0; 1920 const double now = (GetTickCount64() - origin) / 1000.0;
1905 script::Held held{}; 1921 script::Held held{};
@@ -1908,15 +1924,51 @@ void update_keyboard_pad() {
1908 static std::vector<uint64_t> began(scripted.presses.size(), 0); 1924 static std::vector<uint64_t> began(scripted.presses.size(), 0);
1909 static std::vector<char> started(scripted.presses.size(), 0); 1925 static std::vector<char> started(scripted.presses.size(), 0);
1910 const uint64_t calls = g_reading_calls.load(std::memory_order_relaxed); 1926 const uint64_t calls = g_reading_calls.load(std::memory_order_relaxed);
1927 if (!input_file.empty()) {
1928 static ULONGLONG last_read = 0;
1929 static std::size_t lines_done = 0;
1930 const ULONGLONG tick = GetTickCount64();
1931 if (tick - last_read >= 250) {
1932 last_read = tick;
1933 if (FILE* f = std::fopen(input_file.c_str(), "r")) {
1934 char line[64];
1935 std::size_t n = 0;
1936 while (std::fgets(line, sizeof(line), f)) {
1937 if (++n <= lines_done) continue;
1938 lines_done = n;
1939 std::string name(line);
1940 while (!name.empty() && (name.back() == '\n' || name.back() == '\r' || name.back() == ' '))
1941 name.pop_back();
1942 bool known = false;
1943 for (const script::Button& b : script::kButtons)
1944 if (name == b.name) {
1945 file_presses.push_back({b.bit, now, 0, false});
1946 known = true;
1947 }
1948 std::fprintf(stderr, "[rt] gameinput: input file line %zu \"%s\" at %.1f s%s\n", n,
1949 name.c_str(), now, known ? "" : " (unknown button, ignored)");
1950 }
1951 std::fclose(f);
1952 }
1953 }
1954 for (auto& p : file_presses) {
1955 if (now < p.at || now >= p.at + kMaxHold) continue;
1956 if (!p.started) {
1957 p.started = true;
1958 p.began = calls;
1959 }
1960 if (now < p.at + 0.3 || calls - p.began < kReads) held.buttons |= p.bit;
1961 }
1962 }
1911 for (std::size_t i = 0; i < scripted.presses.size(); ++i) { 1963 for (std::size_t i = 0; i < scripted.presses.size(); ++i) {
1912 const auto& press = scripted.presses[i]; 1964 const auto& press = scripted.presses[i];
1913 bool active = false; 1965 bool active = false;
1914 if (now >= press.at && now < press.at + kMaxHold) { 1966 if (now >= press.at && now < press.at + std::max(press.hold, kMaxHold)) {
1915 if (!started[i]) { 1967 if (!started[i]) {
1916 started[i] = 1; 1968 started[i] = 1;
1917 began[i] = calls; 1969 began[i] = calls;
1918 } 1970 }
1919 active = now < press.at + 0.3 || calls - began[i] < kReads; 1971 active = now < press.at + press.hold || calls - began[i] < kReads;
1920 } 1972 }
1921 if (!active) continue; 1973 if (!active) continue;
1922 if (press.stick) held.stick = press.stick; 1974 if (press.stick) held.stick = press.stick;
@@ -1924,7 +1976,7 @@ void update_keyboard_pad() {
1924 } 1976 }
1925 if (held.stick) right_y = held.stick > 0 ? -kStickFull : kStickFull; // SDL's +Y is down 1977 if (held.stick) right_y = held.stick > 0 ? -kStickFull : kStickFull; // SDL's +Y is down
1926 for (const script::Button& b : script::kButtons) { 1978 for (const script::Button& b : script::kButtons) {
1927 if (!(scripted.named & b.bit)) continue; 1979 if (!(scripted.named & b.bit) && input_file.empty()) continue;
1928 const auto button = static_cast<SDL_GamepadButton>(b.sdl); 1980 const auto button = static_cast<SDL_GamepadButton>(b.sdl);
1929 SDL_SetJoystickVirtualButton(g_keyboard.js, button, (held.buttons & b.bit) || down[button]); 1981 SDL_SetJoystickVirtualButton(g_keyboard.js, button, (held.buttons & b.bit) || down[button]);
1930 } 1982 }
@@ -2443,13 +2495,13 @@ public:
2443 struct Stats { 2495 struct Stats {
2444 std::mutex mu; 2496 std::mutex mu;
2445 uint64_t calls[3][3] = {}; // method x (null, aggregate, a device) 2497 uint64_t calls[3][3] = {}; // method x (null, aggregate, a device)
2446 uint64_t found[3] = {}, pressed[3] = {}; 2498 uint64_t found[3] = {}, pressed[3] = {}, a_pressed[3] = {};
2447 std::map<std::string, std::pair<uint64_t, uint64_t>> by_device; // name -> (readings, with buttons) 2499 std::map<std::string, std::pair<uint64_t, uint64_t>> by_device; // name -> (readings, with buttons)
2448 uint64_t since = 0; 2500 uint64_t since = 0;
2449 }; 2501 };
2450 static Stats st; 2502 static Stats st;
2451 std::string name; 2503 std::string name;
2452 bool buttons = false; 2504 bool buttons = false, a_button = false;
2453 if (SUCCEEDED(hr) && got) { 2505 if (SUCCEEDED(hr) && got) {
2454 IGameInputDevice* d = nullptr; 2506 IGameInputDevice* d = nullptr;
2455 got->GetDevice(&d); 2507 got->GetDevice(&d);
@@ -2458,7 +2510,10 @@ public:
2458 d->Release(); 2510 d->Release();
2459 } 2511 }
2460 GameInputGamepadState g{}; 2512 GameInputGamepadState g{};
2461 if (got->GetGamepadState(&g)) buttons = g.buttons != 0; 2513 if (got->GetGamepadState(&g)) {
2514 buttons = g.buttons != 0;
2515 a_button = (g.buttons & GameInputGamepadA) != 0;
2516 }
2462 } 2517 }
2463 const int arg = !asked ? 0 : as_device(asked)->info.deviceFamily == GameInputFamilyAggregate ? 1 : 2; 2518 const int arg = !asked ? 0 : as_device(asked)->info.deviceFamily == GameInputFamilyAggregate ? 1 : 2;
2464 std::lock_guard lock(st.mu); 2519 std::lock_guard lock(st.mu);
@@ -2466,6 +2521,7 @@ public:
2466 if (SUCCEEDED(hr) && got) { 2521 if (SUCCEEDED(hr) && got) {
2467 ++st.found[method]; 2522 ++st.found[method];
2468 st.pressed[method] += buttons; 2523 st.pressed[method] += buttons;
2524 st.a_pressed[method] += a_button;
2469 auto& e = st.by_device[name]; 2525 auto& e = st.by_device[name];
2470 ++e.first; 2526 ++e.first;
2471 e.second += buttons; 2527 e.second += buttons;
@@ -2477,10 +2533,10 @@ public:
2477 std::string line; 2533 std::string line;
2478 for (int m = 0; m < 3; ++m) { 2534 for (int m = 0; m < 3; ++m) {
2479 char t[200]; 2535 char t[200];
2480 std::snprintf(t, sizeof(t), " %s %llu/%llu/%llu found %llu pressed %llu;", methods[m], 2536 std::snprintf(t, sizeof(t), " %s %llu/%llu/%llu found %llu pressed %llu A %llu;", methods[m],
2481 (unsigned long long)st.calls[m][0], (unsigned long long)st.calls[m][1], 2537 (unsigned long long)st.calls[m][0], (unsigned long long)st.calls[m][1],
2482 (unsigned long long)st.calls[m][2], (unsigned long long)st.found[m], 2538 (unsigned long long)st.calls[m][2], (unsigned long long)st.found[m],
2483 (unsigned long long)st.pressed[m]); 2539 (unsigned long long)st.pressed[m], (unsigned long long)st.a_pressed[m]);
2484 line += t; 2540 line += t;
2485 } 2541 }
2486 for (const auto& [n, c] : st.by_device) { 2542 for (const auto& [n, c] : st.by_device) {
@@ -2493,6 +2549,7 @@ public:
2493 std::memset(st.calls, 0, sizeof(st.calls)); 2549 std::memset(st.calls, 0, sizeof(st.calls));
2494 std::memset(st.found, 0, sizeof(st.found)); 2550 std::memset(st.found, 0, sizeof(st.found));
2495 std::memset(st.pressed, 0, sizeof(st.pressed)); 2551 std::memset(st.pressed, 0, sizeof(st.pressed));
2552 std::memset(st.a_pressed, 0, sizeof(st.a_pressed));
2496 st.by_device.clear(); 2553 st.by_device.clear();
2497 st.since = now; 2554 st.since = now;
2498 } 2555 }
diff --git a/runtime/shims/gameinput_no_sdl.cpp b/runtime/shims/gameinput_no_sdl.cpp
index 77b7ebccf..7d8c7b6ee 100644
--- a/runtime/shims/gameinput_no_sdl.cpp
+++ b/runtime/shims/gameinput_no_sdl.cpp
@@ -16,8 +16,10 @@
16// title waits at its first "press A" prompt forever. The pad is an Xbox One gamepad that is connected from the 16// title waits at its first "press A" prompt forever. The pad is an Xbox One gamepad that is connected from the
17// first GameInputCreate on: device enumeration through RegisterDeviceCallback (blocking, async, and through a 17// first GameInputCreate on: device enumeration through RegisterDeviceCallback (blocking, async, and through a
18// dispatcher), GetCurrentReading, GetNextReading and GetPreviousReading, and readings whose GetGamepadState and 18// dispatcher), GetCurrentReading, GetNextReading and GetPreviousReading, and readings whose GetGamepadState and
19// GetUiNavigationState follow the script. A reading is taken when the title asks for one, so no thread runs; 19// GetUiNavigationState follow the script. Readings are taken when the title asks for one, so no thread runs,
20// reading callbacks, aggregate devices, rumble and every other device still need SDL3. Controllers and the 20// but each one first adds a reading for every change the script made since the last, stamped with the script's
21// own time: a press that starts and ends between two reads still reaches the history for GetNextReading.
22// Reading callbacks, aggregate devices, rumble and every other device still need SDL3. Controllers and the
21// keyboard pad need SDL3 too. 23// keyboard pad need SDL3 too.
22#include <windows.h> 24#include <windows.h>
23 25
@@ -101,6 +103,8 @@ constexpr uint32_t kAxisCount = 6; // LX, LY, RX, RY, LT, RT, as the SDL3 sh
101constexpr uint32_t kButtonCount = 15; // SDL's standard gamepad buttons, numbered as the script's Button::sdl 103constexpr uint32_t kButtonCount = 15; // SDL's standard gamepad buttons, numbered as the script's Button::sdl
102constexpr size_t kHistoryCap = 64; // readings kept for GetNextReading/GetPreviousReading; one per change 104constexpr size_t kHistoryCap = 64; // readings kept for GetNextReading/GetPreviousReading; one per change
103constexpr char kPadName[] = "Scripted pad (Leonida)"; 105constexpr char kPadName[] = "Scripted pad (Leonida)";
106std::atomic<bool> g_trace_readings{false};
107std::atomic<uint64_t> g_gamepad_state_queries{0};
104 108
105uint64_t qpc_now_us() { 109uint64_t qpc_now_us() {
106 static const LARGE_INTEGER freq = [] { LARGE_INTEGER f; QueryPerformanceFrequency(&f); return f; }(); 110 static const LARGE_INTEGER freq = [] { LARGE_INTEGER f; QueryPerformanceFrequency(&f); return f; }();
@@ -151,7 +155,14 @@ public:
151 return r; 155 return r;
152 } 156 }
153 157
154 uint32_t STDMETHODCALLTYPE GetInputKind() override { return kKinds; } 158 uint32_t STDMETHODCALLTYPE GetInputKind() override {
159 static std::atomic<uint64_t> queries{0};
160 const uint64_t query = queries.fetch_add(1, std::memory_order_relaxed) + 1;
161 if (g_trace_readings.load(std::memory_order_relaxed) && query <= 8)
162 std::fprintf(stderr, "[rt] gameinput: GetInputKind #%llu seq=%llu kinds=0x%08x\n",
163 static_cast<unsigned long long>(query), static_cast<unsigned long long>(seq_), kKinds);
164 return kKinds;
165 }
155 uint64_t STDMETHODCALLTYPE GetSequenceNumber(uint32_t) override { return seq_; } 166 uint64_t STDMETHODCALLTYPE GetSequenceNumber(uint32_t) override { return seq_; }
156 uint64_t STDMETHODCALLTYPE GetTimestamp() override { return ts_; } 167 uint64_t STDMETHODCALLTYPE GetTimestamp() override { return ts_; }
157 void STDMETHODCALLTYPE GetDevice(IGameInputDevice** device) override; 168 void STDMETHODCALLTYPE GetDevice(IGameInputDevice** device) override;
@@ -168,6 +179,11 @@ public:
168 state_.leftTrigger, state_.rightTrigger}; 179 state_.leftTrigger, state_.rightTrigger};
169 const uint32_t n = std::min(count, kAxisCount); 180 const uint32_t n = std::min(count, kAxisCount);
170 std::memcpy(out, axes, n * sizeof(float)); 181 std::memcpy(out, axes, n * sizeof(float));
182 static std::atomic<uint64_t> queries{0};
183 const uint64_t query = queries.fetch_add(1, std::memory_order_relaxed) + 1;
184 if (g_trace_readings.load(std::memory_order_relaxed) && query <= 8)
185 std::fprintf(stderr, "[rt] gameinput: GetControllerAxisState #%llu seq=%llu count=%u returned=%u\n",
186 static_cast<unsigned long long>(query), static_cast<unsigned long long>(seq_), count, n);
171 return n; 187 return n;
172 } 188 }
173 uint32_t STDMETHODCALLTYPE GetControllerButtonCount() override { return kButtonCount; } 189 uint32_t STDMETHODCALLTYPE GetControllerButtonCount() override { return kButtonCount; }
@@ -177,6 +193,12 @@ public:
177 for (const script::Button& b : script::kButtons) buttons[b.sdl] = (state_.buttons & b.bit) != 0; 193 for (const script::Button& b : script::kButtons) buttons[b.sdl] = (state_.buttons & b.bit) != 0;
178 const uint32_t n = std::min(count, kButtonCount); 194 const uint32_t n = std::min(count, kButtonCount);
179 std::memcpy(out, buttons, n * sizeof(bool)); 195 std::memcpy(out, buttons, n * sizeof(bool));
196 static std::atomic<uint64_t> queries{0};
197 const uint64_t query = queries.fetch_add(1, std::memory_order_relaxed) + 1;
198 if (g_trace_readings.load(std::memory_order_relaxed) && query <= 8)
199 std::fprintf(stderr, "[rt] gameinput: GetControllerButtonState #%llu seq=%llu count=%u returned=%u buttons=0x%08x\n",
200 static_cast<unsigned long long>(query), static_cast<unsigned long long>(seq_), count, n,
201 state_.buttons);
180 return n; 202 return n;
181 } 203 }
182 uint32_t STDMETHODCALLTYPE GetControllerSwitchCount() override { return 0; } 204 uint32_t STDMETHODCALLTYPE GetControllerSwitchCount() override { return 0; }
@@ -192,12 +214,21 @@ public:
192 bool STDMETHODCALLTYPE GetGamepadState(GameInputGamepadState* state) override { 214 bool STDMETHODCALLTYPE GetGamepadState(GameInputGamepadState* state) override {
193 if (!state) return false; 215 if (!state) return false;
194 *state = state_; 216 *state = state_;
217 const uint64_t query = g_gamepad_state_queries.fetch_add(1, std::memory_order_relaxed) + 1;
218 if (g_trace_readings.load(std::memory_order_relaxed) && (query == 1 || state_.buttons || query % 1000 == 0))
219 std::fprintf(stderr, "[rt] gameinput: GetGamepadState #%llu seq=%llu buttons=0x%08x\n",
220 static_cast<unsigned long long>(query), static_cast<unsigned long long>(seq_), state_.buttons);
195 return true; 221 return true;
196 } 222 }
197 bool STDMETHODCALLTYPE GetRacingWheelState(void*) override { return false; } 223 bool STDMETHODCALLTYPE GetRacingWheelState(void*) override { return false; }
198 bool STDMETHODCALLTYPE GetUiNavigationState(GameInputUiNavigationState* state) override { 224 bool STDMETHODCALLTYPE GetUiNavigationState(GameInputUiNavigationState* state) override {
199 if (!state) return false; 225 if (!state) return false;
200 state->buttons = script::ui_navigation(state_); 226 state->buttons = script::ui_navigation(state_);
227 static std::atomic<uint64_t> queries{0};
228 const uint64_t query = queries.fetch_add(1, std::memory_order_relaxed) + 1;
229 if (g_trace_readings.load(std::memory_order_relaxed) && query <= 8)
230 std::fprintf(stderr, "[rt] gameinput: GetUiNavigationState #%llu seq=%llu buttons=0x%08x\n",
231 static_cast<unsigned long long>(query), static_cast<unsigned long long>(seq_), state->buttons);
201 return true; 232 return true;
202 } 233 }
203 234
@@ -278,7 +309,13 @@ public:
278 ULONG STDMETHODCALLTYPE AddRef() override { return ++refs_; } 309 ULONG STDMETHODCALLTYPE AddRef() override { return ++refs_; }
279 ULONG STDMETHODCALLTYPE Release() override { return release_floor(refs_); } 310 ULONG STDMETHODCALLTYPE Release() override { return release_floor(refs_); }
280 311
281 const GameInputDeviceInfo* STDMETHODCALLTYPE GetDeviceInfo() override { return &info_; } 312 const GameInputDeviceInfo* STDMETHODCALLTYPE GetDeviceInfo() override {
313 static std::atomic<bool> logged{false};
314 if (g_trace_readings.load(std::memory_order_relaxed) && !logged.exchange(true, std::memory_order_relaxed))
315 std::fprintf(stderr, "[rt] gameinput: GetDeviceInfo family=%d input=0x%08x status=0x%08x\n",
316 info_.deviceFamily, info_.supportedInput, kConnectedStatus);
317 return &info_;
318 }
282 uint32_t STDMETHODCALLTYPE GetDeviceStatus() override { return kConnectedStatus; } 319 uint32_t STDMETHODCALLTYPE GetDeviceStatus() override { return kConnectedStatus; }
283 void STDMETHODCALLTYPE GetBatteryState(GameInputBatteryState* state) override { 320 void STDMETHODCALLTYPE GetBatteryState(GameInputBatteryState* state) override {
284 if (state) *state = {0, 0, 0, 0, GameInputBatteryUnknown}; 321 if (state) *state = {0, 0, 0, 0, GameInputBatteryUnknown};
@@ -355,8 +392,11 @@ struct State {
355 std::atomic<DWORD> delivering_thread{0}; 392 std::atomic<DWORD> delivering_thread{0};
356 script::Script script; 393 script::Script script;
357 uint64_t origin_us = 0; // the script's clock starts at the first GameInputCreate 394 uint64_t origin_us = 0; // the script's clock starts at the first GameInputCreate
395 double updated_s = -1; // the script time of the last update; its changes up to here are in the history
358 bool log_presses = true; // LEONIDA_INPUT_LOG 396 bool log_presses = true; // LEONIDA_INPUT_LOG
397 bool trace_reads = false; // LEONIDA_INPUT_TRACE
359 uint32_t logged_held = 0; // what log_scripted saw last 398 uint32_t logged_held = 0; // what log_scripted saw last
399 uint64_t reading_queries = 0;
360 std::deque<Reading*> history; // one reference each, oldest first; the newest is the current reading 400 std::deque<Reading*> history; // one reference each, oldest first; the newest is the current reading
361 uint64_t evicted_seq = 0; // sequence number of the newest reading dropped from history 401 uint64_t evicted_seq = 0; // sequence number of the newest reading dropped from history
362 uint64_t seq = 0; 402 uint64_t seq = 0;
@@ -372,10 +412,9 @@ State& g() {
372 return *s; 412 return *s;
373} 413}
374 414
375// Takes a reading when the script's state at `now` differs from the current one. Under g().mu. 415// Takes a reading when the script's state `seconds` into it differs from the current one. Under g().mu.
376void update(uint64_t now) { 416void take_reading(double seconds, uint64_t timestamp) {
377 State& s = g(); 417 State& s = g();
378 const double seconds = now > s.origin_us ? (now - s.origin_us) / 1e6 : 0.0;
379 const script::Held held = script::held_at(s.script, seconds); 418 const script::Held held = script::held_at(s.script, seconds);
380 GameInputGamepadState state{}; 419 GameInputGamepadState state{};
381 state.buttons = held.buttons; 420 state.buttons = held.buttons;
@@ -387,7 +426,7 @@ void update(uint64_t now) {
387 if (s.log_presses && last) 426 if (s.log_presses && last)
388 script::log_presses(state.buttons & ~last->state().buttons, last->state().rightThumbstickY, 427 script::log_presses(state.buttons & ~last->state().buttons, last->state().rightThumbstickY,
389 state.rightThumbstickY, seconds, kPadName); 428 state.rightThumbstickY, seconds, kPadName);
390 s.history.push_back(new Reading(state, ++s.seq, now)); 429 s.history.push_back(new Reading(state, ++s.seq, timestamp));
391 while (s.history.size() > kHistoryCap) { 430 while (s.history.size() > kHistoryCap) {
392 s.evicted_seq = s.history.front()->seq(); 431 s.evicted_seq = s.history.front()->seq();
393 s.history.front()->Release(); 432 s.history.front()->Release();
@@ -395,7 +434,39 @@ void update(uint64_t now) {
395 } 434 }
396} 435}
397 436
437// Brings the history up to `now`: one reading for every start and end of a press the script made since the last
438// update, at the time the script made it, then the state at `now`. The title may read its pad only every few seconds
439// (at world-start frame rates it does); a press that began and ended in between is still in the history, where
440// GetNextReading finds it, and the readings are the same however often the title reads. Under g().mu.
441void update(uint64_t now) {
442 State& s = g();
443 const double seconds = now > s.origin_us ? (now - s.origin_us) / 1e6 : 0.0;
444 if (seconds > s.updated_s) {
445 std::vector<double> edges;
446 for (const script::Press& p : s.script.presses)
447 for (const double edge : {p.at, p.at + p.hold})
448 if (edge > s.updated_s && edge < seconds) edges.push_back(edge);
449 std::sort(edges.begin(), edges.end());
450 edges.erase(std::unique(edges.begin(), edges.end()), edges.end());
451 for (const double edge : edges) take_reading(edge, s.origin_us + static_cast<uint64_t>(edge * 1e6 + 0.5));
452 s.updated_s = seconds;
453 }
454 take_reading(seconds, now);
455}
456
457void trace_reading(State& s, const char* api, uint32_t kind, const Reading* reading) {
458 const uint64_t query = ++s.reading_queries;
459 const uint32_t buttons = reading ? reading->state().buttons : 0;
460 if (s.trace_reads && (query <= 128 || buttons || query % 1000 == 0))
461 std::fprintf(stderr, "[rt] gameinput: %s #%llu kind=0x%08x seq=%llu buttons=0x%08x\n", api,
462 static_cast<unsigned long long>(query), kind,
463 static_cast<unsigned long long>(reading ? reading->seq() : 0), buttons);
464}
465
398void call_device(const Callback& c, uint64_t timestamp) { 466void call_device(const Callback& c, uint64_t timestamp) {
467 if (g().trace_reads)
468 std::fprintf(stderr, "[rt] gameinput: device callback token=%llu timestamp=%llu status=0x%08x\n",
469 static_cast<unsigned long long>(c.token), static_cast<unsigned long long>(timestamp), kConnectedStatus);
399 reinterpret_cast<GameInputDeviceCallback>(c.fn)(c.token, c.context, &pad(), timestamp, kConnectedStatus, 470 reinterpret_cast<GameInputDeviceCallback>(c.fn)(c.token, c.context, &pad(), timestamp, kConnectedStatus,
400 GameInputDeviceNoStatus); 471 GameInputDeviceNoStatus);
401} 472}
@@ -504,6 +575,8 @@ HRESULT find_reading(IGameInputReading* ref, uint32_t kind, IGameInputReading**
504 std::lock_guard lock(s.mu); 575 std::lock_guard lock(s.mu);
505 update(now_us()); 576 update(now_us());
506 const uint64_t r = static_cast<Reading*>(ref)->seq(); 577 const uint64_t r = static_cast<Reading*>(ref)->seq();
578 trace_reading(s, forward ? "GetNextReading" : "GetPreviousReading", kind,
579 s.history.empty() ? nullptr : s.history.back());
507 if (forward ? s.evicted_seq > r : s.evicted_seq >= r) return GAMEINPUT_E_REFERENCE_READING_TOO_OLD; 580 if (forward ? s.evicted_seq > r : s.evicted_seq >= r) return GAMEINPUT_E_REFERENCE_READING_TOO_OLD;
508 Reading* best = nullptr; 581 Reading* best = nullptr;
509 for (Reading* c : s.history) { 582 for (Reading* c : s.history) {
@@ -547,6 +620,7 @@ public:
547 std::lock_guard lock(s.mu); 620 std::lock_guard lock(s.mu);
548 update(now_us()); 621 update(now_us());
549 Reading* r = s.history.back(); 622 Reading* r = s.history.back();
623 trace_reading(s, "GetCurrentReading", kind, r);
550 r->AddRef(); 624 r->AddRef();
551 *out = r; 625 *out = r;
552 return S_OK; 626 return S_OK;
@@ -595,6 +669,10 @@ public:
595 later = true; 669 later = true;
596 } 670 }
597 } 671 }
672 if (s.trace_reads)
673 std::fprintf(stderr,
674 "[rt] gameinput: RegisterDeviceCallback kind=0x%08x filter=0x%08x enumeration=%d report=%d\n",
675 kind, status_filter, static_cast<int>(enumeration), report ? 1 : 0);
598 if (token) *token = c.token; 676 if (token) *token = c.token;
599 // Blocking enumeration: the pad is reported before this returns, on the caller's thread. 677 // Blocking enumeration: the pad is reported before this returns, on the caller's thread.
600 if (report && enumeration == GameInputBlockingEnumeration) call_device(c, now_us()); 678 if (report && enumeration == GameInputBlockingEnumeration) call_device(c, now_us());
@@ -683,6 +761,8 @@ ScriptedInput* scripted() {
683 std::lock_guard lock(s.mu); 761 std::lock_guard lock(s.mu);
684 s.script = script::parse(text); 762 s.script = script::parse(text);
685 s.log_presses = script::env_lower("LEONIDA_INPUT_LOG") != "0"; 763 s.log_presses = script::env_lower("LEONIDA_INPUT_LOG") != "0";
764 s.trace_reads = script::env_lower("LEONIDA_INPUT_TRACE") == "1";
765 g_trace_readings = s.trace_reads;
686 s.wait_event = CreateEventW(nullptr, FALSE, FALSE, nullptr); 766 s.wait_event = CreateEventW(nullptr, FALSE, FALSE, nullptr);
687 s.origin_us = now_us(); 767 s.origin_us = now_us();
688 update(s.origin_us); // the first reading: nothing held unless the script presses at 0 s 768 update(s.origin_us); // the first reading: nothing held unless the script presses at 0 s
diff --git a/runtime/shims/gameinput_script.h b/runtime/shims/gameinput_script.h
index 759506750..5be554424 100644
--- a/runtime/shims/gameinput_script.h
+++ b/runtime/shims/gameinput_script.h
@@ -5,10 +5,13 @@
5// 5//
6// LEONIDA_INPUT_SCRIPT="a@70,a@85,start@120" 6// LEONIDA_INPUT_SCRIPT="a@70,a@85,start@120"
7// 7//
8// Each entry is button@seconds, the seconds counted from the shim's first update. A press is held for kHoldSeconds, 8// Each entry is button@seconds[:hold], the seconds counted from the shim's first update. A press is held for `hold`
9// then released. Buttons: a b x y start back lb rb up down left right; rsup and rsdown throw the right stick fully up 9// seconds (kHoldSeconds when the entry has none), then released: a longer hold reaches a title that reads its pad
10// or down for the same time (they replay the stick throws the press log writes). Spaces around an entry are allowed; 10// only every few seconds, as the retail title does at world-start frame rates. Buttons: a b x y start back lb rb
11// empty entries, unknown buttons and invalid times (negative, non-finite, trailing text) are counted as rejected. 11// up down left right; rsup and rsdown throw the right stick fully up or down for the same time (they replay the
12// stick throws the press log writes). Spaces around an entry are allowed; empty entries, unknown buttons, invalid
13// times (negative, non-finite, trailing text) and invalid holds (zero, negative, non-finite, more than
14// kMaxHoldSeconds) are counted as rejected.
12#pragma once 15#pragma once
13#include <algorithm> 16#include <algorithm>
14#include <cctype> 17#include <cctype>
@@ -24,6 +27,7 @@
24namespace rt::gameinput::script { 27namespace rt::gameinput::script {
25 28
26constexpr double kHoldSeconds = 0.3; 29constexpr double kHoldSeconds = 0.3;
30constexpr double kMaxHoldSeconds = 600; // a typo such as b@10:1100 should not hold B for the whole run
27 31
28// One scriptable button: its name in the script and the press log, its GameInput gamepad bit, and its SDL3 32// One scriptable button: its name in the script and the press log, its GameInput gamepad bit, and its SDL3
29// SDL_GamepadButton number, which the "scripted press of button <n>" line has always carried (tools/stage_timeline.py 33// SDL_GamepadButton number, which the "scripted press of button <n>" line has always carried (tools/stage_timeline.py
@@ -46,6 +50,7 @@ struct Press {
46 uint32_t button = 0; // a GameInput gamepad bit, or 0 for a stick throw 50 uint32_t button = 0; // a GameInput gamepad bit, or 0 for a stick throw
47 int stick = 0; // +1 rsup, -1 rsdown (GameInput's +Y is up) 51 int stick = 0; // +1 rsup, -1 rsdown (GameInput's +Y is up)
48 double at = 0; // seconds 52 double at = 0; // seconds
53 double hold = kHoldSeconds;
49}; 54};
50 55
51struct Script { 56struct Script {
@@ -72,17 +77,22 @@ inline Script parse(std::string text) {
72 const char* time = item.c_str() + sep + 1; 77 const char* time = item.c_str() + sep + 1;
73 char* tail; 78 char* tail;
74 const double seconds = std::strtod(time, &tail); 79 const double seconds = std::strtod(time, &tail);
75 if (tail == time || !std::isfinite(seconds) || seconds < 0 || 80 if (tail == time || !std::isfinite(seconds) || seconds < 0) continue;
76 item.find_first_not_of(whitespace, static_cast<size_t>(tail - item.c_str())) != std::string::npos) 81 double hold = kHoldSeconds;
77 continue; 82 if (*tail == ':') {
83 const char* hold_text = tail + 1;
84 hold = std::strtod(hold_text, &tail);
85 if (tail == hold_text || !std::isfinite(hold) || hold <= 0 || hold > kMaxHoldSeconds) continue;
86 }
87 if (item.find_first_not_of(whitespace, static_cast<size_t>(tail - item.c_str())) != std::string::npos) continue;
78 const auto is = [&](const char* name) { return item.compare(first, sep - first, name) == 0; }; 88 const auto is = [&](const char* name) { return item.compare(first, sep - first, name) == 0; };
79 if (is("rsup") || is("rsdown")) { 89 if (is("rsup") || is("rsdown")) {
80 out.presses.push_back({0, is("rsup") ? 1 : -1, seconds}); 90 out.presses.push_back({0, is("rsup") ? 1 : -1, seconds, hold});
81 continue; 91 continue;
82 } 92 }
83 for (const Button& b : kButtons) { 93 for (const Button& b : kButtons) {
84 if (is(b.name)) { 94 if (is(b.name)) {
85 out.presses.push_back({b.bit, 0, seconds}); 95 out.presses.push_back({b.bit, 0, seconds, hold});
86 out.named |= b.bit; 96 out.named |= b.bit;
87 break; 97 break;
88 } 98 }
@@ -102,7 +112,7 @@ struct Held {
102inline Held held_at(const Script& script, double seconds) { 112inline Held held_at(const Script& script, double seconds) {
103 Held h; 113 Held h;
104 for (const Press& p : script.presses) { 114 for (const Press& p : script.presses) {
105 if (seconds < p.at || seconds >= p.at + kHoldSeconds) continue; 115 if (seconds < p.at || seconds >= p.at + p.hold) continue;
106 if (p.stick) h.stick = p.stick; 116 if (p.stick) h.stick = p.stick;
107 else h.buttons |= p.button; 117 else h.buttons |= p.button;
108 } 118 }
diff --git a/runtime/shims/process.cpp b/runtime/shims/process.cpp
index 08023ea78..2c37292e2 100644
--- a/runtime/shims/process.cpp
+++ b/runtime/shims/process.cpp
@@ -11,8 +11,9 @@
11// shares with gta6rt. exit() runs it newest first, as the CRT does, before the run ends; _exit(), _Exit(), 11// shares with gta6rt. exit() runs it newest first, as the CRT does, before the run ends; _exit(), _Exit(),
12// quick_exit(), ExitProcess() and abort() do not. _cexit() runs it and returns, _c_exit() returns. A second 12// quick_exit(), ExitProcess() and abort() do not. _cexit() runs it and returns, _c_exit() returns. A second
13// thread that calls exit(), _exit(), _Exit() or quick_exit() while the first is leaving waits, as with the 13// thread that calls exit(), _exit(), _Exit() or quick_exit() while the first is leaving waits, as with the
14// CRT's exit lock. Not covered yet: at_quick_exit() handlers (quick_exit() runs none) and the thread-local 14// CRT's exit lock. Not covered yet: at_quick_exit() handlers (quick_exit() runs none).
15// destructor callback (_register_thread_local_exe_atexit_callback); both still reach the host CRT. 15// - the EXE's thread-local destructor callback (_register_thread_local_exe_atexit_callback) is kept here too:
16// exit() and _cexit() call it before the atexit handlers, as the UCRT does (see game_exit below).
16// Covered CRTs: the Universal CRT (api-ms-win-crt-runtime-l1-1-0.dll / ucrtbase.dll, what MSVC links; ucrtbased.dll in Debug) and 17// Covered CRTs: the Universal CRT (api-ms-win-crt-runtime-l1-1-0.dll / ucrtbase.dll, what MSVC links; ucrtbased.dll in Debug) and
17// msvcrt.dll (MinGW). Calls made inside host DLLs, not through the game's imports, are not seen here. 18// msvcrt.dll (MinGW). Calls made inside host DLLs, not through the game's imports, are not seen here.
18// The loader matches imports by exact DLL name, so GetCommandLineA/W and ExitProcess are served under every name a 19// The loader matches imports by exact DLL name, so GetCommandLineA/W and ExitProcess are served under every name a
@@ -142,6 +143,28 @@ OnexitFn __cdecl game_onexit(OnexitFn fn) {
142 return fn && register_atexit(reinterpret_cast<AtexitFn>(fn)) ? fn : nullptr; 143 return fn && register_atexit(reinterpret_cast<AtexitFn>(fn)) ? fn : nullptr;
143} 144}
144 145
146// ---- the EXE's thread-local destructors
147// An MSVC EXE's startup passes vcruntime's TLS destructor callback, which its TLS directory also lists, to
148// _register_thread_local_exe_atexit_callback (UCRT process.h: void __cdecl (_tls_callback_type), where
149// _tls_callback_type is void (__stdcall*)(void*, unsigned long, void*)). The UCRT calls it as
150// (nullptr, DLL_PROCESS_DETACH, nullptr) when exit() or _cexit() starts, before the atexit table: the leaving thread's
151// thread_local objects end before the static ones, as C++ requires. Other threads' end through the loader's
152// thread-detach notification, which calls the same function from the TLS directory, so it is not called here then.
153// The host CRT cannot take it: the UCRT accepts one per process and fast-fails the second (gta6rt's own startup
154// registers the first, so the title stopped at boot on Windows), and Wine's ucrtbase replaces gta6rt's own and never
155// calls the title's, because the run ends through end_run.
156using TlsCallback = void(__stdcall*)(void*, unsigned long, void*);
157std::atomic<TlsCallback> g_thread_local_exit_callback{nullptr};
158
159void __cdecl game_register_thread_local_exe_atexit_callback(TlsCallback callback) {
160 g_thread_local_exit_callback.store(callback);
161}
162// Once per run, like the UCRT's exit path: a later exit() after _cexit() finds nothing left to run.
163void run_thread_local_exe_atexit_callback() {
164 if (const TlsCallback callback = g_thread_local_exit_callback.exchange(nullptr))
165 callback(nullptr, DLL_PROCESS_DETACH, nullptr);
166}
167
145// ---- the way out 168// ---- the way out
146// The CRT's exit lock, which exit(), _exit(), _Exit() and quick_exit() all take: the first thread to leave owns it 169// The CRT's exit lock, which exit(), _exit(), _Exit() and quick_exit() all take: the first thread to leave owns it
147// and ends the run; any other thread that tries to leave waits forever. The owner may leave again from a handler 170// and ends the run; any other thread that tries to leave waits forever. The owner may leave again from a handler
@@ -157,7 +180,10 @@ bool take_exit_lock() {
157} 180}
158// exit(): the game's handlers and static destructors, then the end of the run. 181// exit(): the game's handlers and static destructors, then the end of the run.
159void __cdecl game_exit(int code) { 182void __cdecl game_exit(int code) {
160 if (take_exit_lock()) run_atexit_handlers(); 183 if (take_exit_lock()) {
184 run_thread_local_exe_atexit_callback();
185 run_atexit_handlers();
186 }
161 end_run(code); 187 end_run(code);
162} 188}
163// _exit(), _Exit(), quick_exit(): the end of the run without the atexit handlers. 189// _exit(), _Exit(), quick_exit(): the end of the run without the atexit handlers.
@@ -167,6 +193,7 @@ void __cdecl game_quick_exit(int code) {
167} 193}
168// _cexit() runs the handlers and flushes the streams, then returns; _c_exit() only returns. 194// _cexit() runs the handlers and flushes the streams, then returns; _c_exit() only returns.
169void __cdecl game_cexit() { 195void __cdecl game_cexit() {
196 run_thread_local_exe_atexit_callback();
170 run_atexit_handlers(); 197 run_atexit_handlers();
171 std::fflush(nullptr); 198 std::fflush(nullptr);
172} 199}
@@ -493,6 +520,8 @@ using namespace rt::process;
493 {dll, "_crt_atexit", reinterpret_cast<void*>(&game_crt_atexit)}, \ 520 {dll, "_crt_atexit", reinterpret_cast<void*>(&game_crt_atexit)}, \
494 {dll, "_cexit", reinterpret_cast<void*>(&game_cexit)}, {dll, "_c_exit", reinterpret_cast<void*>(&game_c_exit)}, \ 521 {dll, "_cexit", reinterpret_cast<void*>(&game_cexit)}, {dll, "_c_exit", reinterpret_cast<void*>(&game_c_exit)}, \
495 {dll, "abort", reinterpret_cast<void*>(&game_abort)}, {dll, "__p___argc", reinterpret_cast<void*>(&game_p_argc)}, \ 522 {dll, "abort", reinterpret_cast<void*>(&game_abort)}, {dll, "__p___argc", reinterpret_cast<void*>(&game_p_argc)}, \
523 {dll, "_register_thread_local_exe_atexit_callback", \
524 reinterpret_cast<void*>(&game_register_thread_local_exe_atexit_callback)}, \
496 {dll, "__p___argv", reinterpret_cast<void*>(&game_p_argv)}, \ 525 {dll, "__p___argv", reinterpret_cast<void*>(&game_p_argv)}, \
497 {dll, "__p___wargv", reinterpret_cast<void*>(&game_p_wargv)}, \ 526 {dll, "__p___wargv", reinterpret_cast<void*>(&game_p_wargv)}, \
498 {dll, "_configure_narrow_argv", reinterpret_cast<void*>(&game_configure_narrow_argv)}, \ 527 {dll, "_configure_narrow_argv", reinterpret_cast<void*>(&game_configure_narrow_argv)}, \
diff --git a/runtime/shims/xapu_chad.cpp b/runtime/shims/xapu_chad.cpp
index 35bda2b72..e46a61c97 100644
--- a/runtime/shims/xapu_chad.cpp
+++ b/runtime/shims/xapu_chad.cpp
@@ -1,24 +1,8 @@
1// xapu.dll and chad.dll: the console's audio processing unit (APU) and audio DSP command queues. No PC has either, 1// chad.dll: the console's audio DSP command queue. No PC has one, so this gives the title a connection whose calls
2// so these give the title connections whose calls succeed, a zeroed shared buffer, a result for each stream open and 2// succeed and zeroed DSP status: nothing the title submits is processed. xapu.dll, the APU command queue, is in
3// close, and zeroed DSP status: the audio the APU would render stays silent, and nothing the title submits is processed. 3// xapu_queue.cpp.
4// 4//
5// Read from the executable's call sites (counts in docs/runtime_imports.md), statically, never run: 5// Read from the executable's call sites (counts in docs/runtime_imports.md), statically, never run:
6// XApuConnect(block24*, out16*, handle*) 1 site; success is SUCCEEDED(hr). The first qword of the 16-byte
7// output is read later as the base of a CPU-visible buffer: per-stream
8// input at base + slot * 0x280 and output at base + 0x14000 +
9// slot * 0x1E00. The first argument is a 24-byte global of the title
10// that other title code also addresses; whether it is an input or an
11// output is not known, so it is left untouched.
12// XApuEnqueueCommand(handle, cmd*, 0) 4 sites; the return value is never read. cmd's first dword is a type
13// (1, 2 and 3 seen), the second a stream slot.
14// XApuGetResultCount(handle, 0) 1 site; 0 skips the loop that dequeues.
15// XApuDequeueResult(handle, out*) 1 site, called count times into a zeroed 0x50-byte local; a negative
16// HRESULT skips that result. The loop reads a type at +0, a stream slot
17// at +4 and a dword at +0x34. Its per-slot state machine takes a type 1
18// result as "opened" and returns the slot to the title's free list only
19// on a type 2 result, after the title enqueued a type 2 command.
20// XApuDisconnect(handle, 0x20) 1 site; the return value is never read. The constant second
21// argument is not declared here: nothing reads it.
22// XDspConnectWithMaximumStreamLimit(buffer, u32, u32, 0x80, 1, handle*) 1 site; success is a return of 0. The 6// XDspConnectWithMaximumStreamLimit(buffer, u32, u32, 0x80, 1, handle*) 1 site; success is a return of 0. The
23// buffer comes from the title's XMemAlloc and stays the title's. 7// buffer comes from the title's XMemAlloc and stays the title's.
24// XDspActivate(handle, desc*, out*, out*) 1 site; success is a return of 0, else the caller returns -1. The two 8// XDspActivate(handle, desc*, out*, out*) 1 site; success is a return of 0, else the caller returns -1. The two
@@ -30,12 +14,6 @@
30// at +4 equals *id. 14// at +4 equals *id.
31// XDspDeactivate, XDspDisconnect 1 site each, tail calls: the caller returns what they return. 15// XDspDeactivate, XDspDisconnect 1 site each, tail calls: the caller returns what they return.
32// 16//
33// HYPOTHESIS: the shared buffer is 0x14000 + 128 * 0x1E00 bytes. 128 slots is what fits 0x14000 at the 0x280 input
34// stride, and the DSP connect passes 0x80 as its stream limit; no call site shows a bound. The 16-byte output is
35// written as {base, size}; only the base is measured.
36// HYPOTHESIS: a type 1 (open) or type 2 (close) command produces one result of the same type for the same slot; the
37// title's state machine fits that, the console is not measured. Without the close result the title's 256 stream ids
38// run out. Only the two dwords are written; other command types are accepted with S_OK and produce no result.
39// HYPOTHESIS: XDspActivate's outputs point at zeroed memory owned by the connection. XDspSubmitCommand leaves *id at 17// HYPOTHESIS: XDspActivate's outputs point at zeroed memory owned by the connection. XDspSubmitCommand leaves *id at
40// the title's 0, so the zeroed status reads as "command 0 done, no error" and the title does not wait. 18// the title's 0, so the zeroed status reads as "command 0 done, no error" and the title does not wait.
41#include <windows.h> 19#include <windows.h>
@@ -43,7 +21,6 @@
43 21
44#include <cstdint> 22#include <cstdint>
45#include <cstring> 23#include <cstring>
46#include <deque>
47#include <mutex> 24#include <mutex>
48#include <new> 25#include <new>
49#include <set> 26#include <set>
@@ -54,30 +31,13 @@
54 31
55namespace { 32namespace {
56 33
57constexpr size_t kApuBufferSize = 0x14000 + 128 * 0x1E00;
58
59// shortcut: results past this cap are dropped (each leaks one stream id); raise it if a title that never dequeues
60// must still work.
61constexpr size_t kMaxResults = 4096;
62
63struct ApuResult {
64 uint32_t type;
65 uint32_t slot;
66};
67
68struct ApuConnection {
69 void* buffer;
70 std::mutex mutex;
71 std::deque<ApuResult> results;
72};
73
74struct DspConnection { 34struct DspConnection {
75 uint8_t status[256]; 35 uint8_t status[256];
76 uint8_t stream[256]; 36 uint8_t stream[256];
77}; 37};
78 38
79// gta6rt --trace FILE: the first call of each function and the first XApuEnqueueCommand of each command type, with 39// gta6rt --trace FILE: the first call of each function, with the caller, so the first boot shows what the title sends
80// the caller, so the first boot shows what the title sends without a line per call. 40// without a line per call.
81void note(const char* api, uint64_t value, const void* caller) { 41void note(const char* api, uint64_t value, const void* caller) {
82 if (!rt::startup_trace::enabled()) return; 42 if (!rt::startup_trace::enabled()) return;
83 static std::mutex mutex; 43 static std::mutex mutex;
@@ -92,71 +52,6 @@ void note(const char* api, uint64_t value, const void* caller) {
92 rt::startup_trace::quote(rt::startup_trace::where(reinterpret_cast<uint64_t>(caller)))); 52 rt::startup_trace::quote(rt::startup_trace::where(reinterpret_cast<uint64_t>(caller))));
93} 53}
94 54
95HRESULT __stdcall XApuConnect(void* block24, void* out16, void** handle) {
96 note("XApuConnect", 0, _ReturnAddress());
97 if (!handle) return E_INVALIDARG;
98 *handle = nullptr;
99 void* buffer = VirtualAlloc(nullptr, kApuBufferSize, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); // zeroed
100 if (!buffer) return E_OUTOFMEMORY;
101 auto* c = new (std::nothrow) ApuConnection; // a throwing new would unwind into the title
102 if (!c) {
103 VirtualFree(buffer, 0, MEM_RELEASE);
104 return E_OUTOFMEMORY;
105 }
106 c->buffer = buffer;
107 *handle = c;
108 (void)block24;
109 if (out16) {
110 const uint64_t info[2] = {reinterpret_cast<uint64_t>(buffer), kApuBufferSize};
111 std::memcpy(out16, info, sizeof info);
112 }
113 return S_OK;
114}
115
116HRESULT __stdcall XApuDisconnect(void* handle) {
117 note("XApuDisconnect", 0, _ReturnAddress());
118 auto* c = static_cast<ApuConnection*>(handle);
119 if (!c) return E_INVALIDARG;
120 VirtualFree(c->buffer, 0, MEM_RELEASE);
121 delete c;
122 return S_OK;
123}
124
125HRESULT __stdcall XApuEnqueueCommand(void* handle, const uint32_t* command, uint64_t flags) {
126 note("XApuEnqueueCommand", command ? command[0] : ~0ull, _ReturnAddress());
127 (void)flags;
128 auto* c = static_cast<ApuConnection*>(handle);
129 if (!c || !command) return E_INVALIDARG;
130 if (command[0] == 1 || command[0] == 2) {
131 try {
132 const std::lock_guard lock(c->mutex);
133 if (c->results.size() < kMaxResults) c->results.push_back({command[0], command[1]});
134 } catch (...) { // out of memory: the result is lost, nothing may unwind into the title
135 }
136 }
137 return S_OK;
138}
139
140uint32_t __stdcall XApuGetResultCount(void* handle, uint64_t flags) {
141 note("XApuGetResultCount", 0, _ReturnAddress());
142 (void)flags;
143 auto* c = static_cast<ApuConnection*>(handle);
144 if (!c) return 0;
145 const std::lock_guard lock(c->mutex);
146 return static_cast<uint32_t>(c->results.size());
147}
148
149HRESULT __stdcall XApuDequeueResult(void* handle, void* result) {
150 note("XApuDequeueResult", 0, _ReturnAddress());
151 auto* c = static_cast<ApuConnection*>(handle);
152 if (!c || !result) return E_INVALIDARG;
153 const std::lock_guard lock(c->mutex);
154 if (c->results.empty()) return E_FAIL;
155 std::memcpy(result, &c->results.front(), sizeof(ApuResult)); // the rest stays as the caller zeroed it
156 c->results.pop_front();
157 return S_OK;
158}
159
160HRESULT __stdcall XDspConnectWithMaximumStreamLimit(void* buffer, uint32_t a, uint32_t b, uint32_t max_streams, 55HRESULT __stdcall XDspConnectWithMaximumStreamLimit(void* buffer, uint32_t a, uint32_t b, uint32_t max_streams,
161 uint32_t flags, void** handle) { 56 uint32_t flags, void** handle) {
162 note("XDspConnectWithMaximumStreamLimit", max_streams, _ReturnAddress()); 57 note("XDspConnectWithMaximumStreamLimit", max_streams, _ReturnAddress());
@@ -199,14 +94,6 @@ HRESULT __stdcall XDspSubmitCommand(void*, void*, uint32_t*) {
199 94
200} // namespace 95} // namespace
201 96
202SHIM_TABLE(xapu,
203 {"xapu.dll", "XApuConnect", reinterpret_cast<void*>(&XApuConnect)},
204 {"xapu.dll", "XApuDequeueResult", reinterpret_cast<void*>(&XApuDequeueResult)},
205 {"xapu.dll", "XApuDisconnect", reinterpret_cast<void*>(&XApuDisconnect)},
206 {"xapu.dll", "XApuEnqueueCommand", reinterpret_cast<void*>(&XApuEnqueueCommand)},
207 {"xapu.dll", "XApuGetResultCount", reinterpret_cast<void*>(&XApuGetResultCount)},
208);
209
210SHIM_TABLE(chad, 97SHIM_TABLE(chad,
211 {"chad.dll", "XDspActivate", reinterpret_cast<void*>(&XDspActivate)}, 98 {"chad.dll", "XDspActivate", reinterpret_cast<void*>(&XDspActivate)},
212 {"chad.dll", "XDspConnectWithMaximumStreamLimit", reinterpret_cast<void*>(&XDspConnectWithMaximumStreamLimit)}, 99 {"chad.dll", "XDspConnectWithMaximumStreamLimit", reinterpret_cast<void*>(&XDspConnectWithMaximumStreamLimit)},
diff --git a/runtime/shims/xapu_queue.cpp b/runtime/shims/xapu_queue.cpp
new file mode 100644
index 000000000..e754376ba
--- /dev/null
+++ b/runtime/shims/xapu_queue.cpp
@@ -0,0 +1,438 @@
1// xapu.dll: the console's audio processing unit (APU) command queue. No PC has one, so this keeps the queue the title
2// talks to - one result per accepted command, in command order, with the console's error codes. With
3// runtime/opus_decoder built (LEONIDA_HAVE_OPUS_DECODER) a process command decodes its Opus packet to PCM; without
4// it the result carries the frame count its table-of-contents byte gives and silence in its output.
5//
6// Read from the executable's call sites (counts in docs/runtime_imports.md, shapes in docs/audio_hal_exe_calls.md),
7// statically, never run:
8// XApuConnect(input24*, out16*, handle*) 1 site; success is SUCCEEDED(hr). The first qword of the 16-byte
9// output is read later as the base of a CPU-visible buffer: per-stream
10// input at base + slot * 0x280 and output at base + 0x14000 +
11// slot * 0x1E00. The first argument is a 24-byte global of the title
12// that other title code also addresses.
13// XApuEnqueueCommand(handle, cmd*, 0) 4 sites; the return value is never read. cmd's first dword is a type
14// (1, 2 and 3 seen), the second a stream slot.
15// XApuGetResultCount(handle, 0) 1 site; 0 skips the loop that dequeues.
16// XApuDequeueResult(handle, out*) 1 site, called count times into a zeroed 0x50-byte local; a negative
17// HRESULT skips that result. The loop reads a type at +0, a stream slot
18// at +4 and a dword at +0x34. Its per-slot state machine takes a type 1
19// result as "opened" and returns the slot to the title's free list only
20// on a type 2 result, after the title enqueued a type 2 command.
21// XApuDisconnect(handle, 0x20) 1 site; the return value is never read.
22//
23// Where the layouts come from. The signatures, structure layouts, command kinds, option bits and error codes below
24// are facts recorded by Marvisak/VIctory (GPL-3.0-or-later, crates/victory-hle/src/modules/apu.rs at commit ffe310e),
25// whose runtime runs the retail executable through these calls; see docs/related_projects.md. Nothing of its code is
26// copied; this file is written from those facts. They agree with every shape above: the first argument of
27// XApuConnect is an input, the dword the title reads at +0x34 of a result is its output byte count, and a type 1
28// (activate) or type 2 (deactivate) command gives a result of the same kind for the same stream.
29// HRESULT XApuConnect(const ConnectInput*, ConnectOutput*, Connection** out)
30// HRESULT XApuDisconnect(Connection*, uint32_t) the second argument is not read
31// HRESULT XApuEnqueueCommand(Connection*, const void* command, uint32_t* accepted_so_far) may be null
32// HRESULT XApuDequeueResult(Connection*, Result* out) 0x8AC81001 while no result is ready
33// uint32_t XApuGetResultCount(Connection*, uint32_t* dequeued_so_far) may be null; returns the results ready
34// A connection is for one kind of processing; kind 1 is Opus decoding to 32-bit float PCM at 48 kHz, and any other
35// kind is E_NOTIMPL. Every command starts with the 24-byte CommandId. A command refused at once (unknown kind,
36// stream out of range, or the stream already holding `commands_per_stream` results not dequeued) gives no result;
37// every other command gives one, with its error, if any, in the result.
38//
39// Without runtime/opus_decoder a process command's frame count comes from the Opus packet's table-of-contents byte
40// (RFC 6716, section 3.1), clipped from first_frame, to frame_count and to what output_bytes holds, and that output
41// range is written with zeros, so the title sees streams advance at the right rate and the audio stays silent. With
42// the crate, fill() decodes the packet and writes its PCM instead.
43#include <windows.h>
44#include <intrin.h>
45
46#include <cstddef>
47#include <cstdint>
48#include <cstdio>
49#include <cstring>
50#include <deque>
51#include <mutex>
52#include <new>
53#include <set>
54#include <string>
55#include <vector>
56
57#if defined(LEONIDA_HAVE_OPUS_DECODER)
58#include "leonida_opus_decoder.h"
59#endif
60
61#include "shims.h"
62#include "startup_trace.h"
63
64namespace {
65
66constexpr HRESULT kNotImpl = static_cast<HRESULT>(rt::shims::kENotImpl);
67constexpr HRESULT kQueueFull = static_cast<HRESULT>(0x8AC81000u);
68constexpr HRESULT kNoResult = static_cast<HRESULT>(0x8AC81001u);
69constexpr HRESULT kInvalidCommand = static_cast<HRESULT>(0x8AC81002u);
70constexpr HRESULT kInvalidStream = static_cast<HRESULT>(0x8AC81003u);
71constexpr HRESULT kAlreadyActive = static_cast<HRESULT>(0x8AC81005u);
72constexpr HRESULT kBadPacket = static_cast<HRESULT>(0x8AC81008u);
73
74constexpr uint32_t kDecodeOpus = 1; // ConnectInput::processing
75
76constexpr uint32_t kActivate = 1; // CommandId::kind
77constexpr uint32_t kDeactivate = 2;
78constexpr uint32_t kProcess = 3;
79constexpr uint32_t kReset = 5; // 4 is notify; neither carries anything to do while nothing is decoded
80
81constexpr uint32_t kSignalWhenDone = 0x1; // CommandId::options: set the result event when the result is ready
82constexpr uint32_t kResultEvent = 0x8; // ConnectInput::options: create an auto-reset event and hand it out
83constexpr uint32_t kDeinterleavedOutput = 0x4; // ConnectInput::options: split stereo into two planes
84constexpr uint32_t kOpusSampleRate = 48000;
85
86constexpr uint32_t kMaxStreams = 500;
87constexpr uint32_t kMaxCommandsPerStream = 16;
88constexpr uint32_t kMaxFrames = 5760; // 120 ms at 48 kHz, the longest Opus packet (RFC 6716, section 3.2.5)
89
90#pragma pack(push, 1)
91struct ConnectInput {
92 uint32_t processing;
93 uint32_t streams;
94 uint32_t commands_per_stream;
95 uint32_t memory_bytes;
96 uint32_t frames_per_output; // 0 for decoding
97 uint32_t options;
98};
99struct ConnectOutput {
100 void* memory; // zeroed, for the title's packets and output
101 HANDLE result_event;
102};
103struct CommandId {
104 uint32_t kind;
105 uint32_t stream;
106 uint32_t sequence;
107 uint32_t options;
108 uint64_t context;
109};
110struct ActivateCommand {
111 CommandId id;
112 uint32_t channels; // 1 or 2
113 uint32_t init_bytes;
114 const void* init;
115 float start_pitch;
116 uint32_t processing_bytes;
117 void* processing;
118};
119struct ProcessCommand {
120 CommandId id;
121 float pitch_ramp;
122 float target_pitch;
123 uint32_t first_frame;
124 uint32_t frame_count;
125 uint32_t input_bytes;
126 const uint8_t* input;
127 uint32_t output_bytes;
128 uint8_t* output;
129};
130struct Result {
131 CommandId id;
132 uint32_t state;
133 uint64_t state_data;
134 uint64_t usec;
135 HRESULT error;
136 uint32_t frames;
137 uint32_t output_bytes;
138 uint8_t* output;
139 float pitch;
140 uint32_t input_bytes;
141 const uint8_t* input;
142};
143#pragma pack(pop)
144static_assert(sizeof(ConnectInput) == 24, "six dwords");
145static_assert(sizeof(ConnectOutput) == 16, "memory and event");
146static_assert(sizeof(CommandId) == 24, "kind, stream, sequence, options, context");
147static_assert(sizeof(ActivateCommand) == 56, "CommandId and the activate fields");
148static_assert(sizeof(ProcessCommand) == 64, "CommandId and the process fields");
149static_assert(sizeof(Result) == 0x50, "the result the title dequeues");
150static_assert(offsetof(Result, state) == 0x18 && offsetof(Result, error) == 0x2C &&
151 offsetof(Result, output_bytes) == 0x34 && offsetof(Result, pitch) == 0x40 &&
152 offsetof(Result, input) == 0x48,
153 "the offsets the title and the layout agree on");
154
155struct Stream {
156 bool active = false;
157 uint32_t channels = 0;
158 uint32_t pending = 0; // results queued and not dequeued
159#if defined(LEONIDA_HAVE_OPUS_DECODER)
160 LeonidaOpusDecoder* decoder = nullptr;
161#endif
162};
163
164struct Connection {
165 void* memory = nullptr;
166 HANDLE event = nullptr;
167 uint32_t commands_per_stream = 0;
168 bool deinterleaved = false;
169 std::mutex mutex;
170 std::vector<Stream> streams;
171 std::deque<Result> results;
172 uint32_t accepted = 0;
173 uint32_t dequeued = 0;
174};
175
176// gta6rt --trace FILE: the first call of each function and the first XApuEnqueueCommand of each command kind, with
177// the caller, so the first boot shows what the title sends without a line per call.
178void note(const char* api, uint64_t value, const void* caller) {
179 if (!rt::startup_trace::enabled()) return;
180 static std::mutex mutex;
181 static std::set<std::pair<std::string, uint64_t>> seen;
182 {
183 const std::lock_guard lock(mutex);
184 if (!seen.insert({api, value}).second) return;
185 }
186 rt::startup_trace::event(
187 "audio_queue", std::string("\"api\":") + rt::startup_trace::quote(api) +
188 ",\"value\":" + rt::startup_trace::quote(rt::startup_trace::hex(value)) + ",\"caller\":" +
189 rt::startup_trace::quote(rt::startup_trace::where(reinterpret_cast<uint64_t>(caller))));
190}
191
192// Samples per channel at 48 kHz in one Opus packet, from its table-of-contents byte and frame count code (RFC 6716,
193// section 3.1); 0 for a packet that is not valid. The no-decoder path counts frames this way.
194uint32_t opus_packet_frames(const uint8_t* packet, uint32_t bytes) {
195 if (!packet || bytes == 0) return 0;
196 static constexpr uint32_t kSilk[4] = {480, 960, 1920, 2880}; // 10, 20, 40, 60 ms
197 static constexpr uint32_t kHybrid[2] = {480, 960}; // 10, 20 ms
198 static constexpr uint32_t kCelt[4] = {120, 240, 480, 960}; // 2.5, 5, 10, 20 ms
199 const uint32_t config = packet[0] >> 3;
200 const uint32_t per_frame = config < 12 ? kSilk[config & 3] : config < 16 ? kHybrid[config & 1] : kCelt[config & 3];
201 uint32_t count = 0;
202 switch (packet[0] & 3) {
203 case 0: count = 1; break;
204 case 1:
205 case 2: count = 2; break;
206 default:
207 if (bytes < 2) return 0;
208 count = packet[1] & 0x3F;
209 break;
210 }
211 if (count == 0 || count * per_frame > kMaxFrames) return 0;
212 return count * per_frame;
213}
214
215// Fills a process command's result: the packet's PCM when runtime/opus_decoder is built, silence (with the frame
216// count from the table-of-contents byte) otherwise.
217void fill(Connection& connection, Stream& stream, const ProcessCommand& c, Result& r) {
218 r.input = c.input;
219 r.input_bytes = c.input_bytes;
220 r.output = c.output;
221 if (!c.input || !c.output || c.input_bytes == 0) {
222 r.error = E_INVALIDARG;
223 return;
224 }
225#if defined(LEONIDA_HAVE_OPUS_DECODER)
226 if (stream.decoder) {
227 const uint32_t channels = leonida_opus_decoder_channels(stream.decoder);
228 if (channels == 0) {
229 r.error = kInvalidStream;
230 return;
231 }
232 std::vector<float> pcm;
233 try {
234 pcm.resize(size_t(kMaxFrames) * channels);
235 } catch (...) {
236 r.error = E_OUTOFMEMORY;
237 return;
238 }
239 uint32_t decoded = 0;
240 if (leonida_opus_decode_packet(stream.decoder, c.input, c.input_bytes, pcm.data(), kMaxFrames, &decoded) !=
241 LEONIDA_OPUS_OK) {
242 r.error = kBadPacket;
243 return;
244 }
245 const uint32_t first = c.first_frame < decoded ? c.first_frame : decoded;
246 uint32_t frames = decoded - first;
247 if (frames > c.frame_count) frames = c.frame_count;
248 const uint32_t room = c.output_bytes / (4 * channels);
249 if (frames > room) frames = room;
250 const uint32_t bytes = frames * channels * 4;
251 if (connection.deinterleaved && channels == 2) {
252 float* out = reinterpret_cast<float*>(c.output);
253 for (uint32_t i = 0; i < frames; ++i) {
254 out[i] = pcm[(first + i) * 2];
255 out[frames + i] = pcm[(first + i) * 2 + 1];
256 }
257 } else if (bytes != 0) {
258 std::memcpy(c.output, pcm.data() + first * channels, bytes);
259 }
260 r.frames = frames;
261 r.output_bytes = bytes;
262 return;
263 }
264#endif
265 const uint32_t decoded = opus_packet_frames(c.input, c.input_bytes);
266 if (decoded == 0) {
267 r.error = kBadPacket;
268 return;
269 }
270 const uint32_t first = c.first_frame < decoded ? c.first_frame : decoded;
271 uint32_t frames = decoded - first;
272 if (frames > c.frame_count) frames = c.frame_count;
273 const uint32_t room = c.output_bytes / (4 * stream.channels);
274 if (frames > room) frames = room;
275 const uint32_t bytes = frames * stream.channels * 4;
276 std::memset(c.output, 0, bytes); // interleaved or not, silence is zeros
277 r.frames = frames;
278 r.output_bytes = bytes;
279}
280
281HRESULT __stdcall XApuConnect(const ConnectInput* input, ConnectOutput* output, Connection** out) {
282 note("XApuConnect", input ? input->processing : ~0ull, _ReturnAddress());
283 if (!input || !output || !out) return E_INVALIDARG;
284 *out = nullptr;
285 ConnectInput in;
286 std::memcpy(&in, input, sizeof(in));
287 if (in.streams == 0 || in.streams > kMaxStreams || in.commands_per_stream == 0 ||
288 in.commands_per_stream > kMaxCommandsPerStream || in.memory_bytes == 0)
289 return E_INVALIDARG;
290 if (in.processing != kDecodeOpus) {
291 std::fprintf(stderr, "[rt] xapu: XApuConnect for processing kind %u: only Opus decoding (1); E_NOTIMPL\n",
292 in.processing);
293 return kNotImpl;
294 }
295 if (in.frames_per_output != 0) return E_INVALIDARG;
296
297 auto* c = new (std::nothrow) Connection; // a throwing new would unwind into the title
298 if (!c) return E_OUTOFMEMORY;
299 try {
300 c->streams.resize(in.streams);
301 } catch (...) {
302 delete c;
303 return E_OUTOFMEMORY;
304 }
305 c->memory = VirtualAlloc(nullptr, in.memory_bytes, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE); // zeroed
306 if (!c->memory) {
307 delete c;
308 return E_OUTOFMEMORY;
309 }
310 if (in.options & kResultEvent) {
311 c->event = CreateEventW(nullptr, FALSE, FALSE, nullptr); // auto-reset
312 if (!c->event) {
313 const HRESULT hr = HRESULT_FROM_WIN32(GetLastError());
314 VirtualFree(c->memory, 0, MEM_RELEASE);
315 delete c;
316 return hr;
317 }
318 }
319 c->commands_per_stream = in.commands_per_stream;
320 c->deinterleaved = (in.options & kDeinterleavedOutput) != 0;
321 const ConnectOutput o{c->memory, c->event};
322 std::memcpy(output, &o, sizeof(o));
323 *out = c;
324#if defined(LEONIDA_HAVE_OPUS_DECODER)
325 std::fprintf(stderr, "[rt] xapu: connected for Opus decoding, %u streams; packets decoded\n", in.streams);
326#else
327 std::fprintf(stderr, "[rt] xapu: connected for Opus decoding, %u streams; packets counted, not decoded\n",
328 in.streams);
329#endif
330 return S_OK;
331}
332
333HRESULT __stdcall XApuDisconnect(Connection* c, uint32_t /*0x20 at the measured site*/) {
334 note("XApuDisconnect", 0, _ReturnAddress());
335 if (!c) return E_INVALIDARG;
336#if defined(LEONIDA_HAVE_OPUS_DECODER)
337 for (Stream& s : c->streams)
338 if (s.decoder) leonida_opus_decoder_destroy(s.decoder);
339#endif
340 if (c->event) CloseHandle(c->event);
341 VirtualFree(c->memory, 0, MEM_RELEASE);
342 delete c;
343 return S_OK;
344}
345
346HRESULT __stdcall XApuEnqueueCommand(Connection* c, const void* command, uint32_t* accepted_so_far) {
347 if (!c || !command) return E_INVALIDARG;
348 CommandId id;
349 std::memcpy(&id, command, sizeof(id));
350 note("XApuEnqueueCommand", id.kind, _ReturnAddress());
351 if (id.kind < kActivate || id.kind > kReset) return kInvalidCommand;
352
353 const std::lock_guard lock(c->mutex);
354 if (id.stream >= c->streams.size()) return kInvalidStream;
355 Stream& stream = c->streams[id.stream];
356 if (stream.pending >= c->commands_per_stream) return kQueueFull;
357
358 Result r{};
359 r.id = id;
360 r.pitch = 1.0f;
361 if (id.kind == kActivate) {
362 ActivateCommand a;
363 std::memcpy(&a, command, sizeof(a));
364 if (stream.active) {
365 r.error = kAlreadyActive;
366 } else if (a.channels < 1 || a.channels > 2) {
367 r.error = E_INVALIDARG;
368 } else {
369 stream.active = true;
370 stream.channels = a.channels;
371#if defined(LEONIDA_HAVE_OPUS_DECODER)
372 if (leonida_opus_decoder_create(kOpusSampleRate, a.channels, &stream.decoder) != LEONIDA_OPUS_OK) {
373 stream.active = false;
374 stream.channels = 0;
375 r.error = E_INVALIDARG;
376 }
377#endif
378 }
379 } else if (id.kind == kDeactivate) {
380 stream.active = false;
381#if defined(LEONIDA_HAVE_OPUS_DECODER)
382 if (stream.decoder) {
383 leonida_opus_decoder_destroy(stream.decoder);
384 stream.decoder = nullptr;
385 }
386#endif
387 } else if (id.kind == kReset) {
388#if defined(LEONIDA_HAVE_OPUS_DECODER)
389 if (stream.decoder) leonida_opus_decoder_reset(stream.decoder);
390#endif
391 } else if (id.kind == kProcess) {
392 ProcessCommand p;
393 std::memcpy(&p, command, sizeof(p));
394 if (!stream.active) r.error = kInvalidStream;
395 else fill(*c, stream, p, r);
396 }
397 try {
398 c->results.push_back(r);
399 } catch (...) { // out of memory: refuse the command, nothing may unwind into the title
400 return E_OUTOFMEMORY;
401 }
402 ++stream.pending;
403 ++c->accepted;
404 if (accepted_so_far) *accepted_so_far = c->accepted;
405 if ((id.options & kSignalWhenDone) && c->event) SetEvent(c->event);
406 return S_OK;
407}
408
409HRESULT __stdcall XApuDequeueResult(Connection* c, Result* out) {
410 note("XApuDequeueResult", 0, _ReturnAddress());
411 if (!c || !out) return E_INVALIDARG;
412 const std::lock_guard lock(c->mutex);
413 if (c->results.empty()) return kNoResult;
414 const Result r = c->results.front();
415 c->results.pop_front();
416 --c->streams[r.id.stream].pending;
417 ++c->dequeued;
418 std::memcpy(out, &r, sizeof(r));
419 return S_OK;
420}
421
422uint32_t __stdcall XApuGetResultCount(Connection* c, uint32_t* dequeued_so_far) {
423 note("XApuGetResultCount", 0, _ReturnAddress());
424 if (!c) return 0;
425 const std::lock_guard lock(c->mutex);
426 if (dequeued_so_far) *dequeued_so_far = c->dequeued;
427 return static_cast<uint32_t>(c->results.size());
428}
429
430} // namespace
431
432SHIM_TABLE(xapu,
433 {"xapu.dll", "XApuConnect", reinterpret_cast<void*>(&XApuConnect)},
434 {"xapu.dll", "XApuDequeueResult", reinterpret_cast<void*>(&XApuDequeueResult)},
435 {"xapu.dll", "XApuDisconnect", reinterpret_cast<void*>(&XApuDisconnect)},
436 {"xapu.dll", "XApuEnqueueCommand", reinterpret_cast<void*>(&XApuEnqueueCommand)},
437 {"xapu.dll", "XApuGetResultCount", reinterpret_cast<void*>(&XApuGetResultCount)},
438);
diff --git a/runtime/shims/xgameruntime_gamesave.cpp b/runtime/shims/xgameruntime_gamesave.cpp
index 7ba8ab645..b29475778 100644
--- a/runtime/shims/xgameruntime_gamesave.cpp
+++ b/runtime/shims/xgameruntime_gamesave.cpp
@@ -326,23 +326,30 @@ struct BlobRead {
326 326
327size_t align8(size_t n) { return (n + 7) & ~size_t{7}; } 327size_t align8(size_t n) { return (n + 7) & ~size_t{7}; }
328 328
329size_t packed_size(const std::vector<BlobRead>& blobs) { 329// The layout the blobs are packed in: 8-byte aligned data and names when the buffer has room for that, packed back
330 size_t n = align8(blobs.size() * sizeof(XGameSaveBlob)); 330// to back otherwise. A title sizes the buffer as the sum of sizeof(XGameSaveBlob), the data and the name with its NUL
331 for (const BlobRead& b : blobs) n += align8(b.data.size()) + align8(b.name.size() + 1); 331// for each blob, so the minimum is the unaligned size.
332size_t packed_size(const std::vector<BlobRead>& blobs, bool aligned) {
333 const auto a = [aligned](size_t n) { return aligned ? align8(n) : n; };
334 size_t n = a(blobs.size() * sizeof(XGameSaveBlob));
335 for (const BlobRead& b : blobs) n += a(b.data.size()) + a(b.name.size() + 1);
332 return n; 336 return n;
333} 337}
338size_t packed_size(const std::vector<BlobRead>& blobs) { return packed_size(blobs, false); }
334 339
335void pack(const std::vector<BlobRead>& blobs, void* buffer) { 340void pack(const std::vector<BlobRead>& blobs, void* buffer, size_t buffer_size) {
341 const bool aligned = buffer_size >= packed_size(blobs, true);
342 const auto a = [aligned](size_t n) { return aligned ? align8(n) : n; };
336 auto* base = static_cast<uint8_t*>(buffer); 343 auto* base = static_cast<uint8_t*>(buffer);
337 auto* entries = static_cast<XGameSaveBlob*>(buffer); 344 auto* entries = static_cast<XGameSaveBlob*>(buffer);
338 size_t at = align8(blobs.size() * sizeof(XGameSaveBlob)); 345 size_t at = a(blobs.size() * sizeof(XGameSaveBlob));
339 for (size_t i = 0; i < blobs.size(); ++i) { 346 for (size_t i = 0; i < blobs.size(); ++i) {
340 uint8_t* data = base + at; 347 uint8_t* data = base + at;
341 if (!blobs[i].data.empty()) std::memcpy(data, blobs[i].data.data(), blobs[i].data.size()); 348 if (!blobs[i].data.empty()) std::memcpy(data, blobs[i].data.data(), blobs[i].data.size());
342 at += align8(blobs[i].data.size()); 349 at += a(blobs[i].data.size());
343 char* name = reinterpret_cast<char*>(base + at); 350 char* name = reinterpret_cast<char*>(base + at);
344 std::memcpy(name, blobs[i].name.c_str(), blobs[i].name.size() + 1); 351 std::memcpy(name, blobs[i].name.c_str(), blobs[i].name.size() + 1);
345 at += align8(blobs[i].name.size() + 1); 352 at += a(blobs[i].name.size() + 1);
346 entries[i].info.name = name; 353 entries[i].info.name = name;
347 entries[i].info.size = static_cast<uint32_t>(blobs[i].data.size()); 354 entries[i].info.size = static_cast<uint32_t>(blobs[i].data.size());
348 entries[i].data = data; 355 entries[i].data = data;
@@ -642,7 +649,7 @@ HRESULT CALLBACK job_provider(XAsyncOp op, const XAsyncProviderData* data) {
642 } 649 }
643 if (job->identity == &kReadIdentity) { 650 if (job->identity == &kReadIdentity) {
644 if (data->bufferSize < packed_size(job->blobs)) return E_GS_PROVIDED_BUFFER_TOO_SMALL; 651 if (data->bufferSize < packed_size(job->blobs)) return E_GS_PROVIDED_BUFFER_TOO_SMALL;
645 pack(job->blobs, data->buffer); 652 pack(job->blobs, data->buffer, data->bufferSize);
646 t_read_count = static_cast<uint32_t>(job->blobs.size()); 653 t_read_count = static_cast<uint32_t>(job->blobs.size());
647 return S_OK; 654 return S_OK;
648 } 655 }
@@ -840,7 +847,7 @@ HRESULT STDMETHODCALLTYPE save_read(void*, XGameSaveContainerHandle c, const cha
840 const HRESULT hr = read_blobs(c, names, names ? *count : 0, blobs); 847 const HRESULT hr = read_blobs(c, names, names ? *count : 0, blobs);
841 if (FAILED(hr)) return hr; 848 if (FAILED(hr)) return hr;
842 if (size < packed_size(blobs)) return E_GS_PROVIDED_BUFFER_TOO_SMALL; 849 if (size < packed_size(blobs)) return E_GS_PROVIDED_BUFFER_TOO_SMALL;
843 pack(blobs, out); 850 pack(blobs, out, size);
844 *count = static_cast<uint32_t>(blobs.size()); 851 *count = static_cast<uint32_t>(blobs.size());
845 return S_OK; 852 return S_OK;
846} 853}
diff --git a/runtime/shims/xmem.cpp b/runtime/shims/xmem.cpp
index 44c6f140b..fca6f6f47 100644
--- a/runtime/shims/xmem.cpp
+++ b/runtime/shims/xmem.cpp
@@ -1033,6 +1033,7 @@ constexpr size_t kUnmapRecords = 1024;
1033UnmapRecord g_unmaps[kUnmapRecords]; 1033UnmapRecord g_unmaps[kUnmapRecords];
1034uint64_t g_unmap_count = 0; 1034uint64_t g_unmap_count = 0;
1035thread_local const char* t_unmap_cause = "unmap"; 1035thread_local const char* t_unmap_cause = "unmap";
1036
1036struct UnmapCause { 1037struct UnmapCause {
1037 const char* was; 1038 const char* was;
1038 explicit UnmapCause(const char* cause) : was(std::exchange(t_unmap_cause, cause)) {} 1039 explicit UnmapCause(const char* cause) : was(std::exchange(t_unmap_cause, cause)) {}
@@ -1576,7 +1577,7 @@ LONG CALLBACK physical_page_fault(EXCEPTION_POINTERS* info) {
1576 MEMORY_BASIC_INFORMATION seen{}; // the page as the decision saw it 1577 MEMORY_BASIC_INFORMATION seen{}; // the page as the decision saw it
1577 char read_note[1024]; 1578 char read_note[1024];
1578 DWORD read_note_size = 0; 1579 DWORD read_note_size = 0;
1579 bool plant_read = false, promote = false; 1580 bool plant_read = false, promote = false, from_title = false;
1580 bool queried = false; 1581 bool queried = false;
1581 { 1582 {
1582 const FaultLockShared lock; 1583 const FaultLockShared lock;
@@ -1595,7 +1596,8 @@ LONG CALLBACK physical_page_fault(EXCEPTION_POINTERS* info) {
1595 if (where != kNoReservation || access == 1) 1596 if (where != kNoReservation || access == 1)
1596 queried = VirtualQuery(reinterpret_cast<const void*>(accessed), &seen, sizeof(seen)) != 0; 1597 queried = VirtualQuery(reinterpret_cast<const void*>(accessed), &seen, sizeof(seen)) != 0;
1597 const auto pc = reinterpret_cast<uintptr_t>(record->ExceptionAddress); 1598 const auto pc = reinterpret_cast<uintptr_t>(record->ExceptionAddress);
1598 if (access == 0 && result == PageCommit::not_ours && title_code(pc)) { 1599 from_title = access == 0 && result == PageCommit::not_ours && title_code(pc);
1600 if (from_title) {
1599 if (!queried) queried = VirtualQuery(reinterpret_cast<const void*>(accessed), &seen, sizeof(seen)) != 0; 1601 if (!queried) queried = VirtualQuery(reinterpret_cast<const void*>(accessed), &seen, sizeof(seen)) != 0;
1600 read_note_size = describe_read(read_note, pc, accessed, seen); 1602 read_note_size = describe_read(read_note, pc, accessed, seen);
1601 plant_read = where == kInWindow && g_pool_zero_pages; 1603 plant_read = where == kInWindow && g_pool_zero_pages;
@@ -1671,7 +1673,8 @@ LONG CALLBACK physical_page_fault(EXCEPTION_POINTERS* info) {
1671 exit = FaultExit::committed; 1673 exit = FaultExit::committed;
1672 } else if (answered) { 1674 } else if (answered) {
1673 exit = FaultExit::answered; 1675 exit = FaultExit::answered;
1674 } else if (result == PageCommit::committed_before && !escalated) { 1676 } else if ((result == PageCommit::committed_before && !escalated) ||
1677 (title_page && access == 0 && result == PageCommit::not_ours && !from_title)) {
1675 exit = FaultExit::passed_guarded; // a guard's (the D3D12 layer's), routine: not noted 1678 exit = FaultExit::passed_guarded; // a guard's (the D3D12 layer's), routine: not noted
1676 } else if (title_page || reserved_write) { 1679 } else if (title_page || reserved_write) {
1677 note_fault(kRefused, accessed, access, result, where, seen); 1680 note_fault(kRefused, accessed, access, result, where, seen);
@@ -1970,6 +1973,7 @@ BOOL WINAPI XMemMapPhysicalPagesScatter(void* const* addresses, uint32_t page_co
1970 return scatter_refused(ScatterFailure::unaligned, address, ERROR_INVALID_PARAMETER); 1973 return scatter_refused(ScatterFailure::unaligned, address, ERROR_INVALID_PARAMETER);
1971 } 1974 }
1972 const uint64_t page = page_array ? page_array[i] : 0; 1975 const uint64_t page = page_array ? page_array[i] : 0;
1976 const UnmapCause cause(page ? "XMemMapPhysicalPagesScatter (remap)" : "XMemMapPhysicalPagesScatter (unmap)");
1973 if (page == 0) { 1977 if (page == 0) {
1974 if (!unmap_page(address)) return scatter_refused(ScatterFailure::unmap, address, GetLastError()); 1978 if (!unmap_page(address)) return scatter_refused(ScatterFailure::unmap, address, GetLastError());
1975 continue; 1979 continue;
@@ -1992,6 +1996,34 @@ BOOL WINAPI XMemMapPhysicalPagesScatter(void* const* addresses, uint32_t page_co
1992// calls with the same page make them. Every source page is looked up before any destination page changes, so a source 1996// calls with the same page make them. Every source page is looked up before any destination page changes, so a source
1993// range that overlaps the destination maps what was there before the call. A destination in a GPU-only range is mapped 1997// range that overlaps the destination maps what was there before the call. A destination in a GPU-only range is mapped
1994// at its paired CPU range too (title_gpu_views), and a source page missing at a GPU-only address is looked up there. 1998// at its paired CPU range too (title_gpu_views), and a source page missing at a GPU-only address is looked up there.
1999// A page of that CPU range the title mapped itself is the title's (title_mapped_twin): the copy leaves it as it is.
2000
2001// With g_phys_mutex held. True when the paired CPU page at `address` holds a mapping of the title's own: its
2002// XMemMapPhysicalPages or XMemMapPhysicalPagesScatter call, or a slot-31 copy onto that address. The console's
2003// CopyPageMappingsBatchX changes only the GPU-only range's page table, so such a page keeps what the title put
2004// there; only a page the copy mirrored there itself (MapOwner::mirror), a zero plant, or a page with no mapping
2005// follows the GPU-only range. Each page kept is counted, and the first ones logged.
2006bool title_mapped_twin(uintptr_t address, uintptr_t gpu, bool unmap) {
2007 MapOwner owner;
2008 {
2009 const FaultLockShared faults;
2010 uintptr_t base = 0;
2011 const View* const view = covering_view(address, base);
2012 if (!view || view->zero || view->owner == MapOwner::mirror) return false;
2013 owner = view->owner;
2014 }
2015 static std::atomic<uint64_t> kept{0};
2016 const uint64_t n = kept.fetch_add(1, std::memory_order_relaxed) + 1;
2017 if (n <= 8 || (n & (n - 1)) == 0)
2018 std::fprintf(stderr,
2019 "[rt] xmem: slot-31 %s at 0x%llx left the title's %s mapping at its paired CPU page 0x%llx "
2020 "(%llu such pages so far)\n",
2021 unmap ? "unmap" : "copy", static_cast<unsigned long long>(gpu),
2022 owner == MapOwner::scatter ? "scatter" : owner == MapOwner::slot31 ? "slot-31" : "physical",
2023 static_cast<unsigned long long>(address), static_cast<unsigned long long>(n));
2024 return true;
2025}
2026
1995bool copy_page_mappings(void* destination, const void* source, uint64_t pages, bool repeat_first) { 2027bool copy_page_mappings(void* destination, const void* source, uint64_t pages, bool repeat_first) {
1996 const uintptr_t to = reinterpret_cast<uintptr_t>(destination); 2028 const uintptr_t to = reinterpret_cast<uintptr_t>(destination);
1997 const uintptr_t from = reinterpret_cast<uintptr_t>(source); 2029 const uintptr_t from = reinterpret_cast<uintptr_t>(source);
@@ -2012,8 +2044,14 @@ bool copy_page_mappings(void* destination, const void* source, uint64_t pages, b
2012 const Window* const cpu_window = cpu_to != to ? find_window(cpu_to, pages * kPhysicalPageSize) : nullptr; 2044 const Window* const cpu_window = cpu_to != to ? find_window(cpu_to, pages * kPhysicalPageSize) : nullptr;
2013 if (!source) { 2045 if (!source) {
2014 for (uint64_t i = 0; i < pages; ++i) { 2046 for (uint64_t i = 0; i < pages; ++i) {
2015 if (!unmap_page(to + i * kPhysicalPageSize)) return false; 2047 const uintptr_t gpu = to + i * kPhysicalPageSize, cpu = cpu_to + i * kPhysicalPageSize;
2016 if (cpu_window && !unmap_page(cpu_to + i * kPhysicalPageSize)) return false; 2048 {
2049 const UnmapCause cause("CopyPageMappingsBatchX (unmap)");
2050 if (!unmap_page(gpu)) return false;
2051 }
2052 if (!cpu_window || title_mapped_twin(cpu, gpu, true)) continue;
2053 const UnmapCause cause("CopyPageMappingsBatchX (unmap paired CPU page)");
2054 if (!unmap_page(cpu)) return false;
2017 } 2055 }
2018 return true; 2056 return true;
2019 } 2057 }
@@ -2036,8 +2074,11 @@ bool copy_page_mappings(void* destination, const void* source, uint64_t pages, b
2036 const DWORD cpu_protect = cpu_window ? view_protect(*cpu_window) : 0; 2074 const DWORD cpu_protect = cpu_window ? view_protect(*cpu_window) : 0;
2037 for (uint64_t i = 0; i < pages; ++i) { 2075 for (uint64_t i = 0; i < pages; ++i) {
2038 const uint64_t page = found[static_cast<size_t>(i)]; 2076 const uint64_t page = found[static_cast<size_t>(i)];
2039 if (!map_page(to + i * kPhysicalPageSize, page, protect, MapOwner::slot31)) return false; 2077 const uintptr_t gpu = to + i * kPhysicalPageSize, cpu = cpu_to + i * kPhysicalPageSize;
2040 if (cpu_window && !map_page(cpu_to + i * kPhysicalPageSize, page, cpu_protect, MapOwner::mirror)) return false; 2078 const UnmapCause cause(page ? "CopyPageMappingsBatchX (remap)" : "CopyPageMappingsBatchX (hole)");
2079 if (!map_page(gpu, page, protect, MapOwner::slot31)) return false;
2080 if (cpu_window && !title_mapped_twin(cpu, gpu, false) && !map_page(cpu, page, cpu_protect, MapOwner::mirror))
2081 return false;
2041 } 2082 }
2042 return true; 2083 return true;
2043} 2084}
diff --git a/runtime/shims/xmem.h b/runtime/shims/xmem.h
index 96fb89e7e..6e0017f2b 100644
--- a/runtime/shims/xmem.h
+++ b/runtime/shims/xmem.h
@@ -55,7 +55,7 @@ enum class FaultExit : int {
55 answered, // a mapped page committed, or found committed and allowed (another thread's map or commit) 55 answered, // a mapped page committed, or found committed and allowed (another thread's map or commit)
56 planted, // a window page the title never mapped, backed by a zero page 56 planted, // a window page the title never mapped, backed by a zero page
57 committed, // a section page in the title's reservation with no view of xmem's, committed 57 committed, // a section page in the title's reservation with no view of xmem's, committed
58 passed_guarded, // a committed page of xmem's views whose protection refuses the access: its guard's to answer 58 passed_guarded, // a committed page whose protection refuses the access, or a host guarded read of an unmapped page
59 passed_foreign, // memory that is not the title's reservation and not only reserved: someone else's fault 59 passed_foreign, // memory that is not the title's reservation and not only reserved: someone else's fault
60 left_to_title, // the title's reservation, or a write into memory that is only reserved: noted (FaultNote) 60 left_to_title, // the title's reservation, or a write into memory that is only reserved: noted (FaultNote)
61 count 61 count
diff --git a/runtime/src/address_guard.h b/runtime/src/address_guard.h
new file mode 100644
index 000000000..dab43d40a
--- /dev/null
+++ b/runtime/src/address_guard.h
@@ -0,0 +1,163 @@
1// The address guard's page table (docs/d3d12_vulkan.md, "Address guard"): what the runtime backs around heap_base,
2// for shaders translated with `tools/rdna2spirv.py --address-guard` (LEONIDA_ADDRESS_GUARD=1). Header-only, no
3// Vulkan: the device writes the words this computes into a mapped buffer. tools/address_guard.py is the Python
4// reference of the same format and of the check a guarded access makes.
5//
6// Layout. A header at arena offset kGuardHeader (64 bytes, AddressGuardHeader), then two sinks: refused loads read
7// kGuardZero, refused stores and atomics write kGuardDump, each at the access's offset within its 4 KiB page. The
8// page table is its own buffer; the header holds its address minus heap_base. Table words: kGuardLevel1 level-1
9// words indexed by bits 47..32 of the 48-bit heap offset (one per 4 GiB chunk), naming the chunk's level-2 block;
10// then the blocks, kGuardBlockWords words each, one bit per 4 KiB page (bits 31..12). Block 0 is empty (nothing
11// backed), block 1 full (everything passes: a chunk the table has no room for), blocks 2.. are allocated.
12#pragma once
13
14#include <algorithm>
15#include <cstdint>
16#include <cstring>
17#include <utility>
18#include <vector>
19
20namespace leonida::address_guard {
21
22// Shared with tools/rdna2spirv.py (GUARD_*) and tools/address_guard.py; tests/semantic/test_address_guard.py reads
23// these lines.
24constexpr std::uint64_t kGuardHeader = 0x70000;
25constexpr std::uint64_t kGuardZero = 0x71000;
26constexpr std::uint64_t kGuardDump = 0x78000;
27constexpr std::uint64_t kGuardEnd = 0x80000;
28constexpr std::uint32_t kGuardLevel1 = 1u << 16;
29constexpr std::uint32_t kGuardBlockWords = 1u << 15;
30constexpr char kGuardMagicText[] = "LGUARD01";
31constexpr std::uint64_t kMask48 = (1ull << 48) - 1;
32constexpr std::uint32_t kEmptyBlock = 0, kFullBlock = 1, kFirstBlock = 2;
33
34constexpr std::uint64_t magic() {
35 std::uint64_t v = 0;
36 for (int i = 7; i >= 0; --i) v = v << 8 | std::uint8_t(kGuardMagicText[i]);
37 return v;
38}
39
40struct AddressGuardHeader {
41 std::uint64_t magic; // magic(): the shaders check only when it is there
42 std::uint64_t limit; // the arena's size: an access below it passes without a lookup
43 std::uint64_t table; // the page table's device address minus heap_base (mod 2^64)
44 std::uint32_t refused; // the shaders add 1 per refused access
45 std::uint32_t last_module; // the last refusing module's id: FNV-1a of its file stem (shaders write it; diagnostics)
46 std::uint64_t last_refused; // the last refused access's heap offset (written by the shaders, not atomically)
47 std::uint8_t pad[24];
48};
49static_assert(sizeof(AddressGuardHeader) == 64);
50static_assert(kGuardHeader + sizeof(AddressGuardHeader) <= kGuardZero && kGuardZero < kGuardDump &&
51 kGuardDump < kGuardEnd);
52
53// The table's contents and the words that changed. Blocks are given to chunks for good: a chunk that loses its last
54// backing keeps its (now empty) block, so a submission still in flight never reads a block that came to mean
55// another chunk. When the blocks run out, a new chunk gets the full block (logged by the caller through
56// overflowed()): its accesses then pass unchecked, as without the guard.
57class AddressGuardTable {
58public:
59 explicit AddressGuardTable(std::uint32_t blocks = 62) : blocks_(blocks) {
60 words_.assign(word_count(), 0);
61 std::fill_n(words_.begin() + kGuardLevel1 + std::size_t(kFullBlock) * kGuardBlockWords, kGuardBlockWords,
62 0xFFFFFFFFu);
63 }
64
65 std::size_t word_count() const { return kGuardLevel1 + std::size_t(kFirstBlock + blocks_) * kGuardBlockWords; }
66 std::size_t bytes() const { return word_count() * sizeof(std::uint32_t); }
67 // The whole table, for the first upload.
68 const std::vector<std::uint32_t>& words() const { return words_; }
69 std::uint32_t blocks_used() const { return used_; }
70 std::uint32_t overflowed() const { return overflowed_; }
71
72 // Make the table say exactly `spans` (heap offset [start, end), 48-bit; a span may wrap through 2^48 for a
73 // negative offset). A page any byte of a span touches is backed: the GPU maps memory in whole pages. Each word
74 // that changes is passed to `write(index, value)`, level-2 words before level-1 ones, so a reader that sees a
75 // chunk's new block also sees its bits. Returns the number of words written.
76 template <class Write>
77 std::size_t assign(const std::vector<std::pair<std::uint64_t, std::uint64_t>>& spans, Write&& write) {
78 next_.assign(std::size_t(used_) * kGuardBlockWords, 0);
79 std::vector<std::uint32_t> level1(words_.begin(), words_.begin() + kGuardLevel1);
80 for (const auto& [start, end] : spans) {
81 if (end == start) continue;
82 const std::uint64_t first = (start & kMask48) >> 12;
83 const std::uint64_t last = ((end - 1) & kMask48) >> 12;
84 if (first <= last) {
85 mark(level1, first, last);
86 } else { // wraps through 2^48: two runs
87 mark(level1, first, (kMask48 >> 12));
88 mark(level1, 0, last);
89 }
90 }
91 std::size_t written = 0;
92 const std::size_t base = kGuardLevel1 + std::size_t(kFirstBlock) * kGuardBlockWords;
93 for (std::size_t i = 0; i < next_.size(); ++i) {
94 if (words_[base + i] == next_[i]) continue;
95 words_[base + i] = next_[i];
96 write(base + i, next_[i]);
97 ++written;
98 }
99 for (std::uint32_t i = 0; i < kGuardLevel1; ++i) {
100 if (words_[i] == level1[i]) continue;
101 words_[i] = level1[i];
102 write(std::size_t(i), level1[i]);
103 ++written;
104 }
105 return written;
106 }
107
108 // The table's bit for the page of heap offset `offset`.
109 bool page_backed(std::uint64_t offset) const {
110 offset &= kMask48;
111 const std::uint32_t block = words_[(offset >> 32) & (kGuardLevel1 - 1)];
112 const std::uint64_t page = (offset >> 12) & 0xFFFFF;
113 return (words_[kGuardLevel1 + std::size_t(block) * kGuardBlockWords + (page >> 5)] >> (page & 31)) & 1;
114 }
115
116 // What a guarded access of `extent` bytes at heap offset `offset` does (the shaders' %guard_fn): passes when
117 // its first and last byte are below `limit` or on backed pages. `offset` is sign-extended from 48 bits.
118 bool passes(std::uint64_t offset, std::uint64_t extent, std::uint64_t limit) const {
119 if (offset & (1ull << 47)) offset |= ~kMask48;
120 else offset &= kMask48;
121 const std::uint64_t end = offset + extent - 1;
122 if (offset < limit && end < limit) return true;
123 return page_backed(offset) && page_backed(end);
124 }
125
126private:
127 // Set the bits of pages [first, last] (48-bit page numbers), giving their chunks blocks as needed.
128 void mark(std::vector<std::uint32_t>& level1, std::uint64_t first, std::uint64_t last) {
129 for (std::uint64_t chunk = first >> 20; chunk <= last >> 20; ++chunk) {
130 std::uint32_t& block = level1[chunk];
131 if (block == kEmptyBlock) {
132 if (used_ < blocks_) {
133 block = kFirstBlock + used_++;
134 next_.resize(std::size_t(used_) * kGuardBlockWords, 0);
135 } else {
136 block = kFullBlock;
137 ++overflowed_;
138 }
139 }
140 if (block < kFirstBlock) continue;
141 std::uint32_t* bits = next_.data() + std::size_t(block - kFirstBlock) * kGuardBlockWords;
142 const std::uint64_t lo = std::max(first, chunk << 20) & 0xFFFFF;
143 const std::uint64_t hi = std::min(last, (chunk << 20) | 0xFFFFF) & 0xFFFFF;
144 for (std::uint64_t page = lo; page <= hi;) {
145 if (!(page & 31) && page + 31 <= hi) {
146 bits[page >> 5] = 0xFFFFFFFFu;
147 page += 32;
148 } else {
149 bits[page >> 5] |= 1u << (page & 31);
150 ++page;
151 }
152 }
153 }
154 }
155
156 std::uint32_t blocks_;
157 std::uint32_t used_ = 0;
158 std::uint32_t overflowed_ = 0;
159 std::vector<std::uint32_t> words_; // what the GPU's copy holds
160 std::vector<std::uint32_t> next_; // the allocated blocks being built by assign()
161};
162
163} // namespace leonida::address_guard
diff --git a/runtime/src/conservative_raster.h b/runtime/src/conservative_raster.h
index 469066d17..82d6dfaca 100644
--- a/runtime/src/conservative_raster.h
+++ b/runtime/src/conservative_raster.h
@@ -46,4 +46,21 @@ inline InnerCoverageRequirements inner_coverage_requirements(std::span<const std
46 result.valid = true; 46 result.valid = true;
47 return result; 47 return result;
48} 48}
49
50// True when the mesh shader module outputs triangles (OutputTrianglesEXT, 5298). A module with lines (5269), points (27)
51// or no output mode does not. Each mesh entry point of a valid module has exactly one of the three.
52inline bool mesh_outputs_triangles(std::span<const std::uint32_t> words) {
53 if (words.size() < 5 || words[0] != 0x07230203) return false;
54 bool triangles = false;
55 for (std::size_t i = 5; i < words.size();) {
56 const auto count = words[i] >> 16, op = words[i] & 0xffff;
57 if (!count || count > words.size() - i) return false;
58 if (op == 16 && count >= 3) { // OpExecutionMode
59 if (words[i + 2] == 5298) triangles = true;
60 else if (words[i + 2] == 5269 || words[i + 2] == 27) return false;
61 }
62 i += count;
63 }
64 return triangles;
65}
49} // namespace leonida::conservative_raster 66} // namespace leonida::conservative_raster
diff --git a/runtime/src/console_heap_slot_records.h b/runtime/src/console_heap_slot_records.h
new file mode 100644
index 000000000..4ab3c3b9d
--- /dev/null
+++ b/runtime/src/console_heap_slot_records.h
@@ -0,0 +1,227 @@
1#pragma once
2// What each buffer V# of a console resource heap's GPU copy resolved to (docs/d3d12_vulkan.md section 3.4), kept in
3// host RAM so that a change of the address space re-fixes exactly the slots it touches.
4//
5// A slot of the copy is the title's descriptor with its V# bases rewritten (DeviceState::fix_console_slot). What a
6// base became depends on things that change after the slot was written: a buffer or window released, an alias range
7// removed, a geometry copy retired, or (for a base nothing backed yet) a buffer, alias or title memory added. Without
8// a record of which slot resolved into which range, a change could only be applied by walking every live slot. Here
9// each V# half (the buffer V# and the UAV counter V# of a slot) records:
10// - base and span: the bytes the title's V# names, [base, base + span) (the base is the V#'s 48 bits);
11// - target: the device address its GPU copy names, [target, target + span); for a half that resolved to nothing,
12// the device address of a copy that was found but refused (not backed yet), or 0;
13// - state: resolved, waiting (written with no base and no records until something backs it) or none.
14// Two indexes find the halves a change touches: by base ("source") and by target. Each holds a half once, under the
15// power-of-two class of its span and the granule of its start (a granule is at least 64 KiB and at least the class),
16// so a range [lo, hi) is answered by visiting, per class in use, the granules from lo - 2^class to hi: the cost is the
17// halves near the range, never the heap. An entry is checked against the record when visited (a half that moved
18// leaves a stale entry behind; a bucket drops its stale entries whenever it has doubled since it was last cleaned).
19// Portable, standard library only: console_heap_slot_records_test exercises it without a GPU.
20#include <algorithm>
21#include <array>
22#include <bit>
23#include <cstddef>
24#include <cstdint>
25#include <cstdlib>
26#include <memory>
27#include <unordered_map>
28#include <vector>
29
30namespace leonida {
31
32// One change since the last submission, as a range; hi is exclusive and greater than lo.
33struct SlotChange {
34 enum Kind : std::uint8_t {
35 target_gone, // device addresses: a backing released, a copy's block destroyed, an alias range's copy gone
36 source_gone, // V# bases: an alias range removed or replaced, or a copy that answered for it gone
37 target_added, // device addresses: a backing added (a refused alias target may be backed now)
38 source_added, // V# bases: an alias range or title memory added, or a backing added at those arena offsets
39 };
40 Kind kind;
41 std::uint64_t lo, hi;
42};
43
44class ConsoleHeapSlotRecords {
45public:
46 enum State : std::uint8_t { none = 0, resolved = 1, waiting = 2 };
47
48 void reset(std::size_t slots) {
49 slots_ = slots;
50 // calloc: the pages of slots never written are never touched (the retail heap uses a tenth of its slots).
51 halves_.reset(slots ? static_cast<Half*>(std::calloc(slots * 2, sizeof(Half))) : nullptr);
52 if (slots && !halves_) slots_ = 0;
53 for (auto& index : indexes_) index = Index{};
54 recorded_ = waiting_ = 0;
55 looked_at_ = 0;
56 }
57 std::size_t slots() const { return slots_; }
58 std::size_t recorded() const { return recorded_; } // halves in state resolved or waiting
59 std::size_t waiting_count() const { return waiting_; } // halves in state waiting
60 std::uint64_t looked_at() const { return looked_at_; } // index entries visited by touched(), all calls
61
62 // Half `half` (0: the buffer V#, 1: the UAV counter V#) of `slot` now names [base, base + span) and resolved as
63 // `state` says, its copy at `target` (see above). span 0 counts as 1.
64 void set(std::size_t slot, unsigned half, State state, std::uint64_t base, std::uint64_t span,
65 std::uint64_t target) {
66 if (slot >= slots_ || half > 1) return;
67 if (state == none) base = span = target = 0;
68 if (!span) span = 1;
69 if (span > kMaxSpan) span = kMaxSpan;
70 const std::size_t key = slot * 2 + half;
71 Half& h = halves_[key];
72 const Half old = h;
73 count(old.state(), -1);
74 h.base = base;
75 h.target = target;
76 h.span_state = span | (std::uint64_t(state) << 56);
77 count(state, +1);
78 if (state == none) return; // entries left behind are stale now
79 const auto add = [&](int which, std::uint64_t start, std::uint64_t old_start) {
80 const unsigned c = span_class(span);
81 const std::uint64_t granule = start >> granule_shift(c);
82 // Unchanged key: the entry already there stands for it.
83 if (old.state() != none && (which == kSource || old.target) && span_class(old.span()) == c &&
84 (old_start >> granule_shift(c)) == granule)
85 return;
86 push(which, c, granule, std::uint32_t(key));
87 };
88 add(kSource, base, old.base);
89 if (target) add(kTarget, target, old.target);
90 }
91
92 void clear(std::size_t slot) {
93 set(slot, 0, none, 0, 0, 0);
94 set(slot, 1, none, 0, 0, 0);
95 }
96 void clear_range(std::size_t first, std::size_t end) {
97 end = (std::min)(end, slots_);
98 for (std::size_t slot = first; slot < end; ++slot)
99 for (unsigned half = 0; half < 2; ++half)
100 if (halves_[slot * 2 + half].state() != none) set(slot, half, none, 0, 0, 0);
101 }
102
103 State state(std::size_t slot, unsigned half) const {
104 return slot < slots_ && half < 2 ? halves_[slot * 2 + half].state() : none;
105 }
106 std::uint64_t target(std::size_t slot, unsigned half) const {
107 return slot < slots_ && half < 2 ? halves_[slot * 2 + half].target : 0;
108 }
109
110 // The slots `changes` touch, each once, ascending, appended to `out` (cleared first):
111 // target_gone: halves whose [target, target + span) overlaps the range (whatever their state);
112 // source_gone: halves whose [base, base + span) overlaps it;
113 // target_added, source_added: the same, waiting halves only (a resolved one stays valid until something goes).
114 void touched(const SlotChange* changes, std::size_t count, std::vector<std::uint32_t>& out) {
115 out.clear();
116 for (std::size_t i = 0; i < count; ++i) {
117 const SlotChange& change = changes[i];
118 if (change.hi <= change.lo) continue;
119 const bool target = change.kind == SlotChange::target_gone || change.kind == SlotChange::target_added;
120 const bool waiting_only = change.kind == SlotChange::target_added || change.kind == SlotChange::source_added;
121 find(target ? kTarget : kSource, change.lo, change.hi, waiting_only, out);
122 }
123 std::sort(out.begin(), out.end());
124 out.erase(std::unique(out.begin(), out.end()), out.end());
125 }
126
127private:
128 static constexpr int kSource = 0, kTarget = 1;
129 static constexpr std::uint64_t kMaxSpan = (std::uint64_t(1) << 56) - 1;
130 static constexpr unsigned kMinGranule = 16; // 64 KiB
131 static constexpr unsigned kClasses = 57;
132
133 struct Half {
134 std::uint64_t base, target, span_state;
135 std::uint64_t span() const { return span_state & kMaxSpan; }
136 State state() const { return State(span_state >> 56); }
137 };
138 struct Free {
139 void operator()(Half* p) const { std::free(p); }
140 };
141 struct Bucket {
142 std::vector<std::uint32_t> keys;
143 std::size_t clean = 0; // its size when it was last cleaned
144 };
145 struct Index {
146 std::array<std::unordered_map<std::uint64_t, Bucket>, kClasses> classes;
147 std::uint64_t used = 0; // a bit per class that ever held an entry
148 };
149
150 // The smallest c with span <= 2^c.
151 static unsigned span_class(std::uint64_t span) {
152 return span <= 1 ? 0u : unsigned(64 - std::countl_zero(span - 1));
153 }
154 static unsigned granule_shift(unsigned c) { return c < kMinGranule ? kMinGranule : c; }
155
156 void count(State state, int delta) {
157 if (state != none) recorded_ += std::size_t(std::ptrdiff_t(delta));
158 if (state == waiting) waiting_ += std::size_t(std::ptrdiff_t(delta));
159 }
160
161 // Whether index `which` still holds `key` under (c, granule).
162 bool current(int which, std::uint32_t key, unsigned c, std::uint64_t granule) const {
163 const Half& h = halves_[key];
164 if (h.state() == none || span_class(h.span()) != c) return false;
165 if (which == kTarget && !h.target) return false;
166 return ((which == kSource ? h.base : h.target) >> granule_shift(c)) == granule;
167 }
168
169 void push(int which, unsigned c, std::uint64_t granule, std::uint32_t key) {
170 Index& index = indexes_[which];
171 index.used |= std::uint64_t(1) << c;
172 Bucket& bucket = index.classes[c][granule];
173 bucket.keys.push_back(key);
174 if (bucket.keys.size() < 32 || bucket.keys.size() < 2 * bucket.clean) return;
175 auto& keys = bucket.keys;
176 keys.erase(std::remove_if(keys.begin(), keys.end(),
177 [&](std::uint32_t k) { return !current(which, k, c, granule); }),
178 keys.end());
179 std::sort(keys.begin(), keys.end());
180 keys.erase(std::unique(keys.begin(), keys.end()), keys.end());
181 bucket.clean = keys.size();
182 }
183
184 void find(int which, std::uint64_t lo, std::uint64_t hi, bool waiting_only, std::vector<std::uint32_t>& out) {
185 Index& index = indexes_[which];
186 for (std::uint64_t used = index.used; used; used &= used - 1) {
187 const unsigned c = unsigned(std::countr_zero(used));
188 auto& buckets = index.classes[c];
189 if (buckets.empty()) continue;
190 const unsigned shift = granule_shift(c);
191 // A half of this class overlaps [lo, hi) only if it starts in (lo - 2^c, hi).
192 const std::uint64_t reach = std::uint64_t(1) << c;
193 const std::uint64_t first = (lo >= reach ? lo - reach + 1 : 0) >> shift;
194 const std::uint64_t last = (hi - 1) >> shift;
195 const auto visit = [&](std::uint64_t granule, const Bucket& bucket) {
196 for (const std::uint32_t key : bucket.keys) {
197 ++looked_at_;
198 if (!current(which, key, c, granule)) continue;
199 const Half& h = halves_[key];
200 if (waiting_only && h.state() != waiting) continue;
201 const std::uint64_t start = which == kSource ? h.base : h.target;
202 const std::uint64_t span = h.span();
203 const std::uint64_t end = start + span < start ? UINT64_MAX : start + span;
204 if (start < hi && end > lo) out.push_back(key >> 1);
205 }
206 };
207 if (last - first >= buckets.size()) {
208 for (const auto& [granule, bucket] : buckets)
209 if (granule >= first && granule <= last) visit(granule, bucket);
210 } else {
211 for (std::uint64_t granule = first;; ++granule) {
212 const auto it = buckets.find(granule);
213 if (it != buckets.end()) visit(granule, it->second);
214 if (granule == last) break;
215 }
216 }
217 }
218 }
219
220 std::size_t slots_ = 0;
221 std::unique_ptr<Half[], Free> halves_;
222 std::array<Index, 2> indexes_;
223 std::size_t recorded_ = 0, waiting_ = 0;
224 std::uint64_t looked_at_ = 0;
225};
226
227} // namespace leonida
diff --git a/runtime/src/console_heap_vsharp_slots.h b/runtime/src/console_heap_vsharp_slots.h
deleted file mode 100644
index 0b0830053..000000000
--- a/runtime/src/console_heap_vsharp_slots.h
+++ /dev/null
@@ -1,115 +0,0 @@
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/depth24_fragment.h b/runtime/src/depth24_fragment.h
index d32f975b2..4c212ee5c 100644
--- a/runtime/src/depth24_fragment.h
+++ b/runtime/src/depth24_fragment.h
@@ -55,7 +55,8 @@ enum : std::uint32_t {
55 op_function = 54, op_function_end = 56, op_variable = 59, op_load = 61, op_store = 62, op_decorate = 71, 55 op_function = 54, op_function_end = 56, op_variable = 59, op_load = 61, op_store = 62, op_decorate = 71,
56 op_composite_extract = 81, op_convert_f_to_u = 109, op_convert_u_to_f = 112, op_bitcast = 124, op_i_add = 128, 56 op_composite_extract = 81, op_convert_f_to_u = 109, op_convert_u_to_f = 112, op_bitcast = 124, op_i_add = 128,
57 op_f_add = 129, op_i_sub = 130, op_f_mul = 133, op_select = 169, op_i_equal = 170, op_u_greater_than = 172, 57 op_f_add = 129, op_i_sub = 130, op_f_mul = 133, op_select = 169, op_i_equal = 170, op_u_greater_than = 172,
58 op_u_greater_than_equal = 174, op_shift_left_logical = 196, op_dpdx = 207, op_dpdy = 208, op_label = 248, 58 op_u_greater_than_equal = 174, op_shift_right_logical = 194, op_shift_left_logical = 196, op_dpdx = 207,
59 op_dpdy = 208, op_label = 248,
59 op_return = 253, op_no_line = 317, op_execution_mode_id = 331, 60 op_return = 253, op_no_line = 317, op_execution_mode_id = 331,
60}; 61};
61enum : std::uint32_t { storage_input = 1, storage_output = 3 }; 62enum : std::uint32_t { storage_input = 1, storage_output = 3 };
@@ -182,12 +183,18 @@ public:
182 constants_.push_back({t, value, id}); 183 constants_.push_back({t, value, id});
183 return id; 184 return id;
184 } 185 }
186 bool is_depth16() const { return levels_ == 65535.0f; }
187
185 // Declares what quantise() uses, so it can run inside apply() (at returns) without adding globals. 188 // Declares what quantise() uses, so it can run inside apply() (at returns) without adding globals.
186 void prime_quantise() { 189 void prime_quantise() {
187 t_bool(); 190 t_bool();
188 glsl(); 191 glsl();
189 for (float f : {levels_, 0.0f}) f32(f); 192 for (float f : {levels_, 0.0f}) f32(f);
190 for (std::uint32_t u : {0x3f800000u, 0xffffffu, 0x7f800000u, 0u, 23u, 1u, 80u}) u32(u); 193 if (is_depth16()) {
194 for (std::uint32_t u : {0x3f800000u, 0xffffu, 0x7f800000u, 0u, 15u, 8u, 128u, 88u, 23u}) u32(u);
195 } else {
196 for (std::uint32_t u : {0x3f800000u, 0xffffffu, 0x7f800000u, 0u, 23u, 1u, 80u}) u32(u);
197 }
191 } 198 }
192 std::uint32_t f32(float f) { return constant(t_float(), bits(f)); } 199 std::uint32_t f32(float f) { return constant(t_float(), bits(f)); }
193 std::uint32_t u32(std::uint32_t u) { return constant(t_uint(), u); } 200 std::uint32_t u32(std::uint32_t u) { return constant(t_uint(), u); }
@@ -245,9 +252,11 @@ public:
245 return id; 252 return id;
246 } 253 }
247 254
248 // depth24_to_float(depth24_from_bits(z)) of depth24_convert.comp, branch-free. 255 // Quantise z to D24 (levels_ == 16777215.0f) or D16 (levels_ == 65535.0f) and reconstruct the nearest float
256 // to d / levels_ without floating-point division (SPIR-V OpFDiv only guarantees 2.5 ULP), branch-free.
249 std::uint32_t quantise(std::vector<Inst>& code, std::uint32_t z) { 257 std::uint32_t quantise(std::vector<Inst>& code, std::uint32_t z) {
250 const std::uint32_t tf = t_float(), tu = t_uint(), tb = t_bool(); 258 const std::uint32_t tf = t_float(), tu = t_uint(), tb = t_bool();
259 const std::uint32_t max_code = is_depth16() ? 0xffffu : 0xffffffu;
251 const std::uint32_t b = emit(code, op_bitcast, tu, {z}); 260 const std::uint32_t b = emit(code, op_bitcast, tu, {z});
252 const std::uint32_t product = emit(code, op_f_mul, tf, {z, f32(levels_)}); 261 const std::uint32_t product = emit(code, op_f_mul, tf, {z, f32(levels_)});
253 const std::uint32_t rounded = ext(code, tf, glsl_round_even, {product}); 262 const std::uint32_t rounded = ext(code, tf, glsl_round_even, {product});
@@ -256,17 +265,36 @@ public:
256 f32(levels_)}); 265 f32(levels_)});
257 const std::uint32_t code_mid = emit(code, op_convert_f_to_u, tu, {safe}); 266 const std::uint32_t code_mid = emit(code, op_convert_f_to_u, tu, {safe});
258 const std::uint32_t at_least_one = emit(code, op_u_greater_than_equal, tb, {b, u32(0x3f800000u)}); 267 const std::uint32_t at_least_one = emit(code, op_u_greater_than_equal, tb, {b, u32(0x3f800000u)});
259 const std::uint32_t code_hi = emit(code, op_select, tu, {at_least_one, u32(0xffffffu), code_mid}); 268 const std::uint32_t code_hi = emit(code, op_select, tu, {at_least_one, u32(max_code), code_mid});
260 const std::uint32_t negative_or_nan = emit(code, op_u_greater_than, tb, {b, u32(0x7f800000u)}); 269 const std::uint32_t negative_or_nan = emit(code, op_u_greater_than, tb, {b, u32(0x7f800000u)});
261 const std::uint32_t d = emit(code, op_select, tu, {negative_or_nan, u32(0), code_hi}); 270 const std::uint32_t d = emit(code, op_select, tu, {negative_or_nan, u32(0), code_hi});
262 // float(m + 1) * 2^(e - 47) with e = findMSB(d) and m = d << (23 - e); d == 0 gives 0.
263 const std::uint32_t e = ext(code, tu, glsl_find_umsb, {d}); 271 const std::uint32_t e = ext(code, tu, glsl_find_umsb, {d});
264 const std::uint32_t m = emit(code, op_shift_left_logical, tu, {d, emit(code, op_i_sub, tu, {u32(23), e})}); 272 std::uint32_t value = 0;
265 const std::uint32_t mf = emit(code, op_convert_u_to_f, tf, {emit(code, op_i_add, tu, {m, u32(1)})}); 273 if (is_depth16()) {
266 const std::uint32_t exponent = emit(code, op_shift_left_logical, tu, {emit(code, op_i_add, tu, {e, u32(80)}), 274 // Nearest float to d / (2^16 - 1) for d in 1..65535:
267 u32(23)}); 275 // n = d << (15 - e) puts d's MSB at bit 15; repeating n in binary gives (n << 8) | (n >> 8) as the
268 const std::uint32_t scale = emit(code, op_bitcast, tf, {exponent}); 276 // top 24 bits, and the tail below bit 8 is strictly > 0.5 iff bit 7 of n is set (never a tie), so
269 const std::uint32_t value = emit(code, op_f_mul, tf, {mf, scale}); 277 // m = (n << 8) + ((n + 128) >> 8) is the exact rounded 24-bit mantissa (0x1000000 for d == 65535).
278 // Multiplying float(m) by 2^(e - 39) (biased exponent e + 88) matches float(double(d) / 65535.0)
279 // for every 16-bit code, and for d == 0 (e == 0xffffffff) shifts stay < 32 and zero selects 0.0f.
280 const std::uint32_t n = emit(code, op_shift_left_logical, tu, {d, emit(code, op_i_sub, tu, {u32(15), e})});
281 const std::uint32_t n_hi = emit(code, op_shift_left_logical, tu, {n, u32(8)});
282 const std::uint32_t n_lo =
283 emit(code, op_shift_right_logical, tu, {emit(code, op_i_add, tu, {n, u32(128)}), u32(8)});
284 const std::uint32_t mf = emit(code, op_convert_u_to_f, tf, {emit(code, op_i_add, tu, {n_hi, n_lo})});
285 const std::uint32_t exponent =
286 emit(code, op_shift_left_logical, tu, {emit(code, op_i_add, tu, {e, u32(88)}), u32(23)});
287 const std::uint32_t scale = emit(code, op_bitcast, tf, {exponent});
288 value = emit(code, op_f_mul, tf, {mf, scale});
289 } else {
290 // float(m + 1) * 2^(e - 47) with e = findMSB(d) and m = d << (23 - e); d == 0 gives 0.
291 const std::uint32_t m = emit(code, op_shift_left_logical, tu, {d, emit(code, op_i_sub, tu, {u32(23), e})});
292 const std::uint32_t mf = emit(code, op_convert_u_to_f, tf, {emit(code, op_i_add, tu, {m, u32(1)})});
293 const std::uint32_t exponent = emit(code, op_shift_left_logical, tu, {emit(code, op_i_add, tu, {e, u32(80)}),
294 u32(23)});
295 const std::uint32_t scale = emit(code, op_bitcast, tf, {exponent});
296 value = emit(code, op_f_mul, tf, {mf, scale});
297 }
270 const std::uint32_t zero = emit(code, op_i_equal, tb, {d, u32(0)}); 298 const std::uint32_t zero = emit(code, op_i_equal, tb, {d, u32(0)});
271 return emit(code, op_select, tf, {zero, f32(0.0f), value}); 299 return emit(code, op_select, tf, {zero, f32(0.0f), value});
272 } 300 }
@@ -328,9 +356,9 @@ public:
328 } 356 }
329 357
330private: 358private:
331 float levels_;
332 Module& m_; 359 Module& m_;
333 std::uint32_t entry_; 360 std::uint32_t entry_;
361 float levels_;
334 std::vector<Inst> existing_; 362 std::vector<Inst> existing_;
335 std::vector<Inst> globals_, decorations_, modes_; 363 std::vector<Inst> globals_, decorations_, modes_;
336 Inst import_; 364 Inst import_;
@@ -346,6 +374,10 @@ private:
346inline std::vector<std::uint32_t> depth24_patch_fragment(const std::vector<std::uint32_t>& words, 374inline std::vector<std::uint32_t> depth24_patch_fragment(const std::vector<std::uint32_t>& words,
347 const Depth24Bias& bias, std::string& why) { 375 const Depth24Bias& bias, std::string& why) {
348 using namespace spirv24; 376 using namespace spirv24;
377 if (bias.levels != 16777215.0f && bias.levels != 65535.0f) {
378 why = "unsupported depth quantisation level count";
379 return {};
380 }
349 Module m; 381 Module m;
350 if (!m.parse(words, why)) return {}; 382 if (!m.parse(words, why)) return {};
351 std::uint32_t entry = 0; 383 std::uint32_t entry = 0;
diff --git a/runtime/src/descriptor_range_changes.h b/runtime/src/descriptor_range_changes.h
deleted file mode 100644
index 5a4d7717f..000000000
--- a/runtime/src/descriptor_range_changes.h
+++ /dev/null
@@ -1,46 +0,0 @@
1#pragma once
2#include <algorithm>
3#include <array>
4#include <cstdint>
5#include <vector>
6
7namespace leonida {
8// A separate cursor per console heap. The owning backing/alias registry locks record() and read().
9struct DescriptorRanges {
10 struct Range { uint64_t first, last; }; // inclusive, including UINT64_MAX
11 std::vector<Range> ranges;
12 void merge() {
13 std::sort(ranges.begin(), ranges.end(), [](auto a, auto b) { return a.first < b.first; });
14 size_t n = 0;
15 for (auto r : ranges) {
16 if (n && r.first <= ranges[n-1].last)
17 ranges[n-1].last = (std::max)(ranges[n-1].last, r.last);
18 else ranges[n++] = r;
19 }
20 ranges.resize(n);
21 }
22 bool overlaps(uint64_t base, uint64_t bytes) const {
23 if (!bytes) return false;
24 auto it = std::lower_bound(ranges.begin(), ranges.end(), base,
25 [](auto r, uint64_t v) { return r.last < v; });
26 return it != ranges.end() && (it->first <= base || it->first - base < bytes);
27 }
28};
29class DescriptorRangeChanges {
30 std::array<DescriptorRanges::Range, 4096> ring_{};
31 uint64_t serial_{};
32public:
33 void record(uint64_t start, uint64_t bytes) {
34 if (bytes) {
35 ring_[serial_++ % ring_.size()] = {start, start + (std::min)(UINT64_MAX-start, bytes-1)};
36 }
37 }
38 bool read(uint64_t& cursor, DescriptorRanges& out) const {
39 const auto previous = cursor;
40 cursor = serial_;
41 if (serial_ - previous > ring_.size()) return false;
42 for (auto i = previous; i != serial_; ++i) out.ranges.push_back(ring_[i % ring_.size()]);
43 return true;
44 }
45};
46}
diff --git a/runtime/src/dstorage_hold.h b/runtime/src/dstorage_hold.h
new file mode 100644
index 000000000..1695c1e7c
--- /dev/null
+++ b/runtime/src/dstorage_hold.h
@@ -0,0 +1,23 @@
1// Counters of the DirectStorage queues' rule "reads into physical pages wait for the title's Submit"
2// (shims/dstorage.cpp, docs/directstorage.md). Process-wide, so the log line and the test read the same numbers.
3#pragma once
4
5#include <atomic>
6#include <cstdint>
7
8namespace leonida::dstorage {
9
10struct HoldStats {
11 std::atomic<uint64_t> self_submits{0}; // a queue half full submitted itself
12 std::atomic<uint64_t> held_reads{0}; // reads into physical pages such a submit left for the title's Submit
13 std::atomic<uint64_t> full_releases{0}; // a full queue submitted its held entries (the title waits in an enqueue)
14 std::atomic<uint64_t> timed_releases{0}; // LEONIDA_DSTORAGE_HOLD_MS ran out before the title's Submit
15 std::atomic<uint64_t> page0_entries{0}; // destination page lists that named page 0 when their data was written
16};
17
18inline HoldStats& hold_stats() {
19 static HoldStats stats;
20 return stats;
21}
22
23} // namespace leonida::dstorage
diff --git a/runtime/src/heavy_pipeline_cache.h b/runtime/src/heavy_pipeline_cache.h
new file mode 100644
index 000000000..8cad10e66
--- /dev/null
+++ b/runtime/src/heavy_pipeline_cache.h
@@ -0,0 +1,94 @@
1// A pipeline cache that survives a crash, for the pipelines the offline corpus does not have (RT-HEAVY-PIPELINE-CACHE).
2//
3// The offline seed (pipeline_cache.bin, several GiB) covers what the `pipelines` build stage creates. A pipeline it
4// misses is compiled on the spot, and some of those take the driver seconds each. pipeline_cache.session.bin cannot
5// keep them across a crash: it is written at device teardown only, and a cache seeded from the corpus returns the
6// whole corpus, over its write limit, so it is not written at all.
7//
8// So a pipeline is first created against the corpus cache with VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED.
9// When the driver would have to compile, it is created again against a cache of its own, seeded from
10// pipeline_cache.heavy.bin. That cache holds only the corpus's misses, so it stays small. After a compile that took
11// at least LEONIDA_HEAVY_PIPELINE_CACHE_MS (default 500 ms), it is written back to disk on a thread of its own: a
12// staging file renamed over the old one, so a crash at any point leaves the last complete file.
13//
14// This header holds the pure decisions (the threshold and when to write). Vulkan and the file live in the device.
15#pragma once
16
17#include <cstdint>
18#include <cstdlib>
19
20namespace leonida::heavy_pipeline_cache {
21
22inline constexpr std::uint32_t default_threshold_ms = 500;
23
24struct Threshold {
25 std::uint32_t ms = default_threshold_ms; // 0: off
26 bool valid = true; // false: the text was not a number; ms stays the default
27};
28
29// LEONIDA_HEAVY_PIPELINE_CACHE_MS: a compile at least this long schedules a write; 0 turns the heavy cache off.
30inline Threshold parse_threshold(const char* text) {
31 if (!text || !*text) return {};
32 std::uint64_t value = 0;
33 for (const char* p = text; *p; ++p) {
34 if (*p < '0' || *p > '9') return {default_threshold_ms, false};
35 value = value * 10 + std::uint64_t(*p - '0');
36 if (value > 3'600'000) return {default_threshold_ms, false}; // an hour: past it the text is a mistake
37 }
38 return {std::uint32_t(value), true};
39}
40
41// When the writer thread writes. A heavy compile marks the cache dirty; the write waits `settle_ms` after the
42// newest one (heavy compiles come in bursts at a load, and each write copies the whole heavy cache) but never more
43// than `max_delay_ms` after the first unwritten one, so a long burst is still saved as it goes. A write that fails
44// keeps the cache dirty and is tried again `retry_ms` later, the delay doubling with each failure in a row up to
45// `max_retry_ms`, so a disk that stays full or a driver that keeps failing does not make the writer spin.
46class WriteSchedule {
47public:
48 static constexpr std::uint64_t settle_ms = 3000;
49 static constexpr std::uint64_t max_delay_ms = 20000;
50 static constexpr std::uint64_t retry_ms = 5000;
51 static constexpr std::uint64_t max_retry_ms = 120000;
52
53 void note_heavy(std::uint64_t now_ms) {
54 if (!dirty_) first_ = now_ms;
55 dirty_ = true;
56 last_ = now_ms;
57 ++generation_;
58 }
59 bool dirty() const { return dirty_; }
60 // The time to write at; only meaningful while dirty.
61 std::uint64_t due_ms() const {
62 const std::uint64_t settled = last_ + settle_ms, latest = first_ + max_delay_ms;
63 const std::uint64_t at = settled < latest ? settled : latest;
64 return at > retry_at_ ? at : retry_at_;
65 }
66 bool due(std::uint64_t now_ms) const { return dirty_ && now_ms >= due_ms(); }
67 // Taken when a write starts; the write covers every heavy compile noted up to then.
68 std::uint64_t generation() const { return generation_; }
69 // A write that started at `generation` and `started_ms` is done. A heavy compile noted after it started, even in
70 // the same millisecond tick, keeps the cache dirty for the next write, due as if it were first noted then.
71 void written(std::uint64_t generation, std::uint64_t started_ms) {
72 failures_ = 0;
73 retry_at_ = 0;
74 if (generation_ == generation) dirty_ = false;
75 else first_ = started_ms;
76 }
77 // A write that started at `started_ms` failed: the cache stays dirty and the next try waits out the backoff.
78 void failed(std::uint64_t started_ms) {
79 std::uint64_t delay = retry_ms;
80 for (std::uint32_t i = 0; i < failures_ && delay < max_retry_ms; ++i) delay *= 2;
81 if (delay > max_retry_ms) delay = max_retry_ms;
82 if (failures_ < 64) ++failures_;
83 retry_at_ = started_ms + delay;
84 }
85 std::uint32_t failures() const { return failures_; }
86
87private:
88 bool dirty_ = false;
89 std::uint64_t first_ = 0, last_ = 0, generation_ = 0;
90 std::uint32_t failures_ = 0; // failed writes in a row
91 std::uint64_t retry_at_ = 0; // no write before this time after a failure
92};
93
94} // namespace leonida::heavy_pipeline_cache
diff --git a/runtime/src/indirect_clamp.comp b/runtime/src/indirect_clamp.comp
index 3b99da59a..37af7431f 100644
--- a/runtime/src/indirect_clamp.comp
+++ b/runtime/src/indirect_clamp.comp
@@ -9,9 +9,19 @@
9// charging the list budget. The command list charges its work (vertices, indices, or groups * 64) against 2^27 units with 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. 10// an atomic CAS, so thousands of garbage records cannot run for seconds either.
11// 11//
12// A draw record of 2^23 vertices (or indices) an instance or more is a slot the title has not filled, not a draw: it
13// runs empty and charges nothing, so a few of them cannot use up the list budget and empty every real draw after them
14// (RT-INDIRECT-DRAW-UNFILLED-COUNT; a census in codec-d/cool_fox's fork of VIctory found 90 records of 2^24 in one
15// list, its docs/findings.md and crates/victory-gpu/src/indirect.rs; no code of it is used).
16//
12// The bounds cut legitimate work beyond them, so they are generous: 2^24 vertices (or indices), 2^26 vertex instances, 17// 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 18// the device's own maxComputeWorkGroupCount per dimension for a dispatch (65 535 for a mesh dispatch), 2^20 groups per
14// console's mesh dispatch is one-dimensional; the output uses one group in y and z. 19// dispatch, and mesh dispatches charged 128 threads per group. The console's mesh dispatch is one-dimensional; the
20// output uses one group in y and z.
21//
22// A dispatch is bounded by the device's limit, not by Vulkan's guaranteed minimum of 65 535: NVIDIA, for one, allows
23// 2^31 - 1 groups in x, and a fixed 65 535 cut a one-dimensional dispatch of more groups short, so the groups
24// past it never ran and their output stayed stale (blocky patches; idea from codec-d/cool_fox docs/findings.md).
15#version 460 25#version 460
16#extension GL_EXT_buffer_reference : require 26#extension GL_EXT_buffer_reference : require
17layout(local_size_x = 64) in; 27layout(local_size_x = 64) in;
@@ -35,13 +45,19 @@ layout(push_constant) uniform Params {
35 uint first_record; // the record index this chunk starts at 45 uint first_record; // the record index this chunk starts at
36 uint max_records; // max_command_count of the ExecuteIndirect call 46 uint max_records; // max_command_count of the ExecuteIndirect call
37 uint flags; // bit 0: counted; bits 1..16: optional per-dispatch group budget 47 uint flags; // bit 0: counted; bits 1..16: optional per-dispatch group budget
48 uint max_x; // the device's maxComputeWorkGroupCount: a dispatch's x, y and z run up to these
49 uint max_y; // (three words, not a uvec3, whose 16-byte alignment would move it past the C++ struct)
50 uint max_z;
51 uint reserved;
38} p; 52} p;
39 53
40// One ExecuteIndirect batch's limits. A record that asks for more runs empty instead of for seconds. 54// 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 55const uint max_vertices = 1u << 24u; // vertices or indices in one draw
56const uint unfilled_draw = 1u << 23u; // vertices or indices an instance from which a draw record is unfilled
42const uint max_vertex_instances = 1u << 26u; // vertex (or index) count times instance count 57const 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 58const uint max_mesh_dimension = 65535u; // groups in a mesh dispatch's x (dispatches: p.max_x, y, z)
44const uint max_groups = 1u << 20u; // groups in one dispatch or mesh dispatch 59const uint max_groups = 1u << 20u; // groups in one dispatch or mesh dispatch
60const uint narrow_groups = 65535u; // the x a dispatch record was cut at before, for the counters
45const uint budget = 1u << 27u; // work in the whole command list: vertices, indices, or groups * 64 61const uint budget = 1u << 27u; // work in the whole command list: vertices, indices, or groups * 64
46 62
47// Charges `cost` units to the batch's budget. Saturating: a record that no longer fits runs empty, so the batch never 63// Charges `cost` units to the batch's budget. Saturating: a record that no longer fits runs empty, so the batch never
@@ -101,7 +117,8 @@ void main() {
101 // A draw or an indexed draw: count, instances, then the two (or three) locations, copied as they are. 117 // 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]; 118 const uint count = p.arguments.data[src];
103 const uint instances = p.arguments.data[src + 1u]; 119 const uint instances = p.arguments.data[src + 1u];
104 uint index_count = min(count, max_vertices); 120 // An unfilled record (a count of 2^23 or more) runs empty, free: cost 0, so it leaves the budget alone.
121 uint index_count = count >= unfilled_draw ? 0u : min(count, max_vertices);
105 uint instance_count = min(instances, max_vertex_instances / max(index_count, 1u)); 122 uint instance_count = min(instances, max_vertex_instances / max(index_count, 1u));
106 if (index_count == 0u) instance_count = 0u; 123 if (index_count == 0u) instance_count = 0u;
107 clamped = index_count != count || instance_count != instances ? 1u : 0u; 124 clamped = index_count != count || instance_count != instances ? 1u : 0u;
@@ -112,8 +129,8 @@ void main() {
112 words[3] = p.arguments.data[src + 3u]; 129 words[3] = p.arguments.data[src + 3u];
113 if (p.kind == 1u) words[4] = p.arguments.data[src + 4u]; 130 if (p.kind == 1u) words[4] = p.arguments.data[src + 4u];
114 } else { 131 } else {
115 // A dispatch or a mesh dispatch: three group counts. x * y fits 32 bits (each is at most 65 535); the whole 132 // A dispatch or a mesh dispatch: three group counts, each bounded by the device's limit. A product past
116 // group count may not, so an oversized product runs empty. 133 // max_groups runs empty; it is checked by division, because x alone may be up to 2^32 - 1.
117 const uint asked_x = p.arguments.data[src]; 134 const uint asked_x = p.arguments.data[src];
118 const uint asked_y = p.arguments.data[src + 1u]; 135 const uint asked_y = p.arguments.data[src + 1u];
119 const uint asked_z = p.arguments.data[src + 2u]; 136 const uint asked_z = p.arguments.data[src + 2u];
@@ -127,21 +144,32 @@ void main() {
127 atomicMax(p.stats.data[11], asked_z); 144 atomicMax(p.stats.data[11], asked_z);
128 } 145 }
129 } 146 }
130 uint x = min(asked_x, max_group_dimension); 147 const uvec3 limit = p.kind == 3u ? uvec3(max_mesh_dimension, 1u, 1u) : max(uvec3(p.max_x, p.max_y, p.max_z), uvec3(1u));
131 uint y = min(asked_y, max_group_dimension); 148 uint x = min(asked_x, limit.x);
132 uint z = min(asked_z, max_group_dimension); 149 uint y = min(asked_y, limit.y);
150 uint z = min(asked_z, limit.z);
133 if (p.kind == 3u) { y = 1u; z = 1u; } 151 if (p.kind == 3u) { y = 1u; z = 1u; }
152 // A dispatch past the device's limit in some dimension, cut there (stats word 14).
153 const bool past_device = p.kind != 3u && (x != asked_x || y != asked_y || z != asked_z);
134 const uint groups = p.flags >> 1u; 154 const uint groups = p.flags >> 1u;
135 if (groups != 0u && x != 0u && y != 0u && z != 0u) { 155 if (groups != 0u && x != 0u && y != 0u && z != 0u) {
136 x = min(x, groups); 156 x = min(x, groups);
137 y = min(y, groups / x); 157 y = min(y, groups / x);
138 z = min(z, groups / x / y); 158 z = min(z, groups / x / y);
139 } 159 }
140 if (z != 0u && x * y > max_groups / z) { 160 if (x != 0u && y != 0u && z != 0u && (x > max_groups || y > max_groups / x || z > max_groups / x / y)) {
141 x = 0u; 161 x = 0u;
142 y = 0u; 162 y = 0u;
143 z = 0u; 163 z = 0u;
144 } 164 }
165 if (p.kind != 3u) {
166 // Dispatch records (stats words 12-15): those that run wider than 65 535 groups in x, the widest x that
167 // runs, those cut at the device's limits (and still run), and all of them.
168 atomicAdd(p.stats.data[15], 1u);
169 if (x > narrow_groups) atomicAdd(p.stats.data[12], 1u);
170 atomicMax(p.stats.data[13], x);
171 if (past_device && x != 0u) atomicAdd(p.stats.data[14], 1u);
172 }
145 clamped = x != asked_x || y != asked_y || z != asked_z ? 1u : 0u; 173 clamped = x != asked_x || y != asked_y || z != asked_z ? 1u : 0u;
146 cost = x * y * z * (p.kind == 3u ? 128u : 64u); 174 cost = x * y * z * (p.kind == 3u ? 128u : 64u);
147 words[0] = x; 175 words[0] = x;
diff --git a/runtime/src/indirect_clamp_spv.h b/runtime/src/indirect_clamp_spv.h
index 653e0543f..36e4d9654 100644
--- a/runtime/src/indirect_clamp_spv.h
+++ b/runtime/src/indirect_clamp_spv.h
@@ -3,7 +3,7 @@
3#include <cstdint> 3#include <cstdint>
4namespace leonida { 4namespace leonida {
5inline constexpr std::uint32_t indirect_clamp_spirv[] = { 5inline constexpr std::uint32_t indirect_clamp_spirv[] = {
6 0x07230203u, 0x00010500u, 0x0008000bu, 0x000002fau, 0x00000000u, 0x00020011u, 0x00000001u, 0x00020011u, 6 0x07230203u, 0x00010500u, 0x0008000bu, 0x000003b0u, 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, 0x00000026u, 8 0x000014e4u, 0x00000001u, 0x0007000fu, 0x00000005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00000026u,
9 0x0000005au, 0x00060010u, 0x00000004u, 0x00000011u, 0x00000040u, 0x00000001u, 0x00000001u, 0x00030003u, 9 0x0000005au, 0x00060010u, 0x00000004u, 0x00000011u, 0x00000040u, 0x00000001u, 0x00000001u, 0x00030003u,
@@ -17,283 +17,336 @@ inline constexpr std::uint32_t indirect_clamp_spirv[] = {
17 0x00070006u, 0x0000001au, 0x00000007u, 0x69727473u, 0x775f6564u, 0x7364726fu, 0x00000000u, 0x00050006u, 17 0x00070006u, 0x0000001au, 0x00000007u, 0x69727473u, 0x775f6564u, 0x7364726fu, 0x00000000u, 0x00050006u,
18 0x0000001au, 0x00000008u, 0x6f636572u, 0x00736472u, 0x00070006u, 0x0000001au, 0x00000009u, 0x73726966u, 18 0x0000001au, 0x00000008u, 0x6f636572u, 0x00736472u, 0x00070006u, 0x0000001au, 0x00000009u, 0x73726966u,
19 0x65725f74u, 0x64726f63u, 0x00000000u, 0x00060006u, 0x0000001au, 0x0000000au, 0x5f78616du, 0x6f636572u, 19 0x65725f74u, 0x64726f63u, 0x00000000u, 0x00060006u, 0x0000001au, 0x0000000au, 0x5f78616du, 0x6f636572u,
20 0x00736472u, 0x00050006u, 0x0000001au, 0x0000000bu, 0x67616c66u, 0x00000073u, 0x00040005u, 0x0000001cu, 20 0x00736472u, 0x00050006u, 0x0000001au, 0x0000000bu, 0x67616c66u, 0x00000073u, 0x00050006u, 0x0000001au,
21 0x73677241u, 0x00006e49u, 0x00050006u, 0x0000001cu, 0x00000000u, 0x61746164u, 0x00000000u, 0x00040005u, 21 0x0000000cu, 0x5f78616du, 0x00000078u, 0x00050006u, 0x0000001au, 0x0000000du, 0x5f78616du, 0x00000079u,
22 0x0000001eu, 0x6e756f43u, 0x006e4974u, 0x00050006u, 0x0000001eu, 0x00000000u, 0x61746164u, 0x00000000u, 22 0x00050006u, 0x0000001au, 0x0000000eu, 0x5f78616du, 0x0000007au, 0x00040005u, 0x0000001cu, 0x73677241u,
23 0x00040005u, 0x00000020u, 0x73677241u, 0x0074754fu, 0x00050006u, 0x00000020u, 0x00000000u, 0x61746164u, 23 0x00006e49u, 0x00050006u, 0x0000001cu, 0x00000000u, 0x61746164u, 0x00000000u, 0x00040005u, 0x0000001eu,
24 0x00000000u, 0x00050005u, 0x00000022u, 0x6e756f43u, 0x74754f74u, 0x00000000u, 0x00050006u, 0x00000022u, 24 0x6e756f43u, 0x006e4974u, 0x00050006u, 0x0000001eu, 0x00000000u, 0x61746164u, 0x00000000u, 0x00040005u,
25 0x00000000u, 0x61746164u, 0x00000000u, 0x00040005u, 0x00000024u, 0x74617453u, 0x00000073u, 0x00050006u, 25 0x00000020u, 0x73677241u, 0x0074754fu, 0x00050006u, 0x00000020u, 0x00000000u, 0x61746164u, 0x00000000u,
26 0x00000024u, 0x00000000u, 0x61746164u, 0x00000000u, 0x00030005u, 0x00000026u, 0x00000070u, 0x00080005u, 26 0x00050005u, 0x00000022u, 0x6e756f43u, 0x74754f74u, 0x00000000u, 0x00050006u, 0x00000022u, 0x00000000u,
27 0x0000005au, 0x475f6c67u, 0x61626f6cu, 0x766e496cu, 0x7461636fu, 0x496e6f69u, 0x00000044u, 0x00040005u, 27 0x61746164u, 0x00000000u, 0x00040005u, 0x00000024u, 0x74617453u, 0x00000073u, 0x00050006u, 0x00000024u,
28 0x00000116u, 0x64726f77u, 0x00000073u, 0x00030047u, 0x0000001au, 0x00000002u, 0x00050048u, 0x0000001au, 28 0x00000000u, 0x61746164u, 0x00000000u, 0x00030005u, 0x00000026u, 0x00000070u, 0x00080005u, 0x0000005au,
29 0x00000000u, 0x00000023u, 0x00000000u, 0x00050048u, 0x0000001au, 0x00000001u, 0x00000023u, 0x00000008u, 29 0x475f6c67u, 0x61626f6cu, 0x766e496cu, 0x7461636fu, 0x496e6f69u, 0x00000044u, 0x00040005u, 0x00000116u,
30 0x00050048u, 0x0000001au, 0x00000002u, 0x00000023u, 0x00000010u, 0x00050048u, 0x0000001au, 0x00000003u, 30 0x64726f77u, 0x00000073u, 0x00030047u, 0x0000001au, 0x00000002u, 0x00050048u, 0x0000001au, 0x00000000u,
31 0x00000023u, 0x00000018u, 0x00050048u, 0x0000001au, 0x00000004u, 0x00000023u, 0x00000020u, 0x00050048u, 31 0x00000023u, 0x00000000u, 0x00050048u, 0x0000001au, 0x00000001u, 0x00000023u, 0x00000008u, 0x00050048u,
32 0x0000001au, 0x00000005u, 0x00000023u, 0x00000028u, 0x00050048u, 0x0000001au, 0x00000006u, 0x00000023u, 32 0x0000001au, 0x00000002u, 0x00000023u, 0x00000010u, 0x00050048u, 0x0000001au, 0x00000003u, 0x00000023u,
33 0x00000030u, 0x00050048u, 0x0000001au, 0x00000007u, 0x00000023u, 0x00000034u, 0x00050048u, 0x0000001au, 33 0x00000018u, 0x00050048u, 0x0000001au, 0x00000004u, 0x00000023u, 0x00000020u, 0x00050048u, 0x0000001au,
34 0x00000008u, 0x00000023u, 0x00000038u, 0x00050048u, 0x0000001au, 0x00000009u, 0x00000023u, 0x0000003cu, 34 0x00000005u, 0x00000023u, 0x00000028u, 0x00050048u, 0x0000001au, 0x00000006u, 0x00000023u, 0x00000030u,
35 0x00050048u, 0x0000001au, 0x0000000au, 0x00000023u, 0x00000040u, 0x00050048u, 0x0000001au, 0x0000000bu, 35 0x00050048u, 0x0000001au, 0x00000007u, 0x00000023u, 0x00000034u, 0x00050048u, 0x0000001au, 0x00000008u,
36 0x00000023u, 0x00000044u, 0x00040047u, 0x0000001bu, 0x00000006u, 0x00000004u, 0x00030047u, 0x0000001cu, 36 0x00000023u, 0x00000038u, 0x00050048u, 0x0000001au, 0x00000009u, 0x00000023u, 0x0000003cu, 0x00050048u,
37 0x00000002u, 0x00040048u, 0x0000001cu, 0x00000000u, 0x00000018u, 0x00050048u, 0x0000001cu, 0x00000000u, 37 0x0000001au, 0x0000000au, 0x00000023u, 0x00000040u, 0x00050048u, 0x0000001au, 0x0000000bu, 0x00000023u,
38 0x00000023u, 0x00000000u, 0x00040047u, 0x0000001du, 0x00000006u, 0x00000004u, 0x00030047u, 0x0000001eu, 38 0x00000044u, 0x00050048u, 0x0000001au, 0x0000000cu, 0x00000023u, 0x00000048u, 0x00050048u, 0x0000001au,
39 0x00000002u, 0x00040048u, 0x0000001eu, 0x00000000u, 0x00000018u, 0x00050048u, 0x0000001eu, 0x00000000u, 39 0x0000000du, 0x00000023u, 0x0000004cu, 0x00050048u, 0x0000001au, 0x0000000eu, 0x00000023u, 0x00000050u,
40 0x00000023u, 0x00000000u, 0x00040047u, 0x0000001fu, 0x00000006u, 0x00000004u, 0x00030047u, 0x00000020u, 40 0x00040047u, 0x0000001bu, 0x00000006u, 0x00000004u, 0x00030047u, 0x0000001cu, 0x00000002u, 0x00040048u,
41 0x00000002u, 0x00050048u, 0x00000020u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00040047u, 0x00000021u, 41 0x0000001cu, 0x00000000u, 0x00000018u, 0x00050048u, 0x0000001cu, 0x00000000u, 0x00000023u, 0x00000000u,
42 0x00000006u, 0x00000004u, 0x00030047u, 0x00000022u, 0x00000002u, 0x00050048u, 0x00000022u, 0x00000000u, 42 0x00040047u, 0x0000001du, 0x00000006u, 0x00000004u, 0x00030047u, 0x0000001eu, 0x00000002u, 0x00040048u,
43 0x00000023u, 0x00000000u, 0x00040047u, 0x00000023u, 0x00000006u, 0x00000004u, 0x00030047u, 0x00000024u, 43 0x0000001eu, 0x00000000u, 0x00000018u, 0x00050048u, 0x0000001eu, 0x00000000u, 0x00000023u, 0x00000000u,
44 0x00000002u, 0x00050048u, 0x00000024u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00040047u, 0x0000005au, 44 0x00040047u, 0x0000001fu, 0x00000006u, 0x00000004u, 0x00030047u, 0x00000020u, 0x00000002u, 0x00050048u,
45 0x0000000bu, 0x0000001cu, 0x00040047u, 0x00000227u, 0x0000000bu, 0x00000019u, 0x00020013u, 0x00000002u, 45 0x00000020u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00040047u, 0x00000021u, 0x00000006u, 0x00000004u,
46 0x00030021u, 0x00000003u, 0x00000002u, 0x00040015u, 0x00000006u, 0x00000020u, 0x00000000u, 0x00040020u, 46 0x00030047u, 0x00000022u, 0x00000002u, 0x00050048u, 0x00000022u, 0x00000000u, 0x00000023u, 0x00000000u,
47 0x00000007u, 0x00000007u, 0x00000006u, 0x00020014u, 0x00000008u, 0x0004002bu, 0x00000006u, 0x0000000eu, 47 0x00040047u, 0x00000023u, 0x00000006u, 0x00000004u, 0x00030047u, 0x00000024u, 0x00000002u, 0x00050048u,
48 0x00000000u, 0x00030029u, 0x00000008u, 0x00000012u, 0x00030027u, 0x00000015u, 0x000014e5u, 0x00030027u, 48 0x00000024u, 0x00000000u, 0x00000023u, 0x00000000u, 0x00040047u, 0x0000005au, 0x0000000bu, 0x0000001cu,
49 0x00000016u, 0x000014e5u, 0x00030027u, 0x00000017u, 0x000014e5u, 0x00030027u, 0x00000018u, 0x000014e5u, 49 0x00040047u, 0x00000293u, 0x0000000bu, 0x00000019u, 0x00020013u, 0x00000002u, 0x00030021u, 0x00000003u,
50 0x00030027u, 0x00000019u, 0x000014e5u, 0x000e001eu, 0x0000001au, 0x00000015u, 0x00000016u, 0x00000017u, 50 0x00000002u, 0x00040015u, 0x00000006u, 0x00000020u, 0x00000000u, 0x00040020u, 0x00000007u, 0x00000007u,
51 0x00000018u, 0x00000019u, 0x00000019u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 51 0x00000006u, 0x00020014u, 0x00000008u, 0x0004002bu, 0x00000006u, 0x0000000eu, 0x00000000u, 0x00030029u,
52 0x00000006u, 0x0003001du, 0x0000001bu, 0x00000006u, 0x0003001eu, 0x0000001cu, 0x0000001bu, 0x00040020u, 52 0x00000008u, 0x00000012u, 0x00030027u, 0x00000015u, 0x000014e5u, 0x00030027u, 0x00000016u, 0x000014e5u,
53 0x00000015u, 0x000014e5u, 0x0000001cu, 0x0003001du, 0x0000001du, 0x00000006u, 0x0003001eu, 0x0000001eu, 53 0x00030027u, 0x00000017u, 0x000014e5u, 0x00030027u, 0x00000018u, 0x000014e5u, 0x00030027u, 0x00000019u,
54 0x0000001du, 0x00040020u, 0x00000016u, 0x000014e5u, 0x0000001eu, 0x0003001du, 0x0000001fu, 0x00000006u, 54 0x000014e5u, 0x0011001eu, 0x0000001au, 0x00000015u, 0x00000016u, 0x00000017u, 0x00000018u, 0x00000019u,
55 0x0003001eu, 0x00000020u, 0x0000001fu, 0x00040020u, 0x00000017u, 0x000014e5u, 0x00000020u, 0x0003001du, 55 0x00000019u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u, 0x00000006u,
56 0x00000021u, 0x00000006u, 0x0003001eu, 0x00000022u, 0x00000021u, 0x00040020u, 0x00000018u, 0x000014e5u, 56 0x00000006u, 0x00000006u, 0x0003001du, 0x0000001bu, 0x00000006u, 0x0003001eu, 0x0000001cu, 0x0000001bu,
57 0x00000022u, 0x0003001du, 0x00000023u, 0x00000006u, 0x0003001eu, 0x00000024u, 0x00000023u, 0x00040020u, 57 0x00040020u, 0x00000015u, 0x000014e5u, 0x0000001cu, 0x0003001du, 0x0000001du, 0x00000006u, 0x0003001eu,
58 0x00000019u, 0x000014e5u, 0x00000024u, 0x00040020u, 0x00000025u, 0x00000009u, 0x0000001au, 0x0004003bu, 58 0x0000001eu, 0x0000001du, 0x00040020u, 0x00000016u, 0x000014e5u, 0x0000001eu, 0x0003001du, 0x0000001fu,
59 0x00000025u, 0x00000026u, 0x00000009u, 0x00040015u, 0x00000027u, 0x00000020u, 0x00000001u, 0x0004002bu, 59 0x00000006u, 0x0003001eu, 0x00000020u, 0x0000001fu, 0x00040020u, 0x00000017u, 0x000014e5u, 0x00000020u,
60 0x00000027u, 0x00000028u, 0x00000005u, 0x00040020u, 0x00000029u, 0x00000009u, 0x00000019u, 0x0004002bu, 60 0x0003001du, 0x00000021u, 0x00000006u, 0x0003001eu, 0x00000022u, 0x00000021u, 0x00040020u, 0x00000018u,
61 0x00000027u, 0x0000002cu, 0x00000000u, 0x00040020u, 0x0000002du, 0x000014e5u, 0x00000006u, 0x0004002bu, 61 0x000014e5u, 0x00000022u, 0x0003001du, 0x00000023u, 0x00000006u, 0x0003001eu, 0x00000024u, 0x00000023u,
62 0x00000006u, 0x0000002fu, 0x00000001u, 0x0004002bu, 0x00000006u, 0x00000037u, 0x08000000u, 0x0003002au, 62 0x00040020u, 0x00000019u, 0x000014e5u, 0x00000024u, 0x00040020u, 0x00000025u, 0x00000009u, 0x0000001au,
63 0x00000008u, 0x00000041u, 0x00040017u, 0x00000058u, 0x00000006u, 0x00000003u, 0x00040020u, 0x00000059u, 63 0x0004003bu, 0x00000025u, 0x00000026u, 0x00000009u, 0x00040015u, 0x00000027u, 0x00000020u, 0x00000001u,
64 0x00000001u, 0x00000058u, 0x0004003bu, 0x00000059u, 0x0000005au, 0x00000001u, 0x00040020u, 0x0000005bu, 64 0x0004002bu, 0x00000027u, 0x00000028u, 0x00000005u, 0x00040020u, 0x00000029u, 0x00000009u, 0x00000019u,
65 0x00000001u, 0x00000006u, 0x0004002bu, 0x00000027u, 0x0000005fu, 0x00000008u, 0x00040020u, 0x00000060u, 65 0x0004002bu, 0x00000027u, 0x0000002cu, 0x00000000u, 0x00040020u, 0x0000002du, 0x000014e5u, 0x00000006u,
66 0x00000009u, 0x00000006u, 0x0004002bu, 0x00000027u, 0x00000068u, 0x00000009u, 0x0004002bu, 0x00000027u, 66 0x0004002bu, 0x00000006u, 0x0000002fu, 0x00000001u, 0x0004002bu, 0x00000006u, 0x00000037u, 0x08000000u,
67 0x0000006eu, 0x00000006u, 0x0004002bu, 0x00000006u, 0x00000078u, 0x00000004u, 0x0004002bu, 0x00000006u, 67 0x0003002au, 0x00000008u, 0x00000041u, 0x00040017u, 0x00000058u, 0x00000006u, 0x00000003u, 0x00040020u,
68 0x00000079u, 0x00000005u, 0x0004002bu, 0x00000006u, 0x0000007cu, 0x00000003u, 0x0004002bu, 0x00000027u, 68 0x00000059u, 0x00000001u, 0x00000058u, 0x0004003bu, 0x00000059u, 0x0000005au, 0x00000001u, 0x00040020u,
69 0x00000084u, 0x0000000bu, 0x0004002bu, 0x00000027u, 0x0000008au, 0x0000000au, 0x0004002bu, 0x00000027u, 69 0x0000005bu, 0x00000001u, 0x00000006u, 0x0004002bu, 0x00000027u, 0x0000005fu, 0x00000008u, 0x00040020u,
70 0x00000091u, 0x00000001u, 0x00040020u, 0x00000092u, 0x00000009u, 0x00000016u, 0x0004002bu, 0x00000027u, 70 0x00000060u, 0x00000009u, 0x00000006u, 0x0004002bu, 0x00000027u, 0x00000068u, 0x00000009u, 0x0004002bu,
71 0x0000009eu, 0x00000003u, 0x00040020u, 0x0000009fu, 0x00000009u, 0x00000018u, 0x0004002bu, 0x00000027u, 71 0x00000027u, 0x0000006eu, 0x00000006u, 0x0004002bu, 0x00000006u, 0x00000078u, 0x00000004u, 0x0004002bu,
72 0x000000a9u, 0x00000004u, 0x0004002bu, 0x00000027u, 0x000000bcu, 0x00000002u, 0x00040020u, 0x000000bdu, 72 0x00000006u, 0x00000079u, 0x00000005u, 0x0004002bu, 0x00000006u, 0x0000007cu, 0x00000003u, 0x0004002bu,
73 0x00000009u, 0x00000017u, 0x0004002bu, 0x00000027u, 0x000000c9u, 0x00000007u, 0x00040020u, 0x000000dau, 73 0x00000027u, 0x00000084u, 0x0000000bu, 0x0004002bu, 0x00000027u, 0x0000008au, 0x0000000au, 0x0004002bu,
74 0x00000009u, 0x00000015u, 0x0004002bu, 0x00000006u, 0x000000e2u, 0xffffffffu, 0x0004001cu, 0x00000114u, 74 0x00000027u, 0x00000091u, 0x00000001u, 0x00040020u, 0x00000092u, 0x00000009u, 0x00000016u, 0x0004002bu,
75 0x00000006u, 0x00000079u, 0x00040020u, 0x00000115u, 0x00000007u, 0x00000114u, 0x0008002cu, 0x00000114u, 75 0x00000027u, 0x0000009eu, 0x00000003u, 0x00040020u, 0x0000009fu, 0x00000009u, 0x00000018u, 0x0004002bu,
76 0x00000117u, 0x0000000eu, 0x0000000eu, 0x0000000eu, 0x0000000eu, 0x0000000eu, 0x0004002bu, 0x00000006u, 76 0x00000027u, 0x000000a9u, 0x00000004u, 0x0004002bu, 0x00000027u, 0x000000bcu, 0x00000002u, 0x00040020u,
77 0x0000012eu, 0x01000000u, 0x0004002bu, 0x00000006u, 0x00000132u, 0x04000000u, 0x0004002bu, 0x00000006u, 77 0x000000bdu, 0x00000009u, 0x00000017u, 0x0004002bu, 0x00000027u, 0x000000c9u, 0x00000007u, 0x00040020u,
78 0x0000014du, 0x00000002u, 0x0004002bu, 0x00000006u, 0x0000019au, 0x0000ffffu, 0x0004002bu, 0x00000006u, 78 0x000000dau, 0x00000009u, 0x00000015u, 0x0004002bu, 0x00000006u, 0x000000e2u, 0xffffffffu, 0x0004001cu,
79 0x000001ceu, 0x00100000u, 0x0004002bu, 0x00000006u, 0x000001e9u, 0x00000080u, 0x0004002bu, 0x00000006u, 79 0x00000114u, 0x00000006u, 0x00000079u, 0x00040020u, 0x00000115u, 0x00000007u, 0x00000114u, 0x0008002cu,
80 0x000001eau, 0x00000040u, 0x0006002cu, 0x00000058u, 0x00000227u, 0x000001eau, 0x0000002fu, 0x0000002fu, 80 0x00000114u, 0x00000117u, 0x0000000eu, 0x0000000eu, 0x0000000eu, 0x0000000eu, 0x0000000eu, 0x0004002bu,
81 0x00030001u, 0x00000008u, 0x000002acu, 0x00050036u, 0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u, 81 0x00000006u, 0x0000012eu, 0x00800000u, 0x0004002bu, 0x00000006u, 0x00000135u, 0x01000000u, 0x0004002bu,
82 0x000200f8u, 0x00000005u, 0x0004003bu, 0x00000115u, 0x00000116u, 0x00000007u, 0x000300f7u, 0x00000228u, 82 0x00000006u, 0x0000013au, 0x04000000u, 0x0004002bu, 0x00000006u, 0x00000155u, 0x00000002u, 0x0004002bu,
83 0x00000000u, 0x000300fbu, 0x0000000eu, 0x00000229u, 0x000200f8u, 0x00000229u, 0x00050041u, 0x0000005bu, 83 0x00000006u, 0x000001a8u, 0x0000ffffu, 0x0006002cu, 0x00000058u, 0x000001a9u, 0x000001a8u, 0x0000002fu,
84 0x0000005cu, 0x0000005au, 0x0000000eu, 0x0004003du, 0x00000006u, 0x0000005du, 0x0000005cu, 0x00050041u, 84 0x0000002fu, 0x0004002bu, 0x00000027u, 0x000001abu, 0x0000000cu, 0x0004002bu, 0x00000027u, 0x000001aeu,
85 0x00000060u, 0x00000061u, 0x00000026u, 0x0000005fu, 0x0004003du, 0x00000006u, 0x00000062u, 0x00000061u, 85 0x0000000du, 0x0004002bu, 0x00000027u, 0x000001b1u, 0x0000000eu, 0x0006002cu, 0x00000058u, 0x000001b5u,
86 0x000500aeu, 0x00000008u, 0x00000063u, 0x0000005du, 0x00000062u, 0x000300f7u, 0x00000065u, 0x00000000u, 86 0x0000002fu, 0x0000002fu, 0x0000002fu, 0x0004002bu, 0x00000006u, 0x00000209u, 0x00100000u, 0x0004002bu,
87 0x000400fau, 0x00000063u, 0x00000064u, 0x00000065u, 0x000200f8u, 0x00000064u, 0x000200f9u, 0x00000228u, 87 0x00000027u, 0x00000227u, 0x0000000fu, 0x0004002bu, 0x00000006u, 0x00000255u, 0x00000080u, 0x0004002bu,
88 0x000200f8u, 0x00000065u, 0x00050041u, 0x00000060u, 0x00000069u, 0x00000026u, 0x00000068u, 0x0004003du, 88 0x00000006u, 0x00000256u, 0x00000040u, 0x0006002cu, 0x00000058u, 0x00000293u, 0x00000256u, 0x0000002fu,
89 0x00000006u, 0x0000006au, 0x00000069u, 0x00050080u, 0x00000006u, 0x0000006cu, 0x0000006au, 0x0000005du, 89 0x0000002fu, 0x00030001u, 0x00000008u, 0x0000034bu, 0x00050036u, 0x00000002u, 0x00000004u, 0x00000000u,
90 0x00050041u, 0x00000060u, 0x0000006fu, 0x00000026u, 0x0000006eu, 0x0004003du, 0x00000006u, 0x00000070u, 90 0x00000003u, 0x000200f8u, 0x00000005u, 0x0004003bu, 0x00000115u, 0x00000116u, 0x00000007u, 0x000300f7u,
91 0x0000006fu, 0x000500b2u, 0x00000008u, 0x00000071u, 0x00000070u, 0x0000002fu, 0x000300f7u, 0x00000074u, 91 0x00000294u, 0x00000000u, 0x000300fbu, 0x0000000eu, 0x00000295u, 0x000200f8u, 0x00000295u, 0x00050041u,
92 0x00000000u, 0x000400fau, 0x00000071u, 0x00000073u, 0x0000007bu, 0x000200f8u, 0x00000073u, 0x000500aau, 92 0x0000005bu, 0x0000005cu, 0x0000005au, 0x0000000eu, 0x0004003du, 0x00000006u, 0x0000005du, 0x0000005cu,
93 0x00000008u, 0x00000077u, 0x00000070u, 0x0000000eu, 0x000600a9u, 0x00000006u, 0x0000007au, 0x00000077u, 93 0x00050041u, 0x00000060u, 0x00000061u, 0x00000026u, 0x0000005fu, 0x0004003du, 0x00000006u, 0x00000062u,
94 0x00000078u, 0x00000079u, 0x000200f9u, 0x00000074u, 0x000200f8u, 0x0000007bu, 0x000200f9u, 0x00000074u, 94 0x00000061u, 0x000500aeu, 0x00000008u, 0x00000063u, 0x0000005du, 0x00000062u, 0x000300f7u, 0x00000065u,
95 0x000200f8u, 0x00000074u, 0x000700f5u, 0x00000006u, 0x00000264u, 0x0000007au, 0x00000073u, 0x0000007cu, 95 0x00000000u, 0x000400fau, 0x00000063u, 0x00000064u, 0x00000065u, 0x000200f8u, 0x00000064u, 0x000200f9u,
96 0x0000007bu, 0x00050084u, 0x00000006u, 0x00000081u, 0x0000005du, 0x00000264u, 0x00050041u, 0x00000060u, 96 0x00000294u, 0x000200f8u, 0x00000065u, 0x00050041u, 0x00000060u, 0x00000069u, 0x00000026u, 0x00000068u,
97 0x00000085u, 0x00000026u, 0x00000084u, 0x0004003du, 0x00000006u, 0x00000086u, 0x00000085u, 0x000500c7u, 97 0x0004003du, 0x00000006u, 0x0000006au, 0x00000069u, 0x00050080u, 0x00000006u, 0x0000006cu, 0x0000006au,
98 0x00000006u, 0x00000087u, 0x00000086u, 0x0000002fu, 0x000500abu, 0x00000008u, 0x00000088u, 0x00000087u, 98 0x0000005du, 0x00050041u, 0x00000060u, 0x0000006fu, 0x00000026u, 0x0000006eu, 0x0004003du, 0x00000006u,
99 0x0000000eu, 0x00050041u, 0x00000060u, 0x0000008bu, 0x00000026u, 0x0000008au, 0x0004003du, 0x00000006u, 99 0x00000070u, 0x0000006fu, 0x000500b2u, 0x00000008u, 0x00000071u, 0x00000070u, 0x0000002fu, 0x000300f7u,
100 0x0000008cu, 0x0000008bu, 0x000300f7u, 0x0000008fu, 0x00000000u, 0x000400fau, 0x00000088u, 0x0000008eu, 100 0x00000074u, 0x00000000u, 0x000400fau, 0x00000071u, 0x00000073u, 0x0000007bu, 0x000200f8u, 0x00000073u,
101 0x0000008fu, 0x000200f8u, 0x0000008eu, 0x00050041u, 0x00000092u, 0x00000093u, 0x00000026u, 0x00000091u, 101 0x000500aau, 0x00000008u, 0x00000077u, 0x00000070u, 0x0000000eu, 0x000600a9u, 0x00000006u, 0x0000007au,
102 0x0004003du, 0x00000016u, 0x00000094u, 0x00000093u, 0x00060041u, 0x0000002du, 0x00000095u, 0x00000094u, 102 0x00000077u, 0x00000078u, 0x00000079u, 0x000200f9u, 0x00000074u, 0x000200f8u, 0x0000007bu, 0x000200f9u,
103 0x0000002cu, 0x0000002cu, 0x0006003du, 0x00000006u, 0x00000096u, 0x00000095u, 0x00000002u, 0x00000004u, 103 0x00000074u, 0x000200f8u, 0x00000074u, 0x000700f5u, 0x00000006u, 0x000002d0u, 0x0000007au, 0x00000073u,
104 0x0007000cu, 0x00000006u, 0x00000099u, 0x00000001u, 0x00000026u, 0x0000008cu, 0x00000096u, 0x000500aau, 104 0x0000007cu, 0x0000007bu, 0x00050084u, 0x00000006u, 0x00000081u, 0x0000005du, 0x000002d0u, 0x00050041u,
105 0x00000008u, 0x0000009bu, 0x0000006cu, 0x0000000eu, 0x000300f7u, 0x0000009du, 0x00000000u, 0x000400fau, 105 0x00000060u, 0x00000085u, 0x00000026u, 0x00000084u, 0x0004003du, 0x00000006u, 0x00000086u, 0x00000085u,
106 0x0000009bu, 0x0000009cu, 0x0000009du, 0x000200f8u, 0x0000009cu, 0x00050041u, 0x0000009fu, 0x000000a0u, 106 0x000500c7u, 0x00000006u, 0x00000087u, 0x00000086u, 0x0000002fu, 0x000500abu, 0x00000008u, 0x00000088u,
107 0x00000026u, 0x0000009eu, 0x0004003du, 0x00000018u, 0x000000a1u, 0x000000a0u, 0x00060041u, 0x0000002du, 107 0x00000087u, 0x0000000eu, 0x00050041u, 0x00000060u, 0x0000008bu, 0x00000026u, 0x0000008au, 0x0004003du,
108 0x000000a3u, 0x000000a1u, 0x0000002cu, 0x0000002cu, 0x0005003eu, 0x000000a3u, 0x00000099u, 0x00000002u, 108 0x00000006u, 0x0000008cu, 0x0000008bu, 0x000300f7u, 0x0000008fu, 0x00000000u, 0x000400fau, 0x00000088u,
109 0x00000004u, 0x000500abu, 0x00000008u, 0x000000a6u, 0x00000096u, 0x00000099u, 0x000300f7u, 0x000000a8u, 109 0x0000008eu, 0x0000008fu, 0x000200f8u, 0x0000008eu, 0x00050041u, 0x00000092u, 0x00000093u, 0x00000026u,
110 0x00000000u, 0x000400fau, 0x000000a6u, 0x000000a7u, 0x000000a8u, 0x000200f8u, 0x000000a7u, 0x00050041u, 110 0x00000091u, 0x0004003du, 0x00000016u, 0x00000094u, 0x00000093u, 0x00060041u, 0x0000002du, 0x00000095u,
111 0x00000029u, 0x000000aau, 0x00000026u, 0x000000a9u, 0x0004003du, 0x00000019u, 0x000000abu, 0x000000aau, 111 0x00000094u, 0x0000002cu, 0x0000002cu, 0x0006003du, 0x00000006u, 0x00000096u, 0x00000095u, 0x00000002u,
112 0x00060041u, 0x0000002du, 0x000000acu, 0x000000abu, 0x0000002cu, 0x00000091u, 0x000700eau, 0x00000006u, 112 0x00000004u, 0x0007000cu, 0x00000006u, 0x00000099u, 0x00000001u, 0x00000026u, 0x0000008cu, 0x00000096u,
113 0x000000adu, 0x000000acu, 0x0000002fu, 0x0000000eu, 0x0000002fu, 0x000200f9u, 0x000000a8u, 0x000200f8u, 113 0x000500aau, 0x00000008u, 0x0000009bu, 0x0000006cu, 0x0000000eu, 0x000300f7u, 0x0000009du, 0x00000000u,
114 0x000000a8u, 0x000200f9u, 0x0000009du, 0x000200f8u, 0x0000009du, 0x000200f9u, 0x0000008fu, 0x000200f8u, 114 0x000400fau, 0x0000009bu, 0x0000009cu, 0x0000009du, 0x000200f8u, 0x0000009cu, 0x00050041u, 0x0000009fu,
115 0x0000008fu, 0x000700f5u, 0x00000006u, 0x0000026au, 0x0000008cu, 0x00000074u, 0x00000099u, 0x0000009du, 115 0x000000a0u, 0x00000026u, 0x0000009eu, 0x0004003du, 0x00000018u, 0x000000a1u, 0x000000a0u, 0x00060041u,
116 0x000500aeu, 0x00000008u, 0x000000b0u, 0x0000006cu, 0x0000026au, 0x000300f7u, 0x000000b2u, 0x00000000u, 116 0x0000002du, 0x000000a3u, 0x000000a1u, 0x0000002cu, 0x0000002cu, 0x0005003eu, 0x000000a3u, 0x00000099u,
117 0x000400fau, 0x000000b0u, 0x000000b1u, 0x000000b2u, 0x000200f8u, 0x000000b1u, 0x000200f9u, 0x000000b4u, 117 0x00000002u, 0x00000004u, 0x000500abu, 0x00000008u, 0x000000a6u, 0x00000096u, 0x00000099u, 0x000300f7u,
118 0x000200f8u, 0x000000b4u, 0x000700f5u, 0x00000006u, 0x000002ecu, 0x0000000eu, 0x000000b1u, 0x000000c5u, 118 0x000000a8u, 0x00000000u, 0x000400fau, 0x000000a6u, 0x000000a7u, 0x000000a8u, 0x000200f8u, 0x000000a7u,
119 0x000000b5u, 0x000500b0u, 0x00000008u, 0x000000bbu, 0x000002ecu, 0x00000264u, 0x000400f6u, 0x000000b6u, 119 0x00050041u, 0x00000029u, 0x000000aau, 0x00000026u, 0x000000a9u, 0x0004003du, 0x00000019u, 0x000000abu,
120 0x000000b5u, 0x00000000u, 0x000400fau, 0x000000bbu, 0x000000b5u, 0x000000b6u, 0x000200f8u, 0x000000b5u, 120 0x000000aau, 0x00060041u, 0x0000002du, 0x000000acu, 0x000000abu, 0x0000002cu, 0x00000091u, 0x000700eau,
121 0x00050041u, 0x000000bdu, 0x000000beu, 0x00000026u, 0x000000bcu, 0x0004003du, 0x00000017u, 0x000000bfu, 121 0x00000006u, 0x000000adu, 0x000000acu, 0x0000002fu, 0x0000000eu, 0x0000002fu, 0x000200f9u, 0x000000a8u,
122 0x000000beu, 0x00050080u, 0x00000006u, 0x000000c2u, 0x00000081u, 0x000002ecu, 0x00060041u, 0x0000002du, 122 0x000200f8u, 0x000000a8u, 0x000200f9u, 0x0000009du, 0x000200f8u, 0x0000009du, 0x000200f9u, 0x0000008fu,
123 0x000000c3u, 0x000000bfu, 0x0000002cu, 0x000000c2u, 0x0005003eu, 0x000000c3u, 0x0000000eu, 0x00000002u, 123 0x000200f8u, 0x0000008fu, 0x000700f5u, 0x00000006u, 0x000002d6u, 0x0000008cu, 0x00000074u, 0x00000099u,
124 0x00000004u, 0x00050080u, 0x00000006u, 0x000000c5u, 0x000002ecu, 0x00000091u, 0x000200f9u, 0x000000b4u, 124 0x0000009du, 0x000500aeu, 0x00000008u, 0x000000b0u, 0x0000006cu, 0x000002d6u, 0x000300f7u, 0x000000b2u,
125 0x000200f8u, 0x000000b6u, 0x000200f9u, 0x00000228u, 0x000200f8u, 0x000000b2u, 0x00050041u, 0x00000060u, 125 0x00000000u, 0x000400fau, 0x000000b0u, 0x000000b1u, 0x000000b2u, 0x000200f8u, 0x000000b1u, 0x000200f9u,
126 0x000000cau, 0x00000026u, 0x000000c9u, 0x0004003du, 0x00000006u, 0x000000cbu, 0x000000cau, 0x00050084u, 126 0x000000b4u, 0x000200f8u, 0x000000b4u, 0x000700f5u, 0x00000006u, 0x000003a2u, 0x0000000eu, 0x000000b1u,
127 0x00000006u, 0x000000ccu, 0x0000005du, 0x000000cbu, 0x000200f9u, 0x000000cfu, 0x000200f8u, 0x000000cfu, 127 0x000000c5u, 0x000000b5u, 0x000500b0u, 0x00000008u, 0x000000bbu, 0x000003a2u, 0x000002d0u, 0x000400f6u,
128 0x000700f5u, 0x00000008u, 0x00000275u, 0x00000012u, 0x000000b2u, 0x000000e4u, 0x000000d2u, 0x000700f5u, 128 0x000000b6u, 0x000000b5u, 0x00000000u, 0x000400fau, 0x000000bbu, 0x000000b5u, 0x000000b6u, 0x000200f8u,
129 0x00000006u, 0x00000270u, 0x0000000eu, 0x000000b2u, 0x000000e6u, 0x000000d2u, 0x000500b0u, 0x00000008u, 129 0x000000b5u, 0x00050041u, 0x000000bdu, 0x000000beu, 0x00000026u, 0x000000bcu, 0x0004003du, 0x00000017u,
130 0x000000d6u, 0x00000270u, 0x00000264u, 0x000400f6u, 0x000000d1u, 0x000000d2u, 0x00000000u, 0x000400fau, 130 0x000000bfu, 0x000000beu, 0x00050080u, 0x00000006u, 0x000000c2u, 0x00000081u, 0x000003a2u, 0x00060041u,
131 0x000000d6u, 0x000000d0u, 0x000000d1u, 0x000200f8u, 0x000000d0u, 0x000300f7u, 0x000000d9u, 0x00000000u, 131 0x0000002du, 0x000000c3u, 0x000000bfu, 0x0000002cu, 0x000000c2u, 0x0005003eu, 0x000000c3u, 0x0000000eu,
132 0x000400fau, 0x00000275u, 0x000000d8u, 0x000000d9u, 0x000200f8u, 0x000000d8u, 0x00050041u, 0x000000dau, 132 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x000000c5u, 0x000003a2u, 0x00000091u, 0x000200f9u,
133 0x000000dbu, 0x00000026u, 0x0000002cu, 0x0004003du, 0x00000015u, 0x000000dcu, 0x000000dbu, 0x00050080u, 133 0x000000b4u, 0x000200f8u, 0x000000b6u, 0x000200f9u, 0x00000294u, 0x000200f8u, 0x000000b2u, 0x00050041u,
134 0x00000006u, 0x000000dfu, 0x000000ccu, 0x00000270u, 0x00060041u, 0x0000002du, 0x000000e0u, 0x000000dcu, 134 0x00000060u, 0x000000cau, 0x00000026u, 0x000000c9u, 0x0004003du, 0x00000006u, 0x000000cbu, 0x000000cau,
135 0x0000002cu, 0x000000dfu, 0x0006003du, 0x00000006u, 0x000000e1u, 0x000000e0u, 0x00000002u, 0x00000004u, 135 0x00050084u, 0x00000006u, 0x000000ccu, 0x0000005du, 0x000000cbu, 0x000200f9u, 0x000000cfu, 0x000200f8u,
136 0x000500aau, 0x00000008u, 0x000000e3u, 0x000000e1u, 0x000000e2u, 0x000200f9u, 0x000000d9u, 0x000200f8u, 136 0x000000cfu, 0x000700f5u, 0x00000008u, 0x000002e1u, 0x00000012u, 0x000000b2u, 0x000000e4u, 0x000000d2u,
137 0x000000d9u, 0x000700f5u, 0x00000008u, 0x000000e4u, 0x00000275u, 0x000000d0u, 0x000000e3u, 0x000000d8u, 137 0x000700f5u, 0x00000006u, 0x000002dcu, 0x0000000eu, 0x000000b2u, 0x000000e6u, 0x000000d2u, 0x000500b0u,
138 0x000200f9u, 0x000000d2u, 0x000200f8u, 0x000000d2u, 0x00050080u, 0x00000006u, 0x000000e6u, 0x00000270u, 138 0x00000008u, 0x000000d6u, 0x000002dcu, 0x000002d0u, 0x000400f6u, 0x000000d1u, 0x000000d2u, 0x00000000u,
139 0x00000091u, 0x000200f9u, 0x000000cfu, 0x000200f8u, 0x000000d1u, 0x000400a8u, 0x00000008u, 0x000000e8u, 139 0x000400fau, 0x000000d6u, 0x000000d0u, 0x000000d1u, 0x000200f8u, 0x000000d0u, 0x000300f7u, 0x000000d9u,
140 0x00000275u, 0x000300f7u, 0x000000eau, 0x00000000u, 0x000400fau, 0x000000e8u, 0x000000e9u, 0x000000eau, 140 0x00000000u, 0x000400fau, 0x000002e1u, 0x000000d8u, 0x000000d9u, 0x000200f8u, 0x000000d8u, 0x00050041u,
141 0x000200f8u, 0x000000e9u, 0x000500aau, 0x00000008u, 0x000000edu, 0x00000070u, 0x0000007cu, 0x000300f7u, 141 0x000000dau, 0x000000dbu, 0x00000026u, 0x0000002cu, 0x0004003du, 0x00000015u, 0x000000dcu, 0x000000dbu,
142 0x000000efu, 0x00000000u, 0x000400fau, 0x000000edu, 0x000000eeu, 0x000000efu, 0x000200f8u, 0x000000eeu, 142 0x00050080u, 0x00000006u, 0x000000dfu, 0x000000ccu, 0x000002dcu, 0x00060041u, 0x0000002du, 0x000000e0u,
143 0x00050041u, 0x000000dau, 0x000000f0u, 0x00000026u, 0x0000002cu, 0x0004003du, 0x00000015u, 0x000000f1u, 143 0x000000dcu, 0x0000002cu, 0x000000dfu, 0x0006003du, 0x00000006u, 0x000000e1u, 0x000000e0u, 0x00000002u,
144 0x000000f0u, 0x00060041u, 0x0000002du, 0x000000f3u, 0x000000f1u, 0x0000002cu, 0x000000ccu, 0x0006003du, 144 0x00000004u, 0x000500aau, 0x00000008u, 0x000000e3u, 0x000000e1u, 0x000000e2u, 0x000200f9u, 0x000000d9u,
145 0x00000006u, 0x000000f4u, 0x000000f3u, 0x00000002u, 0x00000004u, 0x000500aau, 0x00000008u, 0x000000f5u, 145 0x000200f8u, 0x000000d9u, 0x000700f5u, 0x00000008u, 0x000000e4u, 0x000002e1u, 0x000000d0u, 0x000000e3u,
146 0x000000f4u, 0x000000e2u, 0x000200f9u, 0x000000efu, 0x000200f8u, 0x000000efu, 0x000700f5u, 0x00000008u, 146 0x000000d8u, 0x000200f9u, 0x000000d2u, 0x000200f8u, 0x000000d2u, 0x00050080u, 0x00000006u, 0x000000e6u,
147 0x000000f6u, 0x000000edu, 0x000000e9u, 0x000000f5u, 0x000000eeu, 0x000200f9u, 0x000000eau, 0x000200f8u, 147 0x000002dcu, 0x00000091u, 0x000200f9u, 0x000000cfu, 0x000200f8u, 0x000000d1u, 0x000400a8u, 0x00000008u,
148 0x000000eau, 0x000700f5u, 0x00000008u, 0x000000f7u, 0x00000275u, 0x000000d1u, 0x000000f6u, 0x000000efu, 148 0x000000e8u, 0x000002e1u, 0x000300f7u, 0x000000eau, 0x00000000u, 0x000400fau, 0x000000e8u, 0x000000e9u,
149 0x000300f7u, 0x000000f9u, 0x00000000u, 0x000400fau, 0x000000f7u, 0x000000f8u, 0x000000f9u, 0x000200f8u, 149 0x000000eau, 0x000200f8u, 0x000000e9u, 0x000500aau, 0x00000008u, 0x000000edu, 0x00000070u, 0x0000007cu,
150 0x000000f8u, 0x000200f9u, 0x000000fbu, 0x000200f8u, 0x000000fbu, 0x000700f5u, 0x00000006u, 0x000002e8u, 150 0x000300f7u, 0x000000efu, 0x00000000u, 0x000400fau, 0x000000edu, 0x000000eeu, 0x000000efu, 0x000200f8u,
151 0x0000000eu, 0x000000f8u, 0x0000010au, 0x000000fcu, 0x000500b0u, 0x00000008u, 0x00000102u, 0x000002e8u, 151 0x000000eeu, 0x00050041u, 0x000000dau, 0x000000f0u, 0x00000026u, 0x0000002cu, 0x0004003du, 0x00000015u,
152 0x00000264u, 0x000400f6u, 0x000000fdu, 0x000000fcu, 0x00000000u, 0x000400fau, 0x00000102u, 0x000000fcu, 152 0x000000f1u, 0x000000f0u, 0x00060041u, 0x0000002du, 0x000000f3u, 0x000000f1u, 0x0000002cu, 0x000000ccu,
153 0x000000fdu, 0x000200f8u, 0x000000fcu, 0x00050041u, 0x000000bdu, 0x00000103u, 0x00000026u, 0x000000bcu, 153 0x0006003du, 0x00000006u, 0x000000f4u, 0x000000f3u, 0x00000002u, 0x00000004u, 0x000500aau, 0x00000008u,
154 0x0004003du, 0x00000017u, 0x00000104u, 0x00000103u, 0x00050080u, 0x00000006u, 0x00000107u, 0x00000081u, 154 0x000000f5u, 0x000000f4u, 0x000000e2u, 0x000200f9u, 0x000000efu, 0x000200f8u, 0x000000efu, 0x000700f5u,
155 0x000002e8u, 0x00060041u, 0x0000002du, 0x00000108u, 0x00000104u, 0x0000002cu, 0x00000107u, 0x0005003eu, 155 0x00000008u, 0x000000f6u, 0x000000edu, 0x000000e9u, 0x000000f5u, 0x000000eeu, 0x000200f9u, 0x000000eau,
156 0x00000108u, 0x0000000eu, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x0000010au, 0x000002e8u, 156 0x000200f8u, 0x000000eau, 0x000700f5u, 0x00000008u, 0x000000f7u, 0x000002e1u, 0x000000d1u, 0x000000f6u,
157 0x00000091u, 0x000200f9u, 0x000000fbu, 0x000200f8u, 0x000000fdu, 0x00050041u, 0x00000029u, 0x0000010bu, 157 0x000000efu, 0x000300f7u, 0x000000f9u, 0x00000000u, 0x000400fau, 0x000000f7u, 0x000000f8u, 0x000000f9u,
158 0x00000026u, 0x000000a9u, 0x0004003du, 0x00000019u, 0x0000010cu, 0x0000010bu, 0x00060041u, 0x0000002du, 158 0x000200f8u, 0x000000f8u, 0x000200f9u, 0x000000fbu, 0x000200f8u, 0x000000fbu, 0x000700f5u, 0x00000006u,
159 0x0000010du, 0x0000010cu, 0x0000002cu, 0x0000002cu, 0x000700eau, 0x00000006u, 0x0000010eu, 0x0000010du, 159 0x0000039eu, 0x0000000eu, 0x000000f8u, 0x0000010au, 0x000000fcu, 0x000500b0u, 0x00000008u, 0x00000102u,
160 0x0000002fu, 0x0000000eu, 0x0000002fu, 0x00060041u, 0x0000002du, 0x00000111u, 0x0000010cu, 0x0000002cu, 160 0x0000039eu, 0x000002d0u, 0x000400f6u, 0x000000fdu, 0x000000fcu, 0x00000000u, 0x000400fau, 0x00000102u,
161 0x0000009eu, 0x000700eau, 0x00000006u, 0x00000112u, 0x00000111u, 0x0000002fu, 0x0000000eu, 0x0000002fu, 161 0x000000fcu, 0x000000fdu, 0x000200f8u, 0x000000fcu, 0x00050041u, 0x000000bdu, 0x00000103u, 0x00000026u,
162 0x000200f9u, 0x00000228u, 0x000200f8u, 0x000000f9u, 0x0003003eu, 0x00000116u, 0x00000117u, 0x000300f7u, 162 0x000000bcu, 0x0004003du, 0x00000017u, 0x00000104u, 0x00000103u, 0x00050080u, 0x00000006u, 0x00000107u,
163 0x0000011eu, 0x00000000u, 0x000400fau, 0x00000071u, 0x0000011du, 0x00000165u, 0x000200f8u, 0x0000011du, 163 0x00000081u, 0x0000039eu, 0x00060041u, 0x0000002du, 0x00000108u, 0x00000104u, 0x0000002cu, 0x00000107u,
164 0x00050041u, 0x000000dau, 0x00000120u, 0x00000026u, 0x0000002cu, 0x0004003du, 0x00000015u, 0x00000121u, 164 0x0005003eu, 0x00000108u, 0x0000000eu, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x0000010au,
165 0x00000120u, 0x00060041u, 0x0000002du, 0x00000123u, 0x00000121u, 0x0000002cu, 0x000000ccu, 0x0006003du, 165 0x0000039eu, 0x00000091u, 0x000200f9u, 0x000000fbu, 0x000200f8u, 0x000000fdu, 0x00050041u, 0x00000029u,
166 0x00000006u, 0x00000124u, 0x00000123u, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x00000129u, 166 0x0000010bu, 0x00000026u, 0x000000a9u, 0x0004003du, 0x00000019u, 0x0000010cu, 0x0000010bu, 0x00060041u,
167 0x000000ccu, 0x0000002fu, 0x00060041u, 0x0000002du, 0x0000012au, 0x00000121u, 0x0000002cu, 0x00000129u, 167 0x0000002du, 0x0000010du, 0x0000010cu, 0x0000002cu, 0x0000002cu, 0x000700eau, 0x00000006u, 0x0000010eu,
168 0x0006003du, 0x00000006u, 0x0000012bu, 0x0000012au, 0x00000002u, 0x00000004u, 0x0007000cu, 0x00000006u, 168 0x0000010du, 0x0000002fu, 0x0000000eu, 0x0000002fu, 0x00060041u, 0x0000002du, 0x00000111u, 0x0000010cu,
169 0x0000012fu, 0x00000001u, 0x00000026u, 0x00000124u, 0x0000012eu, 0x0007000cu, 0x00000006u, 0x00000134u, 169 0x0000002cu, 0x0000009eu, 0x000700eau, 0x00000006u, 0x00000112u, 0x00000111u, 0x0000002fu, 0x0000000eu,
170 0x00000001u, 0x00000029u, 0x0000012fu, 0x0000002fu, 0x00050086u, 0x00000006u, 0x00000135u, 0x00000132u, 170 0x0000002fu, 0x000200f9u, 0x00000294u, 0x000200f8u, 0x000000f9u, 0x0003003eu, 0x00000116u, 0x00000117u,
171 0x00000134u, 0x0007000cu, 0x00000006u, 0x00000136u, 0x00000001u, 0x00000026u, 0x0000012bu, 0x00000135u, 171 0x000300f7u, 0x0000011eu, 0x00000000u, 0x000400fau, 0x00000071u, 0x0000011du, 0x0000016du, 0x000200f8u,
172 0x000500aau, 0x00000008u, 0x00000138u, 0x0000012fu, 0x0000000eu, 0x000600a9u, 0x00000006u, 0x000002f3u, 172 0x0000011du, 0x00050041u, 0x000000dau, 0x00000120u, 0x00000026u, 0x0000002cu, 0x0004003du, 0x00000015u,
173 0x00000138u, 0x0000000eu, 0x00000136u, 0x000500abu, 0x00000008u, 0x0000013du, 0x0000012fu, 0x00000124u, 173 0x00000121u, 0x00000120u, 0x00060041u, 0x0000002du, 0x00000123u, 0x00000121u, 0x0000002cu, 0x000000ccu,
174 0x000500abu, 0x00000008u, 0x00000140u, 0x000002f3u, 0x0000012bu, 0x000500a6u, 0x00000008u, 0x00000141u, 174 0x0006003du, 0x00000006u, 0x00000124u, 0x00000123u, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u,
175 0x0000013du, 0x00000140u, 0x000600a9u, 0x00000006u, 0x00000142u, 0x00000141u, 0x0000002fu, 0x0000000eu, 175 0x00000129u, 0x000000ccu, 0x0000002fu, 0x00060041u, 0x0000002du, 0x0000012au, 0x00000121u, 0x0000002cu,
176 0x00050084u, 0x00000006u, 0x00000145u, 0x0000012fu, 0x000002f3u, 0x00050041u, 0x00000007u, 0x00000147u, 176 0x00000129u, 0x0006003du, 0x00000006u, 0x0000012bu, 0x0000012au, 0x00000002u, 0x00000004u, 0x000500aeu,
177 0x00000116u, 0x0000002cu, 0x0003003eu, 0x00000147u, 0x0000012fu, 0x00050041u, 0x00000007u, 0x00000149u, 177 0x00000008u, 0x0000012fu, 0x00000124u, 0x0000012eu, 0x000300f7u, 0x00000132u, 0x00000000u, 0x000400fau,
178 0x00000116u, 0x00000091u, 0x0003003eu, 0x00000149u, 0x000002f3u, 0x00050080u, 0x00000006u, 0x0000014eu, 178 0x0000012fu, 0x00000131u, 0x00000133u, 0x000200f8u, 0x00000131u, 0x000200f9u, 0x00000132u, 0x000200f8u,
179 0x000000ccu, 0x0000014du, 0x00060041u, 0x0000002du, 0x0000014fu, 0x00000121u, 0x0000002cu, 0x0000014eu, 179 0x00000133u, 0x0007000cu, 0x00000006u, 0x00000136u, 0x00000001u, 0x00000026u, 0x00000124u, 0x00000135u,
180 0x0006003du, 0x00000006u, 0x00000150u, 0x0000014fu, 0x00000002u, 0x00000004u, 0x00050041u, 0x00000007u, 180 0x000200f9u, 0x00000132u, 0x000200f8u, 0x00000132u, 0x000700f5u, 0x00000006u, 0x00000331u, 0x0000000eu,
181 0x00000151u, 0x00000116u, 0x000000bcu, 0x0003003eu, 0x00000151u, 0x00000150u, 0x00050080u, 0x00000006u, 181 0x00000131u, 0x00000136u, 0x00000133u, 0x0007000cu, 0x00000006u, 0x0000013cu, 0x00000001u, 0x00000029u,
182 0x00000155u, 0x000000ccu, 0x0000007cu, 0x00060041u, 0x0000002du, 0x00000156u, 0x00000121u, 0x0000002cu, 182 0x00000331u, 0x0000002fu, 0x00050086u, 0x00000006u, 0x0000013du, 0x0000013au, 0x0000013cu, 0x0007000cu,
183 0x00000155u, 0x0006003du, 0x00000006u, 0x00000157u, 0x00000156u, 0x00000002u, 0x00000004u, 0x00050041u, 183 0x00000006u, 0x0000013eu, 0x00000001u, 0x00000026u, 0x0000012bu, 0x0000013du, 0x000500aau, 0x00000008u,
184 0x00000007u, 0x00000158u, 0x00000116u, 0x0000009eu, 0x0003003eu, 0x00000158u, 0x00000157u, 0x000500aau, 184 0x00000140u, 0x00000331u, 0x0000000eu, 0x000600a9u, 0x00000006u, 0x000003a9u, 0x00000140u, 0x0000000eu,
185 0x00000008u, 0x0000015bu, 0x00000070u, 0x0000002fu, 0x000300f7u, 0x0000015du, 0x00000000u, 0x000400fau, 185 0x0000013eu, 0x000500abu, 0x00000008u, 0x00000145u, 0x00000331u, 0x00000124u, 0x000500abu, 0x00000008u,
186 0x0000015bu, 0x0000015cu, 0x0000015du, 0x000200f8u, 0x0000015cu, 0x00050080u, 0x00000006u, 0x00000161u, 186 0x00000148u, 0x000003a9u, 0x0000012bu, 0x000500a6u, 0x00000008u, 0x00000149u, 0x00000145u, 0x00000148u,
187 0x000000ccu, 0x00000078u, 0x00060041u, 0x0000002du, 0x00000162u, 0x00000121u, 0x0000002cu, 0x00000161u, 187 0x000600a9u, 0x00000006u, 0x0000014au, 0x00000149u, 0x0000002fu, 0x0000000eu, 0x00050084u, 0x00000006u,
188 0x0006003du, 0x00000006u, 0x00000163u, 0x00000162u, 0x00000002u, 0x00000004u, 0x00050041u, 0x00000007u, 188 0x0000014du, 0x00000331u, 0x000003a9u, 0x00050041u, 0x00000007u, 0x0000014fu, 0x00000116u, 0x0000002cu,
189 0x00000164u, 0x00000116u, 0x000000a9u, 0x0003003eu, 0x00000164u, 0x00000163u, 0x000200f9u, 0x0000015du, 189 0x0003003eu, 0x0000014fu, 0x00000331u, 0x00050041u, 0x00000007u, 0x00000151u, 0x00000116u, 0x00000091u,
190 0x000200f8u, 0x0000015du, 0x000200f9u, 0x0000011eu, 0x000200f8u, 0x00000165u, 0x00050041u, 0x000000dau, 190 0x0003003eu, 0x00000151u, 0x000003a9u, 0x00050080u, 0x00000006u, 0x00000156u, 0x000000ccu, 0x00000155u,
191 0x00000167u, 0x00000026u, 0x0000002cu, 0x0004003du, 0x00000015u, 0x00000168u, 0x00000167u, 0x00060041u, 191 0x00060041u, 0x0000002du, 0x00000157u, 0x00000121u, 0x0000002cu, 0x00000156u, 0x0006003du, 0x00000006u,
192 0x0000002du, 0x0000016au, 0x00000168u, 0x0000002cu, 0x000000ccu, 0x0006003du, 0x00000006u, 0x0000016bu, 192 0x00000158u, 0x00000157u, 0x00000002u, 0x00000004u, 0x00050041u, 0x00000007u, 0x00000159u, 0x00000116u,
193 0x0000016au, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x00000170u, 0x000000ccu, 0x0000002fu, 193 0x000000bcu, 0x0003003eu, 0x00000159u, 0x00000158u, 0x00050080u, 0x00000006u, 0x0000015du, 0x000000ccu,
194 0x00060041u, 0x0000002du, 0x00000171u, 0x00000168u, 0x0000002cu, 0x00000170u, 0x0006003du, 0x00000006u, 194 0x0000007cu, 0x00060041u, 0x0000002du, 0x0000015eu, 0x00000121u, 0x0000002cu, 0x0000015du, 0x0006003du,
195 0x00000172u, 0x00000171u, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x00000177u, 0x000000ccu, 195 0x00000006u, 0x0000015fu, 0x0000015eu, 0x00000002u, 0x00000004u, 0x00050041u, 0x00000007u, 0x00000160u,
196 0x0000014du, 0x00060041u, 0x0000002du, 0x00000178u, 0x00000168u, 0x0000002cu, 0x00000177u, 0x0006003du, 196 0x00000116u, 0x0000009eu, 0x0003003eu, 0x00000160u, 0x0000015fu, 0x000500aau, 0x00000008u, 0x00000163u,
197 0x00000006u, 0x00000179u, 0x00000178u, 0x00000002u, 0x00000004u, 0x000500aau, 0x00000008u, 0x0000017cu, 197 0x00000070u, 0x0000002fu, 0x000300f7u, 0x00000165u, 0x00000000u, 0x000400fau, 0x00000163u, 0x00000164u,
198 0x00000070u, 0x0000007cu, 0x000300f7u, 0x0000017eu, 0x00000000u, 0x000400fau, 0x0000017cu, 0x0000017du, 198 0x00000165u, 0x000200f8u, 0x00000164u, 0x00050080u, 0x00000006u, 0x00000169u, 0x000000ccu, 0x00000078u,
199 0x0000017eu, 0x000200f8u, 0x0000017du, 0x00050041u, 0x00000029u, 0x0000017fu, 0x00000026u, 0x000000a9u, 199 0x00060041u, 0x0000002du, 0x0000016au, 0x00000121u, 0x0000002cu, 0x00000169u, 0x0006003du, 0x00000006u,
200 0x0004003du, 0x00000019u, 0x00000180u, 0x0000017fu, 0x00060041u, 0x0000002du, 0x00000181u, 0x00000180u, 200 0x0000016bu, 0x0000016au, 0x00000002u, 0x00000004u, 0x00050041u, 0x00000007u, 0x0000016cu, 0x00000116u,
201 0x0000002cu, 0x0000005fu, 0x000700eau, 0x00000006u, 0x00000182u, 0x00000181u, 0x0000002fu, 0x0000000eu, 201 0x000000a9u, 0x0003003eu, 0x0000016cu, 0x0000016bu, 0x000200f9u, 0x00000165u, 0x000200f8u, 0x00000165u,
202 0x0000002fu, 0x000500acu, 0x00000008u, 0x00000184u, 0x00000172u, 0x0000002fu, 0x000500acu, 0x00000008u, 202 0x000200f9u, 0x0000011eu, 0x000200f8u, 0x0000016du, 0x00050041u, 0x000000dau, 0x0000016fu, 0x00000026u,
203 0x00000186u, 0x00000179u, 0x0000002fu, 0x000500a6u, 0x00000008u, 0x00000187u, 0x00000184u, 0x00000186u, 203 0x0000002cu, 0x0004003du, 0x00000015u, 0x00000170u, 0x0000016fu, 0x00060041u, 0x0000002du, 0x00000172u,
204 0x000300f7u, 0x00000189u, 0x00000000u, 0x000400fau, 0x00000187u, 0x00000188u, 0x00000189u, 0x000200f8u, 204 0x00000170u, 0x0000002cu, 0x000000ccu, 0x0006003du, 0x00000006u, 0x00000173u, 0x00000172u, 0x00000002u,
205 0x00000188u, 0x00060041u, 0x0000002du, 0x0000018cu, 0x00000180u, 0x0000002cu, 0x00000068u, 0x000700eau, 205 0x00000004u, 0x00050080u, 0x00000006u, 0x00000178u, 0x000000ccu, 0x0000002fu, 0x00060041u, 0x0000002du,
206 0x00000006u, 0x0000018du, 0x0000018cu, 0x0000002fu, 0x0000000eu, 0x0000002fu, 0x00060041u, 0x0000002du, 206 0x00000179u, 0x00000170u, 0x0000002cu, 0x00000178u, 0x0006003du, 0x00000006u, 0x0000017au, 0x00000179u,
207 0x00000190u, 0x00000180u, 0x0000002cu, 0x0000008au, 0x000700efu, 0x00000006u, 0x00000192u, 0x00000190u, 207 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x0000017fu, 0x000000ccu, 0x00000155u, 0x00060041u,
208 0x0000002fu, 0x0000000eu, 0x00000172u, 0x00060041u, 0x0000002du, 0x00000195u, 0x00000180u, 0x0000002cu, 208 0x0000002du, 0x00000180u, 0x00000170u, 0x0000002cu, 0x0000017fu, 0x0006003du, 0x00000006u, 0x00000181u,
209 0x00000084u, 0x000700efu, 0x00000006u, 0x00000197u, 0x00000195u, 0x0000002fu, 0x0000000eu, 0x00000179u, 209 0x00000180u, 0x00000002u, 0x00000004u, 0x000500aau, 0x00000008u, 0x00000184u, 0x00000070u, 0x0000007cu,
210 0x000200f9u, 0x00000189u, 0x000200f8u, 0x00000189u, 0x000200f9u, 0x0000017eu, 0x000200f8u, 0x0000017eu, 210 0x000300f7u, 0x00000186u, 0x00000000u, 0x000400fau, 0x00000184u, 0x00000185u, 0x00000186u, 0x000200f8u,
211 0x0007000cu, 0x00000006u, 0x0000019bu, 0x00000001u, 0x00000026u, 0x0000016bu, 0x0000019au, 0x0007000cu, 211 0x00000185u, 0x00050041u, 0x00000029u, 0x00000187u, 0x00000026u, 0x000000a9u, 0x0004003du, 0x00000019u,
212 0x00000006u, 0x0000019eu, 0x00000001u, 0x00000026u, 0x00000172u, 0x0000019au, 0x0007000cu, 0x00000006u, 212 0x00000188u, 0x00000187u, 0x00060041u, 0x0000002du, 0x00000189u, 0x00000188u, 0x0000002cu, 0x0000005fu,
213 0x000001a1u, 0x00000001u, 0x00000026u, 0x00000179u, 0x0000019au, 0x000600a9u, 0x00000006u, 0x000002f4u, 213 0x000700eau, 0x00000006u, 0x0000018au, 0x00000189u, 0x0000002fu, 0x0000000eu, 0x0000002fu, 0x000500acu,
214 0x0000017cu, 0x0000002fu, 0x000001a1u, 0x000600a9u, 0x00000006u, 0x000002f5u, 0x0000017cu, 0x0000002fu, 214 0x00000008u, 0x0000018cu, 0x0000017au, 0x0000002fu, 0x000500acu, 0x00000008u, 0x0000018eu, 0x00000181u,
215 0x0000019eu, 0x000500c2u, 0x00000006u, 0x000001aau, 0x00000086u, 0x0000002fu, 0x000500abu, 0x00000008u, 215 0x0000002fu, 0x000500a6u, 0x00000008u, 0x0000018fu, 0x0000018cu, 0x0000018eu, 0x000300f7u, 0x00000191u,
216 0x000001acu, 0x000001aau, 0x0000000eu, 0x000500abu, 0x00000008u, 0x000001aeu, 0x0000019bu, 0x0000000eu, 216 0x00000000u, 0x000400fau, 0x0000018fu, 0x00000190u, 0x00000191u, 0x000200f8u, 0x00000190u, 0x00060041u,
217 0x000500a7u, 0x00000008u, 0x000001afu, 0x000001acu, 0x000001aeu, 0x000500abu, 0x00000008u, 0x000001b1u, 217 0x0000002du, 0x00000194u, 0x00000188u, 0x0000002cu, 0x00000068u, 0x000700eau, 0x00000006u, 0x00000195u,
218 0x000002f5u, 0x0000000eu, 0x000500a7u, 0x00000008u, 0x000001b2u, 0x000001afu, 0x000001b1u, 0x000500abu, 218 0x00000194u, 0x0000002fu, 0x0000000eu, 0x0000002fu, 0x00060041u, 0x0000002du, 0x00000198u, 0x00000188u,
219 0x00000008u, 0x000001b4u, 0x000002f4u, 0x0000000eu, 0x000500a7u, 0x00000008u, 0x000001b5u, 0x000001b2u, 219 0x0000002cu, 0x0000008au, 0x000700efu, 0x00000006u, 0x0000019au, 0x00000198u, 0x0000002fu, 0x0000000eu,
220 0x000001b4u, 0x000300f7u, 0x000001b7u, 0x00000000u, 0x000400fau, 0x000001b5u, 0x000001b6u, 0x000001b7u, 220 0x0000017au, 0x00060041u, 0x0000002du, 0x0000019du, 0x00000188u, 0x0000002cu, 0x00000084u, 0x000700efu,
221 0x000200f8u, 0x000001b6u, 0x0007000cu, 0x00000006u, 0x000001bau, 0x00000001u, 0x00000026u, 0x0000019bu, 221 0x00000006u, 0x0000019fu, 0x0000019du, 0x0000002fu, 0x0000000eu, 0x00000181u, 0x000200f9u, 0x00000191u,
222 0x000001aau, 0x00050086u, 0x00000006u, 0x000001beu, 0x000001aau, 0x000001bau, 0x0007000cu, 0x00000006u, 222 0x000200f8u, 0x00000191u, 0x000200f9u, 0x00000186u, 0x000200f8u, 0x00000186u, 0x000300f7u, 0x000001a7u,
223 0x000001bfu, 0x00000001u, 0x00000026u, 0x000002f5u, 0x000001beu, 0x00050086u, 0x00000006u, 0x000001c5u, 223 0x00000000u, 0x000400fau, 0x00000184u, 0x000001a6u, 0x000001aau, 0x000200f8u, 0x000001a6u, 0x000200f9u,
224 0x000001beu, 0x000001bfu, 0x0007000cu, 0x00000006u, 0x000001c6u, 0x00000001u, 0x00000026u, 0x000002f4u, 224 0x000001a7u, 0x000200f8u, 0x000001aau, 0x00050041u, 0x00000060u, 0x000001acu, 0x00000026u, 0x000001abu,
225 0x000001c5u, 0x000200f9u, 0x000001b7u, 0x000200f8u, 0x000001b7u, 0x000700f5u, 0x00000006u, 0x00000284u, 225 0x0004003du, 0x00000006u, 0x000001adu, 0x000001acu, 0x00050041u, 0x00000060u, 0x000001afu, 0x00000026u,
226 0x000002f5u, 0x0000017eu, 0x000001bfu, 0x000001b6u, 0x000700f5u, 0x00000006u, 0x00000283u, 0x0000019bu, 226 0x000001aeu, 0x0004003du, 0x00000006u, 0x000001b0u, 0x000001afu, 0x00050041u, 0x00000060u, 0x000001b2u,
227 0x0000017eu, 0x000001bau, 0x000001b6u, 0x000700f5u, 0x00000006u, 0x00000282u, 0x000002f4u, 0x0000017eu, 227 0x00000026u, 0x000001b1u, 0x0004003du, 0x00000006u, 0x000001b3u, 0x000001b2u, 0x00060050u, 0x00000058u,
228 0x000001c6u, 0x000001b6u, 0x000500abu, 0x00000008u, 0x000001c8u, 0x00000282u, 0x0000000eu, 0x000300f7u, 228 0x000001b4u, 0x000001adu, 0x000001b0u, 0x000001b3u, 0x0007000cu, 0x00000058u, 0x000001b6u, 0x00000001u,
229 0x000001cau, 0x00000000u, 0x000400fau, 0x000001c8u, 0x000001c9u, 0x000001cau, 0x000200f8u, 0x000001c9u, 229 0x00000029u, 0x000001b4u, 0x000001b5u, 0x000200f9u, 0x000001a7u, 0x000200f8u, 0x000001a7u, 0x000700f5u,
230 0x00050084u, 0x00000006u, 0x000001cdu, 0x00000283u, 0x00000284u, 0x00050086u, 0x00000006u, 0x000001d0u, 230 0x00000058u, 0x000002e5u, 0x000001a9u, 0x000001a6u, 0x000001b6u, 0x000001aau, 0x00050051u, 0x00000006u,
231 0x000001ceu, 0x00000282u, 0x000500acu, 0x00000008u, 0x000001d1u, 0x000001cdu, 0x000001d0u, 0x000200f9u, 231 0x000001bbu, 0x000002e5u, 0x00000000u, 0x0007000cu, 0x00000006u, 0x000001bcu, 0x00000001u, 0x00000026u,
232 0x000001cau, 0x000200f8u, 0x000001cau, 0x000700f5u, 0x00000008u, 0x000001d2u, 0x000001c8u, 0x000001b7u, 232 0x00000173u, 0x000001bbu, 0x00050051u, 0x00000006u, 0x000001c0u, 0x000002e5u, 0x00000001u, 0x0007000cu,
233 0x000001d1u, 0x000001c9u, 0x000600a9u, 0x00000006u, 0x000002f6u, 0x000001d2u, 0x0000000eu, 0x00000282u, 233 0x00000006u, 0x000001c1u, 0x00000001u, 0x00000026u, 0x0000017au, 0x000001c0u, 0x00050051u, 0x00000006u,
234 0x000600a9u, 0x00000006u, 0x000002f7u, 0x000001d2u, 0x0000000eu, 0x00000284u, 0x000600a9u, 0x00000006u, 234 0x000001c5u, 0x000002e5u, 0x00000002u, 0x0007000cu, 0x00000006u, 0x000001c6u, 0x00000001u, 0x00000026u,
235 0x000002f8u, 0x000001d2u, 0x0000000eu, 0x00000283u, 0x000500abu, 0x00000008u, 0x000001d7u, 0x000002f8u, 235 0x00000181u, 0x000001c5u, 0x000600a9u, 0x00000006u, 0x000003aau, 0x00000184u, 0x0000002fu, 0x000001c6u,
236 0x0000016bu, 0x000500abu, 0x00000008u, 0x000001dau, 0x000002f7u, 0x00000172u, 0x000500a6u, 0x00000008u, 236 0x000600a9u, 0x00000006u, 0x000003abu, 0x00000184u, 0x0000002fu, 0x000001c1u, 0x000500abu, 0x00000008u,
237 0x000001dbu, 0x000001d7u, 0x000001dau, 0x000500abu, 0x00000008u, 0x000001deu, 0x000002f6u, 0x00000179u, 237 0x000001cfu, 0x00000070u, 0x0000007cu, 0x000300f7u, 0x000001d1u, 0x00000000u, 0x000400fau, 0x000001cfu,
238 0x000500a6u, 0x00000008u, 0x000001dfu, 0x000001dbu, 0x000001deu, 0x000600a9u, 0x00000006u, 0x000001e0u, 238 0x000001d0u, 0x000001d1u, 0x000200f8u, 0x000001d0u, 0x000500abu, 0x00000008u, 0x000001d4u, 0x000001bcu,
239 0x000001dfu, 0x0000002fu, 0x0000000eu, 0x00050084u, 0x00000006u, 0x000001e3u, 0x000002f8u, 0x000002f7u, 239 0x00000173u, 0x000500abu, 0x00000008u, 0x000001d7u, 0x000003abu, 0x0000017au, 0x000500a6u, 0x00000008u,
240 0x00050084u, 0x00000006u, 0x000001e5u, 0x000001e3u, 0x000002f6u, 0x000600a9u, 0x00000006u, 0x000001ebu, 240 0x000001d8u, 0x000001d4u, 0x000001d7u, 0x000500abu, 0x00000008u, 0x000001dbu, 0x000003aau, 0x00000181u,
241 0x0000017cu, 0x000001e9u, 0x000001eau, 0x00050084u, 0x00000006u, 0x000001ecu, 0x000001e5u, 0x000001ebu, 241 0x000500a6u, 0x00000008u, 0x000001dcu, 0x000001d8u, 0x000001dbu, 0x000200f9u, 0x000001d1u, 0x000200f8u,
242 0x00050041u, 0x00000007u, 0x000001eeu, 0x00000116u, 0x0000002cu, 0x0003003eu, 0x000001eeu, 0x000002f8u, 242 0x000001d1u, 0x000700f5u, 0x00000008u, 0x000001ddu, 0x000001cfu, 0x000001a7u, 0x000001dcu, 0x000001d0u,
243 0x00050041u, 0x00000007u, 0x000001f0u, 0x00000116u, 0x00000091u, 0x0003003eu, 0x000001f0u, 0x000002f7u, 243 0x000500c2u, 0x00000006u, 0x000001e1u, 0x00000086u, 0x0000002fu, 0x000500abu, 0x00000008u, 0x000001e3u,
244 0x00050041u, 0x00000007u, 0x000001f2u, 0x00000116u, 0x000000bcu, 0x0003003eu, 0x000001f2u, 0x000002f6u, 244 0x000001e1u, 0x0000000eu, 0x000500abu, 0x00000008u, 0x000001e5u, 0x000001bcu, 0x0000000eu, 0x000500a7u,
245 0x000200f9u, 0x0000011eu, 0x000200f8u, 0x0000011eu, 0x000700f5u, 0x00000006u, 0x000002b8u, 0x00000142u, 245 0x00000008u, 0x000001e6u, 0x000001e3u, 0x000001e5u, 0x000500abu, 0x00000008u, 0x000001e8u, 0x000003abu,
246 0x0000015du, 0x000001e0u, 0x000001cau, 0x000700f5u, 0x00000006u, 0x0000029cu, 0x00000145u, 0x0000015du, 246 0x0000000eu, 0x000500a7u, 0x00000008u, 0x000001e9u, 0x000001e6u, 0x000001e8u, 0x000500abu, 0x00000008u,
247 0x000001ecu, 0x000001cau, 0x000500abu, 0x00000008u, 0x000001f4u, 0x0000029cu, 0x0000000eu, 0x000300f7u, 247 0x000001ebu, 0x000003aau, 0x0000000eu, 0x000500a7u, 0x00000008u, 0x000001ecu, 0x000001e9u, 0x000001ebu,
248 0x000001f6u, 0x00000000u, 0x000400fau, 0x000001f4u, 0x000001f5u, 0x000001f6u, 0x000200f8u, 0x000001f5u, 248 0x000300f7u, 0x000001eeu, 0x00000000u, 0x000400fau, 0x000001ecu, 0x000001edu, 0x000001eeu, 0x000200f8u,
249 0x000300f7u, 0x00000262u, 0x00000000u, 0x000300fbu, 0x0000000eu, 0x0000023au, 0x000200f8u, 0x0000023au, 249 0x000001edu, 0x0007000cu, 0x00000006u, 0x000001f1u, 0x00000001u, 0x00000026u, 0x000001bcu, 0x000001e1u,
250 0x000500aau, 0x00000008u, 0x0000023cu, 0x0000029cu, 0x0000000eu, 0x000300f7u, 0x0000023eu, 0x00000000u, 250 0x00050086u, 0x00000006u, 0x000001f5u, 0x000001e1u, 0x000001f1u, 0x0007000cu, 0x00000006u, 0x000001f6u,
251 0x000400fau, 0x0000023cu, 0x0000023du, 0x0000023eu, 0x000200f8u, 0x0000023du, 0x000200f9u, 0x00000262u, 251 0x00000001u, 0x00000026u, 0x000003abu, 0x000001f5u, 0x00050086u, 0x00000006u, 0x000001fcu, 0x000001f5u,
252 0x000200f8u, 0x0000023eu, 0x00050041u, 0x00000029u, 0x0000023fu, 0x00000026u, 0x00000028u, 0x0004003du, 252 0x000001f6u, 0x0007000cu, 0x00000006u, 0x000001fdu, 0x00000001u, 0x00000026u, 0x000003aau, 0x000001fcu,
253 0x00000019u, 0x00000240u, 0x0000023fu, 0x00060041u, 0x0000002du, 0x00000241u, 0x00000240u, 0x0000002cu, 253 0x000200f9u, 0x000001eeu, 0x000200f8u, 0x000001eeu, 0x000700f5u, 0x00000006u, 0x000002fau, 0x000003aau,
254 0x0000002cu, 0x000700eau, 0x00000006u, 0x00000242u, 0x00000241u, 0x0000002fu, 0x0000000eu, 0x0000000eu, 254 0x000001d1u, 0x000001fdu, 0x000001edu, 0x000700f5u, 0x00000006u, 0x000002f9u, 0x000003abu, 0x000001d1u,
255 0x000200f9u, 0x00000243u, 0x000200f8u, 0x00000243u, 0x000700f5u, 0x00000006u, 0x0000029eu, 0x00000242u, 255 0x000001f6u, 0x000001edu, 0x000700f5u, 0x00000006u, 0x000002f8u, 0x000001bcu, 0x000001d1u, 0x000001f1u,
256 0x0000023eu, 0x00000257u, 0x0000025eu, 0x000500b0u, 0x00000008u, 0x00000246u, 0x0000029eu, 0x00000037u, 256 0x000001edu, 0x000500abu, 0x00000008u, 0x000001ffu, 0x000002f8u, 0x0000000eu, 0x000500abu, 0x00000008u,
257 0x000400f6u, 0x0000025fu, 0x0000025eu, 0x00000000u, 0x000400fau, 0x00000246u, 0x00000247u, 0x0000025fu, 257 0x00000201u, 0x000002f9u, 0x0000000eu, 0x000500a7u, 0x00000008u, 0x00000202u, 0x000001ffu, 0x00000201u,
258 0x000200f8u, 0x00000247u, 0x00050082u, 0x00000006u, 0x00000249u, 0x00000037u, 0x0000029eu, 0x000500acu, 258 0x000500abu, 0x00000008u, 0x00000204u, 0x000002fau, 0x0000000eu, 0x000500a7u, 0x00000008u, 0x00000205u,
259 0x00000008u, 0x0000024cu, 0x0000029cu, 0x00000249u, 0x000300f7u, 0x0000024eu, 0x00000000u, 0x000400fau, 259 0x00000202u, 0x00000204u, 0x000300f7u, 0x00000207u, 0x00000000u, 0x000400fau, 0x00000205u, 0x00000206u,
260 0x0000024cu, 0x0000024du, 0x0000024eu, 0x000200f8u, 0x0000024du, 0x000200f9u, 0x0000025fu, 0x000200f8u, 260 0x00000207u, 0x000200f8u, 0x00000206u, 0x000500acu, 0x00000008u, 0x0000020au, 0x000002f8u, 0x00000209u,
261 0x0000024eu, 0x00050080u, 0x00000006u, 0x00000251u, 0x0000029eu, 0x0000029cu, 0x000900e6u, 0x00000006u, 261 0x000400a8u, 0x00000008u, 0x0000020bu, 0x0000020au, 0x000300f7u, 0x0000020du, 0x00000000u, 0x000400fau,
262 0x00000257u, 0x00000241u, 0x0000002fu, 0x0000000eu, 0x0000000eu, 0x00000251u, 0x0000029eu, 0x000500aau, 262 0x0000020bu, 0x0000020cu, 0x0000020du, 0x000200f8u, 0x0000020cu, 0x00050086u, 0x00000006u, 0x00000210u,
263 0x00000008u, 0x0000025au, 0x00000257u, 0x0000029eu, 0x000300f7u, 0x0000025cu, 0x00000000u, 0x000400fau, 263 0x00000209u, 0x000002f8u, 0x000500acu, 0x00000008u, 0x00000211u, 0x000002f9u, 0x00000210u, 0x000200f9u,
264 0x0000025au, 0x0000025bu, 0x0000025cu, 0x000200f8u, 0x0000025bu, 0x000200f9u, 0x0000025fu, 0x000200f8u, 264 0x0000020du, 0x000200f8u, 0x0000020du, 0x000700f5u, 0x00000008u, 0x00000212u, 0x0000020au, 0x00000206u,
265 0x0000025cu, 0x000200f9u, 0x0000025eu, 0x000200f8u, 0x0000025eu, 0x000200f9u, 0x00000243u, 0x000200f8u, 265 0x00000211u, 0x0000020cu, 0x000400a8u, 0x00000008u, 0x00000213u, 0x00000212u, 0x000300f7u, 0x00000215u,
266 0x0000025fu, 0x000900f5u, 0x00000008u, 0x000002a3u, 0x000002acu, 0x00000243u, 0x00000041u, 0x0000024du, 266 0x00000000u, 0x000400fau, 0x00000213u, 0x00000214u, 0x00000215u, 0x000200f8u, 0x00000214u, 0x00050086u,
267 0x00000012u, 0x0000025bu, 0x000900f5u, 0x00000008u, 0x000002a0u, 0x00000041u, 0x00000243u, 0x00000012u, 267 0x00000006u, 0x00000218u, 0x00000209u, 0x000002f8u, 0x00050086u, 0x00000006u, 0x0000021au, 0x00000218u,
268 0x0000024du, 0x00000012u, 0x0000025bu, 0x000300f7u, 0x00000261u, 0x00000000u, 0x000400fau, 0x000002a0u, 268 0x000002f9u, 0x000500acu, 0x00000008u, 0x0000021bu, 0x000002fau, 0x0000021au, 0x000200f9u, 0x00000215u,
269 0x00000262u, 0x00000261u, 0x000200f8u, 0x00000261u, 0x000200f9u, 0x00000262u, 0x000200f8u, 0x00000262u, 269 0x000200f8u, 0x00000215u, 0x000700f5u, 0x00000008u, 0x0000021cu, 0x00000212u, 0x0000020du, 0x0000021bu,
270 0x000900f5u, 0x00000008u, 0x000002a2u, 0x00000012u, 0x0000023du, 0x000002a3u, 0x0000025fu, 0x00000041u, 270 0x00000214u, 0x000200f9u, 0x00000207u, 0x000200f8u, 0x00000207u, 0x000700f5u, 0x00000008u, 0x0000021du,
271 0x00000261u, 0x000400a8u, 0x00000008u, 0x000001fau, 0x000002a2u, 0x000200f9u, 0x000001f6u, 0x000200f8u, 271 0x00000205u, 0x000001eeu, 0x0000021cu, 0x00000215u, 0x000600a9u, 0x00000006u, 0x000003acu, 0x0000021du,
272 0x000001f6u, 0x000700f5u, 0x00000008u, 0x000001fbu, 0x000001f4u, 0x0000011eu, 0x000001fau, 0x00000262u, 272 0x0000000eu, 0x000002fau, 0x000600a9u, 0x00000006u, 0x000003adu, 0x0000021du, 0x0000000eu, 0x000002f9u,
273 0x000300f7u, 0x000001fdu, 0x00000000u, 0x000400fau, 0x000001fbu, 0x000001fcu, 0x000001fdu, 0x000200f8u, 273 0x000600a9u, 0x00000006u, 0x000003aeu, 0x0000021du, 0x0000000eu, 0x000002f8u, 0x000300f7u, 0x00000224u,
274 0x000001fcu, 0x00050041u, 0x00000029u, 0x000001feu, 0x00000026u, 0x000000a9u, 0x0004003du, 0x00000019u, 274 0x00000000u, 0x000400fau, 0x000001cfu, 0x00000223u, 0x00000224u, 0x000200f8u, 0x00000223u, 0x00050041u,
275 0x000001ffu, 0x000001feu, 0x00060041u, 0x0000002du, 0x00000200u, 0x000001ffu, 0x0000002cu, 0x000000bcu, 275 0x00000029u, 0x00000225u, 0x00000026u, 0x000000a9u, 0x0004003du, 0x00000019u, 0x00000226u, 0x00000225u,
276 0x000700eau, 0x00000006u, 0x00000201u, 0x00000200u, 0x0000002fu, 0x0000000eu, 0x0000002fu, 0x0003003eu, 276 0x00060041u, 0x0000002du, 0x00000228u, 0x00000226u, 0x0000002cu, 0x00000227u, 0x000700eau, 0x00000006u,
277 0x00000116u, 0x00000117u, 0x000200f9u, 0x000001fdu, 0x000200f8u, 0x000001fdu, 0x000600a9u, 0x00000006u, 277 0x00000229u, 0x00000228u, 0x0000002fu, 0x0000000eu, 0x0000002fu, 0x000500acu, 0x00000008u, 0x0000022bu,
278 0x000002f9u, 0x000001fbu, 0x0000002fu, 0x000002b8u, 0x000500abu, 0x00000008u, 0x00000203u, 0x000002f9u, 278 0x000003aeu, 0x000001a8u, 0x000300f7u, 0x0000022du, 0x00000000u, 0x000400fau, 0x0000022bu, 0x0000022cu,
279 0x0000000eu, 0x000300f7u, 0x00000205u, 0x00000000u, 0x000400fau, 0x00000203u, 0x00000204u, 0x00000205u, 279 0x0000022du, 0x000200f8u, 0x0000022cu, 0x00060041u, 0x0000002du, 0x00000230u, 0x00000226u, 0x0000002cu,
280 0x000200f8u, 0x00000204u, 0x00050041u, 0x00000029u, 0x00000206u, 0x00000026u, 0x000000a9u, 0x0004003du, 280 0x000001abu, 0x000700eau, 0x00000006u, 0x00000231u, 0x00000230u, 0x0000002fu, 0x0000000eu, 0x0000002fu,
281 0x00000019u, 0x00000207u, 0x00000206u, 0x00060041u, 0x0000002du, 0x00000208u, 0x00000207u, 0x0000002cu, 281 0x000200f9u, 0x0000022du, 0x000200f8u, 0x0000022du, 0x00060041u, 0x0000002du, 0x00000234u, 0x00000226u,
282 0x0000002cu, 0x000700eau, 0x00000006u, 0x00000209u, 0x00000208u, 0x0000002fu, 0x0000000eu, 0x0000002fu, 282 0x0000002cu, 0x000001aeu, 0x000700efu, 0x00000006u, 0x00000236u, 0x00000234u, 0x0000002fu, 0x0000000eu,
283 0x00050041u, 0x00000007u, 0x0000020au, 0x00000116u, 0x0000002cu, 0x0004003du, 0x00000006u, 0x0000020bu, 283 0x000003aeu, 0x000500abu, 0x00000008u, 0x00000239u, 0x000003aeu, 0x0000000eu, 0x000500a7u, 0x00000008u,
284 0x0000020au, 0x000500aau, 0x00000008u, 0x0000020cu, 0x0000020bu, 0x0000000eu, 0x000300f7u, 0x0000020eu, 284 0x0000023au, 0x000001ddu, 0x00000239u, 0x000300f7u, 0x0000023cu, 0x00000000u, 0x000400fau, 0x0000023au,
285 0x00000000u, 0x000400fau, 0x0000020cu, 0x0000020du, 0x0000020eu, 0x000200f8u, 0x0000020du, 0x00060041u, 285 0x0000023bu, 0x0000023cu, 0x000200f8u, 0x0000023bu, 0x00060041u, 0x0000002du, 0x0000023fu, 0x00000226u,
286 0x0000002du, 0x00000211u, 0x00000207u, 0x0000002cu, 0x0000009eu, 0x000700eau, 0x00000006u, 0x00000212u, 286 0x0000002cu, 0x000001b1u, 0x000700eau, 0x00000006u, 0x00000240u, 0x0000023fu, 0x0000002fu, 0x0000000eu,
287 0x00000211u, 0x0000002fu, 0x0000000eu, 0x0000002fu, 0x000200f9u, 0x0000020eu, 0x000200f8u, 0x0000020eu, 287 0x0000002fu, 0x000200f9u, 0x0000023cu, 0x000200f8u, 0x0000023cu, 0x000200f9u, 0x00000224u, 0x000200f8u,
288 0x000200f9u, 0x00000205u, 0x000200f8u, 0x00000205u, 0x000200f9u, 0x00000214u, 0x000200f8u, 0x00000214u, 288 0x00000224u, 0x000500abu, 0x00000008u, 0x00000243u, 0x000003aeu, 0x00000173u, 0x000500abu, 0x00000008u,
289 0x000700f5u, 0x00000006u, 0x000002bdu, 0x0000000eu, 0x00000205u, 0x00000226u, 0x00000215u, 0x000500b0u, 289 0x00000246u, 0x000003adu, 0x0000017au, 0x000500a6u, 0x00000008u, 0x00000247u, 0x00000243u, 0x00000246u,
290 0x00000008u, 0x0000021bu, 0x000002bdu, 0x00000264u, 0x000400f6u, 0x00000216u, 0x00000215u, 0x00000000u, 290 0x000500abu, 0x00000008u, 0x0000024au, 0x000003acu, 0x00000181u, 0x000500a6u, 0x00000008u, 0x0000024bu,
291 0x000400fau, 0x0000021bu, 0x00000215u, 0x00000216u, 0x000200f8u, 0x00000215u, 0x00050041u, 0x000000bdu, 291 0x00000247u, 0x0000024au, 0x000600a9u, 0x00000006u, 0x0000024cu, 0x0000024bu, 0x0000002fu, 0x0000000eu,
292 0x0000021cu, 0x00000026u, 0x000000bcu, 0x0004003du, 0x00000017u, 0x0000021du, 0x0000021cu, 0x00050080u, 292 0x00050084u, 0x00000006u, 0x0000024fu, 0x000003aeu, 0x000003adu, 0x00050084u, 0x00000006u, 0x00000251u,
293 0x00000006u, 0x00000220u, 0x00000081u, 0x000002bdu, 0x00050041u, 0x00000007u, 0x00000222u, 0x00000116u, 293 0x0000024fu, 0x000003acu, 0x000600a9u, 0x00000006u, 0x00000257u, 0x00000184u, 0x00000255u, 0x00000256u,
294 0x000002bdu, 0x0004003du, 0x00000006u, 0x00000223u, 0x00000222u, 0x00060041u, 0x0000002du, 0x00000224u, 294 0x00050084u, 0x00000006u, 0x00000258u, 0x00000251u, 0x00000257u, 0x00050041u, 0x00000007u, 0x0000025au,
295 0x0000021du, 0x0000002cu, 0x00000220u, 0x0005003eu, 0x00000224u, 0x00000223u, 0x00000002u, 0x00000004u, 295 0x00000116u, 0x0000002cu, 0x0003003eu, 0x0000025au, 0x000003aeu, 0x00050041u, 0x00000007u, 0x0000025cu,
296 0x00050080u, 0x00000006u, 0x00000226u, 0x000002bdu, 0x00000091u, 0x000200f9u, 0x00000214u, 0x000200f8u, 296 0x00000116u, 0x00000091u, 0x0003003eu, 0x0000025cu, 0x000003adu, 0x00050041u, 0x00000007u, 0x0000025eu,
297 0x00000216u, 0x000200f9u, 0x00000228u, 0x000200f8u, 0x00000228u, 0x000100fdu, 0x00010038u, 297 0x00000116u, 0x000000bcu, 0x0003003eu, 0x0000025eu, 0x000003acu, 0x000200f9u, 0x0000011eu, 0x000200f8u,
298 0x0000011eu, 0x000700f5u, 0x00000006u, 0x0000035eu, 0x0000014au, 0x00000165u, 0x0000024cu, 0x00000224u,
299 0x000700f5u, 0x00000006u, 0x0000033au, 0x0000014du, 0x00000165u, 0x00000258u, 0x00000224u, 0x000500abu,
300 0x00000008u, 0x00000260u, 0x0000033au, 0x0000000eu, 0x000300f7u, 0x00000262u, 0x00000000u, 0x000400fau,
301 0x00000260u, 0x00000261u, 0x00000262u, 0x000200f8u, 0x00000261u, 0x000300f7u, 0x000002ceu, 0x00000000u,
302 0x000300fbu, 0x0000000eu, 0x000002a6u, 0x000200f8u, 0x000002a6u, 0x000500aau, 0x00000008u, 0x000002a8u,
303 0x0000033au, 0x0000000eu, 0x000300f7u, 0x000002aau, 0x00000000u, 0x000400fau, 0x000002a8u, 0x000002a9u,
304 0x000002aau, 0x000200f8u, 0x000002a9u, 0x000200f9u, 0x000002ceu, 0x000200f8u, 0x000002aau, 0x00050041u,
305 0x00000029u, 0x000002abu, 0x00000026u, 0x00000028u, 0x0004003du, 0x00000019u, 0x000002acu, 0x000002abu,
306 0x00060041u, 0x0000002du, 0x000002adu, 0x000002acu, 0x0000002cu, 0x0000002cu, 0x000700eau, 0x00000006u,
307 0x000002aeu, 0x000002adu, 0x0000002fu, 0x0000000eu, 0x0000000eu, 0x000200f9u, 0x000002afu, 0x000200f8u,
308 0x000002afu, 0x000700f5u, 0x00000006u, 0x0000033cu, 0x000002aeu, 0x000002aau, 0x000002c3u, 0x000002cau,
309 0x000500b0u, 0x00000008u, 0x000002b2u, 0x0000033cu, 0x00000037u, 0x000400f6u, 0x000002cbu, 0x000002cau,
310 0x00000000u, 0x000400fau, 0x000002b2u, 0x000002b3u, 0x000002cbu, 0x000200f8u, 0x000002b3u, 0x00050082u,
311 0x00000006u, 0x000002b5u, 0x00000037u, 0x0000033cu, 0x000500acu, 0x00000008u, 0x000002b8u, 0x0000033au,
312 0x000002b5u, 0x000300f7u, 0x000002bau, 0x00000000u, 0x000400fau, 0x000002b8u, 0x000002b9u, 0x000002bau,
313 0x000200f8u, 0x000002b9u, 0x000200f9u, 0x000002cbu, 0x000200f8u, 0x000002bau, 0x00050080u, 0x00000006u,
314 0x000002bdu, 0x0000033cu, 0x0000033au, 0x000900e6u, 0x00000006u, 0x000002c3u, 0x000002adu, 0x0000002fu,
315 0x0000000eu, 0x0000000eu, 0x000002bdu, 0x0000033cu, 0x000500aau, 0x00000008u, 0x000002c6u, 0x000002c3u,
316 0x0000033cu, 0x000300f7u, 0x000002c8u, 0x00000000u, 0x000400fau, 0x000002c6u, 0x000002c7u, 0x000002c8u,
317 0x000200f8u, 0x000002c7u, 0x000200f9u, 0x000002cbu, 0x000200f8u, 0x000002c8u, 0x000200f9u, 0x000002cau,
318 0x000200f8u, 0x000002cau, 0x000200f9u, 0x000002afu, 0x000200f8u, 0x000002cbu, 0x000900f5u, 0x00000008u,
319 0x00000341u, 0x0000034bu, 0x000002afu, 0x00000041u, 0x000002b9u, 0x00000012u, 0x000002c7u, 0x000900f5u,
320 0x00000008u, 0x0000033eu, 0x00000041u, 0x000002afu, 0x00000012u, 0x000002b9u, 0x00000012u, 0x000002c7u,
321 0x000300f7u, 0x000002cdu, 0x00000000u, 0x000400fau, 0x0000033eu, 0x000002ceu, 0x000002cdu, 0x000200f8u,
322 0x000002cdu, 0x000200f9u, 0x000002ceu, 0x000200f8u, 0x000002ceu, 0x000900f5u, 0x00000008u, 0x00000340u,
323 0x00000012u, 0x000002a9u, 0x00000341u, 0x000002cbu, 0x00000041u, 0x000002cdu, 0x000400a8u, 0x00000008u,
324 0x00000266u, 0x00000340u, 0x000200f9u, 0x00000262u, 0x000200f8u, 0x00000262u, 0x000700f5u, 0x00000008u,
325 0x00000267u, 0x00000260u, 0x0000011eu, 0x00000266u, 0x000002ceu, 0x000300f7u, 0x00000269u, 0x00000000u,
326 0x000400fau, 0x00000267u, 0x00000268u, 0x00000269u, 0x000200f8u, 0x00000268u, 0x00050041u, 0x00000029u,
327 0x0000026au, 0x00000026u, 0x000000a9u, 0x0004003du, 0x00000019u, 0x0000026bu, 0x0000026au, 0x00060041u,
328 0x0000002du, 0x0000026cu, 0x0000026bu, 0x0000002cu, 0x000000bcu, 0x000700eau, 0x00000006u, 0x0000026du,
329 0x0000026cu, 0x0000002fu, 0x0000000eu, 0x0000002fu, 0x0003003eu, 0x00000116u, 0x00000117u, 0x000200f9u,
330 0x00000269u, 0x000200f8u, 0x00000269u, 0x000600a9u, 0x00000006u, 0x000003afu, 0x00000267u, 0x0000002fu,
331 0x0000035eu, 0x000500abu, 0x00000008u, 0x0000026fu, 0x000003afu, 0x0000000eu, 0x000300f7u, 0x00000271u,
332 0x00000000u, 0x000400fau, 0x0000026fu, 0x00000270u, 0x00000271u, 0x000200f8u, 0x00000270u, 0x00050041u,
333 0x00000029u, 0x00000272u, 0x00000026u, 0x000000a9u, 0x0004003du, 0x00000019u, 0x00000273u, 0x00000272u,
334 0x00060041u, 0x0000002du, 0x00000274u, 0x00000273u, 0x0000002cu, 0x0000002cu, 0x000700eau, 0x00000006u,
335 0x00000275u, 0x00000274u, 0x0000002fu, 0x0000000eu, 0x0000002fu, 0x00050041u, 0x00000007u, 0x00000276u,
336 0x00000116u, 0x0000002cu, 0x0004003du, 0x00000006u, 0x00000277u, 0x00000276u, 0x000500aau, 0x00000008u,
337 0x00000278u, 0x00000277u, 0x0000000eu, 0x000300f7u, 0x0000027au, 0x00000000u, 0x000400fau, 0x00000278u,
338 0x00000279u, 0x0000027au, 0x000200f8u, 0x00000279u, 0x00060041u, 0x0000002du, 0x0000027du, 0x00000273u,
339 0x0000002cu, 0x0000009eu, 0x000700eau, 0x00000006u, 0x0000027eu, 0x0000027du, 0x0000002fu, 0x0000000eu,
340 0x0000002fu, 0x000200f9u, 0x0000027au, 0x000200f8u, 0x0000027au, 0x000200f9u, 0x00000271u, 0x000200f8u,
341 0x00000271u, 0x000200f9u, 0x00000280u, 0x000200f8u, 0x00000280u, 0x000700f5u, 0x00000006u, 0x00000363u,
342 0x0000000eu, 0x00000271u, 0x00000292u, 0x00000281u, 0x000500b0u, 0x00000008u, 0x00000287u, 0x00000363u,
343 0x000002d0u, 0x000400f6u, 0x00000282u, 0x00000281u, 0x00000000u, 0x000400fau, 0x00000287u, 0x00000281u,
344 0x00000282u, 0x000200f8u, 0x00000281u, 0x00050041u, 0x000000bdu, 0x00000288u, 0x00000026u, 0x000000bcu,
345 0x0004003du, 0x00000017u, 0x00000289u, 0x00000288u, 0x00050080u, 0x00000006u, 0x0000028cu, 0x00000081u,
346 0x00000363u, 0x00050041u, 0x00000007u, 0x0000028eu, 0x00000116u, 0x00000363u, 0x0004003du, 0x00000006u,
347 0x0000028fu, 0x0000028eu, 0x00060041u, 0x0000002du, 0x00000290u, 0x00000289u, 0x0000002cu, 0x0000028cu,
348 0x0005003eu, 0x00000290u, 0x0000028fu, 0x00000002u, 0x00000004u, 0x00050080u, 0x00000006u, 0x00000292u,
349 0x00000363u, 0x00000091u, 0x000200f9u, 0x00000280u, 0x000200f8u, 0x00000282u, 0x000200f9u, 0x00000294u,
350 0x000200f8u, 0x00000294u, 0x000100fdu, 0x00010038u,
298}; 351};
299} // namespace leonida 352} // namespace leonida
diff --git a/runtime/src/list_value_wait_budget.h b/runtime/src/list_value_wait_budget.h
new file mode 100644
index 000000000..8e1fd5219
--- /dev/null
+++ b/runtime/src/list_value_wait_budget.h
@@ -0,0 +1,251 @@
1#pragma once
2// Work-aware timeout clock and cycle-safe producer dependency analysis for console command-list memory waits
3// (runtime/shims/d3d12_xs_list_values.h, docs/d3d12_xs_console_abi.md §5.5).
4//
5// A memory wait gate needs a bounded timeout so an unmodelled write (one the runtime never lands) cannot hang a queue
6// forever. Counting wall-clock time blindly cuts waits short whenever the runtime is busy running held work (e.g.
7// multi-second CPU shadow/texture copies inside the releaser) or while an in-flight producer write has not finished on
8// the GPU yet, running dependent queues out of order.
9//
10// This header separates the policy from Windows/D3D12 handles so it can be verified portably under sanitizers:
11// - `pause_reason()` decides whether submitted or held work can still satisfy a gate without creating a deadlock cycle:
12// 1. `releaser_busy`: held work from an already-opened gate is currently being released/submitted;
13// 2. `matching_producer`: an in-flight WriteGroup whose final write to a waited address can satisfy an unmet wait, and
14// every pending gate preceding that WriteGroup is cycle-free with respect to the waiting queue;
15// 3. `active_work`: unrelated unblocked GPU work (a WriteGroup or action gate with no pending gate ahead of it) is
16// still executing, paused only up to `active_pause_cap_us` so a continuously streaming queue cannot starve an
17// unmodelled wait.
18// - `GateTimeoutState` tracks idle wait time (`elapsed_us`) separately from paused time, expiring once `elapsed_us`
19// reaches `budget_us`. Every pause reason (`releaser_busy` and `matching_producer` included) is bounded by a finite
20// `max_pause_cap_us` so a producer stuck behind an untracked dependency (e.g. a title fence wait or a hung Signal)
21// still expires instead of hanging forever, and demoted (`cut_short`) gates scale both caps with their short budget.
22//
23// Pure C++20 standard library only.
24
25#include <algorithm>
26#include <cstddef>
27#include <cstdint>
28#include <span>
29#include <vector>
30
31namespace leonida::list_value_wait {
32
33enum class PauseReason : std::uint8_t {
34 none = 0, // no submitted or held work can still satisfy this gate -> timeout clock ticks
35 releaser_busy = 1, // releaser thread is executing or draining opened gates
36 matching_producer = 2, // an acyclic in-flight WriteGroup can satisfy an unmet wait of this gate
37 active_work = 3, // unrelated unblocked submitted work is still executing (bounded by active_pause_cap_us)
38};
39
40struct WaitPredicate {
41 std::uint64_t address = 0;
42 std::uint64_t reference = 0;
43 std::uint32_t comparison = 0;
44 bool wide = false;
45};
46
47struct PendingWrite {
48 std::uint64_t address = 0;
49 std::uint64_t value = 0;
50 std::uint8_t bytes = 0;
51 bool timestamp = false; // GPU/system timestamp: final value is unknown until landing
52};
53
54struct PendingWriteGroup {
55 const void* queue = nullptr;
56 std::uint64_t after_gate = 0; // highest pending gate value on `queue` ahead of this group when submitted (0: none)
57 std::span<const PendingWrite> writes;
58};
59
60struct PendingGate {
61 const void* queue = nullptr;
62 std::uint64_t value = 0;
63 bool is_action = false; // waits only on earlier GPU work on `queue`, never on memory
64 std::span<const WaitPredicate> unmet_waits; // waits not currently satisfied in memory (empty for action gates)
65};
66
67struct PauseCaps {
68 std::uint64_t active_us = 0; // cap on pausing solely for unrelated active_work
69 std::uint64_t max_us = 0; // hard finite cap across ALL pause reasons (releaser_busy, matching_producer, active_work)
70};
71
72// Pause caps scaled with the gate's own timeout budget (`gate_timeout_ms`) and demotion state (`cut_short`):
73// - Normal gates: `active_us = 300x` and `max_us = 1500x` of `gate_timeout_ms`, capped at 10 min. At the default
74// 200 ms timeout this allows up to 60 s for unrelated GPU work and up to 300 s (5 min) while the releaser or an
75// acyclic matching producer is working (covering multi-minute world-phase pipeline builds), while guaranteeing a
76// finite exit if a producer is held behind an untracked dependency (title fence wait or stuck Signal).
77// - Demoted (`cut_short`) gates: `active_us = 1x` and `max_us = 4x` of `gate_timeout_ms` (4 ms / 16 ms at the 4 ms
78// demoted budget), so an unmodelled wait only pays a few milliseconds instead of inheriting the full timeout's cap.
79inline constexpr PauseCaps default_pause_caps(unsigned gate_timeout_ms, bool cut_short = false) {
80 constexpr std::uint64_t kMaxCapMs = 600000u; // 10 min hard ceiling
81 const std::uint64_t base_ms = gate_timeout_ms ? std::uint64_t{gate_timeout_ms} : 1u;
82 const auto scale_ms = [base_ms](std::uint64_t mult) -> std::uint64_t {
83 return base_ms > kMaxCapMs / mult ? kMaxCapMs : base_ms * mult;
84 };
85 const std::uint64_t active_ms = cut_short ? (base_ms < kMaxCapMs ? base_ms : kMaxCapMs) : scale_ms(300u);
86 const std::uint64_t max_ms = cut_short ? scale_ms(4u) : scale_ms(1500u);
87 return {active_ms * 1000u, max_ms * 1000u};
88}
89
90inline constexpr std::uint64_t default_active_pause_cap_us(unsigned gate_timeout_ms, bool cut_short = false) {
91 return default_pause_caps(gate_timeout_ms, cut_short).active_us;
92}
93
94inline constexpr std::uint64_t default_max_pause_cap_us(unsigned gate_timeout_ms, bool cut_short = false) {
95 return default_pause_caps(gate_timeout_ms, cut_short).max_us;
96}
97
98struct GateTimeoutState {
99 std::uint64_t budget_us = 0;
100 std::uint64_t elapsed_us = 0;
101 std::uint64_t active_paused_us = 0;
102 std::uint64_t active_pause_cap_us = 0;
103 std::uint64_t total_paused_us = 0;
104 std::uint64_t max_pause_cap_us = 0;
105 bool paused_ever = false;
106
107 void reset(std::uint64_t budget, std::uint64_t active_cap, std::uint64_t max_cap) {
108 budget_us = budget;
109 elapsed_us = 0;
110 active_paused_us = 0;
111 total_paused_us = 0;
112 max_pause_cap_us = max_cap;
113 active_pause_cap_us = active_cap < max_cap ? active_cap : max_cap;
114 paused_ever = false;
115 }
116
117 // Advances the gate by `dt_us` under `reason`. Returns true once the idle timeout budget is exhausted.
118 // Every pause reason is bounded by `max_pause_cap_us`; unrelated `active_work` is additionally bounded by
119 // `active_pause_cap_us`.
120 bool advance(std::uint64_t dt_us, PauseReason reason) {
121 std::uint64_t room = 0;
122 if (reason == PauseReason::releaser_busy || reason == PauseReason::matching_producer) {
123 room = total_paused_us < max_pause_cap_us ? max_pause_cap_us - total_paused_us : 0u;
124 } else if (reason == PauseReason::active_work) {
125 const std::uint64_t total_room =
126 total_paused_us < max_pause_cap_us ? max_pause_cap_us - total_paused_us : 0u;
127 const std::uint64_t active_room =
128 active_paused_us < active_pause_cap_us ? active_pause_cap_us - active_paused_us : 0u;
129 room = total_room < active_room ? total_room : active_room;
130 }
131 if (room > 0) {
132 if (dt_us == 0) return false;
133 paused_ever = true;
134 const std::uint64_t absorb = dt_us < room ? dt_us : room;
135 total_paused_us += absorb;
136 if (reason == PauseReason::active_work) active_paused_us += absorb;
137 dt_us -= absorb;
138 }
139 if (dt_us > UINT64_MAX - elapsed_us)
140 elapsed_us = UINT64_MAX;
141 else
142 elapsed_us += dt_us;
143 return elapsed_us >= budget_us;
144 }
145};
146
147namespace detail {
148
149// True when `group`'s final write touching [wait.address, wait.address + need) lands a value that meets `wait`
150// (or is a timestamp write to the exact address whose runtime value is unknown until landing).
151template <class MetFn>
152inline bool write_group_matches_wait(const PendingWriteGroup& group, const WaitPredicate& wait, MetFn&& met) {
153 const std::uint64_t need = wait.wide ? 8u : 4u;
154 if (!wait.address || wait.address > UINT64_MAX - need) return false;
155 const std::uint64_t wait_end = wait.address + need;
156 for (std::size_t i = group.writes.size(); i-- > 0;) {
157 const PendingWrite& w = group.writes[i];
158 if (!w.bytes || w.address > UINT64_MAX - w.bytes) continue;
159 const std::uint64_t write_end = w.address + w.bytes;
160 if (w.address >= wait_end || wait.address >= write_end) continue;
161 if (w.address == wait.address && w.bytes >= need &&
162 (w.timestamp || met(wait.comparison, w.value, wait.reference, wait.wide)))
163 return true;
164 // A later write in the same group overwrote or partially overlapped the waited range with a non-matching value.
165 return false;
166 }
167 return false;
168}
169
170// True when no pending gate in `gates` precedes `(queue, after_gate)`.
171inline bool is_unblocked(std::span<const PendingGate> gates, const void* queue, std::uint64_t after_gate) {
172 if (!after_gate) return true;
173 for (const PendingGate& g : gates)
174 if (g.queue == queue && g.value <= after_gate) return false;
175 return true;
176}
177
178// True when `gate_idx` (directly or transitively via matching in-flight writes) depends on a gate on `target_queue`.
179template <class MetFn>
180inline bool gate_can_reach_queue(std::size_t gate_idx, const void* target_queue,
181 std::span<const PendingWriteGroup> writes, std::span<const PendingGate> gates,
182 MetFn&& met, std::vector<std::size_t>& visiting) {
183 const PendingGate& g = gates[gate_idx];
184 if (g.queue == target_queue) return true;
185 if (g.is_action) return false;
186 if (std::find(visiting.begin(), visiting.end(), gate_idx) != visiting.end()) return false;
187 visiting.push_back(gate_idx);
188 for (const WaitPredicate& wait : g.unmet_waits) {
189 for (const PendingWriteGroup& w : writes) {
190 if (!write_group_matches_wait(w, wait, met)) continue;
191 if (!w.after_gate) continue;
192 for (std::size_t b = 0; b < gates.size(); ++b) {
193 if (gates[b].queue != w.queue || gates[b].value > w.after_gate) continue;
194 if (gates[b].queue == target_queue ||
195 gate_can_reach_queue(b, target_queue, writes, gates, met, visiting)) {
196 visiting.pop_back();
197 return true;
198 }
199 }
200 }
201 }
202 visiting.pop_back();
203 return false;
204}
205
206} // namespace detail
207
208// Decides whether the timeout clock of `gates[target_idx]` should pause on this pump pass.
209// `met(comparison, value, reference, wide)` must implement the same predicate as `console_value_met`.
210template <class MetFn>
211inline PauseReason pause_reason(bool releaser_busy, std::span<const PendingWriteGroup> writes,
212 std::span<const PendingGate> gates, std::size_t target_idx, MetFn&& met) {
213 if (releaser_busy) return PauseReason::releaser_busy;
214 if (target_idx >= gates.size()) return PauseReason::none;
215 const PendingGate& target = gates[target_idx];
216 if (target.is_action) return PauseReason::none;
217
218 // 1. A matching in-flight WriteGroup whose preceding gates (if any) do not cycle back to `target.queue`.
219 std::vector<std::size_t> visiting;
220 for (const WaitPredicate& wait : target.unmet_waits) {
221 for (const PendingWriteGroup& w : writes) {
222 if (!detail::write_group_matches_wait(w, wait, met)) continue;
223 bool cyclic = false;
224 if (w.after_gate) {
225 for (std::size_t b = 0; b < gates.size(); ++b) {
226 if (gates[b].queue != w.queue || gates[b].value > w.after_gate) continue;
227 visiting.clear();
228 if (gates[b].queue == target.queue ||
229 detail::gate_can_reach_queue(b, target.queue, writes, gates, met, visiting)) {
230 cyclic = true;
231 break;
232 }
233 }
234 }
235 if (!cyclic) return PauseReason::matching_producer;
236 }
237 }
238
239 // 2. Unrelated unblocked submitted GPU work (an unblocked WriteGroup on any queue, or an unblocked action gate on
240 // another queue) that could still write memory via a shader/copy or unblock a CPU producer.
241 for (const PendingWriteGroup& w : writes) {
242 if (detail::is_unblocked(gates, w.queue, w.after_gate)) return PauseReason::active_work;
243 }
244 for (const PendingGate& g : gates) {
245 if (!g.is_action || g.queue == target.queue) continue;
246 if (g.value == 0 || detail::is_unblocked(gates, g.queue, g.value - 1)) return PauseReason::active_work;
247 }
248 return PauseReason::none;
249}
250
251} // namespace leonida::list_value_wait
diff --git a/runtime/src/main.cpp b/runtime/src/main.cpp
index 21551e948..6f7039099 100644
--- a/runtime/src/main.cpp
+++ b/runtime/src/main.cpp
@@ -10,11 +10,11 @@
10// The same mapping, then each loaded DLL's TLS callbacks and DllMain(DLL_PROCESS_ATTACH) are run. 10// The same mapping, then each loaded DLL's TLS callbacks and DllMain(DLL_PROCESS_ATTACH) are run.
11// 11//
12// gta6rt --precompile-pipelines [--threads N] [--big-threads N] [--big-bytes N] [--all] [--smallest-first] 12// gta6rt --precompile-pipelines [--threads N] [--big-threads N] [--big-bytes N] [--all] [--smallest-first]
13// [--limit N] [--min-bytes N] [--max-bytes N] [--filter PART]... [--list] 13// [--limit N] [--min-bytes N] [--max-bytes N] [--filter PART]... [--skip-listed] [--list]
14// No game: creates the Vulkan device as --run does and builds every compute pipeline of the shader library 14// No game: creates the Vulkan device as --run does and builds every compute pipeline of the shader library
15// (LEONIDA_SHADERS) into the pipeline journal and the driver's cache, so a title's first dispatch of a large one 15// (LEONIDA_SHADERS) into the pipeline journal and the driver's cache, so a title's first dispatch of a large one
16// does not stall it. Resumable: entries already journaled are skipped (--all: built anyway). See 16// does not stall it. Resumable: entries already journaled are skipped (--all: built anyway). Programs named by
17// shims/d3d12_precompile.h. 17// LEONIDA_SKIP_COMPUTE are built too unless --skip-listed is given. See shims/d3d12_precompile.h.
18// 18//
19// gta6rt --run <exe> [--game-dir DIR] [--overlay DIR] [--trace-d3d12] [--trace FILE] [-- game arguments...] 19// gta6rt --run <exe> [--game-dir DIR] [--overlay DIR] [--trace-d3d12] [--trace FILE] [-- game arguments...]
20// The same, then the EXE's own TLS callbacks and its entry point, on a game thread. The game's argv and 20// The same, then the EXE's own TLS callbacks and its entry point, on a game thread. The game's argv and
@@ -262,7 +262,7 @@ int usage() {
262 " gta6rt --init <image> [--game-dir DIR] [--overlay DIR] [--mods DIR] [--archetype-lookup RVA[,ARG]] [--view-mode-getter RVA] [--trace-d3d12] [--trace FILE]\n" 262 " gta6rt --init <image> [--game-dir DIR] [--overlay DIR] [--mods DIR] [--archetype-lookup RVA[,ARG]] [--view-mode-getter RVA] [--trace-d3d12] [--trace FILE]\n"
263 " gta6rt --first-run-ui <exe> [--game-dir DIR] [--overlay DIR] [--trace FILE]\n" 263 " gta6rt --first-run-ui <exe> [--game-dir DIR] [--overlay DIR] [--trace FILE]\n"
264 " 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" 264 " 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"
265 " gta6rt --precompile-pipelines [--threads N] [--big-threads N] [--big-bytes N] [--all] [--smallest-first] [--limit N] [--min-bytes N] [--max-bytes N] [--filter PART]... [--list] [--via-helper]\n" 265 " gta6rt --precompile-pipelines [--threads N] [--big-threads N] [--big-bytes N] [--all] [--smallest-first] [--limit N] [--min-bytes N] [--max-bytes N] [--filter PART]... [--skip-listed] [--list] [--via-helper]\n"
266 " gta6rt --compile-server [--parent PID] [--threads N] [--idle-threads N] [--idle-exit SECONDS]\n"); 266 " gta6rt --compile-server [--parent PID] [--threads N] [--idle-threads N] [--idle-exit SECONDS]\n");
267 return 2; 267 return 2;
268} 268}
@@ -290,6 +290,7 @@ int precompile_main(int argc, wchar_t** argv) {
290 else if (a == L"--max-bytes") ok = number(i, options.max_bytes); 290 else if (a == L"--max-bytes") ok = number(i, options.max_bytes);
291 else if (a == L"--all") options.rebuild = true; 291 else if (a == L"--all") options.rebuild = true;
292 else if (a == L"--smallest-first") options.smallest_first = true; 292 else if (a == L"--smallest-first") options.smallest_first = true;
293 else if (a == L"--skip-listed") options.skip_listed = true;
293 else if (a == L"--list") options.dry_run = true; 294 else if (a == L"--list") options.dry_run = true;
294 else if (a == L"--via-helper") options.via_helper = true; 295 else if (a == L"--via-helper") options.via_helper = true;
295 else if (a == L"--filter" && i + 1 < argc) { 296 else if (a == L"--filter" && i + 1 < argc) {
diff --git a/runtime/src/mem_probe.h b/runtime/src/mem_probe.h
index a36d38bfe..f8c573da4 100644
--- a/runtime/src/mem_probe.h
+++ b/runtime/src/mem_probe.h
@@ -9,12 +9,18 @@
9// other PE private memory (runtime + title heaps), PE images, PE sections, memory the Vulkan 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 10// driver mapped for us, /dev/nvidia* mappings, other native (Unix-side) anonymous memory
11// (driver heaps, glibc arenas), and files. 11// (driver heaps, glibc arenas), and files.
12// [rt] mem-probe breakdown: the same allocations by consumer (src/memory_breakdown.h): the arena with its reserved,
13// bound and in-use bytes, geometry copies, title windows and shadows, upload heaps, staging,
14// texture blocks, sampled textures, render targets and depth, and other, which add up to the
15// allocated bytes of the t= line.
12// The Vulkan counts come from wrapping the runtime's own function table (install()); helpers that load their own 16// 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. 17// pointers (depth24, predicate, xdxr, swapchain) are not counted: they create a handful of objects.
14 18
15#include <windows.h> 19#include <windows.h>
16#include <vulkan/vulkan.h> 20#include <vulkan/vulkan.h>
17 21
22#include "memory_breakdown.h"
23
18#include <algorithm> 24#include <algorithm>
19#include <atomic> 25#include <atomic>
20#include <cctype> 26#include <cctype>
@@ -40,6 +46,8 @@ struct Allocation {
40 bool imported = false; 46 bool imported = false;
41 std::uintptr_t mapped = 0; 47 std::uintptr_t mapped = 0;
42 std::uint64_t mapped_bytes = 0; 48 std::uint64_t mapped_bytes = 0;
49 // Who asked for it (an Owner scope at the allocation), or what was bound to it later (bind_image_memory).
50 memory_breakdown::Consumer consumer = memory_breakdown::Consumer::other;
43}; 51};
44 52
45struct State { 53struct State {
@@ -52,11 +60,15 @@ struct State {
52 PFN_vkCreateGraphicsPipelines create_graphics = nullptr; 60 PFN_vkCreateGraphicsPipelines create_graphics = nullptr;
53 PFN_vkCreateComputePipelines create_compute = nullptr; 61 PFN_vkCreateComputePipelines create_compute = nullptr;
54 PFN_vkDestroyPipeline destroy_pipeline = nullptr; 62 PFN_vkDestroyPipeline destroy_pipeline = nullptr;
63 PFN_vkCreateImage create_image = nullptr;
64 PFN_vkDestroyImage destroy_image = nullptr;
65 PFN_vkBindImageMemory bind_image = nullptr;
55 66
56 std::mutex mutex; 67 std::mutex mutex;
57 std::unordered_map<VkDeviceMemory, Allocation> allocations; 68 std::unordered_map<VkDeviceMemory, Allocation> allocations;
58 std::unordered_map<VkShaderModule, std::uint64_t> modules; 69 std::unordered_map<VkShaderModule, std::uint64_t> modules;
59 std::unordered_map<VkPipeline, std::uint8_t> pipelines; // 0 graphics, 1 compute 70 std::unordered_map<VkPipeline, std::uint8_t> pipelines; // 0 graphics, 1 compute
71 std::unordered_map<VkImage, std::uint32_t> image_usage; // VkImageUsageFlags of each live image
60 std::uint64_t module_bytes = 0, modules_made = 0, module_bytes_made = 0; 72 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; 73 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 74 std::uint64_t graphics_ns = 0, compute_ns = 0; // time inside vkCreate*Pipelines
@@ -94,7 +106,8 @@ inline VKAPI_ATTR VkResult VKAPI_CALL allocate_memory(VkDevice device, const VkM
94 const VkResult result = s.allocate(device, info, callbacks, out); 106 const VkResult result = s.allocate(device, info, callbacks, out);
95 if (result == VK_SUCCESS && out && *out) { 107 if (result == VK_SUCCESS && out && *out) {
96 std::lock_guard lock(s.mutex); 108 std::lock_guard lock(s.mutex);
97 s.allocations[*out] = {info->memoryTypeIndex, info->allocationSize, imported_memory(info), 0, 0}; 109 s.allocations[*out] = {info->memoryTypeIndex, info->allocationSize, imported_memory(info), 0, 0,
110 memory_breakdown::current_owner()};
98 } 111 }
99 return result; 112 return result;
100} 113}
@@ -132,6 +145,43 @@ inline VKAPI_ATTR void VKAPI_CALL unmap_memory(VkDevice device, VkDeviceMemory m
132 s.unmap(device, memory); 145 s.unmap(device, memory);
133} 146}
134 147
148inline VKAPI_ATTR VkResult VKAPI_CALL create_image(VkDevice device, const VkImageCreateInfo* info,
149 const VkAllocationCallbacks* callbacks, VkImage* out) {
150 State& s = state();
151 const VkResult result = s.create_image(device, info, callbacks, out);
152 if (result == VK_SUCCESS && out && *out) {
153 std::lock_guard lock(s.mutex);
154 s.image_usage[*out] = info->usage;
155 }
156 return result;
157}
158
159inline VKAPI_ATTR void VKAPI_CALL destroy_image(VkDevice device, VkImage image, const VkAllocationCallbacks* callbacks) {
160 State& s = state();
161 if (image) {
162 std::lock_guard lock(s.mutex);
163 s.image_usage.erase(image);
164 }
165 s.destroy_image(device, image, callbacks);
166}
167
168// Memory nobody named that an image is bound to is that image's: a render target or depth buffer, or a sampled
169// texture. A named block (the texture blocks) keeps its name, whatever is bound into it.
170inline VKAPI_ATTR VkResult VKAPI_CALL bind_image_memory(VkDevice device, VkImage image, VkDeviceMemory memory,
171 VkDeviceSize offset) {
172 State& s = state();
173 const VkResult result = s.bind_image(device, image, memory, offset);
174 if (result == VK_SUCCESS) {
175 std::lock_guard lock(s.mutex);
176 const auto a = s.allocations.find(memory);
177 const auto u = s.image_usage.find(image);
178 if (a != s.allocations.end() && u != s.image_usage.end() &&
179 a->second.consumer == memory_breakdown::Consumer::other)
180 a->second.consumer = memory_breakdown::image_consumer(u->second);
181 }
182 return result;
183}
184
135inline VKAPI_ATTR VkResult VKAPI_CALL create_shader_module(VkDevice device, const VkShaderModuleCreateInfo* info, 185inline VKAPI_ATTR VkResult VKAPI_CALL create_shader_module(VkDevice device, const VkShaderModuleCreateInfo* info,
136 const VkAllocationCallbacks* callbacks, 186 const VkAllocationCallbacks* callbacks,
137 VkShaderModule* out) { 187 VkShaderModule* out) {
@@ -246,7 +296,8 @@ void install(Functions& vk) {
246 if (s.installed++) return; 296 if (s.installed++) return;
247 if (!vk.vkAllocateMemory || !vk.vkFreeMemory || !vk.vkMapMemory || !vk.vkUnmapMemory || 297 if (!vk.vkAllocateMemory || !vk.vkFreeMemory || !vk.vkMapMemory || !vk.vkUnmapMemory ||
248 !vk.vkCreateShaderModule || !vk.vkDestroyShaderModule || !vk.vkCreateGraphicsPipelines || 298 !vk.vkCreateShaderModule || !vk.vkDestroyShaderModule || !vk.vkCreateGraphicsPipelines ||
249 !vk.vkCreateComputePipelines || !vk.vkDestroyPipeline) 299 !vk.vkCreateComputePipelines || !vk.vkDestroyPipeline || !vk.vkCreateImage || !vk.vkDestroyImage ||
300 !vk.vkBindImageMemory)
250 return; 301 return;
251 s.started = GetTickCount64(); 302 s.started = GetTickCount64();
252 s.allocate = vk.vkAllocateMemory, vk.vkAllocateMemory = allocate_memory; 303 s.allocate = vk.vkAllocateMemory, vk.vkAllocateMemory = allocate_memory;
@@ -258,6 +309,9 @@ void install(Functions& vk) {
258 s.create_graphics = vk.vkCreateGraphicsPipelines, vk.vkCreateGraphicsPipelines = create_graphics_pipelines; 309 s.create_graphics = vk.vkCreateGraphicsPipelines, vk.vkCreateGraphicsPipelines = create_graphics_pipelines;
259 s.create_compute = vk.vkCreateComputePipelines, vk.vkCreateComputePipelines = create_compute_pipelines; 310 s.create_compute = vk.vkCreateComputePipelines, vk.vkCreateComputePipelines = create_compute_pipelines;
260 s.destroy_pipeline = vk.vkDestroyPipeline, vk.vkDestroyPipeline = destroy_pipeline; 311 s.destroy_pipeline = vk.vkDestroyPipeline, vk.vkDestroyPipeline = destroy_pipeline;
312 s.create_image = vk.vkCreateImage, vk.vkCreateImage = create_image;
313 s.destroy_image = vk.vkDestroyImage, vk.vkDestroyImage = destroy_image;
314 s.bind_image = vk.vkBindImageMemory, vk.vkBindImageMemory = bind_image_memory;
261 std::fprintf(stderr, "[rt] mem-probe: installed, every %u s\n", interval_seconds()); 315 std::fprintf(stderr, "[rt] mem-probe: installed, every %u s\n", interval_seconds());
262} 316}
263 317
@@ -451,6 +505,7 @@ inline std::string read_rollup() {
451struct DeviceFacts { 505struct DeviceFacts {
452 std::function<std::string()> describe; // one text fragment 506 std::function<std::string()> describe; // one text fragment
453 std::function<Ranges()> title_ranges; // the title's memory 507 std::function<Ranges()> title_ranges; // the title's memory
508 std::function<memory_breakdown::DeviceShare()> share; // the arena and the bindless tables, for the breakdown
454 VkPhysicalDeviceMemoryProperties memory{}; 509 VkPhysicalDeviceMemoryProperties memory{};
455}; 510};
456 511
@@ -477,6 +532,7 @@ inline void sample(const DeviceFacts& facts) {
477 std::uint64_t type_count[VK_MAX_MEMORY_TYPES] = {}, type_bytes[VK_MAX_MEMORY_TYPES] = {}; 532 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] = {}; 533 std::uint64_t import_count[VK_MAX_MEMORY_TYPES] = {}, import_bytes[VK_MAX_MEMORY_TYPES] = {};
479 Ranges vk_mapped; 534 Ranges vk_mapped;
535 memory_breakdown::Tally tally;
480 std::uint64_t modules = 0, module_bytes = 0, modules_made = 0, module_bytes_made = 0; 536 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; 537 std::uint64_t graphics = 0, compute = 0, graphics_made = 0, compute_made = 0, graphics_ns = 0, compute_ns = 0;
482 { 538 {
@@ -491,6 +547,7 @@ inline void sample(const DeviceFacts& facts) {
491 type_bytes[i] += a.bytes; 547 type_bytes[i] += a.bytes;
492 } 548 }
493 if (a.mapped && !a.imported) vk_mapped.push_back({a.mapped, a.mapped + a.mapped_bytes}); 549 if (a.mapped && !a.imported) vk_mapped.push_back({a.mapped, a.mapped + a.mapped_bytes});
550 tally.add(a.consumer, a.bytes, a.imported);
494 } 551 }
495 modules = s.modules.size(); 552 modules = s.modules.size();
496 module_bytes = s.module_bytes; 553 module_bytes = s.module_bytes;
@@ -527,6 +584,10 @@ inline void sample(const DeviceFacts& facts) {
527 (unsigned long long)compute_made, double(graphics_ns) / 1e9, double(compute_ns) / 1e9, 584 (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, 585 (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() : ""); 586 mib(module_bytes_made), memory_text.c_str(), facts.describe ? facts.describe().c_str() : "");
587 std::fprintf(stderr, "[rt] mem-probe breakdown t=%.0fs: %s\n", t,
588 memory_breakdown::format(tally, facts.share ? facts.share() : memory_breakdown::DeviceShare{},
589 module_bytes)
590 .c_str());
530 Ranges title = facts.title_ranges ? facts.title_ranges() : Ranges{}; 591 Ranges title = facts.title_ranges ? facts.title_ranges() : Ranges{};
531 std::sort(title.begin(), title.end()); 592 std::sort(title.begin(), title.end());
532 Usage usage[b_count]; 593 Usage usage[b_count];
diff --git a/runtime/src/memory_breakdown.h b/runtime/src/memory_breakdown.h
new file mode 100644
index 000000000..7e2ae7057
--- /dev/null
+++ b/runtime/src/memory_breakdown.h
@@ -0,0 +1,152 @@
1#pragma once
2
3// The mem probe's breakdown line (src/mem_probe.h, LEONIDA_MEM_PROBE=<seconds>): the runtime's own vkAllocateMemory
4// bytes split by the consumer that asked for them, so the parts add up to the total the probe's `mem-probe t=` line
5// prints per memory type. Diagnostic only: nothing here changes what is allocated or where.
6//
7// A consumer is named in one of two ways:
8// - by the caller: an Owner scope around the call that allocates (the arena, the geometry copies' and title
9// windows' 4 MiB blocks, upload heaps, staging, the texture blocks). The probe's vkAllocateMemory wrapper reads
10// the scope of the thread it runs on;
11// - by what is bound to it: memory nobody named that a dedicated image is bound to is a render target or depth
12// buffer when the image is an attachment, else a sampled texture (image_consumer()).
13// Memory named neither way is "other", so the parts always sum to the total.
14//
15// Pure standard library (the usage bits are passed in as plain integers), so the tally and the text are tested
16// without a GPU or Windows (memory_breakdown_test).
17
18#include <array>
19#include <cstdint>
20#include <cstdio>
21#include <string>
22
23namespace leonida::memory_breakdown {
24
25enum class Consumer : std::uint8_t {
26 other, // nobody named it and no image is bound to it
27 arena, // the GPU address arena's memory (docs/d3d12_vulkan.md section 3.3)
28 geometry, // geometry copies: GeometryViews' 4 MiB blocks (shims/d3d12_geometry_views.h)
29 windows, // title windows outside the arena and slot-133 shadow buffers with their own memory
30 upload, // upload and readback heap buffers with their own memory
31 staging, // texture staging and copy scratch
32 image_blocks, // blocks that hold many textures (ImageMemory, TitleImagePool)
33 sampled, // dedicated memory of a texture that is not an attachment
34 render_target, // dedicated memory of a colour or depth/stencil attachment
35 count
36};
37
38constexpr std::size_t kConsumers = std::size_t(Consumer::count);
39
40inline const char* consumer_name(Consumer c) {
41 switch (c) {
42 case Consumer::other: return "other";
43 case Consumer::arena: return "arena";
44 case Consumer::geometry: return "geometry copies";
45 case Consumer::windows: return "title windows and shadows";
46 case Consumer::upload: return "upload heaps";
47 case Consumer::staging: return "staging";
48 case Consumer::image_blocks: return "texture blocks";
49 case Consumer::sampled: return "sampled textures";
50 case Consumer::render_target: return "render targets and depth";
51 default: return "?";
52 }
53}
54
55// VkImageUsageFlagBits values, as plain integers so this header needs no Vulkan headers.
56constexpr std::uint32_t kColorAttachment = 0x10; // VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT
57constexpr std::uint32_t kDepthStencilAttachment = 0x20; // VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
58
59// The consumer of memory an image of `usage` is bound to, when nobody named the memory.
60inline Consumer image_consumer(std::uint32_t usage) {
61 return usage & (kColorAttachment | kDepthStencilAttachment) ? Consumer::render_target : Consumer::sampled;
62}
63
64// The consumer the calling thread allocates for. Set by an Owner scope; Consumer::other outside one.
65inline Consumer& current_owner() {
66 thread_local Consumer owner = Consumer::other;
67 return owner;
68}
69
70// Names the consumer of the allocations this thread makes while the scope lives. Scopes nest: the inner one wins
71// and the outer one is back when it ends.
72class Owner {
73public:
74 explicit Owner(Consumer consumer) : previous_(current_owner()) { current_owner() = consumer; }
75 ~Owner() { current_owner() = previous_; }
76 Owner(const Owner&) = delete;
77 Owner& operator=(const Owner&) = delete;
78
79private:
80 Consumer previous_;
81};
82
83// Live allocations per consumer. Imported memory (host pointers, the title's own pages) is system memory the runtime
84// did not allocate, so it is kept apart, as the probe's total keeps it apart.
85struct Tally {
86 std::array<std::uint64_t, kConsumers> bytes{}, count{};
87 std::uint64_t imported_bytes = 0, imported_count = 0;
88
89 void add(Consumer consumer, std::uint64_t size, bool imported) {
90 if (imported) {
91 imported_bytes += size;
92 ++imported_count;
93 return;
94 }
95 const std::size_t i = std::size_t(consumer) < kConsumers ? std::size_t(consumer) : 0;
96 bytes[i] += size;
97 ++count[i];
98 }
99 std::uint64_t total() const {
100 std::uint64_t sum = 0;
101 for (const std::uint64_t b : bytes) sum += b;
102 return sum;
103 }
104};
105
106// What the device knows about the arena and the tables outside the probe's wrapped allocations.
107struct DeviceShare {
108 bool arena = false;
109 std::uint64_t arena_reserved = 0; // the arena's size: the address range shaders may name
110 std::uint64_t arena_bound = 0; // bytes of memory behind it
111 std::uint64_t arena_in_use = 0; // bytes allocations hold
112 // arena_in_use by kind, as DeviceState::ArenaUse: buffers, descriptor heaps, shader code, heaps
113 std::array<std::uint64_t, 4> arena_use{};
114 std::uint64_t bindless_table_bytes = 0; // allocated by BindlessSet through its own function table
115};
116
117inline double mib(std::uint64_t bytes) { return double(bytes) / 1048576.0; }
118
119// The breakdown line's text after "[rt] mem-probe breakdown t=<s>: ". Every consumer is printed, zero or not, so a
120// reader can line up two ticks; the figures are whole MiB.
121inline std::string format(const Tally& tally, const DeviceShare& device, std::uint64_t module_bytes) {
122 std::string out;
123 char item[256];
124 std::snprintf(item, sizeof item, "allocated %.0f MiB =", mib(tally.total()));
125 out += item;
126 bool first = true;
127 for (std::size_t i = 1; i <= kConsumers; ++i) {
128 const std::size_t c = i % kConsumers; // "other" last
129 std::snprintf(item, sizeof item, "%s %s %.0f (%llu)", first ? "" : " +", consumer_name(Consumer(c)),
130 mib(tally.bytes[c]), (unsigned long long)tally.count[c]);
131 out += item;
132 first = false;
133 if (Consumer(c) == Consumer::arena && device.arena) {
134 std::snprintf(item, sizeof item,
135 " [reserved %.0f, bound %.0f, in use %.0f: buffers %.0f, descriptor heaps %.0f, shader code "
136 "%.0f, heaps %.0f]",
137 mib(device.arena_reserved), mib(device.arena_bound), mib(device.arena_in_use),
138 mib(device.arena_use[0]), mib(device.arena_use[1]), mib(device.arena_use[2]),
139 mib(device.arena_use[3]));
140 out += item;
141 }
142 }
143 std::snprintf(item, sizeof item,
144 "; imported %.0f MiB (%llu); not in the total: bindless tables %.0f MiB (own function table), shader "
145 "modules %.0f MiB SPIR-V, pipelines and swapchain images (the driver's)",
146 mib(tally.imported_bytes), (unsigned long long)tally.imported_count,
147 mib(device.bindless_table_bytes), mib(module_bytes));
148 out += item;
149 return out;
150}
151
152} // namespace leonida::memory_breakdown
diff --git a/runtime/src/pipeline_cache_store.h b/runtime/src/pipeline_cache_store.h
index 6d519d99b..5b93d93f0 100644
--- a/runtime/src/pipeline_cache_store.h
+++ b/runtime/src/pipeline_cache_store.h
@@ -23,11 +23,18 @@
23 23
24namespace leonida::pipeline_cache_store { 24namespace leonida::pipeline_cache_store {
25 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 26// A session cache holds what the boots so far compiled: 1.28 GB after a few world frames on NVIDIA and still growing,
27// cache seeded from the multi-GB corpus file -- whose data comes back as the whole union -- from being rewritten 27// where a 256 MiB cap kept every later build from being saved. The limit applies to what the session adds: a cache
28// at every exit. Past it the previous session file is left alone; raise the limit with 28// seeded from the offline corpus file comes back from the driver as the whole union, so the seed's size is not
29// LEONIDA_PIPELINE_CACHE_BYTES when a session really compiles that much. 29// counted (over_save_limit), and a 9.7 GB seed plus a few hundred MB of new builds is still saved. Past the limit the
30inline constexpr std::size_t default_save_limit = std::size_t{256} << 20; // 256 MiB 30// previous session file is left alone; raise it with LEONIDA_PIPELINE_CACHE_BYTES when a session really compiles that
31// much.
32inline constexpr std::size_t default_save_limit = std::size_t{4096} << 20; // 4 GiB
33
34// Whether a cache of `size` bytes, created from an offline seed of `seed` bytes (0: none), adds more than `limit`.
35inline bool over_save_limit(std::size_t size, std::size_t seed, std::size_t limit) {
36 return size - (seed < size ? seed : size) > limit;
37}
31 38
32struct SaveLimit { 39struct SaveLimit {
33 std::size_t bytes = default_save_limit; 40 std::size_t bytes = default_save_limit;
diff --git a/runtime/src/shadow_keep.h b/runtime/src/shadow_keep.h
new file mode 100644
index 000000000..a59752b49
--- /dev/null
+++ b/runtime/src/shadow_keep.h
@@ -0,0 +1,72 @@
1// What a shadow copy of the title's pages keeps of the GPU's writes (LEONIDA_SHADOW_KEEP, shims/
2// d3d12_vulkan_device.cpp ShadowPages). Some pages are copied at every refresh without a sign that the title wrote
3// them (mapped at two addresses, unguarded, reopened with the 64 KiB block around a written page, write-watched or
4// pinned): copied whole, their unchanged bytes overwrote what a shader had stored in the copy since. Here the title's
5// bytes are compared, per 256-byte piece of the title's address space, with a 64-bit sum of those copied last, and
6// only a piece that differs is copied. Portable: no Windows headers, no Vulkan.
7#pragma once
8
9#include <algorithm>
10#include <cstddef>
11#include <cstdint>
12#include <cstring>
13
14namespace leonida::shadow_keep {
15
16inline constexpr std::size_t kPiece = 256;
17
18// The sum of `n` bytes, never 0 (0 is "not known": the piece is copied at its next look).
19// Four independent lanes over 32 bytes a step, so the multiplies do not wait on each other: about the speed of a
20// copy (one chained lane read about 3.6 GB/s on an RTX 5080 machine's CPU, a copy about 18 GB/s).
21inline std::uint64_t sum_of(const std::uint8_t* bytes, std::size_t n) {
22 constexpr std::uint64_t k = 0xff51afd7ed558ccdull;
23 const auto rotl = [](std::uint64_t x, int r) { return (x << r) | (x >> (64 - r)); };
24 std::uint64_t a0 = 0x9e3779b97f4a7c15ull ^ n, a1 = 0xc2b2ae3d27d4eb4full, a2 = 0x165667b19e3779f9ull,
25 a3 = 0x27d4eb2f165667c5ull;
26 std::size_t i = 0;
27 for (; i + 32 <= n; i += 32) {
28 std::uint64_t v[4];
29 std::memcpy(v, bytes + i, 32);
30 a0 = rotl(a0 ^ v[0], 31) * k;
31 a1 = rotl(a1 ^ v[1], 31) * k;
32 a2 = rotl(a2 ^ v[2], 31) * k;
33 a3 = rotl(a3 ^ v[3], 31) * k;
34 }
35 for (; i < n; i += 8) {
36 std::uint64_t v = 0;
37 std::memcpy(&v, bytes + i, n - i < 8 ? n - i : 8);
38 a0 = rotl(a0 ^ v, 31) * k;
39 }
40 std::uint64_t h = a0 ^ rotl(a1, 17) ^ rotl(a2, 29) ^ rotl(a3, 47);
41 h ^= h >> 33;
42 h *= 0xc4ceb9fe1a85ec53ull;
43 h ^= h >> 29;
44 return h | 1; // 0: not known
45}
46
47// `bytes` holds the title's bytes [va, va + n) as read now. sums[k] is the sum of the piece at base + k * kPiece
48// (base kPiece-aligned) as last copied. Each piece, cut at kPiece boundaries of the address (the first and last may be
49// partial), whose bytes differ from its sum takes the new sum and is handed to copy(from, to, source).
50template <class Copy>
51void copy_changed(const std::uint8_t* bytes, std::uintptr_t va, std::size_t n, std::uint64_t* sums,
52 std::uintptr_t base, Copy&& copy) {
53 for (std::size_t off = 0; off < n;) {
54 const std::size_t piece = std::min<std::size_t>(n - off, kPiece - ((va + off) & (kPiece - 1)));
55 std::uint64_t& known = sums[(va + off - base) / kPiece];
56 const std::uint64_t sum = sum_of(bytes + off, piece);
57 if (sum != known) {
58 known = sum;
59 copy(va + off, va + off + piece, bytes + off);
60 }
61 off += piece;
62 }
63}
64
65// The pieces over [from, to) are not known any more (the copies were changed another way, as zeroed): each is copied
66// at its next look.
67inline void forget(std::uint64_t* sums, std::uintptr_t base, std::uintptr_t from, std::uintptr_t to) {
68 if (from >= to) return;
69 std::fill(sums + (from - base) / kPiece, sums + (to - base + kPiece - 1) / kPiece, std::uint64_t(0));
70}
71
72} // namespace leonida::shadow_keep
diff --git a/runtime/src/title_geometry_watch.h b/runtime/src/title_geometry_watch.h
index ca600fb9b..7283eccd8 100644
--- a/runtime/src/title_geometry_watch.h
+++ b/runtime/src/title_geometry_watch.h
@@ -1,6 +1,7 @@
1#pragma once 1#pragma once
2 2
3#include "title_page_watch.h" 3#include "title_page_watch.h"
4#include <algorithm>
4#include <array> 5#include <array>
5#include <cstdint> 6#include <cstdint>
6#include <vector> 7#include <vector>
@@ -72,7 +73,22 @@ inline void note_released(std::uintptr_t begin, std::uintptr_t end) {
72 std::lock_guard subscribers_lock(s.subscribers_mutex); 73 std::lock_guard subscribers_lock(s.subscribers_mutex);
73 for (ReleaseQueue* q : s.subscribers) { 74 for (ReleaseQueue* q : s.subscribers) {
74 std::lock_guard lock(q->mutex); 75 std::lock_guard lock(q->mutex);
75 if (q->ranges.size() < 65536) { 76 bool room = q->ranges.size() < 65536;
77 if (!room) {
78 // Full: first the ranges that overlap or touch become one (unmaps report page runs, often neighbours), and
79 // only when that leaves it more than half full does it all become one covering range.
80 std::sort(q->ranges.begin(), q->ranges.end());
81 std::size_t kept = 0;
82 for (std::size_t i = 1; i < q->ranges.size(); ++i) {
83 if (q->ranges[i].first <= q->ranges[kept].second)
84 q->ranges[kept].second = (std::max)(q->ranges[kept].second, q->ranges[i].second);
85 else
86 q->ranges[++kept] = q->ranges[i];
87 }
88 q->ranges.resize(kept + 1);
89 room = q->ranges.size() <= 32768;
90 }
91 if (room) {
76 q->ranges.emplace_back(begin, end); 92 q->ranges.emplace_back(begin, end);
77 } else { 93 } else {
78 std::uintptr_t merged_lo = begin; 94 std::uintptr_t merged_lo = begin;
diff --git a/runtime/src/title_texture_memory.h b/runtime/src/title_texture_memory.h
index a97e5bed6..ff9f004e0 100644
--- a/runtime/src/title_texture_memory.h
+++ b/runtime/src/title_texture_memory.h
@@ -1,14 +1,17 @@
1#pragma once 1#pragma once
2#include <windows.h> 2#include <windows.h>
3#include <algorithm>
3#include <cstddef> 4#include <cstddef>
4#include <cstdint> 5#include <cstdint>
5#include <limits> 6#include <limits>
6 7
8#include "title_page_watch.h"
9
7namespace leonida { 10namespace leonida {
8 11
9// Keep negative probes until the title changes the map or a writer reports this footprint. With cache_success, 12// 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 13// positive ones too: a caller that is told of every map change over the footprint (retry or sync_map) and reads it
11// (a page gone since faults into a defer) need not walk the pages before every read. 14// under a guard (a page gone since faults into a defer) need not walk the pages before every read.
12class TextureReadability { 15class TextureReadability {
13public: 16public:
14 template<class Probe> 17 template<class Probe>
@@ -16,16 +19,37 @@ public:
16 if (cache_failure && pending_ && !retry_ && generation_ == generation) return false; 19 if (cache_failure && pending_ && !retry_ && generation_ == generation) return false;
17 if (cache_success && probed_ && !pending_ && !retry_ && generation_ == generation) return true; 20 if (cache_success && probed_ && !pending_ && !retry_ && generation_ == generation) return true;
18 generation_ = generation; // snapshot before the probe so a concurrent map change is noticed 21 generation_ = generation; // snapshot before the probe so a concurrent map change is noticed
22 map_generation_ = title_memory_map::generation();
19 retry_ = false; 23 retry_ = false;
20 probed_ = true; 24 probed_ = true;
21 pending_ = !probe(); 25 pending_ = !probe();
22 return !pending_; 26 return !pending_;
23 } 27 }
28 // Between refresh passes, check whether the map journal recorded a change over [cpu, cpu + size) since both
29 // this texture's last probe and the last pass's sweep.
30 void sync_map(std::uint64_t pass_generation, std::uintptr_t cpu, std::uint64_t size) {
31 if (!probed_ || retry_) return;
32 const std::uint64_t since = (std::max)(map_generation_, pass_generation);
33 if (title_memory_map::generation() == since) return;
34 const std::uintptr_t end = size > (std::numeric_limits<std::uintptr_t>::max)() - cpu
35 ? (std::numeric_limits<std::uintptr_t>::max)()
36 : cpu + static_cast<std::uintptr_t>(size);
37 std::uint64_t now = 0;
38 bool overlapped = false;
39 if (!title_memory_map::changes_since(
40 since, now, cpu, end, [&](std::uintptr_t, std::uintptr_t) { overlapped = true; }) ||
41 overlapped) {
42 retry_ = true;
43 } else {
44 map_generation_ = now;
45 }
46 }
24 void defer() { pending_ = true; } // mapping disappeared between the probe and the read 47 void defer() { pending_ = true; } // mapping disappeared between the probe and the read
25 void retry() { retry_ = true; } 48 void retry() { retry_ = true; }
26 bool pending() const { return pending_; } 49 bool pending() const { return pending_; }
27private: 50private:
28 std::uint64_t generation_ = 0; 51 std::uint64_t generation_ = 0;
52 std::uint64_t map_generation_ = 0;
29 bool pending_ = false, retry_ = false, probed_ = false; 53 bool pending_ = false, retry_ = false, probed_ = false;
30}; 54};
31 55
diff --git a/runtime/src/title_va_alias.h b/runtime/src/title_va_alias.h
index f3fd2b410..c49880d92 100644
--- a/runtime/src/title_va_alias.h
+++ b/runtime/src/title_va_alias.h
@@ -16,7 +16,6 @@
16// that makes a GPU copy for an address in the title's memory that has none yet, and a scanner that rewrites the 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 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). 18// added to it, so it is tested without a GPU (title_va_alias_test).
19#include "descriptor_range_changes.h"
20#include <algorithm> 19#include <algorithm>
21#include "buffer_va_index.h" 20#include "buffer_va_index.h"
22 21
@@ -45,6 +44,9 @@ public:
45 // memory (an arena VA, a buffer of the layer's). 44 // memory (an arena VA, a buffer of the layer's).
46 using Resolver = bool (*)(void* context, std::uint64_t va, std::uint64_t bytes, std::uint64_t& shader_va); 45 using Resolver = bool (*)(void* context, std::uint64_t va, std::uint64_t bytes, std::uint64_t& shader_va);
47 using TableScanner = void (*)(void* context, std::uint64_t table_va, std::uint32_t descriptors); 46 using TableScanner = void (*)(void* context, std::uint64_t table_va, std::uint32_t descriptors);
47 // Every binding resolved to a copy of the title's memory: [va, va + bytes) as they are reached at (the device keeps
48 // them for the copy back after the submission, see DeviceState::write_back_titles).
49 using Noter = void (*)(void* context, std::uint64_t va, std::uint64_t bytes);
48 50
49 // [title_va, title_va + bytes) is reached as [shader_va, shader_va + bytes). A range that overlaps a live one 51 // [title_va, title_va + bytes) is reached as [shader_va, shader_va + bytes). A range that overlaps a live one
50 // replaces it (the title has placed a new buffer over pages it released). False for an empty or wrapping range. 52 // replaces it (the title has placed a new buffer over pages it released). False for an empty or wrapping range.
@@ -52,7 +54,7 @@ public:
52 if (!bytes || title_va > UINT64_MAX - bytes) return false; 54 if (!bytes || title_va > UINT64_MAX - bytes) return false;
53 std::unique_lock lock(mutex_); 55 std::unique_lock lock(mutex_);
54 erase_overlapping(title_va, title_va + bytes); 56 erase_overlapping(title_va, title_va + bytes);
55 changes_.record(title_va, bytes); 57 notify(Change::added, title_va, bytes, shader_va);
56 ranges_[title_va] = {title_va + bytes, shader_va}; 58 ranges_[title_va] = {title_va + bytes, shader_va};
57 by_shader_.insert(shader_va, bytes, title_va); 59 by_shader_.insert(shader_va, bytes, title_va);
58 count_.store(ranges_.size(), std::memory_order_release); 60 count_.store(ranges_.size(), std::memory_order_release);
@@ -74,11 +76,10 @@ public:
74 std::unique_lock lock(mutex_); 76 std::unique_lock lock(mutex_);
75 const auto it = ranges_.find(title_va); 77 const auto it = ranges_.find(title_va);
76 if (it != ranges_.end() && it->second.shader_va == shader_va) { 78 if (it != ranges_.end() && it->second.shader_va == shader_va) {
77 changes_.record(it->first, it->second.end - it->first); 79 notify(Change::removed, it->first, it->second.end - it->first, shader_va);
78 by_shader_.erase(shader_va, title_va); 80 by_shader_.erase(shader_va, title_va);
79 note_removed(it->second.shader_va, it->second.end - it->first); 81 note_removed(it->second.shader_va, it->second.end - it->first);
80 ranges_.erase(it); 82 ranges_.erase(it);
81 invalidations_.fetch_add(1, std::memory_order_release);
82 generation_.fetch_add(1, std::memory_order_release); 83 generation_.fetch_add(1, std::memory_order_release);
83 } 84 }
84 count_.store(ranges_.size(), std::memory_order_release); 85 count_.store(ranges_.size(), std::memory_order_release);
@@ -86,14 +87,13 @@ public:
86 87
87 // A copy that answered for [title_va, title_va + bytes) at shader_va went, whether or not it had a range here (a 88 // A copy that answered for [title_va, title_va + bytes) at shader_va went, whether or not it had a range here (a
88 // geometry copy that vsharp_address or a placed view reached through GeometryViews directly has none): what was 89 // geometry copy that vsharp_address or a placed view reached through GeometryViews directly has none): what was
89 // translated through it is stale. Recorded as a removal would be: the console heaps translate the slots in the 90 // translated through it is stale. Told as a removal is: the console heaps fix the slots that resolved through
90 // range again (invalidations, changed_ranges), and the GPU key table drops answers into shader_va (take_removed). 91 // either side of it again (the listeners), and the GPU key table drops answers into shader_va (take_removed).
91 void forget_copy(std::uint64_t title_va, std::uint64_t bytes, std::uint64_t shader_va) { 92 void forget_copy(std::uint64_t title_va, std::uint64_t bytes, std::uint64_t shader_va) {
92 if (!bytes) return; 93 if (!bytes) return;
93 std::unique_lock lock(mutex_); 94 std::unique_lock lock(mutex_);
94 changes_.record(title_va, bytes); 95 notify(Change::removed, title_va, bytes, shader_va);
95 note_removed(shader_va, bytes); 96 note_removed(shader_va, bytes);
96 invalidations_.fetch_add(1, std::memory_order_release);
97 generation_.fetch_add(1, std::memory_order_release); 97 generation_.fetch_add(1, std::memory_order_release);
98 } 98 }
99 99
@@ -180,6 +180,7 @@ public:
180 std::uint64_t to = shader_va(va); 180 std::uint64_t to = shader_va(va);
181 if (to != va) { 181 if (to != va) {
182 translated_[kind].fetch_add(1, std::memory_order_relaxed); 182 translated_[kind].fetch_add(1, std::memory_order_relaxed);
183 note_reached(va, bytes);
183 return to; 184 return to;
184 } 185 }
185 Resolver resolver; 186 Resolver resolver;
@@ -191,6 +192,7 @@ public:
191 } 192 }
192 if (!resolver || !resolver(context, va, bytes, to)) return va; 193 if (!resolver || !resolver(context, va, bytes, to)) return va;
193 (to != va ? translated_ : untranslated_)[kind].fetch_add(1, std::memory_order_relaxed); 194 (to != va ? translated_ : untranslated_)[kind].fetch_add(1, std::memory_order_relaxed);
195 if (to != va) note_reached(va, bytes);
194 return to; 196 return to;
195 } 197 }
196 198
@@ -200,6 +202,18 @@ public:
200 if (va && shader_va(va) != va) untranslated_[kind].fetch_add(1, std::memory_order_relaxed); 202 if (va && shader_va(va) != va) untranslated_[kind].fetch_add(1, std::memory_order_relaxed);
201 } 203 }
202 204
205 // [va, va + bytes) is reached as a copy of the title's memory: the device keeps it for the copy back.
206 void note_reached(std::uint64_t va, std::uint64_t bytes) {
207 Noter noter;
208 void* context;
209 {
210 std::lock_guard lock(hook_mutex_);
211 noter = noter_;
212 context = hook_context_;
213 }
214 if (noter) noter(context, va, bytes);
215 }
216
203 // Before a submission: the device rewrites the buffer V#s of the `descriptors` slots the root signature declares 217 // Before a submission: the device rewrites the buffer V#s of the `descriptors` slots the root signature declares
204 // for the table at `table_va` (a console VA in one of its shader-visible CBV/SRV/UAV heaps). 218 // for the table at `table_va` (a console VA in one of its shader-visible CBV/SRV/UAV heaps).
205 void scan_table(std::uint64_t table_va, std::uint32_t descriptors) { 219 void scan_table(std::uint64_t table_va, std::uint32_t descriptors) {
@@ -242,6 +256,7 @@ public:
242 } 256 }
243 memory_[begin] = end; 257 memory_[begin] = end;
244 memory_generation_.fetch_add(1, std::memory_order_release); 258 memory_generation_.fetch_add(1, std::memory_order_release);
259 notify(Change::memory_added, base, bytes, 0);
245 } 260 }
246 void remove_title_memory(std::uint64_t base) { 261 void remove_title_memory(std::uint64_t base) {
247 std::unique_lock lock(memory_mutex_); 262 std::unique_lock lock(memory_mutex_);
@@ -344,16 +359,35 @@ public:
344 hook_context_ = nullptr; 359 hook_context_ = nullptr;
345 resolver_ = nullptr; 360 resolver_ = nullptr;
346 scanner_ = nullptr; 361 scanner_ = nullptr;
362 noter_ = nullptr;
347 } 363 }
348 // The resolver alone, for a device that scans its descriptor tables itself. 364 // The resolver alone, for a device that scans its descriptor tables itself.
349 void set_resolver(void* context, Resolver resolver) { set_hooks(context, resolver, nullptr); } 365 void set_resolver(void* context, Resolver resolver) { set_hooks(context, resolver, nullptr); }
350 void clear_resolver(void* context) { clear_hooks(context); } 366 void clear_resolver(void* context) { clear_hooks(context); }
367 // Set after set_hooks, so the hook (and its context) stays the device's: what reached a copy of the title's memory.
368 void set_noter(Noter noter) {
369 std::lock_guard lock(hook_mutex_);
370 noter_ = noter;
371 }
351 372
352 std::size_t size() const { return count_.load(std::memory_order_acquire); } 373 std::size_t size() const { return count_.load(std::memory_order_acquire); }
353 std::uint64_t invalidations() const { return invalidations_.load(std::memory_order_acquire); } 374
354 bool changed_ranges(uint64_t& cursor, DescriptorRanges& ranges) const { 375 // What changed, told as it happens to every listener (a device whose console heaps record what each descriptor
355 std::shared_lock lock(mutex_); 376 // resolved to, src/console_heap_slot_records.h): [title_va, title_va + bytes) reached at shader_va was added, or
356 return changes_.read(cursor, ranges); 377 // was removed or replaced (remove, an overlapping add, forget_copy: what resolved through it is stale), or title
378 // memory was added (shader_va 0: a copy may now be made for an address that had none). Called with the table's
379 // lock held, so a listener only records and never calls back into the table. remove_listener returns once no call
380 // to that listener is in progress.
381 enum class Change : unsigned { added, removed, memory_added };
382 using Listener = void (*)(void* context, Change change, std::uint64_t title_va, std::uint64_t bytes,
383 std::uint64_t shader_va);
384 void add_listener(void* context, Listener listener) {
385 std::unique_lock lock(listener_mutex_);
386 listeners_.emplace_back(context, listener);
387 }
388 void remove_listener(void* context) {
389 std::unique_lock lock(listener_mutex_);
390 std::erase_if(listeners_, [context](const auto& l) { return l.first == context; });
357 } 391 }
358 // Bumped by every add and every removal: a copy of mappings() is current while it has not moved. 392 // Bumped by every add and every removal: a copy of mappings() is current while it has not moved.
359 std::uint64_t generation() const { return generation_.load(std::memory_order_acquire); } 393 std::uint64_t generation() const { return generation_.load(std::memory_order_acquire); }
@@ -395,9 +429,8 @@ private:
395 auto previous = std::prev(it); 429 auto previous = std::prev(it);
396 if (previous->second.end > begin) it = previous; 430 if (previous->second.end > begin) it = previous;
397 } 431 }
398 if (it != ranges_.end() && it->first < end) invalidations_.fetch_add(1, std::memory_order_release);
399 while (it != ranges_.end() && it->first < end) { 432 while (it != ranges_.end() && it->first < end) {
400 changes_.record(it->first, it->second.end - it->first); 433 notify(Change::removed, it->first, it->second.end - it->first, it->second.shader_va);
401 by_shader_.erase(it->second.shader_va, it->first); 434 by_shader_.erase(it->second.shader_va, it->first);
402 note_removed(it->second.shader_va, it->second.end - it->first); 435 note_removed(it->second.shader_va, it->second.end - it->first);
403 it = ranges_.erase(it); 436 it = ranges_.erase(it);
@@ -409,12 +442,17 @@ private:
409 if (record_removals_.load(std::memory_order_relaxed)) removed_.push_back({shader_va, bytes}); 442 if (record_removals_.load(std::memory_order_relaxed)) removed_.push_back({shader_va, bytes});
410 } 443 }
411 444
412 DescriptorRangeChanges changes_; 445 void notify(Change change, std::uint64_t title_va, std::uint64_t bytes, std::uint64_t shader_va) const {
446 std::shared_lock lock(listener_mutex_);
447 for (const auto& [context, listener] : listeners_) listener(context, change, title_va, bytes, shader_va);
448 }
449
450 mutable std::shared_mutex listener_mutex_; // taken inside mutex_ and memory_mutex_, never the other way
451 std::vector<std::pair<void*, Listener>> listeners_;
413 mutable std::shared_mutex mutex_; 452 mutable std::shared_mutex mutex_;
414 std::map<std::uint64_t, Range> ranges_; // by title VA 453 std::map<std::uint64_t, Range> ranges_; // by title VA
415 BufferVaIndex<std::uint64_t> by_shader_; // the same ranges by shader VA (id: the title VA); copies may overlap 454 BufferVaIndex<std::uint64_t> by_shader_; // the same ranges by shader VA (id: the title VA); copies may overlap
416 std::atomic<std::size_t> count_{0}; 455 std::atomic<std::size_t> count_{0};
417 std::atomic<std::uint64_t> invalidations_{};
418 std::atomic<std::uint64_t> generation_{}; 456 std::atomic<std::uint64_t> generation_{};
419 std::atomic<bool> record_removals_{false}; 457 std::atomic<bool> record_removals_{false};
420 std::vector<std::pair<std::uint64_t, std::uint64_t>> removed_; // (shader VA, bytes), when recorded 458 std::vector<std::pair<std::uint64_t, std::uint64_t>> removed_; // (shader VA, bytes), when recorded
@@ -424,6 +462,7 @@ private:
424 BufferMaker maker_ = nullptr; 462 BufferMaker maker_ = nullptr;
425 Resolver resolver_ = nullptr; 463 Resolver resolver_ = nullptr;
426 TableScanner scanner_ = nullptr; 464 TableScanner scanner_ = nullptr;
465 Noter noter_ = nullptr;
427 void* source_context_ = nullptr; 466 void* source_context_ = nullptr;
428 DescriptorSource source_ = nullptr; 467 DescriptorSource source_ = nullptr;
429 std::atomic<std::uint64_t> pulled_{0}; 468 std::atomic<std::uint64_t> pulled_{0};
diff --git a/runtime/src/vulkan_backend.h b/runtime/src/vulkan_backend.h
index 9fdb29640..bf970aa28 100644
--- a/runtime/src/vulkan_backend.h
+++ b/runtime/src/vulkan_backend.h
@@ -1807,6 +1807,7 @@ public:
1807 XdxrTriangles g; 1807 XdxrTriangles g;
1808 g.vertices = t.vertex_va ? base + t.vertex_va : 0; 1808 g.vertices = t.vertex_va ? base + t.vertex_va : 0;
1809 g.vertex_stride = t.vertex_stride; 1809 g.vertex_stride = t.vertex_stride;
1810 g.vertex_count = t.vertex_count;
1810 g.xy_only = t.vertex_format == VK_FORMAT_R32G32_SFLOAT; 1811 g.xy_only = t.vertex_format == VK_FORMAT_R32G32_SFLOAT;
1811 g.indices = t.index_type && t.index_va ? base + t.index_va : 0; 1812 g.indices = t.index_type && t.index_va ? base + t.index_va : 0;
1812 g.index_type = t.index_type; 1813 g.index_type = t.index_type;
diff --git a/runtime/src/vulkan_bindless.h b/runtime/src/vulkan_bindless.h
index da6d680f0..fc1b2f555 100644
--- a/runtime/src/vulkan_bindless.h
+++ b/runtime/src/vulkan_bindless.h
@@ -239,14 +239,15 @@ struct SetLayout {
239 SetLayout& operator=(const SetLayout&) = delete; 239 SetLayout& operator=(const SetLayout&) = delete;
240}; 240};
241 241
242// What size_bindings() grows to where the device's limits allow. At 32-64 bytes a descriptor the whole set is then 242// What size_bindings() grows the sampled array of every single-sample dimension (2D, 2D array, 3D and 1D) to where
243// 5-10 MiB with 153697 descriptors when all MS classes and array bindings reach their limits (an RTX 5070). 243// the device's limits allow: one size for all of them. Which dimensions its textures have is the title's choice, and
244inline constexpr std::uint32_t max_2d_images = 65536; 244// an image keeps its index (one for each distinct T# of it) for as long as the texture lives, so no dimension gets
245// The other single-sample dimensions: a title streams far more cube maps and texture arrays (and 1D lookup 245// less room than another: a world run kept 4090 live 1D textures, the whole of the 4096 1D indices the set once
246// textures) than the 1024 and 256 of the defaults, each distinct T# of one taking its own index. 246// stopped at, while the 2D arrays had room to spare. The bound is the set's memory, not the device's descriptor
247inline constexpr std::uint32_t max_2d_array_images = 16384; 247// limits (8388606 sampled images on RADV): every element of every array is in each generation's descriptor pool,
248inline constexpr std::uint32_t max_3d_images = 4096; 248// used or not. At 32-64 bytes a descriptor the whole set is 10-20 MiB with 325729 descriptors when all MS classes
249inline constexpr std::uint32_t max_1d_images = 4096; 249// and arrays reach their limits (an RTX 5070).
250inline constexpr std::uint32_t max_images = 65536;
250inline constexpr std::uint32_t max_storage_indices = 4096; // in each storage array, at most its dimension's images 251inline constexpr std::uint32_t max_storage_indices = 4096; // in each storage array, at most its dimension's images
251// A full D3D12 shader-visible sampler heap (2048) and room for literal and static S#s, within what the device can 252// A full D3D12 shader-visible sampler heap (2048) and room for literal and static S#s, within what the device can
252// create (maxSamplerAllocationCount, at least 4000) less the samplers that are not in the set. 253// create (maxSamplerAllocationCount, at least 4000) less the samplers that are not in the set.
@@ -261,7 +262,8 @@ inline constexpr std::uint32_t growth_headroom = 64;
261// standalone samplers do not, though they count in an update-after-bind pool. 262// standalone samplers do not, though they count in an update-after-bind pool.
262// 1. The default counts, or as much of them as the device holds: samplers, then storage, then 2D images. 263// 1. The default counts, or as much of them as the device holds: samplers, then storage, then 2D images.
263// 2. The MS pairs that fit beside them (limit_ms_bindings, which may turn classes off). 264// 2. The MS pairs that fit beside them (limit_ms_bindings, which may turn classes off).
264// 3. Growth towards the maximums above, in the same order, then the 2D-array, 3D and 1D images, within 265// 3. Growth towards the maximums above, in the same order, then the 2D-array, 3D and 1D images together (one
266// count for the three, so a device whose limits stop growth short of max_images favours none of them), within
265// maxPerSetDescriptors. That limit only says what is sure to work (vkGetDescriptorSetLayoutSupport may allow 267// maxPerSetDescriptors. That limit only says what is sure to work (vkGetDescriptorSetLayoutSupport may allow
266// more), so it never shrinks step 1. 268// more), so it never shrinks step 1.
267// A storage array holds the smaller of the storage count and its dimension's sampled count: add_image never 269// A storage array holds the smaller of the storage count and its dimension's sampled count: add_image never
@@ -363,11 +365,23 @@ inline bool size_bindings(BindlessFeatures& features, const VkPhysicalDeviceLimi
363 const std::uint32_t creatable = 365 const std::uint32_t creatable =
364 limits.maxSamplerAllocationCount - std::min(limits.maxSamplerAllocationCount, reserved_samplers); 366 limits.maxSamplerAllocationCount - std::min(limits.maxSamplerAllocationCount, reserved_samplers);
365 grow(samplers, std::max(samplers, std::min(max_samplers, creatable)), growth_headroom, set_limit); 367 grow(samplers, std::max(samplers, std::min(max_samplers, creatable)), growth_headroom, set_limit);
366 grow(images, std::max(images, max_2d_images), growth_headroom, set_limit); 368 grow(images, std::max(images, max_images), growth_headroom, set_limit);
367 grow(storage, std::max(storage, max_storage_indices), growth_headroom, set_limit); 369 grow(storage, std::max(storage, max_storage_indices), growth_headroom, set_limit);
368 grow(arrays, std::max(arrays, max_2d_array_images), growth_headroom, set_limit); 370 // The other three dimensions grow as one: each gets the larger of its count so far and the shared one.
369 grow(volumes, std::max(volumes, max_3d_images), growth_headroom, set_limit); 371 const std::uint32_t arrays_before = arrays, volumes_before = volumes, lines_before = lines;
370 grow(lines, std::max(lines, max_1d_images), growth_headroom, set_limit); 372 std::uint32_t together = 0;
373 const auto set_together = [&](std::uint32_t n) {
374 arrays = std::max(arrays_before, n);
375 volumes = std::max(volumes_before, n);
376 lines = std::max(lines_before, n);
377 };
378 for (std::uint32_t high = max_images; together < high;) {
379 const std::uint32_t n = together + (high - together + 1) / 2;
380 set_together(n);
381 if (fits(growth_headroom, set_limit)) together = n;
382 else high = n - 1;
383 }
384 set_together(together);
371 apply(true); 385 apply(true);
372 return full; 386 return full;
373} 387}
@@ -484,7 +498,7 @@ public:
484 StorageViews storage{}; 498 StorageViews storage{};
485 }; 499 };
486 500
487 // Gives an image an index in its dimension's bindings: 0 when the dimension is full. `sampled` goes to the 501 // Gives an image an index in its dimension's bindings: 0 when the dimension is full (image_refusal says why). `sampled` goes to the
488 // sampled array in `sampled_layout` (the layout the image is in when shaders read it); the storage views go to 502 // sampled array in `sampled_layout` (the layout the image is in when shaders read it); the storage views go to
489 // the storage arrays in GENERAL. For MS views, sampled_class selects the float, uint or sint sampled array. 503 // the storage arrays in GENERAL. For MS views, sampled_class selects the float, uint or sint sampled array.
490 // `mirror` adds the same index in the 2D arrays (a 2D-array or cube image's slice 0): the slot must then be free 504 // `mirror` adds the same index in the 2D arrays (a 2D-array or cube image's slice 0): the slot must then be free
@@ -553,6 +567,23 @@ public:
553 return index; 567 return index;
554 } 568 }
555 569
570 // Why add_image returned 0 for an image of `dimension` (with storage views when `stores`; sampled_class for the
571 // MS dimensions): the set has no array for it; every index of its dimension is taken (array_full: in use, or
572 // removed and held until the next flush that brings the table up to date); or only the storage arrays' shorter
573 // range is, which an image with storage views needs an index in (storage_full).
574 enum class ImageRefusal { no_array, array_full, storage_full };
575 ImageRefusal image_refusal(ImageDimension dimension, bool stores, std::uint32_t sampled_class = 0) const {
576 if (!stores && bindless::sampled_binding(dimension) == bindless::no_binding) return ImageRefusal::no_array;
577 if (bindless::multisampled(dimension) && (stores || !supports_ms_class(sampled_class)))
578 return ImageRefusal::no_array;
579 const auto& used = image_used_[std::uint32_t(dimension)];
580 const std::size_t low_end = std::min<std::size_t>(used.size(), storage_capacity(dimension));
581 const auto storage_end = used.begin() + std::ptrdiff_t(low_end);
582 const bool storage_free = low_end > 1 && std::find(used.begin() + 1, storage_end, std::uint8_t(0)) != storage_end;
583 return stores && !storage_free && free_images(dimension) ? ImageRefusal::storage_full
584 : ImageRefusal::array_full;
585 }
586
556 // New views or a new layout for an index add_image returned (a texture's state changed, say). `mirror` is 587 // New views or a new layout for an index add_image returned (a texture's state changed, say). `mirror` is
557 // refreshed too when the image was added with one (mirror_of says whose 2D slot it is). The slot bookkeeping 588 // refreshed too when the image was added with one (mirror_of says whose 2D slot it is). The slot bookkeeping
558 // follows what was written, and `kind_out`, when given, receives the index's kind word afterwards for a 589 // follows what was written, and `kind_out`, when given, receives the index's kind word afterwards for a
diff --git a/runtime/src/vulkan_indirect_clamp.h b/runtime/src/vulkan_indirect_clamp.h
index 1822d9614..fcf5cd76b 100644
--- a/runtime/src/vulkan_indirect_clamp.h
+++ b/runtime/src/vulkan_indirect_clamp.h
@@ -5,9 +5,10 @@
5// or garbage record makes a dispatch of billions of groups or a draw of four billion vertices run until the host 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 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 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 8// instances, the device's maxComputeWorkGroupCount per dimension (65 535 for a mesh dispatch), 2^20 groups per
9// list (the shader is indirect_clamp.comp) - and the indirect command reads that scratch. The application's argument 9// dispatch, and a 2^27-unit work budget per command list (the shader is indirect_clamp.comp) - and the indirect
10// and count buffers are left untouched, so values within the limits replay bit-identically. 10// command reads that scratch. The application's argument and count buffers are left untouched, so values within the
11// limits replay bit-identically.
11// 12//
12// One pass covers all four argument kinds the layer can emit (draw, draw indexed, dispatch, mesh dispatch) and the 13// 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// counted variants, whose count is clamped to max_command_count as well (a *Count draw then reads a count the scratch
@@ -61,11 +62,27 @@ inline constexpr std::uint32_t indirect_clamp_mesh = 3;
61 62
62// What the pass bounds, as indirect_clamp.comp states them. 63// What the pass bounds, as indirect_clamp.comp states them.
63inline constexpr std::uint32_t indirect_clamp_max_vertices = 1u << 24; 64inline constexpr std::uint32_t indirect_clamp_max_vertices = 1u << 24;
65// A draw record of this many vertices or indices an instance, or more, is unfilled: it runs empty and charges nothing
66// (RT-INDIRECT-DRAW-UNFILLED-COUNT), so garbage counts cannot use up the list budget ahead of the real draws.
67inline constexpr std::uint32_t indirect_clamp_unfilled_draw = 1u << 23;
64inline constexpr std::uint32_t indirect_clamp_max_vertex_instances = 1u << 26; 68inline constexpr std::uint32_t indirect_clamp_max_vertex_instances = 1u << 26;
69// Groups in a mesh dispatch's x. A compute dispatch is bounded by the device's maxComputeWorkGroupCount instead
70// (indirect_clamp_dispatch_limit), which on NVIDIA, for one, is far above Vulkan's guaranteed 65 535 in x.
65inline constexpr std::uint32_t indirect_clamp_max_group_dimension = 65535u; 71inline constexpr std::uint32_t indirect_clamp_max_group_dimension = 65535u;
66inline constexpr std::uint32_t indirect_clamp_max_groups = 1u << 20; 72inline constexpr std::uint32_t indirect_clamp_max_groups = 1u << 20;
73// The x a dispatch record was cut at before the device's limit applied, which the dispatch counters compare with.
74inline constexpr std::uint32_t indirect_clamp_narrow_groups = 65535u;
67inline constexpr std::uint32_t indirect_clamp_budget = 1u << 27; 75inline constexpr std::uint32_t indirect_clamp_budget = 1u << 27;
68 76
77// What the pass lets a dispatch record ask for in x, y and z: the device's own maxComputeWorkGroupCount. A fixed
78// 65 535 cut a dispatch of more groups in x short on a device that runs them, and the groups past the cut never wrote
79// their output (blocky patches; the idea is from codec-d/cool_fox docs/findings.md). A limit the device reports as 0
80// is taken as Vulkan's guaranteed minimum.
81inline std::uint32_t indirect_clamp_dispatch_limit(const VkPhysicalDeviceLimits& limits, int axis) {
82 const std::uint32_t limit = limits.maxComputeWorkGroupCount[axis];
83 return limit ? limit : indirect_clamp_max_group_dimension;
84}
85
69// The largest scratch allocation accepted for one ExecuteIndirect call. 86// The largest scratch allocation accepted for one ExecuteIndirect call.
70inline constexpr std::uint64_t indirect_clamp_max_scratch_bytes = std::uint64_t(64) << 20; 87inline constexpr std::uint64_t indirect_clamp_max_scratch_bytes = std::uint64_t(64) << 20;
71 88
@@ -167,6 +184,12 @@ public:
167 std::uint64_t mesh_yz_records = 0; 184 std::uint64_t mesh_yz_records = 0;
168 std::uint32_t mesh_max_y = 0; 185 std::uint32_t mesh_max_y = 0;
169 std::uint32_t mesh_max_z = 0; 186 std::uint32_t mesh_max_z = 0;
187 // Dispatch records after the clamp: all of them, those that run wider than 65 535 groups in x (the old cut),
188 // the widest x that runs, and those cut at the device's own limits.
189 std::uint64_t dispatch_records = 0;
190 std::uint64_t dispatch_wide = 0;
191 std::uint32_t dispatch_widest = 0;
192 std::uint64_t dispatch_cut = 0;
170 }; 193 };
171 194
172 // One submission's clamp state: the counter slots its calls claimed, read and released together once that 195 // One submission's clamp state: the counter slots its calls claimed, read and released together once that
@@ -232,7 +255,7 @@ private:
232 VkDeviceMemory memory = VK_NULL_HANDLE; 255 VkDeviceMemory memory = VK_NULL_HANDLE;
233 std::uint8_t* host = nullptr; 256 std::uint8_t* host = nullptr;
234 std::uint32_t slots = 0; 257 std::uint32_t slots = 0;
235 static constexpr std::uint32_t slot_bytes = 64; // 48 bytes of counters (words 4-7 unused), 16 of padding 258 static constexpr std::uint32_t slot_bytes = 64; // 16 words of counters (words 4-7 unused)
236 }; 259 };
237 static constexpr std::uint32_t slots_per_area = 64; 260 static constexpr std::uint32_t slots_per_area = 64;
238 // 4,096 slots (128 KiB of host memory): enough for a submission's ExecuteIndirect calls after the load, and the 261 // 4,096 slots (128 KiB of host memory): enough for a submission's ExecuteIndirect calls after the load, and the
@@ -265,11 +288,12 @@ private:
265 Counters counters_{}; 288 Counters counters_{};
266 std::uint64_t next_report_frame_ = 0; 289 std::uint64_t next_report_frame_ = 0;
267 std::chrono::steady_clock::time_point next_mesh_report_{}; 290 std::chrono::steady_clock::time_point next_mesh_report_{};
291 std::chrono::steady_clock::time_point next_dispatch_report_{};
268}; 292};
269 293
270namespace detail { 294namespace detail {
271 295
272// One clamp pass's push-constant block. The shader's block is the same: five device addresses, then the six words. 296// One clamp pass's push-constant block. The shader's block is the same: six device addresses, then the ten words.
273struct IndirectClampPush { 297struct IndirectClampPush {
274 VkDeviceAddress arguments; 298 VkDeviceAddress arguments;
275 VkDeviceAddress count; 299 VkDeviceAddress count;
@@ -283,8 +307,12 @@ struct IndirectClampPush {
283 std::uint32_t first_record; 307 std::uint32_t first_record;
284 std::uint32_t max_records; 308 std::uint32_t max_records;
285 std::uint32_t flags; 309 std::uint32_t flags;
310 std::uint32_t max_x; // indirect_clamp_dispatch_limit per axis
311 std::uint32_t max_y;
312 std::uint32_t max_z;
313 std::uint32_t reserved;
286}; 314};
287static_assert(sizeof(IndirectClampPush) == 72); 315static_assert(sizeof(IndirectClampPush) == 88);
288 316
289inline constexpr VkBufferUsageFlags indirect_clamp_scratch_usage = 317inline constexpr VkBufferUsageFlags indirect_clamp_scratch_usage =
290 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT | 318 VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_INDIRECT_BUFFER_BIT |
@@ -451,6 +479,10 @@ inline void IndirectArgumentClamp::release(std::vector<Slot>& slots, bool read)
451 delta.mesh_yz_records += words[9]; 479 delta.mesh_yz_records += words[9];
452 delta.mesh_max_y = std::max(delta.mesh_max_y, words[10]); 480 delta.mesh_max_y = std::max(delta.mesh_max_y, words[10]);
453 delta.mesh_max_z = std::max(delta.mesh_max_z, words[11]); 481 delta.mesh_max_z = std::max(delta.mesh_max_z, words[11]);
482 delta.dispatch_wide += words[12];
483 delta.dispatch_widest = std::max(delta.dispatch_widest, words[13]);
484 delta.dispatch_cut += words[14];
485 delta.dispatch_records += words[15];
454 // Clear after reading so a later aborted batch that reuses this slot without submitting never 486 // Clear after reading so a later aborted batch that reuses this slot without submitting never
455 // double-counts a previous submission's counters. 487 // double-counts a previous submission's counters.
456 std::memset(words, 0, HostArea::slot_bytes); 488 std::memset(words, 0, HostArea::slot_bytes);
@@ -465,6 +497,10 @@ inline void IndirectArgumentClamp::release(std::vector<Slot>& slots, bool read)
465 counters_.mesh_yz_records += delta.mesh_yz_records; 497 counters_.mesh_yz_records += delta.mesh_yz_records;
466 counters_.mesh_max_y = std::max(counters_.mesh_max_y, delta.mesh_max_y); 498 counters_.mesh_max_y = std::max(counters_.mesh_max_y, delta.mesh_max_y);
467 counters_.mesh_max_z = std::max(counters_.mesh_max_z, delta.mesh_max_z); 499 counters_.mesh_max_z = std::max(counters_.mesh_max_z, delta.mesh_max_z);
500 counters_.dispatch_records += delta.dispatch_records;
501 counters_.dispatch_wide += delta.dispatch_wide;
502 counters_.dispatch_widest = std::max(counters_.dispatch_widest, delta.dispatch_widest);
503 counters_.dispatch_cut += delta.dispatch_cut;
468 // One line every 10 s while mesh records are clamped: does the console's mesh dispatch use y or z? 504 // One line every 10 s while mesh records are clamped: does the console's mesh dispatch use y or z?
469 const auto now = std::chrono::steady_clock::now(); 505 const auto now = std::chrono::steady_clock::now();
470 if (read && counters_.mesh_records && now >= next_mesh_report_) { 506 if (read && counters_.mesh_records && now >= next_mesh_report_) {
@@ -475,6 +511,18 @@ inline void IndirectArgumentClamp::release(std::vector<Slot>& slots, bool read)
475 static_cast<unsigned long long>(counters_.mesh_yz_records), counters_.mesh_max_y, 511 static_cast<unsigned long long>(counters_.mesh_yz_records), counters_.mesh_max_y,
476 counters_.mesh_max_z); 512 counters_.mesh_max_z);
477 } 513 }
514 // One line every 10 s while dispatch records are clamped: how wide the title's dispatches are, and whether
515 // the device's limits cut any (a device whose x limit is 65 535 still cuts a wider record).
516 if (read && counters_.dispatch_records && now >= next_dispatch_report_) {
517 next_dispatch_report_ = now + std::chrono::seconds(10);
518 std::fprintf(stderr, "[rt] indirect clamp dispatch: %llu records, %llu wider than %u groups in x, widest x %u, "
519 "%llu cut at the device's limits (%u x %u x %u)\n",
520 static_cast<unsigned long long>(counters_.dispatch_records),
521 static_cast<unsigned long long>(counters_.dispatch_wide), indirect_clamp_narrow_groups,
522 counters_.dispatch_widest, static_cast<unsigned long long>(counters_.dispatch_cut),
523 indirect_clamp_dispatch_limit(limits_, 0), indirect_clamp_dispatch_limit(limits_, 1),
524 indirect_clamp_dispatch_limit(limits_, 2));
525 }
478 const auto frame = submit_phases::totals().present_serial.load(std::memory_order_relaxed); 526 const auto frame = submit_phases::totals().present_serial.load(std::memory_order_relaxed);
479 if (read && calls && frame >= next_report_frame_) { 527 if (read && calls && frame >= next_report_frame_) {
480 next_report_frame_ = frame + 60; 528 next_report_frame_ = frame + 60;
@@ -587,7 +635,8 @@ inline void IndirectArgumentClamp::emit(VkCommandBuffer cb, const ClampedIndirec
587 // The counters start at zero: the budget's compare-and-swap and the record counts accumulate into them. A 635 // The counters start at zero: the budget's compare-and-swap and the record counts accumulate into them. A
588 // transfer write, ordered to the compute stage by the barrier below, like the arguments' own writes. 636 // transfer write, ordered to the compute stage by the barrier below, like the arguments' own writes.
589 fn<PFN_vkCmdFillBuffer>("vkCmdFillBuffer")(cb, job.buffer, job.stats_scratch_offset, job.list_budget == job.stats + 16 ? 20 : 16, 0); 637 fn<PFN_vkCmdFillBuffer>("vkCmdFillBuffer")(cb, job.buffer, job.stats_scratch_offset, job.list_budget == job.stats + 16 ? 20 : 16, 0);
590 fn<PFN_vkCmdFillBuffer>("vkCmdFillBuffer")(cb, job.buffer, job.stats_scratch_offset + 32, 16, 0); // mesh words 8-11 638 // Words 8-15: the mesh and dispatch counters.
639 fn<PFN_vkCmdFillBuffer>("vkCmdFillBuffer")(cb, job.buffer, job.stats_scratch_offset + 32, 32, 0);
591 VkMemoryBarrier before{VK_STRUCTURE_TYPE_MEMORY_BARRIER}; 640 VkMemoryBarrier before{VK_STRUCTURE_TYPE_MEMORY_BARRIER};
592 before.srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT; // every earlier write: the compute that wrote these arguments 641 before.srcAccessMask = VK_ACCESS_MEMORY_WRITE_BIT; // every earlier write: the compute that wrote these arguments
593 before.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT; 642 before.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT;
@@ -615,7 +664,11 @@ inline void IndirectArgumentClamp::emit(VkCommandBuffer cb, const ClampedIndirec
615 std::uint32_t(first), 664 std::uint32_t(first),
616 job.max_records, 665 job.max_records,
617 (job.kind == indirect_clamp_dispatch ? indirect_group_budget() << 1 : 0u) | 666 (job.kind == indirect_clamp_dispatch ? indirect_group_budget() << 1 : 0u) |
618 (job.counted ? 1u : 0u)}; 667 (job.counted ? 1u : 0u),
668 indirect_clamp_dispatch_limit(limits_, 0),
669 indirect_clamp_dispatch_limit(limits_, 1),
670 indirect_clamp_dispatch_limit(limits_, 2),
671 0u};
619 push(cb, layout_, VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(constants), &constants); 672 push(cb, layout_, VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(constants), &constants);
620 dispatch(cb, (records - 1u) / 64u + 1u, 1, 1); 673 dispatch(cb, (records - 1u) / 64u + 1u, 1, 1);
621 first += records; 674 first += records;
@@ -626,7 +679,7 @@ inline void IndirectArgumentClamp::emit(VkCommandBuffer cb, const ClampedIndirec
626 after_copy.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT; 679 after_copy.dstAccessMask = VK_ACCESS_TRANSFER_READ_BIT;
627 barrier(cb, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1, &after_copy, 0, nullptr, 680 barrier(cb, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 1, &after_copy, 0, nullptr,
628 0, nullptr); 681 0, nullptr);
629 VkBufferCopy copy{job.stats_scratch_offset, job.stats_offset, 12 * sizeof(std::uint32_t)}; 682 VkBufferCopy copy{job.stats_scratch_offset, job.stats_offset, 16 * sizeof(std::uint32_t)};
630 fn<PFN_vkCmdCopyBuffer>("vkCmdCopyBuffer")(cb, job.buffer, job.stats_buffer, 1, &copy); 683 fn<PFN_vkCmdCopyBuffer>("vkCmdCopyBuffer")(cb, job.buffer, job.stats_buffer, 1, &copy);
631 } 684 }
632 // The indirect command reads the records, and nothing else may read them while it does. 685 // The indirect command reads the records, and nothing else may read them while it does.
diff --git a/runtime/src/vulkan_replay.h b/runtime/src/vulkan_replay.h
index 8889560e9..548fb4c17 100644
--- a/runtime/src/vulkan_replay.h
+++ b/runtime/src/vulkan_replay.h
@@ -1559,6 +1559,15 @@ inline float quantize_unorm(float value, double maximum) {
1559 return static_cast<float>(round_half_even(double(value) * maximum) / maximum); 1559 return static_cast<float>(round_half_even(double(value) * maximum) / maximum);
1560} 1560}
1561 1561
1562// 16-bit UNORM depth clear quantisation matching depth24_fragment.h's Patch::quantise(levels = 65535.0f):
1563// float multiply by 65535.0f, round-half-even, and nearest float to d / 65535, with NaN and negatives -> 0.0f.
1564inline float quantize_depth16(float value) {
1565 if (!(value > 0.0f)) return 0.0f;
1566 if (value >= 1.0f) return 1.0f;
1567 const float product = value * 65535.0f;
1568 return static_cast<float>(round_half_even(double(product)) / 65535.0);
1569}
1570
1562// The same for a signed normalised format: -1..1 on a scale of 127 (8 bits) or 32767 (16 bits), where D3D writes -1.0 1571// The same for a signed normalised format: -1..1 on a scale of 127 (8 bits) or 32767 (16 bits), where D3D writes -1.0
1563// as -127 and ties go to the even neighbour. 1572// as -127 and ties go to the even neighbour.
1564inline float quantize_snorm(float value, double maximum) { 1573inline float quantize_snorm(float value, double maximum) {
@@ -4880,7 +4889,8 @@ inline void emit_commands(const PreparedList& prepared, VkCommandBuffer command_
4880 const VulkanAccess state = vulkan_access(d3d12_state::depth_write, false); 4889 const VulkanAccess state = vulkan_access(d3d12_state::depth_write, false);
4881 auto pieces = detail::current(tracker, id, range, image_layout(p.binding, state.layout)); 4890 auto pieces = detail::current(tracker, id, range, image_layout(p.binding, state.layout));
4882 detail::initialize(vk, command_buffer, p.binding, id, pieces, image_layout(p.binding, state.layout), tracker); 4891 detail::initialize(vk, command_buffer, p.binding, id, pieces, image_layout(p.binding, state.layout), tracker);
4883 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 4892 float depth = p.binding.xbox_depth16_stencil8 ? detail::quantize_depth16(depth_clear->depth)
4893 : p.binding.depth24 ? depth24_clear_value(depth_clear->depth) // see depth24.h
4884 : p.binding.format == VK_FORMAT_D16_UNORM 4894 : p.binding.format == VK_FORMAT_D16_UNORM
4885 ? detail::quantize_unorm(depth_clear->depth, 65535.0) // see quantize_unorm 4895 ? detail::quantize_unorm(depth_clear->depth, 65535.0) // see quantize_unorm
4886 : depth_clear->depth; 4896 : depth_clear->depth;
diff --git a/runtime/src/xdxr_build.comp b/runtime/src/xdxr_build.comp
index dcbeca14d..d033afca3 100644
--- a/runtime/src/xdxr_build.comp
+++ b/runtime/src/xdxr_build.comp
@@ -76,7 +76,7 @@ layout(buffer_reference, std430, buffer_reference_align = 4) buffer Words { uint
76const uint MODE_INIT = 0u, MODE_TRIANGLES = 1u, MODE_INSTANCES = 2u, MODE_MORTON = 3u, MODE_KARRAS = 4u, 76const uint MODE_INIT = 0u, MODE_TRIANGLES = 1u, MODE_INSTANCES = 2u, MODE_MORTON = 3u, MODE_KARRAS = 4u,
77 MODE_NODES = 5u, MODE_HEADER = 6u, MODE_RADIX_COUNT = 7u, MODE_RADIX_SCAN = 8u, MODE_RADIX_SCATTER = 9u, 77 MODE_NODES = 5u, MODE_HEADER = 6u, MODE_RADIX_COUNT = 7u, MODE_RADIX_SCAN = 8u, MODE_RADIX_SCATTER = 9u,
78 MODE_SMALL_SORT = 10u, MODE_COPY_AS = 12u, MODE_POSTBUILD = 13u, MODE_KEPT = 14u, 78 MODE_SMALL_SORT = 10u, MODE_COPY_AS = 12u, MODE_POSTBUILD = 13u, MODE_KEPT = 14u,
79 MODE_KEPT_SCAN = 15u, MODE_KEPT_INDEX = 16u, MODE_PROPAGATE = 17u, MODE_CLEAR = 18u; 79 MODE_KEPT_SCAN = 15u, MODE_KEPT_INDEX = 16u, MODE_PROPAGATE = 17u, MODE_CLEAR = 18u, MODE_CHECK = 19u;
80const uint SMALL_SORT_MAX = 1024u; // xdxr_build.h XdxrLayout::small_sort_max 80const uint SMALL_SORT_MAX = 1024u; // xdxr_build.h XdxrLayout::small_sort_max
81const uint RADIX_BITS = 4u, RADIX_BINS = 16u, RADIX_PASSES = 8u; 81const uint RADIX_BITS = 4u, RADIX_BINS = 16u, RADIX_PASSES = 8u;
82const uint RADIX_TILE = 256u; // elements per workgroup in count and scatter: 4 chunks of 64 82const uint RADIX_TILE = 256u; // elements per workgroup in count and scatter: 4 chunks of 64
@@ -85,6 +85,9 @@ const 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, FLAG_TRANSLATE = 8u; // pc.flags; xdxr_build.h flag_* 87const uint FLAG_TLAS = 1u, FLAG_BOX16 = 2u, FLAG_PAIR = 4u, FLAG_TRANSLATE = 8u; // pc.flags; xdxr_build.h flag_*
88// An update records both tails: FLAG_IF_REFIT steps run only when MODE_CHECK found the source a structure of this
89// layout (scratch word SCRATCH_REFIT = 1), FLAG_IF_BUILD steps (a full build) only when it did not.
90const uint FLAG_IF_REFIT = 16u, FLAG_IF_BUILD = 32u;
88const uint FLAG_BOTTOM_LEVEL = 0x80000000u, VERSION_2403 = 6u, INST_IDENTITY_ROTATION = 0x80000000u, 91const uint FLAG_BOTTOM_LEVEL = 0x80000000u, VERSION_2403 = 6u, INST_IDENTITY_ROTATION = 0x80000000u,
89 INST_FLAGS_MASK = 0xc0000000u; 92 INST_FLAGS_MASK = 0xc0000000u;
90 93
@@ -111,6 +114,7 @@ layout(push_constant) uniform Push {
111 uint flags; // FLAG_TLAS: elements are 128-byte instances; FLAG_BOX16: inner nodes are 64-byte BOX16; 114 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; 115 // FLAG_PAIR: pair sibling triangles that share an edge into TRI0/TRI1 leaves;
113 // FLAG_TRANSLATE (instances): BLAS addresses go through blas_address 116 // FLAG_TRANSLATE (instances): BLAS addresses go through blas_address
117 uint vertex_count; // triangles: the desc's VertexCount; a vertex index at or past it reads nothing
114} pc; 118} pc;
115 119
116// ---- 64-bit addresses as uvec2 ---- 120// ---- 64-bit addresses as uvec2 ----
@@ -141,6 +145,7 @@ uvec2 sub64(uvec2 a, uvec2 b) {
141// counts, their exclusive prefix sums, element boxes, a box accumulator per node, the binary tree ---- 145// counts, their exclusive prefix sums, element boxes, a box accumulator per node, the binary tree ----
142const uint SCRATCH_KEYS = 64u; 146const uint SCRATCH_KEYS = 64u;
143const uint SCRATCH_NODE_COUNT = 24u; 147const uint SCRATCH_NODE_COUNT = 24u;
148const uint SCRATCH_REFIT = 28u; // MODE_CHECK's verdict for an update
144uint radix_tiles() { return (pc.sort_size + RADIX_TILE - 1u) / RADIX_TILE; } 149uint radix_tiles() { return (pc.sort_size + RADIX_TILE - 1u) / RADIX_TILE; }
145uint keys_off() { return SCRATCH_KEYS; } 150uint keys_off() { return SCRATCH_KEYS; }
146uint vals_off() { return SCRATCH_KEYS + 4u * pc.sort_size; } 151uint vals_off() { return SCRATCH_KEYS + 4u * pc.sort_size; }
@@ -201,6 +206,21 @@ uint element_ptr(uint e) { return ((pc.elements_off + e * element_size()) >> 6)
201uint node_ptr(uint n) { return ((pc.nodes_off + n * node_size()) >> 6) << 3 | (is_box16() ? BOX16 : BOX32); } 206uint node_ptr(uint n) { return ((pc.nodes_off + n * node_size()) >> 6) << 3 | (is_box16() ? BOX16 : BOX32); }
202uint ptr_unit(uint p) { return p >> 3; } 207uint ptr_unit(uint p) { return p >> 3; }
203bool ptr_is_node(uint p) { return (p & 7u) == BOX16 || (p & 7u) == BOX32; } 208bool ptr_is_node(uint p) { return (p & 7u) == BOX16 || (p & 7u) == BOX32; }
209// A pointer read from the structure (an update's source is the title's, possibly garbage) that names one of this
210// layout's nodes: the layout's node type, on a node boundary, below the node count. Nothing else is followed.
211bool layout_node(uint p) {
212 if ((p & 7u) != (is_box16() ? BOX16 : BOX32)) return false;
213 uint o = ptr_unit(p) * 64u;
214 if (ptr_unit(p) >= (1u << 26) || o < pc.nodes_off) return false;
215 uint rel = o - pc.nodes_off;
216 return rel % node_size() == 0u && rel / node_size() < pc.arg0;
217}
218// The parent-table slot of a record pointer, or INVALID when its unit is outside the body the table covers.
219uint parent_slot(uint p) {
220 uint first = pc.elements_off / 64u, unit = ptr_unit(p);
221 if (unit < first || unit >= pc.total_size / 64u) return INVALID;
222 return pc.parents_off + 4u * (unit - first);
223}
204 224
205// ---- BOX16 bounds: six IEEE halves in three words (min.x | min.y << 16, min.z | max.x << 16, max.y | max.z << 16; 225// ---- BOX16 bounds: six IEEE halves in three words (min.x | min.y << 16, min.z | max.x << 16, max.y | max.z << 16;
206// docs/bvh.md 3.1, XdxrDecompressBox16) ---- 226// docs/bvh.md 3.1, XdxrDecompressBox16) ----
@@ -232,7 +252,10 @@ void store_box16(uint o, vec3 lo, vec3 hi) {
232} 252}
233 253
234// ---- MODE_TRIANGLES ---- 254// ---- MODE_TRIANGLES ----
255// An index at or past VertexCount (garbage in the index buffer, or VertexCount 0) would read past the vertex buffer,
256// possibly gigabytes past it: the vertex is NaN instead, which makes its triangle inactive (build_triangle).
235vec3 vertex(uint v) { 257vec3 vertex(uint v) {
258 if (v >= pc.vertex_count) return vec3(uintBitsToFloat(0x7fc00000u));
236 uvec2 a = add(pc.src0, v * pc.arg0); 259 uvec2 a = add(pc.src0, v * pc.arg0);
237 float x = uintBitsToFloat(load(a, 0u)), y = uintBitsToFloat(load(a, 4u)); 260 float x = uintBitsToFloat(load(a, 0u)), y = uintBitsToFloat(load(a, 4u));
238 float z = pc.arg1 == 1u ? 0.0 : uintBitsToFloat(load(a, 8u)); 261 float z = pc.arg1 == 1u ? 0.0 : uintBitsToFloat(load(a, 8u));
@@ -732,7 +755,13 @@ void build_node(uint i) {
732} 755}
733 756
734// ---- MODE_PROPAGATE ---- 757// ---- MODE_PROPAGATE ----
735uint parent_of(uint p) { return load(pc.dst, pc.parents_off + 4u * (ptr_unit(p) - pc.elements_off / 64u)); } 758// INVALID (the walk ends) for anything but one of the layout's nodes: an update reads the source's parent table.
759uint parent_of(uint p) {
760 uint slot = parent_slot(p);
761 if (slot == INVALID) return INVALID;
762 uint parent = load(pc.dst, slot);
763 return layout_node(parent) ? parent : INVALID;
764}
736bool ptr_box16(uint p) { return (p & 7u) == BOX16; } 765bool ptr_box16(uint p) { return (p & 7u) == BOX16; }
737uint node_index(uint p) { return (ptr_unit(p) * 64u - pc.nodes_off) / (ptr_box16(p) ? 64u : 128u); } 766uint node_index(uint p) { return (ptr_unit(p) * 64u - pc.nodes_off) / (ptr_box16(p) ? 64u : 128u); }
738void accum_box(uint node, out vec3 lo, out vec3 hi) { 767void accum_box(uint node, out vec3 lo, out vec3 hi) {
@@ -802,8 +831,26 @@ void build_header() {
802 store(pc.dst, 60u, 0u); // compressionParams: uncompressed 831 store(pc.dst, 60u, 0u); // compressionParams: uncompressed
803} 832}
804 833
834// ---- MODE_CHECK: is the structure an update refits (already copied to dst) one this layout's build wrote? The
835// header words build_header writes that the layout fixes, and a size within the layout. A title may pass a source it
836// never built (D3D12 leaves that undefined); then the update is a full build instead and reads nothing of it. ----
837bool refit_source_ok() {
838 uint size = (load(pc.dst, 4u) + 1u) * 64u;
839 return load(pc.dst, 0u) == ((is_tlas() ? 0u : FLAG_BOTTOM_LEVEL) | VERSION_2403) &&
840 load(pc.dst, 12u) == pc.elements && load(pc.dst, 40u) == pc.nodes_off && load(pc.dst, 48u) == node_ptr(0u) &&
841 load(pc.dst, 52u) == pc.elements_off && load(pc.dst, 56u) == pc.parents_off && load(pc.dst, 4u) < (1u << 26) &&
842 size > pc.nodes_off && size <= pc.total_size;
843}
844
805void main() { 845void main() {
806 uint i = gl_GlobalInvocationID.x; 846 uint i = gl_GlobalInvocationID.x;
847 // uniform across the dispatch, so a workgroup that uses barriers leaves as a whole
848 if ((pc.flags & (FLAG_IF_REFIT | FLAG_IF_BUILD)) != 0u &&
849 (load(pc.scratch, SCRATCH_REFIT) == 1u) != ((pc.flags & FLAG_IF_REFIT) != 0u)) return;
850 if (pc.mode == MODE_CHECK) {
851 if (i == 0u) store(pc.scratch, SCRATCH_REFIT, refit_source_ok() ? 1u : 0u);
852 return;
853 }
807 // the radix and kept modes use shared memory and barriers: every invocation of a workgroup takes part 854 // the radix and kept modes use shared memory and barriers: every invocation of a workgroup takes part
808 if (pc.mode == MODE_RADIX_COUNT) { radix_count(gl_WorkGroupID.x, gl_LocalInvocationID.x); return; } 855 if (pc.mode == MODE_RADIX_COUNT) { radix_count(gl_WorkGroupID.x, gl_LocalInvocationID.x); return; }
809 if (pc.mode == MODE_RADIX_SCAN) { 856 if (pc.mode == MODE_RADIX_SCAN) {
diff --git a/runtime/src/xdxr_build.h b/runtime/src/xdxr_build.h
index 08623f52a..401b7095a 100644
--- a/runtime/src/xdxr_build.h
+++ b/runtime/src/xdxr_build.h
@@ -104,6 +104,9 @@ struct XdxrTriangles {
104 std::uint32_t triangle_count = 0; 104 std::uint32_t triangle_count = 0;
105 std::uint64_t transform = 0; // device address of a 3x4 row-major float matrix, 0 = none 105 std::uint64_t transform = 0; // device address of a 3x4 row-major float matrix, 0 = none
106 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)
107 // VertexCount: a triangle with a vertex index at or past it is inactive and reads no vertex (0: every triangle);
108 // the default bounds nothing, for callers with no desc.
109 std::uint32_t vertex_count = 0xffffffffu;
107}; 110};
108 111
109// How a top-level build reaches the BLAS addresses its instance descs hold (xdxr_build.comp blas_address). They are 112// How a top-level build reaches the BLAS addresses its instance descs hold (xdxr_build.comp blas_address). They are
@@ -172,11 +175,12 @@ public:
172 t.arg0 = geo.vertex_stride; 175 t.arg0 = geo.vertex_stride;
173 t.arg1 = geo.xy_only ? 1u : 0u; 176 t.arg1 = geo.xy_only ? 1u : 0u;
174 t.arg2 = geo.index_type; 177 t.arg2 = geo.index_type;
178 t.vertex_count = geo.vertex_count;
175 t.geometry = std::uint32_t(g) << 8 | (geo.flags & 0xffu); 179 t.geometry = std::uint32_t(g) << 8 | (geo.flags & 0xffu);
176 dispatch(cb, t, t.count); 180 dispatch(cb, t, t.count);
177 first += geo.triangle_count; 181 first += geo.triangle_count;
178 } 182 }
179 if (update_from) refit_finish(cb, layout, p); else finish(cb, layout, p); 183 if (update_from) update_finish(cb, layout, p); else finish(cb, layout, p);
180 return true; 184 return true;
181 } 185 }
182 186
@@ -204,7 +208,7 @@ public:
204 } 208 }
205 dispatch(cb, t, t.count); 209 dispatch(cb, t, t.count);
206 } 210 }
207 if (update_from) refit_finish(cb, layout, p); else finish(cb, layout, p); 211 if (update_from) update_finish(cb, layout, p); else finish(cb, layout, p);
208 return true; 212 return true;
209 } 213 }
210 214
@@ -246,16 +250,19 @@ private:
246 mode_init = 0, mode_triangles = 1, mode_instances = 2, mode_morton = 3, mode_karras = 4, mode_nodes = 5, 250 mode_init = 0, mode_triangles = 1, mode_instances = 2, mode_morton = 3, mode_karras = 4, mode_nodes = 5,
247 mode_header = 6, mode_radix_count = 7, mode_radix_scan = 8, mode_radix_scatter = 9, mode_small_sort = 10, 251 mode_header = 6, mode_radix_count = 7, mode_radix_scan = 8, mode_radix_scatter = 9, mode_small_sort = 10,
248 mode_copy_as = 12, mode_postbuild = 13, mode_kept = 14, mode_kept_scan = 15, 252 mode_copy_as = 12, mode_postbuild = 13, mode_kept = 14, mode_kept_scan = 15,
249 mode_kept_index = 16, mode_propagate = 17, mode_clear = 18 253 mode_kept_index = 16, mode_propagate = 17, mode_clear = 18, mode_check = 19
250 }; 254 };
251 struct Addr { std::uint32_t lo = 0, hi = 0; }; 255 struct Addr { std::uint32_t lo = 0, hi = 0; };
252 struct Push { // xdxr_build.comp `Push`, std430 push-constant layout 256 struct Push { // xdxr_build.comp `Push`, std430 push-constant layout
253 Addr dst, scratch, src0, src1, src2, bias; 257 Addr dst, scratch, src0, src1, src2, bias;
254 std::uint32_t mode = 0, count = 0, first = 0, arg0 = 0, arg1 = 0, arg2 = 0, geometry = 0, elements = 0, 258 std::uint32_t mode = 0, count = 0, first = 0, arg0 = 0, arg1 = 0, arg2 = 0, geometry = 0, elements = 0,
255 sort_size = 0, elements_off = 0, nodes_off = 0, parents_off = 0, total_size = 0, flags = 0; 259 sort_size = 0, elements_off = 0, nodes_off = 0, parents_off = 0, total_size = 0, flags = 0,
260 vertex_count = 0;
256 }; 261 };
257 enum : std::uint32_t { flag_tlas = 1, flag_box16 = 2, flag_pair = 4, flag_translate = 8 }; // xdxr_build.comp FLAG_* 262 enum : std::uint32_t { // xdxr_build.comp FLAG_*
258 static_assert(sizeof(Push) == 104, "push constants must match xdxr_build.comp"); 263 flag_tlas = 1, flag_box16 = 2, flag_pair = 4, flag_translate = 8, flag_if_refit = 16, flag_if_build = 32
264 };
265 static_assert(sizeof(Push) == 108, "push constants must match xdxr_build.comp");
259 266
260 static Addr split(std::uint64_t a) { return {std::uint32_t(a), std::uint32_t(a >> 32)}; } 267 static Addr split(std::uint64_t a) { return {std::uint32_t(a), std::uint32_t(a >> 32)}; }
261 268
@@ -284,19 +291,43 @@ private:
284 291
285 // An update: the source's tree is copied unless it is the destination, as many bytes as its header says (a 292 // An update: the source's tree is copied unless it is the destination, as many bytes as its header says (a
286 // compacted source is shorter than the layout). Its parent table stays as it is, so there is no MODE_INIT. 293 // compacted source is shorter than the layout). Its parent table stays as it is, so there is no MODE_INIT.
294 //
295 // Then MODE_CHECK: the source may not be a structure of this layout at all (a title passing one it never built,
296 // which D3D12 leaves undefined), and its pointers would send the refit anywhere. The full build's MODE_INIT runs
297 // only when the check fails (flag_if_build), and refit_finish / finish are both recorded with the flag that picks
298 // one of them (update_finish).
287 void refit_begin(VkCommandBuffer cb, const XdxrLayout& l, const Push& p, std::uint64_t source) { 299 void refit_begin(VkCommandBuffer cb, const XdxrLayout& l, const Push& p, std::uint64_t source) {
288 vk_.vkCmdBindPipeline(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline_); 300 vk_.vkCmdBindPipeline(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline_);
289 const std::uint64_t dst = std::uint64_t(p.dst.hi) << 32 | p.dst.lo; 301 const std::uint64_t dst = std::uint64_t(p.dst.hi) << 32 | p.dst.lo;
290 if (source == dst) return; 302 if (source != dst) {
291 Push c = p; 303 Push c = p;
292 c.mode = mode_copy_as; 304 c.mode = mode_copy_as;
293 c.count = l.size / 4; 305 c.count = l.size / 4;
294 c.src0 = split(source); 306 c.src0 = split(source);
295 dispatch(cb, c, c.count); 307 dispatch(cb, c, c.count);
308 }
309 Push k = p;
310 k.mode = mode_check;
311 k.count = 1;
312 dispatch(cb, k, 1);
313 Push init = p;
314 init.flags |= flag_if_build;
315 init.mode = mode_init;
316 init.count = l.parent_entries > 16 ? l.parent_entries : 16;
317 dispatch(cb, init, init.count);
318 }
319
320 void update_finish(VkCommandBuffer cb, const XdxrLayout& l, const Push& p) {
321 Push r = p;
322 r.flags |= flag_if_refit;
323 refit_finish(cb, l, r, true);
324 Push b = p;
325 b.flags |= flag_if_build;
326 finish(cb, l, b);
296 } 327 }
297 328
298 // Boxes bottom-up through the existing nodes, then the header (its bounds change; nothing else does). 329 // Boxes bottom-up through the existing nodes, then the header (its bounds change; nothing else does).
299 void refit_finish(VkCommandBuffer cb, const XdxrLayout& l, const Push& p) { 330 void refit_finish(VkCommandBuffer cb, const XdxrLayout& l, const Push& p, bool barrier_after = false) {
300 Push c = p; 331 Push c = p;
301 c.mode = mode_clear; 332 c.mode = mode_clear;
302 c.count = l.nodes; 333 c.count = l.nodes;
@@ -306,7 +337,7 @@ private:
306 h.mode = mode_header; 337 h.mode = mode_header;
307 h.count = 1; 338 h.count = 1;
308 h.arg2 = 1; // an update: the bounds only 339 h.arg2 = 1; // an update: the bounds only
309 dispatch(cb, h, 1, false); 340 dispatch(cb, h, 1, barrier_after);
310 } 341 }
311 342
312 // `update`: the elements' pointers are their own (an update never pairs), not the ones MODE_NODES recorded. 343 // `update`: the elements' pointers are their own (an update never pairs), not the ones MODE_NODES recorded.
diff --git a/runtime/src/xdxr_build.inc b/runtime/src/xdxr_build.inc
index e17aecfea..b4d159074 100644
--- a/runtime/src/xdxr_build.inc
+++ b/runtime/src/xdxr_build.inc
@@ -1,7899 +1,8287 @@
1{0x07230203,0x00010500,0x000d000b,0x00006129, 1{0x07230203,0x00010500,0x000d000b,0x0000655f,
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,0x000001b9, 60x00000004,0x6e69616d,0x00000000,0x000001c1,
70x00000924,0x00000939,0x00000a18,0x00000a7f, 70x0000098a,0x0000099f,0x00000a7e,0x00000ae5,
80x00000ad4,0x00000b2d,0x00000e6f,0x00000eff, 80x00000b3a,0x00000b93,0x00000ed4,0x00000f64,
90x000012da,0x000012e3,0x000012e4,0x00060010, 90x000013a4,0x000013d5,0x000013d6,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,0x000001b7,0x00000002, 140x00000000,0x00030047,0x000001bf,0x00000002,
150x00050048,0x000001b7,0x00000000,0x00000023, 150x00050048,0x000001bf,0x00000000,0x00000023,
160x00000000,0x00050048,0x000001b7,0x00000001, 160x00000000,0x00050048,0x000001bf,0x00000001,
170x00000023,0x00000008,0x00050048,0x000001b7, 170x00000023,0x00000008,0x00050048,0x000001bf,
180x00000002,0x00000023,0x00000010,0x00050048, 180x00000002,0x00000023,0x00000010,0x00050048,
190x000001b7,0x00000003,0x00000023,0x00000018, 190x000001bf,0x00000003,0x00000023,0x00000018,
200x00050048,0x000001b7,0x00000004,0x00000023, 200x00050048,0x000001bf,0x00000004,0x00000023,
210x00000020,0x00050048,0x000001b7,0x00000005, 210x00000020,0x00050048,0x000001bf,0x00000005,
220x00000023,0x00000028,0x00050048,0x000001b7, 220x00000023,0x00000028,0x00050048,0x000001bf,
230x00000006,0x00000023,0x00000030,0x00050048, 230x00000006,0x00000023,0x00000030,0x00050048,
240x000001b7,0x00000007,0x00000023,0x00000034, 240x000001bf,0x00000007,0x00000023,0x00000034,
250x00050048,0x000001b7,0x00000008,0x00000023, 250x00050048,0x000001bf,0x00000008,0x00000023,
260x00000038,0x00050048,0x000001b7,0x00000009, 260x00000038,0x00050048,0x000001bf,0x00000009,
270x00000023,0x0000003c,0x00050048,0x000001b7, 270x00000023,0x0000003c,0x00050048,0x000001bf,
280x0000000a,0x00000023,0x00000040,0x00050048, 280x0000000a,0x00000023,0x00000040,0x00050048,
290x000001b7,0x0000000b,0x00000023,0x00000044, 290x000001bf,0x0000000b,0x00000023,0x00000044,
300x00050048,0x000001b7,0x0000000c,0x00000023, 300x00050048,0x000001bf,0x0000000c,0x00000023,
310x00000048,0x00050048,0x000001b7,0x0000000d, 310x00000048,0x00050048,0x000001bf,0x0000000d,
320x00000023,0x0000004c,0x00050048,0x000001b7, 320x00000023,0x0000004c,0x00050048,0x000001bf,
330x0000000e,0x00000023,0x00000050,0x00050048, 330x0000000e,0x00000023,0x00000050,0x00050048,
340x000001b7,0x0000000f,0x00000023,0x00000054, 340x000001bf,0x0000000f,0x00000023,0x00000054,
350x00050048,0x000001b7,0x00000010,0x00000023, 350x00050048,0x000001bf,0x00000010,0x00000023,
360x00000058,0x00050048,0x000001b7,0x00000011, 360x00000058,0x00050048,0x000001bf,0x00000011,
370x00000023,0x0000005c,0x00050048,0x000001b7, 370x00000023,0x0000005c,0x00050048,0x000001bf,
380x00000012,0x00000023,0x00000060,0x00050048, 380x00000012,0x00000023,0x00000060,0x00050048,
390x000001b7,0x00000013,0x00000023,0x00000064, 390x000001bf,0x00000013,0x00000023,0x00000064,
400x00040047,0x000012da,0x0000000b,0x0000001c, 400x00050048,0x000001bf,0x00000014,0x00000023,
410x00040047,0x000012e3,0x0000000b,0x0000001a, 410x00000068,0x00040047,0x000013a4,0x0000000b,
420x00040047,0x000012e4,0x0000000b,0x0000001b, 420x0000001c,0x00040047,0x000013d5,0x0000000b,
430x00040047,0x000013fb,0x0000000b,0x00000019, 430x0000001a,0x00040047,0x000013d6,0x0000000b,
440x00020013,0x00000002,0x00030021,0x00000003, 440x0000001b,0x00040047,0x000014ed,0x0000000b,
450x00000002,0x00040015,0x00000006,0x00000020, 450x00000019,0x00020013,0x00000002,0x00030021,
460x00000000,0x00040017,0x00000007,0x00000006, 460x00000003,0x00000002,0x00040015,0x00000006,
470x00000002,0x00040020,0x00000009,0x00000007, 470x00000020,0x00000000,0x00040017,0x00000007,
480x00000006,0x00030027,0x00000014,0x000014e5, 480x00000006,0x00000002,0x00040020,0x00000009,
490x0003001d,0x00000015,0x00000006,0x0003001e, 490x00000007,0x00000006,0x00030027,0x00000014,
500x00000016,0x00000015,0x00040020,0x00000014, 500x000014e5,0x0003001d,0x00000015,0x00000006,
510x000014e5,0x00000016,0x00030016,0x00000027, 510x0003001e,0x00000016,0x00000015,0x00040020,
520x00000020,0x00040020,0x00000028,0x00000007, 520x00000014,0x000014e5,0x00000016,0x00030016,
530x00000027,0x00020014,0x0000002f,0x00040017, 530x00000027,0x00000020,0x00040020,0x00000028,
540x0000006c,0x00000027,0x00000003,0x00040020, 540x00000007,0x00000027,0x00020014,0x0000002f,
550x0000006d,0x00000007,0x0000006c,0x00040020, 550x00040017,0x0000006c,0x00000027,0x00000003,
560x00000096,0x00000007,0x0000002f,0x00040017, 560x00040020,0x0000006d,0x00000007,0x0000006c,
570x000000df,0x00000006,0x00000003,0x00040020, 570x00040020,0x0000009d,0x00000007,0x0000002f,
580x000000e5,0x00000007,0x000000df,0x0004002b, 580x00040017,0x000000e6,0x00000006,0x00000003,
590x00000006,0x000000ec,0x00000004,0x0004001c, 590x00040020,0x000000ec,0x00000007,0x000000e6,
600x000000ed,0x00000006,0x000000ec,0x00040020, 600x0004002b,0x00000006,0x000000f3,0x00000004,
610x000000ee,0x00000007,0x000000ed,0x00040015, 610x0004001c,0x000000f4,0x00000006,0x000000f3,
620x000000f4,0x00000020,0x00000001,0x0004002b, 620x00040020,0x000000f5,0x00000007,0x000000f4,
630x00000006,0x00000138,0x00000000,0x0004001e, 630x00040015,0x000000fb,0x00000020,0x00000001,
640x0000013d,0x00000006,0x00000006,0x0004002b, 640x0004002b,0x00000006,0x00000140,0x00000000,
650x00000006,0x00000142,0x00000001,0x0004002b, 650x0004001e,0x00000145,0x00000006,0x00000006,
660x000000f4,0x0000016b,0x00000000,0x00040020, 660x0004002b,0x00000006,0x0000014a,0x00000001,
670x0000016c,0x000014e5,0x00000006,0x0016001e, 670x0004002b,0x000000fb,0x00000173,0x00000000,
680x000001b7,0x00000007,0x00000007,0x00000007, 680x00040020,0x00000174,0x000014e5,0x00000006,
690x00000007,0x00000007,0x00000007,0x00000006, 690x0017001e,0x000001bf,0x00000007,0x00000007,
700x00000007,0x00000007,0x00000007,0x00000007,
700x00000006,0x00000006,0x00000006,0x00000006, 710x00000006,0x00000006,0x00000006,0x00000006,
710x00000006,0x00000006,0x00000006,0x00000006, 720x00000006,0x00000006,0x00000006,0x00000006,
720x00000006,0x00000006,0x00000006,0x00000006, 730x00000006,0x00000006,0x00000006,0x00000006,
730x00000006,0x00040020,0x000001b8,0x00000009, 740x00000006,0x00000006,0x00000006,0x00040020,
740x000001b7,0x0004003b,0x000001b8,0x000001b9, 750x000001c0,0x00000009,0x000001bf,0x0004003b,
750x00000009,0x0004002b,0x000000f4,0x000001ba, 760x000001c0,0x000001c1,0x00000009,0x0004002b,
760x0000000e,0x00040020,0x000001bb,0x00000009, 770x000000fb,0x000001c2,0x0000000e,0x00040020,
770x00000006,0x0004002b,0x00000006,0x000001be, 780x000001c3,0x00000009,0x00000006,0x0004002b,
780x00000100,0x0004002b,0x00000006,0x000001c4, 790x00000006,0x000001c6,0x00000100,0x0004002b,
790x00000040,0x0004002b,0x00000006,0x000001cd, 800x00000006,0x000001cc,0x00000040,0x0004002b,
800x00000008,0x0004002b,0x00000006,0x000001d4, 810x00000006,0x000001d5,0x00000008,0x0004002b,
810x0000000c,0x0004002b,0x00000006,0x000001db, 820x00000006,0x000001dc,0x0000000c,0x0004002b,
820x00000010,0x0004002b,0x00000006,0x000001ef, 830x00000006,0x000001e3,0x00000010,0x0004002b,
830x00000018,0x0004002b,0x000000f4,0x000001f0, 840x00000006,0x000001f7,0x00000018,0x0004002b,
840x0000000d,0x0004002b,0x00000006,0x00000205, 850x000000fb,0x000001f8,0x0000000d,0x0004002b,
850x00000020,0x0004002b,0x000000f4,0x00000206, 860x00000006,0x0000020d,0x00000020,0x0004002b,
860x00000009,0x0004002b,0x00000006,0x00000241, 870x000000fb,0x0000020e,0x00000009,0x0004002b,
870x80000000,0x0004002b,0x00000006,0x00000256, 880x00000006,0x00000249,0x80000000,0x0004002b,
880x7fffffff,0x0004002b,0x000000f4,0x00000264, 890x00000006,0x0000025e,0x7fffffff,0x0004002b,
890x00000001,0x00040020,0x00000266,0x00000009, 900x000000fb,0x0000026c,0x00000001,0x00040020,
900x00000007,0x0004002b,0x00000006,0x00000280, 910x0000026e,0x00000009,0x00000007,0x0004002b,
910x00000002,0x0004002b,0x00000006,0x00000299, 920x00000006,0x00000288,0x00000002,0x0004002b,
920x00000014,0x0004002b,0x00000027,0x000002fd, 930x00000006,0x000002a1,0x00000014,0x0004002b,
930x3f000000,0x0004002b,0x000000f4,0x00000315, 940x00000027,0x00000305,0x3f000000,0x0004002b,
940x00000002,0x0004002b,0x000000f4,0x0000031d, 950x000000fb,0x0000031d,0x00000002,0x0004002b,
950x00000003,0x0004002b,0x000000f4,0x00000325, 960x000000fb,0x00000325,0x00000003,0x0004002b,
960x00000004,0x0004002b,0x000000f4,0x0000032d, 970x000000fb,0x0000032d,0x00000004,0x0004002b,
970x00000005,0x0004002b,0x000000f4,0x00000334, 980x000000fb,0x00000335,0x00000005,0x0004002b,
980x00000013,0x0004002b,0x00000006,0x00000342, 990x000000fb,0x0000033c,0x00000013,0x0004002b,
990x00000080,0x0004002b,0x000000f4,0x0000034a, 1000x00000006,0x0000034a,0x00000080,0x0004002b,
1000x0000000f,0x0004002b,0x000000f4,0x00000351, 1010x000000fb,0x00000352,0x0000000f,0x0004002b,
1010x00000006,0x0004002b,0x00000006,0x00000355, 1020x000000fb,0x00000359,0x00000006,0x0004002b,
1020x00000006,0x0004002b,0x000000f4,0x0000035a, 1030x00000006,0x0000035d,0x00000006,0x0004002b,
1030x00000010,0x0004002b,0x00000006,0x00000364, 1040x000000fb,0x00000362,0x00000010,0x0004002b,
1040x00000005,0x0004002b,0x00000006,0x00000373, 1050x00000006,0x0000036c,0x00000005,0x0004002b,
1050x00008000,0x0004002b,0x00000006,0x0000037e, 1060x00000006,0x00000376,0x00000007,0x0003002a,
1060x7f800000,0x0004002b,0x00000006,0x00000383, 1070x0000002f,0x0000037d,0x0004002b,0x00000006,
1070x00007e00,0x0004002b,0x000000f4,0x0000038e, 1080x00000387,0x04000000,0x0004002b,0x000000fb,
1080x00000017,0x0004002b,0x000000f4,0x00000391, 1090x000003b7,0x00000012,0x0004002b,0x00000006,
1090x0000007f,0x0004002b,0x00000006,0x00000399, 1100x000003bf,0xffffffff,0x0004002b,0x000000fb,
1100x00007c00,0x0004002b,0x00000006,0x0000039a, 1110x000003c1,0x00000011,0x0004002b,0x00000006,
1110x00007bff,0x0004002b,0x000000f4,0x0000039f, 1120x000003d1,0x00008000,0x0004002b,0x00000006,
1120xfffffff2,0x0004002b,0x00000006,0x000003a8, 1130x000003dc,0x7f800000,0x0004002b,0x00000006,
1130x00000400,0x0004002b,0x00000006,0x000003b0, 1140x000003e1,0x00007e00,0x0004002b,0x000000fb,
1140x007fffff,0x0004002b,0x000000f4,0x000003b6, 1150x000003ec,0x00000017,0x0004002b,0x000000fb,
1150x0000000a,0x0004002b,0x00000006,0x000003bf, 1160x000003ef,0x0000007f,0x0004002b,0x00000006,
1160x00001fff,0x0003002a,0x0000002f,0x000003cc, 1170x000003f7,0x00007c00,0x0004002b,0x00000006,
1170x00030029,0x0000002f,0x000003e7,0x0004002b, 1180x000003f8,0x00007bff,0x0004002b,0x000000fb,
1180x00000027,0x00000426,0x00000000,0x0004002b, 1190x000003fd,0xfffffff2,0x0004002b,0x00000006,
1190x000000f4,0x00000434,0x0000000b,0x0004002b, 1200x00000406,0x00000400,0x0004002b,0x00000006,
1200x00000006,0x0000045c,0x0000ffff,0x0004002b, 1210x0000040e,0x007fffff,0x0004002b,0x000000fb,
1210x00000006,0x00000470,0x00000003,0x00040017, 1220x00000414,0x0000000a,0x0004002b,0x00000006,
1220x00000475,0x00000027,0x00000004,0x0004001c, 1230x0000041d,0x00001fff,0x00030029,0x0000002f,
1230x000004af,0x0000006c,0x00000470,0x00040020, 1240x00000444,0x0004002b,0x000000fb,0x00000467,
1240x000004b0,0x00000007,0x000004af,0x0004002b, 1250x00000014,0x0004002b,0x00000027,0x0000046d,
1250x000000f4,0x000004c1,0x00000008,0x0004002b, 1260x7fc00000,0x0006002c,0x0000006c,0x0000046e,
1260x00000006,0x00000500,0x00000024,0x0004002b, 1270x0000046d,0x0000046d,0x0000046d,0x0004002b,
1270x00000006,0x0000050b,0x00000028,0x0004002b, 1280x00000027,0x0000048d,0x00000000,0x0004002b,
1280x00000006,0x00000516,0x0000002c,0x0004002b, 1290x000000fb,0x0000049b,0x0000000b,0x0004002b,
1290x00000006,0x00000521,0x00000030,0x0004002b, 1300x00000006,0x000004c3,0x0000ffff,0x0004002b,
1300x000000f4,0x00000523,0x0000000c,0x0004002b, 1310x00000006,0x000004d7,0x00000003,0x00040017,
1310x00000006,0x0000052d,0x00000034,0x0004002b, 1320x000004dc,0x00000027,0x00000004,0x0004001c,
1320x00000006,0x00000537,0x00000038,0x0004002b, 1330x00000516,0x0000006c,0x000004d7,0x00040020,
1330x00000006,0x00000539,0xffffffff,0x0004002b, 1340x00000517,0x00000007,0x00000516,0x0004002b,
1340x00000006,0x00000541,0x0000003c,0x0004002b, 1350x000000fb,0x00000528,0x00000008,0x0004002b,
1350x00000006,0x00000543,0x00000009,0x00040017, 1360x00000006,0x00000567,0x00000024,0x0004002b,
1360x0000054d,0x0000002f,0x00000003,0x0004002b, 1370x00000006,0x00000572,0x00000028,0x0004002b,
1370x00000027,0x00000575,0x7f800000,0x0006002c, 1380x00000006,0x0000057d,0x0000002c,0x0004002b,
1380x0000006c,0x00000576,0x00000575,0x00000575, 1390x00000006,0x00000588,0x00000030,0x0004002b,
1390x00000575,0x0004002b,0x00000006,0x0000062f, 1400x000000fb,0x0000058a,0x0000000c,0x0004002b,
1400x000000ff,0x0004001c,0x00000645,0x00000027, 1410x00000006,0x00000594,0x00000034,0x0004002b,
1410x000001d4,0x00040020,0x00000646,0x00000007, 1420x00000006,0x0000059e,0x00000038,0x0004002b,
1420x00000645,0x0004002b,0x00000006,0x000006d9, 1430x00000006,0x000005a7,0x0000003c,0x0004002b,
1430x0000001c,0x0004002b,0x000000f4,0x000006f3, 1440x00000006,0x000005a9,0x00000009,0x00040017,
1440x00000018,0x0004002b,0x000000f4,0x0000074d, 1450x000005b3,0x0000002f,0x00000003,0x0004002b,
1450x00000007,0x0004002b,0x00000027,0x00000771, 1460x00000027,0x000005db,0x7f800000,0x0006002c,
1460x3f800000,0x0004002b,0x00000006,0x000007a6, 1470x0000006c,0x000005dc,0x000005db,0x000005db,
1470x3fffffff,0x0005002c,0x00000007,0x000007b5, 1480x000005db,0x0004002b,0x00000006,0x00000695,
1480x00000138,0x00000138,0x00040018,0x000007c5, 1490x000000ff,0x0004001c,0x000006ab,0x00000027,
1490x0000006c,0x00000003,0x00040020,0x000007c6, 1500x000001dc,0x00040020,0x000006ac,0x00000007,
1500x00000007,0x000007c5,0x0006002c,0x0000006c, 1510x000006ab,0x0004002b,0x00000006,0x0000073f,
1510x000007ea,0x00000426,0x00000426,0x00000426, 1520x0000001c,0x0004002b,0x000000fb,0x00000759,
1520x0006002c,0x000007c5,0x000007eb,0x000007ea, 1530x00000018,0x0004002b,0x000000fb,0x000007b3,
1530x000007ea,0x000007ea,0x0004002b,0x00000006, 1540x00000007,0x0004002b,0x00000027,0x000007d7,
1540x00000811,0x00000044,0x0004002b,0x00000006, 1550x3f800000,0x0004002b,0x00000006,0x0000080c,
1550x00000820,0x00000048,0x0004002b,0x00000006, 1560x3fffffff,0x0005002c,0x00000007,0x0000081b,
1560x0000082f,0x0000004c,0x0004002b,0x00000006, 1570x00000140,0x00000140,0x00040018,0x0000082b,
1570x00000840,0x00000070,0x0004002b,0x00000006, 1580x0000006c,0x00000003,0x00040020,0x0000082c,
1580x0000084a,0x00000074,0x0004002b,0x00000006, 1590x00000007,0x0000082b,0x0006002c,0x0000006c,
1590x00000853,0x00000078,0x0004002b,0x00000006, 1600x00000850,0x0000048d,0x0000048d,0x0000048d,
1600x0000085c,0x0000007c,0x0004002b,0x00000006, 1610x0006002c,0x0000082b,0x00000851,0x00000850,
1610x00000876,0x000003ff,0x0004002b,0x00000006, 1620x00000850,0x00000850,0x0004002b,0x00000006,
1620x0000087d,0x030000ff,0x0004002b,0x00000006, 1630x00000877,0x00000044,0x0004002b,0x00000006,
1630x00000883,0x0300f00f,0x0004002b,0x00000006, 1640x00000886,0x00000048,0x0004002b,0x00000006,
1640x00000889,0x030c30c3,0x0004002b,0x00000006, 1650x00000895,0x0000004c,0x0004002b,0x00000006,
1650x0000088f,0x09249249,0x0004002b,0x00000027, 1660x000008a6,0x00000070,0x0004002b,0x00000006,
1660x000008d2,0x0da24260,0x0006002c,0x0000006c, 1670x000008b0,0x00000074,0x0004002b,0x00000006,
1670x000008d3,0x000008d2,0x000008d2,0x000008d2, 1680x000008b9,0x00000078,0x0004002b,0x00000006,
1680x0004002b,0x00000027,0x000008e1,0x447fc000, 1690x000008c2,0x0000007c,0x0004002b,0x00000006,
1690x0004001c,0x00000922,0x00000006,0x000003a8, 1700x000008dc,0x000003ff,0x0004002b,0x00000006,
1700x00040020,0x00000923,0x00000004,0x00000922, 1710x000008e3,0x030000ff,0x0004002b,0x00000006,
1710x0004003b,0x00000923,0x00000924,0x00000004, 1720x000008e9,0x0300f00f,0x0004002b,0x00000006,
1720x00040020,0x00000937,0x00000004,0x00000006, 1730x000008ef,0x030c30c3,0x0004002b,0x00000006,
1730x0004003b,0x00000923,0x00000939,0x00000004, 1740x000008f5,0x09249249,0x0004002b,0x00000027,
1740x0004002b,0x00000006,0x0000094f,0x00000108, 1750x00000938,0x0da24260,0x0006002c,0x0000006c,
1750x0004002b,0x00000006,0x00000a0e,0x0000000f, 1760x00000939,0x00000938,0x00000938,0x00000938,
1760x0004001c,0x00000a16,0x00000006,0x000001db, 1770x0004002b,0x00000027,0x00000947,0x447fc000,
1770x00040020,0x00000a17,0x00000004,0x00000a16, 1780x0004001c,0x00000988,0x00000006,0x00000406,
1780x0004003b,0x00000a17,0x00000a18,0x00000004, 1790x00040020,0x00000989,0x00000004,0x00000988,
1790x0004002b,0x00000006,0x00000a56,0x0000003f, 1800x0004003b,0x00000989,0x0000098a,0x00000004,
1800x0004001c,0x00000a7d,0x00000006,0x000001c4, 1810x00040020,0x0000099d,0x00000004,0x00000006,
1810x00040020,0x00000a7e,0x00000004,0x00000a7d, 1820x0004003b,0x00000989,0x0000099f,0x00000004,
1820x0004003b,0x00000a7e,0x00000a7f,0x00000004, 1830x0004002b,0x00000006,0x000009b5,0x00000108,
1830x0004003b,0x00000a17,0x00000ad4,0x00000004, 1840x0004002b,0x00000006,0x00000a74,0x0000000f,
1840x0004001c,0x00000b2b,0x00000a7d,0x000001db, 1850x0004001c,0x00000a7c,0x00000006,0x000001e3,
1850x00040020,0x00000b2c,0x00000004,0x00000b2b, 1860x00040020,0x00000a7d,0x00000004,0x00000a7c,
1860x0004003b,0x00000b2c,0x00000b2d,0x00000004, 1870x0004003b,0x00000a7d,0x00000a7e,0x00000004,
1870x00040020,0x00000b49,0x00000007,0x00000a16, 1880x0004002b,0x00000006,0x00000abc,0x0000003f,
1880x0004002b,0x000000f4,0x00000b9b,0x0000003f, 1890x0004001c,0x00000ae3,0x00000006,0x000001cc,
1890x0004001c,0x00000bf5,0x0000002f,0x000000ec, 1900x00040020,0x00000ae4,0x00000004,0x00000ae3,
1900x00040020,0x00000bf6,0x00000007,0x00000bf5, 1910x0004003b,0x00000ae4,0x00000ae5,0x00000004,
1910x0004001c,0x00000c08,0x000000df,0x00000470, 1920x0004003b,0x00000a7d,0x00000b3a,0x00000004,
1920x0004001c,0x00000c09,0x00000c08,0x000000ec, 1930x0004001c,0x00000b91,0x00000ae3,0x000001e3,
1930x00040020,0x00000c0a,0x00000007,0x00000c09, 1940x00040020,0x00000b92,0x00000004,0x00000b91,
1940x0006002c,0x000000df,0x00000c0e,0x00000138, 1950x0004003b,0x00000b92,0x00000b93,0x00000004,
1950x00000138,0x00000138,0x0004002b,0x00000006, 1960x00040020,0x00000baf,0x00000007,0x00000a7c,
1960x00000d2b,0x00000007,0x0004002b,0x00000006, 1970x0004002b,0x000000fb,0x00000c01,0x0000003f,
1970x00000d45,0xfffffff8,0x0004002b,0x000000f4, 1980x0004001c,0x00000c5b,0x0000002f,0x000000f3,
1980x00000d67,0xffffffff,0x0004002b,0x000000f4, 1990x00040020,0x00000c5c,0x00000007,0x00000c5b,
1990x00000d76,0x00000040,0x0004002b,0x000000f4, 2000x0004001c,0x00000c6e,0x000000e6,0x000004d7,
2000x00000d7e,0x0000001f,0x0004003b,0x00000937, 2010x0004001c,0x00000c6f,0x00000c6e,0x000000f3,
2010x00000e6f,0x00000004,0x0004003b,0x00000a7e, 2020x00040020,0x00000c70,0x00000007,0x00000c6f,
2020x00000eff,0x00000004,0x0007002c,0x000000ed, 2030x0006002c,0x000000e6,0x00000c74,0x00000140,
2030x00000fd5,0x00000539,0x00000539,0x00000539, 2040x00000140,0x00000140,0x0004002b,0x00000006,
2040x00000539,0x0004001c,0x0000100d,0x00000006, 2050x00000daa,0xfffffff8,0x0004002b,0x000000fb,
2050x00000280,0x00040020,0x0000100e,0x00000007, 2060x00000dcc,0xffffffff,0x0004002b,0x000000fb,
2060x0000100d,0x0004002b,0x000000f4,0x000010be, 2070x00000ddb,0x00000040,0x0004002b,0x000000fb,
2070x00000011,0x0004001c,0x00001130,0x00000006, 2080x00000de3,0x0000001f,0x0004003b,0x0000099d,
2080x00000355,0x00040020,0x00001131,0x00000007, 2090x00000ed4,0x00000004,0x0004003b,0x00000ae4,
2090x00001130,0x00040020,0x000012d9,0x00000001, 2100x00000f64,0x00000004,0x0007002c,0x000000f4,
2100x000000df,0x0004003b,0x000012d9,0x000012da, 2110x0000103a,0x000003bf,0x000003bf,0x000003bf,
2110x00000001,0x00040020,0x000012db,0x00000001, 2120x000003bf,0x0004001c,0x00001072,0x00000006,
2120x00000006,0x0004003b,0x000012d9,0x000012e3, 2130x00000288,0x00040020,0x00001073,0x00000007,
2130x00000001,0x0004003b,0x000012d9,0x000012e4, 2140x00001072,0x0004001c,0x00001199,0x00000006,
2140x00000001,0x0004002b,0x00000006,0x0000130e, 2150x0000035d,0x00040020,0x0000119a,0x00000007,
2150x0000000a,0x0004002b,0x00000006,0x00001319, 2160x00001199,0x00040020,0x000013a3,0x00000001,
2160x0000000e,0x0004002b,0x00000006,0x00001357, 2170x000000e6,0x0004003b,0x000013a3,0x000013a4,
2170x0000000d,0x0004002b,0x00000006,0x000013ea, 2180x00000001,0x00040020,0x000013a5,0x00000001,
2180x00000011,0x0004002b,0x00000006,0x000013f4, 2190x00000006,0x0004002b,0x00000006,0x000013bf,
2190x00000012,0x0006002c,0x000000df,0x000013fb, 2200x00000013,0x0004003b,0x000013a3,0x000013d5,
2200x000001c4,0x00000142,0x00000142,0x0006002c, 2210x00000001,0x0004003b,0x000013a3,0x000013d6,
2210x0000006c,0x000060fc,0x00000771,0x00000771, 2220x00000001,0x0004002b,0x00000006,0x00001400,
2220x00000771,0x0004002b,0x00000027,0x000060fd, 2230x0000000a,0x0004002b,0x00000006,0x0000140b,
2230xff800000,0x0006002c,0x0000006c,0x000060fe, 2240x0000000e,0x0004002b,0x00000006,0x00001449,
2240x000060fd,0x000060fd,0x000060fd,0x0004002b, 2250x0000000d,0x0004002b,0x00000006,0x000014dc,
2250x000000f4,0x000060ff,0xffffff90,0x0004002b, 2260x00000011,0x0004002b,0x00000006,0x000014e6,
2260x00000006,0x00006100,0xff800000,0x0004002b, 2270x00000012,0x0006002c,0x000000e6,0x000014ed,
2270x00000006,0x0000610e,0x80000006,0x0004002b, 2280x000001cc,0x0000014a,0x0000014a,0x0006002c,
2280x00000006,0x00006112,0x7bff7bff,0x0004002b, 2290x0000006c,0x00006530,0x000007d7,0x000007d7,
2290x00000006,0x00006114,0xfbff7bff,0x0004002b, 2300x000007d7,0x0004002b,0x00000027,0x00006531,
2300x00000006,0x00006115,0xfbfffbff,0x00040017, 2310xff800000,0x0006002c,0x0000006c,0x00006532,
2310x0000611e,0x0000002f,0x00000002,0x00050036, 2320x00006531,0x00006531,0x00006531,0x0004002b,
2330x000000fb,0x00006533,0xffffff90,0x0004002b,
2340x00000006,0x00006534,0xff800000,0x0004002b,
2350x00000006,0x00006542,0x80000006,0x0004002b,
2360x00000006,0x00006548,0x7bff7bff,0x0004002b,
2370x00000006,0x0000654a,0xfbff7bff,0x0004002b,
2380x00000006,0x0000654b,0xfbfffbff,0x00040017,
2390x00006554,0x0000002f,0x00000002,0x00050036,
2320x00000002,0x00000004,0x00000000,0x00000003, 2400x00000002,0x00000004,0x00000000,0x00000003,
2330x000200f8,0x00000005,0x0004003b,0x00001131, 2410x000200f8,0x00000005,0x0004003b,0x0000119a,
2340x00005905,0x00000007,0x0004003b,0x00000bf6, 2420x00005c65,0x00000007,0x0004003b,0x00000c5c,
2350x00004551,0x00000007,0x0004003b,0x00000bf6, 2430x0000482f,0x00000007,0x0004003b,0x00000c5c,
2360x00004552,0x00000007,0x0004003b,0x000000ee, 2440x00004830,0x00000007,0x0004003b,0x000000f5,
2370x00004553,0x00000007,0x0004003b,0x00000c0a, 2450x00004831,0x00000007,0x0004003b,0x00000c70,
2380x00004555,0x00000007,0x0004003b,0x000000ee, 2460x00004833,0x00000007,0x0004003b,0x000000f5,
2390x00003ff3,0x00000007,0x0004003b,0x000000ee, 2470x000042d1,0x00000007,0x0004003b,0x000000f5,
2400x00003ff4,0x00000007,0x0004003b,0x0000100e, 2480x000042d2,0x00000007,0x0004003b,0x00001073,
2410x00003ffe,0x00000007,0x0004003b,0x0000100e, 2490x000042dc,0x00000007,0x0004003b,0x00001073,
2420x00004005,0x00000007,0x0004003b,0x000000ee, 2500x000042e3,0x00000007,0x0004003b,0x000000f5,
2430x0000400e,0x00000007,0x0004003b,0x000000ee, 2510x000042ec,0x00000007,0x0004003b,0x000000f5,
2440x0000400f,0x00000007,0x0004003b,0x00000646, 2520x000042ed,0x00000007,0x0004003b,0x000006ac,
2450x00002c30,0x00000007,0x0004003b,0x000007c6, 2530x00002f0e,0x00000007,0x0004003b,0x0000082c,
2460x00002c75,0x00000007,0x0004003b,0x0000006d, 2540x00002f53,0x00000007,0x0004003b,0x0000006d,
2470x00002c78,0x00000007,0x0004003b,0x0000006d, 2550x00002f56,0x00000007,0x0004003b,0x0000006d,
2480x000027c3,0x00000007,0x0004003b,0x000004b0, 2560x00002aa1,0x00000007,0x0004003b,0x00000517,
2490x000025da,0x00000007,0x0004003b,0x00001131, 2570x000028ad,0x00000007,0x0004003b,0x0000119a,
2500x00002131,0x00000007,0x0004003b,0x00000b49, 2580x00002404,0x00000007,0x0004003b,0x00000baf,
2510x0000160c,0x00000007,0x000300f7,0x000013fd, 2590x000018df,0x00000007,0x000300f7,0x000014ef,
2520x00000000,0x000300fb,0x00000138,0x000013fe, 2600x00000000,0x000300fb,0x00000140,0x000014f0,
2530x000200f8,0x000013fe,0x00050041,0x000012db, 2610x000200f8,0x000014f0,0x00050041,0x000013a5,
2540x000012dc,0x000012da,0x00000138,0x0004003d, 2620x000013a6,0x000013a4,0x00000140,0x0004003d,
2550x00000006,0x000012dd,0x000012dc,0x00050041, 2630x00000006,0x000013a7,0x000013a6,0x00050041,
2560x000001bb,0x000012de,0x000001b9,0x00000351, 2640x000001c3,0x000013a8,0x000001c1,0x0000033c,
2570x0004003d,0x00000006,0x000012df,0x000012de, 2650x0004003d,0x00000006,0x000013a9,0x000013a8,
2580x000500aa,0x0000002f,0x000012e0,0x000012df, 2660x000500c7,0x00000006,0x000013aa,0x000013a9,
2590x00000d2b,0x000300f7,0x000012e2,0x00000000, 2670x00000588,0x000500ab,0x0000002f,0x000013ab,
2600x000400fa,0x000012e0,0x000012e1,0x000012e2, 2680x000013aa,0x00000140,0x000300f7,0x000013ad,
2610x000200f8,0x000012e1,0x00050041,0x000012db, 2690x00000000,0x000400fa,0x000013ab,0x000013ac,
2620x000012e6,0x000012e3,0x00000138,0x0004003d, 2700x000013ad,0x000200f8,0x000013ac,0x00050041,
2630x00000006,0x000012e7,0x000012e6,0x00050041, 2710x0000026e,0x000013af,0x000001c1,0x0000026c,
2640x000012db,0x000012e9,0x000012e4,0x00000138, 2720x0004003d,0x00000007,0x000013b0,0x000013af,
2650x0004003d,0x00000006,0x000012ea,0x000012e9, 2730x00050051,0x00000006,0x0000154e,0x000013b0,
2660x000500b0,0x0000002f,0x0000143d,0x000012ea, 2740x00000000,0x00050095,0x00000145,0x00001550,
2670x000001db,0x000300f7,0x00001441,0x00000000, 2750x0000154e,0x0000073f,0x00050051,0x00000006,
2680x000400fa,0x0000143d,0x0000143e,0x00001441, 2760x00001551,0x00001550,0x00000001,0x00050051,
2690x000200f8,0x0000143e,0x00050041,0x00000937, 2770x00000006,0x00001552,0x00001550,0x00000000,
2700x00001440,0x00000a18,0x000012ea,0x0003003e, 2780x00050051,0x00000006,0x00001555,0x000013b0,
2710x00001440,0x00000138,0x000200f9,0x00001441, 2790x00000001,0x00050080,0x00000006,0x00001557,
2720x000200f8,0x00001441,0x000400e0,0x00000280, 2800x00001555,0x00001551,0x00050050,0x00000007,
2730x00000280,0x0000094f,0x00050084,0x00000006, 2810x00001558,0x00001552,0x00001557,0x0004007c,
2740x00001443,0x000012e7,0x000001be,0x00050080, 2820x00000014,0x00001548,0x00001558,0x00060041,
2750x00000006,0x00001445,0x00001443,0x000001be, 2830x00000174,0x0000153f,0x00001548,0x00000173,
2760x00050041,0x000001bb,0x00001446,0x000001b9, 2840x00000173,0x0006003d,0x00000006,0x00001540,
2770x000001ba,0x0004003d,0x00000006,0x00001447, 2850x0000153f,0x00000002,0x00000004,0x000500aa,
2780x00001446,0x0007000c,0x00000006,0x00001448, 2860x0000002f,0x000013b3,0x00001540,0x0000014a,
2790x00000001,0x00000026,0x00001445,0x00001447, 2870x000500c7,0x00000006,0x000013b6,0x000013a9,
2800x00050080,0x00000006,0x0000144b,0x00001443, 2880x000001e3,0x000500ab,0x0000002f,0x000013b7,
2810x000012ea,0x000200f9,0x0000144c,0x000200f8, 2890x000013b6,0x00000140,0x000500a5,0x0000002f,
2820x0000144c,0x000700f5,0x00000006,0x00005fd2, 2900x000013b8,0x000013b3,0x000013b7,0x000200f9,
2830x0000144b,0x00001441,0x0000145e,0x0000145c, 2910x000013ad,0x000200f8,0x000013ad,0x000700f5,
2840x000500b0,0x0000002f,0x00001450,0x00005fd2, 2920x0000002f,0x000013b9,0x000013ab,0x000014f0,
2850x00001448,0x000400f6,0x0000145f,0x0000145c, 2930x000013b8,0x000013ac,0x000300f7,0x000013bb,
2860x00000000,0x000400fa,0x00001450,0x00001451, 2940x00000000,0x000400fa,0x000013b9,0x000013ba,
2870x0000145f,0x000200f8,0x00001451,0x00050041, 2950x000013bb,0x000200f8,0x000013ba,0x000200f9,
2880x000001bb,0x00001475,0x000001b9,0x000004c1, 2960x000014ef,0x000200f8,0x000013bb,0x00050041,
2890x0004003d,0x00000006,0x00001476,0x00001475, 2970x000001c3,0x000013bd,0x000001c1,0x00000359,
2900x000500c7,0x00000006,0x00001477,0x00001476, 2980x0004003d,0x00000006,0x000013be,0x000013bd,
2910x00000142,0x000500aa,0x0000002f,0x00001478, 2990x000500aa,0x0000002f,0x000013c0,0x000013be,
2920x00001477,0x00000138,0x000300f7,0x0000147d, 3000x000013bf,0x000300f7,0x000013c2,0x00000000,
2930x00000000,0x000400fa,0x00001478,0x00001479, 3010x000400fa,0x000013c0,0x000013c1,0x000013c2,
2940x0000147b,0x000200f8,0x0000147b,0x00050084, 3020x000200f8,0x000013c1,0x000500aa,0x0000002f,
2950x00000006,0x00001485,0x000001cd,0x00001447, 3030x000013c4,0x000013a7,0x00000140,0x000300f7,
2960x00050080,0x00000006,0x00001486,0x000001c4, 3040x000013c6,0x00000000,0x000400fa,0x000013c4,
2970x00001485,0x000200f9,0x0000147d,0x000200f8, 3050x000013c5,0x000013c6,0x000200f8,0x000013c5,
2980x00001479,0x000200f9,0x0000147d,0x000200f8, 3060x00050041,0x0000026e,0x0000156d,0x000001c1,
2990x0000147d,0x000700f5,0x00000006,0x00005fd3, 3070x00000173,0x0004003d,0x00000007,0x0000156e,
3000x000001c4,0x00001479,0x00001486,0x0000147b, 3080x0000156d,0x00050051,0x00000006,0x000015d0,
3010x00050084,0x00000006,0x00001454,0x000000ec, 3090x0000156e,0x00000000,0x00050095,0x00000145,
3020x00005fd2,0x00050080,0x00000006,0x00001455, 3100x000015d2,0x000015d0,0x000000f3,0x00050051,
3030x00005fd3,0x00001454,0x00050041,0x00000266, 3110x00000006,0x000015d3,0x000015d2,0x00000001,
3040x00001456,0x000001b9,0x00000264,0x0004003d, 3120x00050051,0x00000006,0x000015d4,0x000015d2,
3050x00000007,0x00001457,0x00001456,0x00050051, 3130x00000000,0x00050051,0x00000006,0x000015d7,
3060x00000006,0x0000149d,0x00001457,0x00000000, 3140x0000156e,0x00000001,0x00050080,0x00000006,
3070x00050095,0x0000013d,0x0000149f,0x0000149d, 3150x000015d9,0x000015d7,0x000015d3,0x00050050,
3080x00001455,0x00050051,0x00000006,0x000014a0, 3160x00000007,0x000015da,0x000015d4,0x000015d9,
3090x0000149f,0x00000001,0x00050051,0x00000006, 3170x0004007c,0x00000014,0x000015ca,0x000015da,
3100x000014a1,0x0000149f,0x00000000,0x00050051, 3180x00060041,0x00000174,0x000015c1,0x000015ca,
3110x00000006,0x000014a4,0x00001457,0x00000001, 3190x00000173,0x00000173,0x0006003d,0x00000006,
3120x00050080,0x00000006,0x000014a6,0x000014a4, 3200x000015c2,0x000015c1,0x00000002,0x00000004,
3130x000014a0,0x00050050,0x00000007,0x000014a7, 3210x00050080,0x00000006,0x00001570,0x000015c2,
3140x000014a1,0x000014a6,0x0004007c,0x00000014, 3220x0000014a,0x00050084,0x00000006,0x00001571,
3150x00001497,0x000014a7,0x00060041,0x0000016c, 3230x00001570,0x000001cc,0x00050095,0x00000145,
3160x0000148e,0x00001497,0x0000016b,0x0000016b, 3240x000015f3,0x000015d0,0x00000140,0x00050051,
3170x0006003d,0x00000006,0x0000148f,0x0000148e, 3250x00000006,0x000015f4,0x000015f3,0x00000001,
3180x00000002,0x00000004,0x00050084,0x00000006, 3260x00050051,0x00000006,0x000015f5,0x000015f3,
3190x000014ad,0x000000ec,0x00001476,0x000500c2, 3270x00000000,0x00050080,0x00000006,0x000015fa,
3200x00000006,0x000014ae,0x0000148f,0x000014ad, 3280x000015d7,0x000015f4,0x00050050,0x00000007,
3210x000500c7,0x00000006,0x000014af,0x000014ae, 3290x000015fb,0x000015f5,0x000015fa,0x0004007c,
3220x00000a0e,0x00050041,0x00000937,0x0000145a, 3300x00000014,0x000015eb,0x000015fb,0x00060041,
3230x00000a18,0x000014af,0x000700ea,0x00000006, 3310x00000174,0x000015e2,0x000015eb,0x00000173,
3240x0000145b,0x0000145a,0x00000142,0x00000138, 3320x00000173,0x0006003d,0x00000006,0x000015e3,
3250x00000142,0x000200f9,0x0000145c,0x000200f8, 3330x000015e2,0x00000002,0x00000004,0x000500c7,
3260x0000145c,0x00050080,0x00000006,0x0000145e, 3340x00000006,0x00001600,0x000013a9,0x0000014a,
3270x00005fd2,0x000001c4,0x000200f9,0x0000144c, 3350x000500ab,0x0000002f,0x00001601,0x00001600,
3280x000200f8,0x0000145f,0x000400e0,0x00000280, 3360x00000140,0x000600a9,0x00000006,0x00001577,
3290x00000280,0x0000094f,0x000300f7,0x00001471, 3370x00001601,0x0000035d,0x00006542,0x000500aa,
3300x00000000,0x000400fa,0x0000143d,0x00001462, 3380x0000002f,0x00001578,0x000015e3,0x00001577,
3310x00001471,0x000200f8,0x00001462,0x00050084, 3390x000300f7,0x00001580,0x00000000,0x000400fa,
3320x00000006,0x000014b4,0x000001db,0x00001447, 3400x00001578,0x00001579,0x00001580,0x000200f8,
3330x00050080,0x00000006,0x000014b5,0x000001c4, 3410x00001579,0x00050095,0x00000145,0x0000161a,
3340x000014b4,0x00050080,0x00000006,0x000014bb, 3420x000015d0,0x000001dc,0x00050051,0x00000006,
3350x00001447,0x0000062f,0x00050086,0x00000006, 3430x0000161b,0x0000161a,0x00000001,0x00050051,
3360x000014bc,0x000014bb,0x000001be,0x00050084, 3440x00000006,0x0000161c,0x0000161a,0x00000000,
3370x00000006,0x00001466,0x000012ea,0x000014bc, 3450x00050080,0x00000006,0x00001621,0x000015d7,
3380x00050080,0x00000006,0x00001468,0x00001466, 3460x0000161b,0x00050050,0x00000007,0x00001622,
3390x000012e7,0x00050084,0x00000006,0x00001469, 3470x0000161c,0x00001621,0x0004007c,0x00000014,
3400x000000ec,0x00001468,0x00050080,0x00000006, 3480x00001612,0x00001622,0x00060041,0x00000174,
3410x0000146a,0x000014b5,0x00001469,0x00050041, 3490x00001609,0x00001612,0x00000173,0x00000173,
3420x00000266,0x0000146c,0x000001b9,0x00000264, 3500x0006003d,0x00000006,0x0000160a,0x00001609,
3430x0004003d,0x00000007,0x0000146d,0x0000146c, 3510x00000002,0x00000004,0x00050041,0x000001c3,
3440x00050041,0x00000937,0x0000146e,0x00000a18, 3520x0000157d,0x000001c1,0x000001f8,0x0004003d,
3450x000012ea,0x0004003d,0x00000006,0x0000146f, 3530x00000006,0x0000157e,0x0000157d,0x000500aa,
3460x0000146e,0x00050051,0x00000006,0x000014d2, 3540x0000002f,0x0000157f,0x0000160a,0x0000157e,
3470x0000146d,0x00000000,0x00050095,0x0000013d, 3550x000200f9,0x00001580,0x000200f8,0x00001580,
3480x000014d4,0x000014d2,0x0000146a,0x00050051, 3560x000700f5,0x0000002f,0x00001581,0x00001578,
3490x00000006,0x000014d5,0x000014d4,0x00000001, 3570x000013c5,0x0000157f,0x00001579,0x000300f7,
3500x00050051,0x00000006,0x000014d6,0x000014d4, 3580x00001589,0x00000000,0x000400fa,0x00001581,
3510x00000000,0x00050051,0x00000006,0x000014d9, 3590x00001582,0x00001589,0x000200f8,0x00001582,
3520x0000146d,0x00000001,0x00050080,0x00000006, 3600x00050095,0x00000145,0x0000163b,0x000015d0,
3530x000014db,0x000014d9,0x000014d5,0x00050050, 3610x00000572,0x00050051,0x00000006,0x0000163c,
3540x00000007,0x000014dc,0x000014d6,0x000014db, 3620x0000163b,0x00000001,0x00050051,0x00000006,
3550x0004007c,0x00000014,0x000014cc,0x000014dc, 3630x0000163d,0x0000163b,0x00000000,0x00050080,
3560x00060041,0x0000016c,0x000014c4,0x000014cc, 3640x00000006,0x00001642,0x000015d7,0x0000163c,
3570x0000016b,0x0000016b,0x0005003e,0x000014c4, 3650x00050050,0x00000007,0x00001643,0x0000163d,
3580x0000146f,0x00000002,0x00000004,0x000200f9, 3660x00001642,0x0004007c,0x00000014,0x00001633,
3590x00001471,0x000200f8,0x00001471,0x000200f9, 3670x00001643,0x00060041,0x00000174,0x0000162a,
3600x000013fd,0x000200f8,0x000012e2,0x000500aa, 3680x00001633,0x00000173,0x00000173,0x0006003d,
3610x0000002f,0x000012ef,0x000012df,0x000001cd, 3690x00000006,0x0000162b,0x0000162a,0x00000002,
3620x000300f7,0x000012f1,0x00000000,0x000400fa, 3700x00000004,0x00050041,0x000001c3,0x00001586,
3630x000012ef,0x000012f0,0x000012f1,0x000200f8, 3710x000001c1,0x00000362,0x0004003d,0x00000006,
3640x000012f0,0x00050041,0x000001bb,0x000014df, 3720x00001587,0x00001586,0x000500aa,0x0000002f,
3650x000001b9,0x000001ba,0x0004003d,0x00000006, 3730x00001588,0x0000162b,0x00001587,0x000200f9,
3660x000014e0,0x000014df,0x00050084,0x00000006, 3740x00001589,0x000200f8,0x00001589,0x000700f5,
3670x000014e1,0x000001db,0x000014e0,0x00050080, 3750x0000002f,0x0000158a,0x00001581,0x00001580,
3680x00000006,0x000014e2,0x000001c4,0x000014e1, 3760x00001588,0x00001582,0x000300f7,0x00001591,
3690x00050080,0x00000006,0x000014f4,0x000014e0, 3770x00000000,0x000400fa,0x0000158a,0x0000158b,
3700x0000062f,0x00050086,0x00000006,0x000014f5, 3780x00001591,0x000200f8,0x0000158b,0x00050095,
3710x000014f4,0x000001be,0x00050084,0x00000006, 3790x00000145,0x0000165c,0x000015d0,0x00000588,
3720x000014e7,0x000001c4,0x000014f5,0x00050080, 3800x00050051,0x00000006,0x0000165d,0x0000165c,
3730x00000006,0x000014e8,0x000014e2,0x000014e7, 3810x00000001,0x00050051,0x00000006,0x0000165e,
3740x00050084,0x00000006,0x000012f5,0x000001db, 3820x0000165c,0x00000000,0x00050080,0x00000006,
3750x000014f5,0x00050041,0x000012db,0x000012f7, 3830x00001663,0x000015d7,0x0000165d,0x00050050,
3760x000012e4,0x00000138,0x0004003d,0x00000006, 3840x00000007,0x00001664,0x0000165e,0x00001663,
3770x000012f8,0x000012f7,0x00050080,0x00000006, 3850x0004007c,0x00000014,0x00001654,0x00001664,
3780x00001514,0x000012f5,0x00000a56,0x00050086, 3860x00060041,0x00000174,0x0000164b,0x00001654,
3790x00000006,0x00001515,0x00001514,0x000001c4, 3870x00000173,0x00000173,0x0006003d,0x00000006,
3800x00050084,0x00000006,0x00001518,0x000012f8, 3880x0000164c,0x0000164b,0x00000002,0x00000004,
3810x00001515,0x0007000c,0x00000006,0x0000151a, 3890x00050041,0x000001c3,0x00001667,0x000001c1,
3820x00000001,0x00000026,0x00001518,0x000012f5, 3900x00000362,0x0004003d,0x00000006,0x00001668,
3830x00050080,0x00000006,0x0000151d,0x0000151a, 3910x00001667,0x000500c2,0x00000006,0x0000166d,
3840x00001515,0x0007000c,0x00000006,0x0000151f, 3920x00001668,0x00000359,0x000500c4,0x00000006,
3850x00000001,0x00000026,0x0000151d,0x000012f5, 3930x0000166e,0x0000166d,0x00000325,0x000500c7,
3860x000200f9,0x00001521,0x000200f8,0x00001521, 3940x00000006,0x00001680,0x000013a9,0x00000288,
3870x000700f5,0x00000006,0x00005fcd,0x00000138, 3950x000500ab,0x0000002f,0x00001681,0x00001680,
3880x000012f0,0x0000152f,0x00001526,0x000700f5, 3960x00000140,0x000600a9,0x00000006,0x00001670,
3890x00000006,0x00005fcc,0x0000151a,0x000012f0, 3970x00001681,0x000000f3,0x0000036c,0x000500c5,
3900x00001532,0x00001526,0x000500b0,0x0000002f, 3980x00000006,0x00001671,0x0000166e,0x00001670,
3910x00001525,0x00005fcc,0x0000151f,0x000400f6, 3990x000500aa,0x0000002f,0x00001590,0x0000164c,
3920x00001533,0x00001526,0x00000000,0x000400fa, 4000x00001671,0x000200f9,0x00001591,0x000200f8,
3930x00001525,0x00001526,0x00001533,0x000200f8, 4010x00001591,0x000700f5,0x0000002f,0x00001592,
3940x00001526,0x00050084,0x00000006,0x00001529, 4020x0000158a,0x00001589,0x00001590,0x0000158b,
3950x000000ec,0x00005fcc,0x00050080,0x00000006, 4030x000300f7,0x0000159a,0x00000000,0x000400fa,
3960x0000152a,0x000014e2,0x00001529,0x00050041, 4040x00001592,0x00001593,0x0000159a,0x000200f8,
3970x00000266,0x0000152b,0x000001b9,0x00000264, 4050x00001593,0x00050095,0x00000145,0x0000169a,
3980x0004003d,0x00000007,0x0000152c,0x0000152b, 4060x000015d0,0x00000594,0x00050051,0x00000006,
3990x00050051,0x00000006,0x0000158c,0x0000152c, 4070x0000169b,0x0000169a,0x00000001,0x00050051,
4000x00000000,0x00050095,0x0000013d,0x0000158e, 4080x00000006,0x0000169c,0x0000169a,0x00000000,
4010x0000158c,0x0000152a,0x00050051,0x00000006, 4090x00050080,0x00000006,0x000016a1,0x000015d7,
4020x0000158f,0x0000158e,0x00000001,0x00050051, 4100x0000169b,0x00050050,0x00000007,0x000016a2,
4030x00000006,0x00001590,0x0000158e,0x00000000, 4110x0000169c,0x000016a1,0x0004007c,0x00000014,
4040x00050051,0x00000006,0x00001593,0x0000152c, 4120x00001692,0x000016a2,0x00060041,0x00000174,
4050x00000001,0x00050080,0x00000006,0x00001595, 4130x00001689,0x00001692,0x00000173,0x00000173,
4060x00001593,0x0000158f,0x00050050,0x00000007, 4140x0006003d,0x00000006,0x0000168a,0x00001689,
4070x00001596,0x00001590,0x00001595,0x0004007c, 4150x00000002,0x00000004,0x00050041,0x000001c3,
4080x00000014,0x00001586,0x00001596,0x00060041, 4160x00001597,0x000001c1,0x00000352,0x0004003d,
4090x0000016c,0x0000157d,0x00001586,0x0000016b, 4170x00000006,0x00001598,0x00001597,0x000500aa,
4100x0000016b,0x0006003d,0x00000006,0x0000157e, 4180x0000002f,0x00001599,0x0000168a,0x00001598,
4110x0000157d,0x00000002,0x00000004,0x00050080, 4190x000200f9,0x0000159a,0x000200f8,0x0000159a,
4120x00000006,0x0000152f,0x00005fcd,0x0000157e, 4200x000700f5,0x0000002f,0x0000159b,0x00001592,
4130x00050080,0x00000006,0x00001532,0x00005fcc, 4210x00001591,0x00001599,0x00001593,0x000300f7,
4140x00000264,0x000200f9,0x00001521,0x000200f8, 4220x000015a3,0x00000000,0x000400fa,0x0000159b,
4150x00001533,0x00050041,0x00000937,0x00001536, 4230x0000159c,0x000015a3,0x000200f8,0x0000159c,
4160x00000a7f,0x000012f8,0x0003003e,0x00001536, 4240x00050095,0x00000145,0x000016bb,0x000015d0,
4170x00005fcd,0x000400e0,0x00000280,0x00000280, 4250x0000059e,0x00050051,0x00000006,0x000016bc,
4180x0000094f,0x000500aa,0x0000002f,0x00001538, 4260x000016bb,0x00000001,0x00050051,0x00000006,
4190x000012f8,0x00000138,0x000300f7,0x00001555, 4270x000016bd,0x000016bb,0x00000000,0x00050080,
4200x00000000,0x000400fa,0x00001538,0x00001539, 4280x00000006,0x000016c2,0x000015d7,0x000016bc,
4210x00001555,0x000200f8,0x00001539,0x000200f9, 4290x00050050,0x00000007,0x000016c3,0x000016bd,
4220x0000153a,0x000200f8,0x0000153a,0x000700f5, 4300x000016c2,0x0004007c,0x00000014,0x000016b3,
4230x00000006,0x00005fcf,0x00000138,0x00001539, 4310x000016c3,0x00060041,0x00000174,0x000016aa,
4240x00001547,0x0000153e,0x000700f5,0x00000006, 4320x000016b3,0x00000173,0x00000173,0x0006003d,
4250x00005fce,0x00000138,0x00001539,0x0000154a, 4330x00000006,0x000016ab,0x000016aa,0x00000002,
4260x0000153e,0x000500b0,0x0000002f,0x0000153d, 4340x00000004,0x00050041,0x000001c3,0x000015a0,
4270x00005fce,0x000001c4,0x000400f6,0x0000154b, 4350x000001c1,0x000003c1,0x0004003d,0x00000006,
4280x0000153e,0x00000000,0x000400fa,0x0000153d, 4360x000015a1,0x000015a0,0x000500aa,0x0000002f,
4290x0000153e,0x0000154b,0x000200f8,0x0000153e, 4370x000015a2,0x000016ab,0x000015a1,0x000200f9,
4300x00050041,0x00000937,0x00001540,0x00000a7f, 4380x000015a3,0x000200f8,0x000015a3,0x000700f5,
4310x00005fce,0x0004003d,0x00000006,0x00001541, 4390x0000002f,0x000015a4,0x0000159b,0x0000159a,
4320x00001540,0x0003003e,0x00001540,0x00005fcf, 4400x000015a2,0x0000159c,0x000300f7,0x000015aa,
4330x00050080,0x00000006,0x00001547,0x00005fcf, 4410x00000000,0x000400fa,0x000015a4,0x000015a5,
4340x00001541,0x00050080,0x00000006,0x0000154a, 4420x000015aa,0x000200f8,0x000015a5,0x0006003d,
4350x00005fce,0x00000264,0x000200f9,0x0000153a, 4430x00000006,0x000016cc,0x000015c1,0x00000002,
4360x000200f8,0x0000154b,0x000200f9,0x00001555, 4440x00000004,0x000500b0,0x0000002f,0x000015a9,
4370x000200f8,0x00001555,0x000400e0,0x00000280, 4450x000016cc,0x00000387,0x000200f9,0x000015aa,
4380x00000280,0x0000094f,0x0004003d,0x00000006, 4460x000200f8,0x000015aa,0x000700f5,0x0000002f,
4390x00001558,0x00001536,0x000200f9,0x0000155a, 4470x000015ab,0x000015a4,0x000015a3,0x000015a9,
4400x000200f8,0x0000155a,0x000700f5,0x00000006, 4480x000015a5,0x000300f7,0x000015b1,0x00000000,
4410x00005fd1,0x00001558,0x00001555,0x00001571, 4490x000400fa,0x000015ab,0x000015ac,0x000015b1,
4420x0000155f,0x000700f5,0x00000006,0x00005fd0, 4500x000200f8,0x000015ac,0x00050041,0x000001c3,
4430x0000151a,0x00001555,0x00001574,0x0000155f, 4510x000015ae,0x000001c1,0x00000362,0x0004003d,
4440x000500b0,0x0000002f,0x0000155e,0x00005fd0, 4520x00000006,0x000015af,0x000015ae,0x000500ac,
4450x0000151f,0x000400f6,0x00001575,0x0000155f, 4530x0000002f,0x000015b0,0x00001571,0x000015af,
4460x00000000,0x000400fa,0x0000155e,0x0000155f, 4540x000200f9,0x000015b1,0x000200f8,0x000015b1,
4470x00001575,0x000200f8,0x0000155f,0x00050084, 4550x000700f5,0x0000002f,0x000015b2,0x000015ab,
4480x00000006,0x00001562,0x000000ec,0x00005fd0, 4560x000015aa,0x000015b0,0x000015ac,0x000300f7,
4490x00050080,0x00000006,0x00001563,0x000014e2, 4570x000015b8,0x00000000,0x000400fa,0x000015b2,
4500x00001562,0x00050041,0x00000266,0x00001564, 4580x000015b3,0x000015b8,0x000200f8,0x000015b3,
4510x000001b9,0x00000264,0x0004003d,0x00000007, 4590x00050041,0x000001c3,0x000015b5,0x000001c1,
4520x00001565,0x00001564,0x00050051,0x00000006, 4600x000003b7,0x0004003d,0x00000006,0x000015b6,
4530x000015cd,0x00001565,0x00000000,0x00050095, 4610x000015b5,0x000500b2,0x0000002f,0x000015b7,
4540x0000013d,0x000015cf,0x000015cd,0x00001563, 4620x00001571,0x000015b6,0x000200f9,0x000015b8,
4550x00050051,0x00000006,0x000015d0,0x000015cf, 4630x000200f8,0x000015b8,0x000700f5,0x0000002f,
4560x00000001,0x00050051,0x00000006,0x000015d1, 4640x000015b9,0x000015b2,0x000015b1,0x000015b7,
4570x000015cf,0x00000000,0x00050051,0x00000006, 4650x000015b3,0x000600a9,0x00000006,0x000013c8,
4580x000015d4,0x00001565,0x00000001,0x00050080, 4660x000015b9,0x0000014a,0x00000140,0x00050041,
4590x00000006,0x000015d6,0x000015d4,0x000015d0, 4670x0000026e,0x000013ca,0x000001c1,0x0000026c,
4600x00050050,0x00000007,0x000015d7,0x000015d1, 4680x0004003d,0x00000007,0x000013cb,0x000013ca,
4610x000015d6,0x0004007c,0x00000014,0x000015c7, 4690x00050051,0x00000006,0x000016fa,0x000013cb,
4620x000015d7,0x00060041,0x0000016c,0x000015be, 4700x00000000,0x00050095,0x00000145,0x000016fc,
4630x000015c7,0x0000016b,0x0000016b,0x0006003d, 4710x000016fa,0x0000073f,0x00050051,0x00000006,
4640x00000006,0x000015bf,0x000015be,0x00000002, 4720x000016fd,0x000016fc,0x00000001,0x00050051,
4650x00000004,0x00050080,0x00000006,0x0000156a, 4730x00000006,0x000016fe,0x000016fc,0x00000000,
4660x000014e8,0x00001562,0x00050095,0x0000013d, 4740x00050051,0x00000006,0x00001701,0x000013cb,
4670x000015ef,0x000015cd,0x0000156a,0x00050051, 4750x00000001,0x00050080,0x00000006,0x00001703,
4680x00000006,0x000015f0,0x000015ef,0x00000001, 4760x00001701,0x000016fd,0x00050050,0x00000007,
4690x00050051,0x00000006,0x000015f1,0x000015ef, 4770x00001704,0x000016fe,0x00001703,0x0004007c,
4700x00000000,0x00050080,0x00000006,0x000015f6, 4780x00000014,0x000016f4,0x00001704,0x00060041,
4710x000015d4,0x000015f0,0x00050050,0x00000007, 4790x00000174,0x000016ec,0x000016f4,0x00000173,
4720x000015f7,0x000015f1,0x000015f6,0x0004007c, 4800x00000173,0x0005003e,0x000016ec,0x000013c8,
4730x00000014,0x000015e7,0x000015f7,0x00060041, 4810x00000002,0x00000004,0x000200f9,0x000013c6,
4740x0000016c,0x000015df,0x000015e7,0x0000016b, 4820x000200f8,0x000013c6,0x000200f9,0x000014ef,
4750x0000016b,0x0005003e,0x000015df,0x00005fd1, 4830x000200f8,0x000013c2,0x000500aa,0x0000002f,
4760x00000002,0x00000004,0x00050080,0x00000006, 4840x000013d2,0x000013be,0x00000376,0x000300f7,
4770x00001571,0x00005fd1,0x000015bf,0x00050080, 4850x000013d4,0x00000000,0x000400fa,0x000013d2,
4780x00000006,0x00001574,0x00005fd0,0x00000264, 4860x000013d3,0x000013d4,0x000200f8,0x000013d3,
4790x000200f9,0x0000155a,0x000200f8,0x00001575, 4870x00050041,0x000013a5,0x000013d8,0x000013d5,
4800x000200f9,0x000013fd,0x000200f8,0x000012f1, 4880x00000140,0x0004003d,0x00000006,0x000013d9,
4810x000500aa,0x0000002f,0x00001301,0x000012df, 4890x000013d8,0x00050041,0x000013a5,0x000013db,
4820x00000543,0x000300f7,0x00001303,0x00000000, 4900x000013d6,0x00000140,0x0004003d,0x00000006,
4830x000400fa,0x00001301,0x00001302,0x00001303, 4910x000013dc,0x000013db,0x000500b0,0x0000002f,
4840x000200f8,0x00001302,0x00050041,0x000012db, 4920x00001710,0x000013dc,0x000001e3,0x000300f7,
4850x00001305,0x000012e3,0x00000138,0x0004003d, 4930x00001714,0x00000000,0x000400fa,0x00001710,
4860x00000006,0x00001306,0x00001305,0x00050041, 4940x00001711,0x00001714,0x000200f8,0x00001711,
4870x000012db,0x00001308,0x000012e4,0x00000138, 4950x00050041,0x0000099d,0x00001713,0x00000a7e,
4880x0004003d,0x00000006,0x00001309,0x00001308, 4960x000013dc,0x0003003e,0x00001713,0x00000140,
4890x000500b0,0x0000002f,0x00001618,0x00001309, 4970x000200f9,0x00001714,0x000200f8,0x00001714,
4900x000001db,0x000300f7,0x00001627,0x00000000, 4980x000400e0,0x00000288,0x00000288,0x000009b5,
4910x000400fa,0x00001618,0x00001619,0x00001627, 4990x00050084,0x00000006,0x00001716,0x000013d9,
4920x000200f8,0x00001619,0x00050041,0x000001bb, 5000x000001c6,0x00050080,0x00000006,0x00001718,
4930x000016cf,0x000001b9,0x000001ba,0x0004003d, 5010x00001716,0x000001c6,0x00050041,0x000001c3,
4940x00000006,0x000016d0,0x000016cf,0x00050084, 5020x00001719,0x000001c1,0x000001c2,0x0004003d,
4950x00000006,0x000016d1,0x000001db,0x000016d0, 5030x00000006,0x0000171a,0x00001719,0x0007000c,
4960x00050080,0x00000006,0x000016d2,0x000001c4, 5040x00000006,0x0000171b,0x00000001,0x00000026,
4970x000016d1,0x00050080,0x00000006,0x000016d8, 5050x00001718,0x0000171a,0x00050080,0x00000006,
4980x000016d0,0x0000062f,0x00050086,0x00000006, 5060x0000171e,0x00001716,0x000013dc,0x000200f9,
4990x000016d9,0x000016d8,0x000001be,0x00050084, 5070x0000171f,0x000200f8,0x0000171f,0x000700f5,
5000x00000006,0x000016cb,0x000001c4,0x000016d9, 5080x00000006,0x000063fa,0x0000171e,0x00001714,
5010x00050080,0x00000006,0x000016cc,0x000016d2, 5090x00001731,0x0000172f,0x000500b0,0x0000002f,
5020x000016cb,0x00050084,0x00000006,0x0000161e, 5100x00001723,0x000063fa,0x0000171b,0x000400f6,
5030x00001309,0x000016d9,0x00050080,0x00000006, 5110x00001732,0x0000172f,0x00000000,0x000400fa,
5040x00001620,0x0000161e,0x00001306,0x00050084, 5120x00001723,0x00001724,0x00001732,0x000200f8,
5050x00000006,0x00001621,0x000000ec,0x00001620, 5130x00001724,0x00050041,0x000001c3,0x00001748,
5060x00050080,0x00000006,0x00001622,0x000016cc, 5140x000001c1,0x00000528,0x0004003d,0x00000006,
5070x00001621,0x00050041,0x00000266,0x00001623, 5150x00001749,0x00001748,0x000500c7,0x00000006,
5080x000001b9,0x00000264,0x0004003d,0x00000007, 5160x0000174a,0x00001749,0x0000014a,0x000500aa,
5090x00001624,0x00001623,0x00050051,0x00000006, 5170x0000002f,0x0000174b,0x0000174a,0x00000140,
5100x000016f7,0x00001624,0x00000000,0x00050095, 5180x000300f7,0x00001750,0x00000000,0x000400fa,
5110x0000013d,0x000016f9,0x000016f7,0x00001622, 5190x0000174b,0x0000174c,0x0000174e,0x000200f8,
5120x00050051,0x00000006,0x000016fa,0x000016f9, 5200x0000174e,0x00050084,0x00000006,0x00001758,
5130x00000001,0x00050051,0x00000006,0x000016fb, 5210x000001d5,0x0000171a,0x00050080,0x00000006,
5140x000016f9,0x00000000,0x00050051,0x00000006, 5220x00001759,0x000001cc,0x00001758,0x000200f9,
5150x000016fe,0x00001624,0x00000001,0x00050080, 5230x00001750,0x000200f8,0x0000174c,0x000200f9,
5160x00000006,0x00001700,0x000016fe,0x000016fa, 5240x00001750,0x000200f8,0x00001750,0x000700f5,
5170x00050050,0x00000007,0x00001701,0x000016fb, 5250x00000006,0x000063fb,0x000001cc,0x0000174c,
5180x00001700,0x0004007c,0x00000014,0x000016f1, 5260x00001759,0x0000174e,0x00050084,0x00000006,
5190x00001701,0x00060041,0x0000016c,0x000016e8, 5270x00001727,0x000000f3,0x000063fa,0x00050080,
5200x000016f1,0x0000016b,0x0000016b,0x0006003d, 5280x00000006,0x00001728,0x000063fb,0x00001727,
5210x00000006,0x000016e9,0x000016e8,0x00000002, 5290x00050041,0x0000026e,0x00001729,0x000001c1,
5220x00000004,0x00050041,0x00000937,0x00001626, 5300x0000026c,0x0004003d,0x00000007,0x0000172a,
5230x00000ad4,0x00001309,0x0003003e,0x00001626, 5310x00001729,0x00050051,0x00000006,0x00001770,
5240x000016e9,0x000200f9,0x00001627,0x000200f8, 5320x0000172a,0x00000000,0x00050095,0x00000145,
5250x00001627,0x00050084,0x00000006,0x00001629, 5330x00001772,0x00001770,0x00001728,0x00050051,
5260x00001306,0x000001be,0x00050080,0x00000006, 5340x00000006,0x00001773,0x00001772,0x00000001,
5270x0000162b,0x00001629,0x000001be,0x00050041, 5350x00050051,0x00000006,0x00001774,0x00001772,
5280x000001bb,0x0000162c,0x000001b9,0x000001ba, 5360x00000000,0x00050051,0x00000006,0x00001777,
5290x0004003d,0x00000006,0x0000162d,0x0000162c, 5370x0000172a,0x00000001,0x00050080,0x00000006,
5300x0007000c,0x00000006,0x0000162e,0x00000001, 5380x00001779,0x00001777,0x00001773,0x00050050,
5310x00000026,0x0000162b,0x0000162d,0x000200f9, 5390x00000007,0x0000177a,0x00001774,0x00001779,
5320x00001630,0x000200f8,0x00001630,0x000700f5, 5400x0004007c,0x00000014,0x0000176a,0x0000177a,
5330x00000006,0x00005fb3,0x00001629,0x00001627, 5410x00060041,0x00000174,0x00001761,0x0000176a,
5340x000016c5,0x000016c3,0x000500b0,0x0000002f, 5420x00000173,0x00000173,0x0006003d,0x00000006,
5350x00001634,0x00005fb3,0x0000162e,0x000400f6, 5430x00001762,0x00001761,0x00000002,0x00000004,
5360x000016c6,0x000016c3,0x00000000,0x000400fa, 5440x00050084,0x00000006,0x00001780,0x000000f3,
5370x00001634,0x00001635,0x000016c6,0x000200f8, 5450x00001749,0x000500c2,0x00000006,0x00001781,
5380x00001635,0x00050080,0x00000006,0x00001638, 5460x00001762,0x00001780,0x000500c7,0x00000006,
5390x00005fb3,0x00001309,0x000500b0,0x0000002f, 5470x00001782,0x00001781,0x00000a74,0x00050041,
5400x0000163b,0x00001638,0x0000162e,0x000300f7, 5480x0000099d,0x0000172d,0x00000a7e,0x00001782,
5410x00001646,0x00000000,0x000400fa,0x0000163b, 5490x000700ea,0x00000006,0x0000172e,0x0000172d,
5420x0000163d,0x00001645,0x000200f8,0x00001645, 5500x0000014a,0x00000140,0x0000014a,0x000200f9,
5430x000200f9,0x00001646,0x000200f8,0x0000163d, 5510x0000172f,0x000200f8,0x0000172f,0x00050080,
5440x00050041,0x000001bb,0x00001705,0x000001b9, 5520x00000006,0x00001731,0x000063fa,0x000001cc,
5450x000004c1,0x0004003d,0x00000006,0x00001706, 5530x000200f9,0x0000171f,0x000200f8,0x00001732,
5460x00001705,0x000500c7,0x00000006,0x00001707, 5540x000400e0,0x00000288,0x00000288,0x000009b5,
5470x00001706,0x00000142,0x000500aa,0x0000002f, 5550x000300f7,0x00001744,0x00000000,0x000400fa,
5480x00001708,0x00001707,0x00000138,0x000300f7, 5560x00001710,0x00001735,0x00001744,0x000200f8,
5490x0000170d,0x00000000,0x000400fa,0x00001708, 5570x00001735,0x00050084,0x00000006,0x00001787,
5500x00001709,0x0000170b,0x000200f8,0x0000170b, 5580x000001e3,0x0000171a,0x00050080,0x00000006,
5510x00050084,0x00000006,0x00001715,0x000001cd, 5590x00001788,0x000001cc,0x00001787,0x00050080,
5520x0000162d,0x00050080,0x00000006,0x00001716, 5600x00000006,0x0000178e,0x0000171a,0x00000695,
5530x000001c4,0x00001715,0x000200f9,0x0000170d, 5610x00050086,0x00000006,0x0000178f,0x0000178e,
5540x000200f8,0x00001709,0x000200f9,0x0000170d, 5620x000001c6,0x00050084,0x00000006,0x00001739,
5550x000200f8,0x0000170d,0x000700f5,0x00000006, 5630x000013dc,0x0000178f,0x00050080,0x00000006,
5560x00005fb4,0x000001c4,0x00001709,0x00001716, 5640x0000173b,0x00001739,0x000013d9,0x00050084,
5570x0000170b,0x00050084,0x00000006,0x00001640, 5650x00000006,0x0000173c,0x000000f3,0x0000173b,
5580x000000ec,0x00001638,0x00050080,0x00000006, 5660x00050080,0x00000006,0x0000173d,0x00001788,
5590x00001641,0x00005fb4,0x00001640,0x00050041, 5670x0000173c,0x00050041,0x0000026e,0x0000173f,
5600x00000266,0x00001642,0x000001b9,0x00000264, 5680x000001c1,0x0000026c,0x0004003d,0x00000007,
5610x0004003d,0x00000007,0x00001643,0x00001642, 5690x00001740,0x0000173f,0x00050041,0x0000099d,
5620x00050051,0x00000006,0x0000172d,0x00001643, 5700x00001741,0x00000a7e,0x000013dc,0x0004003d,
5630x00000000,0x00050095,0x0000013d,0x0000172f, 5710x00000006,0x00001742,0x00001741,0x00050051,
5640x0000172d,0x00001641,0x00050051,0x00000006, 5720x00000006,0x000017a5,0x00001740,0x00000000,
5650x00001730,0x0000172f,0x00000001,0x00050051, 5730x00050095,0x00000145,0x000017a7,0x000017a5,
5660x00000006,0x00001731,0x0000172f,0x00000000, 5740x0000173d,0x00050051,0x00000006,0x000017a8,
5670x00050051,0x00000006,0x00001734,0x00001643, 5750x000017a7,0x00000001,0x00050051,0x00000006,
5680x00000001,0x00050080,0x00000006,0x00001736, 5760x000017a9,0x000017a7,0x00000000,0x00050051,
5690x00001734,0x00001730,0x00050050,0x00000007, 5770x00000006,0x000017ac,0x00001740,0x00000001,
5700x00001737,0x00001731,0x00001736,0x0004007c, 5780x00050080,0x00000006,0x000017ae,0x000017ac,
5710x00000014,0x00001727,0x00001737,0x00060041, 5790x000017a8,0x00050050,0x00000007,0x000017af,
5720x0000016c,0x0000171e,0x00001727,0x0000016b, 5800x000017a9,0x000017ae,0x0004007c,0x00000014,
5730x0000016b,0x0006003d,0x00000006,0x0000171f, 5810x0000179f,0x000017af,0x00060041,0x00000174,
5740x0000171e,0x00000002,0x00000004,0x000200f9, 5820x00001797,0x0000179f,0x00000173,0x00000173,
5750x00001646,0x000200f8,0x00001646,0x000700f5, 5830x0005003e,0x00001797,0x00001742,0x00000002,
5760x00000006,0x00005fb5,0x0000171f,0x0000170d, 5840x00000004,0x000200f9,0x00001744,0x000200f8,
5770x00000138,0x00001645,0x000300f7,0x00001652, 5850x00001744,0x000200f9,0x000014ef,0x000200f8,
5780x00000000,0x000400fa,0x0000163b,0x00001649, 5860x000013d4,0x000500aa,0x0000002f,0x000013e1,
5790x00001651,0x000200f8,0x00001651,0x000200f9, 5870x000013be,0x000001d5,0x000300f7,0x000013e3,
5800x00001652,0x000200f8,0x00001649,0x00050041, 5880x00000000,0x000400fa,0x000013e1,0x000013e2,
5810x000001bb,0x0000173b,0x000001b9,0x000004c1, 5890x000013e3,0x000200f8,0x000013e2,0x00050041,
5820x0004003d,0x00000006,0x0000173c,0x0000173b, 5900x000001c3,0x000017b2,0x000001c1,0x000001c2,
5830x000500c7,0x00000006,0x0000173d,0x0000173c, 5910x0004003d,0x00000006,0x000017b3,0x000017b2,
5840x00000142,0x000500aa,0x0000002f,0x0000173e, 5920x00050084,0x00000006,0x000017b4,0x000001e3,
5850x0000173d,0x00000138,0x000300f7,0x00001743, 5930x000017b3,0x00050080,0x00000006,0x000017b5,
5860x00000000,0x000400fa,0x0000173e,0x0000173f, 5940x000001cc,0x000017b4,0x00050080,0x00000006,
5870x00001741,0x000200f8,0x00001741,0x00050084, 5950x000017c7,0x000017b3,0x00000695,0x00050086,
5880x00000006,0x0000174f,0x000001d4,0x0000162d, 5960x00000006,0x000017c8,0x000017c7,0x000001c6,
5890x00050080,0x00000006,0x00001750,0x000001c4, 5970x00050084,0x00000006,0x000017ba,0x000001cc,
5900x0000174f,0x000200f9,0x00001743,0x000200f8, 5980x000017c8,0x00050080,0x00000006,0x000017bb,
5910x0000173f,0x00050084,0x00000006,0x00001749, 5990x000017b5,0x000017ba,0x00050084,0x00000006,
5920x000000ec,0x0000162d,0x00050080,0x00000006, 6000x000013e7,0x000001e3,0x000017c8,0x00050041,
5930x0000174a,0x000001c4,0x00001749,0x000200f9, 6010x000013a5,0x000013e9,0x000013d6,0x00000140,
5940x00001743,0x000200f8,0x00001743,0x000700f5, 6020x0004003d,0x00000006,0x000013ea,0x000013e9,
5950x00000006,0x00005fb6,0x0000174a,0x0000173f, 6030x00050080,0x00000006,0x000017e7,0x000013e7,
5960x00001750,0x00001741,0x00050084,0x00000006, 6040x00000abc,0x00050086,0x00000006,0x000017e8,
5970x0000164c,0x000000ec,0x00001638,0x00050080, 6050x000017e7,0x000001cc,0x00050084,0x00000006,
5980x00000006,0x0000164d,0x00005fb6,0x0000164c, 6060x000017eb,0x000013ea,0x000017e8,0x0007000c,
5990x00050041,0x00000266,0x0000164e,0x000001b9, 6070x00000006,0x000017ed,0x00000001,0x00000026,
6000x00000264,0x0004003d,0x00000007,0x0000164f, 6080x000017eb,0x000013e7,0x00050080,0x00000006,
6010x0000164e,0x00050051,0x00000006,0x00001767, 6090x000017f0,0x000017ed,0x000017e8,0x0007000c,
6020x0000164f,0x00000000,0x00050095,0x0000013d, 6100x00000006,0x000017f2,0x00000001,0x00000026,
6030x00001769,0x00001767,0x0000164d,0x00050051, 6110x000017f0,0x000013e7,0x000200f9,0x000017f4,
6040x00000006,0x0000176a,0x00001769,0x00000001, 6120x000200f8,0x000017f4,0x000700f5,0x00000006,
6050x00050051,0x00000006,0x0000176b,0x00001769, 6130x000063f5,0x00000140,0x000013e2,0x00001802,
6060x00000000,0x00050051,0x00000006,0x0000176e, 6140x000017f9,0x000700f5,0x00000006,0x000063f4,
6070x0000164f,0x00000001,0x00050080,0x00000006, 6150x000017ed,0x000013e2,0x00001805,0x000017f9,
6080x00001770,0x0000176e,0x0000176a,0x00050050, 6160x000500b0,0x0000002f,0x000017f8,0x000063f4,
6090x00000007,0x00001771,0x0000176b,0x00001770, 6170x000017f2,0x000400f6,0x00001806,0x000017f9,
6100x0004007c,0x00000014,0x00001761,0x00001771, 6180x00000000,0x000400fa,0x000017f8,0x000017f9,
6110x00060041,0x0000016c,0x00001758,0x00001761, 6190x00001806,0x000200f8,0x000017f9,0x00050084,
6120x0000016b,0x0000016b,0x0006003d,0x00000006, 6200x00000006,0x000017fc,0x000000f3,0x000063f4,
6130x00001759,0x00001758,0x00000002,0x00000004, 6210x00050080,0x00000006,0x000017fd,0x000017b5,
6140x000200f9,0x00001652,0x000200f8,0x00001652, 6220x000017fc,0x00050041,0x0000026e,0x000017fe,
6150x000700f5,0x00000006,0x00005fb7,0x00001759, 6230x000001c1,0x0000026c,0x0004003d,0x00000007,
6160x00001743,0x00000138,0x00001651,0x00050041, 6240x000017ff,0x000017fe,0x00050051,0x00000006,
6170x000001bb,0x00001775,0x000001b9,0x000004c1, 6250x0000185f,0x000017ff,0x00000000,0x00050095,
6180x0004003d,0x00000006,0x00001776,0x00001775, 6260x00000145,0x00001861,0x0000185f,0x000017fd,
6190x00050084,0x00000006,0x00001777,0x000000ec, 6270x00050051,0x00000006,0x00001862,0x00001861,
6200x00001776,0x000500c2,0x00000006,0x00001778, 6280x00000001,0x00050051,0x00000006,0x00001863,
6210x00005fb5,0x00001777,0x000500c7,0x00000006, 6290x00001861,0x00000000,0x00050051,0x00000006,
6220x00001779,0x00001778,0x00000a0e,0x000200f9, 6300x00001866,0x000017ff,0x00000001,0x00050080,
6230x00001656,0x000200f8,0x00001656,0x000700f5, 6310x00000006,0x00001868,0x00001866,0x00001862,
6240x00000006,0x00005fb8,0x00000138,0x00001652, 6320x00050050,0x00000007,0x00001869,0x00001863,
6250x00001666,0x0000165a,0x000500b0,0x0000002f, 6330x00001868,0x0004007c,0x00000014,0x00001859,
6260x00001659,0x00005fb8,0x000001db,0x000400f6, 6340x00001869,0x00060041,0x00000174,0x00001850,
6270x00001667,0x0000165a,0x00000000,0x000400fa, 6350x00001859,0x00000173,0x00000173,0x0006003d,
6280x00001659,0x0000165a,0x00001667,0x000200f8, 6360x00000006,0x00001851,0x00001850,0x00000002,
6290x0000165a,0x000500aa,0x0000002f,0x00001660, 6370x00000004,0x00050080,0x00000006,0x00001802,
6300x00005fb8,0x00001779,0x000500a7,0x0000002f, 6380x000063f5,0x00001851,0x00050080,0x00000006,
6310x00001661,0x0000163b,0x00001660,0x000600a9, 6390x00001805,0x000063f4,0x0000026c,0x000200f9,
6320x00000006,0x00001662,0x00001661,0x00000142, 6400x000017f4,0x000200f8,0x00001806,0x00050041,
6330x00000138,0x00060041,0x00000937,0x00001663, 6410x0000099d,0x00001809,0x00000ae5,0x000013ea,
6340x00000b2d,0x00005fb8,0x00001309,0x0003003e, 6420x0003003e,0x00001809,0x000063f5,0x000400e0,
6350x00001663,0x00001662,0x00050080,0x00000006, 6430x00000288,0x00000288,0x000009b5,0x000500aa,
6360x00001666,0x00005fb8,0x00000264,0x000200f9, 6440x0000002f,0x0000180b,0x000013ea,0x00000140,
6370x00001656,0x000200f8,0x00001667,0x000400e0, 6450x000300f7,0x00001828,0x00000000,0x000400fa,
6380x00000280,0x00000280,0x0000094f,0x000200f9, 6460x0000180b,0x0000180c,0x00001828,0x000200f8,
6390x00001668,0x000200f8,0x00001668,0x000700f5, 6470x0000180c,0x000200f9,0x0000180d,0x000200f8,
6400x00000006,0x00005fb9,0x00000142,0x00001667, 6480x0000180d,0x000700f5,0x00000006,0x000063f7,
6410x00001699,0x00001697,0x000500b0,0x0000002f, 6490x00000140,0x0000180c,0x0000181a,0x00001811,
6420x0000166b,0x00005fb9,0x000001c4,0x000400f6, 6500x000700f5,0x00000006,0x000063f6,0x00000140,
6430x0000169a,0x00001697,0x00000000,0x000400fa, 6510x0000180c,0x0000181d,0x00001811,0x000500b0,
6440x0000166b,0x0000166c,0x0000169a,0x000200f8, 6520x0000002f,0x00001810,0x000063f6,0x000001cc,
6450x0000166c,0x000200f9,0x0000166d,0x000200f8, 6530x000400f6,0x0000181e,0x00001811,0x00000000,
6460x0000166d,0x000700f5,0x00000006,0x00005fc6, 6540x000400fa,0x00001810,0x00001811,0x0000181e,
6470x00000138,0x0000166c,0x00001683,0x00001681, 6550x000200f8,0x00001811,0x00050041,0x0000099d,
6480x000500b0,0x0000002f,0x00001670,0x00005fc6, 6560x00001813,0x00000ae5,0x000063f6,0x0004003d,
6490x000001db,0x000400f6,0x00001684,0x00001681, 6570x00000006,0x00001814,0x00001813,0x0003003e,
6500x00000000,0x000400fa,0x00001670,0x00001671, 6580x00001813,0x000063f7,0x00050080,0x00000006,
6510x00001684,0x000200f8,0x00001671,0x000500ae, 6590x0000181a,0x000063f7,0x00001814,0x00050080,
6520x0000002f,0x00001675,0x00001309,0x00005fb9, 6600x00000006,0x0000181d,0x000063f6,0x0000026c,
6530x000300f7,0x0000167e,0x00000000,0x000400fa, 6610x000200f9,0x0000180d,0x000200f8,0x0000181e,
6540x00001675,0x00001676,0x0000167d,0x000200f8, 6620x000200f9,0x00001828,0x000200f8,0x00001828,
6550x0000167d,0x000200f9,0x0000167e,0x000200f8, 6630x000400e0,0x00000288,0x00000288,0x000009b5,
6560x00001676,0x00050082,0x00000006,0x0000167a, 6640x0004003d,0x00000006,0x0000182b,0x00001809,
6570x00001309,0x00005fb9,0x00060041,0x00000937, 6650x000200f9,0x0000182d,0x000200f8,0x0000182d,
6580x0000167b,0x00000b2d,0x00005fc6,0x0000167a, 6660x000700f5,0x00000006,0x000063f9,0x0000182b,
6590x0004003d,0x00000006,0x0000167c,0x0000167b, 6670x00001828,0x00001844,0x00001832,0x000700f5,
6600x000200f9,0x0000167e,0x000200f8,0x0000167e, 6680x00000006,0x000063f8,0x000017ed,0x00001828,
6610x000700f5,0x00000006,0x00005fca,0x0000167c, 6690x00001847,0x00001832,0x000500b0,0x0000002f,
6620x00001676,0x00000138,0x0000167d,0x00050041, 6700x00001831,0x000063f8,0x000017f2,0x000400f6,
6630x00000009,0x00001680,0x0000160c,0x00005fc6, 6710x00001848,0x00001832,0x00000000,0x000400fa,
6640x0003003e,0x00001680,0x00005fca,0x000200f9, 6720x00001831,0x00001832,0x00001848,0x000200f8,
6650x00001681,0x000200f8,0x00001681,0x00050080, 6730x00001832,0x00050084,0x00000006,0x00001835,
6660x00000006,0x00001683,0x00005fc6,0x00000264, 6740x000000f3,0x000063f8,0x00050080,0x00000006,
6670x000200f9,0x0000166d,0x000200f8,0x00001684, 6750x00001836,0x000017b5,0x00001835,0x00050041,
6680x000400e0,0x00000280,0x00000280,0x0000094f, 6760x0000026e,0x00001837,0x000001c1,0x0000026c,
6690x000200f9,0x00001685,0x000200f8,0x00001685, 6770x0004003d,0x00000007,0x00001838,0x00001837,
6700x000700f5,0x00000006,0x00005fc7,0x00000138, 6780x00050051,0x00000006,0x000018a0,0x00001838,
6710x00001684,0x00001695,0x00001689,0x000500b0, 6790x00000000,0x00050095,0x00000145,0x000018a2,
6720x0000002f,0x00001688,0x00005fc7,0x000001db, 6800x000018a0,0x00001836,0x00050051,0x00000006,
6730x000400f6,0x00001696,0x00001689,0x00000000, 6810x000018a3,0x000018a2,0x00000001,0x00050051,
6740x000400fa,0x00001688,0x00001689,0x00001696, 6820x00000006,0x000018a4,0x000018a2,0x00000000,
6750x000200f8,0x00001689,0x00050041,0x00000009, 6830x00050051,0x00000006,0x000018a7,0x00001838,
6760x0000168d,0x0000160c,0x00005fc7,0x0004003d, 6840x00000001,0x00050080,0x00000006,0x000018a9,
6770x00000006,0x0000168e,0x0000168d,0x00060041, 6850x000018a7,0x000018a3,0x00050050,0x00000007,
6780x00000937,0x0000168f,0x00000b2d,0x00005fc7, 6860x000018aa,0x000018a4,0x000018a9,0x0004007c,
6790x00001309,0x0004003d,0x00000006,0x00001690, 6870x00000014,0x0000189a,0x000018aa,0x00060041,
6800x0000168f,0x00050080,0x00000006,0x00001691, 6880x00000174,0x00001891,0x0000189a,0x00000173,
6810x00001690,0x0000168e,0x0003003e,0x0000168f, 6890x00000173,0x0006003d,0x00000006,0x00001892,
6820x00001691,0x00050080,0x00000006,0x00001695, 6900x00001891,0x00000002,0x00000004,0x00050080,
6830x00005fc7,0x00000264,0x000200f9,0x00001685, 6910x00000006,0x0000183d,0x000017bb,0x00001835,
6840x000200f8,0x00001696,0x000400e0,0x00000280, 6920x00050095,0x00000145,0x000018c2,0x000018a0,
6850x00000280,0x0000094f,0x000200f9,0x00001697, 6930x0000183d,0x00050051,0x00000006,0x000018c3,
6860x000200f8,0x00001697,0x000500c4,0x00000006, 6940x000018c2,0x00000001,0x00050051,0x00000006,
6870x00001699,0x00005fb9,0x00000264,0x000200f9, 6950x000018c4,0x000018c2,0x00000000,0x00050080,
6880x00001668,0x000200f8,0x0000169a,0x000300f7, 6960x00000006,0x000018c9,0x000018a7,0x000018c3,
6890x000016b6,0x00000000,0x000400fa,0x0000163b, 6970x00050050,0x00000007,0x000018ca,0x000018c4,
6900x0000169c,0x000016b6,0x000200f8,0x0000169c, 6980x000018c9,0x0004007c,0x00000014,0x000018ba,
6910x00050041,0x00000937,0x0000169e,0x00000ad4, 6990x000018ca,0x00060041,0x00000174,0x000018b2,
6920x00001779,0x0004003d,0x00000006,0x0000169f, 7000x000018ba,0x00000173,0x00000173,0x0005003e,
6930x0000169e,0x00060041,0x00000937,0x000016a2, 7010x000018b2,0x000063f9,0x00000002,0x00000004,
6940x00000b2d,0x00001779,0x00001309,0x0004003d, 7020x00050080,0x00000006,0x00001844,0x000063f9,
6950x00000006,0x000016a3,0x000016a2,0x00050080, 7030x00001892,0x00050080,0x00000006,0x00001847,
6960x00000006,0x000016a4,0x0000169f,0x000016a3, 7040x000063f8,0x0000026c,0x000200f9,0x0000182d,
6970x00050082,0x00000006,0x000016a5,0x000016a4, 7050x000200f8,0x00001848,0x000200f9,0x000014ef,
6980x00000142,0x000500c7,0x00000006,0x0000177f, 7060x000200f8,0x000013e3,0x000500aa,0x0000002f,
6990x00001776,0x00000142,0x000500aa,0x0000002f, 7070x000013f3,0x000013be,0x000005a9,0x000300f7,
7000x00001780,0x0000177f,0x00000138,0x000300f7, 7080x000013f5,0x00000000,0x000400fa,0x000013f3,
7010x00001785,0x00000000,0x000400fa,0x00001780, 7090x000013f4,0x000013f5,0x000200f8,0x000013f4,
7020x00001781,0x00001783,0x000200f8,0x00001783, 7100x00050041,0x000013a5,0x000013f7,0x000013d5,
7030x000200f9,0x00001785,0x000200f8,0x00001781, 7110x00000140,0x0004003d,0x00000006,0x000013f8,
7040x00050084,0x00000006,0x0000178b,0x000001cd, 7120x000013f7,0x00050041,0x000013a5,0x000013fa,
7050x0000162d,0x00050080,0x00000006,0x0000178c, 7130x000013d6,0x00000140,0x0004003d,0x00000006,
7060x000001c4,0x0000178b,0x000200f9,0x00001785, 7140x000013fb,0x000013fa,0x000500b0,0x0000002f,
7070x000200f8,0x00001785,0x000700f5,0x00000006, 7150x000018eb,0x000013fb,0x000001e3,0x000300f7,
7080x00005fba,0x0000178c,0x00001781,0x000001c4, 7160x000018fa,0x00000000,0x000400fa,0x000018eb,
7090x00001783,0x00050084,0x00000006,0x000016a8, 7170x000018ec,0x000018fa,0x000200f8,0x000018ec,
7100x000000ec,0x000016a5,0x00050080,0x00000006, 7180x00050041,0x000001c3,0x000019a2,0x000001c1,
7110x000016a9,0x00005fba,0x000016a8,0x00050041, 7190x000001c2,0x0004003d,0x00000006,0x000019a3,
7120x00000266,0x000016aa,0x000001b9,0x00000264, 7200x000019a2,0x00050084,0x00000006,0x000019a4,
7130x0004003d,0x00000007,0x000016ab,0x000016aa, 7210x000001e3,0x000019a3,0x00050080,0x00000006,
7140x00050051,0x00000006,0x000017a4,0x000016ab, 7220x000019a5,0x000001cc,0x000019a4,0x00050080,
7150x00000000,0x00050095,0x0000013d,0x000017a6, 7230x00000006,0x000019ab,0x000019a3,0x00000695,
7160x000017a4,0x000016a9,0x00050051,0x00000006, 7240x00050086,0x00000006,0x000019ac,0x000019ab,
7170x000017a7,0x000017a6,0x00000001,0x00050051, 7250x000001c6,0x00050084,0x00000006,0x0000199e,
7180x00000006,0x000017a8,0x000017a6,0x00000000, 7260x000001cc,0x000019ac,0x00050080,0x00000006,
7190x00050051,0x00000006,0x000017ab,0x000016ab, 7270x0000199f,0x000019a5,0x0000199e,0x00050084,
7200x00000001,0x00050080,0x00000006,0x000017ad, 7280x00000006,0x000018f1,0x000013fb,0x000019ac,
7210x000017ab,0x000017a7,0x00050050,0x00000007, 7290x00050080,0x00000006,0x000018f3,0x000018f1,
7220x000017ae,0x000017a8,0x000017ad,0x0004007c, 7300x000013f8,0x00050084,0x00000006,0x000018f4,
7230x00000014,0x0000179e,0x000017ae,0x00060041, 7310x000000f3,0x000018f3,0x00050080,0x00000006,
7240x0000016c,0x00001796,0x0000179e,0x0000016b, 7320x000018f5,0x0000199f,0x000018f4,0x00050041,
7250x0000016b,0x0005003e,0x00001796,0x00005fb5, 7330x0000026e,0x000018f6,0x000001c1,0x0000026c,
7260x00000002,0x00000004,0x000300f7,0x000017ba, 7340x0004003d,0x00000007,0x000018f7,0x000018f6,
7270x00000000,0x000400fa,0x00001780,0x000017b6, 7350x00050051,0x00000006,0x000019ca,0x000018f7,
7280x000017b8,0x000200f8,0x000017b8,0x00050084, 7360x00000000,0x00050095,0x00000145,0x000019cc,
7290x00000006,0x000017c6,0x000000ec,0x0000162d, 7370x000019ca,0x000018f5,0x00050051,0x00000006,
7300x00050080,0x00000006,0x000017c7,0x000001c4, 7380x000019cd,0x000019cc,0x00000001,0x00050051,
7310x000017c6,0x000200f9,0x000017ba,0x000200f8, 7390x00000006,0x000019ce,0x000019cc,0x00000000,
7320x000017b6,0x00050084,0x00000006,0x000017c0, 7400x00050051,0x00000006,0x000019d1,0x000018f7,
7330x000001d4,0x0000162d,0x00050080,0x00000006, 7410x00000001,0x00050080,0x00000006,0x000019d3,
7340x000017c1,0x000001c4,0x000017c0,0x000200f9, 7420x000019d1,0x000019cd,0x00050050,0x00000007,
7350x000017ba,0x000200f8,0x000017ba,0x000700f5, 7430x000019d4,0x000019ce,0x000019d3,0x0004007c,
7360x00000006,0x00005fbb,0x000017c1,0x000017b6, 7440x00000014,0x000019c4,0x000019d4,0x00060041,
7370x000017c7,0x000017b8,0x00050080,0x00000006, 7450x00000174,0x000019bb,0x000019c4,0x00000173,
7380x000016b1,0x00005fbb,0x000016a8,0x00050095, 7460x00000173,0x0006003d,0x00000006,0x000019bc,
7390x0000013d,0x000017df,0x000017a4,0x000016b1, 7470x000019bb,0x00000002,0x00000004,0x00050041,
7400x00050051,0x00000006,0x000017e0,0x000017df, 7480x0000099d,0x000018f9,0x00000b3a,0x000013fb,
7410x00000001,0x00050051,0x00000006,0x000017e1, 7490x0003003e,0x000018f9,0x000019bc,0x000200f9,
7420x000017df,0x00000000,0x00050080,0x00000006, 7500x000018fa,0x000200f8,0x000018fa,0x00050084,
7430x000017e6,0x000017ab,0x000017e0,0x00050050, 7510x00000006,0x000018fc,0x000013f8,0x000001c6,
7440x00000007,0x000017e7,0x000017e1,0x000017e6, 7520x00050080,0x00000006,0x000018fe,0x000018fc,
7450x0004007c,0x00000014,0x000017d7,0x000017e7, 7530x000001c6,0x00050041,0x000001c3,0x000018ff,
7460x00060041,0x0000016c,0x000017cf,0x000017d7, 7540x000001c1,0x000001c2,0x0004003d,0x00000006,
7470x0000016b,0x0000016b,0x0005003e,0x000017cf, 7550x00001900,0x000018ff,0x0007000c,0x00000006,
7480x00005fb7,0x00000002,0x00000004,0x000200f9, 7560x00001901,0x00000001,0x00000026,0x000018fe,
7490x000016b6,0x000200f8,0x000016b6,0x000400e0, 7570x00001900,0x000200f9,0x00001903,0x000200f8,
7500x00000280,0x00000280,0x0000094f,0x000300f7, 7580x00001903,0x000700f5,0x00000006,0x000063db,
7510x000016c2,0x00000000,0x000400fa,0x00001618, 7590x000018fc,0x000018fa,0x00001998,0x00001996,
7520x000016b9,0x000016c2,0x000200f8,0x000016b9, 7600x000500b0,0x0000002f,0x00001907,0x000063db,
7530x00060041,0x00000937,0x000016bc,0x00000b2d, 7610x00001901,0x000400f6,0x00001999,0x00001996,
7540x00001309,0x00000b9b,0x0004003d,0x00000006, 7620x00000000,0x000400fa,0x00001907,0x00001908,
7550x000016bd,0x000016bc,0x00050041,0x00000937, 7630x00001999,0x000200f8,0x00001908,0x00050080,
7560x000016be,0x00000ad4,0x00001309,0x0004003d, 7640x00000006,0x0000190b,0x000063db,0x000013fb,
7570x00000006,0x000016bf,0x000016be,0x00050080, 7650x000500b0,0x0000002f,0x0000190e,0x0000190b,
7580x00000006,0x000016c0,0x000016bf,0x000016bd, 7660x00001901,0x000300f7,0x00001919,0x00000000,
7590x0003003e,0x000016be,0x000016c0,0x000200f9, 7670x000400fa,0x0000190e,0x00001910,0x00001918,
7600x000016c2,0x000200f8,0x000016c2,0x000400e0, 7680x000200f8,0x00001918,0x000200f9,0x00001919,
7610x00000280,0x00000280,0x0000094f,0x000200f9, 7690x000200f8,0x00001910,0x00050041,0x000001c3,
7620x000016c3,0x000200f8,0x000016c3,0x00050080, 7700x000019d8,0x000001c1,0x00000528,0x0004003d,
7630x00000006,0x000016c5,0x00005fb3,0x000001c4, 7710x00000006,0x000019d9,0x000019d8,0x000500c7,
7640x000200f9,0x00001630,0x000200f8,0x000016c6, 7720x00000006,0x000019da,0x000019d9,0x0000014a,
7650x000200f9,0x000013fd,0x000200f8,0x00001303, 7730x000500aa,0x0000002f,0x000019db,0x000019da,
7660x000500aa,0x0000002f,0x0000130f,0x000012df, 7740x00000140,0x000300f7,0x000019e0,0x00000000,
7670x0000130e,0x000300f7,0x00001311,0x00000000, 7750x000400fa,0x000019db,0x000019dc,0x000019de,
7680x000400fa,0x0000130f,0x00001310,0x00001311, 7760x000200f8,0x000019de,0x00050084,0x00000006,
7690x000200f8,0x00001310,0x00050041,0x000012db, 7770x000019e8,0x000001d5,0x00001900,0x00050080,
7700x00001313,0x000012e4,0x00000138,0x0004003d, 7780x00000006,0x000019e9,0x000001cc,0x000019e8,
7710x00000006,0x00001314,0x00001313,0x00050041, 7790x000200f9,0x000019e0,0x000200f8,0x000019dc,
7720x000001bb,0x00001802,0x000001b9,0x000001ba, 7800x000200f9,0x000019e0,0x000200f8,0x000019e0,
7730x0004003d,0x00000006,0x00001803,0x00001802, 7810x000700f5,0x00000006,0x000063dc,0x000001cc,
7740x000200f9,0x00001804,0x000200f8,0x00001804, 7820x000019dc,0x000019e9,0x000019de,0x00050084,
7750x000700f5,0x00000006,0x00005f9e,0x00000142, 7830x00000006,0x00001913,0x000000f3,0x0000190b,
7760x00001310,0x0000180b,0x00001809,0x000500b0, 7840x00050080,0x00000006,0x00001914,0x000063dc,
7770x0000002f,0x00001808,0x00005f9e,0x00001803, 7850x00001913,0x00050041,0x0000026e,0x00001915,
7780x000400f6,0x0000180d,0x00001809,0x00000000, 7860x000001c1,0x0000026c,0x0004003d,0x00000007,
7790x000400fa,0x00001808,0x00001809,0x0000180d, 7870x00001916,0x00001915,0x00050051,0x00000006,
7800x000200f8,0x00001809,0x000500c4,0x00000006, 7880x00001a00,0x00001916,0x00000000,0x00050095,
7810x0000180b,0x00005f9e,0x00000264,0x000200f9, 7890x00000145,0x00001a02,0x00001a00,0x00001914,
7820x00001804,0x000200f8,0x0000180d,0x000200f9, 7900x00050051,0x00000006,0x00001a03,0x00001a02,
7830x0000180f,0x000200f8,0x0000180f,0x000700f5, 7910x00000001,0x00050051,0x00000006,0x00001a04,
7840x00000006,0x00005f9f,0x00001314,0x0000180d, 7920x00001a02,0x00000000,0x00050051,0x00000006,
7850x00001837,0x00001835,0x000500b0,0x0000002f, 7930x00001a07,0x00001916,0x00000001,0x00050080,
7860x00001813,0x00005f9f,0x00005f9e,0x000400f6, 7940x00000006,0x00001a09,0x00001a07,0x00001a03,
7870x00001838,0x00001835,0x00000000,0x000400fa, 7950x00050050,0x00000007,0x00001a0a,0x00001a04,
7880x00001813,0x00001814,0x00001838,0x000200f8, 7960x00001a09,0x0004007c,0x00000014,0x000019fa,
7890x00001814,0x000500b0,0x0000002f,0x00001818, 7970x00001a0a,0x00060041,0x00000174,0x000019f1,
7900x00005f9f,0x00001803,0x000300f7,0x00001822, 7980x000019fa,0x00000173,0x00000173,0x0006003d,
7910x00000000,0x000400fa,0x00001818,0x00001819, 7990x00000006,0x000019f2,0x000019f1,0x00000002,
7920x00001821,0x000200f8,0x00001821,0x000200f9, 8000x00000004,0x000200f9,0x00001919,0x000200f8,
7930x00001822,0x000200f8,0x00001819,0x00050084, 8010x00001919,0x000700f5,0x00000006,0x000063dd,
7940x00000006,0x0000181c,0x000000ec,0x00005f9f, 8020x000019f2,0x000019e0,0x00000140,0x00001918,
7950x00050080,0x00000006,0x0000181d,0x000001c4, 8030x000300f7,0x00001925,0x00000000,0x000400fa,
7960x0000181c,0x00050041,0x00000266,0x0000181e, 8040x0000190e,0x0000191c,0x00001924,0x000200f8,
7970x000001b9,0x00000264,0x0004003d,0x00000007, 8050x00001924,0x000200f9,0x00001925,0x000200f8,
7980x0000181f,0x0000181e,0x00050051,0x00000006, 8060x0000191c,0x00050041,0x000001c3,0x00001a0e,
7990x000018c6,0x0000181f,0x00000000,0x00050095, 8070x000001c1,0x00000528,0x0004003d,0x00000006,
8000x0000013d,0x000018c8,0x000018c6,0x0000181d, 8080x00001a0f,0x00001a0e,0x000500c7,0x00000006,
8010x00050051,0x00000006,0x000018c9,0x000018c8, 8090x00001a10,0x00001a0f,0x0000014a,0x000500aa,
8020x00000001,0x00050051,0x00000006,0x000018ca, 8100x0000002f,0x00001a11,0x00001a10,0x00000140,
8030x000018c8,0x00000000,0x00050051,0x00000006, 8110x000300f7,0x00001a16,0x00000000,0x000400fa,
8040x000018cd,0x0000181f,0x00000001,0x00050080, 8120x00001a11,0x00001a12,0x00001a14,0x000200f8,
8050x00000006,0x000018cf,0x000018cd,0x000018c9, 8130x00001a14,0x00050084,0x00000006,0x00001a22,
8060x00050050,0x00000007,0x000018d0,0x000018ca, 8140x000001dc,0x00001900,0x00050080,0x00000006,
8070x000018cf,0x0004007c,0x00000014,0x000018c0, 8150x00001a23,0x000001cc,0x00001a22,0x000200f9,
8080x000018d0,0x00060041,0x0000016c,0x000018b7, 8160x00001a16,0x000200f8,0x00001a12,0x00050084,
8090x000018c0,0x0000016b,0x0000016b,0x0006003d, 8170x00000006,0x00001a1c,0x000000f3,0x00001900,
8100x00000006,0x000018b8,0x000018b7,0x00000002, 8180x00050080,0x00000006,0x00001a1d,0x000001cc,
8110x00000004,0x000200f9,0x00001822,0x000200f8, 8190x00001a1c,0x000200f9,0x00001a16,0x000200f8,
8120x00001822,0x000700f5,0x00000006,0x00005faf, 8200x00001a16,0x000700f5,0x00000006,0x000063de,
8130x000018b8,0x00001819,0x00000539,0x00001821, 8210x00001a1d,0x00001a12,0x00001a23,0x00001a14,
8140x00050041,0x00000937,0x00001824,0x00000924, 8220x00050084,0x00000006,0x0000191f,0x000000f3,
8150x00005f9f,0x0003003e,0x00001824,0x00005faf, 8230x0000190b,0x00050080,0x00000006,0x00001920,
8160x000300f7,0x00001832,0x00000000,0x000400fa, 8240x000063de,0x0000191f,0x00050041,0x0000026e,
8170x00001818,0x00001829,0x00001831,0x000200f8, 8250x00001921,0x000001c1,0x0000026c,0x0004003d,
8180x00001831,0x000200f9,0x00001832,0x000200f8, 8260x00000007,0x00001922,0x00001921,0x00050051,
8190x00001829,0x00050084,0x00000006,0x000018d5, 8270x00000006,0x00001a3a,0x00001922,0x00000000,
8200x000000ec,0x00001803,0x00050080,0x00000006, 8280x00050095,0x00000145,0x00001a3c,0x00001a3a,
8210x000018d6,0x000001c4,0x000018d5,0x00050084, 8290x00001920,0x00050051,0x00000006,0x00001a3d,
8220x00000006,0x0000182c,0x000000ec,0x00005f9f, 8300x00001a3c,0x00000001,0x00050051,0x00000006,
8230x00050080,0x00000006,0x0000182d,0x000018d6, 8310x00001a3e,0x00001a3c,0x00000000,0x00050051,
8240x0000182c,0x00050041,0x00000266,0x0000182e, 8320x00000006,0x00001a41,0x00001922,0x00000001,
8250x000001b9,0x00000264,0x0004003d,0x00000007, 8330x00050080,0x00000006,0x00001a43,0x00001a41,
8260x0000182f,0x0000182e,0x00050051,0x00000006, 8340x00001a3d,0x00050050,0x00000007,0x00001a44,
8270x000018ed,0x0000182f,0x00000000,0x00050095, 8350x00001a3e,0x00001a43,0x0004007c,0x00000014,
8280x0000013d,0x000018ef,0x000018ed,0x0000182d, 8360x00001a34,0x00001a44,0x00060041,0x00000174,
8290x00050051,0x00000006,0x000018f0,0x000018ef, 8370x00001a2b,0x00001a34,0x00000173,0x00000173,
8300x00000001,0x00050051,0x00000006,0x000018f1, 8380x0006003d,0x00000006,0x00001a2c,0x00001a2b,
8310x000018ef,0x00000000,0x00050051,0x00000006, 8390x00000002,0x00000004,0x000200f9,0x00001925,
8320x000018f4,0x0000182f,0x00000001,0x00050080, 8400x000200f8,0x00001925,0x000700f5,0x00000006,
8330x00000006,0x000018f6,0x000018f4,0x000018f0, 8410x000063df,0x00001a2c,0x00001a16,0x00000140,
8340x00050050,0x00000007,0x000018f7,0x000018f1, 8420x00001924,0x00050041,0x000001c3,0x00001a48,
8350x000018f6,0x0004007c,0x00000014,0x000018e7, 8430x000001c1,0x00000528,0x0004003d,0x00000006,
8360x000018f7,0x00060041,0x0000016c,0x000018de, 8440x00001a49,0x00001a48,0x00050084,0x00000006,
8370x000018e7,0x0000016b,0x0000016b,0x0006003d, 8450x00001a4a,0x000000f3,0x00001a49,0x000500c2,
8380x00000006,0x000018df,0x000018de,0x00000002, 8460x00000006,0x00001a4b,0x000063dd,0x00001a4a,
8390x00000004,0x000200f9,0x00001832,0x000200f8, 8470x000500c7,0x00000006,0x00001a4c,0x00001a4b,
8400x00001832,0x000700f5,0x00000006,0x00005fb1, 8480x00000a74,0x000200f9,0x00001929,0x000200f8,
8410x000018df,0x00001829,0x00000539,0x00001831, 8490x00001929,0x000700f5,0x00000006,0x000063e0,
8420x00050041,0x00000937,0x00001834,0x00000939, 8500x00000140,0x00001925,0x00001939,0x0000192d,
8430x00005f9f,0x0003003e,0x00001834,0x00005fb1, 8510x000500b0,0x0000002f,0x0000192c,0x000063e0,
8440x000200f9,0x00001835,0x000200f8,0x00001835, 8520x000001e3,0x000400f6,0x0000193a,0x0000192d,
8450x00050080,0x00000006,0x00001837,0x00005f9f, 8530x00000000,0x000400fa,0x0000192c,0x0000192d,
8460x000001c4,0x000200f9,0x0000180f,0x000200f8, 8540x0000193a,0x000200f8,0x0000192d,0x000500aa,
8470x00001838,0x000400e0,0x00000280,0x00000280, 8550x0000002f,0x00001933,0x000063e0,0x00001a4c,
8480x0000094f,0x000200f9,0x00001839,0x000200f8, 8560x000500a7,0x0000002f,0x00001934,0x0000190e,
8490x00001839,0x000700f5,0x00000006,0x00005fa1, 8570x00001933,0x000600a9,0x00000006,0x00001935,
8500x00000280,0x00001838,0x0000188d,0x0000188b, 8580x00001934,0x0000014a,0x00000140,0x00060041,
8510x000500b2,0x0000002f,0x0000183d,0x00005fa1, 8590x0000099d,0x00001936,0x00000b93,0x000063e0,
8520x00005f9e,0x000400f6,0x0000188e,0x0000188b, 8600x000013fb,0x0003003e,0x00001936,0x00001935,
8530x00000000,0x000400fa,0x0000183d,0x0000183e, 8610x00050080,0x00000006,0x00001939,0x000063e0,
8540x0000188e,0x000200f8,0x0000183e,0x000500c2, 8620x0000026c,0x000200f9,0x00001929,0x000200f8,
8550x00000006,0x00001840,0x00005fa1,0x00000264, 8630x0000193a,0x000400e0,0x00000288,0x00000288,
8560x000200f9,0x00001841,0x000200f8,0x00001841, 8640x000009b5,0x000200f9,0x0000193b,0x000200f8,
8570x000700f5,0x00000006,0x00005fa4,0x00001840, 8650x0000193b,0x000700f5,0x00000006,0x000063e1,
8580x0000183e,0x00001889,0x00001887,0x000500ac, 8660x0000014a,0x0000193a,0x0000196c,0x0000196a,
8590x0000002f,0x00001844,0x00005fa4,0x00000138, 8670x000500b0,0x0000002f,0x0000193e,0x000063e1,
8600x000400f6,0x0000188a,0x00001887,0x00000000, 8680x000001cc,0x000400f6,0x0000196d,0x0000196a,
8610x000400fa,0x00001844,0x00001845,0x0000188a, 8690x00000000,0x000400fa,0x0000193e,0x0000193f,
8620x000200f8,0x00001845,0x000200f9,0x00001847, 8700x0000196d,0x000200f8,0x0000193f,0x000200f9,
8630x000200f8,0x00001847,0x000700f5,0x00000006, 8710x00001940,0x000200f8,0x00001940,0x000700f5,
8640x00005fa6,0x00001314,0x00001845,0x00001885, 8720x00000006,0x000063ee,0x00000140,0x0000193f,
8650x00001883,0x000500b0,0x0000002f,0x0000184b, 8730x00001956,0x00001954,0x000500b0,0x0000002f,
8660x00005fa6,0x00005f9e,0x000400f6,0x00001886, 8740x00001943,0x000063ee,0x000001e3,0x000400f6,
8670x00001883,0x00000000,0x000400fa,0x0000184b, 8750x00001957,0x00001954,0x00000000,0x000400fa,
8680x0000184c,0x00001886,0x000200f8,0x0000184c, 8760x00001943,0x00001944,0x00001957,0x000200f8,
8690x000500c6,0x00000006,0x0000184f,0x00005fa6, 8770x00001944,0x000500ae,0x0000002f,0x00001948,
8700x00005fa4,0x000500ac,0x0000002f,0x00001852, 8780x000013fb,0x000063e1,0x000300f7,0x00001951,
8710x0000184f,0x00005fa6,0x000300f7,0x00001882, 8790x00000000,0x000400fa,0x00001948,0x00001949,
8720x00000000,0x000400fa,0x00001852,0x00001853, 8800x00001950,0x000200f8,0x00001950,0x000200f9,
8730x00001882,0x000200f8,0x00001853,0x00050041, 8810x00001951,0x000200f8,0x00001949,0x00050082,
8740x00000937,0x00001855,0x00000924,0x00005fa6, 8820x00000006,0x0000194d,0x000013fb,0x000063e1,
8750x0004003d,0x00000006,0x00001856,0x00001855, 8830x00060041,0x0000099d,0x0000194e,0x00000b93,
8760x00050041,0x00000937,0x00001858,0x00000924, 8840x000063ee,0x0000194d,0x0004003d,0x00000006,
8770x0000184f,0x0004003d,0x00000006,0x00001859, 8850x0000194f,0x0000194e,0x000200f9,0x00001951,
8780x00001858,0x00050041,0x00000937,0x0000185b, 8860x000200f8,0x00001951,0x000700f5,0x00000006,
8790x00000939,0x00005fa6,0x0004003d,0x00000006, 8870x000063f2,0x0000194f,0x00001949,0x00000140,
8800x0000185c,0x0000185b,0x00050041,0x00000937, 8880x00001950,0x00050041,0x00000009,0x00001953,
8810x0000185e,0x00000939,0x0000184f,0x0004003d, 8890x000018df,0x000063ee,0x0003003e,0x00001953,
8820x00000006,0x0000185f,0x0000185e,0x000500ac, 8900x000063f2,0x000200f9,0x00001954,0x000200f8,
8830x0000002f,0x00001862,0x00001856,0x00001859, 8910x00001954,0x00050080,0x00000006,0x00001956,
8840x000400a8,0x0000002f,0x00001863,0x00001862, 8920x000063ee,0x0000026c,0x000200f9,0x00001940,
8850x000300f7,0x0000186c,0x00000000,0x000400fa, 8930x000200f8,0x00001957,0x000400e0,0x00000288,
8860x00001863,0x00001864,0x0000186c,0x000200f8, 8940x00000288,0x000009b5,0x000200f9,0x00001958,
8870x00001864,0x000500aa,0x0000002f,0x00001867, 8950x000200f8,0x00001958,0x000700f5,0x00000006,
8880x00001856,0x00001859,0x000500ac,0x0000002f, 8960x000063ef,0x00000140,0x00001957,0x00001968,
8890x0000186a,0x0000185c,0x0000185f,0x000500a7, 8970x0000195c,0x000500b0,0x0000002f,0x0000195b,
8900x0000002f,0x0000186b,0x00001867,0x0000186a, 8980x000063ef,0x000001e3,0x000400f6,0x00001969,
8910x000200f9,0x0000186c,0x000200f8,0x0000186c, 8990x0000195c,0x00000000,0x000400fa,0x0000195b,
8920x000700f5,0x0000002f,0x0000186d,0x00001862, 9000x0000195c,0x00001969,0x000200f8,0x0000195c,
8930x00001853,0x0000186b,0x00001864,0x000500c7, 9010x00050041,0x00000009,0x00001960,0x000018df,
8940x00000006,0x00001871,0x00005fa6,0x00005fa1, 9020x000063ef,0x0004003d,0x00000006,0x00001961,
8950x000500aa,0x0000002f,0x00001872,0x00001871, 9030x00001960,0x00060041,0x0000099d,0x00001962,
8960x00000138,0x000500a4,0x0000002f,0x00001873, 9040x00000b93,0x000063ef,0x000013fb,0x0004003d,
8970x0000186d,0x00001872,0x000300f7,0x00001881, 9050x00000006,0x00001963,0x00001962,0x00050080,
8980x00000000,0x000400fa,0x00001873,0x00001874, 9060x00000006,0x00001964,0x00001963,0x00001961,
8990x00001881,0x000200f8,0x00001874,0x0003003e, 9070x0003003e,0x00001962,0x00001964,0x00050080,
9000x00001855,0x00001859,0x0003003e,0x00001858, 9080x00000006,0x00001968,0x000063ef,0x0000026c,
9010x00001856,0x0003003e,0x0000185b,0x0000185f, 9090x000200f9,0x00001958,0x000200f8,0x00001969,
9020x0003003e,0x0000185e,0x0000185c,0x000200f9, 9100x000400e0,0x00000288,0x00000288,0x000009b5,
9030x00001881,0x000200f8,0x00001881,0x000200f9, 9110x000200f9,0x0000196a,0x000200f8,0x0000196a,
9040x00001882,0x000200f8,0x00001882,0x000200f9, 9120x000500c4,0x00000006,0x0000196c,0x000063e1,
9050x00001883,0x000200f8,0x00001883,0x00050080, 9130x0000026c,0x000200f9,0x0000193b,0x000200f8,
9060x00000006,0x00001885,0x00005fa6,0x000001c4, 9140x0000196d,0x000300f7,0x00001989,0x00000000,
9070x000200f9,0x00001847,0x000200f8,0x00001886, 9150x000400fa,0x0000190e,0x0000196f,0x00001989,
9080x000400e0,0x00000280,0x00000280,0x0000094f, 9160x000200f8,0x0000196f,0x00050041,0x0000099d,
9090x000200f9,0x00001887,0x000200f8,0x00001887, 9170x00001971,0x00000b3a,0x00001a4c,0x0004003d,
9100x000500c2,0x00000006,0x00001889,0x00005fa4, 9180x00000006,0x00001972,0x00001971,0x00060041,
9110x00000264,0x000200f9,0x00001841,0x000200f8, 9190x0000099d,0x00001975,0x00000b93,0x00001a4c,
9120x0000188a,0x000200f9,0x0000188b,0x000200f8, 9200x000013fb,0x0004003d,0x00000006,0x00001976,
9130x0000188b,0x000500c4,0x00000006,0x0000188d, 9210x00001975,0x00050080,0x00000006,0x00001977,
9140x00005fa1,0x00000264,0x000200f9,0x00001839, 9220x00001972,0x00001976,0x00050082,0x00000006,
9150x000200f8,0x0000188e,0x000200f9,0x00001890, 9230x00001978,0x00001977,0x0000014a,0x000500c7,
9160x000200f8,0x00001890,0x000700f5,0x00000006, 9240x00000006,0x00001a52,0x00001a49,0x0000014a,
9170x00005fa3,0x00001314,0x0000188e,0x000018ac, 9250x000500aa,0x0000002f,0x00001a53,0x00001a52,
9180x00001895,0x000500b0,0x0000002f,0x00001894, 9260x00000140,0x000300f7,0x00001a58,0x00000000,
9190x00005fa3,0x00001803,0x000400f6,0x000018ad, 9270x000400fa,0x00001a53,0x00001a54,0x00001a56,
9200x00001895,0x00000000,0x000400fa,0x00001894, 9280x000200f8,0x00001a56,0x000200f9,0x00001a58,
9210x00001895,0x000018ad,0x000200f8,0x00001895, 9290x000200f8,0x00001a54,0x00050084,0x00000006,
9220x00050084,0x00000006,0x00001898,0x000000ec, 9300x00001a5e,0x000001d5,0x00001900,0x00050080,
9230x00005fa3,0x00050080,0x00000006,0x00001899, 9310x00000006,0x00001a5f,0x000001cc,0x00001a5e,
9240x000001c4,0x00001898,0x00050041,0x00000266, 9320x000200f9,0x00001a58,0x000200f8,0x00001a58,
9250x0000189b,0x000001b9,0x00000264,0x0004003d, 9330x000700f5,0x00000006,0x000063e2,0x00001a5f,
9260x00000007,0x0000189c,0x0000189b,0x00050041, 9340x00001a54,0x000001cc,0x00001a56,0x00050084,
9270x00000937,0x0000189d,0x00000924,0x00005fa3, 9350x00000006,0x0000197b,0x000000f3,0x00001978,
9280x0004003d,0x00000006,0x0000189e,0x0000189d, 9360x00050080,0x00000006,0x0000197c,0x000063e2,
9290x00050051,0x00000006,0x0000190f,0x0000189c, 9370x0000197b,0x00050041,0x0000026e,0x0000197d,
9300x00000000,0x00050095,0x0000013d,0x00001911, 9380x000001c1,0x0000026c,0x0004003d,0x00000007,
9310x0000190f,0x00001899,0x00050051,0x00000006, 9390x0000197e,0x0000197d,0x00050051,0x00000006,
9320x00001912,0x00001911,0x00000001,0x00050051, 9400x00001a77,0x0000197e,0x00000000,0x00050095,
9330x00000006,0x00001913,0x00001911,0x00000000, 9410x00000145,0x00001a79,0x00001a77,0x0000197c,
9340x00050051,0x00000006,0x00001916,0x0000189c, 9420x00050051,0x00000006,0x00001a7a,0x00001a79,
9350x00000001,0x00050080,0x00000006,0x00001918, 9430x00000001,0x00050051,0x00000006,0x00001a7b,
9360x00001916,0x00001912,0x00050050,0x00000007, 9440x00001a79,0x00000000,0x00050051,0x00000006,
9370x00001919,0x00001913,0x00001918,0x0004007c, 9450x00001a7e,0x0000197e,0x00000001,0x00050080,
9380x00000014,0x00001909,0x00001919,0x00060041, 9460x00000006,0x00001a80,0x00001a7e,0x00001a7a,
9390x0000016c,0x00001901,0x00001909,0x0000016b, 9470x00050050,0x00000007,0x00001a81,0x00001a7b,
9400x0000016b,0x0005003e,0x00001901,0x0000189e, 9480x00001a80,0x0004007c,0x00000014,0x00001a71,
9410x00000002,0x00000004,0x00050084,0x00000006, 9490x00001a81,0x00060041,0x00000174,0x00001a69,
9420x0000191e,0x000000ec,0x00001803,0x00050080, 9500x00001a71,0x00000173,0x00000173,0x0005003e,
9430x00000006,0x0000191f,0x000001c4,0x0000191e, 9510x00001a69,0x000063dd,0x00000002,0x00000004,
9440x00050080,0x00000006,0x000018a3,0x0000191f, 9520x000300f7,0x00001a8d,0x00000000,0x000400fa,
9450x00001898,0x00050041,0x00000937,0x000018a7, 9530x00001a53,0x00001a89,0x00001a8b,0x000200f8,
9460x00000939,0x00005fa3,0x0004003d,0x00000006, 9540x00001a8b,0x00050084,0x00000006,0x00001a99,
9470x000018a8,0x000018a7,0x00050095,0x0000013d, 9550x000000f3,0x00001900,0x00050080,0x00000006,
9480x00001937,0x0000190f,0x000018a3,0x00050051, 9560x00001a9a,0x000001cc,0x00001a99,0x000200f9,
9490x00000006,0x00001938,0x00001937,0x00000001, 9570x00001a8d,0x000200f8,0x00001a89,0x00050084,
9500x00050051,0x00000006,0x00001939,0x00001937, 9580x00000006,0x00001a93,0x000001dc,0x00001900,
9510x00000000,0x00050080,0x00000006,0x0000193e, 9590x00050080,0x00000006,0x00001a94,0x000001cc,
9520x00001916,0x00001938,0x00050050,0x00000007, 9600x00001a93,0x000200f9,0x00001a8d,0x000200f8,
9530x0000193f,0x00001939,0x0000193e,0x0004007c, 9610x00001a8d,0x000700f5,0x00000006,0x000063e3,
9540x00000014,0x0000192f,0x0000193f,0x00060041, 9620x00001a94,0x00001a89,0x00001a9a,0x00001a8b,
9550x0000016c,0x00001927,0x0000192f,0x0000016b, 9630x00050080,0x00000006,0x00001984,0x000063e3,
9560x0000016b,0x0005003e,0x00001927,0x000018a8, 9640x0000197b,0x00050095,0x00000145,0x00001ab2,
9650x00001a77,0x00001984,0x00050051,0x00000006,
9660x00001ab3,0x00001ab2,0x00000001,0x00050051,
9670x00000006,0x00001ab4,0x00001ab2,0x00000000,
9680x00050080,0x00000006,0x00001ab9,0x00001a7e,
9690x00001ab3,0x00050050,0x00000007,0x00001aba,
9700x00001ab4,0x00001ab9,0x0004007c,0x00000014,
9710x00001aaa,0x00001aba,0x00060041,0x00000174,
9720x00001aa2,0x00001aaa,0x00000173,0x00000173,
9730x0005003e,0x00001aa2,0x000063df,0x00000002,
9740x00000004,0x000200f9,0x00001989,0x000200f8,
9750x00001989,0x000400e0,0x00000288,0x00000288,
9760x000009b5,0x000300f7,0x00001995,0x00000000,
9770x000400fa,0x000018eb,0x0000198c,0x00001995,
9780x000200f8,0x0000198c,0x00060041,0x0000099d,
9790x0000198f,0x00000b93,0x000013fb,0x00000c01,
9800x0004003d,0x00000006,0x00001990,0x0000198f,
9810x00050041,0x0000099d,0x00001991,0x00000b3a,
9820x000013fb,0x0004003d,0x00000006,0x00001992,
9830x00001991,0x00050080,0x00000006,0x00001993,
9840x00001992,0x00001990,0x0003003e,0x00001991,
9850x00001993,0x000200f9,0x00001995,0x000200f8,
9860x00001995,0x000400e0,0x00000288,0x00000288,
9870x000009b5,0x000200f9,0x00001996,0x000200f8,
9880x00001996,0x00050080,0x00000006,0x00001998,
9890x000063db,0x000001cc,0x000200f9,0x00001903,
9900x000200f8,0x00001999,0x000200f9,0x000014ef,
9910x000200f8,0x000013f5,0x000500aa,0x0000002f,
9920x00001401,0x000013be,0x00001400,0x000300f7,
9930x00001403,0x00000000,0x000400fa,0x00001401,
9940x00001402,0x00001403,0x000200f8,0x00001402,
9950x00050041,0x000013a5,0x00001405,0x000013d6,
9960x00000140,0x0004003d,0x00000006,0x00001406,
9970x00001405,0x00050041,0x000001c3,0x00001ad5,
9980x000001c1,0x000001c2,0x0004003d,0x00000006,
9990x00001ad6,0x00001ad5,0x000200f9,0x00001ad7,
10000x000200f8,0x00001ad7,0x000700f5,0x00000006,
10010x000063c6,0x0000014a,0x00001402,0x00001ade,
10020x00001adc,0x000500b0,0x0000002f,0x00001adb,
10030x000063c6,0x00001ad6,0x000400f6,0x00001ae0,
10040x00001adc,0x00000000,0x000400fa,0x00001adb,
10050x00001adc,0x00001ae0,0x000200f8,0x00001adc,
10060x000500c4,0x00000006,0x00001ade,0x000063c6,
10070x0000026c,0x000200f9,0x00001ad7,0x000200f8,
10080x00001ae0,0x000200f9,0x00001ae2,0x000200f8,
10090x00001ae2,0x000700f5,0x00000006,0x000063c7,
10100x00001406,0x00001ae0,0x00001b0a,0x00001b08,
10110x000500b0,0x0000002f,0x00001ae6,0x000063c7,
10120x000063c6,0x000400f6,0x00001b0b,0x00001b08,
10130x00000000,0x000400fa,0x00001ae6,0x00001ae7,
10140x00001b0b,0x000200f8,0x00001ae7,0x000500b0,
10150x0000002f,0x00001aeb,0x000063c7,0x00001ad6,
10160x000300f7,0x00001af5,0x00000000,0x000400fa,
10170x00001aeb,0x00001aec,0x00001af4,0x000200f8,
10180x00001af4,0x000200f9,0x00001af5,0x000200f8,
10190x00001aec,0x00050084,0x00000006,0x00001aef,
10200x000000f3,0x000063c7,0x00050080,0x00000006,
10210x00001af0,0x000001cc,0x00001aef,0x00050041,
10220x0000026e,0x00001af1,0x000001c1,0x0000026c,
10230x0004003d,0x00000007,0x00001af2,0x00001af1,
10240x00050051,0x00000006,0x00001b99,0x00001af2,
10250x00000000,0x00050095,0x00000145,0x00001b9b,
10260x00001b99,0x00001af0,0x00050051,0x00000006,
10270x00001b9c,0x00001b9b,0x00000001,0x00050051,
10280x00000006,0x00001b9d,0x00001b9b,0x00000000,
10290x00050051,0x00000006,0x00001ba0,0x00001af2,
10300x00000001,0x00050080,0x00000006,0x00001ba2,
10310x00001ba0,0x00001b9c,0x00050050,0x00000007,
10320x00001ba3,0x00001b9d,0x00001ba2,0x0004007c,
10330x00000014,0x00001b93,0x00001ba3,0x00060041,
10340x00000174,0x00001b8a,0x00001b93,0x00000173,
10350x00000173,0x0006003d,0x00000006,0x00001b8b,
10360x00001b8a,0x00000002,0x00000004,0x000200f9,
10370x00001af5,0x000200f8,0x00001af5,0x000700f5,
10380x00000006,0x000063d7,0x00001b8b,0x00001aec,
10390x000003bf,0x00001af4,0x00050041,0x0000099d,
10400x00001af7,0x0000098a,0x000063c7,0x0003003e,
10410x00001af7,0x000063d7,0x000300f7,0x00001b05,
10420x00000000,0x000400fa,0x00001aeb,0x00001afc,
10430x00001b04,0x000200f8,0x00001b04,0x000200f9,
10440x00001b05,0x000200f8,0x00001afc,0x00050084,
10450x00000006,0x00001ba8,0x000000f3,0x00001ad6,
10460x00050080,0x00000006,0x00001ba9,0x000001cc,
10470x00001ba8,0x00050084,0x00000006,0x00001aff,
10480x000000f3,0x000063c7,0x00050080,0x00000006,
10490x00001b00,0x00001ba9,0x00001aff,0x00050041,
10500x0000026e,0x00001b01,0x000001c1,0x0000026c,
10510x0004003d,0x00000007,0x00001b02,0x00001b01,
10520x00050051,0x00000006,0x00001bc0,0x00001b02,
10530x00000000,0x00050095,0x00000145,0x00001bc2,
10540x00001bc0,0x00001b00,0x00050051,0x00000006,
10550x00001bc3,0x00001bc2,0x00000001,0x00050051,
10560x00000006,0x00001bc4,0x00001bc2,0x00000000,
10570x00050051,0x00000006,0x00001bc7,0x00001b02,
10580x00000001,0x00050080,0x00000006,0x00001bc9,
10590x00001bc7,0x00001bc3,0x00050050,0x00000007,
10600x00001bca,0x00001bc4,0x00001bc9,0x0004007c,
10610x00000014,0x00001bba,0x00001bca,0x00060041,
10620x00000174,0x00001bb1,0x00001bba,0x00000173,
10630x00000173,0x0006003d,0x00000006,0x00001bb2,
10640x00001bb1,0x00000002,0x00000004,0x000200f9,
10650x00001b05,0x000200f8,0x00001b05,0x000700f5,
10660x00000006,0x000063d9,0x00001bb2,0x00001afc,
10670x000003bf,0x00001b04,0x00050041,0x0000099d,
10680x00001b07,0x0000099f,0x000063c7,0x0003003e,
10690x00001b07,0x000063d9,0x000200f9,0x00001b08,
10700x000200f8,0x00001b08,0x00050080,0x00000006,
10710x00001b0a,0x000063c7,0x000001cc,0x000200f9,
10720x00001ae2,0x000200f8,0x00001b0b,0x000400e0,
10730x00000288,0x00000288,0x000009b5,0x000200f9,
10740x00001b0c,0x000200f8,0x00001b0c,0x000700f5,
10750x00000006,0x000063c9,0x00000288,0x00001b0b,
10760x00001b60,0x00001b5e,0x000500b2,0x0000002f,
10770x00001b10,0x000063c9,0x000063c6,0x000400f6,
10780x00001b61,0x00001b5e,0x00000000,0x000400fa,
10790x00001b10,0x00001b11,0x00001b61,0x000200f8,
10800x00001b11,0x000500c2,0x00000006,0x00001b13,
10810x000063c9,0x0000026c,0x000200f9,0x00001b14,
10820x000200f8,0x00001b14,0x000700f5,0x00000006,
10830x000063cc,0x00001b13,0x00001b11,0x00001b5c,
10840x00001b5a,0x000500ac,0x0000002f,0x00001b17,
10850x000063cc,0x00000140,0x000400f6,0x00001b5d,
10860x00001b5a,0x00000000,0x000400fa,0x00001b17,
10870x00001b18,0x00001b5d,0x000200f8,0x00001b18,
10880x000200f9,0x00001b1a,0x000200f8,0x00001b1a,
10890x000700f5,0x00000006,0x000063ce,0x00001406,
10900x00001b18,0x00001b58,0x00001b56,0x000500b0,
10910x0000002f,0x00001b1e,0x000063ce,0x000063c6,
10920x000400f6,0x00001b59,0x00001b56,0x00000000,
10930x000400fa,0x00001b1e,0x00001b1f,0x00001b59,
10940x000200f8,0x00001b1f,0x000500c6,0x00000006,
10950x00001b22,0x000063ce,0x000063cc,0x000500ac,
10960x0000002f,0x00001b25,0x00001b22,0x000063ce,
10970x000300f7,0x00001b55,0x00000000,0x000400fa,
10980x00001b25,0x00001b26,0x00001b55,0x000200f8,
10990x00001b26,0x00050041,0x0000099d,0x00001b28,
11000x0000098a,0x000063ce,0x0004003d,0x00000006,
11010x00001b29,0x00001b28,0x00050041,0x0000099d,
11020x00001b2b,0x0000098a,0x00001b22,0x0004003d,
11030x00000006,0x00001b2c,0x00001b2b,0x00050041,
11040x0000099d,0x00001b2e,0x0000099f,0x000063ce,
11050x0004003d,0x00000006,0x00001b2f,0x00001b2e,
11060x00050041,0x0000099d,0x00001b31,0x0000099f,
11070x00001b22,0x0004003d,0x00000006,0x00001b32,
11080x00001b31,0x000500ac,0x0000002f,0x00001b35,
11090x00001b29,0x00001b2c,0x000400a8,0x0000002f,
11100x00001b36,0x00001b35,0x000300f7,0x00001b3f,
11110x00000000,0x000400fa,0x00001b36,0x00001b37,
11120x00001b3f,0x000200f8,0x00001b37,0x000500aa,
11130x0000002f,0x00001b3a,0x00001b29,0x00001b2c,
11140x000500ac,0x0000002f,0x00001b3d,0x00001b2f,
11150x00001b32,0x000500a7,0x0000002f,0x00001b3e,
11160x00001b3a,0x00001b3d,0x000200f9,0x00001b3f,
11170x000200f8,0x00001b3f,0x000700f5,0x0000002f,
11180x00001b40,0x00001b35,0x00001b26,0x00001b3e,
11190x00001b37,0x000500c7,0x00000006,0x00001b44,
11200x000063ce,0x000063c9,0x000500aa,0x0000002f,
11210x00001b45,0x00001b44,0x00000140,0x000500a4,
11220x0000002f,0x00001b46,0x00001b40,0x00001b45,
11230x000300f7,0x00001b54,0x00000000,0x000400fa,
11240x00001b46,0x00001b47,0x00001b54,0x000200f8,
11250x00001b47,0x0003003e,0x00001b28,0x00001b2c,
11260x0003003e,0x00001b2b,0x00001b29,0x0003003e,
11270x00001b2e,0x00001b32,0x0003003e,0x00001b31,
11280x00001b2f,0x000200f9,0x00001b54,0x000200f8,
11290x00001b54,0x000200f9,0x00001b55,0x000200f8,
11300x00001b55,0x000200f9,0x00001b56,0x000200f8,
11310x00001b56,0x00050080,0x00000006,0x00001b58,
11320x000063ce,0x000001cc,0x000200f9,0x00001b1a,
11330x000200f8,0x00001b59,0x000400e0,0x00000288,
11340x00000288,0x000009b5,0x000200f9,0x00001b5a,
11350x000200f8,0x00001b5a,0x000500c2,0x00000006,
11360x00001b5c,0x000063cc,0x0000026c,0x000200f9,
11370x00001b14,0x000200f8,0x00001b5d,0x000200f9,
11380x00001b5e,0x000200f8,0x00001b5e,0x000500c4,
11390x00000006,0x00001b60,0x000063c9,0x0000026c,
11400x000200f9,0x00001b0c,0x000200f8,0x00001b61,
11410x000200f9,0x00001b63,0x000200f8,0x00001b63,
11420x000700f5,0x00000006,0x000063cb,0x00001406,
11430x00001b61,0x00001b7f,0x00001b68,0x000500b0,
11440x0000002f,0x00001b67,0x000063cb,0x00001ad6,
11450x000400f6,0x00001b80,0x00001b68,0x00000000,
11460x000400fa,0x00001b67,0x00001b68,0x00001b80,
11470x000200f8,0x00001b68,0x00050084,0x00000006,
11480x00001b6b,0x000000f3,0x000063cb,0x00050080,
11490x00000006,0x00001b6c,0x000001cc,0x00001b6b,
11500x00050041,0x0000026e,0x00001b6e,0x000001c1,
11510x0000026c,0x0004003d,0x00000007,0x00001b6f,
11520x00001b6e,0x00050041,0x0000099d,0x00001b70,
11530x0000098a,0x000063cb,0x0004003d,0x00000006,
11540x00001b71,0x00001b70,0x00050051,0x00000006,
11550x00001be2,0x00001b6f,0x00000000,0x00050095,
11560x00000145,0x00001be4,0x00001be2,0x00001b6c,
11570x00050051,0x00000006,0x00001be5,0x00001be4,
11580x00000001,0x00050051,0x00000006,0x00001be6,
11590x00001be4,0x00000000,0x00050051,0x00000006,
11600x00001be9,0x00001b6f,0x00000001,0x00050080,
11610x00000006,0x00001beb,0x00001be9,0x00001be5,
11620x00050050,0x00000007,0x00001bec,0x00001be6,
11630x00001beb,0x0004007c,0x00000014,0x00001bdc,
11640x00001bec,0x00060041,0x00000174,0x00001bd4,
11650x00001bdc,0x00000173,0x00000173,0x0005003e,
11660x00001bd4,0x00001b71,0x00000002,0x00000004,
11670x00050084,0x00000006,0x00001bf1,0x000000f3,
11680x00001ad6,0x00050080,0x00000006,0x00001bf2,
11690x000001cc,0x00001bf1,0x00050080,0x00000006,
11700x00001b76,0x00001bf2,0x00001b6b,0x00050041,
11710x0000099d,0x00001b7a,0x0000099f,0x000063cb,
11720x0004003d,0x00000006,0x00001b7b,0x00001b7a,
11730x00050095,0x00000145,0x00001c0a,0x00001be2,
11740x00001b76,0x00050051,0x00000006,0x00001c0b,
11750x00001c0a,0x00000001,0x00050051,0x00000006,
11760x00001c0c,0x00001c0a,0x00000000,0x00050080,
11770x00000006,0x00001c11,0x00001be9,0x00001c0b,
11780x00050050,0x00000007,0x00001c12,0x00001c0c,
11790x00001c11,0x0004007c,0x00000014,0x00001c02,
11800x00001c12,0x00060041,0x00000174,0x00001bfa,
11810x00001c02,0x00000173,0x00000173,0x0005003e,
11820x00001bfa,0x00001b7b,0x00000002,0x00000004,
11830x00050080,0x00000006,0x00001b7f,0x000063cb,
11840x000001cc,0x000200f9,0x00001b63,0x000200f8,
11850x00001b80,0x000200f9,0x000014ef,0x000200f8,
11860x00001403,0x000500aa,0x0000002f,0x0000140c,
11870x000013be,0x0000140b,0x000300f7,0x0000140e,
11880x00000000,0x000400fa,0x0000140c,0x0000140d,
11890x0000140e,0x000200f8,0x0000140d,0x00050041,
11900x000013a5,0x00001410,0x000013d5,0x00000140,
11910x0004003d,0x00000006,0x00001411,0x00001410,
11920x00050041,0x000013a5,0x00001413,0x000013d6,
11930x00000140,0x0004003d,0x00000006,0x00001414,
11940x00001413,0x000500aa,0x0000002f,0x00001c26,
11950x00001414,0x00000140,0x000300f7,0x00001c28,
11960x00000000,0x000400fa,0x00001c26,0x00001c27,
11970x00001c28,0x000200f8,0x00001c27,0x0003003e,
11980x00000ed4,0x00000140,0x000200f9,0x00001c28,
11990x000200f8,0x00001c28,0x000400e0,0x00000288,
12000x00000288,0x000009b5,0x00050084,0x00000006,
12010x00001c2a,0x00001411,0x000001c6,0x00050080,
12020x00000006,0x00001c2c,0x00001c2a,0x000001c6,
12030x00050041,0x000001c3,0x00001c78,0x000001c1,
12040x000001f8,0x0004003d,0x00000006,0x00001c79,
12050x00001c78,0x000500ac,0x0000002f,0x00001c7a,
12060x00001c79,0x0000014a,0x000300f7,0x00001c80,
12070x00000000,0x000400fa,0x00001c7a,0x00001c7b,
12080x00001c7f,0x000200f8,0x00001c7f,0x000200f9,
12090x00001c80,0x000200f8,0x00001c7b,0x00050082,
12100x00000006,0x00001c7e,0x00001c79,0x0000014a,
12110x000200f9,0x00001c80,0x000200f8,0x00001c80,
12120x000700f5,0x00000006,0x000063a8,0x00001c7e,
12130x00001c7b,0x00000140,0x00001c7f,0x0007000c,
12140x00000006,0x00001c2e,0x00000001,0x00000026,
12150x00001c2c,0x000063a8,0x00050080,0x00000006,
12160x00001c31,0x00001c2a,0x00001414,0x000200f9,
12170x00001c32,0x000200f8,0x00001c32,0x000700f5,
12180x00000006,0x000063a9,0x00001c31,0x00001c80,
12190x00001c67,0x00001c65,0x000500b0,0x0000002f,
12200x00001c36,0x000063a9,0x00001c2e,0x000400f6,
12210x00001c68,0x00001c65,0x00000000,0x000400fa,
12220x00001c36,0x00001c37,0x00001c68,0x000200f8,
12230x00001c37,0x00050041,0x000001c3,0x00001caa,
12240x000001c1,0x000001c2,0x0004003d,0x00000006,
12250x00001cab,0x00001caa,0x00050084,0x00000006,
12260x00001cac,0x000001e3,0x00001cab,0x00050080,
12270x00000006,0x00001cad,0x000001cc,0x00001cac,
12280x00050080,0x00000006,0x00001cb3,0x00001cab,
12290x00000695,0x00050086,0x00000006,0x00001cb4,
12300x00001cb3,0x000001c6,0x00050084,0x00000006,
12310x00001ca6,0x000001cc,0x00001cb4,0x00050080,
12320x00000006,0x00001ca7,0x00001cad,0x00001ca6,
12330x00050080,0x00000006,0x00001ca1,0x00001ca7,
12340x00001ca6,0x00050084,0x00000006,0x00001c9a,
12350x000001f7,0x00001c79,0x00050080,0x00000006,
12360x00001c9b,0x00001ca1,0x00001c9a,0x00050041,
12370x000001c3,0x00001c91,0x000001c1,0x0000020e,
12380x0004003d,0x00000006,0x00001c92,0x00001c91,
12390x00050084,0x00000006,0x00001c93,0x0000020d,
12400x00001c92,0x00050080,0x00000006,0x00001c94,
12410x00001c9b,0x00001c93,0x000300f7,0x00001cc7,
12420x00000000,0x000400fa,0x00001c7a,0x00001cc2,
12430x00001cc6,0x000200f8,0x00001cc6,0x000200f9,
12440x00001cc7,0x000200f8,0x00001cc2,0x00050082,
12450x00000006,0x00001cc5,0x00001c79,0x0000014a,
12460x000200f9,0x00001cc7,0x000200f8,0x00001cc7,
12470x000700f5,0x00000006,0x000063af,0x00001cc5,
12480x00001cc2,0x00000140,0x00001cc6,0x00050084,
12490x00000006,0x00001c8c,0x000000f3,0x000063af,
12500x00050080,0x00000006,0x00001c8d,0x00001c94,
12510x00001c8c,0x000300f7,0x00001cd4,0x00000000,
12520x000400fa,0x00001c7a,0x00001ccf,0x00001cd3,
12530x000200f8,0x00001cd3,0x000200f9,0x00001cd4,
12540x000200f8,0x00001ccf,0x00050082,0x00000006,
12550x00001cd2,0x00001c79,0x0000014a,0x000200f9,
12560x00001cd4,0x000200f8,0x00001cd4,0x000700f5,
12570x00000006,0x000063b0,0x00001cd2,0x00001ccf,
12580x00000140,0x00001cd3,0x00050084,0x00000006,
12590x00001c86,0x000000f3,0x000063b0,0x00050080,
12600x00000006,0x00001c87,0x00001c8d,0x00001c86,
12610x00050084,0x00000006,0x00001c3a,0x000000f3,
12620x000063a9,0x00050080,0x00000006,0x00001c3b,
12630x00001c87,0x00001c3a,0x00050041,0x0000026e,
12640x00001c3c,0x000001c1,0x0000026c,0x0004003d,
12650x00000007,0x00001c3d,0x00001c3c,0x00050051,
12660x00000006,0x00001cec,0x00001c3d,0x00000000,
12670x00050095,0x00000145,0x00001cee,0x00001cec,
12680x00001c3b,0x00050051,0x00000006,0x00001cef,
12690x00001cee,0x00000001,0x00050051,0x00000006,
12700x00001cf0,0x00001cee,0x00000000,0x00050051,
12710x00000006,0x00001cf3,0x00001c3d,0x00000001,
12720x00050080,0x00000006,0x00001cf5,0x00001cf3,
12730x00001cef,0x00050050,0x00000007,0x00001cf6,
12740x00001cf0,0x00001cf5,0x0004007c,0x00000014,
12750x00001ce6,0x00001cf6,0x00060041,0x00000174,
12760x00001cdd,0x00001ce6,0x00000173,0x00000173,
12770x0006003d,0x00000006,0x00001cde,0x00001cdd,
12780x00000002,0x00000004,0x000200f9,0x00001c3f,
12790x000200f8,0x00001c3f,0x000700f5,0x00000006,
12800x000063b5,0x00000140,0x00001cd4,0x00001c48,
12810x00001c50,0x000700f5,0x00000006,0x000063b4,
12820x00000140,0x00001cd4,0x00001c52,0x00001c50,
12830x000700f5,0x00000006,0x000063b3,0x00001cde,
12840x00001cd4,0x00001d53,0x00001c50,0x000500ab,
12850x0000002f,0x00001c42,0x000063b3,0x000003bf,
12860x000500b0,0x0000002f,0x00001c44,0x000063b4,
12870x0000034a,0x000500a7,0x0000002f,0x00001c45,
12880x00001c42,0x00001c44,0x000400f6,0x00001c53,
12890x00001c50,0x00000000,0x000400fa,0x00001c45,
12900x00001c46,0x00001c53,0x000200f8,0x00001c46,
12910x00050080,0x00000006,0x00001c48,0x000063b5,
12920x0000026c,0x000300f7,0x00001d3c,0x00000000,
12930x000400fa,0x00001c7a,0x00001d37,0x00001d3b,
12940x000200f8,0x00001d3b,0x000200f9,0x00001d3c,
12950x000200f8,0x00001d37,0x00050082,0x00000006,
12960x00001d3a,0x00001c79,0x0000014a,0x000200f9,
12970x00001d3c,0x000200f8,0x00001d3c,0x000700f5,
12980x00000006,0x000063c0,0x00001d3a,0x00001d37,
12990x00000140,0x00001d3b,0x00050084,0x00000006,
13000x00001d01,0x000000f3,0x000063c0,0x00050080,
13010x00000006,0x00001d02,0x00001c94,0x00001d01,
13020x000300f7,0x00001d49,0x00000000,0x000400fa,
13030x00001c7a,0x00001d44,0x00001d48,0x000200f8,
13040x00001d48,0x000200f9,0x00001d49,0x000200f8,
13050x00001d44,0x00050082,0x00000006,0x00001d47,
13060x00001c79,0x0000014a,0x000200f9,0x00001d49,
13070x000200f8,0x00001d49,0x000700f5,0x00000006,
13080x000063c1,0x00001d47,0x00001d44,0x00000140,
13090x00001d48,0x00050084,0x00000006,0x00001cfb,
13100x000000f3,0x000063c1,0x00050080,0x00000006,
13110x00001cfc,0x00001d02,0x00001cfb,0x00050084,
13120x00000006,0x00001c4b,0x000000f3,0x000063b3,
13130x00050080,0x00000006,0x00001c4c,0x00001cfc,
13140x00001c4b,0x00050095,0x00000145,0x00001d63,
13150x00001cec,0x00001c4c,0x00050051,0x00000006,
13160x00001d64,0x00001d63,0x00000001,0x00050051,
13170x00000006,0x00001d65,0x00001d63,0x00000000,
13180x00050080,0x00000006,0x00001d6a,0x00001cf3,
13190x00001d64,0x00050050,0x00000007,0x00001d6b,
13200x00001d65,0x00001d6a,0x0004007c,0x00000014,
13210x00001d5b,0x00001d6b,0x00060041,0x00000174,
13220x00001d52,0x00001d5b,0x00000173,0x00000173,
13230x0006003d,0x00000006,0x00001d53,0x00001d52,
13240x00000002,0x00000004,0x000200f9,0x00001c50,
13250x000200f8,0x00001c50,0x00050080,0x00000006,
13260x00001c52,0x000063b4,0x0000026c,0x000200f9,
13270x00001c3f,0x000200f8,0x00001c53,0x000500c7,
13280x00000006,0x00001c55,0x000063b5,0x0000014a,
13290x000500aa,0x0000002f,0x00001c56,0x00001c55,
13300x00000140,0x000600a9,0x00000006,0x00001c57,
13310x00001c56,0x0000014a,0x00000140,0x000300f7,
13320x00001db7,0x00000000,0x000400fa,0x00001c7a,
13330x00001db2,0x00001db6,0x000200f8,0x00001db6,
13340x000200f9,0x00001db7,0x000200f8,0x00001db2,
13350x00050082,0x00000006,0x00001db5,0x00001c79,
13360x0000014a,0x000200f9,0x00001db7,0x000200f8,
13370x00001db7,0x000700f5,0x00000006,0x000063b8,
13380x00001db5,0x00001db2,0x00000140,0x00001db6,
13390x00050084,0x00000006,0x00001d7c,0x000000f3,
13400x000063b8,0x00050080,0x00000006,0x00001d7d,
13410x00001c94,0x00001d7c,0x000300f7,0x00001dc4,
13420x00000000,0x000400fa,0x00001c7a,0x00001dbf,
13430x00001dc3,0x000200f8,0x00001dc3,0x000200f9,
13440x00001dc4,0x000200f8,0x00001dbf,0x00050082,
13450x00000006,0x00001dc2,0x00001c79,0x0000014a,
13460x000200f9,0x00001dc4,0x000200f8,0x00001dc4,
13470x000700f5,0x00000006,0x000063b9,0x00001dc2,
13480x00001dbf,0x00000140,0x00001dc3,0x00050084,
13490x00000006,0x00001d76,0x000000f3,0x000063b9,
13500x00050080,0x00000006,0x00001d77,0x00001d7d,
13510x00001d76,0x000300f7,0x00001dd1,0x00000000,
13520x000400fa,0x00001c7a,0x00001dcc,0x00001dd0,
13530x000200f8,0x00001dd0,0x000200f9,0x00001dd1,
13540x000200f8,0x00001dcc,0x00050082,0x00000006,
13550x00001dcf,0x00001c79,0x0000014a,0x000200f9,
13560x00001dd1,0x000200f8,0x00001dd1,0x000700f5,
13570x00000006,0x000063ba,0x00001dcf,0x00001dcc,
13580x00000140,0x00001dd0,0x00050084,0x00000006,
13590x00001d70,0x000000f3,0x000063ba,0x00050080,
13600x00000006,0x00001d71,0x00001d77,0x00001d70,
13610x00050080,0x00000006,0x00001c5b,0x00001d71,
13620x00001c3a,0x00050095,0x00000145,0x00001dea,
13630x00001cec,0x00001c5b,0x00050051,0x00000006,
13640x00001deb,0x00001dea,0x00000001,0x00050051,
13650x00000006,0x00001dec,0x00001dea,0x00000000,
13660x00050080,0x00000006,0x00001df1,0x00001cf3,
13670x00001deb,0x00050050,0x00000007,0x00001df2,
13680x00001dec,0x00001df1,0x0004007c,0x00000014,
13690x00001de2,0x00001df2,0x00060041,0x00000174,
13700x00001dda,0x00001de2,0x00000173,0x00000173,
13710x0005003e,0x00001dda,0x00001c57,0x00000002,
13720x00000004,0x000300f7,0x00001c64,0x00000000,
13730x000400fa,0x00001c56,0x00001c62,0x00001c64,
13740x000200f8,0x00001c62,0x000700ea,0x00000006,
13750x00001c63,0x00000ed4,0x0000014a,0x00000140,
13760x0000014a,0x000200f9,0x00001c64,0x000200f8,
13770x00001c64,0x000200f9,0x00001c65,0x000200f8,
13780x00001c65,0x00050080,0x00000006,0x00001c67,
13790x000063a9,0x000001cc,0x000200f9,0x00001c32,
13800x000200f8,0x00001c68,0x000400e0,0x00000288,
13810x00000288,0x000009b5,0x000300f7,0x00001c74,
13820x00000000,0x000400fa,0x00001c26,0x00001c6b,
13830x00001c74,0x000200f8,0x00001c6b,0x00050041,
13840x000001c3,0x00001e2d,0x000001c1,0x000001c2,
13850x0004003d,0x00000006,0x00001e2e,0x00001e2d,
13860x00050084,0x00000006,0x00001e2f,0x000001e3,
13870x00001e2e,0x00050080,0x00000006,0x00001e30,
13880x000001cc,0x00001e2f,0x00050080,0x00000006,
13890x00001e36,0x00001e2e,0x00000695,0x00050086,
13900x00000006,0x00001e37,0x00001e36,0x000001c6,
13910x00050084,0x00000006,0x00001e29,0x000001cc,
13920x00001e37,0x00050080,0x00000006,0x00001e2a,
13930x00001e30,0x00001e29,0x00050080,0x00000006,
13940x00001e24,0x00001e2a,0x00001e29,0x00050084,
13950x00000006,0x00001e1d,0x000001f7,0x00001c79,
13960x00050080,0x00000006,0x00001e1e,0x00001e24,
13970x00001e1d,0x00050041,0x000001c3,0x00001e14,
13980x000001c1,0x0000020e,0x0004003d,0x00000006,
13990x00001e15,0x00001e14,0x00050084,0x00000006,
14000x00001e16,0x0000020d,0x00001e15,0x00050080,
14010x00000006,0x00001e17,0x00001e1e,0x00001e16,
14020x000300f7,0x00001e4a,0x00000000,0x000400fa,
14030x00001c7a,0x00001e45,0x00001e49,0x000200f8,
14040x00001e49,0x000200f9,0x00001e4a,0x000200f8,
14050x00001e45,0x00050082,0x00000006,0x00001e48,
14060x00001c79,0x0000014a,0x000200f9,0x00001e4a,
14070x000200f8,0x00001e4a,0x000700f5,0x00000006,
14080x000063aa,0x00001e48,0x00001e45,0x00000140,
14090x00001e49,0x00050084,0x00000006,0x00001e0f,
14100x000000f3,0x000063aa,0x00050080,0x00000006,
14110x00001e10,0x00001e17,0x00001e0f,0x000300f7,
14120x00001e57,0x00000000,0x000400fa,0x00001c7a,
14130x00001e52,0x00001e56,0x000200f8,0x00001e56,
14140x000200f9,0x00001e57,0x000200f8,0x00001e52,
14150x00050082,0x00000006,0x00001e55,0x00001c79,
14160x0000014a,0x000200f9,0x00001e57,0x000200f8,
14170x00001e57,0x000700f5,0x00000006,0x000063ab,
14180x00001e55,0x00001e52,0x00000140,0x00001e56,
14190x00050084,0x00000006,0x00001e09,0x000000f3,
14200x000063ab,0x00050080,0x00000006,0x00001e0a,
14210x00001e10,0x00001e09,0x000300f7,0x00001e64,
14220x00000000,0x000400fa,0x00001c7a,0x00001e5f,
14230x00001e63,0x000200f8,0x00001e63,0x000200f9,
14240x00001e64,0x000200f8,0x00001e5f,0x00050082,
14250x00000006,0x00001e62,0x00001c79,0x0000014a,
14260x000200f9,0x00001e64,0x000200f8,0x00001e64,
14270x000700f5,0x00000006,0x000063ac,0x00001e62,
14280x00001e5f,0x00000140,0x00001e63,0x00050084,
14290x00000006,0x00001e03,0x000000f3,0x000063ac,
14300x00050080,0x00000006,0x00001e04,0x00001e0a,
14310x00001e03,0x000300f7,0x00001e71,0x00000000,
14320x000400fa,0x00001c7a,0x00001e6c,0x00001e70,
14330x000200f8,0x00001e70,0x000200f9,0x00001e71,
14340x000200f8,0x00001e6c,0x00050082,0x00000006,
14350x00001e6f,0x00001c79,0x0000014a,0x000200f9,
14360x00001e71,0x000200f8,0x00001e71,0x000700f5,
14370x00000006,0x000063ad,0x00001e6f,0x00001e6c,
14380x00000140,0x00001e70,0x00050084,0x00000006,
14390x00001dfd,0x000000f3,0x000063ad,0x00050080,
14400x00000006,0x00001dfe,0x00001e04,0x00001dfd,
14410x000300f7,0x00001e7e,0x00000000,0x000400fa,
14420x00001c7a,0x00001e79,0x00001e7d,0x000200f8,
14430x00001e7d,0x000200f9,0x00001e7e,0x000200f8,
14440x00001e79,0x00050082,0x00000006,0x00001e7c,
14450x00001c79,0x0000014a,0x000200f9,0x00001e7e,
14460x000200f8,0x00001e7e,0x000700f5,0x00000006,
14470x000063ae,0x00001e7c,0x00001e79,0x00000140,
14480x00001e7d,0x00050084,0x00000006,0x00001df7,
14490x000000f3,0x000063ae,0x00050080,0x00000006,
14500x00001df8,0x00001dfe,0x00001df7,0x00050084,
14510x00000006,0x00001c6e,0x000000f3,0x00001411,
14520x00050080,0x00000006,0x00001c6f,0x00001df8,
14530x00001c6e,0x00050041,0x0000026e,0x00001c70,
14540x000001c1,0x0000026c,0x0004003d,0x00000007,
14550x00001c71,0x00001c70,0x0004003d,0x00000006,
14560x00001c72,0x00000ed4,0x00050051,0x00000006,
14570x00001e95,0x00001c71,0x00000000,0x00050095,
14580x00000145,0x00001e97,0x00001e95,0x00001c6f,
14590x00050051,0x00000006,0x00001e98,0x00001e97,
14600x00000001,0x00050051,0x00000006,0x00001e99,
14610x00001e97,0x00000000,0x00050051,0x00000006,
14620x00001e9c,0x00001c71,0x00000001,0x00050080,
14630x00000006,0x00001e9e,0x00001e9c,0x00001e98,
14640x00050050,0x00000007,0x00001e9f,0x00001e99,
14650x00001e9e,0x0004007c,0x00000014,0x00001e8f,
14660x00001e9f,0x00060041,0x00000174,0x00001e87,
14670x00001e8f,0x00000173,0x00000173,0x0005003e,
14680x00001e87,0x00001c72,0x00000002,0x00000004,
14690x000200f9,0x00001c74,0x000200f8,0x00001c74,
14700x000200f9,0x000014ef,0x000200f8,0x0000140e,
14710x000500aa,0x0000002f,0x00001419,0x000013be,
14720x00000a74,0x000300f7,0x0000141b,0x00000000,
14730x000400fa,0x00001419,0x0000141a,0x0000141b,
14740x000200f8,0x0000141a,0x00050041,0x000001c3,
14750x00001eda,0x000001c1,0x000001c2,0x0004003d,
14760x00000006,0x00001edb,0x00001eda,0x00050084,
14770x00000006,0x00001edc,0x000001e3,0x00001edb,
14780x00050080,0x00000006,0x00001edd,0x000001cc,
14790x00001edc,0x00050080,0x00000006,0x00001ee3,
14800x00001edb,0x00000695,0x00050086,0x00000006,
14810x00001ee4,0x00001ee3,0x000001c6,0x00050084,
14820x00000006,0x00001ed6,0x000001cc,0x00001ee4,
14830x00050080,0x00000006,0x00001ed7,0x00001edd,
14840x00001ed6,0x00050080,0x00000006,0x00001ed1,
14850x00001ed7,0x00001ed6,0x00050041,0x000001c3,
14860x00001ec8,0x000001c1,0x000001f8,0x0004003d,
14870x00000006,0x00001ec9,0x00001ec8,0x00050084,
14880x00000006,0x00001eca,0x000001f7,0x00001ec9,
14890x00050080,0x00000006,0x00001ecb,0x00001ed1,
14900x00001eca,0x00050041,0x000001c3,0x00001ec1,
14910x000001c1,0x0000020e,0x0004003d,0x00000006,
14920x00001ec2,0x00001ec1,0x00050084,0x00000006,
14930x00001ec3,0x0000020d,0x00001ec2,0x00050080,
14940x00000006,0x00001ec4,0x00001ecb,0x00001ec3,
14950x000500ac,0x0000002f,0x00001ef1,0x00001ec9,
14960x0000014a,0x000300f7,0x00001ef7,0x00000000,
14970x000400fa,0x00001ef1,0x00001ef2,0x00001ef6,
14980x000200f8,0x00001ef6,0x000200f9,0x00001ef7,
14990x000200f8,0x00001ef2,0x00050082,0x00000006,
15000x00001ef5,0x00001ec9,0x0000014a,0x000200f9,
15010x00001ef7,0x000200f8,0x00001ef7,0x000700f5,
15020x00000006,0x00006396,0x00001ef5,0x00001ef2,
15030x00000140,0x00001ef6,0x00050084,0x00000006,
15040x00001ebc,0x000000f3,0x00006396,0x00050080,
15050x00000006,0x00001ebd,0x00001ec4,0x00001ebc,
15060x000300f7,0x00001f04,0x00000000,0x000400fa,
15070x00001ef1,0x00001eff,0x00001f03,0x000200f8,
15080x00001f03,0x000200f9,0x00001f04,0x000200f8,
15090x00001eff,0x00050082,0x00000006,0x00001f02,
15100x00001ec9,0x0000014a,0x000200f9,0x00001f04,
15110x000200f8,0x00001f04,0x000700f5,0x00000006,
15120x00006397,0x00001f02,0x00001eff,0x00000140,
15130x00001f03,0x00050084,0x00000006,0x00001eb6,
15140x000000f3,0x00006397,0x00050080,0x00000006,
15150x00001eb7,0x00001ebd,0x00001eb6,0x000300f7,
15160x00001f11,0x00000000,0x000400fa,0x00001ef1,
15170x00001f0c,0x00001f10,0x000200f8,0x00001f10,
15180x000200f9,0x00001f11,0x000200f8,0x00001f0c,
15190x00050082,0x00000006,0x00001f0f,0x00001ec9,
15200x0000014a,0x000200f9,0x00001f11,0x000200f8,
15210x00001f11,0x000700f5,0x00000006,0x00006398,
15220x00001f0f,0x00001f0c,0x00000140,0x00001f10,
15230x00050084,0x00000006,0x00001eb0,0x000000f3,
15240x00006398,0x00050080,0x00000006,0x00001eb1,
15250x00001eb7,0x00001eb0,0x000300f7,0x00001f1e,
15260x00000000,0x000400fa,0x00001ef1,0x00001f19,
15270x00001f1d,0x000200f8,0x00001f1d,0x000200f9,
15280x00001f1e,0x000200f8,0x00001f19,0x00050082,
15290x00000006,0x00001f1c,0x00001ec9,0x0000014a,
15300x000200f9,0x00001f1e,0x000200f8,0x00001f1e,
15310x000700f5,0x00000006,0x00006399,0x00001f1c,
15320x00001f19,0x00000140,0x00001f1d,0x00050084,
15330x00000006,0x00001eaa,0x000000f3,0x00006399,
15340x00050080,0x00000006,0x00001eab,0x00001eb1,
15350x00001eaa,0x000300f7,0x00001f2b,0x00000000,
15360x000400fa,0x00001ef1,0x00001f26,0x00001f2a,
15370x000200f8,0x00001f2a,0x000200f9,0x00001f2b,
15380x000200f8,0x00001f26,0x00050082,0x00000006,
15390x00001f29,0x00001ec9,0x0000014a,0x000200f9,
15400x00001f2b,0x000200f8,0x00001f2b,0x000700f5,
15410x00000006,0x0000639a,0x00001f29,0x00001f26,
15420x00000140,0x00001f2a,0x00050084,0x00000006,
15430x00001ea4,0x000000f3,0x0000639a,0x00050080,
15440x00000006,0x00001ea5,0x00001eab,0x00001ea4,
15450x000300f7,0x00001f8a,0x00000000,0x000400fa,
15460x00001ef1,0x00001f85,0x00001f89,0x000200f8,
15470x00001f89,0x000200f9,0x00001f8a,0x000200f8,
15480x00001f85,0x00050082,0x00000006,0x00001f88,
15490x00001ec9,0x0000014a,0x000200f9,0x00001f8a,
15500x000200f8,0x00001f8a,0x000700f5,0x00000006,
15510x0000639b,0x00001f88,0x00001f85,0x00000140,
15520x00001f89,0x00050084,0x00000006,0x00001f4f,
15530x000000f3,0x0000639b,0x00050080,0x00000006,
15540x00001f50,0x00001ec4,0x00001f4f,0x000300f7,
15550x00001f97,0x00000000,0x000400fa,0x00001ef1,
15560x00001f92,0x00001f96,0x000200f8,0x00001f96,
15570x000200f9,0x00001f97,0x000200f8,0x00001f92,
15580x00050082,0x00000006,0x00001f95,0x00001ec9,
15590x0000014a,0x000200f9,0x00001f97,0x000200f8,
15600x00001f97,0x000700f5,0x00000006,0x0000639c,
15610x00001f95,0x00001f92,0x00000140,0x00001f96,
15620x00050084,0x00000006,0x00001f49,0x000000f3,
15630x0000639c,0x00050080,0x00000006,0x00001f4a,
15640x00001f50,0x00001f49,0x000300f7,0x00001fa4,
15650x00000000,0x000400fa,0x00001ef1,0x00001f9f,
15660x00001fa3,0x000200f8,0x00001fa3,0x000200f9,
15670x00001fa4,0x000200f8,0x00001f9f,0x00050082,
15680x00000006,0x00001fa2,0x00001ec9,0x0000014a,
15690x000200f9,0x00001fa4,0x000200f8,0x00001fa4,
15700x000700f5,0x00000006,0x0000639d,0x00001fa2,
15710x00001f9f,0x00000140,0x00001fa3,0x00050084,
15720x00000006,0x00001f43,0x000000f3,0x0000639d,
15730x00050080,0x00000006,0x00001f44,0x00001f4a,
15740x00001f43,0x000300f7,0x00001fb1,0x00000000,
15750x000400fa,0x00001ef1,0x00001fac,0x00001fb0,
15760x000200f8,0x00001fb0,0x000200f9,0x00001fb1,
15770x000200f8,0x00001fac,0x00050082,0x00000006,
15780x00001faf,0x00001ec9,0x0000014a,0x000200f9,
15790x00001fb1,0x000200f8,0x00001fb1,0x000700f5,
15800x00000006,0x0000639e,0x00001faf,0x00001fac,
15810x00000140,0x00001fb0,0x00050084,0x00000006,
15820x00001f3d,0x000000f3,0x0000639e,0x00050080,
15830x00000006,0x00001f3e,0x00001f44,0x00001f3d,
15840x000300f7,0x00001fbe,0x00000000,0x000400fa,
15850x00001ef1,0x00001fb9,0x00001fbd,0x000200f8,
15860x00001fbd,0x000200f9,0x00001fbe,0x000200f8,
15870x00001fb9,0x00050082,0x00000006,0x00001fbc,
15880x00001ec9,0x0000014a,0x000200f9,0x00001fbe,
15890x000200f8,0x00001fbe,0x000700f5,0x00000006,
15900x0000639f,0x00001fbc,0x00001fb9,0x00000140,
15910x00001fbd,0x00050084,0x00000006,0x00001f37,
15920x000000f3,0x0000639f,0x00050080,0x00000006,
15930x00001f38,0x00001f3e,0x00001f37,0x000300f7,
15940x00001fd1,0x00000000,0x000400fa,0x00001ef1,
15950x00001fcc,0x00001fd0,0x000200f8,0x00001fd0,
15960x000200f9,0x00001fd1,0x000200f8,0x00001fcc,
15970x00050082,0x00000006,0x00001fcf,0x00001ec9,
15980x0000014a,0x000200f9,0x00001fd1,0x000200f8,
15990x00001fd1,0x000700f5,0x00000006,0x000063a0,
16000x00001fcf,0x00001fcc,0x00000140,0x00001fd0,
16010x00050080,0x00000006,0x00001fc4,0x000063a0,
16020x00000695,0x00050086,0x00000006,0x00001fc5,
16030x00001fc4,0x000001c6,0x00050084,0x00000006,
16040x00001f31,0x000000f3,0x00001fc5,0x00050080,
16050x00000006,0x00001f32,0x00001f38,0x00001f31,
16060x000300f7,0x00001fe4,0x00000000,0x000400fa,
16070x00001ef1,0x00001fdf,0x00001fe3,0x000200f8,
16080x00001fe3,0x000200f9,0x00001fe4,0x000200f8,
16090x00001fdf,0x00050082,0x00000006,0x00001fe2,
16100x00001ec9,0x0000014a,0x000200f9,0x00001fe4,
16110x000200f8,0x00001fe4,0x000700f5,0x00000006,
16120x000063a1,0x00001fe2,0x00001fdf,0x00000140,
16130x00001fe3,0x00050080,0x00000006,0x00001fd7,
16140x000063a1,0x00000695,0x00050086,0x00000006,
16150x00001fd8,0x00001fd7,0x000001c6,0x00050041,
16160x000013a5,0x00001420,0x000013d6,0x00000140,
16170x0004003d,0x00000006,0x00001421,0x00001420,
16180x00050080,0x00000006,0x00001ffd,0x00001fd8,
16190x00000abc,0x00050086,0x00000006,0x00001ffe,
16200x00001ffd,0x000001cc,0x00050084,0x00000006,
16210x00002001,0x00001421,0x00001ffe,0x0007000c,
16220x00000006,0x00002003,0x00000001,0x00000026,
16230x00002001,0x00001fd8,0x00050080,0x00000006,
16240x00002006,0x00002003,0x00001ffe,0x0007000c,
16250x00000006,0x00002008,0x00000001,0x00000026,
16260x00002006,0x00001fd8,0x000200f9,0x0000200a,
16270x000200f8,0x0000200a,0x000700f5,0x00000006,
16280x000063a3,0x00000140,0x00001fe4,0x00002018,
16290x0000200f,0x000700f5,0x00000006,0x000063a2,
16300x00002003,0x00001fe4,0x0000201b,0x0000200f,
16310x000500b0,0x0000002f,0x0000200e,0x000063a2,
16320x00002008,0x000400f6,0x0000201c,0x0000200f,
16330x00000000,0x000400fa,0x0000200e,0x0000200f,
16340x0000201c,0x000200f8,0x0000200f,0x00050084,
16350x00000006,0x00002012,0x000000f3,0x000063a2,
16360x00050080,0x00000006,0x00002013,0x00001ea5,
16370x00002012,0x00050041,0x0000026e,0x00002014,
16380x000001c1,0x0000026c,0x0004003d,0x00000007,
16390x00002015,0x00002014,0x00050051,0x00000006,
16400x00002075,0x00002015,0x00000000,0x00050095,
16410x00000145,0x00002077,0x00002075,0x00002013,
16420x00050051,0x00000006,0x00002078,0x00002077,
16430x00000001,0x00050051,0x00000006,0x00002079,
16440x00002077,0x00000000,0x00050051,0x00000006,
16450x0000207c,0x00002015,0x00000001,0x00050080,
16460x00000006,0x0000207e,0x0000207c,0x00002078,
16470x00050050,0x00000007,0x0000207f,0x00002079,
16480x0000207e,0x0004007c,0x00000014,0x0000206f,
16490x0000207f,0x00060041,0x00000174,0x00002066,
16500x0000206f,0x00000173,0x00000173,0x0006003d,
16510x00000006,0x00002067,0x00002066,0x00000002,
16520x00000004,0x00050080,0x00000006,0x00002018,
16530x000063a3,0x00002067,0x00050080,0x00000006,
16540x0000201b,0x000063a2,0x0000026c,0x000200f9,
16550x0000200a,0x000200f8,0x0000201c,0x00050041,
16560x0000099d,0x0000201f,0x00000ae5,0x00001421,
16570x0003003e,0x0000201f,0x000063a3,0x000400e0,
16580x00000288,0x00000288,0x000009b5,0x000500aa,
16590x0000002f,0x00002021,0x00001421,0x00000140,
16600x000300f7,0x0000203e,0x00000000,0x000400fa,
16610x00002021,0x00002022,0x0000203e,0x000200f8,
16620x00002022,0x000200f9,0x00002023,0x000200f8,
16630x00002023,0x000700f5,0x00000006,0x000063a5,
16640x00000140,0x00002022,0x00002030,0x00002027,
16650x000700f5,0x00000006,0x000063a4,0x00000140,
16660x00002022,0x00002033,0x00002027,0x000500b0,
16670x0000002f,0x00002026,0x000063a4,0x000001cc,
16680x000400f6,0x00002034,0x00002027,0x00000000,
16690x000400fa,0x00002026,0x00002027,0x00002034,
16700x000200f8,0x00002027,0x00050041,0x0000099d,
16710x00002029,0x00000ae5,0x000063a4,0x0004003d,
16720x00000006,0x0000202a,0x00002029,0x0003003e,
16730x00002029,0x000063a5,0x00050080,0x00000006,
16740x00002030,0x000063a5,0x0000202a,0x00050080,
16750x00000006,0x00002033,0x000063a4,0x0000026c,
16760x000200f9,0x00002023,0x000200f8,0x00002034,
16770x00050041,0x0000026e,0x00002038,0x000001c1,
16780x0000026c,0x0004003d,0x00000007,0x00002039,
16790x00002038,0x00050051,0x00000006,0x00002095,
16800x00002039,0x00000000,0x00050095,0x00000145,
16810x00002097,0x00002095,0x000001f7,0x00050051,
16820x00000006,0x00002098,0x00002097,0x00000001,
16830x00050051,0x00000006,0x00002099,0x00002097,
16840x00000000,0x00050051,0x00000006,0x0000209c,
16850x00002039,0x00000001,0x00050080,0x00000006,
16860x0000209e,0x0000209c,0x00002098,0x00050050,
16870x00000007,0x0000209f,0x00002099,0x0000209e,
16880x0004007c,0x00000014,0x0000208f,0x0000209f,
16890x00060041,0x00000174,0x00002087,0x0000208f,
16900x00000173,0x00000173,0x0005003e,0x00002087,
16910x000063a5,0x00000002,0x00000004,0x000200f9,
16920x0000203e,0x000200f8,0x0000203e,0x000400e0,
16930x00000288,0x00000288,0x000009b5,0x0004003d,
16940x00000006,0x00002041,0x0000201f,0x000200f9,
16950x00002043,0x000200f8,0x00002043,0x000700f5,
16960x00000006,0x000063a7,0x00002041,0x0000203e,
16970x0000205a,0x00002048,0x000700f5,0x00000006,
16980x000063a6,0x00002003,0x0000203e,0x0000205d,
16990x00002048,0x000500b0,0x0000002f,0x00002047,
17000x000063a6,0x00002008,0x000400f6,0x0000205e,
17010x00002048,0x00000000,0x000400fa,0x00002047,
17020x00002048,0x0000205e,0x000200f8,0x00002048,
17030x00050084,0x00000006,0x0000204b,0x000000f3,
17040x000063a6,0x00050080,0x00000006,0x0000204c,
17050x00001ea5,0x0000204b,0x00050041,0x0000026e,
17060x0000204d,0x000001c1,0x0000026c,0x0004003d,
17070x00000007,0x0000204e,0x0000204d,0x00050051,
17080x00000006,0x000020b6,0x0000204e,0x00000000,
17090x00050095,0x00000145,0x000020b8,0x000020b6,
17100x0000204c,0x00050051,0x00000006,0x000020b9,
17110x000020b8,0x00000001,0x00050051,0x00000006,
17120x000020ba,0x000020b8,0x00000000,0x00050051,
17130x00000006,0x000020bd,0x0000204e,0x00000001,
17140x00050080,0x00000006,0x000020bf,0x000020bd,
17150x000020b9,0x00050050,0x00000007,0x000020c0,
17160x000020ba,0x000020bf,0x0004007c,0x00000014,
17170x000020b0,0x000020c0,0x00060041,0x00000174,
17180x000020a7,0x000020b0,0x00000173,0x00000173,
17190x0006003d,0x00000006,0x000020a8,0x000020a7,
9570x00000002,0x00000004,0x00050080,0x00000006, 17200x00000002,0x00000004,0x00050080,0x00000006,
9580x000018ac,0x00005fa3,0x000001c4,0x000200f9, 17210x00002053,0x00001f32,0x0000204b,0x00050095,
9590x00001890,0x000200f8,0x000018ad,0x000200f9, 17220x00000145,0x000020d8,0x000020b6,0x00002053,
9600x000013fd,0x000200f8,0x00001311,0x000500aa, 17230x00050051,0x00000006,0x000020d9,0x000020d8,
9610x0000002f,0x0000131a,0x000012df,0x00001319, 17240x00000001,0x00050051,0x00000006,0x000020da,
9620x000300f7,0x0000131c,0x00000000,0x000400fa, 17250x000020d8,0x00000000,0x00050080,0x00000006,
9630x0000131a,0x0000131b,0x0000131c,0x000200f8, 17260x000020df,0x000020bd,0x000020d9,0x00050050,
9640x0000131b,0x00050041,0x000012db,0x0000131e, 17270x00000007,0x000020e0,0x000020da,0x000020df,
9650x000012e3,0x00000138,0x0004003d,0x00000006, 17280x0004007c,0x00000014,0x000020d0,0x000020e0,
9660x0000131f,0x0000131e,0x00050041,0x000012db, 17290x00060041,0x00000174,0x000020c8,0x000020d0,
9670x00001321,0x000012e4,0x00000138,0x0004003d, 17300x00000173,0x00000173,0x0005003e,0x000020c8,
9680x00000006,0x00001322,0x00001321,0x000500aa, 17310x000063a7,0x00000002,0x00000004,0x00050080,
9690x0000002f,0x00001953,0x00001322,0x00000138, 17320x00000006,0x0000205a,0x000063a7,0x000020a8,
9700x000300f7,0x00001955,0x00000000,0x000400fa, 17330x00050080,0x00000006,0x0000205d,0x000063a6,
9710x00001953,0x00001954,0x00001955,0x000200f8, 17340x0000026c,0x000200f9,0x00002043,0x000200f8,
9720x00001954,0x0003003e,0x00000e6f,0x00000138, 17350x0000205e,0x000200f9,0x000014ef,0x000200f8,
9730x000200f9,0x00001955,0x000200f8,0x00001955, 17360x0000141b,0x000500aa,0x0000002f,0x0000142a,
9740x000400e0,0x00000280,0x00000280,0x0000094f, 17370x000013be,0x000001e3,0x000300f7,0x0000142c,
9750x00050084,0x00000006,0x00001957,0x0000131f, 17380x00000000,0x000400fa,0x0000142a,0x0000142b,
9760x000001be,0x00050080,0x00000006,0x00001959, 17390x0000142c,0x000200f8,0x0000142b,0x00050041,
9770x00001957,0x000001be,0x00050041,0x000001bb, 17400x000013a5,0x0000142e,0x000013d5,0x00000140,
9780x000019a5,0x000001b9,0x000001f0,0x0004003d, 17410x0004003d,0x00000006,0x0000142f,0x0000142e,
9790x00000006,0x000019a6,0x000019a5,0x000500ac, 17420x00050041,0x000013a5,0x00001431,0x000013d6,
9800x0000002f,0x000019a7,0x000019a6,0x00000142, 17430x00000140,0x0004003d,0x00000006,0x00001432,
9810x000300f7,0x000019ad,0x00000000,0x000400fa, 17440x00001431,0x00050041,0x000001c3,0x0000218f,
9820x000019a7,0x000019a8,0x000019ac,0x000200f8, 17450x000001c1,0x000001c2,0x0004003d,0x00000006,
9830x000019ac,0x000200f9,0x000019ad,0x000200f8, 17460x00002190,0x0000218f,0x00050084,0x00000006,
9840x000019a8,0x00050082,0x00000006,0x000019ab, 17470x00002191,0x000001e3,0x00002190,0x00050080,
9850x000019a6,0x00000142,0x000200f9,0x000019ad, 17480x00000006,0x00002192,0x000001cc,0x00002191,
9860x000200f8,0x000019ad,0x000700f5,0x00000006, 17490x00050080,0x00000006,0x00002198,0x00002190,
9870x00005f80,0x000019ab,0x000019a8,0x00000138, 17500x00000695,0x00050086,0x00000006,0x00002199,
9880x000019ac,0x0007000c,0x00000006,0x0000195b, 17510x00002198,0x000001c6,0x00050084,0x00000006,
9890x00000001,0x00000026,0x00001959,0x00005f80, 17520x0000218b,0x000001cc,0x00002199,0x00050080,
9900x00050080,0x00000006,0x0000195e,0x00001957, 17530x00000006,0x0000218c,0x00002192,0x0000218b,
9910x00001322,0x000200f9,0x0000195f,0x000200f8, 17540x00050080,0x00000006,0x00002186,0x0000218c,
9920x0000195f,0x000700f5,0x00000006,0x00005f81, 17550x0000218b,0x00050041,0x000001c3,0x0000217d,
9930x0000195e,0x000019ad,0x00001994,0x00001992, 17560x000001c1,0x000001f8,0x0004003d,0x00000006,
9940x000500b0,0x0000002f,0x00001963,0x00005f81, 17570x0000217e,0x0000217d,0x00050084,0x00000006,
9950x0000195b,0x000400f6,0x00001995,0x00001992, 17580x0000217f,0x000001f7,0x0000217e,0x00050080,
9960x00000000,0x000400fa,0x00001963,0x00001964, 17590x00000006,0x00002180,0x00002186,0x0000217f,
9970x00001995,0x000200f8,0x00001964,0x00050041, 17600x00050041,0x000001c3,0x00002176,0x000001c1,
9980x000001bb,0x000019d7,0x000001b9,0x000001ba, 17610x0000020e,0x0004003d,0x00000006,0x00002177,
9990x0004003d,0x00000006,0x000019d8,0x000019d7,
10000x00050084,0x00000006,0x000019d9,0x000001db,
10010x000019d8,0x00050080,0x00000006,0x000019da,
10020x000001c4,0x000019d9,0x00050080,0x00000006,
10030x000019e0,0x000019d8,0x0000062f,0x00050086,
10040x00000006,0x000019e1,0x000019e0,0x000001be,
10050x00050084,0x00000006,0x000019d3,0x000001c4,
10060x000019e1,0x00050080,0x00000006,0x000019d4,
10070x000019da,0x000019d3,0x00050080,0x00000006,
10080x000019ce,0x000019d4,0x000019d3,0x00050084,
10090x00000006,0x000019c7,0x000001ef,0x000019a6,
10100x00050080,0x00000006,0x000019c8,0x000019ce,
10110x000019c7,0x00050041,0x000001bb,0x000019be,
10120x000001b9,0x00000206,0x0004003d,0x00000006,
10130x000019bf,0x000019be,0x00050084,0x00000006,
10140x000019c0,0x00000205,0x000019bf,0x00050080,
10150x00000006,0x000019c1,0x000019c8,0x000019c0,
10160x000300f7,0x000019f4,0x00000000,0x000400fa,
10170x000019a7,0x000019ef,0x000019f3,0x000200f8,
10180x000019f3,0x000200f9,0x000019f4,0x000200f8,
10190x000019ef,0x00050082,0x00000006,0x000019f2,
10200x000019a6,0x00000142,0x000200f9,0x000019f4,
10210x000200f8,0x000019f4,0x000700f5,0x00000006,
10220x00005f87,0x000019f2,0x000019ef,0x00000138,
10230x000019f3,0x00050084,0x00000006,0x000019b9,
10240x000000ec,0x00005f87,0x00050080,0x00000006,
10250x000019ba,0x000019c1,0x000019b9,0x000300f7,
10260x00001a01,0x00000000,0x000400fa,0x000019a7,
10270x000019fc,0x00001a00,0x000200f8,0x00001a00,
10280x000200f9,0x00001a01,0x000200f8,0x000019fc,
10290x00050082,0x00000006,0x000019ff,0x000019a6,
10300x00000142,0x000200f9,0x00001a01,0x000200f8,
10310x00001a01,0x000700f5,0x00000006,0x00005f88,
10320x000019ff,0x000019fc,0x00000138,0x00001a00,
10330x00050084,0x00000006,0x000019b3,0x000000ec,
10340x00005f88,0x00050080,0x00000006,0x000019b4,
10350x000019ba,0x000019b3,0x00050084,0x00000006,
10360x00001967,0x000000ec,0x00005f81,0x00050080,
10370x00000006,0x00001968,0x000019b4,0x00001967,
10380x00050041,0x00000266,0x00001969,0x000001b9,
10390x00000264,0x0004003d,0x00000007,0x0000196a,
10400x00001969,0x00050051,0x00000006,0x00001a19,
10410x0000196a,0x00000000,0x00050095,0x0000013d,
10420x00001a1b,0x00001a19,0x00001968,0x00050051,
10430x00000006,0x00001a1c,0x00001a1b,0x00000001,
10440x00050051,0x00000006,0x00001a1d,0x00001a1b,
10450x00000000,0x00050051,0x00000006,0x00001a20,
10460x0000196a,0x00000001,0x00050080,0x00000006,
10470x00001a22,0x00001a20,0x00001a1c,0x00050050,
10480x00000007,0x00001a23,0x00001a1d,0x00001a22,
10490x0004007c,0x00000014,0x00001a13,0x00001a23,
10500x00060041,0x0000016c,0x00001a0a,0x00001a13,
10510x0000016b,0x0000016b,0x0006003d,0x00000006,
10520x00001a0b,0x00001a0a,0x00000002,0x00000004,
10530x000200f9,0x0000196c,0x000200f8,0x0000196c,
10540x000700f5,0x00000006,0x00005f8d,0x00000138,
10550x00001a01,0x00001975,0x0000197d,0x000700f5,
10560x00000006,0x00005f8c,0x00000138,0x00001a01,
10570x0000197f,0x0000197d,0x000700f5,0x00000006,
10580x00005f8b,0x00001a0b,0x00001a01,0x00001a80,
10590x0000197d,0x000500ab,0x0000002f,0x0000196f,
10600x00005f8b,0x00000539,0x000500b0,0x0000002f,
10610x00001971,0x00005f8c,0x00000342,0x000500a7,
10620x0000002f,0x00001972,0x0000196f,0x00001971,
10630x000400f6,0x00001980,0x0000197d,0x00000000,
10640x000400fa,0x00001972,0x00001973,0x00001980,
10650x000200f8,0x00001973,0x00050080,0x00000006,
10660x00001975,0x00005f8d,0x00000264,0x000300f7,
10670x00001a69,0x00000000,0x000400fa,0x000019a7,
10680x00001a64,0x00001a68,0x000200f8,0x00001a68,
10690x000200f9,0x00001a69,0x000200f8,0x00001a64,
10700x00050082,0x00000006,0x00001a67,0x000019a6,
10710x00000142,0x000200f9,0x00001a69,0x000200f8,
10720x00001a69,0x000700f5,0x00000006,0x00005f98,
10730x00001a67,0x00001a64,0x00000138,0x00001a68,
10740x00050084,0x00000006,0x00001a2e,0x000000ec,
10750x00005f98,0x00050080,0x00000006,0x00001a2f,
10760x000019c1,0x00001a2e,0x000300f7,0x00001a76,
10770x00000000,0x000400fa,0x000019a7,0x00001a71,
10780x00001a75,0x000200f8,0x00001a75,0x000200f9,
10790x00001a76,0x000200f8,0x00001a71,0x00050082,
10800x00000006,0x00001a74,0x000019a6,0x00000142,
10810x000200f9,0x00001a76,0x000200f8,0x00001a76,
10820x000700f5,0x00000006,0x00005f99,0x00001a74,
10830x00001a71,0x00000138,0x00001a75,0x00050084,
10840x00000006,0x00001a28,0x000000ec,0x00005f99,
10850x00050080,0x00000006,0x00001a29,0x00001a2f,
10860x00001a28,0x00050084,0x00000006,0x00001978,
10870x000000ec,0x00005f8b,0x00050080,0x00000006,
10880x00001979,0x00001a29,0x00001978,0x00050095,
10890x0000013d,0x00001a90,0x00001a19,0x00001979,
10900x00050051,0x00000006,0x00001a91,0x00001a90,
10910x00000001,0x00050051,0x00000006,0x00001a92,
10920x00001a90,0x00000000,0x00050080,0x00000006,
10930x00001a97,0x00001a20,0x00001a91,0x00050050,
10940x00000007,0x00001a98,0x00001a92,0x00001a97,
10950x0004007c,0x00000014,0x00001a88,0x00001a98,
10960x00060041,0x0000016c,0x00001a7f,0x00001a88,
10970x0000016b,0x0000016b,0x0006003d,0x00000006,
10980x00001a80,0x00001a7f,0x00000002,0x00000004,
10990x000200f9,0x0000197d,0x000200f8,0x0000197d,
11000x00050080,0x00000006,0x0000197f,0x00005f8c,
11010x00000264,0x000200f9,0x0000196c,0x000200f8,
11020x00001980,0x000500c7,0x00000006,0x00001982,
11030x00005f8d,0x00000142,0x000500aa,0x0000002f,
11040x00001983,0x00001982,0x00000138,0x000600a9,
11050x00000006,0x00001984,0x00001983,0x00000142,
11060x00000138,0x000300f7,0x00001ae4,0x00000000,
11070x000400fa,0x000019a7,0x00001adf,0x00001ae3,
11080x000200f8,0x00001ae3,0x000200f9,0x00001ae4,
11090x000200f8,0x00001adf,0x00050082,0x00000006,
11100x00001ae2,0x000019a6,0x00000142,0x000200f9,
11110x00001ae4,0x000200f8,0x00001ae4,0x000700f5,
11120x00000006,0x00005f90,0x00001ae2,0x00001adf,
11130x00000138,0x00001ae3,0x00050084,0x00000006,
11140x00001aa9,0x000000ec,0x00005f90,0x00050080,
11150x00000006,0x00001aaa,0x000019c1,0x00001aa9,
11160x000300f7,0x00001af1,0x00000000,0x000400fa,
11170x000019a7,0x00001aec,0x00001af0,0x000200f8,
11180x00001af0,0x000200f9,0x00001af1,0x000200f8,
11190x00001aec,0x00050082,0x00000006,0x00001aef,
11200x000019a6,0x00000142,0x000200f9,0x00001af1,
11210x000200f8,0x00001af1,0x000700f5,0x00000006,
11220x00005f91,0x00001aef,0x00001aec,0x00000138,
11230x00001af0,0x00050084,0x00000006,0x00001aa3,
11240x000000ec,0x00005f91,0x00050080,0x00000006,
11250x00001aa4,0x00001aaa,0x00001aa3,0x000300f7,
11260x00001afe,0x00000000,0x000400fa,0x000019a7,
11270x00001af9,0x00001afd,0x000200f8,0x00001afd,
11280x000200f9,0x00001afe,0x000200f8,0x00001af9,
11290x00050082,0x00000006,0x00001afc,0x000019a6,
11300x00000142,0x000200f9,0x00001afe,0x000200f8,
11310x00001afe,0x000700f5,0x00000006,0x00005f92,
11320x00001afc,0x00001af9,0x00000138,0x00001afd,
11330x00050084,0x00000006,0x00001a9d,0x000000ec,
11340x00005f92,0x00050080,0x00000006,0x00001a9e,
11350x00001aa4,0x00001a9d,0x00050080,0x00000006,
11360x00001988,0x00001a9e,0x00001967,0x00050095,
11370x0000013d,0x00001b17,0x00001a19,0x00001988,
11380x00050051,0x00000006,0x00001b18,0x00001b17,
11390x00000001,0x00050051,0x00000006,0x00001b19,
11400x00001b17,0x00000000,0x00050080,0x00000006,
11410x00001b1e,0x00001a20,0x00001b18,0x00050050,
11420x00000007,0x00001b1f,0x00001b19,0x00001b1e,
11430x0004007c,0x00000014,0x00001b0f,0x00001b1f,
11440x00060041,0x0000016c,0x00001b07,0x00001b0f,
11450x0000016b,0x0000016b,0x0005003e,0x00001b07,
11460x00001984,0x00000002,0x00000004,0x000300f7,
11470x00001991,0x00000000,0x000400fa,0x00001983,
11480x0000198f,0x00001991,0x000200f8,0x0000198f,
11490x000700ea,0x00000006,0x00001990,0x00000e6f,
11500x00000142,0x00000138,0x00000142,0x000200f9,
11510x00001991,0x000200f8,0x00001991,0x000200f9,
11520x00001992,0x000200f8,0x00001992,0x00050080,
11530x00000006,0x00001994,0x00005f81,0x000001c4,
11540x000200f9,0x0000195f,0x000200f8,0x00001995,
11550x000400e0,0x00000280,0x00000280,0x0000094f,
11560x000300f7,0x000019a1,0x00000000,0x000400fa,
11570x00001953,0x00001998,0x000019a1,0x000200f8,
11580x00001998,0x00050041,0x000001bb,0x00001b5a,
11590x000001b9,0x000001ba,0x0004003d,0x00000006,
11600x00001b5b,0x00001b5a,0x00050084,0x00000006,
11610x00001b5c,0x000001db,0x00001b5b,0x00050080,
11620x00000006,0x00001b5d,0x000001c4,0x00001b5c,
11630x00050080,0x00000006,0x00001b63,0x00001b5b,
11640x0000062f,0x00050086,0x00000006,0x00001b64,
11650x00001b63,0x000001be,0x00050084,0x00000006,
11660x00001b56,0x000001c4,0x00001b64,0x00050080,
11670x00000006,0x00001b57,0x00001b5d,0x00001b56,
11680x00050080,0x00000006,0x00001b51,0x00001b57,
11690x00001b56,0x00050084,0x00000006,0x00001b4a,
11700x000001ef,0x000019a6,0x00050080,0x00000006,
11710x00001b4b,0x00001b51,0x00001b4a,0x00050041,
11720x000001bb,0x00001b41,0x000001b9,0x00000206,
11730x0004003d,0x00000006,0x00001b42,0x00001b41,
11740x00050084,0x00000006,0x00001b43,0x00000205,
11750x00001b42,0x00050080,0x00000006,0x00001b44,
11760x00001b4b,0x00001b43,0x000300f7,0x00001b77,
11770x00000000,0x000400fa,0x000019a7,0x00001b72,
11780x00001b76,0x000200f8,0x00001b76,0x000200f9,
11790x00001b77,0x000200f8,0x00001b72,0x00050082,
11800x00000006,0x00001b75,0x000019a6,0x00000142,
11810x000200f9,0x00001b77,0x000200f8,0x00001b77,
11820x000700f5,0x00000006,0x00005f82,0x00001b75,
11830x00001b72,0x00000138,0x00001b76,0x00050084,
11840x00000006,0x00001b3c,0x000000ec,0x00005f82,
11850x00050080,0x00000006,0x00001b3d,0x00001b44,
11860x00001b3c,0x000300f7,0x00001b84,0x00000000,
11870x000400fa,0x000019a7,0x00001b7f,0x00001b83,
11880x000200f8,0x00001b83,0x000200f9,0x00001b84,
11890x000200f8,0x00001b7f,0x00050082,0x00000006,
11900x00001b82,0x000019a6,0x00000142,0x000200f9,
11910x00001b84,0x000200f8,0x00001b84,0x000700f5,
11920x00000006,0x00005f83,0x00001b82,0x00001b7f,
11930x00000138,0x00001b83,0x00050084,0x00000006,
11940x00001b36,0x000000ec,0x00005f83,0x00050080,
11950x00000006,0x00001b37,0x00001b3d,0x00001b36,
11960x000300f7,0x00001b91,0x00000000,0x000400fa,
11970x000019a7,0x00001b8c,0x00001b90,0x000200f8,
11980x00001b90,0x000200f9,0x00001b91,0x000200f8,
11990x00001b8c,0x00050082,0x00000006,0x00001b8f,
12000x000019a6,0x00000142,0x000200f9,0x00001b91,
12010x000200f8,0x00001b91,0x000700f5,0x00000006,
12020x00005f84,0x00001b8f,0x00001b8c,0x00000138,
12030x00001b90,0x00050084,0x00000006,0x00001b30,
12040x000000ec,0x00005f84,0x00050080,0x00000006,
12050x00001b31,0x00001b37,0x00001b30,0x000300f7,
12060x00001b9e,0x00000000,0x000400fa,0x000019a7,
12070x00001b99,0x00001b9d,0x000200f8,0x00001b9d,
12080x000200f9,0x00001b9e,0x000200f8,0x00001b99,
12090x00050082,0x00000006,0x00001b9c,0x000019a6,
12100x00000142,0x000200f9,0x00001b9e,0x000200f8,
12110x00001b9e,0x000700f5,0x00000006,0x00005f85,
12120x00001b9c,0x00001b99,0x00000138,0x00001b9d,
12130x00050084,0x00000006,0x00001b2a,0x000000ec,
12140x00005f85,0x00050080,0x00000006,0x00001b2b,
12150x00001b31,0x00001b2a,0x000300f7,0x00001bab,
12160x00000000,0x000400fa,0x000019a7,0x00001ba6,
12170x00001baa,0x000200f8,0x00001baa,0x000200f9,
12180x00001bab,0x000200f8,0x00001ba6,0x00050082,
12190x00000006,0x00001ba9,0x000019a6,0x00000142,
12200x000200f9,0x00001bab,0x000200f8,0x00001bab,
12210x000700f5,0x00000006,0x00005f86,0x00001ba9,
12220x00001ba6,0x00000138,0x00001baa,0x00050084,
12230x00000006,0x00001b24,0x000000ec,0x00005f86,
12240x00050080,0x00000006,0x00001b25,0x00001b2b,
12250x00001b24,0x00050084,0x00000006,0x0000199b,
12260x000000ec,0x0000131f,0x00050080,0x00000006,
12270x0000199c,0x00001b25,0x0000199b,0x00050041,
12280x00000266,0x0000199d,0x000001b9,0x00000264,
12290x0004003d,0x00000007,0x0000199e,0x0000199d,
12300x0004003d,0x00000006,0x0000199f,0x00000e6f,
12310x00050051,0x00000006,0x00001bc2,0x0000199e,
12320x00000000,0x00050095,0x0000013d,0x00001bc4,
12330x00001bc2,0x0000199c,0x00050051,0x00000006,
12340x00001bc5,0x00001bc4,0x00000001,0x00050051,
12350x00000006,0x00001bc6,0x00001bc4,0x00000000,
12360x00050051,0x00000006,0x00001bc9,0x0000199e,
12370x00000001,0x00050080,0x00000006,0x00001bcb,
12380x00001bc9,0x00001bc5,0x00050050,0x00000007,
12390x00001bcc,0x00001bc6,0x00001bcb,0x0004007c,
12400x00000014,0x00001bbc,0x00001bcc,0x00060041,
12410x0000016c,0x00001bb4,0x00001bbc,0x0000016b,
12420x0000016b,0x0005003e,0x00001bb4,0x0000199f,
12430x00000002,0x00000004,0x000200f9,0x000019a1,
12440x000200f8,0x000019a1,0x000200f9,0x000013fd,
12450x000200f8,0x0000131c,0x000500aa,0x0000002f,
12460x00001327,0x000012df,0x00000a0e,0x000300f7,
12470x00001329,0x00000000,0x000400fa,0x00001327,
12480x00001328,0x00001329,0x000200f8,0x00001328,
12490x00050041,0x000001bb,0x00001c07,0x000001b9,
12500x000001ba,0x0004003d,0x00000006,0x00001c08,
12510x00001c07,0x00050084,0x00000006,0x00001c09,
12520x000001db,0x00001c08,0x00050080,0x00000006,
12530x00001c0a,0x000001c4,0x00001c09,0x00050080,
12540x00000006,0x00001c10,0x00001c08,0x0000062f,
12550x00050086,0x00000006,0x00001c11,0x00001c10,
12560x000001be,0x00050084,0x00000006,0x00001c03,
12570x000001c4,0x00001c11,0x00050080,0x00000006,
12580x00001c04,0x00001c0a,0x00001c03,0x00050080,
12590x00000006,0x00001bfe,0x00001c04,0x00001c03,
12600x00050041,0x000001bb,0x00001bf5,0x000001b9,
12610x000001f0,0x0004003d,0x00000006,0x00001bf6,
12620x00001bf5,0x00050084,0x00000006,0x00001bf7,
12630x000001ef,0x00001bf6,0x00050080,0x00000006,
12640x00001bf8,0x00001bfe,0x00001bf7,0x00050041,
12650x000001bb,0x00001bee,0x000001b9,0x00000206,
12660x0004003d,0x00000006,0x00001bef,0x00001bee,
12670x00050084,0x00000006,0x00001bf0,0x00000205,
12680x00001bef,0x00050080,0x00000006,0x00001bf1,
12690x00001bf8,0x00001bf0,0x000500ac,0x0000002f,
12700x00001c1e,0x00001bf6,0x00000142,0x000300f7,
12710x00001c24,0x00000000,0x000400fa,0x00001c1e,
12720x00001c1f,0x00001c23,0x000200f8,0x00001c23,
12730x000200f9,0x00001c24,0x000200f8,0x00001c1f,
12740x00050082,0x00000006,0x00001c22,0x00001bf6,
12750x00000142,0x000200f9,0x00001c24,0x000200f8,
12760x00001c24,0x000700f5,0x00000006,0x00005f6e,
12770x00001c22,0x00001c1f,0x00000138,0x00001c23,
12780x00050084,0x00000006,0x00001be9,0x000000ec,
12790x00005f6e,0x00050080,0x00000006,0x00001bea,
12800x00001bf1,0x00001be9,0x000300f7,0x00001c31,
12810x00000000,0x000400fa,0x00001c1e,0x00001c2c,
12820x00001c30,0x000200f8,0x00001c30,0x000200f9,
12830x00001c31,0x000200f8,0x00001c2c,0x00050082,
12840x00000006,0x00001c2f,0x00001bf6,0x00000142,
12850x000200f9,0x00001c31,0x000200f8,0x00001c31,
12860x000700f5,0x00000006,0x00005f6f,0x00001c2f,
12870x00001c2c,0x00000138,0x00001c30,0x00050084,
12880x00000006,0x00001be3,0x000000ec,0x00005f6f,
12890x00050080,0x00000006,0x00001be4,0x00001bea,
12900x00001be3,0x000300f7,0x00001c3e,0x00000000,
12910x000400fa,0x00001c1e,0x00001c39,0x00001c3d,
12920x000200f8,0x00001c3d,0x000200f9,0x00001c3e,
12930x000200f8,0x00001c39,0x00050082,0x00000006,
12940x00001c3c,0x00001bf6,0x00000142,0x000200f9,
12950x00001c3e,0x000200f8,0x00001c3e,0x000700f5,
12960x00000006,0x00005f70,0x00001c3c,0x00001c39,
12970x00000138,0x00001c3d,0x00050084,0x00000006,
12980x00001bdd,0x000000ec,0x00005f70,0x00050080,
12990x00000006,0x00001bde,0x00001be4,0x00001bdd,
13000x000300f7,0x00001c4b,0x00000000,0x000400fa,
13010x00001c1e,0x00001c46,0x00001c4a,0x000200f8,
13020x00001c4a,0x000200f9,0x00001c4b,0x000200f8,
13030x00001c46,0x00050082,0x00000006,0x00001c49,
13040x00001bf6,0x00000142,0x000200f9,0x00001c4b,
13050x000200f8,0x00001c4b,0x000700f5,0x00000006,
13060x00005f71,0x00001c49,0x00001c46,0x00000138,
13070x00001c4a,0x00050084,0x00000006,0x00001bd7,
13080x000000ec,0x00005f71,0x00050080,0x00000006,
13090x00001bd8,0x00001bde,0x00001bd7,0x000300f7,
13100x00001c58,0x00000000,0x000400fa,0x00001c1e,
13110x00001c53,0x00001c57,0x000200f8,0x00001c57,
13120x000200f9,0x00001c58,0x000200f8,0x00001c53,
13130x00050082,0x00000006,0x00001c56,0x00001bf6,
13140x00000142,0x000200f9,0x00001c58,0x000200f8,
13150x00001c58,0x000700f5,0x00000006,0x00005f72,
13160x00001c56,0x00001c53,0x00000138,0x00001c57,
13170x00050084,0x00000006,0x00001bd1,0x000000ec,
13180x00005f72,0x00050080,0x00000006,0x00001bd2,
13190x00001bd8,0x00001bd1,0x000300f7,0x00001cb7,
13200x00000000,0x000400fa,0x00001c1e,0x00001cb2,
13210x00001cb6,0x000200f8,0x00001cb6,0x000200f9,
13220x00001cb7,0x000200f8,0x00001cb2,0x00050082,
13230x00000006,0x00001cb5,0x00001bf6,0x00000142,
13240x000200f9,0x00001cb7,0x000200f8,0x00001cb7,
13250x000700f5,0x00000006,0x00005f73,0x00001cb5,
13260x00001cb2,0x00000138,0x00001cb6,0x00050084,
13270x00000006,0x00001c7c,0x000000ec,0x00005f73,
13280x00050080,0x00000006,0x00001c7d,0x00001bf1,
13290x00001c7c,0x000300f7,0x00001cc4,0x00000000,
13300x000400fa,0x00001c1e,0x00001cbf,0x00001cc3,
13310x000200f8,0x00001cc3,0x000200f9,0x00001cc4,
13320x000200f8,0x00001cbf,0x00050082,0x00000006,
13330x00001cc2,0x00001bf6,0x00000142,0x000200f9,
13340x00001cc4,0x000200f8,0x00001cc4,0x000700f5,
13350x00000006,0x00005f74,0x00001cc2,0x00001cbf,
13360x00000138,0x00001cc3,0x00050084,0x00000006,
13370x00001c76,0x000000ec,0x00005f74,0x00050080,
13380x00000006,0x00001c77,0x00001c7d,0x00001c76,
13390x000300f7,0x00001cd1,0x00000000,0x000400fa,
13400x00001c1e,0x00001ccc,0x00001cd0,0x000200f8,
13410x00001cd0,0x000200f9,0x00001cd1,0x000200f8,
13420x00001ccc,0x00050082,0x00000006,0x00001ccf,
13430x00001bf6,0x00000142,0x000200f9,0x00001cd1,
13440x000200f8,0x00001cd1,0x000700f5,0x00000006,
13450x00005f75,0x00001ccf,0x00001ccc,0x00000138,
13460x00001cd0,0x00050084,0x00000006,0x00001c70,
13470x000000ec,0x00005f75,0x00050080,0x00000006,
13480x00001c71,0x00001c77,0x00001c70,0x000300f7,
13490x00001cde,0x00000000,0x000400fa,0x00001c1e,
13500x00001cd9,0x00001cdd,0x000200f8,0x00001cdd,
13510x000200f9,0x00001cde,0x000200f8,0x00001cd9,
13520x00050082,0x00000006,0x00001cdc,0x00001bf6,
13530x00000142,0x000200f9,0x00001cde,0x000200f8,
13540x00001cde,0x000700f5,0x00000006,0x00005f76,
13550x00001cdc,0x00001cd9,0x00000138,0x00001cdd,
13560x00050084,0x00000006,0x00001c6a,0x000000ec,
13570x00005f76,0x00050080,0x00000006,0x00001c6b,
13580x00001c71,0x00001c6a,0x000300f7,0x00001ceb,
13590x00000000,0x000400fa,0x00001c1e,0x00001ce6,
13600x00001cea,0x000200f8,0x00001cea,0x000200f9,
13610x00001ceb,0x000200f8,0x00001ce6,0x00050082,
13620x00000006,0x00001ce9,0x00001bf6,0x00000142,
13630x000200f9,0x00001ceb,0x000200f8,0x00001ceb,
13640x000700f5,0x00000006,0x00005f77,0x00001ce9,
13650x00001ce6,0x00000138,0x00001cea,0x00050084,
13660x00000006,0x00001c64,0x000000ec,0x00005f77,
13670x00050080,0x00000006,0x00001c65,0x00001c6b,
13680x00001c64,0x000300f7,0x00001cfe,0x00000000,
13690x000400fa,0x00001c1e,0x00001cf9,0x00001cfd,
13700x000200f8,0x00001cfd,0x000200f9,0x00001cfe,
13710x000200f8,0x00001cf9,0x00050082,0x00000006,
13720x00001cfc,0x00001bf6,0x00000142,0x000200f9,
13730x00001cfe,0x000200f8,0x00001cfe,0x000700f5,
13740x00000006,0x00005f78,0x00001cfc,0x00001cf9,
13750x00000138,0x00001cfd,0x00050080,0x00000006,
13760x00001cf1,0x00005f78,0x0000062f,0x00050086,
13770x00000006,0x00001cf2,0x00001cf1,0x000001be,
13780x00050084,0x00000006,0x00001c5e,0x000000ec,
13790x00001cf2,0x00050080,0x00000006,0x00001c5f,
13800x00001c65,0x00001c5e,0x000300f7,0x00001d11,
13810x00000000,0x000400fa,0x00001c1e,0x00001d0c,
13820x00001d10,0x000200f8,0x00001d10,0x000200f9,
13830x00001d11,0x000200f8,0x00001d0c,0x00050082,
13840x00000006,0x00001d0f,0x00001bf6,0x00000142,
13850x000200f9,0x00001d11,0x000200f8,0x00001d11,
13860x000700f5,0x00000006,0x00005f79,0x00001d0f,
13870x00001d0c,0x00000138,0x00001d10,0x00050080,
13880x00000006,0x00001d04,0x00005f79,0x0000062f,
13890x00050086,0x00000006,0x00001d05,0x00001d04,
13900x000001be,0x00050041,0x000012db,0x0000132e,
13910x000012e4,0x00000138,0x0004003d,0x00000006,
13920x0000132f,0x0000132e,0x00050080,0x00000006,
13930x00001d2a,0x00001d05,0x00000a56,0x00050086,
13940x00000006,0x00001d2b,0x00001d2a,0x000001c4,
13950x00050084,0x00000006,0x00001d2e,0x0000132f,
13960x00001d2b,0x0007000c,0x00000006,0x00001d30,
13970x00000001,0x00000026,0x00001d2e,0x00001d05,
13980x00050080,0x00000006,0x00001d33,0x00001d30,
13990x00001d2b,0x0007000c,0x00000006,0x00001d35,
14000x00000001,0x00000026,0x00001d33,0x00001d05,
14010x000200f9,0x00001d37,0x000200f8,0x00001d37,
14020x000700f5,0x00000006,0x00005f7b,0x00000138,
14030x00001d11,0x00001d45,0x00001d3c,0x000700f5,
14040x00000006,0x00005f7a,0x00001d30,0x00001d11,
14050x00001d48,0x00001d3c,0x000500b0,0x0000002f,
14060x00001d3b,0x00005f7a,0x00001d35,0x000400f6,
14070x00001d49,0x00001d3c,0x00000000,0x000400fa,
14080x00001d3b,0x00001d3c,0x00001d49,0x000200f8,
14090x00001d3c,0x00050084,0x00000006,0x00001d3f,
14100x000000ec,0x00005f7a,0x00050080,0x00000006,
14110x00001d40,0x00001bd2,0x00001d3f,0x00050041,
14120x00000266,0x00001d41,0x000001b9,0x00000264,
14130x0004003d,0x00000007,0x00001d42,0x00001d41,
14140x00050051,0x00000006,0x00001da2,0x00001d42,
14150x00000000,0x00050095,0x0000013d,0x00001da4,
14160x00001da2,0x00001d40,0x00050051,0x00000006,
14170x00001da5,0x00001da4,0x00000001,0x00050051,
14180x00000006,0x00001da6,0x00001da4,0x00000000,
14190x00050051,0x00000006,0x00001da9,0x00001d42,
14200x00000001,0x00050080,0x00000006,0x00001dab,
14210x00001da9,0x00001da5,0x00050050,0x00000007,
14220x00001dac,0x00001da6,0x00001dab,0x0004007c,
14230x00000014,0x00001d9c,0x00001dac,0x00060041,
14240x0000016c,0x00001d93,0x00001d9c,0x0000016b,
14250x0000016b,0x0006003d,0x00000006,0x00001d94,
14260x00001d93,0x00000002,0x00000004,0x00050080,
14270x00000006,0x00001d45,0x00005f7b,0x00001d94,
14280x00050080,0x00000006,0x00001d48,0x00005f7a,
14290x00000264,0x000200f9,0x00001d37,0x000200f8,
14300x00001d49,0x00050041,0x00000937,0x00001d4c,
14310x00000a7f,0x0000132f,0x0003003e,0x00001d4c,
14320x00005f7b,0x000400e0,0x00000280,0x00000280,
14330x0000094f,0x000500aa,0x0000002f,0x00001d4e,
14340x0000132f,0x00000138,0x000300f7,0x00001d6b,
14350x00000000,0x000400fa,0x00001d4e,0x00001d4f,
14360x00001d6b,0x000200f8,0x00001d4f,0x000200f9,
14370x00001d50,0x000200f8,0x00001d50,0x000700f5,
14380x00000006,0x00005f7d,0x00000138,0x00001d4f,
14390x00001d5d,0x00001d54,0x000700f5,0x00000006,
14400x00005f7c,0x00000138,0x00001d4f,0x00001d60,
14410x00001d54,0x000500b0,0x0000002f,0x00001d53,
14420x00005f7c,0x000001c4,0x000400f6,0x00001d61,
14430x00001d54,0x00000000,0x000400fa,0x00001d53,
14440x00001d54,0x00001d61,0x000200f8,0x00001d54,
14450x00050041,0x00000937,0x00001d56,0x00000a7f,
14460x00005f7c,0x0004003d,0x00000006,0x00001d57,
14470x00001d56,0x0003003e,0x00001d56,0x00005f7d,
14480x00050080,0x00000006,0x00001d5d,0x00005f7d,
14490x00001d57,0x00050080,0x00000006,0x00001d60,
14500x00005f7c,0x00000264,0x000200f9,0x00001d50,
14510x000200f8,0x00001d61,0x00050041,0x00000266,
14520x00001d65,0x000001b9,0x00000264,0x0004003d,
14530x00000007,0x00001d66,0x00001d65,0x00050051,
14540x00000006,0x00001dc2,0x00001d66,0x00000000,
14550x00050095,0x0000013d,0x00001dc4,0x00001dc2,
14560x000001ef,0x00050051,0x00000006,0x00001dc5,
14570x00001dc4,0x00000001,0x00050051,0x00000006,
14580x00001dc6,0x00001dc4,0x00000000,0x00050051,
14590x00000006,0x00001dc9,0x00001d66,0x00000001,
14600x00050080,0x00000006,0x00001dcb,0x00001dc9,
14610x00001dc5,0x00050050,0x00000007,0x00001dcc,
14620x00001dc6,0x00001dcb,0x0004007c,0x00000014,
14630x00001dbc,0x00001dcc,0x00060041,0x0000016c,
14640x00001db4,0x00001dbc,0x0000016b,0x0000016b,
14650x0005003e,0x00001db4,0x00005f7d,0x00000002,
14660x00000004,0x000200f9,0x00001d6b,0x000200f8,
14670x00001d6b,0x000400e0,0x00000280,0x00000280,
14680x0000094f,0x0004003d,0x00000006,0x00001d6e,
14690x00001d4c,0x000200f9,0x00001d70,0x000200f8,
14700x00001d70,0x000700f5,0x00000006,0x00005f7f,
14710x00001d6e,0x00001d6b,0x00001d87,0x00001d75,
14720x000700f5,0x00000006,0x00005f7e,0x00001d30,
14730x00001d6b,0x00001d8a,0x00001d75,0x000500b0,
14740x0000002f,0x00001d74,0x00005f7e,0x00001d35,
14750x000400f6,0x00001d8b,0x00001d75,0x00000000,
14760x000400fa,0x00001d74,0x00001d75,0x00001d8b,
14770x000200f8,0x00001d75,0x00050084,0x00000006,
14780x00001d78,0x000000ec,0x00005f7e,0x00050080,
14790x00000006,0x00001d79,0x00001bd2,0x00001d78,
14800x00050041,0x00000266,0x00001d7a,0x000001b9,
14810x00000264,0x0004003d,0x00000007,0x00001d7b,
14820x00001d7a,0x00050051,0x00000006,0x00001de3,
14830x00001d7b,0x00000000,0x00050095,0x0000013d,
14840x00001de5,0x00001de3,0x00001d79,0x00050051,
14850x00000006,0x00001de6,0x00001de5,0x00000001,
14860x00050051,0x00000006,0x00001de7,0x00001de5,
14870x00000000,0x00050051,0x00000006,0x00001dea,
14880x00001d7b,0x00000001,0x00050080,0x00000006,
14890x00001dec,0x00001dea,0x00001de6,0x00050050,
14900x00000007,0x00001ded,0x00001de7,0x00001dec,
14910x0004007c,0x00000014,0x00001ddd,0x00001ded,
14920x00060041,0x0000016c,0x00001dd4,0x00001ddd,
14930x0000016b,0x0000016b,0x0006003d,0x00000006,
14940x00001dd5,0x00001dd4,0x00000002,0x00000004,
14950x00050080,0x00000006,0x00001d80,0x00001c5f,
14960x00001d78,0x00050095,0x0000013d,0x00001e05,
14970x00001de3,0x00001d80,0x00050051,0x00000006,
14980x00001e06,0x00001e05,0x00000001,0x00050051,
14990x00000006,0x00001e07,0x00001e05,0x00000000,
15000x00050080,0x00000006,0x00001e0c,0x00001dea,
15010x00001e06,0x00050050,0x00000007,0x00001e0d,
15020x00001e07,0x00001e0c,0x0004007c,0x00000014,
15030x00001dfd,0x00001e0d,0x00060041,0x0000016c,
15040x00001df5,0x00001dfd,0x0000016b,0x0000016b,
15050x0005003e,0x00001df5,0x00005f7f,0x00000002,
15060x00000004,0x00050080,0x00000006,0x00001d87,
15070x00005f7f,0x00001dd5,0x00050080,0x00000006,
15080x00001d8a,0x00005f7e,0x00000264,0x000200f9,
15090x00001d70,0x000200f8,0x00001d8b,0x000200f9,
15100x000013fd,0x000200f8,0x00001329,0x000500aa,
15110x0000002f,0x00001338,0x000012df,0x000001db,
15120x000300f7,0x0000133a,0x00000000,0x000400fa,
15130x00001338,0x00001339,0x0000133a,0x000200f8,
15140x00001339,0x00050041,0x000012db,0x0000133c,
15150x000012e3,0x00000138,0x0004003d,0x00000006,
15160x0000133d,0x0000133c,0x00050041,0x000012db,
15170x0000133f,0x000012e4,0x00000138,0x0004003d,
15180x00000006,0x00001340,0x0000133f,0x00050041,
15190x000001bb,0x00001ebc,0x000001b9,0x000001ba,
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, 17620x00002176,0x00050084,0x00000006,0x00002178,
18110x000001ef,0x00002177,0x00050080,0x00000006, 17630x0000020d,0x00002177,0x00050080,0x00000006,
18120x00002179,0x0000217f,0x00002178,0x00050041, 17640x00002179,0x00002180,0x00002178,0x000500ac,
18130x00000266,0x00002170,0x000001b9,0x00000264, 17650x0000002f,0x000021a6,0x0000217e,0x0000014a,
18140x0004003d,0x00000007,0x00002171,0x00002170, 17660x000300f7,0x000021ac,0x00000000,0x000400fa,
18150x00050051,0x00000006,0x000021a7,0x00002171, 17670x000021a6,0x000021a7,0x000021ab,0x000200f8,
18160x00000000,0x00050095,0x0000013d,0x000021a9, 17680x000021ab,0x000200f9,0x000021ac,0x000200f8,
18170x000021a7,0x00002179,0x00050051,0x00000006, 17690x000021a7,0x00050082,0x00000006,0x000021aa,
18180x000021aa,0x000021a9,0x00000001,0x00050051, 17700x0000217e,0x0000014a,0x000200f9,0x000021ac,
18190x00000006,0x000021ab,0x000021a9,0x00000000, 17710x000200f8,0x000021ac,0x000700f5,0x00000006,
18200x00050051,0x00000006,0x000021ae,0x00002171, 17720x0000636d,0x000021aa,0x000021a7,0x00000140,
18210x00000001,0x00050080,0x00000006,0x000021b0, 17730x000021ab,0x00050084,0x00000006,0x00002171,
18220x000021ae,0x000021aa,0x00050050,0x00000007, 17740x000000f3,0x0000636d,0x00050080,0x00000006,
18230x000021b1,0x000021ab,0x000021b0,0x0004007c, 17750x00002172,0x00002179,0x00002171,0x000300f7,
18240x00000014,0x000021a1,0x000021b1,0x000200f9, 17760x000021b9,0x00000000,0x000400fa,0x000021a6,
18250x0000213c,0x000200f8,0x0000213c,0x000700f5, 17770x000021b4,0x000021b8,0x000200f8,0x000021b8,
18260x00000006,0x00005f35,0x00000138,0x00002139, 17780x000200f9,0x000021b9,0x000200f8,0x000021b4,
18270x0000214a,0x00002140,0x000500b0,0x0000002f, 17790x00050082,0x00000006,0x000021b7,0x0000217e,
18280x0000213f,0x00005f35,0x00000355,0x000400f6, 17800x0000014a,0x000200f9,0x000021b9,0x000200f8,
18290x0000214b,0x00002140,0x00000000,0x000400fa, 17810x000021b9,0x000700f5,0x00000006,0x0000636e,
18300x0000213f,0x00002140,0x0000214b,0x000200f8, 17820x000021b7,0x000021b4,0x00000140,0x000021b8,
18310x00002140,0x00050080,0x00000006,0x00002144, 17830x00050084,0x00000006,0x0000216b,0x000000f3,
18320x00000142,0x00005f35,0x00060041,0x0000016c, 17840x0000636e,0x00050080,0x00000006,0x0000216c,
18330x00002145,0x000021a1,0x0000016b,0x00002144, 17850x00002172,0x0000216b,0x000300f7,0x000021c6,
18340x000700f1,0x00000006,0x00002146,0x00002145, 17860x00000000,0x000400fa,0x000021a6,0x000021c1,
18350x00000142,0x00000138,0x00000138,0x00050041, 17870x000021c5,0x000200f8,0x000021c5,0x000200f9,
18360x00000009,0x00002147,0x00002131,0x00005f35, 17880x000021c6,0x000200f8,0x000021c1,0x00050082,
18370x0003003e,0x00002147,0x00002146,0x00050080, 17890x00000006,0x000021c4,0x0000217e,0x0000014a,
18380x00000006,0x0000214a,0x00005f35,0x00000264, 17900x000200f9,0x000021c6,0x000200f8,0x000021c6,
18390x000200f9,0x0000213c,0x000200f8,0x0000214b, 17910x000700f5,0x00000006,0x0000636f,0x000021c4,
18400x00050041,0x00000009,0x0000214c,0x00002131, 17920x000021c1,0x00000140,0x000021c5,0x00050084,
18410x0000016b,0x0004003d,0x00000006,0x0000214d, 17930x00000006,0x00002165,0x000000f3,0x0000636f,
18420x0000214c,0x000500aa,0x0000002f,0x0000214e, 17940x00050080,0x00000006,0x00002166,0x0000216c,
18430x0000214d,0x00000539,0x000300f7,0x00002152, 17950x00002165,0x000300f7,0x000021d3,0x00000000,
18440x00000000,0x000400fa,0x0000214e,0x0000214f, 17960x000400fa,0x000021a6,0x000021ce,0x000021d2,
18450x00002152,0x000200f8,0x0000214f,0x000200f9, 17970x000200f8,0x000021d2,0x000200f9,0x000021d3,
18460x00002167,0x000200f8,0x00002152,0x0004003d, 17980x000200f8,0x000021ce,0x00050082,0x00000006,
18470x00000006,0x00002154,0x0000214c,0x000500c7, 17990x000021d1,0x0000217e,0x0000014a,0x000200f9,
18480x00000006,0x000021b6,0x00002154,0x00000241, 18000x000021d3,0x000200f8,0x000021d3,0x000700f5,
18490x000500ab,0x0000002f,0x000021b7,0x000021b6, 18010x00000006,0x00006370,0x000021d1,0x000021ce,
18500x00000138,0x000300f7,0x000021be,0x00000000, 18020x00000140,0x000021d2,0x00050084,0x00000006,
18510x000400fa,0x000021b7,0x000021b8,0x000021bb, 18030x0000215f,0x000000f3,0x00006370,0x00050080,
18520x000200f8,0x000021bb,0x000400c8,0x00000006, 18040x00000006,0x00002160,0x00002166,0x0000215f,
18530x000021bd,0x00002154,0x000200f9,0x000021be, 18050x000300f7,0x000021e0,0x00000000,0x000400fa,
18540x000200f8,0x000021b8,0x000500c7,0x00000006, 18060x000021a6,0x000021db,0x000021df,0x000200f8,
18550x000021ba,0x00002154,0x00000256,0x000200f9, 18070x000021df,0x000200f9,0x000021e0,0x000200f8,
18560x000021be,0x000200f8,0x000021be,0x000700f5, 18080x000021db,0x00050082,0x00000006,0x000021de,
18570x00000006,0x00005f36,0x000021ba,0x000021b8, 18090x0000217e,0x0000014a,0x000200f9,0x000021e0,
18580x000021bd,0x000021bb,0x0004007c,0x00000027, 18100x000200f8,0x000021e0,0x000700f5,0x00000006,
18590x000021c0,0x00005f36,0x00050041,0x00000009, 18110x00006371,0x000021de,0x000021db,0x00000140,
18600x00002156,0x00002131,0x00000264,0x0004003d, 18120x000021df,0x00050084,0x00000006,0x00002159,
18610x00000006,0x00002157,0x00002156,0x000500c7, 18130x000000f3,0x00006371,0x00050080,0x00000006,
18620x00000006,0x000021c5,0x00002157,0x00000241, 18140x0000215a,0x00002160,0x00002159,0x000300f7,
18630x000500ab,0x0000002f,0x000021c6,0x000021c5, 18150x000021f3,0x00000000,0x000400fa,0x000021a6,
18640x00000138,0x000300f7,0x000021cd,0x00000000, 18160x000021ee,0x000021f2,0x000200f8,0x000021f2,
18650x000400fa,0x000021c6,0x000021c7,0x000021ca, 18170x000200f9,0x000021f3,0x000200f8,0x000021ee,
18660x000200f8,0x000021ca,0x000400c8,0x00000006, 18180x00050082,0x00000006,0x000021f1,0x0000217e,
18670x000021cc,0x00002157,0x000200f9,0x000021cd, 18190x0000014a,0x000200f9,0x000021f3,0x000200f8,
18680x000200f8,0x000021c7,0x000500c7,0x00000006, 18200x000021f3,0x000700f5,0x00000006,0x00006372,
18690x000021c9,0x00002157,0x00000256,0x000200f9, 18210x000021f1,0x000021ee,0x00000140,0x000021f2,
18700x000021cd,0x000200f8,0x000021cd,0x000700f5, 18220x00050080,0x00000006,0x000021e6,0x00006372,
18710x00000006,0x00005f37,0x000021c9,0x000021c7, 18230x00000695,0x00050086,0x00000006,0x000021e7,
18720x000021cc,0x000021ca,0x0004007c,0x00000027, 18240x000021e6,0x000001c6,0x00050084,0x00000006,
18730x000021cf,0x00005f37,0x00050041,0x00000009, 18250x00002153,0x000000f3,0x000021e7,0x00050080,
18740x00002159,0x00002131,0x00000315,0x0004003d, 18260x00000006,0x00002154,0x0000215a,0x00002153,
18750x00000006,0x0000215a,0x00002159,0x000500c7, 18270x00050084,0x00000006,0x000020f5,0x000000f3,
18760x00000006,0x000021d4,0x0000215a,0x00000241, 18280x0000142f,0x00050080,0x00000006,0x000020f6,
18770x000500ab,0x0000002f,0x000021d5,0x000021d4, 18290x00002154,0x000020f5,0x00050041,0x0000026e,
18780x00000138,0x000300f7,0x000021dc,0x00000000, 18300x000020f7,0x000001c1,0x0000026c,0x0004003d,
18790x000400fa,0x000021d5,0x000021d6,0x000021d9, 18310x00000007,0x000020f8,0x000020f7,0x00050051,
18800x000200f8,0x000021d9,0x000400c8,0x00000006, 18320x00000006,0x0000220b,0x000020f8,0x00000000,
18810x000021db,0x0000215a,0x000200f9,0x000021dc, 18330x00050095,0x00000145,0x0000220d,0x0000220b,
18820x000200f8,0x000021d6,0x000500c7,0x00000006, 18340x000020f6,0x00050051,0x00000006,0x0000220e,
18830x000021d8,0x0000215a,0x00000256,0x000200f9, 18350x0000220d,0x00000001,0x00050051,0x00000006,
18840x000021dc,0x000200f8,0x000021dc,0x000700f5, 18360x0000220f,0x0000220d,0x00000000,0x00050051,
18850x00000006,0x00005f38,0x000021d8,0x000021d6, 18370x00000006,0x00002212,0x000020f8,0x00000001,
18860x000021db,0x000021d9,0x0004007c,0x00000027, 18380x00050080,0x00000006,0x00002214,0x00002212,
18870x000021de,0x00005f38,0x00060050,0x0000006c, 18390x0000220e,0x00050050,0x00000007,0x00002215,
18880x0000215c,0x000021c0,0x000021cf,0x000021de, 18400x0000220f,0x00002214,0x0004007c,0x00000014,
18890x00050041,0x00000009,0x0000215d,0x00002131, 18410x00002205,0x00002215,0x00060041,0x00000174,
18900x0000031d,0x0004003d,0x00000006,0x0000215e, 18420x000021fc,0x00002205,0x00000173,0x00000173,
18910x0000215d,0x000500c7,0x00000006,0x000021e3, 18430x0006003d,0x00000006,0x000021fd,0x000021fc,
18920x0000215e,0x00000241,0x000500ab,0x0000002f, 18440x00000002,0x00000004,0x00050084,0x00000006,
18930x000021e4,0x000021e3,0x00000138,0x000300f7, 18450x000020fb,0x0000142f,0x000001c6,0x00050080,
18940x000021eb,0x00000000,0x000400fa,0x000021e4, 18460x00000006,0x000020fd,0x000020fb,0x000001c6,
18950x000021e5,0x000021e8,0x000200f8,0x000021e8, 18470x000300f7,0x00002221,0x00000000,0x000400fa,
18960x000400c8,0x00000006,0x000021ea,0x0000215e, 18480x000021a6,0x0000221c,0x00002220,0x000200f8,
18970x000200f9,0x000021eb,0x000200f8,0x000021e5, 18490x00002220,0x000200f9,0x00002221,0x000200f8,
18980x000500c7,0x00000006,0x000021e7,0x0000215e, 18500x0000221c,0x00050082,0x00000006,0x0000221f,
18990x00000256,0x000200f9,0x000021eb,0x000200f8, 18510x0000217e,0x0000014a,0x000200f9,0x00002221,
19000x000021eb,0x000700f5,0x00000006,0x00005f39, 18520x000200f8,0x00002221,0x000700f5,0x00000006,
19010x000021e7,0x000021e5,0x000021ea,0x000021e8, 18530x00006373,0x0000221f,0x0000221c,0x00000140,
19020x0004007c,0x00000027,0x000021ed,0x00005f39, 18540x00002220,0x0007000c,0x00000006,0x000020ff,
19030x00050041,0x00000009,0x00002160,0x00002131, 18550x00000001,0x00000026,0x000020fd,0x00006373,
19040x00000325,0x0004003d,0x00000006,0x00002161, 18560x000200f9,0x00002101,0x000200f8,0x00002101,
19050x00002160,0x000500c7,0x00000006,0x000021f2, 18570x000700f5,0x00000006,0x00006387,0x000021fd,
19060x00002161,0x00000241,0x000500ab,0x0000002f, 18580x00002221,0x0000214a,0x0000214b,0x000700f5,
19070x000021f3,0x000021f2,0x00000138,0x000300f7, 18590x00000006,0x00006374,0x000020fb,0x00002221,
19080x000021fa,0x00000000,0x000400fa,0x000021f3, 18600x0000214d,0x0000214b,0x000500b0,0x0000002f,
19090x000021f4,0x000021f7,0x000200f8,0x000021f7, 18610x00002105,0x00006374,0x000020ff,0x000400f6,
19100x000400c8,0x00000006,0x000021f9,0x00002161, 18620x0000214e,0x0000214b,0x00000000,0x000400fa,
19110x000200f9,0x000021fa,0x000200f8,0x000021f4, 18630x00002105,0x00002106,0x0000214e,0x000200f8,
19120x000500c7,0x00000006,0x000021f6,0x00002161, 18640x00002106,0x00050080,0x00000006,0x00002109,
19130x00000256,0x000200f9,0x000021fa,0x000200f8, 18650x00006374,0x00001432,0x000500b0,0x0000002f,
19140x000021fa,0x000700f5,0x00000006,0x00005f3a, 18660x0000210c,0x00002109,0x000020ff,0x000300f7,
19150x000021f6,0x000021f4,0x000021f9,0x000021f7, 18670x00002116,0x00000000,0x000400fa,0x0000210c,
19160x0004007c,0x00000027,0x000021fc,0x00005f3a, 18680x0000210d,0x00002115,0x000200f8,0x00002115,
19170x00050041,0x00000009,0x00002163,0x00002131, 18690x000200f9,0x00002116,0x000200f8,0x0000210d,
19180x0000032d,0x0004003d,0x00000006,0x00002164, 18700x000300f7,0x0000226e,0x00000000,0x000400fa,
19190x00002163,0x000500c7,0x00000006,0x00002201, 18710x000021a6,0x00002269,0x0000226d,0x000200f8,
19200x00002164,0x00000241,0x000500ab,0x0000002f, 18720x0000226d,0x000200f9,0x0000226e,0x000200f8,
19210x00002202,0x00002201,0x00000138,0x000300f7, 18730x00002269,0x00050082,0x00000006,0x0000226c,
19220x00002209,0x00000000,0x000400fa,0x00002202, 18740x0000217e,0x0000014a,0x000200f9,0x0000226e,
19230x00002203,0x00002206,0x000200f8,0x00002206, 18750x000200f8,0x0000226e,0x000700f5,0x00000006,
19240x000400c8,0x00000006,0x00002208,0x00002164, 18760x00006375,0x0000226c,0x00002269,0x00000140,
19250x000200f9,0x00002209,0x000200f8,0x00002203, 18770x0000226d,0x00050084,0x00000006,0x00002233,
19260x000500c7,0x00000006,0x00002205,0x00002164, 18780x000000f3,0x00006375,0x00050080,0x00000006,
19270x00000256,0x000200f9,0x00002209,0x000200f8, 18790x00002234,0x00002179,0x00002233,0x000300f7,
19280x00002209,0x000700f5,0x00000006,0x00005f3b, 18800x0000227b,0x00000000,0x000400fa,0x000021a6,
19290x00002205,0x00002203,0x00002208,0x00002206, 18810x00002276,0x0000227a,0x000200f8,0x0000227a,
19300x0004007c,0x00000027,0x0000220b,0x00005f3b, 18820x000200f9,0x0000227b,0x000200f8,0x00002276,
19310x00060050,0x0000006c,0x00002166,0x000021ed, 18830x00050082,0x00000006,0x00002279,0x0000217e,
19320x000021fc,0x0000220b,0x000200f9,0x00002167, 18840x0000014a,0x000200f9,0x0000227b,0x000200f8,
19330x000200f8,0x00002167,0x000700f5,0x0000006c, 18850x0000227b,0x000700f5,0x00000006,0x00006376,
19340x00005f40,0x000060fe,0x0000214f,0x00002166, 18860x00002279,0x00002276,0x00000140,0x0000227a,
19350x00002209,0x000700f5,0x0000006c,0x00005f3c, 18870x00050084,0x00000006,0x0000222d,0x000000f3,
19360x00000576,0x0000214f,0x0000215c,0x00002209, 18880x00006376,0x00050080,0x00000006,0x0000222e,
19370x00050041,0x00000266,0x000020b7,0x000001b9, 18890x00002234,0x0000222d,0x000300f7,0x00002288,
19380x0000016b,0x0004003d,0x00000007,0x000020b8, 18900x00000000,0x000400fa,0x000021a6,0x00002283,
19390x000020b7,0x00050051,0x00000027,0x000020ba, 18910x00002287,0x000200f8,0x00002287,0x000200f9,
19400x00005f3c,0x00000000,0x0004007c,0x00000006, 18920x00002288,0x000200f8,0x00002283,0x00050082,
19410x00002211,0x000020ba,0x00050051,0x00000006, 18930x00000006,0x00002286,0x0000217e,0x0000014a,
19420x0000222a,0x000020b8,0x00000000,0x00050095, 18940x000200f9,0x00002288,0x000200f8,0x00002288,
19430x0000013d,0x0000222c,0x0000222a,0x000001db, 18950x000700f5,0x00000006,0x00006377,0x00002286,
19440x00050051,0x00000006,0x0000222d,0x0000222c, 18960x00002283,0x00000140,0x00002287,0x00050084,
19450x00000001,0x00050051,0x00000006,0x0000222e, 18970x00000006,0x00002227,0x000000f3,0x00006377,
19460x0000222c,0x00000000,0x00050051,0x00000006, 18980x00050080,0x00000006,0x00002228,0x0000222e,
19470x00002231,0x000020b8,0x00000001,0x00050080, 18990x00002227,0x00050084,0x00000006,0x00002110,
19480x00000006,0x00002233,0x00002231,0x0000222d, 19000x000000f3,0x00002109,0x00050080,0x00000006,
19490x00050050,0x00000007,0x00002234,0x0000222e, 19010x00002111,0x00002228,0x00002110,0x00050095,
19500x00002233,0x0004007c,0x00000014,0x00002224, 19020x00000145,0x000022a2,0x0000220b,0x00002111,
19510x00002234,0x00060041,0x0000016c,0x0000221c, 19030x00050051,0x00000006,0x000022a3,0x000022a2,
19520x00002224,0x0000016b,0x0000016b,0x0005003e, 19040x00000001,0x00050051,0x00000006,0x000022a4,
19530x0000221c,0x00002211,0x00000002,0x00000004, 19050x000022a2,0x00000000,0x00050080,0x00000006,
19540x00050051,0x00000027,0x000020bf,0x00005f3c, 19060x000022a9,0x00002212,0x000022a3,0x00050050,
19550x00000001,0x0004007c,0x00000006,0x0000223a, 19070x00000007,0x000022aa,0x000022a4,0x000022a9,
19560x000020bf,0x00050095,0x0000013d,0x00002255, 19080x0004007c,0x00000014,0x0000229a,0x000022aa,
19570x0000222a,0x00000299,0x00050051,0x00000006, 19090x00060041,0x00000174,0x00002291,0x0000229a,
19580x00002256,0x00002255,0x00000001,0x00050051, 19100x00000173,0x00000173,0x0006003d,0x00000006,
19590x00000006,0x00002257,0x00002255,0x00000000, 19110x00002292,0x00002291,0x00000002,0x00000004,
19600x00050080,0x00000006,0x0000225c,0x00002231, 19120x000200f9,0x00002116,0x000200f8,0x00002116,
19610x00002256,0x00050050,0x00000007,0x0000225d, 19130x000700f5,0x00000006,0x00006378,0x00002292,
19620x00002257,0x0000225c,0x0004007c,0x00000014, 19140x00002288,0x00000140,0x00002115,0x00050041,
19630x0000224d,0x0000225d,0x00060041,0x0000016c, 19150x0000099d,0x0000211a,0x00000f64,0x00001432,
19640x00002245,0x0000224d,0x0000016b,0x0000016b, 19160x0003003e,0x0000211a,0x00006378,0x000400e0,
19650x0005003e,0x00002245,0x0000223a,0x00000002, 19170x00000288,0x00000288,0x000009b5,0x000200f9,
19660x00000004,0x00050051,0x00000027,0x000020c4, 19180x0000211b,0x000200f8,0x0000211b,0x000700f5,
19670x00005f3c,0x00000002,0x0004007c,0x00000006, 19190x00000006,0x00006379,0x0000014a,0x00002116,
19680x00002263,0x000020c4,0x00050095,0x0000013d, 19200x00002134,0x00002132,0x000500b0,0x0000002f,
19690x0000227e,0x0000222a,0x000001ef,0x00050051, 19210x0000211e,0x00006379,0x000001cc,0x000400f6,
19700x00000006,0x0000227f,0x0000227e,0x00000001, 19220x00002135,0x00002132,0x00000000,0x000400fa,
19710x00050051,0x00000006,0x00002280,0x0000227e, 19230x0000211e,0x0000211f,0x00002135,0x000200f8,
19720x00000000,0x00050080,0x00000006,0x00002285, 19240x0000211f,0x000500ae,0x0000002f,0x00002122,
19730x00002231,0x0000227f,0x00050050,0x00000007, 19250x00001432,0x00006379,0x000300f7,0x0000212a,
19740x00002286,0x00002280,0x00002285,0x0004007c, 19260x00000000,0x000400fa,0x00002122,0x00002123,
19750x00000014,0x00002276,0x00002286,0x00060041, 19270x00002129,0x000200f8,0x00002129,0x000200f9,
19760x0000016c,0x0000226e,0x00002276,0x0000016b, 19280x0000212a,0x000200f8,0x00002123,0x00050082,
19770x0000016b,0x0005003e,0x0000226e,0x00002263, 19290x00000006,0x00002126,0x00001432,0x00006379,
19300x00050041,0x0000099d,0x00002127,0x00000f64,
19310x00002126,0x0004003d,0x00000006,0x00002128,
19320x00002127,0x000200f9,0x0000212a,0x000200f8,
19330x0000212a,0x000700f5,0x00000006,0x00006394,
19340x00002128,0x00002123,0x00000140,0x00002129,
19350x000400e0,0x00000288,0x00000288,0x000009b5,
19360x0004003d,0x00000006,0x0000212f,0x0000211a,
19370x00050080,0x00000006,0x00002130,0x0000212f,
19380x00006394,0x0003003e,0x0000211a,0x00002130,
19390x000400e0,0x00000288,0x00000288,0x000009b5,
19400x000200f9,0x00002132,0x000200f8,0x00002132,
19410x000500c4,0x00000006,0x00002134,0x00006379,
19420x0000026c,0x000200f9,0x0000211b,0x000200f8,
19430x00002135,0x000500ab,0x0000002f,0x00002137,
19440x00006378,0x00000140,0x000300f7,0x00002146,
19450x00000000,0x000400fa,0x00002137,0x00002138,
19460x00002146,0x000200f8,0x00002138,0x000300f7,
19470x000022fc,0x00000000,0x000400fa,0x000021a6,
19480x000022f7,0x000022fb,0x000200f8,0x000022fb,
19490x000200f9,0x000022fc,0x000200f8,0x000022f7,
19500x00050082,0x00000006,0x000022fa,0x0000217e,
19510x0000014a,0x000200f9,0x000022fc,0x000200f8,
19520x000022fc,0x000700f5,0x00000006,0x0000637a,
19530x000022fa,0x000022f7,0x00000140,0x000022fb,
19540x00050084,0x00000006,0x000022c1,0x000000f3,
19550x0000637a,0x00050080,0x00000006,0x000022c2,
19560x00002179,0x000022c1,0x000300f7,0x00002309,
19570x00000000,0x000400fa,0x000021a6,0x00002304,
19580x00002308,0x000200f8,0x00002308,0x000200f9,
19590x00002309,0x000200f8,0x00002304,0x00050082,
19600x00000006,0x00002307,0x0000217e,0x0000014a,
19610x000200f9,0x00002309,0x000200f8,0x00002309,
19620x000700f5,0x00000006,0x0000637b,0x00002307,
19630x00002304,0x00000140,0x00002308,0x00050084,
19640x00000006,0x000022bb,0x000000f3,0x0000637b,
19650x00050080,0x00000006,0x000022bc,0x000022c2,
19660x000022bb,0x000300f7,0x00002316,0x00000000,
19670x000400fa,0x000021a6,0x00002311,0x00002315,
19680x000200f8,0x00002315,0x000200f9,0x00002316,
19690x000200f8,0x00002311,0x00050082,0x00000006,
19700x00002314,0x0000217e,0x0000014a,0x000200f9,
19710x00002316,0x000200f8,0x00002316,0x000700f5,
19720x00000006,0x0000637c,0x00002314,0x00002311,
19730x00000140,0x00002315,0x00050084,0x00000006,
19740x000022b5,0x000000f3,0x0000637c,0x00050080,
19750x00000006,0x000022b6,0x000022bc,0x000022b5,
19760x000300f7,0x00002323,0x00000000,0x000400fa,
19770x000021a6,0x0000231e,0x00002322,0x000200f8,
19780x00002322,0x000200f9,0x00002323,0x000200f8,
19790x0000231e,0x00050082,0x00000006,0x00002321,
19800x0000217e,0x0000014a,0x000200f9,0x00002323,
19810x000200f8,0x00002323,0x000700f5,0x00000006,
19820x0000637d,0x00002321,0x0000231e,0x00000140,
19830x00002322,0x00050084,0x00000006,0x000022af,
19840x000000f3,0x0000637d,0x00050080,0x00000006,
19850x000022b0,0x000022b6,0x000022af,0x00050084,
19860x00000006,0x0000213b,0x000000f3,0x00002109,
19870x00050080,0x00000006,0x0000213c,0x000022b0,
19880x0000213b,0x0004003d,0x00000006,0x00002140,
19890x0000211a,0x00050080,0x00000006,0x00002141,
19900x00006387,0x00002140,0x00050082,0x00000006,
19910x00002142,0x00002141,0x0000014a,0x00050095,
19920x00000145,0x0000233c,0x0000220b,0x0000213c,
19930x00050051,0x00000006,0x0000233d,0x0000233c,
19940x00000001,0x00050051,0x00000006,0x0000233e,
19950x0000233c,0x00000000,0x00050080,0x00000006,
19960x00002343,0x00002212,0x0000233d,0x00050050,
19970x00000007,0x00002344,0x0000233e,0x00002343,
19980x0004007c,0x00000014,0x00002334,0x00002344,
19990x00060041,0x00000174,0x0000232c,0x00002334,
20000x00000173,0x00000173,0x0005003e,0x0000232c,
20010x00002142,0x00000002,0x00000004,0x000200f9,
20020x00002146,0x000200f8,0x00002146,0x00050041,
20030x0000099d,0x00002147,0x00000f64,0x00000c01,
20040x0004003d,0x00000006,0x00002148,0x00002147,
20050x00050080,0x00000006,0x0000214a,0x00006387,
20060x00002148,0x000400e0,0x00000288,0x00000288,
20070x000009b5,0x000200f9,0x0000214b,0x000200f8,
20080x0000214b,0x00050080,0x00000006,0x0000214d,
20090x00006374,0x000001cc,0x000200f9,0x00002101,
20100x000200f8,0x0000214e,0x000200f9,0x000014ef,
20110x000200f8,0x0000142c,0x000500aa,0x0000002f,
20120x00001437,0x000013be,0x0000035d,0x000300f7,
20130x00001439,0x00000000,0x000400fa,0x00001437,
20140x00001438,0x00001439,0x000200f8,0x00001438,
20150x000500aa,0x0000002f,0x0000143b,0x000013a7,
20160x00000140,0x000300f7,0x0000143d,0x00000000,
20170x000400fa,0x0000143b,0x0000143c,0x0000143d,
20180x000200f8,0x0000143c,0x000300f7,0x000023ff,
20190x00000000,0x000300fb,0x00000140,0x00002386,
20200x000200f8,0x00002386,0x000300f7,0x0000243a,
20210x00000000,0x000300fb,0x00000140,0x0000240c,
20220x000200f8,0x0000240c,0x00050041,0x000001c3,
20230x0000245b,0x000001c1,0x000001c2,0x0004003d,
20240x00000006,0x0000245c,0x0000245b,0x00050084,
20250x00000006,0x0000245d,0x000001e3,0x0000245c,
20260x00050080,0x00000006,0x0000245e,0x000001cc,
20270x0000245d,0x00050080,0x00000006,0x00002464,
20280x0000245c,0x00000695,0x00050086,0x00000006,
20290x00002465,0x00002464,0x000001c6,0x00050084,
20300x00000006,0x00002457,0x000001cc,0x00002465,
20310x00050080,0x00000006,0x00002458,0x0000245e,
20320x00002457,0x00050080,0x00000006,0x00002452,
20330x00002458,0x00002457,0x00050041,0x000001c3,
20340x00002449,0x000001c1,0x000001f8,0x0004003d,
20350x00000006,0x0000244a,0x00002449,0x00050084,
20360x00000006,0x0000244b,0x000001f7,0x0000244a,
20370x00050080,0x00000006,0x0000244c,0x00002452,
20380x0000244b,0x00050041,0x0000026e,0x00002443,
20390x000001c1,0x0000026c,0x0004003d,0x00000007,
20400x00002444,0x00002443,0x00050051,0x00000006,
20410x0000247a,0x00002444,0x00000000,0x00050095,
20420x00000145,0x0000247c,0x0000247a,0x0000244c,
20430x00050051,0x00000006,0x0000247d,0x0000247c,
20440x00000001,0x00050051,0x00000006,0x0000247e,
20450x0000247c,0x00000000,0x00050051,0x00000006,
20460x00002481,0x00002444,0x00000001,0x00050080,
20470x00000006,0x00002483,0x00002481,0x0000247d,
20480x00050050,0x00000007,0x00002484,0x0000247e,
20490x00002483,0x0004007c,0x00000014,0x00002474,
20500x00002484,0x000200f9,0x0000240f,0x000200f8,
20510x0000240f,0x000700f5,0x00000006,0x0000635d,
20520x00000140,0x0000240c,0x0000241d,0x00002413,
20530x000500b0,0x0000002f,0x00002412,0x0000635d,
20540x0000035d,0x000400f6,0x0000241e,0x00002413,
20550x00000000,0x000400fa,0x00002412,0x00002413,
20560x0000241e,0x000200f8,0x00002413,0x00050080,
20570x00000006,0x00002417,0x0000014a,0x0000635d,
20580x00060041,0x00000174,0x00002418,0x00002474,
20590x00000173,0x00002417,0x000700f1,0x00000006,
20600x00002419,0x00002418,0x0000014a,0x00000140,
20610x00000140,0x00050041,0x00000009,0x0000241a,
20620x00002404,0x0000635d,0x0003003e,0x0000241a,
20630x00002419,0x00050080,0x00000006,0x0000241d,
20640x0000635d,0x0000026c,0x000200f9,0x0000240f,
20650x000200f8,0x0000241e,0x00050041,0x00000009,
20660x0000241f,0x00002404,0x00000173,0x0004003d,
20670x00000006,0x00002420,0x0000241f,0x000500aa,
20680x0000002f,0x00002421,0x00002420,0x000003bf,
20690x000300f7,0x00002425,0x00000000,0x000400fa,
20700x00002421,0x00002422,0x00002425,0x000200f8,
20710x00002422,0x000200f9,0x0000243a,0x000200f8,
20720x00002425,0x0004003d,0x00000006,0x00002427,
20730x0000241f,0x000500c7,0x00000006,0x00002489,
20740x00002427,0x00000249,0x000500ab,0x0000002f,
20750x0000248a,0x00002489,0x00000140,0x000300f7,
20760x00002491,0x00000000,0x000400fa,0x0000248a,
20770x0000248b,0x0000248e,0x000200f8,0x0000248e,
20780x000400c8,0x00000006,0x00002490,0x00002427,
20790x000200f9,0x00002491,0x000200f8,0x0000248b,
20800x000500c7,0x00000006,0x0000248d,0x00002427,
20810x0000025e,0x000200f9,0x00002491,0x000200f8,
20820x00002491,0x000700f5,0x00000006,0x0000635e,
20830x0000248d,0x0000248b,0x00002490,0x0000248e,
20840x0004007c,0x00000027,0x00002493,0x0000635e,
20850x00050041,0x00000009,0x00002429,0x00002404,
20860x0000026c,0x0004003d,0x00000006,0x0000242a,
20870x00002429,0x000500c7,0x00000006,0x00002498,
20880x0000242a,0x00000249,0x000500ab,0x0000002f,
20890x00002499,0x00002498,0x00000140,0x000300f7,
20900x000024a0,0x00000000,0x000400fa,0x00002499,
20910x0000249a,0x0000249d,0x000200f8,0x0000249d,
20920x000400c8,0x00000006,0x0000249f,0x0000242a,
20930x000200f9,0x000024a0,0x000200f8,0x0000249a,
20940x000500c7,0x00000006,0x0000249c,0x0000242a,
20950x0000025e,0x000200f9,0x000024a0,0x000200f8,
20960x000024a0,0x000700f5,0x00000006,0x0000635f,
20970x0000249c,0x0000249a,0x0000249f,0x0000249d,
20980x0004007c,0x00000027,0x000024a2,0x0000635f,
20990x00050041,0x00000009,0x0000242c,0x00002404,
21000x0000031d,0x0004003d,0x00000006,0x0000242d,
21010x0000242c,0x000500c7,0x00000006,0x000024a7,
21020x0000242d,0x00000249,0x000500ab,0x0000002f,
21030x000024a8,0x000024a7,0x00000140,0x000300f7,
21040x000024af,0x00000000,0x000400fa,0x000024a8,
21050x000024a9,0x000024ac,0x000200f8,0x000024ac,
21060x000400c8,0x00000006,0x000024ae,0x0000242d,
21070x000200f9,0x000024af,0x000200f8,0x000024a9,
21080x000500c7,0x00000006,0x000024ab,0x0000242d,
21090x0000025e,0x000200f9,0x000024af,0x000200f8,
21100x000024af,0x000700f5,0x00000006,0x00006360,
21110x000024ab,0x000024a9,0x000024ae,0x000024ac,
21120x0004007c,0x00000027,0x000024b1,0x00006360,
21130x00060050,0x0000006c,0x0000242f,0x00002493,
21140x000024a2,0x000024b1,0x00050041,0x00000009,
21150x00002430,0x00002404,0x00000325,0x0004003d,
21160x00000006,0x00002431,0x00002430,0x000500c7,
21170x00000006,0x000024b6,0x00002431,0x00000249,
21180x000500ab,0x0000002f,0x000024b7,0x000024b6,
21190x00000140,0x000300f7,0x000024be,0x00000000,
21200x000400fa,0x000024b7,0x000024b8,0x000024bb,
21210x000200f8,0x000024bb,0x000400c8,0x00000006,
21220x000024bd,0x00002431,0x000200f9,0x000024be,
21230x000200f8,0x000024b8,0x000500c7,0x00000006,
21240x000024ba,0x00002431,0x0000025e,0x000200f9,
21250x000024be,0x000200f8,0x000024be,0x000700f5,
21260x00000006,0x00006361,0x000024ba,0x000024b8,
21270x000024bd,0x000024bb,0x0004007c,0x00000027,
21280x000024c0,0x00006361,0x00050041,0x00000009,
21290x00002433,0x00002404,0x0000032d,0x0004003d,
21300x00000006,0x00002434,0x00002433,0x000500c7,
21310x00000006,0x000024c5,0x00002434,0x00000249,
21320x000500ab,0x0000002f,0x000024c6,0x000024c5,
21330x00000140,0x000300f7,0x000024cd,0x00000000,
21340x000400fa,0x000024c6,0x000024c7,0x000024ca,
21350x000200f8,0x000024ca,0x000400c8,0x00000006,
21360x000024cc,0x00002434,0x000200f9,0x000024cd,
21370x000200f8,0x000024c7,0x000500c7,0x00000006,
21380x000024c9,0x00002434,0x0000025e,0x000200f9,
21390x000024cd,0x000200f8,0x000024cd,0x000700f5,
21400x00000006,0x00006362,0x000024c9,0x000024c7,
21410x000024cc,0x000024ca,0x0004007c,0x00000027,
21420x000024cf,0x00006362,0x00050041,0x00000009,
21430x00002436,0x00002404,0x00000335,0x0004003d,
21440x00000006,0x00002437,0x00002436,0x000500c7,
21450x00000006,0x000024d4,0x00002437,0x00000249,
21460x000500ab,0x0000002f,0x000024d5,0x000024d4,
21470x00000140,0x000300f7,0x000024dc,0x00000000,
21480x000400fa,0x000024d5,0x000024d6,0x000024d9,
21490x000200f8,0x000024d9,0x000400c8,0x00000006,
21500x000024db,0x00002437,0x000200f9,0x000024dc,
21510x000200f8,0x000024d6,0x000500c7,0x00000006,
21520x000024d8,0x00002437,0x0000025e,0x000200f9,
21530x000024dc,0x000200f8,0x000024dc,0x000700f5,
21540x00000006,0x00006363,0x000024d8,0x000024d6,
21550x000024db,0x000024d9,0x0004007c,0x00000027,
21560x000024de,0x00006363,0x00060050,0x0000006c,
21570x00002439,0x000024c0,0x000024cf,0x000024de,
21580x000200f9,0x0000243a,0x000200f8,0x0000243a,
21590x000700f5,0x0000006c,0x00006368,0x00006532,
21600x00002422,0x00002439,0x000024dc,0x000700f5,
21610x0000006c,0x00006364,0x000005dc,0x00002422,
21620x0000242f,0x000024dc,0x00050041,0x0000026e,
21630x0000238a,0x000001c1,0x00000173,0x0004003d,
21640x00000007,0x0000238b,0x0000238a,0x00050051,
21650x00000027,0x0000238d,0x00006364,0x00000000,
21660x0004007c,0x00000006,0x000024e4,0x0000238d,
21670x00050051,0x00000006,0x000024fd,0x0000238b,
21680x00000000,0x00050095,0x00000145,0x000024ff,
21690x000024fd,0x000001e3,0x00050051,0x00000006,
21700x00002500,0x000024ff,0x00000001,0x00050051,
21710x00000006,0x00002501,0x000024ff,0x00000000,
21720x00050051,0x00000006,0x00002504,0x0000238b,
21730x00000001,0x00050080,0x00000006,0x00002506,
21740x00002504,0x00002500,0x00050050,0x00000007,
21750x00002507,0x00002501,0x00002506,0x0004007c,
21760x00000014,0x000024f7,0x00002507,0x00060041,
21770x00000174,0x000024ef,0x000024f7,0x00000173,
21780x00000173,0x0005003e,0x000024ef,0x000024e4,
19780x00000002,0x00000004,0x00050051,0x00000027, 21790x00000002,0x00000004,0x00050051,0x00000027,
19790x000020c9,0x00005f40,0x00000000,0x0004007c, 21800x00002392,0x00006364,0x00000001,0x0004007c,
19800x00000006,0x0000228c,0x000020c9,0x00050095, 21810x00000006,0x0000250d,0x00002392,0x00050095,
19810x0000013d,0x000022a7,0x0000222a,0x000006d9, 21820x00000145,0x00002528,0x000024fd,0x000002a1,
19820x00050051,0x00000006,0x000022a8,0x000022a7, 21830x00050051,0x00000006,0x00002529,0x00002528,
19830x00000001,0x00050051,0x00000006,0x000022a9, 21840x00000001,0x00050051,0x00000006,0x0000252a,
19840x000022a7,0x00000000,0x00050080,0x00000006, 21850x00002528,0x00000000,0x00050080,0x00000006,
19850x000022ae,0x00002231,0x000022a8,0x00050050, 21860x0000252f,0x00002504,0x00002529,0x00050050,
19860x00000007,0x000022af,0x000022a9,0x000022ae, 21870x00000007,0x00002530,0x0000252a,0x0000252f,
19870x0004007c,0x00000014,0x0000229f,0x000022af, 21880x0004007c,0x00000014,0x00002520,0x00002530,
19880x00060041,0x0000016c,0x00002297,0x0000229f, 21890x00060041,0x00000174,0x00002518,0x00002520,
19890x0000016b,0x0000016b,0x0005003e,0x00002297, 21900x00000173,0x00000173,0x0005003e,0x00002518,
19900x0000228c,0x00000002,0x00000004,0x00050051, 21910x0000250d,0x00000002,0x00000004,0x00050051,
19910x00000027,0x000020ce,0x00005f40,0x00000001, 21920x00000027,0x00002397,0x00006364,0x00000002,
19920x0004007c,0x00000006,0x000022b5,0x000020ce, 21930x0004007c,0x00000006,0x00002536,0x00002397,
19930x00050095,0x0000013d,0x000022d0,0x0000222a, 21940x00050095,0x00000145,0x00002551,0x000024fd,
19940x00000205,0x00050051,0x00000006,0x000022d1, 21950x000001f7,0x00050051,0x00000006,0x00002552,
19950x000022d0,0x00000001,0x00050051,0x00000006, 21960x00002551,0x00000001,0x00050051,0x00000006,
19960x000022d2,0x000022d0,0x00000000,0x00050080, 21970x00002553,0x00002551,0x00000000,0x00050080,
19970x00000006,0x000022d7,0x00002231,0x000022d1, 21980x00000006,0x00002558,0x00002504,0x00002552,
19980x00050050,0x00000007,0x000022d8,0x000022d2, 21990x00050050,0x00000007,0x00002559,0x00002553,
19990x000022d7,0x0004007c,0x00000014,0x000022c8, 22000x00002558,0x0004007c,0x00000014,0x00002549,
20000x000022d8,0x00060041,0x0000016c,0x000022c0, 22010x00002559,0x00060041,0x00000174,0x00002541,
20010x000022c8,0x0000016b,0x0000016b,0x0005003e, 22020x00002549,0x00000173,0x00000173,0x0005003e,
20020x000022c0,0x000022b5,0x00000002,0x00000004, 22030x00002541,0x00002536,0x00000002,0x00000004,
20030x00050051,0x00000027,0x000020d3,0x00005f40, 22040x00050051,0x00000027,0x0000239c,0x00006368,
20040x00000002,0x0004007c,0x00000006,0x000022de, 22050x00000000,0x0004007c,0x00000006,0x0000255f,
20050x000020d3,0x00050095,0x0000013d,0x000022f9, 22060x0000239c,0x00050095,0x00000145,0x0000257a,
20060x0000222a,0x00000500,0x00050051,0x00000006, 22070x000024fd,0x0000073f,0x00050051,0x00000006,
20070x000022fa,0x000022f9,0x00000001,0x00050051, 22080x0000257b,0x0000257a,0x00000001,0x00050051,
20080x00000006,0x000022fb,0x000022f9,0x00000000, 22090x00000006,0x0000257c,0x0000257a,0x00000000,
20090x00050080,0x00000006,0x00002300,0x00002231, 22100x00050080,0x00000006,0x00002581,0x00002504,
20100x000022fa,0x00050050,0x00000007,0x00002301, 22110x0000257b,0x00050050,0x00000007,0x00002582,
20110x000022fb,0x00002300,0x0004007c,0x00000014, 22120x0000257c,0x00002581,0x0004007c,0x00000014,
20120x000022f1,0x00002301,0x00060041,0x0000016c, 22130x00002572,0x00002582,0x00060041,0x00000174,
20130x000022e9,0x000022f1,0x0000016b,0x0000016b, 22140x0000256a,0x00002572,0x00000173,0x00000173,
20140x0005003e,0x000022e9,0x000022de,0x00000002, 22150x0005003e,0x0000256a,0x0000255f,0x00000002,
20150x00000004,0x00050041,0x000001bb,0x000020d5, 22160x00000004,0x00050051,0x00000027,0x000023a1,
20160x000001b9,0x00000434,0x0004003d,0x00000006, 22170x00006368,0x00000001,0x0004007c,0x00000006,
20170x000020d6,0x000020d5,0x000500aa,0x0000002f, 22180x00002588,0x000023a1,0x00050095,0x00000145,
20180x000020d7,0x000020d6,0x00000142,0x000300f7, 22190x000025a3,0x000024fd,0x0000020d,0x00050051,
20190x000020d9,0x00000000,0x000400fa,0x000020d7, 22200x00000006,0x000025a4,0x000025a3,0x00000001,
20200x000020d8,0x000020d9,0x000200f8,0x000020d8, 22210x00050051,0x00000006,0x000025a5,0x000025a3,
20210x000200f9,0x0000212c,0x000200f8,0x000020d9, 22220x00000000,0x00050080,0x00000006,0x000025aa,
20220x000500b2,0x0000002f,0x000020dc,0x00002177, 22230x00002504,0x000025a4,0x00050050,0x00000007,
20230x00000142,0x000300f7,0x000020e2,0x00000000, 22240x000025ab,0x000025a5,0x000025aa,0x0004007c,
20240x000400fa,0x000020dc,0x000020dd,0x000020de, 22250x00000014,0x0000259b,0x000025ab,0x00060041,
20250x000200f8,0x000020de,0x00050095,0x0000013d, 22260x00000174,0x00002593,0x0000259b,0x00000173,
20260x0000231a,0x000021a7,0x000001ef,0x00050051, 22270x00000173,0x0005003e,0x00002593,0x00002588,
20270x00000006,0x0000231b,0x0000231a,0x00000001, 22280x00000002,0x00000004,0x00050051,0x00000027,
20280x00050051,0x00000006,0x0000231c,0x0000231a, 22290x000023a6,0x00006368,0x00000002,0x0004007c,
20290x00000000,0x00050080,0x00000006,0x00002321, 22300x00000006,0x000025b1,0x000023a6,0x00050095,
20300x000021ae,0x0000231b,0x00050050,0x00000007, 22310x00000145,0x000025cc,0x000024fd,0x00000567,
20310x00002322,0x0000231c,0x00002321,0x0004007c, 22320x00050051,0x00000006,0x000025cd,0x000025cc,
20320x00000014,0x00002312,0x00002322,0x00060041, 22330x00000001,0x00050051,0x00000006,0x000025ce,
20330x0000016c,0x00002309,0x00002312,0x0000016b, 22340x000025cc,0x00000000,0x00050080,0x00000006,
20340x0000016b,0x0006003d,0x00000006,0x0000230a, 22350x000025d3,0x00002504,0x000025cd,0x00050050,
20350x00002309,0x00000002,0x00000004,0x000200f9, 22360x00000007,0x000025d4,0x000025ce,0x000025d3,
20360x000020e2,0x000200f8,0x000020dd,0x000200f9, 22370x0004007c,0x00000014,0x000025c4,0x000025d4,
20370x000020e2,0x000200f8,0x000020e2,0x000700f5, 22380x00060041,0x00000174,0x000025bc,0x000025c4,
20380x00000006,0x00005f41,0x00000142,0x000020dd, 22390x00000173,0x00000173,0x0005003e,0x000025bc,
20390x0000230a,0x000020de,0x00050041,0x000001bb, 22400x000025b1,0x00000002,0x00000004,0x00050041,
20400x000020e4,0x000001b9,0x0000035a,0x0004003d, 22410x000001c3,0x000023a8,0x000001c1,0x0000049b,
20410x00000006,0x000020e5,0x000020e4,0x00050041, 22420x0004003d,0x00000006,0x000023a9,0x000023a8,
20420x000001bb,0x00002329,0x000001b9,0x00000334, 22430x000500aa,0x0000002f,0x000023aa,0x000023a9,
20430x0004003d,0x00000006,0x0000232a,0x00002329, 22440x0000014a,0x000300f7,0x000023ac,0x00000000,
20440x000500c7,0x00000006,0x0000232b,0x0000232a, 22450x000400fa,0x000023aa,0x000023ab,0x000023ac,
20450x00000280,0x000500ab,0x0000002f,0x0000232c, 22460x000200f8,0x000023ab,0x000200f9,0x000023ff,
20460x0000232b,0x00000138,0x000600a9,0x00000006, 22470x000200f8,0x000023ac,0x000500b2,0x0000002f,
20470x00002326,0x0000232c,0x000001c4,0x00000342, 22480x000023af,0x0000244a,0x0000014a,0x000300f7,
20480x00050084,0x00000006,0x000020e8,0x00002326, 22490x000023b5,0x00000000,0x000400fa,0x000023af,
20490x00005f41,0x00050080,0x00000006,0x000020e9, 22500x000023b0,0x000023b1,0x000200f8,0x000023b1,
20500x000020e5,0x000020e8,0x000300f7,0x000020fe, 22510x00050095,0x00000145,0x000025ed,0x0000247a,
20510x00000000,0x000400fa,0x0000232c,0x000020eb, 22520x000001f7,0x00050051,0x00000006,0x000025ee,
20520x000020fe,0x000200f8,0x000020eb,0x000200f9, 22530x000025ed,0x00000001,0x00050051,0x00000006,
20530x000020ec,0x000200f8,0x000020ec,0x000700f5, 22540x000025ef,0x000025ed,0x00000000,0x00050080,
20540x00000006,0x00005f42,0x00000138,0x000020eb, 22550x00000006,0x000025f4,0x00002481,0x000025ee,
20550x000020fa,0x000020f0,0x000500b0,0x0000002f, 22560x00050050,0x00000007,0x000025f5,0x000025ef,
20560x000020ef,0x00005f42,0x000001db,0x000400f6, 22570x000025f4,0x0004007c,0x00000014,0x000025e5,
20570x000020fb,0x000020f0,0x00000000,0x000400fa, 22580x000025f5,0x00060041,0x00000174,0x000025dc,
20580x000020ef,0x000020f0,0x000020fb,0x000200f8, 22590x000025e5,0x00000173,0x00000173,0x0006003d,
20590x000020f0,0x00050084,0x00000006,0x000020f3, 22600x00000006,0x000025dd,0x000025dc,0x00000002,
20600x000000ec,0x00005f42,0x00050080,0x00000006, 22610x00000004,0x000200f9,0x000023b5,0x000200f8,
20610x000020f4,0x000020e9,0x000020f3,0x00050095, 22620x000023b0,0x000200f9,0x000023b5,0x000200f8,
20620x0000013d,0x0000234a,0x0000222a,0x000020f4, 22630x000023b5,0x000700f5,0x00000006,0x00006369,
20630x00050051,0x00000006,0x0000234b,0x0000234a, 22640x0000014a,0x000023b0,0x000025dd,0x000023b1,
20640x00000001,0x00050051,0x00000006,0x0000234c, 22650x00050041,0x000001c3,0x000023b7,0x000001c1,
20650x0000234a,0x00000000,0x00050080,0x00000006, 22660x00000362,0x0004003d,0x00000006,0x000023b8,
20660x00002351,0x00002231,0x0000234b,0x00050050, 22670x000023b7,0x000500c7,0x00000006,0x000025fe,
20670x00000007,0x00002352,0x0000234c,0x00002351, 22680x000013a9,0x00000288,0x000500ab,0x0000002f,
20680x0004007c,0x00000014,0x00002342,0x00002352, 22690x000025ff,0x000025fe,0x00000140,0x000600a9,
20690x00060041,0x0000016c,0x0000233a,0x00002342, 22700x00000006,0x000025f9,0x000025ff,0x000001cc,
20700x0000016b,0x0000016b,0x0005003e,0x0000233a, 22710x0000034a,0x00050084,0x00000006,0x000023bb,
20710x00000138,0x00000002,0x00000004,0x00050080, 22720x000025f9,0x00006369,0x00050080,0x00000006,
20720x00000006,0x000020fa,0x00005f42,0x00000264, 22730x000023bc,0x000023b8,0x000023bb,0x000300f7,
20730x000200f9,0x000020ec,0x000200f8,0x000020fb, 22740x000023d1,0x00000000,0x000400fa,0x000025ff,
20740x00050080,0x00000006,0x000020fd,0x000020e9, 22750x000023be,0x000023d1,0x000200f8,0x000023be,
20750x000001c4,0x000200f9,0x000020fe,0x000200f8, 22760x000200f9,0x000023bf,0x000200f8,0x000023bf,
20760x000020fe,0x000700f5,0x00000006,0x00005f44, 22770x000700f5,0x00000006,0x0000636a,0x00000140,
20770x000020e9,0x000020e2,0x000020fd,0x000020fb, 22780x000023be,0x000023cd,0x000023c3,0x000500b0,
20780x000500c7,0x00000006,0x00002357,0x0000232a, 22790x0000002f,0x000023c2,0x0000636a,0x000001e3,
20790x00000142,0x000500ab,0x0000002f,0x00002358, 22800x000400f6,0x000023ce,0x000023c3,0x00000000,
20800x00002357,0x00000138,0x000600a9,0x00000006, 22810x000400fa,0x000023c2,0x000023c3,0x000023ce,
20810x00002101,0x00002358,0x00000355,0x0000610e, 22820x000200f8,0x000023c3,0x00050084,0x00000006,
20820x00050095,0x0000013d,0x00002370,0x0000222a, 22830x000023c6,0x000000f3,0x0000636a,0x00050080,
20830x00000138,0x00050051,0x00000006,0x00002371, 22840x00000006,0x000023c7,0x000023bc,0x000023c6,
20840x00002370,0x00000001,0x00050051,0x00000006, 22850x00050095,0x00000145,0x0000261d,0x000024fd,
20850x00002372,0x00002370,0x00000000,0x00050080, 22860x000023c7,0x00050051,0x00000006,0x0000261e,
20860x00000006,0x00002377,0x00002231,0x00002371, 22870x0000261d,0x00000001,0x00050051,0x00000006,
20870x00050050,0x00000007,0x00002378,0x00002372, 22880x0000261f,0x0000261d,0x00000000,0x00050080,
20880x00002377,0x0004007c,0x00000014,0x00002368, 22890x00000006,0x00002624,0x00002504,0x0000261e,
20890x00002378,0x00060041,0x0000016c,0x00002360, 22900x00050050,0x00000007,0x00002625,0x0000261f,
20900x00002368,0x0000016b,0x0000016b,0x0005003e, 22910x00002624,0x0004007c,0x00000014,0x00002615,
20910x00002360,0x00002101,0x00000002,0x00000004, 22920x00002625,0x00060041,0x00000174,0x0000260d,
20920x00050086,0x00000006,0x00002106,0x00005f44, 22930x00002615,0x00000173,0x00000173,0x0005003e,
20930x000001c4,0x00050082,0x00000006,0x00002107, 22940x0000260d,0x00000140,0x00000002,0x00000004,
20940x00002106,0x00000142,0x00050095,0x0000013d, 22950x00050080,0x00000006,0x000023cd,0x0000636a,
20950x00002390,0x0000222a,0x000000ec,0x00050051, 22960x0000026c,0x000200f9,0x000023bf,0x000200f8,
20960x00000006,0x00002391,0x00002390,0x00000001, 22970x000023ce,0x00050080,0x00000006,0x000023d0,
20970x00050051,0x00000006,0x00002392,0x00002390, 22980x000023bc,0x000001cc,0x000200f9,0x000023d1,
20980x00000000,0x00050080,0x00000006,0x00002397, 22990x000200f8,0x000023d1,0x000700f5,0x00000006,
20990x00002231,0x00002391,0x00050050,0x00000007, 23000x0000636c,0x000023bc,0x000023b5,0x000023d0,
21000x00002398,0x00002392,0x00002397,0x0004007c, 23010x000023ce,0x000500c7,0x00000006,0x0000262a,
21010x00000014,0x00002388,0x00002398,0x00060041, 23020x000013a9,0x0000014a,0x000500ab,0x0000002f,
21020x0000016c,0x00002380,0x00002388,0x0000016b, 23030x0000262b,0x0000262a,0x00000140,0x000600a9,
21030x0000016b,0x0005003e,0x00002380,0x00002107, 23040x00000006,0x000023d4,0x0000262b,0x0000035d,
21040x00000002,0x00000004,0x00050095,0x0000013d, 23050x00006542,0x00050095,0x00000145,0x00002643,
21050x000023b0,0x0000222a,0x000001cd,0x00050051, 23060x000024fd,0x00000140,0x00050051,0x00000006,
21060x00000006,0x000023b1,0x000023b0,0x00000001, 23070x00002644,0x00002643,0x00000001,0x00050051,
21070x00050051,0x00000006,0x000023b2,0x000023b0, 23080x00000006,0x00002645,0x00002643,0x00000000,
21080x00000000,0x00050080,0x00000006,0x000023b7, 23090x00050080,0x00000006,0x0000264a,0x00002504,
21090x00002231,0x000023b1,0x00050050,0x00000007, 23100x00002644,0x00050050,0x00000007,0x0000264b,
21100x000023b8,0x000023b2,0x000023b7,0x0004007c, 23110x00002645,0x0000264a,0x0004007c,0x00000014,
21110x00000014,0x000023a8,0x000023b8,0x00060041, 23120x0000263b,0x0000264b,0x00060041,0x00000174,
21120x0000016c,0x000023a0,0x000023a8,0x0000016b, 23130x00002633,0x0000263b,0x00000173,0x00000173,
21130x0000016b,0x0005003e,0x000023a0,0x00000138, 23140x0005003e,0x00002633,0x000023d4,0x00000002,
21140x00000002,0x00000004,0x00050095,0x0000013d, 23150x00000004,0x00050086,0x00000006,0x000023d9,
21150x000023d0,0x0000222a,0x000001d4,0x00050051, 23160x0000636c,0x000001cc,0x00050082,0x00000006,
21160x00000006,0x000023d1,0x000023d0,0x00000001, 23170x000023da,0x000023d9,0x0000014a,0x00050095,
21170x00050051,0x00000006,0x000023d2,0x000023d0, 23180x00000145,0x00002663,0x000024fd,0x000000f3,
21180x00000000,0x00050080,0x00000006,0x000023d7, 23190x00050051,0x00000006,0x00002664,0x00002663,
21190x00002231,0x000023d1,0x00050050,0x00000007, 23200x00000001,0x00050051,0x00000006,0x00002665,
21200x000023d8,0x000023d2,0x000023d7,0x0004007c, 23210x00002663,0x00000000,0x00050080,0x00000006,
21210x00000014,0x000023c8,0x000023d8,0x00060041, 23220x0000266a,0x00002504,0x00002664,0x00050050,
21220x0000016c,0x000023c0,0x000023c8,0x0000016b, 23230x00000007,0x0000266b,0x00002665,0x0000266a,
21230x0000016b,0x0005003e,0x000023c0,0x00002177, 23240x0004007c,0x00000014,0x0000265b,0x0000266b,
21240x00000002,0x00000004,0x00050095,0x0000013d, 23250x00060041,0x00000174,0x00002653,0x0000265b,
21250x000023f0,0x0000222a,0x0000050b,0x00050051, 23260x00000173,0x00000173,0x0005003e,0x00002653,
21260x00000006,0x000023f1,0x000023f0,0x00000001, 23270x000023da,0x00000002,0x00000004,0x00050095,
21270x00050051,0x00000006,0x000023f2,0x000023f0, 23280x00000145,0x00002683,0x000024fd,0x000001d5,
21280x00000000,0x00050080,0x00000006,0x000023f7, 23290x00050051,0x00000006,0x00002684,0x00002683,
21290x00002231,0x000023f1,0x00050050,0x00000007, 23300x00000001,0x00050051,0x00000006,0x00002685,
21300x000023f8,0x000023f2,0x000023f7,0x0004007c, 23310x00002683,0x00000000,0x00050080,0x00000006,
21310x00000014,0x000023e8,0x000023f8,0x00060041, 23320x0000268a,0x00002504,0x00002684,0x00050050,
21320x0000016c,0x000023e0,0x000023e8,0x0000016b, 23330x00000007,0x0000268b,0x00002685,0x0000268a,
21330x0000016b,0x0005003e,0x000023e0,0x000020e5, 23340x0004007c,0x00000014,0x0000267b,0x0000268b,
21340x00000002,0x00000004,0x00050095,0x0000013d, 23350x00060041,0x00000174,0x00002673,0x0000267b,
21350x00002410,0x0000222a,0x00000516,0x00050051, 23360x00000173,0x00000173,0x0005003e,0x00002673,
21360x00000006,0x00002411,0x00002410,0x00000001, 23370x00000140,0x00000002,0x00000004,0x00050095,
21370x00050051,0x00000006,0x00002412,0x00002410, 23380x00000145,0x000026a3,0x000024fd,0x000001dc,
21380x00000000,0x00050080,0x00000006,0x00002417, 23390x00050051,0x00000006,0x000026a4,0x000026a3,
21390x00002231,0x00002411,0x00050050,0x00000007, 23400x00000001,0x00050051,0x00000006,0x000026a5,
21400x00002418,0x00002412,0x00002417,0x0004007c, 23410x000026a3,0x00000000,0x00050080,0x00000006,
21410x00000014,0x00002408,0x00002418,0x00060041, 23420x000026aa,0x00002504,0x000026a4,0x00050050,
21420x0000016c,0x00002400,0x00002408,0x0000016b, 23430x00000007,0x000026ab,0x000026a5,0x000026aa,
21430x0000016b,0x0005003e,0x00002400,0x00000138, 23440x0004007c,0x00000014,0x0000269b,0x000026ab,
21440x00000002,0x00000004,0x000500c2,0x00000006, 23450x00060041,0x00000174,0x00002693,0x0000269b,
21450x00002421,0x000020e5,0x00000351,0x000500c4, 23460x00000173,0x00000173,0x0005003e,0x00002693,
21460x00000006,0x00002422,0x00002421,0x0000031d, 23470x0000244a,0x00000002,0x00000004,0x00050095,
21470x000600a9,0x00000006,0x00002424,0x0000232c, 23480x00000145,0x000026c3,0x000024fd,0x00000572,
21480x000000ec,0x00000364,0x000500c5,0x00000006, 23490x00050051,0x00000006,0x000026c4,0x000026c3,
21490x00002425,0x00002422,0x00002424,0x00050095, 23500x00000001,0x00050051,0x00000006,0x000026c5,
21500x0000013d,0x0000244d,0x0000222a,0x00000521, 23510x000026c3,0x00000000,0x00050080,0x00000006,
21510x00050051,0x00000006,0x0000244e,0x0000244d, 23520x000026ca,0x00002504,0x000026c4,0x00050050,
21520x00000001,0x00050051,0x00000006,0x0000244f, 23530x00000007,0x000026cb,0x000026c5,0x000026ca,
21530x0000244d,0x00000000,0x00050080,0x00000006, 23540x0004007c,0x00000014,0x000026bb,0x000026cb,
21540x00002454,0x00002231,0x0000244e,0x00050050, 23550x00060041,0x00000174,0x000026b3,0x000026bb,
21550x00000007,0x00002455,0x0000244f,0x00002454, 23560x00000173,0x00000173,0x0005003e,0x000026b3,
21560x0004007c,0x00000014,0x00002445,0x00002455, 23570x000023b8,0x00000002,0x00000004,0x00050095,
21570x00060041,0x0000016c,0x0000243d,0x00002445, 23580x00000145,0x000026e3,0x000024fd,0x0000057d,
21580x0000016b,0x0000016b,0x0005003e,0x0000243d, 23590x00050051,0x00000006,0x000026e4,0x000026e3,
21590x00002425,0x00000002,0x00000004,0x00050041, 23600x00000001,0x00050051,0x00000006,0x000026e5,
21600x000001bb,0x00002121,0x000001b9,0x0000034a, 23610x000026e3,0x00000000,0x00050080,0x00000006,
21610x0004003d,0x00000006,0x00002122,0x00002121, 23620x000026ea,0x00002504,0x000026e4,0x00050050,
21620x00050095,0x0000013d,0x0000246d,0x0000222a, 23630x00000007,0x000026eb,0x000026e5,0x000026ea,
21630x0000052d,0x00050051,0x00000006,0x0000246e, 23640x0004007c,0x00000014,0x000026db,0x000026eb,
21640x0000246d,0x00000001,0x00050051,0x00000006, 23650x00060041,0x00000174,0x000026d3,0x000026db,
21650x0000246f,0x0000246d,0x00000000,0x00050080, 23660x00000173,0x00000173,0x0005003e,0x000026d3,
21660x00000006,0x00002474,0x00002231,0x0000246e, 23670x00000140,0x00000002,0x00000004,0x000500c2,
21670x00050050,0x00000007,0x00002475,0x0000246f, 23680x00000006,0x000026f4,0x000023b8,0x00000359,
21680x00002474,0x0004007c,0x00000014,0x00002465, 23690x000500c4,0x00000006,0x000026f5,0x000026f4,
21690x00002475,0x00060041,0x0000016c,0x0000245d, 23700x00000325,0x000600a9,0x00000006,0x000026f7,
21700x00002465,0x0000016b,0x0000016b,0x0005003e, 23710x000025ff,0x000000f3,0x0000036c,0x000500c5,
21710x0000245d,0x00002122,0x00000002,0x00000004, 23720x00000006,0x000026f8,0x000026f5,0x000026f7,
21720x00050041,0x000001bb,0x00002126,0x000001b9, 23730x00050095,0x00000145,0x00002720,0x000024fd,
21730x000010be,0x0004003d,0x00000006,0x00002127, 23740x00000588,0x00050051,0x00000006,0x00002721,
21740x00002126,0x00050095,0x0000013d,0x0000248d, 23750x00002720,0x00000001,0x00050051,0x00000006,
21750x0000222a,0x00000537,0x00050051,0x00000006, 23760x00002722,0x00002720,0x00000000,0x00050080,
21760x0000248e,0x0000248d,0x00000001,0x00050051, 23770x00000006,0x00002727,0x00002504,0x00002721,
21770x00000006,0x0000248f,0x0000248d,0x00000000, 23780x00050050,0x00000007,0x00002728,0x00002722,
21780x00050080,0x00000006,0x00002494,0x00002231, 23790x00002727,0x0004007c,0x00000014,0x00002718,
21790x0000248e,0x00050050,0x00000007,0x00002495, 23800x00002728,0x00060041,0x00000174,0x00002710,
21800x0000248f,0x00002494,0x0004007c,0x00000014, 23810x00002718,0x00000173,0x00000173,0x0005003e,
21810x00002485,0x00002495,0x00060041,0x0000016c, 23820x00002710,0x000026f8,0x00000002,0x00000004,
21820x0000247d,0x00002485,0x0000016b,0x0000016b, 23830x00050041,0x000001c3,0x000023f4,0x000001c1,
21830x0005003e,0x0000247d,0x00002127,0x00000002, 23840x00000352,0x0004003d,0x00000006,0x000023f5,
21840x00000004,0x00050095,0x0000013d,0x000024ad, 23850x000023f4,0x00050095,0x00000145,0x00002740,
21850x0000222a,0x00000541,0x00050051,0x00000006, 23860x000024fd,0x00000594,0x00050051,0x00000006,
21860x000024ae,0x000024ad,0x00000001,0x00050051, 23870x00002741,0x00002740,0x00000001,0x00050051,
21870x00000006,0x000024af,0x000024ad,0x00000000, 23880x00000006,0x00002742,0x00002740,0x00000000,
21880x00050080,0x00000006,0x000024b4,0x00002231, 23890x00050080,0x00000006,0x00002747,0x00002504,
21890x000024ae,0x00050050,0x00000007,0x000024b5, 23900x00002741,0x00050050,0x00000007,0x00002748,
21900x000024af,0x000024b4,0x0004007c,0x00000014, 23910x00002742,0x00002747,0x0004007c,0x00000014,
21910x000024a5,0x000024b5,0x00060041,0x0000016c, 23920x00002738,0x00002748,0x00060041,0x00000174,
21920x0000249d,0x000024a5,0x0000016b,0x0000016b, 23930x00002730,0x00002738,0x00000173,0x00000173,
21930x0005003e,0x0000249d,0x00000138,0x00000002, 23940x0005003e,0x00002730,0x000023f5,0x00000002,
21940x00000004,0x000200f9,0x0000212c,0x000200f8, 23950x00000004,0x00050041,0x000001c3,0x000023f9,
21950x0000212c,0x000200f9,0x0000134b,0x000200f8, 23960x000001c1,0x000003c1,0x0004003d,0x00000006,
21960x0000134b,0x000200f9,0x000013fd,0x000200f8, 23970x000023fa,0x000023f9,0x00050095,0x00000145,
21970x00001347,0x00050041,0x000001bb,0x0000134f, 23980x00002760,0x000024fd,0x0000059e,0x00050051,
21980x000001b9,0x0000074d,0x0004003d,0x00000006, 23990x00000006,0x00002761,0x00002760,0x00000001,
21990x00001350,0x0000134f,0x000500ae,0x0000002f, 24000x00050051,0x00000006,0x00002762,0x00002760,
22000x00001351,0x000012dd,0x00001350,0x000300f7, 24010x00000000,0x00050080,0x00000006,0x00002767,
22010x00001353,0x00000000,0x000400fa,0x00001351, 24020x00002504,0x00002761,0x00050050,0x00000007,
22020x00001352,0x00001353,0x000200f8,0x00001352, 24030x00002768,0x00002762,0x00002767,0x0004007c,
22030x000200f9,0x000013fd,0x000200f8,0x00001353, 24040x00000014,0x00002758,0x00002768,0x00060041,
22040x000500aa,0x0000002f,0x00001358,0x000012df, 24050x00000174,0x00002750,0x00002758,0x00000173,
22050x00001357,0x000300f7,0x0000135a,0x00000000, 24060x00000173,0x0005003e,0x00002750,0x000023fa,
22060x000400fa,0x00001358,0x00001359,0x0000135a, 24070x00000002,0x00000004,0x00050095,0x00000145,
22070x000200f8,0x00001359,0x000500aa,0x0000002f, 24080x00002780,0x000024fd,0x000005a7,0x00050051,
22080x0000135c,0x000012dd,0x00000138,0x000300f7, 24090x00000006,0x00002781,0x00002780,0x00000001,
22090x0000135e,0x00000000,0x000400fa,0x0000135c, 24100x00050051,0x00000006,0x00002782,0x00002780,
22100x0000135d,0x0000135e,0x000200f8,0x0000135d, 24110x00000000,0x00050080,0x00000006,0x00002787,
22110x00050041,0x00000266,0x00001360,0x000001b9, 24120x00002504,0x00002781,0x00050050,0x00000007,
22120x00000315,0x0004003d,0x00000007,0x00001361, 24130x00002788,0x00002782,0x00002787,0x0004007c,
22130x00001360,0x00050051,0x00000006,0x000024cc, 24140x00000014,0x00002778,0x00002788,0x00060041,
22140x00001361,0x00000000,0x00050095,0x0000013d, 24150x00000174,0x00002770,0x00002778,0x00000173,
22150x000024ce,0x000024cc,0x000000ec,0x00050051, 24160x00000173,0x0005003e,0x00002770,0x00000140,
22160x00000006,0x000024cf,0x000024ce,0x00000001, 24170x00000002,0x00000004,0x000200f9,0x000023ff,
22170x00050051,0x00000006,0x000024d0,0x000024ce, 24180x000200f8,0x000023ff,0x000200f9,0x0000143d,
22180x00000000,0x00050051,0x00000006,0x000024d3, 24190x000200f8,0x0000143d,0x000200f9,0x000014ef,
22190x00001361,0x00000001,0x00050080,0x00000006, 24200x000200f8,0x00001439,0x00050041,0x000001c3,
22200x000024d5,0x000024d3,0x000024cf,0x00050050, 24210x00001441,0x000001c1,0x000007b3,0x0004003d,
22210x00000007,0x000024d6,0x000024d0,0x000024d5, 24220x00000006,0x00001442,0x00001441,0x000500ae,
22220x0004007c,0x00000014,0x000024c6,0x000024d6, 24230x0000002f,0x00001443,0x000013a7,0x00001442,
22230x00060041,0x0000016c,0x000024bd,0x000024c6, 24240x000300f7,0x00001445,0x00000000,0x000400fa,
22240x0000016b,0x0000016b,0x0006003d,0x00000006, 24250x00001443,0x00001444,0x00001445,0x000200f8,
22250x000024be,0x000024bd,0x00000002,0x00000004, 24260x00001444,0x000200f9,0x000014ef,0x000200f8,
22260x00050080,0x00000006,0x00001364,0x000024be, 24270x00001445,0x000500aa,0x0000002f,0x0000144a,
22270x00000142,0x00050084,0x00000006,0x00001365, 24280x000013be,0x00001449,0x000300f7,0x0000144c,
22280x00001364,0x000001c4,0x00050041,0x00000266, 24290x00000000,0x000400fa,0x0000144a,0x0000144b,
22290x00001367,0x000001b9,0x0000016b,0x0004003d, 24300x0000144c,0x000200f8,0x0000144b,0x000500aa,
22300x00000007,0x00001368,0x00001367,0x00050051, 24310x0000002f,0x0000144e,0x000013a7,0x00000140,
22310x00000006,0x000024ec,0x00001368,0x00000000, 24320x000300f7,0x00001450,0x00000000,0x000400fa,
22320x00050095,0x0000013d,0x000024ee,0x000024ec, 24330x0000144e,0x0000144f,0x00001450,0x000200f8,
22330x00000138,0x00050051,0x00000006,0x000024ef, 24340x0000144f,0x00050041,0x0000026e,0x00001452,
22340x000024ee,0x00000001,0x00050051,0x00000006, 24350x000001c1,0x0000031d,0x0004003d,0x00000007,
22350x000024f0,0x000024ee,0x00000000,0x00050051, 24360x00001453,0x00001452,0x00050051,0x00000006,
22360x00000006,0x000024f3,0x00001368,0x00000001, 24370x0000279f,0x00001453,0x00000000,0x00050095,
22370x00050080,0x00000006,0x000024f5,0x000024f3, 24380x00000145,0x000027a1,0x0000279f,0x000000f3,
22380x000024ef,0x00050050,0x00000007,0x000024f6, 24390x00050051,0x00000006,0x000027a2,0x000027a1,
22390x000024f0,0x000024f5,0x0004007c,0x00000014, 24400x00000001,0x00050051,0x00000006,0x000027a3,
22400x000024e6,0x000024f6,0x00060041,0x0000016c, 24410x000027a1,0x00000000,0x00050051,0x00000006,
22410x000024de,0x000024e6,0x0000016b,0x0000016b, 24420x000027a6,0x00001453,0x00000001,0x00050080,
22420x0005003e,0x000024de,0x00001365,0x00000002, 24430x00000006,0x000027a8,0x000027a6,0x000027a2,
22430x00000004,0x00050095,0x0000013d,0x0000250e, 24440x00050050,0x00000007,0x000027a9,0x000027a3,
22440x000024ec,0x000000ec,0x00050051,0x00000006, 24450x000027a8,0x0004007c,0x00000014,0x00002799,
22450x0000250f,0x0000250e,0x00000001,0x00050051, 24460x000027a9,0x00060041,0x00000174,0x00002790,
22460x00000006,0x00002510,0x0000250e,0x00000000, 24470x00002799,0x00000173,0x00000173,0x0006003d,
22470x00050080,0x00000006,0x00002515,0x000024f3, 24480x00000006,0x00002791,0x00002790,0x00000002,
22480x0000250f,0x00050050,0x00000007,0x00002516, 24490x00000004,0x00050080,0x00000006,0x00001456,
22490x00002510,0x00002515,0x0004007c,0x00000014, 24500x00002791,0x0000014a,0x00050084,0x00000006,
22500x00002506,0x00002516,0x00060041,0x0000016c, 24510x00001457,0x00001456,0x000001cc,0x00050041,
22510x000024fe,0x00002506,0x0000016b,0x0000016b, 24520x0000026e,0x00001459,0x000001c1,0x00000173,
22520x0005003e,0x000024fe,0x00000138,0x00000002, 24530x0004003d,0x00000007,0x0000145a,0x00001459,
22530x00000004,0x000200f9,0x0000135e,0x000200f8, 24540x00050051,0x00000006,0x000027bf,0x0000145a,
22540x0000135e,0x000200f9,0x000013fd,0x000200f8, 24550x00000000,0x00050095,0x00000145,0x000027c1,
22550x0000135a,0x000500aa,0x0000002f,0x00001375, 24560x000027bf,0x00000140,0x00050051,0x00000006,
22560x000012df,0x000001d4,0x000300f7,0x00001377, 24570x000027c2,0x000027c1,0x00000001,0x00050051,
22570x00000000,0x000400fa,0x00001375,0x00001376, 24580x00000006,0x000027c3,0x000027c1,0x00000000,
22580x00001377,0x000200f8,0x00001376,0x00050084, 24590x00050051,0x00000006,0x000027c6,0x0000145a,
22590x00000006,0x00001379,0x000000ec,0x000012dd, 24600x00000001,0x00050080,0x00000006,0x000027c8,
22600x00050041,0x00000266,0x0000137b,0x000001b9, 24610x000027c6,0x000027c2,0x00050050,0x00000007,
22610x00000315,0x0004003d,0x00000007,0x0000137c, 24620x000027c9,0x000027c3,0x000027c8,0x0004007c,
22620x0000137b,0x00050051,0x00000006,0x0000252d, 24630x00000014,0x000027b9,0x000027c9,0x00060041,
22630x0000137c,0x00000000,0x00050095,0x0000013d, 24640x00000174,0x000027b1,0x000027b9,0x00000173,
22640x0000252f,0x0000252d,0x000000ec,0x00050051, 24650x00000173,0x0005003e,0x000027b1,0x00001457,
22650x00000006,0x00002530,0x0000252f,0x00000001, 24660x00000002,0x00000004,0x00050095,0x00000145,
22660x00050051,0x00000006,0x00002531,0x0000252f, 24670x000027e1,0x000027bf,0x000000f3,0x00050051,
22670x00000000,0x00050051,0x00000006,0x00002534, 24680x00000006,0x000027e2,0x000027e1,0x00000001,
22680x0000137c,0x00000001,0x00050080,0x00000006, 24690x00050051,0x00000006,0x000027e3,0x000027e1,
22690x00002536,0x00002534,0x00002530,0x00050050, 24700x00000000,0x00050080,0x00000006,0x000027e8,
22700x00000007,0x00002537,0x00002531,0x00002536, 24710x000027c6,0x000027e2,0x00050050,0x00000007,
22710x0004007c,0x00000014,0x00002527,0x00002537, 24720x000027e9,0x000027e3,0x000027e8,0x0004007c,
22720x00060041,0x0000016c,0x0000251e,0x00002527, 24730x00000014,0x000027d9,0x000027e9,0x00060041,
22730x0000016b,0x0000016b,0x0006003d,0x00000006, 24740x00000174,0x000027d1,0x000027d9,0x00000173,
22740x0000251f,0x0000251e,0x00000002,0x00000004, 24750x00000173,0x0005003e,0x000027d1,0x00000140,
22750x00050080,0x00000006,0x0000137f,0x0000251f, 24760x00000002,0x00000004,0x000200f9,0x00001450,
22760x00000142,0x00050084,0x00000006,0x00001380, 24770x000200f8,0x00001450,0x000200f9,0x000014ef,
22770x0000137f,0x000001c4,0x000500b0,0x0000002f, 24780x000200f8,0x0000144c,0x000500aa,0x0000002f,
22780x00001381,0x00001379,0x00001380,0x000300f7, 24790x00001467,0x000013be,0x000001dc,0x000300f7,
22790x00001383,0x00000000,0x000400fa,0x00001381, 24800x00001469,0x00000000,0x000400fa,0x00001467,
22800x00001382,0x00001383,0x000200f8,0x00001382, 24810x00001468,0x00001469,0x000200f8,0x00001468,
22810x00050095,0x0000013d,0x00002550,0x0000252d, 24820x00050084,0x00000006,0x0000146b,0x000000f3,
22820x00001379,0x00050051,0x00000006,0x00002551, 24830x000013a7,0x00050041,0x0000026e,0x0000146d,
22830x00002550,0x00000001,0x00050051,0x00000006, 24840x000001c1,0x0000031d,0x0004003d,0x00000007,
22840x00002552,0x00002550,0x00000000,0x00050080, 24850x0000146e,0x0000146d,0x00050051,0x00000006,
22850x00000006,0x00002557,0x00002534,0x00002551, 24860x00002800,0x0000146e,0x00000000,0x00050095,
22860x00050050,0x00000007,0x00002558,0x00002552, 24870x00000145,0x00002802,0x00002800,0x000000f3,
22870x00002557,0x0004007c,0x00000014,0x00002548, 24880x00050051,0x00000006,0x00002803,0x00002802,
22880x00002558,0x00060041,0x0000016c,0x0000253f, 24890x00000001,0x00050051,0x00000006,0x00002804,
22890x00002548,0x0000016b,0x0000016b,0x0006003d, 24900x00002802,0x00000000,0x00050051,0x00000006,
22900x00000006,0x00002540,0x0000253f,0x00000002, 24910x00002807,0x0000146e,0x00000001,0x00050080,
22910x00000004,0x00050041,0x00000266,0x0000138e, 24920x00000006,0x00002809,0x00002807,0x00002803,
22920x000001b9,0x0000016b,0x0004003d,0x00000007, 24930x00050050,0x00000007,0x0000280a,0x00002804,
22930x0000138f,0x0000138e,0x00050051,0x00000006, 24940x00002809,0x0004007c,0x00000014,0x000027fa,
22940x0000256e,0x0000138f,0x00000000,0x00050095, 24950x0000280a,0x00060041,0x00000174,0x000027f1,
22950x0000013d,0x00002570,0x0000256e,0x00001379, 24960x000027fa,0x00000173,0x00000173,0x0006003d,
22960x00050051,0x00000006,0x00002571,0x00002570, 24970x00000006,0x000027f2,0x000027f1,0x00000002,
22970x00000001,0x00050051,0x00000006,0x00002572, 24980x00000004,0x00050080,0x00000006,0x00001471,
22980x00002570,0x00000000,0x00050051,0x00000006, 24990x000027f2,0x0000014a,0x00050084,0x00000006,
22990x00002575,0x0000138f,0x00000001,0x00050080, 25000x00001472,0x00001471,0x000001cc,0x000500b0,
23000x00000006,0x00002577,0x00002575,0x00002571, 25010x0000002f,0x00001473,0x0000146b,0x00001472,
23010x00050050,0x00000007,0x00002578,0x00002572, 25020x000300f7,0x00001475,0x00000000,0x000400fa,
23020x00002577,0x0004007c,0x00000014,0x00002568, 25030x00001473,0x00001474,0x00001475,0x000200f8,
23030x00002578,0x00060041,0x0000016c,0x00002560, 25040x00001474,0x00050095,0x00000145,0x00002823,
23040x00002568,0x0000016b,0x0000016b,0x0005003e, 25050x00002800,0x0000146b,0x00050051,0x00000006,
23050x00002560,0x00002540,0x00000002,0x00000004, 25060x00002824,0x00002823,0x00000001,0x00050051,
23060x000200f9,0x00001383,0x000200f8,0x00001383, 25070x00000006,0x00002825,0x00002823,0x00000000,
23070x000200f9,0x000013fd,0x000200f8,0x00001377, 25080x00050080,0x00000006,0x0000282a,0x00002807,
23080x000500aa,0x0000002f,0x00001396,0x000012df, 25090x00002824,0x00050050,0x00000007,0x0000282b,
23090x00000138,0x000300f7,0x00001398,0x00000000, 25100x00002825,0x0000282a,0x0004007c,0x00000014,
23100x000400fa,0x00001396,0x00001397,0x000013b9, 25110x0000281b,0x0000282b,0x00060041,0x00000174,
23110x000200f8,0x000013b9,0x000500aa,0x0000002f, 25120x00002812,0x0000281b,0x00000173,0x00000173,
23120x000013bc,0x000012df,0x00000142,0x000300f7, 25130x0006003d,0x00000006,0x00002813,0x00002812,
23130x000013be,0x00000000,0x000400fa,0x000013bc, 25140x00000002,0x00000004,0x00050041,0x0000026e,
23140x000013bd,0x000013c2,0x000200f8,0x000013c2, 25150x00001480,0x000001c1,0x00000173,0x0004003d,
23150x000500aa,0x0000002f,0x000013c5,0x000012df, 25160x00000007,0x00001481,0x00001480,0x00050051,
23160x00000280,0x000300f7,0x000013c7,0x00000000, 25170x00000006,0x00002841,0x00001481,0x00000000,
23170x000400fa,0x000013c5,0x000013c6,0x000013cb, 25180x00050095,0x00000145,0x00002843,0x00002841,
23180x000200f8,0x000013cb,0x000500aa,0x0000002f, 25190x0000146b,0x00050051,0x00000006,0x00002844,
23190x000013ce,0x000012df,0x00000470,0x000300f7, 25200x00002843,0x00000001,0x00050051,0x00000006,
23200x000013d0,0x00000000,0x000400fa,0x000013ce, 25210x00002845,0x00002843,0x00000000,0x00050051,
23210x000013cf,0x000013d4,0x000200f8,0x000013d4, 25220x00000006,0x00002848,0x00001481,0x00000001,
23220x000500aa,0x0000002f,0x000013d7,0x000012df, 25230x00050080,0x00000006,0x0000284a,0x00002848,
23230x000000ec,0x000300f7,0x000013d9,0x00000000, 25240x00002844,0x00050050,0x00000007,0x0000284b,
23240x000400fa,0x000013d7,0x000013d8,0x000013de, 25250x00002845,0x0000284a,0x0004007c,0x00000014,
23250x000200f8,0x000013de,0x000500aa,0x0000002f, 25260x0000283b,0x0000284b,0x00060041,0x00000174,
23260x000013e1,0x000012df,0x00000364,0x000300f7, 25270x00002833,0x0000283b,0x00000173,0x00000173,
23270x000013e3,0x00000000,0x000400fa,0x000013e1, 25280x0005003e,0x00002833,0x00002813,0x00000002,
23280x000013e2,0x000013e7,0x000200f8,0x000013e7, 25290x00000004,0x000200f9,0x00001475,0x000200f8,
23290x000500aa,0x0000002f,0x000013eb,0x000012df, 25300x00001475,0x000200f9,0x000014ef,0x000200f8,
23300x000013ea,0x000300f7,0x000013ed,0x00000000, 25310x00001469,0x000500aa,0x0000002f,0x00001488,
23310x000400fa,0x000013eb,0x000013ec,0x000013f1, 25320x000013be,0x00000140,0x000300f7,0x0000148a,
23320x000200f8,0x000013f1,0x000500aa,0x0000002f, 25330x00000000,0x000400fa,0x00001488,0x00001489,
23330x000013f5,0x000012df,0x000013f4,0x000300f7, 25340x000014ab,0x000200f8,0x000014ab,0x000500aa,
23340x000013f7,0x00000000,0x000400fa,0x000013f5, 25350x0000002f,0x000014ae,0x000013be,0x0000014a,
23350x000013f6,0x000013f7,0x000200f8,0x000013f6, 25360x000300f7,0x000014b0,0x00000000,0x000400fa,
23360x00050041,0x000001bb,0x00005a4a,0x000001b9, 25370x000014ae,0x000014af,0x000014b4,0x000200f8,
23370x000001ba,0x0004003d,0x00000006,0x00005a4b, 25380x000014b4,0x000500aa,0x0000002f,0x000014b7,
23380x00005a4a,0x00050084,0x00000006,0x00005a4c, 25390x000013be,0x00000288,0x000300f7,0x000014b9,
23390x000001db,0x00005a4b,0x00050080,0x00000006, 25400x00000000,0x000400fa,0x000014b7,0x000014b8,
23400x00005a4d,0x000001c4,0x00005a4c,0x00050080, 25410x000014bd,0x000200f8,0x000014bd,0x000500aa,
23410x00000006,0x00005a53,0x00005a4b,0x0000062f, 25420x0000002f,0x000014c0,0x000013be,0x000004d7,
23420x00050086,0x00000006,0x00005a54,0x00005a53, 25430x000300f7,0x000014c2,0x00000000,0x000400fa,
23430x000001be,0x00050084,0x00000006,0x00005a46, 25440x000014c0,0x000014c1,0x000014c6,0x000200f8,
23440x000001c4,0x00005a54,0x00050080,0x00000006, 25450x000014c6,0x000500aa,0x0000002f,0x000014c9,
23450x00005a47,0x00005a4d,0x00005a46,0x00050080, 25460x000013be,0x000000f3,0x000300f7,0x000014cb,
23460x00000006,0x00005a41,0x00005a47,0x00005a46, 25470x00000000,0x000400fa,0x000014c9,0x000014ca,
23470x00050041,0x000001bb,0x00005a38,0x000001b9, 25480x000014d0,0x000200f8,0x000014d0,0x000500aa,
23480x000001f0,0x0004003d,0x00000006,0x00005a39, 25490x0000002f,0x000014d3,0x000013be,0x0000036c,
23490x00005a38,0x00050084,0x00000006,0x00005a3a, 25500x000300f7,0x000014d5,0x00000000,0x000400fa,
23500x000001ef,0x00005a39,0x00050080,0x00000006, 25510x000014d3,0x000014d4,0x000014d9,0x000200f8,
23510x00005a3b,0x00005a41,0x00005a3a,0x00050084, 25520x000014d9,0x000500aa,0x0000002f,0x000014dd,
23520x00000006,0x00005a30,0x00000205,0x000012dd, 25530x000013be,0x000014dc,0x000300f7,0x000014df,
23530x00050080,0x00000006,0x00005a31,0x00005a3b, 25540x00000000,0x000400fa,0x000014dd,0x000014de,
23540x00005a30,0x00050041,0x00000266,0x00005a32, 25550x000014e3,0x000200f8,0x000014e3,0x000500aa,
23550x000001b9,0x00000264,0x0004003d,0x00000007, 25560x0000002f,0x000014e7,0x000013be,0x000014e6,
23560x00005a33,0x00005a32,0x00050051,0x00000006, 25570x000300f7,0x000014e9,0x00000000,0x000400fa,
23570x00005a69,0x00005a33,0x00000000,0x00050095, 25580x000014e7,0x000014e8,0x000014e9,0x000200f8,
23580x0000013d,0x00005a6b,0x00005a69,0x00005a31, 25590x000014e8,0x00050041,0x000001c3,0x00005e2c,
23590x00050051,0x00000006,0x00005a6c,0x00005a6b, 25600x000001c1,0x000001c2,0x0004003d,0x00000006,
23600x00000001,0x00050051,0x00000006,0x00005a6d, 25610x00005e2d,0x00005e2c,0x00050084,0x00000006,
23610x00005a6b,0x00000000,0x00050051,0x00000006, 25620x00005e2e,0x000001e3,0x00005e2d,0x00050080,
23620x00005a70,0x00005a33,0x00000001,0x00050080, 25630x00000006,0x00005e2f,0x000001cc,0x00005e2e,
23630x00000006,0x00005a72,0x00005a70,0x00005a6c, 25640x00050080,0x00000006,0x00005e35,0x00005e2d,
23640x00050050,0x00000007,0x00005a73,0x00005a6d, 25650x00000695,0x00050086,0x00000006,0x00005e36,
23650x00005a72,0x0004007c,0x00000014,0x00005a63, 25660x00005e35,0x000001c6,0x00050084,0x00000006,
23660x00005a73,0x00060041,0x0000016c,0x00005a1d, 25670x00005e28,0x000001cc,0x00005e36,0x00050080,
23670x00005a63,0x0000016b,0x0000016b,0x0005003e, 25680x00000006,0x00005e29,0x00005e2f,0x00005e28,
23680x00005a1d,0x00000138,0x00000002,0x00000004, 25690x00050080,0x00000006,0x00005e23,0x00005e29,
23690x00060041,0x0000016c,0x00005a1f,0x00005a63, 25700x00005e28,0x00050041,0x000001c3,0x00005e1a,
23700x0000016b,0x00000264,0x0005003e,0x00005a1f, 25710x000001c1,0x000001f8,0x0004003d,0x00000006,
23710x00000539,0x00000002,0x00000004,0x00060041, 25720x00005e1b,0x00005e1a,0x00050084,0x00000006,
23720x0000016c,0x00005a21,0x00005a63,0x0000016b, 25730x00005e1c,0x000001f7,0x00005e1b,0x00050080,
23730x00000315,0x0005003e,0x00005a21,0x00000539, 25740x00000006,0x00005e1d,0x00005e23,0x00005e1c,
23740x00000002,0x00000004,0x00060041,0x0000016c, 25750x00050084,0x00000006,0x00005e12,0x0000020d,
23750x00005a23,0x00005a63,0x0000016b,0x0000031d, 25760x000013a7,0x00050080,0x00000006,0x00005e13,
23760x0005003e,0x00005a23,0x00000539,0x00000002, 25770x00005e1d,0x00005e12,0x00050041,0x0000026e,
23770x00000004,0x00060041,0x0000016c,0x00005a25, 25780x00005e14,0x000001c1,0x0000026c,0x0004003d,
23780x00005a63,0x0000016b,0x00000325,0x0005003e, 25790x00000007,0x00005e15,0x00005e14,0x00050051,
23790x00005a25,0x00000138,0x00000002,0x00000004, 25800x00000006,0x00005e4b,0x00005e15,0x00000000,
23800x00060041,0x0000016c,0x00005a27,0x00005a63, 25810x00050095,0x00000145,0x00005e4d,0x00005e4b,
23810x0000016b,0x0000032d,0x0005003e,0x00005a27, 25820x00005e13,0x00050051,0x00000006,0x00005e4e,
23820x00000138,0x00000002,0x00000004,0x00060041, 25830x00005e4d,0x00000001,0x00050051,0x00000006,
23830x0000016c,0x00005a29,0x00005a63,0x0000016b, 25840x00005e4f,0x00005e4d,0x00000000,0x00050051,
23840x00000351,0x0005003e,0x00005a29,0x00000138, 25850x00000006,0x00005e52,0x00005e15,0x00000001,
23850x00000002,0x00000004,0x000200f9,0x000013f7, 25860x00050080,0x00000006,0x00005e54,0x00005e52,
23860x000200f8,0x000013f7,0x000200f9,0x000013ed, 25870x00005e4e,0x00050050,0x00000007,0x00005e55,
23870x000200f8,0x000013ec,0x000300f7,0x000051a3, 25880x00005e4f,0x00005e54,0x0004007c,0x00000014,
23880x00000000,0x000300fb,0x00000138,0x0000510e, 25890x00005e45,0x00005e55,0x00060041,0x00000174,
23890x000200f8,0x0000510e,0x00050041,0x000001bb, 25900x00005dff,0x00005e45,0x00000173,0x00000173,
23900x0000510f,0x000001b9,0x00000434,0x0004003d, 25910x0005003e,0x00005dff,0x00000140,0x00000002,
23910x00000006,0x00005110,0x0000510f,0x000500aa, 25920x00000004,0x00060041,0x00000174,0x00005e01,
23920x0000002f,0x00005111,0x00005110,0x00000142, 25930x00005e45,0x00000173,0x0000026c,0x0005003e,
23930x000300f7,0x0000511d,0x00000000,0x000400fa, 25940x00005e01,0x000003bf,0x00000002,0x00000004,
23940x00005111,0x00005112,0x00005115,0x000200f8, 25950x00060041,0x00000174,0x00005e03,0x00005e45,
23950x00005115,0x00050041,0x000001bb,0x00005207, 25960x00000173,0x0000031d,0x0005003e,0x00005e03,
23960x000001b9,0x000001ba,0x0004003d,0x00000006, 25970x000003bf,0x00000002,0x00000004,0x00060041,
23970x00005208,0x00005207,0x00050084,0x00000006, 25980x00000174,0x00005e05,0x00005e45,0x00000173,
23980x00005209,0x000001db,0x00005208,0x00050080, 25990x00000325,0x0005003e,0x00005e05,0x000003bf,
23990x00000006,0x0000520a,0x000001c4,0x00005209, 26000x00000002,0x00000004,0x00060041,0x00000174,
24000x00050080,0x00000006,0x00005210,0x00005208, 26010x00005e07,0x00005e45,0x00000173,0x0000032d,
24010x0000062f,0x00050086,0x00000006,0x00005211, 26020x0005003e,0x00005e07,0x00000140,0x00000002,
24020x00005210,0x000001be,0x00050084,0x00000006, 26030x00000004,0x00060041,0x00000174,0x00005e09,
24030x00005203,0x000001c4,0x00005211,0x00050080, 26040x00005e45,0x00000173,0x00000335,0x0005003e,
24040x00000006,0x00005204,0x0000520a,0x00005203, 26050x00005e09,0x00000140,0x00000002,0x00000004,
24050x00050080,0x00000006,0x000051fe,0x00005204, 26060x00060041,0x00000174,0x00005e0b,0x00005e45,
24060x00005203,0x00050041,0x000001bb,0x000051f5, 26070x00000173,0x00000359,0x0005003e,0x00005e0b,
24070x000001b9,0x000001f0,0x0004003d,0x00000006, 26080x00000140,0x00000002,0x00000004,0x000200f9,
24080x000051f6,0x000051f5,0x00050084,0x00000006, 26090x000014e9,0x000200f8,0x000014e9,0x000200f9,
24090x000051f7,0x000001ef,0x000051f6,0x00050080, 26100x000014df,0x000200f8,0x000014de,0x000300f7,
24100x00000006,0x000051f8,0x000051fe,0x000051f7, 26110x00005481,0x00000000,0x000300fb,0x00000140,
24110x00050041,0x000001bb,0x000051ee,0x000001b9, 26120x000053ec,0x000200f8,0x000053ec,0x00050041,
24120x00000206,0x0004003d,0x00000006,0x000051ef, 26130x000001c3,0x000053ed,0x000001c1,0x0000049b,
24130x000051ee,0x00050084,0x00000006,0x000051f0, 26140x0004003d,0x00000006,0x000053ee,0x000053ed,
24140x00000205,0x000051ef,0x00050080,0x00000006, 26150x000500aa,0x0000002f,0x000053ef,0x000053ee,
24150x000051f1,0x000051f8,0x000051f0,0x000500ac, 26160x0000014a,0x000300f7,0x000053fb,0x00000000,
24160x0000002f,0x0000521e,0x000051f6,0x00000142, 26170x000400fa,0x000053ef,0x000053f0,0x000053f3,
24170x000300f7,0x00005224,0x00000000,0x000400fa, 26180x000200f8,0x000053f3,0x00050041,0x000001c3,
24180x0000521e,0x0000521f,0x00005223,0x000200f8, 26190x000054e5,0x000001c1,0x000001c2,0x0004003d,
24190x00005223,0x000200f9,0x00005224,0x000200f8, 26200x00000006,0x000054e6,0x000054e5,0x00050084,
24200x0000521f,0x00050082,0x00000006,0x00005222, 26210x00000006,0x000054e7,0x000001e3,0x000054e6,
24210x000051f6,0x00000142,0x000200f9,0x00005224, 26220x00050080,0x00000006,0x000054e8,0x000001cc,
24220x000200f8,0x00005224,0x000700f5,0x00000006, 26230x000054e7,0x00050080,0x00000006,0x000054ee,
24230x00005ce3,0x00005222,0x0000521f,0x00000138, 26240x000054e6,0x00000695,0x00050086,0x00000006,
24240x00005223,0x00050084,0x00000006,0x000051e9, 26250x000054ef,0x000054ee,0x000001c6,0x00050084,
24250x000000ec,0x00005ce3,0x00050080,0x00000006, 26260x00000006,0x000054e1,0x000001cc,0x000054ef,
24260x000051ea,0x000051f1,0x000051e9,0x000300f7, 26270x00050080,0x00000006,0x000054e2,0x000054e8,
24270x00005231,0x00000000,0x000400fa,0x0000521e, 26280x000054e1,0x00050080,0x00000006,0x000054dc,
24280x0000522c,0x00005230,0x000200f8,0x00005230, 26290x000054e2,0x000054e1,0x00050041,0x000001c3,
24290x000200f9,0x00005231,0x000200f8,0x0000522c, 26300x000054d3,0x000001c1,0x000001f8,0x0004003d,
24300x00050082,0x00000006,0x0000522f,0x000051f6, 26310x00000006,0x000054d4,0x000054d3,0x00050084,
24310x00000142,0x000200f9,0x00005231,0x000200f8, 26320x00000006,0x000054d5,0x000001f7,0x000054d4,
24320x00005231,0x000700f5,0x00000006,0x00005ce4, 26330x00050080,0x00000006,0x000054d6,0x000054dc,
24330x0000522f,0x0000522c,0x00000138,0x00005230, 26340x000054d5,0x00050041,0x000001c3,0x000054cc,
24340x00050084,0x00000006,0x000051e3,0x000000ec, 26350x000001c1,0x0000020e,0x0004003d,0x00000006,
24350x00005ce4,0x00050080,0x00000006,0x000051e4, 26360x000054cd,0x000054cc,0x00050084,0x00000006,
24360x000051ea,0x000051e3,0x000300f7,0x0000523e, 26370x000054ce,0x0000020d,0x000054cd,0x00050080,
24370x00000000,0x000400fa,0x0000521e,0x00005239, 26380x00000006,0x000054cf,0x000054d6,0x000054ce,
24380x0000523d,0x000200f8,0x0000523d,0x000200f9, 26390x000500ac,0x0000002f,0x000054fc,0x000054d4,
24390x0000523e,0x000200f8,0x00005239,0x00050082, 26400x0000014a,0x000300f7,0x00005502,0x00000000,
24400x00000006,0x0000523c,0x000051f6,0x00000142, 26410x000400fa,0x000054fc,0x000054fd,0x00005501,
24410x000200f9,0x0000523e,0x000200f8,0x0000523e, 26420x000200f8,0x00005501,0x000200f9,0x00005502,
24420x000700f5,0x00000006,0x00005ce5,0x0000523c, 26430x000200f8,0x000054fd,0x00050082,0x00000006,
24430x00005239,0x00000138,0x0000523d,0x00050084, 26440x00005500,0x000054d4,0x0000014a,0x000200f9,
24440x00000006,0x000051dd,0x000000ec,0x00005ce5, 26450x00005502,0x000200f8,0x00005502,0x000700f5,
24450x00050080,0x00000006,0x000051de,0x000051e4, 26460x00000006,0x000060d9,0x00005500,0x000054fd,
24460x000051dd,0x000300f7,0x0000524b,0x00000000, 26470x00000140,0x00005501,0x00050084,0x00000006,
24470x000400fa,0x0000521e,0x00005246,0x0000524a, 26480x000054c7,0x000000f3,0x000060d9,0x00050080,
24480x000200f8,0x0000524a,0x000200f9,0x0000524b, 26490x00000006,0x000054c8,0x000054cf,0x000054c7,
24490x000200f8,0x00005246,0x00050082,0x00000006, 26500x000300f7,0x0000550f,0x00000000,0x000400fa,
24500x00005249,0x000051f6,0x00000142,0x000200f9, 26510x000054fc,0x0000550a,0x0000550e,0x000200f8,
24510x0000524b,0x000200f8,0x0000524b,0x000700f5, 26520x0000550e,0x000200f9,0x0000550f,0x000200f8,
24520x00000006,0x00005ce6,0x00005249,0x00005246, 26530x0000550a,0x00050082,0x00000006,0x0000550d,
24530x00000138,0x0000524a,0x00050084,0x00000006, 26540x000054d4,0x0000014a,0x000200f9,0x0000550f,
24540x000051d7,0x000000ec,0x00005ce6,0x00050080, 26550x000200f8,0x0000550f,0x000700f5,0x00000006,
24550x00000006,0x000051d8,0x000051de,0x000051d7, 26560x000060da,0x0000550d,0x0000550a,0x00000140,
24560x000300f7,0x00005258,0x00000000,0x000400fa, 26570x0000550e,0x00050084,0x00000006,0x000054c1,
24570x0000521e,0x00005253,0x00005257,0x000200f8, 26580x000000f3,0x000060da,0x00050080,0x00000006,
24580x00005257,0x000200f9,0x00005258,0x000200f8, 26590x000054c2,0x000054c8,0x000054c1,0x000300f7,
24590x00005253,0x00050082,0x00000006,0x00005256, 26600x0000551c,0x00000000,0x000400fa,0x000054fc,
24600x000051f6,0x00000142,0x000200f9,0x00005258, 26610x00005517,0x0000551b,0x000200f8,0x0000551b,
24610x000200f8,0x00005258,0x000700f5,0x00000006, 26620x000200f9,0x0000551c,0x000200f8,0x00005517,
24620x00005ce7,0x00005256,0x00005253,0x00000138, 26630x00050082,0x00000006,0x0000551a,0x000054d4,
24630x00005257,0x00050084,0x00000006,0x000051d1, 26640x0000014a,0x000200f9,0x0000551c,0x000200f8,
24640x000000ec,0x00005ce7,0x00050080,0x00000006, 26650x0000551c,0x000700f5,0x00000006,0x000060db,
24650x000051d2,0x000051d8,0x000051d1,0x000300f7, 26660x0000551a,0x00005517,0x00000140,0x0000551b,
24660x0000526b,0x00000000,0x000400fa,0x0000521e, 26670x00050084,0x00000006,0x000054bb,0x000000f3,
24670x00005266,0x0000526a,0x000200f8,0x0000526a, 26680x000060db,0x00050080,0x00000006,0x000054bc,
24680x000200f9,0x0000526b,0x000200f8,0x00005266, 26690x000054c2,0x000054bb,0x000300f7,0x00005529,
24690x00050082,0x00000006,0x00005269,0x000051f6, 26700x00000000,0x000400fa,0x000054fc,0x00005524,
24700x00000142,0x000200f9,0x0000526b,0x000200f8, 26710x00005528,0x000200f8,0x00005528,0x000200f9,
24710x0000526b,0x000700f5,0x00000006,0x00005ce8, 26720x00005529,0x000200f8,0x00005524,0x00050082,
24720x00005269,0x00005266,0x00000138,0x0000526a, 26730x00000006,0x00005527,0x000054d4,0x0000014a,
24730x00050080,0x00000006,0x0000525e,0x00005ce8, 26740x000200f9,0x00005529,0x000200f8,0x00005529,
24740x0000062f,0x00050086,0x00000006,0x0000525f, 26750x000700f5,0x00000006,0x000060dc,0x00005527,
24750x0000525e,0x000001be,0x00050084,0x00000006, 26760x00005524,0x00000140,0x00005528,0x00050084,
24760x000051cb,0x000000ec,0x0000525f,0x00050080, 26770x00000006,0x000054b5,0x000000f3,0x000060dc,
24770x00000006,0x000051cc,0x000051d2,0x000051cb, 26780x00050080,0x00000006,0x000054b6,0x000054bc,
24780x000300f7,0x0000527e,0x00000000,0x000400fa, 26790x000054b5,0x000300f7,0x00005536,0x00000000,
24790x0000521e,0x00005279,0x0000527d,0x000200f8, 26800x000400fa,0x000054fc,0x00005531,0x00005535,
24800x0000527d,0x000200f9,0x0000527e,0x000200f8, 26810x000200f8,0x00005535,0x000200f9,0x00005536,
24810x00005279,0x00050082,0x00000006,0x0000527c, 26820x000200f8,0x00005531,0x00050082,0x00000006,
24820x000051f6,0x00000142,0x000200f9,0x0000527e, 26830x00005534,0x000054d4,0x0000014a,0x000200f9,
24830x000200f8,0x0000527e,0x000700f5,0x00000006, 26840x00005536,0x000200f8,0x00005536,0x000700f5,
24840x00005ce9,0x0000527c,0x00005279,0x00000138, 26850x00000006,0x000060dd,0x00005534,0x00005531,
24850x0000527d,0x00050080,0x00000006,0x00005271, 26860x00000140,0x00005535,0x00050084,0x00000006,
24860x00005ce9,0x0000062f,0x00050086,0x00000006, 26870x000054af,0x000000f3,0x000060dd,0x00050080,
24870x00005272,0x00005271,0x000001be,0x00050084, 26880x00000006,0x000054b0,0x000054b6,0x000054af,
24880x00000006,0x000051c5,0x000000ec,0x00005272, 26890x000300f7,0x00005549,0x00000000,0x000400fa,
24890x00050080,0x00000006,0x000051c6,0x000051cc, 26900x000054fc,0x00005544,0x00005548,0x000200f8,
24900x000051c5,0x00050084,0x00000006,0x00005118, 26910x00005548,0x000200f9,0x00005549,0x000200f8,
24910x000000ec,0x000012dd,0x00050080,0x00000006, 26920x00005544,0x00050082,0x00000006,0x00005547,
24920x00005119,0x000051c6,0x00005118,0x00050041, 26930x000054d4,0x0000014a,0x000200f9,0x00005549,
24930x00000266,0x0000511a,0x000001b9,0x00000264, 26940x000200f8,0x00005549,0x000700f5,0x00000006,
24940x0004003d,0x00000007,0x0000511b,0x0000511a, 26950x000060de,0x00005547,0x00005544,0x00000140,
24950x00050051,0x00000006,0x00005296,0x0000511b, 26960x00005548,0x00050080,0x00000006,0x0000553c,
24960x00000000,0x00050095,0x0000013d,0x00005298, 26970x000060de,0x00000695,0x00050086,0x00000006,
24970x00005296,0x00005119,0x00050051,0x00000006, 26980x0000553d,0x0000553c,0x000001c6,0x00050084,
24980x00005299,0x00005298,0x00000001,0x00050051, 26990x00000006,0x000054a9,0x000000f3,0x0000553d,
24990x00000006,0x0000529a,0x00005298,0x00000000, 27000x00050080,0x00000006,0x000054aa,0x000054b0,
25000x00050051,0x00000006,0x0000529d,0x0000511b, 27010x000054a9,0x000300f7,0x0000555c,0x00000000,
25010x00000001,0x00050080,0x00000006,0x0000529f, 27020x000400fa,0x000054fc,0x00005557,0x0000555b,
25020x0000529d,0x00005299,0x00050050,0x00000007, 27030x000200f8,0x0000555b,0x000200f9,0x0000555c,
25030x000052a0,0x0000529a,0x0000529f,0x0004007c, 27040x000200f8,0x00005557,0x00050082,0x00000006,
25040x00000014,0x00005290,0x000052a0,0x00060041, 27050x0000555a,0x000054d4,0x0000014a,0x000200f9,
25050x0000016c,0x00005287,0x00005290,0x0000016b, 27060x0000555c,0x000200f8,0x0000555c,0x000700f5,
25060x0000016b,0x0006003d,0x00000006,0x00005288, 27070x00000006,0x000060df,0x0000555a,0x00005557,
25070x00005287,0x00000002,0x00000004,0x000200f9, 27080x00000140,0x0000555b,0x00050080,0x00000006,
25080x0000511d,0x000200f8,0x00005112,0x00050041, 27090x0000554f,0x000060df,0x00000695,0x00050086,
25090x000001bb,0x000051a6,0x000001b9,0x0000034a, 27100x00000006,0x00005550,0x0000554f,0x000001c6,
25100x0004003d,0x00000006,0x000051a7,0x000051a6, 27110x00050084,0x00000006,0x000054a3,0x000000f3,
25110x00050041,0x000001bb,0x000051b7,0x000001b9, 27120x00005550,0x00050080,0x00000006,0x000054a4,
25120x00000334,0x0004003d,0x00000006,0x000051b8, 27130x000054aa,0x000054a3,0x00050084,0x00000006,
25130x000051b7,0x000500c7,0x00000006,0x000051b9, 27140x000053f6,0x000000f3,0x000013a7,0x00050080,
25140x000051b8,0x00000142,0x000500ab,0x0000002f, 27150x00000006,0x000053f7,0x000054a4,0x000053f6,
25150x000051ba,0x000051b9,0x00000138,0x000600a9, 27160x00050041,0x0000026e,0x000053f8,0x000001c1,
25160x00000006,0x000051b4,0x000051ba,0x00000342, 27170x0000026c,0x0004003d,0x00000007,0x000053f9,
25170x000001c4,0x00050084,0x00000006,0x000051aa, 27180x000053f8,0x00050051,0x00000006,0x00005574,
25180x000012dd,0x000051b4,0x00050080,0x00000006, 27190x000053f9,0x00000000,0x00050095,0x00000145,
25190x000051ab,0x000051a7,0x000051aa,0x000500c2, 27200x00005576,0x00005574,0x000053f7,0x00050051,
25200x00000006,0x000051ac,0x000051ab,0x00000351, 27210x00000006,0x00005577,0x00005576,0x00000001,
25210x000500c4,0x00000006,0x000051ad,0x000051ac, 27220x00050051,0x00000006,0x00005578,0x00005576,
25220x0000031d,0x000600a9,0x00000006,0x000051af, 27230x00000000,0x00050051,0x00000006,0x0000557b,
25230x000051ba,0x00000355,0x00000138,0x000500c5, 27240x000053f9,0x00000001,0x00050080,0x00000006,
25240x00000006,0x000051b0,0x000051ad,0x000051af, 27250x0000557d,0x0000557b,0x00005577,0x00050050,
25250x000200f9,0x0000511d,0x000200f8,0x0000511d, 27260x00000007,0x0000557e,0x00005578,0x0000557d,
25260x000700f5,0x00000006,0x00005cea,0x000051b0, 27270x0004007c,0x00000014,0x0000556e,0x0000557e,
25270x00005112,0x00005288,0x0000527e,0x00050041, 27280x00060041,0x00000174,0x00005565,0x0000556e,
25280x000001bb,0x000052e6,0x000001b9,0x000001ba, 27290x00000173,0x00000173,0x0006003d,0x00000006,
25290x0004003d,0x00000006,0x000052e7,0x000052e6, 27300x00005566,0x00005565,0x00000002,0x00000004,
25300x00050084,0x00000006,0x000052e8,0x000001db, 27310x000200f9,0x000053fb,0x000200f8,0x000053f0,
25310x000052e7,0x00050080,0x00000006,0x000052e9, 27320x00050041,0x000001c3,0x00005484,0x000001c1,
25320x000001c4,0x000052e8,0x00050080,0x00000006, 27330x00000352,0x0004003d,0x00000006,0x00005485,
25330x000052ef,0x000052e7,0x0000062f,0x00050086, 27340x00005484,0x000500c7,0x00000006,0x00005497,
25340x00000006,0x000052f0,0x000052ef,0x000001be, 27350x000013a9,0x0000014a,0x000500ab,0x0000002f,
25350x00050084,0x00000006,0x000052e2,0x000001c4, 27360x00005498,0x00005497,0x00000140,0x000600a9,
25360x000052f0,0x00050080,0x00000006,0x000052e3, 27370x00000006,0x00005492,0x00005498,0x0000034a,
25370x000052e9,0x000052e2,0x00050080,0x00000006, 27380x000001cc,0x00050084,0x00000006,0x00005488,
25380x000052dd,0x000052e3,0x000052e2,0x00050084, 27390x000013a7,0x00005492,0x00050080,0x00000006,
25390x00000006,0x000052b1,0x000001ef,0x000012dd, 27400x00005489,0x00005485,0x00005488,0x000500c2,
25400x00050080,0x00000006,0x000052b2,0x000052dd, 27410x00000006,0x0000548a,0x00005489,0x00000359,
25410x000052b1,0x00050041,0x00000266,0x000052b3, 27420x000500c4,0x00000006,0x0000548b,0x0000548a,
25420x000001b9,0x00000264,0x0004003d,0x00000007, 27430x00000325,0x000600a9,0x00000006,0x0000548d,
25430x000052b4,0x000052b3,0x00050051,0x00000006, 27440x00005498,0x0000035d,0x00000140,0x000500c5,
25440x0000530e,0x000052b4,0x00000000,0x00050095, 27450x00000006,0x0000548e,0x0000548b,0x0000548d,
25450x0000013d,0x00005310,0x0000530e,0x000052b2, 27460x000200f9,0x000053fb,0x000200f8,0x000053fb,
25460x00050051,0x00000006,0x00005311,0x00005310, 27470x000700f5,0x00000006,0x000060e0,0x0000548e,
25470x00000001,0x00050051,0x00000006,0x00005312, 27480x000053f0,0x00005566,0x0000555c,0x00050041,
25480x00005310,0x00000000,0x00050051,0x00000006, 27490x000001c3,0x000055c4,0x000001c1,0x000001c2,
25490x00005315,0x000052b4,0x00000001,0x00050080, 27500x0004003d,0x00000006,0x000055c5,0x000055c4,
25500x00000006,0x00005317,0x00005315,0x00005311, 27510x00050084,0x00000006,0x000055c6,0x000001e3,
25510x00050050,0x00000007,0x00005318,0x00005312, 27520x000055c5,0x00050080,0x00000006,0x000055c7,
25520x00005317,0x0004007c,0x00000014,0x00005308, 27530x000001cc,0x000055c6,0x00050080,0x00000006,
25530x00005318,0x00060041,0x0000016c,0x000052ff, 27540x000055cd,0x000055c5,0x00000695,0x00050086,
25540x00005308,0x0000016b,0x0000016b,0x0006003d, 27550x00000006,0x000055ce,0x000055cd,0x000001c6,
25550x00000006,0x00005300,0x000052ff,0x00000002, 27560x00050084,0x00000006,0x000055c0,0x000001cc,
25560x00000004,0x0004007c,0x00000027,0x000052b7, 27570x000055ce,0x00050080,0x00000006,0x000055c1,
25570x00005300,0x00050080,0x00000006,0x000052b9, 27580x000055c7,0x000055c0,0x00050080,0x00000006,
25580x000052b2,0x000000ec,0x00050095,0x0000013d, 27590x000055bb,0x000055c1,0x000055c0,0x00050084,
25590x00005331,0x0000530e,0x000052b9,0x00050051, 27600x00000006,0x0000558f,0x000001f7,0x000013a7,
25600x00000006,0x00005332,0x00005331,0x00000001, 27610x00050080,0x00000006,0x00005590,0x000055bb,
25610x00050051,0x00000006,0x00005333,0x00005331, 27620x0000558f,0x00050041,0x0000026e,0x00005591,
25620x00000000,0x00050080,0x00000006,0x00005338, 27630x000001c1,0x0000026c,0x0004003d,0x00000007,
25630x00005315,0x00005332,0x00050050,0x00000007, 27640x00005592,0x00005591,0x00050051,0x00000006,
25640x00005339,0x00005333,0x00005338,0x0004007c, 27650x000055ec,0x00005592,0x00000000,0x00050095,
25650x00000014,0x00005329,0x00005339,0x00060041, 27660x00000145,0x000055ee,0x000055ec,0x00005590,
25660x0000016c,0x00005320,0x00005329,0x0000016b, 27670x00050051,0x00000006,0x000055ef,0x000055ee,
25670x0000016b,0x0006003d,0x00000006,0x00005321, 27680x00000001,0x00050051,0x00000006,0x000055f0,
25680x00005320,0x00000002,0x00000004,0x0004007c, 27690x000055ee,0x00000000,0x00050051,0x00000006,
25690x00000027,0x000052bd,0x00005321,0x00050080, 27700x000055f3,0x00005592,0x00000001,0x00050080,
25700x00000006,0x000052bf,0x000052b2,0x000001cd, 27710x00000006,0x000055f5,0x000055f3,0x000055ef,
25710x00050095,0x0000013d,0x00005352,0x0000530e, 27720x00050050,0x00000007,0x000055f6,0x000055f0,
25720x000052bf,0x00050051,0x00000006,0x00005353, 27730x000055f5,0x0004007c,0x00000014,0x000055e6,
25730x00005352,0x00000001,0x00050051,0x00000006, 27740x000055f6,0x00060041,0x00000174,0x000055dd,
25740x00005354,0x00005352,0x00000000,0x00050080, 27750x000055e6,0x00000173,0x00000173,0x0006003d,
25750x00000006,0x00005359,0x00005315,0x00005353, 27760x00000006,0x000055de,0x000055dd,0x00000002,
25760x00050050,0x00000007,0x0000535a,0x00005354, 27770x00000004,0x0004007c,0x00000027,0x00005595,
25770x00005359,0x0004007c,0x00000014,0x0000534a, 27780x000055de,0x00050080,0x00000006,0x00005597,
25780x0000535a,0x00060041,0x0000016c,0x00005341, 27790x00005590,0x000000f3,0x00050095,0x00000145,
25790x0000534a,0x0000016b,0x0000016b,0x0006003d, 27800x0000560f,0x000055ec,0x00005597,0x00050051,
25800x00000006,0x00005342,0x00005341,0x00000002, 27810x00000006,0x00005610,0x0000560f,0x00000001,
25810x00000004,0x0004007c,0x00000027,0x000052c3, 27820x00050051,0x00000006,0x00005611,0x0000560f,
25820x00005342,0x00060050,0x0000006c,0x000052c4, 27830x00000000,0x00050080,0x00000006,0x00005616,
25830x000052b7,0x000052bd,0x000052c3,0x00050080, 27840x000055f3,0x00005610,0x00050050,0x00000007,
25840x00000006,0x000052c6,0x000052b2,0x000001d4, 27850x00005617,0x00005611,0x00005616,0x0004007c,
25850x00050095,0x0000013d,0x00005373,0x0000530e, 27860x00000014,0x00005607,0x00005617,0x00060041,
25860x000052c6,0x00050051,0x00000006,0x00005374, 27870x00000174,0x000055fe,0x00005607,0x00000173,
25870x00005373,0x00000001,0x00050051,0x00000006, 27880x00000173,0x0006003d,0x00000006,0x000055ff,
25880x00005375,0x00005373,0x00000000,0x00050080, 27890x000055fe,0x00000002,0x00000004,0x0004007c,
25890x00000006,0x0000537a,0x00005315,0x00005374, 27900x00000027,0x0000559b,0x000055ff,0x00050080,
25900x00050050,0x00000007,0x0000537b,0x00005375, 27910x00000006,0x0000559d,0x00005590,0x000001d5,
25910x0000537a,0x0004007c,0x00000014,0x0000536b, 27920x00050095,0x00000145,0x00005630,0x000055ec,
25920x0000537b,0x00060041,0x0000016c,0x00005362, 27930x0000559d,0x00050051,0x00000006,0x00005631,
25930x0000536b,0x0000016b,0x0000016b,0x0006003d, 27940x00005630,0x00000001,0x00050051,0x00000006,
25940x00000006,0x00005363,0x00005362,0x00000002, 27950x00005632,0x00005630,0x00000000,0x00050080,
25950x00000004,0x0004007c,0x00000027,0x000052ca, 27960x00000006,0x00005637,0x000055f3,0x00005631,
25960x00005363,0x00050080,0x00000006,0x000052cc, 27970x00050050,0x00000007,0x00005638,0x00005632,
25970x000052b2,0x000001db,0x00050095,0x0000013d, 27980x00005637,0x0004007c,0x00000014,0x00005628,
25980x00005394,0x0000530e,0x000052cc,0x00050051, 27990x00005638,0x00060041,0x00000174,0x0000561f,
25990x00000006,0x00005395,0x00005394,0x00000001, 28000x00005628,0x00000173,0x00000173,0x0006003d,
26000x00050051,0x00000006,0x00005396,0x00005394, 28010x00000006,0x00005620,0x0000561f,0x00000002,
26010x00000000,0x00050080,0x00000006,0x0000539b, 28020x00000004,0x0004007c,0x00000027,0x000055a1,
26020x00005315,0x00005395,0x00050050,0x00000007, 28030x00005620,0x00060050,0x0000006c,0x000055a2,
26030x0000539c,0x00005396,0x0000539b,0x0004007c, 28040x00005595,0x0000559b,0x000055a1,0x00050080,
26040x00000014,0x0000538c,0x0000539c,0x00060041, 28050x00000006,0x000055a4,0x00005590,0x000001dc,
26050x0000016c,0x00005383,0x0000538c,0x0000016b, 28060x00050095,0x00000145,0x00005651,0x000055ec,
26060x0000016b,0x0006003d,0x00000006,0x00005384, 28070x000055a4,0x00050051,0x00000006,0x00005652,
26070x00005383,0x00000002,0x00000004,0x0004007c, 28080x00005651,0x00000001,0x00050051,0x00000006,
26080x00000027,0x000052d0,0x00005384,0x00050080, 28090x00005653,0x00005651,0x00000000,0x00050080,
26090x00000006,0x000052d2,0x000052b2,0x00000299, 28100x00000006,0x00005658,0x000055f3,0x00005652,
26100x00050095,0x0000013d,0x000053b5,0x0000530e, 28110x00050050,0x00000007,0x00005659,0x00005653,
26110x000052d2,0x00050051,0x00000006,0x000053b6, 28120x00005658,0x0004007c,0x00000014,0x00005649,
26120x000053b5,0x00000001,0x00050051,0x00000006, 28130x00005659,0x00060041,0x00000174,0x00005640,
26130x000053b7,0x000053b5,0x00000000,0x00050080, 28140x00005649,0x00000173,0x00000173,0x0006003d,
26140x00000006,0x000053bc,0x00005315,0x000053b6, 28150x00000006,0x00005641,0x00005640,0x00000002,
26150x00050050,0x00000007,0x000053bd,0x000053b7, 28160x00000004,0x0004007c,0x00000027,0x000055a8,
26160x000053bc,0x0004007c,0x00000014,0x000053ad, 28170x00005641,0x00050080,0x00000006,0x000055aa,
26170x000053bd,0x00060041,0x0000016c,0x000053a4, 28180x00005590,0x000001e3,0x00050095,0x00000145,
26180x000053ad,0x0000016b,0x0000016b,0x0006003d, 28190x00005672,0x000055ec,0x000055aa,0x00050051,
26190x00000006,0x000053a5,0x000053a4,0x00000002, 28200x00000006,0x00005673,0x00005672,0x00000001,
26200x00000004,0x0004007c,0x00000027,0x000052d6, 28210x00050051,0x00000006,0x00005674,0x00005672,
26210x000053a5,0x00060050,0x0000006c,0x000052d7, 28220x00000000,0x00050080,0x00000006,0x00005679,
26220x000052ca,0x000052d0,0x000052d6,0x00050041, 28230x000055f3,0x00005673,0x00050050,0x00000007,
26230x000001bb,0x000053c3,0x000001b9,0x000010be, 28240x0000567a,0x00005674,0x00005679,0x0004007c,
26240x0004003d,0x00000006,0x000053c4,0x000053c3, 28250x00000014,0x0000566a,0x0000567a,0x00060041,
26250x000500c2,0x00000006,0x000053d3,0x00005cea, 28260x00000174,0x00005661,0x0000566a,0x00000173,
26260x0000031d,0x00050041,0x000001bb,0x000053c7, 28270x00000173,0x0006003d,0x00000006,0x00005662,
26270x000001b9,0x0000034a,0x0004003d,0x00000006, 28280x00005661,0x00000002,0x00000004,0x0004007c,
26280x000053c8,0x000053c7,0x00050086,0x00000006, 28290x00000027,0x000055ae,0x00005662,0x00050080,
26290x000053c9,0x000053c8,0x000001c4,0x00050082, 28300x00000006,0x000055b0,0x00005590,0x000002a1,
26300x00000006,0x000053ca,0x000053d3,0x000053c9, 28310x00050095,0x00000145,0x00005693,0x000055ec,
26310x00050084,0x00000006,0x000053cb,0x000000ec, 28320x000055b0,0x00050051,0x00000006,0x00005694,
26320x000053ca,0x00050080,0x00000006,0x000053cc, 28330x00005693,0x00000001,0x00050051,0x00000006,
26330x000053c4,0x000053cb,0x00050041,0x00000266, 28340x00005695,0x00005693,0x00000000,0x00050080,
26340x000053cd,0x000001b9,0x0000016b,0x0004003d, 28350x00000006,0x0000569a,0x000055f3,0x00005694,
26350x00000007,0x000053ce,0x000053cd,0x00050051, 28360x00050050,0x00000007,0x0000569b,0x00005695,
26360x00000006,0x000053ea,0x000053ce,0x00000000, 28370x0000569a,0x0004007c,0x00000014,0x0000568b,
26370x00050095,0x0000013d,0x000053ec,0x000053ea, 28380x0000569b,0x00060041,0x00000174,0x00005682,
26380x000053cc,0x00050051,0x00000006,0x000053ed, 28390x0000568b,0x00000173,0x00000173,0x0006003d,
26390x000053ec,0x00000001,0x00050051,0x00000006, 28400x00000006,0x00005683,0x00005682,0x00000002,
26400x000053ee,0x000053ec,0x00000000,0x00050051, 28410x00000004,0x0004007c,0x00000027,0x000055b4,
26410x00000006,0x000053f1,0x000053ce,0x00000001, 28420x00005683,0x00060050,0x0000006c,0x000055b5,
26420x00050080,0x00000006,0x000053f3,0x000053f1, 28430x000055a8,0x000055ae,0x000055b4,0x000300f7,
26430x000053ed,0x00050050,0x00000007,0x000053f4, 28440x000056b5,0x00000000,0x000300fb,0x00000140,
26440x000053ee,0x000053f3,0x0004007c,0x00000014, 28450x000056a6,0x000200f8,0x000056a6,0x000300f7,
26450x000053e4,0x000053f4,0x00060041,0x0000016c, 28460x000056d9,0x00000000,0x000300fb,0x00000140,
26460x000053db,0x000053e4,0x0000016b,0x0000016b, 28470x000056be,0x000200f8,0x000056be,0x00050041,
26470x0006003d,0x00000006,0x000053dc,0x000053db, 28480x000001c3,0x000056bf,0x000001c1,0x00000352,
26480x00000002,0x00000004,0x00050041,0x000001bb, 28490x0004003d,0x00000006,0x000056c0,0x000056bf,
26490x000053f7,0x000001b9,0x00000334,0x0004003d, 28500x00050086,0x00000006,0x000056c1,0x000056c0,
26500x00000006,0x000053f8,0x000053f7,0x000500c7, 28510x000001cc,0x000500c2,0x00000006,0x000056de,
26510x00000006,0x000053f9,0x000053f8,0x00000142, 28520x000060e0,0x00000325,0x000500b0,0x0000002f,
26520x000500ab,0x0000002f,0x000053fa,0x000053f9, 28530x000056c6,0x000056de,0x000056c1,0x000400a8,
26530x00000138,0x000300f7,0x00005131,0x00000000, 28540x0000002f,0x000056c7,0x000056c6,0x000300f7,
26540x000400fa,0x000053fa,0x00005126,0x00005131, 28550x000056ce,0x00000000,0x000400fa,0x000056c7,
26550x000200f8,0x00005126,0x00050084,0x00000006, 28560x000056c8,0x000056ce,0x000200f8,0x000056c8,
26560x0000512a,0x00000342,0x000012dd,0x00050080, 28570x00050041,0x000001c3,0x000056ca,0x000001c1,
26570x00000006,0x0000512b,0x000053c8,0x0000512a, 28580x000003b7,0x0004003d,0x00000006,0x000056cb,
26580x00050080,0x00000006,0x0000512c,0x0000512b, 28590x000056ca,0x00050086,0x00000006,0x000056cc,
26590x0000084a,0x00050095,0x0000013d,0x00005412, 28600x000056cb,0x000001cc,0x000500ae,0x0000002f,
26600x000053ea,0x0000512c,0x00050051,0x00000006, 28610x000056cd,0x000056de,0x000056cc,0x000200f9,
26610x00005413,0x00005412,0x00000001,0x00050051, 28620x000056ce,0x000200f8,0x000056ce,0x000700f5,
26620x00000006,0x00005414,0x00005412,0x00000000, 28630x0000002f,0x000056cf,0x000056c6,0x000056be,
26630x00050080,0x00000006,0x00005419,0x000053f1, 28640x000056cd,0x000056c8,0x000300f7,0x000056d1,
26640x00005413,0x00050050,0x00000007,0x0000541a, 28650x00000000,0x000400fa,0x000056cf,0x000056d0,
26650x00005414,0x00005419,0x0004007c,0x00000014, 28660x000056d1,0x000200f8,0x000056d0,0x000200f9,
26660x0000540a,0x0000541a,0x00060041,0x0000016c, 28670x000056d9,0x000200f8,0x000056d1,0x00050041,
26670x00005402,0x0000540a,0x0000016b,0x0000016b, 28680x000001c3,0x000056d2,0x000001c1,0x000003c1,
26680x0005003e,0x00005402,0x000053dc,0x00000002, 28690x0004003d,0x00000006,0x000056d3,0x000056d2,
26690x00000004,0x000200f9,0x00005131,0x000200f8, 28700x00050082,0x00000006,0x000056d6,0x000056de,
26700x00005131,0x000200f9,0x00005132,0x000200f8, 28710x000056c1,0x00050084,0x00000006,0x000056d7,
26710x00005132,0x000700f5,0x0000006c,0x00005cf4, 28720x000000f3,0x000056d6,0x00050080,0x00000006,
26720x000052d7,0x00005131,0x00005d1c,0x0000519d, 28730x000056d8,0x000056d3,0x000056d7,0x000200f9,
26730x000700f5,0x0000006c,0x00005cf1,0x000052c4, 28740x000056d9,0x000200f8,0x000056d9,0x000700f5,
26740x00005131,0x00005d18,0x0000519d,0x000700f5, 28750x00000006,0x000060e1,0x000003bf,0x000056d0,
26750x00000006,0x00005ced,0x00000138,0x00005131, 28760x000056d8,0x000056d1,0x000500aa,0x0000002f,
26760x0000519f,0x0000519d,0x000700f5,0x00000006, 28770x000056aa,0x000060e1,0x000003bf,0x000300f7,
26770x00005ceb,0x000053dc,0x00005131,0x000059fe, 28780x000056ac,0x00000000,0x000400fa,0x000056aa,
26780x0000519d,0x000700f5,0x00000006,0x00005d5e, 28790x000056ab,0x000056ac,0x000200f8,0x000056ab,
26790x00005cea,0x00005131,0x00005ceb,0x0000519d, 28800x000200f9,0x000056b5,0x000200f8,0x000056ac,
26800x000500ab,0x0000002f,0x00005135,0x00005ceb, 28810x00050041,0x0000026e,0x000056ad,0x000001c1,
26810x00000539,0x000500b0,0x0000002f,0x00005137, 28820x00000173,0x0004003d,0x00000007,0x000056ae,
26820x00005ced,0x00000342,0x000500a7,0x0000002f, 28830x000056ad,0x00050051,0x00000006,0x000056f5,
26830x00005138,0x00005135,0x00005137,0x000400f6, 28840x000056ae,0x00000000,0x00050095,0x00000145,
26840x000051a0,0x0000519d,0x00000000,0x000400fa, 28850x000056f7,0x000056f5,0x000060e1,0x00050051,
26850x00005138,0x00005139,0x000051a0,0x000200f8, 28860x00000006,0x000056f8,0x000056f7,0x00000001,
26860x00005139,0x000500c2,0x00000006,0x0000541e, 28870x00050051,0x00000006,0x000056f9,0x000056f7,
26870x00005ceb,0x0000031d,0x00050084,0x00000006, 28880x00000000,0x00050051,0x00000006,0x000056fc,
26880x0000513c,0x0000541e,0x000001c4,0x000200f9, 28890x000056ae,0x00000001,0x00050080,0x00000006,
26890x0000513d,0x000200f8,0x0000513d,0x000700f5, 28900x000056fe,0x000056fc,0x000056f8,0x00050050,
26900x00000006,0x00005d0a,0x00000138,0x00005139, 28910x00000007,0x000056ff,0x000056f9,0x000056fe,
26910x00006026,0x0000515b,0x000700f5,0x00000006, 28920x0004007c,0x00000014,0x000056ef,0x000056ff,
26920x00005cee,0x00000138,0x00005139,0x0000515d, 28930x00060041,0x00000174,0x000056e6,0x000056ef,
26930x0000515b,0x000500b0,0x0000002f,0x00005140, 28940x00000173,0x00000173,0x0006003d,0x00000006,
26940x00005cee,0x000000ec,0x000400f6,0x0000515e, 28950x000056e7,0x000056e6,0x00000002,0x00000004,
26950x0000515b,0x00000000,0x000400fa,0x00005140, 28960x000300f7,0x00005731,0x00000000,0x000300fb,
26960x00005141,0x0000515e,0x000200f8,0x00005141, 28970x00000140,0x00005708,0x000200f8,0x00005708,
26970x00050084,0x00000006,0x00005144,0x000000ec, 28980x000500c7,0x00000006,0x0000570a,0x000056e7,
26980x00005cee,0x00050080,0x00000006,0x00005145, 28990x00000376,0x000500c7,0x00000006,0x00005737,
26990x0000513c,0x00005144,0x00050095,0x0000013d, 29000x000013a9,0x00000288,0x000500ab,0x0000002f,
27000x00005437,0x000053ea,0x00005145,0x00050051, 29010x00005738,0x00005737,0x00000140,0x000600a9,
27010x00000006,0x00005438,0x00005437,0x00000001, 29020x00000006,0x0000570c,0x00005738,0x000000f3,
27020x00050051,0x00000006,0x00005439,0x00005437, 29030x0000036c,0x000500ab,0x0000002f,0x0000570d,
27030x00000000,0x00050080,0x00000006,0x0000543e, 29040x0000570a,0x0000570c,0x000300f7,0x0000570f,
27040x000053f1,0x00005438,0x00050050,0x00000007, 29050x00000000,0x000400fa,0x0000570d,0x0000570e,
27050x0000543f,0x00005439,0x0000543e,0x0004007c, 29060x0000570f,0x000200f8,0x0000570e,0x000200f9,
27060x00000014,0x0000542f,0x0000543f,0x00060041, 29070x00005731,0x000200f8,0x0000570f,0x000500c2,
27070x0000016c,0x00005426,0x0000542f,0x0000016b, 29080x00000006,0x0000573c,0x000056e7,0x00000325,
27080x0000016b,0x0006003d,0x00000006,0x00005427, 29090x00050084,0x00000006,0x00005712,0x0000573c,
27090x00005426,0x00000002,0x00000004,0x000500aa, 29100x000001cc,0x000500ae,0x0000002f,0x00005715,
27100x0000002f,0x0000514a,0x00005427,0x00000539, 29110x0000573c,0x00000387,0x000400a8,0x0000002f,
27110x000300f7,0x0000514c,0x00000000,0x000400fa, 29120x00005716,0x00005715,0x000300f7,0x0000571c,
27120x0000514a,0x0000514b,0x0000514c,0x000200f8, 29130x00000000,0x000400fa,0x00005716,0x00005717,
27130x0000514b,0x000200f9,0x0000515b,0x000200f8, 29140x0000571c,0x000200f8,0x00005717,0x00050041,
27140x0000514c,0x00050080,0x00000006,0x0000514e, 29150x000001c3,0x00005719,0x000001c1,0x00000362,
27150x00005d0a,0x00000264,0x000500aa,0x0000002f, 29160x0004003d,0x00000006,0x0000571a,0x00005719,
27160x00005151,0x00005427,0x00005d5e,0x000300f7, 29170x000500b0,0x0000002f,0x0000571b,0x00005712,
27170x0000515a,0x00000000,0x000400fa,0x00005151, 29180x0000571a,0x000200f9,0x0000571c,0x000200f8,
27180x00005152,0x0000515a,0x000200f8,0x00005152, 29190x0000571c,0x000700f5,0x0000002f,0x0000571d,
27190x000500c7,0x00000006,0x00005443,0x00005ceb, 29200x00005715,0x0000570f,0x0000571b,0x00005717,
27200x00000d2b,0x000500aa,0x0000002f,0x00005444, 29210x000300f7,0x0000571f,0x00000000,0x000400fa,
27210x00005443,0x000000ec,0x000300f7,0x00005497, 29220x0000571d,0x0000571e,0x0000571f,0x000200f8,
27220x00000000,0x000300fb,0x00000138,0x0000545d, 29230x0000571e,0x000200f9,0x00005731,0x000200f8,
27230x000200f8,0x0000545d,0x000300f7,0x00005468, 29240x0000571f,0x00050041,0x000001c3,0x00005721,
27240x00000000,0x000400fa,0x00005444,0x0000545f, 29250x000001c1,0x00000362,0x0004003d,0x00000006,
27250x00005468,0x000200f8,0x0000545f,0x00050080, 29260x00005722,0x00005721,0x00050082,0x00000006,
27260x00000006,0x00005461,0x0000513c,0x000001db, 29270x00005723,0x00005712,0x00005722,0x000600a9,
27270x00050084,0x00000006,0x00005463,0x000001d4, 29280x00000006,0x00005744,0x00005738,0x000001cc,
27280x00005cee,0x00050080,0x00000006,0x00005464, 29290x0000034a,0x00050089,0x00000006,0x00005726,
27290x00005461,0x00005463,0x00050051,0x00000027, 29300x00005723,0x00005744,0x000500aa,0x0000002f,
27300x000054af,0x00005cf1,0x00000000,0x000300f7, 29310x00005727,0x00005726,0x00000140,0x000300f7,
27310x00005526,0x00000000,0x000300fb,0x00000138, 29320x0000572f,0x00000000,0x000400fa,0x00005727,
27320x000054e0,0x000200f8,0x000054e0,0x0004007c, 29330x00005728,0x0000572f,0x000200f8,0x00005728,
27330x00000006,0x000054e2,0x000054af,0x000500c2, 29340x00050086,0x00000006,0x0000572b,0x00005723,
27340x00000006,0x000054e4,0x000054e2,0x0000035a, 29350x00005744,0x00050041,0x000001c3,0x0000572c,
27350x000500c7,0x00000006,0x000054e5,0x000054e4, 29360x000001c1,0x0000020e,0x0004003d,0x00000006,
27360x00000373,0x000500c7,0x00000006,0x000054e7, 29370x0000572d,0x0000572c,0x000500b0,0x0000002f,
27370x000054e2,0x00000256,0x000500ab,0x0000002f, 29380x0000572e,0x0000572b,0x0000572d,0x000200f9,
27380x000054ea,0x000054e5,0x00000138,0x000500ac, 29390x0000572f,0x000200f8,0x0000572f,0x000700f5,
27390x0000002f,0x000054ed,0x000054e7,0x0000037e, 29400x0000002f,0x00005730,0x00005727,0x0000571f,
27400x000300f7,0x000054f1,0x00000000,0x000400fa, 29410x0000572e,0x00005728,0x000200f9,0x00005731,
27410x000054ed,0x000054ee,0x000054f1,0x000200f8, 29420x000200f8,0x00005731,0x000900f5,0x0000002f,
27420x000054ee,0x000500c5,0x00000006,0x000054f0, 29430x000060e2,0x0000037d,0x0000570e,0x0000037d,
27430x000054e5,0x00000383,0x000200f9,0x00005526, 29440x0000571e,0x00005730,0x0000572f,0x000600a9,
27440x000200f8,0x000054f1,0x000500aa,0x0000002f, 29450x00000006,0x000056b4,0x000060e2,0x000056e7,
27450x000054f3,0x000054e7,0x00000138,0x000300f7, 29460x000003bf,0x000200f9,0x000056b5,0x000200f8,
27460x000054f6,0x00000000,0x000400fa,0x000054f3, 29470x000056b5,0x000700f5,0x00000006,0x000060e3,
27470x000054f4,0x000054f6,0x000200f8,0x000054f4, 29480x000003bf,0x000056ab,0x000056b4,0x00005731,
27480x000200f9,0x00005526,0x000200f8,0x000054f6, 29490x000500c7,0x00000006,0x00005759,0x000013a9,
27490x000500c2,0x00000006,0x000054f8,0x000054e7, 29500x0000014a,0x000500ab,0x0000002f,0x0000575a,
27500x0000038e,0x0004007c,0x000000f4,0x000054f9, 29510x00005759,0x00000140,0x000300f7,0x0000540f,
27510x000054f8,0x00050082,0x000000f4,0x000054fa, 29520x00000000,0x000400fa,0x0000575a,0x00005404,
27520x000054f9,0x00000391,0x000500af,0x0000002f, 29530x0000540f,0x000200f8,0x00005404,0x00050084,
27530x000054fc,0x000054fa,0x0000035a,0x000300f7, 29540x00000006,0x00005408,0x0000034a,0x000013a7,
27540x00005502,0x00000000,0x000400fa,0x000054fc, 29550x00050080,0x00000006,0x00005409,0x000056c0,
27550x000054fd,0x00005502,0x000200f8,0x000054fd, 29560x00005408,0x00050080,0x00000006,0x0000540a,
27560x000600a9,0x00000006,0x00005500,0x000054ea, 29570x00005409,0x000008b0,0x00050041,0x0000026e,
27570x00000399,0x0000039a,0x000500c5,0x00000006, 29580x0000540b,0x000001c1,0x00000173,0x0004003d,
27580x00005501,0x000054e5,0x00005500,0x000200f9, 29590x00000007,0x0000540c,0x0000540b,0x00050051,
27590x00005526,0x000200f8,0x00005502,0x000500b1, 29600x00000006,0x00005770,0x0000540c,0x00000000,
27600x0000002f,0x00005504,0x000054fa,0x0000039f, 29610x00050095,0x00000145,0x00005772,0x00005770,
27610x000300f7,0x0000550e,0x00000000,0x000400fa, 29620x0000540a,0x00050051,0x00000006,0x00005773,
27620x00005504,0x00005505,0x0000550e,0x000200f8, 29630x00005772,0x00000001,0x00050051,0x00000006,
27630x00005505,0x000300f7,0x0000550c,0x00000000, 29640x00005774,0x00005772,0x00000000,0x00050051,
27640x000400fa,0x000054ea,0x00005507,0x0000550a, 29650x00000006,0x00005777,0x0000540c,0x00000001,
27650x000200f8,0x0000550a,0x000200f9,0x0000550c, 29660x00050080,0x00000006,0x00005779,0x00005777,
27660x000200f8,0x00005507,0x000500c5,0x00000006, 29670x00005773,0x00050050,0x00000007,0x0000577a,
27670x00005509,0x000054e5,0x000003a8,0x000200f9, 29680x00005774,0x00005779,0x0004007c,0x00000014,
27680x0000550c,0x000200f8,0x0000550c,0x000700f5, 29690x0000576a,0x0000577a,0x00060041,0x00000174,
27690x00000006,0x00005d62,0x00005509,0x00005507, 29700x00005762,0x0000576a,0x00000173,0x00000173,
27700x000054e5,0x0000550a,0x000200f9,0x00005526, 29710x0005003e,0x00005762,0x000060e3,0x00000002,
27710x000200f8,0x0000550e,0x000500c7,0x00000006, 29720x00000004,0x000200f9,0x0000540f,0x000200f8,
27720x00005510,0x000054e2,0x000003b0,0x00050080, 29730x0000540f,0x000200f9,0x00005410,0x000200f8,
27730x000000f4,0x00005512,0x000054f9,0x000060ff, 29740x00005410,0x000700f5,0x0000006c,0x000060f3,
27740x0004007c,0x00000006,0x00005513,0x00005512, 29750x000055b5,0x0000540f,0x00006121,0x0000547b,
27750x000500c4,0x00000006,0x00005514,0x00005513, 29760x000700f5,0x0000006c,0x000060ea,0x000055a2,
27760x000003b6,0x000500c2,0x00000006,0x00005516, 29770x0000540f,0x0000611d,0x0000547b,0x000700f5,
27770x00005510,0x000001f0,0x000500c5,0x00000006, 29780x00000006,0x000060e6,0x00000140,0x0000540f,
27780x00005517,0x00005514,0x00005516,0x000300f7, 29790x0000547d,0x0000547b,0x000700f5,0x00000006,
27790x0000551d,0x00000000,0x000400fa,0x000054ea, 29800x000060e4,0x000060e3,0x0000540f,0x00006135,
27800x00005519,0x0000551d,0x000200f8,0x00005519, 29810x0000547b,0x000700f5,0x00000006,0x00006178,
27810x000500c7,0x00000006,0x0000551b,0x000054e2, 29820x000060e0,0x0000540f,0x000060e4,0x0000547b,
27820x000003bf,0x000500ab,0x0000002f,0x0000551c, 29830x000500ab,0x0000002f,0x00005413,0x000060e4,
27830x0000551b,0x00000138,0x000200f9,0x0000551d, 29840x000003bf,0x000500b0,0x0000002f,0x00005415,
27840x000200f8,0x0000551d,0x000700f5,0x0000002f, 29850x000060e6,0x0000034a,0x000500a7,0x0000002f,
27850x0000551e,0x000054ea,0x0000550e,0x0000551c, 29860x00005416,0x00005413,0x00005415,0x000400f6,
27860x00005519,0x000300f7,0x00005522,0x00000000, 29870x0000547e,0x0000547b,0x00000000,0x000400fa,
27870x000400fa,0x0000551e,0x0000551f,0x00005522, 29880x00005416,0x00005417,0x0000547e,0x000200f8,
27880x000200f8,0x0000551f,0x00050080,0x00000006, 29890x00005417,0x000500c2,0x00000006,0x0000577e,
27890x00005521,0x00005517,0x00000142,0x000200f9, 29900x000060e4,0x00000325,0x00050084,0x00000006,
27900x00005522,0x000200f8,0x00005522,0x000700f5, 29910x0000541a,0x0000577e,0x000001cc,0x000200f9,
27910x00000006,0x00005d61,0x00005517,0x0000551d, 29920x0000541b,0x000200f8,0x0000541b,0x000700f5,
27920x00005521,0x0000551f,0x000500c5,0x00000006, 29930x00000006,0x0000610f,0x00000140,0x00005417,
27930x00005525,0x000054e5,0x00005d61,0x000200f9, 29940x0000645a,0x00005439,0x000700f5,0x00000006,
27940x00005526,0x000200f8,0x00005526,0x000d00f5, 29950x000060e7,0x00000140,0x00005417,0x0000543b,
27950x00000006,0x00005d63,0x000054f0,0x000054ee, 29960x00005439,0x000500b0,0x0000002f,0x0000541e,
27960x000054e5,0x000054f4,0x00005501,0x000054fd, 29970x000060e7,0x000000f3,0x000400f6,0x0000543c,
27970x00005d62,0x0000550c,0x00005525,0x00005522, 29980x00005439,0x00000000,0x000400fa,0x0000541e,
27980x00050051,0x00000027,0x000054b2,0x00005cf1, 29990x0000541f,0x0000543c,0x000200f8,0x0000541f,
27990x00000001,0x000300f7,0x0000557a,0x00000000, 30000x00050084,0x00000006,0x00005422,0x000000f3,
28000x000300fb,0x00000138,0x00005534,0x000200f8, 30010x000060e7,0x00050080,0x00000006,0x00005423,
28010x00005534,0x0004007c,0x00000006,0x00005536, 30020x0000541a,0x00005422,0x00050041,0x0000026e,
28020x000054b2,0x000500c2,0x00000006,0x00005538, 30030x00005424,0x000001c1,0x00000173,0x0004003d,
28030x00005536,0x0000035a,0x000500c7,0x00000006, 30040x00000007,0x00005425,0x00005424,0x00050051,
28040x00005539,0x00005538,0x00000373,0x000500c7, 30050x00000006,0x00005795,0x00005425,0x00000000,
28050x00000006,0x0000553b,0x00005536,0x00000256, 30060x00050095,0x00000145,0x00005797,0x00005795,
28060x000500ab,0x0000002f,0x0000553e,0x00005539, 30070x00005423,0x00050051,0x00000006,0x00005798,
28070x00000138,0x000500ac,0x0000002f,0x00005541, 30080x00005797,0x00000001,0x00050051,0x00000006,
28080x0000553b,0x0000037e,0x000300f7,0x00005545, 30090x00005799,0x00005797,0x00000000,0x00050051,
28090x00000000,0x000400fa,0x00005541,0x00005542, 30100x00000006,0x0000579c,0x00005425,0x00000001,
28100x00005545,0x000200f8,0x00005542,0x000500c5, 30110x00050080,0x00000006,0x0000579e,0x0000579c,
28110x00000006,0x00005544,0x00005539,0x00000383, 30120x00005798,0x00050050,0x00000007,0x0000579f,
28120x000200f9,0x0000557a,0x000200f8,0x00005545, 30130x00005799,0x0000579e,0x0004007c,0x00000014,
28130x000500aa,0x0000002f,0x00005547,0x0000553b, 30140x0000578f,0x0000579f,0x00060041,0x00000174,
28140x00000138,0x000300f7,0x0000554a,0x00000000, 30150x00005786,0x0000578f,0x00000173,0x00000173,
28150x000400fa,0x00005547,0x00005548,0x0000554a, 30160x0006003d,0x00000006,0x00005787,0x00005786,
28160x000200f8,0x00005548,0x000200f9,0x0000557a, 30170x00000002,0x00000004,0x000500aa,0x0000002f,
28170x000200f8,0x0000554a,0x000500c2,0x00000006, 30180x00005428,0x00005787,0x000003bf,0x000300f7,
28180x0000554c,0x0000553b,0x0000038e,0x0004007c, 30190x0000542a,0x00000000,0x000400fa,0x00005428,
28190x000000f4,0x0000554d,0x0000554c,0x00050082, 30200x00005429,0x0000542a,0x000200f8,0x00005429,
28200x000000f4,0x0000554e,0x0000554d,0x00000391, 30210x000200f9,0x00005439,0x000200f8,0x0000542a,
28210x000500af,0x0000002f,0x00005550,0x0000554e, 30220x00050080,0x00000006,0x0000542c,0x0000610f,
28220x0000035a,0x000300f7,0x00005556,0x00000000, 30230x0000026c,0x000500aa,0x0000002f,0x0000542f,
28230x000400fa,0x00005550,0x00005551,0x00005556, 30240x00005787,0x00006178,0x000300f7,0x00005438,
28240x000200f8,0x00005551,0x000600a9,0x00000006, 30250x00000000,0x000400fa,0x0000542f,0x00005430,
28250x00005554,0x0000553e,0x00000399,0x0000039a, 30260x00005438,0x000200f8,0x00005430,0x000500c7,
28260x000500c5,0x00000006,0x00005555,0x00005539, 30270x00000006,0x000057a3,0x000060e4,0x00000376,
28270x00005554,0x000200f9,0x0000557a,0x000200f8, 30280x000500aa,0x0000002f,0x000057a4,0x000057a3,
28280x00005556,0x000500b1,0x0000002f,0x00005558, 30290x000000f3,0x000300f7,0x000057f7,0x00000000,
28290x0000554e,0x0000039f,0x000300f7,0x00005562, 30300x000300fb,0x00000140,0x000057bd,0x000200f8,
28300x00000000,0x000400fa,0x00005558,0x00005559, 30310x000057bd,0x000300f7,0x000057c8,0x00000000,
28310x00005562,0x000200f8,0x00005559,0x000300f7, 30320x000400fa,0x000057a4,0x000057bf,0x000057c8,
28320x00005560,0x00000000,0x000400fa,0x0000553e, 30330x000200f8,0x000057bf,0x00050080,0x00000006,
28330x0000555b,0x0000555e,0x000200f8,0x0000555e, 30340x000057c1,0x0000541a,0x000001e3,0x00050084,
28340x000200f9,0x00005560,0x000200f8,0x0000555b, 30350x00000006,0x000057c3,0x000001dc,0x000060e7,
28350x000500c5,0x00000006,0x0000555d,0x00005539, 30360x00050080,0x00000006,0x000057c4,0x000057c1,
28360x000003a8,0x000200f9,0x00005560,0x000200f8, 30370x000057c3,0x00050051,0x00000027,0x0000580f,
28370x00005560,0x000700f5,0x00000006,0x00005d66, 30380x000060ea,0x00000000,0x000300f7,0x00005886,
28380x0000555d,0x0000555b,0x00005539,0x0000555e, 30390x00000000,0x000300fb,0x00000140,0x00005840,
28390x000200f9,0x0000557a,0x000200f8,0x00005562, 30400x000200f8,0x00005840,0x0004007c,0x00000006,
28400x000500c7,0x00000006,0x00005564,0x00005536, 30410x00005842,0x0000580f,0x000500c2,0x00000006,
28410x000003b0,0x00050080,0x000000f4,0x00005566, 30420x00005844,0x00005842,0x00000362,0x000500c7,
28420x0000554d,0x000060ff,0x0004007c,0x00000006, 30430x00000006,0x00005845,0x00005844,0x000003d1,
28430x00005567,0x00005566,0x000500c4,0x00000006, 30440x000500c7,0x00000006,0x00005847,0x00005842,
28440x00005568,0x00005567,0x000003b6,0x000500c2, 30450x0000025e,0x000500ab,0x0000002f,0x0000584a,
28450x00000006,0x0000556a,0x00005564,0x000001f0, 30460x00005845,0x00000140,0x000500ac,0x0000002f,
28460x000500c5,0x00000006,0x0000556b,0x00005568, 30470x0000584d,0x00005847,0x000003dc,0x000300f7,
28470x0000556a,0x000300f7,0x00005571,0x00000000, 30480x00005851,0x00000000,0x000400fa,0x0000584d,
28480x000400fa,0x0000553e,0x0000556d,0x00005571, 30490x0000584e,0x00005851,0x000200f8,0x0000584e,
28490x000200f8,0x0000556d,0x000500c7,0x00000006, 30500x000500c5,0x00000006,0x00005850,0x00005845,
28500x0000556f,0x00005536,0x000003bf,0x000500ab, 30510x000003e1,0x000200f9,0x00005886,0x000200f8,
28510x0000002f,0x00005570,0x0000556f,0x00000138, 30520x00005851,0x000500aa,0x0000002f,0x00005853,
28520x000200f9,0x00005571,0x000200f8,0x00005571, 30530x00005847,0x00000140,0x000300f7,0x00005856,
28530x000700f5,0x0000002f,0x00005572,0x0000553e, 30540x00000000,0x000400fa,0x00005853,0x00005854,
28540x00005562,0x00005570,0x0000556d,0x000300f7, 30550x00005856,0x000200f8,0x00005854,0x000200f9,
28550x00005576,0x00000000,0x000400fa,0x00005572, 30560x00005886,0x000200f8,0x00005856,0x000500c2,
28560x00005573,0x00005576,0x000200f8,0x00005573, 30570x00000006,0x00005858,0x00005847,0x000003ec,
28570x00050080,0x00000006,0x00005575,0x0000556b, 30580x0004007c,0x000000fb,0x00005859,0x00005858,
28580x00000142,0x000200f9,0x00005576,0x000200f8, 30590x00050082,0x000000fb,0x0000585a,0x00005859,
28590x00005576,0x000700f5,0x00000006,0x00005d65, 30600x000003ef,0x000500af,0x0000002f,0x0000585c,
28600x0000556b,0x00005571,0x00005575,0x00005573, 30610x0000585a,0x00000362,0x000300f7,0x00005862,
28610x000500c5,0x00000006,0x00005579,0x00005539, 30620x00000000,0x000400fa,0x0000585c,0x0000585d,
28620x00005d65,0x000200f9,0x0000557a,0x000200f8, 30630x00005862,0x000200f8,0x0000585d,0x000600a9,
28630x0000557a,0x000d00f5,0x00000006,0x00005d67, 30640x00000006,0x00005860,0x0000584a,0x000003f7,
28640x00005544,0x00005542,0x00005539,0x00005548, 30650x000003f8,0x000500c5,0x00000006,0x00005861,
28650x00005555,0x00005551,0x00005d66,0x00005560, 30660x00005845,0x00005860,0x000200f9,0x00005886,
28660x00005579,0x00005576,0x000500c4,0x00000006, 30670x000200f8,0x00005862,0x000500b1,0x0000002f,
28670x000054b4,0x00005d67,0x0000035a,0x000500c5, 30680x00005864,0x0000585a,0x000003fd,0x000300f7,
28680x00000006,0x000054b5,0x00005d63,0x000054b4, 30690x0000586e,0x00000000,0x000400fa,0x00005864,
28690x00050095,0x0000013d,0x00005593,0x000053ea, 30700x00005865,0x0000586e,0x000200f8,0x00005865,
28700x00005464,0x00050051,0x00000006,0x00005594, 30710x000300f7,0x0000586c,0x00000000,0x000400fa,
28710x00005593,0x00000001,0x00050051,0x00000006, 30720x0000584a,0x00005867,0x0000586a,0x000200f8,
28720x00005595,0x00005593,0x00000000,0x00050080, 30730x0000586a,0x000200f9,0x0000586c,0x000200f8,
28730x00000006,0x0000559a,0x000053f1,0x00005594, 30740x00005867,0x000500c5,0x00000006,0x00005869,
28740x00050050,0x00000007,0x0000559b,0x00005595, 30750x00005845,0x00000406,0x000200f9,0x0000586c,
28750x0000559a,0x0004007c,0x00000014,0x0000558b, 30760x000200f8,0x0000586c,0x000700f5,0x00000006,
28760x0000559b,0x00060041,0x0000016c,0x00005583, 30770x00006188,0x00005869,0x00005867,0x00005845,
28770x0000558b,0x0000016b,0x0000016b,0x0005003e, 30780x0000586a,0x000200f9,0x00005886,0x000200f8,
28780x00005583,0x000054b5,0x00000002,0x00000004, 30790x0000586e,0x000500c7,0x00000006,0x00005870,
28790x00050080,0x00000006,0x000054bb,0x00005464, 30800x00005842,0x0000040e,0x00050080,0x000000fb,
28800x000000ec,0x00050051,0x00000027,0x000054bd, 30810x00005872,0x00005859,0x00006533,0x0004007c,
28810x00005cf1,0x00000002,0x000300f7,0x000055ee, 30820x00000006,0x00005873,0x00005872,0x000500c4,
28820x00000000,0x000300fb,0x00000138,0x000055a8, 30830x00000006,0x00005874,0x00005873,0x00000414,
28830x000200f8,0x000055a8,0x0004007c,0x00000006, 30840x000500c2,0x00000006,0x00005876,0x00005870,
28840x000055aa,0x000054bd,0x000500c2,0x00000006, 30850x000001f8,0x000500c5,0x00000006,0x00005877,
28850x000055ac,0x000055aa,0x0000035a,0x000500c7, 30860x00005874,0x00005876,0x000300f7,0x0000587d,
28860x00000006,0x000055ad,0x000055ac,0x00000373, 30870x00000000,0x000400fa,0x0000584a,0x00005879,
28870x000500c7,0x00000006,0x000055af,0x000055aa, 30880x0000587d,0x000200f8,0x00005879,0x000500c7,
28880x00000256,0x000500ab,0x0000002f,0x000055b2, 30890x00000006,0x0000587b,0x00005842,0x0000041d,
28890x000055ad,0x00000138,0x000500ac,0x0000002f, 30900x000500ab,0x0000002f,0x0000587c,0x0000587b,
28900x000055b5,0x000055af,0x0000037e,0x000300f7, 30910x00000140,0x000200f9,0x0000587d,0x000200f8,
28910x000055b9,0x00000000,0x000400fa,0x000055b5, 30920x0000587d,0x000700f5,0x0000002f,0x0000587e,
28920x000055b6,0x000055b9,0x000200f8,0x000055b6, 30930x0000584a,0x0000586e,0x0000587c,0x00005879,
28930x000500c5,0x00000006,0x000055b8,0x000055ad, 30940x000300f7,0x00005882,0x00000000,0x000400fa,
28940x00000383,0x000200f9,0x000055ee,0x000200f8, 30950x0000587e,0x0000587f,0x00005882,0x000200f8,
28950x000055b9,0x000500aa,0x0000002f,0x000055bb, 30960x0000587f,0x00050080,0x00000006,0x00005881,
28960x000055af,0x00000138,0x000300f7,0x000055be, 30970x00005877,0x0000014a,0x000200f9,0x00005882,
28970x00000000,0x000400fa,0x000055bb,0x000055bc, 30980x000200f8,0x00005882,0x000700f5,0x00000006,
28980x000055be,0x000200f8,0x000055bc,0x000200f9, 30990x00006187,0x00005877,0x0000587d,0x00005881,
28990x000055ee,0x000200f8,0x000055be,0x000500c2, 31000x0000587f,0x000500c5,0x00000006,0x00005885,
29000x00000006,0x000055c0,0x000055af,0x0000038e, 31010x00005845,0x00006187,0x000200f9,0x00005886,
29010x0004007c,0x000000f4,0x000055c1,0x000055c0, 31020x000200f8,0x00005886,0x000d00f5,0x00000006,
29020x00050082,0x000000f4,0x000055c2,0x000055c1, 31030x00006189,0x00005850,0x0000584e,0x00005845,
29030x00000391,0x000500af,0x0000002f,0x000055c4, 31040x00005854,0x00005861,0x0000585d,0x00006188,
29040x000055c2,0x0000035a,0x000300f7,0x000055ca, 31050x0000586c,0x00005885,0x00005882,0x00050051,
29050x00000000,0x000400fa,0x000055c4,0x000055c5, 31060x00000027,0x00005812,0x000060ea,0x00000001,
29060x000055ca,0x000200f8,0x000055c5,0x000600a9, 31070x000300f7,0x000058da,0x00000000,0x000300fb,
29070x00000006,0x000055c8,0x000055b2,0x00000399, 31080x00000140,0x00005894,0x000200f8,0x00005894,
29080x0000039a,0x000500c5,0x00000006,0x000055c9, 31090x0004007c,0x00000006,0x00005896,0x00005812,
29090x000055ad,0x000055c8,0x000200f9,0x000055ee, 31100x000500c2,0x00000006,0x00005898,0x00005896,
29100x000200f8,0x000055ca,0x000500b1,0x0000002f, 31110x00000362,0x000500c7,0x00000006,0x00005899,
29110x000055cc,0x000055c2,0x0000039f,0x000300f7, 31120x00005898,0x000003d1,0x000500c7,0x00000006,
29120x000055d6,0x00000000,0x000400fa,0x000055cc, 31130x0000589b,0x00005896,0x0000025e,0x000500ab,
29130x000055cd,0x000055d6,0x000200f8,0x000055cd, 31140x0000002f,0x0000589e,0x00005899,0x00000140,
29140x000300f7,0x000055d4,0x00000000,0x000400fa, 31150x000500ac,0x0000002f,0x000058a1,0x0000589b,
29150x000055b2,0x000055cf,0x000055d2,0x000200f8, 31160x000003dc,0x000300f7,0x000058a5,0x00000000,
29160x000055d2,0x000200f9,0x000055d4,0x000200f8, 31170x000400fa,0x000058a1,0x000058a2,0x000058a5,
29170x000055cf,0x000500c5,0x00000006,0x000055d1, 31180x000200f8,0x000058a2,0x000500c5,0x00000006,
29180x000055ad,0x000003a8,0x000200f9,0x000055d4, 31190x000058a4,0x00005899,0x000003e1,0x000200f9,
29190x000200f8,0x000055d4,0x000700f5,0x00000006, 31200x000058da,0x000200f8,0x000058a5,0x000500aa,
29200x00005d6a,0x000055d1,0x000055cf,0x000055ad, 31210x0000002f,0x000058a7,0x0000589b,0x00000140,
29210x000055d2,0x000200f9,0x000055ee,0x000200f8, 31220x000300f7,0x000058aa,0x00000000,0x000400fa,
29220x000055d6,0x000500c7,0x00000006,0x000055d8, 31230x000058a7,0x000058a8,0x000058aa,0x000200f8,
29230x000055aa,0x000003b0,0x00050080,0x000000f4, 31240x000058a8,0x000200f9,0x000058da,0x000200f8,
29240x000055da,0x000055c1,0x000060ff,0x0004007c, 31250x000058aa,0x000500c2,0x00000006,0x000058ac,
29250x00000006,0x000055db,0x000055da,0x000500c4, 31260x0000589b,0x000003ec,0x0004007c,0x000000fb,
29260x00000006,0x000055dc,0x000055db,0x000003b6, 31270x000058ad,0x000058ac,0x00050082,0x000000fb,
29270x000500c2,0x00000006,0x000055de,0x000055d8, 31280x000058ae,0x000058ad,0x000003ef,0x000500af,
29280x000001f0,0x000500c5,0x00000006,0x000055df, 31290x0000002f,0x000058b0,0x000058ae,0x00000362,
29290x000055dc,0x000055de,0x000300f7,0x000055e5, 31300x000300f7,0x000058b6,0x00000000,0x000400fa,
29300x00000000,0x000400fa,0x000055b2,0x000055e1, 31310x000058b0,0x000058b1,0x000058b6,0x000200f8,
29310x000055e5,0x000200f8,0x000055e1,0x000500c7, 31320x000058b1,0x000600a9,0x00000006,0x000058b4,
29320x00000006,0x000055e3,0x000055aa,0x000003bf, 31330x0000589e,0x000003f7,0x000003f8,0x000500c5,
29330x000500ab,0x0000002f,0x000055e4,0x000055e3, 31340x00000006,0x000058b5,0x00005899,0x000058b4,
29340x00000138,0x000200f9,0x000055e5,0x000200f8, 31350x000200f9,0x000058da,0x000200f8,0x000058b6,
29350x000055e5,0x000700f5,0x0000002f,0x000055e6, 31360x000500b1,0x0000002f,0x000058b8,0x000058ae,
29360x000055b2,0x000055d6,0x000055e4,0x000055e1, 31370x000003fd,0x000300f7,0x000058c2,0x00000000,
29370x000300f7,0x000055ea,0x00000000,0x000400fa, 31380x000400fa,0x000058b8,0x000058b9,0x000058c2,
29380x000055e6,0x000055e7,0x000055ea,0x000200f8, 31390x000200f8,0x000058b9,0x000300f7,0x000058c0,
29390x000055e7,0x00050080,0x00000006,0x000055e9, 31400x00000000,0x000400fa,0x0000589e,0x000058bb,
29400x000055df,0x00000142,0x000200f9,0x000055ea, 31410x000058be,0x000200f8,0x000058be,0x000200f9,
29410x000200f8,0x000055ea,0x000700f5,0x00000006, 31420x000058c0,0x000200f8,0x000058bb,0x000500c5,
29420x00005d69,0x000055df,0x000055e5,0x000055e9, 31430x00000006,0x000058bd,0x00005899,0x00000406,
29430x000055e7,0x000500c5,0x00000006,0x000055ed, 31440x000200f9,0x000058c0,0x000200f8,0x000058c0,
29440x000055ad,0x00005d69,0x000200f9,0x000055ee, 31450x000700f5,0x00000006,0x0000618c,0x000058bd,
29450x000200f8,0x000055ee,0x000d00f5,0x00000006, 31460x000058bb,0x00005899,0x000058be,0x000200f9,
29460x00005d6b,0x000055b8,0x000055b6,0x000055ad, 31470x000058da,0x000200f8,0x000058c2,0x000500c7,
29470x000055bc,0x000055c9,0x000055c5,0x00005d6a, 31480x00000006,0x000058c4,0x00005896,0x0000040e,
29480x000055d4,0x000055ed,0x000055ea,0x00050051, 31490x00050080,0x000000fb,0x000058c6,0x000058ad,
29490x00000027,0x000054c0,0x00005cf4,0x00000000, 31500x00006533,0x0004007c,0x00000006,0x000058c7,
29500x000300f7,0x00005642,0x00000000,0x000300fb, 31510x000058c6,0x000500c4,0x00000006,0x000058c8,
29510x00000138,0x000055fc,0x000200f8,0x000055fc, 31520x000058c7,0x00000414,0x000500c2,0x00000006,
29520x0004007c,0x00000006,0x000055fe,0x000054c0, 31530x000058ca,0x000058c4,0x000001f8,0x000500c5,
29530x000500c2,0x00000006,0x00005600,0x000055fe, 31540x00000006,0x000058cb,0x000058c8,0x000058ca,
29540x0000035a,0x000500c7,0x00000006,0x00005601, 31550x000300f7,0x000058d1,0x00000000,0x000400fa,
29550x00005600,0x00000373,0x000500c7,0x00000006, 31560x0000589e,0x000058cd,0x000058d1,0x000200f8,
29560x00005603,0x000055fe,0x00000256,0x000500aa, 31570x000058cd,0x000500c7,0x00000006,0x000058cf,
29570x0000002f,0x00005607,0x00005601,0x00000138, 31580x00005896,0x0000041d,0x000500ab,0x0000002f,
29580x000500ac,0x0000002f,0x00005609,0x00005603, 31590x000058d0,0x000058cf,0x00000140,0x000200f9,
29590x0000037e,0x000300f7,0x0000560d,0x00000000, 31600x000058d1,0x000200f8,0x000058d1,0x000700f5,
29600x000400fa,0x00005609,0x0000560a,0x0000560d, 31610x0000002f,0x000058d2,0x0000589e,0x000058c2,
29610x000200f8,0x0000560a,0x000500c5,0x00000006, 31620x000058d0,0x000058cd,0x000300f7,0x000058d6,
29620x0000560c,0x00005601,0x00000383,0x000200f9, 31630x00000000,0x000400fa,0x000058d2,0x000058d3,
29630x00005642,0x000200f8,0x0000560d,0x000500aa, 31640x000058d6,0x000200f8,0x000058d3,0x00050080,
29640x0000002f,0x0000560f,0x00005603,0x00000138, 31650x00000006,0x000058d5,0x000058cb,0x0000014a,
29650x000300f7,0x00005612,0x00000000,0x000400fa, 31660x000200f9,0x000058d6,0x000200f8,0x000058d6,
29660x0000560f,0x00005610,0x00005612,0x000200f8, 31670x000700f5,0x00000006,0x0000618b,0x000058cb,
29670x00005610,0x000200f9,0x00005642,0x000200f8, 31680x000058d1,0x000058d5,0x000058d3,0x000500c5,
29680x00005612,0x000500c2,0x00000006,0x00005614, 31690x00000006,0x000058d9,0x00005899,0x0000618b,
29690x00005603,0x0000038e,0x0004007c,0x000000f4, 31700x000200f9,0x000058da,0x000200f8,0x000058da,
29700x00005615,0x00005614,0x00050082,0x000000f4, 31710x000d00f5,0x00000006,0x0000618d,0x000058a4,
29710x00005616,0x00005615,0x00000391,0x000500af, 31720x000058a2,0x00005899,0x000058a8,0x000058b5,
29720x0000002f,0x00005618,0x00005616,0x0000035a, 31730x000058b1,0x0000618c,0x000058c0,0x000058d9,
29730x000300f7,0x0000561e,0x00000000,0x000400fa, 31740x000058d6,0x000500c4,0x00000006,0x00005814,
29740x00005618,0x00005619,0x0000561e,0x000200f8, 31750x0000618d,0x00000362,0x000500c5,0x00000006,
29750x00005619,0x000600a9,0x00000006,0x0000561c, 31760x00005815,0x00006189,0x00005814,0x00050095,
29760x00005607,0x00000399,0x0000039a,0x000500c5, 31770x00000145,0x000058f3,0x00005795,0x000057c4,
29770x00000006,0x0000561d,0x00005601,0x0000561c, 31780x00050051,0x00000006,0x000058f4,0x000058f3,
29780x000200f9,0x00005642,0x000200f8,0x0000561e, 31790x00000001,0x00050051,0x00000006,0x000058f5,
29790x000500b1,0x0000002f,0x00005620,0x00005616, 31800x000058f3,0x00000000,0x00050080,0x00000006,
29800x0000039f,0x000300f7,0x0000562a,0x00000000, 31810x000058fa,0x0000579c,0x000058f4,0x00050050,
29810x000400fa,0x00005620,0x00005621,0x0000562a, 31820x00000007,0x000058fb,0x000058f5,0x000058fa,
29820x000200f8,0x00005621,0x000300f7,0x00005628, 31830x0004007c,0x00000014,0x000058eb,0x000058fb,
29830x00000000,0x000400fa,0x00005607,0x00005623, 31840x00060041,0x00000174,0x000058e3,0x000058eb,
29840x00005626,0x000200f8,0x00005626,0x000200f9, 31850x00000173,0x00000173,0x0005003e,0x000058e3,
29850x00005628,0x000200f8,0x00005623,0x000500c5, 31860x00005815,0x00000002,0x00000004,0x00050080,
29860x00000006,0x00005625,0x00005601,0x000003a8, 31870x00000006,0x0000581b,0x000057c4,0x000000f3,
29870x000200f9,0x00005628,0x000200f8,0x00005628, 31880x00050051,0x00000027,0x0000581d,0x000060ea,
29880x000700f5,0x00000006,0x00005d6e,0x00005625, 31890x00000002,0x000300f7,0x0000594e,0x00000000,
29890x00005623,0x00005601,0x00005626,0x000200f9, 31900x000300fb,0x00000140,0x00005908,0x000200f8,
29900x00005642,0x000200f8,0x0000562a,0x000500c7, 31910x00005908,0x0004007c,0x00000006,0x0000590a,
29910x00000006,0x0000562c,0x000055fe,0x000003b0, 31920x0000581d,0x000500c2,0x00000006,0x0000590c,
29920x00050080,0x000000f4,0x0000562e,0x00005615, 31930x0000590a,0x00000362,0x000500c7,0x00000006,
29930x000060ff,0x0004007c,0x00000006,0x0000562f, 31940x0000590d,0x0000590c,0x000003d1,0x000500c7,
29940x0000562e,0x000500c4,0x00000006,0x00005630, 31950x00000006,0x0000590f,0x0000590a,0x0000025e,
29950x0000562f,0x000003b6,0x000500c2,0x00000006, 31960x000500ab,0x0000002f,0x00005912,0x0000590d,
29960x00005632,0x0000562c,0x000001f0,0x000500c5, 31970x00000140,0x000500ac,0x0000002f,0x00005915,
29970x00000006,0x00005633,0x00005630,0x00005632, 31980x0000590f,0x000003dc,0x000300f7,0x00005919,
29980x000300f7,0x00005639,0x00000000,0x000400fa, 31990x00000000,0x000400fa,0x00005915,0x00005916,
29990x00005607,0x00005635,0x00005639,0x000200f8, 32000x00005919,0x000200f8,0x00005916,0x000500c5,
30000x00005635,0x000500c7,0x00000006,0x00005637, 32010x00000006,0x00005918,0x0000590d,0x000003e1,
30010x000055fe,0x000003bf,0x000500ab,0x0000002f, 32020x000200f9,0x0000594e,0x000200f8,0x00005919,
30020x00005638,0x00005637,0x00000138,0x000200f9, 32030x000500aa,0x0000002f,0x0000591b,0x0000590f,
30030x00005639,0x000200f8,0x00005639,0x000700f5, 32040x00000140,0x000300f7,0x0000591e,0x00000000,
30040x0000002f,0x0000563a,0x00005607,0x0000562a, 32050x000400fa,0x0000591b,0x0000591c,0x0000591e,
30050x00005638,0x00005635,0x000300f7,0x0000563e, 32060x000200f8,0x0000591c,0x000200f9,0x0000594e,
30060x00000000,0x000400fa,0x0000563a,0x0000563b, 32070x000200f8,0x0000591e,0x000500c2,0x00000006,
30070x0000563e,0x000200f8,0x0000563b,0x00050080, 32080x00005920,0x0000590f,0x000003ec,0x0004007c,
30080x00000006,0x0000563d,0x00005633,0x00000142, 32090x000000fb,0x00005921,0x00005920,0x00050082,
30090x000200f9,0x0000563e,0x000200f8,0x0000563e, 32100x000000fb,0x00005922,0x00005921,0x000003ef,
30100x000700f5,0x00000006,0x00005d6d,0x00005633, 32110x000500af,0x0000002f,0x00005924,0x00005922,
30110x00005639,0x0000563d,0x0000563b,0x000500c5, 32120x00000362,0x000300f7,0x0000592a,0x00000000,
30120x00000006,0x00005641,0x00005601,0x00005d6d, 32130x000400fa,0x00005924,0x00005925,0x0000592a,
30130x000200f9,0x00005642,0x000200f8,0x00005642, 32140x000200f8,0x00005925,0x000600a9,0x00000006,
30140x000d00f5,0x00000006,0x00005d6f,0x0000560c, 32150x00005928,0x00005912,0x000003f7,0x000003f8,
30150x0000560a,0x00005601,0x00005610,0x0000561d, 32160x000500c5,0x00000006,0x00005929,0x0000590d,
30160x00005619,0x00005d6e,0x00005628,0x00005641, 32170x00005928,0x000200f9,0x0000594e,0x000200f8,
30170x0000563e,0x000500c4,0x00000006,0x000054c2, 32180x0000592a,0x000500b1,0x0000002f,0x0000592c,
30180x00005d6f,0x0000035a,0x000500c5,0x00000006, 32190x00005922,0x000003fd,0x000300f7,0x00005936,
30190x000054c3,0x00005d6b,0x000054c2,0x00050095, 32200x00000000,0x000400fa,0x0000592c,0x0000592d,
30200x0000013d,0x0000565b,0x000053ea,0x000054bb, 32210x00005936,0x000200f8,0x0000592d,0x000300f7,
30210x00050051,0x00000006,0x0000565c,0x0000565b, 32220x00005934,0x00000000,0x000400fa,0x00005912,
30220x00000001,0x00050051,0x00000006,0x0000565d, 32230x0000592f,0x00005932,0x000200f8,0x00005932,
30230x0000565b,0x00000000,0x00050080,0x00000006, 32240x000200f9,0x00005934,0x000200f8,0x0000592f,
30240x00005662,0x000053f1,0x0000565c,0x00050050, 32250x000500c5,0x00000006,0x00005931,0x0000590d,
30250x00000007,0x00005663,0x0000565d,0x00005662, 32260x00000406,0x000200f9,0x00005934,0x000200f8,
30260x0004007c,0x00000014,0x00005653,0x00005663, 32270x00005934,0x000700f5,0x00000006,0x00006190,
30270x00060041,0x0000016c,0x0000564b,0x00005653, 32280x00005931,0x0000592f,0x0000590d,0x00005932,
30280x0000016b,0x0000016b,0x0005003e,0x0000564b, 32290x000200f9,0x0000594e,0x000200f8,0x00005936,
30290x000054c3,0x00000002,0x00000004,0x00050080, 32300x000500c7,0x00000006,0x00005938,0x0000590a,
30300x00000006,0x000054c8,0x00005464,0x000001cd, 32310x0000040e,0x00050080,0x000000fb,0x0000593a,
30310x00050051,0x00000027,0x000054ca,0x00005cf4, 32320x00005921,0x00006533,0x0004007c,0x00000006,
30320x00000001,0x000300f7,0x000056b6,0x00000000, 32330x0000593b,0x0000593a,0x000500c4,0x00000006,
30330x000300fb,0x00000138,0x00005670,0x000200f8, 32340x0000593c,0x0000593b,0x00000414,0x000500c2,
30340x00005670,0x0004007c,0x00000006,0x00005672, 32350x00000006,0x0000593e,0x00005938,0x000001f8,
30350x000054ca,0x000500c2,0x00000006,0x00005674, 32360x000500c5,0x00000006,0x0000593f,0x0000593c,
30360x00005672,0x0000035a,0x000500c7,0x00000006, 32370x0000593e,0x000300f7,0x00005945,0x00000000,
30370x00005675,0x00005674,0x00000373,0x000500c7, 32380x000400fa,0x00005912,0x00005941,0x00005945,
30380x00000006,0x00005677,0x00005672,0x00000256, 32390x000200f8,0x00005941,0x000500c7,0x00000006,
30390x000500aa,0x0000002f,0x0000567b,0x00005675, 32400x00005943,0x0000590a,0x0000041d,0x000500ab,
30400x00000138,0x000500ac,0x0000002f,0x0000567d, 32410x0000002f,0x00005944,0x00005943,0x00000140,
30410x00005677,0x0000037e,0x000300f7,0x00005681, 32420x000200f9,0x00005945,0x000200f8,0x00005945,
30420x00000000,0x000400fa,0x0000567d,0x0000567e, 32430x000700f5,0x0000002f,0x00005946,0x00005912,
30430x00005681,0x000200f8,0x0000567e,0x000500c5, 32440x00005936,0x00005944,0x00005941,0x000300f7,
30440x00000006,0x00005680,0x00005675,0x00000383, 32450x0000594a,0x00000000,0x000400fa,0x00005946,
30450x000200f9,0x000056b6,0x000200f8,0x00005681, 32460x00005947,0x0000594a,0x000200f8,0x00005947,
30460x000500aa,0x0000002f,0x00005683,0x00005677, 32470x00050080,0x00000006,0x00005949,0x0000593f,
30470x00000138,0x000300f7,0x00005686,0x00000000, 32480x0000014a,0x000200f9,0x0000594a,0x000200f8,
30480x000400fa,0x00005683,0x00005684,0x00005686, 32490x0000594a,0x000700f5,0x00000006,0x0000618f,
30490x000200f8,0x00005684,0x000200f9,0x000056b6, 32500x0000593f,0x00005945,0x00005949,0x00005947,
30500x000200f8,0x00005686,0x000500c2,0x00000006, 32510x000500c5,0x00000006,0x0000594d,0x0000590d,
30510x00005688,0x00005677,0x0000038e,0x0004007c, 32520x0000618f,0x000200f9,0x0000594e,0x000200f8,
30520x000000f4,0x00005689,0x00005688,0x00050082, 32530x0000594e,0x000d00f5,0x00000006,0x00006191,
30530x000000f4,0x0000568a,0x00005689,0x00000391, 32540x00005918,0x00005916,0x0000590d,0x0000591c,
30540x000500af,0x0000002f,0x0000568c,0x0000568a, 32550x00005929,0x00005925,0x00006190,0x00005934,
30550x0000035a,0x000300f7,0x00005692,0x00000000, 32560x0000594d,0x0000594a,0x00050051,0x00000027,
30560x000400fa,0x0000568c,0x0000568d,0x00005692, 32570x00005820,0x000060f3,0x00000000,0x000300f7,
30570x000200f8,0x0000568d,0x000600a9,0x00000006, 32580x000059a2,0x00000000,0x000300fb,0x00000140,
30580x00005690,0x0000567b,0x00000399,0x0000039a, 32590x0000595c,0x000200f8,0x0000595c,0x0004007c,
30590x000500c5,0x00000006,0x00005691,0x00005675, 32600x00000006,0x0000595e,0x00005820,0x000500c2,
30600x00005690,0x000200f9,0x000056b6,0x000200f8, 32610x00000006,0x00005960,0x0000595e,0x00000362,
30610x00005692,0x000500b1,0x0000002f,0x00005694, 32620x000500c7,0x00000006,0x00005961,0x00005960,
30620x0000568a,0x0000039f,0x000300f7,0x0000569e, 32630x000003d1,0x000500c7,0x00000006,0x00005963,
30630x00000000,0x000400fa,0x00005694,0x00005695, 32640x0000595e,0x0000025e,0x000500aa,0x0000002f,
30640x0000569e,0x000200f8,0x00005695,0x000300f7, 32650x00005967,0x00005961,0x00000140,0x000500ac,
30650x0000569c,0x00000000,0x000400fa,0x0000567b, 32660x0000002f,0x00005969,0x00005963,0x000003dc,
30660x00005697,0x0000569a,0x000200f8,0x0000569a, 32670x000300f7,0x0000596d,0x00000000,0x000400fa,
30670x000200f9,0x0000569c,0x000200f8,0x00005697, 32680x00005969,0x0000596a,0x0000596d,0x000200f8,
30680x000500c5,0x00000006,0x00005699,0x00005675, 32690x0000596a,0x000500c5,0x00000006,0x0000596c,
30690x000003a8,0x000200f9,0x0000569c,0x000200f8, 32700x00005961,0x000003e1,0x000200f9,0x000059a2,
30700x0000569c,0x000700f5,0x00000006,0x00005d72, 32710x000200f8,0x0000596d,0x000500aa,0x0000002f,
30710x00005699,0x00005697,0x00005675,0x0000569a, 32720x0000596f,0x00005963,0x00000140,0x000300f7,
30720x000200f9,0x000056b6,0x000200f8,0x0000569e, 32730x00005972,0x00000000,0x000400fa,0x0000596f,
30730x000500c7,0x00000006,0x000056a0,0x00005672, 32740x00005970,0x00005972,0x000200f8,0x00005970,
30740x000003b0,0x00050080,0x000000f4,0x000056a2, 32750x000200f9,0x000059a2,0x000200f8,0x00005972,
30750x00005689,0x000060ff,0x0004007c,0x00000006, 32760x000500c2,0x00000006,0x00005974,0x00005963,
30760x000056a3,0x000056a2,0x000500c4,0x00000006, 32770x000003ec,0x0004007c,0x000000fb,0x00005975,
30770x000056a4,0x000056a3,0x000003b6,0x000500c2, 32780x00005974,0x00050082,0x000000fb,0x00005976,
30780x00000006,0x000056a6,0x000056a0,0x000001f0, 32790x00005975,0x000003ef,0x000500af,0x0000002f,
30790x000500c5,0x00000006,0x000056a7,0x000056a4, 32800x00005978,0x00005976,0x00000362,0x000300f7,
30800x000056a6,0x000300f7,0x000056ad,0x00000000, 32810x0000597e,0x00000000,0x000400fa,0x00005978,
30810x000400fa,0x0000567b,0x000056a9,0x000056ad, 32820x00005979,0x0000597e,0x000200f8,0x00005979,
30820x000200f8,0x000056a9,0x000500c7,0x00000006, 32830x000600a9,0x00000006,0x0000597c,0x00005967,
30830x000056ab,0x00005672,0x000003bf,0x000500ab, 32840x000003f7,0x000003f8,0x000500c5,0x00000006,
30840x0000002f,0x000056ac,0x000056ab,0x00000138, 32850x0000597d,0x00005961,0x0000597c,0x000200f9,
30850x000200f9,0x000056ad,0x000200f8,0x000056ad, 32860x000059a2,0x000200f8,0x0000597e,0x000500b1,
30860x000700f5,0x0000002f,0x000056ae,0x0000567b, 32870x0000002f,0x00005980,0x00005976,0x000003fd,
30870x0000569e,0x000056ac,0x000056a9,0x000300f7, 32880x000300f7,0x0000598a,0x00000000,0x000400fa,
30880x000056b2,0x00000000,0x000400fa,0x000056ae, 32890x00005980,0x00005981,0x0000598a,0x000200f8,
30890x000056af,0x000056b2,0x000200f8,0x000056af, 32900x00005981,0x000300f7,0x00005988,0x00000000,
30900x00050080,0x00000006,0x000056b1,0x000056a7, 32910x000400fa,0x00005967,0x00005983,0x00005986,
30910x00000142,0x000200f9,0x000056b2,0x000200f8, 32920x000200f8,0x00005986,0x000200f9,0x00005988,
30920x000056b2,0x000700f5,0x00000006,0x00005d71, 32930x000200f8,0x00005983,0x000500c5,0x00000006,
30930x000056a7,0x000056ad,0x000056b1,0x000056af, 32940x00005985,0x00005961,0x00000406,0x000200f9,
30940x000500c5,0x00000006,0x000056b5,0x00005675, 32950x00005988,0x000200f8,0x00005988,0x000700f5,
30950x00005d71,0x000200f9,0x000056b6,0x000200f8, 32960x00000006,0x00006194,0x00005985,0x00005983,
30960x000056b6,0x000d00f5,0x00000006,0x00005d73, 32970x00005961,0x00005986,0x000200f9,0x000059a2,
30970x00005680,0x0000567e,0x00005675,0x00005684, 32980x000200f8,0x0000598a,0x000500c7,0x00000006,
30980x00005691,0x0000568d,0x00005d72,0x0000569c, 32990x0000598c,0x0000595e,0x0000040e,0x00050080,
30990x000056b5,0x000056b2,0x00050051,0x00000027, 33000x000000fb,0x0000598e,0x00005975,0x00006533,
31000x000054cd,0x00005cf4,0x00000002,0x000300f7, 33010x0004007c,0x00000006,0x0000598f,0x0000598e,
31010x0000570a,0x00000000,0x000300fb,0x00000138, 33020x000500c4,0x00000006,0x00005990,0x0000598f,
31020x000056c4,0x000200f8,0x000056c4,0x0004007c, 33030x00000414,0x000500c2,0x00000006,0x00005992,
31030x00000006,0x000056c6,0x000054cd,0x000500c2, 33040x0000598c,0x000001f8,0x000500c5,0x00000006,
31040x00000006,0x000056c8,0x000056c6,0x0000035a, 33050x00005993,0x00005990,0x00005992,0x000300f7,
31050x000500c7,0x00000006,0x000056c9,0x000056c8, 33060x00005999,0x00000000,0x000400fa,0x00005967,
31060x00000373,0x000500c7,0x00000006,0x000056cb, 33070x00005995,0x00005999,0x000200f8,0x00005995,
31070x000056c6,0x00000256,0x000500aa,0x0000002f, 33080x000500c7,0x00000006,0x00005997,0x0000595e,
31080x000056cf,0x000056c9,0x00000138,0x000500ac, 33090x0000041d,0x000500ab,0x0000002f,0x00005998,
31090x0000002f,0x000056d1,0x000056cb,0x0000037e, 33100x00005997,0x00000140,0x000200f9,0x00005999,
31100x000300f7,0x000056d5,0x00000000,0x000400fa, 33110x000200f8,0x00005999,0x000700f5,0x0000002f,
31110x000056d1,0x000056d2,0x000056d5,0x000200f8, 33120x0000599a,0x00005967,0x0000598a,0x00005998,
31120x000056d2,0x000500c5,0x00000006,0x000056d4, 33130x00005995,0x000300f7,0x0000599e,0x00000000,
31130x000056c9,0x00000383,0x000200f9,0x0000570a,
31140x000200f8,0x000056d5,0x000500aa,0x0000002f,
31150x000056d7,0x000056cb,0x00000138,0x000300f7,
31160x000056da,0x00000000,0x000400fa,0x000056d7,
31170x000056d8,0x000056da,0x000200f8,0x000056d8,
31180x000200f9,0x0000570a,0x000200f8,0x000056da,
31190x000500c2,0x00000006,0x000056dc,0x000056cb,
31200x0000038e,0x0004007c,0x000000f4,0x000056dd,
31210x000056dc,0x00050082,0x000000f4,0x000056de,
31220x000056dd,0x00000391,0x000500af,0x0000002f,
31230x000056e0,0x000056de,0x0000035a,0x000300f7,
31240x000056e6,0x00000000,0x000400fa,0x000056e0,
31250x000056e1,0x000056e6,0x000200f8,0x000056e1,
31260x000600a9,0x00000006,0x000056e4,0x000056cf,
31270x00000399,0x0000039a,0x000500c5,0x00000006,
31280x000056e5,0x000056c9,0x000056e4,0x000200f9,
31290x0000570a,0x000200f8,0x000056e6,0x000500b1,
31300x0000002f,0x000056e8,0x000056de,0x0000039f,
31310x000300f7,0x000056f2,0x00000000,0x000400fa,
31320x000056e8,0x000056e9,0x000056f2,0x000200f8,
31330x000056e9,0x000300f7,0x000056f0,0x00000000,
31340x000400fa,0x000056cf,0x000056eb,0x000056ee,
31350x000200f8,0x000056ee,0x000200f9,0x000056f0,
31360x000200f8,0x000056eb,0x000500c5,0x00000006,
31370x000056ed,0x000056c9,0x000003a8,0x000200f9,
31380x000056f0,0x000200f8,0x000056f0,0x000700f5,
31390x00000006,0x00005d76,0x000056ed,0x000056eb,
31400x000056c9,0x000056ee,0x000200f9,0x0000570a,
31410x000200f8,0x000056f2,0x000500c7,0x00000006,
31420x000056f4,0x000056c6,0x000003b0,0x00050080,
31430x000000f4,0x000056f6,0x000056dd,0x000060ff,
31440x0004007c,0x00000006,0x000056f7,0x000056f6,
31450x000500c4,0x00000006,0x000056f8,0x000056f7,
31460x000003b6,0x000500c2,0x00000006,0x000056fa,
31470x000056f4,0x000001f0,0x000500c5,0x00000006,
31480x000056fb,0x000056f8,0x000056fa,0x000300f7,
31490x00005701,0x00000000,0x000400fa,0x000056cf,
31500x000056fd,0x00005701,0x000200f8,0x000056fd,
31510x000500c7,0x00000006,0x000056ff,0x000056c6,
31520x000003bf,0x000500ab,0x0000002f,0x00005700,
31530x000056ff,0x00000138,0x000200f9,0x00005701,
31540x000200f8,0x00005701,0x000700f5,0x0000002f,
31550x00005702,0x000056cf,0x000056f2,0x00005700,
31560x000056fd,0x000300f7,0x00005706,0x00000000,
31570x000400fa,0x00005702,0x00005703,0x00005706,
31580x000200f8,0x00005703,0x00050080,0x00000006,
31590x00005705,0x000056fb,0x00000142,0x000200f9,
31600x00005706,0x000200f8,0x00005706,0x000700f5,
31610x00000006,0x00005d75,0x000056fb,0x00005701,
31620x00005705,0x00005703,0x000500c5,0x00000006,
31630x00005709,0x000056c9,0x00005d75,0x000200f9,
31640x0000570a,0x000200f8,0x0000570a,0x000d00f5,
31650x00000006,0x00005d77,0x000056d4,0x000056d2,
31660x000056c9,0x000056d8,0x000056e5,0x000056e1,
31670x00005d76,0x000056f0,0x00005709,0x00005706,
31680x000500c4,0x00000006,0x000054cf,0x00005d77,
31690x0000035a,0x000500c5,0x00000006,0x000054d0,
31700x00005d73,0x000054cf,0x00050095,0x0000013d,
31710x00005723,0x000053ea,0x000054c8,0x00050051,
31720x00000006,0x00005724,0x00005723,0x00000001,
31730x00050051,0x00000006,0x00005725,0x00005723,
31740x00000000,0x00050080,0x00000006,0x0000572a,
31750x000053f1,0x00005724,0x00050050,0x00000007,
31760x0000572b,0x00005725,0x0000572a,0x0004007c,
31770x00000014,0x0000571b,0x0000572b,0x00060041,
31780x0000016c,0x00005713,0x0000571b,0x0000016b,
31790x0000016b,0x0005003e,0x00005713,0x000054d0,
31800x00000002,0x00000004,0x000200f9,0x00005497,
31810x000200f8,0x00005468,0x00050080,0x00000006,
31820x0000546a,0x0000513c,0x000001db,0x00050084,
31830x00000006,0x0000546c,0x000001ef,0x00005cee,
31840x00050080,0x00000006,0x0000546d,0x0000546a,
31850x0000546c,0x00050051,0x00000027,0x00005472,
31860x00005cf1,0x00000000,0x0004007c,0x00000006,
31870x00005731,0x00005472,0x00050095,0x0000013d,
31880x0000574c,0x000053ea,0x0000546d,0x00050051,
31890x00000006,0x0000574d,0x0000574c,0x00000001,
31900x00050051,0x00000006,0x0000574e,0x0000574c,
31910x00000000,0x00050080,0x00000006,0x00005753,
31920x000053f1,0x0000574d,0x00050050,0x00000007,
31930x00005754,0x0000574e,0x00005753,0x0004007c,
31940x00000014,0x00005744,0x00005754,0x00060041,
31950x0000016c,0x0000573c,0x00005744,0x0000016b,
31960x0000016b,0x0005003e,0x0000573c,0x00005731,
31970x00000002,0x00000004,0x00050080,0x00000006,
31980x00005475,0x0000546d,0x000000ec,0x00050051,
31990x00000027,0x00005479,0x00005cf1,0x00000001,
32000x0004007c,0x00000006,0x0000575a,0x00005479,
32010x00050095,0x0000013d,0x00005775,0x000053ea,
32020x00005475,0x00050051,0x00000006,0x00005776,
32030x00005775,0x00000001,0x00050051,0x00000006,
32040x00005777,0x00005775,0x00000000,0x00050080,
32050x00000006,0x0000577c,0x000053f1,0x00005776,
32060x00050050,0x00000007,0x0000577d,0x00005777,
32070x0000577c,0x0004007c,0x00000014,0x0000576d,
32080x0000577d,0x00060041,0x0000016c,0x00005765,
32090x0000576d,0x0000016b,0x0000016b,0x0005003e,
32100x00005765,0x0000575a,0x00000002,0x00000004,
32110x00050080,0x00000006,0x0000547c,0x0000546d,
32120x000001cd,0x00050051,0x00000027,0x00005480,
32130x00005cf1,0x00000002,0x0004007c,0x00000006,
32140x00005783,0x00005480,0x00050095,0x0000013d,
32150x0000579e,0x000053ea,0x0000547c,0x00050051,
32160x00000006,0x0000579f,0x0000579e,0x00000001,
32170x00050051,0x00000006,0x000057a0,0x0000579e,
32180x00000000,0x00050080,0x00000006,0x000057a5,
32190x000053f1,0x0000579f,0x00050050,0x00000007,
32200x000057a6,0x000057a0,0x000057a5,0x0004007c,
32210x00000014,0x00005796,0x000057a6,0x00060041,
32220x0000016c,0x0000578e,0x00005796,0x0000016b,
32230x0000016b,0x0005003e,0x0000578e,0x00005783,
32240x00000002,0x00000004,0x00050080,0x00000006,
32250x00005483,0x0000546d,0x000001d4,0x00050051,
32260x00000027,0x00005487,0x00005cf4,0x00000000,
32270x0004007c,0x00000006,0x000057ac,0x00005487,
32280x00050095,0x0000013d,0x000057c7,0x000053ea,
32290x00005483,0x00050051,0x00000006,0x000057c8,
32300x000057c7,0x00000001,0x00050051,0x00000006,
32310x000057c9,0x000057c7,0x00000000,0x00050080,
32320x00000006,0x000057ce,0x000053f1,0x000057c8,
32330x00050050,0x00000007,0x000057cf,0x000057c9,
32340x000057ce,0x0004007c,0x00000014,0x000057bf,
32350x000057cf,0x00060041,0x0000016c,0x000057b7,
32360x000057bf,0x0000016b,0x0000016b,0x0005003e,
32370x000057b7,0x000057ac,0x00000002,0x00000004,
32380x00050080,0x00000006,0x0000548a,0x0000546d,
32390x000001db,0x00050051,0x00000027,0x0000548e,
32400x00005cf4,0x00000001,0x0004007c,0x00000006,
32410x000057d5,0x0000548e,0x00050095,0x0000013d,
32420x000057f0,0x000053ea,0x0000548a,0x00050051,
32430x00000006,0x000057f1,0x000057f0,0x00000001,
32440x00050051,0x00000006,0x000057f2,0x000057f0,
32450x00000000,0x00050080,0x00000006,0x000057f7,
32460x000053f1,0x000057f1,0x00050050,0x00000007,
32470x000057f8,0x000057f2,0x000057f7,0x0004007c,
32480x00000014,0x000057e8,0x000057f8,0x00060041,
32490x0000016c,0x000057e0,0x000057e8,0x0000016b,
32500x0000016b,0x0005003e,0x000057e0,0x000057d5,
32510x00000002,0x00000004,0x00050080,0x00000006,
32520x00005491,0x0000546d,0x00000299,0x00050051,
32530x00000027,0x00005495,0x00005cf4,0x00000002,
32540x0004007c,0x00000006,0x000057fe,0x00005495,
32550x00050095,0x0000013d,0x00005819,0x000053ea,
32560x00005491,0x00050051,0x00000006,0x0000581a,
32570x00005819,0x00000001,0x00050051,0x00000006,
32580x0000581b,0x00005819,0x00000000,0x00050080,
32590x00000006,0x00005820,0x000053f1,0x0000581a,
32600x00050050,0x00000007,0x00005821,0x0000581b,
32610x00005820,0x0004007c,0x00000014,0x00005811,
32620x00005821,0x00060041,0x0000016c,0x00005809,
32630x00005811,0x0000016b,0x0000016b,0x0005003e,
32640x00005809,0x000057fe,0x00000002,0x00000004,
32650x000200f9,0x00005497,0x000200f8,0x00005497,
32660x000200f9,0x0000515a,0x000200f8,0x0000515a,
32670x000200f9,0x0000515b,0x000200f8,0x0000515b,
32680x000700f5,0x00000006,0x00006026,0x00005d0a,
32690x0000514b,0x0000514e,0x0000515a,0x00050080,
32700x00000006,0x0000515d,0x00005cee,0x00000264,
32710x000200f9,0x0000513d,0x000200f8,0x0000515e,
32720x00050041,0x000001bb,0x00005829,0x000001b9,
32730x0000035a,0x0004003d,0x00000006,0x0000582a,
32740x00005829,0x00050082,0x00000006,0x0000582b,
32750x0000513c,0x0000582a,0x000500c7,0x00000006,
32760x00005837,0x00005ceb,0x00000d2b,0x000500aa,
32770x0000002f,0x00005838,0x00005837,0x000000ec,
32780x000600a9,0x00000006,0x0000582e,0x00005838,
32790x000001c4,0x00000342,0x00050086,0x00000006,
32800x0000582f,0x0000582b,0x0000582e,0x00050041,
32810x000001bb,0x00005847,0x000001b9,0x000001f0,
32820x0004003d,0x00000006,0x00005848,0x00005847,
32830x00050084,0x00000006,0x00005849,0x000001ef,
32840x00005848,0x00050080,0x00000006,0x0000584a,
32850x000052dd,0x00005849,0x00050084,0x00000006,
32860x0000583f,0x00000205,0x0000582f,0x00050080,
32870x00000006,0x00005840,0x0000584a,0x0000583f,
32880x00050095,0x0000013d,0x0000587a,0x0000530e,
32890x00005840,0x00050051,0x00000006,0x0000587b,
32900x0000587a,0x00000001,0x00050051,0x00000006,
32910x0000587c,0x0000587a,0x00000000,0x00050080,
32920x00000006,0x00005881,0x00005315,0x0000587b,
32930x00050050,0x00000007,0x00005882,0x0000587c,
32940x00005881,0x0004007c,0x00000014,0x00005872,
32950x00005882,0x00050051,0x00000027,0x00005886,
32960x00005cf1,0x00000000,0x00050051,0x00000027,
32970x00005888,0x00005cf4,0x00000000,0x000500bc,
32980x0000002f,0x00005889,0x00005886,0x00005888,
32990x000300f7,0x00005890,0x00000000,0x000400fa,
33000x00005889,0x0000588a,0x00005890,0x000200f8,
33010x0000588a,0x00050051,0x00000027,0x0000588c,
33020x00005cf1,0x00000001,0x00050051,0x00000027,
33030x0000588e,0x00005cf4,0x00000001,0x000500bc,
33040x0000002f,0x0000588f,0x0000588c,0x0000588e,
33050x000200f9,0x00005890,0x000200f8,0x00005890,
33060x000700f5,0x0000002f,0x00005891,0x00005889,
33070x0000515e,0x0000588f,0x0000588a,0x000300f7,
33080x00005898,0x00000000,0x000400fa,0x00005891,
33090x00005892,0x00005898,0x000200f8,0x00005892,
33100x00050051,0x00000027,0x00005894,0x00005cf1,
33110x00000002,0x00050051,0x00000027,0x00005896,
33120x00005cf4,0x00000002,0x000500bc,0x0000002f,
33130x00005897,0x00005894,0x00005896,0x000200f9,
33140x00005898,0x000200f8,0x00005898,0x000700f5,
33150x0000002f,0x00005899,0x00005891,0x00005890,
33160x00005897,0x00005892,0x000300f7,0x0000518c,
33170x00000000,0x000400fa,0x00005899,0x00005167,
33180x0000518c,0x000200f8,0x00005167,0x00060041,
33190x0000016c,0x00005169,0x00005872,0x0000016b,
33200x00000264,0x0004007c,0x00000006,0x000058a0,
33210x00005886,0x000500c7,0x00000006,0x000058a2,
33220x000058a0,0x00000241,0x000500ab,0x0000002f,
33230x000058a3,0x000058a2,0x00000138,0x000300f7,
33240x000058aa,0x00000000,0x000400fa,0x000058a3,
33250x000058a4,0x000058a7,0x000200f8,0x000058a7,
33260x000500c5,0x00000006,0x000058a9,0x000058a0,
33270x00000241,0x000200f9,0x000058aa,0x000200f8,
33280x000058a4,0x000400c8,0x00000006,0x000058a6,
33290x000058a0,0x000200f9,0x000058aa,0x000200f8,
33300x000058aa,0x000700f5,0x00000006,0x00005cf8,
33310x000058a6,0x000058a4,0x000058a9,0x000058a7,
33320x000700ed,0x00000006,0x0000516d,0x00005169,
33330x00000142,0x00000138,0x00005cf8,0x00060041,
33340x0000016c,0x0000516f,0x00005872,0x0000016b,
33350x00000315,0x00050051,0x00000027,0x00005171,
33360x00005cf1,0x00000001,0x0004007c,0x00000006,
33370x000058b1,0x00005171,0x000500c7,0x00000006,
33380x000058b3,0x000058b1,0x00000241,0x000500ab,
33390x0000002f,0x000058b4,0x000058b3,0x00000138,
33400x000300f7,0x000058bb,0x00000000,0x000400fa,
33410x000058b4,0x000058b5,0x000058b8,0x000200f8,
33420x000058b8,0x000500c5,0x00000006,0x000058ba,
33430x000058b1,0x00000241,0x000200f9,0x000058bb,
33440x000200f8,0x000058b5,0x000400c8,0x00000006,
33450x000058b7,0x000058b1,0x000200f9,0x000058bb,
33460x000200f8,0x000058bb,0x000700f5,0x00000006,
33470x00005cfa,0x000058b7,0x000058b5,0x000058ba,
33480x000058b8,0x000700ed,0x00000006,0x00005173,
33490x0000516f,0x00000142,0x00000138,0x00005cfa,
33500x00060041,0x0000016c,0x00005175,0x00005872,
33510x0000016b,0x0000031d,0x00050051,0x00000027,
33520x00005177,0x00005cf1,0x00000002,0x0004007c,
33530x00000006,0x000058c2,0x00005177,0x000500c7,
33540x00000006,0x000058c4,0x000058c2,0x00000241,
33550x000500ab,0x0000002f,0x000058c5,0x000058c4,
33560x00000138,0x000300f7,0x000058cc,0x00000000,
33570x000400fa,0x000058c5,0x000058c6,0x000058c9,
33580x000200f8,0x000058c9,0x000500c5,0x00000006,
33590x000058cb,0x000058c2,0x00000241,0x000200f9,
33600x000058cc,0x000200f8,0x000058c6,0x000400c8,
33610x00000006,0x000058c8,0x000058c2,0x000200f9,
33620x000058cc,0x000200f8,0x000058cc,0x000700f5,
33630x00000006,0x00005cfc,0x000058c8,0x000058c6,
33640x000058cb,0x000058c9,0x000700ed,0x00000006,
33650x00005179,0x00005175,0x00000142,0x00000138,
33660x00005cfc,0x00060041,0x0000016c,0x0000517b,
33670x00005872,0x0000016b,0x00000325,0x0004007c,
33680x00000006,0x000058d3,0x00005888,0x000500c7,
33690x00000006,0x000058d5,0x000058d3,0x00000241,
33700x000500ab,0x0000002f,0x000058d6,0x000058d5,
33710x00000138,0x000300f7,0x000058dd,0x00000000,
33720x000400fa,0x000058d6,0x000058d7,0x000058da,
33730x000200f8,0x000058da,0x000500c5,0x00000006,
33740x000058dc,0x000058d3,0x00000241,0x000200f9,
33750x000058dd,0x000200f8,0x000058d7,0x000400c8,
33760x00000006,0x000058d9,0x000058d3,0x000200f9,
33770x000058dd,0x000200f8,0x000058dd,0x000700f5,
33780x00000006,0x00005d02,0x000058d9,0x000058d7,
33790x000058dc,0x000058da,0x000700ef,0x00000006,
33800x0000517f,0x0000517b,0x00000142,0x00000138,
33810x00005d02,0x00060041,0x0000016c,0x00005181,
33820x00005872,0x0000016b,0x0000032d,0x00050051,
33830x00000027,0x00005183,0x00005cf4,0x00000001,
33840x0004007c,0x00000006,0x000058e4,0x00005183,
33850x000500c7,0x00000006,0x000058e6,0x000058e4,
33860x00000241,0x000500ab,0x0000002f,0x000058e7,
33870x000058e6,0x00000138,0x000300f7,0x000058ee,
33880x00000000,0x000400fa,0x000058e7,0x000058e8,
33890x000058eb,0x000200f8,0x000058eb,0x000500c5,
33900x00000006,0x000058ed,0x000058e4,0x00000241,
33910x000200f9,0x000058ee,0x000200f8,0x000058e8,
33920x000400c8,0x00000006,0x000058ea,0x000058e4,
33930x000200f9,0x000058ee,0x000200f8,0x000058ee,
33940x000700f5,0x00000006,0x00005d04,0x000058ea,
33950x000058e8,0x000058ed,0x000058eb,0x000700ef,
33960x00000006,0x00005185,0x00005181,0x00000142,
33970x00000138,0x00005d04,0x00060041,0x0000016c,
33980x00005187,0x00005872,0x0000016b,0x00000351,
33990x00050051,0x00000027,0x00005189,0x00005cf4,
34000x00000002,0x0004007c,0x00000006,0x000058f5,
34010x00005189,0x000500c7,0x00000006,0x000058f7,
34020x000058f5,0x00000241,0x000500ab,0x0000002f,
34030x000058f8,0x000058f7,0x00000138,0x000300f7,
34040x000058ff,0x00000000,0x000400fa,0x000058f8,
34050x000058f9,0x000058fc,0x000200f8,0x000058fc,
34060x000500c5,0x00000006,0x000058fe,0x000058f5,
34070x00000241,0x000200f9,0x000058ff,0x000200f8,
34080x000058f9,0x000400c8,0x00000006,0x000058fb,
34090x000058f5,0x000200f9,0x000058ff,0x000200f8,
34100x000058ff,0x000700f5,0x00000006,0x00005d06,
34110x000058fb,0x000058f9,0x000058fe,0x000058fc,
34120x000700ef,0x00000006,0x0000518b,0x00005187,
34130x00000142,0x00000138,0x00005d06,0x000200f9,
34140x0000518c,0x000200f8,0x0000518c,0x00060041,
34150x0000016c,0x0000518e,0x00005872,0x0000016b,
34160x0000016b,0x000700ea,0x00000006,0x0000518f,
34170x0000518e,0x00000264,0x00000820,0x00000142,
34180x00050080,0x00000006,0x00005191,0x0000518f,
34190x00000142,0x000500ab,0x0000002f,0x00005193,
34200x00005191,0x00005d0a,0x000300f7,0x00005195,
34210x00000000,0x000400fa,0x00005193,0x00005194,
34220x00005195,0x000200f8,0x00005194,0x000200f9,
34230x000051a0,0x000200f8,0x00005195,0x000300f7,
34240x0000593b,0x00000000,0x000300fb,0x00000138,
34250x0000590d,0x000200f8,0x0000590d,0x000200f9,
34260x00005910,0x000200f8,0x00005910,0x000700f5,
34270x00000006,0x00005d11,0x00000138,0x0000590d,
34280x0000591e,0x00005914,0x000500b0,0x0000002f,
34290x00005913,0x00005d11,0x00000355,0x000400f6,
34300x0000591f,0x00005914,0x00000000,0x000400fa,
34310x00005913,0x00005914,0x0000591f,0x000200f8,
34320x00005914,0x00050080,0x00000006,0x00005918,
34330x00000142,0x00005d11,0x00060041,0x0000016c,
34340x00005919,0x00005872,0x0000016b,0x00005918,
34350x000700f1,0x00000006,0x0000591a,0x00005919,
34360x00000142,0x00000138,0x00000138,0x00050041,
34370x00000009,0x0000591b,0x00005905,0x00005d11,
34380x0003003e,0x0000591b,0x0000591a,0x00050080,
34390x00000006,0x0000591e,0x00005d11,0x00000264,
34400x000200f9,0x00005910,0x000200f8,0x0000591f,
34410x00050041,0x00000009,0x00005920,0x00005905,
34420x0000016b,0x0004003d,0x00000006,0x00005921,
34430x00005920,0x000500aa,0x0000002f,0x00005922,
34440x00005921,0x00000539,0x000300f7,0x00005926,
34450x00000000,0x000400fa,0x00005922,0x00005923,
34460x00005926,0x000200f8,0x00005923,0x000200f9,
34470x0000593b,0x000200f8,0x00005926,0x0004003d,
34480x00000006,0x00005928,0x00005920,0x000500c7,
34490x00000006,0x0000598a,0x00005928,0x00000241,
34500x000500ab,0x0000002f,0x0000598b,0x0000598a,
34510x00000138,0x000300f7,0x00005992,0x00000000,
34520x000400fa,0x0000598b,0x0000598c,0x0000598f,
34530x000200f8,0x0000598f,0x000400c8,0x00000006,
34540x00005991,0x00005928,0x000200f9,0x00005992,
34550x000200f8,0x0000598c,0x000500c7,0x00000006,
34560x0000598e,0x00005928,0x00000256,0x000200f9,
34570x00005992,0x000200f8,0x00005992,0x000700f5,
34580x00000006,0x00005d12,0x0000598e,0x0000598c,
34590x00005991,0x0000598f,0x0004007c,0x00000027,
34600x00005994,0x00005d12,0x00050041,0x00000009,
34610x0000592a,0x00005905,0x00000264,0x0004003d,
34620x00000006,0x0000592b,0x0000592a,0x000500c7,
34630x00000006,0x00005999,0x0000592b,0x00000241,
34640x000500ab,0x0000002f,0x0000599a,0x00005999,
34650x00000138,0x000300f7,0x000059a1,0x00000000,
34660x000400fa,0x0000599a,0x0000599b,0x0000599e, 33140x000400fa,0x0000599a,0x0000599b,0x0000599e,
34670x000200f8,0x0000599e,0x000400c8,0x00000006, 33150x000200f8,0x0000599b,0x00050080,0x00000006,
34680x000059a0,0x0000592b,0x000200f9,0x000059a1, 33160x0000599d,0x00005993,0x0000014a,0x000200f9,
34690x000200f8,0x0000599b,0x000500c7,0x00000006, 33170x0000599e,0x000200f8,0x0000599e,0x000700f5,
34700x0000599d,0x0000592b,0x00000256,0x000200f9, 33180x00000006,0x00006193,0x00005993,0x00005999,
34710x000059a1,0x000200f8,0x000059a1,0x000700f5, 33190x0000599d,0x0000599b,0x000500c5,0x00000006,
34720x00000006,0x00005d13,0x0000599d,0x0000599b, 33200x000059a1,0x00005961,0x00006193,0x000200f9,
34730x000059a0,0x0000599e,0x0004007c,0x00000027, 33210x000059a2,0x000200f8,0x000059a2,0x000d00f5,
34740x000059a3,0x00005d13,0x00050041,0x00000009, 33220x00000006,0x00006195,0x0000596c,0x0000596a,
34750x0000592d,0x00005905,0x00000315,0x0004003d, 33230x00005961,0x00005970,0x0000597d,0x00005979,
34760x00000006,0x0000592e,0x0000592d,0x000500c7, 33240x00006194,0x00005988,0x000059a1,0x0000599e,
34770x00000006,0x000059a8,0x0000592e,0x00000241, 33250x000500c4,0x00000006,0x00005822,0x00006195,
34780x000500ab,0x0000002f,0x000059a9,0x000059a8, 33260x00000362,0x000500c5,0x00000006,0x00005823,
34790x00000138,0x000300f7,0x000059b0,0x00000000, 33270x00006191,0x00005822,0x00050095,0x00000145,
34800x000400fa,0x000059a9,0x000059aa,0x000059ad, 33280x000059bb,0x00005795,0x0000581b,0x00050051,
34810x000200f8,0x000059ad,0x000400c8,0x00000006, 33290x00000006,0x000059bc,0x000059bb,0x00000001,
34820x000059af,0x0000592e,0x000200f9,0x000059b0, 33300x00050051,0x00000006,0x000059bd,0x000059bb,
34830x000200f8,0x000059aa,0x000500c7,0x00000006, 33310x00000000,0x00050080,0x00000006,0x000059c2,
34840x000059ac,0x0000592e,0x00000256,0x000200f9, 33320x0000579c,0x000059bc,0x00050050,0x00000007,
34850x000059b0,0x000200f8,0x000059b0,0x000700f5, 33330x000059c3,0x000059bd,0x000059c2,0x0004007c,
34860x00000006,0x00005d14,0x000059ac,0x000059aa, 33340x00000014,0x000059b3,0x000059c3,0x00060041,
34870x000059af,0x000059ad,0x0004007c,0x00000027, 33350x00000174,0x000059ab,0x000059b3,0x00000173,
34880x000059b2,0x00005d14,0x00060050,0x0000006c, 33360x00000173,0x0005003e,0x000059ab,0x00005823,
34890x00005930,0x00005994,0x000059a3,0x000059b2, 33370x00000002,0x00000004,0x00050080,0x00000006,
34900x00050041,0x00000009,0x00005931,0x00005905, 33380x00005828,0x000057c4,0x000001d5,0x00050051,
34910x0000031d,0x0004003d,0x00000006,0x00005932, 33390x00000027,0x0000582a,0x000060f3,0x00000001,
34920x00005931,0x000500c7,0x00000006,0x000059b7, 33400x000300f7,0x00005a16,0x00000000,0x000300fb,
34930x00005932,0x00000241,0x000500ab,0x0000002f, 33410x00000140,0x000059d0,0x000200f8,0x000059d0,
34940x000059b8,0x000059b7,0x00000138,0x000300f7, 33420x0004007c,0x00000006,0x000059d2,0x0000582a,
34950x000059bf,0x00000000,0x000400fa,0x000059b8, 33430x000500c2,0x00000006,0x000059d4,0x000059d2,
34960x000059b9,0x000059bc,0x000200f8,0x000059bc, 33440x00000362,0x000500c7,0x00000006,0x000059d5,
34970x000400c8,0x00000006,0x000059be,0x00005932, 33450x000059d4,0x000003d1,0x000500c7,0x00000006,
34980x000200f9,0x000059bf,0x000200f8,0x000059b9, 33460x000059d7,0x000059d2,0x0000025e,0x000500aa,
34990x000500c7,0x00000006,0x000059bb,0x00005932, 33470x0000002f,0x000059db,0x000059d5,0x00000140,
35000x00000256,0x000200f9,0x000059bf,0x000200f8, 33480x000500ac,0x0000002f,0x000059dd,0x000059d7,
35010x000059bf,0x000700f5,0x00000006,0x00005d15, 33490x000003dc,0x000300f7,0x000059e1,0x00000000,
35020x000059bb,0x000059b9,0x000059be,0x000059bc, 33500x000400fa,0x000059dd,0x000059de,0x000059e1,
35030x0004007c,0x00000027,0x000059c1,0x00005d15, 33510x000200f8,0x000059de,0x000500c5,0x00000006,
35040x00050041,0x00000009,0x00005934,0x00005905, 33520x000059e0,0x000059d5,0x000003e1,0x000200f9,
35050x00000325,0x0004003d,0x00000006,0x00005935, 33530x00005a16,0x000200f8,0x000059e1,0x000500aa,
35060x00005934,0x000500c7,0x00000006,0x000059c6, 33540x0000002f,0x000059e3,0x000059d7,0x00000140,
35070x00005935,0x00000241,0x000500ab,0x0000002f, 33550x000300f7,0x000059e6,0x00000000,0x000400fa,
35080x000059c7,0x000059c6,0x00000138,0x000300f7, 33560x000059e3,0x000059e4,0x000059e6,0x000200f8,
35090x000059ce,0x00000000,0x000400fa,0x000059c7, 33570x000059e4,0x000200f9,0x00005a16,0x000200f8,
35100x000059c8,0x000059cb,0x000200f8,0x000059cb, 33580x000059e6,0x000500c2,0x00000006,0x000059e8,
35110x000400c8,0x00000006,0x000059cd,0x00005935, 33590x000059d7,0x000003ec,0x0004007c,0x000000fb,
35120x000200f9,0x000059ce,0x000200f8,0x000059c8, 33600x000059e9,0x000059e8,0x00050082,0x000000fb,
35130x000500c7,0x00000006,0x000059ca,0x00005935, 33610x000059ea,0x000059e9,0x000003ef,0x000500af,
35140x00000256,0x000200f9,0x000059ce,0x000200f8, 33620x0000002f,0x000059ec,0x000059ea,0x00000362,
35150x000059ce,0x000700f5,0x00000006,0x00005d16, 33630x000300f7,0x000059f2,0x00000000,0x000400fa,
35160x000059ca,0x000059c8,0x000059cd,0x000059cb, 33640x000059ec,0x000059ed,0x000059f2,0x000200f8,
35170x0004007c,0x00000027,0x000059d0,0x00005d16, 33650x000059ed,0x000600a9,0x00000006,0x000059f0,
35180x00050041,0x00000009,0x00005937,0x00005905, 33660x000059db,0x000003f7,0x000003f8,0x000500c5,
35190x0000032d,0x0004003d,0x00000006,0x00005938, 33670x00000006,0x000059f1,0x000059d5,0x000059f0,
35200x00005937,0x000500c7,0x00000006,0x000059d5, 33680x000200f9,0x00005a16,0x000200f8,0x000059f2,
35210x00005938,0x00000241,0x000500ab,0x0000002f, 33690x000500b1,0x0000002f,0x000059f4,0x000059ea,
35220x000059d6,0x000059d5,0x00000138,0x000300f7, 33700x000003fd,0x000300f7,0x000059fe,0x00000000,
35230x000059dd,0x00000000,0x000400fa,0x000059d6, 33710x000400fa,0x000059f4,0x000059f5,0x000059fe,
35240x000059d7,0x000059da,0x000200f8,0x000059da, 33720x000200f8,0x000059f5,0x000300f7,0x000059fc,
35250x000400c8,0x00000006,0x000059dc,0x00005938, 33730x00000000,0x000400fa,0x000059db,0x000059f7,
35260x000200f9,0x000059dd,0x000200f8,0x000059d7, 33740x000059fa,0x000200f8,0x000059fa,0x000200f9,
35270x000500c7,0x00000006,0x000059d9,0x00005938, 33750x000059fc,0x000200f8,0x000059f7,0x000500c5,
35280x00000256,0x000200f9,0x000059dd,0x000200f8, 33760x00000006,0x000059f9,0x000059d5,0x00000406,
35290x000059dd,0x000700f5,0x00000006,0x00005d17, 33770x000200f9,0x000059fc,0x000200f8,0x000059fc,
35300x000059d9,0x000059d7,0x000059dc,0x000059da, 33780x000700f5,0x00000006,0x00006198,0x000059f9,
35310x0004007c,0x00000027,0x000059df,0x00005d17, 33790x000059f7,0x000059d5,0x000059fa,0x000200f9,
35320x00060050,0x0000006c,0x0000593a,0x000059c1, 33800x00005a16,0x000200f8,0x000059fe,0x000500c7,
35330x000059d0,0x000059df,0x000200f9,0x0000593b, 33810x00000006,0x00005a00,0x000059d2,0x0000040e,
35340x000200f8,0x0000593b,0x000700f5,0x0000006c, 33820x00050080,0x000000fb,0x00005a02,0x000059e9,
35350x00005d1c,0x000060fe,0x00005923,0x0000593a, 33830x00006533,0x0004007c,0x00000006,0x00005a03,
35360x000059dd,0x000700f5,0x0000006c,0x00005d18, 33840x00005a02,0x000500c4,0x00000006,0x00005a04,
35370x00000576,0x00005923,0x00005930,0x000059dd, 33850x00005a03,0x00000414,0x000500c2,0x00000006,
35380x00050082,0x00000006,0x000059ec,0x0000541e, 33860x00005a06,0x00005a00,0x000001f8,0x000500c5,
35390x000053c9,0x00050084,0x00000006,0x000059ed, 33870x00000006,0x00005a07,0x00005a04,0x00005a06,
35400x000000ec,0x000059ec,0x00050080,0x00000006, 33880x000300f7,0x00005a0d,0x00000000,0x000400fa,
35410x000059ee,0x000053c4,0x000059ed,0x00050095, 33890x000059db,0x00005a09,0x00005a0d,0x000200f8,
35420x0000013d,0x00005a0e,0x000053ea,0x000059ee, 33900x00005a09,0x000500c7,0x00000006,0x00005a0b,
35430x00050051,0x00000006,0x00005a0f,0x00005a0e, 33910x000059d2,0x0000041d,0x000500ab,0x0000002f,
35440x00000001,0x00050051,0x00000006,0x00005a10, 33920x00005a0c,0x00005a0b,0x00000140,0x000200f9,
35450x00005a0e,0x00000000,0x00050080,0x00000006, 33930x00005a0d,0x000200f8,0x00005a0d,0x000700f5,
35460x00005a15,0x000053f1,0x00005a0f,0x00050050, 33940x0000002f,0x00005a0e,0x000059db,0x000059fe,
35470x00000007,0x00005a16,0x00005a10,0x00005a15, 33950x00005a0c,0x00005a09,0x000300f7,0x00005a12,
35480x0004007c,0x00000014,0x00005a06,0x00005a16, 33960x00000000,0x000400fa,0x00005a0e,0x00005a0f,
35490x00060041,0x0000016c,0x000059fd,0x00005a06, 33970x00005a12,0x000200f8,0x00005a0f,0x00050080,
35500x0000016b,0x0000016b,0x0006003d,0x00000006, 33980x00000006,0x00005a11,0x00005a07,0x0000014a,
35510x000059fe,0x000059fd,0x00000002,0x00000004, 33990x000200f9,0x00005a12,0x000200f8,0x00005a12,
35520x000200f9,0x0000519d,0x000200f8,0x0000519d, 34000x000700f5,0x00000006,0x00006197,0x00005a07,
35530x00050080,0x00000006,0x0000519f,0x00005ced, 34010x00005a0d,0x00005a11,0x00005a0f,0x000500c5,
35540x00000264,0x000200f9,0x00005132,0x000200f8, 34020x00000006,0x00005a15,0x000059d5,0x00006197,
35550x000051a0,0x000700f5,0x0000002f,0x00005d40, 34030x000200f9,0x00005a16,0x000200f8,0x00005a16,
35560x000003cc,0x00005132,0x000003e7,0x00005194, 34040x000d00f5,0x00000006,0x00006199,0x000059e0,
35570x000300f7,0x000051a2,0x00000000,0x000400fa, 34050x000059de,0x000059d5,0x000059e4,0x000059f1,
35580x00005d40,0x000051a3,0x000051a2,0x000200f8, 34060x000059ed,0x00006198,0x000059fc,0x00005a15,
35590x000051a2,0x000200f9,0x000051a3,0x000200f8, 34070x00005a12,0x00050051,0x00000027,0x0000582d,
35600x000051a3,0x000200f9,0x000013ed,0x000200f8, 34080x000060f3,0x00000002,0x000300f7,0x00005a6a,
35610x000013ed,0x000200f9,0x000013e3,0x000200f8, 34090x00000000,0x000300fb,0x00000140,0x00005a24,
35620x000013e2,0x000300f7,0x00004119,0x00000000, 34100x000200f8,0x00005a24,0x0004007c,0x00000006,
35630x000300fb,0x00000138,0x0000402b,0x000200f8, 34110x00005a26,0x0000582d,0x000500c2,0x00000006,
35640x0000402b,0x0003003e,0x00003ff3,0x00000fd5, 34120x00005a28,0x00005a26,0x00000362,0x000500c7,
35650x0003003e,0x00003ff4,0x00000fd5,0x00050041, 34130x00000006,0x00005a29,0x00005a28,0x000003d1,
35660x000001bb,0x0000402c,0x000001b9,0x000001f0, 34140x000500c7,0x00000006,0x00005a2b,0x00005a26,
35670x0004003d,0x00000006,0x0000402d,0x0000402c, 34150x0000025e,0x000500aa,0x0000002f,0x00005a2f,
35680x000500b2,0x0000002f,0x0000402e,0x0000402d, 34160x00005a29,0x00000140,0x000500ac,0x0000002f,
35690x00000142,0x000300f7,0x000040ae,0x00000000, 34170x00005a31,0x00005a2b,0x000003dc,0x000300f7,
35700x000400fa,0x0000402e,0x0000402f,0x0000403e, 34180x00005a35,0x00000000,0x000400fa,0x00005a31,
35710x000200f8,0x0000403e,0x00050041,0x000001bb, 34190x00005a32,0x00005a35,0x000200f8,0x00005a32,
35720x0000418c,0x000001b9,0x000001ba,0x0004003d, 34200x000500c5,0x00000006,0x00005a34,0x00005a29,
35730x00000006,0x0000418d,0x0000418c,0x00050084, 34210x000003e1,0x000200f9,0x00005a6a,0x000200f8,
35740x00000006,0x0000418e,0x000001db,0x0000418d, 34220x00005a35,0x000500aa,0x0000002f,0x00005a37,
35750x00050080,0x00000006,0x0000418f,0x000001c4, 34230x00005a2b,0x00000140,0x000300f7,0x00005a3a,
35760x0000418e,0x00050080,0x00000006,0x00004195, 34240x00000000,0x000400fa,0x00005a37,0x00005a38,
35770x0000418d,0x0000062f,0x00050086,0x00000006, 34250x00005a3a,0x000200f8,0x00005a38,0x000200f9,
35780x00004196,0x00004195,0x000001be,0x00050084, 34260x00005a6a,0x000200f8,0x00005a3a,0x000500c2,
35790x00000006,0x00004188,0x000001c4,0x00004196, 34270x00000006,0x00005a3c,0x00005a2b,0x000003ec,
35800x00050080,0x00000006,0x00004189,0x0000418f, 34280x0004007c,0x000000fb,0x00005a3d,0x00005a3c,
35810x00004188,0x00050080,0x00000006,0x00004183, 34290x00050082,0x000000fb,0x00005a3e,0x00005a3d,
35820x00004189,0x00004188,0x00050084,0x00000006, 34300x000003ef,0x000500af,0x0000002f,0x00005a40,
35830x0000417c,0x000001ef,0x0000402d,0x00050080, 34310x00005a3e,0x00000362,0x000300f7,0x00005a46,
35840x00000006,0x0000417d,0x00004183,0x0000417c, 34320x00000000,0x000400fa,0x00005a40,0x00005a41,
35850x00050041,0x000001bb,0x00004173,0x000001b9, 34330x00005a46,0x000200f8,0x00005a41,0x000600a9,
35860x00000206,0x0004003d,0x00000006,0x00004174, 34340x00000006,0x00005a44,0x00005a2f,0x000003f7,
35870x00004173,0x00050084,0x00000006,0x00004175, 34350x000003f8,0x000500c5,0x00000006,0x00005a45,
35880x00000205,0x00004174,0x00050080,0x00000006, 34360x00005a29,0x00005a44,0x000200f9,0x00005a6a,
35890x00004176,0x0000417d,0x00004175,0x000500ac, 34370x000200f8,0x00005a46,0x000500b1,0x0000002f,
35900x0000002f,0x000041a3,0x0000402d,0x00000142, 34380x00005a48,0x00005a3e,0x000003fd,0x000300f7,
35910x000300f7,0x000041a9,0x00000000,0x000400fa, 34390x00005a52,0x00000000,0x000400fa,0x00005a48,
35920x000041a3,0x000041a4,0x000041a8,0x000200f8, 34400x00005a49,0x00005a52,0x000200f8,0x00005a49,
35930x000041a8,0x000200f9,0x000041a9,0x000200f8, 34410x000300f7,0x00005a50,0x00000000,0x000400fa,
35940x000041a4,0x00050082,0x00000006,0x000041a7, 34420x00005a2f,0x00005a4b,0x00005a4e,0x000200f8,
35950x0000402d,0x00000142,0x000200f9,0x000041a9, 34430x00005a4e,0x000200f9,0x00005a50,0x000200f8,
35960x000200f8,0x000041a9,0x000700f5,0x00000006, 34440x00005a4b,0x000500c5,0x00000006,0x00005a4d,
35970x00005d93,0x000041a7,0x000041a4,0x00000138, 34450x00005a29,0x00000406,0x000200f9,0x00005a50,
35980x000041a8,0x00050084,0x00000006,0x0000416e, 34460x000200f8,0x00005a50,0x000700f5,0x00000006,
35990x000000ec,0x00005d93,0x00050080,0x00000006, 34470x0000619c,0x00005a4d,0x00005a4b,0x00005a29,
36000x0000416f,0x00004176,0x0000416e,0x000300f7, 34480x00005a4e,0x000200f9,0x00005a6a,0x000200f8,
36010x000041b6,0x00000000,0x000400fa,0x000041a3, 34490x00005a52,0x000500c7,0x00000006,0x00005a54,
36020x000041b1,0x000041b5,0x000200f8,0x000041b5, 34500x00005a26,0x0000040e,0x00050080,0x000000fb,
36030x000200f9,0x000041b6,0x000200f8,0x000041b1, 34510x00005a56,0x00005a3d,0x00006533,0x0004007c,
36040x00050082,0x00000006,0x000041b4,0x0000402d, 34520x00000006,0x00005a57,0x00005a56,0x000500c4,
36050x00000142,0x000200f9,0x000041b6,0x000200f8, 34530x00000006,0x00005a58,0x00005a57,0x00000414,
36060x000041b6,0x000700f5,0x00000006,0x00005d94, 34540x000500c2,0x00000006,0x00005a5a,0x00005a54,
36070x000041b4,0x000041b1,0x00000138,0x000041b5, 34550x000001f8,0x000500c5,0x00000006,0x00005a5b,
36080x00050084,0x00000006,0x00004168,0x000000ec, 34560x00005a58,0x00005a5a,0x000300f7,0x00005a61,
36090x00005d94,0x00050080,0x00000006,0x00004169, 34570x00000000,0x000400fa,0x00005a2f,0x00005a5d,
36100x0000416f,0x00004168,0x000300f7,0x000041c3, 34580x00005a61,0x000200f8,0x00005a5d,0x000500c7,
36110x00000000,0x000400fa,0x000041a3,0x000041be, 34590x00000006,0x00005a5f,0x00005a26,0x0000041d,
36120x000041c2,0x000200f8,0x000041c2,0x000200f9, 34600x000500ab,0x0000002f,0x00005a60,0x00005a5f,
36130x000041c3,0x000200f8,0x000041be,0x00050082, 34610x00000140,0x000200f9,0x00005a61,0x000200f8,
36140x00000006,0x000041c1,0x0000402d,0x00000142, 34620x00005a61,0x000700f5,0x0000002f,0x00005a62,
36150x000200f9,0x000041c3,0x000200f8,0x000041c3, 34630x00005a2f,0x00005a52,0x00005a60,0x00005a5d,
36160x000700f5,0x00000006,0x00005d95,0x000041c1, 34640x000300f7,0x00005a66,0x00000000,0x000400fa,
36170x000041be,0x00000138,0x000041c2,0x00050084, 34650x00005a62,0x00005a63,0x00005a66,0x000200f8,
36180x00000006,0x00004162,0x000000ec,0x00005d95, 34660x00005a63,0x00050080,0x00000006,0x00005a65,
36190x00050080,0x00000006,0x00004163,0x00004169, 34670x00005a5b,0x0000014a,0x000200f9,0x00005a66,
36200x00004162,0x00050084,0x00000006,0x00004041, 34680x000200f8,0x00005a66,0x000700f5,0x00000006,
36210x000000ec,0x000012dd,0x00050080,0x00000006, 34690x0000619b,0x00005a5b,0x00005a61,0x00005a65,
36220x00004042,0x00004163,0x00004041,0x00050041, 34700x00005a63,0x000500c5,0x00000006,0x00005a69,
36230x00000266,0x00004043,0x000001b9,0x00000264, 34710x00005a29,0x0000619b,0x000200f9,0x00005a6a,
36240x0004003d,0x00000007,0x00004044,0x00004043, 34720x000200f8,0x00005a6a,0x000d00f5,0x00000006,
36250x00050051,0x00000006,0x000041db,0x00004044, 34730x0000619d,0x00005a34,0x00005a32,0x00005a29,
36260x00000000,0x00050095,0x0000013d,0x000041dd, 34740x00005a38,0x00005a45,0x00005a41,0x0000619c,
36270x000041db,0x00004042,0x00050051,0x00000006, 34750x00005a50,0x00005a69,0x00005a66,0x000500c4,
36280x000041de,0x000041dd,0x00000001,0x00050051, 34760x00000006,0x0000582f,0x0000619d,0x00000362,
36290x00000006,0x000041df,0x000041dd,0x00000000, 34770x000500c5,0x00000006,0x00005830,0x00006199,
36300x00050051,0x00000006,0x000041e2,0x00004044, 34780x0000582f,0x00050095,0x00000145,0x00005a83,
36310x00000001,0x00050080,0x00000006,0x000041e4, 34790x00005795,0x00005828,0x00050051,0x00000006,
36320x000041e2,0x000041de,0x00050050,0x00000007, 34800x00005a84,0x00005a83,0x00000001,0x00050051,
36330x000041e5,0x000041df,0x000041e4,0x0004007c, 34810x00000006,0x00005a85,0x00005a83,0x00000000,
36340x00000014,0x000041d5,0x000041e5,0x00060041, 34820x00050080,0x00000006,0x00005a8a,0x0000579c,
36350x0000016c,0x000041cc,0x000041d5,0x0000016b, 34830x00005a84,0x00050050,0x00000007,0x00005a8b,
36360x0000016b,0x0006003d,0x00000006,0x000041cd, 34840x00005a85,0x00005a8a,0x0004007c,0x00000014,
36370x000041cc,0x00000002,0x00000004,0x000500aa, 34850x00005a7b,0x00005a8b,0x00060041,0x00000174,
36380x0000002f,0x00004046,0x000041cd,0x00000138, 34860x00005a73,0x00005a7b,0x00000173,0x00000173,
36390x000300f7,0x00004048,0x00000000,0x000400fa, 34870x0005003e,0x00005a73,0x00005830,0x00000002,
36400x00004046,0x00004047,0x00004048,0x000200f8, 34880x00000004,0x000200f9,0x000057f7,0x000200f8,
36410x00004047,0x000200f9,0x00004119,0x000200f8, 34890x000057c8,0x00050080,0x00000006,0x000057ca,
36420x00004048,0x000300f7,0x00004237,0x00000000, 34900x0000541a,0x000001e3,0x00050084,0x00000006,
36430x000400fa,0x000041a3,0x00004232,0x00004236, 34910x000057cc,0x000001f7,0x000060e7,0x00050080,
36440x000200f8,0x00004236,0x000200f9,0x00004237, 34920x00000006,0x000057cd,0x000057ca,0x000057cc,
36450x000200f8,0x00004232,0x00050082,0x00000006, 34930x00050051,0x00000027,0x000057d2,0x000060ea,
36460x00004235,0x0000402d,0x00000142,0x000200f9, 34940x00000000,0x0004007c,0x00000006,0x00005a91,
36470x00004237,0x000200f8,0x00004237,0x000700f5, 34950x000057d2,0x00050095,0x00000145,0x00005aac,
36480x00000006,0x00005d96,0x00004235,0x00004232, 34960x00005795,0x000057cd,0x00050051,0x00000006,
36490x00000138,0x00004236,0x00050084,0x00000006, 34970x00005aad,0x00005aac,0x00000001,0x00050051,
36500x000041fc,0x000000ec,0x00005d96,0x00050080, 34980x00000006,0x00005aae,0x00005aac,0x00000000,
36510x00000006,0x000041fd,0x00004176,0x000041fc, 34990x00050080,0x00000006,0x00005ab3,0x0000579c,
36520x000300f7,0x00004244,0x00000000,0x000400fa, 35000x00005aad,0x00050050,0x00000007,0x00005ab4,
36530x000041a3,0x0000423f,0x00004243,0x000200f8, 35010x00005aae,0x00005ab3,0x0004007c,0x00000014,
36540x00004243,0x000200f9,0x00004244,0x000200f8, 35020x00005aa4,0x00005ab4,0x00060041,0x00000174,
36550x0000423f,0x00050082,0x00000006,0x00004242, 35030x00005a9c,0x00005aa4,0x00000173,0x00000173,
36560x0000402d,0x00000142,0x000200f9,0x00004244, 35040x0005003e,0x00005a9c,0x00005a91,0x00000002,
36570x000200f8,0x00004244,0x000700f5,0x00000006, 35050x00000004,0x00050080,0x00000006,0x000057d5,
36580x00005d97,0x00004242,0x0000423f,0x00000138, 35060x000057cd,0x000000f3,0x00050051,0x00000027,
36590x00004243,0x00050084,0x00000006,0x000041f6, 35070x000057d9,0x000060ea,0x00000001,0x0004007c,
36600x000000ec,0x00005d97,0x00050080,0x00000006, 35080x00000006,0x00005aba,0x000057d9,0x00050095,
36610x000041f7,0x000041fd,0x000041f6,0x000300f7, 35090x00000145,0x00005ad5,0x00005795,0x000057d5,
36620x00004251,0x00000000,0x000400fa,0x000041a3, 35100x00050051,0x00000006,0x00005ad6,0x00005ad5,
36630x0000424c,0x00004250,0x000200f8,0x00004250, 35110x00000001,0x00050051,0x00000006,0x00005ad7,
36640x000200f9,0x00004251,0x000200f8,0x0000424c, 35120x00005ad5,0x00000000,0x00050080,0x00000006,
36650x00050082,0x00000006,0x0000424f,0x0000402d, 35130x00005adc,0x0000579c,0x00005ad6,0x00050050,
36660x00000142,0x000200f9,0x00004251,0x000200f8, 35140x00000007,0x00005add,0x00005ad7,0x00005adc,
36670x00004251,0x000700f5,0x00000006,0x00005d98, 35150x0004007c,0x00000014,0x00005acd,0x00005add,
36680x0000424f,0x0000424c,0x00000138,0x00004250, 35160x00060041,0x00000174,0x00005ac5,0x00005acd,
36690x00050084,0x00000006,0x000041f0,0x000000ec, 35170x00000173,0x00000173,0x0005003e,0x00005ac5,
36700x00005d98,0x00050080,0x00000006,0x000041f1, 35180x00005aba,0x00000002,0x00000004,0x00050080,
36710x000041f7,0x000041f0,0x000300f7,0x0000425e, 35190x00000006,0x000057dc,0x000057cd,0x000001d5,
36720x00000000,0x000400fa,0x000041a3,0x00004259, 35200x00050051,0x00000027,0x000057e0,0x000060ea,
36730x0000425d,0x000200f8,0x0000425d,0x000200f9, 35210x00000002,0x0004007c,0x00000006,0x00005ae3,
36740x0000425e,0x000200f8,0x00004259,0x00050082, 35220x000057e0,0x00050095,0x00000145,0x00005afe,
36750x00000006,0x0000425c,0x0000402d,0x00000142, 35230x00005795,0x000057dc,0x00050051,0x00000006,
36760x000200f9,0x0000425e,0x000200f8,0x0000425e, 35240x00005aff,0x00005afe,0x00000001,0x00050051,
36770x000700f5,0x00000006,0x00005d99,0x0000425c, 35250x00000006,0x00005b00,0x00005afe,0x00000000,
36780x00004259,0x00000138,0x0000425d,0x00050084, 35260x00050080,0x00000006,0x00005b05,0x0000579c,
36790x00000006,0x000041ea,0x000000ec,0x00005d99, 35270x00005aff,0x00050050,0x00000007,0x00005b06,
36800x00050080,0x00000006,0x000041eb,0x000041f1, 35280x00005b00,0x00005b05,0x0004007c,0x00000014,
36810x000041ea,0x00050080,0x00000006,0x0000404c, 35290x00005af6,0x00005b06,0x00060041,0x00000174,
36820x000041eb,0x00004041,0x00050095,0x0000013d, 35300x00005aee,0x00005af6,0x00000173,0x00000173,
36830x00004278,0x000041db,0x0000404c,0x00050051, 35310x0005003e,0x00005aee,0x00005ae3,0x00000002,
36840x00000006,0x00004279,0x00004278,0x00000001, 35320x00000004,0x00050080,0x00000006,0x000057e3,
36850x00050051,0x00000006,0x0000427a,0x00004278, 35330x000057cd,0x000001dc,0x00050051,0x00000027,
36860x00000000,0x00050080,0x00000006,0x0000427f, 35340x000057e7,0x000060f3,0x00000000,0x0004007c,
36870x000041e2,0x00004279,0x00050050,0x00000007, 35350x00000006,0x00005b0c,0x000057e7,0x00050095,
36880x00004280,0x0000427a,0x0000427f,0x0004007c, 35360x00000145,0x00005b27,0x00005795,0x000057e3,
36890x00000014,0x00004270,0x00004280,0x00060041, 35370x00050051,0x00000006,0x00005b28,0x00005b27,
36900x0000016c,0x00004267,0x00004270,0x0000016b, 35380x00000001,0x00050051,0x00000006,0x00005b29,
36910x0000016b,0x0006003d,0x00000006,0x00004268, 35390x00005b27,0x00000000,0x00050080,0x00000006,
36920x00004267,0x00000002,0x00000004,0x000500ae, 35400x00005b2e,0x0000579c,0x00005b28,0x00050050,
36930x0000002f,0x00004053,0x00004268,0x00004174, 35410x00000007,0x00005b2f,0x00005b29,0x00005b2e,
36940x000300f7,0x00004055,0x00000000,0x000400fa, 35420x0004007c,0x00000014,0x00005b1f,0x00005b2f,
36950x00004053,0x00004054,0x00004055,0x000200f8, 35430x00060041,0x00000174,0x00005b17,0x00005b1f,
36960x00004054,0x000200f9,0x00004119,0x000200f8, 35440x00000173,0x00000173,0x0005003e,0x00005b17,
36970x00004055,0x00050080,0x00000006,0x00004059, 35450x00005b0c,0x00000002,0x00000004,0x00050080,
36980x00004176,0x00004041,0x00050095,0x0000013d, 35460x00000006,0x000057ea,0x000057cd,0x000001e3,
36990x000042c7,0x000041db,0x00004059,0x00050051, 35470x00050051,0x00000027,0x000057ee,0x000060f3,
37000x00000006,0x000042c8,0x000042c7,0x00000001, 35480x00000001,0x0004007c,0x00000006,0x00005b35,
37010x00050051,0x00000006,0x000042c9,0x000042c7, 35490x000057ee,0x00050095,0x00000145,0x00005b50,
37020x00000000,0x00050080,0x00000006,0x000042ce, 35500x00005795,0x000057ea,0x00050051,0x00000006,
37030x000041e2,0x000042c8,0x00050050,0x00000007, 35510x00005b51,0x00005b50,0x00000001,0x00050051,
37040x000042cf,0x000042c9,0x000042ce,0x0004007c, 35520x00000006,0x00005b52,0x00005b50,0x00000000,
37050x00000014,0x000042bf,0x000042cf,0x00060041, 35530x00050080,0x00000006,0x00005b57,0x0000579c,
37060x0000016c,0x000042b6,0x000042bf,0x0000016b, 35540x00005b51,0x00050050,0x00000007,0x00005b58,
37070x0000016b,0x0006003d,0x00000006,0x000042b7, 35550x00005b52,0x00005b57,0x0004007c,0x00000014,
37080x000042b6,0x00000002,0x00000004,0x000300f7, 35560x00005b48,0x00005b58,0x00060041,0x00000174,
37090x0000430f,0x00000000,0x000400fa,0x000041a3, 35570x00005b40,0x00005b48,0x00000173,0x00000173,
37100x0000430a,0x0000430e,0x000200f8,0x0000430e, 35580x0005003e,0x00005b40,0x00005b35,0x00000002,
37110x000200f9,0x0000430f,0x000200f8,0x0000430a, 35590x00000004,0x00050080,0x00000006,0x000057f1,
37120x00050082,0x00000006,0x0000430d,0x0000402d, 35600x000057cd,0x000002a1,0x00050051,0x00000027,
37130x00000142,0x000200f9,0x0000430f,0x000200f8, 35610x000057f5,0x000060f3,0x00000002,0x0004007c,
37140x0000430f,0x000700f5,0x00000006,0x00005d9a, 35620x00000006,0x00005b5e,0x000057f5,0x00050095,
37150x0000430d,0x0000430a,0x00000138,0x0000430e, 35630x00000145,0x00005b79,0x00005795,0x000057f1,
37160x00050084,0x00000006,0x000042d4,0x000000ec, 35640x00050051,0x00000006,0x00005b7a,0x00005b79,
37170x00005d9a,0x00050080,0x00000006,0x000042d5, 35650x00000001,0x00050051,0x00000006,0x00005b7b,
37180x00004176,0x000042d4,0x00050080,0x00000006, 35660x00005b79,0x00000000,0x00050080,0x00000006,
37190x00004060,0x000042d5,0x00004041,0x00050095, 35670x00005b80,0x0000579c,0x00005b7a,0x00050050,
37200x0000013d,0x00004329,0x000041db,0x00004060, 35680x00000007,0x00005b81,0x00005b7b,0x00005b80,
37210x00050051,0x00000006,0x0000432a,0x00004329, 35690x0004007c,0x00000014,0x00005b71,0x00005b81,
37220x00000001,0x00050051,0x00000006,0x0000432b, 35700x00060041,0x00000174,0x00005b69,0x00005b71,
37230x00004329,0x00000000,0x00050080,0x00000006, 35710x00000173,0x00000173,0x0005003e,0x00005b69,
37240x00004330,0x000041e2,0x0000432a,0x00050050, 35720x00005b5e,0x00000002,0x00000004,0x000200f9,
37250x00000007,0x00004331,0x0000432b,0x00004330, 35730x000057f7,0x000200f8,0x000057f7,0x000200f9,
37260x0004007c,0x00000014,0x00004321,0x00004331, 35740x00005438,0x000200f8,0x00005438,0x000200f9,
37270x00060041,0x0000016c,0x00004318,0x00004321, 35750x00005439,0x000200f8,0x00005439,0x000700f5,
37280x0000016b,0x0000016b,0x0006003d,0x00000006, 35760x00000006,0x0000645a,0x0000610f,0x00005429,
37290x00004319,0x00004318,0x00000002,0x00000004, 35770x0000542c,0x00005438,0x00050080,0x00000006,
37300x00050050,0x0000100d,0x00004064,0x000042b7, 35780x0000543b,0x000060e7,0x0000026c,0x000200f9,
37310x00004319,0x0003003e,0x00003ffe,0x00004064, 35790x0000541b,0x000200f8,0x0000543c,0x00050041,
37320x000200f9,0x00004065,0x000200f8,0x00004065, 35800x000001c3,0x00005b89,0x000001c1,0x00000362,
37330x000700f5,0x00000006,0x00005d9b,0x00000138, 35810x0004003d,0x00000006,0x00005b8a,0x00005b89,
37340x0000430f,0x0000409d,0x0000409b,0x000700f5, 35820x00050082,0x00000006,0x00005b8b,0x0000541a,
37350x00000006,0x00005dc4,0x00000138,0x0000430f, 35830x00005b8a,0x000500c7,0x00000006,0x00005b97,
37360x00005dc2,0x0000409b,0x000500b0,0x0000002f, 35840x000060e4,0x00000376,0x000500aa,0x0000002f,
37370x00004068,0x00005d9b,0x00000280,0x000400f6, 35850x00005b98,0x00005b97,0x000000f3,0x000600a9,
37380x0000409e,0x0000409b,0x00000000,0x000400fa, 35860x00000006,0x00005b8e,0x00005b98,0x000001cc,
37390x00004068,0x00004069,0x0000409e,0x000200f8, 35870x0000034a,0x00050086,0x00000006,0x00005b8f,
37400x00004069,0x00050041,0x00000009,0x0000406b, 35880x00005b8b,0x00005b8e,0x00050041,0x000001c3,
37410x00003ffe,0x00005d9b,0x0004003d,0x00000006, 35890x00005ba7,0x000001c1,0x000001f8,0x0004003d,
37420x0000406c,0x0000406b,0x00050050,0x0000100d, 35900x00000006,0x00005ba8,0x00005ba7,0x00050084,
37430x0000406e,0x0000406c,0x0000406c,0x0003003e, 35910x00000006,0x00005ba9,0x000001f7,0x00005ba8,
37440x00004005,0x0000406e,0x000500c7,0x00000006, 35920x00050080,0x00000006,0x00005baa,0x000055bb,
37450x00004070,0x0000406c,0x00000241,0x000500aa, 35930x00005ba9,0x00050084,0x00000006,0x00005b9f,
37460x0000002f,0x00004071,0x00004070,0x00000138, 35940x0000020d,0x00005b8f,0x00050080,0x00000006,
37470x000300f7,0x00004083,0x00000000,0x000400fa, 35950x00005ba0,0x00005baa,0x00005b9f,0x00050095,
37480x00004071,0x00004072,0x00004083,0x000200f8, 35960x00000145,0x00005bda,0x000055ec,0x00005ba0,
37490x00004072,0x00050084,0x00000006,0x00004075, 35970x00050051,0x00000006,0x00005bdb,0x00005bda,
37500x000000ec,0x0000406c,0x00050080,0x00000006, 35980x00000001,0x00050051,0x00000006,0x00005bdc,
37510x00004076,0x00004176,0x00004075,0x00050095, 35990x00005bda,0x00000000,0x00050080,0x00000006,
37520x0000013d,0x00004378,0x000041db,0x00004076, 36000x00005be1,0x000055f3,0x00005bdb,0x00050050,
37530x00050051,0x00000006,0x00004379,0x00004378, 36010x00000007,0x00005be2,0x00005bdc,0x00005be1,
37540x00000001,0x00050051,0x00000006,0x0000437a, 36020x0004007c,0x00000014,0x00005bd2,0x00005be2,
37550x00004378,0x00000000,0x00050080,0x00000006, 36030x00050051,0x00000027,0x00005be6,0x000060ea,
37560x0000437f,0x000041e2,0x00004379,0x00050050, 36040x00000000,0x00050051,0x00000027,0x00005be8,
37570x00000007,0x00004380,0x0000437a,0x0000437f, 36050x000060f3,0x00000000,0x000500bc,0x0000002f,
37580x0004007c,0x00000014,0x00004370,0x00004380, 36060x00005be9,0x00005be6,0x00005be8,0x000300f7,
37590x00060041,0x0000016c,0x00004367,0x00004370, 36070x00005bf0,0x00000000,0x000400fa,0x00005be9,
37600x0000016b,0x0000016b,0x0006003d,0x00000006, 36080x00005bea,0x00005bf0,0x000200f8,0x00005bea,
37610x00004368,0x00004367,0x00000002,0x00000004, 36090x00050051,0x00000027,0x00005bec,0x000060ea,
37620x00050041,0x00000009,0x0000407a,0x00004005, 36100x00000001,0x00050051,0x00000027,0x00005bee,
37630x0000016b,0x0003003e,0x0000407a,0x00004368, 36110x000060f3,0x00000001,0x000500bc,0x0000002f,
37640x000300f7,0x000043c0,0x00000000,0x000400fa, 36120x00005bef,0x00005bec,0x00005bee,0x000200f9,
37650x000041a3,0x000043bb,0x000043bf,0x000200f8, 36130x00005bf0,0x000200f8,0x00005bf0,0x000700f5,
37660x000043bf,0x000200f9,0x000043c0,0x000200f8, 36140x0000002f,0x00005bf1,0x00005be9,0x0000543c,
37670x000043bb,0x00050082,0x00000006,0x000043be, 36150x00005bef,0x00005bea,0x000300f7,0x00005bf8,
37680x0000402d,0x00000142,0x000200f9,0x000043c0, 36160x00000000,0x000400fa,0x00005bf1,0x00005bf2,
37690x000200f8,0x000043c0,0x000700f5,0x00000006, 36170x00005bf8,0x000200f8,0x00005bf2,0x00050051,
37700x00005dbb,0x000043be,0x000043bb,0x00000138, 36180x00000027,0x00005bf4,0x000060ea,0x00000002,
37710x000043bf,0x00050084,0x00000006,0x00004385, 36190x00050051,0x00000027,0x00005bf6,0x000060f3,
37720x000000ec,0x00005dbb,0x00050080,0x00000006, 36200x00000002,0x000500bc,0x0000002f,0x00005bf7,
37730x00004386,0x00004176,0x00004385,0x00050080, 36210x00005bf4,0x00005bf6,0x000200f9,0x00005bf8,
37740x00000006,0x0000407e,0x00004386,0x00004075, 36220x000200f8,0x00005bf8,0x000700f5,0x0000002f,
37750x00050095,0x0000013d,0x000043da,0x000041db, 36230x00005bf9,0x00005bf1,0x00005bf0,0x00005bf7,
37760x0000407e,0x00050051,0x00000006,0x000043db, 36240x00005bf2,0x000300f7,0x0000546a,0x00000000,
37770x000043da,0x00000001,0x00050051,0x00000006, 36250x000400fa,0x00005bf9,0x00005445,0x0000546a,
37780x000043dc,0x000043da,0x00000000,0x00050080, 36260x000200f8,0x00005445,0x00060041,0x00000174,
37790x00000006,0x000043e1,0x000041e2,0x000043db, 36270x00005447,0x00005bd2,0x00000173,0x0000026c,
37800x00050050,0x00000007,0x000043e2,0x000043dc, 36280x0004007c,0x00000006,0x00005c00,0x00005be6,
37810x000043e1,0x0004007c,0x00000014,0x000043d2, 36290x000500c7,0x00000006,0x00005c02,0x00005c00,
37820x000043e2,0x00060041,0x0000016c,0x000043c9, 36300x00000249,0x000500ab,0x0000002f,0x00005c03,
37830x000043d2,0x0000016b,0x0000016b,0x0006003d, 36310x00005c02,0x00000140,0x000300f7,0x00005c0a,
37840x00000006,0x000043ca,0x000043c9,0x00000002, 36320x00000000,0x000400fa,0x00005c03,0x00005c04,
37850x00000004,0x00050041,0x00000009,0x00004082, 36330x00005c07,0x000200f8,0x00005c07,0x000500c5,
37860x00004005,0x00000264,0x0003003e,0x00004082, 36340x00000006,0x00005c09,0x00005c00,0x00000249,
37870x000043ca,0x000200f9,0x00004083,0x000200f8, 36350x000200f9,0x00005c0a,0x000200f8,0x00005c04,
37880x00004083,0x000600a9,0x00000006,0x00006116, 36360x000400c8,0x00000006,0x00005c06,0x00005c00,
37890x00004071,0x00000280,0x00000142,0x000200f9, 36370x000200f9,0x00005c0a,0x000200f8,0x00005c0a,
37900x00004084,0x000200f8,0x00004084,0x000700f5, 36380x000700f5,0x00000006,0x000060fd,0x00005c06,
37910x00000006,0x00005dc2,0x00005dc4,0x00004083, 36390x00005c04,0x00005c09,0x00005c07,0x000700ed,
37920x00004091,0x00004097,0x000700f5,0x00000006, 36400x00000006,0x0000544b,0x00005447,0x0000014a,
37930x00005dbc,0x00000138,0x00004083,0x00004099, 36410x00000140,0x000060fd,0x00060041,0x00000174,
37940x00004097,0x000500b0,0x0000002f,0x00004088, 36420x0000544d,0x00005bd2,0x00000173,0x0000031d,
37950x00005dbc,0x00006116,0x000400f6,0x0000409a, 36430x00050051,0x00000027,0x0000544f,0x000060ea,
37960x00004097,0x00000000,0x000400fa,0x00004088, 36440x00000001,0x0004007c,0x00000006,0x00005c11,
37970x00004089,0x0000409a,0x000200f8,0x00004089, 36450x0000544f,0x000500c7,0x00000006,0x00005c13,
37980x00050041,0x00000009,0x0000408c,0x00004005, 36460x00005c11,0x00000249,0x000500ab,0x0000002f,
37990x00005dbc,0x0004003d,0x00000006,0x0000408d, 36470x00005c14,0x00005c13,0x00000140,0x000300f7,
38000x0000408c,0x000500c7,0x00000006,0x000043e9, 36480x00005c1b,0x00000000,0x000400fa,0x00005c14,
38010x0000408d,0x00000241,0x000500ab,0x0000002f, 36490x00005c15,0x00005c18,0x000200f8,0x00005c18,
38020x000043ea,0x000043e9,0x00000138,0x000300f7, 36500x000500c5,0x00000006,0x00005c1a,0x00005c11,
38030x000043f5,0x00000000,0x000400fa,0x000043ea, 36510x00000249,0x000200f9,0x00005c1b,0x000200f8,
38040x000043eb,0x000043f4,0x000200f8,0x000043f4, 36520x00005c15,0x000400c8,0x00000006,0x00005c17,
38050x000200f9,0x000043f5,0x000200f8,0x000043eb, 36530x00005c11,0x000200f9,0x00005c1b,0x000200f8,
38060x00050084,0x00000006,0x000043fb,0x000000ec, 36540x00005c1b,0x000700f5,0x00000006,0x000060ff,
38070x0000418d,0x00050080,0x00000006,0x000043fc, 36550x00005c17,0x00005c15,0x00005c1a,0x00005c18,
38080x000001c4,0x000043fb,0x000500c7,0x00000006, 36560x000700ed,0x00000006,0x00005451,0x0000544d,
38090x000043ee,0x0000408d,0x00000256,0x00050084, 36570x0000014a,0x00000140,0x000060ff,0x00060041,
38100x00000006,0x000043ef,0x000000ec,0x000043ee, 36580x00000174,0x00005453,0x00005bd2,0x00000173,
38110x00050080,0x00000006,0x000043f0,0x000043fc, 36590x00000325,0x00050051,0x00000027,0x00005455,
38120x000043ef,0x00050095,0x0000013d,0x00004415, 36600x000060ea,0x00000002,0x0004007c,0x00000006,
38130x000041db,0x000043f0,0x00050051,0x00000006, 36610x00005c22,0x00005455,0x000500c7,0x00000006,
38140x00004416,0x00004415,0x00000001,0x00050051, 36620x00005c24,0x00005c22,0x00000249,0x000500ab,
38150x00000006,0x00004417,0x00004415,0x00000000, 36630x0000002f,0x00005c25,0x00005c24,0x00000140,
38160x00050080,0x00000006,0x0000441c,0x000041e2, 36640x000300f7,0x00005c2c,0x00000000,0x000400fa,
38170x00004416,0x00050050,0x00000007,0x0000441d, 36650x00005c25,0x00005c26,0x00005c29,0x000200f8,
38180x00004417,0x0000441c,0x0004007c,0x00000014, 36660x00005c29,0x000500c5,0x00000006,0x00005c2b,
38190x0000440d,0x0000441d,0x00060041,0x0000016c, 36670x00005c22,0x00000249,0x000200f9,0x00005c2c,
38200x00004404,0x0000440d,0x0000016b,0x0000016b, 36680x000200f8,0x00005c26,0x000400c8,0x00000006,
38210x0006003d,0x00000006,0x00004405,0x00004404, 36690x00005c28,0x00005c22,0x000200f9,0x00005c2c,
38220x00000002,0x00000004,0x000200f9,0x000043f5, 36700x000200f8,0x00005c2c,0x000700f5,0x00000006,
38230x000200f8,0x000043f5,0x000700f5,0x00000006, 36710x00006101,0x00005c28,0x00005c26,0x00005c2b,
38240x00005dc7,0x00004405,0x000043eb,0x00000539, 36720x00005c29,0x000700ed,0x00000006,0x00005457,
38250x000043f4,0x00050041,0x00000009,0x0000408f, 36730x00005453,0x0000014a,0x00000140,0x00006101,
38260x00003ff4,0x00005dc2,0x0003003e,0x0000408f, 36740x00060041,0x00000174,0x00005459,0x00005bd2,
38270x00005dc7,0x00050080,0x00000006,0x00004091, 36750x00000173,0x0000032d,0x0004007c,0x00000006,
38280x00005dc2,0x00000264,0x0004003d,0x00000006, 36760x00005c33,0x00005be8,0x000500c7,0x00000006,
38290x00004094,0x0000408c,0x000300f7,0x00004438, 36770x00005c35,0x00005c33,0x00000249,0x000500ab,
38300x00000000,0x000300fb,0x00000138,0x00004427, 36780x0000002f,0x00005c36,0x00005c35,0x00000140,
38310x000200f8,0x00004427,0x000500c7,0x00000006, 36790x000300f7,0x00005c3d,0x00000000,0x000400fa,
38320x00004429,0x00004094,0x00000241,0x000500ab, 36800x00005c36,0x00005c37,0x00005c3a,0x000200f8,
38330x0000002f,0x0000442a,0x00004429,0x00000138, 36810x00005c3a,0x000500c5,0x00000006,0x00005c3c,
38340x000300f7,0x0000442f,0x00000000,0x000400fa, 36820x00005c33,0x00000249,0x000200f9,0x00005c3d,
38350x0000442a,0x0000442b,0x0000442f,0x000200f8, 36830x000200f8,0x00005c37,0x000400c8,0x00000006,
38360x0000442b,0x000300f7,0x0000444c,0x00000000, 36840x00005c39,0x00005c33,0x000200f9,0x00005c3d,
38370x000400fa,0x0000442a,0x00004442,0x0000444b, 36850x000200f8,0x00005c3d,0x000700f5,0x00000006,
38380x000200f8,0x0000444b,0x000200f9,0x0000444c, 36860x00006107,0x00005c39,0x00005c37,0x00005c3c,
38390x000200f8,0x00004442,0x00050084,0x00000006, 36870x00005c3a,0x000700ef,0x00000006,0x0000545d,
38400x00004452,0x000000ec,0x0000418d,0x00050080, 36880x00005459,0x0000014a,0x00000140,0x00006107,
38410x00000006,0x00004453,0x000001c4,0x00004452, 36890x00060041,0x00000174,0x0000545f,0x00005bd2,
38420x000500c7,0x00000006,0x00004445,0x00004094, 36900x00000173,0x00000335,0x00050051,0x00000027,
38430x00000256,0x00050084,0x00000006,0x00004446, 36910x00005461,0x000060f3,0x00000001,0x0004007c,
38440x000000ec,0x00004445,0x00050080,0x00000006, 36920x00000006,0x00005c44,0x00005461,0x000500c7,
38450x00004447,0x00004453,0x00004446,0x00050095, 36930x00000006,0x00005c46,0x00005c44,0x00000249,
38460x0000013d,0x0000446c,0x000041db,0x00004447, 36940x000500ab,0x0000002f,0x00005c47,0x00005c46,
38470x00050051,0x00000006,0x0000446d,0x0000446c, 36950x00000140,0x000300f7,0x00005c4e,0x00000000,
38480x00000001,0x00050051,0x00000006,0x0000446e, 36960x000400fa,0x00005c47,0x00005c48,0x00005c4b,
38490x0000446c,0x00000000,0x00050080,0x00000006, 36970x000200f8,0x00005c4b,0x000500c5,0x00000006,
38500x00004473,0x000041e2,0x0000446d,0x00050050, 36980x00005c4d,0x00005c44,0x00000249,0x000200f9,
38510x00000007,0x00004474,0x0000446e,0x00004473, 36990x00005c4e,0x000200f8,0x00005c48,0x000400c8,
38520x0004007c,0x00000014,0x00004464,0x00004474, 37000x00000006,0x00005c4a,0x00005c44,0x000200f9,
38530x00060041,0x0000016c,0x0000445b,0x00004464, 37010x00005c4e,0x000200f8,0x00005c4e,0x000700f5,
38540x0000016b,0x0000016b,0x0006003d,0x00000006, 37020x00000006,0x00006109,0x00005c4a,0x00005c48,
38550x0000445c,0x0000445b,0x00000002,0x00000004, 37030x00005c4d,0x00005c4b,0x000700ef,0x00000006,
38560x000200f9,0x0000444c,0x000200f8,0x0000444c, 37040x00005463,0x0000545f,0x0000014a,0x00000140,
38570x000700f5,0x00000006,0x00005dce,0x0000445c, 37050x00006109,0x00060041,0x00000174,0x00005465,
38580x00004442,0x00000539,0x0000444b,0x00050041, 37060x00005bd2,0x00000173,0x00000359,0x00050051,
38590x000001bb,0x00004477,0x000001b9,0x0000034a, 37070x00000027,0x00005467,0x000060f3,0x00000002,
38600x0004003d,0x00000006,0x00004478,0x00004477, 37080x0004007c,0x00000006,0x00005c55,0x00005467,
38610x00050041,0x000001bb,0x00004488,0x000001b9, 37090x000500c7,0x00000006,0x00005c57,0x00005c55,
38620x00000334,0x0004003d,0x00000006,0x00004489, 37100x00000249,0x000500ab,0x0000002f,0x00005c58,
38630x00004488,0x000500c7,0x00000006,0x0000448a, 37110x00005c57,0x00000140,0x000300f7,0x00005c5f,
38640x00004489,0x00000142,0x000500ab,0x0000002f, 37120x00000000,0x000400fa,0x00005c58,0x00005c59,
38650x0000448b,0x0000448a,0x00000138,0x000600a9, 37130x00005c5c,0x000200f8,0x00005c5c,0x000500c5,
38660x00000006,0x00004485,0x0000448b,0x00000342, 37140x00000006,0x00005c5e,0x00005c55,0x00000249,
38670x000001c4,0x00050084,0x00000006,0x0000447b, 37150x000200f9,0x00005c5f,0x000200f8,0x00005c59,
38680x00005dce,0x00004485,0x00050080,0x00000006, 37160x000400c8,0x00000006,0x00005c5b,0x00005c55,
38690x0000447c,0x00004478,0x0000447b,0x000500c2, 37170x000200f9,0x00005c5f,0x000200f8,0x00005c5f,
38700x00000006,0x0000447d,0x0000447c,0x00000351, 37180x000700f5,0x00000006,0x0000610b,0x00005c5b,
38710x000500c4,0x00000006,0x0000447e,0x0000447d, 37190x00005c59,0x00005c5e,0x00005c5c,0x000700ef,
38720x0000031d,0x000600a9,0x00000006,0x00004480, 37200x00000006,0x00005469,0x00005465,0x0000014a,
38730x0000448b,0x00000355,0x00000138,0x000500c5, 37210x00000140,0x0000610b,0x000200f9,0x0000546a,
38740x00000006,0x00004481,0x0000447e,0x00004480, 37220x000200f8,0x0000546a,0x00060041,0x00000174,
38750x000200f9,0x00004438,0x000200f8,0x0000442f, 37230x0000546c,0x00005bd2,0x00000173,0x00000173,
38760x000300f7,0x000044e3,0x00000000,0x000400fa, 37240x000700ea,0x00000006,0x0000546d,0x0000546c,
38770x000041a3,0x000044de,0x000044e2,0x000200f8, 37250x0000026c,0x00000886,0x0000014a,0x00050080,
38780x000044e2,0x000200f9,0x000044e3,0x000200f8, 37260x00000006,0x0000546f,0x0000546d,0x0000014a,
38790x000044de,0x00050082,0x00000006,0x000044e1, 37270x000500ab,0x0000002f,0x00005471,0x0000546f,
38800x0000402d,0x00000142,0x000200f9,0x000044e3, 37280x0000610f,0x000300f7,0x00005473,0x00000000,
38810x000200f8,0x000044e3,0x000700f5,0x00000006, 37290x000400fa,0x00005471,0x00005472,0x00005473,
38820x00005dca,0x000044e1,0x000044de,0x00000138, 37300x000200f8,0x00005472,0x000200f9,0x0000547e,
38830x000044e2,0x00050084,0x00000006,0x000044a8, 37310x000200f8,0x00005473,0x000300f7,0x00005c9b,
38840x000000ec,0x00005dca,0x00050080,0x00000006, 37320x00000000,0x000300fb,0x00000140,0x00005c6d,
38850x000044a9,0x00004176,0x000044a8,0x000300f7, 37330x000200f8,0x00005c6d,0x000200f9,0x00005c70,
38860x000044f0,0x00000000,0x000400fa,0x000041a3, 37340x000200f8,0x00005c70,0x000700f5,0x00000006,
38870x000044eb,0x000044ef,0x000200f8,0x000044ef, 37350x00006116,0x00000140,0x00005c6d,0x00005c7e,
38880x000200f9,0x000044f0,0x000200f8,0x000044eb, 37360x00005c74,0x000500b0,0x0000002f,0x00005c73,
38890x00050082,0x00000006,0x000044ee,0x0000402d, 37370x00006116,0x0000035d,0x000400f6,0x00005c7f,
38900x00000142,0x000200f9,0x000044f0,0x000200f8, 37380x00005c74,0x00000000,0x000400fa,0x00005c73,
38910x000044f0,0x000700f5,0x00000006,0x00005dcb, 37390x00005c74,0x00005c7f,0x000200f8,0x00005c74,
38920x000044ee,0x000044eb,0x00000138,0x000044ef, 37400x00050080,0x00000006,0x00005c78,0x0000014a,
38930x00050084,0x00000006,0x000044a2,0x000000ec, 37410x00006116,0x00060041,0x00000174,0x00005c79,
38940x00005dcb,0x00050080,0x00000006,0x000044a3, 37420x00005bd2,0x00000173,0x00005c78,0x000700f1,
38950x000044a9,0x000044a2,0x000300f7,0x000044fd, 37430x00000006,0x00005c7a,0x00005c79,0x0000014a,
38960x00000000,0x000400fa,0x000041a3,0x000044f8, 37440x00000140,0x00000140,0x00050041,0x00000009,
38970x000044fc,0x000200f8,0x000044fc,0x000200f9, 37450x00005c7b,0x00005c65,0x00006116,0x0003003e,
38980x000044fd,0x000200f8,0x000044f8,0x00050082, 37460x00005c7b,0x00005c7a,0x00050080,0x00000006,
38990x00000006,0x000044fb,0x0000402d,0x00000142, 37470x00005c7e,0x00006116,0x0000026c,0x000200f9,
39000x000200f9,0x000044fd,0x000200f8,0x000044fd, 37480x00005c70,0x000200f8,0x00005c7f,0x00050041,
39010x000700f5,0x00000006,0x00005dcc,0x000044fb, 37490x00000009,0x00005c80,0x00005c65,0x00000173,
39020x000044f8,0x00000138,0x000044fc,0x00050084, 37500x0004003d,0x00000006,0x00005c81,0x00005c80,
39030x00000006,0x0000449c,0x000000ec,0x00005dcc, 37510x000500aa,0x0000002f,0x00005c82,0x00005c81,
39040x00050080,0x00000006,0x0000449d,0x000044a3, 37520x000003bf,0x000300f7,0x00005c86,0x00000000,
39050x0000449c,0x000300f7,0x0000450a,0x00000000, 37530x000400fa,0x00005c82,0x00005c83,0x00005c86,
39060x000400fa,0x000041a3,0x00004505,0x00004509, 37540x000200f8,0x00005c83,0x000200f9,0x00005c9b,
39070x000200f8,0x00004509,0x000200f9,0x0000450a, 37550x000200f8,0x00005c86,0x0004003d,0x00000006,
39080x000200f8,0x00004505,0x00050082,0x00000006, 37560x00005c88,0x00005c80,0x000500c7,0x00000006,
39090x00004508,0x0000402d,0x00000142,0x000200f9, 37570x00005cea,0x00005c88,0x00000249,0x000500ab,
39100x0000450a,0x000200f8,0x0000450a,0x000700f5, 37580x0000002f,0x00005ceb,0x00005cea,0x00000140,
39110x00000006,0x00005dcd,0x00004508,0x00004505, 37590x000300f7,0x00005cf2,0x00000000,0x000400fa,
39120x00000138,0x00004509,0x00050084,0x00000006, 37600x00005ceb,0x00005cec,0x00005cef,0x000200f8,
39130x00004496,0x000000ec,0x00005dcd,0x00050080, 37610x00005cef,0x000400c8,0x00000006,0x00005cf1,
39140x00000006,0x00004497,0x0000449d,0x00004496, 37620x00005c88,0x000200f9,0x00005cf2,0x000200f8,
39150x00050084,0x00000006,0x00004432,0x000000ec, 37630x00005cec,0x000500c7,0x00000006,0x00005cee,
39160x00004094,0x00050080,0x00000006,0x00004433, 37640x00005c88,0x0000025e,0x000200f9,0x00005cf2,
39170x00004497,0x00004432,0x00050095,0x0000013d, 37650x000200f8,0x00005cf2,0x000700f5,0x00000006,
39180x00004524,0x000041db,0x00004433,0x00050051, 37660x00006117,0x00005cee,0x00005cec,0x00005cf1,
39190x00000006,0x00004525,0x00004524,0x00000001, 37670x00005cef,0x0004007c,0x00000027,0x00005cf4,
39200x00050051,0x00000006,0x00004526,0x00004524, 37680x00006117,0x00050041,0x00000009,0x00005c8a,
39210x00000000,0x00050080,0x00000006,0x0000452b, 37690x00005c65,0x0000026c,0x0004003d,0x00000006,
39220x000041e2,0x00004525,0x00050050,0x00000007, 37700x00005c8b,0x00005c8a,0x000500c7,0x00000006,
39230x0000452c,0x00004526,0x0000452b,0x0004007c, 37710x00005cf9,0x00005c8b,0x00000249,0x000500ab,
39240x00000014,0x0000451c,0x0000452c,0x00060041, 37720x0000002f,0x00005cfa,0x00005cf9,0x00000140,
39250x0000016c,0x00004513,0x0000451c,0x0000016b, 37730x000300f7,0x00005d01,0x00000000,0x000400fa,
39260x0000016b,0x0006003d,0x00000006,0x00004514, 37740x00005cfa,0x00005cfb,0x00005cfe,0x000200f8,
39270x00004513,0x00000002,0x00000004,0x00050041, 37750x00005cfe,0x000400c8,0x00000006,0x00005d00,
39280x000001bb,0x0000452f,0x000001b9,0x0000035a, 37760x00005c8b,0x000200f9,0x00005d01,0x000200f8,
39290x0004003d,0x00000006,0x00004530,0x0000452f, 37770x00005cfb,0x000500c7,0x00000006,0x00005cfd,
39300x00050041,0x000001bb,0x00004540,0x000001b9, 37780x00005c8b,0x0000025e,0x000200f9,0x00005d01,
39310x00000334,0x0004003d,0x00000006,0x00004541, 37790x000200f8,0x00005d01,0x000700f5,0x00000006,
39320x00004540,0x000500c7,0x00000006,0x00004542, 37800x00006118,0x00005cfd,0x00005cfb,0x00005d00,
39330x00004541,0x00000280,0x000500ab,0x0000002f, 37810x00005cfe,0x0004007c,0x00000027,0x00005d03,
39340x00004543,0x00004542,0x00000138,0x000600a9, 37820x00006118,0x00050041,0x00000009,0x00005c8d,
39350x00000006,0x0000453d,0x00004543,0x000001c4, 37830x00005c65,0x0000031d,0x0004003d,0x00000006,
39360x00000342,0x00050084,0x00000006,0x00004533, 37840x00005c8e,0x00005c8d,0x000500c7,0x00000006,
39370x00004514,0x0000453d,0x00050080,0x00000006, 37850x00005d08,0x00005c8e,0x00000249,0x000500ab,
39380x00004534,0x00004530,0x00004533,0x000500c2, 37860x0000002f,0x00005d09,0x00005d08,0x00000140,
39390x00000006,0x00004535,0x00004534,0x00000351, 37870x000300f7,0x00005d10,0x00000000,0x000400fa,
39400x000500c4,0x00000006,0x00004536,0x00004535, 37880x00005d09,0x00005d0a,0x00005d0d,0x000200f8,
39410x0000031d,0x000600a9,0x00000006,0x00004538, 37890x00005d0d,0x000400c8,0x00000006,0x00005d0f,
39420x00004543,0x000000ec,0x00000364,0x000500c5, 37900x00005c8e,0x000200f9,0x00005d10,0x000200f8,
39430x00000006,0x00004539,0x00004536,0x00004538, 37910x00005d0a,0x000500c7,0x00000006,0x00005d0c,
39440x000200f9,0x00004438,0x000200f8,0x00004438, 37920x00005c8e,0x0000025e,0x000200f9,0x00005d10,
39450x000700f5,0x00000006,0x00005dcf,0x00004481, 37930x000200f8,0x00005d10,0x000700f5,0x00000006,
39460x0000444c,0x00004539,0x0000450a,0x00050041, 37940x00006119,0x00005d0c,0x00005d0a,0x00005d0f,
39470x00000009,0x00004096,0x00003ff3,0x00005dc2, 37950x00005d0d,0x0004007c,0x00000027,0x00005d12,
39480x0003003e,0x00004096,0x00005dcf,0x000200f9, 37960x00006119,0x00060050,0x0000006c,0x00005c90,
39490x00004097,0x000200f8,0x00004097,0x00050080, 37970x00005cf4,0x00005d03,0x00005d12,0x00050041,
39500x00000006,0x00004099,0x00005dbc,0x00000264, 37980x00000009,0x00005c91,0x00005c65,0x00000325,
39510x000200f9,0x00004084,0x000200f8,0x0000409a, 37990x0004003d,0x00000006,0x00005c92,0x00005c91,
39520x000200f9,0x0000409b,0x000200f8,0x0000409b, 38000x000500c7,0x00000006,0x00005d17,0x00005c92,
39530x00050080,0x00000006,0x0000409d,0x00005d9b, 38010x00000249,0x000500ab,0x0000002f,0x00005d18,
39540x00000264,0x000200f9,0x00004065,0x000200f8, 38020x00005d17,0x00000140,0x000300f7,0x00005d1f,
39550x0000409e,0x00050041,0x000001bb,0x0000454c, 38030x00000000,0x000400fa,0x00005d18,0x00005d19,
39560x000001b9,0x00000334,0x0004003d,0x00000006, 38040x00005d1c,0x000200f8,0x00005d1c,0x000400c8,
39570x0000454d,0x0000454c,0x000500c7,0x00000006, 38050x00000006,0x00005d1e,0x00005c92,0x000200f9,
39580x0000454e,0x0000454d,0x00000142,0x000500aa, 38060x00005d1f,0x000200f8,0x00005d19,0x000500c7,
39590x0000002f,0x000040a0,0x0000454e,0x00000138, 38070x00000006,0x00005d1b,0x00005c92,0x0000025e,
39600x000300f7,0x000040a6,0x00000000,0x000400fa, 38080x000200f9,0x00005d1f,0x000200f8,0x00005d1f,
39610x000040a0,0x000040a1,0x000040a6,0x000200f8, 38090x000700f5,0x00000006,0x0000611a,0x00005d1b,
39620x000040a1,0x000500c7,0x00000006,0x000040a4, 38100x00005d19,0x00005d1e,0x00005d1c,0x0004007c,
39630x0000454d,0x000000ec,0x000500ab,0x0000002f, 38110x00000027,0x00005d21,0x0000611a,0x00050041,
39640x000040a5,0x000040a4,0x00000138,0x000200f9, 38120x00000009,0x00005c94,0x00005c65,0x0000032d,
39650x000040a6,0x000200f8,0x000040a6,0x000700f5, 38130x0004003d,0x00000006,0x00005c95,0x00005c94,
39660x0000002f,0x000040a7,0x000040a0,0x0000409e, 38140x000500c7,0x00000006,0x00005d26,0x00005c95,
39670x000040a5,0x000040a1,0x000300f7,0x000040ad, 38150x00000249,0x000500ab,0x0000002f,0x00005d27,
39680x00000000,0x000400fa,0x000040a7,0x000040a8, 38160x00005d26,0x00000140,0x000300f7,0x00005d2e,
39690x000040ad,0x000200f8,0x000040a8,0x0004003d, 38170x00000000,0x000400fa,0x00005d27,0x00005d28,
39700x000000ed,0x000040a9,0x00003ff4,0x0003003e, 38180x00005d2b,0x000200f8,0x00005d2b,0x000400c8,
39710x0000400e,0x000040a9,0x0004003d,0x000000ed, 38190x00000006,0x00005d2d,0x00005c95,0x000200f9,
39720x000040aa,0x00003ff3,0x0003003e,0x0000400f, 38200x00005d2e,0x000200f8,0x00005d28,0x000500c7,
39730x000040aa,0x000200f9,0x00004585,0x000200f8, 38210x00000006,0x00005d2a,0x00005c95,0x0000025e,
39740x00004585,0x000700f5,0x00000006,0x00005d9c, 38220x000200f9,0x00005d2e,0x000200f8,0x00005d2e,
39750x00000138,0x000040a8,0x000045cb,0x000045c9, 38230x000700f5,0x00000006,0x0000611b,0x00005d2a,
39760x000500b0,0x0000002f,0x00004588,0x00005d9c, 38240x00005d28,0x00005d2d,0x00005d2b,0x0004007c,
39770x000000ec,0x000400f6,0x000045cc,0x000045c9, 38250x00000027,0x00005d30,0x0000611b,0x00050041,
39780x00000000,0x000400fa,0x00004588,0x00004589, 38260x00000009,0x00005c97,0x00005c65,0x00000335,
39790x000045cc,0x000200f8,0x00004589,0x00050041, 38270x0004003d,0x00000006,0x00005c98,0x00005c97,
39800x00000096,0x0000458b,0x00004551,0x00005d9c, 38280x000500c7,0x00000006,0x00005d35,0x00005c98,
39810x0003003e,0x0000458b,0x000003cc,0x00050041, 38290x00000249,0x000500ab,0x0000002f,0x00005d36,
39820x00000096,0x0000458d,0x00004552,0x00005d9c, 38300x00005d35,0x00000140,0x000300f7,0x00005d3d,
39830x0003003e,0x0000458d,0x000003cc,0x00050041, 38310x00000000,0x000400fa,0x00005d36,0x00005d37,
39840x00000009,0x0000458f,0x00004553,0x00005d9c, 38320x00005d3a,0x000200f8,0x00005d3a,0x000400c8,
39850x0003003e,0x0000458f,0x00000138,0x000200f9, 38330x00000006,0x00005d3c,0x00005c98,0x000200f9,
39860x00004590,0x000200f8,0x00004590,0x000700f5, 38340x00005d3d,0x000200f8,0x00005d37,0x000500c7,
39870x00000006,0x00005db4,0x00000138,0x00004589, 38350x00000006,0x00005d39,0x00005c98,0x0000025e,
39880x0000459a,0x00004594,0x000500b0,0x0000002f, 38360x000200f9,0x00005d3d,0x000200f8,0x00005d3d,
39890x00004593,0x00005db4,0x00000470,0x000400f6, 38370x000700f5,0x00000006,0x0000611c,0x00005d39,
39900x0000459b,0x00004594,0x00000000,0x000400fa, 38380x00005d37,0x00005d3c,0x00005d3a,0x0004007c,
39910x00004593,0x00004594,0x0000459b,0x000200f8, 38390x00000027,0x00005d3f,0x0000611c,0x00060050,
39920x00004594,0x00060041,0x000000e5,0x00004597, 38400x0000006c,0x00005c9a,0x00005d21,0x00005d30,
39930x00004555,0x00005d9c,0x00005db4,0x0003003e, 38410x00005d3f,0x000200f9,0x00005c9b,0x000200f8,
39940x00004597,0x00000c0e,0x00050080,0x00000006, 38420x00005c9b,0x000700f5,0x0000006c,0x00006121,
39950x0000459a,0x00005db4,0x00000264,0x000200f9, 38430x00006532,0x00005c83,0x00005c9a,0x00005d3d,
39960x00004590,0x000200f8,0x0000459b,0x00050041, 38440x000700f5,0x0000006c,0x0000611d,0x000005dc,
39970x00000009,0x0000459d,0x0000400e,0x00005d9c, 38450x00005c83,0x00005c90,0x00005d3d,0x000300f7,
39980x0004003d,0x00000006,0x0000459e,0x0000459d, 38460x00005d59,0x00000000,0x000300fb,0x00000140,
39990x000500aa,0x0000002f,0x0000459f,0x0000459e, 38470x00005d4a,0x000200f8,0x00005d4a,0x000300f7,
40000x00000539,0x000300f7,0x000045a1,0x00000000, 38480x00005d7d,0x00000000,0x000300fb,0x00000140,
40010x000400fa,0x0000459f,0x000045a0,0x000045a1, 38490x00005d62,0x000200f8,0x00005d62,0x000500b0,
40020x000200f8,0x000045a0,0x000200f9,0x000045c9, 38500x0000002f,0x00005d6a,0x0000577e,0x000056c1,
40030x000200f8,0x000045a1,0x0004003d,0x00000006, 38510x000400a8,0x0000002f,0x00005d6b,0x00005d6a,
40040x000045a5,0x0000459d,0x00050041,0x000001bb, 38520x000300f7,0x00005d72,0x00000000,0x000400fa,
40050x000046a5,0x000001b9,0x0000034a,0x0004003d, 38530x00005d6b,0x00005d6c,0x00005d72,0x000200f8,
40060x00000006,0x000046a6,0x000046a5,0x00050084, 38540x00005d6c,0x00050041,0x000001c3,0x00005d6e,
40070x00000006,0x000046a8,0x000001c4,0x000045a5, 38550x000001c1,0x000003b7,0x0004003d,0x00000006,
40080x00050080,0x00000006,0x000046a9,0x000046a6, 38560x00005d6f,0x00005d6e,0x00050086,0x00000006,
40090x000046a8,0x00050080,0x00000006,0x000045a7, 38570x00005d70,0x00005d6f,0x000001cc,0x000500ae,
40100x000046a9,0x00000521,0x00050041,0x00000266, 38580x0000002f,0x00005d71,0x0000577e,0x00005d70,
40110x000045a8,0x000001b9,0x0000016b,0x0004003d, 38590x000200f9,0x00005d72,0x000200f8,0x00005d72,
40120x00000007,0x000045a9,0x000045a8,0x00050051, 38600x000700f5,0x0000002f,0x00005d73,0x00005d6a,
40130x00000006,0x000046c0,0x000045a9,0x00000000, 38610x00005d62,0x00005d71,0x00005d6c,0x000300f7,
40140x00050095,0x0000013d,0x000046c2,0x000046c0, 38620x00005d75,0x00000000,0x000400fa,0x00005d73,
40150x000045a7,0x00050051,0x00000006,0x000046c3, 38630x00005d74,0x00005d75,0x000200f8,0x00005d74,
40160x000046c2,0x00000001,0x00050051,0x00000006, 38640x000200f9,0x00005d7d,0x000200f8,0x00005d75,
40170x000046c4,0x000046c2,0x00000000,0x00050051, 38650x00050041,0x000001c3,0x00005d76,0x000001c1,
40180x00000006,0x000046c7,0x000045a9,0x00000001, 38660x000003c1,0x0004003d,0x00000006,0x00005d77,
40190x00050080,0x00000006,0x000046c9,0x000046c7, 38670x00005d76,0x00050082,0x00000006,0x00005d7a,
40200x000046c3,0x00050050,0x00000007,0x000046ca, 38680x0000577e,0x000056c1,0x00050084,0x00000006,
40210x000046c4,0x000046c9,0x0004007c,0x00000014, 38690x00005d7b,0x000000f3,0x00005d7a,0x00050080,
40220x000046ba,0x000046ca,0x00060041,0x0000016c, 38700x00000006,0x00005d7c,0x00005d77,0x00005d7b,
40230x000046b1,0x000046ba,0x0000016b,0x0000016b, 38710x000200f9,0x00005d7d,0x000200f8,0x00005d7d,
40240x0006003d,0x00000006,0x000046b2,0x000046b1, 38720x000700f5,0x00000006,0x00006133,0x000003bf,
40250x00000002,0x00000004,0x0003003e,0x0000458f, 38730x00005d74,0x00005d7c,0x00005d75,0x000500aa,
40260x000046b2,0x000200f9,0x000045ac,0x000200f8, 38740x0000002f,0x00005d4e,0x00006133,0x000003bf,
40270x000045ac,0x000700f5,0x00000006,0x00005db6, 38750x000300f7,0x00005d50,0x00000000,0x000400fa,
40280x00000138,0x000045a1,0x000045bb,0x000045b0, 38760x00005d4e,0x00005d4f,0x00005d50,0x000200f8,
40290x000500b0,0x0000002f,0x000045af,0x00005db6, 38770x00005d4f,0x000200f9,0x00005d59,0x000200f8,
40300x00000470,0x000400f6,0x000045bc,0x000045b0, 38780x00005d50,0x00050041,0x0000026e,0x00005d51,
40310x00000000,0x000400fa,0x000045af,0x000045b0, 38790x000001c1,0x00000173,0x0004003d,0x00000007,
40320x000045bc,0x000200f8,0x000045b0,0x0004003d, 38800x00005d52,0x00005d51,0x00050051,0x00000006,
40330x00000006,0x000045b5,0x0000459d,0x00050084, 38810x00005d99,0x00005d52,0x00000000,0x00050095,
40340x00000006,0x000046ee,0x000001c4,0x000045b5, 38820x00000145,0x00005d9b,0x00005d99,0x00006133,
40350x00050080,0x00000006,0x000046ef,0x000046a6, 38830x00050051,0x00000006,0x00005d9c,0x00005d9b,
40360x000046ee,0x00050084,0x00000006,0x000046d8, 38840x00000001,0x00050051,0x00000006,0x00005d9d,
40370x000001d4,0x00005db6,0x00050080,0x00000006, 38850x00005d9b,0x00000000,0x00050051,0x00000006,
40380x000046d9,0x000046ef,0x000046d8,0x00050095, 38860x00005da0,0x00005d52,0x00000001,0x00050080,
40390x0000013d,0x00004708,0x000046c0,0x000046d9, 38870x00000006,0x00005da2,0x00005da0,0x00005d9c,
40400x00050051,0x00000006,0x00004709,0x00004708, 38880x00050050,0x00000007,0x00005da3,0x00005d9d,
40410x00000001,0x00050051,0x00000006,0x0000470a, 38890x00005da2,0x0004007c,0x00000014,0x00005d93,
40420x00004708,0x00000000,0x00050080,0x00000006, 38900x00005da3,0x00060041,0x00000174,0x00005d8a,
40430x0000470f,0x000046c7,0x00004709,0x00050050, 38910x00005d93,0x00000173,0x00000173,0x0006003d,
40440x00000007,0x00004710,0x0000470a,0x0000470f, 38920x00000006,0x00005d8b,0x00005d8a,0x00000002,
40450x0004007c,0x00000014,0x00004700,0x00004710, 38930x00000004,0x000300f7,0x00005dd5,0x00000000,
40460x00060041,0x0000016c,0x000046f7,0x00004700, 38940x000300fb,0x00000140,0x00005dac,0x000200f8,
40470x0000016b,0x0000016b,0x0006003d,0x00000006, 38950x00005dac,0x000500c7,0x00000006,0x00005dae,
40480x000046f8,0x000046f7,0x00000002,0x00000004, 38960x00005d8b,0x00000376,0x000500c7,0x00000006,
40490x00050080,0x00000006,0x000046df,0x000046d9, 38970x00005ddb,0x000013a9,0x00000288,0x000500ab,
40500x000000ec,0x00050095,0x0000013d,0x00004729, 38980x0000002f,0x00005ddc,0x00005ddb,0x00000140,
40510x000046c0,0x000046df,0x00050051,0x00000006, 38990x000600a9,0x00000006,0x00005db0,0x00005ddc,
40520x0000472a,0x00004729,0x00000001,0x00050051, 39000x000000f3,0x0000036c,0x000500ab,0x0000002f,
40530x00000006,0x0000472b,0x00004729,0x00000000, 39010x00005db1,0x00005dae,0x00005db0,0x000300f7,
40540x00050080,0x00000006,0x00004730,0x000046c7, 39020x00005db3,0x00000000,0x000400fa,0x00005db1,
40550x0000472a,0x00050050,0x00000007,0x00004731, 39030x00005db2,0x00005db3,0x000200f8,0x00005db2,
40560x0000472b,0x00004730,0x0004007c,0x00000014, 39040x000200f9,0x00005dd5,0x000200f8,0x00005db3,
40570x00004721,0x00004731,0x00060041,0x0000016c, 39050x000500c2,0x00000006,0x00005de0,0x00005d8b,
40580x00004718,0x00004721,0x0000016b,0x0000016b, 39060x00000325,0x00050084,0x00000006,0x00005db6,
40590x0006003d,0x00000006,0x00004719,0x00004718, 39070x00005de0,0x000001cc,0x000500ae,0x0000002f,
39080x00005db9,0x00005de0,0x00000387,0x000400a8,
39090x0000002f,0x00005dba,0x00005db9,0x000300f7,
39100x00005dc0,0x00000000,0x000400fa,0x00005dba,
39110x00005dbb,0x00005dc0,0x000200f8,0x00005dbb,
39120x000500b0,0x0000002f,0x00005dbf,0x00005db6,
39130x00005b8a,0x000200f9,0x00005dc0,0x000200f8,
39140x00005dc0,0x000700f5,0x0000002f,0x00005dc1,
39150x00005db9,0x00005db3,0x00005dbf,0x00005dbb,
39160x000300f7,0x00005dc3,0x00000000,0x000400fa,
39170x00005dc1,0x00005dc2,0x00005dc3,0x000200f8,
39180x00005dc2,0x000200f9,0x00005dd5,0x000200f8,
39190x00005dc3,0x00050082,0x00000006,0x00005dc7,
39200x00005db6,0x00005b8a,0x000600a9,0x00000006,
39210x00005de8,0x00005ddc,0x000001cc,0x0000034a,
39220x00050089,0x00000006,0x00005dca,0x00005dc7,
39230x00005de8,0x000500aa,0x0000002f,0x00005dcb,
39240x00005dca,0x00000140,0x000300f7,0x00005dd3,
39250x00000000,0x000400fa,0x00005dcb,0x00005dcc,
39260x00005dd3,0x000200f8,0x00005dcc,0x00050086,
39270x00000006,0x00005dcf,0x00005dc7,0x00005de8,
39280x00050041,0x000001c3,0x00005dd0,0x000001c1,
39290x0000020e,0x0004003d,0x00000006,0x00005dd1,
39300x00005dd0,0x000500b0,0x0000002f,0x00005dd2,
39310x00005dcf,0x00005dd1,0x000200f9,0x00005dd3,
39320x000200f8,0x00005dd3,0x000700f5,0x0000002f,
39330x00005dd4,0x00005dcb,0x00005dc3,0x00005dd2,
39340x00005dcc,0x000200f9,0x00005dd5,0x000200f8,
39350x00005dd5,0x000900f5,0x0000002f,0x00006134,
39360x0000037d,0x00005db2,0x0000037d,0x00005dc2,
39370x00005dd4,0x00005dd3,0x000600a9,0x00000006,
39380x00005d58,0x00006134,0x00005d8b,0x000003bf,
39390x000200f9,0x00005d59,0x000200f8,0x00005d59,
39400x000700f5,0x00000006,0x00006135,0x000003bf,
39410x00005d4f,0x00005d58,0x00005dd5,0x000200f9,
39420x0000547b,0x000200f8,0x0000547b,0x00050080,
39430x00000006,0x0000547d,0x000060e6,0x0000026c,
39440x000200f9,0x00005410,0x000200f8,0x0000547e,
39450x000700f5,0x0000002f,0x0000614e,0x0000037d,
39460x00005410,0x00000444,0x00005472,0x000300f7,
39470x00005480,0x00000000,0x000400fa,0x0000614e,
39480x00005481,0x00005480,0x000200f8,0x00005480,
39490x000200f9,0x00005481,0x000200f8,0x00005481,
39500x000200f9,0x000014df,0x000200f8,0x000014df,
39510x000200f9,0x000014d5,0x000200f8,0x000014d4,
39520x000300f7,0x000043f7,0x00000000,0x000300fb,
39530x00000140,0x00004309,0x000200f8,0x00004309,
39540x0003003e,0x000042d1,0x0000103a,0x0003003e,
39550x000042d2,0x0000103a,0x00050041,0x000001c3,
39560x0000430a,0x000001c1,0x000001f8,0x0004003d,
39570x00000006,0x0000430b,0x0000430a,0x000500b2,
39580x0000002f,0x0000430c,0x0000430b,0x0000014a,
39590x000300f7,0x0000438c,0x00000000,0x000400fa,
39600x0000430c,0x0000430d,0x0000431c,0x000200f8,
39610x0000431c,0x00050041,0x000001c3,0x0000446a,
39620x000001c1,0x000001c2,0x0004003d,0x00000006,
39630x0000446b,0x0000446a,0x00050084,0x00000006,
39640x0000446c,0x000001e3,0x0000446b,0x00050080,
39650x00000006,0x0000446d,0x000001cc,0x0000446c,
39660x00050080,0x00000006,0x00004473,0x0000446b,
39670x00000695,0x00050086,0x00000006,0x00004474,
39680x00004473,0x000001c6,0x00050084,0x00000006,
39690x00004466,0x000001cc,0x00004474,0x00050080,
39700x00000006,0x00004467,0x0000446d,0x00004466,
39710x00050080,0x00000006,0x00004461,0x00004467,
39720x00004466,0x00050084,0x00000006,0x0000445a,
39730x000001f7,0x0000430b,0x00050080,0x00000006,
39740x0000445b,0x00004461,0x0000445a,0x00050041,
39750x000001c3,0x00004451,0x000001c1,0x0000020e,
39760x0004003d,0x00000006,0x00004452,0x00004451,
39770x00050084,0x00000006,0x00004453,0x0000020d,
39780x00004452,0x00050080,0x00000006,0x00004454,
39790x0000445b,0x00004453,0x000500ac,0x0000002f,
39800x00004481,0x0000430b,0x0000014a,0x000300f7,
39810x00004487,0x00000000,0x000400fa,0x00004481,
39820x00004482,0x00004486,0x000200f8,0x00004486,
39830x000200f9,0x00004487,0x000200f8,0x00004482,
39840x00050082,0x00000006,0x00004485,0x0000430b,
39850x0000014a,0x000200f9,0x00004487,0x000200f8,
39860x00004487,0x000700f5,0x00000006,0x000061b9,
39870x00004485,0x00004482,0x00000140,0x00004486,
39880x00050084,0x00000006,0x0000444c,0x000000f3,
39890x000061b9,0x00050080,0x00000006,0x0000444d,
39900x00004454,0x0000444c,0x000300f7,0x00004494,
39910x00000000,0x000400fa,0x00004481,0x0000448f,
39920x00004493,0x000200f8,0x00004493,0x000200f9,
39930x00004494,0x000200f8,0x0000448f,0x00050082,
39940x00000006,0x00004492,0x0000430b,0x0000014a,
39950x000200f9,0x00004494,0x000200f8,0x00004494,
39960x000700f5,0x00000006,0x000061ba,0x00004492,
39970x0000448f,0x00000140,0x00004493,0x00050084,
39980x00000006,0x00004446,0x000000f3,0x000061ba,
39990x00050080,0x00000006,0x00004447,0x0000444d,
40000x00004446,0x000300f7,0x000044a1,0x00000000,
40010x000400fa,0x00004481,0x0000449c,0x000044a0,
40020x000200f8,0x000044a0,0x000200f9,0x000044a1,
40030x000200f8,0x0000449c,0x00050082,0x00000006,
40040x0000449f,0x0000430b,0x0000014a,0x000200f9,
40050x000044a1,0x000200f8,0x000044a1,0x000700f5,
40060x00000006,0x000061bb,0x0000449f,0x0000449c,
40070x00000140,0x000044a0,0x00050084,0x00000006,
40080x00004440,0x000000f3,0x000061bb,0x00050080,
40090x00000006,0x00004441,0x00004447,0x00004440,
40100x00050084,0x00000006,0x0000431f,0x000000f3,
40110x000013a7,0x00050080,0x00000006,0x00004320,
40120x00004441,0x0000431f,0x00050041,0x0000026e,
40130x00004321,0x000001c1,0x0000026c,0x0004003d,
40140x00000007,0x00004322,0x00004321,0x00050051,
40150x00000006,0x000044b9,0x00004322,0x00000000,
40160x00050095,0x00000145,0x000044bb,0x000044b9,
40170x00004320,0x00050051,0x00000006,0x000044bc,
40180x000044bb,0x00000001,0x00050051,0x00000006,
40190x000044bd,0x000044bb,0x00000000,0x00050051,
40200x00000006,0x000044c0,0x00004322,0x00000001,
40210x00050080,0x00000006,0x000044c2,0x000044c0,
40220x000044bc,0x00050050,0x00000007,0x000044c3,
40230x000044bd,0x000044c2,0x0004007c,0x00000014,
40240x000044b3,0x000044c3,0x00060041,0x00000174,
40250x000044aa,0x000044b3,0x00000173,0x00000173,
40260x0006003d,0x00000006,0x000044ab,0x000044aa,
40270x00000002,0x00000004,0x000500aa,0x0000002f,
40280x00004324,0x000044ab,0x00000140,0x000300f7,
40290x00004326,0x00000000,0x000400fa,0x00004324,
40300x00004325,0x00004326,0x000200f8,0x00004325,
40310x000200f9,0x000043f7,0x000200f8,0x00004326,
40320x000300f7,0x00004515,0x00000000,0x000400fa,
40330x00004481,0x00004510,0x00004514,0x000200f8,
40340x00004514,0x000200f9,0x00004515,0x000200f8,
40350x00004510,0x00050082,0x00000006,0x00004513,
40360x0000430b,0x0000014a,0x000200f9,0x00004515,
40370x000200f8,0x00004515,0x000700f5,0x00000006,
40380x000061bc,0x00004513,0x00004510,0x00000140,
40390x00004514,0x00050084,0x00000006,0x000044da,
40400x000000f3,0x000061bc,0x00050080,0x00000006,
40410x000044db,0x00004454,0x000044da,0x000300f7,
40420x00004522,0x00000000,0x000400fa,0x00004481,
40430x0000451d,0x00004521,0x000200f8,0x00004521,
40440x000200f9,0x00004522,0x000200f8,0x0000451d,
40450x00050082,0x00000006,0x00004520,0x0000430b,
40460x0000014a,0x000200f9,0x00004522,0x000200f8,
40470x00004522,0x000700f5,0x00000006,0x000061bd,
40480x00004520,0x0000451d,0x00000140,0x00004521,
40490x00050084,0x00000006,0x000044d4,0x000000f3,
40500x000061bd,0x00050080,0x00000006,0x000044d5,
40510x000044db,0x000044d4,0x000300f7,0x0000452f,
40520x00000000,0x000400fa,0x00004481,0x0000452a,
40530x0000452e,0x000200f8,0x0000452e,0x000200f9,
40540x0000452f,0x000200f8,0x0000452a,0x00050082,
40550x00000006,0x0000452d,0x0000430b,0x0000014a,
40560x000200f9,0x0000452f,0x000200f8,0x0000452f,
40570x000700f5,0x00000006,0x000061be,0x0000452d,
40580x0000452a,0x00000140,0x0000452e,0x00050084,
40590x00000006,0x000044ce,0x000000f3,0x000061be,
40600x00050080,0x00000006,0x000044cf,0x000044d5,
40610x000044ce,0x000300f7,0x0000453c,0x00000000,
40620x000400fa,0x00004481,0x00004537,0x0000453b,
40630x000200f8,0x0000453b,0x000200f9,0x0000453c,
40640x000200f8,0x00004537,0x00050082,0x00000006,
40650x0000453a,0x0000430b,0x0000014a,0x000200f9,
40660x0000453c,0x000200f8,0x0000453c,0x000700f5,
40670x00000006,0x000061bf,0x0000453a,0x00004537,
40680x00000140,0x0000453b,0x00050084,0x00000006,
40690x000044c8,0x000000f3,0x000061bf,0x00050080,
40700x00000006,0x000044c9,0x000044cf,0x000044c8,
40710x00050080,0x00000006,0x0000432a,0x000044c9,
40720x0000431f,0x00050095,0x00000145,0x00004556,
40730x000044b9,0x0000432a,0x00050051,0x00000006,
40740x00004557,0x00004556,0x00000001,0x00050051,
40750x00000006,0x00004558,0x00004556,0x00000000,
40760x00050080,0x00000006,0x0000455d,0x000044c0,
40770x00004557,0x00050050,0x00000007,0x0000455e,
40780x00004558,0x0000455d,0x0004007c,0x00000014,
40790x0000454e,0x0000455e,0x00060041,0x00000174,
40800x00004545,0x0000454e,0x00000173,0x00000173,
40810x0006003d,0x00000006,0x00004546,0x00004545,
40820x00000002,0x00000004,0x000500ae,0x0000002f,
40830x00004331,0x00004546,0x00004452,0x000300f7,
40840x00004333,0x00000000,0x000400fa,0x00004331,
40850x00004332,0x00004333,0x000200f8,0x00004332,
40860x000200f9,0x000043f7,0x000200f8,0x00004333,
40870x00050080,0x00000006,0x00004337,0x00004454,
40880x0000431f,0x00050095,0x00000145,0x000045a5,
40890x000044b9,0x00004337,0x00050051,0x00000006,
40900x000045a6,0x000045a5,0x00000001,0x00050051,
40910x00000006,0x000045a7,0x000045a5,0x00000000,
40920x00050080,0x00000006,0x000045ac,0x000044c0,
40930x000045a6,0x00050050,0x00000007,0x000045ad,
40940x000045a7,0x000045ac,0x0004007c,0x00000014,
40950x0000459d,0x000045ad,0x00060041,0x00000174,
40960x00004594,0x0000459d,0x00000173,0x00000173,
40970x0006003d,0x00000006,0x00004595,0x00004594,
40980x00000002,0x00000004,0x000300f7,0x000045ed,
40990x00000000,0x000400fa,0x00004481,0x000045e8,
41000x000045ec,0x000200f8,0x000045ec,0x000200f9,
41010x000045ed,0x000200f8,0x000045e8,0x00050082,
41020x00000006,0x000045eb,0x0000430b,0x0000014a,
41030x000200f9,0x000045ed,0x000200f8,0x000045ed,
41040x000700f5,0x00000006,0x000061c0,0x000045eb,
41050x000045e8,0x00000140,0x000045ec,0x00050084,
41060x00000006,0x000045b2,0x000000f3,0x000061c0,
41070x00050080,0x00000006,0x000045b3,0x00004454,
41080x000045b2,0x00050080,0x00000006,0x0000433e,
41090x000045b3,0x0000431f,0x00050095,0x00000145,
41100x00004607,0x000044b9,0x0000433e,0x00050051,
41110x00000006,0x00004608,0x00004607,0x00000001,
41120x00050051,0x00000006,0x00004609,0x00004607,
41130x00000000,0x00050080,0x00000006,0x0000460e,
41140x000044c0,0x00004608,0x00050050,0x00000007,
41150x0000460f,0x00004609,0x0000460e,0x0004007c,
41160x00000014,0x000045ff,0x0000460f,0x00060041,
41170x00000174,0x000045f6,0x000045ff,0x00000173,
41180x00000173,0x0006003d,0x00000006,0x000045f7,
41190x000045f6,0x00000002,0x00000004,0x00050050,
41200x00001072,0x00004342,0x00004595,0x000045f7,
41210x0003003e,0x000042dc,0x00004342,0x000200f9,
41220x00004343,0x000200f8,0x00004343,0x000700f5,
41230x00000006,0x000061c1,0x00000140,0x000045ed,
41240x0000437b,0x00004379,0x000700f5,0x00000006,
41250x000061ea,0x00000140,0x000045ed,0x000061e8,
41260x00004379,0x000500b0,0x0000002f,0x00004346,
41270x000061c1,0x00000288,0x000400f6,0x0000437c,
41280x00004379,0x00000000,0x000400fa,0x00004346,
41290x00004347,0x0000437c,0x000200f8,0x00004347,
41300x00050041,0x00000009,0x00004349,0x000042dc,
41310x000061c1,0x0004003d,0x00000006,0x0000434a,
41320x00004349,0x00050050,0x00001072,0x0000434c,
41330x0000434a,0x0000434a,0x0003003e,0x000042e3,
41340x0000434c,0x000500c7,0x00000006,0x0000434e,
41350x0000434a,0x00000249,0x000500aa,0x0000002f,
41360x0000434f,0x0000434e,0x00000140,0x000300f7,
41370x00004361,0x00000000,0x000400fa,0x0000434f,
41380x00004350,0x00004361,0x000200f8,0x00004350,
41390x00050084,0x00000006,0x00004353,0x000000f3,
41400x0000434a,0x00050080,0x00000006,0x00004354,
41410x00004454,0x00004353,0x00050095,0x00000145,
41420x00004656,0x000044b9,0x00004354,0x00050051,
41430x00000006,0x00004657,0x00004656,0x00000001,
41440x00050051,0x00000006,0x00004658,0x00004656,
41450x00000000,0x00050080,0x00000006,0x0000465d,
41460x000044c0,0x00004657,0x00050050,0x00000007,
41470x0000465e,0x00004658,0x0000465d,0x0004007c,
41480x00000014,0x0000464e,0x0000465e,0x00060041,
41490x00000174,0x00004645,0x0000464e,0x00000173,
41500x00000173,0x0006003d,0x00000006,0x00004646,
41510x00004645,0x00000002,0x00000004,0x00050041,
41520x00000009,0x00004358,0x000042e3,0x00000173,
41530x0003003e,0x00004358,0x00004646,0x000300f7,
41540x0000469e,0x00000000,0x000400fa,0x00004481,
41550x00004699,0x0000469d,0x000200f8,0x0000469d,
41560x000200f9,0x0000469e,0x000200f8,0x00004699,
41570x00050082,0x00000006,0x0000469c,0x0000430b,
41580x0000014a,0x000200f9,0x0000469e,0x000200f8,
41590x0000469e,0x000700f5,0x00000006,0x000061e1,
41600x0000469c,0x00004699,0x00000140,0x0000469d,
41610x00050084,0x00000006,0x00004663,0x000000f3,
41620x000061e1,0x00050080,0x00000006,0x00004664,
41630x00004454,0x00004663,0x00050080,0x00000006,
41640x0000435c,0x00004664,0x00004353,0x00050095,
41650x00000145,0x000046b8,0x000044b9,0x0000435c,
41660x00050051,0x00000006,0x000046b9,0x000046b8,
41670x00000001,0x00050051,0x00000006,0x000046ba,
41680x000046b8,0x00000000,0x00050080,0x00000006,
41690x000046bf,0x000044c0,0x000046b9,0x00050050,
41700x00000007,0x000046c0,0x000046ba,0x000046bf,
41710x0004007c,0x00000014,0x000046b0,0x000046c0,
41720x00060041,0x00000174,0x000046a7,0x000046b0,
41730x00000173,0x00000173,0x0006003d,0x00000006,
41740x000046a8,0x000046a7,0x00000002,0x00000004,
41750x00050041,0x00000009,0x00004360,0x000042e3,
41760x0000026c,0x0003003e,0x00004360,0x000046a8,
41770x000200f9,0x00004361,0x000200f8,0x00004361,
41780x000600a9,0x00000006,0x0000654c,0x0000434f,
41790x00000288,0x0000014a,0x000200f9,0x00004362,
41800x000200f8,0x00004362,0x000700f5,0x00000006,
41810x000061e8,0x000061ea,0x00004361,0x0000436f,
41820x00004375,0x000700f5,0x00000006,0x000061e2,
41830x00000140,0x00004361,0x00004377,0x00004375,
41840x000500b0,0x0000002f,0x00004366,0x000061e2,
41850x0000654c,0x000400f6,0x00004378,0x00004375,
41860x00000000,0x000400fa,0x00004366,0x00004367,
41870x00004378,0x000200f8,0x00004367,0x00050041,
41880x00000009,0x0000436a,0x000042e3,0x000061e2,
41890x0004003d,0x00000006,0x0000436b,0x0000436a,
41900x000500c7,0x00000006,0x000046c7,0x0000436b,
41910x00000249,0x000500ab,0x0000002f,0x000046c8,
41920x000046c7,0x00000140,0x000300f7,0x000046d3,
41930x00000000,0x000400fa,0x000046c8,0x000046c9,
41940x000046d2,0x000200f8,0x000046d2,0x000200f9,
41950x000046d3,0x000200f8,0x000046c9,0x00050084,
41960x00000006,0x000046d9,0x000000f3,0x0000446b,
41970x00050080,0x00000006,0x000046da,0x000001cc,
41980x000046d9,0x000500c7,0x00000006,0x000046cc,
41990x0000436b,0x0000025e,0x00050084,0x00000006,
42000x000046cd,0x000000f3,0x000046cc,0x00050080,
42010x00000006,0x000046ce,0x000046da,0x000046cd,
42020x00050095,0x00000145,0x000046f3,0x000044b9,
42030x000046ce,0x00050051,0x00000006,0x000046f4,
42040x000046f3,0x00000001,0x00050051,0x00000006,
42050x000046f5,0x000046f3,0x00000000,0x00050080,
42060x00000006,0x000046fa,0x000044c0,0x000046f4,
42070x00050050,0x00000007,0x000046fb,0x000046f5,
42080x000046fa,0x0004007c,0x00000014,0x000046eb,
42090x000046fb,0x00060041,0x00000174,0x000046e2,
42100x000046eb,0x00000173,0x00000173,0x0006003d,
42110x00000006,0x000046e3,0x000046e2,0x00000002,
42120x00000004,0x000200f9,0x000046d3,0x000200f8,
42130x000046d3,0x000700f5,0x00000006,0x000061ed,
42140x000046e3,0x000046c9,0x000003bf,0x000046d2,
42150x00050041,0x00000009,0x0000436d,0x000042d2,
42160x000061e8,0x0003003e,0x0000436d,0x000061ed,
42170x00050080,0x00000006,0x0000436f,0x000061e8,
42180x0000026c,0x0004003d,0x00000006,0x00004372,
42190x0000436a,0x000300f7,0x00004716,0x00000000,
42200x000300fb,0x00000140,0x00004705,0x000200f8,
42210x00004705,0x000500c7,0x00000006,0x00004707,
42220x00004372,0x00000249,0x000500ab,0x0000002f,
42230x00004708,0x00004707,0x00000140,0x000300f7,
42240x0000470d,0x00000000,0x000400fa,0x00004708,
42250x00004709,0x0000470d,0x000200f8,0x00004709,
42260x000300f7,0x0000472a,0x00000000,0x000400fa,
42270x00004708,0x00004720,0x00004729,0x000200f8,
42280x00004729,0x000200f9,0x0000472a,0x000200f8,
42290x00004720,0x00050084,0x00000006,0x00004730,
42300x000000f3,0x0000446b,0x00050080,0x00000006,
42310x00004731,0x000001cc,0x00004730,0x000500c7,
42320x00000006,0x00004723,0x00004372,0x0000025e,
42330x00050084,0x00000006,0x00004724,0x000000f3,
42340x00004723,0x00050080,0x00000006,0x00004725,
42350x00004731,0x00004724,0x00050095,0x00000145,
42360x0000474a,0x000044b9,0x00004725,0x00050051,
42370x00000006,0x0000474b,0x0000474a,0x00000001,
42380x00050051,0x00000006,0x0000474c,0x0000474a,
42390x00000000,0x00050080,0x00000006,0x00004751,
42400x000044c0,0x0000474b,0x00050050,0x00000007,
42410x00004752,0x0000474c,0x00004751,0x0004007c,
42420x00000014,0x00004742,0x00004752,0x00060041,
42430x00000174,0x00004739,0x00004742,0x00000173,
42440x00000173,0x0006003d,0x00000006,0x0000473a,
42450x00004739,0x00000002,0x00000004,0x000200f9,
42460x0000472a,0x000200f8,0x0000472a,0x000700f5,
42470x00000006,0x000061f4,0x0000473a,0x00004720,
42480x000003bf,0x00004729,0x00050041,0x000001c3,
42490x00004755,0x000001c1,0x00000352,0x0004003d,
42500x00000006,0x00004756,0x00004755,0x000500c7,
42510x00000006,0x00004768,0x000013a9,0x0000014a,
42520x000500ab,0x0000002f,0x00004769,0x00004768,
42530x00000140,0x000600a9,0x00000006,0x00004763,
42540x00004769,0x0000034a,0x000001cc,0x00050084,
42550x00000006,0x00004759,0x000061f4,0x00004763,
42560x00050080,0x00000006,0x0000475a,0x00004756,
42570x00004759,0x000500c2,0x00000006,0x0000475b,
42580x0000475a,0x00000359,0x000500c4,0x00000006,
42590x0000475c,0x0000475b,0x00000325,0x000600a9,
42600x00000006,0x0000475e,0x00004769,0x0000035d,
42610x00000140,0x000500c5,0x00000006,0x0000475f,
42620x0000475c,0x0000475e,0x000200f9,0x00004716,
42630x000200f8,0x0000470d,0x000300f7,0x000047c1,
42640x00000000,0x000400fa,0x00004481,0x000047bc,
42650x000047c0,0x000200f8,0x000047c0,0x000200f9,
42660x000047c1,0x000200f8,0x000047bc,0x00050082,
42670x00000006,0x000047bf,0x0000430b,0x0000014a,
42680x000200f9,0x000047c1,0x000200f8,0x000047c1,
42690x000700f5,0x00000006,0x000061f0,0x000047bf,
42700x000047bc,0x00000140,0x000047c0,0x00050084,
42710x00000006,0x00004786,0x000000f3,0x000061f0,
42720x00050080,0x00000006,0x00004787,0x00004454,
42730x00004786,0x000300f7,0x000047ce,0x00000000,
42740x000400fa,0x00004481,0x000047c9,0x000047cd,
42750x000200f8,0x000047cd,0x000200f9,0x000047ce,
42760x000200f8,0x000047c9,0x00050082,0x00000006,
42770x000047cc,0x0000430b,0x0000014a,0x000200f9,
42780x000047ce,0x000200f8,0x000047ce,0x000700f5,
42790x00000006,0x000061f1,0x000047cc,0x000047c9,
42800x00000140,0x000047cd,0x00050084,0x00000006,
42810x00004780,0x000000f3,0x000061f1,0x00050080,
42820x00000006,0x00004781,0x00004787,0x00004780,
42830x000300f7,0x000047db,0x00000000,0x000400fa,
42840x00004481,0x000047d6,0x000047da,0x000200f8,
42850x000047da,0x000200f9,0x000047db,0x000200f8,
42860x000047d6,0x00050082,0x00000006,0x000047d9,
42870x0000430b,0x0000014a,0x000200f9,0x000047db,
42880x000200f8,0x000047db,0x000700f5,0x00000006,
42890x000061f2,0x000047d9,0x000047d6,0x00000140,
42900x000047da,0x00050084,0x00000006,0x0000477a,
42910x000000f3,0x000061f2,0x00050080,0x00000006,
42920x0000477b,0x00004781,0x0000477a,0x000300f7,
42930x000047e8,0x00000000,0x000400fa,0x00004481,
42940x000047e3,0x000047e7,0x000200f8,0x000047e7,
42950x000200f9,0x000047e8,0x000200f8,0x000047e3,
42960x00050082,0x00000006,0x000047e6,0x0000430b,
42970x0000014a,0x000200f9,0x000047e8,0x000200f8,
42980x000047e8,0x000700f5,0x00000006,0x000061f3,
42990x000047e6,0x000047e3,0x00000140,0x000047e7,
43000x00050084,0x00000006,0x00004774,0x000000f3,
43010x000061f3,0x00050080,0x00000006,0x00004775,
43020x0000477b,0x00004774,0x00050084,0x00000006,
43030x00004710,0x000000f3,0x00004372,0x00050080,
43040x00000006,0x00004711,0x00004775,0x00004710,
43050x00050095,0x00000145,0x00004802,0x000044b9,
43060x00004711,0x00050051,0x00000006,0x00004803,
43070x00004802,0x00000001,0x00050051,0x00000006,
43080x00004804,0x00004802,0x00000000,0x00050080,
43090x00000006,0x00004809,0x000044c0,0x00004803,
43100x00050050,0x00000007,0x0000480a,0x00004804,
43110x00004809,0x0004007c,0x00000014,0x000047fa,
43120x0000480a,0x00060041,0x00000174,0x000047f1,
43130x000047fa,0x00000173,0x00000173,0x0006003d,
43140x00000006,0x000047f2,0x000047f1,0x00000002,
43150x00000004,0x00050041,0x000001c3,0x0000480d,
43160x000001c1,0x00000362,0x0004003d,0x00000006,
43170x0000480e,0x0000480d,0x000500c7,0x00000006,
43180x00004820,0x000013a9,0x00000288,0x000500ab,
43190x0000002f,0x00004821,0x00004820,0x00000140,
43200x000600a9,0x00000006,0x0000481b,0x00004821,
43210x000001cc,0x0000034a,0x00050084,0x00000006,
43220x00004811,0x000047f2,0x0000481b,0x00050080,
43230x00000006,0x00004812,0x0000480e,0x00004811,
43240x000500c2,0x00000006,0x00004813,0x00004812,
43250x00000359,0x000500c4,0x00000006,0x00004814,
43260x00004813,0x00000325,0x000600a9,0x00000006,
43270x00004816,0x00004821,0x000000f3,0x0000036c,
43280x000500c5,0x00000006,0x00004817,0x00004814,
43290x00004816,0x000200f9,0x00004716,0x000200f8,
43300x00004716,0x000700f5,0x00000006,0x000061f5,
43310x0000475f,0x0000472a,0x00004817,0x000047e8,
43320x00050041,0x00000009,0x00004374,0x000042d1,
43330x000061e8,0x0003003e,0x00004374,0x000061f5,
43340x000200f9,0x00004375,0x000200f8,0x00004375,
43350x00050080,0x00000006,0x00004377,0x000061e2,
43360x0000026c,0x000200f9,0x00004362,0x000200f8,
43370x00004378,0x000200f9,0x00004379,0x000200f8,
43380x00004379,0x00050080,0x00000006,0x0000437b,
43390x000061c1,0x0000026c,0x000200f9,0x00004343,
43400x000200f8,0x0000437c,0x000500c7,0x00000006,
43410x0000482c,0x000013a9,0x0000014a,0x000500aa,
43420x0000002f,0x0000437e,0x0000482c,0x00000140,
43430x000300f7,0x00004384,0x00000000,0x000400fa,
43440x0000437e,0x0000437f,0x00004384,0x000200f8,
43450x0000437f,0x000500c7,0x00000006,0x00004382,
43460x000013a9,0x000000f3,0x000500ab,0x0000002f,
43470x00004383,0x00004382,0x00000140,0x000200f9,
43480x00004384,0x000200f8,0x00004384,0x000700f5,
43490x0000002f,0x00004385,0x0000437e,0x0000437c,
43500x00004383,0x0000437f,0x000300f7,0x0000438b,
43510x00000000,0x000400fa,0x00004385,0x00004386,
43520x0000438b,0x000200f8,0x00004386,0x0004003d,
43530x000000f4,0x00004387,0x000042d2,0x0003003e,
43540x000042ec,0x00004387,0x0004003d,0x000000f4,
43550x00004388,0x000042d1,0x0003003e,0x000042ed,
43560x00004388,0x000200f9,0x00004863,0x000200f8,
43570x00004863,0x000700f5,0x00000006,0x000061c2,
43580x00000140,0x00004386,0x000048a9,0x000048a7,
43590x000500b0,0x0000002f,0x00004866,0x000061c2,
43600x000000f3,0x000400f6,0x000048aa,0x000048a7,
43610x00000000,0x000400fa,0x00004866,0x00004867,
43620x000048aa,0x000200f8,0x00004867,0x00050041,
43630x0000009d,0x00004869,0x0000482f,0x000061c2,
43640x0003003e,0x00004869,0x0000037d,0x00050041,
43650x0000009d,0x0000486b,0x00004830,0x000061c2,
43660x0003003e,0x0000486b,0x0000037d,0x00050041,
43670x00000009,0x0000486d,0x00004831,0x000061c2,
43680x0003003e,0x0000486d,0x00000140,0x000200f9,
43690x0000486e,0x000200f8,0x0000486e,0x000700f5,
43700x00000006,0x000061da,0x00000140,0x00004867,
43710x00004878,0x00004872,0x000500b0,0x0000002f,
43720x00004871,0x000061da,0x000004d7,0x000400f6,
43730x00004879,0x00004872,0x00000000,0x000400fa,
43740x00004871,0x00004872,0x00004879,0x000200f8,
43750x00004872,0x00060041,0x000000ec,0x00004875,
43760x00004833,0x000061c2,0x000061da,0x0003003e,
43770x00004875,0x00000c74,0x00050080,0x00000006,
43780x00004878,0x000061da,0x0000026c,0x000200f9,
43790x0000486e,0x000200f8,0x00004879,0x00050041,
43800x00000009,0x0000487b,0x000042ec,0x000061c2,
43810x0004003d,0x00000006,0x0000487c,0x0000487b,
43820x000500aa,0x0000002f,0x0000487d,0x0000487c,
43830x000003bf,0x000300f7,0x0000487f,0x00000000,
43840x000400fa,0x0000487d,0x0000487e,0x0000487f,
43850x000200f8,0x0000487e,0x000200f9,0x000048a7,
43860x000200f8,0x0000487f,0x0004003d,0x00000006,
43870x00004883,0x0000487b,0x00050041,0x000001c3,
43880x00004983,0x000001c1,0x00000352,0x0004003d,
43890x00000006,0x00004984,0x00004983,0x00050084,
43900x00000006,0x00004986,0x000001cc,0x00004883,
43910x00050080,0x00000006,0x00004987,0x00004984,
43920x00004986,0x00050080,0x00000006,0x00004885,
43930x00004987,0x00000588,0x00050041,0x0000026e,
43940x00004886,0x000001c1,0x00000173,0x0004003d,
43950x00000007,0x00004887,0x00004886,0x00050051,
43960x00000006,0x0000499e,0x00004887,0x00000000,
43970x00050095,0x00000145,0x000049a0,0x0000499e,
43980x00004885,0x00050051,0x00000006,0x000049a1,
43990x000049a0,0x00000001,0x00050051,0x00000006,
44000x000049a2,0x000049a0,0x00000000,0x00050051,
44010x00000006,0x000049a5,0x00004887,0x00000001,
44020x00050080,0x00000006,0x000049a7,0x000049a5,
44030x000049a1,0x00050050,0x00000007,0x000049a8,
44040x000049a2,0x000049a7,0x0004007c,0x00000014,
44050x00004998,0x000049a8,0x00060041,0x00000174,
44060x0000498f,0x00004998,0x00000173,0x00000173,
44070x0006003d,0x00000006,0x00004990,0x0000498f,
44080x00000002,0x00000004,0x0003003e,0x0000486d,
44090x00004990,0x000200f9,0x0000488a,0x000200f8,
44100x0000488a,0x000700f5,0x00000006,0x000061dc,
44110x00000140,0x0000487f,0x00004899,0x0000488e,
44120x000500b0,0x0000002f,0x0000488d,0x000061dc,
44130x000004d7,0x000400f6,0x0000489a,0x0000488e,
44140x00000000,0x000400fa,0x0000488d,0x0000488e,
44150x0000489a,0x000200f8,0x0000488e,0x0004003d,
44160x00000006,0x00004893,0x0000487b,0x00050084,
44170x00000006,0x000049cc,0x000001cc,0x00004893,
44180x00050080,0x00000006,0x000049cd,0x00004984,
44190x000049cc,0x00050084,0x00000006,0x000049b6,
44200x000001dc,0x000061dc,0x00050080,0x00000006,
44210x000049b7,0x000049cd,0x000049b6,0x00050095,
44220x00000145,0x000049e6,0x0000499e,0x000049b7,
44230x00050051,0x00000006,0x000049e7,0x000049e6,
44240x00000001,0x00050051,0x00000006,0x000049e8,
44250x000049e6,0x00000000,0x00050080,0x00000006,
44260x000049ed,0x000049a5,0x000049e7,0x00050050,
44270x00000007,0x000049ee,0x000049e8,0x000049ed,
44280x0004007c,0x00000014,0x000049de,0x000049ee,
44290x00060041,0x00000174,0x000049d5,0x000049de,
44300x00000173,0x00000173,0x0006003d,0x00000006,
44310x000049d6,0x000049d5,0x00000002,0x00000004,
44320x00050080,0x00000006,0x000049bd,0x000049b7,
44330x000000f3,0x00050095,0x00000145,0x00004a07,
44340x0000499e,0x000049bd,0x00050051,0x00000006,
44350x00004a08,0x00004a07,0x00000001,0x00050051,
44360x00000006,0x00004a09,0x00004a07,0x00000000,
44370x00050080,0x00000006,0x00004a0e,0x000049a5,
44380x00004a08,0x00050050,0x00000007,0x00004a0f,
44390x00004a09,0x00004a0e,0x0004007c,0x00000014,
44400x000049ff,0x00004a0f,0x00060041,0x00000174,
44410x000049f6,0x000049ff,0x00000173,0x00000173,
44420x0006003d,0x00000006,0x000049f7,0x000049f6,
40600x00000002,0x00000004,0x00050080,0x00000006, 44430x00000002,0x00000004,0x00050080,0x00000006,
40610x000046e4,0x000046d9,0x000001cd,0x00050095, 44440x000049c2,0x000049b7,0x000001d5,0x00050095,
40620x0000013d,0x0000474a,0x000046c0,0x000046e4, 44450x00000145,0x00004a28,0x0000499e,0x000049c2,
40630x00050051,0x00000006,0x0000474b,0x0000474a, 44460x00050051,0x00000006,0x00004a29,0x00004a28,
40640x00000001,0x00050051,0x00000006,0x0000474c, 44470x00000001,0x00050051,0x00000006,0x00004a2a,
40650x0000474a,0x00000000,0x00050080,0x00000006, 44480x00004a28,0x00000000,0x00050080,0x00000006,
40660x00004751,0x000046c7,0x0000474b,0x00050050, 44490x00004a2f,0x000049a5,0x00004a29,0x00050050,
40670x00000007,0x00004752,0x0000474c,0x00004751, 44500x00000007,0x00004a30,0x00004a2a,0x00004a2f,
40680x0004007c,0x00000014,0x00004742,0x00004752, 44510x0004007c,0x00000014,0x00004a20,0x00004a30,
40690x00060041,0x0000016c,0x00004739,0x00004742, 44520x00060041,0x00000174,0x00004a17,0x00004a20,
40700x0000016b,0x0000016b,0x0006003d,0x00000006, 44530x00000173,0x00000173,0x0006003d,0x00000006,
40710x0000473a,0x00004739,0x00000002,0x00000004, 44540x00004a18,0x00004a17,0x00000002,0x00000004,
40720x00060050,0x000000df,0x000046e8,0x000046f8, 44550x00060050,0x000000e6,0x000049c6,0x000049d6,
40730x00004719,0x0000473a,0x00060041,0x000000e5, 44560x000049f7,0x00004a18,0x00060041,0x000000ec,
40740x000045b8,0x00004555,0x00005d9c,0x00005db6, 44570x00004896,0x00004833,0x000061c2,0x000061dc,
40750x0003003e,0x000045b8,0x000046e8,0x00050080, 44580x0003003e,0x00004896,0x000049c6,0x00050080,
40760x00000006,0x000045bb,0x00005db6,0x00000264, 44590x00000006,0x00004899,0x000061dc,0x0000026c,
40770x000200f9,0x000045ac,0x000200f8,0x000045bc, 44600x000200f9,0x0000488a,0x000200f8,0x0000489a,
40780x0004003d,0x00000006,0x000045bf,0x0000459d, 44610x0004003d,0x00000006,0x0000489d,0x0000487b,
40790x00050084,0x00000006,0x00004763,0x000001ef, 44620x00050084,0x00000006,0x00004a41,0x000001f7,
40800x000045bf,0x00050080,0x00000006,0x00004764, 44630x0000489d,0x00050080,0x00000006,0x00004a42,
40810x00004183,0x00004763,0x00050095,0x0000013d, 44640x00004461,0x00004a41,0x00050095,0x00000145,
40820x000047c2,0x000041db,0x00004764,0x00050051, 44650x00004aa0,0x000044b9,0x00004a42,0x00050051,
40830x00000006,0x000047c3,0x000047c2,0x00000001, 44660x00000006,0x00004aa1,0x00004aa0,0x00000001,
40840x00050051,0x00000006,0x000047c4,0x000047c2, 44670x00050051,0x00000006,0x00004aa2,0x00004aa0,
40850x00000000,0x00050080,0x00000006,0x000047c9, 44680x00000000,0x00050080,0x00000006,0x00004aa7,
40860x000041e2,0x000047c3,0x00050050,0x00000007, 44690x000044c0,0x00004aa1,0x00050050,0x00000007,
40870x000047ca,0x000047c4,0x000047c9,0x0004007c, 44700x00004aa8,0x00004aa2,0x00004aa7,0x0004007c,
40880x00000014,0x000047ba,0x000047ca,0x00060041, 44710x00000014,0x00004a98,0x00004aa8,0x00060041,
40890x0000016c,0x000047b1,0x000047ba,0x0000016b, 44720x00000174,0x00004a8f,0x00004a98,0x00000173,
40900x0000016b,0x0006003d,0x00000006,0x000047b2, 44730x00000173,0x0006003d,0x00000006,0x00004a90,
40910x000047b1,0x00000002,0x00000004,0x0004007c, 44740x00004a8f,0x00000002,0x00000004,0x0004007c,
40920x00000027,0x00004769,0x000047b2,0x00050080, 44750x00000027,0x00004a47,0x00004a90,0x00050080,
40930x00000006,0x0000476b,0x00004764,0x000000ec, 44760x00000006,0x00004a49,0x00004a42,0x000000f3,
40940x00050095,0x0000013d,0x000047e3,0x000041db, 44770x00050095,0x00000145,0x00004ac1,0x000044b9,
40950x0000476b,0x00050051,0x00000006,0x000047e4, 44780x00004a49,0x00050051,0x00000006,0x00004ac2,
40960x000047e3,0x00000001,0x00050051,0x00000006, 44790x00004ac1,0x00000001,0x00050051,0x00000006,
40970x000047e5,0x000047e3,0x00000000,0x00050080, 44800x00004ac3,0x00004ac1,0x00000000,0x00050080,
40980x00000006,0x000047ea,0x000041e2,0x000047e4, 44810x00000006,0x00004ac8,0x000044c0,0x00004ac2,
40990x00050050,0x00000007,0x000047eb,0x000047e5, 44820x00050050,0x00000007,0x00004ac9,0x00004ac3,
41000x000047ea,0x0004007c,0x00000014,0x000047db, 44830x00004ac8,0x0004007c,0x00000014,0x00004ab9,
41010x000047eb,0x00060041,0x0000016c,0x000047d2, 44840x00004ac9,0x00060041,0x00000174,0x00004ab0,
41020x000047db,0x0000016b,0x0000016b,0x0006003d, 44850x00004ab9,0x00000173,0x00000173,0x0006003d,
41030x00000006,0x000047d3,0x000047d2,0x00000002, 44860x00000006,0x00004ab1,0x00004ab0,0x00000002,
41040x00000004,0x0004007c,0x00000027,0x0000476f, 44870x00000004,0x0004007c,0x00000027,0x00004a4d,
41050x000047d3,0x00050080,0x00000006,0x00004771, 44880x00004ab1,0x00050080,0x00000006,0x00004a4f,
41060x00004764,0x000001cd,0x00050095,0x0000013d, 44890x00004a42,0x000001d5,0x00050095,0x00000145,
41070x00004804,0x000041db,0x00004771,0x00050051, 44900x00004ae2,0x000044b9,0x00004a4f,0x00050051,
41080x00000006,0x00004805,0x00004804,0x00000001, 44910x00000006,0x00004ae3,0x00004ae2,0x00000001,
41090x00050051,0x00000006,0x00004806,0x00004804, 44920x00050051,0x00000006,0x00004ae4,0x00004ae2,
41100x00000000,0x00050080,0x00000006,0x0000480b, 44930x00000000,0x00050080,0x00000006,0x00004ae9,
41110x000041e2,0x00004805,0x00050050,0x00000007, 44940x000044c0,0x00004ae3,0x00050050,0x00000007,
41120x0000480c,0x00004806,0x0000480b,0x0004007c, 44950x00004aea,0x00004ae4,0x00004ae9,0x0004007c,
41130x00000014,0x000047fc,0x0000480c,0x00060041, 44960x00000014,0x00004ada,0x00004aea,0x00060041,
41140x0000016c,0x000047f3,0x000047fc,0x0000016b, 44970x00000174,0x00004ad1,0x00004ada,0x00000173,
41150x0000016b,0x0006003d,0x00000006,0x000047f4, 44980x00000173,0x0006003d,0x00000006,0x00004ad2,
41160x000047f3,0x00000002,0x00000004,0x0004007c, 44990x00004ad1,0x00000002,0x00000004,0x0004007c,
41170x00000027,0x00004775,0x000047f4,0x00050080, 45000x00000027,0x00004a53,0x00004ad2,0x00050080,
41180x00000006,0x00004778,0x00004764,0x000001d4, 45010x00000006,0x00004a56,0x00004a42,0x000001dc,
41190x00050095,0x0000013d,0x00004825,0x000041db, 45020x00050095,0x00000145,0x00004b03,0x000044b9,
41200x00004778,0x00050051,0x00000006,0x00004826, 45030x00004a56,0x00050051,0x00000006,0x00004b04,
41210x00004825,0x00000001,0x00050051,0x00000006, 45040x00004b03,0x00000001,0x00050051,0x00000006,
41220x00004827,0x00004825,0x00000000,0x00050080, 45050x00004b05,0x00004b03,0x00000000,0x00050080,
41230x00000006,0x0000482c,0x000041e2,0x00004826, 45060x00000006,0x00004b0a,0x000044c0,0x00004b04,
41240x00050050,0x00000007,0x0000482d,0x00004827, 45070x00050050,0x00000007,0x00004b0b,0x00004b05,
41250x0000482c,0x0004007c,0x00000014,0x0000481d, 45080x00004b0a,0x0004007c,0x00000014,0x00004afb,
41260x0000482d,0x00060041,0x0000016c,0x00004814, 45090x00004b0b,0x00060041,0x00000174,0x00004af2,
41270x0000481d,0x0000016b,0x0000016b,0x0006003d, 45100x00004afb,0x00000173,0x00000173,0x0006003d,
41280x00000006,0x00004815,0x00004814,0x00000002, 45110x00000006,0x00004af3,0x00004af2,0x00000002,
41290x00000004,0x0004007c,0x00000027,0x0000477c, 45120x00000004,0x0004007c,0x00000027,0x00004a5a,
41300x00004815,0x00050080,0x00000006,0x0000477e, 45130x00004af3,0x00050080,0x00000006,0x00004a5c,
41310x00004764,0x000001db,0x00050095,0x0000013d, 45140x00004a42,0x000001e3,0x00050095,0x00000145,
41320x00004846,0x000041db,0x0000477e,0x00050051, 45150x00004b24,0x000044b9,0x00004a5c,0x00050051,
41330x00000006,0x00004847,0x00004846,0x00000001, 45160x00000006,0x00004b25,0x00004b24,0x00000001,
41340x00050051,0x00000006,0x00004848,0x00004846, 45170x00050051,0x00000006,0x00004b26,0x00004b24,
41350x00000000,0x00050080,0x00000006,0x0000484d, 45180x00000000,0x00050080,0x00000006,0x00004b2b,
41360x000041e2,0x00004847,0x00050050,0x00000007, 45190x000044c0,0x00004b25,0x00050050,0x00000007,
41370x0000484e,0x00004848,0x0000484d,0x0004007c, 45200x00004b2c,0x00004b26,0x00004b2b,0x0004007c,
41380x00000014,0x0000483e,0x0000484e,0x00060041, 45210x00000014,0x00004b1c,0x00004b2c,0x00060041,
41390x0000016c,0x00004835,0x0000483e,0x0000016b, 45220x00000174,0x00004b13,0x00004b1c,0x00000173,
41400x0000016b,0x0006003d,0x00000006,0x00004836, 45230x00000173,0x0006003d,0x00000006,0x00004b14,
41410x00004835,0x00000002,0x00000004,0x0004007c, 45240x00004b13,0x00000002,0x00000004,0x0004007c,
41420x00000027,0x00004782,0x00004836,0x00050080, 45250x00000027,0x00004a60,0x00004b14,0x00050080,
41430x00000006,0x00004784,0x00004764,0x00000299, 45260x00000006,0x00004a62,0x00004a42,0x000002a1,
41440x00050095,0x0000013d,0x00004867,0x000041db, 45270x00050095,0x00000145,0x00004b45,0x000044b9,
41450x00004784,0x00050051,0x00000006,0x00004868, 45280x00004a62,0x00050051,0x00000006,0x00004b46,
41460x00004867,0x00000001,0x00050051,0x00000006, 45290x00004b45,0x00000001,0x00050051,0x00000006,
41470x00004869,0x00004867,0x00000000,0x00050080, 45300x00004b47,0x00004b45,0x00000000,0x00050080,
41480x00000006,0x0000486e,0x000041e2,0x00004868, 45310x00000006,0x00004b4c,0x000044c0,0x00004b46,
41490x00050050,0x00000007,0x0000486f,0x00004869, 45320x00050050,0x00000007,0x00004b4d,0x00004b47,
41500x0000486e,0x0004007c,0x00000014,0x0000485f, 45330x00004b4c,0x0004007c,0x00000014,0x00004b3d,
41510x0000486f,0x00060041,0x0000016c,0x00004856, 45340x00004b4d,0x00060041,0x00000174,0x00004b34,
41520x0000485f,0x0000016b,0x0000016b,0x0006003d, 45350x00004b3d,0x00000173,0x00000173,0x0006003d,
41530x00000006,0x00004857,0x00004856,0x00000002, 45360x00000006,0x00004b35,0x00004b34,0x00000002,
41540x00000004,0x0004007c,0x00000027,0x00004788, 45370x00000004,0x0004007c,0x00000027,0x00004a66,
41550x00004857,0x000500bc,0x0000002f,0x00004876, 45380x00004b35,0x000500bc,0x0000002f,0x00004b54,
41560x00004769,0x0000477c,0x000300f7,0x0000487d, 45390x00004a47,0x00004a5a,0x000300f7,0x00004b5b,
41570x00000000,0x000400fa,0x00004876,0x00004877, 45400x00000000,0x000400fa,0x00004b54,0x00004b55,
41580x0000487d,0x000200f8,0x00004877,0x000500bc, 45410x00004b5b,0x000200f8,0x00004b55,0x000500bc,
41590x0000002f,0x0000487c,0x0000476f,0x00004782, 45420x0000002f,0x00004b5a,0x00004a4d,0x00004a60,
41600x000200f9,0x0000487d,0x000200f8,0x0000487d, 45430x000200f9,0x00004b5b,0x000200f8,0x00004b5b,
41610x000700f5,0x0000002f,0x0000487e,0x00004876, 45440x000700f5,0x0000002f,0x00004b5c,0x00004b54,
41620x000045bc,0x0000487c,0x00004877,0x000300f7, 45450x0000489a,0x00004b5a,0x00004b55,0x000300f7,
41630x00004885,0x00000000,0x000400fa,0x0000487e, 45460x00004b63,0x00000000,0x000400fa,0x00004b5c,
41640x0000487f,0x00004885,0x000200f8,0x0000487f, 45470x00004b5d,0x00004b63,0x000200f8,0x00004b5d,
41650x000500bc,0x0000002f,0x00004884,0x00004775, 45480x000500bc,0x0000002f,0x00004b62,0x00004a53,
41660x00004788,0x000200f9,0x00004885,0x000200f8, 45490x00004a66,0x000200f9,0x00004b63,0x000200f8,
41670x00004885,0x000700f5,0x0000002f,0x00004886, 45500x00004b63,0x000700f5,0x0000002f,0x00004b64,
41680x0000487e,0x0000487d,0x00004884,0x0000487f, 45510x00004b5c,0x00004b5b,0x00004b62,0x00004b5d,
41690x0003003e,0x0000458b,0x00004886,0x000200f9, 45520x0003003e,0x00004869,0x00004b64,0x000200f9,
41700x000045c9,0x000200f8,0x000045c9,0x00050080, 45530x000048a7,0x000200f8,0x000048a7,0x00050080,
41710x00000006,0x000045cb,0x00005d9c,0x00000264, 45540x00000006,0x000048a9,0x000061c2,0x0000026c,
41720x000200f9,0x00004585,0x000200f8,0x000045cc, 45550x000200f9,0x00004863,0x000200f8,0x000048aa,
41730x000200f9,0x000045cd,0x000200f8,0x000045cd, 45560x000200f9,0x000048ab,0x000200f8,0x000048ab,
41740x000700f5,0x00000006,0x00005d9d,0x00000138, 45570x000700f5,0x00000006,0x000061c3,0x00000140,
41750x000045cc,0x000046a1,0x0000469f,0x000500b0, 45580x000048aa,0x0000497f,0x0000497d,0x000500b0,
41760x0000002f,0x000045d0,0x00005d9d,0x000000ec, 45590x0000002f,0x000048ae,0x000061c3,0x000000f3,
41770x000400f6,0x000046a2,0x0000469f,0x00000000, 45600x000400f6,0x00004980,0x0000497d,0x00000000,
41780x000400fa,0x000045d0,0x000045d1,0x000046a2, 45610x000400fa,0x000048ae,0x000048af,0x00004980,
41790x000200f8,0x000045d1,0x00050041,0x00000096, 45620x000200f8,0x000048af,0x00050041,0x0000009d,
41800x000045d3,0x00004552,0x00005d9d,0x0004003d, 45630x000048b1,0x00004830,0x000061c3,0x0004003d,
41810x0000002f,0x000045d4,0x000045d3,0x000400a8, 45640x0000002f,0x000048b2,0x000048b1,0x000400a8,
41820x0000002f,0x000045d5,0x000045d4,0x000300f7, 45650x0000002f,0x000048b3,0x000048b2,0x000300f7,
41830x000045db,0x00000000,0x000400fa,0x000045d5, 45660x000048b9,0x00000000,0x000400fa,0x000048b3,
41840x000045d6,0x000045db,0x000200f8,0x000045d6, 45670x000048b4,0x000048b9,0x000200f8,0x000048b4,
41850x00050041,0x00000096,0x000045d8,0x00004551, 45680x00050041,0x0000009d,0x000048b6,0x0000482f,
41860x00005d9d,0x0004003d,0x0000002f,0x000045d9, 45690x000061c3,0x0004003d,0x0000002f,0x000048b7,
41870x000045d8,0x000400a8,0x0000002f,0x000045da, 45700x000048b6,0x000400a8,0x0000002f,0x000048b8,
41880x000045d9,0x000200f9,0x000045db,0x000200f8, 45710x000048b7,0x000200f9,0x000048b9,0x000200f8,
41890x000045db,0x000700f5,0x0000002f,0x000045dc, 45720x000048b9,0x000700f5,0x0000002f,0x000048ba,
41900x000045d4,0x000045d1,0x000045da,0x000045d6, 45730x000048b2,0x000048af,0x000048b8,0x000048b4,
41910x000300f7,0x000045de,0x00000000,0x000400fa, 45740x000300f7,0x000048bc,0x00000000,0x000400fa,
41920x000045dc,0x000045dd,0x000045de,0x000200f8, 45750x000048ba,0x000048bb,0x000048bc,0x000200f8,
41930x000045dd,0x000200f9,0x0000469f,0x000200f8, 45760x000048bb,0x000200f9,0x0000497d,0x000200f8,
41940x000045de,0x0003003e,0x000045d3,0x000003e7, 45770x000048bc,0x0003003e,0x000048b1,0x00000444,
41950x00050080,0x00000006,0x000045e2,0x00005d9d, 45780x00050080,0x00000006,0x000048c0,0x000061c3,
41960x00000142,0x000200f9,0x000045e3,0x000200f8, 45790x0000014a,0x000200f9,0x000048c1,0x000200f8,
41970x000045e3,0x000700f5,0x00000006,0x00005d9f, 45800x000048c1,0x000700f5,0x00000006,0x000061c5,
41980x000045e2,0x000045de,0x0000469d,0x0000469b, 45810x000048c0,0x000048bc,0x0000497b,0x00004979,
41990x000500b0,0x0000002f,0x000045e6,0x00005d9f, 45820x000500b0,0x0000002f,0x000048c4,0x000061c5,
42000x000000ec,0x000400f6,0x0000469e,0x0000469b, 45830x000000f3,0x000400f6,0x0000497c,0x00004979,
42010x00000000,0x000400fa,0x000045e6,0x000045e7, 45840x00000000,0x000400fa,0x000048c4,0x000048c5,
42020x0000469e,0x000200f8,0x000045e7,0x00050041, 45850x0000497c,0x000200f8,0x000048c5,0x00050041,
42030x00000096,0x000045e9,0x00004552,0x00005d9f, 45860x0000009d,0x000048c7,0x00004830,0x000061c5,
42040x0004003d,0x0000002f,0x000045ea,0x000045e9, 45870x0004003d,0x0000002f,0x000048c8,0x000048c7,
42050x000400a8,0x0000002f,0x000045eb,0x000045ea, 45880x000400a8,0x0000002f,0x000048c9,0x000048c8,
42060x000300f7,0x000045f1,0x00000000,0x000400fa, 45890x000300f7,0x000048cf,0x00000000,0x000400fa,
42070x000045eb,0x000045ec,0x000045f1,0x000200f8, 45900x000048c9,0x000048ca,0x000048cf,0x000200f8,
42080x000045ec,0x00050041,0x00000096,0x000045ee, 45910x000048ca,0x00050041,0x0000009d,0x000048cc,
42090x00004551,0x00005d9f,0x0004003d,0x0000002f, 45920x0000482f,0x000061c5,0x0004003d,0x0000002f,
42100x000045ef,0x000045ee,0x000400a8,0x0000002f, 45930x000048cd,0x000048cc,0x000400a8,0x0000002f,
42110x000045f0,0x000045ef,0x000200f9,0x000045f1, 45940x000048ce,0x000048cd,0x000200f9,0x000048cf,
42120x000200f8,0x000045f1,0x000700f5,0x0000002f, 45950x000200f8,0x000048cf,0x000700f5,0x0000002f,
42130x000045f2,0x000045ea,0x000045e7,0x000045f0, 45960x000048d0,0x000048c8,0x000048c5,0x000048ce,
42140x000045ec,0x000400a8,0x0000002f,0x000045f3, 45970x000048ca,0x000400a8,0x0000002f,0x000048d1,
42150x000045f2,0x000300f7,0x000045fc,0x00000000, 45980x000048d0,0x000300f7,0x000048da,0x00000000,
42160x000400fa,0x000045f3,0x000045f4,0x000045fc, 45990x000400fa,0x000048d1,0x000048d2,0x000048da,
42170x000200f8,0x000045f4,0x00050041,0x00000009, 46000x000200f8,0x000048d2,0x00050041,0x00000009,
42180x000045f6,0x00004553,0x00005d9f,0x0004003d, 46010x000048d4,0x00004831,0x000061c5,0x0004003d,
42190x00000006,0x000045f7,0x000045f6,0x00050041, 46020x00000006,0x000048d5,0x000048d4,0x00050041,
42200x00000009,0x000045f9,0x00004553,0x00005d9d, 46030x00000009,0x000048d7,0x00004831,0x000061c3,
42210x0004003d,0x00000006,0x000045fa,0x000045f9, 46040x0004003d,0x00000006,0x000048d8,0x000048d7,
42220x000500ab,0x0000002f,0x000045fb,0x000045f7, 46050x000500ab,0x0000002f,0x000048d9,0x000048d5,
42230x000045fa,0x000200f9,0x000045fc,0x000200f8, 46060x000048d8,0x000200f9,0x000048da,0x000200f8,
42240x000045fc,0x000700f5,0x0000002f,0x000045fd, 46070x000048da,0x000700f5,0x0000002f,0x000048db,
42250x000045f2,0x000045f1,0x000045fb,0x000045f4, 46080x000048d0,0x000048cf,0x000048d9,0x000048d2,
42260x000300f7,0x000045ff,0x00000000,0x000400fa, 46090x000300f7,0x000048dd,0x00000000,0x000400fa,
42270x000045fd,0x000045fe,0x000045ff,0x000200f8, 46100x000048db,0x000048dc,0x000048dd,0x000200f8,
42280x000045fe,0x000200f9,0x0000469b,0x000200f8, 46110x000048dc,0x000200f9,0x00004979,0x000200f8,
42290x000045ff,0x000200f9,0x00004600,0x000200f8, 46120x000048dd,0x000200f9,0x000048de,0x000200f8,
42300x00004600,0x000700f5,0x00000006,0x00005da9, 46130x000048de,0x000700f5,0x00000006,0x000061cf,
42310x00000470,0x000045ff,0x0000609e,0x00004638, 46140x000004d7,0x000048dd,0x000064d2,0x00004916,
42320x000700f5,0x00000006,0x00005da4,0x00000470, 46150x000700f5,0x00000006,0x000061ca,0x000004d7,
42330x000045ff,0x00006093,0x00004638,0x000700f5, 46160x000048dd,0x000064c7,0x00004916,0x000700f5,
42340x00000006,0x00005da3,0x00000138,0x000045ff, 46170x00000006,0x000061c9,0x00000140,0x000048dd,
42350x0000463a,0x00004638,0x000500b0,0x0000002f, 46180x00004918,0x00004916,0x000500b0,0x0000002f,
42360x00004603,0x00005da3,0x00000470,0x000500aa, 46190x000048e1,0x000061c9,0x000004d7,0x000500aa,
42370x0000002f,0x00004605,0x00005da4,0x00000470, 46200x0000002f,0x000048e3,0x000061ca,0x000004d7,
42380x000500a7,0x0000002f,0x00004606,0x00004603, 46210x000500a7,0x0000002f,0x000048e4,0x000048e1,
42390x00004605,0x000400f6,0x0000463b,0x00004638, 46220x000048e3,0x000400f6,0x00004919,0x00004916,
42400x00000000,0x000400fa,0x00004606,0x00004607, 46230x00000000,0x000400fa,0x000048e4,0x000048e5,
42410x0000463b,0x000200f8,0x00004607,0x00060041, 46240x00004919,0x000200f8,0x000048e5,0x00060041,
42420x000000e5,0x0000460a,0x00004555,0x00005d9d, 46250x000000ec,0x000048e8,0x00004833,0x000061c3,
42430x00005da3,0x0004003d,0x000000df,0x0000460b, 46260x000061c9,0x0004003d,0x000000e6,0x000048e9,
42440x0000460a,0x00050080,0x00000006,0x0000460e, 46270x000048e8,0x00050080,0x00000006,0x000048ec,
42450x00005da3,0x00000142,0x00050089,0x00000006, 46280x000061c9,0x0000014a,0x00050089,0x00000006,
42460x0000460f,0x0000460e,0x00000470,0x00060041, 46290x000048ed,0x000048ec,0x000004d7,0x00060041,
42470x000000e5,0x00004610,0x00004555,0x00005d9d, 46300x000000ec,0x000048ee,0x00004833,0x000061c3,
42480x0000460f,0x0004003d,0x000000df,0x00004611, 46310x000048ed,0x0004003d,0x000000e6,0x000048ef,
42490x00004610,0x000500aa,0x0000054d,0x00004614, 46320x000048ee,0x000500aa,0x000005b3,0x000048f2,
42500x0000460b,0x00004611,0x0004009b,0x0000002f, 46330x000048e9,0x000048ef,0x0004009b,0x0000002f,
42510x00004615,0x00004614,0x000300f7,0x00004617, 46340x000048f3,0x000048f2,0x000300f7,0x000048f5,
42520x00000000,0x000400fa,0x00004615,0x00004616, 46350x00000000,0x000400fa,0x000048f3,0x000048f4,
42530x00004617,0x000200f8,0x00004616,0x000200f9, 46360x000048f5,0x000200f8,0x000048f4,0x000200f9,
42540x00004638,0x000200f8,0x00004617,0x000200f9, 46370x00004916,0x000200f8,0x000048f5,0x000200f9,
42550x00004618,0x000200f8,0x00004618,0x000700f5, 46380x000048f6,0x000200f8,0x000048f6,0x000700f5,
42560x00000006,0x00005daa,0x00000138,0x00004617, 46390x00000006,0x000061d0,0x00000140,0x000048f5,
42570x00004636,0x00004634,0x000500b0,0x0000002f, 46400x00004914,0x00004912,0x000500b0,0x0000002f,
42580x0000461b,0x00005daa,0x00000470,0x000400f6, 46410x000048f9,0x000061d0,0x000004d7,0x000400f6,
42590x00004637,0x00004634,0x00000000,0x000400fa, 46420x00004915,0x00004912,0x00000000,0x000400fa,
42600x0000461b,0x0000461c,0x00004637,0x000200f8, 46430x000048f9,0x000048fa,0x00004915,0x000200f8,
42610x0000461c,0x00060041,0x000000e5,0x0000461f, 46440x000048fa,0x00060041,0x000000ec,0x000048fd,
42620x00004555,0x00005d9f,0x00005daa,0x0004003d, 46450x00004833,0x000061c5,0x000061d0,0x0004003d,
42630x000000df,0x00004620,0x0000461f,0x000500aa, 46460x000000e6,0x000048fe,0x000048fd,0x000500aa,
42640x0000054d,0x00004622,0x00004620,0x00004611, 46470x000005b3,0x00004900,0x000048fe,0x000048ef,
42650x0004009b,0x0000002f,0x00004623,0x00004622, 46480x0004009b,0x0000002f,0x00004901,0x00004900,
42660x000300f7,0x0000462e,0x00000000,0x000400fa, 46490x000300f7,0x0000490c,0x00000000,0x000400fa,
42670x00004623,0x00004624,0x0000462e,0x000200f8, 46500x00004901,0x00004902,0x0000490c,0x000200f8,
42680x00004624,0x00050080,0x00000006,0x00004627, 46510x00004902,0x00050080,0x00000006,0x00004905,
42690x00005daa,0x00000142,0x00050089,0x00000006, 46520x000061d0,0x0000014a,0x00050089,0x00000006,
42700x00004628,0x00004627,0x00000470,0x00060041, 46530x00004906,0x00004905,0x000004d7,0x00060041,
42710x000000e5,0x00004629,0x00004555,0x00005d9f, 46540x000000ec,0x00004907,0x00004833,0x000061c5,
42720x00004628,0x0004003d,0x000000df,0x0000462a, 46550x00004906,0x0004003d,0x000000e6,0x00004908,
42730x00004629,0x000500aa,0x0000054d,0x0000462c, 46560x00004907,0x000500aa,0x000005b3,0x0000490a,
42740x0000462a,0x0000460b,0x0004009b,0x0000002f, 46570x00004908,0x000048e9,0x0004009b,0x0000002f,
42750x0000462d,0x0000462c,0x000200f9,0x0000462e, 46580x0000490b,0x0000490a,0x000200f9,0x0000490c,
42760x000200f8,0x0000462e,0x000700f5,0x0000002f, 46590x000200f8,0x0000490c,0x000700f5,0x0000002f,
42770x0000462f,0x00004623,0x0000461c,0x0000462d, 46600x0000490d,0x00004901,0x000048fa,0x0000490b,
42780x00004624,0x000300f7,0x00004633,0x00000000, 46610x00004902,0x000300f7,0x00004911,0x00000000,
42790x000400fa,0x0000462f,0x00004630,0x00004633, 46620x000400fa,0x0000490d,0x0000490e,0x00004911,
42800x000200f8,0x00004630,0x000200f9,0x00004637, 46630x000200f8,0x0000490e,0x000200f9,0x00004915,
42810x000200f8,0x00004633,0x000200f9,0x00004634, 46640x000200f8,0x00004911,0x000200f9,0x00004912,
42820x000200f8,0x00004634,0x00050080,0x00000006, 46650x000200f8,0x00004912,0x00050080,0x00000006,
42830x00004636,0x00005daa,0x00000264,0x000200f9, 46660x00004914,0x000061d0,0x0000026c,0x000200f9,
42840x00004618,0x000200f8,0x00004637,0x000700f5, 46670x000048f6,0x000200f8,0x00004915,0x000700f5,
42850x00000006,0x0000609f,0x00005da9,0x00004618, 46680x00000006,0x000064d3,0x000061cf,0x000048f6,
42860x00005daa,0x00004630,0x000700f5,0x00000006, 46690x000061d0,0x0000490e,0x000700f5,0x00000006,
42870x00006094,0x00005da4,0x00004618,0x00005da3, 46700x000064c8,0x000061ca,0x000048f6,0x000061c9,
42880x00004630,0x000200f9,0x00004638,0x000200f8, 46710x0000490e,0x000200f9,0x00004916,0x000200f8,
42890x00004638,0x000700f5,0x00000006,0x0000609e, 46720x00004916,0x000700f5,0x00000006,0x000064d2,
42900x00005da9,0x00004616,0x0000609f,0x00004637, 46730x000061cf,0x000048f4,0x000064d3,0x00004915,
42910x000700f5,0x00000006,0x00006093,0x00005da4, 46740x000700f5,0x00000006,0x000064c7,0x000061ca,
42920x00004616,0x00006094,0x00004637,0x00050080, 46750x000048f4,0x000064c8,0x00004915,0x00050080,
42930x00000006,0x0000463a,0x00005da3,0x00000264, 46760x00000006,0x00004918,0x000061c9,0x0000026c,
42940x000200f9,0x00004600,0x000200f8,0x0000463b, 46770x000200f9,0x000048de,0x000200f8,0x00004919,
42950x000300f7,0x0000463f,0x00000000,0x000400fa, 46780x000300f7,0x0000491d,0x00000000,0x000400fa,
42960x00004605,0x0000463e,0x0000463f,0x000200f8, 46790x000048e3,0x0000491c,0x0000491d,0x000200f8,
42970x0000463e,0x000200f9,0x0000469b,0x000200f8, 46800x0000491c,0x000200f9,0x00004979,0x000200f8,
42980x0000463f,0x0003003e,0x000045e9,0x000003e7, 46810x0000491d,0x0003003e,0x000048c7,0x00000444,
42990x00050080,0x00000006,0x00004645,0x00005da4, 46820x00050080,0x00000006,0x00004923,0x000061ca,
43000x00000280,0x00050089,0x00000006,0x00004646, 46830x00000288,0x00050089,0x00000006,0x00004924,
43010x00004645,0x00000470,0x00050041,0x00000009, 46840x00004923,0x000004d7,0x00050041,0x00000009,
43020x00004647,0x0000400e,0x00005d9d,0x0004003d, 46850x00004925,0x000042ec,0x000061c3,0x0004003d,
43030x00000006,0x00004648,0x00004647,0x00060041, 46860x00000006,0x00004926,0x00004925,0x00060041,
43040x000000e5,0x00004649,0x00004555,0x00005d9d, 46870x000000ec,0x00004927,0x00004833,0x000061c3,
43050x00004646,0x0004003d,0x000000df,0x0000464a, 46880x00004924,0x0004003d,0x000000e6,0x00004928,
43060x00004649,0x00050041,0x000001bb,0x000048af, 46890x00004927,0x00050041,0x000001c3,0x00004b8d,
43070x000001b9,0x0000034a,0x0004003d,0x00000006, 46900x000001c1,0x00000352,0x0004003d,0x00000006,
43080x000048b0,0x000048af,0x00050084,0x00000006, 46910x00004b8e,0x00004b8d,0x00050084,0x00000006,
43090x000048b2,0x000001c4,0x00004648,0x00050080, 46920x00004b90,0x000001cc,0x00004926,0x00050080,
43100x00000006,0x000048b3,0x000048b0,0x000048b2, 46930x00000006,0x00004b91,0x00004b8e,0x00004b90,
43110x00050041,0x00000266,0x00004899,0x000001b9, 46940x00050041,0x0000026e,0x00004b77,0x000001c1,
43120x0000016b,0x0004003d,0x00000007,0x0000489a, 46950x00000173,0x0004003d,0x00000007,0x00004b78,
43130x00004899,0x00050051,0x00000006,0x0000489d, 46960x00004b77,0x00050051,0x00000006,0x00004b7b,
43140x0000464a,0x00000000,0x00050051,0x00000006, 46970x00004928,0x00000000,0x00050051,0x00000006,
43150x000048c9,0x0000489a,0x00000000,0x00050095, 46980x00004ba7,0x00004b78,0x00000000,0x00050095,
43160x0000013d,0x000048cb,0x000048c9,0x000048b3, 46990x00000145,0x00004ba9,0x00004ba7,0x00004b91,
43170x00050051,0x00000006,0x000048cc,0x000048cb, 47000x00050051,0x00000006,0x00004baa,0x00004ba9,
43180x00000001,0x00050051,0x00000006,0x000048cd, 47010x00000001,0x00050051,0x00000006,0x00004bab,
43190x000048cb,0x00000000,0x00050051,0x00000006, 47020x00004ba9,0x00000000,0x00050051,0x00000006,
43200x000048d0,0x0000489a,0x00000001,0x00050080, 47030x00004bae,0x00004b78,0x00000001,0x00050080,
43210x00000006,0x000048d2,0x000048d0,0x000048cc, 47040x00000006,0x00004bb0,0x00004bae,0x00004baa,
43220x00050050,0x00000007,0x000048d3,0x000048cd, 47050x00050050,0x00000007,0x00004bb1,0x00004bab,
43230x000048d2,0x0004007c,0x00000014,0x000048c3, 47060x00004bb0,0x0004007c,0x00000014,0x00004ba1,
43240x000048d3,0x00060041,0x0000016c,0x000048bb, 47070x00004bb1,0x00060041,0x00000174,0x00004b99,
43250x000048c3,0x0000016b,0x0000016b,0x0005003e, 47080x00004ba1,0x00000173,0x00000173,0x0005003e,
43260x000048bb,0x0000489d,0x00000002,0x00000004, 47090x00004b99,0x00004b7b,0x00000002,0x00000004,
43270x00050080,0x00000006,0x000048a0,0x000048b3, 47100x00050080,0x00000006,0x00004b7e,0x00004b91,
43280x000000ec,0x00050051,0x00000006,0x000048a4, 47110x000000f3,0x00050051,0x00000006,0x00004b82,
43290x0000464a,0x00000001,0x00050095,0x0000013d, 47120x00004928,0x00000001,0x00050095,0x00000145,
43300x000048eb,0x000048c9,0x000048a0,0x00050051, 47130x00004bc9,0x00004ba7,0x00004b7e,0x00050051,
43310x00000006,0x000048ec,0x000048eb,0x00000001, 47140x00000006,0x00004bca,0x00004bc9,0x00000001,
43320x00050051,0x00000006,0x000048ed,0x000048eb, 47150x00050051,0x00000006,0x00004bcb,0x00004bc9,
43330x00000000,0x00050080,0x00000006,0x000048f2, 47160x00000000,0x00050080,0x00000006,0x00004bd0,
43340x000048d0,0x000048ec,0x00050050,0x00000007, 47170x00004bae,0x00004bca,0x00050050,0x00000007,
43350x000048f3,0x000048ed,0x000048f2,0x0004007c, 47180x00004bd1,0x00004bcb,0x00004bd0,0x0004007c,
43360x00000014,0x000048e3,0x000048f3,0x00060041, 47190x00000014,0x00004bc1,0x00004bd1,0x00060041,
43370x0000016c,0x000048db,0x000048e3,0x0000016b, 47200x00000174,0x00004bb9,0x00004bc1,0x00000173,
43380x0000016b,0x0005003e,0x000048db,0x000048a4, 47210x00000173,0x0005003e,0x00004bb9,0x00004b82,
43390x00000002,0x00000004,0x00050080,0x00000006, 47220x00000002,0x00000004,0x00050080,0x00000006,
43400x000048a7,0x000048b3,0x000001cd,0x00050051, 47230x00004b85,0x00004b91,0x000001d5,0x00050051,
43410x00000006,0x000048ab,0x0000464a,0x00000002, 47240x00000006,0x00004b89,0x00004928,0x00000002,
43420x00050095,0x0000013d,0x0000490b,0x000048c9, 47250x00050095,0x00000145,0x00004be9,0x00004ba7,
43430x000048a7,0x00050051,0x00000006,0x0000490c, 47260x00004b85,0x00050051,0x00000006,0x00004bea,
43440x0000490b,0x00000001,0x00050051,0x00000006, 47270x00004be9,0x00000001,0x00050051,0x00000006,
43450x0000490d,0x0000490b,0x00000000,0x00050080, 47280x00004beb,0x00004be9,0x00000000,0x00050080,
43460x00000006,0x00004912,0x000048d0,0x0000490c, 47290x00000006,0x00004bf0,0x00004bae,0x00004bea,
43470x00050050,0x00000007,0x00004913,0x0000490d, 47300x00050050,0x00000007,0x00004bf1,0x00004beb,
43480x00004912,0x0004007c,0x00000014,0x00004903, 47310x00004bf0,0x0004007c,0x00000014,0x00004be1,
43490x00004913,0x00060041,0x0000016c,0x000048fb, 47320x00004bf1,0x00060041,0x00000174,0x00004bd9,
43500x00004903,0x0000016b,0x0000016b,0x0005003e, 47330x00004be1,0x00000173,0x00000173,0x0005003e,
43510x000048fb,0x000048ab,0x00000002,0x00000004, 47340x00004bd9,0x00004b89,0x00000002,0x00000004,
43520x0004003d,0x00000006,0x00004650,0x00004647, 47350x0004003d,0x00000006,0x0000492e,0x00004925,
43530x00060041,0x000000e5,0x00004651,0x00004555, 47360x00060041,0x000000ec,0x0000492f,0x00004833,
43540x00005d9d,0x00005da4,0x0004003d,0x000000df, 47370x000061c3,0x000061ca,0x0004003d,0x000000e6,
43550x00004652,0x00004651,0x00050084,0x00000006, 47380x00004930,0x0000492f,0x00050084,0x00000006,
43560x0000493e,0x000001c4,0x00004650,0x00050080, 47390x00004c1c,0x000001cc,0x0000492e,0x00050080,
43570x00000006,0x0000493f,0x000048b0,0x0000493e, 47400x00000006,0x00004c1d,0x00004b8e,0x00004c1c,
43580x00050080,0x00000006,0x00004924,0x0000493f, 47410x00050080,0x00000006,0x00004c02,0x00004c1d,
43590x000001d4,0x00050051,0x00000006,0x00004929, 47420x000001dc,0x00050051,0x00000006,0x00004c07,
43600x00004652,0x00000000,0x00050095,0x0000013d, 47430x00004930,0x00000000,0x00050095,0x00000145,
43610x00004957,0x000048c9,0x00004924,0x00050051, 47440x00004c35,0x00004ba7,0x00004c02,0x00050051,
43620x00000006,0x00004958,0x00004957,0x00000001, 47450x00000006,0x00004c36,0x00004c35,0x00000001,
43630x00050051,0x00000006,0x00004959,0x00004957, 47460x00050051,0x00000006,0x00004c37,0x00004c35,
43640x00000000,0x00050080,0x00000006,0x0000495e, 47470x00000000,0x00050080,0x00000006,0x00004c3c,
43650x000048d0,0x00004958,0x00050050,0x00000007, 47480x00004bae,0x00004c36,0x00050050,0x00000007,
43660x0000495f,0x00004959,0x0000495e,0x0004007c, 47490x00004c3d,0x00004c37,0x00004c3c,0x0004007c,
43670x00000014,0x0000494f,0x0000495f,0x00060041, 47500x00000014,0x00004c2d,0x00004c3d,0x00060041,
43680x0000016c,0x00004947,0x0000494f,0x0000016b, 47510x00000174,0x00004c25,0x00004c2d,0x00000173,
43690x0000016b,0x0005003e,0x00004947,0x00004929, 47520x00000173,0x0005003e,0x00004c25,0x00004c07,
43700x00000002,0x00000004,0x00050080,0x00000006, 47530x00000002,0x00000004,0x00050080,0x00000006,
43710x0000492c,0x0000493f,0x000001db,0x00050051, 47540x00004c0a,0x00004c1d,0x000001e3,0x00050051,
43720x00000006,0x00004930,0x00004652,0x00000001, 47550x00000006,0x00004c0e,0x00004930,0x00000001,
43730x00050095,0x0000013d,0x00004977,0x000048c9, 47560x00050095,0x00000145,0x00004c55,0x00004ba7,
43740x0000492c,0x00050051,0x00000006,0x00004978, 47570x00004c0a,0x00050051,0x00000006,0x00004c56,
43750x00004977,0x00000001,0x00050051,0x00000006, 47580x00004c55,0x00000001,0x00050051,0x00000006,
43760x00004979,0x00004977,0x00000000,0x00050080, 47590x00004c57,0x00004c55,0x00000000,0x00050080,
43770x00000006,0x0000497e,0x000048d0,0x00004978, 47600x00000006,0x00004c5c,0x00004bae,0x00004c56,
43780x00050050,0x00000007,0x0000497f,0x00004979, 47610x00050050,0x00000007,0x00004c5d,0x00004c57,
43790x0000497e,0x0004007c,0x00000014,0x0000496f, 47620x00004c5c,0x0004007c,0x00000014,0x00004c4d,
43800x0000497f,0x00060041,0x0000016c,0x00004967, 47630x00004c5d,0x00060041,0x00000174,0x00004c45,
43810x0000496f,0x0000016b,0x0000016b,0x0005003e, 47640x00004c4d,0x00000173,0x00000173,0x0005003e,
43820x00004967,0x00004930,0x00000002,0x00000004, 47650x00004c45,0x00004c0e,0x00000002,0x00000004,
43830x00050080,0x00000006,0x00004933,0x0000493f, 47660x00050080,0x00000006,0x00004c11,0x00004c1d,
43840x00000299,0x00050051,0x00000006,0x00004937, 47670x000002a1,0x00050051,0x00000006,0x00004c15,
43850x00004652,0x00000002,0x00050095,0x0000013d, 47680x00004930,0x00000002,0x00050095,0x00000145,
43860x00004997,0x000048c9,0x00004933,0x00050051, 47690x00004c75,0x00004ba7,0x00004c11,0x00050051,
43870x00000006,0x00004998,0x00004997,0x00000001, 47700x00000006,0x00004c76,0x00004c75,0x00000001,
43880x00050051,0x00000006,0x00004999,0x00004997, 47710x00050051,0x00000006,0x00004c77,0x00004c75,
43890x00000000,0x00050080,0x00000006,0x0000499e, 47720x00000000,0x00050080,0x00000006,0x00004c7c,
43900x000048d0,0x00004998,0x00050050,0x00000007, 47730x00004bae,0x00004c76,0x00050050,0x00000007,
43910x0000499f,0x00004999,0x0000499e,0x0004007c, 47740x00004c7d,0x00004c77,0x00004c7c,0x0004007c,
43920x00000014,0x0000498f,0x0000499f,0x00060041, 47750x00000014,0x00004c6d,0x00004c7d,0x00060041,
43930x0000016c,0x00004987,0x0000498f,0x0000016b, 47760x00000174,0x00004c65,0x00004c6d,0x00000173,
43940x0000016b,0x0005003e,0x00004987,0x00004937, 47770x00000173,0x0005003e,0x00004c65,0x00004c15,
43950x00000002,0x00000004,0x00050080,0x00000006, 47780x00000002,0x00000004,0x00050080,0x00000006,
43960x00004657,0x00005da4,0x00000142,0x00050089, 47790x00004935,0x000061ca,0x0000014a,0x00050089,
43970x00000006,0x00004658,0x00004657,0x00000470, 47800x00000006,0x00004936,0x00004935,0x000004d7,
43980x0004003d,0x00000006,0x0000465a,0x00004647, 47810x0004003d,0x00000006,0x00004938,0x00004925,
43990x00060041,0x000000e5,0x0000465b,0x00004555, 47820x00060041,0x000000ec,0x00004939,0x00004833,
44000x00005d9d,0x00004658,0x0004003d,0x000000df, 47830x000061c3,0x00004936,0x0004003d,0x000000e6,
44010x0000465c,0x0000465b,0x00050084,0x00000006, 47840x0000493a,0x00004939,0x00050084,0x00000006,
44020x000049ca,0x000001c4,0x0000465a,0x00050080, 47850x00004ca8,0x000001cc,0x00004938,0x00050080,
44030x00000006,0x000049cb,0x000048b0,0x000049ca, 47860x00000006,0x00004ca9,0x00004b8e,0x00004ca8,
44040x00050080,0x00000006,0x000049b0,0x000049cb, 47870x00050080,0x00000006,0x00004c8e,0x00004ca9,
44050x000001ef,0x00050051,0x00000006,0x000049b5, 47880x000001f7,0x00050051,0x00000006,0x00004c93,
44060x0000465c,0x00000000,0x00050095,0x0000013d, 47890x0000493a,0x00000000,0x00050095,0x00000145,
44070x000049e3,0x000048c9,0x000049b0,0x00050051, 47900x00004cc1,0x00004ba7,0x00004c8e,0x00050051,
44080x00000006,0x000049e4,0x000049e3,0x00000001, 47910x00000006,0x00004cc2,0x00004cc1,0x00000001,
44090x00050051,0x00000006,0x000049e5,0x000049e3, 47920x00050051,0x00000006,0x00004cc3,0x00004cc1,
44100x00000000,0x00050080,0x00000006,0x000049ea, 47930x00000000,0x00050080,0x00000006,0x00004cc8,
44110x000048d0,0x000049e4,0x00050050,0x00000007, 47940x00004bae,0x00004cc2,0x00050050,0x00000007,
44120x000049eb,0x000049e5,0x000049ea,0x0004007c, 47950x00004cc9,0x00004cc3,0x00004cc8,0x0004007c,
44130x00000014,0x000049db,0x000049eb,0x00060041, 47960x00000014,0x00004cb9,0x00004cc9,0x00060041,
44140x0000016c,0x000049d3,0x000049db,0x0000016b, 47970x00000174,0x00004cb1,0x00004cb9,0x00000173,
44150x0000016b,0x0005003e,0x000049d3,0x000049b5, 47980x00000173,0x0005003e,0x00004cb1,0x00004c93,
44160x00000002,0x00000004,0x00050080,0x00000006, 47990x00000002,0x00000004,0x00050080,0x00000006,
44170x000049b8,0x000049cb,0x000006d9,0x00050051, 48000x00004c96,0x00004ca9,0x0000073f,0x00050051,
44180x00000006,0x000049bc,0x0000465c,0x00000001, 48010x00000006,0x00004c9a,0x0000493a,0x00000001,
44190x00050095,0x0000013d,0x00004a03,0x000048c9, 48020x00050095,0x00000145,0x00004ce1,0x00004ba7,
44200x000049b8,0x00050051,0x00000006,0x00004a04, 48030x00004c96,0x00050051,0x00000006,0x00004ce2,
44210x00004a03,0x00000001,0x00050051,0x00000006, 48040x00004ce1,0x00000001,0x00050051,0x00000006,
44220x00004a05,0x00004a03,0x00000000,0x00050080, 48050x00004ce3,0x00004ce1,0x00000000,0x00050080,
44230x00000006,0x00004a0a,0x000048d0,0x00004a04, 48060x00000006,0x00004ce8,0x00004bae,0x00004ce2,
44240x00050050,0x00000007,0x00004a0b,0x00004a05, 48070x00050050,0x00000007,0x00004ce9,0x00004ce3,
44250x00004a0a,0x0004007c,0x00000014,0x000049fb, 48080x00004ce8,0x0004007c,0x00000014,0x00004cd9,
44260x00004a0b,0x00060041,0x0000016c,0x000049f3, 48090x00004ce9,0x00060041,0x00000174,0x00004cd1,
44270x000049fb,0x0000016b,0x0000016b,0x0005003e, 48100x00004cd9,0x00000173,0x00000173,0x0005003e,
44280x000049f3,0x000049bc,0x00000002,0x00000004, 48110x00004cd1,0x00004c9a,0x00000002,0x00000004,
44290x00050080,0x00000006,0x000049bf,0x000049cb, 48120x00050080,0x00000006,0x00004c9d,0x00004ca9,
44300x00000205,0x00050051,0x00000006,0x000049c3, 48130x0000020d,0x00050051,0x00000006,0x00004ca1,
44310x0000465c,0x00000002,0x00050095,0x0000013d, 48140x0000493a,0x00000002,0x00050095,0x00000145,
44320x00004a23,0x000048c9,0x000049bf,0x00050051, 48150x00004d01,0x00004ba7,0x00004c9d,0x00050051,
44330x00000006,0x00004a24,0x00004a23,0x00000001, 48160x00000006,0x00004d02,0x00004d01,0x00000001,
44340x00050051,0x00000006,0x00004a25,0x00004a23, 48170x00050051,0x00000006,0x00004d03,0x00004d01,
44350x00000000,0x00050080,0x00000006,0x00004a2a, 48180x00000000,0x00050080,0x00000006,0x00004d08,
44360x000048d0,0x00004a24,0x00050050,0x00000007, 48190x00004bae,0x00004d02,0x00050050,0x00000007,
44370x00004a2b,0x00004a25,0x00004a2a,0x0004007c, 48200x00004d09,0x00004d03,0x00004d08,0x0004007c,
44380x00000014,0x00004a1b,0x00004a2b,0x00060041, 48210x00000014,0x00004cf9,0x00004d09,0x00060041,
44390x0000016c,0x00004a13,0x00004a1b,0x0000016b, 48220x00000174,0x00004cf1,0x00004cf9,0x00000173,
44400x0000016b,0x0005003e,0x00004a13,0x000049c3, 48230x00000173,0x0005003e,0x00004cf1,0x00004ca1,
44410x00000002,0x00000004,0x00050080,0x00000006, 48240x00000002,0x00000004,0x00050080,0x00000006,
44420x00004661,0x00005da9,0x00000280,0x00050089, 48250x0000493f,0x000061cf,0x00000288,0x00050089,
44430x00000006,0x00004662,0x00004661,0x00000470, 48260x00000006,0x00004940,0x0000493f,0x000004d7,
44440x0004003d,0x00000006,0x00004664,0x00004647, 48270x0004003d,0x00000006,0x00004942,0x00004925,
44450x00060041,0x000000e5,0x00004665,0x00004555, 48280x00060041,0x000000ec,0x00004943,0x00004833,
44460x00005d9f,0x00004662,0x0004003d,0x000000df, 48290x000061c5,0x00004940,0x0004003d,0x000000e6,
44470x00004666,0x00004665,0x00050084,0x00000006, 48300x00004944,0x00004943,0x00050084,0x00000006,
44480x00004a56,0x000001c4,0x00004664,0x00050080, 48310x00004d34,0x000001cc,0x00004942,0x00050080,
44490x00000006,0x00004a57,0x000048b0,0x00004a56, 48320x00000006,0x00004d35,0x00004b8e,0x00004d34,
44500x00050080,0x00000006,0x00004a3c,0x00004a57, 48330x00050080,0x00000006,0x00004d1a,0x00004d35,
44510x00000500,0x00050051,0x00000006,0x00004a41, 48340x00000567,0x00050051,0x00000006,0x00004d1f,
44520x00004666,0x00000000,0x00050095,0x0000013d, 48350x00004944,0x00000000,0x00050095,0x00000145,
44530x00004a6f,0x000048c9,0x00004a3c,0x00050051, 48360x00004d4d,0x00004ba7,0x00004d1a,0x00050051,
44540x00000006,0x00004a70,0x00004a6f,0x00000001, 48370x00000006,0x00004d4e,0x00004d4d,0x00000001,
44550x00050051,0x00000006,0x00004a71,0x00004a6f, 48380x00050051,0x00000006,0x00004d4f,0x00004d4d,
44560x00000000,0x00050080,0x00000006,0x00004a76, 48390x00000000,0x00050080,0x00000006,0x00004d54,
44570x000048d0,0x00004a70,0x00050050,0x00000007, 48400x00004bae,0x00004d4e,0x00050050,0x00000007,
44580x00004a77,0x00004a71,0x00004a76,0x0004007c, 48410x00004d55,0x00004d4f,0x00004d54,0x0004007c,
44590x00000014,0x00004a67,0x00004a77,0x00060041, 48420x00000014,0x00004d45,0x00004d55,0x00060041,
44600x0000016c,0x00004a5f,0x00004a67,0x0000016b, 48430x00000174,0x00004d3d,0x00004d45,0x00000173,
44610x0000016b,0x0005003e,0x00004a5f,0x00004a41, 48440x00000173,0x0005003e,0x00004d3d,0x00004d1f,
44620x00000002,0x00000004,0x00050080,0x00000006, 48450x00000002,0x00000004,0x00050080,0x00000006,
44630x00004a44,0x00004a57,0x0000050b,0x00050051, 48460x00004d22,0x00004d35,0x00000572,0x00050051,
44640x00000006,0x00004a48,0x00004666,0x00000001, 48470x00000006,0x00004d26,0x00004944,0x00000001,
44650x00050095,0x0000013d,0x00004a8f,0x000048c9, 48480x00050095,0x00000145,0x00004d6d,0x00004ba7,
44660x00004a44,0x00050051,0x00000006,0x00004a90, 48490x00004d22,0x00050051,0x00000006,0x00004d6e,
44670x00004a8f,0x00000001,0x00050051,0x00000006, 48500x00004d6d,0x00000001,0x00050051,0x00000006,
44680x00004a91,0x00004a8f,0x00000000,0x00050080, 48510x00004d6f,0x00004d6d,0x00000000,0x00050080,
44690x00000006,0x00004a96,0x000048d0,0x00004a90, 48520x00000006,0x00004d74,0x00004bae,0x00004d6e,
44700x00050050,0x00000007,0x00004a97,0x00004a91, 48530x00050050,0x00000007,0x00004d75,0x00004d6f,
44710x00004a96,0x0004007c,0x00000014,0x00004a87, 48540x00004d74,0x0004007c,0x00000014,0x00004d65,
44720x00004a97,0x00060041,0x0000016c,0x00004a7f, 48550x00004d75,0x00060041,0x00000174,0x00004d5d,
44730x00004a87,0x0000016b,0x0000016b,0x0005003e, 48560x00004d65,0x00000173,0x00000173,0x0005003e,
44740x00004a7f,0x00004a48,0x00000002,0x00000004, 48570x00004d5d,0x00004d26,0x00000002,0x00000004,
44750x00050080,0x00000006,0x00004a4b,0x00004a57, 48580x00050080,0x00000006,0x00004d29,0x00004d35,
44760x00000516,0x00050051,0x00000006,0x00004a4f, 48590x0000057d,0x00050051,0x00000006,0x00004d2d,
44770x00004666,0x00000002,0x00050095,0x0000013d, 48600x00004944,0x00000002,0x00050095,0x00000145,
44780x00004aaf,0x000048c9,0x00004a4b,0x00050051, 48610x00004d8d,0x00004ba7,0x00004d29,0x00050051,
44790x00000006,0x00004ab0,0x00004aaf,0x00000001, 48620x00000006,0x00004d8e,0x00004d8d,0x00000001,
44800x00050051,0x00000006,0x00004ab1,0x00004aaf, 48630x00050051,0x00000006,0x00004d8f,0x00004d8d,
44810x00000000,0x00050080,0x00000006,0x00004ab6, 48640x00000000,0x00050080,0x00000006,0x00004d94,
44820x000048d0,0x00004ab0,0x00050050,0x00000007, 48650x00004bae,0x00004d8e,0x00050050,0x00000007,
44830x00004ab7,0x00004ab1,0x00004ab6,0x0004007c, 48660x00004d95,0x00004d8f,0x00004d94,0x0004007c,
44840x00000014,0x00004aa7,0x00004ab7,0x00060041, 48670x00000014,0x00004d85,0x00004d95,0x00060041,
44850x0000016c,0x00004a9f,0x00004aa7,0x0000016b, 48680x00000174,0x00004d7d,0x00004d85,0x00000173,
44860x0000016b,0x0005003e,0x00004a9f,0x00004a4f, 48690x00000173,0x0005003e,0x00004d7d,0x00004d2d,
44870x00000002,0x00000004,0x0004003d,0x00000006, 48700x00000002,0x00000004,0x0004003d,0x00000006,
44880x0000466a,0x00004647,0x00050084,0x00000006, 48710x00004948,0x00004925,0x00050084,0x00000006,
44890x00004abd,0x000001c4,0x0000466a,0x00050080, 48720x00004d9b,0x000001cc,0x00004948,0x00050080,
44900x00000006,0x00004abe,0x000048b0,0x00004abd, 48730x00000006,0x00004d9c,0x00004b8e,0x00004d9b,
44910x00050080,0x00000006,0x0000466c,0x00004abe, 48740x00050080,0x00000006,0x0000494a,0x00004d9c,
44920x00000537,0x00050041,0x00000009,0x0000466e, 48750x0000059e,0x00050041,0x00000009,0x0000494c,
44930x0000400e,0x00005d9f,0x0004003d,0x00000006, 48760x000042ec,0x000061c5,0x0004003d,0x00000006,
44940x0000466f,0x0000466e,0x00050084,0x00000006, 48770x0000494d,0x0000494c,0x00050084,0x00000006,
44950x00004ac4,0x000001c4,0x0000466f,0x00050080, 48780x00004da2,0x000001cc,0x0000494d,0x00050080,
44960x00000006,0x00004ac5,0x000048b0,0x00004ac4, 48790x00000006,0x00004da3,0x00004b8e,0x00004da2,
44970x00050080,0x00000006,0x00004671,0x00004ac5, 48800x00050080,0x00000006,0x0000494f,0x00004da3,
44980x0000052d,0x00050095,0x0000013d,0x00004ade, 48810x00000594,0x00050095,0x00000145,0x00004dbc,
44990x000048c9,0x00004671,0x00050051,0x00000006, 48820x00004ba7,0x0000494f,0x00050051,0x00000006,
45000x00004adf,0x00004ade,0x00000001,0x00050051, 48830x00004dbd,0x00004dbc,0x00000001,0x00050051,
45010x00000006,0x00004ae0,0x00004ade,0x00000000, 48840x00000006,0x00004dbe,0x00004dbc,0x00000000,
45020x00050080,0x00000006,0x00004ae5,0x000048d0, 48850x00050080,0x00000006,0x00004dc3,0x00004bae,
45030x00004adf,0x00050050,0x00000007,0x00004ae6, 48860x00004dbd,0x00050050,0x00000007,0x00004dc4,
45040x00004ae0,0x00004ae5,0x0004007c,0x00000014, 48870x00004dbe,0x00004dc3,0x0004007c,0x00000014,
45050x00004ad6,0x00004ae6,0x00060041,0x0000016c, 48880x00004db4,0x00004dc4,0x00060041,0x00000174,
45060x00004acd,0x00004ad6,0x0000016b,0x0000016b, 48890x00004dab,0x00004db4,0x00000173,0x00000173,
45070x0006003d,0x00000006,0x00004ace,0x00004acd, 48900x0006003d,0x00000006,0x00004dac,0x00004dab,
45080x00000002,0x00000004,0x00050095,0x0000013d, 48910x00000002,0x00000004,0x00050095,0x00000145,
45090x00004afe,0x000048c9,0x0000466c,0x00050051, 48920x00004ddc,0x00004ba7,0x0000494a,0x00050051,
45100x00000006,0x00004aff,0x00004afe,0x00000001, 48930x00000006,0x00004ddd,0x00004ddc,0x00000001,
45110x00050051,0x00000006,0x00004b00,0x00004afe, 48940x00050051,0x00000006,0x00004dde,0x00004ddc,
45120x00000000,0x00050080,0x00000006,0x00004b05, 48950x00000000,0x00050080,0x00000006,0x00004de3,
45130x000048d0,0x00004aff,0x00050050,0x00000007, 48960x00004bae,0x00004ddd,0x00050050,0x00000007,
45140x00004b06,0x00004b00,0x00004b05,0x0004007c, 48970x00004de4,0x00004dde,0x00004de3,0x0004007c,
45150x00000014,0x00004af6,0x00004b06,0x00060041, 48980x00000014,0x00004dd4,0x00004de4,0x00060041,
45160x0000016c,0x00004aee,0x00004af6,0x0000016b, 48990x00000174,0x00004dcc,0x00004dd4,0x00000173,
45170x0000016b,0x0005003e,0x00004aee,0x00004ace, 49000x00000173,0x0005003e,0x00004dcc,0x00004dac,
45180x00000002,0x00000004,0x00050082,0x00000006, 49010x00000002,0x00000004,0x00050082,0x00000006,
45190x00004679,0x00000364,0x00005da4,0x00050089, 49020x00004957,0x0000036c,0x000061ca,0x00050089,
45200x00000006,0x0000467a,0x00004679,0x00000470, 49030x00000006,0x00004958,0x00004957,0x000004d7,
45210x00050082,0x00000006,0x0000467c,0x00000355, 49040x00050082,0x00000006,0x0000495a,0x0000035d,
45220x00005da4,0x00050089,0x00000006,0x0000467d, 49050x000061ca,0x00050089,0x00000006,0x0000495b,
45230x0000467c,0x00000470,0x000500c4,0x00000006, 49060x0000495a,0x000004d7,0x000500c4,0x00000006,
45240x0000467e,0x0000467d,0x00000315,0x000500c5, 49070x0000495c,0x0000495b,0x0000031d,0x000500c5,
45250x00000006,0x0000467f,0x0000467a,0x0000467e, 49080x00000006,0x0000495d,0x00004958,0x0000495c,
45260x00050082,0x00000006,0x00004681,0x00000355, 49090x00050082,0x00000006,0x0000495f,0x0000035d,
45270x00005da9,0x00050089,0x00000006,0x00004682, 49100x000061cf,0x00050089,0x00000006,0x00004960,
45280x00004681,0x00000470,0x00050082,0x00000006, 49110x0000495f,0x000004d7,0x00050082,0x00000006,
45290x00004684,0x00000d2b,0x00005da9,0x00050089, 49120x00004962,0x00000376,0x000061cf,0x00050089,
45300x00000006,0x00004685,0x00004684,0x00000470, 49130x00000006,0x00004963,0x00004962,0x000004d7,
45310x000500c4,0x00000006,0x00004686,0x00004685, 49140x000500c4,0x00000006,0x00004964,0x00004963,
45320x00000315,0x000500c5,0x00000006,0x00004687, 49150x0000031d,0x000500c5,0x00000006,0x00004965,
45330x00004682,0x00004686,0x0004003d,0x00000006, 49160x00004960,0x00004964,0x0004003d,0x00000006,
45340x0000468a,0x00004647,0x00050084,0x00000006, 49170x00004968,0x00004925,0x00050084,0x00000006,
45350x00004b0c,0x000001c4,0x0000468a,0x00050080, 49180x00004dea,0x000001cc,0x00004968,0x00050080,
45360x00000006,0x00004b0d,0x000048b0,0x00004b0c, 49190x00000006,0x00004deb,0x00004b8e,0x00004dea,
45370x00050080,0x00000006,0x0000468c,0x00004b0d, 49200x00050080,0x00000006,0x0000496a,0x00004deb,
45380x00000541,0x000500c4,0x00000006,0x0000468f, 49210x000005a7,0x000500c4,0x00000006,0x0000496d,
45390x00004687,0x000004c1,0x000500c5,0x00000006, 49220x00004965,0x00000528,0x000500c5,0x00000006,
45400x00004690,0x0000467f,0x0000468f,0x00050095, 49230x0000496e,0x0000495d,0x0000496d,0x00050095,
45410x0000013d,0x00004b25,0x000048c9,0x0000468c, 49240x00000145,0x00004e03,0x00004ba7,0x0000496a,
45420x00050051,0x00000006,0x00004b26,0x00004b25, 49250x00050051,0x00000006,0x00004e04,0x00004e03,
45430x00000001,0x00050051,0x00000006,0x00004b27, 49260x00000001,0x00050051,0x00000006,0x00004e05,
45440x00004b25,0x00000000,0x00050080,0x00000006, 49270x00004e03,0x00000000,0x00050080,0x00000006,
45450x00004b2c,0x000048d0,0x00004b26,0x00050050, 49280x00004e0a,0x00004bae,0x00004e04,0x00050050,
45460x00000007,0x00004b2d,0x00004b27,0x00004b2c, 49290x00000007,0x00004e0b,0x00004e05,0x00004e0a,
45470x0004007c,0x00000014,0x00004b1d,0x00004b2d, 49300x0004007c,0x00000014,0x00004dfb,0x00004e0b,
45480x00060041,0x0000016c,0x00004b15,0x00004b1d, 49310x00060041,0x00000174,0x00004df3,0x00004dfb,
45490x0000016b,0x0000016b,0x0005003e,0x00004b15, 49320x00000173,0x00000173,0x0005003e,0x00004df3,
45500x00004690,0x00000002,0x00000004,0x00050041, 49330x0000496e,0x00000002,0x00000004,0x00050041,
45510x00000009,0x00004696,0x0000400f,0x00005d9d, 49340x00000009,0x00004974,0x000042ed,0x000061c3,
45520x0004003d,0x00000006,0x00004697,0x00004696, 49350x0004003d,0x00000006,0x00004975,0x00004974,
45530x000500c7,0x00000006,0x00004698,0x00004697, 49360x000500c7,0x00000006,0x00004976,0x00004975,
45540x00000d45,0x000500c5,0x00000006,0x00004699, 49370x00000daa,0x000500c5,0x00000006,0x00004977,
45550x00004698,0x00000142,0x00050041,0x00000009, 49380x00004976,0x0000014a,0x00050041,0x00000009,
45560x0000469a,0x0000400f,0x00005d9f,0x0003003e, 49390x00004978,0x000042ed,0x000061c5,0x0003003e,
45570x0000469a,0x00004699,0x000200f9,0x0000469e, 49400x00004978,0x00004977,0x000200f9,0x0000497c,
45580x000200f8,0x0000469b,0x00050080,0x00000006, 49410x000200f8,0x00004979,0x00050080,0x00000006,
45590x0000469d,0x00005d9f,0x00000264,0x000200f9, 49420x0000497b,0x000061c5,0x0000026c,0x000200f9,
45600x000045e3,0x000200f8,0x0000469e,0x000200f9, 49430x000048c1,0x000200f8,0x0000497c,0x000200f9,
45610x0000469f,0x000200f8,0x0000469f,0x00050080, 49440x0000497d,0x000200f8,0x0000497d,0x00050080,
45620x00000006,0x000046a1,0x00005d9d,0x00000264, 49450x00000006,0x0000497f,0x000061c3,0x0000026c,
45630x000200f9,0x000045cd,0x000200f8,0x000046a2, 49460x000200f9,0x000048ab,0x000200f8,0x00004980,
45640x0004003d,0x000000ed,0x000040ac,0x0000400f, 49470x0004003d,0x000000f4,0x0000438a,0x000042ed,
45650x0003003e,0x00003ff3,0x000040ac,0x000200f9, 49480x0003003e,0x000042d1,0x0000438a,0x000200f9,
45660x000040ad,0x000200f8,0x000040ad,0x000200f9, 49490x0000438b,0x000200f8,0x0000438b,0x000200f9,
45670x000040ae,0x000200f8,0x0000402f,0x000500aa, 49500x0000438c,0x000200f8,0x0000430d,0x000500aa,
45680x0000002f,0x00004032,0x0000402d,0x00000142, 49510x0000002f,0x00004310,0x0000430b,0x0000014a,
45690x000300f7,0x0000403d,0x00000000,0x000400fa, 49520x000300f7,0x0000431b,0x00000000,0x000400fa,
45700x00004032,0x00004033,0x0000403d,0x000200f8, 49530x00004310,0x00004311,0x0000431b,0x000200f8,
45710x00004033,0x00050041,0x000001bb,0x0000411c, 49540x00004311,0x00050041,0x000001c3,0x000043fa,
45720x000001b9,0x000001ba,0x0004003d,0x00000006, 49550x000001c1,0x000001c2,0x0004003d,0x00000006,
45730x0000411d,0x0000411c,0x00050084,0x00000006, 49560x000043fb,0x000043fa,0x00050084,0x00000006,
45740x0000411e,0x000000ec,0x0000411d,0x00050080, 49570x000043fc,0x000000f3,0x000043fb,0x00050080,
45750x00000006,0x0000411f,0x000001c4,0x0000411e, 49580x00000006,0x000043fd,0x000001cc,0x000043fc,
45760x00050041,0x00000266,0x00004035,0x000001b9, 49590x00050041,0x0000026e,0x00004313,0x000001c1,
45770x00000264,0x0004003d,0x00000007,0x00004036, 49600x0000026c,0x0004003d,0x00000007,0x00004314,
45780x00004035,0x00050051,0x00000006,0x00004136, 49610x00004313,0x00050051,0x00000006,0x00004414,
45790x00004036,0x00000000,0x00050095,0x0000013d, 49620x00004314,0x00000000,0x00050095,0x00000145,
45800x00004138,0x00004136,0x0000411f,0x00050051, 49630x00004416,0x00004414,0x000043fd,0x00050051,
45810x00000006,0x00004139,0x00004138,0x00000001, 49640x00000006,0x00004417,0x00004416,0x00000001,
45820x00050051,0x00000006,0x0000413a,0x00004138, 49650x00050051,0x00000006,0x00004418,0x00004416,
45830x00000000,0x00050051,0x00000006,0x0000413d, 49660x00000000,0x00050051,0x00000006,0x0000441b,
45840x00004036,0x00000001,0x00050080,0x00000006, 49670x00004314,0x00000001,0x00050080,0x00000006,
45850x0000413f,0x0000413d,0x00004139,0x00050050, 49680x0000441d,0x0000441b,0x00004417,0x00050050,
45860x00000007,0x00004140,0x0000413a,0x0000413f, 49690x00000007,0x0000441e,0x00004418,0x0000441d,
45870x0004007c,0x00000014,0x00004130,0x00004140, 49700x0004007c,0x00000014,0x0000440e,0x0000441e,
45880x00060041,0x0000016c,0x00004127,0x00004130, 49710x00060041,0x00000174,0x00004405,0x0000440e,
45890x0000016b,0x0000016b,0x0006003d,0x00000006, 49720x00000173,0x00000173,0x0006003d,0x00000006,
45900x00004128,0x00004127,0x00000002,0x00000004, 49730x00004406,0x00004405,0x00000002,0x00000004,
45910x00050041,0x00000009,0x00004038,0x00003ff4, 49740x00050041,0x00000009,0x00004316,0x000042d2,
45920x0000016b,0x0003003e,0x00004038,0x00004128, 49750x00000173,0x0003003e,0x00004316,0x00004406,
45930x0004003d,0x00000006,0x0000403a,0x00004038, 49760x0004003d,0x00000006,0x00004318,0x00004316,
45940x00050041,0x000001bb,0x00004143,0x000001b9, 49770x00050041,0x000001c3,0x00004421,0x000001c1,
45950x0000034a,0x0004003d,0x00000006,0x00004144, 49780x00000352,0x0004003d,0x00000006,0x00004422,
45960x00004143,0x00050041,0x000001bb,0x00004154, 49790x00004421,0x000500c7,0x00000006,0x00004434,
45970x000001b9,0x00000334,0x0004003d,0x00000006, 49800x000013a9,0x0000014a,0x000500ab,0x0000002f,
45980x00004155,0x00004154,0x000500c7,0x00000006, 49810x00004435,0x00004434,0x00000140,0x000600a9,
45990x00004156,0x00004155,0x00000142,0x000500ab, 49820x00000006,0x0000442f,0x00004435,0x0000034a,
46000x0000002f,0x00004157,0x00004156,0x00000138, 49830x000001cc,0x00050084,0x00000006,0x00004425,
46010x000600a9,0x00000006,0x00004151,0x00004157, 49840x00004318,0x0000442f,0x00050080,0x00000006,
46020x00000342,0x000001c4,0x00050084,0x00000006, 49850x00004426,0x00004422,0x00004425,0x000500c2,
46030x00004147,0x0000403a,0x00004151,0x00050080, 49860x00000006,0x00004427,0x00004426,0x00000359,
46040x00000006,0x00004148,0x00004144,0x00004147, 49870x000500c4,0x00000006,0x00004428,0x00004427,
46050x000500c2,0x00000006,0x00004149,0x00004148, 49880x00000325,0x000600a9,0x00000006,0x0000442a,
46060x00000351,0x000500c4,0x00000006,0x0000414a, 49890x00004435,0x0000035d,0x00000140,0x000500c5,
46070x00004149,0x0000031d,0x000600a9,0x00000006, 49900x00000006,0x0000442b,0x00004428,0x0000442a,
46080x0000414c,0x00004157,0x00000355,0x00000138, 49910x00050041,0x00000009,0x0000431a,0x000042d1,
46090x000500c5,0x00000006,0x0000414d,0x0000414a, 49920x00000173,0x0003003e,0x0000431a,0x0000442b,
46100x0000414c,0x00050041,0x00000009,0x0000403c, 49930x000200f9,0x0000431b,0x000200f8,0x0000431b,
46110x00003ff3,0x0000016b,0x0003003e,0x0000403c, 49940x000200f9,0x0000438c,0x000200f8,0x0000438c,
46120x0000414d,0x000200f9,0x0000403d,0x000200f8, 49950x000700f5,0x00000006,0x000061fe,0x00000140,
46130x0000403d,0x000200f9,0x000040ae,0x000200f8, 49960x0000431b,0x00004546,0x0000438b,0x000200f9,
46140x000040ae,0x000700f5,0x00000006,0x00005dd8, 49970x0000438d,0x000200f8,0x0000438d,0x000700f5,
46150x00000138,0x0000403d,0x00004268,0x000040ad, 49980x00000006,0x000061fc,0x00000140,0x0000438c,
46160x000200f9,0x000040af,0x000200f8,0x000040af, 49990x000043a6,0x000043a4,0x000500b0,0x0000002f,
46170x000700f5,0x00000006,0x00005dd6,0x00000138, 50000x00004390,0x000061fc,0x000000f3,0x000400f6,
46180x000040ae,0x000040c8,0x000040c6,0x000500b0, 50010x000043a7,0x000043a4,0x00000000,0x000400fa,
46190x0000002f,0x000040b2,0x00005dd6,0x000000ec, 50020x00004390,0x00004391,0x000043a7,0x000200f8,
46200x000400f6,0x000040c9,0x000040c6,0x00000000, 50030x00004391,0x00050041,0x00000009,0x00004393,
46210x000400fa,0x000040b2,0x000040b3,0x000040c9, 50040x000042d2,0x000061fc,0x0004003d,0x00000006,
46220x000200f8,0x000040b3,0x00050041,0x00000009, 50050x00004394,0x00004393,0x000500ab,0x0000002f,
46230x000040b5,0x00003ff4,0x00005dd6,0x0004003d, 50060x00004395,0x00004394,0x000003bf,0x000300f7,
46240x00000006,0x000040b6,0x000040b5,0x000500ab, 50070x000043a3,0x00000000,0x000400fa,0x00004395,
46250x0000002f,0x000040b7,0x000040b6,0x00000539, 50080x00004396,0x000043a3,0x000200f8,0x00004396,
46260x000300f7,0x000040c5,0x00000000,0x000400fa, 50090x00050041,0x000001c3,0x00004e52,0x000001c1,
46270x000040b7,0x000040b8,0x000040c5,0x000200f8, 50100x000001c2,0x0004003d,0x00000006,0x00004e53,
46280x000040b8,0x00050041,0x000001bb,0x00004b74, 50110x00004e52,0x00050084,0x00000006,0x00004e54,
46290x000001b9,0x000001ba,0x0004003d,0x00000006, 50120x000001e3,0x00004e53,0x00050080,0x00000006,
46300x00004b75,0x00004b74,0x00050084,0x00000006, 50130x00004e55,0x000001cc,0x00004e54,0x00050080,
46310x00004b76,0x000001db,0x00004b75,0x00050080, 50140x00000006,0x00004e5b,0x00004e53,0x00000695,
46320x00000006,0x00004b77,0x000001c4,0x00004b76, 50150x00050086,0x00000006,0x00004e5c,0x00004e5b,
46330x00050080,0x00000006,0x00004b7d,0x00004b75, 50160x000001c6,0x00050084,0x00000006,0x00004e4e,
46340x0000062f,0x00050086,0x00000006,0x00004b7e, 50170x000001cc,0x00004e5c,0x00050080,0x00000006,
46350x00004b7d,0x000001be,0x00050084,0x00000006, 50180x00004e4f,0x00004e55,0x00004e4e,0x00050080,
46360x00004b70,0x000001c4,0x00004b7e,0x00050080, 50190x00000006,0x00004e49,0x00004e4f,0x00004e4e,
46370x00000006,0x00004b71,0x00004b77,0x00004b70, 50200x00050084,0x00000006,0x00004e42,0x000001f7,
46380x00050080,0x00000006,0x00004b6b,0x00004b71, 50210x0000430b,0x00050080,0x00000006,0x00004e43,
46390x00004b70,0x00050084,0x00000006,0x00004b64, 50220x00004e49,0x00004e42,0x00050041,0x000001c3,
46400x000001ef,0x0000402d,0x00050080,0x00000006, 50230x00004e39,0x000001c1,0x0000020e,0x0004003d,
46410x00004b65,0x00004b6b,0x00004b64,0x00050041, 50240x00000006,0x00004e3a,0x00004e39,0x00050084,
46420x000001bb,0x00004b5b,0x000001b9,0x00000206, 50250x00000006,0x00004e3b,0x0000020d,0x00004e3a,
46430x0004003d,0x00000006,0x00004b5c,0x00004b5b, 50260x00050080,0x00000006,0x00004e3c,0x00004e43,
46440x00050084,0x00000006,0x00004b5d,0x00000205, 50270x00004e3b,0x000500ac,0x0000002f,0x00004e69,
46450x00004b5c,0x00050080,0x00000006,0x00004b5e, 50280x0000430b,0x0000014a,0x000300f7,0x00004e6f,
46460x00004b65,0x00004b5d,0x000500ac,0x0000002f, 50290x00000000,0x000400fa,0x00004e69,0x00004e6a,
46470x00004b8b,0x0000402d,0x00000142,0x000300f7, 50300x00004e6e,0x000200f8,0x00004e6e,0x000200f9,
46480x00004b91,0x00000000,0x000400fa,0x00004b8b, 50310x00004e6f,0x000200f8,0x00004e6a,0x00050082,
46490x00004b8c,0x00004b90,0x000200f8,0x00004b90, 50320x00000006,0x00004e6d,0x0000430b,0x0000014a,
46500x000200f9,0x00004b91,0x000200f8,0x00004b8c, 50330x000200f9,0x00004e6f,0x000200f8,0x00004e6f,
46510x00050082,0x00000006,0x00004b8f,0x0000402d, 50340x000700f5,0x00000006,0x00006258,0x00004e6d,
46520x00000142,0x000200f9,0x00004b91,0x000200f8, 50350x00004e6a,0x00000140,0x00004e6e,0x00050084,
46530x00004b91,0x000700f5,0x00000006,0x00005e32, 50360x00000006,0x00004e34,0x000000f3,0x00006258,
46540x00004b8f,0x00004b8c,0x00000138,0x00004b90, 50370x00050080,0x00000006,0x00004e35,0x00004e3c,
46550x00050084,0x00000006,0x00004b56,0x000000ec, 50380x00004e34,0x000300f7,0x00004e7c,0x00000000,
46560x00005e32,0x00050080,0x00000006,0x00004b57, 50390x000400fa,0x00004e69,0x00004e77,0x00004e7b,
46570x00004b5e,0x00004b56,0x000300f7,0x00004b9e, 50400x000200f8,0x00004e7b,0x000200f9,0x00004e7c,
46580x00000000,0x000400fa,0x00004b8b,0x00004b99, 50410x000200f8,0x00004e77,0x00050082,0x00000006,
46590x00004b9d,0x000200f8,0x00004b9d,0x000200f9, 50420x00004e7a,0x0000430b,0x0000014a,0x000200f9,
46600x00004b9e,0x000200f8,0x00004b99,0x00050082, 50430x00004e7c,0x000200f8,0x00004e7c,0x000700f5,
46610x00000006,0x00004b9c,0x0000402d,0x00000142, 50440x00000006,0x00006259,0x00004e7a,0x00004e77,
46620x000200f9,0x00004b9e,0x000200f8,0x00004b9e, 50450x00000140,0x00004e7b,0x00050084,0x00000006,
46630x000700f5,0x00000006,0x00005e33,0x00004b9c, 50460x00004e2e,0x000000f3,0x00006259,0x00050080,
46640x00004b99,0x00000138,0x00004b9d,0x00050084, 50470x00000006,0x00004e2f,0x00004e35,0x00004e2e,
46650x00000006,0x00004b50,0x000000ec,0x00005e33, 50480x000300f7,0x00004e89,0x00000000,0x000400fa,
46660x00050080,0x00000006,0x00004b51,0x00004b57, 50490x00004e69,0x00004e84,0x00004e88,0x000200f8,
46670x00004b50,0x000300f7,0x00004bab,0x00000000, 50500x00004e88,0x000200f9,0x00004e89,0x000200f8,
46680x000400fa,0x00004b8b,0x00004ba6,0x00004baa, 50510x00004e84,0x00050082,0x00000006,0x00004e87,
46690x000200f8,0x00004baa,0x000200f9,0x00004bab, 50520x0000430b,0x0000014a,0x000200f9,0x00004e89,
46700x000200f8,0x00004ba6,0x00050082,0x00000006, 50530x000200f8,0x00004e89,0x000700f5,0x00000006,
46710x00004ba9,0x0000402d,0x00000142,0x000200f9, 50540x0000625a,0x00004e87,0x00004e84,0x00000140,
46720x00004bab,0x000200f8,0x00004bab,0x000700f5, 50550x00004e88,0x00050084,0x00000006,0x00004e28,
46730x00000006,0x00005e34,0x00004ba9,0x00004ba6, 50560x000000f3,0x0000625a,0x00050080,0x00000006,
46740x00000138,0x00004baa,0x00050084,0x00000006, 50570x00004e29,0x00004e2f,0x00004e28,0x000300f7,
46750x00004b4a,0x000000ec,0x00005e34,0x00050080, 50580x00004e96,0x00000000,0x000400fa,0x00004e69,
46760x00000006,0x00004b4b,0x00004b51,0x00004b4a, 50590x00004e91,0x00004e95,0x000200f8,0x00004e95,
46770x000300f7,0x00004bb8,0x00000000,0x000400fa, 50600x000200f9,0x00004e96,0x000200f8,0x00004e91,
46780x00004b8b,0x00004bb3,0x00004bb7,0x000200f8, 50610x00050082,0x00000006,0x00004e94,0x0000430b,
46790x00004bb7,0x000200f9,0x00004bb8,0x000200f8, 50620x0000014a,0x000200f9,0x00004e96,0x000200f8,
46800x00004bb3,0x00050082,0x00000006,0x00004bb6, 50630x00004e96,0x000700f5,0x00000006,0x0000625b,
46810x0000402d,0x00000142,0x000200f9,0x00004bb8, 50640x00004e94,0x00004e91,0x00000140,0x00004e95,
46820x000200f8,0x00004bb8,0x000700f5,0x00000006, 50650x00050084,0x00000006,0x00004e22,0x000000f3,
46830x00005e35,0x00004bb6,0x00004bb3,0x00000138, 50660x0000625b,0x00050080,0x00000006,0x00004e23,
46840x00004bb7,0x00050084,0x00000006,0x00004b44, 50670x00004e29,0x00004e22,0x000300f7,0x00004ea3,
46850x000000ec,0x00005e35,0x00050080,0x00000006, 50680x00000000,0x000400fa,0x00004e69,0x00004e9e,
46860x00004b45,0x00004b4b,0x00004b44,0x000300f7, 50690x00004ea2,0x000200f8,0x00004ea2,0x000200f9,
46870x00004bc5,0x00000000,0x000400fa,0x00004b8b, 50700x00004ea3,0x000200f8,0x00004e9e,0x00050082,
46880x00004bc0,0x00004bc4,0x000200f8,0x00004bc4, 50710x00000006,0x00004ea1,0x0000430b,0x0000014a,
46890x000200f9,0x00004bc5,0x000200f8,0x00004bc0, 50720x000200f9,0x00004ea3,0x000200f8,0x00004ea3,
46900x00050082,0x00000006,0x00004bc3,0x0000402d, 50730x000700f5,0x00000006,0x0000625c,0x00004ea1,
46910x00000142,0x000200f9,0x00004bc5,0x000200f8, 50740x00004e9e,0x00000140,0x00004ea2,0x00050084,
46920x00004bc5,0x000700f5,0x00000006,0x00005e36, 50750x00000006,0x00004e1c,0x000000f3,0x0000625c,
46930x00004bc3,0x00004bc0,0x00000138,0x00004bc4, 50760x00050080,0x00000006,0x00004e1d,0x00004e23,
46940x00050084,0x00000006,0x00004b3e,0x000000ec, 50770x00004e1c,0x000300f7,0x00004eb6,0x00000000,
46950x00005e36,0x00050080,0x00000006,0x00004b3f, 50780x000400fa,0x00004e69,0x00004eb1,0x00004eb5,
46960x00004b45,0x00004b3e,0x000300f7,0x00004bd8, 50790x000200f8,0x00004eb5,0x000200f9,0x00004eb6,
46970x00000000,0x000400fa,0x00004b8b,0x00004bd3, 50800x000200f8,0x00004eb1,0x00050082,0x00000006,
46980x00004bd7,0x000200f8,0x00004bd7,0x000200f9, 50810x00004eb4,0x0000430b,0x0000014a,0x000200f9,
46990x00004bd8,0x000200f8,0x00004bd3,0x00050082, 50820x00004eb6,0x000200f8,0x00004eb6,0x000700f5,
47000x00000006,0x00004bd6,0x0000402d,0x00000142, 50830x00000006,0x0000625d,0x00004eb4,0x00004eb1,
47010x000200f9,0x00004bd8,0x000200f8,0x00004bd8, 50840x00000140,0x00004eb5,0x00050080,0x00000006,
47020x000700f5,0x00000006,0x00005e37,0x00004bd6, 50850x00004ea9,0x0000625d,0x00000695,0x00050086,
47030x00004bd3,0x00000138,0x00004bd7,0x00050080, 50860x00000006,0x00004eaa,0x00004ea9,0x000001c6,
47040x00000006,0x00004bcb,0x00005e37,0x0000062f, 50870x00050084,0x00000006,0x00004e16,0x000000f3,
47050x00050086,0x00000006,0x00004bcc,0x00004bcb, 50880x00004eaa,0x00050080,0x00000006,0x00004e17,
47060x000001be,0x00050084,0x00000006,0x00004b38, 50890x00004e1d,0x00004e16,0x000300f7,0x00004ec9,
47070x000000ec,0x00004bcc,0x00050080,0x00000006, 50900x00000000,0x000400fa,0x00004e69,0x00004ec4,
47080x00004b39,0x00004b3f,0x00004b38,0x000300f7, 50910x00004ec8,0x000200f8,0x00004ec8,0x000200f9,
47090x00004beb,0x00000000,0x000400fa,0x00004b8b, 50920x00004ec9,0x000200f8,0x00004ec4,0x00050082,
47100x00004be6,0x00004bea,0x000200f8,0x00004bea, 50930x00000006,0x00004ec7,0x0000430b,0x0000014a,
47110x000200f9,0x00004beb,0x000200f8,0x00004be6, 50940x000200f9,0x00004ec9,0x000200f8,0x00004ec9,
47120x00050082,0x00000006,0x00004be9,0x0000402d, 50950x000700f5,0x00000006,0x0000625e,0x00004ec7,
47130x00000142,0x000200f9,0x00004beb,0x000200f8, 50960x00004ec4,0x00000140,0x00004ec8,0x00050080,
47140x00004beb,0x000700f5,0x00000006,0x00005e38, 50970x00000006,0x00004ebc,0x0000625e,0x00000695,
47150x00004be9,0x00004be6,0x00000138,0x00004bea, 50980x00050086,0x00000006,0x00004ebd,0x00004ebc,
47160x00050080,0x00000006,0x00004bde,0x00005e38, 50990x000001c6,0x00050084,0x00000006,0x00004e10,
47170x0000062f,0x00050086,0x00000006,0x00004bdf, 51000x000000f3,0x00004ebd,0x00050080,0x00000006,
47180x00004bde,0x000001be,0x00050084,0x00000006, 51010x00004e11,0x00004e17,0x00004e10,0x0004003d,
47190x00004b32,0x000000ec,0x00004bdf,0x00050080, 51020x00000006,0x0000439a,0x00004393,0x00050084,
47200x00000006,0x00004b33,0x00004b39,0x00004b32, 51030x00000006,0x0000439b,0x000000f3,0x0000439a,
47210x0004003d,0x00000006,0x000040bc,0x000040b5, 51040x00050080,0x00000006,0x0000439c,0x00004e11,
47220x00050084,0x00000006,0x000040bd,0x000000ec, 51050x0000439b,0x00050041,0x0000026e,0x0000439e,
47230x000040bc,0x00050080,0x00000006,0x000040be, 51060x000001c1,0x0000026c,0x0004003d,0x00000007,
47240x00004b33,0x000040bd,0x00050041,0x00000266, 51070x0000439f,0x0000439e,0x00050041,0x00000009,
47250x000040c0,0x000001b9,0x00000264,0x0004003d, 51080x000043a0,0x000042d1,0x000061fc,0x0004003d,
47260x00000007,0x000040c1,0x000040c0,0x00050041, 51090x00000006,0x000043a1,0x000043a0,0x00050051,
47270x00000009,0x000040c2,0x00003ff3,0x00005dd6, 51100x00000006,0x00004ee0,0x0000439f,0x00000000,
47280x0004003d,0x00000006,0x000040c3,0x000040c2, 51110x00050095,0x00000145,0x00004ee2,0x00004ee0,
47290x00050051,0x00000006,0x00004c02,0x000040c1, 51120x0000439c,0x00050051,0x00000006,0x00004ee3,
47300x00000000,0x00050095,0x0000013d,0x00004c04, 51130x00004ee2,0x00000001,0x00050051,0x00000006,
47310x00004c02,0x000040be,0x00050051,0x00000006, 51140x00004ee4,0x00004ee2,0x00000000,0x00050051,
47320x00004c05,0x00004c04,0x00000001,0x00050051, 51150x00000006,0x00004ee7,0x0000439f,0x00000001,
47330x00000006,0x00004c06,0x00004c04,0x00000000, 51160x00050080,0x00000006,0x00004ee9,0x00004ee7,
47340x00050051,0x00000006,0x00004c09,0x000040c1, 51170x00004ee3,0x00050050,0x00000007,0x00004eea,
47350x00000001,0x00050080,0x00000006,0x00004c0b, 51180x00004ee4,0x00004ee9,0x0004007c,0x00000014,
47360x00004c09,0x00004c05,0x00050050,0x00000007, 51190x00004eda,0x00004eea,0x00060041,0x00000174,
47370x00004c0c,0x00004c06,0x00004c0b,0x0004007c, 51200x00004ed2,0x00004eda,0x00000173,0x00000173,
47380x00000014,0x00004bfc,0x00004c0c,0x00060041, 51210x0005003e,0x00004ed2,0x000043a1,0x00000002,
47390x0000016c,0x00004bf4,0x00004bfc,0x0000016b, 51220x00000004,0x000200f9,0x000043a3,0x000200f8,
47400x0000016b,0x0005003e,0x00004bf4,0x000040c3, 51230x000043a3,0x000200f9,0x000043a4,0x000200f8,
47410x00000002,0x00000004,0x000200f9,0x000040c5, 51240x000043a4,0x00050080,0x00000006,0x000043a6,
47420x000200f8,0x000040c5,0x000200f9,0x000040c6, 51250x000061fc,0x0000026c,0x000200f9,0x0000438d,
47430x000200f8,0x000040c6,0x00050080,0x00000006, 51260x000200f8,0x000043a7,0x00050041,0x000001c3,
47440x000040c8,0x00005dd6,0x00000264,0x000200f9, 51270x00004eed,0x000001c1,0x00000362,0x0004003d,
47450x000040af,0x000200f8,0x000040c9,0x00050041, 51280x00000006,0x00004eee,0x00004eed,0x000500c7,
47460x000001bb,0x00004c0f,0x000001b9,0x0000035a, 51290x00000006,0x00004f00,0x000013a9,0x00000288,
47470x0004003d,0x00000006,0x00004c10,0x00004c0f, 51300x000500ab,0x0000002f,0x00004f01,0x00004f00,
47480x00050041,0x000001bb,0x00004c20,0x000001b9, 51310x00000140,0x000600a9,0x00000006,0x00004efb,
47490x00000334,0x0004003d,0x00000006,0x00004c21, 51320x00004f01,0x000001cc,0x0000034a,0x00050084,
47500x00004c20,0x000500c7,0x00000006,0x00004c22, 51330x00000006,0x00004ef1,0x000061fe,0x00004efb,
47510x00004c21,0x00000280,0x000500ab,0x0000002f, 51340x00050080,0x00000006,0x00004ef2,0x00004eee,
47520x00004c23,0x00004c22,0x00000138,0x000600a9, 51350x00004ef1,0x000500c2,0x00000006,0x00004ef3,
47530x00000006,0x00004c1d,0x00004c23,0x000001c4, 51360x00004ef2,0x00000359,0x000500c4,0x00000006,
47540x00000342,0x00050084,0x00000006,0x00004c13, 51370x00004ef4,0x00004ef3,0x00000325,0x000600a9,
47550x00005dd8,0x00004c1d,0x00050080,0x00000006, 51380x00000006,0x00004ef6,0x00004f01,0x000000f3,
47560x00004c14,0x00004c10,0x00004c13,0x000500c2, 51390x0000036c,0x000500c5,0x00000006,0x00004ef7,
47570x00000006,0x00004c15,0x00004c14,0x00000351, 51400x00004ef4,0x00004ef6,0x000200f9,0x000043b0,
47580x000500c4,0x00000006,0x00004c16,0x00004c15, 51410x000200f8,0x000043b0,0x000700f5,0x00000006,
47590x0000031d,0x000600a9,0x00000006,0x00004c18, 51420x00006221,0x00000140,0x000043a7,0x000043de,
47600x00004c23,0x000000ec,0x00000364,0x000500c5, 51430x000043dc,0x000500b0,0x0000002f,0x000043b3,
47610x00000006,0x00004c19,0x00004c16,0x00004c18, 51440x00006221,0x000000f3,0x000400f6,0x000043df,
47620x000200f9,0x000040d2,0x000200f8,0x000040d2, 51450x000043dc,0x00000000,0x000400fa,0x000043b3,
47630x000700f5,0x00000006,0x00005dfb,0x00000138, 51460x000043b4,0x000043df,0x000200f8,0x000043b4,
47640x000040c9,0x00004100,0x000040fe,0x000500b0, 51470x00050084,0x00000006,0x000043b7,0x000000f3,
47650x0000002f,0x000040d5,0x00005dfb,0x000000ec, 51480x00006221,0x00050080,0x00000006,0x000043b8,
47660x000400f6,0x00004101,0x000040fe,0x00000000, 51490x00004ef2,0x000043b7,0x00050041,0x0000026e,
47670x000400fa,0x000040d5,0x000040d6,0x00004101, 51500x000043ba,0x000001c1,0x00000173,0x0004003d,
47680x000200f8,0x000040d6,0x00050084,0x00000006, 51510x00000007,0x000043bb,0x000043ba,0x00050041,
47690x000040d9,0x000000ec,0x00005dfb,0x00050080, 51520x00000009,0x000043bc,0x000042d1,0x00006221,
47700x00000006,0x000040da,0x00004c14,0x000040d9, 51530x0004003d,0x00000006,0x000043bd,0x000043bc,
47710x00050041,0x00000266,0x000040dc,0x000001b9, 51540x00050051,0x00000006,0x00004f27,0x000043bb,
47720x0000016b,0x0004003d,0x00000007,0x000040dd, 51550x00000000,0x00050095,0x00000145,0x00004f29,
47730x000040dc,0x00050041,0x00000009,0x000040de, 51560x00004f27,0x000043b8,0x00050051,0x00000006,
47740x00003ff3,0x00005dfb,0x0004003d,0x00000006, 51570x00004f2a,0x00004f29,0x00000001,0x00050051,
47750x000040df,0x000040de,0x00050051,0x00000006, 51580x00000006,0x00004f2b,0x00004f29,0x00000000,
47760x00004c49,0x000040dd,0x00000000,0x00050095, 51590x00050051,0x00000006,0x00004f2e,0x000043bb,
47770x0000013d,0x00004c4b,0x00004c49,0x000040da, 51600x00000001,0x00050080,0x00000006,0x00004f30,
47780x00050051,0x00000006,0x00004c4c,0x00004c4b, 51610x00004f2e,0x00004f2a,0x00050050,0x00000007,
47790x00000001,0x00050051,0x00000006,0x00004c4d, 51620x00004f31,0x00004f2b,0x00004f30,0x0004007c,
47800x00004c4b,0x00000000,0x00050051,0x00000006, 51630x00000014,0x00004f21,0x00004f31,0x00060041,
47810x00004c50,0x000040dd,0x00000001,0x00050080, 51640x00000174,0x00004f19,0x00004f21,0x00000173,
47820x00000006,0x00004c52,0x00004c50,0x00004c4c, 51650x00000173,0x0005003e,0x00004f19,0x000043bd,
47830x00050050,0x00000007,0x00004c53,0x00004c4d, 51660x00000002,0x00000004,0x0004003d,0x00000006,
47840x00004c52,0x0004007c,0x00000014,0x00004c43, 51670x000043c1,0x000043bc,0x000500ab,0x0000002f,
47850x00004c53,0x00060041,0x0000016c,0x00004c3b, 51680x000043c2,0x000043c1,0x000003bf,0x000300f7,
47860x00004c43,0x0000016b,0x0000016b,0x0005003e, 51690x000043d4,0x00000000,0x000400fa,0x000043c2,
47870x00004c3b,0x000040df,0x00000002,0x00000004, 51700x000043c3,0x000043d4,0x000200f8,0x000043c3,
47880x0004003d,0x00000006,0x000040e3,0x000040de, 51710x00050041,0x000001c3,0x000043c4,0x000001c1,
47890x000500ab,0x0000002f,0x000040e4,0x000040e3, 51720x000003c1,0x0004003d,0x00000006,0x000043c5,
47900x00000539,0x000300f7,0x000040f6,0x00000000, 51730x000043c4,0x0004003d,0x00000006,0x000043c8,
47910x000400fa,0x000040e4,0x000040e5,0x000040f6, 51740x000043bc,0x000500c2,0x00000006,0x00004f35,
47920x000200f8,0x000040e5,0x00050041,0x000001bb, 51750x000043c8,0x00000325,0x00050041,0x000001c3,
47930x000040e6,0x000001b9,0x000010be,0x0004003d, 51760x000043ca,0x000001c1,0x00000352,0x0004003d,
47940x00000006,0x000040e7,0x000040e6,0x0004003d, 51770x00000006,0x000043cb,0x000043ca,0x00050086,
47950x00000006,0x000040ea,0x000040de,0x000500c2, 51780x00000006,0x000043cc,0x000043cb,0x000001cc,
47960x00000006,0x00004c57,0x000040ea,0x0000031d, 51790x00050082,0x00000006,0x000043cd,0x00004f35,
47970x00050041,0x000001bb,0x000040ec,0x000001b9, 51800x000043cc,0x00050084,0x00000006,0x000043ce,
47980x0000034a,0x0004003d,0x00000006,0x000040ed, 51810x000000f3,0x000043cd,0x00050080,0x00000006,
47990x000040ec,0x00050086,0x00000006,0x000040ee, 51820x000043cf,0x000043c5,0x000043ce,0x00050095,
48000x000040ed,0x000001c4,0x00050082,0x00000006, 51830x00000145,0x00004f4d,0x00004f27,0x000043cf,
48010x000040ef,0x00004c57,0x000040ee,0x00050084, 51840x00050051,0x00000006,0x00004f4e,0x00004f4d,
48020x00000006,0x000040f0,0x000000ec,0x000040ef, 51850x00000001,0x00050051,0x00000006,0x00004f4f,
48030x00050080,0x00000006,0x000040f1,0x000040e7, 51860x00004f4d,0x00000000,0x00050080,0x00000006,
48040x000040f0,0x00050095,0x0000013d,0x00004c6f, 51870x00004f54,0x00004f2e,0x00004f4e,0x00050050,
48050x00004c49,0x000040f1,0x00050051,0x00000006, 51880x00000007,0x00004f55,0x00004f4f,0x00004f54,
48060x00004c70,0x00004c6f,0x00000001,0x00050051, 51890x0004007c,0x00000014,0x00004f45,0x00004f55,
48070x00000006,0x00004c71,0x00004c6f,0x00000000, 51900x00060041,0x00000174,0x00004f3d,0x00004f45,
48080x00050080,0x00000006,0x00004c76,0x00004c50, 51910x00000173,0x00000173,0x0005003e,0x00004f3d,
48090x00004c70,0x00050050,0x00000007,0x00004c77, 51920x00004ef7,0x00000002,0x00000004,0x000200f9,
48100x00004c71,0x00004c76,0x0004007c,0x00000014, 51930x000043dc,0x000200f8,0x000043d4,0x000300f7,
48110x00004c67,0x00004c77,0x00060041,0x0000016c, 51940x00004fae,0x00000000,0x000300fb,0x00000140,
48120x00004c5f,0x00004c67,0x0000016b,0x0000016b, 51950x00004f74,0x000200f8,0x00004f74,0x000300f7,
48130x0005003e,0x00004c5f,0x00004c19,0x00000002, 51960x00004f7f,0x00000000,0x000400fa,0x00004f01,
48140x00000004,0x000200f9,0x000040fe,0x000200f8, 51970x00004f76,0x00004f7f,0x000200f8,0x00004f76,
48150x000040f6,0x000300f7,0x00004cd0,0x00000000, 51980x00050080,0x00000006,0x00004f78,0x00004ef2,
48160x000300fb,0x00000138,0x00004c96,0x000200f8, 51990x000001e3,0x00050084,0x00000006,0x00004f7a,
48170x00004c96,0x000300f7,0x00004ca1,0x00000000, 52000x000001dc,0x00006221,0x00050080,0x00000006,
48180x000400fa,0x00004c23,0x00004c98,0x00004ca1, 52010x00004f7b,0x00004f78,0x00004f7a,0x00050095,
48190x000200f8,0x00004c98,0x00050080,0x00000006, 52020x00000145,0x000050aa,0x00004f27,0x00004f7b,
48200x00004c9a,0x00004c14,0x000001db,0x00050084, 52030x00050051,0x00000006,0x000050ab,0x000050aa,
48210x00000006,0x00004c9c,0x000001d4,0x00005dfb, 52040x00000001,0x00050051,0x00000006,0x000050ac,
48220x00050080,0x00000006,0x00004c9d,0x00004c9a, 52050x000050aa,0x00000000,0x00050080,0x00000006,
48230x00004c9c,0x00050095,0x0000013d,0x00004dcc, 52060x000050b1,0x00004f2e,0x000050ab,0x00050050,
48240x00004c49,0x00004c9d,0x00050051,0x00000006, 52070x00000007,0x000050b2,0x000050ac,0x000050b1,
48250x00004dcd,0x00004dcc,0x00000001,0x00050051, 52080x0004007c,0x00000014,0x000050a2,0x000050b2,
48260x00000006,0x00004dce,0x00004dcc,0x00000000, 52090x00060041,0x00000174,0x0000509a,0x000050a2,
48270x00050080,0x00000006,0x00004dd3,0x00004c50, 52100x00000173,0x00000173,0x0005003e,0x0000509a,
48280x00004dcd,0x00050050,0x00000007,0x00004dd4, 52110x00006548,0x00000002,0x00000004,0x00050080,
48290x00004dce,0x00004dd3,0x0004007c,0x00000014, 52120x00000006,0x00004fd2,0x00004f7b,0x000000f3,
48300x00004dc4,0x00004dd4,0x00060041,0x0000016c, 52130x00050095,0x00000145,0x00005172,0x00004f27,
48310x00004dbc,0x00004dc4,0x0000016b,0x0000016b, 52140x00004fd2,0x00050051,0x00000006,0x00005173,
48320x0005003e,0x00004dbc,0x00006112,0x00000002, 52150x00005172,0x00000001,0x00050051,0x00000006,
48330x00000004,0x00050080,0x00000006,0x00004cf4, 52160x00005174,0x00005172,0x00000000,0x00050080,
48340x00004c9d,0x000000ec,0x00050095,0x0000013d, 52170x00000006,0x00005179,0x00004f2e,0x00005173,
48350x00004e94,0x00004c49,0x00004cf4,0x00050051, 52180x00050050,0x00000007,0x0000517a,0x00005174,
48360x00000006,0x00004e95,0x00004e94,0x00000001, 52190x00005179,0x0004007c,0x00000014,0x0000516a,
48370x00050051,0x00000006,0x00004e96,0x00004e94, 52200x0000517a,0x00060041,0x00000174,0x00005162,
48380x00000000,0x00050080,0x00000006,0x00004e9b, 52210x0000516a,0x00000173,0x00000173,0x0005003e,
48390x00004c50,0x00004e95,0x00050050,0x00000007, 52220x00005162,0x0000654a,0x00000002,0x00000004,
48400x00004e9c,0x00004e96,0x00004e9b,0x0004007c, 52230x00050080,0x00000006,0x00004fdf,0x00004f7b,
48410x00000014,0x00004e8c,0x00004e9c,0x00060041, 52240x000001d5,0x00050095,0x00000145,0x0000523a,
48420x0000016c,0x00004e84,0x00004e8c,0x0000016b, 52250x00004f27,0x00004fdf,0x00050051,0x00000006,
48430x0000016b,0x0005003e,0x00004e84,0x00006114, 52260x0000523b,0x0000523a,0x00000001,0x00050051,
48440x00000002,0x00000004,0x00050080,0x00000006, 52270x00000006,0x0000523c,0x0000523a,0x00000000,
48450x00004d01,0x00004c9d,0x000001cd,0x00050095, 52280x00050080,0x00000006,0x00005241,0x00004f2e,
48460x0000013d,0x00004f5c,0x00004c49,0x00004d01, 52290x0000523b,0x00050050,0x00000007,0x00005242,
48470x00050051,0x00000006,0x00004f5d,0x00004f5c, 52300x0000523c,0x00005241,0x0004007c,0x00000014,
48480x00000001,0x00050051,0x00000006,0x00004f5e, 52310x00005232,0x00005242,0x00060041,0x00000174,
48490x00004f5c,0x00000000,0x00050080,0x00000006, 52320x0000522a,0x00005232,0x00000173,0x00000173,
48500x00004f63,0x00004c50,0x00004f5d,0x00050050, 52330x0005003e,0x0000522a,0x0000654b,0x00000002,
48510x00000007,0x00004f64,0x00004f5e,0x00004f63, 52340x00000004,0x000200f9,0x00004fae,0x000200f8,
48520x0004007c,0x00000014,0x00004f54,0x00004f64, 52350x00004f7f,0x00050080,0x00000006,0x00004f81,
48530x00060041,0x0000016c,0x00004f4c,0x00004f54, 52360x00004ef2,0x000001e3,0x00050084,0x00000006,
48540x0000016b,0x0000016b,0x0005003e,0x00004f4c, 52370x00004f83,0x000001f7,0x00006221,0x00050080,
48550x00006115,0x00000002,0x00000004,0x000200f9, 52380x00000006,0x00004f84,0x00004f81,0x00004f83,
48560x00004cd0,0x000200f8,0x00004ca1,0x00050080, 52390x00050095,0x00000145,0x00005263,0x00004f27,
48570x00000006,0x00004ca3,0x00004c14,0x000001db, 52400x00004f84,0x00050051,0x00000006,0x00005264,
48580x00050084,0x00000006,0x00004ca5,0x000001ef, 52410x00005263,0x00000001,0x00050051,0x00000006,
48590x00005dfb,0x00050080,0x00000006,0x00004ca6, 52420x00005265,0x00005263,0x00000000,0x00050080,
48600x00004ca3,0x00004ca5,0x00050095,0x0000013d, 52430x00000006,0x0000526a,0x00004f2e,0x00005264,
48610x00004f85,0x00004c49,0x00004ca6,0x00050051, 52440x00050050,0x00000007,0x0000526b,0x00005265,
48620x00000006,0x00004f86,0x00004f85,0x00000001, 52450x0000526a,0x0004007c,0x00000014,0x0000525b,
48630x00050051,0x00000006,0x00004f87,0x00004f85, 52460x0000526b,0x00060041,0x00000174,0x00005253,
48640x00000000,0x00050080,0x00000006,0x00004f8c, 52470x0000525b,0x00000173,0x00000173,0x0005003e,
48650x00004c50,0x00004f86,0x00050050,0x00000007, 52480x00005253,0x000003dc,0x00000002,0x00000004,
48660x00004f8d,0x00004f87,0x00004f8c,0x0004007c, 52490x00050080,0x00000006,0x00004f8c,0x00004f84,
48670x00000014,0x00004f7d,0x00004f8d,0x00060041, 52500x000000f3,0x00050095,0x00000145,0x0000528c,
48680x0000016c,0x00004f75,0x00004f7d,0x0000016b, 52510x00004f27,0x00004f8c,0x00050051,0x00000006,
48690x0000016b,0x0005003e,0x00004f75,0x0000037e, 52520x0000528d,0x0000528c,0x00000001,0x00050051,
48700x00000002,0x00000004,0x00050080,0x00000006, 52530x00000006,0x0000528e,0x0000528c,0x00000000,
48710x00004cae,0x00004ca6,0x000000ec,0x00050095, 52540x00050080,0x00000006,0x00005293,0x00004f2e,
48720x0000013d,0x00004fae,0x00004c49,0x00004cae, 52550x0000528d,0x00050050,0x00000007,0x00005294,
48730x00050051,0x00000006,0x00004faf,0x00004fae, 52560x0000528e,0x00005293,0x0004007c,0x00000014,
48740x00000001,0x00050051,0x00000006,0x00004fb0, 52570x00005284,0x00005294,0x00060041,0x00000174,
48750x00004fae,0x00000000,0x00050080,0x00000006, 52580x0000527c,0x00005284,0x00000173,0x00000173,
48760x00004fb5,0x00004c50,0x00004faf,0x00050050, 52590x0005003e,0x0000527c,0x000003dc,0x00000002,
48770x00000007,0x00004fb6,0x00004fb0,0x00004fb5, 52600x00000004,0x00050080,0x00000006,0x00004f93,
48780x0004007c,0x00000014,0x00004fa6,0x00004fb6, 52610x00004f84,0x000001d5,0x00050095,0x00000145,
48790x00060041,0x0000016c,0x00004f9e,0x00004fa6, 52620x000052b5,0x00004f27,0x00004f93,0x00050051,
48800x0000016b,0x0000016b,0x0005003e,0x00004f9e, 52630x00000006,0x000052b6,0x000052b5,0x00000001,
48810x0000037e,0x00000002,0x00000004,0x00050080, 52640x00050051,0x00000006,0x000052b7,0x000052b5,
48820x00000006,0x00004cb5,0x00004ca6,0x000001cd, 52650x00000000,0x00050080,0x00000006,0x000052bc,
48830x00050095,0x0000013d,0x00004fd7,0x00004c49, 52660x00004f2e,0x000052b6,0x00050050,0x00000007,
48840x00004cb5,0x00050051,0x00000006,0x00004fd8, 52670x000052bd,0x000052b7,0x000052bc,0x0004007c,
48850x00004fd7,0x00000001,0x00050051,0x00000006, 52680x00000014,0x000052ad,0x000052bd,0x00060041,
48860x00004fd9,0x00004fd7,0x00000000,0x00050080, 52690x00000174,0x000052a5,0x000052ad,0x00000173,
48870x00000006,0x00004fde,0x00004c50,0x00004fd8, 52700x00000173,0x0005003e,0x000052a5,0x000003dc,
48880x00050050,0x00000007,0x00004fdf,0x00004fd9,
48890x00004fde,0x0004007c,0x00000014,0x00004fcf,
48900x00004fdf,0x00060041,0x0000016c,0x00004fc7,
48910x00004fcf,0x0000016b,0x0000016b,0x0005003e,
48920x00004fc7,0x0000037e,0x00000002,0x00000004,
48930x00050080,0x00000006,0x00004cbc,0x00004ca6,
48940x000001d4,0x00050095,0x0000013d,0x00005000,
48950x00004c49,0x00004cbc,0x00050051,0x00000006,
48960x00005001,0x00005000,0x00000001,0x00050051,
48970x00000006,0x00005002,0x00005000,0x00000000,
48980x00050080,0x00000006,0x00005007,0x00004c50,
48990x00005001,0x00050050,0x00000007,0x00005008,
49000x00005002,0x00005007,0x0004007c,0x00000014,
49010x00004ff8,0x00005008,0x00060041,0x0000016c,
49020x00004ff0,0x00004ff8,0x0000016b,0x0000016b,
49030x0005003e,0x00004ff0,0x00006100,0x00000002,
49040x00000004,0x00050080,0x00000006,0x00004cc3,
49050x00004ca6,0x000001db,0x00050095,0x0000013d,
49060x00005029,0x00004c49,0x00004cc3,0x00050051,
49070x00000006,0x0000502a,0x00005029,0x00000001,
49080x00050051,0x00000006,0x0000502b,0x00005029,
49090x00000000,0x00050080,0x00000006,0x00005030,
49100x00004c50,0x0000502a,0x00050050,0x00000007,
49110x00005031,0x0000502b,0x00005030,0x0004007c,
49120x00000014,0x00005021,0x00005031,0x00060041,
49130x0000016c,0x00005019,0x00005021,0x0000016b,
49140x0000016b,0x0005003e,0x00005019,0x00006100,
49150x00000002,0x00000004,0x00050080,0x00000006, 52710x00000002,0x00000004,0x00050080,0x00000006,
49160x00004cca,0x00004ca6,0x00000299,0x00050095, 52720x00004f9a,0x00004f84,0x000001dc,0x00050095,
49170x0000013d,0x00005052,0x00004c49,0x00004cca, 52730x00000145,0x000052de,0x00004f27,0x00004f9a,
49180x00050051,0x00000006,0x00005053,0x00005052, 52740x00050051,0x00000006,0x000052df,0x000052de,
49190x00000001,0x00050051,0x00000006,0x00005054, 52750x00000001,0x00050051,0x00000006,0x000052e0,
49200x00005052,0x00000000,0x00050080,0x00000006, 52760x000052de,0x00000000,0x00050080,0x00000006,
49210x00005059,0x00004c50,0x00005053,0x00050050, 52770x000052e5,0x00004f2e,0x000052df,0x00050050,
49220x00000007,0x0000505a,0x00005054,0x00005059, 52780x00000007,0x000052e6,0x000052e0,0x000052e5,
49230x0004007c,0x00000014,0x0000504a,0x0000505a, 52790x0004007c,0x00000014,0x000052d6,0x000052e6,
49240x00060041,0x0000016c,0x00005042,0x0000504a, 52800x00060041,0x00000174,0x000052ce,0x000052d6,
49250x0000016b,0x0000016b,0x0005003e,0x00005042, 52810x00000173,0x00000173,0x0005003e,0x000052ce,
49260x00006100,0x00000002,0x00000004,0x000200f9, 52820x00006534,0x00000002,0x00000004,0x00050080,
49270x00004cd0,0x000200f8,0x00004cd0,0x000200f9, 52830x00000006,0x00004fa1,0x00004f84,0x000001e3,
49280x000040fe,0x000200f8,0x000040fe,0x00050080, 52840x00050095,0x00000145,0x00005307,0x00004f27,
49290x00000006,0x00004100,0x00005dfb,0x00000264, 52850x00004fa1,0x00050051,0x00000006,0x00005308,
49300x000200f9,0x000040d2,0x000200f8,0x00004101, 52860x00005307,0x00000001,0x00050051,0x00000006,
49310x000400a8,0x0000002f,0x00004103,0x00004c23, 52870x00005309,0x00005307,0x00000000,0x00050080,
49320x000300f7,0x00004116,0x00000000,0x000400fa, 52880x00000006,0x0000530e,0x00004f2e,0x00005308,
49330x00004103,0x00004104,0x00004116,0x000200f8, 52890x00050050,0x00000007,0x0000530f,0x00005309,
49340x00004104,0x000200f9,0x00004105,0x000200f8, 52900x0000530e,0x0004007c,0x00000014,0x000052ff,
49350x00004105,0x000700f5,0x00000006,0x00005dfc, 52910x0000530f,0x00060041,0x00000174,0x000052f7,
49360x00000138,0x00004104,0x00004114,0x00004109, 52920x000052ff,0x00000173,0x00000173,0x0005003e,
49370x000500b0,0x0000002f,0x00004108,0x00005dfc, 52930x000052f7,0x00006534,0x00000002,0x00000004,
49380x000000ec,0x000400f6,0x00004115,0x00004109, 52940x00050080,0x00000006,0x00004fa8,0x00004f84,
49390x00000000,0x000400fa,0x00004108,0x00004109, 52950x000002a1,0x00050095,0x00000145,0x00005330,
49400x00004115,0x000200f8,0x00004109,0x00050080, 52960x00004f27,0x00004fa8,0x00050051,0x00000006,
49410x00000006,0x0000410b,0x00004c14,0x00000840, 52970x00005331,0x00005330,0x00000001,0x00050051,
49420x00050084,0x00000006,0x0000410d,0x000000ec, 52980x00000006,0x00005332,0x00005330,0x00000000,
49430x00005dfc,0x00050080,0x00000006,0x0000410e, 52990x00050080,0x00000006,0x00005337,0x00004f2e,
49440x0000410b,0x0000410d,0x00050041,0x00000266, 53000x00005331,0x00050050,0x00000007,0x00005338,
49450x0000410f,0x000001b9,0x0000016b,0x0004003d, 53010x00005332,0x00005337,0x0004007c,0x00000014,
49460x00000007,0x00004110,0x0000410f,0x00050051, 53020x00005328,0x00005338,0x00060041,0x00000174,
49470x00000006,0x00005076,0x00004110,0x00000000, 53030x00005320,0x00005328,0x00000173,0x00000173,
49480x00050095,0x0000013d,0x00005078,0x00005076, 53040x0005003e,0x00005320,0x00006534,0x00000002,
49490x0000410e,0x00050051,0x00000006,0x00005079, 53050x00000004,0x000200f9,0x00004fae,0x000200f8,
49500x00005078,0x00000001,0x00050051,0x00000006, 53060x00004fae,0x000200f9,0x000043dc,0x000200f8,
49510x0000507a,0x00005078,0x00000000,0x00050051, 53070x000043dc,0x00050080,0x00000006,0x000043de,
49520x00000006,0x0000507d,0x00004110,0x00000001, 53080x00006221,0x0000026c,0x000200f9,0x000043b0,
49530x00050080,0x00000006,0x0000507f,0x0000507d, 53090x000200f8,0x000043df,0x000400a8,0x0000002f,
49540x00005079,0x00050050,0x00000007,0x00005080, 53100x000043e1,0x00004f01,0x000300f7,0x000043f4,
49550x0000507a,0x0000507f,0x0004007c,0x00000014, 53110x00000000,0x000400fa,0x000043e1,0x000043e2,
49560x00005070,0x00005080,0x00060041,0x0000016c, 53120x000043f4,0x000200f8,0x000043e2,0x000200f9,
49570x00005068,0x00005070,0x0000016b,0x0000016b, 53130x000043e3,0x000200f8,0x000043e3,0x000700f5,
49580x0005003e,0x00005068,0x00000138,0x00000002, 53140x00000006,0x00006222,0x00000140,0x000043e2,
49590x00000004,0x00050080,0x00000006,0x00004114, 53150x000043f2,0x000043e7,0x000500b0,0x0000002f,
49600x00005dfc,0x00000264,0x000200f9,0x00004105, 53160x000043e6,0x00006222,0x000000f3,0x000400f6,
49610x000200f8,0x00004115,0x000200f9,0x00004116, 53170x000043f3,0x000043e7,0x00000000,0x000400fa,
49620x000200f8,0x00004116,0x00050041,0x000001bb, 53180x000043e6,0x000043e7,0x000043f3,0x000200f8,
49630x000050b4,0x000001b9,0x000001ba,0x0004003d, 53190x000043e7,0x00050080,0x00000006,0x000043e9,
49640x00000006,0x000050b5,0x000050b4,0x00050084, 53200x00004ef2,0x000008a6,0x00050084,0x00000006,
49650x00000006,0x000050b6,0x000001db,0x000050b5, 53210x000043eb,0x000000f3,0x00006222,0x00050080,
49660x00050080,0x00000006,0x000050b7,0x000001c4, 53220x00000006,0x000043ec,0x000043e9,0x000043eb,
49670x000050b6,0x00050080,0x00000006,0x000050bd, 53230x00050041,0x0000026e,0x000043ed,0x000001c1,
49680x000050b5,0x0000062f,0x00050086,0x00000006, 53240x00000173,0x0004003d,0x00000007,0x000043ee,
49690x000050be,0x000050bd,0x000001be,0x00050084, 53250x000043ed,0x00050051,0x00000006,0x00005354,
49700x00000006,0x000050b0,0x000001c4,0x000050be, 53260x000043ee,0x00000000,0x00050095,0x00000145,
49710x00050080,0x00000006,0x000050b1,0x000050b7, 53270x00005356,0x00005354,0x000043ec,0x00050051,
49720x000050b0,0x00050080,0x00000006,0x000050ab, 53280x00000006,0x00005357,0x00005356,0x00000001,
49730x000050b1,0x000050b0,0x00050084,0x00000006, 53290x00050051,0x00000006,0x00005358,0x00005356,
49740x000050a4,0x000001ef,0x0000402d,0x00050080, 53300x00000000,0x00050051,0x00000006,0x0000535b,
49750x00000006,0x000050a5,0x000050ab,0x000050a4, 53310x000043ee,0x00000001,0x00050080,0x00000006,
49760x00050084,0x00000006,0x0000509a,0x00000205, 53320x0000535d,0x0000535b,0x00005357,0x00050050,
49770x00005dd8,0x00050080,0x00000006,0x0000509b, 53330x00000007,0x0000535e,0x00005358,0x0000535d,
49780x000050a5,0x0000509a,0x00050041,0x00000266, 53340x0004007c,0x00000014,0x0000534e,0x0000535e,
49790x0000509c,0x000001b9,0x00000264,0x0004003d, 53350x00060041,0x00000174,0x00005346,0x0000534e,
49800x00000007,0x0000509d,0x0000509c,0x00050051, 53360x00000173,0x00000173,0x0005003e,0x00005346,
49810x00000006,0x000050d3,0x0000509d,0x00000000, 53370x00000140,0x00000002,0x00000004,0x00050080,
49820x00050095,0x0000013d,0x000050d5,0x000050d3, 53380x00000006,0x000043f2,0x00006222,0x0000026c,
49830x0000509b,0x00050051,0x00000006,0x000050d6, 53390x000200f9,0x000043e3,0x000200f8,0x000043f3,
49840x000050d5,0x00000001,0x00050051,0x00000006, 53400x000200f9,0x000043f4,0x000200f8,0x000043f4,
49850x000050d7,0x000050d5,0x00000000,0x00050051, 53410x00050041,0x000001c3,0x00005392,0x000001c1,
49860x00000006,0x000050da,0x0000509d,0x00000001, 53420x000001c2,0x0004003d,0x00000006,0x00005393,
49870x00050080,0x00000006,0x000050dc,0x000050da, 53430x00005392,0x00050084,0x00000006,0x00005394,
49880x000050d6,0x00050050,0x00000007,0x000050dd, 53440x000001e3,0x00005393,0x00050080,0x00000006,
49890x000050d7,0x000050dc,0x0004007c,0x00000014, 53450x00005395,0x000001cc,0x00005394,0x00050080,
49900x000050cd,0x000050dd,0x00060041,0x0000016c, 53460x00000006,0x0000539b,0x00005393,0x00000695,
49910x00005087,0x000050cd,0x0000016b,0x0000016b, 53470x00050086,0x00000006,0x0000539c,0x0000539b,
49920x0005003e,0x00005087,0x00000138,0x00000002, 53480x000001c6,0x00050084,0x00000006,0x0000538e,
49930x00000004,0x00060041,0x0000016c,0x00005089, 53490x000001cc,0x0000539c,0x00050080,0x00000006,
49940x000050cd,0x0000016b,0x00000264,0x0005003e, 53500x0000538f,0x00005395,0x0000538e,0x00050080,
49950x00005089,0x00000539,0x00000002,0x00000004, 53510x00000006,0x00005389,0x0000538f,0x0000538e,
49960x00060041,0x0000016c,0x0000508b,0x000050cd, 53520x00050084,0x00000006,0x00005382,0x000001f7,
49970x0000016b,0x00000315,0x0005003e,0x0000508b, 53530x0000430b,0x00050080,0x00000006,0x00005383,
49980x00000539,0x00000002,0x00000004,0x00060041, 53540x00005389,0x00005382,0x00050084,0x00000006,
49990x0000016c,0x0000508d,0x000050cd,0x0000016b, 53550x00005378,0x0000020d,0x000061fe,0x00050080,
50000x0000031d,0x0005003e,0x0000508d,0x00000539, 53560x00000006,0x00005379,0x00005383,0x00005378,
50010x00000002,0x00000004,0x00060041,0x0000016c, 53570x00050041,0x0000026e,0x0000537a,0x000001c1,
50020x0000508f,0x000050cd,0x0000016b,0x00000325, 53580x0000026c,0x0004003d,0x00000007,0x0000537b,
50030x0005003e,0x0000508f,0x00000138,0x00000002, 53590x0000537a,0x00050051,0x00000006,0x000053b1,
50040x00000004,0x00060041,0x0000016c,0x00005091, 53600x0000537b,0x00000000,0x00050095,0x00000145,
50050x000050cd,0x0000016b,0x0000032d,0x0005003e, 53610x000053b3,0x000053b1,0x00005379,0x00050051,
50060x00005091,0x00000138,0x00000002,0x00000004, 53620x00000006,0x000053b4,0x000053b3,0x00000001,
50070x00060041,0x0000016c,0x00005093,0x000050cd, 53630x00050051,0x00000006,0x000053b5,0x000053b3,
50080x0000016b,0x00000351,0x0005003e,0x00005093, 53640x00000000,0x00050051,0x00000006,0x000053b8,
50090x00000138,0x00000002,0x00000004,0x000200f9, 53650x0000537b,0x00000001,0x00050080,0x00000006,
50100x00004119,0x000200f8,0x00004119,0x000200f9, 53660x000053ba,0x000053b8,0x000053b4,0x00050050,
50110x000013e3,0x000200f8,0x000013e3,0x000200f9, 53670x00000007,0x000053bb,0x000053b5,0x000053ba,
50120x000013d9,0x000200f8,0x000013d8,0x0004007c, 53680x0004007c,0x00000014,0x000053ab,0x000053bb,
50130x000000f4,0x000013db,0x000012dd,0x00050080, 53690x00060041,0x00000174,0x00005365,0x000053ab,
50140x000000f4,0x00003968,0x000013db,0x00000264, 53700x00000173,0x00000173,0x0005003e,0x00005365,
50150x000300f7,0x00003a4b,0x00000000,0x000300fb, 53710x00000140,0x00000002,0x00000004,0x00060041,
50160x00000138,0x00003a29,0x000200f8,0x00003a29, 53720x00000174,0x00005367,0x000053ab,0x00000173,
50170x000500b1,0x0000002f,0x00003a2b,0x00003968, 53730x0000026c,0x0005003e,0x00005367,0x000003bf,
50180x0000016b,0x000400a8,0x0000002f,0x00003a2c, 53740x00000002,0x00000004,0x00060041,0x00000174,
50190x00003a2b,0x000300f7,0x00003a33,0x00000000, 53750x00005369,0x000053ab,0x00000173,0x0000031d,
50200x000400fa,0x00003a2c,0x00003a2d,0x00003a33, 53760x0005003e,0x00005369,0x000003bf,0x00000002,
50210x000200f8,0x00003a2d,0x00050041,0x000001bb, 53770x00000004,0x00060041,0x00000174,0x0000536b,
50220x00003a2f,0x000001b9,0x000001f0,0x0004003d, 53780x000053ab,0x00000173,0x00000325,0x0005003e,
50230x00000006,0x00003a30,0x00003a2f,0x0004007c, 53790x0000536b,0x000003bf,0x00000002,0x00000004,
50240x000000f4,0x00003a31,0x00003a30,0x000500af, 53800x00060041,0x00000174,0x0000536d,0x000053ab,
50250x0000002f,0x00003a32,0x00003968,0x00003a31, 53810x00000173,0x0000032d,0x0005003e,0x0000536d,
50260x000200f9,0x00003a33,0x000200f8,0x00003a33, 53820x00000140,0x00000002,0x00000004,0x00060041,
50270x000700f5,0x0000002f,0x00003a34,0x00003a2b, 53830x00000174,0x0000536f,0x000053ab,0x00000173,
50280x00003a29,0x00003a32,0x00003a2d,0x000300f7, 53840x00000335,0x0005003e,0x0000536f,0x00000140,
50290x00003a36,0x00000000,0x000400fa,0x00003a34, 53850x00000002,0x00000004,0x00060041,0x00000174,
50300x00003a35,0x00003a36,0x000200f8,0x00003a35, 53860x00005371,0x000053ab,0x00000173,0x00000359,
50310x000200f9,0x00003a4b,0x000200f8,0x00003a36, 53870x0005003e,0x00005371,0x00000140,0x00000002,
50320x00050084,0x00000006,0x00003a54,0x000000ec, 53880x00000004,0x000200f9,0x000043f7,0x000200f8,
50330x000012dd,0x00050080,0x00000006,0x00003a55, 53890x000043f7,0x000200f9,0x000014d5,0x000200f8,
50340x000001c4,0x00003a54,0x00050041,0x00000266, 53900x000014d5,0x000200f9,0x000014cb,0x000200f8,
50350x00003a56,0x000001b9,0x00000264,0x0004003d, 53910x000014ca,0x0004007c,0x000000fb,0x000014cd,
50360x00000007,0x00003a57,0x00003a56,0x00050051, 53920x000013a7,0x00050080,0x000000fb,0x00003c46,
50370x00000006,0x00003a71,0x00003a57,0x00000000, 53930x000014cd,0x0000026c,0x000300f7,0x00003d29,
50380x00050095,0x0000013d,0x00003a73,0x00003a71, 53940x00000000,0x000300fb,0x00000140,0x00003d07,
50390x00003a55,0x00050051,0x00000006,0x00003a74, 53950x000200f8,0x00003d07,0x000500b1,0x0000002f,
50400x00003a73,0x00000001,0x00050051,0x00000006, 53960x00003d09,0x00003c46,0x00000173,0x000400a8,
50410x00003a75,0x00003a73,0x00000000,0x00050051, 53970x0000002f,0x00003d0a,0x00003d09,0x000300f7,
50420x00000006,0x00003a78,0x00003a57,0x00000001, 53980x00003d11,0x00000000,0x000400fa,0x00003d0a,
50430x00050080,0x00000006,0x00003a7a,0x00003a78, 53990x00003d0b,0x00003d11,0x000200f8,0x00003d0b,
50440x00003a74,0x00050050,0x00000007,0x00003a7b, 54000x00050041,0x000001c3,0x00003d0d,0x000001c1,
50450x00003a75,0x00003a7a,0x0004007c,0x00000014, 54010x000001f8,0x0004003d,0x00000006,0x00003d0e,
50460x00003a6b,0x00003a7b,0x00060041,0x0000016c, 54020x00003d0d,0x0004007c,0x000000fb,0x00003d0f,
50470x00003a62,0x00003a6b,0x0000016b,0x0000016b, 54030x00003d0e,0x000500af,0x0000002f,0x00003d10,
50480x0006003d,0x00000006,0x00003a63,0x00003a62, 54040x00003c46,0x00003d0f,0x000200f9,0x00003d11,
54050x000200f8,0x00003d11,0x000700f5,0x0000002f,
54060x00003d12,0x00003d09,0x00003d07,0x00003d10,
54070x00003d0b,0x000300f7,0x00003d14,0x00000000,
54080x000400fa,0x00003d12,0x00003d13,0x00003d14,
54090x000200f8,0x00003d13,0x000200f9,0x00003d29,
54100x000200f8,0x00003d14,0x00050084,0x00000006,
54110x00003d32,0x000000f3,0x000013a7,0x00050080,
54120x00000006,0x00003d33,0x000001cc,0x00003d32,
54130x00050041,0x0000026e,0x00003d34,0x000001c1,
54140x0000026c,0x0004003d,0x00000007,0x00003d35,
54150x00003d34,0x00050051,0x00000006,0x00003d4f,
54160x00003d35,0x00000000,0x00050095,0x00000145,
54170x00003d51,0x00003d4f,0x00003d33,0x00050051,
54180x00000006,0x00003d52,0x00003d51,0x00000001,
54190x00050051,0x00000006,0x00003d53,0x00003d51,
54200x00000000,0x00050051,0x00000006,0x00003d56,
54210x00003d35,0x00000001,0x00050080,0x00000006,
54220x00003d58,0x00003d56,0x00003d52,0x00050050,
54230x00000007,0x00003d59,0x00003d53,0x00003d58,
54240x0004007c,0x00000014,0x00003d49,0x00003d59,
54250x00060041,0x00000174,0x00003d40,0x00003d49,
54260x00000173,0x00000173,0x0006003d,0x00000006,
54270x00003d41,0x00003d40,0x00000002,0x00000004,
54280x0004007c,0x00000006,0x00003d60,0x00003c46,
54290x00050084,0x00000006,0x00003d61,0x000000f3,
54300x00003d60,0x00050080,0x00000006,0x00003d62,
54310x000001cc,0x00003d61,0x00050095,0x00000145,
54320x00003d80,0x00003d4f,0x00003d62,0x00050051,
54330x00000006,0x00003d81,0x00003d80,0x00000001,
54340x00050051,0x00000006,0x00003d82,0x00003d80,
54350x00000000,0x00050080,0x00000006,0x00003d87,
54360x00003d56,0x00003d81,0x00050050,0x00000007,
54370x00003d88,0x00003d82,0x00003d87,0x0004007c,
54380x00000014,0x00003d78,0x00003d88,0x00060041,
54390x00000174,0x00003d6f,0x00003d78,0x00000173,
54400x00000173,0x0006003d,0x00000006,0x00003d70,
54410x00003d6f,0x00000002,0x00000004,0x000500aa,
54420x0000002f,0x00003d1b,0x00003d41,0x00003d70,
54430x000300f7,0x00003d23,0x00000000,0x000400fa,
54440x00003d1b,0x00003d1c,0x00003d23,0x000200f8,
54450x00003d1c,0x000500c6,0x000000fb,0x00003d1f,
54460x000014cd,0x00003c46,0x0004007c,0x00000006,
54470x00003d20,0x00003d1f,0x0006000c,0x000000fb,
54480x00003d21,0x00000001,0x0000004b,0x00003d20,
54490x00050082,0x000000fb,0x00003d22,0x00000ddb,
54500x00003d21,0x000200f9,0x00003d29,0x000200f8,
54510x00003d23,0x000500c6,0x00000006,0x00003d26,
54520x00003d41,0x00003d70,0x0006000c,0x000000fb,
54530x00003d27,0x00000001,0x0000004b,0x00003d26,
54540x00050082,0x000000fb,0x00003d28,0x00000de3,
54550x00003d27,0x000200f9,0x00003d29,0x000200f8,
54560x00003d29,0x000900f5,0x000000fb,0x00006267,
54570x00000dcc,0x00003d13,0x00003d22,0x00003d1c,
54580x00003d28,0x00003d23,0x00050082,0x000000fb,
54590x00003c4a,0x000014cd,0x0000026c,0x000300f7,
54600x00003db3,0x00000000,0x000300fb,0x00000140,
54610x00003d91,0x000200f8,0x00003d91,0x000500b1,
54620x0000002f,0x00003d93,0x00003c4a,0x00000173,
54630x000400a8,0x0000002f,0x00003d94,0x00003d93,
54640x000300f7,0x00003d9b,0x00000000,0x000400fa,
54650x00003d94,0x00003d95,0x00003d9b,0x000200f8,
54660x00003d95,0x00050041,0x000001c3,0x00003d97,
54670x000001c1,0x000001f8,0x0004003d,0x00000006,
54680x00003d98,0x00003d97,0x0004007c,0x000000fb,
54690x00003d99,0x00003d98,0x000500af,0x0000002f,
54700x00003d9a,0x00003c4a,0x00003d99,0x000200f9,
54710x00003d9b,0x000200f8,0x00003d9b,0x000700f5,
54720x0000002f,0x00003d9c,0x00003d93,0x00003d91,
54730x00003d9a,0x00003d95,0x000300f7,0x00003d9e,
54740x00000000,0x000400fa,0x00003d9c,0x00003d9d,
54750x00003d9e,0x000200f8,0x00003d9d,0x000200f9,
54760x00003db3,0x000200f8,0x00003d9e,0x00050084,
54770x00000006,0x00003dbc,0x000000f3,0x000013a7,
54780x00050080,0x00000006,0x00003dbd,0x000001cc,
54790x00003dbc,0x00050041,0x0000026e,0x00003dbe,
54800x000001c1,0x0000026c,0x0004003d,0x00000007,
54810x00003dbf,0x00003dbe,0x00050051,0x00000006,
54820x00003dd9,0x00003dbf,0x00000000,0x00050095,
54830x00000145,0x00003ddb,0x00003dd9,0x00003dbd,
54840x00050051,0x00000006,0x00003ddc,0x00003ddb,
54850x00000001,0x00050051,0x00000006,0x00003ddd,
54860x00003ddb,0x00000000,0x00050051,0x00000006,
54870x00003de0,0x00003dbf,0x00000001,0x00050080,
54880x00000006,0x00003de2,0x00003de0,0x00003ddc,
54890x00050050,0x00000007,0x00003de3,0x00003ddd,
54900x00003de2,0x0004007c,0x00000014,0x00003dd3,
54910x00003de3,0x00060041,0x00000174,0x00003dca,
54920x00003dd3,0x00000173,0x00000173,0x0006003d,
54930x00000006,0x00003dcb,0x00003dca,0x00000002,
54940x00000004,0x0004007c,0x00000006,0x00003dea,
54950x00003c4a,0x00050084,0x00000006,0x00003deb,
54960x000000f3,0x00003dea,0x00050080,0x00000006,
54970x00003dec,0x000001cc,0x00003deb,0x00050095,
54980x00000145,0x00003e0a,0x00003dd9,0x00003dec,
54990x00050051,0x00000006,0x00003e0b,0x00003e0a,
55000x00000001,0x00050051,0x00000006,0x00003e0c,
55010x00003e0a,0x00000000,0x00050080,0x00000006,
55020x00003e11,0x00003de0,0x00003e0b,0x00050050,
55030x00000007,0x00003e12,0x00003e0c,0x00003e11,
55040x0004007c,0x00000014,0x00003e02,0x00003e12,
55050x00060041,0x00000174,0x00003df9,0x00003e02,
55060x00000173,0x00000173,0x0006003d,0x00000006,
55070x00003dfa,0x00003df9,0x00000002,0x00000004,
55080x000500aa,0x0000002f,0x00003da5,0x00003dcb,
55090x00003dfa,0x000300f7,0x00003dad,0x00000000,
55100x000400fa,0x00003da5,0x00003da6,0x00003dad,
55110x000200f8,0x00003da6,0x000500c6,0x000000fb,
55120x00003da9,0x000014cd,0x00003c4a,0x0004007c,
55130x00000006,0x00003daa,0x00003da9,0x0006000c,
55140x000000fb,0x00003dab,0x00000001,0x0000004b,
55150x00003daa,0x00050082,0x000000fb,0x00003dac,
55160x00000ddb,0x00003dab,0x000200f9,0x00003db3,
55170x000200f8,0x00003dad,0x000500c6,0x00000006,
55180x00003db0,0x00003dcb,0x00003dfa,0x0006000c,
55190x000000fb,0x00003db1,0x00000001,0x0000004b,
55200x00003db0,0x00050082,0x000000fb,0x00003db2,
55210x00000de3,0x00003db1,0x000200f9,0x00003db3,
55220x000200f8,0x00003db3,0x000900f5,0x000000fb,
55230x00006268,0x00000dcc,0x00003d9d,0x00003dac,
55240x00003da6,0x00003db2,0x00003dad,0x00050082,
55250x000000fb,0x00003c4d,0x00006267,0x00006268,
55260x000500ad,0x0000002f,0x00003c4e,0x00003c4d,
55270x00000173,0x000600a9,0x000000fb,0x00003c4f,
55280x00003c4e,0x0000026c,0x00000dcc,0x00050082,
55290x000000fb,0x00003c52,0x000014cd,0x00003c4f,
55300x000300f7,0x00003e3d,0x00000000,0x000300fb,
55310x00000140,0x00003e1b,0x000200f8,0x00003e1b,
55320x000500b1,0x0000002f,0x00003e1d,0x00003c52,
55330x00000173,0x000400a8,0x0000002f,0x00003e1e,
55340x00003e1d,0x000300f7,0x00003e25,0x00000000,
55350x000400fa,0x00003e1e,0x00003e1f,0x00003e25,
55360x000200f8,0x00003e1f,0x00050041,0x000001c3,
55370x00003e21,0x000001c1,0x000001f8,0x0004003d,
55380x00000006,0x00003e22,0x00003e21,0x0004007c,
55390x000000fb,0x00003e23,0x00003e22,0x000500af,
55400x0000002f,0x00003e24,0x00003c52,0x00003e23,
55410x000200f9,0x00003e25,0x000200f8,0x00003e25,
55420x000700f5,0x0000002f,0x00003e26,0x00003e1d,
55430x00003e1b,0x00003e24,0x00003e1f,0x000300f7,
55440x00003e28,0x00000000,0x000400fa,0x00003e26,
55450x00003e27,0x00003e28,0x000200f8,0x00003e27,
55460x000200f9,0x00003e3d,0x000200f8,0x00003e28,
55470x00050084,0x00000006,0x00003e46,0x000000f3,
55480x000013a7,0x00050080,0x00000006,0x00003e47,
55490x000001cc,0x00003e46,0x00050041,0x0000026e,
55500x00003e48,0x000001c1,0x0000026c,0x0004003d,
55510x00000007,0x00003e49,0x00003e48,0x00050051,
55520x00000006,0x00003e63,0x00003e49,0x00000000,
55530x00050095,0x00000145,0x00003e65,0x00003e63,
55540x00003e47,0x00050051,0x00000006,0x00003e66,
55550x00003e65,0x00000001,0x00050051,0x00000006,
55560x00003e67,0x00003e65,0x00000000,0x00050051,
55570x00000006,0x00003e6a,0x00003e49,0x00000001,
55580x00050080,0x00000006,0x00003e6c,0x00003e6a,
55590x00003e66,0x00050050,0x00000007,0x00003e6d,
55600x00003e67,0x00003e6c,0x0004007c,0x00000014,
55610x00003e5d,0x00003e6d,0x00060041,0x00000174,
55620x00003e54,0x00003e5d,0x00000173,0x00000173,
55630x0006003d,0x00000006,0x00003e55,0x00003e54,
50490x00000002,0x00000004,0x0004007c,0x00000006, 55640x00000002,0x00000004,0x0004007c,0x00000006,
50500x00003a82,0x00003968,0x00050084,0x00000006, 55650x00003e74,0x00003c52,0x00050084,0x00000006,
50510x00003a83,0x000000ec,0x00003a82,0x00050080, 55660x00003e75,0x000000f3,0x00003e74,0x00050080,
50520x00000006,0x00003a84,0x000001c4,0x00003a83, 55670x00000006,0x00003e76,0x000001cc,0x00003e75,
50530x00050095,0x0000013d,0x00003aa2,0x00003a71, 55680x00050095,0x00000145,0x00003e94,0x00003e63,
50540x00003a84,0x00050051,0x00000006,0x00003aa3, 55690x00003e76,0x00050051,0x00000006,0x00003e95,
50550x00003aa2,0x00000001,0x00050051,0x00000006, 55700x00003e94,0x00000001,0x00050051,0x00000006,
50560x00003aa4,0x00003aa2,0x00000000,0x00050080, 55710x00003e96,0x00003e94,0x00000000,0x00050080,
50570x00000006,0x00003aa9,0x00003a78,0x00003aa3, 55720x00000006,0x00003e9b,0x00003e6a,0x00003e95,
50580x00050050,0x00000007,0x00003aaa,0x00003aa4, 55730x00050050,0x00000007,0x00003e9c,0x00003e96,
50590x00003aa9,0x0004007c,0x00000014,0x00003a9a, 55740x00003e9b,0x0004007c,0x00000014,0x00003e8c,
50600x00003aaa,0x00060041,0x0000016c,0x00003a91, 55750x00003e9c,0x00060041,0x00000174,0x00003e83,
50610x00003a9a,0x0000016b,0x0000016b,0x0006003d, 55760x00003e8c,0x00000173,0x00000173,0x0006003d,
50620x00000006,0x00003a92,0x00003a91,0x00000002, 55770x00000006,0x00003e84,0x00003e83,0x00000002,
50630x00000004,0x000500aa,0x0000002f,0x00003a3d, 55780x00000004,0x000500aa,0x0000002f,0x00003e2f,
50640x00003a63,0x00003a92,0x000300f7,0x00003a45, 55790x00003e55,0x00003e84,0x000300f7,0x00003e37,
50650x00000000,0x000400fa,0x00003a3d,0x00003a3e, 55800x00000000,0x000400fa,0x00003e2f,0x00003e30,
50660x00003a45,0x000200f8,0x00003a3e,0x000500c6, 55810x00003e37,0x000200f8,0x00003e30,0x000500c6,
50670x000000f4,0x00003a41,0x000013db,0x00003968, 55820x000000fb,0x00003e33,0x000014cd,0x00003c52,
50680x0004007c,0x00000006,0x00003a42,0x00003a41, 55830x0004007c,0x00000006,0x00003e34,0x00003e33,
50690x0006000c,0x000000f4,0x00003a43,0x00000001, 55840x0006000c,0x000000fb,0x00003e35,0x00000001,
50700x0000004b,0x00003a42,0x00050082,0x000000f4, 55850x0000004b,0x00003e34,0x00050082,0x000000fb,
50710x00003a44,0x00000d76,0x00003a43,0x000200f9, 55860x00003e36,0x00000ddb,0x00003e35,0x000200f9,
50720x00003a4b,0x000200f8,0x00003a45,0x000500c6, 55870x00003e3d,0x000200f8,0x00003e37,0x000500c6,
50730x00000006,0x00003a48,0x00003a63,0x00003a92, 55880x00000006,0x00003e3a,0x00003e55,0x00003e84,
50740x0006000c,0x000000f4,0x00003a49,0x00000001, 55890x0006000c,0x000000fb,0x00003e3b,0x00000001,
50750x0000004b,0x00003a48,0x00050082,0x000000f4, 55900x0000004b,0x00003e3a,0x00050082,0x000000fb,
50760x00003a4a,0x00000d7e,0x00003a49,0x000200f9, 55910x00003e3c,0x00000de3,0x00003e3b,0x000200f9,
50770x00003a4b,0x000200f8,0x00003a4b,0x000900f5, 55920x00003e3d,0x000200f8,0x00003e3d,0x000900f5,
50780x000000f4,0x00005e41,0x00000d67,0x00003a35, 55930x000000fb,0x00006269,0x00000dcc,0x00003e27,
50790x00003a44,0x00003a3e,0x00003a4a,0x00003a45, 55940x00003e36,0x00003e30,0x00003e3c,0x00003e37,
50800x00050082,0x000000f4,0x0000396c,0x000013db, 55950x000200f9,0x00003c55,0x000200f8,0x00003c55,
50810x00000264,0x000300f7,0x00003ad5,0x00000000, 55960x000700f5,0x000000fb,0x0000626a,0x0000031d,
50820x000300fb,0x00000138,0x00003ab3,0x000200f8, 55970x00003e3d,0x00003c62,0x00003c60,0x000400f6,
50830x00003ab3,0x000500b1,0x0000002f,0x00003ab5, 55980x00003c64,0x00003c60,0x00000000,0x000200f9,
50840x0000396c,0x0000016b,0x000400a8,0x0000002f, 55990x00003c56,0x000200f8,0x00003c56,0x00050084,
50850x00003ab6,0x00003ab5,0x000300f7,0x00003abd, 56000x000000fb,0x00003c5a,0x0000626a,0x00003c4f,
50860x00000000,0x000400fa,0x00003ab6,0x00003ab7, 56010x00050080,0x000000fb,0x00003c5b,0x000014cd,
50870x00003abd,0x000200f8,0x00003ab7,0x00050041, 56020x00003c5a,0x000300f7,0x00003ec7,0x00000000,
50880x000001bb,0x00003ab9,0x000001b9,0x000001f0, 56030x000300fb,0x00000140,0x00003ea5,0x000200f8,
50890x0004003d,0x00000006,0x00003aba,0x00003ab9, 56040x00003ea5,0x000500b1,0x0000002f,0x00003ea7,
50900x0004007c,0x000000f4,0x00003abb,0x00003aba, 56050x00003c5b,0x00000173,0x000400a8,0x0000002f,
50910x000500af,0x0000002f,0x00003abc,0x0000396c, 56060x00003ea8,0x00003ea7,0x000300f7,0x00003eaf,
50920x00003abb,0x000200f9,0x00003abd,0x000200f8, 56070x00000000,0x000400fa,0x00003ea8,0x00003ea9,
50930x00003abd,0x000700f5,0x0000002f,0x00003abe, 56080x00003eaf,0x000200f8,0x00003ea9,0x00050041,
50940x00003ab5,0x00003ab3,0x00003abc,0x00003ab7, 56090x000001c3,0x00003eab,0x000001c1,0x000001f8,
50950x000300f7,0x00003ac0,0x00000000,0x000400fa, 56100x0004003d,0x00000006,0x00003eac,0x00003eab,
50960x00003abe,0x00003abf,0x00003ac0,0x000200f8, 56110x0004007c,0x000000fb,0x00003ead,0x00003eac,
50970x00003abf,0x000200f9,0x00003ad5,0x000200f8, 56120x000500af,0x0000002f,0x00003eae,0x00003c5b,
50980x00003ac0,0x00050084,0x00000006,0x00003ade, 56130x00003ead,0x000200f9,0x00003eaf,0x000200f8,
50990x000000ec,0x000012dd,0x00050080,0x00000006, 56140x00003eaf,0x000700f5,0x0000002f,0x00003eb0,
51000x00003adf,0x000001c4,0x00003ade,0x00050041, 56150x00003ea7,0x00003ea5,0x00003eae,0x00003ea9,
51010x00000266,0x00003ae0,0x000001b9,0x00000264, 56160x000300f7,0x00003eb2,0x00000000,0x000400fa,
51020x0004003d,0x00000007,0x00003ae1,0x00003ae0, 56170x00003eb0,0x00003eb1,0x00003eb2,0x000200f8,
51030x00050051,0x00000006,0x00003afb,0x00003ae1, 56180x00003eb1,0x000200f9,0x00003ec7,0x000200f8,
51040x00000000,0x00050095,0x0000013d,0x00003afd, 56190x00003eb2,0x00050084,0x00000006,0x00003ed0,
51050x00003afb,0x00003adf,0x00050051,0x00000006, 56200x000000f3,0x000013a7,0x00050080,0x00000006,
51060x00003afe,0x00003afd,0x00000001,0x00050051, 56210x00003ed1,0x000001cc,0x00003ed0,0x00050041,
51070x00000006,0x00003aff,0x00003afd,0x00000000, 56220x0000026e,0x00003ed2,0x000001c1,0x0000026c,
51080x00050051,0x00000006,0x00003b02,0x00003ae1, 56230x0004003d,0x00000007,0x00003ed3,0x00003ed2,
51090x00000001,0x00050080,0x00000006,0x00003b04, 56240x00050051,0x00000006,0x00003eed,0x00003ed3,
51100x00003b02,0x00003afe,0x00050050,0x00000007, 56250x00000000,0x00050095,0x00000145,0x00003eef,
51110x00003b05,0x00003aff,0x00003b04,0x0004007c, 56260x00003eed,0x00003ed1,0x00050051,0x00000006,
51120x00000014,0x00003af5,0x00003b05,0x00060041, 56270x00003ef0,0x00003eef,0x00000001,0x00050051,
51130x0000016c,0x00003aec,0x00003af5,0x0000016b, 56280x00000006,0x00003ef1,0x00003eef,0x00000000,
51140x0000016b,0x0006003d,0x00000006,0x00003aed, 56290x00050051,0x00000006,0x00003ef4,0x00003ed3,
51150x00003aec,0x00000002,0x00000004,0x0004007c, 56300x00000001,0x00050080,0x00000006,0x00003ef6,
51160x00000006,0x00003b0c,0x0000396c,0x00050084, 56310x00003ef4,0x00003ef0,0x00050050,0x00000007,
51170x00000006,0x00003b0d,0x000000ec,0x00003b0c, 56320x00003ef7,0x00003ef1,0x00003ef6,0x0004007c,
51180x00050080,0x00000006,0x00003b0e,0x000001c4, 56330x00000014,0x00003ee7,0x00003ef7,0x00060041,
51190x00003b0d,0x00050095,0x0000013d,0x00003b2c, 56340x00000174,0x00003ede,0x00003ee7,0x00000173,
51200x00003afb,0x00003b0e,0x00050051,0x00000006, 56350x00000173,0x0006003d,0x00000006,0x00003edf,
51210x00003b2d,0x00003b2c,0x00000001,0x00050051, 56360x00003ede,0x00000002,0x00000004,0x0004007c,
51220x00000006,0x00003b2e,0x00003b2c,0x00000000, 56370x00000006,0x00003efe,0x00003c5b,0x00050084,
51230x00050080,0x00000006,0x00003b33,0x00003b02, 56380x00000006,0x00003eff,0x000000f3,0x00003efe,
51240x00003b2d,0x00050050,0x00000007,0x00003b34, 56390x00050080,0x00000006,0x00003f00,0x000001cc,
51250x00003b2e,0x00003b33,0x0004007c,0x00000014, 56400x00003eff,0x00050095,0x00000145,0x00003f1e,
51260x00003b24,0x00003b34,0x00060041,0x0000016c, 56410x00003eed,0x00003f00,0x00050051,0x00000006,
51270x00003b1b,0x00003b24,0x0000016b,0x0000016b, 56420x00003f1f,0x00003f1e,0x00000001,0x00050051,
51280x0006003d,0x00000006,0x00003b1c,0x00003b1b, 56430x00000006,0x00003f20,0x00003f1e,0x00000000,
56440x00050080,0x00000006,0x00003f25,0x00003ef4,
56450x00003f1f,0x00050050,0x00000007,0x00003f26,
56460x00003f20,0x00003f25,0x0004007c,0x00000014,
56470x00003f16,0x00003f26,0x00060041,0x00000174,
56480x00003f0d,0x00003f16,0x00000173,0x00000173,
56490x0006003d,0x00000006,0x00003f0e,0x00003f0d,
51290x00000002,0x00000004,0x000500aa,0x0000002f, 56500x00000002,0x00000004,0x000500aa,0x0000002f,
51300x00003ac7,0x00003aed,0x00003b1c,0x000300f7, 56510x00003eb9,0x00003edf,0x00003f0e,0x000300f7,
51310x00003acf,0x00000000,0x000400fa,0x00003ac7, 56520x00003ec1,0x00000000,0x000400fa,0x00003eb9,
51320x00003ac8,0x00003acf,0x000200f8,0x00003ac8, 56530x00003eba,0x00003ec1,0x000200f8,0x00003eba,
51330x000500c6,0x000000f4,0x00003acb,0x000013db, 56540x000500c6,0x000000fb,0x00003ebd,0x000014cd,
51340x0000396c,0x0004007c,0x00000006,0x00003acc, 56550x00003c5b,0x0004007c,0x00000006,0x00003ebe,
51350x00003acb,0x0006000c,0x000000f4,0x00003acd, 56560x00003ebd,0x0006000c,0x000000fb,0x00003ebf,
51360x00000001,0x0000004b,0x00003acc,0x00050082, 56570x00000001,0x0000004b,0x00003ebe,0x00050082,
51370x000000f4,0x00003ace,0x00000d76,0x00003acd, 56580x000000fb,0x00003ec0,0x00000ddb,0x00003ebf,
51380x000200f9,0x00003ad5,0x000200f8,0x00003acf, 56590x000200f9,0x00003ec7,0x000200f8,0x00003ec1,
51390x000500c6,0x00000006,0x00003ad2,0x00003aed, 56600x000500c6,0x00000006,0x00003ec4,0x00003edf,
51400x00003b1c,0x0006000c,0x000000f4,0x00003ad3, 56610x00003f0e,0x0006000c,0x000000fb,0x00003ec5,
51410x00000001,0x0000004b,0x00003ad2,0x00050082, 56620x00000001,0x0000004b,0x00003ec4,0x00050082,
51420x000000f4,0x00003ad4,0x00000d7e,0x00003ad3, 56630x000000fb,0x00003ec6,0x00000de3,0x00003ec5,
51430x000200f9,0x00003ad5,0x000200f8,0x00003ad5, 56640x000200f9,0x00003ec7,0x000200f8,0x00003ec7,
51440x000900f5,0x000000f4,0x00005e42,0x00000d67, 56650x000900f5,0x000000fb,0x0000626b,0x00000dcc,
51450x00003abf,0x00003ace,0x00003ac8,0x00003ad4, 56660x00003eb1,0x00003ec0,0x00003eba,0x00003ec6,
51460x00003acf,0x00050082,0x000000f4,0x0000396f, 56670x00003ec1,0x000500ad,0x0000002f,0x00003c5f,
51470x00005e41,0x00005e42,0x000500ad,0x0000002f, 56680x0000626b,0x00006269,0x000400fa,0x00003c5f,
51480x00003970,0x0000396f,0x0000016b,0x000600a9, 56690x00003c60,0x00003c64,0x000200f8,0x00003c60,
51490x000000f4,0x00003971,0x00003970,0x00000264, 56700x000500c4,0x000000fb,0x00003c62,0x0000626a,
51500x00000d67,0x00050082,0x000000f4,0x00003974, 56710x0000026c,0x000200f9,0x00003c55,0x000200f8,
51510x000013db,0x00003971,0x000300f7,0x00003b5f, 56720x00003c64,0x000500c3,0x000000fb,0x00003c66,
51520x00000000,0x000300fb,0x00000138,0x00003b3d, 56730x0000626a,0x0000026c,0x000200f9,0x00003c67,
51530x000200f8,0x00003b3d,0x000500b1,0x0000002f, 56740x000200f8,0x00003c67,0x000700f5,0x000000fb,
51540x00003b3f,0x00003974,0x0000016b,0x000400a8, 56750x0000626f,0x00000173,0x00003c64,0x0000654d,
51550x0000002f,0x00003b40,0x00003b3f,0x000300f7, 56760x00003c7c,0x000700f5,0x000000fb,0x0000626e,
51560x00003b47,0x00000000,0x000400fa,0x00003b40, 56770x00003c66,0x00003c64,0x00003c7e,0x00003c7c,
51570x00003b41,0x00003b47,0x000200f8,0x00003b41, 56780x000500af,0x0000002f,0x00003c6a,0x0000626e,
51580x00050041,0x000001bb,0x00003b43,0x000001b9, 56790x0000026c,0x000400f6,0x00003c7f,0x00003c7c,
51590x000001f0,0x0004003d,0x00000006,0x00003b44, 56800x00000000,0x000400fa,0x00003c6a,0x00003c6b,
51600x00003b43,0x0004007c,0x000000f4,0x00003b45, 56810x00003c7f,0x000200f8,0x00003c6b,0x00050080,
51610x00003b44,0x000500af,0x0000002f,0x00003b46, 56820x000000fb,0x00003c6f,0x0000626f,0x0000626e,
51620x00003974,0x00003b45,0x000200f9,0x00003b47, 56830x00050084,0x000000fb,0x00003c71,0x00003c6f,
51630x000200f8,0x00003b47,0x000700f5,0x0000002f, 56840x00003c4f,0x00050080,0x000000fb,0x00003c72,
51640x00003b48,0x00003b3f,0x00003b3d,0x00003b46, 56850x000014cd,0x00003c71,0x000300f7,0x00003f51,
51650x00003b41,0x000300f7,0x00003b4a,0x00000000, 56860x00000000,0x000300fb,0x00000140,0x00003f2f,
51660x000400fa,0x00003b48,0x00003b49,0x00003b4a, 56870x000200f8,0x00003f2f,0x000500b1,0x0000002f,
51670x000200f8,0x00003b49,0x000200f9,0x00003b5f, 56880x00003f31,0x00003c72,0x00000173,0x000400a8,
51680x000200f8,0x00003b4a,0x00050084,0x00000006, 56890x0000002f,0x00003f32,0x00003f31,0x000300f7,
51690x00003b68,0x000000ec,0x000012dd,0x00050080, 56900x00003f39,0x00000000,0x000400fa,0x00003f32,
51700x00000006,0x00003b69,0x000001c4,0x00003b68, 56910x00003f33,0x00003f39,0x000200f8,0x00003f33,
51710x00050041,0x00000266,0x00003b6a,0x000001b9, 56920x00050041,0x000001c3,0x00003f35,0x000001c1,
51720x00000264,0x0004003d,0x00000007,0x00003b6b, 56930x000001f8,0x0004003d,0x00000006,0x00003f36,
51730x00003b6a,0x00050051,0x00000006,0x00003b85, 56940x00003f35,0x0004007c,0x000000fb,0x00003f37,
51740x00003b6b,0x00000000,0x00050095,0x0000013d, 56950x00003f36,0x000500af,0x0000002f,0x00003f38,
51750x00003b87,0x00003b85,0x00003b69,0x00050051, 56960x00003c72,0x00003f37,0x000200f9,0x00003f39,
51760x00000006,0x00003b88,0x00003b87,0x00000001, 56970x000200f8,0x00003f39,0x000700f5,0x0000002f,
51770x00050051,0x00000006,0x00003b89,0x00003b87, 56980x00003f3a,0x00003f31,0x00003f2f,0x00003f38,
51780x00000000,0x00050051,0x00000006,0x00003b8c, 56990x00003f33,0x000300f7,0x00003f3c,0x00000000,
51790x00003b6b,0x00000001,0x00050080,0x00000006, 57000x000400fa,0x00003f3a,0x00003f3b,0x00003f3c,
51800x00003b8e,0x00003b8c,0x00003b88,0x00050050, 57010x000200f8,0x00003f3b,0x000200f9,0x00003f51,
51810x00000007,0x00003b8f,0x00003b89,0x00003b8e, 57020x000200f8,0x00003f3c,0x00050084,0x00000006,
51820x0004007c,0x00000014,0x00003b7f,0x00003b8f, 57030x00003f5a,0x000000f3,0x000013a7,0x00050080,
51830x00060041,0x0000016c,0x00003b76,0x00003b7f, 57040x00000006,0x00003f5b,0x000001cc,0x00003f5a,
51840x0000016b,0x0000016b,0x0006003d,0x00000006, 57050x00050041,0x0000026e,0x00003f5c,0x000001c1,
51850x00003b77,0x00003b76,0x00000002,0x00000004, 57060x0000026c,0x0004003d,0x00000007,0x00003f5d,
51860x0004007c,0x00000006,0x00003b96,0x00003974, 57070x00003f5c,0x00050051,0x00000006,0x00003f77,
51870x00050084,0x00000006,0x00003b97,0x000000ec, 57080x00003f5d,0x00000000,0x00050095,0x00000145,
51880x00003b96,0x00050080,0x00000006,0x00003b98, 57090x00003f79,0x00003f77,0x00003f5b,0x00050051,
51890x000001c4,0x00003b97,0x00050095,0x0000013d, 57100x00000006,0x00003f7a,0x00003f79,0x00000001,
51900x00003bb6,0x00003b85,0x00003b98,0x00050051, 57110x00050051,0x00000006,0x00003f7b,0x00003f79,
51910x00000006,0x00003bb7,0x00003bb6,0x00000001, 57120x00000000,0x00050051,0x00000006,0x00003f7e,
51920x00050051,0x00000006,0x00003bb8,0x00003bb6, 57130x00003f5d,0x00000001,0x00050080,0x00000006,
51930x00000000,0x00050080,0x00000006,0x00003bbd, 57140x00003f80,0x00003f7e,0x00003f7a,0x00050050,
51940x00003b8c,0x00003bb7,0x00050050,0x00000007, 57150x00000007,0x00003f81,0x00003f7b,0x00003f80,
51950x00003bbe,0x00003bb8,0x00003bbd,0x0004007c, 57160x0004007c,0x00000014,0x00003f71,0x00003f81,
51960x00000014,0x00003bae,0x00003bbe,0x00060041, 57170x00060041,0x00000174,0x00003f68,0x00003f71,
51970x0000016c,0x00003ba5,0x00003bae,0x0000016b, 57180x00000173,0x00000173,0x0006003d,0x00000006,
51980x0000016b,0x0006003d,0x00000006,0x00003ba6, 57190x00003f69,0x00003f68,0x00000002,0x00000004,
51990x00003ba5,0x00000002,0x00000004,0x000500aa, 57200x0004007c,0x00000006,0x00003f88,0x00003c72,
52000x0000002f,0x00003b51,0x00003b77,0x00003ba6, 57210x00050084,0x00000006,0x00003f89,0x000000f3,
52010x000300f7,0x00003b59,0x00000000,0x000400fa, 57220x00003f88,0x00050080,0x00000006,0x00003f8a,
52020x00003b51,0x00003b52,0x00003b59,0x000200f8, 57230x000001cc,0x00003f89,0x00050095,0x00000145,
52030x00003b52,0x000500c6,0x000000f4,0x00003b55, 57240x00003fa8,0x00003f77,0x00003f8a,0x00050051,
52040x000013db,0x00003974,0x0004007c,0x00000006, 57250x00000006,0x00003fa9,0x00003fa8,0x00000001,
52050x00003b56,0x00003b55,0x0006000c,0x000000f4, 57260x00050051,0x00000006,0x00003faa,0x00003fa8,
52060x00003b57,0x00000001,0x0000004b,0x00003b56, 57270x00000000,0x00050080,0x00000006,0x00003faf,
52070x00050082,0x000000f4,0x00003b58,0x00000d76, 57280x00003f7e,0x00003fa9,0x00050050,0x00000007,
52080x00003b57,0x000200f9,0x00003b5f,0x000200f8, 57290x00003fb0,0x00003faa,0x00003faf,0x0004007c,
52090x00003b59,0x000500c6,0x00000006,0x00003b5c, 57300x00000014,0x00003fa0,0x00003fb0,0x00060041,
52100x00003b77,0x00003ba6,0x0006000c,0x000000f4, 57310x00000174,0x00003f97,0x00003fa0,0x00000173,
52110x00003b5d,0x00000001,0x0000004b,0x00003b5c, 57320x00000173,0x0006003d,0x00000006,0x00003f98,
52120x00050082,0x000000f4,0x00003b5e,0x00000d7e, 57330x00003f97,0x00000002,0x00000004,0x000500aa,
52130x00003b5d,0x000200f9,0x00003b5f,0x000200f8, 57340x0000002f,0x00003f43,0x00003f69,0x00003f98,
52140x00003b5f,0x000900f5,0x000000f4,0x00005e43, 57350x000300f7,0x00003f4b,0x00000000,0x000400fa,
52150x00000d67,0x00003b49,0x00003b58,0x00003b52, 57360x00003f43,0x00003f44,0x00003f4b,0x000200f8,
52160x00003b5e,0x00003b59,0x000200f9,0x00003977, 57370x00003f44,0x000500c6,0x000000fb,0x00003f47,
52170x000200f8,0x00003977,0x000700f5,0x000000f4, 57380x000014cd,0x00003c72,0x0004007c,0x00000006,
52180x00005e44,0x00000315,0x00003b5f,0x00003984, 57390x00003f48,0x00003f47,0x0006000c,0x000000fb,
52190x00003982,0x000400f6,0x00003986,0x00003982, 57400x00003f49,0x00000001,0x0000004b,0x00003f48,
52200x00000000,0x000200f9,0x00003978,0x000200f8, 57410x00050082,0x000000fb,0x00003f4a,0x00000ddb,
52210x00003978,0x00050084,0x000000f4,0x0000397c, 57420x00003f49,0x000200f9,0x00003f51,0x000200f8,
52220x00005e44,0x00003971,0x00050080,0x000000f4, 57430x00003f4b,0x000500c6,0x00000006,0x00003f4e,
52230x0000397d,0x000013db,0x0000397c,0x000300f7, 57440x00003f69,0x00003f98,0x0006000c,0x000000fb,
52240x00003be9,0x00000000,0x000300fb,0x00000138, 57450x00003f4f,0x00000001,0x0000004b,0x00003f4e,
52250x00003bc7,0x000200f8,0x00003bc7,0x000500b1, 57460x00050082,0x000000fb,0x00003f50,0x00000de3,
52260x0000002f,0x00003bc9,0x0000397d,0x0000016b, 57470x00003f4f,0x000200f9,0x00003f51,0x000200f8,
52270x000400a8,0x0000002f,0x00003bca,0x00003bc9, 57480x00003f51,0x000900f5,0x000000fb,0x00006285,
52280x000300f7,0x00003bd1,0x00000000,0x000400fa, 57490x00000dcc,0x00003f3b,0x00003f4a,0x00003f44,
52290x00003bca,0x00003bcb,0x00003bd1,0x000200f8, 57500x00003f50,0x00003f4b,0x000500ad,0x0000002f,
52300x00003bcb,0x00050041,0x000001bb,0x00003bcd, 57510x00003c76,0x00006285,0x00006269,0x000600a9,
52310x000001b9,0x000001f0,0x0004003d,0x00000006, 57520x000000fb,0x0000654d,0x00003c76,0x00003c6f,
52320x00003bce,0x00003bcd,0x0004007c,0x000000f4, 57530x0000626f,0x000200f9,0x00003c7c,0x000200f8,
52330x00003bcf,0x00003bce,0x000500af,0x0000002f, 57540x00003c7c,0x000500c3,0x000000fb,0x00003c7e,
52340x00003bd0,0x0000397d,0x00003bcf,0x000200f9, 57550x0000626e,0x0000026c,0x000200f9,0x00003c67,
52350x00003bd1,0x000200f8,0x00003bd1,0x000700f5, 57560x000200f8,0x00003c7f,0x00050084,0x000000fb,
52360x0000002f,0x00003bd2,0x00003bc9,0x00003bc7, 57570x00003c83,0x0000626f,0x00003c4f,0x00050080,
52370x00003bd0,0x00003bcb,0x000300f7,0x00003bd4, 57580x000000fb,0x00003c84,0x000014cd,0x00003c83,
52380x00000000,0x000400fa,0x00003bd2,0x00003bd3, 57590x000300f7,0x00003fdb,0x00000000,0x000300fb,
52390x00003bd4,0x000200f8,0x00003bd3,0x000200f9, 57600x00000140,0x00003fb9,0x000200f8,0x00003fb9,
52400x00003be9,0x000200f8,0x00003bd4,0x00050084, 57610x000500b1,0x0000002f,0x00003fbb,0x00003c84,
52410x00000006,0x00003bf2,0x000000ec,0x000012dd, 57620x00000173,0x000400a8,0x0000002f,0x00003fbc,
52420x00050080,0x00000006,0x00003bf3,0x000001c4, 57630x00003fbb,0x000300f7,0x00003fc3,0x00000000,
52430x00003bf2,0x00050041,0x00000266,0x00003bf4, 57640x000400fa,0x00003fbc,0x00003fbd,0x00003fc3,
52440x000001b9,0x00000264,0x0004003d,0x00000007, 57650x000200f8,0x00003fbd,0x00050041,0x000001c3,
52450x00003bf5,0x00003bf4,0x00050051,0x00000006, 57660x00003fbf,0x000001c1,0x000001f8,0x0004003d,
52460x00003c0f,0x00003bf5,0x00000000,0x00050095, 57670x00000006,0x00003fc0,0x00003fbf,0x0004007c,
52470x0000013d,0x00003c11,0x00003c0f,0x00003bf3, 57680x000000fb,0x00003fc1,0x00003fc0,0x000500af,
52480x00050051,0x00000006,0x00003c12,0x00003c11, 57690x0000002f,0x00003fc2,0x00003c84,0x00003fc1,
52490x00000001,0x00050051,0x00000006,0x00003c13, 57700x000200f9,0x00003fc3,0x000200f8,0x00003fc3,
52500x00003c11,0x00000000,0x00050051,0x00000006, 57710x000700f5,0x0000002f,0x00003fc4,0x00003fbb,
52510x00003c16,0x00003bf5,0x00000001,0x00050080, 57720x00003fb9,0x00003fc2,0x00003fbd,0x000300f7,
52520x00000006,0x00003c18,0x00003c16,0x00003c12, 57730x00003fc6,0x00000000,0x000400fa,0x00003fc4,
52530x00050050,0x00000007,0x00003c19,0x00003c13, 57740x00003fc5,0x00003fc6,0x000200f8,0x00003fc5,
52540x00003c18,0x0004007c,0x00000014,0x00003c09, 57750x000200f9,0x00003fdb,0x000200f8,0x00003fc6,
52550x00003c19,0x00060041,0x0000016c,0x00003c00, 57760x00050084,0x00000006,0x00003fe4,0x000000f3,
52560x00003c09,0x0000016b,0x0000016b,0x0006003d, 57770x000013a7,0x00050080,0x00000006,0x00003fe5,
52570x00000006,0x00003c01,0x00003c00,0x00000002, 57780x000001cc,0x00003fe4,0x00050041,0x0000026e,
52580x00000004,0x0004007c,0x00000006,0x00003c20, 57790x00003fe6,0x000001c1,0x0000026c,0x0004003d,
52590x0000397d,0x00050084,0x00000006,0x00003c21, 57800x00000007,0x00003fe7,0x00003fe6,0x00050051,
52600x000000ec,0x00003c20,0x00050080,0x00000006, 57810x00000006,0x00004001,0x00003fe7,0x00000000,
52610x00003c22,0x000001c4,0x00003c21,0x00050095, 57820x00050095,0x00000145,0x00004003,0x00004001,
52620x0000013d,0x00003c40,0x00003c0f,0x00003c22, 57830x00003fe5,0x00050051,0x00000006,0x00004004,
52630x00050051,0x00000006,0x00003c41,0x00003c40, 57840x00004003,0x00000001,0x00050051,0x00000006,
52640x00000001,0x00050051,0x00000006,0x00003c42, 57850x00004005,0x00004003,0x00000000,0x00050051,
52650x00003c40,0x00000000,0x00050080,0x00000006, 57860x00000006,0x00004008,0x00003fe7,0x00000001,
52660x00003c47,0x00003c16,0x00003c41,0x00050050, 57870x00050080,0x00000006,0x0000400a,0x00004008,
52670x00000007,0x00003c48,0x00003c42,0x00003c47, 57880x00004004,0x00050050,0x00000007,0x0000400b,
52680x0004007c,0x00000014,0x00003c38,0x00003c48, 57890x00004005,0x0000400a,0x0004007c,0x00000014,
52690x00060041,0x0000016c,0x00003c2f,0x00003c38, 57900x00003ffb,0x0000400b,0x00060041,0x00000174,
52700x0000016b,0x0000016b,0x0006003d,0x00000006, 57910x00003ff2,0x00003ffb,0x00000173,0x00000173,
52710x00003c30,0x00003c2f,0x00000002,0x00000004, 57920x0006003d,0x00000006,0x00003ff3,0x00003ff2,
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,
53410x00000002,0x00000004,0x0004007c,0x00000006, 57930x00000002,0x00000004,0x0004007c,0x00000006,
53420x00003caa,0x00003994,0x00050084,0x00000006, 57940x00004012,0x00003c84,0x00050084,0x00000006,
53430x00003cab,0x000000ec,0x00003caa,0x00050080, 57950x00004013,0x000000f3,0x00004012,0x00050080,
53440x00000006,0x00003cac,0x000001c4,0x00003cab, 57960x00000006,0x00004014,0x000001cc,0x00004013,
53450x00050095,0x0000013d,0x00003cca,0x00003c99, 57970x00050095,0x00000145,0x00004032,0x00004001,
53460x00003cac,0x00050051,0x00000006,0x00003ccb, 57980x00004014,0x00050051,0x00000006,0x00004033,
53470x00003cca,0x00000001,0x00050051,0x00000006, 57990x00004032,0x00000001,0x00050051,0x00000006,
53480x00003ccc,0x00003cca,0x00000000,0x00050080, 58000x00004034,0x00004032,0x00000000,0x00050080,
53490x00000006,0x00003cd1,0x00003ca0,0x00003ccb, 58010x00000006,0x00004039,0x00004008,0x00004033,
53500x00050050,0x00000007,0x00003cd2,0x00003ccc, 58020x00050050,0x00000007,0x0000403a,0x00004034,
53510x00003cd1,0x0004007c,0x00000014,0x00003cc2, 58030x00004039,0x0004007c,0x00000014,0x0000402a,
53520x00003cd2,0x00060041,0x0000016c,0x00003cb9, 58040x0000403a,0x00060041,0x00000174,0x00004021,
53530x00003cc2,0x0000016b,0x0000016b,0x0006003d, 58050x0000402a,0x00000173,0x00000173,0x0006003d,
53540x00000006,0x00003cba,0x00003cb9,0x00000002, 58060x00000006,0x00004022,0x00004021,0x00000002,
53550x00000004,0x000500aa,0x0000002f,0x00003c65, 58070x00000004,0x000500aa,0x0000002f,0x00003fcd,
53560x00003c8b,0x00003cba,0x000300f7,0x00003c6d, 58080x00003ff3,0x00004022,0x000300f7,0x00003fd5,
53570x00000000,0x000400fa,0x00003c65,0x00003c66, 58090x00000000,0x000400fa,0x00003fcd,0x00003fce,
53580x00003c6d,0x000200f8,0x00003c66,0x000500c6, 58100x00003fd5,0x000200f8,0x00003fce,0x000500c6,
53590x000000f4,0x00003c69,0x000013db,0x00003994, 58110x000000fb,0x00003fd1,0x000014cd,0x00003c84,
53600x0004007c,0x00000006,0x00003c6a,0x00003c69, 58120x0004007c,0x00000006,0x00003fd2,0x00003fd1,
53610x0006000c,0x000000f4,0x00003c6b,0x00000001, 58130x0006000c,0x000000fb,0x00003fd3,0x00000001,
53620x0000004b,0x00003c6a,0x00050082,0x000000f4, 58140x0000004b,0x00003fd2,0x00050082,0x000000fb,
53630x00003c6c,0x00000d76,0x00003c6b,0x000200f9, 58150x00003fd4,0x00000ddb,0x00003fd3,0x000200f9,
53640x00003c73,0x000200f8,0x00003c6d,0x000500c6, 58160x00003fdb,0x000200f8,0x00003fd5,0x000500c6,
53650x00000006,0x00003c70,0x00003c8b,0x00003cba, 58170x00000006,0x00003fd8,0x00003ff3,0x00004022,
53660x0006000c,0x000000f4,0x00003c71,0x00000001, 58180x0006000c,0x000000fb,0x00003fd9,0x00000001,
53670x0000004b,0x00003c70,0x00050082,0x000000f4, 58190x0000004b,0x00003fd8,0x00050082,0x000000fb,
53680x00003c72,0x00000d7e,0x00003c71,0x000200f9, 58200x00003fda,0x00000de3,0x00003fd9,0x000200f9,
53690x00003c73,0x000200f8,0x00003c73,0x000900f5, 58210x00003fdb,0x000200f8,0x00003fdb,0x000900f5,
53700x000000f4,0x00005e5f,0x00000d67,0x00003c5d, 58220x000000fb,0x00006270,0x00000dcc,0x00003fc5,
53710x00003c6c,0x00003c66,0x00003c72,0x00003c6d, 58230x00003fd4,0x00003fce,0x00003fda,0x00003fd5,
53720x000500ad,0x0000002f,0x00003998,0x00005e5f, 58240x000200f9,0x00003c89,0x000200f8,0x00003c89,
53730x00005e43,0x000600a9,0x000000f4,0x00006117, 58250x000700f5,0x000000fb,0x00006274,0x00000173,
53740x00003998,0x00003991,0x00005e49,0x000200f9, 58260x00003fdb,0x0000654e,0x00003c9e,0x000700f5,
53750x0000399e,0x000200f8,0x0000399e,0x000500c3, 58270x000000fb,0x00006273,0x0000626f,0x00003fdb,
53760x000000f4,0x000039a0,0x00005e48,0x00000264, 58280x00003c8d,0x00003c9e,0x000400f6,0x00003ca1,
53770x000200f9,0x00003989,0x000200f8,0x000039a1, 58290x00003c9e,0x00000000,0x000200f9,0x00003c8a,
53780x00050084,0x000000f4,0x000039a5,0x00005e49, 58300x000200f8,0x00003c8a,0x00050080,0x000000fb,
53790x00003971,0x00050080,0x000000f4,0x000039a6, 58310x00003c8c,0x00006273,0x0000026c,0x000500c3,
53800x000013db,0x000039a5,0x000300f7,0x00003cfd, 58320x000000fb,0x00003c8d,0x00003c8c,0x0000026c,
53810x00000000,0x000300fb,0x00000138,0x00003cdb, 58330x00050080,0x000000fb,0x00003c91,0x00006274,
53820x000200f8,0x00003cdb,0x000500b1,0x0000002f, 58340x00003c8d,0x00050084,0x000000fb,0x00003c93,
53830x00003cdd,0x000039a6,0x0000016b,0x000400a8, 58350x00003c91,0x00003c4f,0x00050080,0x000000fb,
53840x0000002f,0x00003cde,0x00003cdd,0x000300f7, 58360x00003c94,0x000014cd,0x00003c93,0x000300f7,
53850x00003ce5,0x00000000,0x000400fa,0x00003cde, 58370x00004065,0x00000000,0x000300fb,0x00000140,
53860x00003cdf,0x00003ce5,0x000200f8,0x00003cdf, 58380x00004043,0x000200f8,0x00004043,0x000500b1,
53870x00050041,0x000001bb,0x00003ce1,0x000001b9, 58390x0000002f,0x00004045,0x00003c94,0x00000173,
53880x000001f0,0x0004003d,0x00000006,0x00003ce2, 58400x000400a8,0x0000002f,0x00004046,0x00004045,
53890x00003ce1,0x0004007c,0x000000f4,0x00003ce3, 58410x000300f7,0x0000404d,0x00000000,0x000400fa,
53900x00003ce2,0x000500af,0x0000002f,0x00003ce4, 58420x00004046,0x00004047,0x0000404d,0x000200f8,
53910x000039a6,0x00003ce3,0x000200f9,0x00003ce5, 58430x00004047,0x00050041,0x000001c3,0x00004049,
53920x000200f8,0x00003ce5,0x000700f5,0x0000002f, 58440x000001c1,0x000001f8,0x0004003d,0x00000006,
53930x00003ce6,0x00003cdd,0x00003cdb,0x00003ce4, 58450x0000404a,0x00004049,0x0004007c,0x000000fb,
53940x00003cdf,0x000300f7,0x00003ce8,0x00000000, 58460x0000404b,0x0000404a,0x000500af,0x0000002f,
53950x000400fa,0x00003ce6,0x00003ce7,0x00003ce8, 58470x0000404c,0x00003c94,0x0000404b,0x000200f9,
53960x000200f8,0x00003ce7,0x000200f9,0x00003cfd, 58480x0000404d,0x000200f8,0x0000404d,0x000700f5,
53970x000200f8,0x00003ce8,0x00050084,0x00000006, 58490x0000002f,0x0000404e,0x00004045,0x00004043,
53980x00003d06,0x000000ec,0x000012dd,0x00050080, 58500x0000404c,0x00004047,0x000300f7,0x00004050,
53990x00000006,0x00003d07,0x000001c4,0x00003d06, 58510x00000000,0x000400fa,0x0000404e,0x0000404f,
54000x00050041,0x00000266,0x00003d08,0x000001b9, 58520x00004050,0x000200f8,0x0000404f,0x000200f9,
54010x00000264,0x0004003d,0x00000007,0x00003d09, 58530x00004065,0x000200f8,0x00004050,0x00050084,
54020x00003d08,0x00050051,0x00000006,0x00003d23, 58540x00000006,0x0000406e,0x000000f3,0x000013a7,
54030x00003d09,0x00000000,0x00050095,0x0000013d, 58550x00050080,0x00000006,0x0000406f,0x000001cc,
54040x00003d25,0x00003d23,0x00003d07,0x00050051, 58560x0000406e,0x00050041,0x0000026e,0x00004070,
54050x00000006,0x00003d26,0x00003d25,0x00000001, 58570x000001c1,0x0000026c,0x0004003d,0x00000007,
54060x00050051,0x00000006,0x00003d27,0x00003d25, 58580x00004071,0x00004070,0x00050051,0x00000006,
54070x00000000,0x00050051,0x00000006,0x00003d2a, 58590x0000408b,0x00004071,0x00000000,0x00050095,
54080x00003d09,0x00000001,0x00050080,0x00000006, 58600x00000145,0x0000408d,0x0000408b,0x0000406f,
54090x00003d2c,0x00003d2a,0x00003d26,0x00050050, 58610x00050051,0x00000006,0x0000408e,0x0000408d,
54100x00000007,0x00003d2d,0x00003d27,0x00003d2c, 58620x00000001,0x00050051,0x00000006,0x0000408f,
54110x0004007c,0x00000014,0x00003d1d,0x00003d2d, 58630x0000408d,0x00000000,0x00050051,0x00000006,
54120x00060041,0x0000016c,0x00003d14,0x00003d1d, 58640x00004092,0x00004071,0x00000001,0x00050080,
54130x0000016b,0x0000016b,0x0006003d,0x00000006, 58650x00000006,0x00004094,0x00004092,0x0000408e,
54140x00003d15,0x00003d14,0x00000002,0x00000004, 58660x00050050,0x00000007,0x00004095,0x0000408f,
54150x0004007c,0x00000006,0x00003d34,0x000039a6, 58670x00004094,0x0004007c,0x00000014,0x00004085,
54160x00050084,0x00000006,0x00003d35,0x000000ec, 58680x00004095,0x00060041,0x00000174,0x0000407c,
54170x00003d34,0x00050080,0x00000006,0x00003d36, 58690x00004085,0x00000173,0x00000173,0x0006003d,
54180x000001c4,0x00003d35,0x00050095,0x0000013d, 58700x00000006,0x0000407d,0x0000407c,0x00000002,
54190x00003d54,0x00003d23,0x00003d36,0x00050051, 58710x00000004,0x0004007c,0x00000006,0x0000409c,
54200x00000006,0x00003d55,0x00003d54,0x00000001, 58720x00003c94,0x00050084,0x00000006,0x0000409d,
54210x00050051,0x00000006,0x00003d56,0x00003d54, 58730x000000f3,0x0000409c,0x00050080,0x00000006,
54220x00000000,0x00050080,0x00000006,0x00003d5b, 58740x0000409e,0x000001cc,0x0000409d,0x00050095,
54230x00003d2a,0x00003d55,0x00050050,0x00000007, 58750x00000145,0x000040bc,0x0000408b,0x0000409e,
54240x00003d5c,0x00003d56,0x00003d5b,0x0004007c, 58760x00050051,0x00000006,0x000040bd,0x000040bc,
54250x00000014,0x00003d4c,0x00003d5c,0x00060041, 58770x00000001,0x00050051,0x00000006,0x000040be,
54260x0000016c,0x00003d43,0x00003d4c,0x0000016b, 58780x000040bc,0x00000000,0x00050080,0x00000006,
54270x0000016b,0x0006003d,0x00000006,0x00003d44, 58790x000040c3,0x00004092,0x000040bd,0x00050050,
54280x00003d43,0x00000002,0x00000004,0x000500aa, 58800x00000007,0x000040c4,0x000040be,0x000040c3,
54290x0000002f,0x00003cef,0x00003d15,0x00003d44, 58810x0004007c,0x00000014,0x000040b4,0x000040c4,
54300x000300f7,0x00003cf7,0x00000000,0x000400fa, 58820x00060041,0x00000174,0x000040ab,0x000040b4,
54310x00003cef,0x00003cf0,0x00003cf7,0x000200f8, 58830x00000173,0x00000173,0x0006003d,0x00000006,
54320x00003cf0,0x000500c6,0x000000f4,0x00003cf3, 58840x000040ac,0x000040ab,0x00000002,0x00000004,
54330x000013db,0x000039a6,0x0004007c,0x00000006, 58850x000500aa,0x0000002f,0x00004057,0x0000407d,
54340x00003cf4,0x00003cf3,0x0006000c,0x000000f4, 58860x000040ac,0x000300f7,0x0000405f,0x00000000,
54350x00003cf5,0x00000001,0x0000004b,0x00003cf4, 58870x000400fa,0x00004057,0x00004058,0x0000405f,
54360x00050082,0x000000f4,0x00003cf6,0x00000d76, 58880x000200f8,0x00004058,0x000500c6,0x000000fb,
54370x00003cf5,0x000200f9,0x00003cfd,0x000200f8, 58890x0000405b,0x000014cd,0x00003c94,0x0004007c,
54380x00003cf7,0x000500c6,0x00000006,0x00003cfa, 58900x00000006,0x0000405c,0x0000405b,0x0006000c,
54390x00003d15,0x00003d44,0x0006000c,0x000000f4, 58910x000000fb,0x0000405d,0x00000001,0x0000004b,
54400x00003cfb,0x00000001,0x0000004b,0x00003cfa, 58920x0000405c,0x00050082,0x000000fb,0x0000405e,
54410x00050082,0x000000f4,0x00003cfc,0x00000d7e, 58930x00000ddb,0x0000405d,0x000200f9,0x00004065,
54420x00003cfb,0x000200f9,0x00003cfd,0x000200f8, 58940x000200f8,0x0000405f,0x000500c6,0x00000006,
54430x00003cfd,0x000900f5,0x000000f4,0x00005e4a, 58950x00004062,0x0000407d,0x000040ac,0x0006000c,
54440x00000d67,0x00003ce7,0x00003cf6,0x00003cf0, 58960x000000fb,0x00004063,0x00000001,0x0000004b,
54450x00003cfc,0x00003cf7,0x000200f9,0x000039ab, 58970x00004062,0x00050082,0x000000fb,0x00004064,
54460x000200f8,0x000039ab,0x000700f5,0x000000f4, 58980x00000de3,0x00004063,0x000200f9,0x00004065,
54470x00005e4e,0x0000016b,0x00003cfd,0x00006118, 58990x000200f8,0x00004065,0x000900f5,0x000000fb,
54480x000039c0,0x000700f5,0x000000f4,0x00005e4d, 59000x00006275,0x00000dcc,0x0000404f,0x0000405e,
54490x00005e49,0x00003cfd,0x000039af,0x000039c0, 59010x00004058,0x00004064,0x0000405f,0x000500ad,
54500x000400f6,0x000039c3,0x000039c0,0x00000000, 59020x0000002f,0x00003c98,0x00006275,0x00006270,
54510x000200f9,0x000039ac,0x000200f8,0x000039ac, 59030x000600a9,0x000000fb,0x0000654e,0x00003c98,
54520x00050080,0x000000f4,0x000039ae,0x00005e4d, 59040x00003c91,0x00006274,0x000200f9,0x00003c9e,
54530x00000264,0x000500c3,0x000000f4,0x000039af, 59050x000200f8,0x00003c9e,0x000500ad,0x0000002f,
54540x000039ae,0x00000264,0x00050080,0x000000f4, 59060x00003ca0,0x00003c8d,0x0000026c,0x000400fa,
54550x000039b3,0x00005e4e,0x000039af,0x00050084, 59070x00003ca0,0x00003c89,0x00003ca1,0x000200f8,
54560x000000f4,0x000039b5,0x000039b3,0x00003971, 59080x00003ca1,0x00050084,0x000000fb,0x00003ca5,
54570x00050080,0x000000f4,0x000039b6,0x000013db, 59090x0000654e,0x00003c4f,0x00050080,0x000000fb,
54580x000039b5,0x000300f7,0x00003d87,0x00000000, 59100x00003ca6,0x000014cd,0x00003ca5,0x0007000c,
54590x000300fb,0x00000138,0x00003d65,0x000200f8, 59110x000000fb,0x00003ca8,0x00000001,0x00000027,
54600x00003d65,0x000500b1,0x0000002f,0x00003d67, 59120x00003c4f,0x00000173,0x00050080,0x000000fb,
54610x000039b6,0x0000016b,0x000400a8,0x0000002f, 59130x00003ca9,0x00003ca6,0x00003ca8,0x0007000c,
54620x00003d68,0x00003d67,0x000300f7,0x00003d6f, 59140x000000fb,0x00003cac,0x00000001,0x00000027,
54630x00000000,0x000400fa,0x00003d68,0x00003d69, 59150x000014cd,0x00003c84,0x000500aa,0x0000002f,
54640x00003d6f,0x000200f8,0x00003d69,0x00050041, 59160x00003cae,0x00003cac,0x00003ca9,0x000300f7,
54650x000001bb,0x00003d6b,0x000001b9,0x000001f0, 59170x00003cb6,0x00000000,0x000400fa,0x00003cae,
54660x0004003d,0x00000006,0x00003d6c,0x00003d6b, 59180x00003caf,0x00003cb3,0x000200f8,0x00003cb3,
54670x0004007c,0x000000f4,0x00003d6d,0x00003d6c, 59190x0004007c,0x00000006,0x00003cb5,0x00003ca9,
54680x000500af,0x0000002f,0x00003d6e,0x000039b6, 59200x000200f9,0x00003cb6,0x000200f8,0x00003caf,
54690x00003d6d,0x000200f9,0x00003d6f,0x000200f8, 59210x0004007c,0x00000006,0x00003cb1,0x00003ca9,
54700x00003d6f,0x000700f5,0x0000002f,0x00003d70, 59220x000500c5,0x00000006,0x00003cb2,0x00000249,
54710x00003d67,0x00003d65,0x00003d6e,0x00003d69, 59230x00003cb1,0x000200f9,0x00003cb6,0x000200f8,
54720x000300f7,0x00003d72,0x00000000,0x000400fa, 59240x00003cb6,0x000700f5,0x00000006,0x0000627c,
54730x00003d70,0x00003d71,0x00003d72,0x000200f8, 59250x00003cb2,0x00003caf,0x00003cb5,0x00003cb3,
54740x00003d71,0x000200f9,0x00003d87,0x000200f8, 59260x0007000c,0x000000fb,0x00003cba,0x00000001,
54750x00003d72,0x00050084,0x00000006,0x00003d90, 59270x0000002a,0x000014cd,0x00003c84,0x00050080,
54760x000000ec,0x000012dd,0x00050080,0x00000006, 59280x000000fb,0x00003cbc,0x00003ca9,0x0000026c,
54770x00003d91,0x000001c4,0x00003d90,0x00050041, 59290x000500aa,0x0000002f,0x00003cbd,0x00003cba,
54780x00000266,0x00003d92,0x000001b9,0x00000264, 59300x00003cbc,0x000300f7,0x00003cc7,0x00000000,
54790x0004003d,0x00000007,0x00003d93,0x00003d92, 59310x000400fa,0x00003cbd,0x00003cbe,0x00003cc3,
54800x00050051,0x00000006,0x00003dad,0x00003d93, 59320x000200f8,0x00003cc3,0x0004007c,0x00000006,
54810x00000000,0x00050095,0x0000013d,0x00003daf, 59330x00003cc6,0x00003cbc,0x000200f9,0x00003cc7,
54820x00003dad,0x00003d91,0x00050051,0x00000006, 59340x000200f8,0x00003cbe,0x0004007c,0x00000006,
54830x00003db0,0x00003daf,0x00000001,0x00050051, 59350x00003cc1,0x00003cbc,0x000500c5,0x00000006,
54840x00000006,0x00003db1,0x00003daf,0x00000000, 59360x00003cc2,0x00000249,0x00003cc1,0x000200f9,
54850x00050051,0x00000006,0x00003db4,0x00003d93, 59370x00003cc7,0x000200f8,0x00003cc7,0x000700f5,
54860x00000001,0x00050080,0x00000006,0x00003db6, 59380x00000006,0x0000627d,0x00003cc2,0x00003cbe,
54870x00003db4,0x00003db0,0x00050050,0x00000007, 59390x00003cc6,0x00003cc3,0x00050041,0x000001c3,
54880x00003db7,0x00003db1,0x00003db6,0x0004007c, 59400x000040e1,0x000001c1,0x000001c2,0x0004003d,
54890x00000014,0x00003da7,0x00003db7,0x00060041, 59410x00000006,0x000040e2,0x000040e1,0x00050084,
54900x0000016c,0x00003d9e,0x00003da7,0x0000016b, 59420x00000006,0x000040e3,0x000001e3,0x000040e2,
54910x0000016b,0x0006003d,0x00000006,0x00003d9f, 59430x00050080,0x00000006,0x000040e4,0x000001cc,
54920x00003d9e,0x00000002,0x00000004,0x0004007c, 59440x000040e3,0x00050080,0x00000006,0x000040ea,
54930x00000006,0x00003dbe,0x000039b6,0x00050084, 59450x000040e2,0x00000695,0x00050086,0x00000006,
54940x00000006,0x00003dbf,0x000000ec,0x00003dbe, 59460x000040eb,0x000040ea,0x000001c6,0x00050084,
54950x00050080,0x00000006,0x00003dc0,0x000001c4, 59470x00000006,0x000040dd,0x000001cc,0x000040eb,
54960x00003dbf,0x00050095,0x0000013d,0x00003dde, 59480x00050080,0x00000006,0x000040de,0x000040e4,
54970x00003dad,0x00003dc0,0x00050051,0x00000006, 59490x000040dd,0x00050080,0x00000006,0x000040d8,
54980x00003ddf,0x00003dde,0x00000001,0x00050051, 59500x000040de,0x000040dd,0x00050041,0x000001c3,
54990x00000006,0x00003de0,0x00003dde,0x00000000, 59510x000040cf,0x000001c1,0x000001f8,0x0004003d,
55000x00050080,0x00000006,0x00003de5,0x00003db4, 59520x00000006,0x000040d0,0x000040cf,0x00050084,
55010x00003ddf,0x00050050,0x00000007,0x00003de6, 59530x00000006,0x000040d1,0x000001f7,0x000040d0,
55020x00003de0,0x00003de5,0x0004007c,0x00000014, 59540x00050080,0x00000006,0x000040d2,0x000040d8,
55030x00003dd6,0x00003de6,0x00060041,0x0000016c, 59550x000040d1,0x00050041,0x000001c3,0x000040c8,
55040x00003dcd,0x00003dd6,0x0000016b,0x0000016b, 59560x000001c1,0x0000020e,0x0004003d,0x00000006,
55050x0006003d,0x00000006,0x00003dce,0x00003dcd, 59570x000040c9,0x000040c8,0x00050084,0x00000006,
55060x00000002,0x00000004,0x000500aa,0x0000002f, 59580x000040ca,0x0000020d,0x000040c9,0x00050080,
55070x00003d79,0x00003d9f,0x00003dce,0x000300f7, 59590x00000006,0x000040cb,0x000040d2,0x000040ca,
55080x00003d81,0x00000000,0x000400fa,0x00003d79, 59600x00050084,0x00000006,0x00003ccc,0x000000f3,
55090x00003d7a,0x00003d81,0x000200f8,0x00003d7a, 59610x000013a7,0x00050080,0x00000006,0x00003ccd,
55100x000500c6,0x000000f4,0x00003d7d,0x000013db, 59620x000040cb,0x00003ccc,0x00050041,0x0000026e,
55110x000039b6,0x0004007c,0x00000006,0x00003d7e, 59630x00003cce,0x000001c1,0x0000026c,0x0004003d,
55120x00003d7d,0x0006000c,0x000000f4,0x00003d7f, 59640x00000007,0x00003ccf,0x00003cce,0x00050051,
55130x00000001,0x0000004b,0x00003d7e,0x00050082, 59650x00000006,0x00004108,0x00003ccf,0x00000000,
55140x000000f4,0x00003d80,0x00000d76,0x00003d7f, 59660x00050095,0x00000145,0x0000410a,0x00004108,
55150x000200f9,0x00003d87,0x000200f8,0x00003d81, 59670x00003ccd,0x00050051,0x00000006,0x0000410b,
55160x000500c6,0x00000006,0x00003d84,0x00003d9f, 59680x0000410a,0x00000001,0x00050051,0x00000006,
55170x00003dce,0x0006000c,0x000000f4,0x00003d85, 59690x0000410c,0x0000410a,0x00000000,0x00050051,
55180x00000001,0x0000004b,0x00003d84,0x00050082, 59700x00000006,0x0000410f,0x00003ccf,0x00000001,
55190x000000f4,0x00003d86,0x00000d7e,0x00003d85, 59710x00050080,0x00000006,0x00004111,0x0000410f,
55200x000200f9,0x00003d87,0x000200f8,0x00003d87, 59720x0000410b,0x00050050,0x00000007,0x00004112,
55210x000900f5,0x000000f4,0x00005e4f,0x00000d67, 59730x0000410c,0x00004111,0x0004007c,0x00000014,
55220x00003d71,0x00003d80,0x00003d7a,0x00003d86, 59740x00004102,0x00004112,0x00060041,0x00000174,
55230x00003d81,0x000500ad,0x0000002f,0x000039ba, 59750x000040fa,0x00004102,0x00000173,0x00000173,
55240x00005e4f,0x00005e4a,0x000600a9,0x000000f4, 59760x0005003e,0x000040fa,0x0000627c,0x00000002,
55250x00006118,0x000039ba,0x000039b3,0x00005e4e, 59770x00000004,0x000500ac,0x0000002f,0x0000414c,
55260x000200f9,0x000039c0,0x000200f8,0x000039c0, 59780x000040d0,0x0000014a,0x000300f7,0x00004152,
55270x000500ad,0x0000002f,0x000039c2,0x000039af, 59790x00000000,0x000400fa,0x0000414c,0x0000414d,
55280x00000264,0x000400fa,0x000039c2,0x000039ab, 59800x00004151,0x000200f8,0x00004151,0x000200f9,
55290x000039c3,0x000200f8,0x000039c3,0x00050084, 59810x00004152,0x000200f8,0x0000414d,0x00050082,
55300x000000f4,0x000039c7,0x00006118,0x00003971, 59820x00000006,0x00004150,0x000040d0,0x0000014a,
55310x00050080,0x000000f4,0x000039c8,0x000013db, 59830x000200f9,0x00004152,0x000200f8,0x00004152,
55320x000039c7,0x0007000c,0x000000f4,0x000039ca, 59840x000700f5,0x00000006,0x0000627e,0x00004150,
55330x00000001,0x00000027,0x00003971,0x0000016b, 59850x0000414d,0x00000140,0x00004151,0x00050084,
55340x00050080,0x000000f4,0x000039cb,0x000039c8, 59860x00000006,0x00004117,0x000000f3,0x0000627e,
55350x000039ca,0x0007000c,0x000000f4,0x000039ce, 59870x00050080,0x00000006,0x00004118,0x000040cb,
55360x00000001,0x00000027,0x000013db,0x000039a6, 59880x00004117,0x00050080,0x00000006,0x00003cd6,
55370x000500aa,0x0000002f,0x000039d0,0x000039ce, 59890x00004118,0x00003ccc,0x00050095,0x00000145,
55380x000039cb,0x000300f7,0x000039d8,0x00000000, 59900x0000416b,0x00004108,0x00003cd6,0x00050051,
55390x000400fa,0x000039d0,0x000039d1,0x000039d5, 59910x00000006,0x0000416c,0x0000416b,0x00000001,
55400x000200f8,0x000039d5,0x0004007c,0x00000006, 59920x00050051,0x00000006,0x0000416d,0x0000416b,
55410x000039d7,0x000039cb,0x000200f9,0x000039d8, 59930x00000000,0x00050080,0x00000006,0x00004172,
55420x000200f8,0x000039d1,0x0004007c,0x00000006, 59940x0000410f,0x0000416c,0x00050050,0x00000007,
55430x000039d3,0x000039cb,0x000500c5,0x00000006, 59950x00004173,0x0000416d,0x00004172,0x0004007c,
55440x000039d4,0x00000241,0x000039d3,0x000200f9, 59960x00000014,0x00004163,0x00004173,0x00060041,
55450x000039d8,0x000200f8,0x000039d8,0x000700f5, 59970x00000174,0x0000415b,0x00004163,0x00000173,
55460x00000006,0x00005e56,0x000039d4,0x000039d1, 59980x00000173,0x0005003e,0x0000415b,0x0000627d,
55470x000039d7,0x000039d5,0x0007000c,0x000000f4, 59990x00000002,0x00000004,0x000500c7,0x00000006,
55480x000039dc,0x00000001,0x0000002a,0x000013db, 60000x00003cdc,0x0000627c,0x00000249,0x000500aa,
55490x000039a6,0x00050080,0x000000f4,0x000039de, 60010x0000002f,0x00003cdd,0x00003cdc,0x00000140,
55500x000039cb,0x00000264,0x000500aa,0x0000002f, 60020x000300f7,0x00003ce8,0x00000000,0x000400fa,
55510x000039df,0x000039dc,0x000039de,0x000300f7, 60030x00003cdd,0x00003cde,0x00003ce8,0x000200f8,
55520x000039e9,0x00000000,0x000400fa,0x000039df, 60040x00003cde,0x000300f7,0x000041b9,0x00000000,
55530x000039e0,0x000039e5,0x000200f8,0x000039e5, 60050x000400fa,0x0000414c,0x000041b4,0x000041b8,
55540x0004007c,0x00000006,0x000039e8,0x000039de, 60060x000200f8,0x000041b8,0x000200f9,0x000041b9,
55550x000200f9,0x000039e9,0x000200f8,0x000039e0, 60070x000200f8,0x000041b4,0x00050082,0x00000006,
55560x0004007c,0x00000006,0x000039e3,0x000039de, 60080x000041b7,0x000040d0,0x0000014a,0x000200f9,
55570x000500c5,0x00000006,0x000039e4,0x00000241, 60090x000041b9,0x000200f8,0x000041b9,0x000700f5,
55580x000039e3,0x000200f9,0x000039e9,0x000200f8, 60100x00000006,0x0000627f,0x000041b7,0x000041b4,
55590x000039e9,0x000700f5,0x00000006,0x00005e57, 60110x00000140,0x000041b8,0x00050084,0x00000006,
55600x000039e4,0x000039e0,0x000039e8,0x000039e5, 60120x0000417e,0x000000f3,0x0000627f,0x00050080,
55610x00050041,0x000001bb,0x00003e03,0x000001b9, 60130x00000006,0x0000417f,0x000040cb,0x0000417e,
55620x000001ba,0x0004003d,0x00000006,0x00003e04, 60140x000300f7,0x000041c6,0x00000000,0x000400fa,
55630x00003e03,0x00050084,0x00000006,0x00003e05, 60150x0000414c,0x000041c1,0x000041c5,0x000200f8,
55640x000001db,0x00003e04,0x00050080,0x00000006, 60160x000041c5,0x000200f9,0x000041c6,0x000200f8,
55650x00003e06,0x000001c4,0x00003e05,0x00050080, 60170x000041c1,0x00050082,0x00000006,0x000041c4,
55660x00000006,0x00003e0c,0x00003e04,0x0000062f, 60180x000040d0,0x0000014a,0x000200f9,0x000041c6,
55670x00050086,0x00000006,0x00003e0d,0x00003e0c, 60190x000200f8,0x000041c6,0x000700f5,0x00000006,
55680x000001be,0x00050084,0x00000006,0x00003dff, 60200x00006280,0x000041c4,0x000041c1,0x00000140,
55690x000001c4,0x00003e0d,0x00050080,0x00000006, 60210x000041c5,0x00050084,0x00000006,0x00004178,
55700x00003e00,0x00003e06,0x00003dff,0x00050080, 60220x000000f3,0x00006280,0x00050080,0x00000006,
55710x00000006,0x00003dfa,0x00003e00,0x00003dff, 60230x00004179,0x0000417f,0x00004178,0x00050084,
55720x00050041,0x000001bb,0x00003df1,0x000001b9, 60240x00000006,0x00003ce1,0x000000f3,0x0000627c,
55730x000001f0,0x0004003d,0x00000006,0x00003df2, 60250x00050080,0x00000006,0x00003ce2,0x00004179,
55740x00003df1,0x00050084,0x00000006,0x00003df3, 60260x00003ce1,0x00050095,0x00000145,0x000041df,
55750x000001ef,0x00003df2,0x00050080,0x00000006, 60270x00004108,0x00003ce2,0x00050051,0x00000006,
55760x00003df4,0x00003dfa,0x00003df3,0x00050041, 60280x000041e0,0x000041df,0x00000001,0x00050051,
55770x000001bb,0x00003dea,0x000001b9,0x00000206, 60290x00000006,0x000041e1,0x000041df,0x00000000,
55780x0004003d,0x00000006,0x00003deb,0x00003dea, 60300x00050080,0x00000006,0x000041e6,0x0000410f,
55790x00050084,0x00000006,0x00003dec,0x00000205, 60310x000041e0,0x00050050,0x00000007,0x000041e7,
55800x00003deb,0x00050080,0x00000006,0x00003ded, 60320x000041e1,0x000041e6,0x0004007c,0x00000014,
55810x00003df4,0x00003dec,0x00050084,0x00000006, 60330x000041d7,0x000041e7,0x00060041,0x00000174,
55820x000039ee,0x000000ec,0x000012dd,0x00050080, 60340x000041cf,0x000041d7,0x00000173,0x00000173,
55830x00000006,0x000039ef,0x00003ded,0x000039ee, 60350x0005003e,0x000041cf,0x000013a7,0x00000002,
55840x00050041,0x00000266,0x000039f0,0x000001b9, 60360x00000004,0x000200f9,0x00003ce8,0x000200f8,
55850x00000264,0x0004003d,0x00000007,0x000039f1, 60370x00003ce8,0x000500c7,0x00000006,0x00003cea,
55860x000039f0,0x00050051,0x00000006,0x00003e2a, 60380x0000627d,0x00000249,0x000500aa,0x0000002f,
55870x000039f1,0x00000000,0x00050095,0x0000013d, 60390x00003ceb,0x00003cea,0x00000140,0x000300f7,
55880x00003e2c,0x00003e2a,0x000039ef,0x00050051, 60400x00003cf6,0x00000000,0x000400fa,0x00003ceb,
55890x00000006,0x00003e2d,0x00003e2c,0x00000001, 60410x00003cec,0x00003cf6,0x000200f8,0x00003cec,
55900x00050051,0x00000006,0x00003e2e,0x00003e2c, 60420x000300f7,0x0000422d,0x00000000,0x000400fa,
55910x00000000,0x00050051,0x00000006,0x00003e31, 60430x0000414c,0x00004228,0x0000422c,0x000200f8,
55920x000039f1,0x00000001,0x00050080,0x00000006, 60440x0000422c,0x000200f9,0x0000422d,0x000200f8,
55930x00003e33,0x00003e31,0x00003e2d,0x00050050, 60450x00004228,0x00050082,0x00000006,0x0000422b,
55940x00000007,0x00003e34,0x00003e2e,0x00003e33, 60460x000040d0,0x0000014a,0x000200f9,0x0000422d,
55950x0004007c,0x00000014,0x00003e24,0x00003e34, 60470x000200f8,0x0000422d,0x000700f5,0x00000006,
55960x00060041,0x0000016c,0x00003e1c,0x00003e24, 60480x00006281,0x0000422b,0x00004228,0x00000140,
55970x0000016b,0x0000016b,0x0005003e,0x00003e1c, 60490x0000422c,0x00050084,0x00000006,0x000041f2,
55980x00005e56,0x00000002,0x00000004,0x000500ac, 60500x000000f3,0x00006281,0x00050080,0x00000006,
55990x0000002f,0x00003e6e,0x00003df2,0x00000142, 60510x000041f3,0x000040cb,0x000041f2,0x000300f7,
56000x000300f7,0x00003e74,0x00000000,0x000400fa, 60520x0000423a,0x00000000,0x000400fa,0x0000414c,
56010x00003e6e,0x00003e6f,0x00003e73,0x000200f8, 60530x00004235,0x00004239,0x000200f8,0x00004239,
56020x00003e73,0x000200f9,0x00003e74,0x000200f8, 60540x000200f9,0x0000423a,0x000200f8,0x00004235,
56030x00003e6f,0x00050082,0x00000006,0x00003e72, 60550x00050082,0x00000006,0x00004238,0x000040d0,
56040x00003df2,0x00000142,0x000200f9,0x00003e74, 60560x0000014a,0x000200f9,0x0000423a,0x000200f8,
56050x000200f8,0x00003e74,0x000700f5,0x00000006, 60570x0000423a,0x000700f5,0x00000006,0x00006282,
56060x00005e58,0x00003e72,0x00003e6f,0x00000138, 60580x00004238,0x00004235,0x00000140,0x00004239,
56070x00003e73,0x00050084,0x00000006,0x00003e39, 60590x00050084,0x00000006,0x000041ec,0x000000f3,
56080x000000ec,0x00005e58,0x00050080,0x00000006, 60600x00006282,0x00050080,0x00000006,0x000041ed,
56090x00003e3a,0x00003ded,0x00003e39,0x00050080, 60610x000041f3,0x000041ec,0x00050084,0x00000006,
56100x00000006,0x000039f8,0x00003e3a,0x000039ee, 60620x00003cef,0x000000f3,0x0000627d,0x00050080,
56110x00050095,0x0000013d,0x00003e8d,0x00003e2a, 60630x00000006,0x00003cf0,0x000041ed,0x00003cef,
56120x000039f8,0x00050051,0x00000006,0x00003e8e, 60640x00050095,0x00000145,0x00004253,0x00004108,
56130x00003e8d,0x00000001,0x00050051,0x00000006, 60650x00003cf0,0x00050051,0x00000006,0x00004254,
56140x00003e8f,0x00003e8d,0x00000000,0x00050080, 60660x00004253,0x00000001,0x00050051,0x00000006,
56150x00000006,0x00003e94,0x00003e31,0x00003e8e, 60670x00004255,0x00004253,0x00000000,0x00050080,
56160x00050050,0x00000007,0x00003e95,0x00003e8f, 60680x00000006,0x0000425a,0x0000410f,0x00004254,
56170x00003e94,0x0004007c,0x00000014,0x00003e85, 60690x00050050,0x00000007,0x0000425b,0x00004255,
56180x00003e95,0x00060041,0x0000016c,0x00003e7d, 60700x0000425a,0x0004007c,0x00000014,0x0000424b,
56190x00003e85,0x0000016b,0x0000016b,0x0005003e, 60710x0000425b,0x00060041,0x00000174,0x00004243,
56200x00003e7d,0x00005e57,0x00000002,0x00000004, 60720x0000424b,0x00000173,0x00000173,0x0005003e,
56210x000500c7,0x00000006,0x000039fe,0x00005e56, 60730x00004243,0x000013a7,0x00000002,0x00000004,
56220x00000241,0x000500aa,0x0000002f,0x000039ff, 60740x000200f9,0x00003cf6,0x000200f8,0x00003cf6,
56230x000039fe,0x00000138,0x000300f7,0x00003a0a, 60750x000500aa,0x0000002f,0x00003cf8,0x000014cd,
56240x00000000,0x000400fa,0x000039ff,0x00003a00, 60760x00000173,0x000300f7,0x00003cfe,0x00000000,
56250x00003a0a,0x000200f8,0x00003a00,0x000300f7, 60770x000400fa,0x00003cf8,0x00003cf9,0x00003cfe,
56260x00003edb,0x00000000,0x000400fa,0x00003e6e, 60780x000200f8,0x00003cf9,0x000300f7,0x000042a1,
56270x00003ed6,0x00003eda,0x000200f8,0x00003eda, 60790x00000000,0x000400fa,0x0000414c,0x0000429c,
56280x000200f9,0x00003edb,0x000200f8,0x00003ed6, 60800x000042a0,0x000200f8,0x000042a0,0x000200f9,
56290x00050082,0x00000006,0x00003ed9,0x00003df2, 60810x000042a1,0x000200f8,0x0000429c,0x00050082,
56300x00000142,0x000200f9,0x00003edb,0x000200f8, 60820x00000006,0x0000429f,0x000040d0,0x0000014a,
56310x00003edb,0x000700f5,0x00000006,0x00005e59, 60830x000200f9,0x000042a1,0x000200f8,0x000042a1,
56320x00003ed9,0x00003ed6,0x00000138,0x00003eda, 60840x000700f5,0x00000006,0x00006283,0x0000429f,
56330x00050084,0x00000006,0x00003ea0,0x000000ec, 60850x0000429c,0x00000140,0x000042a0,0x00050084,
56340x00005e59,0x00050080,0x00000006,0x00003ea1, 60860x00000006,0x00004266,0x000000f3,0x00006283,
56350x00003ded,0x00003ea0,0x000300f7,0x00003ee8, 60870x00050080,0x00000006,0x00004267,0x000040cb,
56360x00000000,0x000400fa,0x00003e6e,0x00003ee3, 60880x00004266,0x000300f7,0x000042ae,0x00000000,
56370x00003ee7,0x000200f8,0x00003ee7,0x000200f9, 60890x000400fa,0x0000414c,0x000042a9,0x000042ad,
56380x00003ee8,0x000200f8,0x00003ee3,0x00050082, 60900x000200f8,0x000042ad,0x000200f9,0x000042ae,
56390x00000006,0x00003ee6,0x00003df2,0x00000142, 60910x000200f8,0x000042a9,0x00050082,0x00000006,
56400x000200f9,0x00003ee8,0x000200f8,0x00003ee8, 60920x000042ac,0x000040d0,0x0000014a,0x000200f9,
56410x000700f5,0x00000006,0x00005e5a,0x00003ee6, 60930x000042ae,0x000200f8,0x000042ae,0x000700f5,
56420x00003ee3,0x00000138,0x00003ee7,0x00050084, 60940x00000006,0x00006284,0x000042ac,0x000042a9,
56430x00000006,0x00003e9a,0x000000ec,0x00005e5a, 60950x00000140,0x000042ad,0x00050084,0x00000006,
56440x00050080,0x00000006,0x00003e9b,0x00003ea1, 60960x00004260,0x000000f3,0x00006284,0x00050080,
56450x00003e9a,0x00050084,0x00000006,0x00003a03, 60970x00000006,0x00004261,0x00004267,0x00004260,
56460x000000ec,0x00005e56,0x00050080,0x00000006, 60980x00050095,0x00000145,0x000042c7,0x00004108,
56470x00003a04,0x00003e9b,0x00003a03,0x00050095, 60990x00004261,0x00050051,0x00000006,0x000042c8,
56480x0000013d,0x00003f01,0x00003e2a,0x00003a04, 61000x000042c7,0x00000001,0x00050051,0x00000006,
56490x00050051,0x00000006,0x00003f02,0x00003f01, 61010x000042c9,0x000042c7,0x00000000,0x00050080,
56500x00000001,0x00050051,0x00000006,0x00003f03, 61020x00000006,0x000042ce,0x0000410f,0x000042c8,
56510x00003f01,0x00000000,0x00050080,0x00000006, 61030x00050050,0x00000007,0x000042cf,0x000042c9,
56520x00003f08,0x00003e31,0x00003f02,0x00050050, 61040x000042ce,0x0004007c,0x00000014,0x000042bf,
56530x00000007,0x00003f09,0x00003f03,0x00003f08, 61050x000042cf,0x00060041,0x00000174,0x000042b7,
56540x0004007c,0x00000014,0x00003ef9,0x00003f09, 61060x000042bf,0x00000173,0x00000173,0x0005003e,
56550x00060041,0x0000016c,0x00003ef1,0x00003ef9, 61070x000042b7,0x000003bf,0x00000002,0x00000004,
56560x0000016b,0x0000016b,0x0005003e,0x00003ef1, 61080x000200f9,0x00003cfe,0x000200f8,0x00003cfe,
56570x000012dd,0x00000002,0x00000004,0x000200f9, 61090x000200f9,0x000014cb,0x000200f8,0x000014cb,
56580x00003a0a,0x000200f8,0x00003a0a,0x000500c7, 61100x000200f9,0x000014c2,0x000200f8,0x000014c1,
56590x00000006,0x00003a0c,0x00005e57,0x00000241, 61110x00050041,0x000001c3,0x00003a24,0x000001c1,
56600x000500aa,0x0000002f,0x00003a0d,0x00003a0c, 61120x000001c2,0x0004003d,0x00000006,0x00003a25,
56610x00000138,0x000300f7,0x00003a18,0x00000000, 61130x00003a24,0x00050084,0x00000006,0x00003a26,
56620x000400fa,0x00003a0d,0x00003a0e,0x00003a18, 61140x000001e3,0x00003a25,0x00050080,0x00000006,
56630x000200f8,0x00003a0e,0x000300f7,0x00003f4f, 61150x00003a27,0x000001cc,0x00003a26,0x00050080,
56640x00000000,0x000400fa,0x00003e6e,0x00003f4a, 61160x00000006,0x00003a2d,0x00003a25,0x00000695,
56650x00003f4e,0x000200f8,0x00003f4e,0x000200f9, 61170x00050086,0x00000006,0x00003a2e,0x00003a2d,
56660x00003f4f,0x000200f8,0x00003f4a,0x00050082, 61180x000001c6,0x00050084,0x00000006,0x00003a20,
56670x00000006,0x00003f4d,0x00003df2,0x00000142, 61190x000001cc,0x00003a2e,0x00050080,0x00000006,
56680x000200f9,0x00003f4f,0x000200f8,0x00003f4f, 61200x00003a21,0x00003a27,0x00003a20,0x00050080,
56690x000700f5,0x00000006,0x00005e5b,0x00003f4d, 61210x00000006,0x00003a1b,0x00003a21,0x00003a20,
56700x00003f4a,0x00000138,0x00003f4e,0x00050084, 61220x00050084,0x00000006,0x000039ef,0x000001f7,
56710x00000006,0x00003f14,0x000000ec,0x00005e5b, 61230x000013a7,0x00050080,0x00000006,0x000039f0,
56720x00050080,0x00000006,0x00003f15,0x00003ded, 61240x00003a1b,0x000039ef,0x00050041,0x0000026e,
56730x00003f14,0x000300f7,0x00003f5c,0x00000000, 61250x000039f1,0x000001c1,0x0000026c,0x0004003d,
56740x000400fa,0x00003e6e,0x00003f57,0x00003f5b, 61260x00000007,0x000039f2,0x000039f1,0x00050051,
56750x000200f8,0x00003f5b,0x000200f9,0x00003f5c, 61270x00000006,0x00003a4c,0x000039f2,0x00000000,
56760x000200f8,0x00003f57,0x00050082,0x00000006, 61280x00050095,0x00000145,0x00003a4e,0x00003a4c,
56770x00003f5a,0x00003df2,0x00000142,0x000200f9, 61290x000039f0,0x00050051,0x00000006,0x00003a4f,
56780x00003f5c,0x000200f8,0x00003f5c,0x000700f5, 61300x00003a4e,0x00000001,0x00050051,0x00000006,
56790x00000006,0x00005e5c,0x00003f5a,0x00003f57, 61310x00003a50,0x00003a4e,0x00000000,0x00050051,
56800x00000138,0x00003f5b,0x00050084,0x00000006, 61320x00000006,0x00003a53,0x000039f2,0x00000001,
56810x00003f0e,0x000000ec,0x00005e5c,0x00050080, 61330x00050080,0x00000006,0x00003a55,0x00003a53,
56820x00000006,0x00003f0f,0x00003f15,0x00003f0e, 61340x00003a4f,0x00050050,0x00000007,0x00003a56,
56830x00050084,0x00000006,0x00003a11,0x000000ec, 61350x00003a50,0x00003a55,0x0004007c,0x00000014,
56840x00005e57,0x00050080,0x00000006,0x00003a12, 61360x00003a46,0x00003a56,0x00060041,0x00000174,
56850x00003f0f,0x00003a11,0x00050095,0x0000013d, 61370x00003a3d,0x00003a46,0x00000173,0x00000173,
56860x00003f75,0x00003e2a,0x00003a12,0x00050051, 61380x0006003d,0x00000006,0x00003a3e,0x00003a3d,
56870x00000006,0x00003f76,0x00003f75,0x00000001,
56880x00050051,0x00000006,0x00003f77,0x00003f75,
56890x00000000,0x00050080,0x00000006,0x00003f7c,
56900x00003e31,0x00003f76,0x00050050,0x00000007,
56910x00003f7d,0x00003f77,0x00003f7c,0x0004007c,
56920x00000014,0x00003f6d,0x00003f7d,0x00060041,
56930x0000016c,0x00003f65,0x00003f6d,0x0000016b,
56940x0000016b,0x0005003e,0x00003f65,0x000012dd,
56950x00000002,0x00000004,0x000200f9,0x00003a18,
56960x000200f8,0x00003a18,0x000500aa,0x0000002f,
56970x00003a1a,0x000013db,0x0000016b,0x000300f7,
56980x00003a20,0x00000000,0x000400fa,0x00003a1a,
56990x00003a1b,0x00003a20,0x000200f8,0x00003a1b,
57000x000300f7,0x00003fc3,0x00000000,0x000400fa,
57010x00003e6e,0x00003fbe,0x00003fc2,0x000200f8,
57020x00003fc2,0x000200f9,0x00003fc3,0x000200f8,
57030x00003fbe,0x00050082,0x00000006,0x00003fc1,
57040x00003df2,0x00000142,0x000200f9,0x00003fc3,
57050x000200f8,0x00003fc3,0x000700f5,0x00000006,
57060x00005e5d,0x00003fc1,0x00003fbe,0x00000138,
57070x00003fc2,0x00050084,0x00000006,0x00003f88,
57080x000000ec,0x00005e5d,0x00050080,0x00000006,
57090x00003f89,0x00003ded,0x00003f88,0x000300f7,
57100x00003fd0,0x00000000,0x000400fa,0x00003e6e,
57110x00003fcb,0x00003fcf,0x000200f8,0x00003fcf,
57120x000200f9,0x00003fd0,0x000200f8,0x00003fcb,
57130x00050082,0x00000006,0x00003fce,0x00003df2,
57140x00000142,0x000200f9,0x00003fd0,0x000200f8,
57150x00003fd0,0x000700f5,0x00000006,0x00005e5e,
57160x00003fce,0x00003fcb,0x00000138,0x00003fcf,
57170x00050084,0x00000006,0x00003f82,0x000000ec,
57180x00005e5e,0x00050080,0x00000006,0x00003f83,
57190x00003f89,0x00003f82,0x00050095,0x0000013d,
57200x00003fe9,0x00003e2a,0x00003f83,0x00050051,
57210x00000006,0x00003fea,0x00003fe9,0x00000001,
57220x00050051,0x00000006,0x00003feb,0x00003fe9,
57230x00000000,0x00050080,0x00000006,0x00003ff0,
57240x00003e31,0x00003fea,0x00050050,0x00000007,
57250x00003ff1,0x00003feb,0x00003ff0,0x0004007c,
57260x00000014,0x00003fe1,0x00003ff1,0x00060041,
57270x0000016c,0x00003fd9,0x00003fe1,0x0000016b,
57280x0000016b,0x0005003e,0x00003fd9,0x00000539,
57290x00000002,0x00000004,0x000200f9,0x00003a20,
57300x000200f8,0x00003a20,0x000200f9,0x000013d9,
57310x000200f8,0x000013d9,0x000200f9,0x000013d0,
57320x000200f8,0x000013cf,0x00050041,0x000001bb,
57330x00003746,0x000001b9,0x000001ba,0x0004003d,
57340x00000006,0x00003747,0x00003746,0x00050084,
57350x00000006,0x00003748,0x000001db,0x00003747,
57360x00050080,0x00000006,0x00003749,0x000001c4,
57370x00003748,0x00050080,0x00000006,0x0000374f,
57380x00003747,0x0000062f,0x00050086,0x00000006,
57390x00003750,0x0000374f,0x000001be,0x00050084,
57400x00000006,0x00003742,0x000001c4,0x00003750,
57410x00050080,0x00000006,0x00003743,0x00003749,
57420x00003742,0x00050080,0x00000006,0x0000373d,
57430x00003743,0x00003742,0x00050084,0x00000006,
57440x00003711,0x000001ef,0x000012dd,0x00050080,
57450x00000006,0x00003712,0x0000373d,0x00003711,
57460x00050041,0x00000266,0x00003713,0x000001b9,
57470x00000264,0x0004003d,0x00000007,0x00003714,
57480x00003713,0x00050051,0x00000006,0x0000376e,
57490x00003714,0x00000000,0x00050095,0x0000013d,
57500x00003770,0x0000376e,0x00003712,0x00050051,
57510x00000006,0x00003771,0x00003770,0x00000001,
57520x00050051,0x00000006,0x00003772,0x00003770,
57530x00000000,0x00050051,0x00000006,0x00003775,
57540x00003714,0x00000001,0x00050080,0x00000006,
57550x00003777,0x00003775,0x00003771,0x00050050,
57560x00000007,0x00003778,0x00003772,0x00003777,
57570x0004007c,0x00000014,0x00003768,0x00003778,
57580x00060041,0x0000016c,0x0000375f,0x00003768,
57590x0000016b,0x0000016b,0x0006003d,0x00000006,
57600x00003760,0x0000375f,0x00000002,0x00000004,
57610x0004007c,0x00000027,0x00003717,0x00003760,
57620x00050080,0x00000006,0x00003719,0x00003712,
57630x000000ec,0x00050095,0x0000013d,0x00003791,
57640x0000376e,0x00003719,0x00050051,0x00000006,
57650x00003792,0x00003791,0x00000001,0x00050051,
57660x00000006,0x00003793,0x00003791,0x00000000,
57670x00050080,0x00000006,0x00003798,0x00003775,
57680x00003792,0x00050050,0x00000007,0x00003799,
57690x00003793,0x00003798,0x0004007c,0x00000014,
57700x00003789,0x00003799,0x00060041,0x0000016c,
57710x00003780,0x00003789,0x0000016b,0x0000016b,
57720x0006003d,0x00000006,0x00003781,0x00003780,
57730x00000002,0x00000004,0x0004007c,0x00000027, 61390x00000002,0x00000004,0x0004007c,0x00000027,
57740x0000371d,0x00003781,0x00050080,0x00000006, 61400x000039f5,0x00003a3e,0x00050080,0x00000006,
57750x0000371f,0x00003712,0x000001cd,0x00050095, 61410x000039f7,0x000039f0,0x000000f3,0x00050095,
57760x0000013d,0x000037b2,0x0000376e,0x0000371f, 61420x00000145,0x00003a6f,0x00003a4c,0x000039f7,
57770x00050051,0x00000006,0x000037b3,0x000037b2, 61430x00050051,0x00000006,0x00003a70,0x00003a6f,
57780x00000001,0x00050051,0x00000006,0x000037b4, 61440x00000001,0x00050051,0x00000006,0x00003a71,
57790x000037b2,0x00000000,0x00050080,0x00000006, 61450x00003a6f,0x00000000,0x00050080,0x00000006,
57800x000037b9,0x00003775,0x000037b3,0x00050050, 61460x00003a76,0x00003a53,0x00003a70,0x00050050,
57810x00000007,0x000037ba,0x000037b4,0x000037b9, 61470x00000007,0x00003a77,0x00003a71,0x00003a76,
57820x0004007c,0x00000014,0x000037aa,0x000037ba, 61480x0004007c,0x00000014,0x00003a67,0x00003a77,
57830x00060041,0x0000016c,0x000037a1,0x000037aa, 61490x00060041,0x00000174,0x00003a5e,0x00003a67,
57840x0000016b,0x0000016b,0x0006003d,0x00000006, 61500x00000173,0x00000173,0x0006003d,0x00000006,
57850x000037a2,0x000037a1,0x00000002,0x00000004, 61510x00003a5f,0x00003a5e,0x00000002,0x00000004,
57860x0004007c,0x00000027,0x00003723,0x000037a2, 61520x0004007c,0x00000027,0x000039fb,0x00003a5f,
57870x00060050,0x0000006c,0x00003724,0x00003717, 61530x00050080,0x00000006,0x000039fd,0x000039f0,
57880x0000371d,0x00003723,0x00050080,0x00000006, 61540x000001d5,0x00050095,0x00000145,0x00003a90,
57890x00003726,0x00003712,0x000001d4,0x00050095, 61550x00003a4c,0x000039fd,0x00050051,0x00000006,
57900x0000013d,0x000037d3,0x0000376e,0x00003726, 61560x00003a91,0x00003a90,0x00000001,0x00050051,
57910x00050051,0x00000006,0x000037d4,0x000037d3, 61570x00000006,0x00003a92,0x00003a90,0x00000000,
57920x00000001,0x00050051,0x00000006,0x000037d5, 61580x00050080,0x00000006,0x00003a97,0x00003a53,
57930x000037d3,0x00000000,0x00050080,0x00000006, 61590x00003a91,0x00050050,0x00000007,0x00003a98,
57940x000037da,0x00003775,0x000037d4,0x00050050, 61600x00003a92,0x00003a97,0x0004007c,0x00000014,
57950x00000007,0x000037db,0x000037d5,0x000037da, 61610x00003a88,0x00003a98,0x00060041,0x00000174,
57960x0004007c,0x00000014,0x000037cb,0x000037db, 61620x00003a7f,0x00003a88,0x00000173,0x00000173,
57970x00060041,0x0000016c,0x000037c2,0x000037cb, 61630x0006003d,0x00000006,0x00003a80,0x00003a7f,
57980x0000016b,0x0000016b,0x0006003d,0x00000006,
57990x000037c3,0x000037c2,0x00000002,0x00000004,
58000x0004007c,0x00000027,0x0000372a,0x000037c3,
58010x00050080,0x00000006,0x0000372c,0x00003712,
58020x000001db,0x00050095,0x0000013d,0x000037f4,
58030x0000376e,0x0000372c,0x00050051,0x00000006,
58040x000037f5,0x000037f4,0x00000001,0x00050051,
58050x00000006,0x000037f6,0x000037f4,0x00000000,
58060x00050080,0x00000006,0x000037fb,0x00003775,
58070x000037f5,0x00050050,0x00000007,0x000037fc,
58080x000037f6,0x000037fb,0x0004007c,0x00000014,
58090x000037ec,0x000037fc,0x00060041,0x0000016c,
58100x000037e3,0x000037ec,0x0000016b,0x0000016b,
58110x0006003d,0x00000006,0x000037e4,0x000037e3,
58120x00000002,0x00000004,0x0004007c,0x00000027, 61640x00000002,0x00000004,0x0004007c,0x00000027,
58130x00003730,0x000037e4,0x00050080,0x00000006, 61650x00003a01,0x00003a80,0x00060050,0x0000006c,
58140x00003732,0x00003712,0x00000299,0x00050095, 61660x00003a02,0x000039f5,0x000039fb,0x00003a01,
58150x0000013d,0x00003815,0x0000376e,0x00003732, 61670x00050080,0x00000006,0x00003a04,0x000039f0,
58160x00050051,0x00000006,0x00003816,0x00003815, 61680x000001dc,0x00050095,0x00000145,0x00003ab1,
58170x00000001,0x00050051,0x00000006,0x00003817, 61690x00003a4c,0x00003a04,0x00050051,0x00000006,
58180x00003815,0x00000000,0x00050080,0x00000006, 61700x00003ab2,0x00003ab1,0x00000001,0x00050051,
58190x0000381c,0x00003775,0x00003816,0x00050050, 61710x00000006,0x00003ab3,0x00003ab1,0x00000000,
58200x00000007,0x0000381d,0x00003817,0x0000381c, 61720x00050080,0x00000006,0x00003ab8,0x00003a53,
58210x0004007c,0x00000014,0x0000380d,0x0000381d, 61730x00003ab2,0x00050050,0x00000007,0x00003ab9,
58220x00060041,0x0000016c,0x00003804,0x0000380d, 61740x00003ab3,0x00003ab8,0x0004007c,0x00000014,
58230x0000016b,0x0000016b,0x0006003d,0x00000006, 61750x00003aa9,0x00003ab9,0x00060041,0x00000174,
58240x00003805,0x00003804,0x00000002,0x00000004, 61760x00003aa0,0x00003aa9,0x00000173,0x00000173,
58250x0004007c,0x00000027,0x00003736,0x00003805, 61770x0006003d,0x00000006,0x00003aa1,0x00003aa0,
58260x00060050,0x0000006c,0x00003737,0x0000372a, 61780x00000002,0x00000004,0x0004007c,0x00000027,
58270x00003730,0x00003736,0x000500bc,0x0000002f, 61790x00003a08,0x00003aa1,0x00050080,0x00000006,
58280x00003824,0x00003717,0x0000372a,0x000300f7, 61800x00003a0a,0x000039f0,0x000001e3,0x00050095,
58290x0000382b,0x00000000,0x000400fa,0x00003824, 61810x00000145,0x00003ad2,0x00003a4c,0x00003a0a,
58300x00003825,0x0000382b,0x000200f8,0x00003825, 61820x00050051,0x00000006,0x00003ad3,0x00003ad2,
58310x000500bc,0x0000002f,0x0000382a,0x0000371d, 61830x00000001,0x00050051,0x00000006,0x00003ad4,
58320x00003730,0x000200f9,0x0000382b,0x000200f8, 61840x00003ad2,0x00000000,0x00050080,0x00000006,
58330x0000382b,0x000700f5,0x0000002f,0x0000382c, 61850x00003ad9,0x00003a53,0x00003ad3,0x00050050,
58340x00003824,0x000013cf,0x0000382a,0x00003825, 61860x00000007,0x00003ada,0x00003ad4,0x00003ad9,
58350x000300f7,0x00003833,0x00000000,0x000400fa, 61870x0004007c,0x00000014,0x00003aca,0x00003ada,
58360x0000382c,0x0000382d,0x00003833,0x000200f8, 61880x00060041,0x00000174,0x00003ac1,0x00003aca,
58370x0000382d,0x000500bc,0x0000002f,0x00003832, 61890x00000173,0x00000173,0x0006003d,0x00000006,
58380x00003723,0x00003736,0x000200f9,0x00003833, 61900x00003ac2,0x00003ac1,0x00000002,0x00000004,
58390x000200f8,0x00003833,0x000700f5,0x0000002f, 61910x0004007c,0x00000027,0x00003a0e,0x00003ac2,
58400x00003834,0x0000382c,0x0000382b,0x00003832, 61920x00050080,0x00000006,0x00003a10,0x000039f0,
58410x0000382d,0x000300f7,0x000036f0,0x00000000, 61930x000002a1,0x00050095,0x00000145,0x00003af3,
58420x000400fa,0x00003834,0x000036b4,0x000036f0, 61940x00003a4c,0x00003a10,0x00050051,0x00000006,
58430x000200f8,0x000036b4,0x00050095,0x0000013d, 61950x00003af4,0x00003af3,0x00000001,0x00050051,
58440x00003845,0x0000376e,0x00000138,0x00050051, 61960x00000006,0x00003af5,0x00003af3,0x00000000,
58450x00000006,0x00003846,0x00003845,0x00000001, 61970x00050080,0x00000006,0x00003afa,0x00003a53,
58460x00050051,0x00000006,0x00003847,0x00003845, 61980x00003af4,0x00050050,0x00000007,0x00003afb,
58470x00000000,0x00050080,0x00000006,0x0000384c, 61990x00003af5,0x00003afa,0x0004007c,0x00000014,
58480x00003775,0x00003846,0x00050050,0x00000007, 62000x00003aeb,0x00003afb,0x00060041,0x00000174,
58490x0000384d,0x00003847,0x0000384c,0x0004007c, 62010x00003ae2,0x00003aeb,0x00000173,0x00000173,
58500x00000014,0x0000383d,0x0000384d,0x00060041, 62020x0006003d,0x00000006,0x00003ae3,0x00003ae2,
58510x0000016c,0x000036b9,0x0000383d,0x0000016b, 62030x00000002,0x00000004,0x0004007c,0x00000027,
58520x0000016b,0x0006003d,0x00000006,0x000036ba, 62040x00003a14,0x00003ae3,0x00060050,0x0000006c,
58530x000036b9,0x00000002,0x00000004,0x000500c7, 62050x00003a15,0x00003a08,0x00003a0e,0x00003a14,
58540x00000006,0x00003852,0x000036ba,0x00000241, 62060x000500bc,0x0000002f,0x00003b02,0x000039f5,
58550x000500ab,0x0000002f,0x00003853,0x00003852, 62070x00003a08,0x000300f7,0x00003b09,0x00000000,
58560x00000138,0x000300f7,0x0000385a,0x00000000, 62080x000400fa,0x00003b02,0x00003b03,0x00003b09,
58570x000400fa,0x00003853,0x00003854,0x00003857, 62090x000200f8,0x00003b03,0x000500bc,0x0000002f,
58580x000200f8,0x00003857,0x000400c8,0x00000006, 62100x00003b08,0x000039fb,0x00003a0e,0x000200f9,
58590x00003859,0x000036ba,0x000200f9,0x0000385a, 62110x00003b09,0x000200f8,0x00003b09,0x000700f5,
58600x000200f8,0x00003854,0x000500c7,0x00000006, 62120x0000002f,0x00003b0a,0x00003b02,0x000014c1,
58610x00003856,0x000036ba,0x00000256,0x000200f9, 62130x00003b08,0x00003b03,0x000300f7,0x00003b11,
58620x0000385a,0x000200f8,0x0000385a,0x000700f5, 62140x00000000,0x000400fa,0x00003b0a,0x00003b0b,
58630x00000006,0x00005e65,0x00003856,0x00003854, 62150x00003b11,0x000200f8,0x00003b0b,0x000500bc,
58640x00003859,0x00003857,0x0004007c,0x00000027, 62160x0000002f,0x00003b10,0x00003a01,0x00003a14,
58650x0000385c,0x00005e65,0x00060041,0x0000016c, 62170x000200f9,0x00003b11,0x000200f8,0x00003b11,
58660x000036bd,0x0000383d,0x0000016b,0x00000264, 62180x000700f5,0x0000002f,0x00003b12,0x00003b0a,
58670x0006003d,0x00000006,0x000036be,0x000036bd, 62190x00003b09,0x00003b10,0x00003b0b,0x000300f7,
58680x00000002,0x00000004,0x000500c7,0x00000006, 62200x000039ce,0x00000000,0x000400fa,0x00003b12,
58690x00003861,0x000036be,0x00000241,0x000500ab, 62210x00003992,0x000039ce,0x000200f8,0x00003992,
58700x0000002f,0x00003862,0x00003861,0x00000138, 62220x00050095,0x00000145,0x00003b23,0x00003a4c,
58710x000300f7,0x00003869,0x00000000,0x000400fa, 62230x00000140,0x00050051,0x00000006,0x00003b24,
58720x00003862,0x00003863,0x00003866,0x000200f8, 62240x00003b23,0x00000001,0x00050051,0x00000006,
58730x00003866,0x000400c8,0x00000006,0x00003868, 62250x00003b25,0x00003b23,0x00000000,0x00050080,
58740x000036be,0x000200f9,0x00003869,0x000200f8, 62260x00000006,0x00003b2a,0x00003a53,0x00003b24,
58750x00003863,0x000500c7,0x00000006,0x00003865, 62270x00050050,0x00000007,0x00003b2b,0x00003b25,
58760x000036be,0x00000256,0x000200f9,0x00003869, 62280x00003b2a,0x0004007c,0x00000014,0x00003b1b,
58770x000200f8,0x00003869,0x000700f5,0x00000006, 62290x00003b2b,0x00060041,0x00000174,0x00003997,
58780x00005e66,0x00003865,0x00003863,0x00003868, 62300x00003b1b,0x00000173,0x00000173,0x0006003d,
58790x00003866,0x0004007c,0x00000027,0x0000386b, 62310x00000006,0x00003998,0x00003997,0x00000002,
58800x00005e66,0x00060041,0x0000016c,0x000036c1, 62320x00000004,0x000500c7,0x00000006,0x00003b30,
58810x0000383d,0x0000016b,0x00000315,0x0006003d, 62330x00003998,0x00000249,0x000500ab,0x0000002f,
58820x00000006,0x000036c2,0x000036c1,0x00000002, 62340x00003b31,0x00003b30,0x00000140,0x000300f7,
58830x00000004,0x000500c7,0x00000006,0x00003870, 62350x00003b38,0x00000000,0x000400fa,0x00003b31,
58840x000036c2,0x00000241,0x000500ab,0x0000002f, 62360x00003b32,0x00003b35,0x000200f8,0x00003b35,
58850x00003871,0x00003870,0x00000138,0x000300f7, 62370x000400c8,0x00000006,0x00003b37,0x00003998,
58860x00003878,0x00000000,0x000400fa,0x00003871, 62380x000200f9,0x00003b38,0x000200f8,0x00003b32,
58870x00003872,0x00003875,0x000200f8,0x00003875, 62390x000500c7,0x00000006,0x00003b34,0x00003998,
58880x000400c8,0x00000006,0x00003877,0x000036c2, 62400x0000025e,0x000200f9,0x00003b38,0x000200f8,
58890x000200f9,0x00003878,0x000200f8,0x00003872, 62410x00003b38,0x000700f5,0x00000006,0x0000628b,
58900x000500c7,0x00000006,0x00003874,0x000036c2, 62420x00003b34,0x00003b32,0x00003b37,0x00003b35,
58910x00000256,0x000200f9,0x00003878,0x000200f8, 62430x0004007c,0x00000027,0x00003b3a,0x0000628b,
58920x00003878,0x000700f5,0x00000006,0x00005e67, 62440x00060041,0x00000174,0x0000399b,0x00003b1b,
58930x00003874,0x00003872,0x00003877,0x00003875, 62450x00000173,0x0000026c,0x0006003d,0x00000006,
58940x0004007c,0x00000027,0x0000387a,0x00005e67, 62460x0000399c,0x0000399b,0x00000002,0x00000004,
58950x00060050,0x0000006c,0x000036c4,0x0000385c, 62470x000500c7,0x00000006,0x00003b3f,0x0000399c,
58960x0000386b,0x0000387a,0x00060041,0x0000016c, 62480x00000249,0x000500ab,0x0000002f,0x00003b40,
58970x000036c6,0x0000383d,0x0000016b,0x0000031d, 62490x00003b3f,0x00000140,0x000300f7,0x00003b47,
58980x0006003d,0x00000006,0x000036c7,0x000036c6, 62500x00000000,0x000400fa,0x00003b40,0x00003b41,
62510x00003b44,0x000200f8,0x00003b44,0x000400c8,
62520x00000006,0x00003b46,0x0000399c,0x000200f9,
62530x00003b47,0x000200f8,0x00003b41,0x000500c7,
62540x00000006,0x00003b43,0x0000399c,0x0000025e,
62550x000200f9,0x00003b47,0x000200f8,0x00003b47,
62560x000700f5,0x00000006,0x0000628c,0x00003b43,
62570x00003b41,0x00003b46,0x00003b44,0x0004007c,
62580x00000027,0x00003b49,0x0000628c,0x00060041,
62590x00000174,0x0000399f,0x00003b1b,0x00000173,
62600x0000031d,0x0006003d,0x00000006,0x000039a0,
62610x0000399f,0x00000002,0x00000004,0x000500c7,
62620x00000006,0x00003b4e,0x000039a0,0x00000249,
62630x000500ab,0x0000002f,0x00003b4f,0x00003b4e,
62640x00000140,0x000300f7,0x00003b56,0x00000000,
62650x000400fa,0x00003b4f,0x00003b50,0x00003b53,
62660x000200f8,0x00003b53,0x000400c8,0x00000006,
62670x00003b55,0x000039a0,0x000200f9,0x00003b56,
62680x000200f8,0x00003b50,0x000500c7,0x00000006,
62690x00003b52,0x000039a0,0x0000025e,0x000200f9,
62700x00003b56,0x000200f8,0x00003b56,0x000700f5,
62710x00000006,0x0000628d,0x00003b52,0x00003b50,
62720x00003b55,0x00003b53,0x0004007c,0x00000027,
62730x00003b58,0x0000628d,0x00060050,0x0000006c,
62740x000039a2,0x00003b3a,0x00003b49,0x00003b58,
62750x00060041,0x00000174,0x000039a4,0x00003b1b,
62760x00000173,0x00000325,0x0006003d,0x00000006,
62770x000039a5,0x000039a4,0x00000002,0x00000004,
62780x000500c7,0x00000006,0x00003b5d,0x000039a5,
62790x00000249,0x000500ab,0x0000002f,0x00003b5e,
62800x00003b5d,0x00000140,0x000300f7,0x00003b65,
62810x00000000,0x000400fa,0x00003b5e,0x00003b5f,
62820x00003b62,0x000200f8,0x00003b62,0x000400c8,
62830x00000006,0x00003b64,0x000039a5,0x000200f9,
62840x00003b65,0x000200f8,0x00003b5f,0x000500c7,
62850x00000006,0x00003b61,0x000039a5,0x0000025e,
62860x000200f9,0x00003b65,0x000200f8,0x00003b65,
62870x000700f5,0x00000006,0x0000628e,0x00003b61,
62880x00003b5f,0x00003b64,0x00003b62,0x0004007c,
62890x00000027,0x00003b67,0x0000628e,0x00060041,
62900x00000174,0x000039a8,0x00003b1b,0x00000173,
62910x0000032d,0x0006003d,0x00000006,0x000039a9,
62920x000039a8,0x00000002,0x00000004,0x000500c7,
62930x00000006,0x00003b6c,0x000039a9,0x00000249,
62940x000500ab,0x0000002f,0x00003b6d,0x00003b6c,
62950x00000140,0x000300f7,0x00003b74,0x00000000,
62960x000400fa,0x00003b6d,0x00003b6e,0x00003b71,
62970x000200f8,0x00003b71,0x000400c8,0x00000006,
62980x00003b73,0x000039a9,0x000200f9,0x00003b74,
62990x000200f8,0x00003b6e,0x000500c7,0x00000006,
63000x00003b70,0x000039a9,0x0000025e,0x000200f9,
63010x00003b74,0x000200f8,0x00003b74,0x000700f5,
63020x00000006,0x0000628f,0x00003b70,0x00003b6e,
63030x00003b73,0x00003b71,0x0004007c,0x00000027,
63040x00003b76,0x0000628f,0x00060041,0x00000174,
63050x000039ac,0x00003b1b,0x00000173,0x00000335,
63060x0006003d,0x00000006,0x000039ad,0x000039ac,
58990x00000002,0x00000004,0x000500c7,0x00000006, 63070x00000002,0x00000004,0x000500c7,0x00000006,
59000x0000387f,0x000036c7,0x00000241,0x000500ab, 63080x00003b7b,0x000039ad,0x00000249,0x000500ab,
59010x0000002f,0x00003880,0x0000387f,0x00000138, 63090x0000002f,0x00003b7c,0x00003b7b,0x00000140,
59020x000300f7,0x00003887,0x00000000,0x000400fa, 63100x000300f7,0x00003b83,0x00000000,0x000400fa,
59030x00003880,0x00003881,0x00003884,0x000200f8, 63110x00003b7c,0x00003b7d,0x00003b80,0x000200f8,
59040x00003884,0x000400c8,0x00000006,0x00003886, 63120x00003b80,0x000400c8,0x00000006,0x00003b82,
59050x000036c7,0x000200f9,0x00003887,0x000200f8, 63130x000039ad,0x000200f9,0x00003b83,0x000200f8,
59060x00003881,0x000500c7,0x00000006,0x00003883, 63140x00003b7d,0x000500c7,0x00000006,0x00003b7f,
59070x000036c7,0x00000256,0x000200f9,0x00003887, 63150x000039ad,0x0000025e,0x000200f9,0x00003b83,
59080x000200f8,0x00003887,0x000700f5,0x00000006, 63160x000200f8,0x00003b83,0x000700f5,0x00000006,
59090x00005e68,0x00003883,0x00003881,0x00003886, 63170x00006290,0x00003b7f,0x00003b7d,0x00003b82,
59100x00003884,0x0004007c,0x00000027,0x00003889, 63180x00003b80,0x0004007c,0x00000027,0x00003b85,
59110x00005e68,0x00060041,0x0000016c,0x000036ca, 63190x00006290,0x00060050,0x0000006c,0x000039af,
59120x0000383d,0x0000016b,0x00000325,0x0006003d, 63200x00003b67,0x00003b76,0x00003b85,0x00050083,
59130x00000006,0x000036cb,0x000036ca,0x00000002, 63210x0000006c,0x000039b2,0x000039af,0x000039a2,
59140x00000004,0x000500c7,0x00000006,0x0000388e, 63220x0007000c,0x0000006c,0x000039b3,0x00000001,
59150x000036cb,0x00000241,0x000500ab,0x0000002f, 63230x00000028,0x000039b2,0x00000939,0x00050081,
59160x0000388f,0x0000388e,0x00000138,0x000300f7, 63240x0000006c,0x000039b6,0x00003a02,0x00003a15,
59170x00003896,0x00000000,0x000400fa,0x0000388f, 63250x0005008e,0x0000006c,0x000039b7,0x000039b6,
59180x00003890,0x00003893,0x000200f8,0x00003893, 63260x00000305,0x00050083,0x0000006c,0x000039b9,
59190x000400c8,0x00000006,0x00003895,0x000036cb, 63270x000039b7,0x000039a2,0x00050088,0x0000006c,
59200x000200f9,0x00003896,0x000200f8,0x00003890, 63280x000039bb,0x000039b9,0x000039b3,0x0008000c,
59210x000500c7,0x00000006,0x00003892,0x000036cb, 63290x0000006c,0x000039be,0x00000001,0x0000002b,
59220x00000256,0x000200f9,0x00003896,0x000200f8, 63300x000039bb,0x00000850,0x00006530,0x0005008e,
59230x00003896,0x000700f5,0x00000006,0x00005e69, 63310x0000006c,0x000039bf,0x000039be,0x00000947,
59240x00003892,0x00003890,0x00003895,0x00003893, 63320x0004006d,0x000000e6,0x000039c0,0x000039bf,
59250x0004007c,0x00000027,0x00003898,0x00005e69, 63330x00050051,0x00000006,0x000039c2,0x000039c0,
59260x00060041,0x0000016c,0x000036ce,0x0000383d, 63340x00000000,0x000500c7,0x00000006,0x00003b89,
59270x0000016b,0x0000032d,0x0006003d,0x00000006, 63350x000039c2,0x000008dc,0x000500c4,0x00000006,
59280x000036cf,0x000036ce,0x00000002,0x00000004, 63360x00003b8c,0x00003b89,0x00000362,0x000500c5,
59290x000500c7,0x00000006,0x0000389d,0x000036cf, 63370x00000006,0x00003b8d,0x00003b89,0x00003b8c,
59300x00000241,0x000500ab,0x0000002f,0x0000389e, 63380x000500c7,0x00000006,0x00003b8e,0x00003b8d,
59310x0000389d,0x00000138,0x000300f7,0x000038a5, 63390x000008e3,0x000500c4,0x00000006,0x00003b91,
59320x00000000,0x000400fa,0x0000389e,0x0000389f, 63400x00003b8e,0x00000528,0x000500c5,0x00000006,
59330x000038a2,0x000200f8,0x000038a2,0x000400c8, 63410x00003b92,0x00003b8e,0x00003b91,0x000500c7,
59340x00000006,0x000038a4,0x000036cf,0x000200f9, 63420x00000006,0x00003b93,0x00003b92,0x000008e9,
59350x000038a5,0x000200f8,0x0000389f,0x000500c7, 63430x000500c4,0x00000006,0x00003b96,0x00003b93,
59360x00000006,0x000038a1,0x000036cf,0x00000256, 63440x0000032d,0x000500c5,0x00000006,0x00003b97,
59370x000200f9,0x000038a5,0x000200f8,0x000038a5, 63450x00003b93,0x00003b96,0x000500c7,0x00000006,
59380x000700f5,0x00000006,0x00005e6a,0x000038a1, 63460x00003b98,0x00003b97,0x000008ef,0x000500c4,
59390x0000389f,0x000038a4,0x000038a2,0x0004007c, 63470x00000006,0x00003b9b,0x00003b98,0x0000031d,
59400x00000027,0x000038a7,0x00005e6a,0x00060050, 63480x000500c5,0x00000006,0x00003b9c,0x00003b98,
59410x0000006c,0x000036d1,0x00003889,0x00003898, 63490x00003b9b,0x000500c7,0x00000006,0x00003b9d,
59420x000038a7,0x00050083,0x0000006c,0x000036d4, 63500x00003b9c,0x000008f5,0x000500c4,0x00000006,
59430x000036d1,0x000036c4,0x0007000c,0x0000006c, 63510x000039c4,0x00003b9d,0x0000031d,0x00050051,
59440x000036d5,0x00000001,0x00000028,0x000036d4, 63520x00000006,0x000039c6,0x000039c0,0x00000001,
59450x000008d3,0x00050081,0x0000006c,0x000036d8, 63530x000500c7,0x00000006,0x00003ba2,0x000039c6,
59460x00003724,0x00003737,0x0005008e,0x0000006c, 63540x000008dc,0x000500c4,0x00000006,0x00003ba5,
59470x000036d9,0x000036d8,0x000002fd,0x00050083, 63550x00003ba2,0x00000362,0x000500c5,0x00000006,
59480x0000006c,0x000036db,0x000036d9,0x000036c4, 63560x00003ba6,0x00003ba2,0x00003ba5,0x000500c7,
59490x00050088,0x0000006c,0x000036dd,0x000036db, 63570x00000006,0x00003ba7,0x00003ba6,0x000008e3,
59500x000036d5,0x0008000c,0x0000006c,0x000036e0, 63580x000500c4,0x00000006,0x00003baa,0x00003ba7,
59510x00000001,0x0000002b,0x000036dd,0x000007ea, 63590x00000528,0x000500c5,0x00000006,0x00003bab,
59520x000060fc,0x0005008e,0x0000006c,0x000036e1, 63600x00003ba7,0x00003baa,0x000500c7,0x00000006,
59530x000036e0,0x000008e1,0x0004006d,0x000000df, 63610x00003bac,0x00003bab,0x000008e9,0x000500c4,
59540x000036e2,0x000036e1,0x00050051,0x00000006, 63620x00000006,0x00003baf,0x00003bac,0x0000032d,
59550x000036e4,0x000036e2,0x00000000,0x000500c7, 63630x000500c5,0x00000006,0x00003bb0,0x00003bac,
59560x00000006,0x000038ab,0x000036e4,0x00000876, 63640x00003baf,0x000500c7,0x00000006,0x00003bb1,
59570x000500c4,0x00000006,0x000038ae,0x000038ab, 63650x00003bb0,0x000008ef,0x000500c4,0x00000006,
59580x0000035a,0x000500c5,0x00000006,0x000038af, 63660x00003bb4,0x00003bb1,0x0000031d,0x000500c5,
59590x000038ab,0x000038ae,0x000500c7,0x00000006, 63670x00000006,0x00003bb5,0x00003bb1,0x00003bb4,
59600x000038b0,0x000038af,0x0000087d,0x000500c4, 63680x000500c7,0x00000006,0x00003bb6,0x00003bb5,
59610x00000006,0x000038b3,0x000038b0,0x000004c1, 63690x000008f5,0x000500c4,0x00000006,0x000039c8,
59620x000500c5,0x00000006,0x000038b4,0x000038b0, 63700x00003bb6,0x0000026c,0x000500c5,0x00000006,
59630x000038b3,0x000500c7,0x00000006,0x000038b5, 63710x000039c9,0x000039c4,0x000039c8,0x00050051,
59640x000038b4,0x00000883,0x000500c4,0x00000006, 63720x00000006,0x000039cb,0x000039c0,0x00000002,
59650x000038b8,0x000038b5,0x00000325,0x000500c5, 63730x000500c7,0x00000006,0x00003bbb,0x000039cb,
59660x00000006,0x000038b9,0x000038b5,0x000038b8, 63740x000008dc,0x000500c4,0x00000006,0x00003bbe,
59670x000500c7,0x00000006,0x000038ba,0x000038b9, 63750x00003bbb,0x00000362,0x000500c5,0x00000006,
59680x00000889,0x000500c4,0x00000006,0x000038bd, 63760x00003bbf,0x00003bbb,0x00003bbe,0x000500c7,
59690x000038ba,0x00000315,0x000500c5,0x00000006, 63770x00000006,0x00003bc0,0x00003bbf,0x000008e3,
59700x000038be,0x000038ba,0x000038bd,0x000500c7, 63780x000500c4,0x00000006,0x00003bc3,0x00003bc0,
59710x00000006,0x000038bf,0x000038be,0x0000088f, 63790x00000528,0x000500c5,0x00000006,0x00003bc4,
59720x000500c4,0x00000006,0x000036e6,0x000038bf, 63800x00003bc0,0x00003bc3,0x000500c7,0x00000006,
59730x00000315,0x00050051,0x00000006,0x000036e8, 63810x00003bc5,0x00003bc4,0x000008e9,0x000500c4,
59740x000036e2,0x00000001,0x000500c7,0x00000006, 63820x00000006,0x00003bc8,0x00003bc5,0x0000032d,
59750x000038c4,0x000036e8,0x00000876,0x000500c4, 63830x000500c5,0x00000006,0x00003bc9,0x00003bc5,
59760x00000006,0x000038c7,0x000038c4,0x0000035a, 63840x00003bc8,0x000500c7,0x00000006,0x00003bca,
59770x000500c5,0x00000006,0x000038c8,0x000038c4, 63850x00003bc9,0x000008ef,0x000500c4,0x00000006,
59780x000038c7,0x000500c7,0x00000006,0x000038c9, 63860x00003bcd,0x00003bca,0x0000031d,0x000500c5,
59790x000038c8,0x0000087d,0x000500c4,0x00000006, 63870x00000006,0x00003bce,0x00003bca,0x00003bcd,
59800x000038cc,0x000038c9,0x000004c1,0x000500c5, 63880x000500c7,0x00000006,0x00003bcf,0x00003bce,
59810x00000006,0x000038cd,0x000038c9,0x000038cc, 63890x000008f5,0x000500c5,0x00000006,0x000039cd,
59820x000500c7,0x00000006,0x000038ce,0x000038cd, 63900x000039c9,0x00003bcf,0x000200f9,0x000039ce,
59830x00000883,0x000500c4,0x00000006,0x000038d1, 63910x000200f8,0x000039ce,0x000700f5,0x00000006,
59840x000038ce,0x00000325,0x000500c5,0x00000006, 63920x00006291,0x0000080c,0x00003b11,0x000039cd,
59850x000038d2,0x000038ce,0x000038d1,0x000500c7, 63930x00003b83,0x00050084,0x00000006,0x000039d1,
59860x00000006,0x000038d3,0x000038d2,0x00000889, 63940x000000f3,0x000013a7,0x00050080,0x00000006,
59870x000500c4,0x00000006,0x000038d6,0x000038d3, 63950x000039d2,0x000001cc,0x000039d1,0x00050095,
59880x00000315,0x000500c5,0x00000006,0x000038d7, 63960x00000145,0x00003bea,0x00003a4c,0x000039d2,
59890x000038d3,0x000038d6,0x000500c7,0x00000006, 63970x00050051,0x00000006,0x00003beb,0x00003bea,
59900x000038d8,0x000038d7,0x0000088f,0x000500c4, 63980x00000001,0x00050051,0x00000006,0x00003bec,
59910x00000006,0x000036ea,0x000038d8,0x00000264, 63990x00003bea,0x00000000,0x00050080,0x00000006,
59920x000500c5,0x00000006,0x000036eb,0x000036e6, 64000x00003bf1,0x00003a53,0x00003beb,0x00050050,
59930x000036ea,0x00050051,0x00000006,0x000036ed, 64010x00000007,0x00003bf2,0x00003bec,0x00003bf1,
59940x000036e2,0x00000002,0x000500c7,0x00000006, 64020x0004007c,0x00000014,0x00003be2,0x00003bf2,
59950x000038dd,0x000036ed,0x00000876,0x000500c4, 64030x00060041,0x00000174,0x00003bda,0x00003be2,
59960x00000006,0x000038e0,0x000038dd,0x0000035a, 64040x00000173,0x00000173,0x0005003e,0x00003bda,
59970x000500c5,0x00000006,0x000038e1,0x000038dd, 64050x00006291,0x00000002,0x00000004,0x00050084,
59980x000038e0,0x000500c7,0x00000006,0x000038e2, 64060x00000006,0x00003bf7,0x000000f3,0x00003a25,
59990x000038e1,0x0000087d,0x000500c4,0x00000006, 64070x00050080,0x00000006,0x00003bf8,0x000001cc,
60000x000038e5,0x000038e2,0x000004c1,0x000500c5, 64080x00003bf7,0x00050080,0x00000006,0x000039da,
60010x00000006,0x000038e6,0x000038e2,0x000038e5, 64090x00003bf8,0x000039d1,0x00050095,0x00000145,
60020x000500c7,0x00000006,0x000038e7,0x000038e6, 64100x00003c10,0x00003a4c,0x000039da,0x00050051,
60030x00000883,0x000500c4,0x00000006,0x000038ea, 64110x00000006,0x00003c11,0x00003c10,0x00000001,
60040x000038e7,0x00000325,0x000500c5,0x00000006, 64120x00050051,0x00000006,0x00003c12,0x00003c10,
60050x000038eb,0x000038e7,0x000038ea,0x000500c7, 64130x00000000,0x00050080,0x00000006,0x00003c17,
60060x00000006,0x000038ec,0x000038eb,0x00000889, 64140x00003a53,0x00003c11,0x00050050,0x00000007,
60070x000500c4,0x00000006,0x000038ef,0x000038ec, 64150x00003c18,0x00003c12,0x00003c17,0x0004007c,
60080x00000315,0x000500c5,0x00000006,0x000038f0, 64160x00000014,0x00003c08,0x00003c18,0x00060041,
60090x000038ec,0x000038ef,0x000500c7,0x00000006, 64170x00000174,0x00003c00,0x00003c08,0x00000173,
60100x000038f1,0x000038f0,0x0000088f,0x000500c5, 64180x00000173,0x0005003e,0x00003c00,0x000013a7,
60110x00000006,0x000036ef,0x000036eb,0x000038f1, 64190x00000002,0x00000004,0x000200f9,0x000014c2,
60120x000200f9,0x000036f0,0x000200f8,0x000036f0, 64200x000200f8,0x000014c2,0x000200f9,0x000014b9,
60130x000700f5,0x00000006,0x00005e6b,0x000007a6, 64210x000200f8,0x000014b8,0x00050084,0x00000006,
60140x00003833,0x000036ef,0x000038a5,0x00050084, 64220x00002f77,0x000001cc,0x000013a7,0x000200f9,
60150x00000006,0x000036f3,0x000000ec,0x000012dd, 64230x00002f78,0x000200f8,0x00002f78,0x000700f5,
60160x00050080,0x00000006,0x000036f4,0x000001c4, 64240x00000006,0x00006294,0x00000140,0x000014b8,
60170x000036f3,0x00050095,0x0000013d,0x0000390c, 64250x00002f89,0x00002f7c,0x000500b0,0x0000002f,
60180x0000376e,0x000036f4,0x00050051,0x00000006, 64260x00002f7b,0x00006294,0x000001dc,0x000400f6,
60190x0000390d,0x0000390c,0x00000001,0x00050051, 64270x00002f8a,0x00002f7c,0x00000000,0x000400fa,
60200x00000006,0x0000390e,0x0000390c,0x00000000, 64280x00002f7b,0x00002f7c,0x00002f8a,0x000200f8,
60210x00050080,0x00000006,0x00003913,0x00003775, 64290x00002f7c,0x00050084,0x00000006,0x00002f80,
60220x0000390d,0x00050050,0x00000007,0x00003914, 64300x000000f3,0x00006294,0x00050080,0x00000006,
60230x0000390e,0x00003913,0x0004007c,0x00000014, 64310x00002f81,0x00002f77,0x00002f80,0x00050041,
60240x00003904,0x00003914,0x00060041,0x0000016c, 64320x0000026e,0x00002f82,0x000001c1,0x0000031d,
60250x000038fc,0x00003904,0x0000016b,0x0000016b, 64330x0004003d,0x00000007,0x00002f83,0x00002f82,
60260x0005003e,0x000038fc,0x00005e6b,0x00000002, 64340x00050051,0x00000006,0x0000314c,0x00002f83,
60270x00000004,0x00050084,0x00000006,0x00003919, 64350x00000000,0x00050095,0x00000145,0x0000314e,
60280x000000ec,0x00003747,0x00050080,0x00000006, 64360x0000314c,0x00002f81,0x00050051,0x00000006,
60290x0000391a,0x000001c4,0x00003919,0x00050080, 64370x0000314f,0x0000314e,0x00000001,0x00050051,
60300x00000006,0x000036fc,0x0000391a,0x000036f3, 64380x00000006,0x00003150,0x0000314e,0x00000000,
60310x00050095,0x0000013d,0x00003932,0x0000376e, 64390x00050051,0x00000006,0x00003153,0x00002f83,
60320x000036fc,0x00050051,0x00000006,0x00003933, 64400x00000001,0x00050080,0x00000006,0x00003155,
60330x00003932,0x00000001,0x00050051,0x00000006, 64410x00003153,0x0000314f,0x00050050,0x00000007,
60340x00003934,0x00003932,0x00000000,0x00050080, 64420x00003156,0x00003150,0x00003155,0x0004007c,
60350x00000006,0x00003939,0x00003775,0x00003933, 64430x00000014,0x00003146,0x00003156,0x00060041,
60360x00050050,0x00000007,0x0000393a,0x00003934, 64440x00000174,0x0000313d,0x00003146,0x00000173,
60370x00003939,0x0004007c,0x00000014,0x0000392a, 64450x00000173,0x0006003d,0x00000006,0x0000313e,
60380x0000393a,0x00060041,0x0000016c,0x00003922, 64460x0000313d,0x00000002,0x00000004,0x0004007c,
60390x0000392a,0x0000016b,0x0000016b,0x0005003e, 64470x00000027,0x00002f85,0x0000313e,0x00050041,
60400x00003922,0x000012dd,0x00000002,0x00000004, 64480x00000028,0x00002f86,0x00002f0e,0x00006294,
60410x000200f9,0x000013d0,0x000200f8,0x000013d0, 64490x0003003e,0x00002f86,0x00002f85,0x00050080,
60420x000200f9,0x000013c7,0x000200f8,0x000013c6, 64500x00000006,0x00002f89,0x00006294,0x0000026c,
60430x00050084,0x00000006,0x00002c99,0x000001c4, 64510x000200f9,0x00002f78,0x000200f8,0x00002f8a,
60440x000012dd,0x000200f9,0x00002c9a,0x000200f8, 64520x00050080,0x00000006,0x00002f8c,0x00002f77,
60450x00002c9a,0x000700f5,0x00000006,0x00005e6e, 64530x00000588,0x00050041,0x0000026e,0x00002f8d,
60460x00000138,0x000013c6,0x00002cab,0x00002c9e, 64540x000001c1,0x0000031d,0x0004003d,0x00000007,
60470x000500b0,0x0000002f,0x00002c9d,0x00005e6e, 64550x00002f8e,0x00002f8d,0x00050051,0x00000006,
60480x000001d4,0x000400f6,0x00002cac,0x00002c9e, 64560x0000316d,0x00002f8e,0x00000000,0x00050095,
60490x00000000,0x000400fa,0x00002c9d,0x00002c9e, 64570x00000145,0x0000316f,0x0000316d,0x00002f8c,
60500x00002cac,0x000200f8,0x00002c9e,0x00050084, 64580x00050051,0x00000006,0x00003170,0x0000316f,
60510x00000006,0x00002ca2,0x000000ec,0x00005e6e, 64590x00000001,0x00050051,0x00000006,0x00003171,
60520x00050080,0x00000006,0x00002ca3,0x00002c99, 64600x0000316f,0x00000000,0x00050051,0x00000006,
60530x00002ca2,0x00050041,0x00000266,0x00002ca4, 64610x00003174,0x00002f8e,0x00000001,0x00050080,
60540x000001b9,0x00000315,0x0004003d,0x00000007, 64620x00000006,0x00003176,0x00003174,0x00003170,
60550x00002ca5,0x00002ca4,0x00050051,0x00000006, 64630x00050050,0x00000007,0x00003177,0x00003171,
60560x00002e6e,0x00002ca5,0x00000000,0x00050095, 64640x00003176,0x0004007c,0x00000014,0x00003167,
60570x0000013d,0x00002e70,0x00002e6e,0x00002ca3, 64650x00003177,0x00060041,0x00000174,0x0000315e,
60580x00050051,0x00000006,0x00002e71,0x00002e70, 64660x00003167,0x00000173,0x00000173,0x0006003d,
60590x00000001,0x00050051,0x00000006,0x00002e72, 64670x00000006,0x0000315f,0x0000315e,0x00000002,
60600x00002e70,0x00000000,0x00050051,0x00000006, 64680x00000004,0x00050080,0x00000006,0x00002f91,
60610x00002e75,0x00002ca5,0x00000001,0x00050080, 64690x00002f77,0x00000594,0x00050095,0x00000145,
60620x00000006,0x00002e77,0x00002e75,0x00002e71, 64700x00003190,0x0000316d,0x00002f91,0x00050051,
60630x00050050,0x00000007,0x00002e78,0x00002e72, 64710x00000006,0x00003191,0x00003190,0x00000001,
60640x00002e77,0x0004007c,0x00000014,0x00002e68, 64720x00050051,0x00000006,0x00003192,0x00003190,
60650x00002e78,0x00060041,0x0000016c,0x00002e5f, 64730x00000000,0x00050080,0x00000006,0x00003197,
60660x00002e68,0x0000016b,0x0000016b,0x0006003d, 64740x00003174,0x00003191,0x00050050,0x00000007,
60670x00000006,0x00002e60,0x00002e5f,0x00000002, 64750x00003198,0x00003192,0x00003197,0x0004007c,
60680x00000004,0x0004007c,0x00000027,0x00002ca7, 64760x00000014,0x00003188,0x00003198,0x00060041,
60690x00002e60,0x00050041,0x00000028,0x00002ca8, 64770x00000174,0x0000317f,0x00003188,0x00000173,
60700x00002c30,0x00005e6e,0x0003003e,0x00002ca8, 64780x00000173,0x0006003d,0x00000006,0x00003180,
60710x00002ca7,0x00050080,0x00000006,0x00002cab, 64790x0000317f,0x00000002,0x00000004,0x00050080,
60720x00005e6e,0x00000264,0x000200f9,0x00002c9a, 64800x00000006,0x00002f96,0x00002f77,0x0000059e,
60730x000200f8,0x00002cac,0x00050080,0x00000006, 64810x00050095,0x00000145,0x000031b1,0x0000316d,
60740x00002cae,0x00002c99,0x00000521,0x00050041, 64820x00002f96,0x00050051,0x00000006,0x000031b2,
60750x00000266,0x00002caf,0x000001b9,0x00000315, 64830x000031b1,0x00000001,0x00050051,0x00000006,
60760x0004003d,0x00000007,0x00002cb0,0x00002caf, 64840x000031b3,0x000031b1,0x00000000,0x00050080,
60770x00050051,0x00000006,0x00002e8f,0x00002cb0, 64850x00000006,0x000031b8,0x00003174,0x000031b2,
60780x00000000,0x00050095,0x0000013d,0x00002e91, 64860x00050050,0x00000007,0x000031b9,0x000031b3,
60790x00002e8f,0x00002cae,0x00050051,0x00000006, 64870x000031b8,0x0004007c,0x00000014,0x000031a9,
60800x00002e92,0x00002e91,0x00000001,0x00050051, 64880x000031b9,0x00060041,0x00000174,0x000031a0,
60810x00000006,0x00002e93,0x00002e91,0x00000000, 64890x000031a9,0x00000173,0x00000173,0x0006003d,
60820x00050051,0x00000006,0x00002e96,0x00002cb0, 64900x00000006,0x000031a1,0x000031a0,0x00000002,
60830x00000001,0x00050080,0x00000006,0x00002e98, 64910x00000004,0x00050080,0x00000006,0x00002f9b,
60840x00002e96,0x00002e92,0x00050050,0x00000007, 64920x00002f77,0x000005a7,0x00050095,0x00000145,
60850x00002e99,0x00002e93,0x00002e98,0x0004007c, 64930x000031d2,0x0000316d,0x00002f9b,0x00050051,
60860x00000014,0x00002e89,0x00002e99,0x00060041, 64940x00000006,0x000031d3,0x000031d2,0x00000001,
60870x0000016c,0x00002e80,0x00002e89,0x0000016b, 64950x00050051,0x00000006,0x000031d4,0x000031d2,
60880x0000016b,0x0006003d,0x00000006,0x00002e81, 64960x00000000,0x00050080,0x00000006,0x000031d9,
60890x00002e80,0x00000002,0x00000004,0x00050080, 64970x00003174,0x000031d3,0x00050050,0x00000007,
60900x00000006,0x00002cb3,0x00002c99,0x0000052d, 64980x000031da,0x000031d4,0x000031d9,0x0004007c,
60910x00050095,0x0000013d,0x00002eb2,0x00002e8f, 64990x00000014,0x000031ca,0x000031da,0x00060041,
60920x00002cb3,0x00050051,0x00000006,0x00002eb3, 65000x00000174,0x000031c1,0x000031ca,0x00000173,
60930x00002eb2,0x00000001,0x00050051,0x00000006, 65010x00000173,0x0006003d,0x00000006,0x000031c2,
60940x00002eb4,0x00002eb2,0x00000000,0x00050080, 65020x000031c1,0x00000002,0x00000004,0x00050050,
60950x00000006,0x00002eb9,0x00002e96,0x00002eb3, 65030x00000007,0x00002f9f,0x000031a1,0x000031c2,
60960x00050050,0x00000007,0x00002eba,0x00002eb4, 65040x00050041,0x000001c3,0x00002fa0,0x000001c1,
60970x00002eb9,0x0004007c,0x00000014,0x00002eaa, 65050x00000352,0x0004003d,0x00000006,0x00002fa1,
60980x00002eba,0x00060041,0x0000016c,0x00002ea1, 65060x00002fa0,0x00050084,0x00000006,0x00002fa3,
60990x00002eaa,0x0000016b,0x0000016b,0x0006003d, 65070x0000034a,0x000013a7,0x00050080,0x00000006,
61000x00000006,0x00002ea2,0x00002ea1,0x00000002, 65080x00002fa4,0x00002fa1,0x00002fa3,0x000200f9,
61010x00000004,0x00050080,0x00000006,0x00002cb8, 65090x00002fa5,0x000200f8,0x00002fa5,0x000700f5,
61020x00002c99,0x00000537,0x00050095,0x0000013d, 65100x00000006,0x00006295,0x00000140,0x00002f8a,
61030x00002ed3,0x00002e8f,0x00002cb8,0x00050051, 65110x00002fb6,0x00002fa9,0x000500b0,0x0000002f,
61040x00000006,0x00002ed4,0x00002ed3,0x00000001, 65120x00002fa8,0x00006295,0x000001dc,0x000400f6,
61050x00050051,0x00000006,0x00002ed5,0x00002ed3, 65130x00002fb7,0x00002fa9,0x00000000,0x000400fa,
61060x00000000,0x00050080,0x00000006,0x00002eda, 65140x00002fa8,0x00002fa9,0x00002fb7,0x000200f8,
61070x00002e96,0x00002ed4,0x00050050,0x00000007, 65150x00002fa9,0x00050084,0x00000006,0x00002fac,
61080x00002edb,0x00002ed5,0x00002eda,0x0004007c, 65160x000000f3,0x00006295,0x00050080,0x00000006,
61090x00000014,0x00002ecb,0x00002edb,0x00060041, 65170x00002fad,0x00002fa4,0x00002fac,0x00050041,
61100x0000016c,0x00002ec2,0x00002ecb,0x0000016b, 65180x0000026e,0x00002faf,0x000001c1,0x00000173,
61110x0000016b,0x0006003d,0x00000006,0x00002ec3, 65190x0004003d,0x00000007,0x00002fb0,0x00002faf,
61120x00002ec2,0x00000002,0x00000004,0x00050080, 65200x00050041,0x00000028,0x00002fb1,0x00002f0e,
61130x00000006,0x00002cbd,0x00002c99,0x00000541, 65210x00006295,0x0004003d,0x00000027,0x00002fb2,
61140x00050095,0x0000013d,0x00002ef4,0x00002e8f, 65220x00002fb1,0x0004007c,0x00000006,0x000031e0,
61150x00002cbd,0x00050051,0x00000006,0x00002ef5, 65230x00002fb2,0x00050051,0x00000006,0x000031f9,
61160x00002ef4,0x00000001,0x00050051,0x00000006, 65240x00002fb0,0x00000000,0x00050095,0x00000145,
61170x00002ef6,0x00002ef4,0x00000000,0x00050080, 65250x000031fb,0x000031f9,0x00002fad,0x00050051,
61180x00000006,0x00002efb,0x00002e96,0x00002ef5, 65260x00000006,0x000031fc,0x000031fb,0x00000001,
61190x00050050,0x00000007,0x00002efc,0x00002ef6, 65270x00050051,0x00000006,0x000031fd,0x000031fb,
61200x00002efb,0x0004007c,0x00000014,0x00002eec, 65280x00000000,0x00050051,0x00000006,0x00003200,
61210x00002efc,0x00060041,0x0000016c,0x00002ee3, 65290x00002fb0,0x00000001,0x00050080,0x00000006,
61220x00002eec,0x0000016b,0x0000016b,0x0006003d, 65300x00003202,0x00003200,0x000031fc,0x00050050,
61230x00000006,0x00002ee4,0x00002ee3,0x00000002, 65310x00000007,0x00003203,0x000031fd,0x00003202,
61240x00000004,0x00050050,0x00000007,0x00002cc1, 65320x0004007c,0x00000014,0x000031f3,0x00003203,
61250x00002ec3,0x00002ee4,0x00050041,0x000001bb, 65330x00060041,0x00000174,0x000031eb,0x000031f3,
61260x00002cc2,0x000001b9,0x0000034a,0x0004003d, 65340x00000173,0x00000173,0x0005003e,0x000031eb,
61270x00000006,0x00002cc3,0x00002cc2,0x00050084, 65350x000031e0,0x00000002,0x00000004,0x00050080,
61280x00000006,0x00002cc5,0x00000342,0x000012dd, 65360x00000006,0x00002fb6,0x00006295,0x0000026c,
61290x00050080,0x00000006,0x00002cc6,0x00002cc3, 65370x000200f9,0x00002fa5,0x000200f8,0x00002fb7,
61300x00002cc5,0x000200f9,0x00002cc7,0x000200f8, 65380x00050080,0x00000006,0x00002fb9,0x00002fa4,
61310x00002cc7,0x000700f5,0x00000006,0x00005e6f, 65390x00000588,0x00050041,0x0000026e,0x00002fba,
61320x00000138,0x00002cac,0x00002cd8,0x00002ccb, 65400x000001c1,0x00000173,0x0004003d,0x00000007,
61330x000500b0,0x0000002f,0x00002cca,0x00005e6f, 65410x00002fbb,0x00002fba,0x00050051,0x00000006,
61340x000001d4,0x000400f6,0x00002cd9,0x00002ccb, 65420x00003219,0x00002fbb,0x00000000,0x00050095,
61350x00000000,0x000400fa,0x00002cca,0x00002ccb, 65430x00000145,0x0000321b,0x00003219,0x00002fb9,
61360x00002cd9,0x000200f8,0x00002ccb,0x00050084, 65440x00050051,0x00000006,0x0000321c,0x0000321b,
61370x00000006,0x00002cce,0x000000ec,0x00005e6f, 65450x00000001,0x00050051,0x00000006,0x0000321d,
61380x00050080,0x00000006,0x00002ccf,0x00002cc6, 65460x0000321b,0x00000000,0x00050051,0x00000006,
61390x00002cce,0x00050041,0x00000266,0x00002cd1, 65470x00003220,0x00002fbb,0x00000001,0x00050080,
61400x000001b9,0x0000016b,0x0004003d,0x00000007, 65480x00000006,0x00003222,0x00003220,0x0000321c,
61410x00002cd2,0x00002cd1,0x00050041,0x00000028, 65490x00050050,0x00000007,0x00003223,0x0000321d,
61420x00002cd3,0x00002c30,0x00005e6f,0x0004003d, 65500x00003222,0x0004007c,0x00000014,0x00003213,
61430x00000027,0x00002cd4,0x00002cd3,0x0004007c, 65510x00003223,0x00060041,0x00000174,0x0000320b,
61440x00000006,0x00002f02,0x00002cd4,0x00050051, 65520x00003213,0x00000173,0x00000173,0x0005003e,
61450x00000006,0x00002f1b,0x00002cd2,0x00000000, 65530x0000320b,0x0000315f,0x00000002,0x00000004,
61460x00050095,0x0000013d,0x00002f1d,0x00002f1b, 65540x00050080,0x00000006,0x00002fbf,0x00002fa4,
61470x00002ccf,0x00050051,0x00000006,0x00002f1e, 65550x00000594,0x00050095,0x00000145,0x0000323b,
61480x00002f1d,0x00000001,0x00050051,0x00000006, 65560x00003219,0x00002fbf,0x00050051,0x00000006,
61490x00002f1f,0x00002f1d,0x00000000,0x00050051, 65570x0000323c,0x0000323b,0x00000001,0x00050051,
61500x00000006,0x00002f22,0x00002cd2,0x00000001, 65580x00000006,0x0000323d,0x0000323b,0x00000000,
61510x00050080,0x00000006,0x00002f24,0x00002f22, 65590x00050080,0x00000006,0x00003242,0x00003220,
61520x00002f1e,0x00050050,0x00000007,0x00002f25, 65600x0000323c,0x00050050,0x00000007,0x00003243,
61530x00002f1f,0x00002f24,0x0004007c,0x00000014, 65610x0000323d,0x00003242,0x0004007c,0x00000014,
61540x00002f15,0x00002f25,0x00060041,0x0000016c, 65620x00003233,0x00003243,0x00060041,0x00000174,
61550x00002f0d,0x00002f15,0x0000016b,0x0000016b, 65630x0000322b,0x00003233,0x00000173,0x00000173,
61560x0005003e,0x00002f0d,0x00002f02,0x00000002, 65640x0005003e,0x0000322b,0x00003180,0x00000002,
61570x00000004,0x00050080,0x00000006,0x00002cd8, 65650x00000004,0x000500aa,0x0000002f,0x00003248,
61580x00005e6f,0x00000264,0x000200f9,0x00002cc7, 65660x000031a1,0x00000140,0x000300f7,0x0000324d,
61590x000200f8,0x00002cd9,0x00050080,0x00000006, 65670x00000000,0x000400fa,0x00003248,0x00003249,
61600x00002cdb,0x00002cc6,0x00000521,0x00050041, 65680x0000324d,0x000200f8,0x00003249,0x000500aa,
61610x00000266,0x00002cdc,0x000001b9,0x0000016b, 65690x0000002f,0x0000324c,0x000031c2,0x00000140,
61620x0004003d,0x00000007,0x00002cdd,0x00002cdc, 65700x000200f9,0x0000324d,0x000200f8,0x0000324d,
61630x00050051,0x00000006,0x00002f3b,0x00002cdd, 65710x000700f5,0x0000002f,0x0000324e,0x00003248,
61640x00000000,0x00050095,0x0000013d,0x00002f3d, 65720x00002fb7,0x0000324c,0x00003249,0x000400a8,
61650x00002f3b,0x00002cdb,0x00050051,0x00000006, 65730x0000002f,0x00002fc9,0x0000324e,0x000300f7,
61660x00002f3e,0x00002f3d,0x00000001,0x00050051, 65740x00002fce,0x00000000,0x000400fa,0x00002fc9,
61670x00000006,0x00002f3f,0x00002f3d,0x00000000, 65750x00002fca,0x00002fce,0x000200f8,0x00002fca,
61680x00050051,0x00000006,0x00002f42,0x00002cdd, 65760x000300f7,0x00003302,0x00000000,0x000300fb,
61690x00000001,0x00050080,0x00000006,0x00002f44, 65770x00000140,0x0000327e,0x000200f8,0x0000327e,
61700x00002f42,0x00002f3e,0x00050050,0x00000007, 65780x000500c7,0x00000006,0x00003282,0x000013a9,
61710x00002f45,0x00002f3f,0x00002f44,0x0004007c, 65790x000001d5,0x000500aa,0x0000002f,0x00003283,
61720x00000014,0x00002f35,0x00002f45,0x00060041, 65800x00003282,0x00000140,0x000300f7,0x00003285,
61730x0000016c,0x00002f2d,0x00002f35,0x0000016b, 65810x00000000,0x000400fa,0x00003283,0x00003284,
61740x0000016b,0x0005003e,0x00002f2d,0x00002e81, 65820x00003285,0x000200f8,0x00003284,0x000200f9,
61750x00000002,0x00000004,0x00050080,0x00000006, 65830x00003302,0x000200f8,0x00003285,0x00050041,
61760x00002ce1,0x00002cc6,0x0000052d,0x00050095, 65840x000001c3,0x00003286,0x000001c1,0x00000414,
61770x0000013d,0x00002f5d,0x00002f3b,0x00002ce1, 65850x0004003d,0x00000006,0x00003287,0x00003286,
61780x00050051,0x00000006,0x00002f5e,0x00002f5d, 65860x000200f9,0x00003288,0x000200f8,0x00003288,
61790x00000001,0x00050051,0x00000006,0x00002f5f, 65870x000700f5,0x00000006,0x00006297,0x00003287,
61800x00002f5d,0x00000000,0x00050080,0x00000006, 65880x00003285,0x0000654f,0x000032a7,0x000700f5,
61810x00002f64,0x00002f42,0x00002f5e,0x00050050, 65890x00000006,0x00006296,0x00000140,0x00003285,
61820x00000007,0x00002f65,0x00002f5f,0x00002f64, 65900x0000650d,0x000032a7,0x000500b0,0x0000002f,
61830x0004007c,0x00000014,0x00002f55,0x00002f65, 65910x0000328c,0x00006296,0x00006297,0x000400f6,
61840x00060041,0x0000016c,0x00002f4d,0x00002f55, 65920x000032a8,0x000032a7,0x00000000,0x000400fa,
61850x0000016b,0x0000016b,0x0005003e,0x00002f4d, 65930x0000328c,0x0000328d,0x000032a8,0x000200f8,
61860x00002ea2,0x00000002,0x00000004,0x000500aa, 65940x0000328d,0x00050080,0x00000006,0x00003290,
61870x0000002f,0x00002f6a,0x00002ec3,0x00000138, 65950x00006296,0x00006297,0x000500c2,0x00000006,
61880x000300f7,0x00002f6f,0x00000000,0x000400fa, 65960x00003291,0x00003290,0x0000014a,0x00050084,
61890x00002f6a,0x00002f6b,0x00002f6f,0x000200f8, 65970x00000006,0x00003293,0x000001f7,0x00003291,
61900x00002f6b,0x000500aa,0x0000002f,0x00002f6e, 65980x00050041,0x0000026e,0x00003294,0x000001c1,
61910x00002ee4,0x00000138,0x000200f9,0x00002f6f, 65990x00000325,0x0004003d,0x00000007,0x00003295,
61920x000200f8,0x00002f6f,0x000700f5,0x0000002f, 66000x00003294,0x00050051,0x00000006,0x0000331a,
61930x00002f70,0x00002f6a,0x00002cd9,0x00002f6e, 66010x00003295,0x00000000,0x00050095,0x00000145,
61940x00002f6b,0x000400a8,0x0000002f,0x00002ceb, 66020x0000331c,0x0000331a,0x00003293,0x00050051,
61950x00002f70,0x000300f7,0x00002cf0,0x00000000, 66030x00000006,0x0000331d,0x0000331c,0x00000001,
61960x000400fa,0x00002ceb,0x00002cec,0x00002cf0, 66040x00050051,0x00000006,0x0000331e,0x0000331c,
61970x000200f8,0x00002cec,0x000300f7,0x00003024, 66050x00000000,0x00050051,0x00000006,0x00003321,
61980x00000000,0x000300fb,0x00000138,0x00002fa0, 66060x00003295,0x00000001,0x00050080,0x00000006,
61990x000200f8,0x00002fa0,0x00050041,0x000001bb, 66070x00003323,0x00003321,0x0000331d,0x00050050,
62000x00002fa2,0x000001b9,0x00000334,0x0004003d, 66080x00000007,0x00003324,0x0000331e,0x00003323,
62010x00000006,0x00002fa3,0x00002fa2,0x000500c7, 66090x0004007c,0x00000014,0x00003314,0x00003324,
62020x00000006,0x00002fa4,0x00002fa3,0x000001cd, 66100x00060041,0x00000174,0x0000330b,0x00003314,
62030x000500aa,0x0000002f,0x00002fa5,0x00002fa4, 66110x00000173,0x00000173,0x0006003d,0x00000006,
62040x00000138,0x000300f7,0x00002fa7,0x00000000, 66120x0000330c,0x0000330b,0x00000002,0x00000004,
62050x000400fa,0x00002fa5,0x00002fa6,0x00002fa7, 66130x00050080,0x00000006,0x00003299,0x00003293,
62060x000200f8,0x00002fa6,0x000200f9,0x00003024, 66140x000000f3,0x00050095,0x00000145,0x0000333d,
62070x000200f8,0x00002fa7,0x00050041,0x000001bb, 66150x0000331a,0x00003299,0x00050051,0x00000006,
62080x00002fa8,0x000001b9,0x000003b6,0x0004003d, 66160x0000333e,0x0000333d,0x00000001,0x00050051,
62090x00000006,0x00002fa9,0x00002fa8,0x000200f9, 66170x00000006,0x0000333f,0x0000333d,0x00000000,
62100x00002faa,0x000200f8,0x00002faa,0x000700f5, 66180x00050080,0x00000006,0x00003344,0x00003321,
62110x00000006,0x00005e71,0x00002fa9,0x00002fa7, 66190x0000333e,0x00050050,0x00000007,0x00003345,
62120x00006119,0x00002fc9,0x000700f5,0x00000006, 66200x0000333f,0x00003344,0x0004007c,0x00000014,
62130x00005e70,0x00000138,0x00002fa7,0x000060d9, 66210x00003335,0x00003345,0x00060041,0x00000174,
62140x00002fc9,0x000500b0,0x0000002f,0x00002fae, 66220x0000332c,0x00003335,0x00000173,0x00000173,
62150x00005e70,0x00005e71,0x000400f6,0x00002fca, 66230x0006003d,0x00000006,0x0000332d,0x0000332c,
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, 66240x00000002,0x00000004,0x000500b0,0x0000002f,
63310x000030f0,0x00002ee4,0x000030d1,0x000400a8, 66250x0000334c,0x000031c2,0x0000332d,0x000400a8,
63320x0000002f,0x000030f1,0x000030f0,0x000300f7, 66260x0000002f,0x0000334d,0x0000334c,0x000300f7,
63330x00003100,0x00000000,0x000400fa,0x000030f1, 66270x0000335c,0x00000000,0x000400fa,0x0000334d,
63340x000030f2,0x00003100,0x000200f8,0x000030f2, 66280x0000334e,0x0000335c,0x000200f8,0x0000334e,
63350x000500aa,0x0000002f,0x000030f7,0x00002ee4, 66290x000500aa,0x0000002f,0x00003353,0x000031c2,
63360x000030d1,0x000300f7,0x000030fe,0x00000000, 66300x0000332d,0x000300f7,0x0000335a,0x00000000,
63370x000400fa,0x000030f7,0x000030f8,0x000030fe, 66310x000400fa,0x00003353,0x00003354,0x0000335a,
63380x000200f8,0x000030f8,0x000500b0,0x0000002f, 66320x000200f8,0x00003354,0x000500b0,0x0000002f,
63390x000030fd,0x00002ec3,0x000030b0,0x000200f9, 66330x00003359,0x000031a1,0x0000330c,0x000200f9,
63400x000030fe,0x000200f8,0x000030fe,0x000700f5, 66340x0000335a,0x000200f8,0x0000335a,0x000700f5,
63410x0000002f,0x000030ff,0x000030f7,0x000030f2, 66350x0000002f,0x0000335b,0x00003353,0x0000334e,
63420x000030fd,0x000030f8,0x000200f9,0x00003100, 66360x00003359,0x00003354,0x000200f9,0x0000335c,
63430x000200f8,0x00003100,0x000700f5,0x0000002f, 66370x000200f8,0x0000335c,0x000700f5,0x0000002f,
63440x00003101,0x000030f0,0x00002fd4,0x000030ff, 66380x0000335d,0x0000334c,0x0000328d,0x0000335b,
63450x000030fe,0x000300f7,0x00003006,0x00000000, 66390x0000335a,0x000300f7,0x000032a6,0x00000000,
63460x000400fa,0x00003101,0x00002fe6,0x00003006, 66400x000400fa,0x0000335d,0x000032a1,0x000032a3,
63470x000200f8,0x00002fe6,0x000500b0,0x0000002f, 66410x000200f8,0x000032a3,0x00050080,0x00000006,
63480x00003108,0x000030d1,0x0000308e,0x000400a8, 66420x000032a5,0x00003291,0x0000014a,0x000200f9,
63490x0000002f,0x00003109,0x00003108,0x000300f7, 66430x000032a6,0x000200f8,0x000032a1,0x000200f9,
63500x00003118,0x00000000,0x000400fa,0x00003109, 66440x000032a6,0x000200f8,0x000032a6,0x000700f5,
63510x0000310a,0x00003118,0x000200f8,0x0000310a, 66450x00000006,0x0000650d,0x00006296,0x000032a1,
63520x000500aa,0x0000002f,0x0000310f,0x000030d1, 66460x000032a5,0x000032a3,0x000600a9,0x00000006,
63530x0000308e,0x000300f7,0x00003116,0x00000000, 66470x0000654f,0x0000335d,0x00003291,0x00006297,
63540x000400fa,0x0000310f,0x00003110,0x00003116, 66480x000200f9,0x000032a7,0x000200f8,0x000032a7,
63550x000200f8,0x00003110,0x000500b0,0x0000002f, 66490x000200f9,0x00003288,0x000200f8,0x000032a8,
63560x00003115,0x000030b0,0x00003089,0x000200f9, 66500x00050095,0x00000145,0x00003365,0x000031a1,
63570x00003116,0x000200f8,0x00003116,0x000700f5, 66510x000001cc,0x00050051,0x00000006,0x00003366,
63580x0000002f,0x00003117,0x0000310f,0x0000310a, 66520x00003365,0x00000001,0x00050051,0x00000006,
63590x00003115,0x00003110,0x000200f9,0x00003118, 66530x00003367,0x00003365,0x00000000,0x00050080,
63600x000200f8,0x00003118,0x000700f5,0x0000002f, 66540x00000006,0x0000336c,0x000031c2,0x00003366,
63610x00003119,0x00003108,0x00002fe6,0x00003117, 66550x000500b0,0x0000002f,0x00003374,0x0000336c,
63620x00003116,0x000300f7,0x00002feb,0x00000000, 66560x000031c2,0x000400a8,0x0000002f,0x00003375,
63630x000400fa,0x00003119,0x00002fea,0x00002feb, 66570x00003374,0x000300f7,0x00003384,0x00000000,
63640x000200f8,0x00002fea,0x000200f9,0x00003024, 66580x000400fa,0x00003375,0x00003376,0x00003384,
63650x000200f8,0x00002feb,0x00050095,0x0000013d, 66590x000200f8,0x00003376,0x000500aa,0x0000002f,
63660x00003132,0x000030be,0x00002fd7,0x00050051, 66600x0000337b,0x0000336c,0x000031c2,0x000300f7,
63670x00000006,0x00003133,0x00003132,0x00000001, 66610x00003382,0x00000000,0x000400fa,0x0000337b,
63680x00050051,0x00000006,0x00003134,0x00003132, 66620x0000337c,0x00003382,0x000200f8,0x0000337c,
63690x00000000,0x00050080,0x00000006,0x00003139, 66630x000500b0,0x0000002f,0x00003381,0x00003367,
63700x000030c5,0x00003133,0x00050050,0x00000007, 66640x000031a1,0x000200f9,0x00003382,0x000200f8,
63710x0000313a,0x00003134,0x00003139,0x0004007c, 66650x00003382,0x000700f5,0x0000002f,0x00003383,
63720x00000014,0x0000312a,0x0000313a,0x00060041, 66660x0000337b,0x00003376,0x00003381,0x0000337c,
63730x0000016c,0x00003121,0x0000312a,0x0000016b, 66670x000200f9,0x00003384,0x000200f8,0x00003384,
63740x0000016b,0x0006003d,0x00000006,0x00003122, 66680x000700f5,0x0000002f,0x00003385,0x00003374,
63750x00003121,0x00000002,0x00000004,0x00050080, 66690x000032a8,0x00003383,0x00003382,0x000300f7,
63760x00000006,0x00002ff1,0x00002fd7,0x000000ec, 66700x000032af,0x00000000,0x000400fa,0x00003385,
63770x00050095,0x0000013d,0x00003153,0x000030be, 66710x000032ae,0x000032af,0x000200f8,0x000032ae,
63780x00002ff1,0x00050051,0x00000006,0x00003154, 66720x000200f9,0x00003302,0x000200f8,0x000032af,
63790x00003153,0x00000001,0x00050051,0x00000006, 66730x000500ac,0x0000002f,0x000032b1,0x00006296,
63800x00003155,0x00003153,0x00000000,0x00050080, 66740x00000140,0x000300f7,0x000032e5,0x00000000,
63810x00000006,0x0000315a,0x000030c5,0x00003154, 66750x000400fa,0x000032b1,0x000032b2,0x000032e5,
63820x00050050,0x00000007,0x0000315b,0x00003155, 66760x000200f8,0x000032b2,0x00050082,0x00000006,
63830x0000315a,0x0004007c,0x00000014,0x0000314b, 66770x000032b4,0x00006296,0x0000014a,0x00050084,
63840x0000315b,0x00060041,0x0000016c,0x00003142, 66780x00000006,0x000032b5,0x000001f7,0x000032b4,
63850x0000314b,0x0000016b,0x0000016b,0x0006003d, 66790x00050080,0x00000006,0x000032b7,0x000032b5,
63860x00000006,0x00003143,0x00003142,0x00000002, 66800x000001d5,0x00050041,0x0000026e,0x000032b8,
63870x00000004,0x00050080,0x00000006,0x00002ff7, 66810x000001c1,0x00000325,0x0004003d,0x00000007,
63880x00002fd7,0x000001db,0x00050095,0x0000013d, 66820x000032b9,0x000032b8,0x00050051,0x00000006,
63890x00003174,0x000030be,0x00002ff7,0x00050051, 66830x0000339c,0x000032b9,0x00000000,0x00050095,
63900x00000006,0x00003175,0x00003174,0x00000001, 66840x00000145,0x0000339e,0x0000339c,0x000032b7,
63910x00050051,0x00000006,0x00003176,0x00003174, 66850x00050051,0x00000006,0x0000339f,0x0000339e,
63920x00000000,0x00050080,0x00000006,0x0000317b, 66860x00000001,0x00050051,0x00000006,0x000033a0,
63930x000030c5,0x00003175,0x00050050,0x00000007, 66870x0000339e,0x00000000,0x00050051,0x00000006,
63940x0000317c,0x00003176,0x0000317b,0x0004007c, 66880x000033a3,0x000032b9,0x00000001,0x00050080,
63950x00000014,0x0000316c,0x0000317c,0x00060041, 66890x00000006,0x000033a5,0x000033a3,0x0000339f,
63960x0000016c,0x00003163,0x0000316c,0x0000016b, 66900x00050050,0x00000007,0x000033a6,0x000033a0,
63970x0000016b,0x0006003d,0x00000006,0x00003164, 66910x000033a5,0x0004007c,0x00000014,0x00003396,
63980x00003163,0x00000002,0x00000004,0x00050080, 66920x000033a6,0x00060041,0x00000174,0x0000338d,
63990x00000006,0x00002ffc,0x00002fd7,0x00000299, 66930x00003396,0x00000173,0x00000173,0x0006003d,
64000x00050095,0x0000013d,0x00003195,0x000030be, 66940x00000006,0x0000338e,0x0000338d,0x00000002,
64010x00002ffc,0x00050051,0x00000006,0x00003196, 66950x00000004,0x00050080,0x00000006,0x000032bc,
64020x00003195,0x00000001,0x00050051,0x00000006, 66960x000032b5,0x000001dc,0x00050095,0x00000145,
64030x00003197,0x00003195,0x00000000,0x00050080, 66970x000033bf,0x0000339c,0x000032bc,0x00050051,
64040x00000006,0x0000319c,0x000030c5,0x00003196, 66980x00000006,0x000033c0,0x000033bf,0x00000001,
64050x00050050,0x00000007,0x0000319d,0x00003197, 66990x00050051,0x00000006,0x000033c1,0x000033bf,
64060x0000319c,0x0004007c,0x00000014,0x0000318d, 67000x00000000,0x00050080,0x00000006,0x000033c6,
64070x0000319d,0x00060041,0x0000016c,0x00003184, 67010x000033a3,0x000033c0,0x00050050,0x00000007,
64080x0000318d,0x0000016b,0x0000016b,0x0006003d, 67020x000033c7,0x000033c1,0x000033c6,0x0004007c,
64090x00000006,0x00003185,0x00003184,0x00000002, 67030x00000014,0x000033b7,0x000033c7,0x00060041,
64100x00000004,0x00050096,0x0000013d,0x000031a6, 67040x00000174,0x000033ae,0x000033b7,0x00000173,
64110x00002ec3,0x00003122,0x00050051,0x00000006, 67050x00000173,0x0006003d,0x00000006,0x000033af,
64120x000031a7,0x000031a6,0x00000001,0x00050051, 67060x000033ae,0x00000002,0x00000004,0x000500b0,
64130x00000006,0x000031a8,0x000031a6,0x00000000, 67070x0000002f,0x000033ce,0x000031c2,0x000033af,
64140x00050082,0x00000006,0x000031ae,0x00002ee4, 67080x000400a8,0x0000002f,0x000033cf,0x000033ce,
64150x00003143,0x00050082,0x00000006,0x000031b0, 67090x000300f7,0x000033de,0x00000000,0x000400fa,
64160x000031ae,0x000031a7,0x00050095,0x0000013d, 67100x000033cf,0x000033d0,0x000033de,0x000200f8,
64170x000031ba,0x00003164,0x000031a8,0x00050051, 67110x000033d0,0x000500aa,0x0000002f,0x000033d5,
64180x00000006,0x000031bb,0x000031ba,0x00000001, 67120x000031c2,0x000033af,0x000300f7,0x000033dc,
64190x00050051,0x00000006,0x000031bc,0x000031ba, 67130x00000000,0x000400fa,0x000033d5,0x000033d6,
64200x00000000,0x00050080,0x00000006,0x000031c2, 67140x000033dc,0x000200f8,0x000033d6,0x000500b0,
64210x00003185,0x000031b0,0x00050080,0x00000006, 67150x0000002f,0x000033db,0x000031a1,0x0000338e,
64220x000031c4,0x000031c2,0x000031bb,0x00050050, 67160x000200f9,0x000033dc,0x000200f8,0x000033dc,
64230x00000007,0x000031c5,0x000031bc,0x000031c4, 67170x000700f5,0x0000002f,0x000033dd,0x000033d5,
64240x000200f9,0x00003006,0x000200f8,0x00003006, 67180x000033d0,0x000033db,0x000033d6,0x000200f9,
64250x000700f5,0x00000007,0x00005e7e,0x00002cc1, 67190x000033de,0x000200f8,0x000033de,0x000700f5,
64260x00003100,0x000031c5,0x00002feb,0x000200f9, 67200x0000002f,0x000033df,0x000033ce,0x000032b2,
64270x00003007,0x000200f8,0x00003007,0x000700f5, 67210x000033dd,0x000033dc,0x000300f7,0x000032e4,
64280x00000007,0x00005e7a,0x00002cc1,0x00002fd1, 67220x00000000,0x000400fa,0x000033df,0x000032c4,
64290x00005e7e,0x00003006,0x000700f5,0x0000002f, 67230x000032e4,0x000200f8,0x000032c4,0x000500b0,
64300x00005e74,0x000003cc,0x00002fd1,0x00003101, 67240x0000002f,0x000033e6,0x000033af,0x0000336c,
64310x00003006,0x000400a8,0x0000002f,0x00003009, 67250x000400a8,0x0000002f,0x000033e7,0x000033e6,
64320x00005e74,0x000300f7,0x0000300f,0x00000000, 67260x000300f7,0x000033f6,0x00000000,0x000400fa,
64330x000400fa,0x00003009,0x0000300a,0x0000300f, 67270x000033e7,0x000033e8,0x000033f6,0x000200f8,
64340x000200f8,0x0000300a,0x00050041,0x00000266, 67280x000033e8,0x000500aa,0x0000002f,0x000033ed,
64350x0000300b,0x000001b9,0x00000325,0x0004003d, 67290x000033af,0x0000336c,0x000300f7,0x000033f4,
64360x00000007,0x0000300c,0x0000300b,0x00050051, 67300x00000000,0x000400fa,0x000033ed,0x000033ee,
64370x00000006,0x000031c9,0x0000300c,0x00000000, 67310x000033f4,0x000200f8,0x000033ee,0x000500b0,
64380x000500aa,0x0000002f,0x000031ca,0x000031c9, 67320x0000002f,0x000033f3,0x0000338e,0x00003367,
64390x00000138,0x000300f7,0x000031cf,0x00000000, 67330x000200f9,0x000033f4,0x000200f8,0x000033f4,
64400x000400fa,0x000031ca,0x000031cb,0x000031cf, 67340x000700f5,0x0000002f,0x000033f5,0x000033ed,
64410x000200f8,0x000031cb,0x00050051,0x00000006, 67350x000033e8,0x000033f3,0x000033ee,0x000200f9,
64420x000031cd,0x0000300c,0x00000001,0x000500aa, 67360x000033f6,0x000200f8,0x000033f6,0x000700f5,
64430x0000002f,0x000031ce,0x000031cd,0x00000138, 67370x0000002f,0x000033f7,0x000033e6,0x000032c4,
64440x000200f9,0x000031cf,0x000200f8,0x000031cf, 67380x000033f5,0x000033f4,0x000300f7,0x000032c9,
64450x000700f5,0x0000002f,0x000031d0,0x000031ca, 67390x00000000,0x000400fa,0x000033f7,0x000032c8,
64460x0000300a,0x000031ce,0x000031cb,0x000400a8, 67400x000032c9,0x000200f8,0x000032c8,0x000200f9,
64470x0000002f,0x0000300e,0x000031d0,0x000200f9, 67410x00003302,0x000200f8,0x000032c9,0x00050095,
64480x0000300f,0x000200f8,0x0000300f,0x000700f5, 67420x00000145,0x00003410,0x0000339c,0x000032b5,
64490x0000002f,0x00003010,0x00003009,0x00003007, 67430x00050051,0x00000006,0x00003411,0x00003410,
64500x0000300e,0x000031cf,0x000300f7,0x00003016, 67440x00000001,0x00050051,0x00000006,0x00003412,
64510x00000000,0x000400fa,0x00003010,0x00003011, 67450x00003410,0x00000000,0x00050080,0x00000006,
64520x00003016,0x000200f8,0x00003011,0x00050041, 67460x00003417,0x000033a3,0x00003411,0x00050050,
64530x00000266,0x00003012,0x000001b9,0x00000325, 67470x00000007,0x00003418,0x00003412,0x00003417,
64540x0004003d,0x00000007,0x00003013,0x00003012, 67480x0004007c,0x00000014,0x00003408,0x00003418,
64550x00050051,0x00000006,0x000031d4,0x00003013, 67490x00060041,0x00000174,0x000033ff,0x00003408,
64560x00000001,0x000500b0,0x0000002f,0x000031d7, 67500x00000173,0x00000173,0x0006003d,0x00000006,
64570x000031d4,0x0000308e,0x000400a8,0x0000002f, 67510x00003400,0x000033ff,0x00000002,0x00000004,
64580x000031d8,0x000031d7,0x000300f7,0x000031e7, 67520x00050080,0x00000006,0x000032cf,0x000032b5,
64590x00000000,0x000400fa,0x000031d8,0x000031d9, 67530x000000f3,0x00050095,0x00000145,0x00003431,
64600x000031e7,0x000200f8,0x000031d9,0x000500aa, 67540x0000339c,0x000032cf,0x00050051,0x00000006,
64610x0000002f,0x000031de,0x000031d4,0x0000308e, 67550x00003432,0x00003431,0x00000001,0x00050051,
64620x000300f7,0x000031e5,0x00000000,0x000400fa, 67560x00000006,0x00003433,0x00003431,0x00000000,
64630x000031de,0x000031df,0x000031e5,0x000200f8, 67570x00050080,0x00000006,0x00003438,0x000033a3,
64640x000031df,0x00050051,0x00000006,0x000031e1, 67580x00003432,0x00050050,0x00000007,0x00003439,
64650x00003013,0x00000000,0x000500b0,0x0000002f, 67590x00003433,0x00003438,0x0004007c,0x00000014,
64660x000031e4,0x000031e1,0x00003089,0x000200f9, 67600x00003429,0x00003439,0x00060041,0x00000174,
64670x000031e5,0x000200f8,0x000031e5,0x000700f5, 67610x00003420,0x00003429,0x00000173,0x00000173,
64680x0000002f,0x000031e6,0x000031de,0x000031d9, 67620x0006003d,0x00000006,0x00003421,0x00003420,
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,
69590x00000002,0x00000004,0x00050080,0x00000006, 67630x00000002,0x00000004,0x00050080,0x00000006,
69600x00002e42,0x00002cc6,0x00000853,0x00050095, 67640x000032d5,0x000032b5,0x000001e3,0x00050095,
69610x0000013d,0x00003437,0x00002f3b,0x00002e42, 67650x00000145,0x00003452,0x0000339c,0x000032d5,
69620x00050051,0x00000006,0x00003438,0x00003437, 67660x00050051,0x00000006,0x00003453,0x00003452,
69630x00000001,0x00050051,0x00000006,0x00003439, 67670x00000001,0x00050051,0x00000006,0x00003454,
69640x00003437,0x00000000,0x00050080,0x00000006, 67680x00003452,0x00000000,0x00050080,0x00000006,
69650x0000343e,0x00002f42,0x00003438,0x00050050, 67690x00003459,0x000033a3,0x00003453,0x00050050,
69660x00000007,0x0000343f,0x00003439,0x0000343e, 67700x00000007,0x0000345a,0x00003454,0x00003459,
69670x0004007c,0x00000014,0x0000342f,0x0000343f, 67710x0004007c,0x00000014,0x0000344a,0x0000345a,
69680x00060041,0x0000016c,0x00003427,0x0000342f, 67720x00060041,0x00000174,0x00003441,0x0000344a,
69690x0000016b,0x0000016b,0x0005003e,0x00003427, 67730x00000173,0x00000173,0x0006003d,0x00000006,
69700x00000138,0x00000002,0x00000004,0x00050080, 67740x00003442,0x00003441,0x00000002,0x00000004,
69710x00000006,0x00002e47,0x00002cc6,0x0000085c, 67750x00050080,0x00000006,0x000032da,0x000032b5,
69720x00050095,0x0000013d,0x00003457,0x00002f3b, 67760x000002a1,0x00050095,0x00000145,0x00003473,
69730x00002e47,0x00050051,0x00000006,0x00003458, 67770x0000339c,0x000032da,0x00050051,0x00000006,
69740x00003457,0x00000001,0x00050051,0x00000006, 67780x00003474,0x00003473,0x00000001,0x00050051,
69750x00003459,0x00003457,0x00000000,0x00050080, 67790x00000006,0x00003475,0x00003473,0x00000000,
69760x00000006,0x0000345e,0x00002f42,0x00003458, 67800x00050080,0x00000006,0x0000347a,0x000033a3,
69770x00050050,0x00000007,0x0000345f,0x00003459, 67810x00003474,0x00050050,0x00000007,0x0000347b,
69780x0000345e,0x0004007c,0x00000014,0x0000344f, 67820x00003475,0x0000347a,0x0004007c,0x00000014,
69790x0000345f,0x00060041,0x0000016c,0x00003447, 67830x0000346b,0x0000347b,0x00060041,0x00000174,
69800x0000344f,0x0000016b,0x0000016b,0x0005003e, 67840x00003462,0x0000346b,0x00000173,0x00000173,
69810x00003447,0x00000138,0x00000002,0x00000004, 67850x0006003d,0x00000006,0x00003463,0x00003462,
69820x000500b4,0x0000002f,0x00002e4c,0x00002ded, 67860x00000002,0x00000004,0x00050096,0x00000145,
69830x00000426,0x00060050,0x0000054d,0x00006121, 67870x00003484,0x000031a1,0x00003400,0x00050051,
69840x00002e4c,0x00002e4c,0x00002e4c,0x000600a9, 67880x00000006,0x00003485,0x00003484,0x00000001,
69850x0000006c,0x00006122,0x00006121,0x000060fe, 67890x00050051,0x00000006,0x00003486,0x00003484,
69860x00005ef3,0x000600a9,0x0000006c,0x00006124, 67900x00000000,0x00050082,0x00000006,0x0000348c,
69870x00006121,0x00000576,0x00005ecc,0x00050041, 67910x000031c2,0x00003421,0x00050082,0x00000006,
69880x000001bb,0x000034af,0x000001b9,0x000001ba, 67920x0000348e,0x0000348c,0x00003485,0x00050095,
69890x0004003d,0x00000006,0x000034b0,0x000034af, 67930x00000145,0x00003498,0x00003442,0x00003486,
69900x00050084,0x00000006,0x000034b1,0x000001db, 67940x00050051,0x00000006,0x00003499,0x00003498,
69910x000034b0,0x00050080,0x00000006,0x000034b2, 67950x00000001,0x00050051,0x00000006,0x0000349a,
69920x000001c4,0x000034b1,0x00050080,0x00000006, 67960x00003498,0x00000000,0x00050080,0x00000006,
69930x000034b8,0x000034b0,0x0000062f,0x00050086, 67970x000034a0,0x00003463,0x0000348e,0x00050080,
69940x00000006,0x000034b9,0x000034b8,0x000001be, 67980x00000006,0x000034a2,0x000034a0,0x00003499,
69950x00050084,0x00000006,0x000034ab,0x000001c4, 67990x00050050,0x00000007,0x000034a3,0x0000349a,
69960x000034b9,0x00050080,0x00000006,0x000034ac, 68000x000034a2,0x000200f9,0x000032e4,0x000200f8,
69970x000034b2,0x000034ab,0x00050080,0x00000006, 68010x000032e4,0x000700f5,0x00000007,0x000062a4,
69980x000034a6,0x000034ac,0x000034ab,0x00050084, 68020x00002f9f,0x000033de,0x000034a3,0x000032c9,
69990x00000006,0x00003476,0x000001ef,0x000012dd, 68030x000200f9,0x000032e5,0x000200f8,0x000032e5,
70000x00050080,0x00000006,0x00003477,0x000034a6, 68040x000700f5,0x00000007,0x000062a0,0x00002f9f,
70010x00003476,0x00050041,0x00000266,0x00003478, 68050x000032af,0x000062a4,0x000032e4,0x000700f5,
70020x000001b9,0x00000264,0x0004003d,0x00000007, 68060x0000002f,0x0000629a,0x0000037d,0x000032af,
70030x00003479,0x00003478,0x00050051,0x00000027, 68070x000033df,0x000032e4,0x000400a8,0x0000002f,
70040x0000347c,0x00006124,0x00000000,0x0004007c, 68080x000032e7,0x0000629a,0x000300f7,0x000032ed,
70050x00000006,0x000034c6,0x0000347c,0x00050051, 68090x00000000,0x000400fa,0x000032e7,0x000032e8,
70060x00000006,0x000034df,0x00003479,0x00000000, 68100x000032ed,0x000200f8,0x000032e8,0x00050041,
70070x00050095,0x0000013d,0x000034e1,0x000034df, 68110x0000026e,0x000032e9,0x000001c1,0x0000032d,
70080x00003477,0x00050051,0x00000006,0x000034e2, 68120x0004003d,0x00000007,0x000032ea,0x000032e9,
70090x000034e1,0x00000001,0x00050051,0x00000006, 68130x00050051,0x00000006,0x000034a7,0x000032ea,
70100x000034e3,0x000034e1,0x00000000,0x00050051, 68140x00000000,0x000500aa,0x0000002f,0x000034a8,
70110x00000006,0x000034e6,0x00003479,0x00000001, 68150x000034a7,0x00000140,0x000300f7,0x000034ad,
70120x00050080,0x00000006,0x000034e8,0x000034e6, 68160x00000000,0x000400fa,0x000034a8,0x000034a9,
70130x000034e2,0x00050050,0x00000007,0x000034e9, 68170x000034ad,0x000200f8,0x000034a9,0x00050051,
70140x000034e3,0x000034e8,0x0004007c,0x00000014, 68180x00000006,0x000034ab,0x000032ea,0x00000001,
70150x000034d9,0x000034e9,0x00060041,0x0000016c, 68190x000500aa,0x0000002f,0x000034ac,0x000034ab,
70160x000034d1,0x000034d9,0x0000016b,0x0000016b, 68200x00000140,0x000200f9,0x000034ad,0x000200f8,
70170x0005003e,0x000034d1,0x000034c6,0x00000002, 68210x000034ad,0x000700f5,0x0000002f,0x000034ae,
70180x00000004,0x00050080,0x00000006,0x0000347f, 68220x000034a8,0x000032e8,0x000034ac,0x000034a9,
70190x00003477,0x000000ec,0x00050051,0x00000027, 68230x000400a8,0x0000002f,0x000032ec,0x000034ae,
70200x00003483,0x00006124,0x00000001,0x0004007c, 68240x000200f9,0x000032ed,0x000200f8,0x000032ed,
70210x00000006,0x000034ef,0x00003483,0x00050095, 68250x000700f5,0x0000002f,0x000032ee,0x000032e7,
70220x0000013d,0x0000350a,0x000034df,0x0000347f, 68260x000032e5,0x000032ec,0x000034ad,0x000300f7,
70230x00050051,0x00000006,0x0000350b,0x0000350a, 68270x000032f4,0x00000000,0x000400fa,0x000032ee,
70240x00000001,0x00050051,0x00000006,0x0000350c, 68280x000032ef,0x000032f4,0x000200f8,0x000032ef,
70250x0000350a,0x00000000,0x00050080,0x00000006, 68290x00050041,0x0000026e,0x000032f0,0x000001c1,
70260x00003511,0x000034e6,0x0000350b,0x00050050, 68300x0000032d,0x0004003d,0x00000007,0x000032f1,
70270x00000007,0x00003512,0x0000350c,0x00003511, 68310x000032f0,0x00050051,0x00000006,0x000034b2,
70280x0004007c,0x00000014,0x00003502,0x00003512, 68320x000032f1,0x00000001,0x000500b0,0x0000002f,
70290x00060041,0x0000016c,0x000034fa,0x00003502, 68330x000034b5,0x000034b2,0x0000336c,0x000400a8,
70300x0000016b,0x0000016b,0x0005003e,0x000034fa, 68340x0000002f,0x000034b6,0x000034b5,0x000300f7,
70310x000034ef,0x00000002,0x00000004,0x00050080, 68350x000034c5,0x00000000,0x000400fa,0x000034b6,
70320x00000006,0x00003486,0x00003477,0x000001cd, 68360x000034b7,0x000034c5,0x000200f8,0x000034b7,
70330x00050051,0x00000027,0x0000348a,0x00006124, 68370x000500aa,0x0000002f,0x000034bc,0x000034b2,
70340x00000002,0x0004007c,0x00000006,0x00003518, 68380x0000336c,0x000300f7,0x000034c3,0x00000000,
70350x0000348a,0x00050095,0x0000013d,0x00003533, 68390x000400fa,0x000034bc,0x000034bd,0x000034c3,
70360x000034df,0x00003486,0x00050051,0x00000006, 68400x000200f8,0x000034bd,0x00050051,0x00000006,
70370x00003534,0x00003533,0x00000001,0x00050051, 68410x000034bf,0x000032f1,0x00000000,0x000500b0,
70380x00000006,0x00003535,0x00003533,0x00000000, 68420x0000002f,0x000034c2,0x000034bf,0x00003367,
70390x00050080,0x00000006,0x0000353a,0x000034e6, 68430x000200f9,0x000034c3,0x000200f8,0x000034c3,
70400x00003534,0x00050050,0x00000007,0x0000353b, 68440x000700f5,0x0000002f,0x000034c4,0x000034bc,
70410x00003535,0x0000353a,0x0004007c,0x00000014, 68450x000034b7,0x000034c2,0x000034bd,0x000200f9,
70420x0000352b,0x0000353b,0x00060041,0x0000016c, 68460x000034c5,0x000200f8,0x000034c5,0x000700f5,
70430x00003523,0x0000352b,0x0000016b,0x0000016b, 68470x0000002f,0x000034c6,0x000034b5,0x000032ef,
70440x0005003e,0x00003523,0x00003518,0x00000002, 68480x000034c4,0x000034c3,0x000200f9,0x000032f4,
70450x00000004,0x00050080,0x00000006,0x0000348d, 68490x000200f8,0x000032f4,0x000700f5,0x0000002f,
70460x00003477,0x000001d4,0x00050051,0x00000027, 68500x000032f5,0x000032ee,0x000032ed,0x000034c6,
70470x00003491,0x00006122,0x00000000,0x0004007c, 68510x000034c5,0x000300f7,0x000032f7,0x00000000,
70480x00000006,0x00003541,0x00003491,0x00050095, 68520x000400fa,0x000032f5,0x000032f6,0x000032f7,
70490x0000013d,0x0000355c,0x000034df,0x0000348d, 68530x000200f8,0x000032f6,0x000200f9,0x00003302,
70500x00050051,0x00000006,0x0000355d,0x0000355c, 68540x000200f8,0x000032f7,0x00050051,0x00000006,
70510x00000001,0x00050051,0x00000006,0x0000355e, 68550x000032f9,0x000062a0,0x00000000,0x000500c7,
70520x0000355c,0x00000000,0x00050080,0x00000006, 68560x00000006,0x000032fa,0x000032f9,0x00000695,
70530x00003563,0x000034e6,0x0000355d,0x00050050, 68570x000500aa,0x0000002f,0x000032fb,0x000032fa,
70540x00000007,0x00003564,0x0000355e,0x00003563, 68580x00000140,0x000300f7,0x00003300,0x00000000,
70550x0004007c,0x00000014,0x00003554,0x00003564, 68590x000400fa,0x000032fb,0x000032fc,0x00003300,
70560x00060041,0x0000016c,0x0000354c,0x00003554, 68600x000200f8,0x000032fc,0x00050051,0x00000006,
70570x0000016b,0x0000016b,0x0005003e,0x0000354c, 68610x000032fe,0x000062a0,0x00000001,0x000500b0,
70580x00003541,0x00000002,0x00000004,0x00050080, 68620x0000002f,0x000032ff,0x000032fe,0x000001c6,
70590x00000006,0x00003494,0x00003477,0x000001db, 68630x000200f9,0x00003300,0x000200f8,0x00003300,
70600x00050051,0x00000027,0x00003498,0x00006122, 68640x000700f5,0x0000002f,0x00003301,0x000032fb,
70610x00000001,0x0004007c,0x00000006,0x0000356a, 68650x000032f7,0x000032ff,0x000032fc,0x000200f9,
70620x00003498,0x00050095,0x0000013d,0x00003585, 68660x00003302,0x000200f8,0x00003302,0x000d00f5,
70630x000034df,0x00003494,0x00050051,0x00000006, 68670x00000007,0x000062ab,0x00002f9f,0x00003284,
70640x00003586,0x00003585,0x00000001,0x00050051, 68680x00002f9f,0x000032ae,0x00002f9f,0x000032c8,
70650x00000006,0x00003587,0x00003585,0x00000000, 68690x000062a0,0x000032f6,0x000062a0,0x00003300,
70660x00050080,0x00000006,0x0000358c,0x000034e6, 68700x000d00f5,0x0000002f,0x000062aa,0x00000444,
70670x00003586,0x00050050,0x00000007,0x0000358d, 68710x00003284,0x0000037d,0x000032ae,0x0000037d,
70680x00003587,0x0000358c,0x0004007c,0x00000014, 68720x000032c8,0x0000037d,0x000032f6,0x00003301,
70690x0000357d,0x0000358d,0x00060041,0x0000016c, 68730x00003300,0x000200f9,0x00002fce,0x000200f8,
70700x00003575,0x0000357d,0x0000016b,0x0000016b, 68740x00002fce,0x000700f5,0x00000007,0x000062af,
70710x0005003e,0x00003575,0x0000356a,0x00000002, 68750x00002f9f,0x0000324d,0x000062ab,0x00003302,
70720x00000004,0x00050080,0x00000006,0x0000349b, 68760x000700f5,0x0000002f,0x00002fcf,0x00002fc9,
70730x00003477,0x00000299,0x00050051,0x00000027, 68770x0000324d,0x000062aa,0x00003302,0x000300f7,
70740x0000349f,0x00006122,0x00000002,0x0004007c, 68780x00003066,0x00000000,0x000400fa,0x00002fcf,
70750x00000006,0x00003593,0x0000349f,0x00050095, 68790x00002fd1,0x00003066,0x000200f8,0x00002fd1,
70760x0000013d,0x000035ae,0x000034df,0x0000349b, 68800x00050041,0x0000026e,0x00002fd3,0x000001c1,
70770x00050051,0x00000006,0x000035af,0x000035ae, 68810x00000335,0x0004003d,0x00000007,0x00002fd4,
70780x00000001,0x00050051,0x00000006,0x000035b0, 68820x00002fd3,0x00050051,0x00000006,0x000034cc,
70790x000035ae,0x00000000,0x00050080,0x00000006, 68830x000062af,0x00000000,0x00050051,0x00000006,
70800x000035b5,0x000034e6,0x000035af,0x00050050, 68840x000034ce,0x00002fd4,0x00000000,0x00050095,
70810x00000007,0x000035b6,0x000035b0,0x000035b5, 68850x00000145,0x000034cf,0x000034cc,0x000034ce,
70820x0004007c,0x00000014,0x000035a6,0x000035b6, 68860x00050051,0x00000006,0x000034d0,0x000034cf,
70830x00060041,0x0000016c,0x0000359e,0x000035a6, 68870x00000001,0x00050051,0x00000006,0x000034d1,
70840x0000016b,0x0000016b,0x0005003e,0x0000359e, 68880x000034cf,0x00000000,0x00050051,0x00000006,
70850x00003593,0x00000002,0x00000004,0x000300f7, 68890x000034d4,0x000062af,0x00000001,0x00050051,
70860x000035f6,0x00000000,0x000300fb,0x00000138, 68900x00000006,0x000034d6,0x00002fd4,0x00000001,
70870x000035c5,0x000200f8,0x000035c5,0x000500bc, 68910x00050080,0x00000006,0x000034d7,0x000034d4,
70880x0000002f,0x000035fd,0x0000347c,0x00003491, 68920x000034d6,0x00050080,0x00000006,0x000034d9,
70890x000300f7,0x00003604,0x00000000,0x000400fa, 68930x000034d7,0x000034d0,0x00050095,0x00000145,
70900x000035fd,0x000035fe,0x00003604,0x000200f8, 68940x000034f3,0x000034d1,0x00000588,0x00050051,
70910x000035fe,0x000500bc,0x0000002f,0x00003603, 68950x00000006,0x000034f4,0x000034f3,0x00000001,
70920x00003483,0x00003498,0x000200f9,0x00003604, 68960x00050051,0x00000006,0x000034f5,0x000034f3,
70930x000200f8,0x00003604,0x000700f5,0x0000002f, 68970x00000000,0x00050080,0x00000006,0x000034fa,
70940x00003605,0x000035fd,0x000035c5,0x00003603, 68980x000034d9,0x000034f4,0x00050050,0x00000007,
70950x000035fe,0x000300f7,0x0000360c,0x00000000, 68990x000034fb,0x000034f5,0x000034fa,0x0004007c,
70960x000400fa,0x00003605,0x00003606,0x0000360c, 69000x00000014,0x000034eb,0x000034fb,0x00060041,
70970x000200f8,0x00003606,0x000500bc,0x0000002f, 69010x00000174,0x000034e2,0x000034eb,0x00000173,
70980x0000360b,0x0000348a,0x0000349f,0x000200f9, 69020x00000173,0x0006003d,0x00000006,0x000034e3,
70990x0000360c,0x000200f8,0x0000360c,0x000700f5, 69030x000034e2,0x00000002,0x00000004,0x00050095,
71000x0000002f,0x0000360d,0x00003605,0x00003604, 69040x00000145,0x00003514,0x000034d1,0x000001e3,
71010x0000360b,0x00003606,0x000400a8,0x0000002f, 69050x00050051,0x00000006,0x00003515,0x00003514,
71020x0000360e,0x0000360d,0x000300f7,0x000035ca, 69060x00000001,0x00050051,0x00000006,0x00003516,
71030x00000000,0x000400fa,0x0000360e,0x000035c9, 69070x00003514,0x00000000,0x00050080,0x00000006,
71040x000035ca,0x000200f8,0x000035c9,0x000200f9, 69080x0000351b,0x000034d9,0x00003515,0x00050050,
71050x000035f6,0x000200f8,0x000035ca,0x00050081, 69090x00000007,0x0000351c,0x00003516,0x0000351b,
71060x0000006c,0x000035cd,0x00006124,0x00006122, 69100x0004007c,0x00000014,0x0000350c,0x0000351c,
71070x0005008e,0x0000006c,0x000035ce,0x000035cd, 69110x00060041,0x00000174,0x00003503,0x0000350c,
71080x000002fd,0x00050095,0x0000013d,0x0000361e, 69120x00000173,0x00000173,0x0006003d,0x00000006,
71090x000034df,0x00000138,0x00050051,0x00000006, 69130x00003504,0x00003503,0x00000002,0x00000004,
71100x0000361f,0x0000361e,0x00000001,0x00050051, 69140x0004007c,0x00000027,0x00002fda,0x00003504,
71110x00000006,0x00003620,0x0000361e,0x00000000, 69150x00050095,0x00000145,0x00003535,0x000034d1,
71120x00050080,0x00000006,0x00003625,0x000034e6, 69160x000002a1,0x00050051,0x00000006,0x00003536,
71130x0000361f,0x00050050,0x00000007,0x00003626, 69170x00003535,0x00000001,0x00050051,0x00000006,
71140x00003620,0x00003625,0x0004007c,0x00000014, 69180x00003537,0x00003535,0x00000000,0x00050080,
71150x00003616,0x00003626,0x00060041,0x0000016c, 69190x00000006,0x0000353c,0x000034d9,0x00003536,
71160x000035d3,0x00003616,0x0000016b,0x0000016b, 69200x00050050,0x00000007,0x0000353d,0x00003537,
71170x00050051,0x00000027,0x000035d5,0x000035ce, 69210x0000353c,0x0004007c,0x00000014,0x0000352d,
71180x00000000,0x0004007c,0x00000006,0x0000362c, 69220x0000353d,0x00060041,0x00000174,0x00003524,
71190x000035d5,0x000500c7,0x00000006,0x0000362e, 69230x0000352d,0x00000173,0x00000173,0x0006003d,
71200x0000362c,0x00000241,0x000500ab,0x0000002f, 69240x00000006,0x00003525,0x00003524,0x00000002,
71210x0000362f,0x0000362e,0x00000138,0x000300f7, 69250x00000004,0x0004007c,0x00000027,0x00002fdd,
71220x00003636,0x00000000,0x000400fa,0x0000362f, 69260x00003525,0x00050095,0x00000145,0x00003556,
71230x00003630,0x00003633,0x000200f8,0x00003633, 69270x000034d1,0x000001f7,0x00050051,0x00000006,
71240x000500c5,0x00000006,0x00003635,0x0000362c, 69280x00003557,0x00003556,0x00000001,0x00050051,
71250x00000241,0x000200f9,0x00003636,0x000200f8, 69290x00000006,0x00003558,0x00003556,0x00000000,
71260x00003630,0x000400c8,0x00000006,0x00003632, 69300x00050080,0x00000006,0x0000355d,0x000034d9,
71270x0000362c,0x000200f9,0x00003636,0x000200f8, 69310x00003557,0x00050050,0x00000007,0x0000355e,
71280x00003636,0x000700f5,0x00000006,0x00005f0e, 69320x00003558,0x0000355d,0x0004007c,0x00000014,
71290x00003632,0x00003630,0x00003635,0x00003633, 69330x0000354e,0x0000355e,0x00060041,0x00000174,
71300x000700ed,0x00000006,0x000035d7,0x000035d3, 69340x00003545,0x0000354e,0x00000173,0x00000173,
71310x00000142,0x00000138,0x00005f0e,0x00060041, 69350x0006003d,0x00000006,0x00003546,0x00003545,
71320x0000016c,0x000035d9,0x00003616,0x0000016b,
71330x00000264,0x00050051,0x00000027,0x000035db,
71340x000035ce,0x00000001,0x0004007c,0x00000006,
71350x0000363d,0x000035db,0x000500c7,0x00000006,
71360x0000363f,0x0000363d,0x00000241,0x000500ab,
71370x0000002f,0x00003640,0x0000363f,0x00000138,
71380x000300f7,0x00003647,0x00000000,0x000400fa,
71390x00003640,0x00003641,0x00003644,0x000200f8,
71400x00003644,0x000500c5,0x00000006,0x00003646,
71410x0000363d,0x00000241,0x000200f9,0x00003647,
71420x000200f8,0x00003641,0x000400c8,0x00000006,
71430x00003643,0x0000363d,0x000200f9,0x00003647,
71440x000200f8,0x00003647,0x000700f5,0x00000006,
71450x00005f0f,0x00003643,0x00003641,0x00003646,
71460x00003644,0x000700ed,0x00000006,0x000035dd,
71470x000035d9,0x00000142,0x00000138,0x00005f0f,
71480x00060041,0x0000016c,0x000035df,0x00003616,
71490x0000016b,0x00000315,0x00050051,0x00000027,
71500x000035e1,0x000035ce,0x00000002,0x0004007c,
71510x00000006,0x0000364e,0x000035e1,0x000500c7,
71520x00000006,0x00003650,0x0000364e,0x00000241,
71530x000500ab,0x0000002f,0x00003651,0x00003650,
71540x00000138,0x000300f7,0x00003658,0x00000000,
71550x000400fa,0x00003651,0x00003652,0x00003655,
71560x000200f8,0x00003655,0x000500c5,0x00000006,
71570x00003657,0x0000364e,0x00000241,0x000200f9,
71580x00003658,0x000200f8,0x00003652,0x000400c8,
71590x00000006,0x00003654,0x0000364e,0x000200f9,
71600x00003658,0x000200f8,0x00003658,0x000700f5,
71610x00000006,0x00005f10,0x00003654,0x00003652,
71620x00003657,0x00003655,0x000700ed,0x00000006,
71630x000035e3,0x000035df,0x00000142,0x00000138,
71640x00005f10,0x00060041,0x0000016c,0x000035e5,
71650x00003616,0x0000016b,0x0000031d,0x000300f7,
71660x00003669,0x00000000,0x000400fa,0x0000362f,
71670x00003663,0x00003666,0x000200f8,0x00003666,
71680x000500c5,0x00000006,0x00003668,0x0000362c,
71690x00000241,0x000200f9,0x00003669,0x000200f8,
71700x00003663,0x000400c8,0x00000006,0x00003665,
71710x0000362c,0x000200f9,0x00003669,0x000200f8,
71720x00003669,0x000700f5,0x00000006,0x00005f11,
71730x00003665,0x00003663,0x00003668,0x00003666,
71740x000700ef,0x00000006,0x000035e9,0x000035e5,
71750x00000142,0x00000138,0x00005f11,0x00060041,
71760x0000016c,0x000035eb,0x00003616,0x0000016b,
71770x00000325,0x000300f7,0x0000367a,0x00000000,
71780x000400fa,0x00003640,0x00003674,0x00003677,
71790x000200f8,0x00003677,0x000500c5,0x00000006,
71800x00003679,0x0000363d,0x00000241,0x000200f9,
71810x0000367a,0x000200f8,0x00003674,0x000400c8,
71820x00000006,0x00003676,0x0000363d,0x000200f9,
71830x0000367a,0x000200f8,0x0000367a,0x000700f5,
71840x00000006,0x00005f12,0x00003676,0x00003674,
71850x00003679,0x00003677,0x000700ef,0x00000006,
71860x000035ef,0x000035eb,0x00000142,0x00000138,
71870x00005f12,0x00060041,0x0000016c,0x000035f1,
71880x00003616,0x0000016b,0x0000032d,0x000300f7,
71890x0000368b,0x00000000,0x000400fa,0x00003651,
71900x00003685,0x00003688,0x000200f8,0x00003688,
71910x000500c5,0x00000006,0x0000368a,0x0000364e,
71920x00000241,0x000200f9,0x0000368b,0x000200f8,
71930x00003685,0x000400c8,0x00000006,0x00003687,
71940x0000364e,0x000200f9,0x0000368b,0x000200f8,
71950x0000368b,0x000700f5,0x00000006,0x00005f13,
71960x00003687,0x00003685,0x0000368a,0x00003688,
71970x000700ef,0x00000006,0x000035f5,0x000035f1,
71980x00000142,0x00000138,0x00005f13,0x000200f9,
71990x000035f6,0x000200f8,0x000035f6,0x000200f9,
72000x000013c7,0x000200f8,0x000013c7,0x000200f9,
72010x000013be,0x000200f8,0x000013bd,0x000200f9,
72020x00002608,0x000200f8,0x00002608,0x000700f5,
72030x00000006,0x00005f20,0x00000138,0x000013bd,
72040x00002618,0x00002616,0x000500b0,0x0000002f,
72050x0000260b,0x00005f20,0x00000470,0x000400f6,
72060x00002619,0x00002616,0x00000000,0x000400fa,
72070x0000260b,0x0000260c,0x00002619,0x000200f8,
72080x0000260c,0x00050084,0x00000006,0x0000260f,
72090x00000470,0x000012dd,0x00050080,0x00000006,
72100x00002611,0x0000260f,0x00005f20,0x000300f7,
72110x000026d4,0x00000000,0x000300fb,0x00000138,
72120x000026b2,0x000200f8,0x000026b2,0x00050041,
72130x000001bb,0x000026b3,0x000001b9,0x00000434,
72140x0004003d,0x00000006,0x000026b4,0x000026b3,
72150x000500aa,0x0000002f,0x000026b5,0x000026b4,
72160x00000138,0x000300f7,0x000026b8,0x00000000,
72170x000400fa,0x000026b5,0x000026b6,0x000026b8,
72180x000200f8,0x000026b6,0x000200f9,0x000026d4,
72190x000200f8,0x000026b8,0x000500aa,0x0000002f,
72200x000026bb,0x000026b4,0x00000280,0x000300f7,
72210x000026c2,0x00000000,0x000400fa,0x000026bb,
72220x000026bc,0x000026c2,0x000200f8,0x000026bc,
72230x00050084,0x00000006,0x000026be,0x000000ec,
72240x00002611,0x00050041,0x00000266,0x000026bf,
72250x000001b9,0x0000031d,0x0004003d,0x00000007,
72260x000026c0,0x000026bf,0x00050051,0x00000006,
72270x000026ec,0x000026c0,0x00000000,0x00050095,
72280x0000013d,0x000026ee,0x000026ec,0x000026be,
72290x00050051,0x00000006,0x000026ef,0x000026ee,
72300x00000001,0x00050051,0x00000006,0x000026f0,
72310x000026ee,0x00000000,0x00050051,0x00000006,
72320x000026f3,0x000026c0,0x00000001,0x00050080,
72330x00000006,0x000026f5,0x000026f3,0x000026ef,
72340x00050050,0x00000007,0x000026f6,0x000026f0,
72350x000026f5,0x0004007c,0x00000014,0x000026e6,
72360x000026f6,0x00060041,0x0000016c,0x000026dd,
72370x000026e6,0x0000016b,0x0000016b,0x0006003d,
72380x00000006,0x000026de,0x000026dd,0x00000002,
72390x00000004,0x000200f9,0x000026d4,0x000200f8,
72400x000026c2,0x000500c2,0x00000006,0x000026c4,
72410x00002611,0x00000264,0x00050084,0x00000006,
72420x000026c5,0x000000ec,0x000026c4,0x00050041,
72430x00000266,0x000026c6,0x000001b9,0x0000031d,
72440x0004003d,0x00000007,0x000026c7,0x000026c6,
72450x00050051,0x00000006,0x0000270d,0x000026c7,
72460x00000000,0x00050095,0x0000013d,0x0000270f,
72470x0000270d,0x000026c5,0x00050051,0x00000006,
72480x00002710,0x0000270f,0x00000001,0x00050051,
72490x00000006,0x00002711,0x0000270f,0x00000000,
72500x00050051,0x00000006,0x00002714,0x000026c7,
72510x00000001,0x00050080,0x00000006,0x00002716,
72520x00002714,0x00002710,0x00050050,0x00000007,
72530x00002717,0x00002711,0x00002716,0x0004007c,
72540x00000014,0x00002707,0x00002717,0x00060041,
72550x0000016c,0x000026fe,0x00002707,0x0000016b,
72560x0000016b,0x0006003d,0x00000006,0x000026ff,
72570x000026fe,0x00000002,0x00000004,0x000500c7,
72580x00000006,0x000026ca,0x00002611,0x00000142,
72590x000500ab,0x0000002f,0x000026cb,0x000026ca,
72600x00000138,0x000300f7,0x000026d2,0x00000000,
72610x000400fa,0x000026cb,0x000026cc,0x000026cf,
72620x000200f8,0x000026cf,0x000500c7,0x00000006,
72630x000026d1,0x000026ff,0x0000045c,0x000200f9,
72640x000026d2,0x000200f8,0x000026cc,0x000500c2,
72650x00000006,0x000026ce,0x000026ff,0x0000035a,
72660x000200f9,0x000026d2,0x000200f8,0x000026d2,
72670x000700f5,0x00000006,0x00005f2a,0x000026ce,
72680x000026cc,0x000026d1,0x000026cf,0x000200f9,
72690x000026d4,0x000200f8,0x000026d4,0x000900f5,
72700x00000006,0x00005f2b,0x00002611,0x000026b6,
72710x000026de,0x000026bc,0x00005f2a,0x000026d2,
72720x00050041,0x000001bb,0x00002728,0x000001b9,
72730x00000206,0x0004003d,0x00000006,0x00002729,
72740x00002728,0x00050084,0x00000006,0x0000272a,
72750x00005f2b,0x00002729,0x00050041,0x00000266,
72760x0000272b,0x000001b9,0x00000315,0x0004003d,
72770x00000007,0x0000272c,0x0000272b,0x00050051,
72780x00000006,0x00002747,0x0000272c,0x00000000,
72790x00050095,0x0000013d,0x00002749,0x00002747,
72800x0000272a,0x00050051,0x00000006,0x0000274a,
72810x00002749,0x00000001,0x00050051,0x00000006,
72820x0000274b,0x00002749,0x00000000,0x00050051,
72830x00000006,0x0000274e,0x0000272c,0x00000001,
72840x00050080,0x00000006,0x00002750,0x0000274e,
72850x0000274a,0x00050095,0x0000013d,0x0000276a,
72860x0000274b,0x00000138,0x00050051,0x00000006,
72870x0000276b,0x0000276a,0x00000001,0x00050051,
72880x00000006,0x0000276c,0x0000276a,0x00000000,
72890x00050080,0x00000006,0x00002771,0x00002750,
72900x0000276b,0x00050050,0x00000007,0x00002772,
72910x0000276c,0x00002771,0x0004007c,0x00000014,
72920x00002762,0x00002772,0x00060041,0x0000016c,
72930x00002759,0x00002762,0x0000016b,0x0000016b,
72940x0006003d,0x00000006,0x0000275a,0x00002759,
72950x00000002,0x00000004,0x0004007c,0x00000027, 69360x00000002,0x00000004,0x0004007c,0x00000027,
72960x00002730,0x0000275a,0x00050095,0x0000013d, 69370x00002fe0,0x00003546,0x00050095,0x00000145,
72970x0000278b,0x0000274b,0x000000ec,0x00050051, 69380x00003577,0x000034d1,0x0000073f,0x00050051,
72980x00000006,0x0000278c,0x0000278b,0x00000001, 69390x00000006,0x00003578,0x00003577,0x00000001,
72990x00050051,0x00000006,0x0000278d,0x0000278b, 69400x00050051,0x00000006,0x00003579,0x00003577,
73000x00000000,0x00050080,0x00000006,0x00002792, 69410x00000000,0x00050080,0x00000006,0x0000357e,
73010x00002750,0x0000278c,0x00050050,0x00000007, 69420x000034d9,0x00003578,0x00050050,0x00000007,
73020x00002793,0x0000278d,0x00002792,0x0004007c, 69430x0000357f,0x00003579,0x0000357e,0x0004007c,
73030x00000014,0x00002783,0x00002793,0x00060041, 69440x00000014,0x0000356f,0x0000357f,0x00060041,
73040x0000016c,0x0000277a,0x00002783,0x0000016b, 69450x00000174,0x00003566,0x0000356f,0x00000173,
73050x0000016b,0x0006003d,0x00000006,0x0000277b, 69460x00000173,0x0006003d,0x00000006,0x00003567,
73060x0000277a,0x00000002,0x00000004,0x0004007c, 69470x00003566,0x00000002,0x00000004,0x0004007c,
73070x00000027,0x00002733,0x0000277b,0x00050041, 69480x00000027,0x00002fe4,0x00003567,0x00050095,
73080x000001bb,0x00002734,0x000001b9,0x000003b6, 69490x00000145,0x00003598,0x000034d1,0x0000020d,
73090x0004003d,0x00000006,0x00002735,0x00002734, 69500x00050051,0x00000006,0x00003599,0x00003598,
73100x000500aa,0x0000002f,0x00002736,0x00002735, 69510x00000001,0x00050051,0x00000006,0x0000359a,
73110x00000142,0x000300f7,0x0000273c,0x00000000, 69520x00003598,0x00000000,0x00050080,0x00000006,
73120x000400fa,0x00002736,0x00002737,0x00002738, 69530x0000359f,0x000034d9,0x00003599,0x00050050,
73130x000200f8,0x00002738,0x00050095,0x0000013d, 69540x00000007,0x000035a0,0x0000359a,0x0000359f,
73140x000027ac,0x0000274b,0x000001cd,0x00050051, 69550x0004007c,0x00000014,0x00003590,0x000035a0,
73150x00000006,0x000027ad,0x000027ac,0x00000001, 69560x00060041,0x00000174,0x00003587,0x00003590,
73160x00050051,0x00000006,0x000027ae,0x000027ac, 69570x00000173,0x00000173,0x0006003d,0x00000006,
73170x00000000,0x00050080,0x00000006,0x000027b3, 69580x00003588,0x00003587,0x00000002,0x00000004,
73180x00002750,0x000027ad,0x00050050,0x00000007, 69590x0004007c,0x00000027,0x00002fe7,0x00003588,
73190x000027b4,0x000027ae,0x000027b3,0x0004007c, 69600x00050095,0x00000145,0x000035b9,0x000034d1,
73200x00000014,0x000027a4,0x000027b4,0x00060041, 69610x00000567,0x00050051,0x00000006,0x000035ba,
73210x0000016c,0x0000279b,0x000027a4,0x0000016b, 69620x000035b9,0x00000001,0x00050051,0x00000006,
73220x0000016b,0x0006003d,0x00000006,0x0000279c, 69630x000035bb,0x000035b9,0x00000000,0x00050080,
73230x0000279b,0x00000002,0x00000004,0x0004007c, 69640x00000006,0x000035c0,0x000034d9,0x000035ba,
73240x00000027,0x0000273b,0x0000279c,0x000200f9, 69650x00050050,0x00000007,0x000035c1,0x000035bb,
73250x0000273c,0x000200f8,0x00002737,0x000200f9, 69660x000035c0,0x0004007c,0x00000014,0x000035b1,
73260x0000273c,0x000200f8,0x0000273c,0x000700f5, 69670x000035c1,0x00060041,0x00000174,0x000035a8,
73270x00000027,0x00005f2c,0x00000426,0x00002737, 69680x000035b1,0x00000173,0x00000173,0x0006003d,
73280x0000273b,0x00002738,0x00060050,0x0000006c, 69690x00000006,0x000035a9,0x000035a8,0x00000002,
73290x00002741,0x00002730,0x00002733,0x00005f2c, 69700x00000004,0x0004007c,0x00000027,0x00002fea,
73300x000300f7,0x000027fa,0x00000000,0x000300fb, 69710x000035a9,0x000500bc,0x0000002f,0x000035c8,
73310x00000138,0x000027c6,0x000200f8,0x000027c6, 69720x00002fda,0x00002fe4,0x000300f7,0x000035cf,
73320x00050041,0x00000266,0x000027c7,0x000001b9, 69730x00000000,0x000400fa,0x000035c8,0x000035c9,
73330x00000325,0x0004003d,0x00000007,0x000027c8, 69740x000035cf,0x000200f8,0x000035c9,0x000500bc,
73340x000027c7,0x00050051,0x00000006,0x000027ff, 69750x0000002f,0x000035ce,0x00002fdd,0x00002fe7,
73350x000027c8,0x00000000,0x000500aa,0x0000002f, 69760x000200f9,0x000035cf,0x000200f8,0x000035cf,
73360x00002800,0x000027ff,0x00000138,0x000300f7, 69770x000700f5,0x0000002f,0x000035d0,0x000035c8,
73370x00002805,0x00000000,0x000400fa,0x00002800, 69780x00002fd1,0x000035ce,0x000035c9,0x000300f7,
73380x00002801,0x00002805,0x000200f8,0x00002801, 69790x000035d7,0x00000000,0x000400fa,0x000035d0,
73390x00050051,0x00000006,0x00002803,0x000027c8, 69800x000035d1,0x000035d7,0x000200f8,0x000035d1,
73400x00000001,0x000500aa,0x0000002f,0x00002804, 69810x000500bc,0x0000002f,0x000035d6,0x00002fe0,
73410x00002803,0x00000138,0x000200f9,0x00002805, 69820x00002fea,0x000200f9,0x000035d7,0x000200f8,
73420x000200f8,0x00002805,0x000700f5,0x0000002f, 69830x000035d7,0x000700f5,0x0000002f,0x000035d8,
73430x00002806,0x00002800,0x000027c6,0x00002804, 69840x000035d0,0x000035cf,0x000035d6,0x000035d1,
73440x00002801,0x000300f7,0x000027cc,0x00000000, 69850x000300f7,0x00002ff4,0x00000000,0x000400fa,
73450x000400fa,0x00002806,0x000027ca,0x000027cc, 69860x000035d8,0x00002ff0,0x00002ff4,0x000200f8,
73460x000200f8,0x000027ca,0x000200f9,0x000027fa, 69870x00002ff0,0x000500c2,0x00000006,0x00002ff2,
73470x000200f8,0x000027cc,0x000200f9,0x000027cd, 69880x0000315f,0x00000759,0x000500ab,0x0000002f,
73480x000200f8,0x000027cd,0x000700f5,0x00000006, 69890x00002ff3,0x00002ff2,0x00000140,0x000200f9,
73490x00005f2d,0x00000138,0x000027cc,0x000027f7, 69900x00002ff4,0x000200f8,0x00002ff4,0x000700f5,
73500x000027d1,0x000500b0,0x0000002f,0x000027d0, 69910x0000002f,0x00002ff5,0x000035d8,0x000035d7,
73510x00005f2d,0x00000470,0x000400f6,0x000027f8, 69920x00002ff3,0x00002ff0,0x000300f7,0x00003065,
73520x000027d1,0x00000000,0x000400fa,0x000027d0, 69930x00000000,0x000400fa,0x00002ff5,0x00002ff6,
73530x000027d1,0x000027f8,0x000200f8,0x000027d1, 69940x00003065,0x000200f8,0x00002ff6,0x000200f9,
73540x00050084,0x00000006,0x000027d3,0x000001db, 69950x00002ff7,0x000200f8,0x00002ff7,0x000700f5,
73550x00005f2d,0x00050095,0x0000013d,0x0000281f, 69960x0000006c,0x00006333,0x00006532,0x00002ff6,
73560x000027ff,0x000027d3,0x00050051,0x00000006, 69970x00003060,0x00002ffb,0x000700f5,0x0000006c,
73570x00002820,0x0000281f,0x00000001,0x00050051, 69980x0000630c,0x000005dc,0x00002ff6,0x0000305d,
73580x00000006,0x00002821,0x0000281f,0x00000000, 69990x00002ffb,0x000700f5,0x00000006,0x000062b1,
73590x00050051,0x00000006,0x00002824,0x000027c8, 70000x00000140,0x00002ff6,0x00003063,0x00002ffb,
73600x00000001,0x00050080,0x00000006,0x00002826, 70010x000500b0,0x0000002f,0x00002ffa,0x000062b1,
73610x00002824,0x00002820,0x00050050,0x00000007, 70020x000001d5,0x000400f6,0x00003064,0x00002ffb,
73620x00002827,0x00002821,0x00002826,0x0004007c, 70030x00000000,0x000400fa,0x00002ffa,0x00002ffb,
73630x00000014,0x00002817,0x00002827,0x00060041, 70040x00003064,0x000200f8,0x00002ffb,0x000500c7,
73640x0000016c,0x0000280e,0x00002817,0x0000016b, 70050x00000006,0x00002ffd,0x000062b1,0x0000014a,
73650x0000016b,0x0006003d,0x00000006,0x0000280f, 70060x000500ab,0x0000002f,0x00002ffe,0x00002ffd,
73660x0000280e,0x00000002,0x00000004,0x0004007c, 70070x00000140,0x000600a9,0x00000027,0x00006551,
73670x00000027,0x000027d8,0x0000280f,0x00050080, 70080x00002ffe,0x00002fe4,0x00002fda,0x000500c7,
73680x00000006,0x000027da,0x000027d3,0x000000ec, 70090x00000006,0x00003008,0x000062b1,0x00000288,
73690x00050095,0x0000013d,0x00002840,0x000027ff, 70100x000500ab,0x0000002f,0x00003009,0x00003008,
73700x000027da,0x00050051,0x00000006,0x00002841, 70110x00000140,0x000600a9,0x00000027,0x00006552,
73710x00002840,0x00000001,0x00050051,0x00000006, 70120x00003009,0x00002fe7,0x00002fdd,0x000500c7,
73720x00002842,0x00002840,0x00000000,0x00050080, 70130x00000006,0x00003013,0x000062b1,0x000000f3,
73730x00000006,0x00002847,0x00002824,0x00002841, 70140x000500ab,0x0000002f,0x00003014,0x00003013,
73740x00050050,0x00000007,0x00002848,0x00002842, 70150x00000140,0x000600a9,0x00000027,0x00006553,
73750x00002847,0x0004007c,0x00000014,0x00002838, 70160x00003014,0x00002fea,0x00002fe0,0x00050041,
73760x00002848,0x00060041,0x0000016c,0x0000282f, 70170x00000028,0x0000301e,0x00002f0e,0x00000173,
73770x00002838,0x0000016b,0x0000016b,0x0006003d, 70180x0004003d,0x00000027,0x0000301f,0x0000301e,
73780x00000006,0x00002830,0x0000282f,0x00000002, 70190x00050085,0x00000027,0x00003022,0x0000301f,
73790x00000004,0x0004007c,0x00000027,0x000027de, 70200x00006551,0x00050041,0x00000028,0x00003023,
73800x00002830,0x00050080,0x00000006,0x000027e0, 70210x00002f0e,0x0000026c,0x0004003d,0x00000027,
73810x000027d3,0x000001cd,0x00050095,0x0000013d, 70220x00003024,0x00003023,0x00050085,0x00000027,
73820x00002861,0x000027ff,0x000027e0,0x00050051, 70230x00003027,0x00003024,0x00006552,0x00050081,
73830x00000006,0x00002862,0x00002861,0x00000001, 70240x00000027,0x00003028,0x00003022,0x00003027,
73840x00050051,0x00000006,0x00002863,0x00002861, 70250x00050041,0x00000028,0x00003029,0x00002f0e,
73850x00000000,0x00050080,0x00000006,0x00002868, 70260x0000031d,0x0004003d,0x00000027,0x0000302a,
73860x00002824,0x00002862,0x00050050,0x00000007, 70270x00003029,0x00050085,0x00000027,0x0000302d,
73870x00002869,0x00002863,0x00002868,0x0004007c, 70280x0000302a,0x00006553,0x00050081,0x00000027,
73880x00000014,0x00002859,0x00002869,0x00060041, 70290x0000302e,0x00003028,0x0000302d,0x00050041,
73890x0000016c,0x00002850,0x00002859,0x0000016b, 70300x00000028,0x0000302f,0x00002f0e,0x00000325,
73900x0000016b,0x0006003d,0x00000006,0x00002851, 70310x0004003d,0x00000027,0x00003030,0x0000302f,
73910x00002850,0x00000002,0x00000004,0x0004007c, 70320x00050081,0x00000027,0x00003031,0x0000302e,
73920x00000027,0x000027e4,0x00002851,0x00050080, 70330x00003030,0x00050041,0x00000028,0x00003032,
73930x00000006,0x000027e6,0x000027d3,0x000001d4, 70340x00002f0e,0x0000032d,0x0004003d,0x00000027,
73940x00050095,0x0000013d,0x00002882,0x000027ff, 70350x00003033,0x00003032,0x00050085,0x00000027,
73950x000027e6,0x00050051,0x00000006,0x00002883, 70360x00003036,0x00003033,0x00006551,0x00050041,
73960x00002882,0x00000001,0x00050051,0x00000006, 70370x00000028,0x00003037,0x00002f0e,0x00000335,
73970x00002884,0x00002882,0x00000000,0x00050080, 70380x0004003d,0x00000027,0x00003038,0x00003037,
73980x00000006,0x00002889,0x00002824,0x00002883, 70390x00050085,0x00000027,0x0000303b,0x00003038,
73990x00050050,0x00000007,0x0000288a,0x00002884, 70400x00006552,0x00050081,0x00000027,0x0000303c,
74000x00002889,0x0004007c,0x00000014,0x0000287a, 70410x00003036,0x0000303b,0x00050041,0x00000028,
74010x0000288a,0x00060041,0x0000016c,0x00002871, 70420x0000303d,0x00002f0e,0x00000359,0x0004003d,
74020x0000287a,0x0000016b,0x0000016b,0x0006003d, 70430x00000027,0x0000303e,0x0000303d,0x00050085,
74030x00000006,0x00002872,0x00002871,0x00000002, 70440x00000027,0x00003041,0x0000303e,0x00006553,
74040x00000004,0x0004007c,0x00000027,0x000027ea, 70450x00050081,0x00000027,0x00003042,0x0000303c,
74050x00002872,0x00070050,0x00000475,0x000027eb, 70460x00003041,0x00050041,0x00000028,0x00003043,
74060x000027d8,0x000027de,0x000027e4,0x000027ea, 70470x00002f0e,0x000007b3,0x0004003d,0x00000027,
74070x0008004f,0x0000006c,0x000027ee,0x000027eb, 70480x00003044,0x00003043,0x00050081,0x00000027,
74080x000027eb,0x00000000,0x00000001,0x00000002, 70490x00003045,0x00003042,0x00003044,0x00050041,
74090x00050094,0x00000027,0x000027f0,0x000027ee, 70500x00000028,0x00003046,0x00002f0e,0x00000528,
74100x00002741,0x00050081,0x00000027,0x000027f3, 70510x0004003d,0x00000027,0x00003047,0x00003046,
74110x000027f0,0x000027ea,0x00050041,0x00000028, 70520x00050085,0x00000027,0x0000304a,0x00003047,
74120x000027f4,0x000027c3,0x00005f2d,0x0003003e, 70530x00006551,0x00050041,0x00000028,0x0000304b,
74130x000027f4,0x000027f3,0x00050080,0x00000006, 70540x00002f0e,0x0000020e,0x0004003d,0x00000027,
74140x000027f7,0x00005f2d,0x00000264,0x000200f9, 70550x0000304c,0x0000304b,0x00050085,0x00000027,
74150x000027cd,0x000200f8,0x000027f8,0x0004003d, 70560x0000304f,0x0000304c,0x00006552,0x00050081,
74160x0000006c,0x000027f9,0x000027c3,0x000200f9, 70570x00000027,0x00003050,0x0000304a,0x0000304f,
74170x000027fa,0x000200f8,0x000027fa,0x000700f5, 70580x00050041,0x00000028,0x00003051,0x00002f0e,
74180x0000006c,0x00005f2e,0x00002741,0x000027ca, 70590x00000414,0x0004003d,0x00000027,0x00003052,
74190x000027f9,0x000027f8,0x00050041,0x0000006d, 70600x00003051,0x00050085,0x00000027,0x00003055,
74200x00002615,0x000025da,0x00005f20,0x0003003e, 70610x00003052,0x00006553,0x00050081,0x00000027,
74210x00002615,0x00005f2e,0x000200f9,0x00002616, 70620x00003056,0x00003050,0x00003055,0x00050041,
74220x000200f8,0x00002616,0x00050080,0x00000006, 70630x00000028,0x00003057,0x00002f0e,0x0000049b,
74230x00002618,0x00005f20,0x00000264,0x000200f9, 70640x0004003d,0x00000027,0x00003058,0x00003057,
74240x00002608,0x000200f8,0x00002619,0x00050041, 70650x00050081,0x00000027,0x00003059,0x00003056,
74250x000001bb,0x0000261a,0x000001b9,0x000004c1, 70660x00003058,0x00060050,0x0000006c,0x0000305a,
74260x0004003d,0x00000006,0x0000261b,0x0000261a, 70670x00003031,0x00003045,0x00003059,0x0007000c,
74270x00050080,0x00000006,0x0000261d,0x0000261b, 70680x0000006c,0x0000305d,0x00000001,0x00000025,
74280x000012dd,0x00050041,0x000001bb,0x0000261e, 70690x0000630c,0x0000305a,0x0007000c,0x0000006c,
74290x000001b9,0x0000034a,0x0004003d,0x00000006, 70700x00003060,0x00000001,0x00000028,0x00006333,
74300x0000261f,0x0000261e,0x00050084,0x00000006, 70710x0000305a,0x00050080,0x00000006,0x00003063,
74310x00002621,0x000001c4,0x0000261d,0x00050080, 70720x000062b1,0x0000026c,0x000200f9,0x00002ff7,
74320x00000006,0x00002622,0x0000261f,0x00002621, 70730x000200f8,0x00003064,0x000200f9,0x00003065,
74330x000200f9,0x00002623,0x000200f8,0x00002623, 70740x000200f8,0x00003065,0x000700f5,0x0000006c,
74340x000700f5,0x00000006,0x00005f21,0x00000138, 70750x0000632f,0x00006532,0x00002ff4,0x00006333,
74350x00002619,0x0000264a,0x00002627,0x000500b0, 70760x00003064,0x000700f5,0x0000006c,0x00006308,
74360x0000002f,0x00002626,0x00005f21,0x00000470, 70770x000005dc,0x00002ff4,0x0000630c,0x00003064,
74370x000400f6,0x0000264b,0x00002627,0x00000000, 70780x000200f9,0x00003066,0x000200f8,0x00003066,
74380x000400fa,0x00002626,0x00002627,0x0000264b, 70790x000700f5,0x0000006c,0x00006319,0x00006532,
74390x000200f8,0x00002627,0x00050084,0x00000006, 70800x00002fce,0x0000632f,0x00003065,0x000700f5,
74400x0000262a,0x000001d4,0x00005f21,0x00050080, 70810x0000006c,0x000062f2,0x000005dc,0x00002fce,
74410x00000006,0x0000262b,0x00002622,0x0000262a, 70820x00006308,0x00003065,0x000700f5,0x00000006,
74420x00050041,0x00000266,0x0000262d,0x000001b9, 70830x000062ba,0x000003bf,0x00002fce,0x000034e3,
74430x0000016b,0x0004003d,0x00000007,0x0000262e, 70840x00003065,0x00050041,0x00000028,0x00003067,
74440x0000262d,0x00060041,0x00000028,0x0000262f, 70850x00002f0e,0x00000173,0x0004003d,0x00000027,
74450x000025da,0x00005f21,0x00000138,0x0004003d, 70860x00003068,0x00003067,0x000500b4,0x0000002f,
74460x00000027,0x00002630,0x0000262f,0x0004007c, 70870x00003069,0x00003068,0x000007d7,0x000300f7,
74470x00000006,0x00002890,0x00002630,0x00050051, 70880x0000306e,0x00000000,0x000400fa,0x00003069,
74480x00000006,0x000028a9,0x0000262e,0x00000000, 70890x0000306a,0x0000306e,0x000200f8,0x0000306a,
74490x00050095,0x0000013d,0x000028ab,0x000028a9, 70900x00050041,0x00000028,0x0000306b,0x00002f0e,
74500x0000262b,0x00050051,0x00000006,0x000028ac, 70910x0000026c,0x0004003d,0x00000027,0x0000306c,
74510x000028ab,0x00000001,0x00050051,0x00000006, 70920x0000306b,0x000500b4,0x0000002f,0x0000306d,
74520x000028ad,0x000028ab,0x00000000,0x00050051, 70930x0000306c,0x0000048d,0x000200f9,0x0000306e,
74530x00000006,0x000028b0,0x0000262e,0x00000001, 70940x000200f8,0x0000306e,0x000700f5,0x0000002f,
74540x00050080,0x00000006,0x000028b2,0x000028b0, 70950x0000306f,0x00003069,0x00003066,0x0000306d,
74550x000028ac,0x00050050,0x00000007,0x000028b3, 70960x0000306a,0x000300f7,0x00003074,0x00000000,
74560x000028ad,0x000028b2,0x0004007c,0x00000014, 70970x000400fa,0x0000306f,0x00003070,0x00003074,
74570x000028a3,0x000028b3,0x00060041,0x0000016c, 70980x000200f8,0x00003070,0x00050041,0x00000028,
74580x0000289b,0x000028a3,0x0000016b,0x0000016b, 70990x00003071,0x00002f0e,0x0000031d,0x0004003d,
74590x0005003e,0x0000289b,0x00002890,0x00000002, 71000x00000027,0x00003072,0x00003071,0x000500b4,
74600x00000004,0x00050080,0x00000006,0x00002636, 71010x0000002f,0x00003073,0x00003072,0x0000048d,
74610x0000262b,0x000000ec,0x00060041,0x00000028, 71020x000200f9,0x00003074,0x000200f8,0x00003074,
74620x0000263a,0x000025da,0x00005f21,0x00000142, 71030x000700f5,0x0000002f,0x00003075,0x0000306f,
74630x0004003d,0x00000027,0x0000263b,0x0000263a, 71040x0000306e,0x00003073,0x00003070,0x000300f7,
74640x0004007c,0x00000006,0x000028b9,0x0000263b, 71050x0000307a,0x00000000,0x000400fa,0x00003075,
74650x00050095,0x0000013d,0x000028d4,0x000028a9, 71060x00003076,0x0000307a,0x000200f8,0x00003076,
74660x00002636,0x00050051,0x00000006,0x000028d5, 71070x00050041,0x00000028,0x00003077,0x00002f0e,
74670x000028d4,0x00000001,0x00050051,0x00000006, 71080x0000032d,0x0004003d,0x00000027,0x00003078,
74680x000028d6,0x000028d4,0x00000000,0x00050080, 71090x00003077,0x000500b4,0x0000002f,0x00003079,
74690x00000006,0x000028db,0x000028b0,0x000028d5, 71100x00003078,0x0000048d,0x000200f9,0x0000307a,
74700x00050050,0x00000007,0x000028dc,0x000028d6, 71110x000200f8,0x0000307a,0x000700f5,0x0000002f,
74710x000028db,0x0004007c,0x00000014,0x000028cc, 71120x0000307b,0x00003075,0x00003074,0x00003079,
74720x000028dc,0x00060041,0x0000016c,0x000028c4, 71130x00003076,0x000300f7,0x00003080,0x00000000,
74730x000028cc,0x0000016b,0x0000016b,0x0005003e, 71140x000400fa,0x0000307b,0x0000307c,0x00003080,
74740x000028c4,0x000028b9,0x00000002,0x00000004, 71150x000200f8,0x0000307c,0x00050041,0x00000028,
74750x00050080,0x00000006,0x00002641,0x0000262b, 71160x0000307d,0x00002f0e,0x00000335,0x0004003d,
74760x000001cd,0x00060041,0x00000028,0x00002645, 71170x00000027,0x0000307e,0x0000307d,0x000500b4,
74770x000025da,0x00005f21,0x00000280,0x0004003d, 71180x0000002f,0x0000307f,0x0000307e,0x000007d7,
74780x00000027,0x00002646,0x00002645,0x0004007c, 71190x000200f9,0x00003080,0x000200f8,0x00003080,
74790x00000006,0x000028e2,0x00002646,0x00050095, 71200x000700f5,0x0000002f,0x00003081,0x0000307b,
74800x0000013d,0x000028fd,0x000028a9,0x00002641, 71210x0000307a,0x0000307f,0x0000307c,0x000300f7,
74810x00050051,0x00000006,0x000028fe,0x000028fd, 71220x00003086,0x00000000,0x000400fa,0x00003081,
74820x00000001,0x00050051,0x00000006,0x000028ff, 71230x00003082,0x00003086,0x000200f8,0x00003082,
74830x000028fd,0x00000000,0x00050080,0x00000006, 71240x00050041,0x00000028,0x00003083,0x00002f0e,
74840x00002904,0x000028b0,0x000028fe,0x00050050, 71250x00000359,0x0004003d,0x00000027,0x00003084,
74850x00000007,0x00002905,0x000028ff,0x00002904, 71260x00003083,0x000500b4,0x0000002f,0x00003085,
74860x0004007c,0x00000014,0x000028f5,0x00002905, 71270x00003084,0x0000048d,0x000200f9,0x00003086,
74870x00060041,0x0000016c,0x000028ed,0x000028f5, 71280x000200f8,0x00003086,0x000700f5,0x0000002f,
74880x0000016b,0x0000016b,0x0005003e,0x000028ed, 71290x00003087,0x00003081,0x00003080,0x00003085,
74890x000028e2,0x00000002,0x00000004,0x00050080, 71300x00003082,0x000300f7,0x0000308c,0x00000000,
74900x00000006,0x0000264a,0x00005f21,0x00000264, 71310x000400fa,0x00003087,0x00003088,0x0000308c,
74910x000200f9,0x00002623,0x000200f8,0x0000264b, 71320x000200f8,0x00003088,0x00050041,0x00000028,
74920x00050080,0x00000006,0x0000264d,0x00002622, 71330x00003089,0x00002f0e,0x00000528,0x0004003d,
74930x00000500,0x00050041,0x00000266,0x0000264e, 71340x00000027,0x0000308a,0x00003089,0x000500b4,
74940x000001b9,0x0000016b,0x0004003d,0x00000007, 71350x0000002f,0x0000308b,0x0000308a,0x0000048d,
74950x0000264f,0x0000264e,0x00060041,0x00000028, 71360x000200f9,0x0000308c,0x000200f8,0x0000308c,
74960x00002650,0x000025da,0x00000315,0x00000138, 71370x000700f5,0x0000002f,0x0000308d,0x00003087,
74970x0004003d,0x00000027,0x00002651,0x00002650, 71380x00003086,0x0000308b,0x00003088,0x000300f7,
74980x0004007c,0x00000006,0x0000290b,0x00002651, 71390x00003092,0x00000000,0x000400fa,0x0000308d,
74990x00050051,0x00000006,0x00002924,0x0000264f, 71400x0000308e,0x00003092,0x000200f8,0x0000308e,
75000x00000000,0x00050095,0x0000013d,0x00002926, 71410x00050041,0x00000028,0x0000308f,0x00002f0e,
75010x00002924,0x0000264d,0x00050051,0x00000006, 71420x0000020e,0x0004003d,0x00000027,0x00003090,
75020x00002927,0x00002926,0x00000001,0x00050051, 71430x0000308f,0x000500b4,0x0000002f,0x00003091,
75030x00000006,0x00002928,0x00002926,0x00000000, 71440x00003090,0x0000048d,0x000200f9,0x00003092,
75040x00050051,0x00000006,0x0000292b,0x0000264f, 71450x000200f8,0x00003092,0x000700f5,0x0000002f,
75050x00000001,0x00050080,0x00000006,0x0000292d, 71460x00003093,0x0000308d,0x0000308c,0x00003091,
75060x0000292b,0x00002927,0x00050050,0x00000007, 71470x0000308e,0x000300f7,0x00003098,0x00000000,
75070x0000292e,0x00002928,0x0000292d,0x0004007c, 71480x000400fa,0x00003093,0x00003094,0x00003098,
75080x00000014,0x0000291e,0x0000292e,0x00060041, 71490x000200f8,0x00003094,0x00050041,0x00000028,
75090x0000016c,0x00002916,0x0000291e,0x0000016b, 71500x00003095,0x00002f0e,0x00000414,0x0004003d,
75100x0000016b,0x0005003e,0x00002916,0x0000290b, 71510x00000027,0x00003096,0x00003095,0x000500b4,
71520x0000002f,0x00003097,0x00003096,0x000007d7,
71530x000200f9,0x00003098,0x000200f8,0x00003098,
71540x000700f5,0x0000002f,0x00003099,0x00003093,
71550x00003092,0x00003097,0x00003094,0x00050080,
71560x00000006,0x0000309b,0x00002fa4,0x0000059e,
71570x000500c7,0x00000006,0x0000309d,0x000062ba,
71580x0000080c,0x000600a9,0x00000006,0x0000309f,
71590x00003099,0x00000249,0x00000140,0x000500c5,
71600x00000006,0x000030a0,0x0000309d,0x0000309f,
71610x00050095,0x00000145,0x000035f1,0x00003219,
71620x0000309b,0x00050051,0x00000006,0x000035f2,
71630x000035f1,0x00000001,0x00050051,0x00000006,
71640x000035f3,0x000035f1,0x00000000,0x00050080,
71650x00000006,0x000035f8,0x00003220,0x000035f2,
71660x00050050,0x00000007,0x000035f9,0x000035f3,
71670x000035f8,0x0004007c,0x00000014,0x000035e9,
71680x000035f9,0x00060041,0x00000174,0x000035e1,
71690x000035e9,0x00000173,0x00000173,0x0005003e,
71700x000035e1,0x000030a0,0x00000002,0x00000004,
71710x000400a8,0x0000002f,0x000030a5,0x00002fcf,
71720x00050050,0x00006554,0x00006555,0x000030a5,
71730x000030a5,0x000600a9,0x00000007,0x00006556,
71740x00006555,0x0000081b,0x000062af,0x00050080,
71750x00000006,0x000030a9,0x00002fa4,0x000005a7,
71760x00050051,0x00000006,0x000030ab,0x00006556,
71770x00000000,0x000500c2,0x00000006,0x000030ac,
71780x000030ab,0x00000528,0x00050051,0x00000006,
71790x000030ae,0x00006556,0x00000001,0x000500c4,
71800x00000006,0x000030af,0x000030ae,0x00000759,
71810x000500c5,0x00000006,0x000030b0,0x000030ac,
71820x000030af,0x00050095,0x00000145,0x00003611,
71830x00003219,0x000030a9,0x00050051,0x00000006,
71840x00003612,0x00003611,0x00000001,0x00050051,
71850x00000006,0x00003613,0x00003611,0x00000000,
71860x00050080,0x00000006,0x00003618,0x00003220,
71870x00003612,0x00050050,0x00000007,0x00003619,
71880x00003613,0x00003618,0x0004007c,0x00000014,
71890x00003609,0x00003619,0x00060041,0x00000174,
71900x00003601,0x00003609,0x00000173,0x00000173,
71910x0005003e,0x00003601,0x000030b0,0x00000002,
71920x00000004,0x0004003d,0x00000027,0x000030b5,
71930x00003067,0x00050041,0x00000028,0x000030b6,
71940x00002f0e,0x0000032d,0x0004003d,0x00000027,
71950x000030b7,0x000030b6,0x00050041,0x00000028,
71960x000030b8,0x00002f0e,0x00000528,0x0004003d,
71970x00000027,0x000030b9,0x000030b8,0x00050041,
71980x00000028,0x000030ba,0x00002f0e,0x0000026c,
71990x0004003d,0x00000027,0x000030bb,0x000030ba,
72000x00050041,0x00000028,0x000030bc,0x00002f0e,
72010x00000335,0x0004003d,0x00000027,0x000030bd,
72020x000030bc,0x00050041,0x00000028,0x000030be,
72030x00002f0e,0x0000020e,0x0004003d,0x00000027,
72040x000030bf,0x000030be,0x00050041,0x00000028,
72050x000030c0,0x00002f0e,0x0000031d,0x0004003d,
72060x00000027,0x000030c1,0x000030c0,0x00050041,
72070x00000028,0x000030c2,0x00002f0e,0x00000359,
72080x0004003d,0x00000027,0x000030c3,0x000030c2,
72090x00050041,0x00000028,0x000030c4,0x00002f0e,
72100x00000414,0x0004003d,0x00000027,0x000030c5,
72110x000030c4,0x00060050,0x0000006c,0x000030c6,
72120x000030b5,0x000030b7,0x000030b9,0x00060050,
72130x0000006c,0x000030c7,0x000030bb,0x000030bd,
72140x000030bf,0x00060050,0x0000006c,0x000030c8,
72150x000030c1,0x000030c3,0x000030c5,0x00060050,
72160x0000082b,0x000030c9,0x000030c6,0x000030c7,
72170x000030c8,0x0006000c,0x00000027,0x000030cb,
72180x00000001,0x00000021,0x000030c9,0x000500b7,
72190x0000002f,0x000030cd,0x000030cb,0x0000048d,
72200x000300f7,0x000030d2,0x00000000,0x000400fa,
72210x000030cd,0x000030ce,0x000030d1,0x000200f8,
72220x000030d1,0x000200f9,0x000030d2,0x000200f8,
72230x000030ce,0x0006000c,0x0000082b,0x000030d0,
72240x00000001,0x00000022,0x000030c9,0x000200f9,
72250x000030d2,0x000200f8,0x000030d2,0x000700f5,
72260x0000082b,0x000062e4,0x000030d0,0x000030ce,
72270x00000851,0x000030d1,0x0003003e,0x00002f53,
72280x000062e4,0x00050041,0x00000028,0x000030d4,
72290x00002f0e,0x00000325,0x0004003d,0x00000027,
72300x000030d5,0x000030d4,0x00050041,0x00000028,
72310x000030d6,0x00002f0e,0x000007b3,0x0004003d,
72320x00000027,0x000030d7,0x000030d6,0x00050041,
72330x00000028,0x000030d8,0x00002f0e,0x0000049b,
72340x0004003d,0x00000027,0x000030d9,0x000030d8,
72350x00060050,0x0000006c,0x000030da,0x000030d5,
72360x000030d7,0x000030d9,0x00050091,0x0000006c,
72370x000030dd,0x000062e4,0x000030da,0x0004007f,
72380x0000006c,0x000030de,0x000030dd,0x0003003e,
72390x00002f56,0x000030de,0x000200f9,0x000030df,
72400x000200f8,0x000030df,0x000700f5,0x00000006,
72410x000062e5,0x00000140,0x000030d2,0x00003112,
72420x000030e3,0x000500b0,0x0000002f,0x000030e2,
72430x000062e5,0x000004d7,0x000400f6,0x00003113,
72440x000030e3,0x00000000,0x000400fa,0x000030e2,
72450x000030e3,0x00003113,0x000200f8,0x000030e3,
72460x00050080,0x00000006,0x000030e5,0x00002fa4,
72470x000001cc,0x00050084,0x00000006,0x000030e7,
72480x000001e3,0x000062e5,0x00050080,0x00000006,
72490x000030e8,0x000030e5,0x000030e7,0x00060041,
72500x00000028,0x000030ec,0x00002f53,0x00000173,
72510x000062e5,0x0004003d,0x00000027,0x000030ed,
72520x000030ec,0x0004007c,0x00000006,0x0000361f,
72530x000030ed,0x00050095,0x00000145,0x0000363a,
72540x00003219,0x000030e8,0x00050051,0x00000006,
72550x0000363b,0x0000363a,0x00000001,0x00050051,
72560x00000006,0x0000363c,0x0000363a,0x00000000,
72570x00050080,0x00000006,0x00003641,0x00003220,
72580x0000363b,0x00050050,0x00000007,0x00003642,
72590x0000363c,0x00003641,0x0004007c,0x00000014,
72600x00003632,0x00003642,0x00060041,0x00000174,
72610x0000362a,0x00003632,0x00000173,0x00000173,
72620x0005003e,0x0000362a,0x0000361f,0x00000002,
72630x00000004,0x00050080,0x00000006,0x000030f0,
72640x00002fa4,0x00000877,0x00050080,0x00000006,
72650x000030f3,0x000030f0,0x000030e7,0x00060041,
72660x00000028,0x000030f7,0x00002f53,0x0000026c,
72670x000062e5,0x0004003d,0x00000027,0x000030f8,
72680x000030f7,0x0004007c,0x00000006,0x00003648,
72690x000030f8,0x00050095,0x00000145,0x00003663,
72700x00003219,0x000030f3,0x00050051,0x00000006,
72710x00003664,0x00003663,0x00000001,0x00050051,
72720x00000006,0x00003665,0x00003663,0x00000000,
72730x00050080,0x00000006,0x0000366a,0x00003220,
72740x00003664,0x00050050,0x00000007,0x0000366b,
72750x00003665,0x0000366a,0x0004007c,0x00000014,
72760x0000365b,0x0000366b,0x00060041,0x00000174,
72770x00003653,0x0000365b,0x00000173,0x00000173,
72780x0005003e,0x00003653,0x00003648,0x00000002,
72790x00000004,0x00050080,0x00000006,0x000030fb,
72800x00002fa4,0x00000886,0x00050080,0x00000006,
72810x000030fe,0x000030fb,0x000030e7,0x00060041,
72820x00000028,0x00003102,0x00002f53,0x0000031d,
72830x000062e5,0x0004003d,0x00000027,0x00003103,
72840x00003102,0x0004007c,0x00000006,0x00003671,
72850x00003103,0x00050095,0x00000145,0x0000368c,
72860x00003219,0x000030fe,0x00050051,0x00000006,
72870x0000368d,0x0000368c,0x00000001,0x00050051,
72880x00000006,0x0000368e,0x0000368c,0x00000000,
72890x00050080,0x00000006,0x00003693,0x00003220,
72900x0000368d,0x00050050,0x00000007,0x00003694,
72910x0000368e,0x00003693,0x0004007c,0x00000014,
72920x00003684,0x00003694,0x00060041,0x00000174,
72930x0000367c,0x00003684,0x00000173,0x00000173,
72940x0005003e,0x0000367c,0x00003671,0x00000002,
72950x00000004,0x00050080,0x00000006,0x00003106,
72960x00002fa4,0x00000895,0x00050080,0x00000006,
72970x00003109,0x00003106,0x000030e7,0x00050041,
72980x00000028,0x0000310d,0x00002f56,0x000062e5,
72990x0004003d,0x00000027,0x0000310e,0x0000310d,
73000x0004007c,0x00000006,0x0000369a,0x0000310e,
73010x00050095,0x00000145,0x000036b5,0x00003219,
73020x00003109,0x00050051,0x00000006,0x000036b6,
73030x000036b5,0x00000001,0x00050051,0x00000006,
73040x000036b7,0x000036b5,0x00000000,0x00050080,
73050x00000006,0x000036bc,0x00003220,0x000036b6,
73060x00050050,0x00000007,0x000036bd,0x000036b7,
73070x000036bc,0x0004007c,0x00000014,0x000036ad,
73080x000036bd,0x00060041,0x00000174,0x000036a5,
73090x000036ad,0x00000173,0x00000173,0x0005003e,
73100x000036a5,0x0000369a,0x00000002,0x00000004,
73110x00050080,0x00000006,0x00003112,0x000062e5,
73120x0000026c,0x000200f9,0x000030df,0x000200f8,
73130x00003113,0x00050080,0x00000006,0x00003115,
73140x00002fa4,0x000008a6,0x00050095,0x00000145,
73150x000036d5,0x00003219,0x00003115,0x00050051,
73160x00000006,0x000036d6,0x000036d5,0x00000001,
73170x00050051,0x00000006,0x000036d7,0x000036d5,
73180x00000000,0x00050080,0x00000006,0x000036dc,
73190x00003220,0x000036d6,0x00050050,0x00000007,
73200x000036dd,0x000036d7,0x000036dc,0x0004007c,
73210x00000014,0x000036cd,0x000036dd,0x00060041,
73220x00000174,0x000036c5,0x000036cd,0x00000173,
73230x00000173,0x0005003e,0x000036c5,0x000013a7,
75110x00000002,0x00000004,0x00050080,0x00000006, 73240x00000002,0x00000004,0x00050080,0x00000006,
75120x00002654,0x00002622,0x0000050b,0x00060041, 73250x0000311b,0x00002fa4,0x000008b0,0x00050095,
75130x00000028,0x00002657,0x000025da,0x00000315, 73260x00000145,0x000036f5,0x00003219,0x0000311b,
75140x00000142,0x0004003d,0x00000027,0x00002658, 73270x00050051,0x00000006,0x000036f6,0x000036f5,
75150x00002657,0x0004007c,0x00000006,0x00002934, 73280x00000001,0x00050051,0x00000006,0x000036f7,
75160x00002658,0x00050095,0x0000013d,0x0000294f, 73290x000036f5,0x00000000,0x00050080,0x00000006,
75170x00002924,0x00002654,0x00050051,0x00000006, 73300x000036fc,0x00003220,0x000036f6,0x00050050,
75180x00002950,0x0000294f,0x00000001,0x00050051, 73310x00000007,0x000036fd,0x000036f7,0x000036fc,
75190x00000006,0x00002951,0x0000294f,0x00000000, 73320x0004007c,0x00000014,0x000036ed,0x000036fd,
75200x00050080,0x00000006,0x00002956,0x0000292b, 73330x00060041,0x00000174,0x000036e5,0x000036ed,
75210x00002950,0x00050050,0x00000007,0x00002957, 73340x00000173,0x00000173,0x0005003e,0x000036e5,
75220x00002951,0x00002956,0x0004007c,0x00000014, 73350x000003bf,0x00000002,0x00000004,0x00050080,
75230x00002947,0x00002957,0x00060041,0x0000016c, 73360x00000006,0x00003120,0x00002fa4,0x000008b9,
75240x0000293f,0x00002947,0x0000016b,0x0000016b, 73370x00050095,0x00000145,0x00003715,0x00003219,
75250x0005003e,0x0000293f,0x00002934,0x00000002, 73380x00003120,0x00050051,0x00000006,0x00003716,
75260x00000004,0x00050080,0x00000006,0x0000265b, 73390x00003715,0x00000001,0x00050051,0x00000006,
75270x00002622,0x00000516,0x00060041,0x00000028, 73400x00003717,0x00003715,0x00000000,0x00050080,
75280x0000265e,0x000025da,0x00000315,0x00000280, 73410x00000006,0x0000371c,0x00003220,0x00003716,
75290x0004003d,0x00000027,0x0000265f,0x0000265e, 73420x00050050,0x00000007,0x0000371d,0x00003717,
75300x0004007c,0x00000006,0x0000295d,0x0000265f, 73430x0000371c,0x0004007c,0x00000014,0x0000370d,
75310x00050095,0x0000013d,0x00002978,0x00002924, 73440x0000371d,0x00060041,0x00000174,0x00003705,
75320x0000265b,0x00050051,0x00000006,0x00002979, 73450x0000370d,0x00000173,0x00000173,0x0005003e,
75330x00002978,0x00000001,0x00050051,0x00000006, 73460x00003705,0x00000140,0x00000002,0x00000004,
75340x0000297a,0x00002978,0x00000000,0x00050080, 73470x00050080,0x00000006,0x00003125,0x00002fa4,
75350x00000006,0x0000297f,0x0000292b,0x00002979, 73480x000008c2,0x00050095,0x00000145,0x00003735,
75360x00050050,0x00000007,0x00002980,0x0000297a, 73490x00003219,0x00003125,0x00050051,0x00000006,
75370x0000297f,0x0004007c,0x00000014,0x00002970, 73500x00003736,0x00003735,0x00000001,0x00050051,
75380x00002980,0x00060041,0x0000016c,0x00002968, 73510x00000006,0x00003737,0x00003735,0x00000000,
75390x00002970,0x0000016b,0x0000016b,0x0005003e, 73520x00050080,0x00000006,0x0000373c,0x00003220,
75400x00002968,0x0000295d,0x00000002,0x00000004, 73530x00003736,0x00050050,0x00000007,0x0000373d,
75410x00050080,0x00000006,0x00002662,0x00002622, 73540x00003737,0x0000373c,0x0004007c,0x00000014,
75420x00000521,0x00050041,0x000001bb,0x00002665, 73550x0000372d,0x0000373d,0x00060041,0x00000174,
75430x000001b9,0x00000523,0x0004003d,0x00000006, 73560x00003725,0x0000372d,0x00000173,0x00000173,
75440x00002666,0x00002665,0x00050095,0x0000013d, 73570x0005003e,0x00003725,0x00000140,0x00000002,
75450x00002998,0x00002924,0x00002662,0x00050051, 73580x00000004,0x000500b4,0x0000002f,0x0000312a,
75460x00000006,0x00002999,0x00002998,0x00000001, 73590x000030cb,0x0000048d,0x00060050,0x000005b3,
75470x00050051,0x00000006,0x0000299a,0x00002998, 73600x00006557,0x0000312a,0x0000312a,0x0000312a,
75480x00000000,0x00050080,0x00000006,0x0000299f, 73610x000600a9,0x0000006c,0x00006558,0x00006557,
75490x0000292b,0x00002999,0x00050050,0x00000007, 73620x00006532,0x00006319,0x000600a9,0x0000006c,
75500x000029a0,0x0000299a,0x0000299f,0x0004007c, 73630x0000655a,0x00006557,0x000005dc,0x000062f2,
75510x00000014,0x00002990,0x000029a0,0x00060041, 73640x00050041,0x000001c3,0x0000378d,0x000001c1,
75520x0000016c,0x00002988,0x00002990,0x0000016b, 73650x000001c2,0x0004003d,0x00000006,0x0000378e,
75530x0000016b,0x0005003e,0x00002988,0x00002666, 73660x0000378d,0x00050084,0x00000006,0x0000378f,
73670x000001e3,0x0000378e,0x00050080,0x00000006,
73680x00003790,0x000001cc,0x0000378f,0x00050080,
73690x00000006,0x00003796,0x0000378e,0x00000695,
73700x00050086,0x00000006,0x00003797,0x00003796,
73710x000001c6,0x00050084,0x00000006,0x00003789,
73720x000001cc,0x00003797,0x00050080,0x00000006,
73730x0000378a,0x00003790,0x00003789,0x00050080,
73740x00000006,0x00003784,0x0000378a,0x00003789,
73750x00050084,0x00000006,0x00003754,0x000001f7,
73760x000013a7,0x00050080,0x00000006,0x00003755,
73770x00003784,0x00003754,0x00050041,0x0000026e,
73780x00003756,0x000001c1,0x0000026c,0x0004003d,
73790x00000007,0x00003757,0x00003756,0x00050051,
73800x00000027,0x0000375a,0x0000655a,0x00000000,
73810x0004007c,0x00000006,0x000037a4,0x0000375a,
73820x00050051,0x00000006,0x000037bd,0x00003757,
73830x00000000,0x00050095,0x00000145,0x000037bf,
73840x000037bd,0x00003755,0x00050051,0x00000006,
73850x000037c0,0x000037bf,0x00000001,0x00050051,
73860x00000006,0x000037c1,0x000037bf,0x00000000,
73870x00050051,0x00000006,0x000037c4,0x00003757,
73880x00000001,0x00050080,0x00000006,0x000037c6,
73890x000037c4,0x000037c0,0x00050050,0x00000007,
73900x000037c7,0x000037c1,0x000037c6,0x0004007c,
73910x00000014,0x000037b7,0x000037c7,0x00060041,
73920x00000174,0x000037af,0x000037b7,0x00000173,
73930x00000173,0x0005003e,0x000037af,0x000037a4,
75540x00000002,0x00000004,0x00050080,0x00000006, 73940x00000002,0x00000004,0x00050080,0x00000006,
75550x00002669,0x00002622,0x0000052d,0x00050095, 73950x0000375d,0x00003755,0x000000f3,0x00050051,
75560x0000013d,0x000029b8,0x00002924,0x00002669, 73960x00000027,0x00003761,0x0000655a,0x00000001,
75570x00050051,0x00000006,0x000029b9,0x000029b8, 73970x0004007c,0x00000006,0x000037cd,0x00003761,
75580x00000001,0x00050051,0x00000006,0x000029ba, 73980x00050095,0x00000145,0x000037e8,0x000037bd,
75590x000029b8,0x00000000,0x00050080,0x00000006, 73990x0000375d,0x00050051,0x00000006,0x000037e9,
75600x000029bf,0x0000292b,0x000029b9,0x00050050, 74000x000037e8,0x00000001,0x00050051,0x00000006,
75610x00000007,0x000029c0,0x000029ba,0x000029bf, 74010x000037ea,0x000037e8,0x00000000,0x00050080,
75620x0004007c,0x00000014,0x000029b0,0x000029c0, 74020x00000006,0x000037ef,0x000037c4,0x000037e9,
75630x00060041,0x0000016c,0x000029a8,0x000029b0, 74030x00050050,0x00000007,0x000037f0,0x000037ea,
75640x0000016b,0x0000016b,0x0005003e,0x000029a8, 74040x000037ef,0x0004007c,0x00000014,0x000037e0,
75650x000012dd,0x00000002,0x00000004,0x00050080, 74050x000037f0,0x00060041,0x00000174,0x000037d8,
75660x00000006,0x0000266f,0x00002622,0x00000537, 74060x000037e0,0x00000173,0x00000173,0x0005003e,
75670x00050095,0x0000013d,0x000029d8,0x00002924, 74070x000037d8,0x000037cd,0x00000002,0x00000004,
75680x0000266f,0x00050051,0x00000006,0x000029d9, 74080x00050080,0x00000006,0x00003764,0x00003755,
75690x000029d8,0x00000001,0x00050051,0x00000006, 74090x000001d5,0x00050051,0x00000027,0x00003768,
75700x000029da,0x000029d8,0x00000000,0x00050080, 74100x0000655a,0x00000002,0x0004007c,0x00000006,
75710x00000006,0x000029df,0x0000292b,0x000029d9, 74110x000037f6,0x00003768,0x00050095,0x00000145,
75720x00050050,0x00000007,0x000029e0,0x000029da, 74120x00003811,0x000037bd,0x00003764,0x00050051,
75730x000029df,0x0004007c,0x00000014,0x000029d0, 74130x00000006,0x00003812,0x00003811,0x00000001,
75740x000029e0,0x00060041,0x0000016c,0x000029c8, 74140x00050051,0x00000006,0x00003813,0x00003811,
75750x000029d0,0x0000016b,0x0000016b,0x0005003e, 74150x00000000,0x00050080,0x00000006,0x00003818,
75760x000029c8,0x00000539,0x00000002,0x00000004, 74160x000037c4,0x00003812,0x00050050,0x00000007,
75770x00050080,0x00000006,0x00002674,0x00002622, 74170x00003819,0x00003813,0x00003818,0x0004007c,
75780x00000541,0x00050095,0x0000013d,0x000029f8, 74180x00000014,0x00003809,0x00003819,0x00060041,
75790x00002924,0x00002674,0x00050051,0x00000006, 74190x00000174,0x00003801,0x00003809,0x00000173,
75800x000029f9,0x000029f8,0x00000001,0x00050051, 74200x00000173,0x0005003e,0x00003801,0x000037f6,
75810x00000006,0x000029fa,0x000029f8,0x00000000,
75820x00050080,0x00000006,0x000029ff,0x0000292b,
75830x000029f9,0x00050050,0x00000007,0x00002a00,
75840x000029fa,0x000029ff,0x0004007c,0x00000014,
75850x000029f0,0x00002a00,0x00060041,0x0000016c,
75860x000029e8,0x000029f0,0x0000016b,0x0000016b,
75870x0005003e,0x000029e8,0x00000543,0x00000002,
75880x00000004,0x00050041,0x0000006d,0x00002678,
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,
76630x00000002,0x00000004,0x00050080,0x00000006, 74210x00000002,0x00000004,0x00050080,0x00000006,
76640x00002a20,0x00002a18,0x000000ec,0x00050051, 74220x0000376b,0x00003755,0x000001dc,0x00050051,
76650x00000027,0x00002a24,0x00006128,0x00000001, 74230x00000027,0x0000376f,0x00006558,0x00000000,
76660x0004007c,0x00000006,0x00002a90,0x00002a24, 74240x0004007c,0x00000006,0x0000381f,0x0000376f,
76670x00050095,0x0000013d,0x00002aab,0x00002a80, 74250x00050095,0x00000145,0x0000383a,0x000037bd,
76680x00002a20,0x00050051,0x00000006,0x00002aac, 74260x0000376b,0x00050051,0x00000006,0x0000383b,
76690x00002aab,0x00000001,0x00050051,0x00000006, 74270x0000383a,0x00000001,0x00050051,0x00000006,
76700x00002aad,0x00002aab,0x00000000,0x00050080, 74280x0000383c,0x0000383a,0x00000000,0x00050080,
76710x00000006,0x00002ab2,0x00002a87,0x00002aac, 74290x00000006,0x00003841,0x000037c4,0x0000383b,
76720x00050050,0x00000007,0x00002ab3,0x00002aad, 74300x00050050,0x00000007,0x00003842,0x0000383c,
76730x00002ab2,0x0004007c,0x00000014,0x00002aa3, 74310x00003841,0x0004007c,0x00000014,0x00003832,
76740x00002ab3,0x00060041,0x0000016c,0x00002a9b, 74320x00003842,0x00060041,0x00000174,0x0000382a,
76750x00002aa3,0x0000016b,0x0000016b,0x0005003e, 74330x00003832,0x00000173,0x00000173,0x0005003e,
76760x00002a9b,0x00002a90,0x00000002,0x00000004, 74340x0000382a,0x0000381f,0x00000002,0x00000004,
76770x00050080,0x00000006,0x00002a27,0x00002a18, 74350x00050080,0x00000006,0x00003772,0x00003755,
76780x000001cd,0x00050051,0x00000027,0x00002a2b, 74360x000001e3,0x00050051,0x00000027,0x00003776,
76790x00006128,0x00000002,0x0004007c,0x00000006, 74370x00006558,0x00000001,0x0004007c,0x00000006,
76800x00002ab9,0x00002a2b,0x00050095,0x0000013d, 74380x00003848,0x00003776,0x00050095,0x00000145,
76810x00002ad4,0x00002a80,0x00002a27,0x00050051, 74390x00003863,0x000037bd,0x00003772,0x00050051,
76820x00000006,0x00002ad5,0x00002ad4,0x00000001, 74400x00000006,0x00003864,0x00003863,0x00000001,
76830x00050051,0x00000006,0x00002ad6,0x00002ad4, 74410x00050051,0x00000006,0x00003865,0x00003863,
76840x00000000,0x00050080,0x00000006,0x00002adb, 74420x00000000,0x00050080,0x00000006,0x0000386a,
76850x00002a87,0x00002ad5,0x00050050,0x00000007, 74430x000037c4,0x00003864,0x00050050,0x00000007,
76860x00002adc,0x00002ad6,0x00002adb,0x0004007c, 74440x0000386b,0x00003865,0x0000386a,0x0004007c,
76870x00000014,0x00002acc,0x00002adc,0x00060041, 74450x00000014,0x0000385b,0x0000386b,0x00060041,
76880x0000016c,0x00002ac4,0x00002acc,0x0000016b, 74460x00000174,0x00003853,0x0000385b,0x00000173,
76890x0000016b,0x0005003e,0x00002ac4,0x00002ab9, 74470x00000173,0x0005003e,0x00003853,0x00003848,
76900x00000002,0x00000004,0x00050080,0x00000006, 74480x00000002,0x00000004,0x00050080,0x00000006,
76910x00002a2e,0x00002a18,0x000001d4,0x00050051, 74490x00003779,0x00003755,0x000002a1,0x00050051,
76920x00000027,0x00002a32,0x00006126,0x00000000, 74500x00000027,0x0000377d,0x00006558,0x00000002,
76930x0004007c,0x00000006,0x00002ae2,0x00002a32, 74510x0004007c,0x00000006,0x00003871,0x0000377d,
76940x00050095,0x0000013d,0x00002afd,0x00002a80, 74520x00050095,0x00000145,0x0000388c,0x000037bd,
76950x00002a2e,0x00050051,0x00000006,0x00002afe, 74530x00003779,0x00050051,0x00000006,0x0000388d,
74540x0000388c,0x00000001,0x00050051,0x00000006,
74550x0000388e,0x0000388c,0x00000000,0x00050080,
74560x00000006,0x00003893,0x000037c4,0x0000388d,
74570x00050050,0x00000007,0x00003894,0x0000388e,
74580x00003893,0x0004007c,0x00000014,0x00003884,
74590x00003894,0x00060041,0x00000174,0x0000387c,
74600x00003884,0x00000173,0x00000173,0x0005003e,
74610x0000387c,0x00003871,0x00000002,0x00000004,
74620x000300f7,0x000038d4,0x00000000,0x000300fb,
74630x00000140,0x000038a3,0x000200f8,0x000038a3,
74640x000500bc,0x0000002f,0x000038db,0x0000375a,
74650x0000376f,0x000300f7,0x000038e2,0x00000000,
74660x000400fa,0x000038db,0x000038dc,0x000038e2,
74670x000200f8,0x000038dc,0x000500bc,0x0000002f,
74680x000038e1,0x00003761,0x00003776,0x000200f9,
74690x000038e2,0x000200f8,0x000038e2,0x000700f5,
74700x0000002f,0x000038e3,0x000038db,0x000038a3,
74710x000038e1,0x000038dc,0x000300f7,0x000038ea,
74720x00000000,0x000400fa,0x000038e3,0x000038e4,
74730x000038ea,0x000200f8,0x000038e4,0x000500bc,
74740x0000002f,0x000038e9,0x00003768,0x0000377d,
74750x000200f9,0x000038ea,0x000200f8,0x000038ea,
74760x000700f5,0x0000002f,0x000038eb,0x000038e3,
74770x000038e2,0x000038e9,0x000038e4,0x000400a8,
74780x0000002f,0x000038ec,0x000038eb,0x000300f7,
74790x000038a8,0x00000000,0x000400fa,0x000038ec,
74800x000038a7,0x000038a8,0x000200f8,0x000038a7,
74810x000200f9,0x000038d4,0x000200f8,0x000038a8,
74820x00050081,0x0000006c,0x000038ab,0x0000655a,
74830x00006558,0x0005008e,0x0000006c,0x000038ac,
74840x000038ab,0x00000305,0x00050095,0x00000145,
74850x000038fc,0x000037bd,0x00000140,0x00050051,
74860x00000006,0x000038fd,0x000038fc,0x00000001,
74870x00050051,0x00000006,0x000038fe,0x000038fc,
74880x00000000,0x00050080,0x00000006,0x00003903,
74890x000037c4,0x000038fd,0x00050050,0x00000007,
74900x00003904,0x000038fe,0x00003903,0x0004007c,
74910x00000014,0x000038f4,0x00003904,0x00060041,
74920x00000174,0x000038b1,0x000038f4,0x00000173,
74930x00000173,0x00050051,0x00000027,0x000038b3,
74940x000038ac,0x00000000,0x0004007c,0x00000006,
74950x0000390a,0x000038b3,0x000500c7,0x00000006,
74960x0000390c,0x0000390a,0x00000249,0x000500ab,
74970x0000002f,0x0000390d,0x0000390c,0x00000140,
74980x000300f7,0x00003914,0x00000000,0x000400fa,
74990x0000390d,0x0000390e,0x00003911,0x000200f8,
75000x00003911,0x000500c5,0x00000006,0x00003913,
75010x0000390a,0x00000249,0x000200f9,0x00003914,
75020x000200f8,0x0000390e,0x000400c8,0x00000006,
75030x00003910,0x0000390a,0x000200f9,0x00003914,
75040x000200f8,0x00003914,0x000700f5,0x00000006,
75050x00006334,0x00003910,0x0000390e,0x00003913,
75060x00003911,0x000700ed,0x00000006,0x000038b5,
75070x000038b1,0x0000014a,0x00000140,0x00006334,
75080x00060041,0x00000174,0x000038b7,0x000038f4,
75090x00000173,0x0000026c,0x00050051,0x00000027,
75100x000038b9,0x000038ac,0x00000001,0x0004007c,
75110x00000006,0x0000391b,0x000038b9,0x000500c7,
75120x00000006,0x0000391d,0x0000391b,0x00000249,
75130x000500ab,0x0000002f,0x0000391e,0x0000391d,
75140x00000140,0x000300f7,0x00003925,0x00000000,
75150x000400fa,0x0000391e,0x0000391f,0x00003922,
75160x000200f8,0x00003922,0x000500c5,0x00000006,
75170x00003924,0x0000391b,0x00000249,0x000200f9,
75180x00003925,0x000200f8,0x0000391f,0x000400c8,
75190x00000006,0x00003921,0x0000391b,0x000200f9,
75200x00003925,0x000200f8,0x00003925,0x000700f5,
75210x00000006,0x00006335,0x00003921,0x0000391f,
75220x00003924,0x00003922,0x000700ed,0x00000006,
75230x000038bb,0x000038b7,0x0000014a,0x00000140,
75240x00006335,0x00060041,0x00000174,0x000038bd,
75250x000038f4,0x00000173,0x0000031d,0x00050051,
75260x00000027,0x000038bf,0x000038ac,0x00000002,
75270x0004007c,0x00000006,0x0000392c,0x000038bf,
75280x000500c7,0x00000006,0x0000392e,0x0000392c,
75290x00000249,0x000500ab,0x0000002f,0x0000392f,
75300x0000392e,0x00000140,0x000300f7,0x00003936,
75310x00000000,0x000400fa,0x0000392f,0x00003930,
75320x00003933,0x000200f8,0x00003933,0x000500c5,
75330x00000006,0x00003935,0x0000392c,0x00000249,
75340x000200f9,0x00003936,0x000200f8,0x00003930,
75350x000400c8,0x00000006,0x00003932,0x0000392c,
75360x000200f9,0x00003936,0x000200f8,0x00003936,
75370x000700f5,0x00000006,0x00006336,0x00003932,
75380x00003930,0x00003935,0x00003933,0x000700ed,
75390x00000006,0x000038c1,0x000038bd,0x0000014a,
75400x00000140,0x00006336,0x00060041,0x00000174,
75410x000038c3,0x000038f4,0x00000173,0x00000325,
75420x000300f7,0x00003947,0x00000000,0x000400fa,
75430x0000390d,0x00003941,0x00003944,0x000200f8,
75440x00003944,0x000500c5,0x00000006,0x00003946,
75450x0000390a,0x00000249,0x000200f9,0x00003947,
75460x000200f8,0x00003941,0x000400c8,0x00000006,
75470x00003943,0x0000390a,0x000200f9,0x00003947,
75480x000200f8,0x00003947,0x000700f5,0x00000006,
75490x00006337,0x00003943,0x00003941,0x00003946,
75500x00003944,0x000700ef,0x00000006,0x000038c7,
75510x000038c3,0x0000014a,0x00000140,0x00006337,
75520x00060041,0x00000174,0x000038c9,0x000038f4,
75530x00000173,0x0000032d,0x000300f7,0x00003958,
75540x00000000,0x000400fa,0x0000391e,0x00003952,
75550x00003955,0x000200f8,0x00003955,0x000500c5,
75560x00000006,0x00003957,0x0000391b,0x00000249,
75570x000200f9,0x00003958,0x000200f8,0x00003952,
75580x000400c8,0x00000006,0x00003954,0x0000391b,
75590x000200f9,0x00003958,0x000200f8,0x00003958,
75600x000700f5,0x00000006,0x00006338,0x00003954,
75610x00003952,0x00003957,0x00003955,0x000700ef,
75620x00000006,0x000038cd,0x000038c9,0x0000014a,
75630x00000140,0x00006338,0x00060041,0x00000174,
75640x000038cf,0x000038f4,0x00000173,0x00000335,
75650x000300f7,0x00003969,0x00000000,0x000400fa,
75660x0000392f,0x00003963,0x00003966,0x000200f8,
75670x00003966,0x000500c5,0x00000006,0x00003968,
75680x0000392c,0x00000249,0x000200f9,0x00003969,
75690x000200f8,0x00003963,0x000400c8,0x00000006,
75700x00003965,0x0000392c,0x000200f9,0x00003969,
75710x000200f8,0x00003969,0x000700f5,0x00000006,
75720x00006339,0x00003965,0x00003963,0x00003968,
75730x00003966,0x000700ef,0x00000006,0x000038d3,
75740x000038cf,0x0000014a,0x00000140,0x00006339,
75750x000200f9,0x000038d4,0x000200f8,0x000038d4,
75760x000200f9,0x000014b9,0x000200f8,0x000014b9,
75770x000200f9,0x000014b0,0x000200f8,0x000014af,
75780x000200f9,0x000028db,0x000200f8,0x000028db,
75790x000700f5,0x00000006,0x00006346,0x00000140,
75800x000014af,0x000028eb,0x000028e9,0x000500b0,
75810x0000002f,0x000028de,0x00006346,0x000004d7,
75820x000400f6,0x000028ec,0x000028e9,0x00000000,
75830x000400fa,0x000028de,0x000028df,0x000028ec,
75840x000200f8,0x000028df,0x00050084,0x00000006,
75850x000028e2,0x000004d7,0x000013a7,0x00050080,
75860x00000006,0x000028e4,0x000028e2,0x00006346,
75870x000300f7,0x000029a7,0x00000000,0x000300fb,
75880x00000140,0x00002985,0x000200f8,0x00002985,
75890x00050041,0x000001c3,0x00002986,0x000001c1,
75900x0000049b,0x0004003d,0x00000006,0x00002987,
75910x00002986,0x000500aa,0x0000002f,0x00002988,
75920x00002987,0x00000140,0x000300f7,0x0000298b,
75930x00000000,0x000400fa,0x00002988,0x00002989,
75940x0000298b,0x000200f8,0x00002989,0x000200f9,
75950x000029a7,0x000200f8,0x0000298b,0x000500aa,
75960x0000002f,0x0000298e,0x00002987,0x00000288,
75970x000300f7,0x00002995,0x00000000,0x000400fa,
75980x0000298e,0x0000298f,0x00002995,0x000200f8,
75990x0000298f,0x00050084,0x00000006,0x00002991,
76000x000000f3,0x000028e4,0x00050041,0x0000026e,
76010x00002992,0x000001c1,0x00000325,0x0004003d,
76020x00000007,0x00002993,0x00002992,0x00050051,
76030x00000006,0x000029bf,0x00002993,0x00000000,
76040x00050095,0x00000145,0x000029c1,0x000029bf,
76050x00002991,0x00050051,0x00000006,0x000029c2,
76060x000029c1,0x00000001,0x00050051,0x00000006,
76070x000029c3,0x000029c1,0x00000000,0x00050051,
76080x00000006,0x000029c6,0x00002993,0x00000001,
76090x00050080,0x00000006,0x000029c8,0x000029c6,
76100x000029c2,0x00050050,0x00000007,0x000029c9,
76110x000029c3,0x000029c8,0x0004007c,0x00000014,
76120x000029b9,0x000029c9,0x00060041,0x00000174,
76130x000029b0,0x000029b9,0x00000173,0x00000173,
76140x0006003d,0x00000006,0x000029b1,0x000029b0,
76150x00000002,0x00000004,0x000200f9,0x000029a7,
76160x000200f8,0x00002995,0x000500c2,0x00000006,
76170x00002997,0x000028e4,0x0000026c,0x00050084,
76180x00000006,0x00002998,0x000000f3,0x00002997,
76190x00050041,0x0000026e,0x00002999,0x000001c1,
76200x00000325,0x0004003d,0x00000007,0x0000299a,
76210x00002999,0x00050051,0x00000006,0x000029e0,
76220x0000299a,0x00000000,0x00050095,0x00000145,
76230x000029e2,0x000029e0,0x00002998,0x00050051,
76240x00000006,0x000029e3,0x000029e2,0x00000001,
76250x00050051,0x00000006,0x000029e4,0x000029e2,
76260x00000000,0x00050051,0x00000006,0x000029e7,
76270x0000299a,0x00000001,0x00050080,0x00000006,
76280x000029e9,0x000029e7,0x000029e3,0x00050050,
76290x00000007,0x000029ea,0x000029e4,0x000029e9,
76300x0004007c,0x00000014,0x000029da,0x000029ea,
76310x00060041,0x00000174,0x000029d1,0x000029da,
76320x00000173,0x00000173,0x0006003d,0x00000006,
76330x000029d2,0x000029d1,0x00000002,0x00000004,
76340x000500c7,0x00000006,0x0000299d,0x000028e4,
76350x0000014a,0x000500ab,0x0000002f,0x0000299e,
76360x0000299d,0x00000140,0x000300f7,0x000029a5,
76370x00000000,0x000400fa,0x0000299e,0x0000299f,
76380x000029a2,0x000200f8,0x000029a2,0x000500c7,
76390x00000006,0x000029a4,0x000029d2,0x000004c3,
76400x000200f9,0x000029a5,0x000200f8,0x0000299f,
76410x000500c2,0x00000006,0x000029a1,0x000029d2,
76420x00000362,0x000200f9,0x000029a5,0x000200f8,
76430x000029a5,0x000700f5,0x00000006,0x00006350,
76440x000029a1,0x0000299f,0x000029a4,0x000029a2,
76450x000200f9,0x000029a7,0x000200f8,0x000029a7,
76460x000900f5,0x00000006,0x00006351,0x000028e4,
76470x00002989,0x000029b1,0x0000298f,0x00006350,
76480x000029a5,0x000300f7,0x00002a1e,0x00000000,
76490x000300fb,0x00000140,0x000029fc,0x000200f8,
76500x000029fc,0x00050041,0x000001c3,0x000029fe,
76510x000001c1,0x00000467,0x0004003d,0x00000006,
76520x000029ff,0x000029fe,0x000500ae,0x0000002f,
76530x00002a00,0x00006351,0x000029ff,0x000300f7,
76540x00002a02,0x00000000,0x000400fa,0x00002a00,
76550x00002a01,0x00002a02,0x000200f8,0x00002a01,
76560x000200f9,0x00002a1e,0x000200f8,0x00002a02,
76570x00050041,0x000001c3,0x00002a04,0x000001c1,
76580x0000020e,0x0004003d,0x00000006,0x00002a05,
76590x00002a04,0x00050084,0x00000006,0x00002a06,
76600x00006351,0x00002a05,0x00050041,0x0000026e,
76610x00002a07,0x000001c1,0x0000031d,0x0004003d,
76620x00000007,0x00002a08,0x00002a07,0x00050051,
76630x00000006,0x00002a25,0x00002a08,0x00000000,
76640x00050095,0x00000145,0x00002a27,0x00002a25,
76650x00002a06,0x00050051,0x00000006,0x00002a28,
76660x00002a27,0x00000001,0x00050051,0x00000006,
76670x00002a29,0x00002a27,0x00000000,0x00050051,
76680x00000006,0x00002a2c,0x00002a08,0x00000001,
76690x00050080,0x00000006,0x00002a2e,0x00002a2c,
76700x00002a28,0x00050095,0x00000145,0x00002a48,
76710x00002a29,0x00000140,0x00050051,0x00000006,
76720x00002a49,0x00002a48,0x00000001,0x00050051,
76730x00000006,0x00002a4a,0x00002a48,0x00000000,
76740x00050080,0x00000006,0x00002a4f,0x00002a2e,
76750x00002a49,0x00050050,0x00000007,0x00002a50,
76760x00002a4a,0x00002a4f,0x0004007c,0x00000014,
76770x00002a40,0x00002a50,0x00060041,0x00000174,
76780x00002a37,0x00002a40,0x00000173,0x00000173,
76790x0006003d,0x00000006,0x00002a38,0x00002a37,
76800x00000002,0x00000004,0x0004007c,0x00000027,
76810x00002a0c,0x00002a38,0x00050095,0x00000145,
76820x00002a69,0x00002a29,0x000000f3,0x00050051,
76830x00000006,0x00002a6a,0x00002a69,0x00000001,
76840x00050051,0x00000006,0x00002a6b,0x00002a69,
76850x00000000,0x00050080,0x00000006,0x00002a70,
76860x00002a2e,0x00002a6a,0x00050050,0x00000007,
76870x00002a71,0x00002a6b,0x00002a70,0x0004007c,
76880x00000014,0x00002a61,0x00002a71,0x00060041,
76890x00000174,0x00002a58,0x00002a61,0x00000173,
76900x00000173,0x0006003d,0x00000006,0x00002a59,
76910x00002a58,0x00000002,0x00000004,0x0004007c,
76920x00000027,0x00002a0f,0x00002a59,0x00050041,
76930x000001c3,0x00002a10,0x000001c1,0x00000414,
76940x0004003d,0x00000006,0x00002a11,0x00002a10,
76950x000500aa,0x0000002f,0x00002a12,0x00002a11,
76960x0000014a,0x000300f7,0x00002a18,0x00000000,
76970x000400fa,0x00002a12,0x00002a13,0x00002a14,
76980x000200f8,0x00002a14,0x00050095,0x00000145,
76990x00002a8a,0x00002a29,0x000001d5,0x00050051,
77000x00000006,0x00002a8b,0x00002a8a,0x00000001,
77010x00050051,0x00000006,0x00002a8c,0x00002a8a,
77020x00000000,0x00050080,0x00000006,0x00002a91,
77030x00002a2e,0x00002a8b,0x00050050,0x00000007,
77040x00002a92,0x00002a8c,0x00002a91,0x0004007c,
77050x00000014,0x00002a82,0x00002a92,0x00060041,
77060x00000174,0x00002a79,0x00002a82,0x00000173,
77070x00000173,0x0006003d,0x00000006,0x00002a7a,
77080x00002a79,0x00000002,0x00000004,0x0004007c,
77090x00000027,0x00002a17,0x00002a7a,0x000200f9,
77100x00002a18,0x000200f8,0x00002a13,0x000200f9,
77110x00002a18,0x000200f8,0x00002a18,0x000700f5,
77120x00000027,0x00006352,0x0000048d,0x00002a13,
77130x00002a17,0x00002a14,0x00060050,0x0000006c,
77140x00002a1d,0x00002a0c,0x00002a0f,0x00006352,
77150x000200f9,0x00002a1e,0x000200f8,0x00002a1e,
77160x000700f5,0x0000006c,0x00006353,0x0000046e,
77170x00002a01,0x00002a1d,0x00002a18,0x000300f7,
77180x00002ad8,0x00000000,0x000300fb,0x00000140,
77190x00002aa4,0x000200f8,0x00002aa4,0x00050041,
77200x0000026e,0x00002aa5,0x000001c1,0x0000032d,
77210x0004003d,0x00000007,0x00002aa6,0x00002aa5,
77220x00050051,0x00000006,0x00002add,0x00002aa6,
77230x00000000,0x000500aa,0x0000002f,0x00002ade,
77240x00002add,0x00000140,0x000300f7,0x00002ae3,
77250x00000000,0x000400fa,0x00002ade,0x00002adf,
77260x00002ae3,0x000200f8,0x00002adf,0x00050051,
77270x00000006,0x00002ae1,0x00002aa6,0x00000001,
77280x000500aa,0x0000002f,0x00002ae2,0x00002ae1,
77290x00000140,0x000200f9,0x00002ae3,0x000200f8,
77300x00002ae3,0x000700f5,0x0000002f,0x00002ae4,
77310x00002ade,0x00002aa4,0x00002ae2,0x00002adf,
77320x000300f7,0x00002aaa,0x00000000,0x000400fa,
77330x00002ae4,0x00002aa8,0x00002aaa,0x000200f8,
77340x00002aa8,0x000200f9,0x00002ad8,0x000200f8,
77350x00002aaa,0x000200f9,0x00002aab,0x000200f8,
77360x00002aab,0x000700f5,0x00000006,0x00006354,
77370x00000140,0x00002aaa,0x00002ad5,0x00002aaf,
77380x000500b0,0x0000002f,0x00002aae,0x00006354,
77390x000004d7,0x000400f6,0x00002ad6,0x00002aaf,
77400x00000000,0x000400fa,0x00002aae,0x00002aaf,
77410x00002ad6,0x000200f8,0x00002aaf,0x00050084,
77420x00000006,0x00002ab1,0x000001e3,0x00006354,
77430x00050095,0x00000145,0x00002afd,0x00002add,
77440x00002ab1,0x00050051,0x00000006,0x00002afe,
76960x00002afd,0x00000001,0x00050051,0x00000006, 77450x00002afd,0x00000001,0x00050051,0x00000006,
76970x00002aff,0x00002afd,0x00000000,0x00050080, 77460x00002aff,0x00002afd,0x00000000,0x00050051,
76980x00000006,0x00002b04,0x00002a87,0x00002afe, 77470x00000006,0x00002b02,0x00002aa6,0x00000001,
76990x00050050,0x00000007,0x00002b05,0x00002aff, 77480x00050080,0x00000006,0x00002b04,0x00002b02,
77000x00002b04,0x0004007c,0x00000014,0x00002af5, 77490x00002afe,0x00050050,0x00000007,0x00002b05,
77010x00002b05,0x00060041,0x0000016c,0x00002aed, 77500x00002aff,0x00002b04,0x0004007c,0x00000014,
77020x00002af5,0x0000016b,0x0000016b,0x0005003e, 77510x00002af5,0x00002b05,0x00060041,0x00000174,
77030x00002aed,0x00002ae2,0x00000002,0x00000004, 77520x00002aec,0x00002af5,0x00000173,0x00000173,
77040x00050080,0x00000006,0x00002a35,0x00002a18, 77530x0006003d,0x00000006,0x00002aed,0x00002aec,
77050x000001db,0x00050051,0x00000027,0x00002a39, 77540x00000002,0x00000004,0x0004007c,0x00000027,
77060x00006126,0x00000001,0x0004007c,0x00000006, 77550x00002ab6,0x00002aed,0x00050080,0x00000006,
77070x00002b0b,0x00002a39,0x00050095,0x0000013d, 77560x00002ab8,0x00002ab1,0x000000f3,0x00050095,
77080x00002b26,0x00002a80,0x00002a35,0x00050051, 77570x00000145,0x00002b1e,0x00002add,0x00002ab8,
77090x00000006,0x00002b27,0x00002b26,0x00000001, 77580x00050051,0x00000006,0x00002b1f,0x00002b1e,
77100x00050051,0x00000006,0x00002b28,0x00002b26, 77590x00000001,0x00050051,0x00000006,0x00002b20,
77110x00000000,0x00050080,0x00000006,0x00002b2d, 77600x00002b1e,0x00000000,0x00050080,0x00000006,
77120x00002a87,0x00002b27,0x00050050,0x00000007, 77610x00002b25,0x00002b02,0x00002b1f,0x00050050,
77130x00002b2e,0x00002b28,0x00002b2d,0x0004007c, 77620x00000007,0x00002b26,0x00002b20,0x00002b25,
77140x00000014,0x00002b1e,0x00002b2e,0x00060041, 77630x0004007c,0x00000014,0x00002b16,0x00002b26,
77150x0000016c,0x00002b16,0x00002b1e,0x0000016b, 77640x00060041,0x00000174,0x00002b0d,0x00002b16,
77160x0000016b,0x0005003e,0x00002b16,0x00002b0b, 77650x00000173,0x00000173,0x0006003d,0x00000006,
77660x00002b0e,0x00002b0d,0x00000002,0x00000004,
77670x0004007c,0x00000027,0x00002abc,0x00002b0e,
77680x00050080,0x00000006,0x00002abe,0x00002ab1,
77690x000001d5,0x00050095,0x00000145,0x00002b3f,
77700x00002add,0x00002abe,0x00050051,0x00000006,
77710x00002b40,0x00002b3f,0x00000001,0x00050051,
77720x00000006,0x00002b41,0x00002b3f,0x00000000,
77730x00050080,0x00000006,0x00002b46,0x00002b02,
77740x00002b40,0x00050050,0x00000007,0x00002b47,
77750x00002b41,0x00002b46,0x0004007c,0x00000014,
77760x00002b37,0x00002b47,0x00060041,0x00000174,
77770x00002b2e,0x00002b37,0x00000173,0x00000173,
77780x0006003d,0x00000006,0x00002b2f,0x00002b2e,
77790x00000002,0x00000004,0x0004007c,0x00000027,
77800x00002ac2,0x00002b2f,0x00050080,0x00000006,
77810x00002ac4,0x00002ab1,0x000001dc,0x00050095,
77820x00000145,0x00002b60,0x00002add,0x00002ac4,
77830x00050051,0x00000006,0x00002b61,0x00002b60,
77840x00000001,0x00050051,0x00000006,0x00002b62,
77850x00002b60,0x00000000,0x00050080,0x00000006,
77860x00002b67,0x00002b02,0x00002b61,0x00050050,
77870x00000007,0x00002b68,0x00002b62,0x00002b67,
77880x0004007c,0x00000014,0x00002b58,0x00002b68,
77890x00060041,0x00000174,0x00002b4f,0x00002b58,
77900x00000173,0x00000173,0x0006003d,0x00000006,
77910x00002b50,0x00002b4f,0x00000002,0x00000004,
77920x0004007c,0x00000027,0x00002ac8,0x00002b50,
77930x00070050,0x000004dc,0x00002ac9,0x00002ab6,
77940x00002abc,0x00002ac2,0x00002ac8,0x0008004f,
77950x0000006c,0x00002acc,0x00002ac9,0x00002ac9,
77960x00000000,0x00000001,0x00000002,0x00050094,
77970x00000027,0x00002ace,0x00002acc,0x00006353,
77980x00050081,0x00000027,0x00002ad1,0x00002ace,
77990x00002ac8,0x00050041,0x00000028,0x00002ad2,
78000x00002aa1,0x00006354,0x0003003e,0x00002ad2,
78010x00002ad1,0x00050080,0x00000006,0x00002ad5,
78020x00006354,0x0000026c,0x000200f9,0x00002aab,
78030x000200f8,0x00002ad6,0x0004003d,0x0000006c,
78040x00002ad7,0x00002aa1,0x000200f9,0x00002ad8,
78050x000200f8,0x00002ad8,0x000700f5,0x0000006c,
78060x00006355,0x00006353,0x00002aa8,0x00002ad7,
78070x00002ad6,0x00050041,0x0000006d,0x000028e8,
78080x000028ad,0x00006346,0x0003003e,0x000028e8,
78090x00006355,0x000200f9,0x000028e9,0x000200f8,
78100x000028e9,0x00050080,0x00000006,0x000028eb,
78110x00006346,0x0000026c,0x000200f9,0x000028db,
78120x000200f8,0x000028ec,0x00050041,0x000001c3,
78130x000028ed,0x000001c1,0x00000528,0x0004003d,
78140x00000006,0x000028ee,0x000028ed,0x00050080,
78150x00000006,0x000028f0,0x000028ee,0x000013a7,
78160x00050041,0x000001c3,0x000028f1,0x000001c1,
78170x00000352,0x0004003d,0x00000006,0x000028f2,
78180x000028f1,0x00050084,0x00000006,0x000028f4,
78190x000001cc,0x000028f0,0x00050080,0x00000006,
78200x000028f5,0x000028f2,0x000028f4,0x000200f9,
78210x000028f6,0x000200f8,0x000028f6,0x000700f5,
78220x00000006,0x00006347,0x00000140,0x000028ec,
78230x0000291d,0x000028fa,0x000500b0,0x0000002f,
78240x000028f9,0x00006347,0x000004d7,0x000400f6,
78250x0000291e,0x000028fa,0x00000000,0x000400fa,
78260x000028f9,0x000028fa,0x0000291e,0x000200f8,
78270x000028fa,0x00050084,0x00000006,0x000028fd,
78280x000001dc,0x00006347,0x00050080,0x00000006,
78290x000028fe,0x000028f5,0x000028fd,0x00050041,
78300x0000026e,0x00002900,0x000001c1,0x00000173,
78310x0004003d,0x00000007,0x00002901,0x00002900,
78320x00060041,0x00000028,0x00002902,0x000028ad,
78330x00006347,0x00000140,0x0004003d,0x00000027,
78340x00002903,0x00002902,0x0004007c,0x00000006,
78350x00002b6e,0x00002903,0x00050051,0x00000006,
78360x00002b87,0x00002901,0x00000000,0x00050095,
78370x00000145,0x00002b89,0x00002b87,0x000028fe,
78380x00050051,0x00000006,0x00002b8a,0x00002b89,
78390x00000001,0x00050051,0x00000006,0x00002b8b,
78400x00002b89,0x00000000,0x00050051,0x00000006,
78410x00002b8e,0x00002901,0x00000001,0x00050080,
78420x00000006,0x00002b90,0x00002b8e,0x00002b8a,
78430x00050050,0x00000007,0x00002b91,0x00002b8b,
78440x00002b90,0x0004007c,0x00000014,0x00002b81,
78450x00002b91,0x00060041,0x00000174,0x00002b79,
78460x00002b81,0x00000173,0x00000173,0x0005003e,
78470x00002b79,0x00002b6e,0x00000002,0x00000004,
78480x00050080,0x00000006,0x00002909,0x000028fe,
78490x000000f3,0x00060041,0x00000028,0x0000290d,
78500x000028ad,0x00006347,0x0000014a,0x0004003d,
78510x00000027,0x0000290e,0x0000290d,0x0004007c,
78520x00000006,0x00002b97,0x0000290e,0x00050095,
78530x00000145,0x00002bb2,0x00002b87,0x00002909,
78540x00050051,0x00000006,0x00002bb3,0x00002bb2,
78550x00000001,0x00050051,0x00000006,0x00002bb4,
78560x00002bb2,0x00000000,0x00050080,0x00000006,
78570x00002bb9,0x00002b8e,0x00002bb3,0x00050050,
78580x00000007,0x00002bba,0x00002bb4,0x00002bb9,
78590x0004007c,0x00000014,0x00002baa,0x00002bba,
78600x00060041,0x00000174,0x00002ba2,0x00002baa,
78610x00000173,0x00000173,0x0005003e,0x00002ba2,
78620x00002b97,0x00000002,0x00000004,0x00050080,
78630x00000006,0x00002914,0x000028fe,0x000001d5,
78640x00060041,0x00000028,0x00002918,0x000028ad,
78650x00006347,0x00000288,0x0004003d,0x00000027,
78660x00002919,0x00002918,0x0004007c,0x00000006,
78670x00002bc0,0x00002919,0x00050095,0x00000145,
78680x00002bdb,0x00002b87,0x00002914,0x00050051,
78690x00000006,0x00002bdc,0x00002bdb,0x00000001,
78700x00050051,0x00000006,0x00002bdd,0x00002bdb,
78710x00000000,0x00050080,0x00000006,0x00002be2,
78720x00002b8e,0x00002bdc,0x00050050,0x00000007,
78730x00002be3,0x00002bdd,0x00002be2,0x0004007c,
78740x00000014,0x00002bd3,0x00002be3,0x00060041,
78750x00000174,0x00002bcb,0x00002bd3,0x00000173,
78760x00000173,0x0005003e,0x00002bcb,0x00002bc0,
77170x00000002,0x00000004,0x00050080,0x00000006, 78770x00000002,0x00000004,0x00050080,0x00000006,
77180x00002a3c,0x00002a18,0x00000299,0x00050051, 78780x0000291d,0x00006347,0x0000026c,0x000200f9,
77190x00000027,0x00002a40,0x00006126,0x00000002, 78790x000028f6,0x000200f8,0x0000291e,0x00050080,
77200x0004007c,0x00000006,0x00002b34,0x00002a40, 78800x00000006,0x00002920,0x000028f5,0x00000567,
77210x00050095,0x0000013d,0x00002b4f,0x00002a80, 78810x00050041,0x0000026e,0x00002921,0x000001c1,
77220x00002a3c,0x00050051,0x00000006,0x00002b50, 78820x00000173,0x0004003d,0x00000007,0x00002922,
77230x00002b4f,0x00000001,0x00050051,0x00000006, 78830x00002921,0x00060041,0x00000028,0x00002923,
77240x00002b51,0x00002b4f,0x00000000,0x00050080, 78840x000028ad,0x0000031d,0x00000140,0x0004003d,
77250x00000006,0x00002b56,0x00002a87,0x00002b50, 78850x00000027,0x00002924,0x00002923,0x0004007c,
77260x00050050,0x00000007,0x00002b57,0x00002b51, 78860x00000006,0x00002be9,0x00002924,0x00050051,
77270x00002b56,0x0004007c,0x00000014,0x00002b47, 78870x00000006,0x00002c02,0x00002922,0x00000000,
77280x00002b57,0x00060041,0x0000016c,0x00002b3f, 78880x00050095,0x00000145,0x00002c04,0x00002c02,
77290x00002b47,0x0000016b,0x0000016b,0x0005003e, 78890x00002920,0x00050051,0x00000006,0x00002c05,
77300x00002b3f,0x00002b34,0x00000002,0x00000004, 78900x00002c04,0x00000001,0x00050051,0x00000006,
77310x000300f7,0x00002b97,0x00000000,0x000300fb, 78910x00002c06,0x00002c04,0x00000000,0x00050051,
77320x00000138,0x00002b66,0x000200f8,0x00002b66, 78920x00000006,0x00002c09,0x00002922,0x00000001,
77330x000500bc,0x0000002f,0x00002b9e,0x00002a1d, 78930x00050080,0x00000006,0x00002c0b,0x00002c09,
77340x00002a32,0x000300f7,0x00002ba5,0x00000000, 78940x00002c05,0x00050050,0x00000007,0x00002c0c,
77350x000400fa,0x00002b9e,0x00002b9f,0x00002ba5, 78950x00002c06,0x00002c0b,0x0004007c,0x00000014,
77360x000200f8,0x00002b9f,0x000500bc,0x0000002f, 78960x00002bfc,0x00002c0c,0x00060041,0x00000174,
77370x00002ba4,0x00002a24,0x00002a39,0x000200f9, 78970x00002bf4,0x00002bfc,0x00000173,0x00000173,
77380x00002ba5,0x000200f8,0x00002ba5,0x000700f5, 78980x0005003e,0x00002bf4,0x00002be9,0x00000002,
77390x0000002f,0x00002ba6,0x00002b9e,0x00002b66, 78990x00000004,0x00050080,0x00000006,0x00002927,
77400x00002ba4,0x00002b9f,0x000300f7,0x00002bad, 79000x000028f5,0x00000572,0x00060041,0x00000028,
77410x00000000,0x000400fa,0x00002ba6,0x00002ba7, 79010x0000292a,0x000028ad,0x0000031d,0x0000014a,
77420x00002bad,0x000200f8,0x00002ba7,0x000500bc, 79020x0004003d,0x00000027,0x0000292b,0x0000292a,
77430x0000002f,0x00002bac,0x00002a2b,0x00002a40, 79030x0004007c,0x00000006,0x00002c12,0x0000292b,
77440x000200f9,0x00002bad,0x000200f8,0x00002bad, 79040x00050095,0x00000145,0x00002c2d,0x00002c02,
77450x000700f5,0x0000002f,0x00002bae,0x00002ba6, 79050x00002927,0x00050051,0x00000006,0x00002c2e,
77460x00002ba5,0x00002bac,0x00002ba7,0x000400a8, 79060x00002c2d,0x00000001,0x00050051,0x00000006,
77470x0000002f,0x00002baf,0x00002bae,0x000300f7, 79070x00002c2f,0x00002c2d,0x00000000,0x00050080,
77480x00002b6b,0x00000000,0x000400fa,0x00002baf, 79080x00000006,0x00002c34,0x00002c09,0x00002c2e,
77490x00002b6a,0x00002b6b,0x000200f8,0x00002b6a, 79090x00050050,0x00000007,0x00002c35,0x00002c2f,
77500x000200f9,0x00002b97,0x000200f8,0x00002b6b, 79100x00002c34,0x0004007c,0x00000014,0x00002c25,
77510x00050081,0x0000006c,0x00002b6e,0x00006128, 79110x00002c35,0x00060041,0x00000174,0x00002c1d,
77520x00006126,0x0005008e,0x0000006c,0x00002b6f, 79120x00002c25,0x00000173,0x00000173,0x0005003e,
77530x00002b6e,0x000002fd,0x00050095,0x0000013d, 79130x00002c1d,0x00002c12,0x00000002,0x00000004,
77540x00002bbf,0x00002a80,0x00000138,0x00050051, 79140x00050080,0x00000006,0x0000292e,0x000028f5,
77550x00000006,0x00002bc0,0x00002bbf,0x00000001, 79150x0000057d,0x00060041,0x00000028,0x00002931,
77560x00050051,0x00000006,0x00002bc1,0x00002bbf, 79160x000028ad,0x0000031d,0x00000288,0x0004003d,
77570x00000000,0x00050080,0x00000006,0x00002bc6, 79170x00000027,0x00002932,0x00002931,0x0004007c,
77580x00002a87,0x00002bc0,0x00050050,0x00000007, 79180x00000006,0x00002c3b,0x00002932,0x00050095,
77590x00002bc7,0x00002bc1,0x00002bc6,0x0004007c, 79190x00000145,0x00002c56,0x00002c02,0x0000292e,
77600x00000014,0x00002bb7,0x00002bc7,0x00060041, 79200x00050051,0x00000006,0x00002c57,0x00002c56,
77610x0000016c,0x00002b74,0x00002bb7,0x0000016b, 79210x00000001,0x00050051,0x00000006,0x00002c58,
77620x0000016b,0x00050051,0x00000027,0x00002b76, 79220x00002c56,0x00000000,0x00050080,0x00000006,
77630x00002b6f,0x00000000,0x0004007c,0x00000006, 79230x00002c5d,0x00002c09,0x00002c57,0x00050050,
77640x00002bcd,0x00002b76,0x000500c7,0x00000006, 79240x00000007,0x00002c5e,0x00002c58,0x00002c5d,
77650x00002bcf,0x00002bcd,0x00000241,0x000500ab, 79250x0004007c,0x00000014,0x00002c4e,0x00002c5e,
77660x0000002f,0x00002bd0,0x00002bcf,0x00000138, 79260x00060041,0x00000174,0x00002c46,0x00002c4e,
77670x000300f7,0x00002bd7,0x00000000,0x000400fa, 79270x00000173,0x00000173,0x0005003e,0x00002c46,
77680x00002bd0,0x00002bd1,0x00002bd4,0x000200f8, 79280x00002c3b,0x00000002,0x00000004,0x00050080,
77690x00002bd4,0x000500c5,0x00000006,0x00002bd6, 79290x00000006,0x00002935,0x000028f5,0x00000588,
77700x00002bcd,0x00000241,0x000200f9,0x00002bd7, 79300x00050041,0x000001c3,0x00002938,0x000001c1,
77710x000200f8,0x00002bd1,0x000400c8,0x00000006, 79310x0000058a,0x0004003d,0x00000006,0x00002939,
77720x00002bd3,0x00002bcd,0x000200f9,0x00002bd7, 79320x00002938,0x00050095,0x00000145,0x00002c76,
77730x000200f8,0x00002bd7,0x000700f5,0x00000006, 79330x00002c02,0x00002935,0x00050051,0x00000006,
77740x00005f24,0x00002bd3,0x00002bd1,0x00002bd6, 79340x00002c77,0x00002c76,0x00000001,0x00050051,
77750x00002bd4,0x000700ed,0x00000006,0x00002b78, 79350x00000006,0x00002c78,0x00002c76,0x00000000,
77760x00002b74,0x00000142,0x00000138,0x00005f24, 79360x00050080,0x00000006,0x00002c7d,0x00002c09,
77770x00060041,0x0000016c,0x00002b7a,0x00002bb7, 79370x00002c77,0x00050050,0x00000007,0x00002c7e,
77780x0000016b,0x00000264,0x00050051,0x00000027, 79380x00002c78,0x00002c7d,0x0004007c,0x00000014,
77790x00002b7c,0x00002b6f,0x00000001,0x0004007c, 79390x00002c6e,0x00002c7e,0x00060041,0x00000174,
77800x00000006,0x00002bde,0x00002b7c,0x000500c7, 79400x00002c66,0x00002c6e,0x00000173,0x00000173,
77810x00000006,0x00002be0,0x00002bde,0x00000241, 79410x0005003e,0x00002c66,0x00002939,0x00000002,
77820x000500ab,0x0000002f,0x00002be1,0x00002be0, 79420x00000004,0x00050080,0x00000006,0x0000293c,
77830x00000138,0x000300f7,0x00002be8,0x00000000, 79430x000028f5,0x00000594,0x00050095,0x00000145,
77840x000400fa,0x00002be1,0x00002be2,0x00002be5, 79440x00002c96,0x00002c02,0x0000293c,0x00050051,
77850x000200f8,0x00002be5,0x000500c5,0x00000006, 79450x00000006,0x00002c97,0x00002c96,0x00000001,
77860x00002be7,0x00002bde,0x00000241,0x000200f9, 79460x00050051,0x00000006,0x00002c98,0x00002c96,
77870x00002be8,0x000200f8,0x00002be2,0x000400c8, 79470x00000000,0x00050080,0x00000006,0x00002c9d,
77880x00000006,0x00002be4,0x00002bde,0x000200f9, 79480x00002c09,0x00002c97,0x00050050,0x00000007,
77890x00002be8,0x000200f8,0x00002be8,0x000700f5, 79490x00002c9e,0x00002c98,0x00002c9d,0x0004007c,
77900x00000006,0x00005f25,0x00002be4,0x00002be2, 79500x00000014,0x00002c8e,0x00002c9e,0x00060041,
77910x00002be7,0x00002be5,0x000700ed,0x00000006, 79510x00000174,0x00002c86,0x00002c8e,0x00000173,
77920x00002b7e,0x00002b7a,0x00000142,0x00000138, 79520x00000173,0x0005003e,0x00002c86,0x000013a7,
77930x00005f25,0x00060041,0x0000016c,0x00002b80, 79530x00000002,0x00000004,0x00050080,0x00000006,
77940x00002bb7,0x0000016b,0x00000315,0x00050051, 79540x00002942,0x000028f5,0x0000059e,0x00050095,
77950x00000027,0x00002b82,0x00002b6f,0x00000002, 79550x00000145,0x00002cb6,0x00002c02,0x00002942,
77960x0004007c,0x00000006,0x00002bef,0x00002b82, 79560x00050051,0x00000006,0x00002cb7,0x00002cb6,
77970x000500c7,0x00000006,0x00002bf1,0x00002bef, 79570x00000001,0x00050051,0x00000006,0x00002cb8,
77980x00000241,0x000500ab,0x0000002f,0x00002bf2, 79580x00002cb6,0x00000000,0x00050080,0x00000006,
77990x00002bf1,0x00000138,0x000300f7,0x00002bf9, 79590x00002cbd,0x00002c09,0x00002cb7,0x00050050,
78000x00000000,0x000400fa,0x00002bf2,0x00002bf3, 79600x00000007,0x00002cbe,0x00002cb8,0x00002cbd,
78010x00002bf6,0x000200f8,0x00002bf6,0x000500c5, 79610x0004007c,0x00000014,0x00002cae,0x00002cbe,
78020x00000006,0x00002bf8,0x00002bef,0x00000241, 79620x00060041,0x00000174,0x00002ca6,0x00002cae,
78030x000200f9,0x00002bf9,0x000200f8,0x00002bf3, 79630x00000173,0x00000173,0x0005003e,0x00002ca6,
78040x000400c8,0x00000006,0x00002bf5,0x00002bef, 79640x000003bf,0x00000002,0x00000004,0x00050080,
78050x000200f9,0x00002bf9,0x000200f8,0x00002bf9, 79650x00000006,0x00002947,0x000028f5,0x000005a7,
78060x000700f5,0x00000006,0x00005f26,0x00002bf5, 79660x00050095,0x00000145,0x00002cd6,0x00002c02,
78070x00002bf3,0x00002bf8,0x00002bf6,0x000700ed, 79670x00002947,0x00050051,0x00000006,0x00002cd7,
78080x00000006,0x00002b84,0x00002b80,0x00000142, 79680x00002cd6,0x00000001,0x00050051,0x00000006,
78090x00000138,0x00005f26,0x00060041,0x0000016c, 79690x00002cd8,0x00002cd6,0x00000000,0x00050080,
78100x00002b86,0x00002bb7,0x0000016b,0x0000031d, 79700x00000006,0x00002cdd,0x00002c09,0x00002cd7,
78110x000300f7,0x00002c0a,0x00000000,0x000400fa, 79710x00050050,0x00000007,0x00002cde,0x00002cd8,
78120x00002bd0,0x00002c04,0x00002c07,0x000200f8, 79720x00002cdd,0x0004007c,0x00000014,0x00002cce,
78130x00002c07,0x000500c5,0x00000006,0x00002c09, 79730x00002cde,0x00060041,0x00000174,0x00002cc6,
78140x00002bcd,0x00000241,0x000200f9,0x00002c0a, 79740x00002cce,0x00000173,0x00000173,0x0005003e,
78150x000200f8,0x00002c04,0x000400c8,0x00000006, 79750x00002cc6,0x000005a9,0x00000002,0x00000004,
78160x00002c06,0x00002bcd,0x000200f9,0x00002c0a, 79760x00050041,0x0000006d,0x0000294b,0x000028ad,
78170x000200f8,0x00002c0a,0x000700f5,0x00000006, 79770x00000173,0x0004003d,0x0000006c,0x0000294c,
78180x00005f27,0x00002c06,0x00002c04,0x00002c09, 79780x0000294b,0x0004009c,0x000005b3,0x0000294d,
78190x00002c07,0x000700ef,0x00000006,0x00002b8a, 79790x0000294c,0x0004009a,0x0000002f,0x0000294e,
78200x00002b86,0x00000142,0x00000138,0x00005f27, 79800x0000294d,0x000400a8,0x0000002f,0x0000294f,
78210x00060041,0x0000016c,0x00002b8c,0x00002bb7, 79810x0000294e,0x000300f7,0x00002955,0x00000000,
78220x0000016b,0x00000325,0x000300f7,0x00002c1b, 79820x000400fa,0x0000294f,0x00002950,0x00002955,
78230x00000000,0x000400fa,0x00002be1,0x00002c15, 79830x000200f8,0x00002950,0x00050041,0x0000006d,
78240x00002c18,0x000200f8,0x00002c18,0x000500c5, 79840x00002951,0x000028ad,0x0000026c,0x0004003d,
78250x00000006,0x00002c1a,0x00002bde,0x00000241, 79850x0000006c,0x00002952,0x00002951,0x0004009c,
78260x000200f9,0x00002c1b,0x000200f8,0x00002c15, 79860x000005b3,0x00002953,0x00002952,0x0004009a,
78270x000400c8,0x00000006,0x00002c17,0x00002bde, 79870x0000002f,0x00002954,0x00002953,0x000200f9,
78280x000200f9,0x00002c1b,0x000200f8,0x00002c1b, 79880x00002955,0x000200f8,0x00002955,0x000700f5,
78290x000700f5,0x00000006,0x00005f28,0x00002c17, 79890x0000002f,0x00002956,0x0000294e,0x0000291e,
78300x00002c15,0x00002c1a,0x00002c18,0x000700ef, 79900x00002954,0x00002950,0x000400a8,0x0000002f,
78310x00000006,0x00002b90,0x00002b8c,0x00000142, 79910x00002957,0x00002956,0x000300f7,0x0000295d,
78320x00000138,0x00005f28,0x00060041,0x0000016c, 79920x00000000,0x000400fa,0x00002957,0x00002958,
78330x00002b92,0x00002bb7,0x0000016b,0x0000032d, 79930x0000295d,0x000200f8,0x00002958,0x00050041,
78340x000300f7,0x00002c2c,0x00000000,0x000400fa, 79940x0000006d,0x00002959,0x000028ad,0x0000031d,
78350x00002bf2,0x00002c26,0x00002c29,0x000200f8, 79950x0004003d,0x0000006c,0x0000295a,0x00002959,
78360x00002c29,0x000500c5,0x00000006,0x00002c2b, 79960x0004009c,0x000005b3,0x0000295b,0x0000295a,
78370x00002bef,0x00000241,0x000200f9,0x00002c2c, 79970x0004009a,0x0000002f,0x0000295c,0x0000295b,
78380x000200f8,0x00002c26,0x000400c8,0x00000006, 79980x000200f9,0x0000295d,0x000200f8,0x0000295d,
78390x00002c28,0x00002bef,0x000200f9,0x00002c2c, 79990x000700f5,0x0000002f,0x0000295e,0x00002956,
78400x000200f8,0x00002c2c,0x000700f5,0x00000006, 80000x00002955,0x0000295c,0x00002958,0x0004003d,
78410x00005f29,0x00002c28,0x00002c26,0x00002c2b, 80010x0000006c,0x00002960,0x0000294b,0x00050041,
78420x00002c29,0x000700ef,0x00000006,0x00002b96, 80020x0000006d,0x00002961,0x000028ad,0x0000026c,
78430x00002b92,0x00000142,0x00000138,0x00005f29, 80030x0004003d,0x0000006c,0x00002962,0x00002961,
78440x000200f9,0x00002b97,0x000200f8,0x00002b97, 80040x0007000c,0x0000006c,0x00002963,0x00000001,
78450x000200f9,0x000013be,0x000200f8,0x000013be, 80050x00000025,0x00002960,0x00002962,0x00050041,
78460x000200f9,0x00001398,0x000200f8,0x00001397, 80060x0000006d,0x00002964,0x000028ad,0x0000031d,
78470x00050041,0x000001bb,0x00001399,0x000001b9, 80070x0004003d,0x0000006c,0x00002965,0x00002964,
78480x000010be,0x0004003d,0x00000006,0x0000139a, 80080x0007000c,0x0000006c,0x00002966,0x00000001,
78490x00001399,0x00050084,0x00000006,0x0000139c, 80090x00000025,0x00002963,0x00002965,0x0004003d,
78500x000000ec,0x000012dd,0x00050080,0x00000006, 80100x0000006c,0x00002968,0x0000294b,0x0004003d,
78510x0000139d,0x0000139a,0x0000139c,0x00050041, 80110x0000006c,0x0000296a,0x00002961,0x0007000c,
78520x00000266,0x0000139f,0x000001b9,0x0000016b, 80120x0000006c,0x0000296b,0x00000001,0x00000028,
78530x0004003d,0x00000007,0x000013a0,0x0000139f, 80130x00002968,0x0000296a,0x0004003d,0x0000006c,
78540x00050051,0x00000006,0x0000258e,0x000013a0, 80140x0000296d,0x00002964,0x0007000c,0x0000006c,
78550x00000000,0x00050095,0x0000013d,0x00002590, 80150x0000296e,0x00000001,0x00000028,0x0000296b,
78560x0000258e,0x0000139d,0x00050051,0x00000006, 80160x0000296d,0x00060050,0x000005b3,0x0000655b,
78570x00002591,0x00002590,0x00000001,0x00050051, 80170x0000295e,0x0000295e,0x0000295e,0x000600a9,
78580x00000006,0x00002592,0x00002590,0x00000000, 80180x0000006c,0x0000655c,0x0000655b,0x00006532,
78590x00050051,0x00000006,0x00002595,0x000013a0, 80190x0000296e,0x000600a9,0x0000006c,0x0000655e,
78600x00000001,0x00050080,0x00000006,0x00002597, 80200x0000655b,0x000005dc,0x00002966,0x00050041,
78610x00002595,0x00002591,0x00050050,0x00000007, 80210x000001c3,0x00002d2e,0x000001c1,0x000001c2,
78620x00002598,0x00002592,0x00002597,0x0004007c, 80220x0004003d,0x00000006,0x00002d2f,0x00002d2e,
78630x00000014,0x00002588,0x00002598,0x00060041, 80230x00050084,0x00000006,0x00002d30,0x000001e3,
78640x0000016c,0x00002580,0x00002588,0x0000016b, 80240x00002d2f,0x00050080,0x00000006,0x00002d31,
78650x0000016b,0x0005003e,0x00002580,0x00000539, 80250x000001cc,0x00002d30,0x00050080,0x00000006,
78660x00000002,0x00000004,0x000500b0,0x0000002f, 80260x00002d37,0x00002d2f,0x00000695,0x00050086,
78670x000013a5,0x000012dd,0x00000470,0x000300f7, 80270x00000006,0x00002d38,0x00002d37,0x000001c6,
78680x000013a7,0x00000000,0x000400fa,0x000013a5, 80280x00050084,0x00000006,0x00002d2a,0x000001cc,
78690x000013a6,0x000013a7,0x000200f8,0x000013a6, 80290x00002d38,0x00050080,0x00000006,0x00002d2b,
78700x00050041,0x00000266,0x000013ab,0x000001b9, 80300x00002d31,0x00002d2a,0x00050080,0x00000006,
78710x00000264,0x0004003d,0x00000007,0x000013ac, 80310x00002d25,0x00002d2b,0x00002d2a,0x00050084,
78720x000013ab,0x00050051,0x00000006,0x000025ae, 80320x00000006,0x00002cf5,0x000001f7,0x000028f0,
78730x000013ac,0x00000000,0x00050095,0x0000013d, 80330x00050080,0x00000006,0x00002cf6,0x00002d25,
78740x000025b0,0x000025ae,0x0000139c,0x00050051, 80340x00002cf5,0x00050041,0x0000026e,0x00002cf7,
78750x00000006,0x000025b1,0x000025b0,0x00000001, 80350x000001c1,0x0000026c,0x0004003d,0x00000007,
78760x00050051,0x00000006,0x000025b2,0x000025b0, 80360x00002cf8,0x00002cf7,0x00050051,0x00000027,
78770x00000000,0x00050051,0x00000006,0x000025b5, 80370x00002cfb,0x0000655e,0x00000000,0x0004007c,
78780x000013ac,0x00000001,0x00050080,0x00000006, 80380x00000006,0x00002d45,0x00002cfb,0x00050051,
78790x000025b7,0x000025b5,0x000025b1,0x00050050, 80390x00000006,0x00002d5e,0x00002cf8,0x00000000,
78800x00000007,0x000025b8,0x000025b2,0x000025b7, 80400x00050095,0x00000145,0x00002d60,0x00002d5e,
78810x0004007c,0x00000014,0x000025a8,0x000025b8, 80410x00002cf6,0x00050051,0x00000006,0x00002d61,
78820x00060041,0x0000016c,0x000025a0,0x000025a8, 80420x00002d60,0x00000001,0x00050051,0x00000006,
78830x0000016b,0x0000016b,0x0005003e,0x000025a0, 80430x00002d62,0x00002d60,0x00000000,0x00050051,
78840x00000539,0x00000002,0x00000004,0x00050080, 80440x00000006,0x00002d65,0x00002cf8,0x00000001,
78850x00000006,0x000013b2,0x000001d4,0x0000139c, 80450x00050080,0x00000006,0x00002d67,0x00002d65,
78860x00050095,0x0000013d,0x000025d0,0x000025ae, 80460x00002d61,0x00050050,0x00000007,0x00002d68,
78870x000013b2,0x00050051,0x00000006,0x000025d1, 80470x00002d62,0x00002d67,0x0004007c,0x00000014,
78880x000025d0,0x00000001,0x00050051,0x00000006, 80480x00002d58,0x00002d68,0x00060041,0x00000174,
78890x000025d2,0x000025d0,0x00000000,0x00050080, 80490x00002d50,0x00002d58,0x00000173,0x00000173,
78900x00000006,0x000025d7,0x000025b5,0x000025d1, 80500x0005003e,0x00002d50,0x00002d45,0x00000002,
78910x00050050,0x00000007,0x000025d8,0x000025d2, 80510x00000004,0x00050080,0x00000006,0x00002cfe,
78920x000025d7,0x0004007c,0x00000014,0x000025c8, 80520x00002cf6,0x000000f3,0x00050051,0x00000027,
78930x000025d8,0x00060041,0x0000016c,0x000025c0, 80530x00002d02,0x0000655e,0x00000001,0x0004007c,
78940x000025c8,0x0000016b,0x0000016b,0x0005003e, 80540x00000006,0x00002d6e,0x00002d02,0x00050095,
78950x000025c0,0x00000138,0x00000002,0x00000004, 80550x00000145,0x00002d89,0x00002d5e,0x00002cfe,
78960x000200f9,0x000013a7,0x000200f8,0x000013a7, 80560x00050051,0x00000006,0x00002d8a,0x00002d89,
78970x000200f9,0x00001398,0x000200f8,0x00001398, 80570x00000001,0x00050051,0x00000006,0x00002d8b,
78980x000200f9,0x000013fd,0x000200f8,0x000013fd, 80580x00002d89,0x00000000,0x00050080,0x00000006,
78990x000100fd,0x00010038} 80590x00002d90,0x00002d65,0x00002d8a,0x00050050,
80600x00000007,0x00002d91,0x00002d8b,0x00002d90,
80610x0004007c,0x00000014,0x00002d81,0x00002d91,
80620x00060041,0x00000174,0x00002d79,0x00002d81,
80630x00000173,0x00000173,0x0005003e,0x00002d79,
80640x00002d6e,0x00000002,0x00000004,0x00050080,
80650x00000006,0x00002d05,0x00002cf6,0x000001d5,
80660x00050051,0x00000027,0x00002d09,0x0000655e,
80670x00000002,0x0004007c,0x00000006,0x00002d97,
80680x00002d09,0x00050095,0x00000145,0x00002db2,
80690x00002d5e,0x00002d05,0x00050051,0x00000006,
80700x00002db3,0x00002db2,0x00000001,0x00050051,
80710x00000006,0x00002db4,0x00002db2,0x00000000,
80720x00050080,0x00000006,0x00002db9,0x00002d65,
80730x00002db3,0x00050050,0x00000007,0x00002dba,
80740x00002db4,0x00002db9,0x0004007c,0x00000014,
80750x00002daa,0x00002dba,0x00060041,0x00000174,
80760x00002da2,0x00002daa,0x00000173,0x00000173,
80770x0005003e,0x00002da2,0x00002d97,0x00000002,
80780x00000004,0x00050080,0x00000006,0x00002d0c,
80790x00002cf6,0x000001dc,0x00050051,0x00000027,
80800x00002d10,0x0000655c,0x00000000,0x0004007c,
80810x00000006,0x00002dc0,0x00002d10,0x00050095,
80820x00000145,0x00002ddb,0x00002d5e,0x00002d0c,
80830x00050051,0x00000006,0x00002ddc,0x00002ddb,
80840x00000001,0x00050051,0x00000006,0x00002ddd,
80850x00002ddb,0x00000000,0x00050080,0x00000006,
80860x00002de2,0x00002d65,0x00002ddc,0x00050050,
80870x00000007,0x00002de3,0x00002ddd,0x00002de2,
80880x0004007c,0x00000014,0x00002dd3,0x00002de3,
80890x00060041,0x00000174,0x00002dcb,0x00002dd3,
80900x00000173,0x00000173,0x0005003e,0x00002dcb,
80910x00002dc0,0x00000002,0x00000004,0x00050080,
80920x00000006,0x00002d13,0x00002cf6,0x000001e3,
80930x00050051,0x00000027,0x00002d17,0x0000655c,
80940x00000001,0x0004007c,0x00000006,0x00002de9,
80950x00002d17,0x00050095,0x00000145,0x00002e04,
80960x00002d5e,0x00002d13,0x00050051,0x00000006,
80970x00002e05,0x00002e04,0x00000001,0x00050051,
80980x00000006,0x00002e06,0x00002e04,0x00000000,
80990x00050080,0x00000006,0x00002e0b,0x00002d65,
81000x00002e05,0x00050050,0x00000007,0x00002e0c,
81010x00002e06,0x00002e0b,0x0004007c,0x00000014,
81020x00002dfc,0x00002e0c,0x00060041,0x00000174,
81030x00002df4,0x00002dfc,0x00000173,0x00000173,
81040x0005003e,0x00002df4,0x00002de9,0x00000002,
81050x00000004,0x00050080,0x00000006,0x00002d1a,
81060x00002cf6,0x000002a1,0x00050051,0x00000027,
81070x00002d1e,0x0000655c,0x00000002,0x0004007c,
81080x00000006,0x00002e12,0x00002d1e,0x00050095,
81090x00000145,0x00002e2d,0x00002d5e,0x00002d1a,
81100x00050051,0x00000006,0x00002e2e,0x00002e2d,
81110x00000001,0x00050051,0x00000006,0x00002e2f,
81120x00002e2d,0x00000000,0x00050080,0x00000006,
81130x00002e34,0x00002d65,0x00002e2e,0x00050050,
81140x00000007,0x00002e35,0x00002e2f,0x00002e34,
81150x0004007c,0x00000014,0x00002e25,0x00002e35,
81160x00060041,0x00000174,0x00002e1d,0x00002e25,
81170x00000173,0x00000173,0x0005003e,0x00002e1d,
81180x00002e12,0x00000002,0x00000004,0x000300f7,
81190x00002e75,0x00000000,0x000300fb,0x00000140,
81200x00002e44,0x000200f8,0x00002e44,0x000500bc,
81210x0000002f,0x00002e7c,0x00002cfb,0x00002d10,
81220x000300f7,0x00002e83,0x00000000,0x000400fa,
81230x00002e7c,0x00002e7d,0x00002e83,0x000200f8,
81240x00002e7d,0x000500bc,0x0000002f,0x00002e82,
81250x00002d02,0x00002d17,0x000200f9,0x00002e83,
81260x000200f8,0x00002e83,0x000700f5,0x0000002f,
81270x00002e84,0x00002e7c,0x00002e44,0x00002e82,
81280x00002e7d,0x000300f7,0x00002e8b,0x00000000,
81290x000400fa,0x00002e84,0x00002e85,0x00002e8b,
81300x000200f8,0x00002e85,0x000500bc,0x0000002f,
81310x00002e8a,0x00002d09,0x00002d1e,0x000200f9,
81320x00002e8b,0x000200f8,0x00002e8b,0x000700f5,
81330x0000002f,0x00002e8c,0x00002e84,0x00002e83,
81340x00002e8a,0x00002e85,0x000400a8,0x0000002f,
81350x00002e8d,0x00002e8c,0x000300f7,0x00002e49,
81360x00000000,0x000400fa,0x00002e8d,0x00002e48,
81370x00002e49,0x000200f8,0x00002e48,0x000200f9,
81380x00002e75,0x000200f8,0x00002e49,0x00050081,
81390x0000006c,0x00002e4c,0x0000655e,0x0000655c,
81400x0005008e,0x0000006c,0x00002e4d,0x00002e4c,
81410x00000305,0x00050095,0x00000145,0x00002e9d,
81420x00002d5e,0x00000140,0x00050051,0x00000006,
81430x00002e9e,0x00002e9d,0x00000001,0x00050051,
81440x00000006,0x00002e9f,0x00002e9d,0x00000000,
81450x00050080,0x00000006,0x00002ea4,0x00002d65,
81460x00002e9e,0x00050050,0x00000007,0x00002ea5,
81470x00002e9f,0x00002ea4,0x0004007c,0x00000014,
81480x00002e95,0x00002ea5,0x00060041,0x00000174,
81490x00002e52,0x00002e95,0x00000173,0x00000173,
81500x00050051,0x00000027,0x00002e54,0x00002e4d,
81510x00000000,0x0004007c,0x00000006,0x00002eab,
81520x00002e54,0x000500c7,0x00000006,0x00002ead,
81530x00002eab,0x00000249,0x000500ab,0x0000002f,
81540x00002eae,0x00002ead,0x00000140,0x000300f7,
81550x00002eb5,0x00000000,0x000400fa,0x00002eae,
81560x00002eaf,0x00002eb2,0x000200f8,0x00002eb2,
81570x000500c5,0x00000006,0x00002eb4,0x00002eab,
81580x00000249,0x000200f9,0x00002eb5,0x000200f8,
81590x00002eaf,0x000400c8,0x00000006,0x00002eb1,
81600x00002eab,0x000200f9,0x00002eb5,0x000200f8,
81610x00002eb5,0x000700f5,0x00000006,0x0000634a,
81620x00002eb1,0x00002eaf,0x00002eb4,0x00002eb2,
81630x000700ed,0x00000006,0x00002e56,0x00002e52,
81640x0000014a,0x00000140,0x0000634a,0x00060041,
81650x00000174,0x00002e58,0x00002e95,0x00000173,
81660x0000026c,0x00050051,0x00000027,0x00002e5a,
81670x00002e4d,0x00000001,0x0004007c,0x00000006,
81680x00002ebc,0x00002e5a,0x000500c7,0x00000006,
81690x00002ebe,0x00002ebc,0x00000249,0x000500ab,
81700x0000002f,0x00002ebf,0x00002ebe,0x00000140,
81710x000300f7,0x00002ec6,0x00000000,0x000400fa,
81720x00002ebf,0x00002ec0,0x00002ec3,0x000200f8,
81730x00002ec3,0x000500c5,0x00000006,0x00002ec5,
81740x00002ebc,0x00000249,0x000200f9,0x00002ec6,
81750x000200f8,0x00002ec0,0x000400c8,0x00000006,
81760x00002ec2,0x00002ebc,0x000200f9,0x00002ec6,
81770x000200f8,0x00002ec6,0x000700f5,0x00000006,
81780x0000634b,0x00002ec2,0x00002ec0,0x00002ec5,
81790x00002ec3,0x000700ed,0x00000006,0x00002e5c,
81800x00002e58,0x0000014a,0x00000140,0x0000634b,
81810x00060041,0x00000174,0x00002e5e,0x00002e95,
81820x00000173,0x0000031d,0x00050051,0x00000027,
81830x00002e60,0x00002e4d,0x00000002,0x0004007c,
81840x00000006,0x00002ecd,0x00002e60,0x000500c7,
81850x00000006,0x00002ecf,0x00002ecd,0x00000249,
81860x000500ab,0x0000002f,0x00002ed0,0x00002ecf,
81870x00000140,0x000300f7,0x00002ed7,0x00000000,
81880x000400fa,0x00002ed0,0x00002ed1,0x00002ed4,
81890x000200f8,0x00002ed4,0x000500c5,0x00000006,
81900x00002ed6,0x00002ecd,0x00000249,0x000200f9,
81910x00002ed7,0x000200f8,0x00002ed1,0x000400c8,
81920x00000006,0x00002ed3,0x00002ecd,0x000200f9,
81930x00002ed7,0x000200f8,0x00002ed7,0x000700f5,
81940x00000006,0x0000634c,0x00002ed3,0x00002ed1,
81950x00002ed6,0x00002ed4,0x000700ed,0x00000006,
81960x00002e62,0x00002e5e,0x0000014a,0x00000140,
81970x0000634c,0x00060041,0x00000174,0x00002e64,
81980x00002e95,0x00000173,0x00000325,0x000300f7,
81990x00002ee8,0x00000000,0x000400fa,0x00002eae,
82000x00002ee2,0x00002ee5,0x000200f8,0x00002ee5,
82010x000500c5,0x00000006,0x00002ee7,0x00002eab,
82020x00000249,0x000200f9,0x00002ee8,0x000200f8,
82030x00002ee2,0x000400c8,0x00000006,0x00002ee4,
82040x00002eab,0x000200f9,0x00002ee8,0x000200f8,
82050x00002ee8,0x000700f5,0x00000006,0x0000634d,
82060x00002ee4,0x00002ee2,0x00002ee7,0x00002ee5,
82070x000700ef,0x00000006,0x00002e68,0x00002e64,
82080x0000014a,0x00000140,0x0000634d,0x00060041,
82090x00000174,0x00002e6a,0x00002e95,0x00000173,
82100x0000032d,0x000300f7,0x00002ef9,0x00000000,
82110x000400fa,0x00002ebf,0x00002ef3,0x00002ef6,
82120x000200f8,0x00002ef6,0x000500c5,0x00000006,
82130x00002ef8,0x00002ebc,0x00000249,0x000200f9,
82140x00002ef9,0x000200f8,0x00002ef3,0x000400c8,
82150x00000006,0x00002ef5,0x00002ebc,0x000200f9,
82160x00002ef9,0x000200f8,0x00002ef9,0x000700f5,
82170x00000006,0x0000634e,0x00002ef5,0x00002ef3,
82180x00002ef8,0x00002ef6,0x000700ef,0x00000006,
82190x00002e6e,0x00002e6a,0x0000014a,0x00000140,
82200x0000634e,0x00060041,0x00000174,0x00002e70,
82210x00002e95,0x00000173,0x00000335,0x000300f7,
82220x00002f0a,0x00000000,0x000400fa,0x00002ed0,
82230x00002f04,0x00002f07,0x000200f8,0x00002f07,
82240x000500c5,0x00000006,0x00002f09,0x00002ecd,
82250x00000249,0x000200f9,0x00002f0a,0x000200f8,
82260x00002f04,0x000400c8,0x00000006,0x00002f06,
82270x00002ecd,0x000200f9,0x00002f0a,0x000200f8,
82280x00002f0a,0x000700f5,0x00000006,0x0000634f,
82290x00002f06,0x00002f04,0x00002f09,0x00002f07,
82300x000700ef,0x00000006,0x00002e74,0x00002e70,
82310x0000014a,0x00000140,0x0000634f,0x000200f9,
82320x00002e75,0x000200f8,0x00002e75,0x000200f9,
82330x000014b0,0x000200f8,0x000014b0,0x000200f9,
82340x0000148a,0x000200f8,0x00001489,0x00050041,
82350x000001c3,0x0000148b,0x000001c1,0x000003c1,
82360x0004003d,0x00000006,0x0000148c,0x0000148b,
82370x00050084,0x00000006,0x0000148e,0x000000f3,
82380x000013a7,0x00050080,0x00000006,0x0000148f,
82390x0000148c,0x0000148e,0x00050041,0x0000026e,
82400x00001491,0x000001c1,0x00000173,0x0004003d,
82410x00000007,0x00001492,0x00001491,0x00050051,
82420x00000006,0x00002861,0x00001492,0x00000000,
82430x00050095,0x00000145,0x00002863,0x00002861,
82440x0000148f,0x00050051,0x00000006,0x00002864,
82450x00002863,0x00000001,0x00050051,0x00000006,
82460x00002865,0x00002863,0x00000000,0x00050051,
82470x00000006,0x00002868,0x00001492,0x00000001,
82480x00050080,0x00000006,0x0000286a,0x00002868,
82490x00002864,0x00050050,0x00000007,0x0000286b,
82500x00002865,0x0000286a,0x0004007c,0x00000014,
82510x0000285b,0x0000286b,0x00060041,0x00000174,
82520x00002853,0x0000285b,0x00000173,0x00000173,
82530x0005003e,0x00002853,0x000003bf,0x00000002,
82540x00000004,0x000500b0,0x0000002f,0x00001497,
82550x000013a7,0x000004d7,0x000300f7,0x00001499,
82560x00000000,0x000400fa,0x00001497,0x00001498,
82570x00001499,0x000200f8,0x00001498,0x00050041,
82580x0000026e,0x0000149d,0x000001c1,0x0000026c,
82590x0004003d,0x00000007,0x0000149e,0x0000149d,
82600x00050051,0x00000006,0x00002881,0x0000149e,
82610x00000000,0x00050095,0x00000145,0x00002883,
82620x00002881,0x0000148e,0x00050051,0x00000006,
82630x00002884,0x00002883,0x00000001,0x00050051,
82640x00000006,0x00002885,0x00002883,0x00000000,
82650x00050051,0x00000006,0x00002888,0x0000149e,
82660x00000001,0x00050080,0x00000006,0x0000288a,
82670x00002888,0x00002884,0x00050050,0x00000007,
82680x0000288b,0x00002885,0x0000288a,0x0004007c,
82690x00000014,0x0000287b,0x0000288b,0x00060041,
82700x00000174,0x00002873,0x0000287b,0x00000173,
82710x00000173,0x0005003e,0x00002873,0x000003bf,
82720x00000002,0x00000004,0x00050080,0x00000006,
82730x000014a4,0x000001dc,0x0000148e,0x00050095,
82740x00000145,0x000028a3,0x00002881,0x000014a4,
82750x00050051,0x00000006,0x000028a4,0x000028a3,
82760x00000001,0x00050051,0x00000006,0x000028a5,
82770x000028a3,0x00000000,0x00050080,0x00000006,
82780x000028aa,0x00002888,0x000028a4,0x00050050,
82790x00000007,0x000028ab,0x000028a5,0x000028aa,
82800x0004007c,0x00000014,0x0000289b,0x000028ab,
82810x00060041,0x00000174,0x00002893,0x0000289b,
82820x00000173,0x00000173,0x0005003e,0x00002893,
82830x00000140,0x00000002,0x00000004,0x000200f9,
82840x00001499,0x000200f8,0x00001499,0x000200f9,
82850x0000148a,0x000200f8,0x0000148a,0x000200f9,
82860x000014ef,0x000200f8,0x000014ef,0x000100fd,
82870x00010038}
diff --git a/runtime/test/address_guard_test.cpp b/runtime/test/address_guard_test.cpp
new file mode 100644
index 000000000..02baa7bb8
--- /dev/null
+++ b/runtime/test/address_guard_test.cpp
@@ -0,0 +1,127 @@
1// leonida::address_guard::AddressGuardTable (src/address_guard.h): the address guard's page table. Pages any byte
2// of a span touches are backed, a chunk keeps its level-2 block for good, a released span's bits go, negative
3// offsets (a buffer below the arena) and spans across 4 GiB chunks work, only changed words are written, level-2
4// before level-1, and a chunk past the table's room gets the full block. No GPU, no device.
5#include "../src/address_guard.h"
6
7#include <cstdint>
8#include <cstdio>
9#include <utility>
10#include <vector>
11
12#define EXPECT(condition) do { \
13 if (!(condition)) { std::fprintf(stderr, "line %d: %s\n", __LINE__, #condition); return 1; } \
14} while (0)
15
16namespace {
17
18using leonida::address_guard::AddressGuardTable;
19using Spans = std::vector<std::pair<std::uint64_t, std::uint64_t>>;
20namespace ag = leonida::address_guard;
21
22constexpr std::uint64_t kLimit = 0x80000; // the "arena"
23constexpr std::uint64_t kGiB = 1ull << 30;
24
25// A copy of the GPU's table, written only through assign()'s callback, and the order of the writes.
26struct Gpu {
27 std::vector<std::uint32_t> words;
28 std::vector<std::size_t> order;
29 explicit Gpu(const AddressGuardTable& t) : words(t.words()) {}
30 auto writer() {
31 return [this](std::size_t i, std::uint32_t v) {
32 words[i] = v;
33 order.push_back(i);
34 };
35 }
36};
37
38int basics() {
39 AddressGuardTable t(4);
40 Gpu gpu(t);
41 EXPECT(t.word_count() == ag::kGuardLevel1 + 6u * ag::kGuardBlockWords);
42 EXPECT(!t.passes(0x90000, 4, kLimit));
43 EXPECT(t.passes(0x7fffc, 4, kLimit)); // below the limit: no lookup
44 EXPECT(!t.passes(0x7fffc, 8, kLimit)); // its last byte is past it, on an unbacked page
45
46 const Spans spans{{0x90000, 0x90001}, {5 * 4 * kGiB + 0x1000, 5 * 4 * kGiB + 0x3000}};
47 const std::size_t written = t.assign(spans, gpu.writer());
48 EXPECT(written > 0);
49 EXPECT(gpu.words == t.words());
50 EXPECT(t.blocks_used() == 2);
51 EXPECT(t.passes(0x90000, 4, kLimit));
52 EXPECT(t.passes(0x90ffc, 4, kLimit)); // one byte of the span marks the whole page
53 EXPECT(!t.passes(0x90ffc, 8, kLimit)); // the last byte is on the next page
54 EXPECT(t.passes(5 * 4 * kGiB + 0x2ff0, 16, kLimit));
55 EXPECT(!t.passes(5 * 4 * kGiB + 0x3000, 4, kLimit));
56 EXPECT(!t.passes(6 * 4 * kGiB, 4, kLimit));
57
58 // Level-2 words are written before level-1 ones.
59 bool seen_level1 = false;
60 for (const std::size_t i : gpu.order) {
61 if (i < ag::kGuardLevel1) seen_level1 = true;
62 else EXPECT(!seen_level1);
63 }
64
65 // The same spans again: nothing to write.
66 gpu.order.clear();
67 EXPECT(t.assign(spans, gpu.writer()) == 0);
68
69 // A release: its bits go, its chunk keeps its block.
70 const std::uint32_t chunk5 = t.words()[5];
71 EXPECT(chunk5 >= ag::kFirstBlock);
72 EXPECT(t.assign(Spans{{0x90000, 0x91000}}, gpu.writer()) > 0);
73 EXPECT(gpu.words == t.words());
74 EXPECT(!t.passes(5 * 4 * kGiB + 0x2ff0, 4, kLimit));
75 EXPECT(t.words()[5] == chunk5);
76 EXPECT(t.passes(0x90000, 4, kLimit));
77 return 0;
78}
79
80int negative_and_wide() {
81 AddressGuardTable t(4);
82 Gpu gpu(t);
83 // A buffer 8 KiB below heap_base (LEONIDA_IMPORT_BELOW_ARENA=1), as the 48-bit offset a V# holds.
84 const std::uint64_t below = (0ull - 0x2000) & ag::kMask48;
85 // One that runs from below heap_base into the arena's first page: wraps through 2^48.
86 const std::uint64_t wrap = (0ull - 0x1000) & ag::kMask48;
87 // A 6 GiB buffer across two chunks: whole words of bits.
88 const std::uint64_t wide = 8 * kGiB + 0x10000;
89 t.assign(Spans{{below, below + 0x1000}, {wrap, 0x1000}, {wide, wide + 6 * kGiB}}, gpu.writer());
90 EXPECT(gpu.words == t.words());
91 EXPECT(t.passes(below, 4, kLimit));
92 EXPECT(t.passes(0ull - 0x2000, 4, kLimit)); // the same offset sign-extended, as the shaders pass it
93 EXPECT(t.passes(0ull - 4, 8, kLimit)); // across zero: both pages backed
94 EXPECT(!t.passes(0ull - 0x3000, 4, kLimit));
95 EXPECT(t.passes(wide, 4, kLimit));
96 EXPECT(t.passes(wide + 4 * kGiB, 4, kLimit));
97 EXPECT(t.passes(wide + 6 * kGiB - 4, 4, kLimit));
98 EXPECT(!t.passes(wide + 6 * kGiB, 4, kLimit));
99 EXPECT(!t.passes(wide - 4, 8, kLimit));
100 EXPECT(t.blocks_used() == 4); // chunks 0xffff, 0 (the wrap), 2 and 3
101 return 0;
102}
103
104int out_of_room() {
105 AddressGuardTable t(1);
106 Gpu gpu(t);
107 t.assign(Spans{{4 * kGiB, 4 * kGiB + 1}, {8 * kGiB, 8 * kGiB + 1}}, gpu.writer());
108 EXPECT(t.blocks_used() == 1);
109 EXPECT(t.overflowed() == 1);
110 EXPECT(t.passes(4 * kGiB, 4, kLimit));
111 EXPECT(!t.passes(4 * kGiB + 0x1000, 4, kLimit));
112 EXPECT(t.passes(8 * kGiB + 0x5000, 4, kLimit)); // the full block: all of that chunk passes
113 EXPECT(t.words()[2] == ag::kFullBlock);
114 return 0;
115}
116
117} // namespace
118
119int main() {
120 // "LGUARD01" little-endian, as tools/address_guard.py packs it and the shaders compare it.
121 static_assert(ag::magic() == 0x313044524155474Cull);
122 if (int r = basics()) return r;
123 if (int r = negative_and_wide()) return r;
124 if (int r = out_of_room()) return r;
125 std::puts("address_guard_test: ok");
126 return 0;
127}
diff --git a/runtime/test/bindless_sizing_test.cpp b/runtime/test/bindless_sizing_test.cpp
index b7d501aab..b83294852 100644
--- a/runtime/test/bindless_sizing_test.cpp
+++ b/runtime/test/bindless_sizing_test.cpp
@@ -133,18 +133,18 @@ int main() {
133 const Device d = uniform(1048576, 1048576); 133 const Device d = uniform(1048576, 1048576);
134 BindlessFeatures f = with_ms(update_after_bind); 134 BindlessFeatures f = with_ms(update_after_bind);
135 EXPECT(bindless::size_bindings(f, d.limits, d.v11, d.v12)); 135 EXPECT(bindless::size_bindings(f, d.limits, d.v11, d.v12));
136 EXPECT(count(f, D::dim_2d) == bindless::max_2d_images); 136 EXPECT(count(f, D::dim_2d) == bindless::max_images);
137 EXPECT(f.counts[bindless::sampler_binding] == 4000 - bindless::reserved_samplers); 137 EXPECT(f.counts[bindless::sampler_binding] == 4000 - bindless::reserved_samplers);
138 EXPECT(f.counts[bindless::sampler_binding] > 2048); // a full sampler heap and the fallback 138 EXPECT(f.counts[bindless::sampler_binding] > 2048); // a full sampler heap and the fallback
139 EXPECT(storage(f, D::dim_2d) == bindless::max_storage_indices); 139 EXPECT(storage(f, D::dim_2d) == bindless::max_storage_indices);
140 // The other dimensions grow too (a title's cube maps, texture arrays and 1D lookups outnumber the defaults); 140 // The other dimensions grow as far as 2D (a title's textures are of whichever dimension it chose); their
141 // their storage arrays hold as many indices as the 2D one. The storage-only 1D array keeps its 256. 141 // storage arrays hold as many indices as the 2D one. The storage-only 1D array keeps its 256.
142 EXPECT(count(f, D::dim_2d_array) == bindless::max_2d_array_images && 142 EXPECT(count(f, D::dim_2d_array) == bindless::max_images && count(f, D::dim_3d) == bindless::max_images &&
143 count(f, D::dim_3d) == bindless::max_3d_images && count(f, D::dim_1d) == bindless::max_1d_images); 143 count(f, D::dim_1d) == bindless::max_images);
144 EXPECT(storage(f, D::dim_2d_array) == bindless::max_storage_indices && 144 EXPECT(storage(f, D::dim_2d_array) == bindless::max_storage_indices &&
145 storage(f, D::dim_3d) == bindless::max_storage_indices && 145 storage(f, D::dim_3d) == bindless::max_storage_indices &&
146 storage(f, D::dim_1d) == bindless::max_storage_indices); 146 storage(f, D::dim_1d) == bindless::max_storage_indices);
147 EXPECT(storage(f, D::dim_1d_array) == 256 && totals(f).all == 153697); 147 EXPECT(storage(f, D::dim_1d_array) == 256 && totals(f).all == 325729);
148 EXPECT(f.ms_samples[0] == VK_SAMPLE_COUNT_4_BIT && f.ms_samples[2] == VK_SAMPLE_COUNT_4_BIT); 148 EXPECT(f.ms_samples[0] == VK_SAMPLE_COUNT_4_BIT && f.ms_samples[2] == VK_SAMPLE_COUNT_4_BIT);
149 EXPECT(storage_consistent(f)); 149 EXPECT(storage_consistent(f));
150 if (update_after_bind) 150 if (update_after_bind)
@@ -152,6 +152,44 @@ int main() {
152 count(f, D::dim_2d), f.counts[bindless::sampler_binding], storage(f, D::dim_2d), totals(f).all); 152 count(f, D::dim_2d), f.counts[bindless::sampler_binding], storage(f, D::dim_2d), totals(f).all);
153 } 153 }
154 154
155 // RADV (Mesa 26.3, a Raphael iGPU and an RX 7900 XTX alike) and llvmpipe: their update-after-bind limits hold
156 // every sampled dimension at the full size. A world run kept 4090 live 1D textures, filling the 4096 1D indices
157 // the set used to stop at whatever the device held; now 1D, 3D and 2D-array images get as many as 2D.
158 {
159 Device radv = uniform(8388606, 8388606);
160 radv.limits.maxPerStageResources = radv.v12.maxPerStageUpdateAfterBindResources = 8388606;
161 radv.v12.maxUpdateAfterBindDescriptorsInAllPools = 67108863;
162 radv.v11.maxPerSetDescriptors = 22369621;
163 radv.limits.maxSamplerAllocationCount = 4294967295u;
164 Device lvp = uniform(1015808, 1015808);
165 lvp.limits.maxPerStageResources = lvp.v12.maxPerStageUpdateAfterBindResources = 1015808;
166 lvp.v11.maxPerSetDescriptors = 1015808;
167 lvp.limits.maxSamplerAllocationCount = 32768;
168 for (const Device* d : {&radv, &lvp}) {
169 BindlessFeatures f = with_ms(true);
170 EXPECT(bindless::size_bindings(f, d->limits, d->v11, d->v12));
171 for (const D dimension : {D::dim_2d, D::dim_2d_array, D::dim_3d, D::dim_1d}) {
172 EXPECT(count(f, dimension) == bindless::max_images);
173 EXPECT(count(f, dimension) > 4096 + 1); // more than 4096 live images and the fallback
174 }
175 EXPECT(storage_consistent(f));
176 }
177 }
178
179 // A device whose limits stop growth short of max_images: the 2D-array, 3D and 1D arrays share what is left alike,
180 // whichever is grown first.
181 {
182 Device d = uniform(1048576, 1048576);
183 d.v12.maxPerStageDescriptorUpdateAfterBindSampledImages = 65536 + 3 * 20000 + 6 * 256 + bindless::growth_headroom;
184 BindlessFeatures f = with_ms(true);
185 EXPECT(bindless::size_bindings(f, d.limits, d.v11, d.v12));
186 EXPECT(count(f, D::dim_2d) == bindless::max_images);
187 EXPECT(count(f, D::dim_2d_array) == count(f, D::dim_3d) && count(f, D::dim_3d) == count(f, D::dim_1d));
188 EXPECT(count(f, D::dim_1d) > 4096 && count(f, D::dim_1d) <= 20000);
189 EXPECT(totals(f).sampled + bindless::growth_headroom <= d.v12.maxPerStageDescriptorUpdateAfterBindSampledImages);
190 EXPECT(storage_consistent(f));
191 }
192
155 // At today's sizes exactly (5632 sampled images, 1024 samplers, 4352 storage images): no MS pairs. 193 // At today's sizes exactly (5632 sampled images, 1024 samplers, 4352 storage images): no MS pairs.
156 { 194 {
157 Device d = uniform(1048576, 1048576); 195 Device d = uniform(1048576, 1048576);
@@ -191,7 +229,7 @@ int main() {
191 BindlessFeatures uab = with_ms(true), plain = with_ms(false); 229 BindlessFeatures uab = with_ms(true), plain = with_ms(false);
192 EXPECT(bindless::size_bindings(uab, d.limits, d.v11, d.v12)); 230 EXPECT(bindless::size_bindings(uab, d.limits, d.v11, d.v12));
193 EXPECT(bindless::size_bindings(plain, d.limits, d.v11, d.v12)); 231 EXPECT(bindless::size_bindings(plain, d.limits, d.v11, d.v12));
194 EXPECT(count(uab, D::dim_2d) == bindless::max_2d_images); 232 EXPECT(count(uab, D::dim_2d) == bindless::max_images);
195 const Totals t = totals(plain); 233 const Totals t = totals(plain);
196 EXPECT(count(plain, D::dim_2d) > 4096 && count(plain, D::dim_2d) < 16384); 234 EXPECT(count(plain, D::dim_2d) > 4096 && count(plain, D::dim_2d) < 16384);
197 EXPECT(t.sampled + bindless::growth_headroom <= 16384 && t.storage + bindless::growth_headroom <= 16384); 235 EXPECT(t.sampled + bindless::growth_headroom <= 16384 && t.storage + bindless::growth_headroom <= 16384);
@@ -232,7 +270,7 @@ int main() {
232 BindlessFeatures f = with_ms(true); 270 BindlessFeatures f = with_ms(true);
233 EXPECT(bindless::size_bindings(f, d.limits, d.v11, d.v12, all_supported)); 271 EXPECT(bindless::size_bindings(f, d.limits, d.v11, d.v12, all_supported));
234 EXPECT(asked > 0 && asked_within == 0 && missing_storage == 0); 272 EXPECT(asked > 0 && asked_within == 0 && missing_storage == 0);
235 EXPECT(count(f, D::dim_2d) == bindless::max_2d_images && 273 EXPECT(count(f, D::dim_2d) == bindless::max_images &&
236 f.counts[bindless::sampler_binding] == 4000 - bindless::reserved_samplers); 274 f.counts[bindless::sampler_binding] == 4000 - bindless::reserved_samplers);
237 EXPECT(storage(f, D::dim_2d) == bindless::max_storage_indices && storage_consistent(f)); 275 EXPECT(storage(f, D::dim_2d) == bindless::max_storage_indices && storage_consistent(f));
238 276
diff --git a/runtime/test/check_atexit.cmake b/runtime/test/check_atexit.cmake
index 255bb3a4f..6b34c9d81 100644
--- a/runtime/test/check_atexit.cmake
+++ b/runtime/test/check_atexit.cmake
@@ -26,6 +26,12 @@ set(code_c_exit 12)
26# exit(7) is running a slow handler when a second thread calls _exit(7): the exit lock holds it back. 26# exit(7) is running a slow handler when a second thread calls _exit(7): the exit lock holds it back.
27set(expect_concurrent_exit "${ctors};slow handler started;slow handler done;${handlers}") 27set(expect_concurrent_exit "${ctors};slow handler started;slow handler done;${handlers}")
28set(code_concurrent_exit 7) 28set(code_concurrent_exit 7)
29# The main thread's thread_local object ends before the atexit handlers and static destructors ([basic.start.term]):
30# the UCRT calls the EXE's thread-local destructor callback first in exit() and _cexit().
31set(expect_thread_local_exit "${ctors};ctor thread_local;dtor thread_local;${handlers}")
32set(code_thread_local_exit 13)
33set(expect_thread_local_cexit "${ctors};ctor thread_local;dtor thread_local;${handlers};after _cexit")
34set(code_thread_local_cexit 14)
29 35
30# The program's own lines, in order, without the prefix; everything gta6rt prints is dropped. 36# The program's own lines, in order, without the prefix; everything gta6rt prints is dropped.
31function(guest_lines output result) 37function(guest_lines output result)
@@ -42,7 +48,7 @@ function(guest_lines output result)
42endfunction() 48endfunction()
43 49
44set(failures "") 50set(failures "")
45foreach(mode return exit _exit quick_exit ExitProcess cexit c_exit concurrent_exit) 51foreach(mode return exit _exit quick_exit ExitProcess cexit c_exit concurrent_exit thread_local_exit thread_local_cexit)
46 execute_process(COMMAND ${RUNNER} "${GUEST}" ${mode} 52 execute_process(COMMAND ${RUNNER} "${GUEST}" ${mode}
47 WORKING_DIRECTORY "${guest_dir}" TIMEOUT 60 53 WORKING_DIRECTORY "${guest_dir}" TIMEOUT 60
48 RESULT_VARIABLE native_code OUTPUT_VARIABLE native_out ERROR_VARIABLE native_err) 54 RESULT_VARIABLE native_code OUTPUT_VARIABLE native_out ERROR_VARIABLE native_err)
@@ -68,4 +74,4 @@ endforeach()
68if(failures) 74if(failures)
69 message(FATAL_ERROR "atexit/termination differences:${failures}") 75 message(FATAL_ERROR "atexit/termination differences:${failures}")
70endif() 76endif()
71message(STATUS "tiny_atexit: 8 termination paths match the Windows sequence") 77message(STATUS "tiny_atexit: 10 termination paths match the Windows sequence")
diff --git a/runtime/test/check_precompile_skip_list.cmake b/runtime/test/check_precompile_skip_list.cmake
new file mode 100644
index 000000000..5945db761
--- /dev/null
+++ b/runtime/test/check_precompile_skip_list.cmake
@@ -0,0 +1,123 @@
1# gta6rt --precompile-pipelines and LEONIDA_SKIP_COMPUTE (shims/d3d12_precompile.h): the play-time skip list does not
2# keep programs out of the pipeline journal; --skip-listed does, and the closing line counts both.
3# cmake -DGTA6RT=<gta6rt.exe> [-DRUNNER=<wine>] -DSPV_A=<compute .spv> -DSPV_B=<another compute .spv>
4# -DTEST_DIR=<scratch folder> -P check_precompile_skip_list.cmake
5# A library of two synthetic compute entries, one of them named by LEONIDA_SKIP_COMPUTE, is precompiled three times:
6# 1. into an empty journal with the list set and no flag: both entries are built;
7# 2. into another empty journal with --skip-listed: only the unlisted one is, and the listed one is reported;
8# 3. into the first journal again: both are journaled already, nothing is built.
9# The verdicts are read from the output and the journal folders, since under Wine an exit status alone can look fine.
10cmake_minimum_required(VERSION 3.24)
11
12foreach(var GTA6RT SPV_A SPV_B TEST_DIR)
13 if(NOT DEFINED ${var} OR "${${var}}" STREQUAL "")
14 message(FATAL_ERROR "check_precompile_skip_list.cmake: -D${var}=... is required")
15 endif()
16endforeach()
17
18file(REMOVE_RECURSE "${TEST_DIR}")
19file(MAKE_DIRECTORY "${TEST_DIR}/shaders")
20# Two different modules: entries with the same module and layout share one journal file.
21file(COPY_FILE "${SPV_A}" "${TEST_DIR}/shaders/precompile_kept.spv")
22file(COPY_FILE "${SPV_B}" "${TEST_DIR}/shaders/precompile_listed.spv")
23# The runtime's library takes an entry only with a program hash; these two name no real program.
24set(meta "\"stage\":\"cs\",\"bindings\":[],\"push_constant_bytes\":144,\"local_size\":[1,1,1],\"wave64\":false")
25string(REPEAT "a" 64 hash_kept)
26string(REPEAT "b" 64 hash_listed)
27file(WRITE "${TEST_DIR}/shaders/index.json"
28 "{\"precompile_kept\":{\"fssm_sha256\":\"${hash_kept}\",${meta}},"
29 "\"precompile_listed\":{\"fssm_sha256\":\"${hash_listed}\",${meta}}}\n")
30
31# Only what this test sets: a journal setting or helper from the caller's environment would change the counts.
32foreach(var LEONIDA_PIPELINE_JOURNAL LEONIDA_PIPELINE_CACHE_BYTES LEONIDA_PIPELINE_JOURNAL_BYTES
33 LEONIDA_PIPELINE_JOURNAL_SEED_DIR LEONIDA_COMPILE_HELPER LEONIDA_LAZY_COMPUTE)
34 unset(ENV{${var}})
35endforeach()
36file(TO_NATIVE_PATH "${TEST_DIR}/shaders" shaders)
37set(ENV{LEONIDA_SHADERS} "${shaders}")
38set(ENV{LEONIDA_SKIP_COMPUTE} "precompile_listed")
39
40set(failures "")
41set(all_output "")
42# Runs the precompile with the journal in <cache> and the extra arguments; sets `out` and `code` in the caller.
43function(precompile label cache)
44 file(TO_NATIVE_PATH "${TEST_DIR}/${cache}" cache_dir)
45 set(ENV{LEONIDA_PIPELINE_CACHE_DIR} "${cache_dir}")
46 execute_process(COMMAND ${RUNNER} "${GTA6RT}" --precompile-pipelines --threads 1 ${ARGN}
47 WORKING_DIRECTORY "${TEST_DIR}"
48 TIMEOUT 90
49 RESULT_VARIABLE result OUTPUT_VARIABLE output ERROR_VARIABLE output)
50 string(REPLACE "\r\n" "\n" output "\n${output}\n")
51 set(out "${output}" PARENT_SCOPE)
52 set(code "${result}" PARENT_SCOPE)
53 set(all_output "${all_output}--- ${label} (exit ${result}) ---${output}" PARENT_SCOPE)
54endfunction()
55# Functions, not macros: a macro would substitute the patterns' text and undo their backslash escapes.
56function(expect label pattern)
57 if(NOT out MATCHES "${pattern}")
58 set(failures "${failures}${label}: no match for '${pattern}'\n" PARENT_SCOPE)
59 endif()
60endfunction()
61function(expect_not label pattern)
62 if(out MATCHES "${pattern}")
63 set(failures "${failures}${label}: unexpected match for '${pattern}'\n" PARENT_SCOPE)
64 endif()
65endfunction()
66function(expect_exit label want)
67 if(NOT "${code}" STREQUAL "${want}")
68 set(failures "${failures}${label}: exit ${code}, not ${want}\n" PARENT_SCOPE)
69 endif()
70endfunction()
71function(journal_files cache var)
72 file(GLOB files "${TEST_DIR}/${cache}/pipeline_cache.d/cs-*.bin")
73 list(LENGTH files count)
74 set(${var} ${count} PARENT_SCOPE)
75endfunction()
76
77# 1. The list is set, no flag: both entries are built and nothing is reported as left out by the list.
78precompile("list set, no flag" cache_all)
79if(code STREQUAL "1" AND out MATCHES "the Vulkan device could not be created|the runtime builds no compute pipeline")
80 message("SKIP: no Vulkan device for the precompile here${all_output}")
81 return()
82endif()
83expect_exit("list set, no flag" 0)
84expect("list set, no flag" "\n\\[precompile\\] LEONIDA_SKIP_COMPUTE names 1 of the entries: built anyway")
85expect("list set, no flag" "\n\\[precompile\\] 2 compute entries to build ")
86expect_not("list set, no flag" "precompile_listed: not built")
87expect("list set, no flag" "\n\\[precompile\\] done: 2 built \\([0-9]+ compiled, [0-9]+ from a cache\\), 0 journaled already, 0 being built by another process, 0 failed; left out: 0 of 1 listed in LEONIDA_SKIP_COMPUTE, 0 not buildable, 0 filtered out; in [0-9]+ s\n")
88# A driver that returns no cache data leaves no journal file; then step 3 has nothing to find.
89set(journaled TRUE)
90if(out MATCHES "compiled \\(not journaled\\)")
91 set(journaled FALSE)
92 message("note: the driver gave no cache data, so the journal-file checks are left out")
93else()
94 journal_files(cache_all count)
95 if(NOT count EQUAL 2)
96 string(APPEND failures "list set, no flag: ${count} journal files, not 2\n")
97 endif()
98endif()
99
100# 2. --skip-listed: the listed entry is left out and named, the other one is built.
101precompile("--skip-listed" cache_listed --skip-listed)
102expect_exit("--skip-listed" 0)
103expect("--skip-listed" "\n\\[precompile\\] precompile_listed: not built \\(LEONIDA_SKIP_COMPUTE, --skip-listed\\)\n")
104expect("--skip-listed" "\n\\[precompile\\] 1 compute entries to build \\([^)]*, 1 left out by --skip-listed, 0 not buildable\\)")
105expect("--skip-listed" "\n\\[precompile\\] done: 1 built \\([0-9]+ compiled, [0-9]+ from a cache\\), 0 journaled already, 0 being built by another process, 0 failed; left out: 1 of 1 listed in LEONIDA_SKIP_COMPUTE \\(--skip-listed\\), 0 not buildable, 0 filtered out; in [0-9]+ s\n")
106if(journaled)
107 journal_files(cache_listed count)
108 if(NOT count EQUAL 1)
109 string(APPEND failures "--skip-listed: ${count} journal files, not 1\n")
110 endif()
111endif()
112
113# 3. The first journal again: both entries are there, nothing is built.
114if(journaled)
115 precompile("again" cache_all)
116 expect_exit("again" 0)
117 expect("again" "\n\\[precompile\\] done: 0 built \\(0 compiled, 0 from a cache\\), 2 journaled already, 0 being built by another process, 0 failed; left out: 0 of 1 listed in LEONIDA_SKIP_COMPUTE, 0 not buildable, 0 filtered out; in [0-9]+ s\n")
118endif()
119
120if(failures)
121 message(FATAL_ERROR "gta6rt --precompile-pipelines and LEONIDA_SKIP_COMPUTE:\n${failures}${all_output}")
122endif()
123message("precompile and LEONIDA_SKIP_COMPUTE: built regardless of the list, left out with --skip-listed${all_output}")
diff --git a/runtime/test/conservative_raster_test.cpp b/runtime/test/conservative_raster_test.cpp
index b862e5fcb..72ee4d516 100644
--- a/runtime/test/conservative_raster_test.cpp
+++ b/runtime/test/conservative_raster_test.cpp
@@ -1,6 +1,7 @@
1#include "../src/conservative_raster.h" 1#include "../src/conservative_raster.h"
2#include <cstdio> 2#include <cstdio>
3#include <limits> 3#include <limits>
4#include <vector>
4 5
5int main() { 6int main() {
6 using leonida::conservative_raster::tier1; 7 using leonida::conservative_raster::tier1;
@@ -38,6 +39,18 @@ int main() {
38 const auto requirements = inner_coverage_requirements(module); 39 const auto requirements = inner_coverage_requirements(module);
39 check(requirements.valid && requirements.fully_covered && requirements.post_depth); 40 check(requirements.valid && requirements.fully_covered && requirements.post_depth);
40 check(!inner_coverage_requirements(std::span(module).first(9)).valid); 41 check(!inner_coverage_requirements(std::span(module).first(9)).valid);
42 using leonida::conservative_raster::mesh_outputs_triangles;
43 const auto with_mode = [](std::uint32_t mode) {
44 return std::vector<std::uint32_t>{0x07230203, 0x00010500, 0, 2, 0, (3u << 16) | 16, 1, mode};
45 };
46 check(mesh_outputs_triangles(with_mode(5298))); // OutputTrianglesEXT
47 check(!mesh_outputs_triangles(with_mode(5269))); // OutputLinesEXT
48 check(!mesh_outputs_triangles(with_mode(27))); // OutputPoints
49 check(!mesh_outputs_triangles(with_mode(26))); // OutputVertices: no output topology
50 check(!mesh_outputs_triangles({}));
51 auto truncated = with_mode(5298);
52 truncated.pop_back();
53 check(!mesh_outputs_triangles(truncated));
41 const std::uint32_t zero_count[] = {0x07230203, 0x00010500, 0, 2, 0, 0}; 54 const std::uint32_t zero_count[] = {0x07230203, 0x00010500, 0, 2, 0, 0};
42 check(!inner_coverage_requirements(zero_count).valid); 55 check(!inner_coverage_requirements(zero_count).valid);
43 const std::uint32_t ordinary[] = {0x07230203, 0x00010500, 0, 2, 0, (2u << 16) | 17, 1}; 56 const std::uint32_t ordinary[] = {0x07230203, 0x00010500, 0, 2, 0, (2u << 16) | 17, 1};
diff --git a/runtime/test/console_heap_slot_records_test.cpp b/runtime/test/console_heap_slot_records_test.cpp
new file mode 100644
index 000000000..c5fcfbe9a
--- /dev/null
+++ b/runtime/test/console_heap_slot_records_test.cpp
@@ -0,0 +1,347 @@
1// leonida::ConsoleHeapSlotRecords (src/console_heap_slot_records.h): a change of the address space finds exactly the
2// console-heap slots whose V#s it touches, without walking the heap. Portable, CPU only, no game data.
3//
4// A small model stands in for the device: backings (device ranges), alias ranges (title VA -> arena offset) and a
5// resolver that follows DeviceState::vsharp_address's order (an alias first, refused when its copy is not backed; then
6// the base as an arena offset). fix() is fix_console_slot: it resolves both halves of a slot, writes the "copy" and the
7// records. apply() is apply_slot_changes: the slots touched() names are fixed again. After every step the copy is
8// compared with a full re-resolution of every slot: a slot left naming a range that went (a GPU page fault in the
9// runtime) or a waiting slot left null after its buffer came fails the comparison.
10#include "../src/console_heap_slot_records.h"
11
12#include <array>
13#include <cstdint>
14#include <cstdio>
15#include <iterator>
16#include <map>
17#include <random>
18#include <vector>
19
20#define EXPECT(condition) do { \
21 if (!(condition)) { std::fprintf(stderr, "line %d: %s\n", __LINE__, #condition); return 1; } \
22} while (0)
23
24namespace {
25
26using leonida::ConsoleHeapSlotRecords;
27using leonida::SlotChange;
28
29constexpr std::uint64_t kArena = 0x7f0000000000ull; // the arena's device address
30constexpr std::uint64_t kMask = (1ull << 48) - 1;
31
32struct HalfWords {
33 std::uint64_t base = 0, span = 0; // span 0: no V# in this half
34};
35
36struct Model {
37 using Words = HalfWords;
38 struct Alias {
39 std::uint64_t end, shader;
40 };
41 std::vector<std::array<Words, 2>> slots;
42 std::vector<std::array<std::uint64_t, 2>> copy; // the device address each half names, 0: null
43 std::map<std::uint64_t, std::uint64_t> backings; // device start -> end
44 std::map<std::uint64_t, Alias> aliases; // title VA -> range
45 ConsoleHeapSlotRecords records;
46 std::vector<SlotChange> changes;
47 std::uint64_t fixes = 0;
48
49 explicit Model(std::size_t n) : slots(n), copy(n, {0, 0}) { records.reset(n); }
50
51 bool backed(std::uint64_t address, std::uint64_t span) const {
52 auto it = backings.upper_bound(address);
53 if (it == backings.begin()) return false;
54 --it;
55 return address >= it->first && address + span <= it->second;
56 }
57 // As vsharp_address: 0 when nothing backs it, with `refused` an alias copy that is not backed.
58 std::uint64_t resolve(std::uint64_t base, std::uint64_t span, std::uint64_t& refused) const {
59 refused = 0;
60 auto it = aliases.upper_bound(base);
61 if (it != aliases.begin() && base < std::prev(it)->second.end) {
62 --it;
63 const std::uint64_t to = kArena + it->second.shader + (base - it->first);
64 if (base + span > it->second.end || !backed(to, span)) {
65 refused = to;
66 return 0;
67 }
68 return to;
69 }
70 if (base < (1ull << 40) && backed(kArena + base, span)) return kArena + base;
71 return 0;
72 }
73 void fix(std::size_t slot) {
74 ++fixes;
75 for (unsigned half = 0; half < 2; ++half) {
76 const Words& w = slots[slot][half];
77 if (!w.span) {
78 records.set(slot, half, ConsoleHeapSlotRecords::none, 0, 0, 0);
79 copy[slot][half] = 0;
80 continue;
81 }
82 std::uint64_t refused = 0;
83 const std::uint64_t to = resolve(w.base, w.span, refused);
84 records.set(slot, half, to ? ConsoleHeapSlotRecords::resolved : ConsoleHeapSlotRecords::waiting, w.base,
85 w.span, to ? to : refused);
86 copy[slot][half] = to;
87 }
88 }
89 void write(std::size_t slot, Words a, Words b = Words{}) {
90 slots[slot] = {a, b};
91 fix(slot);
92 }
93 void zero(std::size_t slot) {
94 slots[slot] = {};
95 copy[slot] = {0, 0};
96 records.clear(slot);
97 }
98 // The changes the device notes (DeviceState::backing, alias_changed).
99 void add_backing(std::uint64_t offset, std::uint64_t bytes) {
100 backings[kArena + offset] = kArena + offset + bytes;
101 changes.push_back({SlotChange::target_added, kArena + offset, kArena + offset + bytes});
102 changes.push_back({SlotChange::source_added, offset & kMask, (offset & kMask) + bytes});
103 }
104 void release_backing(std::uint64_t offset) {
105 const auto it = backings.find(kArena + offset);
106 changes.push_back({SlotChange::target_gone, it->first, it->second});
107 backings.erase(it);
108 }
109 void add_alias(std::uint64_t title, std::uint64_t bytes, std::uint64_t shader) {
110 for (auto it = aliases.begin(); it != aliases.end();) {
111 if (it->first < title + bytes && it->second.end > title) {
112 remove_change(it->first, it->second);
113 it = aliases.erase(it);
114 } else {
115 ++it;
116 }
117 }
118 aliases[title] = {title + bytes, shader};
119 changes.push_back({SlotChange::source_added, title, title + bytes});
120 }
121 void remove_alias(std::uint64_t title) {
122 const auto it = aliases.find(title);
123 remove_change(it->first, it->second);
124 aliases.erase(it);
125 }
126 void remove_change(std::uint64_t title, const Alias& a) {
127 changes.push_back({SlotChange::source_gone, title, a.end});
128 changes.push_back({SlotChange::target_gone, kArena + a.shader, kArena + a.shader + (a.end - title)});
129 }
130 // apply_slot_changes: the slots looked at (index entries) and fixed again.
131 std::uint64_t looked = 0;
132 std::vector<std::uint32_t> touched;
133 void apply() {
134 const std::uint64_t before = records.looked_at();
135 records.touched(changes.data(), changes.size(), touched);
136 looked = records.looked_at() - before;
137 changes.clear();
138 for (const std::uint32_t slot : touched) fix(slot);
139 }
140 // Every slot as a full re-resolution would leave it: the copy the walk this replaced would have produced.
141 bool consistent() const {
142 for (std::size_t slot = 0; slot < slots.size(); ++slot)
143 for (unsigned half = 0; half < 2; ++half) {
144 const Words& w = slots[slot][half];
145 std::uint64_t refused = 0;
146 const std::uint64_t want = w.span ? resolve(w.base, w.span, refused) : 0;
147 if (copy[slot][half] != want) {
148 std::fprintf(stderr, "slot %zu half %u names 0x%llx, a full re-resolution gives 0x%llx\n", slot, half,
149 static_cast<unsigned long long>(copy[slot][half]),
150 static_cast<unsigned long long>(want));
151 return false;
152 }
153 }
154 return true;
155 }
156};
157
158// The design's case: 60,010 live slots, 10 of them name buffer B. Releasing B looks at those 10 and fixes only them;
159// the walk this replaced looked at all 60,010.
160int release_looks_at_its_slots_only() {
161 constexpr std::size_t kSlots = 65536;
162 Model m(kSlots);
163 constexpr std::uint64_t a = 0x100000, b = 0x900000;
164 m.add_backing(a, 0x10000);
165 m.add_backing(b, 0x10000);
166 m.changes.clear();
167 for (std::size_t slot = 0; slot < 60000; ++slot) m.write(slot, {a + (slot % 64) * 0x100, 0x100});
168 for (std::size_t slot = 60000; slot < 60010; ++slot) m.write(slot, {b + (slot - 60000) * 0x100, 0x100});
169 EXPECT(m.records.recorded() == 60010 && m.records.waiting_count() == 0 && m.consistent());
170 m.fixes = 0;
171 m.release_backing(b);
172 m.apply();
173 const std::uint64_t looked = m.looked;
174 EXPECT(looked <= 10);
175 EXPECT(m.touched.size() == 10 && m.touched.front() == 60000 && m.touched.back() == 60009);
176 EXPECT(m.fixes == 10 && m.records.waiting_count() == 10 && m.consistent());
177 // Nothing changed: nothing looked at.
178 m.apply();
179 EXPECT(m.looked == 0 && m.touched.empty());
180 std::printf("release: 60,010 live slots, 10 name the buffer: %llu looked at, 10 fixed again\n",
181 static_cast<unsigned long long>(looked));
182 return 0;
183}
184
185// An alias range removed, replaced and added again; a slot overwritten or zeroed after it was recorded; a release that
186// only partly overlaps a slot's range; two slots naming one backing; a buffer that comes back.
187int cases() {
188 Model m(4096);
189 constexpr std::uint64_t title = 0x200000000000ull, copy_at = 0x400000, other_copy = 0x800000, c = 0x1000000;
190 m.add_backing(copy_at, 0x20000);
191 m.add_backing(other_copy, 0x20000);
192 m.add_backing(c, 0x10000);
193 m.add_alias(title, 0x20000, copy_at);
194 m.apply();
195 for (std::size_t slot = 0; slot < 8; ++slot) m.write(slot, {title + slot * 0x1000, 0x800});
196 EXPECT(m.copy[3][0] == kArena + copy_at + 0x3000 && m.consistent());
197
198 // Alias change: the range moves to another copy; every slot through it follows, nothing else is fixed.
199 m.write(100, {c, 0x100});
200 m.add_alias(title, 0x20000, other_copy);
201 m.apply();
202 EXPECT(m.touched.size() == 8 && m.copy[3][0] == kArena + other_copy + 0x3000 && m.consistent());
203 // Removed: they wait (null in the copy); added again: they are fixed when it comes.
204 m.remove_alias(title);
205 m.apply();
206 EXPECT(m.touched.size() == 8 && m.copy[3][0] == 0 && m.records.waiting_count() == 8 && m.consistent());
207 m.add_alias(title, 0x20000, copy_at);
208 m.apply();
209 EXPECT(m.touched.size() == 8 && m.records.waiting_count() == 0 && m.consistent());
210
211 // A slot overwritten after it was recorded (it names C now), and one zeroed: a release of their old copy does not
212 // touch them; the zeroed one keeps no record.
213 m.write(5, {c + 0x200, 0x100});
214 m.zero(6);
215 m.release_backing(copy_at);
216 m.apply();
217 EXPECT(m.touched.size() == 6); // slots 0-4 and 7
218 for (const std::uint32_t slot : m.touched) EXPECT(slot != 5 && slot != 6 && slot != 100);
219 EXPECT(m.copy[5][0] == kArena + c + 0x200 && m.records.state(6, 0) == ConsoleHeapSlotRecords::none);
220 EXPECT(m.consistent());
221
222 // Partial overlap: a release that covers only the tail of a slot's range touches it; one that ends right before
223 // its range does not. The two slots naming the same bytes are both fixed.
224 m.add_backing(0x2000000, 0x1000);
225 m.add_backing(0x2001000, 0x3000);
226 m.apply();
227 m.write(200, {0x2001800, 0x400});
228 m.write(201, {0x2001800, 0x400});
229 m.write(202, {0x2000000, 0x1000}); // ends where the second backing starts
230 EXPECT(m.copy[200][0] == kArena + 0x2001800 && m.copy[202][0] == kArena + 0x2000000);
231 m.release_backing(0x2001000);
232 m.apply();
233 EXPECT(m.touched.size() == 2 && m.touched[0] == 200 && m.touched[1] == 201);
234 EXPECT(m.copy[200][0] == 0 && m.copy[201][0] == 0 && m.copy[202][0] != 0 && m.consistent());
235 // The buffer comes back: the waiting slots are fixed again by the addition, not by a probe.
236 m.add_backing(0x2001000, 0x3000);
237 m.apply();
238 EXPECT(m.touched.size() == 2 && m.copy[200][0] == kArena + 0x2001800 && m.copy[201][0] == kArena + 0x2001800);
239 EXPECT(m.consistent());
240
241 // The counter half on its own, and a refused alias copy: waiting on the copy's address, fixed when it is backed.
242 constexpr std::uint64_t title2 = 0x300000000000ull, unbacked = 0x3000000;
243 m.add_alias(title2, 0x10000, unbacked);
244 m.apply();
245 m.write(300, {c, 0x40}, {title2 + 0x40, 4});
246 EXPECT(m.copy[300][0] == kArena + c && m.copy[300][1] == 0 && m.records.state(300, 1) == ConsoleHeapSlotRecords::waiting);
247 m.add_backing(unbacked, 0x10000);
248 m.apply();
249 EXPECT(m.copy[300][1] == kArena + unbacked + 0x40 && m.consistent());
250
251 // A large range in a granule before the release: found through its span class.
252 m.add_backing(0x10000000, 0x400000);
253 m.apply();
254 m.write(400, {0x10000000, 0x400000});
255 m.release_backing(0x10000000);
256 m.apply();
257 EXPECT(m.touched.size() == 1 && m.touched[0] == 400 && m.copy[400][0] == 0 && m.consistent());
258
259 // The heap destroyed (its records with it): a new heap of the same size starts with none.
260 m.records.reset(4096);
261 m.release_backing(c);
262 m.apply();
263 EXPECT(m.touched.empty() && m.records.recorded() == 0);
264 std::printf("cases: alias moved, removed and added again; overwritten and zeroed slots; partial overlap; two slots "
265 "on one backing; a buffer back; a refused alias copy backed later; a large range; a destroyed heap\n");
266 return 0;
267}
268
269// Random writes, zeroes, releases, additions and alias changes; after each round of changes the copy must equal a full
270// re-resolution, and the entries looked at must stay near what the changes touch.
271int differential() {
272 std::mt19937_64 rng(0x5107);
273 constexpr std::size_t kSlots = 3000;
274 Model m(kSlots);
275 constexpr std::uint64_t kGranule = 0x10000;
276 std::vector<std::uint64_t> titles;
277 for (int i = 0; i < 6; ++i) titles.push_back(0x100000000000ull + std::uint64_t(i) * 0x100000);
278 const auto pick = [&](std::uint64_t n) { return std::uint64_t(rng() % n); };
279 std::uint64_t looked = 0, touched = 0;
280 for (int round = 0; round < 400; ++round) {
281 for (int op = 0; op < 20; ++op) {
282 const auto slot = std::size_t(pick(kSlots));
283 switch (pick(9)) {
284 case 0: case 1: case 2: { // a V# into an arena offset, one through an alias, or a counter half too
285 const auto span = 1 + pick(pick(4) ? 0x2000 : 0x80000);
286 Model::Words a{pick(2) ? pick(64) * kGranule / 2 + pick(0x800) : titles[pick(6)] + pick(0x80000), span};
287 Model::Words b{};
288 if (!pick(4)) b = {pick(64) * kGranule / 2, 4};
289 m.write(slot, a, b);
290 break;
291 }
292 case 3: m.zero(slot); break;
293 case 4: {
294 const auto at = pick(64) * kGranule / 2;
295 const auto it = m.backings.find(kArena + at);
296 if (it == m.backings.end()) {
297 // Not over another backing.
298 const auto bytes = (1 + pick(8)) * kGranule / 4;
299 bool free = true;
300 for (const auto& [lo, hi] : m.backings) free &= !(lo < kArena + at + bytes && hi > kArena + at);
301 if (free) m.add_backing(at, bytes);
302 } else {
303 m.release_backing(at);
304 }
305 break;
306 }
307 case 5: case 6: {
308 const auto title = titles[pick(6)] + pick(4) * 0x20000;
309 m.add_alias(title, (1 + pick(4)) * 0x8000, pick(64) * kGranule / 2);
310 break;
311 }
312 case 7:
313 if (!m.aliases.empty()) {
314 auto it = m.aliases.begin();
315 std::advance(it, std::ptrdiff_t(pick(m.aliases.size())));
316 m.remove_alias(it->first);
317 }
318 break;
319 default: m.fix(slot); break;
320 }
321 }
322 m.apply();
323 looked += m.looked;
324 touched += m.touched.size();
325 if (!m.consistent()) {
326 std::fprintf(stderr, "round %d\n", round);
327 return 1;
328 }
329 }
330 EXPECT(m.records.recorded() > 0);
331 // The model's address space is a few MiB, so most changes touch most of it: this case checks results, not cost.
332 std::printf("differential: 400 rounds, copy equal to a full re-resolution after each; %llu entries looked at, "
333 "%llu slots fixed again, %zu halves recorded at the end\n",
334 static_cast<unsigned long long>(looked), static_cast<unsigned long long>(touched),
335 m.records.recorded());
336 return 0;
337}
338
339} // namespace
340
341int main() {
342 if (release_looks_at_its_slots_only()) return 1;
343 if (cases()) return 1;
344 if (differential()) return 1;
345 std::printf("console_heap_slot_records_test: ok\n");
346 return 0;
347}
diff --git a/runtime/test/console_heap_vsharp_slots_test.cpp b/runtime/test/console_heap_vsharp_slots_test.cpp
deleted file mode 100644
index ebb74be45..000000000
--- a/runtime/test/console_heap_vsharp_slots_test.cpp
+++ /dev/null
@@ -1,259 +0,0 @@
1// Portable CPU-only unit test for leonida::ConsoleHeapVsharpSlots (runtime/src/console_heap_vsharp_slots.h).
2// Verifies bit-for-bit equivalence with a linear scan of 32-byte descriptor slots, boundary handling, range clears,
3// callback-time bit clearing (as in refresh_console_heap invalidation passes), and a 5.5 MiB heap stress check.
4#include "../src/console_heap_vsharp_slots.h"
5
6#include <array>
7#include <cstdint>
8#include <cstdio>
9#include <cstring>
10#include <vector>
11
12#define EXPECT(condition) \
13 do { \
14 if (!(condition)) { \
15 std::fprintf(stderr, "FAIL line %d: %s\n", __LINE__, #condition); \
16 return 1; \
17 } \
18 } while (0)
19
20namespace {
21
22using leonida::ConsoleHeapVsharpSlots;
23
24std::vector<std::size_t> collect(const ConsoleHeapVsharpSlots& slots) {
25 std::vector<std::size_t> out;
26 slots.for_each([&](std::size_t slot) { out.push_back(slot); });
27 return out;
28}
29
30int test_predicate_exactness() {
31 // Primary buffer V#: top 2 bits of w[3] are 0, w[2] (num_records) != 0.
32 std::uint32_t primary[8] = {0x1000, 0x20, 64, 0x3fffffffu, 0, 0, 0, 0};
33 EXPECT(ConsoleHeapVsharpSlots::is_live_vsharp(primary));
34
35 // Counter-only buffer V#: w[2] == 0, w[6] != 0, top 2 bits of w[3] == 0.
36 std::uint32_t counter[8] = {0, 0, 0, 0, 0x2000, 0, 16, 0};
37 EXPECT(ConsoleHeapVsharpSlots::is_live_vsharp(counter));
38
39 // Empty / zeroed V#: w[2] == 0 and w[6] == 0.
40 std::uint32_t empty[8] = {0x1000, 0, 0, 0x00010000u, 0x2000, 0, 0, 0};
41 EXPECT(!ConsoleHeapVsharpSlots::is_live_vsharp(empty));
42
43 // Image T# (w[3] >> 30 != 0): must NOT be treated as a buffer V# even if w[2]/w[6] are non-zero.
44 for (std::uint32_t hi : {1u, 2u, 3u}) {
45 std::uint32_t tsharp[8] = {0x1000, 0, 128, (hi << 30) | 0x55u, 0, 0, 64, 0};
46 EXPECT(!ConsoleHeapVsharpSlots::is_live_vsharp(tsharp));
47 }
48
49 // not_tsharp zeroes lower 16 bytes (w[0..3] = 0) while leaving upper 16 bytes (w[4..7]):
50 // if w[6] is non-zero, predicate matches the legacy `!(w[3] >> 30) && (w[2] || w[6])` check.
51 std::uint32_t not_tsharp_with_hi[8] = {0, 0, 0, 0, 0, 0, 1, 0};
52 EXPECT(ConsoleHeapVsharpSlots::is_live_vsharp(not_tsharp_with_hi));
53 return 0;
54}
55
56int test_boundaries_and_ranges() {
57 // Zero-size heap.
58 ConsoleHeapVsharpSlots zero;
59 zero.reset(0);
60 EXPECT(zero.empty() && zero.slot_count() == 0 && zero.live_count() == 0);
61 zero.set(0, true);
62 zero.clear(0);
63 zero.clear_range(0, 10);
64 EXPECT(zero.empty() && !zero.test(0) && collect(zero).empty());
65
66 // Word boundary sizes: 1, 63, 64, 65, 128, 129, 257.
67 for (std::size_t n : {std::size_t(1), std::size_t(63), std::size_t(64), std::size_t(65), std::size_t(128),
68 std::size_t(129), std::size_t(257)}) {
69 ConsoleHeapVsharpSlots s;
70 s.reset(n);
71 EXPECT(s.slot_count() == n && s.empty());
72 // Out-of-range writes are ignored.
73 s.set(n, true);
74 s.set(n + 100, true);
75 EXPECT(s.empty() && !s.test(n));
76
77 // Set every slot, check idempotency and exact ordering.
78 for (std::size_t i = 0; i < n; ++i) s.set(i, true);
79 s.set(0, true);
80 s.set(n - 1, true);
81 EXPECT(s.live_count() == n);
82 const auto all = collect(s);
83 EXPECT(all.size() == n);
84 for (std::size_t i = 0; i < n; ++i) EXPECT(all[i] == i && s.test(i));
85
86 // Inverted / empty / past-end clear_range is a no-op.
87 s.clear_range(5, 5);
88 s.clear_range(10, 2);
89 s.clear_range(n, n + 64);
90 EXPECT(s.live_count() == n);
91
92 // Partial single-word and multi-word clear_range.
93 if (n >= 129) {
94 s.clear_range(3, 19); // within word 0
95 s.clear_range(60, 128); // spans word 0 tail + all of word 1
96 EXPECT(s.live_count() == n - 16 - 68);
97 EXPECT(s.test(2) && !s.test(3) && !s.test(18) && s.test(19));
98 EXPECT(s.test(59) && !s.test(60) && !s.test(127) && s.test(128));
99 }
100
101 // Clear past end clamps cleanly.
102 s.clear_range(0, n + 500);
103 EXPECT(s.empty() && s.live_count() == 0 && collect(s).empty());
104 }
105 return 0;
106}
107
108int test_in_place_invalidation_mutation() {
109 // Mirrors refresh_console_heap: for_each visits each live V# slot and calls fix_console_slot, which may clear
110 // that slot's bit when its backing buffer was released.
111 ConsoleHeapVsharpSlots s;
112 s.reset(260);
113 const std::vector<std::size_t> initial = {0, 1, 62, 63, 64, 65, 127, 128, 191, 255, 259};
114 for (std::size_t slot : initial) s.set(slot, true);
115 EXPECT(s.live_count() == initial.size());
116
117 std::vector<std::size_t> visited;
118 s.for_each([&](std::size_t slot) {
119 visited.push_back(slot);
120 // Simulate releasing every even-numbered slot during the invalidation pass.
121 if ((slot & 1u) == 0) s.set(slot, false);
122 });
123 EXPECT(visited == initial);
124
125 std::vector<std::size_t> remaining;
126 for (std::size_t slot : initial)
127 if ((slot & 1u) != 0) remaining.push_back(slot);
128 EXPECT(s.live_count() == remaining.size());
129 EXPECT(collect(s) == remaining);
130
131 // Clear the remaining slots and confirm empty fast path visits nothing.
132 s.for_each([&](std::size_t slot) { s.clear(slot); });
133 EXPECT(s.empty() && collect(s).empty());
134 return 0;
135}
136
137int test_differential_equivalence_against_linear_copy() {
138 // Differential model: maintain a synthetic 32-byte-per-slot `heap.copy` buffer alongside ConsoleHeapVsharpSlots
139 // across thousands of random writes, deferred zeroes, page-range zeroes, and invalidation passes.
140 constexpr std::size_t kSlots = 1029;
141 std::vector<std::array<std::uint32_t, 8>> gpu_copy(kSlots);
142 for (auto& slot : gpu_copy) slot.fill(0);
143
144 ConsoleHeapVsharpSlots tracked;
145 tracked.reset(kSlots);
146
147 auto linear_scan = [&] {
148 std::vector<std::size_t> expected;
149 for (std::size_t i = 0; i < kSlots; ++i)
150 if (ConsoleHeapVsharpSlots::is_live_vsharp(gpu_copy[i].data())) expected.push_back(i);
151 return expected;
152 };
153
154 std::uint64_t rng = 0x9e3779b97f4a7c15ull;
155 auto next_u32 = [&]() -> std::uint32_t {
156 rng ^= rng >> 12;
157 rng ^= rng << 25;
158 rng ^= rng >> 27;
159 return static_cast<std::uint32_t>((rng * 0x2545f4914f6cdd1dull) >> 32);
160 };
161
162 for (unsigned step = 0; step < 4000; ++step) {
163 const unsigned op = next_u32() % 10;
164 if (op < 6) {
165 // Simulate fix_console_slot writing a descriptor to heap.copy.
166 const std::size_t slot = next_u32() % kSlots;
167 std::array<std::uint32_t, 8> w{};
168 const unsigned kind = next_u32() % 5;
169 if (kind == 0) {
170 // Live primary V#
171 w[0] = next_u32();
172 w[2] = (next_u32() % 256) + 1;
173 w[3] = next_u32() & 0x3fffffffu;
174 } else if (kind == 1) {
175 // Live counter V# only
176 w[6] = (next_u32() % 64) + 1;
177 } else if (kind == 2) {
178 // Empty V# (zero records)
179 w[0] = 0;
180 w[2] = 0;
181 w[3] = next_u32() & 0x3fffffffu;
182 w[6] = 0;
183 } else if (kind == 3) {
184 // Image T#
185 w[2] = 128;
186 w[3] = (2u << 30) | (next_u32() & 0x3fffffffu);
187 w[6] = 32;
188 } else {
189 // not_tsharp (lower 16B zeroed, upper 16B arbitrary)
190 w[4] = next_u32();
191 w[6] = (next_u32() & 1u) ? 7u : 0u;
192 }
193 gpu_copy[slot] = w;
194 tracked.set(slot, ConsoleHeapVsharpSlots::is_live_vsharp(w.data()));
195 } else if (op < 8) {
196 // Simulate fix_console_slots deferred zeroing.
197 const std::size_t slot = next_u32() % kSlots;
198 gpu_copy[slot].fill(0);
199 tracked.clear(slot);
200 } else if (op == 8) {
201 // Simulate for_each_zeroed (both page-aligned 128-slot and arbitrary sub-ranges).
202 const std::size_t first = next_u32() % (kSlots + 16);
203 const std::size_t len = (next_u32() % 200);
204 const std::size_t end = first + len;
205 for (std::size_t i = first; i < end && i < kSlots; ++i) gpu_copy[i].fill(0);
206 tracked.clear_range(first, end);
207 } else {
208 // Simulate refresh_console_heap invalidation pass clearing a subset of visited slots.
209 const std::vector<std::size_t> expected = linear_scan();
210 std::vector<std::size_t> got;
211 tracked.for_each([&](std::size_t slot) {
212 got.push_back(slot);
213 if ((slot % 3) == 0) {
214 gpu_copy[slot].fill(0);
215 tracked.set(slot, false);
216 }
217 });
218 EXPECT(got == expected);
219 }
220
221 if ((step & 63) == 63) {
222 const std::vector<std::size_t> expected = linear_scan();
223 EXPECT(tracked.live_count() == expected.size());
224 EXPECT(collect(tracked) == expected);
225 }
226 }
227 EXPECT(collect(tracked) == linear_scan());
228 return 0;
229}
230
231int test_retail_sized_heap_sparse_scan() {
232 // 5.5 MiB resource heap = 180,224 32-byte slots (matching retail console descriptor heap).
233 constexpr std::size_t kRetailSlots = (5632u * 1024u) / 32u;
234 ConsoleHeapVsharpSlots tracked;
235 tracked.reset(kRetailSlots);
236
237 const std::vector<std::size_t> hot = {0, 63, 64, 4095, 4096, 65536, 131072, kRetailSlots - 1};
238 for (std::size_t slot : hot) tracked.set(slot, true);
239 EXPECT(tracked.live_count() == hot.size());
240 EXPECT(collect(tracked) == hot);
241
242 // Zero a 4 KiB page (128 slots) containing slots 4096..4223.
243 tracked.clear_range(4096, 4096 + 128);
244 EXPECT(!tracked.test(4096) && tracked.test(4095));
245 EXPECT(tracked.live_count() == hot.size() - 1);
246 return 0;
247}
248
249} // namespace
250
251int main() {
252 if (test_predicate_exactness()) return 1;
253 if (test_boundaries_and_ranges()) return 1;
254 if (test_in_place_invalidation_mutation()) return 1;
255 if (test_differential_equivalence_against_linear_copy()) return 1;
256 if (test_retail_sized_heap_sparse_scan()) return 1;
257 std::printf("console_heap_vsharp_slots_test: ok\n");
258 return 0;
259}
diff --git a/runtime/test/cs_group_marker_spv.h b/runtime/test/cs_group_marker_spv.h
new file mode 100644
index 000000000..6cd135cfe
--- /dev/null
+++ b/runtime/test/cs_group_marker_spv.h
@@ -0,0 +1,43 @@
1// Generated with glslangValidator -V --target-env vulkan1.2 -Os --spirv-val cs_group_marker.comp
2#pragma once
3#include <cstdint>
4namespace leonida {
5inline constexpr std::uint32_t cs_group_marker_spirv[] = {
6 0x07230203u, 0x00010500u, 0x0008000bu, 0x0000002du, 0x00000000u, 0x00020011u, 0x00000001u, 0x00020011u,
7 0x000014e3u, 0x0006000bu, 0x00000001u, 0x4c534c47u, 0x6474732eu, 0x3035342eu, 0x00000000u, 0x0003000eu,
8 0x000014e4u, 0x00000001u, 0x0007000fu, 0x00000005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x0000000bu,
9 0x0000001du, 0x00060010u, 0x00000004u, 0x00000011u, 0x00000001u, 0x00000001u, 0x00000001u, 0x00030003u,
10 0x00000002u, 0x000001ccu, 0x00070004u, 0x455f4c47u, 0x625f5458u, 0x65666675u, 0x65725f72u, 0x65726566u,
11 0x0065636eu, 0x00040005u, 0x00000004u, 0x6e69616du, 0x00000000u, 0x00060005u, 0x0000000bu, 0x575f6c67u,
12 0x476b726fu, 0x70756f72u, 0x00004449u, 0x00040005u, 0x00000019u, 0x61726150u, 0x0000736du, 0x00050006u,
13 0x00000019u, 0x00000000u, 0x6b72616du, 0x00000073u, 0x00050006u, 0x00000019u, 0x00000001u, 0x756f7267u,
14 0x00007370u, 0x00040005u, 0x0000001bu, 0x6b72614du, 0x00000073u, 0x00050006u, 0x0000001bu, 0x00000000u,
15 0x61746164u, 0x00000000u, 0x00030005u, 0x0000001du, 0x00000070u, 0x00040047u, 0x0000000bu, 0x0000000bu,
16 0x0000001au, 0x00030047u, 0x00000019u, 0x00000002u, 0x00050048u, 0x00000019u, 0x00000000u, 0x00000023u,
17 0x00000000u, 0x00050048u, 0x00000019u, 0x00000001u, 0x00000023u, 0x00000008u, 0x00040047u, 0x0000001au,
18 0x00000006u, 0x00000004u, 0x00030047u, 0x0000001bu, 0x00000002u, 0x00050048u, 0x0000001bu, 0x00000000u,
19 0x00000023u, 0x00000000u, 0x00040047u, 0x0000002cu, 0x0000000bu, 0x00000019u, 0x00020013u, 0x00000002u,
20 0x00030021u, 0x00000003u, 0x00000002u, 0x00040015u, 0x00000006u, 0x00000020u, 0x00000000u, 0x00040017u,
21 0x00000009u, 0x00000006u, 0x00000003u, 0x00040020u, 0x0000000au, 0x00000001u, 0x00000009u, 0x0004003bu,
22 0x0000000au, 0x0000000bu, 0x00000001u, 0x0004002bu, 0x00000006u, 0x0000000cu, 0x00000000u, 0x00040020u,
23 0x0000000du, 0x00000001u, 0x00000006u, 0x0004002bu, 0x00000006u, 0x00000010u, 0x00000001u, 0x0004002bu,
24 0x00000006u, 0x00000014u, 0x00000002u, 0x00030027u, 0x00000018u, 0x000014e5u, 0x0004001eu, 0x00000019u,
25 0x00000018u, 0x00000006u, 0x0003001du, 0x0000001au, 0x00000006u, 0x0003001eu, 0x0000001bu, 0x0000001au,
26 0x00040020u, 0x00000018u, 0x000014e5u, 0x0000001bu, 0x00040020u, 0x0000001cu, 0x00000009u, 0x00000019u,
27 0x0004003bu, 0x0000001cu, 0x0000001du, 0x00000009u, 0x00040015u, 0x0000001eu, 0x00000020u, 0x00000001u,
28 0x0004002bu, 0x0000001eu, 0x0000001fu, 0x00000000u, 0x00040020u, 0x00000020u, 0x00000009u, 0x00000018u,
29 0x0004002bu, 0x0000001eu, 0x00000024u, 0x00000001u, 0x00040020u, 0x00000025u, 0x00000009u, 0x00000006u,
30 0x00040020u, 0x00000029u, 0x000014e5u, 0x00000006u, 0x0006002cu, 0x00000009u, 0x0000002cu, 0x00000010u,
31 0x00000010u, 0x00000010u, 0x00050036u, 0x00000002u, 0x00000004u, 0x00000000u, 0x00000003u, 0x000200f8u,
32 0x00000005u, 0x00050041u, 0x0000000du, 0x0000000eu, 0x0000000bu, 0x0000000cu, 0x0004003du, 0x00000006u,
33 0x0000000fu, 0x0000000eu, 0x00050041u, 0x0000000du, 0x00000011u, 0x0000000bu, 0x00000010u, 0x0004003du,
34 0x00000006u, 0x00000012u, 0x00000011u, 0x00050080u, 0x00000006u, 0x00000013u, 0x0000000fu, 0x00000012u,
35 0x00050041u, 0x0000000du, 0x00000015u, 0x0000000bu, 0x00000014u, 0x0004003du, 0x00000006u, 0x00000016u,
36 0x00000015u, 0x00050080u, 0x00000006u, 0x00000017u, 0x00000013u, 0x00000016u, 0x00050041u, 0x00000020u,
37 0x00000021u, 0x0000001du, 0x0000001fu, 0x0004003du, 0x00000018u, 0x00000022u, 0x00000021u, 0x00050041u,
38 0x00000025u, 0x00000026u, 0x0000001du, 0x00000024u, 0x0004003du, 0x00000006u, 0x00000027u, 0x00000026u,
39 0x0007000cu, 0x00000006u, 0x00000028u, 0x00000001u, 0x00000026u, 0x00000017u, 0x00000027u, 0x00060041u,
40 0x00000029u, 0x0000002au, 0x00000022u, 0x0000001fu, 0x00000028u, 0x000700eau, 0x00000006u, 0x0000002bu,
41 0x0000002au, 0x00000010u, 0x0000000cu, 0x00000010u, 0x000100fdu, 0x00010038u,
42};
43} // namespace leonida
diff --git a/runtime/test/d3d12_existing_heap_test.cpp b/runtime/test/d3d12_existing_heap_test.cpp
index 7848ac864..48a2ef208 100644
--- a/runtime/test/d3d12_existing_heap_test.cpp
+++ b/runtime/test/d3d12_existing_heap_test.cpp
@@ -1438,6 +1438,141 @@ int check_pending_stream_views(ID3D12Device* device) {
1438 return 0; 1438 return 0;
1439} 1439}
1440 1440
1441namespace {
1442std::atomic<DWORD> g_view_av_thread{0};
1443std::atomic<unsigned> g_view_avs{0};
1444
1445LONG CALLBACK count_view_av(PEXCEPTION_POINTERS info) {
1446 if (info && info->ExceptionRecord && info->ExceptionRecord->ExceptionCode == EXCEPTION_ACCESS_VIOLATION &&
1447 GetCurrentThreadId() == g_view_av_thread.load(std::memory_order_relaxed)) {
1448 g_view_avs.fetch_add(1, std::memory_order_relaxed);
1449 }
1450 return EXCEPTION_CONTINUE_SEARCH;
1451}
1452} // namespace
1453
1454// Map changes reported to title_memory_map between submissions must both retire a cached readable answer before a
1455// synchronous slot-70 view hashes decommitted pages, and wake a pending slot-70 view without waiting for a submission.
1456int check_placed_view_map_changes(ID3D12Device* device) {
1457 const char* who = "slot-70 view map changes";
1458 if (!rt::d3d12::bindless_set_layout(device)) return 0;
1459 GpuReader gpu;
1460 EXPECT(!gpu.init(device, 4096));
1461 auto env_is = [](const char* name, const char* want) {
1462 char buf[16]{};
1463 const DWORD n = GetEnvironmentVariableA(name, buf, sizeof(buf));
1464 return n > 0 && n < sizeof(buf) && std::strcmp(buf, want) == 0;
1465 };
1466 auto index = [&](const leonida::gfx10::ImageWords& descriptor) {
1467 std::uint32_t key[8];
1468 std::memcpy(key, descriptor.data(), sizeof(key));
1469 return rt::d3d12::bindless_hash_lookup(device, key);
1470 };
1471
1472 // 1. Committed >256 KiB texture -> decommit interior 64 KiB + map::changed -> synchronous view takes zero AVs.
1473 {
1474 constexpr SIZE_T bytes = 512 * 1024;
1475 auto* pages = static_cast<std::uint8_t*>(VirtualAlloc(nullptr, bytes, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE));
1476 EXPECT(pages);
1477 std::memset(pages, 0x5a, bytes);
1478 D3D12_RESOURCE_DESC desc{};
1479 desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
1480 desc.Width = 512;
1481 desc.Height = 1024;
1482 desc.DepthOrArraySize = desc.MipLevels = 1;
1483 desc.SampleDesc.Count = 1;
1484 desc.Format = DXGI_FORMAT_R8_UNORM;
1485 desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
1486 D3D12_SHADER_RESOURCE_VIEW_DESC srv{};
1487 srv.Format = desc.Format;
1488 srv.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
1489 srv.Texture2D.MipLevels = 1;
1490 srv.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
1491 leonida::gfx10::ImageWords slot{};
1492 auto write_view = [&](UINT mapping) {
1493 srv.Shader4ComponentMapping = mapping;
1494 std::array<UINT, 14> resource{};
1495 std::array<UINT, 16> words{};
1496 std::memcpy(resource.data(), &desc, sizeof(desc));
1497 std::memcpy(words.data(), &srv, sizeof(srv));
1498 return rt::d3d12::write_placed_texture_view(device, false, resource.data(), words.data(),
1499 reinterpret_cast<UINT64>(pages),
1500 {reinterpret_cast<SIZE_T>(slot.data())});
1501 };
1502 EXPECT(write_view(D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING));
1503 EXPECT(index(slot) != 0);
1504
1505 EXPECT(VirtualFree(pages + 65536, 65536, MEM_DECOMMIT) != FALSE);
1506 leonida::title_memory_map::changed(pages + 65536, 65536);
1507
1508 g_view_avs.store(0, std::memory_order_relaxed);
1509 g_view_av_thread.store(GetCurrentThreadId(), std::memory_order_relaxed);
1510 PVOID veh = AddVectoredExceptionHandler(1, &count_view_av);
1511 EXPECT(veh != nullptr);
1512 const bool wrote_after_unmap = write_view(D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(0, 0, 0, 0));
1513 RemoveVectoredExceptionHandler(veh);
1514 g_view_av_thread.store(0, std::memory_order_relaxed);
1515 EXPECT(wrote_after_unmap);
1516 EXPECT(g_view_avs.load(std::memory_order_relaxed) == 0);
1517
1518 EXPECT(VirtualAlloc(pages + 65536, 65536, MEM_COMMIT, PAGE_READWRITE) == pages + 65536);
1519 leonida::title_memory_map::changed(pages + 65536, 65536);
1520 Ref<ID3D12Resource> placement;
1521 desc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
1522 EXPECT_HR(rt::d3d12::create_buffer_at_host_address(device, pages, desc, 6, IID_PPV_ARGS(&placement.p)), S_OK);
1523 placement.p->Release();
1524 placement.p = nullptr;
1525 VirtualFree(pages, 0, MEM_RELEASE);
1526 }
1527
1528 // 2. Reserved texture -> commit + map::changed (no texel write note, no submission) -> synchronous view publishes.
1529 {
1530 constexpr SIZE_T bytes = 65536;
1531 void* pages = VirtualAlloc(nullptr, bytes, MEM_RESERVE, PAGE_NOACCESS);
1532 EXPECT(pages);
1533 D3D12_RESOURCE_DESC desc{};
1534 desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
1535 desc.Width = 32;
1536 desc.Height = 8;
1537 desc.DepthOrArraySize = desc.MipLevels = 1;
1538 desc.SampleDesc.Count = 1;
1539 desc.Format = DXGI_FORMAT_R8_UNORM;
1540 desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
1541 D3D12_SHADER_RESOURCE_VIEW_DESC srv{};
1542 srv.Format = desc.Format;
1543 srv.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
1544 srv.Texture2D.MipLevels = 1;
1545 leonida::gfx10::ImageWords first{}, second{};
1546 auto write_view = [&](UINT mapping, leonida::gfx10::ImageWords& out) {
1547 srv.Shader4ComponentMapping = mapping;
1548 std::array<UINT, 14> resource{};
1549 std::array<UINT, 16> words{};
1550 std::memcpy(resource.data(), &desc, sizeof(desc));
1551 std::memcpy(words.data(), &srv, sizeof(srv));
1552 return rt::d3d12::write_placed_texture_view(device, false, resource.data(), words.data(),
1553 reinterpret_cast<UINT64>(pages),
1554 {reinterpret_cast<SIZE_T>(out.data())});
1555 };
1556 EXPECT(write_view(D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING, first));
1557 if (!env_is("LEONIDA_TITLE_IMAGE_DEFER", "0")) EXPECT(!index(first));
1558
1559 EXPECT(VirtualAlloc(pages, bytes, MEM_COMMIT, PAGE_READWRITE) == pages);
1560 std::memset(pages, 0x33, bytes);
1561 leonida::title_memory_map::changed(pages, bytes);
1562
1563 EXPECT(write_view(D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING(0, 0, 0, 0), second));
1564 if (!env_is("LEONIDA_TITLE_FILL_ASYNC", "1")) EXPECT(index(first) && index(second));
1565
1566 Ref<ID3D12Resource> placement;
1567 desc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
1568 EXPECT_HR(rt::d3d12::create_buffer_at_host_address(device, pages, desc, 6, IID_PPV_ARGS(&placement.p)), S_OK);
1569 placement.p->Release();
1570 placement.p = nullptr;
1571 VirtualFree(pages, 0, MEM_RELEASE);
1572 }
1573 return 0;
1574}
1575
1441// A persistent Map can become readable without notifying xmem or calling Map a second time. 1576// A persistent Map can become readable without notifying xmem or calling Map a second time.
1442int check_mapped_plane(ID3D12Device* device) { 1577int check_mapped_plane(ID3D12Device* device) {
1443 const char* who = "persistent slot-133 plane"; 1578 const char* who = "persistent slot-133 plane";
@@ -2169,6 +2304,7 @@ int main(int argc, char** argv) {
2169 if (vk.host_pointer_alignment) failures += check_title_placed_all(ours.p); 2304 if (vk.host_pointer_alignment) failures += check_title_placed_all(ours.p);
2170 if (vk.host_image_copy) { 2305 if (vk.host_image_copy) {
2171 failures += check_pending_stream_views(ours.p); 2306 failures += check_pending_stream_views(ours.p);
2307 failures += check_placed_view_map_changes(ours.p);
2172 failures += check_shared_bc_placements(ours.p); 2308 failures += check_shared_bc_placements(ours.p);
2173 failures += check_mapped_plane(ours.p); 2309 failures += check_mapped_plane(ours.p);
2174 failures += check_mapped_bc_array(ours.p); 2310 failures += check_mapped_bc_array(ours.p);
@@ -2179,6 +2315,7 @@ int main(int argc, char** argv) {
2179 no_host_copy.host_image_copy = false; 2315 no_host_copy.host_image_copy = false;
2180 Ref<ID3D12Device> staged; 2316 Ref<ID3D12Device> staged;
2181 if (FAILED(rt::d3d12::create_vulkan_device(no_host_copy, IID_PPV_ARGS(&staged.p)))) return 1; 2317 if (FAILED(rt::d3d12::create_vulkan_device(no_host_copy, IID_PPV_ARGS(&staged.p)))) return 1;
2318 failures += check_placed_view_map_changes(staged.p);
2182 failures += check_mapped_plane(staged.p); 2319 failures += check_mapped_plane(staged.p);
2183 failures += check_mapped_bc_array(staged.p); 2320 failures += check_mapped_bc_array(staged.p);
2184 } 2321 }
diff --git a/runtime/test/d3d12_mesh_test.cpp b/runtime/test/d3d12_mesh_test.cpp
index 775cfeb58..7b529546b 100644
--- a/runtime/test/d3d12_mesh_test.cpp
+++ b/runtime/test/d3d12_mesh_test.cpp
@@ -150,6 +150,7 @@ int main(int argc, char** argv) {
150 rt::d3d12::VulkanDeviceInfo info{}; 150 rt::d3d12::VulkanDeviceInfo info{};
151 info.prepare_on_bind=d.prepare_on_bind; 151 info.prepare_on_bind=d.prepare_on_bind;
152 info.cold_graphics_compile=d.cold_graphics_compile; 152 info.cold_graphics_compile=d.cold_graphics_compile;
153 info.heavy_pipeline_cache=d.heavy_pipeline_cache;
153 info.get_instance_proc = d.instance_proc; 154 info.get_instance_proc = d.instance_proc;
154 info.instance = d.instance; 155 info.instance = d.instance;
155 info.physical = d.physical; 156 info.physical = d.physical;
@@ -161,6 +162,7 @@ int main(int argc, char** argv) {
161 info.mesh_shader = mesh; 162 info.mesh_shader = mesh;
162 info.mesh_shader_queries = mesh && d.mesh_shader_queries; 163 info.mesh_shader_queries = mesh && d.mesh_shader_queries;
163 info.pipeline_statistics_query = d.pipeline_statistics_query; 164 info.pipeline_statistics_query = d.pipeline_statistics_query;
165 info.conservative_rasterization = d.conservative_rasterization;
164 return info; 166 return info;
165 }; 167 };
166 const auto make_device = [&](bool mesh, Ref<ID3D12Device>& device) { 168 const auto make_device = [&](bool mesh, Ref<ID3D12Device>& device) {
@@ -253,6 +255,34 @@ int main(int argc, char** argv) {
253 vs_stream.add(TopologySubobject{.inner = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE}); 255 vs_stream.add(TopologySubobject{.inner = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE});
254 vs_stream.add(TargetsSubobject{.inner = one_target()}); 256 vs_stream.add(TargetsSubobject{.inner = one_target()});
255 EXPECT(SUCCEEDED(create(device.p, vs_stream, vs_pso))); 257 EXPECT(SUCCEEDED(create(device.p, vs_stream, vs_pso)));
258 // Conservative rasterization in a mesh pipeline: its stream has no input assembler, so it need not name a topology
259 // type. A vertex pipeline without TRIANGLE is still refused, as is a wireframe mesh one.
260 {
261 D3D12_FEATURE_DATA_D3D12_OPTIONS options{};
262 EXPECT(SUCCEEDED(device->CheckFeatureSupport(D3D12_FEATURE_D3D12_OPTIONS, &options, sizeof options)));
263 if (options.ConservativeRasterizationTier != D3D12_CONSERVATIVE_RASTERIZATION_TIER_NOT_SUPPORTED) {
264 std::printf("conservative rasterization tier %d: mesh pipelines checked\n", int(options.ConservativeRasterizationTier));
265 D3D12_RASTERIZER_DESC conservative{};
266 conservative.FillMode = D3D12_FILL_MODE_SOLID;
267 conservative.CullMode = D3D12_CULL_MODE_NONE;
268 conservative.DepthClipEnable = TRUE;
269 conservative.ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON;
270 Ref<ID3D12PipelineState> made;
271 Stream conservative_mesh = mesh_stream;
272 conservative_mesh.add(RasterizerSubobject{.inner = conservative});
273 EXPECT(SUCCEEDED(create(device.p, conservative_mesh, made)) && made.p);
274 conservative.FillMode = D3D12_FILL_MODE_WIREFRAME;
275 Stream wireframe_mesh = mesh_stream;
276 wireframe_mesh.add(RasterizerSubobject{.inner = conservative});
277 EXPECT(create(device.p, wireframe_mesh, refused) == E_INVALIDARG && !refused.p);
278 conservative.FillMode = D3D12_FILL_MODE_SOLID;
279 Stream no_topology_vs;
280 no_topology_vs.add(RootSubobject{.inner = root.p}).add(VsSubobject{.inner = vs}).add(PsSubobject{.inner = ps});
281 no_topology_vs.add(TargetsSubobject{.inner = one_target()});
282 no_topology_vs.add(RasterizerSubobject{.inner = conservative});
283 EXPECT(create(device.p, no_topology_vs, refused) == E_INVALIDARG && !refused.p);
284 }
285 }
256 // A mesh shader translated before the graphics root window would read its root arguments from the wrong 286 // A mesh shader translated before the graphics root window would read its root arguments from the wrong
257 // dwords: refused, with a log line that asks for the shaders stage again. 287 // dwords: refused, with a log line that asks for the shaders stage again.
258 { 288 {
diff --git a/runtime/test/d3d12_title_va_test.cpp b/runtime/test/d3d12_title_va_test.cpp
index e5ef14304..90eddc66a 100644
--- a/runtime/test/d3d12_title_va_test.cpp
+++ b/runtime/test/d3d12_title_va_test.cpp
@@ -512,7 +512,194 @@ int check_window_overflow(Context& c) {
512 VirtualFree(ring, 0, MEM_RELEASE); 512 VirtualFree(ring, 0, MEM_RELEASE);
513 return 0; 513 return 0;
514} 514}
515// These fixtures register their own pairs without XMem. Retire each before Wine can reuse either VA. 515// What the GPU writes into a title window goes back to the title's pages (#1537, the WRITE_INVALID stop: a window is
516// a read-side mirror, so a UAV write used to land in the copy and the title never saw it). The shader's write is read
517// back through the pages themselves; then a write by the title must survive the next submission's forward copy.
518struct WriteBack {
519 Context* c;
520 ID3D12CommandAllocator* allocator;
521 ID3D12GraphicsCommandList* list;
522 ID3D12Resource* out;
523 ID3D12DescriptorHeap* heap;
524 UINT64 gpu;
525};
526
527// One submission that dispatches through a root UAV at `va` and waits for it. False on a failed call.
528int submit_write(WriteBack& s, std::uint64_t va) {
529 EXPECT(s.allocator->Reset() == S_OK);
530 EXPECT(s.list->Reset(s.allocator, s.c->pso) == S_OK);
531 ID3D12DescriptorHeap* heaps[] = {s.heap};
532 s.list->SetDescriptorHeaps(1, heaps);
533 s.list->SetComputeRootSignature(s.c->root);
534 s.list->SetComputeRoot32BitConstant(0, 0, 0);
535 s.list->SetComputeRoot32BitConstant(0, 1, 1); // the step: a word the shader writes
536 s.list->SetComputeRootUnorderedAccessView(1, va);
537 s.list->SetComputeRootDescriptorTable(2, D3D12_GPU_DESCRIPTOR_HANDLE{s.gpu});
538 s.list->Dispatch(1, 1, 1);
539 D3D12_RESOURCE_BARRIER to_copy{};
540 to_copy.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
541 to_copy.Transition.pResource = s.out;
542 to_copy.Transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;
543 to_copy.Transition.StateBefore = D3D12_RESOURCE_STATE_UNORDERED_ACCESS;
544 to_copy.Transition.StateAfter = D3D12_RESOURCE_STATE_COPY_SOURCE;
545 s.list->ResourceBarrier(1, &to_copy);
546 EXPECT(s.list->Close() == S_OK);
547 ID3D12CommandList* lists[] = {s.list};
548 s.c->queue->ExecuteCommandLists(1, lists);
549 EXPECT(rt::d3d12::last_execute_result(s.c->queue) == leonida::ReplayResult::success);
550 EXPECT(SUCCEEDED(s.c->queue->Signal(s.c->fence, ++s.c->fence_value)));
551 s.c->fence->SetEventOnCompletion(s.c->fence_value, nullptr); // a null event waits, as D3D12 does
552 return 0;
553}
554
555// The same gap on a buffer the title places at its own address (slot 133, the retail case for a compute result it
556// reads back): the pages are not imported here, so the buffer is a shadow, and the write of a root UAV over the
557// title's VA must reach the pages at the next submission - and the title's own newer words must still win.
558int check_placed_write_back(Context& c, bool geometry) {
559 void* pages = VirtualAlloc(nullptr, kPages, MEM_TOP_DOWN | MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
560 EXPECT(pages);
561 const auto title_va = reinterpret_cast<std::uint64_t>(pages);
562 auto* words = static_cast<std::uint32_t*>(pages);
563 for (UINT i = 0; i < kPages / 4; ++i) words[i] = 0xA0000000u + i * 3u; // never zero, unlike the shader's rows
564 auto& aliases = leonida::title_va_aliases();
565 aliases.add_title_memory(title_va, kPages); // what the xmem shims do for the title's allocations
566 const D3D12_RESOURCE_DESC desc = buffer_desc(kPages);
567 Ref<ID3D12Resource> placed;
568 EXPECT(SUCCEEDED(
569 rt::d3d12::create_buffer_at_host_address(c.inner, pages, desc, 0xFFFFFFFFu, IID_PPV_ARGS(&placed.p))));
570 EXPECT(placed->GetGPUVirtualAddress() == title_va);
571 EXPECT(aliases.shader_va(title_va) != title_va); // there is a copy to be reached through
572
573 const D3D12_HEAP_PROPERTIES default_heap{D3D12_HEAP_TYPE_DEFAULT}, readback_heap{D3D12_HEAP_TYPE_READBACK};
574 const auto uav = buffer_desc(kBytes, D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS);
575 const auto readback_desc = buffer_desc(kBytes);
576 Ref<ID3D12Resource> out, readback;
577 EXPECT(SUCCEEDED(c.device->CreateCommittedResource(&default_heap, D3D12_HEAP_FLAG_NONE, &uav,
578 D3D12_RESOURCE_STATE_UNORDERED_ACCESS, nullptr,
579 IID_PPV_ARGS(&out.p))));
580 EXPECT(SUCCEEDED(c.device->CreateCommittedResource(&readback_heap, D3D12_HEAP_FLAG_NONE, &readback_desc,
581 D3D12_RESOURCE_STATE_COPY_DEST, nullptr,
582 IID_PPV_ARGS(&readback.p))));
583 D3D12_DESCRIPTOR_HEAP_DESC heap_desc{D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 8,
584 D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE, 0};
585 Ref<ID3D12DescriptorHeap> heap;
586 EXPECT(SUCCEEDED(c.device->CreateDescriptorHeap(&heap_desc, IID_PPV_ARGS(&heap.p))));
587 Ref<ID3D12CommandAllocator> allocator;
588 Ref<ID3D12GraphicsCommandList> list;
589 EXPECT(SUCCEEDED(c.device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&allocator.p))));
590 EXPECT(SUCCEEDED(c.device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, allocator.p, c.pso,
591 IID_PPV_ARGS(&list.p))));
592 EXPECT(list->Close() == S_OK);
593 WriteBack s{&c, allocator.p, list.p, out.p, heap.p,
594 reinterpret_cast<XboxHeapHandleFn>(slot(heap.p, 10))(heap.p)};
595
596 const std::vector<std::uint32_t> before(words, words + kElements);
597 EXPECT(submit_write(s, title_va) == 0);
598 UINT untouched = 0;
599 for (UINT i = 0; i < kElements; ++i) untouched += words[i] == before[i];
600 // An imported buffer is the same memory and needs no copy; only a shadow owes the pages the GPU's words.
601 const bool shadow = !geometry && aliases.shader_va(title_va) >= c.arena;
602 if (shadow) {
603 std::printf("placed buffer write back: %u/%u words still held the title's before the next submission\n",
604 untouched, kElements);
605 EXPECT(untouched == kElements);
606 }
607
608 EXPECT(submit_write(s, title_va) == 0);
609 std::vector<std::uint32_t> written(words, words + kElements);
610 UINT reached = 0, changed = 0, nonzero = 0;
611 for (UINT i = 0; i < kElements; ++i) {
612 reached += written[i] == (0xA0000000u + i * 3u);
613 changed += written[i] != before[i];
614 nonzero += written[i] != 0;
615 }
616 std::printf("placed buffer write back: %u/%u words reached the pages (%u changed, %u nonzero)\n", kElements - reached,
617 kElements, changed, nonzero);
618 EXPECT(changed == kElements && nonzero > 0);
619 (void)reached;
620
621 // The title writes its own words over the result: the next submission copies them forward and they stay.
622 for (UINT i = 0; i < kElements; ++i) words[i] = 0xB16B00B5u;
623 EXPECT(submit_write(s, title_va) == 0);
624 UINT kept = 0;
625 for (UINT i = 0; i < kElements; ++i) kept += words[i] == 0xB16B00B5u;
626 std::printf("placed buffer write back: the title's own words survived %u/%u\n", kept, kElements);
627 EXPECT(kept == kElements);
628
629 placed.reset(); // the shadow goes, the pages stay writable
630 aliases.remove_title_memory(title_va);
631 VirtualFree(pages, 0, MEM_RELEASE);
632 return 0;
633}
634
635int check_window_write_back(Context& c, bool geometry) {
636 constexpr UINT64 ring_bytes = 256 * 1024;
637 auto* ring = static_cast<std::uint32_t*>(
638 VirtualAlloc(nullptr, ring_bytes, MEM_TOP_DOWN | MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE));
639 EXPECT(ring);
640 const auto ring_va = reinterpret_cast<std::uint64_t>(ring);
641 for (UINT i = 0; i < ring_bytes / 4; ++i) ring[i] = 0;
642 auto& aliases = leonida::title_va_aliases();
643 aliases.add_title_memory(ring_va, ring_bytes);
644
645 const D3D12_HEAP_PROPERTIES default_heap{D3D12_HEAP_TYPE_DEFAULT}, readback_heap{D3D12_HEAP_TYPE_READBACK};
646 const auto uav = buffer_desc(kBytes, D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS);
647 const auto readback_desc = buffer_desc(kBytes);
648 Ref<ID3D12Resource> out, readback;
649 EXPECT(SUCCEEDED(c.device->CreateCommittedResource(&default_heap, D3D12_HEAP_FLAG_NONE, &uav,
650 D3D12_RESOURCE_STATE_UNORDERED_ACCESS, nullptr,
651 IID_PPV_ARGS(&out.p))));
652 EXPECT(SUCCEEDED(c.device->CreateCommittedResource(&readback_heap, D3D12_HEAP_FLAG_NONE, &readback_desc,
653 D3D12_RESOURCE_STATE_COPY_DEST, nullptr,
654 IID_PPV_ARGS(&readback.p))));
655 D3D12_DESCRIPTOR_HEAP_DESC heap_desc{D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV, 8,
656 D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE, 0};
657 Ref<ID3D12DescriptorHeap> heap;
658 EXPECT(SUCCEEDED(c.device->CreateDescriptorHeap(&heap_desc, IID_PPV_ARGS(&heap.p))));
659 Ref<ID3D12CommandAllocator> allocator;
660 Ref<ID3D12GraphicsCommandList> list;
661 EXPECT(SUCCEEDED(c.device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&allocator.p))));
662 EXPECT(SUCCEEDED(c.device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, allocator.p, c.pso,
663 IID_PPV_ARGS(&list.p))));
664 EXPECT(list->Close() == S_OK); // Reset needs it closed, as the title leaves it
665 WriteBack s{&c, allocator.p, list.p, out.p, heap.p,
666 reinterpret_cast<XboxHeapHandleFn>(slot(heap.p, 10))(heap.p)};
667
668 // The shader writes the range the root UAV names, which is the title's own pages here, far past the arena: the
669 // resolve already has to make a window for them before the submission.
670 EXPECT(aliases.shader_va(ring_va) == ring_va);
671 EXPECT(submit_write(s, ring_va) == 0);
672 EXPECT(aliases.shader_va(ring_va) != ring_va); // a window was made for the title's pages
673 if (!geometry) EXPECT(ring[0] == 0); // the copy took the write: the pages get it only after the next submission
674
675 // The next submission's refresh copies the GPU's writes back, before it copies the pages forward.
676 EXPECT(submit_write(s, ring_va) == 0);
677 const std::vector<std::uint32_t> written(ring, ring + kElements);
678 UINT nonzero = 0;
679 for (std::uint32_t w : written) nonzero += w != 0;
680 std::printf("write back: %u of %u words the shader wrote are in the title's pages\n", nonzero, kElements);
681 EXPECT(nonzero > 0);
682
683 // The same submission again: the pages keep what they hold, the values do not drift.
684 EXPECT(submit_write(s, ring_va) == 0);
685 UINT stable = 0;
686 for (UINT i = 0; i < kElements; ++i) stable += ring[i] == written[i];
687 std::printf("write back: the pages kept those words across two submissions %u/%u\n", stable, kElements);
688 EXPECT(stable == kElements);
689
690 // A write by the title after a submission is copied forward over the result again, not overwritten by it.
691 for (UINT i = 0; i < kElements; ++i) ring[i] = 0xB16B00B5u;
692 EXPECT(submit_write(s, ring_va) == 0);
693 UINT kept = 0;
694 for (UINT i = 0; i < kElements; ++i) kept += ring[i] == 0xB16B00B5u;
695 std::printf("write back: the title's own words survived the next submission %u/%u\n", kept, kElements);
696 EXPECT(kept == kElements);
697
698 aliases.remove_title_memory(ring_va);
699 VirtualFree(ring, 0, MEM_RELEASE);
700 return 0;
701}
702
516void remove_test_pair(std::uintptr_t gpu, std::uintptr_t cpu) { 703void remove_test_pair(std::uintptr_t gpu, std::uintptr_t cpu) {
517 auto& state = leonida::title_gpu_views::state(); 704 auto& state = leonida::title_gpu_views::state();
518 std::unique_lock lock(state.mutex); 705 std::unique_lock lock(state.mutex);
@@ -978,6 +1165,59 @@ int check_rebound_tables(Context& c, ID3D12RootSignature* narrow, bool mirror, b
978 return 0; 1165 return 0;
979} 1166}
980 1167
1168// Two slot-133 shadows over the same title page share one tracker and its sums (LEONIDA_SHADOW_KEEP, src/
1169// shadow_keep.h). A is copied with the title's byte at 1; the byte becomes 2 and B is made over the page, so B's first
1170// copy holds 2; the byte goes back to 1 and a submission refreshes both. Both copies must hold 1, with the flag on or
1171// off: B's first copy brings its pieces to the sums, or the sums still read 1 and B keeps 2 (found by lixonik).
1172int check_shadow_keep_refill(Context& c) {
1173 constexpr UINT64 kPage = 4096, kAt = 16; // the byte: page 1 of A, page 0 of B
1174 auto* pages = static_cast<std::uint8_t*>(
1175 VirtualAlloc(nullptr, kPages, MEM_TOP_DOWN | MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE));
1176 EXPECT(pages);
1177 pages[kPage + kAt] = 1;
1178 const D3D12_RESOURCE_DESC desc = buffer_desc(2 * kPage);
1179 Ref<ID3D12Resource> a, b, readback;
1180 EXPECT(SUCCEEDED(rt::d3d12::create_buffer_at_host_address(c.inner, pages, desc, 0xFFFFFFFFu,
1181 IID_PPV_ARGS(&a.p))));
1182 EXPECT(rt::d3d12::title_shadow_buffer(a.p));
1183 pages[kPage + kAt] = 2;
1184 EXPECT(SUCCEEDED(rt::d3d12::create_buffer_at_host_address(c.inner, pages + kPage, desc, 0xFFFFFFFFu,
1185 IID_PPV_ARGS(&b.p))));
1186 EXPECT(rt::d3d12::title_shadow_buffer(b.p));
1187 pages[kPage + kAt] = 1;
1188
1189 const D3D12_HEAP_PROPERTIES readback_heap{D3D12_HEAP_TYPE_READBACK};
1190 const auto readback_desc = buffer_desc(2 * kBytes);
1191 EXPECT(SUCCEEDED(c.device->CreateCommittedResource(&readback_heap, D3D12_HEAP_FLAG_NONE, &readback_desc,
1192 D3D12_RESOURCE_STATE_COPY_DEST, nullptr,
1193 IID_PPV_ARGS(&readback.p))));
1194 Ref<ID3D12CommandAllocator> allocator;
1195 Ref<ID3D12GraphicsCommandList> list;
1196 EXPECT(SUCCEEDED(c.device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&allocator.p))));
1197 EXPECT(SUCCEEDED(c.device->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, allocator.p, nullptr,
1198 IID_PPV_ARGS(&list.p))));
1199 list->CopyBufferRegion(readback.p, 0, a.p, kPage, kBytes);
1200 list->CopyBufferRegion(readback.p, kBytes, b.p, 0, kBytes);
1201 EXPECT(list->Close() == S_OK);
1202 ID3D12CommandList* lists[] = {list.p};
1203 c.queue->ExecuteCommandLists(1, lists); // the refresh, then the copies
1204 EXPECT(rt::d3d12::last_execute_result(c.queue) == leonida::ReplayResult::success);
1205 EXPECT(SUCCEEDED(c.queue->Signal(c.fence, ++c.fence_value)));
1206 EXPECT(SUCCEEDED(c.fence->SetEventOnCompletion(c.fence_value, nullptr)));
1207 void* mapped = nullptr;
1208 EXPECT(SUCCEEDED(readback->Map(0, nullptr, &mapped)));
1209 const std::uint8_t got_a = static_cast<const std::uint8_t*>(mapped)[kAt];
1210 const std::uint8_t got_b = static_cast<const std::uint8_t*>(mapped)[kBytes + kAt];
1211 readback->Unmap(0, nullptr);
1212 std::printf("shadow keep refill: A holds %u, B holds %u (the title's byte is 1)\n", got_a, got_b);
1213 EXPECT(got_a == 1);
1214 EXPECT(got_b == 1);
1215 a.reset();
1216 b.reset();
1217 VirtualFree(pages, 0, MEM_RELEASE);
1218 return 0;
1219}
1220
981} // namespace 1221} // namespace
982 1222
983int main(int argc, char** argv) { 1223int main(int argc, char** argv) {
@@ -987,6 +1227,9 @@ int main(int argc, char** argv) {
987 const bool api_copy = api_copy_off || (argc == 2 && std::strcmp(argv[1], "--api-descriptor-copy") == 0); 1227 const bool api_copy = api_copy_off || (argc == 2 && std::strcmp(argv[1], "--api-descriptor-copy") == 0);
988 const bool rebind = api_copy || mirror_off || second_device || (argc == 2 && std::strcmp(argv[1], "--rebound-tables") == 0); 1228 const bool rebind = api_copy || mirror_off || second_device || (argc == 2 && std::strcmp(argv[1], "--rebound-tables") == 0);
989 const bool window_cap = argc == 2 && std::strcmp(argv[1], "--window-cap") == 0; 1229 const bool window_cap = argc == 2 && std::strcmp(argv[1], "--window-cap") == 0;
1230 const bool window_write_back = argc == 2 && std::strcmp(argv[1], "--window-writeback") == 0;
1231 const bool placed_write_back = argc == 2 && std::strcmp(argv[1], "--placed-writeback") == 0;
1232 const bool keep_refill = argc == 2 && std::strcmp(argv[1], "--shadow-keep-refill") == 0;
990 if (window_cap) { 1233 if (window_cap) {
991 const char* cap = std::getenv("LEONIDA_TITLE_WINDOWS_MB"); 1234 const char* cap = std::getenv("LEONIDA_TITLE_WINDOWS_MB");
992 if (!cap || std::strcmp(cap, "0")) { 1235 if (!cap || std::strcmp(cap, "0")) {
@@ -1101,6 +1344,33 @@ int main(int argc, char** argv) {
1101 std::printf("title memory past the window cap: the views were zero-size and the shader read zeros\n"); 1344 std::printf("title memory past the window cap: the views were zero-size and the shader read zeros\n");
1102 return 0; 1345 return 0;
1103 } 1346 }
1347 if (placed_write_back) {
1348 if (check_placed_write_back(c, geometry)) return 1;
1349 if (d.validation_errors()) {
1350 std::fprintf(stderr, "%u validation errors\n", d.validation_errors());
1351 return 1;
1352 }
1353 std::printf("title-placed buffer write back: the GPU's writes reached the title's pages\n");
1354 return 0;
1355 }
1356 if (keep_refill) {
1357 if (check_shadow_keep_refill(c)) return 1;
1358 if (d.validation_errors()) {
1359 std::fprintf(stderr, "%u validation errors\n", d.validation_errors());
1360 return 1;
1361 }
1362 return 0;
1363 }
1364 if (window_write_back) {
1365 if (check_window_write_back(c, geometry)) return 1;
1366 if (d.validation_errors()) {
1367 std::fprintf(stderr, "%u validation errors\n", d.validation_errors());
1368 return 1;
1369 }
1370 std::printf("title window write back: the GPU's writes reached the title's pages and the title's own "
1371 "words won\n");
1372 return 0;
1373 }
1104 if (geometry && check_declined_imports(c)) return 1; 1374 if (geometry && check_declined_imports(c)) return 1;
1105 if (geometry && check_import_over_shadow(c)) return 1; 1375 if (geometry && check_import_over_shadow(c)) return 1;
1106 if (check_kind(c, "read-write", PAGE_READWRITE, checks)) return 1; 1376 if (check_kind(c, "read-write", PAGE_READWRITE, checks)) return 1;
diff --git a/runtime/test/d3d12_translated_draw_test.cpp b/runtime/test/d3d12_translated_draw_test.cpp
index 560110240..b45cc2c84 100644
--- a/runtime/test/d3d12_translated_draw_test.cpp
+++ b/runtime/test/d3d12_translated_draw_test.cpp
@@ -193,6 +193,7 @@ int main(int argc, char** argv) {
193 rt::d3d12::VulkanDeviceInfo info{}; 193 rt::d3d12::VulkanDeviceInfo info{};
194 info.prepare_on_bind=d.prepare_on_bind; 194 info.prepare_on_bind=d.prepare_on_bind;
195 info.cold_graphics_compile=d.cold_graphics_compile; 195 info.cold_graphics_compile=d.cold_graphics_compile;
196 info.heavy_pipeline_cache=d.heavy_pipeline_cache;
196 info.get_instance_proc = d.instance_proc; 197 info.get_instance_proc = d.instance_proc;
197 info.instance = d.instance; 198 info.instance = d.instance;
198 info.physical = d.physical; 199 info.physical = d.physical;
diff --git a/runtime/test/d3d12_unmapped_vsharp_test.cpp b/runtime/test/d3d12_unmapped_vsharp_test.cpp
index 2e072ce40..1cb0b7c23 100644
--- a/runtime/test/d3d12_unmapped_vsharp_test.cpp
+++ b/runtime/test/d3d12_unmapped_vsharp_test.cpp
@@ -232,8 +232,9 @@ int check_console_heap(ID3D12Device* device, ID3D12CommandQueue* queue, ID3D12Fe
232 EXPECT(!(copy[3][0] | copy[3][1] | copy[3][2] | copy[3][3])); // the data slot's descriptor half is null 232 EXPECT(!(copy[3][0] | copy[3][1] | copy[3][2] | copy[3][3])); // the data slot's descriptor half is null
233 for (int i = 0; i < 4; ++i) EXPECT(!std::memcmp(title + i * kDescriptor, before[i], kDescriptor)); 233 for (int i = 0; i < 4; ++i) EXPECT(!std::memcmp(title + i * kDescriptor, before[i], kDescriptor));
234 234
235 // 128 cold descriptors share one absent range. Publishing its alias leaves the title bytes 235 // 128 descriptors wait on one absent range; the title's bytes never change. Publishing its alias fixes every one
236 // unchanged. Only the bounded round-robin probes should discover it in the first 64 submits. 236 // of them at the next submission (the heap's slot records: an addition over a waiting V#), not one round-robin
237 // probe at a time.
237 Ref<ID3D12CommandAllocator> allocator; 238 Ref<ID3D12CommandAllocator> allocator;
238 Ref<ID3D12GraphicsCommandList> list; 239 Ref<ID3D12GraphicsCommandList> list;
239 EXPECT(SUCCEEDED(device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&allocator.p)))); 240 EXPECT(SUCCEEDED(device->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&allocator.p))));
@@ -241,23 +242,70 @@ int check_console_heap(ID3D12Device* device, ID3D12CommandQueue* queue, ID3D12Fe
241 IID_PPV_ARGS(&list.p)))); 242 IID_PPV_ARGS(&list.p))));
242 EXPECT(SUCCEEDED(list->Close())); 243 EXPECT(SUCCEEDED(list->Close()));
243 ID3D12CommandList* lists[] = {list.p}; 244 ID3D12CommandList* lists[] = {list.p};
244 for (unsigned pass = 0; pass < 64; ++pass) { 245 const auto submit = [&] {
245 if (pass == 1) leonida::title_va_aliases().add(unmapped, kViewBytes, b.arena_va);
246 queue->ExecuteCommandLists(1, lists); 246 queue->ExecuteCommandLists(1, lists);
247 EXPECT(SUCCEEDED(queue->Signal(fence, ++fence_value))); 247 return SUCCEEDED(queue->Signal(fence, ++fence_value)) &&
248 EXPECT(SUCCEEDED(fence->SetEventOnCompletion(fence_value, nullptr))); 248 SUCCEEDED(fence->SetEventOnCompletion(fence_value, nullptr));
249 } 249 };
250 const auto count_restored = [&](unsigned& restored) {
251 restored = 0;
252 for (unsigned slot = 0; slot < 131; ++slot) {
253 if (slot > 0 && slot < 4) continue;
254 std::uint32_t words[8];
255 if (!rt::d3d12::read_arena(device, shader_va + slot * kDescriptor, words, sizeof(words))) return false;
256 if (base_of(words) == b.arena_va && words[2]) ++restored;
257 else if (!zero_size(words)) return false;
258 }
259 return true;
260 };
250 unsigned restored = 0; 261 unsigned restored = 0;
251 for (unsigned slot = 0; slot < 131; ++slot) { 262 EXPECT(submit());
252 if (slot > 0 && slot < 4) continue; 263 EXPECT(count_restored(restored) && restored == 0);
264 leonida::title_va_aliases().add(unmapped, kViewBytes, b.arena_va);
265 EXPECT(submit());
266 EXPECT(count_restored(restored) && restored == 128);
267 std::printf("128 waiting zero descriptors, all restored at the first submission after their alias came\n");
268 // The alias goes: at the next submission none of them names its copy any more.
269 leonida::title_va_aliases().remove(unmapped, b.arena_va);
270 EXPECT(submit());
271 EXPECT(count_restored(restored) && restored == 0);
272
273 // A released buffer: the slots that named it are null at the next submission, the others keep their V#s. The
274 // title's bytes stay as written (each slot is rewritten through its page, as the title does, so the heap's write
275 // tracking sees it).
276 {
277 Ref<ID3D12Resource> gone;
278 const D3D12_HEAP_PROPERTIES default_heap{D3D12_HEAP_TYPE_DEFAULT};
279 const auto gone_desc = buffer_desc(64 * 1024);
280 EXPECT(SUCCEEDED(device->CreateCommittedResource(&default_heap, D3D12_HEAP_FLAG_NONE, &gone_desc,
281 D3D12_RESOURCE_STATE_COMMON, nullptr, IID_PPV_ARGS(&gone.p))));
282 const std::uint64_t gone_va = gone->GetGPUVirtualAddress();
283 for (int i = 140; i < 150; ++i) put(i, raw_vsharp(gone_va + std::uint64_t(i - 140) * kViewBytes));
284 for (int i = 150; i < 160; ++i) put(i, raw_vsharp(b.arena_va));
285 EXPECT(submit());
253 std::uint32_t words[8]; 286 std::uint32_t words[8];
254 EXPECT(rt::d3d12::read_arena(device, shader_va + slot * kDescriptor, words, sizeof(words))); 287 for (unsigned slot = 140; slot < 160; ++slot) {
255 if (base_of(words) == b.arena_va && words[2]) ++restored; 288 EXPECT(rt::d3d12::read_arena(device, shader_va + slot * kDescriptor, words, sizeof(words)));
256 else EXPECT(zero_size(words)); 289 EXPECT(words[2] && base_of(words) == (slot < 150 ? gone_va + (slot - 140) * kViewBytes : b.arena_va));
290 }
291 gone.reset();
292 // The arena range goes once the device has retired the buffer: a few submissions at most.
293 bool nulled = false;
294 for (int pass = 0; pass < 8 && !nulled; ++pass) {
295 EXPECT(submit());
296 nulled = true;
297 for (unsigned slot = 140; slot < 150; ++slot) {
298 EXPECT(rt::d3d12::read_arena(device, shader_va + slot * kDescriptor, words, sizeof(words)));
299 nulled &= zero_size(words);
300 }
301 }
302 EXPECT(nulled);
303 for (unsigned slot = 150; slot < 160; ++slot) {
304 EXPECT(rt::d3d12::read_arena(device, shader_va + slot * kDescriptor, words, sizeof(words)));
305 EXPECT(words[2] && base_of(words) == b.arena_va);
306 }
307 std::printf("released buffer: the 10 slots that named it are null at the next submissions, 10 others kept\n");
257 } 308 }
258 EXPECT(restored == 16);
259 std::printf("128 settled zero descriptors, %u restored in 64 submissions\n", restored);
260 leonida::title_va_aliases().remove(unmapped, b.arena_va);
261 309
262 // The null guard: past the heap's last slot, up to kHeapIndexReach from its start, every byte reads 0. 310 // The null guard: past the heap's last slot, up to kHeapIndexReach from its start, every byte reads 0.
263 constexpr std::uint64_t reach = 64ull << 20; 311 constexpr std::uint64_t reach = 64ull << 20;
diff --git a/runtime/test/d3d12_xmem_placed_test.cpp b/runtime/test/d3d12_xmem_placed_test.cpp
index 7c64a23cf..33b5d462a 100644
--- a/runtime/test/d3d12_xmem_placed_test.cpp
+++ b/runtime/test/d3d12_xmem_placed_test.cpp
@@ -174,6 +174,82 @@ int queue_remap(ID3D12Device* real, ID3D12Device* proxy) {
174 return 0; 174 return 0;
175} 175}
176 176
177// Queue slot 31 as a retail run takes it: no batch hook, so the queue's default adapter sends each range to xmem's
178// range callback (copy_page_mappings_fn), which mirrors a legacy-paired GPU-only destination at its CPU view. The
179// source is a GPU-only pool backed only through its CPU alias, and the title maps a page of its own at one CPU twin
180// while the remap waits behind queue work (deferred with list values, waited for without them). When the remap is
181// applied, the GPU-only pages change and the title's CPU page keeps its bytes, through the copy and the unmap after it.
182int queue_remap_default_route(ID3D12Device* real, ID3D12Device* proxy) {
183 using rt::xmem::PageBatch;
184 using rt::xmem::PageRange;
185 auto reserve = reinterpret_cast<XMemVirtualAllocFn>(rt::shims::find("xmem.dll", "XMemVirtualAlloc"));
186 auto allocate = reinterpret_cast<XMemAllocatePhysicalPagesFn>(rt::shims::find("xmem.dll", "XMemAllocatePhysicalPages"));
187 auto map = reinterpret_cast<XMemMapPhysicalPagesFn>(rt::shims::find("xmem.dll", "XMemMapPhysicalPages"));
188 auto free_pages = reinterpret_cast<XMemFreePhysicalPagesFn>(rt::shims::find("xmem.dll", "XMemFreePhysicalPages"));
189 constexpr unsigned n = 2;
190 auto window = [&](DWORD protect) {
191 return static_cast<std::uint8_t*>(reserve(nullptr, n * kPage64k, MEM_RESERVE | kXmem64kPages, 0, protect));
192 };
193 // Two pairs, each a CPU range and then the GPU-only range of its size: the pool's and the destination's.
194 auto* pool_cpu = window(PAGE_READWRITE);
195 auto* pool = window(0x801);
196 auto* cpu = window(PAGE_READWRITE);
197 auto* dst = window(0x801);
198 EXPECT(pool_cpu && pool && cpu && dst);
199 EXPECT(leonida::title_gpu_views::to_cpu(uintptr_t(pool)) == uintptr_t(pool_cpu));
200 EXPECT(leonida::title_gpu_views::to_cpu(uintptr_t(dst)) == uintptr_t(cpu));
201 std::uint64_t pages[n + 1]{}, count = n + 1;
202 EXPECT(allocate(0x280, &count, pages) && count == n + 1);
203 EXPECT(map(pool_cpu, n, pages)); // the pool's pages are mapped at its CPU alias only
204 for (unsigned i = 0; i < n; ++i) pool_cpu[i * kPage64k] = static_cast<std::uint8_t>(40 + i);
205
206 D3D12_COMMAND_QUEUE_DESC desc{D3D12_COMMAND_LIST_TYPE_COPY};
207 Ref<ID3D12CommandQueue> queue;
208 Ref<ID3D12Fence> gate;
209 EXPECT(SUCCEEDED(proxy->CreateCommandQueue(&desc, IID_PPV_ARGS(&queue.p))));
210 EXPECT(SUCCEEDED(real->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&gate.p))));
211 auto* real_queue = rt::d3d12_xs::queue_proxy_real_queue(queue.p);
212 EXPECT(real_queue && SUCCEEDED(real_queue->Wait(gate.p, 1)));
213 rt::d3d12_xs::set_copy_page_mappings_hook(nullptr); // the retail route: the default adapter
214 using Copy = HRESULT(WINAPI*)(void*, UINT, const PageBatch*, std::uintptr_t, UINT, UINT);
215 auto call = reinterpret_cast<Copy>((*reinterpret_cast<void***>(queue.p))[31]);
216 const PageRange copy_run[] = {{0, 0, n}};
217 const PageBatch copy_batch{uintptr_t(dst), 1, copy_run};
218 auto done = std::async(std::launch::async, [&] { return call(queue.p, 1, &copy_batch, uintptr_t(pool), n, 0); });
219 // While the remap waits behind the held work, the title maps a page of its own at the second CPU twin.
220 EXPECT(map(cpu + kPage64k, 1, &pages[n]));
221 cpu[kPage64k] = 77;
222 EXPECT(SUCCEEDED(gate->Signal(1)));
223 EXPECT(SUCCEEDED(done.get()));
224 EXPECT(SUCCEEDED(real_queue->Signal(gate.p, 2)));
225 HANDLE remapped = CreateEventW(nullptr, FALSE, FALSE, nullptr);
226 EXPECT(remapped && SUCCEEDED(gate->SetEventOnCompletion(2, remapped)));
227 const auto completion = WaitForSingleObject(remapped, 10000);
228 CloseHandle(remapped);
229 EXPECT(completion == WAIT_OBJECT_0);
230 EXPECT(dst[0] == 40 && dst[kPage64k] == 41); // the GPU-only pages, found through the pool's CPU alias
231 EXPECT(cpu[0] == 40); // a CPU twin with no mapping of the title's follows the copy
232 EXPECT(cpu[kPage64k] == 77); // the title's own page is kept
233
234 // The unmap: the GPU-only pages and the mirrored twin are unmapped, the title's page stays.
235 const PageRange hole[] = {{2, 0, n}};
236 const PageBatch unmap_batch{uintptr_t(dst), 1, hole};
237 EXPECT(SUCCEEDED(call(queue.p, 1, &unmap_batch, uintptr_t(pool), n, 0)));
238 EXPECT(SUCCEEDED(real_queue->Signal(gate.p, 3)));
239 remapped = CreateEventW(nullptr, FALSE, FALSE, nullptr);
240 EXPECT(remapped && SUCCEEDED(gate->SetEventOnCompletion(3, remapped)));
241 EXPECT(WaitForSingleObject(remapped, 10000) == WAIT_OBJECT_0);
242 CloseHandle(remapped);
243 EXPECT(state_is(dst, MEM_RESERVE) && state_is(dst + kPage64k, MEM_RESERVE) && state_is(cpu, MEM_RESERVE));
244 EXPECT(cpu[kPage64k] == 77);
245
246 EXPECT(map(cpu + kPage64k, 1, nullptr) && map(pool_cpu, n, nullptr));
247 EXPECT(free_pages(n + 1, pages));
248 std::puts("queue slot 31 default route: a source through its CPU alias, a deferred copy and an unmap keep the "
249 "title's own CPU twin page");
250 return 0;
251}
252
177// What a GPU copy of `buffer` reads now (a submission: the shadows are refreshed first). 253// What a GPU copy of `buffer` reads now (a submission: the shadows are refreshed first).
178int read_back(ID3D12Device* real, ID3D12Resource* buffer, UINT64 size, std::vector<std::uint8_t>& out) { 254int read_back(ID3D12Device* real, ID3D12Resource* buffer, UINT64 size, std::vector<std::uint8_t>& out) {
179 D3D12_RESOURCE_DESC desc = buffer->GetDesc(); 255 D3D12_RESOURCE_DESC desc = buffer->GetDesc();
@@ -547,6 +623,7 @@ int main(int argc, char** argv) {
547 failures += run(real.p, device.p, eager); 623 failures += run(real.p, device.p, eager);
548 failures += exposure_map_ranges(device.p); 624 failures += exposure_map_ranges(device.p);
549 failures += queue_remap(real.p, device.p); 625 failures += queue_remap(real.p, device.p);
626 failures += queue_remap_default_route(real.p, device.p);
550 failures += paired_views(real.p); 627 failures += paired_views(real.p);
551 } 628 }
552 } 629 }
diff --git a/runtime/test/depth24_fragment_test.cpp b/runtime/test/depth24_fragment_test.cpp
new file mode 100644
index 000000000..e66e66b4e
--- /dev/null
+++ b/runtime/test/depth24_fragment_test.cpp
@@ -0,0 +1,608 @@
1// CPU-only SPIR-V validation and execution test for runtime/src/depth24_fragment.h (D24 and Xbox D16S8 fallback).
2// Verifies structural SPIR-V invariants (bounds, section order, pre-function declarations, interface variables,
3// execution modes) and interprets the emitted SPIR-V instructions directly across all 65,536 16-bit codes,
4// half-step ties, IEEE-754 specials, depth bias/slope/clamp, and 24-bit parity. No Vulkan device or game data.
5#include "../src/depth24_fragment.h"
6
7#include <algorithm>
8#include <array>
9#include <bit>
10#include <cmath>
11#include <cstdint>
12#include <cstdio>
13#include <cstring>
14#include <limits>
15#include <string>
16#include <unordered_map>
17#include <unordered_set>
18#include <vector>
19
20#define EXPECT(cond) \
21 do { \
22 if (!(cond)) { \
23 std::fprintf(stderr, "depth24_fragment_test: line %d failed: %s\n", __LINE__, #cond); \
24 return 1; \
25 } \
26 } while (0)
27
28namespace {
29
30using namespace leonida;
31using namespace leonida::spirv24;
32
33std::uint32_t f_bits(float f) {
34 std::uint32_t u = 0;
35 std::memcpy(&u, &f, 4);
36 return u;
37}
38
39float u_float(std::uint32_t u) {
40 float f = 0.0f;
41 std::memcpy(&f, &u, 4);
42 return f;
43}
44
45double round_half_even(double x) {
46 const double r = std::floor(x + 0.5);
47 return r - x == 0.5 && std::fmod(r, 2.0) != 0.0 ? r - 1.0 : r;
48}
49
50std::uint32_t ref_quantize_code(float z, double max_levels, std::uint32_t max_code) {
51 if (!(z > 0.0f)) return 0u;
52 if (z >= 1.0f) return max_code;
53 const float product = z * static_cast<float>(max_levels);
54 return static_cast<std::uint32_t>(round_half_even(double(product)));
55}
56
57float ref_quantize_float(float z, double max_levels, std::uint32_t max_code) {
58 const std::uint32_t d = ref_quantize_code(z, max_levels, max_code);
59 return static_cast<float>(double(d) / max_levels);
60}
61
62// Synthetic SPIR-V fragment shader that either leaves FragDepth untouched or writes its own FragDepth
63// (optionally with an extra early OpReturn branch, DepthGreater conservative mode, or EarlyFragmentTests).
64std::vector<std::uint32_t> make_synthetic_fragment(bool writes_depth, bool early_tests, bool conservative_greater,
65 bool two_returns) {
66 constexpr std::uint32_t op_branch_conditional = 250;
67 constexpr std::uint32_t id_main = 1, id_void = 2, id_fn = 3, id_label0 = 4, id_f32 = 5, id_pf_out = 6,
68 id_frag_depth = 7, id_v4f = 8, id_pv4_in = 9, id_frag_coord = 10, id_bool = 11,
69 id_true = 12, id_label1 = 13, id_label2 = 14, id_c = 15, id_z = 16, bound = 17;
70 std::vector<std::uint32_t> w = {0x07230203u, 0x00010000u, 0, bound, 0};
71 auto put = [&](Inst i) { w.insert(w.end(), i.begin(), i.end()); };
72 put(make(op_capability, {1}));
73 put(make(op_memory_model, {0, 1}));
74 Inst ep = make(op_entry_point, {model_fragment, id_main});
75 append_string(ep, "main");
76 if (writes_depth) {
77 ep.push_back(id_frag_coord);
78 ep.push_back(id_frag_depth);
79 }
80 fix_length(ep);
81 put(ep);
82 put(make(op_execution_mode, {id_main, mode_origin_upper_left}));
83 if (early_tests) put(make(op_execution_mode, {id_main, mode_early_fragment_tests}));
84 if (conservative_greater) put(make(op_execution_mode, {id_main, mode_depth_greater}));
85 if (writes_depth) {
86 put(make(op_decorate, {id_frag_coord, decoration_builtin, builtin_frag_coord}));
87 put(make(op_decorate, {id_frag_depth, decoration_builtin, builtin_frag_depth}));
88 }
89 put(make(op_type_void, {id_void}));
90 put(make(op_type_function, {id_fn, id_void}));
91 if (writes_depth) {
92 put(make(op_type_float, {id_f32, 32}));
93 put(make(op_type_pointer, {id_pf_out, storage_output, id_f32}));
94 put(make(op_type_vector, {id_v4f, id_f32, 4}));
95 put(make(op_type_pointer, {id_pv4_in, storage_input, id_v4f}));
96 if (two_returns) {
97 put(make(op_type_bool, {id_bool}));
98 put(make(41 /* OpConstantTrue */, {id_bool, id_true}));
99 }
100 put(make(op_variable, {id_pv4_in, id_frag_coord, storage_input}));
101 put(make(op_variable, {id_pf_out, id_frag_depth, storage_output}));
102 }
103 put(make(op_function, {id_void, id_main, 0, id_fn}));
104 put(make(op_label, {id_label0}));
105 if (writes_depth) {
106 put(make(op_load, {id_v4f, id_c, id_frag_coord}));
107 put(make(op_composite_extract, {id_f32, id_z, id_c, 2}));
108 put(make(op_store, {id_frag_depth, id_z}));
109 if (two_returns) {
110 put(make(op_branch_conditional, {id_true, id_label1, id_label2}));
111 put(make(op_label, {id_label1}));
112 put(make(op_return, {}));
113 put(make(op_label, {id_label2}));
114 }
115 }
116 put(make(op_return, {}));
117 put(make(op_function_end, {}));
118 return w;
119}
120
121// Structural SPIR-V checker + interpreter for depth24_patch_fragment output.
122struct SpvProgram {
123 std::uint32_t bound = 0;
124 std::uint32_t glsl_id = 0;
125 std::uint32_t frag_coord_var = 0;
126 std::uint32_t frag_depth_var = 0;
127 bool has_depth_replacing = false;
128 bool has_conservative_depth = false;
129 bool frag_depth_in_interface = false;
130 bool frag_coord_in_interface = false;
131 std::unordered_map<std::uint32_t, std::uint32_t> const_u32;
132 std::unordered_map<std::uint32_t, bool> const_bool;
133 std::vector<Inst> body;
134
135 bool parse_and_validate(const std::vector<std::uint32_t>& words, std::string& err) {
136 if (words.size() < 5 || words[0] != 0x07230203u) {
137 err = "bad magic";
138 return false;
139 }
140 bound = words[3];
141 std::vector<Inst> insts;
142 for (std::size_t w = 5; w < words.size();) {
143 const std::uint32_t count = words[w] >> 16;
144 if (count == 0 || w + count > words.size()) {
145 err = "truncated instruction";
146 return false;
147 }
148 insts.emplace_back(words.begin() + std::ptrdiff_t(w), words.begin() + std::ptrdiff_t(w + count));
149 w += count;
150 }
151
152 // Section order check: Capability(0) -> ExtInstImport(1) -> MemoryModel(2) -> EntryPoint(3)
153 // -> ExecutionMode(4) -> Decorations(5) -> Globals/Types/Constants/Variables(6) -> Functions(7).
154 int section = 0;
155 std::unordered_set<std::uint32_t> defined_globals;
156 std::unordered_set<std::uint32_t> interface_ids;
157 bool in_fn = false;
158 std::size_t body_start = 0;
159
160 auto check_id = [&](std::uint32_t id) { return id > 0 && id < bound; };
161
162 for (std::size_t idx = 0; idx < insts.size(); ++idx) {
163 const Inst& i = insts[idx];
164 const std::uint32_t op = opcode(i);
165 if (!in_fn) {
166 int s = section;
167 if (op == op_capability) s = 0;
168 else if (op == op_ext_inst_import) s = 1;
169 else if (op == op_memory_model) s = 2;
170 else if (op == op_entry_point) s = 3;
171 else if (op == op_execution_mode || op == op_execution_mode_id) s = 4;
172 else if (op == op_decorate) s = 5;
173 else if (is_global_decl(op)) s = 6;
174 else if (op == op_function) s = 7;
175 if (s < section) {
176 err = "out-of-order SPIR-V section";
177 return false;
178 }
179 section = s;
180 }
181
182 if (op == op_ext_inst_import) {
183 if (i.size() < 3 || !check_id(i[1])) {
184 err = "bad ExtInstImport";
185 return false;
186 }
187 std::string name((i.size() - 2) * 4, '\0');
188 std::memcpy(name.data(), &i[2], name.size());
189 if (std::strcmp(name.c_str(), "GLSL.std.450") == 0) glsl_id = i[1];
190 defined_globals.insert(i[1]);
191 } else if (op == op_entry_point) {
192 const std::size_t names = 3 + string_words(i, 3);
193 for (std::size_t w = names; w < i.size(); ++w) interface_ids.insert(i[w]);
194 } else if (op == op_execution_mode && i.size() >= 3) {
195 if (i[2] == mode_depth_replacing) has_depth_replacing = true;
196 if (i[2] == mode_depth_greater || i[2] == mode_depth_less || i[2] == mode_depth_unchanged)
197 has_conservative_depth = true;
198 } else if (op == op_decorate && i.size() == 4 && i[2] == decoration_builtin) {
199 if (i[3] == builtin_frag_coord) frag_coord_var = i[1];
200 if (i[3] == builtin_frag_depth) frag_depth_var = i[1];
201 } else if (!in_fn && is_global_decl(op)) {
202 std::uint32_t res = 0;
203 if (op == op_constant && i.size() == 4) {
204 res = i[2];
205 const_u32[res] = i[3];
206 } else if (op == 41 /* OpConstantTrue */ && i.size() == 3) {
207 res = i[2];
208 const_bool[res] = true;
209 } else if (op == op_variable && i.size() >= 4) {
210 res = i[2];
211 } else if (op >= op_type_void && op <= 39 && i.size() >= 2) {
212 res = i[1];
213 }
214 if (res) {
215 if (!check_id(res) || !defined_globals.insert(res).second) {
216 err = "duplicate or out-of-bounds global id";
217 return false;
218 }
219 }
220 } else if (op == op_function) {
221 in_fn = true;
222 body_start = idx;
223 body.push_back(i);
224 } else if (in_fn) {
225 body.push_back(i);
226 if (op == op_function_end) in_fn = false;
227 }
228 }
229 if (body_start == 0 || body.empty()) {
230 err = "missing function body";
231 return false;
232 }
233 frag_depth_in_interface = frag_depth_var && interface_ids.count(frag_depth_var) != 0;
234 frag_coord_in_interface = frag_coord_var && interface_ids.count(frag_coord_var) != 0;
235
236 // Verify every SSA operand in the function body is defined (either globally before OpFunction or earlier in
237 // the body) and every result id is unique and < bound.
238 std::unordered_set<std::uint32_t> defs = defined_globals;
239 for (const Inst& i : body) {
240 const std::uint32_t op = opcode(i);
241 if (op == op_function || op == op_label || op == op_return || op == op_function_end) {
242 if (op == op_label && i.size() == 2) defs.insert(i[1]);
243 continue;
244 }
245 if (op == 250 /* OpBranchConditional */) {
246 if (i.size() != 4 || !defs.count(i[1])) {
247 err = "undefined branch condition";
248 return false;
249 }
250 continue;
251 }
252 if (op == op_store) {
253 if (i.size() != 3 || !defs.count(i[1]) || !defs.count(i[2])) {
254 err = "undefined operand in OpStore";
255 return false;
256 }
257 continue;
258 }
259 if (i.size() < 3 || !check_id(i[2])) {
260 err = "bad result id in function body";
261 return false;
262 }
263 if (!defs.count(i[1])) {
264 err = "undefined result type id";
265 return false;
266 }
267 const std::size_t first_arg = op == op_ext_inst ? 5 : 3;
268 if (op == op_ext_inst && (i.size() < 5 || i[3] != glsl_id)) {
269 err = "bad ExtInst import id";
270 return false;
271 }
272 for (std::size_t a = first_arg; a < i.size(); ++a) {
273 if (op == op_composite_extract && a > 3) continue; // literal component index
274 if (!defs.count(i[a])) {
275 err = "undefined operand id in function body (missing from prime_quantise?)";
276 return false;
277 }
278 }
279 if (!defs.insert(i[2]).second) {
280 err = "duplicate result id in function body";
281 return false;
282 }
283 }
284 return true;
285 }
286
287 // Executes the entry function for a given FragCoord.z and screen-space slopes (dz_dx, dz_dy).
288 bool eval(float z_in, float dz_dx, float dz_dy, float& z_out, std::string& err) const {
289 std::unordered_map<std::uint32_t, std::uint32_t> u32_val = const_u32;
290 std::unordered_map<std::uint32_t, bool> bool_val = const_bool;
291 std::unordered_map<std::uint32_t, std::array<float, 4>> vec4_val;
292 float frag_depth = std::numeric_limits<float>::quiet_NaN();
293 bool wrote_depth = false;
294
295 std::unordered_map<std::uint32_t, std::size_t> labels;
296 for (std::size_t k = 0; k < body.size(); ++k)
297 if (opcode(body[k]) == op_label && body[k].size() == 2) labels[body[k][1]] = k;
298
299 for (std::size_t pc = 0; pc < body.size(); ++pc) {
300 const Inst& i = body[pc];
301 const std::uint32_t op = opcode(i);
302 switch (op) {
303 case op_function:
304 case op_label:
305 break;
306 case op_return:
307 if (!wrote_depth) {
308 err = "shader returned without writing FragDepth";
309 return false;
310 }
311 z_out = frag_depth;
312 return true;
313 case op_function_end:
314 err = "fell off end of function";
315 return false;
316 case 250: { // OpBranchConditional
317 const std::uint32_t target = bool_val.at(i[1]) ? i[2] : i[3];
318 pc = labels.at(target);
319 break;
320 }
321 case op_load:
322 if (i[3] == frag_coord_var) {
323 vec4_val[i[2]] = {0.5f, 0.5f, z_in, 1.0f};
324 } else if (i[3] == frag_depth_var) {
325 u32_val[i[2]] = f_bits(frag_depth);
326 } else {
327 err = "unexpected OpLoad variable";
328 return false;
329 }
330 break;
331 case op_store:
332 if (i[1] != frag_depth_var) {
333 err = "unexpected OpStore variable";
334 return false;
335 }
336 frag_depth = u_float(u32_val.at(i[2]));
337 wrote_depth = true;
338 break;
339 case op_composite_extract:
340 u32_val[i[2]] = f_bits(vec4_val.at(i[3])[i[4]]);
341 break;
342 case op_bitcast:
343 u32_val[i[2]] = u32_val.at(i[3]);
344 break;
345 case op_f_add:
346 u32_val[i[2]] = f_bits(u_float(u32_val.at(i[3])) + u_float(u32_val.at(i[4])));
347 break;
348 case op_f_mul:
349 u32_val[i[2]] = f_bits(u_float(u32_val.at(i[3])) * u_float(u32_val.at(i[4])));
350 break;
351 case op_dpdx:
352 u32_val[i[2]] = f_bits(dz_dx);
353 break;
354 case op_dpdy:
355 u32_val[i[2]] = f_bits(dz_dy);
356 break;
357 case op_convert_f_to_u: {
358 const float v = u_float(u32_val.at(i[3]));
359 if (!(v >= 0.0f) || v > 4294967295.0f) {
360 err = "OpConvertFToU received out-of-range or NaN float";
361 return false;
362 }
363 u32_val[i[2]] = static_cast<std::uint32_t>(v);
364 break;
365 }
366 case op_convert_u_to_f:
367 u32_val[i[2]] = f_bits(static_cast<float>(u32_val.at(i[3])));
368 break;
369 case op_i_add:
370 u32_val[i[2]] = u32_val.at(i[3]) + u32_val.at(i[4]);
371 break;
372 case op_i_sub:
373 u32_val[i[2]] = u32_val.at(i[3]) - u32_val.at(i[4]);
374 break;
375 case op_shift_left_logical: {
376 const std::uint32_t sh = u32_val.at(i[4]);
377 if (sh >= 32u) {
378 err = "OpShiftLeftLogical with shift >= 32 (UB in SPIR-V)";
379 return false;
380 }
381 u32_val[i[2]] = u32_val.at(i[3]) << sh;
382 break;
383 }
384 case 194u: { // OpShiftRightLogical
385 const std::uint32_t sh = u32_val.at(i[4]);
386 if (sh >= 32u) {
387 err = "OpShiftRightLogical with shift >= 32 (UB in SPIR-V)";
388 return false;
389 }
390 u32_val[i[2]] = u32_val.at(i[3]) >> sh;
391 break;
392 }
393 case op_i_equal:
394 bool_val[i[2]] = u32_val.at(i[3]) == u32_val.at(i[4]);
395 break;
396 case op_u_greater_than:
397 bool_val[i[2]] = u32_val.at(i[3]) > u32_val.at(i[4]);
398 break;
399 case op_u_greater_than_equal:
400 bool_val[i[2]] = u32_val.at(i[3]) >= u32_val.at(i[4]);
401 break;
402 case op_select:
403 u32_val[i[2]] = bool_val.at(i[3]) ? u32_val.at(i[4]) : u32_val.at(i[5]);
404 break;
405 case op_ext_inst: {
406 const std::uint32_t ext_op = i[4];
407 if (ext_op == glsl_round_even) {
408 const float x = u_float(u32_val.at(i[5]));
409 const float r = std::isfinite(x) ? static_cast<float>(round_half_even(double(x))) : x;
410 u32_val[i[2]] = f_bits(r);
411 } else if (ext_op == glsl_fabs) {
412 u32_val[i[2]] = f_bits(std::fabs(u_float(u32_val.at(i[5]))));
413 } else if (ext_op == glsl_fmin) {
414 // GLSL.std.450 FMin: if one operand is NaN, the other is returned.
415 const float a = u_float(u32_val.at(i[5])), b = u_float(u32_val.at(i[6]));
416 u32_val[i[2]] = f_bits(std::isnan(a) ? b : std::isnan(b) ? a : (a < b ? a : b));
417 } else if (ext_op == glsl_fmax) {
418 const float a = u_float(u32_val.at(i[5])), b = u_float(u32_val.at(i[6]));
419 u32_val[i[2]] = f_bits(std::isnan(a) ? b : std::isnan(b) ? a : (a > b ? a : b));
420 } else if (ext_op == glsl_find_umsb) {
421 const std::uint32_t v = u32_val.at(i[5]);
422 u32_val[i[2]] = v == 0u ? 0xffffffffu : static_cast<std::uint32_t>(31 - std::countl_zero(v));
423 } else {
424 err = "unexpected GLSL.std.450 instruction";
425 return false;
426 }
427 break;
428 }
429 default:
430 err = "unexpected SPIR-V opcode";
431 return false;
432 }
433 }
434 err = "no return reached";
435 return false;
436 }
437};
438
439int test_d16_exhaustive() {
440 const Depth24Bias d16_bias{0, 0.0f, 0.0f, 65535.0f};
441 const std::vector<std::uint32_t> depth_only = depth24_depth_only_fragment(d16_bias);
442 EXPECT(!depth_only.empty());
443
444 std::string why, err;
445 const std::vector<std::uint32_t> ps_plain =
446 depth24_patch_fragment(make_synthetic_fragment(false, false, true, false), d16_bias, why);
447 EXPECT(!ps_plain.empty());
448 const std::vector<std::uint32_t> ps_write =
449 depth24_patch_fragment(make_synthetic_fragment(true, false, true, true), d16_bias, why);
450 EXPECT(!ps_write.empty());
451
452 for (const auto& spv : {depth_only, ps_plain, ps_write}) {
453 SpvProgram prog;
454 if (!prog.parse_and_validate(spv, err)) {
455 std::fprintf(stderr, "D16 validate failed: %s\n", err.c_str());
456 return 1;
457 }
458 EXPECT(prog.has_depth_replacing);
459 EXPECT(!prog.has_conservative_depth);
460 EXPECT(prog.frag_depth_in_interface);
461 EXPECT(prog.frag_coord_in_interface);
462
463 // Exhaustive check of all 65,536 16-bit UNORM codes (round-trip bit-for-bit exact).
464 for (std::uint32_t d = 0; d <= 65535u; ++d) {
465 const float z = static_cast<float>(double(d) / 65535.0);
466 float out = 0.0f;
467 if (!prog.eval(z, 0.0f, 0.0f, out, err)) {
468 std::fprintf(stderr, "D16 eval failed at d=%u: %s\n", d, err.c_str());
469 return 1;
470 }
471 if (f_bits(out) != f_bits(z)) {
472 std::fprintf(stderr, "D16 mismatch at d=%u: got %08x (%.9g), want %08x (%.9g)\n",
473 d, f_bits(out), out, f_bits(z), z);
474 return 1;
475 }
476 }
477
478 // Half-step ties and neighbors across the full 16-bit range.
479 for (std::uint32_t d = 0; d < 65535u; d += 17u) {
480 const float mid = static_cast<float>((double(d) + 0.5) / 65535.0);
481 for (float z : {std::nextafter(mid, 0.0f), mid, std::nextafter(mid, 1.0f)}) {
482 float out = 0.0f;
483 EXPECT(prog.eval(z, 0.0f, 0.0f, out, err));
484 const float want = ref_quantize_float(z, 65535.0, 0xffffu);
485 EXPECT(f_bits(out) == f_bits(want));
486 }
487 }
488
489 // IEEE-754 specials: zeros, subnormals, negatives, infinities, NaNs, >1.0.
490 const std::uint32_t specials[] = {
491 0x00000000u, 0x80000000u, 0x00000001u, 0x007fffffu, 0x00800000u, 0xbf800000u,
492 0xff800000u, 0x7f800000u, 0x7fc00000u, 0x7fa00001u, 0xffc00000u, 0x3f7fffffu,
493 0x3f800000u, 0x3f800001u, 0x40000000u, 0x7f7fffffu,
494 };
495 for (std::uint32_t bits : specials) {
496 const float z = u_float(bits);
497 float out = 0.0f;
498 if (!prog.eval(z, 0.0f, 0.0f, out, err)) {
499 std::fprintf(stderr, "D16 special %08x eval failed: %s\n", bits, err.c_str());
500 return 1;
501 }
502 const float want = ref_quantize_float(z, 65535.0, 0xffffu);
503 if (f_bits(out) != f_bits(want)) {
504 std::fprintf(stderr, "D16 special %08x mismatch: got %08x want %08x\n",
505 bits, f_bits(out), f_bits(want));
506 return 1;
507 }
508 }
509 }
510 return 0;
511}
512
513int test_d16_and_d24_bias_and_clamp() {
514 struct Case {
515 float levels;
516 std::uint32_t max_code;
517 int constant;
518 float slope;
519 float clamp;
520 float z;
521 float dx;
522 float dy;
523 };
524 const Case cases[] = {
525 {65535.0f, 0xffffu, 1, 0.0f, 0.0f, 0.25f, 0.0f, 0.0f},
526 {65535.0f, 0xffffu, -3, 2.0f, 0.0f, 0.5f, -0.002f, 0.004f},
527 {65535.0f, 0xffffu, 5, 4.0f, 0.01f, 0.5f, 0.01f, 0.0f}, // positive clamp caps bias
528 {65535.0f, 0xffffu, -5, -4.0f, -0.01f, 0.5f, 0.01f, 0.0f}, // negative clamp floors bias
529 {16777215.0f, 0xffffffu, 1, 0.0f, 0.0f, 0.15625f, 0.0f, 0.0f},
530 {16777215.0f, 0xffffffu, 1000, 1.5f, 0.004f, 0.5f, 0.003f, -0.005f},
531 {16777215.0f, 0xffffffu, -5, -2.0f, -0.01f, 0.7f, 0.008f, 0.002f},
532 };
533 for (const Case& c : cases) {
534 const Depth24Bias bias{c.constant, c.slope, c.clamp, c.levels};
535 const std::vector<std::uint32_t> spv = depth24_depth_only_fragment(bias);
536 EXPECT(!spv.empty());
537 SpvProgram prog;
538 std::string err;
539 EXPECT(prog.parse_and_validate(spv, err));
540 float out = 0.0f;
541 EXPECT(prog.eval(c.z, c.dx, c.dy, out, err));
542 float amount = c.slope * std::fmax(std::fabs(c.dx), std::fabs(c.dy)) +
543 depth24_bias_constant(c.constant, c.levels);
544 if (c.clamp > 0.0f) amount = std::fmin(amount, c.clamp);
545 if (c.clamp < 0.0f) amount = std::fmax(amount, c.clamp);
546 const float want = ref_quantize_float(c.z + amount, double(c.levels), c.max_code);
547 EXPECT(f_bits(out) == f_bits(want));
548
549 // Shader-written SV_Depth must be quantised WITHOUT rasterizer bias.
550 std::string why;
551 const std::vector<std::uint32_t> sw =
552 depth24_patch_fragment(make_synthetic_fragment(true, false, false, false), bias, why);
553 EXPECT(!sw.empty());
554 SpvProgram sw_prog;
555 EXPECT(sw_prog.parse_and_validate(sw, err));
556 float sw_out = 0.0f;
557 EXPECT(sw_prog.eval(c.z, c.dx, c.dy, sw_out, err));
558 const float sw_want = ref_quantize_float(c.z, double(c.levels), c.max_code);
559 EXPECT(f_bits(sw_out) == f_bits(sw_want));
560 }
561 return 0;
562}
563
564int test_d24_boundary_codes() {
565 const Depth24Bias d24_bias{};
566 const std::vector<std::uint32_t> spv = depth24_depth_only_fragment(d24_bias);
567 EXPECT(!spv.empty());
568 SpvProgram prog;
569 std::string err;
570 EXPECT(prog.parse_and_validate(spv, err));
571
572 const std::uint32_t sample_codes[] = {
573 0u, 1u, 2u, 3u, 127u, 128u, 255u, 256u, 65535u, 65536u,
574 5033000u, 0x7fffffu, 0x800000u, 0xfffffeu, 0xffffffu,
575 };
576 for (std::uint32_t d : sample_codes) {
577 const float z = static_cast<float>(double(d) / 16777215.0);
578 float out = 0.0f;
579 EXPECT(prog.eval(z, 0.0f, 0.0f, out, err));
580 EXPECT(f_bits(out) == f_bits(z));
581 }
582 return 0;
583}
584
585int test_rejections() {
586 std::string why;
587 const auto base = make_synthetic_fragment(false, false, false, false);
588 for (float bad : {0.0f, -1.0f, 255.0f, 65536.0f, std::numeric_limits<float>::quiet_NaN()}) {
589 const Depth24Bias bias{0, 0.0f, 0.0f, bad};
590 why.clear();
591 EXPECT(depth24_patch_fragment(base, bias, why).empty() && !why.empty());
592 EXPECT(depth24_depth_only_fragment(bias).empty());
593 }
594 why.clear();
595 EXPECT(depth24_patch_fragment(make_synthetic_fragment(false, true, false, false), {}, why).empty() && !why.empty());
596 return 0;
597}
598
599} // namespace
600
601int main() {
602 if (test_d16_exhaustive() != 0) return 1;
603 if (test_d16_and_d24_bias_and_clamp() != 0) return 1;
604 if (test_d24_boundary_codes() != 0) return 1;
605 if (test_rejections() != 0) return 1;
606 std::printf("depth24_fragment_test: ok (all 65536 D16 codes, ties, specials, bias/clamp, D24 parity)\n");
607 return 0;
608}
diff --git a/runtime/test/dstorage_test.cpp b/runtime/test/dstorage_test.cpp
index c24bcdb65..fa1b529d0 100644
--- a/runtime/test/dstorage_test.cpp
+++ b/runtime/test/dstorage_test.cpp
@@ -18,6 +18,7 @@
18#include <span> 18#include <span>
19#include "../src/bcpack.h" 19#include "../src/bcpack.h"
20#include "../src/bcpack_stream.h" 20#include "../src/bcpack_stream.h"
21#include "../src/dstorage_hold.h"
21#include "../src/title_geometry_watch.h" 22#include "../src/title_geometry_watch.h"
22#include "../src/title_page_watch.h" 23#include "../src/title_page_watch.h"
23#include "xmem.h" 24#include "xmem.h"
@@ -1613,6 +1614,259 @@ void test_extended(Env& env) {
1613 q->Release(); 1614 q->Release();
1614} 1615}
1615 1616
1617// A queue half full submits itself, but a read into physical pages and everything behind it wait for Submit: the
1618// title may fill the page list right before its own Submit. Until then the list names no page (the read would
1619// fail) or the page its slot named before (the data would land in a page that belongs to something else). The two
1620// cases of Marvisak/VIctory eddde73, then the ways a hold ends without Submit.
1621void test_page_reads_wait_for_submit(Env& env) {
1622 const auto alloc = reinterpret_cast<BOOL(WINAPI*)(uint64_t,uint64_t*,uint64_t*)>(
1623 rt::shims::find("xmem.dll", "XMemAllocatePhysicalPages"));
1624 const auto reserve = reinterpret_cast<void*(WINAPI*)(void*,SIZE_T,DWORD,uint64_t,DWORD)>(
1625 rt::shims::find("xmem.dll", "XMemVirtualAlloc"));
1626 const auto map = reinterpret_cast<void*(WINAPI*)(void*,uint64_t,const uint64_t*)>(
1627 rt::shims::find("xmem.dll", "XMemMapPhysicalPages"));
1628 const auto free_pages = reinterpret_cast<BOOL(WINAPI*)(uint64_t,const uint64_t*)>(
1629 rt::shims::find("xmem.dll", "XMemFreePhysicalPages"));
1630 uint64_t pages[2]{}, count = 2;
1631 constexpr size_t page = 65536, bytes = 4096;
1632 auto* window = static_cast<uint8_t*>(reserve(nullptr, 2*page, MEM_RESERVE | 0x20400000, 0x21, PAGE_READWRITE));
1633 const bool allocated = window && alloc(0x280, &count, pages);
1634 const bool mapped = allocated && map(window, 2, pages) == window;
1635 check(mapped, "two physical pages mapped for the held reads");
1636 if (!mapped) {
1637 if (allocated) free_pages(count, pages);
1638 if (window) VirtualFree(window, 0, MEM_RELEASE);
1639 return;
1640 }
1641 auto& h = leonida::dstorage::hold_stats();
1642 const auto plain = pattern(bytes, 9);
1643 const auto into_pages = [&](ULONG_PTR* list) {
1644 DSTORAGE_REQUEST r{};
1645 r.Options.AsUINT64 = options::kSourceMemory | options::kDestinationPages;
1646 r.DestinationPageArray = list;
1647 r.DestinationPageOffset = 0;
1648 r.Source = plain.data();
1649 r.SourceSize = r.DestinationSize = static_cast<uint32_t>(bytes);
1650 return r;
1651 };
1652 const auto into_buffer = [&](uint8_t* out) {
1653 DSTORAGE_REQUEST r{};
1654 r.Options.AsUINT64 = options::kSourceMemory;
1655 r.Destination = out;
1656 r.Source = plain.data();
1657 r.SourceSize = r.DestinationSize = 16;
1658 return r;
1659 };
1660 const auto zero = [&](const uint8_t* at, size_t n) { return std::all_of(at, at + n, [](uint8_t b) { return b == 0; }); };
1661 const auto holds_plain = [&](const uint8_t* at, size_t n) { return std::memcmp(at, plain.data(), n) == 0; };
1662 const auto errors = [&] {
1663 DSTORAGE_STATS stats{};
1664 env.factory->GetStats(&stats);
1665 return stats.ErrorCount;
1666 };
1667 constexpr int kHalf = 0x40; // of a capacity of 0x80
1668 std::vector<uint8_t> outs(kHalf * 16);
1669 const auto reset = [&] {
1670 std::memset(window, 0, 2*page);
1671 std::fill(outs.begin(), outs.end(), uint8_t{0});
1672 };
1673
1674 // The list still names the slot's previous page when the queue submits itself, the right one by Submit.
1675 {
1676 reset();
1677 auto* q = make_queue(env, 0x80, true, DSTORAGE_REQUEST_SOURCE_MEMORY, DSTORAGE_PRIORITY_REALTIME);
1678 auto* status = make_status(env, 1);
1679 const uint64_t self = h.self_submits.load(), held = h.held_reads.load(), failed = errors();
1680 ULONG_PTR list[] = {static_cast<ULONG_PTR>(pages[0])};
1681 DSTORAGE_REQUEST r = into_buffer(outs.data());
1682 q->EnqueueRequest(&r);
1683 r = into_pages(list);
1684 q->EnqueueRequest(&r);
1685 for (int i = 2; i < kHalf; ++i) {
1686 r = into_buffer(outs.data() + i * 16);
1687 q->EnqueueRequest(&r); // the last one makes half the capacity
1688 }
1689 check(wait_until([&] { return holds_plain(outs.data(), 16); }),
1690 "the entry ahead of a read into pages starts when the queue submits itself");
1691 Sleep(50); // time for an early read to land in the old page
1692 check(zero(window, bytes), "a self-submit does not write the page the list named before the title's Submit");
1693 check(zero(outs.data() + 2 * 16, 16), "entries behind a held read keep their place");
1694 check(h.self_submits.load() == self + 1 && h.held_reads.load() == held + 1,
1695 "one self-submit and one held read are counted");
1696 DSTORAGE_QUEUE_INFO info{};
1697 q->Query(&info);
1698 check(info.EmptySlotCount == 0x7f - (kHalf - 1),
1699 "held entries still take their slots");
1700 list[0] = static_cast<ULONG_PTR>(pages[1]); // the title fills its page table, then submits
1701 q->EnqueueStatus(status, 0);
1702 check_hr(status->GetHResult(0), E_PENDING, "a status behind a held read is pending");
1703 q->Submit();
1704 check(wait_complete(status, 0), "the held entries run at Submit");
1705 check_hr(status->GetHResult(0), S_OK, "a read held for Submit succeeds");
1706 check(holds_plain(window + page, bytes), "the read lands in the page its list names at Submit");
1707 check(zero(window, bytes), "the page the list named before stays untouched");
1708 bool all = true;
1709 for (int i = 2; i < kHalf; ++i) all = all && holds_plain(outs.data() + i * 16, 16);
1710 check(all, "every entry behind the held read ran");
1711 check(errors() == failed, "no entry failed");
1712 status->Release();
1713 q->Release();
1714 }
1715
1716 // The list is still empty when the queue submits itself: no failure, the read waits.
1717 {
1718 reset();
1719 auto* q = make_queue(env, 0x80, true, DSTORAGE_REQUEST_SOURCE_MEMORY, DSTORAGE_PRIORITY_REALTIME);
1720 auto* status = make_status(env, 1);
1721 const uint64_t page0 = h.page0_entries.load(), failed = errors();
1722 ULONG_PTR list[] = {0};
1723 DSTORAGE_REQUEST r = into_pages(list);
1724 q->EnqueueRequest(&r);
1725 for (int i = 1; i < kHalf; ++i) {
1726 r = into_buffer(outs.data() + i * 16);
1727 q->EnqueueRequest(&r);
1728 }
1729 Sleep(50);
1730 check(h.page0_entries.load() == page0 && errors() == failed, "an empty page list is not read before Submit");
1731 list[0] = static_cast<ULONG_PTR>(pages[0]);
1732 q->EnqueueStatus(status, 0);
1733 q->Submit();
1734 check(wait_complete(status, 0), "the read with a late page list completes");
1735 check_hr(status->GetHResult(0), S_OK, "a page list filled before Submit is written");
1736 check(holds_plain(window, bytes) && errors() == failed, "its bytes are in the page");
1737 status->Release();
1738 q->Release();
1739 }
1740
1741 // A full queue: the title waits in an enqueue and cannot call Submit, so the held entries go.
1742 {
1743 reset();
1744 auto* q = make_queue(env, 0x80, true, DSTORAGE_REQUEST_SOURCE_MEMORY, DSTORAGE_PRIORITY_REALTIME);
1745 auto* status = make_status(env, 1);
1746 const uint64_t full = h.full_releases.load();
1747 ULONG_PTR list[] = {static_cast<ULONG_PTR>(pages[1])};
1748 constexpr int kMany = 200;
1749 std::vector<uint8_t> sink(kMany * 16);
1750 std::atomic<bool> done{false};
1751 std::thread producer([&] {
1752 DSTORAGE_REQUEST r = into_pages(list);
1753 q->EnqueueRequest(&r);
1754 for (int i = 0; i < kMany; ++i) {
1755 r = into_buffer(sink.data() + i * 16);
1756 q->EnqueueRequest(&r);
1757 }
1758 q->EnqueueStatus(status, 0);
1759 done.store(true);
1760 });
1761 check(wait_until([&] { return done.load(); }), "a full queue with held entries does not wait for Submit");
1762 producer.join();
1763 check(h.full_releases.load() == full + 1, "the full queue's release is counted");
1764 q->Submit();
1765 check(wait_complete(status, 0), "the full queue's entries complete");
1766 check_hr(status->GetHResult(0), S_OK, "they succeed");
1767 bool all = holds_plain(window + page, bytes);
1768 for (int i = 0; i < kMany; ++i) all = all && holds_plain(sink.data() + i * 16, 16);
1769 check(all, "every entry of the full queue has its bytes");
1770 status->Release();
1771 q->Release();
1772 }
1773
1774 // A hold has a time limit: held entries go after LEONIDA_DSTORAGE_HOLD_MS without Submit, 2000 ms unless set.
1775 for (const wchar_t* limit : {static_cast<const wchar_t*>(nullptr), L"200"}) {
1776 reset();
1777 SetEnvironmentVariableW(L"LEONIDA_DSTORAGE_HOLD_MS", limit);
1778 auto* q = make_queue(env, 0x80, true, DSTORAGE_REQUEST_SOURCE_MEMORY, DSTORAGE_PRIORITY_REALTIME);
1779 SetEnvironmentVariableW(L"LEONIDA_DSTORAGE_HOLD_MS", nullptr);
1780 const uint64_t timed = h.timed_releases.load();
1781 ULONG_PTR list[] = {static_cast<ULONG_PTR>(pages[0])};
1782 const auto begin = std::chrono::steady_clock::now();
1783 DSTORAGE_REQUEST r = into_pages(list);
1784 q->EnqueueRequest(&r);
1785 for (int i = 1; i < kHalf; ++i) {
1786 r = into_buffer(outs.data() + i * 16);
1787 q->EnqueueRequest(&r);
1788 }
1789 check(zero(window, bytes), "a hold with a time limit starts as a hold");
1790 if (!limit) {
1791 Sleep(1000);
1792 check(zero(window, bytes), "the default limit is not over after a second");
1793 }
1794 check(wait_until([&] { return holds_plain(window, bytes); }),
1795 limit ? "LEONIDA_DSTORAGE_HOLD_MS ends a hold" : "a hold ends by itself without the variable");
1796 const auto waited = std::chrono::duration_cast<std::chrono::milliseconds>(
1797 std::chrono::steady_clock::now() - begin).count();
1798 check(waited >= (limit ? 150 : 1900) && waited < (limit ? 2000 : 6000),
1799 limit ? "after about the 200 ms asked for" : "after about the default 2000 ms");
1800 check(h.timed_releases.load() == timed + 1, "the timed release is counted");
1801 q->Release();
1802 }
1803
1804 // LEONIDA_DSTORAGE_HOLD_MS=0: no time limit, the entries wait for Submit.
1805 {
1806 reset();
1807 SetEnvironmentVariableW(L"LEONIDA_DSTORAGE_HOLD_MS", L"0");
1808 auto* q = make_queue(env, 0x80, true, DSTORAGE_REQUEST_SOURCE_MEMORY, DSTORAGE_PRIORITY_REALTIME);
1809 SetEnvironmentVariableW(L"LEONIDA_DSTORAGE_HOLD_MS", nullptr);
1810 auto* status = make_status(env, 1);
1811 const uint64_t timed = h.timed_releases.load();
1812 ULONG_PTR list[] = {static_cast<ULONG_PTR>(pages[0])};
1813 DSTORAGE_REQUEST r = into_pages(list);
1814 q->EnqueueRequest(&r);
1815 for (int i = 1; i < kHalf; ++i) {
1816 r = into_buffer(outs.data() + i * 16);
1817 q->EnqueueRequest(&r);
1818 }
1819 Sleep(2300); // past the default limit
1820 check(zero(window, bytes) && h.timed_releases.load() == timed, "with 0 a hold outlasts the default limit");
1821 q->EnqueueStatus(status, 0);
1822 q->Submit();
1823 check(wait_complete(status, 0) && holds_plain(window, bytes), "and ends at Submit");
1824 status->Release();
1825 q->Release();
1826 }
1827
1828 // LEONIDA_DSTORAGE_HOLD_PAGES=0: the self-submit takes everything, as before.
1829 {
1830 reset();
1831 SetEnvironmentVariableW(L"LEONIDA_DSTORAGE_HOLD_PAGES", L"0");
1832 auto* q = make_queue(env, 0x80, true, DSTORAGE_REQUEST_SOURCE_MEMORY, DSTORAGE_PRIORITY_REALTIME);
1833 SetEnvironmentVariableW(L"LEONIDA_DSTORAGE_HOLD_PAGES", nullptr);
1834 const uint64_t held = h.held_reads.load();
1835 ULONG_PTR list[] = {static_cast<ULONG_PTR>(pages[1])};
1836 DSTORAGE_REQUEST r = into_pages(list);
1837 q->EnqueueRequest(&r);
1838 for (int i = 1; i < kHalf; ++i) {
1839 r = into_buffer(outs.data() + i * 16);
1840 q->EnqueueRequest(&r);
1841 }
1842 check(wait_until([&] { return holds_plain(window + page, bytes); }),
1843 "LEONIDA_DSTORAGE_HOLD_PAGES=0 submits a read into pages with the rest");
1844 check(h.held_reads.load() == held, "and holds nothing");
1845 q->Release();
1846 }
1847
1848 // A list that names page 0 when its data is written fails the entry and is counted.
1849 {
1850 auto* q = make_queue(env, 0x80, false, DSTORAGE_REQUEST_SOURCE_MEMORY, DSTORAGE_PRIORITY_REALTIME);
1851 auto* status = make_status(env, 1);
1852 const uint64_t page0 = h.page0_entries.load();
1853 ULONG_PTR list[] = {0};
1854 DSTORAGE_REQUEST r = into_pages(list);
1855 q->EnqueueRequest(&r);
1856 q->EnqueueStatus(status, 0);
1857 q->Submit();
1858 check(wait_complete(status, 0), "the read with an empty page list completes");
1859 check_hr(status->GetHResult(0), E_INVALIDARG, "a page list naming page 0 at Submit fails its entry");
1860 check(h.page0_entries.load() == page0 + 1, "the entry with page 0 in its list is counted");
1861 status->Release();
1862 q->Release();
1863 }
1864
1865 map(window, 2, nullptr);
1866 free_pages(count, pages);
1867 VirtualFree(window, 0, MEM_RELEASE);
1868}
1869
1616} // namespace 1870} // namespace
1617 1871
1618int main() { 1872int main() {
@@ -1668,6 +1922,7 @@ int main() {
1668 test_stats_timing(env); 1922 test_stats_timing(env);
1669 test_stats(env); 1923 test_stats(env);
1670 test_extended(env); 1924 test_extended(env);
1925 test_page_reads_wait_for_submit(env);
1671 test_guarded_destinations(env); 1926 test_guarded_destinations(env);
1672 test_zlib(env); // after test_stats, whose request totals it would change 1927 test_zlib(env); // after test_stats, whose request totals it would change
1673 1928
diff --git a/runtime/test/fixtures/tiny_atexit.cpp b/runtime/test/fixtures/tiny_atexit.cpp
index fbe071e7f..2719f98f4 100644
--- a/runtime/test/fixtures/tiny_atexit.cpp
+++ b/runtime/test/fixtures/tiny_atexit.cpp
@@ -9,6 +9,10 @@
9// cexit _cexit() runs every handler and returns; main then returns 11 9// cexit _cexit() runs every handler and returns; main then returns 11
10// c_exit _c_exit() runs none and returns; main then returns 12, and exit runs them all 10// c_exit _c_exit() runs none and returns; main then returns 12, and exit runs them all
11// concurrent_exit a second thread calls _exit(7) while exit(7) runs a handler: it waits for them all 11// concurrent_exit a second thread calls _exit(7) while exit(7) runs a handler: it waits for them all
12// thread_local_exit a thread_local object of the main thread, then exit(13): it ends first, then the handlers
13// thread_local_cexit the same object, then _cexit(): the same order, and main then returns 14
14// The thread_local destructor reaches the CRT through _register_thread_local_exe_atexit_callback, which the EXE's
15// startup calls only when the image has one (this program has one in every mode, constructed only in the last two).
12// One handler registers another while the handlers run: it must still run, next. 16// One handler registers another while the handlers run: it must still run, next.
13#include <windows.h> 17#include <windows.h>
14#include <process.h> // _cexit, _c_exit 18#include <process.h> // _cexit, _c_exit
@@ -74,6 +78,15 @@ int main(int argc, char** argv) {
74 CloseHandle(CreateThread(nullptr, 0, quick_exit_thread, nullptr, 0, nullptr)); 78 CloseHandle(CreateThread(nullptr, 0, quick_exit_thread, nullptr, 0, nullptr));
75 std::exit(7); 79 std::exit(7);
76 } 80 }
81 if (!std::strncmp(mode, "thread_local_", 13)) {
82 thread_local Tracer main_thread_local("thread_local"); // constructed here, on the main thread only
83 if (!std::strcmp(mode, "thread_local_exit")) std::exit(13);
84 if (!std::strcmp(mode, "thread_local_cexit")) {
85 _cexit();
86 say("after _cexit");
87 return 14;
88 }
89 }
77 if (!std::strcmp(mode, "exit")) std::exit(7); 90 if (!std::strcmp(mode, "exit")) std::exit(7);
78 if (!std::strcmp(mode, "_exit")) _exit(8); 91 if (!std::strcmp(mode, "_exit")) _exit(8);
79 if (!std::strcmp(mode, "quick_exit")) std::quick_exit(9); 92 if (!std::strcmp(mode, "quick_exit")) std::quick_exit(9);
diff --git a/runtime/test/gameinput_no_sdl_test.cpp b/runtime/test/gameinput_no_sdl_test.cpp
index a131dc7c9..7b165922a 100644
--- a/runtime/test/gameinput_no_sdl_test.cpp
+++ b/runtime/test/gameinput_no_sdl_test.cpp
@@ -98,8 +98,10 @@ Pad read_at(IGameInput* input, IGameInputDevice* device, double seconds) {
98} 98}
99 99
100int scripted_pad(CreateFn create) { 100int scripted_pad(CreateFn create) {
101 // Four presses (two overlapping A presses, Menu, a right-stick throw) and three rejected entries. 101 // Six presses (two overlapping A presses, Menu, B held 0.8 s, a right-stick throw, a Y press the title never reads
102 SetEnvironmentVariableA("LEONIDA_INPUT_SCRIPT", "a@1, START@2.5 ,a@1.2,rsup@4,bogus@1,a@-1,"); 102 // while it is down) and seven rejected entries (four of them holds that are zero, negative, missing or too long).
103 SetEnvironmentVariableA("LEONIDA_INPUT_SCRIPT",
104 "a@1, START@2.5 ,a@1.2,b@3:0.8 ,rsup@4,y@10,bogus@1,a@-1,,x@3:0,x@3:-1,x@3:,x@3:601");
103 rt::gameinput_no_sdl::set_clock(fake_clock); 105 rt::gameinput_no_sdl::set_clock(fake_clock);
104 at(0); 106 at(0);
105 107
@@ -201,27 +203,48 @@ int scripted_pad(CreateFn create) {
201 check(menu.buttons == GameInputGamepadMenu && menu.ui == GameInputUiNavigationMenu, 203 check(menu.buttons == GameInputGamepadMenu && menu.ui == GameInputUiNavigationMenu,
202 "script: START (any case) holds Menu at 2.6 s"); 204 "script: START (any case) holds Menu at 2.6 s");
203 check(read_at(input, device, 2.85).buttons == 0, "script: Menu is released at 2.85 s"); 205 check(read_at(input, device, 2.85).buttons == 0, "script: Menu is released at 2.85 s");
206 check(read_at(input, device, 3.05).buttons == GameInputGamepadB, "script: b@3:0.8 holds B at 3.05 s");
207 check(read_at(input, device, 3.7).buttons == GameInputGamepadB,
208 "script: B is still held at 3.7 s, past the 0.3 s default");
209 check(read_at(input, device, 3.85).buttons == 0, "script: B is released after its 0.8 s hold");
204 const Pad up = read_at(input, device, 4.1); 210 const Pad up = read_at(input, device, 4.1);
205 check(up.buttons == 0 && up.right_y == 1.0f && up.ui == GameInputUiNavigationScrollUp, 211 check(up.buttons == 0 && up.right_y == 1.0f && up.ui == GameInputUiNavigationScrollUp,
206 "script: rsup throws the right stick up at 4.1 s"); 212 "script: rsup throws the right stick up at 4.1 s");
207 check(read_at(input, device, 4.5).right_y == 0, "script: the stick is back at rest at 4.5 s"); 213 check(read_at(input, device, 4.5).right_y == 0, "script: the stick is back at rest at 4.5 s");
214 // The title reads at 4.5 s and next at 60 s: y@10 starts and ends in between, and is still in the history.
208 check(read_at(input, device, 60).buttons == 0, "script: nothing is held after the script ends"); 215 check(read_at(input, device, 60).buttons == 0, "script: nothing is held after the script ends");
209 216
210 // The history: the reading before the current one is the stick throw, and the one after that throw is the rest. 217 // The history, newest first: the rest after Y (10.3 s), the Y press (10.0 s), the rest after the stick throw
218 // (4.3 s), the stick throw. Each reading carries the script's time of the change, not the time of the read.
211 IGameInputReading* now = nullptr; 219 IGameInputReading* now = nullptr;
212 IGameInputReading* before = nullptr;
213 IGameInputReading* after = nullptr;
214 check(input->GetCurrentReading(GameInputKindUnknown, nullptr, &now) == S_OK && now, "script: a current reading"); 220 check(input->GetCurrentReading(GameInputKindUnknown, nullptr, &now) == S_OK && now, "script: a current reading");
215 if (now) { 221 if (now) {
222 check(now->GetTimestamp() == 7'000'000 + 10'300'000, "script: the current reading is Y's release at 10.3 s");
223 IGameInputReading* y = nullptr;
224 IGameInputReading* rest = nullptr;
225 IGameInputReading* stick = nullptr;
226 IGameInputReading* after = nullptr;
216 GameInputGamepadState s{}; 227 GameInputGamepadState s{};
217 check(input->GetPreviousReading(now, GameInputKindGamepad, device, &before) == S_OK && before && 228 check(input->GetPreviousReading(now, GameInputKindGamepad, device, &y) == S_OK && y &&
218 before->GetGamepadState(&s) && s.rightThumbstickY == 1.0f, 229 y->GetGamepadState(&s) && s.buttons == GameInputGamepadY &&
219 "script: GetPreviousReading steps back to the stick throw"); 230 y->GetTimestamp() == 7'000'000 + 10'000'000,
220 if (before) { 231 "script: a press between two reads of the title is in the history, at its own time");
221 check(input->GetNextReading(before, GameInputKindGamepad, nullptr, &after) == S_OK && after == now, 232 if (y) {
222 "script: GetNextReading steps forward to the current reading"); 233 check(input->GetPreviousReading(y, GameInputKindGamepad, device, &rest) == S_OK && rest &&
223 before->Release(); 234 rest->GetGamepadState(&s) && s.buttons == 0 && s.rightThumbstickY == 0 &&
235 rest->GetTimestamp() == 7'000'000 + 4'300'000,
236 "script: before Y, the stick's return at 4.3 s");
237 check(input->GetNextReading(y, GameInputKindGamepad, nullptr, &after) == S_OK && after == now,
238 "script: GetNextReading steps forward from Y to the current reading");
239 y->Release();
224 } 240 }
241 if (rest) {
242 check(input->GetPreviousReading(rest, GameInputKindGamepad, device, &stick) == S_OK && stick &&
243 stick->GetGamepadState(&s) && s.rightThumbstickY == 1.0f,
244 "script: GetPreviousReading steps back to the stick throw");
245 rest->Release();
246 }
247 if (stick) stick->Release();
225 if (after) after->Release(); 248 if (after) after->Release();
226 IGameInputReading* none = nullptr; 249 IGameInputReading* none = nullptr;
227 check(input->GetNextReading(now, GameInputKindUnknown, nullptr, &none) == GAMEINPUT_E_READING_NOT_FOUND && 250 check(input->GetNextReading(now, GameInputKindUnknown, nullptr, &none) == GAMEINPUT_E_READING_NOT_FOUND &&
diff --git a/runtime/test/gameinput_test.cpp b/runtime/test/gameinput_test.cpp
index be9dc5398..09d959f34 100644
--- a/runtime/test/gameinput_test.cpp
+++ b/runtime/test/gameinput_test.cpp
@@ -1718,10 +1718,12 @@ int main(int argc, char** argv) {
1718 check(create(&input) == S_OK && input, "GameInputCreate returns an instance"); 1718 check(create(&input) == S_OK && input, "GameInputCreate returns an instance");
1719 if (argc == 2 && std::strcmp(argv[1], "--input-script") == 0) { 1719 if (argc == 2 && std::strcmp(argv[1], "--input-script") == 0) {
1720 if (!input) return 1; 1720 if (!input) return 1;
1721 // Only the X after byte 63 is due now. Its later entry must not cancel it. 1721 // Only the X after byte 63 and the Y held 0.6 s are due now. X's later entry must not cancel it; the
1722 // malformed holds at the end hold nothing.
1722 set_env("LEONIDA_INPUT_SCRIPT", 1723 set_env("LEONIDA_INPUT_SCRIPT",
1723 "start@3600,start@3600,start@3600,start@3600,start@3600,start@3600, X@0 \t,x@3600," 1724 "start@3600,start@3600,start@3600,start@3600,start@3600,start@3600, X@0 \t,x@3600,"
1724 "unknown@0,a@,a@x,,a@-0.1,a@nan,a@inf,a@1e999,a@0tail, ,"); 1725 "unknown@0,a@,a@x,,a@-0.1,a@nan,a@inf,a@1e999,a@0tail, ,y@0:0.6,"
1726 "a@0:0,a@0:-1,a@0:,a@0:x,a@0:inf,a@0:601,a@0:1tail");
1725 set_env("LEONIDA_KEYBOARD_PAD", "1"); 1727 set_env("LEONIDA_KEYBOARD_PAD", "1");
1726 rt::gameinput::set_keyboard_source(fake_key_down, fake_focus); 1728 rt::gameinput::set_keyboard_source(fake_key_down, fake_focus);
1727 rt::gameinput::set_cursor_source(fake_cursor); 1729 rt::gameinput::set_cursor_source(fake_cursor);
@@ -1730,27 +1732,32 @@ int main(int argc, char** argv) {
1730 rt::gameinput::reload_config(); 1732 rt::gameinput::reload_config();
1731 rt::gameinput::poll(); 1733 rt::gameinput::poll();
1732 const auto buttons = pad_state(input, nullptr).buttons; 1734 const auto buttons = pad_state(input, nullptr).buttons;
1733 const auto expected = GameInputGamepadX | GameInputGamepadB; 1735 const auto expected = GameInputGamepadX | GameInputGamepadB | GameInputGamepadY;
1734 check((buttons & expected) == expected, "long script: the spaced X after byte 63 and the physical B are held"); 1736 check((buttons & expected) == expected,
1737 "long script: the spaced X after byte 63, the held Y and the physical B are held");
1735 check((buttons & ~expected) == 0, "malformed script entries hold no extra buttons"); 1738 check((buttons & ~expected) == 0, "malformed script entries hold no extra buttons");
1736 g_focus = false; 1739 g_focus = false;
1737 set_env("LEONIDA_INPUT_SCRIPT", "y@0"); 1740 set_env("LEONIDA_INPUT_SCRIPT", "y@0");
1738 rt::gameinput::reload_config(); 1741 rt::gameinput::reload_config();
1739 rt::gameinput::poll(); 1742 rt::gameinput::poll();
1740 check(pad_state(input, nullptr).buttons == GameInputGamepadX, 1743 check(pad_state(input, nullptr).buttons == (GameInputGamepadX | GameInputGamepadY),
1741 "scripted X survives focus loss; reload does not replace it with Y"); 1744 "scripted X and Y survive focus loss; reload does not replace the script with y@0");
1742 Sleep(350); 1745 Sleep(350);
1743 g_focus = true; 1746 g_focus = true;
1744 rt::gameinput::poll(); 1747 rt::gameinput::poll();
1745 // A scripted press lasts its 300 ms and then until the title has read the pads six times since it began 1748 // A scripted press lasts its hold (300 ms, or button@seconds:hold) and then until the title has read the pads
1746 // (update_keyboard_pad: kReads, at most kMaxHold seconds), so a title that polls slowly still sees it. Each 1749 // six times since it began (update_keyboard_pad: kReads), so a title that polls slowly still sees it. Each
1747 // pad_state() is one GetCurrentReading, and this is the third since the X began. 1750 // pad_state() is one GetCurrentReading, and this is the third since X and Y began.
1748 check(pad_state(input, nullptr).buttons == (GameInputGamepadX | GameInputGamepadB), 1751 check(pad_state(input, nullptr).buttons == (GameInputGamepadX | GameInputGamepadB | GameInputGamepadY),
1749 "long script: past its 300 ms the press is still held while the title has read the pads fewer than six times"); 1752 "long script: past its 300 ms X is still held while the title has read the pads fewer than six times");
1750 for (int i = 0; i < 6; ++i) pad_state(input, nullptr); 1753 for (int i = 0; i < 6; ++i) pad_state(input, nullptr);
1751 rt::gameinput::poll(); 1754 rt::gameinput::poll();
1755 check(pad_state(input, nullptr).buttons == (GameInputGamepadB | GameInputGamepadY),
1756 "long script: X ends once the title has read it, y@0:0.6 is still held for its time, the key stays held");
1757 Sleep(400);
1758 rt::gameinput::poll();
1752 check(pad_state(input, nullptr).buttons == GameInputGamepadB, 1759 check(pad_state(input, nullptr).buttons == GameInputGamepadB,
1753 "long script: the timed press ends once the title has read it, while the physical key stays held"); 1760 "long script: Y is released after its 0.6 s hold, the title having read it six times");
1754 input->Release(); 1761 input->Release();
1755 std::printf("%d checks, %d failures\n", g_checks, g_failures); 1762 std::printf("%d checks, %d failures\n", g_checks, g_failures);
1756 return g_failures ? 1 : 0; 1763 return g_failures ? 1 : 0;
diff --git a/runtime/test/geometry_views_test.cpp b/runtime/test/geometry_views_test.cpp
index caac93dc0..37a1bd391 100644
--- a/runtime/test/geometry_views_test.cpp
+++ b/runtime/test/geometry_views_test.cpp
@@ -16,7 +16,10 @@
16// 13. a submission's sequence on an idle GPU (completed == submitted): a view retired by the drain in before_execute_ 16// 13. a submission's sequence on an idle GPU (completed == submitted): a view retired by the drain in before_execute_
17// (kAfterExecutes) is freed only after every replay begun before the retirement recorded its submissions and those 17// (kAfterExecutes) is freed only after every replay begun before the retirement recorded its submissions and those
18// completed (a ticket read in the drain reaps it at once); its answers made without an alias are invalidated 18// completed (a ticket read in the drain reaps it at once); its answers made without an alias are invalidated
19// (forget_copy); its destroyed block leaves the lock-free block list and is reported to the device. 19// (forget_copy); its destroyed block leaves the lock-free block list and is reported to the device;
20// 14. LEONIDA_GEOMETRY_HOST picks a system-memory type (write-back for 1, write-combined for 2), never the BAR;
21// 15. a retired view is copied once more from its pages when they are readable, not when they are not;
22// 16. a full release queue joins touching ranges before it collapses to one covering range.
20#include <windows.h> 23#include <windows.h>
21 24
22#include <cstdint> 25#include <cstdint>
@@ -61,7 +64,7 @@ VKAPI_ATTR void VKAPI_CALL requirements(VkDevice, VkBuffer buffer, VkMemoryRequi
61 *out = {}; 64 *out = {};
62 out->size = reinterpret_cast<FakeBuffer*>(buffer)->size; 65 out->size = reinterpret_cast<FakeBuffer*>(buffer)->size;
63 out->alignment = 65536; 66 out->alignment = 65536;
64 out->memoryTypeBits = 1; 67 out->memoryTypeBits = 0xf; // the four types of test 14's device
65} 68}
66VKAPI_ATTR VkResult VKAPI_CALL bind(VkDevice, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize) { 69VKAPI_ATTR VkResult VKAPI_CALL bind(VkDevice, VkBuffer buffer, VkDeviceMemory memory, VkDeviceSize) {
67 reinterpret_cast<FakeBuffer*>(buffer)->memory = memory; 70 reinterpret_cast<FakeBuffer*>(buffer)->memory = memory;
@@ -465,12 +468,17 @@ int main() {
465 const std::uint64_t own = fly.execute_begin(); 468 const std::uint64_t own = fly.execute_begin();
466 leonida::TitleVaAliases aliases; 469 leonida::TitleVaAliases aliases;
467 aliases.record_removals(true); 470 aliases.record_removals(true);
468 std::uint64_t cursor = 0; 471 // What the console heaps' slot records are told (TitleVaAliases::add_listener).
469 { 472 struct Heard {
470 leonida::DescriptorRanges skip; 473 bool removed;
471 aliases.changed_ranges(cursor, skip); 474 std::uint64_t title_va, bytes, shader_va;
472 } 475 };
473 const std::uint64_t invalidations = aliases.invalidations(); 476 std::vector<Heard> heard;
477 aliases.add_listener(&heard, [](void* to, leonida::TitleVaAliases::Change change, std::uint64_t va,
478 std::uint64_t bytes, std::uint64_t shader_va) {
479 static_cast<std::vector<Heard>*>(to)->push_back(
480 {change == leonida::TitleVaAliases::Change::removed, va, bytes, shader_va});
481 });
474 leonida::geometry_writes::note_released(flybase, flybase + kView); 482 leonida::geometry_writes::note_released(flybase, flybase + kView);
475 fly.drain_released(device, rt::d3d12::GeometryViews::kAfterExecutes, submitted, 483 fly.drain_released(device, rt::d3d12::GeometryViews::kAfterExecutes, submitted,
476 [&](std::uintptr_t source, std::size_t size, VkDeviceSize va) { 484 [&](std::uintptr_t source, std::size_t size, VkDeviceSize va) {
@@ -480,13 +488,12 @@ int main() {
480 fly.bytes() == kView && g_gone_blocks == gone, 488 fly.bytes() == kView && g_gone_blocks == gone,
481 "a view retired in before_execute_ is not reaped there, though the GPU is idle"); 489 "a view retired in before_execute_ is not reaped there, though the GPU is idle");
482 490
483 leonida::DescriptorRanges changed;
484 const bool read = aliases.changed_ranges(cursor, changed);
485 changed.merge();
486 std::vector<std::pair<std::uint64_t, std::uint64_t>> removed; 491 std::vector<std::pair<std::uint64_t, std::uint64_t>> removed;
487 aliases.take_removed(removed); 492 aliases.take_removed(removed);
488 check(read && aliases.invalidations() != invalidations && changed.overlaps(flybase, kView) && 493 aliases.remove_listener(&heard);
489 removed.size() == 1 && removed[0].first == va_f && removed[0].second == kView, 494 check(heard.size() == 1 && heard[0].removed && heard[0].title_va == flybase && heard[0].bytes == kView &&
495 heard[0].shader_va == va_f && removed.size() == 1 && removed[0].first == va_f &&
496 removed[0].second == kView,
490 "the retirement invalidates the heap slots and key answers made through the view without an alias"); 497 "the retirement invalidates the heap slots and key answers made through the view without an alias");
491 498
492 submitted = 8; // this replay's submission 499 submitted = 8; // this replay's submission
@@ -510,6 +517,109 @@ int main() {
510 } 517 }
511 VirtualFree(fly_title, 0, MEM_RELEASE); 518 VirtualFree(fly_title, 0, MEM_RELEASE);
512 519
520 // 14. LEONIDA_GEOMETRY_HOST: the copies' memory type. A discrete GPU's types: 0 VRAM, 1 VRAM through the BAR,
521 // 2 system memory write-combined, 3 system memory write-back. 1 takes type 3 (write-back preferred), 2 type 2,
522 // unset any host-visible type with device-local preferred (the BAR); a device whose host-visible types are all
523 // device-local (an integrated GPU) keeps them all.
524 {
525 struct TypedDevice : FakeDevice {
526 VkPhysicalDeviceMemoryProperties memory{};
527 std::uint32_t bits = 0;
528 VkMemoryPropertyFlags preferred = 0;
529 VkDeviceMemory allocate(const VkMemoryRequirements& r, VkMemoryPropertyFlags required,
530 VkMemoryPropertyFlags wanted, VkMemoryPropertyFlags* chosen, bool address) {
531 bits = r.memoryTypeBits;
532 preferred = wanted;
533 return FakeDevice::allocate(r, required, wanted, chosen, address);
534 }
535 };
536 constexpr VkMemoryPropertyFlags kLocal = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT,
537 kHost = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
538 VK_MEMORY_PROPERTY_HOST_COHERENT_BIT,
539 kCached = VK_MEMORY_PROPERTY_HOST_CACHED_BIT;
540 TypedDevice discrete;
541 discrete.memory.memoryTypeCount = 4;
542 const VkMemoryPropertyFlags discrete_types[4] = {kLocal, kLocal | kHost, kHost, kHost | kCached};
543 for (int i = 0; i < 4; ++i) discrete.memory.memoryTypes[i].propertyFlags = discrete_types[i];
544 TypedDevice integrated;
545 integrated.memory.memoryTypeCount = 2;
546 integrated.memory.memoryTypes[0].propertyFlags = kLocal;
547 integrated.memory.memoryTypes[1].propertyFlags = kLocal | kHost | kCached;
548 auto* host_title =
549 static_cast<std::uint8_t*>(VirtualAlloc(nullptr, kView, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE));
550 if (!host_title) return 1;
551 const auto hbase = reinterpret_cast<std::uintptr_t>(host_title);
552 const auto made_with = [&](TypedDevice& dev, const char* setting) {
553 _putenv_s("LEONIDA_GEOMETRY_HOST", setting);
554 dev.bits = ~0u;
555 dev.preferred = 0;
556 rt::d3d12::GeometryViews v;
557 const bool made = v.resolve(dev, hbase, kView, copy) != 0;
558 const int kind = v.system_memory();
559 v.release(dev);
560 return made ? kind : -1;
561 };
562 check(made_with(discrete, "1") == rt::d3d12::TitleBufferWindows::kSystemCached && discrete.bits == 1u << 3 &&
563 discrete.preferred == kCached,
564 "LEONIDA_GEOMETRY_HOST=1 puts the copies in write-back system memory, never the BAR");
565 check(made_with(discrete, "2") == rt::d3d12::TitleBufferWindows::kSystemUncached && discrete.bits == 1u << 2 &&
566 discrete.preferred == 0,
567 "LEONIDA_GEOMETRY_HOST=2 puts them in write-combined system memory");
568 check(made_with(discrete, "") == rt::d3d12::TitleBufferWindows::kDeviceLocal && discrete.bits == 0xfu &&
569 discrete.preferred == kLocal,
570 "unset, every type the buffer allows is tried, device-local first");
571 check(made_with(integrated, "1") == rt::d3d12::TitleBufferWindows::kSystemCached && integrated.bits == 0xfu,
572 "on a device with no host type outside device-local memory, the types are left as they are");
573 _putenv_s("LEONIDA_GEOMETRY_HOST", "");
574 check(g_live_buffers == 0, "the memory-type views free their blocks");
575
576 // 15. A retired view is copied once more from the title's pages when they are readable (they hold new bytes),
577 // and keeps what it held when they are not (decommitted or unmapped).
578 rt::d3d12::GeometryViews last;
579 std::memset(host_title, 0x11, kView);
580 const std::uint64_t va_l = last.resolve(device, hbase, kView, copy);
581 std::uint64_t host_l = 0, bytes_l = 0;
582 check(va_l && last.lookup(device.arena.address + va_l, host_l, bytes_l), "a view to retire");
583 auto* held = reinterpret_cast<const std::uint8_t*>(host_l);
584 // The pages' new bytes: the watched tiles are opened first (no fault handler here).
585 leonida::geometry_writes::notify(hbase, hbase + kView, leonida::geometry_writes::Event::open);
586 std::memset(host_title, 0x22, kView);
587 g_copies.clear();
588 check(last.retire_range(hbase, hbase + kView, 1, [](std::uintptr_t, std::size_t, VkDeviceSize) {}, copy) == 1 &&
589 held[0] == 0x22 && held[kView - 1] == 0x22 && last.final_copies() == 1 && g_copies.size() == 1,
590 "a retired view whose pages are readable is copied from them once more");
591 const std::uint64_t va_l2 = last.resolve(device, hbase, kView, copy);
592 std::uint64_t host_l2 = 0;
593 check(va_l2 && last.lookup(device.arena.address + va_l2, host_l2, bytes_l), "and made again");
594 auto* held2 = reinterpret_cast<const std::uint8_t*>(host_l2);
595 leonida::geometry_writes::notify(hbase, hbase + kView, leonida::geometry_writes::Event::open);
596 std::memset(host_title, 0x33, kView);
597 const auto unreadable = [](std::uint8_t*, const std::uint8_t*, std::size_t) {
598 return rt::d3d12::GeometryCopy::unreadable;
599 };
600 check(last.retire_range(hbase, hbase + kView, 2, [](std::uintptr_t, std::size_t, VkDeviceSize) {},
601 unreadable) == 1 &&
602 held2[0] == 0x22 && last.final_copies() == 1,
603 "one whose pages are not readable keeps what it held");
604 check(last.reap(device, 2) == 2 && last.bytes() == 0, "both are freed at their tickets");
605 last.release(device);
606
607 // 16. A full release queue first joins ranges that touch (unmaps report page runs): 65536 neighbouring ranges
608 // and one apart from them are two ranges, not one covering everything between them.
609 rt::d3d12::GeometryViews coalesce;
610 check(coalesce.resolve(device, hbase, kView, copy) != 0, "a view to watch the pages");
611 for (std::size_t i = 0; i < 65536; ++i)
612 leonida::geometry_writes::note_released(hbase + i * 8, hbase + i * 8 + 8);
613 leonida::geometry_writes::note_released(hbase + kView - 4096, hbase + kView);
614 std::vector<std::pair<std::uintptr_t, std::uintptr_t>> joined;
615 leonida::geometry_writes::take_released(coalesce.release_queue(), joined);
616 check(joined.size() == 2 && joined[0] == std::make_pair(hbase, hbase + 65536 * 8) &&
617 joined[1] == std::make_pair(hbase + kView - 4096, hbase + kView),
618 "65536 touching ranges become one, and a range apart from them stays apart");
619 coalesce.release(device);
620 VirtualFree(host_title, 0, MEM_RELEASE);
621 }
622
513 std::printf("%d checks, %d failures\n", g_checks, g_failures); 623 std::printf("%d checks, %d failures\n", g_checks, g_failures);
514 return g_failures ? 1 : 0; 624 return g_failures ? 1 : 0;
515} 625}
diff --git a/runtime/test/glsl/cs_bindless_dimensions.comp b/runtime/test/glsl/cs_bindless_dimensions.comp
new file mode 100644
index 000000000..4a26fe276
--- /dev/null
+++ b/runtime/test/glsl/cs_bindless_dimensions.comp
@@ -0,0 +1,30 @@
1#version 460
2// Reads one texel of each of many images through the bindless set 0 (src/vulkan_bindless.h), for
3// vk_bindless_dimensions_test: thread i reads the image at index indices[i] of the sampled array of one dimension
4// (pc.dimension: 0 1D, 1 2D array, 2 3D; bindings 5, 3 and 6, as tools/rdna2spirv.py declares them) and writes the
5// texel's red channel, as bits, to result[i]. One thread per workgroup, so each index is dynamically uniform and
6// the test needs no non-uniform indexing feature.
7#extension GL_EXT_nonuniform_qualifier : require
8#extension GL_EXT_samplerless_texture_functions : require
9
10layout(local_size_x = 1) in; // one image per workgroup: the index is uniform there
11
12layout(push_constant) uniform Pass { uint dimension; uint count; } pc;
13
14layout(set = 0, binding = 3) uniform texture2DArray layers[];
15layout(set = 0, binding = 5) uniform texture1D lines[];
16layout(set = 0, binding = 6) uniform texture3D volumes[];
17
18layout(set = 1, binding = 0, std430) writeonly buffer Result { uint result[]; };
19layout(set = 1, binding = 1, std430) readonly buffer Indices { uint indices[]; };
20
21void main() {
22 const uint i = gl_GlobalInvocationID.x;
23 if (i >= pc.count) return;
24 const uint index = indices[i];
25 float red;
26 if (pc.dimension == 0) red = texelFetch(lines[index], 0, 0).r;
27 else if (pc.dimension == 1) red = texelFetch(layers[index], ivec3(0), 0).r;
28 else red = texelFetch(volumes[index], ivec3(0), 0).r;
29 result[i] = floatBitsToUint(red);
30}
diff --git a/runtime/test/glsl/cs_group_marker.comp b/runtime/test/glsl/cs_group_marker.comp
new file mode 100644
index 000000000..f98d089aa
--- /dev/null
+++ b/runtime/test/glsl/cs_group_marker.comp
@@ -0,0 +1,16 @@
1// indirect_clamp_test's marker: every workgroup adds 1 to its own word, so a dispatch whose groups all ran exactly
2// once leaves 1 in each of its words. Only one dimension of a test dispatch is larger than 1, so x + y + z names the
3// group; a group past `groups` (which the dispatch should never run) counts in the word after them.
4// SPIR-V: runtime/test/cs_group_marker_spv.h (glslangValidator -V --target-env vulkan1.2 -Os).
5#version 460
6#extension GL_EXT_buffer_reference : require
7layout(local_size_x = 1) in;
8layout(buffer_reference, std430, buffer_reference_align = 4) buffer Marks { uint data[]; };
9layout(push_constant) uniform Params {
10 Marks marks;
11 uint groups;
12} p;
13void main() {
14 const uint group = gl_WorkGroupID.x + gl_WorkGroupID.y + gl_WorkGroupID.z;
15 atomicAdd(p.marks.data[min(group, p.groups)], 1u);
16}
diff --git a/runtime/test/heavy_pipeline_cache_test.cpp b/runtime/test/heavy_pipeline_cache_test.cpp
new file mode 100644
index 000000000..8181a047c
--- /dev/null
+++ b/runtime/test/heavy_pipeline_cache_test.cpp
@@ -0,0 +1,109 @@
1// src/heavy_pipeline_cache.h: the LEONIDA_HEAVY_PIPELINE_CACHE_MS threshold and when the heavy cache is written.
2// No Vulkan, no GPU, no files.
3#include "../src/heavy_pipeline_cache.h"
4
5#include <cstdio>
6#include <initializer_list>
7
8#define CHECK(condition) do { \
9 if (!(condition)) { \
10 std::fprintf(stderr, "line %d: %s\n", __LINE__, #condition); \
11 return 1; \
12 } \
13} while (0)
14
15namespace heavy = leonida::heavy_pipeline_cache;
16
17static int test_threshold() {
18 CHECK(heavy::parse_threshold(nullptr).ms == heavy::default_threshold_ms);
19 CHECK(heavy::parse_threshold("").ms == heavy::default_threshold_ms);
20 CHECK(heavy::parse_threshold("0").ms == 0 && heavy::parse_threshold("0").valid); // off
21 CHECK(heavy::parse_threshold("2000").ms == 2000);
22 CHECK(heavy::parse_threshold("0750").ms == 750);
23 // Not a number, a sign, a unit or an absurd value: the default, reported as invalid.
24 for (const char* bad : {"-1", "+5", "1s", "1.5", "abc", "3600001", "99999999999999999999"}) {
25 const auto t = heavy::parse_threshold(bad);
26 CHECK(!t.valid && t.ms == heavy::default_threshold_ms);
27 }
28 CHECK(heavy::parse_threshold("3600000").valid);
29 return 0;
30}
31
32static int test_schedule() {
33 using S = heavy::WriteSchedule;
34 S s;
35 CHECK(!s.dirty() && !s.due(1'000'000));
36 // One heavy compile: written once it has settled.
37 s.note_heavy(1000);
38 CHECK(s.dirty() && !s.due(1000 + S::settle_ms - 1) && s.due(1000 + S::settle_ms));
39 s.written(s.generation(), 1000 + S::settle_ms);
40 CHECK(!s.dirty());
41 // A burst, one compile a second for a minute: the write does not wait for the burst to end.
42 S burst;
43 for (std::uint64_t t = 10'000; t <= 70'000; t += 1000) {
44 burst.note_heavy(t);
45 if (burst.due(t)) {
46 CHECK(t - 10'000 >= S::max_delay_ms); // first write no later than max_delay after the first compile
47 burst.written(burst.generation(), t);
48 break;
49 }
50 }
51 CHECK(!burst.dirty());
52 // A compile that finishes while a write is running is not lost: the cache stays dirty for the next write.
53 S racing;
54 racing.note_heavy(5000);
55 const std::uint64_t start = 5000 + S::settle_ms;
56 const std::uint64_t taken = racing.generation();
57 racing.note_heavy(start + 10); // during the write
58 racing.written(taken, start);
59 CHECK(racing.dirty());
60 CHECK(racing.due(start + 10 + S::settle_ms));
61 // The same, inside one tick of a coarse clock: the compile noted at the write's own start time is still kept.
62 S tick;
63 tick.note_heavy(9000);
64 const std::uint64_t at = 9000 + S::settle_ms;
65 const std::uint64_t before = tick.generation();
66 tick.note_heavy(at);
67 tick.written(before, at);
68 CHECK(tick.dirty());
69 return 0;
70}
71
72static int test_failed_write() {
73 using S = heavy::WriteSchedule;
74 S s;
75 s.note_heavy(1000);
76 std::uint64_t now = 1000 + S::settle_ms;
77 CHECK(s.due(now));
78 // A failed write keeps the cache dirty and waits out the backoff before the next try.
79 s.failed(now);
80 CHECK(s.dirty() && s.failures() == 1);
81 CHECK(!s.due(now) && !s.due(now + S::retry_ms - 1) && s.due(now + S::retry_ms));
82 // Failures in a row double the delay up to the cap, so a write that keeps failing does not spin.
83 std::uint64_t expect = S::retry_ms;
84 for (int i = 0; i < 12; ++i) {
85 now = s.due_ms();
86 s.failed(now);
87 expect = expect * 2 > S::max_retry_ms ? S::max_retry_ms : expect * 2;
88 CHECK(s.due_ms() == now + expect);
89 }
90 CHECK(s.due_ms() - now == S::max_retry_ms);
91 // A heavy compile during the backoff does not bring the retry forward.
92 s.note_heavy(now + 1);
93 CHECK(!s.due(now + S::settle_ms + 1) && s.due(now + S::max_retry_ms));
94 // A successful write clears the dirty flag and the backoff.
95 now = s.due_ms();
96 s.written(s.generation(), now);
97 CHECK(!s.dirty() && s.failures() == 0);
98 s.note_heavy(now + 10);
99 CHECK(s.due(now + 10 + S::settle_ms));
100 return 0;
101}
102
103int main() {
104 if (const int r = test_threshold()) return r;
105 if (const int r = test_schedule()) return r;
106 if (const int r = test_failed_write()) return r;
107 std::printf("heavy_pipeline_cache: threshold parsing, the write schedule and retries after a failed write\n");
108 return 0;
109}
diff --git a/runtime/test/indirect_clamp_test.cpp b/runtime/test/indirect_clamp_test.cpp
index 3f34d4c43..3a119b952 100644
--- a/runtime/test/indirect_clamp_test.cpp
+++ b/runtime/test/indirect_clamp_test.cpp
@@ -2,11 +2,15 @@
2// 2//
3// - in-range records of every kind (draw, draw indexed, dispatch, mesh dispatch) come back bit-identical, and the 3// - in-range records of every kind (draw, draw indexed, dispatch, mesh dispatch) come back bit-identical, and the
4// pass counts nothing as clamped; 4// pass counts nothing as clamped;
5// - a garbage record is bounded (2^24 vertices, 2^26 vertex instances, 65 535 groups per dimension, 2^20 groups per 5// - a garbage record is bounded (2^26 vertex instances, 65 535 groups per dimension, 2^20 groups per dispatch)
6// dispatch) instead of asking for billions of groups; 6// instead of asking for billions of groups, and a draw record of 2^23 vertices or more runs empty and free;
7// - a counted batch clamps the count to max_command_count and empties the records past it; 7// - a counted batch clamps the count to max_command_count and empties the records past it;
8// - a batch whose records fit but whose total work passes the 2^27 budget runs all but the records that no longer 8// - a batch whose records fit but whose total work passes the 2^27 budget runs all but the records that no longer
9// fit, so thousands of garbage records cannot run for seconds. 9// fit, so thousands of garbage records cannot run for seconds;
10// - a dispatch is bounded by the device's own maxComputeWorkGroupCount, not by Vulkan's minimum of 65 535: a real
11// indirect dispatch of 70 000 x 1 x 1 groups (and of 65 535 in x or y, the old limit) through the clamped scratch
12// runs every group exactly once (cs_group_marker.comp marks each one). The idea is from codec-d/cool_fox
13// docs/findings.md ("blocky patches: indirect dispatches cut at 65,535 groups"); no code of theirs is used.
10// 14//
11// A record that asks for billions of groups or vertices would run until the host resets the driver, so this test is 15// A record that asks for billions of groups or vertices would run until the host resets the driver, so this test is
12// about the values the pass writes, never about running such a dispatch here: every case ends in a copy of the 16// about the values the pass writes, never about running such a dispatch here: every case ends in a copy of the
@@ -17,6 +21,7 @@
17#include "vk_test_device.h" 21#include "vk_test_device.h"
18 22
19#include "../src/vulkan_indirect_clamp.h" 23#include "../src/vulkan_indirect_clamp.h"
24#include "cs_group_marker_spv.h"
20 25
21#include <algorithm> 26#include <algorithm>
22#include <cstdint> 27#include <cstdint>
@@ -98,6 +103,10 @@ struct Env {
98 out.counters.records_clamped = after.records_clamped - before.records_clamped; 103 out.counters.records_clamped = after.records_clamped - before.records_clamped;
99 out.counters.counts_clamped = after.counts_clamped - before.counts_clamped; 104 out.counters.counts_clamped = after.counts_clamped - before.counts_clamped;
100 out.counters.over_budget = after.over_budget - before.over_budget; 105 out.counters.over_budget = after.over_budget - before.over_budget;
106 out.counters.dispatch_records = after.dispatch_records - before.dispatch_records;
107 out.counters.dispatch_wide = after.dispatch_wide - before.dispatch_wide;
108 out.counters.dispatch_widest = after.dispatch_widest; // the largest so far: cases go from narrow to wide
109 out.counters.dispatch_cut = after.dispatch_cut - before.dispatch_cut;
101 // The scratch is idle once the queue is; hand it back for the next case like a completed submission does. 110 // The scratch is idle once the queue is; hand it back for the next case like a completed submission does.
102 clamp.retire(VK_NULL_HANDLE, 0); 111 clamp.retire(VK_NULL_HANDLE, 0);
103 clamp.collect(); 112 clamp.collect();
@@ -167,17 +176,42 @@ int main() {
167 CHECK(out.counters.records_clamped == 0 && out.counters.counts_clamped == 0); 176 CHECK(out.counters.records_clamped == 0 && out.counters.counts_clamped == 0);
168 } 177 }
169 178
170 // 2. A draw that asks for four billion vertices in four billion instances is cut to 2^24 vertices, and the 179 // 2. A draw that asks for four billion vertices in four billion instances is an unfilled slot: it runs empty,
171 // instances to what keeps count * instances within 2^26. 180 // keeping its locations, and charges nothing.
172 { 181 {
173 const std::uint32_t values[4] = {0xFFFFFFF0u, 0xFFFFFFFFu, 4, 6}; 182 const std::uint32_t values[4] = {0xFFFFFFF0u, 0xFFFFFFFFu, 4, 6};
174 Clamped out{}; 183 Clamped out{};
175 CHECK(env.run(leonida::indirect_clamp_draw, 16, 1, 4, values, nullptr, out)); 184 CHECK(env.run(leonida::indirect_clamp_draw, 16, 1, 4, values, nullptr, out));
176 const auto words = record(out, 0, 4); 185 const auto words = record(out, 0, 4);
177 CHECK(words[0] == leonida::indirect_clamp_max_vertices); 186 CHECK(words[0] == 0 && words[1] == 0);
178 CHECK(words[1] == leonida::indirect_clamp_max_vertex_instances / leonida::indirect_clamp_max_vertices);
179 CHECK(words[2] == 4 && words[3] == 6); 187 CHECK(words[2] == 4 && words[3] == 6);
180 CHECK(out.counters.records_clamped == 1); 188 CHECK(out.counters.records_clamped == 1 && out.counters.over_budget == 0);
189 }
190
191 // 2b. Just under the unfilled count a draw is a draw: its vertices stay, and its instances are cut to what keeps
192 // count * instances within 2^26. At the unfilled count it runs empty.
193 {
194 const std::uint32_t most = leonida::indirect_clamp_unfilled_draw - 1;
195 const std::uint32_t values[4 * 2] = {most, 100, 0, 0, leonida::indirect_clamp_unfilled_draw, 1, 0, 0};
196 Clamped out{};
197 CHECK(env.run(leonida::indirect_clamp_draw, 16, 2, 4, values, nullptr, out));
198 const auto under = record(out, 0, 4);
199 CHECK(under[0] == most && under[1] == leonida::indirect_clamp_max_vertex_instances / most);
200 CHECK(record(out, 1, 4)[0] == 0 && record(out, 1, 4)[1] == 0);
201 CHECK(out.counters.records_clamped == 2);
202 }
203
204 // 2c. Garbage counts ahead of a real draw in one list: before, each was cut to 2^24 vertices and charged them, so
205 // eight used up the 2^27 budget and every later draw ran empty. Now they are free and the real draw runs.
206 {
207 std::vector<std::uint32_t> values;
208 for (std::uint32_t r = 0; r < 16; ++r) values.insert(values.end(), {0x01000000u + r, 1, 0, 0});
209 const std::uint32_t valid[] = {300, 2, 3, 4};
210 values.insert(values.end(), valid, valid + 4);
211 Clamped out{};
212 CHECK(env.run(leonida::indirect_clamp_draw, 16, 17, 4, values.data(), nullptr, out));
213 CHECK(out.counters.over_budget == 0 && out.counters.records_clamped == 16);
214 CHECK(record(out, 16, 4) == std::vector<std::uint32_t>(valid, valid + 4));
181 } 215 }
182 216
183 // 3. A counted draw: the count is clamped to max_command_count, and the records past min(count, max) are empty. 217 // 3. A counted draw: the count is clamped to max_command_count, and the records past min(count, max) are empty.
@@ -210,14 +244,23 @@ int main() {
210 CHECK(out.counters.counts_clamped == 1); 244 CHECK(out.counters.counts_clamped == 1);
211 } 245 }
212 246
213 // 4. An indexed draw keeps its two locations and its first instance, and bounds its index count. 247 // 4. An indexed draw keeps its two locations and its first instance: an unfilled index count runs empty, and a
248 // real one keeps its indices with the instances bounded.
214 { 249 {
215 const std::uint32_t values[5] = {0xFFFFFFFFu, 0xFFFFFFFFu, 10, 20, 30}; 250 const std::uint32_t values[5] = {0xFFFFFFFFu, 0xFFFFFFFFu, 10, 20, 30};
216 Clamped out{}; 251 Clamped out{};
217 CHECK(env.run(leonida::indirect_clamp_draw_indexed, 20, 1, 5, values, nullptr, out)); 252 CHECK(env.run(leonida::indirect_clamp_draw_indexed, 20, 1, 5, values, nullptr, out));
218 const auto words = record(out, 0, 5); 253 const auto words = record(out, 0, 5);
219 CHECK(words[0] == leonida::indirect_clamp_max_vertices); 254 CHECK(words[0] == 0 && words[1] == 0);
220 CHECK(words[1] == leonida::indirect_clamp_max_vertex_instances / leonida::indirect_clamp_max_vertices); 255 CHECK(words[2] == 10 && words[3] == 20 && words[4] == 30);
256 CHECK(out.counters.records_clamped == 1);
257 }
258 {
259 const std::uint32_t values[5] = {3000, 0xFFFFFFFFu, 10, 20, 30};
260 Clamped out{};
261 CHECK(env.run(leonida::indirect_clamp_draw_indexed, 20, 1, 5, values, nullptr, out));
262 const auto words = record(out, 0, 5);
263 CHECK(words[0] == 3000 && words[1] == leonida::indirect_clamp_max_vertex_instances / 3000);
221 CHECK(words[2] == 10 && words[3] == 20 && words[4] == 30); 264 CHECK(words[2] == 10 && words[3] == 20 && words[4] == 30);
222 CHECK(out.counters.records_clamped == 1); 265 CHECK(out.counters.records_clamped == 1);
223 } 266 }
@@ -241,16 +284,40 @@ int main() {
241 CHECK(out.counters.records_clamped == 1); 284 CHECK(out.counters.records_clamped == 1);
242 } 285 }
243 286
244 // 6b. A dispatch over the per-dimension limit is cut there, and one over 2^20 groups in all runs empty. 287 // 6b. A dispatch over the device's per-dimension limit is cut there (y here; a device whose y limit is above 2^20
288 // runs it empty instead, as more than 2^20 groups), and one over 2^20 groups in all runs empty.
245 { 289 {
246 const std::uint32_t values[3 * 2] = {0x10000000u, 1, 1, 65535, 65535, 1}; 290 const std::uint32_t max_y = leonida::indirect_clamp_dispatch_limit(properties.limits, 1);
291 const std::uint32_t values[3 * 2] = {1, 0x10000000u, 1, 65535, 65535, 1};
247 Clamped out{}; 292 Clamped out{};
248 CHECK(env.run(leonida::indirect_clamp_dispatch, 12, 2, 3, values, nullptr, out)); 293 CHECK(env.run(leonida::indirect_clamp_dispatch, 12, 2, 3, values, nullptr, out));
249 const auto per_dimension = record(out, 0, 3); 294 const auto per_dimension = record(out, 0, 3);
250 CHECK(per_dimension[0] == leonida::indirect_clamp_max_group_dimension && per_dimension[1] == 1 && 295 if (max_y <= leonida::indirect_clamp_max_groups)
251 per_dimension[2] == 1); 296 CHECK(per_dimension[0] == 1 && per_dimension[1] == max_y && per_dimension[2] == 1);
297 else
298 CHECK(all_zero(per_dimension));
252 CHECK(all_zero(record(out, 1, 3))); 299 CHECK(all_zero(record(out, 1, 3)));
253 CHECK(out.counters.records_clamped == 2); 300 CHECK(out.counters.records_clamped == 2);
301 // The dispatch counters: both records, neither wider than 65 535 in x, and the first cut at the device's
302 // limit where it still runs.
303 CHECK(out.counters.dispatch_records == 2 && out.counters.dispatch_wide == 0);
304 CHECK(out.counters.dispatch_cut == (max_y <= leonida::indirect_clamp_max_groups ? 1u : 0u));
305 }
306
307 // 6c. x within the device's limit is not cut at 65 535: 70 000 groups (fewer than 2^20) come back as asked on a
308 // device that runs them, and are cut at its limit on one that does not.
309 {
310 const std::uint32_t max_x = leonida::indirect_clamp_dispatch_limit(properties.limits, 0);
311 const std::uint32_t values[3] = {70000, 1, 1};
312 Clamped out{};
313 CHECK(env.run(leonida::indirect_clamp_dispatch, 12, 1, 3, values, nullptr, out));
314 const auto words = record(out, 0, 3);
315 CHECK(words[0] == std::min<std::uint32_t>(70000, max_x) && words[1] == 1 && words[2] == 1);
316 CHECK(out.counters.records_clamped == (max_x >= 70000 ? 0u : 1u));
317 // Counted as wider than 65 535 where it runs so, and as cut at the device's limit where it is cut.
318 CHECK(out.counters.dispatch_records == 1 && out.counters.dispatch_wide == (max_x >= 70000 ? 1u : 0u));
319 CHECK(out.counters.dispatch_widest == std::min<std::uint32_t>(70000, max_x));
320 CHECK(out.counters.dispatch_cut == (max_x >= 70000 ? 0u : 1u));
254 } 321 }
255 322
256 // 7. A console mesh dispatch uses only x. 323 // 7. A console mesh dispatch uses only x.
@@ -300,7 +367,7 @@ int main() {
300 367
301 // Three calls on one list consume two full draw allowances. A fresh list starts at zero. 368 // Three calls on one list consume two full draw allowances. A fresh list starts at zero.
302 { 369 {
303 const std::uint32_t args[] = {1u << 24, 4, 0, 0}; 370 const std::uint32_t args[] = {1u << 22, 16, 0, 0}; // 2^26 units: half the list budget, a real draw
304 std::memcpy(env.arguments_map, args, sizeof(args)); 371 std::memcpy(env.arguments_map, args, sizeof(args));
305 auto batch = clamp.batch(); 372 auto batch = clamp.batch();
306 leonida::ClampedIndirect jobs[4]{}; 373 leonida::ClampedIndirect jobs[4]{};
@@ -331,7 +398,7 @@ int main() {
331 // clamped, none falls back to the application's buffer; the calls past the slots only lose their counters. 398 // clamped, none falls back to the application's buffer; the calls past the slots only lose their counters.
332 { 399 {
333 std::memset(env.arguments_map, 0, size_t(env.argument_bytes)); 400 std::memset(env.arguments_map, 0, size_t(env.argument_bytes));
334 const std::uint32_t huge[4] = {0xFFFFFFF0u, 0xFFFFFFFFu, 4, 6}; 401 const std::uint32_t huge[4] = {0x00400000u, 0xFFFFFFFFu, 4, 6}; // 2^22 vertices: a draw, its instances cut
335 std::memcpy(env.arguments_map, huge, sizeof huge); 402 std::memcpy(env.arguments_map, huge, sizeof huge);
336 std::memset(env.readback_map, 0xcd, size_t(env.readback_bytes)); 403 std::memset(env.readback_map, 0xcd, size_t(env.readback_bytes));
337 const auto before = clamp.counters(); 404 const auto before = clamp.counters();
@@ -362,12 +429,112 @@ int main() {
362 }); 429 });
363 CHECK(ok); 430 CHECK(ok);
364 const auto* words = static_cast<const std::uint32_t*>(env.readback_map); 431 const auto* words = static_cast<const std::uint32_t*>(env.readback_map);
365 CHECK(words[0] == leonida::indirect_clamp_max_vertices && words[2] == 4 && words[3] == 6); 432 CHECK(words[0] == 0x00400000u &&
433 words[1] == leonida::indirect_clamp_max_vertex_instances / 0x00400000u && words[2] == 4 &&
434 words[3] == 6);
366 } 435 }
367 clamp.retire(VK_NULL_HANDLE, 0); 436 clamp.retire(VK_NULL_HANDLE, 0);
368 clamp.collect(); 437 clamp.collect();
369 } 438 }
370 439
440 // 10. Real indirect dispatches through the clamped scratch: every group runs exactly once. 70 000 x 1 x 1 is past
441 // the old fixed 65 535 (the groups past it never ran, leaving their output stale); 65 535 in x and in y are
442 // exactly at it. A size past this device's own limit is skipped: the clamp cuts it there by design.
443 {
444 const auto vkfn = [&](const char* name) { return device.device_proc(device.device, name); };
445 VkShaderModuleCreateInfo module_info{VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO};
446 module_info.codeSize = sizeof(leonida::cs_group_marker_spirv);
447 module_info.pCode = leonida::cs_group_marker_spirv;
448 VkShaderModule module = VK_NULL_HANDLE;
449 CHECK(reinterpret_cast<PFN_vkCreateShaderModule>(vkfn("vkCreateShaderModule"))(device.device, &module_info,
450 nullptr, &module) == VK_SUCCESS);
451 struct MarkerPush {
452 VkDeviceAddress marks;
453 std::uint32_t groups;
454 std::uint32_t pad;
455 };
456 const VkPushConstantRange range{VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(MarkerPush)};
457 VkPipelineLayoutCreateInfo layout_info{VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO};
458 layout_info.pushConstantRangeCount = 1;
459 layout_info.pPushConstantRanges = &range;
460 VkPipelineLayout layout = VK_NULL_HANDLE;
461 CHECK(reinterpret_cast<PFN_vkCreatePipelineLayout>(vkfn("vkCreatePipelineLayout"))(
462 device.device, &layout_info, nullptr, &layout) == VK_SUCCESS);
463 VkComputePipelineCreateInfo pipeline_info{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO};
464 pipeline_info.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO};
465 pipeline_info.stage.stage = VK_SHADER_STAGE_COMPUTE_BIT;
466 pipeline_info.stage.module = module;
467 pipeline_info.stage.pName = "main";
468 pipeline_info.layout = layout;
469 VkPipeline pipeline = VK_NULL_HANDLE;
470 CHECK(reinterpret_cast<PFN_vkCreateComputePipelines>(vkfn("vkCreateComputePipelines"))(
471 device.device, VK_NULL_HANDLE, 1, &pipeline_info, nullptr, &pipeline) == VK_SUCCESS);
472
473 constexpr std::uint32_t kMostGroups = 70000;
474 void* marks_map = nullptr;
475 const VkBuffer marks = device.buffer(VkDeviceSize(kMostGroups + 1) * 4, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT,
476 &marks_map);
477 CHECK(marks && marks_map && pipeline);
478 struct Case {
479 std::uint32_t x, y, z;
480 };
481 const Case cases[] = {{70000, 1, 1}, {65535, 1, 1}, {1, 65535, 1}};
482 for (const Case& c : cases) {
483 if (!marks || !pipeline) break;
484 const std::uint32_t groups = c.x * c.y * c.z;
485 if (c.x > leonida::indirect_clamp_dispatch_limit(properties.limits, 0) ||
486 c.y > leonida::indirect_clamp_dispatch_limit(properties.limits, 1) ||
487 c.z > leonida::indirect_clamp_dispatch_limit(properties.limits, 2)) {
488 std::printf("indirect_clamp_test: %u x %u x %u is past this device's maxComputeWorkGroupCount; "
489 "skipped\n", c.x, c.y, c.z);
490 continue;
491 }
492 const std::uint32_t args[3] = {c.x, c.y, c.z};
493 std::memset(env.arguments_map, 0, size_t(env.argument_bytes));
494 std::memcpy(env.arguments_map, args, sizeof args);
495 std::memset(marks_map, 0, size_t(kMostGroups + 1) * 4);
496 {
497 auto batch = clamp.batch();
498 leonida::ClampedIndirect job{};
499 CHECK(batch->prepare(env.arguments, 0, VK_NULL_HANDLE, 0, leonida::indirect_clamp_dispatch, 12, 1,
500 job));
501 const MarkerPush push{device.device_address(marks), groups, 0};
502 CHECK(device.run([&](VkCommandBuffer cb) {
503 clamp.emit(cb, job); // its last barrier orders the records before the indirect read
504 reinterpret_cast<PFN_vkCmdBindPipeline>(vkfn("vkCmdBindPipeline"))(
505 cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline);
506 reinterpret_cast<PFN_vkCmdPushConstants>(vkfn("vkCmdPushConstants"))(
507 cb, layout, VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof push, &push);
508 reinterpret_cast<PFN_vkCmdDispatchIndirect>(vkfn("vkCmdDispatchIndirect"))(cb, job.buffer,
509 job.offset);
510 VkMemoryBarrier host{VK_STRUCTURE_TYPE_MEMORY_BARRIER};
511 host.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT;
512 host.dstAccessMask = VK_ACCESS_HOST_READ_BIT;
513 device.fn<PFN_vkCmdPipelineBarrier>("vkCmdPipelineBarrier")(
514 cb, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, VK_PIPELINE_STAGE_HOST_BIT, 0, 1, &host, 0, nullptr,
515 0, nullptr);
516 return true;
517 }));
518 }
519 clamp.retire(VK_NULL_HANDLE, 0);
520 clamp.collect();
521 const auto* m = static_cast<const std::uint32_t*>(marks_map);
522 std::uint32_t once = 0, never = 0, twice = 0;
523 for (std::uint32_t g = 0; g < groups; ++g) {
524 if (m[g] == 1) ++once;
525 else if (m[g] == 0) ++never;
526 else ++twice;
527 }
528 if (once != groups || m[groups] != 0)
529 std::fprintf(stderr, "indirect_clamp_test: %u x %u x %u: %u group(s) ran once, %u never, %u more than "
530 "once, %u past the end\n", c.x, c.y, c.z, once, never, twice, m[groups]);
531 CHECK(once == groups && never == 0 && twice == 0 && m[groups] == 0);
532 }
533 reinterpret_cast<PFN_vkDestroyPipeline>(vkfn("vkDestroyPipeline"))(device.device, pipeline, nullptr);
534 reinterpret_cast<PFN_vkDestroyPipelineLayout>(vkfn("vkDestroyPipelineLayout"))(device.device, layout, nullptr);
535 reinterpret_cast<PFN_vkDestroyShaderModule>(vkfn("vkDestroyShaderModule"))(device.device, module, nullptr);
536 }
537
371 // Every case above ran under validation when LEONIDA_VK_VALIDATION=1. 538 // Every case above ran under validation when LEONIDA_VK_VALIDATION=1.
372 CHECK(device.validation_errors() == device.known_validation_errors()); 539 CHECK(device.validation_errors() == device.known_validation_errors());
373 540
diff --git a/runtime/test/list_value_wait_budget_test.cpp b/runtime/test/list_value_wait_budget_test.cpp
new file mode 100644
index 000000000..6bf9bfbf5
--- /dev/null
+++ b/runtime/test/list_value_wait_budget_test.cpp
@@ -0,0 +1,348 @@
1// Portable CPU-only unit tests for runtime/src/list_value_wait_budget.h (RT-LIST-VALUE-WAIT-WORK-AWARE-TIMEOUT):
2// work-aware timeout pausing, finite pause caps across all pause reasons (including releaser_busy and
3// matching_producer), demoted-gate cap scaling, cycle detection across multi-queue write/gate chains, overwrite-aware
4// write matching, action gates, and a mock Pump tick driver. No Windows, D3D12, or Vulkan headers; no game files.
5#include "../src/list_value_wait_budget.h"
6
7#include <climits>
8#include <cstdio>
9#include <vector>
10
11#define CHECK(cond) do { \
12 if (!(cond)) { \
13 std::fprintf(stderr, "line %d: CHECK failed: %s\n", __LINE__, #cond); \
14 return 1; \
15 } \
16} while (0)
17
18namespace {
19
20constexpr bool test_met(std::uint32_t comparison, std::uint64_t value, std::uint64_t reference, bool wide) {
21 if (!wide) {
22 value &= 0xffffffffu;
23 reference &= 0xffffffffu;
24 }
25 switch (comparison) {
26 case 2: return value < reference;
27 case 3: return value == reference;
28 case 4: return value <= reference;
29 case 5: return value > reference;
30 case 6: return value != reference;
31 case 7: return value >= reference;
32 default: return true;
33 }
34}
35
36} // namespace
37
38int main() {
39 using namespace leonida::list_value_wait;
40
41 int q1_tag = 0, q2_tag = 0, q3_tag = 0;
42 const void* const q1 = &q1_tag;
43 const void* const q2 = &q2_tag;
44 const void* const q3 = &q3_tag;
45
46 // 1. Idle unmodelled wait: PauseReason::none -> expires at exact budget_us.
47 {
48 const WaitPredicate waits[] = {{0x1000, 5, 7, true}}; // >= 5
49 const PendingGate gates[] = {{q1, 1, false, waits}};
50 CHECK(pause_reason(false, {}, gates, 0, test_met) == PauseReason::none);
51
52 GateTimeoutState t;
53 const PauseCaps caps = default_pause_caps(200, false);
54 t.reset(200'000, caps.active_us, caps.max_us);
55 CHECK(!t.advance(100'000, PauseReason::none));
56 CHECK(t.elapsed_us == 100'000 && !t.paused_ever);
57 CHECK(!t.advance(99'999, PauseReason::none));
58 CHECK(t.advance(1, PauseReason::none));
59 CHECK(t.elapsed_us == 200'000);
60 }
61
62 // 2. Releaser actively executing held work pauses the timeout clock (covering multi-minute world-phase pipeline
63 // builds without burning idle budget), yet still expires at the finite max_pause_cap_us if a Signal hangs.
64 {
65 const WaitPredicate waits[] = {{0x1000, 5, 7, true}};
66 const PendingGate gates[] = {{q1, 1, false, waits}};
67 CHECK(pause_reason(true, {}, gates, 0, test_met) == PauseReason::releaser_busy);
68
69 GateTimeoutState t;
70 const PauseCaps caps = default_pause_caps(200, false);
71 CHECK(caps.active_us == 60'000'000ull && caps.max_us == 300'000'000ull);
72 t.reset(200'000, caps.active_us, caps.max_us);
73 // 120 seconds of releaser executing pipeline builds/copies burns 0 us of idle timeout budget.
74 for (int i = 0; i < 120; ++i) CHECK(!t.advance(1'000'000, PauseReason::releaser_busy));
75 CHECK(t.elapsed_us == 0 && t.total_paused_us == 120'000'000ull && t.paused_ever);
76 // Once idle again, still gets its full 200 ms budget before expiring.
77 CHECK(!t.advance(199'000, PauseReason::none));
78 CHECK(t.advance(1'000, PauseReason::none));
79
80 // Hung Signal (releaser_busy forever) hits the finite max_pause_cap_us and then drains budget_us.
81 GateTimeoutState hung;
82 hung.reset(200'000, caps.active_us, caps.max_us);
83 for (int i = 0; i < 300; ++i) CHECK(!hung.advance(1'000'000, PauseReason::releaser_busy));
84 CHECK(hung.total_paused_us == 300'000'000ull && hung.elapsed_us == 0);
85 CHECK(!hung.advance(199'000, PauseReason::releaser_busy));
86 CHECK(hung.advance(1'000, PauseReason::releaser_busy));
87 CHECK(hung.elapsed_us == 200'000);
88 }
89
90 // 3. Matching unblocked producer write on another queue (Wait-before-Signal) -> PauseReason::matching_producer.
91 {
92 const WaitPredicate waits[] = {{0x2000, 10, 7, true}}; // >= 10
93 const PendingWrite w_ok[] = {{0x2000, 12, 8, false}};
94 const PendingWriteGroup groups[] = {{q2, 0, w_ok}};
95 const PendingGate gates[] = {{q1, 1, false, waits}};
96 CHECK(pause_reason(false, groups, gates, 0, test_met) == PauseReason::matching_producer);
97
98 // Timestamp write to the same address also matches (final value unknown until landing).
99 const PendingWrite w_ts[] = {{0x2000, 0, 8, true}};
100 const PendingWriteGroup ts_groups[] = {{q2, 0, w_ts}};
101 CHECK(pause_reason(false, ts_groups, gates, 0, test_met) == PauseReason::matching_producer);
102
103 // Matching write overwritten later in the same WriteGroup by a non-matching value does NOT match,
104 // falling back to active_work (since q2's group is unblocked).
105 const PendingWrite w_overwritten[] = {{0x2000, 12, 8, false}, {0x2000, 3, 8, false}};
106 const PendingWriteGroup ow_groups[] = {{q2, 0, w_overwritten}};
107 CHECK(pause_reason(false, ow_groups, gates, 0, test_met) == PauseReason::active_work);
108
109 // Partial overlap by a later write in the same group invalidates the earlier matching write.
110 const PendingWrite w_partial[] = {{0x2000, 12, 8, false}, {0x2004, 0, 4, false}};
111 const PendingWriteGroup part_groups[] = {{q2, 0, w_partial}};
112 CHECK(pause_reason(false, part_groups, gates, 0, test_met) == PauseReason::active_work);
113
114 // 4-byte write cannot satisfy an 8-byte (wide) wait.
115 const PendingWrite w_narrow[] = {{0x2000, 12, 4, false}};
116 const PendingWriteGroup nar_groups[] = {{q2, 0, w_narrow}};
117 CHECK(pause_reason(false, nar_groups, gates, 0, test_met) == PauseReason::active_work);
118
119 // 8-byte write CAN satisfy a 4-byte wait (low 32 bits compared).
120 const WaitPredicate wait32[] = {{0x2000, 10, 7, false}};
121 const PendingWrite w_hi_lo[] = {{0x2000, 0x100000000ull | 12ull, 8, false}};
122 const PendingWriteGroup hilo_groups[] = {{q2, 0, w_hi_lo}};
123 const PendingGate gates32[] = {{q1, 1, false, wait32}};
124 CHECK(pause_reason(false, hilo_groups, gates32, 0, test_met) == PauseReason::matching_producer);
125 }
126
127 // 4. Same-queue ordering: a write submitted BEFORE the gate (after_gate < gate.value) IS a live producer;
128 // a write submitted AFTER the gate (after_gate >= gate.value) is a self-deadlock and MUST NOT pause the gate.
129 {
130 const WaitPredicate waits[] = {{0x3000, 1, 7, true}};
131 const PendingWrite w[] = {{0x3000, 1, 8, false}};
132 const PendingGate gates[] = {{q1, 2, false, waits}};
133
134 const PendingWriteGroup before_gate[] = {{q1, 1, w}}; // after_gate 1 < gate.value 2 (unblocked!)
135 CHECK(pause_reason(false, before_gate, gates, 0, test_met) == PauseReason::matching_producer);
136
137 const PendingWriteGroup behind_gate[] = {{q1, 2, w}}; // after_gate 2 == gate.value 2 (held by itself!)
138 CHECK(pause_reason(false, behind_gate, gates, 0, test_met) == PauseReason::none);
139 }
140
141 // 5. Mutual 2-queue cycle (Q1 waits on Q2's write behind G2; Q2 waits on Q1's write behind G1):
142 // NEITHER gate pauses, so the cycle breaks cleanly instead of deadlocking.
143 {
144 const WaitPredicate w1[] = {{0x4000, 1, 7, true}};
145 const WaitPredicate w2[] = {{0x5000, 1, 7, true}};
146 const PendingWrite pw1[] = {{0x5000, 1, 8, false}}; // Q1 writes what Q2 waits for, behind Q1's gate 1
147 const PendingWrite pw2[] = {{0x4000, 1, 8, false}}; // Q2 writes what Q1 waits for, behind Q2's gate 1
148 const PendingWriteGroup groups[] = {{q1, 1, pw1}, {q2, 1, pw2}};
149 const PendingGate gates[] = {{q1, 1, false, w1}, {q2, 1, false, w2}};
150 CHECK(pause_reason(false, groups, gates, 0, test_met) == PauseReason::none);
151 CHECK(pause_reason(false, groups, gates, 1, test_met) == PauseReason::none);
152 }
153
154 // 6. 3-queue cycle involving a SECOND (non-front) gate on Q2:
155 // Q1 gate 1 waits on W2 (behind Q2 gates 1 & 2); Q2 gate 2 waits on W1 (behind Q1 gate 1).
156 // Checking all gates <= after_gate catches this indirect cycle!
157 {
158 const WaitPredicate w_q1[] = {{0x6000, 1, 7, true}};
159 const WaitPredicate w_q2_g1[] = {{0x6100, 1, 7, true}}; // unrelated front gate on Q2
160 const WaitPredicate w_q2_g2[] = {{0x6200, 1, 7, true}}; // second gate on Q2 waits on Q1
161 const PendingWrite pw_q1[] = {{0x6200, 1, 8, false}}; // behind Q1 gate 1
162 const PendingWrite pw_q2[] = {{0x6000, 1, 8, false}}; // behind Q2 gate 2 (after_gate = 2)
163 const PendingWriteGroup groups[] = {{q1, 1, pw_q1}, {q2, 2, pw_q2}};
164 const PendingGate gates[] = {
165 {q1, 1, false, w_q1},
166 {q2, 1, false, w_q2_g1},
167 {q2, 2, false, w_q2_g2},
168 };
169 CHECK(pause_reason(false, groups, gates, 0, test_met) == PauseReason::none);
170 CHECK(pause_reason(false, groups, gates, 2, test_met) == PauseReason::none);
171 }
172
173 // 7. Acyclic 3-queue chain (Q1 -> Q2 -> Q3 where Q3's gate has no producer):
174 // Q3 does NOT pause (times out first), while Q2 and Q1 wait for their upstream producers to run in order!
175 {
176 const WaitPredicate w_q1[] = {{0x7000, 1, 7, true}};
177 const WaitPredicate w_q2[] = {{0x7100, 1, 7, true}};
178 const WaitPredicate w_q3[] = {{0x7200, 1, 7, true}}; // unmodelled wait on Q3
179 const PendingWrite pw_q2[] = {{0x7000, 1, 8, false}}; // Q2 feeds Q1 (behind Q2 gate 1)
180 const PendingWrite pw_q3[] = {{0x7100, 1, 8, false}}; // Q3 feeds Q2 (behind Q3 gate 1)
181 const PendingWriteGroup groups[] = {{q2, 1, pw_q2}, {q3, 1, pw_q3}};
182 const PendingGate gates[] = {
183 {q1, 1, false, w_q1},
184 {q2, 1, false, w_q2},
185 {q3, 1, false, w_q3},
186 };
187 CHECK(pause_reason(false, groups, gates, 0, test_met) == PauseReason::matching_producer);
188 CHECK(pause_reason(false, groups, gates, 1, test_met) == PauseReason::matching_producer);
189 CHECK(pause_reason(false, groups, gates, 2, test_met) == PauseReason::none);
190 }
191
192 // 8. Action gate on another queue counts as active_work when unblocked, and does NOT count when blocked behind a
193 // memory gate on its own queue.
194 {
195 const WaitPredicate w_q1[] = {{0x8000, 1, 7, true}};
196 const WaitPredicate w_q2[] = {{0x8100, 1, 7, true}};
197 const PendingGate unblocked_action[] = {
198 {q1, 1, false, w_q1},
199 {q2, 1, true, {}}, // unblocked action gate on Q2
200 };
201 CHECK(pause_reason(false, {}, unblocked_action, 0, test_met) == PauseReason::active_work);
202
203 const PendingGate blocked_action[] = {
204 {q1, 1, false, w_q1},
205 {q2, 1, false, w_q2}, // memory gate blocking Q2
206 {q2, 2, true, {}}, // action gate behind Q2's memory gate
207 };
208 CHECK(pause_reason(false, {}, blocked_action, 0, test_met) == PauseReason::none);
209 }
210
211 // 9. Bounded pause caps: active_work, matching_producer, releaser_busy, combined alternating reasons, and
212 // demoted-gate cap scaling.
213 {
214 CHECK(default_active_pause_cap_us(200) == 60'000'000ull);
215 CHECK(default_max_pause_cap_us(200) == 300'000'000ull);
216 CHECK(default_active_pause_cap_us(30) == 9'000'000ull);
217 CHECK(default_max_pause_cap_us(30) == 45'000'000ull);
218 CHECK(default_active_pause_cap_us(1) == 300'000ull);
219 CHECK(default_max_pause_cap_us(1) == 1'500'000ull);
220 CHECK(default_active_pause_cap_us(30000) == 600'000'000ull);
221 CHECK(default_max_pause_cap_us(30000) == 600'000'000ull);
222 CHECK(default_active_pause_cap_us(UINT_MAX) == 600'000'000ull);
223 CHECK(default_max_pause_cap_us(UINT_MAX) == 600'000'000ull);
224
225 // Demoted (cut_short) gates scale caps with their short 4 ms budget instead of inheriting 60 s / 300 s.
226 const PauseCaps dem = default_pause_caps(4, true);
227 CHECK(dem.active_us == 4'000ull && dem.max_us == 16'000ull);
228 GateTimeoutState dem_active;
229 dem_active.reset(4'000, dem.active_us, dem.max_us);
230 CHECK(!dem_active.advance(4'000, PauseReason::active_work)); // absorbs 4 ms cap
231 CHECK(dem_active.active_paused_us == 4'000 && dem_active.elapsed_us == 0);
232 CHECK(!dem_active.advance(3'999, PauseReason::active_work));
233 CHECK(dem_active.advance(1, PauseReason::active_work)); // expires at 8 ms total, not 60 s!
234
235 GateTimeoutState dem_prod;
236 dem_prod.reset(4'000, dem.active_us, dem.max_us);
237 CHECK(!dem_prod.advance(16'000, PauseReason::matching_producer));
238 CHECK(dem_prod.total_paused_us == 16'000 && dem_prod.elapsed_us == 0);
239 CHECK(dem_prod.advance(4'000, PauseReason::matching_producer)); // expires at 20 ms total
240
241 // Normal gate active_work cap (5 s) vs larger max cap (20 s).
242 GateTimeoutState t;
243 t.reset(200'000, 5'000'000, 20'000'000);
244 for (int i = 0; i < 5; ++i) CHECK(!t.advance(1'000'000, PauseReason::active_work));
245 CHECK(t.active_paused_us == 5'000'000 && t.total_paused_us == 5'000'000 && t.elapsed_us == 0 && t.paused_ever);
246 CHECK(!t.advance(199'000, PauseReason::active_work));
247 CHECK(t.advance(1'000, PauseReason::active_work));
248 CHECK(t.elapsed_us == 200'000);
249
250 // Stuck matching_producer + alternating releaser_busy share total_paused_us <= max_pause_cap_us.
251 GateTimeoutState stuck;
252 stuck.reset(200'000, 2'000'000, 10'000'000);
253 CHECK(!stuck.advance(2'000'000, PauseReason::active_work)); // total = 2 s
254 CHECK(!stuck.advance(5'000'000, PauseReason::matching_producer)); // total = 7 s
255 CHECK(!stuck.advance(3'100'000, PauseReason::releaser_busy)); // 3 s paused (hits 10 s cap), 100 ms elapsed
256 CHECK(stuck.total_paused_us == 10'000'000 && stuck.elapsed_us == 100'000);
257 CHECK(!stuck.advance(99'999, PauseReason::matching_producer));
258 CHECK(stuck.advance(1, PauseReason::matching_producer));
259 CHECK(stuck.elapsed_us == 200'000);
260
261 // Partial step straddling active_pause_cap_us splits cleanly between active_paused_us and elapsed_us.
262 GateTimeoutState t2;
263 t2.reset(200'000, 500'000, 1'000'000);
264 CHECK(!t2.advance(600'000, PauseReason::active_work)); // 500k paused, 100k elapsed
265 CHECK(t2.active_paused_us == 500'000 && t2.total_paused_us == 500'000 && t2.elapsed_us == 100'000);
266 CHECK(t2.advance(100'000, PauseReason::active_work));
267
268 // active_cap > max_cap is clamped to max_cap by reset().
269 GateTimeoutState clamped;
270 clamped.reset(100'000, 9'000'000, 3'000'000);
271 CHECK(clamped.active_pause_cap_us == 3'000'000 && clamped.max_pause_cap_us == 3'000'000);
272 }
273
274 // 10. Overflow-safe address / dt_us guards and zero-dt paused tick.
275 {
276 const WaitPredicate overflow_wait[] = {{UINT64_MAX - 2, 1, 7, true}};
277 const PendingWrite overflow_write[] = {{UINT64_MAX - 2, 1, 8, false}};
278 const PendingWriteGroup groups[] = {{q2, 0, overflow_write}};
279 const PendingGate gates[] = {{q1, 1, false, overflow_wait}};
280 // Write doesn't match due to address wrap guard, falls back to active_work for the unblocked group.
281 CHECK(pause_reason(false, groups, gates, 0, test_met) == PauseReason::active_work);
282
283 GateTimeoutState t;
284 t.reset(1000, 0, 0);
285 CHECK(t.advance(UINT64_MAX, PauseReason::none));
286 CHECK(t.elapsed_us == UINT64_MAX);
287
288 GateTimeoutState z;
289 z.reset(0, 1000, 1000);
290 CHECK(!z.advance(0, PauseReason::releaser_busy));
291 CHECK(!z.paused_ever);
292 }
293
294 // 11. Mock Pump tick loop driving start_gate + pause_reason + GateTimeoutState end-to-end across 1 ms steps.
295 {
296 // (a) 200 ms gate held while releaser runs a 110 s pipeline build, then producer lands at 110.5 s: met!
297 const WaitPredicate waits[] = {{0x9000, 7, 7, true}};
298 const PendingWrite prod_write[] = {{0x9000, 7, 8, false}};
299 const PendingWriteGroup prod_groups[] = {{q2, 0, prod_write}};
300 const PendingGate gates[] = {{q1, 1, false, waits}};
301
302 GateTimeoutState gate;
303 const PauseCaps full_caps = default_pause_caps(200, false);
304 gate.reset(200'000, full_caps.active_us, full_caps.max_us);
305 for (int ms = 0; ms < 110'000; ++ms) {
306 const PauseReason r = pause_reason(true, prod_groups, gates, 0, test_met);
307 CHECK(r == PauseReason::releaser_busy && !gate.advance(1'000, r));
308 }
309 for (int ms = 0; ms < 500; ++ms) {
310 const PauseReason r = pause_reason(false, prod_groups, gates, 0, test_met);
311 CHECK(r == PauseReason::matching_producer && !gate.advance(1'000, r));
312 }
313 CHECK(gate.elapsed_us == 0 && gate.total_paused_us == 110'500'000ull);
314
315 // (b) Same gate with a matching producer stuck behind an untracked title fence wait: expires at 300.2 s!
316 GateTimeoutState stuck_gate;
317 stuck_gate.reset(200'000, full_caps.active_us, full_caps.max_us);
318 int expired_at_ms = -1;
319 for (int ms = 1; ms <= 305'000; ++ms) {
320 const PauseReason r = pause_reason(false, prod_groups, gates, 0, test_met);
321 if (stuck_gate.advance(1'000, r)) {
322 expired_at_ms = ms;
323 break;
324 }
325 }
326 CHECK(expired_at_ms == 300'200);
327
328 // (c) Demoted gate (4 ms budget) with continuous unrelated GPU work on q2: expires at 8 ms!
329 const PendingWrite unrelated[] = {{0xA000, 1, 8, false}};
330 const PendingWriteGroup unrel_groups[] = {{q2, 0, unrelated}};
331 GateTimeoutState dem_gate;
332 const PauseCaps dem_caps = default_pause_caps(4, true);
333 dem_gate.reset(4'000, dem_caps.active_us, dem_caps.max_us);
334 int dem_expired_ms = -1;
335 for (int ms = 1; ms <= 100; ++ms) {
336 const PauseReason r = pause_reason(false, unrel_groups, gates, 0, test_met);
337 CHECK(r == PauseReason::active_work);
338 if (dem_gate.advance(1'000, r)) {
339 dem_expired_ms = ms;
340 break;
341 }
342 }
343 CHECK(dem_expired_ms == 8);
344 }
345
346 std::printf("list_value_wait_budget_test: all checks passed\n");
347 return 0;
348}
diff --git a/runtime/test/memory_breakdown_test.cpp b/runtime/test/memory_breakdown_test.cpp
new file mode 100644
index 000000000..d27a1166d
--- /dev/null
+++ b/runtime/test/memory_breakdown_test.cpp
@@ -0,0 +1,118 @@
1// leonida::memory_breakdown (src/memory_breakdown.h): the mem probe's breakdown line. The tally of synthetic
2// allocations by consumer adds up to the allocated total, an Owner scope names the allocations made under it and
3// nests, an image's usage picks its kind, and the text names every part. No GPU, no device.
4#include "../src/memory_breakdown.h"
5
6#include <cstdint>
7#include <cstdio>
8#include <string>
9#include <thread>
10
11#define EXPECT(condition) do { \
12 if (!(condition)) { std::fprintf(stderr, "line %d: %s\n", __LINE__, #condition); return 1; } \
13} while (0)
14
15namespace {
16
17namespace mb = leonida::memory_breakdown;
18constexpr std::uint64_t kMiB = 1 << 20;
19
20bool contains(const std::string& text, const char* part) { return text.find(part) != std::string::npos; }
21
22// The parts add up to the total, imported memory stays out of it, and an unknown consumer counts as other.
23int tally() {
24 mb::Tally t;
25 t.add(mb::Consumer::arena, 4095 * kMiB, false);
26 t.add(mb::Consumer::geometry, 4 * kMiB, false);
27 t.add(mb::Consumer::geometry, 4 * kMiB, false);
28 t.add(mb::Consumer::sampled, 3 * kMiB, false);
29 t.add(mb::Consumer::render_target, 8 * kMiB, false);
30 t.add(mb::Consumer::other, 1 * kMiB, false);
31 t.add(mb::Consumer::count, 2 * kMiB, false); // out of range: other
32 t.add(mb::Consumer::windows, 6 * kMiB, true); // imported: not allocated by us
33 EXPECT(t.total() == (4095 + 8 + 3 + 8 + 1 + 2) * kMiB);
34 EXPECT(t.bytes[std::size_t(mb::Consumer::geometry)] == 8 * kMiB);
35 EXPECT(t.count[std::size_t(mb::Consumer::geometry)] == 2);
36 EXPECT(t.bytes[std::size_t(mb::Consumer::other)] == 3 * kMiB);
37 EXPECT(t.count[std::size_t(mb::Consumer::other)] == 2);
38 EXPECT(t.bytes[std::size_t(mb::Consumer::windows)] == 0);
39 EXPECT(t.imported_bytes == 6 * kMiB && t.imported_count == 1);
40 std::uint64_t sum = 0;
41 for (std::size_t i = 0; i < mb::kConsumers; ++i) sum += t.bytes[i];
42 EXPECT(sum == t.total());
43 return 0;
44}
45
46// An Owner scope names this thread's allocations, nests, restores the outer name, and does not leak to other threads.
47int owner_scopes() {
48 EXPECT(mb::current_owner() == mb::Consumer::other);
49 {
50 mb::Owner outer(mb::Consumer::geometry);
51 EXPECT(mb::current_owner() == mb::Consumer::geometry);
52 {
53 mb::Owner inner(mb::Consumer::staging);
54 EXPECT(mb::current_owner() == mb::Consumer::staging);
55 mb::Consumer seen = mb::Consumer::count;
56 std::thread([&] { seen = mb::current_owner(); }).join();
57 EXPECT(seen == mb::Consumer::other);
58 }
59 EXPECT(mb::current_owner() == mb::Consumer::geometry);
60 }
61 EXPECT(mb::current_owner() == mb::Consumer::other);
62 return 0;
63}
64
65// Colour and depth/stencil attachments are render targets; anything else bound alone is a sampled texture.
66int image_kinds() {
67 const std::uint32_t sampled = 0x4, transfer_dst = 0x2, storage = 0x8;
68 EXPECT(mb::image_consumer(sampled | transfer_dst) == mb::Consumer::sampled);
69 EXPECT(mb::image_consumer(storage) == mb::Consumer::sampled);
70 EXPECT(mb::image_consumer(sampled | mb::kColorAttachment) == mb::Consumer::render_target);
71 EXPECT(mb::image_consumer(mb::kDepthStencilAttachment) == mb::Consumer::render_target);
72 return 0;
73}
74
75// The text: the total first, every consumer with its MiB and count, the arena's reserved/bound/in-use bytes, other
76// last, and what lies outside the total.
77int text() {
78 mb::Tally t;
79 t.add(mb::Consumer::arena, 4095 * kMiB, false);
80 t.add(mb::Consumer::geometry, 3867 * kMiB, false);
81 t.add(mb::Consumer::render_target, 1180 * kMiB, false);
82 t.add(mb::Consumer::other, 819 * kMiB, false);
83 t.add(mb::Consumer::other, 206 * kMiB, true);
84 mb::DeviceShare share;
85 share.arena = true;
86 share.arena_reserved = share.arena_bound = 4095 * kMiB;
87 share.arena_in_use = 757 * kMiB;
88 share.arena_use = {500 * kMiB, 171 * kMiB, 80 * kMiB, 6 * kMiB};
89 share.bindless_table_bytes = 2 * kMiB;
90 const std::string line = mb::format(t, share, 12 * kMiB);
91 std::fprintf(stderr, "%s\n", line.c_str());
92 EXPECT(line.rfind("allocated 9961 MiB = arena 4095 (1) [reserved 4095, bound 4095, in use 757: buffers 500, "
93 "descriptor heaps 171, shader code 80, heaps 6]",
94 0) == 0);
95 EXPECT(contains(line, " + geometry copies 3867 (1)"));
96 EXPECT(contains(line, " + title windows and shadows 0 (0)"));
97 EXPECT(contains(line, " + upload heaps 0 (0) + staging 0 (0) + texture blocks 0 (0) + sampled textures 0 (0)"));
98 EXPECT(contains(line, " + render targets and depth 1180 (1) + other 819 (1);"));
99 EXPECT(contains(line, "imported 206 MiB (1)"));
100 EXPECT(contains(line, "bindless tables 2 MiB"));
101 EXPECT(contains(line, "shader modules 12 MiB SPIR-V"));
102 // Without an arena the bracket is left out.
103 const std::string bare = mb::format(t, mb::DeviceShare{}, 0);
104 EXPECT(!contains(bare, "reserved"));
105 EXPECT(contains(bare, "arena 4095 (1) + geometry copies"));
106 return 0;
107}
108
109} // namespace
110
111int main() {
112 if (int r = tally()) return r;
113 if (int r = owner_scopes()) return r;
114 if (int r = image_kinds()) return r;
115 if (int r = text()) return r;
116 std::fprintf(stderr, "memory_breakdown: ok\n");
117 return 0;
118}
diff --git a/runtime/test/pipeline_cache_store_test.cpp b/runtime/test/pipeline_cache_store_test.cpp
index dbf174768..7af94bca6 100644
--- a/runtime/test/pipeline_cache_store_test.cpp
+++ b/runtime/test/pipeline_cache_store_test.cpp
@@ -40,6 +40,14 @@ static int test_limit() {
40 CHECK(!limit.valid); 40 CHECK(!limit.valid);
41 CHECK(limit.bytes == default_save_limit); 41 CHECK(limit.bytes == default_save_limit);
42 } 42 }
43 // The limit counts what a session adds to an offline seed, not the seed the driver hands back with it.
44 constexpr std::size_t gib = std::size_t{1} << 30;
45 CHECK(!store::over_save_limit(3 * gib, 0, 4 * gib));
46 CHECK(store::over_save_limit(5 * gib, 0, 4 * gib));
47 CHECK(!store::over_save_limit(10 * gib, 9 * gib, 4 * gib)); // a 9 GB seed plus 1 GB of new builds is saved
48 CHECK(store::over_save_limit(14 * gib, 9 * gib, 4 * gib)); // 5 GB added is over 4
49 CHECK(!store::over_save_limit(4 * gib, 9 * gib, 1)); // smaller than the seed: nothing added
50 CHECK(!store::over_save_limit(4 * gib + 1, 1, 4 * gib)); // exactly at the limit once the seed is taken off
43 return 0; 51 return 0;
44} 52}
45 53
diff --git a/runtime/test/shaders/check.py b/runtime/test/shaders/check.py
index 39a3179a4..987a4eb53 100644
--- a/runtime/test/shaders/check.py
+++ b/runtime/test/shaders/check.py
@@ -128,7 +128,9 @@ CS_DPP = [("cs_dpp", [1, 0, 3, 2, 5, 4, 7, 6]),
128 ("cs_dpp_bank", [0xffffffff, 0xfffffffe, 0xfffffffd, 0xfffffffc, 7, 7, 7, 7]), 128 ("cs_dpp_bank", [0xffffffff, 0xfffffffe, 0xfffffffd, 0xfffffffc, 7, 7, 7, 7]),
129 ("cs_dpp_fi", [1, 2, 3, 0x7777, 5, 6, 7, 0x7777]), 129 ("cs_dpp_fi", [1, 2, 3, 0x7777, 5, 6, 7, 0x7777]),
130 # a VOPC compare with a DPP src0: 1 for the pair compare, 2 for the dpp8 one (cs_dpp_cmp.asm header) 130 # a VOPC compare with a DPP src0: 1 for the pair compare, 2 for the dpp8 one (cs_dpp_cmp.asm header)
131 ("cs_dpp_cmp", [3, 2, 3, 2, 1, 0, 1, 0])] 131 ("cs_dpp_cmp", [3, 2, 3, 2, 1, 0, 1, 0]),
132 # v_cmpx with a DPP src0: 1 where the plain compare keeps the lane, 2 for the negated one (cs_dpp_cmpx.asm)
133 ("cs_dpp_cmpx", [1, 1, 0, 0, 3, 3, 2, 2])]
132WAVE32_DUMPS += tuple(n for n, _ in CS_DPP) 134WAVE32_DUMPS += tuple(n for n, _ in CS_DPP)
133WAVE32_LANE_DUMPS += tuple(n for n, _ in CS_DPP) 135WAVE32_LANE_DUMPS += tuple(n for n, _ in CS_DPP)
134CS_DUMPS = [*CS_DPP, ("cs_smem_vcc_base", CS_SMEM_VCC), ("cs_store", CS_STORE), ("cs_smem_soffset_imm", CS_SMEM), 136CS_DUMPS = [*CS_DPP, ("cs_smem_vcc_base", CS_SMEM_VCC), ("cs_store", CS_STORE), ("cs_smem_soffset_imm", CS_SMEM),
diff --git a/runtime/test/shaders/cs_address_guard.asm b/runtime/test/shaders/cs_address_guard.asm
new file mode 100644
index 000000000..fad068a66
--- /dev/null
+++ b/runtime/test/shaders/cs_address_guard.asm
@@ -0,0 +1,57 @@
1; group: 1,1,1
2; rsrc2: 0x8090
3; regen_fixtures: this source has a translator fixture in tests/semantic/fixtures/disasm
4; The address guard (rdna2spirv.py --address-guard; docs/d3d12_vulkan.md, "Address guard"). Translated with the guard,
5; run by scripts/run_address_guard_gpu_test.py on a 2 MiB heap whose page table (built by that script) backs the
6; arena (offsets below 0x80000, the header's limit) and the one 4 KiB page at 0x90000, and nothing else. The heap's
7; real memory continues past both, so every address below is inside the buffer: with the guard off the same program
8; reads and writes it, with the guard on the page table refuses the accesses outside 0x90000..0x90fff. Seeds:
9; 0x90000 0xa11ce000 0x90004 0xa11ce004 0x90ffc 0xf00df00d 0x91000 0xf00df00e
10; 0xa0000 0xbadbad00 0xa0004 0xbadbad04 0xa0008 0xbadbad08
11; Words stored to out[0..7] with the guard on (off: the second value):
12; out[0] global_load_dword at 0x90000, a backed page outside the arena = 0xa11ce000 (0xa11ce000)
13; out[1] global_load_dword at 0xa0000, unbacked = 0 (0xbadbad00)
14; out[2] global_atomic_add glc at 0xa0008 with 1, unbacked: the old value = 0 (0xbadbad08)
15; out[3] global_load_dwordx2 at 0x90ffc: its last byte is on an unbacked page, so all of it is refused
16; = 0 (0xf00df00d)
17; out[4] its second dword = 0 (0xf00df00e)
18; out[5] buffer_load_dword through a V# built in SGPRs, base 0xa0000 = 0 (0xbadbad00)
19; out[6] s_load_dword at 0x90004, backed = 0xa11ce004 (0xa11ce004)
20; out[7] s_load_dword at 0xa0000, unbacked = 0 (0xbadbad00)
21; global_store_dword 0x5707 at 0xa0004 (unbacked) goes to the dump area (0x78004) instead, and the atomic to 0x78008;
22; the six refused accesses count themselves at header + 24 (0x70018) and the last one's offset is at 0x70020.
23; Run: VKC_HEAP_INIT=<heap> VKC_OUT_WORDS=524288 VKC_DUMP=<file> vk_compute_test cs_address_guard.spv 1 dump
24v_mov_b32_e32 v0, 0x90000
25v_mov_b32_e32 v1, 0
26global_load_dword v2, v[0:1], off
27v_mov_b32_e32 v0, 0xa0000
28global_load_dword v3, v[0:1], off
29v_mov_b32_e32 v4, 0x5707
30global_store_dword v[0:1], v4, off offset:4
31v_mov_b32_e32 v5, 1
32global_atomic_add v5, v[0:1], v5, off offset:8 glc
33v_mov_b32_e32 v0, 0x90ffc
34global_load_dwordx2 v[6:7], v[0:1], off
35s_mov_b32 s4, 0xa0000
36s_mov_b32 s5, 0
37s_mov_b32 s6, 0x100
38s_mov_b32 s7, 0x31016fac
39v_mov_b32_e32 v8, 0
40buffer_load_dword v8, v8, s[4:7], 0 offen
41s_mov_b32 s8, 0x90000
42s_mov_b32 s9, 0
43s_load_dword s10, s[8:9], 0x4
44s_load_dword s11, s[4:5], 0x0
45s_waitcnt vmcnt(0) lgkmcnt(0)
46v_mov_b32_e32 v9, 0
47buffer_store_dword v2, v9, s[0:3], 0 offen
48buffer_store_dword v3, v9, s[0:3], 0 offen offset:4
49buffer_store_dword v5, v9, s[0:3], 0 offen offset:8
50buffer_store_dword v6, v9, s[0:3], 0 offen offset:12
51buffer_store_dword v7, v9, s[0:3], 0 offen offset:16
52buffer_store_dword v8, v9, s[0:3], 0 offen offset:20
53v_mov_b32_e32 v10, s10
54buffer_store_dword v10, v9, s[0:3], 0 offen offset:24
55v_mov_b32_e32 v11, s11
56buffer_store_dword v11, v9, s[0:3], 0 offen offset:28
57s_endpgm
diff --git a/runtime/test/shaders/cs_dpp_cmpx.asm b/runtime/test/shaders/cs_dpp_cmpx.asm
new file mode 100644
index 000000000..85f18c93f
--- /dev/null
+++ b/runtime/test/shaders/cs_dpp_cmpx.asm
@@ -0,0 +1,24 @@
1; v_cmpx in DPP form (SHADER-VOPCX-DPP): src0 is read from the permuted lane, src1 from the lane itself, and the result
2; goes to EXEC. v1 = float(lane - 4). Both compares take src0 from the other half of each quad (quad_perm [2,3,0,1],
3; with bound_ctrl:1 and fi:1, the form the game's pixel shaders use). The first keeps a lane where
4; "neighbour > self": lanes 0, 1, 4, 5 of each 8. The second negates src1 ("neighbour > -self"): lanes 4-7 of the first
5; 8 and every lane after. out = (first keeps the lane ? 1 : 0) + (second keeps it ? 2 : 0), EXEC restored in between.
6; Run: vk_compute_test cs_dpp_cmpx.spv 1 dump -> out[0..7] = 1 1 0 0 3 3 2 2
7; llvm-mc assembles neither compare for gfx1013 ("dpp variant of this instruction is not supported"), so the GPU
8; test takes this file's text as its listing; tools/shader_disasm.py prints the same lines for the encoded words.
9; run_gpu_tests: text only, llvm-mc has no gfx1013 encoding for an instruction here
10; regen_fixtures: this source has a translator fixture in tests/semantic/fixtures/disasm
11v_mbcnt_lo_u32_b32 v0, -1, 0
12v_add_nc_u32 v7, -4, v0
13v_cvt_f32_i32 v1, v7
14v_mov_b32 v6, 0
15s_mov_b32 s10, exec_lo
16v_cmpx_gt_f32_dpp v1, v1 quad_perm:[2,3,0,1] row_mask:0xf bank_mask:0xf bound_ctrl:1 fi:1
17v_mov_b32 v6, 1
18s_mov_b32 exec_lo, s10
19v_cmpx_gt_f32_dpp v1, -v1 quad_perm:[2,3,0,1] row_mask:0xf bank_mask:0xf bound_ctrl:1 fi:1
20v_add_nc_u32 v6, 2, v6
21s_mov_b32 exec_lo, s10
22v_lshlrev_b32 v2, 2, v0
23buffer_store_dword v6, v2, s[0:3], 0 offen
24s_endpgm
diff --git a/runtime/test/shadow_keep_test.cpp b/runtime/test/shadow_keep_test.cpp
new file mode 100644
index 000000000..87960c0a2
--- /dev/null
+++ b/runtime/test/shadow_keep_test.cpp
@@ -0,0 +1,141 @@
1// src/shadow_keep.h: a shadow copy keeps a GPU write until the title's bytes under it change. No Windows headers, no
2// GPU, no game data: the "title" and its "copy" are arrays here, and the values are made up.
3#include "../src/shadow_keep.h"
4
5#include <cstdint>
6#include <cstdio>
7#include <cstring>
8#include <utility>
9#include <vector>
10
11namespace {
12
13int failures = 0;
14#define EXPECT(condition) \
15 do { \
16 if (!(condition)) { \
17 std::fprintf(stderr, "FAIL line %d: %s\n", __LINE__, #condition); \
18 ++failures; \
19 } \
20 } while (0)
21
22using leonida::shadow_keep::kPiece;
23
24// A title range and its copy, as ShadowPages has them: the copy of the title byte at address a is copy[a - base].
25struct Pages {
26 static constexpr std::uintptr_t base = 0x10000; // kPiece-aligned, like a tracker's first page
27 std::vector<std::uint8_t> title, copy;
28 std::vector<std::uint64_t> sums;
29 std::vector<std::pair<std::uintptr_t, std::uintptr_t>> copied; // the ranges the last refresh copied
30
31 explicit Pages(std::size_t bytes) : title(bytes), copy(bytes), sums(bytes / kPiece) {
32 for (std::size_t i = 0; i < bytes; ++i) title[i] = std::uint8_t(i * 7 + 3);
33 }
34 // A refresh of [va, va + n): what ShadowPages::copy_changed does for one page.
35 std::size_t refresh(std::uintptr_t va, std::size_t n) {
36 copied.clear();
37 std::size_t bytes = 0;
38 leonida::shadow_keep::copy_changed(
39 title.data() + (va - base), va, n, sums.data(), base,
40 [&](std::uintptr_t from, std::uintptr_t to, const std::uint8_t* source) {
41 std::memcpy(copy.data() + (from - base), source, to - from);
42 copied.emplace_back(from, to);
43 bytes += to - from;
44 });
45 return bytes;
46 }
47 std::size_t refresh() { return refresh(base, title.size()); }
48 bool same(std::size_t from, std::size_t to) const {
49 return !std::memcmp(title.data() + from, copy.data() + from, to - from);
50 }
51};
52
53void unchanged_title_keeps_gpu_write() {
54 Pages p(4096);
55 EXPECT(p.refresh() == 4096); // nothing known yet: all of it
56 EXPECT(p.same(0, 4096));
57 EXPECT(p.refresh() == 0); // nothing changed
58 // A shader stores 16 bytes in the copy; the title's bytes there stay as they were.
59 const std::uint8_t gpu[16] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16};
60 std::memcpy(p.copy.data() + 0x340, gpu, sizeof(gpu));
61 EXPECT(p.refresh() == 0);
62 EXPECT(!std::memcmp(p.copy.data() + 0x340, gpu, sizeof(gpu))); // kept: the old code overwrote it here
63 EXPECT(p.same(0, 0x340) && p.same(0x350, 4096));
64}
65
66void changed_title_piece_is_copied() {
67 Pages p(4096);
68 p.refresh();
69 const std::uint8_t gpu[16] = {0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA,
70 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA, 0xAA};
71 std::memcpy(p.copy.data() + 0x340, gpu, sizeof(gpu)); // GPU write in piece 3
72 std::memcpy(p.copy.data() + 0x800, gpu, sizeof(gpu)); // and in piece 8
73 p.title[0x810] ^= 0x5A; // the title writes piece 8
74 EXPECT(p.refresh() == kPiece);
75 EXPECT(p.copied.size() == 1 && p.copied[0].first == Pages::base + 0x800 &&
76 p.copied[0].second == Pages::base + 0x900);
77 EXPECT(p.same(0x800, 0x900)); // the title's new bytes win there
78 EXPECT(!std::memcmp(p.copy.data() + 0x340, gpu, sizeof(gpu))); // the other GPU write stays
79 EXPECT(p.refresh() == 0);
80}
81
82void partial_first_and_last_pieces() {
83 Pages p(4096);
84 // A target that starts and ends inside pieces: [base + 100, base + 1000).
85 const std::uintptr_t va = Pages::base + 100;
86 const std::size_t n = 900;
87 EXPECT(p.refresh(va, n) == n);
88 EXPECT(p.copied.size() == 4);
89 EXPECT(p.copied.front().first == va && p.copied.front().second == Pages::base + kPiece);
90 EXPECT(p.copied.back().first == Pages::base + 3 * kPiece && p.copied.back().second == va + n);
91 EXPECT(p.same(100, 1000));
92 EXPECT(p.copy[99] == 0 && p.copy[1000] == 0); // nothing outside the range
93 EXPECT(p.refresh(va, n) == 0);
94 p.title[999] ^= 1; // last byte of the last, partial piece
95 EXPECT(p.refresh(va, n) == 1000 - 3 * kPiece);
96 p.title[100] ^= 1; // first byte of the first, partial piece
97 EXPECT(p.refresh(va, n) == kPiece - 100);
98 EXPECT(p.same(100, 1000));
99}
100
101void forgotten_sums_copy_once() {
102 Pages p(4096);
103 p.refresh();
104 // The pages were not committed for a refresh: the copies were zeroed and their sums forgotten.
105 std::memset(p.copy.data() + 0x400, 0, 0x200);
106 leonida::shadow_keep::forget(p.sums.data(), Pages::base, Pages::base + 0x400, Pages::base + 0x600);
107 EXPECT(p.refresh() == 0x200); // the same title bytes back: copied once all the same
108 EXPECT(p.same(0, 4096));
109 EXPECT(p.refresh() == 0);
110 // A partial range forgets every piece it touches.
111 leonida::shadow_keep::forget(p.sums.data(), Pages::base, Pages::base + 0x410, Pages::base + 0x501);
112 EXPECT(p.refresh() == 0x200);
113}
114
115void sums_tell_bytes_apart() {
116 std::uint8_t a[kPiece] = {}, b[kPiece] = {};
117 EXPECT(leonida::shadow_keep::sum_of(a, kPiece) != 0);
118 EXPECT(leonida::shadow_keep::sum_of(a, kPiece) == leonida::shadow_keep::sum_of(b, kPiece));
119 for (std::size_t i = 0; i < kPiece; ++i) {
120 b[i] = 1;
121 EXPECT(leonida::shadow_keep::sum_of(a, kPiece) != leonida::shadow_keep::sum_of(b, kPiece));
122 b[i] = 0;
123 }
124 EXPECT(leonida::shadow_keep::sum_of(a, 16) != leonida::shadow_keep::sum_of(a, 17)); // the length counts
125}
126
127} // namespace
128
129int main() {
130 unchanged_title_keeps_gpu_write();
131 changed_title_piece_is_copied();
132 partial_first_and_last_pieces();
133 forgotten_sums_copy_once();
134 sums_tell_bytes_apart();
135 if (failures) {
136 std::fprintf(stderr, "shadow_keep: %d check(s) failed\n", failures);
137 return 1;
138 }
139 std::puts("shadow_keep: OK");
140 return 0;
141}
diff --git a/runtime/test/title_memory_map_test.cpp b/runtime/test/title_memory_map_test.cpp
index ba5a518a1..ff226d648 100644
--- a/runtime/test/title_memory_map_test.cpp
+++ b/runtime/test/title_memory_map_test.cpp
@@ -7,7 +7,8 @@
7// 3. a reader further behind than the journal holds is told so (it then looks at everything); 7// 3. a reader further behind than the journal holds is told so (it then looks at everything);
8// 4. a change with no range overlaps every reader; 8// 4. a change with no range overlaps every reader;
9// 5. TextureReadability keeps a positive answer, when asked to, until a retry; 9// 5. TextureReadability keeps a positive answer, when asked to, until a retry;
10// 6. a pass over 20,000 waiting textures probes only those under the one mapped block. 10// 6. a pass over 20,000 waiting textures probes only those under the one mapped block;
11// 7. between passes, sync_map retries only when a map change overlaps the texture's footprint.
11#include <windows.h> 12#include <windows.h>
12 13
13#include <cstdint> 14#include <cstdint>
@@ -142,6 +143,48 @@ int main() {
142 check(pass() == 4 && probes == 0, "a pass with no change probes nothing"); 143 check(pass() == 4 && probes == 0, "a pass with no change probes nothing");
143 } 144 }
144 145
146 // 7. Synchronous view checks between passes (sync_map): unrelated map changes cost no probe, an overlapping unmap
147 // defers without reading, and an overlapping map wakes a waiting texture before the next pass.
148 {
149 constexpr std::uintptr_t cpu = kBase + 0x20000000;
150 constexpr std::uint64_t size = 512 * 1024;
151 const std::uint64_t pass_generation = map::generation();
152 bool mapped = true;
153 unsigned probes = 0;
154 leonida::TextureReadability r;
155 const auto probe = [&] {
156 ++probes;
157 return mapped;
158 };
159 check(r.check(0, true, probe, true) && probes == 1 && !r.pending(),
160 "sync_map: initial probe caches a readable answer");
161 for (std::uintptr_t i = 0; i < 32; ++i)
162 map::changed(cpu + size + i * 0x10000, cpu + size + (i + 1) * 0x10000);
163 r.sync_map(pass_generation, cpu, size);
164 check(r.check(0, true, probe, true) && probes == 1,
165 "sync_map: map changes outside the footprint keep the cached answer");
166 r.sync_map(pass_generation, cpu, size);
167 check(r.check(0, true, probe, true) && probes == 1,
168 "sync_map: a second check at the same generation does nothing");
169
170 mapped = false;
171 map::changed(cpu + 0x10000, cpu + 0x20000);
172 r.sync_map(pass_generation, cpu, size);
173 check(!r.check(0, true, probe, true) && r.pending() && probes == 2,
174 "sync_map: an overlapping unmap between passes reprobes and defers");
175
176 map::changed(cpu - 0x10000, cpu);
177 r.sync_map(pass_generation, cpu, size);
178 check(!r.check(0, true, probe, true) && r.pending() && probes == 2,
179 "sync_map: an adjacent non-overlapping change leaves a pending texture waiting");
180
181 mapped = true;
182 map::changed(cpu, cpu + size);
183 r.sync_map(pass_generation, cpu, size);
184 check(r.check(0, true, probe, true) && !r.pending() && probes == 3,
185 "sync_map: an overlapping map between passes wakes a pending texture at once");
186 }
187
145 std::printf("%d checks, %d failures\n", g_checks, g_failures); 188 std::printf("%d checks, %d failures\n", g_checks, g_failures);
146 return g_failures ? 1 : 0; 189 return g_failures ? 1 : 0;
147} 190}
diff --git a/runtime/test/title_va_alias_test.cpp b/runtime/test/title_va_alias_test.cpp
index f2f869391..6eadb4bea 100644
--- a/runtime/test/title_va_alias_test.cpp
+++ b/runtime/test/title_va_alias_test.cpp
@@ -85,29 +85,44 @@ int main() {
85 a.remove(title, arena); 85 a.remove(title, arena);
86 a.remove(title + 0x40000, 0x7000000); 86 a.remove(title + 0x40000, 0x7000000);
87 EXPECT(a.size() == 0); 87 EXPECT(a.size() == 0);
88 // Replacing part of an alias removes the entire old interval. Other heaps read independently. 88 // Every listener is told each change as it happens (the console heaps' slot records): an add, the whole old
89 std::uint64_t cursor = 0; 89 // interval when part of it is replaced, a removal, a copy forgotten and title memory added. None is dropped, however
90 leonida::DescriptorRanges past; 90 // many come (the 4,096-entry ring this replaced fell back to a full sweep), and a removed listener hears nothing.
91 EXPECT(a.changed_ranges(cursor, past)); 91 struct Heard {
92 auto second = cursor; 92 leonida::TitleVaAliases::Change change;
93 std::uint64_t title_va, bytes, shader_va;
94 };
95 std::vector<Heard> first, second;
96 const auto hear = [](void* to, leonida::TitleVaAliases::Change change, std::uint64_t va, std::uint64_t bytes,
97 std::uint64_t shader_va) {
98 static_cast<std::vector<Heard>*>(to)->push_back({change, va, bytes, shader_va});
99 };
100 using Change = leonida::TitleVaAliases::Change;
101 a.add_listener(&first, hear);
102 a.add_listener(&second, hear);
93 EXPECT(a.add(title, size, arena)); 103 EXPECT(a.add(title, size, arena));
94 EXPECT(a.add(title+16, 32, arena+4096)); 104 EXPECT(a.add(title + 16, 32, arena + 4096));
95 for (auto* reader : {&cursor, &second}) { 105 for (const auto* heard : {&first, &second}) {
96 leonida::DescriptorRanges delta; 106 EXPECT(heard->size() == 3);
97 EXPECT(a.changed_ranges(*reader, delta)); 107 EXPECT((*heard)[0].change == Change::added && (*heard)[0].title_va == title && (*heard)[0].bytes == size);
98 delta.merge(); 108 EXPECT((*heard)[1].change == Change::removed && (*heard)[1].title_va == title && (*heard)[1].bytes == size &&
99 EXPECT(delta.overlaps(title+size-1, 1) && delta.overlaps(title-16, 17)); 109 (*heard)[1].shader_va == arena);
100 EXPECT(!delta.overlaps(title+size, 1) && !delta.overlaps(title-16, 16)); 110 EXPECT((*heard)[2].change == Change::added && (*heard)[2].title_va == title + 16 &&
111 (*heard)[2].bytes == 32 && (*heard)[2].shader_va == arena + 4096);
101 } 112 }
102 leonida::DescriptorRangeChanges backing; 113 a.remove_listener(&second);
103 for (unsigned i = 0; i < 4097; ++i) backing.record(UINT64_MAX-3, 4); 114 a.remove(title + 16, arena + 4096);
104 cursor = 0; 115 a.forget_copy(title + 0x1000, 0x100, 0x5000000);
105 EXPECT(!backing.read(cursor, past)); 116 a.add_title_memory(0x30000000000ull, 0x2000);
106 backing.record(UINT64_MAX-3, 4); 117 EXPECT(second.size() == 3 && first.size() == 6);
107 leonida::DescriptorRanges last; 118 EXPECT(first[3].change == Change::removed && first[3].title_va == title + 16 && first[3].shader_va == arena + 4096);
108 EXPECT(backing.read(cursor,last)); 119 EXPECT(first[4].change == Change::removed && first[4].title_va == title + 0x1000 && first[4].bytes == 0x100 &&
109 last.merge(); 120 first[4].shader_va == 0x5000000);
110 EXPECT(last.overlaps(UINT64_MAX,1) && !last.overlaps(0,1)); 121 EXPECT(first[5].change == Change::memory_added && first[5].title_va == 0x30000000000ull && first[5].bytes == 0x2000);
122 a.remove_title_memory(0x30000000000ull);
123 for (unsigned i = 0; i < 5000; ++i) a.forget_copy(title, 4, arena);
124 EXPECT(first.size() == 5006);
125 a.remove_listener(&first);
111 // shader_side: whether an address is one the layer wrote for the title (inside some range's copy), so a scan that 126 // shader_side: whether an address is one the layer wrote for the title (inside some range's copy), so a scan that
112 // sees an already rewritten V# again leaves it alone rather than taking it for an unmapped address. 127 // sees an already rewritten V# again leaves it alone rather than taking it for an unmapped address.
113 EXPECT(!a.shader_side(arena)); 128 EXPECT(!a.shader_side(arena));
diff --git a/runtime/test/vk_bindless_dimensions_test.cpp b/runtime/test/vk_bindless_dimensions_test.cpp
new file mode 100644
index 000000000..3da8370d6
--- /dev/null
+++ b/runtime/test/vk_bindless_dimensions_test.cpp
@@ -0,0 +1,421 @@
1// More live images of each sampled dimension than 4096, through the bindless set 0 (src/vulkan_bindless.h), at the
2// Vulkan level, and the index allocator behind them.
3//
4// An image keeps its index in its dimension's array for as long as it lives, so the array of a dimension must hold
5// every live image of it a title has. A world run kept 4090 live 1D textures and filled the 4096 1D indices the set
6// once stopped at (bindless::size_bindings capped 1D and 3D at 4096 whatever the device held); every later 1D T# then
7// read the fallback's zeros. For 1D, 2D-array and 3D images alike this test sizes the set from the device's limits
8// as the D3D12 device does, gives 5000 distinct images (one texel each, holding its own number) an index each,
9// and has test/glsl/cs_bindless_dimensions.comp read every one of them through its index: each must read its own
10// number. Then, on the same set:
11// - the rest of the array is filled: the index after the last is refused, and image_refusal says the array of
12// that dimension is full (the D3D12 device's "unbound T#s by reason" line names that reason);
13// - an image removed while the table has no changes the GPU lacks gives its index back at once, and one removed
14// while it has (an erased key) gives it back at the next flush, not before.
15// Exit 77 without a Vulkan device with the bindless features or without the shader (no glslangValidator), and for
16// a dimension whose device limits hold fewer than 5000 images (the test says so).
17// LEONIDA_VK_VALIDATION=1 runs under VK_LAYER_KHRONOS_validation; a validation error fails the test.
18#ifndef VK_NO_PROTOTYPES
19#define VK_NO_PROTOTYPES
20#endif
21#include "vk_test_device.h"
22#include "shader_fixture_path.h"
23#include "../src/vulkan_bindless.h"
24
25#include <algorithm>
26#include <cstdio>
27#include <cstring>
28#include <fstream>
29#include <iterator>
30#include <vector>
31
32#define EXPECT(condition) \
33 do { \
34 if (!(condition)) { \
35 std::fprintf(stderr, "line %d: %s\n", __LINE__, #condition); \
36 return 1; \
37 } \
38 } while (0)
39
40namespace {
41
42using namespace leonida;
43
44constexpr std::uint32_t live_images = 5000; // more than the 4096 1D and 3D indices of the old sizes
45
46std::vector<std::uint32_t> load_spirv(const char* path) {
47 std::ifstream file(vktest::shader_fixture_path(path), std::ios::binary);
48 const std::vector<char> bytes{std::istreambuf_iterator<char>(file), {}};
49 std::vector<std::uint32_t> words(bytes.size() / 4);
50 if (!words.empty()) std::memcpy(words.data(), bytes.data(), words.size() * 4);
51 return words;
52}
53
54const char* name(ImageDimension dimension) {
55 return dimension == ImageDimension::dim_1d ? "1D" : dimension == ImageDimension::dim_2d_array ? "2D array" : "3D";
56}
57
58// The images of one dimension, `count` texels in all, each in its own image (3D) or array layer (1D, 2D array), and a
59// view of each: what the test reads through the set. Destroys what it made.
60struct Images {
61 vktest::Device& d;
62 std::vector<VkImage> images;
63 std::vector<VkDeviceMemory> memory;
64 std::vector<VkImageView> views;
65 struct Texel {
66 VkImage image;
67 std::uint32_t layer;
68 };
69 std::vector<Texel> texels;
70
71 explicit Images(vktest::Device& device) : d(device) {}
72 Images(const Images&) = delete;
73 Images& operator=(const Images&) = delete;
74 ~Images() {
75 for (const VkImageView view : views) d.fn<PFN_vkDestroyImageView>("vkDestroyImageView")(d.device, view, nullptr);
76 for (const VkImage image : images) d.fn<PFN_vkDestroyImage>("vkDestroyImage")(d.device, image, nullptr);
77 for (const VkDeviceMemory m : memory) d.fn<PFN_vkFreeMemory>("vkFreeMemory")(d.device, m, nullptr);
78 }
79
80 bool make(ImageDimension dimension, std::uint32_t count, std::uint32_t max_layers,
81 const VkPhysicalDeviceMemoryProperties& properties) {
82 const bool volume = dimension == ImageDimension::dim_3d;
83 const std::uint32_t per_image = volume ? 1 : std::min(max_layers, count);
84 // Images in groups that share one allocation (each a few MiB at most).
85 constexpr std::uint32_t group = 512;
86 for (std::uint32_t first = 0; first < count;) {
87 std::vector<VkImage> made;
88 std::uint32_t in_group = 0;
89 for (; in_group < group && first < count; ++in_group) {
90 VkImageCreateInfo info{VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO};
91 info.imageType = volume ? VK_IMAGE_TYPE_3D
92 : dimension == ImageDimension::dim_1d ? VK_IMAGE_TYPE_1D : VK_IMAGE_TYPE_2D;
93 info.format = VK_FORMAT_R32_SFLOAT;
94 info.extent = {1, 1, 1};
95 info.mipLevels = 1;
96 info.arrayLayers = std::min(per_image, count - first);
97 info.samples = VK_SAMPLE_COUNT_1_BIT;
98 info.usage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
99 VkImage image = VK_NULL_HANDLE;
100 if (d.fn<PFN_vkCreateImage>("vkCreateImage")(d.device, &info, nullptr, &image) != VK_SUCCESS)
101 return false;
102 images.push_back(image);
103 made.push_back(image);
104 for (std::uint32_t layer = 0; layer < info.arrayLayers; ++layer) texels.push_back({image, layer});
105 first += info.arrayLayers;
106 }
107 VkMemoryRequirements requirements{};
108 d.fn<PFN_vkGetImageMemoryRequirements>("vkGetImageMemoryRequirements")(d.device, made[0], &requirements);
109 const VkDeviceSize stride =
110 (requirements.size + requirements.alignment - 1) / requirements.alignment * requirements.alignment;
111 VkMemoryAllocateInfo allocation{VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO};
112 allocation.allocationSize = stride * made.size();
113 allocation.memoryTypeIndex = 0xffffffffu;
114 for (std::uint32_t t = 0; t < properties.memoryTypeCount; ++t)
115 if (requirements.memoryTypeBits & (1u << t)) {
116 allocation.memoryTypeIndex = t;
117 break;
118 }
119 VkDeviceMemory block = VK_NULL_HANDLE;
120 if (allocation.memoryTypeIndex == 0xffffffffu ||
121 d.fn<PFN_vkAllocateMemory>("vkAllocateMemory")(d.device, &allocation, nullptr, &block) != VK_SUCCESS)
122 return false;
123 memory.push_back(block);
124 for (std::size_t k = 0; k < made.size(); ++k) {
125 VkMemoryRequirements each{};
126 d.fn<PFN_vkGetImageMemoryRequirements>("vkGetImageMemoryRequirements")(d.device, made[k], &each);
127 if (each.size > stride || !(each.memoryTypeBits & (1u << allocation.memoryTypeIndex)) ||
128 d.fn<PFN_vkBindImageMemory>("vkBindImageMemory")(d.device, made[k], block, stride * k) !=
129 VK_SUCCESS)
130 return false;
131 }
132 }
133 for (const Texel& texel : texels) {
134 VkImageViewCreateInfo info{VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO};
135 info.image = texel.image;
136 info.viewType = volume ? VK_IMAGE_VIEW_TYPE_3D
137 : dimension == ImageDimension::dim_1d ? VK_IMAGE_VIEW_TYPE_1D : VK_IMAGE_VIEW_TYPE_2D_ARRAY;
138 info.format = VK_FORMAT_R32_SFLOAT;
139 info.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, texel.layer, 1};
140 VkImageView view = VK_NULL_HANDLE;
141 if (d.fn<PFN_vkCreateImageView>("vkCreateImageView")(d.device, &info, nullptr, &view) != VK_SUCCESS)
142 return false;
143 views.push_back(view);
144 }
145 return true;
146 }
147
148 // Texel i holds i + 1, in GENERAL (the layout the set's descriptors name).
149 void record_fill(VkCommandBuffer cb) const {
150 std::vector<VkImageMemoryBarrier> barriers;
151 for (const VkImage image : images) {
152 VkImageMemoryBarrier barrier{VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER};
153 barrier.dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
154 barrier.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
155 barrier.newLayout = VK_IMAGE_LAYOUT_GENERAL;
156 barrier.srcQueueFamilyIndex = barrier.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
157 barrier.image = image;
158 barrier.subresourceRange = {VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, VK_REMAINING_ARRAY_LAYERS};
159 barriers.push_back(barrier);
160 }
161 d.fn<PFN_vkCmdPipelineBarrier>("vkCmdPipelineBarrier")(cb, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT,
162 VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, nullptr, 0,
163 nullptr, std::uint32_t(barriers.size()), barriers.data());
164 for (std::size_t i = 0; i < texels.size(); ++i) {
165 VkClearColorValue value{};
166 value.float32[0] = float(i + 1);
167 const VkImageSubresourceRange range{VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, texels[i].layer, 1};
168 d.fn<PFN_vkCmdClearColorImage>("vkCmdClearColorImage")(cb, texels[i].image, VK_IMAGE_LAYOUT_GENERAL,
169 &value, 1, &range);
170 }
171 VkMemoryBarrier filled{VK_STRUCTURE_TYPE_MEMORY_BARRIER};
172 filled.srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
173 filled.dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
174 d.fn<PFN_vkCmdPipelineBarrier>("vkCmdPipelineBarrier")(cb, VK_PIPELINE_STAGE_TRANSFER_BIT,
175 VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT, 0, 1, &filled, 0,
176 nullptr, 0, nullptr);
177 }
178};
179
180// The compute pipeline over set 0 (the bindless set's layout) and set 1 (result and indices).
181struct Reader {
182 vktest::Device& d;
183 VkShaderModule module = VK_NULL_HANDLE;
184 VkDescriptorSetLayout set1_layout = VK_NULL_HANDLE;
185 VkDescriptorPool pool = VK_NULL_HANDLE;
186 VkDescriptorSet set1 = VK_NULL_HANDLE;
187 VkPipelineLayout layout = VK_NULL_HANDLE;
188 VkPipeline pipeline = VK_NULL_HANDLE;
189 void* result_map = nullptr;
190 void* index_map = nullptr;
191
192 explicit Reader(vktest::Device& device) : d(device) {}
193 Reader(const Reader&) = delete;
194 Reader& operator=(const Reader&) = delete;
195 ~Reader() {
196 const VkDevice dev = d.device;
197 if (pipeline) d.fn<PFN_vkDestroyPipeline>("vkDestroyPipeline")(dev, pipeline, nullptr);
198 if (layout) d.fn<PFN_vkDestroyPipelineLayout>("vkDestroyPipelineLayout")(dev, layout, nullptr);
199 if (pool) d.fn<PFN_vkDestroyDescriptorPool>("vkDestroyDescriptorPool")(dev, pool, nullptr);
200 if (set1_layout) d.fn<PFN_vkDestroyDescriptorSetLayout>("vkDestroyDescriptorSetLayout")(dev, set1_layout, nullptr);
201 if (module) d.fn<PFN_vkDestroyShaderModule>("vkDestroyShaderModule")(dev, module, nullptr);
202 }
203
204 bool make(VkDescriptorSetLayout set0_layout, const std::vector<std::uint32_t>& code) {
205 const VkDevice dev = d.device;
206 VkShaderModuleCreateInfo module_info{VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO};
207 module_info.codeSize = code.size() * 4;
208 module_info.pCode = code.data();
209 if (d.fn<PFN_vkCreateShaderModule>("vkCreateShaderModule")(dev, &module_info, nullptr, &module) != VK_SUCCESS)
210 return false;
211 const VkBuffer result = d.buffer(live_images * 4, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, &result_map);
212 const VkBuffer indices = d.buffer(live_images * 4, VK_BUFFER_USAGE_STORAGE_BUFFER_BIT, &index_map);
213 if (!result || !indices) return false;
214 const VkDescriptorSetLayoutBinding bindings[2] = {
215 {0, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr},
216 {1, VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1, VK_SHADER_STAGE_COMPUTE_BIT, nullptr}};
217 VkDescriptorSetLayoutCreateInfo set1_info{VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO};
218 set1_info.bindingCount = 2;
219 set1_info.pBindings = bindings;
220 if (d.fn<PFN_vkCreateDescriptorSetLayout>("vkCreateDescriptorSetLayout")(dev, &set1_info, nullptr,
221 &set1_layout) != VK_SUCCESS)
222 return false;
223 const VkDescriptorPoolSize pool_size{VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 2};
224 VkDescriptorPoolCreateInfo pool_info{VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO};
225 pool_info.maxSets = 1;
226 pool_info.poolSizeCount = 1;
227 pool_info.pPoolSizes = &pool_size;
228 if (d.fn<PFN_vkCreateDescriptorPool>("vkCreateDescriptorPool")(dev, &pool_info, nullptr, &pool) != VK_SUCCESS)
229 return false;
230 VkDescriptorSetAllocateInfo allocate{VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO};
231 allocate.descriptorPool = pool;
232 allocate.descriptorSetCount = 1;
233 allocate.pSetLayouts = &set1_layout;
234 if (d.fn<PFN_vkAllocateDescriptorSets>("vkAllocateDescriptorSets")(dev, &allocate, &set1) != VK_SUCCESS)
235 return false;
236 const VkDescriptorBufferInfo infos[2] = {{result, 0, VK_WHOLE_SIZE}, {indices, 0, VK_WHOLE_SIZE}};
237 VkWriteDescriptorSet writes[2]{};
238 for (std::uint32_t b = 0; b < 2; ++b) {
239 writes[b] = {VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET};
240 writes[b].dstSet = set1;
241 writes[b].dstBinding = b;
242 writes[b].descriptorCount = 1;
243 writes[b].descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
244 writes[b].pBufferInfo = &infos[b];
245 }
246 d.fn<PFN_vkUpdateDescriptorSets>("vkUpdateDescriptorSets")(dev, 2, writes, 0, nullptr);
247 const VkDescriptorSetLayout layouts[2] = {set0_layout, set1_layout};
248 const VkPushConstantRange push{VK_SHADER_STAGE_COMPUTE_BIT, 0, 8};
249 VkPipelineLayoutCreateInfo layout_info{VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO};
250 layout_info.setLayoutCount = 2;
251 layout_info.pSetLayouts = layouts;
252 layout_info.pushConstantRangeCount = 1;
253 layout_info.pPushConstantRanges = &push;
254 if (d.fn<PFN_vkCreatePipelineLayout>("vkCreatePipelineLayout")(dev, &layout_info, nullptr, &layout) !=
255 VK_SUCCESS)
256 return false;
257 VkComputePipelineCreateInfo pipeline_info{VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO};
258 pipeline_info.stage = {VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO};
259 pipeline_info.stage.stage = VK_SHADER_STAGE_COMPUTE_BIT;
260 pipeline_info.stage.module = module;
261 pipeline_info.stage.pName = "main";
262 pipeline_info.layout = layout;
263 return d.fn<PFN_vkCreateComputePipelines>("vkCreateComputePipelines")(dev, VK_NULL_HANDLE, 1, &pipeline_info,
264 nullptr, &pipeline) == VK_SUCCESS;
265 }
266
267 void record(VkCommandBuffer cb, VkDescriptorSet set0, std::uint32_t dimension, std::uint32_t count) const {
268 d.fn<PFN_vkCmdBindPipeline>("vkCmdBindPipeline")(cb, VK_PIPELINE_BIND_POINT_COMPUTE, pipeline);
269 const VkDescriptorSet sets[2] = {set0, set1};
270 d.fn<PFN_vkCmdBindDescriptorSets>("vkCmdBindDescriptorSets")(cb, VK_PIPELINE_BIND_POINT_COMPUTE, layout, 0, 2,
271 sets, 0, nullptr);
272 const std::uint32_t pass[2] = {dimension, count};
273 d.fn<PFN_vkCmdPushConstants>("vkCmdPushConstants")(cb, layout, VK_SHADER_STAGE_COMPUTE_BIT, 0, 8, pass);
274 d.fn<PFN_vkCmdDispatch>("vkCmdDispatch")(cb, count, 1, 1);
275 VkMemoryBarrier host{VK_STRUCTURE_TYPE_MEMORY_BARRIER};
276 host.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT;
277 host.dstAccessMask = VK_ACCESS_HOST_READ_BIT;
278 d.fn<PFN_vkCmdPipelineBarrier>("vkCmdPipelineBarrier")(cb, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT,
279 VK_PIPELINE_STAGE_HOST_BIT, 0, 1, &host, 0, nullptr, 0,
280 nullptr);
281 }
282};
283
284int run(vktest::Device& d, const VkPhysicalDeviceMemoryProperties& memory, const BindlessFeatures& features,
285 std::uint32_t max_layers, const std::vector<std::uint32_t>& code, ImageDimension dimension) {
286 BindlessSet set(d.device_proc, d.device, memory, features);
287 EXPECT(set.ok());
288 const std::uint32_t capacity = set.image_capacity(dimension);
289 std::printf("%s: %u indices in the set\n", name(dimension), capacity);
290 // Every live image needs an index, and index 0 is the fallback.
291 EXPECT(capacity > live_images);
292
293 Images images(d);
294 EXPECT(images.make(dimension, live_images, max_layers, memory));
295 std::vector<std::uint32_t> indices;
296 for (const VkImageView view : images.views) {
297 const std::uint32_t index = set.add_image(dimension, view, VK_IMAGE_LAYOUT_GENERAL);
298 EXPECT(index != 0);
299 indices.push_back(index);
300 }
301 Reader reader(d);
302 EXPECT(reader.make(set.layout(), code));
303 std::memcpy(reader.index_map, indices.data(), indices.size() * 4);
304 std::memset(reader.result_map, 0xcd, live_images * 4);
305 const std::uint32_t pass = dimension == ImageDimension::dim_1d ? 0 : dimension == ImageDimension::dim_2d_array ? 1 : 2;
306 bool flushed = false;
307 const bool ran = d.run([&](VkCommandBuffer cb) {
308 set.record_fallback_init(cb);
309 flushed = set.flush(cb, 0, [] { return std::uint64_t(0); });
310 images.record_fill(cb);
311 reader.record(cb, set.set(), pass, live_images);
312 return true;
313 });
314 set.table_upload_result(ran);
315 EXPECT(ran && flushed);
316 std::vector<std::uint32_t> result(live_images);
317 std::memcpy(result.data(), reader.result_map, live_images * 4);
318 std::uint32_t wrong = 0;
319 for (std::uint32_t i = 0; i < live_images; ++i) {
320 float red = 0;
321 std::memcpy(&red, &result[i], 4);
322 if (red != float(i + 1) && wrong++ < 4)
323 std::fprintf(stderr, "%s image %u at index %u read %g, expected %u\n", name(dimension), i, indices[i],
324 double(red), i + 1);
325 }
326 EXPECT(wrong == 0);
327 std::printf("%s: %u live images, each read its own texel through its index (the last at %u)\n", name(dimension),
328 live_images, indices.back());
329
330 // The rest of the array (the same view again: an index each, as distinct T#s of one texture get), then one
331 // more, refused for the reason that the array of its dimension is full.
332 std::uint32_t more = 0;
333 while (set.add_image(dimension, images.views[0], VK_IMAGE_LAYOUT_GENERAL)) ++more;
334 EXPECT(live_images + more == capacity - 1 && set.free_images(dimension) == 0);
335 EXPECT(set.image_refusal(dimension, false) == BindlessSet::ImageRefusal::array_full);
336 // Freed with nothing pending in the table: the index is free again at once.
337 set.remove_image(dimension, indices[7]);
338 EXPECT(set.free_images(dimension) == 1);
339 EXPECT(set.add_image(dimension, images.views[7], VK_IMAGE_LAYOUT_GENERAL) == indices[7]);
340 // Freed after its key is erased (the GPU's table may still name it): held until a flush brings the table up to
341 // date, then free.
342 const DescriptorKey key{0x1234u, 0, 0, 8u << 28, 0, 0, 0, 0};
343 set.insert_key(key, indices[9], dimension);
344 set.erase_key(key);
345 set.remove_image(dimension, indices[9]);
346 EXPECT(set.free_images(dimension) == 0 && set.add_image(dimension, images.views[9], VK_IMAGE_LAYOUT_GENERAL) == 0);
347 EXPECT(set.image_refusal(dimension, false) == BindlessSet::ImageRefusal::array_full);
348 const bool reflushed = d.run([&](VkCommandBuffer cb) { return set.flush(cb, 1, [] { return std::uint64_t(1); }); });
349 set.table_upload_result(reflushed);
350 EXPECT(reflushed && set.free_images(dimension) == 1);
351 EXPECT(set.add_image(dimension, images.views[9], VK_IMAGE_LAYOUT_GENERAL) == indices[9]);
352 std::printf("%s: %u more filled the array; the next was refused as full, and removed indices came back\n",
353 name(dimension), more);
354
355 d.fn<PFN_vkDeviceWaitIdle>("vkDeviceWaitIdle")(d.device);
356 set.release_retired();
357 return 0;
358}
359
360} // namespace
361
362int main() {
363#ifndef LEONIDA_TEST_BINDLESS_DIMENSIONS_SPV
364 std::printf("unsupported: the test shader was not built (no glslangValidator)\n");
365 return 77;
366#else
367 vktest::Device d;
368 if (const auto status = d.initialize(); status != vktest::DeviceStatus::ready)
369 return status == vktest::DeviceStatus::unavailable ? 77 : 1;
370 if (!d.bindless) {
371 std::printf("unsupported: the device lacks the bindless set's descriptor-indexing features\n");
372 return 77;
373 }
374 VkPhysicalDeviceMemoryProperties memory{};
375 d.instance_fn<PFN_vkGetPhysicalDeviceMemoryProperties>("vkGetPhysicalDeviceMemoryProperties")(d.physical, &memory);
376 VkPhysicalDeviceVulkan12Properties v12{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_PROPERTIES};
377 VkPhysicalDeviceVulkan11Properties v11{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_PROPERTIES, &v12};
378 VkPhysicalDeviceProperties2 properties{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_PROPERTIES_2, &v11};
379 d.instance_fn<PFN_vkGetPhysicalDeviceProperties2>("vkGetPhysicalDeviceProperties2")(d.physical, &properties);
380 std::printf("device: %s\n", properties.properties.deviceName);
381
382 // Sized as the D3D12 device sizes it (d3d12_vulkan_device.cpp): from the update-after-bind limits, past
383 // maxPerSetDescriptors where vkGetDescriptorSetLayoutSupport accepts the layout.
384 BindlessFeatures features;
385 features.update_after_bind = true;
386 features.partially_bound = d.partially_bound;
387 const auto layout_support =
388 d.fn<PFN_vkGetDescriptorSetLayoutSupport>("vkGetDescriptorSetLayoutSupport");
389 const auto layout_supported = [&](const BindlessFeatures& candidate) {
390 if (!layout_support) return false;
391 const bindless::SetLayout layout(candidate);
392 VkDescriptorSetLayoutSupport support{VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_SUPPORT};
393 layout_support(d.device, &layout.info, &support);
394 return support.supported == VK_TRUE;
395 };
396 bindless::size_bindings(features, properties.properties.limits, v11, v12, layout_supported);
397 const std::uint32_t sampled_limit = std::min(v12.maxPerStageDescriptorUpdateAfterBindSampledImages,
398 v12.maxDescriptorSetUpdateAfterBindSampledImages);
399 // Room for 5000 images in each of the four sampled arrays besides 2D's: below that, the device itself holds
400 // fewer, and the test has nothing to say.
401 if (sampled_limit < bindless::max_images + 3 * (live_images + 1) + 2 * bindless::growth_headroom) {
402 std::printf("unsupported: the device holds %u sampled images in a set, too few for %u of each dimension\n",
403 sampled_limit, live_images);
404 return 77;
405 }
406
407 const std::vector<std::uint32_t> code = load_spirv(LEONIDA_TEST_BINDLESS_DIMENSIONS_SPV);
408 EXPECT(!code.empty());
409 const std::uint32_t max_layers = properties.properties.limits.maxImageArrayLayers;
410 for (const ImageDimension dimension :
411 {ImageDimension::dim_1d, ImageDimension::dim_2d_array, ImageDimension::dim_3d})
412 EXPECT(run(d, memory, features, max_layers, code, dimension) == 0);
413
414 if (d.validation_errors()) {
415 std::printf("%u validation errors\n", d.validation_errors());
416 return 1;
417 }
418 std::printf("vk_bindless_dimensions: ok\n");
419 return 0;
420#endif
421}
diff --git a/runtime/test/vk_bindless_test.cpp b/runtime/test/vk_bindless_test.cpp
index dc33e7d91..e81181849 100644
--- a/runtime/test/vk_bindless_test.cpp
+++ b/runtime/test/vk_bindless_test.cpp
@@ -967,7 +967,14 @@ int main(int argc, char** argv) {
967 std::vector<std::uint32_t> filled; 967 std::vector<std::uint32_t> filled;
968 for (std::uint32_t i = 1; i < set.image_capacity(ImageDimension::dim_1d); ++i) 968 for (std::uint32_t i = 1; i < set.image_capacity(ImageDimension::dim_1d); ++i)
969 filled.push_back(set.add_image(ImageDimension::dim_1d, VK_NULL_HANDLE, VK_IMAGE_LAYOUT_GENERAL)); 969 filled.push_back(set.add_image(ImageDimension::dim_1d, VK_NULL_HANDLE, VK_IMAGE_LAYOUT_GENERAL));
970 EXPECT(filled.front() == 1 && filled.back() == set.image_capacity(ImageDimension::dim_1d) - 1); 970 // Images without storage views take the indices above the storage arrays first, then the ones below: every
971 // index but the fallback's, once each.
972 std::vector<std::uint32_t> sorted = filled;
973 std::sort(sorted.begin(), sorted.end());
974 EXPECT(sorted.front() == 1 && sorted.back() == set.image_capacity(ImageDimension::dim_1d) - 1 &&
975 std::adjacent_find(sorted.begin(), sorted.end()) == sorted.end());
976 const std::uint32_t storage_end = set.storage_capacity(ImageDimension::dim_1d);
977 EXPECT(filled.front() == (storage_end < set.image_capacity(ImageDimension::dim_1d) ? storage_end : 1u));
971 EXPECT(set.free_images(ImageDimension::dim_1d) == 0); 978 EXPECT(set.free_images(ImageDimension::dim_1d) == 0);
972 EXPECT(set.add_image(ImageDimension::dim_1d, VK_NULL_HANDLE, VK_IMAGE_LAYOUT_GENERAL) == 0); 979 EXPECT(set.add_image(ImageDimension::dim_1d, VK_NULL_HANDLE, VK_IMAGE_LAYOUT_GENERAL) == 0);
973 set.remove_image(ImageDimension::dim_1d, 7); 980 set.remove_image(ImageDimension::dim_1d, 7);
diff --git a/runtime/test/vk_test_device.h b/runtime/test/vk_test_device.h
index eb1be0a2c..8369d594c 100644
--- a/runtime/test/vk_test_device.h
+++ b/runtime/test/vk_test_device.h
@@ -123,6 +123,7 @@ public:
123 bool occlusion_query_precise = false; // occlusionQueryPrecise enabled 123 bool occlusion_query_precise = false; // occlusionQueryPrecise enabled
124 bool prepare_on_bind=false; 124 bool prepare_on_bind=false;
125 bool cold_graphics_compile = false; 125 bool cold_graphics_compile = false;
126 bool heavy_pipeline_cache = false; // LEONIDA_HEAVY_PIPELINE_CACHE_MS set and pipelineCreationCacheControl on
126 bool pipeline_statistics_query = false; // pipelineStatisticsQuery enabled 127 bool pipeline_statistics_query = false; // pipelineStatisticsQuery enabled
127 bool request_multi_draw_indirect = false, request_draw_indirect_count = false; 128 bool request_multi_draw_indirect = false, request_draw_indirect_count = false;
128 bool draw_indirect_count_enabled = false; 129 bool draw_indirect_count_enabled = false;
@@ -412,8 +413,13 @@ private:
412 // (zero-based VS ids) is in; harmless before. 413 // (zero-based VS ids) is in; harmless before.
413 const char* compile_mode = std::getenv("LEONIDA_PIPELINE_COMPILE"); 414 const char* compile_mode = std::getenv("LEONIDA_PIPELINE_COMPILE");
414 const bool cache_only = compile_mode && std::strcmp(compile_mode, "cache-only") == 0; 415 const bool cache_only = compile_mode && std::strcmp(compile_mode, "cache-only") == 0;
415 v13_.enable_pipeline_cache_control = cache_only && v13_.core && v13_.pipeline_cache_control; 416 // LEONIDA_HEAVY_PIPELINE_CACHE_MS other than 0: the heavy pipeline cache path, as the runtime takes it by default
416 cold_graphics_compile = v13_.enable_pipeline_cache_control; 417 // (src/heavy_pipeline_cache.h). Tests leave it off unless asked.
418 const char* heavy_ms = std::getenv("LEONIDA_HEAVY_PIPELINE_CACHE_MS");
419 const bool heavy = heavy_ms && *heavy_ms && std::strcmp(heavy_ms, "0") != 0;
420 v13_.enable_pipeline_cache_control = (cache_only || heavy) && v13_.core && v13_.pipeline_cache_control;
421 cold_graphics_compile = cache_only && v13_.enable_pipeline_cache_control;
422 heavy_pipeline_cache = heavy && v13_.enable_pipeline_cache_control;
417 prepare_on_bind = compile_mode && std::strcmp(compile_mode, "on-demand") == 0; 423 prepare_on_bind = compile_mode && std::strcmp(compile_mode, "on-demand") == 0;
418 VkPhysicalDeviceVulkan11Features enable11{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES, 424 VkPhysicalDeviceVulkan11Features enable11{VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_1_FEATURES,
419 v13_.enable(conditional_rendering ? &enable_conditional : nullptr)}; 425 v13_.enable(conditional_rendering ? &enable_conditional : nullptr)};
diff --git a/runtime/test/vk_xdxr_build_test.cpp b/runtime/test/vk_xdxr_build_test.cpp
index a0b3f8b6a..380d4bfad 100644
--- a/runtime/test/vk_xdxr_build_test.cpp
+++ b/runtime/test/vk_xdxr_build_test.cpp
@@ -105,6 +105,7 @@ struct Geometry {
105 bool transform = false; 105 bool transform = false;
106 float m[12] = {}; 106 float m[12] = {};
107 std::uint32_t triangle_count = 0; 107 std::uint32_t triangle_count = 0;
108 std::uint32_t vertex_count = 0xffffffffu; // XdxrTriangles::vertex_count; the default bounds nothing
108}; 109};
109 110
110// The world-space triangles a geometry describes, as the reference must see them. 111// The world-space triangles a geometry describes, as the reference must see them.
@@ -114,8 +115,9 @@ void expand(const Geometry& g, std::uint32_t geometry, std::vector<Tri>& out) {
114 Tri tri{}; 115 Tri tri{};
115 for (int k = 0; k < 3; ++k) { 116 for (int k = 0; k < 3; ++k) {
116 const std::uint32_t v = g.indices.empty() ? 3 * t + k : g.indices[3 * t + k]; 117 const std::uint32_t v = g.indices.empty() ? 3 * t + k : g.indices[3 * t + k];
117 float p[3] = {g.vertex_data[v * floats], g.vertex_data[v * floats + 1], 118 float p[3] = {std::nanf(""), std::nanf(""), std::nanf("")}; // past VertexCount: inactive, nothing read
118 g.xy ? 0.0f : g.vertex_data[v * floats + 2]}; 119 if (v < g.vertex_count)
120 for (int c = 0; c < 3; ++c) p[c] = c == 2 && g.xy ? 0.0f : g.vertex_data[v * floats + c];
119 for (int c = 0; c < 3; ++c) 121 for (int c = 0; c < 3; ++c)
120 tri.v[k][c] = g.transform ? g.m[4 * c] * p[0] + g.m[4 * c + 1] * p[1] + g.m[4 * c + 2] * p[2] + g.m[4 * c + 3] 122 tri.v[k][c] = g.transform ? g.m[4 * c] * p[0] + g.m[4 * c + 1] * p[1] + g.m[4 * c + 2] * p[2] + g.m[4 * c + 3]
121 : p[c]; 123 : p[c];
@@ -139,7 +141,7 @@ struct Built {
139int build_blas(vktest::Device& gpu, XdxrBuilder& builder, const std::string& dir, const std::string& name, 141int build_blas(vktest::Device& gpu, XdxrBuilder& builder, const std::string& dir, const std::string& name,
140 const std::vector<Geometry>& geometries, Built& built, unsigned rays = 0, 142 const std::vector<Geometry>& geometries, Built& built, unsigned rays = 0,
141 const std::vector<Geometry>* moved = nullptr, bool into_other = false, bool box16 = false, 143 const std::vector<Geometry>* moved = nullptr, bool into_other = false, bool box16 = false,
142 bool pair = false, bool expect_no_pairs = false) { 144 bool pair = false, bool expect_no_pairs = false, int poison = 0) {
143 std::vector<Buffer> keep, vertex_buffers; 145 std::vector<Buffer> keep, vertex_buffers;
144 std::vector<XdxrTriangles> descs; 146 std::vector<XdxrTriangles> descs;
145 std::uint32_t total = 0; 147 std::uint32_t total = 0;
@@ -153,6 +155,7 @@ int build_blas(vktest::Device& gpu, XdxrBuilder& builder, const std::string& dir
153 d.vertex_stride = geo.stride; 155 d.vertex_stride = geo.stride;
154 d.xy_only = geo.xy; 156 d.xy_only = geo.xy;
155 d.triangle_count = geo.triangle_count; 157 d.triangle_count = geo.triangle_count;
158 d.vertex_count = geo.vertex_count;
156 d.flags = 1; 159 d.flags = 1;
157 keep.push_back(v); 160 keep.push_back(v);
158 vertex_buffers.push_back(v); 161 vertex_buffers.push_back(v);
@@ -223,12 +226,29 @@ int build_blas(vktest::Device& gpu, XdxrBuilder& builder, const std::string& dir
223 Buffer other = into_other ? make(gpu, layout.size + 256) : Buffer{}; 226 Buffer other = into_other ? make(gpu, layout.size + 256) : Buffer{};
224 const std::uint64_t target = into_other ? (other.address + 255) & ~std::uint64_t(255) : base; 227 const std::uint64_t target = into_other ? (other.address + 255) & ~std::uint64_t(255) : base;
225 EXPECT(!into_other || other.buffer); 228 EXPECT(!into_other || other.buffer);
229 // `poison`: the update's source is not a structure this layout built (a title passing one it never built). 1: all
230 // zero, 2: random bytes, 3: the built structure with another element count in its header, 4: its header kept and
231 // the rest random. The builder must read nothing past the layout; 1-3 then become a full build of the moved
232 // geometry (check-build validates it), 4 refits garbage pointers, whose result is not checked, only that it ends.
233 if (poison) {
234 auto* s = reinterpret_cast<std::uint32_t*>(static_cast<char*>(dst.map) + (base - dst.address));
235 std::mt19937 prng(11);
236 const std::size_t words = layout.size / 4;
237 if (poison == 1) std::fill(s, s + words, 0u);
238 if (poison == 2) for (std::size_t w = 0; w < words; ++w) s[w] = std::uint32_t(prng());
239 if (poison == 3) s[3] += 1;
240 if (poison == 4) for (std::size_t w = 16; w < words; ++w) s[w] = std::uint32_t(prng());
241 }
226 EXPECT(gpu.run([&](VkCommandBuffer cb) { 242 EXPECT(gpu.run([&](VkCommandBuffer cb) {
227 recorded = builder.record_blas(cb, layout, descs, target, scratch.address, base); 243 recorded = builder.record_blas(cb, layout, descs, target, scratch.address, base);
228 barrier_to_host(gpu, cb); 244 barrier_to_host(gpu, cb);
229 return recorded; 245 return recorded;
230 })); 246 }));
231 if (into_other) EXPECT(dump(name + "_source", dst, base, built.tris)); // a refit must not touch its source 247 if (poison == 4) {
248 std::printf("%s: %u triangles refitted from a garbage tree, %u bytes\n", name.c_str(), total, layout.size);
249 return 0;
250 }
251 if (into_other && !poison) EXPECT(dump(name + "_source", dst, base, built.tris)); // a refit must not touch its source
232 EXPECT(dump(name, into_other ? other : dst, target, moved_tris)); 252 EXPECT(dump(name, into_other ? other : dst, target, moved_tris));
233 built.tris = moved_tris; 253 built.tris = moved_tris;
234 built.address = target; 254 built.address = target;
@@ -349,6 +369,18 @@ int main(int argc, char** argv) {
349 b.vertex_data[3 * 3 * 7] = std::nanf(""); // triangle 7 of geometry 1: inactive 369 b.vertex_data[3 * 3 * 7] = std::nanf(""); // triangle 7 of geometry 1: inactive
350 if (build_blas(gpu, builder, dir, "blas_two_geometries", {a, b}, multi)) return 1; 370 if (build_blas(gpu, builder, dir, "blas_two_geometries", {a, b}, multi)) return 1;
351 if (build_blas(gpu, builder, dir, "blas_empty", {}, empty)) return 1; 371 if (build_blas(gpu, builder, dir, "blas_empty", {}, empty)) return 1;
372 // VertexCount bounds the vertex reads: an unindexed geometry whose last triangle lies past it (the buffer holds
373 // finite vertices there, so a read would show), an index far past the buffer, and VertexCount 0: those
374 // triangles are inactive.
375 {
376 Built bounded;
377 Geometry past = soup(8), wild = grid(4, 3, false), no_vertices = soup(2);
378 past.vertex_count = 21;
379 wild.vertex_count = 25;
380 wild.indices[3 * 5 + 1] = 0xfffffff0u;
381 no_vertices.vertex_count = 0;
382 if (build_blas(gpu, builder, dir, "blas_vertex_count", {past, wild, no_vertices}, bounded)) return 1;
383 }
352 // many radix-sort tiles (RADIX_TILE elements each), the last one partial (fewer rays: the brute force is slow) 384 // many radix-sort tiles (RADIX_TILE elements each), the last one partial (fewer rays: the brute force is slow)
353 Built tiles; 385 Built tiles;
354 if (build_blas(gpu, builder, dir, "blas_three_sort_tiles", {soup(5000)}, tiles, 200)) return 1; 386 if (build_blas(gpu, builder, dir, "blas_three_sort_tiles", {soup(5000)}, tiles, 200)) return 1;
@@ -374,6 +406,19 @@ int main(int argc, char** argv) {
374 const Geometry g = grid(12, 4, false); // R32 indices, stride 16; the small-sort path 406 const Geometry g = grid(12, 4, false); // R32 indices, stride 16; the small-sort path
375 const std::vector<Geometry> after_grid = {move(g, 0.3f)}; 407 const std::vector<Geometry> after_grid = {move(g, 0.3f)};
376 if (build_blas(gpu, builder, dir, "blas_refit_into_other", {g}, copied, 0, &after_grid, true)) return 1; 408 if (build_blas(gpu, builder, dir, "blas_refit_into_other", {g}, copied, 0, &after_grid, true)) return 1;
409 // updates whose source is no structure of this layout: a full build instead, or (garbage tree) a bounded walk
410 const char* poisoned[] = {"blas_refit_zero_source", "blas_refit_garbage_source", "blas_refit_other_layout",
411 "blas_refit_garbage_tree"};
412 for (int poison = 1; poison <= 4; ++poison) {
413 Built b;
414 if (build_blas(gpu, builder, dir, poisoned[poison - 1], {big}, b, 100, &after, poison == 2, false, false,
415 false, poison))
416 return 1;
417 Built small;
418 if (build_blas(gpu, builder, dir, std::string(poisoned[poison - 1]) + "_small", {g}, small, 0, &after_grid,
419 poison != 2, false, false, false, poison))
420 return 1;
421 }
377 } 422 }
378 423
379 // BOX16 inner nodes: the same tree with half boxes rounded outward (64-byte nodes instead of 128). 424 // BOX16 inner nodes: the same tree with half boxes rounded outward (64-byte nodes instead of 128).
diff --git a/runtime/test/xapu_chad_test.cpp b/runtime/test/xapu_chad_test.cpp
index dffa74404..7e667492c 100644
--- a/runtime/test/xapu_chad_test.cpp
+++ b/runtime/test/xapu_chad_test.cpp
@@ -1,7 +1,11 @@
1// Checks the registered xapu.dll and chad.dll shims in the call shapes the executable uses (runtime/shims/xapu_chad.cpp): 1// Checks the registered xapu.dll and chad.dll shims (runtime/shims/xapu_queue.cpp and runtime/shims/xapu_chad.cpp)
2// the connections succeed, the APU's shared buffer is zeroed and writable at the offsets the title reaches, commands 2// in the call shapes the executable uses and against the layouts xapu_queue.cpp documents.
3// are accepted, an open and a close each give one result and nothing else does, XDspActivate hands out zeroed status 3//
4// and stream memory, and both disconnect. 4// xapu.dll: the connection's limits and its zeroed memory, writable at the offsets the title reaches; one result per
5// accepted command, in command order, with its id echoed; the per-stream queue limit; the error codes, returned or in
6// the result; a process command's frame count taken from the Opus packet's table-of-contents byte (RFC 6716, section
7// 3.1) and clipped, with silence written; and the result event. The packets are hand-made TOC bytes, not audio.
8// chad.dll: XDspActivate hands out zeroed status and stream memory, and both disconnect.
5#include <windows.h> 9#include <windows.h>
6 10
7#include <cstdint> 11#include <cstdint>
@@ -12,10 +16,10 @@
12 16
13namespace { 17namespace {
14 18
15using XApuConnectFn = HRESULT(__stdcall*)(void*, void*, void**); 19using XApuConnectFn = HRESULT(__stdcall*)(const void*, void*, void**);
16using XApuDisconnectFn = HRESULT(__stdcall*)(void*); 20using XApuDisconnectFn = HRESULT(__stdcall*)(void*, uint32_t);
17using XApuEnqueueCommandFn = HRESULT(__stdcall*)(void*, const uint32_t*, uint64_t); 21using XApuEnqueueCommandFn = HRESULT(__stdcall*)(void*, const void*, uint32_t*);
18using XApuGetResultCountFn = uint32_t(__stdcall*)(void*, uint64_t); 22using XApuGetResultCountFn = uint32_t(__stdcall*)(void*, uint32_t*);
19using XApuDequeueResultFn = HRESULT(__stdcall*)(void*, void*); 23using XApuDequeueResultFn = HRESULT(__stdcall*)(void*, void*);
20using XDspConnectFn = HRESULT(__stdcall*)(void*, uint32_t, uint32_t, uint32_t, uint32_t, void**); 24using XDspConnectFn = HRESULT(__stdcall*)(void*, uint32_t, uint32_t, uint32_t, uint32_t, void**);
21using XDspActivateFn = HRESULT(__stdcall*)(void*, const void*, void**, void**); 25using XDspActivateFn = HRESULT(__stdcall*)(void*, const void*, void**, void**);
@@ -23,6 +27,55 @@ using XDspDeactivateFn = HRESULT(__stdcall*)(void*, uint64_t, uint64_t, uint64_t
23using XDspDisconnectFn = HRESULT(__stdcall*)(void*); 27using XDspDisconnectFn = HRESULT(__stdcall*)(void*);
24using XDspSubmitCommandFn = HRESULT(__stdcall*)(void*, void*, uint32_t*); 28using XDspSubmitCommandFn = HRESULT(__stdcall*)(void*, void*, uint32_t*);
25 29
30constexpr HRESULT kQueueFull = static_cast<HRESULT>(0x8AC81000u);
31constexpr HRESULT kNoResult = static_cast<HRESULT>(0x8AC81001u);
32constexpr HRESULT kInvalidCommand = static_cast<HRESULT>(0x8AC81002u);
33constexpr HRESULT kInvalidStream = static_cast<HRESULT>(0x8AC81003u);
34constexpr HRESULT kAlreadyActive = static_cast<HRESULT>(0x8AC81005u);
35constexpr HRESULT kBadPacket = static_cast<HRESULT>(0x8AC81008u);
36
37#pragma pack(push, 1)
38struct ConnectInput {
39 uint32_t processing, streams, commands_per_stream, memory_bytes, frames_per_output, options;
40};
41struct ConnectOutput {
42 void* memory;
43 HANDLE result_event;
44};
45struct CommandId {
46 uint32_t kind, stream, sequence, options;
47 uint64_t context;
48};
49struct ActivateCommand {
50 CommandId id;
51 uint32_t channels, init_bytes;
52 const void* init;
53 float start_pitch;
54 uint32_t processing_bytes;
55 void* processing;
56};
57struct ProcessCommand {
58 CommandId id;
59 float pitch_ramp, target_pitch;
60 uint32_t first_frame, frame_count, input_bytes;
61 const uint8_t* input;
62 uint32_t output_bytes;
63 uint8_t* output;
64};
65struct Result {
66 CommandId id;
67 uint32_t state;
68 uint64_t state_data, usec;
69 HRESULT error;
70 uint32_t frames, output_bytes;
71 uint8_t* output;
72 float pitch;
73 uint32_t input_bytes;
74 const uint8_t* input;
75};
76#pragma pack(pop)
77static_assert(sizeof(ActivateCommand) == 56 && sizeof(ProcessCommand) == 64 && sizeof(Result) == 0x50, "layouts");
78
26int g_checks = 0; 79int g_checks = 0;
27int g_failures = 0; 80int g_failures = 0;
28 81
@@ -39,6 +92,8 @@ T get(const char* dll, const char* name) {
39 return reinterpret_cast<T>(fn); 92 return reinterpret_cast<T>(fn);
40} 93}
41 94
95CommandId id(uint32_t kind, uint32_t stream, uint32_t options = 0) { return {kind, stream, 7, options, 0x1234}; }
96
42} // namespace 97} // namespace
43 98
44int main() { 99int main() {
@@ -56,39 +111,165 @@ int main() {
56 check(rt::shims::owns_dll("xapu.dll") && rt::shims::owns_dll("chad.dll"), "the shims own xapu.dll and chad.dll"); 111 check(rt::shims::owns_dll("xapu.dll") && rt::shims::owns_dll("chad.dll"), "the shims own xapu.dll and chad.dll");
57 if (g_failures) return 1; 112 if (g_failures) return 1;
58 113
59 // XApuConnect(block24*, out16*, handle*), success read as SUCCEEDED. 114 // XApuConnect(const ConnectInput*, ConnectOutput*, handle*): the first argument is read, never written.
60 uint8_t out24[24]; 115 ConnectOutput out{};
61 uint64_t out16[2] = {};
62 std::memset(out24, 0xcc, sizeof out24);
63 void* apu = nullptr; 116 void* apu = nullptr;
64 check(SUCCEEDED(connect(out24, out16, &apu)) && apu, "XApuConnect succeeds with a handle"); 117 ConnectInput bad{1, 0, 2, 0x10000, 0, 0};
65 check(out24[0] == 0xcc && out24[23] == 0xcc, "XApuConnect leaves the title's 24-byte block alone"); 118 check(connect(&bad, &out, &apu) == E_INVALIDARG, "zero streams is E_INVALIDARG");
66 auto* base = reinterpret_cast<uint8_t*>(out16[0]); 119 bad = {1, 501, 2, 0x10000, 0, 0};
67 check(base != nullptr && out16[1] >= 0x14000 + 128 * 0x1E00, "XApuConnect returns the shared buffer and its size"); 120 check(connect(&bad, &out, &apu) == E_INVALIDARG, "more than 500 streams is E_INVALIDARG");
68 if (base) { 121 bad = {1, 4, 17, 0x10000, 0, 0};
69 const size_t last_output = 0x14000 + 127 * 0x1E00 + 0x1E00 - 1; // the end of slot 127's output 122 check(connect(&bad, &out, &apu) == E_INVALIDARG, "more than 16 commands per stream is E_INVALIDARG");
70 check(base[0] == 0 && base[last_output] == 0, "the shared buffer is zeroed"); 123 bad = {1, 4, 2, 0, 0, 0};
71 base[127 * 0x280] = 1; 124 check(connect(&bad, &out, &apu) == E_INVALIDARG, "no memory is E_INVALIDARG");
72 base[last_output] = 1; 125 bad = {1, 4, 2, 0x10000, 256, 0};
73 check(base[127 * 0x280] == 1 && base[last_output] == 1, "the shared buffer is writable at slot 127"); 126 check(connect(&bad, &out, &apu) == E_INVALIDARG, "frames per output for decoding is E_INVALIDARG");
74 } 127 bad = {2, 4, 2, 0x10000, 0, 0};
75 check(connect(out24, out16, nullptr) == E_INVALIDARG, "XApuConnect without a handle pointer fails"); 128 check(connect(&bad, &out, &apu) == static_cast<HRESULT>(rt::shims::kENotImpl),
129 "a processing kind other than Opus decoding is E_NOTIMPL");
130 check(apu == nullptr, "a failed XApuConnect hands out no handle");
131
132 // The memory the title addresses: input at base + slot * 0x280, output at base + 0x14000 + slot * 0x1E00.
133 constexpr uint32_t kMemory = 0x14000 + 128 * 0x1E00;
134 const ConnectInput in{1, 128, 2, kMemory, 0, 8};
135 const ConnectInput in_copy = in;
136 check(SUCCEEDED(connect(&in, &out, &apu)) && apu, "XApuConnect for Opus decoding, 128 streams, 2 commands each");
137 check(std::memcmp(&in, &in_copy, sizeof in) == 0, "XApuConnect leaves its input alone");
138 check(out.memory != nullptr && out.result_event != nullptr, "it hands out memory and a result event");
139 if (!apu || !out.memory) return 1;
140 auto* base = static_cast<uint8_t*>(out.memory);
141 const size_t last_output = 0x14000 + 127 * 0x1E00 + 0x1E00 - 1; // the end of slot 127's output
142 check(base[0] == 0 && base[last_output] == 0, "the memory is zeroed");
143 base[127 * 0x280] = 1;
144 base[last_output] = 1;
145 check(base[127 * 0x280] == 1 && base[last_output] == 1, "the memory is writable at slot 127");
146 base[127 * 0x280] = 0;
147 base[last_output] = 0;
148
149 Result r{};
150 check(dequeue(apu, &r) == kNoResult, "XApuDequeueResult with nothing queued is 0x8AC81001");
151 uint32_t dequeued = 99;
152 check(count(apu, &dequeued) == 0 && dequeued == 0, "XApuGetResultCount: nothing ready, none dequeued");
76 153
77 // Command types 1, 2 and 3 as the title builds them; the third argument is 0 at every site. 154 // Activate stream 3 (stereo) and process one packet; the title's sites pass a null third argument.
78 for (uint32_t type = 1; type <= 3; ++type) { 155 const ActivateCommand activate{id(1, 3), 2, 0, nullptr, 1.0f, 0, nullptr};
79 uint32_t command[16] = {type, 5}; 156 check(enqueue(apu, &activate, nullptr) == S_OK, "activate stream 3 with a null count pointer");
80 check(enqueue(apu, command, 0) == S_OK, "XApuEnqueueCommand accepts a command"); 157 check(WaitForSingleObject(out.result_event, 0) == WAIT_TIMEOUT, "a command not asking for it leaves the event");
158 uint8_t* const packet = base + 3 * 0x280;
159 uint8_t* const pcm = base + 0x14000 + 3 * 0x1E00;
160 packet[0] = (31 << 3) | 0; // one 20 ms CELT frame (config 31, code 0): 960 frames per channel
161 std::memset(pcm, 0x55, 0x1E00 + 16); // the slot and the start of the next, to see nothing past it is written
162 ProcessCommand process{id(3, 3, 1), 0.0f, 1.0f, 0, 960, 40, packet, 960 * 8, pcm};
163 uint32_t total = 0;
164 check(enqueue(apu, &process, &total) == S_OK && total == 2, "process on stream 3; two commands accepted");
165 check(WaitForSingleObject(out.result_event, 0) == WAIT_OBJECT_0, "a command asking for it signals the event");
166 check(WaitForSingleObject(out.result_event, 0) == WAIT_TIMEOUT, "the event resets itself");
167 check(enqueue(apu, &process, &total) == kQueueFull && total == 2,
168 "a third command on a stream of two is 0x8AC81000 and not counted");
169 check(count(apu, nullptr) == 2, "two results ready, with a null dequeued pointer");
170
171 check(dequeue(apu, &r) == S_OK && r.id.kind == 1 && r.id.stream == 3 && r.id.sequence == 7 &&
172 r.id.context == 0x1234 && r.error == S_OK && r.pitch == 1.0f,
173 "results come in command order: the activate first, its id echoed");
174 check(dequeue(apu, &r) == S_OK && r.id.kind == 3 && r.error == S_OK, "the process result follows");
175 uint32_t dword34 = 0;
176 std::memcpy(&dword34, reinterpret_cast<const uint8_t*>(&r) + 0x34, 4);
177 check(r.frames == 960 && dword34 == 960 * 8 && r.output == pcm && r.input == packet && r.input_bytes == 40,
178 "960 stereo float frames, the byte count at +0x34, the buffers echoed");
179 bool silent = true;
180 for (int i = 0; i < 960 * 8; ++i) silent = silent && pcm[i] == 0;
181 check(silent && pcm[960 * 8] == 0x55, "the output range is silence, and nothing past it is written");
182 check(count(apu, &dequeued) == 0 && dequeued == 2, "nothing ready, two dequeued");
183
184 // The TOC byte's frame size and count (RFC 6716, section 3.1), one stereo packet each.
185 struct Toc {
186 uint8_t toc, count;
187 uint32_t frames;
188 const char* what;
189 } const tocs[] = {
190 {(0 << 3) | 0, 0, 480, "SILK 10 ms, code 0: 480 frames"},
191 {(3 << 3) | 1, 0, 5760, "SILK 60 ms, code 1 (two frames): 5760 frames"},
192 {(13 << 3) | 2, 0, 1920, "hybrid 20 ms, code 2 (two frames): 1920 frames"},
193 {(16 << 3) | 3, 5, 600, "CELT 2.5 ms, code 3 with five frames: 600 frames"},
194 };
195 for (const Toc& t : tocs) {
196 packet[0] = t.toc;
197 packet[1] = t.count;
198 process = {id(3, 3), 0.0f, 1.0f, 0, 6000, 40, packet, 0x1E00 * 4, pcm};
199 r = {};
200 check(enqueue(apu, &process, nullptr) == S_OK && dequeue(apu, &r) == S_OK && r.error == S_OK &&
201 r.frames == (t.frames < 0x1E00 * 4 / 8 ? t.frames : 0x1E00 * 4 / 8),
202 t.what);
81 } 203 }
82 check(count(apu, 0) == 2, "the open and the close each queued a result, the type 3 command none"); 204
83 for (uint32_t type = 1; type <= 2; ++type) { 205 // first_frame and frame_count clip like a decode: three 20 ms frames (code 3, count 3) = 2880, from frame 2000.
84 uint32_t queued[0x50 / 4] = {}; 206 packet[0] = (31 << 3) | 3;
85 check(dequeue(apu, queued) == S_OK && queued[0] == type && queued[1] == 5 && queued[2] == 0 && queued[13] == 0, 207 packet[1] = 3;
86 "XApuDequeueResult returns the type and slot and leaves the rest zeroed"); 208 process = {id(3, 3), 0.0f, 1.0f, 2000, 4000, 40, packet, 0x1E00, pcm};
209 enqueue(apu, &process, nullptr);
210 dequeue(apu, &r);
211 check(r.error == S_OK && r.frames == 880 && r.output_bytes == 880 * 8, "frames from first_frame to the packet's end");
212 process.frame_count = 300;
213 enqueue(apu, &process, nullptr);
214 dequeue(apu, &r);
215 check(r.frames == 300, "no more than frame_count");
216 process.frame_count = 4000;
217 process.output_bytes = 100 * 8 + 7;
218 enqueue(apu, &process, nullptr);
219 dequeue(apu, &r);
220 check(r.frames == 100 && r.output_bytes == 800, "and no more than the output holds");
221
222 // Errors carried in the result: the command is accepted and its result says what went wrong.
223 packet[1] = 7; // seven 20 ms frames: 140 ms, longer than an Opus packet may be
224 enqueue(apu, &process, nullptr);
225 dequeue(apu, &r);
226 check(r.error == kBadPacket && r.frames == 0, "an impossible packet: 0x8AC81008 in the result");
227 packet[0] = (31 << 3) | 3;
228 packet[1] = 0;
229 enqueue(apu, &process, nullptr);
230 dequeue(apu, &r);
231 check(r.error == kBadPacket, "a code 3 packet of zero frames: 0x8AC81008");
232 ProcessCommand empty = process;
233 empty.input_bytes = 0;
234 check(enqueue(apu, &empty, nullptr) == S_OK && dequeue(apu, &r) == S_OK && r.error == E_INVALIDARG,
235 "an empty input: E_INVALIDARG in the result");
236 empty = process;
237 empty.output = nullptr;
238 check(enqueue(apu, &empty, nullptr) == S_OK && dequeue(apu, &r) == S_OK && r.error == E_INVALIDARG,
239 "a null output: E_INVALIDARG in the result");
240 ProcessCommand stray = process;
241 stray.id.stream = 4;
242 check(enqueue(apu, &stray, nullptr) == S_OK && dequeue(apu, &r) == S_OK && r.error == kInvalidStream,
243 "a process on a stream never activated: 0x8AC81003 in the result");
244 check(enqueue(apu, &activate, nullptr) == S_OK && dequeue(apu, &r) == S_OK && r.error == kAlreadyActive,
245 "activating an active stream: 0x8AC81005 in the result");
246 ActivateCommand surround = activate;
247 surround.id.stream = 5;
248 surround.channels = 6;
249 check(enqueue(apu, &surround, nullptr) == S_OK && dequeue(apu, &r) == S_OK && r.error == E_INVALIDARG,
250 "six channels: E_INVALIDARG in the result");
251
252 // Errors returned at once, with no result.
253 stray.id.stream = 128;
254 check(enqueue(apu, &stray, nullptr) == kInvalidStream, "a stream past the connection's is 0x8AC81003");
255 const CommandId unknown = id(9, 3);
256 check(enqueue(apu, &unknown, nullptr) == kInvalidCommand, "an unknown kind is 0x8AC81002");
257 check(count(apu, nullptr) == 0, "neither left a result");
258
259 // Notify and reset give a result; deactivate gives one and closes the stream.
260 for (uint32_t kind : {4u, 5u, 2u}) {
261 const CommandId command = id(kind, 3);
262 check(enqueue(apu, &command, nullptr) == S_OK && dequeue(apu, &r) == S_OK && r.id.kind == kind &&
263 r.id.stream == 3 && r.error == S_OK,
264 "notify, reset and deactivate each give a result of their kind for their stream");
87 } 265 }
88 check(count(apu, 0) == 0, "XApuGetResultCount is 0 again"); 266 process.id.stream = 3;
89 uint8_t result[0x50] = {}; 267 enqueue(apu, &process, nullptr);
90 check(FAILED(dequeue(apu, result)), "XApuDequeueResult on the empty queue fails"); 268 dequeue(apu, &r);
91 check(disconnect(apu) == S_OK, "XApuDisconnect succeeds"); 269 check(r.error == kInvalidStream, "after deactivate the stream takes no process command");
270 check(enqueue(apu, &activate, &total) == S_OK && dequeue(apu, &r) == S_OK && r.error == S_OK,
271 "and it can be activated again");
272 check(disconnect(apu, 0x20) == S_OK, "XApuDisconnect(handle, 0x20)");
92 273
93 // XDspConnectWithMaximumStreamLimit(buffer, u32, u32, 0x80, 1, handle*), success read as a return of 0. 274 // XDspConnectWithMaximumStreamLimit(buffer, u32, u32, 0x80, 1, handle*), success read as a return of 0.
94 alignas(64) static uint8_t dsp_buffer[4096]; 275 alignas(64) static uint8_t dsp_buffer[4096];
@@ -99,10 +280,10 @@ int main() {
99 void* stream = nullptr; 280 void* stream = nullptr;
100 check(dsp_activate(dsp, description, reinterpret_cast<void**>(&status), &stream) == 0, "XDspActivate returns 0"); 281 check(dsp_activate(dsp, description, reinterpret_cast<void**>(&status), &stream) == 0, "XDspActivate returns 0");
101 check(status && stream && static_cast<void*>(status) != stream, "XDspActivate writes both outputs"); 282 check(status && stream && static_cast<void*>(status) != stream, "XDspActivate writes both outputs");
102 uint32_t id = 0; 283 uint32_t dsp_id = 0;
103 check(dsp_submit(stream, dsp_buffer, &id) == 0, "XDspSubmitCommand returns 0"); 284 check(dsp_submit(stream, dsp_buffer, &dsp_id) == 0, "XDspSubmitCommand returns 0");
104 // What the title's wait reads: no error at +0xc and the submitted id at +4. 285 // What the title's wait reads: no error at +0xc and the submitted id at +4.
105 check(status && status[3] == 0 && status[1] == id, "the status block reports the submitted command as done"); 286 check(status && status[3] == 0 && status[1] == dsp_id, "the status block reports the submitted command as done");
106 check(dsp_deactivate(dsp, 0, 0, 0) == 0, "XDspDeactivate returns 0"); 287 check(dsp_deactivate(dsp, 0, 0, 0) == 0, "XDspDeactivate returns 0");
107 check(dsp_disconnect(dsp) == 0, "XDspDisconnect returns 0"); 288 check(dsp_disconnect(dsp) == 0, "XDspDisconnect returns 0");
108 289
diff --git a/runtime/test/xapu_opus_test.cpp b/runtime/test/xapu_opus_test.cpp
new file mode 100644
index 000000000..30eb33cfe
--- /dev/null
+++ b/runtime/test/xapu_opus_test.cpp
@@ -0,0 +1,193 @@
1// Checks the decoded path of the registered xapu.dll shim (runtime/shims/xapu_queue.cpp) with
2// runtime/opus_decoder built: the title's ConnectInput, activate/process/deactivate, one result per
3// command in order, the 0x50-byte result layout, and a generated 440 Hz stereo packet decoded to
4// 960 frames of f32 PCM, then clipped by first_frame / frame_count / output_bytes. The packet is
5// encoded here; no game data.
6#include <windows.h>
7
8#include <cmath>
9#include <cstdint>
10#include <cstdio>
11#include <cstring>
12#include <vector>
13
14#include "leonida_opus_decoder.h"
15#include "shims.h"
16
17namespace {
18
19using XApuConnectFn = HRESULT(__stdcall*)(const void*, void*, void**);
20using XApuDisconnectFn = HRESULT(__stdcall*)(void*, uint32_t);
21using XApuEnqueueCommandFn = HRESULT(__stdcall*)(void*, const void*, uint32_t*);
22using XApuGetResultCountFn = uint32_t(__stdcall*)(void*, uint32_t*);
23using XApuDequeueResultFn = HRESULT(__stdcall*)(void*, void*);
24
25constexpr HRESULT kQueueFull = static_cast<HRESULT>(0x8AC81000u);
26constexpr HRESULT kInvalidStream = static_cast<HRESULT>(0x8AC81003u);
27
28#pragma pack(push, 1)
29struct ConnectInput {
30 uint32_t processing, streams, commands_per_stream, memory_bytes, frames_per_output, options;
31};
32struct ConnectOutput {
33 void* memory;
34 HANDLE result_event;
35};
36struct CommandId {
37 uint32_t kind, stream, sequence, options;
38 uint64_t context;
39};
40struct ActivateCommand {
41 CommandId id;
42 uint32_t channels, init_bytes;
43 const void* init;
44 float start_pitch;
45 uint32_t processing_bytes;
46 void* processing;
47};
48struct ProcessCommand {
49 CommandId id;
50 float pitch_ramp, target_pitch;
51 uint32_t first_frame, frame_count, input_bytes;
52 const uint8_t* input;
53 uint32_t output_bytes;
54 uint8_t* output;
55};
56struct Result {
57 CommandId id;
58 uint32_t state;
59 uint64_t state_data, usec;
60 HRESULT error;
61 uint32_t frames, output_bytes;
62 uint8_t* output;
63 float pitch;
64 uint32_t input_bytes;
65 const uint8_t* input;
66};
67#pragma pack(pop)
68static_assert(sizeof(ActivateCommand) == 56 && sizeof(ProcessCommand) == 64 && sizeof(Result) == 0x50, "layouts");
69
70int g_checks = 0;
71int g_failures = 0;
72
73void check(bool condition, const char* what) {
74 ++g_checks;
75 std::printf("%s %s\n", condition ? "PASS" : "FAIL", what);
76 if (!condition) ++g_failures;
77}
78
79template <typename T>
80T get(const char* dll, const char* name) {
81 void* fn = rt::shims::find(dll, name);
82 check(fn != nullptr, name);
83 return reinterpret_cast<T>(fn);
84}
85
86CommandId id(uint32_t kind, uint32_t stream, uint32_t options = 0) { return {kind, stream, 7, options, 0x1234}; }
87
88} // namespace
89
90int main() {
91 std::printf("xapu_opus_test: decoded xapu.dll path\n");
92 const auto connect = get<XApuConnectFn>("xapu.dll", "XApuConnect");
93 const auto disconnect = get<XApuDisconnectFn>("xapu.dll", "XApuDisconnect");
94 const auto enqueue = get<XApuEnqueueCommandFn>("xapu.dll", "XApuEnqueueCommand");
95 const auto count = get<XApuGetResultCountFn>("xapu.dll", "XApuGetResultCount");
96 const auto dequeue = get<XApuDequeueResultFn>("xapu.dll", "XApuDequeueResult");
97 if (g_failures) return 1;
98
99 constexpr uint32_t kMemory = 0x14000 + 128 * 0x1E00;
100 const ConnectInput in{1, 128, 2, kMemory, 0, 0};
101 const ConnectInput in_copy = in;
102 ConnectOutput out{};
103 void* apu = nullptr;
104 check(SUCCEEDED(connect(&in, &out, &apu)) && apu, "XApuConnect for Opus decoding");
105 check(std::memcmp(&in, &in_copy, sizeof in) == 0, "XApuConnect leaves its input alone");
106 auto* base = static_cast<uint8_t*>(out.memory);
107 if (!apu || !base) return 1;
108 check(base[0] == 0 && base[kMemory - 1] == 0, "the shared memory is zeroed");
109
110 const ActivateCommand activate{id(1, 3), 2, 0, nullptr, 1.0f, 0, nullptr};
111 check(enqueue(apu, &activate, nullptr) == S_OK, "activate stream 3 (stereo)");
112
113 std::vector<float> tone(960 * 2);
114 for (uint32_t i = 0; i < 960; ++i) {
115 const float sample = static_cast<float>(std::sin(double(i) * 440.0 * 6.283185307179586 / 48000.0)) * 0.5f;
116 tone[2 * i] = sample;
117 tone[2 * i + 1] = sample;
118 }
119 uint8_t encoded[1500];
120 size_t encoded_len = 0;
121 check(leonida_opus_encode_test(tone.data(), 960, 2, encoded, sizeof encoded, &encoded_len) == LEONIDA_OPUS_OK &&
122 encoded_len > 0,
123 "a synthetic 20 ms stereo Opus packet encodes");
124 std::memcpy(base, encoded, encoded_len);
125 auto* const pcm = base + 0x14000 + 3 * 0x1E00;
126 std::memset(pcm, 0x55, 0x1E00 + 64);
127 ProcessCommand process{id(3, 3, 1), 0.0f, 1.0f, 0, 960, static_cast<uint32_t>(encoded_len), base, 0x1E00, pcm};
128 uint32_t total = 0;
129 check(enqueue(apu, &process, &total) == S_OK && total == 2, "process on stream 3; two commands accepted");
130 check(enqueue(apu, &process, &total) == kQueueFull && total == 2,
131 "a third command on a stream of two is 0x8AC81000");
132 check(count(apu, nullptr) == 2, "two results ready");
133
134 Result r{};
135 check(dequeue(apu, &r) == S_OK && r.id.kind == 1 && r.id.stream == 3 && r.error == S_OK,
136 "results come in command order: the activate first");
137 check(dequeue(apu, &r) == S_OK && r.id.kind == 3 && r.error == S_OK, "the process result follows");
138 uint32_t dword34 = 0;
139 std::memcpy(&dword34, reinterpret_cast<const uint8_t*>(&r) + 0x34, 4);
140 check(r.frames == 960 && dword34 == 960 * 8 && r.output == pcm && r.input == base &&
141 r.input_bytes == static_cast<uint32_t>(encoded_len),
142 "960 stereo float frames, the byte count at +0x34, the buffers echoed");
143 float energy = 0.0f;
144 const auto* floats = reinterpret_cast<const float*>(pcm);
145 for (uint32_t i = 0; i < 960 * 2; ++i) energy += floats[i] * floats[i];
146 energy /= 960 * 2;
147 check(energy > 0.01f, "the decoded tone has energy");
148 check(pcm[960 * 8] == 0x55, "nothing past the decoded range is written");
149 check(count(apu, nullptr) == 0, "the queue is empty after both results");
150
151 // first_frame, frame_count and what output_bytes holds each clip the decoded frames.
152 process.first_frame = 500;
153 process.frame_count = 4000;
154 enqueue(apu, &process, nullptr);
155 dequeue(apu, &r);
156 check(r.error == S_OK && r.frames == 460 && r.output_bytes == 460 * 8, "frames from first_frame to the packet's end");
157 process.frame_count = 300;
158 enqueue(apu, &process, nullptr);
159 dequeue(apu, &r);
160 check(r.frames == 300 && r.output_bytes == 300 * 8, "no more than frame_count");
161 process.frame_count = 4000;
162 process.output_bytes = 100 * 8 + 7;
163 enqueue(apu, &process, nullptr);
164 dequeue(apu, &r);
165 check(r.frames == 100 && r.output_bytes == 800, "and no more than the output holds");
166
167 // Errors carried in the result.
168 ProcessCommand empty = process;
169 empty.input_bytes = 0;
170 check(enqueue(apu, &empty, nullptr) == S_OK && dequeue(apu, &r) == S_OK && r.error == E_INVALIDARG,
171 "an empty input: E_INVALIDARG in the result");
172 empty = process;
173 empty.output = nullptr;
174 check(enqueue(apu, &empty, nullptr) == S_OK && dequeue(apu, &r) == S_OK && r.error == E_INVALIDARG,
175 "a null output: E_INVALIDARG in the result");
176 ProcessCommand stray = process;
177 stray.id.stream = 4;
178 check(enqueue(apu, &stray, nullptr) == S_OK && dequeue(apu, &r) == S_OK && r.error == kInvalidStream,
179 "a process on a stream never activated: 0x8AC81003 in the result");
180
181 // Deactivate closes the stream; activating again creates a fresh decoder.
182 const CommandId deactivate = id(2, 3);
183 check(enqueue(apu, &deactivate, nullptr) == S_OK && dequeue(apu, &r) == S_OK && r.error == S_OK,
184 "deactivate gives a result and closes the stream");
185 check(enqueue(apu, &process, nullptr) == S_OK && dequeue(apu, &r) == S_OK && r.error == kInvalidStream,
186 "after deactivate the stream takes no process command");
187 check(enqueue(apu, &activate, nullptr) == S_OK && dequeue(apu, &r) == S_OK && r.error == S_OK,
188 "the stream can be activated again");
189 check(disconnect(apu, 0x20) == S_OK, "XApuDisconnect(handle, 0x20)");
190
191 std::printf("%d checks, %d failures\n", g_checks, g_failures);
192 return g_failures ? 1 : 0;
193}
diff --git a/runtime/test/xgameruntime_gamesave_test.cpp b/runtime/test/xgameruntime_gamesave_test.cpp
index b53461944..2e5944ad8 100644
--- a/runtime/test/xgameruntime_gamesave_test.cpp
+++ b/runtime/test/xgameruntime_gamesave_test.cpp
@@ -228,6 +228,20 @@ int main() {
228 std::strcmp(out[1].info.name, "profile/main") == 0 && 228 std::strcmp(out[1].info.name, "profile/main") == 0 &&
229 std::memcmp(out[1].data, profile.data(), profile.size()) == 0, 229 std::memcmp(out[1].data, profile.data(), profile.size()) == 0,
230 "ReadBlobData returns both blobs, byte for byte, pointing into the buffer"); 230 "ReadBlobData returns both blobs, byte for byte, pointing into the buffer");
231 // A title sizes the buffer as sizeof(XGameSaveBlob) + data + name and its NUL per blob, with no padding: such a
232 // buffer is enough, the blobs packed back to back.
233 const char* one[] = {"story"};
234 count = 1;
235 std::vector<uint8_t> exact(sizeof(Blob) + story.size() + std::strlen("story") + 1);
236 auto* tight = reinterpret_cast<Blob*>(exact.data());
237 check(at<Read>(save, 20)(save, container, one, &count, exact.size(), tight) == S_OK && count == 1 &&
238 std::strcmp(tight[0].info.name, "story") == 0 && tight[0].info.size == story.size() &&
239 std::memcmp(tight[0].data, story.data(), story.size()) == 0 &&
240 tight[0].info.name + std::strlen("story") + 1 <= reinterpret_cast<const char*>(exact.data() + exact.size()),
241 "ReadBlobData into a buffer of the unpadded size returns the blob");
242 count = 1;
243 check(at<Read>(save, 20)(save, container, one, &count, exact.size() - 1, tight) == E_GS_PROVIDED_BUFFER_TOO_SMALL,
244 "one byte less than the unpadded size is too small");
231 const char* absent[] = {"nope"}; 245 const char* absent[] = {"nope"};
232 count = 1; 246 count = 1;
233 check(at<Read>(save, 20)(save, container, absent, &count, buffer.size() * 8, out) == E_GS_BLOB_NOT_FOUND, 247 check(at<Read>(save, 20)(save, container, absent, &count, buffer.size() * 8, out) == E_GS_BLOB_NOT_FOUND,
diff --git a/runtime/test/xmem_test.cpp b/runtime/test/xmem_test.cpp
index 991388c7f..79f655412 100644
--- a/runtime/test/xmem_test.cpp
+++ b/runtime/test/xmem_test.cpp
@@ -741,7 +741,19 @@ void test_copy_page_mappings_cpu_view(const PhysicalApi& api) {
741 check(readable(other) && page_holds(other, 0x7300u), 741 check(readable(other) && page_holds(other, 0x7300u),
742 "a GPU-only source page unmapped there is looked up at its CPU range"); 742 "a GPU-only source page unmapped there is looked up at its CPU range");
743 743
744 // A null source unmaps both ranges. 744 // A CPU page the title mapped itself is the title's: a copy onto its GPU-only page, or an unmap of it, changes the
745 // GPU-only page alone (the console's CopyPageMappingsBatchX edits only that range's page table).
746 check(copy(gpu + 2 * kPage64k, pool + kPage64k, 1, false), "a copy onto a GPU-only page whose CPU page is the title's");
747 check(readable(gpu + 2 * kPage64k) && page_holds(gpu + 2 * kPage64k, 0x7301u),
748 "the GPU-only page shows the copied pool page");
749 check(readable(cpu + 2 * kPage64k) && page_holds(cpu + 2 * kPage64k, 0x7300u),
750 "the title's own mapping at the paired CPU page is kept, not replaced by the copy");
751 check(copy(gpu + 2 * kPage64k, nullptr, 1, false), "a null source unmaps a GPU-only page whose CPU page is the title's");
752 check(!readable(gpu + 2 * kPage64k), "the GPU-only page is unmapped");
753 check(readable(cpu + 2 * kPage64k) && page_holds(cpu + 2 * kPage64k, 0x7300u),
754 "the title's own mapping at the paired CPU page survives the unmap");
755
756 // A null source unmaps both ranges where the CPU pages are the copy's own.
745 check(copy(gpu, nullptr, kPool, false), "a null source unmaps the GPU-only range"); 757 check(copy(gpu, nullptr, kPool, false), "a null source unmaps the GPU-only range");
746 check(!readable(gpu) && !readable(cpu) && !readable(cpu + kPage64k), "the paired CPU range is unmapped with it"); 758 check(!readable(gpu) && !readable(cpu) && !readable(cpu + kPage64k), "the paired CPU range is unmapped with it");
747 759
@@ -1544,6 +1556,38 @@ void test_physical_pages_commit_on_touch(const PhysicalApi& api) {
1544 check(read_ok, "ReadFile fills a page that commit_physical_range committed"); 1556 check(read_ok, "ReadFile fills a page that commit_physical_range committed");
1545 1557
1546 check(api.map(second, 2, nullptr) == second && api.map(window, kMapped, nullptr) == window, "they unmap"); 1558 check(api.map(second, 2, nullptr) == second && api.map(window, kMapped, nullptr) == window, "they unmap");
1559 {
1560 // A host guarded read (outside the title image at 0x140000000) of an unmapped window page exits as
1561 // passed_guarded without counting as left_to_title; a title read still counts as left_to_title.
1562 void* const stub_page = VirtualAlloc(nullptr, 4096, MEM_RESERVE | MEM_COMMIT, PAGE_READWRITE);
1563 const uint8_t mov_eax_rcx_ret[] = {0x8b, 0x01, 0xc3};
1564 DWORD stub_old = 0;
1565 bool stub_ready = false;
1566 if (stub_page) {
1567 std::memcpy(stub_page, mov_eax_rcx_ret, sizeof(mov_eax_rcx_ret));
1568 stub_ready = VirtualProtect(stub_page, 4096, PAGE_EXECUTE_READ, &stub_old) != FALSE;
1569 FlushInstructionCache(GetCurrentProcess(), stub_page, sizeof(mov_eax_rcx_ret));
1570 }
1571 const auto host_read_faults = [&](const void* p) {
1572 __try {
1573 reinterpret_cast<uint32_t (*)(const void*)>(stub_page)(p);
1574 return false;
1575 } __except (GetExceptionCode() == EXCEPTION_ACCESS_VIOLATION ? EXCEPTION_EXECUTE_HANDLER
1576 : EXCEPTION_CONTINUE_SEARCH) {
1577 return true;
1578 }
1579 };
1580 const uint64_t guarded_before = rt::xmem::fault_exits(rt::xmem::FaultExit::passed_guarded);
1581 const uint64_t left_before = rt::xmem::fault_exits(rt::xmem::FaultExit::left_to_title);
1582 check(stub_ready && host_read_faults(second) &&
1583 rt::xmem::fault_exits(rt::xmem::FaultExit::passed_guarded) == guarded_before + 1 &&
1584 rt::xmem::fault_exits(rt::xmem::FaultExit::left_to_title) == left_before,
1585 "a host guarded read of an unmapped window page exits as passed_guarded");
1586 check(access_faults(reinterpret_cast<volatile uint32_t*>(second), false) &&
1587 rt::xmem::fault_exits(rt::xmem::FaultExit::left_to_title) == left_before + 1,
1588 "a title read of an unmapped window page still exits as left_to_title");
1589 if (stub_page) VirtualFree(stub_page, 0, MEM_RELEASE);
1590 }
1547 check(api.free_pages(count, pages.data()) == TRUE, "XMemFreePhysicalPages frees them"); 1591 check(api.free_pages(count, pages.data()) == TRUE, "XMemFreePhysicalPages frees them");
1548} 1592}
1549 1593
diff --git a/runtime/test/xs_proxy_mock_test.cpp b/runtime/test/xs_proxy_mock_test.cpp
index cb350820e..e80825623 100644
--- a/runtime/test/xs_proxy_mock_test.cpp
+++ b/runtime/test/xs_proxy_mock_test.cpp
@@ -4644,6 +4644,85 @@ int check_list_values_more() {
4644 WaitForSingleObject(job, INFINITE); 4644 WaitForSingleObject(job, INFINITE);
4645 CloseHandle(job); 4645 CloseHandle(job);
4646 4646
4647 // 11. Work-aware timeout in Pump (src/list_value_wait_budget.h):
4648 // a) a matching in-flight producer pauses a held memory gate past the idle timeout until the producer lands;
4649 // b) a busy releaser executing an action gate pauses a concurrent memory gate past the idle timeout;
4650 // c) a demoted gate (4 ms budget) scales its pause caps with its short budget so unrelated active work does not
4651 // hold it for the full timeout's cap;
4652 // d) a matching producer stuck behind an unsignalled fence still hits a finite pause cap instead of hanging.
4653 const auto write_on_a = [&](int index, std::uint64_t value, std::uint64_t& signal_value) -> bool {
4654 if (FAILED(hr_of(raw(direct, 139, word(allocator), 0)))) return false;
4655 raw(direct, 14, 1, 1, 1); // Dispatch
4656 raw(direct, 72, word(&g_cells2[index]), value, 0, 0); // write64
4657 if (FAILED(hr_of(raw(direct, 9)))) return false;
4658 g_queue_call_count = 0;
4659 if (submit(qa, direct) != 0) return false;
4660 signal_value = logged_signal(qa_mock, a_written);
4661 return signal_value != 0;
4662 };
4663 xs::set_list_value_wait_timeout_ms(40);
4664 xs::reset_list_value_stats();
4665 // 11a. Wait on qb before qa submits its matching write (so relay() misses it and Pump holds a gate).
4666 EXPECT(hold_on(qb, 27, 1));
4667 std::uint64_t producer_sig = 0;
4668 EXPECT(write_on_a(27, 1, producer_sig));
4669 EXPECT(!xs::list_values_idle(150)); // >3x the 40 ms idle timeout: pauses while producer is in flight
4670 stats = xs::list_value_stats();
4671 EXPECT(stats.gates_timed_out == 0 && stats.gates_met == 0 && cell2(27) == 0);
4672 fence_signal(a_written, producer_sig);
4673 EXPECT(xs::list_values_idle(3000) && cell2(27) == 1);
4674 stats = xs::list_value_stats();
4675 EXPECT(stats.gates_met == 1 && stats.gates_timed_out == 0);
4676
4677 // 11b. Releaser inside a 150 ms action gate pauses a concurrent memory gate past the 40 ms idle timeout.
4678 xs::set_copy_page_mappings_hook([](std::uint32_t, const rt::xmem::PageBatch*, std::uintptr_t, std::uint32_t,
4679 std::uint32_t) -> bool {
4680 Sleep(150);
4681 InterlockedExchange64(reinterpret_cast<volatile LONG64*>(&g_cells2[28]), 1);
4682 return true;
4683 });
4684 g_queue_call_count = 0;
4685 EXPECT(hr_of(raw(qc, 31, 1, word(remap), 0x7000000000, 16, 0)) == S_OK);
4686 const std::uint64_t action_sig = logged_signal(qc_mock, c_written);
4687 EXPECT(action_sig != 0);
4688 const std::uint64_t met_before_rel = xs::list_value_stats().gates_met;
4689 const std::uint64_t to_before_rel = xs::list_value_stats().gates_timed_out;
4690 EXPECT(hold_on(qb, 28, 1));
4691 fence_signal(c_written, action_sig);
4692 EXPECT(xs::list_values_idle(3000) && cell2(28) == 1);
4693 xs::set_copy_page_mappings_hook(nullptr);
4694 stats = xs::list_value_stats();
4695 EXPECT(stats.gates_met == met_before_rel + 1 && stats.gates_timed_out == to_before_rel);
4696
4697 // 11c. Demoted gate (3 timeouts -> 4 ms budget) with unrelated in-flight work on qa times out in a few ms, not
4698 // the 12 s active-work cap of the 40 ms full timeout.
4699 for (int i = 0; i < 3; ++i) EXPECT(hold_on(qb, 29, 1) && xs::list_values_idle(3000));
4700 std::uint64_t unrelated_sig = 0;
4701 EXPECT(write_on_a(30, 1, unrelated_sig));
4702 const std::uint64_t short_before_dem = xs::list_value_stats().gates_short;
4703 const std::uint64_t to_before_dem = xs::list_value_stats().gates_timed_out;
4704 started = Clock::now();
4705 EXPECT(hold_on(qb, 29, 1));
4706 for (int i = 0; i < 1000 && xs::list_value_stats().gates_timed_out == to_before_dem; ++i) Sleep(1);
4707 const auto demoted_active_ms = ms_since(started);
4708 EXPECT(xs::list_value_stats().gates_timed_out == to_before_dem + 1 &&
4709 xs::list_value_stats().gates_short == short_before_dem + 1 && demoted_active_ms < 500);
4710 fence_signal(a_written, unrelated_sig);
4711 EXPECT(xs::list_values_idle(3000));
4712
4713 // 11d. Stuck matching producer (fence never signals) still hits the finite max pause cap instead of hanging.
4714 const std::uint64_t to_before_stuck = xs::list_value_stats().gates_timed_out;
4715 started = Clock::now();
4716 EXPECT(hold_on(qb, 29, 1));
4717 std::uint64_t stuck_sig = 0;
4718 EXPECT(write_on_a(29, 1, stuck_sig));
4719 for (int i = 0; i < 1000 && xs::list_value_stats().gates_timed_out == to_before_stuck; ++i) Sleep(1);
4720 const auto stuck_producer_ms = ms_since(started);
4721 EXPECT(xs::list_value_stats().gates_timed_out == to_before_stuck + 1 && stuck_producer_ms < 500);
4722 fence_signal(a_written, stuck_sig);
4723 EXPECT(xs::list_values_idle(3000));
4724 xs::set_list_value_wait_timeout_ms(5000);
4725
4647 // 8. stop() ends both threads. Afterwards nothing new is landed or opened (the process is ending: a gate 4726 // 8. stop() ends both threads. Afterwards nothing new is landed or opened (the process is ending: a gate
4648 // signalled from another thread could open one whose remap was skipped, or go below one still to come), and 4727 // signalled from another thread could open one whose remap was skipped, or go below one still to come), and
4649 // CopyPageMappingsBatchX remaps at the call rather than wait for a queue whose gates stay shut. 4728 // CopyPageMappingsBatchX remaps at the call rather than wait for a queue whose gates stay shut.
diff --git a/scripts/build_runtime.ps1 b/scripts/build_runtime.ps1
index 5dd8bd389..bb25cccd7 100644
--- a/scripts/build_runtime.ps1
+++ b/scripts/build_runtime.ps1
@@ -86,7 +86,7 @@ $build || exit /b 1
86 Write-Warning "CMake and Ninja weren't found (neither VS C++ CMake tools nor native PATH tools): building with cl.exe directly, without the GameInput shim (SDL3) and without the Rust XMA2 decoder (XMA voices are silent). Install CMake + Ninja or VS's CMake tools component to get it." 86 Write-Warning "CMake and Ninja weren't found (neither VS C++ CMake tools nor native PATH tools): building with cl.exe directly, without the GameInput shim (SDL3) and without the Rust XMA2 decoder (XMA voices are silent). Install CMake + Ninja or VS's CMake tools component to get it."
87 $xtaskqueueDir = Join-Path $root "third_party\xtaskqueue" 87 $xtaskqueueDir = Join-Path $root "third_party\xtaskqueue"
88 $xtaskqueueFiles = "Source\Task\TaskQueue.cpp", "Source\Task\AsyncLib.cpp", "Source\Task\ThreadPool_win32.cpp", "Source\Task\WaitTimer_win32.cpp" | ForEach-Object { "`"$xtaskqueueDir\$_`"" } 88 $xtaskqueueFiles = "Source\Task\TaskQueue.cpp", "Source\Task\AsyncLib.cpp", "Source\Task\ThreadPool_win32.cpp", "Source\Task\WaitTimer_win32.cpp" | ForEach-Object { "`"$xtaskqueueDir\$_`"" }
89 $files = "src\main.cpp", "src\thread_stacks.cpp", "src\bcpack.cpp", "src\host_cpu.cpp", "src\pe_loader.cpp", "shims\registry.cpp", "shims\console_registry.cpp", "shims\file_system.cpp", "shims\xmem.cpp", "shims\xg_xs.cpp", "shims\acphal.cpp", "shims\d3d12_xs.cpp", "shims\d3d12_xs_device.cpp", "shims\d3d12_xs_pso_stream.cpp", "shims\d3d12_xs_rootsig.cpp", "shims\xgameruntime.cpp", "shims\xgameruntime_user.cpp", "shims\xgameruntime_gamesave.cpp", "shims\xgameruntime_store.cpp", "shims\xgameruntime_offline.cpp", "shims\winhttp_offline.cpp", "shims\ws2_offline.cpp", "shims\library_loader.cpp", "shims\process.cpp", "shims\lifecycle.cpp", "shims\xbox_bvh_builder.cpp", "shims\com_shim.cpp", "shims\silent_audio.cpp", "shims\bcrypt_rng.cpp", "shims\xapu_chad.cpp", "shims\dstorage.cpp" | ForEach-Object { "`"$src\$_`"" } 89 $files = "src\main.cpp", "src\thread_stacks.cpp", "src\bcpack.cpp", "src\host_cpu.cpp", "src\pe_loader.cpp", "shims\registry.cpp", "shims\console_registry.cpp", "shims\file_system.cpp", "shims\xmem.cpp", "shims\xg_xs.cpp", "shims\acphal.cpp", "shims\d3d12_xs.cpp", "shims\d3d12_xs_device.cpp", "shims\d3d12_xs_pso_stream.cpp", "shims\d3d12_xs_rootsig.cpp", "shims\xgameruntime.cpp", "shims\xgameruntime_user.cpp", "shims\xgameruntime_gamesave.cpp", "shims\xgameruntime_store.cpp", "shims\xgameruntime_offline.cpp", "shims\winhttp_offline.cpp", "shims\ws2_offline.cpp", "shims\library_loader.cpp", "shims\process.cpp", "shims\lifecycle.cpp", "shims\xbox_bvh_builder.cpp", "shims\com_shim.cpp", "shims\silent_audio.cpp", "shims\bcrypt_rng.cpp", "shims\xapu_queue.cpp", "shims\xapu_chad.cpp", "shims\dstorage.cpp" | ForEach-Object { "`"$src\$_`"" }
90 $includes = "/I `"$src\src`" /I `"$src\shims`" /I `"$src\shims\xtaskqueue`" /I `"$xtaskqueueDir\Include`" /I `"$xtaskqueueDir\Source\Task`" /I `"$xtaskqueueDir\Source\Common`"" 90 $includes = "/I `"$src\src`" /I `"$src\shims`" /I `"$src\shims\xtaskqueue`" /I `"$xtaskqueueDir\Include`" /I `"$xtaskqueueDir\Source\Task`" /I `"$xtaskqueueDir\Source\Common`""
91 $opt = if ($Debug) { "/Od /MDd" } else { "/O2 /MD" } 91 $opt = if ($Debug) { "/Od /MDd" } else { "/O2 /MD" }
92 $body = @" 92 $body = @"
diff --git a/scripts/run_address_guard_gpu_test.py b/scripts/run_address_guard_gpu_test.py
new file mode 100644
index 000000000..f7aa53366
--- /dev/null
+++ b/scripts/run_address_guard_gpu_test.py
@@ -0,0 +1,133 @@
1"""GPU test of the address guard (rdna2spirv.py --address-guard; docs/d3d12_vulkan.md, "Address guard").
2
3Assembles runtime/test/shaders/cs_address_guard.asm, translates it with --address-guard and runs it with
4vk_compute_test twice on a 2 MiB heap: once with the guard's header (the page table backs the arena and the page at
50x90000), once without its magic (the guard off). Every address the program uses is inside the heap's buffer, so
6neither run can fault, whatever the guard does: the guard-on run shows that the refused accesses read 0 and left
7memory alone although memory was there, and the guard-off run that the same module then reads it.
8
9 python -I scripts/run_address_guard_gpu_test.py --build runtime/build [--llvm-mc CMD] [--work DIR]
10
11Pin the GPU (MESA_VK_DEVICE_SELECT, VK_DRIVER_FILES) as for scripts/run_gpu_tests.py. Exit 0 when both runs give
12the expected words, 1 otherwise, 77 when vk_compute_test or llvm-mc is missing.
13"""
14import argparse
15import os
16import shutil
17import struct
18import subprocess
19import sys
20import tempfile
21
22ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
23sys.path.insert(0, os.path.join(ROOT, "tools"))
24import address_guard as ag # noqa: E402
25
26NAME = "cs_address_guard"
27HEAP_BYTES = 2 << 20
28LIMIT = ag.RESERVED_END # the "arena": offsets below it pass without a lookup
29TABLE = 0x100000 # the page table, inside the buffer but past the arena
30BACKED = [(0x90000, 0x91000)] # the one page outside the arena the table backs
31SEEDS = {0x90000: 0xA11CE000, 0x90004: 0xA11CE004, 0x90FFC: 0xF00DF00D, 0x91000: 0xF00DF00E,
32 0xA0000: 0xBADBAD00, 0xA0004: 0xBADBAD04, 0xA0008: 0xBADBAD08}
33# out[0..7] (cs_address_guard.asm's header) and other words after the run.
34EXPECTED_ON = [0xA11CE000, 0, 0, 0, 0, 0, 0xA11CE004, 0]
35EXPECTED_OFF = [0xA11CE000, 0xBADBAD00, 0xBADBAD08, 0xF00DF00D, 0xF00DF00E, 0xBADBAD00, 0xA11CE004, 0xBADBAD00]
36MEMORY_ON = {0xA0004: 0xBADBAD04, 0xA0008: 0xBADBAD08, # untouched
37 ag.DUMP + 4: 0x5707, ag.DUMP + 8: 1, # where the refused store and atomic went
38 ag.HEADER + 24: 6, # six refused accesses
39 ag.HEADER + 32: 0xA0000, ag.HEADER + 36: 0} # the last one, the s_load at 0xa0000
40MEMORY_OFF = {0xA0004: 0x5707, 0xA0008: 0xBADBAD09, ag.DUMP + 4: 0, ag.HEADER + 24: 0}
41
42
43def heap(guard_on):
44 """The heap's bytes: header (without the magic when not `guard_on`), seeds and page table; zero elsewhere."""
45 words = ag.table_words(BACKED)
46 end = TABLE + 4 * len(words)
47 assert end <= HEAP_BYTES
48 buf = bytearray(end)
49 hdr = bytearray(ag.header(LIMIT, TABLE))
50 if not guard_on:
51 hdr[0:8] = bytes(8)
52 buf[ag.HEADER:ag.HEADER + len(hdr)] = hdr
53 for at, value in SEEDS.items():
54 struct.pack_into("<I", buf, at, value)
55 struct.pack_into(f"<{len(words)}I", buf, TABLE, *words)
56 return bytes(buf)
57
58
59def find_tool(build, name):
60 for sub in ("", "RelWithDebInfo", "Release", "Debug"):
61 for ext in ("", ".exe"):
62 path = os.path.join(build, sub, name + ext)
63 if os.path.isfile(path):
64 return path
65 return None
66
67
68def main(argv=None):
69 ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0])
70 ap.add_argument("--build", default=os.path.join(ROOT, "runtime", "build"), help="folder with vk_compute_test")
71 ap.add_argument("--llvm-mc", default=os.environ.get("LLVM_MC", "llvm-mc"))
72 ap.add_argument("--work", default=None, help="keep the intermediate files here")
73 a = ap.parse_args(argv)
74 vk_compute = find_tool(a.build, "vk_compute_test")
75 if not vk_compute:
76 print(f"SKIP: no vk_compute_test under {a.build}")
77 return 77
78 if not shutil.which(a.llvm_mc.split()[0]):
79 print(f"SKIP: {a.llvm_mc} not found")
80 return 77
81 sys.path.insert(0, os.path.join(ROOT, "runtime", "test", "shaders"))
82 sys.path.insert(0, os.path.join(ROOT, "scripts"))
83 from compute_fixture import compute_header
84 import run_gpu_tests
85 work = a.work or tempfile.mkdtemp(prefix="leonida-guard-")
86 asm = os.path.join(ROOT, "runtime", "test", "shaders", NAME + ".asm")
87 for sub in ("disasm", "fssm", "spirv"):
88 os.makedirs(os.path.join(work, sub), exist_ok=True)
89 run_gpu_tests.assemble_to_s(a.llvm_mc, asm, os.path.join(work, "disasm", NAME + ".s"), NAME)
90 with open(os.path.join(work, NAME + ".dxbc"), "wb") as f:
91 f.write(run_gpu_tests.make_dxbc([]))
92 with open(os.path.join(work, "fssm", NAME + ".fssm"), "wb") as f:
93 f.write(compute_header(asm))
94 spirv = os.path.join(work, "spirv")
95 p = subprocess.run([sys.executable, "-I", os.path.join(ROOT, "tools", "rdna2spirv.py"),
96 os.path.join(work, "disasm"), "--out", spirv, "--address-guard"],
97 capture_output=True, text=True)
98 spv = os.path.join(spirv, NAME + ".spv")
99 if p.returncode != 0 or not os.path.isfile(spv):
100 print(p.stdout + p.stderr)
101 print("FAIL: translation")
102 return 1
103 failures = 0
104 for guard_on, expected, memory in ((True, EXPECTED_ON, MEMORY_ON), (False, EXPECTED_OFF, MEMORY_OFF)):
105 label = "guard on" if guard_on else "guard off"
106 init, dump = os.path.join(work, f"heap_{label[6:]}.bin"), os.path.join(work, f"dump_{label[6:]}.bin")
107 with open(init, "wb") as f:
108 f.write(heap(guard_on))
109 env = dict(os.environ, VKC_HEAP_INIT=init, VKC_OUT_WORDS=str(HEAP_BYTES // 4), VKC_DUMP=dump)
110 r = subprocess.run([vk_compute, spv, "1", "dump"], capture_output=True, text=True, env=env, timeout=120)
111 if r.returncode != 0 or not os.path.isfile(dump):
112 print(f"FAIL ({label}): vk_compute_test exit {r.returncode}\n{r.stdout}{r.stderr}")
113 failures += 1
114 continue
115 with open(dump, "rb") as f:
116 data = f.read()
117 word = lambda at: struct.unpack_from("<I", data, at)[0] # noqa: E731
118 got = [word(4 * k) for k in range(8)]
119 bad = [f"out[{k}] = {g:#x}, want {w:#x}" for k, (g, w) in enumerate(zip(got, expected)) if g != w]
120 bad += [f"[{at:#x}] = {word(at):#x}, want {w:#x}" for at, w in memory.items() if word(at) != w]
121 print(f"{'PASS' if not bad else 'FAIL'} ({label}): out = {' '.join(f'{g:#x}' for g in got)}")
122 for line in bad:
123 print(" " + line)
124 failures += bool(bad)
125 return 1 if failures else 0
126
127
128if __name__ == "__main__":
129 try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode
130 sys.stdout.reconfigure(errors="replace")
131 except (AttributeError, ValueError, OSError):
132 pass
133 sys.exit(main())
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py
index f87290ec6..60e968783 100644
--- a/scripts/run_gpu_tests.py
+++ b/scripts/run_gpu_tests.py
@@ -1205,7 +1205,7 @@ def run_suite(a, work: str) -> int:
1205 results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated())) 1205 results.append((name,) + wavemask_check(vk_compute, spv, cs_env, w64_emulated()))
1206 elif name in ("cs_smem_vcc_base", "cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_w32_lane_wrap", "cs_movrelsd_2", "cs_w32_permute", "cs_w32_sincos", "cs_w32_buffer_sub16", "cs_w32_buffer_store_sub", "cs_w32_fcmpswap", "cs_w32_permlane_fi", "cs_exec_const", "cs_w32_mask_imm", "cs_w64_mask_imm", "cs_w32_lds_u8_d16", "cs_w32_lds_subdword", "cs_w32_lds_wide", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", "cs_wave64_ballot", "cs_wm_half_ops", "cs_wm_half_cmp", "cs_wm_bfm64", "cs_wm_scc_rfl", "cs_wqm_w64", "cs_wqm_w32", "cs_wqm_w64_half", 1206 elif name in ("cs_smem_vcc_base", "cs_store", "cs_signed_zero_nan", "cs_smem_soffset_imm", "cs_w32_lane_wrap", "cs_movrelsd_2", "cs_w32_permute", "cs_w32_sincos", "cs_w32_buffer_sub16", "cs_w32_buffer_store_sub", "cs_w32_fcmpswap", "cs_w32_permlane_fi", "cs_exec_const", "cs_w32_mask_imm", "cs_w64_mask_imm", "cs_w32_lds_u8_d16", "cs_w32_lds_subdword", "cs_w32_lds_wide", "cs_w32_int_ext", "cs_w32_salu64", "cs_w32_misc_ext", "cs_w32_new_ops", "cs_wave64_ballot", "cs_wm_half_ops", "cs_wm_half_cmp", "cs_wm_bfm64", "cs_wm_scc_rfl", "cs_wqm_w64", "cs_wqm_w32", "cs_wqm_w64_half",
1207 "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi", 1207 "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", "cs_dpp_ops", "cs_dpp_bank", "cs_dpp_fi",
1208 "cs_dpp_bound", "cs_dpp_cmp", "cs_dpp_w64", 1208 "cs_dpp_bound", "cs_dpp_cmp", "cs_dpp_cmpx", "cs_dpp_w64",
1209 "cs_w64_mask_detect", 1209 "cs_w64_mask_detect",
1210 "cs_w64x_readlane", "cs_w64x_writelane", "cs_w64x_readfirstlane", "cs_w64x_bpermute", "cs_w64x_permute", 1210 "cs_w64x_readlane", "cs_w64x_writelane", "cs_w64x_readfirstlane", "cs_w64x_bpermute", "cs_w64x_permute",
1211 "cs_w64x_branch", "cs_w64x_ballot", "cs_w64x_wg128_branches", "cs_w64x_lds_raw", 1211 "cs_w64x_branch", "cs_w64x_ballot", "cs_w64x_wg128_branches", "cs_w64x_lds_raw",
@@ -1274,6 +1274,7 @@ def run_suite(a, work: str) -> int:
1274 "cs_dpp_bank": [0xFFFFFFFF, 0xFFFFFFFE, 0xFFFFFFFD, 0xFFFFFFFC, 7, 7, 7, 7], 1274 "cs_dpp_bank": [0xFFFFFFFF, 0xFFFFFFFE, 0xFFFFFFFD, 0xFFFFFFFC, 7, 7, 7, 7],
1275 "cs_dpp_fi": [1, 2, 3, 0x7777, 5, 6, 7, 0x7777], 1275 "cs_dpp_fi": [1, 2, 3, 0x7777, 5, 6, 7, 0x7777],
1276 "cs_dpp_cmp": [3, 2, 3, 2, 1, 0, 1, 0], 1276 "cs_dpp_cmp": [3, 2, 3, 2, 1, 0, 1, 0],
1277 "cs_dpp_cmpx": [1, 1, 0, 0, 3, 3, 2, 2],
1277 "cs_dpp_w64": [1, 0, 3, 2, 5, 4, 7, 6], 1278 "cs_dpp_w64": [1, 0, 3, 2, 5, 4, 7, 6],
1278 # SHADER-99: -0 and NaN survive (SignedZeroInfNanPreserve, cs_signed_zero_nan.asm); 0 in out[4..7] 1279 # SHADER-99: -0 and NaN survive (SignedZeroInfNanPreserve, cs_signed_zero_nan.asm); 0 in out[4..7]
1279 # without it 1280 # without it
@@ -1352,7 +1353,7 @@ def run_suite(a, work: str) -> int:
1352 "cs_bpermute32", "cs_w32_partial_scmp", "cs_w32_partial_permute", "cs_w32_permlane_fi", "cs_w32_sincos", "cs_w32_buffer_sub16", "cs_w32_buffer_store_sub", "cs_w32_fcmpswap", 1353 "cs_bpermute32", "cs_w32_partial_scmp", "cs_w32_partial_permute", "cs_w32_permlane_fi", "cs_w32_sincos", "cs_w32_buffer_sub16", "cs_w32_buffer_store_sub", "cs_w32_fcmpswap",
1353 "cs_lds_b64_cmpst", "cs_lds_xchg64_ext", "cs_lds_atomics_ext", "cs_w32_wrxchg2_ext", "cs_w32_wrxchg2st64", "cs_exec_const", "cs_w32_mask_imm", "cs_mask_vgpr_exec", 1354 "cs_lds_b64_cmpst", "cs_lds_xchg64_ext", "cs_lds_atomics_ext", "cs_w32_wrxchg2_ext", "cs_w32_wrxchg2st64", "cs_exec_const", "cs_w32_mask_imm", "cs_mask_vgpr_exec",
1354 "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8", 1355 "cs_dpp", "cs_dpp_row", "cs_dpp_mask", "cs_dpp8",
1355 "cs_dpp_ops", "cs_dpp_bound", "cs_dpp_bank", "cs_dpp_fi", "cs_dpp_cmp", "cs_w32_andn2_exec", 1356 "cs_dpp_ops", "cs_dpp_bound", "cs_dpp_bank", "cs_dpp_fi", "cs_dpp_cmp", "cs_dpp_cmpx", "cs_w32_andn2_exec",
1356 "cs_w32_exec_computed") and not emulated and not partial 1357 "cs_w32_exec_computed") and not emulated and not partial
1357 if partial: 1358 if partial:
1358 cs_env = dict(os.environ, VKC_SUBGROUP_SIZE="32" if emulated else "64") 1359 cs_env = dict(os.environ, VKC_SUBGROUP_SIZE="32" if emulated else "64")
diff --git a/scripts/windows-boot/boot.ps1 b/scripts/windows-boot/boot.ps1
index 7863054b3..db11e4e76 100644
--- a/scripts/windows-boot/boot.ps1
+++ b/scripts/windows-boot/boot.ps1
@@ -50,7 +50,8 @@
50 50
51.PARAMETER InputScript 51.PARAMETER InputScript
52 LEONIDA_INPUT_SCRIPT: timed pad presses, seconds since the pad's first poll (button@seconds, comma-separated; 52 LEONIDA_INPUT_SCRIPT: timed pad presses, seconds since the pad's first poll (button@seconds, comma-separated;
53 buttons a b x y start back lb rb up down left right). Sets LEONIDA_KEYBOARD_PAD=always. Builds older than 53 buttons a b x y start back lb rb up down left right). Each press is held 300 ms; button@seconds:hold holds it
54 longer, e.g. b@1100:3 for a title that reads its pad only every few seconds. Sets LEONIDA_KEYBOARD_PAD=always. Builds older than
54 main @ 8146ef690 ignore a script longer than 63 characters. Default 'a@45,a@60,a@75,a@90'. 55 main @ 8146ef690 ignore a script longer than 63 characters. Default 'a@45,a@60,a@75,a@90'.
55 56
56.PARAMETER NoInput 57.PARAMETER NoInput
@@ -75,6 +76,9 @@
75.PARAMETER ExtraArgs 76.PARAMETER ExtraArgs
76 More gta6rt arguments, appended after the standard ones. 77 More gta6rt arguments, appended after the standard ones.
77 78
79.PARAMETER FirstRunUi
80 Launch with the offline first-run UI profile instead of the generic runtime profile.
81
78.PARAMETER Python 82.PARAMETER Python
79 Python 3.12+ used for tools/boot_trace.py. Default: python, else py -3. 83 Python 3.12+ used for tools/boot_trace.py. Default: python, else py -3.
80 84
@@ -118,6 +122,7 @@ param(
118 [switch]$NoCapture, 122 [switch]$NoCapture,
119 [switch]$NoInput, 123 [switch]$NoInput,
120 [string[]]$ExtraArgs = @(), 124 [string[]]$ExtraArgs = @(),
125 [switch]$FirstRunUi,
121 [string]$Python = "", 126 [string]$Python = "",
122 [int]$SummaryLines = 40, 127 [int]$SummaryLines = 40,
123 [int]$LockWaitSeconds = 3600, 128 [int]$LockWaitSeconds = 3600,
@@ -277,7 +282,8 @@ foreach ($pair in $EnvPairs) {
277} 282}
278if ($bootEnv["LEONIDA_CAPTURE"]) { $Capture = $bootEnv["LEONIDA_CAPTURE"] } 283if ($bootEnv["LEONIDA_CAPTURE"]) { $Capture = $bootEnv["LEONIDA_CAPTURE"] }
279 284
280$gameArgs = @("--run", $Exe, "--game-dir", $GameDir, "--overlay", $Overlay, "--trace", $TraceFile, "--trace-d3d12") + $ExtraArgs 285$launchMode = if ($FirstRunUi) { "--first-run-ui" } else { "--run" }
286$gameArgs = @($launchMode, $Exe, "--game-dir", $GameDir, "--overlay", $Overlay, "--trace", $TraceFile, "--trace-d3d12") + $ExtraArgs
281$argLine = ($gameArgs | ForEach-Object { ConvertTo-ProcessArgument ([string]$_) }) -join " " 287$argLine = ($gameArgs | ForEach-Object { ConvertTo-ProcessArgument ([string]$_) }) -join " "
282 288
283if (-not $DigestOnly) { 289if (-not $DigestOnly) {
diff --git a/tests/conftest.py b/tests/conftest.py
index 115282761..308590f67 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -156,6 +156,10 @@ KNOWN_VAL_ISSUES = {}
156# 0x8088 = 4 user SGPRs, TGID_X, 512 B of LDS; group 64x1x1 (the header the cs_* samples in runtime/test/shaders use). 156# 0x8088 = 4 user SGPRs, TGID_X, 512 B of LDS; group 64x1x1 (the header the cs_* samples in runtime/test/shaders use).
157DEFAULT_CS_HEADER = (0x8088, (64, 1, 1)) 157DEFAULT_CS_HEADER = (0x8088, (64, 1, 1))
158 158
159# The comment line a sample carries when llvm-mc cannot assemble it (cs_dpp_cmp.asm: a VOPC compare in DPP form).
160# scripts/run_gpu_tests.py has the same line; tests/test_translate.py checks that the two agree.
161TEXT_ONLY_MARK = "; run_gpu_tests: text only, llvm-mc has no gfx1013 encoding for an instruction here"
162
159 163
160class Shader: 164class Shader:
161 def __init__(self, workdir, name, asm, cs_header=DEFAULT_CS_HEADER, dxbc=EMPTY_DXBC): 165 def __init__(self, workdir, name, asm, cs_header=DEFAULT_CS_HEADER, dxbc=EMPTY_DXBC):
@@ -167,6 +171,15 @@ class Shader:
167 rsrc2, (lx, ly, lz) = cs_header 171 rsrc2, (lx, ly, lz) = cs_header
168 (workdir / "fssm").mkdir(exist_ok=True) 172 (workdir / "fssm").mkdir(exist_ok=True)
169 (workdir / "fssm" / f"{name}.fssm").write_bytes(bytes(0x138) + struct.pack("<4I", rsrc2, lx, ly, lz)) 173 (workdir / "fssm" / f"{name}.fssm").write_bytes(bytes(0x138) + struct.pack("<4I", rsrc2, lx, ly, lz))
174 self.path = disasm / f"{name}.s"
175 self.workdir = workdir
176 if any(ln.strip() == TEXT_ONLY_MARK for ln in asm.splitlines()):
177 # llvm-mc has no gfx1013 encoding for an instruction of this sample, so its text is the listing, as in
178 # assemble_to_s of scripts/run_gpu_tests.py: the translator reads straight-line code from the text alone.
179 lines = [f"; {name} code 0x0..0x0 (synthetic), gfx1013, 0 invalid words"]
180 lines += ["\t" + ln.strip() for ln in asm.splitlines() if ln.strip() and not ln.lstrip().startswith(";")]
181 self.path.write_text("\n".join(lines) + "\n", encoding="utf-8", newline="\n")
182 return
170 cmd = LLVM_MC + ["-triple=amdgcn--amdpal", "-mcpu=gfx1013"] 183 cmd = LLVM_MC + ["-triple=amdgcn--amdpal", "-mcpu=gfx1013"]
171 for ln in asm.splitlines(): 184 for ln in asm.splitlines():
172 s = ln.strip() 185 s = ln.strip()
@@ -181,9 +194,7 @@ class Shader:
181 cmd.append("-show-encoding") 194 cmd.append("-show-encoding")
182 r = subprocess.run(cmd, input=asm, capture_output=True, text=True) 195 r = subprocess.run(cmd, input=asm, capture_output=True, text=True)
183 assert r.returncode == 0, r.stderr 196 assert r.returncode == 0, r.stderr
184 self.path = disasm / f"{name}.s"
185 self.path.write_text(f"; {name} synthetic\n{r.stdout}") 197 self.path.write_text(f"; {name} synthetic\n{r.stdout}")
186 self.workdir = workdir
187 198
188 def translate(self): 199 def translate(self):
189 return rdna2spirv.translate(str(self.path)) 200 return rdna2spirv.translate(str(self.path))
diff --git a/tests/semantic/fixtures/disasm/cs_address_guard.s b/tests/semantic/fixtures/disasm/cs_address_guard.s
new file mode 100644
index 000000000..ad3c79be7
--- /dev/null
+++ b/tests/semantic/fixtures/disasm/cs_address_guard.s
@@ -0,0 +1,35 @@
1; cs_address_guard test fixture generated by tests/semantic/regen_fixtures.py from runtime/test/shaders/cs_address_guard.asm
2 v_mov_b32_e32 v0, 0x90000
3 v_mov_b32_e32 v1, 0
4 global_load_dword v2, v[0:1], off
5 v_mov_b32_e32 v0, 0xa0000
6 global_load_dword v3, v[0:1], off
7 v_mov_b32_e32 v4, 0x5707
8 global_store_dword v[0:1], v4, off offset:4
9 v_mov_b32_e32 v5, 1
10 global_atomic_add v5, v[0:1], v5, off offset:8 glc
11 v_mov_b32_e32 v0, 0x90ffc
12 global_load_dwordx2 v[6:7], v[0:1], off
13 s_mov_b32 s4, 0xa0000
14 s_mov_b32 s5, 0
15 s_mov_b32 s6, 0x100
16 s_mov_b32 s7, 0x31016fac
17 v_mov_b32_e32 v8, 0
18 buffer_load_dword v8, v8, s[4:7], 0 offen
19 s_mov_b32 s8, 0x90000
20 s_mov_b32 s9, 0
21 s_load_dword s10, s[8:9], 0x4
22 s_load_dword s11, s[4:5], 0x0
23 s_waitcnt vmcnt(0) lgkmcnt(0)
24 v_mov_b32_e32 v9, 0
25 buffer_store_dword v2, v9, s[0:3], 0 offen
26 buffer_store_dword v3, v9, s[0:3], 0 offen offset:4
27 buffer_store_dword v5, v9, s[0:3], 0 offen offset:8
28 buffer_store_dword v6, v9, s[0:3], 0 offen offset:12
29 buffer_store_dword v7, v9, s[0:3], 0 offen offset:16
30 buffer_store_dword v8, v9, s[0:3], 0 offen offset:20
31 v_mov_b32_e32 v10, s10
32 buffer_store_dword v10, v9, s[0:3], 0 offen offset:24
33 v_mov_b32_e32 v11, s11
34 buffer_store_dword v11, v9, s[0:3], 0 offen offset:28
35 s_endpgm
diff --git a/tests/semantic/fixtures/disasm/cs_dpp_cmpx.s b/tests/semantic/fixtures/disasm/cs_dpp_cmpx.s
new file mode 100644
index 000000000..90172ddfa
--- /dev/null
+++ b/tests/semantic/fixtures/disasm/cs_dpp_cmpx.s
@@ -0,0 +1,15 @@
1; cs_dpp_cmpx test fixture generated by tests/semantic/regen_fixtures.py from runtime/test/shaders/cs_dpp_cmpx.asm
2 v_mbcnt_lo_u32_b32 v0, -1, 0
3 v_add_nc_u32 v7, -4, v0
4 v_cvt_f32_i32 v1, v7
5 v_mov_b32 v6, 0
6 s_mov_b32 s10, exec_lo
7 v_cmpx_gt_f32_dpp v1, v1 quad_perm:[2,3,0,1] row_mask:0xf bank_mask:0xf bound_ctrl:1 fi:1
8 v_mov_b32 v6, 1
9 s_mov_b32 exec_lo, s10
10 v_cmpx_gt_f32_dpp v1, -v1 quad_perm:[2,3,0,1] row_mask:0xf bank_mask:0xf bound_ctrl:1 fi:1
11 v_add_nc_u32 v6, 2, v6
12 s_mov_b32 exec_lo, s10
13 v_lshlrev_b32 v2, 2, v0
14 buffer_store_dword v6, v2, s[0:3], 0 offen
15 s_endpgm
diff --git a/tests/semantic/fixtures/wave64_single_wave_barrier.asm b/tests/semantic/fixtures/wave64_single_wave_barrier.asm
new file mode 100644
index 000000000..ffbb6aba2
--- /dev/null
+++ b/tests/semantic/fixtures/wave64_single_wave_barrier.asm
@@ -0,0 +1,22 @@
1; One wave64 workgroup: a uniform loop and a uniform branch, each with a read of another wave32 half's lane, which
2; the emulation exchanges through %x_buf behind a workgroup barrier. s4 is a push constant: 0 skips the branch.
3v_lshlrev_b32_e32 v2, 2, v0
4v_mov_b32_e32 v1, v0
5s_mov_b32 s8, 0
6s_mov_b32 s9, 0
7again:
8v_add_nc_u32_e32 v1, 1, v1
9v_readlane_b32 s10, v1, 40
10s_add_u32 s9, s9, s10
11s_add_u32 s8, s8, 1
12s_cmp_eq_u32 s8, 3
13s_cbranch_scc0 again
14s_cmp_eq_u32 s4, 0
15s_cbranch_scc1 done
16v_add_nc_u32_e32 v1, 100, v1
17v_readlane_b32 s11, v1, 41
18s_add_u32 s9, s9, s11
19done:
20v_mov_b32_e32 v3, s9
21buffer_store_dword v3, v2, s[0:3], 0 offen
22s_endpgm
diff --git a/tests/semantic/test_address_guard.py b/tests/semantic/test_address_guard.py
new file mode 100644
index 000000000..e503ed732
--- /dev/null
+++ b/tests/semantic/test_address_guard.py
@@ -0,0 +1,177 @@
1"""rdna2spirv.py --address-guard: every heap_base + VA access is checked against the runtime's page table.
2
3Standard library only; no GPU, no LLVM, no game files.
4
5docs/d3d12_vulkan.md, "Address guard": an access whose first and last byte are below the header's limit (the arena)
6passes on a compare; any other passes only when the page table (tools/address_guard.py, runtime/src/address_guard.h)
7backs the 4 KiB pages of both. A refused load reads the zero area, a refused store or atomic writes the dump area
8and an atomic returns 0; each refusal adds 1 to the header's count and writes its offset. Without the header's magic
9(the runtime's guard off) every access passes. Without --address-guard the module is what it was.
10
11cs_address_guard (runtime/test/shaders/cs_address_guard.asm, header: the expected words) runs here on the heap
12scripts/run_address_guard_gpu_test.py gives it on the GPU, through spirv_mini_interp, with the guard on and off.
13"""
14import os
15import re
16import struct
17import sys
18import unittest
19
20HERE = os.path.dirname(os.path.abspath(__file__))
21if HERE not in sys.path:
22 sys.path.insert(0, HERE) # python -I leaves the script's folder off sys.path
23
24import support # noqa: E402 (support puts tools/ on sys.path, honouring LEONIDA_TOOLS_DIR)
25import spirv_mini_interp as si # noqa: E402
26import rdna2spirv # noqa: E402
27import address_guard as ag # noqa: E402
28
29ROOT = os.path.dirname(os.path.dirname(HERE))
30SCRIPTS = os.path.join(ROOT, "scripts")
31if SCRIPTS not in sys.path:
32 sys.path.insert(0, SCRIPTS)
33import run_address_guard_gpu_test as gpu # noqa: E402 (the heap and the expected words, shared with the GPU run)
34
35# build.py's compute header for "; group: 1,1,1" and "; rsrc2: 0x8090": 8 user SGPRs, one thread.
36FSSM = bytearray(0x148)
37struct.pack_into("<4I", FSSM, 0x138, 0x8090, 1, 1, 1)
38FSSM = bytes(FSSM)
39VSHARP = [0, 0, 0x100, 0x31016FAC] # out[]: base 0, 0x100 bytes, raw bounds
40
41
42def translate(name="cs_address_guard", guard=True, lines=None):
43 saved = rdna2spirv.ADDRESS_GUARD
44 rdna2spirv.ADDRESS_GUARD = guard
45 try:
46 if lines is not None:
47 return support.translate_lines(name, lines, fssm=FSSM)
48 return support.translate_fixture(name, fssm=FSSM)
49 finally:
50 rdna2spirv.ADDRESS_GUARD = saved
51
52
53def run(spv, heap):
54 """Run one invocation on a copy of `heap` (heap_base 0, so a host address is the heap offset)."""
55 mem = {i * 4: w for i, w in enumerate(struct.unpack(f"<{len(heap) // 4}I", heap)) if w}
56 si.run_workgroup(spv, 1, 32, inputs_for=lambda i: {"%wg_id": (0, 0, 0), "%local_id": (i, 0, 0), "%sg_lane": i},
57 push_constants=VSHARP + [0] * 32, memory=mem)
58 return mem
59
60
61class GuardedFixture(unittest.TestCase):
62 @classmethod
63 def setUpClass(cls):
64 cls.spv = translate()
65
66 def test_guard_on(self):
67 mem = run(self.spv, gpu.heap(True))
68 self.assertEqual([mem.get(4 * k, 0) for k in range(8)], gpu.EXPECTED_ON)
69 for at, want in gpu.MEMORY_ON.items():
70 with self.subTest(at=hex(at)):
71 self.assertEqual(mem.get(at, 0), want)
72
73 def test_guard_off_at_run_time(self):
74 """The same module on a heap without the magic: every access goes where it points."""
75 mem = run(self.spv, gpu.heap(False))
76 self.assertEqual([mem.get(4 * k, 0) for k in range(8)], gpu.EXPECTED_OFF)
77 for at, want in gpu.MEMORY_OFF.items():
78 with self.subTest(at=hex(at)):
79 self.assertEqual(mem.get(at, 0), want)
80
81 def test_unguarded_module(self):
82 """Without --address-guard nothing reads the header, and the program behaves as with the guard off."""
83 spv = translate(guard=False)
84 self.assertNotIn("guard", spv)
85 mem = run(spv, gpu.heap(True))
86 self.assertEqual([mem.get(4 * k, 0) for k in range(8)], gpu.EXPECTED_OFF)
87
88 def test_every_access_is_guarded(self):
89 """Each PhysicalStorageBuffer pointer of %main comes from a %guard_fn call, except the header read itself."""
90 main = re.search(r"%main = OpFunction .*?OpFunctionEnd", self.spv, re.S).group(0)
91 calls = set(re.findall(r"(%\S+) = OpFunctionCall %ulong %guard_fn", main))
92 sources = re.findall(r"= OpConvertUToPtr %_ptr_PSB_\w+ (%\S+)", main)
93 self.assertEqual(sources.count("%gd_hp"), 1)
94 others = [s for s in sources if s != "%gd_hp"]
95 # 2 global loads, the store, the atomic, the x2 load, the buffer load, 2 s_loads and the 8 stores to out[]
96 self.assertEqual(len(others), 16)
97 self.assertTrue(set(others) <= calls, set(others) - calls)
98
99
100class GuardForms(unittest.TestCase):
101 """The kind and span each instruction family passes, read off the %guard_fn calls (sink, last-byte delta)."""
102
103 def calls(self, lines):
104 spv = translate("cs_guard_forms", lines=lines + ["s_endpgm"])
105 consts = {m.group(1): int(m.group(2)) for m in re.finditer(r"(%\S+) = OpConstant %ulong (\d+)", spv)}
106 out = []
107 for m in re.finditer(r"OpFunctionCall %ulong %guard_fn %heap_base %gd_on %gd_limit %gd_table \S+ (\S+) (\S+)",
108 spv):
109 out.append((consts.get(m.group(1), m.group(1)), consts[m.group(2)]))
110 return out
111
112 def test_loads_read_the_zero_area(self):
113 self.assertEqual(self.calls(["global_load_dwordx4 v[2:5], v[0:1], off"]), [(15, ag.ZERO)])
114 self.assertEqual(self.calls(["s_load_dwordx8 s[8:15], s[0:1], 0x0"]), [(31, ag.ZERO)])
115 self.assertEqual(self.calls(["global_load_ubyte v2, v[0:1], off"]), [(3, ag.ZERO)])
116
117 def test_stores_and_atomics_write_the_dump_area(self):
118 self.assertEqual(self.calls(["global_store_dwordx3 v[0:1], v[2:4], off"]), [(11, ag.DUMP)])
119 self.assertEqual(self.calls(["global_atomic_or_x2 v[0:1], v[2:3], off"]), [(7, ag.DUMP)])
120 self.assertEqual(self.calls(["buffer_atomic_add v2, v1, s[0:3], 0 offen glc"]), [(3, ag.DUMP)])
121 # a byte store merges into its dword with atomic and/or: one guarded dword
122 self.assertEqual(self.calls(["global_store_byte v[0:1], v2, off"]), [(3, ag.DUMP)])
123
124 def test_atomic_result_is_zero_when_refused(self):
125 spv = translate("cs_guard_atomic", lines=["global_atomic_add v5, v[0:1], v5, off glc", "s_endpgm"])
126 call = re.search(r"(%\S+) = OpFunctionCall %ulong %guard_fn", spv).group(1)
127 ok = re.search(rf"(%\S+) = OpIEqual %bool {re.escape(call)} ", spv)
128 self.assertIsNotNone(ok)
129 self.assertRegex(spv, rf"= OpSelect %uint {re.escape(ok.group(1))} %\S+ %c0\b")
130
131
132class TableModel(unittest.TestCase):
133 """tools/address_guard.py, the Python reference of the table the runtime writes."""
134
135 def test_pages_and_chunks(self):
136 words = ag.table_words([(0x90000, 0x90001), (0x5_0000_1000, 0x5_0000_3000), (-0x2000 & ag.MASK48, 0)])
137 self.assertTrue(ag.passes(words, 0x80000, 0x90000, 4))
138 self.assertTrue(ag.passes(words, 0x80000, 0x90ffc, 4))
139 self.assertFalse(ag.passes(words, 0x80000, 0x90ffc, 8)) # the last byte is on the next page
140 self.assertTrue(ag.passes(words, 0x80000, 0x5_0000_2ff0, 16))
141 self.assertFalse(ag.passes(words, 0x80000, 0x5_0000_3000, 4))
142 self.assertFalse(ag.passes(words, 0x80000, 0x6_0000_0000, 4)) # another chunk, nothing backed
143 self.assertTrue(ag.passes(words, 0x80000, 0x7fffc, 4)) # the arena, no lookup
144 self.assertFalse(ag.passes(words, 0x80000, 0x7fffc, 8)) # past the arena, page 0x80 unbacked
145
146 def test_negative_offsets(self):
147 """A buffer below the arena (LEONIDA_IMPORT_BELOW_ARENA=1): its 48-bit offset, sign-extended."""
148 words = ag.table_words([((-0x2000) & ag.MASK48, (-0x1000) & ag.MASK48)])
149 self.assertTrue(ag.passes(words, 0x80000, (-0x2000) & ag.MASK48, 4))
150 self.assertFalse(ag.passes(words, 0x80000, (-0x1000) & ag.MASK48, 4))
151 self.assertFalse(ag.passes(words, 0x80000, (-4) & ag.MASK48, 8)) # wraps through 0: not the arena
152
153 def test_full_block_when_out_of_room(self):
154 words = ag.table_words([(1 << 32, (1 << 32) + 1), (2 << 32, (2 << 32) + 1)], max_blocks=1)
155 self.assertTrue(ag.passes(words, 0x80000, 1 << 32, 4))
156 self.assertFalse(ag.passes(words, 0x80000, (1 << 32) + 0x1000, 4))
157 self.assertTrue(ag.passes(words, 0x80000, (2 << 32) + 0x5000, 4)) # the full block: all of chunk 2
158
159 def test_constants_match_the_translator_and_the_runtime(self):
160 self.assertEqual((rdna2spirv.GUARD_HEADER, rdna2spirv.GUARD_ZERO, rdna2spirv.GUARD_DUMP, rdna2spirv.GUARD_MAGIC,
161 rdna2spirv.GUARD_L1, rdna2spirv.GUARD_BLOCK_WORDS),
162 (ag.HEADER, ag.ZERO, ag.DUMP, ag.MAGIC, ag.L1, ag.BLOCK_WORDS))
163 with open(os.path.join(ROOT, "runtime", "src", "address_guard.h"), encoding="utf-8") as f:
164 text = f.read()
165 for name, value in (("kGuardHeader", ag.HEADER), ("kGuardZero", ag.ZERO), ("kGuardDump", ag.DUMP),
166 ("kGuardEnd", ag.RESERVED_END), ("kGuardLevel1", ag.L1),
167 ("kGuardBlockWords", ag.BLOCK_WORDS)):
168 with self.subTest(name=name):
169 m = re.search(rf"{name} = (1u << \d+|0x[0-9a-fA-F]+|\d+)", text)
170 self.assertIsNotNone(m)
171 v = m.group(1)
172 self.assertEqual(1 << int(v.split("<<")[1]) if "<<" in v else int(v, 0), value)
173 self.assertIn('"LGUARD01"', text)
174
175
176if __name__ == "__main__":
177 unittest.main()
diff --git a/tests/semantic/test_dpp_compare.py b/tests/semantic/test_dpp_compare.py
index c6f429fb5..46cdc0b3e 100644
--- a/tests/semantic/test_dpp_compare.py
+++ b/tests/semantic/test_dpp_compare.py
@@ -9,6 +9,9 @@ own src1), with 0 for src0 when the selected lane is out of its row or inactive.
9writes are translated: all rows and banks enabled and either `bound_ctrl:1` or DPP8. A form that leaves a lane 9writes are translated: all rows and banks enabled and either `bound_ctrl:1` or DPP8. A form that leaves a lane
10unwritten is refused, because what that lane's mask bit becomes is not measured. 10unwritten is refused, because what that lane's mask bit becomes is not measured.
11 11
12`v_cmpx` in DPP form (SHADER-VOPCX-DPP) takes the same forms and writes EXEC instead of VCC. 78 pipeline-library
13pixel shaders of 1.0.2.1 hold it, all as `v_cmpx_gt_f32_dpp vN, -vM quad_perm:[2,3,0,1] ... bound_ctrl:1 fi:1`.
14
12The values come from running the translated module in tests/semantic/spirv_wave_interp.py. 15The values come from running the translated module in tests/semantic/spirv_wave_interp.py.
13 16
14Standard library only; no GPU, no LLVM, no SPIRV-Tools, no game files. 17Standard library only; no GPU, no LLVM, no SPIRV-Tools, no game files.
@@ -66,34 +69,40 @@ def compare_vs(op, form, exec_off=None):
66 69
67def compare_reference(op, form, exec_off=None, wave=32): 70def compare_reference(op, form, exec_off=None, wave=32):
68 """The VCC bit per lane after compare_vs: an inactive lane's bit is 0, as for a plain compare.""" 71 """The VCC bit per lane after compare_vs: an inactive lane's bit is 0, as for a plain compare."""
69 mods = form.split()
70 fi = any(m == "fi:1" for m in mods)
71 relation = COMPARES[op][1] 72 relation = COMPARES[op][1]
72 active = [lane != exec_off for lane in range(wave)] 73 active = [lane != exec_off for lane in range(wave)]
73 out = [] 74 out = []
74 for lane in range(wave): 75 for lane in range(wave):
75 loc, ok = lane & 15, True 76 src = source_lane(form, lane, active)
76 if mods[0].startswith("dpp8:"): 77 out.append(int(active[lane] and relation(src if src is not None else 0, lane)))
77 src = (lane & ~7) | [int(x) for x in mods[0][6:-1].split(",")][lane & 7]
78 elif mods[0].startswith("quad_perm:"):
79 src = (lane & ~3) | [int(x) for x in mods[0][11:-1].split(",")][lane & 3]
80 else:
81 kind, _, n = mods[0].partition(":")
82 n = int(n or 0)
83 if kind == "row_shr":
84 ok, s = loc >= n, loc - n
85 elif kind == "row_shl":
86 ok, s = loc + n < 16, loc + n
87 elif kind == "row_ror":
88 s = (loc - n) & 15
89 else: # row_mirror
90 s = 15 - loc
91 src = (lane & ~15) | (s & 15)
92 valid = ok and (active[src] or fi)
93 out.append(int(active[lane] and relation(src if valid else 0, lane)))
94 return out 78 return out
95 79
96 80
81def source_lane(form, lane, active):
82 """The lane DPP `form` reads src0 from for `lane`, or None where src0 reads 0 (out of the row, or inactive
83 without fi:1)."""
84 mods = form.split()
85 fi = any(m == "fi:1" for m in mods)
86 loc, ok = lane & 15, True
87 if mods[0].startswith("dpp8:"):
88 src = (lane & ~7) | [int(x) for x in mods[0][6:-1].split(",")][lane & 7]
89 elif mods[0].startswith("quad_perm:"):
90 src = (lane & ~3) | [int(x) for x in mods[0][11:-1].split(",")][lane & 3]
91 else:
92 kind, _, n = mods[0].partition(":")
93 n = int(n or 0)
94 if kind == "row_shr":
95 ok, s = loc >= n, loc - n
96 elif kind == "row_shl":
97 ok, s = loc + n < 16, loc + n
98 elif kind == "row_ror":
99 s = (loc - n) & 15
100 else: # row_mirror
101 s = 15 - loc
102 src = (lane & ~15) | (s & 15)
103 return src if ok and (active[src] or fi) else None
104
105
97def run(op, form, exec_off=None): 106def run(op, form, exec_off=None):
98 res = wi.run_wave(compare_vs(op, form, exec_off), wave=32, 107 res = wi.run_wave(compare_vs(op, form, exec_off), wave=32,
99 builtins={"VertexIndex": lambda lane: lane, "InstanceIndex": lambda lane: 0}) 108 builtins={"VertexIndex": lambda lane: lane, "InstanceIndex": lambda lane: 0})
@@ -124,30 +133,105 @@ class DppCompare(unittest.TestCase):
124 def test_a_form_that_leaves_a_lane_unwritten_is_refused(self): 133 def test_a_form_that_leaves_a_lane_unwritten_is_refused(self):
125 for form in UNWRITTEN_FORMS: 134 for form in UNWRITTEN_FORMS:
126 with self.subTest(form=form): 135 with self.subTest(form=form):
127 with self.assertRaisesRegex(Unsupported, "DPP compare with lanes that keep their mask bit"): 136 with self.assertRaisesRegex(Unsupported, "DPP compare with lanes DPP leaves unwritten"):
128 compare_vs("v_cmp_gt_f32_dpp", form) 137 compare_vs("v_cmp_gt_f32_dpp", form)
129 138
130 def test_cmpx_is_refused(self): 139
131 lines = ["v_mbcnt_lo_u32_b32 v0, -1, 0", 140# v_cmpx in DPP form (SHADER-VOPCX-DPP): the same lane selection, with the result written to EXEC. src0 is the first
132 "v_cmpx_gt_u32_dpp v0, v0 quad_perm:[1,0,3,2] row_mask:0xf bank_mask:0xf bound_ctrl:1", 141# operand, since v_cmpx prints no destination. f32 compares read v1 = float(lane - 4), so a negated src1 changes the
142# result; integer compares read v0 = lane.
143CMPX = {
144 "v_cmpx_gt_f32_dpp": ("v1", lambda a, b: a > b),
145 "v_cmpx_lt_u32_dpp": ("v0", lambda a, b: a < b),
146 "v_cmpx_eq_u32_dpp": ("v0", lambda a, b: a == b),
147}
148# The form all 113 DPP v_cmpx of the 78 refused pipeline-library pixel shaders of 1.0.2.1 use, with src1 negated.
149GAME_FORM = "quad_perm:[2,3,0,1] row_mask:0xf bank_mask:0xf bound_ctrl:1 fi:1"
150
151
152def cmpx_vs(op, form, exec_off=None, neg=False):
153 """A vertex shader: EXEC = `op`(DPP(src), [-]src) over the lanes on (all but `exec_off`); param0.x exports 1
154 where the new EXEC keeps the lane and 0 where it drops it."""
155 src = CMPX[op][0]
156 lines = ["v_mbcnt_lo_u32_b32 v0, -1, 0", "v_add_nc_u32_e32 v7, -4, v0", "v_cvt_f32_i32_e32 v1, v7",
157 "v_mov_b32 v4, 1", "v_mov_b32 v6, 0", "s_mov_b32 s10, exec_lo"]
158 if exec_off is not None:
159 lines.append(f"v_cmpx_ne_u32_e32 {exec_off}, v0")
160 lines += [f"{op} {src}, {'-' if neg else ''}{src} {form}", "v_mov_b32 v6, v4", "s_mov_b32 exec_lo, s10",
161 "v_mov_b32 v5, 0", "exp pos0 v5, v5, v5, v5 done", "exp param0 v6, v5, v5, v5", "s_endpgm"]
162 return support.translate_lines("vs_dpp_cmpx", lines)
163
164
165def cmpx_reference(op, form, exec_off=None, neg=False, wave=32):
166 """The EXEC bit per lane after the v_cmpx of cmpx_vs: 0 for a lane that was off, as for a plain v_cmpx."""
167 src, relation = CMPX[op]
168 value = (lambda lane: float(lane - 4)) if src == "v1" else (lambda lane: lane)
169 active = [lane != exec_off for lane in range(wave)]
170 out = []
171 for lane in range(wave):
172 s = source_lane(form, lane, active)
173 a = value(s) if s is not None else 0
174 b = -value(lane) if neg else value(lane)
175 out.append(int(active[lane] and relation(a, b)))
176 return out
177
178
179def run_cmpx(op, form, exec_off=None, neg=False):
180 res = wi.run_wave(cmpx_vs(op, form, exec_off, neg), wave=32,
181 builtins={"VertexIndex": lambda lane: lane, "InstanceIndex": lambda lane: 0})
182 return [o["%out_param0"][0] for o in res["outputs"]]
183
184
185class DppCompareExec(unittest.TestCase):
186 def test_values(self):
187 for op in CMPX:
188 for form in WRITTEN_FORMS + [GAME_FORM]:
189 for exec_off in (None, 5, 16):
190 with self.subTest(op=op, form=form, exec_off=exec_off):
191 self.assertEqual(run_cmpx(op, form, exec_off), cmpx_reference(op, form, exec_off))
192
193 def test_game_form_with_negated_src1(self):
194 for exec_off in (None, 1, 6):
195 with self.subTest(exec_off=exec_off):
196 want = cmpx_reference("v_cmpx_gt_f32_dpp", GAME_FORM, exec_off, neg=True)
197 self.assertEqual(run_cmpx("v_cmpx_gt_f32_dpp", GAME_FORM, exec_off, neg=True), want)
198 self.assertNotEqual(want, cmpx_reference("v_cmpx_gt_f32_dpp", GAME_FORM, exec_off))
199
200 def test_reference_by_hand(self):
201 # quad_perm:[2,3,0,1] swaps the halves of each quad, and lanes 0-7 hold -4..3: lane 0 compares lane 2's -2
202 # with its own -4, so -2 > -4 keeps it and, src1 negated, -2 > 4 drops it.
203 self.assertEqual(cmpx_reference("v_cmpx_gt_f32_dpp", GAME_FORM)[:8], [1, 1, 0, 0, 1, 1, 0, 0])
204 self.assertEqual(cmpx_reference("v_cmpx_gt_f32_dpp", GAME_FORM, neg=True)[:8], [0, 0, 0, 0, 1, 1, 1, 1])
205 # A lane that was off stays off, whatever its compare gives.
206 self.assertEqual(cmpx_reference("v_cmpx_gt_f32_dpp", GAME_FORM, exec_off=5)[:8], [1, 1, 0, 0, 1, 0, 0, 0])
207
208 def test_a_form_that_leaves_a_lane_unwritten_is_refused(self):
209 for form in UNWRITTEN_FORMS:
210 with self.subTest(form=form):
211 with self.assertRaisesRegex(Unsupported, "DPP compare with lanes DPP leaves unwritten"):
212 cmpx_vs("v_cmpx_gt_f32_dpp", form)
213
214 def test_a_destination_operand_is_refused(self):
215 # v_cmpx prints no destination: a line with one is not a form the disassembler writes.
216 lines = ["v_mbcnt_lo_u32_b32 v0, -1, 0", f"v_cmpx_gt_u32_dpp vcc_lo, v0, v0 {WRITTEN_FORMS[0]}",
133 "v_mov_b32 v5, 0", "exp pos0 v5, v5, v5, v5 done", "s_endpgm"] 217 "v_mov_b32 v5, 0", "exp pos0 v5, v5, v5, v5 done", "s_endpgm"]
134 with self.assertRaises(Unsupported): 218 with self.assertRaisesRegex(Unsupported, "DPP compare operands"):
135 support.translate_lines("vs_dpp_cmpx", lines) 219 support.translate_lines("vs_dpp_cmpx_dst", lines)
136 220
137 221
138def vopc(opcode, src0, vsrc1): 222def vopc(opcode, src0, vsrc1):
139 return 0x3E << 25 | opcode << 17 | vsrc1 << 9 | src0 223 return 0x3E << 25 | opcode << 17 | vsrc1 << 9 | src0
140 224
141 225
142def dpp16_word(src0_reg, ctrl, bound=0, fi=0, bank_mask=0xF, row_mask=0xF): 226def dpp16_word(src0_reg, ctrl, bound=0, fi=0, bank_mask=0xF, row_mask=0xF, src1_neg=0):
143 return row_mask << 28 | bank_mask << 24 | bound << 19 | fi << 18 | ctrl << 8 | src0_reg 227 return row_mask << 28 | bank_mask << 24 | src1_neg << 22 | bound << 19 | fi << 18 | ctrl << 8 | src0_reg
144 228
145 229
146def dpp8_word(src0_reg, lanes): 230def dpp8_word(src0_reg, lanes):
147 return sum(lane << (8 + 3 * i) for i, lane in enumerate(lanes)) | src0_reg 231 return sum(lane << (8 + 3 * i) for i, lane in enumerate(lanes)) | src0_reg
148 232
149 233
150GT_F32, LT_U32 = 0x04, 0xC1 # VOPC opcodes (tools/rdna2_tables.py) 234GT_F32, LT_U32, CMPX_GT_F32 = 0x04, 0xC1, 0x14 # VOPC opcodes (tools/rdna2_tables.py)
151S_ENDPGM = 0xBF810000 235S_ENDPGM = 0xBF810000
152# (first word, second word, the line both printers give) 236# (first word, second word, the line both printers give)
153PAIRS = [ 237PAIRS = [
@@ -161,6 +245,9 @@ PAIRS = [
161 "v_cmp_gt_f32_dpp vcc_lo, v20, v20 dpp8:[4,5,6,7,0,1,2,3]"), 245 "v_cmp_gt_f32_dpp vcc_lo, v20, v20 dpp8:[4,5,6,7,0,1,2,3]"),
162 (vopc(GT_F32, 234, 6), dpp8_word(5, [7, 6, 5, 4, 3, 2, 1, 0]), 246 (vopc(GT_F32, 234, 6), dpp8_word(5, [7, 6, 5, 4, 3, 2, 1, 0]),
163 "v_cmp_gt_f32_dpp vcc_lo, v5, v6 dpp8:[7,6,5,4,3,2,1,0] fi:1"), 247 "v_cmp_gt_f32_dpp vcc_lo, v5, v6 dpp8:[7,6,5,4,3,2,1,0] fi:1"),
248 # The game's v_cmpx form: no destination, src1 negated (bytes fa 02 28 7c 01 4e 4c ff).
249 (vopc(CMPX_GT_F32, 250, 1), dpp16_word(1, 0x4E, bound=1, fi=1, src1_neg=1),
250 "v_cmpx_gt_f32_dpp v1, -v1 quad_perm:[2,3,0,1] row_mask:0xf bank_mask:0xf bound_ctrl:1 fi:1"),
164] 251]
165 252
166 253
@@ -175,6 +262,7 @@ class DppCompareDecode(unittest.TestCase):
175 import rdna2_decode 262 import rdna2_decode
176 self.assertEqual(rdna2_decode.T.VOPC[GT_F32][0], "v_cmp_gt_f32") 263 self.assertEqual(rdna2_decode.T.VOPC[GT_F32][0], "v_cmp_gt_f32")
177 self.assertEqual(rdna2_decode.T.VOPC[LT_U32][0], "v_cmp_lt_u32") 264 self.assertEqual(rdna2_decode.T.VOPC[LT_U32][0], "v_cmp_lt_u32")
265 self.assertEqual(rdna2_decode.T.VOPC[CMPX_GT_F32][0], "v_cmpx_gt_f32")
178 266
179 def test_python_decoder(self): 267 def test_python_decoder(self):
180 import rdna2_decode 268 import rdna2_decode
@@ -186,8 +274,8 @@ class DppCompareDecode(unittest.TestCase):
186 self.assertEqual((lines, bad), ([want, "s_endpgm"], 0)) 274 self.assertEqual((lines, bad), ([want, "s_endpgm"], 0))
187 275
188 def test_a_decoded_line_translates(self): 276 def test_a_decoded_line_translates(self):
189 # What the disassembler prints is what the translator takes: the two forms it accepts, from PAIRS. 277 # What the disassembler prints is what the translator takes: the forms it accepts, from PAIRS.
190 for _, _, line in (PAIRS[0], PAIRS[3]): 278 for _, _, line in (PAIRS[0], PAIRS[3], PAIRS[5]):
191 with self.subTest(line=line): 279 with self.subTest(line=line):
192 lines = ["v_mbcnt_lo_u32_b32 v0, -1, 0", line, "v_mov_b32 v5, 0", "exp pos0 v5, v5, v5, v5 done", 280 lines = ["v_mbcnt_lo_u32_b32 v0, -1, 0", line, "v_mov_b32 v5, 0", "exp pos0 v5, v5, v5, v5 done",
193 "s_endpgm"] 281 "s_endpgm"]
diff --git a/tests/semantic/test_fma_mix_literal.py b/tests/semantic/test_fma_mix_literal.py
index 75608f4a9..488e12b95 100644
--- a/tests/semantic/test_fma_mix_literal.py
+++ b/tests/semantic/test_fma_mix_literal.py
@@ -77,6 +77,20 @@ class FmaMixLiteralTest(unittest.TestCase):
77 def test_reanchored_listing_takes_it_too(self): 77 def test_reanchored_listing_takes_it_too(self):
78 self.assertEqual(self.run_ps(listing(PRINTED, invalid=True), blob(STORED)), [f2u(8.0)] * 4) 78 self.assertEqual(self.run_ps(listing(PRINTED, invalid=True), blob(STORED)), [f2u(8.0)] * 4)
79 79
80 def test_text_cut_but_printed_encoding_whole(self):
81 # llvm-mc 21.1.8 can also print the literal cut to its low half in the text alone, with all 32 bits in the
82 # printed encoding: same_encoding then passes, and before the change the high half read +0.0 (6.0).
83 self.assertEqual(self.run_ps(listing(STORED), blob(STORED)), [f2u(8.0)] * 4)
84 self.assertEqual(self.run_ps(listing(STORED, invalid=True), blob(STORED)), [f2u(8.0)] * 4)
85 # The printed encoding is all it needs: no blob next to the listing.
86 self.assertEqual(self.run_ps(listing(STORED), None), [f2u(8.0)] * 4)
87
88 def test_text_immediate_other_than_the_low_half_is_left_alone(self):
89 # The text shows 0x4000 (2.0), not the encoded literal's low half 0x4200: the text is taken as it reads,
90 # fma(2.0, 2.0, +0.0) = 4.0, not the encoding's fma(3.0, 2.0, 2.0) = 8.0.
91 text = MIX_TEXT.replace("0x4200", "0x4000")
92 self.assertEqual(self.run_ps(listing(program(0x40004200, text=text)), None), [f2u(4.0)] * 4)
93
80 def test_without_the_blob_the_printed_literal_is_all_there_is(self): 94 def test_without_the_blob_the_printed_literal_is_all_there_is(self):
81 # LLVM's text alone: the high half reads +0.0, fma(3.0, 2.0, 0.0) = 6.0 (what the listing says). 95 # LLVM's text alone: the high half reads +0.0, fma(3.0, 2.0, 0.0) = 6.0 (what the listing says).
82 self.assertEqual(self.run_ps(listing(PRINTED), None), [f2u(6.0)] * 4) 96 self.assertEqual(self.run_ps(listing(PRINTED), None), [f2u(6.0)] * 4)
diff --git a/tests/semantic/test_library_compute_forms.py b/tests/semantic/test_library_compute_forms.py
index 0e1c84bf4..a650b240c 100644
--- a/tests/semantic/test_library_compute_forms.py
+++ b/tests/semantic/test_library_compute_forms.py
@@ -100,6 +100,16 @@ class LibraryComputeForms(unittest.TestCase):
100 self.assertEqual((recovered["pc"], recovered["enc"]), (0, blob.hex())) 100 self.assertEqual((recovered["pc"], recovered["enc"]), (0, blob.hex()))
101 self.assertFalse(rdna2_decode.decode_bytes(blob[:4])["insns"]) 101 self.assertFalse(rdna2_decode.decode_bytes(blob[:4])["insns"])
102 102
103 def test_vopcx_dpp_recovery(self):
104 # SHADER-VOPCX-DPP: the same pass recovers v_cmpx in DPP form (opcode 0x14, v_cmpx_gt_f32), which prints no
105 # destination: the game's form, quad_perm:[2,3,0,1] bound_ctrl:1 fi:1 with src1 negated (fa 02 28 7c 01 4e 4c ff).
106 blob = bytes.fromhex("fa02287c014e4cff")
107 row, = rdna2_decode.decode_bytes(blob, wave32=True)["insns"]
108 self.assertEqual((row["op"], len(row["args"]), row["args"][0]["r"]), ("v_cmpx_gt_f32_dpp", 2, 1))
109 junk = {"pc": 4, "enc": blob[4:].hex(), "op": "s_nop", "args": [{"k": "imm", "v": 0}], "mods": []}
110 recovered, = rdna2spirv.restore_vcc_tuples([junk], blob, 0, len(blob), wave32=True)
111 self.assertEqual((recovered["pc"], recovered["enc"], recovered["op"]), (0, blob.hex(), "v_cmpx_gt_f32_dpp"))
112
103 def test_vopc_dpp_reads_the_selected_lane(self): 113 def test_vopc_dpp_reads_the_selected_lane(self):
104 spv, _ = translate_fspx(fixture("vopc_dpp_compare")[:-1], wave32=False) 114 spv, _ = translate_fspx(fixture("vopc_dpp_compare")[:-1], wave32=False)
105 memory = {} 115 memory = {}
diff --git a/tests/semantic/test_loop_ballot_barrier.py b/tests/semantic/test_loop_ballot_barrier.py
index 9f5c6ffb2..103dc94bd 100644
--- a/tests/semantic/test_loop_ballot_barrier.py
+++ b/tests/semantic/test_loop_ballot_barrier.py
@@ -1059,11 +1059,12 @@ class DivergentLoopBallotTests(unittest.TestCase):
1059 configs = [ 1059 configs = [
1060 ("native_64", 64, 64, False, True), 1060 ("native_64", 64, 64, False, True),
1061 ("native_128", 128, 64, False, True), 1061 ("native_128", 128, 64, False, True),
1062 # Single-wave inline exchange barriers in this loop require a round fallback. 1062 # a reducible multi-block loop takes the structured emulation since #2089 (no round OpSwitch); a
1063 # single wave keeps its exchange barriers under `%pc`-only guards (inline_all, no round fallback) ...
1063 ("emulate_64_sg32", 64, 32, True, True), 1064 ("emulate_64_sg32", 64, 32, True, True),
1064 ("emulate_128_sg32", 128, 32, True, True), 1065 ("emulate_128_sg32", 128, 32, True, True),
1065 ("emulate_40_partial_sg32", 40, 32, True, True), 1066 ("emulate_40_partial_sg32", 40, 32, True, True),
1066 # Forced dispatch must produce the same per-lane reference words. 1067 # ... and --dispatch-loop keeps the round scheduler: both must give the native words
1067 ("emulate_64_sg32_rounds", 64, 32, True, False), 1068 ("emulate_64_sg32_rounds", 64, 32, True, False),
1068 ("emulate_128_sg32_rounds", 128, 32, True, False), 1069 ("emulate_128_sg32_rounds", 128, 32, True, False),
1069 ("emulate_40_partial_sg32_rounds", 40, 32, True, False), 1070 ("emulate_40_partial_sg32_rounds", 40, 32, True, False),
@@ -1073,10 +1074,14 @@ class DivergentLoopBallotTests(unittest.TestCase):
1073 spv, gen = _translate_cs("cs_div_loop_" + label, prog, threads=threads, emulate=emulate, 1074 spv, gen = _translate_cs("cs_div_loop_" + label, prog, threads=threads, emulate=emulate,
1074 structured=structured) 1075 structured=structured)
1075 if emulate: 1076 if emulate:
1076 use_hybrid = structured and threads == 128 1077 self.assertEqual(gen.control_flow,
1077 expected_flow = "emulated wave64 structured" if use_hybrid else "emulated wave64 rounds" 1078 "emulated wave64 structured" if structured else "emulated wave64 rounds")
1078 self.assertEqual(gen.control_flow, expected_flow) 1079 if structured and threads <= 64:
1079 self.assertFalse(rdna2spirv.barriers_under_control_flow(spv)) 1080 self.assertEqual(gen.emulate_plan["mode"], "inline_all")
1081 self.assertNotIn("OpSwitch", spv)
1082 else:
1083 # multi-wave (and the round scheduler): every barrier in uniform control flow
1084 self.assertFalse(rdna2spirv.barriers_under_control_flow(spv))
1080 mem = run_compute_workgroup(spv, threads, sg_sz, push_constants=VSHARP) 1085 mem = run_compute_workgroup(spv, threads, sg_sz, push_constants=VSHARP)
1081 want = expected_for(threads) 1086 want = expected_for(threads)
1082 for t in range(threads): 1087 for t in range(threads):
@@ -1394,7 +1399,7 @@ class BarrierInLoopsTests(unittest.TestCase):
1394 """ 1399 """
1395 prog = self._ring_shift_loop_cs(wave64=True, threads=128, iters=5) 1400 prog = self._ring_shift_loop_cs(wave64=True, threads=128, iters=5)
1396 spv, gen = _translate_cs("cs_bar_loop_w64_emulate", prog, threads=128, lds_bytes=512, emulate=True) 1401 spv, gen = _translate_cs("cs_bar_loop_w64_emulate", prog, threads=128, lds_bytes=512, emulate=True)
1397 self.assertEqual(gen.control_flow, "emulated wave64 rounds") 1402 self.assertEqual(gen.control_flow, "emulated wave64 structured") # the loop is in the tail scheduler
1398 for rev in (False, True): 1403 for rev in (False, True):
1399 with self.subTest(reverse_subgroups=rev): 1404 with self.subTest(reverse_subgroups=rev):
1400 mem = run_compute_workgroup(spv, 128, 32, push_constants=VSHARP, reverse_subgroups=rev) 1405 mem = run_compute_workgroup(spv, 128, 32, push_constants=VSHARP, reverse_subgroups=rev)
@@ -1467,7 +1472,7 @@ class BarrierInLoopsTests(unittest.TestCase):
1467 spv_em, gen_em = _translate_cs( 1472 spv_em, gen_em = _translate_cs(
1468 "cs_div_bar_em", self._wave_divergent_barrier_loop_cs(True), threads=128, lds_bytes=512, emulate=True 1473 "cs_div_bar_em", self._wave_divergent_barrier_loop_cs(True), threads=128, lds_bytes=512, emulate=True
1469 ) 1474 )
1470 self.assertEqual(gen_em.control_flow, "emulated wave64 rounds") 1475 self.assertEqual(gen_em.control_flow, "emulated wave64 structured") # the loop is in the tail scheduler
1471 mem_em = run_compute_workgroup(spv_em, 128, 32, push_constants=VSHARP) 1476 mem_em = run_compute_workgroup(spv_em, 128, 32, push_constants=VSHARP)
1472 self.assertEqual([mem_em[4 * t] for t in range(128)], [2] * 64 + [4] * 64) 1477 self.assertEqual([mem_em[4 * t] for t in range(128)], [2] * 64 + [4] * 64)
1473 1478
diff --git a/tests/semantic/test_loop_iteration_guard.py b/tests/semantic/test_loop_iteration_guard.py
index a990031dd..e6666f81a 100644
--- a/tests/semantic/test_loop_iteration_guard.py
+++ b/tests/semantic/test_loop_iteration_guard.py
@@ -32,18 +32,17 @@ class LoopGuardTests(unittest.TestCase):
32 for lanes in (32, 64): 32 for lanes in (32, 64):
33 with self.subTest(lanes=lanes): 33 with self.subTest(lanes=lanes):
34 (plain, plain_flow), (guarded, flow) = module(lanes, 0), module(lanes, 16) 34 (plain, plain_flow), (guarded, flow) = module(lanes, 0), module(lanes, 16)
35 expected_flow = "structured" if lanes == 32 else "emulated wave64 rounds" 35 # A single-wave emulated program keeps the structured form (no round fallback for `inline_all`).
36 expected_flow = "structured" if lanes == 32 else "emulated wave64 structured"
36 self.assertEqual((plain_flow, flow), (expected_flow, expected_flow)) 37 self.assertEqual((plain_flow, flow), (expected_flow, expected_flow))
37 self.assertNotIn("%loop_guard_", plain) 38 self.assertNotIn("%loop_guard_", plain)
38 self.assertIn("%loop_guard_", guarded) 39 self.assertIn("%loop_guard_", guarded)
39 self.assertEqual(execute(plain, lanes, 6), [6] * lanes) 40 self.assertEqual(execute(plain, lanes, 6), [6] * lanes)
40 self.assertEqual(execute(guarded, lanes, 6), [6] * lanes) 41 self.assertEqual(execute(guarded, lanes, 6), [6] * lanes)
41 # Round zero initializes the guest PC. Each remaining round adds two. 42 self.assertEqual(execute(guarded, lanes, 1), [32] * lanes)
42 expected = 32 if lanes == 32 else 30
43 self.assertEqual(execute(guarded, lanes, 1), [expected] * lanes)
44 43
45 def test_round_budget_uses_the_scheduler_exit(self): 44 def test_round_budget_uses_the_scheduler_exit(self):
46 text, flow = module(64, 16) 45 text, flow = module(64, 16, structured=False)
47 self.assertEqual(flow, "emulated wave64 rounds") 46 self.assertEqual(flow, "emulated wave64 rounds")
48 # Counters and synchronization execute on the final round too. The guard 47 # Counters and synchronization execute on the final round too. The guard
49 # augments the scheduler's termination condition at its original branch. 48 # augments the scheduler's termination condition at its original branch.
diff --git a/tests/semantic/test_wave64_emulate_opt.py b/tests/semantic/test_wave64_emulate_opt.py
index 6593a668b..995504234 100644
--- a/tests/semantic/test_wave64_emulate_opt.py
+++ b/tests/semantic/test_wave64_emulate_opt.py
@@ -1281,9 +1281,12 @@ class LocalExecFoldTests(unittest.TestCase):
1281class StructuredEmulationTests(unittest.TestCase): 1281class StructuredEmulationTests(unittest.TestCase):
1282 """Structured --wave64-emulate (`inline_all` for <=64 threads, `structured_hybrid` for >64 threads).""" 1282 """Structured --wave64-emulate (`inline_all` for <=64 threads, `structured_hybrid` for >64 threads)."""
1283 1283
1284 def test_single_wave_round_fallback_and_loop_carried_war(self): 1284 def test_single_wave_inline_all_zero_switch_and_loop_carried_war(self):
1285 # 64-thread and partial 40-thread shaders with live-out scalars, loop-carried store->load->store WAR/RAW, 1285 # 64-thread and partial 40-thread shaders with live-out scalars, loop-carried store->load->store WAR/RAW,
1286 # and v_readfirstlane require uniform exchange barriers on both scheduling orders. 1286 # and v_readfirstlane emit 0 OpSwitch cases and 0 x_spills while staying bit-exact on both scheduling
1287 # orders. Their exchange barriers sit under `%pc`-only guards, which a single wave takes as one, so the
1288 # barrier fallback of translate() does not apply to them (docs/design.md, "Wave64 emulation:
1289 # single-wave barrier fallback").
1287 insns = [ 1290 insns = [
1288 ("s_mov_b64 exec, -1", 4), 1291 ("s_mov_b64 exec, -1", 4),
1289 ("s_mov_b32 s16, 10", 4), 1292 ("s_mov_b32 s16, 10", 4),
@@ -1314,10 +1317,11 @@ class StructuredEmulationTests(unittest.TestCase):
1314 for threads in (64, 40): 1317 for threads in (64, 40):
1315 with self.subTest(threads=threads): 1318 with self.subTest(threads=threads):
1316 spv, gen = _translate_encoded(f"cs_inline_{threads}", insns, (threads, 1, 1), emulate=True) 1319 spv, gen = _translate_encoded(f"cs_inline_{threads}", insns, (threads, 1, 1), emulate=True)
1317 self.assertEqual(gen.control_flow, "emulated wave64 rounds") 1320 self.assertEqual(gen.control_flow, "emulated wave64 structured")
1318 self.assertIsNone(gen.emulate_plan) 1321 self.assertEqual(gen.emulate_plan["mode"], "inline_all")
1319 self.assertIn("OpSwitch", spv) 1322 self.assertNotIn("OpSwitch", spv)
1320 self.assertFalse(rdna2spirv.barriers_under_control_flow(spv)) 1323 self.assertEqual(len(gen.x_spills), 0)
1324 self.assertNotIn("OpGroupNonUniform", spv)
1321 for rev in (False, True): 1325 for rev in (False, True):
1322 mem, _ = run_emulated_workgroup(spv, (threads, 1, 1), push_constants=VSHARP + [0] * 28, reverse_order=rev) 1326 mem, _ = run_emulated_workgroup(spv, (threads, 1, 1), push_constants=VSHARP + [0] * 28, reverse_order=rev)
1323 # Reference simulation 1327 # Reference simulation
@@ -1429,8 +1433,8 @@ class StructuredEmulationTests(unittest.TestCase):
1429 want = isa_v4_before_sbar(l) + isa_v4_before_sbar(l ^ 64) 1433 want = isa_v4_before_sbar(l) + isa_v4_before_sbar(l ^ 64)
1430 self.assertEqual(mem_new[1024 + l * 4], want, f"lane {l} rev={rev}") 1434 self.assertEqual(mem_new[1024 + l * 4], want, f"lane {l} rev={rev}")
1431 1435
1432 def test_multiwave_divergent_sbarrier_falls_back_to_rounds(self): 1436 def test_multiwave_divergent_sbarrier_stays_in_tail_rounds(self):
1433 # Wave 0 hits s_barrier in one arm while Wave 1 hits s_barrier in another -> MUST keep global rounds. 1437 # Wave 0 hits s_barrier in one arm while Wave 1 hits s_barrier in another -> both arms MUST keep the rounds.
1434 insns = [ 1438 insns = [
1435 ("s_mov_b64 exec, -1", 4), 1439 ("s_mov_b64 exec, -1", 4),
1436 ("v_lshlrev_b32_e32 v2, 2, v0", 4), 1440 ("v_lshlrev_b32_e32 v2, 2, v0", 4),
@@ -1448,11 +1452,49 @@ class StructuredEmulationTests(unittest.TestCase):
1448 ("s_endpgm", 4), 1452 ("s_endpgm", 4),
1449 ] 1453 ]
1450 spv, gen = _translate_encoded("cs_div_sbar_w64", insns, (128, 1, 1), emulate=True, rsrc2=0x20088) 1454 spv, gen = _translate_encoded("cs_div_sbar_w64", insns, (128, 1, 1), emulate=True, rsrc2=0x20088)
1451 self.assertEqual(gen.control_flow, "emulated wave64 rounds") 1455 self.assertEqual(gen.control_flow, "emulated wave64 structured")
1452 self.assertIsNone(gen.emulate_plan) 1456 plan = gen.emulate_plan
1453 mem, _ = run_emulated_workgroup(spv, (128, 1, 1), push_constants=VSHARP + [0] * 28) 1457 self.assertEqual(plan["inline_blocks"], {0})
1454 for lane in range(64): 1458 self.assertEqual(plan["tail_blocks"], {1, 2}) # both s_barrier arms
1455 self.assertEqual(mem[lane * 4], lane + 64, f"lane {lane}") 1459 for rev in (False, True):
1460 mem, _ = run_emulated_workgroup(spv, (128, 1, 1), push_constants=VSHARP + [0] * 28, reverse_order=rev)
1461 for lane in range(64):
1462 self.assertEqual(mem[lane * 4], lane + 64, f"lane {lane}, reverse={rev}")
1463
1464 def test_multiwave_guarded_sbarrier_epilogue_keeps_body_structured(self):
1465 # The shape of an NGG mesh epilogue: a body with a wave vote, then a guarded s_barrier both waves skip or
1466 # reach (s_cbranch_vccnz), then a top-level s_barrier. Only the part from the guard on stays in rounds.
1467 def insns(vcc):
1468 return [
1469 ("s_mov_b64 exec, -1", 4),
1470 ("v_lshlrev_b32_e32 v2, 2, v0", 4),
1471 ("v_add_nc_u32_e32 v5, 7, v0", 4),
1472 ("v_readfirstlane_b32 s5, v0", 4),
1473 ("v_add_nc_u32_e32 v5, s5, v5", 4),
1474 ("ds_write_b32 v2, v5", 8),
1475 (f"s_mov_b64 vcc, {vcc}", 4),
1476 ("s_cbranch_vccnz 1", 4),
1477 ("s_barrier", 4),
1478 ("s_barrier", 4),
1479 ("v_xor_b32_e32 v3, 64, v0", 4),
1480 ("v_lshlrev_b32_e32 v3, 2, v3", 4),
1481 ("ds_read_b32 v4, v3", 8),
1482 ("buffer_store_dword v4, v2, s[0:3], 0 offen", 8),
1483 ("s_endpgm", 4),
1484 ]
1485 for vcc in ("0", "-1"):
1486 spv, gen = _translate_encoded("cs_sbar_epilogue_w64", insns(vcc), (128, 1, 1), emulate=True,
1487 rsrc2=0x20088)
1488 self.assertEqual(gen.control_flow, "emulated wave64 structured")
1489 plan = gen.emulate_plan
1490 self.assertEqual(plan["inline_blocks"], {0})
1491 self.assertEqual(plan["tail_blocks"], {1, 2})
1492 for rev in (False, True):
1493 mem, _ = run_emulated_workgroup(spv, (128, 1, 1), push_constants=VSHARP + [0] * 28,
1494 reverse_order=rev)
1495 for lane in range(128):
1496 other = lane ^ 64
1497 self.assertEqual(mem[lane * 4], other + 7 + (other & 64), f"lane {lane}, vcc={vcc}, rev={rev}")
1456 1498
1457 def test_monotone_dirty_transfer_no_phantom_clear_after_x_round(self): 1499 def test_monotone_dirty_transfer_no_phantom_clear_after_x_round(self):
1458 # Regression: an x_round (v_readlane_b32) clears g.x_dirty in codegen before a subsequent 1500 # Regression: an x_round (v_readlane_b32) clears g.x_dirty in codegen before a subsequent
diff --git a/tests/semantic/test_wave64_halves.py b/tests/semantic/test_wave64_halves.py
index 15a942654..b112ce331 100644
--- a/tests/semantic/test_wave64_halves.py
+++ b/tests/semantic/test_wave64_halves.py
@@ -1348,5 +1348,25 @@ class PixelShaders(unittest.TestCase):
1348 self.assertEqual(slots64, slots32) 1348 self.assertEqual(slots64, slots32)
1349 1349
1350 1350
1351class VcmpxDppExec(unittest.TestCase):
1352 """SHADER-VOPCX-DPP review: a v_cmpx in DPP form writes EXEC like any v_cmpx, and the cross-lane branch of the
1353 analysis must not drop that write. The repro from the review: after the compare, v5 = s4 is not one value in every
1354 lane, so v_readlane_b32 of it is not a uniform read."""
1355
1356 BODY = ["v_mov_b32_e32 v5, 0", "s_mov_b64 s[10:11], exec", None, "v_mov_b32_e32 v5, s4", "s_mov_b64 exec, s[10:11]",
1357 "v_readlane_b32 s5, v5, 0", "v_mov_b32_e32 v6, s5"]
1358
1359 def meta(self, compare):
1360 body = [compare if line is None else line for line in self.BODY]
1361 return meta_of("ps_vcmpx_dpp_exec", ps(body))[0]
1362
1363 def test_dpp_form_is_classified_as_the_e32_form(self):
1364 e32 = self.meta("v_cmpx_gt_f32_e32 v1, v2")
1365 dpp = self.meta("v_cmpx_gt_f32_dpp v1, -v1 quad_perm:[2,3,0,1] row_mask:0xf bank_mask:0xf bound_ctrl:1 fi:1")
1366 self.assertEqual(e32, ("C", ["cross-lane"], []))
1367 self.assertEqual(dpp, e32)
1368 self.assertNotIn("readlane-uniform", dpp[2])
1369
1370
1351if __name__ == "__main__": 1371if __name__ == "__main__":
1352 unittest.main() 1372 unittest.main()
diff --git a/tests/semantic/test_wave64_single_wave_barrier.py b/tests/semantic/test_wave64_single_wave_barrier.py
new file mode 100644
index 000000000..4723393e3
--- /dev/null
+++ b/tests/semantic/test_wave64_single_wave_barrier.py
@@ -0,0 +1,123 @@
1"""A single-wave emulated program keeps its exchange barriers in the structured form (docs/design.md, "Wave64
2emulation: single-wave barrier fallback").
3
4`translate()` re-translates an emulated program as the round loop when an `OpControlBarrier` sits under a branch or
5loop, because a barrier only part of the workgroup reaches hangs NVIDIA. A one-wave workgroup (`inline_all` plan)
6does not need that: every guard around its barriers tests only `%pc`, which all 64 invocations hold alike. The
7fixture puts a cross-half `v_readlane_b32` (an exchange behind a barrier) in a uniform loop and in a uniform branch.
8
9 python -I tests/semantic/test_wave64_single_wave_barrier.py -v
10"""
11import os
12import re
13import sys
14import unittest
15from pathlib import Path
16
17HERE = os.path.dirname(os.path.abspath(__file__))
18if HERE not in sys.path:
19 sys.path.insert(0, HERE)
20
21from test_loop_ballot_barrier import _translate_cs, rdna2spirv
22from spirv_mini_interp import run_workgroup
23
24FIXTURE = Path(HERE) / "fixtures" / "wave64_single_wave_barrier.asm"
25_DEF = re.compile(r"^\s*(%[\w.]+) = (Op\w+)([^\n]*)$", re.M)
26_HEAD = re.compile(r"^\s*(?:(%[\w.]+) = )?(OpLabel|OpSelectionMerge|OpLoopMerge|OpBranchConditional|OpControlBarrier)"
27 r"\b([^\n]*)$", re.M)
28
29
30def module(lanes, structured=True):
31 lines = [s for s in FIXTURE.read_text().splitlines() if s and not s.startswith(";")]
32 lines.insert(0, "s_mov_b64 exec, -1")
33 return _translate_cs("cs_single_wave_barrier", lines, threads=lanes, emulate=True, structured=structured)
34
35
36def execute(text, lanes, s4):
37 mem = run_workgroup(
38 text, lanes, 32,
39 inputs_for=lambda i: {"%wg_id": (0, 0, 0), "%local_id": (i, 0, 0), "%sg_lane": i % 32, "%local_index": i},
40 push_constants=[0, 0, lanes * 4, 0x31016FAC, s4] + [0] * 27, memory={})
41 return [mem[i * 4] for i in range(lanes)]
42
43
44def barrier_guard_loads(text):
45 """For every OpControlBarrier, the variables the conditions of its enclosing constructs load.
46
47 A selection's condition is the OpBranchConditional after its OpSelectionMerge; a loop's are the conditional
48 branches inside it that leave it or go back to its header."""
49 defs = {name: (op, rest.split()) for name, op, rest in _DEF.findall(text)}
50
51 def loads(value, seen):
52 if value in seen or value not in defs:
53 return set()
54 seen.add(value)
55 op, args = defs[value]
56 if op == "OpLoad":
57 return {args[1]}
58 found = set()
59 for arg in args:
60 if arg.startswith("%"):
61 found |= loads(arg, seen)
62 return found
63
64 events = [(m.start(), m.group(1), m.group(2), m.group(3).split()) for m in _HEAD.finditer(text)]
65 label_at = {name: at for at, name, op, _ in events if op == "OpLabel"}
66 constructs, header = [], None
67 for i, (at, name, op, args) in enumerate(events):
68 if op == "OpLabel":
69 header = name
70 elif op in ("OpSelectionMerge", "OpLoopMerge"):
71 constructs.append((op, header, args[0], i))
72 result = []
73 for at, _, op, _ in events:
74 if op != "OpControlBarrier":
75 continue
76 loaded = set()
77 for kind, head, merge, index in constructs:
78 if not label_at[head] <= at < label_at[merge]:
79 continue
80 if kind == "OpSelectionMerge":
81 conds = [events[index + 1][3][0]]
82 else:
83 conds = [args[0] for b_at, _, b_op, args in events
84 if b_op == "OpBranchConditional" and label_at[head] <= b_at < label_at[merge]
85 and {merge, head} & set(args[1:])]
86 for cond in conds:
87 loaded |= loads(cond, set())
88 result.append(loaded)
89 return result
90
91
92class SingleWaveBarrierTests(unittest.TestCase):
93 def test_single_wave_stays_structured_with_pc_only_guards(self):
94 text, gen = module(64)
95 self.assertEqual(gen.control_flow, "emulated wave64 structured")
96 self.assertEqual(gen.emulate_plan["mode"], "inline_all")
97 self.assertNotIn("OpSwitch", text)
98 # The barriers are under control flow (so the multi-wave fallback would fire), but only under `%pc`.
99 self.assertTrue(rdna2spirv.barriers_under_control_flow(text))
100 guards = barrier_guard_loads(text)
101 self.assertTrue(any(guards), "no barrier inside the loop or the branch")
102 for loaded in guards:
103 self.assertLessEqual(loaded, {"%pc"})
104
105 def test_structured_and_round_forms_agree(self):
106 # lane 40 after each of the 3 iterations: 41 + 42 + 43; the branch adds lane 41's 41 + 3 + 100.
107 structured, _ = module(64)
108 rounds, gen = module(64, structured=False)
109 self.assertEqual(gen.control_flow, "emulated wave64 rounds")
110 for s4, want in ((0, 126), (1, 126 + 144)):
111 with self.subTest(s4=s4):
112 self.assertEqual(execute(structured, 64, s4), [want] * 64)
113 self.assertEqual(execute(rounds, 64, s4), [want] * 64)
114
115 def test_partial_single_wave_is_structured_too(self):
116 text, gen = module(48)
117 self.assertEqual(gen.control_flow, "emulated wave64 structured")
118 self.assertEqual(gen.emulate_plan["mode"], "inline_all")
119 self.assertEqual(execute(text, 48, 1), [126 + 144] * 48)
120
121
122if __name__ == "__main__":
123 unittest.main()
diff --git a/tests/test_dds_png_dx10.py b/tests/test_dds_png_dx10.py
index a0d55d324..159d542e2 100644
--- a/tests/test_dds_png_dx10.py
+++ b/tests/test_dds_png_dx10.py
@@ -63,6 +63,19 @@ class SingleChannelTests(unittest.TestCase):
63 self.assertEqual((width, height), (4, 2)) 63 self.assertEqual((width, height), (4, 2))
64 self.assertEqual(rgba, b"".join(bytes((r, 0, 0, 255)) for r in (0, 0, 128, 64, 255, 255, 0, 0))) 64 self.assertEqual(rgba, b"".join(bytes((r, 0, 0, 255)) for r in (0, 0, 128, 64, 255, 255, 0, 0)))
65 65
66 def test_byte_unorm_masks_respect_pitch_and_channel_order(self):
67 for dxgi, fmt, payload, expected in (
68 (61, "R8_UNORM", bytes([1, 2, 99, 99, 3, 4]), bytes([1,0,0,255, 2,0,0,255, 3,0,0,255, 4,0,0,255])),
69 (49, "R8G8_UNORM", bytes([1,2,3,4, 99,99, 5,6,7,8]), bytes([1,2,0,255, 3,4,0,255, 5,6,0,255, 7,8,0,255])),
70 ):
71 with self.subTest(fmt=fmt):
72 data = _dx10(2, 2, dxgi, payload, pitch=4 if dxgi == 61 else 6)
73 self.assertEqual(dds.parse_dds_header(data)["format"], fmt)
74 self.assertEqual(dds.decode_dds(data), (2, 2, expected))
75 self.assertEqual(dds.dds_to_png_bytes(data), dds.encode_png(2, 2, expected))
76 with self.assertRaises(dds.DdsError):
77 dds.decode_dds(data[:-1])
78
66 def test_r16_unorm_red_opaque(self): 79 def test_r16_unorm_red_opaque(self):
67 px = struct.pack("<HHHH", 0, 65535, 32768, 257) 80 px = struct.pack("<HHHH", 0, 65535, 32768, 257)
68 _, _, rgba = dds.decode_dds(_dx10(2, 2, 56, px)) 81 _, _, rgba = dds.decode_dds(_dx10(2, 2, 56, px))
@@ -74,11 +87,107 @@ class SingleChannelTests(unittest.TestCase):
74 self.assertEqual(rgba[3::4], bytes([1, 2, 3, 4, 5, 6])) 87 self.assertEqual(rgba[3::4], bytes([1, 2, 3, 4, 5, 6]))
75 self.assertEqual(set(rgba[0::4]) | set(rgba[1::4]) | set(rgba[2::4]), {0}) 88 self.assertEqual(set(rgba[0::4]) | set(rgba[1::4]) | set(rgba[2::4]), {0})
76 89
90 def test_rgba16_unorm_normalizes_all_channels_with_row_padding(self):
91 payload = struct.pack("<4H", 0, 65535, 32768, 257) + b"pad!"
92 payload += struct.pack("<4H", 65535, 0, 32767, 32768)
93 data = _dx10(1, 2, 11, payload, pitch=12)
94 self.assertEqual(dds.parse_dds_header(data)["format"], "RGBA16_UNORM")
95 self.assertEqual(dds.decode_dds(data)[2], bytes((
96 0, 255, 128, 1,
97 255, 0, 127, 128,
98 )))
99
100 def test_rgba16_snorm_maps_signed_extremes_and_zero(self):
101 payload = struct.pack("<4h", -32768, -32767, 0, 32767)
102 data = _dx10(1, 1, 13, payload)
103 self.assertEqual(dds.parse_dds_header(data)["format"], "RGBA16_SNORM")
104 self.assertEqual(dds.decode_dds(data)[2], bytes((0, 0, 128, 255)))
105
106 def test_rgba16_snorm_padded_rows_and_truncation(self):
107 payload = struct.pack("<4h", -16384, 16384, -32768, 32767) + b"pad!"
108 payload += struct.pack("<4h", 0, 0, 0, 0)
109 data = _dx10(1, 2, 13, payload, pitch=12)
110 self.assertEqual(dds.decode_dds(data)[2], bytes((64, 191, 0, 255, 128, 128, 128, 128)))
111 with self.assertRaises(dds.DdsError):
112 dds.decode_dds(_dx10(1, 1, 13, bytes(7)))
113
77 def test_truncated_rejected(self): 114 def test_truncated_rejected(self):
78 for dxgi, n in ((56, 7), (65, 3), (41, 15)): 115 for dxgi, n in ((56, 7), (65, 3), (41, 15)):
79 with self.assertRaises(dds.DdsError): 116 with self.assertRaises(dds.DdsError):
80 dds.decode_dds(_dx10(2, 2, dxgi, bytes(n))) 117 dds.decode_dds(_dx10(2, 2, dxgi, bytes(n)))
81 118
82 119
120def _opaque(*pairs):
121 """RGBA bytes for (red, green) pairs with blue 0 and alpha 255."""
122 return b"".join(bytes((r, g, 0, 255)) for r, g in pairs)
123
124
125class PackedAndIntegerTests(unittest.TestCase):
126 """Hand-built texels for the formats added by #2218, #2314, #2317, #2319, #2320, #2321, #2323 and #2324.
127
128 Each case is 2x2 with a padded row pitch, so the second row starts after the padding bytes,
129 and a payload one byte short must be refused.
130 """
131
132 def check(self, dxgi, fmt, row0, row1, pitch, expected):
133 payload = row0 + b"\xee" * (pitch - len(row0)) + row1
134 data = _dx10(2, 2, dxgi, payload, pitch=pitch)
135 self.assertEqual(dds.parse_dds_header(data)["format"], fmt)
136 self.assertEqual(dds.decode_dds(data), (2, 2, expected))
137 self.assertEqual(dds.dds_to_png_bytes(data), dds.encode_png(2, 2, expected))
138 with self.assertRaises(dds.DdsError):
139 dds.decode_dds(data[:-1])
140
141 def test_r9g9b9e5_sharedexp(self):
142 def texel(r, g, b, e):
143 return struct.pack("<I", r | (g << 9) | (b << 18) | (e << 27))
144 # value = mantissa * 2^(e - 24): (256, 128, 0) at e=16 is (1, 0.5, 0); 511/512 rounds to 255, 64/512 to 32,
145 # 1/512 to 0; 300 * 2^-4 saturates; e=0 is 2^-24 per step, so 511 * 2^-24 is still 0.
146 self.check(67, "R9G9B9E5_FLOAT",
147 texel(256, 128, 0, 16) + texel(511, 64, 1, 15),
148 texel(300, 0, 0, 20) + texel(511, 511, 511, 0), 12,
149 bytes((255, 128, 0, 255, 255, 32, 0, 255, 255, 0, 0, 255, 0, 0, 0, 255)))
150
151 def test_b5g6r5_unorm(self):
152 # Blue in bits 0-4, green 5-10, red 11-15; 5 and 6 bits widen by bit replication.
153 texels = struct.pack("<4H", 31 << 11, 63 << 5, 1, (16 << 11) | (32 << 5) | 16)
154 self.check(85, "B5G6R5_UNORM", texels[:4], texels[4:], 6,
155 bytes((255, 0, 0, 255, 0, 255, 0, 255, 0, 0, 8, 255, 132, 130, 132, 255)))
156
157 def test_b5g5r5a1_unorm(self):
158 # Blue in bits 0-4, green 5-9, red 10-14, alpha bit 15.
159 texels = struct.pack("<4H", 0x8000 | (31 << 10), 0x7FFF, 31 << 5, 0x8001)
160 self.check(86, "B5G5R5A1_UNORM", texels[:4], texels[4:], 6,
161 bytes((255, 0, 0, 255, 255, 255, 255, 0, 0, 255, 0, 0, 0, 0, 8, 255)))
162
163 def test_r8g8_snorm(self):
164 # round((v / 127 / 2 + 0.5) * 255), with -128 clamped to -127 as for BC5_SNORM.
165 self.check(51, "RG8_SNORM", struct.pack("<4b", -128, -127, 0, 127), struct.pack("<4b", 64, -64, 1, -1), 6,
166 _opaque((0, 0), (128, 255), (192, 63), (129, 126)))
167
168 def test_r8g8_uint_and_sint(self):
169 self.check(50, "RG8_UINT", bytes((0, 255, 7, 128)), bytes((1, 2, 254, 3)), 5,
170 _opaque((0, 255), (7, 128), (1, 2), (254, 3)))
171 self.check(52, "RG8_SINT", struct.pack("<4b", -128, 127, 0, -1), struct.pack("<4b", 1, -127, 64, -64), 5,
172 _opaque((0, 255), (128, 127), (129, 1), (192, 64)))
173
174 def test_r8_snorm_uint_and_sint(self):
175 red = lambda *values: b"".join(bytes((v, 0, 0, 255)) for v in values) # noqa: E731
176 self.check(63, "R8_SNORM", struct.pack("<2b", -128, -127), struct.pack("<2b", 0, 127), 3, red(0, 0, 128, 255))
177 self.check(63, "R8_SNORM", struct.pack("<2b", 64, -64), struct.pack("<2b", 1, -1), 3, red(192, 63, 129, 126))
178 self.check(62, "R8_UINT", bytes((0, 255)), bytes((7, 128)), 3, red(0, 255, 7, 128))
179 self.check(64, "R8_SINT", struct.pack("<2b", -128, 127), struct.pack("<2b", -1, 0), 3, red(0, 255, 127, 128))
180
181 def test_r10g10b10a2_uint_and_typeless_read_like_unorm(self):
182 # R in bits 0-9, G 10-19, B 20-29, A 30-31; each field scaled to 0-255 from its own bit width.
183 def texel(r, g, b, a):
184 return struct.pack("<I", r | (g << 10) | (b << 20) | (a << 30))
185 row0, row1 = texel(1023, 0, 512, 3) + texel(0, 1023, 0, 1), texel(1, 2, 3, 0) + texel(511, 1022, 0, 2)
186 expected = bytes((255, 0, 128, 255, 0, 255, 0, 85, 0, 0, 1, 0, 127, 255, 0, 170))
187 for dxgi in (23, 24, 25): # TYPELESS, UNORM, UINT
188 with self.subTest(dxgi=dxgi):
189 self.check(dxgi, "RGBA8", row0, row1, 12, expected)
190
191
83if __name__ == "__main__": 192if __name__ == "__main__":
84 unittest.main() 193 unittest.main()
diff --git a/tests/test_dstorage_history.py b/tests/test_dstorage_history.py
index 77e8179d7..be00af80a 100644
--- a/tests/test_dstorage_history.py
+++ b/tests/test_dstorage_history.py
@@ -85,6 +85,58 @@ class RuntimeHistoryTest(unittest.TestCase):
85 self.assertEqual(bc7["historyEndpointConfirmedBits"][255][field], 0) 85 self.assertEqual(bc7["historyEndpointConfirmedBits"][255][field], 0)
86 self.assertLessEqual(abs(bc7["historyEndpoints"][255][field] - 128), 4) 86 self.assertLessEqual(abs(bc7["historyEndpoints"][255][field] - 128), 4)
87 87
88 def test_packed_tail_fits_against_decoded_bcpack_sibling(self):
89 # Mip 0 is zlib, mip 1 a self-contained BCPack stream and the packed tail (mips 2-4) starts its
90 # chains at history entry 255, whose alpha no raw or zlib sibling of the tail can show.
91 solid = bytes([0x40]) + bytes(15)
92 secret = (0, 0, 0, 128) * 6
93 tail = _encode_bc7_mode6_tiled(solid * 256, secret_entry=255, secret_ep=secret, ref_count=255)
94 with tempfile.TemporaryDirectory() as name:
95 pool = Path(name)/"bcpack-parent.ttpf"
96 record = _pack_etpf(128, 128, 4, 1, 98, 4096)
97 _write_custom_rds5_pool(pool, [record], [(7, 4096, tail), (7, 4096, _encode_bc7_mode6_tiled(solid * 256)),
98 (8, 16384, zlib.compress(solid * 1024))])
99 fits = {6: history.calib.Bc6hCalibrator(), 7: history.calib.Bc7Calibrator()}
100 history.calib.calibrate_from_pools([str(pool)], fits)
101 docs = {history.calib.CODEC_KEYS[c]: f.build_document()[0] for c, f in fits.items()}
102 history.extend_missing(docs, history.fit_slices([pool]))
103 bcpack = history.calib.bcpack
104 with self.assertRaises(bcpack.BcpackProvisionalError):
105 bcpack.decode(tail, 7, 4096, allow_provisional=True, history=docs)
106 history.fit_decoded_neighbors([pool], docs)
107 bc7 = docs["bc7"]
108 for field in (3, 7):
109 self.assertGreaterEqual(bc7["historyEndpointBits"][255][field], 4)
110 self.assertEqual(bc7["historyEndpointConfirmedBits"][255][field], 0)
111 self.assertLessEqual(abs(bc7["historyEndpoints"][255][field] - 128), 4)
112 self.assertEqual(bcpack.decode(tail, 7, 4096, allow_provisional=True, history=docs), solid * 256)
113
114 def test_packed_tail_fits_against_its_own_refused_stream(self):
115 # One BCPack stream holds the packed tail (blocks 0-255) and mip 1 (blocks 256-511). Chains from history
116 # entry 255 stay inside the tail, so the stream is refused and no fit reaches the entry, but mip 1 is
117 # determined and is the reference.
118 solid = bytes([0x40]) + bytes(15)
119 secret = (0, 0, 0, 128) * 6
120 stream = _encode_bc7_mode6_tiled(solid * 512, secret_entry=255, secret_ep=secret, ref_count=200)
121 with tempfile.TemporaryDirectory() as name:
122 pool = Path(name)/"one-stream.ttpf"
123 record = _pack_etpf(128, 128, 4, 1, 98, 4096)
124 _write_custom_rds5_pool(pool, [record], [(7, 8192, stream), (8, 16384, zlib.compress(solid * 1024))])
125 fits = {6: history.calib.Bc6hCalibrator(), 7: history.calib.Bc7Calibrator()}
126 history.calib.calibrate_from_pools([str(pool)], fits)
127 docs = {history.calib.CODEC_KEYS[c]: f.build_document()[0] for c, f in fits.items()}
128 history.extend_missing(docs, history.fit_slices([pool]))
129 bcpack = history.calib.bcpack
130 with self.assertRaises(bcpack.BcpackProvisionalError):
131 bcpack.decode(stream, 7, 8192, allow_provisional=True, history=docs)
132 history.fit_decoded_neighbors([pool], docs)
133 bc7 = docs["bc7"]
134 for field in (3, 7):
135 self.assertGreaterEqual(bc7["historyEndpointBits"][255][field], 4)
136 self.assertEqual(bc7["historyEndpointConfirmedBits"][255][field], 0)
137 self.assertLessEqual(abs(bc7["historyEndpoints"][255][field] - 128), 4)
138 self.assertEqual(bcpack.decode(stream, 7, 8192, allow_provisional=True, history=docs), solid * 512)
139
88 def test_build_resume_and_repair(self): 140 def test_build_resume_and_repair(self):
89 trainer = os.environ.get("LEONIDA_TEST_BCPACK_TRAINER") 141 trainer = os.environ.get("LEONIDA_TEST_BCPACK_TRAINER")
90 if not trainer and not shutil.which("cl" if os.name == "nt" else "c++"): 142 if not trainer and not shutil.which("cl" if os.name == "nt" else "c++"):
diff --git a/tests/test_indirect_clamp_telemetry.py b/tests/test_indirect_clamp_telemetry.py
index df73bf763..4e65ecf1d 100644
--- a/tests/test_indirect_clamp_telemetry.py
+++ b/tests/test_indirect_clamp_telemetry.py
@@ -47,9 +47,10 @@ def mesh_counter_ops(header):
47class TestIndirectClampTelemetry(unittest.TestCase): 47class TestIndirectClampTelemetry(unittest.TestCase):
48 def test_embedded_preclamp_mesh_counters(self): 48 def test_embedded_preclamp_mesh_counters(self):
49 src = Path(__file__).resolve().parents[1] / "runtime" / "src" 49 src = Path(__file__).resolve().parents[1] / "runtime" / "src"
50 # Active mesh records + records requesting y/z > 1; max y and max z before clamping. 50 # Active mesh records + records requesting y/z > 1; max y and max z before clamping. Then the dispatch
51 # records: wider than 65 535 groups in x, the widest x, cut at the device's limits, and all of them.
51 self.assertEqual(mesh_counter_ops((src / "indirect_clamp_spv.h").read_text(encoding="ascii")), 52 self.assertEqual(mesh_counter_ops((src / "indirect_clamp_spv.h").read_text(encoding="ascii")),
52 {(8, 234), (9, 234), (10, 239), (11, 239)}) 53 {(8, 234), (9, 234), (10, 239), (11, 239), (12, 234), (13, 239), (14, 234), (15, 234)})
53 54
54 55
55if __name__ == "__main__": 56if __name__ == "__main__":
diff --git a/tests/test_make_game_wave64.py b/tests/test_make_game_wave64.py
index 74d36ecbb..9ceb87c07 100644
--- a/tests/test_make_game_wave64.py
+++ b/tests/test_make_game_wave64.py
@@ -49,6 +49,76 @@ class SmallestMaxSubgroupTest(unittest.TestCase):
49 self.assertIsNone(make_game.smallest_max_subgroup("\tminSubgroupSize = 32\n")) 49 self.assertIsNone(make_game.smallest_max_subgroup("\tminSubgroupSize = 32\n"))
50 50
51 51
52def typed_device(name, kind, size):
53 """vulkaninfo's plain-text layout for one device as a real run prints it: deviceType just before deviceName."""
54 return ("VkPhysicalDeviceProperties:\n---------------------------\n"
55 f"\tdeviceType = PHYSICAL_DEVICE_TYPE_{kind}\n"
56 f"\tdeviceName = {name}\n"
57 "VkPhysicalDeviceVulkan13Properties:\n-----------------------------------\n"
58 "\tminSubgroupSize = "
59 f"{min(size, 32) if size >= 32 else size}\n"
60 f"\tmaxSubgroupSize = {size}\n")
61
62
63class CpuDeviceTest(unittest.TestCase):
64 """A CPU device (llvmpipe: maxSubgroupSize 8) does not decide when a GPU is listed: the runtime ranks it last."""
65
66 def test_llvmpipe_beside_a_wave64_gpu_is_left_out(self):
67 text = (typed_device("AMD Radeon RX 7900 XTX (RADV NAVI31)", "DISCRETE_GPU", 64)
68 + typed_device("AMD Ryzen 9 7950X3D (RADV RAPHAEL_MENDOCINO)", "INTEGRATED_GPU", 64)
69 + typed_device("llvmpipe (LLVM 23.1.5, 256 bits)", "CPU", 8))
70 self.assertEqual(make_game.smallest_max_subgroup(text), 64)
71 size, device, left_out = make_game.max_subgroup_decider(text)
72 self.assertEqual((size, device), (64, "AMD Radeon RX 7900 XTX (RADV NAVI31)"))
73 self.assertEqual(left_out, ["llvmpipe (LLVM 23.1.5, 256 bits)"])
74
75 def test_the_cpu_device_listed_first_is_left_out_too(self):
76 text = typed_device("llvmpipe", "CPU", 8) + typed_device("GPU", "DISCRETE_GPU", 64)
77 self.assertEqual(make_game.max_subgroup_decider(text), (64, "GPU", ["llvmpipe"]))
78
79 def test_a_32_wide_gpu_still_decides(self):
80 text = (typed_device("A", "DISCRETE_GPU", 64) + typed_device("B", "INTEGRATED_GPU", 32)
81 + typed_device("llvmpipe", "CPU", 8))
82 self.assertEqual(make_game.max_subgroup_decider(text), (32, "B", ["llvmpipe"]))
83
84 def test_only_a_cpu_device_decides(self):
85 self.assertEqual(make_game.max_subgroup_decider(typed_device("llvmpipe", "CPU", 8)), (8, "llvmpipe", []))
86
87 def test_a_cpu_device_without_a_size_does_not_make_it_unknown(self):
88 text = (typed_device("GPU", "DISCRETE_GPU", 64)
89 + "VkPhysicalDeviceProperties:\n\tdeviceType = PHYSICAL_DEVICE_TYPE_CPU\n"
90 "\tdeviceName = old lavapipe\n")
91 self.assertEqual(make_game.smallest_max_subgroup(text), 64)
92 # ...but a GPU without one still does.
93 old_gpu = ("VkPhysicalDeviceProperties:\n\tdeviceType = PHYSICAL_DEVICE_TYPE_INTEGRATED_GPU\n"
94 "\tdeviceName = old GPU\n")
95 self.assertIsNone(make_game.smallest_max_subgroup(text + old_gpu))
96
97 def test_json_key_order(self):
98 text = ('{"VkPhysicalDeviceProperties": {\n\t\t"deviceName": "llvmpipe",\n'
99 '\t\t"deviceType": "VK_PHYSICAL_DEVICE_TYPE_CPU"},\n'
100 '\t"VkPhysicalDeviceSubgroupSizeControlProperties": {\n\t\t"maxSubgroupSize": 8}}\n'
101 '{"VkPhysicalDeviceProperties": {\n\t\t"deviceName": "GPU",\n'
102 '\t\t"deviceType": "VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU"},\n'
103 '\t"VkPhysicalDeviceSubgroupSizeControlProperties": {\n\t\t"maxSubgroupSize": 64}}')
104 self.assertEqual(make_game.max_subgroup_decider(text), (64, "GPU", ["llvmpipe"]))
105
106 def test_auto_logs_the_deciding_device_and_the_left_out_one(self):
107 text = typed_device("GPU", "DISCRETE_GPU", 64) + typed_device("llvmpipe", "CPU", 8)
108 lines = []
109
110 def fake_run(args, **kw):
111 if os.path.basename(str(args[-1])) == "vk_subgroup_info.py":
112 return subprocess.CompletedProcess(args, 0, stdout='{"native64": true}', stderr="")
113 return subprocess.CompletedProcess(args, 0, stdout=text, stderr="")
114 with mock.patch.object(make_game.shutil, "which", return_value="vulkaninfo"), \
115 mock.patch.object(make_game.subprocess, "run", side_effect=fake_run), \
116 mock.patch.object(make_game, "log", lambda *a: lines.append(" ".join(map(str, a)))):
117 self.assertFalse(make_game.wave64_emulate("auto"))
118 self.assertTrue(any("llvmpipe" in line and "left out" in line for line in lines), lines)
119 self.assertTrue(any("is 64 (GPU)" in line and "emulation off" in line for line in lines), lines)
120
121
52class Wave64EmulateTest(unittest.TestCase): 122class Wave64EmulateTest(unittest.TestCase):
53 """wave64_emulate(): on and off are taken as given; auto asks vulkaninfo and falls back to on.""" 123 """wave64_emulate(): on and off are taken as given; auto asks vulkaninfo and falls back to on."""
54 124
diff --git a/tests/test_tex_export.py b/tests/test_tex_export.py
index eef043f68..e6e5e2d59 100644
--- a/tests/test_tex_export.py
+++ b/tests/test_tex_export.py
@@ -219,7 +219,7 @@ def test_export_picks_the_top_mip_placement_and_writes_dds(eq, tmp_path, fmt, na
219def test_fmt_reuses_the_indexer_table_without_12_byte_rgb32(): 219def test_fmt_reuses_the_indexer_table_without_12_byte_rgb32():
220 from tex_headers import FMT_INFO 220 from tex_headers import FMT_INFO
221 assert T.FMT == {f: v for f, v in FMT_INFO.items() if f not in (6, 7, 8)} 221 assert T.FMT == {f: v for f, v in FMT_INFO.items() if f not in (6, 7, 8)}
222 assert len(T.FMT) == 56 222 assert len(T.FMT) == 57
223 223
224 224
225@pytest.mark.parametrize("fmt", sorted(T.FMT)) 225@pytest.mark.parametrize("fmt", sorted(T.FMT))
@@ -478,14 +478,30 @@ def test_packed_r10g10b10a2_writes_a_png(eq, tmp_path, monkeypatch, capsys):
478 assert read_png(stem.with_suffix(".png")) == (2, 1, bytes((255, 0, 0, 255, 0, 0, 255, 85))) 478 assert read_png(stem.with_suffix(".png")) == (2, 1, bytes((255, 0, 0, 255, 0, 0, 255, 85)))
479 479
480 480
481def test_shared_exponent_r9g9b9e5_writes_a_png(eq, tmp_path, monkeypatch, capsys):
482 # The indexer's table lists DXGI 67, so the export reaches dds_png instead of stopping at "unsupported format".
483 # Texels (R, G, B mantissa, exponent): (256, 128, 0, 16) -> 1.0, 0.5, 0; (511, 64, 1, 15) -> 511/512, 1/8, 1/512.
484 eq(4)
485 packed = struct.pack("<II", 256 | (128 << 9) | (16 << 27), 511 | (64 << 9) | (1 << 18) | (15 << 27))
486 carve = str(tmp_path / "carve")
487 write_blob(carve, "x.rpf", 0x1000, packed + bytes(4096 - len(packed)))
488 t = texture(67, "R9G9B9E5_SHAREDEXP", 2, 1, mips=1)
489 out, code, text = png_main(tmp_path, monkeypatch, capsys, [t], carve, "--png")
490 assert code is None
491 assert text.splitlines() == ["1 textures: {'ok:first': 1} -> " + str(out), "png: {'written': 1}"]
492 stem = out / "x.rpf" / f"{0xABC:012x}_3_2x1_R9G9B9E5_SHAREDEXP"
493 assert stem.with_suffix(".dds").read_bytes()[148:] == packed
494 assert read_png(stem.with_suffix(".png")) == (2, 1, bytes((255, 128, 0, 255, 255, 32, 0, 255)))
495
496
481def test_undecodable_format_keeps_the_dds_and_counts_unsupported(eq, tmp_path, monkeypatch, capsys): 497def test_undecodable_format_keeps_the_dds_and_counts_unsupported(eq, tmp_path, monkeypatch, capsys):
482 # R10G10B10A2_UNORM_SRGB: dds_png has no decoder for its DXGI code 498 # R8G8B8A8_UINT: dds_png has no decoder for its DXGI code
483 carve, expected = build_case(eq, tmp_path, 25, top_first=True) 499 carve, expected = build_case(eq, tmp_path, 30, top_first=True)
484 t = texture(25, "R10G10B10A2_UNORM_SRGB", 64, 64, mips=2) 500 t = texture(30, "R8G8B8A8_UINT", 64, 64, mips=2)
485 out, code, text = png_main(tmp_path, monkeypatch, capsys, [t], carve, "--png") 501 out, code, text = png_main(tmp_path, monkeypatch, capsys, [t], carve, "--png")
486 assert code is None # main() returns None, so the process exits 0 502 assert code is None # main() returns None, so the process exits 0
487 assert tree(out) == ["export_log.json", f"x.rpf{os.sep}{0xABC:012x}_3_64x64_R10G10B10A2_UNORM_SRGB.dds"] 503 assert tree(out) == ["export_log.json", f"x.rpf{os.sep}{0xABC:012x}_3_64x64_R8G8B8A8_UINT.dds"]
488 assert (out / "x.rpf" / f"{0xABC:012x}_3_64x64_R10G10B10A2_UNORM_SRGB.dds").read_bytes()[148:] == expected 504 assert (out / "x.rpf" / f"{0xABC:012x}_3_64x64_R8G8B8A8_UINT.dds").read_bytes()[148:] == expected
489 assert json.loads((out / "export_log.json").read_text(encoding="utf-8"))[0]["export"]["png"] == "unsupported" 505 assert json.loads((out / "export_log.json").read_text(encoding="utf-8"))[0]["export"]["png"] == "unsupported"
490 assert text.splitlines()[1:] == ["png: {'unsupported': 1}"] 506 assert text.splitlines()[1:] == ["png: {'unsupported': 1}"]
491 507
@@ -495,7 +511,7 @@ def test_mixed_run_counts_each_kind(eq, tmp_path, monkeypatch, capsys):
495 with open(os.path.join(carve, "x.rpf", f"{0x1000:012x}.bin"), "rb") as f: 511 with open(os.path.join(carve, "x.rpf", f"{0x1000:012x}.bin"), "rb") as f:
496 write_blob(carve, "x.rpf", 0x2000, f.read()) # same 4 bpe size, so the equation is already in place 512 write_blob(carve, "x.rpf", 0x2000, f.read()) # same 4 bpe size, so the equation is already in place
497 textures = [texture(28, "R8G8B8A8_UNORM", 64, 64, mips=2), 513 textures = [texture(28, "R8G8B8A8_UNORM", 64, 64, mips=2),
498 texture(25, "R10G10B10A2_UNORM_SRGB", 64, 64, mips=2, gpu=0x2000), 514 texture(30, "R8G8B8A8_UINT", 64, 64, mips=2, gpu=0x2000),
499 texture(9999, "X", 4, 4, 1, gpu=0x3000)] 515 texture(9999, "X", 4, 4, 1, gpu=0x3000)]
500 out, code, text = png_main(tmp_path, monkeypatch, capsys, textures, carve, "--png") 516 out, code, text = png_main(tmp_path, monkeypatch, capsys, textures, carve, "--png")
501 assert text.splitlines()[1] == "png: {'written': 1, 'unsupported': 1}" 517 assert text.splitlines()[1] == "png: {'written': 1, 'unsupported': 1}"
diff --git a/tests/test_tex_headers.py b/tests/test_tex_headers.py
index 836f55ca2..2b0af6f29 100644
--- a/tests/test_tex_headers.py
+++ b/tests/test_tex_headers.py
@@ -102,6 +102,12 @@ class TestGFX10FormatMapping(unittest.TestCase):
102 with self.assertRaises(ValueError): 102 with self.assertRaises(ValueError):
103 tex_headers.dxgi_to_gfx10(99999) 103 tex_headers.dxgi_to_gfx10(99999)
104 104
105 def test_shared_exponent_format_is_indexed_and_sized(self):
106 # dds_png decodes DXGI 67; without these entries the indexer drops it and tex_export --png never sees it.
107 self.assertEqual(tex_headers.DXGI[67], "R9G9B9E5_SHAREDEXP")
108 self.assertEqual(tex_headers.FMT_INFO[67], (4, 1))
109 self.assertEqual(tex_headers.calc_mip_level_bytes(3, 2, fmt=67), 24)
110
105 def test_dxgi_dict_integrity(self): 111 def test_dxgi_dict_integrity(self):
106 for dxgi_id, name in tex_headers.DXGI.items(): 112 for dxgi_id, name in tex_headers.DXGI.items():
107 self.assertIsInstance(dxgi_id, int) 113 self.assertIsInstance(dxgi_id, int)
diff --git a/tests/test_translate.py b/tests/test_translate.py
index fe2df1288..24299f6d1 100644
--- a/tests/test_translate.py
+++ b/tests/test_translate.py
@@ -13,8 +13,8 @@ from pathlib import Path
13import pytest 13import pytest
14 14
15import rdna2spirv 15import rdna2spirv
16from conftest import (EMPTY_DXBC, KNOWN_VAL_ISSUES, ROOT, SAMPLE_DXBC, Shader, make_dxbc, mesh_psv0_chunk, 16from conftest import (EMPTY_DXBC, KNOWN_VAL_ISSUES, ROOT, SAMPLE_DXBC, TEXT_ONLY_MARK, Shader, make_dxbc,
17 requires_tools, signature_chunk) 17 mesh_psv0_chunk, requires_tools, signature_chunk)
18 18
19pytestmark = requires_tools 19pytestmark = requires_tools
20 20
@@ -64,6 +64,24 @@ def test_gpu_samples_translate_and_validate(path, make_shader):
64 shader.validate(shader.translate(), KNOWN_VAL_ISSUES.get(stem)) 64 shader.validate(shader.translate(), KNOWN_VAL_ISSUES.get(stem))
65 65
66 66
67def test_text_only_mark_is_spelled_as_in_the_gpu_runner():
68 """conftest.Shader and scripts/run_gpu_tests.py have to agree on the comment line that marks a sample llvm-mc
69 cannot assemble: with two spellings, a marked sample is handed to llvm-mc here and fails."""
70 runner = Path(ROOT, "scripts", "run_gpu_tests.py").read_text(encoding="utf-8")
71 assert f'\nTEXT_ONLY_MARK = "{TEXT_ONLY_MARK}"\n' in runner
72
73
74def test_only_a_marked_sample_skips_llvm_mc(make_shader):
75 """A sample with the text-only line becomes its own listing, comment lines dropped, whatever llvm-mc makes of
76 its instructions; the same lines without it still go to llvm-mc and fail there."""
77 body = "v_mov_b32 v1, 1.0\n v_no_such_instruction v0, v1\n\ns_endpgm\n"
78 shader = make_shader(f"; a sample llvm-mc cannot assemble\n{TEXT_ONLY_MARK}\n{body}", "cs_text_only")
79 assert shader.path.read_text(encoding="utf-8").splitlines()[1:] == [
80 "\tv_mov_b32 v1, 1.0", "\tv_no_such_instruction v0, v1", "\ts_endpgm"]
81 with pytest.raises(AssertionError, match="v_no_such_instruction"):
82 make_shader(body, "cs_not_marked")
83
84
67@pytest.mark.parametrize("case", sorted(SUPPORTED)) 85@pytest.mark.parametrize("case", sorted(SUPPORTED))
68def test_supported_instruction(case, make_shader): 86def test_supported_instruction(case, make_shader):
69 shader = make_shader(program(SUPPORTED[case])) 87 shader = make_shader(program(SUPPORTED[case]))
diff --git a/tools/address_guard.py b/tools/address_guard.py
new file mode 100644
index 000000000..1acbad528
--- /dev/null
+++ b/tools/address_guard.py
@@ -0,0 +1,110 @@
1"""The address guard's page table and header, as the runtime writes them (runtime/src/address_guard.h) and the
2shaders translated with `rdna2spirv.py --address-guard` read them (docs/d3d12_vulkan.md, "Address guard").
3
4Standard library only. Used by the translator tests and scripts/run_address_guard_gpu_test.py to build a heap, and
5as the Python reference of the check a guarded access makes:
6
7 python -I tools/address_guard.py 0x90000:0x91000 --check 0x90ffc 8
8
9Offsets are heap offsets (device address - heap_base), taken as 48-bit values: a negative one (a buffer below the
10arena) is its two's complement in 48 bits, as the shaders sign-extend a V#'s base.
11"""
12import argparse
13import struct
14import sys
15
16# Shared with tools/rdna2spirv.py (ADDRESS_GUARD and the GUARD_* constants) and runtime/src/address_guard.h.
17HEADER = 0x70000 # arena offset of the header
18ZERO = 0x71000 # refused loads read here (+ the offset within its 4 KiB page)
19DUMP = 0x78000 # refused stores and atomics write here
20RESERVED_END = 0x80000 # the guard's part of the arena ends here
21MAGIC = int.from_bytes(b"LGUARD01", "little")
22L1 = 1 << 16 # level-1 words: bits 47..32 of the offset
23BLOCK_WORDS = 1 << 15 # a level-2 block: one bit per 4 KiB page of a 4 GiB chunk
24PAGE = 1 << 12
25MASK48 = (1 << 48) - 1
26EMPTY_BLOCK, FULL_BLOCK = 0, 1 # every table has them; allocated blocks start at 2
27
28
29def header(limit, table_offset, refused=0, last=0):
30 """The 64-byte header: magic, arena size (offsets below it pass without a lookup), the table's address minus
31 heap_base (mod 2^64), the refusal count and the last refused offset, which the shaders write."""
32 return struct.pack("<QQQIIQ24x", MAGIC, limit, table_offset & ((1 << 64) - 1), refused, 0, last)
33
34
35def table_words(spans, max_blocks=None):
36 """The table's words for backed [start, end) heap offset spans: level 1, then the level-2 blocks. A page is
37 backed when any byte of it is (a GPU page is mapped whole). Past `max_blocks` allocated blocks a chunk gets the
38 full block: everything in it passes, as the runtime does when it runs out of room (and logs it)."""
39 chunks = {}
40 for start, end in spans:
41 if end <= start:
42 continue
43 for page in range((start & MASK48) >> 12, (((end - 1) & MASK48) >> 12) + 1):
44 chunks.setdefault(page >> 20, set()).add(page & 0xFFFFF)
45 level1 = [EMPTY_BLOCK] * L1
46 blocks = []
47 for chunk in sorted(chunks):
48 if max_blocks is not None and len(blocks) >= max_blocks:
49 level1[chunk] = FULL_BLOCK
50 continue
51 bits = [0] * BLOCK_WORDS
52 for page in chunks[chunk]:
53 bits[page >> 5] |= 1 << (page & 31)
54 level1[chunk] = 2 + len(blocks)
55 blocks.append(bits)
56 words = level1 + [0] * BLOCK_WORDS + [0xFFFFFFFF] * BLOCK_WORDS
57 for bits in blocks:
58 words += bits
59 return words
60
61
62def page_backed(words, offset):
63 """The table's bit for the page of heap offset `offset`."""
64 offset &= MASK48
65 block = words[(offset >> 32) & (L1 - 1)]
66 page = (offset >> 12) & 0xFFFFF
67 return bool(words[L1 + block * BLOCK_WORDS + (page >> 5)] >> (page & 31) & 1)
68
69
70def passes(words, limit, offset, extent):
71 """What a guarded access does: True when [offset, offset + extent) is below `limit` (the arena) or the pages of
72 its first and last byte are backed. `offset` is sign-extended from 48 bits, as the shaders do."""
73 offset &= MASK48
74 if offset >> 47:
75 offset -= 1 << 48
76 end = offset + extent - 1
77 if 0 <= offset < limit and 0 <= end < limit:
78 return True
79 return page_backed(words, offset) and page_backed(words, end)
80
81
82def _int(text):
83 return int(text, 0)
84
85
86def main(argv=None):
87 ap = argparse.ArgumentParser(description=__doc__.split("\n\n")[0])
88 ap.add_argument("spans", nargs="*", help="backed heap offset spans, START:END (hex or decimal)")
89 ap.add_argument("--limit", type=_int, default=RESERVED_END, help="the arena's size (default %(default)#x)")
90 ap.add_argument("--check", nargs=2, type=_int, metavar=("OFFSET", "BYTES"), action="append", default=[],
91 help="print whether an access passes")
92 a = ap.parse_args(argv)
93 spans = []
94 for text in a.spans:
95 start, _, end = text.partition(":")
96 spans.append((_int(start), _int(end)))
97 words = table_words(spans)
98 blocks = (len(words) - L1) // BLOCK_WORDS
99 print(f"table: {len(words) * 4} bytes, {blocks - 2} level-2 block(s) besides the empty and full ones")
100 for offset, extent in a.check:
101 print(f"{offset:#x} +{extent}: {'passes' if passes(words, a.limit, offset, extent) else 'refused'}")
102 return 0
103
104
105if __name__ == "__main__":
106 try: # a redirected stdout is strict ANSI code page under -I; write '?' for what it cannot encode
107 sys.stdout.reconfigure(errors="replace")
108 except (AttributeError, ValueError, OSError):
109 pass
110 sys.exit(main())
diff --git a/tools/bcpack_history_calib.py b/tools/bcpack_history_calib.py
index 4c8312b41..01bb3af2e 100644
--- a/tools/bcpack_history_calib.py
+++ b/tools/bcpack_history_calib.py
@@ -1858,6 +1858,8 @@ class Bc7Calibrator:
1858 if xy is None: 1858 if xy is None:
1859 continue 1859 continue
1860 qpts = get_quads(xy[0], xy[1]) 1860 qpts = get_quads(xy[0], xy[1])
1861 if qpts is None: # the sibling block is undetermined itself
1862 continue
1861 spread = max(max(p[c] for p in qpts) - min(p[c] for p in qpts) for c in range(4)) 1863 spread = max(max(p[c] for p in qpts) - min(p[c] for p in qpts) for c in range(4))
1862 weight = 4.0 if spread <= 6.0 else (2.0 if spread <= 18.0 else 0.5) 1864 weight = 4.0 if spread <= 6.0 else (2.0 if spread <= 18.0 else 0.5)
1863 sm = None if ns == 1 else (p2[part] if ns == 2 else p3[part]) 1865 sm = None if ns == 1 else (p2[part] if ns == 2 else p3[part])
diff --git a/tools/build_dstorage_history.py b/tools/build_dstorage_history.py
index ee9c224bd..8320f87d4 100644
--- a/tools/build_dstorage_history.py
+++ b/tools/build_dstorage_history.py
@@ -93,6 +93,164 @@ def extend_missing(base, extra):
93 base["bc7"][value][k][j] = extra["bc7"][value][k][j] 93 base["bc7"][value][k][j] = extra["bc7"][value][k][j]
94 94
95 95
96def _field_count(docs):
97 return (sum(map(bool, docs["bc6h"]["endpointClass"])) + sum(map(bool, docs["bc6h"]["indexClass"])) +
98 sum(bool(v) for key in ("historyEndpointBits", "historyIndexBits") for row in docs["bc7"][key] for v in row))
99
100
101def _unknown_references(codec, lanes, blocks, docs, table):
102 """Whether the stream's first 256 blocks start a predictor chain at a field the profile still lacks."""
103 if codec == 7:
104 try:
105 return bool(calib.bcpack._bc7_check(lanes, min(blocks, 256), table, set(), has_history=True))
106 except calib.bcpack.BcpackError:
107 return False
108 l0, l1 = lanes[0], lanes[1]
109 for i in range(min(blocks, 256)):
110 di = calib.bcpack._inter8(l1[2*i], l1[2*i+1])
111 de = (di + calib.bcpack._unzig(calib.bcpack._inter8(l0[2*i], l0[2*i+1]))) & 255
112 if (de > i and not docs["bc6h"]["endpointClass"][256+i-de] or
113 di > i and not docs["bc6h"]["indexClass"][256+i-di]):
114 return True
115 return False
116
117
118def _decode_known(pool, start, size, docs, table, cache):
119 """Tiled bytes of a range plus the byte offsets (within it) of blocks the profile cannot determine.
120
121 A BC7 stream that the decoder refuses for its unknown history still determines every block whose predictor
122 chains start elsewhere; only the blocks rooted at an unknown field, or failing the anchor and p-bit check, are
123 marked. Other BCPack streams must decode in provisional mode."""
124 bcpack = calib.bcpack
125 out = bytearray(size)
126 unknown = set()
127 for virt, csize, offset, packed, codec, _ in pool.chunks_for(start, size):
128 key = (offset, packed, codec)
129 if key not in cache:
130 raw = pool.data[offset:offset+packed]
131 bad = ()
132 if codec in (0, 8):
133 data = pool.read_range(virt, csize, None, bcpack_mode="off")
134 elif codec == 7:
135 lanes, _ = bcpack.decode_lanes(raw, 7, csize)
136 blocks = csize // 16
137 missing = bcpack._bc7_check(lanes, blocks, table, set(), has_history=True)
138 data, status = bcpack._bc7_rebuild(lanes, blocks, table)
139 ends = {k for kind, k in missing if kind == "endpoint"}
140 idxs = {k for kind, k in missing if kind == "index"}
141 l0, l1 = lanes[0], lanes[1]
142 er, ir = [-1] * blocks, [-1] * blocks
143 for i in range(blocks):
144 di = bcpack._inter8(l1[2*i], l1[2*i+1])
145 de = (di + bcpack._unzig(bcpack._inter8(l0[2*i], l0[2*i+1]))) & 255
146 er[i] = -1 if de == 0 else (256 + i - de if de > i else er[i - de])
147 ir[i] = -1 if di == 0 else (256 + i - di if di > i else ir[i - di])
148 bad = {16 * i for i in range(blocks) if status[i] or er[i] in ends or ir[i] in idxs}
149 else:
150 data = bcpack.decode(raw, codec, csize, allow_provisional=True, history=docs)
151 cache[key] = (bytes(data), bad)
152 data, bad = cache[key]
153 lo, hi = max(start, virt), min(start + size, virt + csize)
154 out[lo - start:hi - start] = data[lo - virt:hi - virt]
155 unknown.update(virt + b - start for b in bad if lo <= virt + b < hi)
156 return bytes(out), unknown
157
158
159def _known_quads(getter, layout, ref, kind, unknown):
160 """The sibling getter, answering None where a reference block is undetermined."""
161 if not unknown:
162 return getter
163 bw, bh = (ref["pixels_w"] + 3) // 4, (ref["pixels_h"] + 3) // 4
164 def get_quads(bx, by):
165 # A child's 2x2 pixels per quad lie in one block; a parent's quads cover a 2x2 block square.
166 x0, y0, span = (bx // 2, by // 2, 1) if kind == "child" else (2 * bx, 2 * by, 2)
167 for y in range(y0, y0 + span):
168 for x in range(x0, x0 + span):
169 if calib.tiled_offset(layout, ref, min(x, bw - 1), min(y, bh - 1)) in unknown:
170 return None
171 return getter(bx, by)
172 return get_quads
173
174
175def fit_decoded_neighbors(pools, docs, rounds=4):
176 """Fill fields that only streams without a raw or zlib sibling reference.
177
178 The other fits take their reference from a raw or zlib mip. A packed tail whose larger mips are BCPack-coded
179 too has none, so a field that only such streams use stays unknown and the runtime refuses them. Decode the
180 nearest BCPack sibling with the profile so far and fit against it; it may lie in the same refused stream, whose
181 undetermined blocks are left out of the reference. A decoded mip can be the reference of the next one, so
182 repeat while a round adds fields. Only fields still missing are filled, and never as confirmed.
183 """
184 table = bptc.load_bc7(docs)
185 jobs = []
186 for path in pools:
187 with closing(ttpf.Pool(path)) as pool:
188 wanted = set()
189 for _, size, offset, packed, codec, _ in pool.chunks:
190 if codec in (6, 7):
191 blocks = min(2048, size // 16)
192 lanes = calib.decode_lanes_prefix(pool.data[offset:offset+packed], codec, size, blocks*2)
193 if _unknown_references(codec, lanes, blocks, docs, table):
194 wanted.add(offset)
195 if not wanted:
196 continue
197 for index in range(pool.textures):
198 d = pool.descriptor(index)
199 codec = next((c for c in (6, 7) if d["format"] in calib.CODEC_DXGI[c]), None)
200 if not codec or d["dimension"] not in (1, 2):
201 continue
202 a = ttpf.analyze(pool, index)
203 if not a.get("available") or a.get("blocked"):
204 continue
205 layout = a["layout"]
206 for layer in range(d["depth"]):
207 for level, mip in enumerate(layout["mips"]):
208 start = (d["base"] + layout.get("data_offset", 0) + mip["offset"] +
209 layer * mip.get("slice_stride", layout.get("face_size", 0)))
210 if any(c[2] in wanted for c in pool.chunks_for(start, mip["region"])):
211 jobs.append((path, index, codec, layer, level))
212 for _ in range(rounds):
213 before = _field_count(docs)
214 table = bptc.load_bc7(docs)
215 fits = {6: calib.Bc6hCalibrator(), 7: calib.Bc7Calibrator()}
216 for path in sorted({job[0] for job in jobs}):
217 with closing(ttpf.Pool(path)) as pool:
218 cache = {}
219 for _, index, codec, layer, level in (job for job in jobs if job[0] == path):
220 d = pool.descriptor(index)
221 layout = ttpf.analyze(pool, index)["layout"]
222 mips = layout["mips"]
223 def address(m):
224 return (d["base"] + layout.get("data_offset", 0) + m["offset"] +
225 layer * m.get("slice_stride", layout.get("face_size", 0)))
226 mip = mips[level]
227 start = address(mip)
228 chunks = [(size, offset, packed, virt - start, min(2048, size // 16))
229 for virt, size, offset, packed, mode, _ in pool.chunks_for(start, mip["region"])
230 if mode == codec and start - virt < 2048 * 16]
231 for neighbor, kind in ((level+1, "child"), (level-1, "parent")):
232 if not 0 <= neighbor < len(mips) or mips[neighbor]["region"] > 1048576:
233 continue
234 ref = mips[neighbor]
235 if codec not in pool.codecs(address(ref), ref["region"]):
236 continue # a raw or zlib sibling is the other fits' reference
237 try:
238 tiled, unknown = _decode_known(pool, address(ref), ref["region"], docs, table, cache)
239 except (calib.bcpack.BcpackError, ValueError):
240 continue
241 getter = _known_quads(calib._make_sibling_quads_getter(codec, layout, ref, tiled, kind,
242 signed=d["format"] == 96),
243 layout, ref, kind, unknown)
244 inverse = calib.make_inverse_tile_lookup(layout, mip)
245 for size, offset, packed, relative, blocks in chunks:
246 lanes = calib.decode_lanes_prefix(pool.data[offset:offset+packed], codec, size, blocks*2)
247 fits[codec].add_pool_chunk(lanes, blocks, inverse, relative, getter)
248 extend_missing(docs, {calib.CODEC_KEYS[c]: f.build_document()[0] for c, f in fits.items()})
249 if _field_count(docs) == before:
250 break
251 return docs
252
253
96def collect(pools, trainer, temporary): 254def collect(pools, trainer, temporary):
97 """The host trainer consumes framed chunks and returns violation counts per candidate.""" 255 """The host trainer consumes framed chunks and returns violation counts per candidate."""
98 output = temporary / "constraints" 256 output = temporary / "constraints"
@@ -214,6 +372,7 @@ def build(game, output, trainer, base_history=None, json_out=None, if_needed=Fal
214 calib.calibrate_from_pools(pools, fits) 372 calib.calibrate_from_pools(pools, fits)
215 docs = {calib.CODEC_KEYS[c]: f.build_document()[0] for c, f in fits.items()} 373 docs = {calib.CODEC_KEYS[c]: f.build_document()[0] for c, f in fits.items()}
216 extend_missing(docs, fit_slices(pools)) 374 extend_missing(docs, fit_slices(pools))
375 fit_decoded_neighbors(pools, docs)
217 history = temp/"history.json" 376 history = temp/"history.json"
218 history.write_text(json.dumps(docs), encoding="utf-8", newline="\n") 377 history.write_text(json.dumps(docs), encoding="utf-8", newline="\n")
219 if not trainer: 378 if not trainer:
diff --git a/tools/dds_png.py b/tools/dds_png.py
index dd59d7545..ec9b73a3c 100644
--- a/tools/dds_png.py
+++ b/tools/dds_png.py
@@ -1,9 +1,11 @@
1"""Pure standard-library DDS to PNG decoder and 2x box-filter downscaler. 1"""Pure standard-library DDS to PNG decoder and 2x box-filter downscaler.
2 2
3Supports legacy and DX10 DDS headers across uncompressed 32-bit formats 3Supports legacy and DX10 DDS headers across uncompressed 32-bit formats
4(BGRA8, RGBA8, BGRX8, RGBX8, R10G10B10A2_UNORM, and arbitrary 32-bit RGB/RGBA bitmasks), the 4(BGRA8, RGBA8, BGRX8, RGBX8, R10G10B10A2_UNORM/UINT/TYPELESS, and arbitrary 32-bit RGB/RGBA bitmasks), the
5legacy 24-bit RGB layouts (BGR8/RGB8, e.g. the D3DFMT_R8G8B8 byte order), 5legacy 24-bit RGB layouts (BGR8/RGB8, e.g. the D3DFMT_R8G8B8 byte order), the DX10 16-bit packed
6and block-compressed formats (BC1, BC2, BC3, BC4, BC5, BC7). 6B5G6R5_UNORM and B5G5R5A1_UNORM (5- and 6-bit channels widened by bit replication, as for BC1 endpoints),
7the DX10 8-bit R8 and R8G8 formats (UNORM, SNORM, UINT, SINT), the 64-bit R16G16B16A16 UNORM, SNORM and
8FLOAT formats, and block-compressed formats (BC1, BC2, BC3, BC4, BC5, BC7).
7 9
8BC7 covers all eight modes. Decoding DXGI 97/98/99 (typeless, UNORM, UNORM_SRGB) 10BC7 covers all eight modes. Decoding DXGI 97/98/99 (typeless, UNORM, UNORM_SRGB)
9preserves the stored RGBA8 values. The reserved mode (no mode bit in the first 11preserves the stored RGBA8 values. The reserved mode (no mode bit in the first
@@ -11,12 +13,19 @@ byte) decodes as transparent black. BC6H is not supported.
11DXT2, DXT4 and premultiplied DX10 images are converted to straight alpha for PNG. 13DXT2, DXT4 and premultiplied DX10 images are converted to straight alpha for PNG.
12For tagged sRGB images, unpremultiplication and downscaling use linear light. The PNG stores sRGB bytes. 14For tagged sRGB images, unpremultiplication and downscaling use linear light. The PNG stores sRGB bytes.
13 15
14DX10 R16_FLOAT (54), R32_FLOAT (41) and R16G16B16A16_FLOAT (10) are read as linear values and 16DX10 R16G16B16A16_UNORM (11) is normalized to RGBA8 with half-up rounding. R16_FLOAT (54),
17R32_FLOAT (41) and R16G16B16A16_FLOAT (10) are read as linear values and
15written like the UNORM formats, with no tone mapping or sRGB transfer: clamp to 18written like the UNORM formats, with no tone mapping or sRGB transfer: clamp to
16[0, 1], then round(v * 255) half up. +inf saturates to 255; -inf, negative values 19[0, 1], then round(v * 255) half up. +inf saturates to 255; -inf, negative values
17and NaN map to 0. The single-channel formats fill red, with green and blue 0 and alpha 255; 20and NaN map to 0. The single-channel formats fill red, with green and blue 0 and alpha 255;
18R16G16B16A16_FLOAT keeps its own alpha. 21R16G16B16A16_FLOAT keeps its own alpha.
19R11G11B10_FLOAT previews clamp RGB to [0, 1], map NaN to zero and use opaque alpha. 22R16G16B16A16_SNORM (13) maps its signed normalized channels from [-1, 1] to [0, 255],
23with both -32768 and -32767 representing -1.0.
24R11G11B10_FLOAT and R9G9B9E5_SHAREDEXP (67, mantissa * 2^(exponent - 24) per channel) previews clamp RGB
25to [0, 1] and use opaque alpha; NaN maps to zero for R11G11B10_FLOAT.
26R8 and R8G8 previews fill red (and green), with blue 0 and alpha 255. SNORM maps [-1, 1] to [0, 255] like
27BC4/BC5 SNORM (-128 and -127 are both -1.0); UINT keeps the byte; SINT adds 128 for display.
28R10G10B10A2_UINT and _TYPELESS are shown like R10G10B10A2_UNORM: each field scaled from its bit width.
20 29
21Usage: 30Usage:
22 python -I tools/dds_png.py <in.dds> --info 31 python -I tools/dds_png.py <in.dds> --info
@@ -87,8 +96,21 @@ _DXGI_MAP: dict[int, str] = {
87 93: "BGRX8", 96 93: "BGRX8",
88 26: "R11G11B10_FLOAT", 97 26: "R11G11B10_FLOAT",
89 41: "R32_FLOAT", 98 41: "R32_FLOAT",
99 49: "R8G8_UNORM",
90 56: "R16_UNORM", 100 56: "R16_UNORM",
101 61: "R8_UNORM",
102 11: "RGBA16_UNORM",
103 13: "RGBA16_SNORM",
104 51: "RG8_SNORM",
105 50: "RG8_UINT",
106 52: "RG8_SINT",
107 63: "R8_SNORM",
108 62: "R8_UINT",
109 64: "R8_SINT",
91 65: "A8_UNORM", 110 65: "A8_UNORM",
111 67: "R9G9B9E5_FLOAT",
112 85: "B5G6R5_UNORM",
113 86: "B5G5R5A1_UNORM",
92 70: "BC1", 114 70: "BC1",
93 71: "BC1", 115 71: "BC1",
94 72: "BC1", 116 72: "BC1",
@@ -265,7 +287,7 @@ def _parse_header_internal(
265 f"Truncated DX10 DDS header: {len(data)} bytes (need at least {DDS_DX10_HEADER_SIZE})" 287 f"Truncated DX10 DDS header: {len(data)} bytes (need at least {DDS_DX10_HEADER_SIZE})"
266 ) 288 )
267 dxgi_format = struct.unpack_from("<I", data, 128)[0] 289 dxgi_format = struct.unpack_from("<I", data, 128)[0]
268 if dxgi_format == 24: # DXGI_FORMAT_R10G10B10A2_UNORM, R in the low bits. 290 if dxgi_format in (23, 24, 25): # R10G10B10A2_TYPELESS/UNORM/UINT, R in the low bits.
269 fmt = "RGBA8" 291 fmt = "RGBA8"
270 masks = (0x000003FF, 0x000FFC00, 0x3FF00000, 0xC0000000) 292 masks = (0x000003FF, 0x000FFC00, 0x3FF00000, 0xC0000000)
271 else: 293 else:
@@ -366,9 +388,16 @@ class _Plane(NamedTuple):
366 388
367 389
368_TEXEL_BYTES = { 390_TEXEL_BYTES = {
369 "RGBA8": 4, "BGRA8": 4, "BGRX8": 4, "RGBX8": 4, "R11G11B10_FLOAT": 4, 391 "RGBA8": 4, "BGRA8": 4, "BGRX8": 4, "RGBX8": 4,
392 "R11G11B10_FLOAT": 4, "R9G9B9E5_FLOAT": 4,
370 "BGR8": 3, "RGB8": 3, "R16_UNORM": 2, "A8_UNORM": 1, 393 "BGR8": 3, "RGB8": 3, "R16_UNORM": 2, "A8_UNORM": 1,
371 "R32_FLOAT": 4, 394 "R32_FLOAT": 4, "R8_UNORM": 1, "R8G8_UNORM": 2,
395 "RGBA16_UNORM": 8, "RGBA16_SNORM": 8,
396 "B5G6R5_UNORM": 2, "B5G5R5A1_UNORM": 2,
397 "RG8_SNORM": 2,
398 "RG8_UINT": 2, "RG8_SINT": 2,
399 "R8_SNORM": 1,
400 "R8_UINT": 1, "R8_SINT": 1,
372 **{fmt: layout[0] for fmt, layout in _HALF_FLOAT_LAYOUT.items()}, 401 **{fmt: layout[0] for fmt, layout in _HALF_FLOAT_LAYOUT.items()},
373} 402}
374 403
@@ -576,6 +605,32 @@ def _decode_uncompressed_24(
576 return bytes(out) 605 return bytes(out)
577 606
578 607
608def _decode_packed_16(payload: memoryview, width: int, height: int, fmt: str, pitch: int) -> bytes:
609 """Decode DXGI B5G6R5_UNORM or B5G5R5A1_UNORM pixels to RGBA8."""
610 row_bytes = width * 2
611 pitch = pitch or row_bytes
612 if pitch < row_bytes:
613 raise DdsError(f"Invalid {fmt} row pitch: {pitch} bytes (need at least {row_bytes})")
614 expected = (height - 1) * pitch + row_bytes
615 if len(payload) < expected:
616 raise DdsError(f"Truncated {fmt} payload: {len(payload)} bytes (need {expected})")
617
618 out = bytearray(width * height * 4)
619 dst = 0
620 for start in range(0, height * pitch, pitch):
621 for (pixel,) in struct.iter_unpack("<H", payload[start:start + row_bytes]):
622 if fmt == "B5G6R5_UNORM":
623 r, g, b = (pixel >> 11) & 0x1F, (pixel >> 5) & 0x3F, pixel & 0x1F
624 out[dst:dst + 4] = bytes(((r << 3) | (r >> 2), (g << 2) | (g >> 4),
625 (b << 3) | (b >> 2), 255))
626 else:
627 r, g, b = (pixel >> 10) & 0x1F, (pixel >> 5) & 0x1F, pixel & 0x1F
628 out[dst:dst + 4] = bytes(((r << 3) | (r >> 2), (g << 3) | (g >> 2),
629 (b << 3) | (b >> 2), 255 if pixel & 0x8000 else 0))
630 dst += 4
631 return bytes(out)
632
633
579def _bc_interp_lut(v0: int, v1: int) -> tuple[int, int, int, int, int, int, int, int]: 634def _bc_interp_lut(v0: int, v1: int) -> tuple[int, int, int, int, int, int, int, int]:
580 """Build the 8-entry BC3-alpha / BC4 / BC5 unsigned interpolation table.""" 635 """Build the 8-entry BC3-alpha / BC4 / BC5 unsigned interpolation table."""
581 if v0 > v1: 636 if v0 > v1:
@@ -1055,8 +1110,33 @@ def _decode_r11g11b10(payload: memoryview, width: int, height: int, pitch: int)
1055 return bytes(rgba) 1110 return bytes(rgba)
1056 1111
1057 1112
1058def _decode_single_channel(payload: memoryview, width: int, height: int, pitch: int, fmt: str) -> bytes: 1113def _decode_r9g9b9e5(payload: memoryview, width: int, height: int, pitch: int) -> bytes:
1059 """Red-only R16_UNORM/R32_FLOAT and alpha-only A8_UNORM.""" 1114 """Decode DXGI R9G9B9E5_SHAREDEXP, clamping its shared-exponent RGB values to [0, 1]."""
1115 row_bytes = width * 4
1116 pitch = pitch or row_bytes
1117 if pitch < row_bytes:
1118 raise DdsError(f"Invalid R9G9B9E5_FLOAT row pitch: {pitch} bytes (need at least {row_bytes})")
1119 expected = (height - 1) * pitch + row_bytes
1120 if len(payload) < expected:
1121 raise DdsError(f"Truncated R9G9B9E5_FLOAT payload: {len(payload)} bytes (need {expected})")
1122
1123 rgba = bytearray(width * height * 4)
1124 rgba[3::4] = b"\xff" * (width * height)
1125 dst = 0
1126 for start in range(0, height * pitch, pitch):
1127 for (pixel,) in struct.iter_unpack("<I", payload[start:start + row_bytes]):
1128 exponent = (pixel >> 27) & 0x1F
1129 scale = exponent - 24
1130 for shift in (0, 9, 18):
1131 value = math.ldexp((pixel >> shift) & 0x1FF, scale)
1132 rgba[dst] = 255 if value >= 1.0 else int(value * 255.0 + 0.5)
1133 dst += 1
1134 dst += 1
1135 return bytes(rgba)
1136
1137
1138def _decode_channels(payload: memoryview, width: int, height: int, pitch: int, fmt: str) -> bytes:
1139 """Preview R, RG and alpha-only texels with zero for absent color channels."""
1060 bpp = _TEXEL_BYTES[fmt] 1140 bpp = _TEXEL_BYTES[fmt]
1061 row_bytes = width * bpp 1141 row_bytes = width * bpp
1062 pitch = pitch or row_bytes 1142 pitch = pitch or row_bytes
@@ -1072,7 +1152,22 @@ def _decode_single_channel(payload: memoryview, width: int, height: int, pitch:
1072 dst = 0 1152 dst = 0
1073 for start in range(0, height * pitch, pitch): 1153 for start in range(0, height * pitch, pitch):
1074 row = payload[start:start + row_bytes] 1154 row = payload[start:start + row_bytes]
1075 if fmt == "R16_UNORM": 1155 if fmt in ("R8_UNORM", "R8G8_UNORM"):
1156 for channel in range(bpp):
1157 rgba[dst + channel:dst + width * 4:4] = row[channel::bpp]
1158 dst += width * 4
1159 elif fmt == "R8_UINT":
1160 rgba[dst:dst + 4 * width:4] = row
1161 dst += 4 * width
1162 elif fmt == "R8_SINT":
1163 for (v,) in struct.iter_unpack("<b", row):
1164 rgba[dst] = v + 128
1165 dst += 4
1166 elif fmt == "R8_SNORM":
1167 for (v,) in struct.iter_unpack("<b", row):
1168 rgba[dst] = int(round((max(-127, v) / 127.0 * 0.5 + 0.5) * 255.0))
1169 dst += 4
1170 elif fmt == "R16_UNORM":
1076 for (v,) in struct.iter_unpack("<H", row): 1171 for (v,) in struct.iter_unpack("<H", row):
1077 rgba[dst] = (v * 255 + 32767) // 65535 1172 rgba[dst] = (v * 255 + 32767) // 65535
1078 dst += 4 1173 dst += 4
@@ -1089,6 +1184,97 @@ def _decode_single_channel(payload: memoryview, width: int, height: int, pitch:
1089 return bytes(rgba) 1184 return bytes(rgba)
1090 1185
1091 1186
1187def _decode_rgba16_unorm(payload: memoryview, width: int, height: int, pitch: int) -> bytes:
1188 """Decode DXGI R16G16B16A16_UNORM to RGBA8 with half-up normalization."""
1189 row_bytes = width * 8
1190 pitch = pitch or row_bytes
1191 if pitch < row_bytes:
1192 raise DdsError(f"Invalid RGBA16_UNORM row pitch: {pitch} bytes (need at least {row_bytes})")
1193 expected = (height - 1) * pitch + row_bytes
1194 if len(payload) < expected:
1195 raise DdsError(f"Truncated RGBA16_UNORM payload: {len(payload)} bytes (need {expected})")
1196
1197 rgba = bytearray(width * height * 4)
1198 dst = 0
1199 for start in range(0, height * pitch, pitch):
1200 for (r, g, b, a) in struct.iter_unpack("<4H", payload[start:start + row_bytes]):
1201 rgba[dst:dst + 4] = bytes(((r * 255 + 32767) // 65535,
1202 (g * 255 + 32767) // 65535,
1203 (b * 255 + 32767) // 65535,
1204 (a * 255 + 32767) // 65535))
1205 dst += 4
1206 return bytes(rgba)
1207
1208
1209def _decode_rgba16_snorm(payload: memoryview, width: int, height: int, pitch: int) -> bytes:
1210 """Decode DXGI R16G16B16A16_SNORM into a displayable RGBA8 representation."""
1211 row_bytes = width * 8
1212 pitch = pitch or row_bytes
1213 if pitch < row_bytes:
1214 raise DdsError(f"Invalid RGBA16_SNORM row pitch: {pitch} bytes (need at least {row_bytes})")
1215 expected = (height - 1) * pitch + row_bytes
1216 if len(payload) < expected:
1217 raise DdsError(f"Truncated RGBA16_SNORM payload: {len(payload)} bytes (need {expected})")
1218
1219 rgba = bytearray(width * height * 4)
1220 dst = 0
1221 for start in range(0, height * pitch, pitch):
1222 for (r, g, b, a) in struct.iter_unpack("<4h", payload[start:start + row_bytes]):
1223 # SNORM maps -32768 and -32767 to -1.0; the preview maps [-1, 1] to [0, 255].
1224 channels = (max(r, -32767), max(g, -32767), max(b, -32767), max(a, -32767))
1225 rgba[dst:dst + 4] = bytes((((v + 32767) * 255 + 32767) // 65534) for v in channels)
1226 dst += 4
1227 return bytes(rgba)
1228
1229
1230def _decode_rg8_snorm(payload: memoryview, width: int, height: int, pitch: int) -> bytes:
1231 """Decode DXGI R8G8_SNORM to red/green preview channels with opaque alpha."""
1232 row_bytes = width * 2
1233 pitch = pitch or row_bytes
1234 if pitch < row_bytes:
1235 raise DdsError(f"Invalid R8G8_SNORM row pitch: {pitch} bytes (need at least {row_bytes})")
1236 expected = (height - 1) * pitch + row_bytes
1237 if len(payload) < expected:
1238 raise DdsError(f"Truncated R8G8_SNORM payload: {len(payload)} bytes (need {expected})")
1239
1240 def to_u8(value: int) -> int:
1241 return int(round((max(-127, value) / 127.0 * 0.5 + 0.5) * 255.0))
1242
1243 rgba = bytearray(width * height * 4)
1244 rgba[3::4] = b"\xff" * (width * height)
1245 dst = 0
1246 for start in range(0, height * pitch, pitch):
1247 row = payload[start:start + row_bytes]
1248 for red, green in struct.iter_unpack("<bb", row):
1249 rgba[dst:dst + 2] = bytes((to_u8(red), to_u8(green)))
1250 dst += 4
1251 return bytes(rgba)
1252
1253
1254def _decode_rg8_integer(payload: memoryview, width: int, height: int, pitch: int, fmt: str) -> bytes:
1255 """Preview DXGI R8G8_UINT as bytes and R8G8_SINT by offsetting [-128, 127] to [0, 255]."""
1256 row_bytes = width * 2
1257 pitch = pitch or row_bytes
1258 if pitch < row_bytes:
1259 raise DdsError(f"Invalid {fmt} row pitch: {pitch} bytes (need at least {row_bytes})")
1260 expected = (height - 1) * pitch + row_bytes
1261 if len(payload) < expected:
1262 raise DdsError(f"Truncated {fmt} payload: {len(payload)} bytes (need {expected})")
1263
1264 rgba = bytearray(width * height * 4)
1265 rgba[3::4] = b"\xff" * (width * height)
1266 dst = 0
1267 unpack = struct.Struct("<BB").iter_unpack if fmt == "RG8_UINT" else struct.Struct("<bb").iter_unpack
1268 for start in range(0, height * pitch, pitch):
1269 for red, green in unpack(payload[start:start + row_bytes]):
1270 if fmt == "RG8_SINT":
1271 red += 128
1272 green += 128
1273 rgba[dst:dst + 2] = bytes((red, green))
1274 dst += 4
1275 return bytes(rgba)
1276
1277
1092def _bc7_read_indices(bits: int, index_bits: int, is_anchor: tuple[int, ...]) -> tuple[list[int], int]: 1278def _bc7_read_indices(bits: int, index_bits: int, is_anchor: tuple[int, ...]) -> tuple[list[int], int]:
1093 """Read 16 LSB-first pixel indices; anchor pixels omit their implicit zero MSB.""" 1279 """Read 16 LSB-first pixel indices; anchor pixels omit their implicit zero MSB."""
1094 indices = [] 1280 indices = []
@@ -1248,6 +1434,12 @@ def _decode_plane(data: bytes | bytearray | memoryview, plane: _Plane, info: _Dd
1248 1434
1249 if fmt in ("RGBA8", "BGRA8", "BGRX8", "RGBX8"): 1435 if fmt in ("RGBA8", "BGRA8", "BGRX8", "RGBX8"):
1250 rgba = _decode_uncompressed_32(payload, width, height, fmt, masks, pitch) 1436 rgba = _decode_uncompressed_32(payload, width, height, fmt, masks, pitch)
1437 elif fmt == "RGBA16_UNORM":
1438 rgba = _decode_rgba16_unorm(payload, width, height, pitch)
1439 elif fmt == "RGBA16_SNORM":
1440 rgba = _decode_rgba16_snorm(payload, width, height, pitch)
1441 elif fmt in ("B5G6R5_UNORM", "B5G5R5A1_UNORM"):
1442 rgba = _decode_packed_16(payload, width, height, fmt, pitch)
1251 elif fmt in _HALF_FLOAT_LAYOUT: 1443 elif fmt in _HALF_FLOAT_LAYOUT:
1252 rgba = _decode_half_float(payload, width, height, fmt, pitch) 1444 rgba = _decode_half_float(payload, width, height, fmt, pitch)
1253 elif fmt in _RGB24_LAYOUTS.values(): 1445 elif fmt in _RGB24_LAYOUTS.values():
@@ -1269,8 +1461,14 @@ def _decode_plane(data: bytes | bytearray | memoryview, plane: _Plane, info: _Dd
1269 rgba = _decode_bc5(payload, 0, width, height, signed=True) 1461 rgba = _decode_bc5(payload, 0, width, height, signed=True)
1270 elif fmt == "R11G11B10_FLOAT": 1462 elif fmt == "R11G11B10_FLOAT":
1271 rgba = _decode_r11g11b10(payload, width, height, pitch) 1463 rgba = _decode_r11g11b10(payload, width, height, pitch)
1272 elif fmt in ("R16_UNORM", "R32_FLOAT", "A8_UNORM"): 1464 elif fmt == "RG8_SNORM":
1273 rgba = _decode_single_channel(payload, width, height, pitch, fmt) 1465 rgba = _decode_rg8_snorm(payload, width, height, pitch)
1466 elif fmt in ("RG8_UINT", "RG8_SINT"):
1467 rgba = _decode_rg8_integer(payload, width, height, pitch, fmt)
1468 elif fmt == "R9G9B9E5_FLOAT":
1469 rgba = _decode_r9g9b9e5(payload, width, height, pitch)
1470 elif fmt in ("R8_UNORM", "R8G8_UNORM", "R8_SNORM", "R8_UINT", "R8_SINT", "R16_UNORM", "R32_FLOAT", "A8_UNORM"):
1471 rgba = _decode_channels(payload, width, height, pitch, fmt)
1274 elif fmt == "BC7": 1472 elif fmt == "BC7":
1275 rgba = _decode_bc7(payload, 0, width, height) 1473 rgba = _decode_bc7(payload, 0, width, height)
1276 else: 1474 else:
diff --git a/tools/rdna2spirv.py b/tools/rdna2spirv.py
index 4311f3100..b10de728e 100644
--- a/tools/rdna2spirv.py
+++ b/tools/rdna2spirv.py
@@ -120,6 +120,33 @@ PC_TAIL_SET, PC_TAIL_BINDING = 1, 0
120F16_HALVES = False 120F16_HALVES = False
121F16_HALF_TOP = 29 121F16_HALF_TOP = 29
122OPT_SPIRV = False # --opt: run tools/spirv_opt.py basic-block peephole pass on emitted SPIR-V (#884) 122OPT_SPIRV = False # --opt: run tools/spirv_opt.py basic-block peephole pass on emitted SPIR-V (#884)
123# --address-guard: every access through heap_base + VA is checked against what the runtime backs (docs/d3d12_vulkan.md,
124# "Address guard"); one that fails reads 0 and drops its store. The runtime (LEONIDA_ADDRESS_GUARD=1) writes a header
125# at arena offset GUARD_HEADER: GUARD_MAGIC (u64), the arena's size (u64, offsets below it pass without a lookup), the
126# page table's address minus heap_base (u64), a count of refused accesses (u32, the shaders add to it) and the last
127# refused offset (u64). Without the magic every access passes, so a guarded module runs unchanged on a runtime with
128# the guard off. A refused load reads the zero area, a refused store or atomic writes the dump area; both are in the
129# arena's reserved first 512 KiB. Shared with runtime/src/address_guard.h.
130ADDRESS_GUARD = False
131# --address-guard (diagnostics): the module's id, FNV-1a of its file stem, which a refused access stores in the header
132# (+28) next to its offset, so the runtime's refusal line names the module. Set by _translate for each file.
133GUARD_MODULE_ID = 0
134
135
136def fnv1a32(text):
137 """32-bit FNV-1a of a UTF-8 string (the address guard's module id; tools/address_guard.py --module maps names)."""
138 h = 0x811C9DC5
139 for b in text.encode("utf-8"):
140 h = ((h ^ b) * 0x01000193) & 0xFFFFFFFF
141 return h
142
143
144GUARD_HEADER = 0x70000
145GUARD_ZERO = 0x71000
146GUARD_DUMP = 0x78000
147GUARD_MAGIC = int.from_bytes(b"LGUARD01", "little")
148GUARD_L1 = 1 << 16 # level-1 entries: bits 47..32 of the 48-bit offset (4 GiB each)
149GUARD_BLOCK_WORDS = 1 << 15 # level-2 block: one bit per 4 KiB page of a 4 GiB chunk
123 150
124 151
125# The heap base as one %ulong, in the entry block of %main: the push constants don't change during the invocation, and 152# The heap base as one %ulong, in the entry block of %main: the push constants don't change during the invocation, and
@@ -132,6 +159,109 @@ HEAP_BASE_ENTRY = ["%heap_base_lo = OpLoad %uint %ud_base_lo_p",
132 "%heap_base = OpBitwiseOr %ulong %heap_base_hi_sh %heap_base_lo64"] 159 "%heap_base = OpBitwiseOr %ulong %heap_base_hi_sh %heap_base_lo64"]
133 160
134 161
162def guard_entry(cl, cu):
163 """--address-guard: the entry-block lines that read the runtime's guard header at heap_base + GUARD_HEADER once
164 per invocation: %gd_on (the magic is there), %gd_limit (the arena's size) and %gd_table (the page table's address
165 minus heap_base). The header is in the arena's reserved range, so the read itself is always backed."""
166 L = [f"%gd_hp = OpIAdd %ulong %heap_base {cl(GUARD_HEADER)}",
167 "%gd_p = OpConvertUToPtr %_ptr_PSB_arr %gd_hp"]
168 for i in range(6):
169 L += [f"%gd_w{i}p = OpAccessChain %_ptr_PSB_uint %gd_p {cu(i)}", f"%gd_w{i} = OpLoad %uint %gd_w{i}p Aligned 4"]
170 for name, lo, hi in (("magic", 0, 1), ("limit", 2, 3), ("table", 4, 5)):
171 L += [f"%gd_{name}_l = OpUConvert %ulong %gd_w{lo}", f"%gd_{name}_h = OpUConvert %ulong %gd_w{hi}",
172 f"%gd_{name}_s = OpShiftLeftLogical %ulong %gd_{name}_h %c64_32",
173 f"%gd_{name} = OpBitwiseOr %ulong %gd_{name}_s %gd_{name}_l"]
174 L.append(f"%gd_on = OpIEqual %bool %gd_magic {cl(GUARD_MAGIC)}")
175 return L
176
177
178def guard_function(cl, cu):
179 """--address-guard: %guard_fn(heap_base, on, limit, table, offset, delta, sink) -> host address.
180
181 `offset` is the access's sign-extended 48-bit heap offset and `delta` its span minus one. Without the runtime's
182 guard (`on` false), or when [offset, offset + delta] is below `limit` (the arena, all of it backed), the result is
183 heap_base + offset after one compare. Otherwise the page table at heap_base + table decides, per 4 KiB page of the
184 first and the last byte: level 1 is GUARD_L1 words indexed by offset bits 47..32 (the level-2 block of that 4 GiB
185 chunk: 0 none backed, 1 all), level 2 is one bit per page (bits 31..12), GUARD_BLOCK_WORDS words a block, after
186 level 1. A refused access counts itself in the header and goes to heap_base + sink + (offset & 0xFFF)."""
187 ul = "%ulong"
188 L = ["%guard_fn = OpFunction %ulong None %fn_guard",
189 "%ga_hb = OpFunctionParameter %ulong", "%ga_on = OpFunctionParameter %bool",
190 "%ga_lim = OpFunctionParameter %ulong", "%ga_tab = OpFunctionParameter %ulong",
191 "%ga_off = OpFunctionParameter %ulong", "%ga_delta = OpFunctionParameter %ulong",
192 "%ga_sink = OpFunctionParameter %ulong",
193 "%ga_entry = OpLabel",
194 f"%ga_end = OpIAdd {ul} %ga_off %ga_delta",
195 f"%ga_a = OpULessThan %bool %ga_off %ga_lim",
196 f"%ga_b = OpULessThan %bool %ga_end %ga_lim",
197 "%ga_in = OpLogicalAnd %bool %ga_a %ga_b",
198 "%ga_off_n = OpLogicalNot %bool %ga_on",
199 "%ga_pass = OpLogicalOr %bool %ga_in %ga_off_n",
200 "OpSelectionMerge %ga_m None",
201 "OpBranchConditional %ga_pass %ga_m %ga_slow",
202 "%ga_slow = OpLabel",
203 f"%ga_tb = OpIAdd {ul} %ga_hb %ga_tab"]
204
205 def bit(k, o):
206 """Lines for %ga_bit{k}: the page-table bit of heap offset id `o`."""
207 return [f"%ga_c{k} = OpShiftRightLogical {ul} {o} %c64_32",
208 f"%ga_ci{k} = OpBitwiseAnd {ul} %ga_c{k} {cl(GUARD_L1 - 1)}",
209 f"%ga_ca{k} = OpShiftLeftLogical {ul} %ga_ci{k} {cl(2)}",
210 f"%ga_cp{k} = OpIAdd {ul} %ga_tb %ga_ca{k}",
211 f"%ga_cq{k} = OpConvertUToPtr %_ptr_PSB_uint %ga_cp{k}",
212 f"%ga_e{k} = OpLoad %uint %ga_cq{k} Aligned 4",
213 f"%ga_e64{k} = OpUConvert {ul} %ga_e{k}",
214 f"%ga_pg{k} = OpShiftRightLogical {ul} {o} {cl(12)}",
215 f"%ga_pm{k} = OpBitwiseAnd {ul} %ga_pg{k} {cl(0xFFFFF)}",
216 f"%ga_pw{k} = OpShiftRightLogical {ul} %ga_pm{k} {cl(5)}",
217 f"%ga_eb{k} = OpIMul {ul} %ga_e64{k} {cl(GUARD_BLOCK_WORDS)}",
218 f"%ga_wi0{k} = OpIAdd {ul} %ga_eb{k} %ga_pw{k}",
219 f"%ga_wi{k} = OpIAdd {ul} %ga_wi0{k} {cl(GUARD_L1)}",
220 f"%ga_wa{k} = OpShiftLeftLogical {ul} %ga_wi{k} {cl(2)}",
221 f"%ga_wp{k} = OpIAdd {ul} %ga_tb %ga_wa{k}",
222 f"%ga_wq{k} = OpConvertUToPtr %_ptr_PSB_uint %ga_wp{k}",
223 f"%ga_w{k} = OpLoad %uint %ga_wq{k} Aligned 4",
224 f"%ga_pl{k} = OpUConvert %uint %ga_pm{k}",
225 f"%ga_sh{k} = OpBitwiseAnd %uint %ga_pl{k} {cu(31)}",
226 f"%ga_bs{k} = OpShiftRightLogical %uint %ga_w{k} %ga_sh{k}",
227 f"%ga_b1{k} = OpBitwiseAnd %uint %ga_bs{k} {cu(1)}",
228 f"%ga_bit{k} = OpINotEqual %bool %ga_b1{k} {cu(0)}"]
229 L += bit(0, "%ga_off") + bit(1, "%ga_end")
230 hdr = cl(GUARD_HEADER)
231 L += ["%ga_ok = OpLogicalAnd %bool %ga_bit0 %ga_bit1",
232 "OpSelectionMerge %ga_rm None",
233 "OpBranchConditional %ga_ok %ga_rm %ga_ref",
234 "%ga_ref = OpLabel",
235 # The refusal count (header +24) and the last refused offset (+32, low dword first): what the runtime logs.
236 f"%ga_h = OpIAdd {ul} %ga_hb {hdr}",
237 "%ga_hp = OpConvertUToPtr %_ptr_PSB_arr %ga_h",
238 f"%ga_cnt = OpAccessChain %_ptr_PSB_uint %ga_hp {cu(6)}",
239 f"%ga_old = OpAtomicIAdd %uint %ga_cnt {cu(1)} {cu(0)} {cu(1)}",
240 "%ga_lo = OpUConvert %uint %ga_off",
241 "%ga_hs = OpShiftRightLogical %ulong %ga_off %c64_32",
242 "%ga_hi = OpUConvert %uint %ga_hs",
243 f"%ga_lp = OpAccessChain %_ptr_PSB_uint %ga_hp {cu(8)}",
244 "OpStore %ga_lp %ga_lo Aligned 4",
245 f"%ga_hq = OpAccessChain %_ptr_PSB_uint %ga_hp {cu(9)}",
246 "OpStore %ga_hq %ga_hi Aligned 4",
247 # The refusing module's id (+28, diagnostics): GUARD_MODULE_ID, FNV-1a of the translated file's stem.
248 f"%ga_ip = OpAccessChain %_ptr_PSB_uint %ga_hp {cu(7)}",
249 f"OpStore %ga_ip {cu(GUARD_MODULE_ID)} Aligned 4",
250 "OpBranch %ga_rm",
251 "%ga_rm = OpLabel",
252 "OpBranch %ga_m",
253 "%ga_m = OpLabel",
254 "%ga_okp = OpPhi %bool %true %ga_entry %ga_ok %ga_rm",
255 f"%ga_good = OpIAdd {ul} %ga_hb %ga_off",
256 f"%ga_po = OpBitwiseAnd {ul} %ga_off {cl(0xFFF)}",
257 f"%ga_sb = OpIAdd {ul} %ga_hb %ga_sink",
258 f"%ga_bad = OpIAdd {ul} %ga_sb %ga_po",
259 f"%ga_r = OpSelect {ul} %ga_okp %ga_good %ga_bad",
260 "OpReturnValue %ga_r",
261 "OpFunctionEnd"]
262 return L
263
264
135def pc_tail_chain(name, member, c): 265def pc_tail_chain(name, member, c):
136 """`name` = pointer to push-constant tail member `member`, numbered as in %UserData (1-2 heap base, 3-4 code base, 266 """`name` = pointer to push-constant tail member `member`, numbered as in %UserData (1-2 heap base, 3-4 code base,
137 5-6 --mesh-compute output address): a member of the push-constant block by default, member - 1 of the uniform 267 5-6 --mesh-compute output address): a member of the push-constant block by default, member - 1 of the uniform
@@ -421,6 +551,7 @@ class Gen:
421 self.bar_rounds = False # native wave32 cs with an s_barrier outside uniform control flow (bar_scheduler) 551 self.bar_rounds = False # native wave32 cs with an s_barrier outside uniform control flow (bar_scheduler)
422 self.uses_storage3d = False 552 self.uses_storage3d = False
423 self.uses_heap = False 553 self.uses_heap = False
554 self.uses_guard = False # --address-guard: an access called %guard_fn (the entry block reads the header)
424 self.uses_codebase = False 555 self.uses_codebase = False
425 self.uses_pc_tail = False # --pc-tail-ubo and the shader reads the tail (set in assemble) 556 self.uses_pc_tail = False # --pc-tail-ubo and the shader reads the tail (set in assemble)
426 self.uses_long = False 557 self.uses_long = False
@@ -440,6 +571,8 @@ class Gen:
440 self.fmt_fn = None # lines of the typed-buffer format-decode function, once a dynamic-format load needs it 571 self.fmt_fn = None # lines of the typed-buffer format-decode function, once a dynamic-format load needs it
441 self.fmt_norm_fn = None # lines of the shared exact norm quotient for a run-time width (SHADER-849) 572 self.fmt_norm_fn = None # lines of the shared exact norm quotient for a run-time width (SHADER-849)
442 self.fmt_enc_fn = None # shared format encoder for stores through a dynamic V# 573 self.fmt_enc_fn = None # shared format encoder for stores through a dynamic V#
574 self.guard_fn = None # --address-guard: lines of %guard_fn, once an access needs it
575 self.guard_last = None # --address-guard: (guarded address, unguarded address) of the last host_addr
443 self.uses_fmt_tables = False # %fmt_desc_tab / %fmt_norm_rep_tab: a format's kind and channel widths 576 self.uses_fmt_tables = False # %fmt_desc_tab / %fmt_norm_rep_tab: a format's kind and channel widths
444 self.x_round_fns: dict[str, list[str]] = {} # emulate_inline: helper functions for x_round pre-barrier setup 577 self.x_round_fns: dict[str, list[str]] = {} # emulate_inline: helper functions for x_round pre-barrier setup
445 self.x_round_fn_types: dict[int, str] = {} # emulate_inline: arity -> OpTypeFunction id for x_round_fns 578 self.x_round_fn_types: dict[int, str] = {} # emulate_inline: arity -> OpTypeFunction id for x_round_fns
@@ -1596,8 +1729,14 @@ class Gen:
1596 def modify_f(self, f, a): 1729 def modify_f(self, f, a):
1597 return self.tof(self.modify(self.tou(f), a)) 1730 return self.tof(self.modify(self.tou(f), a))
1598 1731
1599 def host_addr(self, xbox_va): 1732 def host_addr(self, xbox_va, kind="load", extent=4):
1600 """Add the sign-extended 48-bit effective VA to the heap base built in the entry block.""" 1733 """Add the sign-extended 48-bit effective VA to the heap base built in the entry block.
1734
1735 --address-guard: the address is checked against the runtime's page table first (guard_addr). `kind` is
1736 "load", "store" or "rmw" (an atomic): a refused load reads the zero area, a refused store or atomic the dump
1737 area. `extent` is the bytes the access spans from this address: an int, or for a run-time span a callable
1738 that emits it and returns the %ulong id of extent - 1 (guard_delta), called only with the guard so the
1739 unguarded module stays byte for byte the same. Its first and last byte are checked."""
1601 # V# truncates device_address - heap_base to 48 bits, including when an import lies below the heap. 1740 # V# truncates device_address - heap_base to 48 bits, including when an import lies below the heap.
1602 # Extend after adding byte offsets. Console user VAs and full-width root VAs already fit signed 48 bits. 1741 # Extend after adding byte offsets. Console user VAs and full-width root VAs already fit signed 48 bits.
1603 shift = self.cu(16) 1742 shift = self.cu(16)
@@ -1607,8 +1746,77 @@ class Gen:
1607 self.emit(f"{r} = OpIAdd %ulong %heap_base {offset}") 1746 self.emit(f"{r} = OpIAdd %ulong %heap_base {offset}")
1608 self.uses_heap = True 1747 self.uses_heap = True
1609 self.cu(1), self.cu(2) # member indices of the push-constant block, declared before assembly 1748 self.cu(1), self.cu(2) # member indices of the push-constant block, declared before assembly
1749 if not ADDRESS_GUARD:
1750 return r
1751 return self.guard_addr(offset, r, kind, extent)
1752
1753 def guard_delta(self, n, step):
1754 """--address-guard: the %ulong id of (bytes spanned - 1) for n dwords (an int, or a %uint id of at least 1),
1755 linear (step None) or each `step` bytes apart (a %uint id: a swizzled buffer access, buf_dword_ptr)."""
1756 if isinstance(n, int) and (step is None or n == 1):
1757 return self.cl(4 * n - 1)
1758 if isinstance(n, int):
1759 n1 = self.cu(n - 1)
1760 else:
1761 zero, dec, n1 = self.tmp(), self.tmp(), self.tmp()
1762 self.emit(f"{zero} = OpIEqual %bool {n} {self.cu(0)}")
1763 self.emit(f"{dec} = OpISub %uint {n} {self.cu(1)}")
1764 self.emit(f"{n1} = OpSelect %uint {zero} {self.cu(0)} {dec}")
1765 m, m64, d = self.tmp(), self.tmp(), self.tmp()
1766 self.emit(f"{m} = OpIMul %uint {n1} {step if step is not None else self.cu(4)}")
1767 self.emit(f"{m64} = OpUConvert %ulong {m}")
1768 self.emit(f"{d} = OpIAdd %ulong {m64} {self.cl(3)}")
1769 return d
1770
1771 def guard_addr(self, offset, unguarded, kind, extent):
1772 """--address-guard: the host address of the access at heap offset `offset` (sign-extended 48 bits): itself
1773 when the runtime backs its first and last byte (or the runtime's guard is off), else a place in the arena's
1774 zero area (a load) or dump area (a store, an atomic) at the same offset within a 4 KiB page, so alignment
1775 holds. One call of %guard_fn (an arena offset passes on a compare; any other looks up two page-table bits)."""
1776 self.uses_guard = True
1777 delta = self.cl(extent - 1) if isinstance(extent, int) else extent()
1778 sink = self.cl(GUARD_ZERO if kind == "load" else GUARD_DUMP)
1779 if self.guard_fn is None:
1780 self.guard_fn = guard_function(self.cl, self.cu)
1781 guard_entry(self.cl, self.cu) # registers the entry block's constants while they can still be declared
1782 r = self.tmp()
1783 self.emit(f"{r} = OpFunctionCall %ulong %guard_fn %heap_base %gd_on %gd_limit %gd_table {offset} {delta} {sink}")
1784 self.guard_last = (r, unguarded)
1610 return r 1785 return r
1611 1786
1787 def sub_dwords(self, nbytes, b3):
1788 """--address-guard: the dwords a 1- or 2-byte access at byte `b3` (a %uint id) of a dword reads: 1, or 2 for
1789 a 2-byte access at byte 3 (an int or a %uint id)."""
1790 if nbytes == 1:
1791 return 1
1792 cross, n = self.tmp(), self.tmp()
1793 self.emit(f"{cross} = OpIEqual %bool {b3} {self.cu(3)}")
1794 self.emit(f"{n} = OpSelect %uint {cross} {self.cu(2)} {self.cu(1)}")
1795 return n
1796
1797 def store_element_dwords(self, fmt, fixed_fmt):
1798 """--address-guard: the whole dwords a typed buffer store of one element writes (at least 1: a 1- or 2-byte
1799 element is written through its own guarded dword): from the instruction's format, or the V#'s (`fmt`, a %uint
1800 id) at run time."""
1801 if fixed_fmt is not None:
1802 return max(1, self.FORMATS.get(fixed_fmt, (4,))[0] // 4)
1803 size, q, n = self.fmt_size_of(fmt), self.tmp(), self.tmp()
1804 self.emit(f"{q} = OpShiftRightLogical %uint {size} {self.cu(2)}")
1805 self.emit(f"{n} = OpExtInst %uint %glsl UMax {q} {self.cu(1)}")
1806 return n
1807
1808 def guard_zero(self, value, ty="%uint"):
1809 """--address-guard: `value` (an atomic's result) or 0 when the last host_addr was refused: a refused atomic
1810 ran on the dump area, and what it returned from there means nothing. `value` unchanged without the guard."""
1811 if not ADDRESS_GUARD or self.guard_last is None:
1812 return value
1813 r, unguarded = self.guard_last
1814 ok, out = self.tmp(), self.tmp()
1815 zero = self.cu(0) if ty == "%uint" else self.cl(0)
1816 self.emit(f"{ok} = OpIEqual %bool {r} {unguarded}")
1817 self.emit(f"{out} = OpSelect {ty} {ok} {value} {zero}")
1818 return out
1819
1612 def tof(self, u): 1820 def tof(self, u):
1613 """The %float with the bits of %uint u. Bitcasting a tou result back gives tou's argument (Gen.bitcast_from), 1821 """The %float with the bits of %uint u. Bitcasting a tou result back gives tou's argument (Gen.bitcast_from),
1614 so u must be a %uint and tou's argument a %float; an %int's bits go through int_bits.""" 1822 so u must be a %uint and tou's argument a %float; an %int's bits go through int_bits."""
@@ -2336,7 +2544,7 @@ class Gen:
2336 self.emit(f"{f2} = OpISub %ulong {far} {self.cl(3)}") 2544 self.emit(f"{f2} = OpISub %ulong {far} {self.cl(3)}")
2337 self.emit(f"{sel} = OpSelect %ulong {cross} {f2} {va}") 2545 self.emit(f"{sel} = OpSelect %ulong {cross} {f2} {va}")
2338 va = sel 2546 va = sel
2339 p, sh = self.global_byte_ptr(va) 2547 p, sh = self.global_byte_ptr(va, "store" if store else "load")
2340 if store: 2548 if store:
2341 byte, mk, inv, vs, t1, t2 = (self.tmp() for _ in range(6)) 2549 byte, mk, inv, vs, t1, t2 = (self.tmp() for _ in range(6))
2342 self.emit(f"{byte} = OpBitFieldUExtract %uint {old} {self.cu(16 * (half or 0) + 8 * k)} {self.cu(8)}") 2550 self.emit(f"{byte} = OpBitFieldUExtract %uint {old} {self.cu(16 * (half or 0) + 8 * k)} {self.cu(8)}")
@@ -2386,7 +2594,7 @@ class Gen:
2386 vd = a[0] 2594 vd = a[0]
2387 addr, _, in_b, raw_parts, step = self.buffer_address(a, mods, parts=True) 2595 addr, _, in_b, raw_parts, step = self.buffer_address(a, mods, parts=True)
2388 act = self.active_b() 2596 act = self.active_b()
2389 ptr, host = self.tmp(), self.host_addr(addr) 2597 ptr, host = self.tmp(), self.host_addr(addr, "load", lambda: self.guard_delta(n, step))
2390 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {host}") 2598 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {host}")
2391 2599
2392 def guarded(cond, dwords): 2600 def guarded(cond, dwords):
@@ -2453,7 +2661,7 @@ class Gen:
2453 self.emit(f"{b64} = OpUConvert %ulong {b3}") 2661 self.emit(f"{b64} = OpUConvert %ulong {b3}")
2454 self.emit(f"{aligned} = OpISub %ulong {addr} {b64}") 2662 self.emit(f"{aligned} = OpISub %ulong {addr} {b64}")
2455 self.emit(f"{sh} = OpShiftLeftLogical %uint {b3} {self.cu(3)}") 2663 self.emit(f"{sh} = OpShiftLeftLogical %uint {b3} {self.cu(3)}")
2456 ptr, host = self.tmp(), self.host_addr(aligned) 2664 ptr, host = self.tmp(), self.host_addr(aligned, "load", lambda: self.guard_delta(self.sub_dwords(nbytes, b3), step))
2457 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {host}") 2665 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {host}")
2458 p0, w0 = self.buf_dword_ptr(ptr, host, step, 0), self.tmp() 2666 p0, w0 = self.buf_dword_ptr(ptr, host, step, 0), self.tmp()
2459 self.emit(f"{w0} = OpLoad %uint {p0} Aligned 4") 2667 self.emit(f"{w0} = OpLoad %uint {p0} Aligned 4")
@@ -2957,7 +3165,7 @@ class Gen:
2957 self.emit(f"OpBranchConditional {cond} {lbl_do} {lbl_end}") 3165 self.emit(f"OpBranchConditional {cond} {lbl_do} {lbl_end}")
2958 self.emit(f"{lbl_do} = OpLabel") 3166 self.emit(f"{lbl_do} = OpLabel")
2959 ptr, p, init = self.tmp(), self.tmp(), self.tmp() 3167 ptr, p, init = self.tmp(), self.tmp(), self.tmp()
2960 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(addr)}") 3168 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(addr, 'rmw')}")
2961 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(0)}") 3169 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(0)}")
2962 self.emit(f"{init} = OpAtomicLoad %uint {p} {self.cu(1)} {self.cu(0)}") 3170 self.emit(f"{init} = OpAtomicLoad %uint {p} {self.cu(1)} {self.cu(0)}")
2963 self.emit(f"OpBranch {lbl_hdr}") 3171 self.emit(f"OpBranch {lbl_hdr}")
@@ -2975,6 +3183,7 @@ class Gen:
2975 self.emit(f"{lbl_cont} = OpLabel") 3183 self.emit(f"{lbl_cont} = OpLabel")
2976 self.emit(f"OpBranch {lbl_hdr}") 3184 self.emit(f"OpBranch {lbl_hdr}")
2977 self.emit(f"{lbl_exit} = OpLabel") 3185 self.emit(f"{lbl_exit} = OpLabel")
3186 cur = self.guard_zero(cur)
2978 self.emit(f"OpBranch {lbl_end}") 3187 self.emit(f"OpBranch {lbl_end}")
2979 self.emit(f"{lbl_end} = OpLabel") 3188 self.emit(f"{lbl_end} = OpLabel")
2980 old = self.tmp() 3189 old = self.tmp()
@@ -3022,7 +3231,7 @@ class Gen:
3022 self.emit(f"OpBranchConditional {cond} {lbl_do} {lbl_end}") 3231 self.emit(f"OpBranchConditional {cond} {lbl_do} {lbl_end}")
3023 self.emit(f"{lbl_do} = OpLabel") 3232 self.emit(f"{lbl_do} = OpLabel")
3024 ptr, p = self.tmp(), self.tmp() 3233 ptr, p = self.tmp(), self.tmp()
3025 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(full)}") 3234 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(full, 'rmw')}")
3026 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(0)}") 3235 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(0)}")
3027 if is_inc_dec: 3236 if is_inc_dec:
3028 res, done_lbl = self.atomic_inc_dec_cas(p, val, kind, lbl_do) 3237 res, done_lbl = self.atomic_inc_dec_cas(p, val, kind, lbl_do)
@@ -3035,6 +3244,7 @@ class Gen:
3035 self.emit(f"{res} = OpAtomicCompareExchange %uint {p} {self.cu(1)} {self.cu(0)} {self.cu(0)} {val} {cmp}") 3244 self.emit(f"{res} = OpAtomicCompareExchange %uint {p} {self.cu(1)} {self.cu(0)} {self.cu(0)} {val} {cmp}")
3036 else: 3245 else:
3037 self.emit(f"{res} = {self.BUF_ATOMICS[kind][0]} %uint {p} {self.cu(1)} {self.cu(0)} {val}") 3246 self.emit(f"{res} = {self.BUF_ATOMICS[kind][0]} %uint {p} {self.cu(1)} {self.cu(0)} {val}")
3247 res = self.guard_zero(res)
3038 self.emit(f"OpBranch {lbl_end}") 3248 self.emit(f"OpBranch {lbl_end}")
3039 self.emit(f"{lbl_end} = OpLabel") 3249 self.emit(f"{lbl_end} = OpLabel")
3040 self.emit(f"{old} = OpPhi %uint {res} {done_lbl} {self.cu(0)} {pre}") 3250 self.emit(f"{old} = OpPhi %uint {res} {done_lbl} {self.cu(0)} {pre}")
@@ -3086,13 +3296,14 @@ class Gen:
3086 self.emit(f"OpBranchConditional {cond} {lbl_do} {lbl_end}") 3296 self.emit(f"OpBranchConditional {cond} {lbl_do} {lbl_end}")
3087 self.emit(f"{lbl_do} = OpLabel") 3297 self.emit(f"{lbl_do} = OpLabel")
3088 ptr = self.tmp() 3298 ptr = self.tmp()
3089 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(full)}") 3299 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(full, 'rmw', 8)}")
3090 res = [] 3300 res = []
3091 for w in range(2): 3301 for w in range(2):
3092 p, r = self.tmp(), self.tmp() 3302 p, r = self.tmp(), self.tmp()
3093 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(w)}") 3303 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(w)}")
3094 self.emit(f"{r} = {spv} %uint {p} {self.cu(1)} {self.cu(0)} {vals[w]}") 3304 self.emit(f"{r} = {spv} %uint {p} {self.cu(1)} {self.cu(0)} {vals[w]}")
3095 res.append(r) 3305 res.append(r)
3306 res = [self.guard_zero(r) for r in res]
3096 self.emit(f"OpBranch {lbl_end}") 3307 self.emit(f"OpBranch {lbl_end}")
3097 self.emit(f"{lbl_end} = OpLabel") 3308 self.emit(f"{lbl_end} = OpLabel")
3098 olds = [] 3309 olds = []
@@ -3160,7 +3371,7 @@ class Gen:
3160 self.emit(f"OpBranchConditional {cond} {lbl_do} {lbl_end}") 3371 self.emit(f"OpBranchConditional {cond} {lbl_do} {lbl_end}")
3161 self.emit(f"{lbl_do} = OpLabel") 3372 self.emit(f"{lbl_do} = OpLabel")
3162 ptr, p = self.tmp(), self.tmp() 3373 ptr, p = self.tmp(), self.tmp()
3163 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(addr)}") 3374 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(addr, 'rmw')}")
3164 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(0)}") 3375 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(0)}")
3165 if is_inc_dec: 3376 if is_inc_dec:
3166 res_do, done_lbl = self.atomic_inc_dec_cas(p, val, kind, lbl_do) 3377 res_do, done_lbl = self.atomic_inc_dec_cas(p, val, kind, lbl_do)
@@ -3178,6 +3389,7 @@ class Gen:
3178 self.emit(f"{res_do} = OpAtomicExchange %uint {p} {self.cu(1)} {self.cu(0)} {val}") 3389 self.emit(f"{res_do} = OpAtomicExchange %uint {p} {self.cu(1)} {self.cu(0)} {val}")
3179 else: 3390 else:
3180 self.emit(f"{res_do} = {spv} %uint {p} {self.cu(1)} {self.cu(0)} {val}") 3391 self.emit(f"{res_do} = {spv} %uint {p} {self.cu(1)} {self.cu(0)} {val}")
3392 res_do = self.guard_zero(res_do)
3181 self.emit(f"OpBranch {lbl_end}") 3393 self.emit(f"OpBranch {lbl_end}")
3182 self.emit(f"{lbl_end} = OpLabel") 3394 self.emit(f"{lbl_end} = OpLabel")
3183 self.emit(f"{old} = OpPhi %uint {res_do} {done_lbl} {self.cu(0)} {pre_label}") 3395 self.emit(f"{old} = OpPhi %uint {res_do} {done_lbl} {self.cu(0)} {pre_label}")
@@ -3228,13 +3440,14 @@ class Gen:
3228 self.emit(f"OpBranchConditional {cond} {lbl_do} {lbl_end}") 3440 self.emit(f"OpBranchConditional {cond} {lbl_do} {lbl_end}")
3229 self.emit(f"{lbl_do} = OpLabel") 3441 self.emit(f"{lbl_do} = OpLabel")
3230 ptr = self.tmp() 3442 ptr = self.tmp()
3231 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(addr)}") 3443 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(addr, 'rmw', 8)}")
3232 res = [] 3444 res = []
3233 for w in range(2): 3445 for w in range(2):
3234 p, r = self.tmp(), self.tmp() 3446 p, r = self.tmp(), self.tmp()
3235 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(w)}") 3447 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(w)}")
3236 self.emit(f"{r} = {self.BUF_ATOMICS[kind][0]} %uint {p} {self.cu(1)} {self.cu(0)} {vals[w]}") 3448 self.emit(f"{r} = {self.BUF_ATOMICS[kind][0]} %uint {p} {self.cu(1)} {self.cu(0)} {vals[w]}")
3237 res.append(r) 3449 res.append(r)
3450 res = [self.guard_zero(r) for r in res]
3238 self.emit(f"OpBranch {lbl_end}") 3451 self.emit(f"OpBranch {lbl_end}")
3239 self.emit(f"{lbl_end} = OpLabel") 3452 self.emit(f"{lbl_end} = OpLabel")
3240 olds = [] 3453 olds = []
@@ -3628,7 +3841,7 @@ class Gen:
3628 self.emit(f"OpSelectionMerge {lbl_end} None") 3841 self.emit(f"OpSelectionMerge {lbl_end} None")
3629 self.emit(f"OpBranchConditional {cond} {lbl_do} {lbl_end}") 3842 self.emit(f"OpBranchConditional {cond} {lbl_do} {lbl_end}")
3630 self.emit(f"{lbl_do} = OpLabel") 3843 self.emit(f"{lbl_do} = OpLabel")
3631 ptr, host = self.tmp(), self.host_addr(aligned) 3844 ptr, host = self.tmp(), self.host_addr(aligned, "load", lambda: self.guard_delta(need, step))
3632 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {host}") 3845 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {host}")
3633 loaded = [] 3846 loaded = []
3634 for i in range(5): 3847 for i in range(5):
@@ -3839,7 +4052,7 @@ class Gen:
3839 "global_load_sbyte_d16": (1, False, True, 0), "global_load_sbyte_d16_hi": (1, False, True, 1), 4052 "global_load_sbyte_d16": (1, False, True, 0), "global_load_sbyte_d16_hi": (1, False, True, 1),
3840 "global_load_short_d16": (2, False, False, 0), "global_load_short_d16_hi": (2, False, False, 1)} 4053 "global_load_short_d16": (2, False, False, 0), "global_load_short_d16_hi": (2, False, False, 1)}
3841 4054
3842 def global_byte_ptr(self, va): 4055 def global_byte_ptr(self, va, kind="load"):
3843 """(pointer to the dword holding byte `va`, bit offset of that byte in it) for a ulong Xbox VA.""" 4056 """(pointer to the dword holding byte `va`, bit offset of that byte in it) for a ulong Xbox VA."""
3844 lo, b3, b64, al, arr, p, sh = (self.tmp() for _ in range(7)) 4057 lo, b3, b64, al, arr, p, sh = (self.tmp() for _ in range(7))
3845 self.emit(f"{lo} = OpUConvert %uint {va}") 4058 self.emit(f"{lo} = OpUConvert %uint {va}")
@@ -3847,7 +4060,7 @@ class Gen:
3847 self.emit(f"{b64} = OpUConvert %ulong {b3}") 4060 self.emit(f"{b64} = OpUConvert %ulong {b3}")
3848 self.emit(f"{al} = OpISub %ulong {va} {b64}") 4061 self.emit(f"{al} = OpISub %ulong {va} {b64}")
3849 # MoltenVK 1.4.0 needs an addressable array element for the Metal atomic operations (as buffer stores). 4062 # MoltenVK 1.4.0 needs an addressable array element for the Metal atomic operations (as buffer stores).
3850 self.emit(f"{arr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(al)}") 4063 self.emit(f"{arr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(al, kind)}")
3851 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {arr} {self.cu(0)}") 4064 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {arr} {self.cu(0)}")
3852 self.emit(f"{sh} = OpShiftLeftLogical %uint {b3} {self.cu(3)}") 4065 self.emit(f"{sh} = OpShiftLeftLogical %uint {b3} {self.cu(3)}")
3853 return p, sh 4066 return p, sh
@@ -3879,7 +4092,7 @@ class Gen:
3879 if k: 4092 if k:
3880 va = self.tmp() 4093 va = self.tmp()
3881 self.emit(f"{va} = OpIAdd %ulong {full} {self.cl(k)}") 4094 self.emit(f"{va} = OpIAdd %ulong {full} {self.cl(k)}")
3882 p, sh = self.global_byte_ptr(va) 4095 p, sh = self.global_byte_ptr(va, "store" if store else "load")
3883 if store: 4096 if store:
3884 byte, mk, inv, vs, t1, t2 = (self.tmp() for _ in range(6)) 4097 byte, mk, inv, vs, t1, t2 = (self.tmp() for _ in range(6))
3885 self.emit(f"{byte} = OpBitFieldUExtract %uint {old} {self.cu(16 * (half or 0) + 8 * k)} {self.cu(8)}") 4098 self.emit(f"{byte} = OpBitFieldUExtract %uint {old} {self.cu(16 * (half or 0) + 8 * k)} {self.cu(8)}")
@@ -3948,7 +4161,8 @@ class Gen:
3948 self.emit(f"{b3} = OpBitwiseAnd %uint {lo32} {self.cu(3)}") 4161 self.emit(f"{b3} = OpBitwiseAnd %uint {lo32} {self.cu(3)}")
3949 self.emit(f"{b64} = OpUConvert %ulong {b3}") 4162 self.emit(f"{b64} = OpUConvert %ulong {b3}")
3950 self.emit(f"{al} = OpISub %ulong {full} {b64}") 4163 self.emit(f"{al} = OpISub %ulong {full} {b64}")
3951 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(al)}") 4164 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr "
4165 f"{self.host_addr(al, 'load', lambda: self.guard_delta(self.sub_dwords(bits // 8, b3), None))}")
3952 self.emit(f"{p0} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(0)}") 4166 self.emit(f"{p0} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(0)}")
3953 self.emit(f"{w} = OpLoad %uint {p0} Aligned 4") 4167 self.emit(f"{w} = OpLoad %uint {p0} Aligned 4")
3954 self.emit(f"{shb} = OpShiftLeftLogical %uint {b3} {self.cu(3)}") 4168 self.emit(f"{shb} = OpShiftLeftLogical %uint {b3} {self.cu(3)}")
@@ -3975,7 +4189,7 @@ class Gen:
3975 vals.append(v) 4189 vals.append(v)
3976 else: 4190 else:
3977 ptr = self.tmp() 4191 ptr = self.tmp()
3978 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(full)}") 4192 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(full, 'load', 4 * n)}")
3979 for i in range(n): 4193 for i in range(n):
3980 p, v = self.tmp(), self.tmp() 4194 p, v = self.tmp(), self.tmp()
3981 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(i)}") 4195 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(i)}")
@@ -3997,7 +4211,7 @@ class Gen:
3997 self.emit(f"OpBranchConditional {act} {lbl_do} {lbl_end}") 4211 self.emit(f"OpBranchConditional {act} {lbl_do} {lbl_end}")
3998 self.emit(f"{lbl_do} = OpLabel") 4212 self.emit(f"{lbl_do} = OpLabel")
3999 ptr = self.tmp() 4213 ptr = self.tmp()
4000 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(full)}") 4214 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(full, 'store', 4 * n)}")
4001 for i in range(n): 4215 for i in range(n):
4002 p = self.tmp() 4216 p = self.tmp()
4003 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(i)}") 4217 self.emit(f"{p} = OpAccessChain %_ptr_PSB_uint {ptr} {self.cu(i)}")
@@ -4543,7 +4757,7 @@ class Gen:
4543 if words is not None and per is not None and len(words) > 1: 4757 if words is not None and per is not None and len(words) > 1:
4544 # modes 0 and 3: every dword is stored only if it ends inside (measured: a store that straddles the edge 4758 # modes 0 and 3: every dword is stored only if it ends inside (measured: a store that straddles the edge
4545 # writes the dwords before it); a store past the end of the buffer is a host-memory hazard otherwise 4759 # writes the dwords before it); a store past the end of the buffer is a host-memory hazard otherwise
4546 ptr, host = self.tmp(), self.host_addr(addr) 4760 ptr, host = self.tmp(), self.host_addr(addr, "store", lambda: self.guard_delta(len(words), step))
4547 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {host}") 4761 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {host}")
4548 for i, w in enumerate(words): 4762 for i, w in enumerate(words):
4549 cond, lbl_do, lbl_end = self.tmp(), self.tmp() + "_do", self.tmp() + "_end" 4763 cond, lbl_do, lbl_end = self.tmp(), self.tmp() + "_do", self.tmp() + "_end"
@@ -4570,7 +4784,8 @@ class Gen:
4570 self.emit(f"OpSelectionMerge {lbl_end} None") 4784 self.emit(f"OpSelectionMerge {lbl_end} None")
4571 self.emit(f"OpBranchConditional {act} {lbl_do} {lbl_end}") 4785 self.emit(f"OpBranchConditional {act} {lbl_do} {lbl_end}")
4572 self.emit(f"{lbl_do} = OpLabel") 4786 self.emit(f"{lbl_do} = OpLabel")
4573 ptr, host = self.tmp(), self.host_addr(addr) 4787 ptr, host = self.tmp(), self.host_addr(addr, "store", lambda: self.guard_delta(
4788 len(words) if words is not None else self.store_element_dwords(plans[0], fixed_fmt), step))
4574 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {host}") 4789 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {host}")
4575 if words is not None: 4790 if words is not None:
4576 for i, w in enumerate(words): 4791 for i, w in enumerate(words):
@@ -4660,7 +4875,7 @@ class Gen:
4660 self.emit(f"{sh24} = OpBitwiseAnd %uint {sh8} {self.cu(24)}") 4875 self.emit(f"{sh24} = OpBitwiseAnd %uint {sh8} {self.cu(24)}")
4661 # MoltenVK 1.4.0 needs an addressable array element for the Metal atomic operations. 4876 # MoltenVK 1.4.0 needs an addressable array element for the Metal atomic operations.
4662 dword_arr = self.tmp() 4877 dword_arr = self.tmp()
4663 self.emit(f"{dword_arr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(al)}") 4878 self.emit(f"{dword_arr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(al, 'store')}")
4664 self.emit(f"{ap} = OpAccessChain %_ptr_PSB_uint {dword_arr} {self.cu(0)}") 4879 self.emit(f"{ap} = OpAccessChain %_ptr_PSB_uint {dword_arr} {self.cu(0)}")
4665 self.emit(f"{mk} = OpCopyObject %uint {self.cu((1 << (8 * size)) - 1)}") 4880 self.emit(f"{mk} = OpCopyObject %uint {self.cu((1 << (8 * size)) - 1)}")
4666 self.emit(f"{mks} = OpShiftLeftLogical %uint {mk} {sh24}") 4881 self.emit(f"{mks} = OpShiftLeftLogical %uint {mk} {sh24}")
@@ -4703,7 +4918,7 @@ class Gen:
4703 self.emit(f"{sh24} = OpBitwiseAnd %uint {sh8} {self.cu(24)}") 4918 self.emit(f"{sh24} = OpBitwiseAnd %uint {sh8} {self.cu(24)}")
4704 # MoltenVK 1.4.0 needs an addressable array element for the Metal atomic operations. 4919 # MoltenVK 1.4.0 needs an addressable array element for the Metal atomic operations.
4705 dword_arr = self.tmp() 4920 dword_arr = self.tmp()
4706 self.emit(f"{dword_arr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(al)}") 4921 self.emit(f"{dword_arr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(al, 'store')}")
4707 self.emit(f"{ap} = OpAccessChain %_ptr_PSB_uint {dword_arr} {self.cu(0)}") 4922 self.emit(f"{ap} = OpAccessChain %_ptr_PSB_uint {dword_arr} {self.cu(0)}")
4708 self.emit(f"{one} = OpIEqual %bool {size} {self.cu(1)}") 4923 self.emit(f"{one} = OpIEqual %bool {size} {self.cu(1)}")
4709 self.emit(f"{mk} = OpSelect %uint {one} {self.cu(0xFF)} {self.cu(0xFFFF)}") 4924 self.emit(f"{mk} = OpSelect %uint {one} {self.cu(0xFF)} {self.cu(0xFFFF)}")
@@ -7419,22 +7634,23 @@ class Gen:
7419 raise Unsupported("DPP operands") 7634 raise Unsupported("DPP operands")
7420 # A VOPC compare in DPP form (docs/design.md, "DPP on a VOPC compare"): src0 comes through the same lane 7635 # A VOPC compare in DPP form (docs/design.md, "DPP on a VOPC compare"): src0 comes through the same lane
7421 # selection and the result is a mask bit, not a VGPR. Only the forms where every lane writes its bit are 7636 # selection and the result is a mask bit, not a VGPR. Only the forms where every lane writes its bit are
7422 # taken: what a lane that DPP leaves unwritten does to its VCC bit is not measured. 7637 # taken: what a lane that DPP leaves unwritten does to its VCC bit is measured on RDNA3 only (it gets 0), not
7638 # on RDNA2. v_cmpx writes EXEC instead and prints no destination, so its src0 is the first operand
7639 # (SHADER-VOPCX-DPP).
7423 compare = base_op(ins["op"]).startswith("v_cmp") 7640 compare = base_op(ins["op"]).startswith("v_cmp")
7641 first = 0 if base_op(ins["op"]).startswith("v_cmpx") else 1
7424 if compare: 7642 if compare:
7425 if base_op(ins["op"]).startswith("v_cmpx"): 7643 if len(args) != first + 2:
7426 raise Unsupported("DPP on v_cmpx")
7427 if len(args) != 3:
7428 raise Unsupported("DPP compare operands") 7644 raise Unsupported("DPP compare operands")
7429 if row_mask != 0xF or bank_mask != 0xF or not (dpp8 is not None or bound): 7645 if row_mask != 0xF or bank_mask != 0xF or not (dpp8 is not None or bound):
7430 raise Unsupported("DPP compare with lanes that keep their mask bit") 7646 raise Unsupported("DPP compare with lanes DPP leaves unwritten")
7431 elif args[0].get("k") != "vgpr" or args[0].get("n", 1) != 1: 7647 elif args[0].get("k") != "vgpr" or args[0].get("n", 1) != 1:
7432 raise Unsupported("DPP destination") 7648 raise Unsupported("DPP destination")
7433 if args[1].get("n", 1) != 1: 7649 if args[first].get("n", 1) != 1:
7434 raise Unsupported("DPP 64-bit source") 7650 raise Unsupported("DPP 64-bit source")
7435 if args[1].get("sext"): 7651 if args[first].get("sext"):
7436 raise Unsupported("DPP sext") 7652 raise Unsupported("DPP sext")
7437 src = args[1] 7653 src = args[first]
7438 raw_src = dict(src) 7654 raw_src = dict(src)
7439 raw_src.pop("neg", None) 7655 raw_src.pop("neg", None)
7440 raw_src.pop("abs", None) 7656 raw_src.pop("abs", None)
@@ -7615,10 +7831,10 @@ class Gen:
7615 else: 7831 else:
7616 write = self.tmp() 7832 write = self.tmp()
7617 self.emit(f"{write} = OpLogicalAnd %bool {enabled} {src_ok}") 7833 self.emit(f"{write} = OpLogicalAnd %bool {enabled} {src_ok}")
7618 args[1] = {"k": "ssa", "v": src0} 7834 args[first] = {"k": "ssa", "v": src0}
7619 if compare: 7835 if compare:
7620 # Every lane is enabled and an invalid source reads 0 (checked above), so the compare's own EXEC guard 7836 # Every lane is enabled and an invalid source reads 0 (checked above), so the compare's own EXEC guard
7621 # is the only one: the mask write is the plain compare's. 7837 # is the only one: the mask write is the plain compare's (for v_cmpx, EXEC's).
7622 return self._insn({**ins, "args": args}) 7838 return self._insn({**ins, "args": args})
7623 previous = self.dpp_guard 7839 previous = self.dpp_guard
7624 self.dpp_guard = write 7840 self.dpp_guard = write
@@ -12795,7 +13011,7 @@ class Gen:
12795 self.emit(f"{addr} = OpBitwiseOr %ulong {sh} {l64}") 13011 self.emit(f"{addr} = OpBitwiseOr %ulong {sh} {l64}")
12796 self.emit(f"{full} = OpIAdd %ulong {addr} {o64}") 13012 self.emit(f"{full} = OpIAdd %ulong {addr} {o64}")
12797 ptr = self.tmp() 13013 ptr = self.tmp()
12798 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(full)}") 13014 self.emit(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(full, 'load', 4 * n)}")
12799 self.uses_psb = True 13015 self.uses_psb = True
12800 lim = None 13016 lim = None
12801 lim_val = None 13017 lim_val = None
@@ -15217,7 +15433,14 @@ class Gen:
15217 e(f"{off} = OpShiftLeftLogical %ulong {nm} {self.cl(3)}") 15433 e(f"{off} = OpShiftLeftLogical %ulong {nm} {self.cl(3)}")
15218 e(f"{addr} = OpIAdd %ulong {base} {off}") 15434 e(f"{addr} = OpIAdd %ulong {base} {off}")
15219 ptr = T() 15435 ptr = T()
15220 e(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(addr)}") 15436
15437 def node_delta():
15438 """--address-guard: a box32 node (type 5) is read up to dword 27, the others up to dword 15."""
15439 b32, d = T(), T()
15440 e(f"{b32} = OpIEqual %bool {ntype} {self.cu(5)}")
15441 e(f"{d} = OpSelect %ulong {b32} {self.cl(4 * 28 - 1)} {self.cl(4 * 16 - 1)}")
15442 return d
15443 e(f"{ptr} = OpConvertUToPtr %_ptr_PSB_arr {self.host_addr(addr, 'load', node_delta)}")
15221 15444
15222 def ldw(i): 15445 def ldw(i):
15223 pp, v = T(), T() 15446 pp, v = T(), T()
@@ -16259,6 +16482,10 @@ def assemble(gen):
16259 types.append("%fn_desc_lookup = OpTypeFunction %uint " + " ".join(["%uint"] * 8)) 16482 types.append("%fn_desc_lookup = OpTypeFunction %uint " + " ".join(["%uint"] * 8))
16260 if gen.tbuffer_norm_fns: 16483 if gen.tbuffer_norm_fns:
16261 types.append("%fn_tbuffer_norm = OpTypeFunction %uint %uint") 16484 types.append("%fn_tbuffer_norm = OpTypeFunction %uint %uint")
16485 if gen.guard_fn:
16486 # --address-guard: (heap_base, on, limit, table, offset, delta, sink) -> host address; no other function
16487 # type of the module has this signature.
16488 types.append("%fn_guard = OpTypeFunction %ulong %ulong %bool %ulong %ulong %ulong %ulong %ulong")
16262 if gen.fmt_fn or gen.fmt_enc_fn: 16489 if gen.fmt_fn or gen.fmt_enc_fn:
16263 types.append("%v4uint_fmt = OpTypeVector %uint 4") # dedupe_types merges it with any other uvec4 16490 types.append("%v4uint_fmt = OpTypeVector %uint 4") # dedupe_types merges it with any other uvec4
16264 if gen.fmt_fn: 16491 if gen.fmt_fn:
@@ -16562,6 +16789,8 @@ def assemble(gen):
16562 gen.consts.setdefault(1, "%c1") 16789 gen.consts.setdefault(1, "%c1")
16563 gen.consts.setdefault(2, "%c2") 16790 gen.consts.setdefault(2, "%c2")
16564 fn += [pc_tail_chain("%ud_base_lo_p", 1, gen.cu), pc_tail_chain("%ud_base_hi_p", 2, gen.cu)] + HEAP_BASE_ENTRY 16791 fn += [pc_tail_chain("%ud_base_lo_p", 1, gen.cu), pc_tail_chain("%ud_base_hi_p", 2, gen.cu)] + HEAP_BASE_ENTRY
16792 if gen.uses_guard:
16793 fn += guard_entry(gen.cl, gen.cu)
16565 if gen.uses_codebase: 16794 if gen.uses_codebase:
16566 fn += [pc_tail_chain("%ud_code_lo_p", 3, gen.cu), pc_tail_chain("%ud_code_hi_p", 4, gen.cu)] 16795 fn += [pc_tail_chain("%ud_code_lo_p", 3, gen.cu), pc_tail_chain("%ud_code_hi_p", 4, gen.cu)]
16567 # A mesh shader reads its root arguments from the graphics window (user_data_dword, GRAPHICS_ROOT_DWORD). 16796 # A mesh shader reads its root arguments from the graphics window (user_data_dword, GRAPHICS_ROOT_DWORD).
@@ -16687,7 +16916,7 @@ def assemble(gen):
16687 fn.append(f"{p} = OpAccessChain %_ptr_Function_uint {arr} {gen.cu(r)}") 16916 fn.append(f"{p} = OpAccessChain %_ptr_Function_uint {arr} {gen.cu(r)}")
16688 # Spill pointers last: a spilled value's type may be declared anywhere above. 16917 # Spill pointers last: a spilled value's type may be declared anywhere above.
16689 types += [f"{ptr} = OpTypePointer Function {t}" for t, ptr in gen.x_ptr_types.items()] 16918 types += [f"{ptr} = OpTypePointer Function {t}" for t, ptr in gen.x_ptr_types.items()]
16690 helpers = (gen.desc_fn or []) + (gen.fmt_fn or []) + (gen.fmt_enc_fn or []) 16919 helpers = (gen.desc_fn or []) + (gen.fmt_fn or []) + (gen.fmt_enc_fn or []) + (gen.guard_fn or [])
16691 for function in gen.tbuffer_norm_fns.values(): 16920 for function in gen.tbuffer_norm_fns.values():
16692 helpers.extend(function) 16921 helpers.extend(function)
16693 for function in gen.x_round_fns.values(): 16922 for function in gen.x_round_fns.values():
@@ -17661,6 +17890,18 @@ def mix_literal(raw, printed, op):
17661 return stored 17890 return stored
17662 17891
17663 17892
17893def restore_text_cut_mix_literal(ins, enc):
17894 """llvm-mc 21.1.8 can print a v_fma_mix* literal cut to its low 16 bits in the text while its printed encoding
17895 holds all 32 (the printed-encoding check then passes, and the text alone reads the high half as +0.0): take the
17896 literal from the printed encoding. Measured on 1.0.2.1: 47,910 such instructions in 1,218 pipeline-library
17897 programs and 6 in one FidelityFX FSPX program; none among the game's own shaders."""
17898 if len(enc) != 12 or enc[3] != 0xCC or not base_op(ins["op"]).startswith("v_fma_mix"):
17899 return
17900 literal = int.from_bytes(enc[8:], "little")
17901 if literal >> 16 and any(a.get("k") == "imm" and a.get("v") == literal & 0xFFFF for a in ins["args"][1:4]):
17902 restore_mix_literal(ins, enc, literal)
17903
17904
17664def restore_mix_literal(ins, raw, literal): 17905def restore_mix_literal(ins, raw, literal):
17665 """Give every source of ``ins`` that the stored bytes encode as the literal (SRC field 0xff) its 32-bit value.""" 17906 """Give every source of ``ins`` that the stored bytes encode as the literal (SRC field 0xff) its 32-bit value."""
17666 w1 = int.from_bytes(raw[4:8], "little") 17907 w1 = int.from_bytes(raw[4:8], "little")
@@ -17735,12 +17976,12 @@ def restore_mix_inline_literal(ins, raw, literal):
17735 17976
17736def skipped_form(ins, blob, at): 17977def skipped_form(ins, blob, at):
17737 """Whether rdna2_decode's instruction at blob offset ``at`` is one of the forms llvm-mc skips that 17978 """Whether rdna2_decode's instruction at blob offset ``at`` is one of the forms llvm-mc skips that
17738 restore_vcc_tuples takes from the blob: a tuple that reaches vcc (SGPRs 106 and 107), a VOPC f32 compare in DPP 17979 restore_vcc_tuples takes from the blob: a tuple that reaches vcc (SGPRs 106 and 107), a VOPC f32 compare (v_cmp or
17739 form (docs/design.md, "DPP on a VOPC compare"), or the measured v_dot4_i32_i8 with op_sel 2 / op_sel_hi 5 and no 17980 v_cmpx) in DPP form (docs/design.md, "DPP on a VOPC compare"), or the measured v_dot4_i32_i8 with op_sel 2 / op_sel_hi 5 and no
17740 clamp or neg, all reserved bits clear (tedin7, upstream PR #281; docs/fspx.md). shader_disasm.py prints the last 17981 clamp or neg, all reserved bits clear (tedin7, upstream PR #281; docs/fspx.md). shader_disasm.py prints the last
17741 two itself; this covers a listing made without that pass (#984).""" 17982 two itself; this covers a listing made without that pass (#984)."""
17742 op = ins["op"] 17983 op = ins["op"]
17743 if op.startswith("v_cmp_") and op.endswith("_f32_dpp"): 17984 if op.startswith(("v_cmp_", "v_cmpx_")) and op.endswith("_f32_dpp"):
17744 return True 17985 return True
17745 if op == "v_dot4_i32_i8" and int.from_bytes(blob[at:at + 4], "little") >> 8 == 0xCC1650 and blob[at + 7] >> 3 == 1: 17986 if op == "v_dot4_i32_i8" and int.from_bytes(blob[at:at + 4], "little") >> 8 == 0xCC1650 and blob[at + 7] >> 3 == 1:
17746 return True 17987 return True
@@ -18022,6 +18263,9 @@ def check_printed_encodings(path, info):
18022 Only a listing whose header names the code range it was disassembled from (shader_disasm.py), with a blob that 18263 Only a listing whose header names the code range it was disassembled from (shader_disasm.py), with a blob that
18023 holds that range, is checked: a hand-written listing, run_gpu_tests.py's "code 0x0..0x0 (synthetic)" and a 18264 holds that range, is checked: a hand-written listing, run_gpu_tests.py's "code 0x0..0x0 (synthetic)" and a
18024 test's header-only blob are not the bytes the text came from.""" 18265 test's header-only blob are not the bytes the text came from."""
18266 for ins in info["insns"]:
18267 if ins.get("enc"): # needs only the printed encoding, so it runs before the blob checks below
18268 restore_text_cut_mix_literal(ins, bytes.fromhex(ins["enc"]))
18025 with open(path, encoding="utf-8", errors="replace") as f: 18269 with open(path, encoding="utf-8", errors="replace") as f:
18026 m = HDR.match(f.readline()) 18270 m = HDR.match(f.readline())
18027 if not m or int(m.group(3), 16) <= int(m.group(2), 16): 18271 if not m or int(m.group(3), 16) <= int(m.group(2), 16):
@@ -18165,6 +18409,8 @@ def barriers_under_control_flow(text):
18165 18409
18166 18410
18167def _translate(path): 18411def _translate(path):
18412 global GUARD_MODULE_ID
18413 GUARD_MODULE_ID = fnv1a32(os.path.splitext(os.path.basename(path))[0])
18168 info = parse_file(path) 18414 info = parse_file(path)
18169 stage = stage_of(info["name"], path) 18415 stage = stage_of(info["name"], path)
18170 if stage not in ("vs", "ps", "cs", "ms", "gs"): 18416 if stage not in ("vs", "ps", "cs", "ms", "gs"):
@@ -18188,6 +18434,7 @@ def _translate(path):
18188 exact = bool(bad) and len(bad) == info["invalid"] 18434 exact = bool(bad) and len(bad) == info["invalid"]
18189 for ins in insns: 18435 for ins in insns:
18190 enc = bytes.fromhex(ins["enc"]) 18436 enc = bytes.fromhex(ins["enc"])
18437 restore_text_cut_mix_literal(ins, enc)
18191 op, operand_count = ins["op"], len(ins["args"]) 18438 op, operand_count = ins["op"], len(ins["args"])
18192 if exact: 18439 if exact:
18193 while pos in bad and not same_encoding(blob[pos:pos + len(enc)], enc, op, operand_count): 18440 while pos in bad and not same_encoding(blob[pos:pos + len(enc)], enc, op, operand_count):
@@ -18885,11 +19132,19 @@ def translate(path):
18885 19132
18886 A workgroup barrier has to be reached by every invocation. NVIDIA waits for every thread, so one that 19133 A workgroup barrier has to be reached by every invocation. NVIDIA waits for every thread, so one that
18887 an invocation never reaches stands the group until the driver resets the card (Xid 109, device lost). 19134 an invocation never reaches stands the group until the driver resets the card (Xid 109, device lost).
18888 A program that hangs costs a whole run; re-translating it costs one more pass offline.""" 19135 A program that hangs costs a whole run; re-translating it costs one more pass offline.
19136
19137 Only a multi-wave plan falls back. A single-wave workgroup (`inline_all`, `x_lanes == 64`) is one wave:
19138 its barriers sit at the top level or under `%pc` guards, and `%pc` between blocks comes from scalar state
19139 and votes read back from `%x_buf`, so all invocations take the same path; lane-local `%pc` exists only in
19140 `emit_folded_region`'s `if (%active)` bodies, which emit no exchange and no barrier. The round loop is
19141 also what drives RADV/ACO's spiller to tens of GB and the program 10-100 times slower (docs/design.md,
19142 "Wave64 emulation: single-wave barrier fallback")."""
18889 global WAVE64_PLAN 19143 global WAVE64_PLAN
18890 asm = _translate(path) 19144 asm = _translate(path)
18891 gen = _translate.last_gen 19145 gen = _translate.last_gen
18892 if (gen is not None and getattr(gen, "emulate_plan", None) is not None 19146 plan = getattr(gen, "emulate_plan", None) if gen is not None else None
19147 if (plan is not None and plan.get("mode") != "inline_all"
18893 and barriers_under_control_flow(asm)): 19148 and barriers_under_control_flow(asm)):
18894 WAVE64_PLAN = False 19149 WAVE64_PLAN = False
18895 try: 19150 try:
@@ -19461,6 +19716,8 @@ def shader_meta(g, asm, src_path=None, fssm_path=None):
19461 lay["params"] = {str(k): v for k, v in lay["params"].items()} 19716 lay["params"] = {str(k): v for k, v in lay["params"].items()}
19462 m["mesh_compute"] = lay 19717 m["mesh_compute"] = lay
19463 m["push_constant_bytes"] = lay["push_constant_bytes"] 19718 m["push_constant_bytes"] = lay["push_constant_bytes"]
19719 if g.uses_guard:
19720 m["address_guard"] = True # --address-guard: its accesses read the runtime's guard header
19464 if PC_TAIL_UBO: 19721 if PC_TAIL_UBO:
19465 # --pc-tail-ubo: s0..s31 alone in push constants; the tail, if the shader reads it, in a uniform block. 19722 # --pc-tail-ubo: s0..s31 alone in push constants; the tail, if the shader reads it, in a uniform block.
19466 m["push_constant_bytes"] = 4 * USER_SGPRS 19723 m["push_constant_bytes"] = 4 * USER_SGPRS
@@ -19880,6 +20137,10 @@ def main():
19880 help="keep only s0..s31 (128 bytes) in push constants and read the heap base, code base and " 20137 help="keep only s0..s31 (128 bytes) in push constants and read the heap base, code base and "
19881 "--mesh-compute output address from a uniform block at set 1, binding 0 (metadata: pc_tail), " 20138 "--mesh-compute output address from a uniform block at set 1, binding 0 (metadata: pc_tail), "
19882 "for devices whose maxPushConstantsSize is below 144") 20139 "for devices whose maxPushConstantsSize is below 144")
20140 ap.add_argument("--address-guard", action="store_true",
20141 help="check every heap_base + VA access against the runtime's page table of backed memory "
20142 "(LEONIDA_ADDRESS_GUARD=1): an unbacked one reads 0 and drops its store instead of reaching "
20143 "a wild GPU address (metadata: address_guard; docs/d3d12_vulkan.md, Address guard)")
19883 ap.add_argument("--descriptor-hash", choices=DESCRIPTOR_HASHES, default="fnv1a", 20144 ap.add_argument("--descriptor-hash", choices=DESCRIPTOR_HASHES, default="fnv1a",
19884 help="bindless descriptor table hash shared with the runtime (default: fnv1a)") 20145 help="bindless descriptor table hash shared with the runtime (default: fnv1a)")
19885 ap.add_argument("--descriptor-table", choices=DESCRIPTOR_TABLES, default="tagged", 20146 ap.add_argument("--descriptor-table", choices=DESCRIPTOR_TABLES, default="tagged",
@@ -19919,8 +20180,9 @@ def main():
19919 LOOP_LIMIT = a.loop_limit 20180 LOOP_LIMIT = a.loop_limit
19920 MAX_STRUCTURED_DEPTH = a.max_structured_depth 20181 MAX_STRUCTURED_DEPTH = a.max_structured_depth
19921 global STRUCTURED, WAVE64_EMULATE, WAVE64_GRAPHICS, BARY_FALLBACK, TEXEL_OFFSET_FALLBACK, MESH_COMPUTE, FMA_KHR, SHADER_CLOCK, F16_HALVES, OPT_SPIRV 20182 global STRUCTURED, WAVE64_EMULATE, WAVE64_GRAPHICS, BARY_FALLBACK, TEXEL_OFFSET_FALLBACK, MESH_COMPUTE, FMA_KHR, SHADER_CLOCK, F16_HALVES, OPT_SPIRV
19922 global PC_TAIL_UBO 20183 global PC_TAIL_UBO, ADDRESS_GUARD
19923 PC_TAIL_UBO = a.pc_tail_ubo 20184 PC_TAIL_UBO = a.pc_tail_ubo
20185 ADDRESS_GUARD = a.address_guard
19924 global FMA_EXACT 20186 global FMA_EXACT
19925 FMA_KHR = a.fma == "khr" 20187 FMA_KHR = a.fma == "khr"
19926 SHADER_CLOCK = a.shader_clock == "khr" 20188 SHADER_CLOCK = a.shader_clock == "khr"
diff --git a/tools/tex_export.py b/tools/tex_export.py
index e0630805d..70eb0c3ef 100644
--- a/tools/tex_export.py
+++ b/tools/tex_export.py
@@ -12,9 +12,11 @@ For each texture:
12 otherwise on raw element bytes) 12 otherwise on raw element bytes)
13 - writes <out>/<archive>/<cpu blob>_<q index>_<WxH>_<format>.dds and records the choice in export_log.json, 13 - writes <out>/<archive>/<cpu blob>_<q index>_<WxH>_<format>.dds and records the choice in export_log.json,
14 with "heuristic": true whenever two distinct placements fitted (the pick is a score, not a verified layout) 14 with "heuristic": true whenever two distinct placements fitted (the pick is a score, not a verified layout)
15 - with --png, also writes the same path with .png for every texture tools/dds_png.py can decode (BC1-BC5, BC7 15 - with --png, also writes the same path with .png for every texture tools/dds_png.py can decode (BC1-BC5, BC7,
16 and 8-bit RGBA/BGRA, R10G10B10A2_UNORM or R11G11B10_FLOAT, with no sRGB transfer; BC5 blue is a reconstructed normal Z; 16 8-bit RGBA/BGRA, R8 and R8G8 UNORM/SNORM/UINT/SINT, R16_UNORM, R10G10B10A2_UNORM/UINT, R11G11B10_FLOAT,
17 R16_FLOAT, R32_FLOAT and R16G16B16A16_FLOAT clamped to [0, 1], NaN as 0). 17 R9G9B9E5_SHAREDEXP and R16G16B16A16_UNORM/SNORM, with no sRGB transfer; BC5 blue is a reconstructed normal Z;
18 SNORM maps [-1, 1] to [0, 255], SINT is offset by 128; R9G9B9E5_SHAREDEXP, R16_FLOAT, R32_FLOAT and
19 R16G16B16A16_FLOAT clamp to [0, 1], with NaN as 0 for formats that can encode it).
18 The rest (including BC6H) keep their 20 The rest (including BC6H) keep their
19 DDS only and are counted as "png unsupported". A PNG that fails to decode or write is counted as 21 DDS only and are counted as "png unsupported". A PNG that fails to decode or write is counted as
20 "png error:<Type>" and its DDS stays; neither changes the exit code 22 "png error:<Type>" and its DDS stays; neither changes the exit code
diff --git a/tools/tex_headers.py b/tools/tex_headers.py
index 780a2bbb8..4479822a2 100644
--- a/tools/tex_headers.py
+++ b/tools/tex_headers.py
@@ -40,6 +40,7 @@ DXGI = {
40 49: "R8G8_UNORM", 50: "R8G8_UINT", 51: "R8G8_SNORM", 52: "R8G8_SINT", 40 49: "R8G8_UNORM", 50: "R8G8_UINT", 51: "R8G8_SNORM", 52: "R8G8_SINT",
41 54: "R16_FLOAT", 56: "R16_UNORM", 57: "R16_UINT", 58: "R16_SNORM", 59: "R16_SINT", 41 54: "R16_FLOAT", 56: "R16_UNORM", 57: "R16_UINT", 58: "R16_SNORM", 59: "R16_SINT",
42 61: "R8_UNORM", 62: "R8_UINT", 63: "R8_SNORM", 64: "R8_SINT", 42 61: "R8_UNORM", 62: "R8_UINT", 63: "R8_SNORM", 64: "R8_SINT",
43 67: "R9G9B9E5_SHAREDEXP",
43 71: "BC1_UNORM", 72: "BC1_UNORM_SRGB", 44 71: "BC1_UNORM", 72: "BC1_UNORM_SRGB",
44 74: "BC2_UNORM", 75: "BC2_UNORM_SRGB", 45 74: "BC2_UNORM", 75: "BC2_UNORM_SRGB",
45 77: "BC3_UNORM", 78: "BC3_UNORM_SRGB", 46 77: "BC3_UNORM", 78: "BC3_UNORM_SRGB",
@@ -148,7 +149,7 @@ FMT_INFO = {
148 16: (8, 1), 17: (8, 1), 18: (8, 1), 149 16: (8, 1), 17: (8, 1), 18: (8, 1),
149 24: (4, 1), 25: (4, 1), 26: (4, 1), 28: (4, 1), 29: (4, 1), 30: (4, 1), 31: (4, 1), 32: (4, 1), 150 24: (4, 1), 25: (4, 1), 26: (4, 1), 28: (4, 1), 29: (4, 1), 30: (4, 1), 31: (4, 1), 32: (4, 1),
150 34: (4, 1), 35: (4, 1), 36: (4, 1), 37: (4, 1), 38: (4, 1), 41: (4, 1), 42: (4, 1), 43: (4, 1), 151 34: (4, 1), 35: (4, 1), 36: (4, 1), 37: (4, 1), 38: (4, 1), 41: (4, 1), 42: (4, 1), 43: (4, 1),
151 87: (4, 1), 91: (4, 1), 152 67: (4, 1), 87: (4, 1), 91: (4, 1),
152 6: (12, 1), 7: (12, 1), 8: (12, 1), 153 6: (12, 1), 7: (12, 1), 8: (12, 1),
153 10: (8, 1), 11: (8, 1), 12: (8, 1), 13: (8, 1), 14: (8, 1), 154 10: (8, 1), 11: (8, 1), 12: (8, 1), 13: (8, 1), 14: (8, 1),
154 2: (16, 1), 3: (16, 1), 4: (16, 1), 155 2: (16, 1), 3: (16, 1), 4: (16, 1),
diff --git a/tools/wave64_emulate_opt.py b/tools/wave64_emulate_opt.py
index 1ff464fd1..f8a50e0eb 100644
--- a/tools/wave64_emulate_opt.py
+++ b/tools/wave64_emulate_opt.py
@@ -1741,13 +1741,6 @@ def plan_structured_emulation(blocks, raw_edges, succ, folds, fold_chain, absorb
1741 if any(sb_has_endpgm[u] for u in it_blocks): 1741 if any(sb_has_endpgm[u] for u in it_blocks):
1742 saw_endpgm = True 1742 saw_endpgm = True
1743 1743
1744 # Multi-wave soundness guard: any `s_barrier` inside a non-top-level guard/loop must stay in global x_scheduler
1745 # so waves on different paths can meet at different s_barrier sites (cs_barrier_divergent).
1746 for it in flat_top:
1747 if it[0] != "block":
1748 if any(sb_has_sbarrier[u] for u in _blocks_in_tree(it)):
1749 return None
1750
1751 def check_sync_free(it): 1744 def check_sync_free(it):
1752 sub_blocks = _blocks_in_tree(it) 1745 sub_blocks = _blocks_in_tree(it)
1753 has_loop = _tree_has_loop([it]) 1746 has_loop = _tree_has_loop([it])
@@ -1793,7 +1786,10 @@ def plan_structured_emulation(blocks, raw_edges, succ, folds, fold_chain, absorb
1793 cur_dirty = sb_gen_dirty[b] if sb_clears_dirty[b] else (cur_dirty | sb_gen_dirty[b]) 1786 cur_dirty = sb_gen_dirty[b] if sb_clears_dirty[b] else (cur_dirty | sb_gen_dirty[b])
1794 steps.append(("inline_block", b)) 1787 steps.append(("inline_block", b))
1795 continue 1788 continue
1796 if has_end: 1789 # An `s_barrier` under a guard or in a loop: waves on different paths meet at different sites
1790 # (cs_barrier_divergent), which only the round scheduler models. Every wave enters the tail in the same
1791 # round, and what ran before it has no `s_barrier` that is not reached by the whole workgroup.
1792 if has_end or (it[0] != "block" and any(sb_has_sbarrier[u] for u in it_blocks)):
1797 # Early s_endpgm inside a wave-divergent guard/loop (or non-final block): hand remaining tail to x_scheduler. 1793 # Early s_endpgm inside a wave-divergent guard/loop (or non-final block): hand remaining tail to x_scheduler.
1798 rem = set() 1794 rem = set()
1799 for rem_it in flat_top[idx_it:]: 1795 for rem_it in flat_top[idx_it:]:
diff --git a/tools/wave64_halves.py b/tools/wave64_halves.py
index 54db61acd..9c0df3bf6 100644
--- a/tools/wave64_halves.py
+++ b/tools/wave64_halves.py
@@ -921,6 +921,10 @@ class Analysis:
921 put_t |= T.get(r, 0) | (CTRL if (id(ins), r) in self.stale else 0) 921 put_t |= T.get(r, 0) | (CTRL if (id(ins), r) in self.stale else 0)
922 for d in dests: 922 for d in dests:
923 put(d, put_t) 923 put(d, put_t)
924 # v_cmpx in DPP form (SHADER-VOPCX-DPP) writes EXEC and prints no destination: it is an EXEC write like
925 # any v_cmpx, and never a uniform vote, as a lane whose DPP source is invalid compares 0.
926 if "exec" in defs:
927 self.exec_write(n, i, ins, op, a, dests, srcs, st, ev, violation, idiom, put_t, vote=False)
924 return 928 return
925 929
926 # --- exec writes and mask producers 930 # --- exec writes and mask producers
@@ -1261,7 +1265,7 @@ class Analysis:
1261 tag, tj = ("elect", g[1]), ELECT 1265 tag, tj = ("elect", g[1]), ELECT
1262 return tag, tj 1266 return tag, tj
1263 1267
1264 def exec_write(self, n, i, ins, op, a, dests, srcs, st, ev, violation, idiom, t_src): 1268 def exec_write(self, n, i, ins, op, a, dests, srcs, st, ev, violation, idiom, t_src, vote=True):
1265 T = st["t"] 1269 T = st["t"]
1266 site = ("n", n, i) 1270 site = ("n", n, i)
1267 old = st["x"] 1271 old = st["x"]
@@ -1292,7 +1296,9 @@ class Analysis:
1292 # s_mov / s_and / s_or / s_xor / s_andn2 ... with EXEC as the destination, or v_cmpx 1296 # s_mov / s_and / s_or / s_xor / s_andn2 ... with EXEC as the destination, or v_cmpx
1293 srcregs = [x for x in srcs if _regs(x) != ["exec"]] 1297 srcregs = [x for x in srcs if _regs(x) != ["exec"]]
1294 x0 = srcregs[0] if srcregs else None 1298 x0 = srcregs[0] if srcregs else None
1295 if op.startswith("v_cmpx"): 1299 if op.startswith("v_cmpx") and not vote:
1300 mg, mt = None, t_src
1301 elif op.startswith("v_cmpx"):
1296 mg, mt = self.cmp_tag(st, ins, "v_cmp" + op[len("v_cmpx"):], srcs, t_src, idiom) 1302 mg, mt = self.cmp_tag(st, ins, "v_cmp" + op[len("v_cmpx"):], srcs, t_src, idiom)
1297 if mg: 1303 if mg:
1298 mt = 0 1304 mt = 0