Skip to content

A motion design studio on your own machine: Claude makes the video step by step, you approve every stage. Bring your own Claude Code or API key.

Setup walkthrough, original music in Strudel, assets and 3D toolkits

Gerrod Noordsybe65e0dfac64
diff --git a/README.md b/README.md
index e41969b..39220bd 100644
--- a/README.md
+++ b/README.md
@@ -40,6 +40,9 @@ sessions and days.
## Quick start
+> **Tested mostly on Linux so far.** A Windows version is coming in the next two weeks (by October 20, 2026). macOS
+> should mostly work but hasn't been tested yet.
+
You need **Node 20+** and **ffmpeg**. For real videos you also need one of:
- [Claude Code](https://claude.com/claude-code), logged in (your plan pays), or
- an [Anthropic API key](https://console.anthropic.com/) (you pay per token).
@@ -49,7 +52,8 @@ git clone https://github.com/GTKottman/mortiflix-oss.git && cd mortiflix-oss
npm install
npm link # puts `mortiflix` on your PATH (or use: node bin/mortiflix)
-mortiflix init # makes the studio folder (~/Mortiflix), picks a backend it finds, asks for your keys
+mortiflix init # makes the studio folder (~/Mortiflix) and picks a backend it finds
+mortiflix setup # the walkthrough: Claude, narration, music, assets, 3D (asks before installing anything)
mortiflix demo # a full walk-through with placeholder work: free, no Claude needed
```
@@ -85,6 +89,8 @@ your network).
| `demo` | a scripted stand-in that walks every gate with placeholder frames and a test-pattern video | nobody |
Pick one with `mortiflix init --backend …`, `mortiflix config backend …`, or Settings in the web studio.
+Each project shows what its Claude work cost: on a Claude plan, what it **would have cost** at API prices (you didn't
+pay that); with an API key through Claude Code, about what you spent.
## Your keys
@@ -106,7 +112,7 @@ For scripts: `echo "$KEY" | mortiflix keys set elevenlabs`.
| Pipeline | Steps you review | Good for |
|---|---|---|
-| `explainer` | brief → script → style frames → animatic → final | 30 s to 2 min explainers, narrated or not |
+| `explainer` | brief → script → style frames → animatic → music → final | 30 s to 2 min explainers, narrated or not, with an original score |
| `social-short` | brief → hook frames → final | 15–45 s vertical shorts: hook first, works with sound off |
| `logo-sting` | directions → final | a 3–8 s logo animation; the quickest real run |
@@ -130,6 +136,24 @@ Pick a voice in **Settings › Narration** (or `mortiflix voice`):
Every line is checked by speech to text and retaken if words go missing; word timings drive the animation.
Details: [docs/VOICE.md](docs/VOICE.md).
+## Setup: music, assets and 3D
+
+`mortiflix setup` (or **Settings › Setup**) explains each part, why it's needed and what it installs, then asks.
+Everything goes into the studio folder, never system-wide. Full details: [docs/SETUP.md](docs/SETUP.md).
+
+- **Music.** After you approve the animatic, the studio scores it with original music written in
+ [Strudel](https://strudel.cc): a dramatic reading, a spotting map from the video's real timing, a blueprint whose
+ sections build, hold back and hit exactly where the picture needs, and a machine check (harmony locked to the
+ chart, every hit within a frame, the intensity curve as planned) before you hear it. Strudel renders it itself.
+ Optionally, a **MIDI pack** (every part, stems, a cue sheet) to remake it in your own DAW.
+ [docs/MUSIC.md](docs/MUSIC.md)
+- **Assets.** If you have a website you use for assets, list it: sessions search it and download what fits in your
+ own Chrome, with your own login, through browser-use's [browser-harness](https://github.com/browser-use/browser-harness),
+ recording every asset's source and licence. Without one, sessions make every visual themselves.
+- **3D.** Blender with the studio's toolkits, in its own profile (your Blender setup is never touched): MoBlend
+ (MoGraph), Camera, Animate, Math, Circuits, Camera Flight for flying the camera yourself (`mortiflix blender`), and
+ **Nova FX**, Mortiflix's own particle engine (particles, fire, sparks, fireworks), which builds on Linux only for now.
+
## Make your own pipeline
```sh
@@ -152,6 +176,8 @@ makes it, it can be a pipeline.
- [docs/SECURITY.md](docs/SECURITY.md): what a session can and can't reach, and the web server's guards
- [docs/COMPUTE.md](docs/COMPUTE.md): where the tokens, time and disk go, measured on a real project
- [docs/VOICE.md](docs/VOICE.md): narration with ElevenLabs or on your own GPU, and every option
+- [docs/SETUP.md](docs/SETUP.md): every part of setup, what it installs and where
+- [docs/MUSIC.md](docs/MUSIC.md): how the music step writes, checks and renders a score
## Where it came from
@@ -159,9 +185,9 @@ Mortiflix began as a hosted motion design studio, where every video was made sta
gates, with clients approving each one. This repository is that process, boiled down to one machine and opened up,
so it can be improved by more people than one studio.
-Not here yet (from the hosted studio, contributions welcome): a recording booth for your own narration, the music
-system (compose in Strudel, produce in openDAW), workflow preferences learned from your pins, redo rounds on a
-delivered video, share links, and more pipelines (codebase explainers, 3D music videos, real estate films).
+Not here yet (from the hosted studio, contributions welcome): a recording booth for your own narration, workflow
+preferences learned from your pins, redo rounds on a delivered video, share links, music in the social-short pipeline,
+and more pipelines (codebase explainers, 3D music videos, real estate films).
## Contributing
diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md
index bccea43..4e05a58 100644
--- a/docs/ARCHITECTURE.md
+++ b/docs/ARCHITECTURE.md
@@ -103,6 +103,17 @@ returns `{ ok, error?, usage?, cost_usd? }`; `available(config, root)` says whet
Adding a backend is adding a module with those two functions to `BACKENDS` in `runner.mjs`.
+## Setup (`src/setup.mjs`)
+
+The parts of setup (Claude, narration, music, assets, 3D), each tool's detection and installer (`strudel`, `chrome`,
+`browser-harness`, `blender`, `blender-addons`, `comfyui`), and the owner's choices in `config.json` (`music`,
+`assets.sites`, `tools.*` paths). `setupStatus` (async: it asks ComfyUI) feeds the walkthrough and the page;
+`setupStatusSync` feeds the session brief's "This studio" section. `sessionToolsEnv` gives sessions `MFX_STRUDEL`,
+`MFX_CHROME`, `MFX_BLENDER` (+ `BLENDER_USER_RESOURCES`, `MFX3D`), `MFX_MUSIC` and `MFX_ASSETS`. Studio skills that
+depend on setup (`harness/skills/blender-3d`, `harness/skills/assets`, the toolkits' own skills, browser-harness's)
+are installed into each project by `torch.mjs`. A pipeline step with `"when": "music"` is marked `skipped` at start
+when the studio or the brief has no music; a skipped step counts as finished only once its own predecessors are.
+
## Keys (`src/keys.mjs`)
One registry of the keys a studio can hold (Anthropic, ElevenLabs), what each is for, and when a project needs it:
diff --git a/docs/MUSIC.md b/docs/MUSIC.md
new file mode 100644
index 0000000..fdbbd98
--- /dev/null
+++ b/docs/MUSIC.md
@@ -0,0 +1,57 @@
+# Music
+
+After you approve the animatic, the studio scores it: original music written in [Strudel](https://strudel.cc)
+(AGPL-3.0), to the video's own timing. You review it against the picture, like every other step. Turn it on or off,
+and ask for a MIDI pack, in `mortiflix setup music`; a project's brief can also say "No music".
+
+The writing method comes from Mortiflix's song system (Mini Music): a story first, then the notes, and a machine that
+checks the result before you hear it.
+
+## How a cue is written
+
+1. **The dramatic reading.** One sentence, as a change: `confusion -> recognition -> confidence`.
+2. **The spotting map**, from the approved animatic's real timing (every word of the narration, every cut): what
+ happens when, and for each moment that changes meaning whether the music hits it directly, anticipates it,
+ reacts after it, or deliberately lets it pass.
+3. **The tempo map.** A tempo and a start point chosen so the structural hits land on bar lines, not forced.
+4. **The blueprint** (`music/blueprint.json`): the motif, the chord chart, the parts (each with a role in the
+ story), and the sections, each with a function (establish, develop, withhold, release, resolve…) and an
+ **intensity** from 0 to 10 that follows the picture's energy: where it should get complex, where it should thin
+ out under busy narration, where it builds faster or slower.
+5. **The score** (`music/score.strudel.js`), one labelled part per role, written from the melody craft, the harmony
+ lock and the rich-voicing guides in the skill.
+6. **The check** (`strudel.mjs check`), which must end with 0 problems:
+ - **harmony lock**: every note against the chord of the moment, by its part's role (bass, chords, melody, pedal);
+ - **hit points**: each one within a frame of its moment in the video;
+ - **the intensity curve**: each section measured (parts playing, notes per beat, velocity, range) and compared with
+ what the blueprint asked, so builds really build and breakdowns really thin out;
+ - nothing playing past the end, every part playing, the tempo as planned.
+7. **The render**, by Strudel itself in a headless Chrome (its offline renderer, the same as the REPL's Export), then
+ the mix: about 18 dB under the voice while it speaks, ducked by the narration, to the delivery loudness.
+
+You review the animatic with the cue mixed in, the score alone, and the cue sheet.
+
+## Sounds
+
+Scores use Strudel's built-in synths (sine, triangle, square, sawtooth, supersaw, noise, FM, with filters, envelopes,
+reverb and delay): nothing to download and no licence questions. Samples are used only from a source whose licence
+allows your use, and recorded in the project's `assets/SOURCES.md`.
+
+## The MIDI pack
+
+With the MIDI pack on, each video also delivers `out/music/midi/`: every part on its own channel (drums on 10 with
+General MIDI numbers), the whole arrangement in one file, tempo, meter, section names and hit points as markers, the
+stems as audio, and `CUE-SHEET.md`. Drop it into any DAW to remake or extend the music.
+
+## Writing a score by hand
+
+The tool works on any folder with a `music/blueprint.json` and `music/score.strudel.js`:
+
+```sh
+export MFX_STRUDEL=~/Mortiflix/tools/strudel MFX_CHROME=$(command -v google-chrome-stable)
+node pipelines/_shared/skills/music/strudel.mjs check --video-sec 60
+node pipelines/_shared/skills/music/strudel.mjs render --stems
+node pipelines/_shared/skills/music/strudel.mjs midi
+```
+
+The format and the method are in `pipelines/_shared/skills/music/SKILL.md` and its `craft/` guides.
diff --git a/docs/SECURITY.md b/docs/SECURITY.md
index 67c82ab..1445ce4 100644
--- a/docs/SECURITY.md
+++ b/docs/SECURITY.md
@@ -58,6 +58,21 @@ key is checked with a free, read-only API call before it's saved.
- The runner checks a project's keys before each session: if one is missing, the project pauses and tells you which,
instead of starting a session that would fail.
+## What setup installs, and the browser
+
+- **Nothing installs without you asking** (a confirmation in the terminal, an Install button on the page), and
+ everything goes into the studio folder or your own user tools: never system-wide, never as root. Sources: npm
+ (Strudel), Google's Chrome for Testing, astral.sh (uv), PyPI via uv (browser-harness), GitHub (ComfyUI, the TTS
+ Audio Suite, the 3D toolkits), download.blender.org. The web studio's install endpoints are behind the same guards
+ as every other change (loopback or token, the `X-Mortiflix` header).
+- **The studio's Blender has its own profile**, so add-ons installed for sessions never load in your own Blender, and
+ your add-ons never load in theirs.
+- **Asset sites run in your own Chrome**, with your logins. Sessions may use only the sites you listed, download
+ only into the project, and must stop and ask (`needs-you`) before anything that signs up, accepts terms or pays.
+ That's an instruction plus your review, not a technical wall: a session with browser access can do what your
+ browser can. List only sites you're comfortable with, and keep the session sandbox off only when you trust what
+ the project reads (browser-harness needs your Chrome, which the sandbox hides).
+
## The web server
A web server on localhost can be reached by any page open in your browser, so:
diff --git a/docs/SETUP.md b/docs/SETUP.md
new file mode 100644
index 0000000..fb990bb
--- /dev/null
+++ b/docs/SETUP.md
@@ -0,0 +1,95 @@
+# Setup
+
+`mortiflix setup` (or **Settings › Setup** in the web studio) walks through everything Mortiflix can use, says why
+each part is needed and what it would install, and asks before installing anything. Every part is optional except
+Claude. `mortiflix setup <part>` does one part again; `mortiflix setup status` shows where things stand.
+
+Everything installs **into the studio folder** (`~/Mortiflix/tools/`), or as your own user tool (uv, browser-harness),
+never system-wide and never as root. Deleting `tools/` removes it all.
+
+| Part | Why | What it installs | Size |
+|---|---|---|---|
+| **Claude** | Claude does the work: writing, design, animation, checks | nothing (your Claude Code login), or your Anthropic API key in `secrets.json` | |
+| **Narration** | a voice reads the script; the animation is timed to its words | an ElevenLabs key, **or** ComfyUI + the TTS Audio Suite (Qwen3-TTS) on your NVIDIA card, **or** nothing | ComfyUI ~10 GB with models |
+| **Music** | an original score, written to the approved animatic | Strudel (`@strudel/web` from npm) and a headless Chrome (yours is reused) | ~20 MB (+~100 MB without Chrome) |
+| **Assets** | stock assets from sites you already use, in your own Chrome | browser-harness (browser-use, via uv) and the list of your sites | ~60 MB |
+| **3D** | 3D scenes rendered in Blender | Blender (yours is reused) and the 3D toolkits, in the studio's own Blender profile | ~350 MB + ~15 MB |
+
+## Claude
+
+Claude Code, logged in, is used if it's installed (your plan pays). Otherwise an Anthropic API key (you pay per
+token); the key is checked with a free call and kept in `secrets.json` (mode 600). See `mortiflix keys`.
+
+## Narration
+
+1. **ElevenLabs**: paste a key, pick a voice and model (see [VOICE.md](VOICE.md)).
+2. **This computer**: offered only when your NVIDIA card can run it (4 GB for the 0.6B voice, 8 GB for 1.7B).
+ If ComfyUI with the TTS Audio Suite already answers at its address (default `127.0.0.1:8188`), it's used as is.
+ Otherwise setup installs the studio's own: ComfyUI and the TTS Audio Suite cloned from GitHub into
+ `tools/ComfyUI`, a Python 3.12 environment with PyTorch for CUDA (via uv), the suite's own installer, then starts
+ it. The Qwen3-TTS models download on first use. Needs git; NVIDIA only.
+3. **None**: on-screen text, music and sound.
+
+## Music
+
+Strudel 1.3 (AGPL-3.0) is installed from npm into `tools/strudel`; scores are rendered by Strudel's own offline
+renderer in a headless Chrome. Your Chrome or Chromium is used if it's there; otherwise Chrome for Testing's headless
+shell is downloaded into `tools/browsers`. You also choose:
+
+- **Original score or no music.** With no music, the music step is skipped in every project.
+- **A MIDI pack**: every part as MIDI on its own channel, the stems, and a cue sheet (tempo, sections, hit points),
+ delivered with each video so you can remake the music in your own DAW. Strudel's render is still the one used in
+ the video.
+
+How the music step writes: [MUSIC.md](MUSIC.md).
+
+## Assets
+
+> If you have a website you use for assets, list it here. Without one, you won't get stock assets: sessions make
+> every visual themselves.
+
+Sessions work in **your own Chrome**, where you're signed in, through [browser-harness](https://github.com/browser-use/browser-harness)
+(installed with `uv tool install browser-harness`; uv is installed for your user first if it's missing). They only
+use the sites you list, download into the project, record every asset's page and licence in `assets/SOURCES.md`, and
+never sign up, start trials, accept terms or pay: anything like that stops the project and asks you.
+
+- Chrome may ask, once, to allow remote debugging: `chrome://inspect/#remote-debugging`.
+- browser-harness can keep local recordings (screenshots and action traces) of what sessions did; setup asks, and
+ the default is off.
+
+## 3D
+
+Blender is reused if you have it (4.2 or newer); otherwise the newest official build for your system is downloaded
+from download.blender.org into `tools/blender`. The toolkits are installed into **the studio's own Blender profile**
+(`tools/blender-profile`, set through `BLENDER_USER_RESOURCES`), started from factory settings: your personal Blender
+setup is never read or changed.
+
+| Toolkit | From | For |
+|---|---|---|
+| MoBlend | github.com/GTKottman/moblend | MoGraph: cloners, effectors, fields, MoText, fracture |
+| Nova FX | this repository (`vendor/nova-fx`) | particles, fire, sparks, fireworks; its C core compiles for your CPU on install |
+| Camera | github.com/GTKottman/Blender-Cam | framing, shot presets, camera moves, shake, cuts, contact sheets |
+| Animate | github.com/GTKottman/Blender-Animate | easing, springs, paths, motion analysis |
+| Math | github.com/GTKottman/Blender-Math | LaTeX and exact math in 3D |
+| Circuits | github.com/GTKottman/Blender-Circuits | circuit design, simulation, electron-flow animation |
+| Camera Flight | github.com/GTKottman/boender-camera-flight | for you: fly the camera like a game and record takes |
+
+Each is built with its repository's own build script (run by Blender's Python), installed with
+`blender --command extension install-file`, then loaded once headless to prove it registers. Sessions call them
+directly inside Blender (the `blender-3d` skill), with no MCP servers. `mortiflix blender` opens this Blender for
+you (Camera Flight: 3D Viewport › N › Flight).
+
+**Nova FX**, Mortiflix's own particle engine, **builds on Linux only for now** (gcc with OpenMP, usually already
+installed). On other systems the other toolkits still install; Nova is reported as not built.
+
+## Platforms
+
+**Mortiflix has mostly been tested on Linux so far.** A Windows version is coming in the next two weeks (by
+October 20, 2026). macOS should work for most of setup (the code has its Blender build, Chrome location and uv
+installer) but hasn't been tested, and Nova FX doesn't build there. ComfyUI's install assumes an NVIDIA card with CUDA.
+If an install fails, the walkthrough shows the command and its last lines of output; fixes and reports are welcome.
+
+## Removing things
+
+Delete `~/Mortiflix/tools/` (Strudel, Chrome, Blender, the profile, ComfyUI). browser-harness and uv are your own
+tools: `uv tool uninstall browser-harness`, and see uv's docs to remove uv.
diff --git a/harness/skills/assets/SKILL.md b/harness/skills/assets/SKILL.md
new file mode 100644
index 0000000..6d1ab5f
--- /dev/null
+++ b/harness/skills/assets/SKILL.md
@@ -0,0 +1,34 @@
+---
+name: assets
+description: Finding and downloading stock assets (footage, images, illustrations, 3D models, sound effects, fonts) from the asset sites the owner uses, in the owner's own Chrome with browser-harness. Use whenever a video would be better with a real asset than one you'd make, and the owner has listed a site for it.
+---
+
+# Assets from the owner's sites
+
+The owner listed the sites they use for assets (in this project's CLAUDE.md, "This studio"). Their Chrome is signed in to
+them; you work in it through **browser-harness** (read its skill first). Only those sites: never search the open web
+for assets to download, and never use a site the owner didn't list.
+
+## How
+
+1. **Decide what you need first**, from the approved script and style frames: what it shows, the style, the shape
+ (16:9 footage, a transparent PNG, an isolated object), and how it will be recoloured or composited. One clear
+ search beats ten vague ones.
+2. **Downloads land in this project.** Before the first download in a session, point Chrome's downloads at
+ `input/downloads/` in this folder (CDP `Browser.setDownloadBehavior` with `behavior: "allow"` and the absolute
+ path). Never leave a file in the owner's own Downloads folder.
+3. **Search and pick** on the site, like a designer would: look at the previews (screenshots), prefer assets that
+ match the look, check the resolution and format before downloading.
+4. **Only what the owner's account already covers.** Never sign up, start a trial, accept new terms, enter payment
+ details, or buy anything. If a download needs any of that, or a login has expired, stop and `mfx needs-you`
+ with the item's link and what it's for.
+5. **Record every asset** in `assets/SOURCES.md`: the site, the item's page URL, its title and author, the licence
+ or terms as the site states them, the file you used and where it appears in the video. Licences are the owner's
+ agreements with the site; you report what the site says, you don't judge them.
+6. **Unpack and adapt** inside the project (`assets/found/…`): unzip, recolour to the palette, crop, key. Keep the
+ original file untouched next to your version.
+
+## When there's no listed site, or it has nothing that fits
+
+Make it yourself (shapes, type, 3D, generated textures), or say in the submission note what a stock asset would add
+and let the owner decide. Don't substitute an unlisted site.
diff --git a/harness/skills/blender-3d/SKILL.md b/harness/skills/blender-3d/SKILL.md
new file mode 100644
index 0000000..fdd91e8
--- /dev/null
+++ b/harness/skills/blender-3d/SKILL.md
@@ -0,0 +1,57 @@
+---
+name: blender-3d
+description: 3D work in the studio's own Blender with its toolkits: MoBlend (MoGraph cloners, effectors, fields, MoText, fracture), Nova FX (particles, fire, sparks, fireworks), Camera (framing, shot presets, moves, shake, cuts, contact sheets), Animate (easing, springs, paths), Math (LaTeX and exact math) and Circuits. Use for any 3D scene, product shot, logo in 3D, particle effect or camera move rendered in Blender.
+---
+
+# Blender 3D
+
+The owner set up a Blender for this studio with its own profile and toolkits. Use it, not a system Blender, and never
+install add-ons yourself.
+
+```
+"$MFX_BLENDER" -b 3d/scene.blend --python 3d/shot.py # BLENDER_USER_RESOURCES is already set: the studio profile
+mfx render --label "3d shot 2" -- "$MFX_BLENDER" -b 3d/scene.blend -o //../out/3d/f_#### -a # renders queue like any heavy job
+```
+
+## Calling the toolkits
+
+Inside a script Blender runs, `mfx3d` calls any toolkit command directly (no server, no MCP):
+
+```python
+import sys, os; sys.path.insert(0, os.environ["MFX3D"])
+import mfx3d
+print(mfx3d.commands("camera")) # what a toolkit can do
+mfx3d.call("camera", "apply_shot_preset", {"subject": "Product", "shot_size": "medium", "angle": "low"})
+mfx3d.call("mograph", "create_cloner", {"type": "grid"})
+nova = mfx3d.particles() # Nova FX: presets.new_system / emitter / col
+```
+
+| Kit | Toolkit | Read first |
+|---|---|---|
+| `camera` | Camera | the **blender-camera-director** skill (its tool names are these commands), `toolkits/camera.md` |
+| `animate` | Animate | the **blender-animate** skill, `toolkits/animate.md` |
+| `math` | Math | the **blender-math** skill, `toolkits/math.md` |
+| `circuits` | Circuits | the **circuit-explainer-video** skill, `toolkits/circuits.md` |
+| `mograph` | MoBlend | `toolkits/mograph.md` (its MCP tool names are these commands) |
+| `particles` | Nova FX | `toolkits/particles.md`; step the simulation with `scene.frame_set` from the system's start frame |
+
+Those skills were written for MCP clients: wherever one says "call `animate_orbit`", call
+`mfx3d.call("camera", "animate_orbit", {...})` in your script. A wrong parameter name raises with the list of valid
+ones: read it, don't guess twice.
+
+## Working method
+
+1. **Build the scene in scripts** (`3d/*.py`), not by hand: re-runnable, reviewable, and the next session can change
+ them. Save the `.blend` after each script so a render never depends on a script having run.
+2. **Look at what you made.** The camera kit's `render_preview` and `render_contact_sheet` write images: view them
+ before you submit anything. `analyze_framing` reports headroom and coverage in numbers; check them against the
+ frame's text-safe area.
+3. **Motion that reads:** ease every move (Animate's springs and curves), keep cameras level unless the shot is a
+ Dutch angle on purpose, and let particles settle before a cut.
+4. **Renders go through `mfx render`** (they queue behind other heavy work). Eevee for previews and style frames,
+ Cycles only when the look needs it and the owner's machine can afford it. Check the frame sheet like any motion.
+5. **Nova FX** (Linux only for now) compiled its core for this CPU when it was installed. If it says the core isn't
+ built, don't work around it: build the effect another way, or `mfx needs-you` if the brief depends on it.
+
+The owner can open this same Blender with `mortiflix blender` (it has Camera Flight, for flying the camera by hand):
+if a shot needs a hand-flown move, ask for a take instead of faking one.
diff --git a/harness/skills/blender-3d/__pycache__/mfx3d.cpython-314.pyc b/harness/skills/blender-3d/__pycache__/mfx3d.cpython-314.pyc
new file mode 100644
index 0000000..4c8de6b
Binary files /dev/null and b/harness/skills/blender-3d/__pycache__/mfx3d.cpython-314.pyc differ
diff --git a/harness/skills/blender-3d/mfx3d.py b/harness/skills/blender-3d/mfx3d.py
new file mode 100644
index 0000000..00e3d17
--- /dev/null
+++ b/harness/skills/blender-3d/mfx3d.py
@@ -0,0 +1,61 @@
+"""Call the studio's 3D toolkits from a script running inside Blender (blender -b scene.blend --python shot.py).
+
+ import sys, os; sys.path.insert(0, os.environ["MFX3D"])
+ import mfx3d
+ mfx3d.call("camera", "apply_shot_preset", {"target": "Product", "shot": "medium", "angle": "low"})
+ mfx3d.call("mograph", "create_cloner", {"mode": "grid", "count": [5, 5, 1]})
+ nova = mfx3d.particles() # Nova FX's presets module: nova.new_system(...), nova.emitter(...)
+ print(mfx3d.commands("animate")) # every command a toolkit has
+
+Each command is the same as the toolkit's MCP tool of the same name (their own skills describe them), run directly on
+Blender's main thread: no server, no socket. Results come back as Python values; errors raise with the toolkit's own
+message (they suggest the fix).
+"""
+import importlib
+
+import bpy
+
+KITS = {
+ "mograph": "moblend",
+ "particles": "nova_fx",
+ "camera": "blender_cam_mcp",
+ "animate": "blender_animate",
+ "math": "blender_math_bridge",
+ "circuits": "circuit_lab",
+}
+
+
+def _module(kit, sub=None):
+ if kit not in KITS:
+ raise ValueError(f"unknown toolkit {kit!r}: {', '.join(KITS)}")
+ name = f"bl_ext.user_default.{KITS[kit]}"
+ if name not in bpy.context.preferences.addons:
+ import addon_utils
+ addon_utils.enable(name, default_set=False)
+ return importlib.import_module(f"{name}.{sub}" if sub else name)
+
+
+def call(kit, command, params=None):
+ params = params or {}
+ if kit == "math":
+ reply = _module("math").dispatch({"type": command, "params": params})
+ if reply.get("status") != "ok":
+ raise RuntimeError(reply.get("message", "math command failed"))
+ return reply.get("result")
+ if kit == "particles":
+ raise ValueError("Nova FX has no command table: use mfx3d.particles() (its presets module), see its README")
+ return _module(kit, "commands").dispatch(command, params)
+
+
+def commands(kit):
+ if kit == "math":
+ return sorted(_module("math").COMMANDS)
+ if kit == "particles":
+ return sorted(n for n in dir(particles()) if not n.startswith("_"))
+ mod = _module(kit, "commands")
+ table = getattr(mod, "COMMANDS", None) or getattr(mod, "_COMMANDS", {})
+ return sorted(table)
+
+
+def particles():
+ return _module("particles", "presets")
diff --git a/package.json b/package.json
index 1889c8c..8fac20c 100644
--- a/package.json
+++ b/package.json
@@ -22,6 +22,7 @@
"web",
"pipelines",
"harness",
+ "vendor",
"docs",
"README.md",
"LICENSE"
diff --git a/pipelines/_shared/skills/music/SKILL.md b/pipelines/_shared/skills/music/SKILL.md
new file mode 100644
index 0000000..a05ab13
--- /dev/null
+++ b/pipelines/_shared/skills/music/SKILL.md
@@ -0,0 +1,167 @@
+---
+name: music
+description: Scoring a video with original music written in Strudel, after the animatic is approved - a dramatic reading, a spotting map from the locked timing, a blueprint (motif, chart, roles, story sections with an intensity curve), the score, a machine check (harmony lock, hits within a frame, the curve), the render, the mix under the voice, and an optional MIDI pack. Use for any music step or a change to a cue.
+---
+
+# Music
+
+Music is drama organised in time. The approved animatic fixes the timing, so the cue is written **to the picture**:
+it builds where the video builds, holds back where it needs room, and lands its hits on the frames that matter.
+
+```
+M=.claude/skills/music/strudel.mjs
+node $M check --video-sec 118.4 --fps 30 # music/score.strudel.js against music/blueprint.json: must pass
+node $M render [--stems] # out/music/score.wav (+ one file per part)
+node $M midi # out/music/midi/: every part, the arrangement, CUE-SHEET.md
+```
+
+Read `craft/picture-scoring.md` before your first blueprint, `craft/melody-craft.md` before writing the motif,
+`craft/harmony-lock.md` before the score, and `craft/rich-voicing.md` once the lock passes.
+
+## 0. What the owner set up
+
+`$MFX_MUSIC` is `{"engine": "strudel" | "none", "midi": true | false}`. Strudel is at `$MFX_STRUDEL`, and renders in
+the Chrome at `$MFX_CHROME`. If either is missing: `mfx needs-you "Music isn't set up: run mortiflix setup music,
+then resume."` Never improvise music any other way.
+
+## 1. Read the drama
+
+From the approved script, the animatic and the brief, write in `music/SPOTTING.md`:
+
+- **The dramatic reading** in one sentence, as a transformation: `confusion -> recognition -> confidence`.
+- **What the music must not do**: compete with the voice, hit every cut, explain what the picture already says.
+
+## 2. Spot the picture
+
+Build the spotting map from the **real timing**: `voice/timing.json` (every line and word), the animatic's cut and
+beat list (`video/src/timing.ts` or its plan), and its length (ffprobe). One row per event that changes meaning:
+
+```
+time | event | significance | response
+0.00 | black, first word | establish | pad alone, low register
+8.40 | "...for the first time." | the problem lands | aftermath: drop out for a bar
+31.20 | logo resolves | structural: the turn | direct hit, tonic arrival
+```
+
+Classify each as structural, dramatic, physical or optional, and choose for each: **direct hit**, **anticipation**
+(change just before), **aftermath** (let the image land, then react) or **no hit**. Hit the few that change meaning,
+not every cut.
+
+## 3. Map the tempo
+
+Choose the BPM (and `offset_sec`, where bar 1 starts in the video) so the structural hits fall on bar lines or strong
+beats: `seconds per bar = beats_per_bar × 60 / BPM`. Test tempos, don't force awkward bars:
+
+```js
+// candidate tempos, scored by how far each hit lands from its nearest beat
+for (let bpm = 70; bpm <= 140; bpm += 0.5) { const beat = 60 / bpm; const err = hits.map((t) => Math.abs(((t - off) / beat) - Math.round((t - off) / beat)) * beat); /* keep the smallest max(err) */ }
+```
+
+A minor event may sit between beats. If one tempo can't serve the structural hits, move `offset_sec`, or use a
+pickup, a held bar or a section of a different length inside the music, never a tempo that drifts.
+
+## 4. The blueprint: `music/blueprint.json`
+
+```json
+{
+ "title": "a real title", "bpm": 96, "meter": "4/4", "bars": 48, "scale": "D:dorian", "offset_sec": 0.6,
+ "dramatic_reading": "confusion -> recognition -> confidence",
+ "motif": { "rhythm": "...", "contour": "...", "length_bars": 2, "role": "Glass hook", "returns": ["bar 17, an octave up", "bar 41, augmented"] },
+ "sections": [
+ { "name": "The quote that comes back", "start_bar": 1, "end_bar": 8, "function": "establish: pad and sub only, the motif withheld", "intensity": 2, "picture": "the $5,400 price counts up" }
+ ],
+ "hits": [ { "t_sec": 31.2, "bar": 13, "beat": 1, "kind": "direct", "what": "logo resolves" } ],
+ "chart": [ { "bars": [1, 8], "chords": ["Dm9", "Cmaj7", ["Gm7", "A7sus4"], "Dm9"] } ],
+ "roles": [ { "channel": 1, "harmony": "bass", "name": "Sub", "job": "roots, the floor", "sound": "sine, low-passed" } ],
+ "ending": "how it ends and why (a held chord under the end card, or a question left unresolved)"
+}
+```
+
+Decide in this order: the motif and hook (melody craft) → tempo, meter and scale → the chart → the roles → the story.
+
+- **Sections** cover bars 1..bars, contiguous. Names are specific and story-bearing, never "Intro/Verse/Chorus/A/B"
+ (a returning idea is "Return of …"). Each `function` says what happens: establish, develop, destabilise,
+ withhold, release, reinterpret, resolve, and what rises or is held back.
+- **`intensity` (0-10) is the picture's energy curve**, section by section: the check measures each section
+ (parts playing, notes per beat, velocity, range) and fails if the order disagrees. Builds really build;
+ breakdowns really thin out. Don't raise everything at once: contrast makes intensity legible.
+- **Under speech**, keep the speech-critical register (roughly 300 Hz–3 kHz) clear: simpler lines, sustained
+ material, rests. The music opens up in the gaps between lines and after the last word.
+- **The chart** is built from the scale's own chords; borrowed colours where they serve the story. Vary the harmony
+ across sections, and slow the harmonic rhythm to suspend time, speed it up to drive.
+- **Roles**: 3 to 10, each on its own channel 1–16 (drums on 10), with a vivid name and a job in the story.
+
+## 5. The score: `music/score.strudel.js`
+
+```js
+setcpm(96 / 4) // BPM / beats per bar: one cycle is one bar
+const BARS = 48
+const cue = (p) => p.filterWhen((t) => t < BARS) // every part ends with the cue (Strudel loops otherwise)
+const lift = "<0!12 1!20 0!4 1!12>" // a section mask, one value per bar: off 1-12, on 13-32, off 33-36, on 37-48
+
+sub: cue(note("<d2 c2 [g1 a1] d2>").s("sine").lpf(300).velocity(.8).gain(.7)).midichan(1)
+pad: cue(note("<[d3,f3,a3,c4,e4] ...>").s("triangle").attack(.4).release(1.2).room(.4).velocity(.6).gain(.3)).midichan(2)
+hook: cue(note("<[a4 ~ c5 d5] ...>").s("square").lpf(2200).delay(.25).velocity("<.7 .85>").gain(.18).mask(lift)).midichan(3)
+drums: cue(stack(
+ note("36 ~ ~ 36 ~ ~ 36 ~").s("sine").decay(.18).sustain(0),
+ note("~ 38").s("pink").decay(.12).sustain(0).gain(.35),
+ note("42*8").s("white").decay(.03).sustain(0).gain(.15).velocity("<.5 .8>*4")
+ ).mask(lift)).midichan(10)
+```
+
+- **Every part** is a labelled block, wrapped in `cue(…)`, with `.midichan(n)` = its role's channel.
+- **Drums** on channel 10 carry General MIDI numbers as their note (36 kick, 38 snare, 42 closed hat, 46 open hat,
+ 49 crash): the MIDI pack maps them straight into any drum rack, and noise sounds ignore the pitch.
+- **`.velocity()` is the playing dynamic** (it goes to the MIDI); **`.gain()` is the mix level** (it doesn't).
+- **Sections** are masks or `<…>` sequences with one value per bar, aligned to the blueprint's bars; `arrange()`
+ works too. Name each mask after its section.
+- **Sounds**: Strudel's built-in synths need no downloads and carry no licence questions: `sine`, `triangle`,
+ `square`, `sawtooth`, `supersaw`, `white`/`pink`/`brown` noise, FM (`.fm()`, `.fmh()`), with filters
+ (`lpf`, `hpf`, `lpenv`), envelopes (`attack`, `decay`, `sustain`, `release`), `room`, `delay`, `pan`, `shape`.
+ Use samples (`samples(…)`) only from a source whose licence allows the owner's use, and record it in
+ `assets/SOURCES.md`.
+
+## 6. Check, then look at what you can't hear
+
+```
+node $M check --video-sec <animatic length> --fps <fps>
+```
+
+It reports the harmony lock, every hit's distance from its frame, parts that play past the end, roles that never
+play, and **the intensity curve**: a sparkline per section, asked vs measured. Iterate until **0 problems**. Then
+read the curve against the picture: does it rise where the video rises, does it hold back under the busiest
+narration?
+
+You can't hear the render. After `render`, look at it: `ffmpeg -i out/music/score.wav -lavfi
+showspectrumpic=s=1600x400 music/spectrum.png` (each section's density and register should be visible where the
+blueprint put them), and measure loudness (`ebur128`). Say in the note that these are measurements, not listening.
+
+## 7. Mix it under the voice
+
+The cue starts at `offset_sec`. Duck it under the speech and finish at the delivery loudness:
+
+```
+ffmpeg -i voice/voice.wav -i out/music/score.wav -filter_complex \
+ "[0:a]asplit=2[v1][v2];[1:a]adelay=600|600,volume=-4dB[m];[m][v1]sidechaincompress=threshold=0.03:ratio=8:attack=20:release=450[duck];\
+ [v2][duck]amix=inputs=2:normalize=0[mix];[mix]loudnorm=I=-14:TP=-1.5:LRA=11" -ar 48000 audio/mix.wav
+```
+
+(`adelay` is `offset_sec` in milliseconds.) Music sits about 18 dB under the voice while it speaks and comes up in
+the gaps. Sound effects go on top, sparingly: when an effect already lands an impact, the music prepares or answers
+it instead of doubling it.
+
+## 8. Submit the music step
+
+Items: **the animatic with the cue mixed in** (video: the owner judges the music against the picture), the score
+alone (`out/music/score.wav`), and the cue sheet (`node $M midi` writes `out/music/midi/CUE-SHEET.md`; submit its
+text even when no MIDI pack was asked for). The note: the dramatic reading, the hits and how each is played, and the
+intensity sparklines from the check. At most one question, with a default.
+
+Notes on the music come back as times in the video: the bar is `floor((t - offset_sec) / seconds_per_bar) + 1`.
+Change the blueprint first when the note is about the story, then the score; run the check again.
+
+## 9. The MIDI pack
+
+When `$MFX_MUSIC` has `"midi": true`, the final delivery also carries `out/music/midi/` (every part on its channel,
+the whole arrangement, tempo, meter, section and hit markers, `CUE-SHEET.md`) and the stems (`render --stems`), so
+the owner can remake the music in their own DAW. Strudel's render is still the one in the video.
diff --git a/pipelines/_shared/skills/music/craft/harmony-lock.md b/pipelines/_shared/skills/music/craft/harmony-lock.md
new file mode 100644
index 0000000..9c23323
--- /dev/null
+++ b/pipelines/_shared/skills/music/craft/harmony-lock.md
@@ -0,0 +1,65 @@
+# The harmony lock
+
+A cue with eight pitched parts sounds out of tune when each part is written "in the key" but not in **the chord of the
+moment**. The key doesn't make parts agree; the chord does. This locks every part to one chord chart, and
+`strudel.mjs check` proves it: a cue goes to the owner only with **0 harmony problems**.
+
+## One chart, everything derived from it
+
+1. **Write the chart before any notes** (`blueprint.json` › `chart`): one chord per bar, cycling inside each row's bar
+ range; `["Gm7", "C7sus4"]` inside the list splits a bar in halves. Spell the whole chord, extensions included
+ (`Fm9`, not `Fm`): the chart is the list of allowed notes.
+2. **Give every part a role** (`roles[].harmony`, on its own `.midichan(n)`):
+ - `bass`: owns the low end. On every chord change it plays the root (or the slash bass); between changes,
+ chord tones, or a short passing note (a beat or less) that steps into the next note, never on the downbeat.
+ - `chords`: pads, keys, stabs, strings beds. Chord tones of the symbol only.
+ - `melody`: leads, hooks, ostinatos, arps, counter-lines, bells. Chord tones or available tensions (9; 11 over
+ minor or sus; 13/6 over major and dominant) on beats; anything else short (½ beat or less), off the beat
+ (or a ¼-beat grace) and resolving by step.
+ - `pedal`: a held tonic or dominant; in the key.
+ - `noise`, `drums`: not judged.
+3. **Derive the parts in this order:**
+ 1. **Bass** from the roots. Want a pedal under moving chords? Write it into the chart as slash chords
+ (`Dbmaj7/F`), so every chord contains it.
+ 2. **Chords** voiced from each symbol, voice-led from the previous one (each voice the shortest way). Adjacent
+ voices at least a whole step apart; the 9th on top only where no melody lives in that register.
+ 3. **Melodies**: chord tones on beats; passing and neighbour notes short, off the beat, resolving by step.
+ 4. **Repeating figures** (ostinatos, arps, bells, hooks) are **re-spelled for each chord**: one figure per chord
+ in a `<figA figB figC figD>` aligned with the chart, or built only from notes every chord in the loop shares.
+ A fixed figure over a changing progression is the most common cause of "out of tune".
+
+## Chord tokens keep parts in line
+
+Write chord-following parts from a table, so they can't disagree with the chart:
+
+```js
+const V = { Am7: '[a3,c4,e4,g4]', Fmaj7: '[a3,c4,e4,f4]', C: '[g3,c4,e4]', G: '[g3,b3,d4]' } // no semitone inside a voicing
+pad: cue(note(`<${['Am7', 'Fmaj7', 'C', 'G'].map((c) => V[c]).join(' ')}>`).s('triangle')).midichan(2)
+```
+
+- **No semitone inside a voicing.** It rubs against anything that doubles either note.
+- **Stabs use a subset of the pad's notes, in the same octave.** They double, never rub.
+- **A lead sharing the pad's register avoids the pad's top note ± 1.**
+- **Pedals under dominant chords step to the dominant** for that bar.
+
+## Registers and pitch
+
+- Give each part its own band (pad C3–G4, lead A4–E5, bells C6 up). Two parts in one band: one of them plays chord
+ tones only.
+- Everything at concert pitch and on the grid: no `.detune()`, no pitch envelopes (`penv`), no `.speed()` on tonal
+ parts, no fractional note values, no tonal pattern stretched off the bar.
+- Modulations are chart events: every part moves with them in the same bar.
+- Loop lengths divide the chart cycle (a 4-chord chart: 1-, 2-, 4- or 8-bar figures), unless the figure is common-tone.
+
+## Reading the check
+
+| `strudel.mjs check` says | Fix |
+|---|---|
+| out of key and not in the chord | re-spell the note, or put the chromatic chord in the chart |
+| bass misses the root on a chord change | move the bass to the root at each change; slash chords for pedals |
+| chords part plays a note that is not in the chord | re-voice, or spell the extension in the chart |
+| melody non-chord tone that is not a short passing/neighbour note | chord tone, shorter, or resolve by step |
+| note held into a chord it does not fit | end it at the change, or choose a common tone |
+| two parts clash / rub a semitone apart | re-voice one, or spread them an octave and more apart |
+
+Fix the notes, not the chart, unless the chart itself is wrong for the story.
diff --git a/pipelines/_shared/skills/music/craft/melody-craft.md b/pipelines/_shared/skills/music/craft/melody-craft.md
new file mode 100644
index 0000000..a03cc91
--- /dev/null
+++ b/pipelines/_shared/skills/music/craft/melody-craft.md
@@ -0,0 +1,124 @@
+# Melody craft
+
+Distilled from lessons on melodic basics, on what makes melodies memorable, nine piano-roll melody methods from a
+producer, and Bach's table of ornaments. Use it to design the motif
+(blueprint) and to write every melody, hook, counter-line and ornament (score). Everything here must still pass the harmony
+lock: where the two meet, the harmony lock wins, and the notes below say how to stay inside it.
+
+## 1. Motion: how the line moves between notes
+
+A melody is mostly its intervals. Sort every move into one of four kinds and choose the mix on purpose:
+
+- **Static** (same note repeated): insistence, speech-like rhythm, a hook carried by rhythm alone.
+- **Steps** (a half or whole step): grounded, connected, restrained; a step-only line has a small range.
+- **Thirds** (small skips): still close, add shape without breaking the line.
+- **Leaps** (a fourth or more): freedom, openness and power; they cover range fast (the Star Wars theme is full of them).
+
+Calm or establishing sections lean on steps and repeats; lifts and arrivals open up with skips and leaps. A big leap is
+usually answered by a step back the other way. Don't scatter notes far apart to look "creative": a line where each note
+leads naturally to the next is like counting 1 2 3 4 5, and the listener enjoys predicting it. Jumps should be events.
+
+## 2. What each note does
+
+Notes in a key have jobs, just as chords do, and the job depends on the scale degree, not just the interval:
+
+- The **leading tone** (degree 7 in major, a half step under the tonic) pulls up to the tonic, in a melody as much as in a
+ chord. Withholding that resolution ("subverting the leading tone") makes the listener feel cheated: a strong effect, so
+ save it for a planned moment (a deceptive ending, a "not yet").
+- **Degree 4** can fall to 3, rise to 5, or leap away to 6 or 2. Each is a different gesture.
+- The same interval says different things on different degrees: 4→2 is not 5→3.
+- Chord tones are the stable anchors. Place the important notes (phrase ends, long notes, downbeats) on them.
+
+## 3. Phrases: questions and answers
+
+A phrase is a musical sentence, and its ending decides what it is:
+
+- A **question** (antecedent) ends unstable: on 2, 5 or 7, or on a chord tone of a non-tonic chord, rising or hanging.
+ It tells the listener there is more to come.
+- An **answer** (consequent) ends resolved: tonic or a stable chord tone, falling to rest. It lets the listener breathe.
+
+Good melodic structure mostly alternates the two. Options: the same phrase twice with only the ending changed (Q, A); a
+contrasting answer; two questions before the answer (Q Q A); the same question repeated before the answer; or a question
+left unanswered, even at the very end of the piece, on purpose. **If a melody isn't working, check the phrasing first.**
+
+## 4. Three rules almost every memorable melody follows
+
+1. **The whistle rule:** keep the main melody within about an octave and a half, so a person could whistle or hum it. Somewhere Over the Rainbow, Star Wars and Harry Potter all fit.
+2. **Pitch motif and rhythm motif together:** give the melody small cells that are recognisable by their pitches **and** by
+ their rhythm (Indiana Jones: the rhythm alone identifies it). Vary one while keeping the other so the cells stay
+ recognisable through the piece (Beethoven 5).
+3. **Rising motion, late peak:** most strong melodies rise to their highest point **late** (about 70–85% of the way through
+ the phrase or section), then fall away slightly. A peak halfway through uses up the excitement and the rest just decays.
+ When a melody returns, make the next rise go further (ET builds and builds, then decays gently, then goes higher still).
+
+## 5. Three ways to start a melody
+
+- **From a cell:** write a tiny motif, then build the melody from its shape, intervals and rhythm, re-using the rhythm in the
+ next phrase and pushing the contour higher as you go.
+- **From a shape:** sketch a contour in chord tones only (rise, fall, rise again), then embellish it with passing and
+ neighbour notes and ornaments. The skeleton keeps the harmony locked; the decoration gives it life.
+- **From an interval:** choose one striking interval (a minor seventh, a rising sixth, a tritone that resolves) and let it be
+ the motif; John Williams opens many themes this way.
+
+## 6. The "misremember" test
+
+What survives in memory is what is memorable. After writing a melody, write its **hummable reduction**: only the contour
+and the rhythm cells someone would remember after one listen. If the reduction is clearly better or the original loses its
+identity in it, simplify the melody towards the reduction. Many hooks are best as **three neighbouring notes** see-sawing.
+
+## 7. Producer methods, translated into the score
+
+These come from a producer working in a piano roll. Each is written here as something a Strudel score can do with notes.
+
+- **Seesaw:** a hook built from three adjacent scale notes moving up and down (Mary Had a Little Lamb). Simple to hum,
+ hard to forget. Use it for the main hook when the genre allows.
+- **Yo-yo:** play a one-note or simple line and move every other note up an octave (pizzicato or plucked sounds suit it; an
+ echo delay smooths the choppiness). Keep the octave-moved notes on chord tones.
+- **Stumble:** keep a loop plain and on the grid for most of its length, then let only its **last beat or half-bar** fall into
+ triplets (quantize ⅓), then return to normal. The listener waits for the stumble and enjoys the return. Strongest when
+ two or more parts (melody and hats, or bass and kick) stumble together. Keep the stumbling notes on chord tones.
+- **Pepperoni:** take the tails of held chords (the last sliver of each) and give them to a second, more textured part,
+ so it answers in the gaps. Can be turned into an arpeggio. Same pitches as the pad's top notes, so nothing rubs.
+- **Pigeon (bounce):** give a melody a bobbing, uneven rhythmic articulation (a chopped, gated feel), then copy that same
+ rhythm to the hi-hats and add a clap: the groove comes from the melody.
+- **Selfie:** take a fragment of the lead, move it up an octave, **reverse** it (retrograde), and place it elsewhere as an
+ answer or counter-line. Still recognisably "you", flipped. Re-spell for the chord where it lands.
+- **Grandfather:** one slow line (the grandfather), the same line at double speed (the father), at four times speed (the
+ son), and an augmented, lower version for the bass (the great-grandfather, free to deviate). Layered, they make a family
+ of related parts from one idea; good for builds. Every layer must still fit each chord.
+- **Spaghetti:** slides between notes (portamento/glide) give a line wobble and character. MIDI notes carry no slide, so
+ mark it in the role's "job" in the blueprint (for whoever remakes it from the MIDI pack) instead of faking it with
+ pitch effects (detune and pitch envelopes are banned by the harmony lock).
+- **Flutter** (chopping recorded pad audio into a new melody) is an audio technique for a DAW; mention it in the cue
+ sheet as an idea for the MIDI pack, don't imitate it in notes.
+
+## 8. Ornaments (Bach's table), and how to write them so they pass the harmony lock
+
+Ornaments decorate a note; they never replace the phrase. **Their speed is proportional to the tempo**: at a quarter-note
+beat most trill notes are 32nds (groups of eight per beat); in cut time they are 16ths. Too fast sounds ridiculous, too slow
+sounds lazy. Leave a tiny gap before a trill rather than tying into it.
+
+| Ornament | Notes (main note = M) | Placement |
+|---|---|---|
+| **Trill** | alternates M and the note above | starts on the upper note unless the previous note already was the upper note; then start on M |
+| **Short trill** (Pralltriller) | M, upper, M (3 notes) | quick, inside one 16th's worth; great on a falling step |
+| **Trill with termination** | trill, then the note below, then M | measured, not as fast as possible; common at cadences |
+| **Ascending / descending trill** | starts from below / above, sweeps into the trill | on long notes |
+| **Mordent** | M, the note below, M | always on the beat, at the speed of the music |
+| **Turn** | upper, M, lower, M (four quick notes) | on or just after the main note; lovely in lyrical lines |
+| **Appoggiatura** | a neighbour note on the beat that takes time from M, then resolves by step | expressive: play it louder than its resolution (loud to soft) |
+| **Acciaccatura** | a very quick grace note just before the beat | crisp, no weight |
+| **Schleifer** (slide) | two quick notes rising from a third below into M | on the beat |
+| **Arpeggiated chord** | the chord's notes rolled from the bottom | instead of a block chord at an expressive moment |
+
+**Harmony-lock rules for ornaments** (`strudel.mjs check` judges every note of a melody part against the bar's chord):
+
+- A non-chord note on the beat must last **¼ beat or less** and move by step (1–2 semitones) to the next note.
+ So an upper-note trill start, a schleifer note, a turn's first note or an appoggiatura on the beat must be a 16th or shorter.
+- A non-chord note off the beat may last up to **½ beat**, and must move by step to a different next note.
+- A long, expressive appoggiatura is possible only if its note is a **chart tension**: spell the chord with it (Dm9 for an E
+ over D minor, Csus4 for an F over C) and it may be held as long as you like.
+- Mordents and trills that start on M pass naturally (the neighbour is short, off the beat, and steps back).
+- Velocity: ornament notes slightly softer than the main note, except the appoggiatura, which is louder than its resolution.
+- Ornaments belong on melody-role parts. Never ornament a bass on a chord change (it must play the root) or a chords part.
+- Use them where they mean something: phrase ends, long notes, cadences, the motif's final return. Not on every note.
diff --git a/pipelines/_shared/skills/music/craft/picture-scoring.md b/pipelines/_shared/skills/music/craft/picture-scoring.md
new file mode 100644
index 0000000..8327713
--- /dev/null
+++ b/pipelines/_shared/skills/music/craft/picture-scoring.md
@@ -0,0 +1,244 @@
+
+# Picture scoring
+
+The method behind the music step: drama organised in time. (Read it whole before the first blueprint.)
+
+Compose music as drama organized in time. Treat theory, composition, and synchronization as one system: first determine what the scene needs, then design music whose internal logic serves that need.
+
+Do not imitate a copyrighted score or reproduce passages from reference works. Extract abstract principles from references and create new musical material.
+
+## 1. Establish the dramatic job
+
+Before choosing notes, identify:
+
+- whose perspective the audience inhabits;
+- the emotional state at the beginning and end;
+- what changes during the scene;
+- information the music should reveal, conceal, contradict, or reinforce;
+- whether silence is stronger than music;
+- the cue's required start, end, and important synchronization points.
+
+Summarize the cue in one sentence using a transformation such as: `uncertainty -> recognition -> dread`.
+
+Do not merely label emotions. Identify the dramatic movement between them.
+
+## 2. Spot the picture
+
+Build a chronological spotting map before composing substantial material.
+
+For each meaningful event record:
+
+`time | visual/narrative event | dramatic significance | possible musical response`
+
+Classify important moments as:
+
+- **structural**: scene entrance, transition, climax, reveal, cut, ending;
+- **dramatic**: realization, reversal, decision, threat, intimacy, loss;
+- **physical**: door slam, impact, gesture, camera move, edit;
+- **optional**: events that need not receive explicit musical emphasis.
+
+Do not hit every visible action. Excessive synchronization makes a cue feel mechanical. Favor events that alter meaning.
+
+## 3. Design a musical concept
+
+Choose a small vocabulary before writing the cue:
+
+- tonal center or modal center;
+- harmonic character;
+- one or two motifs;
+- characteristic interval(s);
+- rhythmic identity;
+- register;
+- density;
+- articulation;
+- timbral identity;
+- approximate tempo or tempo range.
+
+Prefer a constrained vocabulary that can transform over a large collection of unrelated ideas.
+
+## 4. Compose piano-first when useful
+
+Use piano as a reduction of the dramatic architecture even if the final cue will be orchestrated.
+
+### Harmony
+
+Control expectation through:
+
+- tonic stability and departure;
+- predominant/dominant motion when functional harmony is appropriate;
+- modal harmony and pedal tones when functional direction should weaken;
+- inversions and voice leading to change intensity without changing chord identity;
+- suspensions, appoggiaturas, altered tones, chromatic approach tones, borrowed harmony, and common-tone connections for controlled friction;
+- harmonic rhythm: change chords faster to increase activity, slower to suspend time;
+- withholding cadences when the scene must remain unresolved.
+
+Do not equate major with happy or minor with sad. Register, spacing, rhythm, articulation, dynamics, harmonic rhythm, orchestration, and context can dominate mode.
+
+### Voice leading
+
+Prefer purposeful motion between individual voices. Retain common tones where useful, move other voices economically, and treat large leaps as expressive events rather than default chord-to-chord behavior.
+
+Check outer voices separately. A convincing bass line and melodic line can make comparatively simple inner harmony feel intentional.
+
+### Melody and motifs
+
+Construct motifs from compact, recognizable properties such as:
+
+- interval contour;
+- rhythmic cell;
+- repeated note;
+- characteristic leap;
+- short scale fragment;
+- harmonic implication.
+
+Develop rather than continually replace material. Transform motifs through transposition, inversion, augmentation, diminution, fragmentation, rhythmic displacement, reharmonization, register change, altered articulation, or changed accompaniment.
+
+A motif should survive transformation while retaining enough identity for the listener to recognize its dramatic association.
+
+### Phrase and form
+
+Let musical phrases converse with visual phrases, but do not require them to have identical boundaries.
+
+Use antecedent/consequent relationships, continuation, extension, elision, interruption, deceptive resolution, and asymmetrical phrase lengths as dramatic tools.
+
+For picture, a musically "incorrect" phrase length can be correct if the dramatic event demands it.
+
+## 5. Shape tension deliberately
+
+Treat tension as multidimensional. Increase or decrease any combination of:
+
+- harmonic dissonance;
+- tonal ambiguity;
+- chromaticism;
+- register height or depth;
+- rhythmic subdivision;
+- syncopation;
+- dynamic intensity;
+- density;
+- orchestral weight;
+- repetition;
+- instability of bass;
+- phrase incompleteness;
+- proximity to expected resolution.
+
+Do not continuously increase every parameter. Contrast makes intensity legible.
+
+Use expectation strategically. Establish a pattern before violating it.
+
+## 6. Synchronize music to picture
+
+### Hit points
+
+For important hit points, consider four solutions:
+
+1. **Direct hit**: musical event occurs at the visual event.
+2. **Anticipation**: music changes shortly before it, preparing perception.
+3. **Aftermath**: music reacts afterward, allowing the image to land first.
+4. **No hit**: music deliberately ignores the event to preserve larger continuity.
+
+Choose according to dramatic function rather than mathematical neatness.
+
+### Tempo mapping
+
+When several important hits must align naturally, test tempos rather than forcing awkward bars.
+
+For constant tempo:
+
+`seconds per beat = 60 / BPM`
+
+`seconds per bar = beats_per_bar * 60 / BPM`
+
+Use these relationships to find tempos that place major events near useful beat or bar locations.
+
+Minor events may fall between beats. Do not distort the entire cue to synchronize trivial actions.
+
+If necessary, use meter changes, shortened/extended bars, fermatas, tempo ramps, pauses, pickups, or transitional material. Hide technical synchronization inside musical gestures.
+
+## 7. Map dramatic events to musical behavior
+
+Use relationships such as these as starting hypotheses, not formulas:
+
+- uncertainty -> incomplete phrases, ambiguous bass, restrained dynamics;
+- recognition -> motif clarification, registral focus, harmonic recontextualization;
+- mounting danger -> contraction of rhythmic values, persistent ostinato, rising density;
+- grief -> reduced activity, delayed resolution, exposed register, sparse texture;
+- intimacy -> smaller register, softer attacks, reduced orchestral distance;
+- revelation -> harmonic reinterpretation, arrival, sudden subtraction, or silence;
+- unresolved ending -> avoid complete tonic closure or destabilize the final sonority.
+
+Contradiction is allowed. Cheerful music over disturbing imagery, for example, can create irony or emotional distance. State why the contradiction serves the scene.
+
+## 8. Orchestrate after the cue works structurally
+
+Do not use orchestration to conceal weak composition.
+
+When expanding a piano reduction, assign functions rather than simply distributing notes:
+
+- bass foundation;
+- harmonic bed;
+- pulse/ostinato;
+- primary motif;
+- counterline;
+- texture;
+- accent;
+- transition gesture.
+
+Consider register and spectral density. Avoid placing every element in the same octave or giving every instrument continuous activity.
+
+Reserve new timbres, registers, and ensemble weight for moments where their arrival has dramatic value.
+
+## 9. Respect dialogue and sound design
+
+Music shares the soundtrack with speech, ambience, and effects.
+
+Under dialogue:
+
+- simplify competing melodic activity;
+- avoid unnecessary density in speech-critical registers;
+- use rests and sustained material deliberately;
+- leave room for important consonants, breaths, and effects;
+- avoid musical accents that unintentionally reinterpret dialogue.
+
+When a sound effect already supplies the impact, the score may prepare it or react to it instead of doubling it.
+
+## 10. Revise in layers
+
+Review a cue separately for:
+
+1. dramatic function;
+2. synchronization;
+3. musical form;
+4. harmony and voice leading;
+5. motif development;
+6. rhythm and pacing;
+7. register and density;
+8. orchestration/timbre;
+9. dialogue and sound-design space;
+10. ending and transition into the next scene.
+
+Fix structural problems before polishing voicings or production.
+
+## Output workflow
+
+When asked to score a video or scene, produce as much of the following as the available information permits:
+
+1. **Dramatic reading**: concise interpretation of the scene's trajectory.
+2. **Spotting map**: timestamps and significant events.
+3. **Musical concept**: tonal center, harmonic language, motifs, tempo, meter, texture, instrumentation.
+4. **Cue map**: section-by-section musical plan aligned to timestamps.
+5. **Composition**: original chords, melody, bass, rhythms, voicings, MIDI-oriented note data, notation guidance, or DAW instructions as requested.
+6. **Synchronization notes**: identify direct hits, anticipations, aftermaths, and intentionally ignored events.
+7. **Revision pass**: test whether the cue supports narrative rather than merely matching motion.
+
+If no video is supplied, request or work from a timestamped scene description. If the user supplies only a musical idea, develop the composition first and leave explicit synchronization until picture information exists.
+
+## Quality rules
+
+- Prioritize narrative meaning over constant synchronization.
+- Prefer development of limited material over unrelated musical ideas.
+- Preserve musical phrasing while accommodating picture.
+- Use silence intentionally.
+- Make important moments more distinct by keeping surrounding material restrained.
+- Explain compositional decisions in terms of their audible or dramatic effect.
+- Give concrete notes, chords, rhythms, timestamps, or DAW actions when the user asks for actionable composition rather than theory.
+- Keep generated music original. Do not reconstruct recognizable copyrighted melodies, cue passages, or close stylistic replicas of a living artist.
diff --git a/pipelines/_shared/skills/music/craft/rich-voicing.md b/pipelines/_shared/skills/music/craft/rich-voicing.md
new file mode 100644
index 0000000..95fe949
--- /dev/null
+++ b/pipelines/_shared/skills/music/craft/rich-voicing.md
@@ -0,0 +1,36 @@
+# Rich voicing
+
+A cue where every line is one note at a time, at one velocity, repeating unchanged, sounds flat even when it's in
+tune. This thickens and animates the parts **after** the harmony lock passes, and every addition must still pass
+`strudel.mjs check`.
+
+## Double notes: the default, not the exception
+
+Use at least three of these per cue; hooks and leads always get one.
+
+1. **Octave doubling** on hook statements and peaks: `stack(note(HOOK), note(HOOK).add(12))`.
+2. **Diatonic 3rds or 6ths** under a melody (in scale degrees with `n()` and `.scale()`: `.add(-2)`, `.add(-5)`),
+ checked as chord tones or tensions on beats.
+3. **Chord stabs with the melody on top**: block chords whose top note *is* the melody note.
+4. **Two-note bass**: an octave or fifth above on accents, an octave jump on a phrase's last 8th.
+5. **Rolled chords**: stagger the notes by 32nds, or `.arp('up')` on a copy with a short span.
+6. **Grace notes**: a 16th step into a chord-tone target on hook entries and turnarounds.
+7. **Pedal with a moving inner voice**: hold top and bottom, move one inner voice by step.
+8. **Counter-melody in the gaps**: a second line answers in the first one's rests, in its own register.
+9. **Broken-chord layer**: under a held pad, a quiet arpeggio of the same chord an octave away.
+
+## Motion: every repeat is different
+
+- **Velocity shape** (`.velocity()`, the playing dynamic): accent downbeats and backbeats, ghost the 16ths, peak at
+ phrase peaks. Each melodic part should span at least 0.25 of velocity (the check lists every part's range).
+- **Turnaround bar**: the last bar of a 4- or 8-bar loop changes (a fill, a pickup, a held note, a drop-out):
+ `.lastOf(4, …)`.
+- **Variation per pass**: the second time a section comes round, change one element (a third above, an octave up,
+ a busier rhythm, a counter-line entering).
+- **Fills**: drums get a pickup every 8 bars and a bigger one every 16, unless the picture asks for stillness.
+- **Register journey**: the hook climbs across the cue (first statement low, the peak an octave up and doubled),
+ then comes down for the ending.
+- **Swells** into section changes: a velocity or `gain` ramp across the last two bars.
+
+Thin sections on purpose (breakdowns, held breaths before a reveal) are contrast, not flatness: the intensity curve
+in the blueprint says where they go.
diff --git a/pipelines/_shared/skills/music/lib/harmony.mjs b/pipelines/_shared/skills/music/lib/harmony.mjs
new file mode 100644
index 0000000..85e97fd
--- /dev/null
+++ b/pipelines/_shared/skills/music/lib/harmony.mjs
@@ -0,0 +1,212 @@
+// The harmony lock: every pitched note is judged against the blueprint's chord chart, by the harmony role of its channel.
+//
+// blueprint.json:
+// "scale": "F:major" tonic:mode (major minor dorian phrygian lydian mixolydian …)
+// "chart": [ { "bars": [1, 8], "chords": ["Fmaj7"] }, one chord per bar, cycling through the list inside the range;
+// { "bars": [9, 40], "chords": ["Fmaj7", "Bbmaj7", "Am7", ["Gm7", "C7sus4"]] } ] a bar split in halves
+// "roles": [ { "channel": 1, "harmony": "bass", … } ] bass | chords | melody | pedal | noise | drums
+//
+// Rules (per role; times in beats = quarter notes):
+// bass on every chord change the root (or the slash bass); elsewhere chord tones, or a passing/approach note of a
+// beat or less that moves by step (≤ 2 semitones) into the next note, never on the bar's downbeat.
+// chords chord tones of the symbol only (spell extensions in the chart: Fmaj9 if the pad plays the 9th).
+// melody chord tones or available tensions (9, 11 on minor/sus, 13/6); anything else must be short (≤ ½ beat),
+// off the beat (or a ¼-beat grace) and resolve by step: a passing, neighbour or approach note.
+// pedal in key (a held tonic or dominant under anything).
+// noise / drums not judged.
+// Also: a chords/bass note held across a chord change must fit the new chord (¼ beat of release overlap is fine), and
+// two parts sounding a semitone apart (or a minor 9th) clash unless both are chord tones spread wider than a semitone.
+
+const PC = { C: 0, D: 2, E: 4, F: 5, G: 7, A: 9, B: 11 };
+const NAMES = ['C', 'C#', 'D', 'Eb', 'E', 'F', 'F#', 'G', 'Ab', 'A', 'Bb', 'B'];
+export const noteName = (m) => `${NAMES[((m % 12) + 12) % 12]}${Math.floor(m / 12) - 1}`;
+const parseRoot = (s) => {
+ const m = String(s).match(/^([A-G])([#b♯♭]?)/);
+ if (!m) return null;
+ return { pc: (PC[m[1]] + (m[2] === '#' || m[2] === '♯' ? 1 : m[2] === 'b' || m[2] === '♭' ? -1 : 0) + 12) % 12, len: m[0].length };
+};
+export const MODES = {
+ major: [0, 2, 4, 5, 7, 9, 11], ionian: [0, 2, 4, 5, 7, 9, 11], minor: [0, 2, 3, 5, 7, 8, 10], aeolian: [0, 2, 3, 5, 7, 8, 10],
+ dorian: [0, 2, 3, 5, 7, 9, 10], phrygian: [0, 1, 3, 5, 7, 8, 10], lydian: [0, 2, 4, 6, 7, 9, 11],
+ mixolydian: [0, 2, 4, 5, 7, 9, 10], locrian: [0, 1, 3, 5, 6, 8, 10], 'harmonic minor': [0, 2, 3, 5, 7, 8, 11],
+ 'melodic minor': [0, 2, 3, 5, 7, 9, 11], blues: [0, 3, 5, 6, 7, 10], 'major pentatonic': [0, 2, 4, 7, 9], 'minor pentatonic': [0, 3, 5, 7, 10],
+};
+// quality → intervals above the root
+const Q = {
+ '': [0, 4, 7], maj: [0, 4, 7], M: [0, 4, 7], m: [0, 3, 7], min: [0, 3, 7], '-': [0, 3, 7], 5: [0, 7], dim: [0, 3, 6], '°': [0, 3, 6], aug: [0, 4, 8], '+': [0, 4, 8],
+ 6: [0, 4, 7, 9], m6: [0, 3, 7, 9], '6/9': [0, 4, 7, 9, 2], 69: [0, 4, 7, 9, 2], 'm6/9': [0, 3, 7, 9, 2], m69: [0, 3, 7, 9, 2],
+ 7: [0, 4, 7, 10], maj7: [0, 4, 7, 11], M7: [0, 4, 7, 11], '^7': [0, 4, 7, 11], 'Δ7': [0, 4, 7, 11], m7: [0, 3, 7, 10], '-7': [0, 3, 7, 10],
+ m7b5: [0, 3, 6, 10], 'ø': [0, 3, 6, 10], 'ø7': [0, 3, 6, 10], 'm7(b5)': [0, 3, 6, 10], dim7: [0, 3, 6, 9], '°7': [0, 3, 6, 9],
+ mmaj7: [0, 3, 7, 11], mMaj7: [0, 3, 7, 11], 'm(maj7)': [0, 3, 7, 11],
+ 9: [0, 4, 7, 10, 2], maj9: [0, 4, 7, 11, 2], M9: [0, 4, 7, 11, 2], m9: [0, 3, 7, 10, 2], add9: [0, 4, 7, 2], add2: [0, 4, 7, 2], madd9: [0, 3, 7, 2], 'm(add9)': [0, 3, 7, 2],
+ 11: [0, 7, 10, 2, 5], m11: [0, 3, 7, 10, 2, 5], 13: [0, 4, 7, 10, 2, 9], m13: [0, 3, 7, 10, 2, 9], maj13: [0, 4, 7, 11, 2, 9],
+ '7b9': [0, 4, 7, 10, 1], '7#9': [0, 4, 7, 10, 3], '7#11': [0, 4, 7, 10, 6], '9#11': [0, 4, 7, 10, 2, 6], '7b13': [0, 4, 7, 10, 8], '7#5': [0, 4, 8, 10],
+ '7sus4': [0, 5, 7, 10], '7sus': [0, 5, 7, 10], sus4: [0, 5, 7], sus: [0, 5, 7], sus2: [0, 2, 7], '9sus4': [0, 5, 7, 10, 2], '9sus': [0, 5, 7, 10, 2],
+ '13sus4': [0, 5, 7, 10, 2, 9], '13sus': [0, 5, 7, 10, 2, 9],
+ 'maj7#11': [0, 4, 7, 11, 6], 'maj9#11': [0, 4, 7, 11, 2, 6], 'maj7#5': [0, 4, 8, 11], 'm(add6)': [0, 3, 7, 9], madd6: [0, 3, 7, 9], 'm7add11': [0, 3, 7, 10, 5],
+ m7add9: [0, 3, 7, 10, 2], '7add13': [0, 4, 7, 10, 9],
+};
+export const CHORD_QUALITIES = Object.keys(Q);
+const chordCache = new Map();
+export function parseChord(sym) {
+ if (chordCache.has(sym)) return chordCache.get(sym);
+ const s = String(sym).trim();
+ const slashAt = s.lastIndexOf('/');
+ const slashed = slashAt > 0 && /^[A-G][#b♯♭]?$/.test(s.slice(slashAt + 1));
+ const main = slashed ? s.slice(0, slashAt) : s;
+ const r = parseRoot(main);
+ if (!r) throw new Error(`"${sym}" isn't a chord symbol (root A–G, then a quality)`);
+ const qual = main.slice(r.len);
+ if (!(qual in Q)) throw new Error(`unknown chord quality "${qual}" in "${sym}" (known: ${CHORD_QUALITIES.filter(Boolean).join(' ')})`);
+ const iv = Q[qual];
+ const tones = new Set(iv.map((i) => (r.pc + i) % 12));
+ const bass = slashed ? parseRoot(s.slice(slashAt + 1)).pc : r.pc;
+ tones.add(bass);
+ const minor = iv.includes(3) && !iv.includes(4);
+ const sus = iv.includes(5) && !iv.includes(3) && !iv.includes(4);
+ const hasFlat9 = iv.includes(1) || (iv.includes(3) && iv.includes(4));
+ const dom = iv.includes(4) && iv.includes(10);
+ const dim = iv.includes(6) && iv.includes(3);
+ const tens = new Set();
+ if (!hasFlat9 && !dim) tens.add((r.pc + 2) % 12);
+ if (minor || sus) tens.add((r.pc + 5) % 12);
+ if (!minor || iv.includes(9)) tens.add((r.pc + 9) % 12);
+ if (dom && !iv.includes(9)) tens.add((r.pc + 9) % 12);
+ const c = { sym: s, root: r.pc, bass, tones, tens };
+ chordCache.set(sym, c);
+ return c;
+}
+
+export function parseScale(scale) {
+ const m = String(scale ?? '').match(/^\s*([A-G][#b♯♭]?)\s*[: ]\s*([a-z ]+?)\s*$/i);
+ if (!m) throw new Error(`"scale" must look like "F:major" or "G:dorian" (got ${JSON.stringify(scale)})`);
+ const mode = MODES[m[2].toLowerCase()];
+ if (!mode) throw new Error(`unknown mode "${m[2]}" (known: ${Object.keys(MODES).join(', ')})`);
+ const tonic = parseRoot(m[1]).pc;
+ return new Set(mode.map((i) => (tonic + i) % 12));
+}
+
+// chart → [{begin, end, chord, bar}] in beats, covering bars 1..bars. Errors for gaps, overlaps, bad symbols.
+export function chartTimeline(chart, { bars, beatsPerBar }) {
+ const errors = []; const timeline = [];
+ if (!Array.isArray(chart) || !chart.length) return { errors: ['"chart" is missing: one chord per bar, e.g. [{"bars": [1, 8], "chords": ["Fmaj7", "Bbmaj7"]}].'], timeline };
+ const covered = new Array(bars + 1).fill(false);
+ for (const [i, row] of chart.entries()) {
+ const [a, b] = Array.isArray(row?.bars) ? row.bars : [];
+ if (!(Number.isInteger(a) && Number.isInteger(b) && a >= 1 && b >= a && b <= bars)) { errors.push(`chart row ${i + 1}: "bars" must be [first, last] inside 1–${bars}.`); continue; }
+ if (!Array.isArray(row.chords) || !row.chords.length) { errors.push(`chart row ${i + 1} (bars ${a}–${b}): no chords.`); continue; }
+ for (let bar = a; bar <= b; bar += 1) {
+ if (covered[bar]) { errors.push(`chart: bar ${bar} has two chords rows.`); continue; }
+ covered[bar] = true;
+ const cell = row.chords[(bar - a) % row.chords.length];
+ const parts = Array.isArray(cell) ? cell : [cell];
+ for (const [k, sym] of parts.entries()) {
+ let chord;
+ try { chord = parseChord(sym); } catch (e) { errors.push(`chart bar ${bar}: ${e.message}`); continue; }
+ const begin = (bar - 1) * beatsPerBar + (k * beatsPerBar) / parts.length;
+ timeline.push({ begin, end: begin + beatsPerBar / parts.length, chord, bar });
+ }
+ }
+ }
+ const missing = []; for (let bar = 1; bar <= bars; bar += 1) if (!covered[bar]) missing.push(bar);
+ if (missing.length) errors.push(`chart: no chord for bar${missing.length > 1 ? 's' : ''} ${compactBars(missing)}.`);
+ timeline.sort((x, y) => x.begin - y.begin);
+ return { errors, timeline };
+}
+const compactBars = (list) => {
+ const out = []; let s = list[0]; let p = list[0];
+ for (const n of [...list.slice(1), null]) { if (n === p + 1) { p = n; continue; } out.push(s === p ? `${s}` : `${s}–${p}`); s = n; p = n; }
+ return out.join(', ');
+};
+
+// manifest: { tracks: [{channel, name, kind, notes: [{pitch, start, dur, velocity}]}], beats_per_bar, bars }
+// blueprint: { scale, chart, roles: [{channel, harmony}] }
+export function checkHarmony(manifest, blueprint, { maxExamples = 6 } = {}) {
+ const bpb = manifest.beats_per_bar; const bars = manifest.bars;
+ const errors = []; const problems = {};
+ const add = (type, msg) => { (problems[type] ||= []).push(msg); };
+ let keyPcs;
+ try { keyPcs = parseScale(blueprint.scale); } catch (e) { errors.push(`blueprint.json: ${e.message}`); }
+ const { errors: chartErrors, timeline } = chartTimeline(blueprint.chart, { bars, beatsPerBar: bpb });
+ errors.push(...chartErrors.map((e) => `blueprint.json ${e}`));
+ const roleOf = new Map();
+ const ROLES = ['bass', 'chords', 'melody', 'pedal', 'noise', 'drums'];
+ for (const r of blueprint.roles ?? []) if (r && Number.isInteger(r.channel)) roleOf.set(r.channel, r.harmony);
+ for (const t of manifest.tracks) {
+ if (t.channel === 10 || t.kind === 'drums') continue;
+ const role = roleOf.get(t.channel);
+ if (!ROLES.includes(role)) errors.push(`blueprint.json: channel ${t.channel} (${t.name}) needs "harmony": one of ${ROLES.join(', ')} in its roles entry.`);
+ }
+ if (errors.length || !keyPcs) return { ok: false, errors, problems: {}, counts: {} };
+
+ const chordAt = (t) => { let lo = 0; let hi = timeline.length - 1; while (lo <= hi) { const m = (lo + hi) >> 1; const c = timeline[m]; if (t < c.begin - 1e-9) hi = m - 1; else if (t >= c.end - 1e-9) lo = m + 1; else return c; } return null; };
+ const where = (t) => { const bar = Math.floor(t / bpb + 1e-9); return `bar ${bar + 1} beat ${+((t - bar * bpb) + 1).toFixed(2)}`; };
+ const ev = [];
+ for (const t of manifest.tracks) {
+ const role = t.channel === 10 || t.kind === 'drums' ? 'drums' : roleOf.get(t.channel);
+ if (role === 'drums' || role === 'noise') continue;
+ const list = [...t.notes].sort((a, b) => a.start - b.start || a.pitch - b.pitch).map((n) => ({ ...n, end: n.start + n.dur, ch: t.channel, part: t.name, role }));
+ ev.push(...list);
+ list.forEach((e, i) => {
+ const c = chordAt(e.start);
+ if (!c) return;
+ const pc = ((e.pitch % 12) + 12) % 12;
+ const at = `${e.part} ${noteName(e.pitch)} at ${where(e.start)} over ${c.chord.sym}`;
+ const ct = c.chord.tones.has(pc);
+ const onBeat = Math.abs(e.start - Math.round(e.start)) < 1e-6;
+ const downbeat = Math.abs(e.start / bpb - Math.round(e.start / bpb)) < 1e-6;
+ const short = e.dur <= 0.5 + 1e-9;
+ const grace = e.dur <= 0.25 + 1e-9;
+ const next = list.slice(i + 1).find((x) => x.start > e.start + 1e-9);
+ const resolves = Boolean(next) && Math.abs(next.pitch - e.pitch) <= 2 && next.pitch !== e.pitch && next.start - e.end < 1 + 1e-9;
+ const passing = short && resolves && (!onBeat || grace);
+ if (role === 'pedal') { if (!keyPcs.has(pc) && !ct) add('pedal out of key', at); return; }
+ if (!ct && !keyPcs.has(pc) && !(role === 'melody' && passing) && !(role === 'bass' && resolves && e.dur <= 1 + 1e-9 && !downbeat && Math.abs(e.start - c.begin) > 1e-6)) {
+ add('out of key and not in the chord', at); return;
+ }
+ if (role === 'chords' && !ct) add('chords part plays a note that is not in the chord', at);
+ if (role === 'bass') {
+ if (Math.abs(e.start - c.begin) < 1e-6 && pc !== c.chord.bass && pc !== c.chord.root) add('bass misses the root on a chord change', at);
+ else if (!ct && !(resolves && e.dur <= 1 + 1e-9 && !downbeat)) add('bass non-chord tone that does not pass by step', at);
+ }
+ if (role === 'melody' && !ct && !c.chord.tens.has(pc) && !passing) add('melody non-chord tone that is not a short passing/neighbour note', at);
+ if (role === 'chords' || role === 'bass') {
+ for (const c2 of timeline) {
+ if (c2.begin <= e.start + 1e-6) continue;
+ if (c2.begin >= e.end - 0.25 - 1e-6) break;
+ if (!c2.chord.tones.has(pc)) { add('note held into a chord it does not fit', `${e.part} ${noteName(e.pitch)} held from ${where(e.start)} into ${c2.chord.sym} at ${where(c2.begin)}`); break; }
+ }
+ }
+ });
+ }
+ // vertical: semitone clashes between different parts
+ const onsets = [...new Set(ev.map((e) => +e.start.toFixed(6)))].sort((a, b) => a - b);
+ const seen = new Set();
+ for (const t of onsets) {
+ const c = chordAt(t);
+ if (!c) continue;
+ const sounding = ev.filter((e) => e.start <= t + 1e-6 && e.end > t + 1e-6);
+ const fresh = sounding.filter((e) => Math.abs(e.start - t) < 1e-6);
+ for (const a of fresh) {
+ for (const b of sounding) {
+ if (a === b || a.ch === b.ch) continue;
+ const d = Math.abs(a.pitch - b.pitch);
+ if ((a.role === 'pedal' || b.role === 'pedal') && d > 12) continue;
+ if (d % 12 !== 1 && d % 12 !== 11) continue;
+ if (d % 12 === 11 && d > 11) continue;
+ const aCT = c.chord.tones.has(a.pitch % 12); const bCT = c.chord.tones.has(b.pitch % 12);
+ const passingNote = (x, xCT) => x.role === 'melody' && !xCT && x.dur <= 0.5 + 1e-9;
+ if (aCT && bCT && d > 1) continue;
+ if (passingNote(a, aCT) || passingNote(b, bCT)) continue;
+ const key = `${[a.ch, b.ch].sort().join('/')} ${t.toFixed(3)}`;
+ if (seen.has(key)) continue;
+ seen.add(key);
+ add(aCT && bCT ? 'two parts rub a semitone apart' : 'two parts clash a semitone apart', `${a.part} ${noteName(a.pitch)} vs ${b.part} ${noteName(b.pitch)} at ${where(t)} over ${c.chord.sym}`);
+ }
+ }
+ }
+ const counts = Object.fromEntries(Object.entries(problems).map(([k, v]) => [k, v.length]));
+ const total = Object.values(counts).reduce((s, n) => s + n, 0);
+ const lines = Object.entries(problems).map(([k, v]) => `${k} (${v.length}): ${v.slice(0, maxExamples).join('; ')}${v.length > maxExamples ? '; …' : ''}`);
+ return { ok: total === 0, errors: total ? [`Harmony: ${total} problem${total === 1 ? '' : 's'} against the chord chart (every part must fit the chord of the moment; fix the notes, not the chart, unless the chart is wrong).`, ...lines] : [], problems, counts };
+}
diff --git a/pipelines/_shared/skills/music/lib/headless.mjs b/pipelines/_shared/skills/music/lib/headless.mjs
new file mode 100644
index 0000000..88b4fc7
--- /dev/null
+++ b/pipelines/_shared/skills/music/lib/headless.mjs
@@ -0,0 +1,154 @@
+// Strudel in a headless Chrome, driven over the DevTools protocol (no npm dependencies). One page evaluates the score
+// exactly as the Strudel REPL does; from it we read the notes (haps) and render audio with Strudel's own offline
+// renderer (renderPatternAudio, the REPL's Export). Setup installs Strudel (MFX_STRUDEL) and finds Chrome (MFX_CHROME).
+import { createServer } from 'node:http';
+import { spawn } from 'node:child_process';
+import { existsSync, readFileSync, mkdtempSync, readdirSync, rmSync, renameSync } from 'node:fs';
+import { join, extname } from 'node:path';
+import { tmpdir } from 'node:os';
+
+const sleep = (ms) => new Promise((r) => setTimeout(r, ms));
+
+// The page: Strudel's web bundle, plus a `drum` control for General MIDI drum numbers on samples.
+const PAGE = `<!doctype html><meta charset="utf-8"><script type="module">
+import * as S from '/strudel/index.mjs';
+const { initStrudel, renderPatternAudio } = S;
+let repl = null;
+async function load(code) {
+ if (!repl) { repl = await initStrudel(); try { S.registerControl?.('drum'); } catch {} }
+ repl.state.evalError = undefined;
+ await repl.evaluate(code, false);
+ repl.scheduler.stop();
+ if (repl.state.evalError) throw new Error(String(repl.state.evalError.message || repl.state.evalError));
+ if (!repl.state.pattern) throw new Error('the score made no pattern (nothing to play)');
+ return repl.state.pattern;
+}
+const plain = (v) => JSON.parse(JSON.stringify(v, (k, x) => (typeof x === 'function' ? undefined : x)));
+window.mfxHaps = async (code, cycles) => {
+ const pat = await load(code);
+ const cps = repl.scheduler.cps;
+ const haps = pat.queryArc(0, cycles, { _cps: cps }).filter((h) => h.hasOnset()).map((h) => ({
+ begin: h.whole.begin.valueOf(), end: h.whole.end.valueOf(), value: plain(h.value),
+ locations: (h.context?.locations || []).map((l) => l.start ?? l),
+ }));
+ return { cps, haps };
+};
+window.mfxRender = async (code, cycles, sampleRate, name, channel) => {
+ let pat = await load(code);
+ if (channel) pat = pat.filterValues((v) => v && v.midichan === channel);
+ await renderPatternAudio(pat, repl.scheduler.cps, 0, cycles, sampleRate, 512, false, name);
+ return { cps: repl.scheduler.cps };
+};
+window.mfxReady = true;
+</script>`;
+
+export class HeadlessStrudel {
+ constructor({ strudel = process.env.MFX_STRUDEL, chrome = process.env.MFX_CHROME } = {}) {
+ if (!strudel || !existsSync(join(strudel, 'node_modules', '@strudel', 'web', 'dist', 'index.mjs'))) {
+ throw new Error('Strudel isn\'t installed in this studio (MFX_STRUDEL). The owner runs `mortiflix setup music`; until then, say so with `mfx needs-you`.');
+ }
+ if (!chrome || !existsSync(chrome)) throw new Error('No Chrome to render in (MFX_CHROME). The owner runs `mortiflix setup music`.');
+ this.dist = join(strudel, 'node_modules', '@strudel', 'web', 'dist');
+ this.chromePath = chrome;
+ }
+
+ async start() {
+ this.server = createServer((req, res) => {
+ const url = new URL(req.url, 'http://x');
+ if (url.pathname === '/') { res.writeHead(200, { 'content-type': 'text/html' }); return res.end(PAGE); }
+ const rel = url.pathname.replace(/^\/strudel\//, '');
+ const file = join(this.dist, rel);
+ if (!url.pathname.startsWith('/strudel/') || rel.includes('..') || !existsSync(file)) { res.writeHead(404); return res.end(); }
+ res.writeHead(200, { 'content-type': ['.mjs', '.js'].includes(extname(file)) ? 'text/javascript' : 'application/octet-stream' });
+ res.end(readFileSync(file));
+ });
+ await new Promise((ok) => this.server.listen(0, '127.0.0.1', ok));
+ this.profile = mkdtempSync(join(tmpdir(), 'mfx-strudel-'));
+ this.downloads = join(this.profile, 'downloads');
+ this.chrome = spawn(this.chromePath, ['--headless=new', '--disable-gpu', '--no-first-run', '--no-default-browser-check', `--user-data-dir=${this.profile}`,
+ '--remote-debugging-port=0', '--autoplay-policy=no-user-gesture-required', 'about:blank'], { stdio: 'ignore' });
+ let port = null;
+ for (let i = 0; i < 100 && !port; i++) {
+ await sleep(100);
+ const f = join(this.profile, 'DevToolsActivePort');
+ if (existsSync(f)) port = Number(readFileSync(f, 'utf8').split('\n')[0]) || null;
+ }
+ if (!port) throw new Error(`Chrome didn't start (${this.chromePath})`);
+ const browser = await (await fetch(`http://127.0.0.1:${port}/json/version`)).json();
+ this.browser = await connect(browser.webSocketDebuggerUrl);
+ await this.browser.send('Browser.setDownloadBehavior', { behavior: 'allow', downloadPath: this.downloads });
+ const pages = await (await fetch(`http://127.0.0.1:${port}/json`)).json();
+ this.page = await connect(pages.find((t) => t.type === 'page').webSocketDebuggerUrl);
+ this.errors = [];
+ this.page.on('Runtime.exceptionThrown', (p) => this.errors.push(p.exceptionDetails.exception?.description || p.exceptionDetails.text));
+ this.page.on('Runtime.consoleAPICalled', (p) => {
+ const text = p.args.map((a) => a.value ?? a.description ?? '').join(' ').replace(/%c/g, '').replace(/background-color:[^;]*;color:[^;]*;border-radius:[^ ]*/g, '').trim();
+ if (p.type === 'error' || /\berror\b|not found|is not defined/i.test(text)) this.errors.push(text.slice(0, 400));
+ });
+ await this.page.send('Runtime.enable');
+ await this.page.send('Page.enable');
+ await this.page.send('Page.navigate', { url: `http://127.0.0.1:${this.server.address().port}/` });
+ for (let i = 0; i < 100; i++) {
+ await sleep(100);
+ if ((await this.eval('window.mfxReady === true')) === true) return this;
+ }
+ throw new Error(`Strudel didn't load in Chrome: ${this.errors.join(' / ') || 'timed out'}`);
+ }
+
+ async eval(expression) {
+ const r = await this.page.send('Runtime.evaluate', { expression, awaitPromise: true, returnByValue: true });
+ if (r.exceptionDetails) throw new Error(r.exceptionDetails.exception?.description?.split('\n')[0] || r.exceptionDetails.text);
+ return r.result?.value;
+ }
+
+ // Every note that starts in [0, cycles): { cps, haps: [{ begin, end, value, locations }] } (times in cycles = bars).
+ async haps(code, cycles) {
+ this.errors = [];
+ try { return await this.eval(`mfxHaps(${JSON.stringify(code)}, ${Number(cycles)})`); } catch (e) { throw new Error(scoreError(e, this.errors)); }
+ }
+
+ // Renders [0, cycles) to a 16-bit WAV at `out`. `channel` renders one part (its .midichan).
+ async render(code, cycles, out, { sampleRate = 48000, channel = 0 } = {}) {
+ this.errors = [];
+ const name = `r${Date.now()}`;
+ try { await this.eval(`mfxRender(${JSON.stringify(code)}, ${Number(cycles)}, ${Number(sampleRate)}, ${JSON.stringify(name)}, ${Number(channel) || 0})`); }
+ catch (e) { throw new Error(scoreError(e, this.errors)); }
+ const want = join(this.downloads, `${name}.wav`);
+ for (let i = 0; i < 1200; i++) {
+ if (existsSync(want) && !readdirSync(this.downloads).some((f) => f.endsWith('.crdownload'))) { renameSync(want, out); return out; }
+ await sleep(100);
+ }
+ throw new Error('the render finished but no audio file arrived');
+ }
+
+ async close() {
+ try { this.page?.close(); this.browser?.close(); } catch { /* gone */ }
+ this.chrome?.kill();
+ this.server?.close();
+ await sleep(200);
+ if (this.profile) rmSync(this.profile, { recursive: true, force: true });
+ }
+}
+
+function scoreError(e, logged) {
+ const extra = logged.filter((l) => l && !e.message.includes(l)).slice(0, 3);
+ return `The score didn't evaluate: ${e.message}${extra.length ? ` (${extra.join(' / ')})` : ''}`;
+}
+
+async function connect(url) {
+ const ws = new WebSocket(url);
+ await new Promise((ok, fail) => { ws.addEventListener('open', ok, { once: true }); ws.addEventListener('error', fail, { once: true }); });
+ let n = 0;
+ const waiting = new Map();
+ const listeners = new Map();
+ ws.addEventListener('message', (e) => {
+ const m = JSON.parse(e.data);
+ if (m.id && waiting.has(m.id)) { const w = waiting.get(m.id); waiting.delete(m.id); if (m.error) w.fail(new Error(m.error.message)); else w.ok(m.result); }
+ else if (m.method && listeners.has(m.method)) for (const f of listeners.get(m.method)) f(m.params);
+ });
+ return {
+ send: (method, params = {}) => new Promise((ok, fail) => { const id = ++n; waiting.set(id, { ok: (r) => ok(r), fail }); ws.send(JSON.stringify({ id, method, params })); }).then((result) => (method === 'Runtime.evaluate' ? result : result)),
+ on: (method, f) => { if (!listeners.has(method)) listeners.set(method, []); listeners.get(method).push(f); },
+ close: () => ws.close(),
+ };
+}
diff --git a/pipelines/_shared/skills/music/lib/midi.mjs b/pipelines/_shared/skills/music/lib/midi.mjs
new file mode 100644
index 0000000..6463b3c
--- /dev/null
+++ b/pipelines/_shared/skills/music/lib/midi.mjs
@@ -0,0 +1,83 @@
+// A Type-1 Standard MIDI File (one track per part, on its role's channel) from tracks of notes in beats (480 ticks per beat), and a small parser for tests.
+const PPQ = 480;
+
+function vlq(n) {
+ const bytes = [n & 0x7f];
+ while ((n >>= 7)) bytes.unshift((n & 0x7f) | 0x80);
+ return bytes;
+}
+const chunk = (type, data) => {
+ const head = Buffer.alloc(8);
+ head.write(type, 0, 'latin1');
+ head.writeUInt32BE(data.length, 4);
+ return Buffer.concat([head, Buffer.from(data)]);
+};
+const text = (type, s) => { const b = [...Buffer.from(String(s).slice(0, 120), 'utf8')]; return [0, 0xff, type, ...vlq(b.length), ...b]; };
+
+// meter "6/8" → time signature 6/8; markers [{ beat, text }] go on the conductor track (section names, hit points).
+export function writeMidi({ bpm, tracks, meter = '4/4', markers = [] }) {
+ const tempo = Math.round(60000000 / bpm);
+ const [num, den] = String(meter).split('/').map(Number);
+ const conductor = [...text(0x03, 'tempo'), 0, 0xff, 0x51, 3, (tempo >> 16) & 0xff, (tempo >> 8) & 0xff, tempo & 0xff, 0, 0xff, 0x58, 4, num || 4, Math.log2(den || 4), 24, 8];
+ let at = 0;
+ for (const m of [...markers].sort((a, b) => a.beat - b.beat)) {
+ const tick = Math.max(0, Math.round(m.beat * PPQ));
+ conductor.push(...vlq(tick - at), ...text(0x06, m.text).slice(1));
+ at = tick;
+ }
+ conductor.push(0, 0xff, 0x2f, 0);
+ const out = [chunk('MTrk', conductor)];
+ const melodic = [0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13, 14, 15]; // channel 10 (index 9) is drums
+ let next = 0;
+ for (const t of tracks) {
+ const ch = t.kind === 'drums' ? 9 : Number.isInteger(t.channel) && t.channel !== 10 ? t.channel - 1 : melodic[next++ % melodic.length];
+ const events = [];
+ for (const n of t.notes) {
+ const on = Math.round(n.start * PPQ);
+ const off = Math.max(on + 1, Math.round((n.start + n.dur) * PPQ));
+ const vel = Math.max(1, Math.min(127, Math.round(n.velocity * 127)));
+ events.push({ tick: on, data: [0x90 | ch, n.pitch, vel], order: 1 }, { tick: off, data: [0x80 | ch, n.pitch, 0], order: 0 });
+ }
+ events.sort((a, b) => a.tick - b.tick || a.order - b.order);
+ const bytes = [...text(0x03, t.name)];
+ let last = 0;
+ for (const e of events) { bytes.push(...vlq(e.tick - last), ...e.data); last = e.tick; }
+ bytes.push(0, 0xff, 0x2f, 0);
+ out.push(chunk('MTrk', bytes));
+ }
+ const header = Buffer.alloc(6);
+ header.writeUInt16BE(1, 0); header.writeUInt16BE(out.length, 2); header.writeUInt16BE(PPQ, 4);
+ return Buffer.concat([chunk('MThd', header), ...out]);
+}
+
+// Minimal reader (tests): { format, ppq, tracks: [{ name, notes: [{ pitch, start, dur, velocity, channel }] }], tempo }.
+export function readMidi(buf) {
+ if (buf.toString('latin1', 0, 4) !== 'MThd') throw new Error('not a MIDI file');
+ const format = buf.readUInt16BE(8); const ntr = buf.readUInt16BE(10); const ppq = buf.readUInt16BE(12);
+ let pos = 14; const tracks = []; let tempo = null;
+ for (let t = 0; t < ntr; t += 1) {
+ const len = buf.readUInt32BE(pos + 4); let p = pos + 8; const end = p + len; pos = end;
+ let tick = 0; let status = 0; const open = new Map(); const track = { name: '', notes: [] };
+ const readVlq = () => { let v = 0; let b; do { b = buf[p++]; v = (v << 7) | (b & 0x7f); } while (b & 0x80); return v; };
+ while (p < end) {
+ tick += readVlq();
+ let s = buf[p];
+ if (s & 0x80) { status = s; p += 1; } else s = status;
+ if (s === 0xff) {
+ const type = buf[p++]; const l = readVlq();
+ if (type === 0x03) track.name = buf.toString('utf8', p, p + l);
+ if (type === 0x51) tempo = (buf[p] << 16) | (buf[p + 1] << 8) | buf[p + 2];
+ p += l;
+ } else {
+ const kind = s & 0xf0; const ch = s & 0x0f; const a = buf[p++]; const b = buf[p++];
+ if (kind === 0x90 && b > 0) open.set(`${ch}:${a}`, { tick, vel: b });
+ else if (kind === 0x80 || (kind === 0x90 && b === 0)) {
+ const o = open.get(`${ch}:${a}`);
+ if (o) { track.notes.push({ pitch: a, start: o.tick / ppq, dur: (tick - o.tick) / ppq, velocity: o.vel / 127, channel: ch }); open.delete(`${ch}:${a}`); }
+ }
+ }
+ }
+ tracks.push(track);
+ }
+ return { format, ppq, tempo, tracks };
+}
diff --git a/pipelines/_shared/skills/music/lib/score.mjs b/pipelines/_shared/skills/music/lib/score.mjs
new file mode 100644
index 0000000..6c87307
--- /dev/null
+++ b/pipelines/_shared/skills/music/lib/score.mjs
@@ -0,0 +1,173 @@
+// A Strudel score read as music: its notes per channel, the checks a finished cue must pass, the intensity curve
+// (how busy each bar is, against what the blueprint asked of each section) and the hit points against the picture.
+//
+// Score conventions (see SKILL.md): one cycle = one bar, every part a labelled block with .midichan(n) = its role's
+// channel, drums on channel 10 with General MIDI note numbers (or a drum sample name: bd, sd, hh…). Velocity
+// (.velocity) is the playing dynamic; gain is the mix level and never reaches the MIDI.
+
+const CHROMA = { c: 0, d: 2, e: 4, f: 5, g: 7, a: 9, b: 11 };
+
+// Strudel's noteToMidi: octave defaults to 3, c4 = 60.
+export function noteToMidi(note, defaultOctave = 3) {
+ if (typeof note === 'number') return note;
+ const m = String(note).trim().match(/^([a-gA-G])([#bsf]*)(-?\d+)?$/);
+ if (!m) return null;
+ const acc = [...m[2]].reduce((sum, ch) => sum + (ch === '#' || ch === 's' ? 1 : ch === 'b' || ch === 'f' ? -1 : 0), 0);
+ const oct = m[3] === undefined ? defaultOctave : Number(m[3]);
+ return (oct + 1) * 12 + CHROMA[m[1].toLowerCase()] + acc;
+}
+export const freqToMidi = (f) => Math.round(69 + 12 * Math.log2(f / 440));
+
+const GM_DRUMS = {
+ bd: 36, kick: 36, sd: 38, snare: 38, rim: 37, rs: 37, cp: 39, clap: 39, hh: 42, ch: 42, hihat: 42, oh: 46, ho: 46,
+ lt: 41, mt: 45, ht: 48, tom: 45, cr: 49, crash: 49, rd: 51, ride: 51, cb: 56, cowbell: 56, sh: 70, shaker: 70, tb: 54, perc: 67,
+};
+export function drumNote(sound) {
+ const base = String(sound || '').toLowerCase().split(':')[0];
+ return GM_DRUMS[base.includes('_') ? base.slice(base.lastIndexOf('_') + 1) : base] ?? null;
+}
+
+// "4/4" → 4 quarter-note beats per bar; "6/8" → 3; "7/8" → 3.5.
+export function beatsPerBar(meter = '4/4') {
+ const m = String(meter).match(/^\s*(\d+)\s*\/\s*(\d+)\s*$/);
+ if (!m) throw new Error(`meter "${meter}" must look like 4/4`);
+ const [n, d] = [Number(m[1]), Number(m[2])];
+ if (n < 1 || n > 32 || ![1, 2, 4, 8, 16, 32].includes(d)) throw new Error(`meter "${meter}" isn't a usable time signature`);
+ return (n * 4) / d;
+}
+
+const clamp = (v, lo, hi) => Math.min(hi, Math.max(lo, v));
+
+// haps (times in cycles) → { bpm, tracks: [{ channel, name, kind, notes: [{ pitch, start, dur, velocity }] }] } in beats.
+export function hapsToChannels({ haps, cps, beatsPerCycle = 4, names = {} }) {
+ const tracks = new Map();
+ const problems = [];
+ for (const h of haps) {
+ const v = h.value && typeof h.value === 'object' ? h.value : { note: h.value };
+ const channel = v.midichan ?? null;
+ const at = `at bar ${Math.floor(h.begin) + 1} beat ${+((h.begin % 1) * beatsPerCycle + 1).toFixed(2)}`;
+ if (channel === null) { problems.push(`a ${v.s || 'note'} ${at} has no .midichan(n): every part needs its role's channel`); continue; }
+ if (!Number.isInteger(channel) || channel < 1 || channel > 16) { problems.push(`channel ${channel} ${at} (must be 1-16)`); continue; }
+ let pitch;
+ if (channel === 10) pitch = v.drum ?? (v.note !== undefined ? noteToMidi(v.note) : drumNote(v.s));
+ else pitch = v.note !== undefined ? noteToMidi(v.note) : v.freq !== undefined ? freqToMidi(v.freq) : null;
+ if (pitch === null || !Number.isFinite(pitch)) {
+ problems.push(channel === 10 ? `a drum hit ${at} has no General MIDI number (give it note(36) or .drum(36), or use a named drum sample)` : `a ${v.s || 'note'} on channel ${channel} ${at} has no pitch (use note() or n() with a scale)`);
+ continue;
+ }
+ if (pitch < 0 || pitch > 127) { problems.push(`pitch ${pitch} on channel ${channel} ${at} (MIDI pitch must be 0-127)`); continue; }
+ const dur = (h.end - h.begin) * beatsPerCycle * clamp(Number(v.legato ?? 1) || 1, 0.05, 8);
+ if (!(dur > 0)) continue;
+ if (!tracks.has(channel)) tracks.set(channel, { channel, name: names[channel] || `CH${String(channel).padStart(2, '0')}`, kind: channel === 10 ? 'drums' : 'pitched', notes: [] });
+ tracks.get(channel).notes.push({ pitch: Math.round(pitch), start: +(h.begin * beatsPerCycle).toFixed(6), dur: +dur.toFixed(6), velocity: +clamp(Number(v.velocity ?? 0.8), 0.05, 1).toFixed(3) });
+ }
+ const list = [...tracks.values()].sort((a, b) => a.channel - b.channel);
+ for (const t of list) t.notes.sort((a, b) => a.start - b.start || a.pitch - b.pitch);
+ return { bpm: +(cps * 60 * beatsPerCycle).toFixed(3), tracks: list, problems };
+}
+
+// The blueprint's own shape. Returns errors (blocking) in plain words.
+export function checkBlueprint(bp) {
+ const errors = [];
+ const need = (c, msg) => { if (!c) errors.push(`blueprint.json: ${msg}`); };
+ need(bp && typeof bp === 'object', 'not a JSON object');
+ if (errors.length) return errors;
+ need(Number.isInteger(bp.bars) && bp.bars >= 2, '"bars" must be a whole number ≥ 2');
+ need(bp.bpm >= 40 && bp.bpm <= 220, '"bpm" must be between 40 and 220');
+ try { beatsPerBar(bp.meter || '4/4'); } catch (e) { errors.push(`blueprint.json: ${e.message}`); }
+ need(Array.isArray(bp.sections) && bp.sections.length, '"sections": the story, each { name, start_bar, end_bar, function, intensity 0-10 }');
+ let next = 1;
+ for (const s of bp.sections || []) {
+ need(s.start_bar === next, `section "${s.name}" starts at bar ${s.start_bar}; it should start at ${next} (sections are contiguous)`);
+ need(Number.isFinite(s.intensity) && s.intensity >= 0 && s.intensity <= 10, `section "${s.name}" needs "intensity" 0-10 (how busy and loud it should feel)`);
+ need(String(s.function || '').trim().length > 10, `section "${s.name}" needs a "function": what it does in the story`);
+ next = (s.end_bar ?? 0) + 1;
+ }
+ if (bp.sections?.length) need(next - 1 === bp.bars, `the sections end at bar ${next - 1} but the cue has ${bp.bars} bars`);
+ need(Array.isArray(bp.roles) && bp.roles.length, '"roles": each { channel, harmony, name, job }');
+ for (const h of bp.hits || []) need(Number.isFinite(h.t_sec) && Number.isFinite(h.bar), `hit "${h.what}" needs "t_sec" (in the video) and "bar"/"beat" (in the music)`);
+ return errors;
+}
+
+// Seconds into the video for a bar/beat of the cue (bars and beats count from 1).
+export const timeOf = (bp, bar, beat = 1) => (bp.offset_sec || 0) + (((bar - 1) * beatsPerBar(bp.meter || '4/4')) + (beat - 1)) * 60 / bp.bpm;
+
+// The cue's own checks: tempo, length, nothing after the ending, every role plays, hits land on the picture.
+export function checkScore(channels, bp, { video_sec = null, fps = 30 } = {}) {
+ const errors = [...channels.problems];
+ const warnings = [];
+ const bpb = beatsPerBar(bp.meter || '4/4');
+ const endBeat = bp.bars * bpb;
+ if (Math.abs(channels.bpm - bp.bpm) > 0.01) errors.push(`The score runs at ${channels.bpm} BPM but the blueprint says ${bp.bpm}: start the score with setcpm(${bp.bpm} / ${bpb}).`);
+ for (const t of channels.tracks) {
+ const late = t.notes.filter((n) => n.start >= endBeat - 1e-9);
+ if (late.length) errors.push(`${t.name} keeps playing after the last bar (${late.length} note${late.length === 1 ? '' : 's'} from bar ${Math.floor(late[0].start / bpb) + 1}). Strudel loops: end every part with the cue (arrange, or a mask that ends).`);
+ }
+ for (const r of bp.roles || []) {
+ if (!channels.tracks.some((t) => t.channel === r.channel)) errors.push(`Role "${r.name}" (channel ${r.channel}) never plays.`);
+ }
+ for (const t of channels.tracks) if (!(bp.roles || []).some((r) => r.channel === t.channel)) errors.push(`Channel ${t.channel} plays but has no role in the blueprint.`);
+ const frame = 1 / fps;
+ const hits = (bp.hits || []).map((h) => {
+ const at = timeOf(bp, h.bar, h.beat ?? 1);
+ const off = +(at - h.t_sec).toFixed(3);
+ const ok = h.kind === 'none' || Math.abs(off) <= frame + 1e-6;
+ if (!ok) errors.push(`Hit "${h.what}" at ${h.t_sec}s: bar ${h.bar} beat ${h.beat ?? 1} falls at ${at.toFixed(3)}s (${off > 0 ? '+' : ''}${off}s, more than a frame off). Change the tempo, the bar, or offset_sec.`);
+ return { ...h, music_sec: +at.toFixed(3), off_sec: off, ok };
+ });
+ const seconds = +(endBeat * 60 / bp.bpm).toFixed(3);
+ if (video_sec) {
+ const cueEnd = (bp.offset_sec || 0) + seconds;
+ if (cueEnd < video_sec - 60 / bp.bpm * bpb && !bp.ends_early) warnings.push(`The cue ends at ${cueEnd.toFixed(2)}s, more than a bar before the video (${video_sec}s). If that's the plan, set "ends_early": true.`);
+ if (cueEnd > video_sec + 0.5) errors.push(`The cue runs to ${cueEnd.toFixed(2)}s, past the end of the video (${video_sec}s).`);
+ }
+ return { ok: errors.length === 0, errors, warnings, seconds, hits };
+}
+
+// How busy each bar is: notes per beat, parts playing, mean velocity, pitch span. Then each section's measured level
+// against the intensity the blueprint asked for: rank order must agree (a section asked to be more intense than another
+// must measure busier), so builds and breakdowns really happen where the picture needs them.
+export function intensity(channels, bp) {
+ const bpb = beatsPerBar(bp.meter || '4/4');
+ const bars = [];
+ for (let b = 0; b < bp.bars; b++) bars.push({ bar: b + 1, notes: 0, parts: new Set(), vel: 0, lo: 127, hi: 0 });
+ for (const t of channels.tracks) {
+ for (const n of t.notes) {
+ const b = Math.floor(n.start / bpb + 1e-9);
+ if (b < 0 || b >= bp.bars) continue;
+ const x = bars[b];
+ x.notes += 1; x.parts.add(t.channel); x.vel += n.velocity;
+ if (t.kind !== 'drums') { x.lo = Math.min(x.lo, n.pitch); x.hi = Math.max(x.hi, n.pitch); }
+ }
+ }
+ const perBar = bars.map((x) => {
+ const density = x.notes / bpb;
+ const level = density * 0.5 + x.parts.size * 1.2 + (x.notes ? x.vel / x.notes : 0) * 3 + (x.hi > x.lo ? (x.hi - x.lo) / 12 : 0) * 0.6;
+ return { bar: x.bar, density: +density.toFixed(2), parts: x.parts.size, velocity: x.notes ? +(x.vel / x.notes).toFixed(2) : 0, level: +level.toFixed(2) };
+ });
+ const sections = (bp.sections || []).map((s) => {
+ const span = perBar.slice(s.start_bar - 1, s.end_bar);
+ const level = span.reduce((a, b) => a + b.level, 0) / Math.max(1, span.length);
+ return { name: s.name, bars: [s.start_bar, s.end_bar], asked: s.intensity, measured: +level.toFixed(2) };
+ });
+ const problems = [];
+ for (let i = 0; i < sections.length; i++) {
+ for (let j = i + 1; j < sections.length; j++) {
+ const a = sections[i]; const b = sections[j];
+ if (Math.abs(a.asked - b.asked) < 2) continue; // close asks: no order to keep
+ const hiAsk = a.asked > b.asked ? a : b; const loAsk = hiAsk === a ? b : a;
+ if (hiAsk.measured <= loAsk.measured) problems.push(`"${hiAsk.name}" was asked to be more intense (${hiAsk.asked}) than "${loAsk.name}" (${loAsk.asked}) but measures ${hiAsk.measured} vs ${loAsk.measured}: add parts, notes, velocity or range there, or thin the other.`);
+ }
+ }
+ return { perBar, sections, problems };
+}
+
+// One line per section: a bar-by-bar sparkline of the measured level.
+export function intensityChart(report) {
+ const max = Math.max(1, ...report.perBar.map((b) => b.level));
+ const ramp = ' ▁▂▃▄▅▆▇█';
+ return report.sections.map((s) => {
+ const spark = report.perBar.slice(s.bars[0] - 1, s.bars[1]).map((b) => ramp[Math.round((b.level / max) * 8)]).join('');
+ return `${s.name.slice(0, 28).padEnd(28)} bars ${String(s.bars[0]).padStart(3)}-${String(s.bars[1]).padEnd(3)} asked ${String(s.asked).padStart(2)} measured ${String(s.measured).padStart(5)} ${spark}`;
+ }).join('\n');
+}
diff --git a/pipelines/_shared/skills/music/strudel.mjs b/pipelines/_shared/skills/music/strudel.mjs
new file mode 100644
index 0000000..faa55f5
--- /dev/null
+++ b/pipelines/_shared/skills/music/strudel.mjs
@@ -0,0 +1,109 @@
+#!/usr/bin/env node
+// The music skill's tool: check a Strudel cue against its blueprint and the picture, render it, export MIDI.
+//
+// node strudel.mjs check [music/score.strudel.js] [--blueprint music/blueprint.json] [--video-sec 120] [--fps 30]
+// node strudel.mjs render [score] [--out out/music/score.wav] [--stems] [--tail-bars 1]
+// node strudel.mjs midi [score] [--out out/music/midi]
+//
+// `check` must pass (0 errors) before a render goes to the owner: the score's own checks, the harmony lock against the
+// chart, every hit point within a frame of the picture, and the intensity curve following the sections' asks.
+import { readFileSync, writeFileSync, mkdirSync, existsSync } from 'node:fs';
+import { join, dirname, basename } from 'node:path';
+import { HeadlessStrudel } from './lib/headless.mjs';
+import { hapsToChannels, checkBlueprint, checkScore, intensity, intensityChart, beatsPerBar, timeOf } from './lib/score.mjs';
+import { checkHarmony } from './lib/harmony.mjs';
+import { writeMidi } from './lib/midi.mjs';
+
+const args = process.argv.slice(2);
+const cmd = args.shift();
+const opt = (name, dflt) => { const i = args.indexOf(`--${name}`); if (i < 0) return dflt; const v = args[i + 1]; args.splice(i, v === undefined || v.startsWith('--') ? 1 : 2); return v === undefined || v.startsWith('--') ? true : v; };
+const blueprintPath = opt('blueprint', 'music/blueprint.json');
+const out = opt('out', null);
+const videoSec = Number(opt('video-sec', 0)) || null;
+const fps = Number(opt('fps', 30));
+const stems = Boolean(opt('stems', false));
+const tailBars = Number(opt('tail-bars', 1));
+const scorePath = args[0] || 'music/score.strudel.js';
+
+const die = (msg) => { console.error(`✖ ${msg}`); process.exit(1); };
+if (!['check', 'render', 'midi'].includes(cmd)) die('usage: strudel.mjs check|render|midi [score] (see SKILL.md)');
+if (!existsSync(scorePath)) die(`no score at ${scorePath}`);
+if (!existsSync(blueprintPath)) die(`no blueprint at ${blueprintPath} (write it first: SKILL.md step 3)`);
+const code = readFileSync(scorePath, 'utf8');
+let bp;
+try { bp = JSON.parse(readFileSync(blueprintPath, 'utf8')); } catch (e) { die(`${blueprintPath}: ${e.message}`); }
+const bpErrors = checkBlueprint(bp);
+if (bpErrors.length) die(bpErrors.join('\n '));
+const bpb = beatsPerBar(bp.meter || '4/4');
+const names = Object.fromEntries((bp.roles || []).map((r) => [r.channel, r.name]));
+
+const strudel = await new HeadlessStrudel().start().catch((e) => die(e.message));
+try {
+ // A bar past the end catches parts that keep looping after the ending.
+ const { cps, haps } = await strudel.haps(code, bp.bars + 1);
+ const channels = hapsToChannels({ haps, cps, beatsPerCycle: bpb, names });
+
+ if (cmd === 'check') {
+ const score = checkScore(channels, bp, { video_sec: videoSec, fps });
+ const endBeat = bp.bars * bpb;
+ const manifest = { bpm: channels.bpm, meter: bp.meter || '4/4', beats_per_bar: bpb, bars: bp.bars,
+ tracks: channels.tracks.map((t) => ({ ...t, notes: t.notes.filter((n) => n.start < endBeat) })) };
+ const harmony = checkHarmony(manifest, bp);
+ const curve = intensity(manifest, bp);
+ const errors = [...score.errors, ...harmony.errors, ...curve.problems];
+ const report = { ok: errors.length === 0, errors, warnings: score.warnings, seconds: score.seconds, hits: score.hits, intensity: curve.sections,
+ parts: manifest.tracks.map((t) => ({ channel: t.channel, name: t.name, notes: t.notes.length, velocity_range: t.notes.length ? [Math.min(...t.notes.map((n) => n.velocity)), Math.max(...t.notes.map((n) => n.velocity))] : null })) };
+ mkdirSync('music', { recursive: true });
+ writeFileSync(join(dirname(blueprintPath), 'check.json'), JSON.stringify(report, null, 2) + '\n');
+ console.log(`${bp.title || basename(scorePath)}: ${bp.bars} bars at ${bp.bpm} BPM (${bp.meter || '4/4'}) = ${score.seconds}s${bp.offset_sec ? `, starting ${bp.offset_sec}s into the video` : ''}`);
+ console.log(`Parts: ${report.parts.map((p) => `${p.name} (${p.notes})`).join(', ')}`);
+ console.log(`\nIntensity (asked vs measured, one block per bar):\n${intensityChart(curve)}`);
+ if (score.hits.length) console.log(`\nHits:\n${score.hits.map((h) => ` ${h.ok ? '✔' : '✖'} ${String(h.t_sec).padStart(7)}s bar ${h.bar} beat ${h.beat ?? 1} → ${h.music_sec}s (${h.off_sec >= 0 ? '+' : ''}${h.off_sec}s) ${h.kind || 'direct'}: ${h.what}`).join('\n')}`);
+ for (const w of score.warnings) console.log(`\n! ${w}`);
+ if (errors.length) { console.log(`\n✖ ${errors.length} problem${errors.length === 1 ? '' : 's'}:\n ${errors.join('\n ')}`); process.exitCode = 1; }
+ else console.log('\n✔ Check passed: harmony locked, hits on the picture, the curve follows the story.');
+ }
+
+ if (cmd === 'render') {
+ const file = out || 'out/music/score.wav';
+ mkdirSync(dirname(file), { recursive: true });
+ const cycles = bp.bars + Math.max(0, tailBars);
+ await strudel.render(code, cycles, file);
+ console.log(`✔ ${file} (${bp.bars} bars + ${tailBars} bar tail)`);
+ if (stems) {
+ const dir = join(dirname(file), 'stems');
+ mkdirSync(dir, { recursive: true });
+ for (const t of channels.tracks) {
+ const f = join(dir, `${String(t.channel).padStart(2, '0')}-${t.name.replace(/[^\w-]+/g, '-').toLowerCase()}.wav`);
+ await strudel.render(code, cycles, f, { channel: t.channel });
+ console.log(` ✔ ${f}`);
+ }
+ }
+ }
+
+ if (cmd === 'midi') {
+ const dir = out || 'out/music/midi';
+ mkdirSync(dir, { recursive: true });
+ const endBeat = bp.bars * bpb;
+ const tracks = channels.tracks.map((t) => ({ ...t, notes: t.notes.filter((n) => n.start < endBeat) })).filter((t) => t.notes.length);
+ const markers = [...(bp.sections || []).map((s) => ({ beat: (s.start_bar - 1) * bpb, text: s.name })),
+ ...(bp.hits || []).map((h) => ({ beat: (h.bar - 1) * bpb + ((h.beat ?? 1) - 1), text: `HIT ${h.what}` }))];
+ const slug = (s) => String(s).replace(/[^\w-]+/g, '-').replace(/^-|-$/g, '').toLowerCase();
+ writeFileSync(join(dir, `${slug(bp.title || 'cue')}-all.mid`), writeMidi({ bpm: bp.bpm, meter: bp.meter || '4/4', tracks, markers }));
+ for (const t of tracks) writeFileSync(join(dir, `${String(t.channel).padStart(2, '0')}-${slug(t.name)}.mid`), writeMidi({ bpm: bp.bpm, meter: bp.meter || '4/4', tracks: [t], markers }));
+ const sheet = [`# ${bp.title || 'Cue'}: cue sheet`, '', `${bp.bpm} BPM, ${bp.meter || '4/4'}, ${bp.scale || ''}, ${bp.bars} bars. Bar 1 starts ${bp.offset_sec || 0}s into the video.`, '',
+ '## Sections', '', '| Bars | Starts at | Section | What it does | Intensity |', '|---|---|---|---|---|',
+ ...(bp.sections || []).map((s) => `| ${s.start_bar}-${s.end_bar} | ${timeOf(bp, s.start_bar).toFixed(2)}s | ${s.name} | ${s.function} | ${s.intensity} |`),
+ '', '## Hit points', '', '| Video time | Bar.beat | How | What |', '|---|---|---|---|',
+ ...(bp.hits || []).map((h) => `| ${h.t_sec}s | ${h.bar}.${h.beat ?? 1} | ${h.kind || 'direct'} | ${h.what} |`),
+ '', '## Parts', '', '| Channel | Part | Role | Its job |', '|---|---|---|---|',
+ ...(bp.roles || []).map((r) => `| ${r.channel} | ${r.name} | ${r.harmony} | ${r.job || ''} |`),
+ '', `Chord chart: ${(bp.chart || []).map((c) => `bars ${c.bars[0]}-${c.bars[1]}: ${c.chords.map((x) => (Array.isArray(x) ? `[${x.join(' ')}]` : x)).join(' ')}`).join('; ')}`, ''];
+ writeFileSync(join(dir, 'CUE-SHEET.md'), sheet.join('\n'));
+ console.log(`✔ ${dir}: ${tracks.length} part${tracks.length === 1 ? '' : 's'} + the full arrangement + CUE-SHEET.md (tempo, sections and hits are markers in every file)`);
+ }
+} catch (e) {
+ die(e.message);
+} finally {
+ await strudel.close();
+}
diff --git a/pipelines/explainer/PIPELINE.md b/pipelines/explainer/PIPELINE.md
index 05e34ee..e37e30a 100644
--- a/pipelines/explainer/PIPELINE.md
+++ b/pipelines/explainer/PIPELINE.md
@@ -7,6 +7,7 @@ Skills (read the one a step names before starting it):
- `.claude/skills/motion-design/SKILL.md`: the craft, from style frames to the final.
- `.claude/skills/remotion-motion/SKILL.md`: the Remotion project, stills, renders.
- `.claude/skills/voiceover/SKILL.md`: narration and word timing.
+- `.claude/skills/music/SKILL.md`: the original score, written to the approved animatic.
- `.claude/skills/final-pass/SKILL.md`: `qc.mjs`, the automated checks plus the frame sheet.
## Core rules
@@ -27,9 +28,10 @@ Skills (read the one a step names before starting it):
| `brief` | questions | Read the brief and any files. Restate it in three lines (what, for whom, the one takeaway) as the note. Ask only questions that change the video, each with a default: tone, the call to action, must-say facts, narration voice (if narrated). |
| `script` | document | Write it (or tidy the owner's own, which is then spoken verbatim). Beats as paragraphs: one idea per beat, each with a one-line visual note in *italics*. Fit the length (`script-fits-length`). Submit `script.md`. |
| `style-frames` | frames | Runs beside the script. Three to five stills at full resolution, each a real moment of the video (opening, the key idea, the ending card), in one coherent look. Submit PNGs labelled `SF01 · Opening` etc. |
-| `animatic` | video | Narration first (voiceover skill) or a music bed, then every beat timed to it with simple motion in the approved look. The owner judges pace and order here, not polish. 720p is fine. |
-| `build` | internal | The final animation at full quality: easing, transitions, texture, sound design, the mix. Through `mfx render`. Run every check (`mfx checks build`), then `mfx step done build --checks checks/build.json`. |
-| `final` | video | The final at full resolution with the frame sheet as a second item. Corrections loop: fix, re-run the checks, submit the next version. |
+| `animatic` | video | Narration first (voiceover skill), then every beat timed to it with simple motion in the approved look. No music yet: the music step scores this timing. The owner judges pace and order here, not polish. 720p is fine. |
+| `music` | video | Skipped when the owner chose no music. Otherwise the music skill, start to finish: the dramatic reading, the spotting map from the animatic's real timing, the blueprint, the score, `strudel.mjs check` at 0 problems, the render, the mix under the voice. Submit the animatic with the cue mixed in, the score alone, and the cue sheet. |
+| `build` | internal | The final animation at full quality: easing, transitions, texture, sound design, the mix with the approved score (re-timed only if the animation moved). Through `mfx render`. Run every check (`mfx checks build`), then `mfx step done build --checks checks/build.json`. |
+| `final` | video | The final at full resolution with the frame sheet as a second item (and the MIDI pack and stems when the owner asked for them: music skill, step 9). Corrections loop: fix, re-run the checks, submit the next version. |
## Status lines
diff --git a/pipelines/explainer/pipeline.json b/pipelines/explainer/pipeline.json
index 0e7f59b..0b1736d 100644
--- a/pipelines/explainer/pipeline.json
+++ b/pipelines/explainer/pipeline.json
@@ -7,6 +7,7 @@
"motion-design",
"remotion-motion",
"voiceover",
+ "music",
"final-pass"
],
"intake": [
@@ -54,7 +55,18 @@
"On-screen text and music only"
],
"default": "Narrated",
- "help": "Uses the studio's narration voice (Settings › Narration: ElevenLabs, or Qwen3-TTS on your own GPU). With none set up, the studio asks."
+ "help": "Uses the studio's narration voice (Settings \u203a Narration: ElevenLabs, or Qwen3-TTS on your own GPU). With none set up, the studio asks."
+ },
+ {
+ "id": "music",
+ "label": "Music",
+ "type": "choice",
+ "choices": [
+ "Original score",
+ "No music"
+ ],
+ "default": "Original score",
+ "help": "An original score written in Strudel after you approve the animatic, built to the video's own timing (Settings \u203a Setup \u203a Music)."
},
{
"id": "script",
@@ -110,7 +122,21 @@
"script",
"style-frames"
],
- "describe": "Every beat timed to the voice (or to the music), simple motion, the approved look."
+ "describe": "Every beat timed to the narration with simple motion in the approved look. No music yet: the score is written to this timing next."
+ },
+ {
+ "key": "music",
+ "name": "Music",
+ "review": "video",
+ "when": "music",
+ "work": [
+ "music",
+ "audio"
+ ],
+ "after": [
+ "animatic"
+ ],
+ "describe": "An original score written to the approved animatic: a story with builds and hits on the frames that matter, under the voice. You review it against the picture."
},
{
"key": "build",
@@ -121,7 +147,7 @@
"audio"
],
"after": [
- "animatic"
+ "music"
]
},
{
@@ -218,7 +244,7 @@
"applies_to": [
"audio"
],
- "how": "qc.mjs: integrated loudness -14 LUFS (±1) for web, true peak at or below -1 dBTP, no clicks, pops or distortion when you listen through."
+ "how": "qc.mjs: integrated loudness -14 LUFS (\u00b11) for web, true peak at or below -1 dBTP, no clicks, pops or distortion when you listen through."
},
{
"id": "sync",
@@ -227,6 +253,22 @@
"audio"
],
"how": "Each spoken key word lands with its visual within 2 frames (check against the word timings); music hits land on cuts they were meant for."
+ },
+ {
+ "id": "music-check",
+ "title": "The score passes its check",
+ "applies_to": [
+ "music"
+ ],
+ "how": "node .claude/skills/music/strudel.mjs check --video-sec <length> --fps <fps> ends with 0 problems: harmony locked to the chart, every hit within a frame of its picture moment, nothing playing past the end, every role playing, and the intensity curve following the sections' asks."
+ },
+ {
+ "id": "music-under-voice",
+ "title": "The music sits under the voice",
+ "applies_to": [
+ "music"
+ ],
+ "how": "In the mix, the music is about 18 dB under the voice while it speaks (sidechain ducking), and the score's busiest writing avoids the narration's busiest moments. Every word stays intelligible: check the loudest music passage under speech."
}
]
}
diff --git a/src/backends/claude-code.mjs b/src/backends/claude-code.mjs
index 36ec926..7251452 100644
--- a/src/backends/claude-code.mjs
+++ b/src/backends/claude-code.mjs
@@ -38,10 +38,12 @@ export async function run({ root, workdir, prompt, env, transcript, onActivity,
signal?.addEventListener('abort', kill, { once: true });
let result = null;
+ let billing = null; // 'plan' (a Claude subscription login: nothing charged per token) or 'api' (an API key: real spend)
createInterface({ input: p.stdout }).on('line', (line) => {
out.write(`${line}\n`);
let m;
try { m = JSON.parse(line); } catch { return; }
+ if (m.type === 'system' && m.subtype === 'init' && m.apiKeySource !== undefined) billing = m.apiKeySource === 'none' ? 'plan' : 'api';
if (m.type === 'assistant') {
for (const b of m.message?.content || []) {
if (b.type === 'text' && b.text.trim()) onActivity({ kind: 'text', text: b.text });
@@ -64,9 +66,9 @@ export async function run({ root, workdir, prompt, env, transcript, onActivity,
const usage = result?.usage ? { input_tokens: (result.usage.input_tokens || 0) + (result.usage.cache_read_input_tokens || 0) + (result.usage.cache_creation_input_tokens || 0), output_tokens: result.usage.output_tokens || 0 } : null;
if (signal?.aborted) return { ok: false, error: 'stopped', usage };
if (code !== 0 || result?.is_error) {
- return { ok: false, error: (result?.result || stderr || `claude exited with ${code}`).toString().slice(-1000), usage, cost_usd: result?.total_cost_usd };
+ return { ok: false, error: (result?.result || stderr || `claude exited with ${code}`).toString().slice(-1000), usage, cost_usd: result?.total_cost_usd, billing };
}
- return { ok: true, usage, cost_usd: result?.total_cost_usd, summary: result?.result };
+ return { ok: true, usage, cost_usd: result?.total_cost_usd, billing, summary: result?.result };
}
export function describeTool(name, input = {}) {
diff --git a/src/cli.mjs b/src/cli.mjs
index 7dfcd4b..c179e04 100644
--- a/src/cli.mjs
+++ b/src/cli.mjs
@@ -10,6 +10,8 @@ import * as gates from './gates.mjs';
import { Runner, BACKENDS } from './runner.mjs';
import * as voice from './voice/index.mjs';
import * as keys from './keys.mjs';
+import * as setup from './setup.mjs';
+import { costText } from './usage.mjs';
const C = process.stdout.isTTY && !process.env.NO_COLOR
? { b: (s) => `\x1b[1m${s}\x1b[0m`, dim: (s) => `\x1b[2m${s}\x1b[0m`, acc: (s) => `\x1b[38;5;208m${s}\x1b[0m`, red: (s) => `\x1b[31m${s}\x1b[0m`, green: (s) => `\x1b[32m${s}\x1b[0m` }
@@ -19,6 +21,8 @@ const HELP = `${C.b('mortiflix')}: a motion design studio on your machine. Claud
${C.b('Getting started')}
mortiflix init [--backend claude-code|anthropic-api|demo] set up the studio (~/Mortiflix, or $MORTIFLIX_STUDIO)
+ mortiflix setup the walkthrough: Claude, narration, music, assets, 3D
+ mortiflix setup <claude|narration|music|assets|3d> one part of it (mortiflix setup status: where things stand)
mortiflix keys add or change your keys (Anthropic, ElevenLabs, others)
mortiflix doctor check the tools a pipeline needs
mortiflix demo a full walk-through with placeholder work (free)
@@ -42,6 +46,9 @@ const HELP = `${C.b('mortiflix')}: a motion design studio on your machine. Claud
mortiflix voice none no narration (on-screen text and music)
mortiflix voice test ["a line to speak"] hear the current voice
+ ${C.b('3D')}
+ mortiflix blender [file.blend] open the studio's Blender, with its toolkits and Camera Flight
+
${C.b('Settings')}
mortiflix config [key [value]] show or change settings
mortiflix keys set <anthropic|elevenlabs|NAME> set one key (typed hidden, or piped on stdin)
@@ -68,9 +75,13 @@ export async function run(argv = process.argv.slice(2)) {
const [cmd, ...rest] = a._;
// `await` the command: a bare `return promise` inside try would let its rejection escape the catch.
const dispatch = async () => {
+ // `--help` anywhere prints help: it never runs the command (`serve --help` used to start a server).
+ if (a.help || a.h) return console.log(HELP);
switch (cmd) {
case 'init': return init(root, a);
case 'keys': return keysCmd(root, rest);
+ case 'setup': return setupCmd(root, rest, a);
+ case 'blender': needStudio(root); return console.log(`Opening ${setup.openBlender(root, rest)} with the studio's profile (Camera Flight: 3D Viewport › N › Flight).`);
case 'doctor': return doctor(root);
case 'demo': return demo(root);
case 'pipelines': return pipelines(root);
@@ -154,12 +165,12 @@ async function init(root, a) {
console.log(` Backend: ${C.b(backend)} ${C.dim(BACKENDS[backend].available(loadConfig(root), root).detail)}`);
if (backend === 'demo') console.log(C.dim(' (No Claude Code login or API key found: the demo backend makes placeholder work. Install Claude Code, or add an API key with `mortiflix keys`.)'));
if (process.stdin.isTTY && !a.yes) {
- console.log(`\n ${C.b('Keys')}: Mortiflix runs on your own accounts. Keys stay in this studio folder, readable by you alone.`);
- const go = (await prompterOnce(` Add them now? ${C.dim('[Y/n]')} `)).trim().toLowerCase();
- if (!go.startsWith('n')) await keysWalk(root);
- } else console.log(`\n ${C.b('Keys')}: ${C.b('mortiflix keys')} when you want an API backend or ElevenLabs narration.`);
- console.log(`\n ${C.b('Narration')} (optional): ${voiceOffer()}`);
- console.log(`\n Next: ${C.b('mortiflix demo')} for a free walk-through, or ${C.b('mortiflix serve')} to open the studio in your browser.`);
+ console.log(`\n Next, the setup walkthrough: what Mortiflix uses (Claude, narration, music, assets, 3D), why, and what it would`);
+ console.log(' install. Nothing installs without asking, and you can skip any part.');
+ if (await confirm(' Set it up now?', true)) await setupWalk(root);
+ else console.log(` Any time: ${C.b('mortiflix setup')}`);
+ } else console.log(`\n Next: ${C.b('mortiflix setup')} walks through Claude, narration, music, assets and 3D.`);
+ console.log(`\n Then: ${C.b('mortiflix demo')} for a free walk-through, or ${C.b('mortiflix serve')} to open the studio in your browser.`);
}
function doctor(root) {
@@ -180,6 +191,8 @@ function doctor(root) {
for (const k of keys.keyStatus(root)) {
row(Boolean(k.source) || !k.in_use, k.id, k.source ? `${k.name}: ${k.source}${k.in_use ? ' ← in use' : ''}` : k.in_use ? `${k.name} missing: mortiflix keys` : `${k.name}: not set (optional)`);
}
+ const tools = setup.setupStatusSync(root);
+ for (const id of ['strudel', 'chrome', 'browser-harness', 'blender', 'blender-addons']) row(tools[id].ok || !['strudel', 'chrome'].includes(id) || tools.music.engine === 'none', id, tools[id].ok ? tools[id].detail : `${tools[id].detail} (mortiflix setup)`);
const extra = keys.sessionKeyNames(root);
row(true, 'session.env', extra.length ? `other keys for sessions: ${extra.join(', ')}` : 'no other keys (optional: mortiflix keys)');
}
@@ -289,11 +302,12 @@ function status(root, id) {
console.log(`${C.b(p.title)} ${C.dim(`${pipeline.name} · ${p.id}`)}`);
console.log(`${STATE_LABEL[p.state]}${p.status ? ` · ${p.status.text}` : ''}${p.needs_you ? `\n${C.red(`needs you: ${p.needs_you.text}`)}` : ''}\n`);
for (const s of gates.stepView(p, pipeline)) {
- const icon = { approved: C.green('✔'), done: C.green('✔'), in_review: C.acc('●'), changes: C.red('↺'), working: '…', ready: '○', blocked: C.dim('·') }[s.state];
+ const icon = { approved: C.green('✔'), done: C.green('✔'), skipped: C.dim('–'), in_review: C.acc('●'), changes: C.red('↺'), working: '…', ready: '○', blocked: C.dim('·') }[s.state];
console.log(`${icon} ${s.name.padEnd(16)} ${C.dim(s.state.replace('_', ' '))}${s.version ? C.dim(` v${s.version}`) : ''}`);
}
const usage = p.usage;
- console.log(C.dim(`\n${usage.sessions} session(s)${usage.cost_usd ? ` · $${usage.cost_usd}` : ''}${usage.output_tokens ? ` · ${usage.output_tokens.toLocaleString()} output tokens` : ''}`));
+ console.log(C.dim(`\n${usage.sessions} session(s)${usage.output_tokens ? ` · ${usage.output_tokens.toLocaleString()} output tokens` : ''}`));
+ if (costText(usage)) console.log(C.dim(costText(usage)));
console.log(C.dim('\nLog:'));
for (const e of readEvents(root, id, { limit: 12 })) console.log(C.dim(` ${e.t.slice(5, 16).replace('T', ' ')} ${e.event}${e.step ? ` ${e.step}${e.version ? ` v${e.version}` : ''}` : ''} ${e.details ? `· ${e.details.slice(0, 80)}` : ''}`));
}
@@ -499,6 +513,162 @@ async function keysCmd(root, [sub, name]) {
return keysWalk(root);
}
+// ---- setup ----
+
+async function confirm(question, yes = false) {
+ const v = (await prompterOnce(`${question} ${C.dim(yes ? '[Y/n]' : '[y/N]')} `)).trim().toLowerCase();
+ return v ? v.startsWith('y') : yes;
+}
+
+const PART_IDS = setup.PARTS.map((p) => p.id);
+
+function partHeader(part, i) {
+ console.log(`\n${C.acc(`${i + 1}/${setup.PARTS.length}`)} ${C.b(part.title)}`);
+ console.log(` ${part.why}`);
+ console.log(C.dim(` Needs: ${part.needs}`));
+}
+
+// Installs one tool after saying what it is, where it goes and how big it is.
+async function offerInstall(root, id, { ask = true } = {}) {
+ const info = setup.TOOL_INFO[id];
+ console.log(` ${C.b(info.name)}: ${info.what}. Goes to ${info.where} (${info.size}).`);
+ if (ask && !(await confirm(' Install it now?', true))) { console.log(C.dim(' Skipped.')); return false; }
+ const started = Date.now();
+ try {
+ const r = await setup.installTool(root, id, { log: (l) => console.log(C.dim(` ${l}`)) });
+ console.log(` ${r.problems ? C.acc('●') : C.green('✔')} ${info.name}: ${r.detail || 'installed'}${r.problems ? ` (${r.problems})` : ''} ${C.dim(`${Math.round((Date.now() - started) / 1000)} s`)}`);
+ return true;
+ } catch (e) {
+ console.log(C.red(` ✖ ${info.name}: ${e.message}`));
+ return false;
+ }
+}
+
+const mark = (ok) => (ok ? C.green('✔') : C.dim('·'));
+
+async function setupPart(root, id, st) {
+ if (id === 'claude') {
+ const config = loadConfig(root);
+ const cc = BACKENDS['claude-code'].available(config, root);
+ console.log(` ${mark(cc.ok)} Claude Code: ${cc.detail}`);
+ console.log(` ${mark(Boolean(keys.keySource(root, 'anthropic')))} Anthropic API key: ${keys.keySource(root, 'anthropic') || 'not set'}`);
+ console.log(` In use: ${C.b(config.backend)}`);
+ if (cc.ok && config.backend !== 'claude-code' && await confirm(' Use your Claude Code login (your plan pays)?', true)) saveConfig(root, { backend: 'claude-code' });
+ if (!cc.ok) {
+ console.log(C.dim(' Claude Code isn\'t installed: https://claude.com/claude-code (then run this again), or use an API key.'));
+ if (await confirm(' Use an Anthropic API key instead (you pay per token)?', true) && await askKey(root, 'anthropic', { required: true })) saveConfig(root, { backend: 'anthropic-api' });
+ }
+ return;
+ }
+ if (id === 'narration') {
+ const v = voice.voiceConfig(root);
+ const local = st.gpu;
+ console.log(` Now: ${C.b({ none: 'no narration', elevenlabs: 'ElevenLabs', qwen: 'Qwen3-TTS on this computer' }[v.engine])}`);
+ console.log(` 1. ElevenLabs: their voices, paid per character. Needs an API key.`);
+ console.log(` 2. This computer: Qwen3-TTS through ComfyUI, free and private. ${local.fits ? C.green(local.reason) : C.red(local.reason)}`);
+ console.log(' 3. No narration: on-screen text, music and sound.');
+ const pick = (await prompterOnce(` Which? ${C.dim(`[Enter keeps ${v.engine}]`)} `)).trim();
+ if (pick === '1') { await voiceCmd(root, ['elevenlabs']); }
+ else if (pick === '2') {
+ if (!local.fits) return console.log(C.red(' This machine can\'t run it: pick ElevenLabs or none.'));
+ if (!st.comfyui.ok) {
+ if (st.comfyui.installed) { console.log(' The studio\'s ComfyUI is installed but not running: starting it.'); setup.startComfy(root); }
+ else if (!(await offerInstall(root, 'comfyui'))) return;
+ }
+ await voiceCmd(root, ['local']);
+ } else if (pick === '3') { voice.saveVoice(root, { engine: 'none' }); console.log(' Narration off.'); }
+ return;
+ }
+ if (id === 'music') {
+ const m = setup.musicConfig(loadConfig(root));
+ if (!(await confirm(' Score your videos with original music (Strudel)?', m.engine !== 'none'))) { setup.saveMusic(root, { engine: 'none' }); return console.log(' No music: music steps are skipped.'); }
+ if (!st.strudel.ok) await offerInstall(root, 'strudel', { ask: false });
+ else console.log(` ${mark(true)} Strudel ${st.strudel.version}`);
+ if (!st.chrome.ok) await offerInstall(root, 'chrome');
+ else { console.log(` ${mark(true)} Renders in ${st.chrome.path}`); await setup.installTool(root, 'chrome'); }
+ console.log(C.dim(' The score is always rendered by Strudel and used in the video. A MIDI pack adds every part as MIDI, the stems'));
+ console.log(C.dim(' and a cue sheet (tempo, sections, hit points), for remaking the music in your own DAW.'));
+ const midi = await confirm(' Also deliver a MIDI pack with each video?', m.midi);
+ setup.saveMusic(root, { engine: 'strudel', midi });
+ return console.log(` ${C.green('✔')} Music: Strudel${midi ? ' + MIDI pack' : ''}.`);
+ }
+ if (id === 'assets') {
+ const cur = setup.assetsConfig(loadConfig(root)).sites;
+ if (cur.length) console.log(` Your sites now: ${cur.map((x) => x.url).join(', ')}`);
+ console.log(' If you have a website you use for assets, list it here, one per line (Enter when done).');
+ console.log(C.dim(' Without one, you won\'t get stock assets: sessions make every visual themselves.'));
+ const sites = [];
+ for (;;) {
+ const v = (await prompterOnce(` Site ${sites.length + 1}${cur.length && !sites.length ? C.dim(' (Enter keeps your list, - clears it)') : ''}: `)).trim();
+ if (!v) break;
+ if (v === '-') { sites.length = 0; setup.saveAssetSites(root, []); console.log(' Cleared.'); break; }
+ sites.push(v);
+ }
+ if (sites.length) {
+ try { setup.saveAssetSites(root, sites); } catch (e) { return console.log(C.red(` ✖ ${e.message}`)); }
+ }
+ const now = setup.assetsConfig(loadConfig(root)).sites;
+ if (!now.length) return console.log(' No asset sites.');
+ if (!st['browser-harness'].ok) { if (!(await offerInstall(root, 'browser-harness'))) return; }
+ else console.log(` ${mark(true)} browser-harness ${st['browser-harness'].detail}`);
+ const rec = setup.browserHarnessRecordings();
+ if (rec && /default/.test(rec)) {
+ console.log(C.dim(' browser-harness can save screenshots and action traces of what sessions do in the browser, on this machine'));
+ console.log(C.dim(' only (they may include what\'s on those pages), so you can see what happened later.'));
+ setup.browserHarnessRecordings(await confirm(' Keep local browser recordings?', false));
+ }
+ console.log(` ${C.green('✔')} Sessions will use ${now.map((x) => x.url).join(', ')} in your own Chrome.`);
+ console.log(C.dim(' Sign in to them in Chrome. The first time, Chrome may ask to allow remote debugging: chrome://inspect/#remote-debugging'));
+ return;
+ }
+ if (id === '3d') {
+ if (!(await confirm(' Set up 3D (Blender and the toolkits)?', st.blender.ok))) return console.log(C.dim(' Skipped: 2D only.'));
+ if (!st.blender.ok) { if (!(await offerInstall(root, 'blender'))) return; }
+ else { console.log(` ${mark(true)} ${st.blender.detail} (${st.blender.path})`); await setup.installTool(root, 'blender'); }
+ console.log(C.dim(' The toolkits go into the studio\'s own Blender profile: your personal Blender setup is never changed.'));
+ for (const t of setup.ADDONS) console.log(C.dim(` ${t.name}: ${t.about}`));
+ console.log(C.dim(' Nova FX, Mortiflix\'s own particle engine, builds on Linux only for now (it compiles its core with gcc).'));
+ if (st['blender-addons'].ok && !(await confirm(' They\'re installed. Update them?', false))) return;
+ await offerInstall(root, 'blender-addons', { ask: !st['blender-addons'].ok });
+ console.log(` Open it yourself with ${C.b('mortiflix blender')} (Camera Flight is in the 3D Viewport › N › Flight).`);
+ }
+}
+
+async function showSetup(root) {
+ const st = await setup.setupStatus(root);
+ const v = voice.voiceConfig(root);
+ const config = loadConfig(root);
+ const row = (ok, name, detail) => console.log(` ${ok === null ? C.dim('·') : ok ? C.green('✔') : C.red('✖')} ${name.padEnd(12)} ${detail}`);
+ console.log(C.b('Your studio'));
+ row(BACKENDS[config.backend].available(config, root).ok, 'Claude', `${config.backend}: ${BACKENDS[config.backend].available(config, root).detail}`);
+ row(v.engine === 'none' ? null : v.engine === 'elevenlabs' ? Boolean(voice.elevenKey(root)) && Boolean(v.elevenlabs.voice_id) : st.comfyui.ok, 'Narration',
+ v.engine === 'none' ? 'none' : v.engine === 'elevenlabs' ? `ElevenLabs: ${v.elevenlabs.voice_name || 'no voice chosen'} on ${v.elevenlabs.model_id}${voice.elevenKey(root) ? '' : ', key missing'}` : `this computer: ${st.comfyui.detail}`);
+ row(st.music.engine === 'none' ? null : st.strudel.ok && st.chrome.ok, 'Music', st.music.engine === 'none' ? 'none' : `Strudel: ${st.strudel.detail}; Chrome: ${st.chrome.ok ? 'found' : 'missing'}${st.music.midi ? '; MIDI pack on' : ''}`);
+ row(st.assets.sites.length ? st['browser-harness'].ok : null, 'Assets', st.assets.sites.length ? `${st.assets.sites.map((x) => x.url).join(', ')} (browser-harness ${st['browser-harness'].ok ? st['browser-harness'].detail : 'missing'})` : 'no sites: sessions make every visual themselves');
+ row(st.blender.ok ? st['blender-addons'].ok : null, '3D', st.blender.ok ? `${st.blender.detail}; ${st['blender-addons'].detail}` : 'not set up');
+}
+
+async function setupWalk(root, only = null) {
+ ensureStudio(root);
+ const parts = only ? setup.PARTS.filter((p) => p.id === only) : setup.PARTS;
+ for (const part of parts) {
+ partHeader(part, setup.PARTS.indexOf(part));
+ if (!only && !(await confirm(` Set up ${part.title.toLowerCase()} now?`, true))) { console.log(C.dim(' Skipped.')); continue; }
+ // One part failing (a service down, a refused key) never ends the whole walkthrough.
+ try { await setupPart(root, part.id, await setup.setupStatus(root)); }
+ catch (e) { console.log(C.red(` ✖ ${part.title}: ${e.message}`)); console.log(C.dim(` Try this part again with: mortiflix setup ${part.id}`)); }
+ }
+ console.log();
+ await showSetup(root);
+}
+
+async function setupCmd(root, [part], a) {
+ needStudio(root);
+ if (part === 'status' || !process.stdin.isTTY) return showSetup(root);
+ if (part && !PART_IDS.includes(part)) throw new Error(`mortiflix setup [${PART_IDS.join('|')}|status]`);
+ return setupWalk(root, part || null);
+}
+
// One visible line from the terminal (a fresh readline each time, so it can take turns with hiddenPrompt).
async function prompterOnce(question) {
const rl = prompter();
diff --git a/src/gates.mjs b/src/gates.mjs
index 6e975ed..cfbe5ce 100644
--- a/src/gates.mjs
+++ b/src/gates.mjs
@@ -11,7 +11,7 @@ import { paths, readJson, writeJson, withLock, isInside, UserError } from './stu
import { checksForStep, WORK_KINDS } from './pipelines.mjs';
import { projectPaths, projectPipeline, loadProject, update, event, safeName, now } from './projects.mjs';
-const DONE = ['approved', 'done'];
+const DONE = ['approved', 'done', 'skipped'];
const KINDS = {
image: ['.png', '.jpg', '.jpeg', '.webp', '.gif', '.svg', '.avif'],
video: ['.mp4', '.webm', '.mov', '.m4v'],
@@ -32,7 +32,9 @@ const refuse = (msg) => { throw new GateError(msg); };
// Each step's state. Stored: working, in_review, changes, approved, done. Otherwise derived: ready or blocked.
export function stepView(project, pipeline) {
const stored = project.steps || {};
- const finished = (k) => DONE.includes(stored[k]?.state);
+ const byKey = Object.fromEntries(pipeline.steps.map((s) => [s.key, s]));
+ // A skipped step counts as finished only once the steps it follows are: skipping never lets later work jump ahead.
+ const finished = (k) => DONE.includes(stored[k]?.state) && (stored[k].state !== 'skipped' || (byKey[k]?.after || []).every(finished));
return pipeline.steps.map((s) => {
const rec = stored[s.key] || {};
const state = rec.state || (s.after.every(finished) ? 'ready' : 'blocked');
diff --git a/src/keys.mjs b/src/keys.mjs
index 237a4e8..f7b1c00 100644
--- a/src/keys.mjs
+++ b/src/keys.mjs
@@ -98,7 +98,7 @@ export async function verifyKey(root, id, value, { fetch = globalThis.fetch } =
}
} catch (e) {
if (e.status === 401 && /permission/i.test(e.message)) return { ok: true, detail: 'it works, but can\'t read your plan (give the key the "User: read" permission to see credits here)' };
- if (e.status === 401 || e.status === 403) return { ok: false, detail: 'ElevenLabs refused it (check that you copied the whole key)' };
+ if (e.auth || e.status === 401 || e.status === 403) return { ok: false, detail: 'ElevenLabs refused it (check that you copied the whole key)' };
return { ok: null, detail: `couldn't check it (${e.message})` };
}
throw new UserError(`unknown key "${id}"`);
diff --git a/src/pipelines.mjs b/src/pipelines.mjs
index 6eb64ab..4f4b883 100644
--- a/src/pipelines.mjs
+++ b/src/pipelines.mjs
@@ -13,7 +13,9 @@ import { createHash } from 'node:crypto';
import { REPO, paths, readJson, UserError } from './studio.mjs';
export const REVIEW_MODES = ['questions', 'document', 'frames', 'video', 'audio', 'internal'];
-export const WORK_KINDS = ['script', 'stills', 'motion', 'audio'];
+export const WORK_KINDS = ['script', 'stills', 'motion', 'audio', 'music'];
+// A step with "when" runs only if the studio and the brief want it (otherwise it's skipped when the project starts).
+export const STEP_CONDITIONS = ['music'];
const KEY = /^[a-z0-9][a-z0-9_-]{0,47}$/;
export function builtInDir() {
@@ -68,6 +70,7 @@ export function validatePipeline(def, dir) {
keys.add(s.key);
need(REVIEW_MODES.includes(s.review), `step "${s.key}": review must be one of ${REVIEW_MODES.join(', ')}`);
for (const w of s.work || []) need(WORK_KINDS.includes(w), `step "${s.key}": work "${w}" must be one of ${WORK_KINDS.join(', ')}`);
+ if (s.when !== undefined) need(STEP_CONDITIONS.includes(s.when), `step "${s.key}": "when" must be one of ${STEP_CONDITIONS.join(', ')}`);
}
for (const s of steps) for (const a of s.after || []) need(keys.has(a), `step "${s.key}" runs after unknown step "${a}"`);
if (errors.length === 0 && hasCycle(steps)) errors.push('the steps wait on each other in a loop');
@@ -118,6 +121,7 @@ function normalize(def, dir) {
work: s.work || [],
delivers: Boolean(s.delivers),
describe: s.describe || '',
+ ...(s.when ? { when: s.when } : {}),
}));
const last = steps[steps.length - 1];
if (!steps.some((s) => s.delivers) && last.review !== 'internal') last.delivers = true;
diff --git a/src/projects.mjs b/src/projects.mjs
index 3d93881..3ac8c3e 100644
--- a/src/projects.mjs
+++ b/src/projects.mjs
@@ -7,7 +7,8 @@ import { existsSync, mkdirSync, readdirSync, appendFileSync, readFileSync, write
import { join, basename, extname } from 'node:path';
import { randomBytes } from 'node:crypto';
import { pipeline as streamPipeline } from 'node:stream/promises';
-import { paths, readJson, writeJson, withLock, UserError } from './studio.mjs';
+import { paths, readJson, writeJson, withLock, UserError, loadConfig } from './studio.mjs';
+import { musicConfig } from './setup.mjs';
import { findPipeline, loadPipeline, snapshotPipeline } from './pipelines.mjs';
export const STATES = ['draft', 'queued', 'waiting', 'paused', 'delivered', 'cancelled'];
@@ -104,6 +105,11 @@ export function startProject(root, id) {
const ok = q.type === 'files' ? p.intake.files.some((f) => f.field === q.id) : Boolean(p.intake.answers[q.id]);
if (!ok) throw new UserError(`"${q.label || q.id}" is required`);
}
+ // Steps that only run when wanted: music needs the studio's music on and a brief that doesn't say "no music".
+ const noMusic = musicConfig(loadConfig(root)).engine === 'none' || /^\s*(no|none|off)\b/i.test(String(p.intake.answers.music ?? ''));
+ for (const s of pipeline.steps) {
+ if (s.when === 'music' && noMusic) { p.steps ||= {}; p.steps[s.key] = { state: 'skipped' }; }
+ }
p.state = 'queued';
p.queued_at = now();
});
diff --git a/src/runner.mjs b/src/runner.mjs
index af4f90d..7fe3f3c 100644
--- a/src/runner.mjs
+++ b/src/runner.mjs
@@ -5,6 +5,7 @@ import { mkdirSync, rmSync, writeFileSync, readFileSync, existsSync, appendFileS
import { join } from 'node:path';
import { REPO, paths, loadConfig, readSessionEnv } from './studio.mjs';
import { sessionVoiceEnv } from './voice/index.mjs';
+import { sessionToolsEnv } from './setup.mjs';
import { listProjects, loadProject, projectPaths, projectPipeline, update, event, readEvents, now } from './projects.mjs';
import { settle, needsYou } from './gates.mjs';
import { projectMissingKeys, missingKeysText } from './keys.mjs';
@@ -132,8 +133,9 @@ export class Runner extends EventEmitter {
prepareWorkdir(root, projectId);
mkdirSync(join(paths(root).run, 'shared'), { recursive: true });
writeTorch(root, projectId, { backend: config.backend, reason });
- // Keys and settings for the session: session.env, then the studio's voice (its key only if it narrates with it).
- const sessionEnv = { ...readSessionEnv(root), ...sessionVoiceEnv(root), MFX_HOME: REPO };
+ // Keys and settings for the session: session.env, the studio's voice (its key only if it narrates with it), and the
+ // tools setup installed (Strudel, Chrome, the studio's Blender) with the owner's music and asset choices.
+ const sessionEnv = { ...readSessionEnv(root), ...sessionVoiceEnv(root), ...sessionToolsEnv(root), MFX_HOME: REPO };
bridge = await openBridge({ root, projectId, sessionId, workdir: pp.work, renders: this.renders, sessionEnv });
this.addActivity(projectId, { kind: 'info', text: `Session started (${config.backend}). ${reason}` });
result = await backend.run({
@@ -166,7 +168,11 @@ export class Runner extends EventEmitter {
p.usage.sessions += 1;
p.usage.input_tokens += result?.usage?.input_tokens || 0;
p.usage.output_tokens += result?.usage?.output_tokens || 0;
- if (result?.cost_usd) p.usage.cost_usd = Math.round(((p.usage.cost_usd || 0) + result.cost_usd) * 10000) / 10000;
+ if (result?.cost_usd) {
+ p.usage.cost_usd = Math.round(((p.usage.cost_usd || 0) + result.cost_usd) * 10000) / 10000;
+ // On a Claude plan the reported cost is list price, not a charge: keep that part apart so it's never shown as spend.
+ if (result.billing === 'plan') p.usage.plan_usd = Math.round(((p.usage.plan_usd || 0) + result.cost_usd) * 10000) / 10000;
+ }
p.no_progress = progressed ? 0 : (p.no_progress || 0) + 1;
p.without_gate = gated ? 0 : (p.without_gate || 0) + 1;
if (p.status?.key === '_render') p.status = null;
diff --git a/src/setup.mjs b/src/setup.mjs
new file mode 100644
index 0000000..2cfcf04
--- /dev/null
+++ b/src/setup.mjs
@@ -0,0 +1,569 @@
+// Setup: the applications a studio can use, why each one is needed, whether it's here, and how to install it.
+// Everything installs into the studio folder (<studio>/tools/) or as the user's own tool (uv), never system-wide,
+// and nothing installs without being asked. The choices (music, asset sites) live in config.json.
+//
+// strudel Strudel (AGPL, npm) for the music step: it writes and renders the score
+// chrome a headless Chrome that Strudel renders in (an existing Chrome/Chromium is reused)
+// browser-harness browser-use's browser-harness: sessions use your own Chrome to get assets from sites you name
+// comfyui ComfyUI + the TTS Audio Suite, for narration on your own graphics card (Qwen3-TTS)
+// blender Blender, for 3D work
+// blender-addons the 3D toolkits (MoBlend, Nova FX, Camera, Animate, Math, Circuits, Camera Flight), installed into
+// the studio's own Blender profile (tools/blender-profile), never into your personal Blender setup
+import { spawn, spawnSync } from 'node:child_process';
+import { existsSync, mkdirSync, readdirSync, writeFileSync, readFileSync, rmSync, createWriteStream, statSync } from 'node:fs';
+import { join, dirname } from 'node:path';
+import { homedir, platform, arch, tmpdir } from 'node:os';
+import { Readable } from 'node:stream';
+import { pipeline as streamPipeline } from 'node:stream/promises';
+import { loadConfig, saveConfig, UserError } from './studio.mjs';
+import { voiceConfig } from './voice/index.mjs';
+import * as qwen from './voice/qwen.mjs';
+
+export const STRUDEL_VERSION = '1.3.0';
+const OS = platform();
+export const REPO_ROOT = join(dirname(new URL(import.meta.url).pathname), '..');
+const EXE = OS === 'win32' ? '.exe' : '';
+
+export const toolsDir = (root) => join(root, 'tools');
+
+// ---- the parts of setup, in the order the walkthrough takes them ----
+
+export const PARTS = [
+ {
+ id: 'claude',
+ title: 'Claude',
+ why: 'Claude does the work: it writes, designs, animates and checks every step. Mortiflix is the studio around it.',
+ needs: 'Your Claude Code login (your plan pays), or an Anthropic API key (you pay per token).',
+ },
+ {
+ id: 'narration',
+ title: 'Narration',
+ why: 'A voice reads the script, and the animation is timed to its words.',
+ needs: 'Either an ElevenLabs API key (their voices, paid per character), or ComfyUI with Qwen3-TTS on your own NVIDIA graphics card (free and private, about 10 GB to install), or no narration.',
+ },
+ {
+ id: 'music',
+ title: 'Music',
+ why: 'After you approve the animatic, the studio scores it: a blueprint, a story, builds and hits placed on the video\'s own timing, written in Strudel and rendered to audio.',
+ needs: 'Strudel (about 20 MB) and a headless Chrome to render in (your Chrome is reused if you have one). Optional: a MIDI pack of every part, to remake the music in your own DAW.',
+ tools: ['strudel', 'chrome'],
+ },
+ {
+ id: 'assets',
+ title: 'Assets',
+ why: 'If you use a stock site (footage, images, 3D models, sound effects), sessions can search it and download what fits, with your own login, in your own Chrome.',
+ needs: 'browser-harness (from browser-use on GitHub, installed with uv) and the addresses of the sites you use.',
+ tools: ['browser-harness'],
+ },
+ {
+ id: '3d',
+ title: '3D',
+ why: 'Pipelines that build 3D scenes (product shots, music videos, models) render them in Blender.',
+ needs: 'Blender (about 350 MB, the official build for your system) and the 3D toolkits: MoBlend (MoGraph), Nova FX (particles, fire, fireworks), Camera, Animate, Math, Circuits, and Camera Flight for flying the camera yourself. Skip it if you only make 2D videos.',
+ tools: ['blender', 'blender-addons'],
+ },
+];
+
+// ---- running things ----
+
+function which(bin) {
+ const r = spawnSync(OS === 'win32' ? 'where' : 'sh', OS === 'win32' ? [bin] : ['-c', `command -v ${bin}`], { encoding: 'utf8' });
+ return r.status === 0 ? r.stdout.split(/\r?\n/)[0].trim() || null : null;
+}
+
+function version(bin, args = ['--version']) {
+ const r = spawnSync(bin, args, { encoding: 'utf8', timeout: 20_000 });
+ return r.status === 0 ? (r.stdout || r.stderr).split('\n')[0].trim() : null;
+}
+
+// A command whose output streams to `log`, line by line. Rejects on a non-zero exit.
+export function run(cmd, args, { cwd, env, log = () => {} } = {}) {
+ return new Promise((ok, fail) => {
+ log(`$ ${[cmd, ...args].join(' ')}`);
+ const p = spawn(cmd, args, { cwd, env: { ...process.env, ...env }, stdio: ['ignore', 'pipe', 'pipe'], shell: OS === 'win32' });
+ let tail = '';
+ const onData = (d) => {
+ const s = String(d);
+ tail = (tail + s).slice(-2000);
+ for (const line of s.split(/\r?\n|\r/)) if (line.trim()) log(` ${line.trimEnd().slice(0, 300)}`);
+ };
+ p.stdout.on('data', onData);
+ p.stderr.on('data', onData);
+ p.on('error', (e) => fail(new Error(`${cmd}: ${e.message}`)));
+ p.on('close', (code) => (code === 0 ? ok(tail) : fail(new Error(`${cmd} exited with ${code}: ${tail.trim().split('\n').slice(-3).join(' / ')}`))));
+ });
+}
+
+async function download(url, file, log) {
+ log(`Downloading ${url}`);
+ const res = await fetch(url);
+ if (!res.ok) throw new Error(`download failed: ${res.status} ${url}`);
+ const total = Number(res.headers.get('content-length')) || 0;
+ let got = 0; let shown = 0;
+ const counted = Readable.fromWeb(res.body).on('data', (c) => {
+ got += c.length;
+ if (total && got - shown > total / 10) { shown = got; log(` ${Math.round((got / total) * 100)}% of ${(total / 1e6).toFixed(0)} MB`); }
+ });
+ mkdirSync(dirname(file), { recursive: true });
+ await streamPipeline(counted, createWriteStream(file));
+ return file;
+}
+
+// ---- detecting each tool ----
+
+function strudelStatus(root) {
+ const dir = join(toolsDir(root), 'strudel');
+ const pkg = join(dir, 'node_modules', '@strudel', 'web', 'package.json');
+ if (!existsSync(pkg)) return { ok: false, detail: 'not installed' };
+ return { ok: true, path: dir, version: JSON.parse(readFileSync(pkg, 'utf8')).version, detail: `Strudel ${JSON.parse(readFileSync(pkg, 'utf8')).version}` };
+}
+
+function chromeCandidates(root) {
+ const out = [];
+ const headless = join(toolsDir(root), 'browsers', 'chrome-headless-shell');
+ if (existsSync(headless)) {
+ for (const ver of readdirSync(headless)) {
+ for (const d of readdirSync(join(headless, ver))) out.push(join(headless, ver, d, `chrome-headless-shell${EXE}`));
+ }
+ }
+ if (OS === 'darwin') out.push('/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', '/Applications/Chromium.app/Contents/MacOS/Chromium');
+ else if (OS === 'win32') {
+ for (const base of [process.env.PROGRAMFILES, process.env['PROGRAMFILES(X86)'], process.env.LOCALAPPDATA].filter(Boolean)) out.push(join(base, 'Google', 'Chrome', 'Application', 'chrome.exe'));
+ } else for (const b of ['google-chrome-stable', 'google-chrome', 'chromium', 'chromium-browser']) { const p = which(b); if (p) out.push(p); }
+ return out;
+}
+
+function chromeStatus(root) {
+ const saved = loadConfig(root).tools?.chrome;
+ const found = [saved, ...chromeCandidates(root)].filter(Boolean).find((p) => existsSync(p));
+ return found ? { ok: true, path: found, detail: found } : { ok: false, detail: 'no Chrome or Chromium found' };
+}
+
+const UV_PLACES = () => [which('uv'), join(homedir(), '.local', 'bin', `uv${EXE}`), join(homedir(), '.cargo', 'bin', `uv${EXE}`)];
+const findUv = () => UV_PLACES().filter(Boolean).find((p) => existsSync(p)) || null;
+const BH_PLACES = () => [which('browser-harness'), join(homedir(), '.local', 'bin', `browser-harness${EXE}`)];
+export const findBrowserHarness = () => BH_PLACES().filter(Boolean).find((p) => existsSync(p)) || null;
+
+function browserHarnessStatus() {
+ const bin = findBrowserHarness();
+ if (!bin) return { ok: false, detail: 'not installed' };
+ return { ok: true, path: bin, detail: version(bin) || 'installed' };
+}
+
+function blenderCandidates(root) {
+ const out = [loadConfig(root).tools?.blender];
+ const mine = join(toolsDir(root), 'blender');
+ if (existsSync(mine)) for (const d of readdirSync(mine)) out.push(join(mine, d, OS === 'darwin' ? 'Blender.app/Contents/MacOS/Blender' : `blender${EXE}`));
+ out.push(which('blender'));
+ if (OS === 'darwin') out.push('/Applications/Blender.app/Contents/MacOS/Blender');
+ if (OS === 'win32' && process.env.PROGRAMFILES) {
+ const base = join(process.env.PROGRAMFILES, 'Blender Foundation');
+ if (existsSync(base)) for (const d of readdirSync(base)) out.push(join(base, d, 'blender.exe'));
+ }
+ return out.filter(Boolean);
+}
+
+function blenderStatus(root) {
+ const bin = blenderCandidates(root).find((p) => existsSync(p));
+ if (!bin) return { ok: false, detail: 'not installed' };
+ return { ok: true, path: bin, detail: version(bin, ['--version'])?.replace(/\s+/g, ' ') || bin };
+}
+
+async function comfyStatus(root) {
+ const url = voiceConfig(root).qwen.url;
+ const ws = join(toolsDir(root), 'ComfyUI');
+ let live = null;
+ try { live = await new qwen.ComfyUI({ url }).status(); } catch { /* not reachable */ }
+ if (live?.ok) return { ok: true, detail: `ComfyUI at ${url} with the TTS Audio Suite`, url };
+ if (live && !live.ok && live.comfyui) return { ok: false, detail: `ComfyUI is running at ${url} but the TTS Audio Suite isn't installed`, url, running: true };
+ if (existsSync(join(ws, 'main.py'))) return { ok: false, installed: true, path: ws, detail: `installed in ${ws}, not running` };
+ return { ok: false, detail: 'not installed' };
+}
+
+// Everything at once, for the walkthrough, doctor, the web page and the session brief.
+export async function setupStatus(root) {
+ const config = loadConfig(root);
+ return {
+ strudel: strudelStatus(root),
+ chrome: chromeStatus(root),
+ 'browser-harness': browserHarnessStatus(),
+ comfyui: await comfyStatus(root),
+ blender: blenderStatus(root),
+ 'blender-addons': addonsStatus(root),
+ music: musicConfig(config),
+ assets: assetsConfig(config),
+ gpu: qwen.recommend(qwen.detectGpus()),
+ };
+}
+
+// ---- the choices ----
+
+export function musicConfig(config) {
+ const m = config.music || {};
+ return { engine: m.engine === 'none' ? 'none' : 'strudel', midi: Boolean(m.midi) };
+}
+
+export function saveMusic(root, { engine, midi } = {}) {
+ const cur = musicConfig(loadConfig(root));
+ if (engine !== undefined && !['strudel', 'none'].includes(engine)) throw new UserError('music engine: strudel or none');
+ saveConfig(root, { music: { engine: engine ?? cur.engine, midi: midi === undefined ? cur.midi : Boolean(midi) } });
+ return musicConfig(loadConfig(root));
+}
+
+export function assetsConfig(config) {
+ return { sites: (config.assets?.sites || []).filter((s) => s && s.url) };
+}
+
+// Sites are addresses the owner uses for assets. Only http(s), no credentials in the address.
+export function saveAssetSites(root, sites) {
+ const clean = [];
+ for (const s of Array.isArray(sites) ? sites : []) {
+ const raw = String(typeof s === 'string' ? s : s?.url || '').trim();
+ if (!raw) continue;
+ if (/^[a-z][a-z0-9+.-]*:\/\//i.test(raw) && !/^https?:\/\//i.test(raw)) throw new UserError(`"${raw}": only http and https addresses`);
+ let u;
+ try { u = new URL(/^https?:\/\//i.test(raw) ? raw : `https://${raw}`); } catch { throw new UserError(`"${raw}" isn't a web address`); }
+ if (!['http:', 'https:'].includes(u.protocol)) throw new UserError(`"${raw}": only http and https addresses`);
+ if (u.username || u.password) throw new UserError('leave logins out of the address: sessions use your own browser, where you\'re already signed in');
+ const notes = String(typeof s === 'object' ? s.notes || '' : '').slice(0, 300);
+ if (!clean.some((c) => c.url === u.origin + u.pathname.replace(/\/$/, ''))) clean.push({ url: u.origin + u.pathname.replace(/\/$/, ''), notes });
+ }
+ saveConfig(root, { assets: { sites: clean.slice(0, 20) } });
+ return assetsConfig(loadConfig(root));
+}
+
+function saveToolPath(root, key, path) {
+ const tools = { ...(loadConfig(root).tools || {}) };
+ if (path) tools[key] = path; else delete tools[key];
+ saveConfig(root, { tools });
+}
+
+// ---- installing ----
+
+async function installStrudel(root, log) {
+ const dir = join(toolsDir(root), 'strudel');
+ mkdirSync(dir, { recursive: true });
+ writeFileSync(join(dir, 'package.json'), JSON.stringify({ name: 'mortiflix-strudel', private: true, license: 'AGPL-3.0-or-later', dependencies: { '@strudel/web': STRUDEL_VERSION } }, null, 2) + '\n');
+ await run(OS === 'win32' ? 'npm.cmd' : 'npm', ['install', '--no-audit', '--no-fund', '--loglevel=error'], { cwd: dir, log });
+ const s = strudelStatus(root);
+ if (!s.ok) throw new Error('npm finished but @strudel/web is missing');
+ return s;
+}
+
+async function installChrome(root, log) {
+ const have = chromeStatus(root);
+ if (have.ok) { log(`Using ${have.path}`); saveToolPath(root, 'chrome', have.path); return have; }
+ const dir = join(toolsDir(root), 'browsers');
+ await run(OS === 'win32' ? 'npx.cmd' : 'npx', ['--yes', '@puppeteer/browsers', 'install', 'chrome-headless-shell@stable', '--path', dir], { log });
+ const s = chromeStatus(root);
+ if (!s.ok) throw new Error('the headless Chrome download finished but no executable was found');
+ saveToolPath(root, 'chrome', s.path);
+ return s;
+}
+
+async function ensureUv(log) {
+ const have = findUv();
+ if (have) return have;
+ log('Installing uv (Astral\'s Python tool manager) for your user: https://docs.astral.sh/uv/');
+ if (OS === 'win32') await run('powershell', ['-ExecutionPolicy', 'ByPass', '-c', 'irm https://astral.sh/uv/install.ps1 | iex'], { log });
+ else await run('sh', ['-c', 'curl -LsSf https://astral.sh/uv/install.sh | sh'], { log });
+ const uv = findUv();
+ if (!uv) throw new Error('uv installed but wasn\'t found in ~/.local/bin: open a new terminal and run setup again');
+ return uv;
+}
+
+async function installBrowserHarness(root, log) {
+ const uv = await ensureUv(log);
+ await run(uv, ['tool', 'install', '--python', '3.12', '--upgrade', '--force', 'browser-harness'], { log });
+ const bin = findBrowserHarness();
+ if (!bin) throw new Error('browser-harness installed but wasn\'t found (is ~/.local/bin on your PATH?)');
+ // Its own skill text, so sessions learn it from the source (refreshed on every install).
+ const r = spawnSync(bin, ['skill'], { encoding: 'utf8', timeout: 30_000 });
+ if (r.status === 0 && r.stdout.trim()) {
+ mkdirSync(join(toolsDir(root), 'browser-harness'), { recursive: true });
+ writeFileSync(join(toolsDir(root), 'browser-harness', 'SKILL.md'), r.stdout);
+ }
+ return browserHarnessStatus();
+}
+
+export function browserHarnessRecordings(choice) {
+ const bin = findBrowserHarness();
+ if (!bin) return null;
+ if (choice === undefined) return (spawnSync(bin, ['recordings'], { encoding: 'utf8' }).stdout || '').trim();
+ return spawnSync(bin, ['recordings', choice ? 'enable' : 'disable'], { encoding: 'utf8' }).status === 0;
+}
+
+// The newest Blender release for this system, from download.blender.org.
+export async function latestBlender({ fetchImpl = fetch } = {}) {
+ const base = 'https://download.blender.org/release/';
+ const index = await (await fetchImpl(base)).text();
+ const series = [...index.matchAll(/href="Blender(\d+)\.(\d+)\/"/g)].map((m) => [Number(m[1]), Number(m[2])]).sort((a, b) => b[0] - a[0] || b[1] - a[1]);
+ const want = OS === 'darwin' ? `macos-${arch() === 'arm64' ? 'arm64' : 'x64'}\\.dmg` : OS === 'win32' ? `windows-${arch() === 'arm64' ? 'arm64' : 'x64'}\\.zip` : `linux-${arch() === 'arm64' ? 'arm64' : 'x64'}\\.tar\\.xz`;
+ for (const [maj, min] of series.slice(0, 4)) {
+ const dir = `${base}Blender${maj}.${min}/`;
+ const list = await (await fetchImpl(dir)).text();
+ const files = [...list.matchAll(new RegExp(`href="(blender-(\\d+)\\.(\\d+)\\.(\\d+)-${want})"`, 'g'))].sort((a, b) => Number(b[4]) - Number(a[4]));
+ if (files.length) return { version: `${files[0][2]}.${files[0][3]}.${files[0][4]}`, url: dir + files[0][1], file: files[0][1] };
+ }
+ throw new Error(`no Blender build found for ${OS} ${arch()} at ${base}`);
+}
+
+async function installBlender(root, log) {
+ const have = blenderStatus(root);
+ if (have.ok) { log(`Using ${have.path} (${have.detail})`); saveToolPath(root, 'blender', have.path); return have; }
+ const rel = await latestBlender();
+ log(`Blender ${rel.version} for ${OS} ${arch()}`);
+ const dest = join(toolsDir(root), 'blender');
+ const file = await download(rel.url, join(toolsDir(root), 'downloads', rel.file), log);
+ mkdirSync(dest, { recursive: true });
+ if (OS === 'darwin') {
+ const mnt = join(tmpdir(), `mfx-blender-${process.pid}`);
+ await run('hdiutil', ['attach', '-nobrowse', '-readonly', '-mountpoint', mnt, file], { log });
+ try { mkdirSync(join(dest, rel.version), { recursive: true }); await run('cp', ['-R', join(mnt, 'Blender.app'), join(dest, rel.version)], { log }); }
+ finally { await run('hdiutil', ['detach', mnt], { log }).catch(() => {}); }
+ } else {
+ await run('tar', [OS === 'win32' ? '-xf' : '-xJf', file, '-C', dest], { log });
+ }
+ rmSync(file, { force: true });
+ const s = blenderStatus(root);
+ if (!s.ok) throw new Error('Blender unpacked but its executable wasn\'t found');
+ saveToolPath(root, 'blender', s.path);
+ return s;
+}
+
+// ComfyUI + the TTS Audio Suite, in its own Python environment inside the studio. NVIDIA only (that's what Qwen3-TTS
+// needs here). Large: PyTorch with CUDA is several GB.
+async function installComfy(root, log) {
+ const gpu = qwen.recommend(qwen.detectGpus());
+ if (!gpu.fits) throw new UserError(`Local narration needs an NVIDIA graphics card with 4 GB or more: ${gpu.reason} Use ElevenLabs instead.`);
+ if (!which('git')) throw new UserError('ComfyUI is installed with git, which isn\'t on this machine: install git first.');
+ const uv = await ensureUv(log);
+ const ws = join(toolsDir(root), 'ComfyUI');
+ if (!existsSync(join(ws, 'main.py'))) await run('git', ['clone', '--depth', '1', 'https://github.com/comfyanonymous/ComfyUI', ws], { log });
+ const py = join(ws, '.venv', OS === 'win32' ? 'Scripts/python.exe' : 'bin/python');
+ if (!existsSync(py)) await run(uv, ['venv', '--python', '3.12', join(ws, '.venv')], { log });
+ await run(uv, ['pip', 'install', '--python', py, 'torch', 'torchvision', 'torchaudio', '--index-url', 'https://download.pytorch.org/whl/cu128'], { log });
+ await run(uv, ['pip', 'install', '--python', py, '-r', join(ws, 'requirements.txt')], { log });
+ const suite = join(ws, 'custom_nodes', 'TTS-Audio-Suite');
+ if (!existsSync(suite)) await run('git', ['clone', '--depth', '1', 'https://github.com/diodiogod/TTS-Audio-Suite', suite], { log });
+ if (existsSync(join(suite, 'install.py'))) await run(py, [join(suite, 'install.py')], { cwd: suite, log });
+ else await run(uv, ['pip', 'install', '--python', py, '-r', join(suite, 'requirements.txt')], { log });
+ log('Installed. Starting it now (it listens on 127.0.0.1:8188).');
+ startComfy(root);
+ return { ok: true, path: ws, detail: `installed in ${ws}` };
+}
+
+// Starts the studio's own ComfyUI in the background (logs to tools/ComfyUI/comfyui.log).
+export function startComfy(root) {
+ const ws = join(toolsDir(root), 'ComfyUI');
+ const py = join(ws, '.venv', OS === 'win32' ? 'Scripts/python.exe' : 'bin/python');
+ if (!existsSync(py)) throw new UserError('the studio\'s ComfyUI isn\'t installed (mortiflix setup narration)');
+ const port = Number(new URL(voiceConfig(root).qwen.url).port || 8188);
+ const out = createWriteStream(join(ws, 'comfyui.log'), { flags: 'a' });
+ const p = spawn(py, [join(ws, 'main.py'), '--listen', '127.0.0.1', '--port', String(port)], { cwd: ws, detached: true, stdio: ['ignore', 'pipe', 'pipe'] });
+ p.stdout.pipe(out); p.stderr.pipe(out);
+ p.unref();
+ return { pid: p.pid, log: join(ws, 'comfyui.log') };
+}
+
+// ---- the 3D toolkits ----
+
+// Each is a Blender extension, from its own repository (GPL-3.0) or vendored here (Nova FX). `kit` is how a session
+// calls it inside Blender (see the blender-3d skill); `owner` ones are for you, in `mortiflix blender`.
+export const ADDONS = [
+ { id: 'moblend', name: 'MoBlend', about: 'MoGraph: cloners, effectors, fields, MoText, fracture', repo: 'GTKottman/moblend', dir: 'moblend', kit: 'mograph' },
+ { id: 'nova_fx', name: 'Nova FX', about: 'Mortiflix\'s own particle engine: particles, fire, sparks and fireworks (Linux only for now)', vendored: 'vendor/nova-fx', dir: 'addon/nova_fx', kit: 'particles', stage: { from: 'core', to: 'lib', files: ['nova_core.c', 'gpu_vk.c', 'nova_params.h', 'shaders_spv.h'] } },
+ { id: 'blender_cam_mcp', name: 'Camera', about: 'framing, shot presets, camera moves, shake, cuts, contact sheets', repo: 'GTKottman/Blender-Cam', build: 'scripts/build_addon.py', zip: 'dist/blender_cam_mcp.zip', kit: 'camera', skills: ['skills/blender-camera-director'] },
+ { id: 'blender_animate', name: 'Animate', about: 'easing, springs, paths and motion analysis', repo: 'GTKottman/Blender-Animate', build: 'scripts/build_addon.py', zip: 'dist/blender_animate.zip', kit: 'animate', skills: ['skills/blender-animate'] },
+ { id: 'blender_math_bridge', name: 'Math', about: 'LaTeX and exact math, drawn in 3D', repo: 'GTKottman/Blender-Math', build: 'scripts/build_addon.py', zip: 'dist/blender_math_bridge.zip', kit: 'math', skills: ['.claude/skills/blender-math'] },
+ { id: 'circuit_lab', name: 'Circuits', about: 'circuit design, simulation and electron-flow animation', repo: 'GTKottman/Blender-Circuits', build: 'build_addon.py', zip: 'dist/blender_circuits.zip', kit: 'circuits', skills: ['.claude/skills/circuit-explainer-video'] },
+ { id: 'camera_flight', name: 'Camera Flight', about: 'fly the camera like a game and record takes (for you, in `mortiflix blender`)', repo: 'GTKottman/boender-camera-flight', build: 'build.py', zipGlob: /^camera_flight-.*\.zip$/, owner: true },
+];
+
+export const blenderProfile = (root) => join(toolsDir(root), 'blender-profile');
+export const blenderEnv = (root) => ({ BLENDER_USER_RESOURCES: blenderProfile(root) });
+
+function addonsStatus(root) {
+ const dir = join(blenderProfile(root), 'extensions', 'user_default');
+ const have = existsSync(dir) ? readdirSync(dir) : [];
+ const missing = ADDONS.filter((a) => !have.includes(a.id));
+ if (!have.length) return { ok: false, detail: 'not installed', installed: [] };
+ return { ok: !missing.length, installed: ADDONS.filter((a) => have.includes(a.id)).map((a) => a.id), detail: missing.length ? `missing ${missing.map((a) => a.name).join(', ')}` : `${ADDONS.length} toolkits in the studio's Blender` };
+}
+
+async function blenderPython(bin) {
+ const r = spawnSync(bin, ['-b', '--factory-startup', '--python-expr', 'import sys; print("MFXPY=" + sys.executable)'], { encoding: 'utf8', timeout: 120_000 });
+ const py = /MFXPY=(.+)/.exec(r.stdout || '')?.[1]?.trim();
+ if (!py || !existsSync(py)) throw new Error('couldn\'t find the Python inside Blender');
+ return py;
+}
+
+// A repository's default branch, unpacked under tools/blender-addons/src/<name> (replaced on every install).
+async function fetchRepo(root, repo, log) {
+ const name = repo.split('/')[1];
+ const dest = join(toolsDir(root), 'blender-addons', 'src', name);
+ const tgz = await download(`https://codeload.github.com/${repo}/tar.gz/HEAD`, join(toolsDir(root), 'downloads', `${name}.tar.gz`), log);
+ rmSync(dest, { recursive: true, force: true });
+ mkdirSync(dest, { recursive: true });
+ await run('tar', ['-xzf', tgz, '-C', dest, '--strip-components=1'], { log });
+ rmSync(tgz, { force: true });
+ return dest;
+}
+
+// zip `dir` as <out>, with the folder itself at the top (what Blender's install-file expects).
+async function zipDir(py, dir, out, log) {
+ const code = `import shutil,os; shutil.make_archive(${JSON.stringify(out.replace(/\.zip$/, ''))},'zip',${JSON.stringify(dirname(dir))},${JSON.stringify(dir.split(/[\\/]/).pop())})`;
+ await run(py, ['-c', code], { log });
+ return out;
+}
+
+async function installAddons(root, log) {
+ const b = blenderStatus(root);
+ if (!b.ok) throw new UserError('Blender comes first: install it in this step (mortiflix setup 3d).');
+ const py = await blenderPython(b.path);
+ // A clean profile: factory preferences, so nothing from your own Blender setup comes along.
+ if (!existsSync(join(blenderProfile(root), 'config', 'userpref.blend'))) {
+ await run(b.path, ['-b', '--factory-startup', '--python-expr', 'import bpy; bpy.ops.wm.save_userpref()'], { env: blenderEnv(root), log });
+ }
+ const built = join(toolsDir(root), 'blender-addons', 'zips');
+ mkdirSync(built, { recursive: true });
+ const skillsDir = join(toolsDir(root), 'blender-addons', 'skills');
+ const docsDir = join(toolsDir(root), 'blender-addons', 'docs');
+ mkdirSync(docsDir, { recursive: true });
+ const keepDoc = (from, kit) => { if (kit && existsSync(from)) writeFileSync(join(docsDir, `${kit}.md`), readFileSync(from, 'utf8')); };
+ const done = [];
+ for (const a of ADDONS) {
+ log(`\n${a.name}: ${a.about}`);
+ let zip;
+ if (a.vendored) {
+ const stage = join(toolsDir(root), 'blender-addons', 'stage', a.id);
+ rmSync(stage, { recursive: true, force: true });
+ const src = join(REPO_ROOT, a.vendored);
+ const { cpSync, copyFileSync } = await import('node:fs');
+ cpSync(join(src, a.dir), join(stage, a.id), { recursive: true });
+ if (a.stage) {
+ mkdirSync(join(stage, a.id, a.stage.to), { recursive: true });
+ for (const f of a.stage.files) copyFileSync(join(src, a.stage.from, f), join(stage, a.id, a.stage.to, f));
+ }
+ zip = await zipDir(py, join(stage, a.id), join(built, `${a.id}.zip`), log);
+ keepDoc(join(src, 'README.md'), a.kit);
+ } else {
+ const repo = await fetchRepo(root, a.repo, log);
+ keepDoc(join(repo, 'README.md'), a.kit);
+ if (a.build) {
+ await run(py, [join(repo, a.build)], { cwd: repo, log });
+ const found = a.zip ? join(repo, a.zip) : (() => { const d = join(repo, 'dist'); const f = existsSync(d) ? readdirSync(d).filter((x) => a.zipGlob.test(x)).sort().pop() : null; return f ? join(d, f) : null; })();
+ if (!found || !existsSync(found)) throw new Error(`${a.name}: its build script didn't produce ${a.zip || 'a zip in dist/'}`);
+ zip = found;
+ } else {
+ zip = await zipDir(py, join(repo, a.dir), join(built, `${a.id}.zip`), log);
+ }
+ for (const s of a.skills || []) {
+ if (!existsSync(join(repo, s))) continue;
+ const { cpSync } = await import('node:fs');
+ const dest = join(skillsDir, s.split('/').pop());
+ rmSync(dest, { recursive: true, force: true });
+ cpSync(join(repo, s), dest, { recursive: true });
+ }
+ }
+ await run(b.path, ['--command', 'extension', 'install-file', '-r', 'user_default', '-e', zip], { env: blenderEnv(root), log });
+ done.push(a.id);
+ }
+ // Load each one once, headless: it must register cleanly (and Nova compiles its core now, not mid-project).
+ const checkPy = join(toolsDir(root), 'blender-addons', 'check.py');
+ writeFileSync(checkPy, `import bpy, addon_utils, importlib
+bad = []
+for mod in ${JSON.stringify(ADDONS.map((a) => `bl_ext.user_default.${a.id}`))}:
+ if mod not in bpy.context.preferences.addons:
+ try:
+ addon_utils.enable(mod, default_set=True, persistent=True)
+ except Exception as e:
+ bad.append(mod + ": " + str(e))
+ if mod not in bpy.context.preferences.addons:
+ bad.append(mod + ": not enabled")
+try:
+ importlib.import_module("bl_ext.user_default.nova_fx.core").lib()
+except Exception as e:
+ bad.append("Nova FX core: " + str(e).splitlines()[0])
+print("MFXBAD=" + " | ".join(bad))
+`);
+ log('\nLoading every toolkit once (Nova FX compiles its core for this CPU)…');
+ const r = spawnSync(b.path, ['-b', '--python', checkPy], { encoding: 'utf8', env: { ...process.env, ...blenderEnv(root) }, timeout: 600_000 });
+ const m = /MFXBAD=(.*)/.exec(r.stdout || '');
+ const bad = m ? m[1].trim() : `the check didn't finish: ${(r.stderr || r.stdout || '').trim().split('\n').slice(-2).join(' / ')}`;
+ log(bad ? `! ${bad}` : '✔ all of them load');
+ return { ...addonsStatus(root), problems: bad || null };
+}
+
+// Opens the studio's Blender (its own profile, with the toolkits) for you: Camera Flight lives here.
+export function openBlender(root, args = []) {
+ const b = blenderStatus(root);
+ if (!b.ok) throw new UserError('Blender isn\'t set up: mortiflix setup 3d');
+ const p = spawn(b.path, args, { env: { ...process.env, ...blenderEnv(root) }, detached: true, stdio: 'ignore' });
+ p.unref();
+ return b.path;
+}
+
+const INSTALLERS = { strudel: installStrudel, chrome: installChrome, 'browser-harness': installBrowserHarness, blender: installBlender, 'blender-addons': installAddons, comfyui: installComfy };
+export const TOOLS = Object.keys(INSTALLERS);
+
+export const TOOL_INFO = {
+ strudel: { name: 'Strudel', what: `@strudel/web ${STRUDEL_VERSION} from npm (AGPL-3.0)`, where: 'tools/strudel', size: '~20 MB' },
+ chrome: { name: 'Headless Chrome', what: 'Chrome for Testing\'s headless shell, from Google (only if you have no Chrome or Chromium)', where: 'tools/browsers', size: '~100 MB' },
+ 'browser-harness': { name: 'browser-harness', what: 'browser-use/browser-harness, installed with uv (Python 3.12) as your own tool', where: '~/.local/bin', size: '~60 MB' },
+ comfyui: { name: 'ComfyUI + TTS Audio Suite', what: 'ComfyUI and diodiogod/TTS-Audio-Suite from GitHub, PyTorch with CUDA, in their own Python environment; the Qwen3-TTS models download on first use', where: 'tools/ComfyUI', size: '~10 GB with the models' },
+ blender: { name: 'Blender', what: 'the newest official build from download.blender.org (your own Blender is reused if you have one)', where: 'tools/blender', size: '~350 MB' },
+ 'blender-addons': { name: 'The 3D toolkits', what: 'MoBlend, Camera, Animate, Math, Circuits and Camera Flight from their GitHub repositories, and Nova FX from this repository, installed into the studio\'s own Blender profile', where: 'tools/blender-profile', size: '~15 MB' },
+};
+
+export async function installTool(root, id, { log = () => {} } = {}) {
+ const fn = INSTALLERS[id];
+ if (!fn) throw new UserError(`unknown tool "${id}" (${TOOLS.join(', ')})`);
+ mkdirSync(toolsDir(root), { recursive: true });
+ return fn(root, log);
+}
+
+// ---- what a session gets ----
+
+export function sessionToolsEnv(root) {
+ const config = loadConfig(root);
+ const env = { MFX_MUSIC: JSON.stringify(musicConfig(config)), MFX_ASSETS: JSON.stringify(assetsConfig(config)) };
+ const s = strudelStatus(root);
+ if (s.ok) env.MFX_STRUDEL = s.path;
+ const c = chromeStatus(root);
+ if (c.ok) env.MFX_CHROME = c.path;
+ const b = blenderStatus(root);
+ if (b.ok) Object.assign(env, { MFX_BLENDER: b.path }, addonsStatus(root).installed?.length ? { ...blenderEnv(root), MFX3D: join(REPO_ROOT, 'harness', 'skills', 'blender-3d') } : {});
+ return env;
+}
+
+export const blenderDocsDir = (root) => join(toolsDir(root), 'blender-addons', 'docs');
+
+// What the session brief says about this studio's tools (no network calls: ComfyUI is the narration skill's business).
+export function setupStatusSync(root) {
+ const config = loadConfig(root);
+ return { strudel: strudelStatus(root), chrome: chromeStatus(root), 'browser-harness': browserHarnessStatus(), blender: blenderStatus(root),
+ 'blender-addons': addonsStatus(root), music: musicConfig(config), assets: assetsConfig(config) };
+}
+
+// The 3D toolkits' own skills (from their repositories), when they're installed.
+export function blenderSkillDirs(root) {
+ const dir = join(toolsDir(root), 'blender-addons', 'skills');
+ if (!addonsStatus(root).installed?.length || !existsSync(dir)) return [];
+ return readdirSync(dir).map((n) => join(dir, n)).filter((p) => existsSync(join(p, 'SKILL.md')));
+}
+
+// The browser-harness skill text, when the owner uses asset sites and the tool is installed.
+export function browserHarnessSkill(root) {
+ const bin = findBrowserHarness();
+ if (!assetsConfig(loadConfig(root)).sites.length || !bin) return null;
+ const f = join(toolsDir(root), 'browser-harness', 'SKILL.md');
+ if (!existsSync(f) || !statSync(f).size) {
+ // Installed before this studio knew about it: ask the tool for its own skill once, and keep it.
+ const r = spawnSync(bin, ['skill'], { encoding: 'utf8', timeout: 30_000 });
+ if (r.status !== 0 || !r.stdout.trim()) return null;
+ mkdirSync(dirname(f), { recursive: true });
+ writeFileSync(f, r.stdout);
+ }
+ return readFileSync(f, 'utf8');
+}
diff --git a/src/torch.mjs b/src/torch.mjs
index 4ebeb80..c0526e4 100644
--- a/src/torch.mjs
+++ b/src/torch.mjs
@@ -6,6 +6,7 @@ import { join } from 'node:path';
import { REPO, paths } from './studio.mjs';
import { projectPaths, loadProject, projectPipeline, readJournal, readEvents } from './projects.mjs';
import { stepView, stepChecks, submissions } from './gates.mjs';
+import { blenderSkillDirs, blenderDocsDir, browserHarnessSkill, setupStatusSync } from './setup.mjs';
// The owner's own words: their direction for this video (outranks the pipeline's defaults, never the gate rules).
const fence = (label, text) => `<<<${label} (the owner's words)\n${text}\n${label}>>>`;
@@ -25,6 +26,7 @@ export function prepareWorkdir(root, id) {
cpSync(join(skillsSrc, name), dest, { recursive: true });
}
}
+ installStudioSkills(root, pp.work);
mkdirSync(join(pp.work, '.mortiflix'), { recursive: true });
copyFileSync(join(REPO, 'harness', 'GATES.md'), join(pp.work, '.mortiflix', 'GATES.md'));
const checklist = join(pp.pipeline, 'checklist.md');
@@ -32,6 +34,42 @@ export function prepareWorkdir(root, id) {
mkdirSync(join(pp.work, 'feedback'), { recursive: true });
}
+// The owner's setup choices, in plain words (from \`mortiflix setup\`).
+function studioSection(root) {
+ const st = setupStatusSync(root);
+ const lines = [];
+ if (st.music.engine === 'none') lines.push('- **Music:** the owner chose no music. Skip any music step with a short note (`mfx step-done`), never improvise one.');
+ else if (st.strudel.ok && st.chrome.ok) lines.push(`- **Music:** Strudel ${st.strudel.version}, scored after the animatic with the **music** skill.${st.music.midi ? ' The owner also wants the **MIDI pack** (every part, the cue sheet) with the final.' : ''}`);
+ else lines.push('- **Music:** Strudel isn\'t set up yet. When a music step is ready, `mfx needs-you`: "Run `mortiflix setup music`, then resume."');
+ if (st.assets.sites.length && st['browser-harness'].ok) {
+ lines.push(`- **Asset sites** (the **assets** skill, in the owner's own Chrome): ${st.assets.sites.map((x) => `${x.url}${x.notes ? ` (${x.notes})` : ''}`).join('; ')}. Only these.`);
+ } else lines.push('- **Asset sites:** none. Make every visual yourself; never download assets from the web.');
+ if (st['blender-addons'].installed?.length) lines.push(`- **3D:** the studio's Blender (\`$MFX_BLENDER\`) with MoBlend, Nova FX, Camera, Animate, Math and Circuits: the **blender-3d** skill.`);
+ else if (st.blender.ok) lines.push('- **3D:** Blender is here but the toolkits aren\'t installed (`mortiflix setup 3d`).');
+ else lines.push('- **3D:** not set up. If the brief needs 3D, ask at the next gate whether to build it in 2D or wait for `mortiflix setup 3d`.');
+ return lines.join('\n');
+}
+
+// Skills that come from what the studio has set up, not from the pipeline: 3D (the studio's Blender and its toolkits,
+// with the toolkits' own skills and docs) and assets (the owner's asset sites, through browser-harness).
+function installStudioSkills(root, work) {
+ const skills = join(work, '.claude', 'skills');
+ const put = (name, from) => { const dest = join(skills, name); rmSync(dest, { recursive: true, force: true }); cpSync(from, dest, { recursive: true }); return dest; };
+ for (const name of ['blender-3d', 'assets', 'browser-harness', 'blender-camera-director', 'blender-animate', 'blender-math', 'circuit-explainer-video']) rmSync(join(skills, name), { recursive: true, force: true });
+ const kits = blenderSkillDirs(root);
+ if (kits.length) {
+ const dest = put('blender-3d', join(REPO, 'harness', 'skills', 'blender-3d'));
+ if (existsSync(blenderDocsDir(root))) cpSync(blenderDocsDir(root), join(dest, 'toolkits'), { recursive: true });
+ for (const dir of kits) put(dir.split(/[\\/]/).pop(), dir);
+ }
+ const bh = browserHarnessSkill(root);
+ if (bh) {
+ put('assets', join(REPO, 'harness', 'skills', 'assets'));
+ mkdirSync(join(skills, 'browser-harness'), { recursive: true });
+ writeFileSync(join(skills, 'browser-harness', 'SKILL.md'), bh);
+ }
+}
+
// Why this session is starting, in one line, from what happened since the last one.
export function sessionReason(root, id) {
const events = readEvents(root, id, { limit: 300 });
@@ -97,6 +135,8 @@ export function writeTorch(root, id, { backend, reason }) {
return `${q.label || q.id}: ${project.intake.answers[q.id] ?? '(not given)'}`;
}).join('\n');
+ const studioText = studioSection(root);
+
const md = `# Mortiflix project: ${project.title}
You're Claude, making this ${pipeline.makes} in the Mortiflix studio for its owner: one person, who wrote the brief and
@@ -114,13 +154,17 @@ reviews every reviewed step. This file is rewritten before every session: read i
- **Your tools:** \`bash\` (a persistent shell in this folder; commands time out after 10 minutes, so long renders go through
\`mfx render\`) and the file editor. Read a skill with the editor's view command before following it.` : ''}
+## This studio
+
+${studioText}
+
## The steps
| Step | Name | Review | Runs after | State | Error checks |
|---|---|---|---|---|---|
${stepRows}
-States: \`ready\` (start it), \`working\`, \`in_review\` (waiting for the owner: don't touch), \`changes\` (make the next
+States: \`skipped\` (not wanted for this video: leave it), \`ready\` (start it), \`working\`, \`in_review\` (waiting for the owner: don't touch), \`changes\` (make the next
version), \`approved\` / \`done\` (finished: reuse it), \`blocked\` (waits on another step).
## What the owner said
diff --git a/src/usage.mjs b/src/usage.mjs
new file mode 100644
index 0000000..df18484
--- /dev/null
+++ b/src/usage.mjs
@@ -0,0 +1,14 @@
+// What a project's Claude usage cost, in words the owner can trust. Claude Code reports a list-price cost for every
+// session; on a Claude plan (subscription login) that money was never charged, so it's shown as what the work
+// would have cost at API prices. On an API key it's real spend.
+const money = (v) => `$${v.toFixed(2)}`;
+
+export function costText(usage = {}) {
+ const total = Number(usage.cost_usd) || 0;
+ if (!(total > 0)) return null;
+ const plan = Math.min(total, Number(usage.plan_usd) || 0);
+ const api = Math.max(0, total - plan);
+ if (plan > 0 && api < 0.005) return `Would have cost about ${money(plan)} at API prices. On your Claude plan, you didn't pay that.`;
+ if (plan < 0.005) return `About ${money(api)} spent on the Claude API.`;
+ return `About ${money(api)} spent on the Claude API, plus about ${money(plan)} of work on your Claude plan that you didn't pay for.`;
+}
diff --git a/src/voice/elevenlabs.mjs b/src/voice/elevenlabs.mjs
index 404e693..3690d72 100644
--- a/src/voice/elevenlabs.mjs
+++ b/src/voice/elevenlabs.mjs
@@ -83,9 +83,17 @@ export class ElevenLabs {
if (!res.ok) {
const text = await res.text().catch(() => '');
let detail = text;
- try { const j = JSON.parse(text); detail = j.detail?.message || j.detail?.[0]?.msg || j.detail || text; } catch { /* plain text */ }
+ let kind = null;
+ try {
+ const j = JSON.parse(text);
+ detail = j.detail?.message || j.detail?.[0]?.msg || j.detail || text;
+ kind = j.detail?.type || j.detail?.status || j.detail?.code || null;
+ } catch { /* plain text */ }
const err = new Error(`ElevenLabs ${res.status}: ${String(typeof detail === 'string' ? detail : JSON.stringify(detail)).slice(0, 300)}`);
err.status = res.status;
+ // A bad key isn't always a 401: ElevenLabs answers some with 400 { type: "authentication_error", status: "invalid_api_key" }.
+ err.auth = res.status === 401 || res.status === 403 || /authentication_error|invalid_api_key|unauthorized/i.test(`${kind} ${text}`);
+ err.code = kind;
throw err;
}
if (raw) return res;
diff --git a/src/web/server.mjs b/src/web/server.mjs
index c69860c..445dde4 100644
--- a/src/web/server.mjs
+++ b/src/web/server.mjs
@@ -16,6 +16,8 @@ import * as gates from '../gates.mjs';
import { Runner, BACKENDS } from '../runner.mjs';
import * as voice from '../voice/index.mjs';
import * as keys from '../keys.mjs';
+import * as setup from '../setup.mjs';
+import { costText } from '../usage.mjs';
const MIME = {
'.html': 'text/html; charset=utf-8', '.js': 'text/javascript; charset=utf-8', '.css': 'text/css; charset=utf-8',
@@ -36,6 +38,7 @@ export async function startServer(root, { port = 4646, host = '127.0.0.1', runne
writeSecret(root, 'web_token', token);
}
const runner = new Runner(root, { log: quiet ? () => {} : (l) => console.log(l) });
+ const installs = new Map(); // tool -> { state: running|done|failed, log: [], result, error }
const clients = new Set();
const broadcast = (type, data) => { for (const res of clients) res.write(`event: ${type}\ndata: ${JSON.stringify(data)}\n\n`); };
let changeTimer = null;
@@ -105,6 +108,26 @@ export async function startServer(root, { port = 4646, host = '127.0.0.1', runne
return after(studioInfo(root, runner));
}
if (p.startsWith('/voice')) return voiceApi(root, req, res, url, p, method, after);
+ // Setup: what each part is for, where it stands, and installing a tool (one at a time, log kept for the page).
+ if (p === '/setup' && method === 'GET') return send(res, 200, await setupInfo(root, installs));
+ if (p === '/setup/music' && method === 'PUT') { setup.saveMusic(root, await json(req)); return after(await setupInfo(root, installs)); }
+ if (p === '/setup/assets' && method === 'PUT') { setup.saveAssetSites(root, (await json(req)).sites); return after(await setupInfo(root, installs)); }
+ if (p === '/setup/recordings' && method === 'PUT') { setup.browserHarnessRecordings(Boolean((await json(req)).enable)); return after(await setupInfo(root, installs)); }
+ if (p === '/setup/blender' && method === 'POST') {
+ if (!loopback) throw new BadRequest('Blender opens on the studio\'s own screen: use mortiflix blender there');
+ return send(res, 200, { path: setup.openBlender(root) });
+ }
+ if ((m = p.match(/^\/setup\/install\/([a-z-]+)$/)) && method === 'POST') {
+ const tool = m[1];
+ if (!setup.TOOLS.includes(tool)) throw new BadRequest(`unknown tool (${setup.TOOLS.join(', ')})`);
+ if ([...installs.values()].some((j) => j.state === 'running')) throw new BadRequest('another install is running: wait for it to finish');
+ const job = { state: 'running', log: [], started_at: new Date().toISOString() };
+ installs.set(tool, job);
+ setup.installTool(root, tool, { log: (l) => { job.log.push(l); if (job.log.length > 400) job.log.splice(0, job.log.length - 400); } })
+ .then((r) => { job.state = 'done'; job.result = r; }, (e) => { job.state = 'failed'; job.error = e.message; })
+ .finally(() => changed());
+ return send(res, 202, { tool, state: job.state });
+ }
// Keys: their status (never their values), and setting one (checked with a free call before it's saved).
if (p === '/keys' && method === 'GET') return send(res, 200, keysInfo(root));
if ((m = p.match(/^\/keys\/([A-Za-z][A-Za-z0-9_]*)$/)) && (method === 'PUT' || method === 'DELETE')) {
@@ -330,6 +353,13 @@ function json(req, limit = 2_000_000) {
});
}
+async function setupInfo(root, installs) {
+ const status = await setup.setupStatus(root);
+ const jobs = Object.fromEntries([...installs].map(([k, j]) => [k, { state: j.state, log: j.log.slice(-60), error: j.error || null, problems: j.result?.problems || null }]));
+ return { parts: setup.PARTS, status, tools: setup.TOOL_INFO, addons: setup.ADDONS.map(({ id, name, about, owner }) => ({ id, name, about, owner: Boolean(owner) })),
+ recordings: setup.browserHarnessRecordings() || null, jobs };
+}
+
function keysInfo(root) {
return { keys: keys.keyStatus(root), other: keys.sessionKeyNames(root) };
}
@@ -377,7 +407,7 @@ function detail(root, id, runner) {
if (last) activity = readFileSync(join(dir, last), 'utf8').trim().split('\n').slice(-200).map((l) => { try { return JSON.parse(l); } catch { return null; } }).filter(Boolean);
}
return {
- project: p,
+ project: { ...p, usage: { ...p.usage, cost_text: costText(p.usage) } },
pipeline: { slug: pipeline.slug, name: pipeline.name, makes: pipeline.makes, intake: pipeline.intake },
steps: gates.stepView(p, pipeline).map((s) => ({ ...s, checks: gates.stepChecks(root, id, s.key).map((c) => ({ id: c.id, title: c.title })) })),
submissions: gates.submissions(root, id),
diff --git a/test/keys.test.mjs b/test/keys.test.mjs
index f0ba418..8c26205 100644
--- a/test/keys.test.mjs
+++ b/test/keys.test.mjs
@@ -73,6 +73,9 @@ test('keys: checked with a free call, and a refused key is told apart from an un
assert.equal(plan.ok, true);
assert.match(plan.detail, /creator plan · 99,000 credits left · commercial use/);
assert.equal((await keys.verifyKey(root, 'elevenlabs', 'k', { fetch: reply(401, { detail: { message: 'Invalid API key' } }) })).ok, false);
+ // ElevenLabs answers some bad keys with a 400 authentication error, not a 401: still refused, never saved.
+ assert.equal((await keys.verifyKey(root, 'elevenlabs', 'k', { fetch: reply(400, { detail: { type: 'authentication_error', status: 'invalid_api_key', message: 'API key is invalid.' } }) })).ok, false);
+ assert.equal((await keys.verifyKey(root, 'elevenlabs', 'k', { fetch: reply(400, { detail: { message: 'bad request' } }) })).ok, null);
});
test('the runner asks for a missing key instead of starting a session that would fail', async (t) => {
@@ -128,3 +131,11 @@ test('web: a project that needs a key says which before it starts; keys are set
assert.equal((await s('POST', `/api/projects/${created.id}/start`)).status, 200);
assert.equal((await s('DELETE', '/api/keys/GEMINI_API_KEY')).json.other.length, 0);
});
+
+test('usage: plan work is shown as what it would have cost, API work as spend', async () => {
+ const { costText } = await import('../src/usage.mjs');
+ assert.equal(costText({ cost_usd: 0 }), null);
+ assert.equal(costText({ cost_usd: 12.9568, plan_usd: 12.9568 }), 'Would have cost about $12.96 at API prices. On your Claude plan, you didn\'t pay that.');
+ assert.equal(costText({ cost_usd: 3.5 }), 'About $3.50 spent on the Claude API.');
+ assert.match(costText({ cost_usd: 5, plan_usd: 2 }), /^About \$3\.00 spent on the Claude API, plus about \$2\.00 of work on your Claude plan/);
+});
diff --git a/test/music-setup.test.mjs b/test/music-setup.test.mjs
new file mode 100644
index 0000000..f2ec2dd
--- /dev/null
+++ b/test/music-setup.test.mjs
@@ -0,0 +1,150 @@
+import { test } from 'node:test';
+import assert from 'node:assert/strict';
+import { spawnSync } from 'node:child_process';
+import { existsSync, mkdtempSync, mkdirSync, writeFileSync, readFileSync, rmSync, readdirSync } from 'node:fs';
+import { join, resolve } from 'node:path';
+import { tmpdir } from 'node:os';
+import { tempStudio } from './helpers.mjs';
+import { hapsToChannels, checkBlueprint, checkScore, intensity, timeOf } from '../pipelines/_shared/skills/music/lib/score.mjs';
+import { checkHarmony } from '../pipelines/_shared/skills/music/lib/harmony.mjs';
+import { writeMidi, readMidi } from '../pipelines/_shared/skills/music/lib/midi.mjs';
+import * as setup from '../src/setup.mjs';
+import { validatePipeline } from '../src/pipelines.mjs';
+import { createProject, startProject, loadProject, projectPipeline } from '../src/projects.mjs';
+import { stepView } from '../src/gates.mjs';
+import { prepareWorkdir, writeTorch } from '../src/torch.mjs';
+import { projectPaths } from '../src/projects.mjs';
+
+const REPO = resolve(import.meta.dirname, '..');
+
+// An 8-bar cue in 4/4 at 120 BPM: 2 s a bar. Bars 1-4 quiet, 5-8 lifted, a hit at 8 s (bar 5).
+const BP = {
+ title: 'Test', bpm: 120, meter: '4/4', bars: 8, scale: 'A:minor', offset_sec: 0,
+ sections: [
+ { name: 'Low glow', start_bar: 1, end_bar: 4, function: 'establish: bass and pad alone', intensity: 2 },
+ { name: 'The lift', start_bar: 5, end_bar: 8, function: 'release: drums and hook arrive', intensity: 8 },
+ ],
+ hits: [{ t_sec: 8, bar: 5, beat: 1, kind: 'direct', what: 'logo lands' }],
+ chart: [{ bars: [1, 8], chords: ['Am7', 'Fmaj7', 'C', 'G'] }],
+ roles: [{ channel: 1, harmony: 'bass', name: 'Bass' }, { channel: 2, harmony: 'melody', name: 'Hook' }, { channel: 10, harmony: 'drums', name: 'Drums' }],
+};
+const ROOTS = ['a1', 'f1', 'c2', 'g1'];
+const hap = (bar, beat, dur, value) => ({ begin: bar - 1 + (beat - 1) / 4, end: bar - 1 + (beat - 1 + dur) / 4, value });
+function cueHaps({ hook = 'c5', late = false } = {}) {
+ const h = [];
+ for (let b = 1; b <= 8 + (late ? 1 : 0); b++) h.push(hap(b, 1, 4, { note: ROOTS[(b - 1) % 4], midichan: 1, velocity: 0.8 }));
+ for (let b = 5; b <= 8; b++) {
+ for (let k = 1; k <= 4; k++) h.push(hap(b, k, 1, { note: (b - 1) % 4 === 0 ? 'e5' : (b - 1) % 4 === 1 ? 'a4' : (b - 1) % 4 === 2 ? hook : 'd5', midichan: 2, velocity: 0.7 + k * 0.05 }));
+ for (let k = 1; k <= 8; k++) h.push(hap(b, 1 + (k - 1) / 2, 0.25, { note: k % 2 ? 36 : 42, midichan: 10, velocity: 0.9 }));
+ }
+ return h;
+}
+const manifestOf = (ch) => ({ bpm: ch.bpm, meter: '4/4', beats_per_bar: 4, bars: 8, tracks: ch.tracks.map((t) => ({ ...t, notes: t.notes.filter((n) => n.start < 32) })) });
+
+test('music: a cue that ends, lands its hit and builds where it should passes', () => {
+ assert.deepEqual(checkBlueprint(BP), []);
+ const ch = hapsToChannels({ haps: cueHaps(), cps: 0.5, beatsPerCycle: 4, names: { 1: 'Bass', 2: 'Hook', 10: 'Drums' } });
+ assert.equal(ch.bpm, 120);
+ assert.deepEqual(ch.problems, []);
+ const score = checkScore(ch, BP, { video_sec: 16 });
+ assert.deepEqual(score.errors, []);
+ assert.equal(score.hits[0].music_sec, 8);
+ assert.equal(timeOf(BP, 5), 8);
+ assert.deepEqual(intensity(manifestOf(ch), BP).problems, []);
+ assert.equal(checkHarmony(manifestOf(ch), BP).ok, true);
+});
+
+test('music: the check catches looping past the end, a missed hit, a flat build and a wrong note', () => {
+ const ch = hapsToChannels({ haps: cueHaps({ late: true }), cps: 0.5, beatsPerCycle: 4, names: { 1: 'Bass', 2: 'Hook', 10: 'Drums' } });
+ assert.match(checkScore(ch, BP).errors.join('\n'), /Bass keeps playing after the last bar/);
+ const offHit = checkScore(ch, { ...BP, hits: [{ t_sec: 8.5, bar: 5, beat: 1, what: 'late logo' }] });
+ assert.match(offHit.errors.join('\n'), /late logo.*more than a frame off/);
+ const flat = intensity(manifestOf(ch), { ...BP, sections: [{ ...BP.sections[0], intensity: 9 }, { ...BP.sections[1], intensity: 1 }] });
+ assert.match(flat.problems[0], /"Low glow" was asked to be more intense/);
+ const sour = hapsToChannels({ haps: cueHaps({ hook: 'c#5' }), cps: 0.5, beatsPerCycle: 4 });
+ const h = checkHarmony(manifestOf(sour), BP);
+ assert.equal(h.ok, false);
+ assert.ok(h.counts['out of key and not in the chord'] >= 1);
+ assert.match(checkBlueprint({ ...BP, sections: [{ ...BP.sections[0], end_bar: 3 }, BP.sections[1]] }).join('\n'), /starts at bar 5; it should start at 4/);
+ const noChan = hapsToChannels({ haps: [hap(1, 1, 1, { note: 'a3' })], cps: 0.5 });
+ assert.match(noChan.problems[0], /no \.midichan/);
+});
+
+test('music: the MIDI pack keeps each part on its role channel, with tempo, meter and markers', () => {
+ const ch = hapsToChannels({ haps: cueHaps(), cps: 0.5, beatsPerCycle: 4, names: { 1: 'Bass', 2: 'Hook', 10: 'Drums' } });
+ const buf = writeMidi({ bpm: 120, meter: '3/4', tracks: ch.tracks, markers: [{ beat: 16, text: 'HIT logo lands' }] });
+ const r = readMidi(buf);
+ assert.equal(r.tempo, 500000);
+ assert.deepEqual(r.tracks.slice(1).map((t) => t.name), ['Bass', 'Hook', 'Drums']);
+ assert.equal(r.tracks[1].notes[0].channel, 0);
+ assert.equal(r.tracks[2].notes[0].channel, 1);
+ assert.equal(r.tracks[3].notes[0].channel, 9);
+ assert.ok(buf.includes(Buffer.from('HIT logo lands')));
+});
+
+test('setup: asset sites are web addresses without logins; music choices persist', (t) => {
+ const root = tempStudio(t);
+ assert.deepEqual(setup.saveAssetSites(root, ['stock.example.com/', { url: 'https://img.example.org/x', notes: 'photos' }, 'stock.example.com']).sites,
+ [{ url: 'https://stock.example.com', notes: '' }, { url: 'https://img.example.org/x', notes: 'photos' }]);
+ assert.throws(() => setup.saveAssetSites(root, ['https://me:[email protected]']), /leave logins out/);
+ assert.throws(() => setup.saveAssetSites(root, ['ftp://files.example.com']), /http and https/);
+ assert.deepEqual(setup.musicConfig({}), { engine: 'strudel', midi: false });
+ assert.deepEqual(setup.saveMusic(root, { midi: true }), { engine: 'strudel', midi: true });
+ assert.throws(() => setup.saveMusic(root, { engine: 'kazoo' }), /strudel or none/);
+ const env = setup.sessionToolsEnv(root);
+ assert.equal(JSON.parse(env.MFX_MUSIC).midi, true);
+ assert.equal(JSON.parse(env.MFX_ASSETS).sites.length, 2);
+});
+
+test('pipelines: "when" is checked, and a skipped music step never lets later work jump ahead', (t) => {
+ assert.match(validatePipeline({ slug: 'x', name: 'X', steps: [{ key: 'a', review: 'video', when: 'rain' }] }).join('\n'), /"when" must be one of music/);
+ const root = tempStudio(t);
+ const quiet = createProject(root, { pipeline: 'explainer', title: 'Quiet', answers: { topic: 'bikes', music: 'No music' } });
+ startProject(root, quiet.id);
+ const view = stepView(loadProject(root, quiet.id), projectPipeline(root, quiet.id));
+ const state = Object.fromEntries(view.map((s) => [s.key, s.state]));
+ assert.equal(state.music, 'skipped');
+ assert.equal(state.build, 'blocked'); // still waits for the animatic
+ const scored = createProject(root, { pipeline: 'explainer', title: 'Scored', answers: { topic: 'bikes' } });
+ startProject(root, scored.id);
+ assert.equal(stepView(loadProject(root, scored.id), projectPipeline(root, scored.id)).find((s) => s.key === 'music').state, 'blocked');
+ setup.saveMusic(root, { engine: 'none' });
+ const off = createProject(root, { pipeline: 'explainer', title: 'Studio says none', answers: { topic: 'bikes' } });
+ startProject(root, off.id);
+ assert.equal(stepView(loadProject(root, off.id), projectPipeline(root, off.id)).find((s) => s.key === 'music').state, 'skipped');
+ // The session brief says what the studio has, and no studio skills arrive without their setup.
+ prepareWorkdir(root, off.id);
+ writeTorch(root, off.id, { backend: 'demo', reason: 'test' });
+ const md = readFileSync(join(projectPaths(root, off.id).work, 'CLAUDE.md'), 'utf8');
+ assert.match(md, /\*\*Music:\*\* the owner chose no music/);
+ assert.match(md, /\*\*Asset sites:\*\* none/);
+ const skills = readdirSync(join(projectPaths(root, off.id).work, '.claude', 'skills'));
+ assert.ok(skills.includes('music') && !skills.includes('assets') && !skills.includes('blender-3d'));
+});
+
+// A real render, only where Strudel and Chrome are installed (MFX_TEST_STRUDEL=<a studio's tools/strudel>).
+test('music: strudel.mjs checks, renders and exports a real cue', { skip: !process.env.MFX_TEST_STRUDEL && 'set MFX_TEST_STRUDEL to run' }, (t) => {
+ const chrome = setup.setupStatusSync(tempStudio(t)).chrome;
+ if (!chrome.ok) return t.skip('no Chrome');
+ const dir = mkdtempSync(join(tmpdir(), 'mfx-cue-'));
+ t.after(() => rmSync(dir, { recursive: true, force: true }));
+ mkdirSync(join(dir, 'music'));
+ writeFileSync(join(dir, 'music', 'blueprint.json'), JSON.stringify(BP));
+ writeFileSync(join(dir, 'music', 'score.strudel.js'), `setcpm(120 / 4)
+const cue = (p) => p.filterWhen((t) => t < 8)
+const lift = "<0!4 1!4>"
+bass: cue(note("<a1 f1 c2 g1>").s("sawtooth").lpf(500).velocity(.8)).midichan(1)
+hook: cue(note("<[e5 e5 e5 e5] [a4 a4 a4 a4] [c5 c5 c5 c5] [d5 d5 d5 d5]>").s("square").velocity(".75 .8 .85 .9").gain(.2).mask(lift)).midichan(2)
+drums: cue(note("36 42 36 42 36 42 36 42").s("sine").decay(.1).sustain(0).velocity(.9).mask(lift)).midichan(10)
+`);
+ const env = { ...process.env, MFX_STRUDEL: process.env.MFX_TEST_STRUDEL, MFX_CHROME: chrome.path };
+ const tool = join(REPO, 'pipelines/_shared/skills/music/strudel.mjs');
+ const run = (...args) => spawnSync('node', [tool, ...args], { cwd: dir, env, encoding: 'utf8', timeout: 120_000 });
+ const check = run('check', '--video-sec', '16');
+ assert.equal(check.status, 0, check.stdout + check.stderr);
+ assert.match(check.stdout, /Check passed/);
+ assert.equal(run('render').status, 0);
+ assert.ok(existsSync(join(dir, 'out/music/score.wav')));
+ assert.equal(run('midi').status, 0);
+ assert.ok(existsSync(join(dir, 'out/music/midi/CUE-SHEET.md')));
+});
diff --git a/vendor/nova-fx/LICENSE b/vendor/nova-fx/LICENSE
new file mode 100644
index 0000000..53d1f3d
--- /dev/null
+++ b/vendor/nova-fx/LICENSE
@@ -0,0 +1,675 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<https://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<https://www.gnu.org/licenses/why-not-lgpl.html>.
+
diff --git a/vendor/nova-fx/README.md b/vendor/nova-fx/README.md
new file mode 100644
index 0000000..97ad2f0
--- /dev/null
+++ b/vendor/nova-fx/README.md
@@ -0,0 +1,261 @@
+# Nova FX
+
+An optimization-first particle, fire and fireworks engine for Blender 5.2 (works from 4.2).
+The simulation runs in a C core with OpenMP. Python only moves data in and out with
+zero-copy numpy views, so Blender's UI thread never runs per-particle Python.
+
+## Install
+
+The add-on lives in `addon/nova_fx` and is symlinked as a Blender extension:
+
+```
+~/.config/blender/5.2/extensions/user_default/nova_fx -> addon/nova_fx
+```
+
+Enable **Nova FX** in Preferences → Add-ons. The core (`lib/libnovacore.so`) is built for this CPU
+(`-march=native`). If it's missing, the add-on compiles it on first use (needs gcc or clang). To rebuild by hand:
+
+```
+make -C core
+```
+
+## Use
+
+- **3D Viewport → Sidebar → Nova FX → Add Effect**, or **Shift+A → Nova FX**.
+- Turn on *Camera, World & Glow* in the operator panel for a framed shot, night sky and bloom.
+- Press **Play** for a live preview (it simulates as the timeline moves forward; jump to the start to reset).
+ Press **Bake** to write every frame to disk (Esc stops). Scrubbing reads the cache.
+- To make any object an **Emitter / Collider / Force**, select it and use the buttons in the Nova FX panel.
+
+### Presets
+
+| Preset | What it shows |
+|---|---|
+| Fireworks Show | 11 shell types: peony, chrysanthemum, willow, palm, ring, crossette, crackle, strobe, heart, multicolour, colour change |
+| Sparkler | Iron sparks that fork in flight (split events), incandescent colour |
+| Campfire | Combustion fluid, embers riding the flow, popping sparks, logs with glowing cracks |
+| Torch | Small licking flame |
+| Explosion | Fuel burst with volume expansion, fireball into rolling smoke, debris that trails smoke into the grid |
+| Grinder Sparks | Directional spray that bounces and spatters on impact |
+| Spark Fountain | Gerb with glitter |
+| Magic Dust | Twinkling gradient trail behind an animated wand |
+| Drifting Embers | Buoyant embers in wind |
+| Energy Vortex | Vortex + attractor forces, streak display |
+| Snow | Lit flakes that settle |
+| Empty System | Starting point |
+
+## Examples
+
+Every example below is a script in [`examples/`](examples) that builds the whole scene from an empty
+file, simulates it and renders it. Run one headless with
+`blender -b --factory-startup --python examples/<name>.py`. Add `-- --quick` for a fast, low-quality pass.
+
+<table>
+<tr>
+<td width="50%"><img src="docs/examples/fireworks_lake.webp" alt="Fireworks over a lake"><br>
+<b>Fireworks over a lake</b>: eleven shell types, colours from real metal-salt emission lines,
+reflections in rippled water. <a href="examples/fireworks_lake.py">fireworks_lake.py</a></td>
+<td width="50%"><img src="docs/examples/sparkler_bokeh.webp" alt="Sparkler close-up"><br>
+<b>Sparkler close-up</b>: iron sparks that fork in flight (split events), incandescent Planck colour,
+85 mm depth of field. <a href="examples/sparkler_bokeh.py">sparkler_bokeh.py</a></td>
+</tr>
+<tr>
+<td><img src="docs/examples/campfire_night.webp" alt="Campfire at night"><br>
+<b>Campfire at night</b>: combustion on the GPU solver, embers riding the flow, a stone ring lit by
+the fire. <a href="examples/campfire_night.py">campfire_night.py</a></td>
+<td><img src="docs/examples/explosion_sequence.webp" alt="Explosion"><br>
+<b>Explosion</b>: expanding fuel burst into a rolling fireball and smoke cloud; debris trails sparks and
+smoke of its own. <a href="examples/explosion_sequence.py">explosion_sequence.py</a></td>
+</tr>
+<tr>
+<td><img src="docs/examples/grinder_monkey.webp" alt="Sparks on a mesh collider"><br>
+<b>Sparks on a mesh</b>: an exact mesh collider (distance field) with continuous collision, so sparks
+don't pass through the thin ears. <a href="examples/grinder_monkey.py">grinder_monkey.py</a></td>
+<td><img src="docs/examples/magic_wand.webp" alt="Magic wand"><br>
+<b>Magic wand</b>: a twinkling trail that shifts colour, swirled by divergence-free curl noise.
+<a href="examples/magic_wand.py">magic_wand.py</a></td>
+</tr>
+<tr>
+<td><img src="docs/examples/meteor_shower.webp" alt="Meteor shower"><br>
+<b>Meteor shower</b>: a custom effect written from scratch (below), with no preset involved.
+<a href="examples/meteor_shower.py">meteor_shower.py</a></td>
+<td><img src="docs/presets.png" alt="All presets"><br>
+<b>Every preset</b> straight out of <i>Add Effect</i>, untouched.</td>
+</tr>
+</table>
+
+(Full-size stills are kept in the original repository, not in this vendored copy.)
+
+### Build an effect in Python
+
+Particle types are the building blocks. Each type has a lifetime, motion, a light model, and *events*
+that spawn other types: on death, along a trail, on a split, or on impact. This is the whole meteor
+shower above:
+
+```python
+import bpy, math
+
+bpy.ops.nova.add_preset(preset="EMPTY") # an empty system + one emitter
+sky = bpy.context.object
+n = sky.nova
+n.kinds.clear()
+
+def kind(**settings):
+ k = n.kinds.add()
+ for key, value in settings.items():
+ setattr(k, key, value)
+ return k
+
+# hot rock: Planck colour, leaves a trail, bursts into sparks when it hits something
+kind(name="Meteor", color_mode="BLACKBODY", temp0=3200, life_min=3, life_max=4, emit=60, collide="DIE",
+ size_start=0.06, size_end=0.04, trail_kind="Trail", trail_rate=180, hit_kind="Spark", hit_count=60, hit_speed=9)
+kind(name="Trail", color_mode="BLACKBODY", temp0=2400, cool=1.8, life_min=0.5, life_max=1.2,
+ size_start=0.035, size_end=0.0, emit=25, drag_lin=1.5, gravity=0.2, collide="NONE")
+kind(name="Spark", color_mode="BLACKBODY", temp0=2600, cool=1.5, life_min=0.6, life_max=1.6,
+ size_start=0.02, size_end=0.006, emit=40, drag_quad=0.5, collide="BOUNCE", bounce=0.35,
+ split_kind="Spark", split_rate=1.5, split_count=2, split_max_gen=1)
+n.display = "STREAKS"
+
+em = bpy.data.objects["Nova Emitter"] # meteors enter high up, aimed down and across
+em.location = (-14, 30, 26)
+em.rotation_euler = (math.radians(130), 0, math.radians(35))
+e = em.nova_emitter
+e.kind, e.shape, e.radius = "Meteor", "SPHERE", 6.0
+e.rate, e.random_timing, e.speed, e.spread = 2.2, True, 26, math.radians(6)
+
+bpy.ops.mesh.primitive_plane_add(size=200) # anything can be a collider
+ground = bpy.context.object
+ground.nova_collider.enabled = True
+```
+
+Press Play to watch it live, or *Bake* to cache it to disk. The same settings appear in the sidebar
+(**N → Nova FX**), so you can build effects there and script them later, or the other way round.
+
+## What it does, and how
+
+### Particles (`core/nova_core.c`)
+- **Structure-of-arrays storage, fully parallel:** 1M particles × 4 substeps with 2-octave curl noise
+ takes ~80 ms/frame on 16 threads; without noise it's ~33 ms.
+- **Deterministic:** randomness comes from hashing (particle id, step, salt), and births are placed by
+ a parallel prefix sum. Thread count never changes the result (tested).
+- **Event graph per particle type** (like X-Particles' Questions/Actions or tyFlow events):
+ - on death: burst with a pattern (Fibonacci sphere, random, ring, palm, crossette, heart, cone, hemisphere)
+ - trail: continuous children spread along the frame segment
+ - split: Poisson-timed branching with a generation limit (sparklers)
+ - on impact: spawn children
+ - Children can inherit colour; random hue per shell.
+- **Forces:**
+ - gravity
+ - linear drag, plus implicit quadratic drag (unconditionally stable)
+ - buoyancy from temperature
+ - wind (acts through drag)
+ - divergence-free curl noise (Bridson et al. 2007) with analytic gradient noise
+ - force objects: attract, vortex, wind, turbulence, drag
+- **Colliders:** plane, sphere, box, or the **exact shape of any mesh**. A mesh is baked once to a signed
+ distance field (64³ in about a second) and looked up in O(1). Collider velocity, bounce and friction apply.
+- **Continuous collision detection:** each particle sphere-traces its step against every collider's distance
+ function, so fast sparks can't tunnel through thin geometry. At one substep, 40 m/s particles vs a 2 cm
+ slab: 0% pass through (the previous version let 100% through).
+- **Incandescence:** colour comes from the Planck spectrum integrated against CIE 1931 colour matching
+ functions (Wyman–Sloan–Shirley fit). Brightness ∝ T⁴ (Stefan–Boltzmann). Cooling is Newton plus
+ exact radiative T⁴ cooling, so sparks redden and fade like hot metal.
+- **Firework colours:** computed from the real emission lines of the metal salts (SrCl red, BaCl green,
+ CuCl blue, Na yellow, Ca orange).
+- **Sub-frame emission:** births interpolate the emitter's motion and are pre-aged, so fast emitters
+ don't leave bands.
+
+### Fluid (smoke & fire)
+- Incompressible Navier–Stokes on a staggered MAC grid.
+- **Pressure:** conjugate gradient preconditioned by a geometric multigrid V-cycle (MGPCG,
+ McAdams et al. 2010). It converges in 4–6 iterations, where plain CG typically needs hundreds.
+- **Advection:**
+ - MacCormack with min/max clamping (Selle et al. 2008)
+ - advection–reflection (Zehnder, Narain, Thomaszewski 2018), which keeps the swirl energy
+ semi-Lagrangian steps lose. It reflects only between two fluid cells.
+ - Where a trace leaves the grid, the step falls back to semi-Lagrangian, so open walls stay stable
+ (a 128³ fire in a narrow domain holds ~3 m/s for 200 frames)
+- **Vorticity confinement** plus curl-noise detail. The noise fades out as the local flow approaches
+ half its amplitude, so it adds detail without pumping energy in forever.
+- **Combustion:**
+ - fuel, ignition temperature, Arrhenius-like burn rate
+ - heat release and smoke yield
+ - volume expansion fed into the pressure solve, so explosions push outward
+- **Sparse tiles (8³), sparse all the way down.** Every per-substep pass follows the effect, not the domain:
+ - advection, forces, combustion and both solver levels (fine and coarse) visit only active blocks;
+ - the active region is found by scanning only last step's tiles plus tiles a source wrote to;
+ - the solver hierarchy is re-typed only where tiles changed;
+ - colliders are re-voxelized only when they move, and only inside their boxes;
+ - VDB export copies only the active box.
+
+ Memory comes from lazily zeroed pages, so untouched space never becomes resident (256³: 2.1 → 0.5 GB).
+ The grid is still stored row by row, so each 4 KB page spans many tiles; tile-ordered storage would cut it further.
+- **Safety nets:** expansion capped per substep, and face velocity clamped to 2× CFL. Adaptive CFL substeps.
+- **Two-way coupling:** particles ride the flow (embers) and feed smoke, heat and fuel back into the grid
+ (debris trails, smoky shells).
+- **Output:** OpenVDB (`density`, `heat`, `flame`, optional `velocity`) written on a background thread
+ and loaded as a Blender Volume sequence with a blackbody fire material.
+
+### GPU fluid (Vulkan)
+- **Setting:** `Fire & Smoke → Device: GPU` runs the whole fluid substep in Vulkan compute (`core/gpu_vk.c`,
+ `core/shaders/*.comp`) with the state resident in VRAM.
+- **Same solver:** it mirrors the CPU one kernel for kernel, and the tests check that: identical after one frame,
+ and after eight frames no cell off by more than 0.5% of peak. Repeated runs give bit-identical results.
+- **Pressure solve:** MGPCG with the CG scalars kept on the GPU. The host syncs once per batch of 6 iterations.
+- **Sources and deposits:** bucketed by tile on the CPU and gathered per cell on the GPU. No atomics, so results
+ are deterministic.
+- **Transfers:** the CPU keeps the bookkeeping (solids, multigrid stencils, which are uploaded only when they
+ change). Fields come back only for VDB export, and velocity only for particles that ride the flow.
+- **Build:** `libvulkan` is loaded at runtime. Shaders are compiled with `glslc` and committed as SPIR-V
+ (`core/shaders_spv.h`), so building never needs a shader compiler. Without Vulkan, the add-on falls back to CPU.
+- **Limitation:** the GPU solver is dense. For a small fire in a huge domain, the sparse CPU solver can still be faster.
+
+### Blender side
+- Native **PointCloud** objects with these attributes: `position`, `radius`, `Cd`, `emit`, `velocity`
+ (Cycles motion blur), `age`, `id`, `kind`. Usable in your own shaders and Geometry Nodes.
+- **Streak display:** a companion Curves object (`<system> Streaks`) turns each particle into a 2-point curve
+ trailing behind its motion. Cycles and EEVEE draw curves natively. At 1M particles, render prep takes
+ 1.4 s, vs 25 s for the mesh tubes used before. While streaks are on, the point system shows as a
+ selectable box.
+- **Viewport %** limits how many particles the viewport shows. Renders always use all of them.
+- **Cache:** 35 bytes per particle per frame (float16 where precision allows), one `fwrite` per frame.
+
+## Complexity (measured)
+
+N = particles, A = active fluid cells, C = all cells, I ≈ 5 solver iterations at every size.
+
+| Part | Cost per substep |
+|---|---|
+| Particles | O(N·(1 + forces + colliders)), ~4 ns/particle with no noise, +5 ns per turbulence octave |
+| Removing the dead | O(N) only when something died; otherwise children are appended in place |
+| Fluid (advect, forces, burn, pressure at every level) | O(A + I·A) |
+| Region tracking and solver rebuild | O(changed tiles) + O(C/512) byte scans |
+| Collider voxelizing | O(collider box), and only when a collider moves |
+| VDB export | O(active box) |
+
+Same plume, empty domain grown from 64³ to 256³ (old → now):
+- time: 20 → 113 ms/frame before, now flat at 17–29 ms
+- memory: 2.1 GB → 0.5 GB
+- VDB export: 800 → 4 ms
+
+4M long-lived particles: 45 → 15 ms per substep.
+
+512³ (134M cells) with a small plume runs at ~32 ms/frame using 2.6 GB. The old dense layout would need ~17 GB.
+
+## Tests
+
+```
+python3 tests/test_core.py # core: correctness + speed, ~7 s
+blender -b --factory-startup --python tests/blender_presets.py -- --frames 24
+blender -b --factory-startup --python tests/blender_render.py -- FIREWORKS 260 out.png CYCLES 64
+```
+
+## Researched, not built (yet)
+
+From the paid tools (X-Particles, tyFlow, EmberGen, Pro Pyro, VFX Pro Simulations):
+- FLIP/APIC liquids, granular, cloth
+- An OpenVDB mesher for particles
+- ML upres
+- A domain that follows the effect around (sparse tiles cover most of that benefit)
+- Tile-ordered grid storage (memory proportional to the effect; pages are currently row-shaped)
+- SIMD (8-wide) turbulence noise
+- Sparse GPU dispatch (active tiles only) and GPU particles
diff --git a/vendor/nova-fx/VENDORED.md b/vendor/nova-fx/VENDORED.md
new file mode 100644
index 0000000..ddfe972
--- /dev/null
+++ b/vendor/nova-fx/VENDORED.md
@@ -0,0 +1,10 @@
+# Nova FX, vendored
+
+Nova FX is included in Mortiflix as source (GPL-3.0-or-later, see LICENSE), copied from its original repository at
+commit `7638ae6`. `mortiflix setup 3d` packs `addon/nova_fx` with the C core from `core/` into an extension and installs
+it into the studio's own Blender profile; the add-on compiles the core for your CPU on first use.
+
+**Nova FX is Mortiflix's own particle engine, and for now its core builds on Linux only** (gcc with OpenMP, usually
+already installed). macOS and Windows builds aren't supported yet.
+
+Change Nova here like any other part of Mortiflix; keep `core/` and `addon/` in step.
diff --git a/vendor/nova-fx/addon/nova_fx/__init__.py b/vendor/nova-fx/addon/nova_fx/__init__.py
new file mode 100644
index 0000000..d97eb5d
--- /dev/null
+++ b/vendor/nova-fx/addon/nova_fx/__init__.py
@@ -0,0 +1,51 @@
+"""Nova FX: an optimization-first particle, fire and fireworks engine for Blender."""
+
+import bpy
+
+from . import ops, props, sim, ui
+
+
+class NovaPreferences(bpy.types.AddonPreferences):
+ bl_idname = __package__
+
+ threads: bpy.props.IntProperty(name="Threads", default=0, min=0, max=512,
+ description="Simulation threads (0 = all cores)",
+ update=lambda s, c: _apply_threads(s))
+
+ def draw(self, context):
+ from . import core
+ layout = self.layout
+ try:
+ L = core.lib()
+ layout.label(text=f"Core v{L.nv_version()} loaded · {L.nv_num_threads()} threads", icon="CHECKMARK")
+ except RuntimeError as e:
+ layout.label(text=str(e).splitlines()[0], icon="ERROR")
+ layout.prop(self, "threads")
+ layout.operator("nova.build_core", icon="TOOL_SETTINGS")
+
+
+def _apply_threads(prefs):
+ from . import core
+ import os
+ try:
+ core.lib().nv_set_threads(prefs.threads or os.cpu_count() or 1)
+ except RuntimeError:
+ pass
+
+
+def register():
+ props.register()
+ bpy.utils.register_class(NovaPreferences)
+ for c in ops.CLASSES + ui.CLASSES:
+ bpy.utils.register_class(c)
+ bpy.types.VIEW3D_MT_add.append(ui.menu_add)
+ sim.register()
+
+
+def unregister():
+ sim.unregister()
+ bpy.types.VIEW3D_MT_add.remove(ui.menu_add)
+ for c in reversed(ops.CLASSES + ui.CLASSES):
+ bpy.utils.unregister_class(c)
+ bpy.utils.unregister_class(NovaPreferences)
+ props.unregister()
diff --git a/vendor/nova-fx/addon/nova_fx/blender_manifest.toml b/vendor/nova-fx/addon/nova_fx/blender_manifest.toml
new file mode 100644
index 0000000..b373e7c
--- /dev/null
+++ b/vendor/nova-fx/addon/nova_fx/blender_manifest.toml
@@ -0,0 +1,16 @@
+schema_version = "1.0.0"
+
+id = "nova_fx"
+version = "1.0.0"
+name = "Nova FX"
+tagline = "Optimized particles, fire, sparks and fireworks"
+maintainer = "Mortiflix"
+type = "add-on"
+tags = ["Physics", "Animation"]
+
+blender_version_min = "4.2.0"
+license = ["SPDX:GPL-3.0-or-later"]
+platforms = ["linux-x64"]
+
+[permissions]
+files = "Writes simulation caches (particle frames and OpenVDB volumes) to disk"
diff --git a/vendor/nova-fx/addon/nova_fx/core.py b/vendor/nova-fx/addon/nova_fx/core.py
new file mode 100644
index 0000000..db40832
--- /dev/null
+++ b/vendor/nova-fx/addon/nova_fx/core.py
@@ -0,0 +1,337 @@
+"""ctypes bridge to libnovacore. Importable without Blender (used by the tests)."""
+
+import ctypes as C
+import os
+import subprocess
+
+import numpy as np
+
+HERE = os.path.dirname(os.path.abspath(__file__))
+LIB_PATH = os.path.join(HERE, "lib", "libnovacore.so")
+SRC_PATH = os.path.join(HERE, "lib", "nova_core.c")
+
+_f = C.POINTER(C.c_float)
+_vp = C.c_void_p
+
+_SIGS = {
+ "nv_version": (C.c_int, []),
+ "nv_num_threads": (C.c_int, []),
+ "nv_set_threads": (None, [C.c_int]),
+ "nv_kind_param_names": (C.c_char_p, []),
+ "nv_sys_param_names": (C.c_char_p, []),
+ "nv_fluid_param_names": (C.c_char_p, []),
+ "nv_kind_param_count": (C.c_int, []),
+ "nv_sys_param_count": (C.c_int, []),
+ "nv_fluid_param_count": (C.c_int, []),
+ "nv_kind_param_defaults": (None, [_f]),
+ "nv_sys_param_defaults": (None, [_f]),
+ "nv_fluid_param_defaults": (None, [_f]),
+ "nv_blackbody": (None, [C.c_float, _f]),
+ "nv_sys_new": (_vp, []),
+ "nv_sys_free": (None, [_vp]),
+ "nv_sys_reset": (None, [_vp]),
+ "nv_sys_set_params": (None, [_vp, _f]),
+ "nv_sys_set_kinds": (None, [_vp, C.c_int, _f]),
+ "nv_sys_set_fluid": (None, [_vp, _vp]),
+ "nv_sys_set_colliders": (None, [_vp, C.c_int, _f]),
+ "nv_sys_set_forces": (None, [_vp, C.c_int, _f]),
+ "nv_sys_set_sdf": (C.c_int, [_vp, C.c_int, C.c_int, C.c_int, C.c_int, C.c_float, C.c_float, C.c_float,
+ C.c_float, _f]),
+ "nv_sys_count": (C.c_int, [_vp]),
+ "nv_emit": (C.c_int, [_vp, C.c_int, C.c_int, _f, _f, _f]),
+ "nv_sys_step": (None, [_vp, C.c_float]),
+ "nv_sys_set_turb_grid": (None, [_vp, C.c_int]),
+ "nv_sys_turb_grid_used": (C.c_int, [_vp]),
+ "nv_sys_write": (C.c_int, [_vp, C.c_char_p]),
+ "nv_sys_export": (C.c_int, [_vp, _f, _f, _f, _f, _f]),
+ "nv_fluid_new": (_vp, [C.c_int, C.c_int, C.c_int, C.c_float, C.c_float, C.c_float, C.c_float]),
+ "nv_fluid_free": (None, [_vp]),
+ "nv_fluid_reset": (None, [_vp]),
+ "nv_fluid_set_params": (None, [_vp, _f]),
+ "nv_fluid_ptr": (_f, [_vp, C.c_int]),
+ "nv_fluid_cell_velocity": (None, [_vp, _f]),
+ "nv_fluid_cell_velocity_box": (None, [_vp, C.POINTER(C.c_int), _f]),
+ "nv_fluid_active_bbox": (C.c_int, [_vp, C.POINTER(C.c_int)]),
+ "nv_fluid_max_divergence": (C.c_float, [_vp]),
+ "nv_fluid_splat": (None, [_vp, C.c_int, _f, C.c_float, C.c_float, C.c_float, C.c_float, _f, C.c_float, C.c_int]),
+ "nv_fluid_step": (None, [_vp, C.c_float]),
+ "nv_fluid_set_gpu": (C.c_int, [_vp, C.c_int]),
+ "nv_fluid_sync": (None, [_vp, C.c_int]),
+ "nv_fluid_timings": (None, [_vp, _f]),
+ "nv_frame": (None, [_vp, _vp, C.c_float, C.c_int]),
+ "nv_stats": (None, [_vp, _vp, _f]),
+}
+
+_lib = None
+
+
+def build(force=False):
+ """Compile the core for this CPU (gcc/clang + OpenMP). Returns (ok, log)."""
+ if os.path.exists(LIB_PATH) and not force:
+ return True, "already built"
+ src_dir = os.path.dirname(SRC_PATH)
+ if not os.path.exists(SRC_PATH):
+ alt = os.path.join(HERE, "..", "..", "core")
+ src_dir = alt if os.path.exists(os.path.join(alt, "nova_core.c")) else src_dir
+ sources = [os.path.join(src_dir, "nova_core.c")]
+ if all(os.path.exists(os.path.join(src_dir, f)) for f in ("gpu_vk.c", "shaders_spv.h", "nova_params.h")):
+ sources.append(os.path.join(src_dir, "gpu_vk.c"))
+ log = []
+ # with the GPU backend first; without it if this machine has no Vulkan headers
+ for srcs in ([*sources], sources[:1]) if len(sources) > 1 else (sources,):
+ for cc in ("gcc", "clang", "cc"):
+ cmd = [cc, "-O3", "-march=native", "-ffast-math", "-fno-math-errno", "-fopenmp", "-fPIC",
+ "-fvisibility=hidden", "-shared", "-o", LIB_PATH, *srcs, "-lm", "-ldl"]
+ try:
+ r = subprocess.run(cmd, capture_output=True, text=True, timeout=300)
+ except (OSError, subprocess.TimeoutExpired) as e:
+ log.append(f"{cc}: {e}")
+ continue
+ log.append(r.stderr)
+ if r.returncode == 0:
+ return True, "\n".join(log)
+ return False, "\n".join(log)
+
+
+def lib():
+ global _lib
+ if _lib is None:
+ if not os.path.exists(LIB_PATH):
+ ok, log = build()
+ if not ok:
+ raise RuntimeError("Nova FX core could not be compiled:\n" + log)
+ L = C.CDLL(LIB_PATH)
+ for name, (res, args) in _SIGS.items():
+ fn = getattr(L, name, None)
+ if fn is None:
+ continue # optional symbol (e.g. GPU backend not compiled in)
+ fn.restype = res
+ fn.argtypes = args
+ _lib = L
+ return _lib
+
+
+def fptr(a):
+ return a.ctypes.data_as(_f) if a is not None else None
+
+
+def _names(fn):
+ return [n for n in fn().decode().split(",") if n]
+
+
+class Params:
+ """Name <-> index table read from the C core, so Python never drifts from it."""
+
+ def __init__(self, names_fn, defaults_fn):
+ self.names = _names(names_fn)
+ self.index = {n: i for i, n in enumerate(self.names)}
+ self.defaults = np.zeros(len(self.names), np.float32)
+ defaults_fn(fptr(self.defaults))
+
+ def pack(self, values):
+ out = self.defaults.copy()
+ for k, v in values.items():
+ out[self.index[k]] = v
+ return out
+
+
+_tables = {}
+
+
+def tables():
+ if not _tables:
+ L = lib()
+ _tables["kind"] = Params(L.nv_kind_param_names, L.nv_kind_param_defaults)
+ _tables["sys"] = Params(L.nv_sys_param_names, L.nv_sys_param_defaults)
+ _tables["fluid"] = Params(L.nv_fluid_param_names, L.nv_fluid_param_defaults)
+ return _tables
+
+
+def gpu_name():
+ L = lib()
+ if not hasattr(L, "nv_gpu_name"):
+ return "core built without the Vulkan backend"
+ L.nv_gpu_init.restype = C.c_int
+ L.nv_gpu_name.restype = C.c_char_p
+ L.nv_gpu_init()
+ return L.nv_gpu_name().decode(errors="replace")
+
+
+def blackbody(T):
+ out = np.zeros(3, np.float32)
+ lib().nv_blackbody(float(T), fptr(out))
+ return out
+
+
+class Fluid:
+ def __init__(self, res, dx, origin):
+ self.res = tuple(int(r) for r in res)
+ self.dx = float(dx)
+ self.origin = tuple(float(o) for o in origin)
+ nx, ny, nz = self.res
+ self.h = lib().nv_fluid_new(nx, ny, nz, self.dx, *self.origin)
+ if not self.h:
+ raise MemoryError("Nova FX: could not allocate the fluid grid")
+
+ def free(self):
+ if self.h:
+ lib().nv_fluid_free(self.h)
+ self.h = None
+
+ __del__ = free
+
+ def set_params(self, values):
+ p = tables()["fluid"].pack(values)
+ lib().nv_fluid_set_params(self.h, fptr(p))
+
+ def field(self, which):
+ """Zero-copy view (nz, ny, nx) of density=0, heat=1, fuel=2, flame=3."""
+ nx, ny, nz = self.res
+ ptr = lib().nv_fluid_ptr(self.h, which)
+ return np.ctypeslib.as_array(ptr, shape=(nz, ny, nx))
+
+ def cell_velocity(self):
+ nx, ny, nz = self.res
+ out = np.empty((nz, ny, nx, 3), np.float32)
+ lib().nv_fluid_cell_velocity(self.h, fptr(out))
+ return out
+
+ def active_bbox(self):
+ """(i0, i1, j0, j1, k0, k1) cell bounds that can hold smoke/heat/fuel/flame, or None."""
+ b = (C.c_int * 6)()
+ return tuple(b) if lib().nv_fluid_active_bbox(self.h, b) else None
+
+ def cell_velocity_box(self, box):
+ i0, i1, j0, j1, k0, k1 = box
+ out = np.empty((k1 - k0, j1 - j0, i1 - i0, 3), np.float32)
+ lib().nv_fluid_cell_velocity_box(self.h, (C.c_int * 6)(*box), fptr(out))
+ return out
+
+ def splat(self, pos, radius, dens=0.0, heat=0.0, fuel=0.0, vel=None, vel_amt=0.0, mode=1):
+ pos = np.ascontiguousarray(pos, np.float32).reshape(-1, 3)
+ if len(pos) == 0:
+ return
+ v = None if vel is None else np.ascontiguousarray(vel, np.float32).reshape(-1, 3)
+ lib().nv_fluid_splat(self.h, len(pos), fptr(pos), radius, dens, heat, fuel, fptr(v), vel_amt, mode)
+
+ def step(self, dt):
+ lib().nv_fluid_step(self.h, dt)
+
+ def use_gpu(self, on=True):
+ """Move the solver to the GPU (Vulkan). Returns True if it is running there."""
+ if not hasattr(lib(), "nv_fluid_set_gpu"):
+ return False
+ return bool(lib().nv_fluid_set_gpu(self.h, 1 if on else 0))
+
+ def sync(self, velocity=False):
+ """GPU mode: bring the fields back so field()/cell_velocity() see the current state."""
+ if hasattr(lib(), "nv_fluid_sync"):
+ lib().nv_fluid_sync(self.h, 1 if velocity else 0)
+
+ def reset(self):
+ lib().nv_fluid_reset(self.h)
+
+ def max_divergence(self):
+ return lib().nv_fluid_max_divergence(self.h)
+
+
+class System:
+ def __init__(self):
+ self.h = lib().nv_sys_new()
+ self.fluid = None
+
+ def free(self):
+ if self.h:
+ lib().nv_sys_free(self.h)
+ self.h = None
+
+ __del__ = free
+
+ def reset(self):
+ lib().nv_sys_reset(self.h)
+
+ def set_params(self, values):
+ lib().nv_sys_set_params(self.h, fptr(tables()["sys"].pack(values)))
+
+ def set_kinds(self, kinds):
+ """kinds: list of dicts of kind params (kind references already resolved to indices)."""
+ t = tables()["kind"]
+ arr = np.stack([t.pack(k) for k in kinds]).astype(np.float32)
+ lib().nv_sys_set_kinds(self.h, len(kinds), fptr(np.ascontiguousarray(arr)))
+
+ def set_fluid(self, fluid):
+ self.fluid = fluid
+ lib().nv_sys_set_fluid(self.h, fluid.h if fluid else None)
+
+ def set_colliders(self, recs):
+ a = np.ascontiguousarray(np.asarray(recs, np.float32).reshape(-1, 31)) if len(recs) else np.zeros((1, 31), np.float32)
+ lib().nv_sys_set_colliders(self.h, len(recs), fptr(a))
+
+ def set_forces(self, recs):
+ a = np.ascontiguousarray(np.asarray(recs, np.float32).reshape(-1, 11)) if len(recs) else np.zeros((1, 11), np.float32)
+ lib().nv_sys_set_forces(self.h, len(recs), fptr(a))
+
+ def set_sdf(self, slot, origin, dx, dist):
+ """dist: (nz, ny, nx) signed distances in the collider's local space; origin = sample (0,0,0)."""
+ d = np.ascontiguousarray(dist, np.float32)
+ nz, ny, nx = d.shape
+ return lib().nv_sys_set_sdf(self.h, slot, nx, ny, nz, *[float(o) for o in origin], float(dx), fptr(d))
+
+ def emit(self, kind, pos, vel, preage=None):
+ pos = np.ascontiguousarray(pos, np.float32).reshape(-1, 3)
+ vel = np.ascontiguousarray(vel, np.float32).reshape(-1, 3)
+ pa = None if preage is None else np.ascontiguousarray(preage, np.float32)
+ return lib().nv_emit(self.h, int(kind), len(pos), fptr(pos), fptr(vel), fptr(pa))
+
+ def frame(self, dt, substeps, fluid=None):
+ lib().nv_frame(self.h, fluid.h if fluid else None, dt, int(substeps))
+
+ def count(self):
+ return lib().nv_sys_count(self.h)
+
+ def write(self, path):
+ return lib().nv_sys_write(self.h, path.encode())
+
+ def export(self):
+ n = self.count()
+ P = np.empty((n, 3), np.float32)
+ V = np.empty((n, 3), np.float32)
+ Cc = np.empty((n, 3), np.float32)
+ R = np.empty(n, np.float32)
+ E = np.empty(n, np.float32)
+ lib().nv_sys_export(self.h, fptr(P), fptr(V), fptr(Cc), fptr(R), fptr(E))
+ return P, V, Cc, R, E
+
+ def stats(self, fluid=None):
+ o = np.zeros(8, np.float32)
+ lib().nv_stats(self.h, fluid.h if fluid else None, fptr(o))
+ return dict(count=int(o[0]), particle_ms=float(o[1]), fluid_ms=float(o[2]),
+ cg_iters=int(o[3]), cg_res=float(o[4]), max_vel=float(o[5]),
+ active=float(o[6]), cells=int(o[7]))
+
+
+def read_cache(path):
+ """Read a particle cache frame. Returns dict of numpy arrays (float32 where it matters)."""
+ raw = np.fromfile(path, dtype=np.uint8)
+ if len(raw) < 16 or raw[:4].tobytes() != b"NVP1":
+ raise ValueError(f"not a Nova cache: {path}")
+ n = int(raw[4:8].view(np.uint32)[0])
+ t = float(raw[8:12].view(np.float32)[0])
+ o = 16
+
+ def take(dtype, count):
+ nonlocal o
+ nb = np.dtype(dtype).itemsize * count
+ a = raw[o:o + nb].view(dtype)
+ o += nb
+ return a
+
+ P = take(np.float32, 3 * n)
+ V = take(np.float16, 3 * n)
+ Cd = take(np.float16, 3 * n)
+ R = take(np.float16, n)
+ E = take(np.float16, n)
+ A = take(np.float16, n)
+ ID = take(np.uint32, n)
+ K = take(np.uint8, n)
+ return dict(n=n, time=t, P=P, V=V, Cd=Cd, radius=R, emit=E, age=A, id=ID, kind=K)
diff --git a/vendor/nova-fx/addon/nova_fx/ops.py b/vendor/nova-fx/addon/nova_fx/ops.py
new file mode 100644
index 0000000..9d949a5
--- /dev/null
+++ b/vendor/nova-fx/addon/nova_fx/ops.py
@@ -0,0 +1,278 @@
+import os
+import time
+
+import bpy
+from bpy.props import BoolProperty, EnumProperty, IntProperty, StringProperty
+
+from . import core, presets, render, sim
+
+
+def system_of(ob):
+ if ob is None:
+ return None
+ if ob.nova.is_system:
+ return ob
+ if ob.nova_emitter.enabled and ob.nova_emitter.system:
+ return ob.nova_emitter.system
+ return None
+
+
+def _system_items(self, context):
+ items = [(ob.name, ob.name, "") for ob in sim.systems(context.scene)]
+ return items or [("", "No systems", "")]
+
+
+class NOVA_OT_add_preset(bpy.types.Operator):
+ """Add a ready-made Nova FX effect at the 3D cursor"""
+ bl_idname = "nova.add_preset"
+ bl_label = "Add Nova Effect"
+ bl_options = {"REGISTER", "UNDO"}
+
+ preset: EnumProperty(name="Effect", items=[(k, l, d) for k, l, d, _f in presets.PRESETS])
+ setup_scene: BoolProperty(name="Camera, World & Glow", default=False,
+ description="Also add a framed camera, a night sky and compositor bloom")
+
+ def execute(self, context):
+ try:
+ core.lib()
+ except RuntimeError as e:
+ self.report({"ERROR"}, str(e))
+ return {"CANCELLED"}
+ sysob = presets.build(context, self.preset, self.setup_scene)
+ for ob in context.selected_objects:
+ ob.select_set(False)
+ sysob.select_set(True)
+ context.view_layer.objects.active = sysob
+ context.scene.frame_set(sysob.nova.frame_start)
+ self.report({"INFO"}, f"{sysob.name}: press Play to preview, or Bake")
+ return {"FINISHED"}
+
+
+class NOVA_OT_bake(bpy.types.Operator):
+ """Simulate every frame and store it on disk (Esc stops)"""
+ bl_idname = "nova.bake"
+ bl_label = "Bake"
+
+ _timer = None
+
+ @classmethod
+ def poll(cls, context):
+ return system_of(context.object) is not None and not sim.STATE["baking"]
+
+ def invoke(self, context, event):
+ self.sysob = system_of(context.object)
+ try:
+ core.lib()
+ except RuntimeError as e:
+ self.report({"ERROR"}, str(e))
+ return {"CANCELLED"}
+ sim.free_cache(self.sysob)
+ n = self.sysob.nova
+ self.frame = n.frame_start
+ self.t0 = time.perf_counter()
+ sim.STATE["baking"] = True
+ wm = context.window_manager
+ wm.progress_begin(n.frame_start, n.frame_end)
+ self._timer = wm.event_timer_add(0.001, window=context.window)
+ wm.modal_handler_add(self)
+ return {"RUNNING_MODAL"}
+
+ def _finish(self, context, cancelled=False):
+ wm = context.window_manager
+ wm.event_timer_remove(self._timer)
+ wm.progress_end()
+ sim.STATE["baking"] = False
+ sysob = self.sysob
+ sim.wait_vdb(sysob)
+ if sysob.nova.fluid.enabled and sysob.nova.fluid.domain:
+ sim.ensure_volume_object(context.scene, sysob)
+ sim.refresh_volume(sysob)
+ context.workspace.status_text_set(None)
+ context.scene.frame_set(sysob.nova.frame_start)
+ dt = time.perf_counter() - self.t0
+ frames = self.frame - sysob.nova.frame_start
+ msg = f"{sysob.name}: {'stopped after' if cancelled else 'baked'} {frames} frames in {dt:.1f}s"
+ self.report({"WARNING" if cancelled else "INFO"}, msg)
+
+ def modal(self, context, event):
+ if event.type == "ESC":
+ self._finish(context, cancelled=True)
+ return {"CANCELLED"}
+ if event.type != "TIMER":
+ return {"PASS_THROUGH"}
+ sysob, scene = self.sysob, context.scene
+ n = sysob.nova
+ if self.frame > n.frame_end:
+ self._finish(context)
+ return {"FINISHED"}
+ scene.frame_set(self.frame)
+ try:
+ sim.step(scene, sysob, self.frame, context.evaluated_depsgraph_get())
+ except Exception as e:
+ self._finish(context, cancelled=True)
+ self.report({"ERROR"}, f"Nova FX: {e}")
+ return {"CANCELLED"}
+ sim.load_frame(sysob, self.frame)
+ st = sim.stats(sysob)
+ context.window_manager.progress_update(self.frame)
+ context.workspace.status_text_set(
+ f"Nova FX baking {sysob.name}: frame {self.frame}/{n.frame_end} · {st.get('count', 0):,} particles · "
+ f"{st.get('frame_ms', 0):.0f} ms/frame · Esc to stop")
+ self.frame += 1
+ return {"RUNNING_MODAL"}
+
+
+class NOVA_OT_free_cache(bpy.types.Operator):
+ """Delete this system's baked frames"""
+ bl_idname = "nova.free_cache"
+ bl_label = "Free Cache"
+
+ @classmethod
+ def poll(cls, context):
+ return system_of(context.object) is not None
+
+ def execute(self, context):
+ sysob = system_of(context.object)
+ sim.free_cache(sysob)
+ sim.load_frame(sysob, context.scene.frame_current)
+ return {"FINISHED"}
+
+
+class NOVA_OT_reset(bpy.types.Operator):
+ """Jump to the start frame and restart the live simulation"""
+ bl_idname = "nova.reset"
+ bl_label = "Restart"
+
+ def execute(self, context):
+ sysob = system_of(context.object)
+ if sysob:
+ sim._RT.pop(sysob.name, None)
+ context.scene.frame_set(sysob.nova.frame_start)
+ return {"FINISHED"}
+
+
+class NOVA_OT_kind_add(bpy.types.Operator):
+ """Add a particle type"""
+ bl_idname = "nova.kind_add"
+ bl_label = "Add Type"
+ bl_options = {"UNDO"}
+ duplicate: BoolProperty(default=False)
+
+ def execute(self, context):
+ n = system_of(context.object).nova
+ src = n.kinds[n.kinds_index] if self.duplicate and n.kinds else None
+ k = n.kinds.add()
+ base = (src.name if src else "Type")
+ names = {x.name for x in n.kinds}
+ name, i = base, 1
+ while name in names:
+ i += 1
+ name = f"{base} {i}"
+ if src:
+ for p in src.bl_rna.properties:
+ if p.identifier not in {"rna_type", "name"} and not p.is_readonly:
+ setattr(k, p.identifier, getattr(src, p.identifier))
+ k.name = name
+ k["_prev_name"] = name
+ n.kinds_index = len(n.kinds) - 1
+ return {"FINISHED"}
+
+
+class NOVA_OT_kind_remove(bpy.types.Operator):
+ """Remove the selected particle type"""
+ bl_idname = "nova.kind_remove"
+ bl_label = "Remove Type"
+ bl_options = {"UNDO"}
+
+ def execute(self, context):
+ n = system_of(context.object).nova
+ if n.kinds:
+ n.kinds.remove(n.kinds_index)
+ n.kinds_index = max(0, min(n.kinds_index, len(n.kinds) - 1))
+ return {"FINISHED"}
+
+
+class NOVA_OT_make(bpy.types.Operator):
+ """Turn the selected objects into Nova emitters, colliders or forces"""
+ bl_idname = "nova.make"
+ bl_label = "Make Nova Object"
+ bl_options = {"REGISTER", "UNDO"}
+
+ role: EnumProperty(items=[("EMITTER", "Emitter", ""), ("COLLIDER", "Collider", ""), ("FORCE", "Force", ""),
+ ("CLEAR", "Clear", "")])
+ system: EnumProperty(name="System", items=_system_items)
+
+ def invoke(self, context, event):
+ if self.role == "EMITTER" and len(sim.systems(context.scene)) > 1:
+ return context.window_manager.invoke_props_dialog(self)
+ return self.execute(context)
+
+ def execute(self, context):
+ systems = sim.systems(context.scene)
+ if self.role == "EMITTER" and not systems:
+ self.report({"ERROR"}, "Add a Nova system first (Add Effect → Empty System)")
+ return {"CANCELLED"}
+ sysob = bpy.data.objects.get(self.system) if self.system else None
+ sysob = sysob or (systems[0] if systems else None)
+ for ob in context.selected_objects or [context.object]:
+ if ob is None or ob.nova.is_system:
+ continue
+ if self.role == "EMITTER":
+ e = ob.nova_emitter
+ e.enabled, e.system = True, sysob
+ if not e.kind and sysob.nova.kinds:
+ e.kind = sysob.nova.kinds[0].name
+ e.shape = "SURFACE" if ob.type == "MESH" else "POINT"
+ e.frame_start, e.frame_end = sysob.nova.frame_start, sysob.nova.frame_end
+ elif self.role == "COLLIDER":
+ ob.nova_collider.enabled = True
+ ob.nova_collider.shape = "PLANE" if ob.type == "MESH" and max(ob.dimensions) > 0 and \
+ min(ob.dimensions) < 1e-4 else "BOX"
+ elif self.role == "FORCE":
+ ob.nova_force.enabled = True
+ else:
+ ob.nova_emitter.enabled = False
+ ob.nova_collider.enabled = False
+ ob.nova_force.enabled = False
+ return {"FINISHED"}
+
+
+class NOVA_OT_select_system(bpy.types.Operator):
+ """Select this emitter's system"""
+ bl_idname = "nova.select_system"
+ bl_label = "Select System"
+
+ def execute(self, context):
+ sysob = system_of(context.object)
+ if sysob:
+ for ob in context.selected_objects:
+ ob.select_set(False)
+ sysob.hide_set(False)
+ sysob.select_set(True)
+ context.view_layer.objects.active = sysob
+ return {"FINISHED"}
+
+
+class NOVA_OT_glow(bpy.types.Operator):
+ """Add bloom in the compositor so bright sparks bleed light"""
+ bl_idname = "nova.glow"
+ bl_label = "Add Glow"
+
+ def execute(self, context):
+ render.setup_glow(context.scene)
+ return {"FINISHED"}
+
+
+class NOVA_OT_build_core(bpy.types.Operator):
+ """Recompile the simulation core for this CPU"""
+ bl_idname = "nova.build_core"
+ bl_label = "Rebuild Core"
+
+ def execute(self, context):
+ ok, log = core.build(force=True)
+ self.report({"INFO"} if ok else {"ERROR"}, "Core rebuilt (restart Blender to load it)" if ok else log[-500:])
+ return {"FINISHED"} if ok else {"CANCELLED"}
+
+
+CLASSES = (NOVA_OT_add_preset, NOVA_OT_bake, NOVA_OT_free_cache, NOVA_OT_reset, NOVA_OT_kind_add,
+ NOVA_OT_kind_remove, NOVA_OT_make, NOVA_OT_select_system, NOVA_OT_glow, NOVA_OT_build_core)
diff --git a/vendor/nova-fx/addon/nova_fx/params.py b/vendor/nova-fx/addon/nova_fx/params.py
new file mode 100644
index 0000000..ef92fd9
--- /dev/null
+++ b/vendor/nova-fx/addon/nova_fx/params.py
@@ -0,0 +1,177 @@
+"""UI metadata for every particle-type parameter. Names match the C core (see KIND_PARAMS in
+nova_core.c) except colours, enums, booleans and type references, which are mapped in pack_kind()."""
+
+import math
+
+import numpy as np
+
+COLOR_MODES = [
+ ("FIXED", "Fixed", "One colour for the whole life"),
+ ("GRADIENT", "Gradient", "Blend from Color to End Color over the life"),
+ ("BLACKBODY", "Incandescent", "Glowing hot matter: colour and brightness from temperature (Planck, T^4)"),
+]
+PATTERNS = [
+ ("SPHERE", "Sphere", "Evenly spaced burst (peony, chrysanthemum)"),
+ ("RANDOM", "Random", "Filled random ball (explosion debris, crackle)"),
+ ("RING", "Ring", "Flat ring with a random tilt"),
+ ("PALM", "Palm", "A few heavy arms over the top half"),
+ ("CROSS", "Crossette", "Four-way cross across the direction of travel"),
+ ("HEART", "Heart", "Heart shape in a vertical plane"),
+ ("CONE", "Cone", "Spray around the direction of travel"),
+ ("HEMI", "Upper Half", "Random over the upper hemisphere (fountains, splashes)"),
+]
+COLLIDE = [
+ ("NONE", "Pass Through", "Ignore colliders"),
+ ("BOUNCE", "Bounce", "Bounce off colliders"),
+ ("DIE", "Die", "Die on contact"),
+ ("STICK", "Stick", "Stop and slide on contact"),
+]
+
+# (name, type, default, options). Types: F float, I int, B bool, E enum, K particle-type reference,
+# C colour (maps to three C params). "group" decides the UI box.
+KIND_SPEC = [
+ ("life_min", "F", 1.0, dict(min=0.001, soft_max=20, unit="TIME_ABSOLUTE", group="life", desc="Shortest lifetime")),
+ ("life_max", "F", 2.0, dict(min=0.001, soft_max=20, unit="TIME_ABSOLUTE", group="life", desc="Longest lifetime")),
+ ("size_start", "F", 0.02, dict(min=0, soft_max=1, unit="LENGTH", group="life", desc="Radius at birth")),
+ ("size_end", "F", 0.01, dict(min=0, soft_max=1, unit="LENGTH", group="life", desc="Radius at death")),
+ ("size_var", "F", 0.2, dict(min=0, max=1, group="life", desc="Random size variation")),
+ ("size_curve", "F", 1.0, dict(min=0.05, soft_max=8, group="life", desc="Shape of the size change (1 linear, >1 late, <1 early)")),
+
+ ("gravity", "F", 1.0, dict(soft_min=-2, soft_max=2, group="motion", desc="Gravity multiplier")),
+ ("drag_lin", "F", 0.0, dict(min=0, soft_max=10, group="motion", desc="Linear air drag (1/s). Wind acts through drag")),
+ ("drag_quad", "F", 0.0, dict(min=0, soft_max=5, group="motion", desc="Quadratic air drag: fast things slow down sharply (tiny hot sparks)")),
+ ("buoyancy", "F", 0.0, dict(soft_min=-10, soft_max=10, group="motion", desc="Upward push per 1000 K above ambient (hot embers rise)")),
+ ("turb", "F", 1.0, dict(soft_min=0, soft_max=5, group="motion", desc="How strongly the system turbulence moves this type")),
+ ("wind", "F", 1.0, dict(soft_min=0, soft_max=2, group="motion", desc="How much the system wind applies")),
+ ("force", "F", 1.0, dict(soft_min=0, soft_max=5, group="motion", desc="How strongly force objects act on this type")),
+ ("fluid_drag", "F", 0.0, dict(min=0, soft_max=20, group="motion", desc="Ride the fluid: pull toward the fluid velocity (1/s)")),
+
+ ("color_mode", "E", "FIXED", dict(items=COLOR_MODES, group="color", desc="How colour is decided")),
+ ("color", "C", (1.0, 0.6, 0.2), dict(group="color", desc="Colour (start colour for Gradient)")),
+ ("color2", "C", (1.0, 0.2, 0.05), dict(group="color", desc="End colour for Gradient")),
+ ("color_var", "F", 0.1, dict(min=0, max=1, group="color", desc="Random hue and brightness variation")),
+ ("color_curve", "F", 1.0, dict(min=0.05, soft_max=8, group="color", desc="Shape of the gradient over life")),
+ ("hue_random", "F", 0.0, dict(min=0, max=1, group="color", desc="Random hue rotation per particle (1 = any hue)")),
+ ("inherit_color", "B", False, dict(group="color", desc="Children take this colour from their parent")),
+ ("temp0", "F", 2200.0, dict(min=300, soft_max=8000, group="color", desc="Birth temperature in kelvin (Incandescent)")),
+ ("temp_var", "F", 200.0, dict(min=0, soft_max=2000, group="color", desc="Random temperature variation (K)")),
+ ("cool", "F", 0.5, dict(min=0, soft_max=10, group="color", desc="Newton cooling rate (1/s)")),
+ ("cool_rad", "F", 0.0, dict(min=0, soft_max=10, group="color", desc="Radiative T^4 cooling: very hot things cool fast")),
+ ("emit", "F", 10.0, dict(min=0, soft_max=500, group="color", desc="Emission strength")),
+ ("emit_var", "F", 0.2, dict(min=0, max=1, group="color", desc="Random emission variation")),
+ ("fade_in", "F", 0.02, dict(min=0, max=1, group="color", desc="Fraction of life to fade in")),
+ ("fade_out", "F", 0.3, dict(min=0, max=1, group="color", desc="Fraction of life to fade out")),
+ ("twinkle_freq", "F", 0.0, dict(min=0, soft_max=40, group="color", desc="Strobe / glitter flashes per second")),
+ ("twinkle_amt", "F", 0.0, dict(min=0, max=1, group="color", desc="How dark the strobe goes between flashes")),
+
+ ("collide", "E", "BOUNCE", dict(items=COLLIDE, group="collide", desc="Reaction to collider objects")),
+ ("bounce", "F", 0.3, dict(min=0, max=1.5, group="collide", desc="Bounciness")),
+ ("friction", "F", 0.2, dict(min=0, max=1, group="collide", desc="Sliding friction")),
+ ("hit_kind", "K", "", dict(group="collide", desc="Spawn this type on impact")),
+ ("hit_count", "F", 0.0, dict(min=0, soft_max=20, group="collide", desc="Children per impact (fractions are probabilities)")),
+ ("hit_speed", "F", 2.0, dict(min=0, soft_max=50, unit="VELOCITY", group="collide", desc="Splash speed")),
+
+ ("death_kind", "K", "", dict(group="death", desc="Spawn this type when the particle dies (bursts, shells)")),
+ ("death_count", "I", 0, dict(min=0, max=4000, group="death", desc="Children per death")),
+ ("death_pattern", "E", "SPHERE", dict(items=PATTERNS, group="death", desc="Burst shape")),
+ ("death_speed", "F", 10.0, dict(min=0, soft_max=100, unit="VELOCITY", group="death", desc="Burst speed")),
+ ("death_speed_var", "F", 0.15, dict(min=0, max=1, group="death", desc="Burst speed variation")),
+ ("death_inherit", "F", 0.3, dict(soft_min=0, soft_max=1, group="death", desc="Share of parent velocity children keep")),
+
+ ("trail_kind", "K", "", dict(group="trail", desc="Leave a trail of this type")),
+ ("trail_rate", "F", 0.0, dict(min=0, soft_max=500, group="trail", desc="Trail particles per second")),
+ ("trail_inherit", "F", 0.2, dict(soft_min=0, soft_max=1, group="trail", desc="Share of parent velocity")),
+ ("trail_jitter", "F", 0.3, dict(min=0, soft_max=10, unit="VELOCITY", group="trail", desc="Random trail speed")),
+
+ ("split_kind", "K", "", dict(group="split", desc="Break apart into this type at random moments (sparkler branching)")),
+ ("split_rate", "F", 0.0, dict(min=0, soft_max=30, group="split", desc="Chance per second to split")),
+ ("split_count", "I", 3, dict(min=0, max=255, group="split", desc="Pieces per split")),
+ ("split_speed", "F", 3.0, dict(min=0, soft_max=50, unit="VELOCITY", group="split", desc="Speed of the pieces")),
+ ("split_inherit", "F", 0.7, dict(soft_min=0, soft_max=1, group="split", desc="Share of parent velocity")),
+ ("split_max_gen", "I", 3, dict(min=0, max=15, group="split", desc="Generations that may split again")),
+
+ ("fl_smoke", "F", 0.0, dict(min=0, soft_max=50, group="fluid", desc="Smoke added to the fluid per second")),
+ ("fl_heat", "F", 0.0, dict(min=0, soft_max=50, group="fluid", desc="Heat added to the fluid per second")),
+ ("fl_fuel", "F", 0.0, dict(min=0, soft_max=50, group="fluid", desc="Fuel added to the fluid per second (particles that ignite)")),
+]
+
+KIND_GROUPS = [
+ ("life", "Life & Size", "TIME"),
+ ("motion", "Motion", "FORCE_FORCE"),
+ ("color", "Color & Light", "LIGHT_SUN"),
+ ("collide", "Collision", "MOD_PHYSICS"),
+ ("death", "On Death: Burst", "OUTLINER_OB_FORCE_FIELD"),
+ ("trail", "Trail", "CURVE_PATH"),
+ ("split", "Split / Branch", "OUTLINER_DATA_LIGHTPROBE"),
+ ("fluid", "Feed the Fluid", "MOD_FLUIDSIM"),
+]
+
+ENUM_INDEX = {
+ "color_mode": [i[0] for i in COLOR_MODES],
+ "death_pattern": [i[0] for i in PATTERNS],
+ "collide": [i[0] for i in COLLIDE],
+}
+
+
+def pack_kind(kind, names):
+ """Blender NovaKind -> dict of C params. names: list of kind names (for references)."""
+ d = {}
+ for name, t, _default, _o in KIND_SPEC:
+ v = getattr(kind, name)
+ if t == "C":
+ pre = "c0" if name == "color" else "c1"
+ d[pre + "r"], d[pre + "g"], d[pre + "b"] = v[0], v[1], v[2]
+ elif t == "E":
+ d[name] = ENUM_INDEX[name].index(v)
+ elif t == "K":
+ d[name] = names.index(v) if v in names else -1
+ elif t == "B":
+ d[name] = 1.0 if v else 0.0
+ else:
+ d[name] = float(v)
+ return d
+
+
+# ---------------------------------------------------------------- spectral colours
+
+def _g(l, mu, s1, s2):
+ s = np.where(l < mu, s1, s2)
+ return np.exp(-0.5 * ((l - mu) / s) ** 2)
+
+
+def _xyz(l):
+ x = 1.056 * _g(l, 599.8, 37.9, 31.0) + 0.362 * _g(l, 442.0, 16.0, 26.7) - 0.065 * _g(l, 501.1, 20.4, 26.2)
+ y = 0.821 * _g(l, 568.8, 46.9, 40.5) + 0.286 * _g(l, 530.9, 16.3, 31.1)
+ z = 1.217 * _g(l, 437.0, 11.8, 36.0) + 0.681 * _g(l, 459.0, 26.0, 13.8)
+ return np.stack([x, y, z], -1)
+
+
+_XYZ2RGB = np.array([[3.2406, -1.5372, -0.4986], [-0.9689, 1.8758, 0.0415], [0.0557, -0.2040, 1.0570]])
+
+
+def spectrum_rgb(lines):
+ """Linear Rec.709 colour of an emission spectrum given as [(wavelength_nm, weight), ...],
+ each line broadened to a ~6 nm Gaussian. Out-of-gamut parts are clipped, max channel = 1."""
+ l = np.arange(380.0, 781.0, 1.0)
+ s = np.zeros_like(l)
+ for wl, w in lines:
+ s += w * np.exp(-0.5 * ((l - wl) / 6.0) ** 2)
+ XYZ = (_xyz(l) * s[:, None]).sum(0)
+ rgb = np.clip(_XYZ2RGB @ XYZ, 0, None)
+ return tuple(float(c) for c in rgb / max(rgb.max(), 1e-9))
+
+
+# Firework colour chemistry: dominant molecular emitters in the flame.
+CHEMISTRY = {
+ "STRONTIUM": ("Strontium red", [(606, 0.35), (636, 0.7), (661, 1.0), (674, 0.8)]),
+ "CALCIUM": ("Calcium orange", [(593, 1.0), (606, 0.4), (618, 0.8)]),
+ "SODIUM": ("Sodium yellow", [(589, 1.0)]),
+ "BARIUM": ("Barium green", [(507, 0.6), (513, 1.0), (524, 0.9), (532, 0.6)]),
+ "COPPER": ("Copper blue", [(428, 0.8), (435, 1.0), (443, 0.9), (452, 0.6)]),
+ "PURPLE": ("Strontium + copper purple", [(435, 1.0), (443, 0.8), (661, 0.75), (636, 0.4)]),
+}
+
+
+def chem(name, boost=1.0):
+ c = spectrum_rgb(CHEMISTRY[name][1])
+ return tuple(min(1.0, x * boost) for x in c)
diff --git a/vendor/nova-fx/addon/nova_fx/presets.py b/vendor/nova-fx/addon/nova_fx/presets.py
new file mode 100644
index 0000000..301372f
--- /dev/null
+++ b/vendor/nova-fx/addon/nova_fx/presets.py
@@ -0,0 +1,560 @@
+"""Ready-made effects. Each builder creates a system, its particle types, emitters and helpers."""
+
+import math
+
+import bmesh
+import bpy
+from mathutils import Euler, Matrix, Vector
+
+from . import render, sim
+from .params import chem
+
+# ------------------------------------------------------------------ building blocks
+
+
+def _collection(context, name):
+ coll = bpy.data.collections.new(name)
+ context.scene.collection.children.link(coll)
+ return coll
+
+
+def new_system(context, coll, name, kinds, frame_end=None, **settings):
+ pc = bpy.data.pointclouds.new(name)
+ ob = bpy.data.objects.new(name, pc)
+ coll.objects.link(ob)
+ n = ob.nova
+ n.is_system = True
+ scene = context.scene
+ n.frame_start = scene.frame_start
+ n.frame_end = frame_end or scene.frame_end
+ for kd in kinds:
+ k = n.kinds.add()
+ for key, val in kd.items():
+ setattr(k, key, val)
+ k["_prev_name"] = k.name
+ for key, val in settings.items():
+ if key == "fluid":
+ for fk, fv in val.items():
+ setattr(n.fluid, fk, fv)
+ else:
+ setattr(n, key, val)
+ render.sync_display(ob)
+ render.sync_materials(ob)
+ scene.render.use_lock_interface = True # handlers swap point data while rendering
+ return ob
+
+
+def _empty(coll, name, loc, rot=(0, 0, 0), kind="SPHERE", size=0.1, scale=(1, 1, 1)):
+ ob = bpy.data.objects.new(name, None)
+ ob.empty_display_type = kind
+ ob.empty_display_size = size
+ ob.location = loc
+ ob.rotation_euler = rot
+ ob.scale = scale
+ coll.objects.link(ob)
+ return ob
+
+
+def emitter(coll, sysob, name, kind, loc, rot=(0, 0, 0), display="SPHERE", size=0.1, scale=(1, 1, 1), ob=None,
+ **em):
+ ob = ob or _empty(coll, name, loc, rot, display, size, scale)
+ e = ob.nova_emitter
+ e.enabled = True
+ e.system = sysob
+ e.kind = kind
+ e.frame_start = sysob.nova.frame_start
+ e.frame_end = sysob.nova.frame_end
+ for key, val in em.items():
+ setattr(e, key, val)
+ return ob
+
+
+def _mesh(coll, name, build, loc=(0, 0, 0), rot=(0, 0, 0), mat=None):
+ me = bpy.data.meshes.new(name)
+ bm = bmesh.new()
+ build(bm)
+ bm.to_mesh(me)
+ bm.free()
+ ob = bpy.data.objects.new(name, me)
+ ob.location = loc
+ ob.rotation_euler = rot
+ coll.objects.link(ob)
+ if mat:
+ me.materials.append(mat)
+ return ob
+
+
+def _charred_wood(name="Nova Charred Wood"):
+ """Black, cracked bark; the cracks glow like embers (emission masked by Voronoi cell edges)."""
+ mat = bpy.data.materials.get(name)
+ if mat:
+ return mat
+ mat = bpy.data.materials.new(name)
+ mat.use_nodes = True
+ nt = mat.node_tree
+ bsdf = next(n for n in nt.nodes if n.type == "BSDF_PRINCIPLED")
+ bsdf.inputs["Roughness"].default_value = 0.9
+ vor = nt.nodes.new("ShaderNodeTexVoronoi")
+ vor.feature = "DISTANCE_TO_EDGE"
+ vor.inputs["Scale"].default_value = 22.0
+ vor.inputs["Randomness"].default_value = 0.9
+ crack = nt.nodes.new("ShaderNodeMapRange") # thin bright lines along the cell edges
+ crack.inputs["From Min"].default_value = 0.0
+ crack.inputs["From Max"].default_value = 0.06
+ crack.inputs["To Min"].default_value = 1.0
+ crack.inputs["To Max"].default_value = 0.0
+ noise = nt.nodes.new("ShaderNodeTexNoise") # not every crack is equally hot
+ noise.inputs["Scale"].default_value = 4.0
+ heat = nt.nodes.new("ShaderNodeMath")
+ heat.operation = "MULTIPLY"
+ hot = nt.nodes.new("ShaderNodeMapRange")
+ hot.inputs["From Min"].default_value = 0.45
+ hot.inputs["From Max"].default_value = 0.7
+ strength = nt.nodes.new("ShaderNodeMath")
+ strength.operation = "MULTIPLY"
+ strength.inputs[1].default_value = 6.0
+ bark = nt.nodes.new("ShaderNodeValToRGB") # ash-grey to black bark
+ bark.color_ramp.elements[0].color = (0.006, 0.005, 0.004, 1)
+ bark.color_ramp.elements[1].color = (0.05, 0.045, 0.04, 1)
+ L = nt.links.new
+ L(vor.outputs["Distance"], crack.inputs["Value"])
+ L(noise.outputs["Fac"], hot.inputs["Value"])
+ L(crack.outputs["Result"], heat.inputs[0])
+ L(hot.outputs["Result"], heat.inputs[1])
+ L(heat.outputs["Value"], strength.inputs[0])
+ L(strength.outputs["Value"], bsdf.inputs["Emission Strength"])
+ L(noise.outputs["Fac"], bark.inputs["Fac"])
+ L(bark.outputs["Color"], bsdf.inputs["Base Color"])
+ bsdf.inputs["Emission Color"].default_value = (1.0, 0.22, 0.03, 1)
+ mat.diffuse_color = (0.02, 0.015, 0.012, 1)
+ return mat
+
+
+def _plain_material(name, color, rough=0.8, emit=None, emit_strength=0.0):
+ mat = bpy.data.materials.get(name) or bpy.data.materials.new(name)
+ if not mat.node_tree:
+ mat.use_nodes = True
+ bsdf = next((n for n in mat.node_tree.nodes if n.type == "BSDF_PRINCIPLED"), None)
+ if bsdf:
+ bsdf.inputs["Base Color"].default_value = (*color, 1)
+ bsdf.inputs["Roughness"].default_value = rough
+ if emit:
+ bsdf.inputs["Emission Color"].default_value = (*emit, 1)
+ bsdf.inputs["Emission Strength"].default_value = emit_strength
+ mat.diffuse_color = (*color, 1)
+ return mat
+
+
+def ground(coll, size=20.0, z=0.0, visible=True, name="Nova Ground"):
+ ob = _mesh(coll, name, lambda bm: bmesh.ops.create_grid(bm, x_segments=1, y_segments=1, size=size / 2),
+ (0, 0, z), mat=_plain_material("Nova Ground", (0.05, 0.05, 0.05), 0.6))
+ ob.nova_collider.enabled = True
+ ob.nova_collider.shape = "PLANE"
+ if not visible:
+ ob.hide_render = True
+ ob.display_type = "WIRE"
+ return ob
+
+
+def domain(coll, sysob, size, center, resolution, **fluid):
+ ob = _mesh(coll, sysob.name + " Domain",
+ lambda bm: bmesh.ops.create_cube(bm, size=1.0), center)
+ ob.scale = size
+ ob.display_type = "BOUNDS"
+ ob.hide_render = True
+ fl = sysob.nova.fluid
+ fl.enabled = True
+ fl.domain = ob
+ fl.resolution = resolution
+ for k, v in fluid.items():
+ setattr(fl, k, v)
+ return ob
+
+
+def camera(context, coll, loc, target, lens=35.0):
+ cam = bpy.data.cameras.new("Nova Camera")
+ cam.lens = lens
+ cam.clip_end = 2000
+ ob = bpy.data.objects.new("Nova Camera", cam)
+ ob.location = loc
+ d = Vector(target) - Vector(loc)
+ ob.rotation_euler = d.to_track_quat("-Z", "Y").to_euler()
+ coll.objects.link(ob)
+ context.scene.camera = ob
+ return ob
+
+
+def night_world(context, color=(0.0015, 0.002, 0.005)):
+ w = bpy.data.worlds.get("Nova Night") or bpy.data.worlds.new("Nova Night")
+ if not w.node_tree:
+ w.use_nodes = True
+ bg = next((n for n in w.node_tree.nodes if n.type == "BACKGROUND"), None)
+ if bg:
+ bg.inputs["Color"].default_value = (*color, 1)
+ bg.inputs["Strength"].default_value = 1.0
+ context.scene.world = w
+
+
+def _offset(coll, offset):
+ for ob in coll.objects:
+ if ob.parent is None and ob.type != "CAMERA":
+ ob.location = Vector(ob.location) + offset
+
+
+# ------------------------------------------------------------------ shared particle types
+
+def bb(name, T, life, size, emit, **kw):
+ """Incandescent (blackbody) type."""
+ d = dict(name=name, color_mode="BLACKBODY", temp0=T, temp_var=kw.pop("temp_var", 0.1 * T),
+ life_min=life[0], life_max=life[1], size_start=size[0], size_end=size[1], emit=emit,
+ collide=kw.pop("collide", "NONE"), fade_in=0.0, fade_out=kw.pop("fade_out", 0.15))
+ d.update(kw)
+ return d
+
+
+def col(name, color, life, size, emit, **kw):
+ d = dict(name=name, color_mode="FIXED", color=color, life_min=life[0], life_max=life[1], size_start=size[0],
+ size_end=size[1], emit=emit, collide=kw.pop("collide", "NONE"), fade_in=0.0,
+ fade_out=kw.pop("fade_out", 0.35), color_var=kw.pop("color_var", 0.05))
+ d.update(kw)
+ return d
+
+
+# ------------------------------------------------------------------ presets
+
+def build_sparkler(context, coll):
+ s = new_system(context, coll, "Sparkler", [
+ bb("Spark", 2500, (0.15, 0.4), (0.0008, 0.0003), 40, size_var=0.35, drag_quad=25.0, drag_lin=0.5,
+ cool=2.5, cool_rad=1.0, emit_var=0.3, gravity=0.6, split_kind="Spark", split_rate=4.0, split_count=3,
+ split_speed=1.3, split_inherit=0.5, split_max_gen=3),
+ bb("Core Glow", 2900, (0.04, 0.08), (0.004, 0.002), 80, size_var=0.3, emit_var=0.4, gravity=0.0),
+ ], display="STREAKS", streak_length=0.015, substeps=3)
+ stick_mat = _plain_material("Nova Sparkler Wire", (0.25, 0.25, 0.27), 0.4)
+ _mesh(coll, "Sparkler Wire",
+ lambda bm: bmesh.ops.create_cone(bm, cap_ends=True, segments=8, radius1=0.0015, radius2=0.0015,
+ depth=0.35), (0, 0, 0.9), (0.6, 0, 0), stick_mat)
+ tip = Vector((0, 0, 0.9)) + Euler((0.6, 0, 0)).to_matrix() @ Vector((0, 0, 0.12))
+ burn_mat = _plain_material("Nova Sparkler Burn", (0.05, 0.04, 0.03), 0.7, (1.0, 0.45, 0.12), 25.0)
+ _mesh(coll, "Sparkler Coating",
+ lambda bm: bmesh.ops.create_cone(bm, cap_ends=True, segments=8, radius1=0.004, radius2=0.004,
+ depth=0.11),
+ Vector((0, 0, 0.9)) + Euler((0.6, 0, 0)).to_matrix() @ Vector((0, 0, 0.065)), (0.6, 0, 0), burn_mat)
+ emitter(coll, s, "Sparkler Tip", "Spark", tip, size=0.02, shape="SPHERE", radius=0.008, direction="RANDOM",
+ rate=700, speed=3.0, speed_var=0.45)
+ emitter(coll, s, "Sparkler Core", "Core Glow", tip, size=0.015, shape="SPHERE", radius=0.006,
+ direction="RANDOM", rate=400, speed=0.15, speed_var=0.5)
+ return s
+
+
+def build_grinder(context, coll):
+ s = new_system(context, coll, "Grinder Sparks", [
+ bb("Spark", 2300, (0.6, 1.4), (0.004, 0.0015), 30, drag_quad=0.25, cool=1.2, cool_rad=0.4,
+ collide="BOUNCE", bounce=0.35, friction=0.35, hit_kind="Spatter", hit_count=0.7, hit_speed=2.5,
+ split_kind="Spatter", split_rate=0.8, split_count=3, split_speed=1.5, split_max_gen=1),
+ bb("Spatter", 2100, (0.15, 0.4), (0.0025, 0.001), 20, drag_quad=1.0, cool=3.0, collide="BOUNCE",
+ bounce=0.2, friction=0.4),
+ ], display="STREAKS", streak_length=0.02, substeps=2)
+ ground(coll, 10)
+ emitter(coll, s, "Grinder Contact", "Spark", (0, 0, 0.6), (math.radians(115), 0, 0), "SINGLE_ARROW", 0.25,
+ shape="POINT", direction="OBJECT_Z", spread=0.18, rate=4000, speed=14, speed_var=0.35)
+ return s
+
+
+def build_fountain(context, coll):
+ s = new_system(context, coll, "Fountain", [
+ bb("Spark", 2000, (0.9, 1.6), (0.006, 0.002), 25, temp_var=150, drag_quad=0.35, cool=0.8, collide="BOUNCE",
+ bounce=0.25, friction=0.3, split_kind="Glitter", split_rate=1.2, split_count=4, split_speed=1.8,
+ split_max_gen=1),
+ bb("Glitter", 2600, (0.1, 0.35), (0.004, 0.002), 60, drag_quad=1.0, cool=3.0, twinkle_freq=15,
+ twinkle_amt=0.7),
+ ], display="STREAKS", streak_length=0.03, substeps=2)
+ ground(coll, 12)
+ emitter(coll, s, "Fountain Nozzle", "Spark", (0, 0, 0.05), (0, 0, 0), "SINGLE_ARROW", 0.3, shape="POINT",
+ direction="OBJECT_Z", spread=0.22, rate=3000, speed=8.5, speed_var=0.25)
+ return s
+
+
+# fireworks ----------------------------------------------------------------
+
+def _shell(name, star, count, pattern, speed, trail_rate=90, life=(2.6, 3.1), **kw):
+ d = bb("Shell " + name, 1900, life, (0.14, 0.1), 6, temp_var=100, drag_quad=0.006, cool=0.1,
+ trail_kind="Lift Spark", trail_rate=trail_rate, trail_inherit=0.05, trail_jitter=1.5,
+ death_kind=star, death_count=count, death_pattern=pattern, death_speed=speed, death_speed_var=0.08,
+ death_inherit=0.25, fade_out=0.0)
+ d.update(kw)
+ return d
+
+
+FIREWORK_KINDS = [
+ bb("Lift Spark", 1900, (0.3, 0.7), (0.09, 0.03), 40, temp_var=150, drag_quad=0.3, cool=1.5),
+ col("Ember", (1, 0.5, 0.2), (0.3, 0.7), (0.1, 0.0), 40, inherit_color=True, drag_lin=1.5, gravity=0.3,
+ fade_out=0.8),
+ bb("Gold Glitter", 2000, (0.5, 1.2), (0.1, 0.02), 60, temp_var=200, drag_lin=2.0, gravity=0.4, cool=0.9,
+ twinkle_freq=9, twinkle_amt=0.5),
+ bb("Willow Trail", 1800, (1.8, 3.0), (0.11, 0.03), 40, temp_var=120, drag_lin=2.5, gravity=0.25, cool=0.45,
+ fade_out=0.6),
+ col("Crackle", (1, 0.85, 0.6), (0.04, 0.12), (0.4, 0.08), 900, emit_var=0.5, drag_lin=3.0, gravity=0.0,
+ fade_out=0.5),
+ # stars
+ col("Peony Star", chem("STRONTIUM"), (1.6, 2.2), (0.32, 0.2), 300, drag_quad=0.07, trail_kind="Ember",
+ trail_rate=25),
+ bb("Chrysanthemum Star", 2300, (1.8, 2.4), (0.26, 0.16), 160, drag_quad=0.07, trail_kind="Gold Glitter",
+ trail_rate=60, cool=0.2),
+ bb("Willow Star", 1900, (3.5, 4.5), (0.2, 0.12), 120, drag_quad=0.25, gravity=0.6, cool=0.12,
+ trail_kind="Willow Trail", trail_rate=70),
+ bb("Palm Arm", 2200, (2.2, 2.8), (0.4, 0.24), 220, drag_quad=0.04, cool=0.15, trail_kind="Gold Glitter",
+ trail_rate=150),
+ col("Ring Star", chem("COPPER"), (1.5, 2.0), (0.32, 0.2), 320, drag_quad=0.07, trail_kind="Ember",
+ trail_rate=15),
+ col("Crossette Star", chem("BARIUM"), (0.9, 1.1), (0.32, 0.28), 260, drag_quad=0.05, fade_out=0.0,
+ death_kind="Crossette Piece", death_count=4, death_pattern="CROSS", death_speed=9, death_inherit=0.6),
+ col("Crossette Piece", chem("BARIUM"), (0.9, 1.3), (0.26, 0.14), 240, inherit_color=True, drag_quad=0.07,
+ trail_kind="Ember", trail_rate=25),
+ col("Crackle Star", chem("PURPLE"), (1.4, 1.8), (0.3, 0.2), 280, drag_quad=0.07, death_kind="Crackle",
+ death_count=10, death_pattern="RANDOM", death_speed=4),
+ col("Strobe Star", (1, 1, 1), (2.0, 2.8), (0.3, 0.22), 300, drag_quad=0.06, twinkle_freq=14,
+ twinkle_amt=1.0, color_var=0.0),
+ col("Heart Star", (1.0, 0.25, 0.55), (1.8, 2.2), (0.32, 0.2), 300, drag_quad=0.05, gravity=0.6,
+ trail_kind="Ember", trail_rate=15),
+ col("Rainbow Star", (1, 0.3, 0.1), (1.6, 2.2), (0.32, 0.2), 280, inherit_color=True, drag_quad=0.07,
+ trail_kind="Ember", trail_rate=20),
+ dict(col("Change Star", chem("BARIUM"), (1.8, 2.4), (0.32, 0.2), 280, drag_quad=0.07, trail_kind="Ember",
+ trail_rate=20), color_mode="GRADIENT", color2=chem("STRONTIUM"), color_curve=2.0),
+ # shells (rise, then burst)
+ _shell("Peony", "Peony Star", 150, "SPHERE", 24),
+ _shell("Chrysanthemum", "Chrysanthemum Star", 160, "SPHERE", 26),
+ _shell("Willow", "Willow Star", 110, "SPHERE", 22),
+ _shell("Palm", "Palm Arm", 8, "PALM", 30, trail_rate=220),
+ _shell("Ring", "Ring Star", 64, "RING", 22),
+ _shell("Crossette", "Crossette Star", 24, "SPHERE", 20),
+ _shell("Crackle", "Crackle Star", 120, "SPHERE", 22),
+ _shell("Strobe", "Strobe Star", 140, "SPHERE", 22),
+ _shell("Heart", "Heart Star", 90, "HEART", 22),
+ dict(_shell("Multicolor", "Rainbow Star", 150, "SPHERE", 24), hue_random=1.0, color_mode="FIXED",
+ color=(1, 0.2, 0.1)),
+ _shell("Color Change", "Change Star", 150, "SPHERE", 24),
+]
+
+SHELLS = ["Peony", "Chrysanthemum", "Willow", "Palm", "Ring", "Crossette", "Crackle", "Strobe", "Heart",
+ "Multicolor", "Color Change"]
+
+
+def build_fireworks(context, coll, shells=None, rate=0.2):
+ shells = shells or SHELLS
+ s = new_system(context, coll, "Fireworks", FIREWORK_KINDS, display="STREAKS", streak_length=0.04,
+ substeps=2, max_particles=4_000_000)
+ span = 120.0
+ for i, name in enumerate(shells):
+ x = -span / 2 + span * (i + 0.5) / len(shells)
+ tilt = math.radians(6) * math.sin(i * 2.1)
+ emitter(coll, s, f"Launcher {name}", "Shell " + name, (x, 0, 0), (tilt, 0, 0), "SINGLE_ARROW", 3.0,
+ shape="POINT", direction="OBJECT_Z", spread=math.radians(5), rate=rate, random_timing=True,
+ speed=48, speed_var=0.08, seed=i * 7 + 1)
+ return s
+
+
+# fire ---------------------------------------------------------------------
+
+def build_campfire(context, coll):
+ s = new_system(context, coll, "Campfire", [
+ bb("Ember", 1500, (2.0, 4.5), (0.006, 0.003), 18, temp_var=250, cool=0.25, cool_rad=0.5, fluid_drag=3.0,
+ drag_lin=0.3, twinkle_freq=4, twinkle_amt=0.5, fade_out=0.3, collide="BOUNCE", bounce=0.1),
+ bb("Pop Spark", 2100, (0.3, 0.8), (0.004, 0.0015), 30, drag_quad=0.6, cool=2.0, fluid_drag=0.8),
+ ], turb_amp=2.5, turb_freq=1.5, substeps=2,
+ fluid=dict(buoy_heat=2.2, buoy_smoke=0.15, vorticity=0.7, turb_amp=7.0, turb_freq=4.0, cool=1.4,
+ cool_rad=0.4, burn_rate=1.8, heat_release=1.6, ignite=0.2, smoke_yield=0.35, expansion=0.4,
+ flame_decay=6.0, smoke_decay=0.15, density_mult=4.0, flame_mult=2.0, heat_mult=1.2))
+ domain(coll, s, (1.6, 1.6, 2.6), (0, 0, 1.3), 96)
+ ground(coll, 8)
+ log_mat = _charred_wood()
+ for i in range(4):
+ a = i * math.pi / 2 + 0.4
+ _mesh(coll, f"Log {i + 1}", lambda bm: bmesh.ops.create_cone(bm, cap_ends=True, segments=10,
+ radius1=0.06, radius2=0.05, depth=0.7),
+ (0.18 * math.cos(a), 0.18 * math.sin(a), 0.12), (math.radians(70), 0, a + math.pi / 2), log_mat)
+ emitter(coll, s, "Fire Source", "", (0, 0, 0.14), size=0.25, scale=(1, 1, 0.4), shape="SPHERE", radius=0.25,
+ rate=0, fl_enabled=True, fl_fuel=1.4, fl_heat=0.8, fl_speed=0.6, fl_noise=0.7, direction="OBJECT_Z")
+ emitter(coll, s, "Ember Source", "Ember", (0, 0, 0.2), size=0.2, shape="SPHERE", radius=0.2, rate=25,
+ speed=1.2, speed_var=0.6, spread=0.6)
+ emitter(coll, s, "Pops", "Pop Spark", (0, 0, 0.18), size=0.15, shape="SPHERE", radius=0.15, rate=10,
+ random_timing=True, speed=4, speed_var=0.5, spread=0.9)
+ return s
+
+
+def build_torch(context, coll):
+ s = new_system(context, coll, "Torch", [
+ bb("Ember", 1600, (1.0, 2.0), (0.004, 0.002), 14, cool=0.4, fluid_drag=4.0, twinkle_freq=5,
+ twinkle_amt=0.4),
+ ], turb_amp=1.5, turb_freq=3.0,
+ fluid=dict(buoy_heat=3.0, buoy_smoke=0.1, vorticity=0.5, turb_amp=3.0, turb_freq=6.0, cool=1.8,
+ cool_rad=0.4, burn_rate=4.0, heat_release=1.6, smoke_yield=0.15, expansion=0.3,
+ flame_decay=8.0, smoke_decay=0.3, density_mult=3.0, flame_mult=9.0, heat_mult=3.0))
+ domain(coll, s, (0.8, 0.8, 1.4), (0, 0, 1.62), 80)
+ handle_mat = _plain_material("Nova Torch Handle", (0.08, 0.05, 0.03), 0.8)
+ _mesh(coll, "Torch Handle", lambda bm: bmesh.ops.create_cone(bm, cap_ends=True, segments=12, radius1=0.02,
+ radius2=0.035, depth=0.6), (0, 0, 0.62),
+ mat=handle_mat)
+ emitter(coll, s, "Torch Flame", "Ember", (0, 0, 0.98), size=0.06, shape="SPHERE", radius=0.05, rate=8,
+ speed=0.8, fl_enabled=True, fl_fuel=1.2, fl_heat=1.0, fl_speed=1.2, fl_noise=0.6)
+ return s
+
+
+def build_explosion(context, coll):
+ s = new_system(context, coll, "Explosion", [
+ bb("Debris", 1800, (1.0, 2.5), (0.05, 0.025), 12, drag_quad=0.05, cool=0.7, collide="BOUNCE", bounce=0.3,
+ trail_kind="Debris Trail", trail_rate=30, fl_smoke=1.5, fl_heat=0.6),
+ bb("Debris Trail", 1600, (0.3, 0.8), (0.035, 0.0), 6, drag_lin=2.0, cool=1.0),
+ ], frame_end=120, substeps=2,
+ fluid=dict(buoy_heat=3.0, buoy_smoke=0.04, vorticity=1.0, turb_amp=5.0, turb_freq=0.5, cool=0.5,
+ cool_rad=0.12, burn_rate=3.0, heat_release=2.0, ignite=0.15, smoke_yield=1.5, expansion=8.0,
+ flame_decay=2.5, smoke_decay=0.02, density_mult=1.2, flame_mult=3.0, heat_mult=0.8,
+ max_sub=4, smoke_color=(0.22, 0.21, 0.2)))
+ domain(coll, s, (16, 16, 16), (0, 0, 8), 96)
+ ground(coll, 60)
+ emitter(coll, s, "Blast Core", "", (0, 0, 1.5), size=1.2, shape="SPHERE", radius=1.2, rate=0,
+ fl_enabled=True, fl_fuel=4.0, fl_heat=1.5, fl_density=0.5, fl_noise=0.6, frame_end=context.scene.frame_start + 1)
+ emitter(coll, s, "Debris Burst", "Debris", (0, 0, 1.5), size=0.5, shape="SPHERE", radius=0.5, rate=0,
+ burst=150, burst_frame=context.scene.frame_start, direction="NORMAL", speed=24, speed_var=0.5,
+ spread=0.3)
+ sun = bpy.data.lights.new("Nova Sun", "SUN")
+ sun.energy = 2.0
+ sun_ob = bpy.data.objects.new("Nova Sun", sun)
+ sun_ob.rotation_euler = (math.radians(55), 0, math.radians(-35))
+ coll.objects.link(sun_ob)
+ return s
+
+
+# magic --------------------------------------------------------------------
+
+def build_magic_dust(context, coll):
+ s = new_system(context, coll, "Magic Dust", [
+ dict(name="Dust", color_mode="GRADIENT", color=(0.25, 0.7, 1.0), color2=(0.9, 0.3, 1.0), color_var=0.3,
+ life_min=0.8, life_max=2.0, size_start=0.012, size_end=0.0, size_curve=0.7, gravity=-0.05,
+ drag_lin=2.5, emit=1.8, emit_var=0.6, twinkle_freq=10, twinkle_amt=0.75, fade_in=0.05,
+ fade_out=0.6, collide="NONE"),
+ col("Glint", (1, 0.95, 0.85), (0.15, 0.4), (0.03, 0.0), 120, drag_lin=3, gravity=0.0, fade_out=0.8),
+ ], turb_amp=3.0, turb_freq=2.0, turb_speed=1.0)
+ wand = emitter(coll, s, "Wand Tip", "Dust", (0, 0, 1.2), size=0.05, shape="SPHERE", radius=0.03, rate=1500,
+ direction="RANDOM", speed=0.25, speed_var=0.5, inherit=0.25)
+ emitter(coll, s, "Wand Glints", "Glint", (0, 0, 0), size=0.03, shape="SPHERE", radius=0.04, rate=40,
+ direction="RANDOM", speed=0.4).parent = wand
+ # a figure-eight flight path so it looks right on the first play
+ f0, f1 = context.scene.frame_start, context.scene.frame_start + 119
+ for i in range(13):
+ t = i / 12
+ a = t * 2 * math.pi
+ wand.location = (1.2 * math.sin(a), 0.6 * math.sin(2 * a), 1.2 + 0.25 * math.sin(3 * a))
+ wand.keyframe_insert("location", frame=f0 + t * (f1 - f0))
+ return s
+
+
+def build_embers(context, coll):
+ s = new_system(context, coll, "Drifting Embers", [
+ bb("Ember", 1400, (4.0, 8.0), (0.012, 0.006), 14, temp_var=250, cool=0.15, cool_rad=0.3, gravity=0.0,
+ buoyancy=0.6, drag_lin=1.0, twinkle_freq=3, twinkle_amt=0.4, fade_in=0.1, fade_out=0.3),
+ ], turb_amp=1.5, turb_freq=0.6, wind=(1.0, 0, 0))
+ _plane = _mesh(coll, "Ember Field", lambda bm: bmesh.ops.create_grid(bm, x_segments=1, y_segments=1, size=3),
+ (0, 0, 0.05))
+ _plane.hide_render = True
+ _plane.display_type = "WIRE"
+ emitter(coll, s, "Ember Field", "Ember", None, ob=_plane, shape="SURFACE", rate=150, speed=0.6, spread=0.5,
+ direction="NORMAL")
+ return s
+
+
+def build_vortex(context, coll):
+ s = new_system(context, coll, "Energy Vortex", [
+ dict(name="Energy", color_mode="GRADIENT", color=(0.2, 0.55, 1.0), color2=(0.75, 0.2, 1.0), color_var=0.25,
+ color_curve=0.7, life_min=4, life_max=6, size_start=0.012, size_end=0.004, gravity=0.0, drag_lin=0.8,
+ emit=1.6, emit_var=0.5, twinkle_freq=3, twinkle_amt=0.3, fade_in=0.1, fade_out=0.4, collide="NONE"),
+ ], turb_amp=0.6, turb_freq=0.8, display="STREAKS", streak_length=0.12)
+ emitter(coll, s, "Energy Disc", "Energy", (0, 0, 0), size=3.5, scale=(1, 1, 0.08), shape="SPHERE", radius=3.5,
+ rate=1500, direction="RANDOM", speed=0.2)
+ for name, t, st, r in (("Vortex", "VORTEX", 5.0, 0.0), ("Core Pull", "ATTRACT", 1.2, 3.0)):
+ ob = _empty(coll, name, (0, 0, 0), kind="CIRCLE" if t == "VORTEX" else "SPHERE", size=1.5)
+ f = ob.nova_force
+ f.enabled, f.type, f.strength, f.radius = True, t, st, r
+ return s
+
+
+def build_snow(context, coll):
+ s = new_system(context, coll, "Snow", [
+ col("Flake", (0.95, 0.97, 1.0), (15, 20), (0.008, 0.008), 0.0, drag_lin=8.0, collide="STICK",
+ fade_out=0.05, color_var=0.0),
+ ], turb_amp=1.0, turb_freq=0.3, wind=(0.5, 0, 0), shading="LIT")
+ sky = _mesh(coll, "Snow Sky", lambda bm: bmesh.ops.create_grid(bm, x_segments=1, y_segments=1, size=10),
+ (0, 0, 10))
+ sky.hide_render = True
+ sky.display_type = "WIRE"
+ emitter(coll, s, "Snow Sky", "Flake", None, ob=sky, shape="SURFACE", rate=800, direction="RANDOM", speed=0.2)
+ ground(coll, 20)
+ sun = bpy.data.lights.new("Nova Sun", "SUN")
+ sun.energy = 3.0
+ sun_ob = bpy.data.objects.new("Nova Sun", sun)
+ sun_ob.rotation_euler = (math.radians(50), 0, math.radians(30))
+ coll.objects.link(sun_ob)
+ return s
+
+
+def build_empty(context, coll):
+ s = new_system(context, coll, "Nova System", [
+ dict(name="Particle", color_mode="BLACKBODY", temp0=2400, life_min=1, life_max=2, emit=20),
+ ])
+ emitter(coll, s, "Nova Emitter", "Particle", (0, 0, 0), shape="POINT", rate=500, speed=4, spread=0.4)
+ return s
+
+
+PRESETS = [
+ ("FIREWORKS", "Fireworks Show", "Eleven shell types: peony, chrysanthemum, willow, palm, ring, crossette, "
+ "crackle, strobe, heart, multicolor, colour change", build_fireworks),
+ ("SPARKLER", "Sparkler", "Branching incandescent iron sparks", build_sparkler),
+ ("CAMPFIRE", "Campfire", "Fluid fire with combustion, embers riding the flow, popping sparks", build_campfire),
+ ("TORCH", "Torch", "Small licking flame on a handle", build_torch),
+ ("EXPLOSION", "Explosion", "Expanding fireball with debris trailing smoke", build_explosion),
+ ("GRINDER", "Grinder Sparks", "Directional spark spray that bounces and spatters", build_grinder),
+ ("FOUNTAIN", "Spark Fountain", "Gerb fountain with glitter", build_fountain),
+ ("MAGIC", "Magic Dust", "Twinkling trail behind a moving wand", build_magic_dust),
+ ("EMBERS", "Drifting Embers", "Ambient embers carried by wind and heat", build_embers),
+ ("VORTEX", "Energy Vortex", "Particles swirling around a vortex force", build_vortex),
+ ("SNOW", "Snow", "Lit snowfall that settles", build_snow),
+ ("EMPTY", "Empty System", "One type, one emitter: start from scratch", build_empty),
+]
+
+
+def build(context, key, setup_scene=False):
+ _k, label, _d, fn = next(p for p in PRESETS if p[0] == key)
+ coll = _collection(context, "Nova " + label)
+ sysob = fn(context, coll)
+ cursor = context.scene.cursor.location.copy()
+ if cursor.length > 1e-6:
+ _offset(coll, cursor)
+ if setup_scene:
+ setup_stage(context, coll, key, cursor)
+ sim.free_cache(sysob)
+ return sysob
+
+
+STAGES = {
+ "FIREWORKS": ((0, -150, 12), (0, 0, 62), 28, True),
+ "SPARKLER": ((0.35, -0.85, 1.1), (0, 0, 0.98), 50, True),
+ "CAMPFIRE": ((0, -3.2, 1.0), (0, 0, 0.7), 40, True),
+ "TORCH": ((0, -2.0, 1.4), (0, 0, 1.3), 50, True),
+ "EXPLOSION": ((0, -38, 5), (0, 0, 6.5), 35, "DUSK"),
+ "GRINDER": ((2.5, -2.5, 1.0), (0, -0.6, 0.3), 35, True),
+ "FOUNTAIN": ((0, -9, 2.0), (0, 0, 2.2), 35, True),
+ "MAGIC": ((0, -4.5, 1.4), (0, 0, 1.2), 40, True),
+ "EMBERS": ((0, -8, 2.0), (0, 0, 2.0), 35, True),
+ "VORTEX": ((0, -8.5, 5.5), (0, 0, 0), 35, True),
+ "SNOW": ((0, -14, 2.5), (0, 0, 2.5), 35, "DUSK"),
+ "EMPTY": ((0, -10, 3), (0, 0, 2), 35, False),
+}
+
+
+def setup_stage(context, coll, key, offset):
+ loc, target, lens, night = STAGES[key]
+ camera(context, coll, Vector(loc) + offset, Vector(target) + offset, lens)
+ if night == "DUSK":
+ night_world(context, (0.06, 0.07, 0.1))
+ elif night:
+ night_world(context)
+ render.setup_glow(context.scene)
diff --git a/vendor/nova-fx/addon/nova_fx/props.py b/vendor/nova-fx/addon/nova_fx/props.py
new file mode 100644
index 0000000..bee86e6
--- /dev/null
+++ b/vendor/nova-fx/addon/nova_fx/props.py
@@ -0,0 +1,292 @@
+import bpy
+from bpy.props import (BoolProperty, CollectionProperty, EnumProperty, FloatProperty, FloatVectorProperty,
+ IntProperty, PointerProperty, StringProperty)
+
+from .params import KIND_SPEC
+
+# ------------------------------------------------------------------ particle types
+
+KIND_REF_FIELDS = [n for n, t, _d, _o in KIND_SPEC if t == "K"]
+
+
+def _rename_kind(self, context):
+ """Keep references (death/trail/split/hit) pointing at a renamed type."""
+ old = self.get("_prev_name", "")
+ if old and old != self.name:
+ sysprops = self.id_data.nova
+ for k in sysprops.kinds:
+ for f in KIND_REF_FIELDS:
+ if getattr(k, f) == old:
+ setattr(k, f, self.name)
+ for ob in bpy.data.objects:
+ em = ob.nova_emitter
+ if em.enabled and em.system == self.id_data and em.kind == old:
+ em.kind = self.name
+ self["_prev_name"] = self.name
+
+
+def _kind_annotations():
+ ann = {"name": StringProperty(name="Name", default="Type", update=_rename_kind),
+ "ui_open": StringProperty(default="life,color")}
+ for name, t, default, o in KIND_SPEC:
+ label = name.replace("_", " ").title()
+ desc = o.get("desc", "")
+ if t == "F":
+ kw = dict(name=label, default=default, description=desc)
+ for key in ("min", "max", "soft_min", "soft_max"):
+ if key in o:
+ kw[key] = o[key]
+ if "unit" in o:
+ kw["unit"] = o["unit"]
+ ann[name] = FloatProperty(**kw)
+ elif t == "I":
+ ann[name] = IntProperty(name=label, default=default, description=desc,
+ min=o.get("min", 0), max=o.get("max", 1 << 30))
+ elif t == "B":
+ ann[name] = BoolProperty(name=label, default=default, description=desc)
+ elif t == "E":
+ ann[name] = EnumProperty(name=label, items=o["items"], default=default, description=desc)
+ elif t == "K":
+ ann[name] = StringProperty(name=label, default="", description=desc)
+ elif t == "C":
+ ann[name] = FloatVectorProperty(name=label, subtype="COLOR", size=3, min=0, soft_max=1,
+ default=default, description=desc)
+ return ann
+
+
+NovaKind = type("NovaKind", (bpy.types.PropertyGroup,), {"__annotations__": _kind_annotations()})
+
+# ---------------------------------------------------------------------- fluid
+
+FLUID_SPEC = [
+ # name, default, label, kwargs, group
+ ("buoy_heat", 2.0, "Heat Lift", dict(soft_min=0, soft_max=10), "physics", "Upward push of hot gas"),
+ ("buoy_smoke", 0.3, "Smoke Weight", dict(soft_min=-2, soft_max=5), "physics", "Smoke pulls down (negative floats)"),
+ ("vorticity", 0.35, "Vorticity", dict(min=0, soft_max=3), "physics", "Vorticity confinement: restores small swirls"),
+ ("turb_amp", 0.0, "Noise", dict(min=0, soft_max=50), "physics", "Curl-noise turbulence where there is smoke or heat"),
+ ("turb_freq", 1.0, "Noise Scale", dict(min=0.001, soft_max=20), "physics", "Noise frequency (1/m)"),
+ ("turb_speed", 0.5, "Noise Speed", dict(min=0, soft_max=10), "physics", "How fast the noise evolves"),
+ ("wind_drag", 0.0, "Wind Pull", dict(min=0, soft_max=5), "physics", "How fast the gas matches the wind (1/s)"),
+ ("smoke_decay", 0.02, "Smoke Dissipation", dict(min=0, soft_max=2), "physics", "Smoke fade per second"),
+ ("vel_decay", 0.0, "Velocity Damping", dict(min=0, soft_max=5), "physics", "Velocity loss per second"),
+ ("cool", 0.4, "Cooling", dict(min=0, soft_max=10), "fire", "Newton cooling (1/s)"),
+ ("cool_rad", 0.08, "Radiative Cooling", dict(min=0, soft_max=2), "fire", "T^4 cooling of the hottest gas"),
+ ("ignite", 0.25, "Ignition", dict(min=0, soft_max=3), "fire", "Temperature at which fuel burns"),
+ ("burn_rate", 2.0, "Burn Rate", dict(min=0, soft_max=20), "fire", "Fuel burned per second"),
+ ("heat_release", 1.5, "Heat Release", dict(min=0, soft_max=10), "fire", "Heat made per unit of fuel"),
+ ("smoke_yield", 0.6, "Smoke Yield", dict(min=0, soft_max=5), "fire", "Smoke made per unit of fuel"),
+ ("expansion", 1.0, "Expansion", dict(min=0, soft_max=20), "fire", "Burning gas expands (explosions push out)"),
+ ("flame_decay", 8.0, "Flame Decay", dict(min=0, soft_max=50), "fire", "How fast the flame glow fades after burning"),
+ ("fuel_decay", 0.0, "Fuel Dissipation", dict(min=0, soft_max=5), "fire", "Unburnt fuel fade per second"),
+ ("cfl", 2.5, "CFL", dict(min=0.5, max=8), "solver", "Cells a fluid substep may move; lower = more substeps"),
+ ("cg_tol", 1e-3, "Pressure Tolerance", dict(min=1e-6, max=0.1, precision=5), "solver", "Relative residual"),
+]
+FLUID_INT_SPEC = [
+ ("max_sub", 4, "Max Substeps", 1, 16, "Upper limit on fluid substeps per frame"),
+ ("cg_iter", 60, "Max Iterations", 1, 500, "Pressure solver iteration cap (MGPCG converges in ~5)"),
+]
+FLUID_BOOL_SPEC = [
+ ("maccormack", True, "MacCormack", "Second-order advection with clamping: sharper detail"),
+ ("reflect", True, "Advection-Reflection", "Energy-preserving step (Zehnder et al. 2018): keeps swirls alive"),
+ ("closed_floor", True, "Closed Floor", "The bottom of the domain is a wall"),
+ ("sparse", True, "Sparse", "Only simulate tiles that hold smoke, heat or fuel"),
+]
+
+
+def _fluid_annotations():
+ ann = {}
+ for name, d, label, kw, _g, desc in FLUID_SPEC:
+ ann[name] = FloatProperty(name=label, default=d, description=desc, **kw)
+ for name, d, label, mn, mx, desc in FLUID_INT_SPEC:
+ ann[name] = IntProperty(name=label, default=d, min=mn, max=mx, description=desc)
+ for name, d, label, desc in FLUID_BOOL_SPEC:
+ ann[name] = BoolProperty(name=label, default=d, description=desc)
+ ann["wind"] = FloatVectorProperty(name="Wind", subtype="VELOCITY", size=3, default=(0, 0, 0))
+ ann["enabled"] = BoolProperty(name="Fluid", default=False, description="Simulate smoke and fire on a grid")
+ ann["device"] = EnumProperty(name="Device", items=[
+ ("CPU", "CPU", "Sparse solver on all CPU cores: best when the fire fills a small part of the domain"),
+ ("GPU", "GPU", "Vulkan compute on the graphics card: best for big or busy domains"),
+ ], default="CPU", description="Where the fire and smoke solver runs (results match to rounding)")
+ ann["domain"] = PointerProperty(name="Domain", type=bpy.types.Object,
+ description="Box object that bounds the fluid")
+ ann["resolution"] = IntProperty(name="Resolution", default=96, min=16, max=512,
+ description="Cells along the longest side of the domain")
+ ann["volume"] = PointerProperty(name="Volume Object", type=bpy.types.Object)
+ ann["write_velocity"] = BoolProperty(name="Velocity Grid", default=False,
+ description="Also write velocity to the VDB (volume motion blur, bigger files)")
+ ann["density_mult"] = FloatProperty(name="Smoke Density", default=6.0, min=0, soft_max=100,
+ update=lambda s, c: _material_update(s, c))
+ ann["flame_mult"] = FloatProperty(name="Flame Brightness", default=6.0, min=0, soft_max=200,
+ update=lambda s, c: _material_update(s, c))
+ ann["heat_mult"] = FloatProperty(name="Heat Glow", default=2.0, min=0, soft_max=100,
+ update=lambda s, c: _material_update(s, c))
+ ann["temp_scale"] = FloatProperty(name="Flame Temperature", default=1500.0, min=100, soft_max=5000,
+ description="Kelvin added per unit of heat (colour of the flame)",
+ update=lambda s, c: _material_update(s, c))
+ ann["smoke_color"] = FloatVectorProperty(name="Smoke Color", subtype="COLOR", size=3, min=0, max=1,
+ default=(0.12, 0.11, 0.1), update=lambda s, c: _material_update(s, c))
+ return ann
+
+
+def _material_update(self, context):
+ from . import render
+ render.sync_materials(self.id_data)
+
+
+NovaFluid = type("NovaFluid", (bpy.types.PropertyGroup,), {"__annotations__": _fluid_annotations()})
+
+# --------------------------------------------------------------------- system
+
+
+def _display_update(self, context):
+ from . import render, sim
+ render.sync_display(self.id_data)
+ render.sync_materials(self.id_data)
+ sim.reload_frame(self.id_data, context.scene)
+
+
+class NovaSystem(bpy.types.PropertyGroup):
+ is_system: BoolProperty(default=False)
+ kinds: CollectionProperty(type=NovaKind)
+ kinds_index: IntProperty(default=0)
+ frame_start: IntProperty(name="Start", default=1)
+ frame_end: IntProperty(name="End", default=250)
+ substeps: IntProperty(name="Substeps", default=2, min=1, max=64,
+ description="Particle substeps per frame (fast sparks and collisions want more)")
+ time_scale: FloatProperty(name="Time Scale", default=1.0, min=0.01, soft_max=4,
+ description="Simulation speed (below 1 = slow motion)")
+ max_particles: IntProperty(name="Max Particles", default=2_000_000, min=1, max=200_000_000)
+ seed: IntProperty(name="Seed", default=0, min=0)
+ gravity: FloatVectorProperty(name="Gravity", subtype="ACCELERATION", size=3, default=(0, 0, -9.81))
+ wind: FloatVectorProperty(name="Wind", subtype="VELOCITY", size=3, default=(0, 0, 0))
+ turb_amp: FloatProperty(name="Turbulence", default=0.0, min=0, soft_max=100,
+ description="Curl-noise turbulence (divergence free: swirls without clumping)")
+ turb_freq: FloatProperty(name="Scale", default=0.5, min=0.001, soft_max=20, description="Noise frequency (1/m)")
+ turb_speed: FloatProperty(name="Evolution", default=0.5, min=0, soft_max=10)
+ turb_octaves: IntProperty(name="Detail", default=2, min=1, max=6)
+ t_ambient: FloatProperty(name="Ambient Temperature", default=293.0, min=0, soft_max=1000)
+ cache_dir: StringProperty(name="Cache", subtype="DIR_PATH", default="//nova_cache/")
+ live: BoolProperty(name="Live Preview", default=True,
+ description="Simulate while the timeline plays forward; jump back to the start to reset")
+ display: EnumProperty(name="Display", items=[
+ ("POINTS", "Points", "Spheres (Cycles motion blur uses the velocity attribute)"),
+ ("STREAKS", "Streaks", "Stretch each particle along its motion (works in EEVEE and Cycles)"),
+ ], default="POINTS", update=_display_update)
+ streak_length: FloatProperty(name="Streak Length", default=0.03, min=0, soft_max=0.5, unit="TIME_ABSOLUTE",
+ description="Seconds of motion each streak covers", update=_display_update)
+ viewport_pct: IntProperty(name="Viewport %", default=100, min=1, max=100, subtype="PERCENTAGE",
+ description="Share of particles shown in the viewport (renders always use all)",
+ update=_display_update)
+ size_mult: FloatProperty(name="Size", default=1.0, min=0, soft_max=10, update=_display_update)
+ emission_mult: FloatProperty(name="Brightness", default=1.0, min=0, soft_max=50, update=_display_update)
+ shading: EnumProperty(name="Shading", items=[
+ ("EMISSIVE", "Glowing", "Pure light (sparks, fire, fireworks)"),
+ ("LIT", "Lit", "Lit by the scene (snow, dust, debris)"),
+ ], default="EMISSIVE", update=_display_update)
+ fluid: PointerProperty(type=NovaFluid)
+
+
+# -------------------------------------------------------------------- emitter
+
+
+def _poll_system(self, ob):
+ return ob.nova.is_system
+
+
+class NovaEmitter(bpy.types.PropertyGroup):
+ enabled: BoolProperty(default=False)
+ system: PointerProperty(name="System", type=bpy.types.Object, poll=_poll_system)
+ kind: StringProperty(name="Type", description="Particle type this emitter births")
+ shape: EnumProperty(name="Shape", items=[
+ ("POINT", "Point", "From the object origin"),
+ ("SPHERE", "Sphere", "From inside a sphere around the origin"),
+ ("SURFACE", "Surface", "From the mesh surface (area weighted)"),
+ ("VERTS", "Vertices", "From mesh vertices"),
+ ], default="POINT")
+ radius: FloatProperty(name="Radius", default=0.1, min=0, soft_max=10, unit="LENGTH")
+ deforming: BoolProperty(name="Deforming", default=False, description="Re-read the mesh every frame")
+ rate: FloatProperty(name="Rate", default=500, min=0, soft_max=100000,
+ description="Particles per second (animatable)")
+ random_timing: BoolProperty(name="Random Timing", default=False,
+ description="Births arrive at random moments (Poisson) instead of evenly")
+ burst: IntProperty(name="Burst", default=0, min=0, description="Extra particles at the burst frame")
+ burst_frame: IntProperty(name="Burst Frame", default=1)
+ frame_start: IntProperty(name="Start", default=1)
+ frame_end: IntProperty(name="End", default=250)
+ direction: EnumProperty(name="Direction", items=[
+ ("NORMAL", "Normal", "Surface normal (origin for Point/Sphere: outward)"),
+ ("OBJECT_Z", "Object Z", "Along the object's local Z axis"),
+ ("RANDOM", "Random", "Any direction"),
+ ], default="OBJECT_Z")
+ speed: FloatProperty(name="Speed", default=5.0, min=0, soft_max=200, unit="VELOCITY")
+ speed_var: FloatProperty(name="Speed Variation", default=0.2, min=0, max=1)
+ spread: FloatProperty(name="Spread", default=0.2, min=0, max=3.14159, subtype="ANGLE",
+ description="Cone angle around the direction")
+ inherit: FloatProperty(name="Inherit Motion", default=0.0, soft_min=0, soft_max=1,
+ description="Share of the emitter's own velocity")
+ seed: IntProperty(name="Seed", default=0, min=0)
+ # fluid source
+ fl_enabled: BoolProperty(name="Fluid Source", default=False)
+ fl_density: FloatProperty(name="Smoke", default=0.0, min=0, soft_max=10)
+ fl_heat: FloatProperty(name="Heat", default=1.0, min=0, soft_max=10)
+ fl_fuel: FloatProperty(name="Fuel", default=1.0, min=0, soft_max=10)
+ fl_radius: FloatProperty(name="Splat Radius", default=0.0, min=0, soft_max=2, unit="LENGTH",
+ description="0 = automatic (1.5 cells)")
+ fl_speed: FloatProperty(name="Jet Speed", default=0.0, soft_min=0, soft_max=50, unit="VELOCITY",
+ description="Push the gas along the emit direction")
+ fl_points: IntProperty(name="Samples", default=0, min=0, max=200000,
+ description="Source points per frame (0 = automatic)")
+ fl_noise: FloatProperty(name="Source Noise", default=0.5, min=0, max=1,
+ description="Break up the source with noise so flames lick")
+
+
+class NovaCollider(bpy.types.PropertyGroup):
+ enabled: BoolProperty(default=False)
+ shape: EnumProperty(name="Shape", items=[
+ ("PLANE", "Plane", "Infinite plane through the object, normal = local Z"),
+ ("SPHERE", "Sphere", "Sphere from the object bounds"),
+ ("BOX", "Box", "Box from the object bounds"),
+ ("MESH", "Mesh", "The exact mesh shape (baked to a signed distance field)"),
+ ], default="PLANE")
+ sdf_res: IntProperty(name="Resolution", default=64, min=8, max=256,
+ description="Distance-field cells along the longest side")
+ deforming: BoolProperty(name="Deforming", default=False,
+ description="Re-bake the shape every frame (animated or deforming meshes)")
+
+
+class NovaForce(bpy.types.PropertyGroup):
+ enabled: BoolProperty(default=False)
+ type: EnumProperty(name="Type", items=[
+ ("ATTRACT", "Attract", "Pull toward the object (negative pushes)"),
+ ("VORTEX", "Vortex", "Swirl around the object's Z axis"),
+ ("WIND", "Wind", "Moves air along local Z (acts through drag)"),
+ ("TURBULENCE", "Turbulence", "Local curl noise"),
+ ("DRAG", "Drag", "Slow particles down"),
+ ], default="ATTRACT")
+ strength: FloatProperty(name="Strength", default=5.0, soft_min=-100, soft_max=100)
+ radius: FloatProperty(name="Radius", default=0.0, min=0, soft_max=100, unit="LENGTH",
+ description="Falloff distance (0 = everywhere)")
+ falloff: FloatProperty(name="Falloff", default=2.0, min=0, soft_max=4,
+ description="0 = hard edge at radius, 2 = inverse square beyond radius")
+ freq: FloatProperty(name="Scale", default=1.0, min=0.001, soft_max=20)
+
+
+CLASSES = (NovaKind, NovaFluid, NovaSystem, NovaEmitter, NovaCollider, NovaForce)
+
+
+def register():
+ for c in CLASSES:
+ bpy.utils.register_class(c)
+ bpy.types.Object.nova = PointerProperty(type=NovaSystem)
+ bpy.types.Object.nova_emitter = PointerProperty(type=NovaEmitter)
+ bpy.types.Object.nova_collider = PointerProperty(type=NovaCollider)
+ bpy.types.Object.nova_force = PointerProperty(type=NovaForce)
+
+
+def unregister():
+ del bpy.types.Object.nova_force
+ del bpy.types.Object.nova_collider
+ del bpy.types.Object.nova_emitter
+ del bpy.types.Object.nova
+ for c in reversed(CLASSES):
+ bpy.utils.unregister_class(c)
diff --git a/vendor/nova-fx/addon/nova_fx/render.py b/vendor/nova-fx/addon/nova_fx/render.py
new file mode 100644
index 0000000..9cf1399
--- /dev/null
+++ b/vendor/nova-fx/addon/nova_fx/render.py
@@ -0,0 +1,310 @@
+"""Materials, streak display (Geometry Nodes) and glow for Nova systems."""
+
+import bpy
+
+PMAT = "Nova Particles"
+VMAT = "Nova Fire"
+DISPLAY_GROUP = "Nova Display"
+
+
+def _node(nt, t, loc, **props):
+ n = nt.nodes.new(t)
+ n.location = loc
+ for k, v in props.items():
+ setattr(n, k, v)
+ return n
+
+
+def _first(nt, t):
+ return next((n for n in nt.nodes if n.bl_idname == t), None)
+
+
+# ------------------------------------------------------------------ particle material
+
+def particle_material(sysob):
+ name = f"{PMAT} · {sysob.name}"
+ mat = bpy.data.materials.get(name)
+ if mat and mat.node_tree and mat.get("nova_v") == 2:
+ return mat
+ mat = mat or bpy.data.materials.new(name)
+ mat["nova_v"] = 2
+ if not mat.node_tree:
+ mat.use_nodes = True
+ nt = mat.node_tree
+ nt.nodes.clear()
+ out = _node(nt, "ShaderNodeOutputMaterial", (900, 0))
+ cd = _node(nt, "ShaderNodeAttribute", (-500, 150), attribute_name="Cd", attribute_type="GEOMETRY", label="Cd")
+ em = _node(nt, "ShaderNodeAttribute", (-500, -100), attribute_name="emit", attribute_type="GEOMETRY",
+ label="emit")
+ mul = _node(nt, "ShaderNodeMath", (-250, -100), operation="MULTIPLY", label="Brightness")
+ mul.name = "nova_brightness"
+ emis = _node(nt, "ShaderNodeEmission", (100, 150))
+ bsdf = _node(nt, "ShaderNodeBsdfPrincipled", (100, -200))
+ mix = _node(nt, "ShaderNodeMixShader", (600, 0))
+ mix.name = "nova_lit"
+ L = nt.links
+ L.new(em.outputs["Fac"], mul.inputs[0])
+ L.new(cd.outputs["Color"], emis.inputs["Color"])
+ L.new(mul.outputs[0], emis.inputs["Strength"])
+ L.new(cd.outputs["Color"], bsdf.inputs["Base Color"])
+ L.new(cd.outputs["Color"], bsdf.inputs["Emission Color"])
+ L.new(emis.outputs[0], mix.inputs[1])
+ L.new(bsdf.outputs[0], mix.inputs[2])
+ L.new(mix.outputs[0], out.inputs["Surface"])
+ # glowing pixels are mostly light, not surface: keep them cheap in Cycles
+ return mat
+
+
+# ------------------------------------------------------------------ volume material
+
+def volume_material(sysob):
+ name = f"{VMAT} · {sysob.name}"
+ mat = bpy.data.materials.get(name)
+ if mat and mat.node_tree and mat.get("nova_v") == 4:
+ return mat
+ mat = mat or bpy.data.materials.new(name)
+ mat["nova_v"] = 4
+ if not mat.node_tree:
+ mat.use_nodes = True
+ nt = mat.node_tree
+ nt.nodes.clear()
+ out = _node(nt, "ShaderNodeOutputMaterial", (900, 0))
+ vol = _node(nt, "ShaderNodeVolumePrincipled", (550, 0))
+ vol.name = "nova_volume"
+ heat = _node(nt, "ShaderNodeAttribute", (-700, -150), attribute_name="heat", label="heat")
+ flame = _node(nt, "ShaderNodeAttribute", (-700, -400), attribute_name="flame", label="flame")
+ kel = _node(nt, "ShaderNodeMath", (-450, -50), operation="MULTIPLY_ADD", label="Kelvin")
+ kel.name = "nova_kelvin"
+ kel.inputs[2].default_value = 300.0
+ bb = _node(nt, "ShaderNodeBlackbody", (-250, -50))
+ # glowing gas: nothing below a threshold, then a steep (T^3) rise, like hot gas really looks
+ sub = _node(nt, "ShaderNodeMath", (-600, -250), operation="SUBTRACT")
+ sub.inputs[1].default_value = 0.25
+ pos = _node(nt, "ShaderNodeMath", (-520, -250), operation="MAXIMUM")
+ pos.inputs[1].default_value = 0.0
+ sq = _node(nt, "ShaderNodeMath", (-450, -250), operation="POWER")
+ sq.inputs[1].default_value = 3.0
+ fm = _node(nt, "ShaderNodeMath", (-250, -420), operation="MULTIPLY_ADD", label="Flame")
+ fm.name = "nova_flame" # flame * flame_mult + heat_mult
+ fm.inputs[2].default_value = 1.0
+ hm = _node(nt, "ShaderNodeMath", (0, -300), operation="MULTIPLY", label="Glow")
+ L = nt.links
+ L.new(heat.outputs["Fac"], kel.inputs[0])
+ L.new(kel.outputs[0], bb.inputs[0])
+ L.new(bb.outputs[0], vol.inputs["Emission Color"])
+ L.new(heat.outputs["Fac"], sub.inputs[0])
+ L.new(sub.outputs[0], pos.inputs[0])
+ L.new(pos.outputs[0], sq.inputs[0])
+ L.new(sq.outputs[0], hm.inputs[0])
+ L.new(flame.outputs["Fac"], fm.inputs[0])
+ L.new(fm.outputs[0], hm.inputs[1])
+ L.new(hm.outputs[0], vol.inputs["Emission Strength"])
+ L.new(vol.outputs[0], out.inputs["Volume"])
+ vol.inputs["Density Attribute"].default_value = "density"
+ vol.inputs["Temperature Attribute"].default_value = ""
+ vol.inputs["Blackbody Intensity"].default_value = 0.0
+ return mat
+
+
+def ensure_volume_material(sysob):
+ vob = sysob.nova.fluid.volume
+ if not vob:
+ return
+ mat = volume_material(sysob)
+ if not vob.data.materials:
+ vob.data.materials.append(mat)
+ elif vob.data.materials[0] != mat:
+ vob.data.materials[0] = mat
+ sync_materials(sysob)
+
+
+# ------------------------------------------------------------------ display (GN)
+
+def display_group():
+ """Streaks for a companion Curves object: read the system's points (Object Info), give each a
+ 2-point curve trailing behind its motion. Cycles only draws GN curves on Curves objects, and
+ curves are ~18x cheaper to render than mesh tubes (1M streaks: 1.4 s vs 25 s)."""
+ ng = bpy.data.node_groups.get(DISPLAY_GROUP)
+ if ng and ng.get("nova_v") == 6:
+ return ng
+ if ng is None:
+ ng = bpy.data.node_groups.new(DISPLAY_GROUP, "GeometryNodeTree")
+ ng["nova_v"] = 6
+ ng.nodes.clear()
+ ng.interface.clear()
+ ng.interface.new_socket("Geometry", in_out="INPUT", socket_type="NodeSocketGeometry")
+ ng.interface.new_socket("System", in_out="INPUT", socket_type="NodeSocketObject")
+ s = ng.interface.new_socket("Length", in_out="INPUT", socket_type="NodeSocketFloat")
+ s.default_value = 0.03
+ s.min_value = 0.0
+ ng.interface.new_socket("Material", in_out="INPUT", socket_type="NodeSocketMaterial")
+ ng.interface.new_socket("Geometry", in_out="OUTPUT", socket_type="NodeSocketGeometry")
+ gi = _node(ng, "NodeGroupInput", (-1100, 0))
+ go = _node(ng, "NodeGroupOutput", (1100, 0))
+ info = _node(ng, "GeometryNodeObjectInfo", (-900, 200), transform_space="RELATIVE")
+ vel = _node(ng, "GeometryNodeInputNamedAttribute", (-700, -250), data_type="FLOAT_VECTOR")
+ vel.inputs["Name"].default_value = "velocity"
+ rad = _node(ng, "GeometryNodeInputNamedAttribute", (-700, -450), data_type="FLOAT")
+ rad.inputs["Name"].default_value = "radius"
+ length = _node(ng, "ShaderNodeVectorMath", (-500, -250), operation="LENGTH")
+ lmul = _node(ng, "ShaderNodeMath", (-300, -250), operation="MULTIPLY")
+ r2 = _node(ng, "ShaderNodeMath", (-300, -450), operation="MULTIPLY")
+ r2.inputs[1].default_value = 2.0
+ lmax = _node(ng, "ShaderNodeMath", (-100, -300), operation="MAXIMUM")
+ scale = _node(ng, "ShaderNodeCombineXYZ", (100, -350))
+ scale.inputs["X"].default_value = 1.0
+ scale.inputs["Y"].default_value = 1.0
+ align = _node(ng, "FunctionNodeAlignRotationToVector", (100, -150))
+ align.axis = "Z"
+ # "radius" is a built-in name that realize does not carry onto curve points: keep a private copy
+ keep = _node(ng, "GeometryNodeStoreNamedAttribute", (-500, 200), data_type="FLOAT", domain="POINT")
+ keep.inputs["Name"].default_value = "nv_radius"
+ line = _node(ng, "GeometryNodeCurvePrimitiveLine", (-100, 150))
+ line.inputs["Start"].default_value = (0, 0, 0)
+ line.inputs["End"].default_value = (0, 0, -1)
+ inst = _node(ng, "GeometryNodeInstanceOnPoints", (300, 50))
+ real = _node(ng, "GeometryNodeRealizeInstances", (500, 50))
+ rad2 = _node(ng, "GeometryNodeInputNamedAttribute", (500, -250), data_type="FLOAT")
+ rad2.inputs["Name"].default_value = "nv_radius"
+ setrad = _node(ng, "GeometryNodeSetCurveRadius", (700, 50))
+ setmat = _node(ng, "GeometryNodeSetMaterial", (900, 50))
+ L = ng.links
+ L.new(gi.outputs["System"], info.inputs["Object"])
+ L.new(info.outputs["Geometry"], keep.inputs["Geometry"])
+ L.new(rad.outputs["Attribute"], keep.inputs["Value"])
+ L.new(vel.outputs["Attribute"], length.inputs[0])
+ L.new(length.outputs["Value"], lmul.inputs[0])
+ L.new(gi.outputs["Length"], lmul.inputs[1])
+ L.new(rad.outputs["Attribute"], r2.inputs[0])
+ L.new(lmul.outputs[0], lmax.inputs[0])
+ L.new(r2.outputs[0], lmax.inputs[1])
+ L.new(lmax.outputs[0], scale.inputs["Z"])
+ L.new(vel.outputs["Attribute"], align.inputs["Vector"])
+ L.new(keep.outputs["Geometry"], inst.inputs["Points"])
+ L.new(line.outputs[0], inst.inputs["Instance"])
+ L.new(align.outputs["Rotation"], inst.inputs["Rotation"])
+ L.new(scale.outputs["Vector"], inst.inputs["Scale"])
+ L.new(inst.outputs["Instances"], real.inputs["Geometry"])
+ L.new(real.outputs["Geometry"], setrad.inputs["Curve"])
+ L.new(rad2.outputs["Attribute"], setrad.inputs["Radius"])
+ L.new(setrad.outputs[0], setmat.inputs["Geometry"])
+ L.new(gi.outputs["Material"], setmat.inputs["Material"])
+ L.new(setmat.outputs["Geometry"], go.inputs["Geometry"])
+ return ng
+
+
+def _mod_input(mod, name, value):
+ ng = mod.node_group
+ item = next((i for i in ng.interface.items_tree if getattr(i, "in_out", "") == "INPUT" and i.name == name), None)
+ if item is None:
+ return
+ props = getattr(mod, "properties", None) # Blender 5.2+: typed interface
+ if props is not None and hasattr(props.inputs, item.identifier):
+ getattr(props.inputs, item.identifier).value = value
+ else:
+ mod[item.identifier] = value
+
+
+def streak_object(sysob, create=True):
+ name = sysob.name + " Streaks"
+ ob = bpy.data.objects.get(name)
+ if ob is not None and ob.type == "CURVES":
+ return ob
+ if not create:
+ return None
+ ob = bpy.data.objects.new(name, bpy.data.hair_curves.new(name))
+ for coll in sysob.users_collection:
+ coll.objects.link(ob)
+ ob.hide_select = True
+ return ob
+
+
+def sync_display(sysob):
+ if sysob.type != "POINTCLOUD":
+ return
+ n = sysob.nova
+ mat = particle_material(sysob)
+ if not sysob.data.materials:
+ sysob.data.materials.append(mat)
+ old = sysob.modifiers.get("Nova Display") # pre-1.1 streaks lived on the point cloud
+ if old:
+ sysob.modifiers.remove(old)
+ streaks = n.display == "STREAKS"
+ sob = streak_object(sysob, create=streaks)
+ if sob is not None:
+ mod = sob.modifiers.get("Nova Display") or sob.modifiers.new("Nova Display", "NODES")
+ if mod.node_group is None or mod.node_group.get("nova_v") != 6:
+ mod.node_group = display_group()
+ _mod_input(mod, "System", sysob)
+ _mod_input(mod, "Length", float(n.streak_length))
+ _mod_input(mod, "Material", mat)
+ sob.hide_render = not streaks
+ sob.hide_viewport = not streaks
+ sob.matrix_world = sysob.matrix_world.copy()
+ if not sob.data.materials:
+ sob.data.materials.append(mat)
+ sob.update_tag()
+ # the points stay selectable (panels live on them) but show as a box while streaks draw
+ sysob.hide_render = streaks
+ sysob.display_type = "BOUNDS" if streaks else "TEXTURED"
+ sysob.update_tag()
+
+
+def sync_materials(sysob):
+ n = sysob.nova
+ mat = bpy.data.materials.get(f"{PMAT} · {sysob.name}")
+ if mat and mat.node_tree:
+ b = mat.node_tree.nodes.get("nova_brightness")
+ if b:
+ b.inputs[1].default_value = n.emission_mult
+ m = mat.node_tree.nodes.get("nova_lit")
+ if m:
+ m.inputs[0].default_value = 1.0 if n.shading == "LIT" else 0.0
+ vmat = bpy.data.materials.get(f"{VMAT} · {sysob.name}")
+ if vmat and vmat.node_tree:
+ fl = n.fluid
+ nt = vmat.node_tree
+ v = nt.nodes.get("nova_volume")
+ if v:
+ v.inputs["Density"].default_value = fl.density_mult
+ v.inputs["Color"].default_value = (*fl.smoke_color, 1.0)
+ k = nt.nodes.get("nova_kelvin")
+ if k:
+ k.inputs[1].default_value = fl.temp_scale
+ f = nt.nodes.get("nova_flame")
+ if f:
+ f.inputs[1].default_value = fl.flame_mult
+ f.inputs[2].default_value = fl.heat_mult
+
+
+# ------------------------------------------------------------------ glow
+
+def setup_glow(scene, strength=0.3, size=0.45, threshold=1.5):
+ """Bloom in the compositor so bright sparks bleed light like a real lens."""
+ ng = bpy.data.node_groups.get("Nova Glow")
+ if ng is None:
+ ng = bpy.data.node_groups.new("Nova Glow", "CompositorNodeTree")
+ ng.interface.new_socket("Image", in_out="OUTPUT", socket_type="NodeSocketColor")
+ rl = _node(ng, "CompositorNodeRLayers", (-400, 0))
+ gl = _node(ng, "CompositorNodeGlare", (0, 0))
+ gl.name = "nova_glare"
+ out = _node(ng, "NodeGroupOutput", (400, 0))
+ ng.links.new(rl.outputs["Image"], gl.inputs["Image"])
+ ng.links.new(gl.outputs["Image"], out.inputs[0])
+ gl = ng.nodes.get("nova_glare")
+ if gl:
+ sock = gl.inputs.get("Type")
+ if sock is not None:
+ try:
+ sock.default_value = "Bloom"
+ except TypeError:
+ pass
+ for key, val in (("Threshold", threshold), ("Strength", strength), ("Size", size)):
+ s = gl.inputs.get(key)
+ if s is not None:
+ try:
+ s.default_value = val
+ except TypeError:
+ pass
+ scene.compositing_node_group = ng
+ return ng
diff --git a/vendor/nova-fx/addon/nova_fx/sim.py b/vendor/nova-fx/addon/nova_fx/sim.py
new file mode 100644
index 0000000..7036560
--- /dev/null
+++ b/vendor/nova-fx/addon/nova_fx/sim.py
@@ -0,0 +1,693 @@
+"""Runtime: turns Blender objects into core calls, steps frames, writes and loads caches."""
+
+import concurrent.futures
+import math
+import os
+import re
+import time
+
+import bpy
+import numpy as np
+from mathutils import Matrix, Vector
+
+from . import core
+from .params import pack_kind
+from .props import FLUID_BOOL_SPEC, FLUID_INT_SPEC, FLUID_SPEC
+
+STATE = {"baking": False, "rendering": False}
+_RT = {} # system object name -> Runtime
+_VDB_POOL = concurrent.futures.ThreadPoolExecutor(max_workers=2, thread_name_prefix="nova-vdb")
+
+
+# ------------------------------------------------------------------ paths
+
+def cache_dir(sysob):
+ base = bpy.path.abspath(sysob.nova.cache_dir or "//nova_cache/")
+ if base.startswith("//") or not os.path.isabs(base):
+ base = os.path.join(bpy.app.tempdir or "/tmp", "nova_cache")
+ safe = re.sub(r"[^A-Za-z0-9_.-]+", "_", sysob.name)
+ return os.path.join(base, safe)
+
+
+def particle_path(sysob, frame):
+ return os.path.join(cache_dir(sysob), f"p_{frame:05d}.bin")
+
+
+def volume_path(sysob, frame):
+ return os.path.join(cache_dir(sysob), f"v_{frame:05d}.vdb")
+
+
+def cached_frames(sysob):
+ d = cache_dir(sysob)
+ if not os.path.isdir(d):
+ return []
+ return sorted(int(m.group(1)) for m in (re.match(r"p_(\d+)\.bin$", f) for f in os.listdir(d)) if m)
+
+
+def free_cache(sysob):
+ d = cache_dir(sysob)
+ if os.path.isdir(d):
+ for f in os.listdir(d):
+ if re.match(r"[pv]_\d+\.(bin|vdb)$", f):
+ os.remove(os.path.join(d, f))
+ _RT.pop(sysob.name, None)
+
+
+# ------------------------------------------------------------------ runtime
+
+class Runtime:
+ def __init__(self, sysob):
+ self.sys = core.System()
+ self.fluid = None
+ self.fluid_key = None
+ self.gpu_note = ""
+ self.last_frame = None
+ self.em_state = {} # emitter name -> dict(prev=Matrix, carry=float, tris=...)
+ self.col_prev = {}
+ self.stats = {}
+ self.vdb_jobs = []
+
+ def free(self):
+ self.sys.free()
+ if self.fluid:
+ self.fluid.free()
+
+
+def runtime(sysob, create=True):
+ rt = _RT.get(sysob.name)
+ if rt is None and create:
+ rt = _RT[sysob.name] = Runtime(sysob)
+ return rt
+
+
+def stats(sysob):
+ rt = _RT.get(sysob.name)
+ return rt.stats if rt else {}
+
+
+def frame_dt(scene, sysob):
+ fps = scene.render.fps / scene.render.fps_base
+ return sysob.nova.time_scale / fps
+
+
+def emitters_of(scene, sysob):
+ return [ob for ob in scene.objects if ob.nova_emitter.enabled and ob.nova_emitter.system == sysob]
+
+
+# ------------------------------------------------------------------ configuration
+
+def apply_params(rt, scene, sysob):
+ n = sysob.nova
+ names = [k.name for k in n.kinds]
+ kinds = [pack_kind(k, names) for k in n.kinds] or [{}]
+ rt.sys.set_kinds(kinds)
+ g, w = n.gravity, n.wind
+ rt.sys.set_params(dict(gx=g[0], gy=g[1], gz=g[2], wx=w[0], wy=w[1], wz=w[2], turb_amp=n.turb_amp,
+ turb_freq=n.turb_freq, turb_speed=n.turb_speed, turb_octaves=n.turb_octaves,
+ max_particles=n.max_particles, seed=n.seed, t_ambient=n.t_ambient))
+ if rt.fluid:
+ fl = n.fluid
+ vals = {name: getattr(fl, name) for name, *_ in FLUID_SPEC}
+ vals.update({name: getattr(fl, name) for name, *_ in FLUID_INT_SPEC})
+ vals.update({name: float(getattr(fl, name)) for name, *_ in FLUID_BOOL_SPEC})
+ vals.update(wind_x=fl.wind[0], wind_y=fl.wind[1], wind_z=fl.wind[2], seed=n.seed)
+ rt.fluid.set_params(vals)
+
+
+def domain_box(dom):
+ corners = np.array([tuple(dom.matrix_world @ Vector(c)) for c in dom.bound_box])
+ return corners.min(0), corners.max(0)
+
+
+def fluid_layout(sysob):
+ fl = sysob.nova.fluid
+ lo, hi = domain_box(fl.domain)
+ ext = np.maximum(hi - lo, 1e-3)
+ dx = float(ext.max() / fl.resolution)
+ res = tuple(int(max(4, math.ceil(e / dx))) for e in ext)
+ return res, dx, tuple(float(x) for x in lo)
+
+
+def ensure_fluid(rt, sysob):
+ fl = sysob.nova.fluid
+ if not (fl.enabled and fl.domain):
+ if rt.fluid:
+ rt.fluid.free()
+ rt.fluid = None
+ rt.sys.set_fluid(None)
+ return
+ res, dx, origin = fluid_layout(sysob)
+ key = (res, round(dx, 6), tuple(round(o, 5) for o in origin), fl.device)
+ if rt.fluid is None or rt.fluid_key != key:
+ if rt.fluid:
+ rt.fluid.free()
+ rt.fluid = core.Fluid(res, dx, origin)
+ rt.fluid_key = key
+ rt.gpu_note = ""
+ if fl.device == "GPU":
+ if rt.fluid.use_gpu(True):
+ rt.gpu_note = "GPU: " + core.gpu_name()
+ else:
+ rt.gpu_note = "GPU unavailable, using CPU: " + core.gpu_name()
+ rt.sys.set_fluid(rt.fluid)
+
+
+def _rows(m):
+ return [m[0][0], m[0][1], m[0][2], m[0][3], m[1][0], m[1][1], m[1][2], m[1][3],
+ m[2][0], m[2][1], m[2][2], m[2][3]]
+
+
+def bake_sdf(ob, depsgraph, res):
+ """Signed distance field of a mesh in its local space: (origin, dx, dist[nz, ny, nx]).
+ Distance from Blender's BVH nearest-point query, sign from the surface normal there."""
+ from mathutils.bvhtree import BVHTree
+ ev = ob.evaluated_get(depsgraph)
+ bvh = BVHTree.FromObject(ev, depsgraph)
+ bb = np.array([tuple(v) for v in ev.bound_box])
+ lo, hi = bb.min(0), bb.max(0)
+ dx = float(max((hi - lo).max(), 1e-4) / res)
+ lo = lo - 3 * dx
+ n = np.ceil((hi + 3 * dx - lo) / dx).astype(int) + 1
+ nx, ny, nz = (int(v) for v in n)
+ out = np.empty((nz, ny, nx), np.float32)
+ far = float(np.linalg.norm(n) * dx)
+ find = bvh.find_nearest
+ for k in range(nz):
+ z = lo[2] + k * dx
+ for j in range(ny):
+ y = lo[1] + j * dx
+ row = out[k, j]
+ for i in range(nx):
+ p = Vector((lo[0] + i * dx, y, z))
+ loc, nrm, _idx, dist = find(p)
+ if loc is None:
+ row[i] = far
+ else:
+ row[i] = dist if (p - loc).dot(nrm) >= 0 else -dist
+ return tuple(float(v) for v in lo), dx, out
+
+
+def ensure_sdf(rt, ob, depsgraph, frame):
+ """Upload the collider's distance field once (or every frame if deforming); returns its slot."""
+ c = ob.nova_collider
+ slots = rt.__dict__.setdefault("sdf_slots", {})
+ keys = rt.__dict__.setdefault("sdf_keys", {})
+ slot = slots.setdefault(ob.name, len(slots))
+ me = ob.data if ob.type == "MESH" else None
+ key = (ob.data.name if ob.data else ob.name, len(me.vertices) if me else 0, c.sdf_res,
+ frame if c.deforming else None, round(sum(ob.bound_box[0]) + sum(ob.bound_box[6]), 6))
+ if keys.get(ob.name) != key:
+ origin, dx, dist = bake_sdf(ob, depsgraph, c.sdf_res)
+ rt.sys.set_sdf(slot, origin, dx, dist)
+ keys[ob.name] = key
+ return slot
+
+
+def collider_records(rt, scene, dt, depsgraph=None, frame=0):
+ recs = []
+ shapes = {"PLANE": 0, "SPHERE": 1, "BOX": 2, "MESH": 3}
+ for ob in scene.objects:
+ c = ob.nova_collider
+ if not c.enabled or ob.hide_get() and ob.hide_render:
+ continue
+ bb = np.array([tuple(v) for v in ob.bound_box]) if ob.type in {"MESH", "CURVE", "SURFACE", "META", "FONT"} \
+ else np.array([[-1, -1, -1], [1, 1, 1]], float)
+ lo, hi = bb.min(0), bb.max(0)
+ center = (lo + hi) / 2
+ half = np.maximum((hi - lo) / 2, 1e-4)
+ mw = ob.matrix_world.copy()
+ if c.shape == "MESH" and ob.type == "MESH" and depsgraph is not None:
+ slot = ensure_sdf(rt, ob, depsgraph, frame)
+ local = mw
+ ext = (float(slot), 0, 0)
+ elif c.shape == "MESH":
+ continue
+ elif c.shape == "PLANE":
+ local = mw @ Matrix.Translation((0, 0, center[2]))
+ ext = (0, 0, 0)
+ elif c.shape == "SPHERE":
+ local = mw @ Matrix.Translation(tuple(center))
+ ext = (float(half.max()), 0, 0)
+ else:
+ local = mw @ Matrix.Translation(tuple(center))
+ ext = tuple(float(h) for h in half)
+ prev = rt.col_prev.get(ob.name, local)
+ vel = (local.to_translation() - prev.to_translation()) / dt if dt > 0 else (0, 0, 0)
+ rt.col_prev[ob.name] = local.copy()
+ recs.append([shapes[c.shape], *_rows(local.inverted_safe()), *_rows(local), *ext, *vel])
+ return recs
+
+
+def force_records(scene):
+ types = {"ATTRACT": 0, "VORTEX": 1, "WIND": 2, "TURBULENCE": 3, "DRAG": 4}
+ recs = []
+ for ob in scene.objects:
+ f = ob.nova_force
+ if not f.enabled:
+ continue
+ mw = ob.matrix_world
+ axis = (mw.to_3x3() @ Vector((0, 0, 1))).normalized()
+ recs.append([types[f.type], *mw.to_translation(), *axis, f.strength, f.radius, f.freq, f.falloff])
+ return recs
+
+
+# ------------------------------------------------------------------ emitter sampling
+
+def _mesh_tris(ob, depsgraph):
+ ev = ob.evaluated_get(depsgraph)
+ me = ev.to_mesh()
+ try:
+ me.calc_loop_triangles()
+ nv, nt = len(me.vertices), len(me.loop_triangles)
+ co = np.empty(nv * 3, np.float32)
+ me.vertices.foreach_get("co", co)
+ co = co.reshape(-1, 3)
+ if nt == 0:
+ return co, None
+ tri = np.empty(nt * 3, np.int32)
+ me.loop_triangles.foreach_get("vertices", tri)
+ return co, tri.reshape(-1, 3)
+ finally:
+ ev.to_mesh_clear()
+
+
+def _cone(dirs, spread, rng):
+ """Random directions inside a cone of half-angle `spread` around each unit vector."""
+ n = len(dirs)
+ if spread <= 1e-6:
+ return dirs
+ cos_max = math.cos(min(spread, math.pi))
+ z = 1 - rng.random(n) * (1 - cos_max)
+ r = np.sqrt(np.maximum(0, 1 - z * z))
+ a = rng.random(n) * 2 * np.pi
+ # orthonormal basis per direction (Frisvad / Duff et al.)
+ s = np.where(dirs[:, 2] >= 0, 1.0, -1.0)
+ aa = -1.0 / (s + dirs[:, 2])
+ b = dirs[:, 0] * dirs[:, 1] * aa
+ t1 = np.stack([1 + s * dirs[:, 0] ** 2 * aa, s * b, -s * dirs[:, 0]], 1)
+ t2 = np.stack([b, s + dirs[:, 1] ** 2 * aa, -dirs[:, 1]], 1)
+ return (t1 * (r * np.cos(a))[:, None] + t2 * (r * np.sin(a))[:, None] + dirs * z[:, None]).astype(np.float32)
+
+
+def _random_dirs(n, rng):
+ z = rng.random(n) * 2 - 1
+ a = rng.random(n) * 2 * np.pi
+ r = np.sqrt(1 - z * z)
+ return np.stack([r * np.cos(a), r * np.sin(a), z], 1).astype(np.float32)
+
+
+def sample_local(em, st, ob, depsgraph, n, rng):
+ """n local-space points + local outward directions for the emitter's shape."""
+ if em.shape in {"SURFACE", "VERTS"} and ob.type == "MESH":
+ if em.deforming or "co" not in st:
+ co, tri = _mesh_tris(ob, depsgraph)
+ st["co"], st["tri"] = co, tri
+ if tri is not None:
+ a, b, c = co[tri[:, 0]], co[tri[:, 1]], co[tri[:, 2]]
+ cr = np.cross(b - a, c - a)
+ area = np.linalg.norm(cr, axis=1)
+ st["tri_n"] = cr / np.maximum(area, 1e-12)[:, None]
+ cdf = np.cumsum(area)
+ st["cdf"] = cdf / cdf[-1] if cdf[-1] > 0 else None
+ st["area"] = float(cdf[-1])
+ co, tri = st["co"], st["tri"]
+ if em.shape == "VERTS" or tri is None or st.get("cdf") is None:
+ idx = rng.integers(0, len(co), n)
+ p = co[idx]
+ d = p / np.maximum(np.linalg.norm(p, axis=1), 1e-9)[:, None]
+ return p.astype(np.float32), d.astype(np.float32)
+ t = np.searchsorted(st["cdf"], rng.random(n))
+ t = np.minimum(t, len(tri) - 1)
+ u, v = rng.random(n), rng.random(n)
+ flip = u + v > 1
+ u[flip], v[flip] = 1 - u[flip], 1 - v[flip]
+ a, b, c = co[tri[t, 0]], co[tri[t, 1]], co[tri[t, 2]]
+ p = a + (b - a) * u[:, None] + (c - a) * v[:, None]
+ return p.astype(np.float32), st["tri_n"][t].astype(np.float32)
+ if em.shape == "SPHERE":
+ d = _random_dirs(n, rng)
+ r = em.radius * np.cbrt(rng.random(n))
+ return (d * r[:, None]).astype(np.float32), d
+ return np.zeros((n, 3), np.float32), _random_dirs(n, rng)
+
+
+def _xform(m, p):
+ M = np.array(m, np.float32)
+ return p @ M[:3, :3].T + M[:3, 3]
+
+
+def _xform_dir(m, d):
+ M = np.array(m.to_3x3().inverted_safe().transposed(), np.float32)
+ out = d @ M.T
+ return out / np.maximum(np.linalg.norm(out, axis=1), 1e-9)[:, None]
+
+
+def emit_frame(rt, scene, sysob, frame, dt, depsgraph):
+ """Particles born during (frame-1, frame]; positions interpolate the emitter motion (sub-frame)."""
+ names = [k.name for k in sysob.nova.kinds]
+ for ei, ob in enumerate(emitters_of(scene, sysob)):
+ em = ob.nova_emitter
+ st = rt.em_state.setdefault(ob.name, {"carry": 0.0})
+ cur = ob.matrix_world.copy()
+ prev = st.get("prev", cur)
+ st["prev"] = cur
+ kind = names.index(em.kind) if em.kind in names else -1
+ active = em.frame_start <= frame <= em.frame_end
+ n_rate = 0
+ rng = np.random.default_rng([sysob.nova.seed, em.seed, ei, frame & 0x7FFFFFFF])
+ if active and em.rate > 0:
+ if em.random_timing:
+ n_rate = int(rng.poisson(em.rate * dt))
+ else:
+ exact = em.rate * dt + st["carry"]
+ n_rate = int(exact)
+ st["carry"] = exact - n_rate
+ n = n_rate + (em.burst if frame == em.burst_frame else 0)
+ if kind >= 0 and n > 0:
+ n = min(n, 5_000_000)
+ p, d = sample_local(em, st, ob, depsgraph, n, rng)
+ t = rng.random(n).astype(np.float32)
+ if frame == em.burst_frame and em.burst:
+ t[n_rate:] = 1.0 # bursts happen exactly on the frame
+ pw0, pw1 = _xform(prev, p), _xform(cur, p)
+ pos = pw0 + (pw1 - pw0) * t[:, None]
+ if em.direction == "OBJECT_Z":
+ z = np.array(cur.to_3x3() @ Vector((0, 0, 1)), np.float32)
+ z /= max(np.linalg.norm(z), 1e-9)
+ dirs = np.tile(z, (n, 1))
+ elif em.direction == "RANDOM":
+ dirs = _random_dirs(n, rng)
+ else:
+ dirs = _xform_dir(cur, d)
+ dirs = _cone(dirs, em.spread, rng) if em.direction != "RANDOM" else dirs
+ spd = em.speed * (1 + em.speed_var * (rng.random(n) * 2 - 1))
+ vel = dirs * spd[:, None].astype(np.float32)
+ if em.inherit != 0 and dt > 0:
+ vel += (pw1 - pw0) / dt * em.inherit
+ preage = ((1 - t) * dt).astype(np.float32)
+ rt.sys.emit(kind, pos, vel, preage)
+ if rt.fluid and em.fl_enabled and active:
+ fluid_source(rt, ob, em, st, depsgraph, cur, rng, frame)
+
+
+def fluid_source(rt, ob, em, st, depsgraph, mw, rng, frame):
+ f = rt.fluid
+ dx = f.dx
+ R = em.fl_radius if em.fl_radius > 0 else 1.5 * dx
+ if em.shape in {"SURFACE", "VERTS"} and ob.type == "MESH":
+ if "area" not in st:
+ sample_local(em, st, ob, depsgraph, 1, rng)
+ scale = max(mw.to_scale())
+ area = st.get("area", 1.0) * scale * scale
+ n = em.fl_points or int(min(60000, max(64, 2.0 * area / (R * R))))
+ elif em.shape == "SPHERE":
+ vol = 4.18879 * (em.radius * max(mw.to_scale())) ** 3
+ n = em.fl_points or int(min(60000, max(8, 3.0 * vol / (R ** 3))))
+ else:
+ n = em.fl_points or 1
+ p, d = sample_local(em, st, ob, depsgraph, n, rng)
+ pos = _xform(mw, p)
+ # flickering source: modulate by noise so the flame front licks instead of glowing evenly
+ amt = np.ones(n, np.float32)
+ if em.fl_noise > 0 and n > 1:
+ amt = 1 - em.fl_noise * rng.random(n).astype(np.float32) ** 2
+ vel = None
+ if em.fl_speed != 0:
+ if em.direction == "OBJECT_Z":
+ z = np.array(mw.to_3x3() @ Vector((0, 0, 1)), np.float32)
+ dirs = np.tile(z / max(np.linalg.norm(z), 1e-9), (n, 1))
+ else:
+ dirs = _xform_dir(mw, d)
+ vel = dirs * em.fl_speed
+ # group by noise level in a few buckets to keep one splat call per bucket
+ for lo, hi in ((0.0, 0.5), (0.5, 0.8), (0.8, 1.01)):
+ m = (amt >= lo) & (amt < hi)
+ if not m.any():
+ continue
+ k = float(amt[m].mean())
+ f.splat(pos[m], R, dens=em.fl_density * k, heat=em.fl_heat * k, fuel=em.fl_fuel * k,
+ vel=None if vel is None else vel[m], vel_amt=0.8 if vel is not None else 0.0, mode=1)
+
+
+# ------------------------------------------------------------------ stepping
+
+def reset(rt, scene, sysob):
+ rt.sys.reset()
+ ensure_fluid(rt, sysob)
+ if rt.fluid:
+ rt.fluid.reset()
+ rt.em_state.clear()
+ rt.col_prev.clear()
+ rt.last_frame = None
+
+
+def step(scene, sysob, frame, depsgraph=None, write=True):
+ """Advance the system to `frame` (must be start or last+1). Returns the runtime."""
+ n = sysob.nova
+ rt = runtime(sysob)
+ depsgraph = depsgraph or bpy.context.evaluated_depsgraph_get()
+ dt = frame_dt(scene, sysob)
+ t0 = time.perf_counter()
+ if frame <= n.frame_start or rt.last_frame is None or frame != rt.last_frame + 1:
+ reset(rt, scene, sysob)
+ apply_params(rt, scene, sysob)
+ rt.sys.set_colliders(collider_records(rt, scene, dt, depsgraph, frame))
+ rt.sys.set_forces(force_records(scene))
+ emit_frame(rt, scene, sysob, frame, dt, depsgraph)
+ else:
+ ensure_fluid(rt, sysob)
+ apply_params(rt, scene, sysob)
+ rt.sys.set_colliders(collider_records(rt, scene, dt, depsgraph, frame))
+ rt.sys.set_forces(force_records(scene))
+ # sources first (they feed this frame's fluid step), then move, then the new births
+ rt.sys.frame(dt, n.substeps, rt.fluid)
+ emit_frame(rt, scene, sysob, frame, dt, depsgraph)
+ rt.last_frame = frame
+ sim_ms = (time.perf_counter() - t0) * 1000
+ if write:
+ os.makedirs(cache_dir(sysob), exist_ok=True)
+ rt.sys.write(particle_path(sysob, frame))
+ if rt.fluid:
+ write_vdb(rt, sysob, frame)
+ st = rt.sys.stats(rt.fluid)
+ st["frame_ms"] = sim_ms
+ st["device"] = rt.gpu_note
+ st["frame"] = frame
+ rt.stats = st
+ return rt
+
+
+# ------------------------------------------------------------------ VDB output
+
+def _vdb_write(path, grids_np, dx, origin, vel, ijk):
+ import openvdb as vdb
+ tr = vdb.createLinearTransform([[dx, 0, 0, 0], [0, dx, 0, 0], [0, 0, dx, 0],
+ [origin[0] + 0.5 * dx, origin[1] + 0.5 * dx, origin[2] + 0.5 * dx, 1]])
+ grids = []
+ for name, arr in grids_np.items():
+ g = vdb.FloatGrid()
+ if arr is not None:
+ g.copyFromArray(np.ascontiguousarray(arr.transpose(2, 1, 0)), ijk=ijk, tolerance=1e-4)
+ g.name = name
+ g.transform = tr
+ grids.append(g)
+ if vel is not None:
+ g = vdb.Vec3SGrid()
+ g.copyFromArray(np.ascontiguousarray(vel.transpose(2, 1, 0, 3)), ijk=ijk, tolerance=1e-3)
+ g.name = "velocity"
+ g.transform = tr
+ grids.append(g)
+ tmp = path + ".tmp"
+ vdb.write(tmp, grids=grids)
+ os.replace(tmp, path)
+
+
+def write_vdb(rt, sysob, frame):
+ """Only the active box is copied and written: cost follows the effect, not the domain."""
+ f = rt.fluid
+ f.sync(velocity=sysob.nova.fluid.write_velocity)
+ box = f.active_bbox()
+ if box is None:
+ data, vel, ijk = {"density": None, "heat": None, "flame": None}, None, (0, 0, 0)
+ else:
+ i0, i1, j0, j1, k0, k1 = box
+ sl = (slice(k0, k1), slice(j0, j1), slice(i0, i1))
+ data = {"density": f.field(0)[sl].copy(), "heat": f.field(1)[sl].copy(), "flame": f.field(3)[sl].copy()}
+ vel = f.cell_velocity_box(box) if sysob.nova.fluid.write_velocity else None
+ ijk = (i0, j0, k0)
+ rt.vdb_jobs = [j for j in rt.vdb_jobs if not j.done()]
+ rt.vdb_jobs.append(_VDB_POOL.submit(_vdb_write, volume_path(sysob, frame), data, f.dx, f.origin, vel, ijk))
+
+
+def wait_vdb(sysob):
+ rt = _RT.get(sysob.name)
+ if rt:
+ for j in rt.vdb_jobs:
+ j.result()
+ rt.vdb_jobs = []
+
+
+# ------------------------------------------------------------------ loading into Blender
+
+def _set_attr(pc, name, dtype, domain_values, kind):
+ attrs = pc.attributes
+ a = attrs.get(name)
+ if a is None or a.data_type != dtype:
+ if a is not None:
+ attrs.remove(a)
+ a = attrs.new(name, dtype, "POINT")
+ a.data.foreach_set(kind, domain_values)
+
+
+def load_into(sysob, data):
+ pc = sysob.data
+ n = int(data["n"])
+ sel = None
+ if not STATE["rendering"] and sysob.nova.viewport_pct < 100 and n:
+ sel = (data["id"] * np.uint32(2654435761) >> np.uint32(16)) % 100 < sysob.nova.viewport_pct
+ n = int(sel.sum())
+
+ def pick(a, w=1):
+ a = a.reshape(-1, w) if w > 1 else a
+ return a[sel] if sel is not None else a
+
+ if len(pc.points) != n:
+ pc.resize(n)
+ if n == 0:
+ pc.update_tag()
+ return
+ P = pick(data["P"], 3).astype(np.float32, copy=False).ravel()
+ pc.attributes["position"].data.foreach_set("vector", P)
+ R = pick(data["radius"]).astype(np.float32) * sysob.nova.size_mult
+ _set_attr(pc, "radius", "FLOAT", R, "value")
+ _set_attr(pc, "Cd", "FLOAT_VECTOR", pick(data["Cd"], 3).astype(np.float32).ravel(), "vector")
+ _set_attr(pc, "emit", "FLOAT", pick(data["emit"]).astype(np.float32), "value")
+ _set_attr(pc, "velocity", "FLOAT_VECTOR", pick(data["V"], 3).astype(np.float32).ravel(), "vector")
+ _set_attr(pc, "age", "FLOAT", pick(data["age"]).astype(np.float32), "value")
+ _set_attr(pc, "id", "INT", pick(data["id"]).view(np.int32), "value")
+ _set_attr(pc, "kind", "INT", pick(data["kind"]).astype(np.int32), "value")
+ pc.update_tag()
+
+
+def load_frame(sysob, frame):
+ path = particle_path(sysob, frame)
+ if os.path.exists(path):
+ try:
+ load_into(sysob, core.read_cache(path))
+ return True
+ except (ValueError, OSError):
+ pass
+ load_into(sysob, {"n": 0})
+ return False
+
+
+def reload_frame(sysob, scene):
+ if sysob and sysob.nova.is_system:
+ load_frame(sysob, scene.frame_current)
+
+
+def systems(scene):
+ return [ob for ob in scene.objects if ob.nova.is_system and ob.type == "POINTCLOUD"]
+
+
+def ensure_volume_object(scene, sysob):
+ from . import render
+ fl = sysob.nova.fluid
+ first = volume_path(sysob, max(sysob.nova.frame_start, 1))
+ vob = fl.volume
+ if vob is None or vob.name not in bpy.data.objects:
+ vol = bpy.data.volumes.new(sysob.name + " Fire")
+ vob = bpy.data.objects.new(sysob.name + " Fire", vol)
+ for coll in sysob.users_collection:
+ coll.objects.link(vob)
+ break
+ fl.volume = vob
+ vol = vob.data
+ if os.path.exists(first):
+ if vol.filepath != first:
+ vol.filepath = first
+ vol.is_sequence = True
+ vol.frame_start = 1
+ vol.frame_offset = 0
+ vol.frame_duration = sysob.nova.frame_end
+ vol.sequence_mode = "CLIP"
+ vob.matrix_world = Matrix.Identity(4)
+ render.ensure_volume_material(sysob)
+ return vob
+
+
+def refresh_volume(sysob):
+ vob = sysob.nova.fluid.volume
+ if vob and vob.type == "VOLUME":
+ vol = vob.data
+ try:
+ vol.grids.unload()
+ except AttributeError:
+ pass
+ vol.filepath = vol.filepath
+ vob.update_tag()
+
+
+# ------------------------------------------------------------------ handlers
+
+def on_frame_change(scene, depsgraph=None):
+ if STATE["baking"]:
+ return
+ frame = scene.frame_current
+ for sysob in systems(scene):
+ n = sysob.nova
+ rt = _RT.get(sysob.name)
+ live = n.live and not STATE["rendering"] and n.frame_start <= frame <= n.frame_end
+ if live and (frame == n.frame_start or (rt and rt.last_frame == frame - 1)):
+ try:
+ step(scene, sysob, frame, depsgraph)
+ except Exception as e: # never break playback
+ print("Nova FX:", e)
+ load_frame(sysob, frame)
+ if n.fluid.enabled and n.fluid.domain:
+ wait_vdb(sysob)
+ ensure_volume_object(scene, sysob)
+ refresh_volume(sysob)
+ else:
+ load_frame(sysob, frame)
+
+
+def on_render_pre(scene, *_):
+ STATE["rendering"] = True
+
+
+def on_render_post(scene, *_):
+ STATE["rendering"] = False
+
+
+def on_load(*_):
+ for rt in _RT.values():
+ rt.free()
+ _RT.clear()
+
+
+HANDLERS = [
+ (bpy.app.handlers.frame_change_post, on_frame_change),
+ (bpy.app.handlers.render_pre, on_render_pre),
+ (bpy.app.handlers.render_post, on_render_post),
+ (bpy.app.handlers.render_cancel, on_render_post),
+ (bpy.app.handlers.render_complete, on_render_post),
+ (bpy.app.handlers.load_pre, on_load),
+]
+
+
+def register():
+ for h, fn in HANDLERS:
+ if fn not in h:
+ h.append(fn)
+
+
+def unregister():
+ for h, fn in HANDLERS:
+ if fn in h:
+ h.remove(fn)
+ on_load()
diff --git a/vendor/nova-fx/addon/nova_fx/ui.py b/vendor/nova-fx/addon/nova_fx/ui.py
new file mode 100644
index 0000000..9be6301
--- /dev/null
+++ b/vendor/nova-fx/addon/nova_fx/ui.py
@@ -0,0 +1,348 @@
+import bpy
+
+from . import presets, sim
+from .ops import system_of
+from .params import KIND_GROUPS, KIND_SPEC
+from .props import FLUID_BOOL_SPEC, FLUID_INT_SPEC, FLUID_SPEC
+
+
+class NOVA_UL_kinds(bpy.types.UIList):
+ def draw_item(self, context, layout, data, item, icon, active_data, active_prop, index=0):
+ icons = {"BLACKBODY": "LIGHT_SUN", "GRADIENT": "COLOR", "FIXED": "SHADING_SOLID"}
+ layout.prop(item, "name", text="", emboss=False, icon=icons.get(item.color_mode, "DOT"))
+
+
+class _Panel:
+ bl_space_type = "VIEW_3D"
+ bl_region_type = "UI"
+ bl_category = "Nova FX"
+
+
+def _sys(context):
+ return system_of(context.object)
+
+
+class NOVA_PT_main(_Panel, bpy.types.Panel):
+ bl_label = "Nova FX"
+
+ def draw(self, context):
+ layout = self.layout
+ layout.operator_menu_enum("nova.add_preset", "preset", text="Add Effect", icon="ADD")
+ ob = context.object
+ if ob is None:
+ return
+ sysob = _sys(context)
+ if ob.nova.is_system:
+ return
+ col = layout.column(align=True)
+ row = col.row(align=True)
+ row.operator("nova.make", text="Emitter", icon="PARTICLES",
+ depress=ob.nova_emitter.enabled).role = "EMITTER"
+ row.operator("nova.make", text="Collider", icon="MOD_PHYSICS",
+ depress=ob.nova_collider.enabled).role = "COLLIDER"
+ row.operator("nova.make", text="Force", icon="FORCE_FORCE", depress=ob.nova_force.enabled).role = "FORCE"
+ if ob.nova_emitter.enabled or ob.nova_collider.enabled or ob.nova_force.enabled:
+ col.operator("nova.make", text="Clear Roles", icon="X").role = "CLEAR"
+ if sysob and ob.nova_emitter.enabled:
+ layout.operator("nova.select_system", text=f"System: {sysob.name}", icon="RESTRICT_SELECT_OFF")
+
+
+class NOVA_PT_system(_Panel, bpy.types.Panel):
+ bl_label = "Simulation"
+
+ @classmethod
+ def poll(cls, context):
+ ob = context.object
+ return ob is not None and ob.nova.is_system
+
+ def draw(self, context):
+ layout = self.layout
+ sysob = _sys(context)
+ n = sysob.nova
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+ row = layout.row(align=True)
+ row.scale_y = 1.4
+ row.operator("nova.bake", icon="RENDER_ANIMATION")
+ row.operator("nova.free_cache", text="", icon="TRASH")
+ row.operator("nova.reset", text="", icon="FILE_REFRESH")
+ layout.prop(n, "live")
+ col = layout.column(align=True)
+ col.prop(n, "frame_start", text="Frames")
+ col.prop(n, "frame_end", text="End")
+ layout.prop(n, "substeps")
+ layout.prop(n, "time_scale")
+ layout.prop(n, "max_particles")
+ layout.prop(n, "seed")
+ layout.prop(n, "cache_dir")
+ st = sim.stats(sysob)
+ cached = len(sim.cached_frames(sysob))
+ box = layout.box()
+ box.use_property_split = False
+ c = box.column(align=True)
+ c.label(text=f"{st.get('count', 0):,} particles · {cached} frames cached", icon="INFO")
+ if st:
+ c.label(text=f"Particles {st['particle_ms']:.1f} ms · frame {st['frame_ms']:.0f} ms")
+ if st.get("device"):
+ c.label(text=st["device"], icon="CHECKMARK" if st["device"].startswith("GPU:") else "ERROR")
+ if st.get("cells"):
+ c.label(text=f"Fluid {st['fluid_ms']:.0f} ms · {st['cg_iters']} pressure iterations")
+ if str(st.get("device", "")).startswith("GPU:"):
+ c.label(text=f"{st['cells'] / 1e6:.2f}M cells on the GPU (dense)")
+ else:
+ c.label(text=f"{st['active'] * 100:.0f}% of {st['cells'] / 1e6:.2f}M cells active (sparse)")
+
+
+class NOVA_PT_types(_Panel, bpy.types.Panel):
+ bl_label = "Particle Types"
+
+ @classmethod
+ def poll(cls, context):
+ ob = context.object
+ return ob is not None and ob.nova.is_system
+
+ def draw(self, context):
+ layout = self.layout
+ n = _sys(context).nova
+ row = layout.row()
+ row.template_list("NOVA_UL_kinds", "", n, "kinds", n, "kinds_index", rows=4)
+ col = row.column(align=True)
+ col.operator("nova.kind_add", text="", icon="ADD").duplicate = False
+ col.operator("nova.kind_add", text="", icon="DUPLICATE").duplicate = True
+ col.operator("nova.kind_remove", text="", icon="REMOVE")
+ if not n.kinds:
+ return
+ k = n.kinds[min(n.kinds_index, len(n.kinds) - 1)]
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+ for gid, label, icon in KIND_GROUPS:
+ header, body = layout.panel(f"nova_kind_{gid}", default_closed=gid not in {"life", "color"})
+ header.label(text=label, icon=icon)
+ if body is None:
+ continue
+ draw_kind_group(body, k, n, gid)
+
+
+def draw_kind_group(layout, k, n, gid):
+ cm = k.color_mode
+ for name, t, _d, o in KIND_SPEC:
+ if o["group"] != gid:
+ continue
+ if gid == "color":
+ if name in {"temp0", "temp_var", "cool", "cool_rad"} and cm != "BLACKBODY":
+ continue
+ if name in {"color", "color_var", "hue_random"} and cm == "BLACKBODY":
+ continue
+ if name in {"color2", "color_curve"} and cm != "GRADIENT":
+ continue
+ if name == "twinkle_amt" and k.twinkle_freq <= 0:
+ continue
+ ref = {"death": "death_kind", "trail": "trail_kind", "split": "split_kind"}.get(gid)
+ if ref and name != ref and not getattr(k, ref):
+ continue
+ if gid == "collide" and name != "collide" and k.collide == "NONE":
+ continue
+ if name in {"hit_count", "hit_speed"} and not k.hit_kind:
+ continue
+ label = name.replace("_", " ").title()
+ if t == "K":
+ layout.prop_search(k, name, n, "kinds", text=label.replace(" Kind", ""), icon="PARTICLES")
+ else:
+ layout.prop(k, name, text=label)
+
+
+class NOVA_PT_forces(_Panel, bpy.types.Panel):
+ bl_label = "World Forces"
+ bl_options = {"DEFAULT_CLOSED"}
+
+ @classmethod
+ def poll(cls, context):
+ ob = context.object
+ return ob is not None and ob.nova.is_system
+
+ def draw(self, context):
+ layout = self.layout
+ n = _sys(context).nova
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+ layout.prop(n, "gravity")
+ layout.prop(n, "wind")
+ col = layout.column(align=True)
+ col.prop(n, "turb_amp")
+ col.prop(n, "turb_freq")
+ col.prop(n, "turb_speed")
+ col.prop(n, "turb_octaves")
+ layout.prop(n, "t_ambient")
+
+
+class NOVA_PT_fluid(_Panel, bpy.types.Panel):
+ bl_label = "Fire & Smoke"
+ bl_options = {"DEFAULT_CLOSED"}
+
+ @classmethod
+ def poll(cls, context):
+ ob = context.object
+ return ob is not None and ob.nova.is_system
+
+ def draw_header(self, context):
+ self.layout.prop(_sys(context).nova.fluid, "enabled", text="")
+
+ def draw(self, context):
+ layout = self.layout
+ fl = _sys(context).nova.fluid
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+ layout.active = fl.enabled
+ layout.prop(fl, "domain")
+ layout.prop(fl, "resolution")
+ layout.prop(fl, "device", expand=True)
+ if fl.domain:
+ try:
+ res, dx, _o = sim.fluid_layout(_sys(context))
+ layout.label(text=f"{res[0]}×{res[1]}×{res[2]} cells · {dx * 100:.1f} cm voxels")
+ except Exception:
+ pass
+ for gid, label in (("physics", "Gas"), ("fire", "Combustion"), ("solver", "Solver")):
+ header, body = layout.panel(f"nova_fluid_{gid}", default_closed=gid == "solver")
+ header.label(text=label)
+ if body is None:
+ continue
+ for name, _d, _l, _kw, g, _desc in FLUID_SPEC:
+ if g == gid:
+ body.prop(fl, name)
+ if gid == "physics":
+ body.prop(fl, "wind")
+ if gid == "solver":
+ for name, *_ in FLUID_INT_SPEC:
+ body.prop(fl, name)
+ for name, *_ in FLUID_BOOL_SPEC:
+ body.prop(fl, name)
+ header, body = layout.panel("nova_fluid_look", default_closed=False)
+ header.label(text="Look")
+ if body:
+ for name in ("density_mult", "smoke_color", "flame_mult", "heat_mult", "temp_scale", "write_velocity"):
+ body.prop(fl, name)
+
+
+class NOVA_PT_display(_Panel, bpy.types.Panel):
+ bl_label = "Display & Render"
+ bl_options = {"DEFAULT_CLOSED"}
+
+ @classmethod
+ def poll(cls, context):
+ ob = context.object
+ return ob is not None and ob.nova.is_system
+
+ def draw(self, context):
+ layout = self.layout
+ n = _sys(context).nova
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+ layout.prop(n, "display")
+ if n.display == "STREAKS":
+ layout.prop(n, "streak_length")
+ layout.prop(n, "shading")
+ layout.prop(n, "size_mult")
+ layout.prop(n, "emission_mult")
+ layout.prop(n, "viewport_pct")
+ layout.operator("nova.glow", icon="LIGHT_SUN")
+
+
+class NOVA_PT_emitter(_Panel, bpy.types.Panel):
+ bl_label = "Emitter"
+
+ @classmethod
+ def poll(cls, context):
+ ob = context.object
+ return ob is not None and ob.nova_emitter.enabled
+
+ def draw(self, context):
+ layout = self.layout
+ e = context.object.nova_emitter
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+ layout.prop(e, "system")
+ if e.system:
+ layout.prop_search(e, "kind", e.system.nova, "kinds", icon="PARTICLES")
+ layout.prop(e, "shape")
+ if e.shape == "SPHERE":
+ layout.prop(e, "radius")
+ if e.shape in {"SURFACE", "VERTS"}:
+ layout.prop(e, "deforming")
+ col = layout.column(align=True)
+ col.prop(e, "rate")
+ col.prop(e, "random_timing")
+ col = layout.column(align=True)
+ col.prop(e, "burst")
+ col.prop(e, "burst_frame")
+ col = layout.column(align=True)
+ col.prop(e, "frame_start", text="Active From")
+ col.prop(e, "frame_end", text="To")
+ layout.prop(e, "direction")
+ col = layout.column(align=True)
+ col.prop(e, "speed")
+ col.prop(e, "speed_var")
+ if e.direction != "RANDOM":
+ layout.prop(e, "spread")
+ layout.prop(e, "inherit")
+ layout.prop(e, "seed")
+ header, body = layout.panel("nova_emitter_fluid", default_closed=not e.fl_enabled)
+ header.prop(e, "fl_enabled", text="Fluid Source")
+ if body:
+ body.active = e.fl_enabled
+ for name in ("fl_fuel", "fl_heat", "fl_density", "fl_speed", "fl_radius", "fl_noise", "fl_points"):
+ body.prop(e, name)
+
+
+class NOVA_PT_collider(_Panel, bpy.types.Panel):
+ bl_label = "Collider"
+
+ @classmethod
+ def poll(cls, context):
+ ob = context.object
+ return ob is not None and ob.nova_collider.enabled
+
+ def draw(self, context):
+ c = context.object.nova_collider
+ self.layout.prop(c, "shape")
+ if c.shape == "MESH":
+ self.layout.prop(c, "sdf_res")
+ self.layout.prop(c, "deforming")
+
+
+class NOVA_PT_force(_Panel, bpy.types.Panel):
+ bl_label = "Force"
+
+ @classmethod
+ def poll(cls, context):
+ ob = context.object
+ return ob is not None and ob.nova_force.enabled
+
+ def draw(self, context):
+ layout = self.layout
+ f = context.object.nova_force
+ layout.use_property_split = True
+ layout.prop(f, "type")
+ layout.prop(f, "strength")
+ layout.prop(f, "radius")
+ layout.prop(f, "falloff")
+ if f.type == "TURBULENCE":
+ layout.prop(f, "freq")
+
+
+class NOVA_MT_add(bpy.types.Menu):
+ bl_label = "Nova FX"
+ bl_idname = "NOVA_MT_add"
+
+ def draw(self, context):
+ for key, label, _d, _f in presets.PRESETS:
+ op = self.layout.operator("nova.add_preset", text=label)
+ op.preset = key
+
+
+def menu_add(self, context):
+ self.layout.menu("NOVA_MT_add", icon="PARTICLES")
+
+
+CLASSES = (NOVA_UL_kinds, NOVA_PT_main, NOVA_PT_system, NOVA_PT_types, NOVA_PT_forces, NOVA_PT_fluid,
+ NOVA_PT_display, NOVA_PT_emitter, NOVA_PT_collider, NOVA_PT_force, NOVA_MT_add)
diff --git a/vendor/nova-fx/core/Makefile b/vendor/nova-fx/core/Makefile
new file mode 100644
index 0000000..fda3c88
--- /dev/null
+++ b/vendor/nova-fx/core/Makefile
@@ -0,0 +1,33 @@
+# Nova FX core. Built on the machine that runs it, so -march=native is safe.
+CC ?= gcc
+CFLAGS ?= -O3 -march=native -ffast-math -fno-math-errno -fopenmp -fPIC -fvisibility=hidden -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
+OUT ?= ../addon/nova_fx/lib/libnovacore.so
+SHADERS := $(wildcard shaders/*.comp)
+SHADER_DEPS := $(SHADERS) shaders/common.glsl
+
+$(OUT): nova_core.c gpu_vk.c nova_params.h shaders_spv.h
+ mkdir -p $(dir $(OUT))
+ $(CC) $(CFLAGS) -shared -o $@ nova_core.c gpu_vk.c -lm -ldl
+ cp nova_core.c gpu_vk.c nova_params.h shaders_spv.h $(dir $(OUT))
+
+# SPIR-V is generated with glslc and committed, so building the core never needs a shader compiler.
+shaders_spv.h: $(SHADER_DEPS)
+ @if command -v glslc >/dev/null; then \
+ python3 embed_spv.py $(SHADERS) > [email protected] && mv [email protected] $@; \
+ else echo "glslc not found: using the committed shaders_spv.h"; touch $@; fi
+
+clean:
+ rm -f $(OUT)
+
+# Installable extension zip: ships the C source, the add-on compiles it on first use.
+VERSION := $(shell sed -n 's/^version = "\(.*\)"/\1/p' ../addon/nova_fx/blender_manifest.toml)
+package:
+ rm -rf ../dist/stage && mkdir -p ../dist/stage
+ cp -r ../addon/nova_fx ../dist/stage/nova_fx
+ rm -rf ../dist/stage/nova_fx/__pycache__ ../dist/stage/nova_fx/lib/libnovacore.so
+ cp nova_core.c gpu_vk.c nova_params.h shaders_spv.h ../dist/stage/nova_fx/lib/
+ cd ../dist/stage && zip -qr ../nova_fx-$(VERSION).zip nova_fx
+ rm -rf ../dist/stage
+ @echo "../dist/nova_fx-$(VERSION).zip"
+
+.PHONY: clean package
diff --git a/vendor/nova-fx/core/embed_spv.py b/vendor/nova-fx/core/embed_spv.py
new file mode 100644
index 0000000..4fa5d42
--- /dev/null
+++ b/vendor/nova-fx/core/embed_spv.py
@@ -0,0 +1,16 @@
+"""Compile GLSL compute shaders with glslc and print them as C uint32 arrays (spv_<name>)."""
+import os, subprocess, sys, tempfile
+
+print("/* generated by embed_spv.py from the shaders folder: do not edit */")
+print("#include <stdint.h>")
+for path in sys.argv[1:]:
+ name = os.path.splitext(os.path.basename(path))[0]
+ with tempfile.TemporaryDirectory() as d:
+ out = os.path.join(d, name + ".spv")
+ subprocess.run(["glslc", "-O", "--target-env=vulkan1.1", path, "-o", out], check=True)
+ data = open(out, "rb").read()
+ words = [int.from_bytes(data[i:i + 4], "little") for i in range(0, len(data), 4)]
+ print(f"static const uint32_t spv_{name}[] = {{")
+ for i in range(0, len(words), 8):
+ print(" " + ", ".join(f"0x{w:08x}" for w in words[i:i + 8]) + ",")
+ print("};")
diff --git a/vendor/nova-fx/core/gpu_vk.c b/vendor/nova-fx/core/gpu_vk.c
new file mode 100644
index 0000000..296cedc
--- /dev/null
+++ b/vendor/nova-fx/core/gpu_vk.c
@@ -0,0 +1,1095 @@
+/*
+ * Nova FX — Vulkan compute backend for the fluid solver.
+ *
+ * The whole fluid state lives on the GPU. Every kernel shares one descriptor set: grids are slices of
+ * one float buffer F, addressed by offsets in push constants. The substep sequence mirrors
+ * fluid_substep() in nova_core.c (MacCormack, advection-reflection, combustion, vorticity
+ * confinement, curl-noise turbulence, MGPCG pressure solve), so CPU and GPU agree to rounding.
+ *
+ * libvulkan is loaded at runtime (dlopen): the core still loads on machines without Vulkan.
+ * Shaders are compiled to SPIR-V at build time and embedded from shaders_spv.h.
+ */
+#include <dlfcn.h>
+#include <math.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#define VK_NO_PROTOTYPES
+#include <vulkan/vulkan.h>
+
+#include "nova_params.h"
+#include "shaders_spv.h"
+
+#define API __attribute__((visibility("default")))
+#define HIDDEN __attribute__((visibility("hidden")))
+
+#define VK_FUNCS(X) \
+ X(vkDestroyInstance) X(vkEnumeratePhysicalDevices) X(vkGetPhysicalDeviceProperties) \
+ X(vkGetPhysicalDeviceQueueFamilyProperties) X(vkGetPhysicalDeviceMemoryProperties) X(vkCreateDevice) \
+ X(vkDestroyDevice) X(vkGetDeviceQueue) X(vkCreateBuffer) X(vkDestroyBuffer) \
+ X(vkGetBufferMemoryRequirements) X(vkAllocateMemory) X(vkFreeMemory) X(vkBindBufferMemory) \
+ X(vkMapMemory) X(vkUnmapMemory) X(vkCreateShaderModule) X(vkDestroyShaderModule) \
+ X(vkCreateDescriptorSetLayout) X(vkDestroyDescriptorSetLayout) X(vkCreatePipelineLayout) \
+ X(vkDestroyPipelineLayout) X(vkCreateComputePipelines) X(vkDestroyPipeline) \
+ X(vkCreateDescriptorPool) X(vkDestroyDescriptorPool) X(vkAllocateDescriptorSets) \
+ X(vkUpdateDescriptorSets) X(vkCreateCommandPool) X(vkDestroyCommandPool) \
+ X(vkAllocateCommandBuffers) X(vkBeginCommandBuffer) X(vkEndCommandBuffer) X(vkCmdBindPipeline) \
+ X(vkCmdBindDescriptorSets) X(vkCmdPushConstants) X(vkCmdDispatch) X(vkCmdPipelineBarrier) \
+ X(vkCmdCopyBuffer) X(vkCmdFillBuffer) X(vkQueueSubmit) X(vkCreateFence) X(vkDestroyFence) \
+ X(vkWaitForFences) X(vkResetFences) X(vkResetCommandBuffer) X(vkDeviceWaitIdle) \
+ X(vkFreeDescriptorSets) X(vkCreateQueryPool) X(vkDestroyQueryPool) X(vkCmdWriteTimestamp) \
+ X(vkCmdResetQueryPool) X(vkGetQueryPoolResults)
+
+static PFN_vkGetInstanceProcAddr vk_gipa;
+static PFN_vkCreateInstance vk_create_instance;
+#define DECL(f) static PFN_##f f##_;
+VK_FUNCS(DECL)
+#undef DECL
+
+/* pipelines, one per shader */
+#define SHADERS(X) X(adv_scalars) X(adv_face) X(combust) X(forces) X(faces) X(project) X(mg) X(cg) X(splat) X(tilemax)
+#define SH_ENUM(n) SH_##n,
+enum { SHADERS(SH_ENUM) SH_COUNT };
+
+typedef struct {
+ VkBuffer buf;
+ VkDeviceMemory mem;
+ VkDeviceSize size;
+ void *map;
+} Buf;
+
+typedef struct {
+ int32_t n[4];
+ uint32_t o0[4], o1[4], o2[4];
+ float f0[4], f1[4], f2[4];
+} PC; /* 112 bytes, matches common.glsl */
+
+static struct {
+ int ready, tried;
+ char name[256], err[256];
+ void *lib;
+ VkInstance inst;
+ VkPhysicalDevice phys;
+ VkPhysicalDeviceMemoryProperties memp;
+ VkDevice dev;
+ VkQueue queue;
+ uint32_t qfam;
+ VkCommandPool pool;
+ VkFence fence;
+ VkDescriptorSetLayout dsl;
+ VkPipelineLayout pl;
+ VkPipeline pipe[SH_COUNT];
+ VkDescriptorPool dpool;
+ float ts_period; /* ns per timestamp tick */
+ int ts_ok;
+} G;
+
+static double now_ms(void) {
+ struct timespec t;
+ clock_gettime(CLOCK_MONOTONIC, &t);
+ return t.tv_sec * 1e3 + t.tv_nsec * 1e-6;
+}
+
+static int fail(const char *what, VkResult r) {
+ snprintf(G.err, sizeof G.err, "%s failed (VkResult %d)", what, (int)r);
+ return -1;
+}
+
+/* ------------------------------------------------------------------ device setup */
+
+static int mem_type(uint32_t bits, VkMemoryPropertyFlags want) {
+ for (uint32_t i = 0; i < G.memp.memoryTypeCount; i++)
+ if ((bits & (1u << i)) && (G.memp.memoryTypes[i].propertyFlags & want) == want) return (int)i;
+ return -1;
+}
+
+static int buf_create(Buf *b, VkDeviceSize size, int host) {
+ memset(b, 0, sizeof *b);
+ VkBufferCreateInfo bi = {VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO};
+ bi.size = size < 16 ? 16 : size;
+ bi.usage = VK_BUFFER_USAGE_STORAGE_BUFFER_BIT | VK_BUFFER_USAGE_TRANSFER_SRC_BIT | VK_BUFFER_USAGE_TRANSFER_DST_BIT;
+ bi.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
+ VkResult r = vkCreateBuffer_(G.dev, &bi, NULL, &b->buf);
+ if (r) return fail("vkCreateBuffer", r);
+ VkMemoryRequirements req;
+ vkGetBufferMemoryRequirements_(G.dev, b->buf, &req);
+ int t = host ? mem_type(req.memoryTypeBits, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT |
+ VK_MEMORY_PROPERTY_HOST_CACHED_BIT)
+ : mem_type(req.memoryTypeBits, VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT);
+ if (t < 0 && host)
+ t = mem_type(req.memoryTypeBits, VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT);
+ if (t < 0) return fail("memory type", VK_ERROR_FEATURE_NOT_PRESENT);
+ VkMemoryAllocateInfo ai = {VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO};
+ ai.allocationSize = req.size;
+ ai.memoryTypeIndex = (uint32_t)t;
+ r = vkAllocateMemory_(G.dev, &ai, NULL, &b->mem);
+ if (r) {
+ vkDestroyBuffer_(G.dev, b->buf, NULL);
+ b->buf = VK_NULL_HANDLE;
+ return fail("vkAllocateMemory (out of GPU memory?)", r);
+ }
+ vkBindBufferMemory_(G.dev, b->buf, b->mem, 0);
+ b->size = bi.size;
+ if (host) vkMapMemory_(G.dev, b->mem, 0, VK_WHOLE_SIZE, 0, &b->map);
+ return 0;
+}
+
+static void buf_free(Buf *b) {
+ if (!b->buf) return;
+ if (b->map) vkUnmapMemory_(G.dev, b->mem);
+ vkDestroyBuffer_(G.dev, b->buf, NULL);
+ vkFreeMemory_(G.dev, b->mem, NULL);
+ memset(b, 0, sizeof *b);
+}
+
+static VkPipeline make_pipeline(const uint32_t *code, size_t bytes) {
+ VkShaderModuleCreateInfo si = {VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO};
+ si.codeSize = bytes;
+ si.pCode = code;
+ VkShaderModule mod;
+ if (vkCreateShaderModule_(G.dev, &si, NULL, &mod)) return VK_NULL_HANDLE;
+ VkComputePipelineCreateInfo ci = {VK_STRUCTURE_TYPE_COMPUTE_PIPELINE_CREATE_INFO};
+ ci.stage.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
+ ci.stage.stage = VK_SHADER_STAGE_COMPUTE_BIT;
+ ci.stage.module = mod;
+ ci.stage.pName = "main";
+ ci.layout = G.pl;
+ VkPipeline p = VK_NULL_HANDLE;
+ vkCreateComputePipelines_(G.dev, VK_NULL_HANDLE, 1, &ci, NULL, &p);
+ vkDestroyShaderModule_(G.dev, mod, NULL);
+ return p;
+}
+
+#define NBIND 6
+
+API int nv_gpu_init(void) {
+ if (G.tried) return G.ready ? 0 : -1;
+ G.tried = 1;
+ G.lib = dlopen("libvulkan.so.1", RTLD_NOW | RTLD_LOCAL);
+ if (!G.lib) G.lib = dlopen("libvulkan.so", RTLD_NOW | RTLD_LOCAL);
+ if (!G.lib) {
+ snprintf(G.err, sizeof G.err, "libvulkan not found");
+ return -1;
+ }
+ vk_gipa = (PFN_vkGetInstanceProcAddr)dlsym(G.lib, "vkGetInstanceProcAddr");
+ if (!vk_gipa) return fail("vkGetInstanceProcAddr", VK_ERROR_INITIALIZATION_FAILED);
+ vk_create_instance = (PFN_vkCreateInstance)vk_gipa(NULL, "vkCreateInstance");
+ VkApplicationInfo app = {VK_STRUCTURE_TYPE_APPLICATION_INFO};
+ app.pApplicationName = "Nova FX";
+ app.apiVersion = VK_API_VERSION_1_1;
+ VkInstanceCreateInfo ii = {VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO};
+ ii.pApplicationInfo = &app;
+ VkResult r = vk_create_instance(&ii, NULL, &G.inst);
+ if (r) return fail("vkCreateInstance", r);
+#define LOAD(f) \
+ f##_ = (PFN_##f)vk_gipa(G.inst, #f); \
+ if (!f##_) { \
+ snprintf(G.err, sizeof G.err, "missing Vulkan function %s", #f); \
+ return -1; \
+ }
+ VK_FUNCS(LOAD)
+#undef LOAD
+ uint32_t n = 0;
+ vkEnumeratePhysicalDevices_(G.inst, &n, NULL);
+ if (!n) return fail("no Vulkan device", VK_ERROR_INITIALIZATION_FAILED);
+ VkPhysicalDevice devs[16];
+ if (n > 16) n = 16;
+ vkEnumeratePhysicalDevices_(G.inst, &n, devs);
+ int best = 0;
+ for (uint32_t i = 0; i < n; i++) {
+ VkPhysicalDeviceProperties p;
+ vkGetPhysicalDeviceProperties_(devs[i], &p);
+ if (p.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU) { best = (int)i; break; }
+ }
+ G.phys = devs[best];
+ VkPhysicalDeviceProperties props;
+ vkGetPhysicalDeviceProperties_(G.phys, &props);
+ snprintf(G.name, sizeof G.name, "%s", props.deviceName);
+ G.ts_period = props.limits.timestampPeriod;
+ vkGetPhysicalDeviceMemoryProperties_(G.phys, &G.memp);
+ uint32_t nq = 0;
+ vkGetPhysicalDeviceQueueFamilyProperties_(G.phys, &nq, NULL);
+ VkQueueFamilyProperties qf[32];
+ if (nq > 32) nq = 32;
+ vkGetPhysicalDeviceQueueFamilyProperties_(G.phys, &nq, qf);
+ G.qfam = UINT32_MAX;
+ for (uint32_t i = 0; i < nq; i++)
+ if ((qf[i].queueFlags & VK_QUEUE_COMPUTE_BIT) && !(qf[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) &&
+ qf[i].timestampValidBits) { G.qfam = i; break; }
+ for (uint32_t i = 0; i < nq && G.qfam == UINT32_MAX; i++)
+ if ((qf[i].queueFlags & VK_QUEUE_COMPUTE_BIT) && !(qf[i].queueFlags & VK_QUEUE_GRAPHICS_BIT)) { G.qfam = i; break; }
+ for (uint32_t i = 0; i < nq && G.qfam == UINT32_MAX; i++)
+ if (qf[i].queueFlags & VK_QUEUE_COMPUTE_BIT) G.qfam = i;
+ if (G.qfam == UINT32_MAX) return fail("no compute queue", VK_ERROR_FEATURE_NOT_PRESENT);
+ G.ts_ok = qf[G.qfam].timestampValidBits > 0 && G.ts_period > 0.f;
+ float prio = 1.f;
+ VkDeviceQueueCreateInfo qi = {VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO};
+ qi.queueFamilyIndex = G.qfam;
+ qi.queueCount = 1;
+ qi.pQueuePriorities = &prio;
+ VkDeviceCreateInfo di = {VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO};
+ di.queueCreateInfoCount = 1;
+ di.pQueueCreateInfos = &qi;
+ r = vkCreateDevice_(G.phys, &di, NULL, &G.dev);
+ if (r) return fail("vkCreateDevice", r);
+ vkGetDeviceQueue_(G.dev, G.qfam, 0, &G.queue);
+ VkCommandPoolCreateInfo pi = {VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO};
+ pi.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
+ pi.queueFamilyIndex = G.qfam;
+ vkCreateCommandPool_(G.dev, &pi, NULL, &G.pool);
+ VkFenceCreateInfo fi = {VK_STRUCTURE_TYPE_FENCE_CREATE_INFO};
+ vkCreateFence_(G.dev, &fi, NULL, &G.fence);
+ VkDescriptorSetLayoutBinding b[NBIND];
+ for (int i = 0; i < NBIND; i++) {
+ memset(&b[i], 0, sizeof b[i]);
+ b[i].binding = (uint32_t)i;
+ b[i].descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
+ b[i].descriptorCount = 1;
+ b[i].stageFlags = VK_SHADER_STAGE_COMPUTE_BIT;
+ }
+ VkDescriptorSetLayoutCreateInfo li = {VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO};
+ li.bindingCount = NBIND;
+ li.pBindings = b;
+ vkCreateDescriptorSetLayout_(G.dev, &li, NULL, &G.dsl);
+ VkPushConstantRange pcr = {VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof(PC)};
+ VkPipelineLayoutCreateInfo pli = {VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO};
+ pli.setLayoutCount = 1;
+ pli.pSetLayouts = &G.dsl;
+ pli.pushConstantRangeCount = 1;
+ pli.pPushConstantRanges = &pcr;
+ vkCreatePipelineLayout_(G.dev, &pli, NULL, &G.pl);
+#define MK(nm) \
+ G.pipe[SH_##nm] = make_pipeline(spv_##nm, sizeof spv_##nm); \
+ if (!G.pipe[SH_##nm]) return fail("pipeline " #nm, VK_ERROR_INITIALIZATION_FAILED);
+ SHADERS(MK)
+#undef MK
+ VkDescriptorPoolSize ps = {VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, NBIND * 64};
+ VkDescriptorPoolCreateInfo dpi = {VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO};
+ dpi.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
+ dpi.maxSets = 64;
+ dpi.poolSizeCount = 1;
+ dpi.pPoolSizes = &ps;
+ vkCreateDescriptorPool_(G.dev, &dpi, NULL, &G.dpool);
+ G.ready = 1;
+ return 0;
+}
+
+API const char *nv_gpu_name(void) { return G.ready ? G.name : G.err; }
+
+/* ------------------------------------------------------------------ GPU fluid */
+
+#define MAXLEV 16
+#define MAXIT_BATCH 6
+
+typedef struct GpuFluid {
+ int nx, ny, nz;
+ size_t nc, nu, nv, nw;
+ float dx, o[3];
+ int ntx, nty, ntz, nt;
+ Buf F, S, R, P, PI, stage, RB; /* R: GPU scalars + partials (device local); RB: host readback */
+ VkDescriptorSet ds;
+ VkCommandBuffer cmd;
+ int recording;
+ /* float offsets in F */
+ uint32_t u, v, w, u0, v0, w0, u1, v1, w1, sc, expn, phi, tmp, fhat, fmn, fmx, cr, cz, cp, cq, cb, r0;
+ /* multigrid levels */
+ int nlev, lx[MAXLEV], ly[MAXLEV], lz[MAXLEV];
+ uint32_t lvx[MAXLEV], lvb[MAXLEV], lvr[MAXLEV], lst[MAXLEV]; /* x, b, r in F; stencil in S */
+ uint32_t solid_off, perm_off;
+ /* R layout (floats) */
+ uint32_t r_part, r_part2, r_npart;
+ int last_iters;
+ float last_res;
+ double ms;
+ VkQueryPool qp, qbusy;
+ double busy_ms, wait_ms; /* GPU executing vs host round trips, accumulated */
+ int nts; /* timestamps written this substep */
+ int ts_phase[64]; /* phase id of each timestamp */
+ double phase_ms[8]; /* GPU time per phase, accumulated until read */
+} GpuFluid;
+
+enum { PH_ADV_SCALARS, PH_COMBUST, PH_ADV_VEL, PH_FORCES, PH_PROJECT, PH_OTHER, PH_COUNT };
+
+enum { R_ZERO = 0, R_ONE = 1, R_RMAX0 = 2, R_BMAX = 3, R_PQ = 4, R_RZ = 5 /* 5,6 */, R_MAXV = 7, R_RMAXIT = 8 /* +64 */ };
+
+static void begin(GpuFluid *g) {
+ if (g->recording) return;
+ vkResetCommandBuffer_(g->cmd, 0);
+ VkCommandBufferBeginInfo bi = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO};
+ bi.flags = VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
+ vkBeginCommandBuffer_(g->cmd, &bi);
+ if (g->qbusy) {
+ vkCmdResetQueryPool_(g->cmd, g->qbusy, 0, 2);
+ vkCmdWriteTimestamp_(g->cmd, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT, g->qbusy, 0);
+ }
+ vkCmdBindDescriptorSets_(g->cmd, VK_PIPELINE_BIND_POINT_COMPUTE, G.pl, 0, 1, &g->ds, 0, NULL);
+ g->recording = 1;
+}
+
+static long g_syncs;
+API long nv_gpu_sync_count(void) { return g_syncs; }
+
+static void flush(GpuFluid *g) {
+ if (!g->recording) return;
+ g_syncs++;
+ if (g->qbusy) vkCmdWriteTimestamp_(g->cmd, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, g->qbusy, 1);
+ vkEndCommandBuffer_(g->cmd);
+ double w0 = now_ms();
+ VkSubmitInfo si = {VK_STRUCTURE_TYPE_SUBMIT_INFO};
+ si.commandBufferCount = 1;
+ si.pCommandBuffers = &g->cmd;
+ vkQueueSubmit_(G.queue, 1, &si, G.fence);
+ vkWaitForFences_(G.dev, 1, &G.fence, VK_TRUE, UINT64_MAX);
+ vkResetFences_(G.dev, 1, &G.fence);
+ g->recording = 0;
+ double busy = 0;
+ if (g->qbusy) {
+ uint64_t t[2];
+ if (vkGetQueryPoolResults_(G.dev, g->qbusy, 0, 2, sizeof t, t, sizeof(uint64_t), VK_QUERY_RESULT_64_BIT) ==
+ VK_SUCCESS)
+ busy = (double)(t[1] - t[0]) * G.ts_period * 1e-6;
+ }
+ g->busy_ms += busy;
+ g->wait_ms += now_ms() - w0 - busy;
+}
+
+/* GPU timestamp marking the START of a phase (the previous phase ends here) */
+static void begin(GpuFluid *g);
+static void ts(GpuFluid *g, int phase) {
+ if (!G.ts_ok || !g->qp || g->nts >= 64) return;
+ begin(g);
+ vkCmdWriteTimestamp_(g->cmd, VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT, g->qp, (uint32_t)g->nts);
+ g->ts_phase[g->nts++] = phase;
+}
+
+static void barrier(GpuFluid *g) {
+ VkMemoryBarrier mb = {VK_STRUCTURE_TYPE_MEMORY_BARRIER};
+ mb.srcAccessMask = VK_ACCESS_SHADER_WRITE_BIT | VK_ACCESS_TRANSFER_WRITE_BIT;
+ mb.dstAccessMask = VK_ACCESS_SHADER_READ_BIT | VK_ACCESS_SHADER_WRITE_BIT | VK_ACCESS_TRANSFER_READ_BIT |
+ VK_ACCESS_TRANSFER_WRITE_BIT | VK_ACCESS_HOST_READ_BIT;
+ vkCmdPipelineBarrier_(g->cmd, VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT,
+ VK_PIPELINE_STAGE_COMPUTE_SHADER_BIT | VK_PIPELINE_STAGE_TRANSFER_BIT |
+ VK_PIPELINE_STAGE_HOST_BIT,
+ 0, 1, &mb, 0, NULL, 0, NULL);
+}
+
+static void disp(GpuFluid *g, int sh, const PC *pc, uint32_t gx, uint32_t gy, uint32_t gz) {
+ begin(g);
+ vkCmdBindPipeline_(g->cmd, VK_PIPELINE_BIND_POINT_COMPUTE, G.pipe[sh]);
+ vkCmdPushConstants_(g->cmd, G.pl, VK_SHADER_STAGE_COMPUTE_BIT, 0, sizeof *pc, pc);
+ vkCmdDispatch_(g->cmd, gx ? gx : 1, gy ? gy : 1, gz ? gz : 1);
+ barrier(g);
+}
+
+static uint32_t cdiv(int a, int b) { return (uint32_t)((a + b - 1) / b); }
+
+static void pc_init(PC *p, int nx, int ny, int nz, int op) {
+ memset(p, 0, sizeof *p);
+ p->n[0] = nx; p->n[1] = ny; p->n[2] = nz; p->n[3] = op;
+}
+
+static void write_set(GpuFluid *g) {
+ Buf *bufs[NBIND] = {&g->F, &g->F, &g->S, &g->R, &g->P, &g->PI};
+ VkDescriptorBufferInfo dbi[NBIND];
+ VkWriteDescriptorSet wr[NBIND];
+ for (int i = 0; i < NBIND; i++) {
+ dbi[i].buffer = bufs[i]->buf;
+ dbi[i].offset = 0;
+ dbi[i].range = VK_WHOLE_SIZE;
+ memset(&wr[i], 0, sizeof wr[i]);
+ wr[i].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
+ wr[i].dstSet = g->ds;
+ wr[i].dstBinding = (uint32_t)i;
+ wr[i].descriptorCount = 1;
+ wr[i].descriptorType = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
+ wr[i].pBufferInfo = &dbi[i];
+ }
+ vkUpdateDescriptorSets_(G.dev, NBIND, wr, 0, NULL);
+}
+
+/* copy host bytes into a device buffer through the staging buffer */
+static int upload(GpuFluid *g, Buf *dst, VkDeviceSize off, const void *src, size_t bytes) {
+ size_t done = 0;
+ while (done < bytes) {
+ size_t chunk = bytes - done < g->stage.size ? bytes - done : g->stage.size;
+ flush(g);
+ memcpy(g->stage.map, (const char *)src + done, chunk);
+ begin(g);
+ VkBufferCopy cp = {0, off + done, chunk};
+ vkCmdCopyBuffer_(g->cmd, g->stage.buf, dst->buf, 1, &cp);
+ barrier(g);
+ flush(g);
+ done += chunk;
+ }
+ return 0;
+}
+
+static int download(GpuFluid *g, const Buf *src, VkDeviceSize off, void *dst, size_t bytes) {
+ size_t done = 0;
+ while (done < bytes) {
+ size_t chunk = bytes - done < g->stage.size ? bytes - done : g->stage.size;
+ begin(g);
+ VkBufferCopy cp = {off + done, 0, chunk};
+ vkCmdCopyBuffer_(g->cmd, src->buf, g->stage.buf, 1, &cp);
+ barrier(g);
+ flush(g);
+ memcpy((char *)dst + done, g->stage.map, chunk);
+ done += chunk;
+ }
+ return 0;
+}
+
+static void zero(GpuFluid *g, Buf *b) {
+ begin(g);
+ vkCmdFillBuffer_(g->cmd, b->buf, 0, VK_WHOLE_SIZE, 0);
+ barrier(g);
+ flush(g);
+}
+
+static int ensure_points(GpuFluid *g, size_t pts_bytes, size_t idx_bytes) {
+ int changed = 0;
+ if (pts_bytes > g->P.size) {
+ flush(g);
+ buf_free(&g->P);
+ if (buf_create(&g->P, pts_bytes + pts_bytes / 2, 0)) return -1;
+ if (getenv("NOVA_GPU_ZERO_ALL")) zero(g, &g->P);
+ changed = 1;
+ }
+ if (idx_bytes > g->PI.size) {
+ flush(g);
+ buf_free(&g->PI);
+ if (buf_create(&g->PI, idx_bytes + idx_bytes / 2, 0)) return -1;
+ if (getenv("NOVA_GPU_ZERO_ALL")) zero(g, &g->PI);
+ changed = 1;
+ }
+ if (changed) write_set(g);
+ return 0;
+}
+
+HIDDEN void gpuf_free(GpuFluid *g);
+
+HIDDEN GpuFluid *gpuf_new(int nx, int ny, int nz, float dx, const float *o, int nlev, const int *ldims) {
+ if (nv_gpu_init()) return NULL;
+ GpuFluid *g = (GpuFluid *)calloc(1, sizeof *g);
+ g->nx = nx; g->ny = ny; g->nz = nz; g->dx = dx;
+ memcpy(g->o, o, 3 * sizeof(float));
+ g->nc = (size_t)nx * ny * nz;
+ g->nu = (size_t)(nx + 1) * ny * nz;
+ g->nv = (size_t)nx * (ny + 1) * nz;
+ g->nw = (size_t)nx * ny * (nz + 1);
+ g->ntx = (nx + 7) / 8; g->nty = (ny + 7) / 8; g->ntz = (nz + 7) / 8;
+ g->nt = g->ntx * g->nty * g->ntz;
+ size_t big = g->nu > g->nv ? g->nu : g->nv;
+ if (g->nw > big) big = g->nw;
+ /* lay out F */
+ size_t off = 0;
+#define TAKE(field, count) do { g->field = (uint32_t)off; off += (count); } while (0)
+ TAKE(u, g->nu); TAKE(v, g->nv); TAKE(w, g->nw);
+ TAKE(u0, g->nu); TAKE(v0, g->nv); TAKE(w0, g->nw);
+ TAKE(u1, g->nu); TAKE(v1, g->nv); TAKE(w1, g->nw);
+ TAKE(sc, 4 * g->nc); TAKE(expn, g->nc); TAKE(phi, g->nc);
+ TAKE(tmp, 12 * g->nc);
+ TAKE(fhat, big); TAKE(fmn, big); TAKE(fmx, big);
+ TAKE(cr, g->nc); TAKE(cz, g->nc); TAKE(cp, g->nc); TAKE(cq, g->nc); TAKE(cb, g->nc); TAKE(r0, g->nc);
+ g->nlev = nlev;
+ for (int l = 0; l < nlev; l++) {
+ g->lx[l] = ldims[3 * l]; g->ly[l] = ldims[3 * l + 1]; g->lz[l] = ldims[3 * l + 2];
+ size_t n = (size_t)g->lx[l] * g->ly[l] * g->lz[l];
+ if (l == 0) {
+ g->lvx[0] = g->cz; g->lvb[0] = g->cr; g->lvr[0] = g->r0;
+ } else {
+ TAKE(lvx[l], n); TAKE(lvb[l], n); TAKE(lvr[l], n);
+ }
+ }
+#undef TAKE
+ if (off > 0xFFFFFFF0u) {
+ snprintf(G.err, sizeof G.err, "grid too large for the GPU backend");
+ free(g);
+ return NULL;
+ }
+ size_t soff = 0;
+ g->solid_off = (uint32_t)soff; soff += g->nc;
+ for (int l = 0; l < nlev; l++) {
+ g->lst[l] = (uint32_t)soff;
+ soff += (size_t)g->lx[l] * g->ly[l] * g->lz[l];
+ }
+ g->perm_off = (uint32_t)soff; soff += 512;
+ size_t parts = cdiv((int)g->nc, 256) + cdiv(nx + 1, 8) * cdiv(ny + 1, 8) * cdiv(nz + 1, 4) + (size_t)g->nt + 64;
+ g->r_npart = (uint32_t)parts;
+ g->r_part = 128;
+ g->r_part2 = (uint32_t)(128 + parts);
+ size_t stage_bytes = 4 * g->nc * sizeof(float);
+ if (stage_bytes < (g->nu + g->nv + g->nw) * sizeof(float)) stage_bytes = (g->nu + g->nv + g->nw) * sizeof(float);
+ if (stage_bytes > (256u << 20)) stage_bytes = 256u << 20;
+ VkCommandBufferAllocateInfo ca = {VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO};
+ ca.commandPool = G.pool;
+ ca.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
+ ca.commandBufferCount = 1;
+ size_t pad = getenv("NOVA_GPU_PAD") ? (size_t)atol(getenv("NOVA_GPU_PAD")) : 0; /* debugging */
+ if (vkAllocateCommandBuffers_(G.dev, &ca, &g->cmd) || buf_create(&g->F, (off + pad) * sizeof(float), 0) ||
+ buf_create(&g->S, (soff + pad) * sizeof(uint32_t), 0) || buf_create(&g->R, (128 + 2 * parts) * sizeof(float), 0) ||
+ buf_create(&g->RB, (128 + (size_t)g->nt) * sizeof(float), 1) ||
+ buf_create(&g->P, 4096, 0) || buf_create(&g->PI, 4096, 0) || buf_create(&g->stage, stage_bytes, 1)) {
+ gpuf_free(g);
+ return NULL;
+ }
+ VkDescriptorSetAllocateInfo dai = {VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO};
+ dai.descriptorPool = G.dpool;
+ dai.descriptorSetCount = 1;
+ dai.pSetLayouts = &G.dsl;
+ if (vkAllocateDescriptorSets_(G.dev, &dai, &g->ds)) {
+ gpuf_free(g);
+ return NULL;
+ }
+ write_set(g);
+ begin(g);
+ vkCmdFillBuffer_(g->cmd, g->F.buf, 0, VK_WHOLE_SIZE, 0);
+ vkCmdFillBuffer_(g->cmd, g->S.buf, 0, VK_WHOLE_SIZE, 0);
+ if (pad && getenv("NOVA_GPU_CANARY")) { /* debugging: poison the padding to catch reads past the end */
+ vkCmdFillBuffer_(g->cmd, g->F.buf, off * sizeof(float), pad * sizeof(float), 0x7149F2CAu); /* 1e30f */
+ vkCmdFillBuffer_(g->cmd, g->S.buf, soff * sizeof(uint32_t), pad * sizeof(uint32_t),
+ (uint32_t)atol(getenv("NOVA_GPU_CANARY")));
+ }
+ barrier(g);
+ flush(g);
+ begin(g); /* scalar constants live on the GPU: R[R_ZERO] = 0, R[R_ONE] = 1 */
+ vkCmdFillBuffer_(g->cmd, g->R.buf, 0, VK_WHOLE_SIZE, 0);
+ vkCmdFillBuffer_(g->cmd, g->R.buf, R_ONE * sizeof(float), sizeof(float), 0x3F800000u);
+ barrier(g);
+ flush(g);
+ if (G.ts_ok) {
+ VkQueryPoolCreateInfo qi = {VK_STRUCTURE_TYPE_QUERY_POOL_CREATE_INFO};
+ qi.queryType = VK_QUERY_TYPE_TIMESTAMP;
+ qi.queryCount = 64;
+ if (vkCreateQueryPool_(G.dev, &qi, NULL, &g->qp)) g->qp = VK_NULL_HANDLE;
+ qi.queryCount = 2;
+ if (vkCreateQueryPool_(G.dev, &qi, NULL, &g->qbusy)) g->qbusy = VK_NULL_HANDLE;
+ }
+ return g;
+}
+
+HIDDEN void gpuf_free(GpuFluid *g) {
+ if (!g) return;
+ flush(g);
+ vkDeviceWaitIdle_(G.dev);
+ Buf *bs[] = {&g->F, &g->S, &g->R, &g->P, &g->PI, &g->stage, &g->RB};
+ for (size_t i = 0; i < sizeof bs / sizeof *bs; i++) buf_free(bs[i]);
+ if (g->ds) vkFreeDescriptorSets_(G.dev, G.dpool, 1, &g->ds);
+ if (g->qp) vkDestroyQueryPool_(G.dev, g->qp, NULL);
+ if (g->qbusy) vkDestroyQueryPool_(G.dev, g->qbusy, NULL);
+ free(g);
+}
+
+HIDDEN void gpuf_reset(GpuFluid *g) {
+ begin(g);
+ vkCmdFillBuffer_(g->cmd, g->F.buf, 0, VK_WHOLE_SIZE, 0);
+ barrier(g);
+ flush(g);
+}
+
+/* stencils (diag | nb << 8) per level, the solid mask and the noise permutation */
+HIDDEN void gpuf_set_stencils(GpuFluid *g, const uint8_t *solid, uint8_t *const *diag, uint8_t *const *nb,
+ const uint8_t *perm) {
+ size_t total = g->nc;
+ for (int l = 0; l < g->nlev; l++) total += (size_t)g->lx[l] * g->ly[l] * g->lz[l];
+ total += 512;
+ uint32_t *s = (uint32_t *)malloc(total * sizeof(uint32_t));
+ for (size_t c = 0; c < g->nc; c++) s[c] = solid[c];
+ for (int l = 0; l < g->nlev; l++) {
+ size_t n = (size_t)g->lx[l] * g->ly[l] * g->lz[l];
+ uint32_t *d = s + g->lst[l];
+#pragma omp parallel for schedule(static)
+ for (size_t c = 0; c < n; c++) d[c] = (uint32_t)diag[l][c] | ((uint32_t)nb[l][c] << 8);
+ }
+ for (int i = 0; i < 512; i++) s[g->perm_off + i] = perm[i];
+ upload(g, &g->S, 0, s, total * sizeof(uint32_t));
+ free(s);
+}
+
+/* reduce partials R[r_part .. + n) into R[dst] (sum or max) */
+static void reduce(GpuFluid *g, uint32_t part, uint32_t n, uint32_t dst, int is_max) {
+ PC p;
+ pc_init(&p, 0, 0, 0, 5);
+ p.o1[0] = part; p.o1[1] = n; p.o1[2] = dst; p.o1[3] = (uint32_t)is_max;
+ disp(g, SH_cg, &p, 1, 1, 1);
+}
+
+/* copy R[first .. first+count) into the host readback buffer and wait; returns its mapping */
+static const float *fetch(GpuFluid *g, uint32_t first, uint32_t count) {
+ begin(g);
+ VkBufferCopy cp = {(VkDeviceSize)first * sizeof(float), 0, (VkDeviceSize)count * sizeof(float)};
+ vkCmdCopyBuffer_(g->cmd, g->R.buf, g->RB.buf, 1, &cp);
+ barrier(g);
+ flush(g);
+ return (const float *)g->RB.map;
+}
+
+static void vcycle(GpuFluid *g, int l) {
+ int nx = g->lx[l], ny = g->ly[l], nz = g->lz[l];
+ uint32_t gx = cdiv(nx, 8), gy = cdiv(ny, 8), gz = cdiv(nz, 4);
+ PC p;
+ pc_init(&p, nx, ny, nz, 1);
+ p.o0[0] = g->lvx[l]; p.o0[1] = g->lvb[l]; p.o0[2] = g->lvr[l]; p.o0[3] = g->lst[l];
+ if (l == g->nlev - 1) { /* coarsest level: smooth to convergence, symmetric order (as on the CPU) */
+ p.n[3] = 0;
+ disp(g, SH_mg, &p, gx, gy, gz);
+ p.n[3] = 1;
+ for (int s = 0; s < 12; s++)
+ for (int c = 0; c < 2; c++) { p.o1[0] = (uint32_t)c; disp(g, SH_mg, &p, gx, gy, gz); }
+ for (int s = 0; s < 12; s++)
+ for (int c = 1; c >= 0; c--) { p.o1[0] = (uint32_t)c; disp(g, SH_mg, &p, gx, gy, gz); }
+ return;
+ }
+ /* pre-smooth from x = 0: the first red sweep needs no neighbours, so no zeroing pass */
+ for (int s = 0; s < 2; s++)
+ for (int c = 0; c < 2; c++) {
+ p.o1[0] = (uint32_t)c;
+ p.o1[1] = (s == 0 && c == 0) ? 1u : 0u;
+ disp(g, SH_mg, &p, gx, gy, gz);
+ }
+ p.o1[1] = 0;
+ int cx = g->lx[l + 1], cy = g->ly[l + 1], cz = g->lz[l + 1];
+ PC q; /* residual fused into the restriction */
+ pc_init(&q, cx, cy, cz, 5);
+ q.o0[0] = g->lvx[l]; q.o0[1] = g->lst[l]; q.o0[2] = g->lvb[l + 1]; q.o0[3] = g->lst[l + 1];
+ q.o1[0] = (uint32_t)nx; q.o1[1] = (uint32_t)ny; q.o1[2] = (uint32_t)nz; q.o1[3] = g->lvb[l];
+ disp(g, SH_mg, &q, cdiv(cx, 8), cdiv(cy, 8), cdiv(cz, 4));
+ vcycle(g, l + 1);
+ PC r;
+ pc_init(&r, nx, ny, nz, 4);
+ r.o0[0] = g->lvx[l]; r.o0[3] = g->lst[l];
+ r.o1[0] = g->lvx[l + 1]; r.o1[1] = (uint32_t)cx; r.o1[2] = (uint32_t)cy;
+ disp(g, SH_mg, &r, gx, gy, gz);
+ for (int s = 0; s < 2; s++)
+ for (int c = 1; c >= 0; c--) { p.o1[0] = (uint32_t)c; disp(g, SH_mg, &p, gx, gy, gz); }
+}
+
+/* MGPCG on level 0: solve A phi = cb. CG scalars stay on the GPU; the host syncs once per batch. */
+static void solve(GpuFluid *g, const float *fp) {
+ uint32_t n = (uint32_t)g->nc, ng = cdiv((int)n, 256);
+ PC p;
+ pc_init(&p, (int)n, g->nx, g->ny, 4);
+ p.o0[0] = g->phi; p.o0[1] = g->cb; p.o0[2] = g->cr; p.o0[3] = g->lst[0];
+ p.o2[0] = g->r_part; p.o2[1] = g->r_part2;
+ disp(g, SH_cg, &p, ng, 1, 1);
+ reduce(g, g->r_part, ng, R_RMAX0, 1);
+ reduce(g, g->r_part2, ng, R_BMAX, 1);
+ const float *R = fetch(g, 0, 128);
+ float bmax = R[R_BMAX], rmax = R[R_RMAX0];
+ g->last_iters = 0;
+ g->last_res = 0.f;
+ if (bmax < 1e-9f) {
+ PC z;
+ pc_init(&z, g->nx, g->ny, g->nz, 0);
+ z.o0[0] = g->phi; z.o0[3] = g->lst[0];
+ disp(g, SH_mg, &z, cdiv(g->nx, 8), cdiv(g->ny, 8), cdiv(g->nz, 4));
+ return;
+ }
+ float tol = fp[FP_cg_tol] * bmax;
+ if (rmax <= tol) {
+ g->last_res = rmax / bmax;
+ return;
+ }
+ int maxit = (int)fp[FP_cg_iter];
+ vcycle(g, 0);
+ /* rz = r.z ; p = z */
+ int cur = 0;
+ pc_init(&p, (int)n, 0, 0, 2);
+ p.o0[0] = g->cr; p.o0[1] = g->cz; p.o2[0] = g->r_part;
+ disp(g, SH_cg, &p, ng, 1, 1);
+ reduce(g, g->r_part, ng, R_RZ + cur, 0);
+ pc_init(&p, (int)n, 0, 0, 3);
+ p.o0[0] = g->cp; p.o0[1] = g->cz; p.o1[1] = R_ZERO; p.o1[2] = R_ONE;
+ disp(g, SH_cg, &p, ng, 1, 1);
+ int it = 0, done = 0;
+ while (!done && it < maxit) {
+ int batch = maxit - it < MAXIT_BATCH ? maxit - it : MAXIT_BATCH;
+ for (int b = 0; b < batch; b++) {
+ pc_init(&p, (int)n, g->nx, g->ny, 0); /* q = A p */
+ p.o0[0] = g->cp; p.o0[1] = g->cq; p.o0[3] = g->lst[0]; p.o2[0] = g->r_part;
+ disp(g, SH_cg, &p, ng, 1, 1);
+ reduce(g, g->r_part, ng, R_PQ, 0);
+ pc_init(&p, (int)n, 0, 0, 1); /* x += a p, r -= a q */
+ p.o0[0] = g->phi; p.o0[1] = g->cp; p.o0[2] = g->cr; p.o0[3] = g->cq;
+ p.o1[1] = R_RZ + cur; p.o1[2] = R_PQ; p.o2[0] = g->r_part;
+ disp(g, SH_cg, &p, ng, 1, 1);
+ reduce(g, g->r_part, ng, R_RMAXIT + (uint32_t)b, 1);
+ vcycle(g, 0);
+ pc_init(&p, (int)n, 0, 0, 2); /* rz' = r.z */
+ p.o0[0] = g->cr; p.o0[1] = g->cz; p.o2[0] = g->r_part;
+ disp(g, SH_cg, &p, ng, 1, 1);
+ reduce(g, g->r_part, ng, R_RZ + (1 - cur), 0);
+ pc_init(&p, (int)n, 0, 0, 3); /* p = z + (rz'/rz) p */
+ p.o0[0] = g->cp; p.o0[1] = g->cz; p.o1[1] = R_RZ + (1 - cur); p.o1[2] = R_RZ + cur;
+ disp(g, SH_cg, &p, ng, 1, 1);
+ cur = 1 - cur;
+ }
+ R = fetch(g, 0, 128);
+ for (int b = 0; b < batch; b++) {
+ it++;
+ rmax = R[R_RMAXIT + b];
+ if (rmax <= tol) { done = 1; break; }
+ }
+ }
+ g->last_iters = it;
+ g->last_res = rmax / bmax;
+}
+
+static void project(GpuFluid *g, uint32_t U, uint32_t V, uint32_t W, const float *fp) {
+ int nx = g->nx, ny = g->ny, nz = g->nz;
+ uint32_t fx = cdiv(nx + 1, 8), fy = cdiv(ny + 1, 8), fz = cdiv(nz + 1, 4);
+ uint32_t cf = fp[FP_closed_floor] > 0.5f;
+ PC p;
+ pc_init(&p, nx, ny, nz, 3); /* zero faces at solids */
+ p.o0[0] = U; p.o0[1] = V; p.o0[2] = W; p.o2[0] = g->solid_off; p.o2[1] = cf;
+ disp(g, SH_faces, &p, fx, fy, fz);
+ pc_init(&p, nx, ny, nz, 0); /* rhs */
+ p.o0[0] = U; p.o0[1] = V; p.o0[2] = W; p.o0[3] = g->cb; p.o1[0] = g->expn; p.o2[0] = g->lst[0];
+ p.f0[0] = g->dx;
+ disp(g, SH_project, &p, cdiv(nx, 8), cdiv(ny, 8), cdiv(nz, 4));
+ solve(g, fp);
+ pc_init(&p, nx, ny, nz, 1); /* subtract grad phi */
+ p.o0[0] = U; p.o0[1] = V; p.o0[2] = W; p.o0[3] = g->phi; p.o2[0] = g->solid_off; p.o2[1] = cf;
+ p.f0[0] = 1.f / g->dx;
+ disp(g, SH_project, &p, fx, fy, fz);
+}
+
+static void advect_velocity(GpuFluid *g, uint32_t su, uint32_t sv, uint32_t sw, uint32_t U, uint32_t V, uint32_t W,
+ uint32_t du, uint32_t dv, uint32_t dw, float dt, int mc) {
+ uint32_t src[3] = {su, sv, sw}, dst[3] = {du, dv, dw};
+ for (int comp = 0; comp < 3; comp++) {
+ int sx = g->nx + (comp == 0), sy = g->ny + (comp == 1), sz = g->nz + (comp == 2);
+ PC p;
+ pc_init(&p, g->nx, g->ny, g->nz, (mc ? 0 : 2) | (comp << 4));
+ p.o0[0] = U; p.o0[1] = V; p.o0[2] = W; p.o0[3] = src[comp];
+ p.o1[0] = dst[comp]; p.o1[1] = g->fhat; p.o1[2] = g->fmn; p.o1[3] = g->fmx;
+ p.f0[0] = dt / g->dx;
+ disp(g, SH_adv_face, &p, cdiv(sx, 8), cdiv(sy, 8), cdiv(sz, 4));
+ if (mc) {
+ p.n[3] = 1 | (comp << 4);
+ disp(g, SH_adv_face, &p, cdiv(sx, 8), cdiv(sy, 8), cdiv(sz, 4));
+ }
+ }
+}
+
+static void add_forces(GpuFluid *g, uint32_t U, uint32_t V, uint32_t W, float dt, const float *fp, double time) {
+ int nx = g->nx, ny = g->ny, nz = g->nz;
+ uint32_t gx = cdiv(nx, 8), gy = cdiv(ny, 8), gz = cdiv(nz, 4);
+ PC p;
+ pc_init(&p, nx, ny, nz, 0); /* buoyancy on w faces */
+ p.o0[0] = U; p.o0[1] = V; p.o0[2] = W; p.o0[3] = g->sc; p.o1[0] = g->sc + (uint32_t)g->nc;
+ p.f0[0] = dt; p.f0[1] = fp[FP_buoy_heat]; p.f0[2] = fp[FP_buoy_smoke];
+ disp(g, SH_forces, &p, gx, gy, cdiv(nz + 1, 4));
+ float eps = fp[FP_vorticity], tamp = fp[FP_turb_amp];
+ if (eps > 0.f || tamp > 0.f) {
+ pc_init(&p, nx, ny, nz, 1);
+ p.o0[0] = U; p.o0[1] = V; p.o0[2] = W; p.o1[0] = g->tmp;
+ p.f0[1] = 0.5f / g->dx;
+ disp(g, SH_forces, &p, gx, gy, gz);
+ pc_init(&p, nx, ny, nz, 2);
+ p.o0[0] = U; p.o0[1] = V; p.o0[2] = W; /* local speed limits the noise push */
+ p.o0[3] = g->sc;
+ p.o1[0] = g->tmp; p.o1[1] = g->sc + (uint32_t)g->nc; p.o1[2] = g->perm_off;
+ p.o1[3] = (uint32_t)fp[FP_seed] * 7919u + 17u;
+ p.f0[0] = eps * g->dx; p.f0[1] = 0.5f / g->dx; p.f0[2] = tamp; p.f0[3] = fp[FP_turb_freq];
+ p.f1[0] = (float)time * fp[FP_turb_speed]; p.f1[1] = g->dx; p.f1[2] = g->o[0]; p.f1[3] = g->o[1];
+ p.f2[0] = g->o[2];
+ disp(g, SH_forces, &p, gx, gy, gz);
+ pc_init(&p, nx, ny, nz, 3);
+ p.o0[0] = U; p.o0[1] = V; p.o0[2] = W; p.o1[0] = g->tmp;
+ p.f0[0] = dt;
+ disp(g, SH_forces, &p, gx, gy, gz);
+ }
+ float wd = fp[FP_wind_drag], vd = fp[FP_vel_decay];
+ if (wd > 0.f || vd > 0.f) {
+ pc_init(&p, nx, ny, nz, 4);
+ p.o0[0] = U; p.o0[1] = V; p.o0[2] = W;
+ p.f0[0] = 1.f - expf(-wd * dt); p.f0[1] = expf(-vd * dt);
+ p.f1[0] = fp[FP_wind_x]; p.f1[1] = fp[FP_wind_y]; p.f1[2] = fp[FP_wind_z];
+ disp(g, SH_forces, &p, cdiv(nx + 1, 8), cdiv(ny + 1, 8), cdiv(nz + 1, 4));
+ }
+}
+
+static void faces_op(GpuFluid *g, int op, uint32_t dU, uint32_t dV, uint32_t dW, uint32_t sU, uint32_t sV,
+ uint32_t sW, float f) {
+ PC p;
+ pc_init(&p, g->nx, g->ny, g->nz, op);
+ p.o0[0] = dU; p.o0[1] = dV; p.o0[2] = dW; p.o1[0] = sU; p.o1[1] = sV; p.o1[2] = sW;
+ p.o2[0] = g->lst[0];
+ p.f0[0] = f;
+ disp(g, SH_faces, &p, cdiv(g->nx + 1, 8), cdiv(g->ny + 1, 8), cdiv(g->nz + 1, 4));
+}
+
+HIDDEN void gpuf_substep(GpuFluid *g, const float *fp, float dt, double time) {
+ double t0 = now_ms();
+ int nx = g->nx, ny = g->ny, nz = g->nz;
+ int mc = fp[FP_maccormack] > 0.5f;
+ g->nts = 0;
+ if (g->qp) {
+ begin(g);
+ vkCmdResetQueryPool_(g->cmd, g->qp, 0, 64);
+ }
+ ts(g, PH_ADV_SCALARS);
+ /* scalars */
+ PC p;
+ pc_init(&p, nx, ny, nz, 0);
+ p.o0[0] = g->u; p.o0[1] = g->v; p.o0[2] = g->w; p.o0[3] = g->sc; p.o1[0] = g->tmp;
+ p.f0[0] = dt / g->dx;
+ disp(g, SH_adv_scalars, &p, cdiv(nx, 8), cdiv(ny, 8), cdiv(nz, 4));
+ p.n[3] = mc ? 1 : 2;
+ disp(g, SH_adv_scalars, &p, cdiv(nx, 8), cdiv(ny, 8), cdiv(nz, 4));
+ /* combustion */
+ ts(g, PH_COMBUST);
+ pc_init(&p, nx, ny, nz, 0);
+ p.o0[0] = g->sc; p.o0[1] = g->sc + (uint32_t)g->nc; p.o0[2] = g->sc + 2u * (uint32_t)g->nc;
+ p.o0[3] = g->sc + 3u * (uint32_t)g->nc; p.o1[0] = g->expn;
+ p.f0[0] = fp[FP_ignite]; p.f0[1] = fp[FP_burn_rate]; p.f0[2] = fp[FP_heat_release]; p.f0[3] = fp[FP_smoke_yield];
+ p.f1[0] = fp[FP_expansion]; p.f1[1] = expf(-fp[FP_cool] * dt); p.f1[2] = fp[FP_cool_rad];
+ p.f1[3] = expf(-fp[FP_smoke_decay] * dt);
+ p.f2[0] = expf(-fp[FP_fuel_decay] * dt); p.f2[1] = expf(-fp[FP_flame_decay] * dt); p.f2[2] = dt;
+ disp(g, SH_combust, &p, cdiv((int)g->nc, 256), 1, 1);
+ /* velocity */
+ if (fp[FP_reflect] > 0.5f) {
+ ts(g, PH_ADV_VEL);
+ advect_velocity(g, g->u, g->v, g->w, g->u, g->v, g->w, g->u1, g->v1, g->w1, 0.5f * dt, mc);
+ ts(g, PH_FORCES);
+ add_forces(g, g->u1, g->v1, g->w1, dt, fp, time);
+ ts(g, PH_OTHER);
+ faces_op(g, 0, g->u0, g->v0, g->w0, g->u1, g->v1, g->w1, 0.f);
+ ts(g, PH_PROJECT);
+ project(g, g->u1, g->v1, g->w1, fp);
+ ts(g, PH_OTHER);
+ faces_op(g, 1, g->u0, g->v0, g->w0, g->u1, g->v1, g->w1, 0.f);
+ ts(g, PH_ADV_VEL);
+ advect_velocity(g, g->u0, g->v0, g->w0, g->u1, g->v1, g->w1, g->u, g->v, g->w, 0.5f * dt, mc);
+ ts(g, PH_PROJECT);
+ project(g, g->u, g->v, g->w, fp);
+ } else {
+ ts(g, PH_ADV_VEL);
+ advect_velocity(g, g->u, g->v, g->w, g->u, g->v, g->w, g->u1, g->v1, g->w1, dt, mc);
+ uint32_t t;
+ t = g->u; g->u = g->u1; g->u1 = t;
+ t = g->v; g->v = g->v1; g->v1 = t;
+ t = g->w; g->w = g->w1; g->w1 = t;
+ ts(g, PH_FORCES);
+ add_forces(g, g->u, g->v, g->w, dt, fp, time);
+ ts(g, PH_PROJECT);
+ project(g, g->u, g->v, g->w, fp);
+ }
+ ts(g, PH_OTHER);
+ faces_op(g, 2, g->u, g->v, g->w, 0, 0, 0, 2.f * fp[FP_cfl] * g->dx / dt);
+ ts(g, PH_OTHER);
+ flush(g);
+ if (g->qp && g->nts > 1) {
+ uint64_t t[64];
+ if (vkGetQueryPoolResults_(G.dev, g->qp, 0, (uint32_t)g->nts, sizeof t, t, sizeof(uint64_t),
+ VK_QUERY_RESULT_64_BIT | VK_QUERY_RESULT_WAIT_BIT) == VK_SUCCESS)
+ for (int i = 0; i + 1 < g->nts; i++)
+ g->phase_ms[g->ts_phase[i]] += (double)(t[i + 1] - t[i]) * G.ts_period * 1e-6;
+ }
+ g->ms += now_ms() - t0;
+}
+
+/* GPU-side time per phase since the last call: adv scalars, combust, adv velocity, forces, project, other */
+API void nv_gpu_phases(void *fluid_gpu, double *out) {
+ GpuFluid *g = (GpuFluid *)fluid_gpu;
+ for (int i = 0; i < PH_COUNT; i++) { out[i] = g->phase_ms[i]; g->phase_ms[i] = 0; }
+ out[PH_COUNT] = g->busy_ms; /* GPU actually executing */
+ out[PH_COUNT + 1] = g->wait_ms; /* host-side latency around each submit (CPU wake-up, submit) */
+ g->busy_ms = g->wait_ms = 0;
+}
+
+HIDDEN float gpuf_max_speed(GpuFluid *g) {
+ PC p;
+ pc_init(&p, g->nx, g->ny, g->nz, 4);
+ p.o0[0] = g->u; p.o0[1] = g->v; p.o0[2] = g->w; p.o2[2] = g->r_part;
+ uint32_t gx = cdiv(g->nx + 1, 8), gy = cdiv(g->ny + 1, 8), gz = cdiv(g->nz + 1, 4);
+ disp(g, SH_faces, &p, gx, gy, gz);
+ reduce(g, g->r_part, gx * gy * gz, R_MAXV, 1);
+ return fetch(g, 0, 128)[R_MAXV];
+}
+
+/* Bucket points into the tiles they can reach, upload, run the gather kernel.
+ * op 0: emitter splat (stride 6: pos, vel); op 1: deposit (stride 6: pos, smoke, heat, fuel). */
+static int bucket_upload(GpuFluid *g, int n, const float *pts6, int op, float R) {
+ float inv = 1.f / g->dx;
+ int rr = (int)ceilf(R * inv) + 1;
+ uint32_t *cnt = (uint32_t *)calloc((size_t)g->nt + 1, sizeof(uint32_t));
+ int (*rng)[6] = malloc(sizeof(int[6]) * (size_t)(n ? n : 1));
+ size_t total = 0;
+ for (int p = 0; p < n; p++) {
+ int b[6];
+ for (int a = 0; a < 3; a++) {
+ int nn = a == 0 ? g->nx : (a == 1 ? g->ny : g->nz), nt = a == 0 ? g->ntx : (a == 1 ? g->nty : g->ntz);
+ float gpos = (pts6[6 * p + a] - g->o[a]) * inv;
+ int lo, hi;
+ if (op == 0) {
+ int ci = (int)floorf(gpos);
+ lo = ci - rr; hi = ci + rr;
+ } else {
+ lo = hi = (int)floorf(gpos - 0.5f);
+ }
+ if (hi < 0 || lo >= nn) { b[0] = 1; b[1] = 0; break; }
+ lo = lo < 0 ? 0 : lo; hi = hi >= nn ? nn - 1 : hi;
+ b[2 * a] = lo / 8; b[2 * a + 1] = hi / 8;
+ if (b[2 * a + 1] >= nt) b[2 * a + 1] = nt - 1;
+ }
+ memcpy(rng[p], b, sizeof b);
+ if (b[1] < b[0]) continue;
+ for (int z = b[4]; z <= b[5]; z++)
+ for (int y = b[2]; y <= b[3]; y++)
+ for (int x = b[0]; x <= b[1]; x++) { cnt[x + g->ntx * (y + g->nty * z)]++; total++; }
+ }
+ size_t nidx = (size_t)g->nt + 1 + total;
+ uint32_t *idx = (uint32_t *)malloc(nidx * sizeof(uint32_t));
+ uint32_t acc = 0;
+ for (int t = 0; t < g->nt; t++) { idx[t] = acc; acc += cnt[t]; }
+ idx[g->nt] = acc;
+ memset(cnt, 0, sizeof(uint32_t) * (size_t)g->nt);
+ for (int p = 0; p < n; p++) { /* increasing point order inside each tile, like the CPU loop */
+ int *b = rng[p];
+ if (b[1] < b[0]) continue;
+ for (int z = b[4]; z <= b[5]; z++)
+ for (int y = b[2]; y <= b[3]; y++)
+ for (int x = b[0]; x <= b[1]; x++) {
+ int t = x + g->ntx * (y + g->nty * z);
+ idx[g->nt + 1 + idx[t] + cnt[t]++] = (uint32_t)p;
+ }
+ }
+ free(cnt);
+ free(rng);
+ flush(g);
+ if (ensure_points(g, (size_t)(n ? n : 1) * 6 * sizeof(float), nidx * sizeof(uint32_t))) {
+ free(idx);
+ return -1;
+ }
+ size_t pb = (size_t)n * 6 * sizeof(float), ib = nidx * sizeof(uint32_t);
+ if (pb + ib <= g->stage.size) { /* both in one submit */
+ flush(g);
+ memcpy(g->stage.map, pts6, pb);
+ memcpy((char *)g->stage.map + pb, idx, ib);
+ begin(g);
+ VkBufferCopy c0 = {0, 0, pb}, c1 = {pb, 0, ib};
+ if (pb) vkCmdCopyBuffer_(g->cmd, g->stage.buf, g->P.buf, 1, &c0);
+ vkCmdCopyBuffer_(g->cmd, g->stage.buf, g->PI.buf, 1, &c1);
+ barrier(g); /* the gather dispatch that follows is recorded into the same submit */
+ } else {
+ if (n) upload(g, &g->P, 0, pts6, pb);
+ upload(g, &g->PI, 0, idx, ib);
+ }
+ free(idx);
+ return total ? 1 : 0;
+}
+
+HIDDEN void gpuf_splat(GpuFluid *g, int n, const float *pos, float radius, float dens, float heat, float fuel,
+ const float *vel, float vel_amt, int mode) {
+ if (n <= 0) return;
+ float R = fmaxf(radius, 0.75f * g->dx);
+ float *pts = (float *)malloc(sizeof(float) * 6 * (size_t)n);
+ for (int p = 0; p < n; p++) {
+ for (int a = 0; a < 3; a++) {
+ pts[6 * p + a] = pos[3 * p + a];
+ pts[6 * p + 3 + a] = vel ? vel[3 * p + a] : 0.f;
+ }
+ }
+ int any = bucket_upload(g, n, pts, 0, R);
+ free(pts);
+ if (any <= 0) return;
+ PC p;
+ pc_init(&p, g->nx, g->ny, g->nz, 0);
+ p.o0[0] = g->sc; p.o0[1] = g->sc + (uint32_t)g->nc; p.o0[2] = g->sc + 2u * (uint32_t)g->nc;
+ p.o1[0] = g->u; p.o1[1] = g->v; p.o1[2] = g->w;
+ p.o2[0] = (uint32_t)g->ntx; p.o2[1] = (uint32_t)g->nty; p.o2[3] = g->solid_off;
+ p.f0[0] = R * R; p.f0[1] = dens; p.f0[2] = heat; p.f0[3] = fuel;
+ p.f1[0] = vel_amt; p.f1[1] = (float)mode; p.f1[2] = g->dx; p.f1[3] = vel && vel_amt > 0.f ? 1.f : 0.f;
+ p.f2[0] = g->o[0]; p.f2[1] = g->o[1]; p.f2[2] = g->o[2];
+ disp(g, SH_splat, &p, cdiv(g->nx, 8), cdiv(g->ny, 8), cdiv(g->nz, 4));
+ flush(g);
+}
+
+HIDDEN void gpuf_deposit(GpuFluid *g, int n, const float *pos, const float *amt) {
+ if (n <= 0) return;
+ float *pts = (float *)malloc(sizeof(float) * 6 * (size_t)n);
+ for (int p = 0; p < n; p++)
+ for (int a = 0; a < 3; a++) {
+ pts[6 * p + a] = pos[3 * p + a];
+ pts[6 * p + 3 + a] = amt[3 * p + a];
+ }
+ int any = bucket_upload(g, n, pts, 1, 0.f);
+ free(pts);
+ if (any <= 0) return;
+ PC p;
+ pc_init(&p, g->nx, g->ny, g->nz, 1);
+ p.o0[0] = g->sc; p.o0[1] = g->sc + (uint32_t)g->nc; p.o0[2] = g->sc + 2u * (uint32_t)g->nc;
+ p.o2[0] = (uint32_t)g->ntx; p.o2[1] = (uint32_t)g->nty;
+ p.f1[2] = g->dx;
+ p.f2[0] = g->o[0]; p.f2[1] = g->o[1]; p.f2[2] = g->o[2];
+ disp(g, SH_splat, &p, cdiv(g->nx, 8), cdiv(g->ny, 8), cdiv(g->nz, 4));
+ flush(g);
+}
+
+/* which: 0 density 1 heat 2 fuel 3 flame 4 u 5 v 6 w */
+HIDDEN void gpuf_download(GpuFluid *g, int which, float *dst) {
+ flush(g);
+ uint32_t off;
+ size_t n;
+ if (which < 4) { off = g->sc + (uint32_t)which * (uint32_t)g->nc; n = g->nc; }
+ else if (which == 4) { off = g->u; n = g->nu; }
+ else if (which == 5) { off = g->v; n = g->nv; }
+ else { off = g->w; n = g->nw; }
+ download(g, &g->F, (VkDeviceSize)off * sizeof(float), dst, n * sizeof(float));
+}
+
+/* all three velocity components in one submit (particles that ride the flow) */
+HIDDEN void gpuf_download_velocity(GpuFluid *g, float *u, float *v, float *w) {
+ size_t bytes = (g->nu + g->nv + g->nw) * sizeof(float);
+ if (bytes > g->stage.size) {
+ gpuf_download(g, 4, u);
+ gpuf_download(g, 5, v);
+ gpuf_download(g, 6, w);
+ return;
+ }
+ begin(g);
+ VkBufferCopy cp[3] = {{(VkDeviceSize)g->u * 4, 0, g->nu * 4}, {(VkDeviceSize)g->v * 4, g->nu * 4, g->nv * 4},
+ {(VkDeviceSize)g->w * 4, (g->nu + g->nv) * 4, g->nw * 4}};
+ for (int i = 0; i < 3; i++) vkCmdCopyBuffer_(g->cmd, g->F.buf, g->stage.buf, 1, &cp[i]);
+ barrier(g);
+ flush(g);
+ memcpy(u, g->stage.map, g->nu * 4);
+ memcpy(v, (char *)g->stage.map + g->nu * 4, g->nv * 4);
+ memcpy(w, (char *)g->stage.map + (g->nu + g->nv) * 4, g->nw * 4);
+}
+
+/* bounding box of tiles holding anything (cell units, end exclusive); returns 0 if empty */
+HIDDEN int gpuf_active_bbox(GpuFluid *g, int *b) {
+ PC p;
+ pc_init(&p, g->nx, g->ny, g->nz, 0);
+ p.o0[0] = g->sc; p.o2[0] = g->r_part;
+ disp(g, SH_tilemax, &p, (uint32_t)g->ntx, (uint32_t)g->nty, (uint32_t)g->ntz);
+ const float *R = fetch(g, g->r_part, (uint32_t)g->nt);
+ int lo[3] = {1 << 30, 1 << 30, 1 << 30}, hi[3] = {-1, -1, -1};
+ for (int t = 0; t < g->nt; t++) {
+ if (R[t] <= 1e-4f) continue;
+ int tc[3] = {t % g->ntx, (t / g->ntx) % g->nty, t / (g->ntx * g->nty)};
+ for (int a = 0; a < 3; a++) {
+ if (tc[a] < lo[a]) lo[a] = tc[a];
+ if (tc[a] > hi[a]) hi[a] = tc[a];
+ }
+ }
+ if (hi[0] < 0) return 0;
+ int nn[3] = {g->nx, g->ny, g->nz};
+ for (int a = 0; a < 3; a++) {
+ b[2 * a] = lo[a] * 8;
+ b[2 * a + 1] = (hi[a] + 1) * 8 < nn[a] ? (hi[a] + 1) * 8 : nn[a];
+ }
+ return 1;
+}
+
+HIDDEN void gpuf_stats(GpuFluid *g, int *iters, float *res, double *ms) {
+ *iters = g->last_iters;
+ *res = g->last_res;
+ *ms = g->ms;
+ g->ms = 0;
+}
diff --git a/vendor/nova-fx/core/nova_core.c b/vendor/nova-fx/core/nova_core.c
new file mode 100644
index 0000000..63da87d
--- /dev/null
+++ b/vendor/nova-fx/core/nova_core.c
@@ -0,0 +1,3063 @@
+/*
+ * Nova FX — simulation core.
+ *
+ * Particles : structure-of-arrays, OpenMP, deterministic hash RNG (results do not depend on
+ * thread count), event graph per particle type (death bursts, trails, splitting,
+ * collision spawns), curl-noise turbulence, force objects, analytic colliders,
+ * two-way coupling with the fluid grid, physically based incandescence
+ * (Planck spectrum integrated against CIE 1931 colour matching functions).
+ * Fluid : incompressible Navier–Stokes on a staggered MAC grid.
+ * - MacCormack advection with Selle et al. 2008 min/max clamping
+ * - advection–reflection (Zehnder, Narain, Thomaszewski 2018) to keep the
+ * swirl energy that plain semi-Lagrangian steps lose
+ * - vorticity confinement (Fedkiw, Stam, Jensen 2001)
+ * - combustion: fuel + ignition temperature + heat release + smoke yield +
+ * volume expansion fed into the pressure solve (explosions push outward)
+ * - Newton + radiative (T^4, Stefan–Boltzmann) cooling
+ * - pressure: conjugate gradient preconditioned by a geometric multigrid V-cycle
+ * (MGPCG, McAdams, Sifakis, Teran 2010)
+ *
+ * Everything is exposed through a flat C API used from Python with ctypes.
+ * Parameter tables are X-macros so the Python side reads names/defaults from this file.
+ */
+
+#include <math.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#if defined(__x86_64__) || defined(__i386__)
+#include <xmmintrin.h>
+#define HAVE_SSE 1
+#endif
+#ifdef _OPENMP
+#include <omp.h>
+#else
+static int omp_get_max_threads(void) { return 1; }
+static int omp_get_thread_num(void) { return 0; }
+static void omp_set_num_threads(int n) { (void)n; }
+#endif
+
+#define API __attribute__((visibility("default")))
+#define MAXK 32
+#define MAXCOL 64
+#define MAXFRC 64
+#define MAXGEN 15
+
+/* ===================================================================== parameter tables */
+
+#include "nova_params.h"
+
+/* GPU backend (gpu_vk.c). Weak: the core links and runs without it. */
+typedef struct GpuFluid GpuFluid;
+#define WEAK __attribute__((weak))
+WEAK GpuFluid *gpuf_new(int nx, int ny, int nz, float dx, const float *o, int nlev, const int *ldims);
+WEAK void gpuf_free(GpuFluid *g);
+WEAK void gpuf_reset(GpuFluid *g);
+WEAK void gpuf_set_stencils(GpuFluid *g, const uint8_t *solid, uint8_t *const *diag, uint8_t *const *nb,
+ const uint8_t *perm);
+WEAK void gpuf_substep(GpuFluid *g, const float *fp, float dt, double time);
+WEAK float gpuf_max_speed(GpuFluid *g);
+WEAK void gpuf_splat(GpuFluid *g, int n, const float *pos, float radius, float dens, float heat, float fuel,
+ const float *vel, float vel_amt, int mode);
+WEAK void gpuf_deposit(GpuFluid *g, int n, const float *pos, const float *amt);
+WEAK void gpuf_download(GpuFluid *g, int which, float *dst);
+WEAK void gpuf_download_velocity(GpuFluid *g, float *u, float *v, float *w);
+WEAK int gpuf_active_bbox(GpuFluid *g, int *b);
+WEAK void gpuf_stats(GpuFluid *g, int *iters, float *res, double *ms);
+
+#define E_K(n, d) KP_##n,
+#define E_S(n, d) SP_##n,
+enum { KIND_PARAMS(E_K) KP_COUNT };
+enum { SYS_PARAMS(E_S) SP_COUNT };
+#define NAME(n, d) #n ","
+#define DEF(n, d) (float)(d),
+static const char kind_names[] = KIND_PARAMS(NAME);
+static const float kind_defs[] = {KIND_PARAMS(DEF)};
+static const char sys_names[] = SYS_PARAMS(NAME);
+static const float sys_defs[] = {SYS_PARAMS(DEF)};
+static const char fluid_names[] = FLUID_PARAMS(NAME);
+static const float fluid_defs[] = {FLUID_PARAMS(DEF)};
+
+API const char *nv_kind_param_names(void) { return kind_names; }
+API const char *nv_sys_param_names(void) { return sys_names; }
+API const char *nv_fluid_param_names(void) { return fluid_names; }
+API int nv_kind_param_count(void) { return KP_COUNT; }
+API int nv_sys_param_count(void) { return SP_COUNT; }
+API int nv_fluid_param_count(void) { return FP_COUNT; }
+API void nv_kind_param_defaults(float *o) { memcpy(o, kind_defs, sizeof kind_defs); }
+API void nv_sys_param_defaults(float *o) { memcpy(o, sys_defs, sizeof sys_defs); }
+API void nv_fluid_param_defaults(float *o) { memcpy(o, fluid_defs, sizeof fluid_defs); }
+API int nv_version(void) { return 100; }
+API int nv_num_threads(void) { return omp_get_max_threads(); }
+API void nv_set_threads(int n) {
+ if (n > 0) omp_set_num_threads(n);
+}
+
+/* -ffast-math only flushes denormals in executables; a shared library has to do it itself,
+ * in every worker thread, or decaying fields crawl through microcode-assisted denormal math. */
+static void ftz(void) {
+#ifdef HAVE_SSE
+#pragma omp parallel
+ _mm_setcsr(_mm_getcsr() | 0x8040);
+#endif
+}
+
+static double now_ms(void) {
+ struct timespec t;
+ clock_gettime(CLOCK_MONOTONIC, &t);
+ return t.tv_sec * 1e3 + t.tv_nsec * 1e-6;
+}
+
+/* ===================================================================== small math */
+
+static inline float clampf(float x, float a, float b) { return x < a ? a : (x > b ? b : x); }
+static inline float lerpf(float a, float b, float t) { return a + (b - a) * t; }
+static inline float smooth01(float x) {
+ x = clampf(x, 0.f, 1.f);
+ return x * x * (3.f - 2.f * x);
+}
+
+static inline uint32_t pcg(uint32_t v) {
+ uint32_t s = v * 747796405u + 2891336453u;
+ uint32_t w = ((s >> ((s >> 28u) + 4u)) ^ s) * 277803737u;
+ return (w >> 22u) ^ w;
+}
+static inline uint32_t h3(uint32_t a, uint32_t b, uint32_t c) { return pcg(a ^ pcg(b ^ pcg(c))); }
+static inline float u01(uint32_t h) { return (float)(h >> 8) * (1.0f / 16777216.0f); }
+
+static inline void rand_dir(uint32_t h, float *d) {
+ float z = 2.f * u01(h) - 1.f;
+ float a = 6.2831853f * u01(pcg(h + 0x9E3779B9u));
+ float r = sqrtf(fmaxf(0.f, 1.f - z * z));
+ d[0] = r * cosf(a);
+ d[1] = r * sinf(a);
+ d[2] = z;
+}
+
+/* orthonormal basis around n (unit) */
+static inline void basis(const float *n, float *t, float *b) {
+ float s = n[2] >= 0.f ? 1.f : -1.f;
+ float a = -1.f / (s + n[2]);
+ float bb = n[0] * n[1] * a;
+ t[0] = 1.f + s * n[0] * n[0] * a;
+ t[1] = s * bb;
+ t[2] = -s * n[0];
+ b[0] = bb;
+ b[1] = s + n[1] * n[1] * a;
+ b[2] = -n[1];
+}
+
+/* ============================================================== gradient noise + curl */
+
+static const float GRAD[16][3] = {{1, 1, 0}, {-1, 1, 0}, {1, -1, 0}, {-1, -1, 0}, {1, 0, 1}, {-1, 0, 1},
+ {1, 0, -1}, {-1, 0, -1}, {0, 1, 1}, {0, -1, 1}, {0, 1, -1}, {0, -1, -1},
+ {1, 1, 0}, {-1, 1, 0}, {0, -1, 1}, {0, -1, -1}};
+
+static uint8_t PERM[512];
+static int perm_ready = 0;
+static void perm_init(void) {
+ if (perm_ready) return;
+ uint8_t p[256];
+ for (int i = 0; i < 256; i++) p[i] = (uint8_t)i;
+ for (int i = 255; i > 0; i--) {
+ int j = (int)(pcg(0xC0FFEEu + (uint32_t)i) % (uint32_t)(i + 1));
+ uint8_t t = p[i]; p[i] = p[j]; p[j] = t;
+ }
+ for (int i = 0; i < 512; i++) PERM[i] = p[i & 255];
+ perm_ready = 1;
+}
+static inline const float *ghash(int x, int y, int z, uint32_t seed) {
+ return GRAD[PERM[PERM[PERM[(x + (int)(seed * 37u)) & 255] + (y & 255)] + (z & 255)] & 15];
+}
+
+/* 3D gradient noise with analytic derivatives (quintic), after I. Quilez. out = {v, dx, dy, dz} */
+static void noised(float x, float y, float z, uint32_t seed, float *out) {
+ float fx0 = floorf(x), fy0 = floorf(y), fz0 = floorf(z);
+ int ix = (int)fx0, iy = (int)fy0, iz = (int)fz0;
+ float fx = x - fx0, fy = y - fy0, fz = z - fz0;
+ float ux = fx * fx * fx * (fx * (fx * 6 - 15) + 10), uy = fy * fy * fy * (fy * (fy * 6 - 15) + 10),
+ uz = fz * fz * fz * (fz * (fz * 6 - 15) + 10);
+ float dux = 30 * fx * fx * (fx * (fx - 2) + 1), duy = 30 * fy * fy * (fy * (fy - 2) + 1),
+ duz = 30 * fz * fz * (fz * (fz - 2) + 1);
+ const float *ga = ghash(ix, iy, iz, seed), *gb = ghash(ix + 1, iy, iz, seed), *gc = ghash(ix, iy + 1, iz, seed),
+ *gd = ghash(ix + 1, iy + 1, iz, seed), *ge = ghash(ix, iy, iz + 1, seed),
+ *gf = ghash(ix + 1, iy, iz + 1, seed), *gg = ghash(ix, iy + 1, iz + 1, seed),
+ *gh = ghash(ix + 1, iy + 1, iz + 1, seed);
+ float va = ga[0] * fx + ga[1] * fy + ga[2] * fz;
+ float vb = gb[0] * (fx - 1) + gb[1] * fy + gb[2] * fz;
+ float vc = gc[0] * fx + gc[1] * (fy - 1) + gc[2] * fz;
+ float vd = gd[0] * (fx - 1) + gd[1] * (fy - 1) + gd[2] * fz;
+ float ve = ge[0] * fx + ge[1] * fy + ge[2] * (fz - 1);
+ float vf = gf[0] * (fx - 1) + gf[1] * fy + gf[2] * (fz - 1);
+ float vg = gg[0] * fx + gg[1] * (fy - 1) + gg[2] * (fz - 1);
+ float vh = gh[0] * (fx - 1) + gh[1] * (fy - 1) + gh[2] * (fz - 1);
+ float k0 = va, k1 = vb - va, k2 = vc - va, k3 = ve - va, k4 = va - vb - vc + vd, k5 = va - vc - ve + vg,
+ k6 = va - vb - ve + vf, k7 = -va + vb + vc - vd + ve - vf - vg + vh;
+ out[0] = k0 + k1 * ux + k2 * uy + k3 * uz + k4 * ux * uy + k5 * uy * uz + k6 * uz * ux + k7 * ux * uy * uz;
+ for (int c = 0; c < 3; c++) {
+ float g0 = ga[c], g1 = gb[c] - ga[c], g2 = gc[c] - ga[c], g3 = ge[c] - ga[c],
+ g4 = ga[c] - gb[c] - gc[c] + gd[c], g5 = ga[c] - gc[c] - ge[c] + gg[c], g6 = ga[c] - gb[c] - ge[c] + gf[c],
+ g7 = -ga[c] + gb[c] + gc[c] - gd[c] + ge[c] - gf[c] - gg[c] + gh[c];
+ out[1 + c] = g0 + g1 * ux + g2 * uy + g3 * uz + g4 * ux * uy + g5 * uy * uz + g6 * uz * ux + g7 * ux * uy * uz;
+ }
+ out[1] += dux * (k1 + k4 * uy + k6 * uz + k7 * uy * uz);
+ out[2] += duy * (k2 + k4 * ux + k5 * uz + k7 * ux * uz);
+ out[3] += duz * (k3 + k5 * uy + k6 * ux + k7 * ux * uy);
+}
+
+/* Divergence-free curl noise (Bridson, Hourihan, Nordenstam 2007), fBm, time-evolving. */
+static void curl_noise(float x, float y, float z, float t, int oct, uint32_t seed, float *c) {
+ float a[4], b[4], d[4];
+ float amp = 1.f, fr = 1.f;
+ c[0] = c[1] = c[2] = 0.f;
+ for (int o = 0; o < oct; o++) {
+ float sx = x * fr + t * 0.31f * (o + 1), sy = y * fr - t * 0.23f, sz = z * fr + t * 0.17f * (o + 2);
+ uint32_t s = seed + 1013u * o;
+ noised(sx, sy, sz, s, a);
+ noised(sx + 31.4f, sy - 17.1f, sz + 9.2f, s + 1, b);
+ noised(sx - 11.7f, sy + 41.3f, sz - 27.9f, s + 2, d);
+ /* psi = (a, b, d); curl = (dd/dy - db/dz, da/dz - dd/dx, db/dx - da/dy) */
+ c[0] += amp * (d[2] - b[3]);
+ c[1] += amp * (a[3] - d[1]);
+ c[2] += amp * (b[1] - a[2]);
+ amp *= 0.5f;
+ fr *= 2.f;
+ }
+}
+
+/* ================================================== blackbody colour (Planck x CIE 1931) */
+
+#define BB_N 256
+#define BB_TMIN 400.f
+#define BB_TMAX 12000.f
+static float bb_tab[BB_N][3];
+static int bb_ready = 0;
+
+static double cie_g(double l, double mu, double s1, double s2) {
+ double s = l < mu ? s1 : s2, t = (l - mu) / s;
+ return exp(-0.5 * t * t);
+}
+/* Wyman, Sloan, Shirley 2013 multi-lobe fit of the CIE 1931 2° observer */
+static void cie_xyz(double l, double *X, double *Y, double *Z) {
+ *X = 1.056 * cie_g(l, 599.8, 37.9, 31.0) + 0.362 * cie_g(l, 442.0, 16.0, 26.7) -
+ 0.065 * cie_g(l, 501.1, 20.4, 26.2);
+ *Y = 0.821 * cie_g(l, 568.8, 46.9, 40.5) + 0.286 * cie_g(l, 530.9, 16.3, 31.1);
+ *Z = 1.217 * cie_g(l, 437.0, 11.8, 36.0) + 0.681 * cie_g(l, 459.0, 26.0, 13.8);
+}
+static void bb_init(void) {
+ perm_init();
+ if (bb_ready) return;
+ for (int i = 0; i < BB_N; i++) {
+ double T = BB_TMIN + (BB_TMAX - BB_TMIN) * i / (BB_N - 1);
+ double X = 0, Y = 0, Z = 0;
+ for (double l = 380; l <= 780; l += 2) {
+ double lm = l * 1e-9;
+ double B = 1.0 / (pow(lm, 5) * (exp(0.014387769 / (lm * T)) - 1.0));
+ double x, y, z;
+ cie_xyz(l, &x, &y, &z);
+ X += B * x;
+ Y += B * y;
+ Z += B * z;
+ }
+ double r = 3.2406 * X - 1.5372 * Y - 0.4986 * Z;
+ double g = -0.9689 * X + 1.8758 * Y + 0.0415 * Z;
+ double b = 0.0557 * X - 0.2040 * Y + 1.0570 * Z;
+ r = r < 0 ? 0 : r;
+ g = g < 0 ? 0 : g;
+ b = b < 0 ? 0 : b;
+ double m = fmax(r, fmax(g, b));
+ bb_tab[i][0] = (float)(r / m);
+ bb_tab[i][1] = (float)(g / m);
+ bb_tab[i][2] = (float)(b / m);
+ }
+ bb_ready = 1;
+}
+static inline void bb_color(float T, float *c) {
+ float f = (T - BB_TMIN) / (BB_TMAX - BB_TMIN) * (BB_N - 1);
+ f = clampf(f, 0.f, BB_N - 1.001f);
+ int i = (int)f;
+ float t = f - i;
+ for (int k = 0; k < 3; k++) c[k] = lerpf(bb_tab[i][k], bb_tab[i + 1][k], t);
+}
+API void nv_blackbody(float T, float *rgb) {
+ bb_init();
+ bb_color(T, rgb);
+}
+
+/* ======================================================================== fluid grid */
+
+typedef struct {
+ int nx, ny, nz;
+ uint8_t *diag, *nb; /* active neighbour count, fluid neighbour bits */
+ uint8_t *type; /* 0 fluid, 1 solid (Neumann), 2 air (Dirichlet) */
+ float *x, *b, *r;
+ int own_xb; /* level 0 borrows x/b from the CG vectors */
+ /* 8^3 blocks: the solver only visits blocks that hold fluid cells */
+ int nbx, nby, nbz, nbk;
+ uint8_t *bact, *bmark;
+ int *blist, nbl, *mlist, nml, *slist, nsl;
+} Lev;
+
+typedef struct {
+ int nx, ny, nz;
+ float o[3], dx; /* local-space origin of sample (0,0,0) and spacing */
+ float *d; /* signed distance, negative inside */
+} Sdf;
+
+#define MAXSDF 32
+
+typedef struct {
+ int type; /* 0 plane, 1 sphere, 2 box, 3 mesh (signed distance field; ext[0] = sdf slot) */
+ float m[12], mi[12]; /* world->local, local->world (3x4 row major) */
+ float ext[3]; /* sphere: radius in [0]; box: half extents */
+ float vel[3];
+ float smin; /* smallest local->world scale: turns local distances into safe world bounds */
+ float pinv; /* plane: 1 / |grad of local z| (exact world distance) */
+} Collider;
+
+typedef struct {
+ int type; /* 0 attract, 1 vortex, 2 wind, 3 turbulence, 4 drag */
+ float pos[3], axis[3];
+ float strength, radius, freq, falloff;
+} Force;
+
+typedef struct NvFluid {
+ int nx, ny, nz;
+ size_t nc, nu, nv, nw;
+ float dx, o[3];
+ float fp[FP_COUNT];
+ float *u, *v, *w, *u0, *v0, *w0, *u1, *v1, *w1;
+ float *d, *T, *fuel, *flame, *expn, *phi;
+ uint8_t *solid;
+ float *tmp[10];
+ float *cg_r, *cg_z, *cg_p, *cg_q, *cg_b;
+ Lev lev[16];
+ int nlev;
+ int last_iters;
+ float last_res, maxvel;
+ double time, ms;
+ double tm_adv, tm_frc, tm_prj, tm_cmb;
+ int solid_dirty;
+ /* sparse tiles */
+ int ntx, nty, ntz, nt;
+ uint8_t *t_cont, *t_adv, *t_prs, *t_prev, *ctype;
+ uint8_t *t_dirty; /* tiles written by sources since the last scan */
+ uint8_t *t_force; /* tiles whose solid cells changed (re-type them) */
+ int *tl_adv, *tl_prs, n_adv, n_prs, *tl_chg, n_chg, *cand;
+ int vox_pending, vox_box[6]; /* cells to re-voxelize against the colliders */
+ GpuFluid *gpu; /* non-NULL: the solver runs on the GPU, CPU arrays are download targets */
+ int hier_ver, gpu_hier_ver;
+} NvFluid;
+
+#define TS 8
+#define CI(f, i, j, k) ((size_t)(i) + (size_t)(f)->nx * ((size_t)(j) + (size_t)(f)->ny * (size_t)(k)))
+#define UI(f, i, j, k) ((size_t)(i) + (size_t)((f)->nx + 1) * ((size_t)(j) + (size_t)(f)->ny * (size_t)(k)))
+#define VI(f, i, j, k) ((size_t)(i) + (size_t)(f)->nx * ((size_t)(j) + (size_t)((f)->ny + 1) * (size_t)(k)))
+#define WI(f, i, j, k) ((size_t)(i) + (size_t)(f)->nx * ((size_t)(j) + (size_t)(f)->ny * (size_t)(k)))
+
+/* calloc, not malloc+memset: big blocks come from the OS as zero pages that only become real memory
+ * when touched, and the sparse solver never touches empty regions. */
+static float *falloc(size_t n) { return (float *)calloc(n ? n : 1, sizeof(float)); }
+static uint8_t *balloc(size_t n) { return (uint8_t *)calloc(n ? n : 1, 1); }
+
+static void lev_alloc(Lev *L, int nx, int ny, int nz, int own) {
+ size_t n = (size_t)nx * ny * nz;
+ L->nx = nx;
+ L->ny = ny;
+ L->nz = nz;
+ L->diag = balloc(n);
+ L->nb = balloc(n);
+ L->r = falloc(n);
+ L->own_xb = own;
+ if (own) {
+ L->x = falloc(n);
+ L->b = falloc(n);
+ L->type = balloc(n);
+ }
+ L->nbx = (nx + 7) / 8; L->nby = (ny + 7) / 8; L->nbz = (nz + 7) / 8;
+ L->nbk = L->nbx * L->nby * L->nbz;
+ L->bact = balloc(L->nbk);
+ L->bmark = balloc(L->nbk);
+ L->blist = (int *)malloc(sizeof(int) * L->nbk);
+ L->mlist = (int *)malloc(sizeof(int) * L->nbk);
+ L->slist = (int *)malloc(sizeof(int) * L->nbk);
+}
+
+API NvFluid *nv_fluid_new(int nx, int ny, int nz, float dx, float ox, float oy, float oz) {
+ bb_init();
+ NvFluid *f = (NvFluid *)calloc(1, sizeof(NvFluid));
+ f->nx = nx;
+ f->ny = ny;
+ f->nz = nz;
+ f->dx = dx;
+ f->o[0] = ox;
+ f->o[1] = oy;
+ f->o[2] = oz;
+ memcpy(f->fp, fluid_defs, sizeof fluid_defs);
+ f->nc = (size_t)nx * ny * nz;
+ f->nu = (size_t)(nx + 1) * ny * nz;
+ f->nv = (size_t)nx * (ny + 1) * nz;
+ f->nw = (size_t)nx * ny * (nz + 1);
+ size_t big = (size_t)(nx + 1) * (ny + 1) * (nz + 1);
+ f->u = falloc(f->nu); f->v = falloc(f->nv); f->w = falloc(f->nw);
+ f->u0 = falloc(f->nu); f->v0 = falloc(f->nv); f->w0 = falloc(f->nw);
+ f->u1 = falloc(f->nu); f->v1 = falloc(f->nv); f->w1 = falloc(f->nw);
+ f->d = falloc(f->nc); f->T = falloc(f->nc); f->fuel = falloc(f->nc); f->flame = falloc(f->nc);
+ f->expn = falloc(f->nc); f->phi = falloc(f->nc);
+ f->solid = balloc(f->nc);
+ for (int i = 0; i < 10; i++) f->tmp[i] = falloc(big);
+ f->cg_r = falloc(f->nc); f->cg_z = falloc(f->nc); f->cg_p = falloc(f->nc); f->cg_q = falloc(f->nc);
+ f->cg_b = falloc(f->nc);
+ /* multigrid hierarchy */
+ int lx = nx, ly = ny, lz = nz, L = 0;
+ lev_alloc(&f->lev[0], lx, ly, lz, 0);
+ f->lev[0].x = f->cg_z;
+ f->lev[0].b = f->cg_r;
+ while (L < 15 && (lx > 4 || ly > 4 || lz > 4)) {
+ lx = (lx + 1) / 2; ly = (ly + 1) / 2; lz = (lz + 1) / 2;
+ L++;
+ lev_alloc(&f->lev[L], lx, ly, lz, 1);
+ if (lx <= 4 && ly <= 4 && lz <= 4) break;
+ }
+ f->nlev = L + 1;
+ f->solid_dirty = 1;
+ f->ntx = (nx + TS - 1) / TS; f->nty = (ny + TS - 1) / TS; f->ntz = (nz + TS - 1) / TS;
+ f->nt = f->ntx * f->nty * f->ntz;
+ f->t_cont = balloc(f->nt); f->t_adv = balloc(f->nt); f->t_prs = balloc(f->nt); f->t_prev = balloc(f->nt);
+ f->tl_adv = (int *)malloc(sizeof(int) * f->nt); f->tl_prs = (int *)malloc(sizeof(int) * f->nt);
+ f->tl_chg = (int *)malloc(sizeof(int) * f->nt); f->cand = (int *)malloc(sizeof(int) * f->nt);
+ f->t_dirty = balloc(f->nt); f->t_force = balloc(f->nt);
+ f->ctype = balloc(f->nc);
+ f->lev[0].type = f->ctype;
+ return f;
+}
+
+API void nv_fluid_free(NvFluid *f) {
+ if (!f) return;
+ if (f->gpu && gpuf_free) gpuf_free(f->gpu);
+ float *arrs[] = {f->u, f->v, f->w, f->u0, f->v0, f->w0, f->u1, f->v1, f->w1, f->d, f->T, f->fuel,
+ f->flame, f->expn, f->phi, f->cg_r, f->cg_z, f->cg_p, f->cg_q, f->cg_b};
+ for (size_t i = 0; i < sizeof arrs / sizeof *arrs; i++) free(arrs[i]);
+ for (int i = 0; i < 10; i++) free(f->tmp[i]);
+ free(f->solid);
+ free(f->t_cont); free(f->t_adv); free(f->t_prs); free(f->t_prev); free(f->tl_adv); free(f->tl_prs);
+ free(f->ctype);
+ free(f->tl_chg); free(f->cand); free(f->t_dirty); free(f->t_force);
+ for (int l = 0; l < f->nlev; l++) {
+ Lev *L = &f->lev[l];
+ free(L->diag); free(L->nb); free(L->r);
+ if (L->own_xb) { free(L->x); free(L->b); free(L->type); }
+ free(L->bact); free(L->bmark); free(L->blist); free(L->mlist); free(L->slist);
+ }
+ free(f);
+}
+
+API void nv_fluid_set_params(NvFluid *f, const float *p) { memcpy(f->fp, p, sizeof f->fp); }
+
+static void refresh(float **a, size_t n) {
+ free(*a);
+ *a = falloc(n); /* fresh zero pages: O(1) work, and memory goes back to the OS */
+}
+
+API void nv_fluid_reset(NvFluid *f) {
+ refresh(&f->u, f->nu); refresh(&f->v, f->nv); refresh(&f->w, f->nw);
+ refresh(&f->u0, f->nu); refresh(&f->v0, f->nv); refresh(&f->w0, f->nw);
+ refresh(&f->u1, f->nu); refresh(&f->v1, f->nv); refresh(&f->w1, f->nw);
+ refresh(&f->d, f->nc); refresh(&f->T, f->nc); refresh(&f->fuel, f->nc); refresh(&f->flame, f->nc);
+ refresh(&f->expn, f->nc); refresh(&f->phi, f->nc);
+ memset(f->t_cont, 0, f->nt); memset(f->t_adv, 0, f->nt); memset(f->t_prs, 0, f->nt);
+ memset(f->t_prev, 0, f->nt); memset(f->t_dirty, 0, f->nt); memset(f->t_force, 0, f->nt);
+ f->n_adv = f->n_prs = 0;
+ for (int l = 0; l < f->nlev; l++) {
+ memset(f->lev[l].bact, 0, f->lev[l].nbk);
+ f->lev[l].nbl = 0;
+ }
+ f->solid_dirty = 1;
+ f->time = 0;
+ if (f->gpu) gpuf_reset(f->gpu);
+}
+
+/* Move the solver to the GPU (on = 1) or back (0). Returns 1 if the GPU is in use. Fields restart
+ * empty on the GPU, so switch at the start of a simulation. */
+API int nv_fluid_set_gpu(NvFluid *f, int on) {
+ if (!on || !gpuf_new) {
+ if (f->gpu) gpuf_free(f->gpu);
+ f->gpu = NULL;
+ return 0;
+ }
+ if (f->gpu) return 1;
+ int dims[3 * 16];
+ for (int l = 0; l < f->nlev; l++) {
+ dims[3 * l] = f->lev[l].nx; dims[3 * l + 1] = f->lev[l].ny; dims[3 * l + 2] = f->lev[l].nz;
+ }
+ f->gpu = gpuf_new(f->nx, f->ny, f->nz, f->dx, f->o, f->nlev, dims);
+ f->gpu_hier_ver = -1;
+ f->solid_dirty = 1;
+ return f->gpu ? 1 : 0;
+}
+
+WEAK void nv_gpu_phases(void *fluid_gpu, double *out);
+/* GPU time per solver phase since the last call (ms): adv scalars, combust, adv velocity, forces, project, other */
+API int nv_fluid_gpu_phases(NvFluid *f, double *out) {
+ if (!f->gpu || !nv_gpu_phases) return 0;
+ nv_gpu_phases(f->gpu, out);
+ return 1;
+}
+
+/* GPU mode: copy the scalar fields (and velocities if asked) into the CPU arrays read by Python */
+API void nv_fluid_sync(NvFluid *f, int with_velocity) {
+ if (!f->gpu) return;
+ gpuf_download(f->gpu, 0, f->d);
+ gpuf_download(f->gpu, 1, f->T);
+ gpuf_download(f->gpu, 2, f->fuel);
+ gpuf_download(f->gpu, 3, f->flame);
+ if (with_velocity) {
+ gpuf_download(f->gpu, 4, f->u);
+ gpuf_download(f->gpu, 5, f->v);
+ gpuf_download(f->gpu, 6, f->w);
+ }
+}
+
+API float *nv_fluid_ptr(NvFluid *f, int which) {
+ switch (which) {
+ case 0: return f->d;
+ case 1: return f->T;
+ case 2: return f->fuel;
+ case 3: return f->flame;
+ case 4: return f->u;
+ case 5: return f->v;
+ case 6: return f->w;
+ default: return NULL;
+ }
+}
+API uint8_t *nv_fluid_solid_ptr(NvFluid *f) { return f->solid; }
+
+/* cell-centred velocity, layout [k][j][i][3] */
+API void nv_fluid_cell_velocity(NvFluid *f, float *out) {
+#pragma omp parallel for schedule(static)
+ for (int k = 0; k < f->nz; k++)
+ for (int j = 0; j < f->ny; j++)
+ for (int i = 0; i < f->nx; i++) {
+ size_t c = CI(f, i, j, k);
+ out[c * 3 + 0] = 0.5f * (f->u[UI(f, i, j, k)] + f->u[UI(f, i + 1, j, k)]);
+ out[c * 3 + 1] = 0.5f * (f->v[VI(f, i, j, k)] + f->v[VI(f, i, j + 1, k)]);
+ out[c * 3 + 2] = 0.5f * (f->w[WI(f, i, j, k)] + f->w[WI(f, i, j, k + 1)]);
+ }
+}
+
+/* ---------------------------------------------------------------- trilinear sampling */
+
+/* sample array a (dims sx,sy,sz) at index-space coordinate (x,y,z). zero=1: 0 outside, else clamp. */
+static inline float samp(const float *a, int sx, int sy, int sz, float x, float y, float z, int zero) {
+ if (zero) {
+ if (x < -1.f || y < -1.f || z < -1.f || x > sx || y > sy || z > sz) return 0.f;
+ }
+ x = clampf(x, zero ? -1.f : 0.f, zero ? (float)sx : (float)(sx - 1));
+ y = clampf(y, zero ? -1.f : 0.f, zero ? (float)sy : (float)(sy - 1));
+ z = clampf(z, zero ? -1.f : 0.f, zero ? (float)sz : (float)(sz - 1));
+ float fx0 = floorf(x), fy0 = floorf(y), fz0 = floorf(z);
+ int i = (int)fx0, j = (int)fy0, k = (int)fz0;
+ float tx = x - fx0, ty = y - fy0, tz = z - fz0;
+ if (i >= 0 && j >= 0 && k >= 0 && i + 1 < sx && j + 1 < sy && k + 1 < sz) {
+ size_t c = (size_t)i + (size_t)sx * ((size_t)j + (size_t)sy * k), sxy = (size_t)sx * sy;
+ float c00 = lerpf(a[c], a[c + 1], tx), c10 = lerpf(a[c + sx], a[c + sx + 1], tx);
+ float c01 = lerpf(a[c + sxy], a[c + sxy + 1], tx), c11 = lerpf(a[c + sxy + sx], a[c + sxy + sx + 1], tx);
+ return lerpf(lerpf(c00, c10, ty), lerpf(c01, c11, ty), tz);
+ }
+ float v[8];
+ for (int n = 0; n < 8; n++) {
+ int ii = i + (n & 1), jj = j + ((n >> 1) & 1), kk = k + ((n >> 2) & 1);
+ if (zero) {
+ v[n] = (ii < 0 || jj < 0 || kk < 0 || ii >= sx || jj >= sy || kk >= sz)
+ ? 0.f
+ : a[(size_t)ii + (size_t)sx * ((size_t)jj + (size_t)sy * kk)];
+ } else {
+ ii = ii < 0 ? 0 : (ii >= sx ? sx - 1 : ii);
+ jj = jj < 0 ? 0 : (jj >= sy ? sy - 1 : jj);
+ kk = kk < 0 ? 0 : (kk >= sz ? sz - 1 : kk);
+ v[n] = a[(size_t)ii + (size_t)sx * ((size_t)jj + (size_t)sy * kk)];
+ }
+ }
+ return lerpf(lerpf(lerpf(v[0], v[1], tx), lerpf(v[2], v[3], tx), ty),
+ lerpf(lerpf(v[4], v[5], tx), lerpf(v[6], v[7], tx), ty), tz);
+}
+
+/* like samp but also returns the min/max of the 8 contributing values (MacCormack clamp) */
+static inline float samp_mm(const float *a, int sx, int sy, int sz, float x, float y, float z, int zero, float *mn,
+ float *mx) {
+ float lo = zero ? -1.f : 0.f;
+ x = clampf(x, lo, zero ? (float)sx : (float)(sx - 1));
+ y = clampf(y, lo, zero ? (float)sy : (float)(sy - 1));
+ z = clampf(z, lo, zero ? (float)sz : (float)(sz - 1));
+ float fx0 = floorf(x), fy0 = floorf(y), fz0 = floorf(z);
+ int i = (int)fx0, j = (int)fy0, k = (int)fz0;
+ float tx = x - fx0, ty = y - fy0, tz = z - fz0;
+ float v[8];
+ for (int n = 0; n < 8; n++) {
+ int ii = i + (n & 1), jj = j + ((n >> 1) & 1), kk = k + ((n >> 2) & 1);
+ if (zero && (ii < 0 || jj < 0 || kk < 0 || ii >= sx || jj >= sy || kk >= sz)) {
+ v[n] = 0.f;
+ } else {
+ ii = ii < 0 ? 0 : (ii >= sx ? sx - 1 : ii);
+ jj = jj < 0 ? 0 : (jj >= sy ? sy - 1 : jj);
+ kk = kk < 0 ? 0 : (kk >= sz ? sz - 1 : kk);
+ v[n] = a[(size_t)ii + (size_t)sx * ((size_t)jj + (size_t)sy * kk)];
+ }
+ }
+ float m0 = v[0], m1 = v[0];
+ for (int n = 1; n < 8; n++) {
+ m0 = fminf(m0, v[n]);
+ m1 = fmaxf(m1, v[n]);
+ }
+ *mn = m0;
+ *mx = m1;
+ return lerpf(lerpf(lerpf(v[0], v[1], tx), lerpf(v[2], v[3], tx), ty),
+ lerpf(lerpf(v[4], v[5], tx), lerpf(v[6], v[7], tx), ty), tz);
+}
+
+/* velocity (world units/s) at grid coordinate g (cell units; cell centre of (i,j,k) at i+.5) */
+static inline void vel_at(const NvFluid *f, const float *U, const float *V, const float *W, float x, float y,
+ float z, float *out) {
+ out[0] = samp(U, f->nx + 1, f->ny, f->nz, x, y - 0.5f, z - 0.5f, 0);
+ out[1] = samp(V, f->nx, f->ny + 1, f->nz, x - 0.5f, y, z - 0.5f, 0);
+ out[2] = samp(W, f->nx, f->ny, f->nz + 1, x - 0.5f, y - 0.5f, z, 0);
+}
+
+static inline void trace(const NvFluid *f, const float *U, const float *V, const float *W, float x, float y,
+ float z, float h, float *o) {
+ /* RK2 midpoint, h = signed dt/dx */
+ float v1[3], v2[3];
+ vel_at(f, U, V, W, x, y, z, v1);
+ vel_at(f, U, V, W, x - 0.5f * h * v1[0], y - 0.5f * h * v1[1], z - 0.5f * h * v1[2], v2);
+ o[0] = x - h * v2[0];
+ o[1] = y - h * v2[1];
+ o[2] = z - h * v2[2];
+}
+
+/* ------------------------------------------------------------------- sparse tiles */
+
+/* Index box of tile t for an array with extra size (ex,ey,ez): b = {i0,i1,j0,j1,k0,k1}.
+ * Boxes partition the array exactly; the last tile on an axis also owns the extra face layer. */
+static inline void tile_box(const NvFluid *f, int t, int ex, int ey, int ez, int *b) {
+ int tx = t % f->ntx, ty = (t / f->ntx) % f->nty, tz = t / (f->ntx * f->nty);
+ b[0] = tx * TS; b[1] = (tx == f->ntx - 1) ? f->nx + ex : b[0] + TS;
+ b[2] = ty * TS; b[3] = (ty == f->nty - 1) ? f->ny + ey : b[2] + TS;
+ b[4] = tz * TS; b[5] = (tz == f->ntz - 1) ? f->nz + ez : b[4] + TS;
+}
+
+static void zero_tile_faces(NvFluid *f, int t) {
+ float *arr[3][3] = {{f->u, f->u0, f->u1}, {f->v, f->v0, f->v1}, {f->w, f->w0, f->w1}};
+ int tx = t % f->ntx, ty = (t / f->ntx) % f->nty, tz = t / (f->ntx * f->nty);
+ for (int comp = 0; comp < 3; comp++) {
+ int b[6];
+ tile_box(f, t, comp == 0, comp == 1, comp == 2, b);
+ /* boundary face layer owned by an inactive neighbour on the high side */
+ if (comp == 0 && tx + 1 < f->ntx && !f->t_prs[t + 1]) b[1]++;
+ if (comp == 1 && ty + 1 < f->nty && !f->t_prs[t + f->ntx]) b[3]++;
+ if (comp == 2 && tz + 1 < f->ntz && !f->t_prs[t + f->ntx * f->nty]) b[5]++;
+ int sx = f->nx + (comp == 0), sy = f->ny + (comp == 1);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++) {
+ size_t c = (size_t)b[0] + (size_t)sx * ((size_t)j + (size_t)sy * k);
+ for (int q = 0; q < 3; q++) memset(arr[comp][q] + c, 0, sizeof(float) * (b[1] - b[0]));
+ }
+ }
+}
+
+static void hierarchy_full(NvFluid *f);
+static void hierarchy_incremental(NvFluid *f);
+static void active_blocks(NvFluid *f);
+
+static inline void tile_mark_range(NvFluid *f, uint8_t *m, int i0, int i1, int j0, int j1, int k0, int k1) {
+ /* cell range [i0,i1] inclusive, clipped, marks every tile it touches */
+ if (i1 < 0 || j1 < 0 || k1 < 0 || i0 >= f->nx || j0 >= f->ny || k0 >= f->nz) return;
+ i0 = i0 < 0 ? 0 : i0; j0 = j0 < 0 ? 0 : j0; k0 = k0 < 0 ? 0 : k0;
+ i1 = i1 >= f->nx ? f->nx - 1 : i1; j1 = j1 >= f->ny ? f->ny - 1 : j1; k1 = k1 >= f->nz ? f->nz - 1 : k1;
+ for (int tz = k0 / TS; tz <= k1 / TS; tz++)
+ for (int ty = j0 / TS; ty <= j1 / TS; ty++)
+ for (int tx = i0 / TS; tx <= i1 / TS; tx++) m[tx + f->ntx * (ty + f->nty * tz)] = 1;
+}
+
+/* Find tiles holding smoke/heat/fuel/flame, dilate (1 tile: advection, 2 tiles: pressure),
+ * clear velocity in tiles that left the region, and update the solver only where tiles changed.
+ * Content can only be in last step's advection tiles (motion < 1 tile per substep) or in tiles a
+ * source wrote to, so only those are scanned: the cost follows the effect, not the domain. */
+static void update_tiles(NvFluid *f) {
+ const float eps = 1e-4f;
+ int full = f->fp[FP_sparse] < 0.5f || f->gpu; /* the GPU solver is dense */
+ int nc = 0;
+ for (int t = 0; t < f->nt; t++) {
+ if (full || f->t_adv[t] || f->t_dirty[t]) f->cand[nc++] = t;
+ else f->t_cont[t] = 0;
+ }
+#pragma omp parallel for schedule(dynamic, 4)
+ for (int q = 0; q < nc; q++) {
+ int t = f->cand[q];
+ if (full) { f->t_cont[t] = 1; continue; }
+ int b[6], any = 0;
+ tile_box(f, t, 0, 0, 0, b);
+ for (int k = b[4]; k < b[5] && !any; k++)
+ for (int j = b[2]; j < b[3] && !any; j++) {
+ size_t c = CI(f, b[0], j, k);
+ for (int i = b[0]; i < b[1]; i++, c++)
+ if (f->d[c] > eps || f->T[c] > eps || f->fuel[c] > eps || f->flame[c] > eps) { any = 1; break; }
+ }
+ f->t_cont[t] = (uint8_t)any;
+ }
+ memset(f->t_dirty, 0, f->nt);
+ memcpy(f->t_prev, f->t_prs, f->nt);
+ memset(f->t_adv, 0, f->nt);
+ memset(f->t_prs, 0, f->nt);
+ /* dilation by scattering from content tiles: O(content tiles), not O(all tiles x 125) */
+ for (int q = 0; q < nc; q++) {
+ int t = f->cand[q];
+ if (!f->t_cont[t]) continue;
+ int tx = t % f->ntx, ty = (t / f->ntx) % f->nty, tz = t / (f->ntx * f->nty);
+ for (int dz = -2; dz <= 2; dz++)
+ for (int dy = -2; dy <= 2; dy++)
+ for (int dx = -2; dx <= 2; dx++) {
+ int x = tx + dx, y = ty + dy, z = tz + dz;
+ if (x < 0 || y < 0 || z < 0 || x >= f->ntx || y >= f->nty || z >= f->ntz) continue;
+ int u = x + f->ntx * (y + f->nty * z);
+ f->t_prs[u] = 1;
+ if (dx >= -1 && dx <= 1 && dy >= -1 && dy <= 1 && dz >= -1 && dz <= 1) f->t_adv[u] = 1;
+ }
+ }
+ f->n_adv = f->n_prs = f->n_chg = 0;
+ for (int t = 0; t < f->nt; t++) {
+ if (f->t_adv[t]) f->tl_adv[f->n_adv++] = t;
+ if (f->t_prs[t]) f->tl_prs[f->n_prs++] = t;
+ if (f->t_prs[t] != f->t_prev[t] || f->t_force[t]) f->tl_chg[f->n_chg++] = t;
+ }
+ memset(f->t_force, 0, f->nt);
+ if (f->n_chg) {
+#pragma omp parallel for schedule(dynamic, 4)
+ for (int q = 0; q < f->n_chg; q++) {
+ int t = f->tl_chg[q];
+ if (f->t_prev[t] && !f->t_prs[t]) zero_tile_faces(f, t);
+ }
+ }
+ if (f->solid_dirty) {
+#pragma omp parallel for schedule(static)
+ for (int k = 0; k < f->nz; k++)
+ for (int j = 0; j < f->ny; j++)
+ for (int i = 0; i < f->nx; i++) {
+ size_t c = CI(f, i, j, k);
+ int t = (i / TS) + f->ntx * ((j / TS) + f->nty * (k / TS));
+ f->ctype[c] = f->solid[c] ? 1 : (f->t_prs[t] ? 0 : 2);
+ if (f->ctype[c]) f->phi[c] = 0.f;
+ }
+ hierarchy_full(f);
+ f->solid_dirty = 0;
+ active_blocks(f);
+ } else if (f->n_chg) {
+#pragma omp parallel for schedule(dynamic, 4)
+ for (int q = 0; q < f->n_chg; q++) {
+ int t = f->tl_chg[q], b[6];
+ tile_box(f, t, 0, 0, 0, b);
+ int act = f->t_prs[t];
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ size_t c = CI(f, i, j, k);
+ f->ctype[c] = f->solid[c] ? 1 : (act ? 0 : 2);
+ if (f->ctype[c]) f->phi[c] = 0.f;
+ }
+ }
+ hierarchy_incremental(f);
+ active_blocks(f);
+ }
+}
+
+API int nv_fluid_active_bbox(NvFluid *f, int *b) {
+ if (f->gpu) return gpuf_active_bbox(f->gpu, b);
+ /* cell bounds [i0,i1) [j0,j1) [k0,k1) of everything that can hold smoke/heat/fuel/flame */
+ int lo[3] = {1 << 30, 1 << 30, 1 << 30}, hi[3] = {-1, -1, -1};
+ for (int t = 0; t < f->nt; t++) {
+ if (!f->t_adv[t] && !f->t_dirty[t]) continue;
+ int tc[3] = {t % f->ntx, (t / f->ntx) % f->nty, t / (f->ntx * f->nty)};
+ for (int a = 0; a < 3; a++) {
+ if (tc[a] < lo[a]) lo[a] = tc[a];
+ if (tc[a] > hi[a]) hi[a] = tc[a];
+ }
+ }
+ if (hi[0] < 0) { memset(b, 0, 6 * sizeof(int)); return 0; }
+ int n[3] = {f->nx, f->ny, f->nz};
+ for (int a = 0; a < 3; a++) {
+ b[2 * a] = lo[a] * TS;
+ b[2 * a + 1] = (hi[a] + 1) * TS < n[a] ? (hi[a] + 1) * TS : n[a];
+ }
+ return 1;
+}
+
+/* cell-centred velocity of a box (from nv_fluid_active_bbox), layout [k][j][i][3] */
+API void nv_fluid_cell_velocity_box(NvFluid *f, const int *b, float *out) {
+ int sx = b[1] - b[0], sy = b[3] - b[2];
+#pragma omp parallel for schedule(static)
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ size_t o = 3 * ((size_t)(i - b[0]) + (size_t)sx * ((size_t)(j - b[2]) + (size_t)sy * (k - b[4])));
+ out[o + 0] = 0.5f * (f->u[UI(f, i, j, k)] + f->u[UI(f, i + 1, j, k)]);
+ out[o + 1] = 0.5f * (f->v[VI(f, i, j, k)] + f->v[VI(f, i, j + 1, k)]);
+ out[o + 2] = 0.5f * (f->w[WI(f, i, j, k)] + f->w[WI(f, i, j, k + 1)]);
+ }
+}
+
+/* ---------------------------------------------------------------------- advection */
+
+/* scalar MacCormack over active tiles. back/forward positions precomputed per cell. */
+static void advect_scalar(NvFluid *f, const float *src, float *hat, const float *bx, const float *by,
+ const float *bz, const float *fx, const float *fy, const float *fz, int mc,
+ float *mnA, float *mxA) {
+ int nx = f->nx, ny = f->ny, nz = f->nz;
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_adv; q++) {
+ int b[6];
+ tile_box(f, f->tl_adv[q], 0, 0, 0, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ size_t c = CI(f, i, j, k);
+ float mn, mx;
+ hat[c] = samp_mm(src, nx, ny, nz, bx[c] - 0.5f, by[c] - 0.5f, bz[c] - 0.5f, 1, &mn, &mx);
+ mnA[c] = mn;
+ mxA[c] = mx;
+ }
+ }
+ if (!mc) return;
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_adv; q++) {
+ int b[6];
+ tile_box(f, f->tl_adv[q], 0, 0, 0, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ size_t c = CI(f, i, j, k);
+ /* hat outside the active tiles is stale: the forward trace stays inside (CFL < tile) */
+ float til = samp(hat, nx, ny, nz, fx[c] - 0.5f, fy[c] - 0.5f, fz[c] - 0.5f, 1);
+ float val = hat[c] + 0.5f * (src[c] - til);
+ mnA[c] = (val < mnA[c] || val > mxA[c]) ? hat[c] : val; /* overshoot: fall back to SL */
+ }
+ }
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_adv; q++) {
+ int b[6];
+ tile_box(f, f->tl_adv[q], 0, 0, 0, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ size_t c = CI(f, i, j, k);
+ hat[c] = mnA[c];
+ }
+ }
+}
+
+/* MacCormack's error estimate is meaningless where a trace leaves the grid (the samples are clamped,
+ * so back and forward traces don't retrace each other); there the face falls back to semi-Lagrangian.
+ * Without this, faces at open boundaries amplify a little every step and a narrow domain blows up. */
+static inline int outside(float x, float y, float z, int sx, int sy, int sz) {
+ return x < 0.f || y < 0.f || z < 0.f || x > (float)(sx - 1) || y > (float)(sy - 1) || z > (float)(sz - 1);
+}
+
+/* advect one face component over the pressure tiles (copy-through outside the advection tiles).
+ * comp 0=u 1=v 2=w. U,V,W = tracing velocity. */
+static void advect_face(NvFluid *f, int comp, const float *src, float *dst, const float *U, const float *V,
+ const float *W, float dt, int mc, float *mnA, float *mxA) {
+ int ex = comp == 0, ey = comp == 1, ez = comp == 2;
+ int sx = f->nx + ex, sy = f->ny + ey, sz = f->nz + ez;
+ float ox = ex ? 0.f : 0.5f, oy = ey ? 0.f : 0.5f, oz = ez ? 0.f : 0.5f;
+ float h = dt / f->dx;
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_prs; q++) {
+ int t = f->tl_prs[q], b[6];
+ tile_box(f, t, ex, ey, ez, b);
+ int act = f->t_adv[t];
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++) {
+ size_t c = (size_t)b[0] + (size_t)sx * ((size_t)j + (size_t)sy * k);
+ if (!act) {
+ memcpy(dst + c, src + c, sizeof(float) * (b[1] - b[0]));
+ continue;
+ }
+ for (int i = b[0]; i < b[1]; i++, c++) {
+ float p[3];
+ trace(f, U, V, W, i + ox, j + oy, k + oz, h, p);
+ float mn, mx;
+ dst[c] = samp_mm(src, sx, sy, sz, p[0] - ox, p[1] - oy, p[2] - oz, 0, &mn, &mx);
+ if (outside(p[0] - ox, p[1] - oy, p[2] - oz, sx, sy, sz)) mn = INFINITY, mx = -INFINITY; /* forces SL */
+ mnA[c] = mn;
+ mxA[c] = mx;
+ }
+ }
+ }
+ if (!mc) return;
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_adv; q++) {
+ int b[6];
+ tile_box(f, f->tl_adv[q], ex, ey, ez, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ size_t c = (size_t)i + (size_t)sx * ((size_t)j + (size_t)sy * k);
+ float p[3];
+ trace(f, U, V, W, i + ox, j + oy, k + oz, -h, p);
+ float til = samp(dst, sx, sy, sz, p[0] - ox, p[1] - oy, p[2] - oz, 0);
+ float val = dst[c] + 0.5f * (src[c] - til);
+ int sl = val < mnA[c] || val > mxA[c] || outside(p[0] - ox, p[1] - oy, p[2] - oz, sx, sy, sz);
+ mnA[c] = sl ? dst[c] : val;
+ }
+ }
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_adv; q++) {
+ int b[6];
+ tile_box(f, f->tl_adv[q], ex, ey, ez, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++) {
+ size_t c = (size_t)b[0] + (size_t)sx * ((size_t)j + (size_t)sy * k);
+ memcpy(dst + c, mnA + c, sizeof(float) * (b[1] - b[0]));
+ }
+ }
+}
+
+static void advect_velocity(NvFluid *f, const float *su, const float *sv, const float *sw, const float *U,
+ const float *V, const float *W, float *du, float *dv, float *dw, float dt) {
+ double t0 = now_ms();
+ int mc = f->fp[FP_maccormack] > 0.5f;
+ advect_face(f, 0, su, du, U, V, W, dt, mc, f->tmp[0], f->tmp[1]);
+ advect_face(f, 1, sv, dv, U, V, W, dt, mc, f->tmp[0], f->tmp[1]);
+ advect_face(f, 2, sw, dw, U, V, W, dt, mc, f->tmp[0], f->tmp[1]);
+ f->tm_adv += now_ms() - t0;
+}
+
+static void advect_scalars(NvFluid *f, const float *U, const float *V, const float *W, float dt) {
+ float h = dt / f->dx;
+ float *bx = f->tmp[2], *by = f->tmp[3], *bz = f->tmp[4], *fx = f->tmp[5], *fy = f->tmp[6], *fz = f->tmp[7];
+ int mc = f->fp[FP_maccormack] > 0.5f;
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_adv; q++) {
+ int b[6];
+ tile_box(f, f->tl_adv[q], 0, 0, 0, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ size_t c = CI(f, i, j, k);
+ float p[3];
+ trace(f, U, V, W, i + 0.5f, j + 0.5f, k + 0.5f, h, p);
+ bx[c] = p[0]; by[c] = p[1]; bz[c] = p[2];
+ if (mc) {
+ trace(f, U, V, W, i + 0.5f, j + 0.5f, k + 0.5f, -h, p);
+ fx[c] = p[0]; fy[c] = p[1]; fz[c] = p[2];
+ }
+ }
+ }
+ float *fields[4] = {f->d, f->T, f->fuel, f->flame};
+ float *out = f->tmp[8];
+ for (int qf = 0; qf < 4; qf++) {
+ advect_scalar(f, fields[qf], out, bx, by, bz, fx, fy, fz, mc, f->tmp[0], f->tmp[1]);
+ float *dst = fields[qf];
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_adv; q++) {
+ int b[6];
+ tile_box(f, f->tl_adv[q], 0, 0, 0, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ size_t c = CI(f, i, j, k);
+ dst[c] = out[c] > 0.f ? out[c] : 0.f;
+ }
+ }
+ }
+}
+
+/* --------------------------------------------------------------------- solids / MG */
+
+static inline void blk_box(const Lev *L, int bk, int *b) {
+ int bx = bk % L->nbx, by = (bk / L->nbx) % L->nby, bz = bk / (L->nbx * L->nby);
+ b[0] = bx * 8; b[1] = b[0] + 8 < L->nx ? b[0] + 8 : L->nx;
+ b[2] = by * 8; b[3] = b[2] + 8 < L->ny ? b[2] + 8 : L->ny;
+ b[4] = bz * 8; b[5] = b[4] + 8 < L->nz ? b[4] + 8 : L->nz;
+}
+
+/* Loops over every cell of a block list of one level. */
+#define BLK_CELLS_BEGIN(L, list, n) \
+ for (int q_ = 0; q_ < (n); q_++) { \
+ int b_[6]; \
+ blk_box((L), (list)[q_], b_); \
+ for (int k = b_[4]; k < b_[5]; k++) \
+ for (int j = b_[2]; j < b_[3]; j++) { \
+ size_t c = (size_t)b_[0] + (size_t)(L)->nx * ((size_t)j + (size_t)(L)->ny * k); \
+ for (int i = b_[0]; i < b_[1]; i++, c++) {
+#define BLK_CELLS_END \
+ } \
+ } \
+ }
+
+/* When most blocks of a level are active, a plain sweep beats block bookkeeping. */
+static inline int lev_dense(const Lev *L) { return 2 * L->nbl >= L->nbk; }
+#define DENSE_CELLS_BEGIN(L) \
+ for (int k = 0; k < (L)->nz; k++) \
+ for (int j = 0; j < (L)->ny; j++) { \
+ size_t c = (size_t)(L)->nx * ((size_t)j + (size_t)(L)->ny * k); \
+ for (int i = 0; i < (L)->nx; i++, c++) {
+#define DENSE_CELLS_END \
+ } \
+ }
+
+/* type: 0 fluid, 1 solid (Neumann), 2 air (Dirichlet p = 0, i.e. outside the sparse region) */
+static inline void stencil_cell(Lev *L, int closed_floor, int i, int j, int k) {
+ int nx = L->nx, ny = L->ny, nz = L->nz;
+ size_t c = (size_t)i + (size_t)nx * ((size_t)j + (size_t)ny * k);
+ if (L->type[c]) {
+ L->diag[c] = 0;
+ L->nb[c] = 0;
+ return;
+ }
+ int dg = 0, m = 0;
+ const int di[6] = {-1, 1, 0, 0, 0, 0}, dj[6] = {0, 0, -1, 1, 0, 0}, dk[6] = {0, 0, 0, 0, -1, 1};
+ for (int q = 0; q < 6; q++) {
+ int ii = i + di[q], jj = j + dj[q], kk = k + dk[q];
+ if (ii < 0 || jj < 0 || kk < 0 || ii >= nx || jj >= ny || kk >= nz) {
+ if (q == 4 && closed_floor) continue; /* solid floor: Neumann */
+ dg++; /* open boundary: Dirichlet p = 0 */
+ continue;
+ }
+ int tn = L->type[(size_t)ii + (size_t)nx * ((size_t)jj + (size_t)ny * kk)];
+ if (tn == 0) {
+ dg++;
+ m |= 1 << q;
+ } else if (tn == 2) {
+ dg++;
+ }
+ }
+ L->diag[c] = (uint8_t)dg;
+ L->nb[c] = (uint8_t)m;
+}
+
+/* coarse type from the (up to) 8 children: fluid if any child is fluid, solid if all are solid */
+static inline void coarse_type_cell(const Lev *F, Lev *C, int I, int J, int K) {
+ int anyf = 0, alls = 1;
+ for (int n = 0; n < 8; n++) {
+ int i = 2 * I + (n & 1), j = 2 * J + ((n >> 1) & 1), k = 2 * K + ((n >> 2) & 1);
+ if (i >= F->nx || j >= F->ny || k >= F->nz) continue;
+ int tp = F->type[(size_t)i + (size_t)F->nx * ((size_t)j + (size_t)F->ny * k)];
+ if (tp == 0) anyf = 1;
+ if (tp != 1) alls = 0;
+ }
+ C->type[(size_t)I + (size_t)C->nx * ((size_t)J + (size_t)C->ny * K)] = anyf ? 0 : (alls ? 1 : 2);
+}
+
+static void hierarchy_full(NvFluid *f) {
+ f->hier_ver++;
+ int cf = f->fp[FP_closed_floor] > 0.5f;
+ for (int l = 0; l < f->nlev; l++) {
+ Lev *L = &f->lev[l];
+ if (l > 0) {
+ Lev *F = &f->lev[l - 1];
+#pragma omp parallel for schedule(static)
+ for (int K = 0; K < L->nz; K++)
+ for (int J = 0; J < L->ny; J++)
+ for (int I = 0; I < L->nx; I++) coarse_type_cell(F, L, I, J, K);
+ }
+#pragma omp parallel for schedule(static)
+ for (int k = 0; k < L->nz; k++)
+ for (int j = 0; j < L->ny; j++)
+ for (int i = 0; i < L->nx; i++) stencil_cell(L, cf, i, j, k);
+ }
+}
+
+/* Re-type and re-stencil only the blocks above changed tiles (plus a one-block halo, because a
+ * stencil reads its neighbours' types). Work is O(changed tiles), independent of the domain. */
+static void hierarchy_incremental(NvFluid *f) {
+ f->hier_ver++;
+ int cf = f->fp[FP_closed_floor] > 0.5f;
+ for (int l = 0; l < f->nlev; l++) {
+ Lev *L = &f->lev[l];
+ L->nml = L->nsl = 0;
+ for (int q = 0; q < f->n_chg; q++) {
+ int t = f->tl_chg[q];
+ int bx = (t % f->ntx) >> l, by = ((t / f->ntx) % f->nty) >> l, bz = (t / (f->ntx * f->nty)) >> l;
+ if (bx >= L->nbx) bx = L->nbx - 1;
+ if (by >= L->nby) by = L->nby - 1;
+ if (bz >= L->nbz) bz = L->nbz - 1;
+ int bk = bx + L->nbx * (by + L->nby * bz);
+ if (!(L->bmark[bk] & 1)) {
+ L->bmark[bk] |= 1;
+ L->mlist[L->nml++] = bk;
+ }
+ }
+ for (int q = 0; q < L->nml; q++) {
+ int bk = L->mlist[q];
+ int bx = bk % L->nbx, by = (bk / L->nbx) % L->nby, bz = bk / (L->nbx * L->nby);
+ for (int dz = -1; dz <= 1; dz++)
+ for (int dy = -1; dy <= 1; dy++)
+ for (int dx = -1; dx <= 1; dx++) {
+ int x = bx + dx, y = by + dy, z = bz + dz;
+ if (x < 0 || y < 0 || z < 0 || x >= L->nbx || y >= L->nby || z >= L->nbz) continue;
+ int u = x + L->nbx * (y + L->nby * z);
+ if (!(L->bmark[u] & 2)) {
+ L->bmark[u] |= 2;
+ L->slist[L->nsl++] = u;
+ }
+ }
+ }
+ if (l > 0) {
+ Lev *F = &f->lev[l - 1];
+#pragma omp parallel for schedule(dynamic, 1)
+ BLK_CELLS_BEGIN(L, L->mlist, L->nml)
+ (void)c;
+ coarse_type_cell(F, L, i, j, k);
+ BLK_CELLS_END
+ }
+#pragma omp parallel for schedule(dynamic, 1)
+ BLK_CELLS_BEGIN(L, L->slist, L->nsl)
+ (void)c;
+ stencil_cell(L, cf, i, j, k);
+ BLK_CELLS_END
+ for (int q = 0; q < L->nsl; q++) L->bmark[L->slist[q]] = 0;
+ for (int q = 0; q < L->nml; q++) L->bmark[L->mlist[q]] = 0;
+ }
+}
+
+/* Per level: the blocks that contain fluid cells (= images of the pressure tiles). */
+static void active_blocks(NvFluid *f) {
+ for (int l = 0; l < f->nlev; l++) {
+ Lev *L = &f->lev[l];
+ for (int q = 0; q < L->nbl; q++) L->bact[L->blist[q]] = 0;
+ L->nbl = 0;
+ for (int q = 0; q < f->n_prs; q++) {
+ int t = f->tl_prs[q];
+ int bx = (t % f->ntx) >> l, by = ((t / f->ntx) % f->nty) >> l, bz = (t / (f->ntx * f->nty)) >> l;
+ if (bx >= L->nbx) bx = L->nbx - 1;
+ if (by >= L->nby) by = L->nby - 1;
+ if (bz >= L->nbz) bz = L->nbz - 1;
+ int bk = bx + L->nbx * (by + L->nby * bz);
+ if (!L->bact[bk]) {
+ L->bact[bk] = 1;
+ L->blist[L->nbl++] = bk;
+ }
+ }
+ }
+}
+
+/* red-black Gauss-Seidel over the active blocks of one level */
+#define RBGS_BODY \
+ if (((i + j + k + color) & 1)) continue; \
+ int dg = L->diag[c]; \
+ if (!dg) continue; \
+ int m = L->nb[c]; \
+ float s = b[c]; \
+ if (m & 1) s += x[c - 1]; \
+ if (m & 2) s += x[c + 1]; \
+ if (m & 4) s += x[c - sy]; \
+ if (m & 8) s += x[c + sy]; \
+ if (m & 16) s += x[c - sz]; \
+ if (m & 32) s += x[c + sz]; \
+ x[c] = s / dg;
+static void rbgs(Lev *L, int color) {
+ size_t sy = L->nx, sz = (size_t)L->nx * L->ny;
+ float *x = L->x;
+ const float *b = L->b;
+ if (lev_dense(L)) {
+#pragma omp parallel for schedule(static)
+ DENSE_CELLS_BEGIN(L)
+ RBGS_BODY
+ DENSE_CELLS_END
+ } else {
+#pragma omp parallel for schedule(dynamic, 1)
+ BLK_CELLS_BEGIN(L, L->blist, L->nbl)
+ RBGS_BODY
+ BLK_CELLS_END
+ }
+}
+
+static inline float stencil(const Lev *L, const float *x, size_t c) {
+ int dg = L->diag[c];
+ if (!dg) return 0.f;
+ size_t sy = L->nx, sz = (size_t)L->nx * L->ny;
+ int m = L->nb[c];
+ float s = dg * x[c];
+ if (m & 1) s -= x[c - 1];
+ if (m & 2) s -= x[c + 1];
+ if (m & 4) s -= x[c - sy];
+ if (m & 8) s -= x[c + sy];
+ if (m & 16) s -= x[c - sz];
+ if (m & 32) s -= x[c + sz];
+ return s;
+}
+
+/* Loops over every cell of the pressure tiles (level 0 of the solver). */
+#define PRS_CELLS_BEGIN(f) \
+ for (int q_ = 0; q_ < (f)->n_prs; q_++) { \
+ int b_[6]; \
+ tile_box((f), (f)->tl_prs[q_], 0, 0, 0, b_); \
+ for (int k = b_[4]; k < b_[5]; k++) \
+ for (int j = b_[2]; j < b_[3]; j++) { \
+ size_t c = CI((f), b_[0], j, k); \
+ for (int i = b_[0]; i < b_[1]; i++, c++) {
+#define PRS_CELLS_END \
+ } \
+ } \
+ }
+
+/* Symmetric V-cycle (zero initial guess) used as the CG preconditioner. Every level, including
+ * the coarse ones, only visits its active blocks. */
+#define LEVEL_LOOP(L, ...) \
+ if (lev_dense(L)) { \
+ _Pragma("omp parallel for schedule(static)") DENSE_CELLS_BEGIN(L) __VA_ARGS__ DENSE_CELLS_END \
+ } else { \
+ _Pragma("omp parallel for schedule(dynamic, 1)") \
+ BLK_CELLS_BEGIN(L, (L)->blist, (L)->nbl) __VA_ARGS__ BLK_CELLS_END \
+ }
+
+static void vcycle(NvFluid *f, int l) {
+ Lev *L = &f->lev[l];
+ LEVEL_LOOP(L, { (void)i; (void)j; (void)k; L->x[c] = 0.f; })
+ if (l == f->nlev - 1) {
+ for (int s = 0; s < 12; s++) { rbgs(L, 0); rbgs(L, 1); }
+ for (int s = 0; s < 12; s++) { rbgs(L, 1); rbgs(L, 0); }
+ return;
+ }
+ const int nu = 2;
+ for (int s = 0; s < nu; s++) { rbgs(L, 0); rbgs(L, 1); }
+ LEVEL_LOOP(L, { (void)i; (void)j; (void)k; L->r[c] = L->diag[c] ? L->b[c] - stencil(L, L->x, c) : 0.f; })
+ Lev *C = &f->lev[l + 1];
+ LEVEL_LOOP(C, {
+ if (!C->diag[c]) {
+ C->b[c] = 0.f;
+ continue;
+ }
+ float s = 0.f;
+ for (int q = 0; q < 8; q++) {
+ int ii = 2 * i + (q & 1), jj = 2 * j + ((q >> 1) & 1), kk = 2 * k + ((q >> 2) & 1);
+ if (ii >= L->nx || jj >= L->ny || kk >= L->nz) continue;
+ size_t cf = (size_t)ii + (size_t)L->nx * ((size_t)jj + (size_t)L->ny * kk);
+ if (L->diag[cf]) s += L->r[cf];
+ }
+ C->b[c] = 0.5f * s;
+ })
+ vcycle(f, l + 1);
+ LEVEL_LOOP(L, {
+ if (L->diag[c]) L->x[c] += C->x[(size_t)(i >> 1) + (size_t)C->nx * ((size_t)(j >> 1) + (size_t)C->ny * (k >> 1))];
+ })
+ for (int s = 0; s < nu; s++) { rbgs(L, 1); rbgs(L, 0); }
+}
+
+/* Solve A phi = b with MGPCG over the pressure tiles. Returns iterations. */
+static int mgpcg(NvFluid *f) {
+ Lev *L0 = &f->lev[0];
+ float *x = f->phi, *r = f->cg_r, *z = f->cg_z, *p = f->cg_p, *q = f->cg_q, *b = f->cg_b;
+ double bmax = 0;
+#pragma omp parallel for reduction(max : bmax) schedule(dynamic, 1)
+ PRS_CELLS_BEGIN(f)
+ double a = fabs(b[c]);
+ if (a > bmax) bmax = a;
+ PRS_CELLS_END
+ if (bmax < 1e-9) {
+#pragma omp parallel for schedule(dynamic, 1)
+ PRS_CELLS_BEGIN(f)
+ x[c] = 0.f;
+ PRS_CELLS_END
+ f->last_iters = 0;
+ f->last_res = 0;
+ return 0;
+ }
+ double tol = f->fp[FP_cg_tol] * bmax;
+ double rmax = 0;
+#pragma omp parallel for reduction(max : rmax) schedule(dynamic, 1)
+ PRS_CELLS_BEGIN(f)
+ if (!L0->diag[c]) x[c] = 0.f;
+ r[c] = L0->diag[c] ? b[c] - stencil(L0, x, c) : 0.f;
+ double a = fabs(r[c]);
+ if (a > rmax) rmax = a;
+ PRS_CELLS_END
+ int it = 0, maxit = (int)f->fp[FP_cg_iter];
+ if (rmax <= tol) goto done;
+ vcycle(f, 0); /* z = M^-1 r (lev0.b == r, lev0.x == z) */
+ double rz = 0;
+#pragma omp parallel for reduction(+ : rz) schedule(dynamic, 1)
+ PRS_CELLS_BEGIN(f)
+ p[c] = z[c];
+ rz += (double)r[c] * z[c];
+ PRS_CELLS_END
+ for (it = 1; it <= maxit; it++) {
+ double pq = 0;
+#pragma omp parallel for reduction(+ : pq) schedule(dynamic, 1)
+ PRS_CELLS_BEGIN(f)
+ q[c] = stencil(L0, p, c);
+ pq += (double)p[c] * q[c];
+ PRS_CELLS_END
+ if (fabs(pq) < 1e-30) break;
+ float alpha = (float)(rz / pq);
+ rmax = 0;
+#pragma omp parallel for reduction(max : rmax) schedule(dynamic, 1)
+ PRS_CELLS_BEGIN(f)
+ x[c] += alpha * p[c];
+ r[c] -= alpha * q[c];
+ double a = fabs(r[c]);
+ if (a > rmax) rmax = a;
+ PRS_CELLS_END
+ if (rmax <= tol) break;
+ vcycle(f, 0);
+ double rz2 = 0;
+#pragma omp parallel for reduction(+ : rz2) schedule(dynamic, 1)
+ PRS_CELLS_BEGIN(f)
+ rz2 += (double)r[c] * z[c];
+ PRS_CELLS_END
+ float beta = (float)(rz2 / rz);
+ rz = rz2;
+#pragma omp parallel for schedule(dynamic, 1)
+ PRS_CELLS_BEGIN(f)
+ p[c] = z[c] + beta * p[c];
+ PRS_CELLS_END
+ }
+done:
+ f->last_iters = it;
+ f->last_res = (float)(rmax / bmax);
+ return it;
+}
+
+static inline int is_solid(const NvFluid *f, int i, int j, int k) {
+ if (i < 0 || j < 0 || i >= f->nx || j >= f->ny || k >= f->nz) return 0;
+ if (k < 0) return f->fp[FP_closed_floor] > 0.5f;
+ return f->solid[CI(f, i, j, k)];
+}
+
+/* face box of a pressure tile for component comp, extended by one face layer on the high side
+ * when the neighbouring tile is outside the region (that boundary face still needs the gradient). */
+static inline void prs_face_box(const NvFluid *f, int t, int comp, int *b) {
+ tile_box(f, t, comp == 0, comp == 1, comp == 2, b);
+ int tx = t % f->ntx, ty = (t / f->ntx) % f->nty, tz = t / (f->ntx * f->nty);
+ if (comp == 0 && tx + 1 < f->ntx && !f->t_prs[t + 1]) b[1]++;
+ if (comp == 1 && ty + 1 < f->nty && !f->t_prs[t + f->ntx]) b[3]++;
+ if (comp == 2 && tz + 1 < f->ntz && !f->t_prs[t + f->ntx * f->nty]) b[5]++;
+}
+
+static void enforce_solid_faces(NvFluid *f, float *U, float *V, float *W) {
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_prs; q++) {
+ int t = f->tl_prs[q], b[6];
+ prs_face_box(f, t, 0, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++)
+ if (is_solid(f, i - 1, j, k) || is_solid(f, i, j, k)) U[UI(f, i, j, k)] = 0.f;
+ prs_face_box(f, t, 1, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++)
+ if (is_solid(f, i, j - 1, k) || is_solid(f, i, j, k)) V[VI(f, i, j, k)] = 0.f;
+ prs_face_box(f, t, 2, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++)
+ if (is_solid(f, i, j, k - 1) || is_solid(f, i, j, k)) W[WI(f, i, j, k)] = 0.f;
+ }
+}
+
+static void project_(NvFluid *f, float *U, float *V, float *W);
+static void project(NvFluid *f, float *U, float *V, float *W) {
+ double t0 = now_ms();
+ project_(f, U, V, W);
+ f->tm_prj += now_ms() - t0;
+}
+static void project_(NvFluid *f, float *U, float *V, float *W) {
+ int nx = f->nx, ny = f->ny, nz = f->nz;
+ float dx = f->dx;
+ Lev *L0 = &f->lev[0];
+ enforce_solid_faces(f, U, V, W);
+#pragma omp parallel for schedule(dynamic, 1)
+ PRS_CELLS_BEGIN(f)
+ if (!L0->diag[c]) {
+ f->cg_b[c] = 0.f;
+ continue;
+ }
+ float D = U[UI(f, i + 1, j, k)] - U[UI(f, i, j, k)] + V[VI(f, i, j + 1, k)] - V[VI(f, i, j, k)] +
+ W[WI(f, i, j, k + 1)] - W[WI(f, i, j, k)];
+ f->cg_b[c] = -(D - f->expn[c] * dx) * dx;
+ PRS_CELLS_END
+ mgpcg(f);
+ const float *phi = f->phi;
+ float inv = 1.f / dx;
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_prs; q++) {
+ int t = f->tl_prs[q], b[6];
+ prs_face_box(f, t, 0, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ if (is_solid(f, i - 1, j, k) || is_solid(f, i, j, k)) continue;
+ float pl = i > 0 ? phi[CI(f, i - 1, j, k)] : 0.f, pr = i < nx ? phi[CI(f, i, j, k)] : 0.f;
+ U[UI(f, i, j, k)] -= (pr - pl) * inv;
+ }
+ prs_face_box(f, t, 1, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ if (is_solid(f, i, j - 1, k) || is_solid(f, i, j, k)) continue;
+ float pl = j > 0 ? phi[CI(f, i, j - 1, k)] : 0.f, pr = j < ny ? phi[CI(f, i, j, k)] : 0.f;
+ V[VI(f, i, j, k)] -= (pr - pl) * inv;
+ }
+ prs_face_box(f, t, 2, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ if (is_solid(f, i, j, k - 1) || is_solid(f, i, j, k)) continue;
+ float pl = k > 0 ? phi[CI(f, i, j, k - 1)] : 0.f, pr = k < nz ? phi[CI(f, i, j, k)] : 0.f;
+ W[WI(f, i, j, k)] -= (pr - pl) * inv;
+ }
+ }
+}
+
+/* max abs divergence (diagnostics / tests) */
+API float nv_fluid_max_divergence(NvFluid *f) {
+ float m = 0.f;
+#pragma omp parallel for reduction(max : m) schedule(static)
+ for (int k = 0; k < f->nz; k++)
+ for (int j = 0; j < f->ny; j++)
+ for (int i = 0; i < f->nx; i++) {
+ size_t c = CI(f, i, j, k);
+ if (f->ctype[c]) continue; /* solid, or air outside the sparse region */
+ float D = f->u[UI(f, i + 1, j, k)] - f->u[UI(f, i, j, k)] + f->v[VI(f, i, j + 1, k)] -
+ f->v[VI(f, i, j, k)] + f->w[WI(f, i, j, k + 1)] - f->w[WI(f, i, j, k)];
+ D = D / f->dx - f->expn[c];
+ if (fabsf(D) > m) m = fabsf(D);
+ }
+ return m;
+}
+
+/* ------------------------------------------------------------------------- forces */
+
+static void add_forces_(NvFluid *f, float *U, float *V, float *W, float dt);
+static void add_forces(NvFluid *f, float *U, float *V, float *W, float dt) {
+ double t0 = now_ms();
+ add_forces_(f, U, V, W, dt);
+ f->tm_frc += now_ms() - t0;
+}
+/* cell-centred velocity straight from the faces (valid everywhere: faces are zero outside) */
+static inline void cvel(const NvFluid *f, const float *U, const float *V, const float *W, int i, int j, int k,
+ float *o) {
+ o[0] = 0.5f * (U[UI(f, i, j, k)] + U[UI(f, i + 1, j, k)]);
+ o[1] = 0.5f * (V[VI(f, i, j, k)] + V[VI(f, i, j + 1, k)]);
+ o[2] = 0.5f * (W[WI(f, i, j, k)] + W[WI(f, i, j, k + 1)]);
+}
+
+static inline void cvel3(const float *U, const float *V, const float *W, const NvFluid *f, int i, int j, int k,
+ float *o) {
+ cvel(f, U, V, W, i, j, k, o);
+}
+
+static void add_forces_(NvFluid *f, float *U, float *V, float *W, float dt) {
+ int nx = f->nx, ny = f->ny, nz = f->nz;
+ float dx = f->dx;
+ float bh = f->fp[FP_buoy_heat], bs = f->fp[FP_buoy_smoke];
+ /* buoyancy (Boussinesq) on w faces of the advection tiles */
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_adv; q++) {
+ int b[6];
+ tile_box(f, f->tl_adv[q], 0, 0, 1, b);
+ for (int k = b[4] < 1 ? 1 : b[4]; k < b[5] && k < nz; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ float T = 0.5f * (f->T[CI(f, i, j, k - 1)] + f->T[CI(f, i, j, k)]);
+ float d = 0.5f * (f->d[CI(f, i, j, k - 1)] + f->d[CI(f, i, j, k)]);
+ W[WI(f, i, j, k)] += dt * (bh * T - bs * d);
+ }
+ }
+ /* vorticity confinement + turbulence: |w| on pressure tiles, force on advection tiles */
+ float eps = f->fp[FP_vorticity], tamp = f->fp[FP_turb_amp];
+ if (eps > 0.f || tamp > 0.f) {
+ float *wx = f->tmp[3], *wy = f->tmp[4], *wz = f->tmp[5], *wm = f->tmp[6];
+ float *Fx = f->tmp[7], *Fy = f->tmp[8], *Fz = f->tmp[9];
+ size_t sy = nx, sz = (size_t)nx * ny;
+ float inv2 = 0.5f / dx;
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_prs; q++) {
+ int b[6];
+ tile_box(f, f->tl_prs[q], 0, 0, 0, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ size_t c = CI(f, i, j, k);
+ if (i == 0 || j == 0 || k == 0 || i == nx - 1 || j == ny - 1 || k == nz - 1) {
+ wx[c] = wy[c] = wz[c] = wm[c] = 0.f;
+ continue;
+ }
+ float xm[3], xp[3], ym[3], yp[3], zm[3], zp[3];
+ cvel(f, U, V, W, i - 1, j, k, xm); cvel(f, U, V, W, i + 1, j, k, xp);
+ cvel(f, U, V, W, i, j - 1, k, ym); cvel(f, U, V, W, i, j + 1, k, yp);
+ cvel(f, U, V, W, i, j, k - 1, zm); cvel(f, U, V, W, i, j, k + 1, zp);
+ float a = ((yp[2] - ym[2]) - (zp[1] - zm[1])) * inv2;
+ float bb = ((zp[0] - zm[0]) - (xp[2] - xm[2])) * inv2;
+ float g = ((xp[1] - xm[1]) - (yp[0] - ym[0])) * inv2;
+ wx[c] = a; wy[c] = bb; wz[c] = g;
+ wm[c] = sqrtf(a * a + bb * bb + g * g);
+ }
+ }
+ float tf = f->fp[FP_turb_freq], tt = (float)f->time * f->fp[FP_turb_speed];
+ uint32_t seed = (uint32_t)f->fp[FP_seed] * 7919u + 17u;
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_prs; q++) {
+ int t = f->tl_prs[q], b[6];
+ tile_box(f, t, 0, 0, 0, b);
+ int act = f->t_adv[t];
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ size_t c = CI(f, i, j, k);
+ float fx = 0.f, fy = 0.f, fz = 0.f;
+ if (act && eps > 0.f && !(i == 0 || j == 0 || k == 0 || i == nx - 1 || j == ny - 1 || k == nz - 1)) {
+ float gx = (wm[c + 1] - wm[c - 1]) * inv2, gy = (wm[c + sy] - wm[c - sy]) * inv2,
+ gz = (wm[c + sz] - wm[c - sz]) * inv2;
+ float gl = sqrtf(gx * gx + gy * gy + gz * gz) + 1e-6f;
+ gx /= gl; gy /= gl; gz /= gl;
+ fx = eps * dx * (gy * wz[c] - gz * wy[c]);
+ fy = eps * dx * (gz * wx[c] - gx * wz[c]);
+ fz = eps * dx * (gx * wy[c] - gy * wx[c]);
+ }
+ if (act && tamp > 0.f) {
+ float wgt = fminf(1.f, f->d[c] + f->T[c]);
+ if (wgt > 1e-3f) {
+ float X = f->o[0] + (i + .5f) * dx, Y = f->o[1] + (j + .5f) * dx, Z = f->o[2] + (k + .5f) * dx;
+ float cn[3], cv[3];
+ curl_noise(X * tf, Y * tf, Z * tf, tt, 2, seed, cn);
+ /* noise stirs the gas but must not pump energy forever (inviscid: nothing removes it):
+ * the push fades out as the local speed approaches 0.5 * amplitude (m/s) */
+ cvel3(U, V, W, f, i, j, k, cv);
+ float sp = sqrtf(cv[0] * cv[0] + cv[1] * cv[1] + cv[2] * cv[2]);
+ float lim = fmaxf(0.f, 1.f - sp / (0.5f * tamp));
+ fx += tamp * wgt * lim * cn[0];
+ fy += tamp * wgt * lim * cn[1];
+ fz += tamp * wgt * lim * cn[2];
+ }
+ }
+ Fx[c] = fx; Fy[c] = fy; Fz[c] = fz;
+ }
+ }
+ /* faces between two cells of the advection region; neighbours lie in the pressure region */
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_adv; q++) {
+ int b[6];
+ tile_box(f, f->tl_adv[q], 0, 0, 0, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ size_t c = CI(f, i, j, k);
+ if (i > 0) U[UI(f, i, j, k)] += dt * 0.5f * (Fx[c] + Fx[c - 1]);
+ if (j > 0) V[VI(f, i, j, k)] += dt * 0.5f * (Fy[c] + Fy[c - sy]);
+ if (k > 0) W[WI(f, i, j, k)] += dt * 0.5f * (Fz[c] + Fz[c - sz]);
+ }
+ }
+ }
+ /* wind relaxation + velocity damping, pressure tiles only (zero stays zero outside) */
+ float wd = f->fp[FP_wind_drag], vd = f->fp[FP_vel_decay];
+ if (wd > 0.f || vd > 0.f) {
+ float a = 1.f - expf(-wd * dt), e = expf(-vd * dt);
+ float wv[3] = {f->fp[FP_wind_x], f->fp[FP_wind_y], f->fp[FP_wind_z]};
+ float *arr[3] = {U, V, W};
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_prs; q++) {
+ for (int comp = 0; comp < 3; comp++) {
+ int b[6];
+ tile_box(f, f->tl_prs[q], comp == 0, comp == 1, comp == 2, b);
+ int sx = nx + (comp == 0), syy = ny + (comp == 1);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ size_t c = (size_t)i + (size_t)sx * ((size_t)j + (size_t)syy * k);
+ arr[comp][c] = (arr[comp][c] + (wv[comp] - arr[comp][c]) * a) * e;
+ }
+ }
+ }
+ }
+}
+
+/* ---------------------------------------------------------------------- combustion */
+
+static void combust(NvFluid *f, float dt) {
+ const float ign = f->fp[FP_ignite], br = f->fp[FP_burn_rate], hr = f->fp[FP_heat_release],
+ sy = f->fp[FP_smoke_yield], ex = f->fp[FP_expansion];
+ const float ec = expf(-f->fp[FP_cool] * dt), cr = f->fp[FP_cool_rad];
+ const float es = expf(-f->fp[FP_smoke_decay] * dt), ef = expf(-f->fp[FP_fuel_decay] * dt),
+ efl = expf(-f->fp[FP_flame_decay] * dt);
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_adv; q++) {
+ int b[6];
+ tile_box(f, f->tl_adv[q], 0, 0, 0, b);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ size_t c = CI(f, i, j, k);
+ float fu = f->fuel[c], T = f->T[c], d = f->d[c];
+ float burned = 0.f;
+ if (fu > 0.f && T > ign) {
+ /* reaction speeds up with temperature (Arrhenius-like), limited by available fuel */
+ float rate = br * fminf(4.f, 0.5f + (T - ign) * 2.f);
+ burned = fminf(fu, rate * dt);
+ fu -= burned;
+ T += hr * burned;
+ d += sy * burned;
+ }
+ /* expansion is capped at 40% volume growth per substep so explosions stay stable */
+ f->expn[c] = fminf(ex * burned / dt, 0.4f / dt);
+ float inten = br > 0.f ? burned / (br * dt) : 0.f;
+ float fl = f->flame[c] * efl;
+ f->flame[c] = inten > fl ? fminf(inten, 4.f) : fl;
+ /* Newton cooling then exact radiative T^4 cooling: T = T / cbrt(1 + 3 c T^3 dt) */
+ T *= ec;
+ if (cr > 0.f && T > 0.f) T = T / cbrtf(1.f + 3.f * cr * T * T * T * dt);
+ f->T[c] = T;
+ f->d[c] = d * es;
+ f->fuel[c] = fu * ef;
+ }
+ }
+}
+
+/* fastest face; faces outside the pressure tiles are zero by construction, so only those count */
+static float max_speed(NvFluid *f) {
+ if (f->gpu) return gpuf_max_speed(f->gpu);
+ float m = 0.f;
+ float *arr[3] = {f->u, f->v, f->w};
+#pragma omp parallel for reduction(max : m) schedule(dynamic, 1)
+ for (int q = 0; q < f->n_prs; q++) {
+ for (int comp = 0; comp < 3; comp++) {
+ int b[6];
+ prs_face_box(f, f->tl_prs[q], comp, b);
+ int sx = f->nx + (comp == 0), sy = f->ny + (comp == 1);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++)
+ m = fmaxf(m, fabsf(arr[comp][(size_t)i + (size_t)sx * ((size_t)j + (size_t)sy * k)]));
+ }
+ }
+ return m;
+}
+
+/* Safety net: no face may move more than 2x the CFL target in one substep. Anything faster is
+ * numerical blow-up (e.g. a violent expansion against the substep cap), never real motion. */
+static void clamp_velocity(NvFluid *f, float vmax) {
+ float *arr[3] = {f->u, f->v, f->w};
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_prs; q++) {
+ for (int comp = 0; comp < 3; comp++) {
+ int b[6];
+ prs_face_box(f, f->tl_prs[q], comp, b);
+ int sx = f->nx + (comp == 0), sy = f->ny + (comp == 1);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ size_t c = (size_t)i + (size_t)sx * ((size_t)j + (size_t)sy * k);
+ float v = arr[comp][c];
+ arr[comp][c] = v > vmax ? vmax : (v < -vmax ? -vmax : v);
+ }
+ }
+ }
+}
+
+/* reflection bookkeeping over the pressure tiles only (faces outside are zero in every array).
+ * op 0: u0 = u1; op 1: u0 = 2 u1 - u0 */
+static void faces_op(NvFluid *f, int op) {
+ float *dst[3] = {f->u0, f->v0, f->w0}, *src[3] = {f->u1, f->v1, f->w1};
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int q = 0; q < f->n_prs; q++) {
+ for (int comp = 0; comp < 3; comp++) {
+ int b[6];
+ prs_face_box(f, f->tl_prs[q], comp, b);
+ int sx = f->nx + (comp == 0), sy = f->ny + (comp == 1);
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++) {
+ size_t c = (size_t)b[0] + (size_t)sx * ((size_t)j + (size_t)sy * k);
+ float *d = dst[comp] + c;
+ const float *s1 = src[comp] + c;
+ int len = b[1] - b[0];
+ if (op == 0) {
+ memcpy(d, s1, sizeof(float) * len);
+ continue;
+ }
+ for (int ii = 0; ii < len; ii++) {
+ /* reflect only between two fluid cells: next to air (open boundary, outside the sparse
+ * region) or a solid, reflection doubles an unconstrained correction every step and the
+ * boundary faces run away, so those keep the projected value */
+ int i = b[0] + ii;
+ int i0 = i - (comp == 0), j0 = j - (comp == 1), k0 = k - (comp == 2);
+ int inside = i0 >= 0 && j0 >= 0 && k0 >= 0 && i < f->nx && j < f->ny && k < f->nz;
+ int fluid = inside && f->ctype[CI(f, i0, j0, k0)] == 0 && f->ctype[CI(f, i, j, k)] == 0;
+ d[ii] = fluid ? 2.f * s1[ii] - d[ii] : s1[ii];
+ }
+ }
+ }
+ }
+}
+
+static void swapp(float **a, float **b) {
+ float *t = *a;
+ *a = *b;
+ *b = t;
+}
+
+static void fluid_substep(NvFluid *f, float dt) {
+ update_tiles(f);
+ if (f->gpu) {
+ if (f->gpu_hier_ver != f->hier_ver) {
+ uint8_t *diag[16], *nb[16];
+ for (int l = 0; l < f->nlev; l++) { diag[l] = f->lev[l].diag; nb[l] = f->lev[l].nb; }
+ gpuf_set_stencils(f->gpu, f->solid, diag, nb, PERM);
+ f->gpu_hier_ver = f->hier_ver;
+ }
+ gpuf_substep(f->gpu, f->fp, dt, f->time);
+ f->time += dt;
+ return;
+ }
+ double t0 = now_ms();
+ advect_scalars(f, f->u, f->v, f->w, dt);
+ double t1 = now_ms();
+ combust(f, dt);
+ f->tm_cmb += now_ms() - t1;
+ f->tm_adv += t1 - t0;
+ if (f->fp[FP_reflect] > 0.5f) {
+ /* advection–reflection: half step, project, reflect, half step, project */
+ advect_velocity(f, f->u, f->v, f->w, f->u, f->v, f->w, f->u1, f->v1, f->w1, 0.5f * dt);
+ add_forces(f, f->u1, f->v1, f->w1, dt);
+ faces_op(f, 0); /* u0 = u1 (pre-projection half step) */
+ project(f, f->u1, f->v1, f->w1); /* u1 = u^{1/2} (divergence free) */
+ faces_op(f, 1); /* u0 = 2 u1 - u0 (reflection) */
+ advect_velocity(f, f->u0, f->v0, f->w0, f->u1, f->v1, f->w1, f->u, f->v, f->w, 0.5f * dt);
+ project(f, f->u, f->v, f->w);
+ } else {
+ advect_velocity(f, f->u, f->v, f->w, f->u, f->v, f->w, f->u1, f->v1, f->w1, dt);
+ swapp(&f->u, &f->u1); swapp(&f->v, &f->v1); swapp(&f->w, &f->w1);
+ add_forces(f, f->u, f->v, f->w, dt);
+ project(f, f->u, f->v, f->w);
+ }
+ clamp_velocity(f, 2.f * f->fp[FP_cfl] * f->dx / dt);
+ f->time += dt;
+}
+
+API void nv_fluid_timings(NvFluid *f, float *o) {
+ o[0] = (float)f->tm_adv; o[1] = (float)f->tm_frc; o[2] = (float)f->tm_prj; o[3] = (float)f->tm_cmb;
+ f->tm_adv = f->tm_frc = f->tm_prj = f->tm_cmb = 0;
+}
+
+/* test / benchmark hook: only the scalar advection of one substep (CPU reference for the GPU path) */
+API double nv_fluid_bench_advect(NvFluid *f, float dt, int iters) {
+ ftz();
+ update_tiles(f);
+ double t0 = now_ms();
+ for (int i = 0; i < iters; i++) advect_scalars(f, f->u, f->v, f->w, dt);
+ return (now_ms() - t0) / iters;
+}
+
+/* diagnostics: fastest face velocity right now (CPU or GPU path) */
+API float nv_fluid_max_speed(NvFluid *f) { return max_speed(f); }
+
+API void nv_fluid_step(NvFluid *f, float dt) {
+ ftz();
+ double t0 = now_ms();
+ f->maxvel = max_speed(f);
+ int n = (int)ceilf(f->maxvel * dt / (f->fp[FP_cfl] * f->dx));
+ n = n < 1 ? 1 : (n > (int)f->fp[FP_max_sub] ? (int)f->fp[FP_max_sub] : n);
+ for (int s = 0; s < n; s++) fluid_substep(f, dt / n);
+ f->ms = now_ms() - t0;
+}
+
+/* ------------------------------------------------------------------ fluid sources */
+
+/* Emitter splats. mode 0 = add (values are amounts), 1 = max (values are targets).
+ * Smooth kernel w = (1 - r^2/R^2)^2. vel (3n, may be NULL) pulls face velocity toward it. */
+API void nv_fluid_splat(NvFluid *f, int n, const float *pos, float radius, float dens, float heat, float fuel,
+ const float *vel, float vel_amt, int mode) {
+ if (f->gpu) {
+ gpuf_splat(f->gpu, n, pos, radius, dens, heat, fuel, vel, vel_amt, mode);
+ return;
+ }
+ int nx = f->nx, ny = f->ny, nz = f->nz;
+ float dx = f->dx, R = fmaxf(radius, 0.75f * dx), R2 = R * R, inv = 1.f / dx;
+ int rr = (int)ceilf(R * inv) + 1;
+ for (int p = 0; p < n; p++) {
+ int ci = (int)floorf((pos[3 * p] - f->o[0]) * inv), cj = (int)floorf((pos[3 * p + 1] - f->o[1]) * inv),
+ ck = (int)floorf((pos[3 * p + 2] - f->o[2]) * inv);
+ tile_mark_range(f, f->t_dirty, ci - rr, ci + rr, cj - rr, cj + rr, ck - rr, ck + rr);
+ }
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int k = 0; k < nz; k++) {
+ float zc = f->o[2] + (k + 0.5f) * dx;
+ for (int p = 0; p < n; p++) {
+ float px = pos[3 * p], py = pos[3 * p + 1], pz = pos[3 * p + 2];
+ float dz = zc - pz;
+ if (dz * dz > R2) continue;
+ int ci = (int)floorf((px - f->o[0]) * inv), cj = (int)floorf((py - f->o[1]) * inv);
+ for (int j = cj - rr; j <= cj + rr; j++) {
+ if (j < 0 || j >= ny) continue;
+ float dy = f->o[1] + (j + 0.5f) * dx - py;
+ for (int i = ci - rr; i <= ci + rr; i++) {
+ if (i < 0 || i >= nx) continue;
+ float dxx = f->o[0] + (i + 0.5f) * dx - px;
+ float q = (dxx * dxx + dy * dy + dz * dz) / R2;
+ if (q >= 1.f) continue;
+ float w = (1.f - q) * (1.f - q);
+ size_t c = CI(f, i, j, k);
+ if (f->solid[c]) continue;
+ if (mode == 0) {
+ f->d[c] += dens * w;
+ f->T[c] += heat * w;
+ f->fuel[c] += fuel * w;
+ } else {
+ f->d[c] = fmaxf(f->d[c], dens * w);
+ f->T[c] = fmaxf(f->T[c], heat * w);
+ f->fuel[c] = fmaxf(f->fuel[c], fuel * w);
+ }
+ if (vel && vel_amt > 0.f) {
+ float a = fminf(1.f, w * vel_amt);
+ /* faces owned by this cell: low faces of i, j, k (each face written by one cell) */
+ float *U = f->u, *V = f->v, *W = f->w;
+ U[UI(f, i, j, k)] += (vel[3 * p] - U[UI(f, i, j, k)]) * a;
+ V[VI(f, i, j, k)] += (vel[3 * p + 1] - V[VI(f, i, j, k)]) * a;
+ W[WI(f, i, j, k)] += (vel[3 * p + 2] - W[WI(f, i, j, k)]) * a;
+ }
+ }
+ }
+ }
+ }
+}
+
+/* trilinear deposit (particles -> grid), bucketed by k-plane so no atomics are needed.
+ * amt is 3 floats per point: smoke, heat, fuel (already multiplied by dt). */
+static void fluid_deposit(NvFluid *f, int n, const float *pos, const float *amt) {
+ if (n <= 0) return;
+ if (f->gpu) {
+ gpuf_deposit(f->gpu, n, pos, amt);
+ return;
+ }
+ int nx = f->nx, ny = f->ny, nz = f->nz;
+ float inv = 1.f / f->dx;
+ int *kb = (int *)malloc(sizeof(int) * n);
+ int *cnt = (int *)calloc(nz + 1, sizeof(int));
+ int *order = (int *)malloc(sizeof(int) * n);
+ for (int p = 0; p < n; p++) {
+ float gz = (pos[3 * p + 2] - f->o[2]) * inv - 0.5f;
+ int k = (int)floorf(gz);
+ kb[p] = (k < -1 || k >= nz) ? -2 : k;
+ if (kb[p] >= -1) {
+ cnt[kb[p] + 1]++;
+ int i = (int)floorf((pos[3 * p] - f->o[0]) * inv - 0.5f), j = (int)floorf((pos[3 * p + 1] - f->o[1]) * inv - 0.5f);
+ tile_mark_range(f, f->t_dirty, i, i + 1, j, j + 1, k, k + 1);
+ }
+ }
+ int *start = (int *)malloc(sizeof(int) * (nz + 2));
+ start[0] = 0;
+ for (int k = 0; k <= nz; k++) start[k + 1] = start[k] + cnt[k];
+ int *fill = (int *)calloc(nz + 1, sizeof(int));
+ for (int p = 0; p < n; p++)
+ if (kb[p] >= -1) order[start[kb[p] + 1] + fill[kb[p] + 1]++] = p;
+#pragma omp parallel for schedule(dynamic, 1)
+ for (int k = 0; k < nz; k++) {
+ /* contributions from bucket k (weight 1-tz) and bucket k-1 (weight tz) */
+ for (int b = k - 1; b <= k; b++) {
+ int bi = b + 1;
+ for (int q = start[bi]; q < start[bi + 1]; q++) {
+ int p = order[q];
+ float gx = (pos[3 * p] - f->o[0]) * inv - 0.5f, gy = (pos[3 * p + 1] - f->o[1]) * inv - 0.5f,
+ gz = (pos[3 * p + 2] - f->o[2]) * inv - 0.5f;
+ float tz = gz - floorf(gz);
+ float wz = (b == k) ? 1.f - tz : tz;
+ int i0 = (int)floorf(gx), j0 = (int)floorf(gy);
+ float tx = gx - i0, ty = gy - j0;
+ for (int dj = 0; dj < 2; dj++) {
+ int j = j0 + dj;
+ if (j < 0 || j >= ny) continue;
+ float wy = dj ? ty : 1.f - ty;
+ for (int di = 0; di < 2; di++) {
+ int i = i0 + di;
+ if (i < 0 || i >= nx) continue;
+ float w = wz * wy * (di ? tx : 1.f - tx);
+ size_t c = CI(f, i, j, k);
+ f->d[c] += amt[3 * p] * w;
+ f->T[c] += amt[3 * p + 1] * w;
+ f->fuel[c] += amt[3 * p + 2] * w;
+ }
+ }
+ }
+ }
+ }
+ free(kb); free(cnt); free(order); free(start); free(fill);
+}
+
+/* =================================================================== particle system */
+
+typedef struct {
+ float *x, *y, *z, *vx, *vy, *vz, *age, *life, *temp, *size, *cr, *cg, *cb;
+ uint32_t *id;
+ uint8_t *kind, *gen;
+ int n, cap;
+} PB;
+
+typedef struct NvSys {
+ PB p, q, alt;
+ float kp[MAXK][KP_COUNT];
+ int nk;
+ float sp[SP_COUNT];
+ Collider col[MAXCOL];
+ int ncol;
+ Force frc[MAXFRC];
+ int nfrc;
+ NvFluid *fluid;
+ uint32_t next_id, stepno;
+ double time, ms;
+ /* scratch */
+ uint16_t *ev_trail, *ev_death;
+ uint8_t *ev_split, *ev_hit, *dead;
+ uint32_t *cnt, *off;
+ int scap;
+ float *dep_pos, *dep_amt;
+ int dep_cap;
+ Sdf sdf[MAXSDF];
+ /* turbulence baked on a grid around the particles (used when far cheaper than per-particle noise) */
+ float *tg;
+ size_t tg_cap;
+ int tg_n[3];
+ float tg_o[3], tg_h;
+ int tg_mode; /* -1 never, 0 auto, 1 always (tests) */
+ int tg_used, tg_on;
+} NvSys;
+
+#define PB_FLOATS(X) X(x) X(y) X(z) X(vx) X(vy) X(vz) X(age) X(life) X(temp) X(size) X(cr) X(cg) X(cb)
+
+/* memcpy split across threads (also spreads first-touch page faults over all cores) */
+static void pmemcpy(void *dst, const void *src, size_t bytes) {
+ if (bytes < (1u << 20)) {
+ memcpy(dst, src, bytes);
+ return;
+ }
+ const size_t chunk = 1u << 18;
+ int nchunk = (int)((bytes + chunk - 1) / chunk);
+#pragma omp parallel for schedule(static)
+ for (int q = 0; q < nchunk; q++) {
+ size_t o = (size_t)q * chunk, len = o + chunk > bytes ? bytes - o : chunk;
+ memcpy((char *)dst + o, (const char *)src + o, len);
+ }
+}
+
+static void *grow(void *old, size_t used, size_t cap) {
+ void *p = malloc(cap ? cap : 1);
+ if (old && used) pmemcpy(p, old, used);
+ free(old);
+ return p;
+}
+
+static void pb_reserve(PB *b, int cap) {
+ if (cap <= b->cap) return;
+ int nc = b->cap ? b->cap : 1024;
+ while (nc < cap) nc = nc + nc / 2;
+ size_t n = (size_t)b->n;
+#define RE(f) b->f = (float *)grow(b->f, sizeof(float) * n, sizeof(float) * (size_t)nc);
+ PB_FLOATS(RE)
+#undef RE
+ b->id = (uint32_t *)grow(b->id, sizeof(uint32_t) * n, sizeof(uint32_t) * (size_t)nc);
+ b->kind = (uint8_t *)grow(b->kind, n, (size_t)nc);
+ b->gen = (uint8_t *)grow(b->gen, n, (size_t)nc);
+ b->cap = nc;
+}
+
+/* append all of Q to the end of D (D must have room) */
+static void pb_append(PB *D, int at, const PB *Q) {
+ size_t m = (size_t)Q->n;
+#define AP(f) pmemcpy(D->f + at, Q->f, sizeof(float) * m);
+ PB_FLOATS(AP)
+#undef AP
+ pmemcpy(D->id + at, Q->id, sizeof(uint32_t) * m);
+ pmemcpy(D->kind + at, Q->kind, m);
+ pmemcpy(D->gen + at, Q->gen, m);
+}
+static void pb_free(PB *b) {
+#define FR(f) free(b->f);
+ PB_FLOATS(FR)
+#undef FR
+ free(b->id); free(b->kind); free(b->gen);
+ memset(b, 0, sizeof *b);
+}
+static inline void pb_copy(PB *d, int di, const PB *s, int si) {
+#define CP(f) d->f[di] = s->f[si];
+ PB_FLOATS(CP)
+#undef CP
+ d->id[di] = s->id[si];
+ d->kind[di] = s->kind[si];
+ d->gen[di] = s->gen[si];
+}
+
+API NvSys *nv_sys_new(void) {
+ bb_init();
+ NvSys *s = (NvSys *)calloc(1, sizeof(NvSys));
+ memcpy(s->sp, sys_defs, sizeof sys_defs);
+ for (int k = 0; k < MAXK; k++) memcpy(s->kp[k], kind_defs, sizeof kind_defs);
+ s->nk = 1;
+ return s;
+}
+
+API void nv_sys_free(NvSys *s) {
+ if (!s) return;
+ pb_free(&s->p);
+ pb_free(&s->q);
+ pb_free(&s->alt);
+ free(s->ev_trail); free(s->ev_death); free(s->ev_split); free(s->ev_hit); free(s->dead);
+ free(s->cnt); free(s->off); free(s->dep_pos); free(s->dep_amt);
+ for (int i = 0; i < MAXSDF; i++) free(s->sdf[i].d);
+ free(s->tg);
+ free(s);
+}
+
+API void nv_sys_reset(NvSys *s) {
+ s->p.n = 0;
+ s->q.n = 0;
+ s->next_id = 0;
+ s->stepno = 0;
+ s->time = 0;
+}
+
+API void nv_sys_set_params(NvSys *s, const float *p) { memcpy(s->sp, p, sizeof s->sp); }
+API void nv_sys_set_kinds(NvSys *s, int nk, const float *p) {
+ s->nk = nk < 1 ? 1 : (nk > MAXK ? MAXK : nk);
+ for (int k = 0; k < s->nk; k++) memcpy(s->kp[k], p + (size_t)k * KP_COUNT, sizeof(float) * KP_COUNT);
+}
+static void collider_aabb_s(const NvSys *s, const Collider *C, float *lo, float *hi);
+static void mark_voxelize(NvSys *s, const float *lo, const float *hi);
+API void nv_sys_set_fluid(NvSys *s, NvFluid *f) {
+ s->fluid = f;
+ for (int c = 0; f && c < s->ncol; c++) { /* a new grid needs every collider stamped once */
+ float lo[3], hi[3];
+ collider_aabb_s(s, &s->col[c], lo, hi);
+ mark_voxelize(s, lo, hi);
+ }
+}
+API int nv_sys_count(NvSys *s) { return s->p.n; }
+
+/* collider record: type, m[12], mi[12], ext[3], vel[3] = 31 floats */
+static void collider_aabb_s(const NvSys *s, const Collider *C, float *lo, float *hi);
+static void mark_voxelize(NvSys *s, const float *lo, const float *hi);
+
+/* Colliders are re-sent every frame; the grid is only re-voxelized when one actually changed,
+ * and only inside the boxes covering their old and new positions. */
+API void nv_sys_set_colliders(NvSys *s, int n, const float *d) {
+ Collider nc[MAXCOL];
+ memset(nc, 0, sizeof nc);
+ int cnt = n > MAXCOL ? MAXCOL : n;
+ for (int c = 0; c < cnt; c++) {
+ const float *r = d + c * 31;
+ Collider *C = &nc[c];
+ C->type = (int)r[0];
+ memcpy(C->m, r + 1, 12 * 4);
+ memcpy(C->mi, r + 13, 12 * 4);
+ memcpy(C->ext, r + 25, 3 * 4);
+ memcpy(C->vel, r + 28, 3 * 4);
+ float sm = 1e30f;
+ for (int j = 0; j < 3; j++) {
+ float l = sqrtf(C->mi[j] * C->mi[j] + C->mi[4 + j] * C->mi[4 + j] + C->mi[8 + j] * C->mi[8 + j]);
+ sm = fminf(sm, l);
+ }
+ C->smin = sm;
+ float gz = sqrtf(C->m[8] * C->m[8] + C->m[9] * C->m[9] + C->m[10] * C->m[10]);
+ C->pinv = gz > 0.f ? 1.f / gz : 1.f;
+ }
+ /* geometry only (velocity changes alone do not move solid cells) */
+ int same = cnt == s->ncol;
+ for (int c = 0; same && c < cnt; c++)
+ same = nc[c].type == s->col[c].type && !memcmp(nc[c].m, s->col[c].m, sizeof nc[c].m) &&
+ !memcmp(nc[c].ext, s->col[c].ext, sizeof nc[c].ext);
+ if (!same && s->fluid) {
+ for (int c = 0; c < s->ncol; c++) { /* old positions: clear */
+ float lo[3], hi[3];
+ collider_aabb_s(s, &s->col[c], lo, hi);
+ mark_voxelize(s, lo, hi);
+ }
+ for (int c = 0; c < cnt; c++) { /* new positions: fill */
+ float lo[3], hi[3];
+ collider_aabb_s(s, &nc[c], lo, hi);
+ mark_voxelize(s, lo, hi);
+ }
+ }
+ memcpy(s->col, nc, sizeof nc);
+ s->ncol = cnt;
+}
+
+/* Upload a mesh collider's signed distance field into slot `slot` (local space of the collider). */
+API int nv_sys_set_sdf(NvSys *s, int slot, int nx, int ny, int nz, float ox, float oy, float oz, float dx,
+ const float *d) {
+ if (slot < 0 || slot >= MAXSDF || nx < 2 || ny < 2 || nz < 2) return -1;
+ Sdf *S = &s->sdf[slot];
+ size_t n = (size_t)nx * ny * nz;
+ free(S->d);
+ S->d = (float *)malloc(n * sizeof(float));
+ memcpy(S->d, d, n * sizeof(float));
+ S->nx = nx; S->ny = ny; S->nz = nz;
+ S->o[0] = ox; S->o[1] = oy; S->o[2] = oz;
+ S->dx = dx;
+ /* any collider using this slot changed shape: re-voxelize it */
+ for (int c = 0; c < s->ncol; c++)
+ if (s->col[c].type == 3 && (int)s->col[c].ext[0] == slot) {
+ float lo[3], hi[3];
+ collider_aabb_s(s, &s->col[c], lo, hi);
+ mark_voxelize(s, lo, hi);
+ }
+ return 0;
+}
+
+/* force record: type, pos[3], axis[3], strength, radius, freq, falloff = 11 floats */
+API void nv_sys_set_forces(NvSys *s, int n, const float *d) {
+ s->nfrc = n > MAXFRC ? MAXFRC : n;
+ for (int c = 0; c < s->nfrc; c++) {
+ const float *r = d + c * 11;
+ Force *F = &s->frc[c];
+ F->type = (int)r[0];
+ memcpy(F->pos, r + 1, 12);
+ memcpy(F->axis, r + 4, 12);
+ F->strength = r[7];
+ F->radius = r[8];
+ F->freq = r[9];
+ F->falloff = r[10];
+ }
+}
+
+static inline void xf(const float *m, const float *p, float *o) {
+ o[0] = m[0] * p[0] + m[1] * p[1] + m[2] * p[2] + m[3];
+ o[1] = m[4] * p[0] + m[5] * p[1] + m[6] * p[2] + m[7];
+ o[2] = m[8] * p[0] + m[9] * p[1] + m[10] * p[2] + m[11];
+}
+
+/* inside test. returns 1 and fills world push-out point + normal if inside */
+static inline float sdf_at(const Sdf *S, float x, float y, float z) {
+ x = clampf(x, 0.f, S->nx - 1.001f); y = clampf(y, 0.f, S->ny - 1.001f); z = clampf(z, 0.f, S->nz - 1.001f);
+ int i = (int)x, j = (int)y, k = (int)z;
+ float tx = x - i, ty = y - j, tz = z - k;
+ size_t sx = 1, sy = S->nx, sz = (size_t)S->nx * S->ny, c = i + sy * j + sz * k;
+ const float *d = S->d;
+ float c00 = lerpf(d[c], d[c + sx], tx), c10 = lerpf(d[c + sy], d[c + sy + sx], tx);
+ float c01 = lerpf(d[c + sz], d[c + sz + sx], tx), c11 = lerpf(d[c + sz + sy], d[c + sz + sy + sx], tx);
+ return lerpf(lerpf(c00, c10, ty), lerpf(c01, c11, ty), tz);
+}
+
+static int collider_test(const NvSys *s, const Collider *C, const float *p, float *outp, float *n) {
+ float l[3];
+ xf(C->m, p, l);
+ float ln[3] = {0, 0, 0}, lp[3] = {l[0], l[1], l[2]};
+ if (C->type == 0) {
+ if (l[2] >= 0.f) return 0;
+ lp[2] = 0.f;
+ ln[2] = 1.f;
+ } else if (C->type == 1) {
+ float r = C->ext[0], d = sqrtf(l[0] * l[0] + l[1] * l[1] + l[2] * l[2]);
+ if (d >= r) return 0;
+ if (d < 1e-8f) { l[2] = 1e-4f; d = 1e-4f; }
+ for (int k = 0; k < 3; k++) {
+ ln[k] = l[k] / d;
+ lp[k] = ln[k] * r;
+ }
+ } else if (C->type == 3) {
+ int slot = (int)C->ext[0];
+ if (slot < 0 || slot >= MAXSDF || !s->sdf[slot].d) return 0;
+ const Sdf *S = &s->sdf[slot];
+ float gx = (l[0] - S->o[0]) / S->dx, gy = (l[1] - S->o[1]) / S->dx, gz = (l[2] - S->o[2]) / S->dx;
+ if (gx < 0.f || gy < 0.f || gz < 0.f || gx > S->nx - 1 || gy > S->ny - 1 || gz > S->nz - 1) return 0;
+ float d = sdf_at(S, gx, gy, gz);
+ if (d >= 0.f) return 0;
+ const float e = 0.5f;
+ float g[3] = {sdf_at(S, gx + e, gy, gz) - sdf_at(S, gx - e, gy, gz),
+ sdf_at(S, gx, gy + e, gz) - sdf_at(S, gx, gy - e, gz),
+ sdf_at(S, gx, gy, gz + e) - sdf_at(S, gx, gy, gz - e)};
+ float gl = sqrtf(g[0] * g[0] + g[1] * g[1] + g[2] * g[2]);
+ if (gl < 1e-12f) { g[0] = 0; g[1] = 0; g[2] = 1; gl = 1; }
+ for (int k = 0; k < 3; k++) {
+ ln[k] = g[k] / gl;
+ lp[k] = l[k] - d * ln[k]; /* step out along the distance gradient to the surface */
+ }
+ } else {
+ float best = 1e30f;
+ int ax = -1;
+ for (int k = 0; k < 3; k++) {
+ float pen = C->ext[k] - fabsf(l[k]);
+ if (pen <= 0.f) return 0;
+ if (pen < best) { best = pen; ax = k; }
+ }
+ float sg = l[ax] >= 0.f ? 1.f : -1.f;
+ lp[ax] = sg * C->ext[ax];
+ ln[ax] = sg;
+ }
+ xf(C->mi, lp, outp);
+ /* normal: transpose of world->local applied to local normal */
+ n[0] = C->m[0] * ln[0] + C->m[4] * ln[1] + C->m[8] * ln[2];
+ n[1] = C->m[1] * ln[0] + C->m[5] * ln[1] + C->m[9] * ln[2];
+ n[2] = C->m[2] * ln[0] + C->m[6] * ln[1] + C->m[10] * ln[2];
+ float nl = sqrtf(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]) + 1e-12f;
+ n[0] /= nl; n[1] /= nl; n[2] /= nl;
+ return 1;
+}
+
+/* conservative world AABB of a collider (planes are unbounded) */
+/* Signed distance to a collider, never larger than the true world distance (safe for sphere tracing). */
+static float collider_dist(const NvSys *s, const Collider *C, const float *p) {
+ float l[3];
+ xf(C->m, p, l);
+ if (C->type == 0) return l[2] * C->pinv;
+ if (C->type == 1) return (sqrtf(l[0] * l[0] + l[1] * l[1] + l[2] * l[2]) - C->ext[0]) * C->smin;
+ if (C->type == 2) {
+ float q[3], o = 0.f, mx = -1e30f;
+ for (int a = 0; a < 3; a++) {
+ q[a] = fabsf(l[a]) - C->ext[a];
+ o += q[a] > 0.f ? q[a] * q[a] : 0.f;
+ mx = fmaxf(mx, q[a]);
+ }
+ return (sqrtf(o) + fminf(mx, 0.f)) * C->smin;
+ }
+ int slot = (int)C->ext[0];
+ if (slot < 0 || slot >= MAXSDF || !s->sdf[slot].d) return 1e30f;
+ const Sdf *S = &s->sdf[slot];
+ int nn[3] = {S->nx, S->ny, S->nz};
+ float out = 0.f, g[3];
+ for (int a = 0; a < 3; a++) {
+ float lo = S->o[a], hi = S->o[a] + (nn[a] - 1) * S->dx;
+ float e = l[a] < lo ? lo - l[a] : (l[a] > hi ? l[a] - hi : 0.f);
+ out += e * e;
+ g[a] = (clampf(l[a], lo, hi) - S->o[a]) / S->dx;
+ }
+ float d = sdf_at(S, g[0], g[1], g[2]);
+ if (out > 0.f) d = fmaxf(d, 0.f) + sqrtf(out); /* outside the baked box: box distance is a lower bound */
+ return d * C->smin;
+}
+
+static void collider_aabb_s(const NvSys *s, const Collider *C, float *lo, float *hi) {
+ if (C->type == 0) {
+ for (int a = 0; a < 3; a++) { lo[a] = -1e30f; hi[a] = 1e30f; }
+ return;
+ }
+ float e0[3], e1[3];
+ if (C->type == 3) {
+ int slot = (int)C->ext[0];
+ const Sdf *S = (slot >= 0 && slot < MAXSDF) ? &s->sdf[slot] : NULL;
+ if (!S || !S->d) {
+ for (int a = 0; a < 3; a++) { lo[a] = 1e30f; hi[a] = -1e30f; }
+ return;
+ }
+ int nn[3] = {S->nx, S->ny, S->nz};
+ for (int a = 0; a < 3; a++) { e0[a] = S->o[a]; e1[a] = S->o[a] + (nn[a] - 1) * S->dx; }
+ } else {
+ float e[3] = {C->ext[0], C->type == 1 ? C->ext[0] : C->ext[1], C->type == 1 ? C->ext[0] : C->ext[2]};
+ for (int a = 0; a < 3; a++) { e0[a] = -e[a]; e1[a] = e[a]; }
+ }
+ for (int a = 0; a < 3; a++) { lo[a] = 1e30f; hi[a] = -1e30f; }
+ for (int n = 0; n < 8; n++) {
+ float p[3] = {(n & 1) ? e1[0] : e0[0], (n & 2) ? e1[1] : e0[1], (n & 4) ? e1[2] : e0[2]}, w[3];
+ xf(C->mi, p, w);
+ for (int a = 0; a < 3; a++) { lo[a] = fminf(lo[a], w[a]); hi[a] = fmaxf(hi[a], w[a]); }
+ }
+}
+
+static void mark_voxelize(NvSys *s, const float *lo, const float *hi) {
+ NvFluid *f = s->fluid;
+ if (!f) return;
+ int n[3] = {f->nx, f->ny, f->nz}, b[6];
+ for (int a = 0; a < 3; a++) {
+ float g0 = (lo[a] - f->o[a]) / f->dx - 1.f, g1 = (hi[a] - f->o[a]) / f->dx + 1.f;
+ g0 = clampf(g0, 0.f, (float)n[a]);
+ g1 = clampf(g1, 0.f, (float)n[a]);
+ b[2 * a] = (int)floorf(g0);
+ b[2 * a + 1] = (int)ceilf(g1);
+ if (b[2 * a + 1] <= b[2 * a]) return; /* outside the domain */
+ }
+ if (!f->vox_pending) {
+ memcpy(f->vox_box, b, sizeof b);
+ } else {
+ for (int a = 0; a < 3; a++) {
+ if (b[2 * a] < f->vox_box[2 * a]) f->vox_box[2 * a] = b[2 * a];
+ if (b[2 * a + 1] > f->vox_box[2 * a + 1]) f->vox_box[2 * a + 1] = b[2 * a + 1];
+ }
+ }
+ f->vox_pending = 1;
+}
+
+/* re-voxelize only the pending box, then flag those tiles so the solver re-types them */
+static void voxelize_pending(NvSys *s) {
+ NvFluid *f = s->fluid;
+ if (!f || !f->vox_pending) return;
+ const int *b = f->vox_box;
+#pragma omp parallel for schedule(static)
+ for (int k = b[4]; k < b[5]; k++)
+ for (int j = b[2]; j < b[3]; j++)
+ for (int i = b[0]; i < b[1]; i++) {
+ float p[3] = {f->o[0] + (i + .5f) * f->dx, f->o[1] + (j + .5f) * f->dx, f->o[2] + (k + .5f) * f->dx};
+ uint8_t sol = 0;
+ for (int c = 0; c < s->ncol && !sol; c++) {
+ float op[3], nn[3];
+ if (collider_test(s, &s->col[c], p, op, nn)) sol = 1;
+ }
+ f->solid[CI(f, i, j, k)] = sol;
+ }
+ tile_mark_range(f, f->t_force, b[0], b[1] - 1, b[2], b[3] - 1, b[4], b[5] - 1);
+ f->vox_pending = 0;
+}
+
+static void hue_rotate(float *c, float ang) {
+ /* rotate rgb around the grey axis (Rodrigues) */
+ float cs = cosf(ang), sn = sinf(ang), k = 0.57735027f;
+ float r = c[0], g = c[1], b = c[2];
+ float dot = (r + g + b) * k * (1.f - cs);
+ float cx = k * (g - b), cy = k * (b - r), cz = k * (r - g); /* k x c */
+ c[0] = fmaxf(0.f, r * cs + cx * sn + k * dot);
+ c[1] = fmaxf(0.f, g * cs + cy * sn + k * dot);
+ c[2] = fmaxf(0.f, b * cs + cz * sn + k * dot);
+}
+
+static void init_particle(const NvSys *s, PB *b, int i, int k, const float *pos, const float *vel,
+ const float *prgb, int gen, uint32_t id) {
+ const float *K = s->kp[k];
+ uint32_t sd = (uint32_t)s->sp[SP_seed] * 2654435761u;
+ b->x[i] = pos[0]; b->y[i] = pos[1]; b->z[i] = pos[2];
+ b->vx[i] = vel[0]; b->vy[i] = vel[1]; b->vz[i] = vel[2];
+ b->age[i] = 0.f;
+ b->life[i] = fmaxf(1e-3f, lerpf(K[KP_life_min], K[KP_life_max], u01(h3(id, sd, 11))));
+ b->temp[i] = K[KP_temp0] + K[KP_temp_var] * (2.f * u01(h3(id, sd, 12)) - 1.f);
+ b->size[i] = fmaxf(0.f, 1.f + K[KP_size_var] * (2.f * u01(h3(id, sd, 13)) - 1.f));
+ float c[3];
+ if (prgb && K[KP_inherit_color] > 0.5f) {
+ c[0] = prgb[0]; c[1] = prgb[1]; c[2] = prgb[2];
+ } else {
+ c[0] = K[KP_c0r]; c[1] = K[KP_c0g]; c[2] = K[KP_c0b];
+ float hr = K[KP_hue_random], cv = K[KP_color_var];
+ if (hr > 0.f) hue_rotate(c, hr * 6.2831853f * u01(h3(id, sd, 14)));
+ if (cv > 0.f) {
+ hue_rotate(c, cv * 1.2f * (2.f * u01(h3(id, sd, 15)) - 1.f));
+ float br = 1.f + cv * (2.f * u01(h3(id, sd, 16)) - 1.f);
+ c[0] *= br; c[1] *= br; c[2] *= br;
+ }
+ }
+ b->cr[i] = c[0]; b->cg[i] = c[1]; b->cb[i] = c[2];
+ b->id[i] = id;
+ b->kind[i] = (uint8_t)k;
+ b->gen[i] = (uint8_t)(gen > 255 ? 255 : gen);
+}
+
+/* Emission from Blender emitters. preage spreads births across the frame (sub-frame accuracy). */
+API int nv_emit(NvSys *s, int kind, int n, const float *pos, const float *vel, const float *preage) {
+ if (kind < 0 || kind >= s->nk || n <= 0) return 0;
+ int room = (int)s->sp[SP_max_particles] - s->p.n;
+ if (room <= 0) return 0;
+ if (n > room) n = room;
+ pb_reserve(&s->p, s->p.n + n);
+ int base = s->p.n;
+ uint32_t id0 = s->next_id;
+ float gx = s->sp[SP_gx] * s->kp[kind][KP_gravity], gy = s->sp[SP_gy] * s->kp[kind][KP_gravity],
+ gz = s->sp[SP_gz] * s->kp[kind][KP_gravity];
+#pragma omp parallel for schedule(static)
+ for (int q = 0; q < n; q++) {
+ float p[3] = {pos[3 * q], pos[3 * q + 1], pos[3 * q + 2]};
+ float v[3] = {vel[3 * q], vel[3 * q + 1], vel[3 * q + 2]};
+ float pa = preage ? preage[q] : 0.f;
+ if (pa > 0.f) {
+ p[0] += v[0] * pa + 0.5f * gx * pa * pa;
+ p[1] += v[1] * pa + 0.5f * gy * pa * pa;
+ p[2] += v[2] * pa + 0.5f * gz * pa * pa;
+ v[0] += gx * pa; v[1] += gy * pa; v[2] += gz * pa;
+ }
+ init_particle(s, &s->p, base + q, kind, p, v, NULL, 0, id0 + (uint32_t)q);
+ s->p.age[base + q] = pa;
+ }
+ s->p.n += n;
+ s->next_id += (uint32_t)n;
+ return n;
+}
+
+static void scratch_reserve(NvSys *s, int n) {
+ if (n <= s->scap) return;
+ int c = n + n / 2 + 1024;
+ s->ev_trail = (uint16_t *)realloc(s->ev_trail, sizeof(uint16_t) * c);
+ s->ev_death = (uint16_t *)realloc(s->ev_death, sizeof(uint16_t) * c);
+ s->ev_split = (uint8_t *)realloc(s->ev_split, c);
+ s->ev_hit = (uint8_t *)realloc(s->ev_hit, c);
+ s->dead = (uint8_t *)realloc(s->dead, c);
+ s->cnt = (uint32_t *)realloc(s->cnt, sizeof(uint32_t) * c);
+ s->off = (uint32_t *)realloc(s->off, sizeof(uint32_t) * (c + 1));
+ s->scap = c;
+}
+
+/* exclusive parallel prefix sum; returns total */
+static uint64_t scan(const uint32_t *in, uint32_t *out, int n) {
+ int nt = omp_get_max_threads();
+ uint64_t part[257] = {0};
+ if (nt > 256) nt = 256;
+#pragma omp parallel num_threads(nt)
+ {
+ int t = omp_get_thread_num(), T = nt;
+ int a = (int)((int64_t)n * t / T), b = (int)((int64_t)n * (t + 1) / T);
+ uint64_t sum = 0;
+ for (int i = a; i < b; i++) sum += in[i];
+ part[t + 1] = sum;
+#pragma omp barrier
+#pragma omp single
+ for (int i = 1; i <= T; i++) part[i] += part[i - 1];
+ uint64_t acc = part[t];
+ for (int i = a; i < b; i++) {
+ out[i] = (uint32_t)acc;
+ acc += in[i];
+ }
+ }
+ return part[nt];
+}
+
+/* burst direction for pattern; returns direction (not necessarily unit; length = speed factor) */
+static void pattern_dir(int pat, int j, int cnt, uint32_t pid, uint32_t sd, const float *pv, float *d) {
+ uint32_t hj = h3(pid, (uint32_t)j, sd ^ 0xB5297A4Du);
+ float jit = 0.06f;
+ switch (pat) {
+ default:
+ case 0: { /* sphere: Fibonacci lattice, randomly rotated per parent (even star spacing like real shells) */
+ float z = 1.f - 2.f * (j + 0.5f) / (float)cnt, r = sqrtf(fmaxf(0.f, 1.f - z * z));
+ float a = j * 2.3999632f;
+ float v[3] = {r * cosf(a), r * sinf(a), z};
+ float ax[3];
+ rand_dir(h3(pid, sd, 0x51), ax);
+ float ang = 6.2831853f * u01(h3(pid, sd, 0x52));
+ float cs = cosf(ang), sn = sinf(ang), dt = ax[0] * v[0] + ax[1] * v[1] + ax[2] * v[2];
+ float cx = ax[1] * v[2] - ax[2] * v[1], cy = ax[2] * v[0] - ax[0] * v[2], cz = ax[0] * v[1] - ax[1] * v[0];
+ d[0] = v[0] * cs + cx * sn + ax[0] * dt * (1 - cs);
+ d[1] = v[1] * cs + cy * sn + ax[1] * dt * (1 - cs);
+ d[2] = v[2] * cs + cz * sn + ax[2] * dt * (1 - cs);
+ break;
+ }
+ case 1: { /* random filled ball (explosion debris) */
+ rand_dir(hj, d);
+ float r = cbrtf(u01(pcg(hj + 7)));
+ d[0] *= r; d[1] *= r; d[2] *= r;
+ jit = 0.f;
+ break;
+ }
+ case 2: { /* ring with a per-shell random tilt */
+ float nrm[3], t[3], b[3];
+ rand_dir(h3(pid, sd, 0x61), nrm);
+ nrm[2] = nrm[2] * 0.6f; /* bias toward rings that read from the ground */
+ float l = sqrtf(nrm[0] * nrm[0] + nrm[1] * nrm[1] + nrm[2] * nrm[2]) + 1e-9f;
+ nrm[0] /= l; nrm[1] /= l; nrm[2] /= l;
+ basis(nrm, t, b);
+ float a = 6.2831853f * (j + 0.5f * u01(hj) * 0.2f) / cnt;
+ for (int k = 0; k < 3; k++) d[k] = t[k] * cosf(a) + b[k] * sinf(a);
+ jit = 0.02f;
+ break;
+ }
+ case 3: { /* palm: few heavy arms over the upper hemisphere */
+ float z = 1.f - (j + 0.5f) / (float)cnt * 1.25f, r = sqrtf(fmaxf(0.f, 1.f - z * z));
+ float a = j * 2.3999632f + 6.2831853f * u01(h3(pid, sd, 0x71));
+ d[0] = r * cosf(a); d[1] = r * sinf(a); d[2] = z;
+ jit = 0.04f;
+ break;
+ }
+ case 4: { /* crossette: four-way cross perpendicular to the parent's motion */
+ float n[3] = {pv[0], pv[1], pv[2]};
+ float l = sqrtf(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);
+ if (l < 1e-5f) { n[0] = 0; n[1] = 0; n[2] = 1; } else { n[0] /= l; n[1] /= l; n[2] /= l; }
+ float t[3], b[3];
+ basis(n, t, b);
+ float a = 1.5707963f * j + 6.2831853f * u01(h3(pid, sd, 0x81));
+ for (int k = 0; k < 3; k++) d[k] = t[k] * cosf(a) + b[k] * sinf(a);
+ jit = 0.03f;
+ break;
+ }
+ case 5: { /* heart in a vertical plane facing a random azimuth */
+ float t = 6.2831853f * (j + 0.5f) / cnt;
+ float st = sinf(t);
+ float hx = 16.f * st * st * st / 17.f;
+ float hy = (13.f * cosf(t) - 5.f * cosf(2 * t) - 2.f * cosf(3 * t) - cosf(4 * t)) / 17.f;
+ float az = 6.2831853f * u01(h3(pid, sd, 0x91));
+ d[0] = hx * cosf(az); d[1] = hx * sinf(az); d[2] = hy;
+ jit = 0.01f;
+ break;
+ }
+ case 6: { /* cone around the parent's velocity */
+ float n[3] = {pv[0], pv[1], pv[2]};
+ float l = sqrtf(n[0] * n[0] + n[1] * n[1] + n[2] * n[2]);
+ if (l < 1e-5f) { n[0] = 0; n[1] = 0; n[2] = 1; } else { n[0] /= l; n[1] /= l; n[2] /= l; }
+ float t[3], b[3];
+ basis(n, t, b);
+ float ca = 1.f - u01(hj) * (1.f - cosf(0.45f)), sa = sqrtf(fmaxf(0.f, 1.f - ca * ca));
+ float a = 6.2831853f * u01(pcg(hj + 3));
+ for (int k = 0; k < 3; k++) d[k] = n[k] * ca + (t[k] * cosf(a) + b[k] * sinf(a)) * sa;
+ jit = 0.f;
+ break;
+ }
+ case 7: { /* upper hemisphere (fountains, splashes) */
+ rand_dir(hj, d);
+ d[2] = fabsf(d[2]);
+ jit = 0.f;
+ break;
+ }
+ }
+ if (jit > 0.f) {
+ float r[3];
+ rand_dir(pcg(hj + 99), r);
+ d[0] += r[0] * jit; d[1] += r[1] * jit; d[2] += r[2] * jit;
+ }
+}
+
+API void nv_sys_set_turb_grid(NvSys *s, int mode) { s->tg_mode = mode; }
+API int nv_sys_turb_grid_used(NvSys *s) { return s->tg_used; }
+
+/* Bake the curl-noise field on a grid over the particles' bounding box, 6 samples per period of the
+ * finest octave (~4% RMS difference from exact evaluation). Worth it only when the grid is much smaller than the particle count: then each
+ * particle pays one trilinear lookup instead of 3 noise evaluations per octave. */
+static int bake_turbulence(NvSys *s, int n, float tfr, float tt, int toct, uint32_t sd) {
+ s->tg_used = 0;
+ if (s->tg_mode < 0 || n <= 0) {
+ s->tg_on = 0;
+ return 0;
+ }
+ const PB *P = &s->p;
+ float lo[3] = {1e30f, 1e30f, 1e30f}, hi[3] = {-1e30f, -1e30f, -1e30f};
+ float lx = 1e30f, ly = 1e30f, lz = 1e30f, hx = -1e30f, hy = -1e30f, hz = -1e30f;
+#pragma omp parallel for reduction(min : lx, ly, lz) reduction(max : hx, hy, hz) schedule(static)
+ for (int i = 0; i < n; i++) {
+ lx = fminf(lx, P->x[i]); ly = fminf(ly, P->y[i]); lz = fminf(lz, P->z[i]);
+ hx = fmaxf(hx, P->x[i]); hy = fmaxf(hy, P->y[i]); hz = fmaxf(hz, P->z[i]);
+ }
+ lo[0] = lx; lo[1] = ly; lo[2] = lz; hi[0] = hx; hi[1] = hy; hi[2] = hz;
+ float h = 1.f / (fmaxf(tfr, 1e-6f) * (float)(1 << (toct - 1)) * 6.f);
+ double G = 1;
+ int nn[3];
+ for (int a = 0; a < 3; a++) {
+ double cells = ceil((hi[a] - lo[a]) / h) + 2;
+ if (cells > 4096) {
+ s->tg_on = 0;
+ return 0;
+ }
+ nn[a] = (int)cells;
+ G *= cells;
+ }
+ /* hysteresis: switch on below N/4, stay on until N/2, so the field never flickers between modes */
+ double limit = s->tg_on ? 0.5 * n : 0.25 * n;
+ if (s->tg_mode == 0 && (G > limit || G > 16e6)) {
+ s->tg_on = 0;
+ return 0;
+ }
+ s->tg_on = 1;
+ size_t need = (size_t)G * 3;
+ if (need > s->tg_cap) {
+ free(s->tg);
+ s->tg = (float *)malloc(need * sizeof(float));
+ s->tg_cap = need;
+ }
+ float *g = s->tg;
+#pragma omp parallel for schedule(static)
+ for (int k = 0; k < nn[2]; k++)
+ for (int j = 0; j < nn[1]; j++)
+ for (int i = 0; i < nn[0]; i++) {
+ float c[3];
+ float X = lo[0] + i * h, Y = lo[1] + j * h, Z = lo[2] + k * h;
+ curl_noise(X * tfr, Y * tfr, Z * tfr, tt, toct, sd, c);
+ size_t o = 3 * ((size_t)i + (size_t)nn[0] * ((size_t)j + (size_t)nn[1] * k));
+ g[o] = c[0]; g[o + 1] = c[1]; g[o + 2] = c[2];
+ }
+ memcpy(s->tg_n, nn, sizeof nn);
+ memcpy(s->tg_o, lo, sizeof lo);
+ s->tg_h = h;
+ s->tg_used = 1;
+ return 1;
+}
+
+static inline void turb_lookup(const NvSys *s, float x, float y, float z, float *c) {
+ float gx = (x - s->tg_o[0]) / s->tg_h, gy = (y - s->tg_o[1]) / s->tg_h, gz = (z - s->tg_o[2]) / s->tg_h;
+ int nx = s->tg_n[0], ny = s->tg_n[1], nz = s->tg_n[2];
+ gx = clampf(gx, 0.f, nx - 1.001f); gy = clampf(gy, 0.f, ny - 1.001f); gz = clampf(gz, 0.f, nz - 1.001f);
+ int i = (int)gx, j = (int)gy, k = (int)gz;
+ float tx = gx - i, ty = gy - j, tz = gz - k;
+ size_t sx = 3, sy = 3 * (size_t)nx, sz = 3 * (size_t)nx * ny;
+ const float *g = s->tg + 3 * ((size_t)i + (size_t)nx * ((size_t)j + (size_t)ny * k));
+ for (int a = 0; a < 3; a++) {
+ const float *q = g + a;
+ float c00 = lerpf(q[0], q[sx], tx), c10 = lerpf(q[sy], q[sy + sx], tx);
+ float c01 = lerpf(q[sz], q[sz + sx], tx), c11 = lerpf(q[sz + sy], q[sz + sy + sx], tx);
+ c[a] = lerpf(lerpf(c00, c10, ty), lerpf(c01, c11, ty), tz);
+ }
+}
+
+API void nv_sys_step(NvSys *s, float dt) {
+ PB *P = &s->p;
+ int n = P->n;
+ scratch_reserve(s, n);
+ const float Ta = s->sp[SP_t_ambient];
+ const float G[3] = {s->sp[SP_gx], s->sp[SP_gy], s->sp[SP_gz]};
+ const float Wd[3] = {s->sp[SP_wx], s->sp[SP_wy], s->sp[SP_wz]};
+ const float tamp = s->sp[SP_turb_amp], tfr = s->sp[SP_turb_freq];
+ const float tt = (float)s->time * s->sp[SP_turb_speed];
+ const int toct = (int)s->sp[SP_turb_octaves] < 1 ? 1 : (int)s->sp[SP_turb_octaves];
+ const uint32_t sd = (uint32_t)s->sp[SP_seed] * 2654435761u;
+ const uint32_t step = s->stepno;
+ NvFluid *fl = s->fluid;
+ const int baked = tamp != 0.f && bake_turbulence(s, n, tfr, tt, toct, sd);
+
+#pragma omp parallel for schedule(static)
+ for (int i = 0; i < n; i++) {
+ const float *K = s->kp[P->kind[i]];
+ float x = P->x[i], y = P->y[i], z = P->z[i], vx = P->vx[i], vy = P->vy[i], vz = P->vz[i];
+ const uint32_t id = P->id[i];
+ float gs = K[KP_gravity];
+ float ax = G[0] * gs, ay = G[1] * gs, az = G[2] * gs;
+ az += K[KP_buoyancy] * (P->temp[i] - Ta) * 0.001f;
+ float airx = Wd[0] * K[KP_wind], airy = Wd[1] * K[KP_wind], airz = Wd[2] * K[KP_wind];
+ float tk = tamp * K[KP_turb];
+ if (tk != 0.f) {
+ float c[3];
+ if (baked) turb_lookup(s, x, y, z, c);
+ else curl_noise(x * tfr, y * tfr, z * tfr, tt, toct, sd, c);
+ ax += c[0] * tk; ay += c[1] * tk; az += c[2] * tk;
+ }
+ float fk = K[KP_force];
+ for (int q = 0; q < s->nfrc && fk != 0.f; q++) {
+ const Force *F = &s->frc[q];
+ float dxp = x - F->pos[0], dyp = y - F->pos[1], dzp = z - F->pos[2];
+ float d2 = dxp * dxp + dyp * dyp + dzp * dzp, d = sqrtf(d2) + 1e-6f;
+ float fall = 1.f;
+ if (F->radius > 0.f) {
+ float q2 = d / F->radius;
+ fall = F->falloff > 0.f ? powf(1.f + q2 * q2, -0.5f * F->falloff) : (q2 < 1.f ? 1.f : 0.f);
+ }
+ float st = F->strength * fall * fk;
+ if (F->type == 0) { /* attract (negative = repel) */
+ ax -= st * dxp / d; ay -= st * dyp / d; az -= st * dzp / d;
+ } else if (F->type == 1) { /* vortex around axis */
+ const float *A = F->axis;
+ float along = dxp * A[0] + dyp * A[1] + dzp * A[2];
+ float rx = dxp - along * A[0], ry = dyp - along * A[1], rz = dzp - along * A[2];
+ float rl = sqrtf(rx * rx + ry * ry + rz * rz) + 1e-6f;
+ float tx = A[1] * rz - A[2] * ry, ty = A[2] * rx - A[0] * rz, tz = A[0] * ry - A[1] * rx;
+ ax += st * tx / rl - 0.25f * st * rx / rl;
+ ay += st * ty / rl - 0.25f * st * ry / rl;
+ az += st * tz / rl - 0.25f * st * rz / rl;
+ } else if (F->type == 2) { /* wind: moves the air, acts through drag */
+ airx += st * F->axis[0]; airy += st * F->axis[1]; airz += st * F->axis[2];
+ } else if (F->type == 3) { /* local turbulence */
+ float c[3], fr = F->freq > 0.f ? F->freq : 1.f;
+ curl_noise(x * fr, y * fr, z * fr, (float)s->time * 0.7f, 2, sd + 101u * q, c);
+ ax += st * c[0]; ay += st * c[1]; az += st * c[2];
+ } else if (F->type == 4) { /* drag field */
+ float e = expf(-st * dt);
+ vx *= e; vy *= e; vz *= e;
+ }
+ }
+ vx += ax * dt; vy += ay * dt; vz += az * dt;
+ float fd = K[KP_fluid_drag];
+ if (fl && fd > 0.f) {
+ float inv = 1.f / fl->dx;
+ float gx = (x - fl->o[0]) * inv, gy = (y - fl->o[1]) * inv, gz = (z - fl->o[2]) * inv;
+ if (gx >= 0.f && gy >= 0.f && gz >= 0.f && gx <= fl->nx && gy <= fl->ny && gz <= fl->nz) {
+ float uf[3];
+ vel_at(fl, fl->u, fl->v, fl->w, gx, gy, gz, uf);
+ float c = 1.f - expf(-fd * dt);
+ vx += (uf[0] - vx) * c; vy += (uf[1] - vy) * c; vz += (uf[2] - vz) * c;
+ }
+ }
+ float dl = K[KP_drag_lin];
+ if (dl > 0.f) {
+ float e = expf(-dl * dt);
+ vx = airx + (vx - airx) * e; vy = airy + (vy - airy) * e; vz = airz + (vz - airz) * e;
+ }
+ float dq = K[KP_drag_quad];
+ if (dq > 0.f) {
+ float rx = vx - airx, ry = vy - airy, rz = vz - airz;
+ float sp = sqrtf(rx * rx + ry * ry + rz * rz);
+ float fct = 1.f / (1.f + dq * sp * dt); /* implicit quadratic drag: unconditionally stable */
+ vx = airx + rx * fct; vy = airy + ry * fct; vz = airz + rz * fct;
+ }
+ const float x0 = x, y0 = y, z0 = z;
+ x += vx * dt; y += vy * dt; z += vz * dt;
+
+ /* collisions */
+ int hit = 0, cm = (int)K[KP_collide];
+ if (cm > 0 && s->ncol) {
+ /* continuous detection: sphere-trace the step against every collider's distance function,
+ * so fast particles cannot tunnel through thin geometry between substeps */
+ float sx = x - x0, sy = y - y0, sz = z - z0;
+ float seg = sqrtf(sx * sx + sy * sy + sz * sz);
+ if (seg > 1e-6f) {
+ float tbest = 2.f;
+ for (int c = 0; c < s->ncol; c++) {
+ float p0[3] = {x0, y0, z0};
+ float d = collider_dist(s, &s->col[c], p0);
+ if (d <= 0.f || d >= seg) continue; /* already inside (handled below), or out of reach */
+ float t = d / seg;
+ for (int it = 0; it < 32 && t < tbest; it++) {
+ float pt[3] = {x0 + sx * t, y0 + sy * t, z0 + sz * t};
+ d = collider_dist(s, &s->col[c], pt);
+ if (d < 1e-4f) {
+ tbest = t;
+ break;
+ }
+ t += d / seg;
+ if (t >= 1.f) break;
+ }
+ }
+ if (tbest <= 1.f) {
+ /* stop just past the surface; the push-out below places it and reflects the velocity */
+ float t = fminf(1.f, tbest + 2e-3f / seg);
+ x = x0 + sx * t; y = y0 + sy * t; z = z0 + sz * t;
+ }
+ }
+ }
+ if (cm > 0) {
+ for (int c = 0; c < s->ncol; c++) {
+ float p[3] = {x, y, z}, op[3], nn[3];
+ if (!collider_test(s, &s->col[c], p, op, nn)) continue;
+ x = op[0] + nn[0] * 1e-4f; y = op[1] + nn[1] * 1e-4f; z = op[2] + nn[2] * 1e-4f;
+ const float *cv = s->col[c].vel;
+ float rx = vx - cv[0], ry = vy - cv[1], rz = vz - cv[2];
+ float vn = rx * nn[0] + ry * nn[1] + rz * nn[2];
+ if (vn < -0.5f) hit = 1; /* a real impact, not a particle resting on the surface */
+ if (vn < 0.f) {
+ float tx = rx - vn * nn[0], ty = ry - vn * nn[1], tz = rz - vn * nn[2];
+ float fr = cm == 3 ? 1.f : K[KP_friction], bo = cm == 3 ? 0.f : K[KP_bounce];
+ rx = tx * (1.f - fr) - bo * vn * nn[0];
+ ry = ty * (1.f - fr) - bo * vn * nn[1];
+ rz = tz * (1.f - fr) - bo * vn * nn[2];
+ vx = rx + cv[0]; vy = ry + cv[1]; vz = rz + cv[2];
+ }
+ }
+ }
+ P->x[i] = x; P->y[i] = y; P->z[i] = z;
+ P->vx[i] = vx; P->vy[i] = vy; P->vz[i] = vz;
+
+ /* temperature: Newton + radiative cooling toward ambient */
+ float T = P->temp[i];
+ T = Ta + (T - Ta) * expf(-K[KP_cool] * dt);
+ float crd = K[KP_cool_rad] * 1e-10f;
+ if (crd > 0.f && T > Ta) T = Ta + (T - Ta) / cbrtf(1.f + 3.f * crd * (T - Ta) * (T - Ta) * (T - Ta) * dt);
+ P->temp[i] = T;
+ float age = P->age[i] + dt;
+ P->age[i] = age;
+
+ /* events */
+ int gen = P->gen[i];
+ uint32_t ec = 0;
+ uint16_t nt = 0, nd = 0;
+ uint8_t ns = 0, nh = 0, dead = 0;
+ if (K[KP_trail_kind] >= 0.f && K[KP_trail_rate] > 0.f && gen < MAXGEN) {
+ float e = K[KP_trail_rate] * dt;
+ int c = (int)e;
+ if (u01(h3(id, step, sd ^ 0x1001u)) < e - c) c++;
+ nt = (uint16_t)(c > 2000 ? 2000 : c);
+ }
+ if (hit) {
+ if (K[KP_hit_kind] >= 0.f && K[KP_hit_count] > 0.f && gen < MAXGEN) {
+ float e = K[KP_hit_count];
+ int c = (int)e;
+ if (u01(h3(id, step, sd ^ 0x2002u)) < e - c) c++;
+ nh = (uint8_t)(c > 255 ? 255 : c);
+ }
+ if (cm == 2) dead = 1;
+ }
+ if (!dead && K[KP_split_kind] >= 0.f && K[KP_split_rate] > 0.f && gen < (int)K[KP_split_max_gen] &&
+ gen < MAXGEN) {
+ float pr = 1.f - expf(-K[KP_split_rate] * dt);
+ if (u01(h3(id, step, sd ^ 0x3003u)) < pr) {
+ dead = 1;
+ int c = (int)K[KP_split_count];
+ ns = (uint8_t)(c < 0 ? 0 : (c > 255 ? 255 : c));
+ }
+ }
+ if (!dead && age >= P->life[i]) {
+ dead = 1;
+ if (K[KP_death_kind] >= 0.f && gen < MAXGEN) {
+ int c = (int)K[KP_death_count];
+ nd = (uint16_t)(c < 0 ? 0 : (c > 4000 ? 4000 : c));
+ }
+ }
+ s->ev_trail[i] = nt; s->ev_hit[i] = nh; s->ev_split[i] = ns; s->ev_death[i] = nd;
+ s->dead[i] = dead;
+ ec = (uint32_t)nt + nh + ns + nd;
+ s->cnt[i] = ec;
+ }
+
+ /* ---- spawn children (deterministic: positions in the queue come from a prefix sum) */
+ uint64_t total = scan(s->cnt, s->off, n);
+ int alive = 0;
+ {
+ int a = 0;
+#pragma omp parallel for reduction(+ : a) schedule(static)
+ for (int i = 0; i < n; i++) a += !s->dead[i];
+ alive = a;
+ }
+ int room = (int)s->sp[SP_max_particles] - alive;
+ if (room < 0) room = 0;
+ int nq = (int)(total < (uint64_t)room ? total : (uint64_t)room);
+ pb_reserve(&s->q, nq);
+ uint32_t id0 = s->next_id;
+ if (nq > 0) {
+#pragma omp parallel for schedule(dynamic, 256)
+ for (int i = 0; i < n; i++) {
+ if (!s->cnt[i]) continue;
+ uint32_t o = s->off[i];
+ if (o >= (uint32_t)nq) continue;
+ const float *K = s->kp[P->kind[i]];
+ const uint32_t pid = P->id[i];
+ float pos[3] = {P->x[i], P->y[i], P->z[i]}, pv[3] = {P->vx[i], P->vy[i], P->vz[i]};
+ float rgb[3] = {P->cr[i], P->cg[i], P->cb[i]};
+ int gen = P->gen[i] + 1;
+ float sp = sqrtf(pv[0] * pv[0] + pv[1] * pv[1] + pv[2] * pv[2]);
+ (void)sp;
+ int nt = s->ev_trail[i], nh = s->ev_hit[i], ns = s->ev_split[i], nd = s->ev_death[i];
+ for (int j = 0; j < nt && o < (uint32_t)nq; j++, o++) {
+ uint32_t h = h3(pid, step * 4099u + j, sd ^ 0xA1u);
+ float t = (j + u01(h)) / (float)nt;
+ float cp[3], cv[3], r[3];
+ rand_dir(pcg(h + 1), r);
+ float jt = K[KP_trail_jitter], inh = K[KP_trail_inherit];
+ for (int k = 0; k < 3; k++) {
+ cp[k] = pos[k] - pv[k] * dt * (1.f - t);
+ cv[k] = pv[k] * inh + r[k] * jt;
+ }
+ init_particle(s, &s->q, (int)o, (int)K[KP_trail_kind], cp, cv, rgb, gen, id0 + o);
+ s->q.age[o] = dt * (1.f - t); /* trail births are spread along the segment */
+ }
+ for (int j = 0; j < nh && o < (uint32_t)nq; j++, o++) {
+ uint32_t h = h3(pid, step * 4099u + j, sd ^ 0xB2u);
+ float r[3], cv[3];
+ rand_dir(h, r);
+ if (r[0] * pv[0] + r[1] * pv[1] + r[2] * pv[2] < 0.f) { r[0] = -r[0]; r[1] = -r[1]; r[2] = -r[2]; }
+ float spd = K[KP_hit_speed] * (0.4f + 0.6f * u01(pcg(h + 5)));
+ for (int k = 0; k < 3; k++) cv[k] = pv[k] * 0.5f + r[k] * spd;
+ init_particle(s, &s->q, (int)o, (int)K[KP_hit_kind], pos, cv, rgb, gen, id0 + o);
+ }
+ for (int j = 0; j < ns && o < (uint32_t)nq; j++, o++) {
+ uint32_t h = h3(pid, step * 4099u + j, sd ^ 0xC3u);
+ float r[3], cv[3];
+ rand_dir(h, r);
+ float spd = K[KP_split_speed] * (0.5f + u01(pcg(h + 5)));
+ for (int k = 0; k < 3; k++) cv[k] = pv[k] * K[KP_split_inherit] + r[k] * spd;
+ init_particle(s, &s->q, (int)o, (int)K[KP_split_kind], pos, cv, rgb, gen, id0 + o);
+ }
+ for (int j = 0; j < nd && o < (uint32_t)nq; j++, o++) {
+ float d[3], cv[3];
+ pattern_dir((int)K[KP_death_pattern], j, nd, pid, sd, pv, d);
+ uint32_t h = h3(pid, (uint32_t)j, sd ^ 0xD4u);
+ float spd = K[KP_death_speed] * (1.f + K[KP_death_speed_var] * (2.f * u01(h) - 1.f));
+ for (int k = 0; k < 3; k++) cv[k] = pv[k] * K[KP_death_inherit] + d[k] * spd;
+ init_particle(s, &s->q, (int)o, (int)K[KP_death_kind], pos, cv, rgb, gen, id0 + o);
+ }
+ }
+ }
+ s->q.n = nq;
+ s->next_id += (uint32_t)nq;
+
+ /* ---- particle -> fluid deposits (smoke trails, heat, fuel) */
+ if (fl) {
+ int m = 0;
+ for (int k = 0; k < s->nk; k++)
+ if (s->kp[k][KP_fl_smoke] > 0.f || s->kp[k][KP_fl_heat] > 0.f || s->kp[k][KP_fl_fuel] > 0.f) m = 1;
+ if (m) {
+ if (s->dep_cap < n) {
+ s->dep_cap = n + n / 2;
+ s->dep_pos = (float *)realloc(s->dep_pos, sizeof(float) * 3 * s->dep_cap);
+ s->dep_amt = (float *)realloc(s->dep_amt, sizeof(float) * 3 * s->dep_cap);
+ }
+#pragma omp parallel for schedule(static)
+ for (int i = 0; i < n; i++) {
+ const float *K = s->kp[P->kind[i]];
+ s->cnt[i] = K[KP_fl_smoke] > 0.f || K[KP_fl_heat] > 0.f || K[KP_fl_fuel] > 0.f;
+ }
+ int c = (int)scan(s->cnt, s->off, n);
+#pragma omp parallel for schedule(static)
+ for (int i = 0; i < n; i++) {
+ if (!s->cnt[i]) continue;
+ const float *K = s->kp[P->kind[i]];
+ size_t o = s->off[i];
+ float fade = 1.f - smooth01(P->age[i] / P->life[i]);
+ s->dep_pos[3 * o] = P->x[i]; s->dep_pos[3 * o + 1] = P->y[i]; s->dep_pos[3 * o + 2] = P->z[i];
+ s->dep_amt[3 * o] = K[KP_fl_smoke] * dt * fade;
+ s->dep_amt[3 * o + 1] = K[KP_fl_heat] * dt * fade;
+ s->dep_amt[3 * o + 2] = K[KP_fl_fuel] * dt * fade;
+ }
+ fluid_deposit(fl, c, s->dep_pos, s->dep_amt);
+ }
+ }
+
+ /* ---- remove the dead and append the children.
+ * Nothing died (long-lived systems): append in place, no copy of the survivors at all.
+ * Otherwise: stable parallel compaction into the alternate buffer, then swap. */
+ PB *Q = &s->q;
+ if (alive == n) {
+ if (Q->n > 0) {
+ pb_reserve(P, n + Q->n);
+ pb_append(P, n, Q);
+ P->n = n + Q->n;
+ }
+ } else {
+#pragma omp parallel for schedule(static)
+ for (int i = 0; i < n; i++) s->cnt[i] = !s->dead[i];
+ int nalive = (int)scan(s->cnt, s->off, n);
+ PB *A = &s->alt;
+ A->n = 0;
+ pb_reserve(A, nalive + Q->n);
+#pragma omp parallel for schedule(static)
+ for (int i = 0; i < n; i++)
+ if (!s->dead[i]) pb_copy(A, (int)s->off[i], P, i);
+ if (Q->n > 0) pb_append(A, nalive, Q);
+ A->n = nalive + Q->n;
+ PB tmp = *P;
+ *P = *A;
+ *A = tmp;
+ }
+ Q->n = 0;
+ s->stepno++;
+ s->time += dt;
+}
+
+/* One frame: interleaves fluid and particle substeps. */
+API void nv_frame(NvSys *s, NvFluid *f, float dt, int psub) {
+ ftz();
+ double t0 = now_ms();
+ if (psub < 1) psub = 1;
+ int fsub = 0;
+ if (f) {
+ if (s && s->fluid != f) nv_sys_set_fluid(s, f);
+ if (s) voxelize_pending(s);
+ f->maxvel = max_speed(f);
+ fsub = (int)ceilf(f->maxvel * dt / (f->fp[FP_cfl] * f->dx));
+ fsub = fsub < 1 ? 1 : (fsub > (int)f->fp[FP_max_sub] ? (int)f->fp[FP_max_sub] : fsub);
+ }
+ int n = psub > fsub ? psub : fsub;
+ float h = dt / n;
+ int couple = 0;
+ for (int k = 0; s && k < s->nk; k++) couple |= s->kp[k][KP_fluid_drag] > 0.f;
+ double fms = 0;
+ for (int i = 0; i < n; i++) {
+ if (f && (i * fsub) / n != ((i + 1) * fsub) / n) {
+ /* fluid steps spread evenly among particle substeps */
+ double a = now_ms();
+ fluid_substep(f, dt / fsub);
+ if (f->gpu && s && couple) /* particles riding the flow read the CPU copy of the velocity */
+ gpuf_download_velocity(f->gpu, f->u, f->v, f->w);
+ fms += now_ms() - a;
+ }
+ if (s) nv_sys_step(s, h);
+ }
+ if (f) f->ms = fms;
+ if (s) s->ms = now_ms() - t0 - fms;
+}
+
+/* stats: [count, particle_ms, fluid_ms, cg_iters, cg_res, maxvel, active_tile_fraction, cells] */
+API void nv_stats(NvSys *s, NvFluid *f, float *o) {
+ o[6] = f && f->nt ? (float)f->n_prs / f->nt : 0.f;
+ o[7] = f ? (float)f->nc : 0.f;
+ o[0] = s ? (float)s->p.n : 0.f;
+ o[1] = s ? (float)s->ms : 0.f;
+ o[2] = f ? (float)f->ms : 0.f;
+ o[3] = f ? (float)f->last_iters : 0.f;
+ o[4] = f ? f->last_res : 0.f;
+ if (f && f->gpu) {
+ int it;
+ float res;
+ double ms;
+ gpuf_stats(f->gpu, &it, &res, &ms);
+ o[3] = (float)it;
+ o[4] = res;
+ }
+ o[5] = f ? f->maxvel : 0.f;
+}
+
+/* ============================================================ render attributes / cache */
+
+static inline void render_attrs(const NvSys *s, int i, float *col, float *rad, float *em, float *an_out) {
+ const PB *P = &s->p;
+ const float *K = s->kp[P->kind[i]];
+ float an = clampf(P->age[i] / P->life[i], 0.f, 1.f);
+ *an_out = an;
+ float sc = K[KP_size_curve] > 0.f ? powf(an, K[KP_size_curve]) : an;
+ *rad = P->size[i] * lerpf(K[KP_size_start], K[KP_size_end], sc);
+ uint32_t h = pcg(P->id[i] * 2246822519u + 3u);
+ float e = K[KP_emit] * (1.f + K[KP_emit_var] * (2.f * u01(h) - 1.f));
+ float fi = K[KP_fade_in], fo = K[KP_fade_out];
+ if (fi > 0.f) e *= smooth01(an / fi);
+ if (fo > 0.f) e *= 1.f - smooth01((an - (1.f - fo)) / fo);
+ if (K[KP_twinkle_amt] > 0.f && K[KP_twinkle_freq] > 0.f) {
+ float ph = u01(pcg(h + 17u));
+ float fr = K[KP_twinkle_freq] * (0.75f + 0.5f * u01(pcg(h + 29u)));
+ float t = P->age[i] * fr + ph;
+ float on = (t - floorf(t)) < 0.3f ? 1.f : 0.f;
+ e *= 1.f - K[KP_twinkle_amt] * (1.f - on) ;
+ }
+ int cm = (int)K[KP_color_mode];
+ if (cm == 2) {
+ float T = P->temp[i];
+ bb_color(T, col);
+ float r = T / fmaxf(1.f, K[KP_temp0]);
+ e *= r * r * r * r; /* Stefan–Boltzmann: radiant exitance ~ T^4 */
+ } else if (cm == 1) {
+ float t = K[KP_color_curve] > 0.f ? powf(an, K[KP_color_curve]) : an;
+ col[0] = lerpf(P->cr[i], K[KP_c1r], t);
+ col[1] = lerpf(P->cg[i], K[KP_c1g], t);
+ col[2] = lerpf(P->cb[i], K[KP_c1b], t);
+ } else {
+ col[0] = P->cr[i]; col[1] = P->cg[i]; col[2] = P->cb[i];
+ }
+ *em = e;
+}
+
+/* Cache layout (little endian):
+ * "NVP1" u32 n f32 time u32 0
+ * P f32[3n] | V f16[3n] | Cd f16[3n] | radius f16[n] | emit f16[n] | age f16[n] | id u32[n] | kind u8[n]
+ */
+API int nv_sys_write(NvSys *s, const char *path) {
+ int n = s->p.n;
+ size_t sz = 16 + (size_t)n * (12 + 6 + 6 + 2 + 2 + 2 + 4 + 1);
+ uint8_t *buf = (uint8_t *)malloc(sz);
+ if (!buf) return -1;
+ memcpy(buf, "NVP1", 4);
+ uint32_t un = (uint32_t)n;
+ float tm = (float)s->time;
+ uint32_t z = 0;
+ memcpy(buf + 4, &un, 4);
+ memcpy(buf + 8, &tm, 4);
+ memcpy(buf + 12, &z, 4);
+ float *Pp = (float *)(buf + 16);
+ _Float16 *V = (_Float16 *)(Pp + 3 * (size_t)n);
+ _Float16 *C = V + 3 * (size_t)n;
+ _Float16 *R = C + 3 * (size_t)n;
+ _Float16 *E = R + n;
+ _Float16 *A = E + n;
+ uint8_t *idb = (uint8_t *)(A + n);
+ uint8_t *kb = idb + 4 * (size_t)n;
+ const PB *P = &s->p;
+#pragma omp parallel for schedule(static)
+ for (int i = 0; i < n; i++) {
+ Pp[3 * i] = P->x[i]; Pp[3 * i + 1] = P->y[i]; Pp[3 * i + 2] = P->z[i];
+ V[3 * i] = (_Float16)P->vx[i]; V[3 * i + 1] = (_Float16)P->vy[i]; V[3 * i + 2] = (_Float16)P->vz[i];
+ float col[3], rad, em, an;
+ render_attrs(s, i, col, &rad, &em, &an);
+ C[3 * i] = (_Float16)col[0]; C[3 * i + 1] = (_Float16)col[1]; C[3 * i + 2] = (_Float16)col[2];
+ R[i] = (_Float16)rad;
+ E[i] = (_Float16)fminf(em, 60000.f);
+ A[i] = (_Float16)an;
+ memcpy(idb + 4 * (size_t)i, &P->id[i], 4);
+ kb[i] = P->kind[i];
+ }
+ FILE *fp = fopen(path, "wb");
+ if (!fp) {
+ free(buf);
+ return -2;
+ }
+ size_t w = fwrite(buf, 1, sz, fp);
+ fclose(fp);
+ free(buf);
+ return w == sz ? n : -3;
+}
+
+/* direct export for tests / live use: P (3n), C (3n), R (n), E (n) */
+API int nv_sys_export(NvSys *s, float *P3, float *V3, float *C3, float *R, float *E) {
+ int n = s->p.n;
+ const PB *P = &s->p;
+#pragma omp parallel for schedule(static)
+ for (int i = 0; i < n; i++) {
+ if (P3) { P3[3 * i] = P->x[i]; P3[3 * i + 1] = P->y[i]; P3[3 * i + 2] = P->z[i]; }
+ if (V3) { V3[3 * i] = P->vx[i]; V3[3 * i + 1] = P->vy[i]; V3[3 * i + 2] = P->vz[i]; }
+ float col[3], rad, em, an;
+ render_attrs(s, i, col, &rad, &em, &an);
+ if (C3) { C3[3 * i] = col[0]; C3[3 * i + 1] = col[1]; C3[3 * i + 2] = col[2]; }
+ if (R) R[i] = rad;
+ if (E) E[i] = em;
+ }
+ return n;
+}
diff --git a/vendor/nova-fx/core/nova_params.h b/vendor/nova-fx/core/nova_params.h
new file mode 100644
index 0000000..89f13b7
--- /dev/null
+++ b/vendor/nova-fx/core/nova_params.h
@@ -0,0 +1,43 @@
+/* Parameter tables shared by the CPU core and the GPU backend (X-macros). */
+#pragma once
+
+/* Per particle-type ("kind") parameters. */
+#define KIND_PARAMS(X) \
+ X(life_min, 1.0) X(life_max, 2.0) \
+ X(gravity, 1.0) X(drag_lin, 0.0) X(drag_quad, 0.0) X(buoyancy, 0.0) X(turb, 1.0) \
+ X(fluid_drag, 0.0) X(wind, 1.0) X(force, 1.0) \
+ X(size_start, 0.02) X(size_end, 0.01) X(size_var, 0.2) X(size_curve, 1.0) \
+ X(color_mode, 0) X(c0r, 1.0) X(c0g, 0.6) X(c0b, 0.2) X(c1r, 1.0) X(c1g, 0.2) \
+ X(c1b, 0.05) X(color_var, 0.1) X(color_curve, 1.0) X(hue_random, 0.0) \
+ X(inherit_color, 0) \
+ X(temp0, 2200) X(temp_var, 200) X(cool, 0.5) X(cool_rad, 0.0) \
+ X(emit, 10) X(emit_var, 0.2) X(fade_in, 0.02) X(fade_out, 0.3) \
+ X(twinkle_freq, 0) X(twinkle_amt, 0) \
+ X(collide, 1) X(bounce, 0.3) X(friction, 0.2) \
+ X(death_kind, -1) X(death_count, 0) X(death_pattern, 0) X(death_speed, 10) \
+ X(death_speed_var, 0.15) X(death_inherit, 0.3) \
+ X(trail_kind, -1) X(trail_rate, 0) X(trail_inherit, 0.2) X(trail_jitter, 0.3) \
+ X(split_kind, -1) X(split_rate, 0) X(split_count, 3) X(split_speed, 3) \
+ X(split_inherit, 0.7) X(split_max_gen, 3) \
+ X(hit_kind, -1) X(hit_count, 0) X(hit_speed, 2) \
+ X(fl_smoke, 0) X(fl_heat, 0) X(fl_fuel, 0)
+
+/* Global particle-system parameters. */
+#define SYS_PARAMS(X) \
+ X(gx, 0) X(gy, 0) X(gz, -9.81) X(wx, 0) X(wy, 0) X(wz, 0) \
+ X(turb_amp, 0) X(turb_freq, 0.5) X(turb_speed, 0.5) X(turb_octaves, 2) \
+ X(max_particles, 2000000) X(seed, 0) X(t_ambient, 293)
+
+/* Fluid solver parameters. Temperature is in "kilo-kelvin above ambient". */
+#define FLUID_PARAMS(X) \
+ X(buoy_heat, 2.0) X(buoy_smoke, 0.3) X(vorticity, 0.35) X(cool, 0.4) X(cool_rad, 0.08) \
+ X(smoke_decay, 0.02) X(vel_decay, 0.0) X(fuel_decay, 0.0) \
+ X(ignite, 0.25) X(burn_rate, 2.0) X(heat_release, 1.5) X(smoke_yield, 0.6) \
+ X(expansion, 1.0) X(flame_decay, 8.0) \
+ X(turb_amp, 0.0) X(turb_freq, 1.0) X(turb_speed, 0.5) \
+ X(wind_x, 0) X(wind_y, 0) X(wind_z, 0) X(wind_drag, 0) \
+ X(cfl, 2.5) X(max_sub, 4) X(cg_tol, 1e-3) X(cg_iter, 60) \
+ X(maccormack, 1) X(reflect, 1) X(closed_floor, 1) X(seed, 0) X(sparse, 1)
+
+#define NV_E_F(n, d) FP_##n,
+enum { FLUID_PARAMS(NV_E_F) FP_COUNT };
diff --git a/vendor/nova-fx/core/shaders/adv_face.comp b/vendor/nova-fx/core/shaders/adv_face.comp
new file mode 100644
index 0000000..0d73671
--- /dev/null
+++ b/vendor/nova-fx/core/shaders/adv_face.comp
@@ -0,0 +1,32 @@
+#version 450
+// MacCormack advection of one face component. n.w = op | comp << 4.
+// o0 = (U, V, W, src), o1 = (dst, hat, mn, mx), f0.x = dt/dx.
+// op 0: hat/min/max, op 1: correction into dst. (op 2: plain SL into dst, for maccormack off)
+layout(local_size_x = 8, local_size_y = 8, local_size_z = 4) in;
+#include "common.glsl"
+void main() {
+ int op = pc.n.w & 15, comp = pc.n.w >> 4;
+ ivec3 s = pc.n.xyz + ivec3(comp == 0 ? 1 : 0, comp == 1 ? 1 : 0, comp == 2 ? 1 : 0);
+ ivec3 g = ivec3(gl_GlobalInvocationID);
+ if (any(greaterThanEqual(g, s))) return;
+ vec3 o = vec3(comp == 0 ? 0.0 : 0.5, comp == 1 ? 0.0 : 0.5, comp == 2 ? 0.0 : 0.5);
+ uint c = uint(g.x + s.x * (g.y + s.y * g.z));
+ vec3 p = vec3(g) + o;
+ uint U = pc.o0.x, V = pc.o0.y, W = pc.o0.z, SRC = pc.o0.w, DST = pc.o1.x, HAT = pc.o1.y, MN = pc.o1.z, MX = pc.o1.w;
+ if (op == 0 || op == 2) {
+ vec3 b = trace(U, V, W, p, pc.f0.x) - o;
+ float lo, hi;
+ float v = samp_clamp_mm(SRC, s, b, lo, hi);
+ if (op == 2) { F[DST + c] = v; return; }
+ if (any(lessThan(b, vec3(0.0))) || any(greaterThan(b, vec3(s - 1)))) { lo = 1e30; hi = -1e30; } // trace left the grid: SL
+ F[HAT + c] = v; F[MN + c] = lo; F[MX + c] = hi;
+ } else {
+ vec3 fw = trace(U, V, W, p, -pc.f0.x) - o;
+ float lo, hi;
+ float til = samp_clamp_mm(HAT, s, fw, lo, hi);
+ float hat = F[HAT + c];
+ float val = hat + 0.5 * (F[SRC + c] - til);
+ bool off = any(lessThan(fw, vec3(0.0))) || any(greaterThan(fw, vec3(s - 1)));
+ F[DST + c] = (off || val < F[MN + c] || val > F[MX + c]) ? hat : val;
+ }
+}
diff --git a/vendor/nova-fx/core/shaders/adv_scalars.comp b/vendor/nova-fx/core/shaders/adv_scalars.comp
new file mode 100644
index 0000000..c649c21
--- /dev/null
+++ b/vendor/nova-fx/core/shaders/adv_scalars.comp
@@ -0,0 +1,35 @@
+#version 450
+// MacCormack advection of the 4 scalars (density, heat, fuel, flame), traces computed once.
+// o0 = (U, V, W, scalars[4 consecutive]), o1.x = tmp (hat[4], mn[4], mx[4] consecutive), f0.x = dt/dx
+// op 0: back-trace + hat/min/max, op 1: forward-trace correction, written back in place,
+// op 2: no correction (MacCormack off): copy hat back.
+layout(local_size_x = 8, local_size_y = 8, local_size_z = 4) in;
+#include "common.glsl"
+void main() {
+ ivec3 g = ivec3(gl_GlobalInvocationID);
+ if (any(greaterThanEqual(g, pc.n.xyz))) return;
+ uint nc = uint(pc.n.x * pc.n.y * pc.n.z), c = cidx(g.x, g.y, g.z);
+ vec3 p = vec3(g) + 0.5;
+ uint U = pc.o0.x, V = pc.o0.y, W = pc.o0.z, SC = pc.o0.w, T = pc.o1.x;
+ if (pc.n.w == 0) {
+ vec3 b = trace(U, V, W, p, pc.f0.x) - 0.5;
+ for (uint q = 0u; q < 4u; q++) {
+ float lo, hi;
+ F[T + q * nc + c] = samp_zero_mm(SC + q * nc, pc.n.xyz, b, lo, hi);
+ F[T + (4u + q) * nc + c] = lo;
+ F[T + (8u + q) * nc + c] = hi;
+ }
+ } else if (pc.n.w == 2) {
+ for (uint q = 0u; q < 4u; q++) F[SC + q * nc + c] = max(F[T + q * nc + c], 0.0);
+ } else {
+ vec3 fw = trace(U, V, W, p, -pc.f0.x) - 0.5;
+ for (uint q = 0u; q < 4u; q++) {
+ float lo, hi;
+ float til = samp_zero_mm(T + q * nc, pc.n.xyz, fw, lo, hi);
+ float hat = F[T + q * nc + c];
+ float val = hat + 0.5 * (F[SC + q * nc + c] - til);
+ val = (val < F[T + (4u + q) * nc + c] || val > F[T + (8u + q) * nc + c]) ? hat : val;
+ F[SC + q * nc + c] = max(val, 0.0);
+ }
+ }
+}
diff --git a/vendor/nova-fx/core/shaders/cg.comp b/vendor/nova-fx/core/shaders/cg.comp
new file mode 100644
index 0000000..f8611b6
--- /dev/null
+++ b/vendor/nova-fx/core/shaders/cg.comp
@@ -0,0 +1,91 @@
+#version 450
+// Conjugate-gradient vector ops on level 0 (n = cell count in n.x). Partials -> R[o2.x + workgroup].
+// 0 q = A p, partial sum(p.q) o0 = (p, q, -, stencil), n.y = nx, n.z = ny
+// 1 x += a p, r -= a q, partial max|r| o0 = (x, p, r, q), a = R[o1.y] / R[o1.z] (rz / pq)
+// 2 partial sum(r.z) o0 = (r, z, -, -)
+// 3 p = z + b p o0 = (p, z, -, -), b = R[o1.y] / R[o1.z] (rz_new / rz_old)
+// 4 r = b - A x (inactive: x=r=0), partial max|r|, partial max|b| o0 = (x, b, r, stencil), n.y,n.z dims
+// 5 reduce R[o1.x .. +o1.y) -> R[o1.z] (sum if o1.w == 0 else max), single workgroup
+// 6 x = 0 where inactive, partial max|b| o0 = (x, b, -, stencil)
+layout(local_size_x = 256) in;
+#include "common.glsl"
+shared float red[256];
+shared float red2[256];
+float Ax(uint X, uint st, uint c, int nx, int ny) {
+ uint w = S[st + c];
+ uint dg = w & 255u, m = w >> 8;
+ if (dg == 0u) return 0.0;
+ uint sy = uint(nx), sz = uint(nx * ny);
+ float s = float(dg) * F[X + c];
+ if ((m & 1u) != 0u) s -= F[X + c - 1u];
+ if ((m & 2u) != 0u) s -= F[X + c + 1u];
+ if ((m & 4u) != 0u) s -= F[X + c - sy];
+ if ((m & 8u) != 0u) s -= F[X + c + sy];
+ if ((m & 16u) != 0u) s -= F[X + c - sz];
+ if ((m & 32u) != 0u) s -= F[X + c + sz];
+ return s;
+}
+void main() {
+ int op = pc.n.w;
+ uint l = gl_LocalInvocationIndex;
+ if (op == 5) {
+ float acc = pc.o1.w == 0u ? 0.0 : 0.0;
+ for (uint i = l; i < pc.o1.y; i += 256u) {
+ float v = R[pc.o1.x + i];
+ acc = pc.o1.w == 0u ? acc + v : max(acc, v);
+ }
+ red[l] = acc;
+ barrier();
+ for (uint s = 128u; s > 0u; s >>= 1) {
+ if (l < s) red[l] = pc.o1.w == 0u ? red[l] + red[l + s] : max(red[l], red[l + s]);
+ barrier();
+ }
+ if (l == 0u) R[pc.o1.z] = red[0];
+ return;
+ }
+ uint c = gl_GlobalInvocationID.x, n = uint(pc.n.x);
+ float v = 0.0, v2 = 0.0;
+ if (c < n) {
+ if (op == 0) {
+ float q = Ax(pc.o0.x, pc.o0.w, c, pc.n.y, pc.n.z);
+ F[pc.o0.y + c] = q;
+ v = F[pc.o0.x + c] * q;
+ } else if (op == 1) {
+ float den = R[pc.o1.z];
+ float a = den != 0.0 ? R[pc.o1.y] / den : 0.0;
+ F[pc.o0.x + c] += a * F[pc.o0.y + c];
+ float r = F[pc.o0.z + c] - a * F[pc.o0.w + c];
+ F[pc.o0.z + c] = r;
+ v = abs(r);
+ } else if (op == 2) {
+ v = F[pc.o0.x + c] * F[pc.o0.y + c];
+ } else if (op == 3) {
+ float den = R[pc.o1.z];
+ float b = den != 0.0 ? R[pc.o1.y] / den : 0.0;
+ F[pc.o0.x + c] = F[pc.o0.y + c] + b * F[pc.o0.x + c];
+ } else if (op == 4) {
+ bool act = (S[pc.o0.w + c] & 255u) != 0u;
+ if (!act) F[pc.o0.x + c] = 0.0;
+ float r = act ? F[pc.o0.y + c] - Ax(pc.o0.x, pc.o0.w, c, pc.n.y, pc.n.z) : 0.0;
+ F[pc.o0.z + c] = r;
+ v = abs(r);
+ v2 = abs(F[pc.o0.y + c]);
+ }
+ }
+ if (op == 3) return;
+ red[l] = v;
+ red2[l] = v2;
+ barrier();
+ bool is_max = op == 1 || op == 4;
+ for (uint s = 128u; s > 0u; s >>= 1) {
+ if (l < s) {
+ red[l] = is_max ? max(red[l], red[l + s]) : red[l] + red[l + s];
+ red2[l] = max(red2[l], red2[l + s]);
+ }
+ barrier();
+ }
+ if (l == 0u) {
+ R[pc.o2.x + gl_WorkGroupID.x] = red[0];
+ if (op == 4) R[pc.o2.y + gl_WorkGroupID.x] = red2[0];
+ }
+}
diff --git a/vendor/nova-fx/core/shaders/combust.comp b/vendor/nova-fx/core/shaders/combust.comp
new file mode 100644
index 0000000..395024f
--- /dev/null
+++ b/vendor/nova-fx/core/shaders/combust.comp
@@ -0,0 +1,31 @@
+#version 450
+// Combustion + cooling + dissipation per cell (mirrors combust() in nova_core.c).
+// o0 = (density, heat, fuel, flame), o1.x = expn
+// f0 = (ignite, burn_rate, heat_release, smoke_yield), f1 = (expansion, exp(-cool dt), cool_rad, exp(-smoke_decay dt))
+// f2 = (exp(-fuel_decay dt), exp(-flame_decay dt), dt, 0)
+layout(local_size_x = 256) in;
+#include "common.glsl"
+void main() {
+ uint c = gl_GlobalInvocationID.x;
+ if (c >= uint(pc.n.x * pc.n.y * pc.n.z)) return;
+ float fu = F[pc.o0.z + c], T = F[pc.o0.y + c], d = F[pc.o0.x + c];
+ float ign = pc.f0.x, br = pc.f0.y, hr = pc.f0.z, sy = pc.f0.w, ex = pc.f1.x, ec = pc.f1.y, cr = pc.f1.z;
+ float dt = pc.f2.z;
+ float burned = 0.0;
+ if (fu > 0.0 && T > ign) {
+ float rate = br * min(4.0, 0.5 + (T - ign) * 2.0);
+ burned = min(fu, rate * dt);
+ fu -= burned;
+ T += hr * burned;
+ d += sy * burned;
+ }
+ F[pc.o1.x + c] = min(ex * burned / dt, 0.4 / dt);
+ float inten = br > 0.0 ? burned / (br * dt) : 0.0;
+ float fl = F[pc.o0.w + c] * pc.f2.y;
+ F[pc.o0.w + c] = inten > fl ? min(inten, 4.0) : fl;
+ T *= ec;
+ if (cr > 0.0 && T > 0.0) T = T / pow(1.0 + 3.0 * cr * T * T * T * dt, 1.0 / 3.0);
+ F[pc.o0.y + c] = T;
+ F[pc.o0.x + c] = d * pc.f1.w;
+ F[pc.o0.z + c] = fu * pc.f2.x;
+}
diff --git a/vendor/nova-fx/core/shaders/common.glsl b/vendor/nova-fx/core/shaders/common.glsl
new file mode 100644
index 0000000..89429e5
--- /dev/null
+++ b/vendor/nova-fx/core/shaders/common.glsl
@@ -0,0 +1,88 @@
+// Shared layout for every Nova FX compute kernel: one descriptor set, fields addressed by offset.
+layout(std430, binding = 0) buffer BF { float F[]; }; // all float grids (offsets in push constants)
+layout(std430, binding = 1) buffer BFU { uint FU[]; }; // same memory as F, viewed as uint (atomics)
+layout(std430, binding = 2) buffer BS { uint S[]; }; // stencils (diag | nb<<8), solid flags, buckets
+layout(std430, binding = 3) buffer BR { float R[]; }; // reduction partials and results (host visible)
+layout(std430, binding = 4) readonly buffer BP { float PTS[]; }; // source points / deposits
+layout(std430, binding = 5) readonly buffer BPI { uint PIDX[]; }; // per-tile point ranges
+
+layout(push_constant) uniform PC {
+ ivec4 n; // nx, ny, nz, op
+ uvec4 o0; // offsets
+ uvec4 o1;
+ uvec4 o2;
+ vec4 f0; // floats
+ vec4 f1;
+ vec4 f2;
+} pc;
+
+uint cidx(int i, int j, int k) { return uint(i + pc.n.x * (j + pc.n.y * k)); }
+uint uidx(int i, int j, int k) { return uint(i + (pc.n.x + 1) * (j + pc.n.y * k)); }
+uint vidx(int i, int j, int k) { return uint(i + pc.n.x * (j + (pc.n.y + 1) * k)); }
+uint widx(int i, int j, int k) { return uint(i + pc.n.x * (j + pc.n.y * k)); }
+
+// clamp-to-edge trilinear sample of a grid stored at F[off] with dims s
+float samp_clamp(uint off, ivec3 s, vec3 p) {
+ p = clamp(p, vec3(0.0), vec3(s - 1));
+ ivec3 b = ivec3(floor(p));
+ vec3 t = p - vec3(b);
+ float v[8];
+ for (int q = 0; q < 8; q++) {
+ ivec3 c = clamp(b + ivec3(q & 1, (q >> 1) & 1, (q >> 2) & 1), ivec3(0), s - 1);
+ v[q] = F[off + uint(c.x + s.x * (c.y + s.y * c.z))];
+ }
+ return mix(mix(mix(v[0], v[1], t.x), mix(v[2], v[3], t.x), t.y),
+ mix(mix(v[4], v[5], t.x), mix(v[6], v[7], t.x), t.y), t.z);
+}
+
+// zero-outside trilinear sample with min/max of the 8 corners
+float samp_zero_mm(uint off, ivec3 s, vec3 p, out float lo, out float hi) {
+ p = clamp(p, vec3(-1.0), vec3(s));
+ ivec3 b = ivec3(floor(p));
+ vec3 t = p - vec3(b);
+ float v[8];
+ for (int q = 0; q < 8; q++) {
+ ivec3 c = b + ivec3(q & 1, (q >> 1) & 1, (q >> 2) & 1);
+ bool o = any(lessThan(c, ivec3(0))) || any(greaterThanEqual(c, s));
+ v[q] = o ? 0.0 : F[off + uint(c.x + s.x * (c.y + s.y * c.z))];
+ }
+ lo = v[0]; hi = v[0];
+ for (int q = 1; q < 8; q++) { lo = min(lo, v[q]); hi = max(hi, v[q]); }
+ return mix(mix(mix(v[0], v[1], t.x), mix(v[2], v[3], t.x), t.y),
+ mix(mix(v[4], v[5], t.x), mix(v[6], v[7], t.x), t.y), t.z);
+}
+
+// clamp sample with min/max (velocity MacCormack)
+float samp_clamp_mm(uint off, ivec3 s, vec3 p, out float lo, out float hi) {
+ p = clamp(p, vec3(0.0), vec3(s - 1));
+ ivec3 b = ivec3(floor(p));
+ vec3 t = p - vec3(b);
+ float v[8];
+ for (int q = 0; q < 8; q++) {
+ ivec3 c = clamp(b + ivec3(q & 1, (q >> 1) & 1, (q >> 2) & 1), ivec3(0), s - 1);
+ v[q] = F[off + uint(c.x + s.x * (c.y + s.y * c.z))];
+ }
+ lo = v[0]; hi = v[0];
+ for (int q = 1; q < 8; q++) { lo = min(lo, v[q]); hi = max(hi, v[q]); }
+ return mix(mix(mix(v[0], v[1], t.x), mix(v[2], v[3], t.x), t.y),
+ mix(mix(v[4], v[5], t.x), mix(v[6], v[7], t.x), t.y), t.z);
+}
+
+vec3 vel_at(uint U, uint V, uint W, vec3 p) {
+ ivec3 n = pc.n.xyz;
+ return vec3(samp_clamp(U, ivec3(n.x + 1, n.y, n.z), p - vec3(0.0, 0.5, 0.5)),
+ samp_clamp(V, ivec3(n.x, n.y + 1, n.z), p - vec3(0.5, 0.0, 0.5)),
+ samp_clamp(W, ivec3(n.x, n.y, n.z + 1), p - vec3(0.5, 0.5, 0.0)));
+}
+
+vec3 trace(uint U, uint V, uint W, vec3 p, float h) {
+ vec3 v1 = vel_at(U, V, W, p);
+ vec3 v2 = vel_at(U, V, W, p - 0.5 * h * v1);
+ return p - h * v2;
+}
+
+bool is_solid(int i, int j, int k, uint solid_off, bool closed_floor) {
+ if (i < 0 || j < 0 || i >= pc.n.x || j >= pc.n.y || k >= pc.n.z) return false;
+ if (k < 0) return closed_floor;
+ return S[solid_off + cidx(i, j, k)] != 0u;
+}
diff --git a/vendor/nova-fx/core/shaders/faces.comp b/vendor/nova-fx/core/shaders/faces.comp
new file mode 100644
index 0000000..79ca181
--- /dev/null
+++ b/vendor/nova-fx/core/shaders/faces.comp
@@ -0,0 +1,66 @@
+#version 450
+// Face-array operations over all three components. n.w = op:
+// 0 copy dst = src o0 = (dU, dV, dW, -), o1 = (sU, sV, sW, -)
+// 1 reflect dst = 2 src - dst same offsets
+// 2 clamp |v| <= f0.x o0 = (U, V, W)
+// 3 zero faces next to solids o0 = (U, V, W), o2.x = solid offset in S, o2.y = closed floor
+// 4 max |v| partials -> R[o2.z + workgroup]
+layout(local_size_x = 8, local_size_y = 8, local_size_z = 4) in;
+#include "common.glsl"
+shared float red[256];
+void main() {
+ int op = pc.n.w;
+ ivec3 g = ivec3(gl_GlobalInvocationID);
+ int nx = pc.n.x, ny = pc.n.y, nz = pc.n.z;
+ bool cu = g.x <= nx && g.y < ny && g.z < nz, cv = g.x < nx && g.y <= ny && g.z < nz,
+ cw = g.x < nx && g.y < ny && g.z <= nz;
+ uint iu = uidx(g.x, g.y, g.z), iv = vidx(g.x, g.y, g.z), iw = widx(g.x, g.y, g.z);
+ if (op == 0) {
+ if (cu) F[pc.o0.x + iu] = F[pc.o1.x + iu];
+ if (cv) F[pc.o0.y + iv] = F[pc.o1.y + iv];
+ if (cw) F[pc.o0.z + iw] = F[pc.o1.z + iw];
+ } else if (op == 1) {
+ // reflect only between two fluid cells (see faces_op in nova_core.c); o2.x = level-0 stencil
+ uint st = pc.o2.x;
+ bool here = g.x < nx && g.y < ny && g.z < nz && (S[st + cidx(g.x, g.y, g.z)] & 255u) != 0u;
+ if (cu) {
+ bool fl = here && g.x > 0 && (S[st + cidx(g.x - 1, g.y, g.z)] & 255u) != 0u;
+ F[pc.o0.x + iu] = fl ? 2.0 * F[pc.o1.x + iu] - F[pc.o0.x + iu] : F[pc.o1.x + iu];
+ }
+ if (cv) {
+ bool fl = here && g.y > 0 && (S[st + cidx(g.x, g.y - 1, g.z)] & 255u) != 0u;
+ F[pc.o0.y + iv] = fl ? 2.0 * F[pc.o1.y + iv] - F[pc.o0.y + iv] : F[pc.o1.y + iv];
+ }
+ if (cw) {
+ bool fl = here && g.z > 0 && (S[st + cidx(g.x, g.y, g.z - 1)] & 255u) != 0u;
+ F[pc.o0.z + iw] = fl ? 2.0 * F[pc.o1.z + iw] - F[pc.o0.z + iw] : F[pc.o1.z + iw];
+ }
+ } else if (op == 2) {
+ float m = pc.f0.x;
+ if (cu) F[pc.o0.x + iu] = clamp(F[pc.o0.x + iu], -m, m);
+ if (cv) F[pc.o0.y + iv] = clamp(F[pc.o0.y + iv], -m, m);
+ if (cw) F[pc.o0.z + iw] = clamp(F[pc.o0.z + iw], -m, m);
+ } else if (op == 3) {
+ uint so = pc.o2.x;
+ bool cf = pc.o2.y != 0u;
+ if (cu && (is_solid(g.x - 1, g.y, g.z, so, cf) || is_solid(g.x, g.y, g.z, so, cf))) F[pc.o0.x + iu] = 0.0;
+ if (cv && (is_solid(g.x, g.y - 1, g.z, so, cf) || is_solid(g.x, g.y, g.z, so, cf))) F[pc.o0.y + iv] = 0.0;
+ if (cw && (is_solid(g.x, g.y, g.z - 1, so, cf) || is_solid(g.x, g.y, g.z, so, cf))) F[pc.o0.z + iw] = 0.0;
+ } else if (op == 4) {
+ float m = 0.0;
+ if (cu) m = max(m, abs(F[pc.o0.x + iu]));
+ if (cv) m = max(m, abs(F[pc.o0.y + iv]));
+ if (cw) m = max(m, abs(F[pc.o0.z + iw]));
+ uint l = gl_LocalInvocationIndex;
+ red[l] = m;
+ barrier();
+ for (uint s = 128u; s > 0u; s >>= 1) {
+ if (l < s) red[l] = max(red[l], red[l + s]);
+ barrier();
+ }
+ if (l == 0u) {
+ uvec3 ng = gl_NumWorkGroups, w = gl_WorkGroupID;
+ R[pc.o2.z + w.x + ng.x * (w.y + ng.y * w.z)] = red[0];
+ }
+ }
+}
diff --git a/vendor/nova-fx/core/shaders/forces.comp b/vendor/nova-fx/core/shaders/forces.comp
new file mode 100644
index 0000000..cc06895
--- /dev/null
+++ b/vendor/nova-fx/core/shaders/forces.comp
@@ -0,0 +1,126 @@
+#version 450
+// Body forces on the faces. n.w = op:
+// 0 buoyancy on w faces o0 = (U, V, W, density), o1.x = heat, f0 = (dt, buoy_heat, buoy_smoke, 0)
+// 1 vorticity omega + |omega| o0 = (U, V, W, -), o1.x = tmp (wx, wy, wz, wm, Fx, Fy, Fz consecutive), f0.y = 0.5/dx
+// 2 confinement + noise force o0 = (-, -, -, density), o1 = (tmp, heat, perm, seed), f0 = (eps*dx, 0.5/dx, tamp, tfreq)
+// f1 = (time*speed, dx, ox, oy), f2.x = oz
+// 3 add cell forces to faces o0 = (U, V, W, -), o1.x = tmp, f0.x = dt
+// 4 wind relaxation + damping o0 = (U, V, W, -), f0 = (a, e, -, -), f1 = (wind x, y, z, -)
+layout(local_size_x = 8, local_size_y = 8, local_size_z = 4) in;
+#include "common.glsl"
+
+const vec3 GRAD[16] = vec3[](vec3(1, 1, 0), vec3(-1, 1, 0), vec3(1, -1, 0), vec3(-1, -1, 0), vec3(1, 0, 1),
+ vec3(-1, 0, 1), vec3(1, 0, -1), vec3(-1, 0, -1), vec3(0, 1, 1), vec3(0, -1, 1),
+ vec3(0, 1, -1), vec3(0, -1, -1), vec3(1, 1, 0), vec3(-1, 1, 0), vec3(0, -1, 1),
+ vec3(0, -1, -1));
+uint permv(uint i) { return S[pc.o1.z + (i & 511u)]; }
+vec3 ghash(int x, int y, int z, uint seed) {
+ uint a = permv(uint((x + int(seed * 37u)) & 255));
+ a = permv(a + uint(y & 255));
+ a = permv(a + uint(z & 255));
+ return GRAD[a & 15u];
+}
+// gradient noise derivatives (value unused), as noised() in nova_core.c
+vec3 noised(vec3 x, uint seed) {
+ vec3 i0 = floor(x);
+ ivec3 i = ivec3(i0);
+ vec3 f = x - i0;
+ vec3 u = f * f * f * (f * (f * 6.0 - 15.0) + 10.0);
+ vec3 du = 30.0 * f * f * (f * (f - 2.0) + 1.0);
+ vec3 ga = ghash(i.x, i.y, i.z, seed), gb = ghash(i.x + 1, i.y, i.z, seed), gc = ghash(i.x, i.y + 1, i.z, seed),
+ gd = ghash(i.x + 1, i.y + 1, i.z, seed), ge = ghash(i.x, i.y, i.z + 1, seed),
+ gf = ghash(i.x + 1, i.y, i.z + 1, seed), gg = ghash(i.x, i.y + 1, i.z + 1, seed),
+ gh = ghash(i.x + 1, i.y + 1, i.z + 1, seed);
+ float va = dot(ga, f), vb = dot(gb, f - vec3(1, 0, 0)), vc = dot(gc, f - vec3(0, 1, 0)),
+ vd = dot(gd, f - vec3(1, 1, 0)), ve = dot(ge, f - vec3(0, 0, 1)), vf = dot(gf, f - vec3(1, 0, 1)),
+ vg = dot(gg, f - vec3(0, 1, 1)), vh = dot(gh, f - vec3(1, 1, 1));
+ float k1 = vb - va, k2 = vc - va, k3 = ve - va, k4 = va - vb - vc + vd, k5 = va - vc - ve + vg,
+ k6 = va - vb - ve + vf, k7 = -va + vb + vc - vd + ve - vf - vg + vh;
+ vec3 g = ga + u.x * (gb - ga) + u.y * (gc - ga) + u.z * (ge - ga) + u.x * u.y * (ga - gb - gc + gd) +
+ u.y * u.z * (ga - gc - ge + gg) + u.z * u.x * (ga - gb - ge + gf) +
+ u.x * u.y * u.z * (-ga + gb + gc - gd + ge - gf - gg + gh);
+ g.x += du.x * (k1 + k4 * u.y + k6 * u.z + k7 * u.y * u.z);
+ g.y += du.y * (k2 + k4 * u.x + k5 * u.z + k7 * u.x * u.z);
+ g.z += du.z * (k3 + k5 * u.y + k6 * u.x + k7 * u.x * u.y);
+ return g;
+}
+vec3 curl_noise(vec3 p, float t, int oct, uint seed) {
+ float amp = 1.0, fr = 1.0;
+ vec3 c = vec3(0.0);
+ for (int o = 0; o < oct; o++) {
+ vec3 s = vec3(p.x * fr + t * 0.31 * float(o + 1), p.y * fr - t * 0.23, p.z * fr + t * 0.17 * float(o + 2));
+ uint sd = seed + 1013u * uint(o);
+ vec3 a = noised(s, sd), b = noised(s + vec3(31.4, -17.1, 9.2), sd + 1u),
+ d = noised(s + vec3(-11.7, 41.3, -27.9), sd + 2u);
+ c += amp * vec3(d.y - b.z, a.z - d.x, b.x - a.y);
+ amp *= 0.5;
+ fr *= 2.0;
+ }
+ return c;
+}
+
+vec3 cvel(int i, int j, int k) {
+ return vec3(0.5 * (F[pc.o0.x + uidx(i, j, k)] + F[pc.o0.x + uidx(i + 1, j, k)]),
+ 0.5 * (F[pc.o0.y + vidx(i, j, k)] + F[pc.o0.y + vidx(i, j + 1, k)]),
+ 0.5 * (F[pc.o0.z + widx(i, j, k)] + F[pc.o0.z + widx(i, j, k + 1)]));
+}
+
+void main() {
+ int op = pc.n.w;
+ ivec3 g = ivec3(gl_GlobalInvocationID);
+ int nx = pc.n.x, ny = pc.n.y, nz = pc.n.z;
+ uint nc = uint(nx * ny * nz);
+ if (op == 0) {
+ if (g.x >= nx || g.y >= ny || g.z >= nz || g.z < 1) return;
+ float T = 0.5 * (F[pc.o1.x + cidx(g.x, g.y, g.z - 1)] + F[pc.o1.x + cidx(g.x, g.y, g.z)]);
+ float d = 0.5 * (F[pc.o0.w + cidx(g.x, g.y, g.z - 1)] + F[pc.o0.w + cidx(g.x, g.y, g.z)]);
+ F[pc.o0.z + widx(g.x, g.y, g.z)] += pc.f0.x * (pc.f0.y * T - pc.f0.z * d);
+ } else if (op == 1) {
+ if (any(greaterThanEqual(g, pc.n.xyz))) return;
+ uint c = cidx(g.x, g.y, g.z), T = pc.o1.x;
+ if (g.x == 0 || g.y == 0 || g.z == 0 || g.x == nx - 1 || g.y == ny - 1 || g.z == nz - 1) {
+ F[T + c] = 0.0; F[T + nc + c] = 0.0; F[T + 2u * nc + c] = 0.0; F[T + 3u * nc + c] = 0.0;
+ return;
+ }
+ vec3 xm = cvel(g.x - 1, g.y, g.z), xp = cvel(g.x + 1, g.y, g.z), ym = cvel(g.x, g.y - 1, g.z),
+ yp = cvel(g.x, g.y + 1, g.z), zm = cvel(g.x, g.y, g.z - 1), zp = cvel(g.x, g.y, g.z + 1);
+ float inv2 = pc.f0.y;
+ vec3 w = vec3((yp.z - ym.z) - (zp.y - zm.y), (zp.x - zm.x) - (xp.z - xm.z), (xp.y - xm.y) - (yp.x - ym.x)) * inv2;
+ F[T + c] = w.x; F[T + nc + c] = w.y; F[T + 2u * nc + c] = w.z; F[T + 3u * nc + c] = length(w);
+ } else if (op == 2) {
+ if (any(greaterThanEqual(g, pc.n.xyz))) return;
+ uint c = cidx(g.x, g.y, g.z), T = pc.o1.x;
+ vec3 fo = vec3(0.0);
+ float eps_dx = pc.f0.x, inv2 = pc.f0.y;
+ if (eps_dx > 0.0 && !(g.x == 0 || g.y == 0 || g.z == 0 || g.x == nx - 1 || g.y == ny - 1 || g.z == nz - 1)) {
+ uint wm = T + 3u * nc, sy = uint(nx), sz = uint(nx * ny);
+ vec3 gr = vec3(F[wm + c + 1u] - F[wm + c - 1u], F[wm + c + sy] - F[wm + c - sy], F[wm + c + sz] - F[wm + c - sz]) * inv2;
+ gr /= length(gr) + 1e-6;
+ vec3 w = vec3(F[T + c], F[T + nc + c], F[T + 2u * nc + c]);
+ fo = eps_dx * cross(gr, w);
+ }
+ float tamp = pc.f0.z;
+ if (tamp > 0.0) {
+ float wgt = min(1.0, F[pc.o0.w + c] + F[pc.o1.y + c]);
+ if (wgt > 1e-3) {
+ vec3 X = vec3(pc.f1.z, pc.f1.w, pc.f2.x) + (vec3(g) + 0.5) * pc.f1.y;
+ // the push fades out as the local speed approaches 0.5 * amplitude (see nova_core.c)
+ float lim = max(0.0, 1.0 - length(cvel(g.x, g.y, g.z)) / (0.5 * tamp));
+ fo += tamp * wgt * lim * curl_noise(X * pc.f0.w, pc.f1.x, 2, pc.o1.w);
+ }
+ }
+ F[T + 4u * nc + c] = fo.x; F[T + 5u * nc + c] = fo.y; F[T + 6u * nc + c] = fo.z;
+ } else if (op == 3) {
+ if (any(greaterThanEqual(g, pc.n.xyz))) return;
+ uint c = cidx(g.x, g.y, g.z), T = pc.o1.x, sy = uint(nx), sz = uint(nx * ny);
+ float h = 0.5 * pc.f0.x;
+ if (g.x > 0) F[pc.o0.x + uidx(g.x, g.y, g.z)] += h * (F[T + 4u * nc + c] + F[T + 4u * nc + c - 1u]);
+ if (g.y > 0) F[pc.o0.y + vidx(g.x, g.y, g.z)] += h * (F[T + 5u * nc + c] + F[T + 5u * nc + c - sy]);
+ if (g.z > 0) F[pc.o0.z + widx(g.x, g.y, g.z)] += h * (F[T + 6u * nc + c] + F[T + 6u * nc + c - sz]);
+ } else if (op == 4) {
+ float a = pc.f0.x, e = pc.f0.y;
+ if (g.x <= nx && g.y < ny && g.z < nz) { uint c = pc.o0.x + uidx(g.x, g.y, g.z); F[c] = (F[c] + (pc.f1.x - F[c]) * a) * e; }
+ if (g.x < nx && g.y <= ny && g.z < nz) { uint c = pc.o0.y + vidx(g.x, g.y, g.z); F[c] = (F[c] + (pc.f1.y - F[c]) * a) * e; }
+ if (g.x < nx && g.y < ny && g.z <= nz) { uint c = pc.o0.z + widx(g.x, g.y, g.z); F[c] = (F[c] + (pc.f1.z - F[c]) * a) * e; }
+ }
+}
diff --git a/vendor/nova-fx/core/shaders/mg.comp b/vendor/nova-fx/core/shaders/mg.comp
new file mode 100644
index 0000000..ea26429
--- /dev/null
+++ b/vendor/nova-fx/core/shaders/mg.comp
@@ -0,0 +1,81 @@
+#version 450
+// Multigrid V-cycle pieces on one level (dims in n.xyz). n.w = op:
+// 0 x = 0 o0 = (x, b, r, stencil)
+// 1 red/black Gauss-Seidel o0 = (x, b, r, stencil), o1.x = colour, o1.y = 1: x is zero (first sweep)
+// 5 residual fused into restriction: coarse b from fine x, b o0 = (fine x, fine stencil, coarse b,
+// coarse stencil), o1 = (fine nx, ny, nz, fine b)
+// 2 r = b - A x o0 = (x, b, r, stencil)
+// 3 restrict to coarse b o0 = (fine r, fine stencil, coarse b, coarse stencil), o1 = (fine nx, ny, nz, -)
+// 4 prolong: x += coarse x o0 = (x, -, -, stencil), o1 = (coarse x, cnx, cny, -)
+// stencil word: diag | fluid-neighbour bits << 8
+layout(local_size_x = 8, local_size_y = 8, local_size_z = 4) in;
+#include "common.glsl"
+float Ax(uint X, uint st, uint c, int nx, int ny) {
+ uint w = S[st + c];
+ uint dg = w & 255u, m = w >> 8;
+ if (dg == 0u) return 0.0;
+ uint sy = uint(nx), sz = uint(nx * ny);
+ float s = float(dg) * F[X + c];
+ if ((m & 1u) != 0u) s -= F[X + c - 1u];
+ if ((m & 2u) != 0u) s -= F[X + c + 1u];
+ if ((m & 4u) != 0u) s -= F[X + c - sy];
+ if ((m & 8u) != 0u) s -= F[X + c + sy];
+ if ((m & 16u) != 0u) s -= F[X + c - sz];
+ if ((m & 32u) != 0u) s -= F[X + c + sz];
+ return s;
+}
+void main() {
+ int op = pc.n.w;
+ ivec3 g = ivec3(gl_GlobalInvocationID);
+ if (any(greaterThanEqual(g, pc.n.xyz))) return;
+ int nx = pc.n.x, ny = pc.n.y;
+ uint c = uint(g.x + nx * (g.y + ny * g.z));
+ if (op == 0) {
+ F[pc.o0.x + c] = 0.0;
+ } else if (op == 1) {
+ if (((g.x + g.y + g.z + int(pc.o1.x)) & 1) != 0) return;
+ uint w = S[pc.o0.w + c];
+ uint dg = w & 255u, m = w >> 8;
+ if (dg == 0u) return;
+ uint X = pc.o0.x, sy = uint(nx), sz = uint(nx * ny);
+ float s = F[pc.o0.y + c];
+ if (pc.o1.y != 0u) { F[X + c] = s / float(dg); return; } /* first red sweep: all neighbours are 0 */
+ if ((m & 1u) != 0u) s += F[X + c - 1u];
+ if ((m & 2u) != 0u) s += F[X + c + 1u];
+ if ((m & 4u) != 0u) s += F[X + c - sy];
+ if ((m & 8u) != 0u) s += F[X + c + sy];
+ if ((m & 16u) != 0u) s += F[X + c - sz];
+ if ((m & 32u) != 0u) s += F[X + c + sz];
+ F[X + c] = s / float(dg);
+ } else if (op == 2) {
+ uint dg = S[pc.o0.w + c] & 255u;
+ F[pc.o0.z + c] = dg != 0u ? F[pc.o0.y + c] - Ax(pc.o0.x, pc.o0.w, c, nx, ny) : 0.0;
+ } else if (op == 3) {
+ // here n.xyz are the COARSE dims
+ if ((S[pc.o0.w + c] & 255u) == 0u) { F[pc.o0.z + c] = 0.0; return; }
+ int fx = int(pc.o1.x), fy = int(pc.o1.y), fz = int(pc.o1.z);
+ float s = 0.0;
+ for (int q = 0; q < 8; q++) {
+ int i = 2 * g.x + (q & 1), j = 2 * g.y + ((q >> 1) & 1), k = 2 * g.z + ((q >> 2) & 1);
+ if (i >= fx || j >= fy || k >= fz) continue;
+ uint cf = uint(i + fx * (j + fy * k));
+ if ((S[pc.o0.y + cf] & 255u) != 0u) s += F[pc.o0.x + cf];
+ }
+ F[pc.o0.z + c] = 0.5 * s;
+ } else if (op == 5) {
+ if ((S[pc.o0.w + c] & 255u) == 0u) { F[pc.o0.z + c] = 0.0; return; }
+ int fx = int(pc.o1.x), fy = int(pc.o1.y), fz = int(pc.o1.z);
+ float s = 0.0;
+ for (int q = 0; q < 8; q++) {
+ int i = 2 * g.x + (q & 1), j = 2 * g.y + ((q >> 1) & 1), k = 2 * g.z + ((q >> 2) & 1);
+ if (i >= fx || j >= fy || k >= fz) continue;
+ uint cf = uint(i + fx * (j + fy * k));
+ if ((S[pc.o0.y + cf] & 255u) != 0u) s += F[pc.o1.w + cf] - Ax(pc.o0.x, pc.o0.y, cf, fx, fy);
+ }
+ F[pc.o0.z + c] = 0.5 * s;
+ } else if (op == 4) {
+ if ((S[pc.o0.w + c] & 255u) == 0u) return;
+ int cx = int(pc.o1.y), cy = int(pc.o1.z);
+ F[pc.o0.x + c] += F[pc.o1.x + uint((g.x >> 1) + cx * ((g.y >> 1) + cy * (g.z >> 1)))];
+ }
+}
diff --git a/vendor/nova-fx/core/shaders/project.comp b/vendor/nova-fx/core/shaders/project.comp
new file mode 100644
index 0000000..7acef2a
--- /dev/null
+++ b/vendor/nova-fx/core/shaders/project.comp
@@ -0,0 +1,38 @@
+#version 450
+// Pressure projection pieces. n.w = op:
+// 0 rhs: b = -(div u - expn dx) dx for active cells o0 = (U, V, W, b), o1 = (expn, -, -, -), o2.x = stencil off, f0.x = dx
+// 1 subtract grad phi from faces not touching solids o0 = (U, V, W, phi), o2 = (solid off, closed floor), f0.x = 1/dx
+layout(local_size_x = 8, local_size_y = 8, local_size_z = 4) in;
+#include "common.glsl"
+void main() {
+ int op = pc.n.w;
+ ivec3 g = ivec3(gl_GlobalInvocationID);
+ int nx = pc.n.x, ny = pc.n.y, nz = pc.n.z;
+ if (op == 0) {
+ if (any(greaterThanEqual(g, pc.n.xyz))) return;
+ uint c = cidx(g.x, g.y, g.z);
+ if ((S[pc.o2.x + c] & 255u) == 0u) { F[pc.o0.w + c] = 0.0; return; }
+ float D = F[pc.o0.x + uidx(g.x + 1, g.y, g.z)] - F[pc.o0.x + uidx(g.x, g.y, g.z)] +
+ F[pc.o0.y + vidx(g.x, g.y + 1, g.z)] - F[pc.o0.y + vidx(g.x, g.y, g.z)] +
+ F[pc.o0.z + widx(g.x, g.y, g.z + 1)] - F[pc.o0.z + widx(g.x, g.y, g.z)];
+ float dx = pc.f0.x;
+ F[pc.o0.w + c] = -(D - F[pc.o1.x + c] * dx) * dx;
+ } else {
+ uint so = pc.o2.x;
+ bool cf = pc.o2.y != 0u;
+ uint P = pc.o0.w;
+ float inv = pc.f0.x;
+ if (g.x <= nx && g.y < ny && g.z < nz && !(is_solid(g.x - 1, g.y, g.z, so, cf) || is_solid(g.x, g.y, g.z, so, cf))) {
+ float pl = g.x > 0 ? F[P + cidx(g.x - 1, g.y, g.z)] : 0.0, pr = g.x < nx ? F[P + cidx(g.x, g.y, g.z)] : 0.0;
+ F[pc.o0.x + uidx(g.x, g.y, g.z)] -= (pr - pl) * inv;
+ }
+ if (g.x < nx && g.y <= ny && g.z < nz && !(is_solid(g.x, g.y - 1, g.z, so, cf) || is_solid(g.x, g.y, g.z, so, cf))) {
+ float pl = g.y > 0 ? F[P + cidx(g.x, g.y - 1, g.z)] : 0.0, pr = g.y < ny ? F[P + cidx(g.x, g.y, g.z)] : 0.0;
+ F[pc.o0.y + vidx(g.x, g.y, g.z)] -= (pr - pl) * inv;
+ }
+ if (g.x < nx && g.y < ny && g.z <= nz && !(is_solid(g.x, g.y, g.z - 1, so, cf) || is_solid(g.x, g.y, g.z, so, cf))) {
+ float pl = g.z > 0 ? F[P + cidx(g.x, g.y, g.z - 1)] : 0.0, pr = g.z < nz ? F[P + cidx(g.x, g.y, g.z)] : 0.0;
+ F[pc.o0.z + widx(g.x, g.y, g.z)] -= (pr - pl) * inv;
+ }
+ }
+}
diff --git a/vendor/nova-fx/core/shaders/splat.comp b/vendor/nova-fx/core/shaders/splat.comp
new file mode 100644
index 0000000..30daa6c
--- /dev/null
+++ b/vendor/nova-fx/core/shaders/splat.comp
@@ -0,0 +1,73 @@
+#version 450
+// Emitter sources and particle deposits, gathered per cell from points bucketed by tile (no atomics,
+// same order as the CPU loop, so results match it). n.w = op:
+// 0 emitter splat PTS = (x, y, z, vx, vy, vz) per point; PIDX = tile ranges (nt + 1) then point ids
+// o0 = (density, heat, fuel, -), o1 = (U, V, W, -), f0 = (R^2, dens, heat, fuel),
+// f1 = (vel_amt, mode, dx, -), f2 = (ox, oy, oz, -), o2 = (ntx, nty, has_vel, rr tiles)
+// 1 deposit PTS = (x, y, z, smoke, heat, fuel); tiles hold particles by base cell; trilinear add
+layout(local_size_x = 8, local_size_y = 8, local_size_z = 4) in;
+#include "common.glsl"
+void main() {
+ ivec3 g = ivec3(gl_GlobalInvocationID);
+ if (any(greaterThanEqual(g, pc.n.xyz))) return;
+ int ntx = int(pc.o2.x), nty = int(pc.o2.y), ntz = (pc.n.z + 7) / 8;
+ uint nt = uint(ntx * nty * ntz);
+ uint c = cidx(g.x, g.y, g.z);
+ float dx = pc.f1.z;
+ vec3 org = pc.f2.xyz;
+ if (pc.n.w == 0) {
+ if (S[pc.o2.w + c] != 0u) return; // solid
+ int t = (g.x >> 3) + ntx * ((g.y >> 3) + nty * (g.z >> 3));
+ uint a = PIDX[t], b = PIDX[t + 1];
+ if (a == b) return;
+ vec3 cc = org + (vec3(g) + 0.5) * dx;
+ float R2 = pc.f0.x;
+ bool mx = pc.f1.y > 0.5;
+ float d = F[pc.o0.x + c], T = F[pc.o0.y + c], fu = F[pc.o0.z + c];
+ uint iu = pc.o1.x + uidx(g.x, g.y, g.z), iv = pc.o1.y + vidx(g.x, g.y, g.z), iw = pc.o1.z + widx(g.x, g.y, g.z);
+ float U = F[iu], V = F[iv], W = F[iw];
+ bool has_vel = pc.f1.w > 0.5;
+ for (uint q = a; q < b; q++) {
+ uint p = PIDX[nt + 1u + q];
+ vec3 pp = vec3(PTS[6u * p], PTS[6u * p + 1u], PTS[6u * p + 2u]);
+ vec3 dv = cc - pp;
+ float r = dot(dv, dv) / R2;
+ if (r >= 1.0) continue;
+ float w = (1.0 - r) * (1.0 - r);
+ if (!mx) { d += pc.f0.y * w; T += pc.f0.z * w; fu += pc.f0.w * w; }
+ else { d = max(d, pc.f0.y * w); T = max(T, pc.f0.z * w); fu = max(fu, pc.f0.w * w); }
+ if (has_vel && pc.f1.x > 0.0) {
+ float al = min(1.0, w * pc.f1.x);
+ U += (PTS[6u * p + 3u] - U) * al;
+ V += (PTS[6u * p + 4u] - V) * al;
+ W += (PTS[6u * p + 5u] - W) * al;
+ }
+ }
+ F[pc.o0.x + c] = d; F[pc.o0.y + c] = T; F[pc.o0.z + c] = fu;
+ if (has_vel) { F[iu] = U; F[iv] = V; F[iw] = W; }
+ } else {
+ // particles are bucketed by the tile of their base cell (floor(p/dx - 0.5)); a cell receives from
+ // particles whose base cell is itself or one less on each axis, so look at this tile and the 7 below
+ float sd = 0.0, sh = 0.0, sf = 0.0;
+ int tx = g.x >> 3, ty = g.y >> 3, tz = g.z >> 3;
+ for (int q = 0; q < 8; q++) {
+ int ux = tx - (q & 1), uy = ty - ((q >> 1) & 1), uz = tz - ((q >> 2) & 1);
+ if (ux < 0 || uy < 0 || uz < 0) continue;
+ if ((q & 1) != 0 && (g.x & 7) != 0) continue; // only the first column of a tile reaches back
+ if ((q & 2) != 0 && (g.y & 7) != 0) continue;
+ if ((q & 4) != 0 && (g.z & 7) != 0) continue;
+ uint t = uint(ux + ntx * (uy + nty * uz));
+ for (uint k = PIDX[t]; k < PIDX[t + 1u]; k++) {
+ uint p = PIDX[nt + 1u + k];
+ vec3 gp = (vec3(PTS[6u * p], PTS[6u * p + 1u], PTS[6u * p + 2u]) - org) / dx - 0.5;
+ vec3 b0 = floor(gp);
+ ivec3 o = g - ivec3(b0);
+ if (any(lessThan(o, ivec3(0))) || any(greaterThan(o, ivec3(1)))) continue;
+ vec3 t3 = gp - b0;
+ float w = (o.x == 1 ? t3.x : 1.0 - t3.x) * (o.y == 1 ? t3.y : 1.0 - t3.y) * (o.z == 1 ? t3.z : 1.0 - t3.z);
+ sd += PTS[6u * p + 3u] * w; sh += PTS[6u * p + 4u] * w; sf += PTS[6u * p + 5u] * w;
+ }
+ }
+ F[pc.o0.x + c] += sd; F[pc.o0.y + c] += sh; F[pc.o0.z + c] += sf;
+ }
+}
diff --git a/vendor/nova-fx/core/shaders/tilemax.comp b/vendor/nova-fx/core/shaders/tilemax.comp
new file mode 100644
index 0000000..34b705e
--- /dev/null
+++ b/vendor/nova-fx/core/shaders/tilemax.comp
@@ -0,0 +1,25 @@
+#version 450
+// Per 8^3 tile: does it hold smoke/heat/fuel/flame? R[o2.x + tile] = max over the tile.
+layout(local_size_x = 8, local_size_y = 8, local_size_z = 8) in;
+#include "common.glsl"
+shared float red[512];
+void main() {
+ ivec3 g = ivec3(gl_GlobalInvocationID);
+ uint l = gl_LocalInvocationIndex;
+ uint nc = uint(pc.n.x * pc.n.y * pc.n.z);
+ float m = 0.0;
+ if (all(lessThan(g, pc.n.xyz))) {
+ uint c = cidx(g.x, g.y, g.z);
+ for (uint q = 0u; q < 4u; q++) m = max(m, F[pc.o0.x + q * nc + c]);
+ }
+ red[l] = m;
+ barrier();
+ for (uint s = 256u; s > 0u; s >>= 1) {
+ if (l < s) red[l] = max(red[l], red[l + s]);
+ barrier();
+ }
+ if (l == 0u) {
+ uvec3 w = gl_WorkGroupID, ng = gl_NumWorkGroups;
+ R[pc.o2.x + w.x + ng.x * (w.y + ng.y * w.z)] = red[0];
+ }
+}
diff --git a/vendor/nova-fx/core/shaders_spv.h b/vendor/nova-fx/core/shaders_spv.h
new file mode 100644
index 0000000..12b2b53
--- /dev/null
+++ b/vendor/nova-fx/core/shaders_spv.h
@@ -0,0 +1,4731 @@
+/* generated by embed_spv.py from the shaders folder: do not edit */
+#include <stdint.h>
+static const uint32_t spv_adv_face[] = {
+ 0x07230203, 0x00010300, 0x000d000b, 0x00000a71, 0x00000000, 0x00020011, 0x00000001, 0x0006000b,
+ 0x00000001, 0x4c534c47, 0x6474732e, 0x3035342e, 0x00000000, 0x0003000e, 0x00000000, 0x00000001,
+ 0x0006000f, 0x00000005, 0x00000004, 0x6e69616d, 0x00000000, 0x000001a5, 0x00060010, 0x00000004,
+ 0x00000011, 0x00000008, 0x00000008, 0x00000004, 0x00040047, 0x00000061, 0x00000006, 0x00000004,
+ 0x00030047, 0x00000062, 0x00000002, 0x00050048, 0x00000062, 0x00000000, 0x00000023, 0x00000000,
+ 0x00040047, 0x00000064, 0x00000021, 0x00000000, 0x00040047, 0x00000064, 0x00000022, 0x00000000,
+ 0x00030047, 0x0000012d, 0x00000002, 0x00050048, 0x0000012d, 0x00000000, 0x00000023, 0x00000000,
+ 0x00050048, 0x0000012d, 0x00000001, 0x00000023, 0x00000010, 0x00050048, 0x0000012d, 0x00000002,
+ 0x00000023, 0x00000020, 0x00050048, 0x0000012d, 0x00000003, 0x00000023, 0x00000030, 0x00050048,
+ 0x0000012d, 0x00000004, 0x00000023, 0x00000040, 0x00050048, 0x0000012d, 0x00000005, 0x00000023,
+ 0x00000050, 0x00050048, 0x0000012d, 0x00000006, 0x00000023, 0x00000060, 0x00040047, 0x000001a5,
+ 0x0000000b, 0x0000001c, 0x00040047, 0x00000298, 0x0000000b, 0x00000019, 0x00020013, 0x00000002,
+ 0x00030021, 0x00000003, 0x00000002, 0x00040015, 0x00000006, 0x00000020, 0x00000000, 0x00040015,
+ 0x00000008, 0x00000020, 0x00000001, 0x00040017, 0x00000009, 0x00000008, 0x00000003, 0x00030016,
+ 0x0000000b, 0x00000020, 0x00040017, 0x0000000c, 0x0000000b, 0x00000003, 0x00040020, 0x00000014,
+ 0x00000007, 0x0000000b, 0x0004002b, 0x0000000b, 0x0000002d, 0x00000000, 0x0006002c, 0x0000000c,
+ 0x0000002e, 0x0000002d, 0x0000002d, 0x0000002d, 0x0004002b, 0x00000008, 0x00000030, 0x00000001,
+ 0x0004002b, 0x00000008, 0x00000040, 0x00000000, 0x0004002b, 0x00000008, 0x00000047, 0x00000008,
+ 0x00020014, 0x00000048, 0x0004002b, 0x00000008, 0x00000052, 0x00000002, 0x0006002c, 0x00000009,
+ 0x00000057, 0x00000040, 0x00000040, 0x00000040, 0x0004002b, 0x00000006, 0x0000005c, 0x00000008,
+ 0x0004001c, 0x0000005d, 0x0000000b, 0x0000005c, 0x00040020, 0x0000005e, 0x00000007, 0x0000005d,
+ 0x0003001d, 0x00000061, 0x0000000b, 0x0003001e, 0x00000062, 0x00000061, 0x00040020, 0x00000063,
+ 0x0000000c, 0x00000062, 0x0004003b, 0x00000063, 0x00000064, 0x0000000c, 0x0004002b, 0x00000006,
+ 0x00000066, 0x00000000, 0x0004002b, 0x00000006, 0x0000006b, 0x00000001, 0x0004002b, 0x00000006,
+ 0x00000070, 0x00000002, 0x00040020, 0x00000079, 0x0000000c, 0x0000000b, 0x0004002b, 0x00000008,
+ 0x00000088, 0x00000003, 0x0004002b, 0x00000008, 0x00000091, 0x00000004, 0x0004002b, 0x00000008,
+ 0x00000094, 0x00000005, 0x0004002b, 0x00000008, 0x0000009a, 0x00000006, 0x0004002b, 0x00000008,
+ 0x0000009d, 0x00000007, 0x00040017, 0x0000012a, 0x00000008, 0x00000004, 0x00040017, 0x0000012b,
+ 0x00000006, 0x00000004, 0x00040017, 0x0000012c, 0x0000000b, 0x00000004, 0x0009001e, 0x0000012d,
+ 0x0000012a, 0x0000012b, 0x0000012b, 0x0000012b, 0x0000012c, 0x0000012c, 0x0000012c, 0x00040020,
+ 0x0000012e, 0x00000009, 0x0000012d, 0x0004003b, 0x0000012e, 0x0000012f, 0x00000009, 0x00040020,
+ 0x00000130, 0x00000009, 0x0000012a, 0x0004002b, 0x0000000b, 0x0000013d, 0x3f000000, 0x0006002c,
+ 0x0000000c, 0x0000013e, 0x0000002d, 0x0000013d, 0x0000013d, 0x0006002c, 0x0000000c, 0x0000014e,
+ 0x0000013d, 0x0000002d, 0x0000013d, 0x0006002c, 0x0000000c, 0x0000015e, 0x0000013d, 0x0000013d,
+ 0x0000002d, 0x0004002b, 0x00000006, 0x00000189, 0x00000003, 0x00040020, 0x0000018a, 0x00000009,
+ 0x00000008, 0x0004002b, 0x00000008, 0x0000018d, 0x0000000f, 0x00040017, 0x000001a3, 0x00000006,
+ 0x00000003, 0x00040020, 0x000001a4, 0x00000001, 0x000001a3, 0x0004003b, 0x000001a4, 0x000001a5,
+ 0x00000001, 0x00040017, 0x000001aa, 0x00000048, 0x00000003, 0x00040020, 0x000001d1, 0x00000009,
+ 0x00000006, 0x00040020, 0x000001fa, 0x00000009, 0x0000000b, 0x0004002b, 0x0000000b, 0x00000228,
+ 0x7149f2ca, 0x0004002b, 0x0000000b, 0x00000229, 0xf149f2ca, 0x0004002b, 0x00000006, 0x00000297,
+ 0x00000004, 0x0006002c, 0x000001a3, 0x00000298, 0x0000005c, 0x0000005c, 0x00000297, 0x0006002c,
+ 0x00000009, 0x00000a6c, 0x00000030, 0x00000030, 0x00000030, 0x0004002b, 0x0000000b, 0x00000a6e,
+ 0xbf000000, 0x00050036, 0x00000002, 0x00000004, 0x00000000, 0x00000003, 0x000200f8, 0x00000005,
+ 0x0004003b, 0x0000005e, 0x0000090c, 0x00000007, 0x0004003b, 0x0000005e, 0x000008a6, 0x00000007,
+ 0x0004003b, 0x0000005e, 0x00000840, 0x00000007, 0x0004003b, 0x0000005e, 0x000007da, 0x00000007,
+ 0x0004003b, 0x0000005e, 0x00000740, 0x00000007, 0x0004003b, 0x0000005e, 0x000006da, 0x00000007,
+ 0x0004003b, 0x0000005e, 0x00000674, 0x00000007, 0x0004003b, 0x0000005e, 0x000005a2, 0x00000007,
+ 0x0004003b, 0x0000005e, 0x0000053c, 0x00000007, 0x0004003b, 0x0000005e, 0x000004d6, 0x00000007,
+ 0x0004003b, 0x0000005e, 0x00000470, 0x00000007, 0x0004003b, 0x0000005e, 0x000003d6, 0x00000007,
+ 0x0004003b, 0x0000005e, 0x00000370, 0x00000007, 0x0004003b, 0x0000005e, 0x0000030a, 0x00000007,
+ 0x000300f7, 0x000002ad, 0x00000000, 0x000300fb, 0x00000066, 0x000002ae, 0x000200f8, 0x000002ae,
+ 0x00060041, 0x0000018a, 0x0000018b, 0x0000012f, 0x00000040, 0x00000189, 0x0004003d, 0x00000008,
+ 0x0000018c, 0x0000018b, 0x000500c7, 0x00000008, 0x0000018e, 0x0000018c, 0x0000018d, 0x000500c3,
+ 0x00000008, 0x00000192, 0x0000018c, 0x00000091, 0x00050041, 0x00000130, 0x00000194, 0x0000012f,
+ 0x00000040, 0x0004003d, 0x0000012a, 0x00000195, 0x00000194, 0x0008004f, 0x00000009, 0x00000196,
+ 0x00000195, 0x00000195, 0x00000000, 0x00000001, 0x00000002, 0x000500aa, 0x00000048, 0x00000198,
+ 0x00000192, 0x00000040, 0x000600a9, 0x00000008, 0x00000199, 0x00000198, 0x00000030, 0x00000040,
+ 0x000500aa, 0x00000048, 0x0000019b, 0x00000192, 0x00000030, 0x000600a9, 0x00000008, 0x0000019c,
+ 0x0000019b, 0x00000030, 0x00000040, 0x000500aa, 0x00000048, 0x0000019e, 0x00000192, 0x00000052,
+ 0x000600a9, 0x00000008, 0x0000019f, 0x0000019e, 0x00000030, 0x00000040, 0x00060050, 0x00000009,
+ 0x000001a0, 0x00000199, 0x0000019c, 0x0000019f, 0x00050080, 0x00000009, 0x000001a1, 0x00000196,
+ 0x000001a0, 0x0004003d, 0x000001a3, 0x000001a6, 0x000001a5, 0x0004007c, 0x00000009, 0x000001a7,
+ 0x000001a6, 0x000500af, 0x000001aa, 0x000001ab, 0x000001a7, 0x000001a1, 0x0004009a, 0x00000048,
+ 0x000001ac, 0x000001ab, 0x000300f7, 0x000001ae, 0x00000000, 0x000400fa, 0x000001ac, 0x000001ad,
+ 0x000001ae, 0x000200f8, 0x000001ad, 0x000200f9, 0x000002ad, 0x000200f8, 0x000001ae, 0x000600a9,
+ 0x0000000b, 0x000001b3, 0x00000198, 0x0000002d, 0x0000013d, 0x000600a9, 0x0000000b, 0x000001b6,
+ 0x0000019b, 0x0000002d, 0x0000013d, 0x000600a9, 0x0000000b, 0x000001b9, 0x0000019e, 0x0000002d,
+ 0x0000013d, 0x00060050, 0x0000000c, 0x000001ba, 0x000001b3, 0x000001b6, 0x000001b9, 0x00050051,
+ 0x00000008, 0x000001bd, 0x000001a7, 0x00000000, 0x00050051, 0x00000008, 0x000001bf, 0x000001a1,
+ 0x00000000, 0x00050051, 0x00000008, 0x000001c1, 0x000001a7, 0x00000001, 0x00050051, 0x00000008,
+ 0x000001c3, 0x000001a1, 0x00000001, 0x00050051, 0x00000008, 0x000001c5, 0x000001a7, 0x00000002,
+ 0x00050084, 0x00000008, 0x000001c6, 0x000001c3, 0x000001c5, 0x00050080, 0x00000008, 0x000001c7,
+ 0x000001c1, 0x000001c6, 0x00050084, 0x00000008, 0x000001c8, 0x000001bf, 0x000001c7, 0x00050080,
+ 0x00000008, 0x000001c9, 0x000001bd, 0x000001c8, 0x0004007c, 0x00000006, 0x000001ca, 0x000001c9,
+ 0x0004006f, 0x0000000c, 0x000001cd, 0x000001a7, 0x00050081, 0x0000000c, 0x000001cf, 0x000001cd,
+ 0x000001ba, 0x00060041, 0x000001d1, 0x000001d2, 0x0000012f, 0x00000030, 0x00000066, 0x0004003d,
+ 0x00000006, 0x000001d3, 0x000001d2, 0x00060041, 0x000001d1, 0x000001d5, 0x0000012f, 0x00000030,
+ 0x0000006b, 0x0004003d, 0x00000006, 0x000001d6, 0x000001d5, 0x00060041, 0x000001d1, 0x000001d8,
+ 0x0000012f, 0x00000030, 0x00000070, 0x0004003d, 0x00000006, 0x000001d9, 0x000001d8, 0x00060041,
+ 0x000001d1, 0x000001db, 0x0000012f, 0x00000030, 0x00000189, 0x0004003d, 0x00000006, 0x000001dc,
+ 0x000001db, 0x00060041, 0x000001d1, 0x000001de, 0x0000012f, 0x00000052, 0x00000066, 0x0004003d,
+ 0x00000006, 0x000001df, 0x000001de, 0x00060041, 0x000001d1, 0x000001e1, 0x0000012f, 0x00000052,
+ 0x0000006b, 0x0004003d, 0x00000006, 0x000001e2, 0x000001e1, 0x00060041, 0x000001d1, 0x000001e4,
+ 0x0000012f, 0x00000052, 0x00000070, 0x0004003d, 0x00000006, 0x000001e5, 0x000001e4, 0x00060041,
+ 0x000001d1, 0x000001e7, 0x0000012f, 0x00000052, 0x00000189, 0x0004003d, 0x00000006, 0x000001e8,
+ 0x000001e7, 0x000500aa, 0x00000048, 0x000001ea, 0x0000018e, 0x00000040, 0x000500aa, 0x00000048,
+ 0x000001ec, 0x0000018e, 0x00000052, 0x000500a6, 0x00000048, 0x000001ed, 0x000001ea, 0x000001ec,
+ 0x000300f7, 0x000001ef, 0x00000000, 0x000400fa, 0x000001ed, 0x000001ee, 0x00000239, 0x000200f8,
+ 0x000001ee, 0x00060041, 0x000001fa, 0x000001fb, 0x0000012f, 0x00000091, 0x00000066, 0x0004003d,
+ 0x0000000b, 0x000001fc, 0x000001fb, 0x00050051, 0x00000008, 0x000002e2, 0x00000195, 0x00000000,
+ 0x00050080, 0x00000008, 0x000002e3, 0x000002e2, 0x00000030, 0x00050051, 0x00000008, 0x000002e5,
+ 0x00000195, 0x00000001, 0x00050051, 0x00000008, 0x000002e7, 0x00000195, 0x00000002, 0x00060050,
+ 0x00000009, 0x000002e8, 0x000002e3, 0x000002e5, 0x000002e7, 0x00050083, 0x0000000c, 0x000002ea,
+ 0x000001cf, 0x0000013e, 0x00050082, 0x00000009, 0x00000310, 0x000002e8, 0x00000a6c, 0x0004006f,
+ 0x0000000c, 0x00000311, 0x00000310, 0x0008000c, 0x0000000c, 0x00000312, 0x00000001, 0x0000002b,
+ 0x000002ea, 0x0000002e, 0x00000311, 0x0006000c, 0x0000000c, 0x00000314, 0x00000001, 0x00000008,
+ 0x00000312, 0x0004006e, 0x00000009, 0x00000315, 0x00000314, 0x0004006f, 0x0000000c, 0x00000318,
+ 0x00000315, 0x00050083, 0x0000000c, 0x00000319, 0x00000312, 0x00000318, 0x000200f9, 0x0000031a,
+ 0x000200f8, 0x0000031a, 0x000700f5, 0x00000008, 0x00000a5e, 0x00000040, 0x000001ee, 0x00000345,
+ 0x0000031e, 0x000500b1, 0x00000048, 0x0000031d, 0x00000a5e, 0x00000047, 0x000400f6, 0x00000346,
+ 0x0000031e, 0x00000000, 0x000400fa, 0x0000031d, 0x0000031e, 0x00000346, 0x000200f8, 0x0000031e,
+ 0x000500c7, 0x00000008, 0x00000321, 0x00000a5e, 0x00000030, 0x000500c3, 0x00000008, 0x00000323,
+ 0x00000a5e, 0x00000030, 0x000500c7, 0x00000008, 0x00000324, 0x00000323, 0x00000030, 0x000500c3,
+ 0x00000008, 0x00000326, 0x00000a5e, 0x00000052, 0x000500c7, 0x00000008, 0x00000327, 0x00000326,
+ 0x00000030, 0x00060050, 0x00000009, 0x00000328, 0x00000321, 0x00000324, 0x00000327, 0x00050080,
+ 0x00000009, 0x00000329, 0x00000315, 0x00000328, 0x0008000c, 0x00000009, 0x0000032d, 0x00000001,
+ 0x0000002d, 0x00000329, 0x00000057, 0x00000310, 0x00050051, 0x00000008, 0x00000331, 0x0000032d,
+ 0x00000000, 0x00050051, 0x00000008, 0x00000335, 0x0000032d, 0x00000001, 0x00050051, 0x00000008,
+ 0x00000339, 0x0000032d, 0x00000002, 0x00050084, 0x00000008, 0x0000033a, 0x000002e5, 0x00000339,
+ 0x00050080, 0x00000008, 0x0000033b, 0x00000335, 0x0000033a, 0x00050084, 0x00000008, 0x0000033c,
+ 0x000002e3, 0x0000033b, 0x00050080, 0x00000008, 0x0000033d, 0x00000331, 0x0000033c, 0x0004007c,
+ 0x00000006, 0x0000033e, 0x0000033d, 0x00050080, 0x00000006, 0x0000033f, 0x000001d3, 0x0000033e,
+ 0x00060041, 0x00000079, 0x00000340, 0x00000064, 0x00000040, 0x0000033f, 0x0004003d, 0x0000000b,
+ 0x00000341, 0x00000340, 0x00050041, 0x00000014, 0x00000342, 0x0000030a, 0x00000a5e, 0x0003003e,
+ 0x00000342, 0x00000341, 0x00050080, 0x00000008, 0x00000345, 0x00000a5e, 0x00000030, 0x000200f9,
+ 0x0000031a, 0x000200f8, 0x00000346, 0x00050041, 0x00000014, 0x00000347, 0x0000030a, 0x00000040,
+ 0x0004003d, 0x0000000b, 0x00000348, 0x00000347, 0x00050041, 0x00000014, 0x00000349, 0x0000030a,
+ 0x00000030, 0x0004003d, 0x0000000b, 0x0000034a, 0x00000349, 0x00050051, 0x0000000b, 0x0000034c,
+ 0x00000319, 0x00000000, 0x0008000c, 0x0000000b, 0x0000034d, 0x00000001, 0x0000002e, 0x00000348,
+ 0x0000034a, 0x0000034c, 0x00050041, 0x00000014, 0x0000034e, 0x0000030a, 0x00000052, 0x0004003d,
+ 0x0000000b, 0x0000034f, 0x0000034e, 0x00050041, 0x00000014, 0x00000350, 0x0000030a, 0x00000088,
+ 0x0004003d, 0x0000000b, 0x00000351, 0x00000350, 0x0008000c, 0x0000000b, 0x00000354, 0x00000001,
+ 0x0000002e, 0x0000034f, 0x00000351, 0x0000034c, 0x00050051, 0x0000000b, 0x00000356, 0x00000319,
+ 0x00000001, 0x0008000c, 0x0000000b, 0x00000357, 0x00000001, 0x0000002e, 0x0000034d, 0x00000354,
+ 0x00000356, 0x00050041, 0x00000014, 0x00000358, 0x0000030a, 0x00000091, 0x0004003d, 0x0000000b,
+ 0x00000359, 0x00000358, 0x00050041, 0x00000014, 0x0000035a, 0x0000030a, 0x00000094, 0x0004003d,
+ 0x0000000b, 0x0000035b, 0x0000035a, 0x0008000c, 0x0000000b, 0x0000035e, 0x00000001, 0x0000002e,
+ 0x00000359, 0x0000035b, 0x0000034c, 0x00050041, 0x00000014, 0x0000035f, 0x0000030a, 0x0000009a,
+ 0x0004003d, 0x0000000b, 0x00000360, 0x0000035f, 0x00050041, 0x00000014, 0x00000361, 0x0000030a,
+ 0x0000009d, 0x0004003d, 0x0000000b, 0x00000362, 0x00000361, 0x0008000c, 0x0000000b, 0x00000365,
+ 0x00000001, 0x0000002e, 0x00000360, 0x00000362, 0x0000034c, 0x0008000c, 0x0000000b, 0x00000368,
+ 0x00000001, 0x0000002e, 0x0000035e, 0x00000365, 0x00000356, 0x00050051, 0x0000000b, 0x0000036a,
+ 0x00000319, 0x00000002, 0x0008000c, 0x0000000b, 0x0000036b, 0x00000001, 0x0000002e, 0x00000357,
+ 0x00000368, 0x0000036a, 0x00050080, 0x00000008, 0x000002f1, 0x000002e5, 0x00000030, 0x00060050,
+ 0x00000009, 0x000002f4, 0x000002e2, 0x000002f1, 0x000002e7, 0x00050083, 0x0000000c, 0x000002f6,
+ 0x000001cf, 0x0000014e, 0x00050082, 0x00000009, 0x00000376, 0x000002f4, 0x00000a6c, 0x0004006f,
+ 0x0000000c, 0x00000377, 0x00000376, 0x0008000c, 0x0000000c, 0x00000378, 0x00000001, 0x0000002b,
+ 0x000002f6, 0x0000002e, 0x00000377, 0x0006000c, 0x0000000c, 0x0000037a, 0x00000001, 0x00000008,
+ 0x00000378, 0x0004006e, 0x00000009, 0x0000037b, 0x0000037a, 0x0004006f, 0x0000000c, 0x0000037e,
+ 0x0000037b, 0x00050083, 0x0000000c, 0x0000037f, 0x00000378, 0x0000037e, 0x000200f9, 0x00000380,
+ 0x000200f8, 0x00000380, 0x000700f5, 0x00000008, 0x00000a5f, 0x00000040, 0x00000346, 0x000003ab,
+ 0x00000384, 0x000500b1, 0x00000048, 0x00000383, 0x00000a5f, 0x00000047, 0x000400f6, 0x000003ac,
+ 0x00000384, 0x00000000, 0x000400fa, 0x00000383, 0x00000384, 0x000003ac, 0x000200f8, 0x00000384,
+ 0x000500c7, 0x00000008, 0x00000387, 0x00000a5f, 0x00000030, 0x000500c3, 0x00000008, 0x00000389,
+ 0x00000a5f, 0x00000030, 0x000500c7, 0x00000008, 0x0000038a, 0x00000389, 0x00000030, 0x000500c3,
+ 0x00000008, 0x0000038c, 0x00000a5f, 0x00000052, 0x000500c7, 0x00000008, 0x0000038d, 0x0000038c,
+ 0x00000030, 0x00060050, 0x00000009, 0x0000038e, 0x00000387, 0x0000038a, 0x0000038d, 0x00050080,
+ 0x00000009, 0x0000038f, 0x0000037b, 0x0000038e, 0x0008000c, 0x00000009, 0x00000393, 0x00000001,
+ 0x0000002d, 0x0000038f, 0x00000057, 0x00000376, 0x00050051, 0x00000008, 0x00000397, 0x00000393,
+ 0x00000000, 0x00050051, 0x00000008, 0x0000039b, 0x00000393, 0x00000001, 0x00050051, 0x00000008,
+ 0x0000039f, 0x00000393, 0x00000002, 0x00050084, 0x00000008, 0x000003a0, 0x000002f1, 0x0000039f,
+ 0x00050080, 0x00000008, 0x000003a1, 0x0000039b, 0x000003a0, 0x00050084, 0x00000008, 0x000003a2,
+ 0x000002e2, 0x000003a1, 0x00050080, 0x00000008, 0x000003a3, 0x00000397, 0x000003a2, 0x0004007c,
+ 0x00000006, 0x000003a4, 0x000003a3, 0x00050080, 0x00000006, 0x000003a5, 0x000001d6, 0x000003a4,
+ 0x00060041, 0x00000079, 0x000003a6, 0x00000064, 0x00000040, 0x000003a5, 0x0004003d, 0x0000000b,
+ 0x000003a7, 0x000003a6, 0x00050041, 0x00000014, 0x000003a8, 0x00000370, 0x00000a5f, 0x0003003e,
+ 0x000003a8, 0x000003a7, 0x00050080, 0x00000008, 0x000003ab, 0x00000a5f, 0x00000030, 0x000200f9,
+ 0x00000380, 0x000200f8, 0x000003ac, 0x00050041, 0x00000014, 0x000003ad, 0x00000370, 0x00000040,
+ 0x0004003d, 0x0000000b, 0x000003ae, 0x000003ad, 0x00050041, 0x00000014, 0x000003af, 0x00000370,
+ 0x00000030, 0x0004003d, 0x0000000b, 0x000003b0, 0x000003af, 0x00050051, 0x0000000b, 0x000003b2,
+ 0x0000037f, 0x00000000, 0x0008000c, 0x0000000b, 0x000003b3, 0x00000001, 0x0000002e, 0x000003ae,
+ 0x000003b0, 0x000003b2, 0x00050041, 0x00000014, 0x000003b4, 0x00000370, 0x00000052, 0x0004003d,
+ 0x0000000b, 0x000003b5, 0x000003b4, 0x00050041, 0x00000014, 0x000003b6, 0x00000370, 0x00000088,
+ 0x0004003d, 0x0000000b, 0x000003b7, 0x000003b6, 0x0008000c, 0x0000000b, 0x000003ba, 0x00000001,
+ 0x0000002e, 0x000003b5, 0x000003b7, 0x000003b2, 0x00050051, 0x0000000b, 0x000003bc, 0x0000037f,
+ 0x00000001, 0x0008000c, 0x0000000b, 0x000003bd, 0x00000001, 0x0000002e, 0x000003b3, 0x000003ba,
+ 0x000003bc, 0x00050041, 0x00000014, 0x000003be, 0x00000370, 0x00000091, 0x0004003d, 0x0000000b,
+ 0x000003bf, 0x000003be, 0x00050041, 0x00000014, 0x000003c0, 0x00000370, 0x00000094, 0x0004003d,
+ 0x0000000b, 0x000003c1, 0x000003c0, 0x0008000c, 0x0000000b, 0x000003c4, 0x00000001, 0x0000002e,
+ 0x000003bf, 0x000003c1, 0x000003b2, 0x00050041, 0x00000014, 0x000003c5, 0x00000370, 0x0000009a,
+ 0x0004003d, 0x0000000b, 0x000003c6, 0x000003c5, 0x00050041, 0x00000014, 0x000003c7, 0x00000370,
+ 0x0000009d, 0x0004003d, 0x0000000b, 0x000003c8, 0x000003c7, 0x0008000c, 0x0000000b, 0x000003cb,
+ 0x00000001, 0x0000002e, 0x000003c6, 0x000003c8, 0x000003b2, 0x0008000c, 0x0000000b, 0x000003ce,
+ 0x00000001, 0x0000002e, 0x000003c4, 0x000003cb, 0x000003bc, 0x00050051, 0x0000000b, 0x000003d0,
+ 0x0000037f, 0x00000002, 0x0008000c, 0x0000000b, 0x000003d1, 0x00000001, 0x0000002e, 0x000003bd,
+ 0x000003ce, 0x000003d0, 0x00050080, 0x00000008, 0x000002ff, 0x000002e7, 0x00000030, 0x00060050,
+ 0x00000009, 0x00000300, 0x000002e2, 0x000002e5, 0x000002ff, 0x00050083, 0x0000000c, 0x00000302,
+ 0x000001cf, 0x0000015e, 0x00050082, 0x00000009, 0x000003dc, 0x00000300, 0x00000a6c, 0x0004006f,
+ 0x0000000c, 0x000003dd, 0x000003dc, 0x0008000c, 0x0000000c, 0x000003de, 0x00000001, 0x0000002b,
+ 0x00000302, 0x0000002e, 0x000003dd, 0x0006000c, 0x0000000c, 0x000003e0, 0x00000001, 0x00000008,
+ 0x000003de, 0x0004006e, 0x00000009, 0x000003e1, 0x000003e0, 0x0004006f, 0x0000000c, 0x000003e4,
+ 0x000003e1, 0x00050083, 0x0000000c, 0x000003e5, 0x000003de, 0x000003e4, 0x000200f9, 0x000003e6,
+ 0x000200f8, 0x000003e6, 0x000700f5, 0x00000008, 0x00000a60, 0x00000040, 0x000003ac, 0x00000411,
+ 0x000003ea, 0x000500b1, 0x00000048, 0x000003e9, 0x00000a60, 0x00000047, 0x000400f6, 0x00000412,
+ 0x000003ea, 0x00000000, 0x000400fa, 0x000003e9, 0x000003ea, 0x00000412, 0x000200f8, 0x000003ea,
+ 0x000500c7, 0x00000008, 0x000003ed, 0x00000a60, 0x00000030, 0x000500c3, 0x00000008, 0x000003ef,
+ 0x00000a60, 0x00000030, 0x000500c7, 0x00000008, 0x000003f0, 0x000003ef, 0x00000030, 0x000500c3,
+ 0x00000008, 0x000003f2, 0x00000a60, 0x00000052, 0x000500c7, 0x00000008, 0x000003f3, 0x000003f2,
+ 0x00000030, 0x00060050, 0x00000009, 0x000003f4, 0x000003ed, 0x000003f0, 0x000003f3, 0x00050080,
+ 0x00000009, 0x000003f5, 0x000003e1, 0x000003f4, 0x0008000c, 0x00000009, 0x000003f9, 0x00000001,
+ 0x0000002d, 0x000003f5, 0x00000057, 0x000003dc, 0x00050051, 0x00000008, 0x000003fd, 0x000003f9,
+ 0x00000000, 0x00050051, 0x00000008, 0x00000401, 0x000003f9, 0x00000001, 0x00050051, 0x00000008,
+ 0x00000405, 0x000003f9, 0x00000002, 0x00050084, 0x00000008, 0x00000406, 0x000002e5, 0x00000405,
+ 0x00050080, 0x00000008, 0x00000407, 0x00000401, 0x00000406, 0x00050084, 0x00000008, 0x00000408,
+ 0x000002e2, 0x00000407, 0x00050080, 0x00000008, 0x00000409, 0x000003fd, 0x00000408, 0x0004007c,
+ 0x00000006, 0x0000040a, 0x00000409, 0x00050080, 0x00000006, 0x0000040b, 0x000001d9, 0x0000040a,
+ 0x00060041, 0x00000079, 0x0000040c, 0x00000064, 0x00000040, 0x0000040b, 0x0004003d, 0x0000000b,
+ 0x0000040d, 0x0000040c, 0x00050041, 0x00000014, 0x0000040e, 0x000003d6, 0x00000a60, 0x0003003e,
+ 0x0000040e, 0x0000040d, 0x00050080, 0x00000008, 0x00000411, 0x00000a60, 0x00000030, 0x000200f9,
+ 0x000003e6, 0x000200f8, 0x00000412, 0x00050041, 0x00000014, 0x00000413, 0x000003d6, 0x00000040,
+ 0x0004003d, 0x0000000b, 0x00000414, 0x00000413, 0x00050041, 0x00000014, 0x00000415, 0x000003d6,
+ 0x00000030, 0x0004003d, 0x0000000b, 0x00000416, 0x00000415, 0x00050051, 0x0000000b, 0x00000418,
+ 0x000003e5, 0x00000000, 0x0008000c, 0x0000000b, 0x00000419, 0x00000001, 0x0000002e, 0x00000414,
+ 0x00000416, 0x00000418, 0x00050041, 0x00000014, 0x0000041a, 0x000003d6, 0x00000052, 0x0004003d,
+ 0x0000000b, 0x0000041b, 0x0000041a, 0x00050041, 0x00000014, 0x0000041c, 0x000003d6, 0x00000088,
+ 0x0004003d, 0x0000000b, 0x0000041d, 0x0000041c, 0x0008000c, 0x0000000b, 0x00000420, 0x00000001,
+ 0x0000002e, 0x0000041b, 0x0000041d, 0x00000418, 0x00050051, 0x0000000b, 0x00000422, 0x000003e5,
+ 0x00000001, 0x0008000c, 0x0000000b, 0x00000423, 0x00000001, 0x0000002e, 0x00000419, 0x00000420,
+ 0x00000422, 0x00050041, 0x00000014, 0x00000424, 0x000003d6, 0x00000091, 0x0004003d, 0x0000000b,
+ 0x00000425, 0x00000424, 0x00050041, 0x00000014, 0x00000426, 0x000003d6, 0x00000094, 0x0004003d,
+ 0x0000000b, 0x00000427, 0x00000426, 0x0008000c, 0x0000000b, 0x0000042a, 0x00000001, 0x0000002e,
+ 0x00000425, 0x00000427, 0x00000418, 0x00050041, 0x00000014, 0x0000042b, 0x000003d6, 0x0000009a,
+ 0x0004003d, 0x0000000b, 0x0000042c, 0x0000042b, 0x00050041, 0x00000014, 0x0000042d, 0x000003d6,
+ 0x0000009d, 0x0004003d, 0x0000000b, 0x0000042e, 0x0000042d, 0x0008000c, 0x0000000b, 0x00000431,
+ 0x00000001, 0x0000002e, 0x0000042c, 0x0000042e, 0x00000418, 0x0008000c, 0x0000000b, 0x00000434,
+ 0x00000001, 0x0000002e, 0x0000042a, 0x00000431, 0x00000422, 0x00050051, 0x0000000b, 0x00000436,
+ 0x000003e5, 0x00000002, 0x0008000c, 0x0000000b, 0x00000437, 0x00000001, 0x0000002e, 0x00000423,
+ 0x00000434, 0x00000436, 0x00060050, 0x0000000c, 0x00000305, 0x0000036b, 0x000003d1, 0x00000437,
+ 0x00050085, 0x0000000b, 0x000002c5, 0x0000013d, 0x000001fc, 0x0005008e, 0x0000000c, 0x000002c7,
+ 0x00000305, 0x000002c5, 0x00050083, 0x0000000c, 0x000002c8, 0x000001cf, 0x000002c7, 0x00050083,
+ 0x0000000c, 0x00000450, 0x000002c8, 0x0000013e, 0x0008000c, 0x0000000c, 0x00000478, 0x00000001,
+ 0x0000002b, 0x00000450, 0x0000002e, 0x00000311, 0x0006000c, 0x0000000c, 0x0000047a, 0x00000001,
+ 0x00000008, 0x00000478, 0x0004006e, 0x00000009, 0x0000047b, 0x0000047a, 0x0004006f, 0x0000000c,
+ 0x0000047e, 0x0000047b, 0x00050083, 0x0000000c, 0x0000047f, 0x00000478, 0x0000047e, 0x000200f9,
+ 0x00000480, 0x000200f8, 0x00000480, 0x000700f5, 0x00000008, 0x00000a61, 0x00000040, 0x00000412,
+ 0x000004ab, 0x00000484, 0x000500b1, 0x00000048, 0x00000483, 0x00000a61, 0x00000047, 0x000400f6,
+ 0x000004ac, 0x00000484, 0x00000000, 0x000400fa, 0x00000483, 0x00000484, 0x000004ac, 0x000200f8,
+ 0x00000484, 0x000500c7, 0x00000008, 0x00000487, 0x00000a61, 0x00000030, 0x000500c3, 0x00000008,
+ 0x00000489, 0x00000a61, 0x00000030, 0x000500c7, 0x00000008, 0x0000048a, 0x00000489, 0x00000030,
+ 0x000500c3, 0x00000008, 0x0000048c, 0x00000a61, 0x00000052, 0x000500c7, 0x00000008, 0x0000048d,
+ 0x0000048c, 0x00000030, 0x00060050, 0x00000009, 0x0000048e, 0x00000487, 0x0000048a, 0x0000048d,
+ 0x00050080, 0x00000009, 0x0000048f, 0x0000047b, 0x0000048e, 0x0008000c, 0x00000009, 0x00000493,
+ 0x00000001, 0x0000002d, 0x0000048f, 0x00000057, 0x00000310, 0x00050051, 0x00000008, 0x00000497,
+ 0x00000493, 0x00000000, 0x00050051, 0x00000008, 0x0000049b, 0x00000493, 0x00000001, 0x00050051,
+ 0x00000008, 0x0000049f, 0x00000493, 0x00000002, 0x00050084, 0x00000008, 0x000004a0, 0x000002e5,
+ 0x0000049f, 0x00050080, 0x00000008, 0x000004a1, 0x0000049b, 0x000004a0, 0x00050084, 0x00000008,
+ 0x000004a2, 0x000002e3, 0x000004a1, 0x00050080, 0x00000008, 0x000004a3, 0x00000497, 0x000004a2,
+ 0x0004007c, 0x00000006, 0x000004a4, 0x000004a3, 0x00050080, 0x00000006, 0x000004a5, 0x000001d3,
+ 0x000004a4, 0x00060041, 0x00000079, 0x000004a6, 0x00000064, 0x00000040, 0x000004a5, 0x0004003d,
+ 0x0000000b, 0x000004a7, 0x000004a6, 0x00050041, 0x00000014, 0x000004a8, 0x00000470, 0x00000a61,
+ 0x0003003e, 0x000004a8, 0x000004a7, 0x00050080, 0x00000008, 0x000004ab, 0x00000a61, 0x00000030,
+ 0x000200f9, 0x00000480, 0x000200f8, 0x000004ac, 0x00050041, 0x00000014, 0x000004ad, 0x00000470,
+ 0x00000040, 0x0004003d, 0x0000000b, 0x000004ae, 0x000004ad, 0x00050041, 0x00000014, 0x000004af,
+ 0x00000470, 0x00000030, 0x0004003d, 0x0000000b, 0x000004b0, 0x000004af, 0x00050051, 0x0000000b,
+ 0x000004b2, 0x0000047f, 0x00000000, 0x0008000c, 0x0000000b, 0x000004b3, 0x00000001, 0x0000002e,
+ 0x000004ae, 0x000004b0, 0x000004b2, 0x00050041, 0x00000014, 0x000004b4, 0x00000470, 0x00000052,
+ 0x0004003d, 0x0000000b, 0x000004b5, 0x000004b4, 0x00050041, 0x00000014, 0x000004b6, 0x00000470,
+ 0x00000088, 0x0004003d, 0x0000000b, 0x000004b7, 0x000004b6, 0x0008000c, 0x0000000b, 0x000004ba,
+ 0x00000001, 0x0000002e, 0x000004b5, 0x000004b7, 0x000004b2, 0x00050051, 0x0000000b, 0x000004bc,
+ 0x0000047f, 0x00000001, 0x0008000c, 0x0000000b, 0x000004bd, 0x00000001, 0x0000002e, 0x000004b3,
+ 0x000004ba, 0x000004bc, 0x00050041, 0x00000014, 0x000004be, 0x00000470, 0x00000091, 0x0004003d,
+ 0x0000000b, 0x000004bf, 0x000004be, 0x00050041, 0x00000014, 0x000004c0, 0x00000470, 0x00000094,
+ 0x0004003d, 0x0000000b, 0x000004c1, 0x000004c0, 0x0008000c, 0x0000000b, 0x000004c4, 0x00000001,
+ 0x0000002e, 0x000004bf, 0x000004c1, 0x000004b2, 0x00050041, 0x00000014, 0x000004c5, 0x00000470,
+ 0x0000009a, 0x0004003d, 0x0000000b, 0x000004c6, 0x000004c5, 0x00050041, 0x00000014, 0x000004c7,
+ 0x00000470, 0x0000009d, 0x0004003d, 0x0000000b, 0x000004c8, 0x000004c7, 0x0008000c, 0x0000000b,
+ 0x000004cb, 0x00000001, 0x0000002e, 0x000004c6, 0x000004c8, 0x000004b2, 0x0008000c, 0x0000000b,
+ 0x000004ce, 0x00000001, 0x0000002e, 0x000004c4, 0x000004cb, 0x000004bc, 0x00050051, 0x0000000b,
+ 0x000004d0, 0x0000047f, 0x00000002, 0x0008000c, 0x0000000b, 0x000004d1, 0x00000001, 0x0000002e,
+ 0x000004bd, 0x000004ce, 0x000004d0, 0x00050083, 0x0000000c, 0x0000045c, 0x000002c8, 0x0000014e,
+ 0x0008000c, 0x0000000c, 0x000004de, 0x00000001, 0x0000002b, 0x0000045c, 0x0000002e, 0x00000377,
+ 0x0006000c, 0x0000000c, 0x000004e0, 0x00000001, 0x00000008, 0x000004de, 0x0004006e, 0x00000009,
+ 0x000004e1, 0x000004e0, 0x0004006f, 0x0000000c, 0x000004e4, 0x000004e1, 0x00050083, 0x0000000c,
+ 0x000004e5, 0x000004de, 0x000004e4, 0x000200f9, 0x000004e6, 0x000200f8, 0x000004e6, 0x000700f5,
+ 0x00000008, 0x00000a62, 0x00000040, 0x000004ac, 0x00000511, 0x000004ea, 0x000500b1, 0x00000048,
+ 0x000004e9, 0x00000a62, 0x00000047, 0x000400f6, 0x00000512, 0x000004ea, 0x00000000, 0x000400fa,
+ 0x000004e9, 0x000004ea, 0x00000512, 0x000200f8, 0x000004ea, 0x000500c7, 0x00000008, 0x000004ed,
+ 0x00000a62, 0x00000030, 0x000500c3, 0x00000008, 0x000004ef, 0x00000a62, 0x00000030, 0x000500c7,
+ 0x00000008, 0x000004f0, 0x000004ef, 0x00000030, 0x000500c3, 0x00000008, 0x000004f2, 0x00000a62,
+ 0x00000052, 0x000500c7, 0x00000008, 0x000004f3, 0x000004f2, 0x00000030, 0x00060050, 0x00000009,
+ 0x000004f4, 0x000004ed, 0x000004f0, 0x000004f3, 0x00050080, 0x00000009, 0x000004f5, 0x000004e1,
+ 0x000004f4, 0x0008000c, 0x00000009, 0x000004f9, 0x00000001, 0x0000002d, 0x000004f5, 0x00000057,
+ 0x00000376, 0x00050051, 0x00000008, 0x000004fd, 0x000004f9, 0x00000000, 0x00050051, 0x00000008,
+ 0x00000501, 0x000004f9, 0x00000001, 0x00050051, 0x00000008, 0x00000505, 0x000004f9, 0x00000002,
+ 0x00050084, 0x00000008, 0x00000506, 0x000002f1, 0x00000505, 0x00050080, 0x00000008, 0x00000507,
+ 0x00000501, 0x00000506, 0x00050084, 0x00000008, 0x00000508, 0x000002e2, 0x00000507, 0x00050080,
+ 0x00000008, 0x00000509, 0x000004fd, 0x00000508, 0x0004007c, 0x00000006, 0x0000050a, 0x00000509,
+ 0x00050080, 0x00000006, 0x0000050b, 0x000001d6, 0x0000050a, 0x00060041, 0x00000079, 0x0000050c,
+ 0x00000064, 0x00000040, 0x0000050b, 0x0004003d, 0x0000000b, 0x0000050d, 0x0000050c, 0x00050041,
+ 0x00000014, 0x0000050e, 0x000004d6, 0x00000a62, 0x0003003e, 0x0000050e, 0x0000050d, 0x00050080,
+ 0x00000008, 0x00000511, 0x00000a62, 0x00000030, 0x000200f9, 0x000004e6, 0x000200f8, 0x00000512,
+ 0x00050041, 0x00000014, 0x00000513, 0x000004d6, 0x00000040, 0x0004003d, 0x0000000b, 0x00000514,
+ 0x00000513, 0x00050041, 0x00000014, 0x00000515, 0x000004d6, 0x00000030, 0x0004003d, 0x0000000b,
+ 0x00000516, 0x00000515, 0x00050051, 0x0000000b, 0x00000518, 0x000004e5, 0x00000000, 0x0008000c,
+ 0x0000000b, 0x00000519, 0x00000001, 0x0000002e, 0x00000514, 0x00000516, 0x00000518, 0x00050041,
+ 0x00000014, 0x0000051a, 0x000004d6, 0x00000052, 0x0004003d, 0x0000000b, 0x0000051b, 0x0000051a,
+ 0x00050041, 0x00000014, 0x0000051c, 0x000004d6, 0x00000088, 0x0004003d, 0x0000000b, 0x0000051d,
+ 0x0000051c, 0x0008000c, 0x0000000b, 0x00000520, 0x00000001, 0x0000002e, 0x0000051b, 0x0000051d,
+ 0x00000518, 0x00050051, 0x0000000b, 0x00000522, 0x000004e5, 0x00000001, 0x0008000c, 0x0000000b,
+ 0x00000523, 0x00000001, 0x0000002e, 0x00000519, 0x00000520, 0x00000522, 0x00050041, 0x00000014,
+ 0x00000524, 0x000004d6, 0x00000091, 0x0004003d, 0x0000000b, 0x00000525, 0x00000524, 0x00050041,
+ 0x00000014, 0x00000526, 0x000004d6, 0x00000094, 0x0004003d, 0x0000000b, 0x00000527, 0x00000526,
+ 0x0008000c, 0x0000000b, 0x0000052a, 0x00000001, 0x0000002e, 0x00000525, 0x00000527, 0x00000518,
+ 0x00050041, 0x00000014, 0x0000052b, 0x000004d6, 0x0000009a, 0x0004003d, 0x0000000b, 0x0000052c,
+ 0x0000052b, 0x00050041, 0x00000014, 0x0000052d, 0x000004d6, 0x0000009d, 0x0004003d, 0x0000000b,
+ 0x0000052e, 0x0000052d, 0x0008000c, 0x0000000b, 0x00000531, 0x00000001, 0x0000002e, 0x0000052c,
+ 0x0000052e, 0x00000518, 0x0008000c, 0x0000000b, 0x00000534, 0x00000001, 0x0000002e, 0x0000052a,
+ 0x00000531, 0x00000522, 0x00050051, 0x0000000b, 0x00000536, 0x000004e5, 0x00000002, 0x0008000c,
+ 0x0000000b, 0x00000537, 0x00000001, 0x0000002e, 0x00000523, 0x00000534, 0x00000536, 0x00050083,
+ 0x0000000c, 0x00000468, 0x000002c8, 0x0000015e, 0x0008000c, 0x0000000c, 0x00000544, 0x00000001,
+ 0x0000002b, 0x00000468, 0x0000002e, 0x000003dd, 0x0006000c, 0x0000000c, 0x00000546, 0x00000001,
+ 0x00000008, 0x00000544, 0x0004006e, 0x00000009, 0x00000547, 0x00000546, 0x0004006f, 0x0000000c,
+ 0x0000054a, 0x00000547, 0x00050083, 0x0000000c, 0x0000054b, 0x00000544, 0x0000054a, 0x000200f9,
+ 0x0000054c, 0x000200f8, 0x0000054c, 0x000700f5, 0x00000008, 0x00000a63, 0x00000040, 0x00000512,
+ 0x00000577, 0x00000550, 0x000500b1, 0x00000048, 0x0000054f, 0x00000a63, 0x00000047, 0x000400f6,
+ 0x00000578, 0x00000550, 0x00000000, 0x000400fa, 0x0000054f, 0x00000550, 0x00000578, 0x000200f8,
+ 0x00000550, 0x000500c7, 0x00000008, 0x00000553, 0x00000a63, 0x00000030, 0x000500c3, 0x00000008,
+ 0x00000555, 0x00000a63, 0x00000030, 0x000500c7, 0x00000008, 0x00000556, 0x00000555, 0x00000030,
+ 0x000500c3, 0x00000008, 0x00000558, 0x00000a63, 0x00000052, 0x000500c7, 0x00000008, 0x00000559,
+ 0x00000558, 0x00000030, 0x00060050, 0x00000009, 0x0000055a, 0x00000553, 0x00000556, 0x00000559,
+ 0x00050080, 0x00000009, 0x0000055b, 0x00000547, 0x0000055a, 0x0008000c, 0x00000009, 0x0000055f,
+ 0x00000001, 0x0000002d, 0x0000055b, 0x00000057, 0x000003dc, 0x00050051, 0x00000008, 0x00000563,
+ 0x0000055f, 0x00000000, 0x00050051, 0x00000008, 0x00000567, 0x0000055f, 0x00000001, 0x00050051,
+ 0x00000008, 0x0000056b, 0x0000055f, 0x00000002, 0x00050084, 0x00000008, 0x0000056c, 0x000002e5,
+ 0x0000056b, 0x00050080, 0x00000008, 0x0000056d, 0x00000567, 0x0000056c, 0x00050084, 0x00000008,
+ 0x0000056e, 0x000002e2, 0x0000056d, 0x00050080, 0x00000008, 0x0000056f, 0x00000563, 0x0000056e,
+ 0x0004007c, 0x00000006, 0x00000570, 0x0000056f, 0x00050080, 0x00000006, 0x00000571, 0x000001d9,
+ 0x00000570, 0x00060041, 0x00000079, 0x00000572, 0x00000064, 0x00000040, 0x00000571, 0x0004003d,
+ 0x0000000b, 0x00000573, 0x00000572, 0x00050041, 0x00000014, 0x00000574, 0x0000053c, 0x00000a63,
+ 0x0003003e, 0x00000574, 0x00000573, 0x00050080, 0x00000008, 0x00000577, 0x00000a63, 0x00000030,
+ 0x000200f9, 0x0000054c, 0x000200f8, 0x00000578, 0x00050041, 0x00000014, 0x00000579, 0x0000053c,
+ 0x00000040, 0x0004003d, 0x0000000b, 0x0000057a, 0x00000579, 0x00050041, 0x00000014, 0x0000057b,
+ 0x0000053c, 0x00000030, 0x0004003d, 0x0000000b, 0x0000057c, 0x0000057b, 0x00050051, 0x0000000b,
+ 0x0000057e, 0x0000054b, 0x00000000, 0x0008000c, 0x0000000b, 0x0000057f, 0x00000001, 0x0000002e,
+ 0x0000057a, 0x0000057c, 0x0000057e, 0x00050041, 0x00000014, 0x00000580, 0x0000053c, 0x00000052,
+ 0x0004003d, 0x0000000b, 0x00000581, 0x00000580, 0x00050041, 0x00000014, 0x00000582, 0x0000053c,
+ 0x00000088, 0x0004003d, 0x0000000b, 0x00000583, 0x00000582, 0x0008000c, 0x0000000b, 0x00000586,
+ 0x00000001, 0x0000002e, 0x00000581, 0x00000583, 0x0000057e, 0x00050051, 0x0000000b, 0x00000588,
+ 0x0000054b, 0x00000001, 0x0008000c, 0x0000000b, 0x00000589, 0x00000001, 0x0000002e, 0x0000057f,
+ 0x00000586, 0x00000588, 0x00050041, 0x00000014, 0x0000058a, 0x0000053c, 0x00000091, 0x0004003d,
+ 0x0000000b, 0x0000058b, 0x0000058a, 0x00050041, 0x00000014, 0x0000058c, 0x0000053c, 0x00000094,
+ 0x0004003d, 0x0000000b, 0x0000058d, 0x0000058c, 0x0008000c, 0x0000000b, 0x00000590, 0x00000001,
+ 0x0000002e, 0x0000058b, 0x0000058d, 0x0000057e, 0x00050041, 0x00000014, 0x00000591, 0x0000053c,
+ 0x0000009a, 0x0004003d, 0x0000000b, 0x00000592, 0x00000591, 0x00050041, 0x00000014, 0x00000593,
+ 0x0000053c, 0x0000009d, 0x0004003d, 0x0000000b, 0x00000594, 0x00000593, 0x0008000c, 0x0000000b,
+ 0x00000597, 0x00000001, 0x0000002e, 0x00000592, 0x00000594, 0x0000057e, 0x0008000c, 0x0000000b,
+ 0x0000059a, 0x00000001, 0x0000002e, 0x00000590, 0x00000597, 0x00000588, 0x00050051, 0x0000000b,
+ 0x0000059c, 0x0000054b, 0x00000002, 0x0008000c, 0x0000000b, 0x0000059d, 0x00000001, 0x0000002e,
+ 0x00000589, 0x0000059a, 0x0000059c, 0x00060050, 0x0000000c, 0x0000046b, 0x000004d1, 0x00000537,
+ 0x0000059d, 0x0005008e, 0x0000000c, 0x000002d0, 0x0000046b, 0x000001fc, 0x00050083, 0x0000000c,
+ 0x000002d1, 0x000001cf, 0x000002d0, 0x00050083, 0x0000000c, 0x000001ff, 0x000002d1, 0x000001ba,
+ 0x00050082, 0x00000009, 0x000005a9, 0x000001a1, 0x00000a6c, 0x0004006f, 0x0000000c, 0x000005aa,
+ 0x000005a9, 0x0008000c, 0x0000000c, 0x000005ab, 0x00000001, 0x0000002b, 0x000001ff, 0x0000002e,
+ 0x000005aa, 0x0006000c, 0x0000000c, 0x000005ad, 0x00000001, 0x00000008, 0x000005ab, 0x0004006e,
+ 0x00000009, 0x000005ae, 0x000005ad, 0x0004006f, 0x0000000c, 0x000005b1, 0x000005ae, 0x00050083,
+ 0x0000000c, 0x000005b2, 0x000005ab, 0x000005b1, 0x000200f9, 0x000005b3, 0x000200f8, 0x000005b3,
+ 0x000700f5, 0x00000008, 0x00000a64, 0x00000040, 0x00000578, 0x000005de, 0x000005b7, 0x000500b1,
+ 0x00000048, 0x000005b6, 0x00000a64, 0x00000047, 0x000400f6, 0x000005df, 0x000005b7, 0x00000000,
+ 0x000400fa, 0x000005b6, 0x000005b7, 0x000005df, 0x000200f8, 0x000005b7, 0x000500c7, 0x00000008,
+ 0x000005ba, 0x00000a64, 0x00000030, 0x000500c3, 0x00000008, 0x000005bc, 0x00000a64, 0x00000030,
+ 0x000500c7, 0x00000008, 0x000005bd, 0x000005bc, 0x00000030, 0x000500c3, 0x00000008, 0x000005bf,
+ 0x00000a64, 0x00000052, 0x000500c7, 0x00000008, 0x000005c0, 0x000005bf, 0x00000030, 0x00060050,
+ 0x00000009, 0x000005c1, 0x000005ba, 0x000005bd, 0x000005c0, 0x00050080, 0x00000009, 0x000005c2,
+ 0x000005ae, 0x000005c1, 0x0008000c, 0x00000009, 0x000005c6, 0x00000001, 0x0000002d, 0x000005c2,
+ 0x00000057, 0x000005a9, 0x00050051, 0x00000008, 0x000005ca, 0x000005c6, 0x00000000, 0x00050051,
+ 0x00000008, 0x000005ce, 0x000005c6, 0x00000001, 0x00050051, 0x00000008, 0x000005d2, 0x000005c6,
+ 0x00000002, 0x00050084, 0x00000008, 0x000005d3, 0x000001c3, 0x000005d2, 0x00050080, 0x00000008,
+ 0x000005d4, 0x000005ce, 0x000005d3, 0x00050084, 0x00000008, 0x000005d5, 0x000001bf, 0x000005d4,
+ 0x00050080, 0x00000008, 0x000005d6, 0x000005ca, 0x000005d5, 0x0004007c, 0x00000006, 0x000005d7,
+ 0x000005d6, 0x00050080, 0x00000006, 0x000005d8, 0x000001dc, 0x000005d7, 0x00060041, 0x00000079,
+ 0x000005d9, 0x00000064, 0x00000040, 0x000005d8, 0x0004003d, 0x0000000b, 0x000005da, 0x000005d9,
+ 0x00050041, 0x00000014, 0x000005db, 0x000005a2, 0x00000a64, 0x0003003e, 0x000005db, 0x000005da,
+ 0x00050080, 0x00000008, 0x000005de, 0x00000a64, 0x00000030, 0x000200f9, 0x000005b3, 0x000200f8,
+ 0x000005df, 0x00050041, 0x00000014, 0x000005e0, 0x000005a2, 0x00000040, 0x0004003d, 0x0000000b,
+ 0x000005e1, 0x000005e0, 0x0004003d, 0x0000000b, 0x000005e3, 0x000005e0, 0x000200f9, 0x000005e4,
+ 0x000200f8, 0x000005e4, 0x000700f5, 0x0000000b, 0x00000a67, 0x000005e3, 0x000005df, 0x000005f2,
+ 0x000005e8, 0x000700f5, 0x0000000b, 0x00000a66, 0x000005e1, 0x000005df, 0x000005ed, 0x000005e8,
+ 0x000700f5, 0x00000008, 0x00000a65, 0x00000030, 0x000005df, 0x000005f5, 0x000005e8, 0x000500b1,
+ 0x00000048, 0x000005e7, 0x00000a65, 0x00000047, 0x000400f6, 0x000005f6, 0x000005e8, 0x00000000,
+ 0x000400fa, 0x000005e7, 0x000005e8, 0x000005f6, 0x000200f8, 0x000005e8, 0x00050041, 0x00000014,
+ 0x000005eb, 0x000005a2, 0x00000a65, 0x0004003d, 0x0000000b, 0x000005ec, 0x000005eb, 0x0007000c,
+ 0x0000000b, 0x000005ed, 0x00000001, 0x00000025, 0x00000a66, 0x000005ec, 0x0004003d, 0x0000000b,
+ 0x000005f1, 0x000005eb, 0x0007000c, 0x0000000b, 0x000005f2, 0x00000001, 0x00000028, 0x00000a67,
+ 0x000005f1, 0x00050080, 0x00000008, 0x000005f5, 0x00000a65, 0x00000030, 0x000200f9, 0x000005e4,
+ 0x000200f8, 0x000005f6, 0x0004003d, 0x0000000b, 0x000005f8, 0x000005e0, 0x00050041, 0x00000014,
+ 0x000005f9, 0x000005a2, 0x00000030, 0x0004003d, 0x0000000b, 0x000005fa, 0x000005f9, 0x00050051,
+ 0x0000000b, 0x000005fc, 0x000005b2, 0x00000000, 0x0008000c, 0x0000000b, 0x000005fd, 0x00000001,
+ 0x0000002e, 0x000005f8, 0x000005fa, 0x000005fc, 0x00050041, 0x00000014, 0x000005fe, 0x000005a2,
+ 0x00000052, 0x0004003d, 0x0000000b, 0x000005ff, 0x000005fe, 0x00050041, 0x00000014, 0x00000600,
+ 0x000005a2, 0x00000088, 0x0004003d, 0x0000000b, 0x00000601, 0x00000600, 0x0008000c, 0x0000000b,
+ 0x00000604, 0x00000001, 0x0000002e, 0x000005ff, 0x00000601, 0x000005fc, 0x00050051, 0x0000000b,
+ 0x00000606, 0x000005b2, 0x00000001, 0x0008000c, 0x0000000b, 0x00000607, 0x00000001, 0x0000002e,
+ 0x000005fd, 0x00000604, 0x00000606, 0x00050041, 0x00000014, 0x00000608, 0x000005a2, 0x00000091,
+ 0x0004003d, 0x0000000b, 0x00000609, 0x00000608, 0x00050041, 0x00000014, 0x0000060a, 0x000005a2,
+ 0x00000094, 0x0004003d, 0x0000000b, 0x0000060b, 0x0000060a, 0x0008000c, 0x0000000b, 0x0000060e,
+ 0x00000001, 0x0000002e, 0x00000609, 0x0000060b, 0x000005fc, 0x00050041, 0x00000014, 0x0000060f,
+ 0x000005a2, 0x0000009a, 0x0004003d, 0x0000000b, 0x00000610, 0x0000060f, 0x00050041, 0x00000014,
+ 0x00000611, 0x000005a2, 0x0000009d, 0x0004003d, 0x0000000b, 0x00000612, 0x00000611, 0x0008000c,
+ 0x0000000b, 0x00000615, 0x00000001, 0x0000002e, 0x00000610, 0x00000612, 0x000005fc, 0x0008000c,
+ 0x0000000b, 0x00000618, 0x00000001, 0x0000002e, 0x0000060e, 0x00000615, 0x00000606, 0x00050051,
+ 0x0000000b, 0x0000061a, 0x000005b2, 0x00000002, 0x0008000c, 0x0000000b, 0x0000061b, 0x00000001,
+ 0x0000002e, 0x00000607, 0x00000618, 0x0000061a, 0x000300f7, 0x00000211, 0x00000000, 0x000400fa,
+ 0x000001ec, 0x00000210, 0x00000211, 0x000200f8, 0x00000210, 0x00050080, 0x00000006, 0x00000214,
+ 0x000001df, 0x000001ca, 0x00060041, 0x00000079, 0x00000216, 0x00000064, 0x00000040, 0x00000214,
+ 0x0003003e, 0x00000216, 0x0000061b, 0x000200f9, 0x000002ad, 0x000200f8, 0x00000211, 0x000500b8,
+ 0x000001aa, 0x00000219, 0x000001ff, 0x0000002e, 0x0004009a, 0x00000048, 0x0000021a, 0x00000219,
+ 0x000400a8, 0x00000048, 0x0000021b, 0x0000021a, 0x000300f7, 0x0000021d, 0x00000000, 0x000400fa,
+ 0x0000021b, 0x0000021c, 0x0000021d, 0x000200f8, 0x0000021c, 0x000500ba, 0x000001aa, 0x00000223,
+ 0x000001ff, 0x000005aa, 0x0004009a, 0x00000048, 0x00000224, 0x00000223, 0x000200f9, 0x0000021d,
+ 0x000200f8, 0x0000021d, 0x000700f5, 0x00000048, 0x00000225, 0x0000021a, 0x00000211, 0x00000224,
+ 0x0000021c, 0x000600a9, 0x0000000b, 0x00000a6f, 0x00000225, 0x00000229, 0x00000a67, 0x000600a9,
+ 0x0000000b, 0x00000a70, 0x00000225, 0x00000228, 0x00000a66, 0x00050080, 0x00000006, 0x0000022c,
+ 0x000001e2, 0x000001ca, 0x00060041, 0x00000079, 0x0000022e, 0x00000064, 0x00000040, 0x0000022c,
+ 0x0003003e, 0x0000022e, 0x0000061b, 0x00050080, 0x00000006, 0x00000231, 0x000001e5, 0x000001ca,
+ 0x00060041, 0x00000079, 0x00000233, 0x00000064, 0x00000040, 0x00000231, 0x0003003e, 0x00000233,
+ 0x00000a70, 0x00050080, 0x00000006, 0x00000236, 0x000001e8, 0x000001ca, 0x00060041, 0x00000079,
+ 0x00000238, 0x00000064, 0x00000040, 0x00000236, 0x0003003e, 0x00000238, 0x00000a6f, 0x000200f9,
+ 0x000001ef, 0x000200f8, 0x00000239, 0x00060041, 0x000001fa, 0x0000023b, 0x0000012f, 0x00000091,
+ 0x00000066, 0x0004003d, 0x0000000b, 0x0000023c, 0x0000023b, 0x0004007f, 0x0000000b, 0x0000023d,
+ 0x0000023c, 0x00050051, 0x00000008, 0x0000064c, 0x00000195, 0x00000000, 0x00050080, 0x00000008,
+ 0x0000064d, 0x0000064c, 0x00000030, 0x00050051, 0x00000008, 0x0000064f, 0x00000195, 0x00000001,
+ 0x00050051, 0x00000008, 0x00000651, 0x00000195, 0x00000002, 0x00060050, 0x00000009, 0x00000652,
+ 0x0000064d, 0x0000064f, 0x00000651, 0x00050083, 0x0000000c, 0x00000654, 0x000001cf, 0x0000013e,
+ 0x00050082, 0x00000009, 0x0000067a, 0x00000652, 0x00000a6c, 0x0004006f, 0x0000000c, 0x0000067b,
+ 0x0000067a, 0x0008000c, 0x0000000c, 0x0000067c, 0x00000001, 0x0000002b, 0x00000654, 0x0000002e,
+ 0x0000067b, 0x0006000c, 0x0000000c, 0x0000067e, 0x00000001, 0x00000008, 0x0000067c, 0x0004006e,
+ 0x00000009, 0x0000067f, 0x0000067e, 0x0004006f, 0x0000000c, 0x00000682, 0x0000067f, 0x00050083,
+ 0x0000000c, 0x00000683, 0x0000067c, 0x00000682, 0x000200f9, 0x00000684, 0x000200f8, 0x00000684,
+ 0x000700f5, 0x00000008, 0x00000a57, 0x00000040, 0x00000239, 0x000006af, 0x00000688, 0x000500b1,
+ 0x00000048, 0x00000687, 0x00000a57, 0x00000047, 0x000400f6, 0x000006b0, 0x00000688, 0x00000000,
+ 0x000400fa, 0x00000687, 0x00000688, 0x000006b0, 0x000200f8, 0x00000688, 0x000500c7, 0x00000008,
+ 0x0000068b, 0x00000a57, 0x00000030, 0x000500c3, 0x00000008, 0x0000068d, 0x00000a57, 0x00000030,
+ 0x000500c7, 0x00000008, 0x0000068e, 0x0000068d, 0x00000030, 0x000500c3, 0x00000008, 0x00000690,
+ 0x00000a57, 0x00000052, 0x000500c7, 0x00000008, 0x00000691, 0x00000690, 0x00000030, 0x00060050,
+ 0x00000009, 0x00000692, 0x0000068b, 0x0000068e, 0x00000691, 0x00050080, 0x00000009, 0x00000693,
+ 0x0000067f, 0x00000692, 0x0008000c, 0x00000009, 0x00000697, 0x00000001, 0x0000002d, 0x00000693,
+ 0x00000057, 0x0000067a, 0x00050051, 0x00000008, 0x0000069b, 0x00000697, 0x00000000, 0x00050051,
+ 0x00000008, 0x0000069f, 0x00000697, 0x00000001, 0x00050051, 0x00000008, 0x000006a3, 0x00000697,
+ 0x00000002, 0x00050084, 0x00000008, 0x000006a4, 0x0000064f, 0x000006a3, 0x00050080, 0x00000008,
+ 0x000006a5, 0x0000069f, 0x000006a4, 0x00050084, 0x00000008, 0x000006a6, 0x0000064d, 0x000006a5,
+ 0x00050080, 0x00000008, 0x000006a7, 0x0000069b, 0x000006a6, 0x0004007c, 0x00000006, 0x000006a8,
+ 0x000006a7, 0x00050080, 0x00000006, 0x000006a9, 0x000001d3, 0x000006a8, 0x00060041, 0x00000079,
+ 0x000006aa, 0x00000064, 0x00000040, 0x000006a9, 0x0004003d, 0x0000000b, 0x000006ab, 0x000006aa,
+ 0x00050041, 0x00000014, 0x000006ac, 0x00000674, 0x00000a57, 0x0003003e, 0x000006ac, 0x000006ab,
+ 0x00050080, 0x00000008, 0x000006af, 0x00000a57, 0x00000030, 0x000200f9, 0x00000684, 0x000200f8,
+ 0x000006b0, 0x00050041, 0x00000014, 0x000006b1, 0x00000674, 0x00000040, 0x0004003d, 0x0000000b,
+ 0x000006b2, 0x000006b1, 0x00050041, 0x00000014, 0x000006b3, 0x00000674, 0x00000030, 0x0004003d,
+ 0x0000000b, 0x000006b4, 0x000006b3, 0x00050051, 0x0000000b, 0x000006b6, 0x00000683, 0x00000000,
+ 0x0008000c, 0x0000000b, 0x000006b7, 0x00000001, 0x0000002e, 0x000006b2, 0x000006b4, 0x000006b6,
+ 0x00050041, 0x00000014, 0x000006b8, 0x00000674, 0x00000052, 0x0004003d, 0x0000000b, 0x000006b9,
+ 0x000006b8, 0x00050041, 0x00000014, 0x000006ba, 0x00000674, 0x00000088, 0x0004003d, 0x0000000b,
+ 0x000006bb, 0x000006ba, 0x0008000c, 0x0000000b, 0x000006be, 0x00000001, 0x0000002e, 0x000006b9,
+ 0x000006bb, 0x000006b6, 0x00050051, 0x0000000b, 0x000006c0, 0x00000683, 0x00000001, 0x0008000c,
+ 0x0000000b, 0x000006c1, 0x00000001, 0x0000002e, 0x000006b7, 0x000006be, 0x000006c0, 0x00050041,
+ 0x00000014, 0x000006c2, 0x00000674, 0x00000091, 0x0004003d, 0x0000000b, 0x000006c3, 0x000006c2,
+ 0x00050041, 0x00000014, 0x000006c4, 0x00000674, 0x00000094, 0x0004003d, 0x0000000b, 0x000006c5,
+ 0x000006c4, 0x0008000c, 0x0000000b, 0x000006c8, 0x00000001, 0x0000002e, 0x000006c3, 0x000006c5,
+ 0x000006b6, 0x00050041, 0x00000014, 0x000006c9, 0x00000674, 0x0000009a, 0x0004003d, 0x0000000b,
+ 0x000006ca, 0x000006c9, 0x00050041, 0x00000014, 0x000006cb, 0x00000674, 0x0000009d, 0x0004003d,
+ 0x0000000b, 0x000006cc, 0x000006cb, 0x0008000c, 0x0000000b, 0x000006cf, 0x00000001, 0x0000002e,
+ 0x000006ca, 0x000006cc, 0x000006b6, 0x0008000c, 0x0000000b, 0x000006d2, 0x00000001, 0x0000002e,
+ 0x000006c8, 0x000006cf, 0x000006c0, 0x00050051, 0x0000000b, 0x000006d4, 0x00000683, 0x00000002,
+ 0x0008000c, 0x0000000b, 0x000006d5, 0x00000001, 0x0000002e, 0x000006c1, 0x000006d2, 0x000006d4,
+ 0x00050080, 0x00000008, 0x0000065b, 0x0000064f, 0x00000030, 0x00060050, 0x00000009, 0x0000065e,
+ 0x0000064c, 0x0000065b, 0x00000651, 0x00050083, 0x0000000c, 0x00000660, 0x000001cf, 0x0000014e,
+ 0x00050082, 0x00000009, 0x000006e0, 0x0000065e, 0x00000a6c, 0x0004006f, 0x0000000c, 0x000006e1,
+ 0x000006e0, 0x0008000c, 0x0000000c, 0x000006e2, 0x00000001, 0x0000002b, 0x00000660, 0x0000002e,
+ 0x000006e1, 0x0006000c, 0x0000000c, 0x000006e4, 0x00000001, 0x00000008, 0x000006e2, 0x0004006e,
+ 0x00000009, 0x000006e5, 0x000006e4, 0x0004006f, 0x0000000c, 0x000006e8, 0x000006e5, 0x00050083,
+ 0x0000000c, 0x000006e9, 0x000006e2, 0x000006e8, 0x000200f9, 0x000006ea, 0x000200f8, 0x000006ea,
+ 0x000700f5, 0x00000008, 0x00000a58, 0x00000040, 0x000006b0, 0x00000715, 0x000006ee, 0x000500b1,
+ 0x00000048, 0x000006ed, 0x00000a58, 0x00000047, 0x000400f6, 0x00000716, 0x000006ee, 0x00000000,
+ 0x000400fa, 0x000006ed, 0x000006ee, 0x00000716, 0x000200f8, 0x000006ee, 0x000500c7, 0x00000008,
+ 0x000006f1, 0x00000a58, 0x00000030, 0x000500c3, 0x00000008, 0x000006f3, 0x00000a58, 0x00000030,
+ 0x000500c7, 0x00000008, 0x000006f4, 0x000006f3, 0x00000030, 0x000500c3, 0x00000008, 0x000006f6,
+ 0x00000a58, 0x00000052, 0x000500c7, 0x00000008, 0x000006f7, 0x000006f6, 0x00000030, 0x00060050,
+ 0x00000009, 0x000006f8, 0x000006f1, 0x000006f4, 0x000006f7, 0x00050080, 0x00000009, 0x000006f9,
+ 0x000006e5, 0x000006f8, 0x0008000c, 0x00000009, 0x000006fd, 0x00000001, 0x0000002d, 0x000006f9,
+ 0x00000057, 0x000006e0, 0x00050051, 0x00000008, 0x00000701, 0x000006fd, 0x00000000, 0x00050051,
+ 0x00000008, 0x00000705, 0x000006fd, 0x00000001, 0x00050051, 0x00000008, 0x00000709, 0x000006fd,
+ 0x00000002, 0x00050084, 0x00000008, 0x0000070a, 0x0000065b, 0x00000709, 0x00050080, 0x00000008,
+ 0x0000070b, 0x00000705, 0x0000070a, 0x00050084, 0x00000008, 0x0000070c, 0x0000064c, 0x0000070b,
+ 0x00050080, 0x00000008, 0x0000070d, 0x00000701, 0x0000070c, 0x0004007c, 0x00000006, 0x0000070e,
+ 0x0000070d, 0x00050080, 0x00000006, 0x0000070f, 0x000001d6, 0x0000070e, 0x00060041, 0x00000079,
+ 0x00000710, 0x00000064, 0x00000040, 0x0000070f, 0x0004003d, 0x0000000b, 0x00000711, 0x00000710,
+ 0x00050041, 0x00000014, 0x00000712, 0x000006da, 0x00000a58, 0x0003003e, 0x00000712, 0x00000711,
+ 0x00050080, 0x00000008, 0x00000715, 0x00000a58, 0x00000030, 0x000200f9, 0x000006ea, 0x000200f8,
+ 0x00000716, 0x00050041, 0x00000014, 0x00000717, 0x000006da, 0x00000040, 0x0004003d, 0x0000000b,
+ 0x00000718, 0x00000717, 0x00050041, 0x00000014, 0x00000719, 0x000006da, 0x00000030, 0x0004003d,
+ 0x0000000b, 0x0000071a, 0x00000719, 0x00050051, 0x0000000b, 0x0000071c, 0x000006e9, 0x00000000,
+ 0x0008000c, 0x0000000b, 0x0000071d, 0x00000001, 0x0000002e, 0x00000718, 0x0000071a, 0x0000071c,
+ 0x00050041, 0x00000014, 0x0000071e, 0x000006da, 0x00000052, 0x0004003d, 0x0000000b, 0x0000071f,
+ 0x0000071e, 0x00050041, 0x00000014, 0x00000720, 0x000006da, 0x00000088, 0x0004003d, 0x0000000b,
+ 0x00000721, 0x00000720, 0x0008000c, 0x0000000b, 0x00000724, 0x00000001, 0x0000002e, 0x0000071f,
+ 0x00000721, 0x0000071c, 0x00050051, 0x0000000b, 0x00000726, 0x000006e9, 0x00000001, 0x0008000c,
+ 0x0000000b, 0x00000727, 0x00000001, 0x0000002e, 0x0000071d, 0x00000724, 0x00000726, 0x00050041,
+ 0x00000014, 0x00000728, 0x000006da, 0x00000091, 0x0004003d, 0x0000000b, 0x00000729, 0x00000728,
+ 0x00050041, 0x00000014, 0x0000072a, 0x000006da, 0x00000094, 0x0004003d, 0x0000000b, 0x0000072b,
+ 0x0000072a, 0x0008000c, 0x0000000b, 0x0000072e, 0x00000001, 0x0000002e, 0x00000729, 0x0000072b,
+ 0x0000071c, 0x00050041, 0x00000014, 0x0000072f, 0x000006da, 0x0000009a, 0x0004003d, 0x0000000b,
+ 0x00000730, 0x0000072f, 0x00050041, 0x00000014, 0x00000731, 0x000006da, 0x0000009d, 0x0004003d,
+ 0x0000000b, 0x00000732, 0x00000731, 0x0008000c, 0x0000000b, 0x00000735, 0x00000001, 0x0000002e,
+ 0x00000730, 0x00000732, 0x0000071c, 0x0008000c, 0x0000000b, 0x00000738, 0x00000001, 0x0000002e,
+ 0x0000072e, 0x00000735, 0x00000726, 0x00050051, 0x0000000b, 0x0000073a, 0x000006e9, 0x00000002,
+ 0x0008000c, 0x0000000b, 0x0000073b, 0x00000001, 0x0000002e, 0x00000727, 0x00000738, 0x0000073a,
+ 0x00050080, 0x00000008, 0x00000669, 0x00000651, 0x00000030, 0x00060050, 0x00000009, 0x0000066a,
+ 0x0000064c, 0x0000064f, 0x00000669, 0x00050083, 0x0000000c, 0x0000066c, 0x000001cf, 0x0000015e,
+ 0x00050082, 0x00000009, 0x00000746, 0x0000066a, 0x00000a6c, 0x0004006f, 0x0000000c, 0x00000747,
+ 0x00000746, 0x0008000c, 0x0000000c, 0x00000748, 0x00000001, 0x0000002b, 0x0000066c, 0x0000002e,
+ 0x00000747, 0x0006000c, 0x0000000c, 0x0000074a, 0x00000001, 0x00000008, 0x00000748, 0x0004006e,
+ 0x00000009, 0x0000074b, 0x0000074a, 0x0004006f, 0x0000000c, 0x0000074e, 0x0000074b, 0x00050083,
+ 0x0000000c, 0x0000074f, 0x00000748, 0x0000074e, 0x000200f9, 0x00000750, 0x000200f8, 0x00000750,
+ 0x000700f5, 0x00000008, 0x00000a59, 0x00000040, 0x00000716, 0x0000077b, 0x00000754, 0x000500b1,
+ 0x00000048, 0x00000753, 0x00000a59, 0x00000047, 0x000400f6, 0x0000077c, 0x00000754, 0x00000000,
+ 0x000400fa, 0x00000753, 0x00000754, 0x0000077c, 0x000200f8, 0x00000754, 0x000500c7, 0x00000008,
+ 0x00000757, 0x00000a59, 0x00000030, 0x000500c3, 0x00000008, 0x00000759, 0x00000a59, 0x00000030,
+ 0x000500c7, 0x00000008, 0x0000075a, 0x00000759, 0x00000030, 0x000500c3, 0x00000008, 0x0000075c,
+ 0x00000a59, 0x00000052, 0x000500c7, 0x00000008, 0x0000075d, 0x0000075c, 0x00000030, 0x00060050,
+ 0x00000009, 0x0000075e, 0x00000757, 0x0000075a, 0x0000075d, 0x00050080, 0x00000009, 0x0000075f,
+ 0x0000074b, 0x0000075e, 0x0008000c, 0x00000009, 0x00000763, 0x00000001, 0x0000002d, 0x0000075f,
+ 0x00000057, 0x00000746, 0x00050051, 0x00000008, 0x00000767, 0x00000763, 0x00000000, 0x00050051,
+ 0x00000008, 0x0000076b, 0x00000763, 0x00000001, 0x00050051, 0x00000008, 0x0000076f, 0x00000763,
+ 0x00000002, 0x00050084, 0x00000008, 0x00000770, 0x0000064f, 0x0000076f, 0x00050080, 0x00000008,
+ 0x00000771, 0x0000076b, 0x00000770, 0x00050084, 0x00000008, 0x00000772, 0x0000064c, 0x00000771,
+ 0x00050080, 0x00000008, 0x00000773, 0x00000767, 0x00000772, 0x0004007c, 0x00000006, 0x00000774,
+ 0x00000773, 0x00050080, 0x00000006, 0x00000775, 0x000001d9, 0x00000774, 0x00060041, 0x00000079,
+ 0x00000776, 0x00000064, 0x00000040, 0x00000775, 0x0004003d, 0x0000000b, 0x00000777, 0x00000776,
+ 0x00050041, 0x00000014, 0x00000778, 0x00000740, 0x00000a59, 0x0003003e, 0x00000778, 0x00000777,
+ 0x00050080, 0x00000008, 0x0000077b, 0x00000a59, 0x00000030, 0x000200f9, 0x00000750, 0x000200f8,
+ 0x0000077c, 0x00050041, 0x00000014, 0x0000077d, 0x00000740, 0x00000040, 0x0004003d, 0x0000000b,
+ 0x0000077e, 0x0000077d, 0x00050041, 0x00000014, 0x0000077f, 0x00000740, 0x00000030, 0x0004003d,
+ 0x0000000b, 0x00000780, 0x0000077f, 0x00050051, 0x0000000b, 0x00000782, 0x0000074f, 0x00000000,
+ 0x0008000c, 0x0000000b, 0x00000783, 0x00000001, 0x0000002e, 0x0000077e, 0x00000780, 0x00000782,
+ 0x00050041, 0x00000014, 0x00000784, 0x00000740, 0x00000052, 0x0004003d, 0x0000000b, 0x00000785,
+ 0x00000784, 0x00050041, 0x00000014, 0x00000786, 0x00000740, 0x00000088, 0x0004003d, 0x0000000b,
+ 0x00000787, 0x00000786, 0x0008000c, 0x0000000b, 0x0000078a, 0x00000001, 0x0000002e, 0x00000785,
+ 0x00000787, 0x00000782, 0x00050051, 0x0000000b, 0x0000078c, 0x0000074f, 0x00000001, 0x0008000c,
+ 0x0000000b, 0x0000078d, 0x00000001, 0x0000002e, 0x00000783, 0x0000078a, 0x0000078c, 0x00050041,
+ 0x00000014, 0x0000078e, 0x00000740, 0x00000091, 0x0004003d, 0x0000000b, 0x0000078f, 0x0000078e,
+ 0x00050041, 0x00000014, 0x00000790, 0x00000740, 0x00000094, 0x0004003d, 0x0000000b, 0x00000791,
+ 0x00000790, 0x0008000c, 0x0000000b, 0x00000794, 0x00000001, 0x0000002e, 0x0000078f, 0x00000791,
+ 0x00000782, 0x00050041, 0x00000014, 0x00000795, 0x00000740, 0x0000009a, 0x0004003d, 0x0000000b,
+ 0x00000796, 0x00000795, 0x00050041, 0x00000014, 0x00000797, 0x00000740, 0x0000009d, 0x0004003d,
+ 0x0000000b, 0x00000798, 0x00000797, 0x0008000c, 0x0000000b, 0x0000079b, 0x00000001, 0x0000002e,
+ 0x00000796, 0x00000798, 0x00000782, 0x0008000c, 0x0000000b, 0x0000079e, 0x00000001, 0x0000002e,
+ 0x00000794, 0x0000079b, 0x0000078c, 0x00050051, 0x0000000b, 0x000007a0, 0x0000074f, 0x00000002,
+ 0x0008000c, 0x0000000b, 0x000007a1, 0x00000001, 0x0000002e, 0x0000078d, 0x0000079e, 0x000007a0,
+ 0x00060050, 0x0000000c, 0x0000066f, 0x000006d5, 0x0000073b, 0x000007a1, 0x00050085, 0x0000000b,
+ 0x0000062f, 0x0000023c, 0x00000a6e, 0x0005008e, 0x0000000c, 0x00000631, 0x0000066f, 0x0000062f,
+ 0x00050083, 0x0000000c, 0x00000632, 0x000001cf, 0x00000631, 0x00050083, 0x0000000c, 0x000007ba,
+ 0x00000632, 0x0000013e, 0x0008000c, 0x0000000c, 0x000007e2, 0x00000001, 0x0000002b, 0x000007ba,
+ 0x0000002e, 0x0000067b, 0x0006000c, 0x0000000c, 0x000007e4, 0x00000001, 0x00000008, 0x000007e2,
+ 0x0004006e, 0x00000009, 0x000007e5, 0x000007e4, 0x0004006f, 0x0000000c, 0x000007e8, 0x000007e5,
+ 0x00050083, 0x0000000c, 0x000007e9, 0x000007e2, 0x000007e8, 0x000200f9, 0x000007ea, 0x000200f8,
+ 0x000007ea, 0x000700f5, 0x00000008, 0x00000a5a, 0x00000040, 0x0000077c, 0x00000815, 0x000007ee,
+ 0x000500b1, 0x00000048, 0x000007ed, 0x00000a5a, 0x00000047, 0x000400f6, 0x00000816, 0x000007ee,
+ 0x00000000, 0x000400fa, 0x000007ed, 0x000007ee, 0x00000816, 0x000200f8, 0x000007ee, 0x000500c7,
+ 0x00000008, 0x000007f1, 0x00000a5a, 0x00000030, 0x000500c3, 0x00000008, 0x000007f3, 0x00000a5a,
+ 0x00000030, 0x000500c7, 0x00000008, 0x000007f4, 0x000007f3, 0x00000030, 0x000500c3, 0x00000008,
+ 0x000007f6, 0x00000a5a, 0x00000052, 0x000500c7, 0x00000008, 0x000007f7, 0x000007f6, 0x00000030,
+ 0x00060050, 0x00000009, 0x000007f8, 0x000007f1, 0x000007f4, 0x000007f7, 0x00050080, 0x00000009,
+ 0x000007f9, 0x000007e5, 0x000007f8, 0x0008000c, 0x00000009, 0x000007fd, 0x00000001, 0x0000002d,
+ 0x000007f9, 0x00000057, 0x0000067a, 0x00050051, 0x00000008, 0x00000801, 0x000007fd, 0x00000000,
+ 0x00050051, 0x00000008, 0x00000805, 0x000007fd, 0x00000001, 0x00050051, 0x00000008, 0x00000809,
+ 0x000007fd, 0x00000002, 0x00050084, 0x00000008, 0x0000080a, 0x0000064f, 0x00000809, 0x00050080,
+ 0x00000008, 0x0000080b, 0x00000805, 0x0000080a, 0x00050084, 0x00000008, 0x0000080c, 0x0000064d,
+ 0x0000080b, 0x00050080, 0x00000008, 0x0000080d, 0x00000801, 0x0000080c, 0x0004007c, 0x00000006,
+ 0x0000080e, 0x0000080d, 0x00050080, 0x00000006, 0x0000080f, 0x000001d3, 0x0000080e, 0x00060041,
+ 0x00000079, 0x00000810, 0x00000064, 0x00000040, 0x0000080f, 0x0004003d, 0x0000000b, 0x00000811,
+ 0x00000810, 0x00050041, 0x00000014, 0x00000812, 0x000007da, 0x00000a5a, 0x0003003e, 0x00000812,
+ 0x00000811, 0x00050080, 0x00000008, 0x00000815, 0x00000a5a, 0x00000030, 0x000200f9, 0x000007ea,
+ 0x000200f8, 0x00000816, 0x00050041, 0x00000014, 0x00000817, 0x000007da, 0x00000040, 0x0004003d,
+ 0x0000000b, 0x00000818, 0x00000817, 0x00050041, 0x00000014, 0x00000819, 0x000007da, 0x00000030,
+ 0x0004003d, 0x0000000b, 0x0000081a, 0x00000819, 0x00050051, 0x0000000b, 0x0000081c, 0x000007e9,
+ 0x00000000, 0x0008000c, 0x0000000b, 0x0000081d, 0x00000001, 0x0000002e, 0x00000818, 0x0000081a,
+ 0x0000081c, 0x00050041, 0x00000014, 0x0000081e, 0x000007da, 0x00000052, 0x0004003d, 0x0000000b,
+ 0x0000081f, 0x0000081e, 0x00050041, 0x00000014, 0x00000820, 0x000007da, 0x00000088, 0x0004003d,
+ 0x0000000b, 0x00000821, 0x00000820, 0x0008000c, 0x0000000b, 0x00000824, 0x00000001, 0x0000002e,
+ 0x0000081f, 0x00000821, 0x0000081c, 0x00050051, 0x0000000b, 0x00000826, 0x000007e9, 0x00000001,
+ 0x0008000c, 0x0000000b, 0x00000827, 0x00000001, 0x0000002e, 0x0000081d, 0x00000824, 0x00000826,
+ 0x00050041, 0x00000014, 0x00000828, 0x000007da, 0x00000091, 0x0004003d, 0x0000000b, 0x00000829,
+ 0x00000828, 0x00050041, 0x00000014, 0x0000082a, 0x000007da, 0x00000094, 0x0004003d, 0x0000000b,
+ 0x0000082b, 0x0000082a, 0x0008000c, 0x0000000b, 0x0000082e, 0x00000001, 0x0000002e, 0x00000829,
+ 0x0000082b, 0x0000081c, 0x00050041, 0x00000014, 0x0000082f, 0x000007da, 0x0000009a, 0x0004003d,
+ 0x0000000b, 0x00000830, 0x0000082f, 0x00050041, 0x00000014, 0x00000831, 0x000007da, 0x0000009d,
+ 0x0004003d, 0x0000000b, 0x00000832, 0x00000831, 0x0008000c, 0x0000000b, 0x00000835, 0x00000001,
+ 0x0000002e, 0x00000830, 0x00000832, 0x0000081c, 0x0008000c, 0x0000000b, 0x00000838, 0x00000001,
+ 0x0000002e, 0x0000082e, 0x00000835, 0x00000826, 0x00050051, 0x0000000b, 0x0000083a, 0x000007e9,
+ 0x00000002, 0x0008000c, 0x0000000b, 0x0000083b, 0x00000001, 0x0000002e, 0x00000827, 0x00000838,
+ 0x0000083a, 0x00050083, 0x0000000c, 0x000007c6, 0x00000632, 0x0000014e, 0x0008000c, 0x0000000c,
+ 0x00000848, 0x00000001, 0x0000002b, 0x000007c6, 0x0000002e, 0x000006e1, 0x0006000c, 0x0000000c,
+ 0x0000084a, 0x00000001, 0x00000008, 0x00000848, 0x0004006e, 0x00000009, 0x0000084b, 0x0000084a,
+ 0x0004006f, 0x0000000c, 0x0000084e, 0x0000084b, 0x00050083, 0x0000000c, 0x0000084f, 0x00000848,
+ 0x0000084e, 0x000200f9, 0x00000850, 0x000200f8, 0x00000850, 0x000700f5, 0x00000008, 0x00000a5b,
+ 0x00000040, 0x00000816, 0x0000087b, 0x00000854, 0x000500b1, 0x00000048, 0x00000853, 0x00000a5b,
+ 0x00000047, 0x000400f6, 0x0000087c, 0x00000854, 0x00000000, 0x000400fa, 0x00000853, 0x00000854,
+ 0x0000087c, 0x000200f8, 0x00000854, 0x000500c7, 0x00000008, 0x00000857, 0x00000a5b, 0x00000030,
+ 0x000500c3, 0x00000008, 0x00000859, 0x00000a5b, 0x00000030, 0x000500c7, 0x00000008, 0x0000085a,
+ 0x00000859, 0x00000030, 0x000500c3, 0x00000008, 0x0000085c, 0x00000a5b, 0x00000052, 0x000500c7,
+ 0x00000008, 0x0000085d, 0x0000085c, 0x00000030, 0x00060050, 0x00000009, 0x0000085e, 0x00000857,
+ 0x0000085a, 0x0000085d, 0x00050080, 0x00000009, 0x0000085f, 0x0000084b, 0x0000085e, 0x0008000c,
+ 0x00000009, 0x00000863, 0x00000001, 0x0000002d, 0x0000085f, 0x00000057, 0x000006e0, 0x00050051,
+ 0x00000008, 0x00000867, 0x00000863, 0x00000000, 0x00050051, 0x00000008, 0x0000086b, 0x00000863,
+ 0x00000001, 0x00050051, 0x00000008, 0x0000086f, 0x00000863, 0x00000002, 0x00050084, 0x00000008,
+ 0x00000870, 0x0000065b, 0x0000086f, 0x00050080, 0x00000008, 0x00000871, 0x0000086b, 0x00000870,
+ 0x00050084, 0x00000008, 0x00000872, 0x0000064c, 0x00000871, 0x00050080, 0x00000008, 0x00000873,
+ 0x00000867, 0x00000872, 0x0004007c, 0x00000006, 0x00000874, 0x00000873, 0x00050080, 0x00000006,
+ 0x00000875, 0x000001d6, 0x00000874, 0x00060041, 0x00000079, 0x00000876, 0x00000064, 0x00000040,
+ 0x00000875, 0x0004003d, 0x0000000b, 0x00000877, 0x00000876, 0x00050041, 0x00000014, 0x00000878,
+ 0x00000840, 0x00000a5b, 0x0003003e, 0x00000878, 0x00000877, 0x00050080, 0x00000008, 0x0000087b,
+ 0x00000a5b, 0x00000030, 0x000200f9, 0x00000850, 0x000200f8, 0x0000087c, 0x00050041, 0x00000014,
+ 0x0000087d, 0x00000840, 0x00000040, 0x0004003d, 0x0000000b, 0x0000087e, 0x0000087d, 0x00050041,
+ 0x00000014, 0x0000087f, 0x00000840, 0x00000030, 0x0004003d, 0x0000000b, 0x00000880, 0x0000087f,
+ 0x00050051, 0x0000000b, 0x00000882, 0x0000084f, 0x00000000, 0x0008000c, 0x0000000b, 0x00000883,
+ 0x00000001, 0x0000002e, 0x0000087e, 0x00000880, 0x00000882, 0x00050041, 0x00000014, 0x00000884,
+ 0x00000840, 0x00000052, 0x0004003d, 0x0000000b, 0x00000885, 0x00000884, 0x00050041, 0x00000014,
+ 0x00000886, 0x00000840, 0x00000088, 0x0004003d, 0x0000000b, 0x00000887, 0x00000886, 0x0008000c,
+ 0x0000000b, 0x0000088a, 0x00000001, 0x0000002e, 0x00000885, 0x00000887, 0x00000882, 0x00050051,
+ 0x0000000b, 0x0000088c, 0x0000084f, 0x00000001, 0x0008000c, 0x0000000b, 0x0000088d, 0x00000001,
+ 0x0000002e, 0x00000883, 0x0000088a, 0x0000088c, 0x00050041, 0x00000014, 0x0000088e, 0x00000840,
+ 0x00000091, 0x0004003d, 0x0000000b, 0x0000088f, 0x0000088e, 0x00050041, 0x00000014, 0x00000890,
+ 0x00000840, 0x00000094, 0x0004003d, 0x0000000b, 0x00000891, 0x00000890, 0x0008000c, 0x0000000b,
+ 0x00000894, 0x00000001, 0x0000002e, 0x0000088f, 0x00000891, 0x00000882, 0x00050041, 0x00000014,
+ 0x00000895, 0x00000840, 0x0000009a, 0x0004003d, 0x0000000b, 0x00000896, 0x00000895, 0x00050041,
+ 0x00000014, 0x00000897, 0x00000840, 0x0000009d, 0x0004003d, 0x0000000b, 0x00000898, 0x00000897,
+ 0x0008000c, 0x0000000b, 0x0000089b, 0x00000001, 0x0000002e, 0x00000896, 0x00000898, 0x00000882,
+ 0x0008000c, 0x0000000b, 0x0000089e, 0x00000001, 0x0000002e, 0x00000894, 0x0000089b, 0x0000088c,
+ 0x00050051, 0x0000000b, 0x000008a0, 0x0000084f, 0x00000002, 0x0008000c, 0x0000000b, 0x000008a1,
+ 0x00000001, 0x0000002e, 0x0000088d, 0x0000089e, 0x000008a0, 0x00050083, 0x0000000c, 0x000007d2,
+ 0x00000632, 0x0000015e, 0x0008000c, 0x0000000c, 0x000008ae, 0x00000001, 0x0000002b, 0x000007d2,
+ 0x0000002e, 0x00000747, 0x0006000c, 0x0000000c, 0x000008b0, 0x00000001, 0x00000008, 0x000008ae,
+ 0x0004006e, 0x00000009, 0x000008b1, 0x000008b0, 0x0004006f, 0x0000000c, 0x000008b4, 0x000008b1,
+ 0x00050083, 0x0000000c, 0x000008b5, 0x000008ae, 0x000008b4, 0x000200f9, 0x000008b6, 0x000200f8,
+ 0x000008b6, 0x000700f5, 0x00000008, 0x00000a5c, 0x00000040, 0x0000087c, 0x000008e1, 0x000008ba,
+ 0x000500b1, 0x00000048, 0x000008b9, 0x00000a5c, 0x00000047, 0x000400f6, 0x000008e2, 0x000008ba,
+ 0x00000000, 0x000400fa, 0x000008b9, 0x000008ba, 0x000008e2, 0x000200f8, 0x000008ba, 0x000500c7,
+ 0x00000008, 0x000008bd, 0x00000a5c, 0x00000030, 0x000500c3, 0x00000008, 0x000008bf, 0x00000a5c,
+ 0x00000030, 0x000500c7, 0x00000008, 0x000008c0, 0x000008bf, 0x00000030, 0x000500c3, 0x00000008,
+ 0x000008c2, 0x00000a5c, 0x00000052, 0x000500c7, 0x00000008, 0x000008c3, 0x000008c2, 0x00000030,
+ 0x00060050, 0x00000009, 0x000008c4, 0x000008bd, 0x000008c0, 0x000008c3, 0x00050080, 0x00000009,
+ 0x000008c5, 0x000008b1, 0x000008c4, 0x0008000c, 0x00000009, 0x000008c9, 0x00000001, 0x0000002d,
+ 0x000008c5, 0x00000057, 0x00000746, 0x00050051, 0x00000008, 0x000008cd, 0x000008c9, 0x00000000,
+ 0x00050051, 0x00000008, 0x000008d1, 0x000008c9, 0x00000001, 0x00050051, 0x00000008, 0x000008d5,
+ 0x000008c9, 0x00000002, 0x00050084, 0x00000008, 0x000008d6, 0x0000064f, 0x000008d5, 0x00050080,
+ 0x00000008, 0x000008d7, 0x000008d1, 0x000008d6, 0x00050084, 0x00000008, 0x000008d8, 0x0000064c,
+ 0x000008d7, 0x00050080, 0x00000008, 0x000008d9, 0x000008cd, 0x000008d8, 0x0004007c, 0x00000006,
+ 0x000008da, 0x000008d9, 0x00050080, 0x00000006, 0x000008db, 0x000001d9, 0x000008da, 0x00060041,
+ 0x00000079, 0x000008dc, 0x00000064, 0x00000040, 0x000008db, 0x0004003d, 0x0000000b, 0x000008dd,
+ 0x000008dc, 0x00050041, 0x00000014, 0x000008de, 0x000008a6, 0x00000a5c, 0x0003003e, 0x000008de,
+ 0x000008dd, 0x00050080, 0x00000008, 0x000008e1, 0x00000a5c, 0x00000030, 0x000200f9, 0x000008b6,
+ 0x000200f8, 0x000008e2, 0x00050041, 0x00000014, 0x000008e3, 0x000008a6, 0x00000040, 0x0004003d,
+ 0x0000000b, 0x000008e4, 0x000008e3, 0x00050041, 0x00000014, 0x000008e5, 0x000008a6, 0x00000030,
+ 0x0004003d, 0x0000000b, 0x000008e6, 0x000008e5, 0x00050051, 0x0000000b, 0x000008e8, 0x000008b5,
+ 0x00000000, 0x0008000c, 0x0000000b, 0x000008e9, 0x00000001, 0x0000002e, 0x000008e4, 0x000008e6,
+ 0x000008e8, 0x00050041, 0x00000014, 0x000008ea, 0x000008a6, 0x00000052, 0x0004003d, 0x0000000b,
+ 0x000008eb, 0x000008ea, 0x00050041, 0x00000014, 0x000008ec, 0x000008a6, 0x00000088, 0x0004003d,
+ 0x0000000b, 0x000008ed, 0x000008ec, 0x0008000c, 0x0000000b, 0x000008f0, 0x00000001, 0x0000002e,
+ 0x000008eb, 0x000008ed, 0x000008e8, 0x00050051, 0x0000000b, 0x000008f2, 0x000008b5, 0x00000001,
+ 0x0008000c, 0x0000000b, 0x000008f3, 0x00000001, 0x0000002e, 0x000008e9, 0x000008f0, 0x000008f2,
+ 0x00050041, 0x00000014, 0x000008f4, 0x000008a6, 0x00000091, 0x0004003d, 0x0000000b, 0x000008f5,
+ 0x000008f4, 0x00050041, 0x00000014, 0x000008f6, 0x000008a6, 0x00000094, 0x0004003d, 0x0000000b,
+ 0x000008f7, 0x000008f6, 0x0008000c, 0x0000000b, 0x000008fa, 0x00000001, 0x0000002e, 0x000008f5,
+ 0x000008f7, 0x000008e8, 0x00050041, 0x00000014, 0x000008fb, 0x000008a6, 0x0000009a, 0x0004003d,
+ 0x0000000b, 0x000008fc, 0x000008fb, 0x00050041, 0x00000014, 0x000008fd, 0x000008a6, 0x0000009d,
+ 0x0004003d, 0x0000000b, 0x000008fe, 0x000008fd, 0x0008000c, 0x0000000b, 0x00000901, 0x00000001,
+ 0x0000002e, 0x000008fc, 0x000008fe, 0x000008e8, 0x0008000c, 0x0000000b, 0x00000904, 0x00000001,
+ 0x0000002e, 0x000008fa, 0x00000901, 0x000008f2, 0x00050051, 0x0000000b, 0x00000906, 0x000008b5,
+ 0x00000002, 0x0008000c, 0x0000000b, 0x00000907, 0x00000001, 0x0000002e, 0x000008f3, 0x00000904,
+ 0x00000906, 0x00060050, 0x0000000c, 0x000007d5, 0x0000083b, 0x000008a1, 0x00000907, 0x0005008e,
+ 0x0000000c, 0x0000063a, 0x000007d5, 0x0000023d, 0x00050083, 0x0000000c, 0x0000063b, 0x000001cf,
+ 0x0000063a, 0x00050083, 0x0000000c, 0x00000249, 0x0000063b, 0x000001ba, 0x00050082, 0x00000009,
+ 0x00000913, 0x000001a1, 0x00000a6c, 0x0004006f, 0x0000000c, 0x00000914, 0x00000913, 0x0008000c,
+ 0x0000000c, 0x00000915, 0x00000001, 0x0000002b, 0x00000249, 0x0000002e, 0x00000914, 0x0006000c,
+ 0x0000000c, 0x00000917, 0x00000001, 0x00000008, 0x00000915, 0x0004006e, 0x00000009, 0x00000918,
+ 0x00000917, 0x0004006f, 0x0000000c, 0x0000091b, 0x00000918, 0x00050083, 0x0000000c, 0x0000091c,
+ 0x00000915, 0x0000091b, 0x000200f9, 0x0000091d, 0x000200f8, 0x0000091d, 0x000700f5, 0x00000008,
+ 0x00000a5d, 0x00000040, 0x000008e2, 0x00000948, 0x00000921, 0x000500b1, 0x00000048, 0x00000920,
+ 0x00000a5d, 0x00000047, 0x000400f6, 0x00000949, 0x00000921, 0x00000000, 0x000400fa, 0x00000920,
+ 0x00000921, 0x00000949, 0x000200f8, 0x00000921, 0x000500c7, 0x00000008, 0x00000924, 0x00000a5d,
+ 0x00000030, 0x000500c3, 0x00000008, 0x00000926, 0x00000a5d, 0x00000030, 0x000500c7, 0x00000008,
+ 0x00000927, 0x00000926, 0x00000030, 0x000500c3, 0x00000008, 0x00000929, 0x00000a5d, 0x00000052,
+ 0x000500c7, 0x00000008, 0x0000092a, 0x00000929, 0x00000030, 0x00060050, 0x00000009, 0x0000092b,
+ 0x00000924, 0x00000927, 0x0000092a, 0x00050080, 0x00000009, 0x0000092c, 0x00000918, 0x0000092b,
+ 0x0008000c, 0x00000009, 0x00000930, 0x00000001, 0x0000002d, 0x0000092c, 0x00000057, 0x00000913,
+ 0x00050051, 0x00000008, 0x00000934, 0x00000930, 0x00000000, 0x00050051, 0x00000008, 0x00000938,
+ 0x00000930, 0x00000001, 0x00050051, 0x00000008, 0x0000093c, 0x00000930, 0x00000002, 0x00050084,
+ 0x00000008, 0x0000093d, 0x000001c3, 0x0000093c, 0x00050080, 0x00000008, 0x0000093e, 0x00000938,
+ 0x0000093d, 0x00050084, 0x00000008, 0x0000093f, 0x000001bf, 0x0000093e, 0x00050080, 0x00000008,
+ 0x00000940, 0x00000934, 0x0000093f, 0x0004007c, 0x00000006, 0x00000941, 0x00000940, 0x00050080,
+ 0x00000006, 0x00000942, 0x000001e2, 0x00000941, 0x00060041, 0x00000079, 0x00000943, 0x00000064,
+ 0x00000040, 0x00000942, 0x0004003d, 0x0000000b, 0x00000944, 0x00000943, 0x00050041, 0x00000014,
+ 0x00000945, 0x0000090c, 0x00000a5d, 0x0003003e, 0x00000945, 0x00000944, 0x00050080, 0x00000008,
+ 0x00000948, 0x00000a5d, 0x00000030, 0x000200f9, 0x0000091d, 0x000200f8, 0x00000949, 0x00050041,
+ 0x00000014, 0x00000961, 0x0000090c, 0x00000040, 0x0004003d, 0x0000000b, 0x00000962, 0x00000961,
+ 0x00050041, 0x00000014, 0x00000963, 0x0000090c, 0x00000030, 0x0004003d, 0x0000000b, 0x00000964,
+ 0x00000963, 0x00050051, 0x0000000b, 0x00000966, 0x0000091c, 0x00000000, 0x0008000c, 0x0000000b,
+ 0x00000967, 0x00000001, 0x0000002e, 0x00000962, 0x00000964, 0x00000966, 0x00050041, 0x00000014,
+ 0x00000968, 0x0000090c, 0x00000052, 0x0004003d, 0x0000000b, 0x00000969, 0x00000968, 0x00050041,
+ 0x00000014, 0x0000096a, 0x0000090c, 0x00000088, 0x0004003d, 0x0000000b, 0x0000096b, 0x0000096a,
+ 0x0008000c, 0x0000000b, 0x0000096e, 0x00000001, 0x0000002e, 0x00000969, 0x0000096b, 0x00000966,
+ 0x00050051, 0x0000000b, 0x00000970, 0x0000091c, 0x00000001, 0x0008000c, 0x0000000b, 0x00000971,
+ 0x00000001, 0x0000002e, 0x00000967, 0x0000096e, 0x00000970, 0x00050041, 0x00000014, 0x00000972,
+ 0x0000090c, 0x00000091, 0x0004003d, 0x0000000b, 0x00000973, 0x00000972, 0x00050041, 0x00000014,
+ 0x00000974, 0x0000090c, 0x00000094, 0x0004003d, 0x0000000b, 0x00000975, 0x00000974, 0x0008000c,
+ 0x0000000b, 0x00000978, 0x00000001, 0x0000002e, 0x00000973, 0x00000975, 0x00000966, 0x00050041,
+ 0x00000014, 0x00000979, 0x0000090c, 0x0000009a, 0x0004003d, 0x0000000b, 0x0000097a, 0x00000979,
+ 0x00050041, 0x00000014, 0x0000097b, 0x0000090c, 0x0000009d, 0x0004003d, 0x0000000b, 0x0000097c,
+ 0x0000097b, 0x0008000c, 0x0000000b, 0x0000097f, 0x00000001, 0x0000002e, 0x0000097a, 0x0000097c,
+ 0x00000966, 0x0008000c, 0x0000000b, 0x00000982, 0x00000001, 0x0000002e, 0x00000978, 0x0000097f,
+ 0x00000970, 0x00050051, 0x0000000b, 0x00000984, 0x0000091c, 0x00000002, 0x0008000c, 0x0000000b,
+ 0x00000985, 0x00000001, 0x0000002e, 0x00000971, 0x00000982, 0x00000984, 0x00050080, 0x00000006,
+ 0x0000025b, 0x000001e2, 0x000001ca, 0x00060041, 0x00000079, 0x0000025c, 0x00000064, 0x00000040,
+ 0x0000025b, 0x0004003d, 0x0000000b, 0x0000025d, 0x0000025c, 0x00050080, 0x00000006, 0x00000262,
+ 0x000001dc, 0x000001ca, 0x00060041, 0x00000079, 0x00000263, 0x00000064, 0x00000040, 0x00000262,
+ 0x0004003d, 0x0000000b, 0x00000264, 0x00000263, 0x00050083, 0x0000000b, 0x00000266, 0x00000264,
+ 0x00000985, 0x00050085, 0x0000000b, 0x00000267, 0x0000013d, 0x00000266, 0x00050081, 0x0000000b,
+ 0x00000268, 0x0000025d, 0x00000267, 0x000500b8, 0x000001aa, 0x0000026c, 0x00000249, 0x0000002e,
+ 0x0004009a, 0x00000048, 0x0000026d, 0x0000026c, 0x000400a8, 0x00000048, 0x0000026e, 0x0000026d,
+ 0x000300f7, 0x00000270, 0x00000000, 0x000400fa, 0x0000026e, 0x0000026f, 0x00000270, 0x000200f8,
+ 0x0000026f, 0x000500ba, 0x000001aa, 0x00000276, 0x00000249, 0x00000914, 0x0004009a, 0x00000048,
+ 0x00000277, 0x00000276, 0x000200f9, 0x00000270, 0x000200f8, 0x00000270, 0x000700f5, 0x00000048,
+ 0x00000278, 0x0000026d, 0x00000949, 0x00000277, 0x0000026f, 0x00050080, 0x00000006, 0x0000027b,
+ 0x000001df, 0x000001ca, 0x000400a8, 0x00000048, 0x0000027d, 0x00000278, 0x000300f7, 0x0000027f,
+ 0x00000000, 0x000400fa, 0x0000027d, 0x0000027e, 0x0000027f, 0x000200f8, 0x0000027e, 0x00050080,
+ 0x00000006, 0x00000283, 0x000001e5, 0x000001ca, 0x00060041, 0x00000079, 0x00000284, 0x00000064,
+ 0x00000040, 0x00000283, 0x0004003d, 0x0000000b, 0x00000285, 0x00000284, 0x000500b8, 0x00000048,
+ 0x00000286, 0x00000268, 0x00000285, 0x000200f9, 0x0000027f, 0x000200f8, 0x0000027f, 0x000700f5,
+ 0x00000048, 0x00000287, 0x00000278, 0x00000270, 0x00000286, 0x0000027e, 0x000400a8, 0x00000048,
+ 0x00000288, 0x00000287, 0x000300f7, 0x0000028a, 0x00000000, 0x000400fa, 0x00000288, 0x00000289,
+ 0x0000028a, 0x000200f8, 0x00000289, 0x00050080, 0x00000006, 0x0000028e, 0x000001e8, 0x000001ca,
+ 0x00060041, 0x00000079, 0x0000028f, 0x00000064, 0x00000040, 0x0000028e, 0x0004003d, 0x0000000b,
+ 0x00000290, 0x0000028f, 0x000500ba, 0x00000048, 0x00000291, 0x00000268, 0x00000290, 0x000200f9,
+ 0x0000028a, 0x000200f8, 0x0000028a, 0x000700f5, 0x00000048, 0x00000292, 0x00000287, 0x0000027f,
+ 0x00000291, 0x00000289, 0x000600a9, 0x0000000b, 0x00000295, 0x00000292, 0x0000025d, 0x00000268,
+ 0x00060041, 0x00000079, 0x00000296, 0x00000064, 0x00000040, 0x0000027b, 0x0003003e, 0x00000296,
+ 0x00000295, 0x000200f9, 0x000001ef, 0x000200f8, 0x000001ef, 0x000200f9, 0x000002ad, 0x000200f8,
+ 0x000002ad, 0x000100fd, 0x00010038,
+};
+static const uint32_t spv_adv_scalars[] = {
+ 0x07230203, 0x00010300, 0x000d000b, 0x00000ad6, 0x00000000, 0x00020011, 0x00000001, 0x0006000b,
+ 0x00000001, 0x4c534c47, 0x6474732e, 0x3035342e, 0x00000000, 0x0003000e, 0x00000000, 0x00000001,
+ 0x0006000f, 0x00000005, 0x00000004, 0x6e69616d, 0x00000000, 0x000001b0, 0x00060010, 0x00000004,
+ 0x00000011, 0x00000008, 0x00000008, 0x00000004, 0x00030047, 0x00000037, 0x00000002, 0x00050048,
+ 0x00000037, 0x00000000, 0x00000023, 0x00000000, 0x00050048, 0x00000037, 0x00000001, 0x00000023,
+ 0x00000010, 0x00050048, 0x00000037, 0x00000002, 0x00000023, 0x00000020, 0x00050048, 0x00000037,
+ 0x00000003, 0x00000023, 0x00000030, 0x00050048, 0x00000037, 0x00000004, 0x00000023, 0x00000040,
+ 0x00050048, 0x00000037, 0x00000005, 0x00000023, 0x00000050, 0x00050048, 0x00000037, 0x00000006,
+ 0x00000023, 0x00000060, 0x00040047, 0x0000007e, 0x00000006, 0x00000004, 0x00030047, 0x0000007f,
+ 0x00000002, 0x00050048, 0x0000007f, 0x00000000, 0x00000023, 0x00000000, 0x00040047, 0x00000081,
+ 0x00000021, 0x00000000, 0x00040047, 0x00000081, 0x00000022, 0x00000000, 0x00040047, 0x000001b0,
+ 0x0000000b, 0x0000001c, 0x00040047, 0x000002c9, 0x0000000b, 0x00000019, 0x00020013, 0x00000002,
+ 0x00030021, 0x00000003, 0x00000002, 0x00040015, 0x00000006, 0x00000020, 0x00000001, 0x00040015,
+ 0x00000008, 0x00000020, 0x00000000, 0x00040017, 0x00000010, 0x00000006, 0x00000003, 0x00030016,
+ 0x00000012, 0x00000020, 0x00040017, 0x00000013, 0x00000012, 0x00000003, 0x00040020, 0x0000001b,
+ 0x00000007, 0x00000012, 0x00040017, 0x00000034, 0x00000006, 0x00000004, 0x00040017, 0x00000035,
+ 0x00000008, 0x00000004, 0x00040017, 0x00000036, 0x00000012, 0x00000004, 0x0009001e, 0x00000037,
+ 0x00000034, 0x00000035, 0x00000035, 0x00000035, 0x00000036, 0x00000036, 0x00000036, 0x00040020,
+ 0x00000038, 0x00000009, 0x00000037, 0x0004003b, 0x00000038, 0x00000039, 0x00000009, 0x0004002b,
+ 0x00000006, 0x0000003a, 0x00000000, 0x0004002b, 0x00000008, 0x0000003b, 0x00000000, 0x00040020,
+ 0x0000003c, 0x00000009, 0x00000006, 0x0004002b, 0x00000008, 0x00000040, 0x00000001, 0x0004002b,
+ 0x00000012, 0x0000004c, 0x00000000, 0x0006002c, 0x00000013, 0x0000004d, 0x0000004c, 0x0000004c,
+ 0x0000004c, 0x0004002b, 0x00000006, 0x0000004f, 0x00000001, 0x0004002b, 0x00000006, 0x00000064,
+ 0x00000008, 0x00020014, 0x00000065, 0x0004002b, 0x00000006, 0x0000006f, 0x00000002, 0x0006002c,
+ 0x00000010, 0x00000074, 0x0000003a, 0x0000003a, 0x0000003a, 0x0004002b, 0x00000008, 0x00000079,
+ 0x00000008, 0x0004001c, 0x0000007a, 0x00000012, 0x00000079, 0x00040020, 0x0000007b, 0x00000007,
+ 0x0000007a, 0x0003001d, 0x0000007e, 0x00000012, 0x0003001e, 0x0000007f, 0x0000007e, 0x00040020,
+ 0x00000080, 0x0000000c, 0x0000007f, 0x0004003b, 0x00000080, 0x00000081, 0x0000000c, 0x0004002b,
+ 0x00000008, 0x0000008b, 0x00000002, 0x00040020, 0x00000094, 0x0000000c, 0x00000012, 0x0004002b,
+ 0x00000006, 0x000000a3, 0x00000003, 0x0004002b, 0x00000006, 0x000000ac, 0x00000004, 0x0004002b,
+ 0x00000006, 0x000000af, 0x00000005, 0x0004002b, 0x00000006, 0x000000b5, 0x00000006, 0x0004002b,
+ 0x00000006, 0x000000b8, 0x00000007, 0x0004002b, 0x00000012, 0x000000c7, 0xbf800000, 0x0006002c,
+ 0x00000013, 0x000000c8, 0x000000c7, 0x000000c7, 0x000000c7, 0x00040017, 0x000000ec, 0x00000065,
+ 0x00000003, 0x00040020, 0x00000155, 0x00000009, 0x00000034, 0x0004002b, 0x00000012, 0x00000162,
+ 0x3f000000, 0x0006002c, 0x00000013, 0x00000163, 0x0000004c, 0x00000162, 0x00000162, 0x0006002c,
+ 0x00000013, 0x00000173, 0x00000162, 0x0000004c, 0x00000162, 0x0006002c, 0x00000013, 0x00000183,
+ 0x00000162, 0x00000162, 0x0000004c, 0x00040017, 0x000001ae, 0x00000008, 0x00000003, 0x00040020,
+ 0x000001af, 0x00000001, 0x000001ae, 0x0004003b, 0x000001af, 0x000001b0, 0x00000001, 0x00040020,
+ 0x000001d7, 0x00000009, 0x00000008, 0x0004002b, 0x00000008, 0x000001e1, 0x00000003, 0x00040020,
+ 0x000001f6, 0x00000009, 0x00000012, 0x0004002b, 0x00000008, 0x00000203, 0x00000004, 0x0006002c,
+ 0x000001ae, 0x000002c9, 0x00000079, 0x00000079, 0x00000203, 0x0006002c, 0x00000013, 0x00000acf,
+ 0x00000162, 0x00000162, 0x00000162, 0x0006002c, 0x00000010, 0x00000ad0, 0x0000004f, 0x0000004f,
+ 0x0000004f, 0x0006002c, 0x00000013, 0x00000ad2, 0x00000162, 0x0000004c, 0x0000004c, 0x0006002c,
+ 0x00000013, 0x00000ad3, 0x0000004c, 0x00000162, 0x0000004c, 0x0006002c, 0x00000013, 0x00000ad4,
+ 0x0000004c, 0x0000004c, 0x00000162, 0x0004002b, 0x00000012, 0x00000ad5, 0xbf000000, 0x00050036,
+ 0x00000002, 0x00000004, 0x00000000, 0x00000003, 0x000200f8, 0x00000005, 0x0004003b, 0x0000007b,
+ 0x00000958, 0x00000007, 0x0004003b, 0x0000007b, 0x000008f1, 0x00000007, 0x0004003b, 0x0000007b,
+ 0x0000088b, 0x00000007, 0x0004003b, 0x0000007b, 0x00000825, 0x00000007, 0x0004003b, 0x0000007b,
+ 0x0000078b, 0x00000007, 0x0004003b, 0x0000007b, 0x00000725, 0x00000007, 0x0004003b, 0x0000007b,
+ 0x000006bf, 0x00000007, 0x0004003b, 0x0000007b, 0x000005e2, 0x00000007, 0x0004003b, 0x0000007b,
+ 0x0000057b, 0x00000007, 0x0004003b, 0x0000007b, 0x00000515, 0x00000007, 0x0004003b, 0x0000007b,
+ 0x000004af, 0x00000007, 0x0004003b, 0x0000007b, 0x00000415, 0x00000007, 0x0004003b, 0x0000007b,
+ 0x000003af, 0x00000007, 0x0004003b, 0x0000007b, 0x00000349, 0x00000007, 0x000300f7, 0x000002de,
+ 0x00000000, 0x000300fb, 0x0000003b, 0x000002df, 0x000200f8, 0x000002df, 0x0004003d, 0x000001ae,
+ 0x000001b1, 0x000001b0, 0x0004007c, 0x00000010, 0x000001b2, 0x000001b1, 0x00050041, 0x00000155,
+ 0x000001b4, 0x00000039, 0x0000003a, 0x0004003d, 0x00000034, 0x000001b5, 0x000001b4, 0x0008004f,
+ 0x00000010, 0x000001b6, 0x000001b5, 0x000001b5, 0x00000000, 0x00000001, 0x00000002, 0x000500af,
+ 0x000000ec, 0x000001b7, 0x000001b2, 0x000001b6, 0x0004009a, 0x00000065, 0x000001b8, 0x000001b7,
+ 0x000300f7, 0x000001ba, 0x00000000, 0x000400fa, 0x000001b8, 0x000001b9, 0x000001ba, 0x000200f8,
+ 0x000001b9, 0x000200f9, 0x000002de, 0x000200f8, 0x000001ba, 0x00060041, 0x0000003c, 0x000001bd,
+ 0x00000039, 0x0000003a, 0x0000003b, 0x0004003d, 0x00000006, 0x000001be, 0x000001bd, 0x00060041,
+ 0x0000003c, 0x000001bf, 0x00000039, 0x0000003a, 0x00000040, 0x0004003d, 0x00000006, 0x000001c0,
+ 0x000001bf, 0x00050084, 0x00000006, 0x000001c1, 0x000001be, 0x000001c0, 0x00060041, 0x0000003c,
+ 0x000001c2, 0x00000039, 0x0000003a, 0x0000008b, 0x0004003d, 0x00000006, 0x000001c3, 0x000001c2,
+ 0x00050084, 0x00000006, 0x000001c4, 0x000001c1, 0x000001c3, 0x0004007c, 0x00000008, 0x000001c5,
+ 0x000001c4, 0x00050051, 0x00000006, 0x000001c9, 0x000001b2, 0x00000000, 0x00050051, 0x00000006,
+ 0x000001cc, 0x000001b2, 0x00000001, 0x00050051, 0x00000006, 0x000001cf, 0x000001b2, 0x00000002,
+ 0x00050084, 0x00000006, 0x000002ec, 0x000001c0, 0x000001cf, 0x00050080, 0x00000006, 0x000002ed,
+ 0x000001cc, 0x000002ec, 0x00050084, 0x00000006, 0x000002ee, 0x000001be, 0x000002ed, 0x00050080,
+ 0x00000006, 0x000002ef, 0x000001c9, 0x000002ee, 0x0004007c, 0x00000008, 0x000002f0, 0x000002ef,
+ 0x0004006f, 0x00000013, 0x000001d3, 0x000001b2, 0x00050081, 0x00000013, 0x000001d5, 0x000001d3,
+ 0x00000acf, 0x00060041, 0x000001d7, 0x000001d8, 0x00000039, 0x0000004f, 0x0000003b, 0x0004003d,
+ 0x00000008, 0x000001d9, 0x000001d8, 0x00060041, 0x000001d7, 0x000001db, 0x00000039, 0x0000004f,
+ 0x00000040, 0x0004003d, 0x00000008, 0x000001dc, 0x000001db, 0x00060041, 0x000001d7, 0x000001de,
+ 0x00000039, 0x0000004f, 0x0000008b, 0x0004003d, 0x00000008, 0x000001df, 0x000001de, 0x00060041,
+ 0x000001d7, 0x000001e2, 0x00000039, 0x0000004f, 0x000001e1, 0x0004003d, 0x00000008, 0x000001e3,
+ 0x000001e2, 0x00060041, 0x000001d7, 0x000001e5, 0x00000039, 0x0000006f, 0x0000003b, 0x0004003d,
+ 0x00000008, 0x000001e6, 0x000001e5, 0x00060041, 0x0000003c, 0x000001e7, 0x00000039, 0x0000003a,
+ 0x000001e1, 0x0004003d, 0x00000006, 0x000001e8, 0x000001e7, 0x000500aa, 0x00000065, 0x000001e9,
+ 0x000001e8, 0x0000003a, 0x000300f7, 0x000001eb, 0x00000000, 0x000400fa, 0x000001e9, 0x000001ea,
+ 0x00000236, 0x000200f8, 0x000001ea, 0x00060041, 0x000001f6, 0x000001f7, 0x00000039, 0x000000ac,
+ 0x0000003b, 0x0004003d, 0x00000012, 0x000001f8, 0x000001f7, 0x00050051, 0x00000006, 0x00000321,
+ 0x000001b5, 0x00000000, 0x00050080, 0x00000006, 0x00000322, 0x00000321, 0x0000004f, 0x00050051,
+ 0x00000006, 0x00000324, 0x000001b5, 0x00000001, 0x00050051, 0x00000006, 0x00000326, 0x000001b5,
+ 0x00000002, 0x00060050, 0x00000010, 0x00000327, 0x00000322, 0x00000324, 0x00000326, 0x00050081,
+ 0x00000013, 0x00000329, 0x000001d3, 0x00000ad2, 0x00050082, 0x00000010, 0x0000034f, 0x00000327,
+ 0x00000ad0, 0x0004006f, 0x00000013, 0x00000350, 0x0000034f, 0x0008000c, 0x00000013, 0x00000351,
+ 0x00000001, 0x0000002b, 0x00000329, 0x0000004d, 0x00000350, 0x0006000c, 0x00000013, 0x00000353,
+ 0x00000001, 0x00000008, 0x00000351, 0x0004006e, 0x00000010, 0x00000354, 0x00000353, 0x0004006f,
+ 0x00000013, 0x00000357, 0x00000354, 0x00050083, 0x00000013, 0x00000358, 0x00000351, 0x00000357,
+ 0x000200f9, 0x00000359, 0x000200f8, 0x00000359, 0x000700f5, 0x00000006, 0x00000abb, 0x0000003a,
+ 0x000001ea, 0x00000384, 0x0000035d, 0x000500b1, 0x00000065, 0x0000035c, 0x00000abb, 0x00000064,
+ 0x000400f6, 0x00000385, 0x0000035d, 0x00000000, 0x000400fa, 0x0000035c, 0x0000035d, 0x00000385,
+ 0x000200f8, 0x0000035d, 0x000500c7, 0x00000006, 0x00000360, 0x00000abb, 0x0000004f, 0x000500c3,
+ 0x00000006, 0x00000362, 0x00000abb, 0x0000004f, 0x000500c7, 0x00000006, 0x00000363, 0x00000362,
+ 0x0000004f, 0x000500c3, 0x00000006, 0x00000365, 0x00000abb, 0x0000006f, 0x000500c7, 0x00000006,
+ 0x00000366, 0x00000365, 0x0000004f, 0x00060050, 0x00000010, 0x00000367, 0x00000360, 0x00000363,
+ 0x00000366, 0x00050080, 0x00000010, 0x00000368, 0x00000354, 0x00000367, 0x0008000c, 0x00000010,
+ 0x0000036c, 0x00000001, 0x0000002d, 0x00000368, 0x00000074, 0x0000034f, 0x00050051, 0x00000006,
+ 0x00000370, 0x0000036c, 0x00000000, 0x00050051, 0x00000006, 0x00000374, 0x0000036c, 0x00000001,
+ 0x00050051, 0x00000006, 0x00000378, 0x0000036c, 0x00000002, 0x00050084, 0x00000006, 0x00000379,
+ 0x00000324, 0x00000378, 0x00050080, 0x00000006, 0x0000037a, 0x00000374, 0x00000379, 0x00050084,
+ 0x00000006, 0x0000037b, 0x00000322, 0x0000037a, 0x00050080, 0x00000006, 0x0000037c, 0x00000370,
+ 0x0000037b, 0x0004007c, 0x00000008, 0x0000037d, 0x0000037c, 0x00050080, 0x00000008, 0x0000037e,
+ 0x000001d9, 0x0000037d, 0x00060041, 0x00000094, 0x0000037f, 0x00000081, 0x0000003a, 0x0000037e,
+ 0x0004003d, 0x00000012, 0x00000380, 0x0000037f, 0x00050041, 0x0000001b, 0x00000381, 0x00000349,
+ 0x00000abb, 0x0003003e, 0x00000381, 0x00000380, 0x00050080, 0x00000006, 0x00000384, 0x00000abb,
+ 0x0000004f, 0x000200f9, 0x00000359, 0x000200f8, 0x00000385, 0x00050041, 0x0000001b, 0x00000386,
+ 0x00000349, 0x0000003a, 0x0004003d, 0x00000012, 0x00000387, 0x00000386, 0x00050041, 0x0000001b,
+ 0x00000388, 0x00000349, 0x0000004f, 0x0004003d, 0x00000012, 0x00000389, 0x00000388, 0x00050051,
+ 0x00000012, 0x0000038b, 0x00000358, 0x00000000, 0x0008000c, 0x00000012, 0x0000038c, 0x00000001,
+ 0x0000002e, 0x00000387, 0x00000389, 0x0000038b, 0x00050041, 0x0000001b, 0x0000038d, 0x00000349,
+ 0x0000006f, 0x0004003d, 0x00000012, 0x0000038e, 0x0000038d, 0x00050041, 0x0000001b, 0x0000038f,
+ 0x00000349, 0x000000a3, 0x0004003d, 0x00000012, 0x00000390, 0x0000038f, 0x0008000c, 0x00000012,
+ 0x00000393, 0x00000001, 0x0000002e, 0x0000038e, 0x00000390, 0x0000038b, 0x00050051, 0x00000012,
+ 0x00000395, 0x00000358, 0x00000001, 0x0008000c, 0x00000012, 0x00000396, 0x00000001, 0x0000002e,
+ 0x0000038c, 0x00000393, 0x00000395, 0x00050041, 0x0000001b, 0x00000397, 0x00000349, 0x000000ac,
+ 0x0004003d, 0x00000012, 0x00000398, 0x00000397, 0x00050041, 0x0000001b, 0x00000399, 0x00000349,
+ 0x000000af, 0x0004003d, 0x00000012, 0x0000039a, 0x00000399, 0x0008000c, 0x00000012, 0x0000039d,
+ 0x00000001, 0x0000002e, 0x00000398, 0x0000039a, 0x0000038b, 0x00050041, 0x0000001b, 0x0000039e,
+ 0x00000349, 0x000000b5, 0x0004003d, 0x00000012, 0x0000039f, 0x0000039e, 0x00050041, 0x0000001b,
+ 0x000003a0, 0x00000349, 0x000000b8, 0x0004003d, 0x00000012, 0x000003a1, 0x000003a0, 0x0008000c,
+ 0x00000012, 0x000003a4, 0x00000001, 0x0000002e, 0x0000039f, 0x000003a1, 0x0000038b, 0x0008000c,
+ 0x00000012, 0x000003a7, 0x00000001, 0x0000002e, 0x0000039d, 0x000003a4, 0x00000395, 0x00050051,
+ 0x00000012, 0x000003a9, 0x00000358, 0x00000002, 0x0008000c, 0x00000012, 0x000003aa, 0x00000001,
+ 0x0000002e, 0x00000396, 0x000003a7, 0x000003a9, 0x00050080, 0x00000006, 0x00000330, 0x00000324,
+ 0x0000004f, 0x00060050, 0x00000010, 0x00000333, 0x00000321, 0x00000330, 0x00000326, 0x00050081,
+ 0x00000013, 0x00000335, 0x000001d3, 0x00000ad3, 0x00050082, 0x00000010, 0x000003b5, 0x00000333,
+ 0x00000ad0, 0x0004006f, 0x00000013, 0x000003b6, 0x000003b5, 0x0008000c, 0x00000013, 0x000003b7,
+ 0x00000001, 0x0000002b, 0x00000335, 0x0000004d, 0x000003b6, 0x0006000c, 0x00000013, 0x000003b9,
+ 0x00000001, 0x00000008, 0x000003b7, 0x0004006e, 0x00000010, 0x000003ba, 0x000003b9, 0x0004006f,
+ 0x00000013, 0x000003bd, 0x000003ba, 0x00050083, 0x00000013, 0x000003be, 0x000003b7, 0x000003bd,
+ 0x000200f9, 0x000003bf, 0x000200f8, 0x000003bf, 0x000700f5, 0x00000006, 0x00000abc, 0x0000003a,
+ 0x00000385, 0x000003ea, 0x000003c3, 0x000500b1, 0x00000065, 0x000003c2, 0x00000abc, 0x00000064,
+ 0x000400f6, 0x000003eb, 0x000003c3, 0x00000000, 0x000400fa, 0x000003c2, 0x000003c3, 0x000003eb,
+ 0x000200f8, 0x000003c3, 0x000500c7, 0x00000006, 0x000003c6, 0x00000abc, 0x0000004f, 0x000500c3,
+ 0x00000006, 0x000003c8, 0x00000abc, 0x0000004f, 0x000500c7, 0x00000006, 0x000003c9, 0x000003c8,
+ 0x0000004f, 0x000500c3, 0x00000006, 0x000003cb, 0x00000abc, 0x0000006f, 0x000500c7, 0x00000006,
+ 0x000003cc, 0x000003cb, 0x0000004f, 0x00060050, 0x00000010, 0x000003cd, 0x000003c6, 0x000003c9,
+ 0x000003cc, 0x00050080, 0x00000010, 0x000003ce, 0x000003ba, 0x000003cd, 0x0008000c, 0x00000010,
+ 0x000003d2, 0x00000001, 0x0000002d, 0x000003ce, 0x00000074, 0x000003b5, 0x00050051, 0x00000006,
+ 0x000003d6, 0x000003d2, 0x00000000, 0x00050051, 0x00000006, 0x000003da, 0x000003d2, 0x00000001,
+ 0x00050051, 0x00000006, 0x000003de, 0x000003d2, 0x00000002, 0x00050084, 0x00000006, 0x000003df,
+ 0x00000330, 0x000003de, 0x00050080, 0x00000006, 0x000003e0, 0x000003da, 0x000003df, 0x00050084,
+ 0x00000006, 0x000003e1, 0x00000321, 0x000003e0, 0x00050080, 0x00000006, 0x000003e2, 0x000003d6,
+ 0x000003e1, 0x0004007c, 0x00000008, 0x000003e3, 0x000003e2, 0x00050080, 0x00000008, 0x000003e4,
+ 0x000001dc, 0x000003e3, 0x00060041, 0x00000094, 0x000003e5, 0x00000081, 0x0000003a, 0x000003e4,
+ 0x0004003d, 0x00000012, 0x000003e6, 0x000003e5, 0x00050041, 0x0000001b, 0x000003e7, 0x000003af,
+ 0x00000abc, 0x0003003e, 0x000003e7, 0x000003e6, 0x00050080, 0x00000006, 0x000003ea, 0x00000abc,
+ 0x0000004f, 0x000200f9, 0x000003bf, 0x000200f8, 0x000003eb, 0x00050041, 0x0000001b, 0x000003ec,
+ 0x000003af, 0x0000003a, 0x0004003d, 0x00000012, 0x000003ed, 0x000003ec, 0x00050041, 0x0000001b,
+ 0x000003ee, 0x000003af, 0x0000004f, 0x0004003d, 0x00000012, 0x000003ef, 0x000003ee, 0x00050051,
+ 0x00000012, 0x000003f1, 0x000003be, 0x00000000, 0x0008000c, 0x00000012, 0x000003f2, 0x00000001,
+ 0x0000002e, 0x000003ed, 0x000003ef, 0x000003f1, 0x00050041, 0x0000001b, 0x000003f3, 0x000003af,
+ 0x0000006f, 0x0004003d, 0x00000012, 0x000003f4, 0x000003f3, 0x00050041, 0x0000001b, 0x000003f5,
+ 0x000003af, 0x000000a3, 0x0004003d, 0x00000012, 0x000003f6, 0x000003f5, 0x0008000c, 0x00000012,
+ 0x000003f9, 0x00000001, 0x0000002e, 0x000003f4, 0x000003f6, 0x000003f1, 0x00050051, 0x00000012,
+ 0x000003fb, 0x000003be, 0x00000001, 0x0008000c, 0x00000012, 0x000003fc, 0x00000001, 0x0000002e,
+ 0x000003f2, 0x000003f9, 0x000003fb, 0x00050041, 0x0000001b, 0x000003fd, 0x000003af, 0x000000ac,
+ 0x0004003d, 0x00000012, 0x000003fe, 0x000003fd, 0x00050041, 0x0000001b, 0x000003ff, 0x000003af,
+ 0x000000af, 0x0004003d, 0x00000012, 0x00000400, 0x000003ff, 0x0008000c, 0x00000012, 0x00000403,
+ 0x00000001, 0x0000002e, 0x000003fe, 0x00000400, 0x000003f1, 0x00050041, 0x0000001b, 0x00000404,
+ 0x000003af, 0x000000b5, 0x0004003d, 0x00000012, 0x00000405, 0x00000404, 0x00050041, 0x0000001b,
+ 0x00000406, 0x000003af, 0x000000b8, 0x0004003d, 0x00000012, 0x00000407, 0x00000406, 0x0008000c,
+ 0x00000012, 0x0000040a, 0x00000001, 0x0000002e, 0x00000405, 0x00000407, 0x000003f1, 0x0008000c,
+ 0x00000012, 0x0000040d, 0x00000001, 0x0000002e, 0x00000403, 0x0000040a, 0x000003fb, 0x00050051,
+ 0x00000012, 0x0000040f, 0x000003be, 0x00000002, 0x0008000c, 0x00000012, 0x00000410, 0x00000001,
+ 0x0000002e, 0x000003fc, 0x0000040d, 0x0000040f, 0x00050080, 0x00000006, 0x0000033e, 0x00000326,
+ 0x0000004f, 0x00060050, 0x00000010, 0x0000033f, 0x00000321, 0x00000324, 0x0000033e, 0x00050081,
+ 0x00000013, 0x00000341, 0x000001d3, 0x00000ad4, 0x00050082, 0x00000010, 0x0000041b, 0x0000033f,
+ 0x00000ad0, 0x0004006f, 0x00000013, 0x0000041c, 0x0000041b, 0x0008000c, 0x00000013, 0x0000041d,
+ 0x00000001, 0x0000002b, 0x00000341, 0x0000004d, 0x0000041c, 0x0006000c, 0x00000013, 0x0000041f,
+ 0x00000001, 0x00000008, 0x0000041d, 0x0004006e, 0x00000010, 0x00000420, 0x0000041f, 0x0004006f,
+ 0x00000013, 0x00000423, 0x00000420, 0x00050083, 0x00000013, 0x00000424, 0x0000041d, 0x00000423,
+ 0x000200f9, 0x00000425, 0x000200f8, 0x00000425, 0x000700f5, 0x00000006, 0x00000abd, 0x0000003a,
+ 0x000003eb, 0x00000450, 0x00000429, 0x000500b1, 0x00000065, 0x00000428, 0x00000abd, 0x00000064,
+ 0x000400f6, 0x00000451, 0x00000429, 0x00000000, 0x000400fa, 0x00000428, 0x00000429, 0x00000451,
+ 0x000200f8, 0x00000429, 0x000500c7, 0x00000006, 0x0000042c, 0x00000abd, 0x0000004f, 0x000500c3,
+ 0x00000006, 0x0000042e, 0x00000abd, 0x0000004f, 0x000500c7, 0x00000006, 0x0000042f, 0x0000042e,
+ 0x0000004f, 0x000500c3, 0x00000006, 0x00000431, 0x00000abd, 0x0000006f, 0x000500c7, 0x00000006,
+ 0x00000432, 0x00000431, 0x0000004f, 0x00060050, 0x00000010, 0x00000433, 0x0000042c, 0x0000042f,
+ 0x00000432, 0x00050080, 0x00000010, 0x00000434, 0x00000420, 0x00000433, 0x0008000c, 0x00000010,
+ 0x00000438, 0x00000001, 0x0000002d, 0x00000434, 0x00000074, 0x0000041b, 0x00050051, 0x00000006,
+ 0x0000043c, 0x00000438, 0x00000000, 0x00050051, 0x00000006, 0x00000440, 0x00000438, 0x00000001,
+ 0x00050051, 0x00000006, 0x00000444, 0x00000438, 0x00000002, 0x00050084, 0x00000006, 0x00000445,
+ 0x00000324, 0x00000444, 0x00050080, 0x00000006, 0x00000446, 0x00000440, 0x00000445, 0x00050084,
+ 0x00000006, 0x00000447, 0x00000321, 0x00000446, 0x00050080, 0x00000006, 0x00000448, 0x0000043c,
+ 0x00000447, 0x0004007c, 0x00000008, 0x00000449, 0x00000448, 0x00050080, 0x00000008, 0x0000044a,
+ 0x000001df, 0x00000449, 0x00060041, 0x00000094, 0x0000044b, 0x00000081, 0x0000003a, 0x0000044a,
+ 0x0004003d, 0x00000012, 0x0000044c, 0x0000044b, 0x00050041, 0x0000001b, 0x0000044d, 0x00000415,
+ 0x00000abd, 0x0003003e, 0x0000044d, 0x0000044c, 0x00050080, 0x00000006, 0x00000450, 0x00000abd,
+ 0x0000004f, 0x000200f9, 0x00000425, 0x000200f8, 0x00000451, 0x00050041, 0x0000001b, 0x00000452,
+ 0x00000415, 0x0000003a, 0x0004003d, 0x00000012, 0x00000453, 0x00000452, 0x00050041, 0x0000001b,
+ 0x00000454, 0x00000415, 0x0000004f, 0x0004003d, 0x00000012, 0x00000455, 0x00000454, 0x00050051,
+ 0x00000012, 0x00000457, 0x00000424, 0x00000000, 0x0008000c, 0x00000012, 0x00000458, 0x00000001,
+ 0x0000002e, 0x00000453, 0x00000455, 0x00000457, 0x00050041, 0x0000001b, 0x00000459, 0x00000415,
+ 0x0000006f, 0x0004003d, 0x00000012, 0x0000045a, 0x00000459, 0x00050041, 0x0000001b, 0x0000045b,
+ 0x00000415, 0x000000a3, 0x0004003d, 0x00000012, 0x0000045c, 0x0000045b, 0x0008000c, 0x00000012,
+ 0x0000045f, 0x00000001, 0x0000002e, 0x0000045a, 0x0000045c, 0x00000457, 0x00050051, 0x00000012,
+ 0x00000461, 0x00000424, 0x00000001, 0x0008000c, 0x00000012, 0x00000462, 0x00000001, 0x0000002e,
+ 0x00000458, 0x0000045f, 0x00000461, 0x00050041, 0x0000001b, 0x00000463, 0x00000415, 0x000000ac,
+ 0x0004003d, 0x00000012, 0x00000464, 0x00000463, 0x00050041, 0x0000001b, 0x00000465, 0x00000415,
+ 0x000000af, 0x0004003d, 0x00000012, 0x00000466, 0x00000465, 0x0008000c, 0x00000012, 0x00000469,
+ 0x00000001, 0x0000002e, 0x00000464, 0x00000466, 0x00000457, 0x00050041, 0x0000001b, 0x0000046a,
+ 0x00000415, 0x000000b5, 0x0004003d, 0x00000012, 0x0000046b, 0x0000046a, 0x00050041, 0x0000001b,
+ 0x0000046c, 0x00000415, 0x000000b8, 0x0004003d, 0x00000012, 0x0000046d, 0x0000046c, 0x0008000c,
+ 0x00000012, 0x00000470, 0x00000001, 0x0000002e, 0x0000046b, 0x0000046d, 0x00000457, 0x0008000c,
+ 0x00000012, 0x00000473, 0x00000001, 0x0000002e, 0x00000469, 0x00000470, 0x00000461, 0x00050051,
+ 0x00000012, 0x00000475, 0x00000424, 0x00000002, 0x0008000c, 0x00000012, 0x00000476, 0x00000001,
+ 0x0000002e, 0x00000462, 0x00000473, 0x00000475, 0x00060050, 0x00000013, 0x00000344, 0x000003aa,
+ 0x00000410, 0x00000476, 0x00050085, 0x00000012, 0x00000304, 0x00000162, 0x000001f8, 0x0005008e,
+ 0x00000013, 0x00000306, 0x00000344, 0x00000304, 0x00050083, 0x00000013, 0x00000307, 0x000001d5,
+ 0x00000306, 0x00050083, 0x00000013, 0x0000048f, 0x00000307, 0x00000163, 0x0008000c, 0x00000013,
+ 0x000004b7, 0x00000001, 0x0000002b, 0x0000048f, 0x0000004d, 0x00000350, 0x0006000c, 0x00000013,
+ 0x000004b9, 0x00000001, 0x00000008, 0x000004b7, 0x0004006e, 0x00000010, 0x000004ba, 0x000004b9,
+ 0x0004006f, 0x00000013, 0x000004bd, 0x000004ba, 0x00050083, 0x00000013, 0x000004be, 0x000004b7,
+ 0x000004bd, 0x000200f9, 0x000004bf, 0x000200f8, 0x000004bf, 0x000700f5, 0x00000006, 0x00000abe,
+ 0x0000003a, 0x00000451, 0x000004ea, 0x000004c3, 0x000500b1, 0x00000065, 0x000004c2, 0x00000abe,
+ 0x00000064, 0x000400f6, 0x000004eb, 0x000004c3, 0x00000000, 0x000400fa, 0x000004c2, 0x000004c3,
+ 0x000004eb, 0x000200f8, 0x000004c3, 0x000500c7, 0x00000006, 0x000004c6, 0x00000abe, 0x0000004f,
+ 0x000500c3, 0x00000006, 0x000004c8, 0x00000abe, 0x0000004f, 0x000500c7, 0x00000006, 0x000004c9,
+ 0x000004c8, 0x0000004f, 0x000500c3, 0x00000006, 0x000004cb, 0x00000abe, 0x0000006f, 0x000500c7,
+ 0x00000006, 0x000004cc, 0x000004cb, 0x0000004f, 0x00060050, 0x00000010, 0x000004cd, 0x000004c6,
+ 0x000004c9, 0x000004cc, 0x00050080, 0x00000010, 0x000004ce, 0x000004ba, 0x000004cd, 0x0008000c,
+ 0x00000010, 0x000004d2, 0x00000001, 0x0000002d, 0x000004ce, 0x00000074, 0x0000034f, 0x00050051,
+ 0x00000006, 0x000004d6, 0x000004d2, 0x00000000, 0x00050051, 0x00000006, 0x000004da, 0x000004d2,
+ 0x00000001, 0x00050051, 0x00000006, 0x000004de, 0x000004d2, 0x00000002, 0x00050084, 0x00000006,
+ 0x000004df, 0x00000324, 0x000004de, 0x00050080, 0x00000006, 0x000004e0, 0x000004da, 0x000004df,
+ 0x00050084, 0x00000006, 0x000004e1, 0x00000322, 0x000004e0, 0x00050080, 0x00000006, 0x000004e2,
+ 0x000004d6, 0x000004e1, 0x0004007c, 0x00000008, 0x000004e3, 0x000004e2, 0x00050080, 0x00000008,
+ 0x000004e4, 0x000001d9, 0x000004e3, 0x00060041, 0x00000094, 0x000004e5, 0x00000081, 0x0000003a,
+ 0x000004e4, 0x0004003d, 0x00000012, 0x000004e6, 0x000004e5, 0x00050041, 0x0000001b, 0x000004e7,
+ 0x000004af, 0x00000abe, 0x0003003e, 0x000004e7, 0x000004e6, 0x00050080, 0x00000006, 0x000004ea,
+ 0x00000abe, 0x0000004f, 0x000200f9, 0x000004bf, 0x000200f8, 0x000004eb, 0x00050041, 0x0000001b,
+ 0x000004ec, 0x000004af, 0x0000003a, 0x0004003d, 0x00000012, 0x000004ed, 0x000004ec, 0x00050041,
+ 0x0000001b, 0x000004ee, 0x000004af, 0x0000004f, 0x0004003d, 0x00000012, 0x000004ef, 0x000004ee,
+ 0x00050051, 0x00000012, 0x000004f1, 0x000004be, 0x00000000, 0x0008000c, 0x00000012, 0x000004f2,
+ 0x00000001, 0x0000002e, 0x000004ed, 0x000004ef, 0x000004f1, 0x00050041, 0x0000001b, 0x000004f3,
+ 0x000004af, 0x0000006f, 0x0004003d, 0x00000012, 0x000004f4, 0x000004f3, 0x00050041, 0x0000001b,
+ 0x000004f5, 0x000004af, 0x000000a3, 0x0004003d, 0x00000012, 0x000004f6, 0x000004f5, 0x0008000c,
+ 0x00000012, 0x000004f9, 0x00000001, 0x0000002e, 0x000004f4, 0x000004f6, 0x000004f1, 0x00050051,
+ 0x00000012, 0x000004fb, 0x000004be, 0x00000001, 0x0008000c, 0x00000012, 0x000004fc, 0x00000001,
+ 0x0000002e, 0x000004f2, 0x000004f9, 0x000004fb, 0x00050041, 0x0000001b, 0x000004fd, 0x000004af,
+ 0x000000ac, 0x0004003d, 0x00000012, 0x000004fe, 0x000004fd, 0x00050041, 0x0000001b, 0x000004ff,
+ 0x000004af, 0x000000af, 0x0004003d, 0x00000012, 0x00000500, 0x000004ff, 0x0008000c, 0x00000012,
+ 0x00000503, 0x00000001, 0x0000002e, 0x000004fe, 0x00000500, 0x000004f1, 0x00050041, 0x0000001b,
+ 0x00000504, 0x000004af, 0x000000b5, 0x0004003d, 0x00000012, 0x00000505, 0x00000504, 0x00050041,
+ 0x0000001b, 0x00000506, 0x000004af, 0x000000b8, 0x0004003d, 0x00000012, 0x00000507, 0x00000506,
+ 0x0008000c, 0x00000012, 0x0000050a, 0x00000001, 0x0000002e, 0x00000505, 0x00000507, 0x000004f1,
+ 0x0008000c, 0x00000012, 0x0000050d, 0x00000001, 0x0000002e, 0x00000503, 0x0000050a, 0x000004fb,
+ 0x00050051, 0x00000012, 0x0000050f, 0x000004be, 0x00000002, 0x0008000c, 0x00000012, 0x00000510,
+ 0x00000001, 0x0000002e, 0x000004fc, 0x0000050d, 0x0000050f, 0x00050083, 0x00000013, 0x0000049b,
+ 0x00000307, 0x00000173, 0x0008000c, 0x00000013, 0x0000051d, 0x00000001, 0x0000002b, 0x0000049b,
+ 0x0000004d, 0x000003b6, 0x0006000c, 0x00000013, 0x0000051f, 0x00000001, 0x00000008, 0x0000051d,
+ 0x0004006e, 0x00000010, 0x00000520, 0x0000051f, 0x0004006f, 0x00000013, 0x00000523, 0x00000520,
+ 0x00050083, 0x00000013, 0x00000524, 0x0000051d, 0x00000523, 0x000200f9, 0x00000525, 0x000200f8,
+ 0x00000525, 0x000700f5, 0x00000006, 0x00000abf, 0x0000003a, 0x000004eb, 0x00000550, 0x00000529,
+ 0x000500b1, 0x00000065, 0x00000528, 0x00000abf, 0x00000064, 0x000400f6, 0x00000551, 0x00000529,
+ 0x00000000, 0x000400fa, 0x00000528, 0x00000529, 0x00000551, 0x000200f8, 0x00000529, 0x000500c7,
+ 0x00000006, 0x0000052c, 0x00000abf, 0x0000004f, 0x000500c3, 0x00000006, 0x0000052e, 0x00000abf,
+ 0x0000004f, 0x000500c7, 0x00000006, 0x0000052f, 0x0000052e, 0x0000004f, 0x000500c3, 0x00000006,
+ 0x00000531, 0x00000abf, 0x0000006f, 0x000500c7, 0x00000006, 0x00000532, 0x00000531, 0x0000004f,
+ 0x00060050, 0x00000010, 0x00000533, 0x0000052c, 0x0000052f, 0x00000532, 0x00050080, 0x00000010,
+ 0x00000534, 0x00000520, 0x00000533, 0x0008000c, 0x00000010, 0x00000538, 0x00000001, 0x0000002d,
+ 0x00000534, 0x00000074, 0x000003b5, 0x00050051, 0x00000006, 0x0000053c, 0x00000538, 0x00000000,
+ 0x00050051, 0x00000006, 0x00000540, 0x00000538, 0x00000001, 0x00050051, 0x00000006, 0x00000544,
+ 0x00000538, 0x00000002, 0x00050084, 0x00000006, 0x00000545, 0x00000330, 0x00000544, 0x00050080,
+ 0x00000006, 0x00000546, 0x00000540, 0x00000545, 0x00050084, 0x00000006, 0x00000547, 0x00000321,
+ 0x00000546, 0x00050080, 0x00000006, 0x00000548, 0x0000053c, 0x00000547, 0x0004007c, 0x00000008,
+ 0x00000549, 0x00000548, 0x00050080, 0x00000008, 0x0000054a, 0x000001dc, 0x00000549, 0x00060041,
+ 0x00000094, 0x0000054b, 0x00000081, 0x0000003a, 0x0000054a, 0x0004003d, 0x00000012, 0x0000054c,
+ 0x0000054b, 0x00050041, 0x0000001b, 0x0000054d, 0x00000515, 0x00000abf, 0x0003003e, 0x0000054d,
+ 0x0000054c, 0x00050080, 0x00000006, 0x00000550, 0x00000abf, 0x0000004f, 0x000200f9, 0x00000525,
+ 0x000200f8, 0x00000551, 0x00050041, 0x0000001b, 0x00000552, 0x00000515, 0x0000003a, 0x0004003d,
+ 0x00000012, 0x00000553, 0x00000552, 0x00050041, 0x0000001b, 0x00000554, 0x00000515, 0x0000004f,
+ 0x0004003d, 0x00000012, 0x00000555, 0x00000554, 0x00050051, 0x00000012, 0x00000557, 0x00000524,
+ 0x00000000, 0x0008000c, 0x00000012, 0x00000558, 0x00000001, 0x0000002e, 0x00000553, 0x00000555,
+ 0x00000557, 0x00050041, 0x0000001b, 0x00000559, 0x00000515, 0x0000006f, 0x0004003d, 0x00000012,
+ 0x0000055a, 0x00000559, 0x00050041, 0x0000001b, 0x0000055b, 0x00000515, 0x000000a3, 0x0004003d,
+ 0x00000012, 0x0000055c, 0x0000055b, 0x0008000c, 0x00000012, 0x0000055f, 0x00000001, 0x0000002e,
+ 0x0000055a, 0x0000055c, 0x00000557, 0x00050051, 0x00000012, 0x00000561, 0x00000524, 0x00000001,
+ 0x0008000c, 0x00000012, 0x00000562, 0x00000001, 0x0000002e, 0x00000558, 0x0000055f, 0x00000561,
+ 0x00050041, 0x0000001b, 0x00000563, 0x00000515, 0x000000ac, 0x0004003d, 0x00000012, 0x00000564,
+ 0x00000563, 0x00050041, 0x0000001b, 0x00000565, 0x00000515, 0x000000af, 0x0004003d, 0x00000012,
+ 0x00000566, 0x00000565, 0x0008000c, 0x00000012, 0x00000569, 0x00000001, 0x0000002e, 0x00000564,
+ 0x00000566, 0x00000557, 0x00050041, 0x0000001b, 0x0000056a, 0x00000515, 0x000000b5, 0x0004003d,
+ 0x00000012, 0x0000056b, 0x0000056a, 0x00050041, 0x0000001b, 0x0000056c, 0x00000515, 0x000000b8,
+ 0x0004003d, 0x00000012, 0x0000056d, 0x0000056c, 0x0008000c, 0x00000012, 0x00000570, 0x00000001,
+ 0x0000002e, 0x0000056b, 0x0000056d, 0x00000557, 0x0008000c, 0x00000012, 0x00000573, 0x00000001,
+ 0x0000002e, 0x00000569, 0x00000570, 0x00000561, 0x00050051, 0x00000012, 0x00000575, 0x00000524,
+ 0x00000002, 0x0008000c, 0x00000012, 0x00000576, 0x00000001, 0x0000002e, 0x00000562, 0x00000573,
+ 0x00000575, 0x00050083, 0x00000013, 0x000004a7, 0x00000307, 0x00000183, 0x0008000c, 0x00000013,
+ 0x00000583, 0x00000001, 0x0000002b, 0x000004a7, 0x0000004d, 0x0000041c, 0x0006000c, 0x00000013,
+ 0x00000585, 0x00000001, 0x00000008, 0x00000583, 0x0004006e, 0x00000010, 0x00000586, 0x00000585,
+ 0x0004006f, 0x00000013, 0x00000589, 0x00000586, 0x00050083, 0x00000013, 0x0000058a, 0x00000583,
+ 0x00000589, 0x000200f9, 0x0000058b, 0x000200f8, 0x0000058b, 0x000700f5, 0x00000006, 0x00000ac0,
+ 0x0000003a, 0x00000551, 0x000005b6, 0x0000058f, 0x000500b1, 0x00000065, 0x0000058e, 0x00000ac0,
+ 0x00000064, 0x000400f6, 0x000005b7, 0x0000058f, 0x00000000, 0x000400fa, 0x0000058e, 0x0000058f,
+ 0x000005b7, 0x000200f8, 0x0000058f, 0x000500c7, 0x00000006, 0x00000592, 0x00000ac0, 0x0000004f,
+ 0x000500c3, 0x00000006, 0x00000594, 0x00000ac0, 0x0000004f, 0x000500c7, 0x00000006, 0x00000595,
+ 0x00000594, 0x0000004f, 0x000500c3, 0x00000006, 0x00000597, 0x00000ac0, 0x0000006f, 0x000500c7,
+ 0x00000006, 0x00000598, 0x00000597, 0x0000004f, 0x00060050, 0x00000010, 0x00000599, 0x00000592,
+ 0x00000595, 0x00000598, 0x00050080, 0x00000010, 0x0000059a, 0x00000586, 0x00000599, 0x0008000c,
+ 0x00000010, 0x0000059e, 0x00000001, 0x0000002d, 0x0000059a, 0x00000074, 0x0000041b, 0x00050051,
+ 0x00000006, 0x000005a2, 0x0000059e, 0x00000000, 0x00050051, 0x00000006, 0x000005a6, 0x0000059e,
+ 0x00000001, 0x00050051, 0x00000006, 0x000005aa, 0x0000059e, 0x00000002, 0x00050084, 0x00000006,
+ 0x000005ab, 0x00000324, 0x000005aa, 0x00050080, 0x00000006, 0x000005ac, 0x000005a6, 0x000005ab,
+ 0x00050084, 0x00000006, 0x000005ad, 0x00000321, 0x000005ac, 0x00050080, 0x00000006, 0x000005ae,
+ 0x000005a2, 0x000005ad, 0x0004007c, 0x00000008, 0x000005af, 0x000005ae, 0x00050080, 0x00000008,
+ 0x000005b0, 0x000001df, 0x000005af, 0x00060041, 0x00000094, 0x000005b1, 0x00000081, 0x0000003a,
+ 0x000005b0, 0x0004003d, 0x00000012, 0x000005b2, 0x000005b1, 0x00050041, 0x0000001b, 0x000005b3,
+ 0x0000057b, 0x00000ac0, 0x0003003e, 0x000005b3, 0x000005b2, 0x00050080, 0x00000006, 0x000005b6,
+ 0x00000ac0, 0x0000004f, 0x000200f9, 0x0000058b, 0x000200f8, 0x000005b7, 0x00050041, 0x0000001b,
+ 0x000005b8, 0x0000057b, 0x0000003a, 0x0004003d, 0x00000012, 0x000005b9, 0x000005b8, 0x00050041,
+ 0x0000001b, 0x000005ba, 0x0000057b, 0x0000004f, 0x0004003d, 0x00000012, 0x000005bb, 0x000005ba,
+ 0x00050051, 0x00000012, 0x000005bd, 0x0000058a, 0x00000000, 0x0008000c, 0x00000012, 0x000005be,
+ 0x00000001, 0x0000002e, 0x000005b9, 0x000005bb, 0x000005bd, 0x00050041, 0x0000001b, 0x000005bf,
+ 0x0000057b, 0x0000006f, 0x0004003d, 0x00000012, 0x000005c0, 0x000005bf, 0x00050041, 0x0000001b,
+ 0x000005c1, 0x0000057b, 0x000000a3, 0x0004003d, 0x00000012, 0x000005c2, 0x000005c1, 0x0008000c,
+ 0x00000012, 0x000005c5, 0x00000001, 0x0000002e, 0x000005c0, 0x000005c2, 0x000005bd, 0x00050051,
+ 0x00000012, 0x000005c7, 0x0000058a, 0x00000001, 0x0008000c, 0x00000012, 0x000005c8, 0x00000001,
+ 0x0000002e, 0x000005be, 0x000005c5, 0x000005c7, 0x00050041, 0x0000001b, 0x000005c9, 0x0000057b,
+ 0x000000ac, 0x0004003d, 0x00000012, 0x000005ca, 0x000005c9, 0x00050041, 0x0000001b, 0x000005cb,
+ 0x0000057b, 0x000000af, 0x0004003d, 0x00000012, 0x000005cc, 0x000005cb, 0x0008000c, 0x00000012,
+ 0x000005cf, 0x00000001, 0x0000002e, 0x000005ca, 0x000005cc, 0x000005bd, 0x00050041, 0x0000001b,
+ 0x000005d0, 0x0000057b, 0x000000b5, 0x0004003d, 0x00000012, 0x000005d1, 0x000005d0, 0x00050041,
+ 0x0000001b, 0x000005d2, 0x0000057b, 0x000000b8, 0x0004003d, 0x00000012, 0x000005d3, 0x000005d2,
+ 0x0008000c, 0x00000012, 0x000005d6, 0x00000001, 0x0000002e, 0x000005d1, 0x000005d3, 0x000005bd,
+ 0x0008000c, 0x00000012, 0x000005d9, 0x00000001, 0x0000002e, 0x000005cf, 0x000005d6, 0x000005c7,
+ 0x00050051, 0x00000012, 0x000005db, 0x0000058a, 0x00000002, 0x0008000c, 0x00000012, 0x000005dc,
+ 0x00000001, 0x0000002e, 0x000005c8, 0x000005d9, 0x000005db, 0x00060050, 0x00000013, 0x000004aa,
+ 0x00000510, 0x00000576, 0x000005dc, 0x0005008e, 0x00000013, 0x0000030f, 0x000004aa, 0x000001f8,
+ 0x00050083, 0x00000013, 0x00000310, 0x000001d5, 0x0000030f, 0x00050083, 0x00000013, 0x000001fb,
+ 0x00000310, 0x00000acf, 0x000200f9, 0x000001fd, 0x000200f8, 0x000001fd, 0x000700f5, 0x00000008,
+ 0x00000ac1, 0x0000003b, 0x000005b7, 0x00000235, 0x00000200, 0x000500b0, 0x00000065, 0x00000204,
+ 0x00000ac1, 0x00000203, 0x000400f6, 0x000001ff, 0x00000200, 0x00000000, 0x000400fa, 0x00000204,
+ 0x000001fe, 0x000001ff, 0x000200f8, 0x000001fe, 0x00050084, 0x00000008, 0x00000208, 0x00000ac1,
+ 0x000001c5, 0x00050080, 0x00000008, 0x00000209, 0x000001e6, 0x00000208, 0x00050080, 0x00000008,
+ 0x0000020b, 0x00000209, 0x000002f0, 0x00050080, 0x00000008, 0x00000210, 0x000001e3, 0x00000208,
+ 0x0004006f, 0x00000013, 0x000005e9, 0x000001b6, 0x0008000c, 0x00000013, 0x000005ea, 0x00000001,
+ 0x0000002b, 0x000001fb, 0x000000c8, 0x000005e9, 0x0006000c, 0x00000013, 0x000005ec, 0x00000001,
+ 0x00000008, 0x000005ea, 0x0004006e, 0x00000010, 0x000005ed, 0x000005ec, 0x0004006f, 0x00000013,
+ 0x000005f0, 0x000005ed, 0x00050083, 0x00000013, 0x000005f1, 0x000005ea, 0x000005f0, 0x000200f9,
+ 0x000005f2, 0x000200f8, 0x000005f2, 0x000700f5, 0x00000006, 0x00000ac2, 0x0000003a, 0x000001fe,
+ 0x00000629, 0x00000627, 0x000500b1, 0x00000065, 0x000005f5, 0x00000ac2, 0x00000064, 0x000400f6,
+ 0x0000062a, 0x00000627, 0x00000000, 0x000400fa, 0x000005f5, 0x000005f6, 0x0000062a, 0x000200f8,
+ 0x000005f6, 0x000500c7, 0x00000006, 0x000005f9, 0x00000ac2, 0x0000004f, 0x000500c3, 0x00000006,
+ 0x000005fb, 0x00000ac2, 0x0000004f, 0x000500c7, 0x00000006, 0x000005fc, 0x000005fb, 0x0000004f,
+ 0x000500c3, 0x00000006, 0x000005fe, 0x00000ac2, 0x0000006f, 0x000500c7, 0x00000006, 0x000005ff,
+ 0x000005fe, 0x0000004f, 0x00060050, 0x00000010, 0x00000600, 0x000005f9, 0x000005fc, 0x000005ff,
+ 0x00050080, 0x00000010, 0x00000601, 0x000005ed, 0x00000600, 0x000500b1, 0x000000ec, 0x00000603,
+ 0x00000601, 0x00000074, 0x0004009a, 0x00000065, 0x00000604, 0x00000603, 0x000400a8, 0x00000065,
+ 0x00000605, 0x00000604, 0x000300f7, 0x0000060b, 0x00000000, 0x000400fa, 0x00000605, 0x00000606,
+ 0x0000060b, 0x000200f8, 0x00000606, 0x000500af, 0x000000ec, 0x00000609, 0x00000601, 0x000001b6,
+ 0x0004009a, 0x00000065, 0x0000060a, 0x00000609, 0x000200f9, 0x0000060b, 0x000200f8, 0x0000060b,
+ 0x000700f5, 0x00000065, 0x0000060c, 0x00000604, 0x000005f6, 0x0000060a, 0x00000606, 0x000300f7,
+ 0x00000624, 0x00000000, 0x000400fa, 0x0000060c, 0x0000060f, 0x00000610, 0x000200f8, 0x0000060f,
+ 0x000200f9, 0x00000624, 0x000200f8, 0x00000610, 0x00050051, 0x00000006, 0x00000613, 0x00000601,
+ 0x00000000, 0x00050051, 0x00000006, 0x00000617, 0x00000601, 0x00000001, 0x00050051, 0x00000006,
+ 0x0000061b, 0x00000601, 0x00000002, 0x00050084, 0x00000006, 0x0000061c, 0x00000324, 0x0000061b,
+ 0x00050080, 0x00000006, 0x0000061d, 0x00000617, 0x0000061c, 0x00050084, 0x00000006, 0x0000061e,
+ 0x00000321, 0x0000061d, 0x00050080, 0x00000006, 0x0000061f, 0x00000613, 0x0000061e, 0x0004007c,
+ 0x00000008, 0x00000620, 0x0000061f, 0x00050080, 0x00000008, 0x00000621, 0x00000210, 0x00000620,
+ 0x00060041, 0x00000094, 0x00000622, 0x00000081, 0x0000003a, 0x00000621, 0x0004003d, 0x00000012,
+ 0x00000623, 0x00000622, 0x000200f9, 0x00000624, 0x000200f8, 0x00000624, 0x000700f5, 0x00000012,
+ 0x00000ac9, 0x0000004c, 0x0000060f, 0x00000623, 0x00000610, 0x00050041, 0x0000001b, 0x00000626,
+ 0x000005e2, 0x00000ac2, 0x0003003e, 0x00000626, 0x00000ac9, 0x000200f9, 0x00000627, 0x000200f8,
+ 0x00000627, 0x00050080, 0x00000006, 0x00000629, 0x00000ac2, 0x0000004f, 0x000200f9, 0x000005f2,
+ 0x000200f8, 0x0000062a, 0x00050041, 0x0000001b, 0x0000062b, 0x000005e2, 0x0000003a, 0x0004003d,
+ 0x00000012, 0x0000062c, 0x0000062b, 0x0004003d, 0x00000012, 0x0000062e, 0x0000062b, 0x000200f9,
+ 0x0000062f, 0x000200f8, 0x0000062f, 0x000700f5, 0x00000012, 0x00000ac5, 0x0000062e, 0x0000062a,
+ 0x0000063d, 0x00000633, 0x000700f5, 0x00000012, 0x00000ac4, 0x0000062c, 0x0000062a, 0x00000638,
+ 0x00000633, 0x000700f5, 0x00000006, 0x00000ac3, 0x0000004f, 0x0000062a, 0x00000640, 0x00000633,
+ 0x000500b1, 0x00000065, 0x00000632, 0x00000ac3, 0x00000064, 0x000400f6, 0x00000641, 0x00000633,
+ 0x00000000, 0x000400fa, 0x00000632, 0x00000633, 0x00000641, 0x000200f8, 0x00000633, 0x00050041,
+ 0x0000001b, 0x00000636, 0x000005e2, 0x00000ac3, 0x0004003d, 0x00000012, 0x00000637, 0x00000636,
+ 0x0007000c, 0x00000012, 0x00000638, 0x00000001, 0x00000025, 0x00000ac4, 0x00000637, 0x0004003d,
+ 0x00000012, 0x0000063c, 0x00000636, 0x0007000c, 0x00000012, 0x0000063d, 0x00000001, 0x00000028,
+ 0x00000ac5, 0x0000063c, 0x00050080, 0x00000006, 0x00000640, 0x00000ac3, 0x0000004f, 0x000200f9,
+ 0x0000062f, 0x000200f8, 0x00000641, 0x0004003d, 0x00000012, 0x00000643, 0x0000062b, 0x00050041,
+ 0x0000001b, 0x00000644, 0x000005e2, 0x0000004f, 0x0004003d, 0x00000012, 0x00000645, 0x00000644,
+ 0x00050051, 0x00000012, 0x00000647, 0x000005f1, 0x00000000, 0x0008000c, 0x00000012, 0x00000648,
+ 0x00000001, 0x0000002e, 0x00000643, 0x00000645, 0x00000647, 0x00050041, 0x0000001b, 0x00000649,
+ 0x000005e2, 0x0000006f, 0x0004003d, 0x00000012, 0x0000064a, 0x00000649, 0x00050041, 0x0000001b,
+ 0x0000064b, 0x000005e2, 0x000000a3, 0x0004003d, 0x00000012, 0x0000064c, 0x0000064b, 0x0008000c,
+ 0x00000012, 0x0000064f, 0x00000001, 0x0000002e, 0x0000064a, 0x0000064c, 0x00000647, 0x00050051,
+ 0x00000012, 0x00000651, 0x000005f1, 0x00000001, 0x0008000c, 0x00000012, 0x00000652, 0x00000001,
+ 0x0000002e, 0x00000648, 0x0000064f, 0x00000651, 0x00050041, 0x0000001b, 0x00000653, 0x000005e2,
+ 0x000000ac, 0x0004003d, 0x00000012, 0x00000654, 0x00000653, 0x00050041, 0x0000001b, 0x00000655,
+ 0x000005e2, 0x000000af, 0x0004003d, 0x00000012, 0x00000656, 0x00000655, 0x0008000c, 0x00000012,
+ 0x00000659, 0x00000001, 0x0000002e, 0x00000654, 0x00000656, 0x00000647, 0x00050041, 0x0000001b,
+ 0x0000065a, 0x000005e2, 0x000000b5, 0x0004003d, 0x00000012, 0x0000065b, 0x0000065a, 0x00050041,
+ 0x0000001b, 0x0000065c, 0x000005e2, 0x000000b8, 0x0004003d, 0x00000012, 0x0000065d, 0x0000065c,
+ 0x0008000c, 0x00000012, 0x00000660, 0x00000001, 0x0000002e, 0x0000065b, 0x0000065d, 0x00000647,
+ 0x0008000c, 0x00000012, 0x00000663, 0x00000001, 0x0000002e, 0x00000659, 0x00000660, 0x00000651,
+ 0x00050051, 0x00000012, 0x00000665, 0x000005f1, 0x00000002, 0x0008000c, 0x00000012, 0x00000666,
+ 0x00000001, 0x0000002e, 0x00000652, 0x00000663, 0x00000665, 0x00060041, 0x00000094, 0x0000021f,
+ 0x00000081, 0x0000003a, 0x0000020b, 0x0003003e, 0x0000021f, 0x00000666, 0x00050080, 0x00000008,
+ 0x00000222, 0x00000203, 0x00000ac1, 0x00050084, 0x00000008, 0x00000224, 0x00000222, 0x000001c5,
+ 0x00050080, 0x00000008, 0x00000225, 0x000001e6, 0x00000224, 0x00050080, 0x00000008, 0x00000227,
+ 0x00000225, 0x000002f0, 0x00060041, 0x00000094, 0x00000229, 0x00000081, 0x0000003a, 0x00000227,
+ 0x0003003e, 0x00000229, 0x00000ac4, 0x00050080, 0x00000008, 0x0000022c, 0x00000079, 0x00000ac1,
+ 0x00050084, 0x00000008, 0x0000022e, 0x0000022c, 0x000001c5, 0x00050080, 0x00000008, 0x0000022f,
+ 0x000001e6, 0x0000022e, 0x00050080, 0x00000008, 0x00000231, 0x0000022f, 0x000002f0, 0x00060041,
+ 0x00000094, 0x00000233, 0x00000081, 0x0000003a, 0x00000231, 0x0003003e, 0x00000233, 0x00000ac5,
+ 0x000200f9, 0x00000200, 0x000200f8, 0x00000200, 0x00050080, 0x00000008, 0x00000235, 0x00000ac1,
+ 0x0000004f, 0x000200f9, 0x000001fd, 0x000200f8, 0x000001ff, 0x000200f9, 0x000001eb, 0x000200f8,
+ 0x00000236, 0x000500aa, 0x00000065, 0x00000239, 0x000001e8, 0x0000006f, 0x000300f7, 0x0000023b,
+ 0x00000000, 0x000400fa, 0x00000239, 0x0000023a, 0x00000258, 0x000200f8, 0x0000023a, 0x000200f9,
+ 0x0000023d, 0x000200f8, 0x0000023d, 0x000700f5, 0x00000008, 0x00000aba, 0x0000003b, 0x0000023a,
+ 0x00000257, 0x0000023e, 0x000500b0, 0x00000065, 0x00000243, 0x00000aba, 0x00000203, 0x000400f6,
+ 0x0000023f, 0x0000023e, 0x00000000, 0x000400fa, 0x00000243, 0x0000023e, 0x0000023f, 0x000200f8,
+ 0x0000023e, 0x00050084, 0x00000008, 0x00000247, 0x00000aba, 0x000001c5, 0x00050080, 0x00000008,
+ 0x00000248, 0x000001e3, 0x00000247, 0x00050080, 0x00000008, 0x0000024a, 0x00000248, 0x000002f0,
+ 0x00050080, 0x00000008, 0x0000024f, 0x000001e6, 0x00000247, 0x00050080, 0x00000008, 0x00000251,
+ 0x0000024f, 0x000002f0, 0x00060041, 0x00000094, 0x00000252, 0x00000081, 0x0000003a, 0x00000251,
+ 0x0004003d, 0x00000012, 0x00000253, 0x00000252, 0x0007000c, 0x00000012, 0x00000254, 0x00000001,
+ 0x00000028, 0x00000253, 0x0000004c, 0x00060041, 0x00000094, 0x00000255, 0x00000081, 0x0000003a,
+ 0x0000024a, 0x0003003e, 0x00000255, 0x00000254, 0x00050080, 0x00000008, 0x00000257, 0x00000aba,
+ 0x0000004f, 0x000200f9, 0x0000023d, 0x000200f8, 0x0000023f, 0x000200f9, 0x0000023b, 0x000200f8,
+ 0x00000258, 0x00060041, 0x000001f6, 0x0000025a, 0x00000039, 0x000000ac, 0x0000003b, 0x0004003d,
+ 0x00000012, 0x0000025b, 0x0000025a, 0x0004007f, 0x00000012, 0x0000025c, 0x0000025b, 0x00050051,
+ 0x00000006, 0x00000697, 0x000001b5, 0x00000000, 0x00050080, 0x00000006, 0x00000698, 0x00000697,
+ 0x0000004f, 0x00050051, 0x00000006, 0x0000069a, 0x000001b5, 0x00000001, 0x00050051, 0x00000006,
+ 0x0000069c, 0x000001b5, 0x00000002, 0x00060050, 0x00000010, 0x0000069d, 0x00000698, 0x0000069a,
+ 0x0000069c, 0x00050081, 0x00000013, 0x0000069f, 0x000001d3, 0x00000ad2, 0x00050082, 0x00000010,
+ 0x000006c5, 0x0000069d, 0x00000ad0, 0x0004006f, 0x00000013, 0x000006c6, 0x000006c5, 0x0008000c,
+ 0x00000013, 0x000006c7, 0x00000001, 0x0000002b, 0x0000069f, 0x0000004d, 0x000006c6, 0x0006000c,
+ 0x00000013, 0x000006c9, 0x00000001, 0x00000008, 0x000006c7, 0x0004006e, 0x00000010, 0x000006ca,
+ 0x000006c9, 0x0004006f, 0x00000013, 0x000006cd, 0x000006ca, 0x00050083, 0x00000013, 0x000006ce,
+ 0x000006c7, 0x000006cd, 0x000200f9, 0x000006cf, 0x000200f8, 0x000006cf, 0x000700f5, 0x00000006,
+ 0x00000aac, 0x0000003a, 0x00000258, 0x000006fa, 0x000006d3, 0x000500b1, 0x00000065, 0x000006d2,
+ 0x00000aac, 0x00000064, 0x000400f6, 0x000006fb, 0x000006d3, 0x00000000, 0x000400fa, 0x000006d2,
+ 0x000006d3, 0x000006fb, 0x000200f8, 0x000006d3, 0x000500c7, 0x00000006, 0x000006d6, 0x00000aac,
+ 0x0000004f, 0x000500c3, 0x00000006, 0x000006d8, 0x00000aac, 0x0000004f, 0x000500c7, 0x00000006,
+ 0x000006d9, 0x000006d8, 0x0000004f, 0x000500c3, 0x00000006, 0x000006db, 0x00000aac, 0x0000006f,
+ 0x000500c7, 0x00000006, 0x000006dc, 0x000006db, 0x0000004f, 0x00060050, 0x00000010, 0x000006dd,
+ 0x000006d6, 0x000006d9, 0x000006dc, 0x00050080, 0x00000010, 0x000006de, 0x000006ca, 0x000006dd,
+ 0x0008000c, 0x00000010, 0x000006e2, 0x00000001, 0x0000002d, 0x000006de, 0x00000074, 0x000006c5,
+ 0x00050051, 0x00000006, 0x000006e6, 0x000006e2, 0x00000000, 0x00050051, 0x00000006, 0x000006ea,
+ 0x000006e2, 0x00000001, 0x00050051, 0x00000006, 0x000006ee, 0x000006e2, 0x00000002, 0x00050084,
+ 0x00000006, 0x000006ef, 0x0000069a, 0x000006ee, 0x00050080, 0x00000006, 0x000006f0, 0x000006ea,
+ 0x000006ef, 0x00050084, 0x00000006, 0x000006f1, 0x00000698, 0x000006f0, 0x00050080, 0x00000006,
+ 0x000006f2, 0x000006e6, 0x000006f1, 0x0004007c, 0x00000008, 0x000006f3, 0x000006f2, 0x00050080,
+ 0x00000008, 0x000006f4, 0x000001d9, 0x000006f3, 0x00060041, 0x00000094, 0x000006f5, 0x00000081,
+ 0x0000003a, 0x000006f4, 0x0004003d, 0x00000012, 0x000006f6, 0x000006f5, 0x00050041, 0x0000001b,
+ 0x000006f7, 0x000006bf, 0x00000aac, 0x0003003e, 0x000006f7, 0x000006f6, 0x00050080, 0x00000006,
+ 0x000006fa, 0x00000aac, 0x0000004f, 0x000200f9, 0x000006cf, 0x000200f8, 0x000006fb, 0x00050041,
+ 0x0000001b, 0x000006fc, 0x000006bf, 0x0000003a, 0x0004003d, 0x00000012, 0x000006fd, 0x000006fc,
+ 0x00050041, 0x0000001b, 0x000006fe, 0x000006bf, 0x0000004f, 0x0004003d, 0x00000012, 0x000006ff,
+ 0x000006fe, 0x00050051, 0x00000012, 0x00000701, 0x000006ce, 0x00000000, 0x0008000c, 0x00000012,
+ 0x00000702, 0x00000001, 0x0000002e, 0x000006fd, 0x000006ff, 0x00000701, 0x00050041, 0x0000001b,
+ 0x00000703, 0x000006bf, 0x0000006f, 0x0004003d, 0x00000012, 0x00000704, 0x00000703, 0x00050041,
+ 0x0000001b, 0x00000705, 0x000006bf, 0x000000a3, 0x0004003d, 0x00000012, 0x00000706, 0x00000705,
+ 0x0008000c, 0x00000012, 0x00000709, 0x00000001, 0x0000002e, 0x00000704, 0x00000706, 0x00000701,
+ 0x00050051, 0x00000012, 0x0000070b, 0x000006ce, 0x00000001, 0x0008000c, 0x00000012, 0x0000070c,
+ 0x00000001, 0x0000002e, 0x00000702, 0x00000709, 0x0000070b, 0x00050041, 0x0000001b, 0x0000070d,
+ 0x000006bf, 0x000000ac, 0x0004003d, 0x00000012, 0x0000070e, 0x0000070d, 0x00050041, 0x0000001b,
+ 0x0000070f, 0x000006bf, 0x000000af, 0x0004003d, 0x00000012, 0x00000710, 0x0000070f, 0x0008000c,
+ 0x00000012, 0x00000713, 0x00000001, 0x0000002e, 0x0000070e, 0x00000710, 0x00000701, 0x00050041,
+ 0x0000001b, 0x00000714, 0x000006bf, 0x000000b5, 0x0004003d, 0x00000012, 0x00000715, 0x00000714,
+ 0x00050041, 0x0000001b, 0x00000716, 0x000006bf, 0x000000b8, 0x0004003d, 0x00000012, 0x00000717,
+ 0x00000716, 0x0008000c, 0x00000012, 0x0000071a, 0x00000001, 0x0000002e, 0x00000715, 0x00000717,
+ 0x00000701, 0x0008000c, 0x00000012, 0x0000071d, 0x00000001, 0x0000002e, 0x00000713, 0x0000071a,
+ 0x0000070b, 0x00050051, 0x00000012, 0x0000071f, 0x000006ce, 0x00000002, 0x0008000c, 0x00000012,
+ 0x00000720, 0x00000001, 0x0000002e, 0x0000070c, 0x0000071d, 0x0000071f, 0x00050080, 0x00000006,
+ 0x000006a6, 0x0000069a, 0x0000004f, 0x00060050, 0x00000010, 0x000006a9, 0x00000697, 0x000006a6,
+ 0x0000069c, 0x00050081, 0x00000013, 0x000006ab, 0x000001d3, 0x00000ad3, 0x00050082, 0x00000010,
+ 0x0000072b, 0x000006a9, 0x00000ad0, 0x0004006f, 0x00000013, 0x0000072c, 0x0000072b, 0x0008000c,
+ 0x00000013, 0x0000072d, 0x00000001, 0x0000002b, 0x000006ab, 0x0000004d, 0x0000072c, 0x0006000c,
+ 0x00000013, 0x0000072f, 0x00000001, 0x00000008, 0x0000072d, 0x0004006e, 0x00000010, 0x00000730,
+ 0x0000072f, 0x0004006f, 0x00000013, 0x00000733, 0x00000730, 0x00050083, 0x00000013, 0x00000734,
+ 0x0000072d, 0x00000733, 0x000200f9, 0x00000735, 0x000200f8, 0x00000735, 0x000700f5, 0x00000006,
+ 0x00000aad, 0x0000003a, 0x000006fb, 0x00000760, 0x00000739, 0x000500b1, 0x00000065, 0x00000738,
+ 0x00000aad, 0x00000064, 0x000400f6, 0x00000761, 0x00000739, 0x00000000, 0x000400fa, 0x00000738,
+ 0x00000739, 0x00000761, 0x000200f8, 0x00000739, 0x000500c7, 0x00000006, 0x0000073c, 0x00000aad,
+ 0x0000004f, 0x000500c3, 0x00000006, 0x0000073e, 0x00000aad, 0x0000004f, 0x000500c7, 0x00000006,
+ 0x0000073f, 0x0000073e, 0x0000004f, 0x000500c3, 0x00000006, 0x00000741, 0x00000aad, 0x0000006f,
+ 0x000500c7, 0x00000006, 0x00000742, 0x00000741, 0x0000004f, 0x00060050, 0x00000010, 0x00000743,
+ 0x0000073c, 0x0000073f, 0x00000742, 0x00050080, 0x00000010, 0x00000744, 0x00000730, 0x00000743,
+ 0x0008000c, 0x00000010, 0x00000748, 0x00000001, 0x0000002d, 0x00000744, 0x00000074, 0x0000072b,
+ 0x00050051, 0x00000006, 0x0000074c, 0x00000748, 0x00000000, 0x00050051, 0x00000006, 0x00000750,
+ 0x00000748, 0x00000001, 0x00050051, 0x00000006, 0x00000754, 0x00000748, 0x00000002, 0x00050084,
+ 0x00000006, 0x00000755, 0x000006a6, 0x00000754, 0x00050080, 0x00000006, 0x00000756, 0x00000750,
+ 0x00000755, 0x00050084, 0x00000006, 0x00000757, 0x00000697, 0x00000756, 0x00050080, 0x00000006,
+ 0x00000758, 0x0000074c, 0x00000757, 0x0004007c, 0x00000008, 0x00000759, 0x00000758, 0x00050080,
+ 0x00000008, 0x0000075a, 0x000001dc, 0x00000759, 0x00060041, 0x00000094, 0x0000075b, 0x00000081,
+ 0x0000003a, 0x0000075a, 0x0004003d, 0x00000012, 0x0000075c, 0x0000075b, 0x00050041, 0x0000001b,
+ 0x0000075d, 0x00000725, 0x00000aad, 0x0003003e, 0x0000075d, 0x0000075c, 0x00050080, 0x00000006,
+ 0x00000760, 0x00000aad, 0x0000004f, 0x000200f9, 0x00000735, 0x000200f8, 0x00000761, 0x00050041,
+ 0x0000001b, 0x00000762, 0x00000725, 0x0000003a, 0x0004003d, 0x00000012, 0x00000763, 0x00000762,
+ 0x00050041, 0x0000001b, 0x00000764, 0x00000725, 0x0000004f, 0x0004003d, 0x00000012, 0x00000765,
+ 0x00000764, 0x00050051, 0x00000012, 0x00000767, 0x00000734, 0x00000000, 0x0008000c, 0x00000012,
+ 0x00000768, 0x00000001, 0x0000002e, 0x00000763, 0x00000765, 0x00000767, 0x00050041, 0x0000001b,
+ 0x00000769, 0x00000725, 0x0000006f, 0x0004003d, 0x00000012, 0x0000076a, 0x00000769, 0x00050041,
+ 0x0000001b, 0x0000076b, 0x00000725, 0x000000a3, 0x0004003d, 0x00000012, 0x0000076c, 0x0000076b,
+ 0x0008000c, 0x00000012, 0x0000076f, 0x00000001, 0x0000002e, 0x0000076a, 0x0000076c, 0x00000767,
+ 0x00050051, 0x00000012, 0x00000771, 0x00000734, 0x00000001, 0x0008000c, 0x00000012, 0x00000772,
+ 0x00000001, 0x0000002e, 0x00000768, 0x0000076f, 0x00000771, 0x00050041, 0x0000001b, 0x00000773,
+ 0x00000725, 0x000000ac, 0x0004003d, 0x00000012, 0x00000774, 0x00000773, 0x00050041, 0x0000001b,
+ 0x00000775, 0x00000725, 0x000000af, 0x0004003d, 0x00000012, 0x00000776, 0x00000775, 0x0008000c,
+ 0x00000012, 0x00000779, 0x00000001, 0x0000002e, 0x00000774, 0x00000776, 0x00000767, 0x00050041,
+ 0x0000001b, 0x0000077a, 0x00000725, 0x000000b5, 0x0004003d, 0x00000012, 0x0000077b, 0x0000077a,
+ 0x00050041, 0x0000001b, 0x0000077c, 0x00000725, 0x000000b8, 0x0004003d, 0x00000012, 0x0000077d,
+ 0x0000077c, 0x0008000c, 0x00000012, 0x00000780, 0x00000001, 0x0000002e, 0x0000077b, 0x0000077d,
+ 0x00000767, 0x0008000c, 0x00000012, 0x00000783, 0x00000001, 0x0000002e, 0x00000779, 0x00000780,
+ 0x00000771, 0x00050051, 0x00000012, 0x00000785, 0x00000734, 0x00000002, 0x0008000c, 0x00000012,
+ 0x00000786, 0x00000001, 0x0000002e, 0x00000772, 0x00000783, 0x00000785, 0x00050080, 0x00000006,
+ 0x000006b4, 0x0000069c, 0x0000004f, 0x00060050, 0x00000010, 0x000006b5, 0x00000697, 0x0000069a,
+ 0x000006b4, 0x00050081, 0x00000013, 0x000006b7, 0x000001d3, 0x00000ad4, 0x00050082, 0x00000010,
+ 0x00000791, 0x000006b5, 0x00000ad0, 0x0004006f, 0x00000013, 0x00000792, 0x00000791, 0x0008000c,
+ 0x00000013, 0x00000793, 0x00000001, 0x0000002b, 0x000006b7, 0x0000004d, 0x00000792, 0x0006000c,
+ 0x00000013, 0x00000795, 0x00000001, 0x00000008, 0x00000793, 0x0004006e, 0x00000010, 0x00000796,
+ 0x00000795, 0x0004006f, 0x00000013, 0x00000799, 0x00000796, 0x00050083, 0x00000013, 0x0000079a,
+ 0x00000793, 0x00000799, 0x000200f9, 0x0000079b, 0x000200f8, 0x0000079b, 0x000700f5, 0x00000006,
+ 0x00000aae, 0x0000003a, 0x00000761, 0x000007c6, 0x0000079f, 0x000500b1, 0x00000065, 0x0000079e,
+ 0x00000aae, 0x00000064, 0x000400f6, 0x000007c7, 0x0000079f, 0x00000000, 0x000400fa, 0x0000079e,
+ 0x0000079f, 0x000007c7, 0x000200f8, 0x0000079f, 0x000500c7, 0x00000006, 0x000007a2, 0x00000aae,
+ 0x0000004f, 0x000500c3, 0x00000006, 0x000007a4, 0x00000aae, 0x0000004f, 0x000500c7, 0x00000006,
+ 0x000007a5, 0x000007a4, 0x0000004f, 0x000500c3, 0x00000006, 0x000007a7, 0x00000aae, 0x0000006f,
+ 0x000500c7, 0x00000006, 0x000007a8, 0x000007a7, 0x0000004f, 0x00060050, 0x00000010, 0x000007a9,
+ 0x000007a2, 0x000007a5, 0x000007a8, 0x00050080, 0x00000010, 0x000007aa, 0x00000796, 0x000007a9,
+ 0x0008000c, 0x00000010, 0x000007ae, 0x00000001, 0x0000002d, 0x000007aa, 0x00000074, 0x00000791,
+ 0x00050051, 0x00000006, 0x000007b2, 0x000007ae, 0x00000000, 0x00050051, 0x00000006, 0x000007b6,
+ 0x000007ae, 0x00000001, 0x00050051, 0x00000006, 0x000007ba, 0x000007ae, 0x00000002, 0x00050084,
+ 0x00000006, 0x000007bb, 0x0000069a, 0x000007ba, 0x00050080, 0x00000006, 0x000007bc, 0x000007b6,
+ 0x000007bb, 0x00050084, 0x00000006, 0x000007bd, 0x00000697, 0x000007bc, 0x00050080, 0x00000006,
+ 0x000007be, 0x000007b2, 0x000007bd, 0x0004007c, 0x00000008, 0x000007bf, 0x000007be, 0x00050080,
+ 0x00000008, 0x000007c0, 0x000001df, 0x000007bf, 0x00060041, 0x00000094, 0x000007c1, 0x00000081,
+ 0x0000003a, 0x000007c0, 0x0004003d, 0x00000012, 0x000007c2, 0x000007c1, 0x00050041, 0x0000001b,
+ 0x000007c3, 0x0000078b, 0x00000aae, 0x0003003e, 0x000007c3, 0x000007c2, 0x00050080, 0x00000006,
+ 0x000007c6, 0x00000aae, 0x0000004f, 0x000200f9, 0x0000079b, 0x000200f8, 0x000007c7, 0x00050041,
+ 0x0000001b, 0x000007c8, 0x0000078b, 0x0000003a, 0x0004003d, 0x00000012, 0x000007c9, 0x000007c8,
+ 0x00050041, 0x0000001b, 0x000007ca, 0x0000078b, 0x0000004f, 0x0004003d, 0x00000012, 0x000007cb,
+ 0x000007ca, 0x00050051, 0x00000012, 0x000007cd, 0x0000079a, 0x00000000, 0x0008000c, 0x00000012,
+ 0x000007ce, 0x00000001, 0x0000002e, 0x000007c9, 0x000007cb, 0x000007cd, 0x00050041, 0x0000001b,
+ 0x000007cf, 0x0000078b, 0x0000006f, 0x0004003d, 0x00000012, 0x000007d0, 0x000007cf, 0x00050041,
+ 0x0000001b, 0x000007d1, 0x0000078b, 0x000000a3, 0x0004003d, 0x00000012, 0x000007d2, 0x000007d1,
+ 0x0008000c, 0x00000012, 0x000007d5, 0x00000001, 0x0000002e, 0x000007d0, 0x000007d2, 0x000007cd,
+ 0x00050051, 0x00000012, 0x000007d7, 0x0000079a, 0x00000001, 0x0008000c, 0x00000012, 0x000007d8,
+ 0x00000001, 0x0000002e, 0x000007ce, 0x000007d5, 0x000007d7, 0x00050041, 0x0000001b, 0x000007d9,
+ 0x0000078b, 0x000000ac, 0x0004003d, 0x00000012, 0x000007da, 0x000007d9, 0x00050041, 0x0000001b,
+ 0x000007db, 0x0000078b, 0x000000af, 0x0004003d, 0x00000012, 0x000007dc, 0x000007db, 0x0008000c,
+ 0x00000012, 0x000007df, 0x00000001, 0x0000002e, 0x000007da, 0x000007dc, 0x000007cd, 0x00050041,
+ 0x0000001b, 0x000007e0, 0x0000078b, 0x000000b5, 0x0004003d, 0x00000012, 0x000007e1, 0x000007e0,
+ 0x00050041, 0x0000001b, 0x000007e2, 0x0000078b, 0x000000b8, 0x0004003d, 0x00000012, 0x000007e3,
+ 0x000007e2, 0x0008000c, 0x00000012, 0x000007e6, 0x00000001, 0x0000002e, 0x000007e1, 0x000007e3,
+ 0x000007cd, 0x0008000c, 0x00000012, 0x000007e9, 0x00000001, 0x0000002e, 0x000007df, 0x000007e6,
+ 0x000007d7, 0x00050051, 0x00000012, 0x000007eb, 0x0000079a, 0x00000002, 0x0008000c, 0x00000012,
+ 0x000007ec, 0x00000001, 0x0000002e, 0x000007d8, 0x000007e9, 0x000007eb, 0x00060050, 0x00000013,
+ 0x000006ba, 0x00000720, 0x00000786, 0x000007ec, 0x00050085, 0x00000012, 0x0000067a, 0x0000025b,
+ 0x00000ad5, 0x0005008e, 0x00000013, 0x0000067c, 0x000006ba, 0x0000067a, 0x00050083, 0x00000013,
+ 0x0000067d, 0x000001d5, 0x0000067c, 0x00050083, 0x00000013, 0x00000805, 0x0000067d, 0x00000163,
+ 0x0008000c, 0x00000013, 0x0000082d, 0x00000001, 0x0000002b, 0x00000805, 0x0000004d, 0x000006c6,
+ 0x0006000c, 0x00000013, 0x0000082f, 0x00000001, 0x00000008, 0x0000082d, 0x0004006e, 0x00000010,
+ 0x00000830, 0x0000082f, 0x0004006f, 0x00000013, 0x00000833, 0x00000830, 0x00050083, 0x00000013,
+ 0x00000834, 0x0000082d, 0x00000833, 0x000200f9, 0x00000835, 0x000200f8, 0x00000835, 0x000700f5,
+ 0x00000006, 0x00000aaf, 0x0000003a, 0x000007c7, 0x00000860, 0x00000839, 0x000500b1, 0x00000065,
+ 0x00000838, 0x00000aaf, 0x00000064, 0x000400f6, 0x00000861, 0x00000839, 0x00000000, 0x000400fa,
+ 0x00000838, 0x00000839, 0x00000861, 0x000200f8, 0x00000839, 0x000500c7, 0x00000006, 0x0000083c,
+ 0x00000aaf, 0x0000004f, 0x000500c3, 0x00000006, 0x0000083e, 0x00000aaf, 0x0000004f, 0x000500c7,
+ 0x00000006, 0x0000083f, 0x0000083e, 0x0000004f, 0x000500c3, 0x00000006, 0x00000841, 0x00000aaf,
+ 0x0000006f, 0x000500c7, 0x00000006, 0x00000842, 0x00000841, 0x0000004f, 0x00060050, 0x00000010,
+ 0x00000843, 0x0000083c, 0x0000083f, 0x00000842, 0x00050080, 0x00000010, 0x00000844, 0x00000830,
+ 0x00000843, 0x0008000c, 0x00000010, 0x00000848, 0x00000001, 0x0000002d, 0x00000844, 0x00000074,
+ 0x000006c5, 0x00050051, 0x00000006, 0x0000084c, 0x00000848, 0x00000000, 0x00050051, 0x00000006,
+ 0x00000850, 0x00000848, 0x00000001, 0x00050051, 0x00000006, 0x00000854, 0x00000848, 0x00000002,
+ 0x00050084, 0x00000006, 0x00000855, 0x0000069a, 0x00000854, 0x00050080, 0x00000006, 0x00000856,
+ 0x00000850, 0x00000855, 0x00050084, 0x00000006, 0x00000857, 0x00000698, 0x00000856, 0x00050080,
+ 0x00000006, 0x00000858, 0x0000084c, 0x00000857, 0x0004007c, 0x00000008, 0x00000859, 0x00000858,
+ 0x00050080, 0x00000008, 0x0000085a, 0x000001d9, 0x00000859, 0x00060041, 0x00000094, 0x0000085b,
+ 0x00000081, 0x0000003a, 0x0000085a, 0x0004003d, 0x00000012, 0x0000085c, 0x0000085b, 0x00050041,
+ 0x0000001b, 0x0000085d, 0x00000825, 0x00000aaf, 0x0003003e, 0x0000085d, 0x0000085c, 0x00050080,
+ 0x00000006, 0x00000860, 0x00000aaf, 0x0000004f, 0x000200f9, 0x00000835, 0x000200f8, 0x00000861,
+ 0x00050041, 0x0000001b, 0x00000862, 0x00000825, 0x0000003a, 0x0004003d, 0x00000012, 0x00000863,
+ 0x00000862, 0x00050041, 0x0000001b, 0x00000864, 0x00000825, 0x0000004f, 0x0004003d, 0x00000012,
+ 0x00000865, 0x00000864, 0x00050051, 0x00000012, 0x00000867, 0x00000834, 0x00000000, 0x0008000c,
+ 0x00000012, 0x00000868, 0x00000001, 0x0000002e, 0x00000863, 0x00000865, 0x00000867, 0x00050041,
+ 0x0000001b, 0x00000869, 0x00000825, 0x0000006f, 0x0004003d, 0x00000012, 0x0000086a, 0x00000869,
+ 0x00050041, 0x0000001b, 0x0000086b, 0x00000825, 0x000000a3, 0x0004003d, 0x00000012, 0x0000086c,
+ 0x0000086b, 0x0008000c, 0x00000012, 0x0000086f, 0x00000001, 0x0000002e, 0x0000086a, 0x0000086c,
+ 0x00000867, 0x00050051, 0x00000012, 0x00000871, 0x00000834, 0x00000001, 0x0008000c, 0x00000012,
+ 0x00000872, 0x00000001, 0x0000002e, 0x00000868, 0x0000086f, 0x00000871, 0x00050041, 0x0000001b,
+ 0x00000873, 0x00000825, 0x000000ac, 0x0004003d, 0x00000012, 0x00000874, 0x00000873, 0x00050041,
+ 0x0000001b, 0x00000875, 0x00000825, 0x000000af, 0x0004003d, 0x00000012, 0x00000876, 0x00000875,
+ 0x0008000c, 0x00000012, 0x00000879, 0x00000001, 0x0000002e, 0x00000874, 0x00000876, 0x00000867,
+ 0x00050041, 0x0000001b, 0x0000087a, 0x00000825, 0x000000b5, 0x0004003d, 0x00000012, 0x0000087b,
+ 0x0000087a, 0x00050041, 0x0000001b, 0x0000087c, 0x00000825, 0x000000b8, 0x0004003d, 0x00000012,
+ 0x0000087d, 0x0000087c, 0x0008000c, 0x00000012, 0x00000880, 0x00000001, 0x0000002e, 0x0000087b,
+ 0x0000087d, 0x00000867, 0x0008000c, 0x00000012, 0x00000883, 0x00000001, 0x0000002e, 0x00000879,
+ 0x00000880, 0x00000871, 0x00050051, 0x00000012, 0x00000885, 0x00000834, 0x00000002, 0x0008000c,
+ 0x00000012, 0x00000886, 0x00000001, 0x0000002e, 0x00000872, 0x00000883, 0x00000885, 0x00050083,
+ 0x00000013, 0x00000811, 0x0000067d, 0x00000173, 0x0008000c, 0x00000013, 0x00000893, 0x00000001,
+ 0x0000002b, 0x00000811, 0x0000004d, 0x0000072c, 0x0006000c, 0x00000013, 0x00000895, 0x00000001,
+ 0x00000008, 0x00000893, 0x0004006e, 0x00000010, 0x00000896, 0x00000895, 0x0004006f, 0x00000013,
+ 0x00000899, 0x00000896, 0x00050083, 0x00000013, 0x0000089a, 0x00000893, 0x00000899, 0x000200f9,
+ 0x0000089b, 0x000200f8, 0x0000089b, 0x000700f5, 0x00000006, 0x00000ab0, 0x0000003a, 0x00000861,
+ 0x000008c6, 0x0000089f, 0x000500b1, 0x00000065, 0x0000089e, 0x00000ab0, 0x00000064, 0x000400f6,
+ 0x000008c7, 0x0000089f, 0x00000000, 0x000400fa, 0x0000089e, 0x0000089f, 0x000008c7, 0x000200f8,
+ 0x0000089f, 0x000500c7, 0x00000006, 0x000008a2, 0x00000ab0, 0x0000004f, 0x000500c3, 0x00000006,
+ 0x000008a4, 0x00000ab0, 0x0000004f, 0x000500c7, 0x00000006, 0x000008a5, 0x000008a4, 0x0000004f,
+ 0x000500c3, 0x00000006, 0x000008a7, 0x00000ab0, 0x0000006f, 0x000500c7, 0x00000006, 0x000008a8,
+ 0x000008a7, 0x0000004f, 0x00060050, 0x00000010, 0x000008a9, 0x000008a2, 0x000008a5, 0x000008a8,
+ 0x00050080, 0x00000010, 0x000008aa, 0x00000896, 0x000008a9, 0x0008000c, 0x00000010, 0x000008ae,
+ 0x00000001, 0x0000002d, 0x000008aa, 0x00000074, 0x0000072b, 0x00050051, 0x00000006, 0x000008b2,
+ 0x000008ae, 0x00000000, 0x00050051, 0x00000006, 0x000008b6, 0x000008ae, 0x00000001, 0x00050051,
+ 0x00000006, 0x000008ba, 0x000008ae, 0x00000002, 0x00050084, 0x00000006, 0x000008bb, 0x000006a6,
+ 0x000008ba, 0x00050080, 0x00000006, 0x000008bc, 0x000008b6, 0x000008bb, 0x00050084, 0x00000006,
+ 0x000008bd, 0x00000697, 0x000008bc, 0x00050080, 0x00000006, 0x000008be, 0x000008b2, 0x000008bd,
+ 0x0004007c, 0x00000008, 0x000008bf, 0x000008be, 0x00050080, 0x00000008, 0x000008c0, 0x000001dc,
+ 0x000008bf, 0x00060041, 0x00000094, 0x000008c1, 0x00000081, 0x0000003a, 0x000008c0, 0x0004003d,
+ 0x00000012, 0x000008c2, 0x000008c1, 0x00050041, 0x0000001b, 0x000008c3, 0x0000088b, 0x00000ab0,
+ 0x0003003e, 0x000008c3, 0x000008c2, 0x00050080, 0x00000006, 0x000008c6, 0x00000ab0, 0x0000004f,
+ 0x000200f9, 0x0000089b, 0x000200f8, 0x000008c7, 0x00050041, 0x0000001b, 0x000008c8, 0x0000088b,
+ 0x0000003a, 0x0004003d, 0x00000012, 0x000008c9, 0x000008c8, 0x00050041, 0x0000001b, 0x000008ca,
+ 0x0000088b, 0x0000004f, 0x0004003d, 0x00000012, 0x000008cb, 0x000008ca, 0x00050051, 0x00000012,
+ 0x000008cd, 0x0000089a, 0x00000000, 0x0008000c, 0x00000012, 0x000008ce, 0x00000001, 0x0000002e,
+ 0x000008c9, 0x000008cb, 0x000008cd, 0x00050041, 0x0000001b, 0x000008cf, 0x0000088b, 0x0000006f,
+ 0x0004003d, 0x00000012, 0x000008d0, 0x000008cf, 0x00050041, 0x0000001b, 0x000008d1, 0x0000088b,
+ 0x000000a3, 0x0004003d, 0x00000012, 0x000008d2, 0x000008d1, 0x0008000c, 0x00000012, 0x000008d5,
+ 0x00000001, 0x0000002e, 0x000008d0, 0x000008d2, 0x000008cd, 0x00050051, 0x00000012, 0x000008d7,
+ 0x0000089a, 0x00000001, 0x0008000c, 0x00000012, 0x000008d8, 0x00000001, 0x0000002e, 0x000008ce,
+ 0x000008d5, 0x000008d7, 0x00050041, 0x0000001b, 0x000008d9, 0x0000088b, 0x000000ac, 0x0004003d,
+ 0x00000012, 0x000008da, 0x000008d9, 0x00050041, 0x0000001b, 0x000008db, 0x0000088b, 0x000000af,
+ 0x0004003d, 0x00000012, 0x000008dc, 0x000008db, 0x0008000c, 0x00000012, 0x000008df, 0x00000001,
+ 0x0000002e, 0x000008da, 0x000008dc, 0x000008cd, 0x00050041, 0x0000001b, 0x000008e0, 0x0000088b,
+ 0x000000b5, 0x0004003d, 0x00000012, 0x000008e1, 0x000008e0, 0x00050041, 0x0000001b, 0x000008e2,
+ 0x0000088b, 0x000000b8, 0x0004003d, 0x00000012, 0x000008e3, 0x000008e2, 0x0008000c, 0x00000012,
+ 0x000008e6, 0x00000001, 0x0000002e, 0x000008e1, 0x000008e3, 0x000008cd, 0x0008000c, 0x00000012,
+ 0x000008e9, 0x00000001, 0x0000002e, 0x000008df, 0x000008e6, 0x000008d7, 0x00050051, 0x00000012,
+ 0x000008eb, 0x0000089a, 0x00000002, 0x0008000c, 0x00000012, 0x000008ec, 0x00000001, 0x0000002e,
+ 0x000008d8, 0x000008e9, 0x000008eb, 0x00050083, 0x00000013, 0x0000081d, 0x0000067d, 0x00000183,
+ 0x0008000c, 0x00000013, 0x000008f9, 0x00000001, 0x0000002b, 0x0000081d, 0x0000004d, 0x00000792,
+ 0x0006000c, 0x00000013, 0x000008fb, 0x00000001, 0x00000008, 0x000008f9, 0x0004006e, 0x00000010,
+ 0x000008fc, 0x000008fb, 0x0004006f, 0x00000013, 0x000008ff, 0x000008fc, 0x00050083, 0x00000013,
+ 0x00000900, 0x000008f9, 0x000008ff, 0x000200f9, 0x00000901, 0x000200f8, 0x00000901, 0x000700f5,
+ 0x00000006, 0x00000ab1, 0x0000003a, 0x000008c7, 0x0000092c, 0x00000905, 0x000500b1, 0x00000065,
+ 0x00000904, 0x00000ab1, 0x00000064, 0x000400f6, 0x0000092d, 0x00000905, 0x00000000, 0x000400fa,
+ 0x00000904, 0x00000905, 0x0000092d, 0x000200f8, 0x00000905, 0x000500c7, 0x00000006, 0x00000908,
+ 0x00000ab1, 0x0000004f, 0x000500c3, 0x00000006, 0x0000090a, 0x00000ab1, 0x0000004f, 0x000500c7,
+ 0x00000006, 0x0000090b, 0x0000090a, 0x0000004f, 0x000500c3, 0x00000006, 0x0000090d, 0x00000ab1,
+ 0x0000006f, 0x000500c7, 0x00000006, 0x0000090e, 0x0000090d, 0x0000004f, 0x00060050, 0x00000010,
+ 0x0000090f, 0x00000908, 0x0000090b, 0x0000090e, 0x00050080, 0x00000010, 0x00000910, 0x000008fc,
+ 0x0000090f, 0x0008000c, 0x00000010, 0x00000914, 0x00000001, 0x0000002d, 0x00000910, 0x00000074,
+ 0x00000791, 0x00050051, 0x00000006, 0x00000918, 0x00000914, 0x00000000, 0x00050051, 0x00000006,
+ 0x0000091c, 0x00000914, 0x00000001, 0x00050051, 0x00000006, 0x00000920, 0x00000914, 0x00000002,
+ 0x00050084, 0x00000006, 0x00000921, 0x0000069a, 0x00000920, 0x00050080, 0x00000006, 0x00000922,
+ 0x0000091c, 0x00000921, 0x00050084, 0x00000006, 0x00000923, 0x00000697, 0x00000922, 0x00050080,
+ 0x00000006, 0x00000924, 0x00000918, 0x00000923, 0x0004007c, 0x00000008, 0x00000925, 0x00000924,
+ 0x00050080, 0x00000008, 0x00000926, 0x000001df, 0x00000925, 0x00060041, 0x00000094, 0x00000927,
+ 0x00000081, 0x0000003a, 0x00000926, 0x0004003d, 0x00000012, 0x00000928, 0x00000927, 0x00050041,
+ 0x0000001b, 0x00000929, 0x000008f1, 0x00000ab1, 0x0003003e, 0x00000929, 0x00000928, 0x00050080,
+ 0x00000006, 0x0000092c, 0x00000ab1, 0x0000004f, 0x000200f9, 0x00000901, 0x000200f8, 0x0000092d,
+ 0x00050041, 0x0000001b, 0x0000092e, 0x000008f1, 0x0000003a, 0x0004003d, 0x00000012, 0x0000092f,
+ 0x0000092e, 0x00050041, 0x0000001b, 0x00000930, 0x000008f1, 0x0000004f, 0x0004003d, 0x00000012,
+ 0x00000931, 0x00000930, 0x00050051, 0x00000012, 0x00000933, 0x00000900, 0x00000000, 0x0008000c,
+ 0x00000012, 0x00000934, 0x00000001, 0x0000002e, 0x0000092f, 0x00000931, 0x00000933, 0x00050041,
+ 0x0000001b, 0x00000935, 0x000008f1, 0x0000006f, 0x0004003d, 0x00000012, 0x00000936, 0x00000935,
+ 0x00050041, 0x0000001b, 0x00000937, 0x000008f1, 0x000000a3, 0x0004003d, 0x00000012, 0x00000938,
+ 0x00000937, 0x0008000c, 0x00000012, 0x0000093b, 0x00000001, 0x0000002e, 0x00000936, 0x00000938,
+ 0x00000933, 0x00050051, 0x00000012, 0x0000093d, 0x00000900, 0x00000001, 0x0008000c, 0x00000012,
+ 0x0000093e, 0x00000001, 0x0000002e, 0x00000934, 0x0000093b, 0x0000093d, 0x00050041, 0x0000001b,
+ 0x0000093f, 0x000008f1, 0x000000ac, 0x0004003d, 0x00000012, 0x00000940, 0x0000093f, 0x00050041,
+ 0x0000001b, 0x00000941, 0x000008f1, 0x000000af, 0x0004003d, 0x00000012, 0x00000942, 0x00000941,
+ 0x0008000c, 0x00000012, 0x00000945, 0x00000001, 0x0000002e, 0x00000940, 0x00000942, 0x00000933,
+ 0x00050041, 0x0000001b, 0x00000946, 0x000008f1, 0x000000b5, 0x0004003d, 0x00000012, 0x00000947,
+ 0x00000946, 0x00050041, 0x0000001b, 0x00000948, 0x000008f1, 0x000000b8, 0x0004003d, 0x00000012,
+ 0x00000949, 0x00000948, 0x0008000c, 0x00000012, 0x0000094c, 0x00000001, 0x0000002e, 0x00000947,
+ 0x00000949, 0x00000933, 0x0008000c, 0x00000012, 0x0000094f, 0x00000001, 0x0000002e, 0x00000945,
+ 0x0000094c, 0x0000093d, 0x00050051, 0x00000012, 0x00000951, 0x00000900, 0x00000002, 0x0008000c,
+ 0x00000012, 0x00000952, 0x00000001, 0x0000002e, 0x0000093e, 0x0000094f, 0x00000951, 0x00060050,
+ 0x00000013, 0x00000820, 0x00000886, 0x000008ec, 0x00000952, 0x0005008e, 0x00000013, 0x00000685,
+ 0x00000820, 0x0000025c, 0x00050083, 0x00000013, 0x00000686, 0x000001d5, 0x00000685, 0x00050083,
+ 0x00000013, 0x00000268, 0x00000686, 0x00000acf, 0x000200f9, 0x0000026a, 0x000200f8, 0x0000026a,
+ 0x000700f5, 0x00000008, 0x00000ab2, 0x0000003b, 0x0000092d, 0x000002c8, 0x0000026d, 0x000500b0,
+ 0x00000065, 0x00000270, 0x00000ab2, 0x00000203, 0x000400f6, 0x0000026c, 0x0000026d, 0x00000000,
+ 0x000400fa, 0x00000270, 0x0000026b, 0x0000026c, 0x000200f8, 0x0000026b, 0x00050084, 0x00000008,
+ 0x00000275, 0x00000ab2, 0x000001c5, 0x00050080, 0x00000008, 0x00000276, 0x000001e6, 0x00000275,
+ 0x0004006f, 0x00000013, 0x0000095f, 0x000001b6, 0x0008000c, 0x00000013, 0x00000960, 0x00000001,
+ 0x0000002b, 0x00000268, 0x000000c8, 0x0000095f, 0x0006000c, 0x00000013, 0x00000962, 0x00000001,
+ 0x00000008, 0x00000960, 0x0004006e, 0x00000010, 0x00000963, 0x00000962, 0x0004006f, 0x00000013,
+ 0x00000966, 0x00000963, 0x00050083, 0x00000013, 0x00000967, 0x00000960, 0x00000966, 0x000200f9,
+ 0x00000968, 0x000200f8, 0x00000968, 0x000700f5, 0x00000006, 0x00000ab3, 0x0000003a, 0x0000026b,
+ 0x0000099f, 0x0000099d, 0x000500b1, 0x00000065, 0x0000096b, 0x00000ab3, 0x00000064, 0x000400f6,
+ 0x000009a0, 0x0000099d, 0x00000000, 0x000400fa, 0x0000096b, 0x0000096c, 0x000009a0, 0x000200f8,
+ 0x0000096c, 0x000500c7, 0x00000006, 0x0000096f, 0x00000ab3, 0x0000004f, 0x000500c3, 0x00000006,
+ 0x00000971, 0x00000ab3, 0x0000004f, 0x000500c7, 0x00000006, 0x00000972, 0x00000971, 0x0000004f,
+ 0x000500c3, 0x00000006, 0x00000974, 0x00000ab3, 0x0000006f, 0x000500c7, 0x00000006, 0x00000975,
+ 0x00000974, 0x0000004f, 0x00060050, 0x00000010, 0x00000976, 0x0000096f, 0x00000972, 0x00000975,
+ 0x00050080, 0x00000010, 0x00000977, 0x00000963, 0x00000976, 0x000500b1, 0x000000ec, 0x00000979,
+ 0x00000977, 0x00000074, 0x0004009a, 0x00000065, 0x0000097a, 0x00000979, 0x000400a8, 0x00000065,
+ 0x0000097b, 0x0000097a, 0x000300f7, 0x00000981, 0x00000000, 0x000400fa, 0x0000097b, 0x0000097c,
+ 0x00000981, 0x000200f8, 0x0000097c, 0x000500af, 0x000000ec, 0x0000097f, 0x00000977, 0x000001b6,
+ 0x0004009a, 0x00000065, 0x00000980, 0x0000097f, 0x000200f9, 0x00000981, 0x000200f8, 0x00000981,
+ 0x000700f5, 0x00000065, 0x00000982, 0x0000097a, 0x0000096c, 0x00000980, 0x0000097c, 0x000300f7,
+ 0x0000099a, 0x00000000, 0x000400fa, 0x00000982, 0x00000985, 0x00000986, 0x000200f8, 0x00000985,
+ 0x000200f9, 0x0000099a, 0x000200f8, 0x00000986, 0x00050051, 0x00000006, 0x00000989, 0x00000977,
+ 0x00000000, 0x00050051, 0x00000006, 0x0000098d, 0x00000977, 0x00000001, 0x00050051, 0x00000006,
+ 0x00000991, 0x00000977, 0x00000002, 0x00050084, 0x00000006, 0x00000992, 0x0000069a, 0x00000991,
+ 0x00050080, 0x00000006, 0x00000993, 0x0000098d, 0x00000992, 0x00050084, 0x00000006, 0x00000994,
+ 0x00000697, 0x00000993, 0x00050080, 0x00000006, 0x00000995, 0x00000989, 0x00000994, 0x0004007c,
+ 0x00000008, 0x00000996, 0x00000995, 0x00050080, 0x00000008, 0x00000997, 0x00000276, 0x00000996,
+ 0x00060041, 0x00000094, 0x00000998, 0x00000081, 0x0000003a, 0x00000997, 0x0004003d, 0x00000012,
+ 0x00000999, 0x00000998, 0x000200f9, 0x0000099a, 0x000200f8, 0x0000099a, 0x000700f5, 0x00000012,
+ 0x00000ab8, 0x0000004c, 0x00000985, 0x00000999, 0x00000986, 0x00050041, 0x0000001b, 0x0000099c,
+ 0x00000958, 0x00000ab3, 0x0003003e, 0x0000099c, 0x00000ab8, 0x000200f9, 0x0000099d, 0x000200f8,
+ 0x0000099d, 0x00050080, 0x00000006, 0x0000099f, 0x00000ab3, 0x0000004f, 0x000200f9, 0x00000968,
+ 0x000200f8, 0x000009a0, 0x00050041, 0x0000001b, 0x000009b8, 0x00000958, 0x0000003a, 0x0004003d,
+ 0x00000012, 0x000009b9, 0x000009b8, 0x00050041, 0x0000001b, 0x000009ba, 0x00000958, 0x0000004f,
+ 0x0004003d, 0x00000012, 0x000009bb, 0x000009ba, 0x00050051, 0x00000012, 0x000009bd, 0x00000967,
+ 0x00000000, 0x0008000c, 0x00000012, 0x000009be, 0x00000001, 0x0000002e, 0x000009b9, 0x000009bb,
+ 0x000009bd, 0x00050041, 0x0000001b, 0x000009bf, 0x00000958, 0x0000006f, 0x0004003d, 0x00000012,
+ 0x000009c0, 0x000009bf, 0x00050041, 0x0000001b, 0x000009c1, 0x00000958, 0x000000a3, 0x0004003d,
+ 0x00000012, 0x000009c2, 0x000009c1, 0x0008000c, 0x00000012, 0x000009c5, 0x00000001, 0x0000002e,
+ 0x000009c0, 0x000009c2, 0x000009bd, 0x00050051, 0x00000012, 0x000009c7, 0x00000967, 0x00000001,
+ 0x0008000c, 0x00000012, 0x000009c8, 0x00000001, 0x0000002e, 0x000009be, 0x000009c5, 0x000009c7,
+ 0x00050041, 0x0000001b, 0x000009c9, 0x00000958, 0x000000ac, 0x0004003d, 0x00000012, 0x000009ca,
+ 0x000009c9, 0x00050041, 0x0000001b, 0x000009cb, 0x00000958, 0x000000af, 0x0004003d, 0x00000012,
+ 0x000009cc, 0x000009cb, 0x0008000c, 0x00000012, 0x000009cf, 0x00000001, 0x0000002e, 0x000009ca,
+ 0x000009cc, 0x000009bd, 0x00050041, 0x0000001b, 0x000009d0, 0x00000958, 0x000000b5, 0x0004003d,
+ 0x00000012, 0x000009d1, 0x000009d0, 0x00050041, 0x0000001b, 0x000009d2, 0x00000958, 0x000000b8,
+ 0x0004003d, 0x00000012, 0x000009d3, 0x000009d2, 0x0008000c, 0x00000012, 0x000009d6, 0x00000001,
+ 0x0000002e, 0x000009d1, 0x000009d3, 0x000009bd, 0x0008000c, 0x00000012, 0x000009d9, 0x00000001,
+ 0x0000002e, 0x000009cf, 0x000009d6, 0x000009c7, 0x00050051, 0x00000012, 0x000009db, 0x00000967,
+ 0x00000002, 0x0008000c, 0x00000012, 0x000009dc, 0x00000001, 0x0000002e, 0x000009c8, 0x000009d9,
+ 0x000009db, 0x00050080, 0x00000008, 0x0000028c, 0x00000276, 0x000002f0, 0x00060041, 0x00000094,
+ 0x0000028d, 0x00000081, 0x0000003a, 0x0000028c, 0x0004003d, 0x00000012, 0x0000028e, 0x0000028d,
+ 0x00050080, 0x00000008, 0x00000295, 0x000001e3, 0x00000275, 0x00050080, 0x00000008, 0x00000297,
+ 0x00000295, 0x000002f0, 0x00060041, 0x00000094, 0x00000298, 0x00000081, 0x0000003a, 0x00000297,
+ 0x0004003d, 0x00000012, 0x00000299, 0x00000298, 0x00050083, 0x00000012, 0x0000029b, 0x00000299,
+ 0x000009dc, 0x00050085, 0x00000012, 0x0000029c, 0x00000162, 0x0000029b, 0x00050081, 0x00000012,
+ 0x0000029d, 0x0000028e, 0x0000029c, 0x00050080, 0x00000008, 0x000002a1, 0x00000203, 0x00000ab2,
+ 0x00050084, 0x00000008, 0x000002a3, 0x000002a1, 0x000001c5, 0x00050080, 0x00000008, 0x000002a4,
+ 0x000001e6, 0x000002a3, 0x00050080, 0x00000008, 0x000002a6, 0x000002a4, 0x000002f0, 0x00060041,
+ 0x00000094, 0x000002a7, 0x00000081, 0x0000003a, 0x000002a6, 0x0004003d, 0x00000012, 0x000002a8,
+ 0x000002a7, 0x000500b8, 0x00000065, 0x000002a9, 0x0000029d, 0x000002a8, 0x000400a8, 0x00000065,
+ 0x000002aa, 0x000002a9, 0x000300f7, 0x000002ac, 0x00000000, 0x000400fa, 0x000002aa, 0x000002ab,
+ 0x000002ac, 0x000200f8, 0x000002ab, 0x00050080, 0x00000008, 0x000002b0, 0x00000079, 0x00000ab2,
+ 0x00050084, 0x00000008, 0x000002b2, 0x000002b0, 0x000001c5, 0x00050080, 0x00000008, 0x000002b3,
+ 0x000001e6, 0x000002b2, 0x00050080, 0x00000008, 0x000002b5, 0x000002b3, 0x000002f0, 0x00060041,
+ 0x00000094, 0x000002b6, 0x00000081, 0x0000003a, 0x000002b5, 0x0004003d, 0x00000012, 0x000002b7,
+ 0x000002b6, 0x000500ba, 0x00000065, 0x000002b8, 0x0000029d, 0x000002b7, 0x000200f9, 0x000002ac,
+ 0x000200f8, 0x000002ac, 0x000700f5, 0x00000065, 0x000002b9, 0x000002a9, 0x000009a0, 0x000002b8,
+ 0x000002ab, 0x000600a9, 0x00000012, 0x000002bc, 0x000002b9, 0x0000028e, 0x0000029d, 0x0007000c,
+ 0x00000012, 0x000002c5, 0x00000001, 0x00000028, 0x000002bc, 0x0000004c, 0x0003003e, 0x00000298,
+ 0x000002c5, 0x000200f9, 0x0000026d, 0x000200f8, 0x0000026d, 0x00050080, 0x00000008, 0x000002c8,
+ 0x00000ab2, 0x0000004f, 0x000200f9, 0x0000026a, 0x000200f8, 0x0000026c, 0x000200f9, 0x0000023b,
+ 0x000200f8, 0x0000023b, 0x000200f9, 0x000001eb, 0x000200f8, 0x000001eb, 0x000200f9, 0x000002de,
+ 0x000200f8, 0x000002de, 0x000100fd, 0x00010038,
+};
+static const uint32_t spv_cg[] = {
+ 0x07230203, 0x00010300, 0x000d000b, 0x000003b7, 0x00000000, 0x00020011, 0x00000001, 0x0006000b,
+ 0x00000001, 0x4c534c47, 0x6474732e, 0x3035342e, 0x00000000, 0x0003000e, 0x00000000, 0x00000001,
+ 0x0008000f, 0x00000005, 0x00000004, 0x6e69616d, 0x00000000, 0x000000ae, 0x00000125, 0x00000265,
+ 0x00060010, 0x00000004, 0x00000011, 0x00000100, 0x00000001, 0x00000001, 0x00040047, 0x00000014,
+ 0x00000006, 0x00000004, 0x00030047, 0x00000015, 0x00000002, 0x00050048, 0x00000015, 0x00000000,
+ 0x00000023, 0x00000000, 0x00040047, 0x00000017, 0x00000021, 0x00000002, 0x00040047, 0x00000017,
+ 0x00000022, 0x00000000, 0x00040047, 0x0000003b, 0x00000006, 0x00000004, 0x00030047, 0x0000003c,
+ 0x00000002, 0x00050048, 0x0000003c, 0x00000000, 0x00000023, 0x00000000, 0x00040047, 0x0000003e,
+ 0x00000021, 0x00000000, 0x00040047, 0x0000003e, 0x00000022, 0x00000000, 0x00030047, 0x000000a5,
+ 0x00000002, 0x00050048, 0x000000a5, 0x00000000, 0x00000023, 0x00000000, 0x00050048, 0x000000a5,
+ 0x00000001, 0x00000023, 0x00000010, 0x00050048, 0x000000a5, 0x00000002, 0x00000023, 0x00000020,
+ 0x00050048, 0x000000a5, 0x00000003, 0x00000023, 0x00000030, 0x00050048, 0x000000a5, 0x00000004,
+ 0x00000023, 0x00000040, 0x00050048, 0x000000a5, 0x00000005, 0x00000023, 0x00000050, 0x00050048,
+ 0x000000a5, 0x00000006, 0x00000023, 0x00000060, 0x00040047, 0x000000ae, 0x0000000b, 0x0000001d,
+ 0x00040047, 0x000000c8, 0x00000006, 0x00000004, 0x00030047, 0x000000c9, 0x00000002, 0x00050048,
+ 0x000000c9, 0x00000000, 0x00000023, 0x00000000, 0x00040047, 0x000000cb, 0x00000021, 0x00000003,
+ 0x00040047, 0x000000cb, 0x00000022, 0x00000000, 0x00040047, 0x00000125, 0x0000000b, 0x0000001c,
+ 0x00040047, 0x00000265, 0x0000000b, 0x0000001a, 0x00040047, 0x00000278, 0x0000000b, 0x00000019,
+ 0x00020013, 0x00000002, 0x00030021, 0x00000003, 0x00000002, 0x00040015, 0x00000006, 0x00000020,
+ 0x00000000, 0x00040015, 0x00000008, 0x00000020, 0x00000001, 0x00030016, 0x0000000a, 0x00000020,
+ 0x0003001d, 0x00000014, 0x00000006, 0x0003001e, 0x00000015, 0x00000014, 0x00040020, 0x00000016,
+ 0x0000000c, 0x00000015, 0x0004003b, 0x00000016, 0x00000017, 0x0000000c, 0x0004002b, 0x00000008,
+ 0x00000018, 0x00000000, 0x00040020, 0x0000001c, 0x0000000c, 0x00000006, 0x0004002b, 0x00000006,
+ 0x00000021, 0x000000ff, 0x0004002b, 0x00000008, 0x00000025, 0x00000008, 0x0004002b, 0x00000006,
+ 0x00000028, 0x00000000, 0x00020014, 0x00000029, 0x0004002b, 0x0000000a, 0x0000002d, 0x00000000,
+ 0x0003001d, 0x0000003b, 0x0000000a, 0x0003001e, 0x0000003c, 0x0000003b, 0x00040020, 0x0000003d,
+ 0x0000000c, 0x0000003c, 0x0004003b, 0x0000003d, 0x0000003e, 0x0000000c, 0x00040020, 0x00000042,
+ 0x0000000c, 0x0000000a, 0x0004002b, 0x00000006, 0x00000047, 0x00000001, 0x0004002b, 0x00000006,
+ 0x00000055, 0x00000002, 0x0004002b, 0x00000006, 0x00000063, 0x00000004, 0x0004002b, 0x00000006,
+ 0x00000072, 0x00000008, 0x0004002b, 0x00000006, 0x00000081, 0x00000010, 0x0004002b, 0x00000006,
+ 0x00000090, 0x00000020, 0x00040017, 0x000000a2, 0x00000008, 0x00000004, 0x00040017, 0x000000a3,
+ 0x00000006, 0x00000004, 0x00040017, 0x000000a4, 0x0000000a, 0x00000004, 0x0009001e, 0x000000a5,
+ 0x000000a2, 0x000000a3, 0x000000a3, 0x000000a3, 0x000000a4, 0x000000a4, 0x000000a4, 0x00040020,
+ 0x000000a6, 0x00000009, 0x000000a5, 0x0004003b, 0x000000a6, 0x000000a7, 0x00000009, 0x0004002b,
+ 0x00000006, 0x000000a8, 0x00000003, 0x00040020, 0x000000a9, 0x00000009, 0x00000008, 0x00040020,
+ 0x000000ad, 0x00000001, 0x00000006, 0x0004003b, 0x000000ad, 0x000000ae, 0x00000001, 0x0004002b,
+ 0x00000008, 0x000000b1, 0x00000005, 0x0004002b, 0x00000008, 0x000000b6, 0x00000002, 0x00040020,
+ 0x000000b7, 0x00000009, 0x00000006, 0x0003001d, 0x000000c8, 0x0000000a, 0x0003001e, 0x000000c9,
+ 0x000000c8, 0x00040020, 0x000000ca, 0x0000000c, 0x000000c9, 0x0004003b, 0x000000ca, 0x000000cb,
+ 0x0000000c, 0x0004002b, 0x00000006, 0x000000e0, 0x00000100, 0x0004001c, 0x000000e3, 0x0000000a,
+ 0x000000e0, 0x00040020, 0x000000e4, 0x00000004, 0x000000e3, 0x0004003b, 0x000000e4, 0x000000e5,
+ 0x00000004, 0x00040020, 0x000000e8, 0x00000004, 0x0000000a, 0x0004002b, 0x00000006, 0x000000ea,
+ 0x00000108, 0x0004002b, 0x00000006, 0x000000ec, 0x00000080, 0x0004002b, 0x00000008, 0x00000115,
+ 0x00000001, 0x00040017, 0x00000123, 0x00000006, 0x00000003, 0x00040020, 0x00000124, 0x00000001,
+ 0x00000123, 0x0004003b, 0x00000124, 0x00000125, 0x00000001, 0x0004002b, 0x00000008, 0x000001a9,
+ 0x00000003, 0x0004002b, 0x00000008, 0x000001d6, 0x00000004, 0x0004003b, 0x000000e4, 0x00000221,
+ 0x00000004, 0x0004003b, 0x00000124, 0x00000265, 0x00000001, 0x0006002c, 0x00000123, 0x00000278,
+ 0x000000e0, 0x00000047, 0x00000047, 0x00050036, 0x00000002, 0x00000004, 0x00000000, 0x00000003,
+ 0x000200f8, 0x00000005, 0x000300f7, 0x00000285, 0x00000000, 0x000300fb, 0x00000028, 0x00000286,
+ 0x000200f8, 0x00000286, 0x00060041, 0x000000a9, 0x000000aa, 0x000000a7, 0x00000018, 0x000000a8,
+ 0x0004003d, 0x00000008, 0x000000ab, 0x000000aa, 0x0004003d, 0x00000006, 0x000000af, 0x000000ae,
+ 0x000500aa, 0x00000029, 0x000000b2, 0x000000ab, 0x000000b1, 0x000300f7, 0x000000b4, 0x00000000,
+ 0x000400fa, 0x000000b2, 0x000000b3, 0x000000b4, 0x000200f8, 0x000000b3, 0x000200f9, 0x000000be,
+ 0x000200f8, 0x000000be, 0x000700f5, 0x0000000a, 0x000003b1, 0x0000002d, 0x000000b3, 0x000003b6,
+ 0x000000c1, 0x000700f5, 0x00000006, 0x000003b0, 0x000000af, 0x000000b3, 0x000000e2, 0x000000c1,
+ 0x00060041, 0x000000b7, 0x000000c4, 0x000000a7, 0x000000b6, 0x00000047, 0x0004003d, 0x00000006,
+ 0x000000c5, 0x000000c4, 0x000500b0, 0x00000029, 0x000000c6, 0x000003b0, 0x000000c5, 0x000400f6,
+ 0x000000c0, 0x000000c1, 0x00000000, 0x000400fa, 0x000000c6, 0x000000bf, 0x000000c0, 0x000200f8,
+ 0x000000bf, 0x00060041, 0x000000b7, 0x000000cc, 0x000000a7, 0x000000b6, 0x00000028, 0x0004003d,
+ 0x00000006, 0x000000cd, 0x000000cc, 0x00050080, 0x00000006, 0x000000cf, 0x000000cd, 0x000003b0,
+ 0x00060041, 0x00000042, 0x000000d0, 0x000000cb, 0x00000018, 0x000000cf, 0x0004003d, 0x0000000a,
+ 0x000000d1, 0x000000d0, 0x00060041, 0x000000b7, 0x000000d2, 0x000000a7, 0x000000b6, 0x000000a8,
+ 0x0004003d, 0x00000006, 0x000000d3, 0x000000d2, 0x000500aa, 0x00000029, 0x000000d4, 0x000000d3,
+ 0x00000028, 0x000300f7, 0x000000d7, 0x00000000, 0x000400fa, 0x000000d4, 0x000000d6, 0x000000db,
+ 0x000200f8, 0x000000d6, 0x00050081, 0x0000000a, 0x000000da, 0x000003b1, 0x000000d1, 0x000200f9,
+ 0x000000d7, 0x000200f8, 0x000000db, 0x0007000c, 0x0000000a, 0x000000de, 0x00000001, 0x00000028,
+ 0x000003b1, 0x000000d1, 0x000200f9, 0x000000d7, 0x000200f8, 0x000000d7, 0x000700f5, 0x0000000a,
+ 0x000003b6, 0x000000da, 0x000000d6, 0x000000de, 0x000000db, 0x000200f9, 0x000000c1, 0x000200f8,
+ 0x000000c1, 0x00050080, 0x00000006, 0x000000e2, 0x000003b0, 0x000000e0, 0x000200f9, 0x000000be,
+ 0x000200f8, 0x000000c0, 0x00050041, 0x000000e8, 0x000000e9, 0x000000e5, 0x000000af, 0x0003003e,
+ 0x000000e9, 0x000003b1, 0x000400e0, 0x00000055, 0x00000055, 0x000000ea, 0x000200f9, 0x000000ed,
+ 0x000200f8, 0x000000ed, 0x000700f5, 0x00000006, 0x000003b2, 0x000000ec, 0x000000c0, 0x00000117,
+ 0x000000f0, 0x000500ac, 0x00000029, 0x000000f3, 0x000003b2, 0x00000028, 0x000400f6, 0x000000ef,
+ 0x000000f0, 0x00000000, 0x000400fa, 0x000000f3, 0x000000ee, 0x000000ef, 0x000200f8, 0x000000ee,
+ 0x000500b0, 0x00000029, 0x000000f6, 0x000000af, 0x000003b2, 0x000300f7, 0x000000f8, 0x00000000,
+ 0x000400fa, 0x000000f6, 0x000000f7, 0x000000f8, 0x000200f8, 0x000000f7, 0x00060041, 0x000000b7,
+ 0x000000fa, 0x000000a7, 0x000000b6, 0x000000a8, 0x0004003d, 0x00000006, 0x000000fb, 0x000000fa,
+ 0x000500aa, 0x00000029, 0x000000fc, 0x000000fb, 0x00000028, 0x000300f7, 0x000000ff, 0x00000000,
+ 0x000400fa, 0x000000fc, 0x000000fe, 0x00000109, 0x000200f8, 0x000000fe, 0x0004003d, 0x0000000a,
+ 0x00000102, 0x000000e9, 0x00050080, 0x00000006, 0x00000105, 0x000000af, 0x000003b2, 0x00050041,
+ 0x000000e8, 0x00000106, 0x000000e5, 0x00000105, 0x0004003d, 0x0000000a, 0x00000107, 0x00000106,
+ 0x00050081, 0x0000000a, 0x00000108, 0x00000102, 0x00000107, 0x000200f9, 0x000000ff, 0x000200f8,
+ 0x00000109, 0x0004003d, 0x0000000a, 0x0000010c, 0x000000e9, 0x00050080, 0x00000006, 0x0000010f,
+ 0x000000af, 0x000003b2, 0x00050041, 0x000000e8, 0x00000110, 0x000000e5, 0x0000010f, 0x0004003d,
+ 0x0000000a, 0x00000111, 0x00000110, 0x0007000c, 0x0000000a, 0x00000112, 0x00000001, 0x00000028,
+ 0x0000010c, 0x00000111, 0x000200f9, 0x000000ff, 0x000200f8, 0x000000ff, 0x000700f5, 0x0000000a,
+ 0x000003b3, 0x00000108, 0x000000fe, 0x00000112, 0x00000109, 0x0003003e, 0x000000e9, 0x000003b3,
+ 0x000200f9, 0x000000f8, 0x000200f8, 0x000000f8, 0x000400e0, 0x00000055, 0x00000055, 0x000000ea,
+ 0x000200f9, 0x000000f0, 0x000200f8, 0x000000f0, 0x000500c2, 0x00000006, 0x00000117, 0x000003b2,
+ 0x00000115, 0x000200f9, 0x000000ed, 0x000200f8, 0x000000ef, 0x000500aa, 0x00000029, 0x00000119,
+ 0x000000af, 0x00000028, 0x000300f7, 0x0000011b, 0x00000000, 0x000400fa, 0x00000119, 0x0000011a,
+ 0x0000011b, 0x000200f8, 0x0000011a, 0x00060041, 0x000000b7, 0x0000011c, 0x000000a7, 0x000000b6,
+ 0x00000055, 0x0004003d, 0x00000006, 0x0000011d, 0x0000011c, 0x00050041, 0x000000e8, 0x0000011e,
+ 0x000000e5, 0x00000018, 0x0004003d, 0x0000000a, 0x0000011f, 0x0000011e, 0x00060041, 0x00000042,
+ 0x00000120, 0x000000cb, 0x00000018, 0x0000011d, 0x0003003e, 0x00000120, 0x0000011f, 0x000200f9,
+ 0x0000011b, 0x000200f8, 0x0000011b, 0x000200f9, 0x00000285, 0x000200f8, 0x000000b4, 0x00050041,
+ 0x000000ad, 0x00000126, 0x00000125, 0x00000028, 0x0004003d, 0x00000006, 0x00000127, 0x00000126,
+ 0x00060041, 0x000000a9, 0x00000129, 0x000000a7, 0x00000018, 0x00000028, 0x0004003d, 0x00000008,
+ 0x0000012a, 0x00000129, 0x0004007c, 0x00000006, 0x0000012b, 0x0000012a, 0x000500b0, 0x00000029,
+ 0x00000130, 0x00000127, 0x0000012b, 0x000300f7, 0x00000132, 0x00000000, 0x000400fa, 0x00000130,
+ 0x00000131, 0x00000132, 0x000200f8, 0x00000131, 0x000500aa, 0x00000029, 0x00000134, 0x000000ab,
+ 0x00000018, 0x000300f7, 0x00000136, 0x00000000, 0x000400fa, 0x00000134, 0x00000135, 0x00000155,
+ 0x000200f8, 0x00000135, 0x00060041, 0x000000b7, 0x00000139, 0x000000a7, 0x00000115, 0x00000028,
+ 0x0004003d, 0x00000006, 0x0000013a, 0x00000139, 0x00060041, 0x000000b7, 0x0000013c, 0x000000a7,
+ 0x00000115, 0x000000a8, 0x0004003d, 0x00000006, 0x0000013d, 0x0000013c, 0x00060041, 0x000000a9,
+ 0x00000141, 0x000000a7, 0x00000018, 0x00000047, 0x0004003d, 0x00000008, 0x00000142, 0x00000141,
+ 0x00060041, 0x000000a9, 0x00000144, 0x000000a7, 0x00000018, 0x00000055, 0x0004003d, 0x00000008,
+ 0x00000145, 0x00000144, 0x000300f7, 0x00000308, 0x00000000, 0x000300fb, 0x00000028, 0x00000299,
+ 0x000200f8, 0x00000299, 0x00050080, 0x00000006, 0x0000029c, 0x0000013d, 0x00000127, 0x00060041,
+ 0x0000001c, 0x0000029d, 0x00000017, 0x00000018, 0x0000029c, 0x0004003d, 0x00000006, 0x0000029e,
+ 0x0000029d, 0x000500c7, 0x00000006, 0x000002a0, 0x0000029e, 0x00000021, 0x000500c2, 0x00000006,
+ 0x000002a2, 0x0000029e, 0x00000025, 0x000500aa, 0x00000029, 0x000002a4, 0x000002a0, 0x00000028,
+ 0x000300f7, 0x000002a6, 0x00000000, 0x000400fa, 0x000002a4, 0x000002a5, 0x000002a6, 0x000200f8,
+ 0x000002a5, 0x000200f9, 0x00000308, 0x000200f8, 0x000002a6, 0x0004007c, 0x00000006, 0x000002a8,
+ 0x00000142, 0x00050084, 0x00000008, 0x000002ab, 0x00000142, 0x00000145, 0x0004007c, 0x00000006,
+ 0x000002ac, 0x000002ab, 0x00040070, 0x0000000a, 0x000002ae, 0x000002a0, 0x00050080, 0x00000006,
+ 0x000002b1, 0x0000013a, 0x00000127, 0x00060041, 0x00000042, 0x000002b2, 0x0000003e, 0x00000018,
+ 0x000002b1, 0x0004003d, 0x0000000a, 0x000002b3, 0x000002b2, 0x00050085, 0x0000000a, 0x000002b4,
+ 0x000002ae, 0x000002b3, 0x000500c7, 0x00000006, 0x000002b6, 0x000002a2, 0x00000047, 0x000500ab,
+ 0x00000029, 0x000002b7, 0x000002b6, 0x00000028, 0x000300f7, 0x000002c1, 0x00000000, 0x000400fa,
+ 0x000002b7, 0x000002b8, 0x000002c1, 0x000200f8, 0x000002b8, 0x00050082, 0x00000006, 0x000002bc,
+ 0x000002b1, 0x00000047, 0x00060041, 0x00000042, 0x000002bd, 0x0000003e, 0x00000018, 0x000002bc,
+ 0x0004003d, 0x0000000a, 0x000002be, 0x000002bd, 0x00050083, 0x0000000a, 0x000002c0, 0x000002b4,
+ 0x000002be, 0x000200f9, 0x000002c1, 0x000200f8, 0x000002c1, 0x000700f5, 0x0000000a, 0x0000038f,
+ 0x000002b4, 0x000002a6, 0x000002c0, 0x000002b8, 0x000500c7, 0x00000006, 0x000002c3, 0x000002a2,
+ 0x00000055, 0x000500ab, 0x00000029, 0x000002c4, 0x000002c3, 0x00000028, 0x000300f7, 0x000002ce,
+ 0x00000000, 0x000400fa, 0x000002c4, 0x000002c5, 0x000002ce, 0x000200f8, 0x000002c5, 0x00050080,
+ 0x00000006, 0x000002c9, 0x000002b1, 0x00000047, 0x00060041, 0x00000042, 0x000002ca, 0x0000003e,
+ 0x00000018, 0x000002c9, 0x0004003d, 0x0000000a, 0x000002cb, 0x000002ca, 0x00050083, 0x0000000a,
+ 0x000002cd, 0x0000038f, 0x000002cb, 0x000200f9, 0x000002ce, 0x000200f8, 0x000002ce, 0x000700f5,
+ 0x0000000a, 0x00000390, 0x0000038f, 0x000002c1, 0x000002cd, 0x000002c5, 0x000500c7, 0x00000006,
+ 0x000002d0, 0x000002a2, 0x00000063, 0x000500ab, 0x00000029, 0x000002d1, 0x000002d0, 0x00000028,
+ 0x000300f7, 0x000002dc, 0x00000000, 0x000400fa, 0x000002d1, 0x000002d2, 0x000002dc, 0x000200f8,
+ 0x000002d2, 0x00050082, 0x00000006, 0x000002d7, 0x000002b1, 0x000002a8, 0x00060041, 0x00000042,
+ 0x000002d8, 0x0000003e, 0x00000018, 0x000002d7, 0x0004003d, 0x0000000a, 0x000002d9, 0x000002d8,
+ 0x00050083, 0x0000000a, 0x000002db, 0x00000390, 0x000002d9, 0x000200f9, 0x000002dc, 0x000200f8,
+ 0x000002dc, 0x000700f5, 0x0000000a, 0x00000391, 0x00000390, 0x000002ce, 0x000002db, 0x000002d2,
+ 0x000500c7, 0x00000006, 0x000002de, 0x000002a2, 0x00000072, 0x000500ab, 0x00000029, 0x000002df,
+ 0x000002de, 0x00000028, 0x000300f7, 0x000002ea, 0x00000000, 0x000400fa, 0x000002df, 0x000002e0,
+ 0x000002ea, 0x000200f8, 0x000002e0, 0x00050080, 0x00000006, 0x000002e5, 0x000002b1, 0x000002a8,
+ 0x00060041, 0x00000042, 0x000002e6, 0x0000003e, 0x00000018, 0x000002e5, 0x0004003d, 0x0000000a,
+ 0x000002e7, 0x000002e6, 0x00050083, 0x0000000a, 0x000002e9, 0x00000391, 0x000002e7, 0x000200f9,
+ 0x000002ea, 0x000200f8, 0x000002ea, 0x000700f5, 0x0000000a, 0x00000392, 0x00000391, 0x000002dc,
+ 0x000002e9, 0x000002e0, 0x000500c7, 0x00000006, 0x000002ec, 0x000002a2, 0x00000081, 0x000500ab,
+ 0x00000029, 0x000002ed, 0x000002ec, 0x00000028, 0x000300f7, 0x000002f8, 0x00000000, 0x000400fa,
+ 0x000002ed, 0x000002ee, 0x000002f8, 0x000200f8, 0x000002ee, 0x00050082, 0x00000006, 0x000002f3,
+ 0x000002b1, 0x000002ac, 0x00060041, 0x00000042, 0x000002f4, 0x0000003e, 0x00000018, 0x000002f3,
+ 0x0004003d, 0x0000000a, 0x000002f5, 0x000002f4, 0x00050083, 0x0000000a, 0x000002f7, 0x00000392,
+ 0x000002f5, 0x000200f9, 0x000002f8, 0x000200f8, 0x000002f8, 0x000700f5, 0x0000000a, 0x00000393,
+ 0x00000392, 0x000002ea, 0x000002f7, 0x000002ee, 0x000500c7, 0x00000006, 0x000002fa, 0x000002a2,
+ 0x00000090, 0x000500ab, 0x00000029, 0x000002fb, 0x000002fa, 0x00000028, 0x000300f7, 0x00000306,
+ 0x00000000, 0x000400fa, 0x000002fb, 0x000002fc, 0x00000306, 0x000200f8, 0x000002fc, 0x00050080,
+ 0x00000006, 0x00000301, 0x000002b1, 0x000002ac, 0x00060041, 0x00000042, 0x00000302, 0x0000003e,
+ 0x00000018, 0x00000301, 0x0004003d, 0x0000000a, 0x00000303, 0x00000302, 0x00050083, 0x0000000a,
+ 0x00000305, 0x00000393, 0x00000303, 0x000200f9, 0x00000306, 0x000200f8, 0x00000306, 0x000700f5,
+ 0x0000000a, 0x00000394, 0x00000393, 0x000002f8, 0x00000305, 0x000002fc, 0x000200f9, 0x00000308,
+ 0x000200f8, 0x00000308, 0x000700f5, 0x0000000a, 0x00000395, 0x0000002d, 0x000002a5, 0x00000394,
+ 0x00000306, 0x00060041, 0x000000b7, 0x00000147, 0x000000a7, 0x00000115, 0x00000047, 0x0004003d,
+ 0x00000006, 0x00000148, 0x00000147, 0x00050080, 0x00000006, 0x0000014a, 0x00000148, 0x00000127,
+ 0x00060041, 0x00000042, 0x0000014c, 0x0000003e, 0x00000018, 0x0000014a, 0x0003003e, 0x0000014c,
+ 0x00000395, 0x00050080, 0x00000006, 0x00000150, 0x0000013a, 0x00000127, 0x00060041, 0x00000042,
+ 0x00000151, 0x0000003e, 0x00000018, 0x00000150, 0x0004003d, 0x0000000a, 0x00000152, 0x00000151,
+ 0x00050085, 0x0000000a, 0x00000154, 0x00000152, 0x00000395, 0x000200f9, 0x00000136, 0x000200f8,
+ 0x00000155, 0x000500aa, 0x00000029, 0x00000157, 0x000000ab, 0x00000115, 0x000300f7, 0x00000159,
+ 0x00000000, 0x000400fa, 0x00000157, 0x00000158, 0x00000195, 0x000200f8, 0x00000158, 0x00060041,
+ 0x000000b7, 0x0000015b, 0x000000a7, 0x000000b6, 0x00000055, 0x0004003d, 0x00000006, 0x0000015c,
+ 0x0000015b, 0x00060041, 0x00000042, 0x0000015d, 0x000000cb, 0x00000018, 0x0000015c, 0x0004003d,
+ 0x0000000a, 0x0000015e, 0x0000015d, 0x000500b7, 0x00000029, 0x00000161, 0x0000015e, 0x0000002d,
+ 0x000300f7, 0x00000164, 0x00000000, 0x000400fa, 0x00000161, 0x00000163, 0x0000016b, 0x000200f8,
+ 0x00000163, 0x00060041, 0x000000b7, 0x00000165, 0x000000a7, 0x000000b6, 0x00000047, 0x0004003d,
+ 0x00000006, 0x00000166, 0x00000165, 0x00060041, 0x00000042, 0x00000167, 0x000000cb, 0x00000018,
+ 0x00000166, 0x0004003d, 0x0000000a, 0x00000168, 0x00000167, 0x00050088, 0x0000000a, 0x0000016a,
+ 0x00000168, 0x0000015e, 0x000200f9, 0x00000164, 0x000200f8, 0x0000016b, 0x000200f9, 0x00000164,
+ 0x000200f8, 0x00000164, 0x000700f5, 0x0000000a, 0x0000038e, 0x0000016a, 0x00000163, 0x0000002d,
+ 0x0000016b, 0x00060041, 0x000000b7, 0x0000016d, 0x000000a7, 0x00000115, 0x00000028, 0x0004003d,
+ 0x00000006, 0x0000016e, 0x0000016d, 0x00050080, 0x00000006, 0x00000170, 0x0000016e, 0x00000127,
+ 0x00060041, 0x000000b7, 0x00000172, 0x000000a7, 0x00000115, 0x00000047, 0x0004003d, 0x00000006,
+ 0x00000173, 0x00000172, 0x00050080, 0x00000006, 0x00000175, 0x00000173, 0x00000127, 0x00060041,
+ 0x00000042, 0x00000176, 0x0000003e, 0x00000018, 0x00000175, 0x0004003d, 0x0000000a, 0x00000177,
+ 0x00000176, 0x00050085, 0x0000000a, 0x00000178, 0x0000038e, 0x00000177, 0x00060041, 0x00000042,
+ 0x00000179, 0x0000003e, 0x00000018, 0x00000170, 0x0004003d, 0x0000000a, 0x0000017a, 0x00000179,
+ 0x00050081, 0x0000000a, 0x0000017b, 0x0000017a, 0x00000178, 0x0003003e, 0x00000179, 0x0000017b,
+ 0x00060041, 0x000000b7, 0x0000017e, 0x000000a7, 0x00000115, 0x00000055, 0x0004003d, 0x00000006,
+ 0x0000017f, 0x0000017e, 0x00050080, 0x00000006, 0x00000181, 0x0000017f, 0x00000127, 0x00060041,
+ 0x00000042, 0x00000182, 0x0000003e, 0x00000018, 0x00000181, 0x0004003d, 0x0000000a, 0x00000183,
+ 0x00000182, 0x00060041, 0x000000b7, 0x00000185, 0x000000a7, 0x00000115, 0x000000a8, 0x0004003d,
+ 0x00000006, 0x00000186, 0x00000185, 0x00050080, 0x00000006, 0x00000188, 0x00000186, 0x00000127,
+ 0x00060041, 0x00000042, 0x00000189, 0x0000003e, 0x00000018, 0x00000188, 0x0004003d, 0x0000000a,
+ 0x0000018a, 0x00000189, 0x00050085, 0x0000000a, 0x0000018b, 0x0000038e, 0x0000018a, 0x00050083,
+ 0x0000000a, 0x0000018c, 0x00000183, 0x0000018b, 0x0003003e, 0x00000182, 0x0000018c, 0x0006000c,
+ 0x0000000a, 0x00000194, 0x00000001, 0x00000004, 0x0000018c, 0x000200f9, 0x00000159, 0x000200f8,
+ 0x00000195, 0x000500aa, 0x00000029, 0x00000197, 0x000000ab, 0x000000b6, 0x000300f7, 0x00000199,
+ 0x00000000, 0x000400fa, 0x00000197, 0x00000198, 0x000001a7, 0x000200f8, 0x00000198, 0x00060041,
+ 0x000000b7, 0x0000019a, 0x000000a7, 0x00000115, 0x00000028, 0x0004003d, 0x00000006, 0x0000019b,
+ 0x0000019a, 0x00050080, 0x00000006, 0x0000019d, 0x0000019b, 0x00000127, 0x00060041, 0x00000042,
+ 0x0000019e, 0x0000003e, 0x00000018, 0x0000019d, 0x0004003d, 0x0000000a, 0x0000019f, 0x0000019e,
+ 0x00060041, 0x000000b7, 0x000001a0, 0x000000a7, 0x00000115, 0x00000047, 0x0004003d, 0x00000006,
+ 0x000001a1, 0x000001a0, 0x00050080, 0x00000006, 0x000001a3, 0x000001a1, 0x00000127, 0x00060041,
+ 0x00000042, 0x000001a4, 0x0000003e, 0x00000018, 0x000001a3, 0x0004003d, 0x0000000a, 0x000001a5,
+ 0x000001a4, 0x00050085, 0x0000000a, 0x000001a6, 0x0000019f, 0x000001a5, 0x000200f9, 0x00000199,
+ 0x000200f8, 0x000001a7, 0x000500aa, 0x00000029, 0x000001aa, 0x000000ab, 0x000001a9, 0x000300f7,
+ 0x000001ac, 0x00000000, 0x000400fa, 0x000001aa, 0x000001ab, 0x000001d4, 0x000200f8, 0x000001ab,
+ 0x00060041, 0x000000b7, 0x000001ae, 0x000000a7, 0x000000b6, 0x00000055, 0x0004003d, 0x00000006,
+ 0x000001af, 0x000001ae, 0x00060041, 0x00000042, 0x000001b0, 0x000000cb, 0x00000018, 0x000001af,
+ 0x0004003d, 0x0000000a, 0x000001b1, 0x000001b0, 0x000500b7, 0x00000029, 0x000001b4, 0x000001b1,
+ 0x0000002d, 0x000300f7, 0x000001b7, 0x00000000, 0x000400fa, 0x000001b4, 0x000001b6, 0x000001be,
+ 0x000200f8, 0x000001b6, 0x00060041, 0x000000b7, 0x000001b8, 0x000000a7, 0x000000b6, 0x00000047,
+ 0x0004003d, 0x00000006, 0x000001b9, 0x000001b8, 0x00060041, 0x00000042, 0x000001ba, 0x000000cb,
+ 0x00000018, 0x000001b9, 0x0004003d, 0x0000000a, 0x000001bb, 0x000001ba, 0x00050088, 0x0000000a,
+ 0x000001bd, 0x000001bb, 0x000001b1, 0x000200f9, 0x000001b7, 0x000200f8, 0x000001be, 0x000200f9,
+ 0x000001b7, 0x000200f8, 0x000001b7, 0x000700f5, 0x0000000a, 0x0000038d, 0x000001bd, 0x000001b6,
+ 0x0000002d, 0x000001be, 0x00060041, 0x000000b7, 0x000001c0, 0x000000a7, 0x00000115, 0x00000028,
+ 0x0004003d, 0x00000006, 0x000001c1, 0x000001c0, 0x00050080, 0x00000006, 0x000001c3, 0x000001c1,
+ 0x00000127, 0x00060041, 0x000000b7, 0x000001c4, 0x000000a7, 0x00000115, 0x00000047, 0x0004003d,
+ 0x00000006, 0x000001c5, 0x000001c4, 0x00050080, 0x00000006, 0x000001c7, 0x000001c5, 0x00000127,
+ 0x00060041, 0x00000042, 0x000001c8, 0x0000003e, 0x00000018, 0x000001c7, 0x0004003d, 0x0000000a,
+ 0x000001c9, 0x000001c8, 0x00060041, 0x00000042, 0x000001cf, 0x0000003e, 0x00000018, 0x000001c3,
+ 0x0004003d, 0x0000000a, 0x000001d0, 0x000001cf, 0x00050085, 0x0000000a, 0x000001d1, 0x0000038d,
+ 0x000001d0, 0x00050081, 0x0000000a, 0x000001d2, 0x000001c9, 0x000001d1, 0x0003003e, 0x000001cf,
+ 0x000001d2, 0x000200f9, 0x000001ac, 0x000200f8, 0x000001d4, 0x000500aa, 0x00000029, 0x000001d7,
+ 0x000000ab, 0x000001d6, 0x000300f7, 0x000001d9, 0x00000000, 0x000400fa, 0x000001d7, 0x000001d8,
+ 0x000001d9, 0x000200f8, 0x000001d8, 0x00060041, 0x000000b7, 0x000001dc, 0x000000a7, 0x00000115,
+ 0x000000a8, 0x0004003d, 0x00000006, 0x000001dd, 0x000001dc, 0x00050080, 0x00000006, 0x000001df,
+ 0x000001dd, 0x00000127, 0x00060041, 0x0000001c, 0x000001e0, 0x00000017, 0x00000018, 0x000001df,
+ 0x0004003d, 0x00000006, 0x000001e1, 0x000001e0, 0x000500c7, 0x00000006, 0x000001e2, 0x000001e1,
+ 0x00000021, 0x000500ab, 0x00000029, 0x000001e3, 0x000001e2, 0x00000028, 0x000400a8, 0x00000029,
+ 0x000001e5, 0x000001e3, 0x000300f7, 0x000001e7, 0x00000000, 0x000400fa, 0x000001e5, 0x000001e6,
+ 0x000001e7, 0x000200f8, 0x000001e6, 0x00060041, 0x000000b7, 0x000001e8, 0x000000a7, 0x00000115,
+ 0x00000028, 0x0004003d, 0x00000006, 0x000001e9, 0x000001e8, 0x00050080, 0x00000006, 0x000001eb,
+ 0x000001e9, 0x00000127, 0x00060041, 0x00000042, 0x000001ec, 0x0000003e, 0x00000018, 0x000001eb,
+ 0x0003003e, 0x000001ec, 0x0000002d, 0x000200f9, 0x000001e7, 0x000200f8, 0x000001e7, 0x000300f7,
+ 0x000001f1, 0x00000000, 0x000400fa, 0x000001e3, 0x000001f0, 0x00000208, 0x000200f8, 0x000001f0,
+ 0x00060041, 0x000000b7, 0x000001f2, 0x000000a7, 0x00000115, 0x00000047, 0x0004003d, 0x00000006,
+ 0x000001f3, 0x000001f2, 0x00050080, 0x00000006, 0x000001f5, 0x000001f3, 0x00000127, 0x00060041,
+ 0x00000042, 0x000001f6, 0x0000003e, 0x00000018, 0x000001f5, 0x0004003d, 0x0000000a, 0x000001f7,
+ 0x000001f6, 0x00060041, 0x000000b7, 0x000001f9, 0x000000a7, 0x00000115, 0x00000028, 0x0004003d,
+ 0x00000006, 0x000001fa, 0x000001f9, 0x00060041, 0x000000a9, 0x00000201, 0x000000a7, 0x00000018,
+ 0x00000047, 0x0004003d, 0x00000008, 0x00000202, 0x00000201, 0x00060041, 0x000000a9, 0x00000204,
+ 0x000000a7, 0x00000018, 0x00000055, 0x0004003d, 0x00000008, 0x00000205, 0x00000204, 0x000300f7,
+ 0x00000383, 0x00000000, 0x000300fb, 0x00000028, 0x00000314, 0x000200f8, 0x00000314, 0x0004003d,
+ 0x00000006, 0x00000319, 0x000001e0, 0x000500c7, 0x00000006, 0x0000031b, 0x00000319, 0x00000021,
+ 0x000500c2, 0x00000006, 0x0000031d, 0x00000319, 0x00000025, 0x000500aa, 0x00000029, 0x0000031f,
+ 0x0000031b, 0x00000028, 0x000300f7, 0x00000321, 0x00000000, 0x000400fa, 0x0000031f, 0x00000320,
+ 0x00000321, 0x000200f8, 0x00000320, 0x000200f9, 0x00000383, 0x000200f8, 0x00000321, 0x0004007c,
+ 0x00000006, 0x00000323, 0x00000202, 0x00050084, 0x00000008, 0x00000326, 0x00000202, 0x00000205,
+ 0x0004007c, 0x00000006, 0x00000327, 0x00000326, 0x00040070, 0x0000000a, 0x00000329, 0x0000031b,
+ 0x00050080, 0x00000006, 0x0000032c, 0x000001fa, 0x00000127, 0x00060041, 0x00000042, 0x0000032d,
+ 0x0000003e, 0x00000018, 0x0000032c, 0x0004003d, 0x0000000a, 0x0000032e, 0x0000032d, 0x00050085,
+ 0x0000000a, 0x0000032f, 0x00000329, 0x0000032e, 0x000500c7, 0x00000006, 0x00000331, 0x0000031d,
+ 0x00000047, 0x000500ab, 0x00000029, 0x00000332, 0x00000331, 0x00000028, 0x000300f7, 0x0000033c,
+ 0x00000000, 0x000400fa, 0x00000332, 0x00000333, 0x0000033c, 0x000200f8, 0x00000333, 0x00050082,
+ 0x00000006, 0x00000337, 0x0000032c, 0x00000047, 0x00060041, 0x00000042, 0x00000338, 0x0000003e,
+ 0x00000018, 0x00000337, 0x0004003d, 0x0000000a, 0x00000339, 0x00000338, 0x00050083, 0x0000000a,
+ 0x0000033b, 0x0000032f, 0x00000339, 0x000200f9, 0x0000033c, 0x000200f8, 0x0000033c, 0x000700f5,
+ 0x0000000a, 0x00000385, 0x0000032f, 0x00000321, 0x0000033b, 0x00000333, 0x000500c7, 0x00000006,
+ 0x0000033e, 0x0000031d, 0x00000055, 0x000500ab, 0x00000029, 0x0000033f, 0x0000033e, 0x00000028,
+ 0x000300f7, 0x00000349, 0x00000000, 0x000400fa, 0x0000033f, 0x00000340, 0x00000349, 0x000200f8,
+ 0x00000340, 0x00050080, 0x00000006, 0x00000344, 0x0000032c, 0x00000047, 0x00060041, 0x00000042,
+ 0x00000345, 0x0000003e, 0x00000018, 0x00000344, 0x0004003d, 0x0000000a, 0x00000346, 0x00000345,
+ 0x00050083, 0x0000000a, 0x00000348, 0x00000385, 0x00000346, 0x000200f9, 0x00000349, 0x000200f8,
+ 0x00000349, 0x000700f5, 0x0000000a, 0x00000386, 0x00000385, 0x0000033c, 0x00000348, 0x00000340,
+ 0x000500c7, 0x00000006, 0x0000034b, 0x0000031d, 0x00000063, 0x000500ab, 0x00000029, 0x0000034c,
+ 0x0000034b, 0x00000028, 0x000300f7, 0x00000357, 0x00000000, 0x000400fa, 0x0000034c, 0x0000034d,
+ 0x00000357, 0x000200f8, 0x0000034d, 0x00050082, 0x00000006, 0x00000352, 0x0000032c, 0x00000323,
+ 0x00060041, 0x00000042, 0x00000353, 0x0000003e, 0x00000018, 0x00000352, 0x0004003d, 0x0000000a,
+ 0x00000354, 0x00000353, 0x00050083, 0x0000000a, 0x00000356, 0x00000386, 0x00000354, 0x000200f9,
+ 0x00000357, 0x000200f8, 0x00000357, 0x000700f5, 0x0000000a, 0x00000387, 0x00000386, 0x00000349,
+ 0x00000356, 0x0000034d, 0x000500c7, 0x00000006, 0x00000359, 0x0000031d, 0x00000072, 0x000500ab,
+ 0x00000029, 0x0000035a, 0x00000359, 0x00000028, 0x000300f7, 0x00000365, 0x00000000, 0x000400fa,
+ 0x0000035a, 0x0000035b, 0x00000365, 0x000200f8, 0x0000035b, 0x00050080, 0x00000006, 0x00000360,
+ 0x0000032c, 0x00000323, 0x00060041, 0x00000042, 0x00000361, 0x0000003e, 0x00000018, 0x00000360,
+ 0x0004003d, 0x0000000a, 0x00000362, 0x00000361, 0x00050083, 0x0000000a, 0x00000364, 0x00000387,
+ 0x00000362, 0x000200f9, 0x00000365, 0x000200f8, 0x00000365, 0x000700f5, 0x0000000a, 0x00000388,
+ 0x00000387, 0x00000357, 0x00000364, 0x0000035b, 0x000500c7, 0x00000006, 0x00000367, 0x0000031d,
+ 0x00000081, 0x000500ab, 0x00000029, 0x00000368, 0x00000367, 0x00000028, 0x000300f7, 0x00000373,
+ 0x00000000, 0x000400fa, 0x00000368, 0x00000369, 0x00000373, 0x000200f8, 0x00000369, 0x00050082,
+ 0x00000006, 0x0000036e, 0x0000032c, 0x00000327, 0x00060041, 0x00000042, 0x0000036f, 0x0000003e,
+ 0x00000018, 0x0000036e, 0x0004003d, 0x0000000a, 0x00000370, 0x0000036f, 0x00050083, 0x0000000a,
+ 0x00000372, 0x00000388, 0x00000370, 0x000200f9, 0x00000373, 0x000200f8, 0x00000373, 0x000700f5,
+ 0x0000000a, 0x00000389, 0x00000388, 0x00000365, 0x00000372, 0x00000369, 0x000500c7, 0x00000006,
+ 0x00000375, 0x0000031d, 0x00000090, 0x000500ab, 0x00000029, 0x00000376, 0x00000375, 0x00000028,
+ 0x000300f7, 0x00000381, 0x00000000, 0x000400fa, 0x00000376, 0x00000377, 0x00000381, 0x000200f8,
+ 0x00000377, 0x00050080, 0x00000006, 0x0000037c, 0x0000032c, 0x00000327, 0x00060041, 0x00000042,
+ 0x0000037d, 0x0000003e, 0x00000018, 0x0000037c, 0x0004003d, 0x0000000a, 0x0000037e, 0x0000037d,
+ 0x00050083, 0x0000000a, 0x00000380, 0x00000389, 0x0000037e, 0x000200f9, 0x00000381, 0x000200f8,
+ 0x00000381, 0x000700f5, 0x0000000a, 0x0000038a, 0x00000389, 0x00000373, 0x00000380, 0x00000377,
+ 0x000200f9, 0x00000383, 0x000200f8, 0x00000383, 0x000700f5, 0x0000000a, 0x0000038b, 0x0000002d,
+ 0x00000320, 0x0000038a, 0x00000381, 0x00050083, 0x0000000a, 0x00000207, 0x000001f7, 0x0000038b,
+ 0x000200f9, 0x000001f1, 0x000200f8, 0x00000208, 0x000200f9, 0x000001f1, 0x000200f8, 0x000001f1,
+ 0x000700f5, 0x0000000a, 0x0000038c, 0x00000207, 0x00000383, 0x0000002d, 0x00000208, 0x00060041,
+ 0x000000b7, 0x0000020a, 0x000000a7, 0x00000115, 0x00000055, 0x0004003d, 0x00000006, 0x0000020b,
+ 0x0000020a, 0x00050080, 0x00000006, 0x0000020d, 0x0000020b, 0x00000127, 0x00060041, 0x00000042,
+ 0x0000020f, 0x0000003e, 0x00000018, 0x0000020d, 0x0003003e, 0x0000020f, 0x0000038c, 0x0006000c,
+ 0x0000000a, 0x00000211, 0x00000001, 0x00000004, 0x0000038c, 0x00060041, 0x000000b7, 0x00000212,
+ 0x000000a7, 0x00000115, 0x00000047, 0x0004003d, 0x00000006, 0x00000213, 0x00000212, 0x00050080,
+ 0x00000006, 0x00000215, 0x00000213, 0x00000127, 0x00060041, 0x00000042, 0x00000216, 0x0000003e,
+ 0x00000018, 0x00000215, 0x0004003d, 0x0000000a, 0x00000217, 0x00000216, 0x0006000c, 0x0000000a,
+ 0x00000218, 0x00000001, 0x00000004, 0x00000217, 0x000200f9, 0x000001d9, 0x000200f8, 0x000001d9,
+ 0x000700f5, 0x0000000a, 0x000003ab, 0x0000002d, 0x000001d4, 0x00000218, 0x000001f1, 0x000700f5,
+ 0x0000000a, 0x0000039c, 0x0000002d, 0x000001d4, 0x00000211, 0x000001f1, 0x000200f9, 0x000001ac,
+ 0x000200f8, 0x000001ac, 0x000700f5, 0x0000000a, 0x000003a9, 0x0000002d, 0x000001b7, 0x000003ab,
+ 0x000001d9, 0x000700f5, 0x0000000a, 0x0000039a, 0x0000002d, 0x000001b7, 0x0000039c, 0x000001d9,
+ 0x000200f9, 0x00000199, 0x000200f8, 0x00000199, 0x000700f5, 0x0000000a, 0x000003a8, 0x0000002d,
+ 0x00000198, 0x000003a9, 0x000001ac, 0x000700f5, 0x0000000a, 0x00000399, 0x000001a6, 0x00000198,
+ 0x0000039a, 0x000001ac, 0x000200f9, 0x00000159, 0x000200f8, 0x00000159, 0x000700f5, 0x0000000a,
+ 0x000003a6, 0x0000002d, 0x00000164, 0x000003a8, 0x00000199, 0x000700f5, 0x0000000a, 0x00000398,
+ 0x00000194, 0x00000164, 0x00000399, 0x00000199, 0x000200f9, 0x00000136, 0x000200f8, 0x00000136,
+ 0x000700f5, 0x0000000a, 0x0000039e, 0x0000002d, 0x00000308, 0x000003a6, 0x00000159, 0x000700f5,
+ 0x0000000a, 0x00000397, 0x00000154, 0x00000308, 0x00000398, 0x00000159, 0x000200f9, 0x00000132,
+ 0x000200f8, 0x00000132, 0x000700f5, 0x0000000a, 0x0000039d, 0x0000002d, 0x000000b4, 0x0000039e,
+ 0x00000136, 0x000700f5, 0x0000000a, 0x00000396, 0x0000002d, 0x000000b4, 0x00000397, 0x00000136,
+ 0x000500aa, 0x00000029, 0x0000021a, 0x000000ab, 0x000001a9, 0x000300f7, 0x0000021c, 0x00000000,
+ 0x000400fa, 0x0000021a, 0x0000021b, 0x0000021c, 0x000200f8, 0x0000021b, 0x000200f9, 0x00000285,
+ 0x000200f8, 0x0000021c, 0x00050041, 0x000000e8, 0x00000220, 0x000000e5, 0x000000af, 0x0003003e,
+ 0x00000220, 0x00000396, 0x00050041, 0x000000e8, 0x00000224, 0x00000221, 0x000000af, 0x0003003e,
+ 0x00000224, 0x0000039d, 0x000400e0, 0x00000055, 0x00000055, 0x000000ea, 0x000500aa, 0x00000029,
+ 0x00000227, 0x000000ab, 0x00000115, 0x000500aa, 0x00000029, 0x00000229, 0x000000ab, 0x000001d6,
+ 0x000500a6, 0x00000029, 0x0000022a, 0x00000227, 0x00000229, 0x000200f9, 0x0000022c, 0x000200f8,
+ 0x0000022c, 0x000700f5, 0x00000006, 0x000003ac, 0x000000ec, 0x0000021c, 0x0000025e, 0x0000022f,
+ 0x000500ac, 0x00000029, 0x00000232, 0x000003ac, 0x00000028, 0x000400f6, 0x0000022e, 0x0000022f,
+ 0x00000000, 0x000400fa, 0x00000232, 0x0000022d, 0x0000022e, 0x000200f8, 0x0000022d, 0x000500b0,
+ 0x00000029, 0x00000235, 0x000000af, 0x000003ac, 0x000300f7, 0x00000237, 0x00000000, 0x000400fa,
+ 0x00000235, 0x00000236, 0x00000237, 0x000200f8, 0x00000236, 0x000300f7, 0x0000023c, 0x00000000,
+ 0x000400fa, 0x0000022a, 0x0000023b, 0x00000246, 0x000200f8, 0x0000023b, 0x0004003d, 0x0000000a,
+ 0x0000023f, 0x00000220, 0x00050080, 0x00000006, 0x00000242, 0x000000af, 0x000003ac, 0x00050041,
+ 0x000000e8, 0x00000243, 0x000000e5, 0x00000242, 0x0004003d, 0x0000000a, 0x00000244, 0x00000243,
+ 0x0007000c, 0x0000000a, 0x00000245, 0x00000001, 0x00000028, 0x0000023f, 0x00000244, 0x000200f9,
+ 0x0000023c, 0x000200f8, 0x00000246, 0x0004003d, 0x0000000a, 0x00000249, 0x00000220, 0x00050080,
+ 0x00000006, 0x0000024c, 0x000000af, 0x000003ac, 0x00050041, 0x000000e8, 0x0000024d, 0x000000e5,
+ 0x0000024c, 0x0004003d, 0x0000000a, 0x0000024e, 0x0000024d, 0x00050081, 0x0000000a, 0x0000024f,
+ 0x00000249, 0x0000024e, 0x000200f9, 0x0000023c, 0x000200f8, 0x0000023c, 0x000700f5, 0x0000000a,
+ 0x000003ad, 0x00000245, 0x0000023b, 0x0000024f, 0x00000246, 0x0003003e, 0x00000220, 0x000003ad,
+ 0x0004003d, 0x0000000a, 0x00000255, 0x00000224, 0x00050080, 0x00000006, 0x00000258, 0x000000af,
+ 0x000003ac, 0x00050041, 0x000000e8, 0x00000259, 0x00000221, 0x00000258, 0x0004003d, 0x0000000a,
+ 0x0000025a, 0x00000259, 0x0007000c, 0x0000000a, 0x0000025b, 0x00000001, 0x00000028, 0x00000255,
+ 0x0000025a, 0x0003003e, 0x00000224, 0x0000025b, 0x000200f9, 0x00000237, 0x000200f8, 0x00000237,
+ 0x000400e0, 0x00000055, 0x00000055, 0x000000ea, 0x000200f9, 0x0000022f, 0x000200f8, 0x0000022f,
+ 0x000500c2, 0x00000006, 0x0000025e, 0x000003ac, 0x00000115, 0x000200f9, 0x0000022c, 0x000200f8,
+ 0x0000022e, 0x000500aa, 0x00000029, 0x00000260, 0x000000af, 0x00000028, 0x000300f7, 0x00000262,
+ 0x00000000, 0x000400fa, 0x00000260, 0x00000261, 0x00000262, 0x000200f8, 0x00000261, 0x00060041,
+ 0x000000b7, 0x00000263, 0x000000a7, 0x000001a9, 0x00000028, 0x0004003d, 0x00000006, 0x00000264,
+ 0x00000263, 0x00050041, 0x000000ad, 0x00000266, 0x00000265, 0x00000028, 0x0004003d, 0x00000006,
+ 0x00000267, 0x00000266, 0x00050080, 0x00000006, 0x00000268, 0x00000264, 0x00000267, 0x00050041,
+ 0x000000e8, 0x00000269, 0x000000e5, 0x00000018, 0x0004003d, 0x0000000a, 0x0000026a, 0x00000269,
+ 0x00060041, 0x00000042, 0x0000026b, 0x000000cb, 0x00000018, 0x00000268, 0x0003003e, 0x0000026b,
+ 0x0000026a, 0x000300f7, 0x0000026f, 0x00000000, 0x000400fa, 0x00000229, 0x0000026e, 0x0000026f,
+ 0x000200f8, 0x0000026e, 0x00060041, 0x000000b7, 0x00000270, 0x000000a7, 0x000001a9, 0x00000047,
+ 0x0004003d, 0x00000006, 0x00000271, 0x00000270, 0x00050080, 0x00000006, 0x00000274, 0x00000271,
+ 0x00000267, 0x00050041, 0x000000e8, 0x00000275, 0x00000221, 0x00000018, 0x0004003d, 0x0000000a,
+ 0x00000276, 0x00000275, 0x00060041, 0x00000042, 0x00000277, 0x000000cb, 0x00000018, 0x00000274,
+ 0x0003003e, 0x00000277, 0x00000276, 0x000200f9, 0x0000026f, 0x000200f8, 0x0000026f, 0x000200f9,
+ 0x00000262, 0x000200f8, 0x00000262, 0x000200f9, 0x00000285, 0x000200f8, 0x00000285, 0x000100fd,
+ 0x00010038,
+};
+static const uint32_t spv_combust[] = {
+ 0x07230203, 0x00010300, 0x000d000b, 0x00000121, 0x00000000, 0x00020011, 0x00000001, 0x0006000b,
+ 0x00000001, 0x4c534c47, 0x6474732e, 0x3035342e, 0x00000000, 0x0003000e, 0x00000000, 0x00000001,
+ 0x0006000f, 0x00000005, 0x00000004, 0x6e69616d, 0x00000000, 0x0000000b, 0x00060010, 0x00000004,
+ 0x00000011, 0x00000100, 0x00000001, 0x00000001, 0x00040047, 0x0000000b, 0x0000000b, 0x0000001c,
+ 0x00030047, 0x00000016, 0x00000002, 0x00050048, 0x00000016, 0x00000000, 0x00000023, 0x00000000,
+ 0x00050048, 0x00000016, 0x00000001, 0x00000023, 0x00000010, 0x00050048, 0x00000016, 0x00000002,
+ 0x00000023, 0x00000020, 0x00050048, 0x00000016, 0x00000003, 0x00000023, 0x00000030, 0x00050048,
+ 0x00000016, 0x00000004, 0x00000023, 0x00000040, 0x00050048, 0x00000016, 0x00000005, 0x00000023,
+ 0x00000050, 0x00050048, 0x00000016, 0x00000006, 0x00000023, 0x00000060, 0x00040047, 0x0000002d,
+ 0x00000006, 0x00000004, 0x00030047, 0x0000002e, 0x00000002, 0x00050048, 0x0000002e, 0x00000000,
+ 0x00000023, 0x00000000, 0x00040047, 0x00000030, 0x00000021, 0x00000000, 0x00040047, 0x00000030,
+ 0x00000022, 0x00000000, 0x00040047, 0x000000f7, 0x0000000b, 0x00000019, 0x00020013, 0x00000002,
+ 0x00030021, 0x00000003, 0x00000002, 0x00040015, 0x00000006, 0x00000020, 0x00000000, 0x00040017,
+ 0x00000009, 0x00000006, 0x00000003, 0x00040020, 0x0000000a, 0x00000001, 0x00000009, 0x0004003b,
+ 0x0000000a, 0x0000000b, 0x00000001, 0x0004002b, 0x00000006, 0x0000000c, 0x00000000, 0x00040020,
+ 0x0000000d, 0x00000001, 0x00000006, 0x00040015, 0x00000011, 0x00000020, 0x00000001, 0x00040017,
+ 0x00000012, 0x00000011, 0x00000004, 0x00040017, 0x00000013, 0x00000006, 0x00000004, 0x00030016,
+ 0x00000014, 0x00000020, 0x00040017, 0x00000015, 0x00000014, 0x00000004, 0x0009001e, 0x00000016,
+ 0x00000012, 0x00000013, 0x00000013, 0x00000013, 0x00000015, 0x00000015, 0x00000015, 0x00040020,
+ 0x00000017, 0x00000009, 0x00000016, 0x0004003b, 0x00000017, 0x00000018, 0x00000009, 0x0004002b,
+ 0x00000011, 0x00000019, 0x00000000, 0x00040020, 0x0000001a, 0x00000009, 0x00000011, 0x0004002b,
+ 0x00000006, 0x0000001d, 0x00000001, 0x0004002b, 0x00000006, 0x00000021, 0x00000002, 0x00020014,
+ 0x00000026, 0x0003001d, 0x0000002d, 0x00000014, 0x0003001e, 0x0000002e, 0x0000002d, 0x00040020,
+ 0x0000002f, 0x0000000c, 0x0000002e, 0x0004003b, 0x0000002f, 0x00000030, 0x0000000c, 0x0004002b,
+ 0x00000011, 0x00000031, 0x00000001, 0x00040020, 0x00000032, 0x00000009, 0x00000006, 0x00040020,
+ 0x00000037, 0x0000000c, 0x00000014, 0x0004002b, 0x00000011, 0x00000049, 0x00000004, 0x00040020,
+ 0x0000004a, 0x00000009, 0x00000014, 0x0004002b, 0x00000006, 0x00000054, 0x00000003, 0x0004002b,
+ 0x00000011, 0x00000058, 0x00000005, 0x0004002b, 0x00000011, 0x00000062, 0x00000006, 0x0004002b,
+ 0x00000014, 0x00000066, 0x00000000, 0x0004002b, 0x00000014, 0x00000071, 0x40800000, 0x0004002b,
+ 0x00000014, 0x00000072, 0x3f000000, 0x0004002b, 0x00000014, 0x00000076, 0x40000000, 0x0004002b,
+ 0x00000011, 0x0000008d, 0x00000002, 0x0004002b, 0x00000014, 0x00000097, 0x3ecccccd, 0x0004002b,
+ 0x00000014, 0x000000ce, 0x3f800000, 0x0004002b, 0x00000014, 0x000000cf, 0x40400000, 0x0004002b,
+ 0x00000014, 0x000000db, 0x3eaaaaab, 0x0004002b, 0x00000006, 0x000000f6, 0x00000100, 0x0006002c,
+ 0x00000009, 0x000000f7, 0x000000f6, 0x0000001d, 0x0000001d, 0x00050036, 0x00000002, 0x00000004,
+ 0x00000000, 0x00000003, 0x000200f8, 0x00000005, 0x000300f7, 0x0000010c, 0x00000000, 0x000300fb,
+ 0x0000000c, 0x0000010d, 0x000200f8, 0x0000010d, 0x00050041, 0x0000000d, 0x0000000e, 0x0000000b,
+ 0x0000000c, 0x0004003d, 0x00000006, 0x0000000f, 0x0000000e, 0x00060041, 0x0000001a, 0x0000001b,
+ 0x00000018, 0x00000019, 0x0000000c, 0x0004003d, 0x00000011, 0x0000001c, 0x0000001b, 0x00060041,
+ 0x0000001a, 0x0000001e, 0x00000018, 0x00000019, 0x0000001d, 0x0004003d, 0x00000011, 0x0000001f,
+ 0x0000001e, 0x00050084, 0x00000011, 0x00000020, 0x0000001c, 0x0000001f, 0x00060041, 0x0000001a,
+ 0x00000022, 0x00000018, 0x00000019, 0x00000021, 0x0004003d, 0x00000011, 0x00000023, 0x00000022,
+ 0x00050084, 0x00000011, 0x00000024, 0x00000020, 0x00000023, 0x0004007c, 0x00000006, 0x00000025,
+ 0x00000024, 0x000500ae, 0x00000026, 0x00000027, 0x0000000f, 0x00000025, 0x000300f7, 0x00000029,
+ 0x00000000, 0x000400fa, 0x00000027, 0x00000028, 0x00000029, 0x000200f8, 0x00000028, 0x000200f9,
+ 0x0000010c, 0x000200f8, 0x00000029, 0x00060041, 0x00000032, 0x00000033, 0x00000018, 0x00000031,
+ 0x00000021, 0x0004003d, 0x00000006, 0x00000034, 0x00000033, 0x00050080, 0x00000006, 0x00000036,
+ 0x00000034, 0x0000000f, 0x00060041, 0x00000037, 0x00000038, 0x00000030, 0x00000019, 0x00000036,
+ 0x0004003d, 0x00000014, 0x00000039, 0x00000038, 0x00060041, 0x00000032, 0x0000003b, 0x00000018,
+ 0x00000031, 0x0000001d, 0x0004003d, 0x00000006, 0x0000003c, 0x0000003b, 0x00050080, 0x00000006,
+ 0x0000003e, 0x0000003c, 0x0000000f, 0x00060041, 0x00000037, 0x0000003f, 0x00000030, 0x00000019,
+ 0x0000003e, 0x0004003d, 0x00000014, 0x00000040, 0x0000003f, 0x00060041, 0x00000032, 0x00000042,
+ 0x00000018, 0x00000031, 0x0000000c, 0x0004003d, 0x00000006, 0x00000043, 0x00000042, 0x00050080,
+ 0x00000006, 0x00000045, 0x00000043, 0x0000000f, 0x00060041, 0x00000037, 0x00000046, 0x00000030,
+ 0x00000019, 0x00000045, 0x0004003d, 0x00000014, 0x00000047, 0x00000046, 0x00060041, 0x0000004a,
+ 0x0000004b, 0x00000018, 0x00000049, 0x0000000c, 0x0004003d, 0x00000014, 0x0000004c, 0x0000004b,
+ 0x00060041, 0x0000004a, 0x0000004e, 0x00000018, 0x00000049, 0x0000001d, 0x0004003d, 0x00000014,
+ 0x0000004f, 0x0000004e, 0x00060041, 0x0000004a, 0x00000051, 0x00000018, 0x00000049, 0x00000021,
+ 0x0004003d, 0x00000014, 0x00000052, 0x00000051, 0x00060041, 0x0000004a, 0x00000055, 0x00000018,
+ 0x00000049, 0x00000054, 0x0004003d, 0x00000014, 0x00000056, 0x00000055, 0x00060041, 0x0000004a,
+ 0x00000059, 0x00000018, 0x00000058, 0x0000000c, 0x0004003d, 0x00000014, 0x0000005a, 0x00000059,
+ 0x00060041, 0x0000004a, 0x0000005c, 0x00000018, 0x00000058, 0x0000001d, 0x0004003d, 0x00000014,
+ 0x0000005d, 0x0000005c, 0x00060041, 0x0000004a, 0x0000005f, 0x00000018, 0x00000058, 0x00000021,
+ 0x0004003d, 0x00000014, 0x00000060, 0x0000005f, 0x00060041, 0x0000004a, 0x00000063, 0x00000018,
+ 0x00000062, 0x00000021, 0x0004003d, 0x00000014, 0x00000064, 0x00000063, 0x000500ba, 0x00000026,
+ 0x00000068, 0x00000039, 0x00000066, 0x000500ba, 0x00000026, 0x0000006b, 0x00000040, 0x0000004c,
+ 0x000500a7, 0x00000026, 0x0000006c, 0x00000068, 0x0000006b, 0x000300f7, 0x0000006e, 0x00000000,
+ 0x000400fa, 0x0000006c, 0x0000006d, 0x0000006e, 0x000200f8, 0x0000006d, 0x00050083, 0x00000014,
+ 0x00000075, 0x00000040, 0x0000004c, 0x00050085, 0x00000014, 0x00000077, 0x00000075, 0x00000076,
+ 0x00050081, 0x00000014, 0x00000078, 0x00000072, 0x00000077, 0x0007000c, 0x00000014, 0x00000079,
+ 0x00000001, 0x00000025, 0x00000071, 0x00000078, 0x00050085, 0x00000014, 0x0000007a, 0x0000004f,
+ 0x00000079, 0x00050085, 0x00000014, 0x0000007e, 0x0000007a, 0x00000064, 0x0007000c, 0x00000014,
+ 0x0000007f, 0x00000001, 0x00000025, 0x00000039, 0x0000007e, 0x00050083, 0x00000014, 0x00000082,
+ 0x00000039, 0x0000007f, 0x00050085, 0x00000014, 0x00000085, 0x00000052, 0x0000007f, 0x00050081,
+ 0x00000014, 0x00000087, 0x00000040, 0x00000085, 0x00050085, 0x00000014, 0x0000008a, 0x00000056,
+ 0x0000007f, 0x00050081, 0x00000014, 0x0000008c, 0x00000047, 0x0000008a, 0x000200f9, 0x0000006e,
+ 0x000200f8, 0x0000006e, 0x000700f5, 0x00000014, 0x00000120, 0x00000039, 0x00000029, 0x00000082,
+ 0x0000006d, 0x000700f5, 0x00000014, 0x0000011c, 0x00000047, 0x00000029, 0x0000008c, 0x0000006d,
+ 0x000700f5, 0x00000014, 0x00000117, 0x00000040, 0x00000029, 0x00000087, 0x0000006d, 0x000700f5,
+ 0x00000014, 0x00000112, 0x00000066, 0x00000029, 0x0000007f, 0x0000006d, 0x00060041, 0x00000032,
+ 0x0000008e, 0x00000018, 0x0000008d, 0x0000000c, 0x0004003d, 0x00000006, 0x0000008f, 0x0000008e,
+ 0x00050080, 0x00000006, 0x00000091, 0x0000008f, 0x0000000f, 0x00050085, 0x00000014, 0x00000094,
+ 0x0000005a, 0x00000112, 0x00050088, 0x00000014, 0x00000096, 0x00000094, 0x00000064, 0x00050088,
+ 0x00000014, 0x00000099, 0x00000097, 0x00000064, 0x0007000c, 0x00000014, 0x0000009a, 0x00000001,
+ 0x00000025, 0x00000096, 0x00000099, 0x00060041, 0x00000037, 0x0000009b, 0x00000030, 0x00000019,
+ 0x00000091, 0x0003003e, 0x0000009b, 0x0000009a, 0x000500ba, 0x00000026, 0x0000009e, 0x0000004f,
+ 0x00000066, 0x000300f7, 0x000000a1, 0x00000000, 0x000400fa, 0x0000009e, 0x000000a0, 0x000000a7,
+ 0x000200f8, 0x000000a0, 0x00050085, 0x00000014, 0x000000a5, 0x0000004f, 0x00000064, 0x00050088,
+ 0x00000014, 0x000000a6, 0x00000112, 0x000000a5, 0x000200f9, 0x000000a1, 0x000200f8, 0x000000a7,
+ 0x000200f9, 0x000000a1, 0x000200f8, 0x000000a1, 0x000700f5, 0x00000014, 0x00000113, 0x000000a6,
+ 0x000000a0, 0x00000066, 0x000000a7, 0x00060041, 0x00000032, 0x000000aa, 0x00000018, 0x00000031,
+ 0x00000054, 0x0004003d, 0x00000006, 0x000000ab, 0x000000aa, 0x00050080, 0x00000006, 0x000000ad,
+ 0x000000ab, 0x0000000f, 0x00060041, 0x00000037, 0x000000ae, 0x00000030, 0x00000019, 0x000000ad,
+ 0x0004003d, 0x00000014, 0x000000af, 0x000000ae, 0x00060041, 0x0000004a, 0x000000b0, 0x00000018,
+ 0x00000062, 0x0000001d, 0x0004003d, 0x00000014, 0x000000b1, 0x000000b0, 0x00050085, 0x00000014,
+ 0x000000b2, 0x000000af, 0x000000b1, 0x000500ba, 0x00000026, 0x000000b9, 0x00000113, 0x000000b2,
+ 0x000300f7, 0x000000bc, 0x00000000, 0x000400fa, 0x000000b9, 0x000000bb, 0x000000bf, 0x000200f8,
+ 0x000000bb, 0x0007000c, 0x00000014, 0x000000be, 0x00000001, 0x00000025, 0x00000113, 0x00000071,
+ 0x000200f9, 0x000000bc, 0x000200f8, 0x000000bf, 0x000200f9, 0x000000bc, 0x000200f8, 0x000000bc,
+ 0x000700f5, 0x00000014, 0x00000114, 0x000000be, 0x000000bb, 0x000000b2, 0x000000bf, 0x0003003e,
+ 0x000000ae, 0x00000114, 0x00050085, 0x00000014, 0x000000c5, 0x00000117, 0x0000005d, 0x000500ba,
+ 0x00000026, 0x000000c7, 0x00000060, 0x00000066, 0x000500ba, 0x00000026, 0x000000c9, 0x000000c5,
+ 0x00000066, 0x000500a7, 0x00000026, 0x000000ca, 0x000000c7, 0x000000c9, 0x000300f7, 0x000000cc,
+ 0x00000000, 0x000400fa, 0x000000ca, 0x000000cb, 0x000000cc, 0x000200f8, 0x000000cb, 0x00050085,
+ 0x00000014, 0x000000d1, 0x000000cf, 0x00000060, 0x00050085, 0x00000014, 0x000000d3, 0x000000d1,
+ 0x000000c5, 0x00050085, 0x00000014, 0x000000d5, 0x000000d3, 0x000000c5, 0x00050085, 0x00000014,
+ 0x000000d7, 0x000000d5, 0x000000c5, 0x00050085, 0x00000014, 0x000000d9, 0x000000d7, 0x00000064,
+ 0x00050081, 0x00000014, 0x000000da, 0x000000ce, 0x000000d9, 0x0007000c, 0x00000014, 0x000000dc,
+ 0x00000001, 0x0000001a, 0x000000da, 0x000000db, 0x00050088, 0x00000014, 0x000000dd, 0x000000c5,
+ 0x000000dc, 0x000200f9, 0x000000cc, 0x000200f8, 0x000000cc, 0x000700f5, 0x00000014, 0x00000118,
+ 0x000000c5, 0x000000bc, 0x000000dd, 0x000000cb, 0x0003003e, 0x0000003f, 0x00000118, 0x00060041,
+ 0x0000004a, 0x000000e9, 0x00000018, 0x00000058, 0x00000054, 0x0004003d, 0x00000014, 0x000000ea,
+ 0x000000e9, 0x00050085, 0x00000014, 0x000000eb, 0x0000011c, 0x000000ea, 0x0003003e, 0x00000046,
+ 0x000000eb, 0x00060041, 0x0000004a, 0x000000f2, 0x00000018, 0x00000062, 0x0000000c, 0x0004003d,
+ 0x00000014, 0x000000f3, 0x000000f2, 0x00050085, 0x00000014, 0x000000f4, 0x00000120, 0x000000f3,
+ 0x0003003e, 0x00000038, 0x000000f4, 0x000200f9, 0x0000010c, 0x000200f8, 0x0000010c, 0x000100fd,
+ 0x00010038,
+};
+static const uint32_t spv_faces[] = {
+ 0x07230203, 0x00010300, 0x000d000b, 0x000005e0, 0x00000000, 0x00020011, 0x00000001, 0x0006000b,
+ 0x00000001, 0x4c534c47, 0x6474732e, 0x3035342e, 0x00000000, 0x0003000e, 0x00000000, 0x00000001,
+ 0x0009000f, 0x00000005, 0x00000004, 0x6e69616d, 0x00000000, 0x000000b3, 0x00000337, 0x00000363,
+ 0x00000366, 0x00060010, 0x00000004, 0x00000011, 0x00000008, 0x00000008, 0x00000004, 0x00030047,
+ 0x0000002e, 0x00000002, 0x00050048, 0x0000002e, 0x00000000, 0x00000023, 0x00000000, 0x00050048,
+ 0x0000002e, 0x00000001, 0x00000023, 0x00000010, 0x00050048, 0x0000002e, 0x00000002, 0x00000023,
+ 0x00000020, 0x00050048, 0x0000002e, 0x00000003, 0x00000023, 0x00000030, 0x00050048, 0x0000002e,
+ 0x00000004, 0x00000023, 0x00000040, 0x00050048, 0x0000002e, 0x00000005, 0x00000023, 0x00000050,
+ 0x00050048, 0x0000002e, 0x00000006, 0x00000023, 0x00000060, 0x00040047, 0x00000097, 0x00000006,
+ 0x00000004, 0x00030047, 0x00000098, 0x00000002, 0x00050048, 0x00000098, 0x00000000, 0x00000023,
+ 0x00000000, 0x00040047, 0x0000009a, 0x00000021, 0x00000002, 0x00040047, 0x0000009a, 0x00000022,
+ 0x00000000, 0x00040047, 0x000000b3, 0x0000000b, 0x0000001c, 0x00040047, 0x00000120, 0x00000006,
+ 0x00000004, 0x00030047, 0x00000121, 0x00000002, 0x00050048, 0x00000121, 0x00000000, 0x00000023,
+ 0x00000000, 0x00040047, 0x00000123, 0x00000021, 0x00000000, 0x00040047, 0x00000123, 0x00000022,
+ 0x00000000, 0x00040047, 0x00000337, 0x0000000b, 0x0000001d, 0x00040047, 0x00000363, 0x0000000b,
+ 0x00000018, 0x00040047, 0x00000366, 0x0000000b, 0x0000001a, 0x00040047, 0x00000368, 0x00000006,
+ 0x00000004, 0x00030047, 0x00000369, 0x00000002, 0x00050048, 0x00000369, 0x00000000, 0x00000023,
+ 0x00000000, 0x00040047, 0x0000036b, 0x00000021, 0x00000003, 0x00040047, 0x0000036b, 0x00000022,
+ 0x00000000, 0x00040047, 0x00000382, 0x0000000b, 0x00000019, 0x00020013, 0x00000002, 0x00030021,
+ 0x00000003, 0x00000002, 0x00040015, 0x00000006, 0x00000020, 0x00000001, 0x00040015, 0x00000008,
+ 0x00000020, 0x00000000, 0x00020014, 0x0000001f, 0x00040017, 0x0000002a, 0x00000006, 0x00000004,
+ 0x00040017, 0x0000002b, 0x00000008, 0x00000004, 0x00030016, 0x0000002c, 0x00000020, 0x00040017,
+ 0x0000002d, 0x0000002c, 0x00000004, 0x0009001e, 0x0000002e, 0x0000002a, 0x0000002b, 0x0000002b,
+ 0x0000002b, 0x0000002d, 0x0000002d, 0x0000002d, 0x00040020, 0x0000002f, 0x00000009, 0x0000002e,
+ 0x0004003b, 0x0000002f, 0x00000030, 0x00000009, 0x0004002b, 0x00000006, 0x00000031, 0x00000000,
+ 0x0004002b, 0x00000008, 0x00000032, 0x00000000, 0x00040020, 0x00000033, 0x00000009, 0x00000006,
+ 0x0004002b, 0x00000008, 0x00000037, 0x00000001, 0x0004002b, 0x00000006, 0x00000045, 0x00000001,
+ 0x0004002b, 0x00000008, 0x00000088, 0x00000002, 0x0003002a, 0x0000001f, 0x0000008f, 0x0003001d,
+ 0x00000097, 0x00000008, 0x0003001e, 0x00000098, 0x00000097, 0x00040020, 0x00000099, 0x0000000c,
+ 0x00000098, 0x0004003b, 0x00000099, 0x0000009a, 0x0000000c, 0x00040020, 0x000000a4, 0x0000000c,
+ 0x00000008, 0x0004002b, 0x00000008, 0x000000ab, 0x00000003, 0x00040017, 0x000000ae, 0x00000006,
+ 0x00000003, 0x00040017, 0x000000b1, 0x00000008, 0x00000003, 0x00040020, 0x000000b2, 0x00000001,
+ 0x000000b1, 0x0004003b, 0x000000b2, 0x000000b3, 0x00000001, 0x0003001d, 0x00000120, 0x0000002c,
+ 0x0003001e, 0x00000121, 0x00000120, 0x00040020, 0x00000122, 0x0000000c, 0x00000121, 0x0004003b,
+ 0x00000122, 0x00000123, 0x0000000c, 0x00040020, 0x00000124, 0x00000009, 0x00000008, 0x0004002b,
+ 0x00000006, 0x00000129, 0x00000002, 0x00040020, 0x0000012e, 0x0000000c, 0x0000002c, 0x0004002b,
+ 0x00000006, 0x00000154, 0x00000003, 0x0004002b, 0x00000008, 0x0000017a, 0x000000ff, 0x0004002b,
+ 0x0000002c, 0x000001a6, 0x40000000, 0x0004002b, 0x00000006, 0x00000240, 0x00000004, 0x00040020,
+ 0x00000241, 0x00000009, 0x0000002c, 0x0004002b, 0x0000002c, 0x000002b1, 0x00000000, 0x00040020,
+ 0x00000336, 0x00000001, 0x00000008, 0x0004003b, 0x00000336, 0x00000337, 0x00000001, 0x0004002b,
+ 0x00000008, 0x00000339, 0x00000100, 0x0004001c, 0x0000033a, 0x0000002c, 0x00000339, 0x00040020,
+ 0x0000033b, 0x00000004, 0x0000033a, 0x0004003b, 0x0000033b, 0x0000033c, 0x00000004, 0x00040020,
+ 0x0000033f, 0x00000004, 0x0000002c, 0x0004002b, 0x00000008, 0x00000341, 0x00000108, 0x0004002b,
+ 0x00000008, 0x00000343, 0x00000080, 0x0004003b, 0x000000b2, 0x00000363, 0x00000001, 0x0004003b,
+ 0x000000b2, 0x00000366, 0x00000001, 0x0003001d, 0x00000368, 0x0000002c, 0x0003001e, 0x00000369,
+ 0x00000368, 0x00040020, 0x0000036a, 0x0000000c, 0x00000369, 0x0004003b, 0x0000036a, 0x0000036b,
+ 0x0000000c, 0x0004002b, 0x00000008, 0x00000380, 0x00000008, 0x0004002b, 0x00000008, 0x00000381,
+ 0x00000004, 0x0006002c, 0x000000b1, 0x00000382, 0x00000380, 0x00000380, 0x00000381, 0x00050036,
+ 0x00000002, 0x00000004, 0x00000000, 0x00000003, 0x000200f8, 0x00000005, 0x00060041, 0x00000033,
+ 0x000000ac, 0x00000030, 0x00000031, 0x000000ab, 0x0004003d, 0x00000006, 0x000000ad, 0x000000ac,
+ 0x0004003d, 0x000000b1, 0x000000b4, 0x000000b3, 0x0004007c, 0x000000ae, 0x000000b5, 0x000000b4,
+ 0x00060041, 0x00000033, 0x000000b7, 0x00000030, 0x00000031, 0x00000032, 0x0004003d, 0x00000006,
+ 0x000000b8, 0x000000b7, 0x00060041, 0x00000033, 0x000000ba, 0x00000030, 0x00000031, 0x00000037,
+ 0x0004003d, 0x00000006, 0x000000bb, 0x000000ba, 0x00060041, 0x00000033, 0x000000bd, 0x00000030,
+ 0x00000031, 0x00000088, 0x0004003d, 0x00000006, 0x000000be, 0x000000bd, 0x00050051, 0x00000006,
+ 0x000000c1, 0x000000b5, 0x00000000, 0x000500b3, 0x0000001f, 0x000000c3, 0x000000c1, 0x000000b8,
+ 0x000300f7, 0x000000c5, 0x00000000, 0x000400fa, 0x000000c3, 0x000000c4, 0x000000c5, 0x000200f8,
+ 0x000000c4, 0x00050051, 0x00000006, 0x000000c7, 0x000000b5, 0x00000001, 0x000500b1, 0x0000001f,
+ 0x000000c9, 0x000000c7, 0x000000bb, 0x000200f9, 0x000000c5, 0x000200f8, 0x000000c5, 0x000700f5,
+ 0x0000001f, 0x000000ca, 0x000000c3, 0x00000005, 0x000000c9, 0x000000c4, 0x000300f7, 0x000000cc,
+ 0x00000000, 0x000400fa, 0x000000ca, 0x000000cb, 0x000000cc, 0x000200f8, 0x000000cb, 0x00050051,
+ 0x00000006, 0x000000ce, 0x000000b5, 0x00000002, 0x000500b1, 0x0000001f, 0x000000d0, 0x000000ce,
+ 0x000000be, 0x000200f9, 0x000000cc, 0x000200f8, 0x000000cc, 0x000700f5, 0x0000001f, 0x000000d1,
+ 0x000000ca, 0x000000c5, 0x000000d0, 0x000000cb, 0x000500b1, 0x0000001f, 0x000000d6, 0x000000c1,
+ 0x000000b8, 0x000300f7, 0x000000d8, 0x00000000, 0x000400fa, 0x000000d6, 0x000000d7, 0x000000d8,
+ 0x000200f8, 0x000000d7, 0x00050051, 0x00000006, 0x000000da, 0x000000b5, 0x00000001, 0x000500b3,
+ 0x0000001f, 0x000000dc, 0x000000da, 0x000000bb, 0x000200f9, 0x000000d8, 0x000200f8, 0x000000d8,
+ 0x000700f5, 0x0000001f, 0x000000dd, 0x000000d6, 0x000000cc, 0x000000dc, 0x000000d7, 0x000300f7,
+ 0x000000df, 0x00000000, 0x000400fa, 0x000000dd, 0x000000de, 0x000000df, 0x000200f8, 0x000000de,
+ 0x00050051, 0x00000006, 0x000000e1, 0x000000b5, 0x00000002, 0x000500b1, 0x0000001f, 0x000000e3,
+ 0x000000e1, 0x000000be, 0x000200f9, 0x000000df, 0x000200f8, 0x000000df, 0x000700f5, 0x0000001f,
+ 0x000000e4, 0x000000dd, 0x000000d8, 0x000000e3, 0x000000de, 0x000300f7, 0x000000eb, 0x00000000,
+ 0x000400fa, 0x000000d6, 0x000000ea, 0x000000eb, 0x000200f8, 0x000000ea, 0x00050051, 0x00000006,
+ 0x000000ed, 0x000000b5, 0x00000001, 0x000500b1, 0x0000001f, 0x000000ef, 0x000000ed, 0x000000bb,
+ 0x000200f9, 0x000000eb, 0x000200f8, 0x000000eb, 0x000700f5, 0x0000001f, 0x000000f0, 0x000000d6,
+ 0x000000df, 0x000000ef, 0x000000ea, 0x000300f7, 0x000000f2, 0x00000000, 0x000400fa, 0x000000f0,
+ 0x000000f1, 0x000000f2, 0x000200f8, 0x000000f1, 0x00050051, 0x00000006, 0x000000f4, 0x000000b5,
+ 0x00000002, 0x000500b3, 0x0000001f, 0x000000f6, 0x000000f4, 0x000000be, 0x000200f9, 0x000000f2,
+ 0x000200f8, 0x000000f2, 0x000700f5, 0x0000001f, 0x000000f7, 0x000000f0, 0x000000eb, 0x000000f6,
+ 0x000000f1, 0x00050051, 0x00000006, 0x000000fe, 0x000000b5, 0x00000001, 0x00050051, 0x00000006,
+ 0x00000101, 0x000000b5, 0x00000002, 0x00050080, 0x00000006, 0x0000039a, 0x000000b8, 0x00000045,
+ 0x00050084, 0x00000006, 0x0000039f, 0x000000bb, 0x00000101, 0x00050080, 0x00000006, 0x000003a0,
+ 0x000000fe, 0x0000039f, 0x00050084, 0x00000006, 0x000003a1, 0x0000039a, 0x000003a0, 0x00050080,
+ 0x00000006, 0x000003a2, 0x000000c1, 0x000003a1, 0x0004007c, 0x00000008, 0x000003a3, 0x000003a2,
+ 0x00050080, 0x00000006, 0x000003ac, 0x000000bb, 0x00000045, 0x00050084, 0x00000006, 0x000003ae,
+ 0x000003ac, 0x00000101, 0x00050080, 0x00000006, 0x000003af, 0x000000fe, 0x000003ae, 0x00050084,
+ 0x00000006, 0x000003b0, 0x000000b8, 0x000003af, 0x00050080, 0x00000006, 0x000003b1, 0x000000c1,
+ 0x000003b0, 0x0004007c, 0x00000008, 0x000003b2, 0x000003b1, 0x00050084, 0x00000006, 0x000003be,
+ 0x000000b8, 0x000003a0, 0x00050080, 0x00000006, 0x000003bf, 0x000000c1, 0x000003be, 0x0004007c,
+ 0x00000008, 0x000003c0, 0x000003bf, 0x000500aa, 0x0000001f, 0x0000011a, 0x000000ad, 0x00000031,
+ 0x000300f7, 0x0000011c, 0x00000000, 0x000400fa, 0x0000011a, 0x0000011b, 0x0000014e, 0x000200f8,
+ 0x0000011b, 0x000300f7, 0x0000011f, 0x00000000, 0x000400fa, 0x000000d1, 0x0000011e, 0x0000011f,
+ 0x000200f8, 0x0000011e, 0x00060041, 0x00000124, 0x00000125, 0x00000030, 0x00000045, 0x00000032,
+ 0x0004003d, 0x00000008, 0x00000126, 0x00000125, 0x00050080, 0x00000008, 0x00000128, 0x00000126,
+ 0x000003a3, 0x00060041, 0x00000124, 0x0000012a, 0x00000030, 0x00000129, 0x00000032, 0x0004003d,
+ 0x00000008, 0x0000012b, 0x0000012a, 0x00050080, 0x00000008, 0x0000012d, 0x0000012b, 0x000003a3,
+ 0x00060041, 0x0000012e, 0x0000012f, 0x00000123, 0x00000031, 0x0000012d, 0x0004003d, 0x0000002c,
+ 0x00000130, 0x0000012f, 0x00060041, 0x0000012e, 0x00000131, 0x00000123, 0x00000031, 0x00000128,
+ 0x0003003e, 0x00000131, 0x00000130, 0x000200f9, 0x0000011f, 0x000200f8, 0x0000011f, 0x000300f7,
+ 0x00000134, 0x00000000, 0x000400fa, 0x000000e4, 0x00000133, 0x00000134, 0x000200f8, 0x00000133,
+ 0x00060041, 0x00000124, 0x00000135, 0x00000030, 0x00000045, 0x00000037, 0x0004003d, 0x00000008,
+ 0x00000136, 0x00000135, 0x00050080, 0x00000008, 0x00000138, 0x00000136, 0x000003b2, 0x00060041,
+ 0x00000124, 0x00000139, 0x00000030, 0x00000129, 0x00000037, 0x0004003d, 0x00000008, 0x0000013a,
+ 0x00000139, 0x00050080, 0x00000008, 0x0000013c, 0x0000013a, 0x000003b2, 0x00060041, 0x0000012e,
+ 0x0000013d, 0x00000123, 0x00000031, 0x0000013c, 0x0004003d, 0x0000002c, 0x0000013e, 0x0000013d,
+ 0x00060041, 0x0000012e, 0x0000013f, 0x00000123, 0x00000031, 0x00000138, 0x0003003e, 0x0000013f,
+ 0x0000013e, 0x000200f9, 0x00000134, 0x000200f8, 0x00000134, 0x000300f7, 0x00000142, 0x00000000,
+ 0x000400fa, 0x000000f7, 0x00000141, 0x00000142, 0x000200f8, 0x00000141, 0x00060041, 0x00000124,
+ 0x00000143, 0x00000030, 0x00000045, 0x00000088, 0x0004003d, 0x00000008, 0x00000144, 0x00000143,
+ 0x00050080, 0x00000008, 0x00000146, 0x00000144, 0x000003c0, 0x00060041, 0x00000124, 0x00000147,
+ 0x00000030, 0x00000129, 0x00000088, 0x0004003d, 0x00000008, 0x00000148, 0x00000147, 0x00050080,
+ 0x00000008, 0x0000014a, 0x00000148, 0x000003c0, 0x00060041, 0x0000012e, 0x0000014b, 0x00000123,
+ 0x00000031, 0x0000014a, 0x0004003d, 0x0000002c, 0x0000014c, 0x0000014b, 0x00060041, 0x0000012e,
+ 0x0000014d, 0x00000123, 0x00000031, 0x00000146, 0x0003003e, 0x0000014d, 0x0000014c, 0x000200f9,
+ 0x00000142, 0x000200f8, 0x00000142, 0x000200f9, 0x0000011c, 0x000200f8, 0x0000014e, 0x000500aa,
+ 0x0000001f, 0x00000150, 0x000000ad, 0x00000045, 0x000300f7, 0x00000152, 0x00000000, 0x000400fa,
+ 0x00000150, 0x00000151, 0x0000023a, 0x000200f8, 0x00000151, 0x00060041, 0x00000124, 0x00000155,
+ 0x00000030, 0x00000154, 0x00000032, 0x0004003d, 0x00000008, 0x00000156, 0x00000155, 0x000300f7,
+ 0x0000015d, 0x00000000, 0x000400fa, 0x000000d6, 0x0000015c, 0x0000015d, 0x000200f8, 0x0000015c,
+ 0x000500b1, 0x0000001f, 0x00000161, 0x000000fe, 0x000000bb, 0x000200f9, 0x0000015d, 0x000200f8,
+ 0x0000015d, 0x000700f5, 0x0000001f, 0x00000162, 0x000000d6, 0x00000151, 0x00000161, 0x0000015c,
+ 0x000300f7, 0x00000164, 0x00000000, 0x000400fa, 0x00000162, 0x00000163, 0x00000164, 0x000200f8,
+ 0x00000163, 0x000500b1, 0x0000001f, 0x00000168, 0x00000101, 0x000000be, 0x000200f9, 0x00000164,
+ 0x000200f8, 0x00000164, 0x000700f5, 0x0000001f, 0x00000169, 0x00000162, 0x0000015d, 0x00000168,
+ 0x00000163, 0x000300f7, 0x0000016b, 0x00000000, 0x000400fa, 0x00000169, 0x0000016a, 0x0000016b,
+ 0x000200f8, 0x0000016a, 0x00050080, 0x00000008, 0x00000177, 0x00000156, 0x000003c0, 0x00060041,
+ 0x000000a4, 0x00000178, 0x0000009a, 0x00000031, 0x00000177, 0x0004003d, 0x00000008, 0x00000179,
+ 0x00000178, 0x000500c7, 0x00000008, 0x0000017b, 0x00000179, 0x0000017a, 0x000500ab, 0x0000001f,
+ 0x0000017c, 0x0000017b, 0x00000032, 0x000200f9, 0x0000016b, 0x000200f8, 0x0000016b, 0x000700f5,
+ 0x0000001f, 0x0000017d, 0x00000169, 0x00000164, 0x0000017c, 0x0000016a, 0x000300f7, 0x00000180,
+ 0x00000000, 0x000400fa, 0x000000d1, 0x0000017f, 0x00000180, 0x000200f8, 0x0000017f, 0x000300f7,
+ 0x00000184, 0x00000000, 0x000400fa, 0x0000017d, 0x00000183, 0x00000184, 0x000200f8, 0x00000183,
+ 0x000500ad, 0x0000001f, 0x00000187, 0x000000c1, 0x00000031, 0x000200f9, 0x00000184, 0x000200f8,
+ 0x00000184, 0x000700f5, 0x0000001f, 0x00000188, 0x0000017d, 0x0000017f, 0x00000187, 0x00000183,
+ 0x000300f7, 0x0000018a, 0x00000000, 0x000400fa, 0x00000188, 0x00000189, 0x0000018a, 0x000200f8,
+ 0x00000189, 0x00050082, 0x00000006, 0x0000018e, 0x000000c1, 0x00000045, 0x00050080, 0x00000006,
+ 0x000003db, 0x0000018e, 0x000003be, 0x0004007c, 0x00000008, 0x000003dc, 0x000003db, 0x00050080,
+ 0x00000008, 0x00000197, 0x00000156, 0x000003dc, 0x00060041, 0x000000a4, 0x00000198, 0x0000009a,
+ 0x00000031, 0x00000197, 0x0004003d, 0x00000008, 0x00000199, 0x00000198, 0x000500c7, 0x00000008,
+ 0x0000019a, 0x00000199, 0x0000017a, 0x000500ab, 0x0000001f, 0x0000019b, 0x0000019a, 0x00000032,
+ 0x000200f9, 0x0000018a, 0x000200f8, 0x0000018a, 0x000700f5, 0x0000001f, 0x0000019c, 0x00000188,
+ 0x00000184, 0x0000019b, 0x00000189, 0x00060041, 0x00000124, 0x0000019d, 0x00000030, 0x00000045,
+ 0x00000032, 0x0004003d, 0x00000008, 0x0000019e, 0x0000019d, 0x00050080, 0x00000008, 0x000001a0,
+ 0x0000019e, 0x000003a3, 0x000300f7, 0x000001a5, 0x00000000, 0x000400fa, 0x0000019c, 0x000001a4,
+ 0x000001b5, 0x000200f8, 0x000001a4, 0x00060041, 0x00000124, 0x000001a7, 0x00000030, 0x00000129,
+ 0x00000032, 0x0004003d, 0x00000008, 0x000001a8, 0x000001a7, 0x00050080, 0x00000008, 0x000001aa,
+ 0x000001a8, 0x000003a3, 0x00060041, 0x0000012e, 0x000001ab, 0x00000123, 0x00000031, 0x000001aa,
+ 0x0004003d, 0x0000002c, 0x000001ac, 0x000001ab, 0x00050085, 0x0000002c, 0x000001ad, 0x000001a6,
+ 0x000001ac, 0x00060041, 0x0000012e, 0x000001b2, 0x00000123, 0x00000031, 0x000001a0, 0x0004003d,
+ 0x0000002c, 0x000001b3, 0x000001b2, 0x00050083, 0x0000002c, 0x000001b4, 0x000001ad, 0x000001b3,
+ 0x000200f9, 0x000001a5, 0x000200f8, 0x000001b5, 0x00060041, 0x00000124, 0x000001b6, 0x00000030,
+ 0x00000129, 0x00000032, 0x0004003d, 0x00000008, 0x000001b7, 0x000001b6, 0x00050080, 0x00000008,
+ 0x000001b9, 0x000001b7, 0x000003a3, 0x00060041, 0x0000012e, 0x000001ba, 0x00000123, 0x00000031,
+ 0x000001b9, 0x0004003d, 0x0000002c, 0x000001bb, 0x000001ba, 0x000200f9, 0x000001a5, 0x000200f8,
+ 0x000001a5, 0x000700f5, 0x0000002c, 0x000005dd, 0x000001b4, 0x000001a4, 0x000001bb, 0x000001b5,
+ 0x00060041, 0x0000012e, 0x000001bd, 0x00000123, 0x00000031, 0x000001a0, 0x0003003e, 0x000001bd,
+ 0x000005dd, 0x000200f9, 0x00000180, 0x000200f8, 0x00000180, 0x000300f7, 0x000001c0, 0x00000000,
+ 0x000400fa, 0x000000e4, 0x000001bf, 0x000001c0, 0x000200f8, 0x000001bf, 0x000300f7, 0x000001c4,
+ 0x00000000, 0x000400fa, 0x0000017d, 0x000001c3, 0x000001c4, 0x000200f8, 0x000001c3, 0x000500ad,
+ 0x0000001f, 0x000001c7, 0x000000fe, 0x00000031, 0x000200f9, 0x000001c4, 0x000200f8, 0x000001c4,
+ 0x000700f5, 0x0000001f, 0x000001c8, 0x0000017d, 0x000001bf, 0x000001c7, 0x000001c3, 0x000300f7,
+ 0x000001ca, 0x00000000, 0x000400fa, 0x000001c8, 0x000001c9, 0x000001ca, 0x000200f8, 0x000001c9,
+ 0x00050082, 0x00000006, 0x000001ce, 0x000000fe, 0x00000045, 0x00050080, 0x00000006, 0x000003e7,
+ 0x000001ce, 0x0000039f, 0x00050084, 0x00000006, 0x000003e8, 0x000000b8, 0x000003e7, 0x00050080,
+ 0x00000006, 0x000003e9, 0x000000c1, 0x000003e8, 0x0004007c, 0x00000008, 0x000003ea, 0x000003e9,
+ 0x00050080, 0x00000008, 0x000001d7, 0x00000156, 0x000003ea, 0x00060041, 0x000000a4, 0x000001d8,
+ 0x0000009a, 0x00000031, 0x000001d7, 0x0004003d, 0x00000008, 0x000001d9, 0x000001d8, 0x000500c7,
+ 0x00000008, 0x000001da, 0x000001d9, 0x0000017a, 0x000500ab, 0x0000001f, 0x000001db, 0x000001da,
+ 0x00000032, 0x000200f9, 0x000001ca, 0x000200f8, 0x000001ca, 0x000700f5, 0x0000001f, 0x000001dc,
+ 0x000001c8, 0x000001c4, 0x000001db, 0x000001c9, 0x00060041, 0x00000124, 0x000001dd, 0x00000030,
+ 0x00000045, 0x00000037, 0x0004003d, 0x00000008, 0x000001de, 0x000001dd, 0x00050080, 0x00000008,
+ 0x000001e0, 0x000001de, 0x000003b2, 0x000300f7, 0x000001e4, 0x00000000, 0x000400fa, 0x000001dc,
+ 0x000001e3, 0x000001f3, 0x000200f8, 0x000001e3, 0x00060041, 0x00000124, 0x000001e5, 0x00000030,
+ 0x00000129, 0x00000037, 0x0004003d, 0x00000008, 0x000001e6, 0x000001e5, 0x00050080, 0x00000008,
+ 0x000001e8, 0x000001e6, 0x000003b2, 0x00060041, 0x0000012e, 0x000001e9, 0x00000123, 0x00000031,
+ 0x000001e8, 0x0004003d, 0x0000002c, 0x000001ea, 0x000001e9, 0x00050085, 0x0000002c, 0x000001eb,
+ 0x000001a6, 0x000001ea, 0x00060041, 0x0000012e, 0x000001f0, 0x00000123, 0x00000031, 0x000001e0,
+ 0x0004003d, 0x0000002c, 0x000001f1, 0x000001f0, 0x00050083, 0x0000002c, 0x000001f2, 0x000001eb,
+ 0x000001f1, 0x000200f9, 0x000001e4, 0x000200f8, 0x000001f3, 0x00060041, 0x00000124, 0x000001f4,
+ 0x00000030, 0x00000129, 0x00000037, 0x0004003d, 0x00000008, 0x000001f5, 0x000001f4, 0x00050080,
+ 0x00000008, 0x000001f7, 0x000001f5, 0x000003b2, 0x00060041, 0x0000012e, 0x000001f8, 0x00000123,
+ 0x00000031, 0x000001f7, 0x0004003d, 0x0000002c, 0x000001f9, 0x000001f8, 0x000200f9, 0x000001e4,
+ 0x000200f8, 0x000001e4, 0x000700f5, 0x0000002c, 0x000005de, 0x000001f2, 0x000001e3, 0x000001f9,
+ 0x000001f3, 0x00060041, 0x0000012e, 0x000001fb, 0x00000123, 0x00000031, 0x000001e0, 0x0003003e,
+ 0x000001fb, 0x000005de, 0x000200f9, 0x000001c0, 0x000200f8, 0x000001c0, 0x000300f7, 0x000001fe,
+ 0x00000000, 0x000400fa, 0x000000f7, 0x000001fd, 0x000001fe, 0x000200f8, 0x000001fd, 0x000300f7,
+ 0x00000202, 0x00000000, 0x000400fa, 0x0000017d, 0x00000201, 0x00000202, 0x000200f8, 0x00000201,
+ 0x000500ad, 0x0000001f, 0x00000205, 0x00000101, 0x00000031, 0x000200f9, 0x00000202, 0x000200f8,
+ 0x00000202, 0x000700f5, 0x0000001f, 0x00000206, 0x0000017d, 0x000001fd, 0x00000205, 0x00000201,
+ 0x000300f7, 0x00000208, 0x00000000, 0x000400fa, 0x00000206, 0x00000207, 0x00000208, 0x000200f8,
+ 0x00000207, 0x00050082, 0x00000006, 0x0000020c, 0x00000101, 0x00000045, 0x00050084, 0x00000006,
+ 0x000003f4, 0x000000bb, 0x0000020c, 0x00050080, 0x00000006, 0x000003f5, 0x000000fe, 0x000003f4,
+ 0x00050084, 0x00000006, 0x000003f6, 0x000000b8, 0x000003f5, 0x00050080, 0x00000006, 0x000003f7,
+ 0x000000c1, 0x000003f6, 0x0004007c, 0x00000008, 0x000003f8, 0x000003f7, 0x00050080, 0x00000008,
+ 0x00000215, 0x00000156, 0x000003f8, 0x00060041, 0x000000a4, 0x00000216, 0x0000009a, 0x00000031,
+ 0x00000215, 0x0004003d, 0x00000008, 0x00000217, 0x00000216, 0x000500c7, 0x00000008, 0x00000218,
+ 0x00000217, 0x0000017a, 0x000500ab, 0x0000001f, 0x00000219, 0x00000218, 0x00000032, 0x000200f9,
+ 0x00000208, 0x000200f8, 0x00000208, 0x000700f5, 0x0000001f, 0x0000021a, 0x00000206, 0x00000202,
+ 0x00000219, 0x00000207, 0x00060041, 0x00000124, 0x0000021b, 0x00000030, 0x00000045, 0x00000088,
+ 0x0004003d, 0x00000008, 0x0000021c, 0x0000021b, 0x00050080, 0x00000008, 0x0000021e, 0x0000021c,
+ 0x000003c0, 0x000300f7, 0x00000222, 0x00000000, 0x000400fa, 0x0000021a, 0x00000221, 0x00000231,
+ 0x000200f8, 0x00000221, 0x00060041, 0x00000124, 0x00000223, 0x00000030, 0x00000129, 0x00000088,
+ 0x0004003d, 0x00000008, 0x00000224, 0x00000223, 0x00050080, 0x00000008, 0x00000226, 0x00000224,
+ 0x000003c0, 0x00060041, 0x0000012e, 0x00000227, 0x00000123, 0x00000031, 0x00000226, 0x0004003d,
+ 0x0000002c, 0x00000228, 0x00000227, 0x00050085, 0x0000002c, 0x00000229, 0x000001a6, 0x00000228,
+ 0x00060041, 0x0000012e, 0x0000022e, 0x00000123, 0x00000031, 0x0000021e, 0x0004003d, 0x0000002c,
+ 0x0000022f, 0x0000022e, 0x00050083, 0x0000002c, 0x00000230, 0x00000229, 0x0000022f, 0x000200f9,
+ 0x00000222, 0x000200f8, 0x00000231, 0x00060041, 0x00000124, 0x00000232, 0x00000030, 0x00000129,
+ 0x00000088, 0x0004003d, 0x00000008, 0x00000233, 0x00000232, 0x00050080, 0x00000008, 0x00000235,
+ 0x00000233, 0x000003c0, 0x00060041, 0x0000012e, 0x00000236, 0x00000123, 0x00000031, 0x00000235,
+ 0x0004003d, 0x0000002c, 0x00000237, 0x00000236, 0x000200f9, 0x00000222, 0x000200f8, 0x00000222,
+ 0x000700f5, 0x0000002c, 0x000005df, 0x00000230, 0x00000221, 0x00000237, 0x00000231, 0x00060041,
+ 0x0000012e, 0x00000239, 0x00000123, 0x00000031, 0x0000021e, 0x0003003e, 0x00000239, 0x000005df,
+ 0x000200f9, 0x000001fe, 0x000200f8, 0x000001fe, 0x000200f9, 0x00000152, 0x000200f8, 0x0000023a,
+ 0x000500aa, 0x0000001f, 0x0000023c, 0x000000ad, 0x00000129, 0x000300f7, 0x0000023e, 0x00000000,
+ 0x000400fa, 0x0000023c, 0x0000023d, 0x0000027a, 0x000200f8, 0x0000023d, 0x00060041, 0x00000241,
+ 0x00000242, 0x00000030, 0x00000240, 0x00000032, 0x0004003d, 0x0000002c, 0x00000243, 0x00000242,
+ 0x000300f7, 0x00000246, 0x00000000, 0x000400fa, 0x000000d1, 0x00000245, 0x00000246, 0x000200f8,
+ 0x00000245, 0x00060041, 0x00000124, 0x00000247, 0x00000030, 0x00000045, 0x00000032, 0x0004003d,
+ 0x00000008, 0x00000248, 0x00000247, 0x00050080, 0x00000008, 0x0000024a, 0x00000248, 0x000003a3,
+ 0x00060041, 0x0000012e, 0x0000024f, 0x00000123, 0x00000031, 0x0000024a, 0x0004003d, 0x0000002c,
+ 0x00000250, 0x0000024f, 0x0004007f, 0x0000002c, 0x00000252, 0x00000243, 0x0008000c, 0x0000002c,
+ 0x00000254, 0x00000001, 0x0000002b, 0x00000250, 0x00000252, 0x00000243, 0x0003003e, 0x0000024f,
+ 0x00000254, 0x000200f9, 0x00000246, 0x000200f8, 0x00000246, 0x000300f7, 0x00000258, 0x00000000,
+ 0x000400fa, 0x000000e4, 0x00000257, 0x00000258, 0x000200f8, 0x00000257, 0x00060041, 0x00000124,
+ 0x00000259, 0x00000030, 0x00000045, 0x00000037, 0x0004003d, 0x00000008, 0x0000025a, 0x00000259,
+ 0x00050080, 0x00000008, 0x0000025c, 0x0000025a, 0x000003b2, 0x00060041, 0x0000012e, 0x00000261,
+ 0x00000123, 0x00000031, 0x0000025c, 0x0004003d, 0x0000002c, 0x00000262, 0x00000261, 0x0004007f,
+ 0x0000002c, 0x00000264, 0x00000243, 0x0008000c, 0x0000002c, 0x00000266, 0x00000001, 0x0000002b,
+ 0x00000262, 0x00000264, 0x00000243, 0x0003003e, 0x00000261, 0x00000266, 0x000200f9, 0x00000258,
+ 0x000200f8, 0x00000258, 0x000300f7, 0x0000026a, 0x00000000, 0x000400fa, 0x000000f7, 0x00000269,
+ 0x0000026a, 0x000200f8, 0x00000269, 0x00060041, 0x00000124, 0x0000026b, 0x00000030, 0x00000045,
+ 0x00000088, 0x0004003d, 0x00000008, 0x0000026c, 0x0000026b, 0x00050080, 0x00000008, 0x0000026e,
+ 0x0000026c, 0x000003c0, 0x00060041, 0x0000012e, 0x00000273, 0x00000123, 0x00000031, 0x0000026e,
+ 0x0004003d, 0x0000002c, 0x00000274, 0x00000273, 0x0004007f, 0x0000002c, 0x00000276, 0x00000243,
+ 0x0008000c, 0x0000002c, 0x00000278, 0x00000001, 0x0000002b, 0x00000274, 0x00000276, 0x00000243,
+ 0x0003003e, 0x00000273, 0x00000278, 0x000200f9, 0x0000026a, 0x000200f8, 0x0000026a, 0x000200f9,
+ 0x0000023e, 0x000200f8, 0x0000027a, 0x000500aa, 0x0000001f, 0x0000027c, 0x000000ad, 0x00000154,
+ 0x000300f7, 0x0000027e, 0x00000000, 0x000400fa, 0x0000027c, 0x0000027d, 0x0000030b, 0x000200f8,
+ 0x0000027d, 0x00060041, 0x00000124, 0x00000280, 0x00000030, 0x00000154, 0x00000032, 0x0004003d,
+ 0x00000008, 0x00000281, 0x00000280, 0x00060041, 0x00000124, 0x00000283, 0x00000030, 0x00000154,
+ 0x00000037, 0x0004003d, 0x00000008, 0x00000284, 0x00000283, 0x000500ab, 0x0000001f, 0x00000285,
+ 0x00000284, 0x00000032, 0x000300f7, 0x00000288, 0x00000000, 0x000400fa, 0x000000d1, 0x00000287,
+ 0x00000288, 0x000200f8, 0x00000287, 0x00050082, 0x00000006, 0x0000028b, 0x000000c1, 0x00000045,
+ 0x000300f7, 0x0000042e, 0x00000000, 0x000300fb, 0x00000032, 0x00000400, 0x000200f8, 0x00000400,
+ 0x000500b1, 0x0000001f, 0x00000402, 0x0000028b, 0x00000031, 0x000500b1, 0x0000001f, 0x00000404,
+ 0x000000fe, 0x00000031, 0x000500a6, 0x0000001f, 0x00000405, 0x00000402, 0x00000404, 0x000400a8,
+ 0x0000001f, 0x00000406, 0x00000405, 0x000300f7, 0x0000040c, 0x00000000, 0x000400fa, 0x00000406,
+ 0x00000407, 0x0000040c, 0x000200f8, 0x00000407, 0x000500af, 0x0000001f, 0x0000040b, 0x0000028b,
+ 0x000000b8, 0x000200f9, 0x0000040c, 0x000200f8, 0x0000040c, 0x000700f5, 0x0000001f, 0x0000040d,
+ 0x00000405, 0x00000400, 0x0000040b, 0x00000407, 0x000400a8, 0x0000001f, 0x0000040e, 0x0000040d,
+ 0x000300f7, 0x00000414, 0x00000000, 0x000400fa, 0x0000040e, 0x0000040f, 0x00000414, 0x000200f8,
+ 0x0000040f, 0x000500af, 0x0000001f, 0x00000413, 0x000000fe, 0x000000bb, 0x000200f9, 0x00000414,
+ 0x000200f8, 0x00000414, 0x000700f5, 0x0000001f, 0x00000415, 0x0000040d, 0x0000040c, 0x00000413,
+ 0x0000040f, 0x000400a8, 0x0000001f, 0x00000416, 0x00000415, 0x000300f7, 0x0000041c, 0x00000000,
+ 0x000400fa, 0x00000416, 0x00000417, 0x0000041c, 0x000200f8, 0x00000417, 0x000500af, 0x0000001f,
+ 0x0000041b, 0x00000101, 0x000000be, 0x000200f9, 0x0000041c, 0x000200f8, 0x0000041c, 0x000700f5,
+ 0x0000001f, 0x0000041d, 0x00000415, 0x00000414, 0x0000041b, 0x00000417, 0x000300f7, 0x0000041f,
+ 0x00000000, 0x000400fa, 0x0000041d, 0x0000041e, 0x0000041f, 0x000200f8, 0x0000041e, 0x000200f9,
+ 0x0000042e, 0x000200f8, 0x0000041f, 0x000500b1, 0x0000001f, 0x00000421, 0x00000101, 0x00000031,
+ 0x000300f7, 0x00000424, 0x00000000, 0x000400fa, 0x00000421, 0x00000422, 0x00000424, 0x000200f8,
+ 0x00000422, 0x000200f9, 0x0000042e, 0x000200f8, 0x00000424, 0x00050080, 0x00000006, 0x0000043c,
+ 0x0000028b, 0x000003be, 0x0004007c, 0x00000008, 0x0000043d, 0x0000043c, 0x00050080, 0x00000008,
+ 0x0000042a, 0x00000281, 0x0000043d, 0x00060041, 0x000000a4, 0x0000042b, 0x0000009a, 0x00000031,
+ 0x0000042a, 0x0004003d, 0x00000008, 0x0000042c, 0x0000042b, 0x000500ab, 0x0000001f, 0x0000042d,
+ 0x0000042c, 0x00000032, 0x000200f9, 0x0000042e, 0x000200f8, 0x0000042e, 0x000900f5, 0x0000001f,
+ 0x000005d7, 0x0000008f, 0x0000041e, 0x00000285, 0x00000422, 0x0000042d, 0x00000424, 0x000400a8,
+ 0x0000001f, 0x00000298, 0x000005d7, 0x000300f7, 0x0000029a, 0x00000000, 0x000400fa, 0x00000298,
+ 0x00000299, 0x0000029a, 0x000200f8, 0x00000299, 0x000300f7, 0x00000473, 0x00000000, 0x000300fb,
+ 0x00000032, 0x00000445, 0x000200f8, 0x00000445, 0x000500b1, 0x0000001f, 0x00000447, 0x000000c1,
+ 0x00000031, 0x000500a6, 0x0000001f, 0x0000044a, 0x00000447, 0x00000404, 0x000400a8, 0x0000001f,
+ 0x0000044b, 0x0000044a, 0x000300f7, 0x00000451, 0x00000000, 0x000400fa, 0x0000044b, 0x0000044c,
+ 0x00000451, 0x000200f8, 0x0000044c, 0x000500af, 0x0000001f, 0x00000450, 0x000000c1, 0x000000b8,
+ 0x000200f9, 0x00000451, 0x000200f8, 0x00000451, 0x000700f5, 0x0000001f, 0x00000452, 0x0000044a,
+ 0x00000445, 0x00000450, 0x0000044c, 0x000400a8, 0x0000001f, 0x00000453, 0x00000452, 0x000300f7,
+ 0x00000459, 0x00000000, 0x000400fa, 0x00000453, 0x00000454, 0x00000459, 0x000200f8, 0x00000454,
+ 0x000500af, 0x0000001f, 0x00000458, 0x000000fe, 0x000000bb, 0x000200f9, 0x00000459, 0x000200f8,
+ 0x00000459, 0x000700f5, 0x0000001f, 0x0000045a, 0x00000452, 0x00000451, 0x00000458, 0x00000454,
+ 0x000400a8, 0x0000001f, 0x0000045b, 0x0000045a, 0x000300f7, 0x00000461, 0x00000000, 0x000400fa,
+ 0x0000045b, 0x0000045c, 0x00000461, 0x000200f8, 0x0000045c, 0x000500af, 0x0000001f, 0x00000460,
+ 0x00000101, 0x000000be, 0x000200f9, 0x00000461, 0x000200f8, 0x00000461, 0x000700f5, 0x0000001f,
+ 0x00000462, 0x0000045a, 0x00000459, 0x00000460, 0x0000045c, 0x000300f7, 0x00000464, 0x00000000,
+ 0x000400fa, 0x00000462, 0x00000463, 0x00000464, 0x000200f8, 0x00000463, 0x000200f9, 0x00000473,
+ 0x000200f8, 0x00000464, 0x000500b1, 0x0000001f, 0x00000466, 0x00000101, 0x00000031, 0x000300f7,
+ 0x00000469, 0x00000000, 0x000400fa, 0x00000466, 0x00000467, 0x00000469, 0x000200f8, 0x00000467,
+ 0x000200f9, 0x00000473, 0x000200f8, 0x00000469, 0x00050080, 0x00000008, 0x0000046f, 0x00000281,
+ 0x000003c0, 0x00060041, 0x000000a4, 0x00000470, 0x0000009a, 0x00000031, 0x0000046f, 0x0004003d,
+ 0x00000008, 0x00000471, 0x00000470, 0x000500ab, 0x0000001f, 0x00000472, 0x00000471, 0x00000032,
+ 0x000200f9, 0x00000473, 0x000200f8, 0x00000473, 0x000900f5, 0x0000001f, 0x000005d8, 0x0000008f,
+ 0x00000463, 0x00000285, 0x00000467, 0x00000472, 0x00000469, 0x000200f9, 0x0000029a, 0x000200f8,
+ 0x0000029a, 0x000700f5, 0x0000001f, 0x000002a9, 0x000005d7, 0x0000042e, 0x000005d8, 0x00000473,
+ 0x000200f9, 0x00000288, 0x000200f8, 0x00000288, 0x000700f5, 0x0000001f, 0x000002aa, 0x000000d1,
+ 0x0000027d, 0x000002a9, 0x0000029a, 0x000300f7, 0x000002ac, 0x00000000, 0x000400fa, 0x000002aa,
+ 0x000002ab, 0x000002ac, 0x000200f8, 0x000002ab, 0x00060041, 0x00000124, 0x000002ad, 0x00000030,
+ 0x00000045, 0x00000032, 0x0004003d, 0x00000008, 0x000002ae, 0x000002ad, 0x00050080, 0x00000008,
+ 0x000002b0, 0x000002ae, 0x000003a3, 0x00060041, 0x0000012e, 0x000002b2, 0x00000123, 0x00000031,
+ 0x000002b0, 0x0003003e, 0x000002b2, 0x000002b1, 0x000200f9, 0x000002ac, 0x000200f8, 0x000002ac,
+ 0x000300f7, 0x000002b5, 0x00000000, 0x000400fa, 0x000000e4, 0x000002b4, 0x000002b5, 0x000200f8,
+ 0x000002b4, 0x00050082, 0x00000006, 0x000002b8, 0x000000fe, 0x00000045, 0x000300f7, 0x000004b8,
+ 0x00000000, 0x000300fb, 0x00000032, 0x0000048a, 0x000200f8, 0x0000048a, 0x000500b1, 0x0000001f,
+ 0x0000048c, 0x000000c1, 0x00000031, 0x000500b1, 0x0000001f, 0x0000048e, 0x000002b8, 0x00000031,
+ 0x000500a6, 0x0000001f, 0x0000048f, 0x0000048c, 0x0000048e, 0x000400a8, 0x0000001f, 0x00000490,
+ 0x0000048f, 0x000300f7, 0x00000496, 0x00000000, 0x000400fa, 0x00000490, 0x00000491, 0x00000496,
+ 0x000200f8, 0x00000491, 0x000500af, 0x0000001f, 0x00000495, 0x000000c1, 0x000000b8, 0x000200f9,
+ 0x00000496, 0x000200f8, 0x00000496, 0x000700f5, 0x0000001f, 0x00000497, 0x0000048f, 0x0000048a,
+ 0x00000495, 0x00000491, 0x000400a8, 0x0000001f, 0x00000498, 0x00000497, 0x000300f7, 0x0000049e,
+ 0x00000000, 0x000400fa, 0x00000498, 0x00000499, 0x0000049e, 0x000200f8, 0x00000499, 0x000500af,
+ 0x0000001f, 0x0000049d, 0x000002b8, 0x000000bb, 0x000200f9, 0x0000049e, 0x000200f8, 0x0000049e,
+ 0x000700f5, 0x0000001f, 0x0000049f, 0x00000497, 0x00000496, 0x0000049d, 0x00000499, 0x000400a8,
+ 0x0000001f, 0x000004a0, 0x0000049f, 0x000300f7, 0x000004a6, 0x00000000, 0x000400fa, 0x000004a0,
+ 0x000004a1, 0x000004a6, 0x000200f8, 0x000004a1, 0x000500af, 0x0000001f, 0x000004a5, 0x00000101,
+ 0x000000be, 0x000200f9, 0x000004a6, 0x000200f8, 0x000004a6, 0x000700f5, 0x0000001f, 0x000004a7,
+ 0x0000049f, 0x0000049e, 0x000004a5, 0x000004a1, 0x000300f7, 0x000004a9, 0x00000000, 0x000400fa,
+ 0x000004a7, 0x000004a8, 0x000004a9, 0x000200f8, 0x000004a8, 0x000200f9, 0x000004b8, 0x000200f8,
+ 0x000004a9, 0x000500b1, 0x0000001f, 0x000004ab, 0x00000101, 0x00000031, 0x000300f7, 0x000004ae,
+ 0x00000000, 0x000400fa, 0x000004ab, 0x000004ac, 0x000004ae, 0x000200f8, 0x000004ac, 0x000200f9,
+ 0x000004b8, 0x000200f8, 0x000004ae, 0x00050080, 0x00000006, 0x000004c4, 0x000002b8, 0x0000039f,
+ 0x00050084, 0x00000006, 0x000004c5, 0x000000b8, 0x000004c4, 0x00050080, 0x00000006, 0x000004c6,
+ 0x000000c1, 0x000004c5, 0x0004007c, 0x00000008, 0x000004c7, 0x000004c6, 0x00050080, 0x00000008,
+ 0x000004b4, 0x00000281, 0x000004c7, 0x00060041, 0x000000a4, 0x000004b5, 0x0000009a, 0x00000031,
+ 0x000004b4, 0x0004003d, 0x00000008, 0x000004b6, 0x000004b5, 0x000500ab, 0x0000001f, 0x000004b7,
+ 0x000004b6, 0x00000032, 0x000200f9, 0x000004b8, 0x000200f8, 0x000004b8, 0x000900f5, 0x0000001f,
+ 0x000005d9, 0x0000008f, 0x000004a8, 0x00000285, 0x000004ac, 0x000004b7, 0x000004ae, 0x000400a8,
+ 0x0000001f, 0x000002c5, 0x000005d9, 0x000300f7, 0x000002c7, 0x00000000, 0x000400fa, 0x000002c5,
+ 0x000002c6, 0x000002c7, 0x000200f8, 0x000002c6, 0x000300f7, 0x000004fd, 0x00000000, 0x000300fb,
+ 0x00000032, 0x000004cf, 0x000200f8, 0x000004cf, 0x000500b1, 0x0000001f, 0x000004d3, 0x000000fe,
+ 0x00000031, 0x000500a6, 0x0000001f, 0x000004d4, 0x0000048c, 0x000004d3, 0x000400a8, 0x0000001f,
+ 0x000004d5, 0x000004d4, 0x000300f7, 0x000004db, 0x00000000, 0x000400fa, 0x000004d5, 0x000004d6,
+ 0x000004db, 0x000200f8, 0x000004d6, 0x000500af, 0x0000001f, 0x000004da, 0x000000c1, 0x000000b8,
+ 0x000200f9, 0x000004db, 0x000200f8, 0x000004db, 0x000700f5, 0x0000001f, 0x000004dc, 0x000004d4,
+ 0x000004cf, 0x000004da, 0x000004d6, 0x000400a8, 0x0000001f, 0x000004dd, 0x000004dc, 0x000300f7,
+ 0x000004e3, 0x00000000, 0x000400fa, 0x000004dd, 0x000004de, 0x000004e3, 0x000200f8, 0x000004de,
+ 0x000500af, 0x0000001f, 0x000004e2, 0x000000fe, 0x000000bb, 0x000200f9, 0x000004e3, 0x000200f8,
+ 0x000004e3, 0x000700f5, 0x0000001f, 0x000004e4, 0x000004dc, 0x000004db, 0x000004e2, 0x000004de,
+ 0x000400a8, 0x0000001f, 0x000004e5, 0x000004e4, 0x000300f7, 0x000004eb, 0x00000000, 0x000400fa,
+ 0x000004e5, 0x000004e6, 0x000004eb, 0x000200f8, 0x000004e6, 0x000500af, 0x0000001f, 0x000004ea,
+ 0x00000101, 0x000000be, 0x000200f9, 0x000004eb, 0x000200f8, 0x000004eb, 0x000700f5, 0x0000001f,
+ 0x000004ec, 0x000004e4, 0x000004e3, 0x000004ea, 0x000004e6, 0x000300f7, 0x000004ee, 0x00000000,
+ 0x000400fa, 0x000004ec, 0x000004ed, 0x000004ee, 0x000200f8, 0x000004ed, 0x000200f9, 0x000004fd,
+ 0x000200f8, 0x000004ee, 0x000500b1, 0x0000001f, 0x000004f0, 0x00000101, 0x00000031, 0x000300f7,
+ 0x000004f3, 0x00000000, 0x000400fa, 0x000004f0, 0x000004f1, 0x000004f3, 0x000200f8, 0x000004f1,
+ 0x000200f9, 0x000004fd, 0x000200f8, 0x000004f3, 0x00050080, 0x00000008, 0x000004f9, 0x00000281,
+ 0x000003c0, 0x00060041, 0x000000a4, 0x000004fa, 0x0000009a, 0x00000031, 0x000004f9, 0x0004003d,
+ 0x00000008, 0x000004fb, 0x000004fa, 0x000500ab, 0x0000001f, 0x000004fc, 0x000004fb, 0x00000032,
+ 0x000200f9, 0x000004fd, 0x000200f8, 0x000004fd, 0x000900f5, 0x0000001f, 0x000005da, 0x0000008f,
+ 0x000004ed, 0x00000285, 0x000004f1, 0x000004fc, 0x000004f3, 0x000200f9, 0x000002c7, 0x000200f8,
+ 0x000002c7, 0x000700f5, 0x0000001f, 0x000002d6, 0x000005d9, 0x000004b8, 0x000005da, 0x000004fd,
+ 0x000200f9, 0x000002b5, 0x000200f8, 0x000002b5, 0x000700f5, 0x0000001f, 0x000002d7, 0x000000e4,
+ 0x000002ac, 0x000002d6, 0x000002c7, 0x000300f7, 0x000002d9, 0x00000000, 0x000400fa, 0x000002d7,
+ 0x000002d8, 0x000002d9, 0x000200f8, 0x000002d8, 0x00060041, 0x00000124, 0x000002da, 0x00000030,
+ 0x00000045, 0x00000037, 0x0004003d, 0x00000008, 0x000002db, 0x000002da, 0x00050080, 0x00000008,
+ 0x000002dd, 0x000002db, 0x000003b2, 0x00060041, 0x0000012e, 0x000002de, 0x00000123, 0x00000031,
+ 0x000002dd, 0x0003003e, 0x000002de, 0x000002b1, 0x000200f9, 0x000002d9, 0x000200f8, 0x000002d9,
+ 0x000300f7, 0x000002e1, 0x00000000, 0x000400fa, 0x000000f7, 0x000002e0, 0x000002e1, 0x000200f8,
+ 0x000002e0, 0x00050082, 0x00000006, 0x000002e4, 0x00000101, 0x00000045, 0x000300f7, 0x00000542,
+ 0x00000000, 0x000300fb, 0x00000032, 0x00000514, 0x000200f8, 0x00000514, 0x000500b1, 0x0000001f,
+ 0x00000516, 0x000000c1, 0x00000031, 0x000500b1, 0x0000001f, 0x00000518, 0x000000fe, 0x00000031,
+ 0x000500a6, 0x0000001f, 0x00000519, 0x00000516, 0x00000518, 0x000400a8, 0x0000001f, 0x0000051a,
+ 0x00000519, 0x000300f7, 0x00000520, 0x00000000, 0x000400fa, 0x0000051a, 0x0000051b, 0x00000520,
+ 0x000200f8, 0x0000051b, 0x000500af, 0x0000001f, 0x0000051f, 0x000000c1, 0x000000b8, 0x000200f9,
+ 0x00000520, 0x000200f8, 0x00000520, 0x000700f5, 0x0000001f, 0x00000521, 0x00000519, 0x00000514,
+ 0x0000051f, 0x0000051b, 0x000400a8, 0x0000001f, 0x00000522, 0x00000521, 0x000300f7, 0x00000528,
+ 0x00000000, 0x000400fa, 0x00000522, 0x00000523, 0x00000528, 0x000200f8, 0x00000523, 0x000500af,
+ 0x0000001f, 0x00000527, 0x000000fe, 0x000000bb, 0x000200f9, 0x00000528, 0x000200f8, 0x00000528,
+ 0x000700f5, 0x0000001f, 0x00000529, 0x00000521, 0x00000520, 0x00000527, 0x00000523, 0x000400a8,
+ 0x0000001f, 0x0000052a, 0x00000529, 0x000300f7, 0x00000530, 0x00000000, 0x000400fa, 0x0000052a,
+ 0x0000052b, 0x00000530, 0x000200f8, 0x0000052b, 0x000500af, 0x0000001f, 0x0000052f, 0x000002e4,
+ 0x000000be, 0x000200f9, 0x00000530, 0x000200f8, 0x00000530, 0x000700f5, 0x0000001f, 0x00000531,
+ 0x00000529, 0x00000528, 0x0000052f, 0x0000052b, 0x000300f7, 0x00000533, 0x00000000, 0x000400fa,
+ 0x00000531, 0x00000532, 0x00000533, 0x000200f8, 0x00000532, 0x000200f9, 0x00000542, 0x000200f8,
+ 0x00000533, 0x000500b1, 0x0000001f, 0x00000535, 0x000002e4, 0x00000031, 0x000300f7, 0x00000538,
+ 0x00000000, 0x000400fa, 0x00000535, 0x00000536, 0x00000538, 0x000200f8, 0x00000536, 0x000200f9,
+ 0x00000542, 0x000200f8, 0x00000538, 0x00050084, 0x00000006, 0x0000054d, 0x000000bb, 0x000002e4,
+ 0x00050080, 0x00000006, 0x0000054e, 0x000000fe, 0x0000054d, 0x00050084, 0x00000006, 0x0000054f,
+ 0x000000b8, 0x0000054e, 0x00050080, 0x00000006, 0x00000550, 0x000000c1, 0x0000054f, 0x0004007c,
+ 0x00000008, 0x00000551, 0x00000550, 0x00050080, 0x00000008, 0x0000053e, 0x00000281, 0x00000551,
+ 0x00060041, 0x000000a4, 0x0000053f, 0x0000009a, 0x00000031, 0x0000053e, 0x0004003d, 0x00000008,
+ 0x00000540, 0x0000053f, 0x000500ab, 0x0000001f, 0x00000541, 0x00000540, 0x00000032, 0x000200f9,
+ 0x00000542, 0x000200f8, 0x00000542, 0x000900f5, 0x0000001f, 0x000005db, 0x0000008f, 0x00000532,
+ 0x00000285, 0x00000536, 0x00000541, 0x00000538, 0x000400a8, 0x0000001f, 0x000002f1, 0x000005db,
+ 0x000300f7, 0x000002f3, 0x00000000, 0x000400fa, 0x000002f1, 0x000002f2, 0x000002f3, 0x000200f8,
+ 0x000002f2, 0x000300f7, 0x00000587, 0x00000000, 0x000300fb, 0x00000032, 0x00000559, 0x000200f8,
+ 0x00000559, 0x000300f7, 0x00000565, 0x00000000, 0x000400fa, 0x0000051a, 0x00000560, 0x00000565,
+ 0x000200f8, 0x00000560, 0x000500af, 0x0000001f, 0x00000564, 0x000000c1, 0x000000b8, 0x000200f9,
+ 0x00000565, 0x000200f8, 0x00000565, 0x000700f5, 0x0000001f, 0x00000566, 0x00000519, 0x00000559,
+ 0x00000564, 0x00000560, 0x000400a8, 0x0000001f, 0x00000567, 0x00000566, 0x000300f7, 0x0000056d,
+ 0x00000000, 0x000400fa, 0x00000567, 0x00000568, 0x0000056d, 0x000200f8, 0x00000568, 0x000500af,
+ 0x0000001f, 0x0000056c, 0x000000fe, 0x000000bb, 0x000200f9, 0x0000056d, 0x000200f8, 0x0000056d,
+ 0x000700f5, 0x0000001f, 0x0000056e, 0x00000566, 0x00000565, 0x0000056c, 0x00000568, 0x000400a8,
+ 0x0000001f, 0x0000056f, 0x0000056e, 0x000300f7, 0x00000575, 0x00000000, 0x000400fa, 0x0000056f,
+ 0x00000570, 0x00000575, 0x000200f8, 0x00000570, 0x000500af, 0x0000001f, 0x00000574, 0x00000101,
+ 0x000000be, 0x000200f9, 0x00000575, 0x000200f8, 0x00000575, 0x000700f5, 0x0000001f, 0x00000576,
+ 0x0000056e, 0x0000056d, 0x00000574, 0x00000570, 0x000300f7, 0x00000578, 0x00000000, 0x000400fa,
+ 0x00000576, 0x00000577, 0x00000578, 0x000200f8, 0x00000577, 0x000200f9, 0x00000587, 0x000200f8,
+ 0x00000578, 0x000500b1, 0x0000001f, 0x0000057a, 0x00000101, 0x00000031, 0x000300f7, 0x0000057d,
+ 0x00000000, 0x000400fa, 0x0000057a, 0x0000057b, 0x0000057d, 0x000200f8, 0x0000057b, 0x000200f9,
+ 0x00000587, 0x000200f8, 0x0000057d, 0x00050080, 0x00000008, 0x00000583, 0x00000281, 0x000003c0,
+ 0x00060041, 0x000000a4, 0x00000584, 0x0000009a, 0x00000031, 0x00000583, 0x0004003d, 0x00000008,
+ 0x00000585, 0x00000584, 0x000500ab, 0x0000001f, 0x00000586, 0x00000585, 0x00000032, 0x000200f9,
+ 0x00000587, 0x000200f8, 0x00000587, 0x000900f5, 0x0000001f, 0x000005dc, 0x0000008f, 0x00000577,
+ 0x00000285, 0x0000057b, 0x00000586, 0x0000057d, 0x000200f9, 0x000002f3, 0x000200f8, 0x000002f3,
+ 0x000700f5, 0x0000001f, 0x00000302, 0x000005db, 0x00000542, 0x000005dc, 0x00000587, 0x000200f9,
+ 0x000002e1, 0x000200f8, 0x000002e1, 0x000700f5, 0x0000001f, 0x00000303, 0x000000f7, 0x000002d9,
+ 0x00000302, 0x000002f3, 0x000300f7, 0x00000305, 0x00000000, 0x000400fa, 0x00000303, 0x00000304,
+ 0x00000305, 0x000200f8, 0x00000304, 0x00060041, 0x00000124, 0x00000306, 0x00000030, 0x00000045,
+ 0x00000088, 0x0004003d, 0x00000008, 0x00000307, 0x00000306, 0x00050080, 0x00000008, 0x00000309,
+ 0x00000307, 0x000003c0, 0x00060041, 0x0000012e, 0x0000030a, 0x00000123, 0x00000031, 0x00000309,
+ 0x0003003e, 0x0000030a, 0x000002b1, 0x000200f9, 0x00000305, 0x000200f8, 0x00000305, 0x000200f9,
+ 0x0000027e, 0x000200f8, 0x0000030b, 0x000500aa, 0x0000001f, 0x0000030d, 0x000000ad, 0x00000240,
+ 0x000300f7, 0x0000030f, 0x00000000, 0x000400fa, 0x0000030d, 0x0000030e, 0x0000030f, 0x000200f8,
+ 0x0000030e, 0x000300f7, 0x00000313, 0x00000000, 0x000400fa, 0x000000d1, 0x00000312, 0x00000313,
+ 0x000200f8, 0x00000312, 0x00060041, 0x00000124, 0x00000315, 0x00000030, 0x00000045, 0x00000032,
+ 0x0004003d, 0x00000008, 0x00000316, 0x00000315, 0x00050080, 0x00000008, 0x00000318, 0x00000316,
+ 0x000003a3, 0x00060041, 0x0000012e, 0x00000319, 0x00000123, 0x00000031, 0x00000318, 0x0004003d,
+ 0x0000002c, 0x0000031a, 0x00000319, 0x0006000c, 0x0000002c, 0x0000031b, 0x00000001, 0x00000004,
+ 0x0000031a, 0x0007000c, 0x0000002c, 0x0000031c, 0x00000001, 0x00000028, 0x000002b1, 0x0000031b,
+ 0x000200f9, 0x00000313, 0x000200f8, 0x00000313, 0x000700f5, 0x0000002c, 0x000005d2, 0x000002b1,
+ 0x0000030e, 0x0000031c, 0x00000312, 0x000300f7, 0x0000031f, 0x00000000, 0x000400fa, 0x000000e4,
+ 0x0000031e, 0x0000031f, 0x000200f8, 0x0000031e, 0x00060041, 0x00000124, 0x00000321, 0x00000030,
+ 0x00000045, 0x00000037, 0x0004003d, 0x00000008, 0x00000322, 0x00000321, 0x00050080, 0x00000008,
+ 0x00000324, 0x00000322, 0x000003b2, 0x00060041, 0x0000012e, 0x00000325, 0x00000123, 0x00000031,
+ 0x00000324, 0x0004003d, 0x0000002c, 0x00000326, 0x00000325, 0x0006000c, 0x0000002c, 0x00000327,
+ 0x00000001, 0x00000004, 0x00000326, 0x0007000c, 0x0000002c, 0x00000328, 0x00000001, 0x00000028,
+ 0x000005d2, 0x00000327, 0x000200f9, 0x0000031f, 0x000200f8, 0x0000031f, 0x000700f5, 0x0000002c,
+ 0x000005d3, 0x000005d2, 0x00000313, 0x00000328, 0x0000031e, 0x000300f7, 0x0000032b, 0x00000000,
+ 0x000400fa, 0x000000f7, 0x0000032a, 0x0000032b, 0x000200f8, 0x0000032a, 0x00060041, 0x00000124,
+ 0x0000032d, 0x00000030, 0x00000045, 0x00000088, 0x0004003d, 0x00000008, 0x0000032e, 0x0000032d,
+ 0x00050080, 0x00000008, 0x00000330, 0x0000032e, 0x000003c0, 0x00060041, 0x0000012e, 0x00000331,
+ 0x00000123, 0x00000031, 0x00000330, 0x0004003d, 0x0000002c, 0x00000332, 0x00000331, 0x0006000c,
+ 0x0000002c, 0x00000333, 0x00000001, 0x00000004, 0x00000332, 0x0007000c, 0x0000002c, 0x00000334,
+ 0x00000001, 0x00000028, 0x000005d3, 0x00000333, 0x000200f9, 0x0000032b, 0x000200f8, 0x0000032b,
+ 0x000700f5, 0x0000002c, 0x000005d4, 0x000005d3, 0x0000031f, 0x00000334, 0x0000032a, 0x0004003d,
+ 0x00000008, 0x00000338, 0x00000337, 0x00050041, 0x0000033f, 0x00000340, 0x0000033c, 0x00000338,
+ 0x0003003e, 0x00000340, 0x000005d4, 0x000400e0, 0x00000088, 0x00000088, 0x00000341, 0x000200f9,
+ 0x00000344, 0x000200f8, 0x00000344, 0x000700f5, 0x00000008, 0x000005d5, 0x00000343, 0x0000032b,
+ 0x0000035c, 0x00000347, 0x000500ac, 0x0000001f, 0x0000034a, 0x000005d5, 0x00000032, 0x000400f6,
+ 0x00000346, 0x00000347, 0x00000000, 0x000400fa, 0x0000034a, 0x00000345, 0x00000346, 0x000200f8,
+ 0x00000345, 0x000500b0, 0x0000001f, 0x0000034d, 0x00000338, 0x000005d5, 0x000300f7, 0x0000034f,
+ 0x00000000, 0x000400fa, 0x0000034d, 0x0000034e, 0x0000034f, 0x000200f8, 0x0000034e, 0x0004003d,
+ 0x0000002c, 0x00000353, 0x00000340, 0x00050080, 0x00000008, 0x00000356, 0x00000338, 0x000005d5,
+ 0x00050041, 0x0000033f, 0x00000357, 0x0000033c, 0x00000356, 0x0004003d, 0x0000002c, 0x00000358,
+ 0x00000357, 0x0007000c, 0x0000002c, 0x00000359, 0x00000001, 0x00000028, 0x00000353, 0x00000358,
+ 0x0003003e, 0x00000340, 0x00000359, 0x000200f9, 0x0000034f, 0x000200f8, 0x0000034f, 0x000400e0,
+ 0x00000088, 0x00000088, 0x00000341, 0x000200f9, 0x00000347, 0x000200f8, 0x00000347, 0x000500c2,
+ 0x00000008, 0x0000035c, 0x000005d5, 0x00000045, 0x000200f9, 0x00000344, 0x000200f8, 0x00000346,
+ 0x000500aa, 0x0000001f, 0x0000035e, 0x00000338, 0x00000032, 0x000300f7, 0x00000360, 0x00000000,
+ 0x000400fa, 0x0000035e, 0x0000035f, 0x00000360, 0x000200f8, 0x0000035f, 0x0004003d, 0x000000b1,
+ 0x00000364, 0x00000363, 0x0004003d, 0x000000b1, 0x00000367, 0x00000366, 0x00060041, 0x00000124,
+ 0x0000036c, 0x00000030, 0x00000154, 0x00000088, 0x0004003d, 0x00000008, 0x0000036d, 0x0000036c,
+ 0x00050051, 0x00000008, 0x0000036f, 0x00000367, 0x00000000, 0x00050080, 0x00000008, 0x00000370,
+ 0x0000036d, 0x0000036f, 0x00050051, 0x00000008, 0x00000372, 0x00000364, 0x00000000, 0x00050051,
+ 0x00000008, 0x00000374, 0x00000367, 0x00000001, 0x00050051, 0x00000008, 0x00000376, 0x00000364,
+ 0x00000001, 0x00050051, 0x00000008, 0x00000378, 0x00000367, 0x00000002, 0x00050084, 0x00000008,
+ 0x00000379, 0x00000376, 0x00000378, 0x00050080, 0x00000008, 0x0000037a, 0x00000374, 0x00000379,
+ 0x00050084, 0x00000008, 0x0000037b, 0x00000372, 0x0000037a, 0x00050080, 0x00000008, 0x0000037c,
+ 0x00000370, 0x0000037b, 0x00050041, 0x0000033f, 0x0000037d, 0x0000033c, 0x00000031, 0x0004003d,
+ 0x0000002c, 0x0000037e, 0x0000037d, 0x00060041, 0x0000012e, 0x0000037f, 0x0000036b, 0x00000031,
+ 0x0000037c, 0x0003003e, 0x0000037f, 0x0000037e, 0x000200f9, 0x00000360, 0x000200f8, 0x00000360,
+ 0x000200f9, 0x0000030f, 0x000200f8, 0x0000030f, 0x000200f9, 0x0000027e, 0x000200f8, 0x0000027e,
+ 0x000200f9, 0x0000023e, 0x000200f8, 0x0000023e, 0x000200f9, 0x00000152, 0x000200f8, 0x00000152,
+ 0x000200f9, 0x0000011c, 0x000200f8, 0x0000011c, 0x000100fd, 0x00010038,
+};
+static const uint32_t spv_forces[] = {
+ 0x07230203, 0x00010300, 0x000d000b, 0x000018e0, 0x00000000, 0x00020011, 0x00000001, 0x0006000b,
+ 0x00000001, 0x4c534c47, 0x6474732e, 0x3035342e, 0x00000000, 0x0003000e, 0x00000000, 0x00000001,
+ 0x0006000f, 0x00000005, 0x00000004, 0x6e69616d, 0x00000000, 0x0000034c, 0x00060010, 0x00000004,
+ 0x00000011, 0x00000008, 0x00000008, 0x00000004, 0x00030047, 0x00000044, 0x00000002, 0x00050048,
+ 0x00000044, 0x00000000, 0x00000023, 0x00000000, 0x00050048, 0x00000044, 0x00000001, 0x00000023,
+ 0x00000010, 0x00050048, 0x00000044, 0x00000002, 0x00000023, 0x00000020, 0x00050048, 0x00000044,
+ 0x00000003, 0x00000023, 0x00000030, 0x00050048, 0x00000044, 0x00000004, 0x00000023, 0x00000040,
+ 0x00050048, 0x00000044, 0x00000005, 0x00000023, 0x00000050, 0x00050048, 0x00000044, 0x00000006,
+ 0x00000023, 0x00000060, 0x00040047, 0x00000085, 0x00000006, 0x00000004, 0x00030047, 0x00000086,
+ 0x00000002, 0x00050048, 0x00000086, 0x00000000, 0x00000023, 0x00000000, 0x00040047, 0x00000088,
+ 0x00000021, 0x00000002, 0x00040047, 0x00000088, 0x00000022, 0x00000000, 0x00040047, 0x000002ec,
+ 0x00000006, 0x00000004, 0x00030047, 0x000002ed, 0x00000002, 0x00050048, 0x000002ed, 0x00000000,
+ 0x00000023, 0x00000000, 0x00040047, 0x000002ef, 0x00000021, 0x00000000, 0x00040047, 0x000002ef,
+ 0x00000022, 0x00000000, 0x00040047, 0x0000034c, 0x0000000b, 0x0000001c, 0x00040047, 0x0000074a,
+ 0x0000000b, 0x00000019, 0x00020013, 0x00000002, 0x00030021, 0x00000003, 0x00000002, 0x00040015,
+ 0x00000006, 0x00000020, 0x00000001, 0x00040015, 0x00000008, 0x00000020, 0x00000000, 0x00030016,
+ 0x00000023, 0x00000020, 0x00040017, 0x00000024, 0x00000023, 0x00000003, 0x00040020, 0x0000002c,
+ 0x00000007, 0x00000024, 0x00040017, 0x00000041, 0x00000006, 0x00000004, 0x00040017, 0x00000042,
+ 0x00000008, 0x00000004, 0x00040017, 0x00000043, 0x00000023, 0x00000004, 0x0009001e, 0x00000044,
+ 0x00000041, 0x00000042, 0x00000042, 0x00000042, 0x00000043, 0x00000043, 0x00000043, 0x00040020,
+ 0x00000045, 0x00000009, 0x00000044, 0x0004003b, 0x00000045, 0x00000046, 0x00000009, 0x0004002b,
+ 0x00000006, 0x00000047, 0x00000000, 0x0004002b, 0x00000008, 0x00000048, 0x00000000, 0x00040020,
+ 0x00000049, 0x00000009, 0x00000006, 0x0004002b, 0x00000008, 0x0000004d, 0x00000001, 0x0004002b,
+ 0x00000006, 0x0000005b, 0x00000001, 0x0003001d, 0x00000085, 0x00000008, 0x0003001e, 0x00000086,
+ 0x00000085, 0x00040020, 0x00000087, 0x0000000c, 0x00000086, 0x0004003b, 0x00000087, 0x00000088,
+ 0x0000000c, 0x0004002b, 0x00000006, 0x00000089, 0x00000002, 0x0004002b, 0x00000008, 0x0000008a,
+ 0x00000002, 0x00040020, 0x0000008b, 0x00000009, 0x00000008, 0x0004002b, 0x00000008, 0x0000008f,
+ 0x000001ff, 0x00040020, 0x00000092, 0x0000000c, 0x00000008, 0x0004002b, 0x00000008, 0x0000009a,
+ 0x00000025, 0x0004002b, 0x00000006, 0x0000009e, 0x000000ff, 0x0004002b, 0x00000008, 0x000000b1,
+ 0x00000010, 0x0004001c, 0x000000b2, 0x00000024, 0x000000b1, 0x0004002b, 0x00000023, 0x000000b3,
+ 0x3f800000, 0x0004002b, 0x00000023, 0x000000b4, 0x00000000, 0x0006002c, 0x00000024, 0x000000b5,
+ 0x000000b3, 0x000000b3, 0x000000b4, 0x0004002b, 0x00000023, 0x000000b6, 0xbf800000, 0x0006002c,
+ 0x00000024, 0x000000b7, 0x000000b6, 0x000000b3, 0x000000b4, 0x0006002c, 0x00000024, 0x000000b8,
+ 0x000000b3, 0x000000b6, 0x000000b4, 0x0006002c, 0x00000024, 0x000000b9, 0x000000b6, 0x000000b6,
+ 0x000000b4, 0x0006002c, 0x00000024, 0x000000ba, 0x000000b3, 0x000000b4, 0x000000b3, 0x0006002c,
+ 0x00000024, 0x000000bb, 0x000000b6, 0x000000b4, 0x000000b3, 0x0006002c, 0x00000024, 0x000000bc,
+ 0x000000b3, 0x000000b4, 0x000000b6, 0x0006002c, 0x00000024, 0x000000bd, 0x000000b6, 0x000000b4,
+ 0x000000b6, 0x0006002c, 0x00000024, 0x000000be, 0x000000b4, 0x000000b3, 0x000000b3, 0x0006002c,
+ 0x00000024, 0x000000bf, 0x000000b4, 0x000000b6, 0x000000b3, 0x0006002c, 0x00000024, 0x000000c0,
+ 0x000000b4, 0x000000b3, 0x000000b6, 0x0006002c, 0x00000024, 0x000000c1, 0x000000b4, 0x000000b6,
+ 0x000000b6, 0x0013002c, 0x000000b2, 0x000000c2, 0x000000b5, 0x000000b7, 0x000000b8, 0x000000b9,
+ 0x000000ba, 0x000000bb, 0x000000bc, 0x000000bd, 0x000000be, 0x000000bf, 0x000000c0, 0x000000c1,
+ 0x000000b5, 0x000000b7, 0x000000bf, 0x000000c1, 0x0004002b, 0x00000008, 0x000000c4, 0x0000000f,
+ 0x00040020, 0x000000c6, 0x00000007, 0x000000b2, 0x00040017, 0x000000cf, 0x00000006, 0x00000003,
+ 0x0004002b, 0x00000023, 0x000000e0, 0x40c00000, 0x0004002b, 0x00000023, 0x000000e2, 0x41700000,
+ 0x0004002b, 0x00000023, 0x000000e6, 0x41200000, 0x0004002b, 0x00000023, 0x000000eb, 0x41f00000,
+ 0x0004002b, 0x00000023, 0x000000f2, 0x40000000, 0x0006002c, 0x00000024, 0x00000174, 0x000000b3,
+ 0x000000b4, 0x000000b4, 0x0006002c, 0x00000024, 0x0000017a, 0x000000b4, 0x000000b3, 0x000000b4,
+ 0x0006002c, 0x00000024, 0x00000185, 0x000000b4, 0x000000b4, 0x000000b3, 0x0006002c, 0x00000024,
+ 0x00000195, 0x000000b3, 0x000000b3, 0x000000b3, 0x0006002c, 0x00000024, 0x0000027c, 0x000000b4,
+ 0x000000b4, 0x000000b4, 0x00020014, 0x00000285, 0x0004002b, 0x00000023, 0x0000028d, 0x3e9eb852,
+ 0x0004002b, 0x00000023, 0x00000299, 0x3e6b851f, 0x0004002b, 0x00000023, 0x000002a1, 0x3e2e147b,
+ 0x0004002b, 0x00000008, 0x000002ab, 0x000003f5, 0x0004002b, 0x00000023, 0x000002b8, 0x41fb3333,
+ 0x0004002b, 0x00000023, 0x000002b9, 0xc188cccd, 0x0004002b, 0x00000023, 0x000002ba, 0x41133333,
+ 0x0006002c, 0x00000024, 0x000002bb, 0x000002b8, 0x000002b9, 0x000002ba, 0x0004002b, 0x00000023,
+ 0x000002c4, 0xc13b3333, 0x0004002b, 0x00000023, 0x000002c5, 0x42253333, 0x0004002b, 0x00000023,
+ 0x000002c6, 0xc1df3333, 0x0006002c, 0x00000024, 0x000002c7, 0x000002c4, 0x000002c5, 0x000002c6,
+ 0x0004002b, 0x00000023, 0x000002e2, 0x3f000000, 0x0003001d, 0x000002ec, 0x00000023, 0x0003001e,
+ 0x000002ed, 0x000002ec, 0x00040020, 0x000002ee, 0x0000000c, 0x000002ed, 0x0004003b, 0x000002ee,
+ 0x000002ef, 0x0000000c, 0x00040020, 0x000002fa, 0x0000000c, 0x00000023, 0x0004002b, 0x00000008,
+ 0x00000346, 0x00000003, 0x00040017, 0x0000034a, 0x00000008, 0x00000003, 0x00040020, 0x0000034b,
+ 0x00000001, 0x0000034a, 0x0004003b, 0x0000034b, 0x0000034c, 0x00000001, 0x0004002b, 0x00000006,
+ 0x000003d2, 0x00000004, 0x00040020, 0x000003d3, 0x00000009, 0x00000023, 0x00040020, 0x000003ea,
+ 0x00000009, 0x00000041, 0x00040017, 0x000003ee, 0x00000285, 0x00000003, 0x0004002b, 0x00000023,
+ 0x0000056e, 0x358637bd, 0x0004002b, 0x00000023, 0x000005a5, 0x3a83126f, 0x0004002b, 0x00000006,
+ 0x000005aa, 0x00000005, 0x0004002b, 0x00000006, 0x000005af, 0x00000006, 0x0004002b, 0x00000008,
+ 0x000005e2, 0x00000004, 0x0004002b, 0x00000008, 0x000005ec, 0x00000005, 0x0004002b, 0x00000008,
+ 0x000005f6, 0x00000006, 0x0004002b, 0x00000006, 0x00000601, 0x00000003, 0x0004002b, 0x00000008,
+ 0x00000749, 0x00000008, 0x0006002c, 0x0000034a, 0x0000074a, 0x00000749, 0x00000749, 0x000005e2,
+ 0x0006002c, 0x00000024, 0x000018cf, 0x000002e2, 0x000002e2, 0x000002e2, 0x0006002c, 0x00000024,
+ 0x000018d1, 0x000000e2, 0x000000e2, 0x000000e2, 0x0006002c, 0x00000024, 0x000018d2, 0x000000e6,
+ 0x000000e6, 0x000000e6, 0x0006002c, 0x00000024, 0x000018d3, 0x000000f2, 0x000000f2, 0x000000f2,
+ 0x00050036, 0x00000002, 0x00000004, 0x00000000, 0x00000003, 0x000200f8, 0x00000005, 0x0004003b,
+ 0x000000c6, 0x000016fb, 0x00000007, 0x0004003b, 0x000000c6, 0x000016c1, 0x00000007, 0x0004003b,
+ 0x000000c6, 0x00001687, 0x00000007, 0x0004003b, 0x000000c6, 0x0000164d, 0x00000007, 0x0004003b,
+ 0x000000c6, 0x00001613, 0x00000007, 0x0004003b, 0x000000c6, 0x000015d9, 0x00000007, 0x0004003b,
+ 0x000000c6, 0x0000159f, 0x00000007, 0x0004003b, 0x000000c6, 0x00001565, 0x00000007, 0x0004003b,
+ 0x000000c6, 0x00001389, 0x00000007, 0x0004003b, 0x000000c6, 0x0000134f, 0x00000007, 0x0004003b,
+ 0x000000c6, 0x00001315, 0x00000007, 0x0004003b, 0x000000c6, 0x000012db, 0x00000007, 0x0004003b,
+ 0x000000c6, 0x000012a1, 0x00000007, 0x0004003b, 0x000000c6, 0x00001267, 0x00000007, 0x0004003b,
+ 0x000000c6, 0x0000122d, 0x00000007, 0x0004003b, 0x000000c6, 0x000011f3, 0x00000007, 0x0004003b,
+ 0x000000c6, 0x00001017, 0x00000007, 0x0004003b, 0x000000c6, 0x00000fdd, 0x00000007, 0x0004003b,
+ 0x000000c6, 0x00000fa3, 0x00000007, 0x0004003b, 0x000000c6, 0x00000f69, 0x00000007, 0x0004003b,
+ 0x000000c6, 0x00000f2f, 0x00000007, 0x0004003b, 0x000000c6, 0x00000ef5, 0x00000007, 0x0004003b,
+ 0x000000c6, 0x00000ebb, 0x00000007, 0x0004003b, 0x000000c6, 0x00000e81, 0x00000007, 0x000300f7,
+ 0x0000075b, 0x00000000, 0x000300fb, 0x00000048, 0x0000075c, 0x000200f8, 0x0000075c, 0x00060041,
+ 0x00000049, 0x00000347, 0x00000046, 0x00000047, 0x00000346, 0x0004003d, 0x00000006, 0x00000348,
+ 0x00000347, 0x0004003d, 0x0000034a, 0x0000034d, 0x0000034c, 0x0004007c, 0x000000cf, 0x0000034e,
+ 0x0000034d, 0x00060041, 0x00000049, 0x00000350, 0x00000046, 0x00000047, 0x00000048, 0x0004003d,
+ 0x00000006, 0x00000351, 0x00000350, 0x00060041, 0x00000049, 0x00000353, 0x00000046, 0x00000047,
+ 0x0000004d, 0x0004003d, 0x00000006, 0x00000354, 0x00000353, 0x00060041, 0x00000049, 0x00000356,
+ 0x00000046, 0x00000047, 0x0000008a, 0x0004003d, 0x00000006, 0x00000357, 0x00000356, 0x00050084,
+ 0x00000006, 0x0000035b, 0x00000351, 0x00000354, 0x00050084, 0x00000006, 0x0000035d, 0x0000035b,
+ 0x00000357, 0x0004007c, 0x00000008, 0x0000035e, 0x0000035d, 0x000500aa, 0x00000285, 0x00000360,
+ 0x00000348, 0x00000047, 0x000300f7, 0x00000362, 0x00000000, 0x000400fa, 0x00000360, 0x00000361,
+ 0x000003e4, 0x000200f8, 0x00000361, 0x00050051, 0x00000006, 0x00000364, 0x0000034e, 0x00000000,
+ 0x000500af, 0x00000285, 0x00000366, 0x00000364, 0x00000351, 0x000400a8, 0x00000285, 0x00000367,
+ 0x00000366, 0x000300f7, 0x00000369, 0x00000000, 0x000400fa, 0x00000367, 0x00000368, 0x00000369,
+ 0x000200f8, 0x00000368, 0x00050051, 0x00000006, 0x0000036b, 0x0000034e, 0x00000001, 0x000500af,
+ 0x00000285, 0x0000036d, 0x0000036b, 0x00000354, 0x000200f9, 0x00000369, 0x000200f8, 0x00000369,
+ 0x000700f5, 0x00000285, 0x0000036e, 0x00000366, 0x00000361, 0x0000036d, 0x00000368, 0x000400a8,
+ 0x00000285, 0x0000036f, 0x0000036e, 0x000300f7, 0x00000371, 0x00000000, 0x000400fa, 0x0000036f,
+ 0x00000370, 0x00000371, 0x000200f8, 0x00000370, 0x00050051, 0x00000006, 0x00000373, 0x0000034e,
+ 0x00000002, 0x000500af, 0x00000285, 0x00000375, 0x00000373, 0x00000357, 0x000200f9, 0x00000371,
+ 0x000200f8, 0x00000371, 0x000700f5, 0x00000285, 0x00000376, 0x0000036e, 0x00000369, 0x00000375,
+ 0x00000370, 0x000400a8, 0x00000285, 0x00000377, 0x00000376, 0x000300f7, 0x00000379, 0x00000000,
+ 0x000400fa, 0x00000377, 0x00000378, 0x00000379, 0x000200f8, 0x00000378, 0x00050051, 0x00000006,
+ 0x0000037b, 0x0000034e, 0x00000002, 0x000500b1, 0x00000285, 0x0000037c, 0x0000037b, 0x0000005b,
+ 0x000200f9, 0x00000379, 0x000200f8, 0x00000379, 0x000700f5, 0x00000285, 0x0000037d, 0x00000376,
+ 0x00000371, 0x0000037c, 0x00000378, 0x000300f7, 0x0000037f, 0x00000000, 0x000400fa, 0x0000037d,
+ 0x0000037e, 0x0000037f, 0x000200f8, 0x0000037e, 0x000200f9, 0x0000075b, 0x000200f8, 0x0000037f,
+ 0x00060041, 0x0000008b, 0x00000382, 0x00000046, 0x00000089, 0x00000048, 0x0004003d, 0x00000008,
+ 0x00000383, 0x00000382, 0x00050051, 0x00000006, 0x00000385, 0x0000034e, 0x00000002, 0x00050082,
+ 0x00000006, 0x00000386, 0x00000385, 0x0000005b, 0x00050051, 0x00000006, 0x0000038c, 0x0000034e,
+ 0x00000001, 0x00050084, 0x00000006, 0x0000076a, 0x00000354, 0x00000386, 0x00050080, 0x00000006,
+ 0x0000076b, 0x0000038c, 0x0000076a, 0x00050084, 0x00000006, 0x0000076c, 0x00000351, 0x0000076b,
+ 0x00050080, 0x00000006, 0x0000076d, 0x00000364, 0x0000076c, 0x0004007c, 0x00000008, 0x0000076e,
+ 0x0000076d, 0x00050080, 0x00000008, 0x0000038f, 0x00000383, 0x0000076e, 0x00060041, 0x000002fa,
+ 0x00000390, 0x000002ef, 0x00000047, 0x0000038f, 0x0004003d, 0x00000023, 0x00000391, 0x00000390,
+ 0x00050084, 0x00000006, 0x00000778, 0x00000354, 0x00000385, 0x00050080, 0x00000006, 0x00000779,
+ 0x0000038c, 0x00000778, 0x00050084, 0x00000006, 0x0000077a, 0x00000351, 0x00000779, 0x00050080,
+ 0x00000006, 0x0000077b, 0x00000364, 0x0000077a, 0x0004007c, 0x00000008, 0x0000077c, 0x0000077b,
+ 0x00050080, 0x00000008, 0x0000039e, 0x00000383, 0x0000077c, 0x00060041, 0x000002fa, 0x0000039f,
+ 0x000002ef, 0x00000047, 0x0000039e, 0x0004003d, 0x00000023, 0x000003a0, 0x0000039f, 0x00050081,
+ 0x00000023, 0x000003a1, 0x00000391, 0x000003a0, 0x00050085, 0x00000023, 0x000003a2, 0x000002e2,
+ 0x000003a1, 0x00060041, 0x0000008b, 0x000003a4, 0x00000046, 0x0000005b, 0x00000346, 0x0004003d,
+ 0x00000008, 0x000003a5, 0x000003a4, 0x00050080, 0x00000008, 0x000003b1, 0x000003a5, 0x0000076e,
+ 0x00060041, 0x000002fa, 0x000003b2, 0x000002ef, 0x00000047, 0x000003b1, 0x0004003d, 0x00000023,
+ 0x000003b3, 0x000003b2, 0x00050080, 0x00000008, 0x000003c0, 0x000003a5, 0x0000077c, 0x00060041,
+ 0x000002fa, 0x000003c1, 0x000002ef, 0x00000047, 0x000003c0, 0x0004003d, 0x00000023, 0x000003c2,
+ 0x000003c1, 0x00050081, 0x00000023, 0x000003c3, 0x000003b3, 0x000003c2, 0x00050085, 0x00000023,
+ 0x000003c4, 0x000002e2, 0x000003c3, 0x00060041, 0x0000008b, 0x000003c5, 0x00000046, 0x0000005b,
+ 0x0000008a, 0x0004003d, 0x00000008, 0x000003c6, 0x000003c5, 0x00050080, 0x00000008, 0x000003d1,
+ 0x000003c6, 0x0000077c, 0x00060041, 0x000003d3, 0x000003d4, 0x00000046, 0x000003d2, 0x00000048,
+ 0x0004003d, 0x00000023, 0x000003d5, 0x000003d4, 0x00060041, 0x000003d3, 0x000003d6, 0x00000046,
+ 0x000003d2, 0x0000004d, 0x0004003d, 0x00000023, 0x000003d7, 0x000003d6, 0x00050085, 0x00000023,
+ 0x000003d9, 0x000003d7, 0x000003a2, 0x00060041, 0x000003d3, 0x000003da, 0x00000046, 0x000003d2,
+ 0x0000008a, 0x0004003d, 0x00000023, 0x000003db, 0x000003da, 0x00050085, 0x00000023, 0x000003dd,
+ 0x000003db, 0x000003c4, 0x00050083, 0x00000023, 0x000003de, 0x000003d9, 0x000003dd, 0x00050085,
+ 0x00000023, 0x000003df, 0x000003d5, 0x000003de, 0x00060041, 0x000002fa, 0x000003e0, 0x000002ef,
+ 0x00000047, 0x000003d1, 0x0004003d, 0x00000023, 0x000003e1, 0x000003e0, 0x00050081, 0x00000023,
+ 0x000003e2, 0x000003e1, 0x000003df, 0x0003003e, 0x000003e0, 0x000003e2, 0x000200f9, 0x00000362,
+ 0x000200f8, 0x000003e4, 0x000500aa, 0x00000285, 0x000003e6, 0x00000348, 0x0000005b, 0x000300f7,
+ 0x000003e8, 0x00000000, 0x000400fa, 0x000003e6, 0x000003e7, 0x000004d9, 0x000200f8, 0x000003e7,
+ 0x00050041, 0x000003ea, 0x000003eb, 0x00000046, 0x00000047, 0x0004003d, 0x00000041, 0x000003ec,
+ 0x000003eb, 0x0008004f, 0x000000cf, 0x000003ed, 0x000003ec, 0x000003ec, 0x00000000, 0x00000001,
+ 0x00000002, 0x000500af, 0x000003ee, 0x000003ef, 0x0000034e, 0x000003ed, 0x0004009a, 0x00000285,
+ 0x000003f0, 0x000003ef, 0x000300f7, 0x000003f2, 0x00000000, 0x000400fa, 0x000003f0, 0x000003f1,
+ 0x000003f2, 0x000200f8, 0x000003f1, 0x000200f9, 0x0000075b, 0x000200f8, 0x000003f2, 0x00050051,
+ 0x00000006, 0x000003f7, 0x0000034e, 0x00000000, 0x00050051, 0x00000006, 0x000003fa, 0x0000034e,
+ 0x00000001, 0x00050051, 0x00000006, 0x000003fd, 0x0000034e, 0x00000002, 0x00050084, 0x00000006,
+ 0x000007b0, 0x00000354, 0x000003fd, 0x00050080, 0x00000006, 0x000007b1, 0x000003fa, 0x000007b0,
+ 0x00050084, 0x00000006, 0x000007b2, 0x00000351, 0x000007b1, 0x00050080, 0x00000006, 0x000007b3,
+ 0x000003f7, 0x000007b2, 0x0004007c, 0x00000008, 0x000007b4, 0x000007b3, 0x00060041, 0x0000008b,
+ 0x00000400, 0x00000046, 0x00000089, 0x00000048, 0x0004003d, 0x00000008, 0x00000401, 0x00000400,
+ 0x000500aa, 0x00000285, 0x00000404, 0x000003f7, 0x00000047, 0x000400a8, 0x00000285, 0x00000405,
+ 0x00000404, 0x000300f7, 0x00000407, 0x00000000, 0x000400fa, 0x00000405, 0x00000406, 0x00000407,
+ 0x000200f8, 0x00000406, 0x000500aa, 0x00000285, 0x0000040a, 0x000003fa, 0x00000047, 0x000200f9,
+ 0x00000407, 0x000200f8, 0x00000407, 0x000700f5, 0x00000285, 0x0000040b, 0x00000404, 0x000003f2,
+ 0x0000040a, 0x00000406, 0x000400a8, 0x00000285, 0x0000040c, 0x0000040b, 0x000300f7, 0x0000040e,
+ 0x00000000, 0x000400fa, 0x0000040c, 0x0000040d, 0x0000040e, 0x000200f8, 0x0000040d, 0x000500aa,
+ 0x00000285, 0x00000411, 0x000003fd, 0x00000047, 0x000200f9, 0x0000040e, 0x000200f8, 0x0000040e,
+ 0x000700f5, 0x00000285, 0x00000412, 0x0000040b, 0x00000407, 0x00000411, 0x0000040d, 0x000400a8,
+ 0x00000285, 0x00000413, 0x00000412, 0x000300f7, 0x00000415, 0x00000000, 0x000400fa, 0x00000413,
+ 0x00000414, 0x00000415, 0x000200f8, 0x00000414, 0x00050082, 0x00000006, 0x00000419, 0x00000351,
+ 0x0000005b, 0x000500aa, 0x00000285, 0x0000041a, 0x000003f7, 0x00000419, 0x000200f9, 0x00000415,
+ 0x000200f8, 0x00000415, 0x000700f5, 0x00000285, 0x0000041b, 0x00000412, 0x0000040e, 0x0000041a,
+ 0x00000414, 0x000400a8, 0x00000285, 0x0000041c, 0x0000041b, 0x000300f7, 0x0000041e, 0x00000000,
+ 0x000400fa, 0x0000041c, 0x0000041d, 0x0000041e, 0x000200f8, 0x0000041d, 0x00050082, 0x00000006,
+ 0x00000422, 0x00000354, 0x0000005b, 0x000500aa, 0x00000285, 0x00000423, 0x000003fa, 0x00000422,
+ 0x000200f9, 0x0000041e, 0x000200f8, 0x0000041e, 0x000700f5, 0x00000285, 0x00000424, 0x0000041b,
+ 0x00000415, 0x00000423, 0x0000041d, 0x000400a8, 0x00000285, 0x00000425, 0x00000424, 0x000300f7,
+ 0x00000427, 0x00000000, 0x000400fa, 0x00000425, 0x00000426, 0x00000427, 0x000200f8, 0x00000426,
+ 0x00050082, 0x00000006, 0x0000042b, 0x00000357, 0x0000005b, 0x000500aa, 0x00000285, 0x0000042c,
+ 0x000003fd, 0x0000042b, 0x000200f9, 0x00000427, 0x000200f8, 0x00000427, 0x000700f5, 0x00000285,
+ 0x0000042d, 0x00000424, 0x0000041e, 0x0000042c, 0x00000426, 0x000300f7, 0x0000042f, 0x00000000,
+ 0x000400fa, 0x0000042d, 0x0000042e, 0x0000042f, 0x000200f8, 0x0000042e, 0x00050080, 0x00000008,
+ 0x00000432, 0x00000401, 0x000007b4, 0x00060041, 0x000002fa, 0x00000433, 0x000002ef, 0x00000047,
+ 0x00000432, 0x0003003e, 0x00000433, 0x000000b4, 0x00050080, 0x00000008, 0x00000436, 0x00000401,
+ 0x0000035e, 0x00050080, 0x00000008, 0x00000438, 0x00000436, 0x000007b4, 0x00060041, 0x000002fa,
+ 0x00000439, 0x000002ef, 0x00000047, 0x00000438, 0x0003003e, 0x00000439, 0x000000b4, 0x00050084,
+ 0x00000008, 0x0000043c, 0x0000008a, 0x0000035e, 0x00050080, 0x00000008, 0x0000043d, 0x00000401,
+ 0x0000043c, 0x00050080, 0x00000008, 0x0000043f, 0x0000043d, 0x000007b4, 0x00060041, 0x000002fa,
+ 0x00000440, 0x000002ef, 0x00000047, 0x0000043f, 0x0003003e, 0x00000440, 0x000000b4, 0x00050084,
+ 0x00000008, 0x00000443, 0x00000346, 0x0000035e, 0x00050080, 0x00000008, 0x00000444, 0x00000401,
+ 0x00000443, 0x00050080, 0x00000008, 0x00000446, 0x00000444, 0x000007b4, 0x00060041, 0x000002fa,
+ 0x00000447, 0x000002ef, 0x00000047, 0x00000446, 0x0003003e, 0x00000447, 0x000000b4, 0x000200f9,
+ 0x0000075b, 0x000200f8, 0x0000042f, 0x00050082, 0x00000006, 0x0000044c, 0x000003f7, 0x0000005b,
+ 0x00060041, 0x0000008b, 0x000007c9, 0x00000046, 0x0000005b, 0x00000048, 0x0004003d, 0x00000008,
+ 0x000007ca, 0x000007c9, 0x00050080, 0x00000006, 0x0000080e, 0x00000351, 0x0000005b, 0x00060041,
+ 0x0000008b, 0x000007de, 0x00000046, 0x0000005b, 0x0000004d, 0x0004003d, 0x00000008, 0x000007df,
+ 0x000007de, 0x00050080, 0x00000006, 0x0000082f, 0x00000354, 0x0000005b, 0x00050084, 0x00000006,
+ 0x00000831, 0x0000082f, 0x000003fd, 0x00050080, 0x00000006, 0x00000832, 0x000003fa, 0x00000831,
+ 0x00050084, 0x00000006, 0x00000833, 0x00000351, 0x00000832, 0x00050080, 0x00000006, 0x00000834,
+ 0x0000044c, 0x00000833, 0x0004007c, 0x00000008, 0x00000835, 0x00000834, 0x00050080, 0x00000008,
+ 0x000007e4, 0x000007df, 0x00000835, 0x00060041, 0x000002fa, 0x000007e5, 0x000002ef, 0x00000047,
+ 0x000007e4, 0x0004003d, 0x00000023, 0x000007e6, 0x000007e5, 0x00050080, 0x00000006, 0x000007ea,
+ 0x000003fa, 0x0000005b, 0x00050080, 0x00000006, 0x00000841, 0x000007ea, 0x00000831, 0x00050084,
+ 0x00000006, 0x00000842, 0x00000351, 0x00000841, 0x00050080, 0x00000006, 0x00000843, 0x0000044c,
+ 0x00000842, 0x0004007c, 0x00000008, 0x00000844, 0x00000843, 0x00050080, 0x00000008, 0x000007ee,
+ 0x000007df, 0x00000844, 0x00060041, 0x000002fa, 0x000007ef, 0x000002ef, 0x00000047, 0x000007ee,
+ 0x0004003d, 0x00000023, 0x000007f0, 0x000007ef, 0x00050081, 0x00000023, 0x000007f1, 0x000007e6,
+ 0x000007f0, 0x00060041, 0x0000008b, 0x000007f3, 0x00000046, 0x0000005b, 0x0000008a, 0x0004003d,
+ 0x00000008, 0x000007f4, 0x000007f3, 0x00050080, 0x00000006, 0x00000851, 0x0000044c, 0x000007b2,
+ 0x0004007c, 0x00000008, 0x00000852, 0x00000851, 0x00050080, 0x00000008, 0x000007f9, 0x000007f4,
+ 0x00000852, 0x00060041, 0x000002fa, 0x000007fa, 0x000002ef, 0x00000047, 0x000007f9, 0x0004003d,
+ 0x00000023, 0x000007fb, 0x000007fa, 0x00050080, 0x00000006, 0x000007ff, 0x000003fd, 0x0000005b,
+ 0x00050084, 0x00000006, 0x0000085c, 0x00000354, 0x000007ff, 0x00050080, 0x00000006, 0x0000085d,
+ 0x000003fa, 0x0000085c, 0x00050084, 0x00000006, 0x0000085e, 0x00000351, 0x0000085d, 0x00050080,
+ 0x00000006, 0x0000085f, 0x0000044c, 0x0000085e, 0x0004007c, 0x00000008, 0x00000860, 0x0000085f,
+ 0x00050080, 0x00000008, 0x00000803, 0x000007f4, 0x00000860, 0x00060041, 0x000002fa, 0x00000804,
+ 0x000002ef, 0x00000047, 0x00000803, 0x0004003d, 0x00000023, 0x00000805, 0x00000804, 0x00050081,
+ 0x00000023, 0x00000806, 0x000007fb, 0x00000805, 0x00050080, 0x00000006, 0x00000458, 0x000003f7,
+ 0x0000005b, 0x00050080, 0x00000006, 0x000008e0, 0x00000458, 0x00000833, 0x0004007c, 0x00000008,
+ 0x000008e1, 0x000008e0, 0x00050080, 0x00000008, 0x00000890, 0x000007df, 0x000008e1, 0x00060041,
+ 0x000002fa, 0x00000891, 0x000002ef, 0x00000047, 0x00000890, 0x0004003d, 0x00000023, 0x00000892,
+ 0x00000891, 0x00050080, 0x00000006, 0x000008ef, 0x00000458, 0x00000842, 0x0004007c, 0x00000008,
+ 0x000008f0, 0x000008ef, 0x00050080, 0x00000008, 0x0000089a, 0x000007df, 0x000008f0, 0x00060041,
+ 0x000002fa, 0x0000089b, 0x000002ef, 0x00000047, 0x0000089a, 0x0004003d, 0x00000023, 0x0000089c,
+ 0x0000089b, 0x00050081, 0x00000023, 0x0000089d, 0x00000892, 0x0000089c, 0x00050080, 0x00000006,
+ 0x000008fd, 0x00000458, 0x000007b2, 0x0004007c, 0x00000008, 0x000008fe, 0x000008fd, 0x00050080,
+ 0x00000008, 0x000008a5, 0x000007f4, 0x000008fe, 0x00060041, 0x000002fa, 0x000008a6, 0x000002ef,
+ 0x00000047, 0x000008a5, 0x0004003d, 0x00000023, 0x000008a7, 0x000008a6, 0x00050080, 0x00000006,
+ 0x0000090b, 0x00000458, 0x0000085e, 0x0004007c, 0x00000008, 0x0000090c, 0x0000090b, 0x00050080,
+ 0x00000008, 0x000008af, 0x000007f4, 0x0000090c, 0x00060041, 0x000002fa, 0x000008b0, 0x000002ef,
+ 0x00000047, 0x000008af, 0x0004003d, 0x00000023, 0x000008b1, 0x000008b0, 0x00050081, 0x00000023,
+ 0x000008b2, 0x000008a7, 0x000008b1, 0x00050082, 0x00000006, 0x00000464, 0x000003fa, 0x0000005b,
+ 0x00050080, 0x00000006, 0x0000096c, 0x00000464, 0x000007b0, 0x00050084, 0x00000006, 0x0000096d,
+ 0x0000080e, 0x0000096c, 0x00050080, 0x00000006, 0x0000096e, 0x000003f7, 0x0000096d, 0x0004007c,
+ 0x00000008, 0x0000096f, 0x0000096e, 0x00050080, 0x00000008, 0x00000927, 0x000007ca, 0x0000096f,
+ 0x00060041, 0x000002fa, 0x00000928, 0x000002ef, 0x00000047, 0x00000927, 0x0004003d, 0x00000023,
+ 0x00000929, 0x00000928, 0x00050080, 0x00000006, 0x0000097d, 0x00000458, 0x0000096d, 0x0004007c,
+ 0x00000008, 0x0000097e, 0x0000097d, 0x00050080, 0x00000008, 0x00000931, 0x000007ca, 0x0000097e,
+ 0x00060041, 0x000002fa, 0x00000932, 0x000002ef, 0x00000047, 0x00000931, 0x0004003d, 0x00000023,
+ 0x00000933, 0x00000932, 0x00050081, 0x00000023, 0x00000934, 0x00000929, 0x00000933, 0x00050084,
+ 0x00000006, 0x000009a8, 0x00000351, 0x0000096c, 0x00050080, 0x00000006, 0x000009a9, 0x000003f7,
+ 0x000009a8, 0x0004007c, 0x00000008, 0x000009aa, 0x000009a9, 0x00050080, 0x00000008, 0x00000951,
+ 0x000007f4, 0x000009aa, 0x00060041, 0x000002fa, 0x00000952, 0x000002ef, 0x00000047, 0x00000951,
+ 0x0004003d, 0x00000023, 0x00000953, 0x00000952, 0x00050080, 0x00000006, 0x000009b5, 0x00000464,
+ 0x0000085c, 0x00050084, 0x00000006, 0x000009b6, 0x00000351, 0x000009b5, 0x00050080, 0x00000006,
+ 0x000009b7, 0x000003f7, 0x000009b6, 0x0004007c, 0x00000008, 0x000009b8, 0x000009b7, 0x00050080,
+ 0x00000008, 0x0000095b, 0x000007f4, 0x000009b8, 0x00060041, 0x000002fa, 0x0000095c, 0x000002ef,
+ 0x00000047, 0x0000095b, 0x0004003d, 0x00000023, 0x0000095d, 0x0000095c, 0x00050081, 0x00000023,
+ 0x0000095e, 0x00000953, 0x0000095d, 0x00050080, 0x00000006, 0x00000a18, 0x000007ea, 0x000007b0,
+ 0x00050084, 0x00000006, 0x00000a19, 0x0000080e, 0x00000a18, 0x00050080, 0x00000006, 0x00000a1a,
+ 0x000003f7, 0x00000a19, 0x0004007c, 0x00000008, 0x00000a1b, 0x00000a1a, 0x00050080, 0x00000008,
+ 0x000009d3, 0x000007ca, 0x00000a1b, 0x00060041, 0x000002fa, 0x000009d4, 0x000002ef, 0x00000047,
+ 0x000009d3, 0x0004003d, 0x00000023, 0x000009d5, 0x000009d4, 0x00050080, 0x00000006, 0x00000a29,
+ 0x00000458, 0x00000a19, 0x0004007c, 0x00000008, 0x00000a2a, 0x00000a29, 0x00050080, 0x00000008,
+ 0x000009dd, 0x000007ca, 0x00000a2a, 0x00060041, 0x000002fa, 0x000009de, 0x000002ef, 0x00000047,
+ 0x000009dd, 0x0004003d, 0x00000023, 0x000009df, 0x000009de, 0x00050081, 0x00000023, 0x000009e0,
+ 0x000009d5, 0x000009df, 0x00050084, 0x00000006, 0x00000a54, 0x00000351, 0x00000a18, 0x00050080,
+ 0x00000006, 0x00000a55, 0x000003f7, 0x00000a54, 0x0004007c, 0x00000008, 0x00000a56, 0x00000a55,
+ 0x00050080, 0x00000008, 0x000009fd, 0x000007f4, 0x00000a56, 0x00060041, 0x000002fa, 0x000009fe,
+ 0x000002ef, 0x00000047, 0x000009fd, 0x0004003d, 0x00000023, 0x000009ff, 0x000009fe, 0x00050080,
+ 0x00000006, 0x00000a61, 0x000007ea, 0x0000085c, 0x00050084, 0x00000006, 0x00000a62, 0x00000351,
+ 0x00000a61, 0x00050080, 0x00000006, 0x00000a63, 0x000003f7, 0x00000a62, 0x0004007c, 0x00000008,
+ 0x00000a64, 0x00000a63, 0x00050080, 0x00000008, 0x00000a07, 0x000007f4, 0x00000a64, 0x00060041,
+ 0x000002fa, 0x00000a08, 0x000002ef, 0x00000047, 0x00000a07, 0x0004003d, 0x00000023, 0x00000a09,
+ 0x00000a08, 0x00050081, 0x00000023, 0x00000a0a, 0x000009ff, 0x00000a09, 0x00050082, 0x00000006,
+ 0x0000047c, 0x000003fd, 0x0000005b, 0x00050084, 0x00000006, 0x00000ac3, 0x00000354, 0x0000047c,
+ 0x00050080, 0x00000006, 0x00000ac4, 0x000003fa, 0x00000ac3, 0x00050084, 0x00000006, 0x00000ac5,
+ 0x0000080e, 0x00000ac4, 0x00050080, 0x00000006, 0x00000ac6, 0x000003f7, 0x00000ac5, 0x0004007c,
+ 0x00000008, 0x00000ac7, 0x00000ac6, 0x00050080, 0x00000008, 0x00000a7f, 0x000007ca, 0x00000ac7,
+ 0x00060041, 0x000002fa, 0x00000a80, 0x000002ef, 0x00000047, 0x00000a7f, 0x0004003d, 0x00000023,
+ 0x00000a81, 0x00000a80, 0x00050080, 0x00000006, 0x00000ad5, 0x00000458, 0x00000ac5, 0x0004007c,
+ 0x00000008, 0x00000ad6, 0x00000ad5, 0x00050080, 0x00000008, 0x00000a89, 0x000007ca, 0x00000ad6,
+ 0x00060041, 0x000002fa, 0x00000a8a, 0x000002ef, 0x00000047, 0x00000a89, 0x0004003d, 0x00000023,
+ 0x00000a8b, 0x00000a8a, 0x00050081, 0x00000023, 0x00000a8c, 0x00000a81, 0x00000a8b, 0x00050084,
+ 0x00000006, 0x00000ae1, 0x0000082f, 0x0000047c, 0x00050080, 0x00000006, 0x00000ae2, 0x000003fa,
+ 0x00000ae1, 0x00050084, 0x00000006, 0x00000ae3, 0x00000351, 0x00000ae2, 0x00050080, 0x00000006,
+ 0x00000ae4, 0x000003f7, 0x00000ae3, 0x0004007c, 0x00000008, 0x00000ae5, 0x00000ae4, 0x00050080,
+ 0x00000008, 0x00000a94, 0x000007df, 0x00000ae5, 0x00060041, 0x000002fa, 0x00000a95, 0x000002ef,
+ 0x00000047, 0x00000a94, 0x0004003d, 0x00000023, 0x00000a96, 0x00000a95, 0x00050080, 0x00000006,
+ 0x00000af1, 0x000007ea, 0x00000ae1, 0x00050084, 0x00000006, 0x00000af2, 0x00000351, 0x00000af1,
+ 0x00050080, 0x00000006, 0x00000af3, 0x000003f7, 0x00000af2, 0x0004007c, 0x00000008, 0x00000af4,
+ 0x00000af3, 0x00050080, 0x00000008, 0x00000a9e, 0x000007df, 0x00000af4, 0x00060041, 0x000002fa,
+ 0x00000a9f, 0x000002ef, 0x00000047, 0x00000a9e, 0x0004003d, 0x00000023, 0x00000aa0, 0x00000a9f,
+ 0x00050081, 0x00000023, 0x00000aa1, 0x00000a96, 0x00000aa0, 0x00050084, 0x00000006, 0x00000b71,
+ 0x0000080e, 0x0000085d, 0x00050080, 0x00000006, 0x00000b72, 0x000003f7, 0x00000b71, 0x0004007c,
+ 0x00000008, 0x00000b73, 0x00000b72, 0x00050080, 0x00000008, 0x00000b2b, 0x000007ca, 0x00000b73,
+ 0x00060041, 0x000002fa, 0x00000b2c, 0x000002ef, 0x00000047, 0x00000b2b, 0x0004003d, 0x00000023,
+ 0x00000b2d, 0x00000b2c, 0x00050080, 0x00000006, 0x00000b81, 0x00000458, 0x00000b71, 0x0004007c,
+ 0x00000008, 0x00000b82, 0x00000b81, 0x00050080, 0x00000008, 0x00000b35, 0x000007ca, 0x00000b82,
+ 0x00060041, 0x000002fa, 0x00000b36, 0x000002ef, 0x00000047, 0x00000b35, 0x0004003d, 0x00000023,
+ 0x00000b37, 0x00000b36, 0x00050081, 0x00000023, 0x00000b38, 0x00000b2d, 0x00000b37, 0x00050084,
+ 0x00000006, 0x00000b8d, 0x0000082f, 0x000007ff, 0x00050080, 0x00000006, 0x00000b8e, 0x000003fa,
+ 0x00000b8d, 0x00050084, 0x00000006, 0x00000b8f, 0x00000351, 0x00000b8e, 0x00050080, 0x00000006,
+ 0x00000b90, 0x000003f7, 0x00000b8f, 0x0004007c, 0x00000008, 0x00000b91, 0x00000b90, 0x00050080,
+ 0x00000008, 0x00000b40, 0x000007df, 0x00000b91, 0x00060041, 0x000002fa, 0x00000b41, 0x000002ef,
+ 0x00000047, 0x00000b40, 0x0004003d, 0x00000023, 0x00000b42, 0x00000b41, 0x00050080, 0x00000006,
+ 0x00000b9d, 0x000007ea, 0x00000b8d, 0x00050084, 0x00000006, 0x00000b9e, 0x00000351, 0x00000b9d,
+ 0x00050080, 0x00000006, 0x00000b9f, 0x000003f7, 0x00000b9e, 0x0004007c, 0x00000008, 0x00000ba0,
+ 0x00000b9f, 0x00050080, 0x00000008, 0x00000b4a, 0x000007df, 0x00000ba0, 0x00060041, 0x000002fa,
+ 0x00000b4b, 0x000002ef, 0x00000047, 0x00000b4a, 0x0004003d, 0x00000023, 0x00000b4c, 0x00000b4b,
+ 0x00050081, 0x00000023, 0x00000b4d, 0x00000b42, 0x00000b4c, 0x00060041, 0x000003d3, 0x00000492,
+ 0x00000046, 0x000003d2, 0x0000004d, 0x0004003d, 0x00000023, 0x00000493, 0x00000492, 0x00050083,
+ 0x00000023, 0x000018d7, 0x00000a0a, 0x0000095e, 0x00050083, 0x00000023, 0x000018d8, 0x00000b4d,
+ 0x00000aa1, 0x00050083, 0x00000023, 0x000018d9, 0x000018d7, 0x000018d8, 0x00050085, 0x00000023,
+ 0x0000049f, 0x000002e2, 0x000018d9, 0x00050083, 0x00000023, 0x000018da, 0x00000b38, 0x00000a8c,
+ 0x00050083, 0x00000023, 0x000018db, 0x000008b2, 0x00000806, 0x00050083, 0x00000023, 0x000018dc,
+ 0x000018da, 0x000018db, 0x00050085, 0x00000023, 0x000004aa, 0x000002e2, 0x000018dc, 0x00050083,
+ 0x00000023, 0x000018dd, 0x0000089d, 0x000007f1, 0x00050083, 0x00000023, 0x000018de, 0x000009e0,
+ 0x00000934, 0x00050083, 0x00000023, 0x000018df, 0x000018dd, 0x000018de, 0x00050085, 0x00000023,
+ 0x000004b5, 0x000002e2, 0x000018df, 0x00060050, 0x00000024, 0x000004b6, 0x0000049f, 0x000004aa,
+ 0x000004b5, 0x0005008e, 0x00000024, 0x000004b8, 0x000004b6, 0x00000493, 0x00050080, 0x00000008,
+ 0x000004bb, 0x00000401, 0x000007b4, 0x00050051, 0x00000023, 0x000004bd, 0x000004b8, 0x00000000,
+ 0x00060041, 0x000002fa, 0x000004be, 0x000002ef, 0x00000047, 0x000004bb, 0x0003003e, 0x000004be,
+ 0x000004bd, 0x00050080, 0x00000008, 0x000004c1, 0x00000401, 0x0000035e, 0x00050080, 0x00000008,
+ 0x000004c3, 0x000004c1, 0x000007b4, 0x00050051, 0x00000023, 0x000004c5, 0x000004b8, 0x00000001,
+ 0x00060041, 0x000002fa, 0x000004c6, 0x000002ef, 0x00000047, 0x000004c3, 0x0003003e, 0x000004c6,
+ 0x000004c5, 0x00050084, 0x00000008, 0x000004c9, 0x0000008a, 0x0000035e, 0x00050080, 0x00000008,
+ 0x000004ca, 0x00000401, 0x000004c9, 0x00050080, 0x00000008, 0x000004cc, 0x000004ca, 0x000007b4,
+ 0x00050051, 0x00000023, 0x000004ce, 0x000004b8, 0x00000002, 0x00060041, 0x000002fa, 0x000004cf,
+ 0x000002ef, 0x00000047, 0x000004cc, 0x0003003e, 0x000004cf, 0x000004ce, 0x00050084, 0x00000008,
+ 0x000004d2, 0x00000346, 0x0000035e, 0x00050080, 0x00000008, 0x000004d3, 0x00000401, 0x000004d2,
+ 0x00050080, 0x00000008, 0x000004d5, 0x000004d3, 0x000007b4, 0x0006000c, 0x00000023, 0x000004d7,
+ 0x00000001, 0x00000042, 0x000004b8, 0x00060041, 0x000002fa, 0x000004d8, 0x000002ef, 0x00000047,
+ 0x000004d5, 0x0003003e, 0x000004d8, 0x000004d7, 0x000200f9, 0x000003e8, 0x000200f8, 0x000004d9,
+ 0x000500aa, 0x00000285, 0x000004db, 0x00000348, 0x00000089, 0x000300f7, 0x000004dd, 0x00000000,
+ 0x000400fa, 0x000004db, 0x000004dc, 0x000005ff, 0x000200f8, 0x000004dc, 0x00050041, 0x000003ea,
+ 0x000004df, 0x00000046, 0x00000047, 0x0004003d, 0x00000041, 0x000004e0, 0x000004df, 0x0008004f,
+ 0x000000cf, 0x000004e1, 0x000004e0, 0x000004e0, 0x00000000, 0x00000001, 0x00000002, 0x000500af,
+ 0x000003ee, 0x000004e2, 0x0000034e, 0x000004e1, 0x0004009a, 0x00000285, 0x000004e3, 0x000004e2,
+ 0x000300f7, 0x000004e5, 0x00000000, 0x000400fa, 0x000004e3, 0x000004e4, 0x000004e5, 0x000200f8,
+ 0x000004e4, 0x000200f9, 0x0000075b, 0x000200f8, 0x000004e5, 0x00050051, 0x00000006, 0x000004ea,
+ 0x0000034e, 0x00000000, 0x00050051, 0x00000006, 0x000004ed, 0x0000034e, 0x00000001, 0x00050051,
+ 0x00000006, 0x000004f0, 0x0000034e, 0x00000002, 0x00050084, 0x00000006, 0x00000bc6, 0x00000354,
+ 0x000004f0, 0x00050080, 0x00000006, 0x00000bc7, 0x000004ed, 0x00000bc6, 0x00050084, 0x00000006,
+ 0x00000bc8, 0x00000351, 0x00000bc7, 0x00050080, 0x00000006, 0x00000bc9, 0x000004ea, 0x00000bc8,
+ 0x0004007c, 0x00000008, 0x00000bca, 0x00000bc9, 0x00060041, 0x0000008b, 0x000004f3, 0x00000046,
+ 0x00000089, 0x00000048, 0x0004003d, 0x00000008, 0x000004f4, 0x000004f3, 0x00060041, 0x000003d3,
+ 0x000004f7, 0x00000046, 0x000003d2, 0x00000048, 0x0004003d, 0x00000023, 0x000004f8, 0x000004f7,
+ 0x00060041, 0x000003d3, 0x000004fa, 0x00000046, 0x000003d2, 0x0000004d, 0x0004003d, 0x00000023,
+ 0x000004fb, 0x000004fa, 0x000500ba, 0x00000285, 0x000004fd, 0x000004f8, 0x000000b4, 0x000300f7,
+ 0x000004ff, 0x00000000, 0x000400fa, 0x000004fd, 0x000004fe, 0x000004ff, 0x000200f8, 0x000004fe,
+ 0x000500aa, 0x00000285, 0x00000502, 0x000004ea, 0x00000047, 0x000400a8, 0x00000285, 0x00000503,
+ 0x00000502, 0x000300f7, 0x00000505, 0x00000000, 0x000400fa, 0x00000503, 0x00000504, 0x00000505,
+ 0x000200f8, 0x00000504, 0x000500aa, 0x00000285, 0x00000508, 0x000004ed, 0x00000047, 0x000200f9,
+ 0x00000505, 0x000200f8, 0x00000505, 0x000700f5, 0x00000285, 0x00000509, 0x00000502, 0x000004fe,
+ 0x00000508, 0x00000504, 0x000400a8, 0x00000285, 0x0000050a, 0x00000509, 0x000300f7, 0x0000050c,
+ 0x00000000, 0x000400fa, 0x0000050a, 0x0000050b, 0x0000050c, 0x000200f8, 0x0000050b, 0x000500aa,
+ 0x00000285, 0x0000050f, 0x000004f0, 0x00000047, 0x000200f9, 0x0000050c, 0x000200f8, 0x0000050c,
+ 0x000700f5, 0x00000285, 0x00000510, 0x00000509, 0x00000505, 0x0000050f, 0x0000050b, 0x000400a8,
+ 0x00000285, 0x00000511, 0x00000510, 0x000300f7, 0x00000513, 0x00000000, 0x000400fa, 0x00000511,
+ 0x00000512, 0x00000513, 0x000200f8, 0x00000512, 0x00050082, 0x00000006, 0x00000517, 0x00000351,
+ 0x0000005b, 0x000500aa, 0x00000285, 0x00000518, 0x000004ea, 0x00000517, 0x000200f9, 0x00000513,
+ 0x000200f8, 0x00000513, 0x000700f5, 0x00000285, 0x00000519, 0x00000510, 0x0000050c, 0x00000518,
+ 0x00000512, 0x000400a8, 0x00000285, 0x0000051a, 0x00000519, 0x000300f7, 0x0000051c, 0x00000000,
+ 0x000400fa, 0x0000051a, 0x0000051b, 0x0000051c, 0x000200f8, 0x0000051b, 0x00050082, 0x00000006,
+ 0x00000520, 0x00000354, 0x0000005b, 0x000500aa, 0x00000285, 0x00000521, 0x000004ed, 0x00000520,
+ 0x000200f9, 0x0000051c, 0x000200f8, 0x0000051c, 0x000700f5, 0x00000285, 0x00000522, 0x00000519,
+ 0x00000513, 0x00000521, 0x0000051b, 0x000400a8, 0x00000285, 0x00000523, 0x00000522, 0x000300f7,
+ 0x00000525, 0x00000000, 0x000400fa, 0x00000523, 0x00000524, 0x00000525, 0x000200f8, 0x00000524,
+ 0x00050082, 0x00000006, 0x00000529, 0x00000357, 0x0000005b, 0x000500aa, 0x00000285, 0x0000052a,
+ 0x000004f0, 0x00000529, 0x000200f9, 0x00000525, 0x000200f8, 0x00000525, 0x000700f5, 0x00000285,
+ 0x0000052b, 0x00000522, 0x0000051c, 0x0000052a, 0x00000524, 0x000400a8, 0x00000285, 0x0000052c,
+ 0x0000052b, 0x000200f9, 0x000004ff, 0x000200f8, 0x000004ff, 0x000700f5, 0x00000285, 0x0000052d,
+ 0x000004fd, 0x000004e5, 0x0000052c, 0x00000525, 0x000300f7, 0x0000052f, 0x00000000, 0x000400fa,
+ 0x0000052d, 0x0000052e, 0x0000052f, 0x000200f8, 0x0000052e, 0x00050084, 0x00000008, 0x00000533,
+ 0x00000346, 0x0000035e, 0x00050080, 0x00000008, 0x00000534, 0x000004f4, 0x00000533, 0x0004007c,
+ 0x00000008, 0x00000537, 0x00000351, 0x0004007c, 0x00000008, 0x0000053c, 0x0000035b, 0x00050080,
+ 0x00000008, 0x00000540, 0x00000534, 0x00000bca, 0x00050080, 0x00000008, 0x00000541, 0x00000540,
+ 0x0000004d, 0x00060041, 0x000002fa, 0x00000542, 0x000002ef, 0x00000047, 0x00000541, 0x0004003d,
+ 0x00000023, 0x00000543, 0x00000542, 0x00050082, 0x00000008, 0x00000547, 0x00000540, 0x0000004d,
+ 0x00060041, 0x000002fa, 0x00000548, 0x000002ef, 0x00000047, 0x00000547, 0x0004003d, 0x00000023,
+ 0x00000549, 0x00000548, 0x00050083, 0x00000023, 0x0000054a, 0x00000543, 0x00000549, 0x00050080,
+ 0x00000008, 0x0000054f, 0x00000540, 0x00000537, 0x00060041, 0x000002fa, 0x00000550, 0x000002ef,
+ 0x00000047, 0x0000054f, 0x0004003d, 0x00000023, 0x00000551, 0x00000550, 0x00050082, 0x00000008,
+ 0x00000556, 0x00000540, 0x00000537, 0x00060041, 0x000002fa, 0x00000557, 0x000002ef, 0x00000047,
+ 0x00000556, 0x0004003d, 0x00000023, 0x00000558, 0x00000557, 0x00050083, 0x00000023, 0x00000559,
+ 0x00000551, 0x00000558, 0x00050080, 0x00000008, 0x0000055e, 0x00000540, 0x0000053c, 0x00060041,
+ 0x000002fa, 0x0000055f, 0x000002ef, 0x00000047, 0x0000055e, 0x0004003d, 0x00000023, 0x00000560,
+ 0x0000055f, 0x00050082, 0x00000008, 0x00000565, 0x00000540, 0x0000053c, 0x00060041, 0x000002fa,
+ 0x00000566, 0x000002ef, 0x00000047, 0x00000565, 0x0004003d, 0x00000023, 0x00000567, 0x00000566,
+ 0x00050083, 0x00000023, 0x00000568, 0x00000560, 0x00000567, 0x00060050, 0x00000024, 0x00000569,
+ 0x0000054a, 0x00000559, 0x00000568, 0x0005008e, 0x00000024, 0x0000056b, 0x00000569, 0x000004fb,
+ 0x0006000c, 0x00000023, 0x0000056d, 0x00000001, 0x00000042, 0x0000056b, 0x00050081, 0x00000023,
+ 0x0000056f, 0x0000056d, 0x0000056e, 0x00060050, 0x00000024, 0x00000571, 0x0000056f, 0x0000056f,
+ 0x0000056f, 0x00050088, 0x00000024, 0x00000572, 0x0000056b, 0x00000571, 0x00050080, 0x00000008,
+ 0x00000576, 0x000004f4, 0x00000bca, 0x00060041, 0x000002fa, 0x00000577, 0x000002ef, 0x00000047,
+ 0x00000576, 0x0004003d, 0x00000023, 0x00000578, 0x00000577, 0x00050080, 0x00000008, 0x0000057b,
+ 0x000004f4, 0x0000035e, 0x00050080, 0x00000008, 0x0000057d, 0x0000057b, 0x00000bca, 0x00060041,
+ 0x000002fa, 0x0000057e, 0x000002ef, 0x00000047, 0x0000057d, 0x0004003d, 0x00000023, 0x0000057f,
+ 0x0000057e, 0x00050084, 0x00000008, 0x00000582, 0x0000008a, 0x0000035e, 0x00050080, 0x00000008,
+ 0x00000583, 0x000004f4, 0x00000582, 0x00050080, 0x00000008, 0x00000585, 0x00000583, 0x00000bca,
+ 0x00060041, 0x000002fa, 0x00000586, 0x000002ef, 0x00000047, 0x00000585, 0x0004003d, 0x00000023,
+ 0x00000587, 0x00000586, 0x00060050, 0x00000024, 0x00000588, 0x00000578, 0x0000057f, 0x00000587,
+ 0x0007000c, 0x00000024, 0x0000058c, 0x00000001, 0x00000044, 0x00000572, 0x00000588, 0x0005008e,
+ 0x00000024, 0x0000058d, 0x0000058c, 0x000004f8, 0x000200f9, 0x0000052f, 0x000200f8, 0x0000052f,
+ 0x000700f5, 0x00000024, 0x000018c4, 0x0000027c, 0x000004ff, 0x0000058d, 0x0000052e, 0x00060041,
+ 0x000003d3, 0x0000058f, 0x00000046, 0x000003d2, 0x0000008a, 0x0004003d, 0x00000023, 0x00000590,
+ 0x0000058f, 0x000500ba, 0x00000285, 0x00000592, 0x00000590, 0x000000b4, 0x000300f7, 0x00000594,
+ 0x00000000, 0x000400fa, 0x00000592, 0x00000593, 0x00000594, 0x000200f8, 0x00000593, 0x00060041,
+ 0x0000008b, 0x00000596, 0x00000046, 0x0000005b, 0x00000346, 0x0004003d, 0x00000008, 0x00000597,
+ 0x00000596, 0x00050080, 0x00000008, 0x00000599, 0x00000597, 0x00000bca, 0x00060041, 0x000002fa,
+ 0x0000059a, 0x000002ef, 0x00000047, 0x00000599, 0x0004003d, 0x00000023, 0x0000059b, 0x0000059a,
+ 0x00060041, 0x0000008b, 0x0000059c, 0x00000046, 0x00000089, 0x0000004d, 0x0004003d, 0x00000008,
+ 0x0000059d, 0x0000059c, 0x00050080, 0x00000008, 0x0000059f, 0x0000059d, 0x00000bca, 0x00060041,
+ 0x000002fa, 0x000005a0, 0x000002ef, 0x00000047, 0x0000059f, 0x0004003d, 0x00000023, 0x000005a1,
+ 0x000005a0, 0x00050081, 0x00000023, 0x000005a2, 0x0000059b, 0x000005a1, 0x0007000c, 0x00000023,
+ 0x000005a3, 0x00000001, 0x00000025, 0x000000b3, 0x000005a2, 0x000500ba, 0x00000285, 0x000005a6,
+ 0x000005a3, 0x000005a5, 0x000300f7, 0x000005a8, 0x00000000, 0x000400fa, 0x000005a6, 0x000005a7,
+ 0x000005a8, 0x000200f8, 0x000005a7, 0x00060041, 0x000003d3, 0x000005ab, 0x00000046, 0x000005aa,
+ 0x0000008a, 0x0004003d, 0x00000023, 0x000005ac, 0x000005ab, 0x00060041, 0x000003d3, 0x000005ad,
+ 0x00000046, 0x000005aa, 0x00000346, 0x0004003d, 0x00000023, 0x000005ae, 0x000005ad, 0x00060041,
+ 0x000003d3, 0x000005b0, 0x00000046, 0x000005af, 0x00000048, 0x0004003d, 0x00000023, 0x000005b1,
+ 0x000005b0, 0x00060050, 0x00000024, 0x000005b2, 0x000005ac, 0x000005ae, 0x000005b1, 0x0004006f,
+ 0x00000024, 0x000005b4, 0x0000034e, 0x00050081, 0x00000024, 0x000005b6, 0x000005b4, 0x000018cf,
+ 0x00060041, 0x000003d3, 0x000005b7, 0x00000046, 0x000005aa, 0x0000004d, 0x0004003d, 0x00000023,
+ 0x000005b8, 0x000005b7, 0x0005008e, 0x00000024, 0x000005b9, 0x000005b6, 0x000005b8, 0x00050081,
+ 0x00000024, 0x000005ba, 0x000005b2, 0x000005b9, 0x00060041, 0x0000008b, 0x00000bdf, 0x00000046,
+ 0x0000005b, 0x00000048, 0x0004003d, 0x00000008, 0x00000be0, 0x00000bdf, 0x00050080, 0x00000006,
+ 0x00000c24, 0x00000351, 0x0000005b, 0x00050084, 0x00000006, 0x00000c2b, 0x00000c24, 0x00000bc7,
+ 0x00050080, 0x00000006, 0x00000c2c, 0x000004ea, 0x00000c2b, 0x0004007c, 0x00000008, 0x00000c2d,
+ 0x00000c2c, 0x00050080, 0x00000008, 0x00000be5, 0x00000be0, 0x00000c2d, 0x00060041, 0x000002fa,
+ 0x00000be6, 0x000002ef, 0x00000047, 0x00000be5, 0x0004003d, 0x00000023, 0x00000be7, 0x00000be6,
+ 0x00050080, 0x00000006, 0x00000beb, 0x000004ea, 0x0000005b, 0x00050080, 0x00000006, 0x00000c3b,
+ 0x00000beb, 0x00000c2b, 0x0004007c, 0x00000008, 0x00000c3c, 0x00000c3b, 0x00050080, 0x00000008,
+ 0x00000bef, 0x00000be0, 0x00000c3c, 0x00060041, 0x000002fa, 0x00000bf0, 0x000002ef, 0x00000047,
+ 0x00000bef, 0x0004003d, 0x00000023, 0x00000bf1, 0x00000bf0, 0x00050081, 0x00000023, 0x00000bf2,
+ 0x00000be7, 0x00000bf1, 0x00050085, 0x00000023, 0x00000bf3, 0x000002e2, 0x00000bf2, 0x00060041,
+ 0x0000008b, 0x00000bf4, 0x00000046, 0x0000005b, 0x0000004d, 0x0004003d, 0x00000008, 0x00000bf5,
+ 0x00000bf4, 0x00050080, 0x00000006, 0x00000c45, 0x00000354, 0x0000005b, 0x00050084, 0x00000006,
+ 0x00000c47, 0x00000c45, 0x000004f0, 0x00050080, 0x00000006, 0x00000c48, 0x000004ed, 0x00000c47,
+ 0x00050084, 0x00000006, 0x00000c49, 0x00000351, 0x00000c48, 0x00050080, 0x00000006, 0x00000c4a,
+ 0x000004ea, 0x00000c49, 0x0004007c, 0x00000008, 0x00000c4b, 0x00000c4a, 0x00050080, 0x00000008,
+ 0x00000bfa, 0x00000bf5, 0x00000c4b, 0x00060041, 0x000002fa, 0x00000bfb, 0x000002ef, 0x00000047,
+ 0x00000bfa, 0x0004003d, 0x00000023, 0x00000bfc, 0x00000bfb, 0x00050080, 0x00000006, 0x00000c00,
+ 0x000004ed, 0x0000005b, 0x00050080, 0x00000006, 0x00000c57, 0x00000c00, 0x00000c47, 0x00050084,
+ 0x00000006, 0x00000c58, 0x00000351, 0x00000c57, 0x00050080, 0x00000006, 0x00000c59, 0x000004ea,
+ 0x00000c58, 0x0004007c, 0x00000008, 0x00000c5a, 0x00000c59, 0x00050080, 0x00000008, 0x00000c04,
+ 0x00000bf5, 0x00000c5a, 0x00060041, 0x000002fa, 0x00000c05, 0x000002ef, 0x00000047, 0x00000c04,
+ 0x0004003d, 0x00000023, 0x00000c06, 0x00000c05, 0x00050081, 0x00000023, 0x00000c07, 0x00000bfc,
+ 0x00000c06, 0x00050085, 0x00000023, 0x00000c08, 0x000002e2, 0x00000c07, 0x00060041, 0x0000008b,
+ 0x00000c09, 0x00000046, 0x0000005b, 0x0000008a, 0x0004003d, 0x00000008, 0x00000c0a, 0x00000c09,
+ 0x00050080, 0x00000008, 0x00000c0f, 0x00000c0a, 0x00000bca, 0x00060041, 0x000002fa, 0x00000c10,
+ 0x000002ef, 0x00000047, 0x00000c0f, 0x0004003d, 0x00000023, 0x00000c11, 0x00000c10, 0x00050080,
+ 0x00000006, 0x00000c15, 0x000004f0, 0x0000005b, 0x00050084, 0x00000006, 0x00000c72, 0x00000354,
+ 0x00000c15, 0x00050080, 0x00000006, 0x00000c73, 0x000004ed, 0x00000c72, 0x00050084, 0x00000006,
+ 0x00000c74, 0x00000351, 0x00000c73, 0x00050080, 0x00000006, 0x00000c75, 0x000004ea, 0x00000c74,
+ 0x0004007c, 0x00000008, 0x00000c76, 0x00000c75, 0x00050080, 0x00000008, 0x00000c19, 0x00000c0a,
+ 0x00000c76, 0x00060041, 0x000002fa, 0x00000c1a, 0x000002ef, 0x00000047, 0x00000c19, 0x0004003d,
+ 0x00000023, 0x00000c1b, 0x00000c1a, 0x00050081, 0x00000023, 0x00000c1c, 0x00000c11, 0x00000c1b,
+ 0x00050085, 0x00000023, 0x00000c1d, 0x000002e2, 0x00000c1c, 0x00060050, 0x00000024, 0x00000c1e,
+ 0x00000bf3, 0x00000c08, 0x00000c1d, 0x0006000c, 0x00000023, 0x000005c6, 0x00000001, 0x00000042,
+ 0x00000c1e, 0x00050085, 0x00000023, 0x000005c8, 0x000002e2, 0x00000590, 0x00050088, 0x00000023,
+ 0x000005c9, 0x000005c6, 0x000005c8, 0x00050083, 0x00000023, 0x000005ca, 0x000000b3, 0x000005c9,
+ 0x0007000c, 0x00000023, 0x000005cb, 0x00000001, 0x00000028, 0x000000b4, 0x000005ca, 0x00050085,
+ 0x00000023, 0x000005ce, 0x00000590, 0x000005a3, 0x00050085, 0x00000023, 0x000005d0, 0x000005ce,
+ 0x000005cb, 0x00060041, 0x000003d3, 0x000005d2, 0x00000046, 0x000003d2, 0x00000346, 0x0004003d,
+ 0x00000023, 0x000005d3, 0x000005d2, 0x0005008e, 0x00000024, 0x000005d4, 0x000005ba, 0x000005d3,
+ 0x00060041, 0x000003d3, 0x000005d7, 0x00000046, 0x000005aa, 0x00000048, 0x0004003d, 0x00000023,
+ 0x000005d8, 0x000005d7, 0x00060041, 0x0000008b, 0x000005db, 0x00000046, 0x00000089, 0x00000346,
+ 0x0004003d, 0x00000008, 0x000005dc, 0x000005db, 0x000200f9, 0x00000c88, 0x000200f8, 0x00000c88,
+ 0x000700f5, 0x00000023, 0x000018ce, 0x000000b3, 0x000005a7, 0x00000cd3, 0x00000c8d, 0x000700f5,
+ 0x00000023, 0x000018cd, 0x000000b3, 0x000005a7, 0x00000cd5, 0x00000c8d, 0x000700f5, 0x00000024,
+ 0x000018c2, 0x0000027c, 0x000005a7, 0x00000cd1, 0x00000c8d, 0x000700f5, 0x00000006, 0x000018c1,
+ 0x00000047, 0x000005a7, 0x00000c95, 0x00000c8d, 0x000500b1, 0x00000285, 0x00000c8c, 0x000018c1,
+ 0x00000089, 0x000400f6, 0x00000cd9, 0x00000c8d, 0x00000000, 0x000400fa, 0x00000c8c, 0x00000c8d,
+ 0x00000cd9, 0x000200f8, 0x00000c8d, 0x00050051, 0x00000023, 0x00000c8f, 0x000005d4, 0x00000000,
+ 0x00050085, 0x00000023, 0x00000c91, 0x00000c8f, 0x000018cd, 0x00050085, 0x00000023, 0x00000c93,
+ 0x000005d8, 0x0000028d, 0x00050080, 0x00000006, 0x00000c95, 0x000018c1, 0x0000005b, 0x0004006f,
+ 0x00000023, 0x00000c96, 0x00000c95, 0x00050085, 0x00000023, 0x00000c97, 0x00000c93, 0x00000c96,
+ 0x00050081, 0x00000023, 0x00000c98, 0x00000c91, 0x00000c97, 0x00050051, 0x00000023, 0x00000c9a,
+ 0x000005d4, 0x00000001, 0x00050085, 0x00000023, 0x00000c9c, 0x00000c9a, 0x000018cd, 0x00050085,
+ 0x00000023, 0x00000c9e, 0x000005d8, 0x00000299, 0x00050083, 0x00000023, 0x00000c9f, 0x00000c9c,
+ 0x00000c9e, 0x00050051, 0x00000023, 0x00000ca1, 0x000005d4, 0x00000002, 0x00050085, 0x00000023,
+ 0x00000ca3, 0x00000ca1, 0x000018cd, 0x00050085, 0x00000023, 0x00000ca5, 0x000005d8, 0x000002a1,
+ 0x00050080, 0x00000006, 0x00000ca7, 0x000018c1, 0x00000089, 0x0004006f, 0x00000023, 0x00000ca8,
+ 0x00000ca7, 0x00050085, 0x00000023, 0x00000ca9, 0x00000ca5, 0x00000ca8, 0x00050081, 0x00000023,
+ 0x00000caa, 0x00000ca3, 0x00000ca9, 0x00060050, 0x00000024, 0x00000cab, 0x00000c98, 0x00000c9f,
+ 0x00000caa, 0x0004007c, 0x00000008, 0x00000cae, 0x000018c1, 0x00050084, 0x00000008, 0x00000caf,
+ 0x000002ab, 0x00000cae, 0x00050080, 0x00000008, 0x00000cb0, 0x000005dc, 0x00000caf, 0x0006000c,
+ 0x00000024, 0x00000d1b, 0x00000001, 0x00000008, 0x00000cab, 0x0004006e, 0x000000cf, 0x00000d1d,
+ 0x00000d1b, 0x00050083, 0x00000024, 0x00000d20, 0x00000cab, 0x00000d1b, 0x00050085, 0x00000024,
+ 0x00000d23, 0x00000d20, 0x00000d20, 0x00050085, 0x00000024, 0x00000d25, 0x00000d23, 0x00000d20,
+ 0x0005008e, 0x00000024, 0x00000d28, 0x00000d20, 0x000000e0, 0x00050083, 0x00000024, 0x00000d2a,
+ 0x00000d28, 0x000018d1, 0x00050085, 0x00000024, 0x00000d2b, 0x00000d20, 0x00000d2a, 0x00050081,
+ 0x00000024, 0x00000d2d, 0x00000d2b, 0x000018d2, 0x00050085, 0x00000024, 0x00000d2e, 0x00000d25,
+ 0x00000d2d, 0x0005008e, 0x00000024, 0x00000d30, 0x00000d20, 0x000000eb, 0x00050085, 0x00000024,
+ 0x00000d32, 0x00000d30, 0x00000d20, 0x00050083, 0x00000024, 0x00000d36, 0x00000d20, 0x000018d3,
+ 0x00050085, 0x00000024, 0x00000d37, 0x00000d20, 0x00000d36, 0x00050081, 0x00000024, 0x00000d39,
+ 0x00000d37, 0x00000195, 0x00050085, 0x00000024, 0x00000d3a, 0x00000d32, 0x00000d39, 0x00050051,
+ 0x00000006, 0x00000d3c, 0x00000d1d, 0x00000000, 0x00050051, 0x00000006, 0x00000d3e, 0x00000d1d,
+ 0x00000001, 0x00050051, 0x00000006, 0x00000d40, 0x00000d1d, 0x00000002, 0x00050084, 0x00000008,
+ 0x00000e86, 0x00000cb0, 0x0000009a, 0x0004007c, 0x00000006, 0x00000e87, 0x00000e86, 0x00050080,
+ 0x00000006, 0x00000e88, 0x00000d3c, 0x00000e87, 0x000500c7, 0x00000006, 0x00000e89, 0x00000e88,
+ 0x0000009e, 0x0004007c, 0x00000008, 0x00000e8a, 0x00000e89, 0x00060041, 0x0000008b, 0x00000e9e,
+ 0x00000046, 0x00000089, 0x0000008a, 0x0004003d, 0x00000008, 0x00000e9f, 0x00000e9e, 0x000500c7,
+ 0x00000008, 0x00000ea1, 0x00000e8a, 0x0000008f, 0x00050080, 0x00000008, 0x00000ea2, 0x00000e9f,
+ 0x00000ea1, 0x00060041, 0x00000092, 0x00000ea3, 0x00000088, 0x00000047, 0x00000ea2, 0x0004003d,
+ 0x00000008, 0x00000ea4, 0x00000ea3, 0x000500c7, 0x00000006, 0x00000e8e, 0x00000d3e, 0x0000009e,
+ 0x0004007c, 0x00000008, 0x00000e8f, 0x00000e8e, 0x00050080, 0x00000008, 0x00000e90, 0x00000ea4,
+ 0x00000e8f, 0x000500c7, 0x00000008, 0x00000eaa, 0x00000e90, 0x0000008f, 0x00050080, 0x00000008,
+ 0x00000eab, 0x00000e9f, 0x00000eaa, 0x00060041, 0x00000092, 0x00000eac, 0x00000088, 0x00000047,
+ 0x00000eab, 0x0004003d, 0x00000008, 0x00000ead, 0x00000eac, 0x000500c7, 0x00000006, 0x00000e94,
+ 0x00000d40, 0x0000009e, 0x0004007c, 0x00000008, 0x00000e95, 0x00000e94, 0x00050080, 0x00000008,
+ 0x00000e96, 0x00000ead, 0x00000e95, 0x000500c7, 0x00000008, 0x00000eb3, 0x00000e96, 0x0000008f,
+ 0x00050080, 0x00000008, 0x00000eb4, 0x00000e9f, 0x00000eb3, 0x00060041, 0x00000092, 0x00000eb5,
+ 0x00000088, 0x00000047, 0x00000eb4, 0x0004003d, 0x00000008, 0x00000eb6, 0x00000eb5, 0x000500c7,
+ 0x00000008, 0x00000e99, 0x00000eb6, 0x000000c4, 0x0003003e, 0x00000e81, 0x000000c2, 0x00050041,
+ 0x0000002c, 0x00000e9a, 0x00000e81, 0x00000e99, 0x0004003d, 0x00000024, 0x00000e9b, 0x00000e9a,
+ 0x00050080, 0x00000006, 0x00000d45, 0x00000d3c, 0x0000005b, 0x00050080, 0x00000006, 0x00000ec2,
+ 0x00000d45, 0x00000e87, 0x000500c7, 0x00000006, 0x00000ec3, 0x00000ec2, 0x0000009e, 0x0004007c,
+ 0x00000008, 0x00000ec4, 0x00000ec3, 0x000500c7, 0x00000008, 0x00000edb, 0x00000ec4, 0x0000008f,
+ 0x00050080, 0x00000008, 0x00000edc, 0x00000e9f, 0x00000edb, 0x00060041, 0x00000092, 0x00000edd,
+ 0x00000088, 0x00000047, 0x00000edc, 0x0004003d, 0x00000008, 0x00000ede, 0x00000edd, 0x00050080,
+ 0x00000008, 0x00000eca, 0x00000ede, 0x00000e8f, 0x000500c7, 0x00000008, 0x00000ee4, 0x00000eca,
+ 0x0000008f, 0x00050080, 0x00000008, 0x00000ee5, 0x00000e9f, 0x00000ee4, 0x00060041, 0x00000092,
+ 0x00000ee6, 0x00000088, 0x00000047, 0x00000ee5, 0x0004003d, 0x00000008, 0x00000ee7, 0x00000ee6,
+ 0x00050080, 0x00000008, 0x00000ed0, 0x00000ee7, 0x00000e95, 0x000500c7, 0x00000008, 0x00000eed,
+ 0x00000ed0, 0x0000008f, 0x00050080, 0x00000008, 0x00000eee, 0x00000e9f, 0x00000eed, 0x00060041,
+ 0x00000092, 0x00000eef, 0x00000088, 0x00000047, 0x00000eee, 0x0004003d, 0x00000008, 0x00000ef0,
+ 0x00000eef, 0x000500c7, 0x00000008, 0x00000ed3, 0x00000ef0, 0x000000c4, 0x0003003e, 0x00000ebb,
+ 0x000000c2, 0x00050041, 0x0000002c, 0x00000ed4, 0x00000ebb, 0x00000ed3, 0x0004003d, 0x00000024,
+ 0x00000ed5, 0x00000ed4, 0x00050080, 0x00000006, 0x00000d4e, 0x00000d3e, 0x0000005b, 0x0004003d,
+ 0x00000008, 0x00000f18, 0x00000ea3, 0x000500c7, 0x00000006, 0x00000f02, 0x00000d4e, 0x0000009e,
+ 0x0004007c, 0x00000008, 0x00000f03, 0x00000f02, 0x00050080, 0x00000008, 0x00000f04, 0x00000f18,
+ 0x00000f03, 0x000500c7, 0x00000008, 0x00000f1e, 0x00000f04, 0x0000008f, 0x00050080, 0x00000008,
+ 0x00000f1f, 0x00000e9f, 0x00000f1e, 0x00060041, 0x00000092, 0x00000f20, 0x00000088, 0x00000047,
+ 0x00000f1f, 0x0004003d, 0x00000008, 0x00000f21, 0x00000f20, 0x00050080, 0x00000008, 0x00000f0a,
+ 0x00000f21, 0x00000e95, 0x000500c7, 0x00000008, 0x00000f27, 0x00000f0a, 0x0000008f, 0x00050080,
+ 0x00000008, 0x00000f28, 0x00000e9f, 0x00000f27, 0x00060041, 0x00000092, 0x00000f29, 0x00000088,
+ 0x00000047, 0x00000f28, 0x0004003d, 0x00000008, 0x00000f2a, 0x00000f29, 0x000500c7, 0x00000008,
+ 0x00000f0d, 0x00000f2a, 0x000000c4, 0x0003003e, 0x00000ef5, 0x000000c2, 0x00050041, 0x0000002c,
+ 0x00000f0e, 0x00000ef5, 0x00000f0d, 0x0004003d, 0x00000024, 0x00000f0f, 0x00000f0e, 0x0004003d,
+ 0x00000008, 0x00000f52, 0x00000edd, 0x00050080, 0x00000008, 0x00000f3e, 0x00000f52, 0x00000f03,
+ 0x000500c7, 0x00000008, 0x00000f58, 0x00000f3e, 0x0000008f, 0x00050080, 0x00000008, 0x00000f59,
+ 0x00000e9f, 0x00000f58, 0x00060041, 0x00000092, 0x00000f5a, 0x00000088, 0x00000047, 0x00000f59,
+ 0x0004003d, 0x00000008, 0x00000f5b, 0x00000f5a, 0x00050080, 0x00000008, 0x00000f44, 0x00000f5b,
+ 0x00000e95, 0x000500c7, 0x00000008, 0x00000f61, 0x00000f44, 0x0000008f, 0x00050080, 0x00000008,
+ 0x00000f62, 0x00000e9f, 0x00000f61, 0x00060041, 0x00000092, 0x00000f63, 0x00000088, 0x00000047,
+ 0x00000f62, 0x0004003d, 0x00000008, 0x00000f64, 0x00000f63, 0x000500c7, 0x00000008, 0x00000f47,
+ 0x00000f64, 0x000000c4, 0x0003003e, 0x00000f2f, 0x000000c2, 0x00050041, 0x0000002c, 0x00000f48,
+ 0x00000f2f, 0x00000f47, 0x0004003d, 0x00000024, 0x00000f49, 0x00000f48, 0x00050080, 0x00000006,
+ 0x00000d61, 0x00000d40, 0x0000005b, 0x0004003d, 0x00000008, 0x00000f8c, 0x00000ea3, 0x00050080,
+ 0x00000008, 0x00000f78, 0x00000f8c, 0x00000e8f, 0x000500c7, 0x00000008, 0x00000f92, 0x00000f78,
+ 0x0000008f, 0x00050080, 0x00000008, 0x00000f93, 0x00000e9f, 0x00000f92, 0x00060041, 0x00000092,
+ 0x00000f94, 0x00000088, 0x00000047, 0x00000f93, 0x0004003d, 0x00000008, 0x00000f95, 0x00000f94,
+ 0x000500c7, 0x00000006, 0x00000f7c, 0x00000d61, 0x0000009e, 0x0004007c, 0x00000008, 0x00000f7d,
+ 0x00000f7c, 0x00050080, 0x00000008, 0x00000f7e, 0x00000f95, 0x00000f7d, 0x000500c7, 0x00000008,
+ 0x00000f9b, 0x00000f7e, 0x0000008f, 0x00050080, 0x00000008, 0x00000f9c, 0x00000e9f, 0x00000f9b,
+ 0x00060041, 0x00000092, 0x00000f9d, 0x00000088, 0x00000047, 0x00000f9c, 0x0004003d, 0x00000008,
+ 0x00000f9e, 0x00000f9d, 0x000500c7, 0x00000008, 0x00000f81, 0x00000f9e, 0x000000c4, 0x0003003e,
+ 0x00000f69, 0x000000c2, 0x00050041, 0x0000002c, 0x00000f82, 0x00000f69, 0x00000f81, 0x0004003d,
+ 0x00000024, 0x00000f83, 0x00000f82, 0x0004003d, 0x00000008, 0x00000fc6, 0x00000edd, 0x00050080,
+ 0x00000008, 0x00000fb2, 0x00000fc6, 0x00000e8f, 0x000500c7, 0x00000008, 0x00000fcc, 0x00000fb2,
+ 0x0000008f, 0x00050080, 0x00000008, 0x00000fcd, 0x00000e9f, 0x00000fcc, 0x00060041, 0x00000092,
+ 0x00000fce, 0x00000088, 0x00000047, 0x00000fcd, 0x0004003d, 0x00000008, 0x00000fcf, 0x00000fce,
+ 0x00050080, 0x00000008, 0x00000fb8, 0x00000fcf, 0x00000f7d, 0x000500c7, 0x00000008, 0x00000fd5,
+ 0x00000fb8, 0x0000008f, 0x00050080, 0x00000008, 0x00000fd6, 0x00000e9f, 0x00000fd5, 0x00060041,
+ 0x00000092, 0x00000fd7, 0x00000088, 0x00000047, 0x00000fd6, 0x0004003d, 0x00000008, 0x00000fd8,
+ 0x00000fd7, 0x000500c7, 0x00000008, 0x00000fbb, 0x00000fd8, 0x000000c4, 0x0003003e, 0x00000fa3,
+ 0x000000c2, 0x00050041, 0x0000002c, 0x00000fbc, 0x00000fa3, 0x00000fbb, 0x0004003d, 0x00000024,
+ 0x00000fbd, 0x00000fbc, 0x0004003d, 0x00000008, 0x00001000, 0x00000ea3, 0x00050080, 0x00000008,
+ 0x00000fec, 0x00001000, 0x00000f03, 0x000500c7, 0x00000008, 0x00001006, 0x00000fec, 0x0000008f,
+ 0x00050080, 0x00000008, 0x00001007, 0x00000e9f, 0x00001006, 0x00060041, 0x00000092, 0x00001008,
+ 0x00000088, 0x00000047, 0x00001007, 0x0004003d, 0x00000008, 0x00001009, 0x00001008, 0x00050080,
+ 0x00000008, 0x00000ff2, 0x00001009, 0x00000f7d, 0x000500c7, 0x00000008, 0x0000100f, 0x00000ff2,
+ 0x0000008f, 0x00050080, 0x00000008, 0x00001010, 0x00000e9f, 0x0000100f, 0x00060041, 0x00000092,
+ 0x00001011, 0x00000088, 0x00000047, 0x00001010, 0x0004003d, 0x00000008, 0x00001012, 0x00001011,
+ 0x000500c7, 0x00000008, 0x00000ff5, 0x00001012, 0x000000c4, 0x0003003e, 0x00000fdd, 0x000000c2,
+ 0x00050041, 0x0000002c, 0x00000ff6, 0x00000fdd, 0x00000ff5, 0x0004003d, 0x00000024, 0x00000ff7,
+ 0x00000ff6, 0x0004003d, 0x00000008, 0x0000103a, 0x00000edd, 0x00050080, 0x00000008, 0x00001026,
+ 0x0000103a, 0x00000f03, 0x000500c7, 0x00000008, 0x00001040, 0x00001026, 0x0000008f, 0x00050080,
+ 0x00000008, 0x00001041, 0x00000e9f, 0x00001040, 0x00060041, 0x00000092, 0x00001042, 0x00000088,
+ 0x00000047, 0x00001041, 0x0004003d, 0x00000008, 0x00001043, 0x00001042, 0x00050080, 0x00000008,
+ 0x0000102c, 0x00001043, 0x00000f7d, 0x000500c7, 0x00000008, 0x00001049, 0x0000102c, 0x0000008f,
+ 0x00050080, 0x00000008, 0x0000104a, 0x00000e9f, 0x00001049, 0x00060041, 0x00000092, 0x0000104b,
+ 0x00000088, 0x00000047, 0x0000104a, 0x0004003d, 0x00000008, 0x0000104c, 0x0000104b, 0x000500c7,
+ 0x00000008, 0x0000102f, 0x0000104c, 0x000000c4, 0x0003003e, 0x00001017, 0x000000c2, 0x00050041,
+ 0x0000002c, 0x00001030, 0x00001017, 0x0000102f, 0x0004003d, 0x00000024, 0x00001031, 0x00001030,
+ 0x00050094, 0x00000023, 0x00000d89, 0x00000e9b, 0x00000d20, 0x00050083, 0x00000024, 0x00000d8c,
+ 0x00000d20, 0x00000174, 0x00050094, 0x00000023, 0x00000d8d, 0x00000ed5, 0x00000d8c, 0x00050083,
+ 0x00000024, 0x00000d90, 0x00000d20, 0x0000017a, 0x00050094, 0x00000023, 0x00000d91, 0x00000f0f,
+ 0x00000d90, 0x00050083, 0x00000024, 0x00000d94, 0x00000d20, 0x000000b5, 0x00050094, 0x00000023,
+ 0x00000d95, 0x00000f49, 0x00000d94, 0x00050083, 0x00000024, 0x00000d98, 0x00000d20, 0x00000185,
+ 0x00050094, 0x00000023, 0x00000d99, 0x00000f83, 0x00000d98, 0x00050083, 0x00000024, 0x00000d9c,
+ 0x00000d20, 0x000000ba, 0x00050094, 0x00000023, 0x00000d9d, 0x00000fbd, 0x00000d9c, 0x00050083,
+ 0x00000024, 0x00000da0, 0x00000d20, 0x000000be, 0x00050094, 0x00000023, 0x00000da1, 0x00000ff7,
+ 0x00000da0, 0x00050083, 0x00000024, 0x00000da4, 0x00000d20, 0x00000195, 0x00050094, 0x00000023,
+ 0x00000da5, 0x00001031, 0x00000da4, 0x00050083, 0x00000023, 0x00000dab, 0x00000d91, 0x00000d89,
+ 0x00050083, 0x00000023, 0x00000dae, 0x00000d99, 0x00000d89, 0x00050083, 0x00000023, 0x00000db1,
+ 0x00000d89, 0x00000d8d, 0x00050083, 0x00000023, 0x00000db3, 0x00000db1, 0x00000d91, 0x00050081,
+ 0x00000023, 0x00000db5, 0x00000db3, 0x00000d95, 0x00050083, 0x00000023, 0x00000db8, 0x00000d89,
+ 0x00000d91, 0x00050083, 0x00000023, 0x00000dba, 0x00000db8, 0x00000d99, 0x00050081, 0x00000023,
+ 0x00000dbc, 0x00000dba, 0x00000da1, 0x00050083, 0x00000023, 0x00000dc1, 0x00000db1, 0x00000d99,
+ 0x00050081, 0x00000023, 0x00000dc3, 0x00000dc1, 0x00000d9d, 0x00050083, 0x00000023, 0x00000dc7,
+ 0x00000d8d, 0x00000d89, 0x00050081, 0x00000023, 0x00000dc9, 0x00000dc7, 0x00000d91, 0x00050083,
+ 0x00000023, 0x00000dcb, 0x00000dc9, 0x00000d95, 0x00050081, 0x00000023, 0x00000dcd, 0x00000dcb,
+ 0x00000d99, 0x00050083, 0x00000023, 0x00000dcf, 0x00000dcd, 0x00000d9d, 0x00050083, 0x00000023,
+ 0x00000dd1, 0x00000dcf, 0x00000da1, 0x00050081, 0x00000023, 0x00000dd3, 0x00000dd1, 0x00000da5,
+ 0x00050051, 0x00000023, 0x00000dd6, 0x00000d2e, 0x00000000, 0x00050083, 0x00000024, 0x00000dd9,
+ 0x00000ed5, 0x00000e9b, 0x0005008e, 0x00000024, 0x00000dda, 0x00000dd9, 0x00000dd6, 0x00050081,
+ 0x00000024, 0x00000ddb, 0x00000e9b, 0x00000dda, 0x00050051, 0x00000023, 0x00000ddd, 0x00000d2e,
+ 0x00000001, 0x00050083, 0x00000024, 0x00000de0, 0x00000f0f, 0x00000e9b, 0x0005008e, 0x00000024,
+ 0x00000de1, 0x00000de0, 0x00000ddd, 0x00050081, 0x00000024, 0x00000de2, 0x00000ddb, 0x00000de1,
+ 0x00050051, 0x00000023, 0x00000de4, 0x00000d2e, 0x00000002, 0x00050083, 0x00000024, 0x00000de7,
+ 0x00000f83, 0x00000e9b, 0x0005008e, 0x00000024, 0x00000de8, 0x00000de7, 0x00000de4, 0x00050081,
+ 0x00000024, 0x00000de9, 0x00000de2, 0x00000de8, 0x00050085, 0x00000023, 0x00000dee, 0x00000dd6,
+ 0x00000ddd, 0x00050083, 0x00000024, 0x00000df1, 0x00000e9b, 0x00000ed5, 0x00050083, 0x00000024,
+ 0x00000df3, 0x00000df1, 0x00000f0f, 0x00050081, 0x00000024, 0x00000df5, 0x00000df3, 0x00000f49,
+ 0x0005008e, 0x00000024, 0x00000df6, 0x00000df5, 0x00000dee, 0x00050081, 0x00000024, 0x00000df7,
+ 0x00000de9, 0x00000df6, 0x00050085, 0x00000023, 0x00000dfc, 0x00000ddd, 0x00000de4, 0x00050083,
+ 0x00000024, 0x00000dff, 0x00000e9b, 0x00000f0f, 0x00050083, 0x00000024, 0x00000e01, 0x00000dff,
+ 0x00000f83, 0x00050081, 0x00000024, 0x00000e03, 0x00000e01, 0x00000ff7, 0x0005008e, 0x00000024,
+ 0x00000e04, 0x00000e03, 0x00000dfc, 0x00050081, 0x00000024, 0x00000e05, 0x00000df7, 0x00000e04,
+ 0x00050085, 0x00000023, 0x00000e0a, 0x00000de4, 0x00000dd6, 0x00050083, 0x00000024, 0x00000e0f,
+ 0x00000df1, 0x00000f83, 0x00050081, 0x00000024, 0x00000e11, 0x00000e0f, 0x00000fbd, 0x0005008e,
+ 0x00000024, 0x00000e12, 0x00000e11, 0x00000e0a, 0x00050081, 0x00000024, 0x00000e13, 0x00000e05,
+ 0x00000e12, 0x00050085, 0x00000023, 0x00000e1b, 0x00000dee, 0x00000de4, 0x00050081, 0x00000024,
+ 0x00000e21, 0x00000dd9, 0x00000f0f, 0x00050083, 0x00000024, 0x00000e23, 0x00000e21, 0x00000f49,
+ 0x00050081, 0x00000024, 0x00000e25, 0x00000e23, 0x00000f83, 0x00050083, 0x00000024, 0x00000e27,
+ 0x00000e25, 0x00000fbd, 0x00050083, 0x00000024, 0x00000e29, 0x00000e27, 0x00000ff7, 0x00050081,
+ 0x00000024, 0x00000e2b, 0x00000e29, 0x00001031, 0x0005008e, 0x00000024, 0x00000e2c, 0x00000e2b,
+ 0x00000e1b, 0x00050081, 0x00000024, 0x00000e2d, 0x00000e13, 0x00000e2c, 0x00050051, 0x00000023,
+ 0x00000e49, 0x00000d3a, 0x00000001, 0x00050085, 0x00000023, 0x00000e4e, 0x00000db5, 0x00000dd6,
+ 0x00050081, 0x00000023, 0x00000e4f, 0x00000dab, 0x00000e4e, 0x00050085, 0x00000023, 0x00000e53,
+ 0x00000dbc, 0x00000de4, 0x00050081, 0x00000023, 0x00000e54, 0x00000e4f, 0x00000e53, 0x00050085,
+ 0x00000023, 0x00000e58, 0x00000dd3, 0x00000dd6, 0x00050085, 0x00000023, 0x00000e5b, 0x00000e58,
+ 0x00000de4, 0x00050081, 0x00000023, 0x00000e5c, 0x00000e54, 0x00000e5b, 0x00050085, 0x00000023,
+ 0x00000e5d, 0x00000e49, 0x00000e5c, 0x00050051, 0x00000023, 0x00000e5f, 0x00000e2d, 0x00000001,
+ 0x00050081, 0x00000023, 0x00000e60, 0x00000e5f, 0x00000e5d, 0x00050051, 0x00000023, 0x00000e63,
+ 0x00000d3a, 0x00000002, 0x00050085, 0x00000023, 0x00000e68, 0x00000dbc, 0x00000ddd, 0x00050081,
+ 0x00000023, 0x00000e69, 0x00000dae, 0x00000e68, 0x00050085, 0x00000023, 0x00000e6d, 0x00000dc3,
+ 0x00000dd6, 0x00050081, 0x00000023, 0x00000e6e, 0x00000e69, 0x00000e6d, 0x00050085, 0x00000023,
+ 0x00000e75, 0x00000e58, 0x00000ddd, 0x00050081, 0x00000023, 0x00000e76, 0x00000e6e, 0x00000e75,
+ 0x00050085, 0x00000023, 0x00000e77, 0x00000e63, 0x00000e76, 0x00050051, 0x00000023, 0x00000e79,
+ 0x00000e2d, 0x00000002, 0x00050081, 0x00000023, 0x00000e7a, 0x00000e79, 0x00000e77, 0x00050081,
+ 0x00000024, 0x00000cb5, 0x00000cab, 0x000002bb, 0x00050080, 0x00000008, 0x00000cb7, 0x00000cb0,
+ 0x0000004d, 0x0006000c, 0x00000024, 0x0000108d, 0x00000001, 0x00000008, 0x00000cb5, 0x0004006e,
+ 0x000000cf, 0x0000108f, 0x0000108d, 0x00050083, 0x00000024, 0x00001092, 0x00000cb5, 0x0000108d,
+ 0x00050085, 0x00000024, 0x00001095, 0x00001092, 0x00001092, 0x00050085, 0x00000024, 0x00001097,
+ 0x00001095, 0x00001092, 0x0005008e, 0x00000024, 0x0000109a, 0x00001092, 0x000000e0, 0x00050083,
+ 0x00000024, 0x0000109c, 0x0000109a, 0x000018d1, 0x00050085, 0x00000024, 0x0000109d, 0x00001092,
+ 0x0000109c, 0x00050081, 0x00000024, 0x0000109f, 0x0000109d, 0x000018d2, 0x00050085, 0x00000024,
+ 0x000010a0, 0x00001097, 0x0000109f, 0x0005008e, 0x00000024, 0x000010a2, 0x00001092, 0x000000eb,
+ 0x00050085, 0x00000024, 0x000010a4, 0x000010a2, 0x00001092, 0x00050083, 0x00000024, 0x000010a8,
+ 0x00001092, 0x000018d3, 0x00050085, 0x00000024, 0x000010a9, 0x00001092, 0x000010a8, 0x00050081,
+ 0x00000024, 0x000010ab, 0x000010a9, 0x00000195, 0x00050085, 0x00000024, 0x000010ac, 0x000010a4,
+ 0x000010ab, 0x00050051, 0x00000006, 0x000010ae, 0x0000108f, 0x00000000, 0x00050051, 0x00000006,
+ 0x000010b0, 0x0000108f, 0x00000001, 0x00050051, 0x00000006, 0x000010b2, 0x0000108f, 0x00000002,
+ 0x00050084, 0x00000008, 0x000011f8, 0x00000cb7, 0x0000009a, 0x0004007c, 0x00000006, 0x000011f9,
+ 0x000011f8, 0x00050080, 0x00000006, 0x000011fa, 0x000010ae, 0x000011f9, 0x000500c7, 0x00000006,
+ 0x000011fb, 0x000011fa, 0x0000009e, 0x0004007c, 0x00000008, 0x000011fc, 0x000011fb, 0x000500c7,
+ 0x00000008, 0x00001213, 0x000011fc, 0x0000008f, 0x00050080, 0x00000008, 0x00001214, 0x00000e9f,
+ 0x00001213, 0x00060041, 0x00000092, 0x00001215, 0x00000088, 0x00000047, 0x00001214, 0x0004003d,
+ 0x00000008, 0x00001216, 0x00001215, 0x000500c7, 0x00000006, 0x00001200, 0x000010b0, 0x0000009e,
+ 0x0004007c, 0x00000008, 0x00001201, 0x00001200, 0x00050080, 0x00000008, 0x00001202, 0x00001216,
+ 0x00001201, 0x000500c7, 0x00000008, 0x0000121c, 0x00001202, 0x0000008f, 0x00050080, 0x00000008,
+ 0x0000121d, 0x00000e9f, 0x0000121c, 0x00060041, 0x00000092, 0x0000121e, 0x00000088, 0x00000047,
+ 0x0000121d, 0x0004003d, 0x00000008, 0x0000121f, 0x0000121e, 0x000500c7, 0x00000006, 0x00001206,
+ 0x000010b2, 0x0000009e, 0x0004007c, 0x00000008, 0x00001207, 0x00001206, 0x00050080, 0x00000008,
+ 0x00001208, 0x0000121f, 0x00001207, 0x000500c7, 0x00000008, 0x00001225, 0x00001208, 0x0000008f,
+ 0x00050080, 0x00000008, 0x00001226, 0x00000e9f, 0x00001225, 0x00060041, 0x00000092, 0x00001227,
+ 0x00000088, 0x00000047, 0x00001226, 0x0004003d, 0x00000008, 0x00001228, 0x00001227, 0x000500c7,
+ 0x00000008, 0x0000120b, 0x00001228, 0x000000c4, 0x0003003e, 0x000011f3, 0x000000c2, 0x00050041,
+ 0x0000002c, 0x0000120c, 0x000011f3, 0x0000120b, 0x0004003d, 0x00000024, 0x0000120d, 0x0000120c,
+ 0x00050080, 0x00000006, 0x000010b7, 0x000010ae, 0x0000005b, 0x00050080, 0x00000006, 0x00001234,
+ 0x000010b7, 0x000011f9, 0x000500c7, 0x00000006, 0x00001235, 0x00001234, 0x0000009e, 0x0004007c,
+ 0x00000008, 0x00001236, 0x00001235, 0x000500c7, 0x00000008, 0x0000124d, 0x00001236, 0x0000008f,
+ 0x00050080, 0x00000008, 0x0000124e, 0x00000e9f, 0x0000124d, 0x00060041, 0x00000092, 0x0000124f,
+ 0x00000088, 0x00000047, 0x0000124e, 0x0004003d, 0x00000008, 0x00001250, 0x0000124f, 0x00050080,
+ 0x00000008, 0x0000123c, 0x00001250, 0x00001201, 0x000500c7, 0x00000008, 0x00001256, 0x0000123c,
+ 0x0000008f, 0x00050080, 0x00000008, 0x00001257, 0x00000e9f, 0x00001256, 0x00060041, 0x00000092,
+ 0x00001258, 0x00000088, 0x00000047, 0x00001257, 0x0004003d, 0x00000008, 0x00001259, 0x00001258,
+ 0x00050080, 0x00000008, 0x00001242, 0x00001259, 0x00001207, 0x000500c7, 0x00000008, 0x0000125f,
+ 0x00001242, 0x0000008f, 0x00050080, 0x00000008, 0x00001260, 0x00000e9f, 0x0000125f, 0x00060041,
+ 0x00000092, 0x00001261, 0x00000088, 0x00000047, 0x00001260, 0x0004003d, 0x00000008, 0x00001262,
+ 0x00001261, 0x000500c7, 0x00000008, 0x00001245, 0x00001262, 0x000000c4, 0x0003003e, 0x0000122d,
+ 0x000000c2, 0x00050041, 0x0000002c, 0x00001246, 0x0000122d, 0x00001245, 0x0004003d, 0x00000024,
+ 0x00001247, 0x00001246, 0x00050080, 0x00000006, 0x000010c0, 0x000010b0, 0x0000005b, 0x0004003d,
+ 0x00000008, 0x0000128a, 0x00001215, 0x000500c7, 0x00000006, 0x00001274, 0x000010c0, 0x0000009e,
+ 0x0004007c, 0x00000008, 0x00001275, 0x00001274, 0x00050080, 0x00000008, 0x00001276, 0x0000128a,
+ 0x00001275, 0x000500c7, 0x00000008, 0x00001290, 0x00001276, 0x0000008f, 0x00050080, 0x00000008,
+ 0x00001291, 0x00000e9f, 0x00001290, 0x00060041, 0x00000092, 0x00001292, 0x00000088, 0x00000047,
+ 0x00001291, 0x0004003d, 0x00000008, 0x00001293, 0x00001292, 0x00050080, 0x00000008, 0x0000127c,
+ 0x00001293, 0x00001207, 0x000500c7, 0x00000008, 0x00001299, 0x0000127c, 0x0000008f, 0x00050080,
+ 0x00000008, 0x0000129a, 0x00000e9f, 0x00001299, 0x00060041, 0x00000092, 0x0000129b, 0x00000088,
+ 0x00000047, 0x0000129a, 0x0004003d, 0x00000008, 0x0000129c, 0x0000129b, 0x000500c7, 0x00000008,
+ 0x0000127f, 0x0000129c, 0x000000c4, 0x0003003e, 0x00001267, 0x000000c2, 0x00050041, 0x0000002c,
+ 0x00001280, 0x00001267, 0x0000127f, 0x0004003d, 0x00000024, 0x00001281, 0x00001280, 0x0004003d,
+ 0x00000008, 0x000012c4, 0x0000124f, 0x00050080, 0x00000008, 0x000012b0, 0x000012c4, 0x00001275,
+ 0x000500c7, 0x00000008, 0x000012ca, 0x000012b0, 0x0000008f, 0x00050080, 0x00000008, 0x000012cb,
+ 0x00000e9f, 0x000012ca, 0x00060041, 0x00000092, 0x000012cc, 0x00000088, 0x00000047, 0x000012cb,
+ 0x0004003d, 0x00000008, 0x000012cd, 0x000012cc, 0x00050080, 0x00000008, 0x000012b6, 0x000012cd,
+ 0x00001207, 0x000500c7, 0x00000008, 0x000012d3, 0x000012b6, 0x0000008f, 0x00050080, 0x00000008,
+ 0x000012d4, 0x00000e9f, 0x000012d3, 0x00060041, 0x00000092, 0x000012d5, 0x00000088, 0x00000047,
+ 0x000012d4, 0x0004003d, 0x00000008, 0x000012d6, 0x000012d5, 0x000500c7, 0x00000008, 0x000012b9,
+ 0x000012d6, 0x000000c4, 0x0003003e, 0x000012a1, 0x000000c2, 0x00050041, 0x0000002c, 0x000012ba,
+ 0x000012a1, 0x000012b9, 0x0004003d, 0x00000024, 0x000012bb, 0x000012ba, 0x00050080, 0x00000006,
+ 0x000010d3, 0x000010b2, 0x0000005b, 0x0004003d, 0x00000008, 0x000012fe, 0x00001215, 0x00050080,
+ 0x00000008, 0x000012ea, 0x000012fe, 0x00001201, 0x000500c7, 0x00000008, 0x00001304, 0x000012ea,
+ 0x0000008f, 0x00050080, 0x00000008, 0x00001305, 0x00000e9f, 0x00001304, 0x00060041, 0x00000092,
+ 0x00001306, 0x00000088, 0x00000047, 0x00001305, 0x0004003d, 0x00000008, 0x00001307, 0x00001306,
+ 0x000500c7, 0x00000006, 0x000012ee, 0x000010d3, 0x0000009e, 0x0004007c, 0x00000008, 0x000012ef,
+ 0x000012ee, 0x00050080, 0x00000008, 0x000012f0, 0x00001307, 0x000012ef, 0x000500c7, 0x00000008,
+ 0x0000130d, 0x000012f0, 0x0000008f, 0x00050080, 0x00000008, 0x0000130e, 0x00000e9f, 0x0000130d,
+ 0x00060041, 0x00000092, 0x0000130f, 0x00000088, 0x00000047, 0x0000130e, 0x0004003d, 0x00000008,
+ 0x00001310, 0x0000130f, 0x000500c7, 0x00000008, 0x000012f3, 0x00001310, 0x000000c4, 0x0003003e,
+ 0x000012db, 0x000000c2, 0x00050041, 0x0000002c, 0x000012f4, 0x000012db, 0x000012f3, 0x0004003d,
+ 0x00000024, 0x000012f5, 0x000012f4, 0x0004003d, 0x00000008, 0x00001338, 0x0000124f, 0x00050080,
+ 0x00000008, 0x00001324, 0x00001338, 0x00001201, 0x000500c7, 0x00000008, 0x0000133e, 0x00001324,
+ 0x0000008f, 0x00050080, 0x00000008, 0x0000133f, 0x00000e9f, 0x0000133e, 0x00060041, 0x00000092,
+ 0x00001340, 0x00000088, 0x00000047, 0x0000133f, 0x0004003d, 0x00000008, 0x00001341, 0x00001340,
+ 0x00050080, 0x00000008, 0x0000132a, 0x00001341, 0x000012ef, 0x000500c7, 0x00000008, 0x00001347,
+ 0x0000132a, 0x0000008f, 0x00050080, 0x00000008, 0x00001348, 0x00000e9f, 0x00001347, 0x00060041,
+ 0x00000092, 0x00001349, 0x00000088, 0x00000047, 0x00001348, 0x0004003d, 0x00000008, 0x0000134a,
+ 0x00001349, 0x000500c7, 0x00000008, 0x0000132d, 0x0000134a, 0x000000c4, 0x0003003e, 0x00001315,
+ 0x000000c2, 0x00050041, 0x0000002c, 0x0000132e, 0x00001315, 0x0000132d, 0x0004003d, 0x00000024,
+ 0x0000132f, 0x0000132e, 0x0004003d, 0x00000008, 0x00001372, 0x00001215, 0x00050080, 0x00000008,
+ 0x0000135e, 0x00001372, 0x00001275, 0x000500c7, 0x00000008, 0x00001378, 0x0000135e, 0x0000008f,
+ 0x00050080, 0x00000008, 0x00001379, 0x00000e9f, 0x00001378, 0x00060041, 0x00000092, 0x0000137a,
+ 0x00000088, 0x00000047, 0x00001379, 0x0004003d, 0x00000008, 0x0000137b, 0x0000137a, 0x00050080,
+ 0x00000008, 0x00001364, 0x0000137b, 0x000012ef, 0x000500c7, 0x00000008, 0x00001381, 0x00001364,
+ 0x0000008f, 0x00050080, 0x00000008, 0x00001382, 0x00000e9f, 0x00001381, 0x00060041, 0x00000092,
+ 0x00001383, 0x00000088, 0x00000047, 0x00001382, 0x0004003d, 0x00000008, 0x00001384, 0x00001383,
+ 0x000500c7, 0x00000008, 0x00001367, 0x00001384, 0x000000c4, 0x0003003e, 0x0000134f, 0x000000c2,
+ 0x00050041, 0x0000002c, 0x00001368, 0x0000134f, 0x00001367, 0x0004003d, 0x00000024, 0x00001369,
+ 0x00001368, 0x0004003d, 0x00000008, 0x000013ac, 0x0000124f, 0x00050080, 0x00000008, 0x00001398,
+ 0x000013ac, 0x00001275, 0x000500c7, 0x00000008, 0x000013b2, 0x00001398, 0x0000008f, 0x00050080,
+ 0x00000008, 0x000013b3, 0x00000e9f, 0x000013b2, 0x00060041, 0x00000092, 0x000013b4, 0x00000088,
+ 0x00000047, 0x000013b3, 0x0004003d, 0x00000008, 0x000013b5, 0x000013b4, 0x00050080, 0x00000008,
+ 0x0000139e, 0x000013b5, 0x000012ef, 0x000500c7, 0x00000008, 0x000013bb, 0x0000139e, 0x0000008f,
+ 0x00050080, 0x00000008, 0x000013bc, 0x00000e9f, 0x000013bb, 0x00060041, 0x00000092, 0x000013bd,
+ 0x00000088, 0x00000047, 0x000013bc, 0x0004003d, 0x00000008, 0x000013be, 0x000013bd, 0x000500c7,
+ 0x00000008, 0x000013a1, 0x000013be, 0x000000c4, 0x0003003e, 0x00001389, 0x000000c2, 0x00050041,
+ 0x0000002c, 0x000013a2, 0x00001389, 0x000013a1, 0x0004003d, 0x00000024, 0x000013a3, 0x000013a2,
+ 0x00050094, 0x00000023, 0x000010fb, 0x0000120d, 0x00001092, 0x00050083, 0x00000024, 0x000010fe,
+ 0x00001092, 0x00000174, 0x00050094, 0x00000023, 0x000010ff, 0x00001247, 0x000010fe, 0x00050083,
+ 0x00000024, 0x00001102, 0x00001092, 0x0000017a, 0x00050094, 0x00000023, 0x00001103, 0x00001281,
+ 0x00001102, 0x00050083, 0x00000024, 0x00001106, 0x00001092, 0x000000b5, 0x00050094, 0x00000023,
+ 0x00001107, 0x000012bb, 0x00001106, 0x00050083, 0x00000024, 0x0000110a, 0x00001092, 0x00000185,
+ 0x00050094, 0x00000023, 0x0000110b, 0x000012f5, 0x0000110a, 0x00050083, 0x00000024, 0x0000110e,
+ 0x00001092, 0x000000ba, 0x00050094, 0x00000023, 0x0000110f, 0x0000132f, 0x0000110e, 0x00050083,
+ 0x00000024, 0x00001112, 0x00001092, 0x000000be, 0x00050094, 0x00000023, 0x00001113, 0x00001369,
+ 0x00001112, 0x00050083, 0x00000024, 0x00001116, 0x00001092, 0x00000195, 0x00050094, 0x00000023,
+ 0x00001117, 0x000013a3, 0x00001116, 0x00050083, 0x00000023, 0x0000111a, 0x000010ff, 0x000010fb,
+ 0x00050083, 0x00000023, 0x00001120, 0x0000110b, 0x000010fb, 0x00050083, 0x00000023, 0x00001123,
+ 0x000010fb, 0x000010ff, 0x00050083, 0x00000023, 0x00001125, 0x00001123, 0x00001103, 0x00050081,
+ 0x00000023, 0x00001127, 0x00001125, 0x00001107, 0x00050083, 0x00000023, 0x0000112a, 0x000010fb,
+ 0x00001103, 0x00050083, 0x00000023, 0x0000112c, 0x0000112a, 0x0000110b, 0x00050081, 0x00000023,
+ 0x0000112e, 0x0000112c, 0x00001113, 0x00050083, 0x00000023, 0x00001133, 0x00001123, 0x0000110b,
+ 0x00050081, 0x00000023, 0x00001135, 0x00001133, 0x0000110f, 0x00050081, 0x00000023, 0x0000113b,
+ 0x0000111a, 0x00001103, 0x00050083, 0x00000023, 0x0000113d, 0x0000113b, 0x00001107, 0x00050081,
+ 0x00000023, 0x0000113f, 0x0000113d, 0x0000110b, 0x00050083, 0x00000023, 0x00001141, 0x0000113f,
+ 0x0000110f, 0x00050083, 0x00000023, 0x00001143, 0x00001141, 0x00001113, 0x00050081, 0x00000023,
+ 0x00001145, 0x00001143, 0x00001117, 0x00050051, 0x00000023, 0x00001148, 0x000010a0, 0x00000000,
+ 0x00050083, 0x00000024, 0x0000114b, 0x00001247, 0x0000120d, 0x0005008e, 0x00000024, 0x0000114c,
+ 0x0000114b, 0x00001148, 0x00050081, 0x00000024, 0x0000114d, 0x0000120d, 0x0000114c, 0x00050051,
+ 0x00000023, 0x0000114f, 0x000010a0, 0x00000001, 0x00050083, 0x00000024, 0x00001152, 0x00001281,
+ 0x0000120d, 0x0005008e, 0x00000024, 0x00001153, 0x00001152, 0x0000114f, 0x00050081, 0x00000024,
+ 0x00001154, 0x0000114d, 0x00001153, 0x00050051, 0x00000023, 0x00001156, 0x000010a0, 0x00000002,
+ 0x00050083, 0x00000024, 0x00001159, 0x000012f5, 0x0000120d, 0x0005008e, 0x00000024, 0x0000115a,
+ 0x00001159, 0x00001156, 0x00050081, 0x00000024, 0x0000115b, 0x00001154, 0x0000115a, 0x00050085,
+ 0x00000023, 0x00001160, 0x00001148, 0x0000114f, 0x00050083, 0x00000024, 0x00001163, 0x0000120d,
+ 0x00001247, 0x00050083, 0x00000024, 0x00001165, 0x00001163, 0x00001281, 0x00050081, 0x00000024,
+ 0x00001167, 0x00001165, 0x000012bb, 0x0005008e, 0x00000024, 0x00001168, 0x00001167, 0x00001160,
+ 0x00050081, 0x00000024, 0x00001169, 0x0000115b, 0x00001168, 0x00050085, 0x00000023, 0x0000116e,
+ 0x0000114f, 0x00001156, 0x00050083, 0x00000024, 0x00001171, 0x0000120d, 0x00001281, 0x00050083,
+ 0x00000024, 0x00001173, 0x00001171, 0x000012f5, 0x00050081, 0x00000024, 0x00001175, 0x00001173,
+ 0x00001369, 0x0005008e, 0x00000024, 0x00001176, 0x00001175, 0x0000116e, 0x00050081, 0x00000024,
+ 0x00001177, 0x00001169, 0x00001176, 0x00050085, 0x00000023, 0x0000117c, 0x00001156, 0x00001148,
+ 0x00050083, 0x00000024, 0x00001181, 0x00001163, 0x000012f5, 0x00050081, 0x00000024, 0x00001183,
+ 0x00001181, 0x0000132f, 0x0005008e, 0x00000024, 0x00001184, 0x00001183, 0x0000117c, 0x00050081,
+ 0x00000024, 0x00001185, 0x00001177, 0x00001184, 0x00050085, 0x00000023, 0x0000118d, 0x00001160,
+ 0x00001156, 0x00050081, 0x00000024, 0x00001193, 0x0000114b, 0x00001281, 0x00050083, 0x00000024,
+ 0x00001195, 0x00001193, 0x000012bb, 0x00050081, 0x00000024, 0x00001197, 0x00001195, 0x000012f5,
+ 0x00050083, 0x00000024, 0x00001199, 0x00001197, 0x0000132f, 0x00050083, 0x00000024, 0x0000119b,
+ 0x00001199, 0x00001369, 0x00050081, 0x00000024, 0x0000119d, 0x0000119b, 0x000013a3, 0x0005008e,
+ 0x00000024, 0x0000119e, 0x0000119d, 0x0000118d, 0x00050081, 0x00000024, 0x0000119f, 0x00001185,
+ 0x0000119e, 0x00050051, 0x00000023, 0x000011a1, 0x000010ac, 0x00000000, 0x00050085, 0x00000023,
+ 0x000011a6, 0x00001127, 0x0000114f, 0x00050081, 0x00000023, 0x000011a7, 0x0000111a, 0x000011a6,
+ 0x00050085, 0x00000023, 0x000011ab, 0x00001135, 0x00001156, 0x00050081, 0x00000023, 0x000011ac,
+ 0x000011a7, 0x000011ab, 0x00050085, 0x00000023, 0x000011b0, 0x00001145, 0x0000114f, 0x00050085,
+ 0x00000023, 0x000011b3, 0x000011b0, 0x00001156, 0x00050081, 0x00000023, 0x000011b4, 0x000011ac,
+ 0x000011b3, 0x00050085, 0x00000023, 0x000011b5, 0x000011a1, 0x000011b4, 0x00050051, 0x00000023,
+ 0x000011b7, 0x0000119f, 0x00000000, 0x00050081, 0x00000023, 0x000011b8, 0x000011b7, 0x000011b5,
+ 0x00050085, 0x00000023, 0x000011ca, 0x00001145, 0x00001148, 0x00050051, 0x00000023, 0x000011d5,
+ 0x000010ac, 0x00000002, 0x00050085, 0x00000023, 0x000011da, 0x0000112e, 0x0000114f, 0x00050081,
+ 0x00000023, 0x000011db, 0x00001120, 0x000011da, 0x00050085, 0x00000023, 0x000011df, 0x00001135,
+ 0x00001148, 0x00050081, 0x00000023, 0x000011e0, 0x000011db, 0x000011df, 0x00050085, 0x00000023,
+ 0x000011e7, 0x000011ca, 0x0000114f, 0x00050081, 0x00000023, 0x000011e8, 0x000011e0, 0x000011e7,
+ 0x00050085, 0x00000023, 0x000011e9, 0x000011d5, 0x000011e8, 0x00050051, 0x00000023, 0x000011eb,
+ 0x0000119f, 0x00000002, 0x00050081, 0x00000023, 0x000011ec, 0x000011eb, 0x000011e9, 0x00050081,
+ 0x00000024, 0x00000cba, 0x00000cab, 0x000002c7, 0x00050080, 0x00000008, 0x00000cbc, 0x00000cb0,
+ 0x0000008a, 0x0006000c, 0x00000024, 0x000013ff, 0x00000001, 0x00000008, 0x00000cba, 0x0004006e,
+ 0x000000cf, 0x00001401, 0x000013ff, 0x00050083, 0x00000024, 0x00001404, 0x00000cba, 0x000013ff,
+ 0x00050085, 0x00000024, 0x00001407, 0x00001404, 0x00001404, 0x00050085, 0x00000024, 0x00001409,
+ 0x00001407, 0x00001404, 0x0005008e, 0x00000024, 0x0000140c, 0x00001404, 0x000000e0, 0x00050083,
+ 0x00000024, 0x0000140e, 0x0000140c, 0x000018d1, 0x00050085, 0x00000024, 0x0000140f, 0x00001404,
+ 0x0000140e, 0x00050081, 0x00000024, 0x00001411, 0x0000140f, 0x000018d2, 0x00050085, 0x00000024,
+ 0x00001412, 0x00001409, 0x00001411, 0x0005008e, 0x00000024, 0x00001414, 0x00001404, 0x000000eb,
+ 0x00050085, 0x00000024, 0x00001416, 0x00001414, 0x00001404, 0x00050083, 0x00000024, 0x0000141a,
+ 0x00001404, 0x000018d3, 0x00050085, 0x00000024, 0x0000141b, 0x00001404, 0x0000141a, 0x00050081,
+ 0x00000024, 0x0000141d, 0x0000141b, 0x00000195, 0x00050085, 0x00000024, 0x0000141e, 0x00001416,
+ 0x0000141d, 0x00050051, 0x00000006, 0x00001420, 0x00001401, 0x00000000, 0x00050051, 0x00000006,
+ 0x00001422, 0x00001401, 0x00000001, 0x00050051, 0x00000006, 0x00001424, 0x00001401, 0x00000002,
+ 0x00050084, 0x00000008, 0x0000156a, 0x00000cbc, 0x0000009a, 0x0004007c, 0x00000006, 0x0000156b,
+ 0x0000156a, 0x00050080, 0x00000006, 0x0000156c, 0x00001420, 0x0000156b, 0x000500c7, 0x00000006,
+ 0x0000156d, 0x0000156c, 0x0000009e, 0x0004007c, 0x00000008, 0x0000156e, 0x0000156d, 0x000500c7,
+ 0x00000008, 0x00001585, 0x0000156e, 0x0000008f, 0x00050080, 0x00000008, 0x00001586, 0x00000e9f,
+ 0x00001585, 0x00060041, 0x00000092, 0x00001587, 0x00000088, 0x00000047, 0x00001586, 0x0004003d,
+ 0x00000008, 0x00001588, 0x00001587, 0x000500c7, 0x00000006, 0x00001572, 0x00001422, 0x0000009e,
+ 0x0004007c, 0x00000008, 0x00001573, 0x00001572, 0x00050080, 0x00000008, 0x00001574, 0x00001588,
+ 0x00001573, 0x000500c7, 0x00000008, 0x0000158e, 0x00001574, 0x0000008f, 0x00050080, 0x00000008,
+ 0x0000158f, 0x00000e9f, 0x0000158e, 0x00060041, 0x00000092, 0x00001590, 0x00000088, 0x00000047,
+ 0x0000158f, 0x0004003d, 0x00000008, 0x00001591, 0x00001590, 0x000500c7, 0x00000006, 0x00001578,
+ 0x00001424, 0x0000009e, 0x0004007c, 0x00000008, 0x00001579, 0x00001578, 0x00050080, 0x00000008,
+ 0x0000157a, 0x00001591, 0x00001579, 0x000500c7, 0x00000008, 0x00001597, 0x0000157a, 0x0000008f,
+ 0x00050080, 0x00000008, 0x00001598, 0x00000e9f, 0x00001597, 0x00060041, 0x00000092, 0x00001599,
+ 0x00000088, 0x00000047, 0x00001598, 0x0004003d, 0x00000008, 0x0000159a, 0x00001599, 0x000500c7,
+ 0x00000008, 0x0000157d, 0x0000159a, 0x000000c4, 0x0003003e, 0x00001565, 0x000000c2, 0x00050041,
+ 0x0000002c, 0x0000157e, 0x00001565, 0x0000157d, 0x0004003d, 0x00000024, 0x0000157f, 0x0000157e,
+ 0x00050080, 0x00000006, 0x00001429, 0x00001420, 0x0000005b, 0x00050080, 0x00000006, 0x000015a6,
+ 0x00001429, 0x0000156b, 0x000500c7, 0x00000006, 0x000015a7, 0x000015a6, 0x0000009e, 0x0004007c,
+ 0x00000008, 0x000015a8, 0x000015a7, 0x000500c7, 0x00000008, 0x000015bf, 0x000015a8, 0x0000008f,
+ 0x00050080, 0x00000008, 0x000015c0, 0x00000e9f, 0x000015bf, 0x00060041, 0x00000092, 0x000015c1,
+ 0x00000088, 0x00000047, 0x000015c0, 0x0004003d, 0x00000008, 0x000015c2, 0x000015c1, 0x00050080,
+ 0x00000008, 0x000015ae, 0x000015c2, 0x00001573, 0x000500c7, 0x00000008, 0x000015c8, 0x000015ae,
+ 0x0000008f, 0x00050080, 0x00000008, 0x000015c9, 0x00000e9f, 0x000015c8, 0x00060041, 0x00000092,
+ 0x000015ca, 0x00000088, 0x00000047, 0x000015c9, 0x0004003d, 0x00000008, 0x000015cb, 0x000015ca,
+ 0x00050080, 0x00000008, 0x000015b4, 0x000015cb, 0x00001579, 0x000500c7, 0x00000008, 0x000015d1,
+ 0x000015b4, 0x0000008f, 0x00050080, 0x00000008, 0x000015d2, 0x00000e9f, 0x000015d1, 0x00060041,
+ 0x00000092, 0x000015d3, 0x00000088, 0x00000047, 0x000015d2, 0x0004003d, 0x00000008, 0x000015d4,
+ 0x000015d3, 0x000500c7, 0x00000008, 0x000015b7, 0x000015d4, 0x000000c4, 0x0003003e, 0x0000159f,
+ 0x000000c2, 0x00050041, 0x0000002c, 0x000015b8, 0x0000159f, 0x000015b7, 0x0004003d, 0x00000024,
+ 0x000015b9, 0x000015b8, 0x00050080, 0x00000006, 0x00001432, 0x00001422, 0x0000005b, 0x0004003d,
+ 0x00000008, 0x000015fc, 0x00001587, 0x000500c7, 0x00000006, 0x000015e6, 0x00001432, 0x0000009e,
+ 0x0004007c, 0x00000008, 0x000015e7, 0x000015e6, 0x00050080, 0x00000008, 0x000015e8, 0x000015fc,
+ 0x000015e7, 0x000500c7, 0x00000008, 0x00001602, 0x000015e8, 0x0000008f, 0x00050080, 0x00000008,
+ 0x00001603, 0x00000e9f, 0x00001602, 0x00060041, 0x00000092, 0x00001604, 0x00000088, 0x00000047,
+ 0x00001603, 0x0004003d, 0x00000008, 0x00001605, 0x00001604, 0x00050080, 0x00000008, 0x000015ee,
+ 0x00001605, 0x00001579, 0x000500c7, 0x00000008, 0x0000160b, 0x000015ee, 0x0000008f, 0x00050080,
+ 0x00000008, 0x0000160c, 0x00000e9f, 0x0000160b, 0x00060041, 0x00000092, 0x0000160d, 0x00000088,
+ 0x00000047, 0x0000160c, 0x0004003d, 0x00000008, 0x0000160e, 0x0000160d, 0x000500c7, 0x00000008,
+ 0x000015f1, 0x0000160e, 0x000000c4, 0x0003003e, 0x000015d9, 0x000000c2, 0x00050041, 0x0000002c,
+ 0x000015f2, 0x000015d9, 0x000015f1, 0x0004003d, 0x00000024, 0x000015f3, 0x000015f2, 0x0004003d,
+ 0x00000008, 0x00001636, 0x000015c1, 0x00050080, 0x00000008, 0x00001622, 0x00001636, 0x000015e7,
+ 0x000500c7, 0x00000008, 0x0000163c, 0x00001622, 0x0000008f, 0x00050080, 0x00000008, 0x0000163d,
+ 0x00000e9f, 0x0000163c, 0x00060041, 0x00000092, 0x0000163e, 0x00000088, 0x00000047, 0x0000163d,
+ 0x0004003d, 0x00000008, 0x0000163f, 0x0000163e, 0x00050080, 0x00000008, 0x00001628, 0x0000163f,
+ 0x00001579, 0x000500c7, 0x00000008, 0x00001645, 0x00001628, 0x0000008f, 0x00050080, 0x00000008,
+ 0x00001646, 0x00000e9f, 0x00001645, 0x00060041, 0x00000092, 0x00001647, 0x00000088, 0x00000047,
+ 0x00001646, 0x0004003d, 0x00000008, 0x00001648, 0x00001647, 0x000500c7, 0x00000008, 0x0000162b,
+ 0x00001648, 0x000000c4, 0x0003003e, 0x00001613, 0x000000c2, 0x00050041, 0x0000002c, 0x0000162c,
+ 0x00001613, 0x0000162b, 0x0004003d, 0x00000024, 0x0000162d, 0x0000162c, 0x00050080, 0x00000006,
+ 0x00001445, 0x00001424, 0x0000005b, 0x0004003d, 0x00000008, 0x00001670, 0x00001587, 0x00050080,
+ 0x00000008, 0x0000165c, 0x00001670, 0x00001573, 0x000500c7, 0x00000008, 0x00001676, 0x0000165c,
+ 0x0000008f, 0x00050080, 0x00000008, 0x00001677, 0x00000e9f, 0x00001676, 0x00060041, 0x00000092,
+ 0x00001678, 0x00000088, 0x00000047, 0x00001677, 0x0004003d, 0x00000008, 0x00001679, 0x00001678,
+ 0x000500c7, 0x00000006, 0x00001660, 0x00001445, 0x0000009e, 0x0004007c, 0x00000008, 0x00001661,
+ 0x00001660, 0x00050080, 0x00000008, 0x00001662, 0x00001679, 0x00001661, 0x000500c7, 0x00000008,
+ 0x0000167f, 0x00001662, 0x0000008f, 0x00050080, 0x00000008, 0x00001680, 0x00000e9f, 0x0000167f,
+ 0x00060041, 0x00000092, 0x00001681, 0x00000088, 0x00000047, 0x00001680, 0x0004003d, 0x00000008,
+ 0x00001682, 0x00001681, 0x000500c7, 0x00000008, 0x00001665, 0x00001682, 0x000000c4, 0x0003003e,
+ 0x0000164d, 0x000000c2, 0x00050041, 0x0000002c, 0x00001666, 0x0000164d, 0x00001665, 0x0004003d,
+ 0x00000024, 0x00001667, 0x00001666, 0x0004003d, 0x00000008, 0x000016aa, 0x000015c1, 0x00050080,
+ 0x00000008, 0x00001696, 0x000016aa, 0x00001573, 0x000500c7, 0x00000008, 0x000016b0, 0x00001696,
+ 0x0000008f, 0x00050080, 0x00000008, 0x000016b1, 0x00000e9f, 0x000016b0, 0x00060041, 0x00000092,
+ 0x000016b2, 0x00000088, 0x00000047, 0x000016b1, 0x0004003d, 0x00000008, 0x000016b3, 0x000016b2,
+ 0x00050080, 0x00000008, 0x0000169c, 0x000016b3, 0x00001661, 0x000500c7, 0x00000008, 0x000016b9,
+ 0x0000169c, 0x0000008f, 0x00050080, 0x00000008, 0x000016ba, 0x00000e9f, 0x000016b9, 0x00060041,
+ 0x00000092, 0x000016bb, 0x00000088, 0x00000047, 0x000016ba, 0x0004003d, 0x00000008, 0x000016bc,
+ 0x000016bb, 0x000500c7, 0x00000008, 0x0000169f, 0x000016bc, 0x000000c4, 0x0003003e, 0x00001687,
+ 0x000000c2, 0x00050041, 0x0000002c, 0x000016a0, 0x00001687, 0x0000169f, 0x0004003d, 0x00000024,
+ 0x000016a1, 0x000016a0, 0x0004003d, 0x00000008, 0x000016e4, 0x00001587, 0x00050080, 0x00000008,
+ 0x000016d0, 0x000016e4, 0x000015e7, 0x000500c7, 0x00000008, 0x000016ea, 0x000016d0, 0x0000008f,
+ 0x00050080, 0x00000008, 0x000016eb, 0x00000e9f, 0x000016ea, 0x00060041, 0x00000092, 0x000016ec,
+ 0x00000088, 0x00000047, 0x000016eb, 0x0004003d, 0x00000008, 0x000016ed, 0x000016ec, 0x00050080,
+ 0x00000008, 0x000016d6, 0x000016ed, 0x00001661, 0x000500c7, 0x00000008, 0x000016f3, 0x000016d6,
+ 0x0000008f, 0x00050080, 0x00000008, 0x000016f4, 0x00000e9f, 0x000016f3, 0x00060041, 0x00000092,
+ 0x000016f5, 0x00000088, 0x00000047, 0x000016f4, 0x0004003d, 0x00000008, 0x000016f6, 0x000016f5,
+ 0x000500c7, 0x00000008, 0x000016d9, 0x000016f6, 0x000000c4, 0x0003003e, 0x000016c1, 0x000000c2,
+ 0x00050041, 0x0000002c, 0x000016da, 0x000016c1, 0x000016d9, 0x0004003d, 0x00000024, 0x000016db,
+ 0x000016da, 0x0004003d, 0x00000008, 0x0000171e, 0x000015c1, 0x00050080, 0x00000008, 0x0000170a,
+ 0x0000171e, 0x000015e7, 0x000500c7, 0x00000008, 0x00001724, 0x0000170a, 0x0000008f, 0x00050080,
+ 0x00000008, 0x00001725, 0x00000e9f, 0x00001724, 0x00060041, 0x00000092, 0x00001726, 0x00000088,
+ 0x00000047, 0x00001725, 0x0004003d, 0x00000008, 0x00001727, 0x00001726, 0x00050080, 0x00000008,
+ 0x00001710, 0x00001727, 0x00001661, 0x000500c7, 0x00000008, 0x0000172d, 0x00001710, 0x0000008f,
+ 0x00050080, 0x00000008, 0x0000172e, 0x00000e9f, 0x0000172d, 0x00060041, 0x00000092, 0x0000172f,
+ 0x00000088, 0x00000047, 0x0000172e, 0x0004003d, 0x00000008, 0x00001730, 0x0000172f, 0x000500c7,
+ 0x00000008, 0x00001713, 0x00001730, 0x000000c4, 0x0003003e, 0x000016fb, 0x000000c2, 0x00050041,
+ 0x0000002c, 0x00001714, 0x000016fb, 0x00001713, 0x0004003d, 0x00000024, 0x00001715, 0x00001714,
+ 0x00050094, 0x00000023, 0x0000146d, 0x0000157f, 0x00001404, 0x00050083, 0x00000024, 0x00001470,
+ 0x00001404, 0x00000174, 0x00050094, 0x00000023, 0x00001471, 0x000015b9, 0x00001470, 0x00050083,
+ 0x00000024, 0x00001474, 0x00001404, 0x0000017a, 0x00050094, 0x00000023, 0x00001475, 0x000015f3,
+ 0x00001474, 0x00050083, 0x00000024, 0x00001478, 0x00001404, 0x000000b5, 0x00050094, 0x00000023,
+ 0x00001479, 0x0000162d, 0x00001478, 0x00050083, 0x00000024, 0x0000147c, 0x00001404, 0x00000185,
+ 0x00050094, 0x00000023, 0x0000147d, 0x00001667, 0x0000147c, 0x00050083, 0x00000024, 0x00001480,
+ 0x00001404, 0x000000ba, 0x00050094, 0x00000023, 0x00001481, 0x000016a1, 0x00001480, 0x00050083,
+ 0x00000024, 0x00001484, 0x00001404, 0x000000be, 0x00050094, 0x00000023, 0x00001485, 0x000016db,
+ 0x00001484, 0x00050083, 0x00000024, 0x00001488, 0x00001404, 0x00000195, 0x00050094, 0x00000023,
+ 0x00001489, 0x00001715, 0x00001488, 0x00050083, 0x00000023, 0x0000148c, 0x00001471, 0x0000146d,
+ 0x00050083, 0x00000023, 0x0000148f, 0x00001475, 0x0000146d, 0x00050083, 0x00000023, 0x00001495,
+ 0x0000146d, 0x00001471, 0x00050083, 0x00000023, 0x00001497, 0x00001495, 0x00001475, 0x00050081,
+ 0x00000023, 0x00001499, 0x00001497, 0x00001479, 0x00050083, 0x00000023, 0x0000149c, 0x0000146d,
+ 0x00001475, 0x00050083, 0x00000023, 0x0000149e, 0x0000149c, 0x0000147d, 0x00050081, 0x00000023,
+ 0x000014a0, 0x0000149e, 0x00001485, 0x00050083, 0x00000023, 0x000014a5, 0x00001495, 0x0000147d,
+ 0x00050081, 0x00000023, 0x000014a7, 0x000014a5, 0x00001481, 0x00050081, 0x00000023, 0x000014ad,
+ 0x0000148c, 0x00001475, 0x00050083, 0x00000023, 0x000014af, 0x000014ad, 0x00001479, 0x00050081,
+ 0x00000023, 0x000014b1, 0x000014af, 0x0000147d, 0x00050083, 0x00000023, 0x000014b3, 0x000014b1,
+ 0x00001481, 0x00050083, 0x00000023, 0x000014b5, 0x000014b3, 0x00001485, 0x00050081, 0x00000023,
+ 0x000014b7, 0x000014b5, 0x00001489, 0x00050051, 0x00000023, 0x000014ba, 0x00001412, 0x00000000,
+ 0x00050083, 0x00000024, 0x000014bd, 0x000015b9, 0x0000157f, 0x0005008e, 0x00000024, 0x000014be,
+ 0x000014bd, 0x000014ba, 0x00050081, 0x00000024, 0x000014bf, 0x0000157f, 0x000014be, 0x00050051,
+ 0x00000023, 0x000014c1, 0x00001412, 0x00000001, 0x00050083, 0x00000024, 0x000014c4, 0x000015f3,
+ 0x0000157f, 0x0005008e, 0x00000024, 0x000014c5, 0x000014c4, 0x000014c1, 0x00050081, 0x00000024,
+ 0x000014c6, 0x000014bf, 0x000014c5, 0x00050051, 0x00000023, 0x000014c8, 0x00001412, 0x00000002,
+ 0x00050083, 0x00000024, 0x000014cb, 0x00001667, 0x0000157f, 0x0005008e, 0x00000024, 0x000014cc,
+ 0x000014cb, 0x000014c8, 0x00050081, 0x00000024, 0x000014cd, 0x000014c6, 0x000014cc, 0x00050085,
+ 0x00000023, 0x000014d2, 0x000014ba, 0x000014c1, 0x00050083, 0x00000024, 0x000014d5, 0x0000157f,
+ 0x000015b9, 0x00050083, 0x00000024, 0x000014d7, 0x000014d5, 0x000015f3, 0x00050081, 0x00000024,
+ 0x000014d9, 0x000014d7, 0x0000162d, 0x0005008e, 0x00000024, 0x000014da, 0x000014d9, 0x000014d2,
+ 0x00050081, 0x00000024, 0x000014db, 0x000014cd, 0x000014da, 0x00050085, 0x00000023, 0x000014e0,
+ 0x000014c1, 0x000014c8, 0x00050083, 0x00000024, 0x000014e3, 0x0000157f, 0x000015f3, 0x00050083,
+ 0x00000024, 0x000014e5, 0x000014e3, 0x00001667, 0x00050081, 0x00000024, 0x000014e7, 0x000014e5,
+ 0x000016db, 0x0005008e, 0x00000024, 0x000014e8, 0x000014e7, 0x000014e0, 0x00050081, 0x00000024,
+ 0x000014e9, 0x000014db, 0x000014e8, 0x00050085, 0x00000023, 0x000014ee, 0x000014c8, 0x000014ba,
+ 0x00050083, 0x00000024, 0x000014f3, 0x000014d5, 0x00001667, 0x00050081, 0x00000024, 0x000014f5,
+ 0x000014f3, 0x000016a1, 0x0005008e, 0x00000024, 0x000014f6, 0x000014f5, 0x000014ee, 0x00050081,
+ 0x00000024, 0x000014f7, 0x000014e9, 0x000014f6, 0x00050085, 0x00000023, 0x000014ff, 0x000014d2,
+ 0x000014c8, 0x00050081, 0x00000024, 0x00001505, 0x000014bd, 0x000015f3, 0x00050083, 0x00000024,
+ 0x00001507, 0x00001505, 0x0000162d, 0x00050081, 0x00000024, 0x00001509, 0x00001507, 0x00001667,
+ 0x00050083, 0x00000024, 0x0000150b, 0x00001509, 0x000016a1, 0x00050083, 0x00000024, 0x0000150d,
+ 0x0000150b, 0x000016db, 0x00050081, 0x00000024, 0x0000150f, 0x0000150d, 0x00001715, 0x0005008e,
+ 0x00000024, 0x00001510, 0x0000150f, 0x000014ff, 0x00050081, 0x00000024, 0x00001511, 0x000014f7,
+ 0x00001510, 0x00050051, 0x00000023, 0x00001513, 0x0000141e, 0x00000000, 0x00050085, 0x00000023,
+ 0x00001518, 0x00001499, 0x000014c1, 0x00050081, 0x00000023, 0x00001519, 0x0000148c, 0x00001518,
+ 0x00050085, 0x00000023, 0x0000151d, 0x000014a7, 0x000014c8, 0x00050081, 0x00000023, 0x0000151e,
+ 0x00001519, 0x0000151d, 0x00050085, 0x00000023, 0x00001522, 0x000014b7, 0x000014c1, 0x00050085,
+ 0x00000023, 0x00001525, 0x00001522, 0x000014c8, 0x00050081, 0x00000023, 0x00001526, 0x0000151e,
+ 0x00001525, 0x00050085, 0x00000023, 0x00001527, 0x00001513, 0x00001526, 0x00050051, 0x00000023,
+ 0x00001529, 0x00001511, 0x00000000, 0x00050081, 0x00000023, 0x0000152a, 0x00001529, 0x00001527,
+ 0x00050051, 0x00000023, 0x0000152d, 0x0000141e, 0x00000001, 0x00050085, 0x00000023, 0x00001532,
+ 0x00001499, 0x000014ba, 0x00050081, 0x00000023, 0x00001533, 0x0000148f, 0x00001532, 0x00050085,
+ 0x00000023, 0x00001537, 0x000014a0, 0x000014c8, 0x00050081, 0x00000023, 0x00001538, 0x00001533,
+ 0x00001537, 0x00050085, 0x00000023, 0x0000153c, 0x000014b7, 0x000014ba, 0x00050085, 0x00000023,
+ 0x0000153f, 0x0000153c, 0x000014c8, 0x00050081, 0x00000023, 0x00001540, 0x00001538, 0x0000153f,
+ 0x00050085, 0x00000023, 0x00001541, 0x0000152d, 0x00001540, 0x00050051, 0x00000023, 0x00001543,
+ 0x00001511, 0x00000001, 0x00050081, 0x00000023, 0x00001544, 0x00001543, 0x00001541, 0x00050083,
+ 0x00000023, 0x00000cc3, 0x00001544, 0x000011ec, 0x00050083, 0x00000023, 0x00000cc8, 0x00000e7a,
+ 0x0000152a, 0x00050083, 0x00000023, 0x00000ccd, 0x000011b8, 0x00000e60, 0x00060050, 0x00000024,
+ 0x00000cce, 0x00000cc3, 0x00000cc8, 0x00000ccd, 0x0005008e, 0x00000024, 0x00000ccf, 0x00000cce,
+ 0x000018ce, 0x00050081, 0x00000024, 0x00000cd1, 0x000018c2, 0x00000ccf, 0x00050085, 0x00000023,
+ 0x00000cd3, 0x000018ce, 0x000002e2, 0x00050085, 0x00000023, 0x00000cd5, 0x000018cd, 0x000000f2,
+ 0x000200f9, 0x00000c88, 0x000200f8, 0x00000cd9, 0x0005008e, 0x00000024, 0x000005de, 0x000018c2,
+ 0x000005d0, 0x00050081, 0x00000024, 0x000005e0, 0x000018c4, 0x000005de, 0x000200f9, 0x000005a8,
+ 0x000200f8, 0x000005a8, 0x000700f5, 0x00000024, 0x000018cc, 0x000018c4, 0x00000593, 0x000005e0,
+ 0x00000cd9, 0x000200f9, 0x00000594, 0x000200f8, 0x00000594, 0x000700f5, 0x00000024, 0x000018cb,
+ 0x000018c4, 0x0000052f, 0x000018cc, 0x000005a8, 0x00050084, 0x00000008, 0x000005e4, 0x000005e2,
+ 0x0000035e, 0x00050080, 0x00000008, 0x000005e5, 0x000004f4, 0x000005e4, 0x00050080, 0x00000008,
+ 0x000005e7, 0x000005e5, 0x00000bca, 0x00050051, 0x00000023, 0x000005e9, 0x000018cb, 0x00000000,
+ 0x00060041, 0x000002fa, 0x000005ea, 0x000002ef, 0x00000047, 0x000005e7, 0x0003003e, 0x000005ea,
+ 0x000005e9, 0x00050084, 0x00000008, 0x000005ee, 0x000005ec, 0x0000035e, 0x00050080, 0x00000008,
+ 0x000005ef, 0x000004f4, 0x000005ee, 0x00050080, 0x00000008, 0x000005f1, 0x000005ef, 0x00000bca,
+ 0x00050051, 0x00000023, 0x000005f3, 0x000018cb, 0x00000001, 0x00060041, 0x000002fa, 0x000005f4,
+ 0x000002ef, 0x00000047, 0x000005f1, 0x0003003e, 0x000005f4, 0x000005f3, 0x00050084, 0x00000008,
+ 0x000005f8, 0x000005f6, 0x0000035e, 0x00050080, 0x00000008, 0x000005f9, 0x000004f4, 0x000005f8,
+ 0x00050080, 0x00000008, 0x000005fb, 0x000005f9, 0x00000bca, 0x00050051, 0x00000023, 0x000005fd,
+ 0x000018cb, 0x00000002, 0x00060041, 0x000002fa, 0x000005fe, 0x000002ef, 0x00000047, 0x000005fb,
+ 0x0003003e, 0x000005fe, 0x000005fd, 0x000200f9, 0x000004dd, 0x000200f8, 0x000005ff, 0x000500aa,
+ 0x00000285, 0x00000602, 0x00000348, 0x00000601, 0x000300f7, 0x00000604, 0x00000000, 0x000400fa,
+ 0x00000602, 0x00000603, 0x000006a8, 0x000200f8, 0x00000603, 0x00050041, 0x000003ea, 0x00000606,
+ 0x00000046, 0x00000047, 0x0004003d, 0x00000041, 0x00000607, 0x00000606, 0x0008004f, 0x000000cf,
+ 0x00000608, 0x00000607, 0x00000607, 0x00000000, 0x00000001, 0x00000002, 0x000500af, 0x000003ee,
+ 0x00000609, 0x0000034e, 0x00000608, 0x0004009a, 0x00000285, 0x0000060a, 0x00000609, 0x000300f7,
+ 0x0000060c, 0x00000000, 0x000400fa, 0x0000060a, 0x0000060b, 0x0000060c, 0x000200f8, 0x0000060b,
+ 0x000200f9, 0x0000075b, 0x000200f8, 0x0000060c, 0x00050051, 0x00000006, 0x00000611, 0x0000034e,
+ 0x00000000, 0x00050051, 0x00000006, 0x00000614, 0x0000034e, 0x00000001, 0x00050051, 0x00000006,
+ 0x00000617, 0x0000034e, 0x00000002, 0x00050084, 0x00000006, 0x0000173a, 0x00000354, 0x00000617,
+ 0x00050080, 0x00000006, 0x0000173b, 0x00000614, 0x0000173a, 0x00050084, 0x00000006, 0x0000173c,
+ 0x00000351, 0x0000173b, 0x00050080, 0x00000006, 0x0000173d, 0x00000611, 0x0000173c, 0x0004007c,
+ 0x00000008, 0x0000173e, 0x0000173d, 0x00060041, 0x0000008b, 0x0000061a, 0x00000046, 0x00000089,
+ 0x00000048, 0x0004003d, 0x00000008, 0x0000061b, 0x0000061a, 0x0004007c, 0x00000008, 0x0000061e,
+ 0x00000351, 0x0004007c, 0x00000008, 0x00000623, 0x0000035b, 0x00060041, 0x000003d3, 0x00000625,
+ 0x00000046, 0x000003d2, 0x00000048, 0x0004003d, 0x00000023, 0x00000626, 0x00000625, 0x00050085,
+ 0x00000023, 0x00000627, 0x000002e2, 0x00000626, 0x000500ad, 0x00000285, 0x0000062a, 0x00000611,
+ 0x00000047, 0x000300f7, 0x0000062c, 0x00000000, 0x000400fa, 0x0000062a, 0x0000062b, 0x0000062c,
+ 0x000200f8, 0x0000062b, 0x00060041, 0x0000008b, 0x0000062d, 0x00000046, 0x0000005b, 0x00000048,
+ 0x0004003d, 0x00000008, 0x0000062e, 0x0000062d, 0x00050080, 0x00000006, 0x00001744, 0x00000351,
+ 0x0000005b, 0x00050084, 0x00000006, 0x0000174b, 0x00001744, 0x0000173b, 0x00050080, 0x00000006,
+ 0x0000174c, 0x00000611, 0x0000174b, 0x0004007c, 0x00000008, 0x0000174d, 0x0000174c, 0x00050080,
+ 0x00000008, 0x00000639, 0x0000062e, 0x0000174d, 0x00050084, 0x00000008, 0x0000063d, 0x000005e2,
+ 0x0000035e, 0x00050080, 0x00000008, 0x0000063e, 0x0000061b, 0x0000063d, 0x00050080, 0x00000008,
+ 0x00000640, 0x0000063e, 0x0000173e, 0x00060041, 0x000002fa, 0x00000641, 0x000002ef, 0x00000047,
+ 0x00000640, 0x0004003d, 0x00000023, 0x00000642, 0x00000641, 0x00050082, 0x00000008, 0x00000649,
+ 0x00000640, 0x0000004d, 0x00060041, 0x000002fa, 0x0000064a, 0x000002ef, 0x00000047, 0x00000649,
+ 0x0004003d, 0x00000023, 0x0000064b, 0x0000064a, 0x00050081, 0x00000023, 0x0000064c, 0x00000642,
+ 0x0000064b, 0x00050085, 0x00000023, 0x0000064d, 0x00000627, 0x0000064c, 0x00060041, 0x000002fa,
+ 0x0000064e, 0x000002ef, 0x00000047, 0x00000639, 0x0004003d, 0x00000023, 0x0000064f, 0x0000064e,
+ 0x00050081, 0x00000023, 0x00000650, 0x0000064f, 0x0000064d, 0x0003003e, 0x0000064e, 0x00000650,
+ 0x000200f9, 0x0000062c, 0x000200f8, 0x0000062c, 0x000500ad, 0x00000285, 0x00000654, 0x00000614,
+ 0x00000047, 0x000300f7, 0x00000656, 0x00000000, 0x000400fa, 0x00000654, 0x00000655, 0x00000656,
+ 0x000200f8, 0x00000655, 0x00060041, 0x0000008b, 0x00000657, 0x00000046, 0x0000005b, 0x0000004d,
+ 0x0004003d, 0x00000008, 0x00000658, 0x00000657, 0x00050080, 0x00000006, 0x00001756, 0x00000354,
+ 0x0000005b, 0x00050084, 0x00000006, 0x00001758, 0x00001756, 0x00000617, 0x00050080, 0x00000006,
+ 0x00001759, 0x00000614, 0x00001758, 0x00050084, 0x00000006, 0x0000175a, 0x00000351, 0x00001759,
+ 0x00050080, 0x00000006, 0x0000175b, 0x00000611, 0x0000175a, 0x0004007c, 0x00000008, 0x0000175c,
+ 0x0000175b, 0x00050080, 0x00000008, 0x00000663, 0x00000658, 0x0000175c, 0x00050084, 0x00000008,
+ 0x00000667, 0x000005ec, 0x0000035e, 0x00050080, 0x00000008, 0x00000668, 0x0000061b, 0x00000667,
+ 0x00050080, 0x00000008, 0x0000066a, 0x00000668, 0x0000173e, 0x00060041, 0x000002fa, 0x0000066b,
+ 0x000002ef, 0x00000047, 0x0000066a, 0x0004003d, 0x00000023, 0x0000066c, 0x0000066b, 0x00050082,
+ 0x00000008, 0x00000674, 0x0000066a, 0x0000061e, 0x00060041, 0x000002fa, 0x00000675, 0x000002ef,
+ 0x00000047, 0x00000674, 0x0004003d, 0x00000023, 0x00000676, 0x00000675, 0x00050081, 0x00000023,
+ 0x00000677, 0x0000066c, 0x00000676, 0x00050085, 0x00000023, 0x00000678, 0x00000627, 0x00000677,
+ 0x00060041, 0x000002fa, 0x00000679, 0x000002ef, 0x00000047, 0x00000663, 0x0004003d, 0x00000023,
+ 0x0000067a, 0x00000679, 0x00050081, 0x00000023, 0x0000067b, 0x0000067a, 0x00000678, 0x0003003e,
+ 0x00000679, 0x0000067b, 0x000200f9, 0x00000656, 0x000200f8, 0x00000656, 0x000500ad, 0x00000285,
+ 0x0000067f, 0x00000617, 0x00000047, 0x000300f7, 0x00000681, 0x00000000, 0x000400fa, 0x0000067f,
+ 0x00000680, 0x00000681, 0x000200f8, 0x00000680, 0x00060041, 0x0000008b, 0x00000682, 0x00000046,
+ 0x0000005b, 0x0000008a, 0x0004003d, 0x00000008, 0x00000683, 0x00000682, 0x00050080, 0x00000008,
+ 0x0000068e, 0x00000683, 0x0000173e, 0x00050084, 0x00000008, 0x00000692, 0x000005f6, 0x0000035e,
+ 0x00050080, 0x00000008, 0x00000693, 0x0000061b, 0x00000692, 0x00050080, 0x00000008, 0x00000695,
+ 0x00000693, 0x0000173e, 0x00060041, 0x000002fa, 0x00000696, 0x000002ef, 0x00000047, 0x00000695,
+ 0x0004003d, 0x00000023, 0x00000697, 0x00000696, 0x00050082, 0x00000008, 0x0000069f, 0x00000695,
+ 0x00000623, 0x00060041, 0x000002fa, 0x000006a0, 0x000002ef, 0x00000047, 0x0000069f, 0x0004003d,
+ 0x00000023, 0x000006a1, 0x000006a0, 0x00050081, 0x00000023, 0x000006a2, 0x00000697, 0x000006a1,
+ 0x00050085, 0x00000023, 0x000006a3, 0x00000627, 0x000006a2, 0x00060041, 0x000002fa, 0x000006a4,
+ 0x000002ef, 0x00000047, 0x0000068e, 0x0004003d, 0x00000023, 0x000006a5, 0x000006a4, 0x00050081,
+ 0x00000023, 0x000006a6, 0x000006a5, 0x000006a3, 0x0003003e, 0x000006a4, 0x000006a6, 0x000200f9,
+ 0x00000681, 0x000200f8, 0x00000681, 0x000200f9, 0x00000604, 0x000200f8, 0x000006a8, 0x000500aa,
+ 0x00000285, 0x000006aa, 0x00000348, 0x000003d2, 0x000300f7, 0x000006ac, 0x00000000, 0x000400fa,
+ 0x000006aa, 0x000006ab, 0x000006ac, 0x000200f8, 0x000006ab, 0x00060041, 0x000003d3, 0x000006ae,
+ 0x00000046, 0x000003d2, 0x00000048, 0x0004003d, 0x00000023, 0x000006af, 0x000006ae, 0x00060041,
+ 0x000003d3, 0x000006b1, 0x00000046, 0x000003d2, 0x0000004d, 0x0004003d, 0x00000023, 0x000006b2,
+ 0x000006b1, 0x00050051, 0x00000006, 0x000006b4, 0x0000034e, 0x00000000, 0x000500b3, 0x00000285,
+ 0x000006b6, 0x000006b4, 0x00000351, 0x000300f7, 0x000006b8, 0x00000000, 0x000400fa, 0x000006b6,
+ 0x000006b7, 0x000006b8, 0x000200f8, 0x000006b7, 0x00050051, 0x00000006, 0x000006ba, 0x0000034e,
+ 0x00000001, 0x000500b1, 0x00000285, 0x000006bc, 0x000006ba, 0x00000354, 0x000200f9, 0x000006b8,
+ 0x000200f8, 0x000006b8, 0x000700f5, 0x00000285, 0x000006bd, 0x000006b6, 0x000006ab, 0x000006bc,
+ 0x000006b7, 0x000300f7, 0x000006bf, 0x00000000, 0x000400fa, 0x000006bd, 0x000006be, 0x000006bf,
+ 0x000200f8, 0x000006be, 0x00050051, 0x00000006, 0x000006c1, 0x0000034e, 0x00000002, 0x000500b1,
+ 0x00000285, 0x000006c3, 0x000006c1, 0x00000357, 0x000200f9, 0x000006bf, 0x000200f8, 0x000006bf,
+ 0x000700f5, 0x00000285, 0x000006c4, 0x000006bd, 0x000006b8, 0x000006c3, 0x000006be, 0x000300f7,
+ 0x000006c6, 0x00000000, 0x000400fa, 0x000006c4, 0x000006c5, 0x000006c6, 0x000200f8, 0x000006c5,
+ 0x00060041, 0x0000008b, 0x000006c8, 0x00000046, 0x0000005b, 0x00000048, 0x0004003d, 0x00000008,
+ 0x000006c9, 0x000006c8, 0x00050051, 0x00000006, 0x000006cf, 0x0000034e, 0x00000001, 0x00050051,
+ 0x00000006, 0x000006d2, 0x0000034e, 0x00000002, 0x00050080, 0x00000006, 0x00001770, 0x00000351,
+ 0x0000005b, 0x00050084, 0x00000006, 0x00001775, 0x00000354, 0x000006d2, 0x00050080, 0x00000006,
+ 0x00001776, 0x000006cf, 0x00001775, 0x00050084, 0x00000006, 0x00001777, 0x00001770, 0x00001776,
+ 0x00050080, 0x00000006, 0x00001778, 0x000006b4, 0x00001777, 0x0004007c, 0x00000008, 0x00001779,
+ 0x00001778, 0x00050080, 0x00000008, 0x000006d4, 0x000006c9, 0x00001779, 0x00060041, 0x000002fa,
+ 0x000006d7, 0x000002ef, 0x00000047, 0x000006d4, 0x0004003d, 0x00000023, 0x000006d8, 0x000006d7,
+ 0x00060041, 0x000003d3, 0x000006d9, 0x00000046, 0x000005aa, 0x00000048, 0x0004003d, 0x00000023,
+ 0x000006da, 0x000006d9, 0x0004003d, 0x00000023, 0x000006dd, 0x000006d7, 0x00050083, 0x00000023,
+ 0x000006de, 0x000006da, 0x000006dd, 0x00050085, 0x00000023, 0x000006e0, 0x000006de, 0x000006af,
+ 0x00050081, 0x00000023, 0x000006e1, 0x000006d8, 0x000006e0, 0x00050085, 0x00000023, 0x000006e3,
+ 0x000006e1, 0x000006b2, 0x0003003e, 0x000006d7, 0x000006e3, 0x000200f9, 0x000006c6, 0x000200f8,
+ 0x000006c6, 0x000500b1, 0x00000285, 0x000006e8, 0x000006b4, 0x00000351, 0x000300f7, 0x000006ea,
+ 0x00000000, 0x000400fa, 0x000006e8, 0x000006e9, 0x000006ea, 0x000200f8, 0x000006e9, 0x00050051,
+ 0x00000006, 0x000006ec, 0x0000034e, 0x00000001, 0x000500b3, 0x00000285, 0x000006ee, 0x000006ec,
+ 0x00000354, 0x000200f9, 0x000006ea, 0x000200f8, 0x000006ea, 0x000700f5, 0x00000285, 0x000006ef,
+ 0x000006e8, 0x000006c6, 0x000006ee, 0x000006e9, 0x000300f7, 0x000006f1, 0x00000000, 0x000400fa,
+ 0x000006ef, 0x000006f0, 0x000006f1, 0x000200f8, 0x000006f0, 0x00050051, 0x00000006, 0x000006f3,
+ 0x0000034e, 0x00000002, 0x000500b1, 0x00000285, 0x000006f5, 0x000006f3, 0x00000357, 0x000200f9,
+ 0x000006f1, 0x000200f8, 0x000006f1, 0x000700f5, 0x00000285, 0x000006f6, 0x000006ef, 0x000006ea,
+ 0x000006f5, 0x000006f0, 0x000300f7, 0x000006f8, 0x00000000, 0x000400fa, 0x000006f6, 0x000006f7,
+ 0x000006f8, 0x000200f8, 0x000006f7, 0x00060041, 0x0000008b, 0x000006fa, 0x00000046, 0x0000005b,
+ 0x0000004d, 0x0004003d, 0x00000008, 0x000006fb, 0x000006fa, 0x00050051, 0x00000006, 0x00000701,
+ 0x0000034e, 0x00000001, 0x00050051, 0x00000006, 0x00000704, 0x0000034e, 0x00000002, 0x00050080,
+ 0x00000006, 0x00001782, 0x00000354, 0x0000005b, 0x00050084, 0x00000006, 0x00001784, 0x00001782,
+ 0x00000704, 0x00050080, 0x00000006, 0x00001785, 0x00000701, 0x00001784, 0x00050084, 0x00000006,
+ 0x00001786, 0x00000351, 0x00001785, 0x00050080, 0x00000006, 0x00001787, 0x000006b4, 0x00001786,
+ 0x0004007c, 0x00000008, 0x00001788, 0x00001787, 0x00050080, 0x00000008, 0x00000706, 0x000006fb,
+ 0x00001788, 0x00060041, 0x000002fa, 0x00000709, 0x000002ef, 0x00000047, 0x00000706, 0x0004003d,
+ 0x00000023, 0x0000070a, 0x00000709, 0x00060041, 0x000003d3, 0x0000070b, 0x00000046, 0x000005aa,
+ 0x0000004d, 0x0004003d, 0x00000023, 0x0000070c, 0x0000070b, 0x0004003d, 0x00000023, 0x0000070f,
+ 0x00000709, 0x00050083, 0x00000023, 0x00000710, 0x0000070c, 0x0000070f, 0x00050085, 0x00000023,
+ 0x00000712, 0x00000710, 0x000006af, 0x00050081, 0x00000023, 0x00000713, 0x0000070a, 0x00000712,
+ 0x00050085, 0x00000023, 0x00000715, 0x00000713, 0x000006b2, 0x0003003e, 0x00000709, 0x00000715,
+ 0x000200f9, 0x000006f8, 0x000200f8, 0x000006f8, 0x000300f7, 0x0000071c, 0x00000000, 0x000400fa,
+ 0x000006e8, 0x0000071b, 0x0000071c, 0x000200f8, 0x0000071b, 0x00050051, 0x00000006, 0x0000071e,
+ 0x0000034e, 0x00000001, 0x000500b1, 0x00000285, 0x00000720, 0x0000071e, 0x00000354, 0x000200f9,
+ 0x0000071c, 0x000200f8, 0x0000071c, 0x000700f5, 0x00000285, 0x00000721, 0x000006e8, 0x000006f8,
+ 0x00000720, 0x0000071b, 0x000300f7, 0x00000723, 0x00000000, 0x000400fa, 0x00000721, 0x00000722,
+ 0x00000723, 0x000200f8, 0x00000722, 0x00050051, 0x00000006, 0x00000725, 0x0000034e, 0x00000002,
+ 0x000500b3, 0x00000285, 0x00000727, 0x00000725, 0x00000357, 0x000200f9, 0x00000723, 0x000200f8,
+ 0x00000723, 0x000700f5, 0x00000285, 0x00000728, 0x00000721, 0x0000071c, 0x00000727, 0x00000722,
+ 0x000300f7, 0x0000072a, 0x00000000, 0x000400fa, 0x00000728, 0x00000729, 0x0000072a, 0x000200f8,
+ 0x00000729, 0x00060041, 0x0000008b, 0x0000072c, 0x00000046, 0x0000005b, 0x0000008a, 0x0004003d,
+ 0x00000008, 0x0000072d, 0x0000072c, 0x00050051, 0x00000006, 0x00000733, 0x0000034e, 0x00000001,
+ 0x00050051, 0x00000006, 0x00000736, 0x0000034e, 0x00000002, 0x00050084, 0x00000006, 0x00001792,
+ 0x00000354, 0x00000736, 0x00050080, 0x00000006, 0x00001793, 0x00000733, 0x00001792, 0x00050084,
+ 0x00000006, 0x00001794, 0x00000351, 0x00001793, 0x00050080, 0x00000006, 0x00001795, 0x000006b4,
+ 0x00001794, 0x0004007c, 0x00000008, 0x00001796, 0x00001795, 0x00050080, 0x00000008, 0x00000738,
+ 0x0000072d, 0x00001796, 0x00060041, 0x000002fa, 0x0000073b, 0x000002ef, 0x00000047, 0x00000738,
+ 0x0004003d, 0x00000023, 0x0000073c, 0x0000073b, 0x00060041, 0x000003d3, 0x0000073d, 0x00000046,
+ 0x000005aa, 0x0000008a, 0x0004003d, 0x00000023, 0x0000073e, 0x0000073d, 0x0004003d, 0x00000023,
+ 0x00000741, 0x0000073b, 0x00050083, 0x00000023, 0x00000742, 0x0000073e, 0x00000741, 0x00050085,
+ 0x00000023, 0x00000744, 0x00000742, 0x000006af, 0x00050081, 0x00000023, 0x00000745, 0x0000073c,
+ 0x00000744, 0x00050085, 0x00000023, 0x00000747, 0x00000745, 0x000006b2, 0x0003003e, 0x0000073b,
+ 0x00000747, 0x000200f9, 0x0000072a, 0x000200f8, 0x0000072a, 0x000200f9, 0x000006ac, 0x000200f8,
+ 0x000006ac, 0x000200f9, 0x00000604, 0x000200f8, 0x00000604, 0x000200f9, 0x000004dd, 0x000200f8,
+ 0x000004dd, 0x000200f9, 0x000003e8, 0x000200f8, 0x000003e8, 0x000200f9, 0x00000362, 0x000200f8,
+ 0x00000362, 0x000200f9, 0x0000075b, 0x000200f8, 0x0000075b, 0x000100fd, 0x00010038,
+};
+static const uint32_t spv_mg[] = {
+ 0x07230203, 0x00010300, 0x000d000b, 0x0000042f, 0x00000000, 0x00020011, 0x00000001, 0x0006000b,
+ 0x00000001, 0x4c534c47, 0x6474732e, 0x3035342e, 0x00000000, 0x0003000e, 0x00000000, 0x00000001,
+ 0x0006000f, 0x00000005, 0x00000004, 0x6e69616d, 0x00000000, 0x000000b1, 0x00060010, 0x00000004,
+ 0x00000011, 0x00000008, 0x00000008, 0x00000004, 0x00040047, 0x00000014, 0x00000006, 0x00000004,
+ 0x00030047, 0x00000015, 0x00000002, 0x00050048, 0x00000015, 0x00000000, 0x00000023, 0x00000000,
+ 0x00040047, 0x00000017, 0x00000021, 0x00000002, 0x00040047, 0x00000017, 0x00000022, 0x00000000,
+ 0x00040047, 0x0000003b, 0x00000006, 0x00000004, 0x00030047, 0x0000003c, 0x00000002, 0x00050048,
+ 0x0000003c, 0x00000000, 0x00000023, 0x00000000, 0x00040047, 0x0000003e, 0x00000021, 0x00000000,
+ 0x00040047, 0x0000003e, 0x00000022, 0x00000000, 0x00030047, 0x000000a5, 0x00000002, 0x00050048,
+ 0x000000a5, 0x00000000, 0x00000023, 0x00000000, 0x00050048, 0x000000a5, 0x00000001, 0x00000023,
+ 0x00000010, 0x00050048, 0x000000a5, 0x00000002, 0x00000023, 0x00000020, 0x00050048, 0x000000a5,
+ 0x00000003, 0x00000023, 0x00000030, 0x00050048, 0x000000a5, 0x00000004, 0x00000023, 0x00000040,
+ 0x00050048, 0x000000a5, 0x00000005, 0x00000023, 0x00000050, 0x00050048, 0x000000a5, 0x00000006,
+ 0x00000023, 0x00000060, 0x00040047, 0x000000b1, 0x0000000b, 0x0000001c, 0x00040047, 0x000002df,
+ 0x0000000b, 0x00000019, 0x00020013, 0x00000002, 0x00030021, 0x00000003, 0x00000002, 0x00040015,
+ 0x00000006, 0x00000020, 0x00000000, 0x00040015, 0x00000008, 0x00000020, 0x00000001, 0x00030016,
+ 0x0000000a, 0x00000020, 0x0003001d, 0x00000014, 0x00000006, 0x0003001e, 0x00000015, 0x00000014,
+ 0x00040020, 0x00000016, 0x0000000c, 0x00000015, 0x0004003b, 0x00000016, 0x00000017, 0x0000000c,
+ 0x0004002b, 0x00000008, 0x00000018, 0x00000000, 0x00040020, 0x0000001c, 0x0000000c, 0x00000006,
+ 0x0004002b, 0x00000006, 0x00000021, 0x000000ff, 0x0004002b, 0x00000008, 0x00000025, 0x00000008,
+ 0x0004002b, 0x00000006, 0x00000028, 0x00000000, 0x00020014, 0x00000029, 0x0004002b, 0x0000000a,
+ 0x0000002d, 0x00000000, 0x0003001d, 0x0000003b, 0x0000000a, 0x0003001e, 0x0000003c, 0x0000003b,
+ 0x00040020, 0x0000003d, 0x0000000c, 0x0000003c, 0x0004003b, 0x0000003d, 0x0000003e, 0x0000000c,
+ 0x00040020, 0x00000042, 0x0000000c, 0x0000000a, 0x0004002b, 0x00000006, 0x00000047, 0x00000001,
+ 0x0004002b, 0x00000006, 0x00000055, 0x00000002, 0x0004002b, 0x00000006, 0x00000063, 0x00000004,
+ 0x0004002b, 0x00000006, 0x00000072, 0x00000008, 0x0004002b, 0x00000006, 0x00000081, 0x00000010,
+ 0x0004002b, 0x00000006, 0x00000090, 0x00000020, 0x00040017, 0x000000a2, 0x00000008, 0x00000004,
+ 0x00040017, 0x000000a3, 0x00000006, 0x00000004, 0x00040017, 0x000000a4, 0x0000000a, 0x00000004,
+ 0x0009001e, 0x000000a5, 0x000000a2, 0x000000a3, 0x000000a3, 0x000000a3, 0x000000a4, 0x000000a4,
+ 0x000000a4, 0x00040020, 0x000000a6, 0x00000009, 0x000000a5, 0x0004003b, 0x000000a6, 0x000000a7,
+ 0x00000009, 0x0004002b, 0x00000006, 0x000000a8, 0x00000003, 0x00040020, 0x000000a9, 0x00000009,
+ 0x00000008, 0x00040017, 0x000000ac, 0x00000008, 0x00000003, 0x00040017, 0x000000af, 0x00000006,
+ 0x00000003, 0x00040020, 0x000000b0, 0x00000001, 0x000000af, 0x0004003b, 0x000000b0, 0x000000b1,
+ 0x00000001, 0x00040020, 0x000000b5, 0x00000009, 0x000000a2, 0x00040017, 0x000000b9, 0x00000029,
+ 0x00000003, 0x0004002b, 0x00000008, 0x000000d7, 0x00000001, 0x00040020, 0x000000d8, 0x00000009,
+ 0x00000006, 0x0004002b, 0x00000008, 0x000000eb, 0x00000002, 0x0004002b, 0x00000008, 0x000001b0,
+ 0x00000003, 0x0004002b, 0x0000000a, 0x00000221, 0x3f000000, 0x0004002b, 0x00000008, 0x00000227,
+ 0x00000005, 0x0004002b, 0x00000008, 0x000002ab, 0x00000004, 0x0006002c, 0x000000af, 0x000002df,
+ 0x00000072, 0x00000072, 0x00000063, 0x00050036, 0x00000002, 0x00000004, 0x00000000, 0x00000003,
+ 0x000200f8, 0x00000005, 0x000300f7, 0x000002f0, 0x00000000, 0x000300fb, 0x00000028, 0x000002f1,
+ 0x000200f8, 0x000002f1, 0x00060041, 0x000000a9, 0x000000aa, 0x000000a7, 0x00000018, 0x000000a8,
+ 0x0004003d, 0x00000008, 0x000000ab, 0x000000aa, 0x0004003d, 0x000000af, 0x000000b2, 0x000000b1,
+ 0x0004007c, 0x000000ac, 0x000000b3, 0x000000b2, 0x00050041, 0x000000b5, 0x000000b6, 0x000000a7,
+ 0x00000018, 0x0004003d, 0x000000a2, 0x000000b7, 0x000000b6, 0x0008004f, 0x000000ac, 0x000000b8,
+ 0x000000b7, 0x000000b7, 0x00000000, 0x00000001, 0x00000002, 0x000500af, 0x000000b9, 0x000000ba,
+ 0x000000b3, 0x000000b8, 0x0004009a, 0x00000029, 0x000000bb, 0x000000ba, 0x000300f7, 0x000000bd,
+ 0x00000000, 0x000400fa, 0x000000bb, 0x000000bc, 0x000000bd, 0x000200f8, 0x000000bc, 0x000200f9,
+ 0x000002f0, 0x000200f8, 0x000000bd, 0x00060041, 0x000000a9, 0x000000c0, 0x000000a7, 0x00000018,
+ 0x00000028, 0x0004003d, 0x00000008, 0x000000c1, 0x000000c0, 0x00060041, 0x000000a9, 0x000000c3,
+ 0x000000a7, 0x00000018, 0x00000047, 0x0004003d, 0x00000008, 0x000000c4, 0x000000c3, 0x00050051,
+ 0x00000008, 0x000000c7, 0x000000b3, 0x00000000, 0x00050051, 0x00000008, 0x000000ca, 0x000000b3,
+ 0x00000001, 0x00050051, 0x00000008, 0x000000cd, 0x000000b3, 0x00000002, 0x00050084, 0x00000008,
+ 0x000000ce, 0x000000c4, 0x000000cd, 0x00050080, 0x00000008, 0x000000cf, 0x000000ca, 0x000000ce,
+ 0x00050084, 0x00000008, 0x000000d0, 0x000000c1, 0x000000cf, 0x00050080, 0x00000008, 0x000000d1,
+ 0x000000c7, 0x000000d0, 0x0004007c, 0x00000006, 0x000000d2, 0x000000d1, 0x000500aa, 0x00000029,
+ 0x000000d4, 0x000000ab, 0x00000018, 0x000300f7, 0x000000d6, 0x00000000, 0x000400fa, 0x000000d4,
+ 0x000000d5, 0x000000de, 0x000200f8, 0x000000d5, 0x00060041, 0x000000d8, 0x000000d9, 0x000000a7,
+ 0x000000d7, 0x00000028, 0x0004003d, 0x00000006, 0x000000da, 0x000000d9, 0x00050080, 0x00000006,
+ 0x000000dc, 0x000000da, 0x000000d2, 0x00060041, 0x00000042, 0x000000dd, 0x0000003e, 0x00000018,
+ 0x000000dc, 0x0003003e, 0x000000dd, 0x0000002d, 0x000200f9, 0x000000d6, 0x000200f8, 0x000000de,
+ 0x000500aa, 0x00000029, 0x000000e0, 0x000000ab, 0x000000d7, 0x000300f7, 0x000000e2, 0x00000000,
+ 0x000400fa, 0x000000e0, 0x000000e1, 0x00000181, 0x000200f8, 0x000000e1, 0x00050080, 0x00000008,
+ 0x000000e7, 0x000000c7, 0x000000ca, 0x00050080, 0x00000008, 0x000000ea, 0x000000e7, 0x000000cd,
+ 0x00060041, 0x000000d8, 0x000000ec, 0x000000a7, 0x000000eb, 0x00000028, 0x0004003d, 0x00000006,
+ 0x000000ed, 0x000000ec, 0x0004007c, 0x00000008, 0x000000ee, 0x000000ed, 0x00050080, 0x00000008,
+ 0x000000ef, 0x000000ea, 0x000000ee, 0x000500c7, 0x00000008, 0x000000f0, 0x000000ef, 0x000000d7,
+ 0x000500ab, 0x00000029, 0x000000f1, 0x000000f0, 0x00000018, 0x000300f7, 0x000000f3, 0x00000000,
+ 0x000400fa, 0x000000f1, 0x000000f2, 0x000000f3, 0x000200f8, 0x000000f2, 0x000200f9, 0x000002f0,
+ 0x000200f8, 0x000000f3, 0x00060041, 0x000000d8, 0x000000f6, 0x000000a7, 0x000000d7, 0x000000a8,
+ 0x0004003d, 0x00000006, 0x000000f7, 0x000000f6, 0x00050080, 0x00000006, 0x000000f9, 0x000000f7,
+ 0x000000d2, 0x00060041, 0x0000001c, 0x000000fa, 0x00000017, 0x00000018, 0x000000f9, 0x0004003d,
+ 0x00000006, 0x000000fb, 0x000000fa, 0x000500c7, 0x00000006, 0x000000fe, 0x000000fb, 0x00000021,
+ 0x000500c2, 0x00000006, 0x00000101, 0x000000fb, 0x00000025, 0x000500aa, 0x00000029, 0x00000103,
+ 0x000000fe, 0x00000028, 0x000300f7, 0x00000105, 0x00000000, 0x000400fa, 0x00000103, 0x00000104,
+ 0x00000105, 0x000200f8, 0x00000104, 0x000200f9, 0x000002f0, 0x000200f8, 0x00000105, 0x00060041,
+ 0x000000d8, 0x00000108, 0x000000a7, 0x000000d7, 0x00000028, 0x0004003d, 0x00000006, 0x00000109,
+ 0x00000108, 0x0004007c, 0x00000006, 0x0000010c, 0x000000c1, 0x00050084, 0x00000008, 0x00000110,
+ 0x000000c1, 0x000000c4, 0x0004007c, 0x00000006, 0x00000111, 0x00000110, 0x00060041, 0x000000d8,
+ 0x00000113, 0x000000a7, 0x000000d7, 0x00000047, 0x0004003d, 0x00000006, 0x00000114, 0x00000113,
+ 0x00050080, 0x00000006, 0x00000116, 0x00000114, 0x000000d2, 0x00060041, 0x00000042, 0x00000117,
+ 0x0000003e, 0x00000018, 0x00000116, 0x0004003d, 0x0000000a, 0x00000118, 0x00000117, 0x00060041,
+ 0x000000d8, 0x00000119, 0x000000a7, 0x000000eb, 0x00000047, 0x0004003d, 0x00000006, 0x0000011a,
+ 0x00000119, 0x000500ab, 0x00000029, 0x0000011b, 0x0000011a, 0x00000028, 0x000300f7, 0x0000011d,
+ 0x00000000, 0x000400fa, 0x0000011b, 0x0000011c, 0x0000011d, 0x000200f8, 0x0000011c, 0x00050080,
+ 0x00000006, 0x00000120, 0x00000109, 0x000000d2, 0x00040070, 0x0000000a, 0x00000123, 0x000000fe,
+ 0x00050088, 0x0000000a, 0x00000124, 0x00000118, 0x00000123, 0x00060041, 0x00000042, 0x00000125,
+ 0x0000003e, 0x00000018, 0x00000120, 0x0003003e, 0x00000125, 0x00000124, 0x000200f9, 0x000002f0,
+ 0x000200f8, 0x0000011d, 0x000500c7, 0x00000006, 0x00000128, 0x00000101, 0x00000047, 0x000500ab,
+ 0x00000029, 0x00000129, 0x00000128, 0x00000028, 0x000300f7, 0x0000012b, 0x00000000, 0x000400fa,
+ 0x00000129, 0x0000012a, 0x0000012b, 0x000200f8, 0x0000012a, 0x00050080, 0x00000006, 0x0000012e,
+ 0x00000109, 0x000000d2, 0x00050082, 0x00000006, 0x0000012f, 0x0000012e, 0x00000047, 0x00060041,
+ 0x00000042, 0x00000130, 0x0000003e, 0x00000018, 0x0000012f, 0x0004003d, 0x0000000a, 0x00000131,
+ 0x00000130, 0x00050081, 0x0000000a, 0x00000133, 0x00000118, 0x00000131, 0x000200f9, 0x0000012b,
+ 0x000200f8, 0x0000012b, 0x000700f5, 0x0000000a, 0x00000425, 0x00000118, 0x0000011d, 0x00000133,
+ 0x0000012a, 0x000500c7, 0x00000006, 0x00000135, 0x00000101, 0x00000055, 0x000500ab, 0x00000029,
+ 0x00000136, 0x00000135, 0x00000028, 0x000300f7, 0x00000138, 0x00000000, 0x000400fa, 0x00000136,
+ 0x00000137, 0x00000138, 0x000200f8, 0x00000137, 0x00050080, 0x00000006, 0x0000013b, 0x00000109,
+ 0x000000d2, 0x00050080, 0x00000006, 0x0000013c, 0x0000013b, 0x00000047, 0x00060041, 0x00000042,
+ 0x0000013d, 0x0000003e, 0x00000018, 0x0000013c, 0x0004003d, 0x0000000a, 0x0000013e, 0x0000013d,
+ 0x00050081, 0x0000000a, 0x00000140, 0x00000425, 0x0000013e, 0x000200f9, 0x00000138, 0x000200f8,
+ 0x00000138, 0x000700f5, 0x0000000a, 0x00000426, 0x00000425, 0x0000012b, 0x00000140, 0x00000137,
+ 0x000500c7, 0x00000006, 0x00000142, 0x00000101, 0x00000063, 0x000500ab, 0x00000029, 0x00000143,
+ 0x00000142, 0x00000028, 0x000300f7, 0x00000145, 0x00000000, 0x000400fa, 0x00000143, 0x00000144,
+ 0x00000145, 0x000200f8, 0x00000144, 0x00050080, 0x00000006, 0x00000148, 0x00000109, 0x000000d2,
+ 0x00050082, 0x00000006, 0x0000014a, 0x00000148, 0x0000010c, 0x00060041, 0x00000042, 0x0000014b,
+ 0x0000003e, 0x00000018, 0x0000014a, 0x0004003d, 0x0000000a, 0x0000014c, 0x0000014b, 0x00050081,
+ 0x0000000a, 0x0000014e, 0x00000426, 0x0000014c, 0x000200f9, 0x00000145, 0x000200f8, 0x00000145,
+ 0x000700f5, 0x0000000a, 0x00000427, 0x00000426, 0x00000138, 0x0000014e, 0x00000144, 0x000500c7,
+ 0x00000006, 0x00000150, 0x00000101, 0x00000072, 0x000500ab, 0x00000029, 0x00000151, 0x00000150,
+ 0x00000028, 0x000300f7, 0x00000153, 0x00000000, 0x000400fa, 0x00000151, 0x00000152, 0x00000153,
+ 0x000200f8, 0x00000152, 0x00050080, 0x00000006, 0x00000156, 0x00000109, 0x000000d2, 0x00050080,
+ 0x00000006, 0x00000158, 0x00000156, 0x0000010c, 0x00060041, 0x00000042, 0x00000159, 0x0000003e,
+ 0x00000018, 0x00000158, 0x0004003d, 0x0000000a, 0x0000015a, 0x00000159, 0x00050081, 0x0000000a,
+ 0x0000015c, 0x00000427, 0x0000015a, 0x000200f9, 0x00000153, 0x000200f8, 0x00000153, 0x000700f5,
+ 0x0000000a, 0x00000428, 0x00000427, 0x00000145, 0x0000015c, 0x00000152, 0x000500c7, 0x00000006,
+ 0x0000015e, 0x00000101, 0x00000081, 0x000500ab, 0x00000029, 0x0000015f, 0x0000015e, 0x00000028,
+ 0x000300f7, 0x00000161, 0x00000000, 0x000400fa, 0x0000015f, 0x00000160, 0x00000161, 0x000200f8,
+ 0x00000160, 0x00050080, 0x00000006, 0x00000164, 0x00000109, 0x000000d2, 0x00050082, 0x00000006,
+ 0x00000166, 0x00000164, 0x00000111, 0x00060041, 0x00000042, 0x00000167, 0x0000003e, 0x00000018,
+ 0x00000166, 0x0004003d, 0x0000000a, 0x00000168, 0x00000167, 0x00050081, 0x0000000a, 0x0000016a,
+ 0x00000428, 0x00000168, 0x000200f9, 0x00000161, 0x000200f8, 0x00000161, 0x000700f5, 0x0000000a,
+ 0x00000429, 0x00000428, 0x00000153, 0x0000016a, 0x00000160, 0x000500c7, 0x00000006, 0x0000016c,
+ 0x00000101, 0x00000090, 0x000500ab, 0x00000029, 0x0000016d, 0x0000016c, 0x00000028, 0x000300f7,
+ 0x0000016f, 0x00000000, 0x000400fa, 0x0000016d, 0x0000016e, 0x0000016f, 0x000200f8, 0x0000016e,
+ 0x00050080, 0x00000006, 0x00000172, 0x00000109, 0x000000d2, 0x00050080, 0x00000006, 0x00000174,
+ 0x00000172, 0x00000111, 0x00060041, 0x00000042, 0x00000175, 0x0000003e, 0x00000018, 0x00000174,
+ 0x0004003d, 0x0000000a, 0x00000176, 0x00000175, 0x00050081, 0x0000000a, 0x00000178, 0x00000429,
+ 0x00000176, 0x000200f9, 0x0000016f, 0x000200f8, 0x0000016f, 0x000700f5, 0x0000000a, 0x0000042a,
+ 0x00000429, 0x00000161, 0x00000178, 0x0000016e, 0x00050080, 0x00000006, 0x0000017b, 0x00000109,
+ 0x000000d2, 0x00040070, 0x0000000a, 0x0000017e, 0x000000fe, 0x00050088, 0x0000000a, 0x0000017f,
+ 0x0000042a, 0x0000017e, 0x00060041, 0x00000042, 0x00000180, 0x0000003e, 0x00000018, 0x0000017b,
+ 0x0003003e, 0x00000180, 0x0000017f, 0x000200f9, 0x000000e2, 0x000200f8, 0x00000181, 0x000500aa,
+ 0x00000029, 0x00000183, 0x000000ab, 0x000000eb, 0x000300f7, 0x00000185, 0x00000000, 0x000400fa,
+ 0x00000183, 0x00000184, 0x000001ae, 0x000200f8, 0x00000184, 0x00060041, 0x000000d8, 0x00000187,
+ 0x000000a7, 0x000000d7, 0x000000a8, 0x0004003d, 0x00000006, 0x00000188, 0x00000187, 0x00050080,
+ 0x00000006, 0x0000018a, 0x00000188, 0x000000d2, 0x00060041, 0x0000001c, 0x0000018b, 0x00000017,
+ 0x00000018, 0x0000018a, 0x0004003d, 0x00000006, 0x0000018c, 0x0000018b, 0x000500c7, 0x00000006,
+ 0x0000018d, 0x0000018c, 0x00000021, 0x00060041, 0x000000d8, 0x0000018e, 0x000000a7, 0x000000d7,
+ 0x00000055, 0x0004003d, 0x00000006, 0x0000018f, 0x0000018e, 0x00050080, 0x00000006, 0x00000191,
+ 0x0000018f, 0x000000d2, 0x000500ab, 0x00000029, 0x00000193, 0x0000018d, 0x00000028, 0x000300f7,
+ 0x00000196, 0x00000000, 0x000400fa, 0x00000193, 0x00000195, 0x000001ab, 0x000200f8, 0x00000195,
+ 0x00060041, 0x000000d8, 0x00000197, 0x000000a7, 0x000000d7, 0x00000047, 0x0004003d, 0x00000006,
+ 0x00000198, 0x00000197, 0x00050080, 0x00000006, 0x0000019a, 0x00000198, 0x000000d2, 0x00060041,
+ 0x00000042, 0x0000019b, 0x0000003e, 0x00000018, 0x0000019a, 0x0004003d, 0x0000000a, 0x0000019c,
+ 0x0000019b, 0x00060041, 0x000000d8, 0x0000019e, 0x000000a7, 0x000000d7, 0x00000028, 0x0004003d,
+ 0x00000006, 0x0000019f, 0x0000019e, 0x000300f7, 0x00000374, 0x00000000, 0x000300fb, 0x00000028,
+ 0x00000305, 0x000200f8, 0x00000305, 0x0004003d, 0x00000006, 0x0000030a, 0x0000018b, 0x000500c7,
+ 0x00000006, 0x0000030c, 0x0000030a, 0x00000021, 0x000500c2, 0x00000006, 0x0000030e, 0x0000030a,
+ 0x00000025, 0x000500aa, 0x00000029, 0x00000310, 0x0000030c, 0x00000028, 0x000300f7, 0x00000312,
+ 0x00000000, 0x000400fa, 0x00000310, 0x00000311, 0x00000312, 0x000200f8, 0x00000311, 0x000200f9,
+ 0x00000374, 0x000200f8, 0x00000312, 0x0004007c, 0x00000006, 0x00000314, 0x000000c1, 0x00050084,
+ 0x00000008, 0x00000317, 0x000000c1, 0x000000c4, 0x0004007c, 0x00000006, 0x00000318, 0x00000317,
+ 0x00040070, 0x0000000a, 0x0000031a, 0x0000030c, 0x00050080, 0x00000006, 0x0000031d, 0x0000019f,
+ 0x000000d2, 0x00060041, 0x00000042, 0x0000031e, 0x0000003e, 0x00000018, 0x0000031d, 0x0004003d,
+ 0x0000000a, 0x0000031f, 0x0000031e, 0x00050085, 0x0000000a, 0x00000320, 0x0000031a, 0x0000031f,
+ 0x000500c7, 0x00000006, 0x00000322, 0x0000030e, 0x00000047, 0x000500ab, 0x00000029, 0x00000323,
+ 0x00000322, 0x00000028, 0x000300f7, 0x0000032d, 0x00000000, 0x000400fa, 0x00000323, 0x00000324,
+ 0x0000032d, 0x000200f8, 0x00000324, 0x00050082, 0x00000006, 0x00000328, 0x0000031d, 0x00000047,
+ 0x00060041, 0x00000042, 0x00000329, 0x0000003e, 0x00000018, 0x00000328, 0x0004003d, 0x0000000a,
+ 0x0000032a, 0x00000329, 0x00050083, 0x0000000a, 0x0000032c, 0x00000320, 0x0000032a, 0x000200f9,
+ 0x0000032d, 0x000200f8, 0x0000032d, 0x000700f5, 0x0000000a, 0x0000041d, 0x00000320, 0x00000312,
+ 0x0000032c, 0x00000324, 0x000500c7, 0x00000006, 0x0000032f, 0x0000030e, 0x00000055, 0x000500ab,
+ 0x00000029, 0x00000330, 0x0000032f, 0x00000028, 0x000300f7, 0x0000033a, 0x00000000, 0x000400fa,
+ 0x00000330, 0x00000331, 0x0000033a, 0x000200f8, 0x00000331, 0x00050080, 0x00000006, 0x00000335,
+ 0x0000031d, 0x00000047, 0x00060041, 0x00000042, 0x00000336, 0x0000003e, 0x00000018, 0x00000335,
+ 0x0004003d, 0x0000000a, 0x00000337, 0x00000336, 0x00050083, 0x0000000a, 0x00000339, 0x0000041d,
+ 0x00000337, 0x000200f9, 0x0000033a, 0x000200f8, 0x0000033a, 0x000700f5, 0x0000000a, 0x0000041e,
+ 0x0000041d, 0x0000032d, 0x00000339, 0x00000331, 0x000500c7, 0x00000006, 0x0000033c, 0x0000030e,
+ 0x00000063, 0x000500ab, 0x00000029, 0x0000033d, 0x0000033c, 0x00000028, 0x000300f7, 0x00000348,
+ 0x00000000, 0x000400fa, 0x0000033d, 0x0000033e, 0x00000348, 0x000200f8, 0x0000033e, 0x00050082,
+ 0x00000006, 0x00000343, 0x0000031d, 0x00000314, 0x00060041, 0x00000042, 0x00000344, 0x0000003e,
+ 0x00000018, 0x00000343, 0x0004003d, 0x0000000a, 0x00000345, 0x00000344, 0x00050083, 0x0000000a,
+ 0x00000347, 0x0000041e, 0x00000345, 0x000200f9, 0x00000348, 0x000200f8, 0x00000348, 0x000700f5,
+ 0x0000000a, 0x0000041f, 0x0000041e, 0x0000033a, 0x00000347, 0x0000033e, 0x000500c7, 0x00000006,
+ 0x0000034a, 0x0000030e, 0x00000072, 0x000500ab, 0x00000029, 0x0000034b, 0x0000034a, 0x00000028,
+ 0x000300f7, 0x00000356, 0x00000000, 0x000400fa, 0x0000034b, 0x0000034c, 0x00000356, 0x000200f8,
+ 0x0000034c, 0x00050080, 0x00000006, 0x00000351, 0x0000031d, 0x00000314, 0x00060041, 0x00000042,
+ 0x00000352, 0x0000003e, 0x00000018, 0x00000351, 0x0004003d, 0x0000000a, 0x00000353, 0x00000352,
+ 0x00050083, 0x0000000a, 0x00000355, 0x0000041f, 0x00000353, 0x000200f9, 0x00000356, 0x000200f8,
+ 0x00000356, 0x000700f5, 0x0000000a, 0x00000420, 0x0000041f, 0x00000348, 0x00000355, 0x0000034c,
+ 0x000500c7, 0x00000006, 0x00000358, 0x0000030e, 0x00000081, 0x000500ab, 0x00000029, 0x00000359,
+ 0x00000358, 0x00000028, 0x000300f7, 0x00000364, 0x00000000, 0x000400fa, 0x00000359, 0x0000035a,
+ 0x00000364, 0x000200f8, 0x0000035a, 0x00050082, 0x00000006, 0x0000035f, 0x0000031d, 0x00000318,
+ 0x00060041, 0x00000042, 0x00000360, 0x0000003e, 0x00000018, 0x0000035f, 0x0004003d, 0x0000000a,
+ 0x00000361, 0x00000360, 0x00050083, 0x0000000a, 0x00000363, 0x00000420, 0x00000361, 0x000200f9,
+ 0x00000364, 0x000200f8, 0x00000364, 0x000700f5, 0x0000000a, 0x00000421, 0x00000420, 0x00000356,
+ 0x00000363, 0x0000035a, 0x000500c7, 0x00000006, 0x00000366, 0x0000030e, 0x00000090, 0x000500ab,
+ 0x00000029, 0x00000367, 0x00000366, 0x00000028, 0x000300f7, 0x00000372, 0x00000000, 0x000400fa,
+ 0x00000367, 0x00000368, 0x00000372, 0x000200f8, 0x00000368, 0x00050080, 0x00000006, 0x0000036d,
+ 0x0000031d, 0x00000318, 0x00060041, 0x00000042, 0x0000036e, 0x0000003e, 0x00000018, 0x0000036d,
+ 0x0004003d, 0x0000000a, 0x0000036f, 0x0000036e, 0x00050083, 0x0000000a, 0x00000371, 0x00000421,
+ 0x0000036f, 0x000200f9, 0x00000372, 0x000200f8, 0x00000372, 0x000700f5, 0x0000000a, 0x00000422,
+ 0x00000421, 0x00000364, 0x00000371, 0x00000368, 0x000200f9, 0x00000374, 0x000200f8, 0x00000374,
+ 0x000700f5, 0x0000000a, 0x00000423, 0x0000002d, 0x00000311, 0x00000422, 0x00000372, 0x00050083,
+ 0x0000000a, 0x000001aa, 0x0000019c, 0x00000423, 0x000200f9, 0x00000196, 0x000200f8, 0x000001ab,
+ 0x000200f9, 0x00000196, 0x000200f8, 0x00000196, 0x000700f5, 0x0000000a, 0x00000424, 0x000001aa,
+ 0x00000374, 0x0000002d, 0x000001ab, 0x00060041, 0x00000042, 0x000001ad, 0x0000003e, 0x00000018,
+ 0x00000191, 0x0003003e, 0x000001ad, 0x00000424, 0x000200f9, 0x00000185, 0x000200f8, 0x000001ae,
+ 0x000500aa, 0x00000029, 0x000001b1, 0x000000ab, 0x000001b0, 0x000300f7, 0x000001b3, 0x00000000,
+ 0x000400fa, 0x000001b1, 0x000001b2, 0x00000225, 0x000200f8, 0x000001b2, 0x00060041, 0x000000d8,
+ 0x000001b4, 0x000000a7, 0x000000d7, 0x000000a8, 0x0004003d, 0x00000006, 0x000001b5, 0x000001b4,
+ 0x00050080, 0x00000006, 0x000001b7, 0x000001b5, 0x000000d2, 0x00060041, 0x0000001c, 0x000001b8,
+ 0x00000017, 0x00000018, 0x000001b7, 0x0004003d, 0x00000006, 0x000001b9, 0x000001b8, 0x000500c7,
+ 0x00000006, 0x000001ba, 0x000001b9, 0x00000021, 0x000500aa, 0x00000029, 0x000001bb, 0x000001ba,
+ 0x00000028, 0x000300f7, 0x000001bd, 0x00000000, 0x000400fa, 0x000001bb, 0x000001bc, 0x000001bd,
+ 0x000200f8, 0x000001bc, 0x00060041, 0x000000d8, 0x000001be, 0x000000a7, 0x000000d7, 0x00000055,
+ 0x0004003d, 0x00000006, 0x000001bf, 0x000001be, 0x00050080, 0x00000006, 0x000001c1, 0x000001bf,
+ 0x000000d2, 0x00060041, 0x00000042, 0x000001c2, 0x0000003e, 0x00000018, 0x000001c1, 0x0003003e,
+ 0x000001c2, 0x0000002d, 0x000200f9, 0x000002f0, 0x000200f8, 0x000001bd, 0x00060041, 0x000000d8,
+ 0x000001c5, 0x000000a7, 0x000000eb, 0x00000028, 0x0004003d, 0x00000006, 0x000001c6, 0x000001c5,
+ 0x0004007c, 0x00000008, 0x000001c7, 0x000001c6, 0x00060041, 0x000000d8, 0x000001c9, 0x000000a7,
+ 0x000000eb, 0x00000047, 0x0004003d, 0x00000006, 0x000001ca, 0x000001c9, 0x0004007c, 0x00000008,
+ 0x000001cb, 0x000001ca, 0x00060041, 0x000000d8, 0x000001cd, 0x000000a7, 0x000000eb, 0x00000055,
+ 0x0004003d, 0x00000006, 0x000001ce, 0x000001cd, 0x0004007c, 0x00000008, 0x000001cf, 0x000001ce,
+ 0x000200f9, 0x000001d2, 0x000200f8, 0x000001d2, 0x000700f5, 0x0000000a, 0x0000041a, 0x0000002d,
+ 0x000001bd, 0x0000042d, 0x000001d5, 0x000700f5, 0x00000008, 0x00000419, 0x00000018, 0x000001bd,
+ 0x0000021c, 0x000001d5, 0x000500b1, 0x00000029, 0x000001d8, 0x00000419, 0x00000025, 0x000400f6,
+ 0x000001d4, 0x000001d5, 0x00000000, 0x000400fa, 0x000001d8, 0x000001d3, 0x000001d4, 0x000200f8,
+ 0x000001d3, 0x00050084, 0x00000008, 0x000001dc, 0x000000eb, 0x000000c7, 0x000500c7, 0x00000008,
+ 0x000001de, 0x00000419, 0x000000d7, 0x00050080, 0x00000008, 0x000001df, 0x000001dc, 0x000001de,
+ 0x00050084, 0x00000008, 0x000001e3, 0x000000eb, 0x000000ca, 0x000500c3, 0x00000008, 0x000001e5,
+ 0x00000419, 0x000000d7, 0x000500c7, 0x00000008, 0x000001e6, 0x000001e5, 0x000000d7, 0x00050080,
+ 0x00000008, 0x000001e7, 0x000001e3, 0x000001e6, 0x00050084, 0x00000008, 0x000001eb, 0x000000eb,
+ 0x000000cd, 0x000500c3, 0x00000008, 0x000001ed, 0x00000419, 0x000000eb, 0x000500c7, 0x00000008,
+ 0x000001ee, 0x000001ed, 0x000000d7, 0x00050080, 0x00000008, 0x000001ef, 0x000001eb, 0x000001ee,
+ 0x000500af, 0x00000029, 0x000001f2, 0x000001df, 0x000001c7, 0x000500af, 0x00000029, 0x000001f5,
+ 0x000001e7, 0x000001cb, 0x000500a6, 0x00000029, 0x000001f6, 0x000001f2, 0x000001f5, 0x000500af,
+ 0x00000029, 0x000001f9, 0x000001ef, 0x000001cf, 0x000500a6, 0x00000029, 0x000001fa, 0x000001f6,
+ 0x000001f9, 0x000300f7, 0x000001fc, 0x00000000, 0x000400fa, 0x000001fa, 0x000001fb, 0x000001fc,
+ 0x000200f8, 0x000001fb, 0x000200f9, 0x000001d5, 0x000200f8, 0x000001fc, 0x00050084, 0x00000008,
+ 0x00000204, 0x000001cb, 0x000001ef, 0x00050080, 0x00000008, 0x00000205, 0x000001e7, 0x00000204,
+ 0x00050084, 0x00000008, 0x00000206, 0x000001c7, 0x00000205, 0x00050080, 0x00000008, 0x00000207,
+ 0x000001df, 0x00000206, 0x0004007c, 0x00000006, 0x00000208, 0x00000207, 0x00060041, 0x000000d8,
+ 0x00000209, 0x000000a7, 0x000000d7, 0x00000047, 0x0004003d, 0x00000006, 0x0000020a, 0x00000209,
+ 0x00050080, 0x00000006, 0x0000020c, 0x0000020a, 0x00000208, 0x00060041, 0x0000001c, 0x0000020d,
+ 0x00000017, 0x00000018, 0x0000020c, 0x0004003d, 0x00000006, 0x0000020e, 0x0000020d, 0x000500c7,
+ 0x00000006, 0x0000020f, 0x0000020e, 0x00000021, 0x000500ab, 0x00000029, 0x00000210, 0x0000020f,
+ 0x00000028, 0x000300f7, 0x00000212, 0x00000000, 0x000400fa, 0x00000210, 0x00000211, 0x00000212,
+ 0x000200f8, 0x00000211, 0x00060041, 0x000000d8, 0x00000213, 0x000000a7, 0x000000d7, 0x00000028,
+ 0x0004003d, 0x00000006, 0x00000214, 0x00000213, 0x00050080, 0x00000006, 0x00000216, 0x00000214,
+ 0x00000208, 0x00060041, 0x00000042, 0x00000217, 0x0000003e, 0x00000018, 0x00000216, 0x0004003d,
+ 0x0000000a, 0x00000218, 0x00000217, 0x00050081, 0x0000000a, 0x0000021a, 0x0000041a, 0x00000218,
+ 0x000200f9, 0x00000212, 0x000200f8, 0x00000212, 0x000700f5, 0x0000000a, 0x0000042e, 0x0000041a,
+ 0x000001fc, 0x0000021a, 0x00000211, 0x000200f9, 0x000001d5, 0x000200f8, 0x000001d5, 0x000700f5,
+ 0x0000000a, 0x0000042d, 0x0000041a, 0x000001fb, 0x0000042e, 0x00000212, 0x00050080, 0x00000008,
+ 0x0000021c, 0x00000419, 0x000000d7, 0x000200f9, 0x000001d2, 0x000200f8, 0x000001d4, 0x00060041,
+ 0x000000d8, 0x0000021d, 0x000000a7, 0x000000d7, 0x00000055, 0x0004003d, 0x00000006, 0x0000021e,
+ 0x0000021d, 0x00050080, 0x00000006, 0x00000220, 0x0000021e, 0x000000d2, 0x00050085, 0x0000000a,
+ 0x00000223, 0x00000221, 0x0000041a, 0x00060041, 0x00000042, 0x00000224, 0x0000003e, 0x00000018,
+ 0x00000220, 0x0003003e, 0x00000224, 0x00000223, 0x000200f9, 0x000001b3, 0x000200f8, 0x00000225,
+ 0x000500aa, 0x00000029, 0x00000228, 0x000000ab, 0x00000227, 0x000300f7, 0x0000022a, 0x00000000,
+ 0x000400fa, 0x00000228, 0x00000229, 0x000002a9, 0x000200f8, 0x00000229, 0x00060041, 0x000000d8,
+ 0x0000022b, 0x000000a7, 0x000000d7, 0x000000a8, 0x0004003d, 0x00000006, 0x0000022c, 0x0000022b,
+ 0x00050080, 0x00000006, 0x0000022e, 0x0000022c, 0x000000d2, 0x00060041, 0x0000001c, 0x0000022f,
+ 0x00000017, 0x00000018, 0x0000022e, 0x0004003d, 0x00000006, 0x00000230, 0x0000022f, 0x000500c7,
+ 0x00000006, 0x00000231, 0x00000230, 0x00000021, 0x000500aa, 0x00000029, 0x00000232, 0x00000231,
+ 0x00000028, 0x000300f7, 0x00000234, 0x00000000, 0x000400fa, 0x00000232, 0x00000233, 0x00000234,
+ 0x000200f8, 0x00000233, 0x00060041, 0x000000d8, 0x00000235, 0x000000a7, 0x000000d7, 0x00000055,
+ 0x0004003d, 0x00000006, 0x00000236, 0x00000235, 0x00050080, 0x00000006, 0x00000238, 0x00000236,
+ 0x000000d2, 0x00060041, 0x00000042, 0x00000239, 0x0000003e, 0x00000018, 0x00000238, 0x0003003e,
+ 0x00000239, 0x0000002d, 0x000200f9, 0x000002f0, 0x000200f8, 0x00000234, 0x00060041, 0x000000d8,
+ 0x0000023c, 0x000000a7, 0x000000eb, 0x00000028, 0x0004003d, 0x00000006, 0x0000023d, 0x0000023c,
+ 0x0004007c, 0x00000008, 0x0000023e, 0x0000023d, 0x00060041, 0x000000d8, 0x00000240, 0x000000a7,
+ 0x000000eb, 0x00000047, 0x0004003d, 0x00000006, 0x00000241, 0x00000240, 0x0004007c, 0x00000008,
+ 0x00000242, 0x00000241, 0x00060041, 0x000000d8, 0x00000244, 0x000000a7, 0x000000eb, 0x00000055,
+ 0x0004003d, 0x00000006, 0x00000245, 0x00000244, 0x0004007c, 0x00000008, 0x00000246, 0x00000245,
+ 0x000200f9, 0x00000249, 0x000200f8, 0x00000249, 0x000700f5, 0x0000000a, 0x00000401, 0x0000002d,
+ 0x00000234, 0x0000042b, 0x0000024c, 0x000700f5, 0x00000008, 0x00000400, 0x00000018, 0x00000234,
+ 0x000002a1, 0x0000024c, 0x000500b1, 0x00000029, 0x0000024f, 0x00000400, 0x00000025, 0x000400f6,
+ 0x0000024b, 0x0000024c, 0x00000000, 0x000400fa, 0x0000024f, 0x0000024a, 0x0000024b, 0x000200f8,
+ 0x0000024a, 0x00050084, 0x00000008, 0x00000253, 0x000000eb, 0x000000c7, 0x000500c7, 0x00000008,
+ 0x00000255, 0x00000400, 0x000000d7, 0x00050080, 0x00000008, 0x00000256, 0x00000253, 0x00000255,
+ 0x00050084, 0x00000008, 0x0000025a, 0x000000eb, 0x000000ca, 0x000500c3, 0x00000008, 0x0000025c,
+ 0x00000400, 0x000000d7, 0x000500c7, 0x00000008, 0x0000025d, 0x0000025c, 0x000000d7, 0x00050080,
+ 0x00000008, 0x0000025e, 0x0000025a, 0x0000025d, 0x00050084, 0x00000008, 0x00000262, 0x000000eb,
+ 0x000000cd, 0x000500c3, 0x00000008, 0x00000264, 0x00000400, 0x000000eb, 0x000500c7, 0x00000008,
+ 0x00000265, 0x00000264, 0x000000d7, 0x00050080, 0x00000008, 0x00000266, 0x00000262, 0x00000265,
+ 0x000500af, 0x00000029, 0x00000269, 0x00000256, 0x0000023e, 0x000500af, 0x00000029, 0x0000026c,
+ 0x0000025e, 0x00000242, 0x000500a6, 0x00000029, 0x0000026d, 0x00000269, 0x0000026c, 0x000500af,
+ 0x00000029, 0x00000270, 0x00000266, 0x00000246, 0x000500a6, 0x00000029, 0x00000271, 0x0000026d,
+ 0x00000270, 0x000300f7, 0x00000273, 0x00000000, 0x000400fa, 0x00000271, 0x00000272, 0x00000273,
+ 0x000200f8, 0x00000272, 0x000200f9, 0x0000024c, 0x000200f8, 0x00000273, 0x00050084, 0x00000008,
+ 0x0000027b, 0x00000242, 0x00000266, 0x00050080, 0x00000008, 0x0000027c, 0x0000025e, 0x0000027b,
+ 0x00050084, 0x00000008, 0x0000027d, 0x0000023e, 0x0000027c, 0x00050080, 0x00000008, 0x0000027e,
+ 0x00000256, 0x0000027d, 0x0004007c, 0x00000006, 0x0000027f, 0x0000027e, 0x00060041, 0x000000d8,
+ 0x00000280, 0x000000a7, 0x000000d7, 0x00000047, 0x0004003d, 0x00000006, 0x00000281, 0x00000280,
+ 0x00050080, 0x00000006, 0x00000283, 0x00000281, 0x0000027f, 0x00060041, 0x0000001c, 0x00000284,
+ 0x00000017, 0x00000018, 0x00000283, 0x0004003d, 0x00000006, 0x00000285, 0x00000284, 0x000500c7,
+ 0x00000006, 0x00000286, 0x00000285, 0x00000021, 0x000500ab, 0x00000029, 0x00000287, 0x00000286,
+ 0x00000028, 0x000300f7, 0x00000289, 0x00000000, 0x000400fa, 0x00000287, 0x00000288, 0x00000289,
+ 0x000200f8, 0x00000288, 0x00060041, 0x000000d8, 0x0000028a, 0x000000a7, 0x000000eb, 0x000000a8,
+ 0x0004003d, 0x00000006, 0x0000028b, 0x0000028a, 0x00050080, 0x00000006, 0x0000028d, 0x0000028b,
+ 0x0000027f, 0x00060041, 0x00000042, 0x0000028e, 0x0000003e, 0x00000018, 0x0000028d, 0x0004003d,
+ 0x0000000a, 0x0000028f, 0x0000028e, 0x00060041, 0x000000d8, 0x00000291, 0x000000a7, 0x000000d7,
+ 0x00000028, 0x0004003d, 0x00000006, 0x00000292, 0x00000291, 0x000300f7, 0x000003ef, 0x00000000,
+ 0x000300fb, 0x00000028, 0x00000380, 0x000200f8, 0x00000380, 0x0004003d, 0x00000006, 0x00000385,
+ 0x00000284, 0x000500c7, 0x00000006, 0x00000387, 0x00000385, 0x00000021, 0x000500c2, 0x00000006,
+ 0x00000389, 0x00000385, 0x00000025, 0x000500aa, 0x00000029, 0x0000038b, 0x00000387, 0x00000028,
+ 0x000300f7, 0x0000038d, 0x00000000, 0x000400fa, 0x0000038b, 0x0000038c, 0x0000038d, 0x000200f8,
+ 0x0000038c, 0x000200f9, 0x000003ef, 0x000200f8, 0x0000038d, 0x00050084, 0x00000008, 0x00000392,
+ 0x0000023e, 0x00000242, 0x0004007c, 0x00000006, 0x00000393, 0x00000392, 0x00040070, 0x0000000a,
+ 0x00000395, 0x00000387, 0x00050080, 0x00000006, 0x00000398, 0x00000292, 0x0000027f, 0x00060041,
+ 0x00000042, 0x00000399, 0x0000003e, 0x00000018, 0x00000398, 0x0004003d, 0x0000000a, 0x0000039a,
+ 0x00000399, 0x00050085, 0x0000000a, 0x0000039b, 0x00000395, 0x0000039a, 0x000500c7, 0x00000006,
+ 0x0000039d, 0x00000389, 0x00000047, 0x000500ab, 0x00000029, 0x0000039e, 0x0000039d, 0x00000028,
+ 0x000300f7, 0x000003a8, 0x00000000, 0x000400fa, 0x0000039e, 0x0000039f, 0x000003a8, 0x000200f8,
+ 0x0000039f, 0x00050082, 0x00000006, 0x000003a3, 0x00000398, 0x00000047, 0x00060041, 0x00000042,
+ 0x000003a4, 0x0000003e, 0x00000018, 0x000003a3, 0x0004003d, 0x0000000a, 0x000003a5, 0x000003a4,
+ 0x00050083, 0x0000000a, 0x000003a7, 0x0000039b, 0x000003a5, 0x000200f9, 0x000003a8, 0x000200f8,
+ 0x000003a8, 0x000700f5, 0x0000000a, 0x00000402, 0x0000039b, 0x0000038d, 0x000003a7, 0x0000039f,
+ 0x000500c7, 0x00000006, 0x000003aa, 0x00000389, 0x00000055, 0x000500ab, 0x00000029, 0x000003ab,
+ 0x000003aa, 0x00000028, 0x000300f7, 0x000003b5, 0x00000000, 0x000400fa, 0x000003ab, 0x000003ac,
+ 0x000003b5, 0x000200f8, 0x000003ac, 0x00050080, 0x00000006, 0x000003b0, 0x00000398, 0x00000047,
+ 0x00060041, 0x00000042, 0x000003b1, 0x0000003e, 0x00000018, 0x000003b0, 0x0004003d, 0x0000000a,
+ 0x000003b2, 0x000003b1, 0x00050083, 0x0000000a, 0x000003b4, 0x00000402, 0x000003b2, 0x000200f9,
+ 0x000003b5, 0x000200f8, 0x000003b5, 0x000700f5, 0x0000000a, 0x00000403, 0x00000402, 0x000003a8,
+ 0x000003b4, 0x000003ac, 0x000500c7, 0x00000006, 0x000003b7, 0x00000389, 0x00000063, 0x000500ab,
+ 0x00000029, 0x000003b8, 0x000003b7, 0x00000028, 0x000300f7, 0x000003c3, 0x00000000, 0x000400fa,
+ 0x000003b8, 0x000003b9, 0x000003c3, 0x000200f8, 0x000003b9, 0x00050082, 0x00000006, 0x000003be,
+ 0x00000398, 0x0000023d, 0x00060041, 0x00000042, 0x000003bf, 0x0000003e, 0x00000018, 0x000003be,
+ 0x0004003d, 0x0000000a, 0x000003c0, 0x000003bf, 0x00050083, 0x0000000a, 0x000003c2, 0x00000403,
+ 0x000003c0, 0x000200f9, 0x000003c3, 0x000200f8, 0x000003c3, 0x000700f5, 0x0000000a, 0x00000404,
+ 0x00000403, 0x000003b5, 0x000003c2, 0x000003b9, 0x000500c7, 0x00000006, 0x000003c5, 0x00000389,
+ 0x00000072, 0x000500ab, 0x00000029, 0x000003c6, 0x000003c5, 0x00000028, 0x000300f7, 0x000003d1,
+ 0x00000000, 0x000400fa, 0x000003c6, 0x000003c7, 0x000003d1, 0x000200f8, 0x000003c7, 0x00050080,
+ 0x00000006, 0x000003cc, 0x00000398, 0x0000023d, 0x00060041, 0x00000042, 0x000003cd, 0x0000003e,
+ 0x00000018, 0x000003cc, 0x0004003d, 0x0000000a, 0x000003ce, 0x000003cd, 0x00050083, 0x0000000a,
+ 0x000003d0, 0x00000404, 0x000003ce, 0x000200f9, 0x000003d1, 0x000200f8, 0x000003d1, 0x000700f5,
+ 0x0000000a, 0x00000405, 0x00000404, 0x000003c3, 0x000003d0, 0x000003c7, 0x000500c7, 0x00000006,
+ 0x000003d3, 0x00000389, 0x00000081, 0x000500ab, 0x00000029, 0x000003d4, 0x000003d3, 0x00000028,
+ 0x000300f7, 0x000003df, 0x00000000, 0x000400fa, 0x000003d4, 0x000003d5, 0x000003df, 0x000200f8,
+ 0x000003d5, 0x00050082, 0x00000006, 0x000003da, 0x00000398, 0x00000393, 0x00060041, 0x00000042,
+ 0x000003db, 0x0000003e, 0x00000018, 0x000003da, 0x0004003d, 0x0000000a, 0x000003dc, 0x000003db,
+ 0x00050083, 0x0000000a, 0x000003de, 0x00000405, 0x000003dc, 0x000200f9, 0x000003df, 0x000200f8,
+ 0x000003df, 0x000700f5, 0x0000000a, 0x00000406, 0x00000405, 0x000003d1, 0x000003de, 0x000003d5,
+ 0x000500c7, 0x00000006, 0x000003e1, 0x00000389, 0x00000090, 0x000500ab, 0x00000029, 0x000003e2,
+ 0x000003e1, 0x00000028, 0x000300f7, 0x000003ed, 0x00000000, 0x000400fa, 0x000003e2, 0x000003e3,
+ 0x000003ed, 0x000200f8, 0x000003e3, 0x00050080, 0x00000006, 0x000003e8, 0x00000398, 0x00000393,
+ 0x00060041, 0x00000042, 0x000003e9, 0x0000003e, 0x00000018, 0x000003e8, 0x0004003d, 0x0000000a,
+ 0x000003ea, 0x000003e9, 0x00050083, 0x0000000a, 0x000003ec, 0x00000406, 0x000003ea, 0x000200f9,
+ 0x000003ed, 0x000200f8, 0x000003ed, 0x000700f5, 0x0000000a, 0x00000407, 0x00000406, 0x000003df,
+ 0x000003ec, 0x000003e3, 0x000200f9, 0x000003ef, 0x000200f8, 0x000003ef, 0x000700f5, 0x0000000a,
+ 0x00000408, 0x0000002d, 0x0000038c, 0x00000407, 0x000003ed, 0x00050083, 0x0000000a, 0x0000029d,
+ 0x0000028f, 0x00000408, 0x00050081, 0x0000000a, 0x0000029f, 0x00000401, 0x0000029d, 0x000200f9,
+ 0x00000289, 0x000200f8, 0x00000289, 0x000700f5, 0x0000000a, 0x0000042c, 0x00000401, 0x00000273,
+ 0x0000029f, 0x000003ef, 0x000200f9, 0x0000024c, 0x000200f8, 0x0000024c, 0x000700f5, 0x0000000a,
+ 0x0000042b, 0x00000401, 0x00000272, 0x0000042c, 0x00000289, 0x00050080, 0x00000008, 0x000002a1,
+ 0x00000400, 0x000000d7, 0x000200f9, 0x00000249, 0x000200f8, 0x0000024b, 0x00060041, 0x000000d8,
+ 0x000002a2, 0x000000a7, 0x000000d7, 0x00000055, 0x0004003d, 0x00000006, 0x000002a3, 0x000002a2,
+ 0x00050080, 0x00000006, 0x000002a5, 0x000002a3, 0x000000d2, 0x00050085, 0x0000000a, 0x000002a7,
+ 0x00000221, 0x00000401, 0x00060041, 0x00000042, 0x000002a8, 0x0000003e, 0x00000018, 0x000002a5,
+ 0x0003003e, 0x000002a8, 0x000002a7, 0x000200f9, 0x0000022a, 0x000200f8, 0x000002a9, 0x000500aa,
+ 0x00000029, 0x000002ac, 0x000000ab, 0x000002ab, 0x000300f7, 0x000002ae, 0x00000000, 0x000400fa,
+ 0x000002ac, 0x000002ad, 0x000002ae, 0x000200f8, 0x000002ad, 0x00060041, 0x000000d8, 0x000002af,
+ 0x000000a7, 0x000000d7, 0x000000a8, 0x0004003d, 0x00000006, 0x000002b0, 0x000002af, 0x00050080,
+ 0x00000006, 0x000002b2, 0x000002b0, 0x000000d2, 0x00060041, 0x0000001c, 0x000002b3, 0x00000017,
+ 0x00000018, 0x000002b2, 0x0004003d, 0x00000006, 0x000002b4, 0x000002b3, 0x000500c7, 0x00000006,
+ 0x000002b5, 0x000002b4, 0x00000021, 0x000500aa, 0x00000029, 0x000002b6, 0x000002b5, 0x00000028,
+ 0x000300f7, 0x000002b8, 0x00000000, 0x000400fa, 0x000002b6, 0x000002b7, 0x000002b8, 0x000200f8,
+ 0x000002b7, 0x000200f9, 0x000002f0, 0x000200f8, 0x000002b8, 0x00060041, 0x000000d8, 0x000002bb,
+ 0x000000a7, 0x000000eb, 0x00000047, 0x0004003d, 0x00000006, 0x000002bc, 0x000002bb, 0x0004007c,
+ 0x00000008, 0x000002bd, 0x000002bc, 0x00060041, 0x000000d8, 0x000002bf, 0x000000a7, 0x000000eb,
+ 0x00000055, 0x0004003d, 0x00000006, 0x000002c0, 0x000002bf, 0x0004007c, 0x00000008, 0x000002c1,
+ 0x000002c0, 0x00060041, 0x000000d8, 0x000002c2, 0x000000a7, 0x000000d7, 0x00000028, 0x0004003d,
+ 0x00000006, 0x000002c3, 0x000002c2, 0x00050080, 0x00000006, 0x000002c5, 0x000002c3, 0x000000d2,
+ 0x00060041, 0x000000d8, 0x000002c6, 0x000000a7, 0x000000eb, 0x00000028, 0x0004003d, 0x00000006,
+ 0x000002c7, 0x000002c6, 0x000500c3, 0x00000008, 0x000002ca, 0x000000c7, 0x000000d7, 0x000500c3,
+ 0x00000008, 0x000002ce, 0x000000ca, 0x000000d7, 0x000500c3, 0x00000008, 0x000002d2, 0x000000cd,
+ 0x000000d7, 0x00050084, 0x00000008, 0x000002d3, 0x000002c1, 0x000002d2, 0x00050080, 0x00000008,
+ 0x000002d4, 0x000002ce, 0x000002d3, 0x00050084, 0x00000008, 0x000002d5, 0x000002bd, 0x000002d4,
+ 0x00050080, 0x00000008, 0x000002d6, 0x000002ca, 0x000002d5, 0x0004007c, 0x00000006, 0x000002d7,
+ 0x000002d6, 0x00050080, 0x00000006, 0x000002d8, 0x000002c7, 0x000002d7, 0x00060041, 0x00000042,
+ 0x000002d9, 0x0000003e, 0x00000018, 0x000002d8, 0x0004003d, 0x0000000a, 0x000002da, 0x000002d9,
+ 0x00060041, 0x00000042, 0x000002db, 0x0000003e, 0x00000018, 0x000002c5, 0x0004003d, 0x0000000a,
+ 0x000002dc, 0x000002db, 0x00050081, 0x0000000a, 0x000002dd, 0x000002dc, 0x000002da, 0x0003003e,
+ 0x000002db, 0x000002dd, 0x000200f9, 0x000002ae, 0x000200f8, 0x000002ae, 0x000200f9, 0x0000022a,
+ 0x000200f8, 0x0000022a, 0x000200f9, 0x000001b3, 0x000200f8, 0x000001b3, 0x000200f9, 0x00000185,
+ 0x000200f8, 0x00000185, 0x000200f9, 0x000000e2, 0x000200f8, 0x000000e2, 0x000200f9, 0x000000d6,
+ 0x000200f8, 0x000000d6, 0x000200f9, 0x000002f0, 0x000200f8, 0x000002f0, 0x000100fd, 0x00010038,
+};
+static const uint32_t spv_project[] = {
+ 0x07230203, 0x00010300, 0x000d000b, 0x000005f6, 0x00000000, 0x00020011, 0x00000001, 0x0006000b,
+ 0x00000001, 0x4c534c47, 0x6474732e, 0x3035342e, 0x00000000, 0x0003000e, 0x00000000, 0x00000001,
+ 0x0006000f, 0x00000005, 0x00000004, 0x6e69616d, 0x00000000, 0x000000b3, 0x00060010, 0x00000004,
+ 0x00000011, 0x00000008, 0x00000008, 0x00000004, 0x00030047, 0x0000002e, 0x00000002, 0x00050048,
+ 0x0000002e, 0x00000000, 0x00000023, 0x00000000, 0x00050048, 0x0000002e, 0x00000001, 0x00000023,
+ 0x00000010, 0x00050048, 0x0000002e, 0x00000002, 0x00000023, 0x00000020, 0x00050048, 0x0000002e,
+ 0x00000003, 0x00000023, 0x00000030, 0x00050048, 0x0000002e, 0x00000004, 0x00000023, 0x00000040,
+ 0x00050048, 0x0000002e, 0x00000005, 0x00000023, 0x00000050, 0x00050048, 0x0000002e, 0x00000006,
+ 0x00000023, 0x00000060, 0x00040047, 0x00000097, 0x00000006, 0x00000004, 0x00030047, 0x00000098,
+ 0x00000002, 0x00050048, 0x00000098, 0x00000000, 0x00000023, 0x00000000, 0x00040047, 0x0000009a,
+ 0x00000021, 0x00000002, 0x00040047, 0x0000009a, 0x00000022, 0x00000000, 0x00040047, 0x000000b3,
+ 0x0000000b, 0x0000001c, 0x00040047, 0x000000e6, 0x00000006, 0x00000004, 0x00030047, 0x000000e7,
+ 0x00000002, 0x00050048, 0x000000e7, 0x00000000, 0x00000023, 0x00000000, 0x00040047, 0x000000e9,
+ 0x00000021, 0x00000000, 0x00040047, 0x000000e9, 0x00000022, 0x00000000, 0x00040047, 0x000002fb,
+ 0x0000000b, 0x00000019, 0x00020013, 0x00000002, 0x00030021, 0x00000003, 0x00000002, 0x00040015,
+ 0x00000006, 0x00000020, 0x00000001, 0x00040015, 0x00000008, 0x00000020, 0x00000000, 0x00020014,
+ 0x0000001f, 0x00040017, 0x0000002a, 0x00000006, 0x00000004, 0x00040017, 0x0000002b, 0x00000008,
+ 0x00000004, 0x00030016, 0x0000002c, 0x00000020, 0x00040017, 0x0000002d, 0x0000002c, 0x00000004,
+ 0x0009001e, 0x0000002e, 0x0000002a, 0x0000002b, 0x0000002b, 0x0000002b, 0x0000002d, 0x0000002d,
+ 0x0000002d, 0x00040020, 0x0000002f, 0x00000009, 0x0000002e, 0x0004003b, 0x0000002f, 0x00000030,
+ 0x00000009, 0x0004002b, 0x00000006, 0x00000031, 0x00000000, 0x0004002b, 0x00000008, 0x00000032,
+ 0x00000000, 0x00040020, 0x00000033, 0x00000009, 0x00000006, 0x0004002b, 0x00000008, 0x00000037,
+ 0x00000001, 0x0004002b, 0x00000006, 0x00000045, 0x00000001, 0x0004002b, 0x00000008, 0x00000088,
+ 0x00000002, 0x0003002a, 0x0000001f, 0x0000008f, 0x0003001d, 0x00000097, 0x00000008, 0x0003001e,
+ 0x00000098, 0x00000097, 0x00040020, 0x00000099, 0x0000000c, 0x00000098, 0x0004003b, 0x00000099,
+ 0x0000009a, 0x0000000c, 0x00040020, 0x000000a4, 0x0000000c, 0x00000008, 0x0004002b, 0x00000008,
+ 0x000000ab, 0x00000003, 0x00040017, 0x000000ae, 0x00000006, 0x00000003, 0x00040017, 0x000000b1,
+ 0x00000008, 0x00000003, 0x00040020, 0x000000b2, 0x00000001, 0x000000b1, 0x0004003b, 0x000000b2,
+ 0x000000b3, 0x00000001, 0x00040020, 0x000000c4, 0x00000009, 0x0000002a, 0x00040017, 0x000000c8,
+ 0x0000001f, 0x00000003, 0x0004002b, 0x00000006, 0x000000d9, 0x00000003, 0x00040020, 0x000000da,
+ 0x00000009, 0x00000008, 0x0004002b, 0x00000008, 0x000000e1, 0x000000ff, 0x0003001d, 0x000000e6,
+ 0x0000002c, 0x0003001e, 0x000000e7, 0x000000e6, 0x00040020, 0x000000e8, 0x0000000c, 0x000000e7,
+ 0x0004003b, 0x000000e8, 0x000000e9, 0x0000000c, 0x0004002b, 0x0000002c, 0x000000ee, 0x00000000,
+ 0x00040020, 0x000000ef, 0x0000000c, 0x0000002c, 0x0004002b, 0x00000006, 0x00000157, 0x00000004,
+ 0x00040020, 0x00000158, 0x00000009, 0x0000002c, 0x0004002b, 0x00000006, 0x00000160, 0x00000002,
+ 0x0004002b, 0x00000008, 0x000002f9, 0x00000008, 0x0004002b, 0x00000008, 0x000002fa, 0x00000004,
+ 0x0006002c, 0x000000b1, 0x000002fb, 0x000002f9, 0x000002f9, 0x000002fa, 0x00050036, 0x00000002,
+ 0x00000004, 0x00000000, 0x00000003, 0x000200f8, 0x00000005, 0x000300f7, 0x0000030c, 0x00000000,
+ 0x000300fb, 0x00000032, 0x0000030d, 0x000200f8, 0x0000030d, 0x00060041, 0x00000033, 0x000000ac,
+ 0x00000030, 0x00000031, 0x000000ab, 0x0004003d, 0x00000006, 0x000000ad, 0x000000ac, 0x0004003d,
+ 0x000000b1, 0x000000b4, 0x000000b3, 0x0004007c, 0x000000ae, 0x000000b5, 0x000000b4, 0x00060041,
+ 0x00000033, 0x000000b7, 0x00000030, 0x00000031, 0x00000032, 0x0004003d, 0x00000006, 0x000000b8,
+ 0x000000b7, 0x00060041, 0x00000033, 0x000000ba, 0x00000030, 0x00000031, 0x00000037, 0x0004003d,
+ 0x00000006, 0x000000bb, 0x000000ba, 0x00060041, 0x00000033, 0x000000bd, 0x00000030, 0x00000031,
+ 0x00000088, 0x0004003d, 0x00000006, 0x000000be, 0x000000bd, 0x000500aa, 0x0000001f, 0x000000c0,
+ 0x000000ad, 0x00000031, 0x000300f7, 0x000000c2, 0x00000000, 0x000400fa, 0x000000c0, 0x000000c1,
+ 0x0000016e, 0x000200f8, 0x000000c1, 0x00050041, 0x000000c4, 0x000000c5, 0x00000030, 0x00000031,
+ 0x0004003d, 0x0000002a, 0x000000c6, 0x000000c5, 0x0008004f, 0x000000ae, 0x000000c7, 0x000000c6,
+ 0x000000c6, 0x00000000, 0x00000001, 0x00000002, 0x000500af, 0x000000c8, 0x000000c9, 0x000000b5,
+ 0x000000c7, 0x0004009a, 0x0000001f, 0x000000ca, 0x000000c9, 0x000300f7, 0x000000cc, 0x00000000,
+ 0x000400fa, 0x000000ca, 0x000000cb, 0x000000cc, 0x000200f8, 0x000000cb, 0x000200f9, 0x0000030c,
+ 0x000200f8, 0x000000cc, 0x00050051, 0x00000006, 0x000000d1, 0x000000b5, 0x00000000, 0x00050051,
+ 0x00000006, 0x000000d4, 0x000000b5, 0x00000001, 0x00050051, 0x00000006, 0x000000d7, 0x000000b5,
+ 0x00000002, 0x00050084, 0x00000006, 0x0000031e, 0x000000bb, 0x000000d7, 0x00050080, 0x00000006,
+ 0x0000031f, 0x000000d4, 0x0000031e, 0x00050084, 0x00000006, 0x00000320, 0x000000b8, 0x0000031f,
+ 0x00050080, 0x00000006, 0x00000321, 0x000000d1, 0x00000320, 0x0004007c, 0x00000008, 0x00000322,
+ 0x00000321, 0x00060041, 0x000000da, 0x000000db, 0x00000030, 0x000000d9, 0x00000032, 0x0004003d,
+ 0x00000008, 0x000000dc, 0x000000db, 0x00050080, 0x00000008, 0x000000de, 0x000000dc, 0x00000322,
+ 0x00060041, 0x000000a4, 0x000000df, 0x0000009a, 0x00000031, 0x000000de, 0x0004003d, 0x00000008,
+ 0x000000e0, 0x000000df, 0x000500c7, 0x00000008, 0x000000e2, 0x000000e0, 0x000000e1, 0x000500aa,
+ 0x0000001f, 0x000000e3, 0x000000e2, 0x00000032, 0x000300f7, 0x000000e5, 0x00000000, 0x000400fa,
+ 0x000000e3, 0x000000e4, 0x000000e5, 0x000200f8, 0x000000e4, 0x00060041, 0x000000da, 0x000000ea,
+ 0x00000030, 0x00000045, 0x000000ab, 0x0004003d, 0x00000008, 0x000000eb, 0x000000ea, 0x00050080,
+ 0x00000008, 0x000000ed, 0x000000eb, 0x00000322, 0x00060041, 0x000000ef, 0x000000f0, 0x000000e9,
+ 0x00000031, 0x000000ed, 0x0003003e, 0x000000f0, 0x000000ee, 0x000200f9, 0x0000030c, 0x000200f8,
+ 0x000000e5, 0x00060041, 0x000000da, 0x000000f4, 0x00000030, 0x00000045, 0x00000032, 0x0004003d,
+ 0x00000008, 0x000000f5, 0x000000f4, 0x00050080, 0x00000006, 0x000000f8, 0x000000d1, 0x00000045,
+ 0x00050080, 0x00000006, 0x00000328, 0x000000b8, 0x00000045, 0x00050084, 0x00000006, 0x0000032f,
+ 0x00000328, 0x0000031f, 0x00050080, 0x00000006, 0x00000330, 0x000000f8, 0x0000032f, 0x0004007c,
+ 0x00000008, 0x00000331, 0x00000330, 0x00050080, 0x00000008, 0x00000101, 0x000000f5, 0x00000331,
+ 0x00060041, 0x000000ef, 0x00000102, 0x000000e9, 0x00000031, 0x00000101, 0x0004003d, 0x0000002c,
+ 0x00000103, 0x00000102, 0x00050080, 0x00000006, 0x0000033f, 0x000000d1, 0x0000032f, 0x0004007c,
+ 0x00000008, 0x00000340, 0x0000033f, 0x00050080, 0x00000008, 0x00000110, 0x000000f5, 0x00000340,
+ 0x00060041, 0x000000ef, 0x00000111, 0x000000e9, 0x00000031, 0x00000110, 0x0004003d, 0x0000002c,
+ 0x00000112, 0x00000111, 0x00050083, 0x0000002c, 0x00000113, 0x00000103, 0x00000112, 0x00060041,
+ 0x000000da, 0x00000114, 0x00000030, 0x00000045, 0x00000037, 0x0004003d, 0x00000008, 0x00000115,
+ 0x00000114, 0x00050080, 0x00000006, 0x00000118, 0x000000d4, 0x00000045, 0x00050080, 0x00000006,
+ 0x00000349, 0x000000bb, 0x00000045, 0x00050084, 0x00000006, 0x0000034b, 0x00000349, 0x000000d7,
+ 0x00050080, 0x00000006, 0x0000034c, 0x00000118, 0x0000034b, 0x00050084, 0x00000006, 0x0000034d,
+ 0x000000b8, 0x0000034c, 0x00050080, 0x00000006, 0x0000034e, 0x000000d1, 0x0000034d, 0x0004007c,
+ 0x00000008, 0x0000034f, 0x0000034e, 0x00050080, 0x00000008, 0x00000121, 0x00000115, 0x0000034f,
+ 0x00060041, 0x000000ef, 0x00000122, 0x000000e9, 0x00000031, 0x00000121, 0x0004003d, 0x0000002c,
+ 0x00000123, 0x00000122, 0x00050081, 0x0000002c, 0x00000124, 0x00000113, 0x00000123, 0x00050080,
+ 0x00000006, 0x0000035b, 0x000000d4, 0x0000034b, 0x00050084, 0x00000006, 0x0000035c, 0x000000b8,
+ 0x0000035b, 0x00050080, 0x00000006, 0x0000035d, 0x000000d1, 0x0000035c, 0x0004007c, 0x00000008,
+ 0x0000035e, 0x0000035d, 0x00050080, 0x00000008, 0x00000131, 0x00000115, 0x0000035e, 0x00060041,
+ 0x000000ef, 0x00000132, 0x000000e9, 0x00000031, 0x00000131, 0x0004003d, 0x0000002c, 0x00000133,
+ 0x00000132, 0x00050083, 0x0000002c, 0x00000134, 0x00000124, 0x00000133, 0x00060041, 0x000000da,
+ 0x00000135, 0x00000030, 0x00000045, 0x00000088, 0x0004003d, 0x00000008, 0x00000136, 0x00000135,
+ 0x00050080, 0x00000006, 0x00000139, 0x000000d7, 0x00000045, 0x00050084, 0x00000006, 0x00000368,
+ 0x000000bb, 0x00000139, 0x00050080, 0x00000006, 0x00000369, 0x000000d4, 0x00000368, 0x00050084,
+ 0x00000006, 0x0000036a, 0x000000b8, 0x00000369, 0x00050080, 0x00000006, 0x0000036b, 0x000000d1,
+ 0x0000036a, 0x0004007c, 0x00000008, 0x0000036c, 0x0000036b, 0x00050080, 0x00000008, 0x00000142,
+ 0x00000136, 0x0000036c, 0x00060041, 0x000000ef, 0x00000143, 0x000000e9, 0x00000031, 0x00000142,
+ 0x0004003d, 0x0000002c, 0x00000144, 0x00000143, 0x00050081, 0x0000002c, 0x00000145, 0x00000134,
+ 0x00000144, 0x00050080, 0x00000008, 0x00000152, 0x00000136, 0x00000322, 0x00060041, 0x000000ef,
+ 0x00000153, 0x000000e9, 0x00000031, 0x00000152, 0x0004003d, 0x0000002c, 0x00000154, 0x00000153,
+ 0x00050083, 0x0000002c, 0x00000155, 0x00000145, 0x00000154, 0x00060041, 0x00000158, 0x00000159,
+ 0x00000030, 0x00000157, 0x00000032, 0x0004003d, 0x0000002c, 0x0000015a, 0x00000159, 0x00060041,
+ 0x000000da, 0x0000015b, 0x00000030, 0x00000045, 0x000000ab, 0x0004003d, 0x00000008, 0x0000015c,
+ 0x0000015b, 0x00050080, 0x00000008, 0x0000015e, 0x0000015c, 0x00000322, 0x00060041, 0x000000da,
+ 0x00000161, 0x00000030, 0x00000160, 0x00000032, 0x0004003d, 0x00000008, 0x00000162, 0x00000161,
+ 0x00050080, 0x00000008, 0x00000164, 0x00000162, 0x00000322, 0x00060041, 0x000000ef, 0x00000165,
+ 0x000000e9, 0x00000031, 0x00000164, 0x0004003d, 0x0000002c, 0x00000166, 0x00000165, 0x00050085,
+ 0x0000002c, 0x00000168, 0x00000166, 0x0000015a, 0x00050083, 0x0000002c, 0x00000169, 0x00000155,
+ 0x00000168, 0x0004007f, 0x0000002c, 0x0000016a, 0x00000169, 0x00050085, 0x0000002c, 0x0000016c,
+ 0x0000016a, 0x0000015a, 0x00060041, 0x000000ef, 0x0000016d, 0x000000e9, 0x00000031, 0x0000015e,
+ 0x0003003e, 0x0000016d, 0x0000016c, 0x000200f9, 0x000000c2, 0x000200f8, 0x0000016e, 0x00060041,
+ 0x000000da, 0x00000170, 0x00000030, 0x000000d9, 0x00000032, 0x0004003d, 0x00000008, 0x00000171,
+ 0x00000170, 0x00060041, 0x000000da, 0x00000173, 0x00000030, 0x000000d9, 0x00000037, 0x0004003d,
+ 0x00000008, 0x00000174, 0x00000173, 0x000500ab, 0x0000001f, 0x00000175, 0x00000174, 0x00000032,
+ 0x00060041, 0x000000da, 0x00000177, 0x00000030, 0x00000045, 0x000000ab, 0x0004003d, 0x00000008,
+ 0x00000178, 0x00000177, 0x00060041, 0x00000158, 0x0000017a, 0x00000030, 0x00000157, 0x00000032,
+ 0x0004003d, 0x0000002c, 0x0000017b, 0x0000017a, 0x00050051, 0x00000006, 0x0000017d, 0x000000b5,
+ 0x00000000, 0x000500b3, 0x0000001f, 0x0000017f, 0x0000017d, 0x000000b8, 0x000300f7, 0x00000181,
+ 0x00000000, 0x000400fa, 0x0000017f, 0x00000180, 0x00000181, 0x000200f8, 0x00000180, 0x00050051,
+ 0x00000006, 0x00000183, 0x000000b5, 0x00000001, 0x000500b1, 0x0000001f, 0x00000185, 0x00000183,
+ 0x000000bb, 0x000200f9, 0x00000181, 0x000200f8, 0x00000181, 0x000700f5, 0x0000001f, 0x00000186,
+ 0x0000017f, 0x0000016e, 0x00000185, 0x00000180, 0x000300f7, 0x00000188, 0x00000000, 0x000400fa,
+ 0x00000186, 0x00000187, 0x00000188, 0x000200f8, 0x00000187, 0x00050051, 0x00000006, 0x0000018a,
+ 0x000000b5, 0x00000002, 0x000500b1, 0x0000001f, 0x0000018c, 0x0000018a, 0x000000be, 0x000200f9,
+ 0x00000188, 0x000200f8, 0x00000188, 0x000700f5, 0x0000001f, 0x0000018d, 0x00000186, 0x00000181,
+ 0x0000018c, 0x00000187, 0x000300f7, 0x0000018f, 0x00000000, 0x000400fa, 0x0000018d, 0x0000018e,
+ 0x0000018f, 0x000200f8, 0x0000018e, 0x00050082, 0x00000006, 0x00000192, 0x0000017d, 0x00000045,
+ 0x00050051, 0x00000006, 0x00000196, 0x000000b5, 0x00000001, 0x00050051, 0x00000006, 0x00000199,
+ 0x000000b5, 0x00000002, 0x000300f7, 0x000003b0, 0x00000000, 0x000300fb, 0x00000032, 0x00000382,
+ 0x000200f8, 0x00000382, 0x000500b1, 0x0000001f, 0x00000384, 0x00000192, 0x00000031, 0x000500b1,
+ 0x0000001f, 0x00000386, 0x00000196, 0x00000031, 0x000500a6, 0x0000001f, 0x00000387, 0x00000384,
+ 0x00000386, 0x000400a8, 0x0000001f, 0x00000388, 0x00000387, 0x000300f7, 0x0000038e, 0x00000000,
+ 0x000400fa, 0x00000388, 0x00000389, 0x0000038e, 0x000200f8, 0x00000389, 0x000500af, 0x0000001f,
+ 0x0000038d, 0x00000192, 0x000000b8, 0x000200f9, 0x0000038e, 0x000200f8, 0x0000038e, 0x000700f5,
+ 0x0000001f, 0x0000038f, 0x00000387, 0x00000382, 0x0000038d, 0x00000389, 0x000400a8, 0x0000001f,
+ 0x00000390, 0x0000038f, 0x000300f7, 0x00000396, 0x00000000, 0x000400fa, 0x00000390, 0x00000391,
+ 0x00000396, 0x000200f8, 0x00000391, 0x000500af, 0x0000001f, 0x00000395, 0x00000196, 0x000000bb,
+ 0x000200f9, 0x00000396, 0x000200f8, 0x00000396, 0x000700f5, 0x0000001f, 0x00000397, 0x0000038f,
+ 0x0000038e, 0x00000395, 0x00000391, 0x000400a8, 0x0000001f, 0x00000398, 0x00000397, 0x000300f7,
+ 0x0000039e, 0x00000000, 0x000400fa, 0x00000398, 0x00000399, 0x0000039e, 0x000200f8, 0x00000399,
+ 0x000500af, 0x0000001f, 0x0000039d, 0x00000199, 0x000000be, 0x000200f9, 0x0000039e, 0x000200f8,
+ 0x0000039e, 0x000700f5, 0x0000001f, 0x0000039f, 0x00000397, 0x00000396, 0x0000039d, 0x00000399,
+ 0x000300f7, 0x000003a1, 0x00000000, 0x000400fa, 0x0000039f, 0x000003a0, 0x000003a1, 0x000200f8,
+ 0x000003a0, 0x000200f9, 0x000003b0, 0x000200f8, 0x000003a1, 0x000500b1, 0x0000001f, 0x000003a3,
+ 0x00000199, 0x00000031, 0x000300f7, 0x000003a6, 0x00000000, 0x000400fa, 0x000003a3, 0x000003a4,
+ 0x000003a6, 0x000200f8, 0x000003a4, 0x000200f9, 0x000003b0, 0x000200f8, 0x000003a6, 0x00050084,
+ 0x00000006, 0x000003bb, 0x000000bb, 0x00000199, 0x00050080, 0x00000006, 0x000003bc, 0x00000196,
+ 0x000003bb, 0x00050084, 0x00000006, 0x000003bd, 0x000000b8, 0x000003bc, 0x00050080, 0x00000006,
+ 0x000003be, 0x00000192, 0x000003bd, 0x0004007c, 0x00000008, 0x000003bf, 0x000003be, 0x00050080,
+ 0x00000008, 0x000003ac, 0x00000171, 0x000003bf, 0x00060041, 0x000000a4, 0x000003ad, 0x0000009a,
+ 0x00000031, 0x000003ac, 0x0004003d, 0x00000008, 0x000003ae, 0x000003ad, 0x000500ab, 0x0000001f,
+ 0x000003af, 0x000003ae, 0x00000032, 0x000200f9, 0x000003b0, 0x000200f8, 0x000003b0, 0x000900f5,
+ 0x0000001f, 0x000005ea, 0x0000008f, 0x000003a0, 0x00000175, 0x000003a4, 0x000003af, 0x000003a6,
+ 0x000400a8, 0x0000001f, 0x0000019f, 0x000005ea, 0x000300f7, 0x000001a1, 0x00000000, 0x000400fa,
+ 0x0000019f, 0x000001a0, 0x000001a1, 0x000200f8, 0x000001a0, 0x000300f7, 0x000003f5, 0x00000000,
+ 0x000300fb, 0x00000032, 0x000003c7, 0x000200f8, 0x000003c7, 0x000500b1, 0x0000001f, 0x000003c9,
+ 0x0000017d, 0x00000031, 0x000500a6, 0x0000001f, 0x000003cc, 0x000003c9, 0x00000386, 0x000400a8,
+ 0x0000001f, 0x000003cd, 0x000003cc, 0x000300f7, 0x000003d3, 0x00000000, 0x000400fa, 0x000003cd,
+ 0x000003ce, 0x000003d3, 0x000200f8, 0x000003ce, 0x000500af, 0x0000001f, 0x000003d2, 0x0000017d,
+ 0x000000b8, 0x000200f9, 0x000003d3, 0x000200f8, 0x000003d3, 0x000700f5, 0x0000001f, 0x000003d4,
+ 0x000003cc, 0x000003c7, 0x000003d2, 0x000003ce, 0x000400a8, 0x0000001f, 0x000003d5, 0x000003d4,
+ 0x000300f7, 0x000003db, 0x00000000, 0x000400fa, 0x000003d5, 0x000003d6, 0x000003db, 0x000200f8,
+ 0x000003d6, 0x000500af, 0x0000001f, 0x000003da, 0x00000196, 0x000000bb, 0x000200f9, 0x000003db,
+ 0x000200f8, 0x000003db, 0x000700f5, 0x0000001f, 0x000003dc, 0x000003d4, 0x000003d3, 0x000003da,
+ 0x000003d6, 0x000400a8, 0x0000001f, 0x000003dd, 0x000003dc, 0x000300f7, 0x000003e3, 0x00000000,
+ 0x000400fa, 0x000003dd, 0x000003de, 0x000003e3, 0x000200f8, 0x000003de, 0x000500af, 0x0000001f,
+ 0x000003e2, 0x00000199, 0x000000be, 0x000200f9, 0x000003e3, 0x000200f8, 0x000003e3, 0x000700f5,
+ 0x0000001f, 0x000003e4, 0x000003dc, 0x000003db, 0x000003e2, 0x000003de, 0x000300f7, 0x000003e6,
+ 0x00000000, 0x000400fa, 0x000003e4, 0x000003e5, 0x000003e6, 0x000200f8, 0x000003e5, 0x000200f9,
+ 0x000003f5, 0x000200f8, 0x000003e6, 0x000500b1, 0x0000001f, 0x000003e8, 0x00000199, 0x00000031,
+ 0x000300f7, 0x000003eb, 0x00000000, 0x000400fa, 0x000003e8, 0x000003e9, 0x000003eb, 0x000200f8,
+ 0x000003e9, 0x000200f9, 0x000003f5, 0x000200f8, 0x000003eb, 0x00050084, 0x00000006, 0x00000400,
+ 0x000000bb, 0x00000199, 0x00050080, 0x00000006, 0x00000401, 0x00000196, 0x00000400, 0x00050084,
+ 0x00000006, 0x00000402, 0x000000b8, 0x00000401, 0x00050080, 0x00000006, 0x00000403, 0x0000017d,
+ 0x00000402, 0x0004007c, 0x00000008, 0x00000404, 0x00000403, 0x00050080, 0x00000008, 0x000003f1,
+ 0x00000171, 0x00000404, 0x00060041, 0x000000a4, 0x000003f2, 0x0000009a, 0x00000031, 0x000003f1,
+ 0x0004003d, 0x00000008, 0x000003f3, 0x000003f2, 0x000500ab, 0x0000001f, 0x000003f4, 0x000003f3,
+ 0x00000032, 0x000200f9, 0x000003f5, 0x000200f8, 0x000003f5, 0x000900f5, 0x0000001f, 0x000005eb,
+ 0x0000008f, 0x000003e5, 0x00000175, 0x000003e9, 0x000003f4, 0x000003eb, 0x000200f9, 0x000001a1,
+ 0x000200f8, 0x000001a1, 0x000700f5, 0x0000001f, 0x000001b0, 0x000005ea, 0x000003b0, 0x000005eb,
+ 0x000003f5, 0x000400a8, 0x0000001f, 0x000001b1, 0x000001b0, 0x000200f9, 0x0000018f, 0x000200f8,
+ 0x0000018f, 0x000700f5, 0x0000001f, 0x000001b2, 0x0000018d, 0x00000188, 0x000001b1, 0x000001a1,
+ 0x000300f7, 0x000001b4, 0x00000000, 0x000400fa, 0x000001b2, 0x000001b3, 0x000001b4, 0x000200f8,
+ 0x000001b3, 0x000500ad, 0x0000001f, 0x000001b8, 0x0000017d, 0x00000031, 0x000300f7, 0x000001bb,
+ 0x00000000, 0x000400fa, 0x000001b8, 0x000001ba, 0x000001cb, 0x000200f8, 0x000001ba, 0x00050082,
+ 0x00000006, 0x000001bf, 0x0000017d, 0x00000045, 0x00050051, 0x00000006, 0x000001c3, 0x000000b5,
+ 0x00000001, 0x00050051, 0x00000006, 0x000001c6, 0x000000b5, 0x00000002, 0x00050084, 0x00000006,
+ 0x0000040e, 0x000000bb, 0x000001c6, 0x00050080, 0x00000006, 0x0000040f, 0x000001c3, 0x0000040e,
+ 0x00050084, 0x00000006, 0x00000410, 0x000000b8, 0x0000040f, 0x00050080, 0x00000006, 0x00000411,
+ 0x000001bf, 0x00000410, 0x0004007c, 0x00000008, 0x00000412, 0x00000411, 0x00050080, 0x00000008,
+ 0x000001c8, 0x00000178, 0x00000412, 0x00060041, 0x000000ef, 0x000001c9, 0x000000e9, 0x00000031,
+ 0x000001c8, 0x0004003d, 0x0000002c, 0x000001ca, 0x000001c9, 0x000200f9, 0x000001bb, 0x000200f8,
+ 0x000001cb, 0x000200f9, 0x000001bb, 0x000200f8, 0x000001bb, 0x000700f5, 0x0000002c, 0x000005ec,
+ 0x000001ca, 0x000001ba, 0x000000ee, 0x000001cb, 0x000500b1, 0x0000001f, 0x000001d1, 0x0000017d,
+ 0x000000b8, 0x000300f7, 0x000001d4, 0x00000000, 0x000400fa, 0x000001d1, 0x000001d3, 0x000001e3,
+ 0x000200f8, 0x000001d3, 0x00050051, 0x00000006, 0x000001db, 0x000000b5, 0x00000001, 0x00050051,
+ 0x00000006, 0x000001de, 0x000000b5, 0x00000002, 0x00050084, 0x00000006, 0x0000041c, 0x000000bb,
+ 0x000001de, 0x00050080, 0x00000006, 0x0000041d, 0x000001db, 0x0000041c, 0x00050084, 0x00000006,
+ 0x0000041e, 0x000000b8, 0x0000041d, 0x00050080, 0x00000006, 0x0000041f, 0x0000017d, 0x0000041e,
+ 0x0004007c, 0x00000008, 0x00000420, 0x0000041f, 0x00050080, 0x00000008, 0x000001e0, 0x00000178,
+ 0x00000420, 0x00060041, 0x000000ef, 0x000001e1, 0x000000e9, 0x00000031, 0x000001e0, 0x0004003d,
+ 0x0000002c, 0x000001e2, 0x000001e1, 0x000200f9, 0x000001d4, 0x000200f8, 0x000001e3, 0x000200f9,
+ 0x000001d4, 0x000200f8, 0x000001d4, 0x000700f5, 0x0000002c, 0x000005ed, 0x000001e2, 0x000001d3,
+ 0x000000ee, 0x000001e3, 0x00060041, 0x000000da, 0x000001e5, 0x00000030, 0x00000045, 0x00000032,
+ 0x0004003d, 0x00000008, 0x000001e6, 0x000001e5, 0x00050051, 0x00000006, 0x000001ec, 0x000000b5,
+ 0x00000001, 0x00050051, 0x00000006, 0x000001ef, 0x000000b5, 0x00000002, 0x00050080, 0x00000006,
+ 0x00000426, 0x000000b8, 0x00000045, 0x00050084, 0x00000006, 0x0000042b, 0x000000bb, 0x000001ef,
+ 0x00050080, 0x00000006, 0x0000042c, 0x000001ec, 0x0000042b, 0x00050084, 0x00000006, 0x0000042d,
+ 0x00000426, 0x0000042c, 0x00050080, 0x00000006, 0x0000042e, 0x0000017d, 0x0000042d, 0x0004007c,
+ 0x00000008, 0x0000042f, 0x0000042e, 0x00050080, 0x00000008, 0x000001f1, 0x000001e6, 0x0000042f,
+ 0x00050083, 0x0000002c, 0x000001f4, 0x000005ed, 0x000005ec, 0x00050085, 0x0000002c, 0x000001f6,
+ 0x000001f4, 0x0000017b, 0x00060041, 0x000000ef, 0x000001f7, 0x000000e9, 0x00000031, 0x000001f1,
+ 0x0004003d, 0x0000002c, 0x000001f8, 0x000001f7, 0x00050083, 0x0000002c, 0x000001f9, 0x000001f8,
+ 0x000001f6, 0x0003003e, 0x000001f7, 0x000001f9, 0x000200f9, 0x000001b4, 0x000200f8, 0x000001b4,
+ 0x000500b1, 0x0000001f, 0x000001fe, 0x0000017d, 0x000000b8, 0x000300f7, 0x00000200, 0x00000000,
+ 0x000400fa, 0x000001fe, 0x000001ff, 0x00000200, 0x000200f8, 0x000001ff, 0x00050051, 0x00000006,
+ 0x00000202, 0x000000b5, 0x00000001, 0x000500b3, 0x0000001f, 0x00000204, 0x00000202, 0x000000bb,
+ 0x000200f9, 0x00000200, 0x000200f8, 0x00000200, 0x000700f5, 0x0000001f, 0x00000205, 0x000001fe,
+ 0x000001b4, 0x00000204, 0x000001ff, 0x000300f7, 0x00000207, 0x00000000, 0x000400fa, 0x00000205,
+ 0x00000206, 0x00000207, 0x000200f8, 0x00000206, 0x00050051, 0x00000006, 0x00000209, 0x000000b5,
+ 0x00000002, 0x000500b1, 0x0000001f, 0x0000020b, 0x00000209, 0x000000be, 0x000200f9, 0x00000207,
+ 0x000200f8, 0x00000207, 0x000700f5, 0x0000001f, 0x0000020c, 0x00000205, 0x00000200, 0x0000020b,
+ 0x00000206, 0x000300f7, 0x0000020e, 0x00000000, 0x000400fa, 0x0000020c, 0x0000020d, 0x0000020e,
+ 0x000200f8, 0x0000020d, 0x00050051, 0x00000006, 0x00000210, 0x000000b5, 0x00000001, 0x00050082,
+ 0x00000006, 0x00000211, 0x00000210, 0x00000045, 0x00050051, 0x00000006, 0x00000218, 0x000000b5,
+ 0x00000002, 0x000300f7, 0x00000465, 0x00000000, 0x000300fb, 0x00000032, 0x00000437, 0x000200f8,
+ 0x00000437, 0x000500b1, 0x0000001f, 0x00000439, 0x0000017d, 0x00000031, 0x000500b1, 0x0000001f,
+ 0x0000043b, 0x00000211, 0x00000031, 0x000500a6, 0x0000001f, 0x0000043c, 0x00000439, 0x0000043b,
+ 0x000400a8, 0x0000001f, 0x0000043d, 0x0000043c, 0x000300f7, 0x00000443, 0x00000000, 0x000400fa,
+ 0x0000043d, 0x0000043e, 0x00000443, 0x000200f8, 0x0000043e, 0x000500af, 0x0000001f, 0x00000442,
+ 0x0000017d, 0x000000b8, 0x000200f9, 0x00000443, 0x000200f8, 0x00000443, 0x000700f5, 0x0000001f,
+ 0x00000444, 0x0000043c, 0x00000437, 0x00000442, 0x0000043e, 0x000400a8, 0x0000001f, 0x00000445,
+ 0x00000444, 0x000300f7, 0x0000044b, 0x00000000, 0x000400fa, 0x00000445, 0x00000446, 0x0000044b,
+ 0x000200f8, 0x00000446, 0x000500af, 0x0000001f, 0x0000044a, 0x00000211, 0x000000bb, 0x000200f9,
+ 0x0000044b, 0x000200f8, 0x0000044b, 0x000700f5, 0x0000001f, 0x0000044c, 0x00000444, 0x00000443,
+ 0x0000044a, 0x00000446, 0x000400a8, 0x0000001f, 0x0000044d, 0x0000044c, 0x000300f7, 0x00000453,
+ 0x00000000, 0x000400fa, 0x0000044d, 0x0000044e, 0x00000453, 0x000200f8, 0x0000044e, 0x000500af,
+ 0x0000001f, 0x00000452, 0x00000218, 0x000000be, 0x000200f9, 0x00000453, 0x000200f8, 0x00000453,
+ 0x000700f5, 0x0000001f, 0x00000454, 0x0000044c, 0x0000044b, 0x00000452, 0x0000044e, 0x000300f7,
+ 0x00000456, 0x00000000, 0x000400fa, 0x00000454, 0x00000455, 0x00000456, 0x000200f8, 0x00000455,
+ 0x000200f9, 0x00000465, 0x000200f8, 0x00000456, 0x000500b1, 0x0000001f, 0x00000458, 0x00000218,
+ 0x00000031, 0x000300f7, 0x0000045b, 0x00000000, 0x000400fa, 0x00000458, 0x00000459, 0x0000045b,
+ 0x000200f8, 0x00000459, 0x000200f9, 0x00000465, 0x000200f8, 0x0000045b, 0x00050084, 0x00000006,
+ 0x00000470, 0x000000bb, 0x00000218, 0x00050080, 0x00000006, 0x00000471, 0x00000211, 0x00000470,
+ 0x00050084, 0x00000006, 0x00000472, 0x000000b8, 0x00000471, 0x00050080, 0x00000006, 0x00000473,
+ 0x0000017d, 0x00000472, 0x0004007c, 0x00000008, 0x00000474, 0x00000473, 0x00050080, 0x00000008,
+ 0x00000461, 0x00000171, 0x00000474, 0x00060041, 0x000000a4, 0x00000462, 0x0000009a, 0x00000031,
+ 0x00000461, 0x0004003d, 0x00000008, 0x00000463, 0x00000462, 0x000500ab, 0x0000001f, 0x00000464,
+ 0x00000463, 0x00000032, 0x000200f9, 0x00000465, 0x000200f8, 0x00000465, 0x000900f5, 0x0000001f,
+ 0x000005ee, 0x0000008f, 0x00000455, 0x00000175, 0x00000459, 0x00000464, 0x0000045b, 0x000400a8,
+ 0x0000001f, 0x0000021e, 0x000005ee, 0x000300f7, 0x00000220, 0x00000000, 0x000400fa, 0x0000021e,
+ 0x0000021f, 0x00000220, 0x000200f8, 0x0000021f, 0x000300f7, 0x000004aa, 0x00000000, 0x000300fb,
+ 0x00000032, 0x0000047c, 0x000200f8, 0x0000047c, 0x000500b1, 0x0000001f, 0x00000480, 0x00000210,
+ 0x00000031, 0x000500a6, 0x0000001f, 0x00000481, 0x00000439, 0x00000480, 0x000400a8, 0x0000001f,
+ 0x00000482, 0x00000481, 0x000300f7, 0x00000488, 0x00000000, 0x000400fa, 0x00000482, 0x00000483,
+ 0x00000488, 0x000200f8, 0x00000483, 0x000500af, 0x0000001f, 0x00000487, 0x0000017d, 0x000000b8,
+ 0x000200f9, 0x00000488, 0x000200f8, 0x00000488, 0x000700f5, 0x0000001f, 0x00000489, 0x00000481,
+ 0x0000047c, 0x00000487, 0x00000483, 0x000400a8, 0x0000001f, 0x0000048a, 0x00000489, 0x000300f7,
+ 0x00000490, 0x00000000, 0x000400fa, 0x0000048a, 0x0000048b, 0x00000490, 0x000200f8, 0x0000048b,
+ 0x000500af, 0x0000001f, 0x0000048f, 0x00000210, 0x000000bb, 0x000200f9, 0x00000490, 0x000200f8,
+ 0x00000490, 0x000700f5, 0x0000001f, 0x00000491, 0x00000489, 0x00000488, 0x0000048f, 0x0000048b,
+ 0x000400a8, 0x0000001f, 0x00000492, 0x00000491, 0x000300f7, 0x00000498, 0x00000000, 0x000400fa,
+ 0x00000492, 0x00000493, 0x00000498, 0x000200f8, 0x00000493, 0x000500af, 0x0000001f, 0x00000497,
+ 0x00000218, 0x000000be, 0x000200f9, 0x00000498, 0x000200f8, 0x00000498, 0x000700f5, 0x0000001f,
+ 0x00000499, 0x00000491, 0x00000490, 0x00000497, 0x00000493, 0x000300f7, 0x0000049b, 0x00000000,
+ 0x000400fa, 0x00000499, 0x0000049a, 0x0000049b, 0x000200f8, 0x0000049a, 0x000200f9, 0x000004aa,
+ 0x000200f8, 0x0000049b, 0x000500b1, 0x0000001f, 0x0000049d, 0x00000218, 0x00000031, 0x000300f7,
+ 0x000004a0, 0x00000000, 0x000400fa, 0x0000049d, 0x0000049e, 0x000004a0, 0x000200f8, 0x0000049e,
+ 0x000200f9, 0x000004aa, 0x000200f8, 0x000004a0, 0x00050084, 0x00000006, 0x000004b5, 0x000000bb,
+ 0x00000218, 0x00050080, 0x00000006, 0x000004b6, 0x00000210, 0x000004b5, 0x00050084, 0x00000006,
+ 0x000004b7, 0x000000b8, 0x000004b6, 0x00050080, 0x00000006, 0x000004b8, 0x0000017d, 0x000004b7,
+ 0x0004007c, 0x00000008, 0x000004b9, 0x000004b8, 0x00050080, 0x00000008, 0x000004a6, 0x00000171,
+ 0x000004b9, 0x00060041, 0x000000a4, 0x000004a7, 0x0000009a, 0x00000031, 0x000004a6, 0x0004003d,
+ 0x00000008, 0x000004a8, 0x000004a7, 0x000500ab, 0x0000001f, 0x000004a9, 0x000004a8, 0x00000032,
+ 0x000200f9, 0x000004aa, 0x000200f8, 0x000004aa, 0x000900f5, 0x0000001f, 0x000005ef, 0x0000008f,
+ 0x0000049a, 0x00000175, 0x0000049e, 0x000004a9, 0x000004a0, 0x000200f9, 0x00000220, 0x000200f8,
+ 0x00000220, 0x000700f5, 0x0000001f, 0x0000022f, 0x000005ee, 0x00000465, 0x000005ef, 0x000004aa,
+ 0x000400a8, 0x0000001f, 0x00000230, 0x0000022f, 0x000200f9, 0x0000020e, 0x000200f8, 0x0000020e,
+ 0x000700f5, 0x0000001f, 0x00000231, 0x0000020c, 0x00000207, 0x00000230, 0x00000220, 0x000300f7,
+ 0x00000233, 0x00000000, 0x000400fa, 0x00000231, 0x00000232, 0x00000233, 0x000200f8, 0x00000232,
+ 0x00050051, 0x00000006, 0x00000236, 0x000000b5, 0x00000001, 0x000500ad, 0x0000001f, 0x00000237,
+ 0x00000236, 0x00000031, 0x000300f7, 0x0000023a, 0x00000000, 0x000400fa, 0x00000237, 0x00000239,
+ 0x0000024a, 0x000200f8, 0x00000239, 0x00050082, 0x00000006, 0x0000023e, 0x00000236, 0x00000045,
+ 0x00050051, 0x00000006, 0x00000245, 0x000000b5, 0x00000002, 0x00050084, 0x00000006, 0x000004c3,
+ 0x000000bb, 0x00000245, 0x00050080, 0x00000006, 0x000004c4, 0x0000023e, 0x000004c3, 0x00050084,
+ 0x00000006, 0x000004c5, 0x000000b8, 0x000004c4, 0x00050080, 0x00000006, 0x000004c6, 0x0000017d,
+ 0x000004c5, 0x0004007c, 0x00000008, 0x000004c7, 0x000004c6, 0x00050080, 0x00000008, 0x00000247,
+ 0x00000178, 0x000004c7, 0x00060041, 0x000000ef, 0x00000248, 0x000000e9, 0x00000031, 0x00000247,
+ 0x0004003d, 0x0000002c, 0x00000249, 0x00000248, 0x000200f9, 0x0000023a, 0x000200f8, 0x0000024a,
+ 0x000200f9, 0x0000023a, 0x000200f8, 0x0000023a, 0x000700f5, 0x0000002c, 0x000005f0, 0x00000249,
+ 0x00000239, 0x000000ee, 0x0000024a, 0x000500b1, 0x0000001f, 0x00000250, 0x00000236, 0x000000bb,
+ 0x000300f7, 0x00000253, 0x00000000, 0x000400fa, 0x00000250, 0x00000252, 0x00000262, 0x000200f8,
+ 0x00000252, 0x00050051, 0x00000006, 0x0000025d, 0x000000b5, 0x00000002, 0x00050084, 0x00000006,
+ 0x000004d1, 0x000000bb, 0x0000025d, 0x00050080, 0x00000006, 0x000004d2, 0x00000236, 0x000004d1,
+ 0x00050084, 0x00000006, 0x000004d3, 0x000000b8, 0x000004d2, 0x00050080, 0x00000006, 0x000004d4,
+ 0x0000017d, 0x000004d3, 0x0004007c, 0x00000008, 0x000004d5, 0x000004d4, 0x00050080, 0x00000008,
+ 0x0000025f, 0x00000178, 0x000004d5, 0x00060041, 0x000000ef, 0x00000260, 0x000000e9, 0x00000031,
+ 0x0000025f, 0x0004003d, 0x0000002c, 0x00000261, 0x00000260, 0x000200f9, 0x00000253, 0x000200f8,
+ 0x00000262, 0x000200f9, 0x00000253, 0x000200f8, 0x00000253, 0x000700f5, 0x0000002c, 0x000005f1,
+ 0x00000261, 0x00000252, 0x000000ee, 0x00000262, 0x00060041, 0x000000da, 0x00000264, 0x00000030,
+ 0x00000045, 0x00000037, 0x0004003d, 0x00000008, 0x00000265, 0x00000264, 0x00050051, 0x00000006,
+ 0x0000026e, 0x000000b5, 0x00000002, 0x00050080, 0x00000006, 0x000004de, 0x000000bb, 0x00000045,
+ 0x00050084, 0x00000006, 0x000004e0, 0x000004de, 0x0000026e, 0x00050080, 0x00000006, 0x000004e1,
+ 0x00000236, 0x000004e0, 0x00050084, 0x00000006, 0x000004e2, 0x000000b8, 0x000004e1, 0x00050080,
+ 0x00000006, 0x000004e3, 0x0000017d, 0x000004e2, 0x0004007c, 0x00000008, 0x000004e4, 0x000004e3,
+ 0x00050080, 0x00000008, 0x00000270, 0x00000265, 0x000004e4, 0x00050083, 0x0000002c, 0x00000273,
+ 0x000005f1, 0x000005f0, 0x00050085, 0x0000002c, 0x00000275, 0x00000273, 0x0000017b, 0x00060041,
+ 0x000000ef, 0x00000276, 0x000000e9, 0x00000031, 0x00000270, 0x0004003d, 0x0000002c, 0x00000277,
+ 0x00000276, 0x00050083, 0x0000002c, 0x00000278, 0x00000277, 0x00000275, 0x0003003e, 0x00000276,
+ 0x00000278, 0x000200f9, 0x00000233, 0x000200f8, 0x00000233, 0x000300f7, 0x0000027f, 0x00000000,
+ 0x000400fa, 0x000001fe, 0x0000027e, 0x0000027f, 0x000200f8, 0x0000027e, 0x00050051, 0x00000006,
+ 0x00000281, 0x000000b5, 0x00000001, 0x000500b1, 0x0000001f, 0x00000283, 0x00000281, 0x000000bb,
+ 0x000200f9, 0x0000027f, 0x000200f8, 0x0000027f, 0x000700f5, 0x0000001f, 0x00000284, 0x000001fe,
+ 0x00000233, 0x00000283, 0x0000027e, 0x000300f7, 0x00000286, 0x00000000, 0x000400fa, 0x00000284,
+ 0x00000285, 0x00000286, 0x000200f8, 0x00000285, 0x00050051, 0x00000006, 0x00000288, 0x000000b5,
+ 0x00000002, 0x000500b3, 0x0000001f, 0x0000028a, 0x00000288, 0x000000be, 0x000200f9, 0x00000286,
+ 0x000200f8, 0x00000286, 0x000700f5, 0x0000001f, 0x0000028b, 0x00000284, 0x0000027f, 0x0000028a,
+ 0x00000285, 0x000300f7, 0x0000028d, 0x00000000, 0x000400fa, 0x0000028b, 0x0000028c, 0x0000028d,
+ 0x000200f8, 0x0000028c, 0x00050051, 0x00000006, 0x0000028f, 0x000000b5, 0x00000002, 0x00050082,
+ 0x00000006, 0x00000290, 0x0000028f, 0x00000045, 0x00050051, 0x00000006, 0x00000296, 0x000000b5,
+ 0x00000001, 0x000300f7, 0x0000051a, 0x00000000, 0x000300fb, 0x00000032, 0x000004ec, 0x000200f8,
+ 0x000004ec, 0x000500b1, 0x0000001f, 0x000004ee, 0x0000017d, 0x00000031, 0x000500b1, 0x0000001f,
+ 0x000004f0, 0x00000296, 0x00000031, 0x000500a6, 0x0000001f, 0x000004f1, 0x000004ee, 0x000004f0,
+ 0x000400a8, 0x0000001f, 0x000004f2, 0x000004f1, 0x000300f7, 0x000004f8, 0x00000000, 0x000400fa,
+ 0x000004f2, 0x000004f3, 0x000004f8, 0x000200f8, 0x000004f3, 0x000500af, 0x0000001f, 0x000004f7,
+ 0x0000017d, 0x000000b8, 0x000200f9, 0x000004f8, 0x000200f8, 0x000004f8, 0x000700f5, 0x0000001f,
+ 0x000004f9, 0x000004f1, 0x000004ec, 0x000004f7, 0x000004f3, 0x000400a8, 0x0000001f, 0x000004fa,
+ 0x000004f9, 0x000300f7, 0x00000500, 0x00000000, 0x000400fa, 0x000004fa, 0x000004fb, 0x00000500,
+ 0x000200f8, 0x000004fb, 0x000500af, 0x0000001f, 0x000004ff, 0x00000296, 0x000000bb, 0x000200f9,
+ 0x00000500, 0x000200f8, 0x00000500, 0x000700f5, 0x0000001f, 0x00000501, 0x000004f9, 0x000004f8,
+ 0x000004ff, 0x000004fb, 0x000400a8, 0x0000001f, 0x00000502, 0x00000501, 0x000300f7, 0x00000508,
+ 0x00000000, 0x000400fa, 0x00000502, 0x00000503, 0x00000508, 0x000200f8, 0x00000503, 0x000500af,
+ 0x0000001f, 0x00000507, 0x00000290, 0x000000be, 0x000200f9, 0x00000508, 0x000200f8, 0x00000508,
+ 0x000700f5, 0x0000001f, 0x00000509, 0x00000501, 0x00000500, 0x00000507, 0x00000503, 0x000300f7,
+ 0x0000050b, 0x00000000, 0x000400fa, 0x00000509, 0x0000050a, 0x0000050b, 0x000200f8, 0x0000050a,
+ 0x000200f9, 0x0000051a, 0x000200f8, 0x0000050b, 0x000500b1, 0x0000001f, 0x0000050d, 0x00000290,
+ 0x00000031, 0x000300f7, 0x00000510, 0x00000000, 0x000400fa, 0x0000050d, 0x0000050e, 0x00000510,
+ 0x000200f8, 0x0000050e, 0x000200f9, 0x0000051a, 0x000200f8, 0x00000510, 0x00050084, 0x00000006,
+ 0x00000525, 0x000000bb, 0x00000290, 0x00050080, 0x00000006, 0x00000526, 0x00000296, 0x00000525,
+ 0x00050084, 0x00000006, 0x00000527, 0x000000b8, 0x00000526, 0x00050080, 0x00000006, 0x00000528,
+ 0x0000017d, 0x00000527, 0x0004007c, 0x00000008, 0x00000529, 0x00000528, 0x00050080, 0x00000008,
+ 0x00000516, 0x00000171, 0x00000529, 0x00060041, 0x000000a4, 0x00000517, 0x0000009a, 0x00000031,
+ 0x00000516, 0x0004003d, 0x00000008, 0x00000518, 0x00000517, 0x000500ab, 0x0000001f, 0x00000519,
+ 0x00000518, 0x00000032, 0x000200f9, 0x0000051a, 0x000200f8, 0x0000051a, 0x000900f5, 0x0000001f,
+ 0x000005f2, 0x0000008f, 0x0000050a, 0x00000175, 0x0000050e, 0x00000519, 0x00000510, 0x000400a8,
+ 0x0000001f, 0x0000029d, 0x000005f2, 0x000300f7, 0x0000029f, 0x00000000, 0x000400fa, 0x0000029d,
+ 0x0000029e, 0x0000029f, 0x000200f8, 0x0000029e, 0x000300f7, 0x0000055f, 0x00000000, 0x000300fb,
+ 0x00000032, 0x00000531, 0x000200f8, 0x00000531, 0x000300f7, 0x0000053d, 0x00000000, 0x000400fa,
+ 0x000004f2, 0x00000538, 0x0000053d, 0x000200f8, 0x00000538, 0x000500af, 0x0000001f, 0x0000053c,
+ 0x0000017d, 0x000000b8, 0x000200f9, 0x0000053d, 0x000200f8, 0x0000053d, 0x000700f5, 0x0000001f,
+ 0x0000053e, 0x000004f1, 0x00000531, 0x0000053c, 0x00000538, 0x000400a8, 0x0000001f, 0x0000053f,
+ 0x0000053e, 0x000300f7, 0x00000545, 0x00000000, 0x000400fa, 0x0000053f, 0x00000540, 0x00000545,
+ 0x000200f8, 0x00000540, 0x000500af, 0x0000001f, 0x00000544, 0x00000296, 0x000000bb, 0x000200f9,
+ 0x00000545, 0x000200f8, 0x00000545, 0x000700f5, 0x0000001f, 0x00000546, 0x0000053e, 0x0000053d,
+ 0x00000544, 0x00000540, 0x000400a8, 0x0000001f, 0x00000547, 0x00000546, 0x000300f7, 0x0000054d,
+ 0x00000000, 0x000400fa, 0x00000547, 0x00000548, 0x0000054d, 0x000200f8, 0x00000548, 0x000500af,
+ 0x0000001f, 0x0000054c, 0x0000028f, 0x000000be, 0x000200f9, 0x0000054d, 0x000200f8, 0x0000054d,
+ 0x000700f5, 0x0000001f, 0x0000054e, 0x00000546, 0x00000545, 0x0000054c, 0x00000548, 0x000300f7,
+ 0x00000550, 0x00000000, 0x000400fa, 0x0000054e, 0x0000054f, 0x00000550, 0x000200f8, 0x0000054f,
+ 0x000200f9, 0x0000055f, 0x000200f8, 0x00000550, 0x000500b1, 0x0000001f, 0x00000552, 0x0000028f,
+ 0x00000031, 0x000300f7, 0x00000555, 0x00000000, 0x000400fa, 0x00000552, 0x00000553, 0x00000555,
+ 0x000200f8, 0x00000553, 0x000200f9, 0x0000055f, 0x000200f8, 0x00000555, 0x00050084, 0x00000006,
+ 0x0000056a, 0x000000bb, 0x0000028f, 0x00050080, 0x00000006, 0x0000056b, 0x00000296, 0x0000056a,
+ 0x00050084, 0x00000006, 0x0000056c, 0x000000b8, 0x0000056b, 0x00050080, 0x00000006, 0x0000056d,
+ 0x0000017d, 0x0000056c, 0x0004007c, 0x00000008, 0x0000056e, 0x0000056d, 0x00050080, 0x00000008,
+ 0x0000055b, 0x00000171, 0x0000056e, 0x00060041, 0x000000a4, 0x0000055c, 0x0000009a, 0x00000031,
+ 0x0000055b, 0x0004003d, 0x00000008, 0x0000055d, 0x0000055c, 0x000500ab, 0x0000001f, 0x0000055e,
+ 0x0000055d, 0x00000032, 0x000200f9, 0x0000055f, 0x000200f8, 0x0000055f, 0x000900f5, 0x0000001f,
+ 0x000005f3, 0x0000008f, 0x0000054f, 0x00000175, 0x00000553, 0x0000055e, 0x00000555, 0x000200f9,
+ 0x0000029f, 0x000200f8, 0x0000029f, 0x000700f5, 0x0000001f, 0x000002ae, 0x000005f2, 0x0000051a,
+ 0x000005f3, 0x0000055f, 0x000400a8, 0x0000001f, 0x000002af, 0x000002ae, 0x000200f9, 0x0000028d,
+ 0x000200f8, 0x0000028d, 0x000700f5, 0x0000001f, 0x000002b0, 0x0000028b, 0x00000286, 0x000002af,
+ 0x0000029f, 0x000300f7, 0x000002b2, 0x00000000, 0x000400fa, 0x000002b0, 0x000002b1, 0x000002b2,
+ 0x000200f8, 0x000002b1, 0x00050051, 0x00000006, 0x000002b5, 0x000000b5, 0x00000002, 0x000500ad,
+ 0x0000001f, 0x000002b6, 0x000002b5, 0x00000031, 0x000300f7, 0x000002b9, 0x00000000, 0x000400fa,
+ 0x000002b6, 0x000002b8, 0x000002c9, 0x000200f8, 0x000002b8, 0x00050082, 0x00000006, 0x000002bd,
+ 0x000002b5, 0x00000045, 0x00050051, 0x00000006, 0x000002c3, 0x000000b5, 0x00000001, 0x00050084,
+ 0x00000006, 0x00000578, 0x000000bb, 0x000002bd, 0x00050080, 0x00000006, 0x00000579, 0x000002c3,
+ 0x00000578, 0x00050084, 0x00000006, 0x0000057a, 0x000000b8, 0x00000579, 0x00050080, 0x00000006,
+ 0x0000057b, 0x0000017d, 0x0000057a, 0x0004007c, 0x00000008, 0x0000057c, 0x0000057b, 0x00050080,
+ 0x00000008, 0x000002c6, 0x00000178, 0x0000057c, 0x00060041, 0x000000ef, 0x000002c7, 0x000000e9,
+ 0x00000031, 0x000002c6, 0x0004003d, 0x0000002c, 0x000002c8, 0x000002c7, 0x000200f9, 0x000002b9,
+ 0x000200f8, 0x000002c9, 0x000200f9, 0x000002b9, 0x000200f8, 0x000002b9, 0x000700f5, 0x0000002c,
+ 0x000005f4, 0x000002c8, 0x000002b8, 0x000000ee, 0x000002c9, 0x000500b1, 0x0000001f, 0x000002cf,
+ 0x000002b5, 0x000000be, 0x000300f7, 0x000002d2, 0x00000000, 0x000400fa, 0x000002cf, 0x000002d1,
+ 0x000002e1, 0x000200f8, 0x000002d1, 0x00050051, 0x00000006, 0x000002d9, 0x000000b5, 0x00000001,
+ 0x00050084, 0x00000006, 0x00000586, 0x000000bb, 0x000002b5, 0x00050080, 0x00000006, 0x00000587,
+ 0x000002d9, 0x00000586, 0x00050084, 0x00000006, 0x00000588, 0x000000b8, 0x00000587, 0x00050080,
+ 0x00000006, 0x00000589, 0x0000017d, 0x00000588, 0x0004007c, 0x00000008, 0x0000058a, 0x00000589,
+ 0x00050080, 0x00000008, 0x000002de, 0x00000178, 0x0000058a, 0x00060041, 0x000000ef, 0x000002df,
+ 0x000000e9, 0x00000031, 0x000002de, 0x0004003d, 0x0000002c, 0x000002e0, 0x000002df, 0x000200f9,
+ 0x000002d2, 0x000200f8, 0x000002e1, 0x000200f9, 0x000002d2, 0x000200f8, 0x000002d2, 0x000700f5,
+ 0x0000002c, 0x000005f5, 0x000002e0, 0x000002d1, 0x000000ee, 0x000002e1, 0x00060041, 0x000000da,
+ 0x000002e3, 0x00000030, 0x00000045, 0x00000088, 0x0004003d, 0x00000008, 0x000002e4, 0x000002e3,
+ 0x00050051, 0x00000006, 0x000002ea, 0x000000b5, 0x00000001, 0x00050084, 0x00000006, 0x00000594,
+ 0x000000bb, 0x000002b5, 0x00050080, 0x00000006, 0x00000595, 0x000002ea, 0x00000594, 0x00050084,
+ 0x00000006, 0x00000596, 0x000000b8, 0x00000595, 0x00050080, 0x00000006, 0x00000597, 0x0000017d,
+ 0x00000596, 0x0004007c, 0x00000008, 0x00000598, 0x00000597, 0x00050080, 0x00000008, 0x000002ef,
+ 0x000002e4, 0x00000598, 0x00050083, 0x0000002c, 0x000002f2, 0x000005f5, 0x000005f4, 0x00050085,
+ 0x0000002c, 0x000002f4, 0x000002f2, 0x0000017b, 0x00060041, 0x000000ef, 0x000002f5, 0x000000e9,
+ 0x00000031, 0x000002ef, 0x0004003d, 0x0000002c, 0x000002f6, 0x000002f5, 0x00050083, 0x0000002c,
+ 0x000002f7, 0x000002f6, 0x000002f4, 0x0003003e, 0x000002f5, 0x000002f7, 0x000200f9, 0x000002b2,
+ 0x000200f8, 0x000002b2, 0x000200f9, 0x000000c2, 0x000200f8, 0x000000c2, 0x000200f9, 0x0000030c,
+ 0x000200f8, 0x0000030c, 0x000100fd, 0x00010038,
+};
+static const uint32_t spv_splat[] = {
+ 0x07230203, 0x00010300, 0x000d000b, 0x000003d5, 0x00000000, 0x00020011, 0x00000001, 0x0006000b,
+ 0x00000001, 0x4c534c47, 0x6474732e, 0x3035342e, 0x00000000, 0x0003000e, 0x00000000, 0x00000001,
+ 0x0006000f, 0x00000005, 0x00000004, 0x6e69616d, 0x00000000, 0x00000069, 0x00060010, 0x00000004,
+ 0x00000011, 0x00000008, 0x00000008, 0x00000004, 0x00030047, 0x00000023, 0x00000002, 0x00050048,
+ 0x00000023, 0x00000000, 0x00000023, 0x00000000, 0x00050048, 0x00000023, 0x00000001, 0x00000023,
+ 0x00000010, 0x00050048, 0x00000023, 0x00000002, 0x00000023, 0x00000020, 0x00050048, 0x00000023,
+ 0x00000003, 0x00000023, 0x00000030, 0x00050048, 0x00000023, 0x00000004, 0x00000023, 0x00000040,
+ 0x00050048, 0x00000023, 0x00000005, 0x00000023, 0x00000050, 0x00050048, 0x00000023, 0x00000006,
+ 0x00000023, 0x00000060, 0x00040047, 0x00000069, 0x0000000b, 0x0000001c, 0x00040047, 0x000000b1,
+ 0x00000006, 0x00000004, 0x00030047, 0x000000b2, 0x00000002, 0x00050048, 0x000000b2, 0x00000000,
+ 0x00000023, 0x00000000, 0x00040047, 0x000000b4, 0x00000021, 0x00000002, 0x00040047, 0x000000b4,
+ 0x00000022, 0x00000000, 0x00040047, 0x000000d1, 0x00000006, 0x00000004, 0x00030047, 0x000000d2,
+ 0x00000002, 0x00040048, 0x000000d2, 0x00000000, 0x00000018, 0x00050048, 0x000000d2, 0x00000000,
+ 0x00000023, 0x00000000, 0x00030047, 0x000000d4, 0x00000018, 0x00040047, 0x000000d4, 0x00000021,
+ 0x00000005, 0x00040047, 0x000000d4, 0x00000022, 0x00000000, 0x00040047, 0x000000f7, 0x00000006,
+ 0x00000004, 0x00030047, 0x000000f8, 0x00000002, 0x00050048, 0x000000f8, 0x00000000, 0x00000023,
+ 0x00000000, 0x00040047, 0x000000fa, 0x00000021, 0x00000000, 0x00040047, 0x000000fa, 0x00000022,
+ 0x00000000, 0x00040047, 0x0000015d, 0x00000006, 0x00000004, 0x00030047, 0x0000015e, 0x00000002,
+ 0x00040048, 0x0000015e, 0x00000000, 0x00000018, 0x00050048, 0x0000015e, 0x00000000, 0x00000023,
+ 0x00000000, 0x00030047, 0x00000160, 0x00000018, 0x00040047, 0x00000160, 0x00000021, 0x00000004,
+ 0x00040047, 0x00000160, 0x00000022, 0x00000000, 0x00040047, 0x00000316, 0x0000000b, 0x00000019,
+ 0x00020013, 0x00000002, 0x00030021, 0x00000003, 0x00000002, 0x00040015, 0x00000006, 0x00000020,
+ 0x00000001, 0x00040015, 0x00000008, 0x00000020, 0x00000000, 0x00040017, 0x0000001f, 0x00000006,
+ 0x00000004, 0x00040017, 0x00000020, 0x00000008, 0x00000004, 0x00030016, 0x00000021, 0x00000020,
+ 0x00040017, 0x00000022, 0x00000021, 0x00000004, 0x0009001e, 0x00000023, 0x0000001f, 0x00000020,
+ 0x00000020, 0x00000020, 0x00000022, 0x00000022, 0x00000022, 0x00040020, 0x00000024, 0x00000009,
+ 0x00000023, 0x0004003b, 0x00000024, 0x00000025, 0x00000009, 0x0004002b, 0x00000006, 0x00000026,
+ 0x00000000, 0x0004002b, 0x00000008, 0x00000027, 0x00000000, 0x00040020, 0x00000028, 0x00000009,
+ 0x00000006, 0x0004002b, 0x00000008, 0x0000002c, 0x00000001, 0x0004002b, 0x00000006, 0x0000003a,
+ 0x00000001, 0x00040017, 0x00000064, 0x00000006, 0x00000003, 0x00040017, 0x00000067, 0x00000008,
+ 0x00000003, 0x00040020, 0x00000068, 0x00000001, 0x00000067, 0x0004003b, 0x00000068, 0x00000069,
+ 0x00000001, 0x00040020, 0x0000006d, 0x00000009, 0x0000001f, 0x00020014, 0x00000071, 0x00040017,
+ 0x00000072, 0x00000071, 0x00000003, 0x0004002b, 0x00000006, 0x00000079, 0x00000003, 0x00040020,
+ 0x0000007a, 0x00000009, 0x00000008, 0x0004002b, 0x00000008, 0x00000083, 0x00000002, 0x0004002b,
+ 0x00000006, 0x00000086, 0x00000007, 0x0004002b, 0x00000006, 0x00000088, 0x00000008, 0x0004002b,
+ 0x00000006, 0x0000009f, 0x00000005, 0x00040020, 0x000000a0, 0x00000009, 0x00000021, 0x00040017,
+ 0x000000a3, 0x00000021, 0x00000003, 0x0004002b, 0x00000006, 0x000000a6, 0x00000006, 0x00040020,
+ 0x000000a7, 0x00000009, 0x00000022, 0x0004002b, 0x00000008, 0x000000ab, 0x00000003, 0x0003001d,
+ 0x000000b1, 0x00000008, 0x0003001e, 0x000000b2, 0x000000b1, 0x00040020, 0x000000b3, 0x0000000c,
+ 0x000000b2, 0x0004003b, 0x000000b3, 0x000000b4, 0x0000000c, 0x00040020, 0x000000b9, 0x0000000c,
+ 0x00000008, 0x0003001d, 0x000000d1, 0x00000008, 0x0003001e, 0x000000d2, 0x000000d1, 0x00040020,
+ 0x000000d3, 0x0000000c, 0x000000d2, 0x0004003b, 0x000000d3, 0x000000d4, 0x0000000c, 0x0004002b,
+ 0x00000021, 0x000000e7, 0x3f000000, 0x0004002b, 0x00000006, 0x000000ee, 0x00000004, 0x0003001d,
+ 0x000000f7, 0x00000021, 0x0003001e, 0x000000f8, 0x000000f7, 0x00040020, 0x000000f9, 0x0000000c,
+ 0x000000f8, 0x0004003b, 0x000000f9, 0x000000fa, 0x0000000c, 0x00040020, 0x000000ff, 0x0000000c,
+ 0x00000021, 0x0004002b, 0x00000006, 0x00000111, 0x00000002, 0x0003001d, 0x0000015d, 0x00000021,
+ 0x0003001e, 0x0000015e, 0x0000015d, 0x00040020, 0x0000015f, 0x0000000c, 0x0000015e, 0x0004003b,
+ 0x0000015f, 0x00000160, 0x0000000c, 0x0004002b, 0x00000008, 0x00000161, 0x00000006, 0x0004002b,
+ 0x00000021, 0x0000017c, 0x3f800000, 0x0004002b, 0x00000021, 0x000001b5, 0x00000000, 0x0004002b,
+ 0x00000008, 0x000001cd, 0x00000004, 0x0004002b, 0x00000008, 0x000001d9, 0x00000005, 0x0006002c,
+ 0x00000064, 0x0000029f, 0x00000026, 0x00000026, 0x00000026, 0x0006002c, 0x00000064, 0x000002a6,
+ 0x0000003a, 0x0000003a, 0x0000003a, 0x0004002b, 0x00000008, 0x00000315, 0x00000008, 0x0006002c,
+ 0x00000067, 0x00000316, 0x00000315, 0x00000315, 0x000001cd, 0x0006002c, 0x000000a3, 0x000003d4,
+ 0x000000e7, 0x000000e7, 0x000000e7, 0x00050036, 0x00000002, 0x00000004, 0x00000000, 0x00000003,
+ 0x000200f8, 0x00000005, 0x000300f7, 0x0000031f, 0x00000000, 0x000300fb, 0x00000027, 0x00000320,
+ 0x000200f8, 0x00000320, 0x0004003d, 0x00000067, 0x0000006a, 0x00000069, 0x0004007c, 0x00000064,
+ 0x0000006b, 0x0000006a, 0x00050041, 0x0000006d, 0x0000006e, 0x00000025, 0x00000026, 0x0004003d,
+ 0x0000001f, 0x0000006f, 0x0000006e, 0x0008004f, 0x00000064, 0x00000070, 0x0000006f, 0x0000006f,
+ 0x00000000, 0x00000001, 0x00000002, 0x000500af, 0x00000072, 0x00000073, 0x0000006b, 0x00000070,
+ 0x0004009a, 0x00000071, 0x00000074, 0x00000073, 0x000300f7, 0x00000076, 0x00000000, 0x000400fa,
+ 0x00000074, 0x00000075, 0x00000076, 0x000200f8, 0x00000075, 0x000200f9, 0x0000031f, 0x000200f8,
+ 0x00000076, 0x00060041, 0x0000007a, 0x0000007b, 0x00000025, 0x00000079, 0x00000027, 0x0004003d,
+ 0x00000008, 0x0000007c, 0x0000007b, 0x0004007c, 0x00000006, 0x0000007d, 0x0000007c, 0x00060041,
+ 0x0000007a, 0x0000007f, 0x00000025, 0x00000079, 0x0000002c, 0x0004003d, 0x00000008, 0x00000080,
+ 0x0000007f, 0x0004007c, 0x00000006, 0x00000081, 0x00000080, 0x00060041, 0x00000028, 0x00000084,
+ 0x00000025, 0x00000026, 0x00000083, 0x0004003d, 0x00000006, 0x00000085, 0x00000084, 0x00050080,
+ 0x00000006, 0x00000087, 0x00000085, 0x00000086, 0x00050087, 0x00000006, 0x00000089, 0x00000087,
+ 0x00000088, 0x00050084, 0x00000006, 0x0000008e, 0x0000007d, 0x00000081, 0x00050084, 0x00000006,
+ 0x00000090, 0x0000008e, 0x00000089, 0x0004007c, 0x00000008, 0x00000091, 0x00000090, 0x00050051,
+ 0x00000006, 0x00000095, 0x0000006b, 0x00000000, 0x00050051, 0x00000006, 0x00000098, 0x0000006b,
+ 0x00000001, 0x00050051, 0x00000006, 0x0000009b, 0x0000006b, 0x00000002, 0x00060041, 0x00000028,
+ 0x00000327, 0x00000025, 0x00000026, 0x00000027, 0x0004003d, 0x00000006, 0x00000328, 0x00000327,
+ 0x00060041, 0x00000028, 0x0000032a, 0x00000025, 0x00000026, 0x0000002c, 0x0004003d, 0x00000006,
+ 0x0000032b, 0x0000032a, 0x00050084, 0x00000006, 0x0000032d, 0x0000032b, 0x0000009b, 0x00050080,
+ 0x00000006, 0x0000032e, 0x00000098, 0x0000032d, 0x00050084, 0x00000006, 0x0000032f, 0x00000328,
+ 0x0000032e, 0x00050080, 0x00000006, 0x00000330, 0x00000095, 0x0000032f, 0x0004007c, 0x00000008,
+ 0x00000331, 0x00000330, 0x00060041, 0x000000a0, 0x000000a1, 0x00000025, 0x0000009f, 0x00000083,
+ 0x0004003d, 0x00000021, 0x000000a2, 0x000000a1, 0x00050041, 0x000000a7, 0x000000a8, 0x00000025,
+ 0x000000a6, 0x0004003d, 0x00000022, 0x000000a9, 0x000000a8, 0x0008004f, 0x000000a3, 0x000000aa,
+ 0x000000a9, 0x000000a9, 0x00000000, 0x00000001, 0x00000002, 0x00060041, 0x00000028, 0x000000ac,
+ 0x00000025, 0x00000026, 0x000000ab, 0x0004003d, 0x00000006, 0x000000ad, 0x000000ac, 0x000500aa,
+ 0x00000071, 0x000000ae, 0x000000ad, 0x00000026, 0x000300f7, 0x000000b0, 0x00000000, 0x000400fa,
+ 0x000000ae, 0x000000af, 0x00000203, 0x000200f8, 0x000000af, 0x00060041, 0x0000007a, 0x000000b5,
+ 0x00000025, 0x00000079, 0x000000ab, 0x0004003d, 0x00000008, 0x000000b6, 0x000000b5, 0x00050080,
+ 0x00000008, 0x000000b8, 0x000000b6, 0x00000331, 0x00060041, 0x000000b9, 0x000000ba, 0x000000b4,
+ 0x00000026, 0x000000b8, 0x0004003d, 0x00000008, 0x000000bb, 0x000000ba, 0x000500ab, 0x00000071,
+ 0x000000bc, 0x000000bb, 0x00000027, 0x000300f7, 0x000000be, 0x00000000, 0x000400fa, 0x000000bc,
+ 0x000000bd, 0x000000be, 0x000200f8, 0x000000bd, 0x000200f9, 0x0000031f, 0x000200f8, 0x000000be,
+ 0x000500c3, 0x00000006, 0x000000c3, 0x00000095, 0x00000079, 0x000500c3, 0x00000006, 0x000000c7,
+ 0x00000098, 0x00000079, 0x000500c3, 0x00000006, 0x000000cb, 0x0000009b, 0x00000079, 0x00050084,
+ 0x00000006, 0x000000cc, 0x00000081, 0x000000cb, 0x00050080, 0x00000006, 0x000000cd, 0x000000c7,
+ 0x000000cc, 0x00050084, 0x00000006, 0x000000ce, 0x0000007d, 0x000000cd, 0x00050080, 0x00000006,
+ 0x000000cf, 0x000000c3, 0x000000ce, 0x00060041, 0x000000b9, 0x000000d6, 0x000000d4, 0x00000026,
+ 0x000000cf, 0x0004003d, 0x00000008, 0x000000d7, 0x000000d6, 0x00050080, 0x00000006, 0x000000da,
+ 0x000000cf, 0x0000003a, 0x00060041, 0x000000b9, 0x000000db, 0x000000d4, 0x00000026, 0x000000da,
+ 0x0004003d, 0x00000008, 0x000000dc, 0x000000db, 0x000500aa, 0x00000071, 0x000000df, 0x000000d7,
+ 0x000000dc, 0x000300f7, 0x000000e1, 0x00000000, 0x000400fa, 0x000000df, 0x000000e0, 0x000000e1,
+ 0x000200f8, 0x000000e0, 0x000200f9, 0x0000031f, 0x000200f8, 0x000000e1, 0x0004006f, 0x000000a3,
+ 0x000000e6, 0x0000006b, 0x00050081, 0x000000a3, 0x000000e9, 0x000000e6, 0x000003d4, 0x0005008e,
+ 0x000000a3, 0x000000eb, 0x000000e9, 0x000000a2, 0x00050081, 0x000000a3, 0x000000ec, 0x000000aa,
+ 0x000000eb, 0x00060041, 0x000000a0, 0x000000ef, 0x00000025, 0x000000ee, 0x00000027, 0x0004003d,
+ 0x00000021, 0x000000f0, 0x000000ef, 0x00060041, 0x000000a0, 0x000000f3, 0x00000025, 0x0000009f,
+ 0x0000002c, 0x0004003d, 0x00000021, 0x000000f4, 0x000000f3, 0x00060041, 0x0000007a, 0x000000fb,
+ 0x00000025, 0x0000003a, 0x00000027, 0x0004003d, 0x00000008, 0x000000fc, 0x000000fb, 0x00050080,
+ 0x00000008, 0x000000fe, 0x000000fc, 0x00000331, 0x00060041, 0x000000ff, 0x00000100, 0x000000fa,
+ 0x00000026, 0x000000fe, 0x0004003d, 0x00000021, 0x00000101, 0x00000100, 0x00060041, 0x0000007a,
+ 0x00000103, 0x00000025, 0x0000003a, 0x0000002c, 0x0004003d, 0x00000008, 0x00000104, 0x00000103,
+ 0x00050080, 0x00000008, 0x00000106, 0x00000104, 0x00000331, 0x00060041, 0x000000ff, 0x00000107,
+ 0x000000fa, 0x00000026, 0x00000106, 0x0004003d, 0x00000021, 0x00000108, 0x00000107, 0x00060041,
+ 0x0000007a, 0x0000010a, 0x00000025, 0x0000003a, 0x00000083, 0x0004003d, 0x00000008, 0x0000010b,
+ 0x0000010a, 0x00050080, 0x00000008, 0x0000010d, 0x0000010b, 0x00000331, 0x00060041, 0x000000ff,
+ 0x0000010e, 0x000000fa, 0x00000026, 0x0000010d, 0x0004003d, 0x00000021, 0x0000010f, 0x0000010e,
+ 0x00060041, 0x0000007a, 0x00000112, 0x00000025, 0x00000111, 0x00000027, 0x0004003d, 0x00000008,
+ 0x00000113, 0x00000112, 0x00050080, 0x00000006, 0x00000337, 0x00000328, 0x0000003a, 0x00050084,
+ 0x00000006, 0x0000033e, 0x00000337, 0x0000032e, 0x00050080, 0x00000006, 0x0000033f, 0x00000095,
+ 0x0000033e, 0x0004007c, 0x00000008, 0x00000340, 0x0000033f, 0x00050080, 0x00000008, 0x0000011e,
+ 0x00000113, 0x00000340, 0x00060041, 0x0000007a, 0x00000120, 0x00000025, 0x00000111, 0x0000002c,
+ 0x0004003d, 0x00000008, 0x00000121, 0x00000120, 0x00050080, 0x00000006, 0x00000349, 0x0000032b,
+ 0x0000003a, 0x00050084, 0x00000006, 0x0000034b, 0x00000349, 0x0000009b, 0x00050080, 0x00000006,
+ 0x0000034c, 0x00000098, 0x0000034b, 0x00050084, 0x00000006, 0x0000034d, 0x00000328, 0x0000034c,
+ 0x00050080, 0x00000006, 0x0000034e, 0x00000095, 0x0000034d, 0x0004007c, 0x00000008, 0x0000034f,
+ 0x0000034e, 0x00050080, 0x00000008, 0x0000012c, 0x00000121, 0x0000034f, 0x00060041, 0x0000007a,
+ 0x0000012e, 0x00000025, 0x00000111, 0x00000083, 0x0004003d, 0x00000008, 0x0000012f, 0x0000012e,
+ 0x00050080, 0x00000008, 0x0000013a, 0x0000012f, 0x00000331, 0x00060041, 0x000000ff, 0x0000013d,
+ 0x000000fa, 0x00000026, 0x0000011e, 0x0004003d, 0x00000021, 0x0000013e, 0x0000013d, 0x00060041,
+ 0x000000ff, 0x00000141, 0x000000fa, 0x00000026, 0x0000012c, 0x0004003d, 0x00000021, 0x00000142,
+ 0x00000141, 0x00060041, 0x000000ff, 0x00000145, 0x000000fa, 0x00000026, 0x0000013a, 0x0004003d,
+ 0x00000021, 0x00000146, 0x00000145, 0x00060041, 0x000000a0, 0x00000148, 0x00000025, 0x0000009f,
+ 0x000000ab, 0x0004003d, 0x00000021, 0x00000149, 0x00000148, 0x000500ba, 0x00000071, 0x0000014a,
+ 0x00000149, 0x000000e7, 0x000200f9, 0x0000014d, 0x000200f8, 0x0000014d, 0x000700f5, 0x00000021,
+ 0x000003b1, 0x00000146, 0x000000e1, 0x000003d2, 0x00000150, 0x000700f5, 0x00000021, 0x000003b0,
+ 0x00000142, 0x000000e1, 0x000003d0, 0x00000150, 0x000700f5, 0x00000021, 0x000003af, 0x0000013e,
+ 0x000000e1, 0x000003ce, 0x00000150, 0x000700f5, 0x00000021, 0x000003ae, 0x0000010f, 0x000000e1,
+ 0x000003ca, 0x00000150, 0x000700f5, 0x00000021, 0x000003ad, 0x00000108, 0x000000e1, 0x000003c6,
+ 0x00000150, 0x000700f5, 0x00000021, 0x000003ac, 0x00000101, 0x000000e1, 0x000003c2, 0x00000150,
+ 0x000700f5, 0x00000008, 0x000003ab, 0x000000d7, 0x000000e1, 0x000001e4, 0x00000150, 0x000500b0,
+ 0x00000071, 0x00000154, 0x000003ab, 0x000000dc, 0x000400f6, 0x0000014f, 0x00000150, 0x00000000,
+ 0x000400fa, 0x00000154, 0x0000014e, 0x0000014f, 0x000200f8, 0x0000014e, 0x00050080, 0x00000008,
+ 0x00000157, 0x00000091, 0x0000002c, 0x00050080, 0x00000008, 0x00000159, 0x00000157, 0x000003ab,
+ 0x00060041, 0x000000b9, 0x0000015a, 0x000000d4, 0x00000026, 0x00000159, 0x0004003d, 0x00000008,
+ 0x0000015b, 0x0000015a, 0x00050084, 0x00000008, 0x00000163, 0x00000161, 0x0000015b, 0x00060041,
+ 0x000000ff, 0x00000164, 0x00000160, 0x00000026, 0x00000163, 0x0004003d, 0x00000021, 0x00000165,
+ 0x00000164, 0x00050080, 0x00000008, 0x00000168, 0x00000163, 0x0000002c, 0x00060041, 0x000000ff,
+ 0x00000169, 0x00000160, 0x00000026, 0x00000168, 0x0004003d, 0x00000021, 0x0000016a, 0x00000169,
+ 0x00050080, 0x00000008, 0x0000016d, 0x00000163, 0x00000083, 0x00060041, 0x000000ff, 0x0000016e,
+ 0x00000160, 0x00000026, 0x0000016d, 0x0004003d, 0x00000021, 0x0000016f, 0x0000016e, 0x00060050,
+ 0x000000a3, 0x00000170, 0x00000165, 0x0000016a, 0x0000016f, 0x00050083, 0x000000a3, 0x00000174,
+ 0x000000ec, 0x00000170, 0x00050094, 0x00000021, 0x00000178, 0x00000174, 0x00000174, 0x00050088,
+ 0x00000021, 0x0000017a, 0x00000178, 0x000000f0, 0x000500be, 0x00000071, 0x0000017d, 0x0000017a,
+ 0x0000017c, 0x000300f7, 0x0000017f, 0x00000000, 0x000400fa, 0x0000017d, 0x0000017e, 0x0000017f,
+ 0x000200f8, 0x0000017e, 0x000200f9, 0x00000150, 0x000200f8, 0x0000017f, 0x00050083, 0x00000021,
+ 0x00000183, 0x0000017c, 0x0000017a, 0x00050085, 0x00000021, 0x00000186, 0x00000183, 0x00000183,
+ 0x000500bd, 0x00000071, 0x00000188, 0x000000f4, 0x000000e7, 0x000300f7, 0x0000018a, 0x00000000,
+ 0x000400fa, 0x00000188, 0x00000189, 0x0000019d, 0x000200f8, 0x00000189, 0x00060041, 0x000000a0,
+ 0x0000018b, 0x00000025, 0x000000ee, 0x0000002c, 0x0004003d, 0x00000021, 0x0000018c, 0x0000018b,
+ 0x00050085, 0x00000021, 0x0000018e, 0x0000018c, 0x00000186, 0x00050081, 0x00000021, 0x00000190,
+ 0x000003ac, 0x0000018e, 0x00060041, 0x000000a0, 0x00000191, 0x00000025, 0x000000ee, 0x00000083,
+ 0x0004003d, 0x00000021, 0x00000192, 0x00000191, 0x00050085, 0x00000021, 0x00000194, 0x00000192,
+ 0x00000186, 0x00050081, 0x00000021, 0x00000196, 0x000003ad, 0x00000194, 0x00060041, 0x000000a0,
+ 0x00000197, 0x00000025, 0x000000ee, 0x000000ab, 0x0004003d, 0x00000021, 0x00000198, 0x00000197,
+ 0x00050085, 0x00000021, 0x0000019a, 0x00000198, 0x00000186, 0x00050081, 0x00000021, 0x0000019c,
+ 0x000003ae, 0x0000019a, 0x000200f9, 0x0000018a, 0x000200f8, 0x0000019d, 0x00060041, 0x000000a0,
+ 0x0000019f, 0x00000025, 0x000000ee, 0x0000002c, 0x0004003d, 0x00000021, 0x000001a0, 0x0000019f,
+ 0x00050085, 0x00000021, 0x000001a2, 0x000001a0, 0x00000186, 0x0007000c, 0x00000021, 0x000001a3,
+ 0x00000001, 0x00000028, 0x000003ac, 0x000001a2, 0x00060041, 0x000000a0, 0x000001a5, 0x00000025,
+ 0x000000ee, 0x00000083, 0x0004003d, 0x00000021, 0x000001a6, 0x000001a5, 0x00050085, 0x00000021,
+ 0x000001a8, 0x000001a6, 0x00000186, 0x0007000c, 0x00000021, 0x000001a9, 0x00000001, 0x00000028,
+ 0x000003ad, 0x000001a8, 0x00060041, 0x000000a0, 0x000001ab, 0x00000025, 0x000000ee, 0x000000ab,
+ 0x0004003d, 0x00000021, 0x000001ac, 0x000001ab, 0x00050085, 0x00000021, 0x000001ae, 0x000001ac,
+ 0x00000186, 0x0007000c, 0x00000021, 0x000001af, 0x00000001, 0x00000028, 0x000003ae, 0x000001ae,
+ 0x000200f9, 0x0000018a, 0x000200f8, 0x0000018a, 0x000700f5, 0x00000021, 0x000003cd, 0x0000019c,
+ 0x00000189, 0x000001af, 0x0000019d, 0x000700f5, 0x00000021, 0x000003c9, 0x00000196, 0x00000189,
+ 0x000001a9, 0x0000019d, 0x000700f5, 0x00000021, 0x000003c5, 0x00000190, 0x00000189, 0x000001a3,
+ 0x0000019d, 0x000300f7, 0x000001b2, 0x00000000, 0x000400fa, 0x0000014a, 0x000001b1, 0x000001b2,
+ 0x000200f8, 0x000001b1, 0x00060041, 0x000000a0, 0x000001b3, 0x00000025, 0x0000009f, 0x00000027,
+ 0x0004003d, 0x00000021, 0x000001b4, 0x000001b3, 0x000500ba, 0x00000071, 0x000001b6, 0x000001b4,
+ 0x000001b5, 0x000200f9, 0x000001b2, 0x000200f8, 0x000001b2, 0x000700f5, 0x00000071, 0x000001b7,
+ 0x0000014a, 0x0000018a, 0x000001b6, 0x000001b1, 0x000300f7, 0x000001b9, 0x00000000, 0x000400fa,
+ 0x000001b7, 0x000001b8, 0x000001b9, 0x000200f8, 0x000001b8, 0x00060041, 0x000000a0, 0x000001bc,
+ 0x00000025, 0x0000009f, 0x00000027, 0x0004003d, 0x00000021, 0x000001bd, 0x000001bc, 0x00050085,
+ 0x00000021, 0x000001be, 0x00000186, 0x000001bd, 0x0007000c, 0x00000021, 0x000001bf, 0x00000001,
+ 0x00000025, 0x0000017c, 0x000001be, 0x00050080, 0x00000008, 0x000001c2, 0x00000163, 0x000000ab,
+ 0x00060041, 0x000000ff, 0x000001c3, 0x00000160, 0x00000026, 0x000001c2, 0x0004003d, 0x00000021,
+ 0x000001c4, 0x000001c3, 0x00050083, 0x00000021, 0x000001c6, 0x000001c4, 0x000003af, 0x00050085,
+ 0x00000021, 0x000001c8, 0x000001c6, 0x000001bf, 0x00050081, 0x00000021, 0x000001ca, 0x000003af,
+ 0x000001c8, 0x00050080, 0x00000008, 0x000001ce, 0x00000163, 0x000001cd, 0x00060041, 0x000000ff,
+ 0x000001cf, 0x00000160, 0x00000026, 0x000001ce, 0x0004003d, 0x00000021, 0x000001d0, 0x000001cf,
+ 0x00050083, 0x00000021, 0x000001d2, 0x000001d0, 0x000003b0, 0x00050085, 0x00000021, 0x000001d4,
+ 0x000001d2, 0x000001bf, 0x00050081, 0x00000021, 0x000001d6, 0x000003b0, 0x000001d4, 0x00050080,
+ 0x00000008, 0x000001da, 0x00000163, 0x000001d9, 0x00060041, 0x000000ff, 0x000001db, 0x00000160,
+ 0x00000026, 0x000001da, 0x0004003d, 0x00000021, 0x000001dc, 0x000001db, 0x00050083, 0x00000021,
+ 0x000001de, 0x000001dc, 0x000003b1, 0x00050085, 0x00000021, 0x000001e0, 0x000001de, 0x000001bf,
+ 0x00050081, 0x00000021, 0x000001e2, 0x000003b1, 0x000001e0, 0x000200f9, 0x000001b9, 0x000200f8,
+ 0x000001b9, 0x000700f5, 0x00000021, 0x000003d3, 0x000003b1, 0x000001b2, 0x000001e2, 0x000001b8,
+ 0x000700f5, 0x00000021, 0x000003d1, 0x000003b0, 0x000001b2, 0x000001d6, 0x000001b8, 0x000700f5,
+ 0x00000021, 0x000003cf, 0x000003af, 0x000001b2, 0x000001ca, 0x000001b8, 0x000200f9, 0x00000150,
+ 0x000200f8, 0x00000150, 0x000700f5, 0x00000021, 0x000003d2, 0x000003b1, 0x0000017e, 0x000003d3,
+ 0x000001b9, 0x000700f5, 0x00000021, 0x000003d0, 0x000003b0, 0x0000017e, 0x000003d1, 0x000001b9,
+ 0x000700f5, 0x00000021, 0x000003ce, 0x000003af, 0x0000017e, 0x000003cf, 0x000001b9, 0x000700f5,
+ 0x00000021, 0x000003ca, 0x000003ae, 0x0000017e, 0x000003cd, 0x000001b9, 0x000700f5, 0x00000021,
+ 0x000003c6, 0x000003ad, 0x0000017e, 0x000003c9, 0x000001b9, 0x000700f5, 0x00000021, 0x000003c2,
+ 0x000003ac, 0x0000017e, 0x000003c5, 0x000001b9, 0x00050080, 0x00000008, 0x000001e4, 0x000003ab,
+ 0x0000003a, 0x000200f9, 0x0000014d, 0x000200f8, 0x0000014f, 0x0003003e, 0x00000100, 0x000003ac,
+ 0x0003003e, 0x00000107, 0x000003ad, 0x0003003e, 0x0000010e, 0x000003ae, 0x000300f7, 0x000001f9,
+ 0x00000000, 0x000400fa, 0x0000014a, 0x000001f8, 0x000001f9, 0x000200f8, 0x000001f8, 0x0003003e,
+ 0x0000013d, 0x000003af, 0x0003003e, 0x00000141, 0x000003b0, 0x0003003e, 0x00000145, 0x000003b1,
+ 0x000200f9, 0x000001f9, 0x000200f8, 0x000001f9, 0x000200f9, 0x000000b0, 0x000200f8, 0x00000203,
+ 0x000500c3, 0x00000006, 0x0000020a, 0x00000095, 0x00000079, 0x000500c3, 0x00000006, 0x0000020e,
+ 0x00000098, 0x00000079, 0x000500c3, 0x00000006, 0x00000212, 0x0000009b, 0x00000079, 0x000200f9,
+ 0x00000214, 0x000200f8, 0x00000214, 0x000700f5, 0x00000021, 0x0000037f, 0x000001b5, 0x00000203,
+ 0x000003be, 0x00000217, 0x000700f5, 0x00000021, 0x0000037e, 0x000001b5, 0x00000203, 0x000003bd,
+ 0x00000217, 0x000700f5, 0x00000021, 0x0000037d, 0x000001b5, 0x00000203, 0x000003bc, 0x00000217,
+ 0x000700f5, 0x00000006, 0x0000037c, 0x00000026, 0x00000203, 0x000002f9, 0x00000217, 0x000500b1,
+ 0x00000071, 0x0000021a, 0x0000037c, 0x00000088, 0x000400f6, 0x00000216, 0x00000217, 0x00000000,
+ 0x000400fa, 0x0000021a, 0x00000215, 0x00000216, 0x000200f8, 0x00000215, 0x000500c7, 0x00000006,
+ 0x0000021e, 0x0000037c, 0x0000003a, 0x00050082, 0x00000006, 0x0000021f, 0x0000020a, 0x0000021e,
+ 0x000500c3, 0x00000006, 0x00000223, 0x0000037c, 0x0000003a, 0x000500c7, 0x00000006, 0x00000224,
+ 0x00000223, 0x0000003a, 0x00050082, 0x00000006, 0x00000225, 0x0000020e, 0x00000224, 0x000500c3,
+ 0x00000006, 0x00000229, 0x0000037c, 0x00000111, 0x000500c7, 0x00000006, 0x0000022a, 0x00000229,
+ 0x0000003a, 0x00050082, 0x00000006, 0x0000022b, 0x00000212, 0x0000022a, 0x000500b1, 0x00000071,
+ 0x0000022d, 0x0000021f, 0x00000026, 0x000500b1, 0x00000071, 0x0000022f, 0x00000225, 0x00000026,
+ 0x000500a6, 0x00000071, 0x00000230, 0x0000022d, 0x0000022f, 0x000500b1, 0x00000071, 0x00000232,
+ 0x0000022b, 0x00000026, 0x000500a6, 0x00000071, 0x00000233, 0x00000230, 0x00000232, 0x000300f7,
+ 0x00000235, 0x00000000, 0x000400fa, 0x00000233, 0x00000234, 0x00000235, 0x000200f8, 0x00000234,
+ 0x000200f9, 0x00000217, 0x000200f8, 0x00000235, 0x000500ab, 0x00000071, 0x00000239, 0x0000021e,
+ 0x00000026, 0x000300f7, 0x0000023b, 0x00000000, 0x000400fa, 0x00000239, 0x0000023a, 0x0000023b,
+ 0x000200f8, 0x0000023a, 0x000500c7, 0x00000006, 0x0000023e, 0x00000095, 0x00000086, 0x000500ab,
+ 0x00000071, 0x0000023f, 0x0000023e, 0x00000026, 0x000200f9, 0x0000023b, 0x000200f8, 0x0000023b,
+ 0x000700f5, 0x00000071, 0x00000240, 0x00000239, 0x00000235, 0x0000023f, 0x0000023a, 0x000300f7,
+ 0x00000242, 0x00000000, 0x000400fa, 0x00000240, 0x00000241, 0x00000242, 0x000200f8, 0x00000241,
+ 0x000200f9, 0x00000217, 0x000200f8, 0x00000242, 0x000500c7, 0x00000006, 0x00000245, 0x0000037c,
+ 0x00000111, 0x000500ab, 0x00000071, 0x00000246, 0x00000245, 0x00000026, 0x000300f7, 0x00000248,
+ 0x00000000, 0x000400fa, 0x00000246, 0x00000247, 0x00000248, 0x000200f8, 0x00000247, 0x000500c7,
+ 0x00000006, 0x0000024b, 0x00000098, 0x00000086, 0x000500ab, 0x00000071, 0x0000024c, 0x0000024b,
+ 0x00000026, 0x000200f9, 0x00000248, 0x000200f8, 0x00000248, 0x000700f5, 0x00000071, 0x0000024d,
+ 0x00000246, 0x00000242, 0x0000024c, 0x00000247, 0x000300f7, 0x0000024f, 0x00000000, 0x000400fa,
+ 0x0000024d, 0x0000024e, 0x0000024f, 0x000200f8, 0x0000024e, 0x000200f9, 0x00000217, 0x000200f8,
+ 0x0000024f, 0x000500c7, 0x00000006, 0x00000252, 0x0000037c, 0x000000ee, 0x000500ab, 0x00000071,
+ 0x00000253, 0x00000252, 0x00000026, 0x000300f7, 0x00000255, 0x00000000, 0x000400fa, 0x00000253,
+ 0x00000254, 0x00000255, 0x000200f8, 0x00000254, 0x000500c7, 0x00000006, 0x00000258, 0x0000009b,
+ 0x00000086, 0x000500ab, 0x00000071, 0x00000259, 0x00000258, 0x00000026, 0x000200f9, 0x00000255,
+ 0x000200f8, 0x00000255, 0x000700f5, 0x00000071, 0x0000025a, 0x00000253, 0x0000024f, 0x00000259,
+ 0x00000254, 0x000300f7, 0x0000025c, 0x00000000, 0x000400fa, 0x0000025a, 0x0000025b, 0x0000025c,
+ 0x000200f8, 0x0000025b, 0x000200f9, 0x00000217, 0x000200f8, 0x0000025c, 0x00050084, 0x00000006,
+ 0x00000264, 0x00000081, 0x0000022b, 0x00050080, 0x00000006, 0x00000265, 0x00000225, 0x00000264,
+ 0x00050084, 0x00000006, 0x00000266, 0x0000007d, 0x00000265, 0x00050080, 0x00000006, 0x00000267,
+ 0x0000021f, 0x00000266, 0x0004007c, 0x00000008, 0x00000268, 0x00000267, 0x00060041, 0x000000b9,
+ 0x0000026b, 0x000000d4, 0x00000026, 0x00000268, 0x0004003d, 0x00000008, 0x0000026c, 0x0000026b,
+ 0x000200f9, 0x0000026d, 0x000200f8, 0x0000026d, 0x000700f5, 0x00000021, 0x0000039a, 0x0000037f,
+ 0x0000025c, 0x000003c1, 0x00000270, 0x000700f5, 0x00000021, 0x00000392, 0x0000037e, 0x0000025c,
+ 0x000003c0, 0x00000270, 0x000700f5, 0x00000021, 0x0000038a, 0x0000037d, 0x0000025c, 0x000003bf,
+ 0x00000270, 0x000700f5, 0x00000008, 0x00000382, 0x0000026c, 0x0000025c, 0x000002f7, 0x00000270,
+ 0x00050080, 0x00000008, 0x00000274, 0x00000268, 0x0000002c, 0x00060041, 0x000000b9, 0x00000275,
+ 0x000000d4, 0x00000026, 0x00000274, 0x0004003d, 0x00000008, 0x00000276, 0x00000275, 0x000500b0,
+ 0x00000071, 0x00000277, 0x00000382, 0x00000276, 0x000400f6, 0x0000026f, 0x00000270, 0x00000000,
+ 0x000400fa, 0x00000277, 0x0000026e, 0x0000026f, 0x000200f8, 0x0000026e, 0x00050080, 0x00000008,
+ 0x0000027a, 0x00000091, 0x0000002c, 0x00050080, 0x00000008, 0x0000027c, 0x0000027a, 0x00000382,
+ 0x00060041, 0x000000b9, 0x0000027d, 0x000000d4, 0x00000026, 0x0000027c, 0x0004003d, 0x00000008,
+ 0x0000027e, 0x0000027d, 0x00050084, 0x00000008, 0x00000281, 0x00000161, 0x0000027e, 0x00060041,
+ 0x000000ff, 0x00000282, 0x00000160, 0x00000026, 0x00000281, 0x0004003d, 0x00000021, 0x00000283,
+ 0x00000282, 0x00050080, 0x00000008, 0x00000286, 0x00000281, 0x0000002c, 0x00060041, 0x000000ff,
+ 0x00000287, 0x00000160, 0x00000026, 0x00000286, 0x0004003d, 0x00000021, 0x00000288, 0x00000287,
+ 0x00050080, 0x00000008, 0x0000028b, 0x00000281, 0x00000083, 0x00060041, 0x000000ff, 0x0000028c,
+ 0x00000160, 0x00000026, 0x0000028b, 0x0004003d, 0x00000021, 0x0000028d, 0x0000028c, 0x00060050,
+ 0x000000a3, 0x0000028e, 0x00000283, 0x00000288, 0x0000028d, 0x00050083, 0x000000a3, 0x00000290,
+ 0x0000028e, 0x000000aa, 0x00060050, 0x000000a3, 0x00000292, 0x000000a2, 0x000000a2, 0x000000a2,
+ 0x00050088, 0x000000a3, 0x00000293, 0x00000290, 0x00000292, 0x00050083, 0x000000a3, 0x00000295,
+ 0x00000293, 0x000003d4, 0x0006000c, 0x000000a3, 0x00000298, 0x00000001, 0x00000008, 0x00000295,
+ 0x0004006e, 0x00000064, 0x0000029c, 0x00000298, 0x00050082, 0x00000064, 0x0000029d, 0x0000006b,
+ 0x0000029c, 0x000500b1, 0x00000072, 0x000002a0, 0x0000029d, 0x0000029f, 0x0004009a, 0x00000071,
+ 0x000002a1, 0x000002a0, 0x000400a8, 0x00000071, 0x000002a2, 0x000002a1, 0x000300f7, 0x000002a4,
+ 0x00000000, 0x000400fa, 0x000002a2, 0x000002a3, 0x000002a4, 0x000200f8, 0x000002a3, 0x000500ad,
+ 0x00000072, 0x000002a7, 0x0000029d, 0x000002a6, 0x0004009a, 0x00000071, 0x000002a8, 0x000002a7,
+ 0x000200f9, 0x000002a4, 0x000200f8, 0x000002a4, 0x000700f5, 0x00000071, 0x000002a9, 0x000002a1,
+ 0x0000026e, 0x000002a8, 0x000002a3, 0x000300f7, 0x000002ab, 0x00000000, 0x000400fa, 0x000002a9,
+ 0x000002aa, 0x000002ab, 0x000200f8, 0x000002aa, 0x000200f9, 0x00000270, 0x000200f8, 0x000002ab,
+ 0x00050083, 0x000000a3, 0x000002b0, 0x00000295, 0x00000298, 0x00050051, 0x00000006, 0x000002b3,
+ 0x0000029d, 0x00000000, 0x000500aa, 0x00000071, 0x000002b4, 0x000002b3, 0x0000003a, 0x000300f7,
+ 0x000002b7, 0x00000000, 0x000400fa, 0x000002b4, 0x000002b6, 0x000002ba, 0x000200f8, 0x000002b6,
+ 0x00050051, 0x00000021, 0x000002b9, 0x000002b0, 0x00000000, 0x000200f9, 0x000002b7, 0x000200f8,
+ 0x000002ba, 0x00050051, 0x00000021, 0x000002bc, 0x000002b0, 0x00000000, 0x00050083, 0x00000021,
+ 0x000002bd, 0x0000017c, 0x000002bc, 0x000200f9, 0x000002b7, 0x000200f8, 0x000002b7, 0x000700f5,
+ 0x00000021, 0x00000383, 0x000002b9, 0x000002b6, 0x000002bd, 0x000002ba, 0x00050051, 0x00000006,
+ 0x000002c0, 0x0000029d, 0x00000001, 0x000500aa, 0x00000071, 0x000002c1, 0x000002c0, 0x0000003a,
+ 0x000300f7, 0x000002c4, 0x00000000, 0x000400fa, 0x000002c1, 0x000002c3, 0x000002c7, 0x000200f8,
+ 0x000002c3, 0x00050051, 0x00000021, 0x000002c6, 0x000002b0, 0x00000001, 0x000200f9, 0x000002c4,
+ 0x000200f8, 0x000002c7, 0x00050051, 0x00000021, 0x000002c9, 0x000002b0, 0x00000001, 0x00050083,
+ 0x00000021, 0x000002ca, 0x0000017c, 0x000002c9, 0x000200f9, 0x000002c4, 0x000200f8, 0x000002c4,
+ 0x000700f5, 0x00000021, 0x00000384, 0x000002c6, 0x000002c3, 0x000002ca, 0x000002c7, 0x00050085,
+ 0x00000021, 0x000002cc, 0x00000383, 0x00000384, 0x00050051, 0x00000006, 0x000002ce, 0x0000029d,
+ 0x00000002, 0x000500aa, 0x00000071, 0x000002cf, 0x000002ce, 0x0000003a, 0x000300f7, 0x000002d2,
+ 0x00000000, 0x000400fa, 0x000002cf, 0x000002d1, 0x000002d5, 0x000200f8, 0x000002d1, 0x00050051,
+ 0x00000021, 0x000002d4, 0x000002b0, 0x00000002, 0x000200f9, 0x000002d2, 0x000200f8, 0x000002d5,
+ 0x00050051, 0x00000021, 0x000002d7, 0x000002b0, 0x00000002, 0x00050083, 0x00000021, 0x000002d8,
+ 0x0000017c, 0x000002d7, 0x000200f9, 0x000002d2, 0x000200f8, 0x000002d2, 0x000700f5, 0x00000021,
+ 0x00000385, 0x000002d4, 0x000002d1, 0x000002d8, 0x000002d5, 0x00050085, 0x00000021, 0x000002da,
+ 0x000002cc, 0x00000385, 0x00050080, 0x00000008, 0x000002dd, 0x00000281, 0x000000ab, 0x00060041,
+ 0x000000ff, 0x000002de, 0x00000160, 0x00000026, 0x000002dd, 0x0004003d, 0x00000021, 0x000002df,
+ 0x000002de, 0x00050085, 0x00000021, 0x000002e1, 0x000002df, 0x000002da, 0x00050081, 0x00000021,
+ 0x000002e3, 0x0000038a, 0x000002e1, 0x00050080, 0x00000008, 0x000002e6, 0x00000281, 0x000001cd,
+ 0x00060041, 0x000000ff, 0x000002e7, 0x00000160, 0x00000026, 0x000002e6, 0x0004003d, 0x00000021,
+ 0x000002e8, 0x000002e7, 0x00050085, 0x00000021, 0x000002ea, 0x000002e8, 0x000002da, 0x00050081,
+ 0x00000021, 0x000002ec, 0x00000392, 0x000002ea, 0x00050080, 0x00000008, 0x000002ef, 0x00000281,
+ 0x000001d9, 0x00060041, 0x000000ff, 0x000002f0, 0x00000160, 0x00000026, 0x000002ef, 0x0004003d,
+ 0x00000021, 0x000002f1, 0x000002f0, 0x00050085, 0x00000021, 0x000002f3, 0x000002f1, 0x000002da,
+ 0x00050081, 0x00000021, 0x000002f5, 0x0000039a, 0x000002f3, 0x000200f9, 0x00000270, 0x000200f8,
+ 0x00000270, 0x000700f5, 0x00000021, 0x000003c1, 0x0000039a, 0x000002aa, 0x000002f5, 0x000002d2,
+ 0x000700f5, 0x00000021, 0x000003c0, 0x00000392, 0x000002aa, 0x000002ec, 0x000002d2, 0x000700f5,
+ 0x00000021, 0x000003bf, 0x0000038a, 0x000002aa, 0x000002e3, 0x000002d2, 0x00050080, 0x00000008,
+ 0x000002f7, 0x00000382, 0x0000003a, 0x000200f9, 0x0000026d, 0x000200f8, 0x0000026f, 0x000200f9,
+ 0x00000217, 0x000200f8, 0x00000217, 0x000d00f5, 0x00000021, 0x000003be, 0x0000037f, 0x00000234,
+ 0x0000037f, 0x00000241, 0x0000037f, 0x0000024e, 0x0000037f, 0x0000025b, 0x0000039a, 0x0000026f,
+ 0x000d00f5, 0x00000021, 0x000003bd, 0x0000037e, 0x00000234, 0x0000037e, 0x00000241, 0x0000037e,
+ 0x0000024e, 0x0000037e, 0x0000025b, 0x00000392, 0x0000026f, 0x000d00f5, 0x00000021, 0x000003bc,
+ 0x0000037d, 0x00000234, 0x0000037d, 0x00000241, 0x0000037d, 0x0000024e, 0x0000037d, 0x0000025b,
+ 0x0000038a, 0x0000026f, 0x00050080, 0x00000006, 0x000002f9, 0x0000037c, 0x0000003a, 0x000200f9,
+ 0x00000214, 0x000200f8, 0x00000216, 0x00060041, 0x0000007a, 0x000002fa, 0x00000025, 0x0000003a,
+ 0x00000027, 0x0004003d, 0x00000008, 0x000002fb, 0x000002fa, 0x00050080, 0x00000008, 0x000002fd,
+ 0x000002fb, 0x00000331, 0x00060041, 0x000000ff, 0x000002ff, 0x000000fa, 0x00000026, 0x000002fd,
+ 0x0004003d, 0x00000021, 0x00000300, 0x000002ff, 0x00050081, 0x00000021, 0x00000301, 0x00000300,
+ 0x0000037d, 0x0003003e, 0x000002ff, 0x00000301, 0x00060041, 0x0000007a, 0x00000303, 0x00000025,
+ 0x0000003a, 0x0000002c, 0x0004003d, 0x00000008, 0x00000304, 0x00000303, 0x00050080, 0x00000008,
+ 0x00000306, 0x00000304, 0x00000331, 0x00060041, 0x000000ff, 0x00000308, 0x000000fa, 0x00000026,
+ 0x00000306, 0x0004003d, 0x00000021, 0x00000309, 0x00000308, 0x00050081, 0x00000021, 0x0000030a,
+ 0x00000309, 0x0000037e, 0x0003003e, 0x00000308, 0x0000030a, 0x00060041, 0x0000007a, 0x0000030c,
+ 0x00000025, 0x0000003a, 0x00000083, 0x0004003d, 0x00000008, 0x0000030d, 0x0000030c, 0x00050080,
+ 0x00000008, 0x0000030f, 0x0000030d, 0x00000331, 0x00060041, 0x000000ff, 0x00000311, 0x000000fa,
+ 0x00000026, 0x0000030f, 0x0004003d, 0x00000021, 0x00000312, 0x00000311, 0x00050081, 0x00000021,
+ 0x00000313, 0x00000312, 0x0000037f, 0x0003003e, 0x00000311, 0x00000313, 0x000200f9, 0x000000b0,
+ 0x000200f8, 0x000000b0, 0x000200f9, 0x0000031f, 0x000200f8, 0x0000031f, 0x000100fd, 0x00010038,
+};
+static const uint32_t spv_tilemax[] = {
+ 0x07230203, 0x00010300, 0x000d000b, 0x000000eb, 0x00000000, 0x00020011, 0x00000001, 0x0006000b,
+ 0x00000001, 0x4c534c47, 0x6474732e, 0x3035342e, 0x00000000, 0x0003000e, 0x00000000, 0x00000001,
+ 0x0009000f, 0x00000005, 0x00000004, 0x6e69616d, 0x00000000, 0x0000002d, 0x00000033, 0x000000a1,
+ 0x000000a4, 0x00060010, 0x00000004, 0x00000011, 0x00000008, 0x00000008, 0x00000008, 0x00030047,
+ 0x00000014, 0x00000002, 0x00050048, 0x00000014, 0x00000000, 0x00000023, 0x00000000, 0x00050048,
+ 0x00000014, 0x00000001, 0x00000023, 0x00000010, 0x00050048, 0x00000014, 0x00000002, 0x00000023,
+ 0x00000020, 0x00050048, 0x00000014, 0x00000003, 0x00000023, 0x00000030, 0x00050048, 0x00000014,
+ 0x00000004, 0x00000023, 0x00000040, 0x00050048, 0x00000014, 0x00000005, 0x00000023, 0x00000050,
+ 0x00050048, 0x00000014, 0x00000006, 0x00000023, 0x00000060, 0x00040047, 0x0000002d, 0x0000000b,
+ 0x0000001c, 0x00040047, 0x00000033, 0x0000000b, 0x0000001d, 0x00040047, 0x00000063, 0x00000006,
+ 0x00000004, 0x00030047, 0x00000064, 0x00000002, 0x00050048, 0x00000064, 0x00000000, 0x00000023,
+ 0x00000000, 0x00040047, 0x00000066, 0x00000021, 0x00000000, 0x00040047, 0x00000066, 0x00000022,
+ 0x00000000, 0x00040047, 0x000000a1, 0x0000000b, 0x0000001a, 0x00040047, 0x000000a4, 0x0000000b,
+ 0x00000018, 0x00040047, 0x000000a6, 0x00000006, 0x00000004, 0x00030047, 0x000000a7, 0x00000002,
+ 0x00050048, 0x000000a7, 0x00000000, 0x00000023, 0x00000000, 0x00040047, 0x000000a9, 0x00000021,
+ 0x00000003, 0x00040047, 0x000000a9, 0x00000022, 0x00000000, 0x00040047, 0x000000c0, 0x0000000b,
+ 0x00000019, 0x00020013, 0x00000002, 0x00030021, 0x00000003, 0x00000002, 0x00040015, 0x00000006,
+ 0x00000020, 0x00000001, 0x00040015, 0x00000008, 0x00000020, 0x00000000, 0x00040017, 0x00000010,
+ 0x00000006, 0x00000004, 0x00040017, 0x00000011, 0x00000008, 0x00000004, 0x00030016, 0x00000012,
+ 0x00000020, 0x00040017, 0x00000013, 0x00000012, 0x00000004, 0x0009001e, 0x00000014, 0x00000010,
+ 0x00000011, 0x00000011, 0x00000011, 0x00000013, 0x00000013, 0x00000013, 0x00040020, 0x00000015,
+ 0x00000009, 0x00000014, 0x0004003b, 0x00000015, 0x00000016, 0x00000009, 0x0004002b, 0x00000006,
+ 0x00000017, 0x00000000, 0x0004002b, 0x00000008, 0x00000018, 0x00000000, 0x00040020, 0x00000019,
+ 0x00000009, 0x00000006, 0x0004002b, 0x00000008, 0x0000001d, 0x00000001, 0x00040017, 0x00000028,
+ 0x00000006, 0x00000003, 0x00040017, 0x0000002b, 0x00000008, 0x00000003, 0x00040020, 0x0000002c,
+ 0x00000001, 0x0000002b, 0x0004003b, 0x0000002c, 0x0000002d, 0x00000001, 0x00040020, 0x00000032,
+ 0x00000001, 0x00000008, 0x0004003b, 0x00000032, 0x00000033, 0x00000001, 0x0004002b, 0x00000008,
+ 0x0000003b, 0x00000002, 0x0004002b, 0x00000012, 0x00000042, 0x00000000, 0x00040020, 0x00000044,
+ 0x00000009, 0x00000010, 0x00020014, 0x00000048, 0x00040017, 0x00000049, 0x00000048, 0x00000003,
+ 0x0004002b, 0x00000008, 0x00000060, 0x00000004, 0x0003001d, 0x00000063, 0x00000012, 0x0003001e,
+ 0x00000064, 0x00000063, 0x00040020, 0x00000065, 0x0000000c, 0x00000064, 0x0004003b, 0x00000065,
+ 0x00000066, 0x0000000c, 0x0004002b, 0x00000006, 0x00000067, 0x00000001, 0x00040020, 0x00000068,
+ 0x00000009, 0x00000008, 0x00040020, 0x00000071, 0x0000000c, 0x00000012, 0x0004002b, 0x00000008,
+ 0x00000077, 0x00000200, 0x0004001c, 0x00000078, 0x00000012, 0x00000077, 0x00040020, 0x00000079,
+ 0x00000004, 0x00000078, 0x0004003b, 0x00000079, 0x0000007a, 0x00000004, 0x00040020, 0x0000007d,
+ 0x00000004, 0x00000012, 0x0004002b, 0x00000008, 0x0000007f, 0x00000108, 0x0004002b, 0x00000008,
+ 0x00000081, 0x00000100, 0x0004003b, 0x0000002c, 0x000000a1, 0x00000001, 0x0004003b, 0x0000002c,
+ 0x000000a4, 0x00000001, 0x0003001d, 0x000000a6, 0x00000012, 0x0003001e, 0x000000a7, 0x000000a6,
+ 0x00040020, 0x000000a8, 0x0000000c, 0x000000a7, 0x0004003b, 0x000000a8, 0x000000a9, 0x0000000c,
+ 0x0004002b, 0x00000006, 0x000000aa, 0x00000003, 0x0004002b, 0x00000008, 0x000000bf, 0x00000008,
+ 0x0006002c, 0x0000002b, 0x000000c0, 0x000000bf, 0x000000bf, 0x000000bf, 0x00050036, 0x00000002,
+ 0x00000004, 0x00000000, 0x00000003, 0x000200f8, 0x00000005, 0x0004003d, 0x0000002b, 0x0000002e,
+ 0x0000002d, 0x0004007c, 0x00000028, 0x0000002f, 0x0000002e, 0x0004003d, 0x00000008, 0x00000034,
+ 0x00000033, 0x00060041, 0x00000019, 0x00000036, 0x00000016, 0x00000017, 0x00000018, 0x0004003d,
+ 0x00000006, 0x00000037, 0x00000036, 0x00060041, 0x00000019, 0x00000038, 0x00000016, 0x00000017,
+ 0x0000001d, 0x0004003d, 0x00000006, 0x00000039, 0x00000038, 0x00050084, 0x00000006, 0x0000003a,
+ 0x00000037, 0x00000039, 0x00060041, 0x00000019, 0x0000003c, 0x00000016, 0x00000017, 0x0000003b,
+ 0x0004003d, 0x00000006, 0x0000003d, 0x0000003c, 0x00050084, 0x00000006, 0x0000003e, 0x0000003a,
+ 0x0000003d, 0x0004007c, 0x00000008, 0x0000003f, 0x0000003e, 0x00050041, 0x00000044, 0x00000045,
+ 0x00000016, 0x00000017, 0x0004003d, 0x00000010, 0x00000046, 0x00000045, 0x0008004f, 0x00000028,
+ 0x00000047, 0x00000046, 0x00000046, 0x00000000, 0x00000001, 0x00000002, 0x000500b1, 0x00000049,
+ 0x0000004a, 0x0000002f, 0x00000047, 0x0004009b, 0x00000048, 0x0000004b, 0x0000004a, 0x000300f7,
+ 0x0000004d, 0x00000000, 0x000400fa, 0x0000004b, 0x0000004c, 0x0000004d, 0x000200f8, 0x0000004c,
+ 0x00050051, 0x00000006, 0x00000051, 0x0000002f, 0x00000000, 0x00050051, 0x00000006, 0x00000054,
+ 0x0000002f, 0x00000001, 0x00050051, 0x00000006, 0x00000057, 0x0000002f, 0x00000002, 0x00050084,
+ 0x00000006, 0x000000da, 0x00000039, 0x00000057, 0x00050080, 0x00000006, 0x000000db, 0x00000054,
+ 0x000000da, 0x00050084, 0x00000006, 0x000000dc, 0x00000037, 0x000000db, 0x00050080, 0x00000006,
+ 0x000000dd, 0x00000051, 0x000000dc, 0x0004007c, 0x00000008, 0x000000de, 0x000000dd, 0x000200f9,
+ 0x0000005a, 0x000200f8, 0x0000005a, 0x000700f5, 0x00000012, 0x000000e9, 0x00000042, 0x0000004c,
+ 0x00000074, 0x0000005b, 0x000700f5, 0x00000008, 0x000000e7, 0x00000018, 0x0000004c, 0x00000076,
+ 0x0000005b, 0x000500b0, 0x00000048, 0x00000061, 0x000000e7, 0x00000060, 0x000400f6, 0x0000005c,
+ 0x0000005b, 0x00000000, 0x000400fa, 0x00000061, 0x0000005b, 0x0000005c, 0x000200f8, 0x0000005b,
+ 0x00060041, 0x00000068, 0x00000069, 0x00000016, 0x00000067, 0x00000018, 0x0004003d, 0x00000008,
+ 0x0000006a, 0x00000069, 0x00050084, 0x00000008, 0x0000006d, 0x000000e7, 0x0000003f, 0x00050080,
+ 0x00000008, 0x0000006e, 0x0000006a, 0x0000006d, 0x00050080, 0x00000008, 0x00000070, 0x0000006e,
+ 0x000000de, 0x00060041, 0x00000071, 0x00000072, 0x00000066, 0x00000017, 0x00000070, 0x0004003d,
+ 0x00000012, 0x00000073, 0x00000072, 0x0007000c, 0x00000012, 0x00000074, 0x00000001, 0x00000028,
+ 0x000000e9, 0x00000073, 0x00050080, 0x00000008, 0x00000076, 0x000000e7, 0x00000067, 0x000200f9,
+ 0x0000005a, 0x000200f8, 0x0000005c, 0x000200f9, 0x0000004d, 0x000200f8, 0x0000004d, 0x000700f5,
+ 0x00000012, 0x000000e8, 0x00000042, 0x00000005, 0x000000e9, 0x0000005c, 0x00050041, 0x0000007d,
+ 0x0000007e, 0x0000007a, 0x00000034, 0x0003003e, 0x0000007e, 0x000000e8, 0x000400e0, 0x0000003b,
+ 0x0000003b, 0x0000007f, 0x000200f9, 0x00000082, 0x000200f8, 0x00000082, 0x000700f5, 0x00000008,
+ 0x000000ea, 0x00000081, 0x0000004d, 0x0000009a, 0x00000085, 0x000500ac, 0x00000048, 0x00000088,
+ 0x000000ea, 0x00000018, 0x000400f6, 0x00000084, 0x00000085, 0x00000000, 0x000400fa, 0x00000088,
+ 0x00000083, 0x00000084, 0x000200f8, 0x00000083, 0x000500b0, 0x00000048, 0x0000008b, 0x00000034,
+ 0x000000ea, 0x000300f7, 0x0000008d, 0x00000000, 0x000400fa, 0x0000008b, 0x0000008c, 0x0000008d,
+ 0x000200f8, 0x0000008c, 0x0004003d, 0x00000012, 0x00000091, 0x0000007e, 0x00050080, 0x00000008,
+ 0x00000094, 0x00000034, 0x000000ea, 0x00050041, 0x0000007d, 0x00000095, 0x0000007a, 0x00000094,
+ 0x0004003d, 0x00000012, 0x00000096, 0x00000095, 0x0007000c, 0x00000012, 0x00000097, 0x00000001,
+ 0x00000028, 0x00000091, 0x00000096, 0x0003003e, 0x0000007e, 0x00000097, 0x000200f9, 0x0000008d,
+ 0x000200f8, 0x0000008d, 0x000400e0, 0x0000003b, 0x0000003b, 0x0000007f, 0x000200f9, 0x00000085,
+ 0x000200f8, 0x00000085, 0x000500c2, 0x00000008, 0x0000009a, 0x000000ea, 0x00000067, 0x000200f9,
+ 0x00000082, 0x000200f8, 0x00000084, 0x000500aa, 0x00000048, 0x0000009c, 0x00000034, 0x00000018,
+ 0x000300f7, 0x0000009e, 0x00000000, 0x000400fa, 0x0000009c, 0x0000009d, 0x0000009e, 0x000200f8,
+ 0x0000009d, 0x0004003d, 0x0000002b, 0x000000a2, 0x000000a1, 0x0004003d, 0x0000002b, 0x000000a5,
+ 0x000000a4, 0x00060041, 0x00000068, 0x000000ab, 0x00000016, 0x000000aa, 0x00000018, 0x0004003d,
+ 0x00000008, 0x000000ac, 0x000000ab, 0x00050051, 0x00000008, 0x000000ae, 0x000000a2, 0x00000000,
+ 0x00050080, 0x00000008, 0x000000af, 0x000000ac, 0x000000ae, 0x00050051, 0x00000008, 0x000000b1,
+ 0x000000a5, 0x00000000, 0x00050051, 0x00000008, 0x000000b3, 0x000000a2, 0x00000001, 0x00050051,
+ 0x00000008, 0x000000b5, 0x000000a5, 0x00000001, 0x00050051, 0x00000008, 0x000000b7, 0x000000a2,
+ 0x00000002, 0x00050084, 0x00000008, 0x000000b8, 0x000000b5, 0x000000b7, 0x00050080, 0x00000008,
+ 0x000000b9, 0x000000b3, 0x000000b8, 0x00050084, 0x00000008, 0x000000ba, 0x000000b1, 0x000000b9,
+ 0x00050080, 0x00000008, 0x000000bb, 0x000000af, 0x000000ba, 0x00050041, 0x0000007d, 0x000000bc,
+ 0x0000007a, 0x00000017, 0x0004003d, 0x00000012, 0x000000bd, 0x000000bc, 0x00060041, 0x00000071,
+ 0x000000be, 0x000000a9, 0x00000017, 0x000000bb, 0x0003003e, 0x000000be, 0x000000bd, 0x000200f9,
+ 0x0000009e, 0x000200f8, 0x0000009e, 0x000100fd, 0x00010038,
+};
diff --git a/vendor/nova-fx/docs/examples/campfire_night.webp b/vendor/nova-fx/docs/examples/campfire_night.webp
new file mode 100644
index 0000000..f69746d
Binary files /dev/null and b/vendor/nova-fx/docs/examples/campfire_night.webp differ
diff --git a/vendor/nova-fx/docs/examples/explosion_sequence.webp b/vendor/nova-fx/docs/examples/explosion_sequence.webp
new file mode 100644
index 0000000..cb089dd
Binary files /dev/null and b/vendor/nova-fx/docs/examples/explosion_sequence.webp differ
diff --git a/vendor/nova-fx/docs/examples/fireworks_lake.webp b/vendor/nova-fx/docs/examples/fireworks_lake.webp
new file mode 100644
index 0000000..8972e54
Binary files /dev/null and b/vendor/nova-fx/docs/examples/fireworks_lake.webp differ
diff --git a/vendor/nova-fx/docs/examples/grinder_monkey.webp b/vendor/nova-fx/docs/examples/grinder_monkey.webp
new file mode 100644
index 0000000..abc65c2
Binary files /dev/null and b/vendor/nova-fx/docs/examples/grinder_monkey.webp differ
diff --git a/vendor/nova-fx/docs/examples/magic_wand.webp b/vendor/nova-fx/docs/examples/magic_wand.webp
new file mode 100644
index 0000000..336bca1
Binary files /dev/null and b/vendor/nova-fx/docs/examples/magic_wand.webp differ
diff --git a/vendor/nova-fx/docs/examples/meteor_shower.webp b/vendor/nova-fx/docs/examples/meteor_shower.webp
new file mode 100644
index 0000000..7e84fbb
Binary files /dev/null and b/vendor/nova-fx/docs/examples/meteor_shower.webp differ
diff --git a/vendor/nova-fx/docs/examples/sparkler_bokeh.webp b/vendor/nova-fx/docs/examples/sparkler_bokeh.webp
new file mode 100644
index 0000000..a5151a9
Binary files /dev/null and b/vendor/nova-fx/docs/examples/sparkler_bokeh.webp differ
diff --git a/vendor/nova-fx/docs/presets.png b/vendor/nova-fx/docs/presets.png
new file mode 100644
index 0000000..ff4b2d1
Binary files /dev/null and b/vendor/nova-fx/docs/presets.png differ
diff --git a/web/app.css b/web/app.css
index 3e0a6e1..998765a 100644
--- a/web/app.css
+++ b/web/app.css
@@ -232,3 +232,8 @@ details > summary { cursor: pointer; color: var(--muted); font-size: 13px; paddi
.row .end .chip { display: none; }
h1 { font-size: 22px; }
}
+
+/* Setup */
+.tool-row { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
+.tool-row .chip { white-space: normal; }
+.setup-log { max-height: 220px; overflow: auto; background: var(--raise); border-radius: 8px; padding: 8px 10px; margin-top: 8px; font-size: 12px; line-height: 1.45; white-space: pre-wrap; word-break: break-all; }
diff --git a/web/app.js b/web/app.js
index 17fa3bb..dcbaf43 100644
--- a/web/app.js
+++ b/web/app.js
@@ -60,8 +60,8 @@ const store = {
del(k) { try { localStorage.removeItem(k); } catch { /* private mode */ } },
};
const BACKEND_NAMES = { 'claude-code': 'Claude Code', 'anthropic-api': 'Claude API', demo: 'Demo' };
-const ICONS = { approved: ['✓', 'done'], done: ['✓', 'done'], in_review: ['●', 'review'], changes: ['↺', 'changes'], working: ['…', ''], ready: ['○', ''], blocked: ['·', ''] };
-const STATE_WORDS = { approved: 'approved', done: 'done', in_review: 'waiting for you', changes: 'changes asked', working: 'in progress', ready: 'up next', blocked: 'later' };
+const ICONS = { approved: ['✓', 'done'], done: ['✓', 'done'], skipped: ['–', ''], in_review: ['●', 'review'], changes: ['↺', 'changes'], working: ['…', ''], ready: ['○', ''], blocked: ['·', ''] };
+const STATE_WORDS = { approved: 'approved', done: 'done', skipped: 'skipped', in_review: 'waiting for you', changes: 'changes asked', working: 'in progress', ready: 'up next', blocked: 'later' };
const icon = (state) => { const [g, c] = ICONS[state] || ['·', '']; return h('span', { class: `ico ${c}`, 'aria-hidden': 'true' }, g); };
// ---------- routing ----------
@@ -239,7 +239,7 @@ async function projectView(id) {
const questions = openQs.length ? h('section', null, h('h2', null, 'Questions'), openQs.map((q) => questionForm(id, q))) : null;
const subsByStep = (key) => d.submissions.filter((s) => s.step === key);
- const steps = h('section', null, h('h2', null, 'Steps', h('span', { class: 'count' }, `${d.steps.filter((s) => ['approved', 'done'].includes(s.state)).length}/${d.steps.length}`)),
+ const steps = h('section', null, h('h2', null, 'Steps', h('span', { class: 'count' }, `${d.steps.filter((s) => ['approved', 'done', 'skipped'].includes(s.state)).length}/${d.steps.length}`)),
h('ul', { class: 'rows' }, d.steps.map((s) => h('li', { class: 'row' }, icon(s.state),
h('div', { class: 'main' }, h('span', { class: 'title' }, s.name),
h('div', { class: 'meta' }, s.review === 'internal' ? 'made in the studio' : `you review ${s.review === 'frames' ? 'the frames' : s.review === 'questions' ? 'questions' : `the ${s.review}`}`,
@@ -272,7 +272,7 @@ async function projectView(id) {
h('div', { class: 'head' }, h('div', null, h('h1', null, p.title), h('div', { class: 'sub' }, h('span', { class: 'chip' }, d.pipeline.name), h('span', null, p.backend ? `${BACKEND_NAMES[p.backend]} backend` : ''))), actions),
stateBlock, deliverables, questions, steps, activity, brief, events, journal,
h('p', { class: 'meta', style: { color: 'var(--faint)', fontSize: '12px', marginTop: '18px' } },
- `${usage.sessions} session${usage.sessions === 1 ? '' : 's'}${usage.output_tokens ? ` · ${usage.output_tokens.toLocaleString()} output tokens` : ''}${usage.cost_usd ? ` · $${usage.cost_usd}` : ''}`),
+ `${usage.sessions} session${usage.sessions === 1 ? '' : 's'}${usage.output_tokens ? ` · ${usage.output_tokens.toLocaleString()} output tokens` : ''}${usage.cost_text ? ` · ${usage.cost_text}` : ''}`),
);
for (const det of document.querySelectorAll('details[data-key]')) if (open.has(det.dataset.key)) det.open = true;
log.scrollTop = log.scrollHeight;
@@ -635,7 +635,7 @@ async function settingsView() {
const decideCheck = (cid, approve) => async () => { try { await api(`/api/checks/${cid}`, { method: 'POST', body: { approve } }); settingsView(); } catch (e) { toast(e.message, true); } };
const voiceBlock = await voiceSection();
- add(body,
+ add(body, await setupSection(),
h('section', null, h('h2', null, 'Who makes the videos'), h('ul', { class: 'rows' }, backendRows), extra,
field('Session limit', h('input', { type: 'number', min: 5, max: 1440, value: c.maxSessionMinutes, oninput: (e) => { c.maxSessionMinutes = e.target.value; }, style: { maxWidth: '120px' } }), 'Minutes before a session is stopped (the next one picks up from its handoff).'),
h('div', { class: 'form-end' }, msg, save)),
@@ -652,6 +652,86 @@ async function settingsView() {
draw();
}
+// ---------- setup (Settings › Setup): every part, why it's needed, what it installs ----------
+
+async function setupSection() {
+ const wrap = h('section', { id: 'setup' });
+ let info = await api('/api/setup');
+ let poll = null;
+ const field = (label, control, help) => h('div', { class: 'field' }, h('label', null, label), h('div', null, control, help ? h('div', { class: 'help' }, help) : null));
+ const chip = (ok, yes, no, neutral = false) => h('span', { class: `chip ${ok ? 'ok' : neutral ? '' : 'bad'}` }, ok ? yes : no);
+ const refresh = async () => { info = await api('/api/setup'); draw(); };
+
+ // One tool: its status, what installing it means, an Install button and the live log while it runs.
+ const UPDATABLE = ['strudel', 'browser-harness', 'blender-addons']; // the others are reused when found
+ const toolRow = (id, label = info.tools[id].name) => {
+ const st = info.status[id];
+ const t = info.tools[id];
+ const job = info.jobs[id];
+ const running = job?.state === 'running';
+ const btn = h('button', { class: 'btn', disabled: running || Object.values(info.jobs).some((j) => j.state === 'running'), onclick: async () => {
+ try { await api(`/api/setup/install/${id}`, { method: 'POST' }); await refresh(); startPoll(); } catch (e) { toast(e.message, true); }
+ } }, running ? 'Installing…' : st.ok ? 'Update' : 'Install');
+ const log = job ? h('pre', { class: 'setup-log' }, job.log.join('\n') || '…') : null;
+ if (log) setTimeout(() => { log.scrollTop = log.scrollHeight; });
+ return h('div', { class: 'tool-row' },
+ h('div', { class: 'actions' }, h('b', null, label), chip(st.ok, st.detail, st.detail), !st.ok || UPDATABLE.includes(id) || running ? btn : null),
+ h('div', { class: 'help' }, `${t.what}. Goes to ${t.where} (${t.size}).`),
+ job?.state === 'failed' ? h('div', { class: 'err' }, job.error) : null,
+ job?.problems ? h('div', { class: 'err' }, job.problems) : null,
+ log);
+ };
+ const startPoll = () => {
+ clearInterval(poll);
+ poll = setInterval(async () => {
+ if (!document.body.contains(wrap)) return clearInterval(poll);
+ await refresh();
+ if (!Object.values(info.jobs).some((j) => j.state === 'running')) { clearInterval(poll); loadStudio(); }
+ }, 1200);
+ };
+
+ function draw() {
+ const st = info.status;
+ const part = (id) => info.parts.find((x) => x.id === id);
+ const intro = (id) => [h('p', null, part(id).why), h('p', { class: 'meta' }, part(id).needs)];
+ let sites = st.assets.sites.map((x) => x.url).join('\n');
+ fill(wrap,
+ h('h2', null, 'Setup'),
+ h('p', { class: 'meta' }, 'What the studio uses, why, and what it installs. Everything goes into the studio folder (or your own user tools), never system-wide, and nothing installs until you press Install.'),
+ field(part('claude').title, h('div', null, ...intro('claude'), h('p', { class: 'meta' }, 'Choose below, in "Who makes the videos".'))),
+ field(part('narration').title, h('div', null, ...intro('narration'),
+ h('p', { class: 'meta' }, `This computer: ${st.gpu.reason}`),
+ st.gpu.fits ? toolRow('comfyui') : null,
+ h('p', { class: 'meta' }, 'Pick the voice below, in "Narration".'))),
+ field(part('music').title, h('div', null, ...intro('music'),
+ choiceChips(['Original score', 'No music'], st.music.engine === 'none' ? 'No music' : 'Original score', async (v) => { info = await api('/api/setup/music', { method: 'PUT', body: { engine: v === 'No music' ? 'none' : 'strudel' } }); draw(); }),
+ st.music.engine === 'none' ? null : h('div', null,
+ h('label', { class: 'toggle' }, h('input', { type: 'checkbox', checked: st.music.midi, onchange: async (e) => { info = await api('/api/setup/music', { method: 'PUT', body: { midi: e.target.checked } }); draw(); } }),
+ 'Also deliver a MIDI pack (every part, the stems and a cue sheet) to remake the music in your own DAW'),
+ toolRow('strudel'), toolRow('chrome')))),
+ field(part('assets').title, h('div', null, ...intro('assets'),
+ h('p', null, 'If you have a website you use for assets, list it here, one per line. Without one, you won\'t get stock assets: sessions make every visual themselves.'),
+ h('textarea', { rows: 3, placeholder: 'https://…', value: sites, oninput: (e) => { sites = e.target.value; } }),
+ h('div', { class: 'actions', style: { marginTop: '8px' } }, h('button', { class: 'btn', onclick: async () => {
+ try { info = await api('/api/setup/assets', { method: 'PUT', body: { sites: sites.split(/\n+/).map((x) => x.trim()).filter(Boolean) } }); draw(); toast('Asset sites saved'); } catch (e) { toast(e.message, true); }
+ } }, 'Save sites')),
+ st.assets.sites.length ? h('div', null, toolRow('browser-harness'),
+ st['browser-harness'].ok && info.recordings ? h('label', { class: 'toggle' }, h('input', { type: 'checkbox', checked: /enabled/i.test(info.recordings) && !/disabled/i.test(info.recordings), onchange: async (e) => { info = await api('/api/setup/recordings', { method: 'PUT', body: { enable: e.target.checked } }); draw(); } }),
+ 'Keep local browser recordings (screenshots and traces of what sessions do, on this machine only)') : null,
+ h('p', { class: 'meta' }, 'Sessions use your own Chrome: sign in to these sites there. The first time, Chrome may ask you to allow remote debugging (chrome://inspect/#remote-debugging).')) : null)),
+ field(part('3d').title, h('div', null, ...intro('3d'),
+ toolRow('blender'),
+ st.blender.ok ? toolRow('blender-addons') : null,
+ st.blender.ok ? h('ul', { class: 'checks-list' }, info.addons.map((a) => h('li', null, h('span', null, h('b', null, a.name), h('span', { class: 'meta' }, ` · ${a.about}`))))) : null,
+ st['blender-addons'].installed?.length ? h('div', { class: 'actions' }, h('button', { class: 'btn', onclick: async () => { try { await api('/api/setup/blender', { method: 'POST' }); toast('Opening Blender'); } catch (e) { toast(e.message, true); } } }, 'Open the studio\'s Blender'),
+ h('span', { class: 'meta' }, 'Camera Flight: 3D Viewport › N › Flight')) : null)),
+ );
+ }
+ draw();
+ if (Object.values(info.jobs).some((j) => j.state === 'running')) startPoll();
+ return wrap;
+}
+
// ---------- keys (Settings › Keys, and New video when one is missing) ----------
const KEY_SOURCES = { saved: 'saved in this studio', 'session.env': 'from session.env', environment: 'from your environment' };