diff --git a/decompiler/VuDisasm/VuDisassembler.cpp b/decompiler/VuDisasm/VuDisassembler.cpp index a6fdfaa27..b9880db42 100644 --- a/decompiler/VuDisasm/VuDisassembler.cpp +++ b/decompiler/VuDisasm/VuDisassembler.cpp @@ -143,6 +143,7 @@ VuDisassembler::VuDisassembler(VuKind kind) : m_kind(kind) { add_op(VuInstrK::ADDq, "addq").iemdt().dst_mask().vft_zero().dst_vfd().src_vfs().src_q(); add_op(VuInstrK::MULi, "muli").iemdt().dst_mask().vft_zero().dst_vfd().src_vfs().src_i(); add_op(VuInstrK::ADDi, "addi").iemdt().dst_mask().vft_zero().dst_vfd().src_vfs().src_i(); + add_op(VuInstrK::MULAq, "mula").iemdt().dst_mask().dst_acc().vft_zero().src_vfs().src_q(); m_lower_op6_table[0b000000].set(VuInstrK::LQ); m_lower_op6_table[0b000001].set(VuInstrK::SQ); @@ -214,7 +215,8 @@ VuDisassembler::VuDisassembler(VuKind kind) : m_kind(kind) { add_op(VuInstrK::IBGEZ, "ibgez").dst_mask_zero().vit_zero().src_vis().rel_branch11(); add_op(VuInstrK::ISWR, "iswr").dst_mask().src_vit().src_vis(); add_op(VuInstrK::JALR, "jalr").dst_mask_zero().dst_vit().src_vis().imm11_zero(); - add_op(VuInstrK::WAITQ, "waitq").dst_mask_zero().vft_zero().vis_zero(); + add_op(VuInstrK::WAITP, "waitp").dst_mask_zero().vft_zero().vfs_zero(); + add_op(VuInstrK::WAITQ, "waitq").dst_mask_zero().vft_zero().vfs_zero(); add_op(VuInstrK::IBLEZ, "iblez").dst_mask_zero().vit_zero().src_vis().rel_branch11(); add_op(VuInstrK::SQRT, "sqrt").fsf_zero().ftf_0().vis_zero().dst_q().src_vft(); add_op(VuInstrK::SQD, "sqd").dst_mask().src_vfs().src_vit(); @@ -289,6 +291,8 @@ VuInstrK VuDisassembler::lower_kind(u32 in) { return VuInstrK::XGKICK; case 0b11100'1111'11: return VuInstrK::ERLENG; + case 0b11110'1111'11: + return VuInstrK::WAITP; } fmt::print("Unknown lower special: 0b{:b}\n", in); ASSERT(false); @@ -343,6 +347,8 @@ VuInstrK VuDisassembler::upper_kind(u32 in) { case 0b00110'1111'10: case 0b00110'1111'11: return VuInstrK::MULAbc; + case 0b00111'1111'00: + return VuInstrK::MULAq; case 0b00111'1111'11: return VuInstrK::CLIP; case 0b01010'1111'00: diff --git a/decompiler/VuDisasm/VuDisassembler.h b/decompiler/VuDisasm/VuDisassembler.h index 6b1ffb883..073f0204b 100644 --- a/decompiler/VuDisasm/VuDisassembler.h +++ b/decompiler/VuDisasm/VuDisassembler.h @@ -148,6 +148,10 @@ class VuDisassembler { return step({VuDecodeStep::FieldK::FS, VuDecodeStep::AtomK::ASSERT_ZERO}); } + OpInfo& vfs_zero() { + return step({VuDecodeStep::FieldK::FS, VuDecodeStep::AtomK::ASSERT_ZERO}); + } + OpInfo& ftf_zero() { return step({VuDecodeStep::FieldK::FTF, VuDecodeStep::AtomK::ASSERT_ZERO}); } diff --git a/decompiler/VuDisasm/VuInstruction.h b/decompiler/VuDisasm/VuInstruction.h index 365b081db..19cc12b44 100644 --- a/decompiler/VuDisasm/VuInstruction.h +++ b/decompiler/VuDisasm/VuInstruction.h @@ -32,7 +32,7 @@ enum class VuInstrK { MULbc, // 20 MULA, // MULAi, - // MULAq, + MULAq, MULAbc, MADD, // MADDi, @@ -124,7 +124,7 @@ enum class VuInstrK { JR, // 110 JALR, MFP, - // WAITP, + WAITP, // ESADD, // ERSADD, // ELENG, diff --git a/decompiler/config/all-types.gc b/decompiler/config/all-types.gc index 95047f087..87b6941ea 100644 --- a/decompiler/config/all-types.gc +++ b/decompiler/config/all-types.gc @@ -7156,7 +7156,7 @@ (corner-array ocean-corner 25 :inline :offset-assert 80) (corner-count int32 :offset-assert 2080) (temp-vecs vector 4 :inline :offset-assert 2096) - (mid-mask-ptrs (pointer int32) 36 :offset-assert 2160) + (mid-mask-ptrs (pointer int64) 36 :offset-assert 2160) (mid-camera-masks uint64 36 :offset-assert 2304) (trans-mask-ptrs (pointer int32) 64 :offset-assert 2592) (trans-camera-masks ocean-trans-mask 16 :inline :offset-assert 2848) @@ -7233,17 +7233,17 @@ (fog vector :inline :offset-assert 48) (constants vector :inline :offset-assert 64) (constants2 vector :inline :offset-assert 80) - (drw-fan qword :inline :offset-assert 96) - (env-fan qword :inline :offset-assert 112) - (drw-adgif qword :inline :offset-assert 128) + (drw-fan gs-gif-tag :inline :offset-assert 96) ;; was qword + (env-fan gs-gif-tag :inline :offset-assert 112) ;; was qword + (drw-adgif gs-gif-tag :inline :offset-assert 128);; was qword (drw-texture adgif-shader :inline :offset-assert 144) - (drw-strip-0 qword :inline :offset-assert 224) - (drw-strip-1 qword :inline :offset-assert 240) - (env-adgif qword :inline :offset-assert 256) + (drw-strip-0 gs-gif-tag :inline :offset-assert 224) ;; was qword + (drw-strip-1 gs-gif-tag :inline :offset-assert 240) ;; was qword + (env-adgif gs-gif-tag :inline :offset-assert 256) ;; was qword (env-texture adgif-shader :inline :offset-assert 272) - (env-strip qword :inline :offset-assert 352) + (env-strip gs-gif-tag :inline :offset-assert 352) ;; was qword (env-color vector :inline :offset-assert 368) - (index-table uint128 8 :offset-assert 384) + (index-table vector4w 8 :inline :offset-assert 384) (pos0 vector :inline :offset-assert 512) (pos1 vector :inline :offset-assert 528) (pos2 vector :inline :offset-assert 544) @@ -21768,25 +21768,25 @@ ;; - Functions -(define-extern ocean-mid-add-constants function) +(define-extern ocean-mid-add-constants (function dma-buffer none)) (define-extern ocean-mid-add-call (function dma-buffer int none)) -(define-extern ocean-mid-add-upload function) +(define-extern ocean-mid-add-upload (function dma-buffer int int int int float symbol)) (define-extern ocean-mid-add-call-flush (function dma-buffer uint none)) (define-extern draw-ocean-transition (function dma-buffer none)) -(define-extern draw-ocean-mid-seams function) -(define-extern ocean-seams-add-constants function) -(define-extern ocean-mid-add-upload-top function) -(define-extern ocean-mid-add-upload-bottom function) -(define-extern ocean-mid-add-upload-middle function) -(define-extern ocean-mid-camera-masks-bit? (function uint uint)) -(define-extern ocean-mid-mask-ptrs-bit? (function uint uint)) -(define-extern ocean-mid-add-upload-table function) -(define-extern ocean-mid-camera-masks-set! function) -(define-extern ocean-mid-add-matrices (function dma-buffer none)) ;; not verified -(define-extern ocean-mid-check function) +(define-extern draw-ocean-mid-seams (function dma-buffer none)) +(define-extern ocean-seams-add-constants (function dma-buffer none)) +(define-extern ocean-mid-add-upload-top (function dma-buffer uint uint none)) +(define-extern ocean-mid-add-upload-bottom (function dma-buffer uint uint none)) +(define-extern ocean-mid-add-upload-middle (function dma-buffer uint uint none)) +(define-extern ocean-mid-camera-masks-bit? (function uint uint symbol)) +(define-extern ocean-mid-mask-ptrs-bit? (function uint uint symbol)) +(define-extern ocean-mid-add-upload-table (function dma-buffer uint uint (pointer float) int symbol none)) +(define-extern ocean-mid-camera-masks-set! (function uint uint symbol)) +(define-extern ocean-mid-add-matrices (function dma-buffer vector none)) ;; not verified +(define-extern ocean-mid-check (function pointer int int vector symbol)) (define-extern ocean-matrix*! (function matrix matrix matrix matrix)) -(define-extern ocean-mid-setup-constants function) -(define-extern ocean-vector-matrix*! function) +(define-extern ocean-mid-setup-constants (function ocean-mid-constants none)) +(define-extern ocean-vector-matrix*! (function vector vector matrix vector)) ;; - Unknowns @@ -21824,7 +21824,7 @@ (define-extern ocean-near-add-constants (function dma-buffer none)) (define-extern ocean-near-add-heights (function dma-buffer ocean-wave-info)) (define-extern ocean-near-add-call (function dma-buffer int none)) -(define-extern ocean-near-add-upload (function dma-buffer float float ocean-near-upload)) +(define-extern ocean-near-add-upload (function dma-buffer uint uint ocean-near-upload)) (define-extern ocean-near-add-matrices (function dma-buffer matrix none)) (define-extern ocean-near-setup-constants (function (inline-array vector) vector)) (define-extern ocean-near-add-call-flush (function dma-buffer int none)) diff --git a/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc b/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc index 526c5cb6c..6bf38f192 100644 --- a/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/stack_structures.jsonc @@ -5472,5 +5472,33 @@ "ocean-near-add-matrices": [[16, "matrix"]], + "ocean-near-add-upload": [ + [16, "vector"] + ], + + "draw-ocean-mid": [ + [16, "vector"] + ], + + "draw-ocean-mid-seams": [ + [16, "sphere"] + ], + + "ocean-mid-add-upload-table": [ + [16, "vector"] + ], + + "ocean-mid-add-upload": [ + [16, "vector"] + ], + + "ocean-mid-check": [ + [16, "vector"] + ], + + "ocean-mid-add-matrices": [ + [16, "vector"] + ], + "placeholder-do-not-add-below!": [] } diff --git a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc index 17e8c2ba3..d79316288 100644 --- a/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc +++ b/decompiler/config/jak1_ntsc_black_label/type_casts.jsonc @@ -4023,7 +4023,9 @@ [251, "a0", "process-drawable"] ], - "(anon-function 46 racer-states)": [[[4, 32], "v1", "target"]], + "(anon-function 46 racer-states)": [ + [[4, 32], "v1", "target"] + ], "(anon-function 45 racer-states)": [ [19, "a0", "target"], @@ -7261,7 +7263,7 @@ [8, "a0", "dma-packet"], [10, "a0", "dma-packet"] ], - + "ocean-near-add-matrices": [ [7, "a0", "dma-packet"], [12, "a0", "dma-packet"], @@ -7273,7 +7275,9 @@ [47, "v1", "matrix"] ], - "ocean-near-add-constants": [[3, "a0", "dma-packet"]], + "ocean-near-add-constants": [ + [3, "a0", "dma-packet"] + ], "draw-ocean-near": [ [2, "a0", "dma-packet"], @@ -7282,20 +7286,22 @@ [7, "a0", "dma-packet"], [8, "a0", "dma-packet"], [11, "a0", "dma-packet"], - [14, "a0", "dma-packet"], - [16, "a0", "dma-packet"], - [17, "a0", "dma-packet"], + [[14, 17], "a0", "gs-gif-tag"], + // [14, "a0", "dma-packet"], + // [16, "a0", "dma-packet"], + // [17, "a0", "dma-packet"], [18, "a0", "dma-packet"], [20, "a0", "dma-packet"], - [22, "a0", "dma-packet"], - [24, "a0", "dma-packet"], + [22, "a0", "(pointer gs-test)"], + [24, "a0", "(pointer gs-reg64)"], [25, "a0", "dma-packet"], [26, "a0", "dma-packet"], [35, "a0", "dma-packet"], [37, "a0", "dma-packet"], [39, "a0", "dma-packet"], [40, "a0", "dma-packet"], - [41, "a0", "dma-packet"] + [41, "a0", "dma-packet"], + [89, "a1", "(pointer int16)"] ], "generic-reset-buffers": [ @@ -7338,7 +7344,7 @@ [24, "a0", "dma-packet"] ], - "draw-bones-generic-merc": [ + "draw-bones-generic-merc":[ [11, "v1", "generic-merc-ctrl"], [198, "v1", "generic-merc-ctrl"], [274, "a0", "generic-merc-ctrl"], @@ -7352,7 +7358,7 @@ ], "generic-merc-execute-all": [ - [[165, 170], "v1", "terrain-context"], + [[165,170], "v1", "terrain-context"], [92, "a0", "terrain-context"], [96, "v1", "terrain-context"], [100, "v1", "terrain-context"], @@ -7370,7 +7376,7 @@ [32, "a0", "terrain-context"] ], - "generic-work-init": [ + "generic-work-init":[ [10, "a0", "terrain-context"], [13, "a0", "terrain-context"], [16, "a0", "terrain-context"], @@ -7525,5 +7531,74 @@ [57, "v1", "(inline-array vector)"] ], + "ocean-near-add-upload":[ + [[40, 48], "a0", "dma-packet"], + [64, "a2", "(pointer int16)"], + [[81, 89], "a1", "vector4w"], + [[90, 98], "v1", "vector4w"], + [[111, 127], "t0", "vector4w"], + [[132, 146], "a1", "vector"], + [[250, 272], "a1", "(inline-array vector)"] + ], + + "draw-ocean-mid": [ + [169, "t3", "(pointer uint8)"], + [[23, 28], "a0", "dma-packet"] + ], + + "ocean-seams-add-constants": [ + [[7, 15], "a1", "dma-packet"], + [[19, 27], "a1", "vector"], + [[28, 36], "a1", "vector"], + [[37, 45], "a1", "vector"], + [[46, 55], "v1", "vector"] + ], + + "ocean-mid-add-upload-table": [ + [[44, 52], "a0", "dma-packet"], + [[54, 59], "v1", "vector4w"], + [[62, 75], "v1", "(pointer uint128)"], + [[158, 166], "a0", "dma-packet"], + [[138, 145], "v1", "(pointer uint128)"] + ], + + "ocean-mid-camera-masks-set!": [ + [30, "a2", "(pointer uint8)"], + [41, "a2", "(pointer uint8)"], + [49, "v1", "(pointer uint8)"] + ], + + "ocean-mid-mask-ptrs-bit?": [ + [31, "a0", "(pointer uint8)"] + ], + + "ocean-mid-camera-masks-bit?": [ + [25, "a0", "(pointer uint8)"] + ], + + "ocean-mid-add-upload": [ + [[48, 62], "a2", "dma-packet"], + [[76, 81], "a0", "dma-packet"], + [95, "v1", "(pointer uint64)"] + ], + + "ocean-mid-add-call-flush": [ + [[3, 11], "a0", "dma-packet"] + ], + + "ocean-mid-add-call": [ + [[3, 11], "a0", "dma-packet"] + ], + + "ocean-mid-add-matrices": [ + [[12, 20], "a0", "dma-packet"], + [[30, 34], "v1", "matrix"], + [[41, 46], "s3", "vector"] + ], + + "ocean-mid-add-constants": [ + [[8, 16], "a0", "dma-packet"] + ], + "placeholder-do-not-add-below": [] } diff --git a/game/graphics/opengl_renderer/ocean/OceanMidAndFar.cpp b/game/graphics/opengl_renderer/ocean/OceanMidAndFar.cpp index deb0b7ee9..641e884e3 100644 --- a/game/graphics/opengl_renderer/ocean/OceanMidAndFar.cpp +++ b/game/graphics/opengl_renderer/ocean/OceanMidAndFar.cpp @@ -48,6 +48,8 @@ void OceanMidAndFar::render(DmaFollower& dma, handle_ocean_far(dma, render_state, prof); + handle_ocean_mid(dma, render_state, prof); + auto final_next = dma.read_and_advance(); ASSERT(final_next.vifcode0().kind == VifCode::Kind::NOP && final_next.vifcode1().kind == VifCode::Kind::NOP && final_next.size_bytes == 0); @@ -74,11 +76,24 @@ void OceanMidAndFar::handle_ocean_far(DmaFollower& dma, memcpy(init_data_buffer + 80, &val, 1); m_direct.render_gif(init_data_buffer, 160, render_state, prof); - while (dma.current_tag().kind == DmaTag::Kind::CNT) { + while (dma.current_tag().kind == DmaTag::Kind::CNT && + dma.current_tag_vifcode0().kind == VifCode::Kind::NOP) { auto data = dma.read_and_advance(); ASSERT(data.vifcode0().kind == VifCode::Kind::NOP); ASSERT(data.vifcode1().kind == VifCode::Kind::DIRECT); ASSERT(data.size_bytes / 16 == data.vifcode1().immediate); m_direct.render_gif(data.data, data.size_bytes, render_state, prof); } +} + +bool is_end_tag(const DmaTag& tag, const VifCode& v0, const VifCode& v1) { + return tag.qwc == 0 && tag.kind == DmaTag::Kind::NEXT && v0.kind == VifCode::Kind::NOP && + v1.kind == VifCode::Kind::NOP; +} +void OceanMidAndFar::handle_ocean_mid(DmaFollower& dma, + SharedRenderState* render_state, + ScopedProfilerNode& prof) { + while (!is_end_tag(dma.current_tag(), dma.current_tag_vifcode0(), dma.current_tag_vifcode1())) { + dma.read_and_advance(); + } } \ No newline at end of file diff --git a/game/graphics/opengl_renderer/ocean/OceanMidAndFar.h b/game/graphics/opengl_renderer/ocean/OceanMidAndFar.h index 55f6e1eb2..e2e66cc89 100644 --- a/game/graphics/opengl_renderer/ocean/OceanMidAndFar.h +++ b/game/graphics/opengl_renderer/ocean/OceanMidAndFar.h @@ -20,6 +20,9 @@ class OceanMidAndFar : public BucketRenderer { void handle_ocean_far(DmaFollower& dma, SharedRenderState* render_state, ScopedProfilerNode& prof); + void handle_ocean_mid(DmaFollower& dma, + SharedRenderState* render_state, + ScopedProfilerNode& prof); DirectRenderer m_direct; OceanTexture m_texture_renderer; diff --git a/goal_src/engine/gfx/ocean/ocean-h.gc b/goal_src/engine/gfx/ocean/ocean-h.gc index 43f2bbf8b..1716ebb04 100644 --- a/goal_src/engine/gfx/ocean/ocean-h.gc +++ b/goal_src/engine/gfx/ocean/ocean-h.gc @@ -10,6 +10,8 @@ (define-extern update-ocean (function none)) (define-extern draw-ocean (function none)) (define-extern draw-ocean-texture (function dma-buffer (inline-array vector) symbol none)) +(define-extern draw-ocean-transition (function dma-buffer none)) +(define-extern draw-ocean-mid (function dma-buffer none)) ;; The "ocean" renderer is used to render the infinite water. ;; It doesn't draw the rivers in FJ or the water near the farmer. @@ -204,7 +206,7 @@ (corner-array ocean-corner 25 :inline :offset-assert 80) (corner-count int32 :offset-assert 2080) (temp-vecs vector 4 :inline :offset-assert 2096) - (mid-mask-ptrs (pointer int32) 36 :offset-assert 2160) + (mid-mask-ptrs (pointer int64) 36 :offset-assert 2160) (mid-camera-masks uint64 36 :offset-assert 2304) (trans-mask-ptrs (pointer int32) 64 :offset-assert 2592) (trans-camera-masks ocean-trans-mask 16 :inline :offset-assert 2848) @@ -289,17 +291,17 @@ (fog vector :inline :offset-assert 48) (constants vector :inline :offset-assert 64) (constants2 vector :inline :offset-assert 80) - (drw-fan qword :inline :offset-assert 96) - (env-fan qword :inline :offset-assert 112) - (drw-adgif qword :inline :offset-assert 128) + (drw-fan gs-gif-tag :inline :offset-assert 96) ;; was qword + (env-fan gs-gif-tag :inline :offset-assert 112) ;; was qword + (drw-adgif gs-gif-tag :inline :offset-assert 128);; was qword (drw-texture adgif-shader :inline :offset-assert 144) - (drw-strip-0 qword :inline :offset-assert 224) - (drw-strip-1 qword :inline :offset-assert 240) - (env-adgif qword :inline :offset-assert 256) + (drw-strip-0 gs-gif-tag :inline :offset-assert 224) ;; was qword + (drw-strip-1 gs-gif-tag :inline :offset-assert 240) ;; was qword + (env-adgif gs-gif-tag :inline :offset-assert 256) ;; was qword (env-texture adgif-shader :inline :offset-assert 272) - (env-strip qword :inline :offset-assert 352) + (env-strip gs-gif-tag :inline :offset-assert 352) ;; was qword (env-color vector :inline :offset-assert 368) - (index-table uint128 8 :offset-assert 384) + (index-table vector4w 8 :inline :offset-assert 384) (pos0 vector :inline :offset-assert 512) (pos1 vector :inline :offset-assert 528) (pos2 vector :inline :offset-assert 544) diff --git a/goal_src/engine/gfx/ocean/ocean-mid.gc b/goal_src/engine/gfx/ocean/ocean-mid.gc index 2bc25ba13..e4ef7de88 100644 --- a/goal_src/engine/gfx/ocean/ocean-mid.gc +++ b/goal_src/engine/gfx/ocean/ocean-mid.gc @@ -5,10 +5,1161 @@ ;; name in dgo: ocean-mid ;; dgos: GAME, ENGINE -;; TODO - for ocean-transition -(define-extern ocean-mid-add-matrices (function dma-buffer none)) ;; not verified -(define-extern ocean-mid-add-call-flush (function dma-buffer uint none)) -(define-extern draw-ocean-transition (function dma-buffer none)) -(define-extern ocean-mid-add-call (function dma-buffer int none)) -(define-extern ocean-mid-camera-masks-bit? (function uint uint)) -(define-extern ocean-mid-mask-ptrs-bit? (function uint uint)) +(define ocean-mid-block (new 'static 'vu-function #| :length #x497 :qlength #x24c |#)) + + +(defun ocean-mid-setup-constants ((arg0 ocean-mid-constants)) + (let ((v1-0 *math-camera*)) + (set! (-> arg0 hmge-scale quad) (-> v1-0 hmge-scale quad)) + (set! (-> arg0 inv-hmge-scale quad) (-> v1-0 inv-hmge-scale quad)) + (set! (-> arg0 hvdf-offset quad) (-> v1-0 hvdf-off quad)) + (set-vector! (-> arg0 fog) (-> v1-0 pfog0) (-> v1-0 fog-min) (-> v1-0 fog-max) 3072.0) + ) + (set-vector! (-> arg0 constants) 0.5 0.5 0.0 393216.0) + (set-vector! (-> arg0 constants2) 0.5 0.5 1.0 0.0) + (let ((v1-3 *ocean-subdivide-draw-mode*)) + (cond + ((zero? v1-3) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ((= v1-3 1) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ((= v1-3 2) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ) + ) + (set! (-> arg0 drw-fan regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (let ((v1-12 *ocean-subdivide-draw-mode*)) + (cond + ((zero? v1-12) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ((= v1-12 1) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ((= v1-12 2) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ) + ) + (set! (-> arg0 env-fan regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw-adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 drw-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (let* ((a0-13 *ocean-base-page*) + (v1-23 *ocean-base-block*) + (s4-0 (* (+ a0-13 8) 32)) + (s5-0 (* (+ a0-13 10) 32)) + ) + (set! (-> arg0 drw-texture tex0) + (new 'static 'gs-tex0 :tbw #x2 :tcc #x1 :th (log2 128) :tw (log2 128) :tbp0 v1-23) + ) + (set! (-> arg0 drw-texture prims 1) (gs-reg64 tex0-1)) + (set! (-> arg0 drw-texture tex1) (new 'static 'gs-tex1 :mxl #x6 :mmag #x1 :mmin #x5 :l #x1 :k #xeed)) + (set! (-> arg0 drw-texture prims 3) (gs-reg64 tex1-1)) + (set! (-> arg0 drw-texture miptbp1) + (new 'static 'gs-miptbp :tbw1 #x1 :tbw2 #x1 :tbw3 #x1 :tbp3 (+ s5-0 16) :tbp2 s5-0 :tbp1 s4-0) + ) + (set! (-> arg0 drw-texture prims 5) (gs-reg64 miptbp1-1)) + (set! (-> arg0 drw-texture clamp) (new 'static 'gs-clamp)) + (set! (-> arg0 drw-texture clamp-reg) (gs-reg64 clamp-1)) + (set! (-> arg0 drw-texture alpha) + (the-as + gs-alpha + (logior (logior (logior (the-as uint #x40000400004000) (shr (shl (+ s5-0 20) 50) 50)) (shr (shl (+ s5-0 21) 50) 30)) + (shr (shl (+ s5-0 22) 50) 10) + ) + ) + ) + ) + (set! (-> arg0 drw-texture prims 9) (gs-reg64 miptbp2-1)) + (let ((v1-45 *ocean-subdivide-draw-mode*)) + (cond + ((zero? v1-45) + (set! (-> arg0 drw-strip-0 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ((= v1-45 1) + (set! (-> arg0 drw-strip-0 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ((= v1-45 2) + (set! (-> arg0 drw-strip-0 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ) + ) + (set! (-> arg0 drw-strip-0 regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (let ((v1-54 *ocean-subdivide-draw-mode*)) + (cond + ((zero? v1-54) + (set! (-> arg0 drw-strip-1 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ((= v1-54 1) + (set! (-> arg0 drw-strip-1 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ((= v1-54 2) + (set! (-> arg0 drw-strip-1 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ) + ) + (set! (-> arg0 drw-strip-1 regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 env-adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 env-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (let ((s5-1 (-> arg0 env-texture))) + (adgif-shader<-texture-simple! s5-1 (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #x100))) + (set! (-> s5-1 alpha) (new 'static 'gs-alpha :b #x2 :c #x1 :d #x1)) + ) + (let ((v1-66 *ocean-subdivide-draw-mode*)) + (cond + ((zero? v1-66) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ((= v1-66 1) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ((= v1-66 2) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1) + :nreg #x3 + ) + ) + ) + ) + ) + (set! (-> arg0 env-strip regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 env-color quad) (-> *time-of-day-context* current-sun env-color quad)) + (set-vector! (-> arg0 index-table 0) 63 84 66 0) + (set-vector! (-> arg0 index-table 1) 54 72 57 0) + (set-vector! (-> arg0 index-table 2) 45 60 48 0) + (set-vector! (-> arg0 index-table 3) 36 48 39 0) + (set-vector! (-> arg0 index-table 4) 27 36 30 0) + (set-vector! (-> arg0 index-table 5) 18 24 21 0) + (set-vector! (-> arg0 index-table 6) 9 12 12 0) + (set-vector! (-> arg0 index-table 7) 0 0 3 0) + (set-vector! (-> arg0 pos0) 0.0 0.0 0.0 1.0) + (set-vector! (-> arg0 pos1) 393216.0 0.0 0.0 1.0) + (set-vector! (-> arg0 pos2) 0.0 0.0 393216.0 1.0) + (set-vector! (-> arg0 pos3) 393216.0 0.0 393216.0 1.0) + (none) + ) + +;; definition for function ocean-mid-add-constants +;; INFO: Return type mismatch pointer vs none. +(defun ocean-mid-add-constants ((arg0 dma-buffer)) + (let* ((a1-0 36) + (v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-0)) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) + (new 'static 'vif-tag :imm #x2dd :cmd (vif-cmd unpack-v4-32) :num a1-0) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + (ocean-mid-setup-constants (the-as ocean-mid-constants (-> arg0 base))) + (&+! (-> arg0 base) 576) + (none) + ) + +;; definition for function ocean-matrix*! +(defun ocean-matrix*! ((arg0 matrix) (arg1 matrix) (arg2 matrix)) + (rlet ((acc :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + (vf8 :class vf) + (vf9 :class vf) + ) + (.lvf vf1 (&-> arg1 vector 0 quad)) + (.lvf vf5 (&-> arg2 vector 0 quad)) + (.lvf vf6 (&-> arg2 vector 1 quad)) + (.lvf vf7 (&-> arg2 vector 2 quad)) + (.lvf vf8 (&-> arg2 vector 3 quad)) + (.lvf vf2 (&-> arg1 vector 1 quad)) + (.lvf vf3 (&-> arg1 vector 2 quad)) + (.lvf vf4 (&-> arg1 vector 3 quad)) + (.mul.x.vf acc vf5 vf1) + (.add.mul.y.vf acc vf6 vf1 acc) + (.add.mul.z.vf acc vf7 vf1 acc) + (.add.mul.w.vf vf9 vf8 vf1 acc) + (.mul.x.vf acc vf5 vf2) + (.add.mul.y.vf acc vf6 vf2 acc) + (.add.mul.z.vf acc vf7 vf2 acc) + (.add.mul.w.vf vf10 vf8 vf2 acc) + (.mul.x.vf acc vf5 vf3) + (.add.mul.y.vf acc vf6 vf3 acc) + (.add.mul.z.vf acc vf7 vf3 acc) + (.add.mul.w.vf vf11 vf8 vf3 acc) + (.mul.x.vf acc vf5 vf4) + (.add.mul.y.vf acc vf6 vf4 acc) + (.add.mul.z.vf acc vf7 vf4 acc) + (.add.mul.w.vf vf12 vf8 vf4 acc) + (.svf (&-> arg0 vector 0 quad) vf9) + (.svf (&-> arg0 vector 1 quad) vf10) + (.svf (&-> arg0 vector 2 quad) vf11) + (.svf (&-> arg0 vector 3 quad) vf12) + arg0 + ) + ) + +;; definition for function ocean-vector-matrix*! +(defun ocean-vector-matrix*! ((arg0 vector) (arg1 vector) (arg2 matrix)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (init-vf0-vector) + (.lvf vf1 (&-> arg2 vector 0 quad)) + (.lvf vf2 (&-> arg2 vector 1 quad)) + (.lvf vf3 (&-> arg2 vector 2 quad)) + (.lvf vf4 (&-> arg2 vector 3 quad)) + (.lvf vf5 (&-> arg1 quad)) + (.mul.x.vf acc vf1 vf5) + (.add.mul.y.vf acc vf2 vf5 acc) + (.add.mul.z.vf acc vf3 vf5 acc) + (.add.mul.w.vf vf5 vf4 vf0 acc) + (.svf (&-> arg0 quad) vf5) + arg0 + ) + ) + +;; definition for function ocean-mid-add-matrices +;; INFO: Return type mismatch pointer vs none. +;; Used lq/sq +(defun ocean-mid-add-matrices ((arg0 dma-buffer) (arg1 vector)) + (let ((s5-0 (new-stack-vector0))) + (-> *math-camera* camera-rot) + (let* ((a2-0 8) + (v1-2 arg0) + (a0-1 (the-as object (-> v1-2 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) + (new 'static 'vif-tag :imm #x8000 :cmd (vif-cmd unpack-v4-32) :num a2-0) + ) + (set! (-> v1-2 base) (&+ (the-as pointer a0-1) 16)) + ) + (let ((s4-0 (-> arg0 base))) + (let* ((v1-3 (the-as object s4-0)) + (t0-2 (-> *math-camera* camera-rot)) + (a0-4 (-> t0-2 vector 0 quad)) + (a2-4 (-> t0-2 vector 1 quad)) + (a3-4 (-> t0-2 vector 2 quad)) + (t0-3 (-> t0-2 vector 3 quad)) + ) + (set! (-> (the-as matrix v1-3) vector 0 quad) a0-4) + (set! (-> (the-as matrix v1-3) vector 1 quad) a2-4) + (set! (-> (the-as matrix v1-3) vector 2 quad) a3-4) + (set! (-> (the-as matrix v1-3) vector 3 quad) t0-3) + ) + (let ((s3-0 (the-as object (&+ s4-0 48)))) + (vector-matrix*! s5-0 arg1 (-> *math-camera* camera-rot)) + (set! (-> (the-as vector s3-0) x) (-> s5-0 x)) + (set! (-> (the-as vector s3-0) y) (-> s5-0 y)) + (set! (-> (the-as vector s3-0) z) (-> s5-0 z)) + ) + (let ((a0-6 (&+ (-> arg0 base) 64))) + (ocean-matrix*! (the-as matrix a0-6) (the-as matrix s4-0) (-> *math-camera* perspective)) + ) + ) + ) + (&+! (-> arg0 base) 128) + (none) + ) + +;; definition for function ocean-mid-check +;; Used lq/sq +(defun ocean-mid-check ((arg0 pointer) (arg1 int) (arg2 int) (arg3 vector)) + (local-vars (v0-0 symbol) (v1-10 float) (a3-2 float) (a3-6 float) (a3-10 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let ((v1-0 (new-stack-vector0)) + (t0-1 (-> *math-camera* trans)) + ) + 1.0 + (set! (-> v1-0 x) (+ (-> arg3 x) (* 393216.0 (the float arg1)))) + (set! (-> v1-0 y) (-> arg3 y)) + (set! (-> v1-0 z) (+ (-> arg3 z) (* 393216.0 (the float arg2)))) + (let ((a3-1 v1-0) + (t1-0 t0-1) + ) + (.lvf vf2 (&-> a3-1 quad)) + (.lvf vf3 (&-> t1-0 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a3-2 vf1) + (when (< a3-2 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + ) + (set! (-> v1-0 x) (+ 393216.0 (-> v1-0 x))) + (let ((a3-5 v1-0) + (t1-1 t0-1) + ) + (.lvf vf2 (&-> a3-5 quad)) + (.lvf vf3 (&-> t1-1 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a3-6 vf1) + (when (< a3-6 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + ) + (set! (-> v1-0 z) (+ 393216.0 (-> v1-0 z))) + (let ((a3-9 v1-0) + (t1-2 t0-1) + ) + (.lvf vf2 (&-> a3-9 quad)) + (.lvf vf3 (&-> t1-2 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a3-10 vf1) + (when (< a3-10 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + ) + (set! (-> v1-0 x) (+ -393216.0 (-> v1-0 x))) + (.lvf vf2 (&-> v1-0 quad)) + (.lvf vf3 (&-> t0-1 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-10 vf1) + (when (< v1-10 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + v0-0 + ) + ) + ) + +;; definition for function ocean-mid-add-call +;; INFO: Return type mismatch pointer vs none. +(defun ocean-mid-add-call ((arg0 dma-buffer) (arg1 int)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1 :imm arg1)) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + (none) + ) + +;; definition for function ocean-mid-add-call-flush +;; INFO: Return type mismatch pointer vs none. +(defun ocean-mid-add-call-flush ((arg0 dma-buffer) (arg1 uint)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1 :imm arg1)) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + (none) + ) + +;; definition for function ocean-mid-add-upload +;; Used lq/sq +(defun ocean-mid-add-upload ((arg0 dma-buffer) (arg1 int) (arg2 int) (arg3 int) (arg4 int) (arg5 float)) + (let ((gp-0 (new-stack-vector0))) + (let ((v1-1 (-> *ocean-map* start-corner))) + (set! (-> gp-0 x) (+ (-> v1-1 x) (* 3145728.0 (the float arg2)))) + (set! (-> gp-0 y) (-> v1-1 y)) + (set! (-> gp-0 z) (+ (-> v1-1 z) (* 3145728.0 (the float arg1)))) + ) + (set! (-> gp-0 w) 1.0) + (ocean-mid-add-matrices arg0 gp-0) + (let ((v1-4 (+ (the-as uint (-> *ocean-map* ocean-colors)) (* (+ (* 416 arg1) (* arg2 8)) 4)))) + (dotimes (a0-6 9) + (let* ((a1-3 arg0) + (a2-1 (the-as object (-> a1-3 base))) + ) + (set! (-> (the-as dma-packet a2-1) dma) (new 'static 'dma-tag :qwc #x3 :id (dma-tag-id ref) :addr v1-4)) + (set! (-> (the-as dma-packet a2-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a2-1) vif1) (new 'static 'vif-tag + :num #xc + :cmd (vif-cmd unpack-v4-8) + :imm (logior (shr (shl (+ (* 12 a0-6) 8) 54) 54) #xc000) + ) + ) + (set! (-> a1-3 base) (&+ (the-as pointer a2-1) 16)) + ) + (+! v1-4 208) + ) + ) + (let* ((a2-3 1) + (v1-7 arg0) + (a0-7 (the-as object (-> v1-7 base))) + ) + (set! (-> (the-as dma-packet a0-7) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-3)) + (set! (-> (the-as dma-packet a0-7) vif0) (new 'static 'vif-tag :imm #x204 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-7) vif1) + (new 'static 'vif-tag :imm #xc074 :num #x2 :cmd (vif-cmd unpack-v4-8)) + ) + (set! (-> v1-7 base) (&+ (the-as pointer a0-7) 16)) + ) + (let ((v1-8 (-> arg0 base))) + (let ((a0-12 (-> *ocean-map* ocean-mid-masks data arg3))) + (set! (-> *ocean-work* mid-mask-ptrs arg4) (the-as (pointer int64) v1-8)) + (set! (-> (the-as (pointer uint64) v1-8)) (-> a0-12 dword)) + ) + (set! (-> (the-as (pointer uint64) v1-8) 1) (the-as uint 0)) + ) + (&+! (-> arg0 base) 16) + (when (< arg5 556091.4) + (let* ((v1-12 (-> *math-camera* trans)) + (s5-1 (&-> *ocean-work* mid-camera-masks arg4)) + (s4-1 (+ (the int (* 0.0000025431316 (- (-> v1-12 x) (-> gp-0 x)))) -1)) + (s3-1 (+ (the int (* 0.0000025431316 (- (-> v1-12 z) (-> gp-0 z)))) -1)) + ) + (dotimes (s2-1 3) + (dotimes (s1-1 3) + (let ((a1-12 (+ s1-1 s4-1)) + (a2-7 (+ s2-1 s3-1)) + ) + (if (and (>= a1-12 0) (>= a2-7 0) (< a1-12 8) (< a2-7 8)) + (ocean-mid-check s5-1 a1-12 a2-7 gp-0) + ) + ) + ) + ) + ) + #f + ) + ) + ) + +;; definition for function ocean-mid-camera-masks-bit? +(defun ocean-mid-camera-masks-bit? ((arg0 uint) (arg1 uint)) + (cond + ((or (< (the-as int arg0) 0) (>= (the-as int arg0) 48) (< (the-as int arg1) 0) (>= (the-as int arg1) 48)) + #t + ) + (else + (let* ((a3-0 (/ (the-as int arg0) 8)) + (a2-3 (/ (the-as int arg1) 8)) + (a0-1 (logand arg0 7)) + (v1-1 (logand arg1 7)) + (a1-3 (+ (* 6 a3-0) a2-3)) + ) + (logtest? (-> (the-as (pointer uint8) (+ (+ a0-1 (* a1-3 8)) (the-as uint *ocean-work*))) 2300) (ash 1 v1-1)) + ) + ) + ) + ) + +;; definition for function ocean-mid-mask-ptrs-bit? +(defun ocean-mid-mask-ptrs-bit? ((arg0 uint) (arg1 uint)) + (cond + ((or (< (the-as int arg0) 0) (>= (the-as int arg0) 48) (< (the-as int arg1) 0) (>= (the-as int arg1) 48)) + #t + ) + (else + (let* ((a3-0 (/ (the-as int arg0) 8)) + (a2-3 (/ (the-as int arg1) 8)) + (a0-1 (logand arg0 7)) + (v1-1 (logand arg1 7)) + (a1-3 (+ (* 6 a3-0) a2-3)) + ) + (if (-> *ocean-work* mid-mask-ptrs a1-3) + (logtest? (-> (the-as (pointer uint8) (+ a0-1 (the-as uint (-> *ocean-work* mid-mask-ptrs a1-3)))) 0) + (ash 1 v1-1) + ) + #t + ) + ) + ) + ) + ) + +;; definition for function ocean-mid-camera-masks-set! +(defun ocean-mid-camera-masks-set! ((arg0 uint) (arg1 uint)) + (cond + ((or (< (the-as int arg0) 0) (>= (the-as int arg0) 48) (< (the-as int arg1) 0) (>= (the-as int arg1) 48)) + #f + ) + (else + (let* ((a3-0 (/ (the-as int arg0) 8)) + (a2-3 (/ (the-as int arg1) 8)) + (v1-1 (logand arg0 7)) + (a0-1 (logand arg1 7)) + (a2-4 (+ (* 6 a3-0) a2-3)) + (a1-5 (&-> *ocean-work* mid-camera-masks a2-4)) + ) + (cond + (a1-5 + (cond + ((logtest? (-> (the-as (pointer uint8) (+ v1-1 (the-as uint (-> *ocean-work* mid-mask-ptrs a2-4)))) 0) + (ash 1 a0-1) + ) + #f + ) + (else + (logior! (-> (the-as (pointer uint8) (+ v1-1 (the-as uint a1-5))) 0) (ash 1 a0-1)) + #t + ) + ) + ) + (else + #f + ) + ) + ) + ) + ) + ) + +;; definition for function ocean-mid-add-upload-table +;; WARN: Function may read a register that is not set: f31 +;; Used lq/sq +(defun ocean-mid-add-upload-table ((arg0 dma-buffer) (arg1 uint) (arg2 uint) (arg3 (pointer float)) (arg4 int) (arg5 symbol)) + (local-vars + (r0-0 int) + (r0-1 int) + (r0-2 int) + (r0-3 int) + (r0-4 int) + (v1-8 float) + (a0-19 uint128) + (a0-20 uint128) + (a0-21 uint128) + (a1-14 uint128) + (a1-15 uint128) + (a1-16 uint128) + (a2-15 uint128) + (a3-11 uint128) + (f31-0 none) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (when (ocean-mid-camera-masks-set! arg1 arg2) + (let ((a1-2 (new-stack-vector0))) + (let ((v1-1 (-> *ocean-map* start-corner))) + (set! (-> a1-2 x) (+ (-> v1-1 x) (* 393216.0 (the float arg2)))) + (set! (-> a1-2 y) (-> v1-1 y)) + (set! (-> a1-2 z) (+ (-> v1-1 z) (* 393216.0 (the float arg1)))) + ) + (set! (-> a1-2 w) 1.0) + (ocean-mid-add-matrices arg0 a1-2) + ) + (let* ((a1-3 9) + (v1-3 arg0) + (a0-3 (the-as object (-> v1-3 base))) + ) + (set! (-> (the-as dma-packet a0-3) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-3)) + (set! (-> (the-as dma-packet a0-3) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-3) vif1) + (new 'static 'vif-tag :imm #x8008 :cmd (vif-cmd unpack-v4-32) :num a1-3) + ) + (set! (-> v1-3 base) (&+ (the-as pointer a0-3) 16)) + ) + (set-vector! (the-as vector4w (-> arg0 base)) arg4 0 0 0) + (&+! (-> arg0 base) 16) + (let ((v1-7 (the-as (pointer uint128) (-> arg0 base)))) + (set! (-> v1-7 0) (-> *ocean-trans-st-table* 0 quad)) + (set! (-> v1-7 1) (-> *ocean-trans-st-table* 1 quad)) + (set! (-> v1-7 2) (-> *ocean-trans-st-table* 2 quad)) + (set! (-> v1-7 3) (-> *ocean-trans-st-table* 3 quad)) + (let ((a0-18 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ (* 52 (the-as int arg1)) arg2)))) + (a1-13 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ arg2 1 (* 52 (the-as int arg1)))))) + (a2-14 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ (* 52 (the-as int (+ arg1 1))) arg2)))) + (a3-10 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ arg2 1 (* 52 (the-as int (+ arg1 1))))))) + ) + (.pextlb a0-19 0 a0-18) + (.mov r0-0 f31-0) + (.pextlb a1-14 0 a1-13) + (.mov r0-1 f31-0) + (.pextlb a2-15 0 a2-14) + (.mov r0-2 f31-0) + (.pextlb a3-11 0 a3-10) + ) + (.mov r0-3 f31-0) + (.pextlh a0-20 0 a0-19) + (.mov r0-4 f31-0) + (.pextlh a1-15 0 a1-14) + (.mov vf1 a0-20) + (.pextlh a0-21 0 a2-15) + (.mov vf2 a1-15) + (.pextlh a1-16 0 a3-11) + (.mov vf3 a0-21) + (nop!) + (.mov vf4 a1-16) + (.itof.vf vf1 vf1) + (nop!) + (.itof.vf vf2 vf2) + (nop!) + (.itof.vf vf3 vf3) + (nop!) + (.itof.vf vf4 vf4) + (nop!) + (nop!) + (.svf (&-> v1-7 4) vf1) + (nop!) + (.svf (&-> v1-7 5) vf2) + (nop!) + (.svf (&-> v1-7 6) vf3) + (nop!) + (.svf (&-> v1-7 7) vf4) + ) + (.mov v1-8 vf4) + (&+! (-> arg0 base) 128) + (let* ((v1-11 arg0) + (a0-22 (the-as object (-> v1-11 base))) + ) + (set! (-> (the-as dma-packet a0-22) dma) + (new 'static 'dma-tag :id (dma-tag-id ref) :addr (the-as int arg3) :qwc arg4) + ) + (set! (-> (the-as dma-packet a0-22) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-22) vif1) + (new 'static 'vif-tag :imm #x8011 :cmd (vif-cmd unpack-v4-32) :num arg4) + ) + (set! (-> v1-11 base) (&+ (the-as pointer a0-22) 16)) + ) + (if arg5 + (ocean-mid-add-call arg0 275) + (ocean-mid-add-call arg0 107) + ) + ) + (none) + ) + ) + +;; definition for function ocean-mid-add-upload-top +(defun ocean-mid-add-upload-top ((arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (let ((s2-0 (-> *ocean-work* mid-minx)) + (s1-0 (-> *ocean-work* mid-maxx)) + (s3-0 (ocean-mid-camera-masks-bit? arg1 arg2)) + ) + (cond + ((ocean-mid-mask-ptrs-bit? arg1 arg2) + ) + ((= arg2 s2-0) + (cond + (s3-0 + (ocean-mid-add-upload-table arg0 (+ arg1 -1) arg2 *ocean-down-table* 7 #t) + (ocean-mid-add-upload-table arg0 arg1 (+ arg2 -1) *ocean-right-table* 7 #t) + ) + (else + (let ((s3-1 (ocean-mid-mask-ptrs-bit? (+ arg1 1) arg2)) + (v1-5 (ocean-mid-mask-ptrs-bit? arg1 (+ arg2 1))) + ) + (cond + ((and s3-1 v1-5) + ) + (s3-1 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-right-table* 7 #t) + ) + (v1-5 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-down-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-down-right-table* 10 #f) + ) + ) + ) + ) + ) + ) + ((= arg2 s1-0) + (cond + (s3-0 + (ocean-mid-add-upload-table arg0 (+ arg1 -1) arg2 *ocean-down-table* 7 #t) + (ocean-mid-add-upload-table arg0 arg1 (+ arg2 1) *ocean-left-table* 7 #t) + ) + (else + (let ((s3-2 (ocean-mid-mask-ptrs-bit? (+ arg1 1) arg2)) + (v1-7 (ocean-mid-mask-ptrs-bit? arg1 (+ arg2 -1))) + ) + (cond + ((and s3-2 v1-7) + ) + (s3-2 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-left-table* 7 #t) + ) + (v1-7 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-down-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-down-left-table* 10 #t) + ) + ) + ) + ) + ) + ) + (s3-0 + (ocean-mid-add-upload-table arg0 (+ arg1 -1) arg2 *ocean-down-table* 7 #t) + ) + ) + ) + (none) + ) + +;; definition for function ocean-mid-add-upload-middle +(defun ocean-mid-add-upload-middle ((arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (let ((s3-0 (-> *ocean-work* mid-minx)) + (s2-0 (-> *ocean-work* mid-maxx)) + (s1-0 (ocean-mid-camera-masks-bit? arg1 arg2)) + ) + (cond + ((ocean-mid-mask-ptrs-bit? arg1 arg2) + ) + ((= arg2 s3-0) + (cond + (s1-0 + (ocean-mid-add-upload-table arg0 arg1 (+ arg2 -1) *ocean-right-table* 7 #t) + ) + ((ocean-mid-mask-ptrs-bit? arg1 (+ arg2 1)) + ) + (else + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-right-table* 7 #t) + ) + ) + ) + ((= arg2 s2-0) + (cond + (s1-0 + (ocean-mid-add-upload-table arg0 arg1 (+ arg2 1) *ocean-left-table* 7 #t) + ) + ((ocean-mid-mask-ptrs-bit? arg1 (+ arg2 -1)) + ) + (else + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-left-table* 7 #t) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function ocean-mid-add-upload-bottom +(defun ocean-mid-add-upload-bottom ((arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (let ((s2-0 (-> *ocean-work* mid-minx)) + (s1-0 (-> *ocean-work* mid-maxx)) + (s3-0 (ocean-mid-camera-masks-bit? arg1 arg2)) + ) + (cond + ((ocean-mid-mask-ptrs-bit? arg1 arg2) + ) + ((= arg2 s2-0) + (cond + (s3-0 + (ocean-mid-add-upload-table arg0 (+ arg1 1) arg2 *ocean-up-table* 7 #t) + (ocean-mid-add-upload-table arg0 arg1 (+ arg2 -1) *ocean-right-table* 7 #t) + ) + (else + (let ((s3-1 (ocean-mid-mask-ptrs-bit? (+ arg1 -1) arg2)) + (v1-5 (ocean-mid-mask-ptrs-bit? arg1 (+ arg2 1))) + ) + (cond + ((and s3-1 v1-5) + ) + (s3-1 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-right-table* 7 #t) + ) + (v1-5 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-up-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-up-right-table* 10 #t) + ) + ) + ) + ) + ) + ) + ((= arg2 s1-0) + (cond + (s3-0 + (ocean-mid-add-upload-table arg0 (+ arg1 1) arg2 *ocean-up-table* 7 #t) + (ocean-mid-add-upload-table arg0 arg1 (+ arg2 1) *ocean-left-table* 7 #t) + ) + (else + (let ((s3-2 (ocean-mid-mask-ptrs-bit? (+ arg1 -1) arg2)) + (v1-7 (ocean-mid-mask-ptrs-bit? arg1 (+ arg2 -1))) + ) + (cond + ((and s3-2 v1-7) + ) + (s3-2 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-left-table* 7 #t) + ) + (v1-7 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-up-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-up-left-table* 10 #f) + ) + ) + ) + ) + ) + ) + (s3-0 + (ocean-mid-add-upload-table arg0 (+ arg1 1) arg2 *ocean-up-table* 7 #t) + ) + ) + ) + (none) + ) + +;; definition for function ocean-seams-add-constants +;; INFO: Return type mismatch pointer vs none. +(defun ocean-seams-add-constants ((arg0 dma-buffer)) + (let* ((a2-0 4) + (v1-0 arg0) + (a1-0 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a1-0) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> (the-as dma-packet a1-0) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a1-0) vif1) + (new 'static 'vif-tag :imm #x2fd :cmd (vif-cmd unpack-v4-32) :num a2-0) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a1-0) 16)) + ) + (let ((v1-1 (-> arg0 base))) + (set-vector! (the-as vector (&+ v1-1 0)) 0.0 0.0 0.0 1.0) + (set-vector! (the-as vector (&+ v1-1 16)) 393216.0 0.0 0.0 1.0) + (set-vector! (the-as vector (&+ v1-1 32)) 0.0 0.0 393216.0 1.0) + (set-vector! (the-as vector (&+ v1-1 48)) 393216.0 0.0 393216.0 1.0) + ) + (&+! (-> arg0 base) 64) + (none) + ) + +;; definition for function draw-ocean-mid-seams +;; INFO: Return type mismatch symbol vs none. +(defun draw-ocean-mid-seams ((arg0 dma-buffer)) + (local-vars (sv-32 uint) (sv-33 uint) (sv-34 uint) (sv-35 uint) (sv-36 sphere)) + (ocean-seams-add-constants arg0) + (set! sv-32 (-> *ocean-work* mid-minx)) + (set! sv-33 (-> *ocean-work* mid-maxx)) + (set! sv-34 (-> *ocean-work* mid-minz)) + (set! sv-35 (-> *ocean-work* mid-maxz)) + (set! sv-36 (new 'stack 'sphere)) + (set! (-> sv-36 y) (-> *ocean-map* start-corner y)) + (set! (-> sv-36 w) 278045.7) + (let ((s5-0 sv-34) + (s4-0 sv-35) + ) + (while (>= s4-0 s5-0) + (let ((s3-0 sv-32) + (s2-0 sv-33) + ) + (while (>= s2-0 s3-0) + (set! (-> sv-36 x) (+ 196608.0 (* 393216.0 (the float s3-0)) (-> *ocean-map* start-corner x))) + (set! (-> sv-36 z) (+ 196608.0 (* 393216.0 (the float s5-0)) (-> *ocean-map* start-corner z))) + (when (sphere-cull sv-36) + (cond + ((= s5-0 sv-34) + (ocean-mid-add-upload-top arg0 s5-0 s3-0) + ) + ((= s5-0 sv-35) + (ocean-mid-add-upload-bottom arg0 s5-0 s3-0) + ) + (else + (ocean-mid-add-upload-middle arg0 s5-0 s3-0) + ) + ) + ) + (+! s3-0 1) + ) + ) + (+! s5-0 1) + ) + ) + (dotimes (v1-26 36) + (if (and (-> *ocean-work* mid-mask-ptrs v1-26) (nonzero? (-> *ocean-work* mid-camera-masks v1-26))) + (logior! (-> *ocean-work* mid-mask-ptrs v1-26 0) (-> *ocean-work* mid-camera-masks v1-26)) + ) + ) + (none) + ) + +;; definition for function draw-ocean-mid +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defun draw-ocean-mid ((arg0 dma-buffer)) + (rlet ((vf16 :class vf) + (vf17 :class vf) + (vf18 :class vf) + (vf19 :class vf) + (vf20 :class vf) + (vf21 :class vf) + (vf22 :class vf) + (vf23 :class vf) + ) + (dotimes (v1-0 36) + (set! (-> *ocean-work* mid-mask-ptrs v1-0) (the-as (pointer int64) #f)) + (set! (-> *ocean-work* mid-camera-masks v1-0) (the-as uint 0)) + ) + (dma-buffer-add-vu-function arg0 ocean-mid-block 1) + (let* ((v1-3 arg0) + (a0-6 (the-as object (-> v1-3 base))) + ) + (set! (-> (the-as dma-packet a0-6) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-6) vif0) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> (the-as dma-packet a0-6) vif1) (new 'static 'vif-tag :imm #x76 :cmd (vif-cmd offset))) + (set! (-> v1-3 base) (&+ (the-as pointer a0-6) 16)) + ) + (ocean-mid-add-constants arg0) + (ocean-mid-add-call arg0 0) + (let ((v1-5 *math-camera*)) + (.lvf vf16 (&-> v1-5 plane 0 quad)) + (.lvf vf17 (&-> v1-5 plane 1 quad)) + (.lvf vf18 (&-> v1-5 plane 2 quad)) + (.lvf vf19 (&-> v1-5 plane 3 quad)) + (.lvf vf20 (&-> v1-5 guard-plane 0 quad)) + (.lvf vf21 (&-> v1-5 guard-plane 1 quad)) + (.lvf vf22 (&-> v1-5 guard-plane 2 quad)) + (.lvf vf23 (&-> v1-5 guard-plane 3 quad)) + ) + (set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0)) + (let ((s5-0 (-> *math-camera* trans))) + (dotimes (s4-0 6) + (dotimes (s3-0 6) + (let* ((s2-0 (+ (* 6 s4-0) s3-0)) + (s1-0 (-> *ocean-map* ocean-spheres spheres s2-0)) + (s0-0 (-> (the-as (pointer int16) (+ (* s2-0 2) (the-as int (-> *ocean-map* ocean-mid-indices)))))) + ) + (when (sphere-cull s1-0) + (cond + ((< s0-0 0) + ) + ((let ((f30-0 (- (vector-vector-distance s1-0 s5-0) (-> s1-0 w)))) + (ocean-mid-add-upload arg0 s4-0 s3-0 s0-0 s2-0 f30-0) + (< f30-0 786432.0) + ) + (ocean-mid-add-call arg0 73) + (+! (-> *terrain-stats* ocean-mid fragments) 1) + (+! (-> *terrain-stats* ocean-mid tris) 256) + (+! (-> *terrain-stats* ocean-mid dverts) 288) + ) + (else + (ocean-mid-add-call arg0 46) + (+! (-> *terrain-stats* ocean-mid fragments) 1) + (+! (-> *terrain-stats* ocean-mid tris) 128) + (+! (-> *terrain-stats* ocean-mid dverts) 144) + ) + ) + ) + ) + ) + ) + ) + (when (not (or *ocean-near-off* (< 196608.0 (fabs (-> *math-camera* trans y))))) + (let ((a1-11 48) + (a2-2 0) + (v1-42 48) + (a0-25 0) + ) + (dotimes (a3-1 6) + (dotimes (t0-1 6) + (let ((t1-6 (&-> *ocean-work* mid-camera-masks (+ (* 6 a3-1) t0-1)))) + (when (nonzero? (-> t1-6 0)) + (dotimes (t2-3 8) + (let ((t3-1 (-> (the-as (pointer uint8) (+ t2-3 (the-as int t1-6))) 0))) + (when (nonzero? t3-1) + (let ((t4-2 (+ (* a3-1 8) t2-3))) + (if (< t4-2 v1-42) + (set! v1-42 t4-2) + ) + (if (< a0-25 t4-2) + (set! a0-25 t4-2) + ) + ) + (dotimes (t4-3 8) + (when (logtest? t3-1 (ash 1 t4-3)) + (let ((t5-9 (+ (* t0-1 8) t4-3))) + (if (< t5-9 a1-11) + (set! a1-11 t5-9) + ) + (if (< a2-2 t5-9) + (set! a2-2 t5-9) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> *ocean-work* mid-minx) (the-as uint a1-11)) + (set! (-> *ocean-work* mid-maxx) (the-as uint a2-2)) + (set! (-> *ocean-work* mid-minz) (the-as uint v1-42)) + (set! (-> *ocean-work* mid-maxz) (the-as uint a0-25)) + (when (and (< a1-11 a2-2) (< v1-42 a0-25)) + (ocean-mid-add-call-flush arg0 (the-as uint 41)) + (ocean-mid-add-call-flush arg0 (the-as uint 43)) + (draw-ocean-transition arg0) + (draw-ocean-mid-seams arg0) + ) + ) + ) + (ocean-mid-add-call-flush arg0 (the-as uint 41)) + 0 + (none) + ) + ) + + + + diff --git a/goal_src/engine/gfx/ocean/ocean-transition.gc b/goal_src/engine/gfx/ocean/ocean-transition.gc index d70352bff..bb82f1bec 100644 --- a/goal_src/engine/gfx/ocean/ocean-transition.gc +++ b/goal_src/engine/gfx/ocean/ocean-transition.gc @@ -10,32 +10,22 @@ (let ((v1-3 (- arg0 (* (-> *ocean-work* mid-minz) 4))) (a0-4 (- arg1 (* (-> *ocean-work* mid-minx) 4))) ) - (cond - ((or - (< v1-3 0) - (>= v1-3 (the-as uint 16)) - (< a0-4 0) - (>= a0-4 (the-as uint 16)) - ) - #f - ) - (else - (let* ((a3-0 (shr v1-3 2)) - (a2-3 (shr a0-4 2)) - (a1-2 (logand v1-3 3)) - (v1-4 (logand a0-4 3)) - (a0-6 (+ (* a3-0 4) a2-3)) - ) - (nonzero? - (logand - (-> *ocean-work* trans-camera-masks 0 mask (+ a1-2 (* a0-6 8))) - (ash 1 v1-4) - ) + (cond + ((or (< v1-3 0) (>= v1-3 (the-as uint 16)) (< a0-4 0) (>= a0-4 (the-as uint 16))) + #f ) + (else + (let* ((a3-0 (shr v1-3 2)) + (a2-3 (shr a0-4 2)) + (a1-2 (logand v1-3 3)) + (v1-4 (logand a0-4 3)) + (a0-6 (+ (* a3-0 4) a2-3)) + ) + (logtest? (-> *ocean-work* trans-camera-masks 0 mask (+ a1-2 (* a0-6 8))) (ash 1 v1-4)) + ) + ) ) - ) ) - ) ) ;; definition for function ocean-trans-mask-ptrs-bit? @@ -43,36 +33,29 @@ (let ((v1-3 (- arg0 (the-as int (* (-> *ocean-work* mid-minz) 4)))) (a0-4 (- arg1 (the-as int (* (-> *ocean-work* mid-minx) 4)))) ) - (cond - ((or - (< (the-as uint v1-3) 0) - (>= (the-as uint v1-3) (the-as uint 16)) - (< (the-as uint a0-4) 0) - (>= (the-as uint a0-4) (the-as uint 16)) - ) - #f - ) - (else - (let* ((a3-0 (shr v1-3 2)) - (a2-3 (shr a0-4 2)) - (a1-2 (logand v1-3 3)) - (v1-4 (logand a0-4 3)) - (a0-11 - (-> - *ocean-work* - trans-mask-ptrs - (+ (* (+ (* a3-0 4) a2-3) 4) a1-2) - ) - ) - ) - (if a0-11 - (nonzero? (logand (-> a0-11 1) (ash 1 v1-4))) + (cond + ((or (< (the-as uint v1-3) 0) + (>= (the-as uint v1-3) (the-as uint 16)) + (< (the-as uint a0-4) 0) + (>= (the-as uint a0-4) (the-as uint 16)) + ) #f ) + (else + (let* ((a3-0 (shr v1-3 2)) + (a2-3 (shr a0-4 2)) + (a1-2 (logand v1-3 3)) + (v1-4 (logand a0-4 3)) + (a0-11 (-> *ocean-work* trans-mask-ptrs (+ (* (+ (* a3-0 4) a2-3) 4) a1-2))) + ) + (if a0-11 + (logtest? (-> a0-11 1) (ash 1 v1-4)) + #f + ) + ) + ) ) - ) ) - ) ) ;; definition for function ocean-trans-mask-ptrs-set! @@ -80,83 +63,67 @@ (let ((v1-3 (- arg0 (the-as int (* (-> *ocean-work* mid-minz) 4)))) (a0-4 (- arg1 (the-as int (* (-> *ocean-work* mid-minx) 4)))) ) - (cond - ((or - (< (the-as uint v1-3) 0) - (>= (the-as uint v1-3) (the-as uint 16)) - (< (the-as uint a0-4) 0) - (>= (the-as uint a0-4) (the-as uint 16)) - ) - #f - ) - (else - (let* ((a2-3 (shr v1-3 2)) - (a1-2 (shr a0-4 2)) - (v1-4 (logand v1-3 3)) - (a0-5 (logand a0-4 3)) - (a3-6 - (-> - *ocean-work* - trans-mask-ptrs - (+ (* (+ (* a2-3 4) a1-2) 4) v1-4) - ) - ) - ) - (cond - (a3-6 - (cond - ((logtest? (-> a3-6 1) (ash 1 a0-5)) - #f - ) - (else - (let ((a1-6 (-> *ocean-work* trans-temp-masks (+ (* a2-3 4) a1-2)))) - (logior! (-> a1-6 mask v1-4) (ash 1 a0-5)) + (cond + ((or (< (the-as uint v1-3) 0) + (>= (the-as uint v1-3) (the-as uint 16)) + (< (the-as uint a0-4) 0) + (>= (the-as uint a0-4) (the-as uint 16)) ) - #t - ) - ) - ) - (else - #f - ) + #f ) + (else + (let* ((a2-3 (shr v1-3 2)) + (a1-2 (shr a0-4 2)) + (v1-4 (logand v1-3 3)) + (a0-5 (logand a0-4 3)) + (a3-6 (-> *ocean-work* trans-mask-ptrs (+ (* (+ (* a2-3 4) a1-2) 4) v1-4))) + ) + (cond + (a3-6 + (cond + ((logtest? (-> a3-6 1) (ash 1 a0-5)) + #f + ) + (else + (let ((a1-6 (-> *ocean-work* trans-temp-masks (+ (* a2-3 4) a1-2)))) + (logior! (-> a1-6 mask v1-4) (ash 1 a0-5)) + ) + #t + ) + ) + ) + (else + #f + ) + ) + ) + ) ) - ) ) - ) ) ;; definition for function ocean-trans-add-upload-table ;; WARN: Function may read a register that is not set: f31 ;; Used lq/sq -(defun - ocean-trans-add-upload-table - ((arg0 dma-buffer) - (arg1 int) - (arg2 int) - (arg3 (pointer float)) - (arg4 int) - (arg5 symbol) - ) +(defun ocean-trans-add-upload-table ((arg0 dma-buffer) (arg1 int) (arg2 int) (arg3 (pointer float)) (arg4 int) (arg5 symbol)) (local-vars - (r0-0 uint128) - (r0-1 uint128) - (r0-2 uint128) - (r0-3 uint128) - (r0-4 uint128) - (r0-5 uint128) - (v1-12 (inline-array vector)) - (v1-14 float) - (a0-23 uint128) - (a0-24 uint128) - (a1-15 uint128) - (a1-16 uint128) - (a1-17 uint128) - (a2-15 uint128) - (a2-16 uint128) - (a3-10 uint128) - (f31-0 none) - ) + (r0-0 int) + (r0-1 int) + (r0-2 int) + (r0-3 int) + (r0-4 int) + (v1-12 (inline-array vector)) + (v1-14 float) + (a0-23 uint128) + (a0-24 uint128) + (a1-15 uint128) + (a1-16 uint128) + (a1-17 uint128) + (a2-15 uint128) + (a2-16 uint128) + (a3-10 uint128) + (f31-0 none) + ) (rlet ((acc :class vf) (vf1 :class vf) (vf10 :class vf) @@ -171,798 +138,525 @@ (vf8 :class vf) (vf9 :class vf) ) - (when (ocean-trans-mask-ptrs-set! arg1 arg2) - (let ((a1-2 (new-stack-vector0))) - (let ((v1-1 (-> *ocean-map* start-corner))) - (set! (-> a1-2 x) (+ (-> v1-1 x) (* 98304.0 (the float arg2)))) - (set! (-> a1-2 y) (-> v1-1 y)) - (set! (-> a1-2 z) (+ (-> v1-1 z) (* 98304.0 (the float arg1)))) - ) - (set! (-> a1-2 w) 1.0) - ) - (ocean-mid-add-matrices arg0) - (let* ((a1-3 9) - (v1-3 arg0) - (a0-3 (the-as object (-> v1-3 base))) - ) - (set! - (-> (the-as dma-packet a0-3) dma) - (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-3) - ) - (set! - (-> (the-as dma-packet a0-3) vif0) - (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) - ) - (set! - (-> (the-as dma-packet a0-3) vif1) - (new 'static 'vif-tag :imm #x8008 :cmd (vif-cmd unpack-v4-32) :num a1-3) - ) - (set! (-> v1-3 base) (&+ (the-as pointer a0-3) 16)) - ) - (set-vector! (the-as vector4w (-> arg0 base)) arg4 0 0 0) - (&+! (-> arg0 base) 16) - (let* ((a0-5 (logand arg1 3)) - (v1-7 (logand arg2 3)) - (v1-8 (+ (* 5 a0-5) v1-7)) - ) - (.lvf vf5 (&-> (&-> *ocean-trans-corner-table* 0 quad v1-8) 0)) - (.lvf vf6 (&-> (&-> *ocean-trans-corner-table* 0 quad (+ v1-8 1)) 0)) - (.lvf vf7 (&-> (&-> *ocean-trans-corner-table* 0 quad (+ v1-8 5)) 0)) - (.lvf vf8 (&-> (&-> *ocean-trans-corner-table* 0 quad (+ v1-8 6)) 0)) - ) - (.mov v1-12 vf8) - (let ((v1-13 (the-as (inline-array vector) (-> arg0 base)))) - (let ((a0-16 (/ arg1 4)) - (a1-11 (/ arg2 4)) - ) - (.lvf vf1 (&-> *ocean-trans-st-table* 0 quad)) - (.lvf vf2 (&-> *ocean-trans-st-table* 1 quad)) - (.lvf vf3 (&-> *ocean-trans-st-table* 2 quad)) - (.lvf vf4 (&-> *ocean-trans-st-table* 3 quad)) - (.mul.x.vf acc vf1 vf5) - (nop!) - (.add.mul.y.vf acc vf2 vf5 acc) - (nop!) - (.add.mul.z.vf acc vf3 vf5 acc) - (nop!) - (.add.mul.w.vf vf9 vf4 vf5 acc) - (nop!) - (.mul.x.vf acc vf1 vf6) - (nop!) - (.add.mul.y.vf acc vf2 vf6 acc) - (nop!) - (.add.mul.z.vf acc vf3 vf6 acc) - (nop!) - (.add.mul.w.vf vf10 vf4 vf6 acc) - (.svf (&-> v1-13 0 quad) vf9) - (.mul.x.vf acc vf1 vf7) - (nop!) - (.add.mul.y.vf acc vf2 vf7 acc) - (nop!) - (.add.mul.z.vf acc vf3 vf7 acc) - (nop!) - (.add.mul.w.vf vf11 vf4 vf7 acc) - (.svf (&-> v1-13 1 quad) vf10) - (.mul.x.vf acc vf1 vf8) - (nop!) - (.add.mul.y.vf acc vf2 vf8 acc) - (nop!) - (.add.mul.z.vf acc vf3 vf8 acc) - (nop!) - (.add.mul.w.vf vf12 vf4 vf8 acc) - (.svf (&-> v1-13 2 quad) vf11) - (nop!) - (.svf (&-> v1-13 3 quad) vf12) - (let - ((a2-14 - (the-as - uint128 - (-> *ocean-map* ocean-colors colors (+ (* 52 a0-16) a1-11)) + (when (ocean-trans-mask-ptrs-set! arg1 arg2) + (let ((a1-2 (new-stack-vector0))) + (let ((v1-1 (-> *ocean-map* start-corner))) + (set! (-> a1-2 x) (+ (-> v1-1 x) (* 98304.0 (the float arg2)))) + (set! (-> a1-2 y) (-> v1-1 y)) + (set! (-> a1-2 z) (+ (-> v1-1 z) (* 98304.0 (the float arg1)))) ) - ) - (a3-9 - (the-as - uint128 - (-> *ocean-map* ocean-colors colors (+ (+ a1-11 1) (* 52 a0-16))) - ) - ) - (t0-10 - (the-as - uint128 - (-> *ocean-map* ocean-colors colors (+ (* 52 (+ a0-16 1)) a1-11)) - ) - ) - (a0-22 - (the-as - uint128 - (-> - *ocean-map* - ocean-colors - colors - (+ (+ a1-11 1) (* 52 (+ a0-16 1))) - ) - ) - ) + (set! (-> a1-2 w) 1.0) + (ocean-mid-add-matrices arg0 a1-2) ) - (.pextlb a1-15 r0-0 a2-14) - (.mov r0-1 f31-0) - (.pextlb a2-15 r0-1 a3-9) - (.mov r0-2 f31-0) - (.pextlb a3-10 r0-2 t0-10) - (.mov r0-3 f31-0) - (.pextlb a0-23 r0-3 a0-22) - ) + (let* ((a1-3 9) + (v1-3 arg0) + (a0-3 (the-as object (-> v1-3 base))) + ) + (set! (-> (the-as dma-packet a0-3) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-3)) + (set! (-> (the-as dma-packet a0-3) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-3) vif1) + (new 'static 'vif-tag :imm #x8008 :cmd (vif-cmd unpack-v4-32) :num a1-3) + ) + (set! (-> v1-3 base) (&+ (the-as pointer a0-3) 16)) + ) + (set-vector! (the-as vector4w (-> arg0 base)) arg4 0 0 0) + (&+! (-> arg0 base) 16) + (let* ((a0-5 (logand arg1 3)) + (v1-7 (logand arg2 3)) + (v1-8 (+ (* 5 a0-5) v1-7)) + ) + (.lvf vf5 (&-> (&-> *ocean-trans-corner-table* 0 quad v1-8) 0)) + (.lvf vf6 (&-> (&-> *ocean-trans-corner-table* 0 quad (+ v1-8 1)) 0)) + (.lvf vf7 (&-> (&-> *ocean-trans-corner-table* 0 quad (+ v1-8 5)) 0)) + (.lvf vf8 (&-> (&-> *ocean-trans-corner-table* 0 quad (+ v1-8 6)) 0)) + ) + (.mov v1-12 vf8) + (let ((v1-13 (the-as (inline-array vector) (-> arg0 base)))) + (let ((a0-16 (/ arg1 4)) + (a1-11 (/ arg2 4)) + ) + (.lvf vf1 (&-> *ocean-trans-st-table* 0 quad)) + (.lvf vf2 (&-> *ocean-trans-st-table* 1 quad)) + (.lvf vf3 (&-> *ocean-trans-st-table* 2 quad)) + (.lvf vf4 (&-> *ocean-trans-st-table* 3 quad)) + (.mul.x.vf acc vf1 vf5) + (nop!) + (.add.mul.y.vf acc vf2 vf5 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf5 acc) + (nop!) + (.add.mul.w.vf vf9 vf4 vf5 acc) + (nop!) + (.mul.x.vf acc vf1 vf6) + (nop!) + (.add.mul.y.vf acc vf2 vf6 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf6 acc) + (nop!) + (.add.mul.w.vf vf10 vf4 vf6 acc) + (.svf (&-> v1-13 0 quad) vf9) + (.mul.x.vf acc vf1 vf7) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf7 acc) + (nop!) + (.add.mul.w.vf vf11 vf4 vf7 acc) + (.svf (&-> v1-13 1 quad) vf10) + (.mul.x.vf acc vf1 vf8) + (nop!) + (.add.mul.y.vf acc vf2 vf8 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf8 acc) + (nop!) + (.add.mul.w.vf vf12 vf4 vf8 acc) + (.svf (&-> v1-13 2 quad) vf11) + (nop!) + (.svf (&-> v1-13 3 quad) vf12) + (let ((a2-14 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ (* 52 a0-16) a1-11)))) + (a3-9 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ a1-11 1 (* 52 a0-16))))) + (t0-10 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ (* 52 (+ a0-16 1)) a1-11)))) + (a0-22 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ a1-11 1 (* 52 (+ a0-16 1)))))) + ) + (.pextlb a1-15 0 a2-14) + (.mov r0-0 f31-0) + (.pextlb a2-15 0 a3-9) + (.mov r0-1 f31-0) + (.pextlb a3-10 0 t0-10) + (.mov r0-2 f31-0) + (.pextlb a0-23 0 a0-22) + ) + ) + (.mov r0-3 f31-0) + (.pextlh a1-16 0 a1-15) + (.mov r0-4 f31-0) + (.pextlh a2-16 0 a2-15) + (.mov vf1 a1-16) + (.pextlh a1-17 0 a3-10) + (.mov vf2 a2-16) + (.pextlh a0-24 0 a0-23) + (.mov vf3 a1-17) + (nop!) + (.mov vf4 a0-24) + (.itof.vf vf1 vf1) + (nop!) + (.itof.vf vf2 vf2) + (nop!) + (.itof.vf vf3 vf3) + (nop!) + (.itof.vf vf4 vf4) + (nop!) + (.mul.x.vf acc vf1 vf5) + (nop!) + (.add.mul.y.vf acc vf2 vf5 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf5 acc) + (nop!) + (.add.mul.w.vf vf9 vf4 vf5 acc) + (nop!) + (.mul.x.vf acc vf1 vf6) + (nop!) + (.add.mul.y.vf acc vf2 vf6 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf6 acc) + (nop!) + (.add.mul.w.vf vf10 vf4 vf6 acc) + (.svf (&-> v1-13 4 quad) vf9) + (.mul.x.vf acc vf1 vf7) + (nop!) + (.add.mul.y.vf acc vf2 vf7 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf7 acc) + (nop!) + (.add.mul.w.vf vf11 vf4 vf7 acc) + (.svf (&-> v1-13 5 quad) vf10) + (.mul.x.vf acc vf1 vf8) + (nop!) + (.add.mul.y.vf acc vf2 vf8 acc) + (nop!) + (.add.mul.z.vf acc vf3 vf8 acc) + (nop!) + (.add.mul.w.vf vf12 vf4 vf8 acc) + (.svf (&-> v1-13 6 quad) vf11) + (nop!) + (.svf (&-> v1-13 7 quad) vf12) + ) + (.mov v1-14 vf12) + (&+! (-> arg0 base) 128) + (let* ((v1-17 arg0) + (a0-25 (the-as object (-> v1-17 base))) + ) + (set! (-> (the-as dma-packet a0-25) dma) + (new 'static 'dma-tag :id (dma-tag-id ref) :addr (the-as int arg3) :qwc arg4) + ) + (set! (-> (the-as dma-packet a0-25) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-25) vif1) + (new 'static 'vif-tag :imm #x8011 :cmd (vif-cmd unpack-v4-32) :num arg4) + ) + (set! (-> v1-17 base) (&+ (the-as pointer a0-25) 16)) + ) + (if arg5 + (ocean-mid-add-call arg0 275) + (ocean-mid-add-call arg0 107) + ) ) - (.mov r0-4 f31-0) - (.pextlh a1-16 r0-4 a1-15) - (.mov r0-5 f31-0) - (.pextlh a2-16 r0-5 a2-15) - (.mov vf1 a1-16) - (.pextlh a1-17 r0-5 a3-10) - (.mov vf2 a2-16) - (.pextlh a0-24 r0-5 a0-23) - (.mov vf3 a1-17) - (nop!) - (.mov vf4 a0-24) - (.itof.vf vf1 vf1) - (nop!) - (.itof.vf vf2 vf2) - (nop!) - (.itof.vf vf3 vf3) - (nop!) - (.itof.vf vf4 vf4) - (nop!) - (.mul.x.vf acc vf1 vf5) - (nop!) - (.add.mul.y.vf acc vf2 vf5 acc) - (nop!) - (.add.mul.z.vf acc vf3 vf5 acc) - (nop!) - (.add.mul.w.vf vf9 vf4 vf5 acc) - (nop!) - (.mul.x.vf acc vf1 vf6) - (nop!) - (.add.mul.y.vf acc vf2 vf6 acc) - (nop!) - (.add.mul.z.vf acc vf3 vf6 acc) - (nop!) - (.add.mul.w.vf vf10 vf4 vf6 acc) - (.svf (&-> v1-13 4 quad) vf9) - (.mul.x.vf acc vf1 vf7) - (nop!) - (.add.mul.y.vf acc vf2 vf7 acc) - (nop!) - (.add.mul.z.vf acc vf3 vf7 acc) - (nop!) - (.add.mul.w.vf vf11 vf4 vf7 acc) - (.svf (&-> v1-13 5 quad) vf10) - (.mul.x.vf acc vf1 vf8) - (nop!) - (.add.mul.y.vf acc vf2 vf8 acc) - (nop!) - (.add.mul.z.vf acc vf3 vf8 acc) - (nop!) - (.add.mul.w.vf vf12 vf4 vf8 acc) - (.svf (&-> v1-13 6 quad) vf11) - (nop!) - (.svf (&-> v1-13 7 quad) vf12) - ) - (.mov v1-14 vf12) - (&+! (-> arg0 base) 128) - (let* ((v1-17 arg0) - (a0-25 (the-as object (-> v1-17 base))) - ) - (set! - (-> (the-as dma-packet a0-25) dma) - (new 'static 'dma-tag - :id (dma-tag-id ref) - :addr (the-as int arg3) - :qwc arg4 - ) - ) - (set! - (-> (the-as dma-packet a0-25) vif0) - (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) - ) - (set! - (-> (the-as dma-packet a0-25) vif1) - (new 'static 'vif-tag :imm #x8011 :cmd (vif-cmd unpack-v4-32) :num arg4) - ) - (set! (-> v1-17 base) (&+ (the-as pointer a0-25) 16)) - ) - (if arg5 - (ocean-mid-add-call arg0 275) - (ocean-mid-add-call arg0 107) - ) + (none) ) - (none) - ) ) ;; definition for function ocean-trans-add-upload-strip ;; WARN: Function may read a register that is not set: f31 ;; Used lq/sq -(defun - ocean-trans-add-upload-strip - ((arg0 dma-buffer) - (arg1 uint) - (arg2 uint) - (arg3 uint) - (arg4 uint) - (arg5 uint) - ) +(defun ocean-trans-add-upload-strip ((arg0 dma-buffer) (arg1 uint) (arg2 uint) (arg3 uint) (arg4 uint) (arg5 uint)) (local-vars - (r0-0 uint128) - (r0-1 uint128) - (r0-2 uint128) - (r0-3 uint128) - (r0-4 uint128) - (r0-5 uint128) - (v1-8 float) - (a0-23 uint128) - (a0-24 uint128) - (a0-25 uint128) - (a1-14 uint128) - (a1-15 uint128) - (a1-16 uint128) - (a2-15 uint128) - (a3-11 uint128) - (f31-0 none) - ) + (r0-0 int) + (r0-1 int) + (r0-2 int) + (r0-3 int) + (r0-4 int) + (v1-8 float) + (a0-23 uint128) + (a0-24 uint128) + (a0-25 uint128) + (a1-14 uint128) + (a1-15 uint128) + (a1-16 uint128) + (a2-15 uint128) + (a3-11 uint128) + (f31-0 none) + ) (rlet ((vf1 :class vf) (vf2 :class vf) (vf3 :class vf) (vf4 :class vf) ) - (let ((a1-1 (new-stack-vector0))) - (let ((v1-1 (-> *ocean-map* start-corner))) - (set! (-> a1-1 x) (+ (-> v1-1 x) (* 393216.0 (the float arg2)))) - (set! (-> a1-1 y) (-> v1-1 y)) - (set! (-> a1-1 z) (+ (-> v1-1 z) (* 393216.0 (the float arg1)))) - ) - (set! (-> a1-1 w) 1.0) - ) - (ocean-mid-add-matrices arg0) - (let* ((a1-2 9) - (v1-3 arg0) - (a0-2 (the-as object (-> v1-3 base))) - ) - (set! - (-> (the-as dma-packet a0-2) dma) - (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-2) - ) - (set! - (-> (the-as dma-packet a0-2) vif0) - (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) - ) - (set! - (-> (the-as dma-packet a0-2) vif1) - (new 'static 'vif-tag :imm #x8008 :cmd (vif-cmd unpack-v4-32) :num a1-2) - ) - (set! (-> v1-3 base) (&+ (the-as pointer a0-2) 16)) - ) - (let ((v1-4 (the-as object (-> arg0 base)))) - (set! - (-> *ocean-work* trans-mask-ptrs (+ (* arg4 4) arg5)) - (the-as (pointer int32) v1-4) - ) - (set! (-> (the-as vector4w v1-4) x) 10) - (set! (-> (the-as vector4w v1-4) y) (the-as int arg3)) - (set! (-> (the-as vector4w v1-4) z) 0) - (set! (-> (the-as vector4w v1-4) w) 0) - ) - (&+! (-> arg0 base) 16) - (let ((v1-7 (the-as (inline-array vector) (-> arg0 base)))) - (set! (-> v1-7 0 quad) (-> *ocean-trans-st-table* 0 quad)) - (set! (-> v1-7 1 quad) (-> *ocean-trans-st-table* 1 quad)) - (set! (-> v1-7 2 quad) (-> *ocean-trans-st-table* 2 quad)) - (set! (-> v1-7 3 quad) (-> *ocean-trans-st-table* 3 quad)) - (let - ((a0-22 - (the-as - uint128 - (-> - *ocean-map* - ocean-colors - colors - (+ (* 52 (the-as int arg1)) (the-as int arg2)) - ) + (let ((a1-1 (new-stack-vector0))) + (let ((v1-1 (-> *ocean-map* start-corner))) + (set! (-> a1-1 x) (+ (-> v1-1 x) (* 393216.0 (the float arg2)))) + (set! (-> a1-1 y) (-> v1-1 y)) + (set! (-> a1-1 z) (+ (-> v1-1 z) (* 393216.0 (the float arg1)))) ) - ) - (a1-13 - (the-as - uint128 - (-> - *ocean-map* - ocean-colors - colors - (+ (+ arg2 1) (the-as uint (* 52 (the-as int arg1)))) - ) - ) - ) - (a2-14 - (the-as - uint128 - (-> - *ocean-map* - ocean-colors - colors - (+ (* 52 (the-as int (+ arg1 1))) (the-as int arg2)) - ) - ) - ) - (a3-10 - (the-as - uint128 - (-> - *ocean-map* - ocean-colors - colors - (+ (+ arg2 1) (the-as uint (* 52 (the-as int (+ arg1 1))))) - ) - ) - ) + (set! (-> a1-1 w) 1.0) + (ocean-mid-add-matrices arg0 a1-1) ) - (.pextlb a0-23 r0-0 a0-22) - (.mov r0-1 f31-0) - (.pextlb a1-14 r0-1 a1-13) - (.mov r0-2 f31-0) - (.pextlb a2-15 r0-2 a2-14) - (.mov r0-3 f31-0) - (.pextlb a3-11 r0-3 a3-10) - ) - (.mov r0-4 f31-0) - (.pextlh a0-24 r0-4 a0-23) - (.mov r0-5 f31-0) - (.pextlh a1-15 r0-5 a1-14) - (.mov vf1 a0-24) - (.pextlh a0-25 r0-5 a2-15) - (.mov vf2 a1-15) - (.pextlh a1-16 r0-5 a3-11) - (.mov vf3 a0-25) - (nop!) - (.mov vf4 a1-16) - (.itof.vf vf1 vf1) - (nop!) - (.itof.vf vf2 vf2) - (nop!) - (.itof.vf vf3 vf3) - (nop!) - (.itof.vf vf4 vf4) - (nop!) - (nop!) - (.svf (&-> v1-7 4 quad) vf1) - (nop!) - (.svf (&-> v1-7 5 quad) vf2) - (nop!) - (.svf (&-> v1-7 6 quad) vf3) - (nop!) - (.svf (&-> v1-7 7 quad) vf4) - ) - (.mov v1-8 vf4) - (&+! (-> arg0 base) 128) - (let* ((a1-17 10) - (v1-11 arg0) - (a0-26 (the-as object (-> v1-11 base))) - ) - (set! - (-> (the-as dma-packet a0-26) dma) - (new 'static 'dma-tag - :id (dma-tag-id ref) - :addr (the-as int (+ (+ (* 160 (the-as int arg5)) 0) (the-as int *ocean-trans-strip-array*))) - :qwc a1-17 + (let* ((a1-2 9) + (v1-3 arg0) + (a0-2 (the-as object (-> v1-3 base))) + ) + (set! (-> (the-as dma-packet a0-2) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-2)) + (set! (-> (the-as dma-packet a0-2) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-2) vif1) + (new 'static 'vif-tag :imm #x8008 :cmd (vif-cmd unpack-v4-32) :num a1-2) + ) + (set! (-> v1-3 base) (&+ (the-as pointer a0-2) 16)) ) - ) - (set! - (-> (the-as dma-packet a0-26) vif0) - (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) - ) - (set! - (-> (the-as dma-packet a0-26) vif1) - (new 'static 'vif-tag :imm #x8011 :cmd (vif-cmd unpack-v4-32) :num a1-17) - ) - (set! (-> v1-11 base) (&+ (the-as pointer a0-26) 16)) + (let ((v1-4 (the-as object (-> arg0 base)))) + (set! (-> *ocean-work* trans-mask-ptrs (+ (* arg4 4) arg5)) (the-as (pointer int32) v1-4)) + (set! (-> (the-as vector4w v1-4) x) 10) + (set! (-> (the-as vector4w v1-4) y) (the-as int arg3)) + (set! (-> (the-as vector4w v1-4) z) 0) + (set! (-> (the-as vector4w v1-4) w) 0) + ) + (&+! (-> arg0 base) 16) + (let ((v1-7 (the-as (inline-array vector) (-> arg0 base)))) + (set! (-> v1-7 0 quad) (-> *ocean-trans-st-table* 0 quad)) + (set! (-> v1-7 1 quad) (-> *ocean-trans-st-table* 1 quad)) + (set! (-> v1-7 2 quad) (-> *ocean-trans-st-table* 2 quad)) + (set! (-> v1-7 3 quad) (-> *ocean-trans-st-table* 3 quad)) + (let ((a0-22 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ (* 52 (the-as int arg1)) arg2)))) + (a1-13 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ arg2 1 (* 52 (the-as int arg1)))))) + (a2-14 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ (* 52 (the-as int (+ arg1 1))) arg2)))) + (a3-10 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ arg2 1 (* 52 (the-as int (+ arg1 1))))))) + ) + (.pextlb a0-23 0 a0-22) + (.mov r0-0 f31-0) + (.pextlb a1-14 0 a1-13) + (.mov r0-1 f31-0) + (.pextlb a2-15 0 a2-14) + (.mov r0-2 f31-0) + (.pextlb a3-11 0 a3-10) + ) + (.mov r0-3 f31-0) + (.pextlh a0-24 0 a0-23) + (.mov r0-4 f31-0) + (.pextlh a1-15 0 a1-14) + (.mov vf1 a0-24) + (.pextlh a0-25 0 a2-15) + (.mov vf2 a1-15) + (.pextlh a1-16 0 a3-11) + (.mov vf3 a0-25) + (nop!) + (.mov vf4 a1-16) + (.itof.vf vf1 vf1) + (nop!) + (.itof.vf vf2 vf2) + (nop!) + (.itof.vf vf3 vf3) + (nop!) + (.itof.vf vf4 vf4) + (nop!) + (nop!) + (.svf (&-> v1-7 4 quad) vf1) + (nop!) + (.svf (&-> v1-7 5 quad) vf2) + (nop!) + (.svf (&-> v1-7 6 quad) vf3) + (nop!) + (.svf (&-> v1-7 7 quad) vf4) + ) + (.mov v1-8 vf4) + (&+! (-> arg0 base) 128) + (let* ((a1-17 10) + (v1-11 arg0) + (a0-26 (the-as object (-> v1-11 base))) + ) + (set! (-> (the-as dma-packet a0-26) dma) + (new 'static 'dma-tag + :id (dma-tag-id ref) + :addr (the-as int (+ (+ (* 160 (the-as int arg5)) 0) (the-as int *ocean-trans-strip-array*))) + :qwc a1-17 + ) + ) + (set! (-> (the-as dma-packet a0-26) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-26) vif1) + (new 'static 'vif-tag :imm #x8011 :cmd (vif-cmd unpack-v4-32) :num a1-17) + ) + (set! (-> v1-11 base) (&+ (the-as pointer a0-26) 16)) + ) + (ocean-mid-add-call arg0 107) + (none) ) - (ocean-mid-add-call arg0 107) - (none) - ) ) ;; definition for function ocean-transition-check ;; Used lq/sq -(defun - ocean-transition-check - ((arg0 ocean-trans-mask) (arg1 int) (arg2 int) (arg3 vector)) - (local-vars - (v0-0 symbol) - (v1-10 float) - (a3-2 float) - (a3-6 float) - (a3-10 float) - ) +(defun ocean-transition-check ((arg0 ocean-trans-mask) (arg1 int) (arg2 int) (arg3 vector)) + (local-vars (v0-0 symbol) (v1-10 float) (a3-2 float) (a3-6 float) (a3-10 float)) (rlet ((vf1 :class vf) (vf2 :class vf) (vf3 :class vf) ) - (let ((v1-0 (new-stack-vector0)) - (t0-1 (-> *math-camera* trans)) - ) - 1.0 - (set! (-> v1-0 x) (+ (-> arg3 x) (* 98304.0 (the float arg1)))) - (set! (-> v1-0 y) (-> arg3 y)) - (set! (-> v1-0 z) (+ (-> arg3 z) (* 98304.0 (the float arg2)))) - (let ((a3-1 v1-0) - (t1-0 t0-1) + (let ((v1-0 (new-stack-vector0)) + (t0-1 (-> *math-camera* trans)) ) - (.lvf vf2 (&-> a3-1 quad)) - (.lvf vf3 (&-> t1-0 quad)) - ) + 1.0 + (set! (-> v1-0 x) (+ (-> arg3 x) (* 98304.0 (the float arg1)))) + (set! (-> v1-0 y) (-> arg3 y)) + (set! (-> v1-0 z) (+ (-> arg3 z) (* 98304.0 (the float arg2)))) + (let ((a3-1 v1-0) + (t1-0 t0-1) + ) + (.lvf vf2 (&-> a3-1 quad)) + (.lvf vf3 (&-> t1-0 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a3-2 vf1) + (when (< a3-2 19327350000.0) + (logior! (-> arg0 mask arg2) (ash 1 arg1)) + (return #f) + ) + (set! (-> v1-0 x) (+ 98304.0 (-> v1-0 x))) + (let ((a3-5 v1-0) + (t1-1 t0-1) + ) + (.lvf vf2 (&-> a3-5 quad)) + (.lvf vf3 (&-> t1-1 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a3-6 vf1) + (when (< a3-6 19327350000.0) + (logior! (-> arg0 mask arg2) (ash 1 arg1)) + (return #f) + ) + (set! (-> v1-0 z) (+ 98304.0 (-> v1-0 z))) + (let ((a3-9 v1-0) + (t1-2 t0-1) + ) + (.lvf vf2 (&-> a3-9 quad)) + (.lvf vf3 (&-> t1-2 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a3-10 vf1) + (when (< a3-10 19327350000.0) + (logior! (-> arg0 mask arg2) (ash 1 arg1)) + (return #f) + ) + (set! (-> v1-0 x) (+ -98304.0 (-> v1-0 x))) + (.lvf vf2 (&-> v1-0 quad)) + (.lvf vf3 (&-> t0-1 quad)) + ) (.sub.vf vf1 vf3 vf2) (.mul.vf vf1 vf1 vf1) (.add.y.vf vf1 vf1 vf1 :mask #b1) (.add.z.vf vf1 vf1 vf1 :mask #b1) - (.mov a3-2 vf1) - (when (< a3-2 19327350000.0) - (logior! (-> arg0 mask arg2) (ash 1 arg1)) - (return #f) - ) - (set! (-> v1-0 x) (+ 98304.0 (-> v1-0 x))) - (let ((a3-5 v1-0) - (t1-1 t0-1) - ) - (.lvf vf2 (&-> a3-5 quad)) - (.lvf vf3 (&-> t1-1 quad)) - ) - (.sub.vf vf1 vf3 vf2) - (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) - (.mov a3-6 vf1) - (when (< a3-6 19327350000.0) - (logior! (-> arg0 mask arg2) (ash 1 arg1)) - (return #f) - ) - (set! (-> v1-0 z) (+ 98304.0 (-> v1-0 z))) - (let ((a3-9 v1-0) - (t1-2 t0-1) - ) - (.lvf vf2 (&-> a3-9 quad)) - (.lvf vf3 (&-> t1-2 quad)) - ) - (.sub.vf vf1 vf3 vf2) - (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) - (.mov a3-10 vf1) - (when (< a3-10 19327350000.0) - (logior! (-> arg0 mask arg2) (ash 1 arg1)) - (return #f) - ) - (set! (-> v1-0 x) (+ -98304.0 (-> v1-0 x))) - (.lvf vf2 (&-> v1-0 quad)) - (.lvf vf3 (&-> t0-1 quad)) + (.mov v1-10 vf1) + (when (< v1-10 19327350000.0) + (logior! (-> arg0 mask arg2) (ash 1 arg1)) + (return #f) + v0-0 + ) ) - (.sub.vf vf1 vf3 vf2) - (.mul.vf vf1 vf1 vf1) - (.add.y.vf vf1 vf1 vf1 :mask #b1) - (.add.z.vf vf1 vf1 vf1 :mask #b1) - (.mov v1-10 vf1) - (when (< v1-10 19327350000.0) - (logior! (-> arg0 mask arg2) (ash 1 arg1)) - (return #f) - v0-0 - ) - ) ) ;; definition for function ocean-make-trans-camera-masks ;; Used lq/sq -(defun - ocean-make-trans-camera-masks - ((arg0 uint) (arg1 uint) (arg2 uint) (arg3 uint)) - (local-vars - (sv-48 ocean-trans-mask) - (sv-52 vector) - (sv-56 vector) - (sv-60 vector) - ) +(defun ocean-make-trans-camera-masks ((arg0 uint) (arg1 uint) (arg2 uint) (arg3 uint)) + (local-vars (sv-48 ocean-trans-mask) (sv-52 vector) (sv-56 vector) (sv-60 vector)) (set! sv-48 (-> *ocean-work* trans-camera-masks (+ (* arg2 4) arg3))) (set! sv-52 (-> *math-camera* trans)) (set! sv-56 (new-stack-vector0)) (set! sv-60 (new-stack-vector0)) - (set! - (-> sv-56 x) - (+ (-> *ocean-map* start-corner x) (* 393216.0 (the float arg1))) - ) + (set! (-> sv-56 x) (+ (-> *ocean-map* start-corner x) (* 393216.0 (the float arg1)))) (set! (-> sv-56 y) (-> *ocean-map* start-corner y)) - (set! - (-> sv-56 z) - (+ (-> *ocean-map* start-corner z) (* 393216.0 (the float arg0))) - ) + (set! (-> sv-56 z) (+ (-> *ocean-map* start-corner z) (* 393216.0 (the float arg0)))) (set! (-> sv-56 w) 1.0) (dotimes (gp-0 4) - (dotimes (s5-0 4) - (set! - (-> sv-60 x) - (- (+ (-> sv-56 x) (* 98304.0 (the float s5-0))) (-> sv-52 x)) - ) - (set! (-> sv-60 y) (- (-> sv-56 y) (-> sv-52 y))) - (set! - (-> sv-60 z) - (- (+ (-> sv-56 z) (* 98304.0 (the float gp-0))) (-> sv-52 z)) - ) - (ocean-transition-check sv-48 s5-0 gp-0 sv-56) + (dotimes (s5-0 4) + (set! (-> sv-60 x) (- (+ (-> sv-56 x) (* 98304.0 (the float s5-0))) (-> sv-52 x))) + (set! (-> sv-60 y) (- (-> sv-56 y) (-> sv-52 y))) + (set! (-> sv-60 z) (- (+ (-> sv-56 z) (* 98304.0 (the float gp-0))) (-> sv-52 z))) + (ocean-transition-check sv-48 s5-0 gp-0 sv-56) + ) ) - ) #f ) ;; definition for function ocean-trans-add-upload (defun ocean-trans-add-upload ((arg0 dma-buffer) (arg1 int) (arg2 int)) (when (not (ocean-trans-mask-ptrs-bit? arg1 arg2)) - (let - ((s1-0 - (ocean-trans-camera-masks-bit? - (the-as uint (+ arg1 -1)) - (the-as uint arg2) - ) - ) - (s2-0 - (ocean-trans-camera-masks-bit? - (the-as uint (+ arg1 1)) - (the-as uint arg2) - ) - ) - (s3-0 - (ocean-trans-camera-masks-bit? - (the-as uint arg1) - (the-as uint (+ arg2 -1)) - ) - ) - (a0-6 - (ocean-trans-camera-masks-bit? - (the-as uint arg1) - (the-as uint (+ arg2 1)) - ) - ) - (v1-0 0) - ) - (if s1-0 - (+! v1-0 1) - ) - (if s2-0 - (+! v1-0 2) - ) - (if s3-0 - (+! v1-0 4) - ) - (if a0-6 - (+! v1-0 8) - ) - (cond - ((= v1-0 1) - (if (not (ocean-trans-mask-ptrs-bit? (+ arg1 -1) arg2)) - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-up-table* - 11 - #t - ) - ) - ) - ((= v1-0 2) - (if (not (ocean-trans-mask-ptrs-bit? (+ arg1 1) arg2)) - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-down-table* - 11 - #t - ) - ) - ) - ((= v1-0 4) - (if (not (ocean-trans-mask-ptrs-bit? arg1 (+ arg2 -1))) - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-left-table* - 11 - #t - ) - ) - ) - ((= v1-0 5) - (let ((s3-1 (ocean-trans-mask-ptrs-bit? (+ arg1 -1) arg2)) - (v1-1 (ocean-trans-mask-ptrs-bit? arg1 (+ arg2 -1))) - ) - (cond - ((and s3-1 v1-1) - ) - (s3-1 - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-left-table* - 11 - #t + (let ((s1-0 (ocean-trans-camera-masks-bit? (the-as uint (+ arg1 -1)) (the-as uint arg2))) + (s2-0 (ocean-trans-camera-masks-bit? (the-as uint (+ arg1 1)) (the-as uint arg2))) + (s3-0 (ocean-trans-camera-masks-bit? (the-as uint arg1) (the-as uint (+ arg2 -1)))) + (a0-6 (ocean-trans-camera-masks-bit? (the-as uint arg1) (the-as uint (+ arg2 1)))) + (v1-0 0) ) - ) - (v1-1 - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-up-table* - 11 - #t + (if s1-0 + (+! v1-0 1) ) - ) - (else - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-up-left-table* - 18 - #f + (if s2-0 + (+! v1-0 2) ) + (if s3-0 + (+! v1-0 4) + ) + (if a0-6 + (+! v1-0 8) + ) + (cond + ((= v1-0 1) + (if (not (ocean-trans-mask-ptrs-bit? (+ arg1 -1) arg2)) + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-up-table* 11 #t) + ) + ) + ((= v1-0 2) + (if (not (ocean-trans-mask-ptrs-bit? (+ arg1 1) arg2)) + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-down-table* 11 #t) + ) + ) + ((= v1-0 4) + (if (not (ocean-trans-mask-ptrs-bit? arg1 (+ arg2 -1))) + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-left-table* 11 #t) + ) + ) + ((= v1-0 5) + (let ((s3-1 (ocean-trans-mask-ptrs-bit? (+ arg1 -1) arg2)) + (v1-1 (ocean-trans-mask-ptrs-bit? arg1 (+ arg2 -1))) + ) + (cond + ((and s3-1 v1-1) + ) + (s3-1 + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-left-table* 11 #t) + ) + (v1-1 + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-up-table* 11 #t) + ) + (else + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-up-left-table* 18 #f) + ) + ) + ) + ) + ((= v1-0 6) + (let ((s3-2 (ocean-trans-mask-ptrs-bit? (+ arg1 1) arg2)) + (v1-2 (ocean-trans-mask-ptrs-bit? arg1 (+ arg2 -1))) + ) + (cond + ((and s3-2 v1-2) + ) + (s3-2 + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-left-table* 11 #t) + ) + (v1-2 + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-down-table* 11 #t) + ) + (else + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-down-left-table* 18 #t) + ) + ) + ) + ) + ((= v1-0 8) + (if (not (ocean-trans-mask-ptrs-bit? arg1 (+ arg2 1))) + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-right-table* 11 #t) + ) + ) + ((= v1-0 9) + (let ((s3-3 (ocean-trans-mask-ptrs-bit? (+ arg1 -1) arg2)) + (v1-3 (ocean-trans-mask-ptrs-bit? arg1 (+ arg2 1))) + ) + (cond + ((and s3-3 v1-3) + ) + (s3-3 + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-right-table* 11 #t) + ) + (v1-3 + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-up-table* 11 #t) + ) + (else + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-up-right-table* 18 #t) + ) + ) + ) + ) + ((= v1-0 10) + (let ((s3-4 (ocean-trans-mask-ptrs-bit? (+ arg1 1) arg2)) + (v1-4 (ocean-trans-mask-ptrs-bit? arg1 (+ arg2 1))) + ) + (cond + ((and s3-4 v1-4) + ) + (s3-4 + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-right-table* 11 #t) + ) + (v1-4 + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-down-table* 11 #t) + ) + (else + (ocean-trans-add-upload-table arg0 arg1 arg2 *ocean-trans-down-right-table* 18 #f) + ) + ) + ) ) ) - ) ) - ((= v1-0 6) - (let ((s3-2 (ocean-trans-mask-ptrs-bit? (+ arg1 1) arg2)) - (v1-2 (ocean-trans-mask-ptrs-bit? arg1 (+ arg2 -1))) - ) - (cond - ((and s3-2 v1-2) - ) - (s3-2 - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-left-table* - 11 - #t - ) - ) - (v1-2 - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-down-table* - 11 - #t - ) - ) - (else - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-down-left-table* - 18 - #t - ) - ) - ) - ) - ) - ((= v1-0 8) - (if (not (ocean-trans-mask-ptrs-bit? arg1 (+ arg2 1))) - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-right-table* - 11 - #t - ) - ) - ) - ((= v1-0 9) - (let ((s3-3 (ocean-trans-mask-ptrs-bit? (+ arg1 -1) arg2)) - (v1-3 (ocean-trans-mask-ptrs-bit? arg1 (+ arg2 1))) - ) - (cond - ((and s3-3 v1-3) - ) - (s3-3 - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-right-table* - 11 - #t - ) - ) - (v1-3 - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-up-table* - 11 - #t - ) - ) - (else - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-up-right-table* - 18 - #t - ) - ) - ) - ) - ) - ((= v1-0 10) - (let ((s3-4 (ocean-trans-mask-ptrs-bit? (+ arg1 1) arg2)) - (v1-4 (ocean-trans-mask-ptrs-bit? arg1 (+ arg2 1))) - ) - (cond - ((and s3-4 v1-4) - ) - (s3-4 - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-right-table* - 11 - #t - ) - ) - (v1-4 - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-down-table* - 11 - #t - ) - ) - (else - (ocean-trans-add-upload-table - arg0 - arg1 - arg2 - *ocean-trans-down-right-table* - 18 - #f - ) - ) - ) - ) - ) - ) ) - ) (none) ) ;; definition for function draw-ocean-transition-seams (defun draw-ocean-transition-seams ((arg0 dma-buffer)) - (local-vars - (sv-32 uint) - (sv-33 uint) - (sv-34 uint) - (sv-35 uint) - (sv-36 sphere) - ) + (local-vars (sv-32 uint) (sv-33 uint) (sv-34 uint) (sv-35 uint) (sv-36 sphere)) (set! sv-32 (-> *ocean-work* near-minx)) (set! sv-33 (-> *ocean-work* near-maxx)) (set! sv-34 (-> *ocean-work* near-minz)) @@ -971,54 +665,39 @@ (set! (-> sv-36 y) (-> *ocean-map* start-corner y)) (set! (-> sv-36 w) 69511.42) (when (and (< sv-32 sv-33) (< sv-34 sv-35)) - (let ((s5-0 sv-34) - (s4-0 sv-35) - ) - (while (>= s4-0 s5-0) - (let ((s3-0 sv-32) - (s2-0 sv-33) - ) - (while (>= s2-0 s3-0) - (set! - (-> sv-36 x) - (+ - (+ 49152.0 (* 98304.0 (the float s3-0))) - (-> *ocean-map* start-corner x) - ) + (let ((s5-0 sv-34) + (s4-0 sv-35) + ) + (while (>= s4-0 s5-0) + (let ((s3-0 sv-32) + (s2-0 sv-33) + ) + (while (>= s2-0 s3-0) + (set! (-> sv-36 x) (+ 49152.0 (* 98304.0 (the float s3-0)) (-> *ocean-map* start-corner x))) + (set! (-> sv-36 z) (+ 49152.0 (* 98304.0 (the float s5-0)) (-> *ocean-map* start-corner z))) + (when (sphere-cull sv-36) + (if (not (ocean-trans-camera-masks-bit? s5-0 s3-0)) + (ocean-trans-add-upload arg0 (the-as int s5-0) (the-as int s3-0)) + ) + ) + (+! s3-0 1) + ) + ) + (+! s5-0 1) ) - (set! - (-> sv-36 z) - (+ - (+ 49152.0 (* 98304.0 (the float s5-0))) - (-> *ocean-map* start-corner z) - ) - ) - (when (sphere-cull sv-36) - (if (not (ocean-trans-camera-masks-bit? s5-0 s3-0)) - (ocean-trans-add-upload arg0 (the-as int s5-0) (the-as int s3-0)) - ) - ) - (+! s3-0 1) - ) ) - (+! s5-0 1) - ) ) - ) (dotimes (v1-27 16) - (when (nonzero? (-> *ocean-work* trans-camera-masks v1-27 word)) - (dotimes (a0-12 4) - (let ((a1-8 (-> *ocean-work* trans-mask-ptrs (+ (* v1-27 4) a0-12)))) - (if a1-8 - (logior! - (-> a1-8 1) - (-> *ocean-work* trans-temp-masks 0 mask (+ a0-12 (* v1-27 8))) + (when (nonzero? (-> *ocean-work* trans-camera-masks v1-27 word)) + (dotimes (a0-12 4) + (let ((a1-8 (-> *ocean-work* trans-mask-ptrs (+ (* v1-27 4) a0-12)))) + (if a1-8 + (logior! (-> a1-8 1) (-> *ocean-work* trans-temp-masks 0 mask (+ a0-12 (* v1-27 8)))) + ) + ) ) - ) ) - ) ) - ) #f ) @@ -1028,51 +707,44 @@ (v1-0 arg0) (a1-0 (the-as object (-> v1-0 base))) ) - (set! - (-> (the-as dma-packet a1-0) dma) - (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0) + (set! (-> (the-as dma-packet a1-0) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> (the-as dma-packet a1-0) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a1-0) vif1) + (new 'static 'vif-tag :imm #x2fd :cmd (vif-cmd unpack-v4-32) :num a2-0) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a1-0) 16)) ) - (set! - (-> (the-as dma-packet a1-0) vif0) - (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl)) - ) - (set! - (-> (the-as dma-packet a1-0) vif1) - (new 'static 'vif-tag :imm #x2fd :cmd (vif-cmd unpack-v4-32) :num a2-0) - ) - (set! (-> v1-0 base) (&+ (the-as pointer a1-0) 16)) - ) (let ((v1-1 (the-as matrix (-> arg0 base)))) - (set-vector! (-> v1-1 vector 0) 0.0 0.0 0.0 1.0) - (set-vector! (-> v1-1 vector 1) 98304.0 0.0 0.0 1.0) - (set-vector! (-> v1-1 vector 2) 0.0 0.0 98304.0 1.0) - (set-vector! (-> v1-1 vector 3) 98304.0 0.0 98304.0 1.0) - ) + (set-vector! (-> v1-1 vector 0) 0.0 0.0 0.0 1.0) + (set-vector! (-> v1-1 vector 1) 98304.0 0.0 0.0 1.0) + (set-vector! (-> v1-1 vector 2) 0.0 0.0 98304.0 1.0) + (set-vector! (-> v1-1 vector 3) 98304.0 0.0 98304.0 1.0) + ) (let ((v0-0 (&+ (-> arg0 base) 64))) - (set! (-> arg0 base) v0-0) - v0-0 - ) + (set! (-> arg0 base) v0-0) + v0-0 + ) ) ;; definition for function draw-ocean-transition ;; INFO: Return type mismatch int vs none. (defun draw-ocean-transition ((arg0 dma-buffer)) (local-vars - (sv-32 uint) - (sv-33 uint) - (sv-34 uint) - (sv-35 uint) - (sv-36 sphere) - (sv-40 ocean-trans-mask) - (sv-44 uint) - ) + (sv-32 uint) + (sv-33 uint) + (sv-34 uint) + (sv-35 uint) + (sv-36 sphere) + (sv-40 ocean-trans-mask) + (sv-44 uint) + ) (dotimes (v1-0 16) - (set! (-> *ocean-work* trans-camera-masks v1-0 word) (the-as uint 0)) - (set! (-> *ocean-work* near-mask-indices v1-0) (the-as uint -1)) - ) + (set! (-> *ocean-work* trans-camera-masks v1-0 word) (the-as uint 0)) + (set! (-> *ocean-work* near-mask-indices v1-0) (the-as uint -1)) + ) (dotimes (v1-3 64) - (set! (-> *ocean-work* trans-mask-ptrs v1-3) (the-as (pointer int32) #f)) - ) + (set! (-> *ocean-work* trans-mask-ptrs v1-3) (the-as (pointer int32) #f)) + ) (set! sv-32 (-> *ocean-work* mid-minx)) (set! sv-33 (-> *ocean-work* mid-maxx)) (set! sv-34 (-> *ocean-work* mid-minz)) @@ -1083,160 +755,115 @@ (let ((s5-0 sv-34) (s4-0 sv-35) ) - (while (>= s4-0 s5-0) - (let ((s3-0 sv-32) - (s2-0 sv-33) + (while (>= s4-0 s5-0) + (let ((s3-0 sv-32) + (s2-0 sv-33) + ) + (while (>= s2-0 s3-0) + (when (not (ocean-mid-mask-ptrs-bit? s5-0 s3-0)) + (when (ocean-mid-camera-masks-bit? s5-0 s3-0) + (set! (-> sv-36 x) (+ 196608.0 (* 393216.0 (the float s3-0)) (-> *ocean-map* start-corner x))) + (set! (-> sv-36 z) (+ 196608.0 (* 393216.0 (the float s5-0)) (-> *ocean-map* start-corner z))) + (if (sphere-cull sv-36) + (ocean-make-trans-camera-masks s5-0 s3-0 (- s5-0 sv-34) (- s3-0 sv-32)) + ) + ) + ) + (+! s3-0 1) ) - (while (>= s2-0 s3-0) - (when (not (ocean-mid-mask-ptrs-bit? s5-0)) - (when (ocean-mid-camera-masks-bit? s5-0) - (set! - (-> sv-36 x) - (+ - (+ 196608.0 (* 393216.0 (the float s3-0))) - (-> *ocean-map* start-corner x) - ) - ) - (set! - (-> sv-36 z) - (+ - (+ 196608.0 (* 393216.0 (the float s5-0))) - (-> *ocean-map* start-corner z) - ) - ) - (if (sphere-cull sv-36) - (ocean-make-trans-camera-masks s5-0 s3-0 (- s5-0 sv-34) (- s3-0 sv-32)) - ) ) - ) - (+! s3-0 1) + (+! s5-0 1) ) - ) - (+! s5-0 1) ) - ) (let ((a2-2 192) (a1-8 0) (a0-11 192) (v1-32 0) ) - (let ((a3-1 sv-34) - (t0-0 sv-35) - ) - (while (>= t0-0 a3-1) - (let ((t1-0 sv-32) - (t2-0 sv-33) - ) - (while (>= t2-0 t1-0) - (set! - sv-40 - (-> - *ocean-work* - trans-camera-masks - (+ (* (- a3-1 sv-34) 4) (- t1-0 sv-32)) - ) - ) - (when (nonzero? (-> sv-40 word)) - (dotimes (t3-10 4) - (let ((t4-5 (-> sv-40 mask t3-10))) - (when (nonzero? t4-5) - (let ((t5-2 (+ (* a3-1 4) (the-as uint t3-10)))) - (if (< t5-2 (the-as uint a0-11)) - (set! a0-11 (the-as int t5-2)) - ) - (if (< (the-as uint v1-32) t5-2) - (set! v1-32 (the-as int t5-2)) - ) - ) - (dotimes (t5-3 4) - (when (logtest? t4-5 (ash 1 t5-3)) - (let ((t6-9 (+ (* t1-0 4) (the-as uint t5-3)))) - (if (< t6-9 (the-as uint a2-2)) - (set! a2-2 (the-as int t6-9)) - ) - (if (< (the-as uint a1-8) t6-9) - (set! a1-8 (the-as int t6-9)) - ) - ) - ) - ) - ) + (let ((a3-1 sv-34) + (t0-0 sv-35) ) - ) + (while (>= t0-0 a3-1) + (let ((t1-0 sv-32) + (t2-0 sv-33) + ) + (while (>= t2-0 t1-0) + (set! sv-40 (-> *ocean-work* trans-camera-masks (+ (* (- a3-1 sv-34) 4) (- t1-0 sv-32)))) + (when (nonzero? (-> sv-40 word)) + (dotimes (t3-10 4) + (let ((t4-5 (-> sv-40 mask t3-10))) + (when (nonzero? t4-5) + (let ((t5-2 (+ (* a3-1 4) t3-10))) + (if (< t5-2 (the-as uint a0-11)) + (set! a0-11 (the-as int t5-2)) + ) + (if (< (the-as uint v1-32) t5-2) + (set! v1-32 (the-as int t5-2)) + ) + ) + (dotimes (t5-3 4) + (when (logtest? t4-5 (ash 1 t5-3)) + (let ((t6-9 (+ (* t1-0 4) t5-3))) + (if (< t6-9 (the-as uint a2-2)) + (set! a2-2 (the-as int t6-9)) + ) + (if (< (the-as uint a1-8) t6-9) + (set! a1-8 (the-as int t6-9)) + ) + ) + ) + ) + ) + ) + ) + ) + (+! t1-0 1) + ) + ) + (+! a3-1 1) ) - (+! t1-0 1) - ) ) - (+! a3-1 1) - ) + (set! (-> *ocean-work* near-minx) (the-as uint (+ a2-2 -1))) + (set! (-> *ocean-work* near-maxx) (the-as uint (+ a1-8 1))) + (set! (-> *ocean-work* near-minz) (the-as uint (+ a0-11 -1))) + (set! (-> *ocean-work* near-maxz) (the-as uint (+ v1-32 1))) ) - (set! (-> *ocean-work* near-minx) (the-as uint (+ a2-2 -1))) - (set! (-> *ocean-work* near-maxx) (the-as uint (+ a1-8 1))) - (set! (-> *ocean-work* near-minz) (the-as uint (+ a0-11 -1))) - (set! (-> *ocean-work* near-maxz) (the-as uint (+ v1-32 1))) - ) (dotimes (v1-34 16) - (set! - (-> *ocean-work* trans-temp-masks v1-34 word) - (-> *ocean-work* trans-camera-masks v1-34 word) + (set! (-> *ocean-work* trans-temp-masks v1-34 word) (-> *ocean-work* trans-camera-masks v1-34 word)) ) - ) (let ((s5-1 sv-34) (s4-1 sv-35) ) - (while (>= s4-1 s5-1) - (let ((s3-1 sv-32) - (s2-1 sv-33) - ) - (while (>= s2-1 s3-1) - (when (not (ocean-mid-mask-ptrs-bit? s5-1)) - (when (ocean-mid-camera-masks-bit? s5-1) - (let - ((v1-43 - (-> - *ocean-map* - ocean-trans-indices - data - (+ (* (the-as uint 48) s5-1) (the-as int s3-1)) + (while (>= s4-1 s5-1) + (let ((s3-1 sv-32) + (s2-1 sv-33) ) - ) - ) - (when (>= (-> v1-43 parent) 0) - (set! sv-44 (+ (* (- s5-1 sv-34) 4) (- s3-1 sv-32))) - (set! - (-> *ocean-work* near-mask-indices sv-44) - (the-as uint (-> v1-43 child)) - ) - (let ((s1-0 (-> *ocean-map* ocean-mid-masks data (-> v1-43 parent)))) - (dotimes (s0-0 4) - (let - ((a3-5 - (-> (the-as ocean-mid-mask (+ s0-0 (the-as int s1-0))) mask 0) - ) + (while (>= s2-1 s3-1) + (when (not (ocean-mid-mask-ptrs-bit? s5-1 s3-1)) + (when (ocean-mid-camera-masks-bit? s5-1 s3-1) + (let ((v1-43 (-> *ocean-map* ocean-trans-indices data (+ (* (the-as uint 48) s5-1) s3-1)))) + (when (>= (-> v1-43 parent) 0) + (set! sv-44 (+ (* (- s5-1 sv-34) 4) (- s3-1 sv-32))) + (set! (-> *ocean-work* near-mask-indices sv-44) (the-as uint (-> v1-43 child))) + (let ((s1-0 (-> *ocean-map* ocean-mid-masks data (-> v1-43 parent)))) + (dotimes (s0-0 4) + (let ((a3-5 (-> (the-as ocean-mid-mask (+ s0-0 (the-as int s1-0))) mask 0))) + (if (!= a3-5 255) + (ocean-trans-add-upload-strip arg0 s5-1 s3-1 a3-5 sv-44 (the-as uint s0-0)) + ) + ) + ) + ) + ) + ) ) - (if (!= a3-5 255) - (ocean-trans-add-upload-strip - arg0 - s5-1 - s3-1 - a3-5 - sv-44 - (the-as uint s0-0) - ) - ) - ) ) - ) + (+! s3-1 1) ) - ) ) - ) - (+! s3-1 1) + (+! s5-1 1) ) - ) - (+! s5-1 1) ) - ) (ocean-mid-add-call-flush arg0 (the-as uint 41)) (ocean-trans-add-constants arg0) (draw-ocean-transition-seams arg0) @@ -1244,3 +871,7 @@ 0 (none) ) + + + + diff --git a/goal_src/engine/gfx/ocean/ocean.gc b/goal_src/engine/gfx/ocean/ocean.gc index 39016c311..ff82ea366 100644 --- a/goal_src/engine/gfx/ocean/ocean.gc +++ b/goal_src/engine/gfx/ocean/ocean.gc @@ -648,9 +648,9 @@ (draw-ocean-texture s5-0 *ocean-verts* #t) (ocean-init-buffer s5-0) (draw-ocean-far s5-0) - ; (if (not *ocean-mid-off*) - ; (draw-ocean-mid s5-0) - ; ) + (when (not *ocean-mid-off*) + (draw-ocean-mid s5-0) + ) (ocean-end-buffer s5-0) (let ((a3-0 (-> s5-0 base))) (let ((v1-32 (the-as object (-> s5-0 base)))) diff --git a/test/decompiler/reference/engine/gfx/ocean/ocean-h_REF.gc b/test/decompiler/reference/engine/gfx/ocean/ocean-h_REF.gc index a8291999a..0f8042316 100644 --- a/test/decompiler/reference/engine/gfx/ocean/ocean-h_REF.gc +++ b/test/decompiler/reference/engine/gfx/ocean/ocean-h_REF.gc @@ -370,7 +370,7 @@ (corner-array ocean-corner 25 :inline :offset-assert 80) (corner-count int32 :offset-assert 2080) (temp-vecs vector 4 :inline :offset-assert 2096) - (mid-mask-ptrs (pointer int32) 36 :offset-assert 2160) + (mid-mask-ptrs (pointer int64) 36 :offset-assert 2160) (mid-camera-masks uint64 36 :offset-assert 2304) (trans-mask-ptrs (pointer int32) 64 :offset-assert 2592) (trans-camera-masks ocean-trans-mask 16 :inline :offset-assert 2848) @@ -540,27 +540,27 @@ ;; definition of type ocean-mid-constants (deftype ocean-mid-constants (structure) - ((hmge-scale vector :inline :offset-assert 0) - (inv-hmge-scale vector :inline :offset-assert 16) - (hvdf-offset vector :inline :offset-assert 32) - (fog vector :inline :offset-assert 48) - (constants vector :inline :offset-assert 64) - (constants2 vector :inline :offset-assert 80) - (drw-fan qword :inline :offset-assert 96) - (env-fan qword :inline :offset-assert 112) - (drw-adgif qword :inline :offset-assert 128) - (drw-texture adgif-shader :inline :offset-assert 144) - (drw-strip-0 qword :inline :offset-assert 224) - (drw-strip-1 qword :inline :offset-assert 240) - (env-adgif qword :inline :offset-assert 256) - (env-texture adgif-shader :inline :offset-assert 272) - (env-strip qword :inline :offset-assert 352) - (env-color vector :inline :offset-assert 368) - (index-table uint128 8 :offset-assert 384) - (pos0 vector :inline :offset-assert 512) - (pos1 vector :inline :offset-assert 528) - (pos2 vector :inline :offset-assert 544) - (pos3 vector :inline :offset-assert 560) + ((hmge-scale vector :inline :offset-assert 0) + (inv-hmge-scale vector :inline :offset-assert 16) + (hvdf-offset vector :inline :offset-assert 32) + (fog vector :inline :offset-assert 48) + (constants vector :inline :offset-assert 64) + (constants2 vector :inline :offset-assert 80) + (drw-fan gs-gif-tag :inline :offset-assert 96) + (env-fan gs-gif-tag :inline :offset-assert 112) + (drw-adgif gs-gif-tag :inline :offset-assert 128) + (drw-texture adgif-shader :inline :offset-assert 144) + (drw-strip-0 gs-gif-tag :inline :offset-assert 224) + (drw-strip-1 gs-gif-tag :inline :offset-assert 240) + (env-adgif gs-gif-tag :inline :offset-assert 256) + (env-texture adgif-shader :inline :offset-assert 272) + (env-strip gs-gif-tag :inline :offset-assert 352) + (env-color vector :inline :offset-assert 368) + (index-table vector4w 8 :inline :offset-assert 384) + (pos0 vector :inline :offset-assert 512) + (pos1 vector :inline :offset-assert 528) + (pos2 vector :inline :offset-assert 544) + (pos3 vector :inline :offset-assert 560) ) :method-count-assert 9 :size-assert #x240 diff --git a/test/decompiler/reference/engine/gfx/ocean/ocean-mid_REF.gc b/test/decompiler/reference/engine/gfx/ocean/ocean-mid_REF.gc new file mode 100644 index 000000000..6f455ce97 --- /dev/null +++ b/test/decompiler/reference/engine/gfx/ocean/ocean-mid_REF.gc @@ -0,0 +1,1164 @@ +;;-*-Lisp-*- +(in-package goal) + +;; definition for symbol ocean-mid-block, type vu-function +(define ocean-mid-block (new 'static 'vu-function :length #x497 :qlength #x24c)) + +;; definition for function ocean-mid-setup-constants +;; INFO: Return type mismatch vector vs none. +;; Used lq/sq +(defun ocean-mid-setup-constants ((arg0 ocean-mid-constants)) + (let ((v1-0 *math-camera*)) + (set! (-> arg0 hmge-scale quad) (-> v1-0 hmge-scale quad)) + (set! (-> arg0 inv-hmge-scale quad) (-> v1-0 inv-hmge-scale quad)) + (set! (-> arg0 hvdf-offset quad) (-> v1-0 hvdf-off quad)) + (set-vector! (-> arg0 fog) (-> v1-0 pfog0) (-> v1-0 fog-min) (-> v1-0 fog-max) 3072.0) + ) + (set-vector! (-> arg0 constants) 0.5 0.5 0.0 393216.0) + (set-vector! (-> arg0 constants2) 0.5 0.5 1.0 0.0) + (let ((v1-3 *ocean-subdivide-draw-mode*)) + (cond + ((zero? v1-3) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ((= v1-3 1) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ((= v1-3 2) + (set! (-> arg0 drw-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ) + ) + (set! (-> arg0 drw-fan regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (let ((v1-12 *ocean-subdivide-draw-mode*)) + (cond + ((zero? v1-12) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ((= v1-12 1) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ((= v1-12 2) + (set! (-> arg0 env-fan tag) + (new 'static 'gif-tag64 + :nloop #x4 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-fan) :iip #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ) + ) + (set! (-> arg0 env-fan regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 drw-adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 drw-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (let* ((a0-13 *ocean-base-page*) + (v1-23 *ocean-base-block*) + (s4-0 (* (+ a0-13 8) 32)) + (s5-0 (* (+ a0-13 10) 32)) + ) + (set! (-> arg0 drw-texture tex0) + (new 'static 'gs-tex0 :tbw #x2 :tcc #x1 :th (log2 128) :tw (log2 128) :tbp0 v1-23) + ) + (set! (-> arg0 drw-texture prims 1) (gs-reg64 tex0-1)) + (set! (-> arg0 drw-texture tex1) (new 'static 'gs-tex1 :mxl #x6 :mmag #x1 :mmin #x5 :l #x1 :k #xeed)) + (set! (-> arg0 drw-texture prims 3) (gs-reg64 tex1-1)) + (set! (-> arg0 drw-texture miptbp1) + (new 'static 'gs-miptbp :tbw1 #x1 :tbw2 #x1 :tbw3 #x1 :tbp3 (+ s5-0 16) :tbp2 s5-0 :tbp1 s4-0) + ) + (set! (-> arg0 drw-texture prims 5) (gs-reg64 miptbp1-1)) + (set! (-> arg0 drw-texture clamp) (new 'static 'gs-clamp)) + (set! (-> arg0 drw-texture clamp-reg) (gs-reg64 clamp-1)) + (set! (-> arg0 drw-texture alpha) + (the-as + gs-alpha + (logior (logior (logior (the-as uint #x40000400004000) (shr (shl (+ s5-0 20) 50) 50)) (shr (shl (+ s5-0 21) 50) 30)) + (shr (shl (+ s5-0 22) 50) 10) + ) + ) + ) + ) + (set! (-> arg0 drw-texture prims 9) (gs-reg64 miptbp2-1)) + (let ((v1-45 *ocean-subdivide-draw-mode*)) + (cond + ((zero? v1-45) + (set! (-> arg0 drw-strip-0 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ((= v1-45 1) + (set! (-> arg0 drw-strip-0 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ((= v1-45 2) + (set! (-> arg0 drw-strip-0 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ) + ) + (set! (-> arg0 drw-strip-0 regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (let ((v1-54 *ocean-subdivide-draw-mode*)) + (cond + ((zero? v1-54) + (set! (-> arg0 drw-strip-1 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ((= v1-54 1) + (set! (-> arg0 drw-strip-1 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ((= v1-54 2) + (set! (-> arg0 drw-strip-1 tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :fge #x1) + :nreg #x3 + ) + ) + ) + ) + ) + (set! (-> arg0 drw-strip-1 regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 env-adgif tag) (new 'static 'gif-tag64 :nloop #x5 :nreg #x1)) + (set! (-> arg0 env-adgif regs) (new 'static 'gif-tag-regs :regs0 (gif-reg-id a+d))) + (let ((s5-1 (-> arg0 env-texture))) + (adgif-shader<-texture-simple! s5-1 (lookup-texture-by-id (new 'static 'texture-id :index #x3 :page #x100))) + (set! (-> s5-1 alpha) (new 'static 'gs-alpha :b #x2 :c #x1 :d #x1)) + ) + (let ((v1-66 *ocean-subdivide-draw-mode*)) + (cond + ((zero? v1-66) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ((= v1-66 1) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type line-strip) :iip #x1 :tme #x1 :abe #x1) + :nreg #x3 + ) + ) + ) + ((= v1-66 2) + (set! (-> arg0 env-strip tag) + (new 'static 'gif-tag64 + :nloop #x12 + :eop #x1 + :pre #x1 + :prim (new 'static 'gs-prim :prim (gs-prim-type tri-strip) :iip #x1) + :nreg #x3 + ) + ) + ) + ) + ) + (set! (-> arg0 env-strip regs) + (new 'static 'gif-tag-regs :regs0 (gif-reg-id st) :regs1 (gif-reg-id rgbaq) :regs2 (gif-reg-id xyzf2)) + ) + (set! (-> arg0 env-color quad) (-> *time-of-day-context* current-sun env-color quad)) + (set-vector! (-> arg0 index-table 0) 63 84 66 0) + (set-vector! (-> arg0 index-table 1) 54 72 57 0) + (set-vector! (-> arg0 index-table 2) 45 60 48 0) + (set-vector! (-> arg0 index-table 3) 36 48 39 0) + (set-vector! (-> arg0 index-table 4) 27 36 30 0) + (set-vector! (-> arg0 index-table 5) 18 24 21 0) + (set-vector! (-> arg0 index-table 6) 9 12 12 0) + (set-vector! (-> arg0 index-table 7) 0 0 3 0) + (set-vector! (-> arg0 pos0) 0.0 0.0 0.0 1.0) + (set-vector! (-> arg0 pos1) 393216.0 0.0 0.0 1.0) + (set-vector! (-> arg0 pos2) 0.0 0.0 393216.0 1.0) + (set-vector! (-> arg0 pos3) 393216.0 0.0 393216.0 1.0) + (none) + ) + +;; definition for function ocean-mid-add-constants +;; INFO: Return type mismatch pointer vs none. +(defun ocean-mid-add-constants ((arg0 dma-buffer)) + (let* ((a1-0 36) + (v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-0)) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) + (new 'static 'vif-tag :imm #x2dd :cmd (vif-cmd unpack-v4-32) :num a1-0) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + (ocean-mid-setup-constants (the-as ocean-mid-constants (-> arg0 base))) + (&+! (-> arg0 base) 576) + (none) + ) + +;; definition for function ocean-matrix*! +(defun ocean-matrix*! ((arg0 matrix) (arg1 matrix) (arg2 matrix)) + (rlet ((acc :class vf) + (vf1 :class vf) + (vf10 :class vf) + (vf11 :class vf) + (vf12 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + (vf6 :class vf) + (vf7 :class vf) + (vf8 :class vf) + (vf9 :class vf) + ) + (.lvf vf1 (&-> arg1 vector 0 quad)) + (.lvf vf5 (&-> arg2 vector 0 quad)) + (.lvf vf6 (&-> arg2 vector 1 quad)) + (.lvf vf7 (&-> arg2 vector 2 quad)) + (.lvf vf8 (&-> arg2 vector 3 quad)) + (.lvf vf2 (&-> arg1 vector 1 quad)) + (.lvf vf3 (&-> arg1 vector 2 quad)) + (.lvf vf4 (&-> arg1 vector 3 quad)) + (.mul.x.vf acc vf5 vf1) + (.add.mul.y.vf acc vf6 vf1 acc) + (.add.mul.z.vf acc vf7 vf1 acc) + (.add.mul.w.vf vf9 vf8 vf1 acc) + (.mul.x.vf acc vf5 vf2) + (.add.mul.y.vf acc vf6 vf2 acc) + (.add.mul.z.vf acc vf7 vf2 acc) + (.add.mul.w.vf vf10 vf8 vf2 acc) + (.mul.x.vf acc vf5 vf3) + (.add.mul.y.vf acc vf6 vf3 acc) + (.add.mul.z.vf acc vf7 vf3 acc) + (.add.mul.w.vf vf11 vf8 vf3 acc) + (.mul.x.vf acc vf5 vf4) + (.add.mul.y.vf acc vf6 vf4 acc) + (.add.mul.z.vf acc vf7 vf4 acc) + (.add.mul.w.vf vf12 vf8 vf4 acc) + (.svf (&-> arg0 vector 0 quad) vf9) + (.svf (&-> arg0 vector 1 quad) vf10) + (.svf (&-> arg0 vector 2 quad) vf11) + (.svf (&-> arg0 vector 3 quad) vf12) + arg0 + ) + ) + +;; definition for function ocean-vector-matrix*! +(defun ocean-vector-matrix*! ((arg0 vector) (arg1 vector) (arg2 matrix)) + (rlet ((acc :class vf) + (vf0 :class vf) + (vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + (vf5 :class vf) + ) + (init-vf0-vector) + (.lvf vf1 (&-> arg2 vector 0 quad)) + (.lvf vf2 (&-> arg2 vector 1 quad)) + (.lvf vf3 (&-> arg2 vector 2 quad)) + (.lvf vf4 (&-> arg2 vector 3 quad)) + (.lvf vf5 (&-> arg1 quad)) + (.mul.x.vf acc vf1 vf5) + (.add.mul.y.vf acc vf2 vf5 acc) + (.add.mul.z.vf acc vf3 vf5 acc) + (.add.mul.w.vf vf5 vf4 vf0 acc) + (.svf (&-> arg0 quad) vf5) + arg0 + ) + ) + +;; definition for function ocean-mid-add-matrices +;; INFO: Return type mismatch pointer vs none. +;; Used lq/sq +(defun ocean-mid-add-matrices ((arg0 dma-buffer) (arg1 vector)) + (let ((s5-0 (new-stack-vector0))) + (-> *math-camera* camera-rot) + (let* ((a2-0 8) + (v1-2 arg0) + (a0-1 (the-as object (-> v1-2 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) + (new 'static 'vif-tag :imm #x8000 :cmd (vif-cmd unpack-v4-32) :num a2-0) + ) + (set! (-> v1-2 base) (&+ (the-as pointer a0-1) 16)) + ) + (let ((s4-0 (-> arg0 base))) + (let* ((v1-3 (the-as object s4-0)) + (t0-2 (-> *math-camera* camera-rot)) + (a0-4 (-> t0-2 vector 0 quad)) + (a2-4 (-> t0-2 vector 1 quad)) + (a3-4 (-> t0-2 vector 2 quad)) + (t0-3 (-> t0-2 vector 3 quad)) + ) + (set! (-> (the-as matrix v1-3) vector 0 quad) a0-4) + (set! (-> (the-as matrix v1-3) vector 1 quad) a2-4) + (set! (-> (the-as matrix v1-3) vector 2 quad) a3-4) + (set! (-> (the-as matrix v1-3) vector 3 quad) t0-3) + ) + (let ((s3-0 (the-as object (&+ s4-0 48)))) + (vector-matrix*! s5-0 arg1 (-> *math-camera* camera-rot)) + (set! (-> (the-as vector s3-0) x) (-> s5-0 x)) + (set! (-> (the-as vector s3-0) y) (-> s5-0 y)) + (set! (-> (the-as vector s3-0) z) (-> s5-0 z)) + ) + (let ((a0-6 (&+ (-> arg0 base) 64))) + (ocean-matrix*! (the-as matrix a0-6) (the-as matrix s4-0) (-> *math-camera* perspective)) + ) + ) + ) + (&+! (-> arg0 base) 128) + (none) + ) + +;; definition for function ocean-mid-check +;; Used lq/sq +(defun ocean-mid-check ((arg0 pointer) (arg1 int) (arg2 int) (arg3 vector)) + (local-vars (v0-0 symbol) (v1-10 float) (a3-2 float) (a3-6 float) (a3-10 float)) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + ) + (let ((v1-0 (new-stack-vector0)) + (t0-1 (-> *math-camera* trans)) + ) + 1.0 + (set! (-> v1-0 x) (+ (-> arg3 x) (* 393216.0 (the float arg1)))) + (set! (-> v1-0 y) (-> arg3 y)) + (set! (-> v1-0 z) (+ (-> arg3 z) (* 393216.0 (the float arg2)))) + (let ((a3-1 v1-0) + (t1-0 t0-1) + ) + (.lvf vf2 (&-> a3-1 quad)) + (.lvf vf3 (&-> t1-0 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a3-2 vf1) + (when (< a3-2 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + ) + (set! (-> v1-0 x) (+ 393216.0 (-> v1-0 x))) + (let ((a3-5 v1-0) + (t1-1 t0-1) + ) + (.lvf vf2 (&-> a3-5 quad)) + (.lvf vf3 (&-> t1-1 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a3-6 vf1) + (when (< a3-6 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + ) + (set! (-> v1-0 z) (+ 393216.0 (-> v1-0 z))) + (let ((a3-9 v1-0) + (t1-2 t0-1) + ) + (.lvf vf2 (&-> a3-9 quad)) + (.lvf vf3 (&-> t1-2 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov a3-10 vf1) + (when (< a3-10 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + ) + (set! (-> v1-0 x) (+ -393216.0 (-> v1-0 x))) + (.lvf vf2 (&-> v1-0 quad)) + (.lvf vf3 (&-> t0-1 quad)) + ) + (.sub.vf vf1 vf3 vf2) + (.mul.vf vf1 vf1 vf1) + (.add.y.vf vf1 vf1 vf1 :mask #b1) + (.add.z.vf vf1 vf1 vf1 :mask #b1) + (.mov v1-10 vf1) + (when (< v1-10 309237600000.0) + (logior! (-> (the-as (pointer uint8) (+ arg2 (the-as int arg0)))) (ash 1 arg1)) + (return #f) + v0-0 + ) + ) + ) + +;; definition for function ocean-mid-add-call +;; INFO: Return type mismatch pointer vs none. +(defun ocean-mid-add-call ((arg0 dma-buffer) (arg1 int)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1 :imm arg1)) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + (none) + ) + +;; definition for function ocean-mid-add-call-flush +;; INFO: Return type mismatch pointer vs none. +(defun ocean-mid-add-call-flush ((arg0 dma-buffer) (arg1 uint)) + (let* ((v1-0 arg0) + (a0-1 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a0-1) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-1) vif0) (new 'static 'vif-tag :cmd (vif-cmd mscalf) :msk #x1 :imm arg1)) + (set! (-> (the-as dma-packet a0-1) vif1) (new 'static 'vif-tag :cmd (vif-cmd flusha) :msk #x1)) + (set! (-> v1-0 base) (&+ (the-as pointer a0-1) 16)) + ) + (none) + ) + +;; definition for function ocean-mid-add-upload +;; Used lq/sq +(defun ocean-mid-add-upload ((arg0 dma-buffer) (arg1 int) (arg2 int) (arg3 int) (arg4 int) (arg5 float)) + (let ((gp-0 (new-stack-vector0))) + (let ((v1-1 (-> *ocean-map* start-corner))) + (set! (-> gp-0 x) (+ (-> v1-1 x) (* 3145728.0 (the float arg2)))) + (set! (-> gp-0 y) (-> v1-1 y)) + (set! (-> gp-0 z) (+ (-> v1-1 z) (* 3145728.0 (the float arg1)))) + ) + (set! (-> gp-0 w) 1.0) + (ocean-mid-add-matrices arg0 gp-0) + (let ((v1-4 (+ (the-as uint (-> *ocean-map* ocean-colors)) (* (+ (* 416 arg1) (* arg2 8)) 4)))) + (dotimes (a0-6 9) + (let* ((a1-3 arg0) + (a2-1 (the-as object (-> a1-3 base))) + ) + (set! (-> (the-as dma-packet a2-1) dma) (new 'static 'dma-tag :qwc #x3 :id (dma-tag-id ref) :addr v1-4)) + (set! (-> (the-as dma-packet a2-1) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a2-1) vif1) (new 'static 'vif-tag + :num #xc + :cmd (vif-cmd unpack-v4-8) + :imm (logior (shr (shl (+ (* 12 a0-6) 8) 54) 54) #xc000) + ) + ) + (set! (-> a1-3 base) (&+ (the-as pointer a2-1) 16)) + ) + (+! v1-4 208) + ) + ) + (let* ((a2-3 1) + (v1-7 arg0) + (a0-7 (the-as object (-> v1-7 base))) + ) + (set! (-> (the-as dma-packet a0-7) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-3)) + (set! (-> (the-as dma-packet a0-7) vif0) (new 'static 'vif-tag :imm #x204 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-7) vif1) + (new 'static 'vif-tag :imm #xc074 :num #x2 :cmd (vif-cmd unpack-v4-8)) + ) + (set! (-> v1-7 base) (&+ (the-as pointer a0-7) 16)) + ) + (let ((v1-8 (-> arg0 base))) + (let ((a0-12 (-> *ocean-map* ocean-mid-masks data arg3))) + (set! (-> *ocean-work* mid-mask-ptrs arg4) (the-as (pointer int64) v1-8)) + (set! (-> (the-as (pointer uint64) v1-8)) (-> a0-12 dword)) + ) + (set! (-> (the-as (pointer uint64) v1-8) 1) (the-as uint 0)) + ) + (&+! (-> arg0 base) 16) + (when (< arg5 556091.4) + (let* ((v1-12 (-> *math-camera* trans)) + (s5-1 (&-> *ocean-work* mid-camera-masks arg4)) + (s4-1 (+ (the int (* 0.0000025431316 (- (-> v1-12 x) (-> gp-0 x)))) -1)) + (s3-1 (+ (the int (* 0.0000025431316 (- (-> v1-12 z) (-> gp-0 z)))) -1)) + ) + (dotimes (s2-1 3) + (dotimes (s1-1 3) + (let ((a1-12 (+ s1-1 s4-1)) + (a2-7 (+ s2-1 s3-1)) + ) + (if (and (>= a1-12 0) (>= a2-7 0) (< a1-12 8) (< a2-7 8)) + (ocean-mid-check s5-1 a1-12 a2-7 gp-0) + ) + ) + ) + ) + ) + #f + ) + ) + ) + +;; definition for function ocean-mid-camera-masks-bit? +(defun ocean-mid-camera-masks-bit? ((arg0 uint) (arg1 uint)) + (cond + ((or (< (the-as int arg0) 0) (>= (the-as int arg0) 48) (< (the-as int arg1) 0) (>= (the-as int arg1) 48)) + #t + ) + (else + (let* ((a3-0 (/ (the-as int arg0) 8)) + (a2-3 (/ (the-as int arg1) 8)) + (a0-1 (logand arg0 7)) + (v1-1 (logand arg1 7)) + (a1-3 (+ (* 6 a3-0) a2-3)) + ) + (logtest? (-> (the-as (pointer uint8) (+ (+ a0-1 (* a1-3 8)) (the-as uint *ocean-work*))) 2300) (ash 1 v1-1)) + ) + ) + ) + ) + +;; definition for function ocean-mid-mask-ptrs-bit? +(defun ocean-mid-mask-ptrs-bit? ((arg0 uint) (arg1 uint)) + (cond + ((or (< (the-as int arg0) 0) (>= (the-as int arg0) 48) (< (the-as int arg1) 0) (>= (the-as int arg1) 48)) + #t + ) + (else + (let* ((a3-0 (/ (the-as int arg0) 8)) + (a2-3 (/ (the-as int arg1) 8)) + (a0-1 (logand arg0 7)) + (v1-1 (logand arg1 7)) + (a1-3 (+ (* 6 a3-0) a2-3)) + ) + (if (-> *ocean-work* mid-mask-ptrs a1-3) + (logtest? (-> (the-as (pointer uint8) (+ a0-1 (the-as uint (-> *ocean-work* mid-mask-ptrs a1-3)))) 0) + (ash 1 v1-1) + ) + #t + ) + ) + ) + ) + ) + +;; definition for function ocean-mid-camera-masks-set! +(defun ocean-mid-camera-masks-set! ((arg0 uint) (arg1 uint)) + (cond + ((or (< (the-as int arg0) 0) (>= (the-as int arg0) 48) (< (the-as int arg1) 0) (>= (the-as int arg1) 48)) + #f + ) + (else + (let* ((a3-0 (/ (the-as int arg0) 8)) + (a2-3 (/ (the-as int arg1) 8)) + (v1-1 (logand arg0 7)) + (a0-1 (logand arg1 7)) + (a2-4 (+ (* 6 a3-0) a2-3)) + (a1-5 (&-> *ocean-work* mid-camera-masks a2-4)) + ) + (cond + (a1-5 + (cond + ((logtest? (-> (the-as (pointer uint8) (+ v1-1 (the-as uint (-> *ocean-work* mid-mask-ptrs a2-4)))) 0) + (ash 1 a0-1) + ) + #f + ) + (else + (logior! (-> (the-as (pointer uint8) (+ v1-1 (the-as uint a1-5))) 0) (ash 1 a0-1)) + #t + ) + ) + ) + (else + #f + ) + ) + ) + ) + ) + ) + +;; definition for function ocean-mid-add-upload-table +;; WARN: Function may read a register that is not set: f31 +;; Used lq/sq +(defun ocean-mid-add-upload-table ((arg0 dma-buffer) (arg1 uint) (arg2 uint) (arg3 (pointer float)) (arg4 int) (arg5 symbol)) + (local-vars + (r0-0 int) + (r0-1 int) + (r0-2 int) + (r0-3 int) + (r0-4 int) + (v1-8 float) + (a0-19 uint128) + (a0-20 uint128) + (a0-21 uint128) + (a1-14 uint128) + (a1-15 uint128) + (a1-16 uint128) + (a2-15 uint128) + (a3-11 uint128) + (f31-0 none) + ) + (rlet ((vf1 :class vf) + (vf2 :class vf) + (vf3 :class vf) + (vf4 :class vf) + ) + (when (ocean-mid-camera-masks-set! arg1 arg2) + (let ((a1-2 (new-stack-vector0))) + (let ((v1-1 (-> *ocean-map* start-corner))) + (set! (-> a1-2 x) (+ (-> v1-1 x) (* 393216.0 (the float arg2)))) + (set! (-> a1-2 y) (-> v1-1 y)) + (set! (-> a1-2 z) (+ (-> v1-1 z) (* 393216.0 (the float arg1)))) + ) + (set! (-> a1-2 w) 1.0) + (ocean-mid-add-matrices arg0 a1-2) + ) + (let* ((a1-3 9) + (v1-3 arg0) + (a0-3 (the-as object (-> v1-3 base))) + ) + (set! (-> (the-as dma-packet a0-3) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a1-3)) + (set! (-> (the-as dma-packet a0-3) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-3) vif1) + (new 'static 'vif-tag :imm #x8008 :cmd (vif-cmd unpack-v4-32) :num a1-3) + ) + (set! (-> v1-3 base) (&+ (the-as pointer a0-3) 16)) + ) + (set-vector! (the-as vector4w (-> arg0 base)) arg4 0 0 0) + (&+! (-> arg0 base) 16) + (let ((v1-7 (the-as (pointer uint128) (-> arg0 base)))) + (set! (-> v1-7 0) (-> *ocean-trans-st-table* 0 quad)) + (set! (-> v1-7 1) (-> *ocean-trans-st-table* 1 quad)) + (set! (-> v1-7 2) (-> *ocean-trans-st-table* 2 quad)) + (set! (-> v1-7 3) (-> *ocean-trans-st-table* 3 quad)) + (let ((a0-18 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ (* 52 (the-as int arg1)) arg2)))) + (a1-13 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ arg2 1 (* 52 (the-as int arg1)))))) + (a2-14 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ (* 52 (the-as int (+ arg1 1))) arg2)))) + (a3-10 (the-as uint128 (-> *ocean-map* ocean-colors colors (+ arg2 1 (* 52 (the-as int (+ arg1 1))))))) + ) + (.pextlb a0-19 0 a0-18) + (.mov r0-0 f31-0) + (.pextlb a1-14 0 a1-13) + (.mov r0-1 f31-0) + (.pextlb a2-15 0 a2-14) + (.mov r0-2 f31-0) + (.pextlb a3-11 0 a3-10) + ) + (.mov r0-3 f31-0) + (.pextlh a0-20 0 a0-19) + (.mov r0-4 f31-0) + (.pextlh a1-15 0 a1-14) + (.mov vf1 a0-20) + (.pextlh a0-21 0 a2-15) + (.mov vf2 a1-15) + (.pextlh a1-16 0 a3-11) + (.mov vf3 a0-21) + (nop!) + (.mov vf4 a1-16) + (.itof.vf vf1 vf1) + (nop!) + (.itof.vf vf2 vf2) + (nop!) + (.itof.vf vf3 vf3) + (nop!) + (.itof.vf vf4 vf4) + (nop!) + (nop!) + (.svf (&-> v1-7 4) vf1) + (nop!) + (.svf (&-> v1-7 5) vf2) + (nop!) + (.svf (&-> v1-7 6) vf3) + (nop!) + (.svf (&-> v1-7 7) vf4) + ) + (.mov v1-8 vf4) + (&+! (-> arg0 base) 128) + (let* ((v1-11 arg0) + (a0-22 (the-as object (-> v1-11 base))) + ) + (set! (-> (the-as dma-packet a0-22) dma) + (new 'static 'dma-tag :id (dma-tag-id ref) :addr (the-as int arg3) :qwc arg4) + ) + (set! (-> (the-as dma-packet a0-22) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a0-22) vif1) + (new 'static 'vif-tag :imm #x8011 :cmd (vif-cmd unpack-v4-32) :num arg4) + ) + (set! (-> v1-11 base) (&+ (the-as pointer a0-22) 16)) + ) + (if arg5 + (ocean-mid-add-call arg0 275) + (ocean-mid-add-call arg0 107) + ) + ) + (none) + ) + ) + +;; definition for function ocean-mid-add-upload-top +(defun ocean-mid-add-upload-top ((arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (let ((s2-0 (-> *ocean-work* mid-minx)) + (s1-0 (-> *ocean-work* mid-maxx)) + (s3-0 (ocean-mid-camera-masks-bit? arg1 arg2)) + ) + (cond + ((ocean-mid-mask-ptrs-bit? arg1 arg2) + ) + ((= arg2 s2-0) + (cond + (s3-0 + (ocean-mid-add-upload-table arg0 (+ arg1 -1) arg2 *ocean-down-table* 7 #t) + (ocean-mid-add-upload-table arg0 arg1 (+ arg2 -1) *ocean-right-table* 7 #t) + ) + (else + (let ((s3-1 (ocean-mid-mask-ptrs-bit? (+ arg1 1) arg2)) + (v1-5 (ocean-mid-mask-ptrs-bit? arg1 (+ arg2 1))) + ) + (cond + ((and s3-1 v1-5) + ) + (s3-1 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-right-table* 7 #t) + ) + (v1-5 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-down-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-down-right-table* 10 #f) + ) + ) + ) + ) + ) + ) + ((= arg2 s1-0) + (cond + (s3-0 + (ocean-mid-add-upload-table arg0 (+ arg1 -1) arg2 *ocean-down-table* 7 #t) + (ocean-mid-add-upload-table arg0 arg1 (+ arg2 1) *ocean-left-table* 7 #t) + ) + (else + (let ((s3-2 (ocean-mid-mask-ptrs-bit? (+ arg1 1) arg2)) + (v1-7 (ocean-mid-mask-ptrs-bit? arg1 (+ arg2 -1))) + ) + (cond + ((and s3-2 v1-7) + ) + (s3-2 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-left-table* 7 #t) + ) + (v1-7 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-down-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-down-left-table* 10 #t) + ) + ) + ) + ) + ) + ) + (s3-0 + (ocean-mid-add-upload-table arg0 (+ arg1 -1) arg2 *ocean-down-table* 7 #t) + ) + ) + ) + (none) + ) + +;; definition for function ocean-mid-add-upload-middle +(defun ocean-mid-add-upload-middle ((arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (let ((s3-0 (-> *ocean-work* mid-minx)) + (s2-0 (-> *ocean-work* mid-maxx)) + (s1-0 (ocean-mid-camera-masks-bit? arg1 arg2)) + ) + (cond + ((ocean-mid-mask-ptrs-bit? arg1 arg2) + ) + ((= arg2 s3-0) + (cond + (s1-0 + (ocean-mid-add-upload-table arg0 arg1 (+ arg2 -1) *ocean-right-table* 7 #t) + ) + ((ocean-mid-mask-ptrs-bit? arg1 (+ arg2 1)) + ) + (else + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-right-table* 7 #t) + ) + ) + ) + ((= arg2 s2-0) + (cond + (s1-0 + (ocean-mid-add-upload-table arg0 arg1 (+ arg2 1) *ocean-left-table* 7 #t) + ) + ((ocean-mid-mask-ptrs-bit? arg1 (+ arg2 -1)) + ) + (else + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-left-table* 7 #t) + ) + ) + ) + ) + ) + (none) + ) + +;; definition for function ocean-mid-add-upload-bottom +(defun ocean-mid-add-upload-bottom ((arg0 dma-buffer) (arg1 uint) (arg2 uint)) + (let ((s2-0 (-> *ocean-work* mid-minx)) + (s1-0 (-> *ocean-work* mid-maxx)) + (s3-0 (ocean-mid-camera-masks-bit? arg1 arg2)) + ) + (cond + ((ocean-mid-mask-ptrs-bit? arg1 arg2) + ) + ((= arg2 s2-0) + (cond + (s3-0 + (ocean-mid-add-upload-table arg0 (+ arg1 1) arg2 *ocean-up-table* 7 #t) + (ocean-mid-add-upload-table arg0 arg1 (+ arg2 -1) *ocean-right-table* 7 #t) + ) + (else + (let ((s3-1 (ocean-mid-mask-ptrs-bit? (+ arg1 -1) arg2)) + (v1-5 (ocean-mid-mask-ptrs-bit? arg1 (+ arg2 1))) + ) + (cond + ((and s3-1 v1-5) + ) + (s3-1 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-right-table* 7 #t) + ) + (v1-5 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-up-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-up-right-table* 10 #t) + ) + ) + ) + ) + ) + ) + ((= arg2 s1-0) + (cond + (s3-0 + (ocean-mid-add-upload-table arg0 (+ arg1 1) arg2 *ocean-up-table* 7 #t) + (ocean-mid-add-upload-table arg0 arg1 (+ arg2 1) *ocean-left-table* 7 #t) + ) + (else + (let ((s3-2 (ocean-mid-mask-ptrs-bit? (+ arg1 -1) arg2)) + (v1-7 (ocean-mid-mask-ptrs-bit? arg1 (+ arg2 -1))) + ) + (cond + ((and s3-2 v1-7) + ) + (s3-2 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-left-table* 7 #t) + ) + (v1-7 + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-up-table* 7 #t) + ) + (else + (ocean-mid-add-upload-table arg0 arg1 arg2 *ocean-up-left-table* 10 #f) + ) + ) + ) + ) + ) + ) + (s3-0 + (ocean-mid-add-upload-table arg0 (+ arg1 1) arg2 *ocean-up-table* 7 #t) + ) + ) + ) + (none) + ) + +;; definition for function ocean-seams-add-constants +;; INFO: Return type mismatch pointer vs none. +(defun ocean-seams-add-constants ((arg0 dma-buffer)) + (let* ((a2-0 4) + (v1-0 arg0) + (a1-0 (the-as object (-> v1-0 base))) + ) + (set! (-> (the-as dma-packet a1-0) dma) (new 'static 'dma-tag :id (dma-tag-id cnt) :qwc a2-0)) + (set! (-> (the-as dma-packet a1-0) vif0) (new 'static 'vif-tag :imm #x404 :cmd (vif-cmd stcycl))) + (set! (-> (the-as dma-packet a1-0) vif1) + (new 'static 'vif-tag :imm #x2fd :cmd (vif-cmd unpack-v4-32) :num a2-0) + ) + (set! (-> v1-0 base) (&+ (the-as pointer a1-0) 16)) + ) + (let ((v1-1 (-> arg0 base))) + (set-vector! (the-as vector (&+ v1-1 0)) 0.0 0.0 0.0 1.0) + (set-vector! (the-as vector (&+ v1-1 16)) 393216.0 0.0 0.0 1.0) + (set-vector! (the-as vector (&+ v1-1 32)) 0.0 0.0 393216.0 1.0) + (set-vector! (the-as vector (&+ v1-1 48)) 393216.0 0.0 393216.0 1.0) + ) + (&+! (-> arg0 base) 64) + (none) + ) + +;; definition for function draw-ocean-mid-seams +;; INFO: Return type mismatch symbol vs none. +(defun draw-ocean-mid-seams ((arg0 dma-buffer)) + (local-vars (sv-32 uint) (sv-33 uint) (sv-34 uint) (sv-35 uint) (sv-36 sphere)) + (ocean-seams-add-constants arg0) + (set! sv-32 (-> *ocean-work* mid-minx)) + (set! sv-33 (-> *ocean-work* mid-maxx)) + (set! sv-34 (-> *ocean-work* mid-minz)) + (set! sv-35 (-> *ocean-work* mid-maxz)) + (set! sv-36 (new 'stack 'sphere)) + (set! (-> sv-36 y) (-> *ocean-map* start-corner y)) + (set! (-> sv-36 w) 278045.7) + (let ((s5-0 sv-34) + (s4-0 sv-35) + ) + (while (>= s4-0 s5-0) + (let ((s3-0 sv-32) + (s2-0 sv-33) + ) + (while (>= s2-0 s3-0) + (set! (-> sv-36 x) (+ 196608.0 (* 393216.0 (the float s3-0)) (-> *ocean-map* start-corner x))) + (set! (-> sv-36 z) (+ 196608.0 (* 393216.0 (the float s5-0)) (-> *ocean-map* start-corner z))) + (when (sphere-cull sv-36) + (cond + ((= s5-0 sv-34) + (ocean-mid-add-upload-top arg0 s5-0 s3-0) + ) + ((= s5-0 sv-35) + (ocean-mid-add-upload-bottom arg0 s5-0 s3-0) + ) + (else + (ocean-mid-add-upload-middle arg0 s5-0 s3-0) + ) + ) + ) + (+! s3-0 1) + ) + ) + (+! s5-0 1) + ) + ) + (dotimes (v1-26 36) + (if (and (-> *ocean-work* mid-mask-ptrs v1-26) (nonzero? (-> *ocean-work* mid-camera-masks v1-26))) + (logior! (-> *ocean-work* mid-mask-ptrs v1-26 0) (-> *ocean-work* mid-camera-masks v1-26)) + ) + ) + (none) + ) + +;; definition for function draw-ocean-mid +;; INFO: Return type mismatch int vs none. +;; Used lq/sq +(defun draw-ocean-mid ((arg0 dma-buffer)) + (rlet ((vf16 :class vf) + (vf17 :class vf) + (vf18 :class vf) + (vf19 :class vf) + (vf20 :class vf) + (vf21 :class vf) + (vf22 :class vf) + (vf23 :class vf) + ) + (dotimes (v1-0 36) + (set! (-> *ocean-work* mid-mask-ptrs v1-0) (the-as (pointer int64) #f)) + (set! (-> *ocean-work* mid-camera-masks v1-0) (the-as uint 0)) + ) + (dma-buffer-add-vu-function arg0 ocean-mid-block 1) + (let* ((v1-3 arg0) + (a0-6 (the-as object (-> v1-3 base))) + ) + (set! (-> (the-as dma-packet a0-6) dma) (new 'static 'dma-tag :id (dma-tag-id cnt))) + (set! (-> (the-as dma-packet a0-6) vif0) (new 'static 'vif-tag :cmd (vif-cmd base))) + (set! (-> (the-as dma-packet a0-6) vif1) (new 'static 'vif-tag :imm #x76 :cmd (vif-cmd offset))) + (set! (-> v1-3 base) (&+ (the-as pointer a0-6) 16)) + ) + (ocean-mid-add-constants arg0) + (ocean-mid-add-call arg0 0) + (let ((v1-5 *math-camera*)) + (.lvf vf16 (&-> v1-5 plane 0 quad)) + (.lvf vf17 (&-> v1-5 plane 1 quad)) + (.lvf vf18 (&-> v1-5 plane 2 quad)) + (.lvf vf19 (&-> v1-5 plane 3 quad)) + (.lvf vf20 (&-> v1-5 guard-plane 0 quad)) + (.lvf vf21 (&-> v1-5 guard-plane 1 quad)) + (.lvf vf22 (&-> v1-5 guard-plane 2 quad)) + (.lvf vf23 (&-> v1-5 guard-plane 3 quad)) + ) + (set! (-> (new 'stack-no-clear 'vector) quad) (the-as uint128 0)) + (let ((s5-0 (-> *math-camera* trans))) + (dotimes (s4-0 6) + (dotimes (s3-0 6) + (let* ((s2-0 (+ (* 6 s4-0) s3-0)) + (s1-0 (-> *ocean-map* ocean-spheres spheres s2-0)) + (s0-0 (-> (the-as (pointer int16) (+ (* s2-0 2) (the-as int (-> *ocean-map* ocean-mid-indices)))))) + ) + (when (sphere-cull s1-0) + (cond + ((< s0-0 0) + ) + ((let ((f30-0 (- (vector-vector-distance s1-0 s5-0) (-> s1-0 w)))) + (ocean-mid-add-upload arg0 s4-0 s3-0 s0-0 s2-0 f30-0) + (< f30-0 786432.0) + ) + (ocean-mid-add-call arg0 73) + (+! (-> *terrain-stats* ocean-mid fragments) 1) + (+! (-> *terrain-stats* ocean-mid tris) 256) + (+! (-> *terrain-stats* ocean-mid dverts) 288) + ) + (else + (ocean-mid-add-call arg0 46) + (+! (-> *terrain-stats* ocean-mid fragments) 1) + (+! (-> *terrain-stats* ocean-mid tris) 128) + (+! (-> *terrain-stats* ocean-mid dverts) 144) + ) + ) + ) + ) + ) + ) + ) + (when (not (or *ocean-near-off* (< 196608.0 (fabs (-> *math-camera* trans y))))) + (let ((a1-11 48) + (a2-2 0) + (v1-42 48) + (a0-25 0) + ) + (dotimes (a3-1 6) + (dotimes (t0-1 6) + (let ((t1-6 (&-> *ocean-work* mid-camera-masks (+ (* 6 a3-1) t0-1)))) + (when (nonzero? (-> t1-6 0)) + (dotimes (t2-3 8) + (let ((t3-1 (-> (the-as (pointer uint8) (+ t2-3 (the-as int t1-6))) 0))) + (when (nonzero? t3-1) + (let ((t4-2 (+ (* a3-1 8) t2-3))) + (if (< t4-2 v1-42) + (set! v1-42 t4-2) + ) + (if (< a0-25 t4-2) + (set! a0-25 t4-2) + ) + ) + (dotimes (t4-3 8) + (when (logtest? t3-1 (ash 1 t4-3)) + (let ((t5-9 (+ (* t0-1 8) t4-3))) + (if (< t5-9 a1-11) + (set! a1-11 t5-9) + ) + (if (< a2-2 t5-9) + (set! a2-2 t5-9) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + ) + (set! (-> *ocean-work* mid-minx) (the-as uint a1-11)) + (set! (-> *ocean-work* mid-maxx) (the-as uint a2-2)) + (set! (-> *ocean-work* mid-minz) (the-as uint v1-42)) + (set! (-> *ocean-work* mid-maxz) (the-as uint a0-25)) + (when (and (< a1-11 a2-2) (< v1-42 a0-25)) + (ocean-mid-add-call-flush arg0 (the-as uint 41)) + (ocean-mid-add-call-flush arg0 (the-as uint 43)) + (draw-ocean-transition arg0) + (draw-ocean-mid-seams arg0) + ) + ) + ) + (ocean-mid-add-call-flush arg0 (the-as uint 41)) + 0 + (none) + ) + ) + + + + diff --git a/test/decompiler/reference/engine/gfx/ocean/ocean-transition_REF.gc b/test/decompiler/reference/engine/gfx/ocean/ocean-transition_REF.gc index 6adc5b376..b97c05067 100644 --- a/test/decompiler/reference/engine/gfx/ocean/ocean-transition_REF.gc +++ b/test/decompiler/reference/engine/gfx/ocean/ocean-transition_REF.gc @@ -142,8 +142,8 @@ (set! (-> a1-2 z) (+ (-> v1-1 z) (* 98304.0 (the float arg1)))) ) (set! (-> a1-2 w) 1.0) + (ocean-mid-add-matrices arg0 a1-2) ) - (ocean-mid-add-matrices arg0) (let* ((a1-3 9) (v1-3 arg0) (a0-3 (the-as object (-> v1-3 base))) @@ -333,8 +333,8 @@ (set! (-> a1-1 z) (+ (-> v1-1 z) (* 393216.0 (the float arg1)))) ) (set! (-> a1-1 w) 1.0) + (ocean-mid-add-matrices arg0 a1-1) ) - (ocean-mid-add-matrices arg0) (let* ((a1-2 9) (v1-3 arg0) (a0-2 (the-as object (-> v1-3 base))) @@ -756,8 +756,8 @@ (s2-0 sv-33) ) (while (>= s2-0 s3-0) - (when (not (ocean-mid-mask-ptrs-bit? s5-0)) - (when (ocean-mid-camera-masks-bit? s5-0) + (when (not (ocean-mid-mask-ptrs-bit? s5-0 s3-0)) + (when (ocean-mid-camera-masks-bit? s5-0 s3-0) (set! (-> sv-36 x) (+ 196608.0 (* 393216.0 (the float s3-0)) (-> *ocean-map* start-corner x))) (set! (-> sv-36 z) (+ 196608.0 (* 393216.0 (the float s5-0)) (-> *ocean-map* start-corner z))) (if (sphere-cull sv-36) @@ -835,8 +835,8 @@ (s2-1 sv-33) ) (while (>= s2-1 s3-1) - (when (not (ocean-mid-mask-ptrs-bit? s5-1)) - (when (ocean-mid-camera-masks-bit? s5-1) + (when (not (ocean-mid-mask-ptrs-bit? s5-1 s3-1)) + (when (ocean-mid-camera-masks-bit? s5-1 s3-1) (let ((v1-43 (-> *ocean-map* ocean-trans-indices data (+ (* (the-as uint 48) s5-1) s3-1)))) (when (>= (-> v1-43 parent) 0) (set! sv-44 (+ (* (- s5-1 sv-34) 4) (- s3-1 sv-32))) diff --git a/test/decompiler/test_VuDisasm.cpp b/test/decompiler/test_VuDisasm.cpp index e8a1424ae..54910c9c8 100644 --- a/test/decompiler/test_VuDisasm.cpp +++ b/test/decompiler/test_VuDisasm.cpp @@ -105,6 +105,21 @@ TEST(VuDisasm, OceanTexture) { EXPECT_EQ(disasm.to_string(prog), get_expected("ocean-texture")); } +TEST(VuDisasm, OceanMid) { + auto data = get_test_data("ocean-mid"); + VuDisassembler disasm(VuDisassembler::VuKind::VU1); + auto prog = disasm.disassemble(data.data(), data.size() * 4, false); + EXPECT_EQ(disasm.to_string(prog), get_expected("ocean-mid")); +} + +// TEST(VuDisasm, OceanNear) { +// auto data = get_test_data("ocean-near"); +// VuDisassembler disasm(VuDisassembler::VuKind::VU1); +// auto prog = disasm.disassemble(data.data(), data.size() * 4, false); +// fmt::print("{}\n", disasm.to_string(prog)); +// // EXPECT_EQ(disasm.to_string(prog), get_expected("ocean-mid")); +// } + TEST(VuDisasm, Sky) { auto data = get_test_data("sky"); VuDisassembler disasm(VuDisassembler::VuKind::VU1); @@ -152,7 +167,7 @@ TEST(VuDisasm, Generic) { VuDisassembler disasm(VuDisassembler::VuKind::VU1); auto prog = disasm.disassemble(data.data(), data.size() * 4, false); EXPECT_EQ(disasm.to_string(prog), get_expected("generic")); - fmt::print("{}\n", disasm.to_string_with_cpp(prog, false)); + // fmt::print("{}\n", disasm.to_string_with_cpp(prog, false)); } TEST(VuDisasm, TieNear) { diff --git a/test/decompiler/vu_reference/ocean-mid-result.txt b/test/decompiler/vu_reference/ocean-mid-result.txt new file mode 100644 index 000000000..b60067729 --- /dev/null +++ b/test/decompiler/vu_reference/ocean-mid-result.txt @@ -0,0 +1,1240 @@ + lq.xyzw vf01, 733(vi00) | nop + lq.xyzw vf02, 735(vi00) | nop + lq.xyzw vf03, 736(vi00) | nop + lq.xyzw vf05, 737(vi00) | nop + lq.xyzw vf06, 738(vi00) | nop + iaddiu vi09, vi00, 0x14f | nop + iaddi vi01, vi00, 0x6 | nop +L1: + lq.xyzw vf20, 741(vi01) | nop + lq.xyzw vf21, 749(vi01) | nop + sq.xyzw vf20, 335(vi01) | nop + sq.xyzw vf20, 457(vi01) | nop + sq.xyzw vf21, 396(vi01) | nop + sq.xyzw vf21, 518(vi01) | nop + ibgtz vi01, L1 | nop + iaddi vi01, vi01, -0x1 | nop + iaddi vi05, vi00, 0x0 | mul.xyzw vf16, vf00, vf00 + iaddi vi07, vi00, 0x8 | nop +L2: + iaddi vi06, vi00, 0x8 | mul.x vf16, vf00, vf00 +L3: + sq.xyzw vf16, 236(vi05) | nop + iaddi vi05, vi05, 0x1 | addw.x vf16, vf16, vf05 + ibgtz vi06, L3 | nop + iaddi vi06, vi06, -0x1 | nop + ibgtz vi07, L2 | addw.z vf16, vf16, vf05 + iaddi vi07, vi07, -0x1 | nop + nop | sub.xyzw vf20, vf20, vf20 + nop | sub.xyzw vf21, vf21, vf21 + iaddi vi03, vi00, 0x0 | addw.z vf20, vf20, vf00 + iaddi vi06, vi00, 0x8 | addw.yz vf21, vf21, vf00 +L4: + sq.xyzw vf20, 317(vi03) | nop + sq.xyzw vf21, 318(vi03) | addw.x vf20, vf20, vf00 + iaddi vi03, vi03, 0x2 | addw.x vf21, vf21, vf00 + ibgtz vi06, L4 | nop + iaddi vi06, vi06, -0x1 | nop + lq.xyzw vf08, 756(vi00) | nop + iaddi vi04, vi00, 0x8 | nop + iaddiu vi06, vi00, 0x11 | ftoi0.xyzw vf08, vf08 +L5: + sq.xyzw vf08, 396(vi04) | nop + sq.xyzw vf08, 518(vi04) | nop + iaddi vi04, vi04, 0x3 | nop + ibgtz vi06, L5 | nop + iaddi vi06, vi06, -0x1 | nop + nop | nop :e + nop | nop + iaddiu vi10, vi00, 0x243 | nop + nop | nop :e + nop | nop + xtop vi02 | nop + lq.xyzw vf07, 748(vi00) | nop + lq.xyzw vf12, 4(vi02) | nop + lq.xyzw vf13, 5(vi02) | nop + lq.xyzw vf14, 6(vi02) | nop + lq.xyzw vf15, 7(vi02) | nop + sq.xyzw vf07, 341(vi00) | nop + sq.xyzw vf07, 463(vi00) | nop + iaddi vi07, vi00, 0x7 | nop + lq.xyzw vf04, 116(vi02) | nop +L6: + iaddi vi01, vi07, -0x4 | nop + mtir vi10, vf04.x | nop + iaddiu vi11, vi00, 0xff | nop + ibne vi00, vi01, L7 | nop + mr32.xyzw vf04, vf04 | nop + lq.xyzw vf04, 117(vi02) | nop +L7: + ibeq vi11, vi10, L8 | nop + iaddi vi08, vi09, 0x7 | nop + bal vi15, L20 | nop + nop | nop + iaddiu vi01, vi00, 0x318 | nop + xgkick vi09 | nop + isub vi09, vi01, vi09 | nop +L8: + ibgtz vi07, L6 | nop + iaddi vi07, vi07, -0x1 | nop + nop | nop :e + nop | nop + xtop vi02 | nop + lq.xyzw vf07, 747(vi00) | nop + lq.xyzw vf08, 0(vi02) | nop + lq.xyzw vf09, 1(vi02) | nop + lq.xyzw vf10, 2(vi02) | nop + lq.xyzw vf11, 3(vi02) | nop + lq.xyzw vf12, 4(vi02) | nop + lq.xyzw vf13, 5(vi02) | nop + lq.xyzw vf14, 6(vi02) | nop + lq.xyzw vf15, 7(vi02) | nop + sq.xyzw vf07, 341(vi00) | nop + sq.xyzw vf07, 463(vi00) | nop + iaddi vi07, vi00, 0x7 | nop + lq.xyzw vf04, 116(vi02) | nop +L9: + iaddi vi01, vi07, -0x4 | nop + mtir vi10, vf04.x | nop + iaddiu vi11, vi00, 0xff | nop + ibne vi00, vi01, L10 | nop + mr32.xyzw vf04, vf04 | nop + lq.xyzw vf04, 117(vi02) | nop +L10: + ibeq vi11, vi10, L11 | nop + iaddi vi08, vi09, 0x7 | nop + bal vi15, L26 | nop + nop | nop + iaddiu vi01, vi00, 0x318 | nop + xgkick vi09 | nop + ibeq vi00, vi14, L11 | nop + isub vi09, vi01, vi09 | nop + bal vi15, L32 | nop + nop | nop +L11: + ibgtz vi07, L9 | nop + iaddi vi07, vi07, -0x1 | nop + nop | nop :e + nop | nop + xtop vi02 | nop + xtop vi03 | nop + ior vi04, vi00, vi00 | nop + ilw.x vi05, 8(vi02) | nop + lq.xyzw vf08, 0(vi02) | nop + lq.xyzw vf09, 1(vi02) | nop + lq.xyzw vf10, 2(vi02) | nop + lq.xyzw vf11, 3(vi02) | nop + lq.xyzw vf12, 4(vi02) | nop + lq.xyzw vf13, 5(vi02) | nop + lq.xyzw vf14, 6(vi02) | nop + lq.xyzw vf15, 7(vi02) | nop +L12: + lq.xyzw vf16, 17(vi03) | nop + lq.xyzw vf28, 765(vi00) | nop + lq.xyzw vf29, 766(vi00) | nop + lq.xyzw vf30, 767(vi00) | nop + lq.xyzw vf31, 768(vi00) | nop + lq.xyzw vf24, 9(vi02) | mulax.xyzw ACC, vf28, vf16 + lq.xyzw vf25, 10(vi02) | madday.xyzw ACC, vf29, vf16 + lq.xyzw vf26, 11(vi02) | maddaz.xyzw ACC, vf30, vf16 + lq.xyzw vf27, 12(vi02) | maddw.xyzw vf28, vf31, vf16 + lq.xyzw vf22, 13(vi02) | mulax.xyzw ACC, vf24, vf16 + lq.xyzw vf23, 14(vi02) | madday.xyzw ACC, vf25, vf16 + lq.xyzw vf18, 15(vi02) | maddaz.xyzw ACC, vf26, vf16 + lq.xyzw vf19, 16(vi02) | maddw.xyzw vf20, vf27, vf16 + iaddi vi05, vi05, -0x1 | mulax.xyzw ACC, vf08, vf28 + nop | madday.xyzw ACC, vf09, vf28 + nop | maddaz.xyzw ACC, vf10, vf28 + nop | maddw.xyzw vf24, vf11, vf00 + nop | mulax.xyzw ACC, vf12, vf28 + nop | madday.xyzw ACC, vf13, vf28 + nop | maddaz.xyzw ACC, vf14, vf28 + erleng.xyz P, vf24 | maddw.xyzw vf28, vf15, vf00 + waitp | addz.y vf24, vf00, vf24 + nop | mul.xyzw vf28, vf28, vf01 + mfp.w vf24, P | mulax.xyzw ACC, vf22, vf16 + iaddi vi03, vi03, 0x1 | madday.xyzw ACC, vf23, vf16 + nop | maddaz.xyzw ACC, vf18, vf16 + sq.xyzw vf20, 791(vi04) | maddw.xyzw vf22, vf19, vf16 + sq.xyzw vf28, 793(vi04) | mulw.xy vf24, vf24, vf24 + sq.xyzw vf22, 792(vi04) | mula.xyzw ACC, vf24, vf05 + iaddi vi04, vi04, 0x4 | maddw.xyzw vf24, vf06, vf00 + ibgtz vi05, L12 | nop + sq.xyzw vf24, 790(vi04) | nop + ior vi14, vi00, vi00 | nop + lq.xyzw vf31, 734(vi00) | nop + ilw.x vi11, 8(vi02) | nop + ilw.y vi07, 8(vi02) | nop + iaddi vi15, vi00, 0x1 | nop + lq.xyzw vf28, 741(vi00) | nop + lq.xyzw vf29, 742(vi00) | nop + lq.xyzw vf30, 743(vi00) | nop + lq.xyzw vf24, 744(vi00) | nop + lq.xyzw vf25, 745(vi00) | nop + lq.xyzw vf26, 746(vi00) | nop + lq.xyzw vf07, 739(vi00) | nop + sq.xyzw vf28, 579(vi00) | nop + sq.xyzw vf29, 580(vi00) | nop + sq.xyzw vf30, 581(vi00) | nop + sq.xyzw vf24, 582(vi00) | nop + sq.xyzw vf25, 583(vi00) | nop + sq.xyzw vf26, 584(vi00) | nop + sq.xyzw vf28, 656(vi00) | nop + sq.xyzw vf29, 657(vi00) | nop + sq.xyzw vf30, 658(vi00) | nop + sq.xyzw vf24, 659(vi00) | nop + sq.xyzw vf25, 660(vi00) | nop + sq.xyzw vf26, 661(vi00) | nop + iaddi vi11, vi11, -0x2 | nop +L13: + iand vi01, vi07, vi15 | nop + iaddi vi11, vi11, -0x2 | nop + ibne vi00, vi01, L14 | nop + iadd vi15, vi15, vi15 | nop + iaddi vi08, vi10, 0x7 | nop + iaddi vi03, vi10, 0x7 | nop + iaddi vi05, vi00, 0x4 | nop + lq.xyzw vf20, 791(vi14) | nop + lq.xyzw vf22, 792(vi14) | nop + lq.xyzw vf28, 793(vi14) | nop + lq.xyzw vf21, 795(vi14) | nop + lq.xyzw vf23, 796(vi14) | nop + lq.xyzw vf29, 797(vi14) | nop + sq.xyzw vf20, 0(vi08) | nop + sq.xyzw vf22, 1(vi08) | nop + sq.xyzw vf28, 2(vi08) | nop + sq.xyzw vf21, 3(vi08) | nop + sq.xyzw vf23, 4(vi08) | nop + sq.xyzw vf29, 5(vi08) | nop + sq.xyzw vf20, 12(vi08) | nop + sq.xyzw vf22, 13(vi08) | nop + sq.xyzw vf28, 14(vi08) | nop + lq.xyzw vf20, 803(vi14) | nop + lq.xyzw vf22, 804(vi14) | nop + lq.xyzw vf28, 805(vi14) | nop + lq.xyzw vf21, 799(vi14) | nop + lq.xyzw vf23, 800(vi14) | nop + lq.xyzw vf29, 801(vi14) | nop + sq.xyzw vf20, 6(vi08) | nop + sq.xyzw vf22, 7(vi08) | nop + sq.xyzw vf28, 8(vi08) | nop + sq.xyzw vf21, 9(vi08) | nop + sq.xyzw vf23, 10(vi08) | nop + bal vi13, L39 | nop + sq.xyzw vf29, 11(vi08) | nop + ibeq vi00, vi05, L14 | nop + iaddiu vi06, vi05, 0x4000 | nop + bal vi13, L37 | nop + iaddiu vi06, vi06, 0x4000 | nop +L14: + ibgtz vi11, L13 | nop + iaddi vi14, vi14, 0x8 | nop + ior vi14, vi00, vi00 | nop + ilw.x vi11, 8(vi02) | nop + ilw.y vi07, 8(vi02) | nop + iaddi vi15, vi00, 0x1 | nop + lq.xyzw vf07, 740(vi00) | nop + iaddi vi11, vi11, -0x2 | nop +L15: + iand vi01, vi07, vi15 | nop + iaddi vi11, vi11, -0x2 | nop + ibne vi00, vi01, L16 | nop + iadd vi15, vi15, vi15 | nop + iaddi vi08, vi10, 0x7 | nop + iaddi vi03, vi10, 0x7 | nop + iaddi vi05, vi00, 0x4 | nop + lq.xyzw vf24, 794(vi14) | nop + lq.xyzw vf22, 756(vi00) | nop + lq.xyzw vf28, 793(vi14) | nop + lq.xyzw vf25, 798(vi14) | nop + lq.xyzw vf29, 797(vi14) | nop + sq.xyzw vf24, 0(vi08) | nop + sq.xyzw vf22, 1(vi08) | nop + sq.xyzw vf28, 2(vi08) | nop + sq.xyzw vf25, 3(vi08) | nop + sq.xyzw vf22, 4(vi08) | nop + sq.xyzw vf29, 5(vi08) | nop + sq.xyzw vf24, 12(vi08) | nop + sq.xyzw vf22, 13(vi08) | nop + sq.xyzw vf28, 14(vi08) | nop + lq.xyzw vf24, 806(vi14) | nop + lq.xyzw vf28, 805(vi14) | nop + lq.xyzw vf25, 802(vi14) | nop + lq.xyzw vf29, 801(vi14) | nop + sq.xyzw vf24, 6(vi08) | nop + sq.xyzw vf22, 7(vi08) | nop + sq.xyzw vf28, 8(vi08) | nop + sq.xyzw vf25, 9(vi08) | nop + sq.xyzw vf22, 10(vi08) | nop + bal vi13, L39 | nop + sq.xyzw vf29, 11(vi08) | nop + lq.xyzw vf28, 749(vi00) | nop + ibeq vi00, vi05, L16 | nop + lq.xyzw vf29, 750(vi00) | nop + lq.xyzw vf30, 751(vi00) | nop + lq.xyzw vf24, 752(vi00) | nop + lq.xyzw vf25, 753(vi00) | nop + lq.xyzw vf26, 754(vi00) | nop + sq.xyzw vf28, 0(vi10) | nop + sq.xyzw vf29, 1(vi10) | nop + sq.xyzw vf30, 2(vi10) | nop + sq.xyzw vf24, 3(vi10) | nop + sq.xyzw vf25, 4(vi10) | nop + sq.xyzw vf26, 5(vi10) | nop + iaddiu vi06, vi05, 0x4000 | nop + bal vi13, L37 | nop + iaddiu vi06, vi06, 0x4000 | nop +L16: + ibgtz vi11, L15 | nop + iaddi vi14, vi14, 0x8 | nop + nop | nop :e + nop | nop + xtop vi02 | nop + xtop vi03 | nop + ior vi04, vi00, vi00 | nop + iaddi vi08, vi10, 0x7 | nop + ilw.x vi05, 8(vi02) | nop + lq.xyzw vf08, 0(vi02) | nop + lq.xyzw vf09, 1(vi02) | nop + lq.xyzw vf10, 2(vi02) | nop + lq.xyzw vf11, 3(vi02) | nop + lq.xyzw vf12, 4(vi02) | nop + lq.xyzw vf13, 5(vi02) | nop + lq.xyzw vf14, 6(vi02) | nop + lq.xyzw vf15, 7(vi02) | nop +L17: + lq.xyzw vf16, 17(vi03) | nop + lq.xyzw vf28, 765(vi00) | nop + lq.xyzw vf29, 766(vi00) | nop + lq.xyzw vf30, 767(vi00) | nop + lq.xyzw vf31, 768(vi00) | nop + lq.xyzw vf24, 9(vi02) | mulax.xyzw ACC, vf28, vf16 + lq.xyzw vf25, 10(vi02) | madday.xyzw ACC, vf29, vf16 + lq.xyzw vf26, 11(vi02) | maddaz.xyzw ACC, vf30, vf16 + lq.xyzw vf27, 12(vi02) | maddw.xyzw vf28, vf31, vf16 + lq.xyzw vf22, 13(vi02) | mulax.xyzw ACC, vf24, vf16 + lq.xyzw vf23, 14(vi02) | madday.xyzw ACC, vf25, vf16 + lq.xyzw vf18, 15(vi02) | maddaz.xyzw ACC, vf26, vf16 + lq.xyzw vf19, 16(vi02) | maddw.xyzw vf20, vf27, vf16 + iaddi vi05, vi05, -0x1 | mulax.xyzw ACC, vf08, vf28 + nop | madday.xyzw ACC, vf09, vf28 + nop | maddaz.xyzw ACC, vf10, vf28 + nop | maddw.xyzw vf24, vf11, vf00 + nop | mulax.xyzw ACC, vf12, vf28 + nop | madday.xyzw ACC, vf13, vf28 + nop | maddaz.xyzw ACC, vf14, vf28 + erleng.xyz P, vf24 | maddw.xyzw vf28, vf15, vf00 + waitp | addz.y vf24, vf00, vf24 + nop | mul.xyzw vf28, vf28, vf01 + mfp.w vf24, P | mulax.xyzw ACC, vf22, vf16 + iaddi vi03, vi03, 0x1 | madday.xyzw ACC, vf23, vf16 + nop | maddaz.xyzw ACC, vf18, vf16 + sq.xyzw vf20, 0(vi08) | maddw.xyzw vf22, vf19, vf16 + sq.xyzw vf28, 2(vi08) | mulw.xy vf24, vf24, vf24 + sq.xyzw vf28, 792(vi04) | nop + sq.xyzw vf22, 1(vi08) | mula.xyzw ACC, vf24, vf05 + iaddi vi04, vi04, 0x2 | maddw.xyzw vf24, vf06, vf00 + iaddi vi08, vi08, 0x3 | nop + ibgtz vi05, L17 | nop + sq.xyzw vf24, 789(vi04) | nop + lq.xyzw vf31, 734(vi00) | nop + ilw.x vi05, 8(vi02) | nop + lq.xyzw vf20, 7(vi10) | nop + lq.xyzw vf22, 8(vi10) | nop + lq.xyzw vf28, 9(vi10) | nop + sq.xyzw vf20, 0(vi08) | nop + sq.xyzw vf22, 1(vi08) | nop + sq.xyzw vf28, 2(vi08) | nop + iaddi vi08, vi10, 0x7 | nop + bal vi13, L39 | nop + iaddi vi03, vi10, 0x7 | nop + lq.xyzw vf28, 741(vi00) | nop + ibeq vi00, vi05, L19 | nop + lq.xyzw vf29, 742(vi00) | nop + lq.xyzw vf30, 743(vi00) | nop + lq.xyzw vf24, 744(vi00) | nop + lq.xyzw vf25, 745(vi00) | nop + lq.xyzw vf26, 746(vi00) | nop + lq.xyzw vf07, 739(vi00) | nop + sq.xyzw vf28, 0(vi10) | nop + sq.xyzw vf29, 1(vi10) | nop + sq.xyzw vf30, 2(vi10) | nop + sq.xyzw vf24, 3(vi10) | nop + sq.xyzw vf25, 4(vi10) | nop + sq.xyzw vf26, 5(vi10) | nop + iaddiu vi06, vi05, 0x4000 | nop + bal vi13, L37 | nop + iaddiu vi06, vi06, 0x4000 | nop + ior vi03, vi00, vi00 | nop + lq.xyzw vf22, 756(vi00) | nop + ilw.x vi05, 8(vi02) | nop + iaddi vi08, vi10, 0x7 | nop +L18: + lq.xyzw vf28, 792(vi03) | nop + lq.xyzw vf24, 791(vi03) | nop + iaddi vi03, vi03, 0x2 | nop + iaddi vi05, vi05, -0x1 | nop + sq.xyzw vf22, 1(vi08) | nop + sq.xyzw vf28, 2(vi08) | nop + sq.xyzw vf24, 0(vi08) | nop + ibgtz vi05, L18 | nop + iaddi vi08, vi08, 0x3 | nop + ilw.x vi05, 8(vi02) | nop + lq.xyzw vf20, 7(vi10) | nop + lq.xyzw vf22, 8(vi10) | nop + lq.xyzw vf24, 9(vi10) | nop + sq.xyzw vf24, 0(vi08) | nop + sq.xyzw vf22, 1(vi08) | nop + sq.xyzw vf28, 2(vi08) | nop + iaddi vi08, vi10, 0x7 | nop + bal vi13, L39 | nop + iaddi vi03, vi10, 0x7 | nop + lq.xyzw vf28, 749(vi00) | nop + lq.xyzw vf29, 750(vi00) | nop + lq.xyzw vf30, 751(vi00) | nop + lq.xyzw vf24, 752(vi00) | nop + lq.xyzw vf25, 753(vi00) | nop + lq.xyzw vf26, 754(vi00) | nop + lq.xyzw vf07, 740(vi00) | nop + sq.xyzw vf28, 0(vi10) | nop + sq.xyzw vf29, 1(vi10) | nop + sq.xyzw vf30, 2(vi10) | nop + sq.xyzw vf24, 3(vi10) | nop + sq.xyzw vf25, 4(vi10) | nop + sq.xyzw vf26, 5(vi10) | nop + iaddiu vi06, vi05, 0x4000 | nop + bal vi13, L37 | nop + iaddiu vi06, vi06, 0x4000 | nop +L19: + nop | nop :e + nop | nop +L20: + ilw.x vi05, 757(vi07) | nop + ilw.y vi04, 757(vi07) | nop + iaddi vi03, vi00, 0x0 | nop + iadd vi04, vi04, vi02 | nop + iaddi vi06, vi00, 0x8 | nop + lq.xyzw vf28, 236(vi05) | nop + lq.xyzw vf29, 245(vi05) | mulax.xyzw ACC, vf12, vf28 + iaddi vi05, vi05, 0x1 | madday.xyzw ACC, vf13, vf28 + fcset 0x0 | maddaz.xyzw ACC, vf14, vf28 + nop | maddw.xyzw vf30, vf15, vf00 + div Q, vf03.x, vf30.w | mulax.xyzw ACC, vf12, vf29 + lq.xyzw vf28, 236(vi05) | madday.xyzw ACC, vf13, vf29 + lq.xyzw vf20, 317(vi03) | maddaz.xyzw ACC, vf14, vf29 + lq.xyzw vf22, 8(vi04) | maddw.xyzw vf31, vf15, vf00 + nop | mul.xyzw vf18, vf30, vf01 + waitq | mulaw.w ACC, vf30, vf00 + nop | mula.xyz ACC, vf30, Q + nop | maddw.xyzw vf16, vf02, vf00 + nop | clipw.xyz vf18, vf18 + nop | mul.xyzw vf19, vf31, vf01 + div Q, vf03.x, vf31.w | mul.xyzw vf20, vf20, Q + nop | mulax.xyzw ACC, vf12, vf28 + nop | madday.xyzw ACC, vf13, vf28 + iaddi vi13, vi00, 0x0 | clipw.xyz vf19, vf19 + iaddi vi12, vi00, 0x1 | maxy.w vf16, vf16, vf03 + lq.xyzw vf29, 245(vi05) | maddaz.xyzw ACC, vf14, vf28 + iaddi vi01, vi00, 0x0 | nop + b L23 | maddw.xyzw vf30, vf15, vf00 + iaddi vi05, vi05, 0x1 | miniz.w vf16, vf16, vf03 +L21: + iand vi13, vi10, vi12 | nop + ibeq vi00, vi01, L22 | mulaw.w ACC, vf30, vf00 + lq.xyzw vf20, 317(vi03) | mula.xyz ACC, vf30, Q + nop | addw.w vf17, vf17, vf03 +L22: + lq.xyzw vf22, 8(vi04) | maddw.xyzw vf16, vf02, vf00 + fcand vi01, 0x3ffff | mul.xyzw vf19, vf31, vf01 + div Q, vf03.x, vf31.w | mul.xyzw vf20, vf20, Q + ior vi01, vi01, vi13 | ftoi4.xyzw vf17, vf17 + iadd vi12, vi12, vi12 | maxy.w vf16, vf16, vf03 + sq.xyzw vf21, 3(vi08) | mulax.xyzw ACC, vf12, vf28 + sq.xyzw vf23, 4(vi08) | madday.xyzw ACC, vf13, vf28 + sq.xyzw vf17, 5(vi08) | clipw.xyz vf19, vf19 + lq.xyzw vf29, 245(vi05) | miniz.w vf16, vf16, vf03 + iaddi vi08, vi08, 0x6 | maddaz.xyzw ACC, vf14, vf28 + iaddi vi05, vi05, 0x1 | maddw.xyzw vf30, vf15, vf00 +L23: + ibeq vi00, vi01, L24 | mulaw.w ACC, vf31, vf00 + lq.xyzw vf21, 318(vi03) | mula.xyz ACC, vf31, Q + nop | addw.w vf16, vf16, vf03 +L24: + lq.xyzw vf23, 20(vi04) | maddw.xyzw vf17, vf02, vf00 + fcand vi01, 0x3ffff | mul.xyzw vf18, vf30, vf01 + div Q, vf03.x, vf30.w | mul.xyzw vf21, vf21, Q + iaddi vi03, vi03, 0x2 | ftoi4.xyzw vf16, vf16 + ior vi01, vi01, vi13 | nop + iaddi vi04, vi04, 0x1 | maxy.w vf17, vf17, vf03 + sq.xyzw vf20, 0(vi08) | mulax.xyzw ACC, vf12, vf29 + sq.xyzw vf22, 1(vi08) | madday.xyzw ACC, vf13, vf29 + sq.xyzw vf16, 2(vi08) | clipw.xyz vf18, vf18 + lq.xyzw vf28, 236(vi05) | miniz.w vf17, vf17, vf03 + ibgtz vi06, L21 | maddaz.xyzw ACC, vf14, vf29 + iaddi vi06, vi06, -0x1 | maddw.xyzw vf31, vf15, vf00 + ibeq vi00, vi01, L25 | nop + nop | nop + nop | addw.w vf17, vf17, vf03 +L25: + nop | ftoi4.xyzw vf17, vf17 + sq.xyzw vf21, 3(vi08) | nop + sq.xyzw vf23, 4(vi08) | nop + sq.xyzw vf17, 5(vi08) | nop + jr vi15 | nop + nop | nop +L26: + ilw.x vi05, 757(vi07) | nop + ilw.y vi04, 757(vi07) | nop + iaddi vi03, vi00, 0x0 | nop + iadd vi04, vi04, vi02 | nop + iaddi vi06, vi00, 0x8 | nop + lq.xyzw vf28, 236(vi05) | nop + lq.xyzw vf29, 245(vi05) | mulax.xyzw ACC, vf12, vf28 + iaddi vi05, vi05, 0x1 | madday.xyzw ACC, vf13, vf28 + fcset 0x0 | maddaz.xyzw ACC, vf14, vf28 + nop | maddw.xyzw vf30, vf15, vf00 + nop | mulax.xyzw ACC, vf08, vf28 + nop | madday.xyzw ACC, vf09, vf28 + nop | maddaz.xyzw ACC, vf10, vf28 + nop | maddw.xyzw vf26, vf11, vf00 + lq.xyzw vf20, 317(vi03) | mulax.xyzw ACC, vf12, vf29 + lq.xyzw vf22, 8(vi04) | madday.xyzw ACC, vf13, vf29 + div Q, vf03.x, vf30.w | maddaz.xyzw ACC, vf14, vf29 + erleng.xyz P, vf26 | maddw.xyzw vf31, vf15, vf00 + nop | mulax.xyzw ACC, vf08, vf29 + nop | madday.xyzw ACC, vf09, vf29 + lq.xyzw vf28, 236(vi05) | maddaz.xyzw ACC, vf10, vf29 + lq.xyzw vf29, 245(vi05) | maddw.xyzw vf27, vf11, vf00 + nop | mul.xyzw vf18, vf30, vf01 + nop | mul.xyzw vf19, vf31, vf01 + nop | mulaw.w ACC, vf30, vf00 + nop | mula.xyz ACC, vf30, Q + nop | maddw.xyzw vf16, vf02, vf00 + div Q, vf03.x, vf31.w | mul.xyzw vf20, vf20, Q + nop | addz.y vf26, vf00, vf26 + waitp | maxy.w vf16, vf16, vf03 + mfp.w vf26, P | mulax.xyzw ACC, vf12, vf28 + erleng.xyz P, vf27 | madday.xyzw ACC, vf13, vf28 + iaddi vi12, vi00, 0x1 | maddaz.xyzw ACC, vf14, vf28 + iaddi vi01, vi00, 0x0 | maddw.xyzw vf30, vf15, vf00 + iaddi vi13, vi00, 0x0 | mulw.xy vf24, vf26, vf26 + iaddi vi11, vi00, 0x0 | miniz.w vf16, vf16, vf03 + iaddi vi14, vi00, 0x0 | addz.y vf27, vf00, vf27 + nop | mulax.xyzw ACC, vf08, vf28 + nop | madday.xyzw ACC, vf09, vf28 + nop | maddaz.xyzw ACC, vf10, vf28 + nop | maddw.xyzw vf26, vf11, vf00 + nop | clipw.xyz vf18, vf18 + waitp | clipw.xyz vf19, vf19 + b L29 | mula.xyzw ACC, vf24, vf05 + iaddi vi05, vi05, 0x1 | maddw.xyzw vf24, vf06, vf00 +L27: + ibeq vi00, vi01, L28 | mulaw.w ACC, vf30, vf00 + lq.xyzw vf20, 317(vi03) | mula.xyz ACC, vf30, Q + ibne vi00, vi13, L28 | addw.w vf17, vf17, vf03 + fcor vi01, 0x7df7ff | nop + isw.x vi12, 775(vi14) | nop + ibne vi00, vi01, L28 | nop + fcor vi01, 0xdf7dff | nop + isw.y vi05, 775(vi14) | nop + ibne vi00, vi01, L28 | nop + fcor vi01, 0xefbeff | nop + ilw.z vi11, 757(vi07) | nop + ibne vi00, vi01, L28 | nop + fcor vi01, 0xf7df7f | nop + isw.z vi04, 775(vi14) | nop + ibne vi00, vi01, L28 | nop + fcor vi01, 0xfbefbf | nop + isub vi11, vi05, vi11 | nop + ibne vi00, vi01, L28 | nop + nop | nop + ibltz vi11, L28 | nop + nop | nop + iaddi vi14, vi14, 0x1 | nop +L28: + lq.xyzw vf22, 8(vi04) | maddw.xyzw vf16, vf02, vf00 + div Q, vf03.x, vf31.w | mul.xyzw vf20, vf20, Q + fcand vi01, 0x3ffff | mul.xyzw vf19, vf31, vf01 + waitp | ftoi4.xyzw vf17, vf17 + mfp.w vf26, P | maxy.w vf16, vf16, vf03 + erleng.xyz P, vf27 | clipw.xyz vf19, vf19 + iand vi13, vi10, vi12 | addz.y vf27, vf00, vf27 + sq.xyzw vf21, 3(vi08) | mulz.xyzw vf25, vf25, vf21 + sq.xyzw vf23, 4(vi08) | mulw.xy vf24, vf26, vf26 + sq.xyzw vf17, 5(vi08) | mulax.xyzw ACC, vf12, vf28 + sq.xyzw vf17, 66(vi08) | madday.xyzw ACC, vf13, vf28 + sq.xyzw vf25, 64(vi08) | maddaz.xyzw ACC, vf14, vf28 + iaddi vi08, vi08, 0x6 | maddw.xyzw vf30, vf15, vf00 + iadd vi12, vi12, vi12 | mulax.xyzw ACC, vf08, vf28 + ior vi01, vi01, vi13 | madday.xyzw ACC, vf09, vf28 + nop | maddaz.xyzw ACC, vf10, vf28 + nop | maddw.xyzw vf26, vf11, vf00 + lq.xyzw vf29, 245(vi05) | miniz.w vf16, vf16, vf03 + iaddi vi05, vi05, 0x1 | mula.xyzw ACC, vf24, vf05 + nop | maddw.xyzw vf24, vf06, vf00 +L29: + ibeq vi00, vi01, L30 | mulaw.w ACC, vf31, vf00 + lq.xyzw vf21, 318(vi03) | mula.xyz ACC, vf31, Q + ibne vi00, vi13, L30 | addw.w vf16, vf16, vf03 + fcor vi01, 0x7df7ff | nop + isw.x vi00, 775(vi14) | nop + ibne vi00, vi01, L30 | nop + fcor vi01, 0xdf7dff | nop + isw.y vi05, 775(vi14) | nop + ibne vi00, vi01, L30 | nop + fcor vi01, 0xefbeff | nop + isw.z vi04, 775(vi14) | nop + ibne vi00, vi01, L30 | nop + fcor vi01, 0xf7df7f | nop + nop | nop + ibne vi00, vi01, L30 | nop + fcor vi01, 0xfbefbf | nop + nop | nop + ibne vi00, vi01, L30 | nop + nop | nop + iaddi vi14, vi14, 0x1 | nop +L30: + lq.xyzw vf23, 20(vi04) | maddw.xyzw vf17, vf02, vf00 + div Q, vf03.x, vf30.w | mul.xyzw vf21, vf21, Q + fcand vi01, 0x3ffff | mul.xyzw vf18, vf30, vf01 + waitp | ftoi4.xyzw vf16, vf16 + mfp.w vf27, P | maxy.w vf17, vf17, vf03 + erleng.xyz P, vf26 | clipw.xyz vf18, vf18 + nop | addz.y vf26, vf00, vf26 + sq.xyzw vf20, 0(vi08) | mulz.xyzw vf24, vf24, vf20 + sq.xyzw vf22, 1(vi08) | mulw.xy vf25, vf27, vf27 + sq.xyzw vf16, 2(vi08) | mulax.xyzw ACC, vf12, vf29 + sq.xyzw vf16, 63(vi08) | madday.xyzw ACC, vf13, vf29 + sq.xyzw vf24, 61(vi08) | maddaz.xyzw ACC, vf14, vf29 + iaddi vi04, vi04, 0x1 | maddw.xyzw vf31, vf15, vf00 + iaddi vi03, vi03, 0x2 | mulax.xyzw ACC, vf08, vf29 + ior vi01, vi01, vi13 | madday.xyzw ACC, vf09, vf29 + nop | maddaz.xyzw ACC, vf10, vf29 + nop | maddw.xyzw vf27, vf11, vf00 + lq.xyzw vf28, 236(vi05) | miniz.w vf17, vf17, vf03 + ibgtz vi06, L27 | mula.xyzw ACC, vf25, vf05 + iaddi vi06, vi06, -0x1 | maddw.xyzw vf25, vf06, vf00 + ibeq vi00, vi01, L31 | nop + nop | nop + ibne vi00, vi13, L31 | addw.w vf17, vf17, vf03 + fcor vi01, 0x7df7ff | nop + isw.x vi12, 775(vi14) | nop + ibne vi00, vi01, L31 | nop + fcor vi01, 0xdf7dff | nop + isw.y vi05, 775(vi14) | nop + ibne vi00, vi01, L31 | nop + fcor vi01, 0xefbeff | nop + isw.z vi04, 775(vi14) | nop + ibne vi00, vi01, L31 | nop + fcor vi01, 0xf7df7f | nop + nop | nop + ibne vi00, vi01, L31 | nop + fcor vi01, 0xfbefbf | nop + nop | nop + ibne vi00, vi01, L31 | nop + nop | nop + iaddi vi14, vi14, 0x1 | nop +L31: + nop | ftoi4.xyzw vf17, vf17 + sq.xyzw vf21, 3(vi08) | mulz.xyzw vf25, vf25, vf21 + sq.xyzw vf23, 4(vi08) | nop + sq.xyzw vf17, 5(vi08) | nop + sq.xyzw vf17, 66(vi08) | nop + sq.xyzw vf25, 64(vi08) | nop + jr vi15 | nop + nop | nop +L32: + lq.xyzw vf31, 734(vi00) | nop + iaddiu vi10, vi00, 0x243 | nop +L33: + iaddi vi14, vi14, -0x1 | nop + iaddi vi08, vi10, 0x7 | nop + ilw.x vi12, 775(vi14) | nop + ilw.y vi05, 775(vi14) | nop + ilw.z vi04, 775(vi14) | nop + ibne vi00, vi12, L34 | nop + nop | nop + lq.xyzw vf28, 233(vi05) | nop + lq.xyzw vf29, 242(vi05) | nop + lq.xyzw vf30, 234(vi05) | nop + lq.xyzw vf22, 7(vi04) | nop + lq.xyzw vf23, 19(vi04) | mulax.xyzw ACC, vf08, vf28 + lq.xyzw vf16, 8(vi04) | madday.xyzw ACC, vf09, vf28 + lq.xyzw vf20, 317(vi00) | maddaz.xyzw ACC, vf10, vf28 + lq.xyzw vf21, 318(vi00) | maddw.xyzw vf24, vf11, vf00 + b L35 | mulax.xyzw ACC, vf12, vf28 + lq.xyzw vf07, 319(vi00) | madday.xyzw ACC, vf13, vf28 +L34: + lq.xyzw vf28, 242(vi05) | nop + lq.xyzw vf29, 234(vi05) | nop + lq.xyzw vf30, 243(vi05) | nop + lq.xyzw vf22, 18(vi04) | nop + lq.xyzw vf23, 7(vi04) | mulax.xyzw ACC, vf08, vf28 + lq.xyzw vf16, 19(vi04) | madday.xyzw ACC, vf09, vf28 + lq.xyzw vf20, 318(vi00) | maddaz.xyzw ACC, vf10, vf28 + lq.xyzw vf21, 319(vi00) | maddw.xyzw vf24, vf11, vf00 + nop | mulax.xyzw ACC, vf12, vf28 + lq.xyzw vf07, 320(vi00) | madday.xyzw ACC, vf13, vf28 +L35: + nop | maddaz.xyzw ACC, vf14, vf28 + erleng.xyz P, vf24 | maddw.xyzw vf28, vf15, vf00 + nop | addz.y vf24, vf00, vf24 + nop | itof0.xyzw vf22, vf22 + nop | itof0.xyzw vf23, vf23 + nop | itof0.xyzw vf16, vf16 + sq.xyzw vf20, 0(vi08) | mulax.xyzw ACC, vf08, vf29 + sq.xyzw vf22, 1(vi08) | madday.xyzw ACC, vf09, vf29 + sq.xyzw vf21, 3(vi08) | maddaz.xyzw ACC, vf10, vf29 + sq.xyzw vf23, 4(vi08) | maddw.xyzw vf25, vf11, vf00 + sq.xyzw vf07, 6(vi08) | mulax.xyzw ACC, vf12, vf29 + sq.xyzw vf16, 7(vi08) | madday.xyzw ACC, vf13, vf29 + sq.xyzw vf20, 9(vi08) | maddaz.xyzw ACC, vf14, vf29 + sq.xyzw vf22, 10(vi08) | maddw.xyzw vf29, vf15, vf00 + waitp | mul.xyzw vf28, vf28, vf01 + mfp.w vf24, P | nop + erleng.xyz P, vf25 | nop + nop | addz.y vf25, vf00, vf25 + sq.xyzw vf28, 2(vi08) | mulax.xyzw ACC, vf08, vf30 + sq.xyzw vf28, 11(vi08) | mulw.xy vf24, vf24, vf24 + sq.xyzw vf28, 772(vi00) | madday.xyzw ACC, vf09, vf30 + nop | maddaz.xyzw ACC, vf10, vf30 + nop | maddw.xyzw vf26, vf11, vf00 + nop | mula.xyzw ACC, vf24, vf05 + nop | maddw.xyzw vf24, vf06, vf00 + nop | mulax.xyzw ACC, vf12, vf30 + nop | madday.xyzw ACC, vf13, vf30 + nop | maddaz.xyzw ACC, vf14, vf30 + sq.xyzw vf24, 769(vi00) | maddw.xyzw vf30, vf15, vf00 + waitp | mul.xyzw vf29, vf29, vf01 + mfp.w vf25, P | nop + erleng.xyz P, vf26 | nop + nop | addz.y vf26, vf00, vf26 + sq.xyzw vf29, 5(vi08) | nop + sq.xyzw vf29, 773(vi00) | mulw.xy vf25, vf25, vf25 + nop | mula.xyzw ACC, vf25, vf05 + nop | maddw.xyzw vf25, vf06, vf00 + waitp | mul.xyzw vf30, vf30, vf01 + mfp.w vf26, P | nop + sq.xyzw vf30, 8(vi08) | nop + sq.xyzw vf30, 774(vi00) | mulw.xy vf26, vf26, vf26 + sq.xyzw vf25, 770(vi00) | mula.xyzw ACC, vf26, vf05 + lq.xyzw vf07, 739(vi00) | maddw.xyzw vf26, vf06, vf00 + ior vi03, vi08, vi00 | nop + iaddi vi05, vi00, 0x3 | nop + bal vi13, L39 | nop + sq.xyzw vf26, 771(vi00) | nop + lq.xyzw vf28, 741(vi00) | nop + ibeq vi00, vi05, L36 | nop + lq.xyzw vf29, 742(vi00) | nop + lq.xyzw vf30, 743(vi00) | nop + lq.xyzw vf24, 744(vi00) | nop + lq.xyzw vf25, 745(vi00) | nop + lq.xyzw vf26, 746(vi00) | nop + sq.xyzw vf28, 0(vi10) | nop + sq.xyzw vf29, 1(vi10) | nop + sq.xyzw vf30, 2(vi10) | nop + sq.xyzw vf24, 3(vi10) | nop + sq.xyzw vf25, 4(vi10) | nop + sq.xyzw vf26, 5(vi10) | nop + iaddiu vi06, vi05, 0x4000 | nop + bal vi13, L37 | nop + iaddiu vi06, vi06, 0x4000 | nop + iaddi vi08, vi10, 0x7 | nop + lq.xyzw vf24, 769(vi00) | nop + lq.xyzw vf25, 770(vi00) | nop + lq.xyzw vf26, 771(vi00) | nop + lq.xyzw vf22, 756(vi00) | nop + lq.xyzw vf28, 772(vi00) | nop + lq.xyzw vf29, 773(vi00) | nop + lq.xyzw vf30, 774(vi00) | nop + sq.xyzw vf24, 0(vi08) | nop + sq.xyzw vf22, 1(vi08) | nop + sq.xyzw vf28, 2(vi08) | nop + sq.xyzw vf25, 3(vi08) | nop + sq.xyzw vf22, 4(vi08) | nop + sq.xyzw vf29, 5(vi08) | nop + sq.xyzw vf26, 6(vi08) | nop + sq.xyzw vf22, 7(vi08) | nop + sq.xyzw vf30, 8(vi08) | nop + sq.xyzw vf24, 9(vi08) | nop + sq.xyzw vf22, 10(vi08) | nop + sq.xyzw vf28, 11(vi08) | nop + ior vi03, vi08, vi00 | nop + iaddi vi05, vi00, 0x3 | nop + bal vi13, L39 | nop + lq.xyzw vf07, 740(vi00) | nop + lq.xyzw vf28, 749(vi00) | nop + lq.xyzw vf29, 750(vi00) | nop + lq.xyzw vf30, 751(vi00) | nop + lq.xyzw vf24, 752(vi00) | nop + lq.xyzw vf25, 753(vi00) | nop + lq.xyzw vf26, 754(vi00) | nop + sq.xyzw vf28, 0(vi10) | nop + sq.xyzw vf29, 1(vi10) | nop + sq.xyzw vf30, 2(vi10) | nop + sq.xyzw vf24, 3(vi10) | nop + sq.xyzw vf25, 4(vi10) | nop + sq.xyzw vf26, 5(vi10) | nop + iaddiu vi06, vi05, 0x4000 | nop + bal vi13, L37 | nop + iaddiu vi06, vi06, 0x4000 | nop +L36: + ibgtz vi14, L33 | nop + nop | nop + jr vi15 | nop + nop | nop +L37: + sq.xyzw vf07, -1(vi08) | nop + isw.x vi06, -1(vi08) | nop +L38: + lqi.xyzw vf24, vi08 | nop + lqi.xyzw vf27, vi08 | nop + lqi.xyzw vf21, vi08 | nop + nop | nop + nop | nop + nop | nop + div Q, vf00.w, vf21.w | mul.xyzw vf21, vf21, vf31 + nop | nop + nop | nop + nop | nop + nop | nop + nop | nop + nop | nop + nop | mul.xyz vf21, vf21, Q + nop | mul.xyzw vf24, vf24, Q + nop | nop + nop | nop + nop | add.xyzw vf21, vf21, vf02 + nop | nop + nop | nop + nop | nop + nop | maxy.w vf21, vf21, vf03 + nop | nop + nop | nop + nop | nop + nop | miniz.w vf21, vf21, vf03 + nop | nop + nop | nop + nop | ftoi0.xyzw vf27, vf27 + nop | ftoi4.xyzw vf21, vf21 + nop | nop + sq.xyzw vf24, -3(vi08) | nop + sq.xyzw vf27, -2(vi08) | nop + sq.xyzw vf21, -1(vi08) | nop + iaddi vi05, vi05, -0x1 | nop + nop | nop + ibne vi00, vi05, L38 | nop + nop | nop + iaddiu vi01, vi00, 0x4d3 | nop + xgkick vi10 | nop + jr vi13 | nop + isub vi10, vi01, vi10 | nop +L39: + ior vi04, vi03, vi00 | nop + lq.xyzw vf21, 2(vi03) | nop + ior vi06, vi05, vi00 | nop + lq.xyzw vf24, 0(vi03) | nop + lq.xyzw vf27, 1(vi03) | nop + iaddi vi03, vi03, 0x3 | clipw.xyz vf21, vf21 +L40: + lq.xyzw vf22, 2(vi03) | nop + lq.xyzw vf25, 0(vi03) | nop + lq.xyzw vf28, 1(vi03) | nop + iaddi vi03, vi03, 0x3 | nop + nop | clipw.xyz vf22, vf22 + nop | nop + nop | nop + nop | nop + fcor vi01, 0xfff7df | nop + ibne vi00, vi01, L51 | nop + fcand vi01, 0x20 | nop + ibne vi00, vi01, L52 | nop + fcand vi01, 0x800 | nop + ibne vi00, vi01, L53 | nop + nop | nop + sqi.xyzw vf24, vi04 | nop + sqi.xyzw vf27, vi04 | nop + sqi.xyzw vf21, vi04 | nop +L41: + move.xyzw vf24, vf25 | nop + iaddi vi05, vi05, -0x1 | nop + move.xyzw vf27, vf28 | nop + ibne vi00, vi05, L40 | nop + move.xyzw vf21, vf22 | nop + lq.xyzw vf24, 0(vi08) | nop + lq.xyzw vf27, 1(vi08) | nop + lq.xyzw vf21, 2(vi08) | nop + ior vi03, vi08, vi00 | nop + sqi.xyzw vf24, vi04 | nop + sqi.xyzw vf27, vi04 | nop + sqi.xyzw vf21, vi04 | nop + ibeq vi00, vi06, L50 | nop + ior vi05, vi06, vi00 | nop + ior vi04, vi03, vi00 | nop + lq.xyzw vf21, 2(vi03) | nop + ior vi06, vi05, vi00 | nop + lq.xyzw vf24, 0(vi03) | nop + lq.xyzw vf27, 1(vi03) | nop + iaddi vi03, vi03, 0x3 | clipw.xyz vf21, vf21 +L42: + lq.xyzw vf22, 2(vi03) | nop + lq.xyzw vf25, 0(vi03) | nop + lq.xyzw vf28, 1(vi03) | nop + iaddi vi03, vi03, 0x3 | nop + nop | clipw.xyz vf22, vf22 + nop | nop + nop | nop + nop | nop + fcor vi01, 0xfffdf7 | nop + ibne vi00, vi01, L54 | nop + fcand vi01, 0x8 | nop + ibne vi00, vi01, L55 | nop + fcand vi01, 0x200 | nop + ibne vi00, vi01, L56 | nop + nop | nop + sqi.xyzw vf24, vi04 | nop + sqi.xyzw vf27, vi04 | nop + sqi.xyzw vf21, vi04 | nop +L43: + move.xyzw vf24, vf25 | nop + iaddi vi05, vi05, -0x1 | nop + move.xyzw vf27, vf28 | nop + ibne vi00, vi05, L42 | nop + move.xyzw vf21, vf22 | nop + lq.xyzw vf24, 0(vi08) | nop + lq.xyzw vf27, 1(vi08) | nop + lq.xyzw vf21, 2(vi08) | nop + ior vi03, vi08, vi00 | nop + sqi.xyzw vf24, vi04 | nop + sqi.xyzw vf27, vi04 | nop + sqi.xyzw vf21, vi04 | nop + ibeq vi00, vi06, L50 | nop + ior vi05, vi06, vi00 | nop + ior vi04, vi03, vi00 | nop + lq.xyzw vf21, 2(vi03) | nop + ior vi06, vi05, vi00 | nop + lq.xyzw vf24, 0(vi03) | nop + lq.xyzw vf27, 1(vi03) | nop + iaddi vi03, vi03, 0x3 | clipw.xyz vf21, vf21 +L44: + lq.xyzw vf22, 2(vi03) | nop + lq.xyzw vf25, 0(vi03) | nop + lq.xyzw vf28, 1(vi03) | nop + iaddi vi03, vi03, 0x3 | nop + nop | clipw.xyz vf22, vf22 + nop | nop + nop | nop + nop | nop + fcor vi01, 0xfffefb | nop + ibne vi00, vi01, L57 | nop + fcand vi01, 0x4 | nop + ibne vi00, vi01, L58 | nop + fcand vi01, 0x100 | nop + ibne vi00, vi01, L59 | nop + nop | nop + sqi.xyzw vf24, vi04 | nop + sqi.xyzw vf27, vi04 | nop + sqi.xyzw vf21, vi04 | nop +L45: + move.xyzw vf24, vf25 | nop + iaddi vi05, vi05, -0x1 | nop + move.xyzw vf27, vf28 | nop + ibne vi00, vi05, L44 | nop + move.xyzw vf21, vf22 | nop + lq.xyzw vf24, 0(vi08) | nop + lq.xyzw vf27, 1(vi08) | nop + lq.xyzw vf21, 2(vi08) | nop + ior vi03, vi08, vi00 | nop + sqi.xyzw vf24, vi04 | nop + sqi.xyzw vf27, vi04 | nop + sqi.xyzw vf21, vi04 | nop + ibeq vi00, vi06, L50 | nop + ior vi05, vi06, vi00 | nop + ior vi04, vi03, vi00 | nop + lq.xyzw vf21, 2(vi03) | nop + ior vi06, vi05, vi00 | nop + lq.xyzw vf24, 0(vi03) | nop + lq.xyzw vf27, 1(vi03) | nop + iaddi vi03, vi03, 0x3 | clipw.xyz vf21, vf21 +L46: + lq.xyzw vf22, 2(vi03) | nop + lq.xyzw vf25, 0(vi03) | nop + lq.xyzw vf28, 1(vi03) | nop + iaddi vi03, vi03, 0x3 | nop + nop | clipw.xyz vf22, vf22 + nop | nop + nop | nop + nop | nop + fcor vi01, 0xffff7d | nop + ibne vi00, vi01, L60 | nop + fcand vi01, 0x2 | nop + ibne vi00, vi01, L61 | nop + fcand vi01, 0x80 | nop + ibne vi00, vi01, L62 | nop + nop | nop + sqi.xyzw vf24, vi04 | nop + sqi.xyzw vf27, vi04 | nop + sqi.xyzw vf21, vi04 | nop +L47: + move.xyzw vf24, vf25 | nop + iaddi vi05, vi05, -0x1 | nop + move.xyzw vf27, vf28 | nop + ibne vi00, vi05, L46 | nop + move.xyzw vf21, vf22 | nop + lq.xyzw vf24, 0(vi08) | nop + lq.xyzw vf27, 1(vi08) | nop + lq.xyzw vf21, 2(vi08) | nop + ior vi03, vi08, vi00 | nop + sqi.xyzw vf24, vi04 | nop + sqi.xyzw vf27, vi04 | nop + sqi.xyzw vf21, vi04 | nop + ibeq vi00, vi06, L50 | nop + ior vi05, vi06, vi00 | nop + ior vi04, vi03, vi00 | nop + lq.xyzw vf21, 2(vi03) | nop + ior vi06, vi05, vi00 | nop + lq.xyzw vf24, 0(vi03) | nop + lq.xyzw vf27, 1(vi03) | nop + iaddi vi03, vi03, 0x3 | clipw.xyz vf21, vf21 +L48: + lq.xyzw vf22, 2(vi03) | nop + lq.xyzw vf25, 0(vi03) | nop + lq.xyzw vf28, 1(vi03) | nop + iaddi vi03, vi03, 0x3 | nop + nop | clipw.xyz vf22, vf22 + nop | nop + nop | nop + nop | nop + fcor vi01, 0xffffbe | nop + ibne vi00, vi01, L63 | nop + fcand vi01, 0x1 | nop + ibne vi00, vi01, L64 | nop + fcand vi01, 0x40 | nop + ibne vi00, vi01, L65 | nop + nop | nop + sqi.xyzw vf24, vi04 | nop + sqi.xyzw vf27, vi04 | nop + sqi.xyzw vf21, vi04 | nop +L49: + move.xyzw vf24, vf25 | nop + iaddi vi05, vi05, -0x1 | nop + move.xyzw vf27, vf28 | nop + ibne vi00, vi05, L48 | nop + move.xyzw vf21, vf22 | nop + lq.xyzw vf24, 0(vi08) | nop + lq.xyzw vf27, 1(vi08) | nop + lq.xyzw vf21, 2(vi08) | nop + ior vi03, vi08, vi00 | nop + sqi.xyzw vf24, vi04 | nop + sqi.xyzw vf27, vi04 | nop + sqi.xyzw vf21, vi04 | nop + ibeq vi00, vi06, L50 | nop + ior vi05, vi06, vi00 | nop +L50: + jr vi13 | nop + nop | nop +L51: + b L41 | nop + iaddi vi06, vi06, -0x1 | nop +L52: + sqi.xyzw vf24, vi04 | sub.xyzw vf23, vf22, vf21 + sqi.xyzw vf27, vi04 | sub.xyzw vf26, vf25, vf24 + sqi.xyzw vf21, vi04 | sub.xyzw vf29, vf28, vf27 + ibeq vi03, vi04, L41 | nop + nop | addz.w vf30, vf23, vf23 + nop | addw.z vf30, vf21, vf21 + div Q, vf30.z, vf30.w | nop + waitq | nop + nop | mul.xyzw vf26, vf26, Q + nop | mul.xyzw vf29, vf29, Q + nop | mul.xyzw vf23, vf23, Q + nop | sub.xyzw vf26, vf24, vf26 + nop | sub.xyzw vf29, vf27, vf29 + nop | sub.xyzw vf23, vf21, vf23 + iaddi vi06, vi06, 0x1 | nop + sqi.xyzw vf26, vi04 | nop + sqi.xyzw vf29, vi04 | nop + b L41 | nop + sqi.xyzw vf23, vi04 | nop +L53: + nop | sub.xyzw vf23, vf21, vf22 + nop | sub.xyzw vf26, vf24, vf25 + nop | sub.xyzw vf29, vf27, vf28 + nop | addz.w vf30, vf23, vf23 + nop | addw.z vf30, vf22, vf22 + div Q, vf30.z, vf30.w | nop + waitq | nop + nop | mul.xyzw vf26, vf26, Q + nop | mul.xyzw vf29, vf29, Q + nop | mul.xyzw vf23, vf23, Q + nop | sub.xyzw vf26, vf25, vf26 + nop | sub.xyzw vf29, vf28, vf29 + nop | sub.xyzw vf23, vf22, vf23 + sqi.xyzw vf26, vi04 | nop + sqi.xyzw vf29, vi04 | nop + b L41 | nop + sqi.xyzw vf23, vi04 | nop +L54: + b L43 | nop + iaddi vi06, vi06, -0x1 | nop +L55: + sqi.xyzw vf24, vi04 | sub.xyzw vf23, vf22, vf21 + sqi.xyzw vf27, vi04 | sub.xyzw vf26, vf25, vf24 + sqi.xyzw vf21, vi04 | sub.xyzw vf29, vf28, vf27 + ibeq vi03, vi04, L43 | nop + nop | addy.w vf30, vf23, vf23 + nop | addw.y vf30, vf21, vf21 + div Q, vf30.y, vf30.w | nop + waitq | nop + nop | mul.xyzw vf26, vf26, Q + nop | mul.xyzw vf29, vf29, Q + nop | mul.xyzw vf23, vf23, Q + nop | sub.xyzw vf26, vf24, vf26 + nop | sub.xyzw vf29, vf27, vf29 + nop | sub.xyzw vf23, vf21, vf23 + iaddi vi06, vi06, 0x1 | nop + sqi.xyzw vf26, vi04 | nop + sqi.xyzw vf29, vi04 | nop + b L43 | nop + sqi.xyzw vf23, vi04 | nop +L56: + nop | sub.xyzw vf23, vf21, vf22 + nop | sub.xyzw vf26, vf24, vf25 + nop | sub.xyzw vf29, vf27, vf28 + nop | addy.w vf30, vf23, vf23 + nop | addw.y vf30, vf22, vf22 + div Q, vf30.y, vf30.w | nop + waitq | nop + nop | mul.xyzw vf26, vf26, Q + nop | mul.xyzw vf29, vf29, Q + nop | mul.xyzw vf23, vf23, Q + nop | sub.xyzw vf26, vf25, vf26 + nop | sub.xyzw vf29, vf28, vf29 + nop | sub.xyzw vf23, vf22, vf23 + sqi.xyzw vf26, vi04 | nop + sqi.xyzw vf29, vi04 | nop + b L43 | nop + sqi.xyzw vf23, vi04 | nop +L57: + b L45 | nop + iaddi vi06, vi06, -0x1 | nop +L58: + sqi.xyzw vf24, vi04 | sub.xyzw vf23, vf22, vf21 + sqi.xyzw vf27, vi04 | sub.xyzw vf26, vf25, vf24 + sqi.xyzw vf21, vi04 | sub.xyzw vf29, vf28, vf27 + ibeq vi03, vi04, L45 | nop + nop | suby.w vf30, vf23, vf23 + nop | subw.y vf30, vf21, vf21 + div Q, vf30.y, vf30.w | nop + waitq | nop + nop | mul.xyzw vf26, vf26, Q + nop | mul.xyzw vf29, vf29, Q + nop | mul.xyzw vf23, vf23, Q + nop | add.xyzw vf26, vf24, vf26 + nop | add.xyzw vf29, vf27, vf29 + nop | add.xyzw vf23, vf21, vf23 + iaddi vi06, vi06, 0x1 | nop + sqi.xyzw vf26, vi04 | nop + sqi.xyzw vf29, vi04 | nop + b L45 | nop + sqi.xyzw vf23, vi04 | nop +L59: + nop | sub.xyzw vf23, vf21, vf22 + nop | sub.xyzw vf26, vf24, vf25 + nop | sub.xyzw vf29, vf27, vf28 + nop | suby.w vf30, vf23, vf23 + nop | subw.y vf30, vf22, vf22 + div Q, vf30.y, vf30.w | nop + waitq | nop + nop | mul.xyzw vf26, vf26, Q + nop | mul.xyzw vf29, vf29, Q + nop | mul.xyzw vf23, vf23, Q + nop | add.xyzw vf26, vf25, vf26 + nop | add.xyzw vf29, vf28, vf29 + nop | add.xyzw vf23, vf22, vf23 + sqi.xyzw vf26, vi04 | nop + sqi.xyzw vf29, vi04 | nop + b L45 | nop + sqi.xyzw vf23, vi04 | nop +L60: + b L47 | nop + iaddi vi06, vi06, -0x1 | nop +L61: + sqi.xyzw vf24, vi04 | sub.xyzw vf23, vf22, vf21 + sqi.xyzw vf27, vi04 | sub.xyzw vf26, vf25, vf24 + sqi.xyzw vf21, vi04 | sub.xyzw vf29, vf28, vf27 + ibeq vi03, vi04, L47 | nop + nop | addx.w vf30, vf23, vf23 + nop | addw.x vf30, vf21, vf21 + div Q, vf30.x, vf30.w | nop + waitq | nop + nop | mul.xyzw vf26, vf26, Q + nop | mul.xyzw vf29, vf29, Q + nop | mul.xyzw vf23, vf23, Q + nop | sub.xyzw vf26, vf24, vf26 + nop | sub.xyzw vf29, vf27, vf29 + nop | sub.xyzw vf23, vf21, vf23 + iaddi vi06, vi06, 0x1 | nop + sqi.xyzw vf26, vi04 | nop + sqi.xyzw vf29, vi04 | nop + b L47 | nop + sqi.xyzw vf23, vi04 | nop +L62: + nop | sub.xyzw vf23, vf21, vf22 + nop | sub.xyzw vf26, vf24, vf25 + nop | sub.xyzw vf29, vf27, vf28 + nop | addx.w vf30, vf23, vf23 + nop | addw.x vf30, vf22, vf22 + div Q, vf30.x, vf30.w | nop + waitq | nop + nop | mul.xyzw vf26, vf26, Q + nop | mul.xyzw vf29, vf29, Q + nop | mul.xyzw vf23, vf23, Q + nop | sub.xyzw vf26, vf25, vf26 + nop | sub.xyzw vf29, vf28, vf29 + nop | sub.xyzw vf23, vf22, vf23 + sqi.xyzw vf26, vi04 | nop + sqi.xyzw vf29, vi04 | nop + b L47 | nop + sqi.xyzw vf23, vi04 | nop +L63: + b L49 | nop + iaddi vi06, vi06, -0x1 | nop +L64: + sqi.xyzw vf24, vi04 | sub.xyzw vf23, vf22, vf21 + sqi.xyzw vf27, vi04 | sub.xyzw vf26, vf25, vf24 + sqi.xyzw vf21, vi04 | sub.xyzw vf29, vf28, vf27 + ibeq vi03, vi04, L49 | nop + nop | subx.w vf30, vf23, vf23 + nop | subw.x vf30, vf21, vf21 + div Q, vf30.x, vf30.w | nop + waitq | nop + nop | mul.xyzw vf26, vf26, Q + nop | mul.xyzw vf29, vf29, Q + nop | mul.xyzw vf23, vf23, Q + nop | add.xyzw vf26, vf24, vf26 + nop | add.xyzw vf29, vf27, vf29 + nop | add.xyzw vf23, vf21, vf23 + iaddi vi06, vi06, 0x1 | nop + sqi.xyzw vf26, vi04 | nop + sqi.xyzw vf29, vi04 | nop + b L49 | nop + sqi.xyzw vf23, vi04 | nop +L65: + nop | sub.xyzw vf23, vf21, vf22 + nop | sub.xyzw vf26, vf24, vf25 + nop | sub.xyzw vf29, vf27, vf28 + nop | subx.w vf30, vf23, vf23 + nop | subw.x vf30, vf22, vf22 + div Q, vf30.x, vf30.w | nop + waitq | nop + nop | mul.xyzw vf26, vf26, Q + nop | mul.xyzw vf29, vf29, Q + nop | mul.xyzw vf23, vf23, Q + nop | add.xyzw vf26, vf25, vf26 + nop | add.xyzw vf29, vf28, vf29 + nop | add.xyzw vf23, vf22, vf23 + sqi.xyzw vf26, vi04 | nop + sqi.xyzw vf29, vi04 | nop + b L49 | nop + sqi.xyzw vf23, vi04 | nop diff --git a/test/decompiler/vu_reference/ocean-mid.txt b/test/decompiler/vu_reference/ocean-mid.txt new file mode 100644 index 000000000..78b6384bc --- /dev/null +++ b/test/decompiler/vu_reference/ocean-mid.txt @@ -0,0 +1,2350 @@ +.word 0x1e102dd +.word 0x2ff +.word 0x1e202df +.word 0x2ff +.word 0x1e302e0 +.word 0x2ff +.word 0x1e502e1 +.word 0x2ff +.word 0x1e602e2 +.word 0x2ff +.word 0x1009014f +.word 0x2ff +.word 0x800101b2 +.word 0x2ff +.word 0x1f40ae5 +.word 0x2ff +.word 0x1f50aed +.word 0x2ff +.word 0x3e1a14f +.word 0x2ff +.word 0x3e1a1c9 +.word 0x2ff +.word 0x3e1a98c +.word 0x2ff +.word 0x3e1aa06 +.word 0x2ff +.word 0x5a000ff9 +.word 0x2ff +.word 0x80010ff2 +.word 0x2ff +.word 0x80050032 +.word 0x1e0042a +.word 0x80070232 +.word 0x2ff +.word 0x80060232 +.word 0x100042a +.word 0x3e580ec +.word 0x2ff +.word 0x80052872 +.word 0x1058403 +.word 0x5a0037fd +.word 0x2ff +.word 0x800637f2 +.word 0x2ff +.word 0x5a003ffa +.word 0x458403 +.word 0x80073ff2 +.word 0x2ff +.word 0x80000030 +.word 0x1f4a52c +.word 0x80000030 +.word 0x1f5ad6c +.word 0x80030032 +.word 0x40a503 +.word 0x80060232 +.word 0xc0ad43 +.word 0x3e3a13d +.word 0x2ff +.word 0x3e3a93e +.word 0x100a503 +.word 0x800318b2 +.word 0x100ad43 +.word 0x5a0037fc +.word 0x2ff +.word 0x800637f2 +.word 0x2ff +.word 0x1e802f4 +.word 0x2ff +.word 0x80040232 +.word 0x2ff +.word 0x10060011 +.word 0x1e8417c +.word 0x3e4418c +.word 0x2ff +.word 0x3e44206 +.word 0x2ff +.word 0x800420f2 +.word 0x2ff +.word 0x5a0037fc +.word 0x2ff +.word 0x800637f2 +.word 0x2ff +.word 0x80000030 +.word 0x400002ff +.word 0x80000030 +.word 0x2ff +.word 0x100a0243 +.word 0x2ff +.word 0x80000030 +.word 0x400002ff +.word 0x80000030 +.word 0x2ff +.word 0x800206bc +.word 0x2ff +.word 0x1e702ec +.word 0x2ff +.word 0x1ec1004 +.word 0x2ff +.word 0x1ed1005 +.word 0x2ff +.word 0x1ee1006 +.word 0x2ff +.word 0x1ef1007 +.word 0x2ff +.word 0x3e03955 +.word 0x2ff +.word 0x3e039cf +.word 0x2ff +.word 0x800701f2 +.word 0x2ff +.word 0x1e41074 +.word 0x2ff +.word 0x80013f32 +.word 0x2ff +.word 0x800a23fc +.word 0x2ff +.word 0x100b00ff +.word 0x2ff +.word 0x52000802 +.word 0x2ff +.word 0x81e4233d +.word 0x2ff +.word 0x1e41075 +.word 0x2ff +.word 0x500b5006 +.word 0x2ff +.word 0x800849f2 +.word 0x2ff +.word 0x420f0146 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x10010318 +.word 0x2ff +.word 0x80004efc +.word 0x2ff +.word 0x80090a71 +.word 0x2ff +.word 0x5a003ff2 +.word 0x2ff +.word 0x80073ff2 +.word 0x2ff +.word 0x80000030 +.word 0x400002ff +.word 0x80000030 +.word 0x2ff +.word 0x800206bc +.word 0x2ff +.word 0x1e702eb +.word 0x2ff +.word 0x1e81000 +.word 0x2ff +.word 0x1e91001 +.word 0x2ff +.word 0x1ea1002 +.word 0x2ff +.word 0x1eb1003 +.word 0x2ff +.word 0x1ec1004 +.word 0x2ff +.word 0x1ed1005 +.word 0x2ff +.word 0x1ee1006 +.word 0x2ff +.word 0x1ef1007 +.word 0x2ff +.word 0x3e03955 +.word 0x2ff +.word 0x3e039cf +.word 0x2ff +.word 0x800701f2 +.word 0x2ff +.word 0x1e41074 +.word 0x2ff +.word 0x80013f32 +.word 0x2ff +.word 0x800a23fc +.word 0x2ff +.word 0x100b00ff +.word 0x2ff +.word 0x52000802 +.word 0x2ff +.word 0x81e4233d +.word 0x2ff +.word 0x1e41075 +.word 0x2ff +.word 0x500b5009 +.word 0x2ff +.word 0x800849f2 +.word 0x2ff +.word 0x420f016b +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x10010318 +.word 0x2ff +.word 0x80004efc +.word 0x2ff +.word 0x50007003 +.word 0x2ff +.word 0x80090a71 +.word 0x2ff +.word 0x420f0200 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x5a003fef +.word 0x2ff +.word 0x80073ff2 +.word 0x2ff +.word 0x80000030 +.word 0x400002ff +.word 0x80000030 +.word 0x2ff +.word 0x800206bc +.word 0x2ff +.word 0x800306bc +.word 0x2ff +.word 0x80000135 +.word 0x2ff +.word 0x9051008 +.word 0x2ff +.word 0x1e81000 +.word 0x2ff +.word 0x1e91001 +.word 0x2ff +.word 0x1ea1002 +.word 0x2ff +.word 0x1eb1003 +.word 0x2ff +.word 0x1ec1004 +.word 0x2ff +.word 0x1ed1005 +.word 0x2ff +.word 0x1ee1006 +.word 0x2ff +.word 0x1ef1007 +.word 0x2ff +.word 0x1f01811 +.word 0x2ff +.word 0x1fc02fd +.word 0x2ff +.word 0x1fd02fe +.word 0x2ff +.word 0x1fe02ff +.word 0x2ff +.word 0x1ff0300 +.word 0x2ff +.word 0x1f81009 +.word 0x1f0e1bc +.word 0x1f9100a +.word 0x1f0e8bd +.word 0x1fa100b +.word 0x1f0f0be +.word 0x1fb100c +.word 0x1f0ff0b +.word 0x1f6100d +.word 0x1f0c1bc +.word 0x1f7100e +.word 0x1f0c8bd +.word 0x1f2100f +.word 0x1f0d0be +.word 0x1f31010 +.word 0x1f0dd0b +.word 0x80052ff2 +.word 0x1fc41bc +.word 0x80000030 +.word 0x1fc48bd +.word 0x80000030 +.word 0x1fc50be +.word 0x80000030 +.word 0x1e05e0b +.word 0x80000030 +.word 0x1fc61bc +.word 0x80000030 +.word 0x1fc68bd +.word 0x80000030 +.word 0x1fc70be +.word 0x81c0c73f +.word 0x1e07f0b +.word 0x800007bf +.word 0x980602 +.word 0x80000030 +.word 0x1e1e72a +.word 0x8038067c +.word 0x1f0b1bc +.word 0x80031872 +.word 0x1f0b8bd +.word 0x80000030 +.word 0x1f090be +.word 0x3e4a317 +.word 0x1f09d8b +.word 0x3e4e319 +.word 0x198c61b +.word 0x3e4b318 +.word 0x1e5c2be +.word 0x80042132 +.word 0x1e0360b +.word 0x5a002fe1 +.word 0x2ff +.word 0x3e4c316 +.word 0x2ff +.word 0x800003b5 +.word 0x2ff +.word 0x1ff02de +.word 0x2ff +.word 0x90b1008 +.word 0x2ff +.word 0x8871008 +.word 0x2ff +.word 0x800f0072 +.word 0x2ff +.word 0x1fc02e5 +.word 0x2ff +.word 0x1fd02e6 +.word 0x2ff +.word 0x1fe02e7 +.word 0x2ff +.word 0x1f802e8 +.word 0x2ff +.word 0x1f902e9 +.word 0x2ff +.word 0x1fa02ea +.word 0x2ff +.word 0x1e702e3 +.word 0x2ff +.word 0x3e0e243 +.word 0x2ff +.word 0x3e0ea44 +.word 0x2ff +.word 0x3e0f245 +.word 0x2ff +.word 0x3e0c246 +.word 0x2ff +.word 0x3e0ca47 +.word 0x2ff +.word 0x3e0d248 +.word 0x2ff +.word 0x3e0e290 +.word 0x2ff +.word 0x3e0ea91 +.word 0x2ff +.word 0x3e0f292 +.word 0x2ff +.word 0x3e0c293 +.word 0x2ff +.word 0x3e0ca94 +.word 0x2ff +.word 0x3e0d295 +.word 0x2ff +.word 0x800b5fb2 +.word 0x2ff +.word 0x800f3874 +.word 0x2ff +.word 0x800b5fb2 +.word 0x2ff +.word 0x52000824 +.word 0x2ff +.word 0x800f7bf0 +.word 0x2ff +.word 0x800851f2 +.word 0x2ff +.word 0x800351f2 +.word 0x2ff +.word 0x80050132 +.word 0x2ff +.word 0x1f47317 +.word 0x2ff +.word 0x1f67318 +.word 0x2ff +.word 0x1fc7319 +.word 0x2ff +.word 0x1f5731b +.word 0x2ff +.word 0x1f7731c +.word 0x2ff +.word 0x1fd731d +.word 0x2ff +.word 0x3e8a000 +.word 0x2ff +.word 0x3e8b001 +.word 0x2ff +.word 0x3e8e002 +.word 0x2ff +.word 0x3e8a803 +.word 0x2ff +.word 0x3e8b804 +.word 0x2ff +.word 0x3e8e805 +.word 0x2ff +.word 0x3e8a00c +.word 0x2ff +.word 0x3e8b00d +.word 0x2ff +.word 0x3e8e00e +.word 0x2ff +.word 0x1f47323 +.word 0x2ff +.word 0x1f67324 +.word 0x2ff +.word 0x1fc7325 +.word 0x2ff +.word 0x1f5731f +.word 0x2ff +.word 0x1f77320 +.word 0x2ff +.word 0x1fd7321 +.word 0x2ff +.word 0x3e8a006 +.word 0x2ff +.word 0x3e8b007 +.word 0x2ff +.word 0x3e8e008 +.word 0x2ff +.word 0x3e8a809 +.word 0x2ff +.word 0x3e8b80a +.word 0x2ff +.word 0x420d0247 +.word 0x2ff +.word 0x3e8e80b +.word 0x2ff +.word 0x50002803 +.word 0x2ff +.word 0x11062800 +.word 0x2ff +.word 0x420d0217 +.word 0x2ff +.word 0x11063000 +.word 0x2ff +.word 0x5a005fd8 +.word 0x2ff +.word 0x800e7232 +.word 0x2ff +.word 0x800003b5 +.word 0x2ff +.word 0x90b1008 +.word 0x2ff +.word 0x8871008 +.word 0x2ff +.word 0x800f0072 +.word 0x2ff +.word 0x1e702e4 +.word 0x2ff +.word 0x800b5fb2 +.word 0x2ff +.word 0x800f3874 +.word 0x2ff +.word 0x800b5fb2 +.word 0x2ff +.word 0x5200082d +.word 0x2ff +.word 0x800f7bf0 +.word 0x2ff +.word 0x800851f2 +.word 0x2ff +.word 0x800351f2 +.word 0x2ff +.word 0x80050132 +.word 0x2ff +.word 0x1f8731a +.word 0x2ff +.word 0x1f602f4 +.word 0x2ff +.word 0x1fc7319 +.word 0x2ff +.word 0x1f9731e +.word 0x2ff +.word 0x1fd731d +.word 0x2ff +.word 0x3e8c000 +.word 0x2ff +.word 0x3e8b001 +.word 0x2ff +.word 0x3e8e002 +.word 0x2ff +.word 0x3e8c803 +.word 0x2ff +.word 0x3e8b004 +.word 0x2ff +.word 0x3e8e805 +.word 0x2ff +.word 0x3e8c00c +.word 0x2ff +.word 0x3e8b00d +.word 0x2ff +.word 0x3e8e00e +.word 0x2ff +.word 0x1f87326 +.word 0x2ff +.word 0x1fc7325 +.word 0x2ff +.word 0x1f97322 +.word 0x2ff +.word 0x1fd7321 +.word 0x2ff +.word 0x3e8c006 +.word 0x2ff +.word 0x3e8b007 +.word 0x2ff +.word 0x3e8e008 +.word 0x2ff +.word 0x3e8c809 +.word 0x2ff +.word 0x3e8b00a +.word 0x2ff +.word 0x420d021b +.word 0x2ff +.word 0x3e8e80b +.word 0x2ff +.word 0x1fc02ed +.word 0x2ff +.word 0x5000280e +.word 0x2ff +.word 0x1fd02ee +.word 0x2ff +.word 0x1fe02ef +.word 0x2ff +.word 0x1f802f0 +.word 0x2ff +.word 0x1f902f1 +.word 0x2ff +.word 0x1fa02f2 +.word 0x2ff +.word 0x3eae000 +.word 0x2ff +.word 0x3eae801 +.word 0x2ff +.word 0x3eaf002 +.word 0x2ff +.word 0x3eac003 +.word 0x2ff +.word 0x3eac804 +.word 0x2ff +.word 0x3ead005 +.word 0x2ff +.word 0x11062800 +.word 0x2ff +.word 0x420d01df +.word 0x2ff +.word 0x11063000 +.word 0x2ff +.word 0x5a005fcf +.word 0x2ff +.word 0x800e7232 +.word 0x2ff +.word 0x80000030 +.word 0x400002ff +.word 0x80000030 +.word 0x2ff +.word 0x800206bc +.word 0x2ff +.word 0x800306bc +.word 0x2ff +.word 0x80000135 +.word 0x2ff +.word 0x800851f2 +.word 0x2ff +.word 0x9051008 +.word 0x2ff +.word 0x1e81000 +.word 0x2ff +.word 0x1e91001 +.word 0x2ff +.word 0x1ea1002 +.word 0x2ff +.word 0x1eb1003 +.word 0x2ff +.word 0x1ec1004 +.word 0x2ff +.word 0x1ed1005 +.word 0x2ff +.word 0x1ee1006 +.word 0x2ff +.word 0x1ef1007 +.word 0x2ff +.word 0x1f01811 +.word 0x2ff +.word 0x1fc02fd +.word 0x2ff +.word 0x1fd02fe +.word 0x2ff +.word 0x1fe02ff +.word 0x2ff +.word 0x1ff0300 +.word 0x2ff +.word 0x1f81009 +.word 0x1f0e1bc +.word 0x1f9100a +.word 0x1f0e8bd +.word 0x1fa100b +.word 0x1f0f0be +.word 0x1fb100c +.word 0x1f0ff0b +.word 0x1f6100d +.word 0x1f0c1bc +.word 0x1f7100e +.word 0x1f0c8bd +.word 0x1f2100f +.word 0x1f0d0be +.word 0x1f31010 +.word 0x1f0dd0b +.word 0x80052ff2 +.word 0x1fc41bc +.word 0x80000030 +.word 0x1fc48bd +.word 0x80000030 +.word 0x1fc50be +.word 0x80000030 +.word 0x1e05e0b +.word 0x80000030 +.word 0x1fc61bc +.word 0x80000030 +.word 0x1fc68bd +.word 0x80000030 +.word 0x1fc70be +.word 0x81c0c73f +.word 0x1e07f0b +.word 0x800007bf +.word 0x980602 +.word 0x80000030 +.word 0x1e1e72a +.word 0x8038067c +.word 0x1f0b1bc +.word 0x80031872 +.word 0x1f0b8bd +.word 0x80000030 +.word 0x1f090be +.word 0x3e8a000 +.word 0x1f09d8b +.word 0x3e8e002 +.word 0x198c61b +.word 0x3e4e318 +.word 0x2ff +.word 0x3e8b001 +.word 0x1e5c2be +.word 0x800420b2 +.word 0x1e0360b +.word 0x800840f2 +.word 0x2ff +.word 0x5a002fdf +.word 0x2ff +.word 0x3e4c315 +.word 0x2ff +.word 0x1ff02de +.word 0x2ff +.word 0x9051008 +.word 0x2ff +.word 0x1f45007 +.word 0x2ff +.word 0x1f65008 +.word 0x2ff +.word 0x1fc5009 +.word 0x2ff +.word 0x3e8a000 +.word 0x2ff +.word 0x3e8b001 +.word 0x2ff +.word 0x3e8e002 +.word 0x2ff +.word 0x800851f2 +.word 0x2ff +.word 0x420d01cd +.word 0x2ff +.word 0x800351f2 +.word 0x2ff +.word 0x1fc02e5 +.word 0x2ff +.word 0x50002836 +.word 0x2ff +.word 0x1fd02e6 +.word 0x2ff +.word 0x1fe02e7 +.word 0x2ff +.word 0x1f802e8 +.word 0x2ff +.word 0x1f902e9 +.word 0x2ff +.word 0x1fa02ea +.word 0x2ff +.word 0x1e702e3 +.word 0x2ff +.word 0x3eae000 +.word 0x2ff +.word 0x3eae801 +.word 0x2ff +.word 0x3eaf002 +.word 0x2ff +.word 0x3eac003 +.word 0x2ff +.word 0x3eac804 +.word 0x2ff +.word 0x3ead005 +.word 0x2ff +.word 0x11062800 +.word 0x2ff +.word 0x420d0190 +.word 0x2ff +.word 0x11063000 +.word 0x2ff +.word 0x800000f5 +.word 0x2ff +.word 0x1f602f4 +.word 0x2ff +.word 0x9051008 +.word 0x2ff +.word 0x800851f2 +.word 0x2ff +.word 0x1fc1b18 +.word 0x2ff +.word 0x1f81b17 +.word 0x2ff +.word 0x800318b2 +.word 0x2ff +.word 0x80052ff2 +.word 0x2ff +.word 0x3e8b001 +.word 0x2ff +.word 0x3e8e002 +.word 0x2ff +.word 0x3e8c000 +.word 0x2ff +.word 0x5a002ff8 +.word 0x2ff +.word 0x800840f2 +.word 0x2ff +.word 0x9051008 +.word 0x2ff +.word 0x1f45007 +.word 0x2ff +.word 0x1f65008 +.word 0x2ff +.word 0x1f85009 +.word 0x2ff +.word 0x3e8c000 +.word 0x2ff +.word 0x3e8b001 +.word 0x2ff +.word 0x3e8e002 +.word 0x2ff +.word 0x800851f2 +.word 0x2ff +.word 0x420d01a5 +.word 0x2ff +.word 0x800351f2 +.word 0x2ff +.word 0x1fc02ed +.word 0x2ff +.word 0x1fd02ee +.word 0x2ff +.word 0x1fe02ef +.word 0x2ff +.word 0x1f802f0 +.word 0x2ff +.word 0x1f902f1 +.word 0x2ff +.word 0x1fa02f2 +.word 0x2ff +.word 0x1e702e4 +.word 0x2ff +.word 0x3eae000 +.word 0x2ff +.word 0x3eae801 +.word 0x2ff +.word 0x3eaf002 +.word 0x2ff +.word 0x3eac003 +.word 0x2ff +.word 0x3eac804 +.word 0x2ff +.word 0x3ead005 +.word 0x2ff +.word 0x11062800 +.word 0x2ff +.word 0x420d0169 +.word 0x2ff +.word 0x11063000 +.word 0x2ff +.word 0x80000030 +.word 0x400002ff +.word 0x80000030 +.word 0x2ff +.word 0x9053af5 +.word 0x2ff +.word 0x8843af5 +.word 0x2ff +.word 0x80030032 +.word 0x2ff +.word 0x80022130 +.word 0x2ff +.word 0x80060232 +.word 0x2ff +.word 0x1fc28ec +.word 0x2ff +.word 0x1fd28f5 +.word 0x1fc61bc +.word 0x80052872 +.word 0x1fc68bd +.word 0x22000000 +.word 0x1fc70be +.word 0x80000030 +.word 0x1e07f8b +.word 0x819e1bbc +.word 0x1fd61bc +.word 0x1fc28ec +.word 0x1fd68bd +.word 0x1f4193d +.word 0x1fd70be +.word 0x1f62008 +.word 0x1e07fcb +.word 0x80000030 +.word 0x1e1f4aa +.word 0x800003bf +.word 0x20f1bf +.word 0x80000030 +.word 0x1c0f1fc +.word 0x80000030 +.word 0x1e0140b +.word 0x80000030 +.word 0x1d291ff +.word 0x80000030 +.word 0x1e1fcea +.word 0x819f1bbc +.word 0x1e0a51c +.word 0x80000030 +.word 0x1fc61bc +.word 0x80000030 +.word 0x1fc68bd +.word 0x800d0032 +.word 0x1d399ff +.word 0x800c0072 +.word 0x238411 +.word 0x1fd28f5 +.word 0x1fc70be +.word 0x80010032 +.word 0x2ff +.word 0x40000010 +.word 0x1e07f8b +.word 0x80052872 +.word 0x238416 +.word 0x800c5374 +.word 0x2ff +.word 0x50000802 +.word 0x20f1bf +.word 0x1f4193d +.word 0x1c0f1fc +.word 0x80000030 +.word 0x238c43 +.word 0x1f62008 +.word 0x1e0140b +.word 0x2403ffff +.word 0x1e1fcea +.word 0x819f1bbc +.word 0x1e0a51c +.word 0x800d0875 +.word 0x1f1897d +.word 0x800c6330 +.word 0x238411 +.word 0x3e8a803 +.word 0x1fc61bc +.word 0x3e8b804 +.word 0x1fc68bd +.word 0x3e88805 +.word 0x1d399ff +.word 0x1fd28f5 +.word 0x238416 +.word 0x800841b2 +.word 0x1fc70be +.word 0x80052872 +.word 0x1e07f8b +.word 0x50000802 +.word 0x20f9bf +.word 0x1f5193e +.word 0x1c0f9fc +.word 0x80000030 +.word 0x238403 +.word 0x1f72014 +.word 0x1e0144b +.word 0x2403ffff +.word 0x1e1f4aa +.word 0x819e1bbc +.word 0x1e0ad5c +.word 0x800318b2 +.word 0x1f0817d +.word 0x800d0875 +.word 0x2ff +.word 0x80042072 +.word 0x238c51 +.word 0x3e8a000 +.word 0x1fd61bc +.word 0x3e8b001 +.word 0x1fd68bd +.word 0x3e88002 +.word 0x1d291ff +.word 0x1fc28ec +.word 0x238c56 +.word 0x5a0037e3 +.word 0x1fd70be +.word 0x800637f2 +.word 0x1e07fcb +.word 0x50000802 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x238c43 +.word 0x80000030 +.word 0x1f1897d +.word 0x3e8a803 +.word 0x2ff +.word 0x3e8b804 +.word 0x2ff +.word 0x3e88805 +.word 0x2ff +.word 0x48007800 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x9053af5 +.word 0x2ff +.word 0x8843af5 +.word 0x2ff +.word 0x80030032 +.word 0x2ff +.word 0x80022130 +.word 0x2ff +.word 0x80060232 +.word 0x2ff +.word 0x1fc28ec +.word 0x2ff +.word 0x1fd28f5 +.word 0x1fc61bc +.word 0x80052872 +.word 0x1fc68bd +.word 0x22000000 +.word 0x1fc70be +.word 0x80000030 +.word 0x1e07f8b +.word 0x80000030 +.word 0x1fc41bc +.word 0x80000030 +.word 0x1fc48bd +.word 0x80000030 +.word 0x1fc50be +.word 0x80000030 +.word 0x1e05e8b +.word 0x1f4193d +.word 0x1fd61bc +.word 0x1f62008 +.word 0x1fd68bd +.word 0x819e1bbc +.word 0x1fd70be +.word 0x81c0d73f +.word 0x1e07fcb +.word 0x80000030 +.word 0x1fd41bc +.word 0x80000030 +.word 0x1fd48bd +.word 0x1fc28ec +.word 0x1fd50be +.word 0x1fd28f5 +.word 0x1e05ecb +.word 0x80000030 +.word 0x1e1f4aa +.word 0x80000030 +.word 0x1e1fcea +.word 0x80000030 +.word 0x20f1bf +.word 0x80000030 +.word 0x1c0f1fc +.word 0x80000030 +.word 0x1e0140b +.word 0x819f1bbc +.word 0x1e0a51c +.word 0x80000030 +.word 0x9a0682 +.word 0x800007bf +.word 0x238411 +.word 0x803a067c +.word 0x1fc61bc +.word 0x81c0df3f +.word 0x1fc68bd +.word 0x800c0072 +.word 0x1fc70be +.word 0x80010032 +.word 0x1e07f8b +.word 0x800d0032 +.word 0x19ad61b +.word 0x800b0032 +.word 0x238416 +.word 0x800e0032 +.word 0x9b06c2 +.word 0x80000030 +.word 0x1fc41bc +.word 0x80000030 +.word 0x1fc48bd +.word 0x80000030 +.word 0x1fc50be +.word 0x80000030 +.word 0x1e05e8b +.word 0x80000030 +.word 0x1d291ff +.word 0x800007bf +.word 0x1d399ff +.word 0x4000002b +.word 0x1e5c2be +.word 0x80052872 +.word 0x1e0360b +.word 0x50000815 +.word 0x20f1bf +.word 0x1f4193d +.word 0x1c0f1fc +.word 0x52006813 +.word 0x238c43 +.word 0x267df7ff +.word 0x2ff +.word 0xb0c7307 +.word 0x2ff +.word 0x52000810 +.word 0x2ff +.word 0x26df7dff +.word 0x2ff +.word 0xa857307 +.word 0x2ff +.word 0x5200080d +.word 0x2ff +.word 0x26efbeff +.word 0x2ff +.word 0x84b3af5 +.word 0x2ff +.word 0x5200080a +.word 0x2ff +.word 0x26f7df7f +.word 0x2ff +.word 0xa447307 +.word 0x2ff +.word 0x52000807 +.word 0x2ff +.word 0x26fbefbf +.word 0x2ff +.word 0x800b2af1 +.word 0x2ff +.word 0x52000804 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x58005802 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x800e7072 +.word 0x2ff +.word 0x1f62008 +.word 0x1e0140b +.word 0x819f1bbc +.word 0x1e0a51c +.word 0x2403ffff +.word 0x1e1fcea +.word 0x800007bf +.word 0x1f1897d +.word 0x803a067c +.word 0x238411 +.word 0x81c0df3f +.word 0x1d399ff +.word 0x800c5374 +.word 0x9b06c2 +.word 0x3e8a803 +.word 0x1f5ce5a +.word 0x3e8b804 +.word 0x19ad61b +.word 0x3e88805 +.word 0x1fc61bc +.word 0x3e88842 +.word 0x1fc68bd +.word 0x3e8c840 +.word 0x1fc70be +.word 0x800841b2 +.word 0x1e07f8b +.word 0x800c6330 +.word 0x1fc41bc +.word 0x800d0875 +.word 0x1fc48bd +.word 0x80000030 +.word 0x1fc50be +.word 0x80000030 +.word 0x1e05e8b +.word 0x1fd28f5 +.word 0x238416 +.word 0x80052872 +.word 0x1e5c2be +.word 0x80000030 +.word 0x1e0360b +.word 0x50000813 +.word 0x20f9bf +.word 0x1f5193e +.word 0x1c0f9fc +.word 0x52006811 +.word 0x238403 +.word 0x267df7ff +.word 0x2ff +.word 0xb007307 +.word 0x2ff +.word 0x5200080e +.word 0x2ff +.word 0x26df7dff +.word 0x2ff +.word 0xa857307 +.word 0x2ff +.word 0x5200080b +.word 0x2ff +.word 0x26efbeff +.word 0x2ff +.word 0xa447307 +.word 0x2ff +.word 0x52000808 +.word 0x2ff +.word 0x26f7df7f +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x52000805 +.word 0x2ff +.word 0x26fbefbf +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x52000802 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x800e7072 +.word 0x2ff +.word 0x1f72014 +.word 0x1e0144b +.word 0x819e1bbc +.word 0x1e0ad5c +.word 0x2403ffff +.word 0x1e1f4aa +.word 0x800007bf +.word 0x1f0817d +.word 0x803b067c +.word 0x238c51 +.word 0x81c0d73f +.word 0x1d291ff +.word 0x80000030 +.word 0x9a0682 +.word 0x3e8a000 +.word 0x1f4c61a +.word 0x3e8b001 +.word 0x19bde5b +.word 0x3e88002 +.word 0x1fd61bc +.word 0x3e8803f +.word 0x1fd68bd +.word 0x3e8c03d +.word 0x1fd70be +.word 0x80042072 +.word 0x1e07fcb +.word 0x800318b2 +.word 0x1fd41bc +.word 0x800d0875 +.word 0x1fd48bd +.word 0x80000030 +.word 0x1fd50be +.word 0x80000030 +.word 0x1e05ecb +.word 0x1fc28ec +.word 0x238c56 +.word 0x5a0037af +.word 0x1e5cabe +.word 0x800637f2 +.word 0x1e0364b +.word 0x50000813 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x52006811 +.word 0x238c43 +.word 0x267df7ff +.word 0x2ff +.word 0xb0c7307 +.word 0x2ff +.word 0x5200080e +.word 0x2ff +.word 0x26df7dff +.word 0x2ff +.word 0xa857307 +.word 0x2ff +.word 0x5200080b +.word 0x2ff +.word 0x26efbeff +.word 0x2ff +.word 0xa447307 +.word 0x2ff +.word 0x52000808 +.word 0x2ff +.word 0x26f7df7f +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x52000805 +.word 0x2ff +.word 0x26fbefbf +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x52000802 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x800e7072 +.word 0x2ff +.word 0x80000030 +.word 0x1f1897d +.word 0x3e8a803 +.word 0x1f5ce5a +.word 0x3e8b804 +.word 0x2ff +.word 0x3e88805 +.word 0x2ff +.word 0x3e88842 +.word 0x2ff +.word 0x3e8c840 +.word 0x2ff +.word 0x48007800 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x1ff02de +.word 0x2ff +.word 0x100a0243 +.word 0x2ff +.word 0x800e77f2 +.word 0x2ff +.word 0x800851f2 +.word 0x2ff +.word 0x90c7307 +.word 0x2ff +.word 0x8857307 +.word 0x2ff +.word 0x8447307 +.word 0x2ff +.word 0x5200600b +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x1fc28e9 +.word 0x2ff +.word 0x1fd28f2 +.word 0x2ff +.word 0x1fe28ea +.word 0x2ff +.word 0x1f62007 +.word 0x2ff +.word 0x1f72013 +.word 0x1fc41bc +.word 0x1f02008 +.word 0x1fc48bd +.word 0x1f4013d +.word 0x1fc50be +.word 0x1f5013e +.word 0x1e05e0b +.word 0x4000000b +.word 0x1fc61bc +.word 0x1e7013f +.word 0x1fc68bd +.word 0x1fc28f2 +.word 0x2ff +.word 0x1fd28ea +.word 0x2ff +.word 0x1fe28f3 +.word 0x2ff +.word 0x1f62012 +.word 0x2ff +.word 0x1f72007 +.word 0x1fc41bc +.word 0x1f02013 +.word 0x1fc48bd +.word 0x1f4013e +.word 0x1fc50be +.word 0x1f5013f +.word 0x1e05e0b +.word 0x80000030 +.word 0x1fc61bc +.word 0x1e70140 +.word 0x1fc68bd +.word 0x80000030 +.word 0x1fc70be +.word 0x81c0c73f +.word 0x1e07f0b +.word 0x80000030 +.word 0x980602 +.word 0x80000030 +.word 0x1f6b13c +.word 0x80000030 +.word 0x1f7b93c +.word 0x80000030 +.word 0x1f0813c +.word 0x3e8a000 +.word 0x1fd41bc +.word 0x3e8b001 +.word 0x1fd48bd +.word 0x3e8a803 +.word 0x1fd50be +.word 0x3e8b804 +.word 0x1e05e4b +.word 0x3e83806 +.word 0x1fd61bc +.word 0x3e88007 +.word 0x1fd68bd +.word 0x3e8a009 +.word 0x1fd70be +.word 0x3e8b00a +.word 0x1e07f4b +.word 0x800007bf +.word 0x1e1e72a +.word 0x8038067c +.word 0x2ff +.word 0x81c0cf3f +.word 0x2ff +.word 0x80000030 +.word 0x990642 +.word 0x3e8e002 +.word 0x1fe41bc +.word 0x3e8e00b +.word 0x198c61b +.word 0x3e0e304 +.word 0x1fe48bd +.word 0x80000030 +.word 0x1fe50be +.word 0x80000030 +.word 0x1e05e8b +.word 0x80000030 +.word 0x1e5c2be +.word 0x80000030 +.word 0x1e0360b +.word 0x80000030 +.word 0x1fe61bc +.word 0x80000030 +.word 0x1fe68bd +.word 0x80000030 +.word 0x1fe70be +.word 0x3e0c301 +.word 0x1e07f8b +.word 0x800007bf +.word 0x1e1ef6a +.word 0x8039067c +.word 0x2ff +.word 0x81c0d73f +.word 0x2ff +.word 0x80000030 +.word 0x9a0682 +.word 0x3e8e805 +.word 0x2ff +.word 0x3e0eb05 +.word 0x199ce5b +.word 0x80000030 +.word 0x1e5cabe +.word 0x80000030 +.word 0x1e0364b +.word 0x800007bf +.word 0x1e1f7aa +.word 0x803a067c +.word 0x2ff +.word 0x3e8f008 +.word 0x2ff +.word 0x3e0f306 +.word 0x19ad69b +.word 0x3e0cb02 +.word 0x1e5d2be +.word 0x1e702e3 +.word 0x1e0368b +.word 0x800040f5 +.word 0x2ff +.word 0x800500f2 +.word 0x2ff +.word 0x420d0068 +.word 0x2ff +.word 0x3e0d303 +.word 0x2ff +.word 0x1fc02e5 +.word 0x2ff +.word 0x50002835 +.word 0x2ff +.word 0x1fd02e6 +.word 0x2ff +.word 0x1fe02e7 +.word 0x2ff +.word 0x1f802e8 +.word 0x2ff +.word 0x1f902e9 +.word 0x2ff +.word 0x1fa02ea +.word 0x2ff +.word 0x3eae000 +.word 0x2ff +.word 0x3eae801 +.word 0x2ff +.word 0x3eaf002 +.word 0x2ff +.word 0x3eac003 +.word 0x2ff +.word 0x3eac804 +.word 0x2ff +.word 0x3ead005 +.word 0x2ff +.word 0x11062800 +.word 0x2ff +.word 0x420d002c +.word 0x2ff +.word 0x11063000 +.word 0x2ff +.word 0x800851f2 +.word 0x2ff +.word 0x1f80301 +.word 0x2ff +.word 0x1f90302 +.word 0x2ff +.word 0x1fa0303 +.word 0x2ff +.word 0x1f602f4 +.word 0x2ff +.word 0x1fc0304 +.word 0x2ff +.word 0x1fd0305 +.word 0x2ff +.word 0x1fe0306 +.word 0x2ff +.word 0x3e8c000 +.word 0x2ff +.word 0x3e8b001 +.word 0x2ff +.word 0x3e8e002 +.word 0x2ff +.word 0x3e8c803 +.word 0x2ff +.word 0x3e8b004 +.word 0x2ff +.word 0x3e8e805 +.word 0x2ff +.word 0x3e8d006 +.word 0x2ff +.word 0x3e8b007 +.word 0x2ff +.word 0x3e8f008 +.word 0x2ff +.word 0x3e8c009 +.word 0x2ff +.word 0x3e8b00a +.word 0x2ff +.word 0x3e8e00b +.word 0x2ff +.word 0x800040f5 +.word 0x2ff +.word 0x800500f2 +.word 0x2ff +.word 0x420d0040 +.word 0x2ff +.word 0x1e702e4 +.word 0x2ff +.word 0x1fc02ed +.word 0x2ff +.word 0x1fd02ee +.word 0x2ff +.word 0x1fe02ef +.word 0x2ff +.word 0x1f802f0 +.word 0x2ff +.word 0x1f902f1 +.word 0x2ff +.word 0x1fa02f2 +.word 0x2ff +.word 0x3eae000 +.word 0x2ff +.word 0x3eae801 +.word 0x2ff +.word 0x3eaf002 +.word 0x2ff +.word 0x3eac003 +.word 0x2ff +.word 0x3eac804 +.word 0x2ff +.word 0x3ead005 +.word 0x2ff +.word 0x11062800 +.word 0x2ff +.word 0x420d0005 +.word 0x2ff +.word 0x11063000 +.word 0x2ff +.word 0x5a00777e +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x48007800 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x3e83fff +.word 0x2ff +.word 0xb0647ff +.word 0x2ff +.word 0x81f8437c +.word 0x2ff +.word 0x81fb437c +.word 0x2ff +.word 0x81f5437c +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x81f503bc +.word 0x1ffad6a +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1c0ad5c +.word 0x80000030 +.word 0x1e0c61c +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1e2ad68 +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x23ad51 +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x23ad56 +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x1fbd97c +.word 0x80000030 +.word 0x1f5a97d +.word 0x80000030 +.word 0x2ff +.word 0x3e8c7fd +.word 0x2ff +.word 0x3e8dffe +.word 0x2ff +.word 0x3e8afff +.word 0x2ff +.word 0x80052ff2 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x52002fdb +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x100104d3 +.word 0x2ff +.word 0x800056fc +.word 0x2ff +.word 0x48006800 +.word 0x2ff +.word 0x800a0ab1 +.word 0x2ff +.word 0x80001935 +.word 0x2ff +.word 0x1f51802 +.word 0x2ff +.word 0x800029b5 +.word 0x2ff +.word 0x1f81800 +.word 0x2ff +.word 0x1fb1801 +.word 0x2ff +.word 0x800318f2 +.word 0x1d5a9ff +.word 0x1f61802 +.word 0x2ff +.word 0x1f91800 +.word 0x2ff +.word 0x1fc1801 +.word 0x2ff +.word 0x800318f2 +.word 0x2ff +.word 0x80000030 +.word 0x1d6b1ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x26fff7df +.word 0x2ff +.word 0x520008b0 +.word 0x2ff +.word 0x24000020 +.word 0x2ff +.word 0x520008b0 +.word 0x2ff +.word 0x24000800 +.word 0x2ff +.word 0x520008c1 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x81e4c37d +.word 0x2ff +.word 0x81e4db7d +.word 0x2ff +.word 0x81e4ab7d +.word 0x2ff +.word 0x81f8cb3c +.word 0x2ff +.word 0x80052ff2 +.word 0x2ff +.word 0x81fbe33c +.word 0x2ff +.word 0x52002fea +.word 0x2ff +.word 0x81f5b33c +.word 0x2ff +.word 0x1f84000 +.word 0x2ff +.word 0x1fb4001 +.word 0x2ff +.word 0x1f54002 +.word 0x2ff +.word 0x800040f5 +.word 0x2ff +.word 0x81e4c37d +.word 0x2ff +.word 0x81e4db7d +.word 0x2ff +.word 0x81e4ab7d +.word 0x2ff +.word 0x50003099 +.word 0x2ff +.word 0x80003175 +.word 0x2ff +.word 0x80001935 +.word 0x2ff +.word 0x1f51802 +.word 0x2ff +.word 0x800029b5 +.word 0x2ff +.word 0x1f81800 +.word 0x2ff +.word 0x1fb1801 +.word 0x2ff +.word 0x800318f2 +.word 0x1d5a9ff +.word 0x1f61802 +.word 0x2ff +.word 0x1f91800 +.word 0x2ff +.word 0x1fc1801 +.word 0x2ff +.word 0x800318f2 +.word 0x2ff +.word 0x80000030 +.word 0x1d6b1ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x26fffdf7 +.word 0x2ff +.word 0x520008b0 +.word 0x2ff +.word 0x24000008 +.word 0x2ff +.word 0x520008b0 +.word 0x2ff +.word 0x24000200 +.word 0x2ff +.word 0x520008c1 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x81e4c37d +.word 0x2ff +.word 0x81e4db7d +.word 0x2ff +.word 0x81e4ab7d +.word 0x2ff +.word 0x81f8cb3c +.word 0x2ff +.word 0x80052ff2 +.word 0x2ff +.word 0x81fbe33c +.word 0x2ff +.word 0x52002fea +.word 0x2ff +.word 0x81f5b33c +.word 0x2ff +.word 0x1f84000 +.word 0x2ff +.word 0x1fb4001 +.word 0x2ff +.word 0x1f54002 +.word 0x2ff +.word 0x800040f5 +.word 0x2ff +.word 0x81e4c37d +.word 0x2ff +.word 0x81e4db7d +.word 0x2ff +.word 0x81e4ab7d +.word 0x2ff +.word 0x50003073 +.word 0x2ff +.word 0x80003175 +.word 0x2ff +.word 0x80001935 +.word 0x2ff +.word 0x1f51802 +.word 0x2ff +.word 0x800029b5 +.word 0x2ff +.word 0x1f81800 +.word 0x2ff +.word 0x1fb1801 +.word 0x2ff +.word 0x800318f2 +.word 0x1d5a9ff +.word 0x1f61802 +.word 0x2ff +.word 0x1f91800 +.word 0x2ff +.word 0x1fc1801 +.word 0x2ff +.word 0x800318f2 +.word 0x2ff +.word 0x80000030 +.word 0x1d6b1ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x26fffefb +.word 0x2ff +.word 0x520008b0 +.word 0x2ff +.word 0x24000004 +.word 0x2ff +.word 0x520008b0 +.word 0x2ff +.word 0x24000100 +.word 0x2ff +.word 0x520008c1 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x81e4c37d +.word 0x2ff +.word 0x81e4db7d +.word 0x2ff +.word 0x81e4ab7d +.word 0x2ff +.word 0x81f8cb3c +.word 0x2ff +.word 0x80052ff2 +.word 0x2ff +.word 0x81fbe33c +.word 0x2ff +.word 0x52002fea +.word 0x2ff +.word 0x81f5b33c +.word 0x2ff +.word 0x1f84000 +.word 0x2ff +.word 0x1fb4001 +.word 0x2ff +.word 0x1f54002 +.word 0x2ff +.word 0x800040f5 +.word 0x2ff +.word 0x81e4c37d +.word 0x2ff +.word 0x81e4db7d +.word 0x2ff +.word 0x81e4ab7d +.word 0x2ff +.word 0x5000304d +.word 0x2ff +.word 0x80003175 +.word 0x2ff +.word 0x80001935 +.word 0x2ff +.word 0x1f51802 +.word 0x2ff +.word 0x800029b5 +.word 0x2ff +.word 0x1f81800 +.word 0x2ff +.word 0x1fb1801 +.word 0x2ff +.word 0x800318f2 +.word 0x1d5a9ff +.word 0x1f61802 +.word 0x2ff +.word 0x1f91800 +.word 0x2ff +.word 0x1fc1801 +.word 0x2ff +.word 0x800318f2 +.word 0x2ff +.word 0x80000030 +.word 0x1d6b1ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x26ffff7d +.word 0x2ff +.word 0x520008b0 +.word 0x2ff +.word 0x24000002 +.word 0x2ff +.word 0x520008b0 +.word 0x2ff +.word 0x24000080 +.word 0x2ff +.word 0x520008c1 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x81e4c37d +.word 0x2ff +.word 0x81e4db7d +.word 0x2ff +.word 0x81e4ab7d +.word 0x2ff +.word 0x81f8cb3c +.word 0x2ff +.word 0x80052ff2 +.word 0x2ff +.word 0x81fbe33c +.word 0x2ff +.word 0x52002fea +.word 0x2ff +.word 0x81f5b33c +.word 0x2ff +.word 0x1f84000 +.word 0x2ff +.word 0x1fb4001 +.word 0x2ff +.word 0x1f54002 +.word 0x2ff +.word 0x800040f5 +.word 0x2ff +.word 0x81e4c37d +.word 0x2ff +.word 0x81e4db7d +.word 0x2ff +.word 0x81e4ab7d +.word 0x2ff +.word 0x50003027 +.word 0x2ff +.word 0x80003175 +.word 0x2ff +.word 0x80001935 +.word 0x2ff +.word 0x1f51802 +.word 0x2ff +.word 0x800029b5 +.word 0x2ff +.word 0x1f81800 +.word 0x2ff +.word 0x1fb1801 +.word 0x2ff +.word 0x800318f2 +.word 0x1d5a9ff +.word 0x1f61802 +.word 0x2ff +.word 0x1f91800 +.word 0x2ff +.word 0x1fc1801 +.word 0x2ff +.word 0x800318f2 +.word 0x2ff +.word 0x80000030 +.word 0x1d6b1ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x26ffffbe +.word 0x2ff +.word 0x520008b0 +.word 0x2ff +.word 0x24000001 +.word 0x2ff +.word 0x520008b0 +.word 0x2ff +.word 0x24000040 +.word 0x2ff +.word 0x520008c1 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x81e4c37d +.word 0x2ff +.word 0x81e4db7d +.word 0x2ff +.word 0x81e4ab7d +.word 0x2ff +.word 0x81f8cb3c +.word 0x2ff +.word 0x80052ff2 +.word 0x2ff +.word 0x81fbe33c +.word 0x2ff +.word 0x52002fea +.word 0x2ff +.word 0x81f5b33c +.word 0x2ff +.word 0x1f84000 +.word 0x2ff +.word 0x1fb4001 +.word 0x2ff +.word 0x1f54002 +.word 0x2ff +.word 0x800040f5 +.word 0x2ff +.word 0x81e4c37d +.word 0x2ff +.word 0x81e4db7d +.word 0x2ff +.word 0x81e4ab7d +.word 0x2ff +.word 0x50003001 +.word 0x2ff +.word 0x80003175 +.word 0x2ff +.word 0x48006800 +.word 0x2ff +.word 0x80000030 +.word 0x2ff +.word 0x40000757 +.word 0x2ff +.word 0x800637f2 +.word 0x2ff +.word 0x81e4c37d +.word 0x1f5b5ec +.word 0x81e4db7d +.word 0x1f8ceac +.word 0x81e4ab7d +.word 0x1fbe76c +.word 0x50032752 +.word 0x2ff +.word 0x80000030 +.word 0x37bf82 +.word 0x80000030 +.word 0x55af83 +.word 0x81def3bc +.word 0x2ff +.word 0x800003bf +.word 0x2ff +.word 0x80000030 +.word 0x1e0d69c +.word 0x80000030 +.word 0x1e0ef5c +.word 0x80000030 +.word 0x1e0bddc +.word 0x80000030 +.word 0x1fac6ac +.word 0x80000030 +.word 0x1fddf6c +.word 0x80000030 +.word 0x1f7adec +.word 0x80063072 +.word 0x2ff +.word 0x81e4d37d +.word 0x2ff +.word 0x81e4eb7d +.word 0x2ff +.word 0x40000744 +.word 0x2ff +.word 0x81e4bb7d +.word 0x2ff +.word 0x80000030 +.word 0x1f6adec +.word 0x80000030 +.word 0x1f9c6ac +.word 0x80000030 +.word 0x1fcdf6c +.word 0x80000030 +.word 0x37bf82 +.word 0x80000030 +.word 0x56b783 +.word 0x81def3bc +.word 0x2ff +.word 0x800003bf +.word 0x2ff +.word 0x80000030 +.word 0x1e0d69c +.word 0x80000030 +.word 0x1e0ef5c +.word 0x80000030 +.word 0x1e0bddc +.word 0x80000030 +.word 0x1faceac +.word 0x80000030 +.word 0x1fde76c +.word 0x80000030 +.word 0x1f7b5ec +.word 0x81e4d37d +.word 0x2ff +.word 0x81e4eb7d +.word 0x2ff +.word 0x40000733 +.word 0x2ff +.word 0x81e4bb7d +.word 0x2ff +.word 0x40000757 +.word 0x2ff +.word 0x800637f2 +.word 0x2ff +.word 0x81e4c37d +.word 0x1f5b5ec +.word 0x81e4db7d +.word 0x1f8ceac +.word 0x81e4ab7d +.word 0x1fbe76c +.word 0x50032752 +.word 0x2ff +.word 0x80000030 +.word 0x37bf81 +.word 0x80000030 +.word 0x95af83 +.word 0x81bef3bc +.word 0x2ff +.word 0x800003bf +.word 0x2ff +.word 0x80000030 +.word 0x1e0d69c +.word 0x80000030 +.word 0x1e0ef5c +.word 0x80000030 +.word 0x1e0bddc +.word 0x80000030 +.word 0x1fac6ac +.word 0x80000030 +.word 0x1fddf6c +.word 0x80000030 +.word 0x1f7adec +.word 0x80063072 +.word 0x2ff +.word 0x81e4d37d +.word 0x2ff +.word 0x81e4eb7d +.word 0x2ff +.word 0x40000744 +.word 0x2ff +.word 0x81e4bb7d +.word 0x2ff +.word 0x80000030 +.word 0x1f6adec +.word 0x80000030 +.word 0x1f9c6ac +.word 0x80000030 +.word 0x1fcdf6c +.word 0x80000030 +.word 0x37bf81 +.word 0x80000030 +.word 0x96b783 +.word 0x81bef3bc +.word 0x2ff +.word 0x800003bf +.word 0x2ff +.word 0x80000030 +.word 0x1e0d69c +.word 0x80000030 +.word 0x1e0ef5c +.word 0x80000030 +.word 0x1e0bddc +.word 0x80000030 +.word 0x1faceac +.word 0x80000030 +.word 0x1fde76c +.word 0x80000030 +.word 0x1f7b5ec +.word 0x81e4d37d +.word 0x2ff +.word 0x81e4eb7d +.word 0x2ff +.word 0x40000733 +.word 0x2ff +.word 0x81e4bb7d +.word 0x2ff +.word 0x40000757 +.word 0x2ff +.word 0x800637f2 +.word 0x2ff +.word 0x81e4c37d +.word 0x1f5b5ec +.word 0x81e4db7d +.word 0x1f8ceac +.word 0x81e4ab7d +.word 0x1fbe76c +.word 0x50032752 +.word 0x2ff +.word 0x80000030 +.word 0x37bf85 +.word 0x80000030 +.word 0x95af87 +.word 0x81bef3bc +.word 0x2ff +.word 0x800003bf +.word 0x2ff +.word 0x80000030 +.word 0x1e0d69c +.word 0x80000030 +.word 0x1e0ef5c +.word 0x80000030 +.word 0x1e0bddc +.word 0x80000030 +.word 0x1fac6a8 +.word 0x80000030 +.word 0x1fddf68 +.word 0x80000030 +.word 0x1f7ade8 +.word 0x80063072 +.word 0x2ff +.word 0x81e4d37d +.word 0x2ff +.word 0x81e4eb7d +.word 0x2ff +.word 0x40000744 +.word 0x2ff +.word 0x81e4bb7d +.word 0x2ff +.word 0x80000030 +.word 0x1f6adec +.word 0x80000030 +.word 0x1f9c6ac +.word 0x80000030 +.word 0x1fcdf6c +.word 0x80000030 +.word 0x37bf85 +.word 0x80000030 +.word 0x96b787 +.word 0x81bef3bc +.word 0x2ff +.word 0x800003bf +.word 0x2ff +.word 0x80000030 +.word 0x1e0d69c +.word 0x80000030 +.word 0x1e0ef5c +.word 0x80000030 +.word 0x1e0bddc +.word 0x80000030 +.word 0x1facea8 +.word 0x80000030 +.word 0x1fde768 +.word 0x80000030 +.word 0x1f7b5e8 +.word 0x81e4d37d +.word 0x2ff +.word 0x81e4eb7d +.word 0x2ff +.word 0x40000733 +.word 0x2ff +.word 0x81e4bb7d +.word 0x2ff +.word 0x40000757 +.word 0x2ff +.word 0x800637f2 +.word 0x2ff +.word 0x81e4c37d +.word 0x1f5b5ec +.word 0x81e4db7d +.word 0x1f8ceac +.word 0x81e4ab7d +.word 0x1fbe76c +.word 0x50032752 +.word 0x2ff +.word 0x80000030 +.word 0x37bf80 +.word 0x80000030 +.word 0x115af83 +.word 0x819ef3bc +.word 0x2ff +.word 0x800003bf +.word 0x2ff +.word 0x80000030 +.word 0x1e0d69c +.word 0x80000030 +.word 0x1e0ef5c +.word 0x80000030 +.word 0x1e0bddc +.word 0x80000030 +.word 0x1fac6ac +.word 0x80000030 +.word 0x1fddf6c +.word 0x80000030 +.word 0x1f7adec +.word 0x80063072 +.word 0x2ff +.word 0x81e4d37d +.word 0x2ff +.word 0x81e4eb7d +.word 0x2ff +.word 0x40000744 +.word 0x2ff +.word 0x81e4bb7d +.word 0x2ff +.word 0x80000030 +.word 0x1f6adec +.word 0x80000030 +.word 0x1f9c6ac +.word 0x80000030 +.word 0x1fcdf6c +.word 0x80000030 +.word 0x37bf80 +.word 0x80000030 +.word 0x116b783 +.word 0x819ef3bc +.word 0x2ff +.word 0x800003bf +.word 0x2ff +.word 0x80000030 +.word 0x1e0d69c +.word 0x80000030 +.word 0x1e0ef5c +.word 0x80000030 +.word 0x1e0bddc +.word 0x80000030 +.word 0x1faceac +.word 0x80000030 +.word 0x1fde76c +.word 0x80000030 +.word 0x1f7b5ec +.word 0x81e4d37d +.word 0x2ff +.word 0x81e4eb7d +.word 0x2ff +.word 0x40000733 +.word 0x2ff +.word 0x81e4bb7d +.word 0x2ff +.word 0x40000757 +.word 0x2ff +.word 0x800637f2 +.word 0x2ff +.word 0x81e4c37d +.word 0x1f5b5ec +.word 0x81e4db7d +.word 0x1f8ceac +.word 0x81e4ab7d +.word 0x1fbe76c +.word 0x50032752 +.word 0x2ff +.word 0x80000030 +.word 0x37bf84 +.word 0x80000030 +.word 0x115af87 +.word 0x819ef3bc +.word 0x2ff +.word 0x800003bf +.word 0x2ff +.word 0x80000030 +.word 0x1e0d69c +.word 0x80000030 +.word 0x1e0ef5c +.word 0x80000030 +.word 0x1e0bddc +.word 0x80000030 +.word 0x1fac6a8 +.word 0x80000030 +.word 0x1fddf68 +.word 0x80000030 +.word 0x1f7ade8 +.word 0x80063072 +.word 0x2ff +.word 0x81e4d37d +.word 0x2ff +.word 0x81e4eb7d +.word 0x2ff +.word 0x40000744 +.word 0x2ff +.word 0x81e4bb7d +.word 0x2ff +.word 0x80000030 +.word 0x1f6adec +.word 0x80000030 +.word 0x1f9c6ac +.word 0x80000030 +.word 0x1fcdf6c +.word 0x80000030 +.word 0x37bf84 +.word 0x80000030 +.word 0x116b787 +.word 0x819ef3bc +.word 0x2ff +.word 0x800003bf +.word 0x2ff +.word 0x80000030 +.word 0x1e0d69c +.word 0x80000030 +.word 0x1e0ef5c +.word 0x80000030 +.word 0x1e0bddc +.word 0x80000030 +.word 0x1facea8 +.word 0x80000030 +.word 0x1fde768 +.word 0x80000030 +.word 0x1f7b5e8 +.word 0x81e4d37d +.word 0x2ff +.word 0x81e4eb7d +.word 0x2ff +.word 0x40000733 +.word 0x2ff +.word 0x81e4bb7d +.word 0x2ff \ No newline at end of file