From b5705bde96207e01313ec0e8994edb3f4aa44fe7 Mon Sep 17 00:00:00 2001 From: water111 <48171810+water111@users.noreply.github.com> Date: Sun, 25 Sep 2022 12:50:51 -0400 Subject: [PATCH] [decomp] Partial implementation of tie (#1916) Some stuff isn't working fully yet: - fog color - time of day - draw order for multiple passes (currently all draws in the default tie bucket) - possibly settings for transparent stuff (untested, but might work) - the "vanish" effect (we might not want this anyway?) - environment mapping/etie completely not implemented. ![image](https://user-images.githubusercontent.com/48171810/192154314-2cc8ac51-9dad-474f-a84b-3a1d98973215.png) ![image](https://user-images.githubusercontent.com/48171810/192154316-457a7ee0-b5a4-4a40-b48e-8863114da735.png) --- decompiler/config/jak2/all-types.gc | 293 +-- decompiler/config/jak2/hacks.jsonc | 3 +- decompiler/config/jak2/label_types.jsonc | 6 +- decompiler/config/jak2/type_casts.jsonc | 89 + .../graphics/opengl_renderer/BucketRenderer.h | 4 +- .../opengl_renderer/OpenGLRenderer.cpp | 6 +- .../opengl_renderer/background/Tie3.cpp | 43 +- game/graphics/opengl_renderer/buckets.h | 2 + goal_src/jak2/engine/debug/memory-usage-h.gc | 15 + goal_src/jak2/engine/draw/drawable.gc | 2 +- .../jak2/engine/gfx/background/background.gc | 76 +- goal_src/jak2/engine/gfx/hw/gs.gc | 19 +- goal_src/jak2/engine/gfx/tie/tie-h.gc | 2 + goal_src/jak2/engine/gfx/tie/tie-methods.gc | 2083 +++++++++++++++++ goal_src/jak2/engine/gfx/tie/tie-near.gc | 4 + goal_src/jak2/engine/gfx/tie/tie.gc | 652 ++++++ goal_src/jak2/engine/gfx/vu1-user-h.gc | 157 +- goal_src/jak2/engine/util/profile.gc | 109 +- .../reference/jak2/engine/gfx/hw/gs_REF.gc | 18 +- .../engine/gfx/tfrag/tfrag-methods_REF.gc | 943 ++++++++ .../reference/jak2/engine/gfx/tie/tie_REF.gc | 709 ++++++ .../reference/jak2/engine/util/profile_REF.gc | 108 +- test/decompiler/test_VuDisasm.cpp | 7 + .../vu_reference/jak2/tie-result.txt | 1043 +++++++++ test/decompiler/vu_reference/jak2/tie.txt | 2000 ++++++++++++++++ test/offline/config/jak2/config.jsonc | 2 + 26 files changed, 7998 insertions(+), 397 deletions(-) create mode 100644 test/decompiler/reference/jak2/engine/gfx/tfrag/tfrag-methods_REF.gc create mode 100644 test/decompiler/reference/jak2/engine/gfx/tie/tie_REF.gc create mode 100644 test/decompiler/vu_reference/jak2/tie-result.txt create mode 100644 test/decompiler/vu_reference/jak2/tie.txt diff --git a/decompiler/config/jak2/all-types.gc b/decompiler/config/jak2/all-types.gc index f499217aff..3ea98a1cd7 100644 --- a/decompiler/config/jak2/all-types.gc +++ b/decompiler/config/jak2/all-types.gc @@ -2725,75 +2725,75 @@ (tex-l0-tfrag 7) ;; level 0 tex (tfrag-l0-tfrag 8) ;; tfrag - (bucket-9 9) ;; tie - (bucket-10 10) ;; tie + (tie-l0-tfrag 9) ;; tie + (etie-l0-tfrag 10) ;; tie (tfrag-s-l0-tfrag 11) ;; tfrag - (bucket-12 12) ;; tie - (bucket-13 13) ;; tie + (tie-s-l0-tfrag 12) ;; tie + (etie-s-l0-tfrag 13) ;; tie (merc-l0-tfrag 14) ;; merc (emerc-l0-tfrag 15) ;; emerc (bucket-16 16) ;; mercneric - (bucket-17 17) ;; tie + (tie-v-l0-tfrag 17) ;; tie (tex-l1-tfrag 18) ;; tex (tfrag-l1-tfrag 19) ;; tfrag - (bucket-20 20) ;; tie - (bucket-21 21) ;; tie + (tie-l1-tfrag 20) ;; tie + (etie-l1-tfrag 21) ;; tie (tfrag-s-l1-tfrag 22) ;; tfrag - (bucket-23 23) ;; tie - (bucket-24 24) ;; tie + (tie-s-l1-tfrag 23) ;; tie + (etie-s-l1-tfrag 24) ;; tie (merc-l1-tfrag 25) ;; merc (emerc-l1-tfrag 26) ;; emerc (bucket-27 27) ;; mercneric - (bucket-28 28) ;; tie + (tie-v-l1-tfrag 28) ;; tie (tex-l2-tfrag 29) ;; tex (tfrag-l2-tfrag 30) ;; tfrag - (bucket-31 31) ;; tie - (bucket-32 32) ;; tie + (tie-l2-tfrag 31) ;; tie + (etie-l2-tfrag 32) ;; tie (tfrag-s-l2-tfrag 33) ;; tfrag - (bucket-34 34) ;; tie - (bucket-35 35) ;; tie + (tie-s-l2-tfrag 34) ;; tie + (etie-s-l2-tfrag 35) ;; tie (merc-l2-tfrag 36) ;; merc (emerc-l2-tfrag 37) ;; emerc (bucket-38 38) ;; mercneric - (bucket-39 39) ;; tie + (tie-v-l2-tfrag 39) ;; tie (tex-l3-tfrag 40) ;; tex (tfrag-l3-tfrag 41) ;; tfrag - (bucket-42 42) ;; tie - (bucket-43 43) ;; tie + (tie-l3-tfrag 42) ;; tie + (etie-l3-tfrag 43) ;; tie (tfrag-s-l3-tfrag 44) ;; tfrag - (bucket-45 45) ;; tie - (bucket-46 46) ;; tie + (tie-s-l3-tfrag 45) ;; tie + (etie-s-l3-tfrag 46) ;; tie (merc-l3-tfrag 47) ;; merc (emerc-l3-tfrag 48) ;; emerc (bucket-49 49) ;; mercneric - (bucket-50 50) ;; tie + (tie-v-l3-tfrag 50) ;; tie (tex-l4-tfrag 51) ;; tex (tfrag-l4-tfrag 52) ;; tfrag - (bucket-53 53) ;; tie - (bucket-54 54) ;; tie + (tie-l4-tfrag 53) ;; tie + (etie-l4-tfrag 54) ;; tie (tfrag-s-l4-tfrag 55) ;; tfrag - (bucket-56 56) ;; tie - (bucket-57 57) ;; tie + (tie-s-l4-tfrag 56) ;; tie + (etie-s-l4-tfrag 57) ;; tie (merc-l4-tfrag 58) ;; merc (emerc-l4-tfrag 59) ;; emerc (bucket-60 60) ;; mercneric - (bucket-61 61) ;; tie + (tie-v-l4-tfrag 61) ;; tie (tex-l5-tfrag 62) ;; tex (tfrag-l5-tfrag 63) ;; tfrag - (bucket-64 64) ;; tie - (bucket-65 65) ;; tie + (tie-l5-tfrag 64) ;; tie + (etie-l5-tfrag 65) ;; tie (tfrag-s-l5-tfrag 66) ;; tfrag - (bucket-67 67) ;; tie - (bucket-68 68) ;; tie + (tie-s-l5-tfrag 67) ;; tie + (etie-s-l5-tfrag 68) ;; tie (merc-l5-tfrag 69) ;; merc (emerc-l5-tfrag 70) ;; emerc (bucket-71 71) ;; mercneric - (bucket-72 72) ;; tie + (tie-v-l5-tfrag 72) ;; tie ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; All levels with shrub tpage @@ -2861,69 +2861,69 @@ (tex-l0-alpha 127) ;; tex (tfrag-t-l0-alpha 128) ;; tfrag - (bucket-129 129) ;; tie - (bucket-130 130) ;; tie + (tie-t-l0-alpha 129) ;; tie + (etie-t-l0-alpha 130) ;; tie (merc-l0-alpha 131) ;; merc (emerc-l0-alpha 132) ;; emerc (bucket-133 133) ;; mercneric (tfrag-st-l0-alpha 134) ;; tfrag - (bucket-135 135) ;; tie - (bucket-136 136) ;; tie + (tie-st-l0-alpha 135) ;; tie + (etie-st-l0-alpha 136) ;; tie (tex-l1-alpha 137) ;; tex (tfrag-t-l1-alpha 138) ;; tfrag - (bucket-139 139) ;; tie - (bucket-140 140) ;; tie + (tie-t-l1-alpha 139) ;; tie + (etie-t-l1-alpha 140) ;; tie (merc-l1-alpha 141) ;; merc (emerc-l1-alpha 142) ;; emerc (bucket-143 143) ;; mercneric (tfrag-st-l1-alpha 144) ;; tfrag - (bucket-145 145) ;; tie - (bucket-146 146) ;; tie + (tie-st-l1-alpha 145) ;; tie + (etie-st-l1-alpha 146) ;; tie (tex-l2-alpha 147) ;; tex (tfrag-t-l2-alpha 148) ;; tfrag - (bucket-149 149) ;; tie - (bucket-150 150) ;; tie + (tie-t-l2-alpha 149) ;; tie + (etie-t-l2-alpha 150) ;; tie (merc-l2-alpha 151) ;; merc (emerc-l2-alpha 152) ;; emerc (bucket-153 153) ;; mercneric (tfrag-st-l2-alpha 154) ;; tfrag - (bucket-155 155) ;; tie - (bucket-156 156) ;; tie + (tie-st-l2-alpha 155) ;; tie + (etie-st-l2-alpha 156) ;; tie (tex-l3-alpha 157) ;; tex (tfrag-t-l3-alpha 158) ;; tfrag - (bucket-159 159) ;; tie - (bucket-160 160) ;; tie + (tie-t-l3-alpha 159) ;; tie + (etie-t-l3-alpha 160) ;; tie (merc-l3-alpha 161) ;; merc (emerc-l3-alpha 162) ;; emerc (bucket-163 163) ;; mercneric (tfrag-st-l3-alpha 164) ;; tfrag - (bucket-165 165) ;; tie - (bucket-166 166) ;; tie + (tie-st-l3-alpha 165) ;; tie + (etie-st-l3-alpha 166) ;; tie (tex-l4-alpha 167) ;; tex (tfrag-t-l4-alpha 168) ;; tfrag - (bucket-169 169) ;; tie - (bucket-170 170) ;; tie + (tie-t-l4-alpha 169) ;; tie + (etie-t-l4-alpha 170) ;; tie (merc-l4-alpha 171) ;; merc (emerc-l4-alpha 172) ;; emerc (bucket-173 173) ;; mercneric (tfrag-st-l4-alpha 174) ;; tfrag - (bucket-175 175) ;; tie - (bucket-176 176) ;; tie + (tie-st-l4-alpha 175) ;; tie + (etie-st-l4-alpha 176) ;; tie (tex-l5-alpha 177) ;; tex (tfrag-t-l5-alpha 178) ;; tfrag - (bucket-179 179) ;; tie - (bucket-180 180) ;; tie + (tie-t-l5-alpha 179) ;; tie + (etie-t-l5-alpha 180) ;; tie (merc-l5-alpha 181) ;; merc (emerc-l5-alpha 182) ;; emerc (bucket-183 183) ;; mercneric (tfrag-st-l5-alpha 184) ;; tfrag - (bucket-185 185) ;; tie - (bucket-186 186) ;; tie + (tie-st-l5-alpha 185) ;; tie + (etie-st-l5-alpha 186) ;; tie (tex-lcom-tfrag 187) ;; tex (merc-lcom-tfrag 188) ;; merc @@ -3011,61 +3011,61 @@ (merc-l0-water 253) ;; merc (bucket-254 254) ;; mercneric (tfrag-w-l0-water 255) ;; tfrag - (bucket-256 256) - (bucket-257 257) - (bucket-258 258) + (tie-w-l0-water 256) + (etie-w-l0-water 257) + (tie-sw-l0-water 258) (tfrag-ws-l0-water 259) ;; tfrag - (bucket-260 260) + (etie-sw-l0-water 260) (tex-l1-water 261) ;; tex (merc-l1-water 262) ;; merc (bucket-263 263) ;; mercneric (tfrag-w-l1-water 264) ;; tfrag - (bucket-265 265) - (bucket-266 266) - (bucket-267 267) + (tie-w-l1-water 265) + (etie-w-l1-water 266) + (tie-sw-l1-water 267) (tfrag-ws-l1-water 268) ;; tfrag - (bucket-269 269) + (etie-sw-l1-water 269) (tex-l2-water 270) ;; tex (merc-l2-water 271) ;; merc (bucket-272 272) ;; mercneric (tfrag-w-l2-water 273) ;; tfrag - (bucket-274 274) - (bucket-275 275) - (bucket-276 276) + (tie-w-l2-water 274) + (etie-w-l2-water 275) + (tie-sw-l2-water 276) (tfrag-ws-l2-water 277) ;; tfrag - (bucket-278 278) + (tie-esw-l2-water 278) (tex-l3-water 279) ;; tex (merc-l3-water 280) ;; merc (bucket-281 281) ;; mercneric (tfrag-w-l3-water 282) ;; tfrag - (bucket-283 283) - (bucket-284 284) - (bucket-285 285) + (tie-w-l3-water 283) + (etie-w-l3-water 284) + (tie-sw-l3-water 285) (tfrag-ws-l3-water 286) ;; tfrag - (bucket-287 287) + (etie-sw-l3-water 287) (tex-l4-water 288) ;; tex (merc-l4-water 289) ;; merc (bucket-290 290) ;; mercneric (tfrag-w-l4-water 291) ;; tfrag - (bucket-292 292) - (bucket-293 293) - (bucket-294 294) + (tie-w-l4-water 292) + (etie-w-l4-water 293) + (tie-sw-l4-water 294) (tfrag-ws-l4-water 295) ;; tfrag - (bucket-296 296) + (etie-sw-l4-water 296) (tex-l5-water 297) ;; tex (merc-l5-water 298) ;; merc (bucket-299 299) ;; mercneric (tfrag-w-l5-water 300) ;; tfrag - (bucket-301 301) - (bucket-302 302) - (bucket-303 303) + (tie-w-l5-water 301) + (etie-w-l5-water 302) + (tie-sw-l5-water 303) (tfrag-ws-l5-water 304) ;; tfrag - (bucket-305 305) + (etie-sw-l5-water 305) (tex-lcom-water 306) ;; tex (merc-lcom-water 307) ;; merc @@ -4032,7 +4032,7 @@ ((word uint32 4 :offset-assert 0) (quad uint128 :offset 0) (data uint64 :offset 0) - (cmds uint64 :offset 8) + (cmds gs-reg64 :offset 8) (cmd uint8 :offset 8) (x uint32 :offset 0) (y uint32 :offset 4) @@ -7510,6 +7510,21 @@ (tfragment-color 6) (tfragment-debug 7) + (tie-fragment 9) + (tie-gif 10) + (tie-points 11) + (tie-colors 12) + (tie-draw-points 13) + (tie-debug 14) + + (tie-generic 17) + (instance-tie 18) + (instance-tie-colors0 19) + (instance-tie-colors1 20) + (instance-tie-colors2 21) + (instance-tie-colors3 22) + (inst-tie-colors* 23) + (entity 43) (camera 44) @@ -23202,37 +23217,35 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype tie-consts (structure) - ((data uint32 40 :offset-assert 0) ;; guessed by decompiler - (vector vector 10 :offset-assert 0) ;; guessed by decompiler - (quads uint128 10 :offset-assert 0) ;; guessed by decompiler - (adgif qword :inline :offset-assert 0) ;; gs-gif-tag :inline - (strgif qword :inline :offset-assert 16) ;; gs-gif-tag :inline - (extra qword :inline :offset-assert 32) ;; vector :inline - (gifbufs qword :inline :offset-assert 48) ;; vector :inline - (clrbufs qword :inline :offset-assert 64) - (misc qword :inline :offset-assert 80) - (atestgif qword :inline :offset-assert 96) ;; gs-gif-tag :inline - (alpha qword :inline :offset-assert 112) - (atest ad-cmd 2 :offset-assert 128) ;; guessed by decompiler - (atest-tra gs-adcmd :inline :offset-assert 128) ;; ad-cmd :inline - (atest-def gs-adcmd :inline :offset-assert 144) ;; ad-cmd :inline + ((data uint32 40 :offset 0 :score -2) ;; guessed by decompiler + (vector vector 10 :offset 0 :score -2) ;; guessed by decompiler + (quads uint128 10 :offset 0 :score -2) ;; guessed by decompiler + (adgif gs-gif-tag :inline :offset 0) ;; gs-gif-tag :inline + (strgif gs-gif-tag :inline :offset 16) ;; gs-gif-tag :inline + (extra vector :inline :offset 32) ;; vector :inline + (gifbufs vector :inline :offset 48) ;; vector :inline + (clrbufs qword :inline :offset 64) + (misc qword :inline :offset 80) + (atestgif gs-gif-tag :inline :offset 96) ;; gs-gif-tag :inline + (alpha gs-adcmd :inline :offset 112) + (atest gs-adcmd 2 :inline :offset 128 :score -1) ;; guessed by decompiler + (atest-tra gs-adcmd :inline :offset 128) ;; ad-cmd :inline + (atest-def gs-adcmd :inline :offset 144) ;; ad-cmd :inline ) :method-count-assert 9 :size-assert #xa0 :flag-assert #x9000000a0 ) -|# -;; (define-extern tie-vu1-block object) ;; vu-function -;; (define-extern tie-init-consts function) ;; (function tie-consts int none) -;; (define-extern tie-init-engine function) ;; (function dma-buffer gs-test int none) -;; (define-extern tie-end-buffer function) ;; (function dma-buffer none) -;; (define-extern tie-int-reg function) ;; (function int string) -;; (define-extern tie-float-reg function) ;; (function int string) -;; (define-extern tie-ints function) ;; (function none) -;; (define-extern tie-floats function) ;; (function none) +(define-extern tie-vu1-block vu-function) +(define-extern tie-init-consts (function tie-consts gs-alpha gs-test gs-test none)) +(define-extern tie-init-engine (function dma-buffer gs-alpha gs-test gs-test none)) +(define-extern tie-end-buffer (function dma-buffer none)) +(define-extern tie-int-reg (function int string)) +(define-extern tie-float-reg (function int string)) +(define-extern tie-ints (function none)) +(define-extern tie-floats (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; etie-vu1 ;; @@ -23273,8 +23286,8 @@ ;; (define-extern etie-vu1-block object) ;; (define-extern etie-magic function) ;; (define-extern etie-init-consts function) -;; (define-extern etie-init-engine function) -;; (define-extern etie-end-buffer function) +(define-extern etie-init-engine (function dma-buffer none)) +(define-extern etie-end-buffer (function dma-buffer none)) ;; (define-extern etie-float-reg-bp function) ;; (define-extern etie-float-reg function) ;; (define-extern etie-floats function) @@ -23351,8 +23364,8 @@ ;; (define-extern etn-vu1-block object) ;; (define-extern etn-magic function) ;; (define-extern etn-init-consts function) -;; (define-extern etn-init-engine function) -;; (define-extern etn-end-buffer function) +(define-extern etn-init-engine (function dma-buffer none)) +(define-extern etn-end-buffer (function dma-buffer none)) ;; (define-extern etn-float-reg-calc function) ;; (define-extern etn-float-reg function) ;; (define-extern etn-floats function) @@ -23387,9 +23400,9 @@ ;; (define-extern tie-near-vu1-block object) ;; vu-function ;; (define-extern tie-near-init-consts function) ;; (function tie-near-consts int none) -;; (define-extern tie-near-init-engine function) ;; (function dma-buffer gs-test int none) -;; (define-extern tie-near-end-buffer function) ;; (function dma-buffer none) -(define-extern tie-scissor-make-perspective-matrix (function object object none)) +(define-extern tie-near-init-engine (function dma-buffer gs-test int none)) +(define-extern tie-near-end-buffer (function dma-buffer none)) +(define-extern tie-scissor-make-perspective-matrix (function matrix matrix none)) ;; (define-extern tie-near-int-reg function) ;; (function int string) ;; (define-extern tie-near-float-reg function) ;; (function int string) @@ -23404,7 +23417,6 @@ ;; tie-methods ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -#| (deftype tie-debug (structure) ((max-instance uint32 :offset-assert 0) (min-instance uint32 :offset-assert 4) @@ -23415,46 +23427,43 @@ :size-assert #x10 :flag-assert #x900000010 ) -|# -#| (deftype tie-init-data (structure) - ((tie-bucket int32 :offset-assert 0) - (tie-scissor-bucket int32 :offset-assert 4) - (tie-envmap-bucket int32 :offset-assert 8) - (tie-envmap-scissor-bucket int32 :offset-assert 12) - (tie-vanish-bucket int32 :offset-assert 16) - (tie-trans-bucket int32 :offset-assert 20) - (tie-scissor-trans-bucket int32 :offset-assert 24) - (tie-envmap-trans-bucket int32 :offset-assert 28) - (tie-envmap-scissor-trans-bucket int32 :offset-assert 32) - (tie-water-bucket int32 :offset-assert 36) - (tie-scissor-water-bucket int32 :offset-assert 40) - (tie-envmap-water-bucket int32 :offset-assert 44) - (tie-envmap-scissor-water-bucket int32 :offset-assert 48) + ((tie-bucket bucket-id :offset-assert 0) + (tie-scissor-bucket bucket-id :offset-assert 4) + (tie-envmap-bucket bucket-id :offset-assert 8) + (tie-envmap-scissor-bucket bucket-id :offset-assert 12) + (tie-vanish-bucket bucket-id :offset-assert 16) + (tie-trans-bucket bucket-id :offset-assert 20) + (tie-scissor-trans-bucket bucket-id :offset-assert 24) + (tie-envmap-trans-bucket bucket-id :offset-assert 28) + (tie-envmap-scissor-trans-bucket bucket-id :offset-assert 32) + (tie-water-bucket bucket-id :offset-assert 36) + (tie-scissor-water-bucket bucket-id :offset-assert 40) + (tie-envmap-water-bucket bucket-id :offset-assert 44) + (tie-envmap-scissor-water-bucket bucket-id :offset-assert 48) ) :method-count-assert 9 :size-assert #x34 :flag-assert #x900000034 ) -|# -;; (define-extern *tie* object) ;; tie-instance-debug -;; (define-extern tie-debug-between function) ;; (function uint uint uint) -;; (define-extern tie-debug-one function) ;; (function uint uint uint) -;; (define-extern tie-debug-frag-between function) -;; (define-extern tie-debug-frag-one function) -;; (define-extern walk-tie-generic-prototypes function) ;; (function none) -;; (define-extern *pke-hack* object) ;; vector -;; (define-extern draw-inline-array-instance-tie function) ;; (function pointer (inline-array instance-tie) int dma-buffer none) -;; (define-extern draw-inline-array-prototype-tie-asm function) ;; (function dma-buffer int prototype-array-tie none) -;; (define-extern instance-tie-patch-buckets function) +(define-extern *tie* tie-debug) +(define-extern tie-debug-between (function uint uint uint)) +(define-extern tie-debug-one (function uint uint uint)) +(define-extern tie-debug-frag-between (function uint uint uint)) +(define-extern tie-debug-frag-one (function uint uint uint)) +(define-extern walk-tie-generic-prototypes (function none)) +(define-extern *pke-hack* vector) +(define-extern draw-inline-array-instance-tie (function pointer (inline-array instance-tie) int dma-buffer none)) +(define-extern draw-inline-array-prototype-tie-asm (function dma-buffer int prototype-array-tie none)) +(define-extern instance-tie-patch-buckets (function dma-buffer level object)) (define-extern draw-drawable-tree-instance-tie (function drawable-tree-instance-tie level none)) -;; (define-extern tie-init-scissor-buf function) -;; (define-extern tie-init-buf function) -;; (define-extern tie-init-envmap-buf function) -;; (define-extern tie-init-envmap-scissor-buf function) -;; (define-extern *tie-init-table* object) +(define-extern tie-init-scissor-buf (function bucket-id gs-alpha gs-test gs-test none)) +(define-extern tie-init-buf (function bucket-id gs-alpha gs-test gs-test none)) +(define-extern tie-init-envmap-buf (function bucket-id gs-alpha int int none)) +(define-extern tie-init-envmap-scissor-buf (function bucket-id gs-alpha int int none)) +(define-extern *tie-init-table* (inline-array tie-init-data)) (define-extern tie-vu1-init-buffers (function none)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/decompiler/config/jak2/hacks.jsonc b/decompiler/config/jak2/hacks.jsonc index 696f4a306d..6b8f4948ef 100644 --- a/decompiler/config/jak2/hacks.jsonc +++ b/decompiler/config/jak2/hacks.jsonc @@ -290,7 +290,8 @@ "start-perf-stat-collection": [26], "end-perf-stat-collection": [0], "upload-vis-bits": [2, 6, 3, 0], - "set-background-regs!":[4, 3] + "set-background-regs!":[4, 3], + "draw-drawable-tree-instance-tie": [21, 23, 31, 33] }, // Sometimes the game might use format strings that are fetched dynamically, diff --git a/decompiler/config/jak2/label_types.jsonc b/decompiler/config/jak2/label_types.jsonc index 896185eaa8..86d2bede55 100644 --- a/decompiler/config/jak2/label_types.jsonc +++ b/decompiler/config/jak2/label_types.jsonc @@ -189,8 +189,8 @@ ["L896", "(pointer uint64)", 1], ["L897", "(pointer uint64)", 1] ], - "nav-mesh": [["L347", "(inline-array vector)", 2]], "tfrag-methods": [["L119", "(inline-array tfrag-init-data)", 6]], + "nav-mesh": [["L347", "(inline-array vector)", 2]], "progress": [ ["L879", "uint64", true], ["L880", "uint64", true], @@ -250,5 +250,7 @@ ["L790", "uint64", true], ["L791", "uint64", true] ], - "target-gun": [["L595", "uint64", true]] + "target-gun": [["L595", "uint64", true]], + "tie-methods": [["L328", "(inline-array tie-init-data)", 6]], + "nav-mesh": [["L347", "(inline-array vector)", 2]] } diff --git a/decompiler/config/jak2/type_casts.jsonc b/decompiler/config/jak2/type_casts.jsonc index 55c991e2b4..b5e5ecbda1 100644 --- a/decompiler/config/jak2/type_casts.jsonc +++ b/decompiler/config/jak2/type_casts.jsonc @@ -2409,6 +2409,95 @@ [[128, 152], "a2", "dma-packet"], [[157, 162], "a1", "dma-packet"] ], + "tfrag-scissor-vu1-init-buf": [ + [[25, 34], "v1", "dma-packet"], + [[61, 66], "v1", "dma-packet"], + [69, "v1", "(pointer uint32)"] + ], + "(method 9 tie-fragment)": [ + [21, "a2", "(pointer int32)"], + [26, "a3", "(pointer int32)"], + [[1, 70], "s5", "adgif-shader"] + ], + "tie-init-engine": [ + [[11, 25], "a0", "dma-packet"], + [[37, 45], "a0", "dma-packet"], + [[47, 54], "a0", "dma-packet"], + [[57, 64], "v1", "vector"], + [[65,72], "v1", "(pointer vif-tag)"] + ], + "tie-end-buffer": [ + [[1, 8], "a1", "dma-packet"], + [[10, 17], "a1", "gs-gif-tag"], + [21, "a1", "(pointer gs-test)"], + [23, "a1", "(pointer gs-reg64)"], + [[27, 34], "a1", "dma-packet"], + [38, "a0", "(pointer vif-tag)"], + [40, "a0", "(pointer vif-tag)"], + [42, "a0", "(pointer vif-tag)"], + [44, "a0", "(pointer vif-tag)"], + [[45, 49], "a0", "(pointer int32)"] + ], + "tie-ints": [ + [17, "v1", "(pointer uint32)"], + [21, "v1", "(pointer uint32)"] + ], + "(method 13 drawable-tree-instance-tie)": [ + [[51, 70], "t1", "tie-fragment"], + [[102, 120], "a3", "tie-fragment"], + [[160, 178], "t1", "tie-fragment"], + [[211, 229], "a3", "tie-fragment"], + [[266, 286], "t1", "tie-fragment"], + [[320, 340], "a1", "tie-fragment"], + [[381, 400], "t1", "tie-fragment"], + [[432, 450], "a3", "tie-fragment"], + [[487, 507], "t1", "tie-fragment"], + [[541, 561], "a1", "tie-fragment"], + [[598, 616], "t1", "tie-fragment"], + [[649, 667], "a3", "tie-fragment"], + [[703, 723], "t1", "tie-fragment"], + [[756, 776], "a1", "tie-fragment"] + ], + "draw-drawable-tree-instance-tie": [ + [[23, 37], "v1", "drawable-inline-array-node"], + [25, "a0", "drawable-inline-array-node"], + [120, "s2", "drawable-inline-array-instance-tie"], + [132, "v1", "int"], + [132, "a0", "int"] + ], + "instance-tie-patch-buckets": [ + [39, "a0", "(pointer uint64)"], + [152, "a0", "(pointer uint64)"], + [265, "a0", "(pointer uint64)"], + [378, "a0", "(pointer uint64)"], + [491, "a0", "(pointer uint64)"], + [605, "a0", "(pointer uint64)"], + [719, "a0", "(pointer uint64)"], + [833, "a0", "(pointer uint64)"], + [947, "a0", "(pointer uint64)"], + [1061, "a0", "(pointer uint64)"], + [1175, "a0", "(pointer uint64)"], + [1289, "a0", "(pointer uint64)"], + [1403, "a0", "(pointer uint64)"], + [[51, 57], "a0", "dma-packet"], + [[164, 170], "a0", "dma-packet"] + + ], + "tie-floats": [[[3, 73], "gp", "(pointer uint32)"]], + "tie-init-buf": [ + [[24, 31], "a0", "dma-packet"], + [[33, 40], "a0", "gs-gif-tag"], + [44, "a0", "(pointer gs-zbuf)"], + [46, "a0", "(pointer gs-reg64)"], + [[49, 59], "v1", "dma-packet"], + [[84, 90], "v1", "dma-packet"], + [92, "v1", "(pointer int32)"] + ], + "tie-init-envmap-buf": [ + [[23, 33], "v1", "dma-packet"], + [[58, 64], "v1", "dma-packet"], + [66, "v1", "(pointer int32)"] + ], "(enter othercam-running)": [[[50, 60], "gp", "process-drawable"]], "(code othercam-running)": [[[2, 65], "s2", "process-drawable"]], "(method 10 progress)": [[45, "t9", "(function progress none)"]], diff --git a/game/graphics/opengl_renderer/BucketRenderer.h b/game/graphics/opengl_renderer/BucketRenderer.h index b2665e4264..4a0def8def 100644 --- a/game/graphics/opengl_renderer/BucketRenderer.h +++ b/game/graphics/opengl_renderer/BucketRenderer.h @@ -40,13 +40,13 @@ struct SharedRenderState { bool use_sky_cpu = true; bool use_occlusion_culling = true; bool enable_merc_xgkick = true; - math::Vector fog_color; + math::Vector fog_color = math::Vector{0, 0, 0, 0}; float fog_intensity = 1.f; bool no_multidraw = false; void reset(); bool has_pc_data = false; - LevelVis occlusion_vis[2]; + LevelVis occlusion_vis[6]; math::Vector4f camera_planes[4]; math::Vector4f camera_matrix[4]; diff --git a/game/graphics/opengl_renderer/OpenGLRenderer.cpp b/game/graphics/opengl_renderer/OpenGLRenderer.cpp index 0eff1e9a08..cd8849e3fe 100644 --- a/game/graphics/opengl_renderer/OpenGLRenderer.cpp +++ b/game/graphics/opengl_renderer/OpenGLRenderer.cpp @@ -90,8 +90,10 @@ void OpenGLRenderer::init_bucket_renderers_jak2() { init_bucket_renderer("tfrag-l0-tfrag", BucketCategory::TFRAG, BucketId::TFRAG_L0_TFRAG, std::vector{tfrag3::TFragmentTreeKind::NORMAL}, false, 0); + init_bucket_renderer("tie-l0-tfrag", BucketCategory::TIE, BucketId::TIE_L0_TFRAG, 0); init_bucket_renderer("tfrag-l1-tfrag", BucketCategory::TFRAG, BucketId::TFRAG_L1_TFRAG, - std::vector{tfrag3::TFragmentTreeKind::NORMAL}, false, 0); + std::vector{tfrag3::TFragmentTreeKind::NORMAL}, false, 1); + init_bucket_renderer("tie-l1-tfrag", BucketCategory::TIE, BucketId::TIE_L1_TFRAG, 1); init_bucket_renderer("shrub-l0-shrub", BucketCategory::SHRUB, BucketId::SHRUB_L0_SHRUB); init_bucket_renderer("shrub-l1-shrub", BucketCategory::SHRUB, BucketId::SHRUB_L1_SHRUB); init_bucket_renderer("tfrag-t-l0-alpha", BucketCategory::TFRAG, @@ -773,7 +775,7 @@ void OpenGLRenderer::dispatch_buckets_jak2(DmaFollower dma, // should have ended at the start of the next chain ASSERT(dma.current_tag_offset() == m_render_state.next_bucket); m_render_state.next_bucket += 16; - vif_interrupt_callback(bucket_id); + vif_interrupt_callback(bucket_id + 1); m_category_times[(int)m_bucket_categories[bucket_id]] += bucket_prof.get_elapsed_time(); } vif_interrupt_callback(m_bucket_renderers.size()); diff --git a/game/graphics/opengl_renderer/background/Tie3.cpp b/game/graphics/opengl_renderer/background/Tie3.cpp index 7392e9e43b..d077e756dd 100644 --- a/game/graphics/opengl_renderer/background/Tie3.cpp +++ b/game/graphics/opengl_renderer/background/Tie3.cpp @@ -10,6 +10,17 @@ Tie3::Tie3(const std::string& name, int my_id, int level_id) // we won't actually interp or upload to gpu the unused ones, but we need a fixed maximum so // indexing works properly. m_color_result.resize(TIME_OF_DAY_COLOR_COUNT); + + m_wind_data.paused = 0; + math::Vector4f ones(1, 1, 1, 1); + m_wind_data.wind_normal = ones; + m_wind_data.wind_temp = ones; + for (auto& wv : m_wind_data.wind_array) { + wv = ones; + } + for (auto& wf : m_wind_data.wind_force) { + wf = 1.f; + } } Tie3::~Tie3() { @@ -301,8 +312,9 @@ void Tie3::render(DmaFollower& dma, SharedRenderState* render_state, ScopedProfi } auto data0 = dma.read_and_advance(); - ASSERT(data0.vif1() == 0); - ASSERT(data0.vif0() == 0); + ASSERT(data0.vif1() == 0 || data0.vifcode1().kind == VifCode::Kind::NOP); + ASSERT(data0.vif0() == 0 || data0.vifcode0().kind == VifCode::Kind::NOP || + data0.vifcode0().kind == VifCode::Kind::MARK); ASSERT(data0.size_bytes == 0); if (dma.current_tag().kind == DmaTag::Kind::CALL) { @@ -314,11 +326,18 @@ void Tie3::render(DmaFollower& dma, SharedRenderState* render_state, ScopedProfi return; } - auto gs_test = dma.read_and_advance(); - ASSERT(gs_test.size_bytes == 32); + if (dma.current_tag_offset() == render_state->next_bucket) { + return; + } - auto tie_consts = dma.read_and_advance(); - ASSERT(tie_consts.size_bytes == 9 * 16); + auto gs_test = dma.read_and_advance(); + if (gs_test.size_bytes == 160) { + } else { + ASSERT(gs_test.size_bytes == 32); + + auto tie_consts = dma.read_and_advance(); + ASSERT(tie_consts.size_bytes == 9 * 16); + } auto mscalf = dma.read_and_advance(); ASSERT(mscalf.size_bytes == 0); @@ -327,6 +346,9 @@ void Tie3::render(DmaFollower& dma, SharedRenderState* render_state, ScopedProfi ASSERT(row.size_bytes == 32); auto next = dma.read_and_advance(); + if (next.size_bytes == 32) { + next = dma.read_and_advance(); + } ASSERT(next.size_bytes == 0); auto pc_port_data = dma.read_and_advance(); @@ -334,9 +356,12 @@ void Tie3::render(DmaFollower& dma, SharedRenderState* render_state, ScopedProfi memcpy(&m_pc_port_data, pc_port_data.data, sizeof(TfragPcPortData)); m_pc_port_data.level_name[11] = '\0'; - auto wind_data = dma.read_and_advance(); - ASSERT(wind_data.size_bytes == sizeof(WindWork)); - memcpy(&m_wind_data, wind_data.data, sizeof(WindWork)); + if (render_state->version == GameVersion::Jak1) { + auto wind_data = dma.read_and_advance(); + ASSERT(wind_data.size_bytes == sizeof(WindWork)); + memcpy(&m_wind_data, wind_data.data, sizeof(WindWork)); + } else { + } while (dma.current_tag_offset() != render_state->next_bucket) { dma.read_and_advance(); diff --git a/game/graphics/opengl_renderer/buckets.h b/game/graphics/opengl_renderer/buckets.h index 789ad3776f..eabfbe5bff 100644 --- a/game/graphics/opengl_renderer/buckets.h +++ b/game/graphics/opengl_renderer/buckets.h @@ -82,7 +82,9 @@ namespace jak2 { enum class BucketId { TFRAG_L0_TFRAG = 8, + TIE_L0_TFRAG = 9, TFRAG_L1_TFRAG = 19, + TIE_L1_TFRAG = 20, SHRUB_L0_SHRUB = 74, SHRUB_L1_SHRUB = 83, TFRAG_T_L0_ALPHA = 128, diff --git a/goal_src/jak2/engine/debug/memory-usage-h.gc b/goal_src/jak2/engine/debug/memory-usage-h.gc index c062e940e1..d3414d70da 100644 --- a/goal_src/jak2/engine/debug/memory-usage-h.gc +++ b/goal_src/jak2/engine/debug/memory-usage-h.gc @@ -16,6 +16,21 @@ (tfragment-color 6) (tfragment-debug 7) + (tie-fragment 9) + (tie-gif 10) + (tie-points 11) + (tie-colors 12) + (tie-draw-points 13) + (tie-debug 14) + + (tie-generic 17) + (instance-tie 18) + (instance-tie-colors0 19) + (instance-tie-colors1 20) + (instance-tie-colors2 21) + (instance-tie-colors3 22) + (inst-tie-colors* 23) + (entity 43) (camera 44) diff --git a/goal_src/jak2/engine/draw/drawable.gc b/goal_src/jak2/engine/draw/drawable.gc index e3b3aa0a1e..a6f56b0dd9 100644 --- a/goal_src/jak2/engine/draw/drawable.gc +++ b/goal_src/jak2/engine/draw/drawable.gc @@ -934,7 +934,7 @@ ;; post-draw buffer setup (tfrag-vu1-init-buffers) - ; (tie-vu1-init-buffers) + (tie-vu1-init-buffers) ; (merc-vu1-init-buffers) ; (emerc-vu1-init-buffers) ; (generic-vu1-init-buffers) diff --git a/goal_src/jak2/engine/gfx/background/background.gc b/goal_src/jak2/engine/gfx/background/background.gc index 45e5dfe5f8..40a7fbb150 100644 --- a/goal_src/jak2/engine/gfx/background/background.gc +++ b/goal_src/jak2/engine/gfx/background/background.gc @@ -390,38 +390,38 @@ ) ) - ; (when (nonzero? (-> *background-work* tie-tree-count)) - ; (set! (-> *instance-tie-work* tod-env-color quad) (-> *time-of-day-context* current-env-color quad)) - ; (with-profiler 'instance-tie *profile-instance-tie-color* - ; (dotimes (s5-10 (-> *background-work* tie-tree-count)) - ; (let ((s4-8 (-> *background-work* tie-levels s5-10))) - ; (let ((a2-29 (-> s4-8 bsp))) - ; (when (!= s4-8 gp-6) - ; (set! (-> *instance-tie-work* min-dist x) 4095996000.0) - ; (upload-vis-bits s4-8 gp-6 a2-29) - ; (set! gp-6 s4-8) - ; ) - ; ) - ; (set! *draw-index* (-> s4-8 draw-index)) - ; (set! (-> *prototype-tie-work* mood) (-> s4-8 mood-context)) - ; (set-background-regs! s4-8) - ; (set-tie-quard-planes! s4-8) - ; (tie-scissor-make-perspective-matrix - ; (-> *instance-tie-work* tie-scissor-perspective-matrix) - ; (if (-> s4-8 info use-camera-other) - ; (-> *math-camera* camera-temp-other) - ; (-> *math-camera* camera-temp) - ; ) - ; ) - ; (draw-drawable-tree-instance-tie (-> *background-work* tie-trees s5-10) s4-8) - ; ) - ; (set! (-> *background-work* tie-generic s5-10) (the-as basic (-> *prototype-tie-work* generic-next))) - ; (set! (-> *background-work* tie-generic-trans s5-10) - ; (the-as basic (-> *prototype-tie-work* generic-trans-next)) - ; ) - ; ) - ; ) - ; ) + (when (nonzero? (-> *background-work* tie-tree-count)) + (set! (-> *instance-tie-work* tod-env-color quad) (-> *time-of-day-context* current-env-color quad)) + (with-profiler 'instance-tie *profile-instance-tie-color* + (dotimes (s5-10 (-> *background-work* tie-tree-count)) + (let ((s4-8 (-> *background-work* tie-levels s5-10))) + (let ((a2-29 (-> s4-8 bsp))) + (when (!= s4-8 gp-6) + (set! (-> *instance-tie-work* min-dist x) 4095996000.0) + (upload-vis-bits s4-8 gp-6 a2-29) + (set! gp-6 s4-8) + ) + ) + (set! *draw-index* (-> s4-8 draw-index)) + (set! (-> *prototype-tie-work* mood) (-> s4-8 mood-context)) + (set-background-regs! s4-8) + (set-tie-quard-planes! s4-8) + (tie-scissor-make-perspective-matrix + (-> *instance-tie-work* tie-scissor-perspective-matrix) + (if (-> s4-8 info use-camera-other) + (-> *math-camera* camera-temp-other) + (-> *math-camera* camera-temp) + ) + ) + (draw-drawable-tree-instance-tie (-> *background-work* tie-trees s5-10) s4-8) + ) + (set! (-> *background-work* tie-generic s5-10) (the-as basic (-> *prototype-tie-work* generic-next))) + (set! (-> *background-work* tie-generic-trans s5-10) + (the-as basic (-> *prototype-tie-work* generic-trans-next)) + ) + ) + ) + ) ) (dotimes (v1-282 (-> *level* length)) @@ -564,7 +564,17 @@ (set! (-> data-ptr 1) (-> *math-camera* plane 1 quad)) (set! (-> data-ptr 2) (-> *math-camera* plane 2 quad)) (set! (-> data-ptr 3) (-> *math-camera* plane 3 quad)) - ; (set! (-> data-ptr 4) (-> lev mood itimes 0 quad)) todo, time of dayl + + ;; hack to set time of day to something. + (let ((hack-itimes (new 'stack 'vector4w))) + (dotimes (i 4) + (set! (-> hack-itimes data i) #x60) + ) + (dotimes (i 4) + (set! (-> data-ptr (+ 4 i)) (-> hack-itimes quad)) + ) + ) + ; (set! (-> data-ptr 4) (-> lev mood itimes 0 quad)) todo, time of day ; (set! (-> data-ptr 5) (-> lev mood itimes 1 quad)) ; (set! (-> data-ptr 6) (-> lev mood itimes 2 quad)) ; (set! (-> data-ptr 7) (-> lev mood itimes 3 quad)) diff --git a/goal_src/jak2/engine/gfx/hw/gs.gc b/goal_src/jak2/engine/gfx/hw/gs.gc index 659731ca7e..026ec7ca30 100644 --- a/goal_src/jak2/engine/gfx/hw/gs.gc +++ b/goal_src/jak2/engine/gfx/hw/gs.gc @@ -523,21 +523,22 @@ ;; Adress + Data command (deftype gs-adcmd (structure) - ((word uint32 4 :offset-assert 0) - (quad uint128 :offset 0) - (data uint64 :offset 0) - (cmds uint64 :offset 8) - (cmd uint8 :offset 8) - (x uint32 :offset 0) - (y uint32 :offset 4) - (z uint32 :offset 8) - (w uint32 :offset 12) + ((word uint32 4 :offset-assert 0) + (quad uint128 :offset 0) + (data uint64 :offset 0) + (cmds gs-reg64 :offset 8) + (cmd uint8 :offset 8) + (x uint32 :offset 0) + (y uint32 :offset 4) + (z uint32 :offset 8) + (w uint32 :offset 12) ) :method-count-assert 9 :size-assert #x10 :flag-assert #x900000010 ) + ;; the GS's TRXPOS register specifies the position and scanning direction of the rectangular area ;; in each buffer where buffer transmission is performed. (deftype gs-trxpos (uint64) diff --git a/goal_src/jak2/engine/gfx/tie/tie-h.gc b/goal_src/jak2/engine/gfx/tie/tie-h.gc index c5af295701..3e571e8425 100644 --- a/goal_src/jak2/engine/gfx/tie/tie-h.gc +++ b/goal_src/jak2/engine/gfx/tie/tie-h.gc @@ -11,6 +11,7 @@ (define-extern *instance-tie-work* instance-tie-work) (define-extern *prototype-tie-work* prototype-tie-work) +(define-extern tie-scissor-make-perspective-matrix (function matrix matrix none)) ;; DECOMP BEGINS @@ -335,3 +336,4 @@ (define *instance-tie-work-copy* (the-as instance-tie-work #f)) +(define-extern draw-drawable-tree-instance-tie (function drawable-tree-instance-tie level none)) diff --git a/goal_src/jak2/engine/gfx/tie/tie-methods.gc b/goal_src/jak2/engine/gfx/tie/tie-methods.gc index 9130582747..55a757cebb 100644 --- a/goal_src/jak2/engine/gfx/tie/tie-methods.gc +++ b/goal_src/jak2/engine/gfx/tie/tie-methods.gc @@ -7,3 +7,2086 @@ ;; DECOMP BEGINS +(deftype tie-debug (structure) + ((max-instance uint32 :offset-assert 0) + (min-instance uint32 :offset-assert 4) + (test-fragment uint32 :offset-assert 8) + (frag-count uint32 :offset-assert 12) + ) + :method-count-assert 9 + :size-assert #x10 + :flag-assert #x900000010 + ) + +(define *tie* (new 'global 'tie-debug)) + +(defun tie-debug-between ((arg0 uint) (arg1 uint)) + (set! (-> *instance-tie-work* test-id) arg1) + (set! (-> *instance-tie-work* test-id2) arg0) + arg0 + ) + +(defun tie-debug-one ((arg0 uint) (arg1 uint)) + (set! (-> *instance-tie-work* test-id) (+ arg1 -1 arg0)) + (set! (-> *instance-tie-work* test-id2) arg0) + arg0 + ) + +(defun tie-debug-frag-between ((arg0 uint) (arg1 uint)) + (set! (-> *tie* test-fragment) arg0) + (let ((v0-0 (- arg1 arg0))) + (set! (-> *tie* frag-count) v0-0) + v0-0 + ) + ) + +(defun tie-debug-frag-one ((arg0 uint) (arg1 uint)) + (set! (-> *tie* test-fragment) arg0) + (set! (-> *tie* frag-count) arg1) + arg1 + ) + +(defun walk-tie-generic-prototypes () + (none) + ) + +(define *pke-hack* (new 'global 'vector)) + +;; definition for function draw-inline-array-instance-tie +;; ERROR: function was not converted to expressions. Cannot decompile. + +;; definition for function draw-inline-array-prototype-tie-asm +;; ERROR: function was not converted to expressions. Cannot decompile. + +(defun instance-tie-patch-buckets ((arg0 dma-buffer) (arg1 level)) + ; (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie)) + ; (when (nonzero? (-> *prototype-tie-work* scissor-count)) + ; (let ((s5-0 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (let* ((v1-17 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (a2-0 (-> v1-17 base)) + ; ) + ; (let ((a1-1 (-> v1-17 base)) + ; (a0-5 (the-as object (-> *prototype-tie-work* scissor-last))) + ; ) + ; (let ((a3-1 (-> *prototype-tie-work* scissor-next))) + ; (set! (-> (the-as (pointer uint128) a1-1)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-1)) + ; (logior (logand (-> (the-as (pointer uint64) a1-1)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int a3-1) 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-5 + ; (logior (logand (-> (the-as (pointer uint64) a0-5) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-1 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint32 a0-5) a1-5) + ; ) + ; ) + ; (&+! (-> v1-17 base) 16) + ; (let ((a3-7 (-> v1-17 base))) + ; (let ((a0-8 (the-as dma-packet (-> v1-17 base)))) + ; (set! (-> a0-8 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + ; (set! (-> a0-8 vif0) (new 'static 'vif-tag)) + ; (set! (-> a0-8 vif1) (new 'static 'vif-tag)) + ; (set! (-> v1-17 base) (the-as pointer (&+ a0-8 16))) + ; ) + ; (let ((t9-0 dma-bucket-insert-tag) + ; (a0-11 (-> *display* frames (-> *display* on-screen) bucket-group)) + ; (v1-23 (-> arg1 draw-index)) + ; ) + ; (t9-0 + ; a0-11 + ; (cond + ; ((zero? v1-23) + ; (bucket-id tie-s-l0-tfrag) + ; ) + ; ((= v1-23 1) + ; (bucket-id tie-s-l1-tfrag) + ; ) + ; ((= v1-23 2) + ; (bucket-id tie-s-l2-tfrag) + ; ) + ; ((= v1-23 3) + ; (bucket-id tie-s-l3-tfrag) + ; ) + ; ((= v1-23 4) + ; (bucket-id tie-s-l4-tfrag) + ; ) + ; (else + ; (bucket-id tie-s-l5-tfrag) + ; ) + ; ) + ; a2-0 + ; (the-as (pointer dma-tag) a3-7) + ; ) + ; ) + ; ) + ; ) + ; (let ((v1-24 *dma-mem-usage*)) + ; (when (nonzero? v1-24) + ; (set! (-> v1-24 length) (max 16 (-> v1-24 length))) + ; (set! (-> v1-24 data 15 name) "tie-scissor") + ; (+! (-> v1-24 data 15 count) 1) + ; (+! (-> v1-24 data 15 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-0)) + ; ) + ; (set! (-> v1-24 data 15 total) (-> v1-24 data 15 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-envmap)) + ;(when (nonzero? (-> *prototype-tie-work* tie-count)) + (let ((s5-1 (-> *display* frames (-> *display* on-screen) global-buf base))) + (let* ((v1-42 (-> *display* frames (-> *display* on-screen) global-buf)) + (a2-10 (-> v1-42 base)) + ) + ; (let ((a1-21 (-> v1-42 base)) + ; (a0-17 (the-as object (-> *prototype-tie-work* tie-last))) + ; ) + ; (let ((a3-10 (-> *prototype-tie-work* tie-next))) + ; (set! (-> (the-as (pointer uint128) a1-21)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-21)) + ; (logior (logand (-> (the-as (pointer uint64) a1-21)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int a3-10) 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-25 + ; (logior (logand (-> (the-as (pointer uint64) a0-17) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-21 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint32 a0-17) a1-25) + ; ) + ; ) + ; (&+! (-> v1-42 base) 16) + (add-pc-tfrag3-data v1-42 arg1) + (let ((a3-16 (-> v1-42 base))) + (let ((a0-20 (the-as dma-packet (-> v1-42 base)))) + (set! (-> a0-20 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> a0-20 vif0) (new 'static 'vif-tag)) + (set! (-> a0-20 vif1) (new 'static 'vif-tag)) + (set! (-> v1-42 base) (the-as pointer (&+ a0-20 16))) + ) + (let ((t9-1 dma-bucket-insert-tag) + (a0-23 (-> *display* frames (-> *display* on-screen) bucket-group)) + (v1-48 (-> arg1 draw-index)) + ) + (t9-1 + a0-23 + (cond + ((zero? v1-48) + (bucket-id tie-l0-tfrag) + ) + ((= v1-48 1) + (bucket-id tie-l1-tfrag) + ) + ((= v1-48 2) + (bucket-id tie-l2-tfrag) + ) + ((= v1-48 3) + (bucket-id tie-l3-tfrag) + ) + ((= v1-48 4) + (bucket-id tie-l4-tfrag) + ) + (else + (bucket-id tie-l5-tfrag) + ) + ) + a2-10 + (the-as (pointer dma-tag) a3-16) + ) + ) + ) + ) + (let ((v1-49 *dma-mem-usage*)) + (when (nonzero? v1-49) + (set! (-> v1-49 length) (max 10 (-> v1-49 length))) + (set! (-> v1-49 data 9 name) "tie-fragment") + (+! (-> v1-49 data 9 count) 1) + (+! (-> v1-49 data 9 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-1)) + ) + (set! (-> v1-49 data 9 total) (-> v1-49 data 9 used)) + ) + ) + ;) + ) + ) + ; (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-scissor)) + ; (when (nonzero? (-> *prototype-tie-work* envmap-count)) + ; (let ((s5-2 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (let* ((v1-67 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (a2-20 (-> v1-67 base)) + ; ) + ; (let ((a1-41 (-> v1-67 base)) + ; (a0-29 (the-as object (-> *prototype-tie-work* envmap-last))) + ; ) + ; (let ((a3-19 (-> *prototype-tie-work* envmap-next))) + ; (set! (-> (the-as (pointer uint128) a1-41)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-41)) + ; (logior (logand (-> (the-as (pointer uint64) a1-41)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int a3-19) 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-45 + ; (logior (logand (-> (the-as (pointer uint64) a0-29) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-41 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint32 a0-29) a1-45) + ; ) + ; ) + ; (&+! (-> v1-67 base) 16) + ; (let ((a3-25 (-> v1-67 base))) + ; (let ((a0-32 (-> v1-67 base))) + ; (set! (-> (the-as (pointer int64) a0-32)) #x20000000) + ; (s.w! (+ a0-32 8) 0) + ; (s.w! (+ a0-32 12) 0) + ; (set! (-> v1-67 base) (&+ a0-32 16)) + ; ) + ; (let ((t9-2 dma-bucket-insert-tag) + ; (a0-35 (-> *display* frames (-> *display* on-screen) bucket-group)) + ; (v1-73 (-> arg1 draw-index)) + ; ) + ; (t9-2 + ; a0-35 + ; (cond + ; ((zero? v1-73) + ; (bucket-id etie-l0-tfrag) + ; ) + ; ((= v1-73 1) + ; (bucket-id etie-l1-tfrag) + ; ) + ; ((= v1-73 2) + ; (bucket-id etie-l2-tfrag) + ; ) + ; ((= v1-73 3) + ; (bucket-id etie-l3-tfrag) + ; ) + ; ((= v1-73 4) + ; (bucket-id etie-l4-tfrag) + ; ) + ; (else + ; (bucket-id etie-l5-tfrag) + ; ) + ; ) + ; a2-20 + ; (the-as (pointer dma-tag) a3-25) + ; ) + ; ) + ; ) + ; ) + ; (let ((v1-74 *dma-mem-usage*)) + ; (when (nonzero? v1-74) + ; (set! (-> v1-74 length) (max 10 (-> v1-74 length))) + ; (set! (-> v1-74 data 9 name) "tie-fragment") + ; (+! (-> v1-74 data 9 count) 1) + ; (+! (-> v1-74 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-2)) + ; ) + ; (set! (-> v1-74 data 9 total) (-> v1-74 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-envmap-scissor)) + ; (when (nonzero? (-> *prototype-tie-work* envmap-scissor-count)) + ; (let ((s5-3 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (let* ((v1-92 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (a2-30 (-> v1-92 base)) + ; ) + ; (let ((a1-61 (-> v1-92 base)) + ; (a0-41 (the-as object (-> *prototype-tie-work* envmap-scissor-last))) + ; ) + ; (let ((a3-28 (-> *prototype-tie-work* envmap-scissor-next))) + ; (set! (-> (the-as (pointer uint128) a1-61)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-61)) + ; (logior (logand (-> (the-as (pointer uint64) a1-61)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int a3-28) 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-65 + ; (logior (logand (-> (the-as (pointer uint64) a0-41) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-61 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint32 a0-41) a1-65) + ; ) + ; ) + ; (&+! (-> v1-92 base) 16) + ; (let ((a3-34 (-> v1-92 base))) + ; (let ((a0-44 (-> v1-92 base))) + ; (set! (-> (the-as (pointer int64) a0-44)) #x20000000) + ; (s.w! (+ a0-44 8) 0) + ; (s.w! (+ a0-44 12) 0) + ; (set! (-> v1-92 base) (&+ a0-44 16)) + ; ) + ; (let ((t9-3 dma-bucket-insert-tag) + ; (a0-47 (-> *display* frames (-> *display* on-screen) bucket-group)) + ; (v1-98 (-> arg1 draw-index)) + ; ) + ; (t9-3 + ; a0-47 + ; (cond + ; ((zero? v1-98) + ; (bucket-id etie-s-l0-tfrag) + ; ) + ; ((= v1-98 1) + ; (bucket-id etie-s-l1-tfrag) + ; ) + ; ((= v1-98 2) + ; (bucket-id etie-s-l2-tfrag) + ; ) + ; ((= v1-98 3) + ; (bucket-id etie-s-l3-tfrag) + ; ) + ; ((= v1-98 4) + ; (bucket-id etie-s-l4-tfrag) + ; ) + ; (else + ; (bucket-id etie-s-l5-tfrag) + ; ) + ; ) + ; a2-30 + ; (the-as (pointer dma-tag) a3-34) + ; ) + ; ) + ; ) + ; ) + ; (let ((v1-99 *dma-mem-usage*)) + ; (when (nonzero? v1-99) + ; (set! (-> v1-99 length) (max 10 (-> v1-99 length))) + ; (set! (-> v1-99 data 9 name) "tie-fragment") + ; (+! (-> v1-99 data 9 count) 1) + ; (+! (-> v1-99 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-3)) + ; ) + ; (set! (-> v1-99 data 9 total) (-> v1-99 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-vanish)) + ; (when (nonzero? (-> *prototype-tie-work* vanish-count)) + ; (let ((s5-4 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (let* ((v1-117 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (a2-40 (-> v1-117 base)) + ; ) + ; (let ((a1-81 (-> v1-117 base)) + ; (a0-53 (the-as object (-> *prototype-tie-work* vanish-last))) + ; ) + ; (let ((a3-37 (-> *prototype-tie-work* vanish-next))) + ; (set! (-> (the-as (pointer uint128) a1-81)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-81)) + ; (logior (logand (-> (the-as (pointer uint64) a1-81)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int a3-37) 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-85 + ; (logior (logand (-> (the-as (pointer uint64) a0-53) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-81 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint32 a0-53) a1-85) + ; ) + ; ) + ; (&+! (-> v1-117 base) 16) + ; (let ((a3-43 (-> v1-117 base))) + ; (let ((a0-56 (-> v1-117 base))) + ; (set! (-> (the-as (pointer int64) a0-56)) #x20000000) + ; (s.w! (+ a0-56 8) 0) + ; (s.w! (+ a0-56 12) 0) + ; (set! (-> v1-117 base) (&+ a0-56 16)) + ; ) + ; (let ((t9-4 dma-bucket-insert-tag) + ; (a0-59 (-> *display* frames (-> *display* on-screen) bucket-group)) + ; (v1-123 (-> arg1 draw-index)) + ; ) + ; (t9-4 + ; a0-59 + ; (cond + ; ((zero? v1-123) + ; (bucket-id tie-v-l0-tfrag) + ; ) + ; ((= v1-123 1) + ; (bucket-id tie-v-l1-tfrag) + ; ) + ; ((= v1-123 2) + ; (bucket-id tie-v-l2-tfrag) + ; ) + ; ((= v1-123 3) + ; (bucket-id tie-v-l3-tfrag) + ; ) + ; ((= v1-123 4) + ; (bucket-id tie-v-l4-tfrag) + ; ) + ; (else + ; (bucket-id tie-v-l5-tfrag) + ; ) + ; ) + ; a2-40 + ; (the-as (pointer dma-tag) a3-43) + ; ) + ; ) + ; ) + ; ) + ; (let ((v1-124 *dma-mem-usage*)) + ; (when (nonzero? v1-124) + ; (set! (-> v1-124 length) (max 10 (-> v1-124 length))) + ; (set! (-> v1-124 data 9 name) "tie-fragment") + ; (+! (-> v1-124 data 9 count) 1) + ; (+! (-> v1-124 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-4)) + ; ) + ; (set! (-> v1-124 data 9 total) (-> v1-124 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask tie-scissor-trans) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* scissor-trans-count)) + ; (let ((s5-5 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (let* ((v1-141 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (a2-50 (-> v1-141 base)) + ; ) + ; (let ((a1-101 (-> v1-141 base)) + ; (a0-67 (the-as object (-> *prototype-tie-work* scissor-trans-last))) + ; ) + ; (let ((a3-46 (-> *prototype-tie-work* scissor-trans-next))) + ; (set! (-> (the-as (pointer uint128) a1-101)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-101)) + ; (logior (logand (-> (the-as (pointer uint64) a1-101)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int a3-46) 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-105 + ; (logior (logand (-> (the-as (pointer uint64) a0-67) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-101 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint32 a0-67) a1-105) + ; ) + ; ) + ; (&+! (-> v1-141 base) 16) + ; (let ((a3-52 (-> v1-141 base))) + ; (let ((a0-70 (-> v1-141 base))) + ; (set! (-> (the-as (pointer int64) a0-70)) #x20000000) + ; (s.w! (+ a0-70 8) 0) + ; (s.w! (+ a0-70 12) 0) + ; (set! (-> v1-141 base) (&+ a0-70 16)) + ; ) + ; (let ((t9-5 dma-bucket-insert-tag) + ; (a0-73 (-> *display* frames (-> *display* on-screen) bucket-group)) + ; (v1-147 (-> arg1 draw-index)) + ; ) + ; (t9-5 + ; a0-73 + ; (cond + ; ((zero? v1-147) + ; (bucket-id tie-st-l0-alpha) + ; ) + ; ((= v1-147 1) + ; (bucket-id tie-st-l1-alpha) + ; ) + ; ((= v1-147 2) + ; (bucket-id tie-st-l2-alpha) + ; ) + ; ((= v1-147 3) + ; (bucket-id tie-st-l3-alpha) + ; ) + ; ((= v1-147 4) + ; (bucket-id tie-st-l4-alpha) + ; ) + ; (else + ; (bucket-id tie-st-l5-alpha) + ; ) + ; ) + ; a2-50 + ; (the-as (pointer dma-tag) a3-52) + ; ) + ; ) + ; ) + ; ) + ; (let ((v1-148 *dma-mem-usage*)) + ; (when (nonzero? v1-148) + ; (set! (-> v1-148 length) (max 16 (-> v1-148 length))) + ; (set! (-> v1-148 data 15 name) "tie-scissor") + ; (+! (-> v1-148 data 15 count) 1) + ; (+! (-> v1-148 data 15 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-5)) + ; ) + ; (set! (-> v1-148 data 15 total) (-> v1-148 data 15 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask tie-trans) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* trans-count)) + ; (let ((s5-6 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (let* ((v1-165 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (a2-60 (-> v1-165 base)) + ; ) + ; (let ((a1-121 (-> v1-165 base)) + ; (a0-81 (the-as object (-> *prototype-tie-work* trans-last))) + ; ) + ; (let ((a3-55 (-> *prototype-tie-work* trans-next))) + ; (set! (-> (the-as (pointer uint128) a1-121)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-121)) + ; (logior (logand (-> (the-as (pointer uint64) a1-121)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int a3-55) 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-125 + ; (logior (logand (-> (the-as (pointer uint64) a0-81) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-121 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint32 a0-81) a1-125) + ; ) + ; ) + ; (&+! (-> v1-165 base) 16) + ; (let ((a3-61 (-> v1-165 base))) + ; (let ((a0-84 (-> v1-165 base))) + ; (set! (-> (the-as (pointer int64) a0-84)) #x20000000) + ; (s.w! (+ a0-84 8) 0) + ; (s.w! (+ a0-84 12) 0) + ; (set! (-> v1-165 base) (&+ a0-84 16)) + ; ) + ; (let ((t9-6 dma-bucket-insert-tag) + ; (a0-87 (-> *display* frames (-> *display* on-screen) bucket-group)) + ; (v1-171 (-> arg1 draw-index)) + ; ) + ; (t9-6 + ; a0-87 + ; (cond + ; ((zero? v1-171) + ; (bucket-id tie-t-l0-alpha) + ; ) + ; ((= v1-171 1) + ; (bucket-id tie-t-l1-alpha) + ; ) + ; ((= v1-171 2) + ; (bucket-id tie-t-l2-alpha) + ; ) + ; ((= v1-171 3) + ; (bucket-id tie-t-l3-alpha) + ; ) + ; ((= v1-171 4) + ; (bucket-id tie-t-l4-alpha) + ; ) + ; (else + ; (bucket-id tie-t-l5-alpha) + ; ) + ; ) + ; a2-60 + ; (the-as (pointer dma-tag) a3-61) + ; ) + ; ) + ; ) + ; ) + ; (let ((v1-172 *dma-mem-usage*)) + ; (when (nonzero? v1-172) + ; (set! (-> v1-172 length) (max 10 (-> v1-172 length))) + ; (set! (-> v1-172 data 9 name) "tie-fragment") + ; (+! (-> v1-172 data 9 count) 1) + ; (+! (-> v1-172 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-6)) + ; ) + ; (set! (-> v1-172 data 9 total) (-> v1-172 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask tie-envmap-trans) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* envmap-trans-count)) + ; (let ((s5-7 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (let* ((v1-189 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (a2-70 (-> v1-189 base)) + ; ) + ; (let ((a1-141 (-> v1-189 base)) + ; (a0-95 (the-as object (-> *prototype-tie-work* envmap-trans-last))) + ; ) + ; (let ((a3-64 (-> *prototype-tie-work* envmap-trans-next))) + ; (set! (-> (the-as (pointer uint128) a1-141)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-141)) + ; (logior (logand (-> (the-as (pointer uint64) a1-141)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int a3-64) 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-145 + ; (logior (logand (-> (the-as (pointer uint64) a0-95) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-141 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint32 a0-95) a1-145) + ; ) + ; ) + ; (&+! (-> v1-189 base) 16) + ; (let ((a3-70 (-> v1-189 base))) + ; (let ((a0-98 (-> v1-189 base))) + ; (set! (-> (the-as (pointer int64) a0-98)) #x20000000) + ; (s.w! (+ a0-98 8) 0) + ; (s.w! (+ a0-98 12) 0) + ; (set! (-> v1-189 base) (&+ a0-98 16)) + ; ) + ; (let ((t9-7 dma-bucket-insert-tag) + ; (a0-101 (-> *display* frames (-> *display* on-screen) bucket-group)) + ; (v1-195 (-> arg1 draw-index)) + ; ) + ; (t9-7 + ; a0-101 + ; (cond + ; ((zero? v1-195) + ; (bucket-id etie-t-l0-alpha) + ; ) + ; ((= v1-195 1) + ; (bucket-id etie-t-l1-alpha) + ; ) + ; ((= v1-195 2) + ; (bucket-id etie-t-l2-alpha) + ; ) + ; ((= v1-195 3) + ; (bucket-id etie-t-l3-alpha) + ; ) + ; ((= v1-195 4) + ; (bucket-id etie-t-l4-alpha) + ; ) + ; (else + ; (bucket-id etie-t-l5-alpha) + ; ) + ; ) + ; a2-70 + ; (the-as (pointer dma-tag) a3-70) + ; ) + ; ) + ; ) + ; ) + ; (let ((v1-196 *dma-mem-usage*)) + ; (when (nonzero? v1-196) + ; (set! (-> v1-196 length) (max 10 (-> v1-196 length))) + ; (set! (-> v1-196 data 9 name) "tie-fragment") + ; (+! (-> v1-196 data 9 count) 1) + ; (+! (-> v1-196 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-7)) + ; ) + ; (set! (-> v1-196 data 9 total) (-> v1-196 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask tie-envmap-scissor-trans) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* envmap-scissor-trans-count)) + ; (let ((s5-8 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (let* ((v1-213 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (a2-80 (-> v1-213 base)) + ; ) + ; (let ((a1-161 (-> v1-213 base)) + ; (a0-109 (the-as object (-> *prototype-tie-work* envmap-scissor-trans-last))) + ; ) + ; (let ((a3-73 (-> *prototype-tie-work* envmap-scissor-trans-next))) + ; (set! (-> (the-as (pointer uint128) a1-161)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-161)) + ; (logior (logand (-> (the-as (pointer uint64) a1-161)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int a3-73) 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-165 + ; (logior (logand (-> (the-as (pointer uint64) a0-109) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-161 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint32 a0-109) a1-165) + ; ) + ; ) + ; (&+! (-> v1-213 base) 16) + ; (let ((a3-79 (-> v1-213 base))) + ; (let ((a0-112 (-> v1-213 base))) + ; (set! (-> (the-as (pointer int64) a0-112)) #x20000000) + ; (s.w! (+ a0-112 8) 0) + ; (s.w! (+ a0-112 12) 0) + ; (set! (-> v1-213 base) (&+ a0-112 16)) + ; ) + ; (let ((t9-8 dma-bucket-insert-tag) + ; (a0-115 (-> *display* frames (-> *display* on-screen) bucket-group)) + ; (v1-219 (-> arg1 draw-index)) + ; ) + ; (t9-8 + ; a0-115 + ; (cond + ; ((zero? v1-219) + ; (bucket-id etie-st-l0-alpha) + ; ) + ; ((= v1-219 1) + ; (bucket-id etie-st-l1-alpha) + ; ) + ; ((= v1-219 2) + ; (bucket-id etie-st-l2-alpha) + ; ) + ; ((= v1-219 3) + ; (bucket-id etie-st-l3-alpha) + ; ) + ; ((= v1-219 4) + ; (bucket-id etie-st-l4-alpha) + ; ) + ; (else + ; (bucket-id etie-st-l5-alpha) + ; ) + ; ) + ; a2-80 + ; (the-as (pointer dma-tag) a3-79) + ; ) + ; ) + ; ) + ; ) + ; (let ((v1-220 *dma-mem-usage*)) + ; (when (nonzero? v1-220) + ; (set! (-> v1-220 length) (max 10 (-> v1-220 length))) + ; (set! (-> v1-220 data 9 name) "tie-fragment") + ; (+! (-> v1-220 data 9 count) 1) + ; (+! (-> v1-220 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-8)) + ; ) + ; (set! (-> v1-220 data 9 total) (-> v1-220 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask tie-scissor-water) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* scissor-water-count)) + ; (let ((s5-9 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (let* ((v1-237 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (a2-90 (-> v1-237 base)) + ; ) + ; (let ((a1-181 (-> v1-237 base)) + ; (a0-123 (the-as object (-> *prototype-tie-work* scissor-water-last))) + ; ) + ; (let ((a3-82 (-> *prototype-tie-work* scissor-water-next))) + ; (set! (-> (the-as (pointer uint128) a1-181)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-181)) + ; (logior (logand (-> (the-as (pointer uint64) a1-181)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int a3-82) 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-185 + ; (logior (logand (-> (the-as (pointer uint64) a0-123) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-181 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint32 a0-123) a1-185) + ; ) + ; ) + ; (&+! (-> v1-237 base) 16) + ; (let ((a3-88 (-> v1-237 base))) + ; (let ((a0-126 (-> v1-237 base))) + ; (set! (-> (the-as (pointer int64) a0-126)) #x20000000) + ; (s.w! (+ a0-126 8) 0) + ; (s.w! (+ a0-126 12) 0) + ; (set! (-> v1-237 base) (&+ a0-126 16)) + ; ) + ; (let ((t9-9 dma-bucket-insert-tag) + ; (a0-129 (-> *display* frames (-> *display* on-screen) bucket-group)) + ; (v1-243 (-> arg1 draw-index)) + ; ) + ; (t9-9 + ; a0-129 + ; (cond + ; ((zero? v1-243) + ; (bucket-id tie-sw-l0-water) + ; ) + ; ((= v1-243 1) + ; (bucket-id tie-sw-l1-water) + ; ) + ; ((= v1-243 2) + ; (bucket-id tie-sw-l2-water) + ; ) + ; ((= v1-243 3) + ; (bucket-id tie-sw-l3-water) + ; ) + ; ((= v1-243 4) + ; (bucket-id tie-sw-l4-water) + ; ) + ; (else + ; (bucket-id tie-sw-l5-water) + ; ) + ; ) + ; a2-90 + ; (the-as (pointer dma-tag) a3-88) + ; ) + ; ) + ; ) + ; ) + ; (let ((v1-244 *dma-mem-usage*)) + ; (when (nonzero? v1-244) + ; (set! (-> v1-244 length) (max 16 (-> v1-244 length))) + ; (set! (-> v1-244 data 15 name) "tie-scissor") + ; (+! (-> v1-244 data 15 count) 1) + ; (+! (-> v1-244 data 15 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-9)) + ; ) + ; (set! (-> v1-244 data 15 total) (-> v1-244 data 15 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask tie-water) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* water-count)) + ; (let ((s5-10 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (let* ((v1-261 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (a2-100 (-> v1-261 base)) + ; ) + ; (let ((a1-201 (-> v1-261 base)) + ; (a0-137 (the-as object (-> *prototype-tie-work* water-last))) + ; ) + ; (let ((a3-91 (-> *prototype-tie-work* water-next))) + ; (set! (-> (the-as (pointer uint128) a1-201)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-201)) + ; (logior (logand (-> (the-as (pointer uint64) a1-201)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int a3-91) 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-205 + ; (logior (logand (-> (the-as (pointer uint64) a0-137) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-201 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint32 a0-137) a1-205) + ; ) + ; ) + ; (&+! (-> v1-261 base) 16) + ; (let ((a3-97 (-> v1-261 base))) + ; (let ((a0-140 (-> v1-261 base))) + ; (set! (-> (the-as (pointer int64) a0-140)) #x20000000) + ; (s.w! (+ a0-140 8) 0) + ; (s.w! (+ a0-140 12) 0) + ; (set! (-> v1-261 base) (&+ a0-140 16)) + ; ) + ; (let ((t9-10 dma-bucket-insert-tag) + ; (a0-143 (-> *display* frames (-> *display* on-screen) bucket-group)) + ; (v1-267 (-> arg1 draw-index)) + ; ) + ; (t9-10 + ; a0-143 + ; (cond + ; ((zero? v1-267) + ; (bucket-id tie-w-l0-water) + ; ) + ; ((= v1-267 1) + ; (bucket-id tie-w-l1-water) + ; ) + ; ((= v1-267 2) + ; (bucket-id tie-w-l2-water) + ; ) + ; ((= v1-267 3) + ; (bucket-id tie-w-l3-water) + ; ) + ; ((= v1-267 4) + ; (bucket-id tie-w-l4-water) + ; ) + ; (else + ; (bucket-id tie-w-l5-water) + ; ) + ; ) + ; a2-100 + ; (the-as (pointer dma-tag) a3-97) + ; ) + ; ) + ; ) + ; ) + ; (let ((v1-268 *dma-mem-usage*)) + ; (when (nonzero? v1-268) + ; (set! (-> v1-268 length) (max 10 (-> v1-268 length))) + ; (set! (-> v1-268 data 9 name) "tie-fragment") + ; (+! (-> v1-268 data 9 count) 1) + ; (+! (-> v1-268 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-10)) + ; ) + ; (set! (-> v1-268 data 9 total) (-> v1-268 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (when (logtest? (vu1-renderer-mask tie-envmap-water) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* envmap-water-count)) + ; (let ((s5-11 (-> *display* frames (-> *display* on-screen) global-buf base))) + ; (let* ((v1-285 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (a2-110 (-> v1-285 base)) + ; ) + ; (let ((a1-221 (-> v1-285 base)) + ; (a0-151 (the-as object (-> *prototype-tie-work* envmap-water-last))) + ; ) + ; (let ((a3-100 (-> *prototype-tie-work* envmap-water-next))) + ; (set! (-> (the-as (pointer uint128) a1-221)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-221)) + ; (logior (logand (-> (the-as (pointer uint64) a1-221)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int a3-100) 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-225 + ; (logior (logand (-> (the-as (pointer uint64) a0-151) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-221 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint32 a0-151) a1-225) + ; ) + ; ) + ; (&+! (-> v1-285 base) 16) + ; (let ((a3-106 (-> v1-285 base))) + ; (let ((a0-154 (-> v1-285 base))) + ; (set! (-> (the-as (pointer int64) a0-154)) #x20000000) + ; (s.w! (+ a0-154 8) 0) + ; (s.w! (+ a0-154 12) 0) + ; (set! (-> v1-285 base) (&+ a0-154 16)) + ; ) + ; (let ((t9-11 dma-bucket-insert-tag) + ; (a0-157 (-> *display* frames (-> *display* on-screen) bucket-group)) + ; (v1-291 (-> arg1 draw-index)) + ; ) + ; (t9-11 + ; a0-157 + ; (cond + ; ((zero? v1-291) + ; (bucket-id etie-w-l0-water) + ; ) + ; ((= v1-291 1) + ; (bucket-id etie-w-l1-water) + ; ) + ; ((= v1-291 2) + ; (bucket-id etie-w-l2-water) + ; ) + ; ((= v1-291 3) + ; (bucket-id etie-w-l3-water) + ; ) + ; ((= v1-291 4) + ; (bucket-id etie-w-l4-water) + ; ) + ; (else + ; (bucket-id etie-w-l5-water) + ; ) + ; ) + ; a2-110 + ; (the-as (pointer dma-tag) a3-106) + ; ) + ; ) + ; ) + ; ) + ; (let ((v1-292 *dma-mem-usage*)) + ; (when (nonzero? v1-292) + ; (set! (-> v1-292 length) (max 10 (-> v1-292 length))) + ; (set! (-> v1-292 data 9 name) "tie-fragment") + ; (+! (-> v1-292 data 9 count) 1) + ; (+! (-> v1-292 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-11)) + ; ) + ; (set! (-> v1-292 data 9 total) (-> v1-292 data 9 used)) + ; ) + ; ) + ; ) + ; ) + ; ) + ; (the-as + ; object + ; (when (logtest? (vu1-renderer-mask tie-envmap-scissor-water) (-> *display* vu1-enable-user)) + ; (when (nonzero? (-> *prototype-tie-work* envmap-scissor-water-count)) + ; (let* ((s5-12 (-> *display* frames (-> *display* on-screen) global-buf base)) + ; (v1-308 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (a2-120 (-> v1-308 base)) + ; ) + ; (let ((a1-241 (-> v1-308 base)) + ; (a0-164 (the-as object (-> *prototype-tie-work* envmap-scissor-water-last))) + ; ) + ; (let ((a3-109 (-> *prototype-tie-work* envmap-scissor-water-next))) + ; (set! (-> (the-as (pointer uint128) a1-241)) (-> *prototype-tie-work* model-next quad)) + ; (set! (-> (the-as (pointer uint64) a1-241)) + ; (logior (logand (-> (the-as (pointer uint64) a1-241)) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int a3-109) 33) 1) + ; ) + ; ) + ; ) + ; (let ((a1-245 (logior (logand (-> (the-as (pointer uint64) a0-164) 0) (the-as uint #x80000000ffffffff)) + ; (shr (shl (the-as int (&+ a1-241 16)) 33) 1) + ; ) + ; ) + ; ) + ; (s.d! (the-as uint32 a0-164) a1-245) + ; ) + ; ) + ; (&+! (-> v1-308 base) 16) + ; (let ((a3-115 (-> v1-308 base))) + ; (let ((a0-167 (-> v1-308 base))) + ; (set! (-> (the-as (pointer int64) a0-167)) #x20000000) + ; (s.w! (+ a0-167 8) 0) + ; (s.w! (+ a0-167 12) 0) + ; (set! (-> v1-308 base) (&+ a0-167 16)) + ; ) + ; (let* ((t9-12 dma-bucket-insert-tag) + ; (a0-170 (-> *display* frames (-> *display* on-screen) bucket-group)) + ; (v1-314 (-> arg1 draw-index)) + ; (v0-12 (t9-12 + ; a0-170 + ; (cond + ; ((zero? v1-314) + ; (bucket-id etie-sw-l0-water) + ; ) + ; ((= v1-314 1) + ; (bucket-id etie-sw-l1-water) + ; ) + ; ((= v1-314 2) + ; (bucket-id tie-esw-l2-water) + ; ) + ; ((= v1-314 3) + ; (bucket-id etie-sw-l3-water) + ; ) + ; ((= v1-314 4) + ; (bucket-id etie-sw-l4-water) + ; ) + ; (else + ; (bucket-id etie-sw-l5-water) + ; ) + ; ) + ; a2-120 + ; (the-as (pointer dma-tag) a3-115) + ; ) + ; ) + ; ) + ; (let ((v1-315 *dma-mem-usage*)) + ; (when (nonzero? v1-315) + ; (set! (-> v1-315 length) (max 10 (-> v1-315 length))) + ; (set! (-> v1-315 data 9 name) "tie-fragment") + ; (+! (-> v1-315 data 9 count) 1) + ; (+! (-> v1-315 data 9 used) + ; (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-12)) + ; ) + ; (set! (-> v1-315 data 9 total) (-> v1-315 data 9 used)) + ; ) + ; ) + ; v0-12 + ; ) + ; ) + ; ) + ; ) + ; ) + ; ) + (the object #f) + ) + + +(defun draw-drawable-tree-instance-tie ((arg0 drawable-tree-instance-tie) (arg1 level)) + (local-vars (v0-9 object) (a0-42 int) (a0-44 int) (a0-55 int) (a0-57 int) (sv-16 int)) + (when (logtest? (vu1-renderer-mask + tie + tie-envmap + tie-scissor + tie-envmap-scissor + tie-vanish + generic + tie-scissor-trans + tie-trans + tie-envmap-trans + tie-envmap-scissor-trans + ) + (-> *display* vu1-enable-user) + ) + (set! (-> *instance-tie-work* wind-vectors) (-> arg0 prototypes wind-vectors)) + (let ((s5-0 (+ (-> arg0 length) -1))) + (when (nonzero? s5-0) + ; (dotimes (s4-0 s5-0) + ; (let* ((v1-9 (-> arg0 data s4-0)) + ; (a0-7 (-> arg0 data (+ s4-0 1))) + ; (a1-2 (/ (-> (the-as drawable-inline-array-node v1-9) data 0 id) 8)) + ; (a0-9 (/ (-> (the-as drawable-inline-array-node a0-7) data 0 id) 8)) + ; (a1-4 (+ a1-2 #x38a0 #x70000000)) + ; (a0-11 (+ a0-9 #x38a0 #x70000000)) + ; ) + ; (draw-node-cull + ; (the-as pointer a0-11) + ; (the-as pointer a1-4) + ; (-> (the-as drawable-inline-array-node v1-9) data) + ; (-> (the-as drawable-inline-array-node v1-9) length) + ; ) + ; ) + ; ) + ) + (let* ((s2-0 (-> arg0 data s5-0)) + (s3-0 (-> arg0 prototypes prototype-array-tie)) + (s4-1 (-> s3-0 length)) + (s5-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s0-0 (-> s5-1 base)) + (s1-1 (&- (-> s5-1 end) (the-as uint (* (-> arg0 prototypes prototype-max-qwc) 16)))) + ) + (when *debug-segment* + (if (>= (the-as uint s0-0) (the-as uint s1-1)) + (format *stdcon* "out of tie memory~%") + ) + ) + (when (< (the-as uint s0-0) (the-as uint s1-1)) + (set! (-> *instance-tie-work* buffer-start) (the-as uint (-> s5-1 base))) + (set! (-> *instance-tie-work* buffer-end) (the-as uint s1-1)) + (dotimes (v1-28 16) + (set! (-> *prototype-tie-work* last v1-28) (the-as uint 0)) + (set! (-> *prototype-tie-work* next v1-28) (the-as uint 0)) + (set! (-> *prototype-tie-work* count v1-28) (the-as uint 0)) + ) + (dotimes (v1-31 s4-1) + (let ((a0-26 (-> s3-0 array-data v1-31))) + (dotimes (a1-9 3) + (set! (-> a0-26 next-clear a1-9) (the-as uint128 0)) + (set! (-> a0-26 count-clear a1-9) (the-as uint 0)) + ) + ) + ) + (let* ((s1-2 (&+ s2-0 32)) + (s0-1 (+ (/ (-> s1-2 id) 8) #x38a0 #x70000000)) + ) + (set! sv-16 (-> (the-as drawable-inline-array-instance-tie s2-0) length)) + (when (nonzero? sv-16) + (let* ((v1-41 (logand (the-as int *gsf-buffer*) 8191)) + (v1-43 + (the-as + object + (logand (the-as int (&- (logand (the-as int (&-> (-> s3-0 data) -640)) 8191) (the-as uint v1-41))) 8191) + ) + ) + ) + (set! *instance-tie-work-copy* (the-as instance-tie-work (+ (the-as int *gsf-buffer*) (the-as int v1-43)))) + ) + (quad-copy! (the-as pointer *instance-tie-work-copy*) (the-as pointer *instance-tie-work*) 35) + (let ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf base))) + (set! (-> *instance-tie-work-copy* wait-to-spr) (the-as uint 0)) + (set! (-> *instance-tie-work-copy* wait-from-spr) (the-as uint 0)) + (set! (-> *instance-tie-work-copy* tfrag-dists) (the-as uint (-> arg1 bsp tfrag-closest))) + (set! (-> *instance-tie-work-copy* alpha-dists) (the-as uint (-> arg1 bsp alpha-closest))) + (set! (-> *instance-tie-work-copy* water-dists) (the-as uint (-> arg1 bsp water-closest))) + ; (let* ((v1-61 (-> *perf-stats* data 46)) + ; (a0-39 (-> v1-61 ctrl)) + ; ) + ; (+! (-> v1-61 count) 1) + ; (b! (zero? a0-39) cfg-23 :delay (nop!)) + ; (.mtc0 Perf r0) + ; (.sync.l) + ; (.sync.p) + ; (.mtpc pcr0 r0) + ; (.mtpc pcr1 r0) + ; (.sync.l) + ; (.sync.p) + ; (.mtc0 Perf a0-39) + ; ) + ; (.sync.l) + ; (.sync.p) + ; (label cfg-23) + ; 0 + ; (let ((t9-3 draw-inline-array-instance-tie) + ; (a3-1 s5-1) + ; ) + ; (t9-3 (the-as pointer s0-1) (the-as (inline-array instance-tie) s1-2) sv-16 a3-1) + ; ) + ; (let ((v1-64 (-> *perf-stats* data 46))) + ; (b! (zero? (-> v1-64 ctrl)) cfg-25 :delay (nop!)) + ; (.mtc0 Perf r0) + ; (.sync.l) + ; (.sync.p) + ; (.mfpc a0-42 pcr0) + ; (+! (-> v1-64 accum0) a0-42) + ; (.mfpc a0-44 pcr1) + ; (+! (-> v1-64 accum1) a0-44) + ; ) + ; (label cfg-25) + ; 0 + (update-wait-stats + (-> *perf-stats* data 46) + (the-as uint 0) + (-> *instance-tie-work-copy* wait-to-spr) + (-> *instance-tie-work-copy* wait-from-spr) + ) + (let ((v1-71 (-> *instance-tie-work-copy* min-dist quad))) + (set! (-> *instance-tie-work* min-dist quad) v1-71) + ) + (set! (-> *instance-tie-work* flags) (-> *instance-tie-work-copy* flags)) + (if (and *debug-segment* (< (the-as int (-> *instance-tie-work* buffer-end)) (the-as int (-> s5-1 base)))) + (format *stdcon* "out of tie memory~%") + ) + (when (>= (the-as int (-> *instance-tie-work* buffer-end)) (the-as int (-> s5-1 base))) + (set! (-> *prototype-tie-work* wait-to-spr) (the-as uint 0)) + (set! (-> *prototype-tie-work* wait-from-spr) (the-as uint 0)) + ; (let* ((v1-85 (-> *perf-stats* data 47)) + ; (a0-52 (-> v1-85 ctrl)) + ; ) + ; (+! (-> v1-85 count) 1) + ; (b! (zero? a0-52) cfg-33 :delay (nop!)) + ; (.mtc0 Perf r0) + ; (.sync.l) + ; (.sync.p) + ; (.mtpc pcr0 r0) + ; (.mtpc pcr1 r0) + ; (.sync.l) + ; (.sync.p) + ; (.mtc0 Perf a0-52) + ; ) + ; (.sync.l) + ; (.sync.p) + ; (label cfg-33) + ; 0 + ; (draw-inline-array-prototype-tie-asm s5-1 s4-1 s3-0) + ; (let ((v1-88 (-> *perf-stats* data 47))) + ; (b! (zero? (-> v1-88 ctrl)) cfg-35 :delay (nop!)) + ; (.mtc0 Perf r0) + ; (.sync.l) + ; (.sync.p) + ; (.mfpc a0-55 pcr0) + ; (+! (-> v1-88 accum0) a0-55) + ; (.mfpc a0-57 pcr1) + ; (+! (-> v1-88 accum1) a0-57) + ; ) + ; (label cfg-35) + ; 0 + (update-wait-stats + (-> *perf-stats* data 47) + (the-as uint 0) + (-> *prototype-tie-work* wait-to-spr) + (-> *prototype-tie-work* wait-from-spr) + ) + ) + (let ((a0-60 *dma-mem-usage*)) + (when (nonzero? a0-60) + (set! (-> a0-60 length) (max 10 (-> a0-60 length))) + (set! (-> a0-60 data 9 name) "tie-fragment") + (+! (-> a0-60 data 9 count) 1) + (+! (-> a0-60 data 9 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s2-1)) + ) + (set! (-> a0-60 data 9 total) (-> a0-60 data 9 used)) + ) + ) + ) + ) + ) + (set! v0-9 (cond + ((< (the-as int (-> *instance-tie-work* buffer-end)) (the-as int (-> s5-1 base))) + (if *debug-segment* + (format *stdcon* "out of tie memory~%") + ) + (set! v0-9 (-> *instance-tie-work* buffer-start)) + (set! (-> s5-1 base) (the-as pointer v0-9)) + v0-9 + ) + (else + (instance-tie-patch-buckets s5-1 arg1) + ) + ) + ) + ) + ) + ) + ) + (set! (-> arg1 closest-object-array 10) (-> *instance-tie-work* min-dist x)) + 0 + (none) + ) + +;; definition for function tie-init-scissor-buf +;; WARN: Return type mismatch pointer vs none. +(defun tie-init-scissor-buf ((arg0 bucket-id) (arg1 gs-alpha) (arg2 gs-test) (arg3 gs-test)) + ;; nothing in PC + (none) + ) + +;; definition for function tie-init-buf +;; WARN: Return type mismatch pointer vs none. +(defun tie-init-buf ((arg0 bucket-id) (arg1 gs-alpha) (arg2 gs-test) (arg3 gs-test)) + (let ((s5-0 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= s5-0 (-> s5-0 last)) + (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s3-1 (-> s4-0 base)) + ) + (tie-init-engine s4-0 arg1 arg2 arg3) + (let* ((v1-12 s4-0) + (a0-5 (the-as dma-packet (-> v1-12 base))) + ) + (set! (-> a0-5 dma) (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))) + (set! (-> a0-5 vif0) (new 'static 'vif-tag)) + (set! (-> a0-5 vif1) (new 'static 'vif-tag :imm #x2 :cmd (vif-cmd direct) :msk #x1)) + (set! (-> v1-12 base) (the-as pointer (&+ a0-5 16))) + ) + (let* ((v1-13 s4-0) + (a0-7 (the-as gs-gif-tag (-> v1-13 base))) + ) + (set! (-> a0-7 tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x1)) + (set! (-> a0-7 regs) GIF_REGS_ALL_AD) + (set! (-> v1-13 base) (the-as pointer (&+ a0-7 16))) + ) + (let* ((v1-14 s4-0) + (a0-9 (-> v1-14 base)) + ) + (set! (-> (the-as (pointer gs-zbuf) a0-9) 0) (new 'static 'gs-zbuf :zbp #x130 :psm (gs-psm ct24))) + (set! (-> (the-as (pointer gs-reg64) a0-9) 1) (gs-reg64 zbuf-1)) + (set! (-> v1-14 base) (&+ a0-9 16)) + ) + (let ((v1-15 (the-as dma-packet (-> s4-0 base)))) + (set! (-> v1-15 dma) (new 'static 'dma-tag :id (dma-tag-id next) :addr (-> s5-0 next))) + (set! (-> v1-15 vif0) (new 'static 'vif-tag)) + (set! (-> v1-15 vif1) (new 'static 'vif-tag)) + (set! (-> s4-0 base) (the-as pointer (&+ v1-15 16))) + ) + (set! (-> s5-0 next) (the-as uint s3-1)) + ) + ) + ) + (let ((gp-1 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= gp-1 (-> gp-1 last)) + (let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s5-1 (-> s4-1 base)) + ) + (tie-end-buffer s4-1) + (let ((v0-3 (-> s4-1 base))) + (let ((v1-29 (the-as dma-packet (-> s4-1 base)))) + (set! (-> v1-29 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-29 vif0) (new 'static 'vif-tag)) + (set! (-> v1-29 vif1) (new 'static 'vif-tag)) + (set! (-> s4-1 base) (the-as pointer (&+ v1-29 16))) + ) + (set! (-> (the-as (pointer int32) (-> gp-1 last)) 1) (the-as int s5-1)) + (set! (-> gp-1 last) (the-as (pointer dma-tag) v0-3)) + ) + ) + ) + ) + (none) + ) + +(defun tie-init-envmap-buf ((arg0 bucket-id) (arg1 gs-alpha) (arg2 int) (arg3 int)) + ;; nothing yet + ; (let ((s5-0 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + ; (when (!= s5-0 (-> s5-0 last)) + ; (let* ((s4-0 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (s3-1 (-> s4-0 base)) + ; ) + ; (etie-init-engine s4-0) + ; (let ((v1-12 (the-as dma-packet (-> s4-0 base)))) + ; (set! (-> v1-12 dma) (new 'static 'dma-tag :id (dma-tag-id next) :addr (-> s5-0 next))) + ; (set! (-> v1-12 vif0) (new 'static 'vif-tag)) + ; (set! (-> v1-12 vif1) (new 'static 'vif-tag)) + ; (set! (-> s4-0 base) (the-as pointer (&+ v1-12 16))) + ; ) + ; (set! (-> s5-0 next) (the-as uint s3-1)) + ; ) + ; ) + ; ) + ; (let ((gp-1 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + ; (when (!= gp-1 (-> gp-1 last)) + ; (let* ((s4-1 (-> *display* frames (-> *display* on-screen) global-buf)) + ; (s5-1 (-> s4-1 base)) + ; ) + ; (etie-end-buffer s4-1) + ; (let ((v0-3 (-> s4-1 base))) + ; (let ((v1-26 (the-as dma-packet (-> s4-1 base)))) + ; (set! (-> v1-26 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + ; (set! (-> v1-26 vif0) (new 'static 'vif-tag)) + ; (set! (-> v1-26 vif1) (new 'static 'vif-tag)) + ; (set! (-> s4-1 base) (the-as pointer (&+ v1-26 16))) + ; ) + ; (set! (-> (the-as (pointer int32) (-> gp-1 last)) 1) (the-as int s5-1)) + ; (set! (-> gp-1 last) (the-as (pointer dma-tag) v0-3)) + ; ) + ; ) + ; ) + ; ) + (none) + ) + +(defun tie-init-envmap-scissor-buf ((arg0 bucket-id) (arg1 gs-alpha) (arg2 int) (arg3 int)) + ;; no etn + (none) + ) + +(deftype tie-init-data (structure) + ((tie-bucket bucket-id :offset-assert 0) + (tie-scissor-bucket bucket-id :offset-assert 4) + (tie-envmap-bucket bucket-id :offset-assert 8) + (tie-envmap-scissor-bucket bucket-id :offset-assert 12) + (tie-vanish-bucket bucket-id :offset-assert 16) + (tie-trans-bucket bucket-id :offset-assert 20) + (tie-scissor-trans-bucket bucket-id :offset-assert 24) + (tie-envmap-trans-bucket bucket-id :offset-assert 28) + (tie-envmap-scissor-trans-bucket bucket-id :offset-assert 32) + (tie-water-bucket bucket-id :offset-assert 36) + (tie-scissor-water-bucket bucket-id :offset-assert 40) + (tie-envmap-water-bucket bucket-id :offset-assert 44) + (tie-envmap-scissor-water-bucket bucket-id :offset-assert 48) + ) + :method-count-assert 9 + :size-assert #x34 + :flag-assert #x900000034 + ) + + + +(define *tie-init-table* (new 'static 'inline-array tie-init-data 6 + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l0-tfrag) + :tie-scissor-bucket (bucket-id tie-s-l0-tfrag) + :tie-envmap-bucket (bucket-id etie-l0-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-s-l0-tfrag) + :tie-vanish-bucket (bucket-id tie-v-l0-tfrag) + :tie-trans-bucket (bucket-id tie-t-l0-alpha) + :tie-scissor-trans-bucket (bucket-id tie-st-l0-alpha) + :tie-envmap-trans-bucket (bucket-id etie-t-l0-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-st-l0-alpha) + :tie-water-bucket (bucket-id tie-w-l0-water) + :tie-scissor-water-bucket (bucket-id tie-sw-l0-water) + :tie-envmap-water-bucket (bucket-id etie-w-l0-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-sw-l0-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l1-tfrag) + :tie-scissor-bucket (bucket-id tie-s-l1-tfrag) + :tie-envmap-bucket (bucket-id etie-l1-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-s-l1-tfrag) + :tie-vanish-bucket (bucket-id tie-v-l1-tfrag) + :tie-trans-bucket (bucket-id tie-t-l1-alpha) + :tie-scissor-trans-bucket (bucket-id tie-st-l1-alpha) + :tie-envmap-trans-bucket (bucket-id etie-t-l1-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-st-l1-alpha) + :tie-water-bucket (bucket-id tie-w-l1-water) + :tie-scissor-water-bucket (bucket-id tie-sw-l1-water) + :tie-envmap-water-bucket (bucket-id etie-w-l1-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-sw-l1-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l2-tfrag) + :tie-scissor-bucket (bucket-id tie-s-l2-tfrag) + :tie-envmap-bucket (bucket-id etie-l2-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-s-l2-tfrag) + :tie-vanish-bucket (bucket-id tie-v-l2-tfrag) + :tie-trans-bucket (bucket-id tie-t-l2-alpha) + :tie-scissor-trans-bucket (bucket-id tie-st-l2-alpha) + :tie-envmap-trans-bucket (bucket-id etie-t-l2-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-st-l2-alpha) + :tie-water-bucket (bucket-id tie-w-l2-water) + :tie-scissor-water-bucket (bucket-id tie-sw-l2-water) + :tie-envmap-water-bucket (bucket-id etie-w-l2-water) + :tie-envmap-scissor-water-bucket (bucket-id tie-esw-l2-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l3-tfrag) + :tie-scissor-bucket (bucket-id tie-s-l3-tfrag) + :tie-envmap-bucket (bucket-id etie-l3-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-s-l3-tfrag) + :tie-vanish-bucket (bucket-id tie-v-l3-tfrag) + :tie-trans-bucket (bucket-id tie-t-l3-alpha) + :tie-scissor-trans-bucket (bucket-id tie-st-l3-alpha) + :tie-envmap-trans-bucket (bucket-id etie-t-l3-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-st-l3-alpha) + :tie-water-bucket (bucket-id tie-w-l3-water) + :tie-scissor-water-bucket (bucket-id tie-sw-l3-water) + :tie-envmap-water-bucket (bucket-id etie-w-l3-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-sw-l3-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l4-tfrag) + :tie-scissor-bucket (bucket-id tie-s-l4-tfrag) + :tie-envmap-bucket (bucket-id etie-l4-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-s-l4-tfrag) + :tie-vanish-bucket (bucket-id tie-v-l4-tfrag) + :tie-trans-bucket (bucket-id tie-t-l4-alpha) + :tie-scissor-trans-bucket (bucket-id tie-st-l4-alpha) + :tie-envmap-trans-bucket (bucket-id etie-t-l4-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-st-l4-alpha) + :tie-water-bucket (bucket-id tie-w-l4-water) + :tie-scissor-water-bucket (bucket-id tie-sw-l4-water) + :tie-envmap-water-bucket (bucket-id etie-w-l4-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-sw-l4-water) + ) + (new 'static 'tie-init-data + :tie-bucket (bucket-id tie-l5-tfrag) + :tie-scissor-bucket (bucket-id tie-s-l5-tfrag) + :tie-envmap-bucket (bucket-id etie-l5-tfrag) + :tie-envmap-scissor-bucket (bucket-id etie-s-l5-tfrag) + :tie-vanish-bucket (bucket-id tie-v-l5-tfrag) + :tie-trans-bucket (bucket-id tie-t-l5-alpha) + :tie-scissor-trans-bucket (bucket-id tie-st-l5-alpha) + :tie-envmap-trans-bucket (bucket-id etie-t-l5-alpha) + :tie-envmap-scissor-trans-bucket (bucket-id etie-st-l5-alpha) + :tie-water-bucket (bucket-id tie-w-l5-water) + :tie-scissor-water-bucket (bucket-id tie-sw-l5-water) + :tie-envmap-water-bucket (bucket-id etie-w-l5-water) + :tie-envmap-scissor-water-bucket (bucket-id etie-sw-l5-water) + ) + ) + ) + +(defun tie-vu1-init-buffers () + (let ((gp-0 0) + (s5-0 100) + (s4-0 68) + ) + (dotimes (s3-0 6) + (let ((v1-2 (-> *level* draw-level s3-0)) + (s2-0 (-> *tie-init-table* s3-0)) + ) + (when v1-2 + (tie-init-buf + (-> s2-0 tie-bucket) + (the-as gs-alpha gp-0) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (let ((t9-1 tie-init-scissor-buf) + (a0-3 (-> s2-0 tie-scissor-bucket)) + (a1-2 0) + (a2-1 #x5026b) + (a3-1 #x50000) + ) + (t9-1 a0-3 (the-as gs-alpha a1-2) (the-as gs-test a2-1) (the-as gs-test a3-1)) + (tie-init-envmap-buf (-> s2-0 tie-envmap-bucket) (the-as gs-alpha gp-0) #x50000 a3-1) + (tie-init-envmap-scissor-buf (-> s2-0 tie-envmap-scissor-bucket) (the-as gs-alpha gp-0) #x50000 a3-1) + ) + (tie-init-buf + (-> s2-0 tie-vanish-bucket) + (the-as gs-alpha s5-0) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (tie-init-buf + (-> s2-0 tie-trans-bucket) + (the-as gs-alpha s4-0) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (let ((t9-6 tie-init-scissor-buf) + (a0-8 (-> s2-0 tie-scissor-trans-bucket)) + (a1-7 1) + (a2-6 #x5026b) + (a3-4 #x50000) + ) + (t9-6 a0-8 (the-as gs-alpha a1-7) (the-as gs-test a2-6) (the-as gs-test a3-4)) + (tie-init-envmap-buf (-> s2-0 tie-envmap-trans-bucket) (the-as gs-alpha s4-0) #x50000 a3-4) + (tie-init-envmap-scissor-buf (-> s2-0 tie-envmap-scissor-trans-bucket) (the-as gs-alpha s4-0) #x50000 a3-4) + ) + (tie-init-buf + (-> s2-0 tie-water-bucket) + (the-as gs-alpha s4-0) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + ) + (let ((t9-10 tie-init-scissor-buf) + (a0-12 (-> s2-0 tie-scissor-water-bucket)) + (a1-11 1) + (a2-10 #x51001) + (a3-6 #x51001) + ) + (t9-10 a0-12 (the-as gs-alpha a1-11) (the-as gs-test a2-10) (the-as gs-test a3-6)) + (tie-init-envmap-buf (-> s2-0 tie-envmap-water-bucket) (the-as gs-alpha s4-0) #x51001 a3-6) + (tie-init-envmap-scissor-buf (-> s2-0 tie-envmap-scissor-water-bucket) (the-as gs-alpha s4-0) #x51001 a3-6) + ) + ) + ) + ) + ) + (none) + ) + +(defmethod draw drawable-tree-instance-tie ((obj drawable-tree-instance-tie) (arg0 drawable-tree-instance-tie) (arg1 display-frame)) + (let ((v1-1 (-> *background-work* tie-tree-count)) + (a1-4 (-> *level* draw-level *draw-index*)) + ) + (set! (-> *background-work* tie-trees v1-1) obj) + (set! (-> *background-work* tie-levels v1-1) a1-4) + ) + (+! (-> *background-work* tie-tree-count) 1) + 0 + (none) + ) + +(defmethod collect-stats drawable-tree-instance-tie ((obj drawable-tree-instance-tie)) + (when (logtest? (vu1-renderer-mask + tie + tie-envmap + tie-scissor + tie-vanish + generic + tie-scissor-trans + tie-trans + tie-envmap-trans + tie-scissor-water + tie-water + tie-envmap-water + ) + (-> *display* vu1-enable-user) + ) + (-> obj data (+ (-> obj length) -1)) + (let ((v1-9 (-> obj prototypes prototype-array-tie))) + (dotimes (a0-1 (-> v1-9 length)) + (let ((a1-4 (-> v1-9 array-data a0-1))) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask generic)) + (let ((a2-4 0) + (a3-0 2) + ) + (while (>= a3-0 a2-4) + (let ((t0-2 (-> a1-4 generic-count a2-4)) + (t2-0 (-> a1-4 tie-geom (+ a2-4 1))) + ) + (when (nonzero? t0-2) + (let ((t1-4 (the-as object (-> t2-0 data))) + (t2-1 (-> t2-0 length)) + ) + (+! (-> *terrain-stats* tie-generic groups) 1) + (+! (-> *terrain-stats* tie-generic fragments) t2-1) + (+! (-> *terrain-stats* tie-generic instances) t0-2) + (dotimes (t3-9 t2-1) + (let ((t5-0 (* (-> (the-as tie-fragment t1-4) debug num-tris) t0-2)) + (t4-7 (* (-> (the-as tie-fragment t1-4) debug num-dverts) t0-2)) + ) + (+! (-> *terrain-stats* tie-generic tris) t5-0) + (+! (-> *terrain-stats* tie-generic dverts) t4-7) + ) + (set! t1-4 (&+ (the-as tie-fragment t1-4) 64)) + ) + ) + ) + ) + (+! a2-4 1) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-vanish)) + (let ((a2-11 (-> a1-4 vanish-count)) + (t0-4 (-> a1-4 tie-geom 3)) + ) + (when (nonzero? a2-11) + (let ((a3-2 (the-as object (-> t0-4 data))) + (t0-5 (-> t0-4 length)) + ) + (+! (-> *terrain-stats* tie-vanish groups) 1) + (+! (-> *terrain-stats* tie-vanish fragments) t0-5) + (+! (-> *terrain-stats* tie-vanish instances) (the-as uint a2-11)) + (dotimes (t1-15 t0-5) + (let ((t3-10 (* (-> (the-as tie-fragment a3-2) debug num-tris) (the-as uint a2-11))) + (t2-9 (* (-> (the-as tie-fragment a3-2) debug num-dverts) (the-as uint a2-11))) + ) + (+! (-> *terrain-stats* tie-vanish tris) t3-10) + (+! (-> *terrain-stats* tie-vanish dverts) t2-9) + ) + (set! a3-2 (&+ (the-as tie-fragment a3-2) 64)) + ) + ) + ) + ) + ) + (cond + ((logtest? (-> a1-4 flags) (prototype-flags tpage-water)) + (when (logtest? (vu1-renderer-mask tie-water) (-> *display* vu1-enable-user)) + (let ((a2-18 1) + (a3-6 3) + ) + (while (>= a3-6 a2-18) + (let ((t0-8 (-> a1-4 count a2-18)) + (t2-11 (-> a1-4 tie-geom a2-18)) + ) + (when (nonzero? t0-8) + (let ((t1-19 (the-as object (-> t2-11 data))) + (t2-12 (-> t2-11 length)) + ) + (+! (-> *terrain-stats* tie-water groups) 1) + (+! (-> *terrain-stats* tie-water fragments) t2-12) + (+! (-> *terrain-stats* tie-water instances) (the-as uint t0-8)) + (dotimes (t3-24 t2-12) + (let ((t5-5 (* (-> (the-as tie-fragment t1-19) debug num-tris) (the-as uint t0-8))) + (t4-19 (* (-> (the-as tie-fragment t1-19) debug num-dverts) (the-as uint t0-8))) + ) + (+! (-> *terrain-stats* tie-water tris) t5-5) + (+! (-> *terrain-stats* tie-water dverts) t4-19) + ) + (set! t1-19 (&+ (the-as tie-fragment t1-19) 64)) + ) + ) + ) + ) + (+! a2-18 1) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie)) + (let ((a2-25 (-> a1-4 tie-scissor-count)) + (t0-10 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-25) + (let ((a3-8 (the-as object (-> t0-10 data))) + (t0-11 (-> t0-10 length)) + ) + (+! (-> *terrain-stats* tie-scissor-water groups) 1) + (+! (-> *terrain-stats* tie-scissor-water fragments) t0-11) + (+! (-> *terrain-stats* tie-scissor-water instances) (the-as uint a2-25)) + (dotimes (t1-30 t0-11) + (let ((t3-25 (* (-> (the-as tie-fragment a3-8) debug num-tris) (the-as uint a2-25))) + (t2-20 (* (-> (the-as tie-fragment a3-8) debug num-dverts) (the-as uint a2-25))) + ) + (+! (-> *terrain-stats* tie-scissor-water tris) t3-25) + (+! (-> *terrain-stats* tie-scissor-water dverts) t2-20) + ) + (set! a3-8 (&+ (the-as tie-fragment a3-8) 64)) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask tie-envmap-water) (-> *display* vu1-enable-user)) + (let ((a2-30 1) + (a3-12 3) + ) + (while (>= a3-12 a2-30) + (let ((t0-14 (-> a1-4 envmap-count a2-30)) + (t2-22 (-> a1-4 tie-geom a2-30)) + ) + (when (nonzero? t0-14) + (let ((t1-34 (the-as object (-> t2-22 data))) + (t2-23 (-> t2-22 length)) + ) + (+! (-> *terrain-stats* tie-envmap-water groups) 1) + (+! (-> *terrain-stats* tie-envmap-water fragments) t2-23) + (+! (-> *terrain-stats* tie-envmap-water instances) t0-14) + (dotimes (t3-39 t2-23) + (let ((t5-10 (* (* t0-14 (-> (the-as tie-fragment t1-34) debug num-tris)) 2)) + (t4-33 (* (* t0-14 (-> (the-as tie-fragment t1-34) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap-water tris) t5-10) + (+! (-> *terrain-stats* tie-envmap-water dverts) t4-33) + ) + (set! t1-34 (&+ (the-as tie-fragment t1-34) 64)) + ) + ) + ) + ) + (+! a2-30 1) + ) + ) + ) + (when (logtest? (vu1-renderer-mask tie-envmap-scissor-water) (-> *display* vu1-enable-user)) + (let ((a2-35 (-> a1-4 envmap-scissor-count)) + (t0-16 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-35) + (let ((a1-5 (the-as object (-> t0-16 data))) + (a3-17 (-> t0-16 length)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor-water groups) 1) + (+! (-> *terrain-stats* tie-envmap-scissor-water fragments) a3-17) + (+! (-> *terrain-stats* tie-envmap-scissor-water instances) (the-as uint a2-35)) + (dotimes (t0-26 a3-17) + (let ((t2-24 (* (* (the-as uint a2-35) (-> (the-as tie-fragment a1-5) debug num-tris)) 2)) + (t1-45 (* (* (the-as uint a2-35) (-> (the-as tie-fragment a1-5) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor-water tris) t2-24) + (+! (-> *terrain-stats* tie-envmap-scissor-water dverts) t1-45) + ) + (set! a1-5 (&+ (the-as tie-fragment a1-5) 64)) + ) + ) + ) + ) + ) + ) + ((logtest? (-> a1-4 flags) (prototype-flags tpage-alpha)) + (when (logtest? (vu1-renderer-mask tie-trans) (-> *display* vu1-enable-user)) + (let ((a2-41 1) + (a3-21 3) + ) + (while (>= a3-21 a2-41) + (let ((t0-29 (-> a1-4 count a2-41)) + (t2-29 (-> a1-4 tie-geom a2-41)) + ) + (when (nonzero? t0-29) + (let ((t1-50 (the-as object (-> t2-29 data))) + (t2-30 (-> t2-29 length)) + ) + (+! (-> *terrain-stats* tie-trans groups) 1) + (+! (-> *terrain-stats* tie-trans fragments) t2-30) + (+! (-> *terrain-stats* tie-trans instances) (the-as uint t0-29)) + (dotimes (t3-52 t2-30) + (let ((t5-15 (* (-> (the-as tie-fragment t1-50) debug num-tris) (the-as uint t0-29))) + (t4-42 (* (-> (the-as tie-fragment t1-50) debug num-dverts) (the-as uint t0-29))) + ) + (+! (-> *terrain-stats* tie-trans tris) t5-15) + (+! (-> *terrain-stats* tie-trans dverts) t4-42) + ) + (set! t1-50 (&+ (the-as tie-fragment t1-50) 64)) + ) + ) + ) + ) + (+! a2-41 1) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie)) + (let ((a2-48 (-> a1-4 tie-scissor-count)) + (t0-31 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-48) + (let ((a3-23 (the-as object (-> t0-31 data))) + (t0-32 (-> t0-31 length)) + ) + (+! (-> *terrain-stats* tie-scissor-trans groups) 1) + (+! (-> *terrain-stats* tie-scissor-trans fragments) t0-32) + (+! (-> *terrain-stats* tie-scissor-trans instances) (the-as uint a2-48)) + (dotimes (t1-61 t0-32) + (let ((t3-53 (* (-> (the-as tie-fragment a3-23) debug num-tris) (the-as uint a2-48))) + (t2-38 (* (-> (the-as tie-fragment a3-23) debug num-dverts) (the-as uint a2-48))) + ) + (+! (-> *terrain-stats* tie-scissor-trans tris) t3-53) + (+! (-> *terrain-stats* tie-scissor-trans dverts) t2-38) + ) + (set! a3-23 (&+ (the-as tie-fragment a3-23) 64)) + ) + ) + ) + ) + ) + (when (logtest? (vu1-renderer-mask tie-envmap-trans) (-> *display* vu1-enable-user)) + (let ((a2-53 1) + (a3-27 3) + ) + (while (>= a3-27 a2-53) + (let ((t0-35 (-> a1-4 envmap-count a2-53)) + (t2-40 (-> a1-4 tie-geom a2-53)) + ) + (when (nonzero? t0-35) + (let ((t1-65 (the-as object (-> t2-40 data))) + (t2-41 (-> t2-40 length)) + ) + (+! (-> *terrain-stats* tie-envmap-trans groups) 1) + (+! (-> *terrain-stats* tie-envmap-trans fragments) t2-41) + (+! (-> *terrain-stats* tie-envmap-trans instances) t0-35) + (dotimes (t3-67 t2-41) + (let ((t5-20 (* (* t0-35 (-> (the-as tie-fragment t1-65) debug num-tris)) 2)) + (t4-56 (* (* t0-35 (-> (the-as tie-fragment t1-65) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap-trans tris) t5-20) + (+! (-> *terrain-stats* tie-envmap-trans dverts) t4-56) + ) + (set! t1-65 (&+ (the-as tie-fragment t1-65) 64)) + ) + ) + ) + ) + (+! a2-53 1) + ) + ) + ) + (when (logtest? (vu1-renderer-mask tie-envmap-scissor-trans) (-> *display* vu1-enable-user)) + (let ((a2-58 (-> a1-4 envmap-scissor-count)) + (t0-37 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-58) + (let ((a1-7 (the-as object (-> t0-37 data))) + (a3-32 (-> t0-37 length)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor-trans groups) 1) + (+! (-> *terrain-stats* tie-envmap-scissor-trans fragments) a3-32) + (+! (-> *terrain-stats* tie-envmap-scissor-trans instances) (the-as uint a2-58)) + (dotimes (t0-47 a3-32) + (let ((t2-42 (* (* (the-as uint a2-58) (-> (the-as tie-fragment a1-7) debug num-tris)) 2)) + (t1-76 (* (* (the-as uint a2-58) (-> (the-as tie-fragment a1-7) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor-trans tris) t2-42) + (+! (-> *terrain-stats* tie-envmap-scissor-trans dverts) t1-76) + ) + (set! a1-7 (&+ (the-as tie-fragment a1-7) 64)) + ) + ) + ) + ) + ) + ) + (else + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-envmap)) + (let ((a2-63 1) + (a3-34 3) + ) + (while (>= a3-34 a2-63) + (let ((t0-50 (-> a1-4 count a2-63)) + (t2-47 (-> a1-4 tie-geom a2-63)) + ) + (when (nonzero? t0-50) + (let ((t1-81 (the-as object (-> t2-47 data))) + (t2-48 (-> t2-47 length)) + ) + (+! (-> *terrain-stats* tie groups) 1) + (+! (-> *terrain-stats* tie fragments) t2-48) + (+! (-> *terrain-stats* tie instances) (the-as uint t0-50)) + (dotimes (t3-80 t2-48) + (let ((t5-25 (* (-> (the-as tie-fragment t1-81) debug num-tris) (the-as uint t0-50))) + (t4-65 (* (-> (the-as tie-fragment t1-81) debug num-dverts) (the-as uint t0-50))) + ) + (+! (-> *terrain-stats* tie tris) t5-25) + (+! (-> *terrain-stats* tie dverts) t4-65) + ) + (set! t1-81 (&+ (the-as tie-fragment t1-81) 64)) + ) + ) + ) + ) + (+! a2-63 1) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie)) + (let ((a2-70 (-> a1-4 tie-scissor-count)) + (t0-52 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-70) + (let ((a3-36 (the-as object (-> t0-52 data))) + (t0-53 (-> t0-52 length)) + ) + (+! (-> *terrain-stats* tie-scissor groups) 1) + (+! (-> *terrain-stats* tie-scissor fragments) t0-53) + (+! (-> *terrain-stats* tie-scissor instances) (the-as uint a2-70)) + (dotimes (t1-92 t0-53) + (let ((t3-81 (* (-> (the-as tie-fragment a3-36) debug num-tris) (the-as uint a2-70))) + (t2-56 (* (-> (the-as tie-fragment a3-36) debug num-dverts) (the-as uint a2-70))) + ) + (+! (-> *terrain-stats* tie-scissor tris) t3-81) + (+! (-> *terrain-stats* tie-scissor dverts) t2-56) + ) + (set! a3-36 (&+ (the-as tie-fragment a3-36) 64)) + ) + ) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-scissor)) + (let ((a2-76 1) + (a3-38 3) + ) + (while (>= a3-38 a2-76) + (let ((t0-56 (-> a1-4 envmap-count a2-76)) + (t2-58 (-> a1-4 tie-geom a2-76)) + ) + (when (nonzero? t0-56) + (let ((t1-96 (the-as object (-> t2-58 data))) + (t2-59 (-> t2-58 length)) + ) + (+! (-> *terrain-stats* tie-envmap groups) 1) + (+! (-> *terrain-stats* tie-envmap fragments) t2-59) + (+! (-> *terrain-stats* tie-envmap instances) t0-56) + (dotimes (t3-95 t2-59) + (let ((t5-30 (* (* t0-56 (-> (the-as tie-fragment t1-96) debug num-tris)) 2)) + (t4-79 (* (* t0-56 (-> (the-as tie-fragment t1-96) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap tris) t5-30) + (+! (-> *terrain-stats* tie-envmap dverts) t4-79) + ) + (set! t1-96 (&+ (the-as tie-fragment t1-96) 64)) + ) + ) + ) + ) + (+! a2-76 1) + ) + ) + ) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tie-envmap-scissor)) + (let ((a2-82 (-> a1-4 envmap-scissor-count)) + (t0-58 (-> a1-4 tie-geom 0)) + ) + (when (nonzero? a2-82) + (let ((a1-9 (the-as object (-> t0-58 data))) + (a3-41 (-> t0-58 length)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor groups) 1) + (+! (-> *terrain-stats* tie-envmap-scissor fragments) a3-41) + (+! (-> *terrain-stats* tie-envmap-scissor instances) (the-as uint a2-82)) + (dotimes (t0-68 a3-41) + (let ((t2-60 (* (* (the-as uint a2-82) (-> (the-as tie-fragment a1-9) debug num-tris)) 2)) + (t1-107 (* (* (the-as uint a2-82) (-> (the-as tie-fragment a1-9) debug num-dverts)) 2)) + ) + (+! (-> *terrain-stats* tie-envmap-scissor tris) t2-60) + (+! (-> *terrain-stats* tie-envmap-scissor dverts) t1-107) + ) + (set! a1-9 (&+ (the-as tie-fragment a1-9) 64)) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + 0 + (none) + ) + +(defmethod debug-draw drawable-tree-instance-tie ((obj drawable-tree-instance-tie) (arg0 drawable) (arg1 display-frame)) + (-> obj data (+ (-> obj length) -1)) + (let* ((s5-0 (-> obj prototypes prototype-array-tie)) + (s4-0 (-> s5-0 length)) + ) + (dotimes (s3-0 s4-0) + (let ((a1-1 (-> s5-0 array-data s3-0 tie-geom 0))) + (debug-draw a1-1 a1-1 arg1) + ) + ) + ) + 0 + (none) + ) + + + + diff --git a/goal_src/jak2/engine/gfx/tie/tie-near.gc b/goal_src/jak2/engine/gfx/tie/tie-near.gc index 4b76d135b3..370bad2d2d 100644 --- a/goal_src/jak2/engine/gfx/tie/tie-near.gc +++ b/goal_src/jak2/engine/gfx/tie/tie-near.gc @@ -7,3 +7,7 @@ ;; DECOMP BEGINS +(defun tie-scissor-make-perspective-matrix ((arg0 matrix) (arg1 matrix)) + (column-scale-matrix! arg0 (-> *math-camera* hmge-scale) arg1) + (none) + ) \ No newline at end of file diff --git a/goal_src/jak2/engine/gfx/tie/tie.gc b/goal_src/jak2/engine/gfx/tie/tie.gc index 2261014725..48c420c011 100644 --- a/goal_src/jak2/engine/gfx/tie/tie.gc +++ b/goal_src/jak2/engine/gfx/tie/tie.gc @@ -7,3 +7,655 @@ ;; DECOMP BEGINS +(defmethod login tie-fragment ((obj tie-fragment)) + (let ((s5-0 (the-as adgif-shader (-> obj gif-ref))) + (s4-0 (/ (-> obj tex-count) (the-as uint 5))) + ) + (dotimes (s3-0 (the-as int s4-0)) + (let ((v1-1 (adgif-shader-login-no-remap s5-0))) + (when v1-1 + (dotimes (a0-4 3) + (dotimes (a1-0 3) + (set! (-> (the-as (pointer int32) (+ (+ (* a0-4 16) (* a1-0 4)) (the-as int *texture-masks*)))) + (logior (-> (the-as (pointer int32) (+ (* a1-0 4) (the-as int *texture-masks*) (* a0-4 16))) 0) + (-> (the-as (pointer int32) (+ (* a1-0 4) (the-as int v1-1) (* a0-4 16))) 15) + ) + ) + ) + (set! (-> *texture-masks* data a0-4 dist) + (fmax (-> *texture-masks* data a0-4 dist) (-> v1-1 masks data a0-4 dist)) + ) + ) + ) + ) + (when (= (-> s5-0 reg-4) 66) + (set! (-> s5-0 reg-4) (the-as uint 127)) + (set! (-> s5-0 alpha) (new 'static 'gs-alpha)) + 0 + ) + (&+! s5-0 80) + ) + ) + obj + ) + +(defmethod inspect drawable-inline-array-instance-tie ((obj drawable-inline-array-instance-tie)) + (format #t "[~8x] ~A~%" obj (-> obj type)) + (format #t "~Tlength: ~D~%" (-> obj length)) + (format #t "~Tdata[~D]: @ #x~X~%" (-> obj length) (-> obj data)) + (dotimes (s5-0 (-> obj length)) + (format #t "~T [~D] ~A~%" s5-0 (-> obj data s5-0)) + ) + obj + ) + +(defmethod asize-of drawable-inline-array-instance-tie ((obj drawable-inline-array-instance-tie)) + (the-as int (+ (-> drawable-inline-array-instance-tie size) (* (+ (-> obj length) -1) 64))) + ) + +; (defmethod login drawable-tree-instance-tie ((obj drawable-tree-instance-tie)) +; obj +; ) + +(defmethod login drawable-tree-instance-tie ((obj drawable-tree-instance-tie)) + (dotimes (s5-0 (-> obj length)) + (login (-> obj data s5-0)) + ) + obj + ) + +(defmethod inspect prototype-tie ((obj prototype-tie)) + (format #t "[~8x] ~A~%" obj (-> obj type)) + (format #t "~Tlength: ~D~%" (-> obj length)) + (format #t "~Tdata[~D]: @ #x~X~%" (-> obj length) (-> obj data)) + (dotimes (s5-0 (-> obj length)) + (format #t "~T [~D] ~A~%" s5-0 (-> obj data s5-0)) + ) + obj + ) + +(defmethod login prototype-tie ((obj prototype-tie)) + (dotimes (s5-0 (-> obj length)) + (login (-> obj data s5-0)) + ) + obj + ) + +(defmethod mem-usage drawable-tree-instance-tie ((obj drawable-tree-instance-tie) (arg0 memory-usage-block) (arg1 int)) + (set! (-> arg0 length) (max 1 (-> arg0 length))) + (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) + (+! (-> arg0 data 0 count) 1) + (let ((v1-7 32)) + (+! (-> arg0 data 0 used) v1-7) + (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + ) + (dotimes (s3-0 (-> obj length)) + (mem-usage (-> obj data s3-0) arg0 arg1) + ) + (mem-usage (-> obj prototypes prototype-array-tie) arg0 (logior arg1 1)) + obj + ) + +(defmethod mem-usage tie-fragment ((obj tie-fragment) (arg0 memory-usage-block) (arg1 int)) + (when (logtest? arg1 2) + (let ((v1-3 (* (-> obj color-count) 4)) + (a0-2 (cond + ((logtest? arg1 4) + 20 + ) + ((logtest? arg1 8) + 21 + ) + (else + 22 + ) + ) + ) + ) + (+! (-> arg0 data a0-2 count) 1) + (+! (-> arg0 data a0-2 used) v1-3) + (+! (-> arg0 data a0-2 total) (logand -4 (+ v1-3 3))) + ) + (set! (-> arg0 length) (max 23 (-> arg0 length))) + (set! obj obj) + (goto cfg-13) + ) + (set! (-> arg0 length) (max 18 (-> arg0 length))) + (set! (-> arg0 data 9 name) "tie-fragment") + (set! (-> arg0 data 10 name) "tie-gif") + (set! (-> arg0 data 11 name) "tie-points") + (set! (-> arg0 data 12 name) "tie-colors") + (set! (-> arg0 data 14 name) "tie-debug") + (set! (-> arg0 data 13 name) "tie-draw-points") + (set! (-> arg0 data 17 name) "tie-generic") + (+! (-> arg0 data 9 count) 1) + (let ((v1-21 (asize-of obj))) + (+! (-> arg0 data 9 used) v1-21) + (+! (-> arg0 data 9 total) (logand -16 (+ v1-21 15))) + ) + (let ((v1-26 (* (-> obj gif-count) 16))) + (+! (-> arg0 data 10 count) (-> obj tex-count)) + (+! (-> arg0 data 10 used) v1-26) + (+! (-> arg0 data 10 total) (logand -16 (+ v1-26 15))) + ) + (let ((v1-31 (* (-> obj vertex-count) 16))) + (+! (-> arg0 data 11 count) (-> obj vertex-count)) + (+! (-> arg0 data 11 used) v1-31) + (+! (-> arg0 data 11 total) (logand -16 (+ v1-31 15))) + ) + (let ((v1-36 (* (-> obj dp-qwc) 16))) + (+! (-> arg0 data 13 count) (* (-> obj dp-qwc) 16)) + (+! (-> arg0 data 13 used) v1-36) + (+! (-> arg0 data 13 total) (logand -16 (+ v1-36 15))) + ) + (let ((v1-41 (* (-> obj generic-count) 16))) + (+! (-> arg0 data 17 count) 1) + (+! (-> arg0 data 17 used) v1-41) + (+! (-> arg0 data 17 total) (logand -16 (+ v1-41 15))) + ) + (let ((s4-0 (-> obj debug debug-lines))) + (when (nonzero? s4-0) + (dotimes (s3-0 (-> s4-0 length)) + (+! (-> arg0 data 14 count) (-> s4-0 s3-0 length)) + (let ((v1-52 (asize-of (-> s4-0 s3-0)))) + (+! (-> arg0 data 12 used) v1-52) + (+! (-> arg0 data 12 total) (logand -16 (+ v1-52 15))) + ) + ) + ) + ) + (label cfg-13) + obj + ) + +(defmethod mem-usage instance-tie ((obj instance-tie) (arg0 memory-usage-block) (arg1 int)) + (set! (-> arg0 length) (max 19 (-> arg0 length))) + (set! (-> arg0 data 18 name) "instance-tie") + (+! (-> arg0 data 18 count) 1) + (let ((v1-6 (asize-of obj))) + (+! (-> arg0 data 18 used) v1-6) + (+! (-> arg0 data 18 total) (logand -16 (+ v1-6 15))) + ) + (when (nonzero? (-> obj color-indices)) + (set! (-> arg0 length) (max 24 (-> arg0 length))) + (set! (-> arg0 data 23 name) "instance-tie-colors*") + (set! (-> arg0 data 19 name) "instance-tie-colors0") + (set! (-> arg0 data 20 name) "instance-tie-colors1") + (set! (-> arg0 data 21 name) "instance-tie-colors2") + (set! (-> arg0 data 22 name) "instance-tie-colors3") + (+! (-> arg0 data 23 count) 1) + (let ((s3-0 (-> obj bucket-ptr))) + (+ (-> arg0 data 19 used) (-> arg0 data 20 used) (-> arg0 data 21 used) (-> arg0 data 22 used)) + (dotimes (s2-0 4) + (let ((a0-10 (-> s3-0 tie-geom s2-0))) + (when (nonzero? a0-10) + (let ((t9-1 (method-of-object a0-10 mem-usage)) + (a1-2 arg0) + (v1-29 s2-0) + ) + (t9-1 a0-10 a1-2 (logior (logior (cond + ((= v1-29 1) + 4 + ) + ((= v1-29 2) + 8 + ) + ((= v1-29 3) + 16 + ) + (else + 0 + ) + ) + 2 + ) + arg1 + ) + ) + ) + ) + ) + ) + ) + ) + obj + ) + +(defmethod mem-usage drawable-inline-array-instance-tie ((obj drawable-inline-array-instance-tie) (arg0 memory-usage-block) (arg1 int)) + (set! (-> arg0 length) (max 1 (-> arg0 length))) + (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) + (+! (-> arg0 data 0 count) 1) + (let ((v1-7 32)) + (+! (-> arg0 data 0 used) v1-7) + (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + ) + (dotimes (s3-0 (-> obj length)) + (mem-usage (-> obj data s3-0) arg0 arg1) + ) + obj + ) + +(defmethod mem-usage prototype-tie ((obj prototype-tie) (arg0 memory-usage-block) (arg1 int)) + (set! (-> arg0 length) (max 1 (-> arg0 length))) + (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) + (+! (-> arg0 data 0 count) 1) + (let ((v1-7 32)) + (+! (-> arg0 data 0 used) v1-7) + (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + ) + (dotimes (s3-0 (-> obj length)) + (mem-usage (-> obj data s3-0) arg0 arg1) + ) + obj + ) + +(defmethod asize-of prototype-tie ((obj prototype-tie)) + (the-as int (+ (-> prototype-tie size) (* (+ (-> obj length) -1) 64))) + ) + +(deftype tie-consts (structure) + ((data uint32 40 :offset 0) + (vector vector 10 :offset 0) + (quads uint128 10 :offset 0) + (adgif gs-gif-tag :inline :offset 0) + (strgif gs-gif-tag :inline :offset 16) + (extra vector :inline :offset 32) + (gifbufs vector :inline :offset 48) + (clrbufs qword :inline :offset 64) + (misc qword :inline :offset 80) + (atestgif gs-gif-tag :inline :offset 96) + (alpha gs-adcmd :inline :offset 112) + (atest gs-adcmd 2 :inline :offset 128) + (atest-tra gs-adcmd :inline :offset 128) + (atest-def gs-adcmd :inline :offset 144) + ) + :method-count-assert 9 + :size-assert #xa0 + :flag-assert #x9000000a0 + ) + +(define tie-vu1-block (new 'static 'vu-function :length 0 :qlength 0)) + +(defun tie-init-consts ((arg0 tie-consts) (arg1 gs-alpha) (arg2 gs-test) (arg3 gs-test)) + (set! (-> arg0 adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (case *subdivide-draw-mode* + (((subdivide-setting textured)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting outline)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting gouraud)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting hack)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ) + (set! (-> arg0 strgif regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (let ((f0-0 8388894.0) + (f1-0 8389078.0) + (f2-0 8389262.0) + ) + (set! (-> arg0 gifbufs x) f2-0) + (set! (-> arg0 gifbufs y) f1-0) + (set! (-> arg0 gifbufs z) f2-0) + (set! (-> arg0 gifbufs w) f1-0) + (set! (-> arg0 extra x) (+ f0-0 f1-0 f2-0)) + (set! (-> arg0 extra y) 0.0) + (set! (-> arg0 extra z) (+ f0-0 f1-0 f2-0)) + ) + (set! (-> arg0 clrbufs vector4w x) 198) + (set! (-> arg0 clrbufs vector4w y) 242) + (set! (-> arg0 clrbufs vector4w z) 198) + (set! (-> arg0 clrbufs vector4w w) 242) + (set! (-> arg0 atestgif tag) (new 'static 'gif-tag64 :nloop #x2 :eop #x1 :nreg #x1)) + (set! (-> arg0 atestgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (set! (-> arg0 alpha data) (the-as uint arg1)) + (set! (-> arg0 alpha cmds) (gs-reg64 alpha-1)) + (set! (-> arg0 atest-tra cmds) (gs-reg64 test-1)) + (set! (-> arg0 atest-tra data) (the-as uint arg2)) + (set! (-> arg0 atest-def cmds) (gs-reg64 test-1)) + (set! (-> arg0 atest-def data) (the-as uint arg3)) + (set! (-> arg0 misc vector4w x) 0) + (set! (-> arg0 misc vector4w y) -1) + (none) + ) + +(defun tie-init-engine ((arg0 dma-buffer) (arg1 gs-alpha) (arg2 gs-test) (arg3 gs-test)) + (dma-buffer-add-vu-function arg0 tie-vu1-block 1) + (let ((s5-0 10)) + (let* ((v1-0 arg0) + (a0-2 (the-as dma-packet (-> v1-0 base))) + ) + (set! (-> a0-2 dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc s5-0)) + (set! (-> a0-2 vif0) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> a0-2 vif1) (new 'static 'vif-tag :imm #x3c6 :cmd (vif-cmd unpack-v4-32) :num s5-0)) + (set! (-> v1-0 base) (the-as pointer (&+ a0-2 16))) + ) + (tie-init-consts (the-as tie-consts (-> arg0 base)) arg1 arg2 arg3) + (&+! (-> arg0 base) (* s5-0 16)) + ) + (let* ((v1-3 arg0) + (a0-6 (the-as dma-packet (-> v1-3 base))) + ) + (set! (-> a0-6 dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> a0-6 vif0) (new 'static 'vif-tag :imm #x8 :cmd (vif-cmd mscalf) :msk #x1)) + (set! (-> a0-6 vif1) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> v1-3 base) (the-as pointer (&+ a0-6 16))) + ) + (let* ((v1-4 arg0) + (a0-8 (the-as dma-packet (-> v1-4 base))) + ) + (set! (-> a0-8 dma) (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))) + (set! (-> a0-8 vif0) (new 'static 'vif-tag)) + (set! (-> a0-8 vif1) (new 'static 'vif-tag :cmd (vif-cmd strow) :msk #x1)) + (set! (-> v1-4 base) (the-as pointer (&+ a0-8 16))) + ) + (let ((v1-5 (the-as object (-> arg0 base)))) + (set! (-> (the-as vector v1-5) x) 8388608.0) + (set! (-> (the-as vector v1-5) y) 8388608.0) + (set! (-> (the-as vector v1-5) z) 8388608.0) + (set! (-> (the-as vector v1-5) w) 8388608.0) + (set! (-> (the-as (pointer vif-tag) v1-5) 4) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> (the-as (pointer vif-tag) v1-5) 5) (new 'static 'vif-tag :imm #x2c :cmd (vif-cmd offset))) + (set! (-> (the-as (pointer vif-tag) v1-5) 6) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> (the-as (pointer vif-tag) v1-5) 7) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> arg0 base) (&+ (the-as pointer v1-5) 32)) + ) + 0 + (none) + ) + +(defun tie-end-buffer ((arg0 dma-buffer)) + (let* ((v1-0 arg0) + (a1-0 (the-as dma-packet (-> v1-0 base))) + ) + (set! (-> a1-0 dma) (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))) + (set! (-> a1-0 vif0) (new 'static 'vif-tag)) + (set! (-> a1-0 vif1) (new 'static 'vif-tag :imm #x2 :cmd (vif-cmd direct) :msk #x1)) + (set! (-> v1-0 base) (the-as pointer (&+ a1-0 16))) + ) + (let* ((v1-1 arg0) + (a1-2 (the-as gs-gif-tag (-> v1-1 base))) + ) + (set! (-> a1-2 tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x1)) + (set! (-> a1-2 regs) GIF_REGS_ALL_AD) + (set! (-> v1-1 base) (the-as pointer (&+ a1-2 16))) + ) + (let* ((v1-2 arg0) + (a1-4 (-> v1-2 base)) + ) + (set! (-> (the-as (pointer gs-test) a1-4) 0) (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal))) + (set! (-> (the-as (pointer gs-reg64) a1-4) 1) (gs-reg64 test-1)) + (set! (-> v1-2 base) (&+ a1-4 16)) + ) + (let* ((v1-3 arg0) + (a1-6 (the-as dma-packet (-> v1-3 base))) + ) + (set! (-> a1-6 dma) (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))) + (set! (-> a1-6 vif0) (new 'static 'vif-tag :cmd (vif-cmd stmask))) + (set! (-> a1-6 vif1) (new 'static 'vif-tag)) + (set! (-> v1-3 base) (the-as pointer (&+ a1-6 16))) + ) + (let* ((v1-4 arg0) + (a0-1 (-> v1-4 base)) + ) + (set! (-> (the-as (pointer vif-tag) a0-1) 0) (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscalf) :msk #x1)) + (set! (-> (the-as (pointer vif-tag) a0-1) 1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> (the-as (pointer vif-tag) a0-1) 2) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> (the-as (pointer vif-tag) a0-1) 3) (new 'static 'vif-tag :cmd (vif-cmd strow) :msk #x1)) + (set! (-> (the-as (pointer int32) a0-1) 4) 0) + (set! (-> (the-as (pointer int32) a0-1) 5) 0) + (set! (-> (the-as (pointer int32) a0-1) 6) 0) + (set! (-> (the-as (pointer int32) a0-1) 7) 0) + (set! (-> v1-4 base) (&+ a0-1 32)) + ) + 0 + (none) + ) + +(defun-debug tie-int-reg ((arg0 int)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + "zero" + ) + ((= v1-0 1) + "itemp" + ) + ((= v1-0 2) + "point-ptr" + ) + ((= v1-0 3) + "clr-ptr" + ) + ((= v1-0 4) + "target-bp1-ptr" + ) + ((= v1-0 5) + "skip-bp2" + ) + ((= v1-0 6) + "target-bp2-ptr" + ) + ((= v1-0 7) + "target-ip1-ptr" + ) + ((= v1-0 8) + "target-ip2-ptr" + ) + ((= v1-0 9) + "ind/ind0" + ) + ((= v1-0 10) + " ind1" + ) + ((= v1-0 11) + " ind2" + ) + ((= v1-0 12) + "dest-ptr" + ) + ((= v1-0 13) + "dest2-ptr" + ) + ((= v1-0 14) + "skip-ips" + ) + ((= v1-0 15) + "kick-addr" + ) + ) + ) + ) + +(defun-debug tie-float-reg ((arg0 int)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + "zero" + ) + ((= v1-0 1) + "t-mtx0" + ) + ((= v1-0 2) + "t-mtx1" + ) + ((= v1-0 3) + "t-mtx2" + ) + ((= v1-0 4) + "t-mtx3" + ) + ((= v1-0 5) + "vtx-0" + ) + ((= v1-0 6) + "vtx-1" + ) + ((= v1-0 7) + "vtx-2" + ) + ((= v1-0 8) + "vtx-3" + ) + ((= v1-0 9) + "pos-0/2" + ) + ((= v1-0 10) + "pos-1/3" + ) + ((= v1-0 11) + "clr-0" + ) + ((= v1-0 12) + "clr-1" + ) + ((= v1-0 13) + "clr-2" + ) + ((= v1-0 14) + "clr-3" + ) + ((= v1-0 15) + "tex-0" + ) + ((= v1-0 16) + "tex-1" + ) + ((= v1-0 17) + "tex-2" + ) + ((= v1-0 18) + "tex-3" + ) + ((= v1-0 19) + "res-0/2" + ) + ((= v1-0 20) + "res-1/3" + ) + ((= v1-0 21) + "gifbuf" + ) + ((= v1-0 22) + "clrbuf" + ) + ((= v1-0 23) + "extra" + ) + ((= v1-0 24) + "inds" + ) + ((= v1-0 25) + "--" + ) + ((= v1-0 26) + "--" + ) + ((= v1-0 27) + "morph" + ) + ((= v1-0 28) + "xyzofs" + ) + ((= v1-0 29) + "clr1" + ) + ((= v1-0 30) + "clr2" + ) + ((= v1-0 31) + "--" + ) + ) + ) + ) + +(defun-debug tie-ints () + (local-vars (sv-16 uint)) + (let ((gp-0 (+ #x3da0 #x1100c000))) + (dotimes (s5-0 16) + (if (< s5-0 10) + (format 0 " ") + ) + (let ((s4-0 format) + (s3-0 0) + (s2-0 "vi~d: ~6d #x~4,'0X ~s~%") + (s1-0 s5-0) + (s0-0 (-> (the-as (pointer uint32) (+ gp-0 (* (* s5-0 4) 4))) 0)) + ) + (set! sv-16 (-> (the-as (pointer uint32) (+ gp-0 (* (* s5-0 4) 4))) 0)) + (let ((t1-0 (tie-int-reg s5-0))) + (s4-0 s3-0 s2-0 s1-0 s0-0 sv-16 t1-0) + ) + ) + ) + ) + (none) + ) + +(defun-debug tie-floats () + (local-vars (sv-16 uint) (sv-32 uint)) + (let ((gp-0 (the-as (pointer uint32) (+ #x3da0 #x1100c000)))) + (dotimes (s5-0 32) + (if (< s5-0 10) + (format 0 " ") + ) + (format + 0 + "vf~d: #x~8,'0X #x~8,'0X #x~8,'0X #x~8,'0X " + s5-0 + (-> gp-0 (* s5-0 4)) + (-> gp-0 (+ (* s5-0 4) 1)) + (-> gp-0 (+ (* s5-0 4) 2)) + (-> gp-0 (+ (* s5-0 4) 3)) + ) + (let ((s4-0 format) + (s3-0 0) + (s2-0 "~F ~F ~F ~F ~s~%") + (s1-0 (-> gp-0 (* s5-0 4))) + (s0-0 (-> gp-0 (+ (* s5-0 4) 1))) + ) + (set! sv-16 (-> gp-0 (+ (* s5-0 4) 2))) + (set! sv-32 (-> gp-0 (+ (* s5-0 4) 3))) + (let ((t2-1 (tie-float-reg s5-0))) + (s4-0 s3-0 s2-0 s1-0 s0-0 sv-16 sv-32 t2-1) + ) + ) + ) + ) + (none) + ) + + + + diff --git a/goal_src/jak2/engine/gfx/vu1-user-h.gc b/goal_src/jak2/engine/gfx/vu1-user-h.gc index ebb23fb604..40bdfdd898 100644 --- a/goal_src/jak2/engine/gfx/vu1-user-h.gc +++ b/goal_src/jak2/engine/gfx/vu1-user-h.gc @@ -28,75 +28,75 @@ (tex-l0-tfrag 7) ;; level 0 tex (tfrag-l0-tfrag 8) ;; tfrag - (bucket-9 9) ;; tie - (bucket-10 10) ;; tie + (tie-l0-tfrag 9) ;; tie + (etie-l0-tfrag 10) ;; tie (tfrag-s-l0-tfrag 11) ;; tfrag - (bucket-12 12) ;; tie - (bucket-13 13) ;; tie + (tie-s-l0-tfrag 12) ;; tie + (etie-s-l0-tfrag 13) ;; tie (merc-l0-tfrag 14) ;; merc (emerc-l0-tfrag 15) ;; emerc (bucket-16 16) ;; mercneric - (bucket-17 17) ;; tie + (tie-v-l0-tfrag 17) ;; tie (tex-l1-tfrag 18) ;; tex (tfrag-l1-tfrag 19) ;; tfrag - (bucket-20 20) ;; tie - (bucket-21 21) ;; tie + (tie-l1-tfrag 20) ;; tie + (etie-l1-tfrag 21) ;; tie (tfrag-s-l1-tfrag 22) ;; tfrag - (bucket-23 23) ;; tie - (bucket-24 24) ;; tie + (tie-s-l1-tfrag 23) ;; tie + (etie-s-l1-tfrag 24) ;; tie (merc-l1-tfrag 25) ;; merc (emerc-l1-tfrag 26) ;; emerc (bucket-27 27) ;; mercneric - (bucket-28 28) ;; tie + (tie-v-l1-tfrag 28) ;; tie (tex-l2-tfrag 29) ;; tex (tfrag-l2-tfrag 30) ;; tfrag - (bucket-31 31) ;; tie - (bucket-32 32) ;; tie + (tie-l2-tfrag 31) ;; tie + (etie-l2-tfrag 32) ;; tie (tfrag-s-l2-tfrag 33) ;; tfrag - (bucket-34 34) ;; tie - (bucket-35 35) ;; tie + (tie-s-l2-tfrag 34) ;; tie + (etie-s-l2-tfrag 35) ;; tie (merc-l2-tfrag 36) ;; merc (emerc-l2-tfrag 37) ;; emerc (bucket-38 38) ;; mercneric - (bucket-39 39) ;; tie + (tie-v-l2-tfrag 39) ;; tie (tex-l3-tfrag 40) ;; tex (tfrag-l3-tfrag 41) ;; tfrag - (bucket-42 42) ;; tie - (bucket-43 43) ;; tie + (tie-l3-tfrag 42) ;; tie + (etie-l3-tfrag 43) ;; tie (tfrag-s-l3-tfrag 44) ;; tfrag - (bucket-45 45) ;; tie - (bucket-46 46) ;; tie + (tie-s-l3-tfrag 45) ;; tie + (etie-s-l3-tfrag 46) ;; tie (merc-l3-tfrag 47) ;; merc (emerc-l3-tfrag 48) ;; emerc (bucket-49 49) ;; mercneric - (bucket-50 50) ;; tie + (tie-v-l3-tfrag 50) ;; tie (tex-l4-tfrag 51) ;; tex (tfrag-l4-tfrag 52) ;; tfrag - (bucket-53 53) ;; tie - (bucket-54 54) ;; tie + (tie-l4-tfrag 53) ;; tie + (etie-l4-tfrag 54) ;; tie (tfrag-s-l4-tfrag 55) ;; tfrag - (bucket-56 56) ;; tie - (bucket-57 57) ;; tie + (tie-s-l4-tfrag 56) ;; tie + (etie-s-l4-tfrag 57) ;; tie (merc-l4-tfrag 58) ;; merc (emerc-l4-tfrag 59) ;; emerc (bucket-60 60) ;; mercneric - (bucket-61 61) ;; tie + (tie-v-l4-tfrag 61) ;; tie (tex-l5-tfrag 62) ;; tex (tfrag-l5-tfrag 63) ;; tfrag - (bucket-64 64) ;; tie - (bucket-65 65) ;; tie + (tie-l5-tfrag 64) ;; tie + (etie-l5-tfrag 65) ;; tie (tfrag-s-l5-tfrag 66) ;; tfrag - (bucket-67 67) ;; tie - (bucket-68 68) ;; tie + (tie-s-l5-tfrag 67) ;; tie + (etie-s-l5-tfrag 68) ;; tie (merc-l5-tfrag 69) ;; merc (emerc-l5-tfrag 70) ;; emerc (bucket-71 71) ;; mercneric - (bucket-72 72) ;; tie + (tie-v-l5-tfrag 72) ;; tie ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; All levels with shrub tpage @@ -164,69 +164,69 @@ (tex-l0-alpha 127) ;; tex (tfrag-t-l0-alpha 128) ;; tfrag - (bucket-129 129) ;; tie - (bucket-130 130) ;; tie + (tie-t-l0-alpha 129) ;; tie + (etie-t-l0-alpha 130) ;; tie (merc-l0-alpha 131) ;; merc (emerc-l0-alpha 132) ;; emerc (bucket-133 133) ;; mercneric (tfrag-st-l0-alpha 134) ;; tfrag - (bucket-135 135) ;; tie - (bucket-136 136) ;; tie + (tie-st-l0-alpha 135) ;; tie + (etie-st-l0-alpha 136) ;; tie (tex-l1-alpha 137) ;; tex (tfrag-t-l1-alpha 138) ;; tfrag - (bucket-139 139) ;; tie - (bucket-140 140) ;; tie + (tie-t-l1-alpha 139) ;; tie + (etie-t-l1-alpha 140) ;; tie (merc-l1-alpha 141) ;; merc (emerc-l1-alpha 142) ;; emerc (bucket-143 143) ;; mercneric (tfrag-st-l1-alpha 144) ;; tfrag - (bucket-145 145) ;; tie - (bucket-146 146) ;; tie + (tie-st-l1-alpha 145) ;; tie + (etie-st-l1-alpha 146) ;; tie (tex-l2-alpha 147) ;; tex (tfrag-t-l2-alpha 148) ;; tfrag - (bucket-149 149) ;; tie - (bucket-150 150) ;; tie + (tie-t-l2-alpha 149) ;; tie + (etie-t-l2-alpha 150) ;; tie (merc-l2-alpha 151) ;; merc (emerc-l2-alpha 152) ;; emerc (bucket-153 153) ;; mercneric (tfrag-st-l2-alpha 154) ;; tfrag - (bucket-155 155) ;; tie - (bucket-156 156) ;; tie + (tie-st-l2-alpha 155) ;; tie + (etie-st-l2-alpha 156) ;; tie (tex-l3-alpha 157) ;; tex (tfrag-t-l3-alpha 158) ;; tfrag - (bucket-159 159) ;; tie - (bucket-160 160) ;; tie + (tie-t-l3-alpha 159) ;; tie + (etie-t-l3-alpha 160) ;; tie (merc-l3-alpha 161) ;; merc (emerc-l3-alpha 162) ;; emerc (bucket-163 163) ;; mercneric (tfrag-st-l3-alpha 164) ;; tfrag - (bucket-165 165) ;; tie - (bucket-166 166) ;; tie + (tie-st-l3-alpha 165) ;; tie + (etie-st-l3-alpha 166) ;; tie (tex-l4-alpha 167) ;; tex (tfrag-t-l4-alpha 168) ;; tfrag - (bucket-169 169) ;; tie - (bucket-170 170) ;; tie + (tie-t-l4-alpha 169) ;; tie + (etie-t-l4-alpha 170) ;; tie (merc-l4-alpha 171) ;; merc (emerc-l4-alpha 172) ;; emerc (bucket-173 173) ;; mercneric (tfrag-st-l4-alpha 174) ;; tfrag - (bucket-175 175) ;; tie - (bucket-176 176) ;; tie + (tie-st-l4-alpha 175) ;; tie + (etie-st-l4-alpha 176) ;; tie (tex-l5-alpha 177) ;; tex (tfrag-t-l5-alpha 178) ;; tfrag - (bucket-179 179) ;; tie - (bucket-180 180) ;; tie + (tie-t-l5-alpha 179) ;; tie + (etie-t-l5-alpha 180) ;; tie (merc-l5-alpha 181) ;; merc (emerc-l5-alpha 182) ;; emerc (bucket-183 183) ;; mercneric (tfrag-st-l5-alpha 184) ;; tfrag - (bucket-185 185) ;; tie - (bucket-186 186) ;; tie + (tie-st-l5-alpha 185) ;; tie + (etie-st-l5-alpha 186) ;; tie (tex-lcom-tfrag 187) ;; tex (merc-lcom-tfrag 188) ;; merc @@ -314,61 +314,61 @@ (merc-l0-water 253) ;; merc (bucket-254 254) ;; mercneric (tfrag-w-l0-water 255) ;; tfrag - (bucket-256 256) - (bucket-257 257) - (bucket-258 258) + (tie-w-l0-water 256) + (etie-w-l0-water 257) + (tie-sw-l0-water 258) (tfrag-ws-l0-water 259) ;; tfrag - (bucket-260 260) + (etie-sw-l0-water 260) (tex-l1-water 261) ;; tex (merc-l1-water 262) ;; merc (bucket-263 263) ;; mercneric (tfrag-w-l1-water 264) ;; tfrag - (bucket-265 265) - (bucket-266 266) - (bucket-267 267) + (tie-w-l1-water 265) + (etie-w-l1-water 266) + (tie-sw-l1-water 267) (tfrag-ws-l1-water 268) ;; tfrag - (bucket-269 269) + (etie-sw-l1-water 269) (tex-l2-water 270) ;; tex (merc-l2-water 271) ;; merc (bucket-272 272) ;; mercneric (tfrag-w-l2-water 273) ;; tfrag - (bucket-274 274) - (bucket-275 275) - (bucket-276 276) + (tie-w-l2-water 274) + (etie-w-l2-water 275) + (tie-sw-l2-water 276) (tfrag-ws-l2-water 277) ;; tfrag - (bucket-278 278) + (tie-esw-l2-water 278) (tex-l3-water 279) ;; tex (merc-l3-water 280) ;; merc (bucket-281 281) ;; mercneric (tfrag-w-l3-water 282) ;; tfrag - (bucket-283 283) - (bucket-284 284) - (bucket-285 285) + (tie-w-l3-water 283) + (etie-w-l3-water 284) + (tie-sw-l3-water 285) (tfrag-ws-l3-water 286) ;; tfrag - (bucket-287 287) + (etie-sw-l3-water 287) (tex-l4-water 288) ;; tex (merc-l4-water 289) ;; merc (bucket-290 290) ;; mercneric (tfrag-w-l4-water 291) ;; tfrag - (bucket-292 292) - (bucket-293 293) - (bucket-294 294) + (tie-w-l4-water 292) + (etie-w-l4-water 293) + (tie-sw-l4-water 294) (tfrag-ws-l4-water 295) ;; tfrag - (bucket-296 296) + (etie-sw-l4-water 296) (tex-l5-water 297) ;; tex (merc-l5-water 298) ;; merc (bucket-299 299) ;; mercneric (tfrag-w-l5-water 300) ;; tfrag - (bucket-301 301) - (bucket-302 302) - (bucket-303 303) + (tie-w-l5-water 301) + (etie-w-l5-water 302) + (tie-sw-l5-water 303) (tfrag-ws-l5-water 304) ;; tfrag - (bucket-305 305) + (etie-sw-l5-water 305) (tex-lcom-water 306) ;; tex (merc-lcom-water 307) ;; merc @@ -397,6 +397,7 @@ (debug3 326) ) + (defenum vu1-renderer-mask :type uint64 :bitfield #t diff --git a/goal_src/jak2/engine/util/profile.gc b/goal_src/jak2/engine/util/profile.gc index 59e4b163f6..9813442471 100644 --- a/goal_src/jak2/engine/util/profile.gc +++ b/goal_src/jak2/engine/util/profile.gc @@ -192,61 +192,60 @@ ) (defun profile-tie-test ((arg0 bucket-id)) - "Is this a tie bucket?" - (or (= arg0 (bucket-id bucket-9)) - (= arg0 (bucket-id bucket-20)) - (= arg0 (bucket-id bucket-31)) - (= arg0 (bucket-id bucket-42)) - (= arg0 (bucket-id bucket-53)) - (= arg0 (bucket-id bucket-64)) - (= arg0 (bucket-id bucket-10)) - (= arg0 (bucket-id bucket-21)) - (= arg0 (bucket-id bucket-32)) - (= arg0 (bucket-id bucket-43)) - (= arg0 (bucket-id bucket-54)) - (= arg0 (bucket-id bucket-65)) - (= arg0 (bucket-id bucket-12)) - (= arg0 (bucket-id bucket-23)) - (= arg0 (bucket-id bucket-34)) - (= arg0 (bucket-id bucket-45)) - (= arg0 (bucket-id bucket-56)) - (= arg0 (bucket-id bucket-67)) - (= arg0 (bucket-id bucket-13)) - (= arg0 (bucket-id bucket-24)) - (= arg0 (bucket-id bucket-35)) - (= arg0 (bucket-id bucket-46)) - (= arg0 (bucket-id bucket-57)) - (= arg0 (bucket-id bucket-68)) - (= arg0 (bucket-id bucket-17)) - (= arg0 (bucket-id bucket-28)) - (= arg0 (bucket-id bucket-39)) - (= arg0 (bucket-id bucket-50)) - (= arg0 (bucket-id bucket-61)) - (= arg0 (bucket-id bucket-72)) - (= arg0 (bucket-id bucket-129)) - (= arg0 (bucket-id bucket-139)) - (= arg0 (bucket-id bucket-149)) - (= arg0 (bucket-id bucket-159)) - (= arg0 (bucket-id bucket-169)) - (= arg0 (bucket-id bucket-179)) - (= arg0 (bucket-id bucket-130)) - (= arg0 (bucket-id bucket-140)) - (= arg0 (bucket-id bucket-150)) - (= arg0 (bucket-id bucket-160)) - (= arg0 (bucket-id bucket-170)) - (= arg0 (bucket-id bucket-180)) - (= arg0 (bucket-id bucket-135)) - (= arg0 (bucket-id bucket-145)) - (= arg0 (bucket-id bucket-155)) - (= arg0 (bucket-id bucket-165)) - (= arg0 (bucket-id bucket-175)) - (= arg0 (bucket-id bucket-185)) - (= arg0 (bucket-id bucket-136)) - (= arg0 (bucket-id bucket-146)) - (= arg0 (bucket-id bucket-156)) - (= arg0 (bucket-id bucket-166)) - (= arg0 (bucket-id bucket-176)) - (= arg0 (bucket-id bucket-186)) + (or (= arg0 (bucket-id tie-l0-tfrag)) + (= arg0 (bucket-id tie-l1-tfrag)) + (= arg0 (bucket-id tie-l2-tfrag)) + (= arg0 (bucket-id tie-l3-tfrag)) + (= arg0 (bucket-id tie-l4-tfrag)) + (= arg0 (bucket-id tie-l5-tfrag)) + (= arg0 (bucket-id etie-l0-tfrag)) + (= arg0 (bucket-id etie-l1-tfrag)) + (= arg0 (bucket-id etie-l2-tfrag)) + (= arg0 (bucket-id etie-l3-tfrag)) + (= arg0 (bucket-id etie-l4-tfrag)) + (= arg0 (bucket-id etie-l5-tfrag)) + (= arg0 (bucket-id tie-s-l0-tfrag)) + (= arg0 (bucket-id tie-s-l1-tfrag)) + (= arg0 (bucket-id tie-s-l2-tfrag)) + (= arg0 (bucket-id tie-s-l3-tfrag)) + (= arg0 (bucket-id tie-s-l4-tfrag)) + (= arg0 (bucket-id tie-s-l5-tfrag)) + (= arg0 (bucket-id etie-s-l0-tfrag)) + (= arg0 (bucket-id etie-s-l1-tfrag)) + (= arg0 (bucket-id etie-s-l2-tfrag)) + (= arg0 (bucket-id etie-s-l3-tfrag)) + (= arg0 (bucket-id etie-s-l4-tfrag)) + (= arg0 (bucket-id etie-s-l5-tfrag)) + (= arg0 (bucket-id tie-v-l0-tfrag)) + (= arg0 (bucket-id tie-v-l1-tfrag)) + (= arg0 (bucket-id tie-v-l2-tfrag)) + (= arg0 (bucket-id tie-v-l3-tfrag)) + (= arg0 (bucket-id tie-v-l4-tfrag)) + (= arg0 (bucket-id tie-v-l5-tfrag)) + (= arg0 (bucket-id tie-t-l0-alpha)) + (= arg0 (bucket-id tie-t-l1-alpha)) + (= arg0 (bucket-id tie-t-l2-alpha)) + (= arg0 (bucket-id tie-t-l3-alpha)) + (= arg0 (bucket-id tie-t-l4-alpha)) + (= arg0 (bucket-id tie-t-l5-alpha)) + (= arg0 (bucket-id etie-t-l0-alpha)) + (= arg0 (bucket-id etie-t-l1-alpha)) + (= arg0 (bucket-id etie-t-l2-alpha)) + (= arg0 (bucket-id etie-t-l3-alpha)) + (= arg0 (bucket-id etie-t-l4-alpha)) + (= arg0 (bucket-id etie-t-l5-alpha)) + (= arg0 (bucket-id tie-st-l0-alpha)) + (= arg0 (bucket-id tie-st-l1-alpha)) + (= arg0 (bucket-id tie-st-l2-alpha)) + (= arg0 (bucket-id tie-st-l3-alpha)) + (= arg0 (bucket-id tie-st-l4-alpha)) + (= arg0 (bucket-id tie-st-l5-alpha)) + (= arg0 (bucket-id etie-st-l0-alpha)) + (= arg0 (bucket-id etie-st-l1-alpha)) + (= arg0 (bucket-id etie-st-l2-alpha)) + (= arg0 (bucket-id etie-st-l3-alpha)) + (= arg0 (bucket-id etie-st-l4-alpha)) + (= arg0 (bucket-id etie-st-l5-alpha)) ) ) diff --git a/test/decompiler/reference/jak2/engine/gfx/hw/gs_REF.gc b/test/decompiler/reference/jak2/engine/gfx/hw/gs_REF.gc index ed9019fa1b..2716377f5b 100644 --- a/test/decompiler/reference/jak2/engine/gfx/hw/gs_REF.gc +++ b/test/decompiler/reference/jak2/engine/gfx/hw/gs_REF.gc @@ -387,15 +387,15 @@ ;; definition of type gs-adcmd (deftype gs-adcmd (structure) - ((word uint32 4 :offset-assert 0) - (quad uint128 :offset 0) - (data uint64 :offset 0) - (cmds uint64 :offset 8) - (cmd uint8 :offset 8) - (x uint32 :offset 0) - (y uint32 :offset 4) - (z uint32 :offset 8) - (w uint32 :offset 12) + ((word uint32 4 :offset-assert 0) + (quad uint128 :offset 0) + (data uint64 :offset 0) + (cmds gs-reg64 :offset 8) + (cmd uint8 :offset 8) + (x uint32 :offset 0) + (y uint32 :offset 4) + (z uint32 :offset 8) + (w uint32 :offset 12) ) :method-count-assert 9 :size-assert #x10 diff --git a/test/decompiler/reference/jak2/engine/gfx/tfrag/tfrag-methods_REF.gc b/test/decompiler/reference/jak2/engine/gfx/tfrag/tfrag-methods_REF.gc new file mode 100644 index 0000000000..bad7d3ad7a --- /dev/null +++ b/test/decompiler/reference/jak2/engine/gfx/tfrag/tfrag-methods_REF.gc @@ -0,0 +1,943 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for function edge-debug-lines +;; WARN: Return type mismatch symbol vs none. +(defun edge-debug-lines ((arg0 (array vector-array))) + (when (nonzero? arg0) + (dotimes (s5-0 (-> arg0 length)) + (when (logtest? *display-strip-lines* (ash 1 s5-0)) + (let ((s4-0 (-> arg0 s5-0))) + (dotimes (s3-0 (/ (-> s4-0 length) 2)) + (add-debug-line + #t + (bucket-id debug-no-zbuf1) + (-> s4-0 data (* s3-0 2)) + (-> s4-0 data (+ (* s3-0 2) 1)) + (new 'static 'rgba :r #xff :g #xff :b #xff :a #x80) + #f + (the-as rgba -1) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function draw-drawable-tree-tfrag +;; WARN: Return type mismatch drawable-tree-tfrag vs none. +(defun draw-drawable-tree-tfrag ((arg0 drawable-tree-tfrag)) + (local-vars (sv-16 int)) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag)) + (let ((s5-0 (+ (-> arg0 length) -1))) + (when (nonzero? s5-0) + (dotimes (s4-0 s5-0) + (let* ((v1-8 (-> arg0 arrays s4-0)) + (a0-4 (-> arg0 arrays (+ s4-0 1))) + (a1-1 (/ (-> (the-as drawable-inline-array-node v1-8) data 0 id) 8)) + (a0-6 (/ (-> (the-as drawable-inline-array-node a0-4) data 0 id) 8)) + (a1-3 (+ a1-1 #x38a0 #x70000000)) + (a0-8 (+ a0-6 #x38a0 #x70000000)) + ) + (draw-node-cull + (the-as pointer a0-8) + (the-as pointer a1-3) + (the-as (inline-array draw-node) (&+ v1-8 32)) + (-> v1-8 length) + ) + ) + ) + ) + (let* ((v1-14 (-> arg0 arrays s5-0)) + (s4-1 (&+ v1-14 32)) + (s3-0 (-> v1-14 length)) + ) + (set! sv-16 (+ (/ (-> s4-1 id) 8) #x38a0 #x70000000)) + (let ((s5-1 (-> *display* frames (-> *display* on-screen) global-buf base))) + (let* ((s1-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-0 (-> s1-0 base)) + ) + (set! (-> *tfrag-work* wait-to-spr) (the-as uint 0)) + (set! (-> *tfrag-work* wait-from-spr) (the-as uint 0)) + (set! (-> *tfrag-work* texture-dists) (the-as uint (-> *level* draw-level *draw-index* bsp tfrag-closest))) + (set! (-> *tfrag-work* last-call) (the-as uint 0)) + (draw-inline-array-tfrag (the-as pointer sv-16) s4-1 s3-0 s1-0) + (set! (-> *level* draw-level *draw-index* tfrag-last-calls 0) (the-as int (-> *tfrag-work* last-call))) + (update-wait-stats + (-> *perf-stats* data 42) + (the-as uint 0) + (-> *tfrag-work* wait-to-spr) + (-> *tfrag-work* wait-from-spr) + ) + (let ((a3-3 (-> s1-0 base))) + (let ((v1-46 (the-as dma-packet (-> s1-0 base)))) + (set! (-> v1-46 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-46 vif0) (new 'static 'vif-tag)) + (set! (-> v1-46 vif1) (new 'static 'vif-tag)) + (set! (-> s1-0 base) (the-as pointer (&+ v1-46 16))) + ) + (let ((t9-3 dma-bucket-insert-tag) + (a0-22 (-> *display* frames (-> *display* on-screen) bucket-group)) + (v1-53 *draw-index*) + ) + (t9-3 + a0-22 + (cond + ((zero? v1-53) + (bucket-id tfrag-l0-tfrag) + ) + ((= v1-53 1) + (bucket-id tfrag-l1-tfrag) + ) + ((= v1-53 2) + (bucket-id tfrag-l2-tfrag) + ) + ((= v1-53 3) + (bucket-id tfrag-l3-tfrag) + ) + ((= v1-53 4) + (bucket-id tfrag-l4-tfrag) + ) + (else + (bucket-id tfrag-l5-tfrag) + ) + ) + s2-0 + (the-as (pointer dma-tag) a3-3) + ) + ) + ) + ) + (let* ((s1-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-1 (-> s1-1 base)) + ) + (set! (-> *tfrag-work* near-wait-to-spr) (the-as uint 0)) + (set! (-> *tfrag-work* near-wait-from-spr) (the-as uint 0)) + (set! (-> *tfrag-work* last-call) (the-as uint 0)) + (draw-inline-array-tfrag-scissor (the-as pointer sv-16) s4-1 s3-0 s1-1) + (set! (-> *level* draw-level *draw-index* tfrag-last-calls 1) (the-as int (-> *tfrag-work* last-call))) + (update-wait-stats + (-> *perf-stats* data 43) + (the-as uint 0) + (-> *tfrag-work* near-wait-to-spr) + (-> *tfrag-work* near-wait-from-spr) + ) + (let ((a3-6 (-> s1-1 base))) + (let ((v1-70 (the-as dma-packet (-> s1-1 base)))) + (set! (-> v1-70 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-70 vif0) (new 'static 'vif-tag)) + (set! (-> v1-70 vif1) (new 'static 'vif-tag)) + (set! (-> s1-1 base) (the-as pointer (&+ v1-70 16))) + ) + (let ((t9-6 dma-bucket-insert-tag) + (a0-32 (-> *display* frames (-> *display* on-screen) bucket-group)) + (v1-77 *draw-index*) + ) + (t9-6 + a0-32 + (cond + ((zero? v1-77) + (bucket-id tfrag-s-l0-tfrag) + ) + ((= v1-77 1) + (bucket-id tfrag-s-l1-tfrag) + ) + ((= v1-77 2) + (bucket-id tfrag-s-l2-tfrag) + ) + ((= v1-77 3) + (bucket-id tfrag-s-l3-tfrag) + ) + ((= v1-77 4) + (bucket-id tfrag-s-l4-tfrag) + ) + (else + (bucket-id tfrag-s-l5-tfrag) + ) + ) + s2-1 + (the-as (pointer dma-tag) a3-6) + ) + ) + ) + ) + (let ((v1-78 *dma-mem-usage*)) + (when (nonzero? v1-78) + (set! (-> v1-78 length) (max 2 (-> v1-78 length))) + (set! (-> v1-78 data 1 name) "tfragment") + (+! (-> v1-78 data 1 count) 1) + (+! (-> v1-78 data 1 used) + (&- (-> *display* frames (-> *display* on-screen) global-buf base) (the-as uint s5-1)) + ) + (set! (-> v1-78 data 1 total) (-> v1-78 data 1 used)) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function draw-drawable-tree-tfrag-trans +;; WARN: Return type mismatch drawable-tree-tfrag vs none. +(defun draw-drawable-tree-tfrag-trans ((arg0 drawable-tree-tfrag)) + (local-vars (sv-16 int)) + (when (logtest? (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user)) + (let ((s5-0 (+ (-> arg0 length) -1))) + (when (nonzero? s5-0) + (dotimes (s4-0 s5-0) + (let* ((v1-7 (-> arg0 arrays s4-0)) + (a0-6 (-> arg0 arrays (+ s4-0 1))) + (a1-1 (/ (-> (the-as drawable-inline-array-node v1-7) data 0 id) 8)) + (a0-8 (/ (-> (the-as drawable-inline-array-node a0-6) data 0 id) 8)) + (a1-3 (+ a1-1 #x38a0 #x70000000)) + (a0-10 (+ a0-8 #x38a0 #x70000000)) + ) + (draw-node-cull + (the-as pointer a0-10) + (the-as pointer a1-3) + (the-as (inline-array draw-node) (&+ v1-7 32)) + (-> v1-7 length) + ) + ) + ) + ) + (let* ((v1-13 (-> arg0 arrays s5-0)) + (s5-1 (&+ v1-13 32)) + (s4-1 (-> v1-13 length)) + ) + (set! sv-16 (+ (/ (-> s5-1 id) 8) #x38a0 #x70000000)) + (let* ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s3-0 (-> s2-0 base)) + ) + (set! (-> *tfrag-work* wait-to-spr) (the-as uint 0)) + (set! (-> *tfrag-work* wait-from-spr) (the-as uint 0)) + (set! (-> *tfrag-work* texture-dists) (the-as uint (-> *level* draw-level *draw-index* bsp alpha-closest))) + (set! (-> *tfrag-work* last-call) (the-as uint 0)) + (draw-inline-array-tfrag (the-as pointer sv-16) s5-1 s4-1 s2-0) + (set! (-> *level* draw-level *draw-index* tfrag-last-calls 2) (the-as int (-> *tfrag-work* last-call))) + (update-wait-stats + (-> *perf-stats* data 42) + (the-as uint 0) + (-> *tfrag-work* wait-to-spr) + (-> *tfrag-work* wait-from-spr) + ) + (let ((a3-3 (-> s2-0 base))) + (let ((v1-39 (the-as dma-packet (-> s2-0 base)))) + (set! (-> v1-39 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-39 vif0) (new 'static 'vif-tag)) + (set! (-> v1-39 vif1) (new 'static 'vif-tag)) + (set! (-> s2-0 base) (the-as pointer (&+ v1-39 16))) + ) + (let ((t9-3 dma-bucket-insert-tag) + (a0-23 (-> *display* frames (-> *display* on-screen) bucket-group)) + (v1-46 *draw-index*) + ) + (t9-3 + a0-23 + (cond + ((zero? v1-46) + (bucket-id tfrag-t-l0-alpha) + ) + ((= v1-46 1) + (bucket-id tfrag-t-l1-alpha) + ) + ((= v1-46 2) + (bucket-id tfrag-t-l2-alpha) + ) + ((= v1-46 3) + (bucket-id tfrag-t-l3-alpha) + ) + ((= v1-46 4) + (bucket-id tfrag-t-l4-alpha) + ) + (else + (bucket-id tfrag-t-l5-alpha) + ) + ) + s3-0 + (the-as (pointer dma-tag) a3-3) + ) + ) + ) + ) + (let* ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s3-1 (-> s2-1 base)) + ) + (set! (-> *tfrag-work* near-wait-to-spr) (the-as uint 0)) + (set! (-> *tfrag-work* near-wait-from-spr) (the-as uint 0)) + (set! (-> *tfrag-work* last-call) (the-as uint 0)) + (draw-inline-array-tfrag-scissor (the-as pointer sv-16) s5-1 s4-1 s2-1) + (set! (-> *level* draw-level *draw-index* tfrag-last-calls 3) (the-as int (-> *tfrag-work* last-call))) + (update-wait-stats + (-> *perf-stats* data 43) + (the-as uint 0) + (-> *tfrag-work* near-wait-to-spr) + (-> *tfrag-work* near-wait-from-spr) + ) + (let ((a3-6 (-> s2-1 base))) + (let ((v1-63 (the-as dma-packet (-> s2-1 base)))) + (set! (-> v1-63 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-63 vif0) (new 'static 'vif-tag)) + (set! (-> v1-63 vif1) (new 'static 'vif-tag)) + (set! (-> s2-1 base) (the-as pointer (&+ v1-63 16))) + ) + (let ((t9-6 dma-bucket-insert-tag) + (a0-33 (-> *display* frames (-> *display* on-screen) bucket-group)) + (v1-70 *draw-index*) + ) + (t9-6 + a0-33 + (cond + ((zero? v1-70) + (bucket-id tfrag-st-l0-alpha) + ) + ((= v1-70 1) + (bucket-id tfrag-st-l1-alpha) + ) + ((= v1-70 2) + (bucket-id tfrag-st-l2-alpha) + ) + ((= v1-70 3) + (bucket-id tfrag-st-l3-alpha) + ) + ((= v1-70 4) + (bucket-id tfrag-st-l4-alpha) + ) + (else + (bucket-id tfrag-st-l5-alpha) + ) + ) + s3-1 + (the-as (pointer dma-tag) a3-6) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function draw-drawable-tree-tfrag-water +;; WARN: Return type mismatch drawable-tree-tfrag vs none. +(defun draw-drawable-tree-tfrag-water ((arg0 drawable-tree-tfrag)) + (local-vars (sv-16 int)) + (when (logtest? (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user)) + (let ((s5-0 (+ (-> arg0 length) -1))) + (when (nonzero? s5-0) + (dotimes (s4-0 s5-0) + (let* ((v1-7 (-> arg0 arrays s4-0)) + (a0-6 (-> arg0 arrays (+ s4-0 1))) + (a1-1 (/ (-> (the-as drawable-inline-array-node v1-7) data 0 id) 8)) + (a0-8 (/ (-> (the-as drawable-inline-array-node a0-6) data 0 id) 8)) + (a1-3 (+ a1-1 #x38a0 #x70000000)) + (a0-10 (+ a0-8 #x38a0 #x70000000)) + ) + (draw-node-cull + (the-as pointer a0-10) + (the-as pointer a1-3) + (the-as (inline-array draw-node) (&+ v1-7 32)) + (-> v1-7 length) + ) + ) + ) + ) + (let* ((v1-13 (-> arg0 arrays s5-0)) + (s5-1 (&+ v1-13 32)) + (s4-1 (-> v1-13 length)) + ) + (set! sv-16 (+ (/ (-> s5-1 id) 8) #x38a0 #x70000000)) + (let* ((s2-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s3-0 (-> s2-0 base)) + ) + (set! (-> *tfrag-work* wait-to-spr) (the-as uint 0)) + (set! (-> *tfrag-work* wait-from-spr) (the-as uint 0)) + (set! (-> *tfrag-work* texture-dists) (the-as uint (-> *level* draw-level *draw-index* bsp water-closest))) + (set! (-> *tfrag-work* last-call) (the-as uint 0)) + (draw-inline-array-tfrag (the-as pointer sv-16) s5-1 s4-1 s2-0) + (set! (-> *level* draw-level *draw-index* tfrag-last-calls 4) (the-as int (-> *tfrag-work* last-call))) + (update-wait-stats + (-> *perf-stats* data 42) + (the-as uint 0) + (-> *tfrag-work* wait-to-spr) + (-> *tfrag-work* wait-from-spr) + ) + (let ((a3-3 (-> s2-0 base))) + (let ((v1-39 (the-as dma-packet (-> s2-0 base)))) + (set! (-> v1-39 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-39 vif0) (new 'static 'vif-tag)) + (set! (-> v1-39 vif1) (new 'static 'vif-tag)) + (set! (-> s2-0 base) (the-as pointer (&+ v1-39 16))) + ) + (let ((t9-3 dma-bucket-insert-tag) + (a0-23 (-> *display* frames (-> *display* on-screen) bucket-group)) + (v1-46 *draw-index*) + ) + (t9-3 + a0-23 + (cond + ((zero? v1-46) + (bucket-id tfrag-w-l0-water) + ) + ((= v1-46 1) + (bucket-id tfrag-w-l1-water) + ) + ((= v1-46 2) + (bucket-id tfrag-w-l2-water) + ) + ((= v1-46 3) + (bucket-id tfrag-w-l3-water) + ) + ((= v1-46 4) + (bucket-id tfrag-w-l4-water) + ) + (else + (bucket-id tfrag-w-l5-water) + ) + ) + s3-0 + (the-as (pointer dma-tag) a3-3) + ) + ) + ) + ) + (let* ((s2-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s3-1 (-> s2-1 base)) + ) + (set! (-> *tfrag-work* near-wait-to-spr) (the-as uint 0)) + (set! (-> *tfrag-work* near-wait-from-spr) (the-as uint 0)) + (set! (-> *tfrag-work* last-call) (the-as uint 0)) + (draw-inline-array-tfrag-scissor (the-as pointer sv-16) s5-1 s4-1 s2-1) + (set! (-> *level* draw-level *draw-index* tfrag-last-calls 5) (the-as int (-> *tfrag-work* last-call))) + (update-wait-stats + (-> *perf-stats* data 43) + (the-as uint 0) + (-> *tfrag-work* near-wait-to-spr) + (-> *tfrag-work* near-wait-from-spr) + ) + (let ((a3-6 (-> s2-1 base))) + (let ((v1-63 (the-as dma-packet (-> s2-1 base)))) + (set! (-> v1-63 dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> v1-63 vif0) (new 'static 'vif-tag)) + (set! (-> v1-63 vif1) (new 'static 'vif-tag)) + (set! (-> s2-1 base) (the-as pointer (&+ v1-63 16))) + ) + (let ((t9-6 dma-bucket-insert-tag) + (a0-33 (-> *display* frames (-> *display* on-screen) bucket-group)) + (v1-70 *draw-index*) + ) + (t9-6 + a0-33 + (cond + ((zero? v1-70) + (bucket-id tfrag-ws-l0-water) + ) + ((= v1-70 1) + (bucket-id tfrag-ws-l1-water) + ) + ((= v1-70 2) + (bucket-id tfrag-ws-l2-water) + ) + ((= v1-70 3) + (bucket-id tfrag-ws-l3-water) + ) + ((= v1-70 4) + (bucket-id tfrag-ws-l4-water) + ) + (else + (bucket-id tfrag-ws-l5-water) + ) + ) + s3-1 + (the-as (pointer dma-tag) a3-6) + ) + ) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function tfrag-vu1-init-buf +;; WARN: Return type mismatch pointer vs none. +(defun tfrag-vu1-init-buf ((arg0 bucket-id) (arg1 gs-test) (arg2 int) (arg3 uint) (arg4 symbol)) + (let ((s4-0 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= s4-0 (-> s4-0 last)) + (let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-1 (-> s3-0 base)) + ) + (tfrag-init-buffer s3-0 arg1 arg2 arg4) + (let ((v1-12 (the-as object (-> s3-0 base)))) + (set! (-> (the-as dma-packet v1-12) dma) (new 'static 'dma-tag :id (dma-tag-id next) :addr (-> s4-0 next))) + (set! (-> (the-as dma-packet v1-12) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-12) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (the-as pointer (&+ (the-as dma-packet v1-12) 16))) + ) + (set! (-> s4-0 next) (the-as uint s2-1)) + ) + ) + ) + (let ((s5-1 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= s5-1 (-> s5-1 last)) + (let* ((s3-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s4-1 (-> s3-1 base)) + ) + (tfrag-end-buffer s3-1 (the-as int arg3)) + (let ((v0-3 (-> s3-1 base))) + (let ((v1-26 (the-as object (-> s3-1 base)))) + (set! (-> (the-as dma-packet v1-26) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-26) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-26) vif1) (new 'static 'vif-tag)) + (set! (-> s3-1 base) (&+ (the-as pointer v1-26) 16)) + ) + (set! (-> (the-as (pointer int32) (-> s5-1 last)) 1) (the-as int s4-1)) + (set! (-> s5-1 last) (the-as (pointer dma-tag) v0-3)) + ) + ) + ) + ) + (none) + ) + +;; definition for function tfrag-scissor-vu1-init-buf +;; WARN: Return type mismatch pointer vs none. +(defun tfrag-scissor-vu1-init-buf ((arg0 bucket-id) (arg1 gs-test) (arg2 int) (arg3 uint) (arg4 symbol)) + (let ((s4-0 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= s4-0 (-> s4-0 last)) + (let* ((s3-0 (-> *display* frames (-> *display* on-screen) global-buf)) + (s2-1 (-> s3-0 base)) + ) + (tfrag-scissor-init-buffer s3-0 arg1 arg2 arg4) + (let ((v1-12 (the-as object (-> s3-0 base)))) + (set! (-> (the-as dma-packet v1-12) dma) (new 'static 'dma-tag :id (dma-tag-id next) :addr (-> s4-0 next))) + (set! (-> (the-as dma-packet v1-12) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-12) vif1) (new 'static 'vif-tag)) + (set! (-> s3-0 base) (&+ (the-as pointer v1-12) 16)) + ) + (set! (-> s4-0 next) (the-as uint s2-1)) + ) + ) + ) + (let ((s5-1 (-> *display* frames (-> *display* on-screen) bucket-group arg0))) + (when (!= s5-1 (-> s5-1 last)) + (let* ((s3-1 (-> *display* frames (-> *display* on-screen) global-buf)) + (s4-1 (-> s3-1 base)) + ) + (tfrag-scissor-end-buffer s3-1 arg3) + (let ((v0-3 (-> s3-1 base))) + (let ((v1-26 (the-as object (-> s3-1 base)))) + (set! (-> (the-as dma-packet v1-26) dma) (new 'static 'dma-tag :id (dma-tag-id next))) + (set! (-> (the-as dma-packet v1-26) vif0) (new 'static 'vif-tag)) + (set! (-> (the-as dma-packet v1-26) vif1) (new 'static 'vif-tag)) + (set! (-> s3-1 base) (&+ (the-as pointer v1-26) 16)) + ) + (set! (-> (the-as (pointer uint32) (-> s5-1 last)) 1) (the-as uint s4-1)) + (set! (-> s5-1 last) (the-as (pointer dma-tag) v0-3)) + ) + ) + ) + ) + (none) + ) + +;; definition of type tfrag-init-data +(deftype tfrag-init-data (structure) + ((tfrag-bucket bucket-id :offset-assert 0) + (tfrag-scissor-bucket bucket-id :offset-assert 4) + (tfrag-trans-bucket bucket-id :offset-assert 8) + (tfrag-scissor-trans-bucket bucket-id :offset-assert 12) + (tfrag-water-bucket bucket-id :offset-assert 16) + (tfrag-water-scissor-bucket bucket-id :offset-assert 20) + ) + :method-count-assert 9 + :size-assert #x18 + :flag-assert #x900000018 + ) + +;; definition for method 3 of type tfrag-init-data +(defmethod inspect tfrag-init-data ((obj tfrag-init-data)) + (when (not obj) + (set! obj obj) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" obj 'tfrag-init-data) + (format #t "~1Ttfrag-bucket: ~D~%" (-> obj tfrag-bucket)) + (format #t "~1Ttfrag-scissor-bucket: ~D~%" (-> obj tfrag-scissor-bucket)) + (format #t "~1Ttfrag-trans-bucket: ~D~%" (-> obj tfrag-trans-bucket)) + (format #t "~1Ttfrag-scissor-trans-bucket: ~D~%" (-> obj tfrag-scissor-trans-bucket)) + (format #t "~1Ttfrag-water-bucket: ~D~%" (-> obj tfrag-water-bucket)) + (format #t "~1Ttfrag-water-scissor-bucket: ~D~%" (-> obj tfrag-water-scissor-bucket)) + (label cfg-4) + obj + ) + +;; definition for symbol *tfrag-init-table*, type (inline-array tfrag-init-data) +(define *tfrag-init-table* (new 'static 'inline-array tfrag-init-data 6 + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l0-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-s-l0-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-t-l0-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-st-l0-alpha) + :tfrag-water-bucket (bucket-id tfrag-w-l0-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-ws-l0-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l1-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-s-l1-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-t-l1-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-st-l1-alpha) + :tfrag-water-bucket (bucket-id tfrag-w-l1-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-ws-l1-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l2-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-s-l2-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-t-l2-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-st-l2-alpha) + :tfrag-water-bucket (bucket-id tfrag-w-l2-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-ws-l2-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l3-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-s-l3-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-t-l3-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-st-l3-alpha) + :tfrag-water-bucket (bucket-id tfrag-w-l3-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-ws-l3-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l4-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-s-l4-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-t-l4-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-st-l4-alpha) + :tfrag-water-bucket (bucket-id tfrag-w-l4-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-ws-l4-water) + ) + (new 'static 'tfrag-init-data + :tfrag-bucket (bucket-id tfrag-l5-tfrag) + :tfrag-scissor-bucket (bucket-id tfrag-s-l5-tfrag) + :tfrag-trans-bucket (bucket-id tfrag-t-l5-alpha) + :tfrag-scissor-trans-bucket (bucket-id tfrag-st-l5-alpha) + :tfrag-water-bucket (bucket-id tfrag-w-l5-water) + :tfrag-water-scissor-bucket (bucket-id tfrag-ws-l5-water) + ) + ) + ) + +;; definition for function tfrag-vu1-init-buffers +;; WARN: Return type mismatch symbol vs none. +(defun tfrag-vu1-init-buffers () + (dotimes (gp-0 6) + (let ((s5-0 (-> *level* draw-level gp-0)) + (s4-0 (-> *tfrag-init-table* gp-0)) + ) + (when s5-0 + (let ((s3-0 (-> s5-0 tfrag-gs-test))) + (tfrag-vu1-init-buf + (-> s4-0 tfrag-bucket) + s3-0 + 0 + (-> s5-0 tfrag-last-calls-u32 0) + (-> s5-0 info use-camera-other) + ) + (tfrag-scissor-vu1-init-buf + (-> s4-0 tfrag-scissor-bucket) + s3-0 + 0 + (-> s5-0 tfrag-last-calls-u32 1) + (-> s5-0 info use-camera-other) + ) + ) + (tfrag-vu1-init-buf + (-> s4-0 tfrag-trans-bucket) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + 1 + (-> s5-0 tfrag-last-calls-u32 2) + (-> s5-0 info use-camera-other) + ) + (tfrag-scissor-vu1-init-buf + (-> s4-0 tfrag-scissor-trans-bucket) + (new 'static 'gs-test + :ate #x1 + :atst (gs-atest greater-equal) + :aref #x26 + :afail #x1 + :zte #x1 + :ztst (gs-ztest greater-equal) + ) + 1 + (-> s5-0 tfrag-last-calls-u32 3) + (-> s5-0 info use-camera-other) + ) + (tfrag-vu1-init-buf + (-> s4-0 tfrag-water-bucket) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + 1 + (-> s5-0 tfrag-last-calls-u32 4) + (-> s5-0 info use-camera-other) + ) + (tfrag-scissor-vu1-init-buf + (-> s4-0 tfrag-water-scissor-bucket) + (new 'static 'gs-test :ate #x1 :afail #x1 :zte #x1 :ztst (gs-ztest greater-equal)) + 1 + (-> s5-0 tfrag-last-calls-u32 5) + (-> s5-0 info use-camera-other) + ) + ) + ) + ) + (none) + ) + +;; definition for method 10 of type drawable-tree-tfrag +;; WARN: Return type mismatch int vs none. +(defmethod draw drawable-tree-tfrag ((obj drawable-tree-tfrag) (arg0 drawable-tree-tfrag) (arg1 display-frame)) + (let ((v1-1 (-> *background-work* tfrag-tree-count)) + (a1-4 (-> *level* draw-level *draw-index*)) + ) + (set! (-> *background-work* tfrag-trees v1-1) obj) + (set! (-> *background-work* tfrag-levels v1-1) a1-4) + ) + (+! (-> *background-work* tfrag-tree-count) 1) + 0 + (none) + ) + +;; definition for method 10 of type drawable-tree-tfrag-trans +;; WARN: Return type mismatch int vs none. +(defmethod draw drawable-tree-tfrag-trans ((obj drawable-tree-tfrag-trans) (arg0 drawable-tree-tfrag-trans) (arg1 display-frame)) + (let ((v1-1 (-> *background-work* tfrag-trans-tree-count)) + (a1-4 (-> *level* draw-level *draw-index*)) + ) + (set! (-> *background-work* tfrag-trans-trees v1-1) obj) + (set! (-> *background-work* tfrag-trans-levels v1-1) a1-4) + ) + (+! (-> *background-work* tfrag-trans-tree-count) 1) + 0 + (none) + ) + +;; definition for method 10 of type drawable-tree-tfrag-water +;; WARN: Return type mismatch int vs none. +(defmethod draw drawable-tree-tfrag-water ((obj drawable-tree-tfrag-water) (arg0 drawable-tree-tfrag-water) (arg1 display-frame)) + (let ((v1-1 (-> *background-work* tfrag-water-tree-count)) + (a1-4 (-> *level* draw-level *draw-index*)) + ) + (set! (-> *background-work* tfrag-water-trees v1-1) obj) + (set! (-> *background-work* tfrag-water-levels v1-1) a1-4) + ) + (+! (-> *background-work* tfrag-water-tree-count) 1) + 0 + (none) + ) + +;; definition for method 13 of type tfragment +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats tfragment ((obj tfragment)) + (stats-tfrag-asm obj) + 0 + (none) + ) + +;; definition for method 13 of type drawable-tree-tfrag +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats drawable-tree-tfrag ((obj drawable-tree-tfrag)) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag)) + (set! (-> *tfrag-work* vu1-enable-tfrag) + (the-as int (logand (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag))) + ) + (set! (-> *tfrag-work* vu1-enable-tfrag-scissor) + (the-as int (logand (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag))) + ) + (set! (-> *tfrag-work* tr-stat-tfrag) (-> *terrain-stats* tfrag)) + (set! (-> *tfrag-work* tr-stat-tfrag-scissor) (-> *terrain-stats* tfrag-scissor)) + (let ((v1-15 (-> *tfrag-work* frag-dists quad))) + (set! (-> *tfrag-work* frag-dists quad) v1-15) + ) + (dotimes (s5-0 (-> obj length)) + (collect-stats (-> obj arrays s5-0)) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type drawable-tree-tfrag-trans +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats drawable-tree-tfrag-trans ((obj drawable-tree-tfrag-trans)) + (when (logtest? (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user)) + (set! (-> *tfrag-work* vu1-enable-tfrag) + (the-as int (logand (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user))) + ) + (set! (-> *tfrag-work* vu1-enable-tfrag-scissor) + (the-as int (logand (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user))) + ) + (set! (-> *tfrag-work* tr-stat-tfrag) (-> *terrain-stats* tfrag-trans)) + (set! (-> *tfrag-work* tr-stat-tfrag-scissor) (-> *terrain-stats* tfrag-scissor-trans)) + (let ((v1-12 (-> *tfrag-work* frag-dists quad))) + (set! (-> *tfrag-work* frag-dists quad) v1-12) + ) + (dotimes (s5-0 (-> obj length)) + (collect-stats (-> obj arrays s5-0)) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type drawable-tree-tfrag-water +;; INFO: Used lq/sq +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats drawable-tree-tfrag-water ((obj drawable-tree-tfrag-water)) + (when (logtest? (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user)) + (set! (-> *tfrag-work* vu1-enable-tfrag) + (the-as int (logand (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user))) + ) + (set! (-> *tfrag-work* vu1-enable-tfrag-scissor) + (the-as int (logand (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user))) + ) + (set! (-> *tfrag-work* tr-stat-tfrag) (-> *terrain-stats* tfrag-water)) + (set! (-> *tfrag-work* tr-stat-tfrag-scissor) (-> *terrain-stats* tfrag-scissor-water)) + (let ((v1-12 (-> *tfrag-work* frag-dists quad))) + (set! (-> *tfrag-work* frag-dists quad) v1-12) + ) + (dotimes (s5-0 (-> obj length)) + (collect-stats (-> obj arrays s5-0)) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type drawable-inline-array-tfrag +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats drawable-inline-array-tfrag ((obj drawable-inline-array-tfrag)) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag)) + (dotimes (s5-0 (-> obj length)) + (let ((s4-0 (-> obj data s5-0))) + (if (vis-cull (-> s4-0 id)) + (collect-stats s4-0) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type drawable-inline-array-tfrag-trans +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats drawable-inline-array-tfrag-trans ((obj drawable-inline-array-tfrag-trans)) + (when (logtest? (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user)) + (dotimes (s5-0 (-> obj length)) + (let ((s4-0 (-> obj data s5-0))) + (if (vis-cull (-> s4-0 id)) + (collect-stats s4-0) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 13 of type drawable-inline-array-tfrag-water +;; WARN: Return type mismatch int vs none. +(defmethod collect-stats drawable-inline-array-tfrag-water ((obj drawable-inline-array-tfrag-water)) + (when (logtest? (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user)) + (dotimes (s5-0 (-> obj length)) + (let ((s4-0 (-> obj data s5-0))) + (if (vis-cull (-> s4-0 id)) + (collect-stats s4-0) + ) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type drawable-tree-tfrag +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw drawable-tree-tfrag ((obj drawable-tree-tfrag) (arg0 drawable) (arg1 display-frame)) + (when (logtest? (-> *display* vu1-enable-user) (vu1-renderer-mask tfrag)) + (dotimes (s4-0 (-> obj length)) + (let ((a1-1 (-> obj arrays s4-0))) + (debug-draw a1-1 a1-1 arg1) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type drawable-tree-tfrag-trans +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw drawable-tree-tfrag-trans ((obj drawable-tree-tfrag-trans) (arg0 drawable) (arg1 display-frame)) + (when (logtest? (vu1-renderer-mask tfrag-trans) (-> *display* vu1-enable-user)) + (dotimes (s4-0 (-> obj length)) + (let ((a1-1 (-> obj arrays s4-0))) + (debug-draw a1-1 a1-1 arg1) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type drawable-tree-tfrag-water +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw drawable-tree-tfrag-water ((obj drawable-tree-tfrag-water) (arg0 drawable) (arg1 display-frame)) + (when (logtest? (vu1-renderer-mask tfrag-water) (-> *display* vu1-enable-user)) + (dotimes (s4-0 (-> obj length)) + (let ((a1-1 (-> obj arrays s4-0))) + (debug-draw a1-1 a1-1 arg1) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type drawable-inline-array-tfrag +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw drawable-inline-array-tfrag ((obj drawable-inline-array-tfrag) (arg0 drawable) (arg1 display-frame)) + (dotimes (s4-0 (-> obj length)) + (let ((s3-0 (-> obj data s4-0))) + (if (vis-cull (-> s3-0 id)) + (debug-draw s3-0 s3-0 arg1) + ) + ) + ) + 0 + (none) + ) + +;; definition for method 14 of type tfragment +;; WARN: Return type mismatch int vs none. +(defmethod debug-draw tfragment ((obj tfragment) (arg0 drawable) (arg1 display-frame)) + (-> arg1 global-buf) + (edge-debug-lines (-> obj debug-data debug-lines)) + 0 + (none) + ) + + + + diff --git a/test/decompiler/reference/jak2/engine/gfx/tie/tie_REF.gc b/test/decompiler/reference/jak2/engine/gfx/tie/tie_REF.gc new file mode 100644 index 0000000000..fd0910498b --- /dev/null +++ b/test/decompiler/reference/jak2/engine/gfx/tie/tie_REF.gc @@ -0,0 +1,709 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for method 9 of type tie-fragment +(defmethod login tie-fragment ((obj tie-fragment)) + (let ((s5-0 (the-as adgif-shader (-> obj gif-ref))) + (s4-0 (/ (-> obj tex-count) (the-as uint 5))) + ) + (dotimes (s3-0 (the-as int s4-0)) + (let ((v1-1 (adgif-shader-login-no-remap s5-0))) + (when v1-1 + (dotimes (a0-4 3) + (dotimes (a1-0 3) + (set! (-> (the-as (pointer int32) (+ (+ (* a0-4 16) (* a1-0 4)) (the-as int *texture-masks*)))) + (logior (-> (the-as (pointer int32) (+ (* a1-0 4) (the-as int *texture-masks*) (* a0-4 16))) 0) + (-> (the-as (pointer int32) (+ (* a1-0 4) (the-as int v1-1) (* a0-4 16))) 15) + ) + ) + ) + (set! (-> *texture-masks* data a0-4 dist) + (fmax (-> *texture-masks* data a0-4 dist) (-> v1-1 masks data a0-4 dist)) + ) + ) + ) + ) + (when (= (-> s5-0 reg-4) 66) + (set! (-> s5-0 reg-4) (the-as uint 127)) + (set! (-> s5-0 alpha) (new 'static 'gs-alpha)) + 0 + ) + (&+! s5-0 80) + ) + ) + obj + ) + +;; definition for method 3 of type drawable-inline-array-instance-tie +(defmethod inspect drawable-inline-array-instance-tie ((obj drawable-inline-array-instance-tie)) + (format #t "[~8x] ~A~%" obj (-> obj type)) + (format #t "~Tlength: ~D~%" (-> obj length)) + (format #t "~Tdata[~D]: @ #x~X~%" (-> obj length) (-> obj data)) + (dotimes (s5-0 (-> obj length)) + (format #t "~T [~D] ~A~%" s5-0 (-> obj data s5-0)) + ) + obj + ) + +;; definition for method 5 of type drawable-inline-array-instance-tie +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of drawable-inline-array-instance-tie ((obj drawable-inline-array-instance-tie)) + (the-as int (+ (-> drawable-inline-array-instance-tie size) (* (+ (-> obj length) -1) 64))) + ) + +;; definition for method 9 of type drawable-tree-instance-tie +;; INFO: this function exists in multiple non-identical object files +(defmethod login drawable-tree-instance-tie ((obj drawable-tree-instance-tie)) + obj + ) + +;; definition for method 9 of type drawable-tree-instance-tie +;; INFO: this function exists in multiple non-identical object files +(defmethod login drawable-tree-instance-tie ((obj drawable-tree-instance-tie)) + (dotimes (s5-0 (-> obj length)) + (login (-> obj data s5-0)) + ) + obj + ) + +;; definition for method 3 of type prototype-tie +(defmethod inspect prototype-tie ((obj prototype-tie)) + (format #t "[~8x] ~A~%" obj (-> obj type)) + (format #t "~Tlength: ~D~%" (-> obj length)) + (format #t "~Tdata[~D]: @ #x~X~%" (-> obj length) (-> obj data)) + (dotimes (s5-0 (-> obj length)) + (format #t "~T [~D] ~A~%" s5-0 (-> obj data s5-0)) + ) + obj + ) + +;; definition for method 9 of type prototype-tie +(defmethod login prototype-tie ((obj prototype-tie)) + (dotimes (s5-0 (-> obj length)) + (login (-> obj data s5-0)) + ) + obj + ) + +;; definition for method 8 of type drawable-tree-instance-tie +(defmethod mem-usage drawable-tree-instance-tie ((obj drawable-tree-instance-tie) (arg0 memory-usage-block) (arg1 int)) + (set! (-> arg0 length) (max 1 (-> arg0 length))) + (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) + (+! (-> arg0 data 0 count) 1) + (let ((v1-7 32)) + (+! (-> arg0 data 0 used) v1-7) + (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + ) + (dotimes (s3-0 (-> obj length)) + (mem-usage (-> obj data s3-0) arg0 arg1) + ) + (mem-usage (-> obj prototypes prototype-array-tie) arg0 (logior arg1 1)) + obj + ) + +;; definition for method 8 of type tie-fragment +(defmethod mem-usage tie-fragment ((obj tie-fragment) (arg0 memory-usage-block) (arg1 int)) + (when (logtest? arg1 2) + (let ((v1-3 (* (-> obj color-count) 4)) + (a0-2 (cond + ((logtest? arg1 4) + 20 + ) + ((logtest? arg1 8) + 21 + ) + (else + 22 + ) + ) + ) + ) + (+! (-> arg0 data a0-2 count) 1) + (+! (-> arg0 data a0-2 used) v1-3) + (+! (-> arg0 data a0-2 total) (logand -4 (+ v1-3 3))) + ) + (set! (-> arg0 length) (max 23 (-> arg0 length))) + (set! obj obj) + (goto cfg-13) + ) + (set! (-> arg0 length) (max 18 (-> arg0 length))) + (set! (-> arg0 data 9 name) "tie-fragment") + (set! (-> arg0 data 10 name) "tie-gif") + (set! (-> arg0 data 11 name) "tie-points") + (set! (-> arg0 data 12 name) "tie-colors") + (set! (-> arg0 data 14 name) "tie-debug") + (set! (-> arg0 data 13 name) "tie-draw-points") + (set! (-> arg0 data 17 name) "tie-generic") + (+! (-> arg0 data 9 count) 1) + (let ((v1-21 (asize-of obj))) + (+! (-> arg0 data 9 used) v1-21) + (+! (-> arg0 data 9 total) (logand -16 (+ v1-21 15))) + ) + (let ((v1-26 (* (-> obj gif-count) 16))) + (+! (-> arg0 data 10 count) (-> obj tex-count)) + (+! (-> arg0 data 10 used) v1-26) + (+! (-> arg0 data 10 total) (logand -16 (+ v1-26 15))) + ) + (let ((v1-31 (* (-> obj vertex-count) 16))) + (+! (-> arg0 data 11 count) (-> obj vertex-count)) + (+! (-> arg0 data 11 used) v1-31) + (+! (-> arg0 data 11 total) (logand -16 (+ v1-31 15))) + ) + (let ((v1-36 (* (-> obj dp-qwc) 16))) + (+! (-> arg0 data 13 count) (* (-> obj dp-qwc) 16)) + (+! (-> arg0 data 13 used) v1-36) + (+! (-> arg0 data 13 total) (logand -16 (+ v1-36 15))) + ) + (let ((v1-41 (* (-> obj generic-count) 16))) + (+! (-> arg0 data 17 count) 1) + (+! (-> arg0 data 17 used) v1-41) + (+! (-> arg0 data 17 total) (logand -16 (+ v1-41 15))) + ) + (let ((s4-0 (-> obj debug debug-lines))) + (when (nonzero? s4-0) + (dotimes (s3-0 (-> s4-0 length)) + (+! (-> arg0 data 14 count) (-> s4-0 s3-0 length)) + (let ((v1-52 (asize-of (-> s4-0 s3-0)))) + (+! (-> arg0 data 12 used) v1-52) + (+! (-> arg0 data 12 total) (logand -16 (+ v1-52 15))) + ) + ) + ) + ) + (label cfg-13) + obj + ) + +;; definition for method 8 of type instance-tie +(defmethod mem-usage instance-tie ((obj instance-tie) (arg0 memory-usage-block) (arg1 int)) + (set! (-> arg0 length) (max 19 (-> arg0 length))) + (set! (-> arg0 data 18 name) "instance-tie") + (+! (-> arg0 data 18 count) 1) + (let ((v1-6 (asize-of obj))) + (+! (-> arg0 data 18 used) v1-6) + (+! (-> arg0 data 18 total) (logand -16 (+ v1-6 15))) + ) + (when (nonzero? (-> obj color-indices)) + (set! (-> arg0 length) (max 24 (-> arg0 length))) + (set! (-> arg0 data 23 name) "instance-tie-colors*") + (set! (-> arg0 data 19 name) "instance-tie-colors0") + (set! (-> arg0 data 20 name) "instance-tie-colors1") + (set! (-> arg0 data 21 name) "instance-tie-colors2") + (set! (-> arg0 data 22 name) "instance-tie-colors3") + (+! (-> arg0 data 23 count) 1) + (let ((s3-0 (-> obj bucket-ptr))) + (+ (-> arg0 data 19 used) (-> arg0 data 20 used) (-> arg0 data 21 used) (-> arg0 data 22 used)) + (dotimes (s2-0 4) + (let ((a0-10 (-> s3-0 tie-geom s2-0))) + (when (nonzero? a0-10) + (let ((t9-1 (method-of-object a0-10 mem-usage)) + (a1-2 arg0) + (v1-29 s2-0) + ) + (t9-1 a0-10 a1-2 (logior (logior (cond + ((= v1-29 1) + 4 + ) + ((= v1-29 2) + 8 + ) + ((= v1-29 3) + 16 + ) + (else + 0 + ) + ) + 2 + ) + arg1 + ) + ) + ) + ) + ) + ) + ) + ) + obj + ) + +;; definition for method 8 of type drawable-inline-array-instance-tie +(defmethod mem-usage drawable-inline-array-instance-tie ((obj drawable-inline-array-instance-tie) (arg0 memory-usage-block) (arg1 int)) + (set! (-> arg0 length) (max 1 (-> arg0 length))) + (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) + (+! (-> arg0 data 0 count) 1) + (let ((v1-7 32)) + (+! (-> arg0 data 0 used) v1-7) + (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + ) + (dotimes (s3-0 (-> obj length)) + (mem-usage (-> obj data s3-0) arg0 arg1) + ) + obj + ) + +;; definition for method 8 of type prototype-tie +(defmethod mem-usage prototype-tie ((obj prototype-tie) (arg0 memory-usage-block) (arg1 int)) + (set! (-> arg0 length) (max 1 (-> arg0 length))) + (set! (-> arg0 data 0 name) (symbol->string 'drawable-group)) + (+! (-> arg0 data 0 count) 1) + (let ((v1-7 32)) + (+! (-> arg0 data 0 used) v1-7) + (+! (-> arg0 data 0 total) (logand -16 (+ v1-7 15))) + ) + (dotimes (s3-0 (-> obj length)) + (mem-usage (-> obj data s3-0) arg0 arg1) + ) + obj + ) + +;; definition for method 5 of type prototype-tie +;; WARN: Return type mismatch uint vs int. +(defmethod asize-of prototype-tie ((obj prototype-tie)) + (the-as int (+ (-> prototype-tie size) (* (+ (-> obj length) -1) 64))) + ) + +;; definition of type tie-consts +(deftype tie-consts (structure) + ((data uint32 40 :offset 0) + (vector vector 10 :offset 0) + (quads uint128 10 :offset 0) + (adgif gs-gif-tag :inline :offset 0) + (strgif gs-gif-tag :inline :offset 16) + (extra vector :inline :offset 32) + (gifbufs vector :inline :offset 48) + (clrbufs qword :inline :offset 64) + (misc qword :inline :offset 80) + (atestgif gs-gif-tag :inline :offset 96) + (alpha gs-adcmd :inline :offset 112) + (atest gs-adcmd 2 :inline :offset 128) + (atest-tra gs-adcmd :inline :offset 128) + (atest-def gs-adcmd :inline :offset 144) + ) + :method-count-assert 9 + :size-assert #xa0 + :flag-assert #x9000000a0 + ) + +;; definition for method 3 of type tie-consts +(defmethod inspect tie-consts ((obj tie-consts)) + (when (not obj) + (set! obj obj) + (goto cfg-4) + ) + (format #t "[~8x] ~A~%" obj 'tie-consts) + (format #t "~1Tdata[40] @ #x~X~%" (-> obj adgif)) + (format #t "~1Tvector[10] @ #x~X~%" (-> obj adgif)) + (format #t "~1Tquads[10] @ #x~X~%" (-> obj adgif)) + (format #t "~1Tadgif: #~%" (-> obj adgif)) + (format #t "~1Tstrgif: #~%" (-> obj strgif)) + (format #t "~1Textra: #~%" (-> obj extra)) + (format #t "~1Tgifbufs: #~%" (-> obj gifbufs)) + (format #t "~1Tclrbufs: #~%" (-> obj clrbufs)) + (format #t "~1Tmisc: #~%" (-> obj misc)) + (format #t "~1Tatestgif: #~%" (-> obj atestgif)) + (format #t "~1Talpha: #~%" (-> obj alpha)) + (format #t "~1Tatest[2] @ #x~X~%" (-> obj atest-tra)) + (format #t "~1Tatest-tra: #~%" (-> obj atest-tra)) + (format #t "~1Tatest-def: #~%" (-> obj atest-def)) + (label cfg-4) + obj + ) + +;; definition for symbol tie-vu1-block, type vu-function +(define tie-vu1-block (new 'static 'vu-function :length #x3e7 :qlength #x1f4)) + +;; definition for function tie-init-consts +;; WARN: Return type mismatch int vs none. +(defun tie-init-consts ((arg0 tie-consts) (arg1 gs-alpha) (arg2 gs-test) (arg3 gs-test)) + (set! (-> arg0 adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (case *subdivide-draw-mode* + (((subdivide-setting textured)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting outline)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting gouraud)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + (((subdivide-setting hack)) + (set! (-> arg0 strgif tag) + (new 'static 'gif-tag64 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ) + (set! (-> arg0 strgif regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (let ((f0-0 8388894.0) + (f1-0 8389078.0) + (f2-0 8389262.0) + ) + (set! (-> arg0 gifbufs x) f2-0) + (set! (-> arg0 gifbufs y) f1-0) + (set! (-> arg0 gifbufs z) f2-0) + (set! (-> arg0 gifbufs w) f1-0) + (set! (-> arg0 extra x) (+ f0-0 f1-0 f2-0)) + (set! (-> arg0 extra y) 0.0) + (set! (-> arg0 extra z) (+ f0-0 f1-0 f2-0)) + ) + (set! (-> arg0 clrbufs vector4w x) 198) + (set! (-> arg0 clrbufs vector4w y) 242) + (set! (-> arg0 clrbufs vector4w z) 198) + (set! (-> arg0 clrbufs vector4w w) 242) + (set! (-> arg0 atestgif tag) (new 'static 'gif-tag64 :nloop #x2 :eop #x1 :nreg #x1)) + (set! (-> arg0 atestgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (set! (-> arg0 alpha data) (the-as uint arg1)) + (set! (-> arg0 alpha cmds) (gs-reg64 alpha-1)) + (set! (-> arg0 atest-tra cmds) (gs-reg64 test-1)) + (set! (-> arg0 atest-tra data) (the-as uint arg2)) + (set! (-> arg0 atest-def cmds) (gs-reg64 test-1)) + (set! (-> arg0 atest-def data) (the-as uint arg3)) + (set! (-> arg0 misc vector4w x) 0) + (set! (-> arg0 misc vector4w y) -1) + (none) + ) + +;; definition for function tie-init-engine +;; WARN: Return type mismatch int vs none. +(defun tie-init-engine ((arg0 dma-buffer) (arg1 gs-alpha) (arg2 gs-test) (arg3 gs-test)) + (dma-buffer-add-vu-function arg0 tie-vu1-block 1) + (let ((s5-0 10)) + (let* ((v1-0 arg0) + (a0-2 (the-as dma-packet (-> v1-0 base))) + ) + (set! (-> a0-2 dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc s5-0)) + (set! (-> a0-2 vif0) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> a0-2 vif1) (new 'static 'vif-tag :imm #x3c6 :cmd (vif-cmd unpack-v4-32) :num s5-0)) + (set! (-> v1-0 base) (the-as pointer (&+ a0-2 16))) + ) + (tie-init-consts (the-as tie-consts (-> arg0 base)) arg1 arg2 arg3) + (&+! (-> arg0 base) (* s5-0 16)) + ) + (let* ((v1-3 arg0) + (a0-6 (the-as dma-packet (-> v1-3 base))) + ) + (set! (-> a0-6 dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> a0-6 vif0) (new 'static 'vif-tag :imm #x8 :cmd (vif-cmd mscalf) :msk #x1)) + (set! (-> a0-6 vif1) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> v1-3 base) (the-as pointer (&+ a0-6 16))) + ) + (let* ((v1-4 arg0) + (a0-8 (the-as dma-packet (-> v1-4 base))) + ) + (set! (-> a0-8 dma) (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))) + (set! (-> a0-8 vif0) (new 'static 'vif-tag)) + (set! (-> a0-8 vif1) (new 'static 'vif-tag :cmd (vif-cmd strow) :msk #x1)) + (set! (-> v1-4 base) (the-as pointer (&+ a0-8 16))) + ) + (let ((v1-5 (the-as object (-> arg0 base)))) + (set! (-> (the-as vector v1-5) x) 8388608.0) + (set! (-> (the-as vector v1-5) y) 8388608.0) + (set! (-> (the-as vector v1-5) z) 8388608.0) + (set! (-> (the-as vector v1-5) w) 8388608.0) + (set! (-> (the-as (pointer vif-tag) v1-5) 4) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> (the-as (pointer vif-tag) v1-5) 5) (new 'static 'vif-tag :imm #x2c :cmd (vif-cmd offset))) + (set! (-> (the-as (pointer vif-tag) v1-5) 6) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> (the-as (pointer vif-tag) v1-5) 7) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> arg0 base) (&+ (the-as pointer v1-5) 32)) + ) + 0 + (none) + ) + +;; definition for function tie-end-buffer +;; WARN: Return type mismatch int vs none. +(defun tie-end-buffer ((arg0 dma-buffer)) + (let* ((v1-0 arg0) + (a1-0 (the-as dma-packet (-> v1-0 base))) + ) + (set! (-> a1-0 dma) (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))) + (set! (-> a1-0 vif0) (new 'static 'vif-tag)) + (set! (-> a1-0 vif1) (new 'static 'vif-tag :imm #x2 :cmd (vif-cmd direct) :msk #x1)) + (set! (-> v1-0 base) (the-as pointer (&+ a1-0 16))) + ) + (let* ((v1-1 arg0) + (a1-2 (the-as gs-gif-tag (-> v1-1 base))) + ) + (set! (-> a1-2 tag) (new 'static 'gif-tag64 :nloop #x1 :eop #x1 :nreg #x1)) + (set! (-> a1-2 regs) GIF_REGS_ALL_AD) + (set! (-> v1-1 base) (the-as pointer (&+ a1-2 16))) + ) + (let* ((v1-2 arg0) + (a1-4 (-> v1-2 base)) + ) + (set! (-> (the-as (pointer gs-test) a1-4) 0) (new 'static 'gs-test :zte #x1 :ztst (gs-ztest greater-equal))) + (set! (-> (the-as (pointer gs-reg64) a1-4) 1) (gs-reg64 test-1)) + (set! (-> v1-2 base) (&+ a1-4 16)) + ) + (let* ((v1-3 arg0) + (a1-6 (the-as dma-packet (-> v1-3 base))) + ) + (set! (-> a1-6 dma) (new 'static 'dma-tag :qwc #x2 :id (dma-tag-id cnt))) + (set! (-> a1-6 vif0) (new 'static 'vif-tag :cmd (vif-cmd stmask))) + (set! (-> a1-6 vif1) (new 'static 'vif-tag)) + (set! (-> v1-3 base) (the-as pointer (&+ a1-6 16))) + ) + (let* ((v1-4 arg0) + (a0-1 (-> v1-4 base)) + ) + (set! (-> (the-as (pointer vif-tag) a0-1) 0) (new 'static 'vif-tag :imm #x4 :cmd (vif-cmd mscalf) :msk #x1)) + (set! (-> (the-as (pointer vif-tag) a0-1) 1) (new 'static 'vif-tag :cmd (vif-cmd stmod))) + (set! (-> (the-as (pointer vif-tag) a0-1) 2) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> (the-as (pointer vif-tag) a0-1) 3) (new 'static 'vif-tag :cmd (vif-cmd strow) :msk #x1)) + (set! (-> (the-as (pointer int32) a0-1) 4) 0) + (set! (-> (the-as (pointer int32) a0-1) 5) 0) + (set! (-> (the-as (pointer int32) a0-1) 6) 0) + (set! (-> (the-as (pointer int32) a0-1) 7) 0) + (set! (-> v1-4 base) (&+ a0-1 32)) + ) + 0 + (none) + ) + +;; definition (debug) for function tie-int-reg +(defun-debug tie-int-reg ((arg0 int)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + "zero" + ) + ((= v1-0 1) + "itemp" + ) + ((= v1-0 2) + "point-ptr" + ) + ((= v1-0 3) + "clr-ptr" + ) + ((= v1-0 4) + "target-bp1-ptr" + ) + ((= v1-0 5) + "skip-bp2" + ) + ((= v1-0 6) + "target-bp2-ptr" + ) + ((= v1-0 7) + "target-ip1-ptr" + ) + ((= v1-0 8) + "target-ip2-ptr" + ) + ((= v1-0 9) + "ind/ind0" + ) + ((= v1-0 10) + " ind1" + ) + ((= v1-0 11) + " ind2" + ) + ((= v1-0 12) + "dest-ptr" + ) + ((= v1-0 13) + "dest2-ptr" + ) + ((= v1-0 14) + "skip-ips" + ) + ((= v1-0 15) + "kick-addr" + ) + ) + ) + ) + +;; definition (debug) for function tie-float-reg +(defun-debug tie-float-reg ((arg0 int)) + (let ((v1-0 arg0)) + (cond + ((zero? v1-0) + "zero" + ) + ((= v1-0 1) + "t-mtx0" + ) + ((= v1-0 2) + "t-mtx1" + ) + ((= v1-0 3) + "t-mtx2" + ) + ((= v1-0 4) + "t-mtx3" + ) + ((= v1-0 5) + "vtx-0" + ) + ((= v1-0 6) + "vtx-1" + ) + ((= v1-0 7) + "vtx-2" + ) + ((= v1-0 8) + "vtx-3" + ) + ((= v1-0 9) + "pos-0/2" + ) + ((= v1-0 10) + "pos-1/3" + ) + ((= v1-0 11) + "clr-0" + ) + ((= v1-0 12) + "clr-1" + ) + ((= v1-0 13) + "clr-2" + ) + ((= v1-0 14) + "clr-3" + ) + ((= v1-0 15) + "tex-0" + ) + ((= v1-0 16) + "tex-1" + ) + ((= v1-0 17) + "tex-2" + ) + ((= v1-0 18) + "tex-3" + ) + ((= v1-0 19) + "res-0/2" + ) + ((= v1-0 20) + "res-1/3" + ) + ((= v1-0 21) + "gifbuf" + ) + ((= v1-0 22) + "clrbuf" + ) + ((= v1-0 23) + "extra" + ) + ((= v1-0 24) + "inds" + ) + ((= v1-0 25) + "--" + ) + ((= v1-0 26) + "--" + ) + ((= v1-0 27) + "morph" + ) + ((= v1-0 28) + "xyzofs" + ) + ((= v1-0 29) + "clr1" + ) + ((= v1-0 30) + "clr2" + ) + ((= v1-0 31) + "--" + ) + ) + ) + ) + +;; definition (debug) for function tie-ints +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defun-debug tie-ints () + (local-vars (sv-16 uint)) + (let ((gp-0 (+ #x3da0 #x1100c000))) + (dotimes (s5-0 16) + (if (< s5-0 10) + (format 0 " ") + ) + (let ((s4-0 format) + (s3-0 0) + (s2-0 "vi~d: ~6d #x~4,'0X ~s~%") + (s1-0 s5-0) + (s0-0 (-> (the-as (pointer uint32) (+ gp-0 (* (* s5-0 4) 4))) 0)) + ) + (set! sv-16 (-> (the-as (pointer uint32) (+ gp-0 (* (* s5-0 4) 4))) 0)) + (let ((t1-0 (tie-int-reg s5-0))) + (s4-0 s3-0 s2-0 s1-0 s0-0 sv-16 t1-0) + ) + ) + ) + ) + (none) + ) + +;; definition (debug) for function tie-floats +;; INFO: Used lq/sq +;; WARN: Return type mismatch symbol vs none. +(defun-debug tie-floats () + (local-vars (sv-16 uint) (sv-32 uint)) + (let ((gp-0 (the-as (pointer uint32) (+ #x3da0 #x1100c000)))) + (dotimes (s5-0 32) + (if (< s5-0 10) + (format 0 " ") + ) + (format + 0 + "vf~d: #x~8,'0X #x~8,'0X #x~8,'0X #x~8,'0X " + s5-0 + (-> gp-0 (* s5-0 4)) + (-> gp-0 (+ (* s5-0 4) 1)) + (-> gp-0 (+ (* s5-0 4) 2)) + (-> gp-0 (+ (* s5-0 4) 3)) + ) + (let ((s4-0 format) + (s3-0 0) + (s2-0 "~F ~F ~F ~F ~s~%") + (s1-0 (-> gp-0 (* s5-0 4))) + (s0-0 (-> gp-0 (+ (* s5-0 4) 1))) + ) + (set! sv-16 (-> gp-0 (+ (* s5-0 4) 2))) + (set! sv-32 (-> gp-0 (+ (* s5-0 4) 3))) + (let ((t2-1 (tie-float-reg s5-0))) + (s4-0 s3-0 s2-0 s1-0 s0-0 sv-16 sv-32 t2-1) + ) + ) + ) + ) + (none) + ) diff --git a/test/decompiler/reference/jak2/engine/util/profile_REF.gc b/test/decompiler/reference/jak2/engine/util/profile_REF.gc index bf574715f6..1f3f5815bf 100644 --- a/test/decompiler/reference/jak2/engine/util/profile_REF.gc +++ b/test/decompiler/reference/jak2/engine/util/profile_REF.gc @@ -196,60 +196,60 @@ ;; definition for function profile-tie-test (defun profile-tie-test ((arg0 bucket-id)) - (or (= arg0 (bucket-id bucket-9)) - (= arg0 (bucket-id bucket-20)) - (= arg0 (bucket-id bucket-31)) - (= arg0 (bucket-id bucket-42)) - (= arg0 (bucket-id bucket-53)) - (= arg0 (bucket-id bucket-64)) - (= arg0 (bucket-id bucket-10)) - (= arg0 (bucket-id bucket-21)) - (= arg0 (bucket-id bucket-32)) - (= arg0 (bucket-id bucket-43)) - (= arg0 (bucket-id bucket-54)) - (= arg0 (bucket-id bucket-65)) - (= arg0 (bucket-id bucket-12)) - (= arg0 (bucket-id bucket-23)) - (= arg0 (bucket-id bucket-34)) - (= arg0 (bucket-id bucket-45)) - (= arg0 (bucket-id bucket-56)) - (= arg0 (bucket-id bucket-67)) - (= arg0 (bucket-id bucket-13)) - (= arg0 (bucket-id bucket-24)) - (= arg0 (bucket-id bucket-35)) - (= arg0 (bucket-id bucket-46)) - (= arg0 (bucket-id bucket-57)) - (= arg0 (bucket-id bucket-68)) - (= arg0 (bucket-id bucket-17)) - (= arg0 (bucket-id bucket-28)) - (= arg0 (bucket-id bucket-39)) - (= arg0 (bucket-id bucket-50)) - (= arg0 (bucket-id bucket-61)) - (= arg0 (bucket-id bucket-72)) - (= arg0 (bucket-id bucket-129)) - (= arg0 (bucket-id bucket-139)) - (= arg0 (bucket-id bucket-149)) - (= arg0 (bucket-id bucket-159)) - (= arg0 (bucket-id bucket-169)) - (= arg0 (bucket-id bucket-179)) - (= arg0 (bucket-id bucket-130)) - (= arg0 (bucket-id bucket-140)) - (= arg0 (bucket-id bucket-150)) - (= arg0 (bucket-id bucket-160)) - (= arg0 (bucket-id bucket-170)) - (= arg0 (bucket-id bucket-180)) - (= arg0 (bucket-id bucket-135)) - (= arg0 (bucket-id bucket-145)) - (= arg0 (bucket-id bucket-155)) - (= arg0 (bucket-id bucket-165)) - (= arg0 (bucket-id bucket-175)) - (= arg0 (bucket-id bucket-185)) - (= arg0 (bucket-id bucket-136)) - (= arg0 (bucket-id bucket-146)) - (= arg0 (bucket-id bucket-156)) - (= arg0 (bucket-id bucket-166)) - (= arg0 (bucket-id bucket-176)) - (= arg0 (bucket-id bucket-186)) + (or (= arg0 (bucket-id tie-l0-tfrag)) + (= arg0 (bucket-id tie-l1-tfrag)) + (= arg0 (bucket-id tie-l2-tfrag)) + (= arg0 (bucket-id tie-l3-tfrag)) + (= arg0 (bucket-id tie-l4-tfrag)) + (= arg0 (bucket-id tie-l5-tfrag)) + (= arg0 (bucket-id etie-l0-tfrag)) + (= arg0 (bucket-id etie-l1-tfrag)) + (= arg0 (bucket-id etie-l2-tfrag)) + (= arg0 (bucket-id etie-l3-tfrag)) + (= arg0 (bucket-id etie-l4-tfrag)) + (= arg0 (bucket-id etie-l5-tfrag)) + (= arg0 (bucket-id tie-s-l0-tfrag)) + (= arg0 (bucket-id tie-s-l1-tfrag)) + (= arg0 (bucket-id tie-s-l2-tfrag)) + (= arg0 (bucket-id tie-s-l3-tfrag)) + (= arg0 (bucket-id tie-s-l4-tfrag)) + (= arg0 (bucket-id tie-s-l5-tfrag)) + (= arg0 (bucket-id etie-s-l0-tfrag)) + (= arg0 (bucket-id etie-s-l1-tfrag)) + (= arg0 (bucket-id etie-s-l2-tfrag)) + (= arg0 (bucket-id etie-s-l3-tfrag)) + (= arg0 (bucket-id etie-s-l4-tfrag)) + (= arg0 (bucket-id etie-s-l5-tfrag)) + (= arg0 (bucket-id tie-v-l0-tfrag)) + (= arg0 (bucket-id tie-v-l1-tfrag)) + (= arg0 (bucket-id tie-v-l2-tfrag)) + (= arg0 (bucket-id tie-v-l3-tfrag)) + (= arg0 (bucket-id tie-v-l4-tfrag)) + (= arg0 (bucket-id tie-v-l5-tfrag)) + (= arg0 (bucket-id tie-t-l0-alpha)) + (= arg0 (bucket-id tie-t-l1-alpha)) + (= arg0 (bucket-id tie-t-l2-alpha)) + (= arg0 (bucket-id tie-t-l3-alpha)) + (= arg0 (bucket-id tie-t-l4-alpha)) + (= arg0 (bucket-id tie-t-l5-alpha)) + (= arg0 (bucket-id etie-t-l0-alpha)) + (= arg0 (bucket-id etie-t-l1-alpha)) + (= arg0 (bucket-id etie-t-l2-alpha)) + (= arg0 (bucket-id etie-t-l3-alpha)) + (= arg0 (bucket-id etie-t-l4-alpha)) + (= arg0 (bucket-id etie-t-l5-alpha)) + (= arg0 (bucket-id tie-st-l0-alpha)) + (= arg0 (bucket-id tie-st-l1-alpha)) + (= arg0 (bucket-id tie-st-l2-alpha)) + (= arg0 (bucket-id tie-st-l3-alpha)) + (= arg0 (bucket-id tie-st-l4-alpha)) + (= arg0 (bucket-id tie-st-l5-alpha)) + (= arg0 (bucket-id etie-st-l0-alpha)) + (= arg0 (bucket-id etie-st-l1-alpha)) + (= arg0 (bucket-id etie-st-l2-alpha)) + (= arg0 (bucket-id etie-st-l3-alpha)) + (= arg0 (bucket-id etie-st-l4-alpha)) + (= arg0 (bucket-id etie-st-l5-alpha)) ) ) diff --git a/test/decompiler/test_VuDisasm.cpp b/test/decompiler/test_VuDisasm.cpp index b4706b41cc..6bac79db5d 100644 --- a/test/decompiler/test_VuDisasm.cpp +++ b/test/decompiler/test_VuDisasm.cpp @@ -72,6 +72,13 @@ TEST(VuDisasm, SpriteGlow_Jak2) { EXPECT_EQ(disasm.to_string(prog), get_expected("jak2/sprite-glow")); } +TEST(VuDisasm, Tie_Jak2) { + auto data = get_test_data("jak2/tie"); + VuDisassembler disasm(VuDisassembler::VuKind::VU1); + auto prog = disasm.disassemble(data.data(), data.size() * 4, false); + EXPECT_EQ(disasm.to_string(prog), get_expected("jak2/tie")); +} + TEST(VuDisasm, SpriteDistort) { auto data = get_test_data("sprite-distort"); VuDisassembler disasm(VuDisassembler::VuKind::VU1); diff --git a/test/decompiler/vu_reference/jak2/tie-result.txt b/test/decompiler/vu_reference/jak2/tie-result.txt new file mode 100644 index 0000000000..192da29f64 --- /dev/null +++ b/test/decompiler/vu_reference/jak2/tie-result.txt @@ -0,0 +1,1043 @@ + b L9 | nop + mr32.xyzw vf21, vf21 | nop + b L42 | nop + nop | nop + b L43 | nop + nop | nop + b L1 | nop + iaddi vi02, vi00, 0x0 | subx.xz vf21, vf23, vf21 + iaddi vi01, vi00, 0x1 | nop + lq.xyzw vf21, 969(vi00) | nop + lq.xz vf23, 968(vi00) | nop + lq.xyzw vf22, 970(vi00) | nop + isw.x vi00, 971(vi00) | nop :e + isw.y vi01, 971(vi00) | nop +L1: + lq.xyz vf01, 966(vi00) | nop + ilwr.w vi04, vi02 | nop + ilw.w vi09, 1(vi02) | nop + mtir vi06, vf21.y | nop + lqi.xyzw vf02, vi02 | suby.xz vf21, vf21, vf21 + lqi.xyzw vf03, vi02 | nop + lqi.xyzw vf04, vi02 | nop + lqi.xyzw vf05, vi02 | nop + mtir vi05, vf21.x | nop + lqi.xyzw vf06, vi02 | subw.w vf01, vf01, vf01 +L2: + iadd vi03, vi04, vi05 | nop + iadd vi04, vi04, vi06 | nop + iaddi vi09, vi09, -0x1 | nop + sqi.xyzw vf01, vi03 | nop + sqi.xyzw vf02, vi03 | nop + sqi.xyzw vf03, vi03 | nop + sqi.xyzw vf04, vi03 | nop + sqi.xyzw vf05, vi03 | nop + sqi.xyzw vf06, vi03 | nop + sqi.xyzw vf01, vi04 | nop + sqi.xyzw vf02, vi04 | nop + sqi.xyzw vf03, vi04 | nop + sqi.xyzw vf04, vi04 | nop + sqi.xyzw vf05, vi04 | nop + sqi.xyzw vf06, vi04 | nop + ilwr.w vi04, vi02 | nop + lqi.xyzw vf02, vi02 | nop + lqi.xyzw vf03, vi02 | nop + lqi.xyzw vf04, vi02 | nop + lqi.xyzw vf05, vi02 | nop + ibgtz vi09, L2 | nop + lqi.xyzw vf06, vi02 | nop + mtir vi09, vf02.w | nop + iaddi vi02, vi02, -0x2 | subw.w vf07, vf07, vf07 + ilwr.x vi07, vi02 | nop + ilwr.y vi08, vi02 | nop + ilwr.z vi04, vi02 | nop + iaddi vi09, vi09, -0x1 | nop + iaddi vi02, vi02, 0x1 | nop + ibeq vi00, vi09, L4 | nop + lq.xyz vf07, 967(vi08) | nop +L3: + iadd vi03, vi04, vi05 | nop + iadd vi04, vi04, vi06 | nop + iaddi vi09, vi09, -0x1 | nop + sq.xyzw vf07, 0(vi03) | nop + iswr.x vi07, vi03 | nop + sq.xyzw vf07, 0(vi04) | nop + iswr.x vi07, vi04 | nop + ilwr.x vi07, vi02 | nop + ilwr.y vi08, vi02 | nop + ilwr.z vi04, vi02 | nop + iaddi vi02, vi02, 0x1 | nop + ibne vi00, vi09, L3 | nop + lq.xyz vf07, 967(vi08) | nop +L4: + iaddiu vi07, vi07, 0x4000 | nop + iaddiu vi07, vi07, 0x4000 | nop + iadd vi03, vi04, vi05 | nop + iadd vi04, vi04, vi06 | nop + sq.xyzw vf07, 0(vi03) | nop + iswr.x vi07, vi03 | nop + sq.xyzw vf07, 0(vi04) | nop + iswr.x vi07, vi04 | nop + mtir vi06, vf04.x | addw.z vf15, vf00, vf00 + lq.xyzw vf05, 50(vi00) | addw.z vf16, vf00, vf00 + lq.xyw vf15, 51(vi00) | addw.z vf17, vf00, vf00 + iaddiu vi05, vi00, 0x34 | nop + nop | nop + iaddiu vi06, vi06, 0x32 | itof0.xyzw vf05, vf05 + lqi.xyzw vf06, vi05 | itof12.xy vf15, vf15 + lqi.xyw vf16, vi05 | itof0.w vf15, vf15 + 64.0 | nop :i + ibeq vi06, vi05, L6 | muli.xyz vf05, vf05, I + mtir vi07, vf04.y | itof0.xyzw vf06, vf06 +L5: + lqi.xyzw vf07, vi05 | itof12.xy vf16, vf16 + lqi.xyw vf17, vi05 | itof0.w vf16, vf16 + sq.xyzw vf15, -5(vi05) | nop + ibeq vi06, vi05, L6 | muli.xyz vf06, vf06, I + sq.xyzw vf05, -6(vi05) | itof0.xyzw vf07, vf07 + lqi.xyzw vf05, vi05 | itof12.xy vf17, vf17 + lqi.xyw vf15, vi05 | itof0.w vf17, vf17 + sq.xyzw vf16, -5(vi05) | nop + ibeq vi06, vi05, L6 | muli.xyz vf07, vf07, I + sq.xyzw vf06, -6(vi05) | itof0.xyzw vf05, vf05 + lqi.xyzw vf06, vi05 | itof12.xy vf15, vf15 + lqi.xyw vf16, vi05 | itof0.w vf15, vf15 + sq.xyzw vf17, -5(vi05) | nop + ibne vi06, vi05, L5 | muli.xyz vf05, vf05, I + sq.xyzw vf07, -6(vi05) | itof0.xyzw vf06, vf06 +L6: + lq.xyzw vf09, -4(vi05) | nop + lq.xyzw vf05, -3(vi05) | nop + lq.xyw vf15, -2(vi05) | nop + iadd vi07, vi07, vi05 | nop + iaddi vi07, vi07, -0x4 | nop + iaddi vi05, vi05, -0x1 | nop + iaddi vi08, vi05, -0x3 | nop + ibeq vi07, vi05, L8 | nop + nop | itof0.xyzw vf09, vf09 + lqi.xyzw vf10, vi05 | itof0.xyzw vf05, vf05 + lqi.xyzw vf06, vi05 | itof0.w vf15, vf15 + lqi.xyw vf16, vi05 | itof12.xy vf15, vf15 + nop | nop + nop | muli.xyz vf09, vf09, I + ibeq vi07, vi05, L8 | muli.xyz vf05, vf05, I + nop | itof0.xyzw vf10, vf10 +L7: + lqi.xyzw vf11, vi05 | itof0.xyzw vf06, vf06 + lqi.xyzw vf07, vi05 | itof0.w vf16, vf16 + lqi.xyw vf17, vi05 | itof12.xy vf16, vf16 + sqi.xyzw vf09, vi08 | nop + sqi.xyzw vf05, vi08 | muli.xyz vf10, vf10, I + ibeq vi07, vi05, L8 | muli.xyz vf06, vf06, I + sqi.xyzw vf15, vi08 | itof0.xyzw vf11, vf11 + lqi.xyzw vf09, vi05 | itof0.xyzw vf07, vf07 + lqi.xyzw vf05, vi05 | itof0.w vf17, vf17 + lqi.xyw vf15, vi05 | itof12.xy vf17, vf17 + sqi.xyzw vf10, vi08 | nop + sqi.xyzw vf06, vi08 | muli.xyz vf11, vf11, I + ibeq vi07, vi05, L8 | muli.xyz vf07, vf07, I + sqi.xyzw vf16, vi08 | itof0.xyzw vf09, vf09 + lqi.xyzw vf10, vi05 | itof0.xyzw vf05, vf05 + lqi.xyzw vf06, vi05 | itof0.w vf15, vf15 + lqi.xyw vf16, vi05 | itof12.xy vf15, vf15 + sqi.xyzw vf11, vi08 | nop + sqi.xyzw vf07, vi08 | muli.xyz vf09, vf09, I + ibne vi07, vi05, L7 | muli.xyz vf05, vf05, I + sqi.xyzw vf17, vi08 | itof0.xyzw vf10, vf10 +L8: + mtir vi01, vf04.z | nop + mtir vi05, vf02.x | nop + mtir vi14, vf02.y | nop + mtir vi04, vf03.x | nop + mtir vi06, vf03.y | nop + mtir vi07, vf03.z | nop + mtir vi08, vf03.w | nop + isw.x vi01, 971(vi00) | nop + iaddi vi15, vi00, 0x0 | nop + mtir vi03, vf22.x | nop + iaddiu vi02, vi00, 0x32 | nop + mr32.xyzw vf21, vf21 | nop + mfir.y vf23, vi00 | nop :e + mfir.w vf23, vi00 | nop +L9: + lq.xyzw vf19, 5(vi03) | subw.w vf11, vf00, vf00 + lq.xyzw vf24, 6(vi03) | subw.w vf03, vf00, vf00 + lqi.xyzw vf05, vi02 | subw.w vf04, vf00, vf00 + lq.xyzw vf13, 3(vi03) | subw.w vf14, vf00, vf00 + lq.xyzw vf01, 0(vi03) | addz.w vf11, vf11, vf19 + lq.xyzw vf02, 1(vi03) | addz.w vf03, vf03, vf19 + lq.xyzw vf12, 2(vi03) | addz.w vf04, vf04, vf19 + mtir vi09, vf24.x | addz.w vf14, vf14, vf19 + lqi.xyzw vf15, vi02 | mulaw.xyzw ACC, vf13, vf00 + lq.xyzw vf27, 4(vi03) | maddax.xyzw ACC, vf01, vf05 + ilw.y vi01, 4(vi03) | madday.xyzw ACC, vf02, vf05 + lq.xyz vf11, 838(vi09) | maddz.xyzw vf09, vf12, vf05 + lqi.xyzw vf06, vi02 | ftoi0.w vf11, vf11 + iaddi vi03, vi03, 0x7 | ftoi0.w vf03, vf03 + isw.z vi01, 971(vi00) | addx.w vf20, vf19, vf00 + mtir vi09, vf24.y | nop + div Q, vf00.w, vf09.w | mulaw.xyzw ACC, vf13, vf00 + mtir vi01, vf21.x | maddax.xyzw ACC, vf01, vf06 + lqi.xyzw vf16, vi02 | madday.xyzw ACC, vf02, vf06 + lq.xyz vf03, 838(vi09) | maddz.xyzw vf10, vf12, vf06 + isub vi01, vi01, vi15 | ftoi4.w vf19, vf19 + iadd vi04, vi04, vi01 | ftoi4.w vf20, vf20 + iadd vi06, vi06, vi01 | ftoi0.w vf04, vf04 + lqi.xyzw vf07, vi02 | mul.xyz vf09, vf09, Q + div Q, vf00.w, vf10.w | mul.xyz vf15, vf15, Q + mtir vi09, vf24.z | addx.w vf05, vf05, vf21 + lqi.xyzw vf17, vi02 | mulaw.xyzw ACC, vf13, vf00 + iadd vi07, vi07, vi01 | maddax.xyzw ACC, vf01, vf07 + iadd vi08, vi08, vi01 | madday.xyzw ACC, vf02, vf07 + lq.xyz vf04, 838(vi09) | ftoi4.xyz vf19, vf09 + nop | maddz.xyzw vf09, vf12, vf07 + iadd vi15, vi15, vi01 | ftoi0.w vf14, vf14 +L10: + mtir vi12, vf05.w | nop + lqi.xyzw vf08, vi02 | mul.xyz vf10, vf10, Q + div Q, vf00.w, vf09.w | mul.xyz vf16, vf16, Q + mtir vi09, vf24.w | addx.w vf06, vf06, vf21 + lqi.xyzw vf18, vi02 | mulaw.xyzw ACC, vf13, vf00 + sq.xyzw vf15, 0(vi12) | maddax.xyzw ACC, vf01, vf08 + sq.xyzw vf11, 1(vi12) | madday.xyzw ACC, vf02, vf08 + lq.xyz vf14, 838(vi09) | ftoi4.xyz vf20, vf10 + ibeq vi04, vi12, L13 | maddz.xyzw vf10, vf12, vf08 + sq.xyzw vf19, 2(vi12) | nop + lqi.xyzw vf24, vi03 | nop + mtir vi12, vf06.w | nop + lqi.xyzw vf05, vi02 | mul.xyz vf09, vf09, Q + div Q, vf00.w, vf10.w | mul.xyz vf17, vf17, Q + mtir vi09, vf24.x | addx.w vf07, vf07, vf21 + lqi.xyzw vf15, vi02 | mulaw.xyzw ACC, vf13, vf00 + sq.xyzw vf16, 0(vi12) | maddax.xyzw ACC, vf01, vf05 + sq.xyzw vf03, 1(vi12) | madday.xyzw ACC, vf02, vf05 + lq.xyz vf11, 838(vi09) | ftoi4.xyz vf19, vf09 + ibeq vi04, vi12, L12 | maddz.xyzw vf09, vf12, vf05 + sq.xyzw vf20, 2(vi12) | nop + mtir vi12, vf07.w | nop + lqi.xyzw vf06, vi02 | mul.xyz vf10, vf10, Q + div Q, vf00.w, vf09.w | mul.xyz vf18, vf18, Q + mtir vi09, vf24.y | addx.w vf08, vf08, vf21 + lqi.xyzw vf16, vi02 | mulaw.xyzw ACC, vf13, vf00 + sq.xyzw vf17, 0(vi12) | maddax.xyzw ACC, vf01, vf06 + sq.xyzw vf04, 1(vi12) | madday.xyzw ACC, vf02, vf06 + lq.xyz vf03, 838(vi09) | ftoi4.xyz vf20, vf10 + ibeq vi04, vi12, L11 | maddz.xyzw vf10, vf12, vf06 + sq.xyzw vf19, 2(vi12) | nop + mtir vi12, vf08.w | nop + lqi.xyzw vf07, vi02 | mul.xyz vf09, vf09, Q + div Q, vf00.w, vf10.w | mul.xyz vf15, vf15, Q + mtir vi09, vf24.z | addx.w vf05, vf05, vf21 + lqi.xyzw vf17, vi02 | mulaw.xyzw ACC, vf13, vf00 + sq.xyzw vf18, 0(vi12) | maddax.xyzw ACC, vf01, vf07 + sq.xyzw vf14, 1(vi12) | madday.xyzw ACC, vf02, vf07 + lq.xyz vf04, 838(vi09) | ftoi4.xyz vf19, vf09 + ibne vi04, vi12, L10 | maddz.xyzw vf09, vf12, vf07 + sq.xyzw vf20, 2(vi12) | nop + mtir vi12, vf05.w | nop + ibne vi00, vi05, L24 | mul.xyz vf10, vf10, Q + lqi.xyzw vf08, vi02 | mul.xyz vf16, vf16, Q + div Q, vf00.w, vf09.w | addx.w vf06, vf06, vf21 + mtir vi09, vf24.w | mulaw.xyzw ACC, vf13, vf00 + lqi.xyzw vf24, vi03 | nop + sq.xyzw vf15, 0(vi12) | addx.w vf07, vf07, vf21 + sq.xyzw vf11, 1(vi12) | maddax.xyzw ACC, vf01, vf08 + lqi.xyzw vf18, vi02 | madday.xyzw ACC, vf02, vf08 + lq.xyz vf14, 838(vi09) | ftoi4.xyz vf20, vf10 + lqi.xyzw vf05, vi02 | maddz.xyzw vf10, vf12, vf08 + sq.xyzw vf19, 2(vi12) | mul.xyz vf09, vf09, Q + mtir vi12, vf06.w | mul.xyz vf17, vf17, Q + lqi.xyzw vf15, vi02 | mulaw.xyzw ACC, vf13, vf00 + mtir vi09, vf24.x | maddax.xyzw ACC, vf01, vf05 + nop | madday.xyzw ACC, vf02, vf05 + div Q, vf00.w, vf10.w | ftoi4.xyz vf19, vf09 + sq.xyzw vf16, 0(vi12) | maddz.xyzw vf09, vf12, vf05 + sq.xyzw vf03, 1(vi12) | nop + sq.xyzw vf20, 2(vi12) | nop + mtir vi12, vf07.w | nop + lq.xyz vf11, 838(vi09) | addx.w vf08, vf08, vf21 + div Q, vf00.w, vf09.w | mul.xyz vf10, vf10, Q + sq.xyzw vf17, 0(vi12) | mul.xyz vf18, vf18, Q + sq.xyzw vf04, 1(vi12) | addx.w vf18, vf18, vf21 + sq.xyzw vf19, 2(vi12) | nop + b L14 | ftoi4.xyz vf20, vf10 + mtir vi12, vf08.w | nop +L11: + mtir vi12, vf08.w | nop + ibne vi00, vi05, L23 | mul.xyz vf09, vf09, Q + lqi.xyzw vf07, vi02 | mul.xyz vf15, vf15, Q + div Q, vf00.w, vf10.w | addx.w vf05, vf05, vf21 + mtir vi09, vf24.z | mulaw.xyzw ACC, vf13, vf00 + sq.xyzw vf18, 0(vi12) | nop + sq.xyzw vf14, 1(vi12) | maddax.xyzw ACC, vf01, vf07 + lqi.xyzw vf17, vi02 | madday.xyzw ACC, vf02, vf07 + lq.xyz vf04, 838(vi09) | ftoi4.xyz vf19, vf09 + lqi.xyzw vf08, vi02 | maddz.xyzw vf09, vf12, vf07 + sq.xyzw vf20, 2(vi12) | mul.xyz vf10, vf10, Q + mtir vi12, vf05.w | mul.xyz vf16, vf16, Q + lqi.xyzw vf18, vi02 | mulaw.xyzw ACC, vf13, vf00 + div Q, vf00.w, vf09.w | maddax.xyzw ACC, vf01, vf08 + mtir vi09, vf24.w | addx.w vf06, vf06, vf21 + lqi.xyzw vf24, vi03 | nop + sq.xyzw vf15, 0(vi12) | madday.xyzw ACC, vf02, vf08 + sq.xyzw vf11, 1(vi12) | ftoi4.xyz vf20, vf10 + sq.xyzw vf19, 2(vi12) | maddz.xyzw vf10, vf12, vf08 + mtir vi12, vf06.w | nop + lq.xyz vf14, 838(vi09) | addx.w vf07, vf07, vf21 + div Q, vf00.w, vf10.w | mul.xyz vf09, vf09, Q + sq.xyzw vf16, 0(vi12) | mul.xyz vf17, vf17, Q + sq.xyzw vf03, 1(vi12) | addx.w vf17, vf17, vf21 + sq.xyzw vf20, 2(vi12) | nop + b L17 | ftoi4.xyz vf19, vf09 + mtir vi12, vf07.w | nop +L12: + mtir vi12, vf07.w | nop + ibne vi00, vi05, L22 | mul.xyz vf10, vf10, Q + lqi.xyzw vf06, vi02 | mul.xyz vf18, vf18, Q + div Q, vf00.w, vf09.w | addx.w vf08, vf08, vf21 + mtir vi09, vf24.y | mulaw.xyzw ACC, vf13, vf00 + sq.xyzw vf17, 0(vi12) | nop + sq.xyzw vf04, 1(vi12) | maddax.xyzw ACC, vf01, vf06 + lqi.xyzw vf16, vi02 | madday.xyzw ACC, vf02, vf06 + lq.xyz vf03, 838(vi09) | ftoi4.xyz vf20, vf10 + lqi.xyzw vf07, vi02 | maddz.xyzw vf10, vf12, vf06 + sq.xyzw vf19, 2(vi12) | mul.xyz vf09, vf09, Q + mtir vi12, vf08.w | mul.xyz vf15, vf15, Q + lqi.xyzw vf17, vi02 | mulaw.xyzw ACC, vf13, vf00 + div Q, vf00.w, vf10.w | maddax.xyzw ACC, vf01, vf07 + mtir vi09, vf24.z | addx.w vf05, vf05, vf21 + sq.xyzw vf18, 0(vi12) | madday.xyzw ACC, vf02, vf07 + sq.xyzw vf14, 1(vi12) | ftoi4.xyz vf19, vf09 + sq.xyzw vf20, 2(vi12) | maddz.xyzw vf09, vf12, vf07 + mtir vi12, vf05.w | nop + lq.xyz vf04, 838(vi09) | addx.w vf06, vf06, vf21 + sq.xyzw vf15, 0(vi12) | mul.xyz vf10, vf10, Q + div Q, vf00.w, vf09.w | mul.xyz vf16, vf16, Q + sq.xyz vf11, 1(vi12) | addx.w vf16, vf16, vf21 + sq.xyzw vf19, 2(vi12) | nop + b L16 | ftoi4.xyz vf20, vf10 + mtir vi12, vf06.w | nop +L13: + lqi.xyzw vf24, vi03 | nop + mtir vi12, vf06.w | nop + ibne vi00, vi05, L21 | mul.xyz vf09, vf09, Q + lqi.xyzw vf05, vi02 | mul.xyz vf17, vf17, Q + div Q, vf00.w, vf10.w | addx.w vf07, vf07, vf21 + mtir vi09, vf24.x | mulaw.xyzw ACC, vf13, vf00 + sq.xyzw vf16, 0(vi12) | maddax.xyzw ACC, vf01, vf05 + sq.xyzw vf03, 1(vi12) | madday.xyzw ACC, vf02, vf05 + lqi.xyzw vf15, vi02 | ftoi4.xyz vf19, vf09 + lq.xyz vf11, 838(vi09) | maddz.xyzw vf09, vf12, vf05 + lqi.xyzw vf06, vi02 | addx.w vf08, vf08, vf21 + sq.xyzw vf20, 2(vi12) | mul.xyz vf10, vf10, Q + mtir vi12, vf07.w | mul.xyz vf18, vf18, Q + div Q, vf00.w, vf09.w | mulaw.xyzw ACC, vf13, vf00 + mtir vi09, vf24.y | maddax.xyzw ACC, vf01, vf06 + lqi.xyzw vf16, vi02 | madday.xyzw ACC, vf02, vf06 + sq.xyzw vf17, 0(vi12) | ftoi4.xyz vf20, vf10 + sq.xyzw vf04, 1(vi12) | maddz.xyzw vf10, vf12, vf06 + sq.xyzw vf19, 2(vi12) | nop + mtir vi12, vf08.w | nop + lq.xyz vf03, 838(vi09) | addx.w vf05, vf05, vf21 + div Q, vf00.w, vf10.w | mul.xyz vf09, vf09, Q + sq.xyzw vf18, 0(vi12) | mul.xyz vf15, vf15, Q + sq.xyzw vf14, 1(vi12) | addx.w vf15, vf15, vf21 + sq.xyzw vf20, 2(vi12) | nop + b L15 | ftoi4.xyz vf19, vf09 + mtir vi12, vf05.w | nop +L14: + lqi.xyzw vf06, vi02 | nop + mtir vi09, vf24.y | nop + mtir vi13, vf18.w | mulaw.xyzw ACC, vf13, vf00 + sq.xyzw vf18, 0(vi12) | addx.w vf05, vf05, vf21 + sq.xyzw vf14, 1(vi12) | maddax.xyzw ACC, vf01, vf06 + sq.xyzw vf20, 2(vi12) | madday.xyzw ACC, vf02, vf06 + lqi.xyzw vf16, vi02 | maddz.xyzw vf10, vf12, vf06 + lq.xyz vf03, 838(vi09) | mul.xyz vf09, vf09, Q + sq.xyzw vf18, 0(vi13) | mul.xyz vf15, vf15, Q + sq.xyzw vf14, 1(vi13) | addx.w vf15, vf15, vf21 + sq.xyzw vf20, 2(vi13) | nop + div Q, vf00.w, vf10.w | nop + ibeq vi06, vi12, L18 | ftoi4.xyz vf19, vf09 + mtir vi12, vf05.w | nop +L15: + lqi.xyzw vf07, vi02 | nop + mtir vi09, vf24.z | nop + mtir vi13, vf15.w | mulaw.xyzw ACC, vf13, vf00 + sq.xyzw vf15, 0(vi12) | addx.w vf06, vf06, vf21 + sq.xyzw vf11, 1(vi12) | maddax.xyzw ACC, vf01, vf07 + sq.xyzw vf19, 2(vi12) | madday.xyzw ACC, vf02, vf07 + lqi.xyzw vf17, vi02 | maddz.xyzw vf09, vf12, vf07 + lq.xyz vf04, 838(vi09) | mul.xyz vf10, vf10, Q + sq.xyzw vf15, 0(vi13) | mul.xyz vf16, vf16, Q + sq.xyzw vf11, 1(vi13) | addx.w vf16, vf16, vf21 + sq.xyzw vf19, 2(vi13) | nop + div Q, vf00.w, vf09.w | nop + ibeq vi06, vi12, L19 | ftoi4.xyz vf20, vf10 + mtir vi12, vf06.w | nop +L16: + lqi.xyzw vf08, vi02 | nop + mtir vi09, vf24.w | nop + lqi.xyzw vf24, vi03 | nop + mtir vi13, vf16.w | mulaw.xyzw ACC, vf13, vf00 + sq.xyzw vf16, 0(vi12) | addx.w vf07, vf07, vf21 + sq.xyzw vf03, 1(vi12) | maddax.xyzw ACC, vf01, vf08 + sq.xyzw vf20, 2(vi12) | madday.xyzw ACC, vf02, vf08 + lqi.xyzw vf18, vi02 | maddz.xyzw vf10, vf12, vf08 + lq.xyz vf14, 838(vi09) | mul.xyz vf09, vf09, Q + sq.xyzw vf16, 0(vi13) | mul.xyz vf17, vf17, Q + sq.xyzw vf03, 1(vi13) | addx.w vf17, vf17, vf21 + sq.xyzw vf20, 2(vi13) | nop + div Q, vf00.w, vf10.w | nop + ibeq vi06, vi12, L20 | ftoi4.xyz vf19, vf09 + mtir vi12, vf07.w | nop +L17: + lqi.xyzw vf05, vi02 | nop + mtir vi09, vf24.x | nop + mtir vi13, vf17.w | mulaw.xyzw ACC, vf13, vf00 + sq.xyzw vf17, 0(vi12) | addx.w vf08, vf08, vf21 + sq.xyzw vf04, 1(vi12) | maddax.xyzw ACC, vf01, vf05 + sq.xyzw vf19, 2(vi12) | madday.xyzw ACC, vf02, vf05 + lqi.xyzw vf15, vi02 | maddz.xyzw vf09, vf12, vf05 + lq.xyz vf11, 838(vi09) | mul.xyz vf10, vf10, Q + sq.xyzw vf17, 0(vi13) | mul.xyz vf18, vf18, Q + sq.xyzw vf04, 1(vi13) | addx.w vf18, vf18, vf21 + sq.xyzw vf19, 2(vi13) | nop + div Q, vf00.w, vf09.w | nop + ibne vi06, vi12, L14 | ftoi4.xyz vf20, vf10 + mtir vi12, vf08.w | nop + nop | nop + nop | nop + mtir vi13, vf18.w | nop + sq.xyzw vf18, 0(vi12) | addx.w vf05, vf05, vf21 + sq.xyzw vf14, 1(vi12) | addx.w vf15, vf15, vf21 + sq.xyzw vf20, 2(vi12) | mul.xyz vf09, vf09, Q + sq.xyzw vf18, 0(vi13) | mul.xyz vf15, vf15, Q + sq.xyzw vf14, 1(vi13) | nop + sq.xyzw vf20, 2(vi13) | nop + mtir vi12, vf05.w | ftoi4.xyz vf19, vf09 + mtir vi13, vf15.w | nop + sq.xyzw vf15, 0(vi12) | nop + sq.xyzw vf11, 1(vi12) | nop + sq.xyzw vf19, 2(vi12) | nop + sq.xyzw vf15, 0(vi13) | nop + sq.xyzw vf11, 1(vi13) | nop + ibeq vi00, vi14, L26 | nop + sq.xyzw vf19, 2(vi13) | nop + b L40 | nop + nop | nop +L18: + nop | nop + nop | nop + mtir vi13, vf15.w | nop + sq.xyzw vf15, 0(vi12) | addx.w vf06, vf06, vf21 + sq.xyzw vf11, 1(vi12) | addx.w vf16, vf16, vf21 + sq.xyzw vf19, 2(vi12) | mul.xyz vf10, vf10, Q + sq.xyzw vf15, 0(vi13) | mul.xyz vf16, vf16, Q + sq.xyzw vf11, 1(vi13) | nop + sq.xyzw vf19, 2(vi13) | nop + mtir vi12, vf06.w | ftoi4.xyz vf20, vf10 + mtir vi13, vf16.w | nop + sq.xyzw vf16, 0(vi12) | nop + sq.xyzw vf03, 1(vi12) | nop + sq.xyzw vf20, 2(vi12) | nop + sq.xyzw vf16, 0(vi13) | nop + sq.xyzw vf03, 1(vi13) | nop + ibeq vi00, vi14, L27 | nop + sq.xyzw vf20, 2(vi13) | nop + b L40 | nop + nop | nop +L19: + nop | nop + nop | nop + mtir vi13, vf16.w | nop + sq.xyzw vf16, 0(vi12) | addx.w vf07, vf07, vf21 + sq.xyzw vf03, 1(vi12) | addx.w vf17, vf17, vf21 + sq.xyzw vf20, 2(vi12) | mul.xyz vf09, vf09, Q + sq.xyzw vf16, 0(vi13) | mul.xyz vf17, vf17, Q + sq.xyzw vf03, 1(vi13) | nop + sq.xyzw vf20, 2(vi13) | nop + mtir vi12, vf07.w | ftoi4.xyz vf19, vf09 + mtir vi13, vf17.w | nop + sq.xyzw vf17, 0(vi12) | nop + sq.xyzw vf04, 1(vi12) | nop + sq.xyzw vf19, 2(vi12) | nop + sq.xyzw vf17, 0(vi13) | nop + sq.xyzw vf04, 1(vi13) | nop + ibeq vi00, vi14, L28 | nop + sq.xyzw vf19, 2(vi13) | nop + b L40 | nop + nop | nop +L20: + nop | nop + nop | nop + mtir vi13, vf17.w | nop + sq.xyzw vf17, 0(vi12) | addx.w vf08, vf08, vf21 + sq.xyzw vf04, 1(vi12) | addx.w vf18, vf18, vf21 + sq.xyzw vf19, 2(vi12) | mul.xyz vf10, vf10, Q + sq.xyzw vf17, 0(vi13) | mul.xyz vf18, vf18, Q + sq.xyzw vf04, 1(vi13) | nop + sq.xyzw vf19, 2(vi13) | nop + mtir vi12, vf08.w | ftoi4.xyz vf20, vf10 + mtir vi13, vf18.w | nop + sq.xyzw vf18, 0(vi12) | nop + sq.xyzw vf14, 1(vi12) | nop + sq.xyzw vf20, 2(vi12) | nop + sq.xyzw vf18, 0(vi13) | nop + sq.xyzw vf14, 1(vi13) | nop + ibeq vi00, vi14, L25 | nop + sq.xyzw vf20, 2(vi13) | nop + b L40 | nop + nop | nop +L21: + div Q, vf00.w, vf10.w | addx.w vf07, vf07, vf21 + sq.xyzw vf16, 0(vi12) | addx.w vf08, vf08, vf21 + sq.xyzw vf03, 1(vi12) | nop + sq.xyzw vf20, 2(vi12) | nop + iaddi vi02, vi02, -0x1 | ftoi4.xyz vf19, vf09 + nop | nop + nop | nop + nop | mul.xyz vf10, vf10, Q + mtir vi12, vf07.w | mul.xyz vf18, vf18, Q + mtir vi13, vf08.w | nop + sq.xyzw vf17, 0(vi12) | nop + sq.xyzw vf04, 1(vi12) | nop + sq.xyzw vf19, 2(vi12) | ftoi4.xyz vf20, vf10 + sq.xyzw vf18, 0(vi13) | nop + sq.xyzw vf14, 1(vi13) | nop + ibeq vi00, vi14, L25 | nop + sq.xyzw vf20, 2(vi13) | nop + b L40 | nop + nop | nop +L22: + div Q, vf00.w, vf09.w | addx.w vf08, vf08, vf21 + sq.xyzw vf17, 0(vi12) | addx.w vf05, vf05, vf21 + sq.xyzw vf04, 1(vi12) | nop + sq.xyzw vf19, 2(vi12) | nop + iaddi vi02, vi02, -0x1 | ftoi4.xyz vf20, vf10 + nop | nop + nop | nop + nop | mul.xyz vf09, vf09, Q + mtir vi12, vf08.w | mul.xyz vf15, vf15, Q + mtir vi13, vf05.w | nop + sq.xyzw vf18, 0(vi12) | nop + sq.xyzw vf14, 1(vi12) | nop + sq.xyzw vf20, 2(vi12) | ftoi4.xyz vf19, vf09 + sq.xyzw vf15, 0(vi13) | nop + sq.xyzw vf11, 1(vi13) | nop + ibeq vi00, vi14, L26 | nop + sq.xyzw vf19, 2(vi13) | nop + b L40 | nop + nop | nop +L23: + div Q, vf00.w, vf10.w | addx.w vf05, vf05, vf21 + sq.xyzw vf18, 0(vi12) | addx.w vf06, vf06, vf21 + sq.xyzw vf14, 1(vi12) | nop + sq.xyzw vf20, 2(vi12) | nop + iaddi vi02, vi02, -0x1 | ftoi4.xyz vf19, vf09 + nop | nop + nop | nop + nop | mul.xyz vf10, vf10, Q + mtir vi12, vf05.w | mul.xyz vf16, vf16, Q + mtir vi13, vf06.w | nop + sq.xyzw vf15, 0(vi12) | nop + sq.xyzw vf11, 1(vi12) | nop + sq.xyzw vf19, 2(vi12) | ftoi4.xyz vf20, vf10 + sq.xyzw vf16, 0(vi13) | nop + sq.xyzw vf03, 1(vi13) | nop + ibeq vi00, vi14, L27 | nop + sq.xyzw vf20, 2(vi13) | nop + b L40 | nop + nop | nop +L24: + div Q, vf00.w, vf09.w | addx.w vf06, vf06, vf21 + sq.xyzw vf15, 0(vi12) | addx.w vf07, vf07, vf21 + sq.xyzw vf11, 1(vi12) | nop + sq.xyzw vf19, 2(vi12) | nop + iaddi vi02, vi02, -0x1 | ftoi4.xyz vf20, vf10 + nop | nop + nop | nop + nop | mul.xyz vf09, vf09, Q + mtir vi12, vf06.w | mul.xyz vf17, vf17, Q + mtir vi13, vf07.w | nop + sq.xyzw vf16, 0(vi12) | nop + sq.xyzw vf03, 1(vi12) | nop + sq.xyzw vf20, 2(vi12) | ftoi4.xyz vf19, vf09 + sq.xyzw vf17, 0(vi13) | nop + sq.xyzw vf04, 1(vi13) | nop + ibeq vi00, vi14, L28 | nop + sq.xyzw vf19, 2(vi13) | nop + b L40 | nop + nop | nop +L25: + lqi.xyzw vf05, vi02 | nop + 0.5 | subw.w vf28, vf00, vf00 :i + lqi.xyz vf28, vi02 | addi.y vf27, vf00, I + lqi.xyzw vf15, vi02 | nop + mtir vi09, vf24.x | nop + mtir vi10, vf24.y | addx.w vf28, vf28, vf21 + mtir vi11, vf24.z | mulx.xyz vf05, vf05, vf27 + nop | nop + lq.xyz vf11, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | add.xyzw vf05, vf05, vf28 + lq.xyzw vf30, 838(vi11) | nop + nop | nop + nop | nop + nop | mulay.xyzw ACC, vf29, vf27 + lqi.xyzw vf24, vi03 | maddy.xyzw vf29, vf30, vf27 + lqi.xyzw vf06, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf05 + lqi.xyzw vf16, vi02 | madday.xyzw ACC, vf02, vf05 + nop | maddz.xyzw vf09, vf12, vf05 + mtir vi09, vf24.x | mulaw.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | maddz.xyz vf11, vf11, vf27 + mtir vi11, vf24.z | mulx.xyz vf06, vf06, vf27 + nop | nop + lq.xyz vf03, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | add.xyzw vf06, vf06, vf28 + lq.xyzw vf30, 838(vi11) | nop + div Q, vf00.w, vf09.w | nop + nop | nop + nop | mulay.xyzw ACC, vf29, vf27 + lqi.xyzw vf24, vi03 | maddy.xyzw vf29, vf30, vf27 + lqi.xyzw vf07, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf06 + lqi.xyzw vf17, vi02 | madday.xyzw ACC, vf02, vf06 + nop | maddz.xyzw vf10, vf12, vf06 + mtir vi09, vf24.x | mulaw.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | mulx.xyz vf07, vf07, vf27 + mtir vi11, vf24.z | maddz.xyz vf03, vf03, vf27 + nop | mul.xyz vf19, vf09, Q + lq.xyz vf04, 838(vi09) | mul.xyz vf15, vf15, Q + lq.xyzw vf29, 838(vi10) | add.xyzw vf07, vf07, vf28 + lq.xyzw vf30, 838(vi11) | nop + div Q, vf00.w, vf10.w | ftoi4.xyz vf19, vf19 + nop | nop + b L29 | mulay.xyzw ACC, vf29, vf27 + lqi.xyzw vf24, vi03 | maddy.xyzw vf29, vf30, vf27 +L26: + lqi.xyzw vf06, vi02 | nop + lqi.xyzw vf24, vi03 | subw.w vf28, vf00, vf00 + 0.5 | nop :i + lqi.xyz vf28, vi02 | addi.y vf27, vf00, I + lqi.xyzw vf16, vi02 | nop + mtir vi09, vf24.x | addx.w vf28, vf28, vf21 + mtir vi10, vf24.y | nop + mtir vi11, vf24.z | mulx.xyz vf06, vf06, vf27 + nop | nop + lq.xyz vf03, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | add.xyzw vf06, vf06, vf28 + lq.xyzw vf30, 838(vi11) | nop + nop | nop + nop | nop + nop | mulay.xyzw ACC, vf29, vf27 + lqi.xyzw vf24, vi03 | maddy.xyzw vf29, vf30, vf27 + lqi.xyzw vf07, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf06 + lqi.xyzw vf17, vi02 | madday.xyzw ACC, vf02, vf06 + nop | maddz.xyzw vf10, vf12, vf06 + mtir vi09, vf24.x | mulaw.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | maddz.xyz vf03, vf03, vf27 + mtir vi11, vf24.z | mulx.xyz vf07, vf07, vf27 + nop | nop + lq.xyz vf04, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | add.xyzw vf07, vf07, vf28 + lq.xyzw vf30, 838(vi11) | nop + div Q, vf00.w, vf10.w | nop + nop | nop + nop | mulay.xyzw ACC, vf29, vf27 + lqi.xyzw vf24, vi03 | maddy.xyzw vf29, vf30, vf27 + lqi.xyzw vf08, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf07 + lqi.xyzw vf18, vi02 | madday.xyzw ACC, vf02, vf07 + nop | maddz.xyzw vf09, vf12, vf07 + mtir vi09, vf24.x | mulaw.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | mulx.xyz vf08, vf08, vf27 + mtir vi11, vf24.z | maddz.xyz vf04, vf04, vf27 + nop | mul.xyz vf20, vf10, Q + lq.xyz vf14, 838(vi09) | mul.xyz vf16, vf16, Q + lq.xyzw vf29, 838(vi10) | add.xyzw vf08, vf08, vf28 + lq.xyzw vf30, 838(vi11) | nop + div Q, vf00.w, vf09.w | ftoi4.xyz vf20, vf20 + nop | nop + b L30 | mulay.xyzw ACC, vf29, vf27 + lqi.xyzw vf24, vi03 | maddy.xyzw vf29, vf30, vf27 +L27: + lqi.xyzw vf07, vi02 | nop + lqi.xyzw vf24, vi03 | subw.w vf28, vf00, vf00 + 0.5 | nop :i + lqi.xyz vf28, vi02 | addi.y vf27, vf00, I + lqi.xyzw vf17, vi02 | nop + mtir vi09, vf24.x | addx.w vf28, vf28, vf21 + mtir vi10, vf24.y | nop + mtir vi11, vf24.z | mulx.xyz vf07, vf07, vf27 + nop | nop + lq.xyz vf04, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | add.xyzw vf07, vf07, vf28 + lq.xyzw vf30, 838(vi11) | nop + nop | nop + nop | nop + nop | mulay.xyzw ACC, vf29, vf27 + lqi.xyzw vf24, vi03 | maddy.xyzw vf29, vf30, vf27 + lqi.xyzw vf08, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf07 + lqi.xyzw vf18, vi02 | madday.xyzw ACC, vf02, vf07 + nop | maddz.xyzw vf09, vf12, vf07 + mtir vi09, vf24.x | mulaw.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | maddz.xyz vf04, vf04, vf27 + mtir vi11, vf24.z | mulx.xyz vf08, vf08, vf27 + nop | nop + lq.xyz vf14, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | add.xyzw vf08, vf08, vf28 + lq.xyzw vf30, 838(vi11) | nop + div Q, vf00.w, vf09.w | nop + nop | nop + nop | mulay.xyzw ACC, vf29, vf27 + lqi.xyzw vf24, vi03 | maddy.xyzw vf29, vf30, vf27 + lqi.xyzw vf05, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf08 + lqi.xyzw vf15, vi02 | madday.xyzw ACC, vf02, vf08 + nop | maddz.xyzw vf10, vf12, vf08 + mtir vi09, vf24.x | mulaw.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | mulx.xyz vf05, vf05, vf27 + mtir vi11, vf24.z | maddz.xyz vf14, vf14, vf27 + nop | mul.xyz vf19, vf09, Q + lq.xyz vf11, 838(vi09) | mul.xyz vf17, vf17, Q + lq.xyzw vf29, 838(vi10) | add.xyzw vf05, vf05, vf28 + lq.xyzw vf30, 838(vi11) | nop + div Q, vf00.w, vf10.w | ftoi4.xyz vf19, vf19 + nop | nop + b L31 | mulay.xyzw ACC, vf29, vf27 + lqi.xyzw vf24, vi03 | maddy.xyzw vf29, vf30, vf27 +L28: + lqi.xyzw vf08, vi02 | nop + lqi.xyzw vf24, vi03 | subw.w vf28, vf00, vf00 + 0.5 | nop :i + lqi.xyz vf28, vi02 | addi.y vf27, vf00, I + lqi.xyzw vf18, vi02 | nop + mtir vi09, vf24.x | addx.w vf28, vf28, vf21 + mtir vi10, vf24.y | nop + mtir vi11, vf24.z | mulx.xyz vf08, vf08, vf27 + nop | nop + lq.xyz vf14, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | add.xyzw vf08, vf08, vf28 + lq.xyzw vf30, 838(vi11) | nop + nop | nop + nop | nop + nop | mulay.xyzw ACC, vf29, vf27 + lqi.xyzw vf24, vi03 | maddy.xyzw vf29, vf30, vf27 + lqi.xyzw vf05, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf08 + lqi.xyzw vf15, vi02 | madday.xyzw ACC, vf02, vf08 + nop | maddz.xyzw vf10, vf12, vf08 + mtir vi09, vf24.x | mulaw.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | maddz.xyz vf14, vf14, vf27 + mtir vi11, vf24.z | mulx.xyz vf05, vf05, vf27 + nop | nop + lq.xyz vf11, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | add.xyzw vf05, vf05, vf28 + lq.xyzw vf30, 838(vi11) | nop + div Q, vf00.w, vf10.w | nop + nop | nop + nop | mulay.xyzw ACC, vf29, vf27 + lqi.xyzw vf24, vi03 | maddy.xyzw vf29, vf30, vf27 + lqi.xyzw vf06, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf05 + lqi.xyzw vf16, vi02 | madday.xyzw ACC, vf02, vf05 + nop | maddz.xyzw vf09, vf12, vf05 + mtir vi09, vf24.x | mulaw.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | mulx.xyz vf06, vf06, vf27 + mtir vi11, vf24.z | maddz.xyz vf11, vf11, vf27 + nop | mul.xyz vf20, vf10, Q + lq.xyz vf03, 838(vi09) | mul.xyz vf18, vf18, Q + lq.xyzw vf29, 838(vi10) | add.xyzw vf06, vf06, vf28 + lq.xyzw vf30, 838(vi11) | nop + div Q, vf00.w, vf09.w | ftoi4.xyz vf20, vf20 + nop | nop + b L32 | mulay.xyzw ACC, vf29, vf27 + lqi.xyzw vf24, vi03 | maddy.xyzw vf29, vf30, vf27 +L29: + lqi.xyzw vf08, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf07 + lqi.xyzw vf18, vi02 | madday.xyzw ACC, vf02, vf07 + mtir vi12, vf05.w | maddz.xyzw vf09, vf12, vf07 + mtir vi09, vf24.x | mulaw.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | maddz.xyz vf04, vf04, vf27 + mtir vi11, vf24.z | mulx.xyz vf08, vf08, vf27 + sq.xyzw vf15, 0(vi12) | mul.xyz vf20, vf10, Q + lq.xyz vf14, 838(vi09) | mul.xyz vf16, vf16, Q + lq.xyzw vf29, 838(vi10) | nop + lq.xyzw vf30, 838(vi11) | nop + div Q, vf00.w, vf09.w | ftoi4.xyz vf20, vf20 + sq.xyzw vf11, 1(vi12) | add.xyzw vf08, vf08, vf28 + lqi.xyzw vf24, vi03 | mulay.xyzw ACC, vf29, vf27 + ibeq vi07, vi12, L33 | nop + sq.xyzw vf19, 2(vi12) | maddy.xyzw vf29, vf30, vf27 +L30: + lqi.xyzw vf05, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf08 + lqi.xyzw vf15, vi02 | madday.xyzw ACC, vf02, vf08 + mtir vi12, vf06.w | maddz.xyzw vf10, vf12, vf08 + mtir vi09, vf24.x | mulaw.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | maddz.xyz vf14, vf14, vf27 + mtir vi11, vf24.z | mulx.xyz vf05, vf05, vf27 + sq.xyzw vf16, 0(vi12) | mul.xyz vf19, vf09, Q + lq.xyz vf11, 838(vi09) | mul.xyz vf17, vf17, Q + lq.xyzw vf29, 838(vi10) | nop + lq.xyzw vf30, 838(vi11) | nop + div Q, vf00.w, vf10.w | ftoi4.xyz vf19, vf19 + sq.xyzw vf03, 1(vi12) | add.xyzw vf05, vf05, vf28 + lqi.xyzw vf24, vi03 | mulay.xyzw ACC, vf29, vf27 + ibeq vi07, vi12, L34 | nop + sq.xyzw vf20, 2(vi12) | maddy.xyzw vf29, vf30, vf27 +L31: + lqi.xyzw vf06, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf05 + lqi.xyzw vf16, vi02 | madday.xyzw ACC, vf02, vf05 + mtir vi12, vf07.w | maddz.xyzw vf09, vf12, vf05 + mtir vi09, vf24.x | mulaw.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | maddz.xyz vf11, vf11, vf27 + mtir vi11, vf24.z | mulx.xyz vf06, vf06, vf27 + sq.xyzw vf17, 0(vi12) | mul.xyz vf20, vf10, Q + lq.xyz vf03, 838(vi09) | mul.xyz vf18, vf18, Q + lq.xyzw vf29, 838(vi10) | nop + lq.xyzw vf30, 838(vi11) | nop + div Q, vf00.w, vf09.w | ftoi4.xyz vf20, vf20 + sq.xyzw vf04, 1(vi12) | add.xyzw vf06, vf06, vf28 + lqi.xyzw vf24, vi03 | mulay.xyzw ACC, vf29, vf27 + ibeq vi07, vi12, L35 | nop + sq.xyzw vf19, 2(vi12) | maddy.xyzw vf29, vf30, vf27 +L32: + lqi.xyzw vf07, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf06 + lqi.xyzw vf17, vi02 | madday.xyzw ACC, vf02, vf06 + mtir vi12, vf08.w | maddz.xyzw vf10, vf12, vf06 + mtir vi09, vf24.x | mulaw.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | maddz.xyz vf03, vf03, vf27 + mtir vi11, vf24.z | mul.xyz vf19, vf09, Q + sq.xyzw vf18, 0(vi12) | mul.xyz vf15, vf15, Q + lq.xyz vf04, 838(vi09) | mulx.xyz vf07, vf07, vf27 + lq.xyzw vf29, 838(vi10) | nop + lq.xyzw vf30, 838(vi11) | nop + div Q, vf00.w, vf10.w | ftoi4.xyz vf19, vf19 + sq.xyzw vf14, 1(vi12) | add.xyzw vf07, vf07, vf28 + lqi.xyzw vf24, vi03 | mulay.xyzw ACC, vf29, vf27 + ibne vi07, vi12, L29 | nop + sq.xyzw vf20, 2(vi12) | maddy.xyzw vf29, vf30, vf27 + mtir vi12, vf05.w | addx.w vf15, vf15, vf21 + lqi.xyzw vf08, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf07 + lqi.xyzw vf18, vi02 | madday.xyzw ACC, vf02, vf07 + mtir vi13, vf15.w | maddz.xyzw vf09, vf12, vf07 + mtir vi09, vf24.x | mul.xyz vf16, vf16, Q + mtir vi10, vf24.y | mul.xyz vf10, vf10, Q + mtir vi11, vf24.z | nop + sq.xyzw vf11, 1(vi12) | addx.w vf17, vf17, vf21 + div Q, vf00.w, vf09.w | mulx.xyz vf08, vf08, vf27 + sq.xyzw vf15, 0(vi12) | ftoi4.xyz vf20, vf10 + sq.xyzw vf19, 2(vi12) | mulaw.xyzw ACC, vf29, vf27 + sq.xyzw vf15, 0(vi13) | maddz.xyz vf04, vf04, vf27 + sq.xyzw vf11, 1(vi13) | add.xyzw vf08, vf08, vf28 + sq.xyzw vf19, 2(vi13) | addx.w vf16, vf16, vf21 + lq.xyz vf14, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | mulaw.xyzw ACC, vf13, vf00 + lq.xyzw vf30, 838(vi11) | nop + lqi.xyzw vf24, vi03 | nop + ibne vi08, vi12, L36 | nop + mtir vi12, vf06.w | maddax.xyzw ACC, vf01, vf08 + b L40 | nop + nop | nop +L33: + mtir vi12, vf06.w | addx.w vf16, vf16, vf21 + lqi.xyzw vf05, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf08 + lqi.xyzw vf15, vi02 | madday.xyzw ACC, vf02, vf08 + mtir vi13, vf16.w | maddz.xyzw vf10, vf12, vf08 + mtir vi09, vf24.x | mul.xyz vf17, vf17, Q + mtir vi10, vf24.y | mul.xyz vf09, vf09, Q + mtir vi11, vf24.z | nop + sq.xyzw vf03, 1(vi12) | addx.w vf18, vf18, vf21 + div Q, vf00.w, vf10.w | mulx.xyz vf05, vf05, vf27 + sq.xyzw vf16, 0(vi12) | ftoi4.xyz vf19, vf09 + sq.xyzw vf20, 2(vi12) | mulaw.xyzw ACC, vf29, vf27 + sq.xyzw vf16, 0(vi13) | maddz.xyz vf14, vf14, vf27 + sq.xyzw vf03, 1(vi13) | add.xyzw vf05, vf05, vf28 + sq.xyzw vf20, 2(vi13) | addx.w vf17, vf17, vf21 + lq.xyz vf11, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | mulaw.xyzw ACC, vf13, vf00 + lq.xyzw vf30, 838(vi11) | nop + lqi.xyzw vf24, vi03 | nop + ibne vi08, vi12, L37 | nop + mtir vi12, vf07.w | maddax.xyzw ACC, vf01, vf05 + b L40 | nop + nop | nop +L34: + mtir vi12, vf07.w | addx.w vf17, vf17, vf21 + lqi.xyzw vf06, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf05 + lqi.xyzw vf16, vi02 | madday.xyzw ACC, vf02, vf05 + mtir vi13, vf17.w | maddz.xyzw vf09, vf12, vf05 + mtir vi09, vf24.x | mul.xyz vf18, vf18, Q + mtir vi10, vf24.y | mul.xyz vf10, vf10, Q + mtir vi11, vf24.z | nop + sq.xyzw vf04, 1(vi12) | addx.w vf15, vf15, vf21 + div Q, vf00.w, vf09.w | mulx.xyz vf06, vf06, vf27 + sq.xyzw vf17, 0(vi12) | ftoi4.xyz vf20, vf10 + sq.xyzw vf19, 2(vi12) | mulaw.xyzw ACC, vf29, vf27 + sq.xyzw vf17, 0(vi13) | maddz.xyz vf11, vf11, vf27 + sq.xyzw vf04, 1(vi13) | add.xyzw vf06, vf06, vf28 + sq.xyzw vf19, 2(vi13) | addx.w vf18, vf18, vf21 + lq.xyz vf03, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | mulaw.xyzw ACC, vf13, vf00 + lq.xyzw vf30, 838(vi11) | nop + lqi.xyzw vf24, vi03 | nop + ibne vi08, vi12, L38 | nop + mtir vi12, vf08.w | maddax.xyzw ACC, vf01, vf06 + b L40 | nop + nop | nop +L35: + mtir vi12, vf08.w | addx.w vf18, vf18, vf21 + lqi.xyzw vf07, vi02 | mulaw.xyzw ACC, vf13, vf00 + lqi.xyz vf28, vi02 | maddax.xyzw ACC, vf01, vf06 + lqi.xyzw vf17, vi02 | madday.xyzw ACC, vf02, vf06 + mtir vi13, vf18.w | maddz.xyzw vf10, vf12, vf06 + mtir vi09, vf24.x | mul.xyz vf15, vf15, Q + mtir vi10, vf24.y | mul.xyz vf09, vf09, Q + mtir vi11, vf24.z | nop + sq.xyzw vf14, 1(vi12) | addx.w vf16, vf16, vf21 + div Q, vf00.w, vf10.w | mulx.xyz vf07, vf07, vf27 + sq.xyzw vf18, 0(vi12) | ftoi4.xyz vf19, vf09 + sq.xyzw vf20, 2(vi12) | mulaw.xyzw ACC, vf29, vf27 + sq.xyzw vf18, 0(vi13) | maddz.xyz vf03, vf03, vf27 + sq.xyzw vf14, 1(vi13) | add.xyzw vf07, vf07, vf28 + sq.xyzw vf20, 2(vi13) | addx.w vf15, vf15, vf21 + lq.xyz vf04, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | mulaw.xyzw ACC, vf13, vf00 + lq.xyzw vf30, 838(vi11) | nop + lqi.xyzw vf24, vi03 | nop + ibne vi08, vi12, L39 | nop + mtir vi12, vf05.w | maddax.xyzw ACC, vf01, vf07 + b L40 | nop + nop | nop +L36: + lqi.xyzw vf05, vi02 | madday.xyzw ACC, vf02, vf08 + lqi.xyz vf28, vi02 | maddz.xyzw vf10, vf12, vf08 + lqi.xyzw vf15, vi02 | mul.xyz vf17, vf17, Q + mtir vi13, vf16.w | mul.xyz vf09, vf09, Q + mtir vi09, vf24.x | mulay.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | maddy.xyzw vf29, vf30, vf27 + mtir vi11, vf24.z | nop + sq.xyzw vf03, 1(vi12) | ftoi4.xyz vf19, vf09 + div Q, vf00.w, vf10.w | mulx.xyz vf05, vf05, vf27 + sq.xyzw vf16, 0(vi12) | addx.w vf18, vf18, vf21 + sq.xyzw vf20, 2(vi12) | mulaw.xyzw ACC, vf29, vf27 + sq.xyzw vf16, 0(vi13) | maddz.xyz vf14, vf14, vf27 + sq.xyzw vf03, 1(vi13) | add.xyzw vf05, vf05, vf28 + sq.xyzw vf20, 2(vi13) | nop + lq.xyz vf11, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | mulaw.xyzw ACC, vf13, vf00 + lq.xyzw vf30, 838(vi11) | nop + lqi.xyzw vf24, vi03 | nop + ibeq vi08, vi12, L40 | nop + mtir vi12, vf07.w | maddax.xyzw ACC, vf01, vf05 +L37: + lqi.xyzw vf06, vi02 | madday.xyzw ACC, vf02, vf05 + lqi.xyz vf28, vi02 | maddz.xyzw vf09, vf12, vf05 + lqi.xyzw vf16, vi02 | mul.xyz vf18, vf18, Q + mtir vi13, vf17.w | mul.xyz vf10, vf10, Q + mtir vi09, vf24.x | mulay.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | maddy.xyzw vf29, vf30, vf27 + mtir vi11, vf24.z | nop + sq.xyzw vf04, 1(vi12) | ftoi4.xyz vf20, vf10 + div Q, vf00.w, vf09.w | mulx.xyz vf06, vf06, vf27 + sq.xyzw vf17, 0(vi12) | addx.w vf15, vf15, vf21 + sq.xyzw vf19, 2(vi12) | mulaw.xyzw ACC, vf29, vf27 + sq.xyzw vf17, 0(vi13) | maddz.xyz vf11, vf11, vf27 + sq.xyzw vf04, 1(vi13) | add.xyzw vf06, vf06, vf28 + sq.xyzw vf19, 2(vi13) | nop + lq.xyz vf03, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | mulaw.xyzw ACC, vf13, vf00 + lq.xyzw vf30, 838(vi11) | nop + lqi.xyzw vf24, vi03 | nop + ibeq vi08, vi12, L40 | nop + mtir vi12, vf08.w | maddax.xyzw ACC, vf01, vf06 +L38: + lqi.xyzw vf07, vi02 | madday.xyzw ACC, vf02, vf06 + lqi.xyz vf28, vi02 | maddz.xyzw vf10, vf12, vf06 + lqi.xyzw vf17, vi02 | mul.xyz vf15, vf15, Q + mtir vi13, vf18.w | mul.xyz vf09, vf09, Q + mtir vi09, vf24.x | mulay.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | maddy.xyzw vf29, vf30, vf27 + mtir vi11, vf24.z | nop + sq.xyzw vf14, 1(vi12) | ftoi4.xyz vf19, vf09 + div Q, vf00.w, vf10.w | mulx.xyz vf07, vf07, vf27 + sq.xyzw vf18, 0(vi12) | addx.w vf16, vf16, vf21 + sq.xyzw vf20, 2(vi12) | mulaw.xyzw ACC, vf29, vf27 + sq.xyzw vf18, 0(vi13) | maddz.xyz vf03, vf03, vf27 + sq.xyzw vf14, 1(vi13) | add.xyzw vf07, vf07, vf28 + sq.xyzw vf20, 2(vi13) | nop + lq.xyz vf04, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | mulaw.xyzw ACC, vf13, vf00 + lq.xyzw vf30, 838(vi11) | nop + lqi.xyzw vf24, vi03 | nop + ibeq vi08, vi12, L40 | nop + mtir vi12, vf05.w | maddax.xyzw ACC, vf01, vf07 +L39: + lqi.xyzw vf08, vi02 | madday.xyzw ACC, vf02, vf07 + lqi.xyz vf28, vi02 | maddz.xyzw vf09, vf12, vf07 + lqi.xyzw vf18, vi02 | mul.xyz vf16, vf16, Q + mtir vi13, vf15.w | mul.xyz vf10, vf10, Q + mtir vi09, vf24.x | mulay.xyzw ACC, vf29, vf27 + mtir vi10, vf24.y | maddy.xyzw vf29, vf30, vf27 + mtir vi11, vf24.z | nop + sq.xyzw vf11, 1(vi12) | ftoi4.xyz vf20, vf10 + div Q, vf00.w, vf09.w | mulx.xyz vf08, vf08, vf27 + sq.xyzw vf15, 0(vi12) | addx.w vf17, vf17, vf21 + sq.xyzw vf19, 2(vi12) | mulaw.xyzw ACC, vf29, vf27 + sq.xyzw vf15, 0(vi13) | maddz.xyz vf04, vf04, vf27 + sq.xyzw vf11, 1(vi13) | add.xyzw vf08, vf08, vf28 + sq.xyzw vf19, 2(vi13) | nop + lq.xyz vf14, 838(vi09) | nop + lq.xyzw vf29, 838(vi10) | mulaw.xyzw ACC, vf13, vf00 + lq.xyzw vf30, 838(vi11) | nop + lqi.xyzw vf24, vi03 | nop + ibne vi08, vi12, L36 | nop + mtir vi12, vf06.w | maddax.xyzw ACC, vf01, vf08 +L40: + ilw.x vi01, 971(vi00) | nop + ilw.y vi12, 971(vi00) | nop + ilw.z vi02, 971(vi00) | nop + lq.xyzw vf05, 972(vi00) | nop + lq.xyzw vf06, 973(vi00) | nop + lq.xyzw vf07, 974(vi00) | nop + lq.xyzw vf08, 975(vi00) | nop + sq.xyzw vf05, 976(vi00) | nop + sq.xyzw vf06, 977(vi00) | nop + isw.y vi02, 977(vi00) | nop + ibeq vi00, vi01, L41 | nop + sq.xyzw vf07, 978(vi00) | nop + sq.xyzw vf08, 978(vi00) | nop +L41: + iaddiu vi02, vi00, 0x3d0 | nop + isw.y vi01, 971(vi00) | nop + nop | nop + xgkick vi02 | nop + mtir vi01, vf21.x | nop + mtir vi12, vf23.w | nop + mr32.xyzw vf22, vf22 | nop + iaddiu vi02, vi00, 0x32 | nop + mfir.y vf23, vi00 | nop + xgkick vi01 | nop :e + mtir vi03, vf22.x | nop +L42: + mtir vi01, vf23.y | nop + mtir vi12, vf23.w | nop + mr32.xyzw vf22, vf22 | nop + iaddiu vi02, vi00, 0x32 | nop + iadd vi01, vi01, vi15 | nop + mfir.y vf23, vi12 | nop :e + mtir vi03, vf22.x | nop +L43: + nop | nop :e + nop | nop + lq. vf00, 0(vi00) | addx. vf00, vf00, vf00 diff --git a/test/decompiler/vu_reference/jak2/tie.txt b/test/decompiler/vu_reference/jak2/tie.txt new file mode 100644 index 0000000000..06e033222a --- /dev/null +++ b/test/decompiler/vu_reference/jak2/tie.txt @@ -0,0 +1,2000 @@ +.word 0x40000098 +.word 0x2ff +.word 0x81f5ab3d +.word 0x2ff +.word 0x400003db +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x400003e0 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x40000007 +.word 0x2ff +.word 0x80020032 +.word 0x155bd44 +.word 0x80010072 +.word 0x2ff +.word 0x1f503c9 +.word 0x2ff +.word 0x15703c8 +.word 0x2ff +.word 0x1f603ca +.word 0x2ff +.word 0xb0003cb +.word 0x400002ff +.word 0xa8103cb +.word 0x2ff +.word 0x1c103c6 +.word 0x2ff +.word 0x802413fe +.word 0x2ff +.word 0x8291001 +.word 0x2ff +.word 0x8026abfc +.word 0x2ff +.word 0x81e2137c +.word 0x155ad45 +.word 0x81e3137c +.word 0x2ff +.word 0x81e4137c +.word 0x2ff +.word 0x81e5137c +.word 0x2ff +.word 0x8005abfc +.word 0x2ff +.word 0x81e6137c +.word 0x210847 +.word 0x800520f0 +.word 0x2ff +.word 0x80062130 +.word 0x2ff +.word 0x80094ff2 +.word 0x2ff +.word 0x81e30b7d +.word 0x2ff +.word 0x81e3137d +.word 0x2ff +.word 0x81e31b7d +.word 0x2ff +.word 0x81e3237d +.word 0x2ff +.word 0x81e32b7d +.word 0x2ff +.word 0x81e3337d +.word 0x2ff +.word 0x81e40b7d +.word 0x2ff +.word 0x81e4137d +.word 0x2ff +.word 0x81e41b7d +.word 0x2ff +.word 0x81e4237d +.word 0x2ff +.word 0x81e42b7d +.word 0x2ff +.word 0x81e4337d +.word 0x2ff +.word 0x802413fe +.word 0x2ff +.word 0x81e2137c +.word 0x2ff +.word 0x81e3137c +.word 0x2ff +.word 0x81e4137c +.word 0x2ff +.word 0x81e5137c +.word 0x2ff +.word 0x5a004feb +.word 0x2ff +.word 0x81e6137c +.word 0x2ff +.word 0x806913fc +.word 0x2ff +.word 0x800217b2 +.word 0x2739c7 +.word 0x810713fe +.word 0x2ff +.word 0x808813fe +.word 0x2ff +.word 0x804413fe +.word 0x2ff +.word 0x80094ff2 +.word 0x2ff +.word 0x80021072 +.word 0x2ff +.word 0x5000480e +.word 0x2ff +.word 0x1c743c7 +.word 0x2ff +.word 0x800520f0 +.word 0x2ff +.word 0x80062130 +.word 0x2ff +.word 0x80094ff2 +.word 0x2ff +.word 0x3e33800 +.word 0x2ff +.word 0x81071bff +.word 0x2ff +.word 0x3e43800 +.word 0x2ff +.word 0x810723ff +.word 0x2ff +.word 0x810713fe +.word 0x2ff +.word 0x808813fe +.word 0x2ff +.word 0x804413fe +.word 0x2ff +.word 0x80021072 +.word 0x2ff +.word 0x52004ff4 +.word 0x2ff +.word 0x1c743c7 +.word 0x2ff +.word 0x11073800 +.word 0x2ff +.word 0x11073800 +.word 0x2ff +.word 0x800520f0 +.word 0x2ff +.word 0x80062130 +.word 0x2ff +.word 0x3e33800 +.word 0x2ff +.word 0x81071bff +.word 0x2ff +.word 0x3e43800 +.word 0x2ff +.word 0x810723ff +.word 0x2ff +.word 0x800623fc +.word 0x4003c3 +.word 0x1e50032 +.word 0x400403 +.word 0x1af0033 +.word 0x400443 +.word 0x10050034 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x10063032 +.word 0x1e5293c +.word 0x81e62b7c +.word 0x18f793e +.word 0x81b02b7c +.word 0x2f793c +.word 0x42800000 +.word 0x800002ff +.word 0x50062810 +.word 0x1c0295e +.word 0x802723fc +.word 0x1e6313c +.word 0x81e72b7c +.word 0x190813e +.word 0x81b12b7c +.word 0x30813c +.word 0x3e57ffb +.word 0x2ff +.word 0x5006280b +.word 0x1c0319e +.word 0x3e52ffa +.word 0x1e7393c +.word 0x81e52b7c +.word 0x191893e +.word 0x81af2b7c +.word 0x31893c +.word 0x3e587fb +.word 0x2ff +.word 0x50062806 +.word 0x1c039de +.word 0x3e537fa +.word 0x1e5293c +.word 0x81e62b7c +.word 0x18f793e +.word 0x81b02b7c +.word 0x2f793c +.word 0x3e58ffb +.word 0x2ff +.word 0x52062ff2 +.word 0x1c0295e +.word 0x3e53ffa +.word 0x1e6313c +.word 0x1e92ffc +.word 0x2ff +.word 0x1e52ffd +.word 0x2ff +.word 0x1af2ffe +.word 0x2ff +.word 0x800539f0 +.word 0x2ff +.word 0x80073f32 +.word 0x2ff +.word 0x80052ff2 +.word 0x2ff +.word 0x80082f72 +.word 0x2ff +.word 0x5007281d +.word 0x2ff +.word 0x80000030 +.word 0x1e9493c +.word 0x81ea2b7c +.word 0x1e5293c +.word 0x81e62b7c +.word 0x2f793c +.word 0x81b02b7c +.word 0x18f793e +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1c04a5e +.word 0x50072816 +.word 0x1c0295e +.word 0x80000030 +.word 0x1ea513c +.word 0x81eb2b7c +.word 0x1e6313c +.word 0x81e72b7c +.word 0x30813c +.word 0x81b12b7c +.word 0x190813e +.word 0x81e84b7d +.word 0x2ff +.word 0x81e82b7d +.word 0x1c0529e +.word 0x5007280f +.word 0x1c0319e +.word 0x81e87b7d +.word 0x1eb593c +.word 0x81e92b7c +.word 0x1e7393c +.word 0x81e52b7c +.word 0x31893c +.word 0x81af2b7c +.word 0x191893e +.word 0x81e8537d +.word 0x2ff +.word 0x81e8337d +.word 0x1c05ade +.word 0x50072808 +.word 0x1c039de +.word 0x81e8837d +.word 0x1e9493c +.word 0x81ea2b7c +.word 0x1e5293c +.word 0x81e62b7c +.word 0x2f793c +.word 0x81b02b7c +.word 0x18f793e +.word 0x81e85b7d +.word 0x2ff +.word 0x81e83b7d +.word 0x1c04a5e +.word 0x52072fec +.word 0x1c0295e +.word 0x81e88b7d +.word 0x1ea513c +.word 0x804123fc +.word 0x2ff +.word 0x800513fc +.word 0x2ff +.word 0x802e13fc +.word 0x2ff +.word 0x80041bfc +.word 0x2ff +.word 0x80261bfc +.word 0x2ff +.word 0x80471bfc +.word 0x2ff +.word 0x80681bfc +.word 0x2ff +.word 0xb0103cb +.word 0x2ff +.word 0x800f0032 +.word 0x2ff +.word 0x8003b3fc +.word 0x2ff +.word 0x10020032 +.word 0x2ff +.word 0x81f5ab3d +.word 0x2ff +.word 0x809703fd +.word 0x400002ff +.word 0x803703fd +.word 0x2ff +.word 0x1f31805 +.word 0x2002c7 +.word 0x1f81806 +.word 0x2000c7 +.word 0x81e5137c +.word 0x200107 +.word 0x1ed1803 +.word 0x200387 +.word 0x1e11800 +.word 0x335ac2 +.word 0x1e21801 +.word 0x3318c2 +.word 0x1ec1802 +.word 0x332102 +.word 0x8009c3fc +.word 0x337382 +.word 0x81ef137c +.word 0x1e069bf +.word 0x1fb1804 +.word 0x1e508bc +.word 0x8811804 +.word 0x1e510bd +.word 0x1cb4b46 +.word 0x1e5624a +.word 0x81e6137c +.word 0x2b597c +.word 0x800319f2 +.word 0x23197c +.word 0xa4103cb +.word 0x209d00 +.word 0x8029c3fc +.word 0x2ff +.word 0x81e903bc +.word 0x1e069bf +.word 0x8001abfc +.word 0x1e608bc +.word 0x81f0137c +.word 0x1e610bd +.word 0x1c34b46 +.word 0x1e6628a +.word 0x800f0871 +.word 0x33997d +.word 0x80012130 +.word 0x34a17d +.word 0x800131b0 +.word 0x24217c +.word 0x81e7137c +.word 0x1c04a5c +.word 0x81ea03bc +.word 0x1c07bdc +.word 0x8049c3fc +.word 0x352940 +.word 0x81f1137c +.word 0x1e069bf +.word 0x800139f0 +.word 0x1e708bc +.word 0x80014230 +.word 0x1e710bd +.word 0x1c44b46 +.word 0x1d3497d +.word 0x80000030 +.word 0x1e7624a +.word 0x80017bf0 +.word 0x2e717c +.word 0x806c2bfc +.word 0x2ff +.word 0x81e8137c +.word 0x1c0529c +.word 0x81e903bc +.word 0x1c0841c +.word 0x8069c3fc +.word 0x353180 +.word 0x81f2137c +.word 0x1e069bf +.word 0x3ec7800 +.word 0x1e808bc +.word 0x3ec5801 +.word 0x1e810bd +.word 0x1ce4b46 +.word 0x1d4517d +.word 0x50046071 +.word 0x1e8628a +.word 0x3ec9802 +.word 0x2ff +.word 0x81f81b7c +.word 0x2ff +.word 0x806c33fc +.word 0x2ff +.word 0x81e5137c +.word 0x1c04a5c +.word 0x81ea03bc +.word 0x1c08c5c +.word 0x8009c3fc +.word 0x3539c0 +.word 0x81ef137c +.word 0x1e069bf +.word 0x3ec8000 +.word 0x1e508bc +.word 0x3ec1801 +.word 0x1e510bd +.word 0x1cb4b46 +.word 0x1d3497d +.word 0x5004604c +.word 0x1e5624a +.word 0x3eca002 +.word 0x2ff +.word 0x806c3bfc +.word 0x2ff +.word 0x81e6137c +.word 0x1c0529c +.word 0x81e903bc +.word 0x1c0949c +.word 0x8029c3fc +.word 0x354200 +.word 0x81f0137c +.word 0x1e069bf +.word 0x3ec8800 +.word 0x1e608bc +.word 0x3ec2001 +.word 0x1e610bd +.word 0x1c34b46 +.word 0x1d4517d +.word 0x50046027 +.word 0x1e6628a +.word 0x3ec9802 +.word 0x2ff +.word 0x806c43fc +.word 0x2ff +.word 0x81e7137c +.word 0x1c04a5c +.word 0x81ea03bc +.word 0x1c07bdc +.word 0x8049c3fc +.word 0x352940 +.word 0x81f1137c +.word 0x1e069bf +.word 0x3ec9000 +.word 0x1e708bc +.word 0x3ec7001 +.word 0x1e710bd +.word 0x1c44b46 +.word 0x1d3497d +.word 0x520467d8 +.word 0x1e7624a +.word 0x3eca002 +.word 0x2ff +.word 0x806c2bfc +.word 0x2ff +.word 0x5200292c +.word 0x1c0529c +.word 0x81e8137c +.word 0x1c0841c +.word 0x81e903bc +.word 0x353180 +.word 0x8069c3fc +.word 0x1e069bf +.word 0x81f81b7c +.word 0x2ff +.word 0x3ec7800 +.word 0x3539c0 +.word 0x3ec5801 +.word 0x1e808bc +.word 0x81f2137c +.word 0x1e810bd +.word 0x1ce4b46 +.word 0x1d4517d +.word 0x81e5137c +.word 0x1e8628a +.word 0x3ec9802 +.word 0x1c04a5c +.word 0x806c33fc +.word 0x1c08c5c +.word 0x81ef137c +.word 0x1e069bf +.word 0x8009c3fc +.word 0x1e508bc +.word 0x80000030 +.word 0x1e510bd +.word 0x81ea03bc +.word 0x1d3497d +.word 0x3ec8000 +.word 0x1e5624a +.word 0x3ec1801 +.word 0x2ff +.word 0x3eca002 +.word 0x2ff +.word 0x806c3bfc +.word 0x2ff +.word 0x1cb4b46 +.word 0x354200 +.word 0x81e903bc +.word 0x1c0529c +.word 0x3ec8800 +.word 0x1c0949c +.word 0x3ec2001 +.word 0x359480 +.word 0x3ec9802 +.word 0x2ff +.word 0x40000051 +.word 0x1d4517d +.word 0x806c43fc +.word 0x2ff +.word 0x806c43fc +.word 0x2ff +.word 0x520028fd +.word 0x1c04a5c +.word 0x81e7137c +.word 0x1c07bdc +.word 0x81ea03bc +.word 0x352940 +.word 0x8049c3fc +.word 0x1e069bf +.word 0x3ec9000 +.word 0x2ff +.word 0x3ec7001 +.word 0x1e708bc +.word 0x81f1137c +.word 0x1e710bd +.word 0x1c44b46 +.word 0x1d3497d +.word 0x81e8137c +.word 0x1e7624a +.word 0x3eca002 +.word 0x1c0529c +.word 0x806c2bfc +.word 0x1c0841c +.word 0x81f2137c +.word 0x1e069bf +.word 0x81e903bc +.word 0x1e808bc +.word 0x8069c3fc +.word 0x353180 +.word 0x81f81b7c +.word 0x2ff +.word 0x3ec7800 +.word 0x1e810bd +.word 0x3ec5801 +.word 0x1d4517d +.word 0x3ec9802 +.word 0x1e8628a +.word 0x806c33fc +.word 0x2ff +.word 0x1ce4b46 +.word 0x3539c0 +.word 0x81ea03bc +.word 0x1c04a5c +.word 0x3ec8000 +.word 0x1c08c5c +.word 0x3ec1801 +.word 0x358c40 +.word 0x3eca002 +.word 0x2ff +.word 0x40000061 +.word 0x1d3497d +.word 0x806c3bfc +.word 0x2ff +.word 0x806c3bfc +.word 0x2ff +.word 0x520028cf +.word 0x1c0529c +.word 0x81e6137c +.word 0x1c0949c +.word 0x81e903bc +.word 0x354200 +.word 0x8029c3fc +.word 0x1e069bf +.word 0x3ec8800 +.word 0x2ff +.word 0x3ec2001 +.word 0x1e608bc +.word 0x81f0137c +.word 0x1e610bd +.word 0x1c34b46 +.word 0x1d4517d +.word 0x81e7137c +.word 0x1e6628a +.word 0x3ec9802 +.word 0x1c04a5c +.word 0x806c43fc +.word 0x1c07bdc +.word 0x81f1137c +.word 0x1e069bf +.word 0x81ea03bc +.word 0x1e708bc +.word 0x8049c3fc +.word 0x352940 +.word 0x3ec9000 +.word 0x1e710bd +.word 0x3ec7001 +.word 0x1d3497d +.word 0x3eca002 +.word 0x1e7624a +.word 0x806c2bfc +.word 0x2ff +.word 0x1c44b46 +.word 0x353180 +.word 0x3ec7800 +.word 0x1c0529c +.word 0x81e903bc +.word 0x1c0841c +.word 0x3cc5801 +.word 0x358400 +.word 0x3ec9802 +.word 0x2ff +.word 0x40000038 +.word 0x1d4517d +.word 0x806c33fc +.word 0x2ff +.word 0x81f81b7c +.word 0x2ff +.word 0x806c33fc +.word 0x2ff +.word 0x520028a1 +.word 0x1c04a5c +.word 0x81e5137c +.word 0x1c08c5c +.word 0x81ea03bc +.word 0x3539c0 +.word 0x8009c3fc +.word 0x1e069bf +.word 0x3ec8000 +.word 0x1e508bc +.word 0x3ec1801 +.word 0x1e510bd +.word 0x81ef137c +.word 0x1d3497d +.word 0x1cb4b46 +.word 0x1e5624a +.word 0x81e6137c +.word 0x354200 +.word 0x3eca002 +.word 0x1c0529c +.word 0x806c3bfc +.word 0x1c0949c +.word 0x81e903bc +.word 0x1e069bf +.word 0x8029c3fc +.word 0x1e608bc +.word 0x81f0137c +.word 0x1e610bd +.word 0x3ec8800 +.word 0x1d4517d +.word 0x3ec2001 +.word 0x1e6628a +.word 0x3ec9802 +.word 0x2ff +.word 0x806c43fc +.word 0x2ff +.word 0x1c34b46 +.word 0x352940 +.word 0x81ea03bc +.word 0x1c04a5c +.word 0x3ec9000 +.word 0x1c07bdc +.word 0x3ec7001 +.word 0x357bc0 +.word 0x3eca002 +.word 0x2ff +.word 0x4000000f +.word 0x1d3497d +.word 0x806c2bfc +.word 0x2ff +.word 0x81e6137c +.word 0x2ff +.word 0x8029c3fc +.word 0x2ff +.word 0x806d93fc +.word 0x1e069bf +.word 0x3ec9000 +.word 0x352940 +.word 0x3ec7001 +.word 0x1e608bc +.word 0x3eca002 +.word 0x1e610bd +.word 0x81f0137c +.word 0x1e6628a +.word 0x1c34b46 +.word 0x1c04a5c +.word 0x3ed9000 +.word 0x1c07bdc +.word 0x3ed7001 +.word 0x357bc0 +.word 0x3eda002 +.word 0x2ff +.word 0x81ea03bc +.word 0x2ff +.word 0x50066040 +.word 0x1d3497d +.word 0x806c2bfc +.word 0x2ff +.word 0x81e7137c +.word 0x2ff +.word 0x8049c3fc +.word 0x2ff +.word 0x806d7bfc +.word 0x1e069bf +.word 0x3ec7800 +.word 0x353180 +.word 0x3ec5801 +.word 0x1e708bc +.word 0x3ec9802 +.word 0x1e710bd +.word 0x81f1137c +.word 0x1e7624a +.word 0x1c44b46 +.word 0x1c0529c +.word 0x3ed7800 +.word 0x1c0841c +.word 0x3ed5801 +.word 0x358400 +.word 0x3ed9802 +.word 0x2ff +.word 0x81e903bc +.word 0x2ff +.word 0x50066046 +.word 0x1d4517d +.word 0x806c33fc +.word 0x2ff +.word 0x81e8137c +.word 0x2ff +.word 0x8069c3fc +.word 0x2ff +.word 0x81f81b7c +.word 0x2ff +.word 0x806d83fc +.word 0x1e069bf +.word 0x3ec8000 +.word 0x3539c0 +.word 0x3ec1801 +.word 0x1e808bc +.word 0x3eca002 +.word 0x1e810bd +.word 0x81f2137c +.word 0x1e8628a +.word 0x1ce4b46 +.word 0x1c04a5c +.word 0x3ed8000 +.word 0x1c08c5c +.word 0x3ed1801 +.word 0x358c40 +.word 0x3eda002 +.word 0x2ff +.word 0x81ea03bc +.word 0x2ff +.word 0x5006604b +.word 0x1d3497d +.word 0x806c3bfc +.word 0x2ff +.word 0x81e5137c +.word 0x2ff +.word 0x8009c3fc +.word 0x2ff +.word 0x806d8bfc +.word 0x1e069bf +.word 0x3ec8800 +.word 0x354200 +.word 0x3ec2001 +.word 0x1e508bc +.word 0x3ec9802 +.word 0x1e510bd +.word 0x81ef137c +.word 0x1e5624a +.word 0x1cb4b46 +.word 0x1c0529c +.word 0x3ed8800 +.word 0x1c0949c +.word 0x3ed2001 +.word 0x359480 +.word 0x3ed9802 +.word 0x2ff +.word 0x81e903bc +.word 0x2ff +.word 0x520667c8 +.word 0x1d4517d +.word 0x806c43fc +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x806d93fc +.word 0x2ff +.word 0x3ec9000 +.word 0x352940 +.word 0x3ec7001 +.word 0x357bc0 +.word 0x3eca002 +.word 0x1c04a5c +.word 0x3ed9000 +.word 0x1c07bdc +.word 0x3ed7001 +.word 0x2ff +.word 0x3eda002 +.word 0x2ff +.word 0x806c2bfc +.word 0x1d3497d +.word 0x806d7bfc +.word 0x2ff +.word 0x3ec7800 +.word 0x2ff +.word 0x3ec5801 +.word 0x2ff +.word 0x3ec9802 +.word 0x2ff +.word 0x3ed7800 +.word 0x2ff +.word 0x3ed5801 +.word 0x2ff +.word 0x500070b8 +.word 0x2ff +.word 0x3ed9802 +.word 0x2ff +.word 0x4000022c +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x806d7bfc +.word 0x2ff +.word 0x3ec7800 +.word 0x353180 +.word 0x3ec5801 +.word 0x358400 +.word 0x3ec9802 +.word 0x1c0529c +.word 0x3ed7800 +.word 0x1c0841c +.word 0x3ed5801 +.word 0x2ff +.word 0x3ed9802 +.word 0x2ff +.word 0x806c33fc +.word 0x1d4517d +.word 0x806d83fc +.word 0x2ff +.word 0x3ec8000 +.word 0x2ff +.word 0x3ec1801 +.word 0x2ff +.word 0x3eca002 +.word 0x2ff +.word 0x3ed8000 +.word 0x2ff +.word 0x3ed1801 +.word 0x2ff +.word 0x500070d2 +.word 0x2ff +.word 0x3eda002 +.word 0x2ff +.word 0x40000218 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x806d83fc +.word 0x2ff +.word 0x3ec8000 +.word 0x3539c0 +.word 0x3ec1801 +.word 0x358c40 +.word 0x3eca002 +.word 0x1c04a5c +.word 0x3ed8000 +.word 0x1c08c5c +.word 0x3ed1801 +.word 0x2ff +.word 0x3eda002 +.word 0x2ff +.word 0x806c3bfc +.word 0x1d3497d +.word 0x806d8bfc +.word 0x2ff +.word 0x3ec8800 +.word 0x2ff +.word 0x3ec2001 +.word 0x2ff +.word 0x3ec9802 +.word 0x2ff +.word 0x3ed8800 +.word 0x2ff +.word 0x3ed2001 +.word 0x2ff +.word 0x500070ec +.word 0x2ff +.word 0x3ed9802 +.word 0x2ff +.word 0x40000204 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x806d8bfc +.word 0x2ff +.word 0x3ec8800 +.word 0x354200 +.word 0x3ec2001 +.word 0x359480 +.word 0x3ec9802 +.word 0x1c0529c +.word 0x3ed8800 +.word 0x1c0949c +.word 0x3ed2001 +.word 0x2ff +.word 0x3ed9802 +.word 0x2ff +.word 0x806c43fc +.word 0x1d4517d +.word 0x806d93fc +.word 0x2ff +.word 0x3ec9000 +.word 0x2ff +.word 0x3ec7001 +.word 0x2ff +.word 0x3eca002 +.word 0x2ff +.word 0x3ed9000 +.word 0x2ff +.word 0x3ed7001 +.word 0x2ff +.word 0x5000704f +.word 0x2ff +.word 0x3eda002 +.word 0x2ff +.word 0x400001f0 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x81ea03bc +.word 0x3539c0 +.word 0x3ec8000 +.word 0x354200 +.word 0x3ec1801 +.word 0x2ff +.word 0x3eca002 +.word 0x2ff +.word 0x800217f2 +.word 0x1d3497d +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1c0529c +.word 0x806c3bfc +.word 0x1c0949c +.word 0x806d43fc +.word 0x2ff +.word 0x3ec8800 +.word 0x2ff +.word 0x3ec2001 +.word 0x2ff +.word 0x3ec9802 +.word 0x1d4517d +.word 0x3ed9000 +.word 0x2ff +.word 0x3ed7001 +.word 0x2ff +.word 0x5000703c +.word 0x2ff +.word 0x3eda002 +.word 0x2ff +.word 0x400001dd +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x81e903bc +.word 0x354200 +.word 0x3ec8800 +.word 0x352940 +.word 0x3ec2001 +.word 0x2ff +.word 0x3ec9802 +.word 0x2ff +.word 0x800217f2 +.word 0x1d4517d +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1c04a5c +.word 0x806c43fc +.word 0x1c07bdc +.word 0x806d2bfc +.word 0x2ff +.word 0x3ec9000 +.word 0x2ff +.word 0x3ec7001 +.word 0x2ff +.word 0x3eca002 +.word 0x1d3497d +.word 0x3ed7800 +.word 0x2ff +.word 0x3ed5801 +.word 0x2ff +.word 0x50007056 +.word 0x2ff +.word 0x3ed9802 +.word 0x2ff +.word 0x400001ca +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x81ea03bc +.word 0x352940 +.word 0x3ec9000 +.word 0x353180 +.word 0x3ec7001 +.word 0x2ff +.word 0x3eca002 +.word 0x2ff +.word 0x800217f2 +.word 0x1d3497d +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1c0529c +.word 0x806c2bfc +.word 0x1c0841c +.word 0x806d33fc +.word 0x2ff +.word 0x3ec7800 +.word 0x2ff +.word 0x3ec5801 +.word 0x2ff +.word 0x3ec9802 +.word 0x1d4517d +.word 0x3ed8000 +.word 0x2ff +.word 0x3ed1801 +.word 0x2ff +.word 0x50007071 +.word 0x2ff +.word 0x3eda002 +.word 0x2ff +.word 0x400001b7 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x81e903bc +.word 0x353180 +.word 0x3ec7800 +.word 0x3539c0 +.word 0x3ec5801 +.word 0x2ff +.word 0x3ec9802 +.word 0x2ff +.word 0x800217f2 +.word 0x1d4517d +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1c04a5c +.word 0x806c33fc +.word 0x1c08c5c +.word 0x806d3bfc +.word 0x2ff +.word 0x3ec8000 +.word 0x2ff +.word 0x3ec1801 +.word 0x2ff +.word 0x3eca002 +.word 0x1d3497d +.word 0x3ed8800 +.word 0x2ff +.word 0x3ed2001 +.word 0x2ff +.word 0x5000708c +.word 0x2ff +.word 0x3ed9802 +.word 0x2ff +.word 0x400001a4 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x81e5137c +.word 0x2ff +.word 0x3f000000 +.word 0x80200707 +.word 0x81dc137c +.word 0x8006e2 +.word 0x81ef137c +.word 0x2ff +.word 0x8009c3fc +.word 0x2ff +.word 0x802ac3fc +.word 0x35e700 +.word 0x804bc3fc +.word 0x1db2958 +.word 0x80000030 +.word 0x2ff +.word 0x1cb4b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1fc2968 +.word 0x1fe5b46 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1fbe9bd +.word 0x81f81b7c +.word 0x1fbf749 +.word 0x81e6137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e508bc +.word 0x81f0137c +.word 0x1e510bd +.word 0x80000030 +.word 0x1e5624a +.word 0x8009c3fc +.word 0x1fbe9bf +.word 0x802ac3fc +.word 0x1db5aca +.word 0x804bc3fc +.word 0x1db3198 +.word 0x80000030 +.word 0x2ff +.word 0x1c34b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1fc31a8 +.word 0x1fe5b46 +.word 0x2ff +.word 0x81e903bc +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1fbe9bd +.word 0x81f81b7c +.word 0x1fbf749 +.word 0x81e7137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e608bc +.word 0x81f1137c +.word 0x1e610bd +.word 0x80000030 +.word 0x1e6628a +.word 0x8009c3fc +.word 0x1fbe9bf +.word 0x802ac3fc +.word 0x1db39d8 +.word 0x804bc3fc +.word 0x1db18ca +.word 0x80000030 +.word 0x1c04cdc +.word 0x1c44b46 +.word 0x1c07bdc +.word 0x1fd5346 +.word 0x1fc39e8 +.word 0x1fe5b46 +.word 0x2ff +.word 0x81ea03bc +.word 0x1d3997d +.word 0x80000030 +.word 0x2ff +.word 0x4000008b +.word 0x1fbe9bd +.word 0x81f81b7c +.word 0x1fbf749 +.word 0x81e6137c +.word 0x2ff +.word 0x81f81b7c +.word 0x200707 +.word 0x3f000000 +.word 0x800002ff +.word 0x81dc137c +.word 0x8006e2 +.word 0x81f0137c +.word 0x2ff +.word 0x8009c3fc +.word 0x35e700 +.word 0x802ac3fc +.word 0x2ff +.word 0x804bc3fc +.word 0x1db3198 +.word 0x80000030 +.word 0x2ff +.word 0x1c34b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1fc31a8 +.word 0x1fe5b46 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1fbe9bd +.word 0x81f81b7c +.word 0x1fbf749 +.word 0x81e7137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e608bc +.word 0x81f1137c +.word 0x1e610bd +.word 0x80000030 +.word 0x1e6628a +.word 0x8009c3fc +.word 0x1fbe9bf +.word 0x802ac3fc +.word 0x1db18ca +.word 0x804bc3fc +.word 0x1db39d8 +.word 0x80000030 +.word 0x2ff +.word 0x1c44b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1fc39e8 +.word 0x1fe5b46 +.word 0x2ff +.word 0x81ea03bc +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1fbe9bd +.word 0x81f81b7c +.word 0x1fbf749 +.word 0x81e8137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e708bc +.word 0x81f2137c +.word 0x1e710bd +.word 0x80000030 +.word 0x1e7624a +.word 0x8009c3fc +.word 0x1fbe9bf +.word 0x802ac3fc +.word 0x1db4218 +.word 0x804bc3fc +.word 0x1db210a +.word 0x80000030 +.word 0x1c0551c +.word 0x1ce4b46 +.word 0x1c0841c +.word 0x1fd5346 +.word 0x1fc4228 +.word 0x1fe5b46 +.word 0x2ff +.word 0x81e903bc +.word 0x1d4a17d +.word 0x80000030 +.word 0x2ff +.word 0x4000006d +.word 0x1fbe9bd +.word 0x81f81b7c +.word 0x1fbf749 +.word 0x81e7137c +.word 0x2ff +.word 0x81f81b7c +.word 0x200707 +.word 0x3f000000 +.word 0x800002ff +.word 0x81dc137c +.word 0x8006e2 +.word 0x81f1137c +.word 0x2ff +.word 0x8009c3fc +.word 0x35e700 +.word 0x802ac3fc +.word 0x2ff +.word 0x804bc3fc +.word 0x1db39d8 +.word 0x80000030 +.word 0x2ff +.word 0x1c44b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1fc39e8 +.word 0x1fe5b46 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1fbe9bd +.word 0x81f81b7c +.word 0x1fbf749 +.word 0x81e8137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e708bc +.word 0x81f2137c +.word 0x1e710bd +.word 0x80000030 +.word 0x1e7624a +.word 0x8009c3fc +.word 0x1fbe9bf +.word 0x802ac3fc +.word 0x1db210a +.word 0x804bc3fc +.word 0x1db4218 +.word 0x80000030 +.word 0x2ff +.word 0x1ce4b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1fc4228 +.word 0x1fe5b46 +.word 0x2ff +.word 0x81e903bc +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1fbe9bd +.word 0x81f81b7c +.word 0x1fbf749 +.word 0x81e5137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e808bc +.word 0x81ef137c +.word 0x1e810bd +.word 0x80000030 +.word 0x1e8628a +.word 0x8009c3fc +.word 0x1fbe9bf +.word 0x802ac3fc +.word 0x1db2958 +.word 0x804bc3fc +.word 0x1db738a +.word 0x80000030 +.word 0x1c04cdc +.word 0x1cb4b46 +.word 0x1c08c5c +.word 0x1fd5346 +.word 0x1fc2968 +.word 0x1fe5b46 +.word 0x2ff +.word 0x81ea03bc +.word 0x1d3997d +.word 0x80000030 +.word 0x2ff +.word 0x4000004f +.word 0x1fbe9bd +.word 0x81f81b7c +.word 0x1fbf749 +.word 0x81e8137c +.word 0x2ff +.word 0x81f81b7c +.word 0x200707 +.word 0x3f000000 +.word 0x800002ff +.word 0x81dc137c +.word 0x8006e2 +.word 0x81f2137c +.word 0x2ff +.word 0x8009c3fc +.word 0x35e700 +.word 0x802ac3fc +.word 0x2ff +.word 0x804bc3fc +.word 0x1db4218 +.word 0x80000030 +.word 0x2ff +.word 0x1ce4b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1fc4228 +.word 0x1fe5b46 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1fbe9bd +.word 0x81f81b7c +.word 0x1fbf749 +.word 0x81e5137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e808bc +.word 0x81ef137c +.word 0x1e810bd +.word 0x80000030 +.word 0x1e8628a +.word 0x8009c3fc +.word 0x1fbe9bf +.word 0x802ac3fc +.word 0x1db738a +.word 0x804bc3fc +.word 0x1db2958 +.word 0x80000030 +.word 0x2ff +.word 0x1cb4b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1fc2968 +.word 0x1fe5b46 +.word 0x2ff +.word 0x81ea03bc +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1fbe9bd +.word 0x81f81b7c +.word 0x1fbf749 +.word 0x81e6137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e508bc +.word 0x81f0137c +.word 0x1e510bd +.word 0x80000030 +.word 0x1e5624a +.word 0x8009c3fc +.word 0x1fbe9bf +.word 0x802ac3fc +.word 0x1db3198 +.word 0x804bc3fc +.word 0x1db5aca +.word 0x80000030 +.word 0x1c0551c +.word 0x1c34b46 +.word 0x1c0949c +.word 0x1fd5346 +.word 0x1fc31a8 +.word 0x1fe5b46 +.word 0x2ff +.word 0x81e903bc +.word 0x1d4a17d +.word 0x80000030 +.word 0x2ff +.word 0x40000031 +.word 0x1fbe9bd +.word 0x81f81b7c +.word 0x1fbf749 +.word 0x81e8137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e708bc +.word 0x81f2137c +.word 0x1e710bd +.word 0x806c2bfc +.word 0x1e7624a +.word 0x8009c3fc +.word 0x1fbe9bf +.word 0x802ac3fc +.word 0x1db210a +.word 0x804bc3fc +.word 0x1db4218 +.word 0x3ec7800 +.word 0x1c0551c +.word 0x1ce4b46 +.word 0x1c0841c +.word 0x1fd5346 +.word 0x2ff +.word 0x1fe5b46 +.word 0x2ff +.word 0x81e903bc +.word 0x1d4a17d +.word 0x3ec5801 +.word 0x1fc4228 +.word 0x81f81b7c +.word 0x1fbe9bd +.word 0x50076048 +.word 0x2ff +.word 0x3ec9802 +.word 0x1fbf749 +.word 0x81e5137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e808bc +.word 0x81ef137c +.word 0x1e810bd +.word 0x806c33fc +.word 0x1e8628a +.word 0x8009c3fc +.word 0x1fbe9bf +.word 0x802ac3fc +.word 0x1db738a +.word 0x804bc3fc +.word 0x1db2958 +.word 0x3ec8000 +.word 0x1c04cdc +.word 0x1cb4b46 +.word 0x1c08c5c +.word 0x1fd5346 +.word 0x2ff +.word 0x1fe5b46 +.word 0x2ff +.word 0x81ea03bc +.word 0x1d3997d +.word 0x3ec1801 +.word 0x1fc2968 +.word 0x81f81b7c +.word 0x1fbe9bd +.word 0x5007604f +.word 0x2ff +.word 0x3eca002 +.word 0x1fbf749 +.word 0x81e6137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e508bc +.word 0x81f0137c +.word 0x1e510bd +.word 0x806c3bfc +.word 0x1e5624a +.word 0x8009c3fc +.word 0x1fbe9bf +.word 0x802ac3fc +.word 0x1db5aca +.word 0x804bc3fc +.word 0x1db3198 +.word 0x3ec8800 +.word 0x1c0551c +.word 0x1c34b46 +.word 0x1c0949c +.word 0x1fd5346 +.word 0x2ff +.word 0x1fe5b46 +.word 0x2ff +.word 0x81e903bc +.word 0x1d4a17d +.word 0x3ec2001 +.word 0x1fc31a8 +.word 0x81f81b7c +.word 0x1fbe9bd +.word 0x50076056 +.word 0x2ff +.word 0x3ec9802 +.word 0x1fbf749 +.word 0x81e7137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e608bc +.word 0x81f1137c +.word 0x1e610bd +.word 0x806c43fc +.word 0x1e6628a +.word 0x8009c3fc +.word 0x1fbe9bf +.word 0x802ac3fc +.word 0x1db18ca +.word 0x804bc3fc +.word 0x1c04cdc +.word 0x3ec9000 +.word 0x1c07bdc +.word 0x1c44b46 +.word 0x1db39d8 +.word 0x1fd5346 +.word 0x2ff +.word 0x1fe5b46 +.word 0x2ff +.word 0x81ea03bc +.word 0x1d3997d +.word 0x3ec7001 +.word 0x1fc39e8 +.word 0x81f81b7c +.word 0x1fbe9bd +.word 0x520767c1 +.word 0x2ff +.word 0x3eca002 +.word 0x1fbf749 +.word 0x806c2bfc +.word 0x357bc0 +.word 0x81e8137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e708bc +.word 0x81f2137c +.word 0x1e710bd +.word 0x806d7bfc +.word 0x1e7624a +.word 0x8009c3fc +.word 0x1c0841c +.word 0x802ac3fc +.word 0x1c0529c +.word 0x804bc3fc +.word 0x2ff +.word 0x3ec5801 +.word 0x358c40 +.word 0x81e903bc +.word 0x1db4218 +.word 0x3ec7800 +.word 0x1d4517d +.word 0x3ec9802 +.word 0x1fbe9bf +.word 0x3ed7800 +.word 0x1db210a +.word 0x3ed5801 +.word 0x1fc4228 +.word 0x3ed9802 +.word 0x358400 +.word 0x1ce4b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1e069bf +.word 0x1fe5b46 +.word 0x2ff +.word 0x81f81b7c +.word 0x2ff +.word 0x52086048 +.word 0x2ff +.word 0x806c33fc +.word 0x1e808bc +.word 0x40000096 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x806c33fc +.word 0x358400 +.word 0x81e5137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e808bc +.word 0x81ef137c +.word 0x1e810bd +.word 0x806d83fc +.word 0x1e8628a +.word 0x8009c3fc +.word 0x1c08c5c +.word 0x802ac3fc +.word 0x1c04a5c +.word 0x804bc3fc +.word 0x2ff +.word 0x3ec1801 +.word 0x359480 +.word 0x81ea03bc +.word 0x1db2958 +.word 0x3ec8000 +.word 0x1d3497d +.word 0x3eca002 +.word 0x1fbe9bf +.word 0x3ed8000 +.word 0x1db738a +.word 0x3ed1801 +.word 0x1fc2968 +.word 0x3eda002 +.word 0x358c40 +.word 0x1cb4b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1e069bf +.word 0x1fe5b46 +.word 0x2ff +.word 0x81f81b7c +.word 0x2ff +.word 0x52086045 +.word 0x2ff +.word 0x806c3bfc +.word 0x1e508bc +.word 0x4000007f +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x806c3bfc +.word 0x358c40 +.word 0x81e6137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e508bc +.word 0x81f0137c +.word 0x1e510bd +.word 0x806d8bfc +.word 0x1e5624a +.word 0x8009c3fc +.word 0x1c0949c +.word 0x802ac3fc +.word 0x1c0529c +.word 0x804bc3fc +.word 0x2ff +.word 0x3ec2001 +.word 0x357bc0 +.word 0x81e903bc +.word 0x1db3198 +.word 0x3ec8800 +.word 0x1d4517d +.word 0x3ec9802 +.word 0x1fbe9bf +.word 0x3ed8800 +.word 0x1db5aca +.word 0x3ed2001 +.word 0x1fc31a8 +.word 0x3ed9802 +.word 0x359480 +.word 0x1c34b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1e069bf +.word 0x1fe5b46 +.word 0x2ff +.word 0x81f81b7c +.word 0x2ff +.word 0x52086042 +.word 0x2ff +.word 0x806c43fc +.word 0x1e608bc +.word 0x40000068 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x806c43fc +.word 0x359480 +.word 0x81e7137c +.word 0x1e069bf +.word 0x81dc137c +.word 0x1e608bc +.word 0x81f1137c +.word 0x1e610bd +.word 0x806d93fc +.word 0x1e6628a +.word 0x8009c3fc +.word 0x1c07bdc +.word 0x802ac3fc +.word 0x1c04a5c +.word 0x804bc3fc +.word 0x2ff +.word 0x3ec7001 +.word 0x358400 +.word 0x81ea03bc +.word 0x1db39d8 +.word 0x3ec9000 +.word 0x1d3497d +.word 0x3eca002 +.word 0x1fbe9bf +.word 0x3ed9000 +.word 0x1db18ca +.word 0x3ed7001 +.word 0x1fc39e8 +.word 0x3eda002 +.word 0x357bc0 +.word 0x1c44b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1e069bf +.word 0x1fe5b46 +.word 0x2ff +.word 0x81f81b7c +.word 0x2ff +.word 0x5208603f +.word 0x2ff +.word 0x806c2bfc +.word 0x1e708bc +.word 0x40000051 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x81e5137c +.word 0x1e810bd +.word 0x81dc137c +.word 0x1e8628a +.word 0x81ef137c +.word 0x1c08c5c +.word 0x806d83fc +.word 0x1c04a5c +.word 0x8009c3fc +.word 0x1fbe9bd +.word 0x802ac3fc +.word 0x1fbf749 +.word 0x804bc3fc +.word 0x2ff +.word 0x3ec1801 +.word 0x1d3497d +.word 0x81ea03bc +.word 0x1db2958 +.word 0x3ec8000 +.word 0x359480 +.word 0x3eca002 +.word 0x1fbe9bf +.word 0x3ed8000 +.word 0x1db738a +.word 0x3ed1801 +.word 0x1fc2968 +.word 0x3eda002 +.word 0x2ff +.word 0x1cb4b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1e069bf +.word 0x1fe5b46 +.word 0x2ff +.word 0x81f81b7c +.word 0x2ff +.word 0x5008603d +.word 0x2ff +.word 0x806c3bfc +.word 0x1e508bc +.word 0x81e6137c +.word 0x1e510bd +.word 0x81dc137c +.word 0x1e5624a +.word 0x81f0137c +.word 0x1c0949c +.word 0x806d8bfc +.word 0x1c0529c +.word 0x8009c3fc +.word 0x1fbe9bd +.word 0x802ac3fc +.word 0x1fbf749 +.word 0x804bc3fc +.word 0x2ff +.word 0x3ec2001 +.word 0x1d4517d +.word 0x81e903bc +.word 0x1db3198 +.word 0x3ec8800 +.word 0x357bc0 +.word 0x3ec9802 +.word 0x1fbe9bf +.word 0x3ed8800 +.word 0x1db5aca +.word 0x3ed2001 +.word 0x1fc31a8 +.word 0x3ed9802 +.word 0x2ff +.word 0x1c34b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1e069bf +.word 0x1fe5b46 +.word 0x2ff +.word 0x81f81b7c +.word 0x2ff +.word 0x50086029 +.word 0x2ff +.word 0x806c43fc +.word 0x1e608bc +.word 0x81e7137c +.word 0x1e610bd +.word 0x81dc137c +.word 0x1e6628a +.word 0x81f1137c +.word 0x1c07bdc +.word 0x806d93fc +.word 0x1c04a5c +.word 0x8009c3fc +.word 0x1fbe9bd +.word 0x802ac3fc +.word 0x1fbf749 +.word 0x804bc3fc +.word 0x2ff +.word 0x3ec7001 +.word 0x1d3497d +.word 0x81ea03bc +.word 0x1db39d8 +.word 0x3ec9000 +.word 0x358400 +.word 0x3eca002 +.word 0x1fbe9bf +.word 0x3ed9000 +.word 0x1db18ca +.word 0x3ed7001 +.word 0x1fc39e8 +.word 0x3eda002 +.word 0x2ff +.word 0x1c44b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1e069bf +.word 0x1fe5b46 +.word 0x2ff +.word 0x81f81b7c +.word 0x2ff +.word 0x50086015 +.word 0x2ff +.word 0x806c2bfc +.word 0x1e708bc +.word 0x81e8137c +.word 0x1e710bd +.word 0x81dc137c +.word 0x1e7624a +.word 0x81f2137c +.word 0x1c0841c +.word 0x806d7bfc +.word 0x1c0529c +.word 0x8009c3fc +.word 0x1fbe9bd +.word 0x802ac3fc +.word 0x1fbf749 +.word 0x804bc3fc +.word 0x2ff +.word 0x3ec5801 +.word 0x1d4517d +.word 0x81e903bc +.word 0x1db4218 +.word 0x3ec7800 +.word 0x358c40 +.word 0x3ec9802 +.word 0x1fbe9bf +.word 0x3ed7800 +.word 0x1db210a +.word 0x3ed5801 +.word 0x1fc4228 +.word 0x3ed9802 +.word 0x2ff +.word 0x1ce4b46 +.word 0x2ff +.word 0x1fd5346 +.word 0x1e069bf +.word 0x1fe5b46 +.word 0x2ff +.word 0x81f81b7c +.word 0x2ff +.word 0x520867b1 +.word 0x2ff +.word 0x806c33fc +.word 0x1e808bc +.word 0x90103cb +.word 0x2ff +.word 0x88c03cb +.word 0x2ff +.word 0x84203cb +.word 0x2ff +.word 0x1e503cc +.word 0x2ff +.word 0x1e603cd +.word 0x2ff +.word 0x1e703ce +.word 0x2ff +.word 0x1e803cf +.word 0x2ff +.word 0x3e02bd0 +.word 0x2ff +.word 0x3e033d1 +.word 0x2ff +.word 0xa8203d1 +.word 0x2ff +.word 0x50000802 +.word 0x2ff +.word 0x3e03bd2 +.word 0x2ff +.word 0x3e043d2 +.word 0x2ff +.word 0x100203d0 +.word 0x2ff +.word 0xa8103cb +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x800016fc +.word 0x2ff +.word 0x8001abfc +.word 0x2ff +.word 0x806cbbfc +.word 0x2ff +.word 0x81f6b33d +.word 0x2ff +.word 0x10020032 +.word 0x2ff +.word 0x809703fd +.word 0x2ff +.word 0x80000efc +.word 0x400002ff +.word 0x8003b3fc +.word 0x2ff +.word 0x8021bbfc +.word 0x2ff +.word 0x806cbbfc +.word 0x2ff +.word 0x81f6b33d +.word 0x2ff +.word 0x10020032 +.word 0x2ff +.word 0x800f0870 +.word 0x2ff +.word 0x809763fd +.word 0x400002ff +.word 0x8003b3fc +.word 0x2ff +.word 0x80000030 +.word 0x400002ff +.word 0x80000030 +.word 0x2ff +.word 0x0 +.word 0x0 \ No newline at end of file diff --git a/test/offline/config/jak2/config.jsonc b/test/offline/config/jak2/config.jsonc index 5bba917d1f..5f5ce550f6 100644 --- a/test/offline/config/jak2/config.jsonc +++ b/test/offline/config/jak2/config.jsonc @@ -155,6 +155,8 @@ "draw-prototype-inline-array-shrub", + "(method 9 drawable-tree-instance-tie)", // duplicate + "i-hopefully-will-never-exist-dont-add-anything-after-me-please" ],