diff --git a/decompiler/CMakeLists.txt b/decompiler/CMakeLists.txt index e5aac4f6a3..ce2fcf64eb 100644 --- a/decompiler/CMakeLists.txt +++ b/decompiler/CMakeLists.txt @@ -114,6 +114,14 @@ target_link_libraries(decompiler stb_image tiny_gltf) +add_executable(vu-disasm + vu_disasm_main.cpp) + +target_link_libraries(vu-disasm + decomp + common + fmt) + add_executable(extractor extractor/main.cpp) diff --git a/decompiler/vu_disasm_main.cpp b/decompiler/vu_disasm_main.cpp new file mode 100644 index 0000000000..a2ac419261 --- /dev/null +++ b/decompiler/vu_disasm_main.cpp @@ -0,0 +1,51 @@ +#include +#include +#include +#include + +#include "common/util/FileUtil.h" +#include "decompiler/ObjectFile/LinkedWord.h" +#include "decompiler/VuDisasm/VuDisassembler.h" +#include "decompiler/util/DataParser.h" + +int main(int argc, char** argv) { + if (argc != 3) { + std::cerr << "usage: vu-disasm \n"; + return 1; + } + + try { + decompiler::VuDisassembler::VuKind kind; + const std::string kind_name = argv[1]; + if (kind_name == "vu0") { + kind = decompiler::VuDisassembler::VuKind::VU0; + } else if (kind_name == "vu1") { + kind = decompiler::VuDisassembler::VuKind::VU1; + } else { + throw std::runtime_error("kind must be vu0 or vu1"); + } + + const auto parsed = + decompiler::parse_data(file_util::read_text_file(std::string(argv[2]))); + std::vector words; + words.reserve(parsed.words.size()); + for (const auto& word : parsed.words) { + if (word.kind() != decompiler::LinkedWord::Kind::PLAIN_DATA) { + throw std::runtime_error("VU input must contain only plain .word data"); + } + words.push_back(word.data); + } + if (words.empty() || words.size() % 2) { + throw std::runtime_error("VU input must contain a nonempty whole number of instruction pairs"); + } + + decompiler::VuDisassembler disassembler(kind); + const auto program = + disassembler.disassemble(words.data(), static_cast(words.size() * sizeof(u32))); + std::cout << disassembler.to_string(program); + } catch (const std::exception& error) { + std::cerr << "vu-disasm: " << error.what() << '\n'; + return 1; + } + return 0; +} diff --git a/goal_src/jak1/engine/gfx/merc/merc-vu1-program.gc b/goal_src/jak1/engine/gfx/merc/merc-vu1-program.gc new file mode 100644 index 0000000000..b5c4ae3055 --- /dev/null +++ b/goal_src/jak1/engine/gfx/merc/merc-vu1-program.gc @@ -0,0 +1,2691 @@ +;;-*-Lisp-*- +(in-package goal) + +;; MERC is the foreground renderer: every deforming object in the game -- characters, creatures, +;; machinery, breakable props -- is stored in MERC format and drawn by this one VU1 program. It is +;; the largest microprogram in the game and it very nearly fills VU1's 2048-instruction memory. +;; +;; --------------------------------------------------------------------------------------------- +;; Division of work +;; --------------------------------------------------------------------------------------------- +;; +;; Nothing here can be baked into the art. Bone poses change every frame, so does the camera, so do +;; the lights, and the same fragment is drawn at different LODs, with different alpha, and with or +;; without the cheap clipping path. So the EE ships compact art plus a handful of per-frame numbers, +;; and VU1 does the expansion. +;; +;; The EE side lives in bones.gc (`draw-bones-merc') and merc.gc: +;; +;; * merc-vu1-initialize-chain uploads this program once per bucket, sets VIF1 BASE to 442 and +;; OFFSET to -442 so the two input buffers alternate between quadwords 0 and 442, unpacks the +;; eight constants of merc-vu1-low-mem to absolute addresses 0..7, and calls entry 0. +;; * bones-mtx-calc produces one 7-quadword skinning matrix per bone: four rows of camera-space +;; position transform followed by three rows of inverse-transpose normal transform. +;; * draw-bones-merc emits, per effect: one 8-quadword absolute unpack of the vu-lights block and +;; the model's ST constants to 132..139, then per fragment a STROW/STMOD pair, three unpacks of +;; the fragment's packed data into the current input buffer, one 7-quadword unpack per matrix +;; this fragment needs, and finally an MSCAL at the right entry point. +;; +;; VU1 expands the packed vertices, skins each one with one, two or three matrices, projects it, +;; lights it, converts everything to the GS's fixed-point formats, writes the ST/RGBAQ/XYZF2 triples +;; into a prebuilt GIF packet, and XGKICKs it. +;; +;; --------------------------------------------------------------------------------------------- +;; VU1 data memory +;; --------------------------------------------------------------------------------------------- +;; +;; 0..7 merc-vu1-low-mem. Absolute, uploaded once per bucket, and rewritten in place by +;; entry 0 and by each effect start: +;; 0 triangle-strip GIF tag, copied into the output for the fragment's first strip +;; 1 A+D GIF tag; its unused w word is the "mercprime is on" flag +;; 2 GS XY/Z/F offset (hvdf-offset) +;; 3 projection diagonal, folded by entry 0 from the four perspective rows +;; 4 projection offset row (perspective row 3) +;; 5 the same diagonal times the model's xyz-scale +;; 6 perspective row 3 again -- only read by entry 0 +;; 7 fog: (pfog0, fog-min, fog-max, 0) +;; 8..131 matrix slots. Absolute. A matrix is 7 quadwords and its address comes from the art: +;; merc-byte-header.mat-slot says where to upload it, and merc-vtx.mat-0/mat-1 name it +;; again per vertex. The per-vertex bytes are masked with 127, so every slot lives below +;; 128; with 0..7 reserved that is room for seventeen matrices at a time, and a fragment +;; may upload at most ten. +;; 132..138 vu-lights: three directions, three colors, ambient. Absolute, one upload per effect. +;; 139 merc-ctrl-header quadword 0: (xyz-scale, st-magic, st-out-a, st-out-b). +;; TOP+140 the fragment, double-buffered. VIF writes it with FLG set so it lands in whichever +;; ..TOP+370 half TOPS currently selects; TOP is the half this run reads. Layout, all offsets +;; relative to TOP+140 and taken from merc-byte-header: +;; +0 merc-byte-header, V4-8 unpacked so each byte becomes one word +;; +rgba-off one quadword of vertex color per transformed vertex +;; +srcdest-off the vertex-copy table +;; +perc-off one quadword per two- or three-matrix vertex: three byte weights and, +;; for three-matrix vertices, the third matrix address +;; +lump-off the packed vertices, three quadwords each +;; +fp-off merc-fp-header followed by 5-quadword adgif shaders +;; TOP+369 the GIF output packet, in the same half as its input. Two quadwords of optional GS +;; ..TOP+441 state come first, then the prebuilt strip tags and shader blocks, then the vertex +;; triples. 71 quadwords in all. +;; +;; --------------------------------------------------------------------------------------------- +;; Entry points +;; --------------------------------------------------------------------------------------------- +;; +;; 0 once per bucket. Fold the four perspective rows into the compact diagonal at 3 and the +;; offset at 4, build the scaled copy at 5, rotate the fog quadword into the w lanes of the +;; three light-direction registers, and seed the vertex bias registers. Ends on the E bit. +;; 17 first fragment of an effect, mercprime on. +;; 20 first fragment of an effect, mercprime off. +;; 32 any later fragment of the same effect, mercprime on. +;; 35 any later fragment of the same effect, mercprime off. +;; +;; The effect-start entries reload the lights and re-scale the projection diagonal by the model's +;; xyz-scale; the later-fragment entries skip that and reuse what is already there. The two prime +;; entries also store 1 into the flag word at address 1 so the drain code can find it; the two +;; non-prime entries leave it alone, and the drain code clears it when it is done with it. +;; +;; "mercprime" is the cheap approximation that lets MERC avoid the generic clipping path. Instead of +;; clipping, it clamps w to at most pfog0 before the perspective divide and clamps the projected x +;; and y into [1024, 3072] pixels afterwards, which keeps every coordinate inside the range the GS +;; can scissor. Geometry that pokes through the frustum edge is bent rather than cut. draw-bones- +;; check-longest-edge-asm decides whether the bend would be visible; when it would be, the effect +;; goes to the generic renderer instead. +;; +;; --------------------------------------------------------------------------------------------- +;; Packed vertices, and the floating-point trick that reads them +;; --------------------------------------------------------------------------------------------- +;; +;; One merc-vtx is twelve bytes, which V4-8 unpacks into three quadwords: +;; +;; [ mat-0 mat-1 nrm-x pos-x ] +;; [ dst-0 dst-1 nrm-y pos-y ] +;; [ tex-s tex-t nrm-z pos-z ] +;; +;; Every quantity in there is a byte, and the VU has no integer arithmetic to speak of, so the whole +;; thing is decoded with float adds. The unpack runs in STMOD add mode with a ROW of +;; +;; R0 = R1 = st-magic's partner st-vif-add, R2 = 65536.0, R3 = 8388608.0 + 65536.0 +;; +;; which means the byte is added into the *mantissa* of a known float. Then one vector add per +;; quadword finishes the job: +;; +;; x, y R0/R1 place the byte at the bottom of a float whose ulp is 1/st-scale, where st-scale is +;; 2^(12 - st-int-scale). For the index lanes -- mat-0, mat-1, dst-0, dst-1 -- nothing more +;; is needed: ILW and MTIR take the low sixteen bits of the register, and the exponent bits +;; simply fall off the top. dst-0 and dst-1 first get st-out-a or st-out-b added, which is +;; the output packet's base address expressed in those same ulps, so the sum's low bits are +;; the absolute output address. For tex-s and tex-t, adding st-magic cancels the exponent +;; and leaves a real texture coordinate. +;; z R2 = 65536.0 has an ulp of 1/128, so the byte becomes 65536 + n/128. Adding -65537.0 +;; leaves n/128 - 1, that is, a signed normal component in [-1, 1). +;; w R3 has an ulp of 1, so the byte becomes 8454144 + n. Adding the fragment's x-add, y-add +;; or z-add from merc-fp-header both removes that bias and moves the vertex to the +;; fragment's origin. The result is still in art units; the xyz-scaled projection diagonal +;; at address 5 converts it. +;; +;; The same idea reappears in the copy loop, where 256.0's ulp of 1/32768 is used to add a bit into +;; the ADC field of an already-packed XYZF2 word, and in the vertex loop, where adding 2048.0 to the +;; w lane before FTOI4 sets that same ADC bit. +;; +;; mat1-cnt, mat2-cnt and mat3-cnt split the vertex stream by influence count. A one-matrix vertex +;; reads its matrix and transforms; a two- or three-matrix vertex converts its byte weights with the +;; 1/255 constant parked in nrm-mtx-0's w lane and blends all seven quadwords of two or three +;; matrices first. A masked matrix index of exactly 127 means "the blend you already have is the one +;; I want", which is how two-mat-reuse-count and three-mat-reuse-count pay off: consecutive vertices +;; sharing a bone pair skip 22 quadword loads and 14 multiply-adds. +;; +;; --------------------------------------------------------------------------------------------- +;; Output +;; --------------------------------------------------------------------------------------------- +;; +;; A vertex is not written at a cursor. It carries its own two destination offsets, dst-0 and dst-1, +;; and the loops store the identical ST, RGBAQ and XYZF2 triple to both. That is what lets a vertex +;; shared by two triangle strips appear in both without being transformed twice, and it is why there +;; is no ordering constraint between vertices -- which in turn is what lets three of them be in +;; flight at once. A second destination of zero costs one harmless store into the low output +;; quadword. +;; +;; The fragment's GIF structure is copied in before any vertex is written: the initial triangle-strip +;; tag when the fragment continues the previous shader, then one [A+D block, strip tag] pair per +;; shader. Each adgif shader hides MERC's own bookkeeping in the upper halves of two of its five A+D +;; register words -- the GS only looks at the low eight bits of a register address, so the other +;; 24 bits are free. tex0's spare word is the shader block's destination offset; tex1's spare word is +;; positive while more shader groups follow. +;; +;; samecopy-cnt and crosscopy-cnt then duplicate vertices that two fragments share: same-copies come +;; from this fragment's own output, cross-copies from the other buffer, which still holds the +;; previous fragment's packet. Finally XGKICK submits everything, and if this was the first fragment +;; of the effect a two-quadword A+D packet holding the effect's GS TEST value is prepended so the +;; state arrives ahead of the geometry. +;; +;; Per-effect GS state travels in the w lanes of the light block, which the GS-facing code then +;; reads as integers: +;; +;; 132.w the effect's TEST_1 value, or zero once it has been sent. draw-bones-merc builds it as +;; #x3f85026b less the effect's ignore-alpha flag, which is the bucket's default test with +;; ATE cleared when alpha testing is not wanted. +;; 133.w ALPHA_1's low word, or zero for no override. #x00800044 is ordinary source-alpha +;; blending for a translucent effect; #x00800064 selects C=FIX for the distance fade of the +;; last LOD. The high bit of the mantissa is there to keep the value a normal float, since +;; the EE hands it around in a vector field. +;; 134.w ALPHA_1's high word, which is FIX. draw-bones fills it with 0..128 from the LOD +;; distance, so the most distant LOD dissolves instead of popping. +;; +;; When the override is on and a shader's fifth A+D register is not already ALPHA_1, the shader-copy +;; loop takes that slot anyway and repairs the damage: the fifth slot of a mip-mapped shader is +;; MIPTBP2_1, so losing it means mip levels 4 through 6 are gone, and TEX1's MXL is forced down to 3 +;; to stop the GS following pointers that are no longer there. +;; +;; --------------------------------------------------------------------------------------------- +;; Scheduling +;; --------------------------------------------------------------------------------------------- +;; +;; Three vertices are always in flight, named a, b and c below, and the long chains of nearly +;; identical labels are that rotation unrolled. A vertex needs a divide for the perspective, an +;; ERLENG for the normal, an EFU result read back with MFP, and a dozen dependent vector ops; the +;; only way to keep both pipelines busy is to overlap it with its neighbours. Empty slots are part of +;; the schedule, not padding, and the pair after every branch is its delay pair. +;; +;; The three matrix counts, the mercprime flag and the matrix-reuse sentinel together produce a lot +;; of variants, and the program spells all of them out: mat1-*, mat2-* and mat3-* for the ordinary +;; path and mercprime-* for the clamping one, with two indirect jumps in the two-matrix code where +;; a shared blend has to return to one of four different pipeline stages. + +;; The eight absolute low-memory quadwords are exactly merc-vu1-low-mem, uploaded in field order, so +;; the addresses come from the type instead of being transcribed one per line. Entry 0 overwrites 3, +;; 4 and 5 with the folded projection; the names below describe what is there once it has run, and +;; the init block spells the raw perspective rows as offsets from MERC-VU-PERSPECTIVE. +(defmacro merc-vu-low-mem (&rest path) + `(/ (offset-of merc-vu1-low-mem ,@path) 16)) + +(defconstant MERC-VU-STRIP-GIF-TAG (merc-vu-low-mem tri-strip-gif)) + +;; The w word of this GIF tag is register 8 of its REGS list, and the tag only declares one register, +;; so the GS never looks at it. It is the mercprime flag. +(defconstant MERC-VU-ADGIF-TAG (merc-vu-low-mem ad-gif)) + +(defconstant MERC-VU-HVDF-OFFSET (merc-vu-low-mem hvdf-offset)) + +(defconstant MERC-VU-PERSPECTIVE (merc-vu-low-mem perspective)) + +(defconstant MERC-VU-PROJ-DIAG (+ MERC-VU-PERSPECTIVE 0)) + +(defconstant MERC-VU-PROJ-OFFSET (+ MERC-VU-PERSPECTIVE 1)) + +(defconstant MERC-VU-PROJ-DIAG-SCALED (+ MERC-VU-PERSPECTIVE 2)) + +(defconstant MERC-VU-FOG (merc-vu-low-mem fog)) + +;; The per-effect block: one absolute 8-quadword V4-32 unpack of vu-lights followed by the model's +;; packed ST constants. Same trick -- the light addresses are the vu-lights field order. +(defconstant MERC-VU-LIGHTS 132) + +(defmacro merc-vu-light (&rest path) + `(+ MERC-VU-LIGHTS (/ (offset-of vu-lights ,@path) 16))) + +(defconstant MERC-VU-LIGHT-DIR-0 (merc-vu-light direction 0)) + +(defconstant MERC-VU-LIGHT-DIR-1 (merc-vu-light direction 1)) + +(defconstant MERC-VU-LIGHT-DIR-2 (merc-vu-light direction 2)) + +(defconstant MERC-VU-LIGHT-COLOR-0 (merc-vu-light color 0)) + +(defconstant MERC-VU-LIGHT-COLOR-1 (merc-vu-light color 1)) + +(defconstant MERC-VU-LIGHT-COLOR-2 (merc-vu-light color 2)) + +(defconstant MERC-VU-LIGHT-AMBIENT (merc-vu-light ambient)) + +(defconstant MERC-VU-ST-CONSTANTS (+ MERC-VU-LIGHT-AMBIENT 1)) + +;; VIF1 BASE, and therefore the distance between the two halves of everything below. +(defconstant MERC-VU-BUFFER-SIZE 442) + +;; Both relative to TOP. The fragment unpacks carry FLG so VIF adds TOPS for us; the program adds +;; TOP by hand. +(defconstant MERC-VU-FRAGMENT-HEADER 140) + +(defconstant MERC-VU-OUTPUT 371) + +;; A packed matrix index is seven bits. All ones means "keep the blend you already have", which is +;; what two-mat-reuse-count and three-mat-reuse-count count. +(defconstant MERC-VU-MTX-INDEX-MASK 127) + +;; Entry points, for reference from the EE side. draw-bones-merc receives the effect-start pair and +;; the later-fragment pair as arguments and bakes them into its MSCAL templates. +(defconstant MERC-VU-ENTRY-INIT 0) + +(defconstant MERC-VU-ENTRY-EFFECT-PRIME 17) + +(defconstant MERC-VU-ENTRY-EFFECT 20) + +(defconstant MERC-VU-ENTRY-FRAGMENT-PRIME 32) + +(defconstant MERC-VU-ENTRY-FRAGMENT 35) + +(#unless PC_PORT + (defvu1 merc-vu1-block + ;; Names for the registers whose allocation is fixed across a meaningful stretch of the program. + ;; Three of them carry two or three unrelated values over the course of one fragment, and since an + ;; rlet alias adds a name rather than renaming a register, each of those roles gets its own name + ;; and each region of the program uses the one that is true there. Where a register really is just + ;; an anonymous quadword shuttle -- the matrix folder, the copy pipeline, the shader copier -- the + ;; instructions below keep the physical spelling and say so. + (rlet ((light-dir-0 :reg vf01) ;; light directions; w = pfog0, the perspective numerator + (light-dir-1 :reg vf02) ;; w = fog-min + (light-dir-2 :reg vf03) ;; w = fog-max + (light-color-0 :reg vf04) ;; the three directional light colors + (light-color-1 :reg vf05) + (light-color-2 :reg vf06) + (light-ambient :reg vf07) ;; ambient term, added through vf00.w + ;; Three vertices are in flight. Each owns three registers, holding one input quadword on + ;; the way in and one GIF quadword on the way out. + (pos-a :reg vf08) ;; vertex word 0 in, projected screen position out + (pos-b :reg vf09) + (pos-c :reg vf10) + (clr-a :reg vf11) ;; vertex word 1 in, transformed normal, then lit RGBAQ out + (clr-b :reg vf12) + (clr-c :reg vf13) + (tex-a :reg vf14) ;; vertex word 2 in, ST out + (tex-b :reg vf15) + (tex-c :reg vf16) + ;; One per input quadword. See the decoding note at the top of the file; the w lanes hold + ;; the fragment's x-add, y-add and z-add. + (vtx-bias-0 :reg vf17) ;; (ADC bit 2048.0, color clamp 255.0, normal bias, x-add) + (vtx-bias-1 :reg vf18) ;; (st-out, st-out, normal bias, y-add) + (vtx-bias-2 :reg vf19) ;; (st-magic, st-magic, normal bias, z-add) + (rlength :reg vf20) ;; 1 / |normal|, read out of the EFU pipeline with MFP + (xyzf-out :reg vf21) ;; the packed XYZF2 quadword on its way to the output slot + (screen-offset :reg vf22) ;; hvdf-offset + (vtx-color :reg vf23) ;; the vertex's own RGBA, converted from bytes + (weights :reg vf24) ;; byte blend weights, and the third matrix address in w + (pos-mtx-0 :reg vf25) ;; position transform with the projection already folded in + (pos-mtx-1 :reg vf26) + (pos-mtx-2 :reg vf27) + (pos-mtx-3 :reg vf28) ;; translation row + (nrm-mtx-0 :reg vf29) ;; normal transform; w = 1/255, the blend-weight scale + (nrm-mtx-1 :reg vf30) ;; w is never written here either, but nothing reads it + (nrm-mtx-2 :reg vf31) ;; written xyzw, so it holds no constant + (lump-ptr :reg vi01) ;; cursor through the packed vertices + (weight-ptr :reg vi02) ;; cursor through the blend-weight quadwords + (color-ptr :reg vi03) ;; cursor through the vertex colors, and the master loop counter + (mat1-end :reg vi04) ;; the color-ptr value that ends the one-matrix section + (gif-base :reg vi04) ;; ... and, once the pipeline is draining, TOP + 371 + (index-mask :reg vi05) ;; 127: masks a packed matrix index, and is also the reuse sentinel + (copy-ptr :reg vi05) ;; ... and, in the drain and copy blocks, the copy-table cursor + (mat2-end :reg vi06) ;; end of the two-matrix section + (samecopy-end :reg vi06) ;; ... then the end of the same-fragment copy table + (prime-entry :reg vi07) ;; 1 when this MSCAL was one of the two mercprime entries + (mat3-end :reg vi07) ;; ... then the end of the three-matrix section + (crosscopy-end :reg vi07) ;; ... then the end of the cross-fragment copy table + (mtx-ptr :reg vi08) ;; the next vertex's matrix address + (vtx-flags :reg vi09) ;; the vertex's flag byte: kill, reuse, second destination + ;; The two output slots of each in-flight vertex. In the two- and three-matrix paths these + ;; carry the vertex's matrix addresses first and are overwritten with the destinations once + ;; the blend is under way. + (dst-a :reg vi10) + (dst-b :reg vi11) + (dst-c :reg vi12) + (dst2-a :reg vi13) + (dst2-b :reg vi14) + (dst2-c :reg vi15) + (alpha-word-0 :reg vi10) ;; ALPHA_1's two words, while the shaders are being copied + (alpha-word-1 :reg vi11) + (frag-header :reg vi12) ;; TOP + 140, the unpacked merc-byte-header + (out-base :reg vi15) ;; TOP + 371, the GIF output packet + (prime :reg vi15) ;; ... and the copy of prime-entry the vertex loops test + ) + ;; Entry 0, once per bucket. The four perspective rows arrive as a full 4x4, but only five numbers + ;; in them are ever nonzero, so fold them: the diagonal plus the w-column term collapse into one + ;; quadword at MERC-VU-PROJ-DIAG and the offset row stays at MERC-VU-PROJ-OFFSET. Every vertex from + ;; here on costs two multiply-adds of projection instead of four. + ;; + ;; The fog quadword is (pfog0, fog-min, fog-max, 0) and it gets rotated three times so that one of + ;; those three numbers lands in the w lane of each light-direction register. The lights themselves + ;; only ever load xyz, so these three scalars survive every effect: light-dir-0.w is the numerator + ;; of the perspective divide, light-dir-1.w and light-dir-2.w are the fog clamps. + ;; + ;; The immediates seed the per-lane vertex biases and the weight scale. 2048.0 becomes the ADC bit + ;; once FTOI4 has multiplied by 16; 255.0 is the color clamp; -65537.0 turns the normal bytes signed; + ;; and 1/255 parks in nrm-mtx-0's w lane, which nothing ever writes because the normal rows load xyz. + (asm-block initialize-projection + (vu-pair (lq.xyzw light-dir-0 vi00 MERC-VU-FOG) (nop)) ;; #x000 + (vu-pair (lq.xyzw vf25 vi00 MERC-VU-PERSPECTIVE) (nop)) ;; #x001 + (vu-pair (lq.xyzw vf26 vi00 (+ MERC-VU-PERSPECTIVE 1)) (nop)) ;; #x002 + (vu-pair (lq.xyzw vf27 vi00 (+ MERC-VU-PERSPECTIVE 2)) (nop)) ;; #x003 + (vu-pair (lq.xyzw vf28 vi00 (+ MERC-VU-PERSPECTIVE 3)) (nop)) ;; #x004 + (vu-pair (mr32.xyzw light-dir-0 light-dir-0) (nop)) ;; #x005 + (vu-pair (move.y vf25 vf26) (nop)) ;; #x006 + (vu-pair (move.zw vf25 vf27) (nop)) ;; #x007 + (vu-pair (sq.xyzw vf25 vi00 MERC-VU-PROJ-DIAG) (nop)) ;; #x008 + (vu-pair (2048.0) (nop :i)) ;; #x009 + (vu-pair (255.0) (maxi.x vtx-bias-0 vf00 I :i)) ;; #x00a + (vu-pair (-65537.0) (maxi.y vtx-bias-0 vf00 I :i)) ;; #x00b + (vu-pair (mr32.xyzw light-dir-1 light-dir-0) (minii.z vtx-bias-0 vf00 I)) ;; #x00c + (vu-pair (lq.xyzw vf22 vi00 MERC-VU-HVDF-OFFSET) (minii.z vtx-bias-1 vf00 I)) ;; #x00d + (vu-pair (0.003921569) (minii.z vtx-bias-2 vf00 I :i)) ;; #x00e + (vu-pair (sq.xyzw vf28 vi00 MERC-VU-PROJ-OFFSET) (minii.w nrm-mtx-0 vf00 I :e)) ;; #x00f + (vu-pair (mr32.xyzw light-dir-2 light-dir-1) (nop))) ;; #x010 + ;; Entries 17 and 20: the first fragment of an effect. Both fall through to the lighting setup; the + ;; difference is the store in entry 17's delay pair, which leaves the mercprime flag set in the + ;; unused w word of the A+D GIF tag so the drain code can see it. + (asm-block entry-table + (label effect-entry-prime) + (vu-pair (iaddi prime-entry vi00 0x1) (nop)) ;; #x011 + (vu-pair (b setup-lights-common) (nop)) ;; #x012 + (vu-pair (isw.w prime-entry vi00 MERC-VU-ADGIF-TAG) (nop)) ;; #x013 + (label effect-entry) + (vu-pair (iaddi prime-entry vi00 0x0) (nop))) ;; #x014 + ;; Re-scale the projection diagonal by this model's xyz-scale -- packed positions are in art units -- + ;; and load the effect's three light directions, three light colors and ambient term. Only xyz is + ;; loaded, which is what preserves the fog scalars in the w lanes. + (asm-block install-effect-lights + (label setup-lights-common) + (vu-pair (lq.xyzw vf25 vi00 MERC-VU-ST-CONSTANTS) (nop)) ;; #x015 + (vu-pair (lq.xyzw vf26 vi00 MERC-VU-PROJ-DIAG) (nop)) ;; #x016 + (vu-pair (lq.xyz light-dir-0 vi00 MERC-VU-LIGHT-DIR-0) (nop)) ;; #x017 + (vu-pair (lq.xyz light-dir-1 vi00 MERC-VU-LIGHT-DIR-1) (nop)) ;; #x018 + (vu-pair (lq.xyz light-dir-2 vi00 MERC-VU-LIGHT-DIR-2) (addy.xy vtx-bias-2 vf00 vf25)) ;; #x019 + (vu-pair (lq.xyzw light-color-0 vi00 MERC-VU-LIGHT-COLOR-0) (mulx.xyzw vf26 vf26 vf25)) ;; #x01a + (vu-pair (lq.xyzw light-color-1 vi00 MERC-VU-LIGHT-COLOR-1) (nop)) ;; #x01b + (vu-pair (lq.xyzw light-color-2 vi00 MERC-VU-LIGHT-COLOR-2) (nop)) ;; #x01c + (vu-pair (lq.xyzw light-ambient vi00 MERC-VU-LIGHT-AMBIENT) (nop)) ;; #x01d + (vu-pair (b draw-effect-common) (nop)) ;; #x01e + (vu-pair (sq.xyzw vf26 vi00 MERC-VU-PROJ-DIAG-SCALED) (nop))) ;; #x01f + ;; Entries 32 and 35: any later fragment of the same effect. The lights and the scaled diagonal are + ;; already in place, so these go straight to the per-fragment setup. + (asm-block entry-table-later-fragment + (label fragment-entry-prime) + (vu-pair (iaddi prime-entry vi00 0x1) (nop)) ;; #x020 + (vu-pair (b draw-effect-common) (nop)) ;; #x021 + (vu-pair (isw.w prime-entry vi00 MERC-VU-ADGIF-TAG) (nop)) ;; #x022 + (label fragment-entry) + (vu-pair (iaddi prime-entry vi00 0x0) (nop))) ;; #x023 + ;; All four draw entries meet here. XTOP names the input half this run owns, and everything about the + ;; fragment follows from it: the byte header at TOP+140, the output packet at TOP+371, and which of + ;; st-out-a / st-out-b biases the destination bytes. The two ST-output constants differ by 442, the + ;; buffer size, so the same packed vertex lands in whichever half is being filled. + ;; + ;; 133.w is the ALPHA_1 override; when it is zero the shader copy below leaves the fifth A+D register + ;; of every shader alone. + (asm-block select-buffers + (label draw-effect-common) + (vu-pair (lq.xyzw vf28 vi00 MERC-VU-ST-CONSTANTS) (minix.xyzw vf15 vf00 vf00)) ;; #x024 + (vu-pair (xtop out-base) (nop)) ;; #x025 + (vu-pair (iaddiu frag-header out-base MERC-VU-FRAGMENT-HEADER) (nop)) ;; #x026 + (vu-pair (ibeq vi00 out-base output-buffer-selected) (nop)) ;; #x027 + (vu-pair (ilwr.w vi03 frag-header) (maxz.xy vtx-bias-1 vf00 vf28)) ;; #x028 + (vu-pair (nop) (maxw.xy vtx-bias-1 vf00 vf28)) ;; #x029 + (label output-buffer-selected) + (vu-pair (ilw.w alpha-word-0 vi00 MERC-VU-LIGHT-DIR-1) (nop)) ;; #x02a + (vu-pair (iaddiu out-base out-base MERC-VU-OUTPUT) (nop)) ;; #x02b + (vu-pair (ilw.y vi02 frag-header 2) (nop)) ;; #x02c + (vu-pair (lq.xyzw vf14 vi00 MERC-VU-STRIP-GIF-TAG) (nop)) ;; #x02d + (vu-pair (ibeq vi00 alpha-word-0 setup-output-packet) (nop)) ;; #x02e + (vu-pair (iadd vi03 vi03 frag-header) (nop)) ;; #x02f + (vu-pair (mr32.xyzw vf27 vf14) (nop)) ;; #x030 + (vu-pair (ilw.w alpha-word-1 vi00 MERC-VU-LIGHT-DIR-2) (nop)) ;; #x031 + (vu-pair (iaddiu vi13 vi00 (gs-reg64 alpha-1)) (nop)) ;; #x032 + (vu-pair (mr32.y vf14 vf27) (nop))) ;; #x033 + ;; Build the fragment's GIF packet. A fragment either opens with triangles that continue the previous + ;; fragment's shader -- strip-len is nonzero -- or opens directly with a shader. The first case writes + ;; the strip tag from low memory with NLOOP patched from strip-len and EOP set; note that VU IADDIU + ;; takes a 15-bit immediate, so EOP at bit 15 has to be reached by adding 0x4000 twice. + ;; + ;; Then one [A+D block, strip tag] group per shader. Each adgif shader hides two words of MERC's own + ;; bookkeeping in the upper halves of A+D register words, which the GS ignores because a register + ;; address is eight bits: quadword 0's w word is where this group goes in the output packet, and + ;; quadword 1's w word stays positive while more groups follow. + (asm-block build-output-packet + (label setup-output-packet) + (vu-pair (ilwr.w vi09 vi03) (nop)) ;; #x034 + (vu-pair (lqi.xyzw vf27 vi03) (nop)) ;; #x035 + (vu-pair (ilw.x mat1-end frag-header 1) (nop)) ;; #x036 + (vu-pair (iaddiu index-mask vi00 MERC-VU-MTX-INDEX-MASK) (addw.xyz vf15 vf15 vf00)) ;; #x037 + (vu-pair (iand vi09 vi09 index-mask) (nop)) ;; #x038 + (vu-pair (ilw.y mat2-end frag-header 1) (miniz.w vf19 vf00 vf27)) ;; #x039 + (vu-pair (ibeq vi00 vi02 shader-groups) (miniy.w vf18 vf00 vf27)) ;; #x03a + (vu-pair (ilwr.z lump-ptr frag-header) (minix.w vf17 vf00 vf27)) ;; #x03b + (vu-pair (ibne vi00 vi09 strip-tag-has-shader) (nop)) ;; #x03c + (vu-pair (sq.yzw vf14 out-base 0) (nop)) ;; #x03d + (vu-pair (iaddiu vi02 vi02 0x4000) (nop)) ;; #x03e + (vu-pair (iaddiu vi02 vi02 0x4000) (nop)) ;; #x03f + (vu-pair (iswr.x vi02 out-base) (nop)) ;; #x040 + (vu-pair (b preprocess-matrices) (nop)) ;; #x041 + (vu-pair (nop) (nop)) ;; #x042 + (label strip-tag-has-shader) + (vu-pair (iswr.x vi02 out-base) (nop)) ;; #x043 + (label shader-groups) + (vu-pair (lq.xyzw vf13 vi00 MERC-VU-ADGIF-TAG) (nop)) ;; #x044 + (label shader-group-loop) + (vu-pair (ilwr.w vi02 vi03) (nop)) ;; #x045 + (vu-pair (lqi.xyzw vf08 vi03) (nop)) ;; #x046 + (vu-pair (lqi.xyzw vf09 vi03) (nop)) ;; #x047 + (vu-pair (lqi.xyzw vf10 vi03) (nop)) ;; #x048 + (vu-pair (lqi.xyzw vf11 vi03) (nop)) ;; #x049 + (vu-pair (lqi.xyzw vf12 vi03) (nop)) ;; #x04a + (vu-pair (iadd vi02 vi02 out-base) (nop)) ;; #x04b + (vu-pair (mtir vi08 vf09.w) (nop)) ;; #x04c + (vu-pair (sqi.xyzw vf13 vi02) (nop)) ;; #x04d + (vu-pair (sqi.xyzw vf08 vi02) (nop)) ;; #x04e + (vu-pair (sqi.xyzw vf09 vi02) (nop)) ;; #x04f + (vu-pair (mfir.x vf14 vi08) (nop)) ;; #x050 + (vu-pair (sqi.xyzw vf10 vi02) (nop)) ;; #x051 + (vu-pair (sqi.xyzw vf11 vi02) (nop)) ;; #x052 + (vu-pair (ibeq vi00 alpha-word-0 shader-group-done) (nop)) ;; #x053 + (vu-pair (sqi.xyzw vf12 vi02) (nop)) ;; #x054 + ;; Alpha override. If the shader's fifth A+D register is already ALPHA_1 the two words written above + ;; are all that is needed. If it is not -- on a mip-mapped shader it is MIPTBP2_1 -- MERC takes the + ;; slot anyway, which throws away the base pointers for mip levels 4 through 6, so TEX1's MXL is + ;; forced down to 3 and LCM cleared. Better a coarser mip chain than the GS chasing pointers that are + ;; no longer in the packet. + (vu-pair (mtir vi14 vf12.z) (nop)) ;; #x055 + (vu-pair (isw.x alpha-word-0 vi02 -1) (nop)) ;; #x056 + (vu-pair (ibeq vi14 vi13 shader-group-done) (nop)) ;; #x057 + (vu-pair (isw.y alpha-word-1 vi02 -1) (nop)) ;; #x058 + (vu-pair (ilw.x vi13 vi02 -4) (nop)) ;; #x059 + (vu-pair (isubiu vi14 vi00 0x1d) (nop)) ;; #x05a + (vu-pair (iand vi13 vi13 vi14) (nop)) ;; #x05b + (vu-pair (iaddi vi13 vi13 0xc) (nop)) ;; #x05c + (vu-pair (isw.x vi13 vi02 -4) (nop)) ;; #x05d + (vu-pair (iaddiu vi13 vi00 (gs-reg64 alpha-1)) (nop)) ;; #x05e + (vu-pair (isw.z vi13 vi02 -1) (nop)) ;; #x05f + (label shader-group-done) + (vu-pair (ibgtz vi08 shader-group-loop) (nop)) ;; #x060 + (vu-pair (sq.xyzw vf14 vi02 0) (nop))) ;; #x061 + ;; Fold the projection into every matrix this fragment just uploaded. A skinning matrix is seven + ;; quadwords: four rows of camera-space position transform then three rows of inverse-transpose + ;; normal transform, and only the position half is touched here. The three rotation rows get the + ;; xyz-scaled diagonal, because packed positions are in art units; the translation row gets the + ;; unscaled diagonal and the offset row, because it is already in world units. + ;; + ;; The loop is unrolled four times and stores lag one group behind their loads, which is why vi11 + ;; starts equal to vi08: the first group's stores write garbage over the first slot and the second + ;; group immediately overwrites it with the real thing. Each group ends by testing the slot it just + ;; loaded, so leaving the loop always leaves the last valid group's results stored. + ;; + ;; vi08 through vi11 are a rotating window of four mat-slot addresses and vi13 walks the ten mat-slot + ;; bytes in the header. They are spelled physically: each of them means a different one of the four + ;; slots on each of the four groups, and no single name would survive the rotation. + (asm-block fold-projection-into-matrices + (label preprocess-matrices) + (vu-pair (lq.xyzw vf28 vi00 MERC-VU-PROJ-DIAG) (nop)) ;; #x062 + (vu-pair (ilw.y vi08 frag-header 3) (nop)) ;; #x063 + (vu-pair (lq.xyzw vf16 vi00 MERC-VU-PROJ-DIAG-SCALED) (nop)) ;; #x064 + (vu-pair (lq.xyzw vf20 vi00 MERC-VU-PROJ-OFFSET) (nop)) ;; #x065 + (vu-pair (ilw.z vi09 frag-header 3) (mul.xyzw vf27 vf28 vf15)) ;; #x066 + (vu-pair (ior vi11 vi08 vi00) (mul.xyzw vf28 vf28 vf00)) ;; #x067 + (vu-pair (ibeq vi00 vi08 mat1-entry) (mul.xyzw vf15 vf16 vf15)) ;; #x068 + (vu-pair (iaddi vi13 frag-header 0x3) (mul.xyzw vf16 vf16 vf00)) ;; #x069 + (label preprocess-matrix-loop) + (vu-pair (lq.xyzw vf08 vi08 0) (addax.xyzw vf20 vf00)) ;; #x06a + (vu-pair (lq.xyzw vf10 vi08 1) (madda.xyzw ACC vf27 vf25)) ;; #x06b + (vu-pair (lq.xyzw vf12 vi08 2) (maddz.xyzw vf26 vf28 vf25)) ;; #x06c + (vu-pair (lq.xyzw vf25 vi08 3) (nop)) ;; #x06d + (vu-pair (sq.xyzw vf09 vi11 0) (mula.xyzw ACC vf15 vf08)) ;; #x06e + (vu-pair (sq.xyzw vf11 vi11 1) (maddz.xyzw vf09 vf16 vf08)) ;; #x06f + (vu-pair (sq.xyzw vf13 vi11 2) (mula.xyzw ACC vf15 vf10)) ;; #x070 + (vu-pair (sq.xyzw vf26 vi11 3) (maddz.xyzw vf11 vf16 vf10)) ;; #x071 + (vu-pair (ibeq vi00 vi08 mat1-entry) (mula.xyzw ACC vf15 vf12)) ;; #x072 + (vu-pair (ilwr.w vi10 vi13) (maddz.xyzw vf13 vf16 vf12)) ;; #x073 + (vu-pair (lq.xyzw vf08 vi09 0) (addax.xyzw vf20 vf00)) ;; #x074 + (vu-pair (lq.xyzw vf10 vi09 1) (madda.xyzw ACC vf27 vf25)) ;; #x075 + (vu-pair (lq.xyzw vf12 vi09 2) (maddz.xyzw vf26 vf28 vf25)) ;; #x076 + (vu-pair (lq.xyzw vf25 vi09 3) (nop)) ;; #x077 + (vu-pair (sq.xyzw vf09 vi08 0) (mula.xyzw ACC vf15 vf08)) ;; #x078 + (vu-pair (sq.xyzw vf11 vi08 1) (maddz.xyzw vf09 vf16 vf08)) ;; #x079 + (vu-pair (sq.xyzw vf13 vi08 2) (mula.xyzw ACC vf15 vf10)) ;; #x07a + (vu-pair (sq.xyzw vf26 vi08 3) (maddz.xyzw vf11 vf16 vf10)) ;; #x07b + (vu-pair (ibeq vi00 vi09 mat1-entry) (mula.xyzw ACC vf15 vf12)) ;; #x07c + (vu-pair (ilw.x vi11 vi13 1) (maddz.xyzw vf13 vf16 vf12)) ;; #x07d + (vu-pair (lq.xyzw vf08 vi10 0) (addax.xyzw vf20 vf00)) ;; #x07e + (vu-pair (lq.xyzw vf10 vi10 1) (madda.xyzw ACC vf27 vf25)) ;; #x07f + (vu-pair (lq.xyzw vf12 vi10 2) (maddz.xyzw vf26 vf28 vf25)) ;; #x080 + (vu-pair (lq.xyzw vf25 vi10 3) (nop)) ;; #x081 + (vu-pair (sq.xyzw vf09 vi09 0) (mula.xyzw ACC vf15 vf08)) ;; #x082 + (vu-pair (sq.xyzw vf11 vi09 1) (maddz.xyzw vf09 vf16 vf08)) ;; #x083 + (vu-pair (sq.xyzw vf13 vi09 2) (mula.xyzw ACC vf15 vf10)) ;; #x084 + (vu-pair (sq.xyzw vf26 vi09 3) (maddz.xyzw vf11 vf16 vf10)) ;; #x085 + (vu-pair (ibeq vi00 vi10 mat1-entry) (mula.xyzw ACC vf15 vf12)) ;; #x086 + (vu-pair (ilw.y vi08 vi13 1) (maddz.xyzw vf13 vf16 vf12)) ;; #x087 + (vu-pair (lq.xyzw vf08 vi11 0) (addax.xyzw vf20 vf00)) ;; #x088 + (vu-pair (lq.xyzw vf10 vi11 1) (madda.xyzw ACC vf27 vf25)) ;; #x089 + (vu-pair (lq.xyzw vf12 vi11 2) (maddz.xyzw vf26 vf28 vf25)) ;; #x08a + (vu-pair (lq.xyzw vf25 vi11 3) (nop)) ;; #x08b + (vu-pair (sq.xyzw vf09 vi10 0) (mula.xyzw ACC vf15 vf08)) ;; #x08c + (vu-pair (sq.xyzw vf11 vi10 1) (maddz.xyzw vf09 vf16 vf08)) ;; #x08d + (vu-pair (sq.xyzw vf13 vi10 2) (mula.xyzw ACC vf15 vf10)) ;; #x08e + (vu-pair (sq.xyzw vf26 vi10 3) (maddz.xyzw vf11 vf16 vf10)) ;; #x08f + (vu-pair (iaddi vi13 vi13 0x1) (nop)) ;; #x090 + (vu-pair (ibne vi00 vi11 preprocess-matrix-loop) (mula.xyzw ACC vf15 vf12)) ;; #x091 + (vu-pair (ilwr.z vi09 vi13) (maddz.xyzw vf13 vf16 vf12))) ;; #x092 + ;; One-matrix vertices. Three vertices are in flight at all times -- a, b and c -- and the chain of + ;; pipeline labels is that rotation unrolled. Each one needs a perspective divide, an ERLENG for its + ;; normal length, the EFU result read back with MFP, and a dependent chain of lighting work, so the + ;; only way to fill both issue slots is to overlap it with its neighbours. + ;; + ;; color-ptr is the master counter: one color quadword per transformed vertex, and mat1-end, mat2-end + ;; and mat3-end are the color-ptr values at which the one-, two- and three-matrix sections end. The + ;; loops compare against those rather than counting down. + ;; + ;; The three input quadwords are biased once each by vtx-bias-0/1/2, which is what decodes the packed + ;; bytes -- see the note at the top of the file. dst-a and dst2-a are then the vertex's two output + ;; slots, already absolute because st-out biased them; the identical triple is stored to both. + (asm-block one-matrix-vertices + (label mat1-entry) + (vu-pair (ilw.x weight-ptr frag-header 3) (nop)) ;; #x093 + (vu-pair (ibeq vi00 mat1-end mat2-entry) (nop)) ;; #x094 + (vu-pair (iadd lump-ptr lump-ptr dst-c) (nop)) ;; #x095 + (vu-pair (ilwr.x mtx-ptr lump-ptr) (nop)) ;; #x096 + (vu-pair (lqi.xyzw pos-a lump-ptr) (nop)) ;; #x097 + (vu-pair (lqi.xyzw clr-a lump-ptr) (nop)) ;; #x098 + (vu-pair (lqi.xyzw tex-a lump-ptr) (nop)) ;; #x099 + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (nop)) ;; #x09a + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (add.zw pos-a pos-a vtx-bias-0)) ;; #x09b + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (add.xyzw clr-a clr-a vtx-bias-1)) ;; #x09c + (vu-pair (iaddi mat1-end mat1-end -0x1) (add.xyzw tex-a tex-a vtx-bias-2)) ;; #x09d + (vu-pair (iadd weight-ptr weight-ptr frag-header) (nop)) ;; #x09e + (vu-pair (lqi.xyzw weights weight-ptr) (mulaz.xyzw ACC nrm-mtx-0 pos-a)) ;; #x09f + (vu-pair (mtir dst-a clr-a.x) (maddaz.xyzw ACC nrm-mtx-1 clr-a)) ;; #x0a0 + (vu-pair (mtir dst2-a clr-a.y) (maddz.xyz clr-a nrm-mtx-2 tex-a)) ;; #x0a1 + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (nop)) ;; #x0a2 + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (itof0.xyzw weights weights)) ;; #x0a3 + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (nop)) ;; #x0a4 + ;; ERLENG gives 1/|n| in the EFU pipeline. The three light dots are taken on the unnormalized normal + ;; and scaled by the result later, which is one multiply instead of three and hides the EFU latency + ;; behind the perspective divide. + (vu-pair (erleng.xyz P clr-a) (nop)) ;; #x0a5 + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (mulaw.xyzw ACC pos-mtx-0 pos-a)) ;; #x0a6 + (vu-pair (ior prime prime-entry vi00) (maddaw.xyzw ACC pos-mtx-1 clr-a)) ;; #x0a7 + (vu-pair (mr32.z tex-a vf00) (maddw.xyzw pos-a pos-mtx-2 tex-a)) ;; #x0a8 + (vu-pair (lqi.xyzw pos-b lump-ptr) (nop)) ;; #x0a9 + (vu-pair (ilwr.y color-ptr frag-header) (nop)) ;; #x0aa + (vu-pair (ilw.z mat3-end frag-header 1) (nop)) ;; #x0ab + (vu-pair (lqi.xyzw clr-b lump-ptr) (add.xyzw pos-a pos-a pos-mtx-3)) ;; #x0ac + (vu-pair (lqi.xyzw tex-b lump-ptr) (nop)) ;; #x0ad + (vu-pair (mtir mtx-ptr pos-b.x) (nop)) ;; #x0ae + ;; mercprime only. Clamping w to at most pfog0 before the divide bounds the projected magnification, + ;; which is what keeps a vertex near or behind the near plane from flying off into the GS's + ;; unrepresentable range. + (vu-pair (ibeq vi00 prime mat1-pipeline-01) (nop)) ;; #x0af + (vu-pair (iadd color-ptr color-ptr frag-header) (nop)) ;; #x0b0 + (vu-pair (nop) (miniw.w pos-a pos-a light-dir-0)) ;; #x0b1 + (label mat1-pipeline-01) + (vu-pair (div Q light-dir-0.w pos-a.w) (add.zw pos-b pos-b vtx-bias-0)) ;; #x0b2 + (vu-pair (iadd mat1-end mat1-end color-ptr) (add.xyzw clr-b clr-b vtx-bias-1)) ;; #x0b3 + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (add.xyzw tex-b tex-b vtx-bias-2)) ;; #x0b4 + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (nop)) ;; #x0b5 + (vu-pair (iadd mat2-end mat2-end mat1-end) (nop)) ;; #x0b6 + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (nop)) ;; #x0b7 + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (nop)) ;; #x0b8 + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (mul.xyz pos-a pos-a Q)) ;; #x0b9 + (vu-pair (mtir dst-b clr-b.x) (mul.xyzw tex-a tex-a Q)) ;; #x0ba + (vu-pair (mtir dst2-b clr-b.y) (nop)) ;; #x0bb + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (nop)) ;; #x0bc + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-a pos-a screen-offset)) ;; #x0bd + (vu-pair (iadd mat3-end mat3-end mat2-end) (mulaz.xyzw ACC nrm-mtx-0 pos-b)) ;; #x0be + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (maddaz.xyzw ACC nrm-mtx-1 clr-b)) ;; #x0bf + (vu-pair (mfp.w rlength P) (maddz.xyz clr-b nrm-mtx-2 tex-b)) ;; #x0c0 + (vu-pair (nop) (nop)) ;; #x0c1 + (vu-pair (1024.0) (miniw.w pos-a pos-a light-dir-2 :i)) ;; #x0c2 + ;; The mercprime pipelines are a separate copy of everything below, so a vertex that needs clamping + ;; leaves here and never comes back. + (vu-pair (ibne vi00 prime mercprime-entry) (mulaw.xyzw ACC pos-mtx-0 pos-b)) ;; #x0c3 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-a clr-a rlength)) ;; #x0c4 + (vu-pair (erleng.xyz P clr-b) (nop)) ;; #x0c5 + (vu-pair (nop) (maddaw.xyzw ACC pos-mtx-1 clr-b)) ;; #x0c6 + (vu-pair (mr32.z tex-b vf00) (maddw.xyzw pos-b pos-mtx-2 tex-b)) ;; #x0c7 + (vu-pair (lqi.xyzw pos-c lump-ptr) (mulax.xyzw ACC light-dir-0 clr-a)) ;; #x0c8 + (vu-pair (ibne mat1-end color-ptr mat1-pipeline-03) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x0c9 + (vu-pair (nop) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x0ca + (vu-pair (ibne mat2-end color-ptr mat2-pipeline-05) (nop)) ;; #x0cb + (vu-pair (nop) (nop)) ;; #x0cc + (vu-pair (b mat3-pipeline-06) (nop)) ;; #x0cd + (vu-pair (nop) (nop)) ;; #x0ce + (label mat1-pipeline-02) + (vu-pair (lqi.xyzw pos-c lump-ptr) (mulax.xyzw ACC light-dir-0 clr-a)) ;; #x0cf + (vu-pair (sq.xyzw clr-c dst-c 1) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x0d0 + (vu-pair (sq.xyzw clr-c dst2-c 1) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x0d1 + (label mat1-pipeline-03) + (vu-pair (lqi.xyzw clr-c lump-ptr) (add.xyzw pos-b pos-b pos-mtx-3)) ;; #x0d2 + (vu-pair (lqi.xyzw tex-c lump-ptr) (maxw.w pos-a pos-a light-dir-1)) ;; #x0d3 + (vu-pair (mtir mtx-ptr pos-c.x) (itof0.xyzw vtx-color vtx-color)) ;; #x0d4 + (vu-pair (ilw.y vtx-flags lump-ptr -9) (maxx.xyzw clr-a clr-a vf00)) ;; #x0d5 + (vu-pair (div Q light-dir-0.w pos-b.w) (add.zw pos-c pos-c vtx-bias-0)) ;; #x0d6 + (vu-pair (move.xyzw xyzf-out pos-a) (add.xyzw clr-c clr-c vtx-bias-1)) ;; #x0d7 + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (add.xyzw tex-c tex-c vtx-bias-2)) ;; #x0d8 + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (mulax.xyzw ACC light-color-0 clr-a)) ;; #x0d9 + (vu-pair (ibgtz vtx-flags mat1-pipeline-04) (madday.xyzw ACC light-color-1 clr-a)) ;; #x0da + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (maddaz.xyzw ACC light-color-2 clr-a)) ;; #x0db + ;; The vertex flag byte in dst-1 asks for this vertex to be killed. Adding 2048.0 before FTOI4 turns + ;; into bit 15 of the packed w word, which is XYZF2's ADC bit: the GS accepts the vertex and draws + ;; nothing with it, which is how a strip is broken without changing its length. + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x0dc + (label mat1-pipeline-04) + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (maddw.xyzw clr-a light-ambient vf00)) ;; #x0dd + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (mul.xyz pos-b pos-b Q)) ;; #x0de + (vu-pair (mtir dst-c clr-c.x) (mul.xyzw tex-b tex-b Q)) ;; #x0df + (vu-pair (mtir dst2-c clr-c.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x0e0 + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (mul.xyzw clr-a clr-a vtx-color)) ;; #x0e1 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-b pos-b screen-offset)) ;; #x0e2 + (vu-pair (ibne vi00 vtx-flags mat1-pipeline-05) (mulaz.xyzw ACC nrm-mtx-0 pos-c)) ;; #x0e3 + (vu-pair (sq.xyzw xyzf-out dst-a 2) (maddaz.xyzw ACC nrm-mtx-1 clr-c)) ;; #x0e4 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-a)) ;; #x0e5 + (label mat1-pipeline-05) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-c nrm-mtx-2 tex-c)) ;; #x0e6 + (vu-pair (sq.xyzw tex-a dst-a 0) (miniy.xyzw clr-a clr-a vtx-bias-0)) ;; #x0e7 + (vu-pair (sq.xyzw tex-a dst2-a 0) (miniw.w pos-b pos-b light-dir-2)) ;; #x0e8 + (vu-pair (sq.xyzw xyzf-out dst2-a 2) (mulaw.xyzw ACC pos-mtx-0 pos-c)) ;; #x0e9 + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (mulw.xyzw clr-b clr-b rlength)) ;; #x0ea + (vu-pair (erleng.xyz P clr-c) (ftoi0.xyzw clr-a clr-a)) ;; #x0eb + (vu-pair (ibne mat1-end color-ptr mat1-pipeline-06) (maddaw.xyzw ACC pos-mtx-1 clr-c)) ;; #x0ec + (vu-pair (mr32.z tex-c vf00) (maddw.xyzw pos-c pos-mtx-2 tex-c)) ;; #x0ed + (vu-pair (ibne mat2-end color-ptr mat2-pipeline-10) (nop)) ;; #x0ee + (vu-pair (ilw.y vtx-flags lump-ptr -6) (nop)) ;; #x0ef + (vu-pair (ibne mat3-end color-ptr mat3-pipeline-11) (nop)) ;; #x0f0 + (vu-pair (nop) (nop)) ;; #x0f1 + (vu-pair (b finish-mat1) (nop)) ;; #x0f2 + (vu-pair (nop) (nop)) ;; #x0f3 + (label mat1-pipeline-06) + (vu-pair (lqi.xyzw pos-a lump-ptr) (mulax.xyzw ACC light-dir-0 clr-b)) ;; #x0f4 + (vu-pair (sq.xyzw clr-a dst-a 1) (madday.xyzw ACC light-dir-1 clr-b)) ;; #x0f5 + (vu-pair (sq.xyzw clr-a dst2-a 1) (maddz.xyzw clr-b light-dir-2 clr-b)) ;; #x0f6 + (vu-pair (lqi.xyzw clr-a lump-ptr) (add.xyzw pos-c pos-c pos-mtx-3)) ;; #x0f7 + (vu-pair (lqi.xyzw tex-a lump-ptr) (maxw.w pos-b pos-b light-dir-1)) ;; #x0f8 + (vu-pair (mtir mtx-ptr pos-a.x) (itof0.xyzw vtx-color vtx-color)) ;; #x0f9 + (vu-pair (ilw.y vtx-flags lump-ptr -9) (maxx.xyzw clr-b clr-b vf00)) ;; #x0fa + (vu-pair (div Q light-dir-0.w pos-c.w) (add.zw pos-a pos-a vtx-bias-0)) ;; #x0fb + (vu-pair (move.xyzw xyzf-out pos-b) (add.xyzw clr-a clr-a vtx-bias-1)) ;; #x0fc + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (add.xyzw tex-a tex-a vtx-bias-2)) ;; #x0fd + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (mulax.xyzw ACC light-color-0 clr-b)) ;; #x0fe + (vu-pair (ibgtz vtx-flags mat1-pipeline-07) (madday.xyzw ACC light-color-1 clr-b)) ;; #x0ff + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (maddaz.xyzw ACC light-color-2 clr-b)) ;; #x100 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x101 + (label mat1-pipeline-07) + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (maddw.xyzw clr-b light-ambient vf00)) ;; #x102 + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (mul.xyz pos-c pos-c Q)) ;; #x103 + (vu-pair (mtir dst-a clr-a.x) (mul.xyzw tex-c tex-c Q)) ;; #x104 + (vu-pair (mtir dst2-a clr-a.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x105 + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (mul.xyzw clr-b clr-b vtx-color)) ;; #x106 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-c pos-c screen-offset)) ;; #x107 + (vu-pair (ibne vi00 vtx-flags mat1-pipeline-08) (mulaz.xyzw ACC nrm-mtx-0 pos-a)) ;; #x108 + (vu-pair (sq.xyzw xyzf-out dst-b 2) (maddaz.xyzw ACC nrm-mtx-1 clr-a)) ;; #x109 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-b)) ;; #x10a + (label mat1-pipeline-08) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-a nrm-mtx-2 tex-a)) ;; #x10b + (vu-pair (sq.xyzw tex-b dst-b 0) (miniy.xyzw clr-b clr-b vtx-bias-0)) ;; #x10c + (vu-pair (sq.xyzw tex-b dst2-b 0) (miniw.w pos-c pos-c light-dir-2)) ;; #x10d + (vu-pair (sq.xyzw xyzf-out dst2-b 2) (mulaw.xyzw ACC pos-mtx-0 pos-a)) ;; #x10e + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (mulw.xyzw clr-c clr-c rlength)) ;; #x10f + (vu-pair (erleng.xyz P clr-a) (ftoi0.xyzw clr-b clr-b)) ;; #x110 + (vu-pair (ibne mat1-end color-ptr mat1-pipeline-09) (maddaw.xyzw ACC pos-mtx-1 clr-a)) ;; #x111 + (vu-pair (mr32.z tex-a vf00) (maddw.xyzw pos-a pos-mtx-2 tex-a)) ;; #x112 + (vu-pair (ibne mat2-end color-ptr mat2-pipeline-15) (nop)) ;; #x113 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (nop)) ;; #x114 + (vu-pair (ibne mat3-end color-ptr mat3-pipeline-16) (nop)) ;; #x115 + (vu-pair (nop) (nop)) ;; #x116 + (vu-pair (b finish-mat2) (nop)) ;; #x117 + (vu-pair (nop) (nop)) ;; #x118 + (label mat1-pipeline-09) + (vu-pair (lqi.xyzw pos-b lump-ptr) (mulax.xyzw ACC light-dir-0 clr-c)) ;; #x119 + (vu-pair (sq.xyzw clr-b dst-b 1) (madday.xyzw ACC light-dir-1 clr-c)) ;; #x11a + (vu-pair (sq.xyzw clr-b dst2-b 1) (maddz.xyzw clr-c light-dir-2 clr-c)) ;; #x11b + (vu-pair (lqi.xyzw clr-b lump-ptr) (add.xyzw pos-a pos-a pos-mtx-3)) ;; #x11c + (vu-pair (lqi.xyzw tex-b lump-ptr) (maxw.w pos-c pos-c light-dir-1)) ;; #x11d + (vu-pair (mtir mtx-ptr pos-b.x) (itof0.xyzw vtx-color vtx-color)) ;; #x11e + (vu-pair (ilw.y vtx-flags lump-ptr -9) (maxx.xyzw clr-c clr-c vf00)) ;; #x11f + (vu-pair (div Q light-dir-0.w pos-a.w) (add.zw pos-b pos-b vtx-bias-0)) ;; #x120 + (vu-pair (move.xyzw xyzf-out pos-c) (add.xyzw clr-b clr-b vtx-bias-1)) ;; #x121 + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (add.xyzw tex-b tex-b vtx-bias-2)) ;; #x122 + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (mulax.xyzw ACC light-color-0 clr-c)) ;; #x123 + (vu-pair (ibgtz vtx-flags mat1-pipeline-10) (madday.xyzw ACC light-color-1 clr-c)) ;; #x124 + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (maddaz.xyzw ACC light-color-2 clr-c)) ;; #x125 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x126 + (label mat1-pipeline-10) + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (maddw.xyzw clr-c light-ambient vf00)) ;; #x127 + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (mul.xyz pos-a pos-a Q)) ;; #x128 + (vu-pair (mtir dst-b clr-b.x) (mul.xyzw tex-a tex-a Q)) ;; #x129 + (vu-pair (mtir dst2-b clr-b.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x12a + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (mul.xyzw clr-c clr-c vtx-color)) ;; #x12b + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-a pos-a screen-offset)) ;; #x12c + (vu-pair (ibne vi00 vtx-flags mat1-pipeline-11) (mulaz.xyzw ACC nrm-mtx-0 pos-b)) ;; #x12d + (vu-pair (sq.xyzw xyzf-out dst-c 2) (maddaz.xyzw ACC nrm-mtx-1 clr-b)) ;; #x12e + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-c)) ;; #x12f + (label mat1-pipeline-11) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-b nrm-mtx-2 tex-b)) ;; #x130 + (vu-pair (sq.xyzw tex-c dst-c 0) (miniy.xyzw clr-c clr-c vtx-bias-0)) ;; #x131 + (vu-pair (sq.xyzw tex-c dst2-c 0) (miniw.w pos-a pos-a light-dir-2)) ;; #x132 + (vu-pair (sq.xyzw xyzf-out dst2-c 2) (mulaw.xyzw ACC pos-mtx-0 pos-b)) ;; #x133 + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (mulw.xyzw clr-a clr-a rlength)) ;; #x134 + (vu-pair (erleng.xyz P clr-b) (ftoi0.xyzw clr-c clr-c)) ;; #x135 + (vu-pair (ibne mat1-end color-ptr mat1-pipeline-02) (maddaw.xyzw ACC pos-mtx-1 clr-b)) ;; #x136 + (vu-pair (mr32.z tex-b vf00) (maddw.xyzw pos-b pos-mtx-2 tex-b)) ;; #x137 + (vu-pair (ibne mat2-end color-ptr mat2-pipeline-04) (nop)) ;; #x138 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (nop)) ;; #x139 + (vu-pair (ibne mat3-end color-ptr mat3-pipeline-05) (nop)) ;; #x13a + (vu-pair (nop) (nop)) ;; #x13b + (vu-pair (b finish-mat3) (nop)) ;; #x13c + (vu-pair (nop) (nop))) ;; #x13d + ;; Two-matrix vertices. The two byte weights arrive in the weight stream, are converted with the 1/255 + ;; constant living in nrm-mtx-0's w lane, and then blend all seven quadwords of two matrices before + ;; the vertex takes the same path as a one-matrix vertex. dst-a and dst2-a carry the two matrix + ;; addresses first and become the output slots once the blend is running. + ;; + ;; A masked matrix index of exactly MERC-VU-MTX-INDEX-MASK means the blend already in the registers is + ;; the one this vertex wants, so the whole 22-load, 14-multiply-add sequence is skipped. The exporter + ;; sorts vertices to make that happen as often as it can; two-mat-reuse-count counts the wins. + (asm-block two-matrix-vertices + (label mat2-entry) + (vu-pair (ibeq vi00 mat2-end mat3-entry) (nop)) ;; #x13e + (vu-pair (iadd weight-ptr weight-ptr frag-header) (nop)) ;; #x13f + (vu-pair (lqi.xyzw pos-a lump-ptr) (nop)) ;; #x140 + (vu-pair (lqi.xyzw weights weight-ptr) (nop)) ;; #x141 + (vu-pair (lqi.xyzw clr-a lump-ptr) (nop)) ;; #x142 + (vu-pair (lqi.xyzw tex-a lump-ptr) (nop)) ;; #x143 + (vu-pair (mtir dst-a pos-a.x) (nop)) ;; #x144 + (vu-pair (mtir dst2-a pos-a.y) (itof0.xyzw weights weights)) ;; #x145 + (vu-pair (iaddi mat2-end mat2-end -0x1) (add.zw pos-a pos-a vtx-bias-0)) ;; #x146 + (vu-pair (nop) (add.xyzw clr-a clr-a vtx-bias-1)) ;; #x147 + (vu-pair (iand dst-a dst-a index-mask) (add.xyzw tex-a tex-a vtx-bias-2)) ;; #x148 + (vu-pair (nop) (mulw.xyzw weights weights nrm-mtx-0)) ;; #x149 + (vu-pair (iand dst2-a dst2-a index-mask) (nop)) ;; #x14a + (vu-pair (lq.xyzw vf20 dst-a 0) (nop)) ;; #x14b + (vu-pair (lq.xyzw pos-mtx-0 dst2-a 0) (nop)) ;; #x14c + (vu-pair (lq.xyzw vf23 dst-a 1) (nop)) ;; #x14d + (vu-pair (lq.xyzw pos-mtx-1 dst2-a 1) (nop)) ;; #x14e + (vu-pair (lq.xyzw vf20 dst-a 2) (mulax.xyzw ACC vf20 weights)) ;; #x14f + (vu-pair (lq.xyzw pos-mtx-2 dst2-a 2) (maddy.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x150 + (vu-pair (lq.xyzw vf23 dst-a 3) (mulax.xyzw ACC vf23 weights)) ;; #x151 + (vu-pair (lq.xyzw pos-mtx-3 dst2-a 3) (maddy.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x152 + (vu-pair (lq.xyzw vf20 dst-a 4) (mulax.xyzw ACC vf20 weights)) ;; #x153 + (vu-pair (lq.xyz nrm-mtx-0 dst2-a 4) (maddy.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x154 + (vu-pair (lq.xyzw vf23 dst-a 5) (mulax.xyzw ACC vf23 weights)) ;; #x155 + (vu-pair (lq.xyz nrm-mtx-1 dst2-a 5) (maddy.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x156 + (vu-pair (lq.xyzw vf20 dst-a 6) (mulax.xyzw ACC vf20 weights)) ;; #x157 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-a 6) (maddy.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x158 + (vu-pair (mtir dst-a clr-a.x) (mulax.xyzw ACC vf23 weights)) ;; #x159 + (vu-pair (mtir dst2-a clr-a.y) (maddy.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x15a + (vu-pair (nop) (mulax.xyzw ACC vf20 weights)) ;; #x15b + (vu-pair (nop) (maddy.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x15c + (vu-pair (nop) (mulaz.xyzw ACC nrm-mtx-0 pos-a)) ;; #x15d + (vu-pair (nop) (maddaz.xyzw ACC nrm-mtx-1 clr-a)) ;; #x15e + (vu-pair (nop) (maddz.xyz clr-a nrm-mtx-2 tex-a)) ;; #x15f + (vu-pair (nop) (nop)) ;; #x160 + (vu-pair (nop) (nop)) ;; #x161 + (vu-pair (nop) (mulaw.xyzw ACC pos-mtx-0 pos-a)) ;; #x162 + ;; The blend is shared between pipeline stages, so it returns through a register. The four possible + ;; return points are the two stages that can follow it, doubled by whether mercprime is on. + (vu-pair (iaddiu mtx-ptr vi00 (vu-label mat2-resume-c)) (nop)) ;; #x163 + (vu-pair (erleng.xyz P clr-a) (nop)) ;; #x164 + (vu-pair (ior dst2-c prime-entry vi00) (maddaw.xyzw ACC pos-mtx-1 clr-a)) ;; #x165 + (vu-pair (mr32.z tex-a vf00) (maddw.xyzw pos-a pos-mtx-2 tex-a)) ;; #x166 + (vu-pair (lqi.xyzw pos-b lump-ptr) (nop)) ;; #x167 + (vu-pair (ilwr.y color-ptr frag-header) (nop)) ;; #x168 + (vu-pair (ilw.z mat3-end frag-header 1) (nop)) ;; #x169 + (vu-pair (lqi.xyzw clr-b lump-ptr) (add.xyzw pos-a pos-a pos-mtx-3)) ;; #x16a + (vu-pair (lqi.xyzw tex-b lump-ptr) (nop)) ;; #x16b + (vu-pair (mtir dst-b pos-b.x) (nop)) ;; #x16c + (vu-pair (ibeq vi00 prime mat2-pipeline-01) (nop)) ;; #x16d + (vu-pair (mtir dst2-b pos-b.y) (nop)) ;; #x16e + (vu-pair (iaddiu mtx-ptr vi00 (vu-label mercprime-mat2-resume-c)) (miniw.w pos-a pos-a light-dir-0)) ;; #x16f + (label mat2-pipeline-01) + (vu-pair (div Q light-dir-0.w pos-a.w) (add.zw pos-b pos-b vtx-bias-0)) ;; #x170 + (vu-pair (iadd color-ptr color-ptr frag-header) (add.xyzw clr-b clr-b vtx-bias-1)) ;; #x171 + (vu-pair (iand dst-b dst-b index-mask) (add.xyzw tex-b tex-b vtx-bias-2)) ;; #x172 + (vu-pair (iadd mat2-end mat2-end color-ptr) (nop)) ;; #x173 + (vu-pair (iadd mat3-end mat3-end mat2-end) (nop)) ;; #x174 + (vu-pair (iand dst2-b dst2-b index-mask) (nop)) ;; #x175 + (vu-pair (ibne index-mask dst-b mat2-pipeline-02) (nop)) ;; #x176 + (vu-pair (nop) (mul.xyz pos-a pos-a Q)) ;; #x177 + (vu-pair (mtir dst-b clr-b.x) (mul.xyzw tex-a tex-a Q)) ;; #x178 + (vu-pair (mtir dst2-b clr-b.y) (nop)) ;; #x179 + (vu-pair (b mat2-pipeline-03) (nop)) ;; #x17a + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-a pos-a screen-offset)) ;; #x17b + (label mat2-pipeline-02) + (vu-pair (lq.xyzw vf20 dst-b 0) (mul.xyzw tex-a tex-a Q)) ;; #x17c + (vu-pair (lq.xyzw pos-mtx-0 dst2-b 0) (nop)) ;; #x17d + (vu-pair (lq.xyzw vf23 dst-b 1) (nop)) ;; #x17e + (vu-pair (lq.xyzw pos-mtx-1 dst2-b 1) (add.xyzw pos-a pos-a screen-offset)) ;; #x17f + (vu-pair (lq.xyzw vf20 dst-b 2) (mulaz.xyzw ACC vf20 weights)) ;; #x180 + (vu-pair (lq.xyzw pos-mtx-2 dst2-b 2) (maddw.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x181 + (vu-pair (lq.xyzw vf23 dst-b 3) (mulaz.xyzw ACC vf23 weights)) ;; #x182 + (vu-pair (lq.xyzw pos-mtx-3 dst2-b 3) (maddw.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x183 + (vu-pair (lq.xyzw vf20 dst-b 4) (mulaz.xyzw ACC vf20 weights)) ;; #x184 + (vu-pair (lq.xyz nrm-mtx-0 dst2-b 4) (maddw.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x185 + (vu-pair (lq.xyzw vf23 dst-b 5) (mulaz.xyzw ACC vf23 weights)) ;; #x186 + (vu-pair (lq.xyz nrm-mtx-1 dst2-b 5) (maddw.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x187 + (vu-pair (lq.xyzw vf20 dst-b 6) (mulaz.xyzw ACC vf20 weights)) ;; #x188 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-b 6) (maddw.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x189 + (vu-pair (lqi.xyzw vf23 weight-ptr) (mulaz.xyzw ACC vf23 weights)) ;; #x18a + (vu-pair (mtir dst-b clr-b.x) (maddw.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x18b + (vu-pair (mtir dst2-b clr-b.y) (mulaz.xyzw ACC vf20 weights)) ;; #x18c + (vu-pair (iaddiu mtx-ptr vi00 (vu-label mat2-resume-b)) (maddw.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x18d + (vu-pair (ibeq vi00 dst2-c mat2-pipeline-03) (nop)) ;; #x18e + (vu-pair (lqi.xyzw vtx-color color-ptr) (itof0.xyzw weights vtx-color)) ;; #x18f + (vu-pair (iaddiu mtx-ptr vi00 (vu-label mercprime-mat2-resume-b)) (nop)) ;; #x190 + (label mat2-pipeline-03) + (vu-pair (nop) (mulaz.xyzw ACC nrm-mtx-0 pos-b)) ;; #x191 + (vu-pair (nop) (maddaz.xyzw ACC nrm-mtx-1 clr-b)) ;; #x192 + (vu-pair (mfp.w rlength P) (maddz.xyz clr-b nrm-mtx-2 tex-b)) ;; #x193 + (vu-pair (nop) (nop)) ;; #x194 + (vu-pair (1024.0) (miniw.w pos-a pos-a light-dir-2 :i)) ;; #x195 + (vu-pair (ibne vi00 dst2-c mercprime-pipeline-11) (mulaw.xyzw ACC pos-mtx-0 pos-b)) ;; #x196 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-a clr-a rlength)) ;; #x197 + (vu-pair (erleng.xyz P clr-b) (nop)) ;; #x198 + (vu-pair (ibeq mat2-end color-ptr mat3-pipeline-04) (maddaw.xyzw ACC pos-mtx-1 clr-b)) ;; #x199 + (vu-pair (mr32.z tex-b vf00) (maddw.xyzw pos-b pos-mtx-2 tex-b)) ;; #x19a + (vu-pair (lqi.xyzw pos-c lump-ptr) (mulax.xyzw ACC light-dir-0 clr-a)) ;; #x19b + (vu-pair (jr mtx-ptr) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x19c + (vu-pair (nop) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x19d + (label mat2-pipeline-04) + (vu-pair (lqi.xyzw pos-c lump-ptr) (mulax.xyzw ACC light-dir-0 clr-a)) ;; #x19e + (vu-pair (sq.xyzw clr-c dst-c 1) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x19f + (vu-pair (sq.xyzw clr-c dst2-c 1) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x1a0 + (label mat2-pipeline-05) + (label mat2-resume-b) + (vu-pair (lqi.xyzw clr-c lump-ptr) (add.xyzw pos-b pos-b pos-mtx-3)) ;; #x1a1 + (vu-pair (lqi.xyzw tex-c lump-ptr) (maxw.w pos-a pos-a light-dir-1)) ;; #x1a2 + (vu-pair (mtir dst-c pos-c.x) (itof0.xyzw vtx-color vtx-color)) ;; #x1a3 + (vu-pair (mtir dst2-c pos-c.y) (maxx.xyzw clr-a clr-a vf00)) ;; #x1a4 + (vu-pair (div Q light-dir-0.w pos-b.w) (add.zw pos-c pos-c vtx-bias-0)) ;; #x1a5 + (vu-pair (move.xyzw xyzf-out pos-a) (add.xyzw clr-c clr-c vtx-bias-1)) ;; #x1a6 + (vu-pair (iand dst-c dst-c index-mask) (add.xyzw tex-c tex-c vtx-bias-2)) ;; #x1a7 + (vu-pair (nop) (mulax.xyzw ACC light-color-0 clr-a)) ;; #x1a8 + (vu-pair (ibgtz vtx-flags mat2-pipeline-06) (madday.xyzw ACC light-color-1 clr-a)) ;; #x1a9 + (vu-pair (iand dst2-c dst2-c index-mask) (maddaz.xyzw ACC light-color-2 clr-a)) ;; #x1aa + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x1ab + (label mat2-pipeline-06) + (vu-pair (ibne index-mask dst-c mat2-pipeline-07) (maddw.xyzw clr-a light-ambient vf00)) ;; #x1ac + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-b pos-b Q)) ;; #x1ad + (vu-pair (mtir dst-c clr-c.x) (mul.xyzw tex-b tex-b Q)) ;; #x1ae + (vu-pair (mtir dst2-c clr-c.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x1af + (vu-pair (b mat2-pipeline-08) (mul.xyzw clr-a clr-a vtx-color)) ;; #x1b0 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-b pos-b screen-offset)) ;; #x1b1 + (label mat2-pipeline-07) + (vu-pair (lq.xyzw vf20 dst-c 0) (mul.xyzw tex-b tex-b Q)) ;; #x1b2 + (vu-pair (nop) (mulw.xyzw weights weights nrm-mtx-0)) ;; #x1b3 + (vu-pair (lq.xyzw pos-mtx-0 dst2-c 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x1b4 + (vu-pair (lq.xyzw vtx-color dst-c 1) (mul.xyzw clr-a clr-a vtx-color)) ;; #x1b5 + (vu-pair (lq.xyzw pos-mtx-1 dst2-c 1) (add.xyzw pos-b pos-b screen-offset)) ;; #x1b6 + (vu-pair (lq.xyzw vf20 dst-c 2) (mulax.xyzw ACC vf20 weights)) ;; #x1b7 + (vu-pair (lq.xyzw pos-mtx-2 dst2-c 2) (maddy.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x1b8 + (vu-pair (lq.xyzw vf23 dst-c 3) (mulax.xyzw ACC vf23 weights)) ;; #x1b9 + (vu-pair (lq.xyzw pos-mtx-3 dst2-c 3) (maddy.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x1ba + (vu-pair (lq.xyzw vf20 dst-c 4) (mulax.xyzw ACC vf20 weights)) ;; #x1bb + (vu-pair (lq.xyz nrm-mtx-0 dst2-c 4) (maddy.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x1bc + (vu-pair (lq.xyzw vf23 dst-c 5) (mulax.xyzw ACC vf23 weights)) ;; #x1bd + (vu-pair (lq.xyz nrm-mtx-1 dst2-c 5) (maddy.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x1be + (vu-pair (lq.xyzw vf20 dst-c 6) (mulax.xyzw ACC vf20 weights)) ;; #x1bf + (vu-pair (lq.xyzw nrm-mtx-2 dst2-c 6) (maddy.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x1c0 + (vu-pair (mtir dst-c clr-c.x) (mulax.xyzw ACC vf23 weights)) ;; #x1c1 + (vu-pair (mtir dst2-c clr-c.y) (maddy.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x1c2 + (vu-pair (b mat2-pipeline-23) (mulax.xyzw ACC vf20 weights)) ;; #x1c3 + (vu-pair (lqi.xyzw vtx-color color-ptr) (maddy.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x1c4 + (label mat2-pipeline-08) + (vu-pair (ibgez vtx-flags mat2-pipeline-09) (mulaz.xyzw ACC nrm-mtx-0 pos-c)) ;; #x1c5 + (vu-pair (sq.xyzw xyzf-out dst-a 2) (maddaz.xyzw ACC nrm-mtx-1 clr-c)) ;; #x1c6 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-a)) ;; #x1c7 + (label mat2-pipeline-09) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-c nrm-mtx-2 tex-c)) ;; #x1c8 + (vu-pair (sq.xyzw tex-a dst-a 0) (miniy.xyzw clr-a clr-a vtx-bias-0)) ;; #x1c9 + (vu-pair (sq.xyzw tex-a dst2-a 0) (miniw.w pos-b pos-b light-dir-2)) ;; #x1ca + (vu-pair (sq.xyzw xyzf-out dst2-a 2) (mulaw.xyzw ACC pos-mtx-0 pos-c)) ;; #x1cb + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-b clr-b rlength)) ;; #x1cc + (vu-pair (erleng.xyz P clr-c) (ftoi0.xyzw clr-a clr-a)) ;; #x1cd + (vu-pair (ibne mat2-end color-ptr mat2-pipeline-10) (maddaw.xyzw ACC pos-mtx-1 clr-c)) ;; #x1ce + (vu-pair (mr32.z tex-c vf00) (maddw.xyzw pos-c pos-mtx-2 tex-c)) ;; #x1cf + (vu-pair (ibne mat3-end color-ptr mat3-pipeline-11) (nop)) ;; #x1d0 + (vu-pair (nop) (nop)) ;; #x1d1 + (vu-pair (b finish-mat1) (nop)) ;; #x1d2 + (vu-pair (nop) (nop)) ;; #x1d3 + (label mat2-pipeline-10) + (vu-pair (lqi.xyzw pos-a lump-ptr) (mulax.xyzw ACC light-dir-0 clr-b)) ;; #x1d4 + (vu-pair (sq.xyzw clr-a dst-a 1) (madday.xyzw ACC light-dir-1 clr-b)) ;; #x1d5 + (vu-pair (sq.xyzw clr-a dst2-a 1) (maddz.xyzw clr-b light-dir-2 clr-b)) ;; #x1d6 + (vu-pair (lqi.xyzw clr-a lump-ptr) (add.xyzw pos-c pos-c pos-mtx-3)) ;; #x1d7 + (vu-pair (lqi.xyzw tex-a lump-ptr) (maxw.w pos-b pos-b light-dir-1)) ;; #x1d8 + (vu-pair (mtir dst-a pos-a.x) (itof0.xyzw vtx-color vtx-color)) ;; #x1d9 + (vu-pair (mtir dst2-a pos-a.y) (maxx.xyzw clr-b clr-b vf00)) ;; #x1da + (vu-pair (div Q light-dir-0.w pos-c.w) (add.zw pos-a pos-a vtx-bias-0)) ;; #x1db + (vu-pair (move.xyzw xyzf-out pos-b) (add.xyzw clr-a clr-a vtx-bias-1)) ;; #x1dc + (vu-pair (iand dst-a dst-a index-mask) (add.xyzw tex-a tex-a vtx-bias-2)) ;; #x1dd + (vu-pair (nop) (mulax.xyzw ACC light-color-0 clr-b)) ;; #x1de + (vu-pair (ibgtz vtx-flags mat2-pipeline-11) (madday.xyzw ACC light-color-1 clr-b)) ;; #x1df + (vu-pair (iand dst2-a dst2-a index-mask) (maddaz.xyzw ACC light-color-2 clr-b)) ;; #x1e0 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x1e1 + (label mat2-pipeline-11) + (vu-pair (ibne index-mask dst-a mat2-pipeline-12) (maddw.xyzw clr-b light-ambient vf00)) ;; #x1e2 + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-c pos-c Q)) ;; #x1e3 + (vu-pair (mtir dst-a clr-a.x) (mul.xyzw tex-c tex-c Q)) ;; #x1e4 + (vu-pair (mtir dst2-a clr-a.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x1e5 + (vu-pair (b mat2-pipeline-13) (mul.xyzw clr-b clr-b vtx-color)) ;; #x1e6 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-c pos-c screen-offset)) ;; #x1e7 + (label mat2-pipeline-12) + (vu-pair (lq.xyzw vf20 dst-a 0) (mul.xyzw tex-c tex-c Q)) ;; #x1e8 + (vu-pair (nop) (mulw.xyzw weights weights nrm-mtx-0)) ;; #x1e9 + (vu-pair (lq.xyzw pos-mtx-0 dst2-a 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x1ea + (vu-pair (lq.xyzw vtx-color dst-a 1) (mul.xyzw clr-b clr-b vtx-color)) ;; #x1eb + (vu-pair (lq.xyzw pos-mtx-1 dst2-a 1) (add.xyzw pos-c pos-c screen-offset)) ;; #x1ec + (vu-pair (lq.xyzw vf20 dst-a 2) (mulax.xyzw ACC vf20 weights)) ;; #x1ed + (vu-pair (lq.xyzw pos-mtx-2 dst2-a 2) (maddy.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x1ee + (vu-pair (lq.xyzw vf23 dst-a 3) (mulax.xyzw ACC vf23 weights)) ;; #x1ef + (vu-pair (lq.xyzw pos-mtx-3 dst2-a 3) (maddy.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x1f0 + (vu-pair (lq.xyzw vf20 dst-a 4) (mulax.xyzw ACC vf20 weights)) ;; #x1f1 + (vu-pair (lq.xyz nrm-mtx-0 dst2-a 4) (maddy.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x1f2 + (vu-pair (lq.xyzw vf23 dst-a 5) (mulax.xyzw ACC vf23 weights)) ;; #x1f3 + (vu-pair (lq.xyz nrm-mtx-1 dst2-a 5) (maddy.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x1f4 + (vu-pair (lq.xyzw vf20 dst-a 6) (mulax.xyzw ACC vf20 weights)) ;; #x1f5 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-a 6) (maddy.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x1f6 + (vu-pair (mtir dst-a clr-a.x) (mulax.xyzw ACC vf23 weights)) ;; #x1f7 + (vu-pair (mtir dst2-a clr-a.y) (maddy.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x1f8 + (vu-pair (b mat2-pipeline-28) (mulax.xyzw ACC vf20 weights)) ;; #x1f9 + (vu-pair (lqi.xyzw vtx-color color-ptr) (maddy.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x1fa + (label mat2-pipeline-13) + (vu-pair (ibgez vtx-flags mat2-pipeline-14) (mulaz.xyzw ACC nrm-mtx-0 pos-a)) ;; #x1fb + (vu-pair (sq.xyzw xyzf-out dst-b 2) (maddaz.xyzw ACC nrm-mtx-1 clr-a)) ;; #x1fc + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-b)) ;; #x1fd + (label mat2-pipeline-14) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-a nrm-mtx-2 tex-a)) ;; #x1fe + (vu-pair (sq.xyzw tex-b dst-b 0) (miniy.xyzw clr-b clr-b vtx-bias-0)) ;; #x1ff + (vu-pair (sq.xyzw tex-b dst2-b 0) (miniw.w pos-c pos-c light-dir-2)) ;; #x200 + (vu-pair (sq.xyzw xyzf-out dst2-b 2) (mulaw.xyzw ACC pos-mtx-0 pos-a)) ;; #x201 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-c clr-c rlength)) ;; #x202 + (vu-pair (erleng.xyz P clr-a) (ftoi0.xyzw clr-b clr-b)) ;; #x203 + (vu-pair (ibne mat2-end color-ptr mat2-pipeline-15) (maddaw.xyzw ACC pos-mtx-1 clr-a)) ;; #x204 + (vu-pair (mr32.z tex-a vf00) (maddw.xyzw pos-a pos-mtx-2 tex-a)) ;; #x205 + (vu-pair (ibne mat3-end color-ptr mat3-pipeline-16) (nop)) ;; #x206 + (vu-pair (nop) (nop)) ;; #x207 + (vu-pair (b finish-mat2) (nop)) ;; #x208 + (vu-pair (nop) (nop)) ;; #x209 + (label mat2-pipeline-15) + (vu-pair (lqi.xyzw pos-b lump-ptr) (mulax.xyzw ACC light-dir-0 clr-c)) ;; #x20a + (vu-pair (sq.xyzw clr-b dst-b 1) (madday.xyzw ACC light-dir-1 clr-c)) ;; #x20b + (vu-pair (sq.xyzw clr-b dst2-b 1) (maddz.xyzw clr-c light-dir-2 clr-c)) ;; #x20c + (vu-pair (lqi.xyzw clr-b lump-ptr) (add.xyzw pos-a pos-a pos-mtx-3)) ;; #x20d + (vu-pair (lqi.xyzw tex-b lump-ptr) (maxw.w pos-c pos-c light-dir-1)) ;; #x20e + (vu-pair (mtir dst-b pos-b.x) (itof0.xyzw vtx-color vtx-color)) ;; #x20f + (vu-pair (mtir dst2-b pos-b.y) (maxx.xyzw clr-c clr-c vf00)) ;; #x210 + (vu-pair (div Q light-dir-0.w pos-a.w) (add.zw pos-b pos-b vtx-bias-0)) ;; #x211 + (vu-pair (move.xyzw xyzf-out pos-c) (add.xyzw clr-b clr-b vtx-bias-1)) ;; #x212 + (vu-pair (iand dst-b dst-b index-mask) (add.xyzw tex-b tex-b vtx-bias-2)) ;; #x213 + (vu-pair (nop) (mulax.xyzw ACC light-color-0 clr-c)) ;; #x214 + (vu-pair (ibgtz vtx-flags mat2-pipeline-16) (madday.xyzw ACC light-color-1 clr-c)) ;; #x215 + (vu-pair (iand dst2-b dst2-b index-mask) (maddaz.xyzw ACC light-color-2 clr-c)) ;; #x216 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x217 + (label mat2-pipeline-16) + (vu-pair (ibne index-mask dst-b mat2-pipeline-17) (maddw.xyzw clr-c light-ambient vf00)) ;; #x218 + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-a pos-a Q)) ;; #x219 + (vu-pair (mtir dst-b clr-b.x) (mul.xyzw tex-a tex-a Q)) ;; #x21a + (vu-pair (mtir dst2-b clr-b.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x21b + (vu-pair (b mat2-pipeline-18) (mul.xyzw clr-c clr-c vtx-color)) ;; #x21c + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-a pos-a screen-offset)) ;; #x21d + (label mat2-pipeline-17) + (vu-pair (lq.xyzw vf20 dst-b 0) (mul.xyzw tex-a tex-a Q)) ;; #x21e + (vu-pair (nop) (mulw.xyzw weights weights nrm-mtx-0)) ;; #x21f + (vu-pair (lq.xyzw pos-mtx-0 dst2-b 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x220 + (vu-pair (lq.xyzw vtx-color dst-b 1) (mul.xyzw clr-c clr-c vtx-color)) ;; #x221 + (vu-pair (lq.xyzw pos-mtx-1 dst2-b 1) (add.xyzw pos-a pos-a screen-offset)) ;; #x222 + (vu-pair (lq.xyzw vf20 dst-b 2) (mulax.xyzw ACC vf20 weights)) ;; #x223 + (vu-pair (lq.xyzw pos-mtx-2 dst2-b 2) (maddy.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x224 + (vu-pair (lq.xyzw vf23 dst-b 3) (mulax.xyzw ACC vf23 weights)) ;; #x225 + (vu-pair (lq.xyzw pos-mtx-3 dst2-b 3) (maddy.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x226 + (vu-pair (lq.xyzw vf20 dst-b 4) (mulax.xyzw ACC vf20 weights)) ;; #x227 + (vu-pair (lq.xyz nrm-mtx-0 dst2-b 4) (maddy.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x228 + (vu-pair (lq.xyzw vf23 dst-b 5) (mulax.xyzw ACC vf23 weights)) ;; #x229 + (vu-pair (lq.xyz nrm-mtx-1 dst2-b 5) (maddy.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x22a + (vu-pair (lq.xyzw vf20 dst-b 6) (mulax.xyzw ACC vf20 weights)) ;; #x22b + (vu-pair (lq.xyzw nrm-mtx-2 dst2-b 6) (maddy.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x22c + (vu-pair (mtir dst-b clr-b.x) (mulax.xyzw ACC vf23 weights)) ;; #x22d + (vu-pair (mtir dst2-b clr-b.y) (maddy.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x22e + (vu-pair (b mat2-pipeline-33) (mulax.xyzw ACC vf20 weights)) ;; #x22f + (vu-pair (lqi.xyzw vtx-color color-ptr) (maddy.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x230 + (label mat2-pipeline-18) + (vu-pair (ibgez vtx-flags mat2-pipeline-19) (mulaz.xyzw ACC nrm-mtx-0 pos-b)) ;; #x231 + (vu-pair (sq.xyzw xyzf-out dst-c 2) (maddaz.xyzw ACC nrm-mtx-1 clr-b)) ;; #x232 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-c)) ;; #x233 + (label mat2-pipeline-19) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-b nrm-mtx-2 tex-b)) ;; #x234 + (vu-pair (sq.xyzw tex-c dst-c 0) (miniy.xyzw clr-c clr-c vtx-bias-0)) ;; #x235 + (vu-pair (sq.xyzw tex-c dst2-c 0) (miniw.w pos-a pos-a light-dir-2)) ;; #x236 + (vu-pair (sq.xyzw xyzf-out dst2-c 2) (mulaw.xyzw ACC pos-mtx-0 pos-b)) ;; #x237 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-a clr-a rlength)) ;; #x238 + (vu-pair (erleng.xyz P clr-b) (ftoi0.xyzw clr-c clr-c)) ;; #x239 + (vu-pair (ibne mat2-end color-ptr mat2-pipeline-04) (maddaw.xyzw ACC pos-mtx-1 clr-b)) ;; #x23a + (vu-pair (mr32.z tex-b vf00) (maddw.xyzw pos-b pos-mtx-2 tex-b)) ;; #x23b + (vu-pair (ibne mat3-end color-ptr mat3-pipeline-05) (nop)) ;; #x23c + (vu-pair (nop) (nop)) ;; #x23d + (vu-pair (b finish-mat3) (nop)) ;; #x23e + (vu-pair (nop) (nop)) ;; #x23f + (label mat2-pipeline-20) + (vu-pair (lqi.xyzw pos-c lump-ptr) (mulax.xyzw ACC light-dir-0 clr-a)) ;; #x240 + (vu-pair (sq.xyzw clr-c dst-c 1) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x241 + (vu-pair (sq.xyzw clr-c dst2-c 1) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x242 + (label mat2-resume-c) + (vu-pair (lqi.xyzw clr-c lump-ptr) (add.xyzw pos-b pos-b pos-mtx-3)) ;; #x243 + (vu-pair (lqi.xyzw tex-c lump-ptr) (maxw.w pos-a pos-a light-dir-1)) ;; #x244 + (vu-pair (mtir dst-c pos-c.x) (itof0.xyzw vtx-color vtx-color)) ;; #x245 + (vu-pair (mtir dst2-c pos-c.y) (maxx.xyzw clr-a clr-a vf00)) ;; #x246 + (vu-pair (div Q light-dir-0.w pos-b.w) (add.zw pos-c pos-c vtx-bias-0)) ;; #x247 + (vu-pair (move.xyzw xyzf-out pos-a) (add.xyzw clr-c clr-c vtx-bias-1)) ;; #x248 + (vu-pair (iand dst-c dst-c index-mask) (add.xyzw tex-c tex-c vtx-bias-2)) ;; #x249 + (vu-pair (nop) (mulax.xyzw ACC light-color-0 clr-a)) ;; #x24a + (vu-pair (ibgtz vtx-flags mat2-pipeline-21) (madday.xyzw ACC light-color-1 clr-a)) ;; #x24b + (vu-pair (iand dst2-c dst2-c index-mask) (maddaz.xyzw ACC light-color-2 clr-a)) ;; #x24c + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x24d + (label mat2-pipeline-21) + (vu-pair (ibne index-mask dst-c mat2-pipeline-22) (maddw.xyzw clr-a light-ambient vf00)) ;; #x24e + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-b pos-b Q)) ;; #x24f + (vu-pair (mtir dst-c clr-c.x) (mul.xyzw tex-b tex-b Q)) ;; #x250 + (vu-pair (mtir dst2-c clr-c.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x251 + (vu-pair (b mat2-pipeline-23) (mul.xyzw clr-a clr-a vtx-color)) ;; #x252 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-b pos-b screen-offset)) ;; #x253 + (label mat2-pipeline-22) + (vu-pair (lq.xyzw vf20 dst-c 0) (mul.xyzw tex-b tex-b Q)) ;; #x254 + (vu-pair (lq.xyzw pos-mtx-0 dst2-c 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x255 + (vu-pair (lq.xyzw vtx-color dst-c 1) (mul.xyzw clr-a clr-a vtx-color)) ;; #x256 + (vu-pair (lq.xyzw pos-mtx-1 dst2-c 1) (add.xyzw pos-b pos-b screen-offset)) ;; #x257 + (vu-pair (lq.xyzw vf20 dst-c 2) (mulaz.xyzw ACC vf20 weights)) ;; #x258 + (vu-pair (lq.xyzw pos-mtx-2 dst2-c 2) (maddw.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x259 + (vu-pair (lq.xyzw vf23 dst-c 3) (mulaz.xyzw ACC vf23 weights)) ;; #x25a + (vu-pair (lq.xyzw pos-mtx-3 dst2-c 3) (maddw.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x25b + (vu-pair (lq.xyzw vf20 dst-c 4) (mulaz.xyzw ACC vf20 weights)) ;; #x25c + (vu-pair (lq.xyz nrm-mtx-0 dst2-c 4) (maddw.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x25d + (vu-pair (lq.xyzw vf23 dst-c 5) (mulaz.xyzw ACC vf23 weights)) ;; #x25e + (vu-pair (lq.xyz nrm-mtx-1 dst2-c 5) (maddw.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x25f + (vu-pair (lq.xyzw vf20 dst-c 6) (mulaz.xyzw ACC vf20 weights)) ;; #x260 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-c 6) (maddw.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x261 + (vu-pair (lqi.xyzw vf23 weight-ptr) (mulaz.xyzw ACC vf23 weights)) ;; #x262 + (vu-pair (mtir dst-c clr-c.x) (maddw.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x263 + (vu-pair (mtir dst2-c clr-c.y) (mulaz.xyzw ACC vf20 weights)) ;; #x264 + (vu-pair (b mat2-pipeline-08) (maddw.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x265 + (vu-pair (lqi.xyzw vtx-color color-ptr) (itof0.xyzw weights vtx-color)) ;; #x266 + (label mat2-pipeline-23) + (vu-pair (ibgez vtx-flags mat2-pipeline-24) (mulaz.xyzw ACC nrm-mtx-0 pos-c)) ;; #x267 + (vu-pair (sq.xyzw xyzf-out dst-a 2) (maddaz.xyzw ACC nrm-mtx-1 clr-c)) ;; #x268 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-a)) ;; #x269 + (label mat2-pipeline-24) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-c nrm-mtx-2 tex-c)) ;; #x26a + (vu-pair (sq.xyzw tex-a dst-a 0) (miniy.xyzw clr-a clr-a vtx-bias-0)) ;; #x26b + (vu-pair (sq.xyzw tex-a dst2-a 0) (miniw.w pos-b pos-b light-dir-2)) ;; #x26c + (vu-pair (sq.xyzw xyzf-out dst2-a 2) (mulaw.xyzw ACC pos-mtx-0 pos-c)) ;; #x26d + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-b clr-b rlength)) ;; #x26e + (vu-pair (erleng.xyz P clr-c) (ftoi0.xyzw clr-a clr-a)) ;; #x26f + (vu-pair (ibne mat2-end color-ptr mat2-pipeline-25) (maddaw.xyzw ACC pos-mtx-1 clr-c)) ;; #x270 + (vu-pair (mr32.z tex-c vf00) (maddw.xyzw pos-c pos-mtx-2 tex-c)) ;; #x271 + (vu-pair (ibne mat3-end color-ptr mat3-pipeline-11) (nop)) ;; #x272 + (vu-pair (nop) (nop)) ;; #x273 + (vu-pair (b finish-mat1) (nop)) ;; #x274 + (vu-pair (nop) (nop)) ;; #x275 + (label mat2-pipeline-25) + (vu-pair (lqi.xyzw pos-a lump-ptr) (mulax.xyzw ACC light-dir-0 clr-b)) ;; #x276 + (vu-pair (sq.xyzw clr-a dst-a 1) (madday.xyzw ACC light-dir-1 clr-b)) ;; #x277 + (vu-pair (sq.xyzw clr-a dst2-a 1) (maddz.xyzw clr-b light-dir-2 clr-b)) ;; #x278 + (vu-pair (lqi.xyzw clr-a lump-ptr) (add.xyzw pos-c pos-c pos-mtx-3)) ;; #x279 + (vu-pair (lqi.xyzw tex-a lump-ptr) (maxw.w pos-b pos-b light-dir-1)) ;; #x27a + (vu-pair (mtir dst-a pos-a.x) (itof0.xyzw vtx-color vtx-color)) ;; #x27b + (vu-pair (mtir dst2-a pos-a.y) (maxx.xyzw clr-b clr-b vf00)) ;; #x27c + (vu-pair (div Q light-dir-0.w pos-c.w) (add.zw pos-a pos-a vtx-bias-0)) ;; #x27d + (vu-pair (move.xyzw xyzf-out pos-b) (add.xyzw clr-a clr-a vtx-bias-1)) ;; #x27e + (vu-pair (iand dst-a dst-a index-mask) (add.xyzw tex-a tex-a vtx-bias-2)) ;; #x27f + (vu-pair (nop) (mulax.xyzw ACC light-color-0 clr-b)) ;; #x280 + (vu-pair (ibgtz vtx-flags mat2-pipeline-26) (madday.xyzw ACC light-color-1 clr-b)) ;; #x281 + (vu-pair (iand dst2-a dst2-a index-mask) (maddaz.xyzw ACC light-color-2 clr-b)) ;; #x282 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x283 + (label mat2-pipeline-26) + (vu-pair (ibne index-mask dst-a mat2-pipeline-27) (maddw.xyzw clr-b light-ambient vf00)) ;; #x284 + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-c pos-c Q)) ;; #x285 + (vu-pair (mtir dst-a clr-a.x) (mul.xyzw tex-c tex-c Q)) ;; #x286 + (vu-pair (mtir dst2-a clr-a.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x287 + (vu-pair (b mat2-pipeline-28) (mul.xyzw clr-b clr-b vtx-color)) ;; #x288 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-c pos-c screen-offset)) ;; #x289 + (label mat2-pipeline-27) + (vu-pair (lq.xyzw vf20 dst-a 0) (mul.xyzw tex-c tex-c Q)) ;; #x28a + (vu-pair (lq.xyzw pos-mtx-0 dst2-a 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x28b + (vu-pair (lq.xyzw vtx-color dst-a 1) (mul.xyzw clr-b clr-b vtx-color)) ;; #x28c + (vu-pair (lq.xyzw pos-mtx-1 dst2-a 1) (add.xyzw pos-c pos-c screen-offset)) ;; #x28d + (vu-pair (lq.xyzw vf20 dst-a 2) (mulaz.xyzw ACC vf20 weights)) ;; #x28e + (vu-pair (lq.xyzw pos-mtx-2 dst2-a 2) (maddw.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x28f + (vu-pair (lq.xyzw vf23 dst-a 3) (mulaz.xyzw ACC vf23 weights)) ;; #x290 + (vu-pair (lq.xyzw pos-mtx-3 dst2-a 3) (maddw.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x291 + (vu-pair (lq.xyzw vf20 dst-a 4) (mulaz.xyzw ACC vf20 weights)) ;; #x292 + (vu-pair (lq.xyz nrm-mtx-0 dst2-a 4) (maddw.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x293 + (vu-pair (lq.xyzw vf23 dst-a 5) (mulaz.xyzw ACC vf23 weights)) ;; #x294 + (vu-pair (lq.xyz nrm-mtx-1 dst2-a 5) (maddw.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x295 + (vu-pair (lq.xyzw vf20 dst-a 6) (mulaz.xyzw ACC vf20 weights)) ;; #x296 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-a 6) (maddw.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x297 + (vu-pair (lqi.xyzw vf23 weight-ptr) (mulaz.xyzw ACC vf23 weights)) ;; #x298 + (vu-pair (mtir dst-a clr-a.x) (maddw.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x299 + (vu-pair (mtir dst2-a clr-a.y) (mulaz.xyzw ACC vf20 weights)) ;; #x29a + (vu-pair (b mat2-pipeline-13) (maddw.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x29b + (vu-pair (lqi.xyzw vtx-color color-ptr) (itof0.xyzw weights vtx-color)) ;; #x29c + (label mat2-pipeline-28) + (vu-pair (ibgez vtx-flags mat2-pipeline-29) (mulaz.xyzw ACC nrm-mtx-0 pos-a)) ;; #x29d + (vu-pair (sq.xyzw xyzf-out dst-b 2) (maddaz.xyzw ACC nrm-mtx-1 clr-a)) ;; #x29e + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-b)) ;; #x29f + (label mat2-pipeline-29) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-a nrm-mtx-2 tex-a)) ;; #x2a0 + (vu-pair (sq.xyzw tex-b dst-b 0) (miniy.xyzw clr-b clr-b vtx-bias-0)) ;; #x2a1 + (vu-pair (sq.xyzw tex-b dst2-b 0) (miniw.w pos-c pos-c light-dir-2)) ;; #x2a2 + (vu-pair (sq.xyzw xyzf-out dst2-b 2) (mulaw.xyzw ACC pos-mtx-0 pos-a)) ;; #x2a3 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-c clr-c rlength)) ;; #x2a4 + (vu-pair (erleng.xyz P clr-a) (ftoi0.xyzw clr-b clr-b)) ;; #x2a5 + (vu-pair (ibne mat2-end color-ptr mat2-pipeline-30) (maddaw.xyzw ACC pos-mtx-1 clr-a)) ;; #x2a6 + (vu-pair (mr32.z tex-a vf00) (maddw.xyzw pos-a pos-mtx-2 tex-a)) ;; #x2a7 + (vu-pair (ibne mat3-end color-ptr mat3-pipeline-16) (nop)) ;; #x2a8 + (vu-pair (nop) (nop)) ;; #x2a9 + (vu-pair (b finish-mat2) (nop)) ;; #x2aa + (vu-pair (nop) (nop)) ;; #x2ab + (label mat2-pipeline-30) + (vu-pair (lqi.xyzw pos-b lump-ptr) (mulax.xyzw ACC light-dir-0 clr-c)) ;; #x2ac + (vu-pair (sq.xyzw clr-b dst-b 1) (madday.xyzw ACC light-dir-1 clr-c)) ;; #x2ad + (vu-pair (sq.xyzw clr-b dst2-b 1) (maddz.xyzw clr-c light-dir-2 clr-c)) ;; #x2ae + (vu-pair (lqi.xyzw clr-b lump-ptr) (add.xyzw pos-a pos-a pos-mtx-3)) ;; #x2af + (vu-pair (lqi.xyzw tex-b lump-ptr) (maxw.w pos-c pos-c light-dir-1)) ;; #x2b0 + (vu-pair (mtir dst-b pos-b.x) (itof0.xyzw vtx-color vtx-color)) ;; #x2b1 + (vu-pair (mtir dst2-b pos-b.y) (maxx.xyzw clr-c clr-c vf00)) ;; #x2b2 + (vu-pair (div Q light-dir-0.w pos-a.w) (add.zw pos-b pos-b vtx-bias-0)) ;; #x2b3 + (vu-pair (move.xyzw xyzf-out pos-c) (add.xyzw clr-b clr-b vtx-bias-1)) ;; #x2b4 + (vu-pair (iand dst-b dst-b index-mask) (add.xyzw tex-b tex-b vtx-bias-2)) ;; #x2b5 + (vu-pair (nop) (mulax.xyzw ACC light-color-0 clr-c)) ;; #x2b6 + (vu-pair (ibgtz vtx-flags mat2-pipeline-31) (madday.xyzw ACC light-color-1 clr-c)) ;; #x2b7 + (vu-pair (iand dst2-b dst2-b index-mask) (maddaz.xyzw ACC light-color-2 clr-c)) ;; #x2b8 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x2b9 + (label mat2-pipeline-31) + (vu-pair (ibne index-mask dst-b mat2-pipeline-32) (maddw.xyzw clr-c light-ambient vf00)) ;; #x2ba + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-a pos-a Q)) ;; #x2bb + (vu-pair (mtir dst-b clr-b.x) (mul.xyzw tex-a tex-a Q)) ;; #x2bc + (vu-pair (mtir dst2-b clr-b.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x2bd + (vu-pair (b mat2-pipeline-33) (mul.xyzw clr-c clr-c vtx-color)) ;; #x2be + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-a pos-a screen-offset)) ;; #x2bf + (label mat2-pipeline-32) + (vu-pair (lq.xyzw vf20 dst-b 0) (mul.xyzw tex-a tex-a Q)) ;; #x2c0 + (vu-pair (lq.xyzw pos-mtx-0 dst2-b 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x2c1 + (vu-pair (lq.xyzw vtx-color dst-b 1) (mul.xyzw clr-c clr-c vtx-color)) ;; #x2c2 + (vu-pair (lq.xyzw pos-mtx-1 dst2-b 1) (add.xyzw pos-a pos-a screen-offset)) ;; #x2c3 + (vu-pair (lq.xyzw vf20 dst-b 2) (mulaz.xyzw ACC vf20 weights)) ;; #x2c4 + (vu-pair (lq.xyzw pos-mtx-2 dst2-b 2) (maddw.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x2c5 + (vu-pair (lq.xyzw vf23 dst-b 3) (mulaz.xyzw ACC vf23 weights)) ;; #x2c6 + (vu-pair (lq.xyzw pos-mtx-3 dst2-b 3) (maddw.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x2c7 + (vu-pair (lq.xyzw vf20 dst-b 4) (mulaz.xyzw ACC vf20 weights)) ;; #x2c8 + (vu-pair (lq.xyz nrm-mtx-0 dst2-b 4) (maddw.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x2c9 + (vu-pair (lq.xyzw vf23 dst-b 5) (mulaz.xyzw ACC vf23 weights)) ;; #x2ca + (vu-pair (lq.xyz nrm-mtx-1 dst2-b 5) (maddw.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x2cb + (vu-pair (lq.xyzw vf20 dst-b 6) (mulaz.xyzw ACC vf20 weights)) ;; #x2cc + (vu-pair (lq.xyzw nrm-mtx-2 dst2-b 6) (maddw.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x2cd + (vu-pair (lqi.xyzw vf23 weight-ptr) (mulaz.xyzw ACC vf23 weights)) ;; #x2ce + (vu-pair (mtir dst-b clr-b.x) (maddw.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x2cf + (vu-pair (mtir dst2-b clr-b.y) (mulaz.xyzw ACC vf20 weights)) ;; #x2d0 + (vu-pair (b mat2-pipeline-18) (maddw.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x2d1 + (vu-pair (lqi.xyzw vtx-color color-ptr) (itof0.xyzw weights vtx-color)) ;; #x2d2 + (label mat2-pipeline-33) + (vu-pair (ibgez vtx-flags mat2-pipeline-34) (mulaz.xyzw ACC nrm-mtx-0 pos-b)) ;; #x2d3 + (vu-pair (sq.xyzw xyzf-out dst-c 2) (maddaz.xyzw ACC nrm-mtx-1 clr-b)) ;; #x2d4 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-c)) ;; #x2d5 + (label mat2-pipeline-34) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-b nrm-mtx-2 tex-b)) ;; #x2d6 + (vu-pair (sq.xyzw tex-c dst-c 0) (miniy.xyzw clr-c clr-c vtx-bias-0)) ;; #x2d7 + (vu-pair (sq.xyzw tex-c dst2-c 0) (miniw.w pos-a pos-a light-dir-2)) ;; #x2d8 + (vu-pair (sq.xyzw xyzf-out dst2-c 2) (mulaw.xyzw ACC pos-mtx-0 pos-b)) ;; #x2d9 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-a clr-a rlength)) ;; #x2da + (vu-pair (erleng.xyz P clr-b) (ftoi0.xyzw clr-c clr-c)) ;; #x2db + (vu-pair (ibne mat2-end color-ptr mat2-pipeline-20) (maddaw.xyzw ACC pos-mtx-1 clr-b)) ;; #x2dc + (vu-pair (mr32.z tex-b vf00) (maddw.xyzw pos-b pos-mtx-2 tex-b)) ;; #x2dd + (vu-pair (ibne mat3-end color-ptr mat3-pipeline-11) (nop)) ;; #x2de + (vu-pair (nop) (nop)) ;; #x2df + (vu-pair (b finish-mat3) (nop)) ;; #x2e0 + (vu-pair (nop) (nop))) ;; #x2e1 + ;; Three-matrix vertices. Only two matrix addresses fit in the vertex, so the third rides in the w + ;; lane of the weight quadword. Everything else is the two-matrix path with one more multiply-add per + ;; row. + (asm-block three-matrix-vertices + (label mat3-entry) + (vu-pair (lqi.xyzw pos-a lump-ptr) (nop)) ;; #x2e2 + (vu-pair (lqi.xyzw weights weight-ptr) (nop)) ;; #x2e3 + (vu-pair (lqi.xyzw clr-a lump-ptr) (nop)) ;; #x2e4 + (vu-pair (lqi.xyzw tex-a lump-ptr) (nop)) ;; #x2e5 + (vu-pair (mtir dst-a pos-a.x) (nop)) ;; #x2e6 + (vu-pair (mtir dst2-a pos-a.y) (itof0.xyzw weights weights)) ;; #x2e7 + (vu-pair (nop) (add.zw pos-a pos-a vtx-bias-0)) ;; #x2e8 + (vu-pair (nop) (add.xyzw clr-a clr-a vtx-bias-1)) ;; #x2e9 + (vu-pair (iand dst-a dst-a index-mask) (add.xyzw tex-a tex-a vtx-bias-2)) ;; #x2ea + (vu-pair (ilw.w mtx-ptr weight-ptr -1) (mulw.xyzw weights weights nrm-mtx-0)) ;; #x2eb + (vu-pair (iand dst2-a dst2-a index-mask) (nop)) ;; #x2ec + (vu-pair (lq.xyzw vf20 dst-a 0) (nop)) ;; #x2ed + (vu-pair (lq.xyzw nrm-mtx-2 dst2-a 0) (nop)) ;; #x2ee + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (nop)) ;; #x2ef + (vu-pair (lq.xyzw vf23 dst-a 1) (nop)) ;; #x2f0 + (vu-pair (lq.xyzw vf20 dst2-a 1) (mulax.xyzw ACC vf20 weights)) ;; #x2f1 + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x2f2 + (vu-pair (lq.xyzw nrm-mtx-2 dst-a 2) (maddz.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x2f3 + (vu-pair (lq.xyzw vf23 dst2-a 2) (mulax.xyzw ACC vf23 weights)) ;; #x2f4 + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (madday.xyzw ACC vf20 weights)) ;; #x2f5 + (vu-pair (lq.xyzw vf20 dst-a 3) (maddz.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x2f6 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-a 3) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x2f7 + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (madday.xyzw ACC vf23 weights)) ;; #x2f8 + (vu-pair (lq.xyzw vf23 dst-a 4) (maddz.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x2f9 + (vu-pair (lq.xyzw vf20 dst2-a 4) (mulax.xyzw ACC vf20 weights)) ;; #x2fa + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x2fb + (vu-pair (lq.xyzw nrm-mtx-2 dst-a 5) (maddz.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x2fc + (vu-pair (lq.xyzw vf23 dst2-a 5) (mulax.xyzw ACC vf23 weights)) ;; #x2fd + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (madday.xyzw ACC vf20 weights)) ;; #x2fe + (vu-pair (lq.xyzw vf20 dst-a 6) (maddz.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x2ff + ;; The three-matrix blend needs one more register than it has, so it borrows the GS offset for a row + ;; and reloads it from low memory immediately afterwards. + (vu-pair (lq.xyzw vf22 dst2-a 6) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x300 + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (madday.xyzw ACC vf23 weights)) ;; #x301 + (vu-pair (lqi.xyzw vf23 weight-ptr) (maddz.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x302 + (vu-pair (mtir dst-a clr-a.x) (mulax.xyzw ACC vf20 weights)) ;; #x303 + (vu-pair (mtir dst2-a clr-a.y) (madday.xyzw ACC screen-offset weights)) ;; #x304 + (vu-pair (lq.xyzw vf22 vi00 MERC-VU-HVDF-OFFSET) (maddz.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x305 + (vu-pair (nop) (itof0.xyzw weights vtx-color)) ;; #x306 + (vu-pair (nop) (mulaz.xyzw ACC nrm-mtx-0 pos-a)) ;; #x307 + (vu-pair (nop) (maddaz.xyzw ACC nrm-mtx-1 clr-a)) ;; #x308 + (vu-pair (nop) (maddz.xyz clr-a nrm-mtx-2 tex-a)) ;; #x309 + (vu-pair (nop) (nop)) ;; #x30a + (vu-pair (nop) (nop)) ;; #x30b + (vu-pair (nop) (mulaw.xyzw ACC pos-mtx-0 pos-a)) ;; #x30c + (vu-pair (nop) (nop)) ;; #x30d + (vu-pair (erleng.xyz P clr-a) (nop)) ;; #x30e + (vu-pair (ior dst2-c prime-entry vi00) (maddaw.xyzw ACC pos-mtx-1 clr-a)) ;; #x30f + (vu-pair (mr32.z tex-a vf00) (maddw.xyzw pos-a pos-mtx-2 tex-a)) ;; #x310 + (vu-pair (lqi.xyzw pos-b lump-ptr) (nop)) ;; #x311 + (vu-pair (ilwr.y color-ptr frag-header) (nop)) ;; #x312 + (vu-pair (ilw.z mat3-end frag-header 1) (nop)) ;; #x313 + (vu-pair (lqi.xyzw clr-b lump-ptr) (add.xyzw pos-a pos-a pos-mtx-3)) ;; #x314 + (vu-pair (lqi.xyzw tex-b lump-ptr) (nop)) ;; #x315 + (vu-pair (mtir dst-b pos-b.x) (nop)) ;; #x316 + (vu-pair (ibeq vi00 prime mat3-pipeline-01) (nop)) ;; #x317 + (vu-pair (mtir dst2-b pos-b.y) (nop)) ;; #x318 + (vu-pair (nop) (miniw.w pos-a pos-a light-dir-0)) ;; #x319 + (label mat3-pipeline-01) + (vu-pair (div Q light-dir-0.w pos-a.w) (add.zw pos-b pos-b vtx-bias-0)) ;; #x31a + (vu-pair (iadd color-ptr color-ptr frag-header) (add.xyzw clr-b clr-b vtx-bias-1)) ;; #x31b + (vu-pair (iand dst-b dst-b index-mask) (add.xyzw tex-b tex-b vtx-bias-2)) ;; #x31c + (vu-pair (ilw.w mtx-ptr weight-ptr -1) (nop)) ;; #x31d + (vu-pair (iadd mat3-end mat3-end color-ptr) (nop)) ;; #x31e + (vu-pair (iand dst2-b dst2-b index-mask) (nop)) ;; #x31f + (vu-pair (ibne index-mask dst-b mat3-pipeline-02) (nop)) ;; #x320 + (vu-pair (iaddi mat3-end mat3-end -0x1) (mul.xyz pos-a pos-a Q)) ;; #x321 + (vu-pair (mtir dst-b clr-b.x) (mul.xyzw tex-a tex-a Q)) ;; #x322 + (vu-pair (mtir dst2-b clr-b.y) (nop)) ;; #x323 + (vu-pair (b mat3-pipeline-03) (nop)) ;; #x324 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-a pos-a screen-offset)) ;; #x325 + (label mat3-pipeline-02) + (vu-pair (lq.xyzw vf20 dst-b 0) (mul.xyzw tex-a tex-a Q)) ;; #x326 + (vu-pair (nop) (mulw.xyzw weights weights nrm-mtx-0)) ;; #x327 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-b 0) (nop)) ;; #x328 + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (nop)) ;; #x329 + (vu-pair (lq.xyzw vf23 dst-b 1) (add.xyzw pos-a pos-a screen-offset)) ;; #x32a + (vu-pair (lq.xyzw vf20 dst2-b 1) (mulax.xyzw ACC vf20 weights)) ;; #x32b + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x32c + (vu-pair (lq.xyzw nrm-mtx-2 dst-b 2) (maddz.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x32d + (vu-pair (lq.xyzw vf23 dst2-b 2) (mulax.xyzw ACC vf23 weights)) ;; #x32e + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (madday.xyzw ACC vf20 weights)) ;; #x32f + (vu-pair (lq.xyzw vf20 dst-b 3) (maddz.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x330 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-b 3) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x331 + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (madday.xyzw ACC vf23 weights)) ;; #x332 + (vu-pair (lq.xyzw vf23 dst-b 4) (maddz.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x333 + (vu-pair (lq.xyzw vf20 dst2-b 4) (mulax.xyzw ACC vf20 weights)) ;; #x334 + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x335 + (vu-pair (lq.xyzw nrm-mtx-2 dst-b 5) (maddz.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x336 + (vu-pair (lq.xyzw vf23 dst2-b 5) (mulax.xyzw ACC vf23 weights)) ;; #x337 + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (madday.xyzw ACC vf20 weights)) ;; #x338 + (vu-pair (lq.xyzw vf20 dst-b 6) (maddz.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x339 + (vu-pair (lq.xyzw screen-offset dst2-b 6) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x33a + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (madday.xyzw ACC vf23 weights)) ;; #x33b + (vu-pair (lqi.xyzw vf23 weight-ptr) (maddz.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x33c + (vu-pair (mtir dst-b clr-b.x) (mulax.xyzw ACC vf20 weights)) ;; #x33d + (vu-pair (mtir dst2-b clr-b.y) (madday.xyzw ACC screen-offset weights)) ;; #x33e + (vu-pair (lq.xyzw vf22 vi00 2) (maddz.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x33f + (vu-pair (lqi.xyzw vtx-color color-ptr) (itof0.xyzw weights vtx-color)) ;; #x340 + (label mat3-pipeline-03) + (vu-pair (nop) (mulaz.xyzw ACC nrm-mtx-0 pos-b)) ;; #x341 + (vu-pair (nop) (maddaz.xyzw ACC nrm-mtx-1 clr-b)) ;; #x342 + (vu-pair (mfp.w rlength P) (maddz.xyz clr-b nrm-mtx-2 tex-b)) ;; #x343 + (vu-pair (nop) (nop)) ;; #x344 + (vu-pair (1024.0) (miniw.w pos-a pos-a light-dir-2 :i)) ;; #x345 + (vu-pair (ibne vi00 dst2-c mercprime-pipeline-43) (mulaw.xyzw ACC pos-mtx-0 pos-b)) ;; #x346 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-a clr-a rlength)) ;; #x347 + (vu-pair (erleng.xyz P clr-b) (nop)) ;; #x348 + (vu-pair (nop) (maddaw.xyzw ACC pos-mtx-1 clr-b)) ;; #x349 + (vu-pair (mr32.z tex-b vf00) (maddw.xyzw pos-b pos-mtx-2 tex-b)) ;; #x34a + (label mat3-pipeline-04) + (vu-pair (lqi.xyzw pos-c lump-ptr) (mulax.xyzw ACC light-dir-0 clr-a)) ;; #x34b + (vu-pair (b mat3-pipeline-06) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x34c + (vu-pair (nop) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x34d + (label mat3-pipeline-05) + (vu-pair (lqi.xyzw pos-c lump-ptr) (mulax.xyzw ACC light-dir-0 clr-a)) ;; #x34e + (vu-pair (sq.xyzw clr-c dst-c 1) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x34f + (vu-pair (sq.xyzw clr-c dst2-c 1) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x350 + (label mat3-pipeline-06) + (vu-pair (lqi.xyzw clr-c lump-ptr) (add.xyzw pos-b pos-b pos-mtx-3)) ;; #x351 + (vu-pair (lqi.xyzw tex-c lump-ptr) (maxw.w pos-a pos-a light-dir-1)) ;; #x352 + (vu-pair (mtir dst-c pos-c.x) (itof0.xyzw vtx-color vtx-color)) ;; #x353 + (vu-pair (mtir dst2-c pos-c.y) (maxx.xyzw clr-a clr-a vf00)) ;; #x354 + (vu-pair (div Q light-dir-0.w pos-b.w) (add.zw pos-c pos-c vtx-bias-0)) ;; #x355 + (vu-pair (move.xyzw xyzf-out pos-a) (add.xyzw clr-c clr-c vtx-bias-1)) ;; #x356 + (vu-pair (iand dst-c dst-c index-mask) (add.xyzw tex-c tex-c vtx-bias-2)) ;; #x357 + (vu-pair (ilw.w mtx-ptr weight-ptr -1) (mulax.xyzw ACC light-color-0 clr-a)) ;; #x358 + (vu-pair (ibgtz vtx-flags mat3-pipeline-07) (madday.xyzw ACC light-color-1 clr-a)) ;; #x359 + (vu-pair (iand dst2-c dst2-c index-mask) (maddaz.xyzw ACC light-color-2 clr-a)) ;; #x35a + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x35b + (label mat3-pipeline-07) + (vu-pair (ibne index-mask dst-c mat3-pipeline-08) (maddw.xyzw clr-a light-ambient vf00)) ;; #x35c + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-b pos-b Q)) ;; #x35d + (vu-pair (mtir dst-c clr-c.x) (mul.xyzw tex-b tex-b Q)) ;; #x35e + (vu-pair (mtir dst2-c clr-c.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x35f + (vu-pair (b mat3-pipeline-09) (mul.xyzw clr-a clr-a vtx-color)) ;; #x360 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-b pos-b screen-offset)) ;; #x361 + (label mat3-pipeline-08) + (vu-pair (lq.xyzw vf20 dst-c 0) (mul.xyzw tex-b tex-b Q)) ;; #x362 + (vu-pair (nop) (mulw.xyzw weights weights nrm-mtx-0)) ;; #x363 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-c 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x364 + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (mul.xyzw clr-a clr-a vtx-color)) ;; #x365 + (vu-pair (lq.xyzw vf23 dst-c 1) (add.xyzw pos-b pos-b screen-offset)) ;; #x366 + (vu-pair (lq.xyzw vf20 dst2-c 1) (mulax.xyzw ACC vf20 weights)) ;; #x367 + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x368 + (vu-pair (lq.xyzw nrm-mtx-2 dst-c 2) (maddz.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x369 + (vu-pair (lq.xyzw vf23 dst2-c 2) (mulax.xyzw ACC vf23 weights)) ;; #x36a + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (madday.xyzw ACC vf20 weights)) ;; #x36b + (vu-pair (lq.xyzw vf20 dst-c 3) (maddz.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x36c + (vu-pair (lq.xyzw nrm-mtx-2 dst2-c 3) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x36d + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (madday.xyzw ACC vf23 weights)) ;; #x36e + (vu-pair (lq.xyzw vf23 dst-c 4) (maddz.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x36f + (vu-pair (lq.xyzw vf20 dst2-c 4) (mulax.xyzw ACC vf20 weights)) ;; #x370 + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x371 + (vu-pair (lq.xyzw nrm-mtx-2 dst-c 5) (maddz.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x372 + (vu-pair (lq.xyzw vf23 dst2-c 5) (mulax.xyzw ACC vf23 weights)) ;; #x373 + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (madday.xyzw ACC vf20 weights)) ;; #x374 + (vu-pair (lq.xyzw vf20 dst-c 6) (maddz.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x375 + (vu-pair (lq.xyzw screen-offset dst2-c 6) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x376 + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (madday.xyzw ACC vf23 weights)) ;; #x377 + (vu-pair (lqi.xyzw vf23 weight-ptr) (maddz.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x378 + (vu-pair (mtir dst-c clr-c.x) (mulax.xyzw ACC vf20 weights)) ;; #x379 + (vu-pair (mtir dst2-c clr-c.y) (madday.xyzw ACC screen-offset weights)) ;; #x37a + (vu-pair (lq.xyzw vf22 vi00 2) (maddz.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x37b + (vu-pair (lqi.xyzw vtx-color color-ptr) (itof0.xyzw weights vtx-color)) ;; #x37c + (label mat3-pipeline-09) + (vu-pair (ibgez vtx-flags mat3-pipeline-10) (mulaz.xyzw ACC nrm-mtx-0 pos-c)) ;; #x37d + (vu-pair (sq.xyzw xyzf-out dst-a 2) (maddaz.xyzw ACC nrm-mtx-1 clr-c)) ;; #x37e + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-a)) ;; #x37f + (label mat3-pipeline-10) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-c nrm-mtx-2 tex-c)) ;; #x380 + (vu-pair (sq.xyzw tex-a dst-a 0) (miniy.xyzw clr-a clr-a vtx-bias-0)) ;; #x381 + (vu-pair (sq.xyzw tex-a dst2-a 0) (miniw.w pos-b pos-b light-dir-2)) ;; #x382 + (vu-pair (sq.xyzw xyzf-out dst2-a 2) (mulaw.xyzw ACC pos-mtx-0 pos-c)) ;; #x383 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-b clr-b rlength)) ;; #x384 + (vu-pair (erleng.xyz P clr-c) (ftoi0.xyzw clr-a clr-a)) ;; #x385 + (vu-pair (ibeq mat3-end color-ptr finish-mat1) (maddaw.xyzw ACC pos-mtx-1 clr-c)) ;; #x386 + (vu-pair (mr32.z tex-c vf00) (maddw.xyzw pos-c pos-mtx-2 tex-c)) ;; #x387 + (label mat3-pipeline-11) + (vu-pair (lqi.xyzw pos-a lump-ptr) (mulax.xyzw ACC light-dir-0 clr-b)) ;; #x388 + (vu-pair (sq.xyzw clr-a dst-a 1) (madday.xyzw ACC light-dir-1 clr-b)) ;; #x389 + (vu-pair (sq.xyzw clr-a dst2-a 1) (maddz.xyzw clr-b light-dir-2 clr-b)) ;; #x38a + (vu-pair (lqi.xyzw clr-a lump-ptr) (add.xyzw pos-c pos-c pos-mtx-3)) ;; #x38b + (vu-pair (lqi.xyzw tex-a lump-ptr) (maxw.w pos-b pos-b light-dir-1)) ;; #x38c + (vu-pair (mtir dst-a pos-a.x) (itof0.xyzw vtx-color vtx-color)) ;; #x38d + (vu-pair (mtir dst2-a pos-a.y) (maxx.xyzw clr-b clr-b vf00)) ;; #x38e + (vu-pair (div Q light-dir-0.w pos-c.w) (add.zw pos-a pos-a vtx-bias-0)) ;; #x38f + (vu-pair (move.xyzw xyzf-out pos-b) (add.xyzw clr-a clr-a vtx-bias-1)) ;; #x390 + (vu-pair (iand dst-a dst-a index-mask) (add.xyzw tex-a tex-a vtx-bias-2)) ;; #x391 + (vu-pair (ilw.w mtx-ptr weight-ptr -1) (mulax.xyzw ACC light-color-0 clr-b)) ;; #x392 + (vu-pair (ibgtz vtx-flags mat3-pipeline-12) (madday.xyzw ACC light-color-1 clr-b)) ;; #x393 + (vu-pair (iand dst2-a dst2-a index-mask) (maddaz.xyzw ACC light-color-2 clr-b)) ;; #x394 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x395 + (label mat3-pipeline-12) + (vu-pair (ibne index-mask dst-a mat3-pipeline-13) (maddw.xyzw clr-b light-ambient vf00)) ;; #x396 + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-c pos-c Q)) ;; #x397 + (vu-pair (mtir dst-a clr-a.x) (mul.xyzw tex-c tex-c Q)) ;; #x398 + (vu-pair (mtir dst2-a clr-a.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x399 + (vu-pair (b mat3-pipeline-14) (mul.xyzw clr-b clr-b vtx-color)) ;; #x39a + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-c pos-c screen-offset)) ;; #x39b + (label mat3-pipeline-13) + (vu-pair (lq.xyzw vf20 dst-a 0) (mul.xyzw tex-c tex-c Q)) ;; #x39c + (vu-pair (nop) (mulw.xyzw weights weights nrm-mtx-0)) ;; #x39d + (vu-pair (lq.xyzw nrm-mtx-2 dst2-a 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x39e + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (mul.xyzw clr-b clr-b vtx-color)) ;; #x39f + (vu-pair (lq.xyzw vf23 dst-a 1) (add.xyzw pos-c pos-c screen-offset)) ;; #x3a0 + (vu-pair (lq.xyzw vf20 dst2-a 1) (mulax.xyzw ACC vf20 weights)) ;; #x3a1 + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x3a2 + (vu-pair (lq.xyzw nrm-mtx-2 dst-a 2) (maddz.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x3a3 + (vu-pair (lq.xyzw vf23 dst2-a 2) (mulax.xyzw ACC vf23 weights)) ;; #x3a4 + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (madday.xyzw ACC vf20 weights)) ;; #x3a5 + (vu-pair (lq.xyzw vf20 dst-a 3) (maddz.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x3a6 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-a 3) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x3a7 + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (madday.xyzw ACC vf23 weights)) ;; #x3a8 + (vu-pair (lq.xyzw vf23 dst-a 4) (maddz.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x3a9 + (vu-pair (lq.xyzw vf20 dst2-a 4) (mulax.xyzw ACC vf20 weights)) ;; #x3aa + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x3ab + (vu-pair (lq.xyzw nrm-mtx-2 dst-a 5) (maddz.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x3ac + (vu-pair (lq.xyzw vf23 dst2-a 5) (mulax.xyzw ACC vf23 weights)) ;; #x3ad + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (madday.xyzw ACC vf20 weights)) ;; #x3ae + (vu-pair (lq.xyzw vf20 dst-a 6) (maddz.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x3af + (vu-pair (lq.xyzw vf22 dst2-a 6) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x3b0 + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (madday.xyzw ACC vf23 weights)) ;; #x3b1 + (vu-pair (lqi.xyzw vf23 weight-ptr) (maddz.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x3b2 + (vu-pair (mtir dst-a clr-a.x) (mulax.xyzw ACC vf20 weights)) ;; #x3b3 + (vu-pair (mtir dst2-a clr-a.y) (madday.xyzw ACC screen-offset weights)) ;; #x3b4 + (vu-pair (lq.xyzw vf22 vi00 2) (maddz.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x3b5 + (vu-pair (lqi.xyzw vtx-color color-ptr) (itof0.xyzw weights vtx-color)) ;; #x3b6 + (label mat3-pipeline-14) + (vu-pair (ibgez vtx-flags mat3-pipeline-15) (mulaz.xyzw ACC nrm-mtx-0 pos-a)) ;; #x3b7 + (vu-pair (sq.xyzw xyzf-out dst-b 2) (maddaz.xyzw ACC nrm-mtx-1 clr-a)) ;; #x3b8 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-b)) ;; #x3b9 + (label mat3-pipeline-15) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-a nrm-mtx-2 tex-a)) ;; #x3ba + (vu-pair (sq.xyzw tex-b dst-b 0) (miniy.xyzw clr-b clr-b vtx-bias-0)) ;; #x3bb + (vu-pair (sq.xyzw tex-b dst2-b 0) (miniw.w pos-c pos-c light-dir-2)) ;; #x3bc + (vu-pair (sq.xyzw xyzf-out dst2-b 2) (mulaw.xyzw ACC pos-mtx-0 pos-a)) ;; #x3bd + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-c clr-c rlength)) ;; #x3be + (vu-pair (erleng.xyz P clr-a) (ftoi0.xyzw clr-b clr-b)) ;; #x3bf + (vu-pair (ibeq mat3-end color-ptr finish-mat2) (maddaw.xyzw ACC pos-mtx-1 clr-a)) ;; #x3c0 + (vu-pair (mr32.z tex-a vf00) (maddw.xyzw pos-a pos-mtx-2 tex-a)) ;; #x3c1 + (label mat3-pipeline-16) + (vu-pair (lqi.xyzw pos-b lump-ptr) (mulax.xyzw ACC light-dir-0 clr-c)) ;; #x3c2 + (vu-pair (sq.xyzw clr-b dst-b 1) (madday.xyzw ACC light-dir-1 clr-c)) ;; #x3c3 + (vu-pair (sq.xyzw clr-b dst2-b 1) (maddz.xyzw clr-c light-dir-2 clr-c)) ;; #x3c4 + (vu-pair (lqi.xyzw clr-b lump-ptr) (add.xyzw pos-a pos-a pos-mtx-3)) ;; #x3c5 + (vu-pair (lqi.xyzw tex-b lump-ptr) (maxw.w pos-c pos-c light-dir-1)) ;; #x3c6 + (vu-pair (mtir dst-b pos-b.x) (itof0.xyzw vtx-color vtx-color)) ;; #x3c7 + (vu-pair (mtir dst2-b pos-b.y) (maxx.xyzw clr-c clr-c vf00)) ;; #x3c8 + (vu-pair (div Q light-dir-0.w pos-a.w) (add.zw pos-b pos-b vtx-bias-0)) ;; #x3c9 + (vu-pair (move.xyzw xyzf-out pos-c) (add.xyzw clr-b clr-b vtx-bias-1)) ;; #x3ca + (vu-pair (iand dst-b dst-b index-mask) (add.xyzw tex-b tex-b vtx-bias-2)) ;; #x3cb + (vu-pair (ilw.w mtx-ptr weight-ptr -1) (mulax.xyzw ACC light-color-0 clr-c)) ;; #x3cc + (vu-pair (ibgtz vtx-flags mat3-pipeline-17) (madday.xyzw ACC light-color-1 clr-c)) ;; #x3cd + (vu-pair (iand dst2-b dst2-b index-mask) (maddaz.xyzw ACC light-color-2 clr-c)) ;; #x3ce + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x3cf + (label mat3-pipeline-17) + (vu-pair (ibne index-mask dst-b mat3-pipeline-18) (maddw.xyzw clr-c light-ambient vf00)) ;; #x3d0 + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-a pos-a Q)) ;; #x3d1 + (vu-pair (mtir dst-b clr-b.x) (mul.xyzw tex-a tex-a Q)) ;; #x3d2 + (vu-pair (mtir dst2-b clr-b.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x3d3 + (vu-pair (b mat3-pipeline-19) (mul.xyzw clr-c clr-c vtx-color)) ;; #x3d4 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-a pos-a screen-offset)) ;; #x3d5 + (label mat3-pipeline-18) + (vu-pair (lq.xyzw vf20 dst-b 0) (mul.xyzw tex-a tex-a Q)) ;; #x3d6 + (vu-pair (nop) (mulw.xyzw weights weights nrm-mtx-0)) ;; #x3d7 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-b 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x3d8 + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (mul.xyzw clr-c clr-c vtx-color)) ;; #x3d9 + (vu-pair (lq.xyzw vf23 dst-b 1) (add.xyzw pos-a pos-a screen-offset)) ;; #x3da + (vu-pair (lq.xyzw vf20 dst2-b 1) (mulax.xyzw ACC vf20 weights)) ;; #x3db + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x3dc + (vu-pair (lq.xyzw nrm-mtx-2 dst-b 2) (maddz.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x3dd + (vu-pair (lq.xyzw vf23 dst2-b 2) (mulax.xyzw ACC vf23 weights)) ;; #x3de + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (madday.xyzw ACC vf20 weights)) ;; #x3df + (vu-pair (lq.xyzw vf20 dst-b 3) (maddz.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x3e0 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-b 3) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x3e1 + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (madday.xyzw ACC vf23 weights)) ;; #x3e2 + (vu-pair (lq.xyzw vf23 dst-b 4) (maddz.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x3e3 + (vu-pair (lq.xyzw vf20 dst2-b 4) (mulax.xyzw ACC vf20 weights)) ;; #x3e4 + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x3e5 + (vu-pair (lq.xyzw nrm-mtx-2 dst-b 5) (maddz.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x3e6 + (vu-pair (lq.xyzw vf23 dst2-b 5) (mulax.xyzw ACC vf23 weights)) ;; #x3e7 + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (madday.xyzw ACC vf20 weights)) ;; #x3e8 + (vu-pair (lq.xyzw vf20 dst-b 6) (maddz.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x3e9 + (vu-pair (lq.xyzw screen-offset dst2-b 6) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x3ea + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (madday.xyzw ACC vf23 weights)) ;; #x3eb + (vu-pair (lqi.xyzw vf23 weight-ptr) (maddz.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x3ec + (vu-pair (mtir dst-b clr-b.x) (mulax.xyzw ACC vf20 weights)) ;; #x3ed + (vu-pair (mtir dst2-b clr-b.y) (madday.xyzw ACC screen-offset weights)) ;; #x3ee + (vu-pair (lq.xyzw vf22 vi00 2) (maddz.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x3ef + (vu-pair (lqi.xyzw vtx-color color-ptr) (itof0.xyzw weights vtx-color)) ;; #x3f0 + (label mat3-pipeline-19) + (vu-pair (ibgez vtx-flags mat3-pipeline-20) (mulaz.xyzw ACC nrm-mtx-0 pos-b)) ;; #x3f1 + (vu-pair (sq.xyzw xyzf-out dst-c 2) (maddaz.xyzw ACC nrm-mtx-1 clr-b)) ;; #x3f2 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-c)) ;; #x3f3 + (label mat3-pipeline-20) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-b nrm-mtx-2 tex-b)) ;; #x3f4 + (vu-pair (sq.xyzw tex-c dst-c 0) (miniy.xyzw clr-c clr-c vtx-bias-0)) ;; #x3f5 + (vu-pair (sq.xyzw tex-c dst2-c 0) (miniw.w pos-a pos-a light-dir-2)) ;; #x3f6 + (vu-pair (sq.xyzw xyzf-out dst2-c 2) (mulaw.xyzw ACC pos-mtx-0 pos-b)) ;; #x3f7 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-a clr-a rlength)) ;; #x3f8 + (vu-pair (erleng.xyz P clr-b) (ftoi0.xyzw clr-c clr-c)) ;; #x3f9 + (vu-pair (ibne mat3-end color-ptr mat3-pipeline-05) (maddaw.xyzw ACC pos-mtx-1 clr-b)) ;; #x3fa + (vu-pair (mr32.z tex-b vf00) (maddw.xyzw pos-b pos-mtx-2 tex-b)) ;; #x3fb + (vu-pair (b finish-mat3) (nop)) ;; #x3fc + (vu-pair (nop) (nop))) ;; #x3fd + ;; mercprime. This is the whole vertex pipeline again -- all three influence counts -- with two clamps + ;; added: w to at most pfog0 before the divide, and projected x and y into [1024, 3072] pixels after + ;; it. That range is comfortably inside what a GS 12.4 coordinate can express, so scissoring finishes + ;; the job that clipping would otherwise have to do. Geometry crossing the frustum edge is bent + ;; rather than cut, and draw-bones-check-longest-edge-asm is what decides that the bend is too small + ;; to see; when it is not, the effect goes to the generic renderer and never reaches this code. + ;; + ;; The two clamp values are loaded through the I register, which supplies the constant to the pair + ;; after the one that carries it. + (asm-block mercprime-vertices + (label mercprime-entry) + (vu-pair (erleng.xyz P clr-b) (maxi.xy pos-a pos-a I)) ;; #x3fe + (vu-pair (3072.0) (nop :i)) ;; #x3ff + (vu-pair (nop) (minii.xy pos-a pos-a I)) ;; #x400 + (vu-pair (nop) (maddaw.xyzw ACC pos-mtx-1 clr-b)) ;; #x401 + (vu-pair (mr32.z tex-b vf00) (maddw.xyzw pos-b pos-mtx-2 tex-b)) ;; #x402 + (vu-pair (lqi.xyzw pos-c lump-ptr) (mulax.xyzw ACC light-dir-0 clr-a)) ;; #x403 + (vu-pair (ibne mat1-end color-ptr mercprime-pipeline-02) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x404 + (vu-pair (nop) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x405 + (vu-pair (ibne mat2-end color-ptr mercprime-pipeline-13) (nop)) ;; #x406 + (vu-pair (nop) (nop)) ;; #x407 + (vu-pair (b mercprime-pipeline-46) (nop)) ;; #x408 + (vu-pair (nop) (nop)) ;; #x409 + (label mercprime-pipeline-01) + (vu-pair (3072.0) (mulax.xyzw ACC light-dir-0 clr-a :i)) ;; #x40a + (vu-pair (lqi.xyzw pos-c lump-ptr) (minii.xy pos-a pos-a I)) ;; #x40b + (vu-pair (sq.xyzw clr-c dst-c 1) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x40c + (vu-pair (sq.xyzw clr-c dst2-c 1) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x40d + (label mercprime-pipeline-02) + (vu-pair (lqi.xyzw clr-c lump-ptr) (add.xyzw pos-b pos-b pos-mtx-3)) ;; #x40e + (vu-pair (lqi.xyzw tex-c lump-ptr) (maxw.w pos-a pos-a light-dir-1)) ;; #x40f + (vu-pair (mtir mtx-ptr pos-c.x) (itof0.xyzw vtx-color vtx-color)) ;; #x410 + (vu-pair (ilw.y vtx-flags lump-ptr -9) (maxx.xyzw clr-a clr-a vf00)) ;; #x411 + (vu-pair (nop) (miniw.w pos-b pos-b light-dir-0)) ;; #x412 + (vu-pair (div Q light-dir-0.w pos-b.w) (add.zw pos-c pos-c vtx-bias-0)) ;; #x413 + (vu-pair (move.xyzw xyzf-out pos-a) (add.xyzw clr-c clr-c vtx-bias-1)) ;; #x414 + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (add.xyzw tex-c tex-c vtx-bias-2)) ;; #x415 + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (mulax.xyzw ACC light-color-0 clr-a)) ;; #x416 + (vu-pair (ibgtz vtx-flags mercprime-pipeline-03) (madday.xyzw ACC light-color-1 clr-a)) ;; #x417 + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (maddaz.xyzw ACC light-color-2 clr-a)) ;; #x418 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x419 + (label mercprime-pipeline-03) + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (maddw.xyzw clr-a light-ambient vf00)) ;; #x41a + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (mul.xyz pos-b pos-b Q)) ;; #x41b + (vu-pair (mtir dst-c clr-c.x) (mul.xyzw tex-b tex-b Q)) ;; #x41c + (vu-pair (mtir dst2-c clr-c.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x41d + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (mul.xyzw clr-a clr-a vtx-color)) ;; #x41e + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-b pos-b screen-offset)) ;; #x41f + (vu-pair (ibne vi00 vtx-flags mercprime-pipeline-04) (mulaz.xyzw ACC nrm-mtx-0 pos-c)) ;; #x420 + (vu-pair (sq.xyzw xyzf-out dst-a 2) (maddaz.xyzw ACC nrm-mtx-1 clr-c)) ;; #x421 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-a)) ;; #x422 + (label mercprime-pipeline-04) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-c nrm-mtx-2 tex-c)) ;; #x423 + (vu-pair (sq.xyzw tex-a dst-a 0) (miniy.xyzw clr-a clr-a vtx-bias-0)) ;; #x424 + (vu-pair (sq.xyzw tex-a dst2-a 0) (miniw.w pos-b pos-b light-dir-2)) ;; #x425 + (vu-pair (sq.xyzw xyzf-out dst2-a 2) (mulaw.xyzw ACC pos-mtx-0 pos-c)) ;; #x426 + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (mulw.xyzw clr-b clr-b rlength)) ;; #x427 + (vu-pair (1024.0) (ftoi0.xyzw clr-a clr-a :i)) ;; #x428 + (vu-pair (erleng.xyz P clr-c) (maxi.xy pos-b pos-b I)) ;; #x429 + (vu-pair (ibne mat1-end color-ptr mercprime-pipeline-05) (maddaw.xyzw ACC pos-mtx-1 clr-c)) ;; #x42a + (vu-pair (mr32.z tex-c vf00) (maddw.xyzw pos-c pos-mtx-2 tex-c)) ;; #x42b + (vu-pair (ibne mat2-end color-ptr mercprime-pipeline-18) (nop)) ;; #x42c + (vu-pair (ilw.y vtx-flags lump-ptr -6) (nop)) ;; #x42d + (vu-pair (ibne mat3-end color-ptr mercprime-pipeline-51) (nop)) ;; #x42e + (vu-pair (nop) (nop)) ;; #x42f + (vu-pair (b finish-mat1) (nop)) ;; #x430 + (vu-pair (nop) (nop)) ;; #x431 + (label mercprime-pipeline-05) + (vu-pair (3072.0) (mulax.xyzw ACC light-dir-0 clr-b :i)) ;; #x432 + (vu-pair (lqi.xyzw pos-a lump-ptr) (minii.xy pos-b pos-b I)) ;; #x433 + (vu-pair (sq.xyzw clr-a dst-a 1) (madday.xyzw ACC light-dir-1 clr-b)) ;; #x434 + (vu-pair (sq.xyzw clr-a dst2-a 1) (maddz.xyzw clr-b light-dir-2 clr-b)) ;; #x435 + (vu-pair (lqi.xyzw clr-a lump-ptr) (add.xyzw pos-c pos-c pos-mtx-3)) ;; #x436 + (vu-pair (lqi.xyzw tex-a lump-ptr) (maxw.w pos-b pos-b light-dir-1)) ;; #x437 + (vu-pair (mtir mtx-ptr pos-a.x) (itof0.xyzw vtx-color vtx-color)) ;; #x438 + (vu-pair (ilw.y vtx-flags lump-ptr -9) (maxx.xyzw clr-b clr-b vf00)) ;; #x439 + (vu-pair (nop) (miniw.w pos-c pos-c light-dir-0)) ;; #x43a + (vu-pair (div Q light-dir-0.w pos-c.w) (add.zw pos-a pos-a vtx-bias-0)) ;; #x43b + (vu-pair (move.xyzw xyzf-out pos-b) (add.xyzw clr-a clr-a vtx-bias-1)) ;; #x43c + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (add.xyzw tex-a tex-a vtx-bias-2)) ;; #x43d + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (mulax.xyzw ACC light-color-0 clr-b)) ;; #x43e + (vu-pair (ibgtz vtx-flags mercprime-pipeline-06) (madday.xyzw ACC light-color-1 clr-b)) ;; #x43f + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (maddaz.xyzw ACC light-color-2 clr-b)) ;; #x440 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x441 + (label mercprime-pipeline-06) + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (maddw.xyzw clr-b light-ambient vf00)) ;; #x442 + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (mul.xyz pos-c pos-c Q)) ;; #x443 + (vu-pair (mtir dst-a clr-a.x) (mul.xyzw tex-c tex-c Q)) ;; #x444 + (vu-pair (mtir dst2-a clr-a.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x445 + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (mul.xyzw clr-b clr-b vtx-color)) ;; #x446 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-c pos-c screen-offset)) ;; #x447 + (vu-pair (ibne vi00 vtx-flags mercprime-pipeline-07) (mulaz.xyzw ACC nrm-mtx-0 pos-a)) ;; #x448 + (vu-pair (sq.xyzw xyzf-out dst-b 2) (maddaz.xyzw ACC nrm-mtx-1 clr-a)) ;; #x449 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-b)) ;; #x44a + (label mercprime-pipeline-07) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-a nrm-mtx-2 tex-a)) ;; #x44b + (vu-pair (sq.xyzw tex-b dst-b 0) (miniy.xyzw clr-b clr-b vtx-bias-0)) ;; #x44c + (vu-pair (sq.xyzw tex-b dst2-b 0) (miniw.w pos-c pos-c light-dir-2)) ;; #x44d + (vu-pair (sq.xyzw xyzf-out dst2-b 2) (mulaw.xyzw ACC pos-mtx-0 pos-a)) ;; #x44e + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (mulw.xyzw clr-c clr-c rlength)) ;; #x44f + (vu-pair (1024.0) (ftoi0.xyzw clr-b clr-b :i)) ;; #x450 + (vu-pair (erleng.xyz P clr-a) (maxi.xy pos-c pos-c I)) ;; #x451 + (vu-pair (ibne mat1-end color-ptr mercprime-pipeline-08) (maddaw.xyzw ACC pos-mtx-1 clr-a)) ;; #x452 + (vu-pair (mr32.z tex-a vf00) (maddw.xyzw pos-a pos-mtx-2 tex-a)) ;; #x453 + (vu-pair (ibne mat2-end color-ptr mercprime-pipeline-23) (nop)) ;; #x454 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (nop)) ;; #x455 + (vu-pair (ibne mat3-end color-ptr mercprime-pipeline-56) (nop)) ;; #x456 + (vu-pair (nop) (nop)) ;; #x457 + (vu-pair (b finish-mat2) (nop)) ;; #x458 + (vu-pair (nop) (nop)) ;; #x459 + (label mercprime-pipeline-08) + (vu-pair (3072.0) (mulax.xyzw ACC light-dir-0 clr-c :i)) ;; #x45a + (vu-pair (lqi.xyzw pos-b lump-ptr) (minii.xy pos-c pos-c I)) ;; #x45b + (vu-pair (sq.xyzw clr-b dst-b 1) (madday.xyzw ACC light-dir-1 clr-c)) ;; #x45c + (vu-pair (sq.xyzw clr-b dst2-b 1) (maddz.xyzw clr-c light-dir-2 clr-c)) ;; #x45d + (vu-pair (lqi.xyzw clr-b lump-ptr) (add.xyzw pos-a pos-a pos-mtx-3)) ;; #x45e + (vu-pair (lqi.xyzw tex-b lump-ptr) (maxw.w pos-c pos-c light-dir-1)) ;; #x45f + (vu-pair (mtir mtx-ptr pos-b.x) (itof0.xyzw vtx-color vtx-color)) ;; #x460 + (vu-pair (ilw.y vtx-flags lump-ptr -9) (maxx.xyzw clr-c clr-c vf00)) ;; #x461 + (vu-pair (nop) (miniw.w pos-a pos-a light-dir-0)) ;; #x462 + (vu-pair (div Q light-dir-0.w pos-a.w) (add.zw pos-b pos-b vtx-bias-0)) ;; #x463 + (vu-pair (move.xyzw xyzf-out pos-c) (add.xyzw clr-b clr-b vtx-bias-1)) ;; #x464 + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (add.xyzw tex-b tex-b vtx-bias-2)) ;; #x465 + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (mulax.xyzw ACC light-color-0 clr-c)) ;; #x466 + (vu-pair (ibgtz vtx-flags mercprime-pipeline-09) (madday.xyzw ACC light-color-1 clr-c)) ;; #x467 + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (maddaz.xyzw ACC light-color-2 clr-c)) ;; #x468 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x469 + (label mercprime-pipeline-09) + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (maddw.xyzw clr-c light-ambient vf00)) ;; #x46a + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (mul.xyz pos-a pos-a Q)) ;; #x46b + (vu-pair (mtir dst-b clr-b.x) (mul.xyzw tex-a tex-a Q)) ;; #x46c + (vu-pair (mtir dst2-b clr-b.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x46d + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (mul.xyzw clr-c clr-c vtx-color)) ;; #x46e + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-a pos-a screen-offset)) ;; #x46f + (vu-pair (ibne vi00 vtx-flags mercprime-pipeline-10) (mulaz.xyzw ACC nrm-mtx-0 pos-b)) ;; #x470 + (vu-pair (sq.xyzw xyzf-out dst-c 2) (maddaz.xyzw ACC nrm-mtx-1 clr-b)) ;; #x471 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-c)) ;; #x472 + (label mercprime-pipeline-10) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-b nrm-mtx-2 tex-b)) ;; #x473 + (vu-pair (sq.xyzw tex-c dst-c 0) (miniy.xyzw clr-c clr-c vtx-bias-0)) ;; #x474 + (vu-pair (sq.xyzw tex-c dst2-c 0) (miniw.w pos-a pos-a light-dir-2)) ;; #x475 + (vu-pair (sq.xyzw xyzf-out dst2-c 2) (mulaw.xyzw ACC pos-mtx-0 pos-b)) ;; #x476 + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (mulw.xyzw clr-a clr-a rlength)) ;; #x477 + (vu-pair (1024.0) (ftoi0.xyzw clr-c clr-c :i)) ;; #x478 + (vu-pair (erleng.xyz P clr-b) (maxi.xy pos-a pos-a I)) ;; #x479 + (vu-pair (ibne mat1-end color-ptr mercprime-pipeline-01) (maddaw.xyzw ACC pos-mtx-1 clr-b)) ;; #x47a + (vu-pair (mr32.z tex-b vf00) (maddw.xyzw pos-b pos-mtx-2 tex-b)) ;; #x47b + (vu-pair (ibne mat2-end color-ptr mercprime-pipeline-12) (nop)) ;; #x47c + (vu-pair (ilw.y vtx-flags lump-ptr -6) (nop)) ;; #x47d + (vu-pair (ibne mat3-end color-ptr mercprime-pipeline-45) (nop)) ;; #x47e + (vu-pair (nop) (nop)) ;; #x47f + (vu-pair (b finish-mat3) (nop)) ;; #x480 + (vu-pair (nop) (nop)) ;; #x481 + (label mercprime-pipeline-11) + (vu-pair (erleng.xyz P clr-b) (maxi.xy pos-a pos-a I)) ;; #x482 + (vu-pair (3072.0) (nop :i)) ;; #x483 + (vu-pair (nop) (minii.xy pos-a pos-a I)) ;; #x484 + (vu-pair (ibeq mat2-end color-ptr mercprime-pipeline-44) (maddaw.xyzw ACC pos-mtx-1 clr-b)) ;; #x485 + (vu-pair (mr32.z tex-b vf00) (maddw.xyzw pos-b pos-mtx-2 tex-b)) ;; #x486 + (vu-pair (lqi.xyzw pos-c lump-ptr) (mulax.xyzw ACC light-dir-0 clr-a)) ;; #x487 + (vu-pair (jr mtx-ptr) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x488 + (vu-pair (nop) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x489 + (label mercprime-pipeline-12) + (vu-pair (3072.0) (mulax.xyzw ACC light-dir-0 clr-a :i)) ;; #x48a + (vu-pair (lqi.xyzw pos-c lump-ptr) (minii.xy pos-a pos-a I)) ;; #x48b + (vu-pair (sq.xyzw clr-c dst-c 1) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x48c + (vu-pair (sq.xyzw clr-c dst2-c 1) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x48d + (label mercprime-pipeline-13) + (label mercprime-mat2-resume-b) + (vu-pair (lqi.xyzw clr-c lump-ptr) (add.xyzw pos-b pos-b pos-mtx-3)) ;; #x48e + (vu-pair (lqi.xyzw tex-c lump-ptr) (maxw.w pos-a pos-a light-dir-1)) ;; #x48f + (vu-pair (mtir dst-c pos-c.x) (itof0.xyzw vtx-color vtx-color)) ;; #x490 + (vu-pair (mtir dst2-c pos-c.y) (maxx.xyzw clr-a clr-a vf00)) ;; #x491 + (vu-pair (nop) (miniw.w pos-b pos-b light-dir-0)) ;; #x492 + (vu-pair (div Q light-dir-0.w pos-b.w) (add.zw pos-c pos-c vtx-bias-0)) ;; #x493 + (vu-pair (move.xyzw xyzf-out pos-a) (add.xyzw clr-c clr-c vtx-bias-1)) ;; #x494 + (vu-pair (iand dst-c dst-c index-mask) (add.xyzw tex-c tex-c vtx-bias-2)) ;; #x495 + (vu-pair (nop) (mulax.xyzw ACC light-color-0 clr-a)) ;; #x496 + (vu-pair (ibgtz vtx-flags mercprime-pipeline-14) (madday.xyzw ACC light-color-1 clr-a)) ;; #x497 + (vu-pair (iand dst2-c dst2-c index-mask) (maddaz.xyzw ACC light-color-2 clr-a)) ;; #x498 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x499 + (label mercprime-pipeline-14) + (vu-pair (ibne index-mask dst-c mercprime-pipeline-15) (maddw.xyzw clr-a light-ambient vf00)) ;; #x49a + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-b pos-b Q)) ;; #x49b + (vu-pair (mtir dst-c clr-c.x) (mul.xyzw tex-b tex-b Q)) ;; #x49c + (vu-pair (mtir dst2-c clr-c.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x49d + (vu-pair (b mercprime-pipeline-16) (mul.xyzw clr-a clr-a vtx-color)) ;; #x49e + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-b pos-b screen-offset)) ;; #x49f + (label mercprime-pipeline-15) + (vu-pair (lq.xyzw vf20 dst-c 0) (mul.xyzw tex-b tex-b Q)) ;; #x4a0 + (vu-pair (nop) (mulw.xyzw weights weights nrm-mtx-0)) ;; #x4a1 + (vu-pair (lq.xyzw pos-mtx-0 dst2-c 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x4a2 + (vu-pair (lq.xyzw vtx-color dst-c 1) (mul.xyzw clr-a clr-a vtx-color)) ;; #x4a3 + (vu-pair (lq.xyzw pos-mtx-1 dst2-c 1) (add.xyzw pos-b pos-b screen-offset)) ;; #x4a4 + (vu-pair (lq.xyzw vf20 dst-c 2) (mulax.xyzw ACC vf20 weights)) ;; #x4a5 + (vu-pair (lq.xyzw pos-mtx-2 dst2-c 2) (maddy.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x4a6 + (vu-pair (lq.xyzw vf23 dst-c 3) (mulax.xyzw ACC vf23 weights)) ;; #x4a7 + (vu-pair (lq.xyzw pos-mtx-3 dst2-c 3) (maddy.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x4a8 + (vu-pair (lq.xyzw vf20 dst-c 4) (mulax.xyzw ACC vf20 weights)) ;; #x4a9 + (vu-pair (lq.xyz nrm-mtx-0 dst2-c 4) (maddy.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x4aa + (vu-pair (lq.xyzw vf23 dst-c 5) (mulax.xyzw ACC vf23 weights)) ;; #x4ab + (vu-pair (lq.xyz nrm-mtx-1 dst2-c 5) (maddy.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x4ac + (vu-pair (lq.xyzw vf20 dst-c 6) (mulax.xyzw ACC vf20 weights)) ;; #x4ad + (vu-pair (lq.xyzw nrm-mtx-2 dst2-c 6) (maddy.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x4ae + (vu-pair (mtir dst-c clr-c.x) (mulax.xyzw ACC vf23 weights)) ;; #x4af + (vu-pair (mtir dst2-c clr-c.y) (maddy.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x4b0 + (vu-pair (b mercprime-pipeline-31) (mulax.xyzw ACC vf20 weights)) ;; #x4b1 + (vu-pair (lqi.xyzw vtx-color color-ptr) (maddy.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x4b2 + (label mercprime-pipeline-16) + (vu-pair (ibgez vtx-flags mercprime-pipeline-17) (mulaz.xyzw ACC nrm-mtx-0 pos-c)) ;; #x4b3 + (vu-pair (sq.xyzw xyzf-out dst-a 2) (maddaz.xyzw ACC nrm-mtx-1 clr-c)) ;; #x4b4 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-a)) ;; #x4b5 + (label mercprime-pipeline-17) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-c nrm-mtx-2 tex-c)) ;; #x4b6 + (vu-pair (sq.xyzw tex-a dst-a 0) (miniy.xyzw clr-a clr-a vtx-bias-0)) ;; #x4b7 + (vu-pair (sq.xyzw tex-a dst2-a 0) (miniw.w pos-b pos-b light-dir-2)) ;; #x4b8 + (vu-pair (sq.xyzw xyzf-out dst2-a 2) (mulaw.xyzw ACC pos-mtx-0 pos-c)) ;; #x4b9 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-b clr-b rlength)) ;; #x4ba + (vu-pair (1024.0) (ftoi0.xyzw clr-a clr-a :i)) ;; #x4bb + (vu-pair (erleng.xyz P clr-c) (maxi.xy pos-b pos-b I)) ;; #x4bc + (vu-pair (ibne mat2-end color-ptr mercprime-pipeline-18) (maddaw.xyzw ACC pos-mtx-1 clr-c)) ;; #x4bd + (vu-pair (mr32.z tex-c vf00) (maddw.xyzw pos-c pos-mtx-2 tex-c)) ;; #x4be + (vu-pair (ibne mat3-end color-ptr mercprime-pipeline-51) (nop)) ;; #x4bf + (vu-pair (nop) (nop)) ;; #x4c0 + (vu-pair (b finish-mat1) (nop)) ;; #x4c1 + (vu-pair (nop) (nop)) ;; #x4c2 + (label mercprime-pipeline-18) + (vu-pair (3072.0) (mulax.xyzw ACC light-dir-0 clr-b :i)) ;; #x4c3 + (vu-pair (lqi.xyzw pos-a lump-ptr) (minii.xy pos-b pos-b I)) ;; #x4c4 + (vu-pair (sq.xyzw clr-a dst-a 1) (madday.xyzw ACC light-dir-1 clr-b)) ;; #x4c5 + (vu-pair (sq.xyzw clr-a dst2-a 1) (maddz.xyzw clr-b light-dir-2 clr-b)) ;; #x4c6 + (vu-pair (lqi.xyzw clr-a lump-ptr) (add.xyzw pos-c pos-c pos-mtx-3)) ;; #x4c7 + (vu-pair (lqi.xyzw tex-a lump-ptr) (maxw.w pos-b pos-b light-dir-1)) ;; #x4c8 + (vu-pair (mtir dst-a pos-a.x) (itof0.xyzw vtx-color vtx-color)) ;; #x4c9 + (vu-pair (mtir dst2-a pos-a.y) (maxx.xyzw clr-b clr-b vf00)) ;; #x4ca + (vu-pair (nop) (miniw.w pos-c pos-c light-dir-0)) ;; #x4cb + (vu-pair (div Q light-dir-0.w pos-c.w) (add.zw pos-a pos-a vtx-bias-0)) ;; #x4cc + (vu-pair (move.xyzw xyzf-out pos-b) (add.xyzw clr-a clr-a vtx-bias-1)) ;; #x4cd + (vu-pair (iand dst-a dst-a index-mask) (add.xyzw tex-a tex-a vtx-bias-2)) ;; #x4ce + (vu-pair (nop) (mulax.xyzw ACC light-color-0 clr-b)) ;; #x4cf + (vu-pair (ibgtz vtx-flags mercprime-pipeline-19) (madday.xyzw ACC light-color-1 clr-b)) ;; #x4d0 + (vu-pair (iand dst2-a dst2-a index-mask) (maddaz.xyzw ACC light-color-2 clr-b)) ;; #x4d1 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x4d2 + (label mercprime-pipeline-19) + (vu-pair (ibne index-mask dst-a mercprime-pipeline-20) (maddw.xyzw clr-b light-ambient vf00)) ;; #x4d3 + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-c pos-c Q)) ;; #x4d4 + (vu-pair (mtir dst-a clr-a.x) (mul.xyzw tex-c tex-c Q)) ;; #x4d5 + (vu-pair (mtir dst2-a clr-a.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x4d6 + (vu-pair (b mercprime-pipeline-21) (mul.xyzw clr-b clr-b vtx-color)) ;; #x4d7 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-c pos-c screen-offset)) ;; #x4d8 + (label mercprime-pipeline-20) + (vu-pair (lq.xyzw vf20 dst-a 0) (mul.xyzw tex-c tex-c Q)) ;; #x4d9 + (vu-pair (nop) (mulw.xyzw weights weights nrm-mtx-0)) ;; #x4da + (vu-pair (lq.xyzw pos-mtx-0 dst2-a 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x4db + (vu-pair (lq.xyzw vtx-color dst-a 1) (mul.xyzw clr-b clr-b vtx-color)) ;; #x4dc + (vu-pair (lq.xyzw pos-mtx-1 dst2-a 1) (add.xyzw pos-c pos-c screen-offset)) ;; #x4dd + (vu-pair (lq.xyzw vf20 dst-a 2) (mulax.xyzw ACC vf20 weights)) ;; #x4de + (vu-pair (lq.xyzw pos-mtx-2 dst2-a 2) (maddy.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x4df + (vu-pair (lq.xyzw vf23 dst-a 3) (mulax.xyzw ACC vf23 weights)) ;; #x4e0 + (vu-pair (lq.xyzw pos-mtx-3 dst2-a 3) (maddy.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x4e1 + (vu-pair (lq.xyzw vf20 dst-a 4) (mulax.xyzw ACC vf20 weights)) ;; #x4e2 + (vu-pair (lq.xyz nrm-mtx-0 dst2-a 4) (maddy.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x4e3 + (vu-pair (lq.xyzw vf23 dst-a 5) (mulax.xyzw ACC vf23 weights)) ;; #x4e4 + (vu-pair (lq.xyz nrm-mtx-1 dst2-a 5) (maddy.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x4e5 + (vu-pair (lq.xyzw vf20 dst-a 6) (mulax.xyzw ACC vf20 weights)) ;; #x4e6 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-a 6) (maddy.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x4e7 + (vu-pair (mtir dst-a clr-a.x) (mulax.xyzw ACC vf23 weights)) ;; #x4e8 + (vu-pair (mtir dst2-a clr-a.y) (maddy.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x4e9 + (vu-pair (b mercprime-pipeline-36) (mulax.xyzw ACC vf20 weights)) ;; #x4ea + (vu-pair (lqi.xyzw vtx-color color-ptr) (maddy.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x4eb + (label mercprime-pipeline-21) + (vu-pair (ibgez vtx-flags mercprime-pipeline-22) (mulaz.xyzw ACC nrm-mtx-0 pos-a)) ;; #x4ec + (vu-pair (sq.xyzw xyzf-out dst-b 2) (maddaz.xyzw ACC nrm-mtx-1 clr-a)) ;; #x4ed + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-b)) ;; #x4ee + (label mercprime-pipeline-22) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-a nrm-mtx-2 tex-a)) ;; #x4ef + (vu-pair (sq.xyzw tex-b dst-b 0) (miniy.xyzw clr-b clr-b vtx-bias-0)) ;; #x4f0 + (vu-pair (sq.xyzw tex-b dst2-b 0) (miniw.w pos-c pos-c light-dir-2)) ;; #x4f1 + (vu-pair (sq.xyzw xyzf-out dst2-b 2) (mulaw.xyzw ACC pos-mtx-0 pos-a)) ;; #x4f2 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-c clr-c rlength)) ;; #x4f3 + (vu-pair (1024.0) (ftoi0.xyzw clr-b clr-b :i)) ;; #x4f4 + (vu-pair (erleng.xyz P clr-a) (maxi.xy pos-c pos-c I)) ;; #x4f5 + (vu-pair (ibne mat2-end color-ptr mercprime-pipeline-23) (maddaw.xyzw ACC pos-mtx-1 clr-a)) ;; #x4f6 + (vu-pair (mr32.z tex-a vf00) (maddw.xyzw pos-a pos-mtx-2 tex-a)) ;; #x4f7 + (vu-pair (ibne mat3-end color-ptr mercprime-pipeline-56) (nop)) ;; #x4f8 + (vu-pair (nop) (nop)) ;; #x4f9 + (vu-pair (b finish-mat2) (nop)) ;; #x4fa + (vu-pair (nop) (nop)) ;; #x4fb + (label mercprime-pipeline-23) + (vu-pair (3072.0) (mulax.xyzw ACC light-dir-0 clr-c :i)) ;; #x4fc + (vu-pair (lqi.xyzw pos-b lump-ptr) (minii.xy pos-c pos-c I)) ;; #x4fd + (vu-pair (sq.xyzw clr-b dst-b 1) (madday.xyzw ACC light-dir-1 clr-c)) ;; #x4fe + (vu-pair (sq.xyzw clr-b dst2-b 1) (maddz.xyzw clr-c light-dir-2 clr-c)) ;; #x4ff + (vu-pair (lqi.xyzw clr-b lump-ptr) (add.xyzw pos-a pos-a pos-mtx-3)) ;; #x500 + (vu-pair (lqi.xyzw tex-b lump-ptr) (maxw.w pos-c pos-c light-dir-1)) ;; #x501 + (vu-pair (mtir dst-b pos-b.x) (itof0.xyzw vtx-color vtx-color)) ;; #x502 + (vu-pair (mtir dst2-b pos-b.y) (maxx.xyzw clr-c clr-c vf00)) ;; #x503 + (vu-pair (nop) (miniw.w pos-a pos-a light-dir-0)) ;; #x504 + (vu-pair (div Q light-dir-0.w pos-a.w) (add.zw pos-b pos-b vtx-bias-0)) ;; #x505 + (vu-pair (move.xyzw xyzf-out pos-c) (add.xyzw clr-b clr-b vtx-bias-1)) ;; #x506 + (vu-pair (iand dst-b dst-b index-mask) (add.xyzw tex-b tex-b vtx-bias-2)) ;; #x507 + (vu-pair (nop) (mulax.xyzw ACC light-color-0 clr-c)) ;; #x508 + (vu-pair (ibgtz vtx-flags mercprime-pipeline-24) (madday.xyzw ACC light-color-1 clr-c)) ;; #x509 + (vu-pair (iand dst2-b dst2-b index-mask) (maddaz.xyzw ACC light-color-2 clr-c)) ;; #x50a + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x50b + (label mercprime-pipeline-24) + (vu-pair (ibne index-mask dst-b mercprime-pipeline-25) (maddw.xyzw clr-c light-ambient vf00)) ;; #x50c + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-a pos-a Q)) ;; #x50d + (vu-pair (mtir dst-b clr-b.x) (mul.xyzw tex-a tex-a Q)) ;; #x50e + (vu-pair (mtir dst2-b clr-b.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x50f + (vu-pair (b mercprime-pipeline-26) (mul.xyzw clr-c clr-c vtx-color)) ;; #x510 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-a pos-a screen-offset)) ;; #x511 + (label mercprime-pipeline-25) + (vu-pair (lq.xyzw vf20 dst-b 0) (mul.xyzw tex-a tex-a Q)) ;; #x512 + (vu-pair (nop) (mulw.xyzw weights weights nrm-mtx-0)) ;; #x513 + (vu-pair (lq.xyzw pos-mtx-0 dst2-b 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x514 + (vu-pair (lq.xyzw vtx-color dst-b 1) (mul.xyzw clr-c clr-c vtx-color)) ;; #x515 + (vu-pair (lq.xyzw pos-mtx-1 dst2-b 1) (add.xyzw pos-a pos-a screen-offset)) ;; #x516 + (vu-pair (lq.xyzw vf20 dst-b 2) (mulax.xyzw ACC vf20 weights)) ;; #x517 + (vu-pair (lq.xyzw pos-mtx-2 dst2-b 2) (maddy.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x518 + (vu-pair (lq.xyzw vf23 dst-b 3) (mulax.xyzw ACC vf23 weights)) ;; #x519 + (vu-pair (lq.xyzw pos-mtx-3 dst2-b 3) (maddy.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x51a + (vu-pair (lq.xyzw vf20 dst-b 4) (mulax.xyzw ACC vf20 weights)) ;; #x51b + (vu-pair (lq.xyz nrm-mtx-0 dst2-b 4) (maddy.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x51c + (vu-pair (lq.xyzw vf23 dst-b 5) (mulax.xyzw ACC vf23 weights)) ;; #x51d + (vu-pair (lq.xyz nrm-mtx-1 dst2-b 5) (maddy.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x51e + (vu-pair (lq.xyzw vf20 dst-b 6) (mulax.xyzw ACC vf20 weights)) ;; #x51f + (vu-pair (lq.xyzw nrm-mtx-2 dst2-b 6) (maddy.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x520 + (vu-pair (mtir dst-b clr-b.x) (mulax.xyzw ACC vf23 weights)) ;; #x521 + (vu-pair (mtir dst2-b clr-b.y) (maddy.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x522 + (vu-pair (b mercprime-pipeline-41) (mulax.xyzw ACC vf20 weights)) ;; #x523 + (vu-pair (lqi.xyzw vtx-color color-ptr) (maddy.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x524 + (label mercprime-pipeline-26) + (vu-pair (ibgez vtx-flags mercprime-pipeline-27) (mulaz.xyzw ACC nrm-mtx-0 pos-b)) ;; #x525 + (vu-pair (sq.xyzw xyzf-out dst-c 2) (maddaz.xyzw ACC nrm-mtx-1 clr-b)) ;; #x526 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-c)) ;; #x527 + (label mercprime-pipeline-27) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-b nrm-mtx-2 tex-b)) ;; #x528 + (vu-pair (sq.xyzw tex-c dst-c 0) (miniy.xyzw clr-c clr-c vtx-bias-0)) ;; #x529 + (vu-pair (sq.xyzw tex-c dst2-c 0) (miniw.w pos-a pos-a light-dir-2)) ;; #x52a + (vu-pair (sq.xyzw xyzf-out dst2-c 2) (mulaw.xyzw ACC pos-mtx-0 pos-b)) ;; #x52b + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-a clr-a rlength)) ;; #x52c + (vu-pair (1024.0) (ftoi0.xyzw clr-c clr-c :i)) ;; #x52d + (vu-pair (erleng.xyz P clr-b) (maxi.xy pos-a pos-a I)) ;; #x52e + (vu-pair (ibne mat2-end color-ptr mercprime-pipeline-12) (maddaw.xyzw ACC pos-mtx-1 clr-b)) ;; #x52f + (vu-pair (mr32.z tex-b vf00) (maddw.xyzw pos-b pos-mtx-2 tex-b)) ;; #x530 + (vu-pair (ibne mat3-end color-ptr mercprime-pipeline-45) (nop)) ;; #x531 + (vu-pair (nop) (nop)) ;; #x532 + (vu-pair (b finish-mat3) (nop)) ;; #x533 + (vu-pair (nop) (nop)) ;; #x534 + (label mercprime-pipeline-28) + (vu-pair (3072.0) (mulax.xyzw ACC light-dir-0 clr-a :i)) ;; #x535 + (vu-pair (lqi.xyzw pos-c lump-ptr) (minii.xy pos-a pos-a I)) ;; #x536 + (vu-pair (sq.xyzw clr-c dst-c 1) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x537 + (vu-pair (sq.xyzw clr-c dst2-c 1) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x538 + (label mercprime-mat2-resume-c) + (vu-pair (lqi.xyzw clr-c lump-ptr) (add.xyzw pos-b pos-b pos-mtx-3)) ;; #x539 + (vu-pair (lqi.xyzw tex-c lump-ptr) (maxw.w pos-a pos-a light-dir-1)) ;; #x53a + (vu-pair (mtir dst-c pos-c.x) (itof0.xyzw vtx-color vtx-color)) ;; #x53b + (vu-pair (mtir dst2-c pos-c.y) (maxx.xyzw clr-a clr-a vf00)) ;; #x53c + (vu-pair (nop) (miniw.w pos-b pos-b light-dir-0)) ;; #x53d + (vu-pair (div Q light-dir-0.w pos-b.w) (add.zw pos-c pos-c vtx-bias-0)) ;; #x53e + (vu-pair (move.xyzw xyzf-out pos-a) (add.xyzw clr-c clr-c vtx-bias-1)) ;; #x53f + (vu-pair (iand dst-c dst-c index-mask) (add.xyzw tex-c tex-c vtx-bias-2)) ;; #x540 + (vu-pair (nop) (mulax.xyzw ACC light-color-0 clr-a)) ;; #x541 + (vu-pair (ibgtz vtx-flags mercprime-pipeline-29) (madday.xyzw ACC light-color-1 clr-a)) ;; #x542 + (vu-pair (iand dst2-c dst2-c index-mask) (maddaz.xyzw ACC light-color-2 clr-a)) ;; #x543 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x544 + (label mercprime-pipeline-29) + (vu-pair (ibne index-mask dst-c mercprime-pipeline-30) (maddw.xyzw clr-a light-ambient vf00)) ;; #x545 + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-b pos-b Q)) ;; #x546 + (vu-pair (mtir dst-c clr-c.x) (mul.xyzw tex-b tex-b Q)) ;; #x547 + (vu-pair (mtir dst2-c clr-c.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x548 + (vu-pair (b mercprime-pipeline-31) (mul.xyzw clr-a clr-a vtx-color)) ;; #x549 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-b pos-b screen-offset)) ;; #x54a + (label mercprime-pipeline-30) + (vu-pair (lq.xyzw vf20 dst-c 0) (mul.xyzw tex-b tex-b Q)) ;; #x54b + (vu-pair (lq.xyzw pos-mtx-0 dst2-c 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x54c + (vu-pair (lq.xyzw vtx-color dst-c 1) (mul.xyzw clr-a clr-a vtx-color)) ;; #x54d + (vu-pair (lq.xyzw pos-mtx-1 dst2-c 1) (add.xyzw pos-b pos-b screen-offset)) ;; #x54e + (vu-pair (lq.xyzw vf20 dst-c 2) (mulaz.xyzw ACC vf20 weights)) ;; #x54f + (vu-pair (lq.xyzw pos-mtx-2 dst2-c 2) (maddw.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x550 + (vu-pair (lq.xyzw vf23 dst-c 3) (mulaz.xyzw ACC vf23 weights)) ;; #x551 + (vu-pair (lq.xyzw pos-mtx-3 dst2-c 3) (maddw.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x552 + (vu-pair (lq.xyzw vf20 dst-c 4) (mulaz.xyzw ACC vf20 weights)) ;; #x553 + (vu-pair (lq.xyz nrm-mtx-0 dst2-c 4) (maddw.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x554 + (vu-pair (lq.xyzw vf23 dst-c 5) (mulaz.xyzw ACC vf23 weights)) ;; #x555 + (vu-pair (lq.xyz nrm-mtx-1 dst2-c 5) (maddw.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x556 + (vu-pair (lq.xyzw vf20 dst-c 6) (mulaz.xyzw ACC vf20 weights)) ;; #x557 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-c 6) (maddw.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x558 + (vu-pair (lqi.xyzw vf23 weight-ptr) (mulaz.xyzw ACC vf23 weights)) ;; #x559 + (vu-pair (mtir dst-c clr-c.x) (maddw.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x55a + (vu-pair (mtir dst2-c clr-c.y) (mulaz.xyzw ACC vf20 weights)) ;; #x55b + (vu-pair (b mercprime-pipeline-16) (maddw.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x55c + (vu-pair (lqi.xyzw vtx-color color-ptr) (itof0.xyzw weights vtx-color)) ;; #x55d + (label mercprime-pipeline-31) + (vu-pair (ibgez vtx-flags mercprime-pipeline-32) (mulaz.xyzw ACC nrm-mtx-0 pos-c)) ;; #x55e + (vu-pair (sq.xyzw xyzf-out dst-a 2) (maddaz.xyzw ACC nrm-mtx-1 clr-c)) ;; #x55f + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-a)) ;; #x560 + (label mercprime-pipeline-32) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-c nrm-mtx-2 tex-c)) ;; #x561 + (vu-pair (sq.xyzw tex-a dst-a 0) (miniy.xyzw clr-a clr-a vtx-bias-0)) ;; #x562 + (vu-pair (sq.xyzw tex-a dst2-a 0) (miniw.w pos-b pos-b light-dir-2)) ;; #x563 + (vu-pair (sq.xyzw xyzf-out dst2-a 2) (mulaw.xyzw ACC pos-mtx-0 pos-c)) ;; #x564 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-b clr-b rlength)) ;; #x565 + (vu-pair (1024.0) (ftoi0.xyzw clr-a clr-a :i)) ;; #x566 + (vu-pair (erleng.xyz P clr-c) (maxi.xy pos-b pos-b I)) ;; #x567 + (vu-pair (ibne mat2-end color-ptr mercprime-pipeline-33) (maddaw.xyzw ACC pos-mtx-1 clr-c)) ;; #x568 + (vu-pair (mr32.z tex-c vf00) (maddw.xyzw pos-c pos-mtx-2 tex-c)) ;; #x569 + (vu-pair (ibne mat3-end color-ptr mercprime-pipeline-51) (nop)) ;; #x56a + (vu-pair (nop) (nop)) ;; #x56b + (vu-pair (b finish-mat1) (nop)) ;; #x56c + (vu-pair (nop) (nop)) ;; #x56d + (label mercprime-pipeline-33) + (vu-pair (3072.0) (mulax.xyzw ACC light-dir-0 clr-b :i)) ;; #x56e + (vu-pair (lqi.xyzw pos-a lump-ptr) (minii.xy pos-b pos-b I)) ;; #x56f + (vu-pair (sq.xyzw clr-a dst-a 1) (madday.xyzw ACC light-dir-1 clr-b)) ;; #x570 + (vu-pair (sq.xyzw clr-a dst2-a 1) (maddz.xyzw clr-b light-dir-2 clr-b)) ;; #x571 + (vu-pair (lqi.xyzw clr-a lump-ptr) (add.xyzw pos-c pos-c pos-mtx-3)) ;; #x572 + (vu-pair (lqi.xyzw tex-a lump-ptr) (maxw.w pos-b pos-b light-dir-1)) ;; #x573 + (vu-pair (mtir dst-a pos-a.x) (itof0.xyzw vtx-color vtx-color)) ;; #x574 + (vu-pair (mtir dst2-a pos-a.y) (maxx.xyzw clr-b clr-b vf00)) ;; #x575 + (vu-pair (nop) (miniw.w pos-c pos-c light-dir-0)) ;; #x576 + (vu-pair (div Q light-dir-0.w pos-c.w) (add.zw pos-a pos-a vtx-bias-0)) ;; #x577 + (vu-pair (move.xyzw xyzf-out pos-b) (add.xyzw clr-a clr-a vtx-bias-1)) ;; #x578 + (vu-pair (iand dst-a dst-a index-mask) (add.xyzw tex-a tex-a vtx-bias-2)) ;; #x579 + (vu-pair (nop) (mulax.xyzw ACC light-color-0 clr-b)) ;; #x57a + (vu-pair (ibgtz vtx-flags mercprime-pipeline-34) (madday.xyzw ACC light-color-1 clr-b)) ;; #x57b + (vu-pair (iand dst2-a dst2-a index-mask) (maddaz.xyzw ACC light-color-2 clr-b)) ;; #x57c + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x57d + (label mercprime-pipeline-34) + (vu-pair (ibne index-mask dst-a mercprime-pipeline-35) (maddw.xyzw clr-b light-ambient vf00)) ;; #x57e + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-c pos-c Q)) ;; #x57f + (vu-pair (mtir dst-a clr-a.x) (mul.xyzw tex-c tex-c Q)) ;; #x580 + (vu-pair (mtir dst2-a clr-a.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x581 + (vu-pair (b mercprime-pipeline-36) (mul.xyzw clr-b clr-b vtx-color)) ;; #x582 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-c pos-c screen-offset)) ;; #x583 + (label mercprime-pipeline-35) + (vu-pair (lq.xyzw vf20 dst-a 0) (mul.xyzw tex-c tex-c Q)) ;; #x584 + (vu-pair (lq.xyzw pos-mtx-0 dst2-a 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x585 + (vu-pair (lq.xyzw vtx-color dst-a 1) (mul.xyzw clr-b clr-b vtx-color)) ;; #x586 + (vu-pair (lq.xyzw pos-mtx-1 dst2-a 1) (add.xyzw pos-c pos-c screen-offset)) ;; #x587 + (vu-pair (lq.xyzw vf20 dst-a 2) (mulaz.xyzw ACC vf20 weights)) ;; #x588 + (vu-pair (lq.xyzw pos-mtx-2 dst2-a 2) (maddw.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x589 + (vu-pair (lq.xyzw vf23 dst-a 3) (mulaz.xyzw ACC vf23 weights)) ;; #x58a + (vu-pair (lq.xyzw pos-mtx-3 dst2-a 3) (maddw.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x58b + (vu-pair (lq.xyzw vf20 dst-a 4) (mulaz.xyzw ACC vf20 weights)) ;; #x58c + (vu-pair (lq.xyz nrm-mtx-0 dst2-a 4) (maddw.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x58d + (vu-pair (lq.xyzw vf23 dst-a 5) (mulaz.xyzw ACC vf23 weights)) ;; #x58e + (vu-pair (lq.xyz nrm-mtx-1 dst2-a 5) (maddw.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x58f + (vu-pair (lq.xyzw vf20 dst-a 6) (mulaz.xyzw ACC vf20 weights)) ;; #x590 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-a 6) (maddw.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x591 + (vu-pair (lqi.xyzw vf23 weight-ptr) (mulaz.xyzw ACC vf23 weights)) ;; #x592 + (vu-pair (mtir dst-a clr-a.x) (maddw.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x593 + (vu-pair (mtir dst2-a clr-a.y) (mulaz.xyzw ACC vf20 weights)) ;; #x594 + (vu-pair (b mercprime-pipeline-21) (maddw.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x595 + (vu-pair (lqi.xyzw vtx-color color-ptr) (itof0.xyzw weights vtx-color)) ;; #x596 + (label mercprime-pipeline-36) + (vu-pair (ibgez vtx-flags mercprime-pipeline-37) (mulaz.xyzw ACC nrm-mtx-0 pos-a)) ;; #x597 + (vu-pair (sq.xyzw xyzf-out dst-b 2) (maddaz.xyzw ACC nrm-mtx-1 clr-a)) ;; #x598 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-b)) ;; #x599 + (label mercprime-pipeline-37) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-a nrm-mtx-2 tex-a)) ;; #x59a + (vu-pair (sq.xyzw tex-b dst-b 0) (miniy.xyzw clr-b clr-b vtx-bias-0)) ;; #x59b + (vu-pair (sq.xyzw tex-b dst2-b 0) (miniw.w pos-c pos-c light-dir-2)) ;; #x59c + (vu-pair (sq.xyzw xyzf-out dst2-b 2) (mulaw.xyzw ACC pos-mtx-0 pos-a)) ;; #x59d + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-c clr-c rlength)) ;; #x59e + (vu-pair (1024.0) (ftoi0.xyzw clr-b clr-b :i)) ;; #x59f + (vu-pair (erleng.xyz P clr-a) (maxi.xy pos-c pos-c I)) ;; #x5a0 + (vu-pair (ibne mat2-end color-ptr mercprime-pipeline-38) (maddaw.xyzw ACC pos-mtx-1 clr-a)) ;; #x5a1 + (vu-pair (mr32.z tex-a vf00) (maddw.xyzw pos-a pos-mtx-2 tex-a)) ;; #x5a2 + (vu-pair (ibne mat3-end color-ptr mercprime-pipeline-56) (nop)) ;; #x5a3 + (vu-pair (nop) (nop)) ;; #x5a4 + (vu-pair (b finish-mat2) (nop)) ;; #x5a5 + (vu-pair (nop) (nop)) ;; #x5a6 + (label mercprime-pipeline-38) + (vu-pair (3072.0) (mulax.xyzw ACC light-dir-0 clr-c :i)) ;; #x5a7 + (vu-pair (lqi.xyzw pos-b lump-ptr) (minii.xy pos-c pos-c I)) ;; #x5a8 + (vu-pair (sq.xyzw clr-b dst-b 1) (madday.xyzw ACC light-dir-1 clr-c)) ;; #x5a9 + (vu-pair (sq.xyzw clr-b dst2-b 1) (maddz.xyzw clr-c light-dir-2 clr-c)) ;; #x5aa + (vu-pair (lqi.xyzw clr-b lump-ptr) (add.xyzw pos-a pos-a pos-mtx-3)) ;; #x5ab + (vu-pair (lqi.xyzw tex-b lump-ptr) (maxw.w pos-c pos-c light-dir-1)) ;; #x5ac + (vu-pair (mtir dst-b pos-b.x) (itof0.xyzw vtx-color vtx-color)) ;; #x5ad + (vu-pair (mtir dst2-b pos-b.y) (maxx.xyzw clr-c clr-c vf00)) ;; #x5ae + (vu-pair (nop) (miniw.w pos-a pos-a light-dir-0)) ;; #x5af + (vu-pair (div Q light-dir-0.w pos-a.w) (add.zw pos-b pos-b vtx-bias-0)) ;; #x5b0 + (vu-pair (move.xyzw xyzf-out pos-c) (add.xyzw clr-b clr-b vtx-bias-1)) ;; #x5b1 + (vu-pair (iand dst-b dst-b index-mask) (add.xyzw tex-b tex-b vtx-bias-2)) ;; #x5b2 + (vu-pair (nop) (mulax.xyzw ACC light-color-0 clr-c)) ;; #x5b3 + (vu-pair (ibgtz vtx-flags mercprime-pipeline-39) (madday.xyzw ACC light-color-1 clr-c)) ;; #x5b4 + (vu-pair (iand dst2-b dst2-b index-mask) (maddaz.xyzw ACC light-color-2 clr-c)) ;; #x5b5 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x5b6 + (label mercprime-pipeline-39) + (vu-pair (ibne index-mask dst-b mercprime-pipeline-40) (maddw.xyzw clr-c light-ambient vf00)) ;; #x5b7 + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-a pos-a Q)) ;; #x5b8 + (vu-pair (mtir dst-b clr-b.x) (mul.xyzw tex-a tex-a Q)) ;; #x5b9 + (vu-pair (mtir dst2-b clr-b.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x5ba + (vu-pair (b mercprime-pipeline-41) (mul.xyzw clr-c clr-c vtx-color)) ;; #x5bb + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-a pos-a screen-offset)) ;; #x5bc + (label mercprime-pipeline-40) + (vu-pair (lq.xyzw vf20 dst-b 0) (mul.xyzw tex-a tex-a Q)) ;; #x5bd + (vu-pair (lq.xyzw pos-mtx-0 dst2-b 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x5be + (vu-pair (lq.xyzw vtx-color dst-b 1) (mul.xyzw clr-c clr-c vtx-color)) ;; #x5bf + (vu-pair (lq.xyzw pos-mtx-1 dst2-b 1) (add.xyzw pos-a pos-a screen-offset)) ;; #x5c0 + (vu-pair (lq.xyzw vf20 dst-b 2) (mulaz.xyzw ACC vf20 weights)) ;; #x5c1 + (vu-pair (lq.xyzw pos-mtx-2 dst2-b 2) (maddw.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x5c2 + (vu-pair (lq.xyzw vf23 dst-b 3) (mulaz.xyzw ACC vf23 weights)) ;; #x5c3 + (vu-pair (lq.xyzw pos-mtx-3 dst2-b 3) (maddw.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x5c4 + (vu-pair (lq.xyzw vf20 dst-b 4) (mulaz.xyzw ACC vf20 weights)) ;; #x5c5 + (vu-pair (lq.xyz nrm-mtx-0 dst2-b 4) (maddw.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x5c6 + (vu-pair (lq.xyzw vf23 dst-b 5) (mulaz.xyzw ACC vf23 weights)) ;; #x5c7 + (vu-pair (lq.xyz nrm-mtx-1 dst2-b 5) (maddw.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x5c8 + (vu-pair (lq.xyzw vf20 dst-b 6) (mulaz.xyzw ACC vf20 weights)) ;; #x5c9 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-b 6) (maddw.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x5ca + (vu-pair (lqi.xyzw vf23 weight-ptr) (mulaz.xyzw ACC vf23 weights)) ;; #x5cb + (vu-pair (mtir dst-b clr-b.x) (maddw.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x5cc + (vu-pair (mtir dst2-b clr-b.y) (mulaz.xyzw ACC vf20 weights)) ;; #x5cd + (vu-pair (b mercprime-pipeline-26) (maddw.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x5ce + (vu-pair (lqi.xyzw vtx-color color-ptr) (itof0.xyzw weights vtx-color)) ;; #x5cf + (label mercprime-pipeline-41) + (vu-pair (ibgez vtx-flags mercprime-pipeline-42) (mulaz.xyzw ACC nrm-mtx-0 pos-b)) ;; #x5d0 + (vu-pair (sq.xyzw xyzf-out dst-c 2) (maddaz.xyzw ACC nrm-mtx-1 clr-b)) ;; #x5d1 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-c)) ;; #x5d2 + (label mercprime-pipeline-42) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-b nrm-mtx-2 tex-b)) ;; #x5d3 + (vu-pair (sq.xyzw tex-c dst-c 0) (miniy.xyzw clr-c clr-c vtx-bias-0)) ;; #x5d4 + (vu-pair (sq.xyzw tex-c dst2-c 0) (miniw.w pos-a pos-a light-dir-2)) ;; #x5d5 + (vu-pair (sq.xyzw xyzf-out dst2-c 2) (mulaw.xyzw ACC pos-mtx-0 pos-b)) ;; #x5d6 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-a clr-a rlength)) ;; #x5d7 + (vu-pair (1024.0) (ftoi0.xyzw clr-c clr-c :i)) ;; #x5d8 + (vu-pair (erleng.xyz P clr-b) (maxi.xy pos-a pos-a I)) ;; #x5d9 + (vu-pair (ibne mat2-end color-ptr mercprime-pipeline-28) (maddaw.xyzw ACC pos-mtx-1 clr-b)) ;; #x5da + (vu-pair (mr32.z tex-b vf00) (maddw.xyzw pos-b pos-mtx-2 tex-b)) ;; #x5db + (vu-pair (ibne mat3-end color-ptr mercprime-pipeline-51) (nop)) ;; #x5dc + (vu-pair (nop) (nop)) ;; #x5dd + (vu-pair (b finish-mat3) (nop)) ;; #x5de + (vu-pair (nop) (nop)) ;; #x5df + (label mercprime-pipeline-43) + (vu-pair (erleng.xyz P clr-b) (maxi.xy pos-a pos-a I)) ;; #x5e0 + (vu-pair (3072.0) (nop :i)) ;; #x5e1 + (vu-pair (nop) (minii.xy pos-a pos-a I)) ;; #x5e2 + (vu-pair (nop) (maddaw.xyzw ACC pos-mtx-1 clr-b)) ;; #x5e3 + (vu-pair (mr32.z tex-b vf00) (maddw.xyzw pos-b pos-mtx-2 tex-b)) ;; #x5e4 + (label mercprime-pipeline-44) + (vu-pair (lqi.xyzw pos-c lump-ptr) (mulax.xyzw ACC light-dir-0 clr-a)) ;; #x5e5 + (vu-pair (b mercprime-pipeline-46) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x5e6 + (vu-pair (nop) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x5e7 + (label mercprime-pipeline-45) + (vu-pair (3072.0) (mulax.xyzw ACC light-dir-0 clr-a :i)) ;; #x5e8 + (vu-pair (lqi.xyzw pos-c lump-ptr) (minii.xy pos-a pos-a I)) ;; #x5e9 + (vu-pair (sq.xyzw clr-c dst-c 1) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x5ea + (vu-pair (sq.xyzw clr-c dst2-c 1) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x5eb + (label mercprime-pipeline-46) + (vu-pair (lqi.xyzw clr-c lump-ptr) (add.xyzw pos-b pos-b pos-mtx-3)) ;; #x5ec + (vu-pair (lqi.xyzw tex-c lump-ptr) (maxw.w pos-a pos-a light-dir-1)) ;; #x5ed + (vu-pair (mtir dst-c pos-c.x) (itof0.xyzw vtx-color vtx-color)) ;; #x5ee + (vu-pair (mtir dst2-c pos-c.y) (maxx.xyzw clr-a clr-a vf00)) ;; #x5ef + (vu-pair (nop) (miniw.w pos-b pos-b light-dir-0)) ;; #x5f0 + (vu-pair (div Q light-dir-0.w pos-b.w) (add.zw pos-c pos-c vtx-bias-0)) ;; #x5f1 + (vu-pair (move.xyzw xyzf-out pos-a) (add.xyzw clr-c clr-c vtx-bias-1)) ;; #x5f2 + (vu-pair (iand dst-c dst-c index-mask) (add.xyzw tex-c tex-c vtx-bias-2)) ;; #x5f3 + (vu-pair (ilw.w mtx-ptr weight-ptr -1) (mulax.xyzw ACC light-color-0 clr-a)) ;; #x5f4 + (vu-pair (ibgtz vtx-flags mercprime-pipeline-47) (madday.xyzw ACC light-color-1 clr-a)) ;; #x5f5 + (vu-pair (iand dst2-c dst2-c index-mask) (maddaz.xyzw ACC light-color-2 clr-a)) ;; #x5f6 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x5f7 + (label mercprime-pipeline-47) + (vu-pair (ibne index-mask dst-c mercprime-pipeline-48) (maddw.xyzw clr-a light-ambient vf00)) ;; #x5f8 + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-b pos-b Q)) ;; #x5f9 + (vu-pair (mtir dst-c clr-c.x) (mul.xyzw tex-b tex-b Q)) ;; #x5fa + (vu-pair (mtir dst2-c clr-c.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x5fb + (vu-pair (b mercprime-pipeline-49) (mul.xyzw clr-a clr-a vtx-color)) ;; #x5fc + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-b pos-b screen-offset)) ;; #x5fd + (label mercprime-pipeline-48) + (vu-pair (lq.xyzw vf20 dst-c 0) (mul.xyzw tex-b tex-b Q)) ;; #x5fe + (vu-pair (nop) (mulw.xyzw weights weights nrm-mtx-0)) ;; #x5ff + (vu-pair (lq.xyzw nrm-mtx-2 dst2-c 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x600 + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (mul.xyzw clr-a clr-a vtx-color)) ;; #x601 + (vu-pair (lq.xyzw vf23 dst-c 1) (add.xyzw pos-b pos-b screen-offset)) ;; #x602 + (vu-pair (lq.xyzw vf20 dst2-c 1) (mulax.xyzw ACC vf20 weights)) ;; #x603 + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x604 + (vu-pair (lq.xyzw nrm-mtx-2 dst-c 2) (maddz.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x605 + (vu-pair (lq.xyzw vf23 dst2-c 2) (mulax.xyzw ACC vf23 weights)) ;; #x606 + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (madday.xyzw ACC vf20 weights)) ;; #x607 + (vu-pair (lq.xyzw vf20 dst-c 3) (maddz.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x608 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-c 3) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x609 + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (madday.xyzw ACC vf23 weights)) ;; #x60a + (vu-pair (lq.xyzw vf23 dst-c 4) (maddz.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x60b + (vu-pair (lq.xyzw vf20 dst2-c 4) (mulax.xyzw ACC vf20 weights)) ;; #x60c + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x60d + (vu-pair (lq.xyzw nrm-mtx-2 dst-c 5) (maddz.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x60e + (vu-pair (lq.xyzw vf23 dst2-c 5) (mulax.xyzw ACC vf23 weights)) ;; #x60f + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (madday.xyzw ACC vf20 weights)) ;; #x610 + (vu-pair (lq.xyzw vf20 dst-c 6) (maddz.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x611 + (vu-pair (lq.xyzw screen-offset dst2-c 6) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x612 + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (madday.xyzw ACC vf23 weights)) ;; #x613 + (vu-pair (lqi.xyzw vf23 weight-ptr) (maddz.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x614 + (vu-pair (mtir dst-c clr-c.x) (mulax.xyzw ACC vf20 weights)) ;; #x615 + (vu-pair (mtir dst2-c clr-c.y) (madday.xyzw ACC screen-offset weights)) ;; #x616 + (vu-pair (lq.xyzw vf22 vi00 2) (maddz.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x617 + (vu-pair (lqi.xyzw vtx-color color-ptr) (itof0.xyzw weights vtx-color)) ;; #x618 + (label mercprime-pipeline-49) + (vu-pair (ibgez vtx-flags mercprime-pipeline-50) (mulaz.xyzw ACC nrm-mtx-0 pos-c)) ;; #x619 + (vu-pair (sq.xyzw xyzf-out dst-a 2) (maddaz.xyzw ACC nrm-mtx-1 clr-c)) ;; #x61a + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-a)) ;; #x61b + (label mercprime-pipeline-50) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-c nrm-mtx-2 tex-c)) ;; #x61c + (vu-pair (sq.xyzw tex-a dst-a 0) (miniy.xyzw clr-a clr-a vtx-bias-0)) ;; #x61d + (vu-pair (sq.xyzw tex-a dst2-a 0) (miniw.w pos-b pos-b light-dir-2)) ;; #x61e + (vu-pair (sq.xyzw xyzf-out dst2-a 2) (mulaw.xyzw ACC pos-mtx-0 pos-c)) ;; #x61f + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-b clr-b rlength)) ;; #x620 + (vu-pair (1024.0) (ftoi0.xyzw clr-a clr-a :i)) ;; #x621 + (vu-pair (erleng.xyz P clr-c) (maxi.xy pos-b pos-b I)) ;; #x622 + (vu-pair (ibeq mat3-end color-ptr finish-mat1) (maddaw.xyzw ACC pos-mtx-1 clr-c)) ;; #x623 + (vu-pair (mr32.z tex-c vf00) (maddw.xyzw pos-c pos-mtx-2 tex-c)) ;; #x624 + (label mercprime-pipeline-51) + (vu-pair (3072.0) (mulax.xyzw ACC light-dir-0 clr-b :i)) ;; #x625 + (vu-pair (lqi.xyzw pos-a lump-ptr) (minii.xy pos-b pos-b I)) ;; #x626 + (vu-pair (sq.xyzw clr-a dst-a 1) (madday.xyzw ACC light-dir-1 clr-b)) ;; #x627 + (vu-pair (sq.xyzw clr-a dst2-a 1) (maddz.xyzw clr-b light-dir-2 clr-b)) ;; #x628 + (vu-pair (lqi.xyzw clr-a lump-ptr) (add.xyzw pos-c pos-c pos-mtx-3)) ;; #x629 + (vu-pair (lqi.xyzw tex-a lump-ptr) (maxw.w pos-b pos-b light-dir-1)) ;; #x62a + (vu-pair (mtir dst-a pos-a.x) (itof0.xyzw vtx-color vtx-color)) ;; #x62b + (vu-pair (mtir dst2-a pos-a.y) (maxx.xyzw clr-b clr-b vf00)) ;; #x62c + (vu-pair (nop) (miniw.w pos-c pos-c light-dir-0)) ;; #x62d + (vu-pair (div Q light-dir-0.w pos-c.w) (add.zw pos-a pos-a vtx-bias-0)) ;; #x62e + (vu-pair (move.xyzw xyzf-out pos-b) (add.xyzw clr-a clr-a vtx-bias-1)) ;; #x62f + (vu-pair (iand dst-a dst-a index-mask) (add.xyzw tex-a tex-a vtx-bias-2)) ;; #x630 + (vu-pair (ilw.w mtx-ptr weight-ptr -1) (mulax.xyzw ACC light-color-0 clr-b)) ;; #x631 + (vu-pair (ibgtz vtx-flags mercprime-pipeline-52) (madday.xyzw ACC light-color-1 clr-b)) ;; #x632 + (vu-pair (iand dst2-a dst2-a index-mask) (maddaz.xyzw ACC light-color-2 clr-b)) ;; #x633 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x634 + (label mercprime-pipeline-52) + (vu-pair (ibne index-mask dst-a mercprime-pipeline-53) (maddw.xyzw clr-b light-ambient vf00)) ;; #x635 + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-c pos-c Q)) ;; #x636 + (vu-pair (mtir dst-a clr-a.x) (mul.xyzw tex-c tex-c Q)) ;; #x637 + (vu-pair (mtir dst2-a clr-a.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x638 + (vu-pair (b mercprime-pipeline-54) (mul.xyzw clr-b clr-b vtx-color)) ;; #x639 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-c pos-c screen-offset)) ;; #x63a + (label mercprime-pipeline-53) + (vu-pair (lq.xyzw vf20 dst-a 0) (mul.xyzw tex-c tex-c Q)) ;; #x63b + (vu-pair (nop) (mulw.xyzw weights weights nrm-mtx-0)) ;; #x63c + (vu-pair (lq.xyzw nrm-mtx-2 dst2-a 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x63d + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (mul.xyzw clr-b clr-b vtx-color)) ;; #x63e + (vu-pair (lq.xyzw vf23 dst-a 1) (add.xyzw pos-c pos-c screen-offset)) ;; #x63f + (vu-pair (lq.xyzw vf20 dst2-a 1) (mulax.xyzw ACC vf20 weights)) ;; #x640 + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x641 + (vu-pair (lq.xyzw nrm-mtx-2 dst-a 2) (maddz.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x642 + (vu-pair (lq.xyzw vf23 dst2-a 2) (mulax.xyzw ACC vf23 weights)) ;; #x643 + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (madday.xyzw ACC vf20 weights)) ;; #x644 + (vu-pair (lq.xyzw vf20 dst-a 3) (maddz.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x645 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-a 3) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x646 + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (madday.xyzw ACC vf23 weights)) ;; #x647 + (vu-pair (lq.xyzw vf23 dst-a 4) (maddz.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x648 + (vu-pair (lq.xyzw vf20 dst2-a 4) (mulax.xyzw ACC vf20 weights)) ;; #x649 + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x64a + (vu-pair (lq.xyzw nrm-mtx-2 dst-a 5) (maddz.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x64b + (vu-pair (lq.xyzw vf23 dst2-a 5) (mulax.xyzw ACC vf23 weights)) ;; #x64c + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (madday.xyzw ACC vf20 weights)) ;; #x64d + (vu-pair (lq.xyzw vf20 dst-a 6) (maddz.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x64e + (vu-pair (lq.xyzw vf22 dst2-a 6) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x64f + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (madday.xyzw ACC vf23 weights)) ;; #x650 + (vu-pair (lqi.xyzw vf23 weight-ptr) (maddz.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x651 + (vu-pair (mtir dst-a clr-a.x) (mulax.xyzw ACC vf20 weights)) ;; #x652 + (vu-pair (mtir dst2-a clr-a.y) (madday.xyzw ACC screen-offset weights)) ;; #x653 + (vu-pair (lq.xyzw vf22 vi00 2) (maddz.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x654 + (vu-pair (lqi.xyzw vtx-color color-ptr) (itof0.xyzw weights vtx-color)) ;; #x655 + (label mercprime-pipeline-54) + (vu-pair (ibgez vtx-flags mercprime-pipeline-55) (mulaz.xyzw ACC nrm-mtx-0 pos-a)) ;; #x656 + (vu-pair (sq.xyzw xyzf-out dst-b 2) (maddaz.xyzw ACC nrm-mtx-1 clr-a)) ;; #x657 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-b)) ;; #x658 + (label mercprime-pipeline-55) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-a nrm-mtx-2 tex-a)) ;; #x659 + (vu-pair (sq.xyzw tex-b dst-b 0) (miniy.xyzw clr-b clr-b vtx-bias-0)) ;; #x65a + (vu-pair (sq.xyzw tex-b dst2-b 0) (miniw.w pos-c pos-c light-dir-2)) ;; #x65b + (vu-pair (sq.xyzw xyzf-out dst2-b 2) (mulaw.xyzw ACC pos-mtx-0 pos-a)) ;; #x65c + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-c clr-c rlength)) ;; #x65d + (vu-pair (1024.0) (ftoi0.xyzw clr-b clr-b :i)) ;; #x65e + (vu-pair (erleng.xyz P clr-a) (maxi.xy pos-c pos-c I)) ;; #x65f + (vu-pair (ibeq mat3-end color-ptr finish-mat2) (maddaw.xyzw ACC pos-mtx-1 clr-a)) ;; #x660 + (vu-pair (mr32.z tex-a vf00) (maddw.xyzw pos-a pos-mtx-2 tex-a)) ;; #x661 + (label mercprime-pipeline-56) + (vu-pair (3072.0) (mulax.xyzw ACC light-dir-0 clr-c :i)) ;; #x662 + (vu-pair (lqi.xyzw pos-b lump-ptr) (minii.xy pos-c pos-c I)) ;; #x663 + (vu-pair (sq.xyzw clr-b dst-b 1) (madday.xyzw ACC light-dir-1 clr-c)) ;; #x664 + (vu-pair (sq.xyzw clr-b dst2-b 1) (maddz.xyzw clr-c light-dir-2 clr-c)) ;; #x665 + (vu-pair (lqi.xyzw clr-b lump-ptr) (add.xyzw pos-a pos-a pos-mtx-3)) ;; #x666 + (vu-pair (lqi.xyzw tex-b lump-ptr) (maxw.w pos-c pos-c light-dir-1)) ;; #x667 + (vu-pair (mtir dst-b pos-b.x) (itof0.xyzw vtx-color vtx-color)) ;; #x668 + (vu-pair (mtir dst2-b pos-b.y) (maxx.xyzw clr-c clr-c vf00)) ;; #x669 + (vu-pair (nop) (miniw.w pos-a pos-a light-dir-0)) ;; #x66a + (vu-pair (div Q light-dir-0.w pos-a.w) (add.zw pos-b pos-b vtx-bias-0)) ;; #x66b + (vu-pair (move.xyzw xyzf-out pos-c) (add.xyzw clr-b clr-b vtx-bias-1)) ;; #x66c + (vu-pair (iand dst-b dst-b index-mask) (add.xyzw tex-b tex-b vtx-bias-2)) ;; #x66d + (vu-pair (ilw.w mtx-ptr weight-ptr -1) (mulax.xyzw ACC light-color-0 clr-c)) ;; #x66e + (vu-pair (ibgtz vtx-flags mercprime-pipeline-57) (madday.xyzw ACC light-color-1 clr-c)) ;; #x66f + (vu-pair (iand dst2-b dst2-b index-mask) (maddaz.xyzw ACC light-color-2 clr-c)) ;; #x670 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x671 + (label mercprime-pipeline-57) + (vu-pair (ibne index-mask dst-b mercprime-pipeline-58) (maddw.xyzw clr-c light-ambient vf00)) ;; #x672 + (vu-pair (ilw.x vtx-flags lump-ptr -9) (mul.xyz pos-a pos-a Q)) ;; #x673 + (vu-pair (mtir dst-b clr-b.x) (mul.xyzw tex-a tex-a Q)) ;; #x674 + (vu-pair (mtir dst2-b clr-b.y) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x675 + (vu-pair (b mercprime-pipeline-59) (mul.xyzw clr-c clr-c vtx-color)) ;; #x676 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-a pos-a screen-offset)) ;; #x677 + (label mercprime-pipeline-58) + (vu-pair (lq.xyzw vf20 dst-b 0) (mul.xyzw tex-a tex-a Q)) ;; #x678 + (vu-pair (nop) (mulw.xyzw weights weights nrm-mtx-0)) ;; #x679 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-b 0) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x67a + (vu-pair (lq.xyzw pos-mtx-0 mtx-ptr 0) (mul.xyzw clr-c clr-c vtx-color)) ;; #x67b + (vu-pair (lq.xyzw vf23 dst-b 1) (add.xyzw pos-a pos-a screen-offset)) ;; #x67c + (vu-pair (lq.xyzw vf20 dst2-b 1) (mulax.xyzw ACC vf20 weights)) ;; #x67d + (vu-pair (lq.xyzw pos-mtx-1 mtx-ptr 1) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x67e + (vu-pair (lq.xyzw nrm-mtx-2 dst-b 2) (maddz.xyzw pos-mtx-0 pos-mtx-0 weights)) ;; #x67f + (vu-pair (lq.xyzw vf23 dst2-b 2) (mulax.xyzw ACC vf23 weights)) ;; #x680 + (vu-pair (lq.xyzw pos-mtx-2 mtx-ptr 2) (madday.xyzw ACC vf20 weights)) ;; #x681 + (vu-pair (lq.xyzw vf20 dst-b 3) (maddz.xyzw pos-mtx-1 pos-mtx-1 weights)) ;; #x682 + (vu-pair (lq.xyzw nrm-mtx-2 dst2-b 3) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x683 + (vu-pair (lq.xyzw pos-mtx-3 mtx-ptr 3) (madday.xyzw ACC vf23 weights)) ;; #x684 + (vu-pair (lq.xyzw vf23 dst-b 4) (maddz.xyzw pos-mtx-2 pos-mtx-2 weights)) ;; #x685 + (vu-pair (lq.xyzw vf20 dst2-b 4) (mulax.xyzw ACC vf20 weights)) ;; #x686 + (vu-pair (lq.xyz nrm-mtx-0 mtx-ptr 4) (madday.xyzw ACC nrm-mtx-2 weights)) ;; #x687 + (vu-pair (lq.xyzw nrm-mtx-2 dst-b 5) (maddz.xyzw pos-mtx-3 pos-mtx-3 weights)) ;; #x688 + (vu-pair (lq.xyzw vf23 dst2-b 5) (mulax.xyzw ACC vf23 weights)) ;; #x689 + (vu-pair (lq.xyz nrm-mtx-1 mtx-ptr 5) (madday.xyzw ACC vf20 weights)) ;; #x68a + (vu-pair (lq.xyzw vf20 dst-b 6) (maddz.xyz nrm-mtx-0 nrm-mtx-0 weights)) ;; #x68b + (vu-pair (lq.xyzw screen-offset dst2-b 6) (mulax.xyzw ACC nrm-mtx-2 weights)) ;; #x68c + (vu-pair (lq.xyzw nrm-mtx-2 mtx-ptr 6) (madday.xyzw ACC vf23 weights)) ;; #x68d + (vu-pair (lqi.xyzw vf23 weight-ptr) (maddz.xyz nrm-mtx-1 nrm-mtx-1 weights)) ;; #x68e + (vu-pair (mtir dst-b clr-b.x) (mulax.xyzw ACC vf20 weights)) ;; #x68f + (vu-pair (mtir dst2-b clr-b.y) (madday.xyzw ACC screen-offset weights)) ;; #x690 + (vu-pair (lq.xyzw vf22 vi00 2) (maddz.xyzw nrm-mtx-2 nrm-mtx-2 weights)) ;; #x691 + (vu-pair (lqi.xyzw vtx-color color-ptr) (itof0.xyzw weights vtx-color)) ;; #x692 + (label mercprime-pipeline-59) + (vu-pair (ibgez vtx-flags mercprime-pipeline-60) (mulaz.xyzw ACC nrm-mtx-0 pos-b)) ;; #x693 + (vu-pair (sq.xyzw xyzf-out dst-c 2) (maddaz.xyzw ACC nrm-mtx-1 clr-b)) ;; #x694 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-c)) ;; #x695 + (label mercprime-pipeline-60) + (vu-pair (mfp.w rlength P) (maddz.xyz clr-b nrm-mtx-2 tex-b)) ;; #x696 + (vu-pair (sq.xyzw tex-c dst-c 0) (miniy.xyzw clr-c clr-c vtx-bias-0)) ;; #x697 + (vu-pair (sq.xyzw tex-c dst2-c 0) (miniw.w pos-a pos-a light-dir-2)) ;; #x698 + (vu-pair (sq.xyzw xyzf-out dst2-c 2) (mulaw.xyzw ACC pos-mtx-0 pos-b)) ;; #x699 + (vu-pair (ilw.y vtx-flags lump-ptr -6) (mulw.xyzw clr-a clr-a rlength)) ;; #x69a + (vu-pair (1024.0) (ftoi0.xyzw clr-c clr-c :i)) ;; #x69b + (vu-pair (erleng.xyz P clr-b) (maxi.xy pos-a pos-a I)) ;; #x69c + (vu-pair (ibne mat3-end color-ptr mercprime-pipeline-45) (maddaw.xyzw ACC pos-mtx-1 clr-b)) ;; #x69d + (vu-pair (mr32.z tex-b vf00) (maddw.xyzw pos-b pos-mtx-2 tex-b)) ;; #x69e + (vu-pair (b finish-mat3) (nop)) ;; #x69f + (vu-pair (nop) (nop))) ;; #x6a0 + ;; Drain the one-matrix pipeline. The three drain blocks differ only in which of the three in-flight + ;; vertices are still incomplete when their loop ran out, and all three end by setting up the copy + ;; tables and falling into the copy loop. + ;; + ;; vi02, vi04 and vi08 are spelled physically here because they are being reused to re-derive + ;; addresses: XTOP again into vi02, then vi04 briefly holds TOP+140 to read samecopy-cnt and + ;; crosscopy-cnt before becoming the GIF base, and vi08 holds the mercprime flag and then the other + ;; buffer's output base, which is (442 - TOP) + 371. + (asm-block drain-one-matrix-pipeline + (label finish-mat1) + (vu-pair (ilw.w vi08 vi00 MERC-VU-ADGIF-TAG) (nop)) ;; #x6a1 + (vu-pair (xtop vi02) (mulax.xyzw ACC light-dir-0 clr-b)) ;; #x6a2 + (vu-pair (sq.xyzw clr-a dst-a 1) (madday.xyzw ACC light-dir-1 clr-b)) ;; #x6a3 + (vu-pair (sq.xyzw clr-a dst2-a 1) (maddz.xyzw clr-b light-dir-2 clr-b)) ;; #x6a4 + (vu-pair (iaddiu vi04 vi02 MERC-VU-FRAGMENT-HEADER) (add.xyzw pos-c pos-c pos-mtx-3)) ;; #x6a5 + (vu-pair (ilwr.x copy-ptr vi04) (maxw.w pos-b pos-b light-dir-1)) ;; #x6a6 + (vu-pair (ilw.w samecopy-end vi04 1) (itof0.xyzw vtx-color vtx-color)) ;; #x6a7 + (vu-pair (ibne vi00 vi08 finish-mat1-pipeline-08) (nop)) ;; #x6a8 + (vu-pair (ilw.x crosscopy-end vi04 2) (maxx.xyzw clr-b clr-b vf00)) ;; #x6a9 + (label finish-mat1-pipeline-01) + (vu-pair (div Q light-dir-0.w pos-c.w) (minix.xyzw pos-mtx-0 vf00 vf00)) ;; #x6aa + (vu-pair (move.xyzw xyzf-out pos-b) (minix.xyzw pos-mtx-1 vf00 vf00)) ;; #x6ab + (vu-pair (iadd copy-ptr copy-ptr vi04) (nop)) ;; #x6ac + (vu-pair (iaddiu gif-base vi02 MERC-VU-OUTPUT) (mulax.xyzw ACC light-color-0 clr-b)) ;; #x6ad + (vu-pair (ibgtz vtx-flags finish-mat1-pipeline-02) (madday.xyzw ACC light-color-1 clr-b)) ;; #x6ae + (vu-pair (iadd samecopy-end samecopy-end copy-ptr) (maddaz.xyzw ACC light-color-2 clr-b)) ;; #x6af + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x6b0 + (label finish-mat1-pipeline-02) + (vu-pair (iadd crosscopy-end crosscopy-end samecopy-end) (maddw.xyzw clr-b light-ambient vf00)) ;; #x6b1 + (vu-pair (ilw.x vtx-flags lump-ptr -6) (mul.xyz pos-c pos-c Q)) ;; #x6b2 + (vu-pair (iaddiu vi08 vi00 MERC-VU-BUFFER-SIZE) (mul.xyzw tex-c tex-c Q)) ;; #x6b3 + (vu-pair (isub vi08 vi08 vi02) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x6b4 + (vu-pair (iaddiu vi08 vi08 MERC-VU-OUTPUT) (mul.xyzw clr-b clr-b vtx-color)) ;; #x6b5 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-c pos-c screen-offset)) ;; #x6b6 + (vu-pair (ibgez vtx-flags finish-mat1-pipeline-03) (nop)) ;; #x6b7 + (vu-pair (sq.xyzw xyzf-out dst-b 2) (nop)) ;; #x6b8 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-b)) ;; #x6b9 + (label finish-mat1-pipeline-03) + (vu-pair (mfp.w rlength P) (nop)) ;; #x6ba + (vu-pair (sq.xyzw tex-b dst-b 0) (miniy.xyzw clr-b clr-b vtx-bias-0)) ;; #x6bb + (vu-pair (sq.xyzw tex-b dst2-b 0) (miniw.w pos-c pos-c light-dir-2)) ;; #x6bc + (vu-pair (sq.xyzw xyzf-out dst2-b 2) (nop)) ;; #x6bd + (vu-pair (ilw.y vtx-flags lump-ptr -3) (mulw.xyzw clr-c clr-c rlength)) ;; #x6be + ;; The copy tables are quadword indices and the loop needs them as absolute addresses, so both output + ;; bases are moved into a vector register, converted, and biased by 8388608.0 -- whose ulp is 1, so + ;; the table entry lands in the low bits of the sum and MTIR reads it straight out. 256.0 goes in the + ;; w lane for the ADC trick in the copy loop below. + (vu-pair (mfir.x pos-mtx-0 gif-base) (ftoi0.xyzw clr-b clr-b)) ;; #x6bf + (vu-pair (mfir.y pos-mtx-0 gif-base) (nop)) ;; #x6c0 + (vu-pair (mfir.x pos-mtx-1 vi08) (nop)) ;; #x6c1 + (vu-pair (ilw.w vi02 vi00 MERC-VU-ADGIF-TAG) (nop)) ;; #x6c2 + (vu-pair (mfir.y pos-mtx-1 gif-base) (mulax.xyzw ACC light-dir-0 clr-c)) ;; #x6c3 + (vu-pair (sq.xyzw clr-b dst-b 1) (madday.xyzw ACC light-dir-1 clr-c)) ;; #x6c4 + (vu-pair (sq.xyzw clr-b dst2-b 1) (maddz.xyzw clr-c light-dir-2 clr-c)) ;; #x6c5 + (vu-pair (nop) (nop)) ;; #x6c6 + (vu-pair (ibne vi00 vi02 finish-mat1-pipeline-09) (maxw.w pos-c pos-c light-dir-1)) ;; #x6c7 + (vu-pair (nop) (itof0.xyzw vtx-color vtx-color)) ;; #x6c8 + (label finish-mat1-pipeline-04) + (vu-pair (8388608.0) (maxx.xyzw clr-c clr-c vf00 :i)) ;; #x6c9 + (vu-pair (256.0) (maxi.xy pos-mtx-2 vf00 I :i)) ;; #x6ca + (vu-pair (move.xyzw xyzf-out pos-c) (maxi.w pos-mtx-2 vf00 I)) ;; #x6cb + (vu-pair (nop) (nop)) ;; #x6cc + (vu-pair (nop) (mulax.xyzw ACC light-color-0 clr-c)) ;; #x6cd + (vu-pair (ibgtz vtx-flags finish-mat1-pipeline-05) (madday.xyzw ACC light-color-1 clr-c)) ;; #x6ce + (vu-pair (nop) (maddaz.xyzw ACC light-color-2 clr-c)) ;; #x6cf + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x6d0 + (label finish-mat1-pipeline-05) + (vu-pair (nop) (maddw.xyzw clr-c light-ambient vf00)) ;; #x6d1 + (vu-pair (ilw.x vtx-flags lump-ptr -3) (itof0.xyzw pos-mtx-0 pos-mtx-0)) ;; #x6d2 + (vu-pair (nop) (itof0.xyzw pos-mtx-1 pos-mtx-1)) ;; #x6d3 + (vu-pair (nop) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x6d4 + (vu-pair (nop) (mul.xyzw clr-c clr-c vtx-color)) ;; #x6d5 + (vu-pair (ior vi02 copy-ptr vi00) (add.xyzw pos-mtx-0 pos-mtx-0 pos-mtx-2)) ;; #x6d6 + (vu-pair (ibgez vtx-flags finish-mat1-pipeline-06) (add.xyzw pos-mtx-1 pos-mtx-1 pos-mtx-2)) ;; #x6d7 + (vu-pair (sq.xyzw xyzf-out dst-c 2) (nop)) ;; #x6d8 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-c)) ;; #x6d9 + (label finish-mat1-pipeline-06) + (vu-pair (ibne samecopy-end copy-ptr finish-mat1-pipeline-07) (nop)) ;; #x6da + (vu-pair (sq.xyzw tex-c dst-c 0) (miniy.xyzw clr-c clr-c vtx-bias-0)) ;; #x6db + (vu-pair (ior samecopy-end crosscopy-end vi00) (max.xyzw pos-mtx-0 pos-mtx-1 pos-mtx-1)) ;; #x6dc + (label finish-mat1-pipeline-07) + (vu-pair (sq.xyzw tex-c dst2-c 0) (nop)) ;; #x6dd + (vu-pair (sq.xyzw xyzf-out dst2-c 2) (nop)) ;; #x6de + (vu-pair (lqi.xyzw pos-mtx-2 copy-ptr) (nop)) ;; #x6df + (vu-pair (nop) (ftoi0.xyzw clr-c clr-c)) ;; #x6e0 + (vu-pair (nop) (nop)) ;; #x6e1 + (vu-pair (nop) (nop)) ;; #x6e2 + (vu-pair (nop) (itof0.xyzw pos-mtx-2 pos-mtx-2)) ;; #x6e3 + (vu-pair (sq.xyzw clr-c dst-c 1) (nop)) ;; #x6e4 + (vu-pair (b copy-vertices) (nop)) ;; #x6e5 + (vu-pair (sq.xyzw clr-c dst2-c 1) (nop)) ;; #x6e6 + (label finish-mat1-pipeline-08) + (vu-pair (3072.0) (miniw.w pos-c pos-c light-dir-0 :i)) ;; #x6e7 + (vu-pair (b finish-mat1-pipeline-01) (minii.xy pos-b pos-b I)) ;; #x6e8 + (vu-pair (nop) (nop)) ;; #x6e9 + (label finish-mat1-pipeline-09) + (vu-pair (1024.0) (nop :i)) ;; #x6ea + (vu-pair (3072.0) (maxi.xy pos-c pos-c I :i)) ;; #x6eb + (vu-pair (b finish-mat1-pipeline-04) (minii.xy pos-c pos-c I)) ;; #x6ec + (vu-pair (isw.w vi00 vi00 MERC-VU-ADGIF-TAG) (nop))) ;; #x6ed + ;; Drain the two-matrix pipeline. + (asm-block drain-two-matrix-pipeline + (label finish-mat2) + (vu-pair (ilw.w vi08 vi00 MERC-VU-ADGIF-TAG) (nop)) ;; #x6ee + (vu-pair (xtop vi02) (mulax.xyzw ACC light-dir-0 clr-c)) ;; #x6ef + (vu-pair (sq.xyzw clr-b dst-b 1) (madday.xyzw ACC light-dir-1 clr-c)) ;; #x6f0 + (vu-pair (sq.xyzw clr-b dst2-b 1) (maddz.xyzw clr-c light-dir-2 clr-c)) ;; #x6f1 + (vu-pair (iaddiu vi04 vi02 MERC-VU-FRAGMENT-HEADER) (add.xyzw pos-a pos-a pos-mtx-3)) ;; #x6f2 + (vu-pair (ilwr.x copy-ptr vi04) (maxw.w pos-c pos-c light-dir-1)) ;; #x6f3 + (vu-pair (ilw.w samecopy-end vi04 1) (itof0.xyzw vtx-color vtx-color)) ;; #x6f4 + (vu-pair (ibne vi00 vi08 finish-mat2-pipeline-08) (nop)) ;; #x6f5 + (vu-pair (ilw.x crosscopy-end vi04 2) (maxx.xyzw clr-c clr-c vf00)) ;; #x6f6 + (label finish-mat2-pipeline-01) + (vu-pair (div Q light-dir-0.w pos-a.w) (minix.xyzw pos-mtx-0 vf00 vf00)) ;; #x6f7 + (vu-pair (move.xyzw xyzf-out pos-c) (minix.xyzw pos-mtx-1 vf00 vf00)) ;; #x6f8 + (vu-pair (iadd copy-ptr copy-ptr vi04) (nop)) ;; #x6f9 + (vu-pair (iaddiu gif-base vi02 MERC-VU-OUTPUT) (mulax.xyzw ACC light-color-0 clr-c)) ;; #x6fa + (vu-pair (ibgtz vtx-flags finish-mat2-pipeline-02) (madday.xyzw ACC light-color-1 clr-c)) ;; #x6fb + (vu-pair (iadd samecopy-end samecopy-end copy-ptr) (maddaz.xyzw ACC light-color-2 clr-c)) ;; #x6fc + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x6fd + (label finish-mat2-pipeline-02) + (vu-pair (iadd crosscopy-end crosscopy-end samecopy-end) (maddw.xyzw clr-c light-ambient vf00)) ;; #x6fe + (vu-pair (ilw.x vtx-flags lump-ptr -6) (mul.xyz pos-a pos-a Q)) ;; #x6ff + (vu-pair (iaddiu vi08 vi00 MERC-VU-BUFFER-SIZE) (mul.xyzw tex-a tex-a Q)) ;; #x700 + (vu-pair (isub vi08 vi08 vi02) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x701 + (vu-pair (iaddiu vi08 vi08 MERC-VU-OUTPUT) (mul.xyzw clr-c clr-c vtx-color)) ;; #x702 + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-a pos-a screen-offset)) ;; #x703 + (vu-pair (ibgez vtx-flags finish-mat2-pipeline-03) (nop)) ;; #x704 + (vu-pair (sq.xyzw xyzf-out dst-c 2) (nop)) ;; #x705 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-c)) ;; #x706 + (label finish-mat2-pipeline-03) + (vu-pair (mfp.w rlength P) (nop)) ;; #x707 + (vu-pair (sq.xyzw tex-c dst-c 0) (miniy.xyzw clr-c clr-c vtx-bias-0)) ;; #x708 + (vu-pair (sq.xyzw tex-c dst2-c 0) (miniw.w pos-a pos-a light-dir-2)) ;; #x709 + (vu-pair (sq.xyzw xyzf-out dst2-c 2) (nop)) ;; #x70a + (vu-pair (ilw.y vtx-flags lump-ptr -3) (mulw.xyzw clr-a clr-a rlength)) ;; #x70b + (vu-pair (mfir.x pos-mtx-0 gif-base) (ftoi0.xyzw clr-c clr-c)) ;; #x70c + (vu-pair (mfir.y pos-mtx-0 gif-base) (nop)) ;; #x70d + (vu-pair (mfir.x pos-mtx-1 vi08) (nop)) ;; #x70e + (vu-pair (ilw.w vi02 vi00 MERC-VU-ADGIF-TAG) (nop)) ;; #x70f + (vu-pair (mfir.y pos-mtx-1 gif-base) (mulax.xyzw ACC light-dir-0 clr-a)) ;; #x710 + (vu-pair (sq.xyzw clr-c dst-c 1) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x711 + (vu-pair (sq.xyzw clr-c dst2-c 1) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x712 + (vu-pair (nop) (nop)) ;; #x713 + (vu-pair (ibne vi00 vi02 finish-mat2-pipeline-09) (maxw.w pos-a pos-a light-dir-1)) ;; #x714 + (vu-pair (nop) (itof0.xyzw vtx-color vtx-color)) ;; #x715 + (label finish-mat2-pipeline-04) + (vu-pair (8388608.0) (maxx.xyzw clr-a clr-a vf00 :i)) ;; #x716 + (vu-pair (256.0) (maxi.xy pos-mtx-2 vf00 I :i)) ;; #x717 + (vu-pair (move.xyzw xyzf-out pos-a) (maxi.w pos-mtx-2 vf00 I)) ;; #x718 + (vu-pair (nop) (nop)) ;; #x719 + (vu-pair (nop) (mulax.xyzw ACC light-color-0 clr-a)) ;; #x71a + (vu-pair (ibgtz vtx-flags finish-mat2-pipeline-05) (madday.xyzw ACC light-color-1 clr-a)) ;; #x71b + (vu-pair (nop) (maddaz.xyzw ACC light-color-2 clr-a)) ;; #x71c + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x71d + (label finish-mat2-pipeline-05) + (vu-pair (nop) (maddw.xyzw clr-a light-ambient vf00)) ;; #x71e + (vu-pair (ilw.x vtx-flags lump-ptr -3) (itof0.xyzw pos-mtx-0 pos-mtx-0)) ;; #x71f + (vu-pair (nop) (itof0.xyzw pos-mtx-1 pos-mtx-1)) ;; #x720 + (vu-pair (nop) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x721 + (vu-pair (nop) (mul.xyzw clr-a clr-a vtx-color)) ;; #x722 + (vu-pair (ior vi02 copy-ptr vi00) (add.xyzw pos-mtx-0 pos-mtx-0 pos-mtx-2)) ;; #x723 + (vu-pair (ibgez vtx-flags finish-mat2-pipeline-06) (add.xyzw pos-mtx-1 pos-mtx-1 pos-mtx-2)) ;; #x724 + (vu-pair (sq.xyzw xyzf-out dst-a 2) (nop)) ;; #x725 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-a)) ;; #x726 + (label finish-mat2-pipeline-06) + (vu-pair (ibne samecopy-end copy-ptr finish-mat2-pipeline-07) (nop)) ;; #x727 + (vu-pair (sq.xyzw tex-a dst-a 0) (miniy.xyzw clr-a clr-a vtx-bias-0)) ;; #x728 + (vu-pair (ior samecopy-end crosscopy-end vi00) (max.xyzw pos-mtx-0 pos-mtx-1 pos-mtx-1)) ;; #x729 + (label finish-mat2-pipeline-07) + (vu-pair (sq.xyzw tex-a dst2-a 0) (nop)) ;; #x72a + (vu-pair (sq.xyzw xyzf-out dst2-a 2) (nop)) ;; #x72b + (vu-pair (lqi.xyzw pos-mtx-2 copy-ptr) (nop)) ;; #x72c + (vu-pair (nop) (ftoi0.xyzw clr-a clr-a)) ;; #x72d + (vu-pair (nop) (nop)) ;; #x72e + (vu-pair (nop) (nop)) ;; #x72f + (vu-pair (nop) (itof0.xyzw pos-mtx-2 pos-mtx-2)) ;; #x730 + (vu-pair (sq.xyzw clr-a dst-a 1) (nop)) ;; #x731 + (vu-pair (b copy-vertices) (nop)) ;; #x732 + (vu-pair (sq.xyzw clr-a dst2-a 1) (nop)) ;; #x733 + (label finish-mat2-pipeline-08) + (vu-pair (3072.0) (miniw.w pos-a pos-a light-dir-0 :i)) ;; #x734 + (vu-pair (b finish-mat2-pipeline-01) (minii.xy pos-c pos-c I)) ;; #x735 + (vu-pair (nop) (nop)) ;; #x736 + (label finish-mat2-pipeline-09) + (vu-pair (1024.0) (nop :i)) ;; #x737 + (vu-pair (3072.0) (maxi.xy pos-a pos-a I :i)) ;; #x738 + (vu-pair (b finish-mat2-pipeline-04) (minii.xy pos-a pos-a I)) ;; #x739 + (vu-pair (isw.w vi00 vi00 1) (nop))) ;; #x73a + ;; Drain the three-matrix pipeline. + (asm-block drain-three-matrix-pipeline + (label finish-mat3) + (vu-pair (ilw.w vi08 vi00 MERC-VU-ADGIF-TAG) (nop)) ;; #x73b + (vu-pair (xtop vi02) (mulax.xyzw ACC light-dir-0 clr-a)) ;; #x73c + (vu-pair (sq.xyzw clr-c dst-c 1) (madday.xyzw ACC light-dir-1 clr-a)) ;; #x73d + (vu-pair (sq.xyzw clr-c dst2-c 1) (maddz.xyzw clr-a light-dir-2 clr-a)) ;; #x73e + (vu-pair (iaddiu vi04 vi02 MERC-VU-FRAGMENT-HEADER) (add.xyzw pos-b pos-b pos-mtx-3)) ;; #x73f + (vu-pair (ilwr.x copy-ptr vi04) (maxw.w pos-a pos-a light-dir-1)) ;; #x740 + (vu-pair (ilw.w samecopy-end vi04 1) (itof0.xyzw vtx-color vtx-color)) ;; #x741 + (vu-pair (ibne vi00 vi08 finish-mat3-pipeline-08) (nop)) ;; #x742 + (vu-pair (ilw.x crosscopy-end vi04 2) (maxx.xyzw clr-a clr-a vf00)) ;; #x743 + (label finish-mat3-pipeline-01) + (vu-pair (div Q light-dir-0.w pos-b.w) (minix.xyzw pos-mtx-0 vf00 vf00)) ;; #x744 + (vu-pair (move.xyzw xyzf-out pos-a) (minix.xyzw pos-mtx-1 vf00 vf00)) ;; #x745 + (vu-pair (iadd copy-ptr copy-ptr vi04) (nop)) ;; #x746 + (vu-pair (iaddiu gif-base vi02 MERC-VU-OUTPUT) (mulax.xyzw ACC light-color-0 clr-a)) ;; #x747 + (vu-pair (ibgtz vtx-flags finish-mat3-pipeline-02) (madday.xyzw ACC light-color-1 clr-a)) ;; #x748 + (vu-pair (iadd samecopy-end samecopy-end copy-ptr) (maddaz.xyzw ACC light-color-2 clr-a)) ;; #x749 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x74a + (label finish-mat3-pipeline-02) + (vu-pair (iadd crosscopy-end crosscopy-end samecopy-end) (maddw.xyzw clr-a light-ambient vf00)) ;; #x74b + (vu-pair (ilw.x vtx-flags lump-ptr -6) (mul.xyz pos-b pos-b Q)) ;; #x74c + (vu-pair (iaddiu vi08 vi00 MERC-VU-BUFFER-SIZE) (mul.xyzw tex-b tex-b Q)) ;; #x74d + (vu-pair (isub vi08 vi08 vi02) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x74e + (vu-pair (iaddiu vi08 vi08 MERC-VU-OUTPUT) (mul.xyzw clr-a clr-a vtx-color)) ;; #x74f + (vu-pair (lqi.xyzw vtx-color color-ptr) (add.xyzw pos-b pos-b screen-offset)) ;; #x750 + (vu-pair (ibgez vtx-flags finish-mat3-pipeline-03) (nop)) ;; #x751 + (vu-pair (sq.xyzw xyzf-out dst-a 2) (nop)) ;; #x752 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-a)) ;; #x753 + (label finish-mat3-pipeline-03) + (vu-pair (mfp.w rlength P) (nop)) ;; #x754 + (vu-pair (sq.xyzw tex-a dst-a 0) (miniy.xyzw clr-a clr-a vtx-bias-0)) ;; #x755 + (vu-pair (sq.xyzw tex-a dst2-a 0) (miniw.w pos-b pos-b light-dir-2)) ;; #x756 + (vu-pair (sq.xyzw xyzf-out dst2-a 2) (nop)) ;; #x757 + (vu-pair (ilw.y vtx-flags lump-ptr -3) (mulw.xyzw clr-b clr-b rlength)) ;; #x758 + (vu-pair (mfir.x pos-mtx-0 gif-base) (ftoi0.xyzw clr-a clr-a)) ;; #x759 + (vu-pair (mfir.y pos-mtx-0 gif-base) (nop)) ;; #x75a + (vu-pair (mfir.x pos-mtx-1 vi08) (nop)) ;; #x75b + (vu-pair (ilw.w vi02 vi00 MERC-VU-ADGIF-TAG) (nop)) ;; #x75c + (vu-pair (mfir.y pos-mtx-1 gif-base) (mulax.xyzw ACC light-dir-0 clr-b)) ;; #x75d + (vu-pair (sq.xyzw clr-a dst-a 1) (madday.xyzw ACC light-dir-1 clr-b)) ;; #x75e + (vu-pair (sq.xyzw clr-a dst2-a 1) (maddz.xyzw clr-b light-dir-2 clr-b)) ;; #x75f + (vu-pair (nop) (nop)) ;; #x760 + (vu-pair (ibne vi00 vi02 finish-mat3-pipeline-09) (maxw.w pos-b pos-b light-dir-1)) ;; #x761 + (vu-pair (nop) (itof0.xyzw vtx-color vtx-color)) ;; #x762 + (label finish-mat3-pipeline-04) + (vu-pair (8388608.0) (maxx.xyzw clr-b clr-b vf00 :i)) ;; #x763 + (vu-pair (256.0) (maxi.xy pos-mtx-2 vf00 I :i)) ;; #x764 + (vu-pair (move.xyzw xyzf-out pos-b) (maxi.w pos-mtx-2 vf00 I)) ;; #x765 + (vu-pair (nop) (nop)) ;; #x766 + (vu-pair (nop) (mulax.xyzw ACC light-color-0 clr-b)) ;; #x767 + (vu-pair (ibgtz vtx-flags finish-mat3-pipeline-05) (madday.xyzw ACC light-color-1 clr-b)) ;; #x768 + (vu-pair (nop) (maddaz.xyzw ACC light-color-2 clr-b)) ;; #x769 + (vu-pair (nop) (addx.w xyzf-out xyzf-out vtx-bias-0)) ;; #x76a + (label finish-mat3-pipeline-05) + (vu-pair (nop) (maddw.xyzw clr-b light-ambient vf00)) ;; #x76b + (vu-pair (ilw.x vtx-flags lump-ptr -3) (itof0.xyzw pos-mtx-0 pos-mtx-0)) ;; #x76c + (vu-pair (nop) (itof0.xyzw pos-mtx-1 pos-mtx-1)) ;; #x76d + (vu-pair (nop) (ftoi4.xyzw xyzf-out xyzf-out)) ;; #x76e + (vu-pair (nop) (mul.xyzw clr-b clr-b vtx-color)) ;; #x76f + (vu-pair (ior vi02 copy-ptr vi00) (add.xyzw pos-mtx-0 pos-mtx-0 pos-mtx-2)) ;; #x770 + (vu-pair (ibgez vtx-flags finish-mat3-pipeline-06) (add.xyzw pos-mtx-1 pos-mtx-1 pos-mtx-2)) ;; #x771 + (vu-pair (sq.xyzw xyzf-out dst-b 2) (nop)) ;; #x772 + (vu-pair (nop) (ftoi4.xyzw xyzf-out pos-b)) ;; #x773 + (label finish-mat3-pipeline-06) + (vu-pair (ibne samecopy-end copy-ptr finish-mat3-pipeline-07) (nop)) ;; #x774 + (vu-pair (sq.xyzw tex-b dst-b 0) (miniy.xyzw clr-b clr-b vtx-bias-0)) ;; #x775 + (vu-pair (ior samecopy-end crosscopy-end vi00) (max.xyzw pos-mtx-0 pos-mtx-1 pos-mtx-1)) ;; #x776 + (label finish-mat3-pipeline-07) + (vu-pair (sq.xyzw tex-b dst2-b 0) (nop)) ;; #x777 + (vu-pair (sq.xyzw xyzf-out dst2-b 2) (nop)) ;; #x778 + (vu-pair (lqi.xyzw pos-mtx-2 copy-ptr) (nop)) ;; #x779 + (vu-pair (nop) (ftoi0.xyzw clr-b clr-b)) ;; #x77a + (vu-pair (nop) (nop)) ;; #x77b + (vu-pair (nop) (nop)) ;; #x77c + (vu-pair (nop) (itof0.xyzw pos-mtx-2 pos-mtx-2)) ;; #x77d + (vu-pair (sq.xyzw clr-b dst-b 1) (nop)) ;; #x77e + (vu-pair (b copy-vertices) (nop)) ;; #x77f + (vu-pair (sq.xyzw clr-b dst2-b 1) (nop)) ;; #x780 + (label finish-mat3-pipeline-08) + (vu-pair (3072.0) (miniw.w pos-b pos-b light-dir-0 :i)) ;; #x781 + (vu-pair (b finish-mat3-pipeline-01) (minii.xy pos-a pos-a I)) ;; #x782 + (vu-pair (nop) (nop)) ;; #x783 + (label finish-mat3-pipeline-09) + (vu-pair (1024.0) (nop :i)) ;; #x784 + (vu-pair (3072.0) (maxi.xy pos-b pos-b I :i)) ;; #x785 + (vu-pair (b finish-mat3-pipeline-04) (minii.xy pos-b pos-b I)) ;; #x786 + (vu-pair (isw.w vi00 vi00 MERC-VU-ADGIF-TAG) (nop))) ;; #x787 + ;; Copy finished ST/RGBAQ/XYZF2 triples. The first table duplicates vertices inside this output + ;; packet; the second reads the other buffer, which still holds the previous fragment's packet, so + ;; two fragments sharing a seam get bit-identical vertices there and no crack can open. + ;; + ;; Registers are physical through this block: it is a five-stage copy pipeline that reuses almost + ;; every vector register as an anonymous quadword shuttle, and the only names that still mean + ;; anything are the three cursors. + (asm-block copy-shared-vertices + (label copy-vertices) + (vu-pair (ibeq crosscopy-end vi02 kick-complete-buffer) (nop)) ;; #x788 + (vu-pair (ilw.w vi15 vi00 MERC-VU-LIGHT-DIR-0) (nop)) ;; #x789 + (vu-pair (ibne samecopy-end copy-ptr copy-pipeline-01) (add.xyzw vf11 vf27 vf25)) ;; #x78a + (vu-pair (nop) (nop)) ;; #x78b + (vu-pair (ibne crosscopy-end samecopy-end copy-pipeline-01) (nop)) ;; #x78c + (vu-pair (ior samecopy-end crosscopy-end vi00) (max.xyzw vf25 vf26 vf26)) ;; #x78d + (vu-pair (nop) (nop)) ;; #x78e + (vu-pair (nop) (nop)) ;; #x78f + (vu-pair (mtir vi08 vf11.x) (nop)) ;; #x790 + (vu-pair (mtir vi10 vf11.y) (nop)) ;; #x791 + (vu-pair (nop) (nop)) ;; #x792 + (vu-pair (nop) (nop)) ;; #x793 + (vu-pair (lq.xyzw vf16 vi08 2) (maxx.xyzw vf15 vf11 vf00)) ;; #x794 + (vu-pair (lq.xyzw vf13 vi08 0) (nop)) ;; #x795 + (vu-pair (b copy-pipeline-05) (nop)) ;; #x796 + (vu-pair (nop) (nop)) ;; #x797 + (label copy-pipeline-01) + (vu-pair (lqi.xyzw vf27 copy-ptr) (nop)) ;; #x798 + (vu-pair (nop) (nop)) ;; #x799 + (vu-pair (mtir vi08 vf11.x) (nop)) ;; #x79a + (vu-pair (mtir vi09 vf11.y) (nop)) ;; #x79b + (vu-pair (nop) (itof0.xyzw vf27 vf27)) ;; #x79c + (vu-pair (nop) (nop)) ;; #x79d + (vu-pair (lq.xyzw vf12 vi08 2) (maxx.xyzw vf15 vf11 vf00)) ;; #x79e + (vu-pair (lq.xyzw vf13 vi08 0) (nop)) ;; #x79f + (vu-pair (ibne samecopy-end copy-ptr copy-pipeline-02) (add.xyzw vf11 vf27 vf25)) ;; #x7a0 + (vu-pair (nop) (nop)) ;; #x7a1 + (vu-pair (ibeq crosscopy-end samecopy-end copy-pipeline-04) (nop)) ;; #x7a2 + (vu-pair (ior samecopy-end crosscopy-end vi00) (max.xyzw vf25 vf26 vf26)) ;; #x7a3 + (label copy-pipeline-02) + ;; The fourth lane of a table entry is an ADC bit for the copy, and it is added in through the float + ;; unit: ITOF15 turns the packed w word into a value below 2, adding it to 256.0 -- whose ulp is + ;; 1/32768 -- puts it back in the low sixteen bits of the sum, and the entry's own contribution of + ;; 32768 ulps is exactly bit 15. The high bits of the stored word are now float exponent, which the + ;; GS ignores: XYZF2 only reads F at bits 4..11 and ADC at bit 15. + (vu-pair (lqi.xyzw vf27 copy-ptr) (itof15.w vf12 vf12)) ;; #x7a4 + (vu-pair (lq.xyzw vf14 vi08 1) (nop)) ;; #x7a5 + (vu-pair (mtir vi08 vf11.x) (nop)) ;; #x7a6 + (vu-pair (mtir vi10 vf11.y) (nop)) ;; #x7a7 + (vu-pair (sq.xyzw vf13 vi09 0) (itof0.xyzw vf27 vf27)) ;; #x7a8 + (vu-pair (sq.xyzw vf14 vi09 1) (add.w vf12 vf12 vf15)) ;; #x7a9 + (vu-pair (lq.xyzw vf16 vi08 2) (maxx.xyzw vf15 vf11 vf00)) ;; #x7aa + (vu-pair (lq.xyzw vf13 vi08 0) (nop)) ;; #x7ab + (vu-pair (ibne samecopy-end copy-ptr copy-pipeline-03) (add.xyzw vf11 vf27 vf25)) ;; #x7ac + (vu-pair (sq.xyzw vf12 vi09 2) (nop)) ;; #x7ad + (vu-pair (ibne crosscopy-end samecopy-end copy-pipeline-03) (nop)) ;; #x7ae + (vu-pair (ior samecopy-end crosscopy-end vi00) (max.xyzw vf25 vf26 vf26)) ;; #x7af + (vu-pair (move.xyzw vf12 vf16) (nop)) ;; #x7b0 + (vu-pair (b copy-pipeline-04) (nop)) ;; #x7b1 + (vu-pair (ior vi09 vi10 vi00) (nop)) ;; #x7b2 + (label copy-pipeline-03) + (vu-pair (lqi.xyzw vf27 copy-ptr) (itof15.w vf16 vf16)) ;; #x7b3 + (vu-pair (lq.xyzw vf14 vi08 1) (nop)) ;; #x7b4 + (vu-pair (mtir vi08 vf11.x) (nop)) ;; #x7b5 + (vu-pair (mtir vi09 vf11.y) (nop)) ;; #x7b6 + (vu-pair (sq.xyzw vf13 vi10 0) (itof0.xyzw vf27 vf27)) ;; #x7b7 + (vu-pair (sq.xyzw vf14 vi10 1) (add.w vf16 vf16 vf15)) ;; #x7b8 + (vu-pair (lq.xyzw vf12 vi08 2) (maxx.xyzw vf15 vf11 vf00)) ;; #x7b9 + (vu-pair (lq.xyzw vf13 vi08 0) (nop)) ;; #x7ba + (vu-pair (ibne samecopy-end copy-ptr copy-pipeline-02) (add.xyzw vf11 vf27 vf25)) ;; #x7bb + (vu-pair (sq.xyzw vf16 vi10 2) (nop)) ;; #x7bc + (vu-pair (ibne crosscopy-end samecopy-end copy-pipeline-02) (nop)) ;; #x7bd + (vu-pair (ior samecopy-end crosscopy-end vi00) (max.xyzw vf25 vf26 vf26)) ;; #x7be + (label copy-pipeline-04) + (vu-pair (nop) (itof15.w vf12 vf12)) ;; #x7bf + (vu-pair (lq.xyzw vf14 vi08 1) (nop)) ;; #x7c0 + (vu-pair (mtir vi08 vf11.x) (nop)) ;; #x7c1 + (vu-pair (mtir vi10 vf11.y) (nop)) ;; #x7c2 + (vu-pair (sq.xyzw vf13 vi09 0) (nop)) ;; #x7c3 + (vu-pair (sq.xyzw vf14 vi09 1) (add.w vf12 vf12 vf15)) ;; #x7c4 + (vu-pair (lq.xyzw vf16 vi08 2) (maxx.xyzw vf15 vf11 vf00)) ;; #x7c5 + (vu-pair (lq.xyzw vf13 vi08 0) (nop)) ;; #x7c6 + (vu-pair (nop) (nop)) ;; #x7c7 + (vu-pair (sq.xyzw vf12 vi09 2) (nop)) ;; #x7c8 + (label copy-pipeline-05) + (vu-pair (nop) (itof15.w vf16 vf16)) ;; #x7c9 + (vu-pair (lq.xyzw vf14 vi08 1) (nop)) ;; #x7ca + (vu-pair (nop) (nop)) ;; #x7cb + (vu-pair (nop) (nop)) ;; #x7cc + (vu-pair (sq.xyzw vf13 vi10 0) (nop)) ;; #x7cd + (vu-pair (sq.xyzw vf14 vi10 1) (add.w vf16 vf16 vf15)) ;; #x7ce + (vu-pair (nop) (nop)) ;; #x7cf + (vu-pair (nop) (nop)) ;; #x7d0 + (vu-pair (nop) (nop)) ;; #x7d1 + (vu-pair (sq.xyzw vf16 vi10 2) (nop))) ;; #x7d2 + ;; Submit the packet. If 132.w still holds this effect's GS TEST value then nothing has sent it yet, + ;; so two quadwords of A+D state are built in the reserved space just below the packet and the kick + ;; starts from there instead -- state first, then geometry, one XGKICK. The flag is cleared so the + ;; rest of the effect's fragments skip it. + (asm-block kick-output-packet + (label kick-complete-buffer) + (vu-pair (ibne vi00 vi15 kick-state-packet) (nop)) ;; #x7d3 + (vu-pair (nop) (nop)) ;; #x7d4 + (vu-pair (xgkick gif-base) (nop)) ;; #x7d5 + (vu-pair (nop) (nop :e)) ;; #x7d6 + (vu-pair (nop) (nop)) ;; #x7d7 + (label kick-state-packet) + (vu-pair (lq.xyzw vf20 vi00 MERC-VU-LIGHT-DIR-0) (nop)) ;; #x7d8 + (vu-pair (lq.xyzw vf21 vi00 MERC-VU-ADGIF-TAG) (nop)) ;; #x7d9 + (vu-pair (iaddi vi01 vi00 0x1) (nop)) ;; #x7da + (vu-pair (isw.x vi01 gif-base -2) (nop)) ;; #x7db + (vu-pair (iaddiu vi02 vi00 (gs-reg64 test-1)) (maxw.x vf20 vf00 vf20)) ;; #x7dc + (vu-pair (isw.z vi02 gif-base -1) (nop)) ;; #x7dd + (vu-pair (sq.yzw vf21 gif-base -2) (nop)) ;; #x7de + (vu-pair (isw.w vi00 vi00 MERC-VU-LIGHT-DIR-0) (nop)) ;; #x7df + (vu-pair (sq.x vf20 gif-base -1) (nop)) ;; #x7e0 + (vu-pair (iaddi gif-base gif-base -0x2) (nop)) ;; #x7e1 + (vu-pair (xgkick gif-base) (nop)) ;; #x7e2 + (vu-pair (nop) (nop :e)) ;; #x7e3 + (vu-pair (nop) (nop)))))) ;; #x7e4 diff --git a/goal_src/jak1/engine/gfx/sprite/sprite-distort-vu1.gc b/goal_src/jak1/engine/gfx/sprite/sprite-distort-vu1.gc new file mode 100644 index 0000000000..c30642697c --- /dev/null +++ b/goal_src/jak1/engine/gfx/sprite/sprite-distort-vu1.gc @@ -0,0 +1,115 @@ +;;-*-Lisp-*- +(in-package goal) + +;; The framebuffer-distortion VU1 program. It draws the circular heat-shimmer and water-warp effects +;; by sampling the frame that has already been rendered and re-drawing it, displaced, as a ring of +;; textured triangles. The GS state is set up in sprite-init-distorter: the current framebuffer as +;; the texture, depth writes off, and a source-over-destination blend. +;; +;; One input sprite is three quadwords, written by sprite-draw-distorters: the projected screen +;; centre, the centre's framebuffer texture coordinate with the turn count in its w lane, and three +;; warp scales taken from the particle's own RGB. Those three scales are what make the ring a warp +;; rather than a copy: x is the radius of the inner ring, and it scales the sampling offset by the +;; same amount, so the inside of the ring is undisplaced; y is the radius of the outer ring in screen +;; space while z is the radius it samples from. Where y and z disagree, the image is stretched. +;; +;; The turn count, 3 through 11, is the ring's angular resolution. sprite-distorter-generate-tables +;; precomputes a closed ring of unit directions for each count, with the screen direction and the +;; matching framebuffer offset interleaved, and ientry maps a count to its first pair. The tables are +;; rebuilt whenever the projection changes because both halves depend on it. +;; +;; Per segment the program takes two adjacent directions and emits five vertices: the two inner ring +;; points, the two outer ones, and the centre. The strip is one primitive across the whole ring -- +;; NLOOP in the giftag is replaced with the turn count, so the GS reads turns groups of fifteen +;; quadwords as a single continuous strip. Patching that loop count needs the value turns | EOP, and +;; EOP is bit 15, which IADDIU cannot reach in one instruction because its immediate is fifteen bits; +;; hence the two additions of 0x4000. +;; +;; Two 176-quadword output buffers alternate so one packet can be kicked while the next is built. A +;; maximum-resolution ring is one tag plus eleven groups of fifteen, which is 166, so it fits. +(#unless PC_PORT + (defvu1 sprite-distort-vu1-block + (rlet ((sprite-count :reg vi01) ;; sprites left in this batch + (gif-buf :reg vi02) ;; base of the output buffer being filled + (in-ptr :reg vi04) ;; cursor through the three-quadword input sprites + (gif-ptr :reg vi05) ;; write cursor inside that buffer + (dir-ptr :reg vi06) ;; cursor into the selected turn count's direction table + (turns :reg vi07) ;; segments left in this ring, and on entry the turn count itself + (patched-tag :reg vi08) ;; the giftag's first word with NLOOP set to the turn count + (giftag :reg vf01) ;; the five-vertex strip tag + (center-pos :reg vf02) ;; projected screen centre + (center-st :reg vf03) ;; its framebuffer texture coordinate + (warp-scales :reg vf04) ;; inner radius, outer radius, outer sampling radius + (neutral-color :reg vf05) ;; the constant 128 grey every vertex uses + (center-xyzf :reg vf14) ;; the centre position in GS fixed point + ;; vi03 holds the sum of the two buffer addresses for the two instructions that flip them. + ;; vf06 through vf13 are the eight ring corners of the segment being emitted: vf06 and vf08 + ;; the inner positions, vf07 and vf09 their sampling coordinates, vf10 and vf12 the outer + ;; positions, vf11 and vf13 their sampling coordinates. + ) + (vu-pair (lq.xyzw giftag vi00 (sprite-distort-const giftag)) (nop)) ;; #x000 + (vu-pair (lq.xyzw neutral-color vi00 (sprite-distort-const color)) (nop)) ;; #x001 + (vu-pair (ilw.x sprite-count vi00 SPRITE-DISTORT-VU-COUNT) (nop)) ;; #x002 + (vu-pair (iaddiu in-ptr vi00 SPRITE-DISTORT-VU-INPUT) (nop)) ;; #x003 + (vu-pair (iaddi gif-buf vi00 SPRITE-DISTORT-VU-GIF-BUFFER-0) (nop)) ;; #x004 + (label distort-sprite-loop) + (vu-pair (ilw.w turns in-ptr 1) (nop)) ;; #x005 + (vu-pair (ior gif-ptr gif-buf vi00) (nop)) ;; #x006 + (vu-pair (ilw.x dir-ptr turns (- (sprite-distort-const ientry) 3)) (nop)) ;; #x007 + (vu-pair (sqi.xyzw giftag gif-ptr) (nop)) ;; #x008 + (vu-pair (iaddiu patched-tag turns 0x4000) (nop)) ;; #x009 + (vu-pair (iaddiu patched-tag patched-tag 0x4000) (nop)) ;; #x00a + (vu-pair (isw.x patched-tag gif-ptr -1) (nop)) ;; #x00b + (vu-pair (lqi.xyzw center-pos in-ptr) (nop)) ;; #x00c + (vu-pair (lqi.xyzw center-st in-ptr) (nop)) ;; #x00d + (vu-pair (lqi.xyzw warp-scales in-ptr) (nop)) ;; #x00e + (vu-pair (nop) (ftoi4.xyzw center-xyzf center-pos)) ;; #x00f + (label distort-segment-loop) + (vu-pair (lqi.xyzw vf06 dir-ptr) (nop)) ;; #x010 + (vu-pair (lqi.xyzw vf07 dir-ptr) (nop)) ;; #x011 + (vu-pair (lq.xyzw vf08 dir-ptr 0) (nop)) ;; #x012 + (vu-pair (lq.xyzw vf09 dir-ptr 1) (nop)) ;; #x013 + (vu-pair (iaddi turns turns -0x1) (muly.xyzw vf10 vf06 warp-scales)) ;; #x014 + (vu-pair (nop) (mulz.xyzw vf11 vf07 warp-scales)) ;; #x015 + (vu-pair (nop) (muly.xyzw vf12 vf08 warp-scales)) ;; #x016 + (vu-pair (nop) (mulz.xyzw vf13 vf09 warp-scales)) ;; #x017 + (vu-pair (nop) (mulx.xyzw vf06 vf06 warp-scales)) ;; #x018 + (vu-pair (nop) (mulx.xyzw vf07 vf07 warp-scales)) ;; #x019 + (vu-pair (nop) (mulx.xyzw vf08 vf08 warp-scales)) ;; #x01a + (vu-pair (nop) (mulx.xyzw vf09 vf09 warp-scales)) ;; #x01b + (vu-pair (nop) (add.xyzw vf10 vf10 center-pos)) ;; #x01c + (vu-pair (nop) (add.xyzw vf11 vf11 center-st)) ;; #x01d + (vu-pair (nop) (add.xyzw vf12 vf12 center-pos)) ;; #x01e + (vu-pair (nop) (add.xyzw vf13 vf13 center-st)) ;; #x01f + (vu-pair (nop) (add.xyzw vf06 vf06 center-pos)) ;; #x020 + (vu-pair (nop) (add.xyzw vf07 vf07 center-st)) ;; #x021 + (vu-pair (nop) (add.xyzw vf08 vf08 center-pos)) ;; #x022 + (vu-pair (nop) (add.xyzw vf09 vf09 center-st)) ;; #x023 + (vu-pair (nop) (ftoi4.xyzw vf10 vf10)) ;; #x024 + (vu-pair (nop) (ftoi4.xyzw vf12 vf12)) ;; #x025 + (vu-pair (nop) (ftoi4.xyzw vf06 vf06)) ;; #x026 + (vu-pair (nop) (ftoi4.xyzw vf08 vf08)) ;; #x027 + (vu-pair (sqi.xyzw vf07 gif-ptr) (nop)) ;; #x028 + (vu-pair (sqi.xyzw neutral-color gif-ptr) (nop)) ;; #x029 + (vu-pair (sqi.xyzw vf06 gif-ptr) (nop)) ;; #x02a + (vu-pair (sqi.xyzw vf09 gif-ptr) (nop)) ;; #x02b + (vu-pair (sqi.xyzw neutral-color gif-ptr) (nop)) ;; #x02c + (vu-pair (sqi.xyzw vf08 gif-ptr) (nop)) ;; #x02d + (vu-pair (sqi.xyzw vf11 gif-ptr) (nop)) ;; #x02e + (vu-pair (sqi.xyzw neutral-color gif-ptr) (nop)) ;; #x02f + (vu-pair (sqi.xyzw vf10 gif-ptr) (nop)) ;; #x030 + (vu-pair (sqi.xyzw vf13 gif-ptr) (nop)) ;; #x031 + (vu-pair (sqi.xyzw neutral-color gif-ptr) (nop)) ;; #x032 + (vu-pair (sqi.xyzw vf12 gif-ptr) (nop)) ;; #x033 + (vu-pair (sqi.xyzw center-st gif-ptr) (nop)) ;; #x034 + (vu-pair (sqi.xyzw neutral-color gif-ptr) (nop)) ;; #x035 + (vu-pair (ibne vi00 turns distort-segment-loop) (nop)) ;; #x036 + (vu-pair (sqi.xyzw center-xyzf gif-ptr) (nop)) ;; #x037 + (vu-pair (xgkick gif-buf) (nop)) ;; #x038 + (vu-pair (iaddi sprite-count sprite-count -0x1) (nop)) ;; #x039 + (vu-pair (iaddiu vi03 vi00 (+ SPRITE-DISTORT-VU-GIF-BUFFER-0 SPRITE-DISTORT-VU-GIF-BUFFER-1)) (nop)) ;; #x03a + (vu-pair (ibne vi00 sprite-count distort-sprite-loop) (nop)) ;; #x03b + (vu-pair (isub gif-buf vi03 gif-buf) (nop)) ;; #x03c + (vu-pair (nop) (nop :e)) ;; #x03d + (vu-pair (nop) (nop)) ;; #x03e + ))) diff --git a/goal_src/jak1/engine/gfx/sprite/sprite-vu1.gc b/goal_src/jak1/engine/gfx/sprite/sprite-vu1.gc new file mode 100644 index 0000000000..55aa445706 --- /dev/null +++ b/goal_src/jak1/engine/gfx/sprite/sprite-vu1.gc @@ -0,0 +1,986 @@ +;;-*-Lisp-*- +(in-package goal) + +;; The sprite VU1 program. Everything it needs is described by types in sprite.gc and sprite-h.gc, +;; so the addresses below are named rather than transcribed; see the memory map beside +;; SPRITE-VU-FRAME-DATA there for the full layout. +;; +;; What a batch is. A sprite is three vector quadwords plus a five-quadword adgif shader, and the +;; producers -- the sparticle system, the HUD, the fake-shadow buffer -- write them straight into one +;; of two global sprite-array-2d / sprite-array-3d allocations as the frame runs. num-valid says how +;; much of each array is live. sprite-add-2d-all then slices the live prefix into chunks of at most +;; 48 and appends one DMA packet group per chunk: a header quadword holding the count, a ref to that +;; slice's vectors, a ref to its shaders, and an MSCAL. The 48 is the input buffer: eight quadwords +;; per sprite plus the header have to fit in 400, and VIF's own double buffering runs a second copy +;; at 400 so the next chunk uploads while this one draws. +;; +;; A sprite-array has two groups, and which group a sprite is in decides which entry point draws it: +;; group 0 of the 2D array is world space, with the camera transform and fog, and group 1 is screen +;; space, with the HUD transform and one of 75 user HVDF offsets picked per sprite. The 3D array uses +;; only group 0. Fake shadows are 3D sprites too, but their vectors and shaders are built into the +;; DMA buffer as they are emitted rather than living in an array, since they are per-frame. +;; +;; Entry points: 0 loads the constants that outlive a chunk, 3 draws world-space 2D sprites, 109 +;; draws screen-space 2D sprites, and 211 draws 3D sprites and shadows. +;; +;; 2D sprites, entries 3 and 109. The three input quadwords are position with an x scale, then a +;; quadword carrying the corner-block selector, the matrix mode, a rotation and a y scale, then a +;; float color. Transform the centre, divide by w, and reject the sprite outright if the transformed +;; w came out negative -- FMAND on the sign flag -- or if the clip test says all of it is off screen. +;; The rotation is turned into a sine and cosine by the five-term polynomial in sincos-01 through +;; sincos-89, and the four corners come from the cdata block the sprite selected, scaled by +;; basis-x/basis-y and the clamped x and y scales. The scale clamp is why a particle shrinking to +;; nothing stops at min-scale instead of vanishing into a subpixel: consts.z is the floor and +;; fog-clamp.z the ceiling. Fog is the transformed z clamped between fog-min and fog-max, and the +;; matrix-mode word doubles as an index that picks the giftag with fog or the one without. +;; +;; 3D sprites, entry 211. The second input quadword is a quaternion's xyz with the y scale in w; the +;; missing component is rebuilt as the nonnegative square root of 1 - x^2 - y^2 - z^2, which works +;; because sprite-set-3d-quaternion! negates xyz whenever w would have been negative. The quaternion +;; is expanded into three basis vectors with cross products, scaled, applied to the four corners of +;; the XZ-plane block, and each corner is transformed and divided separately -- so a 3D sprite is a +;; real quad in space and can be seen edge on, unlike a 2D one. +;; +;; That also means a 3D sprite can straddle the frustum, which is what the clipper at clip-polygon is +;; for. The quad is first tested as a whole: any vertex past the far plane rejects it, and any plane +;; that all four vertices fail rejects it too. Otherwise it is written out as a polygon of ST / +;; RGBAQ / clip-space position triples and clipped against five planes in turn -- the near plane and +;; the four sides, but not the far plane, which the depth test handles. Each pass walks the previous +;; polygon's edges in place: an edge with both ends outside is dropped, an edge that leaves the +;; volume contributes its inside end plus the intersection, an edge that enters contributes only the +;; intersection, and an edge entirely inside contributes its start. The vertex count can therefore +;; grow, which is why the whole thing is a fan and not a quad by the end. After the fifth plane the +;; survivors are divided through, converted to GS fixed point, given the clipped giftag with its +;; loop count patched in, and kicked. +;; +;; Both output buffers are 50 quadwords and alternate per sprite, so the GIF is draining one while +;; the program fills the other. A 2D sprite needs sixteen quadwords, a 3D one nineteen, and the +;; worst clipped fan still fits. +(#unless PC_PORT + (defvu1 sprite-vu1-block + (rlet ((vec-ptr :reg vi02) ;; cursor through this chunk's three-quadword sprite vectors + (adgif-ptr :reg vi03) ;; cursor through its five-quadword adgif shaders + (sprite-count :reg vi04) ;; sprites left in the chunk + (gif-ptr :reg vi05) ;; write cursor inside the GIF buffer being filled + (clip-mask :reg vi06) ;; the constant 1, the FMAND mask that reads the MAC sign flags + (gif-buf :reg vi15) ;; base of the GIF buffer being filled + (t-mtx0 :reg vf25) ;; the active transform, camera or screen + (t-mtx1 :reg vf26) + (t-mtx2 :reg vf27) + (t-mtx3 :reg vf28) + (hmge-scale :reg vf29) ;; the clip-space scale; the clipper reloads its reciprocal here + (hvdf-off :reg vf30) ;; the offset that moves clip space into GS screen space + (frame-consts :reg vf31) ;; x is 1.0, y is degrees-to-radians, z and w the scale clamps + ;; vi01 is the flag register: FMAND for the sign of the transformed w, FCAND and FCOR for + ;; the clip history. It also carries the buffer-address sum for two instructions at the + ;; bottom of each loop, which is why it keeps its physical name. vi07 through vi11 change + ;; role between the sprite loops and the clipper and are described where each begins. + ;; The vf01..vf24 working set is likewise different in each of the three entries. + ) + ;; MSCALF 0: initialize constants and the first GIF output buffer. + (vu-pair (lq.xyzw hmge-scale vi00 (sprite-frame-const hmge-scale)) (nop)) ;; #x000 + (vu-pair (lq.xyzw frame-consts vi00 (sprite-frame-const consts)) (nop :e)) ;; #x001 + (vu-pair (iaddiu gif-buf vi00 SPRITE-VU-GIF-BUFFER-0) (nop)) ;; #x002 + ;; MSCAL 3: draw world-space 2D sprites with the camera transform and fog. + (vu-pair (xtop vec-ptr) (nop)) ;; #x003 + (vu-pair (nop) (nop)) ;; #x004 + (vu-pair (ilwr.x sprite-count vec-ptr) (nop)) ;; #x005 + (vu-pair (iaddi vec-ptr vec-ptr 0x1) (nop)) ;; #x006 + (vu-pair (iaddiu adgif-ptr vec-ptr (- SPRITE-VU-ADGIF-DATA SPRITE-VU-VEC-DATA)) (nop)) ;; #x007 + (label world-2d-load-sprite) + (vu-pair (ilw.y vi08 vec-ptr 1) (nop)) ;; #x008 + (vu-pair (lq.xyzw t-mtx0 vi00 SPRITE-VU-MATRIX) (nop)) ;; #x009 + (vu-pair (lq.xyzw t-mtx1 vi00 (+ SPRITE-VU-MATRIX 1)) (nop)) ;; #x00a + (vu-pair (lq.xyzw t-mtx2 vi00 (+ SPRITE-VU-MATRIX 2)) (nop)) ;; #x00b + (vu-pair (lq.xyzw t-mtx3 vi00 (+ SPRITE-VU-MATRIX 3)) (nop)) ;; #x00c + (vu-pair (lq.xyzw hvdf-off vi00 SPRITE-VU-HVDF) (nop)) ;; #x00d + (vu-pair (lqi.xyzw vf01 vec-ptr) (nop)) ;; #x00e + (vu-pair (lqi.xyzw vf05 vec-ptr) (nop)) ;; #x00f + (vu-pair (lqi.xyzw vf11 vec-ptr) (nop)) ;; #x010 + (vu-pair (lq.xyzw vf12 vi00 (sprite-frame-const fog-clamp)) (mulaw.xyzw ACC t-mtx3 vf00)) ;; #x011 + (vu-pair (nop) (maddax.xyzw ACC t-mtx0 vf01)) ;; #x012 + (vu-pair (nop) (madday.xyzw ACC t-mtx1 vf01)) ;; #x013 + (vu-pair (nop) (maddz.xyzw vf02 t-mtx2 vf01)) ;; #x014 + (vu-pair (move.w vf05 vf00) (addw.z vf01 vf00 vf05)) ;; #x015 + (vu-pair (nop) (nop)) ;; #x016 + (vu-pair (div Q frame-consts.x vf02.w) (muly.z vf05 vf05 frame-consts)) ;; #x017 + (vu-pair (nop) (mul.xyzw vf03 vf02 hmge-scale)) ;; #x018 + (vu-pair (nop) (nop)) ;; #x019 + (vu-pair (nop) (nop)) ;; #x01a + (vu-pair (nop) (mulz.z vf04 vf05 vf05)) ;; #x01b + (vu-pair (lq.xyzw vf14 vi00 (sprite-frame-const sincos-01)) (clipw.xyz vf03 vf03)) ;; #x01c + (vu-pair (iaddi clip-mask vi00 0x1) (adda.xyzw ACC vf11 vf11)) ;; #x01d + (label world-2d-loop) + (vu-pair (ior gif-ptr gif-buf vi00) (mul.zw vf01 vf01 Q)) ;; #x01e + (vu-pair (lq.xyzw vf06 vi00 (sprite-frame-const adgif-giftag)) (mulz.xyzw vf15 vf05 vf04)) ;; #x01f + (vu-pair (lq.xyzw vf14 vi00 (sprite-frame-const sincos-23)) (mula.xyzw ACC vf05 vf14)) ;; #x020 + (vu-pair (fmand vi01 clip-mask) (mul.xyz vf02 vf02 Q)) ;; #x021 + (vu-pair (ibne vi00 vi01 world-2d-reject-early) (addz.x vf01 vf00 vf01)) ;; #x022 + (vu-pair (lqi.xyzw vf07 adgif-ptr) (mulz.xyzw vf16 vf15 vf04)) ;; #x023 + (vu-pair (lq.xyzw vf14 vi00 (sprite-frame-const sincos-45)) (madda.xyzw ACC vf15 vf14)) ;; #x024 + (vu-pair (lqi.xyzw vf08 adgif-ptr) (add.xyzw vf10 vf02 hvdf-off)) ;; #x025 + (vu-pair (lqi.xyzw vf09 adgif-ptr) (mulw.x vf01 vf01 vf01)) ;; #x026 + (vu-pair (sqi.xyzw vf06 gif-ptr) (mulz.xyzw vf15 vf16 vf04)) ;; #x027 + (vu-pair (lq.xyzw vf14 vi00 (sprite-frame-const sincos-67)) (madda.xyzw ACC vf16 vf14)) ;; #x028 + (vu-pair (sqi.xyzw vf07 gif-ptr) (maxx.w vf10 vf10 vf12)) ;; #x029 + (vu-pair (sqi.xyzw vf08 gif-ptr) (maxz.zw vf01 vf01 frame-consts)) ;; #x02a + (vu-pair (sqi.xyzw vf09 gif-ptr) (mulz.xyzw vf16 vf15 vf04)) ;; #x02b + (vu-pair (lq.xyzw vf14 vi00 (sprite-frame-const sincos-89)) (madda.xyzw ACC vf15 vf14)) ;; #x02c + (vu-pair (lqi.xyzw vf06 adgif-ptr) (mulw.x vf01 vf01 frame-consts)) ;; #x02d + (vu-pair (lqi.xyzw vf07 adgif-ptr) (miniy.w vf10 vf10 vf12)) ;; #x02e + (vu-pair (lq.xyzw vf08 vi08 (sprite-frame-const sprite-2d-giftag)) (miniz.zw vf01 vf01 vf12)) ;; #x02f + (vu-pair (ilw.x vi07 vec-ptr -2) (madd.xyzw vf05 vf16 vf14)) ;; #x030 + (vu-pair (lqi.xyzw vf23 vec-ptr) (miniw.x vf01 vf01 vf00)) ;; #x031 + (vu-pair (nop) (suby.w vf02 vf10 vf12)) ;; #x032 + (vu-pair (lqi.xyzw vf24 vec-ptr) (mulx.w vf11 vf11 vf01)) ;; #x033 + (vu-pair (fcand vi01 0x3f) (mulaw.xyzw ACC t-mtx3 vf00)) ;; #x034 + (vu-pair (lq.xyzw vf17 vi00 (sprite-frame-const basis-x)) (maddax.xyzw ACC t-mtx0 vf23)) ;; #x035 + (vu-pair (fmand vi09 clip-mask) (nop)) ;; #x036 + (vu-pair (ibne vi00 vi09 world-2d-plain-giftag) (nop)) ;; #x037 + (vu-pair (lq.xyzw vf18 vi00 (sprite-frame-const basis-y)) (madday.xyzw ACC t-mtx1 vf23)) ;; #x038 + (label world-2d-build-packet) + (vu-pair (lq.xyzw vf19 vi07 (sprite-frame-const cdata 0)) (ftoi0.xyzw vf11 vf11)) ;; #x039 + (vu-pair (lq.xyzw vf20 vi07 (sprite-frame-const cdata 1)) (maddz.xyzw vf02 t-mtx2 vf23)) ;; #x03a + (vu-pair (lq.xyzw vf21 vi07 (sprite-frame-const cdata 2)) (mulaw.xyzw ACC vf17 vf05)) ;; #x03b + (vu-pair (lq.xyzw vf22 vi07 (sprite-frame-const cdata 3)) (msubz.xyzw vf12 vf18 vf05)) ;; #x03c + (vu-pair (sq.xyzw vf11 gif-ptr 3) (mulaz.xyzw ACC vf17 vf05)) ;; #x03d + (vu-pair (lqi.xyzw vf11 vec-ptr) (maddw.xyzw vf13 vf18 vf05)) ;; #x03e + (vu-pair (move.w vf24 vf00) (addw.z vf23 vf00 vf24)) ;; #x03f + (vu-pair (div Q frame-consts.x vf02.w) (mulw.xyzw vf12 vf12 vf01)) ;; #x040 + (vu-pair (ibne vi00 vi01 world-2d-reject-in-loop) (muly.z vf24 vf24 frame-consts)) ;; #x041 + (vu-pair (ilw.y vi08 vec-ptr -2) (mulz.xyzw vf13 vf13 vf01)) ;; #x042 + (vu-pair (sqi.xyzw vf06 gif-ptr) (mul.xyzw vf03 vf02 hmge-scale)) ;; #x043 + (vu-pair (sqi.xyzw vf07 gif-ptr) (mulaw.xyzw ACC vf10 vf00)) ;; #x044 + (vu-pair (sqi.xyzw vf08 gif-ptr) (maddax.xyzw ACC vf12 vf19)) ;; #x045 + (vu-pair (lq.xyzw vf06 vi00 (sprite-frame-const cdata 8)) (maddy.xyzw vf19 vf13 vf19)) ;; #x046 + (vu-pair (lq.xyzw vf07 vi00 (sprite-frame-const cdata 9)) (mulaw.xyzw ACC vf10 vf00)) ;; #x047 + (vu-pair (lq.xyzw vf08 vi00 (sprite-frame-const cdata 10)) (maddax.xyzw ACC vf12 vf20)) ;; #x048 + (vu-pair (lq.xyzw vf09 vi00 (sprite-frame-const cdata 11)) (maddy.xyzw vf20 vf13 vf20)) ;; #x049 + (vu-pair (sq.xyzw vf06 gif-ptr 1) (mulaw.xyzw ACC vf10 vf00)) ;; #x04a + (vu-pair (sq.xyzw vf07 gif-ptr 3) (maddax.xyzw ACC vf12 vf21)) ;; #x04b + (vu-pair (sq.xyzw vf08 gif-ptr 5) (maddy.xyzw vf21 vf13 vf21)) ;; #x04c + (vu-pair (sq.xyzw vf09 gif-ptr 7) (mulaw.xyzw ACC vf10 vf00)) ;; #x04d + (vu-pair (nop) (maddax.xyzw ACC vf12 vf22)) ;; #x04e + (vu-pair (nop) (maddy.xyzw vf22 vf13 vf22)) ;; #x04f + (vu-pair (lq.xyzw vf12 vi00 (sprite-frame-const fog-clamp)) (ftoi4.xyzw vf19 vf19)) ;; #x050 + (vu-pair (lq.xyzw vf14 vi00 (sprite-frame-const sincos-01)) (ftoi4.xyzw vf20 vf20)) ;; #x051 + (vu-pair (move.xyzw vf05 vf24) (ftoi4.xyzw vf21 vf21)) ;; #x052 + (vu-pair (move.xyzw vf01 vf23) (ftoi4.xyzw vf22 vf22)) ;; #x053 + (vu-pair (sq.xyzw vf19 gif-ptr 2) (mulz.z vf04 vf24 vf24)) ;; #x054 + (vu-pair (sq.xyzw vf20 gif-ptr 4) (clipw.xyz vf03 vf03)) ;; #x055 + (vu-pair (sq.xyzw vf21 gif-ptr 6) (nop)) ;; #x056 + (vu-pair (sq.xyzw vf22 gif-ptr 8) (nop)) ;; #x057 + (vu-pair (xgkick gif-buf) (nop)) ;; #x058 + (vu-pair (iaddi sprite-count sprite-count -0x1) (nop)) ;; #x059 + (vu-pair (iaddiu vi01 vi00 (+ SPRITE-VU-GIF-BUFFER-0 SPRITE-VU-GIF-BUFFER-1)) (nop)) ;; #x05a + (vu-pair (ibne vi00 sprite-count world-2d-loop) (nop)) ;; #x05b + (vu-pair (isub gif-buf vi01 gif-buf) (adda.xyzw ACC vf11 vf11)) ;; #x05c + (vu-pair (nop) (nop :e)) ;; #x05d + (vu-pair (nop) (nop)) ;; #x05e + (label world-2d-reject-in-loop) + (vu-pair (iaddi sprite-count sprite-count -0x1) (nop)) ;; #x05f + (vu-pair (iaddi vec-ptr vec-ptr -0x3) (nop)) ;; #x060 + (vu-pair (ibne vi00 sprite-count world-2d-load-sprite) (nop)) ;; #x061 + (vu-pair (nop) (nop)) ;; #x062 + (vu-pair (nop) (nop :e)) ;; #x063 + (vu-pair (nop) (nop)) ;; #x064 + (label world-2d-reject-early) + (vu-pair (iaddi sprite-count sprite-count -0x1) (nop)) ;; #x065 + (vu-pair (iaddi adgif-ptr adgif-ptr 0x4) (nop)) ;; #x066 + (vu-pair (ibne vi00 sprite-count world-2d-load-sprite) (nop)) ;; #x067 + (vu-pair (nop) (nop)) ;; #x068 + (vu-pair (nop) (nop :e)) ;; #x069 + (vu-pair (nop) (nop)) ;; #x06a + (label world-2d-plain-giftag) + (vu-pair (b world-2d-build-packet) (nop)) ;; #x06b + (vu-pair (lq.xyzw vf08 vi00 (sprite-frame-const sprite-2d-giftag-2)) (nop)) ;; #x06c + ;; MSCAL 109: draw screen-space 2D sprites with the HUD transform and user HVDF offsets. + (vu-pair (xtop vec-ptr) (nop)) ;; #x06d + (vu-pair (nop) (nop)) ;; #x06e + (vu-pair (ilwr.x sprite-count vec-ptr) (nop)) ;; #x06f + (vu-pair (iaddi vec-ptr vec-ptr 0x1) (nop)) ;; #x070 + (vu-pair (iaddiu adgif-ptr vec-ptr (- SPRITE-VU-ADGIF-DATA SPRITE-VU-VEC-DATA)) (nop)) ;; #x071 + (label screen-2d-load-sprite) + (vu-pair (ilw.y vi08 vec-ptr 1) (nop)) ;; #x072 + (vu-pair (lq.xyzw t-mtx0 vi00 SPRITE-VU-MATRIX) (nop)) ;; #x073 + (vu-pair (lq.xyzw t-mtx1 vi00 (+ SPRITE-VU-MATRIX 1)) (nop)) ;; #x074 + (vu-pair (lq.xyzw t-mtx2 vi00 (+ SPRITE-VU-MATRIX 2)) (nop)) ;; #x075 + (vu-pair (lq.xyzw t-mtx3 vi00 (+ SPRITE-VU-MATRIX 3)) (nop)) ;; #x076 + (vu-pair (lq.xyzw hvdf-off vi08 SPRITE-VU-HVDF) (nop)) ;; #x077 + (vu-pair (lqi.xyzw vf01 vec-ptr) (nop)) ;; #x078 + (vu-pair (lqi.xyzw vf05 vec-ptr) (nop)) ;; #x079 + (vu-pair (lqi.xyzw vf11 vec-ptr) (nop)) ;; #x07a + (vu-pair (lq.xyzw vf12 vi00 (sprite-frame-const fog-clamp)) (mulaw.xyzw ACC t-mtx3 vf00)) ;; #x07b + (vu-pair (ilw.y vi08 vec-ptr 1) (maddax.xyzw ACC t-mtx0 vf01)) ;; #x07c + (vu-pair (nop) (madday.xyzw ACC t-mtx1 vf01)) ;; #x07d + (vu-pair (nop) (maddz.xyzw vf02 t-mtx2 vf01)) ;; #x07e + (vu-pair (move.w vf05 vf00) (addw.z vf01 vf00 vf05)) ;; #x07f + (vu-pair (nop) (nop)) ;; #x080 + (vu-pair (div Q frame-consts.x vf02.w) (muly.z vf05 vf05 frame-consts)) ;; #x081 + (vu-pair (nop) (mul.xyzw vf03 vf02 hmge-scale)) ;; #x082 + (vu-pair (nop) (nop)) ;; #x083 + (vu-pair (nop) (nop)) ;; #x084 + (vu-pair (nop) (mulz.z vf04 vf05 vf05)) ;; #x085 + (vu-pair (lq.xyzw vf14 vi00 (sprite-frame-const sincos-01)) (clipw.xyz vf03 vf03)) ;; #x086 + (vu-pair (iaddi clip-mask vi00 0x1) (adda.xyzw ACC vf11 vf11)) ;; #x087 + (label screen-2d-loop) + (vu-pair (ior gif-ptr gif-buf vi00) (mul.zw vf01 vf01 Q)) ;; #x088 + (vu-pair (lq.xyzw vf06 vi00 (sprite-frame-const adgif-giftag)) (mulz.xyzw vf15 vf05 vf04)) ;; #x089 + (vu-pair (lq.xyzw vf14 vi00 (sprite-frame-const sincos-23)) (mula.xyzw ACC vf05 vf14)) ;; #x08a + (vu-pair (fmand vi01 clip-mask) (mul.xyz vf02 vf02 Q)) ;; #x08b + (vu-pair (ibne vi00 vi01 screen-2d-reject-early) (addz.x vf01 vf00 vf01)) ;; #x08c + (vu-pair (lqi.xyzw vf07 adgif-ptr) (mulz.xyzw vf16 vf15 vf04)) ;; #x08d + (vu-pair (lq.xyzw vf14 vi00 (sprite-frame-const sincos-45)) (madda.xyzw ACC vf15 vf14)) ;; #x08e + (vu-pair (lqi.xyzw vf08 adgif-ptr) (add.xyzw vf10 vf02 hvdf-off)) ;; #x08f + (vu-pair (lqi.xyzw vf09 adgif-ptr) (mulw.x vf01 vf01 vf01)) ;; #x090 + (vu-pair (sqi.xyzw vf06 gif-ptr) (mulz.xyzw vf15 vf16 vf04)) ;; #x091 + (vu-pair (lq.xyzw vf14 vi00 (sprite-frame-const sincos-67)) (madda.xyzw ACC vf16 vf14)) ;; #x092 + (vu-pair (sqi.xyzw vf07 gif-ptr) (maxx.w vf10 vf10 vf12)) ;; #x093 + (vu-pair (sqi.xyzw vf08 gif-ptr) (maxz.zw vf01 vf01 frame-consts)) ;; #x094 + (vu-pair (sqi.xyzw vf09 gif-ptr) (mulz.xyzw vf16 vf15 vf04)) ;; #x095 + (vu-pair (lq.xyzw vf14 vi00 (sprite-frame-const sincos-89)) (madda.xyzw ACC vf15 vf14)) ;; #x096 + (vu-pair (lqi.xyzw vf06 adgif-ptr) (mulw.x vf01 vf01 frame-consts)) ;; #x097 + (vu-pair (lqi.xyzw vf07 adgif-ptr) (miniy.w vf10 vf10 vf12)) ;; #x098 + (vu-pair (lq.xyzw vf08 vi00 (sprite-frame-const sprite-2d-giftag-2)) (nop)) ;; #x099 + (vu-pair (ilw.x vi07 vec-ptr -2) (madd.xyzw vf05 vf16 vf14)) ;; #x09a + (vu-pair (lq.xyzw hvdf-off vi08 SPRITE-VU-HVDF) (nop)) ;; #x09b + (vu-pair (lqi.xyzw vf23 vec-ptr) (miniw.x vf01 vf01 vf00)) ;; #x09c + (vu-pair (lqi.xyzw vf24 vec-ptr) (mulx.w vf11 vf11 vf01)) ;; #x09d + (vu-pair (fcand vi01 0x3f) (mulaw.xyzw ACC t-mtx3 vf00)) ;; #x09e + (vu-pair (lq.xyzw vf17 vi00 (sprite-frame-const basis-x)) (maddax.xyzw ACC t-mtx0 vf23)) ;; #x09f + (vu-pair (lq.xyzw vf18 vi00 (sprite-frame-const basis-y)) (madday.xyzw ACC t-mtx1 vf23)) ;; #x0a0 + (vu-pair (lq.xyzw vf19 vi07 (sprite-frame-const cdata 0)) (ftoi0.xyzw vf11 vf11)) ;; #x0a1 + (vu-pair (lq.xyzw vf20 vi07 (sprite-frame-const cdata 1)) (maddz.xyzw vf02 t-mtx2 vf23)) ;; #x0a2 + (vu-pair (lq.xyzw vf21 vi07 (sprite-frame-const cdata 2)) (mulaw.xyzw ACC vf17 vf05)) ;; #x0a3 + (vu-pair (lq.xyzw vf22 vi07 (sprite-frame-const cdata 3)) (msubz.xyzw vf12 vf18 vf05)) ;; #x0a4 + (vu-pair (sq.xyzw vf11 gif-ptr 3) (mulaz.xyzw ACC vf17 vf05)) ;; #x0a5 + (vu-pair (lqi.xyzw vf11 vec-ptr) (maddw.xyzw vf13 vf18 vf05)) ;; #x0a6 + (vu-pair (move.w vf24 vf00) (addw.z vf23 vf00 vf24)) ;; #x0a7 + (vu-pair (div Q frame-consts.x vf02.w) (mulw.xyzw vf12 vf12 vf01)) ;; #x0a8 + (vu-pair (ibne vi00 vi01 screen-2d-reject-in-loop) (muly.z vf24 vf24 frame-consts)) ;; #x0a9 + (vu-pair (ilw.y vi08 vec-ptr 1) (mulz.xyzw vf13 vf13 vf01)) ;; #x0aa + (vu-pair (sqi.xyzw vf06 gif-ptr) (mul.xyzw vf03 vf02 hmge-scale)) ;; #x0ab + (vu-pair (sqi.xyzw vf07 gif-ptr) (mulaw.xyzw ACC vf10 vf00)) ;; #x0ac + (vu-pair (sqi.xyzw vf08 gif-ptr) (maddax.xyzw ACC vf12 vf19)) ;; #x0ad + (vu-pair (lq.xyzw vf06 vi00 (sprite-frame-const cdata 8)) (maddy.xyzw vf19 vf13 vf19)) ;; #x0ae + (vu-pair (lq.xyzw vf07 vi00 (sprite-frame-const cdata 9)) (mulaw.xyzw ACC vf10 vf00)) ;; #x0af + (vu-pair (lq.xyzw vf08 vi00 (sprite-frame-const cdata 10)) (maddax.xyzw ACC vf12 vf20)) ;; #x0b0 + (vu-pair (lq.xyzw vf09 vi00 (sprite-frame-const cdata 11)) (maddy.xyzw vf20 vf13 vf20)) ;; #x0b1 + (vu-pair (sq.xyzw vf06 gif-ptr 1) (mulaw.xyzw ACC vf10 vf00)) ;; #x0b2 + (vu-pair (sq.xyzw vf07 gif-ptr 3) (maddax.xyzw ACC vf12 vf21)) ;; #x0b3 + (vu-pair (sq.xyzw vf08 gif-ptr 5) (maddy.xyzw vf21 vf13 vf21)) ;; #x0b4 + (vu-pair (sq.xyzw vf09 gif-ptr 7) (mulaw.xyzw ACC vf10 vf00)) ;; #x0b5 + (vu-pair (nop) (maddax.xyzw ACC vf12 vf22)) ;; #x0b6 + (vu-pair (nop) (maddy.xyzw vf22 vf13 vf22)) ;; #x0b7 + (vu-pair (lq.xyzw vf12 vi00 (sprite-frame-const fog-clamp)) (ftoi4.xyzw vf19 vf19)) ;; #x0b8 + (vu-pair (lq.xyzw vf14 vi00 (sprite-frame-const sincos-01)) (ftoi4.xyzw vf20 vf20)) ;; #x0b9 + (vu-pair (move.xyzw vf05 vf24) (ftoi4.xyzw vf21 vf21)) ;; #x0ba + (vu-pair (move.xyzw vf01 vf23) (ftoi4.xyzw vf22 vf22)) ;; #x0bb + (vu-pair (sq.xyzw vf19 gif-ptr 2) (mulz.z vf04 vf24 vf24)) ;; #x0bc + (vu-pair (sq.xyzw vf20 gif-ptr 4) (clipw.xyz vf03 vf03)) ;; #x0bd + (vu-pair (sq.xyzw vf21 gif-ptr 6) (nop)) ;; #x0be + (vu-pair (sq.xyzw vf22 gif-ptr 8) (nop)) ;; #x0bf + (vu-pair (xgkick gif-buf) (nop)) ;; #x0c0 + (vu-pair (iaddi sprite-count sprite-count -0x1) (nop)) ;; #x0c1 + (vu-pair (iaddiu vi01 vi00 (+ SPRITE-VU-GIF-BUFFER-0 SPRITE-VU-GIF-BUFFER-1)) (nop)) ;; #x0c2 + (vu-pair (ibne vi00 sprite-count screen-2d-loop) (nop)) ;; #x0c3 + (vu-pair (isub gif-buf vi01 gif-buf) (adda.xyzw ACC vf11 vf11)) ;; #x0c4 + (vu-pair (nop) (nop :e)) ;; #x0c5 + (vu-pair (nop) (nop)) ;; #x0c6 + (label screen-2d-reject-in-loop) + (vu-pair (iaddi sprite-count sprite-count -0x1) (nop)) ;; #x0c7 + (vu-pair (iaddi vec-ptr vec-ptr -0x3) (nop)) ;; #x0c8 + (vu-pair (ibne vi00 sprite-count screen-2d-load-sprite) (nop)) ;; #x0c9 + (vu-pair (nop) (nop)) ;; #x0ca + (vu-pair (nop) (nop :e)) ;; #x0cb + (vu-pair (nop) (nop)) ;; #x0cc + (label screen-2d-reject-early) + (vu-pair (iaddi sprite-count sprite-count -0x1) (nop)) ;; #x0cd + (vu-pair (iaddi adgif-ptr adgif-ptr 0x4) (nop)) ;; #x0ce + (vu-pair (ibne vi00 sprite-count screen-2d-load-sprite) (nop)) ;; #x0cf + (vu-pair (nop) (nop)) ;; #x0d0 + (vu-pair (nop) (nop :e)) ;; #x0d1 + (vu-pair (nop) (nop)) ;; #x0d2 + ;; MSCAL 211: draw billboarded and quaternion-oriented 3D sprites and fake shadows. + (vu-pair (lq.xyzw t-mtx0 vi00 SPRITE-VU-MATRIX) (nop)) ;; #x0d3 + (vu-pair (lq.xyzw t-mtx1 vi00 (+ SPRITE-VU-MATRIX 1)) (nop)) ;; #x0d4 + (vu-pair (lq.xyzw t-mtx2 vi00 (+ SPRITE-VU-MATRIX 2)) (nop)) ;; #x0d5 + (vu-pair (lq.xyzw t-mtx3 vi00 (+ SPRITE-VU-MATRIX 3)) (nop)) ;; #x0d6 + (vu-pair (lq.xyzw hvdf-off vi00 SPRITE-VU-HVDF) (nop)) ;; #x0d7 + (vu-pair (xtop vec-ptr) (nop)) ;; #x0d8 + (vu-pair (nop) (nop)) ;; #x0d9 + (vu-pair (ilwr.x sprite-count vec-ptr) (nop)) ;; #x0da + (vu-pair (iaddi vec-ptr vec-ptr 0x1) (nop)) ;; #x0db + (vu-pair (iaddiu adgif-ptr vec-ptr (- SPRITE-VU-ADGIF-DATA SPRITE-VU-VEC-DATA)) (nop)) ;; #x0dc + (vu-pair (lq.xyzw vf23 vi00 (sprite-frame-const fog-clamp)) (nop)) ;; #x0dd + (vu-pair (iaddi clip-mask vi00 0x1) (nop)) ;; #x0de + (label sprite-3d-load-sprite) + (vu-pair (lq.xyzw vf06 vec-ptr 1) (nop)) ;; #x0df + (vu-pair (lq.xyzw vf07 vec-ptr 2) (nop)) ;; #x0e0 + (vu-pair (iaddi vi01 vi00 0x2) (nop)) ;; #x0e1 + (vu-pair (nop) (nop)) ;; #x0e2 + (vu-pair (nop) (mul.xyzw vf05 vf06 vf06)) ;; #x0e3 + (vu-pair (nop) (addw.y vf08 vf00 vf06)) ;; #x0e4 + (vu-pair (nop) (subw.w vf06 vf06 vf06)) ;; #x0e5 + (vu-pair (nop) (adda.xyzw ACC vf07 vf07)) ;; #x0e6 + (vu-pair (nop) (addy.x vf05 vf05 vf05)) ;; #x0e7 + (vu-pair (nop) (nop)) ;; #x0e8 + (vu-pair (nop) (nop)) ;; #x0e9 + (vu-pair (fmand vi01 clip-mask) (nop)) ;; #x0ea + (vu-pair (ibne vi00 vi01 sprite-3d-reject-early) (addz.x vf05 vf05 vf05)) ;; #x0eb + (vu-pair (nop) (nop)) ;; #x0ec + (vu-pair (nop) (nop)) ;; #x0ed + (vu-pair (nop) (nop)) ;; #x0ee + (vu-pair (nop) (subx.w vf05 vf00 vf05)) ;; #x0ef + (vu-pair (nop) (nop)) ;; #x0f0 + (vu-pair (nop) (nop)) ;; #x0f1 + (vu-pair (nop) (nop)) ;; #x0f2 + (vu-pair (sqrt Q vf05.w) (nop)) ;; #x0f3 + (vu-pair (nop) (nop)) ;; #x0f4 + (vu-pair (nop) (nop)) ;; #x0f5 + (vu-pair (nop) (nop)) ;; #x0f6 + (vu-pair (nop) (nop)) ;; #x0f7 + (vu-pair (nop) (nop)) ;; #x0f8 + (vu-pair (nop) (nop)) ;; #x0f9 + (vu-pair (nop) (addq.w vf06 vf06 Q)) ;; #x0fa + (vu-pair (nop) (nop)) ;; #x0fb + (vu-pair (nop) (nop)) ;; #x0fc + (vu-pair (nop) (nop)) ;; #x0fd + (vu-pair (nop) (add.xyzw vf13 vf06 vf06)) ;; #x0fe + (vu-pair (nop) (addw.x vf09 vf00 vf06)) ;; #x0ff + (vu-pair (nop) (addz.y vf09 vf00 vf06)) ;; #x100 + (vu-pair (nop) (suby.z vf09 vf00 vf06)) ;; #x101 + (vu-pair (nop) (subw.w vf09 vf00 vf00)) ;; #x102 + (vu-pair (nop) (subz.x vf10 vf00 vf06)) ;; #x103 + (vu-pair (nop) (addw.y vf10 vf00 vf06)) ;; #x104 + (vu-pair (nop) (addx.z vf10 vf00 vf06)) ;; #x105 + (vu-pair (nop) (subw.w vf10 vf00 vf00)) ;; #x106 + (vu-pair (nop) (addy.x vf11 vf00 vf06)) ;; #x107 + (vu-pair (nop) (subx.y vf11 vf00 vf06)) ;; #x108 + (vu-pair (nop) (addw.z vf11 vf00 vf06)) ;; #x109 + (vu-pair (nop) (subw.w vf11 vf00 vf00)) ;; #x10a + (label sprite-3d-loop) + (vu-pair (lq.xyzw vf12 vec-ptr 0) (opmula.xyz ACC vf13 vf09)) ;; #x10b + (vu-pair (lq.xyzw vf07 vec-ptr 2) (opmsub.xyz vf09 vf09 vf13)) ;; #x10c + (vu-pair (iaddi vec-ptr vec-ptr 0x3) (opmula.xyz ACC vf13 vf10)) ;; #x10d + (vu-pair (lq.xyzw vf06 vec-ptr 1) (opmsub.xyz vf10 vf10 vf13)) ;; #x10e + (vu-pair (ior gif-ptr gif-buf vi00) (opmula.xyz ACC vf13 vf11)) ;; #x10f + (vu-pair (lq.xyzw vf01 vi00 (sprite-frame-const adgif-giftag)) (opmsub.xyz vf11 vf11 vf13)) ;; #x110 + (vu-pair (lqi.xyzw vf02 adgif-ptr) (addw.x vf09 vf09 vf00)) ;; #x111 + (vu-pair (lqi.xyzw vf03 adgif-ptr) (addw.y vf10 vf10 vf00)) ;; #x112 + (vu-pair (lqi.xyzw vf04 adgif-ptr) (addw.z vf11 vf11 vf00)) ;; #x113 + (vu-pair (sqi.xyzw vf01 gif-ptr) (mul.xyzw vf05 vf06 vf06)) ;; #x114 + (vu-pair (move.w vf12 vf00) (mulw.xyzw vf09 vf09 vf12)) ;; #x115 + (vu-pair (iaddi clip-mask vi00 0x1) (muly.xyzw vf11 vf11 vf08)) ;; #x116 + (vu-pair (lq.xyzw vf14 vi00 (sprite-frame-const cdata 12)) (adda.xyzw ACC vf07 vf07)) ;; #x117 + (vu-pair (lq.xyzw vf15 vi00 (sprite-frame-const cdata 13)) (ftoi0.xyzw vf07 vf07)) ;; #x118 + (vu-pair (lq.xyzw vf16 vi00 (sprite-frame-const cdata 14)) (addw.y vf08 vf00 vf06)) ;; #x119 + (vu-pair (lq.xyzw vf17 vi00 (sprite-frame-const cdata 15)) (subw.w vf06 vf06 vf06)) ;; #x11a + (vu-pair (fmand vi01 clip-mask) (mulax.xyzw ACC vf09 vf14)) ;; #x11b + (vu-pair (ibne vi00 vi01 sprite-3d-reject-in-loop) (madday.xyzw ACC vf10 vf14)) ;; #x11c + (vu-pair (sq.xyzw vf07 gif-ptr 7) (maddaz.xyzw ACC vf11 vf14)) ;; #x11d + (vu-pair (sq.xyzw vf07 gif-ptr 10) (maddw.xyzw vf14 vf12 vf00)) ;; #x11e + (vu-pair (sqi.xyzw vf02 gif-ptr) (addy.x vf05 vf05 vf05)) ;; #x11f + (vu-pair (sq.xyzw vf07 gif-ptr 12) (mulax.xyzw ACC vf09 vf15)) ;; #x120 + (vu-pair (sq.xyzw vf07 gif-ptr 15) (madday.xyzw ACC vf10 vf15)) ;; #x121 + (vu-pair (sqi.xyzw vf03 gif-ptr) (maddaz.xyzw ACC vf11 vf15)) ;; #x122 + (vu-pair (sqi.xyzw vf04 gif-ptr) (addz.x vf05 vf05 vf05)) ;; #x123 + (vu-pair (lqi.xyzw vf01 adgif-ptr) (maddw.xyzw vf15 vf12 vf00)) ;; #x124 + (vu-pair (lqi.xyzw vf02 adgif-ptr) (mulax.xyzw ACC vf09 vf16)) ;; #x125 + (vu-pair (lq.xyzw vf03 vi00 (sprite-frame-const sprite-3d-giftag)) (madday.xyzw ACC vf10 vf16)) ;; #x126 + (vu-pair (nop) (subx.w vf05 vf00 vf05)) ;; #x127 + (vu-pair (sqi.xyzw vf01 gif-ptr) (maddaz.xyzw ACC vf11 vf16)) ;; #x128 + (vu-pair (sqi.xyzw vf02 gif-ptr) (maddw.xyzw vf16 vf12 vf00)) ;; #x129 + (vu-pair (sqi.xyzw vf03 gif-ptr) (mulax.xyzw ACC vf09 vf17)) ;; #x12a + (vu-pair (sqrt Q vf05.w) (madday.xyzw ACC vf10 vf17)) ;; #x12b + (vu-pair (nop) (maddaz.xyzw ACC vf11 vf17)) ;; #x12c + (vu-pair (nop) (maddw.xyzw vf17 vf12 vf00)) ;; #x12d + (vu-pair (lq.xyzw vf18 vi00 (sprite-frame-const cdata 8)) (mulax.xyzw ACC t-mtx0 vf14)) ;; #x12e + (vu-pair (lq.xyzw vf19 vi00 (sprite-frame-const cdata 9)) (madday.xyzw ACC t-mtx1 vf14)) ;; #x12f + (vu-pair (lq.xyzw vf20 vi00 (sprite-frame-const cdata 10)) (maddaz.xyzw ACC t-mtx2 vf14)) ;; #x130 + (vu-pair (lq.xyzw vf21 vi00 (sprite-frame-const cdata 11)) (maddw.xyzw vf14 t-mtx3 vf00)) ;; #x131 + (vu-pair (nop) (addq.w vf06 vf06 Q)) ;; #x132 + (vu-pair (nop) (mulax.xyzw ACC t-mtx0 vf15)) ;; #x133 + (vu-pair (nop) (madday.xyzw ACC t-mtx1 vf15)) ;; #x134 + (vu-pair (nop) (maddaz.xyzw ACC t-mtx2 vf15)) ;; #x135 + (vu-pair (div Q frame-consts.x vf14.w) (mul.xyzw vf09 vf14 hmge-scale)) ;; #x136 + (vu-pair (nop) (maddw.xyzw vf15 t-mtx3 vf00)) ;; #x137 + (vu-pair (nop) (mulax.xyzw ACC t-mtx0 vf16)) ;; #x138 + (vu-pair (nop) (madday.xyzw ACC t-mtx1 vf16)) ;; #x139 + (vu-pair (nop) (maddaz.xyzw ACC t-mtx2 vf16)) ;; #x13a + (vu-pair (nop) (mul.xyzw vf10 vf15 hmge-scale)) ;; #x13b + (vu-pair (nop) (maddw.xyzw vf16 t-mtx3 vf00)) ;; #x13c + (vu-pair (div Q frame-consts.x vf15.w) (mul.xyz vf14 vf14 Q)) ;; #x13d + (vu-pair (nop) (mul.xyzw vf18 vf18 Q)) ;; #x13e + (vu-pair (nop) (mulax.xyzw ACC t-mtx0 vf17)) ;; #x13f + (vu-pair (nop) (madday.xyzw ACC t-mtx1 vf17)) ;; #x140 + (vu-pair (nop) (maddaz.xyzw ACC t-mtx2 vf17)) ;; #x141 + (vu-pair (sq.xyzw vf18 gif-ptr 0) (mul.xyzw vf11 vf16 hmge-scale)) ;; #x142 + (vu-pair (nop) (maddw.xyzw vf17 t-mtx3 vf00)) ;; #x143 + (vu-pair (div Q frame-consts.x vf16.w) (mul.xyz vf15 vf15 Q)) ;; #x144 + (vu-pair (nop) (mul.xyzw vf19 vf19 Q)) ;; #x145 + (vu-pair (nop) (add.xyzw vf14 vf14 hvdf-off)) ;; #x146 + (vu-pair (nop) (add.xyzw vf15 vf15 hvdf-off)) ;; #x147 + (vu-pair (nop) (mul.xyzw vf12 vf17 hmge-scale)) ;; #x148 + (vu-pair (sq.xyzw vf19 gif-ptr 3) (clipw.xyz vf09 vf09)) ;; #x149 + (vu-pair (nop) (clipw.xyz vf10 vf10)) ;; #x14a + (vu-pair (div Q frame-consts.x vf17.w) (mul.xyz vf16 vf16 Q)) ;; #x14b + (vu-pair (nop) (mul.xyzw vf20 vf20 Q)) ;; #x14c + (vu-pair (nop) (clipw.xyz vf11 vf11)) ;; #x14d + (vu-pair (nop) (clipw.xyz vf12 vf12)) ;; #x14e + (vu-pair (nop) (add.xyzw vf16 vf16 hvdf-off)) ;; #x14f + (vu-pair (sq.xyzw vf20 gif-ptr 6) (maxx.w vf14 vf14 vf23)) ;; #x150 + (vu-pair (nop) (maxx.w vf15 vf15 vf23)) ;; #x151 + (vu-pair (fcand vi01 0x410410) (mul.xyz vf17 vf17 Q)) ;; #x152 + (vu-pair (ibne vi00 vi01 sprite-3d-reject) (mul.xyzw vf21 vf21 Q)) ;; #x153 + (vu-pair (fcand vi01 0xffffff) (maxx.w vf16 vf16 vf23)) ;; #x154 + (vu-pair (ibne vi00 vi01 sprite-3d-clip-quad) (miniy.w vf14 vf14 vf23)) ;; #x155 + (vu-pair (nop) (add.xyzw vf17 vf17 hvdf-off)) ;; #x156 + (vu-pair (sq.xyzw vf21 gif-ptr 9) (miniy.w vf15 vf15 vf23)) ;; #x157 + (vu-pair (nop) (miniy.w vf16 vf16 vf23)) ;; #x158 + (vu-pair (nop) (ftoi4.xyzw vf14 vf14)) ;; #x159 + (vu-pair (nop) (maxx.w vf17 vf17 vf23)) ;; #x15a + (vu-pair (nop) (ftoi4.xyzw vf15 vf15)) ;; #x15b + (vu-pair (nop) (ftoi4.xyzw vf16 vf16)) ;; #x15c + (vu-pair (sq.xyzw vf14 gif-ptr 2) (add.xyzw vf13 vf06 vf06)) ;; #x15d + (vu-pair (nop) (miniy.w vf17 vf17 vf23)) ;; #x15e + (vu-pair (sq.xyzw vf15 gif-ptr 5) (addw.x vf09 vf00 vf06)) ;; #x15f + (vu-pair (sq.xyzw vf16 gif-ptr 8) (addz.y vf09 vf00 vf06)) ;; #x160 + (vu-pair (nop) (suby.z vf09 vf00 vf06)) ;; #x161 + (vu-pair (nop) (ftoi4.xyzw vf17 vf17)) ;; #x162 + (vu-pair (nop) (subw.w vf09 vf00 vf00)) ;; #x163 + (vu-pair (nop) (subz.x vf10 vf00 vf06)) ;; #x164 + (vu-pair (nop) (addw.y vf10 vf00 vf06)) ;; #x165 + (vu-pair (sq.xyzw vf17 gif-ptr 11) (addx.z vf10 vf00 vf06)) ;; #x166 + (vu-pair (xgkick gif-buf) (subw.w vf10 vf00 vf00)) ;; #x167 + (vu-pair (iaddi sprite-count sprite-count -0x1) (addy.x vf11 vf00 vf06)) ;; #x168 + (vu-pair (iaddiu vi01 vi00 (+ SPRITE-VU-GIF-BUFFER-0 SPRITE-VU-GIF-BUFFER-1)) (subx.y vf11 vf00 vf06)) ;; #x169 + (vu-pair (ibne vi00 sprite-count sprite-3d-loop) (addw.z vf11 vf00 vf06)) ;; #x16a + (vu-pair (isub gif-buf vi01 gif-buf) (subw.w vf11 vf00 vf00)) ;; #x16b + (vu-pair (nop) (nop :e)) ;; #x16c + (vu-pair (nop) (nop)) ;; #x16d + (label sprite-3d-reject) + (vu-pair (iaddi sprite-count sprite-count -0x1) (nop)) ;; #x16e + (vu-pair (nop) (nop)) ;; #x16f + (vu-pair (ibne vi00 sprite-count sprite-3d-load-sprite) (nop)) ;; #x170 + (vu-pair (nop) (nop)) ;; #x171 + (vu-pair (nop) (nop :e)) ;; #x172 + (vu-pair (nop) (nop)) ;; #x173 + (label sprite-3d-reject-in-loop) + (vu-pair (iaddi sprite-count sprite-count -0x1) (nop)) ;; #x174 + (vu-pair (iaddi adgif-ptr adgif-ptr 0x2) (nop)) ;; #x175 + (vu-pair (ibne vi00 sprite-count sprite-3d-load-sprite) (nop)) ;; #x176 + (vu-pair (nop) (nop)) ;; #x177 + (vu-pair (nop) (nop :e)) ;; #x178 + (vu-pair (nop) (nop)) ;; #x179 + (label sprite-3d-reject-early) + (vu-pair (iaddi sprite-count sprite-count -0x1) (nop)) ;; #x17a + (vu-pair (iaddi adgif-ptr adgif-ptr 0x5) (nop)) ;; #x17b + (vu-pair (ibne vi00 sprite-count sprite-3d-load-sprite) (nop)) ;; #x17c + (vu-pair (iaddi vec-ptr vec-ptr 0x3) (nop)) ;; #x17d + (vu-pair (nop) (nop :e)) ;; #x17e + (vu-pair (nop) (nop)) ;; #x17f + (label sprite-3d-clip-quad) + (vu-pair (fcor vi01 0x7df7df) (nop)) ;; #x180 + (vu-pair (ibne vi00 vi01 sprite-3d-reject) (nop)) ;; #x181 + (vu-pair (fcor vi01 0xdf7df7) (nop)) ;; #x182 + (vu-pair (ibne vi00 vi01 sprite-3d-reject) (nop)) ;; #x183 + (vu-pair (fcor vi01 0xefbefb) (nop)) ;; #x184 + (vu-pair (ibne vi00 vi01 sprite-3d-reject) (nop)) ;; #x185 + (vu-pair (fcor vi01 0xf7df7d) (nop)) ;; #x186 + (vu-pair (ibne vi00 vi01 sprite-3d-reject) (nop)) ;; #x187 + (vu-pair (fcor vi01 0xfbefbe) (nop)) ;; #x188 + (vu-pair (ibne vi00 vi01 sprite-3d-reject) (nop)) ;; #x189 + (vu-pair (ior vi07 gif-ptr vi00) (nop)) ;; #x18a + (vu-pair (nop) (itof0.xyzw vf07 vf07)) ;; #x18b + (vu-pair (sq.xyzw vf09 vi07 2) (nop)) ;; #x18c + (vu-pair (sq.xyzw vf10 vi07 5) (nop)) ;; #x18d + (vu-pair (sq.xyzw vf11 vi07 8) (nop)) ;; #x18e + (vu-pair (sq.xyzw vf12 vi07 11) (nop)) ;; #x18f + (vu-pair (sq.xyzw vf09 vi07 14) (nop)) ;; #x190 + (vu-pair (lq.xyzw vf18 vi00 (sprite-frame-const cdata 8)) (nop)) ;; #x191 + (vu-pair (lq.xyzw vf19 vi00 (sprite-frame-const cdata 9)) (nop)) ;; #x192 + (vu-pair (lq.xyzw vf20 vi00 (sprite-frame-const cdata 10)) (nop)) ;; #x193 + (vu-pair (lq.xyzw vf21 vi00 (sprite-frame-const cdata 11)) (nop)) ;; #x194 + (vu-pair (sq.xyzw vf18 vi07 0) (nop)) ;; #x195 + (vu-pair (sq.xyzw vf19 vi07 3) (nop)) ;; #x196 + (vu-pair (sq.xyzw vf20 vi07 6) (nop)) ;; #x197 + (vu-pair (sq.xyzw vf21 vi07 9) (nop)) ;; #x198 + (vu-pair (sq.xyzw vf18 vi07 12) (nop)) ;; #x199 + (vu-pair (sq.xyzw vf07 vi07 1) (nop)) ;; #x19a + (vu-pair (sq.xyzw vf07 vi07 4) (nop)) ;; #x19b + (vu-pair (sq.xyzw vf07 vi07 7) (nop)) ;; #x19c + (vu-pair (sq.xyzw vf07 vi07 10) (nop)) ;; #x19d + (vu-pair (sq.xyzw vf07 vi07 13) (nop)) ;; #x19e + (vu-pair (iaddi vi09 vi00 0x4) (nop)) ;; #x19f + (vu-pair (bal vi11 clip-polygon) (nop)) ;; #x1a0 + (vu-pair (nop) (nop)) ;; #x1a1 + (vu-pair (lq.xyzw vf01 vi00 (sprite-frame-const clipped-giftag)) (nop)) ;; #x1a2 + (vu-pair (ibeq vi00 vi09 sprite-3d-reject) (nop)) ;; #x1a3 + (vu-pair (iaddiu vi10 vi09 0x4000) (nop)) ;; #x1a4 + (vu-pair (iaddiu vi10 vi10 0x4000) (nop)) ;; #x1a5 + (vu-pair (sqd.xyzw vf01 gif-ptr) (nop)) ;; #x1a6 + (vu-pair (iswr.x vi10 gif-ptr) (nop)) ;; #x1a7 + (vu-pair (iaddi gif-ptr gif-ptr 0x1) (nop)) ;; #x1a8 + (vu-pair (lq.xyzw hmge-scale vi00 (sprite-frame-const inv-hmge-scale)) (nop)) ;; #x1a9 + (label clip-project-fan) + (vu-pair (lqi.xyzw vf17 gif-ptr) (nop)) ;; #x1aa + (vu-pair (lqi.xyzw vf20 gif-ptr) (nop)) ;; #x1ab + (vu-pair (lqi.xyzw vf14 gif-ptr) (nop)) ;; #x1ac + (vu-pair (nop) (nop)) ;; #x1ad + (vu-pair (nop) (nop)) ;; #x1ae + (vu-pair (nop) (nop)) ;; #x1af + (vu-pair (div Q vf00.w vf14.w) (mul.xyzw vf14 vf14 hmge-scale)) ;; #x1b0 + (vu-pair (nop) (nop)) ;; #x1b1 + (vu-pair (nop) (nop)) ;; #x1b2 + (vu-pair (nop) (nop)) ;; #x1b3 + (vu-pair (nop) (nop)) ;; #x1b4 + (vu-pair (nop) (nop)) ;; #x1b5 + (vu-pair (nop) (nop)) ;; #x1b6 + (vu-pair (nop) (mul.xyz vf14 vf14 Q)) ;; #x1b7 + (vu-pair (nop) (mul.xyzw vf17 vf17 Q)) ;; #x1b8 + (vu-pair (nop) (nop)) ;; #x1b9 + (vu-pair (nop) (nop)) ;; #x1ba + (vu-pair (nop) (add.xyzw vf14 vf14 hvdf-off)) ;; #x1bb + (vu-pair (nop) (nop)) ;; #x1bc + (vu-pair (nop) (nop)) ;; #x1bd + (vu-pair (nop) (nop)) ;; #x1be + (vu-pair (nop) (maxx.w vf14 vf14 vf23)) ;; #x1bf + (vu-pair (nop) (nop)) ;; #x1c0 + (vu-pair (nop) (nop)) ;; #x1c1 + (vu-pair (nop) (nop)) ;; #x1c2 + (vu-pair (nop) (miniy.w vf14 vf14 vf23)) ;; #x1c3 + (vu-pair (nop) (nop)) ;; #x1c4 + (vu-pair (nop) (nop)) ;; #x1c5 + (vu-pair (nop) (ftoi0.xyzw vf20 vf20)) ;; #x1c6 + (vu-pair (nop) (ftoi4.xyzw vf14 vf14)) ;; #x1c7 + (vu-pair (nop) (nop)) ;; #x1c8 + (vu-pair (sq.xyzw vf17 gif-ptr -3) (nop)) ;; #x1c9 + (vu-pair (sq.xyzw vf20 gif-ptr -2) (nop)) ;; #x1ca + (vu-pair (sq.xyzw vf14 gif-ptr -1) (nop)) ;; #x1cb + (vu-pair (iaddi vi09 vi09 -0x1) (nop)) ;; #x1cc + (vu-pair (nop) (nop)) ;; #x1cd + (vu-pair (ibne vi00 vi09 clip-project-fan) (nop)) ;; #x1ce + (vu-pair (nop) (nop)) ;; #x1cf + (vu-pair (lq.xyzw hmge-scale vi00 (sprite-frame-const hmge-scale)) (nop)) ;; #x1d0 + (vu-pair (xgkick gif-buf) (nop)) ;; #x1d1 + (vu-pair (iaddi sprite-count sprite-count -0x1) (nop)) ;; #x1d2 + (vu-pair (iaddiu vi01 vi00 (+ SPRITE-VU-GIF-BUFFER-0 SPRITE-VU-GIF-BUFFER-1)) (nop)) ;; #x1d3 + (vu-pair (ibne vi00 sprite-count sprite-3d-load-sprite) (nop)) ;; #x1d4 + (vu-pair (isub gif-buf vi01 gif-buf) (nop)) ;; #x1d5 + (vu-pair (nop) (nop :e)) ;; #x1d6 + (vu-pair (nop) (nop)) ;; #x1d7 + ;; Clip a partially visible polygon in place. vi07 is the input cursor, vi08 the output cursor, + ;; vi09 the input vertex count, and vi10 the output vertex count. Each vertex occupies three + ;; quadwords: ST, RGBAQ, and homogeneous position. + (label clip-polygon) + (vu-pair (ior vi08 vi07 vi00) (nop)) ;; #x1d8 + (vu-pair (lq.xyzw vf14 vi07 2) (nop)) ;; #x1d9 + (vu-pair (ior vi10 vi09 vi00) (nop)) ;; #x1da + (vu-pair (lq.xyzw vf17 vi07 0) (nop)) ;; #x1db + (vu-pair (lq.xyzw vf20 vi07 1) (nop)) ;; #x1dc + (vu-pair (iaddi vi07 vi07 0x3) (clipw.xyz vf14 vf14)) ;; #x1dd + (label clip-near-edge) + (vu-pair (lq.xyzw vf15 vi07 2) (nop)) ;; #x1de + (vu-pair (lq.xyzw vf18 vi07 0) (nop)) ;; #x1df + (vu-pair (lq.xyzw vf21 vi07 1) (nop)) ;; #x1e0 + (vu-pair (iaddi vi07 vi07 0x3) (nop)) ;; #x1e1 + (vu-pair (nop) (clipw.xyz vf15 vf15)) ;; #x1e2 + (vu-pair (nop) (nop)) ;; #x1e3 + (vu-pair (nop) (nop)) ;; #x1e4 + (vu-pair (nop) (nop)) ;; #x1e5 + (vu-pair (fcor vi01 0xfff7df) (nop)) ;; #x1e6 + (vu-pair (ibne vi00 vi01 clip-near-drop) (nop)) ;; #x1e7 + (vu-pair (fcand vi01 0x20) (nop)) ;; #x1e8 + (vu-pair (ibne vi00 vi01 clip-near-exit) (nop)) ;; #x1e9 + (vu-pair (fcand vi01 0x800) (nop)) ;; #x1ea + (vu-pair (ibne vi00 vi01 clip-near-entry) (nop)) ;; #x1eb + (vu-pair (nop) (nop)) ;; #x1ec + (vu-pair (sqi.xyzw vf17 vi08) (nop)) ;; #x1ed + (vu-pair (sqi.xyzw vf20 vi08) (nop)) ;; #x1ee + (vu-pair (sqi.xyzw vf14 vi08) (nop)) ;; #x1ef + (label clip-near-next) + (vu-pair (move.xyzw vf17 vf18) (nop)) ;; #x1f0 + (vu-pair (iaddi vi09 vi09 -0x1) (nop)) ;; #x1f1 + (vu-pair (move.xyzw vf20 vf21) (nop)) ;; #x1f2 + (vu-pair (ibne vi00 vi09 clip-near-edge) (nop)) ;; #x1f3 + (vu-pair (move.xyzw vf14 vf15) (nop)) ;; #x1f4 + (vu-pair (lq.xyzw vf17 gif-ptr 0) (nop)) ;; #x1f5 + (vu-pair (lq.xyzw vf20 gif-ptr 1) (nop)) ;; #x1f6 + (vu-pair (lq.xyzw vf14 gif-ptr 2) (nop)) ;; #x1f7 + (vu-pair (ior vi07 gif-ptr vi00) (nop)) ;; #x1f8 + (vu-pair (sqi.xyzw vf17 vi08) (nop)) ;; #x1f9 + (vu-pair (sqi.xyzw vf20 vi08) (nop)) ;; #x1fa + (vu-pair (sqi.xyzw vf14 vi08) (nop)) ;; #x1fb + (vu-pair (ibeq vi00 vi10 clip-done) (nop)) ;; #x1fc + (vu-pair (ior vi09 vi10 vi00) (nop)) ;; #x1fd + (vu-pair (ior vi08 vi07 vi00) (nop)) ;; #x1fe + (vu-pair (lq.xyzw vf14 vi07 2) (nop)) ;; #x1ff + (vu-pair (ior vi10 vi09 vi00) (nop)) ;; #x200 + (vu-pair (lq.xyzw vf17 vi07 0) (nop)) ;; #x201 + (vu-pair (lq.xyzw vf20 vi07 1) (nop)) ;; #x202 + (vu-pair (iaddi vi07 vi07 0x3) (clipw.xyz vf14 vf14)) ;; #x203 + (label clip-y-min-edge) + (vu-pair (lq.xyzw vf15 vi07 2) (nop)) ;; #x204 + (vu-pair (lq.xyzw vf18 vi07 0) (nop)) ;; #x205 + (vu-pair (lq.xyzw vf21 vi07 1) (nop)) ;; #x206 + (vu-pair (iaddi vi07 vi07 0x3) (nop)) ;; #x207 + (vu-pair (nop) (clipw.xyz vf15 vf15)) ;; #x208 + (vu-pair (nop) (nop)) ;; #x209 + (vu-pair (nop) (nop)) ;; #x20a + (vu-pair (nop) (nop)) ;; #x20b + (vu-pair (fcor vi01 0xfffdf7) (nop)) ;; #x20c + (vu-pair (ibne vi00 vi01 clip-y-min-drop) (nop)) ;; #x20d + (vu-pair (fcand vi01 0x8) (nop)) ;; #x20e + (vu-pair (ibne vi00 vi01 clip-y-min-exit) (nop)) ;; #x20f + (vu-pair (fcand vi01 0x200) (nop)) ;; #x210 + (vu-pair (ibne vi00 vi01 clip-y-min-entry) (nop)) ;; #x211 + (vu-pair (nop) (nop)) ;; #x212 + (vu-pair (sqi.xyzw vf17 vi08) (nop)) ;; #x213 + (vu-pair (sqi.xyzw vf20 vi08) (nop)) ;; #x214 + (vu-pair (sqi.xyzw vf14 vi08) (nop)) ;; #x215 + (label clip-y-min-next) + (vu-pair (move.xyzw vf17 vf18) (nop)) ;; #x216 + (vu-pair (iaddi vi09 vi09 -0x1) (nop)) ;; #x217 + (vu-pair (move.xyzw vf20 vf21) (nop)) ;; #x218 + (vu-pair (ibne vi00 vi09 clip-y-min-edge) (nop)) ;; #x219 + (vu-pair (move.xyzw vf14 vf15) (nop)) ;; #x21a + (vu-pair (lq.xyzw vf17 gif-ptr 0) (nop)) ;; #x21b + (vu-pair (lq.xyzw vf20 gif-ptr 1) (nop)) ;; #x21c + (vu-pair (lq.xyzw vf14 gif-ptr 2) (nop)) ;; #x21d + (vu-pair (ior vi07 gif-ptr vi00) (nop)) ;; #x21e + (vu-pair (sqi.xyzw vf17 vi08) (nop)) ;; #x21f + (vu-pair (sqi.xyzw vf20 vi08) (nop)) ;; #x220 + (vu-pair (sqi.xyzw vf14 vi08) (nop)) ;; #x221 + (vu-pair (ibeq vi00 vi10 clip-done) (nop)) ;; #x222 + (vu-pair (ior vi09 vi10 vi00) (nop)) ;; #x223 + (vu-pair (ior vi08 vi07 vi00) (nop)) ;; #x224 + (vu-pair (lq.xyzw vf14 vi07 2) (nop)) ;; #x225 + (vu-pair (ior vi10 vi09 vi00) (nop)) ;; #x226 + (vu-pair (lq.xyzw vf17 vi07 0) (nop)) ;; #x227 + (vu-pair (lq.xyzw vf20 vi07 1) (nop)) ;; #x228 + (vu-pair (iaddi vi07 vi07 0x3) (clipw.xyz vf14 vf14)) ;; #x229 + (label clip-y-max-edge) + (vu-pair (lq.xyzw vf15 vi07 2) (nop)) ;; #x22a + (vu-pair (lq.xyzw vf18 vi07 0) (nop)) ;; #x22b + (vu-pair (lq.xyzw vf21 vi07 1) (nop)) ;; #x22c + (vu-pair (iaddi vi07 vi07 0x3) (nop)) ;; #x22d + (vu-pair (nop) (clipw.xyz vf15 vf15)) ;; #x22e + (vu-pair (nop) (nop)) ;; #x22f + (vu-pair (nop) (nop)) ;; #x230 + (vu-pair (nop) (nop)) ;; #x231 + (vu-pair (fcor vi01 0xfffefb) (nop)) ;; #x232 + (vu-pair (ibne vi00 vi01 clip-y-max-drop) (nop)) ;; #x233 + (vu-pair (fcand vi01 0x4) (nop)) ;; #x234 + (vu-pair (ibne vi00 vi01 clip-y-max-exit) (nop)) ;; #x235 + (vu-pair (fcand vi01 0x100) (nop)) ;; #x236 + (vu-pair (ibne vi00 vi01 clip-y-max-entry) (nop)) ;; #x237 + (vu-pair (nop) (nop)) ;; #x238 + (vu-pair (sqi.xyzw vf17 vi08) (nop)) ;; #x239 + (vu-pair (sqi.xyzw vf20 vi08) (nop)) ;; #x23a + (vu-pair (sqi.xyzw vf14 vi08) (nop)) ;; #x23b + (label clip-y-max-next) + (vu-pair (move.xyzw vf17 vf18) (nop)) ;; #x23c + (vu-pair (iaddi vi09 vi09 -0x1) (nop)) ;; #x23d + (vu-pair (move.xyzw vf20 vf21) (nop)) ;; #x23e + (vu-pair (ibne vi00 vi09 clip-y-max-edge) (nop)) ;; #x23f + (vu-pair (move.xyzw vf14 vf15) (nop)) ;; #x240 + (vu-pair (lq.xyzw vf17 gif-ptr 0) (nop)) ;; #x241 + (vu-pair (lq.xyzw vf20 gif-ptr 1) (nop)) ;; #x242 + (vu-pair (lq.xyzw vf14 gif-ptr 2) (nop)) ;; #x243 + (vu-pair (ior vi07 gif-ptr vi00) (nop)) ;; #x244 + (vu-pair (sqi.xyzw vf17 vi08) (nop)) ;; #x245 + (vu-pair (sqi.xyzw vf20 vi08) (nop)) ;; #x246 + (vu-pair (sqi.xyzw vf14 vi08) (nop)) ;; #x247 + (vu-pair (ibeq vi00 vi10 clip-done) (nop)) ;; #x248 + (vu-pair (ior vi09 vi10 vi00) (nop)) ;; #x249 + (vu-pair (ior vi08 vi07 vi00) (nop)) ;; #x24a + (vu-pair (lq.xyzw vf14 vi07 2) (nop)) ;; #x24b + (vu-pair (ior vi10 vi09 vi00) (nop)) ;; #x24c + (vu-pair (lq.xyzw vf17 vi07 0) (nop)) ;; #x24d + (vu-pair (lq.xyzw vf20 vi07 1) (nop)) ;; #x24e + (vu-pair (iaddi vi07 vi07 0x3) (clipw.xyz vf14 vf14)) ;; #x24f + (label clip-x-min-edge) + (vu-pair (lq.xyzw vf15 vi07 2) (nop)) ;; #x250 + (vu-pair (lq.xyzw vf18 vi07 0) (nop)) ;; #x251 + (vu-pair (lq.xyzw vf21 vi07 1) (nop)) ;; #x252 + (vu-pair (iaddi vi07 vi07 0x3) (nop)) ;; #x253 + (vu-pair (nop) (clipw.xyz vf15 vf15)) ;; #x254 + (vu-pair (nop) (nop)) ;; #x255 + (vu-pair (nop) (nop)) ;; #x256 + (vu-pair (nop) (nop)) ;; #x257 + (vu-pair (fcor vi01 0xffff7d) (nop)) ;; #x258 + (vu-pair (ibne vi00 vi01 clip-x-min-drop) (nop)) ;; #x259 + (vu-pair (fcand vi01 0x2) (nop)) ;; #x25a + (vu-pair (ibne vi00 vi01 clip-x-min-exit) (nop)) ;; #x25b + (vu-pair (fcand vi01 0x80) (nop)) ;; #x25c + (vu-pair (ibne vi00 vi01 clip-x-min-entry) (nop)) ;; #x25d + (vu-pair (nop) (nop)) ;; #x25e + (vu-pair (sqi.xyzw vf17 vi08) (nop)) ;; #x25f + (vu-pair (sqi.xyzw vf20 vi08) (nop)) ;; #x260 + (vu-pair (sqi.xyzw vf14 vi08) (nop)) ;; #x261 + (label clip-x-min-next) + (vu-pair (move.xyzw vf17 vf18) (nop)) ;; #x262 + (vu-pair (iaddi vi09 vi09 -0x1) (nop)) ;; #x263 + (vu-pair (move.xyzw vf20 vf21) (nop)) ;; #x264 + (vu-pair (ibne vi00 vi09 clip-x-min-edge) (nop)) ;; #x265 + (vu-pair (move.xyzw vf14 vf15) (nop)) ;; #x266 + (vu-pair (lq.xyzw vf17 gif-ptr 0) (nop)) ;; #x267 + (vu-pair (lq.xyzw vf20 gif-ptr 1) (nop)) ;; #x268 + (vu-pair (lq.xyzw vf14 gif-ptr 2) (nop)) ;; #x269 + (vu-pair (ior vi07 gif-ptr vi00) (nop)) ;; #x26a + (vu-pair (sqi.xyzw vf17 vi08) (nop)) ;; #x26b + (vu-pair (sqi.xyzw vf20 vi08) (nop)) ;; #x26c + (vu-pair (sqi.xyzw vf14 vi08) (nop)) ;; #x26d + (vu-pair (ibeq vi00 vi10 clip-done) (nop)) ;; #x26e + (vu-pair (ior vi09 vi10 vi00) (nop)) ;; #x26f + (vu-pair (ior vi08 vi07 vi00) (nop)) ;; #x270 + (vu-pair (lq.xyzw vf14 vi07 2) (nop)) ;; #x271 + (vu-pair (ior vi10 vi09 vi00) (nop)) ;; #x272 + (vu-pair (lq.xyzw vf17 vi07 0) (nop)) ;; #x273 + (vu-pair (lq.xyzw vf20 vi07 1) (nop)) ;; #x274 + (vu-pair (iaddi vi07 vi07 0x3) (clipw.xyz vf14 vf14)) ;; #x275 + (label clip-x-max-edge) + (vu-pair (lq.xyzw vf15 vi07 2) (nop)) ;; #x276 + (vu-pair (lq.xyzw vf18 vi07 0) (nop)) ;; #x277 + (vu-pair (lq.xyzw vf21 vi07 1) (nop)) ;; #x278 + (vu-pair (iaddi vi07 vi07 0x3) (nop)) ;; #x279 + (vu-pair (nop) (clipw.xyz vf15 vf15)) ;; #x27a + (vu-pair (nop) (nop)) ;; #x27b + (vu-pair (nop) (nop)) ;; #x27c + (vu-pair (nop) (nop)) ;; #x27d + (vu-pair (fcor vi01 0xffffbe) (nop)) ;; #x27e + (vu-pair (ibne vi00 vi01 clip-x-max-drop) (nop)) ;; #x27f + (vu-pair (fcand vi01 0x1) (nop)) ;; #x280 + (vu-pair (ibne vi00 vi01 clip-x-max-exit) (nop)) ;; #x281 + (vu-pair (fcand vi01 0x40) (nop)) ;; #x282 + (vu-pair (ibne vi00 vi01 clip-x-max-entry) (nop)) ;; #x283 + (vu-pair (nop) (nop)) ;; #x284 + (vu-pair (sqi.xyzw vf17 vi08) (nop)) ;; #x285 + (vu-pair (sqi.xyzw vf20 vi08) (nop)) ;; #x286 + (vu-pair (sqi.xyzw vf14 vi08) (nop)) ;; #x287 + (label clip-x-max-next) + (vu-pair (move.xyzw vf17 vf18) (nop)) ;; #x288 + (vu-pair (iaddi vi09 vi09 -0x1) (nop)) ;; #x289 + (vu-pair (move.xyzw vf20 vf21) (nop)) ;; #x28a + (vu-pair (ibne vi00 vi09 clip-x-max-edge) (nop)) ;; #x28b + (vu-pair (move.xyzw vf14 vf15) (nop)) ;; #x28c + (vu-pair (lq.xyzw vf17 gif-ptr 0) (nop)) ;; #x28d + (vu-pair (lq.xyzw vf20 gif-ptr 1) (nop)) ;; #x28e + (vu-pair (lq.xyzw vf14 gif-ptr 2) (nop)) ;; #x28f + (vu-pair (ior vi07 gif-ptr vi00) (nop)) ;; #x290 + (vu-pair (sqi.xyzw vf17 vi08) (nop)) ;; #x291 + (vu-pair (sqi.xyzw vf20 vi08) (nop)) ;; #x292 + (vu-pair (sqi.xyzw vf14 vi08) (nop)) ;; #x293 + (vu-pair (ibeq vi00 vi10 clip-done) (nop)) ;; #x294 + (vu-pair (ior vi09 vi10 vi00) (nop)) ;; #x295 + ;; Return after one plane has consumed the old polygon and produced the next polygon. + (label clip-done) + (vu-pair (jr vi11) (nop)) ;; #x296 + (vu-pair (nop) (nop)) ;; #x297 + (label clip-near-drop) + (vu-pair (b clip-near-next) (nop)) ;; #x298 + (vu-pair (iaddi vi10 vi10 -0x1) (nop)) ;; #x299 + (label clip-near-exit) + (vu-pair (sqi.xyzw vf17 vi08) (sub.xyzw vf16 vf15 vf14)) ;; #x29a + (vu-pair (sqi.xyzw vf20 vi08) (sub.xyzw vf19 vf18 vf17)) ;; #x29b + (vu-pair (sqi.xyzw vf14 vi08) (sub.xyzw vf22 vf21 vf20)) ;; #x29c + (vu-pair (ibeq vi07 vi08 clip-near-next) (nop)) ;; #x29d + (vu-pair (nop) (addz.w vf13 vf16 vf16)) ;; #x29e + (vu-pair (nop) (addw.z vf13 vf14 vf14)) ;; #x29f + (vu-pair (div Q vf13.z vf13.w) (nop)) ;; #x2a0 + (vu-pair (waitq) (nop)) ;; #x2a1 + (vu-pair (nop) (mul.xyzw vf19 vf19 Q)) ;; #x2a2 + (vu-pair (nop) (mul.xyzw vf22 vf22 Q)) ;; #x2a3 + (vu-pair (nop) (mul.xyzw vf16 vf16 Q)) ;; #x2a4 + (vu-pair (nop) (sub.xyzw vf19 vf17 vf19)) ;; #x2a5 + (vu-pair (nop) (sub.xyzw vf22 vf20 vf22)) ;; #x2a6 + (vu-pair (nop) (sub.xyzw vf16 vf14 vf16)) ;; #x2a7 + (vu-pair (iaddi vi10 vi10 0x1) (nop)) ;; #x2a8 + (vu-pair (sqi.xyzw vf19 vi08) (nop)) ;; #x2a9 + (vu-pair (sqi.xyzw vf22 vi08) (nop)) ;; #x2aa + (vu-pair (b clip-near-next) (nop)) ;; #x2ab + (vu-pair (sqi.xyzw vf16 vi08) (nop)) ;; #x2ac + (label clip-near-entry) + (vu-pair (nop) (sub.xyzw vf16 vf14 vf15)) ;; #x2ad + (vu-pair (nop) (sub.xyzw vf19 vf17 vf18)) ;; #x2ae + (vu-pair (nop) (sub.xyzw vf22 vf20 vf21)) ;; #x2af + (vu-pair (nop) (addz.w vf13 vf16 vf16)) ;; #x2b0 + (vu-pair (nop) (addw.z vf13 vf15 vf15)) ;; #x2b1 + (vu-pair (div Q vf13.z vf13.w) (nop)) ;; #x2b2 + (vu-pair (waitq) (nop)) ;; #x2b3 + (vu-pair (nop) (mul.xyzw vf19 vf19 Q)) ;; #x2b4 + (vu-pair (nop) (mul.xyzw vf22 vf22 Q)) ;; #x2b5 + (vu-pair (nop) (mul.xyzw vf16 vf16 Q)) ;; #x2b6 + (vu-pair (nop) (sub.xyzw vf19 vf18 vf19)) ;; #x2b7 + (vu-pair (nop) (sub.xyzw vf22 vf21 vf22)) ;; #x2b8 + (vu-pair (nop) (sub.xyzw vf16 vf15 vf16)) ;; #x2b9 + (vu-pair (sqi.xyzw vf19 vi08) (nop)) ;; #x2ba + (vu-pair (sqi.xyzw vf22 vi08) (nop)) ;; #x2bb + (vu-pair (b clip-near-next) (nop)) ;; #x2bc + (vu-pair (sqi.xyzw vf16 vi08) (nop)) ;; #x2bd + (label clip-y-min-drop) + (vu-pair (b clip-y-min-next) (nop)) ;; #x2be + (vu-pair (iaddi vi10 vi10 -0x1) (nop)) ;; #x2bf + (label clip-y-min-exit) + (vu-pair (sqi.xyzw vf17 vi08) (sub.xyzw vf16 vf15 vf14)) ;; #x2c0 + (vu-pair (sqi.xyzw vf20 vi08) (sub.xyzw vf19 vf18 vf17)) ;; #x2c1 + (vu-pair (sqi.xyzw vf14 vi08) (sub.xyzw vf22 vf21 vf20)) ;; #x2c2 + (vu-pair (ibeq vi07 vi08 clip-y-min-next) (nop)) ;; #x2c3 + (vu-pair (nop) (addy.w vf13 vf16 vf16)) ;; #x2c4 + (vu-pair (nop) (addw.y vf13 vf14 vf14)) ;; #x2c5 + (vu-pair (div Q vf13.y vf13.w) (nop)) ;; #x2c6 + (vu-pair (waitq) (nop)) ;; #x2c7 + (vu-pair (nop) (mul.xyzw vf19 vf19 Q)) ;; #x2c8 + (vu-pair (nop) (mul.xyzw vf22 vf22 Q)) ;; #x2c9 + (vu-pair (nop) (mul.xyzw vf16 vf16 Q)) ;; #x2ca + (vu-pair (nop) (sub.xyzw vf19 vf17 vf19)) ;; #x2cb + (vu-pair (nop) (sub.xyzw vf22 vf20 vf22)) ;; #x2cc + (vu-pair (nop) (sub.xyzw vf16 vf14 vf16)) ;; #x2cd + (vu-pair (iaddi vi10 vi10 0x1) (nop)) ;; #x2ce + (vu-pair (sqi.xyzw vf19 vi08) (nop)) ;; #x2cf + (vu-pair (sqi.xyzw vf22 vi08) (nop)) ;; #x2d0 + (vu-pair (b clip-y-min-next) (nop)) ;; #x2d1 + (vu-pair (sqi.xyzw vf16 vi08) (nop)) ;; #x2d2 + (label clip-y-min-entry) + (vu-pair (nop) (sub.xyzw vf16 vf14 vf15)) ;; #x2d3 + (vu-pair (nop) (sub.xyzw vf19 vf17 vf18)) ;; #x2d4 + (vu-pair (nop) (sub.xyzw vf22 vf20 vf21)) ;; #x2d5 + (vu-pair (nop) (addy.w vf13 vf16 vf16)) ;; #x2d6 + (vu-pair (nop) (addw.y vf13 vf15 vf15)) ;; #x2d7 + (vu-pair (div Q vf13.y vf13.w) (nop)) ;; #x2d8 + (vu-pair (waitq) (nop)) ;; #x2d9 + (vu-pair (nop) (mul.xyzw vf19 vf19 Q)) ;; #x2da + (vu-pair (nop) (mul.xyzw vf22 vf22 Q)) ;; #x2db + (vu-pair (nop) (mul.xyzw vf16 vf16 Q)) ;; #x2dc + (vu-pair (nop) (sub.xyzw vf19 vf18 vf19)) ;; #x2dd + (vu-pair (nop) (sub.xyzw vf22 vf21 vf22)) ;; #x2de + (vu-pair (nop) (sub.xyzw vf16 vf15 vf16)) ;; #x2df + (vu-pair (sqi.xyzw vf19 vi08) (nop)) ;; #x2e0 + (vu-pair (sqi.xyzw vf22 vi08) (nop)) ;; #x2e1 + (vu-pair (b clip-y-min-next) (nop)) ;; #x2e2 + (vu-pair (sqi.xyzw vf16 vi08) (nop)) ;; #x2e3 + (label clip-y-max-drop) + (vu-pair (b clip-y-max-next) (nop)) ;; #x2e4 + (vu-pair (iaddi vi10 vi10 -0x1) (nop)) ;; #x2e5 + (label clip-y-max-exit) + (vu-pair (sqi.xyzw vf17 vi08) (sub.xyzw vf16 vf15 vf14)) ;; #x2e6 + (vu-pair (sqi.xyzw vf20 vi08) (sub.xyzw vf19 vf18 vf17)) ;; #x2e7 + (vu-pair (sqi.xyzw vf14 vi08) (sub.xyzw vf22 vf21 vf20)) ;; #x2e8 + (vu-pair (ibeq vi07 vi08 clip-y-max-next) (nop)) ;; #x2e9 + (vu-pair (nop) (suby.w vf13 vf16 vf16)) ;; #x2ea + (vu-pair (nop) (subw.y vf13 vf14 vf14)) ;; #x2eb + (vu-pair (div Q vf13.y vf13.w) (nop)) ;; #x2ec + (vu-pair (waitq) (nop)) ;; #x2ed + (vu-pair (nop) (mul.xyzw vf19 vf19 Q)) ;; #x2ee + (vu-pair (nop) (mul.xyzw vf22 vf22 Q)) ;; #x2ef + (vu-pair (nop) (mul.xyzw vf16 vf16 Q)) ;; #x2f0 + (vu-pair (nop) (add.xyzw vf19 vf17 vf19)) ;; #x2f1 + (vu-pair (nop) (add.xyzw vf22 vf20 vf22)) ;; #x2f2 + (vu-pair (nop) (add.xyzw vf16 vf14 vf16)) ;; #x2f3 + (vu-pair (iaddi vi10 vi10 0x1) (nop)) ;; #x2f4 + (vu-pair (sqi.xyzw vf19 vi08) (nop)) ;; #x2f5 + (vu-pair (sqi.xyzw vf22 vi08) (nop)) ;; #x2f6 + (vu-pair (b clip-y-max-next) (nop)) ;; #x2f7 + (vu-pair (sqi.xyzw vf16 vi08) (nop)) ;; #x2f8 + (label clip-y-max-entry) + (vu-pair (nop) (sub.xyzw vf16 vf14 vf15)) ;; #x2f9 + (vu-pair (nop) (sub.xyzw vf19 vf17 vf18)) ;; #x2fa + (vu-pair (nop) (sub.xyzw vf22 vf20 vf21)) ;; #x2fb + (vu-pair (nop) (suby.w vf13 vf16 vf16)) ;; #x2fc + (vu-pair (nop) (subw.y vf13 vf15 vf15)) ;; #x2fd + (vu-pair (div Q vf13.y vf13.w) (nop)) ;; #x2fe + (vu-pair (waitq) (nop)) ;; #x2ff + (vu-pair (nop) (mul.xyzw vf19 vf19 Q)) ;; #x300 + (vu-pair (nop) (mul.xyzw vf22 vf22 Q)) ;; #x301 + (vu-pair (nop) (mul.xyzw vf16 vf16 Q)) ;; #x302 + (vu-pair (nop) (add.xyzw vf19 vf18 vf19)) ;; #x303 + (vu-pair (nop) (add.xyzw vf22 vf21 vf22)) ;; #x304 + (vu-pair (nop) (add.xyzw vf16 vf15 vf16)) ;; #x305 + (vu-pair (sqi.xyzw vf19 vi08) (nop)) ;; #x306 + (vu-pair (sqi.xyzw vf22 vi08) (nop)) ;; #x307 + (vu-pair (b clip-y-max-next) (nop)) ;; #x308 + (vu-pair (sqi.xyzw vf16 vi08) (nop)) ;; #x309 + (label clip-x-min-drop) + (vu-pair (b clip-x-min-next) (nop)) ;; #x30a + (vu-pair (iaddi vi10 vi10 -0x1) (nop)) ;; #x30b + (label clip-x-min-exit) + (vu-pair (sqi.xyzw vf17 vi08) (sub.xyzw vf16 vf15 vf14)) ;; #x30c + (vu-pair (sqi.xyzw vf20 vi08) (sub.xyzw vf19 vf18 vf17)) ;; #x30d + (vu-pair (sqi.xyzw vf14 vi08) (sub.xyzw vf22 vf21 vf20)) ;; #x30e + (vu-pair (ibeq vi07 vi08 clip-x-min-next) (nop)) ;; #x30f + (vu-pair (nop) (addx.w vf13 vf16 vf16)) ;; #x310 + (vu-pair (nop) (addw.x vf13 vf14 vf14)) ;; #x311 + (vu-pair (div Q vf13.x vf13.w) (nop)) ;; #x312 + (vu-pair (waitq) (nop)) ;; #x313 + (vu-pair (nop) (mul.xyzw vf19 vf19 Q)) ;; #x314 + (vu-pair (nop) (mul.xyzw vf22 vf22 Q)) ;; #x315 + (vu-pair (nop) (mul.xyzw vf16 vf16 Q)) ;; #x316 + (vu-pair (nop) (sub.xyzw vf19 vf17 vf19)) ;; #x317 + (vu-pair (nop) (sub.xyzw vf22 vf20 vf22)) ;; #x318 + (vu-pair (nop) (sub.xyzw vf16 vf14 vf16)) ;; #x319 + (vu-pair (iaddi vi10 vi10 0x1) (nop)) ;; #x31a + (vu-pair (sqi.xyzw vf19 vi08) (nop)) ;; #x31b + (vu-pair (sqi.xyzw vf22 vi08) (nop)) ;; #x31c + (vu-pair (b clip-x-min-next) (nop)) ;; #x31d + (vu-pair (sqi.xyzw vf16 vi08) (nop)) ;; #x31e + (label clip-x-min-entry) + (vu-pair (nop) (sub.xyzw vf16 vf14 vf15)) ;; #x31f + (vu-pair (nop) (sub.xyzw vf19 vf17 vf18)) ;; #x320 + (vu-pair (nop) (sub.xyzw vf22 vf20 vf21)) ;; #x321 + (vu-pair (nop) (addx.w vf13 vf16 vf16)) ;; #x322 + (vu-pair (nop) (addw.x vf13 vf15 vf15)) ;; #x323 + (vu-pair (div Q vf13.x vf13.w) (nop)) ;; #x324 + (vu-pair (waitq) (nop)) ;; #x325 + (vu-pair (nop) (mul.xyzw vf19 vf19 Q)) ;; #x326 + (vu-pair (nop) (mul.xyzw vf22 vf22 Q)) ;; #x327 + (vu-pair (nop) (mul.xyzw vf16 vf16 Q)) ;; #x328 + (vu-pair (nop) (sub.xyzw vf19 vf18 vf19)) ;; #x329 + (vu-pair (nop) (sub.xyzw vf22 vf21 vf22)) ;; #x32a + (vu-pair (nop) (sub.xyzw vf16 vf15 vf16)) ;; #x32b + (vu-pair (sqi.xyzw vf19 vi08) (nop)) ;; #x32c + (vu-pair (sqi.xyzw vf22 vi08) (nop)) ;; #x32d + (vu-pair (b clip-x-min-next) (nop)) ;; #x32e + (vu-pair (sqi.xyzw vf16 vi08) (nop)) ;; #x32f + (label clip-x-max-drop) + (vu-pair (b clip-x-max-next) (nop)) ;; #x330 + (vu-pair (iaddi vi10 vi10 -0x1) (nop)) ;; #x331 + (label clip-x-max-exit) + (vu-pair (sqi.xyzw vf17 vi08) (sub.xyzw vf16 vf15 vf14)) ;; #x332 + (vu-pair (sqi.xyzw vf20 vi08) (sub.xyzw vf19 vf18 vf17)) ;; #x333 + (vu-pair (sqi.xyzw vf14 vi08) (sub.xyzw vf22 vf21 vf20)) ;; #x334 + (vu-pair (ibeq vi07 vi08 clip-x-max-next) (nop)) ;; #x335 + (vu-pair (nop) (subx.w vf13 vf16 vf16)) ;; #x336 + (vu-pair (nop) (subw.x vf13 vf14 vf14)) ;; #x337 + (vu-pair (div Q vf13.x vf13.w) (nop)) ;; #x338 + (vu-pair (waitq) (nop)) ;; #x339 + (vu-pair (nop) (mul.xyzw vf19 vf19 Q)) ;; #x33a + (vu-pair (nop) (mul.xyzw vf22 vf22 Q)) ;; #x33b + (vu-pair (nop) (mul.xyzw vf16 vf16 Q)) ;; #x33c + (vu-pair (nop) (add.xyzw vf19 vf17 vf19)) ;; #x33d + (vu-pair (nop) (add.xyzw vf22 vf20 vf22)) ;; #x33e + (vu-pair (nop) (add.xyzw vf16 vf14 vf16)) ;; #x33f + (vu-pair (iaddi vi10 vi10 0x1) (nop)) ;; #x340 + (vu-pair (sqi.xyzw vf19 vi08) (nop)) ;; #x341 + (vu-pair (sqi.xyzw vf22 vi08) (nop)) ;; #x342 + (vu-pair (b clip-x-max-next) (nop)) ;; #x343 + (vu-pair (sqi.xyzw vf16 vi08) (nop)) ;; #x344 + (label clip-x-max-entry) + (vu-pair (nop) (sub.xyzw vf16 vf14 vf15)) ;; #x345 + (vu-pair (nop) (sub.xyzw vf19 vf17 vf18)) ;; #x346 + (vu-pair (nop) (sub.xyzw vf22 vf20 vf21)) ;; #x347 + (vu-pair (nop) (subx.w vf13 vf16 vf16)) ;; #x348 + (vu-pair (nop) (subw.x vf13 vf15 vf15)) ;; #x349 + (vu-pair (div Q vf13.x vf13.w) (nop)) ;; #x34a + (vu-pair (waitq) (nop)) ;; #x34b + (vu-pair (nop) (mul.xyzw vf19 vf19 Q)) ;; #x34c + (vu-pair (nop) (mul.xyzw vf22 vf22 Q)) ;; #x34d + (vu-pair (nop) (mul.xyzw vf16 vf16 Q)) ;; #x34e + (vu-pair (nop) (add.xyzw vf19 vf18 vf19)) ;; #x34f + (vu-pair (nop) (add.xyzw vf22 vf21 vf22)) ;; #x350 + (vu-pair (nop) (add.xyzw vf16 vf15 vf16)) ;; #x351 + (vu-pair (sqi.xyzw vf19 vi08) (nop)) ;; #x352 + (vu-pair (sqi.xyzw vf22 vi08) (nop)) ;; #x353 + (vu-pair (b clip-x-max-next) (nop)) ;; #x354 + (vu-pair (sqi.xyzw vf16 vi08) (nop)) ;; #x355 + ))) diff --git a/test/decompiler/test_FormExpressionBuild3.cpp b/test/decompiler/test_FormExpressionBuild3.cpp index a20ffebede..73ab910e3b 100644 --- a/test/decompiler/test_FormExpressionBuild3.cpp +++ b/test/decompiler/test_FormExpressionBuild3.cpp @@ -29,7 +29,7 @@ TEST_F(FormRegressionTestJak1, VectorDegToVectorRad) { std::string type = "(function vector vector none)"; std::string expected = "(defun test-function ((arg0 vector) (arg1 vector))\n" - " (local-vars (v0-0 float) (v1-1 uint128) (v1-2 uint128) (v1-3 uint128))\n" + " (local-vars (returned-lane-bits int) (v1-1 uint128) (v1-2 uint128) (v1-3 uint128))\n" " (rlet ((vf1 :class vf)\n" " (vf2 :class vf)\n" " )\n" @@ -49,11 +49,13 @@ TEST_F(FormRegressionTestJak1, VectorDegToVectorRad) { " (.itof.vf vf1 vf1)\n" " (.mul.x.vf vf1 vf1 vf2)\n" " (.svf (&-> arg0 quad) vf1)\n" - " (.mov v0-0 vf1)\n" + " (.mov returned-lane-bits vf1)\n" " (none)\n" " )\n" " )"; - test_final_function(func, type, expected); + test_final_function( + func, type, expected, false, {}, "", + R"({"vars": {"v0-0": ["returned-lane-bits", "int"]}})"); } // weird short circuit thing diff --git a/test/decompiler/test_FormExpressionBuildLong.cpp b/test/decompiler/test_FormExpressionBuildLong.cpp index 5dacfa8ad5..c1de4a7553 100644 --- a/test/decompiler/test_FormExpressionBuildLong.cpp +++ b/test/decompiler/test_FormExpressionBuildLong.cpp @@ -544,120 +544,120 @@ TEST_F(FormRegressionTestJak1, ExprArrayMethod2) { " ((type-type? (-> arg0 content-type) integer)\n" " (case (-> arg0 content-type symbol) \n" " (('int32)\n" - " (dotimes (s5-0 (-> arg0 length))\n" - " (format #t (if (zero? s5-0)\n" + " (dotimes (i (-> arg0 length))\n" + " (format #t (if (zero? i)\n" " \"~D\"\n" " \" ~D\"\n" " )\n" - " (-> (the-as (array int32) arg0) s5-0)\n" + " (-> (the-as (array int32) arg0) i)\n" " )\n" " )\n" " )\n" " (('uint32)\n" - " (dotimes (s5-1 (-> arg0 length))\n" - " (format #t (if (zero? s5-1)\n" + " (dotimes (i (-> arg0 length))\n" + " (format #t (if (zero? i)\n" " \"~D\"\n" " \" ~D\"\n" " )\n" - " (-> (the-as (array uint32) arg0) s5-1)\n" + " (-> (the-as (array uint32) arg0) i)\n" " )\n" " )\n" " )\n" " (('int64)\n" - " (dotimes (s5-2 (-> arg0 length))\n" - " (format #t (if (zero? s5-2)\n" + " (dotimes (i (-> arg0 length))\n" + " (format #t (if (zero? i)\n" " \"~D\"\n" " \" ~D\"\n" " )\n" - " (-> (the-as (array int64) arg0) s5-2)\n" + " (-> (the-as (array int64) arg0) i)\n" " )\n" " )\n" " )\n" " (('uint64)\n" - " (dotimes (s5-3 (-> arg0 length))\n" - " (format #t (if (zero? s5-3)\n" + " (dotimes (i (-> arg0 length))\n" + " (format #t (if (zero? i)\n" " \"#x~X\"\n" " \" #x~X\"\n" " )\n" - " (-> (the-as (array uint64) arg0) s5-3)\n" + " (-> (the-as (array uint64) arg0) i)\n" " )\n" " )\n" " )\n" " (('int8)\n" - " (dotimes (s5-4 (-> arg0 length))\n" - " (format #t (if (zero? s5-4)\n" + " (dotimes (i (-> arg0 length))\n" + " (format #t (if (zero? i)\n" " \"~D\"\n" " \" ~D\"\n" " )\n" - " (-> (the-as (array int8) arg0) s5-4)\n" + " (-> (the-as (array int8) arg0) i)\n" " )\n" " )\n" " )\n" " (('uint8)\n" - " (dotimes (s5-5 (-> arg0 length))\n" - " (format #t (if (zero? s5-5)\n" + " (dotimes (i (-> arg0 length))\n" + " (format #t (if (zero? i)\n" " \"~D\"\n" " \" ~D\"\n" " )\n" - " (-> (the-as (array uint8) arg0) s5-5)\n" + " (-> (the-as (array uint8) arg0) i)\n" " )\n" " )\n" " )\n" " (('int16)\n" - " (dotimes (s5-6 (-> arg0 length))\n" - " (format #t (if (zero? s5-6)\n" + " (dotimes (i (-> arg0 length))\n" + " (format #t (if (zero? i)\n" " \"~D\"\n" " \" ~D\"\n" " )\n" - " (-> (the-as (array int16) arg0) s5-6)\n" + " (-> (the-as (array int16) arg0) i)\n" " )\n" " )\n" " )\n" " (('uint16)\n" - " (dotimes (s5-7 (-> arg0 length))\n" - " (format #t (if (zero? s5-7)\n" + " (dotimes (i (-> arg0 length))\n" + " (format #t (if (zero? i)\n" " \"~D\"\n" " \" ~D\"\n" " )\n" - " (-> (the-as (array uint16) arg0) s5-7)\n" + " (-> (the-as (array uint16) arg0) i)\n" " )\n" " )\n" " )\n" " (('uint128 'int128)\n" - " (dotimes (s5-8 (-> arg0 length))\n" - " (format #t (if (zero? s5-8)\n" + " (dotimes (i (-> arg0 length))\n" + " (format #t (if (zero? i)\n" " \"#x~X\"\n" " \" #x~X\"\n" " )\n" - " (-> (the-as (array uint128) arg0) s5-8)\n" + " (-> (the-as (array uint128) arg0) i)\n" " )\n" " )\n" " )\n" " (else\n" - " (dotimes (s5-9 (-> arg0 length))\n" - " (format #t (if (zero? s5-9)\n" + " (dotimes (i (-> arg0 length))\n" + " (format #t (if (zero? i)\n" " \"~D\"\n" " \" ~D\"\n" " )\n" - " (-> (the-as (array int32) arg0) s5-9)\n" + " (-> (the-as (array int32) arg0) i)\n" " )\n" " )\n" " )\n" " )\n" " )\n" " ((= (-> arg0 content-type) float)\n" - " (dotimes (s5-10 (-> arg0 length))\n" - " (if (zero? s5-10)\n" - " (format #t \"~f\" (-> (the-as (array float) arg0) s5-10))\n" - " (format #t \" ~f\" (-> (the-as (array float) arg0) s5-10))\n" + " (dotimes (i (-> arg0 length))\n" + " (if (zero? i)\n" + " (format #t \"~f\" (-> (the-as (array float) arg0) i))\n" + " (format #t \" ~f\" (-> (the-as (array float) arg0) i))\n" " )\n" " )\n" " )\n" " (else\n" - " (dotimes (s5-11 (-> arg0 length))\n" - " (if (zero? s5-11)\n" - " (format #t \"~A\" (-> (the-as (array basic) arg0) s5-11))\n" - " (format #t \" ~A\" (-> (the-as (array basic) arg0) s5-11))\n" + " (dotimes (i (-> arg0 length))\n" + " (if (zero? i)\n" + " (format #t \"~A\" (-> (the-as (array basic) arg0) i))\n" + " (format #t \" ~A\" (-> (the-as (array basic) arg0) i))\n" " )\n" " )\n" " )\n" @@ -690,7 +690,23 @@ TEST_F(FormRegressionTestJak1, ExprArrayMethod2) { "\t\t[223, \"gp\", \"(array float)\"],\n" "\t\t[232, \"gp\", \"(array float)\"],\n" "\t\t[249, \"gp\", \"(array basic)\"],\n" - "\t\t[258, \"gp\", \"(array basic)\"]]"); + "\t\t[258, \"gp\", \"(array basic)\"]]", + R"({ + "vars": { + "s5-0": "i", + "s5-1": "i", + "s5-2": "i", + "s5-3": "i", + "s5-4": "i", + "s5-5": "i", + "s5-6": "i", + "s5-7": "i", + "s5-8": "i", + "s5-9": "i", + "s5-10": "i", + "s5-11": "i" + } + })"); } TEST_F(FormRegressionTestJak1, ExprArrayMethod3) {