diff --git a/decompiler/IR2/AtomicOp.cpp b/decompiler/IR2/AtomicOp.cpp index a139a7fb6f..9addab4dc7 100644 --- a/decompiler/IR2/AtomicOp.cpp +++ b/decompiler/IR2/AtomicOp.cpp @@ -539,6 +539,11 @@ goos::Object AsmOp::to_form(const std::vector& labels, const En } } + if (m_instr.kind == InstructionKind::MOVZ || m_instr.kind == InstructionKind::MOVN) { + RegisterAccess ra(AccessMode::READ, m_dst->reg(), m_dst->idx()); + forms.push_back(ra.to_form(env)); + } + return pretty_print::build_list(forms); } @@ -604,6 +609,10 @@ void AsmOp::update_register_info() { } } + if (m_instr.kind == InstructionKind::MOVN || m_instr.kind == InstructionKind::MOVZ) { + m_read_regs.push_back(m_dst->reg()); + } + if (m_instr.kind >= FIRST_COP2_MACRO && m_instr.kind <= LAST_COP2_MACRO) { switch (m_instr.kind) { case InstructionKind::VMSUBQ: @@ -711,6 +720,11 @@ void AsmOp::collect_vars(RegAccessSet& vars) const { vars.insert(*x); } } + + if (m_instr.kind == InstructionKind::MOVN || m_instr.kind == InstructionKind::MOVZ) { + RegisterAccess ra(AccessMode::READ, m_dst->reg(), m_dst->idx()); + vars.insert(ra); + } } ///////////////////////////// // Condition diff --git a/game/graphics/opengl_renderer/DirectRenderer.cpp b/game/graphics/opengl_renderer/DirectRenderer.cpp index a6b2b70405..5148dd79f0 100644 --- a/game/graphics/opengl_renderer/DirectRenderer.cpp +++ b/game/graphics/opengl_renderer/DirectRenderer.cpp @@ -73,15 +73,14 @@ void DirectRenderer::flush_pending(SharedRenderState* render_state) { m_test_state_needs_gl_update = false; } - u32* data = ( u32*)m_prim_buffer.verts.data(); - - + // hacks + // glEnable(GL_DEPTH_TEST); + // glDepthFunc(GL_ALWAYS); // render! // update buffers: glBindBuffer(GL_ARRAY_BUFFER, m_ogl.vertex_buffer); glBufferSubData(GL_ARRAY_BUFFER, 0, m_ogl.vertex_buffer_bytes, m_prim_buffer.verts.data()); - // glBufferSubData(GL_ARRAY_BUFFER, 0, m_ogl.vertex_buffer_bytes, verts); glBindBuffer(GL_ARRAY_BUFFER, m_ogl.color_buffer); glBufferSubData(GL_ARRAY_BUFFER, 0, m_ogl.color_buffer_bytes, m_prim_buffer.rgba_u8.data()); @@ -114,7 +113,7 @@ void DirectRenderer::update_gl_prim() { // currently gouraud is handled in setup. const auto& state = m_prim_gl_state; if (state.texture_enable) { - assert(false); + // assert(false); TODO } if (state.fogging_enable) { assert(false); @@ -257,10 +256,6 @@ void DirectRenderer::render_vif(u32 vif0, */ void DirectRenderer::render_gif(const u8* data, u32 size, SharedRenderState* render_state) { fmt::print("Render GIF: {}\n", size); - if (size == 224) { - lg::error("Skipping 224 sized GIF render.\n"); - return; - } assert(size >= 16); bool eop = false; @@ -280,12 +275,24 @@ void DirectRenderer::render_gif(const u8* data, u32 size, SharedRenderState* ren auto format = tag.flg(); if (format == GifTag::Format::PACKED) { + if (tag.pre()) { + handle_prim(tag.prim(), render_state); + } for (u32 loop = 0; loop < tag.nloop(); loop++) { for (u32 reg = 0; reg < nreg; reg++) { switch (reg_desc[reg]) { case GifTag::RegisterDescriptor::AD: handle_ad(data + offset, render_state); break; + case GifTag::RegisterDescriptor::ST: + handle_st_packed(data + offset); + break; + case GifTag::RegisterDescriptor::RGBAQ: + handle_rgbaq_packed(data + offset); + break; + case GifTag::RegisterDescriptor::XYZF2: + handle_xyzf2_packed(data + offset); + break; default: fmt::print("Register {} is not supported in packed mode yet\n", reg_descriptor_name(reg_desc[reg])); @@ -352,12 +359,17 @@ void DirectRenderer::handle_ad(const u8* data, SharedRenderState* render_state) case GsRegisterAddress::CLAMP_1: handle_clamp1(value); break; + case GsRegisterAddress::PRIM: + handle_prim(value, render_state); + break; // for now, ignore textures/fog. + // TODO case GsRegisterAddress::TEX1_1: case GsRegisterAddress::TEXA: case GsRegisterAddress::TEXCLUT: case GsRegisterAddress::FOGCOL: + case GsRegisterAddress::TEX0_1: break; default: fmt::print("Address {} is not supported\n", register_address_name(addr)); @@ -365,6 +377,45 @@ void DirectRenderer::handle_ad(const u8* data, SharedRenderState* render_state) } } +void DirectRenderer::handle_st_packed(const u8* data) { + // TODO +} + +void DirectRenderer::handle_rgbaq_packed(const u8* data) { + // TODO update Q from st. + m_prim_building.rgba_reg[0] = data[0]; + m_prim_building.rgba_reg[1] = data[4]; + m_prim_building.rgba_reg[2] = data[8]; + m_prim_building.rgba_reg[3] = data[12]; +} + +float u32_to_float(u32 in) { + double x = (double)in / UINT32_MAX; + return x * 2 - 1; +} + +void DirectRenderer::handle_xyzf2_packed(const u8* data) { + u32 x, y; + memcpy(&x, data, 4); + memcpy(&y, data + 4, 4); + + u64 upper; + memcpy(&upper, data + 8, 8); + u32 z = (upper >> 4) & 0xffffff; + u8 f = (upper >> 36); + bool adc = upper & (1ull << 47); + assert(!adc); + assert(!f); + // TODO (not this) + fmt::print("font vert at {} {}\n", u32_to_float(x), u32_to_float(y)); + + handle_xyzf2_common(x, y, z, f); +} + +void debug_print_vtx(const math::Vector& vtx) { + fmt::print("{} {}\n", u32_to_float(vtx.x()), u32_to_float(vtx.y())); +} + void DirectRenderer::handle_zbuf1(u64 val) { // note: we can basically ignore this. There's a single z buffer that's always configured the same // way - 24-bit, at offset 448. @@ -405,10 +456,15 @@ void DirectRenderer::handle_clamp1(u64 val) { void DirectRenderer::handle_prim(u64 val, SharedRenderState* render_state) { fmt::print("got prim: 0x{:x}\n", val); - // need to flush any in progress prims to the buffer. - if (m_prim_building.building_idx > 0) { - assert(false); // shouldn't leave any half-finished prims + if (m_prim_building.tri_strip_startup) { + m_prim_building.tri_strip_startup = 0; + m_prim_building.building_idx = 0; + } else { + if (m_prim_building.building_idx > 0) { + assert(false); // shouldn't leave any half-finished prims + } } + // need to flush any in progress prims to the buffer. GsPrim prim(val); if (m_prim_gl_state.current_register != prim || m_blend_state.alpha_blend_enable != prim.abe()) { @@ -428,22 +484,10 @@ void DirectRenderer::handle_rgbaq(u64 val) { fmt::print("a = 0x{:x}\n", m_prim_building.rgba_reg[3]); } -void DirectRenderer::handle_xyzf2(u64 val, SharedRenderState* render_state) { - if (m_prim_buffer.is_full()) { - flush_pending(render_state); - } - - m_prim_building.building_rgba[m_prim_building.building_idx] = m_prim_building.rgba_reg; - - // m_prim_buffer.rgba_u8[m_prim_buffer.vert_count] = m_prim_building.rgba; - - u32 x = val & 0xffff; - u32 y = (val >> 16) & 0xffff; - u32 z = (val >> 32) & 0xfffff; - u32 f = (val >> 56) & 0xff; - +void DirectRenderer::handle_xyzf2_common(u32 x, u32 y, u32 z, u8 f) { assert(f == 0); - m_prim_building.building_vert[m_prim_building.building_idx] = {x << 16, y << 16, z}; + m_prim_building.building_rgba.at(m_prim_building.building_idx) = m_prim_building.rgba_reg; + m_prim_building.building_vert.at(m_prim_building.building_idx) = {x << 16, y << 16, z}; m_prim_building.building_idx++; switch (m_prim_building.kind) { @@ -474,12 +518,42 @@ void DirectRenderer::handle_xyzf2(u64 val, SharedRenderState* render_state) { m_prim_building.building_idx = 0; } } break; + case GsPrim::Kind::TRI_STRIP: { + if (m_prim_building.building_idx == 3) { + m_prim_building.building_idx = 0; + } + + if (m_prim_building.tri_strip_startup < 3) { + m_prim_building.tri_strip_startup++; + } + if (m_prim_building.tri_strip_startup >= 3) { + m_prim_buffer.push(m_prim_building.building_rgba[0], m_prim_building.building_vert[0]); + m_prim_buffer.push(m_prim_building.building_rgba[1], m_prim_building.building_vert[1]); + m_prim_buffer.push(m_prim_building.building_rgba[2], m_prim_building.building_vert[2]); + } + + } break; default: fmt::print("prim type {} is unsupported.\n", (int)m_prim_building.kind); assert(false); } } +void DirectRenderer::handle_xyzf2(u64 val, SharedRenderState* render_state) { + if (m_prim_buffer.is_full()) { + flush_pending(render_state); + } + + // m_prim_buffer.rgba_u8[m_prim_buffer.vert_count] = m_prim_building.rgba; + + u32 x = val & 0xffff; + u32 y = (val >> 16) & 0xffff; + u32 z = (val >> 32) & 0xfffff; + u32 f = (val >> 56) & 0xff; + + handle_xyzf2_common(x, y, z, f); +} + void DirectRenderer::reset_state() { m_test_state_needs_gl_update = true; m_test_state = TestState(); @@ -489,6 +563,8 @@ void DirectRenderer::reset_state() { m_prim_gl_state_needs_gl_update = true; m_prim_gl_state = PrimGlState(); + + m_prim_building = PrimBuildState(); } void DirectRenderer::TestState::from_register(GsTest reg) { diff --git a/game/graphics/opengl_renderer/DirectRenderer.h b/game/graphics/opengl_renderer/DirectRenderer.h index 762c821be2..016dca602f 100644 --- a/game/graphics/opengl_renderer/DirectRenderer.h +++ b/game/graphics/opengl_renderer/DirectRenderer.h @@ -57,6 +57,11 @@ class DirectRenderer : public BucketRenderer { void handle_prim(u64 val, SharedRenderState* render_state); void handle_rgbaq(u64 val); void handle_xyzf2(u64 val, SharedRenderState* render_state); + void handle_st_packed(const u8* data); + void handle_rgbaq_packed(const u8* data); + void handle_xyzf2_packed(const u8* data); + + void handle_xyzf2_common(u32 x, u32 y, u32 z, u8 f); void update_gl_prim(); void update_gl_blend(); @@ -109,13 +114,14 @@ class DirectRenderer : public BucketRenderer { } m_prim_gl_state; // state set through the prim/rgbaq register that doesn't require changing GL stuff - struct PrimBufferState { + struct PrimBuildState { GsPrim::Kind kind = GsPrim::Kind::PRIM_7; math::Vector rgba_reg = {0, 0, 0, 0}; std::array, 3> building_rgba; std::array, 3> building_vert; int building_idx = 0; + int tri_strip_startup = 0; } m_prim_building; diff --git a/goal_src/engine/gfx/font.gc b/goal_src/engine/gfx/font.gc index bed3bc3c6d..b71b2ede79 100644 --- a/goal_src/engine/gfx/font.gc +++ b/goal_src/engine/gfx/font.gc @@ -10,18 +10,40 @@ ;`(set! ,result (shl (the-as int ,in) ,sa)) ) -(defmacro .movz (result value check) +(defmacro .movz (result value check original) `(if (= ,check 0) (set! ,result (the-as int ,value)) + (set! ,result (the-as int ,original)) ) ) -(defmacro .movn (result value check) +(defmacro .movz-128 (result value check original) + `(let ((temp (new 'stack 'array 'uint64 2))) + (set! (-> (the (pointer uint128) temp)) ,original) + (if (= ,check 0) + (set! (-> temp 0) ,value) + ) + (set! ,result (-> (the (pointer uint128) temp))) + ) + ) + +(defmacro .movn (result value check original) `(if (!= ,check 0) (set! ,result (the-as int ,value)) + (set! ,result (the-as int ,original)) ) ) +(defmacro .movn-128 (result value check original) + `(let ((temp (new 'stack-no-clear 'array 'uint64 2))) + (set! (-> (the (pointer uint128) temp)) ,original) + (if (!= ,check 0) + (set! (-> temp 0) (the uint ,value)) + ) + (set! ,result (-> (the (pointer uint128) temp))) + ) + ) + (defmacro .addu (result a b) `(set! ,result (sext32 (logand (+ (the-as int ,a) (the-as int ,b)) #xffffffff))) @@ -603,41 +625,1445 @@ ) ) -(defun draw-string ((arg0 string) (arg1 dma-buffer) (arg2 font-context)) - "Draw a string." - ;; note: this function is > 4000 instructions and around 80 kB of x86-64. - ;; it contains over 2000 iregisters. - ;;(declare (print-asm)) +; (defun draw-string ((arg0 string) (arg1 dma-buffer) (arg2 font-context)) +; "Draw a string." +; ;; note: this function is > 4000 instructions and around 80 kB of x86-64. +; ;; it contains over 2000 iregisters. +; ;;(declare (print-asm)) +; (local-vars +; (r0 uint128) +; (v0-0 float) +; (a0-2 int) +; (a3-1 (inline-array vector)) +; (a3-6 (inline-array vector)) +; (a3-8 (inline-array vector)) +; (t0-1 int) +; (t1-0 uint128) +; (t3-1 int) +; (t3-4 uint128) +; (t3-5 uint128) +; (t4-2 uint128) +; (t4-3 uint128) +; (t4-6 int) +; (t4-14 uint) +; (t4-16 int) +; (t4-17 int) +; (t4-18 int) +; (t4-19 int) +; (t4-23 int) +; (t4-32 int) +; (t4-33 int) +; (t4-36 uint128) +; (t4-37 uint128) +; (t5-1 uint128) +; (t5-2 uint128) +; (t5-3 uint) +; (t5-4 uint) +; (t5-6 int) +; (t5-7 int) +; (t5-9 int) +; (t5-10 uint) +; (t5-11 uint) +; (t5-13 int) +; (t5-14 int) +; (t5-17 int) +; (t5-18 int) +; (t5-19 int) +; (t5-20 int) +; (t5-23 int) ;; manually changed +; (t5-24 uint) +; (t5-25 uint) +; (t5-27 int) +; (t5-28 int) +; (t5-32 uint128) +; (t5-33 uint128) +; (t5-35 uint128) +; (t5-36 uint128) +; (t5-39 int) +; (t5-40 int) +; (t5-41 int) +; (t5-42 int) +; (t5-45 int) ;; manually changed +; (t6-0 uint128) +; (t6-1 uint128) +; (t6-3 uint) +; (t6-4 uint) +; (t6-5 uint) +; (t6-6 uint) +; (t6-7 uint) +; (t6-10 uint) +; (t6-11 uint) +; (t6-12 uint) +; (t6-13 uint) +; (t6-14 uint) +; (t6-16 uint) +; (t6-20 uint) +; (t6-21 uint) +; (t6-22 uint) +; (t6-23 uint) +; (t6-24 uint) +; (t6-28 uint128) +; (t6-29 uint128) +; (t6-31 uint) +; (t7-0 uint) +; (t7-2 uint) +; (t7-3 uint) +; (t7-4 uint) +; (t7-5 uint) +; (t7-6 uint) +; (t7-7 uint) +; (t7-8 uint) +; (t7-9 uint) +; (t7-10 uint) +; (t7-11 uint) +; (t7-12 uint) +; (t7-13 uint) +; (t7-14 uint) +; (t7-15 uint) +; (t7-16 uint) +; (t7-17 uint) +; (t7-18 uint) +; (t7-20 uint) +; (t7-21 uint) +; (t7-22 uint) +; (t7-23 uint) +; (t7-24 uint) +; (t7-25 uint) +; (t7-26 uint) +; (t7-27 uint) +; (t7-28 uint) +; (t7-29 uint) +; (t7-30 uint) +; (t7-31 uint) +; (t7-32 uint) +; (t7-33 uint) +; (t7-34 uint) +; (t7-35 uint) +; (t7-36 uint) +; (t7-38 uint) +; (t7-39 uint) +; (t7-40 uint) +; (t7-41 uint) +; (t7-42 uint) +; (t7-43 uint) +; (t7-44 uint) +; (t7-45 uint) +; (t7-46 uint) +; (t7-47 uint) +; (t7-48 uint) +; (t7-49 uint) +; (t7-50 uint) +; (t7-51 uint) +; (t7-52 uint) +; (t7-53 uint) +; (t8-0 uint) +; (t8-1 int) +; (t8-2 uint) +; (t8-3 int) +; (t8-4 uint) +; (t8-5 int) +; (f31-0 none) + +; (hack-str string) +; ) + +; ;(set! hack-str (new 'debug 'string 256 (the string #f))) +; ;(copy-string<-string hack-str arg0) +; ;(set! arg0 hack-str) + + +; (set! r0 (the-as uint128 0)) + +; ;;(inspect *font-work*) + +; (rlet ((acc :class vf) +; (Q :class vf) +; (vf0 :class vf) +; (vf1 :class vf) +; (vf10 :class vf) +; (vf11 :class vf) +; (vf12 :class vf) +; (vf13 :class vf) +; (vf14 :class vf) +; (vf15 :class vf) +; (vf16 :class vf) +; (vf17 :class vf) +; (vf18 :class vf) +; (vf19 :class vf) +; (vf2 :class vf) +; (vf23 :class vf) +; (vf24 :class vf) +; (vf25 :class vf) +; (vf26 :class vf) +; (vf27 :class vf) +; (vf28 :class vf) +; (vf29 :class vf) +; (vf3 :class vf) +; (vf30 :class vf) +; (vf31 :class vf) +; (vf4 :class vf) +; (vf5 :class vf) +; (vf6 :class vf) +; (vf7 :class vf) +; (vf8 :class vf) +; (vf9 :class vf) +; ) +; (init-vf0-vector) +; (let ((v1-0 *math-camera*)) +; (.lvf vf26 (&-> v1-0 hvdf-off quad)) +; (.lvf vf27 (&-> v1-0 hvdf-off quad)) +; ) +; (.add.w.vf vf26 vf26 vf0 :mask #b11) +; (.add.w.vf vf26 vf26 vf0 :mask #b1) +; (let ((v1-1 (-> arg2 mat))) +; (.lvf vf25 (&-> arg2 context-vec quad)) +; ;;(print-vf vf25 :name y-is-ctxt-ht) +; (.lvf vf23 (&-> arg2 origin quad)) +; ;;(print-vf vf23 :name vf23-init) +; (.lvf vf24 (&-> arg2 origin quad)) +; (.lvf vf28 (&-> v1-1 vector 0 quad)) +; (.lvf vf29 (&-> v1-1 vector 1 quad)) +; (.lvf vf30 (&-> v1-1 vector 2 quad)) +; (.lvf vf31 (&-> v1-1 vector 3 quad)) +; ) +; (let ((v1-3 *video-parms*)) +; (.lvf vf1 (+ (the int v1-3) 64)) +; ;;(print-vf vf1 :name vid-params) seems legit +; ) +; (.mul.vf vf25 vf25 vf1 :mask #b11) +; (.mul.vf vf23 vf23 vf1 :mask #b11) +; (.mul.vf vf24 vf24 vf1 :mask #b11) +; (let ((v1-5 *font-work*)) +; (set! (-> v1-5 buf) arg1) +; (let ((a1-1 (-> arg1 base))) +; (set! (-> v1-5 str-ptr) (the-as uint arg0)) +; (let ((t2-0 (-> arg2 flags-signed))) +; (.mov.vf vf1 vf0) +; (.mov.vf vf2 vf0) +; (.mov.vf vf3 vf0) +; (.mov.vf vf4 vf0) +; (set! (-> v1-5 flags) (the-as uint t2-0)) +; (.lvf vf16 (&-> v1-5 size-st1 quad)) +; (.lvf vf17 (&-> v1-5 size-st2 quad)) +; (.lvf vf18 (&-> v1-5 size-st3 quad)) +; (let ((a3-0 (logand t2-0 32))) +; (nop!) +; (b! (nonzero? a3-0) cfg-2 :delay (set! a3-1 *font12-table*)) +; ) +; (let ((a3-2 a3-1)) +; (nop!) +; (.lvf vf13 (&-> v1-5 size1-small quad)) +; (nop!) +; (.lvf vf14 (&-> v1-5 size2-small quad)) +; (nop!) +; (.lvf vf15 (&-> v1-5 size3-small quad)) +; (nop!) +; (let ((t0-0 (-> v1-5 small-font-lo-tmpl-qw))) +; (b! #t cfg-3 :delay (set! t1-0 (-> v1-5 small-font-hi-tmpl-qw))) +; (label cfg-2) +; (nop!) +; (set! a3-2 *font24-table*) +; (nop!) +; (.lvf vf13 (&-> v1-5 size1-large quad)) +; (nop!) +; (.lvf vf14 (&-> v1-5 size2-large quad)) +; (nop!) +; (.lvf vf15 (&-> v1-5 size3-large quad)) +; (nop!) +; (set! t0-0 (-> v1-5 large-font-lo-tmpl-qw)) +; (nop!) +; (set! t1-0 (-> v1-5 large-font-hi-tmpl-qw)) +; (label cfg-3) +; (let ((t3-0 (-> arg2 color-s32))) +; (nop!) +; (set! (-> v1-5 last-color-32) t3-0) +; (nop!) +; (.sll t3-1 t3-0 4) +; ) +; (nop!) +; (let ((t4-0 (the-as object (+ t3-1 (the-as int v1-5))))) +; (nop!) +; (nop!) +; (let ((t3-2 (the-as uint128 (-> (the-as (pointer uint32) t4-0) 496)))) +; (nop!) +; (let ((t5-0 (the-as uint128 (-> (the-as (pointer uint32) t4-0) 497)))) +; (.pextlb t6-0 r0 t3-2) +; (let +; ((t3-3 (the-as uint128 (-> (the-as (pointer uint32) t4-0) 498)))) +; (.pextlh t6-1 r0 t6-0) +; (let +; ((t4-1 (the-as uint128 (-> (the-as (pointer uint32) t4-0) 499)))) +; (.pextlb t5-1 r0 t5-0) +; (set! (-> v1-5 current-verts color 0 quad) (the-as uint128 t6-1)) +; (.pextlh t5-2 r0 t5-1) +; (set! (-> v1-5 dest-verts color 0 quad) (the-as uint128 t6-1)) +; (.pextlb t3-4 r0 t3-3) +; (set! (-> v1-5 current-verts color 1 quad) (the-as uint128 t5-2)) +; (.pextlh t3-5 r0 t3-4) +; (set! (-> v1-5 dest-verts color 1 quad) (the-as uint128 t5-2)) +; (.pextlb t4-2 r0 t4-1) +; ) +; ) +; ) +; ) +; ) +; (set! (-> v1-5 current-verts color 2 quad) (the-as uint128 t3-5)) +; (.pextlh t4-3 r0 t4-2) +; (set! (-> v1-5 dest-verts color 2 quad) (the-as uint128 t3-5)) +; (nop!) +; (set! (-> v1-5 current-verts color 3 quad) (the-as uint128 t4-3)) +; (nop!) +; (set! (-> v1-5 dest-verts color 3 quad) (the-as uint128 t4-3)) +; (let ((t3-6 (the-as object v1-5))) +; (nop!) +; (label cfg-4) +; (let ((t4-4 (-> (the-as (pointer uint8) arg0) 4))) +; (set! arg0 (the-as string (&-> (the-as (pointer uint8) arg0) 1))) +; ;;(format 0 "char at the top is '~c'~%" t4-4) +; (b! (zero? t4-4) cfg-67 :delay (set! t5-3 (+ t4-4 -1))) +; (b! (zero? t5-3) cfg-54 :delay (set! t5-4 (+ t4-4 -126))) +; (b! (nonzero? t5-4) cfg-55) +; ;; here, if we have a tilde arg. +; (set! t4-4 (-> (the-as (pointer uint8) arg0) 4)) + +; (set! arg0 (the-as string (&-> (the-as (pointer uint8) arg0) 1))) +; 0 +; (let ((t6-2 0)) +; (b! (zero? t4-4) cfg-67 :delay (set! t7-0 (+ t4-4 -43))) +; (.movz t5-6 (the-as int t4-4) t7-0) +; (let ((t7-1 (+ t4-4 -45))) +; (.movz t5-7 (the-as int t4-4) t7-1) +; ) +; (nop!) +; (b! (nonzero? t5-7) cfg-15 :delay (set! t7-2 (+ t4-4 -121))) +; (b! (zero? t7-2) cfg-52 :delay (set! t6-3 (+ t4-4 -89))) +; (b! (zero? t6-3) cfg-52 :delay (set! t6-4 (+ t4-4 -122))) +; (b! (zero? t6-4) cfg-53 :delay (set! t6-5 (+ t4-4 -90))) +; (b! (zero? t6-5) cfg-53 :delay (set! t6-6 (+ t4-4 -48))) +; (b! (< (the-as int t6-6) 0) cfg-55 :delay (set! t6-7 (+ t4-4 -57))) +; (b! +; (> (the-as int t6-7) 0) +; cfg-55 +; :delay +; (set! t6-2 (the-as int (+ t4-4 -48))) +; ) +; (label cfg-15) +; (set! t4-4 (-> (the-as (pointer uint8) arg0) 4)) +; (set! arg0 (the-as string (&-> (the-as (pointer uint8) arg0) 1))) +; (b! (zero? t4-4) cfg-67 :delay (set! t7-3 (+ t4-4 -110))) +; (b! (zero? t7-3) cfg-33 :delay (set! t7-4 (+ t4-4 -78))) +; (b! (zero? t7-4) cfg-33 :delay (set! t7-5 (+ t4-4 -108))) +; (b! (zero? t7-5) cfg-4 :delay (set! t7-6 (+ t4-4 -76))) +; (b! (zero? t7-6) cfg-4 :delay (set! t7-7 (+ t4-4 -119))) +; (b! (zero? t7-7) cfg-4 :delay (set! t7-8 (+ t4-4 -87))) +; (b! (zero? t7-8) cfg-4 :delay (set! t7-9 (+ t4-4 -107))) +; (b! (zero? t7-9) cfg-36 :delay (set! t7-10 (+ t4-4 -75))) +; (b! (zero? t7-10) cfg-36 :delay (set! t7-11 (+ t4-4 -106))) +; (b! (zero? t7-11) cfg-38 :delay (set! t7-12 (+ t4-4 -74))) +; (b! (zero? t7-12) cfg-38 :delay (set! t7-13 (+ t4-4 -104))) +; (b! (zero? t7-13) cfg-42 :delay (set! t7-14 (+ t4-4 -72))) +; (b! (zero? t7-14) cfg-42 :delay (set! t7-15 (+ t4-4 -118))) +; (b! (zero? t7-15) cfg-47 :delay (set! t7-16 (+ t4-4 -86))) +; (b! (zero? t7-16) cfg-47 :delay (set! t7-17 (+ t4-4 -48))) +; (b! (< (the-as int t7-17) 0) cfg-55 :delay (set! t8-0 (+ t4-4 -57))) +; (b! (> (the-as int t8-0) 0) cfg-55 :delay (.sll t8-1 t6-2 2)) +; (let ((t4-5 (+ t6-2 t8-1))) +; (nop!) +; (.sll t4-6 t4-5 1) +; ) +; (nop!) +; (b! #t cfg-15 :delay (set! t6-2 (+ t4-6 t7-17))) +; (label cfg-33) +; (b! (nonzero? t6-2) cfg-35 :delay (set! t0-1 -33)) +; (set! a3-2 *font12-table*) +; (.lvf vf13 (&-> v1-5 size1-small quad)) +; (nop!) +; (.lvf vf14 (&-> v1-5 size2-small quad)) +; (nop!) +; (.lvf vf15 (&-> v1-5 size3-small quad)) +; (set! t2-0 (logand t2-0 t0-1)) +; (set! t0-0 (-> v1-5 small-font-lo-tmpl-qw)) +; (b! #t cfg-4 :delay (set! t1-0 (-> v1-5 small-font-hi-tmpl-qw))) +; (label cfg-35) +; (nop!) +; (set! a3-2 *font24-table*) +; (nop!) +; (.lvf vf13 (&-> v1-5 size1-large quad)) +; (nop!) +; (.lvf vf14 (&-> v1-5 size2-large quad)) +; (nop!) +; (.lvf vf15 (&-> v1-5 size3-large quad)) +; (set! t2-0 (logior t2-0 32)) +; (set! t0-0 (-> v1-5 large-font-lo-tmpl-qw)) +; (b! #t cfg-4 :delay (set! t1-0 (-> v1-5 large-font-hi-tmpl-qw))) +; (label cfg-36) +; (let ((t4-7 -3)) +; (nop!) +; (b! (zero? t6-2) cfg-4 :delay (set! t2-0 (logand t2-0 t4-7))) +; ) +; (b! #t cfg-4 :delay (set! t2-0 (logior t2-0 2))) +; (label cfg-38) +; (let ((t4-8 -21) +; (t5-8 (+ t6-2 -2)) +; ) +; (b! (zero? t6-2) cfg-4 :delay (set! t2-0 (logand t2-0 t4-8))) +; (b! (zero? t5-8) cfg-41) +; ) +; (b! #t cfg-4 :delay (set! t2-0 (logior t2-0 16))) +; (label cfg-41) +; (b! #t cfg-4 :delay (set! t2-0 (logior t2-0 4))) +; (label cfg-42) +; (.mov vf1 t6-2) +; ;; (print-vf vf1 :name after-t6-2move) not hit +; (let ((t4-9 (+ t5-7 -45))) + +; (b! (zero? t5-7) cfg-46 :delay (.itof.vf vf1 vf1)) +; (b! (zero? t4-9) cfg-45) +; ) +; ;;(format 0 "AAAA~%") didn't get here +; (b! #t cfg-4 :delay (.add.x.vf vf23 vf23 vf1 :mask #b1)) +; (label cfg-45) +; ;;(format 0 "ASDFASDF~%") not here +; (b! #t cfg-4 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b1)) +; (label cfg-46) +; ;;(format 0 "2ASDFASDF~%") not here +; (b! #t cfg-4 :delay (.add.x.vf vf23 vf0 vf1 :mask #b1)) +; (label cfg-47) +; (.mov vf1 t6-2) +; ;;(print-vf vf1 :name after-t6-2move) +; ) +; (let ((t4-10 (+ t5-7 -45))) +; (b! (zero? t5-7) cfg-51 :delay (.itof.vf vf1 vf1)) +; (b! (zero? t4-10) cfg-50) +; ) +; (format 0 "NO~%") +; (b! #t cfg-4 :delay (.add.x.vf vf23 vf23 vf1 :mask #b10)) +; (label cfg-50) +; (format 0 "NO~%") +; (b! #t cfg-4 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b10)) +; (label cfg-51) +; (format 0 "NO~%") +; (b! #t cfg-4 :delay (.add.x.vf vf23 vf0 vf1 :mask #b10)) +; (label cfg-52) +; (format 0 "NO~%") +; (b! #t cfg-4 :delay (.svf (&-> v1-5 save quad) vf23)) +; (label cfg-53) +; (format 0 "NO~%") +; (b! #t cfg-4 :delay (.lvf vf23 (&-> v1-5 save quad))) +; (label cfg-54) +; (format 0 "NO~%") +; (let ((t4-11 (-> (the-as (pointer uint8) arg0) 4))) +; (set! arg0 (the-as string (&-> (the-as (pointer uint8) arg0) 1))) +; (.add.vf vf4 vf23 vf15 :mask #b111) +; (let ((t4-12 (logand t4-11 127))) +; (.sub.vf vf1 vf25 vf23) +; (let ((t4-13 (+ t4-12 255))) +; (b! #t cfg-62 :delay (.sll t5-9 (the-as int t4-13) 4)) +; ) +; ) +; ) +; (label cfg-55) +; ;; gets here with a non-tilde arg +; ;;(print-vf vf23 :name next-vf23) ;; these increase, like you'd expect +; (.add.vf vf4 vf23 vf15 :mask #b111) +; (.sll t5-9 (the-as int t4-4) 4) +; ;;(print-vf vf25 :name vf25) ;; 0.0 in y (suspicious of this) +; ;;(print-vf vf23 :name vf23) ;; -18.0 in y +; (.sub.vf vf1 vf25 vf23) +; ;;(print-vf vf1 :name bad-vf1) has -18.0 in y. + +; ;;(format 0 "!!!!~d ~c~%" t5-9 t4-4) also see first char here +; (b! (= t4-4 10) cfg-57 :delay (set! t4-14 (+ t4-4 -13))) +; ) +; (b! (nonzero? t4-14) cfg-62) +; (label cfg-57) +; (.sub.vf vf1 vf23 vf24) +; (b! (logtest? t2-0 16) cfg-60 :delay (set! t4-16 (logand t2-0 4))) +; (b! (nonzero? t4-16) cfg-61) +; (.add.x.vf vf23 vf0 vf24 :mask #b1) +; (nop!) +; (.svf (&-> (the-as font-work t3-6) justify 0 quad) vf23) +; (.add.w.vf vf23 vf23 vf15 :mask #b10) +; (b! +; #t +; cfg-4 +; :delay +; (set! t3-6 (-> (the-as font-work t3-6) font-tmpl gif)) +; ) +; (label cfg-60) +; (.sub.vf vf23 vf24 vf1 :mask #b1) +; (.svf (&-> (the-as font-work t3-6) justify 0 quad) vf23) +; (.add.x.vf vf23 vf0 vf24 :mask #b1) +; (.add.w.vf vf23 vf23 vf15 :mask #b10) +; (b! +; #t +; cfg-4 +; :delay +; (set! t3-6 (-> (the-as font-work t3-6) font-tmpl gif)) +; ) +; (label cfg-61) +; (.mul.w.vf vf1 vf1 vf16 :mask #b1) +; (nop!) +; (.sub.vf vf23 vf24 vf1 :mask #b1) +; (.svf (&-> (the-as font-work t3-6) justify 0 quad) vf23) +; (.add.x.vf vf23 vf0 vf24 :mask #b1) +; (.add.w.vf vf23 vf23 vf15 :mask #b10) +; (b! +; #t +; cfg-4 +; :delay +; (set! t3-6 (-> (the-as font-work t3-6) font-tmpl gif)) +; ) +; (label cfg-62) +; ;; stuff above is newline stuff. +; ;; here, I think t5-9 is the offset. +; ;;(format #t "at render part, offset is ~d~%" t5-9) seems legit +; (.addu t4-17 t5-9 a3-2) +; ;; (format #t "addu ~x ~x ~x~%" t4-17 t5-9 a3-2) +; (nop!) +; (.lvf vf5 (+ t4-17 -256)) +; ;;(print-vf vf5) +; (.mov t4-18 vf1) +; ;;(format #t "t4-18 = ~d~%" t4-18) we do take this branch, and I am pretty sure this is wrong. +; ;;(print-vf vf1) +; ;;(format #t "~%") + + + + +; ;; PART 2 (the good part) + +; (b! (< (the-as int t4-18) 0) cfg-67 :delay (.sra t4-19 t4-18 31)) +; (.mul.vf vf19 vf5 vf13) +; (b! (zero? (logand t2-0 2)) cfg-65) +; (b! #t cfg-66 :delay (.add.w.vf vf23 vf23 vf19 :mask #b1)) +; (label cfg-65) +; (nop!) +; (.add.w.vf vf23 vf23 vf14 :mask #b1) +; (label cfg-66) +; (b! #t cfg-4) +; (label cfg-67) +; ;;(print-vf vf23 :name vf23-good-part) +; ;;(format 0 "flag ~d~%" t2-0) +; (.sub.vf vf1 vf23 vf24) +; ;;(print-vf vf1 :name set-vf1) +; (b! (logtest? t2-0 16) cfg-70 :delay (set! a0-2 (logand t2-0 4))) +; (b! (nonzero? a0-2) cfg-71) +; (.add.x.vf vf23 vf0 vf24 :mask #b1) +; (nop!) +; (b! +; #t +; cfg-72 +; :delay +; (.svf (&-> (the-as font-work t3-6) justify 0 quad) vf23) +; ) +; (label cfg-70) +; ;; vf23.x is our position. +; ;; vf24 is the origin. +; ;; vf1 ?? +; ;;(print-vf vf1 :name vf1-sub) +; ;;(print-vf vf24 :name vf24-sub) +; (.sub.vf vf23 vf24 vf1 :mask #b1) +; ;;(print-vf vf23 :name vf23-good-part) +; (nop!) +; (b! +; #t +; cfg-72 +; :delay +; (.svf (&-> (the-as font-work t3-6) justify 0 quad) vf23) +; ) +; (label cfg-71) +; (.mul.w.vf vf1 vf1 vf16 :mask #b1) +; (nop!) +; (.sub.vf vf23 vf24 vf1 :mask #b1) +; (.svf (&-> (the-as font-work t3-6) justify 0 quad) vf23) +; ) +; (label cfg-72) +; (let ((a0-3 (-> v1-5 flags-signed))) +; (let ((t2-1 (the-as object v1-5)) +; (t3-7 (-> v1-5 str-ptr-signed)) +; ) +; (.lvf vf23 (&-> (the-as font-work t2-1) justify 0 quad)) +; (label cfg-73) +; (let ((t4-21 (-> t3-7 4))) +; ; (format #t "paa char ~c~%" t4-21) ;; we get here with the v. +; (set! t3-7 (&-> t3-7 1)) +; (b! (zero? t4-21) cfg-131 :delay (set! t5-10 (+ t4-21 -1))) +; (b! (zero? t5-10) cfg-121 :delay (set! t5-11 (+ t4-21 -126))) +; (b! (nonzero? t5-11) cfg-122) +; ;; get here as well +; (set! t4-21 (-> t3-7 4)) +; ;;(format #t "eat char ~c~%" t4-21) +; (set! t3-7 (&-> t3-7 1)) +; 0 +; (let ((t6-9 0)) +; (b! (zero? t4-21) cfg-131 :delay (set! t7-18 (+ t4-21 -43))) +; ; (format #t "movz ~d ~d ~d~%" t5-13 t4-21 t7-18) +; (.movz t5-13 (the-as int t4-21) t7-18) +; ; (format #t "res ~d~%" t5-13) +; (let ((t7-19 (+ t4-21 -45))) +; (.movz t5-14 (the-as int t4-21) t7-19) +; ) +; (nop!) +; (b! (nonzero? t5-14) cfg-84 :delay (set! t7-20 (+ t4-21 -121))) +; (b! (zero? t7-20) cfg-119 :delay (set! t6-10 (+ t4-21 -89))) +; (b! (zero? t6-10) cfg-119 :delay (set! t6-11 (+ t4-21 -122))) +; (b! (zero? t6-11) cfg-120 :delay (set! t6-12 (+ t4-21 -90))) +; (b! (zero? t6-12) cfg-120 :delay (set! t6-13 (+ t4-21 -48))) +; (b! +; (< (the-as int t6-13) 0) +; cfg-122 +; :delay +; (set! t6-14 (+ t4-21 -57)) +; ) +; (b! +; (> (the-as int t6-14) 0) +; cfg-122 +; :delay +; (set! t6-9 (the-as int (+ t4-21 -48))) +; ) +; (label cfg-84) +; (set! t4-21 (-> t3-7 4)) +; (set! t3-7 (&-> t3-7 1)) +; (b! (zero? t4-21) cfg-131 :delay (set! t7-21 (+ t4-21 -110))) +; (b! (zero? t7-21) cfg-102 :delay (set! t7-22 (+ t4-21 -78))) +; (b! (zero? t7-22) cfg-102 :delay (set! t7-23 (+ t4-21 -108))) +; (b! (zero? t7-23) cfg-73 :delay (set! t7-24 (+ t4-21 -76))) +; (b! (zero? t7-24) cfg-73 :delay (set! t7-25 (+ t4-21 -119))) +; (b! (zero? t7-25) cfg-105 :delay (set! t7-26 (+ t4-21 -87))) +; (b! (zero? t7-26) cfg-105 :delay (set! t7-27 (+ t4-21 -107))) +; (b! (zero? t7-27) cfg-107 :delay (set! t7-28 (+ t4-21 -75))) +; (b! (zero? t7-28) cfg-107 :delay (set! t7-29 (+ t4-21 -106))) +; (b! (zero? t7-29) cfg-73 :delay (set! t7-30 (+ t4-21 -74))) +; (b! (zero? t7-30) cfg-73 :delay (set! t7-31 (+ t4-21 -104))) +; (b! (zero? t7-31) cfg-109 :delay (set! t7-32 (+ t4-21 -72))) +; (b! (zero? t7-32) cfg-109 :delay (set! t7-33 (+ t4-21 -118))) +; (b! (zero? t7-33) cfg-114 :delay (set! t7-34 (+ t4-21 -86))) +; (b! (zero? t7-34) cfg-114 :delay (set! t7-35 (+ t4-21 -48))) +; (b! +; (< (the-as int t7-35) 0) +; cfg-122 +; :delay +; (set! t8-2 (+ t4-21 -57)) +; ) +; (b! (> (the-as int t8-2) 0) cfg-122 :delay (.sll t8-3 t6-9 2)) +; (let ((t4-22 (+ t6-9 t8-3))) +; (nop!) +; (.sll t4-23 t4-22 1) +; ) +; (nop!) +; (b! #t cfg-84 :delay (set! t6-9 (+ t4-23 t7-35))) +; (label cfg-102) +; (b! (nonzero? t6-9) cfg-104 :delay (set! a3-6 *font12-table*)) +; (set! a3-2 a3-6) +; (let ((t0-2 -33)) +; (.lvf vf13 (&-> v1-5 size1-small quad)) +; (nop!) +; (.lvf vf14 (&-> v1-5 size2-small quad)) +; (nop!) +; (.lvf vf15 (&-> v1-5 size3-small quad)) +; (set! a0-3 (logand a0-3 t0-2)) +; ) +; (set! t0-0 (-> v1-5 small-font-lo-tmpl-qw)) +; (b! #t cfg-73 :delay (set! t1-0 (-> v1-5 small-font-hi-tmpl-qw))) +; (label cfg-104) +; (nop!) +; (set! a3-2 *font24-table*) +; (nop!) +; (.lvf vf13 (&-> v1-5 size1-large quad)) +; (nop!) +; (.lvf vf14 (&-> v1-5 size2-large quad)) +; (nop!) +; (.lvf vf15 (&-> v1-5 size3-large quad)) +; (set! a0-3 (logior a0-3 32)) +; (set! t0-0 (-> v1-5 large-font-lo-tmpl-qw)) +; (b! #t cfg-73 :delay (set! t1-0 (-> v1-5 large-font-hi-tmpl-qw))) +; (label cfg-105) +; (let ((t4-24 -2)) +; (nop!) +; (b! (zero? t6-9) cfg-73 :delay (set! a0-3 (logand a0-3 t4-24))) +; ) +; (b! #t cfg-73 :delay (set! a0-3 (logior a0-3 1))) +; (label cfg-107) +; (let ((t4-25 -3)) +; (nop!) +; (b! (zero? t6-9) cfg-73 :delay (set! a0-3 (logand a0-3 t4-25))) +; ) +; (b! #t cfg-73 :delay (set! a0-3 (logior a0-3 2))) +; (label cfg-109) +; (.mov vf1 t6-9) +; (let ((t4-26 (+ t5-14 -45))) +; ; (format #t "itof122~%") +; (b! (zero? t5-14) cfg-113 :delay (.itof.vf vf1 vf1)) +; (b! (zero? t4-26) cfg-112) +; ) +; (b! #t cfg-73 :delay (.add.x.vf vf23 vf23 vf1 :mask #b1)) +; (label cfg-112) +; (b! #t cfg-73 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b1)) +; (label cfg-113) +; (b! #t cfg-73 :delay (.add.x.vf vf23 vf0 vf1 :mask #b1)) +; (label cfg-114) +; (.mov vf1 t6-9) +; ) +; (let ((t4-27 (+ t5-14 -45))) +; ; (format #t "itof12323~%") +; (b! (zero? t5-14) cfg-118 :delay (.itof.vf vf1 vf1)) +; (b! (zero? t4-27) cfg-117) +; ) +; (b! #t cfg-73 :delay (.add.x.vf vf23 vf23 vf1 :mask #b10)) +; (label cfg-117) +; (b! #t cfg-73 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b10)) +; (label cfg-118) +; (b! #t cfg-73 :delay (.add.x.vf vf23 vf0 vf1 :mask #b10)) +; (label cfg-119) +; (b! #t cfg-73 :delay (.svf (&-> v1-5 save quad) vf23)) +; (label cfg-120) +; (b! #t cfg-73 :delay (.lvf vf23 (&-> v1-5 save quad))) +; (label cfg-121) +; (set! t4-21 (-> t3-7 4)) +; (set! t3-7 (&-> t3-7 1)) +; (.add.vf vf4 vf23 vf15 :mask #b111) +; (let ((t5-15 (logand t4-21 127))) +; (.sub.vf vf1 vf25 vf23) +; (let ((t5-16 (+ t5-15 255))) +; (b! #t cfg-125 :delay (.sll t5-17 t5-16 4)) +; ) +; ) +; (label cfg-122) +; (.add.vf vf4 vf23 vf15 :mask #b111) +; (.sll t5-17 t4-21 4) +; (.sub.vf vf1 vf25 vf23) +; (b! (= t4-21 10) cfg-124 :delay (set! t6-16 (+ t4-21 -13))) +; (b! (nonzero? t6-16) cfg-125 :delay (logand a0-3 1)) +; (label cfg-124) +; (set! t2-1 (&-> (the-as (pointer uint64) t2-1) 2)) +; (nop!) +; (b! +; #t +; cfg-73 +; :delay +; (.lvf vf23 (+ (the-as int t2-1) 944)) +; ) +; (label cfg-125) ;; get here +; ; (format #t "aa~%") +; (.addu t5-18 t5-17 a3-2) +; (nop!) +; (.lvf vf5 (+ t5-18 -256)) +; (.mov t5-19 vf1) +; (b! +; (< (the-as int t5-19) 0) +; cfg-131 +; :delay +; (.add.vf vf6 vf5 vf16 :mask #b111) +; ) +; ; (format #t "b~%") +; (.sra t5-20 t5-19 31) +; (.add.vf vf7 vf5 vf17 :mask #b111) +; (b! (< t5-20 0) cfg-73 :delay (.add.vf vf8 vf5 vf18 :mask #b111)) +; (.add.vf vf1 vf23 vf0 :mask #b111) +; (nop!) +; (.add.vf vf2 vf23 vf13 :mask #b111) +; (.svf (&-> v1-5 current-verts tex-st 0 quad) vf5) +; (.add.vf vf3 vf23 vf14 :mask #b111) +; (.svf (&-> v1-5 current-verts tex-st 1 quad) vf6) +; (.mul.vf vf19 vf5 vf13) +; (.svf (&-> v1-5 current-verts tex-st 2 quad) vf7) +; (nop!) +; (.svf (&-> v1-5 current-verts tex-st 3 quad) vf8) +; (nop!) +; (.svf (&-> v1-5 current-verts pos 0 quad) vf1) +; (nop!) +; (.svf (&-> v1-5 current-verts pos 1 quad) vf2) +; (nop!) +; (.svf (&-> v1-5 current-verts pos 2 quad) vf3) +; (nop!) +; (.svf (&-> v1-5 current-verts pos 3 quad) vf4) +; (.lvf vf1 (&-> v1-5 current-verts pos 0 quad)) +; (nop!) +; (.lvf vf2 (&-> v1-5 current-verts pos 1 quad)) +; (.mul.w.vf acc vf31 vf0) +; (.lvf vf3 (&-> v1-5 current-verts pos 2 quad)) +; (.add.mul.x.vf acc vf28 vf1 acc) +; (.lvf vf4 (&-> v1-5 current-verts pos 3 quad)) +; (.add.mul.y.vf acc vf29 vf1 acc) +; (nop!) +; (.add.mul.z.vf vf1 vf30 vf1 acc) +; (nop!) +; (.mul.w.vf acc vf31 vf0) +; (nop!) +; (.add.mul.x.vf acc vf28 vf2 acc) +; (nop!) +; (.add.mul.y.vf acc vf29 vf2 acc) +; (nop!) +; (.add.mul.z.vf vf2 vf30 vf2 acc) +; (nop!) +; (.mul.w.vf acc vf31 vf0) +; (nop!) +; (.add.mul.x.vf acc vf28 vf3 acc) +; (nop!) +; (.add.mul.y.vf acc vf29 vf3 acc) +; (nop!) +; (.add.mul.z.vf vf3 vf30 vf3 acc) +; (nop!) +; (.mul.w.vf acc vf31 vf0) +; (nop!) +; (.add.mul.x.vf acc vf28 vf4 acc) +; (nop!) +; (.add.mul.y.vf acc vf29 vf4 acc) +; (nop!) +; (.add.mul.z.vf vf4 vf30 vf4 acc) +; (.div.vf Q vf25 vf1 :fsf #b10 :ftf #b11) +; (let ((t5-21 (-> v1-5 char-tmpl dma-vif quad))) +; (nop!) +; (let ((t6-18 (-> v1-5 char-tmpl quad 1))) +; (nop!) +; (set! (-> (the-as (pointer uint128) a1-1) 0) t5-21) +; (nop!) +; (set! (-> (the-as (pointer uint128) a1-1) 1) t6-18) +; ) +; ) +; (.lvf vf5 (&-> v1-5 current-verts tex-st 0 quad)) +; (.lvf vf6 (&-> v1-5 current-verts tex-st 1 quad)) +; (let ((t4-28 (logand t4-21 128))) +; (.lvf vf7 (&-> v1-5 current-verts tex-st 2 quad)) +; (.movn t5-23 t1-0 t4-28) +; ) +; ) +; ) +; (.mul.vf vf1 vf1 Q :mask #b111) +; (set! (-> (the-as (pointer uint128) a1-1) 2) (the-as uint128 t5-23)) +; (.mul.vf vf5 vf5 Q :mask #b111) +; (nop!) +; (.nop.vf) +; (nop!) +; (.nop.vf) +; (nop!) +; (.div.vf Q vf25 vf2 :fsf #b10 :ftf #b11) +; (nop!) +; (.lvf vf8 (&-> v1-5 current-verts tex-st 3 quad)) +; (nop!) +; (.add.vf vf1 vf1 vf26) +; (nop!) +; (.lvf vf9 (&-> v1-5 color-shadow quad)) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (vftoi4.xyzw vf1 vf1) +; (nop!) +; (.mul.vf vf2 vf2 Q :mask #b111) +; (nop!) +; (.mul.vf vf6 vf6 Q :mask #b111) +; (.svf (&-> (the-as (pointer uint128) a1-1) 3) vf5) +; (.nop.vf) +; (nop!) +; (.nop.vf) +; (nop!) +; (.div.vf Q vf25 vf3 :fsf #b10 :ftf #b11) +; (.svf (&-> (the-as (pointer uint128) a1-1) 4) vf9) +; (nop!) +; (.svf (&-> (the-as (pointer uint128) a1-1) 5) vf1) +; (.add.vf vf2 vf2 vf26) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (vftoi4.xyzw vf2 vf2) +; (nop!) +; (.mul.vf vf3 vf3 Q :mask #b111) +; (nop!) +; (.mul.vf vf7 vf7 Q :mask #b111) +; (.svf (&-> (the-as (pointer uint128) a1-1) 6) vf6) +; (.nop.vf) +; (nop!) +; (.nop.vf) +; (nop!) +; (.div.vf Q vf25 vf4 :fsf #b10 :ftf #b11) +; (.svf (&-> (the-as (pointer uint128) a1-1) 7) vf9) +; (nop!) +; (.svf (&-> (the-as (pointer uint128) a1-1) 8) vf2) +; (.add.vf vf3 vf3 vf26) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (vftoi4.xyzw vf3 vf3) +; (nop!) +; (.mul.vf vf4 vf4 Q :mask #b111) +; (nop!) +; (.mul.vf vf8 vf8 Q :mask #b111) +; (.svf (&-> (the-as (pointer uint128) a1-1) 9) vf7) +; (nop!) +; (.svf (&-> (the-as (pointer uint128) a1-1) 10) vf9) +; (.add.vf vf4 vf4 vf26) +; (.svf (&-> (the-as (pointer uint128) a1-1) 11) vf3) +; (let ((t4-29 (logand a0-3 2))) +; (nop!) +; (b! (zero? t4-29) cfg-129) +; ) +; ) +; (b! #t cfg-130 :delay (.add.w.vf vf23 vf23 vf19 :mask #b1)) +; (label cfg-129) +; (nop!) +; (.add.w.vf vf23 vf23 vf14 :mask #b1) +; (label cfg-130) +; (vftoi4.xyzw vf4 vf4) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (.svf (&-> (the-as (pointer uint128) a1-1) 12) vf8) +; (nop!) +; (.svf (&-> (the-as (pointer uint128) a1-1) 13) vf9) +; (nop!) +; (.svf (&-> (the-as (pointer uint128) a1-1) 14) vf4) +; (b! +; #t +; cfg-73 +; :delay +; (set! a1-1 (&-> (the-as (pointer uint128) a1-1) 15)) +; ) +; (label cfg-131) +; (let ((a0-4 (-> v1-5 flags-signed))) +; (let ((t2-2 (the-as object v1-5)) +; (t3-8 (-> v1-5 str-ptr-signed)) +; ) +; (.lvf vf23 (&-> (the-as font-work t2-2) justify 0 quad)) +; (label cfg-132) +; (let ((t4-30 (-> t3-8 4))) +; (set! t3-8 (&-> t3-8 1)) +; ;;(format #t "yac: ~c~%" t4-30) get the v here as well. +; (b! (zero? t4-30) cfg-189 :delay (set! t5-24 (+ t4-30 -1))) +; (b! (zero? t5-24) cfg-179 :delay (set! t5-25 (+ t4-30 -126))) +; (b! (nonzero? t5-25) cfg-180) +; (set! t4-30 (-> t3-8 4)) +; (set! t3-8 (&-> t3-8 1)) +; 0 +; (let ((t6-19 0)) +; (b! (zero? t4-30) cfg-189 :delay (set! t7-36 (+ t4-30 -43))) +; (.movz t5-27 t4-30 t7-36) +; (let ((t7-37 (+ t4-30 -45))) +; (.movz t5-28 t4-30 t7-37) +; ) +; (nop!) +; (b! (nonzero? t5-28) cfg-143 :delay (set! t7-38 (+ t4-30 -121))) +; (b! (zero? t7-38) cfg-177 :delay (set! t6-20 (+ t4-30 -89))) +; (b! (zero? t6-20) cfg-177 :delay (set! t6-21 (+ t4-30 -122))) +; (b! (zero? t6-21) cfg-178 :delay (set! t6-22 (+ t4-30 -90))) +; (b! (zero? t6-22) cfg-178 :delay (set! t6-23 (+ t4-30 -48))) +; (b! +; (< (the-as int t6-23) 0) +; cfg-180 +; :delay +; (set! t6-24 (+ t4-30 -57)) +; ) +; (b! +; (> (the-as int t6-24) 0) +; cfg-180 +; :delay +; (set! t6-19 (the-as int (+ t4-30 -48))) +; ) +; (label cfg-143) +; (set! t4-30 (-> t3-8 4)) +; (set! t3-8 (&-> t3-8 1)) +; (b! (zero? t4-30) cfg-189 :delay (set! t7-39 (+ t4-30 -110))) +; (b! (zero? t7-39) cfg-161 :delay (set! t7-40 (+ t4-30 -78))) +; (b! (zero? t7-40) cfg-161 :delay (set! t7-41 (+ t4-30 -108))) +; (b! (zero? t7-41) cfg-164 :delay (set! t7-42 (+ t4-30 -76))) +; (b! (zero? t7-42) cfg-164 :delay (set! t7-43 (+ t4-30 -119))) +; (b! (zero? t7-43) cfg-132 :delay (set! t7-44 (+ t4-30 -87))) +; (b! (zero? t7-44) cfg-132 :delay (set! t7-45 (+ t4-30 -107))) +; (b! (zero? t7-45) cfg-165 :delay (set! t7-46 (+ t4-30 -75))) +; (b! (zero? t7-46) cfg-165 :delay (set! t7-47 (+ t4-30 -106))) +; (b! (zero? t7-47) cfg-132 :delay (set! t7-48 (+ t4-30 -74))) +; (b! (zero? t7-48) cfg-132 :delay (set! t7-49 (+ t4-30 -104))) +; (b! (zero? t7-49) cfg-167 :delay (set! t7-50 (+ t4-30 -72))) +; (b! (zero? t7-50) cfg-167 :delay (set! t7-51 (+ t4-30 -118))) +; (b! (zero? t7-51) cfg-172 :delay (set! t7-52 (+ t4-30 -86))) +; (b! (zero? t7-52) cfg-172 :delay (set! t7-53 (+ t4-30 -48))) +; (b! +; (< (the-as int t7-53) 0) +; cfg-180 +; :delay +; (set! t8-4 (+ t4-30 -57)) +; ) +; (b! (> (the-as int t8-4) 0) cfg-180 :delay (.sll t8-5 t6-19 2)) +; (let ((t4-31 (+ t6-19 t8-5))) +; (nop!) +; (.sll t4-32 t4-31 1) +; ) +; (nop!) +; (b! #t cfg-143 :delay (set! t6-19 (+ t4-32 t7-53))) +; (label cfg-161) +; (b! (nonzero? t6-19) cfg-163 :delay (set! a3-8 *font12-table*)) +; (set! a3-2 a3-8) +; (let ((t0-3 -33)) +; (.lvf vf13 (&-> v1-5 size1-small quad)) +; (nop!) +; (.lvf vf14 (&-> v1-5 size2-small quad)) +; (nop!) +; (.lvf vf15 (&-> v1-5 size3-small quad)) +; (set! a0-4 (logand a0-4 t0-3)) +; ) +; (set! t0-0 (-> v1-5 small-font-lo-tmpl-qw)) +; (b! #t cfg-132 :delay (set! t1-0 (-> v1-5 small-font-hi-tmpl-qw))) +; (label cfg-163) +; (nop!) +; (set! a3-2 *font24-table*) +; (nop!) +; (.lvf vf13 (&-> v1-5 size1-large quad)) +; (nop!) +; (.lvf vf14 (&-> v1-5 size2-large quad)) +; (nop!) +; (.lvf vf15 (&-> v1-5 size3-large quad)) +; (set! a0-4 (logior a0-4 32)) +; (set! t0-0 (-> v1-5 large-font-lo-tmpl-qw)) +; (b! #t cfg-132 :delay (set! t1-0 (-> v1-5 large-font-hi-tmpl-qw))) +; (label cfg-164) +; (nop!) +; (set! (-> v1-5 last-color-32) t6-19) +; (.sll t4-33 t6-19 4) +; (let ((t5-29 (-> v1-5 current-verts color 0 quad)) +; (t4-34 (the-as object (+ t4-33 (the-as int v1-5)))) +; ) +; (let ((t6-25 (-> v1-5 current-verts color 1 quad))) +; (nop!) +; (set! (-> v1-5 src-verts color 0 quad) t5-29) +; (nop!) +; (set! (-> v1-5 src-verts color 1 quad) t6-25) +; ) +; (nop!) +; (let ((t5-30 (-> v1-5 current-verts color 2 quad))) +; (nop!) +; (let ((t6-26 (-> v1-5 current-verts color 3 quad))) +; (nop!) +; (set! (-> v1-5 src-verts color 2 quad) t5-30) +; (nop!) +; (set! (-> v1-5 src-verts color 3 quad) t6-26) +; ) +; ) +; (nop!) +; (let ((t6-27 (the-as uint128 (deref uint32 (+ (the-as int t4-34) 1984))))) +; (nop!) +; (let +; ((t5-31 +; (the-as +; uint128 +; (-> (the-as font-work t4-34) color-table 0 color 1) +; ) +; ) +; ) +; (.pextlb t6-28 r0 t6-27) +; ;;(.mov r0 f31-0) +; (.pextlh t6-29 r0 t6-28) +; ;;(.mov r0-2 f31-0) +; (.pextlb t5-32 r0 t5-31) +; ) +; ) +; (set! (-> v1-5 current-verts color 0 quad) (the-as uint128 t6-29)) +; (.pextlh t5-33 r0 t5-32) +; (set! (-> v1-5 dest-verts color 0 quad) (the-as uint128 t6-29)) +; (nop!) +; (set! (-> v1-5 current-verts color 1 quad) (the-as uint128 t5-33)) +; (nop!) +; (set! (-> v1-5 dest-verts color 1 quad) (the-as uint128 t5-33)) +; (nop!) +; (let +; ((t5-34 +; (the-as +; uint128 +; (-> (the-as font-work t4-34) color-table 0 color 2) +; ) +; ) +; ) +; (nop!) +; (let +; ((t4-35 +; (the-as +; uint128 +; (-> (the-as font-work t4-34) color-table 0 color 3) +; ) +; ) +; ) +; (.pextlb t5-35 r0 t5-34) +; ;;(.mov r0-3 f31-0) +; (.pextlh t5-36 r0 t5-35) +; ;;(.mov r0-0 f31-0) +; (.pextlb t4-36 r0 t4-35) +; ) +; ) +; ) +; (set! (-> v1-5 current-verts color 2 quad) (the-as uint128 t5-36)) +; (.pextlh t4-37 r0 t4-36) +; (set! (-> v1-5 dest-verts color 2 quad) (the-as uint128 t5-36)) +; (nop!) +; (set! (-> v1-5 current-verts color 3 quad) (the-as uint128 t4-37)) +; (b! +; #t +; cfg-132 +; :delay +; (set! +; (-> v1-5 dest-verts color 3 quad) +; (the-as uint128 (the-as int t4-37)) +; ) +; ) +; (label cfg-165) +; (let ((t4-38 -3)) +; (nop!) +; (b! (zero? t6-19) cfg-132 :delay (set! a0-4 (logand a0-4 t4-38))) +; ) +; (b! #t cfg-132 :delay (set! a0-4 (logior a0-4 2))) +; (label cfg-167) +; (.mov vf1 t6-19) +; (let ((t4-39 (+ t5-28 -45))) +; ; (format #t "itof13424~%") +; (b! (zero? t5-28) cfg-171 :delay (.itof.vf vf1 vf1)) +; (b! (zero? t4-39) cfg-170) +; ) +; (b! #t cfg-132 :delay (.add.x.vf vf23 vf23 vf1 :mask #b1)) +; (label cfg-170) +; (b! #t cfg-132 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b1)) +; (label cfg-171) +; (b! #t cfg-132 :delay (.add.x.vf vf23 vf0 vf1 :mask #b1)) +; (label cfg-172) +; (.mov vf1 t6-19) +; ) +; (let ((t4-40 (+ t5-28 -45))) +; ; (format #t "itof153532~%") +; (b! (zero? t5-28) cfg-176 :delay (.itof.vf vf1 vf1)) +; (b! (zero? t4-40) cfg-175) +; ) +; (b! #t cfg-132 :delay (.add.x.vf vf23 vf23 vf1 :mask #b10)) +; (label cfg-175) +; (b! #t cfg-132 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b10)) +; (label cfg-176) +; (b! #t cfg-132 :delay (.add.x.vf vf23 vf0 vf1 :mask #b10)) +; (label cfg-177) +; (nop!) +; (let ((t4-41 (-> v1-5 last-color-32))) +; (nop!) +; (.lvf vf9 (&-> v1-5 current-verts color 0 quad)) +; (nop!) +; (.lvf vf10 (&-> v1-5 current-verts color 1 quad)) +; (nop!) +; (.lvf vf11 (&-> v1-5 current-verts color 2 quad)) +; (nop!) +; (.lvf vf12 (&-> v1-5 current-verts color 3 quad)) +; (nop!) +; (set! (-> v1-5 save-last-color-32) t4-41) +; ) +; (nop!) +; (.svf (&-> v1-5 save-color 0 quad) vf9) +; (nop!) +; (.svf (&-> v1-5 save-color 1 quad) vf10) +; (nop!) +; (.svf (&-> v1-5 save-color 2 quad) vf11) +; (nop!) +; (.svf (&-> v1-5 save-color 3 quad) vf12) +; (b! #t cfg-132 :delay (.svf (&-> v1-5 save quad) vf23)) +; (label cfg-178) +; (nop!) +; (let ((t4-42 (-> v1-5 save-last-color-32))) +; (nop!) +; (.lvf vf9 (&-> v1-5 save-color 0 quad)) +; (nop!) +; (.lvf vf10 (&-> v1-5 save-color 1 quad)) +; (nop!) +; (.lvf vf11 (&-> v1-5 save-color 2 quad)) +; (nop!) +; (.lvf vf12 (&-> v1-5 save-color 3 quad)) +; (nop!) +; (set! (-> v1-5 last-color-32) t4-42) +; ) +; (nop!) +; (.svf (&-> v1-5 current-verts color 0 quad) vf9) +; (nop!) +; (.svf (&-> v1-5 dest-verts color 0 quad) vf9) +; (nop!) +; (.svf (&-> v1-5 current-verts color 1 quad) vf10) +; (nop!) +; (.svf (&-> v1-5 dest-verts color 1 quad) vf10) +; (nop!) +; (.svf (&-> v1-5 current-verts color 2 quad) vf11) +; (nop!) +; (.svf (&-> v1-5 dest-verts color 2 quad) vf11) +; (nop!) +; (.svf (&-> v1-5 current-verts color 3 quad) vf12) +; (nop!) +; (.svf (&-> v1-5 dest-verts color 3 quad) vf12) +; (b! #t cfg-132 :delay (.lvf vf23 (&-> v1-5 save quad))) +; (label cfg-179) +; (set! t4-30 (-> t3-8 4)) +; (set! t3-8 (&-> t3-8 1)) +; (.add.vf vf4 vf23 vf15 :mask #b111) +; (let ((t5-37 (logand t4-30 127))) +; (.sub.vf vf1 vf25 vf23) +; (let ((t5-38 (+ t5-37 255))) +; (b! #t cfg-183 :delay (.sll t5-39 t5-38 4)) +; ) +; ) +; (label cfg-180) +; ;;(format #t "aaaa~%") get here +; (.add.vf vf4 vf23 vf15 :mask #b111) +; (.sll t5-39 t4-30 4) +; (.sub.vf vf1 vf25 vf23) +; (b! (= t4-30 10) cfg-182 :delay (set! t6-31 (+ t4-30 -13))) +; (b! (nonzero? t6-31) cfg-183) +; (label cfg-182) +; (set! t2-2 (&-> (the-as (pointer uint64) t2-2) 2)) +; (nop!) +; (b! +; #t +; cfg-132 +; :delay +; (.lvf vf23 (+ (the-as int t2-2) 944)) +; ) +; (label cfg-183) +; ;;(format #t "ok~%") ;;here as well +; (.addu t5-40 t5-39 a3-2) +; (nop!) +; (.lvf vf5 (+ t5-40 -256)) +; (.mov t5-41 vf1) +; (b! +; (< (the-as int t5-41) 0) +; cfg-189 +; :delay +; (.add.vf vf6 vf5 vf16 :mask #b111) +; ) +; (.sra t5-42 t5-41 31) +; (.add.vf vf7 vf5 vf17 :mask #b111) +; (b! (< t5-42 0) cfg-132 :delay (.add.vf vf8 vf5 vf18 :mask #b111)) +; (.add.vf vf1 vf23 vf0 :mask #b111) +; (nop!) +; (.add.vf vf2 vf23 vf13 :mask #b111) +; (nop!) +; (.add.vf vf3 vf23 vf14 :mask #b111) +; (.svf (&-> v1-5 current-verts tex-st 0 quad) vf5) +; (.add.vf vf4 vf23 vf15 :mask #b111) +; (.svf (&-> v1-5 current-verts tex-st 1 quad) vf6) +; (.mul.vf vf19 vf5 vf13) +; (.svf (&-> v1-5 current-verts tex-st 2 quad) vf7) +; (nop!) +; (.svf (&-> v1-5 current-verts tex-st 3 quad) vf8) +; (nop!) +; (.svf (&-> v1-5 current-verts pos 0 quad) vf1) +; (nop!) +; (.svf (&-> v1-5 current-verts pos 1 quad) vf2) +; (nop!) +; (.svf (&-> v1-5 current-verts pos 2 quad) vf3) +; (nop!) +; (.svf (&-> v1-5 current-verts pos 3 quad) vf4) +; (.lvf vf1 (&-> v1-5 current-verts pos 0 quad)) +; (nop!) +; (.lvf vf2 (&-> v1-5 current-verts pos 1 quad)) +; (.mul.w.vf acc vf31 vf0) +; (.lvf vf3 (&-> v1-5 current-verts pos 2 quad)) +; (.add.mul.x.vf acc vf28 vf1 acc) +; (.lvf vf4 (&-> v1-5 current-verts pos 3 quad)) +; (.add.mul.y.vf acc vf29 vf1 acc) +; (nop!) +; (.add.mul.z.vf vf1 vf30 vf1 acc) +; (nop!) +; (.mul.w.vf acc vf31 vf0) +; (nop!) +; (.add.mul.x.vf acc vf28 vf2 acc) +; (nop!) +; (.add.mul.y.vf acc vf29 vf2 acc) +; (nop!) +; (.add.mul.z.vf vf2 vf30 vf2 acc) +; (nop!) +; (.mul.w.vf acc vf31 vf0) +; (nop!) +; (.add.mul.x.vf acc vf28 vf3 acc) +; (nop!) +; (.add.mul.y.vf acc vf29 vf3 acc) +; (nop!) +; (.add.mul.z.vf vf3 vf30 vf3 acc) +; (nop!) +; (.mul.w.vf acc vf31 vf0) +; (nop!) +; (.add.mul.x.vf acc vf28 vf4 acc) +; (nop!) +; (.add.mul.y.vf acc vf29 vf4 acc) +; (nop!) +; (.add.mul.z.vf vf4 vf30 vf4 acc) +; (.div.vf Q vf25 vf1 :fsf #b10 :ftf #b11) +; (let ((t5-43 (-> v1-5 char-tmpl dma-vif quad))) +; (nop!) +; (let ((t6-32 (-> v1-5 char-tmpl quad 1))) +; (nop!) +; (set! (-> (the-as (pointer uint128) a1-1) 0) t5-43) +; (nop!) +; (set! (-> (the-as (pointer uint128) a1-1) 1) t6-32) +; ) +; ) +; (.lvf vf5 (&-> v1-5 current-verts tex-st 0 quad)) +; (.lvf vf6 (&-> v1-5 current-verts tex-st 1 quad)) +; (let ((t4-43 (logand t4-30 128))) +; (.lvf vf7 (&-> v1-5 current-verts tex-st 2 quad)) +; (.movn t5-45 t1-0 t4-43) +; ) +; ) +; ) +; (.mul.vf vf1 vf1 Q :mask #b111) +; (set! (-> (the-as (pointer uint128) a1-1) 2) (the-as uint128 t5-45)) +; (.mul.vf vf5 vf5 Q :mask #b111) +; (nop!) +; (.nop.vf) +; (nop!) +; (.nop.vf) +; (nop!) +; (.div.vf Q vf25 vf2 :fsf #b10 :ftf #b11) +; (nop!) +; (.lvf vf8 (&-> v1-5 current-verts tex-st 3 quad)) +; (nop!) +; (.add.vf vf1 vf1 vf27) +; (nop!) +; (.lvf vf9 (&-> v1-5 current-verts color 0 quad)) +; (nop!) +; (.lvf vf10 (&-> v1-5 current-verts color 1 quad)) +; (nop!) +; (.lvf vf11 (&-> v1-5 current-verts color 2 quad)) +; (nop!) +; (vftoi4.xyzw vf1 vf1) +; (nop!) +; (.mul.vf vf2 vf2 Q :mask #b111) +; (nop!) +; (.mul.vf vf6 vf6 Q :mask #b111) +; (.svf (&-> (the-as (pointer uint128) a1-1) 3) vf5) +; (.nop.vf) +; (nop!) +; (.nop.vf) +; (nop!) +; (.div.vf Q vf25 vf3 :fsf #b10 :ftf #b11) +; (.svf (&-> (the-as (pointer uint128) a1-1) 4) vf9) +; (.lvf vf12 (&-> v1-5 current-verts color 3 quad)) +; (.svf (&-> (the-as (pointer uint128) a1-1) 5) vf1) +; (.add.vf vf2 vf2 vf27) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (vftoi4.xyzw vf2 vf2) +; (nop!) +; (.mul.vf vf3 vf3 Q :mask #b111) +; (nop!) +; (.mul.vf vf7 vf7 Q :mask #b111) +; (.svf (&-> (the-as (pointer uint128) a1-1) 6) vf6) +; (.nop.vf) +; (nop!) +; (.nop.vf) +; (nop!) +; (.div.vf Q vf25 vf4 :fsf #b10 :ftf #b11) +; (.svf (&-> (the-as (pointer uint128) a1-1) 7) vf10) +; (nop!) +; (.svf (&-> (the-as (pointer uint128) a1-1) 8) vf2) +; (.add.vf vf3 vf3 vf27) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; (vftoi4.xyzw vf3 vf3) +; (nop!) +; (.mul.vf vf4 vf4 Q :mask #b111) +; (nop!) +; (.mul.vf vf8 vf8 Q :mask #b111) +; (.svf (&-> (the-as (pointer uint128) a1-1) 9) vf7) +; (nop!) +; (.svf (&-> (the-as (pointer uint128) a1-1) 10) vf11) +; (.add.vf vf4 vf4 vf27) +; ;;(s.vf! (+ a1-1 176) vf3) +; (.svf (+ 176 (the int a1-1)) vf3) +; ;;(format #t "here~%") +; (let ((t4-44 (logand a0-4 2))) +; (nop!) +; (b! (zero? t4-44) cfg-187) +; ) +; ) +; ) +; ) +; ) +; (b! #t cfg-188 :delay (.add.w.vf vf23 vf23 vf19 :mask #b1)) +; (label cfg-187) +; (nop!) +; (.add.w.vf vf23 vf23 vf14 :mask #b1) +; (label cfg-188) +; (vftoi4.xyzw vf4 vf4) +; (nop!) +; (nop!) +; (nop!) +; (nop!) +; ;;(s.vf! (+ a1-1 192) vf8) +; (.svf (+ 192 (the int a1-1)) vf8) +; (nop!) +; ;;(s.vf! (+ a1-1 208) vf12) +; (.svf (+ 208 (the int a1-1)) vf12) +; (nop!) +; ;;(s.vf! (+ a1-1 224) vf4) +; (.svf (+ 224 (the int a1-1)) vf4) +; (b! #t cfg-132 :delay (set! a1-1 (the pointer (+ (the-as int a1-1) 240)))) +; (label cfg-189) +; (let ((v1-6 (-> v1-5 buf))) +; ;;(s.w! (+ v1-6 4) a1-1) +; (set! (-> (the-as (pointer pointer) v1-6) 1) a1-1) +; ) +; ) +; ) +; (.lvf vf24 (&-> arg2 origin quad)) +; ;; vf23.x is the x position of the string, which somehow moves backward... +; (.sub.vf vf23 vf23 vf24) +; (.mov v0-0 vf23) +; ;(print-vf vf0) +; ;;(format 0 "String result ~f~%" v0-0) +; v0-0 +; ) +; ) + + +(defun draw-string ((str-in string) (context dma-buffer) (arg2 font-context)) (local-vars (r0 uint128) (v0-0 float) (a0-2 int) - (a3-1 (inline-array vector)) + (font-table-12 (inline-array vector)) (a3-6 (inline-array vector)) (a3-8 (inline-array vector)) (t0-1 int) - (t1-0 uint128) - (t3-1 int) - (t3-4 uint128) - (t3-5 uint128) - (t4-2 uint128) - (t4-3 uint128) + (q-hi-tmpl uint128) + (color-array-prod int) + (q-verts-2t uint128) + (q-verts-2 uint128) + (q-verts-3t uint128) + (q-verts-3 uint128) (t4-6 int) - (t4-14 uint) + (fc-cr uint) (t4-16 int) (t4-17 int) - (t4-18 int) + (t4-18 float) (t4-19 int) (t4-23 int) (t4-32 int) (t4-33 int) (t4-36 uint128) (t4-37 uint128) - (t5-1 uint128) - (t5-2 uint128) - (t5-3 uint) - (t5-4 uint) + (q-verts-1t uint128) + (q-verts-1 uint128) + (not-sc-lit1 uint) + (not-sc-~ uint) (t5-6 int) (t5-7 int) (t5-9 int) @@ -647,9 +2073,9 @@ (t5-14 int) (t5-17 int) (t5-18 int) - (t5-19 int) + (t5-19 float) (t5-20 int) - (t5-23 int) ;; manually changed + (t5-23 uint128) (t5-24 uint) (t5-25 uint) (t5-27 int) @@ -660,11 +2086,11 @@ (t5-36 uint128) (t5-39 int) (t5-40 int) - (t5-41 int) + (t5-41 float) (t5-42 int) - (t5-45 int) ;; manually changed - (t6-0 uint128) - (t6-1 uint128) + (t5-45 uint128) + (q-verts-0t uint128) + (q-verts-0 uint128) (t6-3 uint) (t6-4 uint) (t6-5 uint) @@ -742,19 +2168,9 @@ (t8-4 uint) (t8-5 int) (f31-0 none) - - (hack-str string) ) - - ;(set! hack-str (new 'debug 'string 256 (the string #f))) - ;(copy-string<-string hack-str arg0) - ;(set! arg0 hack-str) - (set! r0 (the-as uint128 0)) - - ;;(inspect *font-work*) - (rlet ((acc :class vf) (Q :class vf) (vf0 :class vf) @@ -787,1228 +2203,1221 @@ (vf8 :class vf) (vf9 :class vf) ) - (init-vf0-vector) - (let ((v1-0 *math-camera*)) - (.lvf vf26 (&-> v1-0 hvdf-off quad)) - (.lvf vf27 (&-> v1-0 hvdf-off quad)) - ) - (.add.w.vf vf26 vf26 vf0 :mask #b11) - (.add.w.vf vf26 vf26 vf0 :mask #b1) - (let ((v1-1 (-> arg2 mat))) - (.lvf vf25 (&-> arg2 context-vec quad)) - ;;(print-vf vf25 :name y-is-ctxt-ht) - (.lvf vf23 (&-> arg2 origin quad)) - ;;(print-vf vf23 :name vf23-init) - (.lvf vf24 (&-> arg2 origin quad)) - (.lvf vf28 (&-> v1-1 vector 0 quad)) - (.lvf vf29 (&-> v1-1 vector 1 quad)) - (.lvf vf30 (&-> v1-1 vector 2 quad)) - (.lvf vf31 (&-> v1-1 vector 3 quad)) - ) - (let ((v1-3 *video-parms*)) - (.lvf vf1 (+ (the int v1-3) 64)) - ;;(print-vf vf1 :name vid-params) seems legit - ) - (.mul.vf vf25 vf25 vf1 :mask #b11) - (.mul.vf vf23 vf23 vf1 :mask #b11) - (.mul.vf vf24 vf24 vf1 :mask #b11) - (let ((v1-5 *font-work*)) - (set! (-> v1-5 buf) arg1) - (let ((a1-1 (-> arg1 base))) - (set! (-> v1-5 str-ptr) (the-as uint arg0)) - (let ((t2-0 (-> arg2 flags-signed))) - (.mov.vf vf1 vf0) - (.mov.vf vf2 vf0) - (.mov.vf vf3 vf0) - (.mov.vf vf4 vf0) - (set! (-> v1-5 flags) (the-as uint t2-0)) - (.lvf vf16 (&-> v1-5 size-st1 quad)) - (.lvf vf17 (&-> v1-5 size-st2 quad)) - (.lvf vf18 (&-> v1-5 size-st3 quad)) - (let ((a3-0 (logand t2-0 32))) - (nop!) - (b! (nonzero? a3-0) cfg-2 :delay (set! a3-1 *font12-table*)) + (init-vf0-vector) + (let ((v1-0 *math-camera*)) + (.lvf vf26 (&-> v1-0 hvdf-off quad)) + (.lvf vf27 (&-> v1-0 hvdf-off quad)) + ) + (.add.w.vf vf26 vf26 vf0 :mask #b11) + (.add.w.vf vf26 vf26 vf0 :mask #b1) + (let ((v1-1 (-> arg2 mat))) + (.lvf vf25 (&-> arg2 context-vec quad)) + (.lvf vf23 (&-> arg2 origin quad)) + (.lvf vf24 (&-> arg2 origin quad)) + (.lvf vf28 (&-> v1-1 vector 0 quad)) + (.lvf vf29 (&-> v1-1 vector 1 quad)) + (.lvf vf30 (&-> v1-1 vector 2 quad)) + (.lvf vf31 (&-> v1-1 vector 3 quad)) + ) + (let ((v1-3 *video-parms*)) + (.lvf vf1 (+ (the-as int v1-3) 64)) + ) + (.mul.vf vf25 vf25 vf1 :mask #b11) + (.mul.vf vf23 vf23 vf1 :mask #b11) + (.mul.vf vf24 vf24 vf1 :mask #b11) + (let ((fw *font-work*)) + (set! (-> fw buf) context) + (let ((dma-out (-> context base))) + (set! (-> fw str-ptr) (the-as uint str-in)) + (let ((flags (-> arg2 flags-signed))) + (.mov.vf vf1 vf0) + (.mov.vf vf2 vf0) + (.mov.vf vf3 vf0) + (.mov.vf vf4 vf0) + (set! (-> fw flags) (the-as uint flags)) + (.lvf vf16 (&-> fw size-st1 quad)) + (.lvf vf17 (&-> fw size-st2 quad)) + (.lvf vf18 (&-> fw size-st3 quad)) + (let ((has-flag-size24 (logand flags 32))) + (nop!) + (b! + (nonzero? has-flag-size24) + cfg-2 + :delay + (set! font-table-12 *font12-table*) + ) + ) + (let ((font-table-to-use font-table-12)) + (nop!) + (.lvf vf13 (&-> fw size1-small quad)) + (nop!) + (.lvf vf14 (&-> fw size2-small quad)) + (nop!) + (.lvf vf15 (&-> fw size3-small quad)) + (nop!) + (let ((q-lo-tmpl (-> fw small-font-lo-tmpl-qw))) + (b! #t cfg-3 :delay (set! q-hi-tmpl (-> fw small-font-hi-tmpl-qw))) + (label cfg-2) + (nop!) + (set! font-table-to-use *font24-table*) + (nop!) + (.lvf vf13 (&-> fw size1-large quad)) + (nop!) + (.lvf vf14 (&-> fw size2-large quad)) + (nop!) + (.lvf vf15 (&-> fw size3-large quad)) + (nop!) + (set! q-lo-tmpl (-> fw large-font-lo-tmpl-qw)) + (nop!) + (set! q-hi-tmpl (-> fw large-font-hi-tmpl-qw)) + (label cfg-3) + (let ((in-color (-> arg2 color-s32))) + (nop!) + (set! (-> fw last-color-32) in-color) + (nop!) + (.sll color-array-prod in-color 4) + ) + (nop!) + (let ((fw+col (the-as object (+ color-array-prod (the-as int fw))))) + (nop!) + (nop!) + (let + ((q-verts-0p + (the-as uint128 (-> (the-as (pointer uint32) fw+col) 496)) ) - (let ((a3-2 a3-1)) - (nop!) - (.lvf vf13 (&-> v1-5 size1-small quad)) - (nop!) - (.lvf vf14 (&-> v1-5 size2-small quad)) - (nop!) - (.lvf vf15 (&-> v1-5 size3-small quad)) - (nop!) - (let ((t0-0 (-> v1-5 small-font-lo-tmpl-qw))) - (b! #t cfg-3 :delay (set! t1-0 (-> v1-5 small-font-hi-tmpl-qw))) - (label cfg-2) - (nop!) - (set! a3-2 *font24-table*) - (nop!) - (.lvf vf13 (&-> v1-5 size1-large quad)) - (nop!) - (.lvf vf14 (&-> v1-5 size2-large quad)) - (nop!) - (.lvf vf15 (&-> v1-5 size3-large quad)) - (nop!) - (set! t0-0 (-> v1-5 large-font-lo-tmpl-qw)) - (nop!) - (set! t1-0 (-> v1-5 large-font-hi-tmpl-qw)) - (label cfg-3) - (let ((t3-0 (-> arg2 color-s32))) - (nop!) - (set! (-> v1-5 last-color-32) t3-0) - (nop!) - (.sll t3-1 t3-0 4) - ) - (nop!) - (let ((t4-0 (the-as object (+ t3-1 (the-as int v1-5))))) - (nop!) - (nop!) - (let ((t3-2 (the-as uint128 (-> (the-as (pointer uint32) t4-0) 496)))) - (nop!) - (let ((t5-0 (the-as uint128 (-> (the-as (pointer uint32) t4-0) 497)))) - (.pextlb t6-0 r0 t3-2) - (let - ((t3-3 (the-as uint128 (-> (the-as (pointer uint32) t4-0) 498)))) - (.pextlh t6-1 r0 t6-0) - (let - ((t4-1 (the-as uint128 (-> (the-as (pointer uint32) t4-0) 499)))) - (.pextlb t5-1 r0 t5-0) - (set! (-> v1-5 current-verts color 0 quad) (the-as uint128 t6-1)) - (.pextlh t5-2 r0 t5-1) - (set! (-> v1-5 dest-verts color 0 quad) (the-as uint128 t6-1)) - (.pextlb t3-4 r0 t3-3) - (set! (-> v1-5 current-verts color 1 quad) (the-as uint128 t5-2)) - (.pextlh t3-5 r0 t3-4) - (set! (-> v1-5 dest-verts color 1 quad) (the-as uint128 t5-2)) - (.pextlb t4-2 r0 t4-1) - ) - ) - ) - ) - ) - (set! (-> v1-5 current-verts color 2 quad) (the-as uint128 t3-5)) - (.pextlh t4-3 r0 t4-2) - (set! (-> v1-5 dest-verts color 2 quad) (the-as uint128 t3-5)) - (nop!) - (set! (-> v1-5 current-verts color 3 quad) (the-as uint128 t4-3)) - (nop!) - (set! (-> v1-5 dest-verts color 3 quad) (the-as uint128 t4-3)) - (let ((t3-6 (the-as object v1-5))) - (nop!) - (label cfg-4) - (let ((t4-4 (-> (the-as (pointer uint8) arg0) 4))) - (set! arg0 (the-as string (&-> (the-as (pointer uint8) arg0) 1))) - ;;(format 0 "char at the top is '~c'~%" t4-4) - (b! (zero? t4-4) cfg-67 :delay (set! t5-3 (+ t4-4 -1))) - (b! (zero? t5-3) cfg-54 :delay (set! t5-4 (+ t4-4 -126))) - (b! (nonzero? t5-4) cfg-55) - ;; here, if we have a tilde arg. - (set! t4-4 (-> (the-as (pointer uint8) arg0) 4)) - - (set! arg0 (the-as string (&-> (the-as (pointer uint8) arg0) 1))) - 0 - (let ((t6-2 0)) - (b! (zero? t4-4) cfg-67 :delay (set! t7-0 (+ t4-4 -43))) - (.movz t5-6 (the-as int t4-4) t7-0) - (let ((t7-1 (+ t4-4 -45))) - (.movz t5-7 (the-as int t4-4) t7-1) - ) - (nop!) - (b! (nonzero? t5-7) cfg-15 :delay (set! t7-2 (+ t4-4 -121))) - (b! (zero? t7-2) cfg-52 :delay (set! t6-3 (+ t4-4 -89))) - (b! (zero? t6-3) cfg-52 :delay (set! t6-4 (+ t4-4 -122))) - (b! (zero? t6-4) cfg-53 :delay (set! t6-5 (+ t4-4 -90))) - (b! (zero? t6-5) cfg-53 :delay (set! t6-6 (+ t4-4 -48))) - (b! (< (the-as int t6-6) 0) cfg-55 :delay (set! t6-7 (+ t4-4 -57))) - (b! - (> (the-as int t6-7) 0) - cfg-55 - :delay - (set! t6-2 (the-as int (+ t4-4 -48))) - ) - (label cfg-15) - (set! t4-4 (-> (the-as (pointer uint8) arg0) 4)) - (set! arg0 (the-as string (&-> (the-as (pointer uint8) arg0) 1))) - (b! (zero? t4-4) cfg-67 :delay (set! t7-3 (+ t4-4 -110))) - (b! (zero? t7-3) cfg-33 :delay (set! t7-4 (+ t4-4 -78))) - (b! (zero? t7-4) cfg-33 :delay (set! t7-5 (+ t4-4 -108))) - (b! (zero? t7-5) cfg-4 :delay (set! t7-6 (+ t4-4 -76))) - (b! (zero? t7-6) cfg-4 :delay (set! t7-7 (+ t4-4 -119))) - (b! (zero? t7-7) cfg-4 :delay (set! t7-8 (+ t4-4 -87))) - (b! (zero? t7-8) cfg-4 :delay (set! t7-9 (+ t4-4 -107))) - (b! (zero? t7-9) cfg-36 :delay (set! t7-10 (+ t4-4 -75))) - (b! (zero? t7-10) cfg-36 :delay (set! t7-11 (+ t4-4 -106))) - (b! (zero? t7-11) cfg-38 :delay (set! t7-12 (+ t4-4 -74))) - (b! (zero? t7-12) cfg-38 :delay (set! t7-13 (+ t4-4 -104))) - (b! (zero? t7-13) cfg-42 :delay (set! t7-14 (+ t4-4 -72))) - (b! (zero? t7-14) cfg-42 :delay (set! t7-15 (+ t4-4 -118))) - (b! (zero? t7-15) cfg-47 :delay (set! t7-16 (+ t4-4 -86))) - (b! (zero? t7-16) cfg-47 :delay (set! t7-17 (+ t4-4 -48))) - (b! (< (the-as int t7-17) 0) cfg-55 :delay (set! t8-0 (+ t4-4 -57))) - (b! (> (the-as int t8-0) 0) cfg-55 :delay (.sll t8-1 t6-2 2)) - (let ((t4-5 (+ t6-2 t8-1))) - (nop!) - (.sll t4-6 t4-5 1) - ) - (nop!) - (b! #t cfg-15 :delay (set! t6-2 (+ t4-6 t7-17))) - (label cfg-33) - (b! (nonzero? t6-2) cfg-35 :delay (set! t0-1 -33)) - (set! a3-2 *font12-table*) - (.lvf vf13 (&-> v1-5 size1-small quad)) - (nop!) - (.lvf vf14 (&-> v1-5 size2-small quad)) - (nop!) - (.lvf vf15 (&-> v1-5 size3-small quad)) - (set! t2-0 (logand t2-0 t0-1)) - (set! t0-0 (-> v1-5 small-font-lo-tmpl-qw)) - (b! #t cfg-4 :delay (set! t1-0 (-> v1-5 small-font-hi-tmpl-qw))) - (label cfg-35) - (nop!) - (set! a3-2 *font24-table*) - (nop!) - (.lvf vf13 (&-> v1-5 size1-large quad)) - (nop!) - (.lvf vf14 (&-> v1-5 size2-large quad)) - (nop!) - (.lvf vf15 (&-> v1-5 size3-large quad)) - (set! t2-0 (logior t2-0 32)) - (set! t0-0 (-> v1-5 large-font-lo-tmpl-qw)) - (b! #t cfg-4 :delay (set! t1-0 (-> v1-5 large-font-hi-tmpl-qw))) - (label cfg-36) - (let ((t4-7 -3)) - (nop!) - (b! (zero? t6-2) cfg-4 :delay (set! t2-0 (logand t2-0 t4-7))) - ) - (b! #t cfg-4 :delay (set! t2-0 (logior t2-0 2))) - (label cfg-38) - (let ((t4-8 -21) - (t5-8 (+ t6-2 -2)) - ) - (b! (zero? t6-2) cfg-4 :delay (set! t2-0 (logand t2-0 t4-8))) - (b! (zero? t5-8) cfg-41) - ) - (b! #t cfg-4 :delay (set! t2-0 (logior t2-0 16))) - (label cfg-41) - (b! #t cfg-4 :delay (set! t2-0 (logior t2-0 4))) - (label cfg-42) - (.mov vf1 t6-2) - ;; (print-vf vf1 :name after-t6-2move) not hit - (let ((t4-9 (+ t5-7 -45))) - - (b! (zero? t5-7) cfg-46 :delay (.itof.vf vf1 vf1)) - (b! (zero? t4-9) cfg-45) - ) - ;;(format 0 "AAAA~%") didn't get here - (b! #t cfg-4 :delay (.add.x.vf vf23 vf23 vf1 :mask #b1)) - (label cfg-45) - ;;(format 0 "ASDFASDF~%") not here - (b! #t cfg-4 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b1)) - (label cfg-46) - ;;(format 0 "2ASDFASDF~%") not here - (b! #t cfg-4 :delay (.add.x.vf vf23 vf0 vf1 :mask #b1)) - (label cfg-47) - (.mov vf1 t6-2) - ;;(print-vf vf1 :name after-t6-2move) - ) - (let ((t4-10 (+ t5-7 -45))) - (b! (zero? t5-7) cfg-51 :delay (.itof.vf vf1 vf1)) - (b! (zero? t4-10) cfg-50) - ) - (format 0 "NO~%") - (b! #t cfg-4 :delay (.add.x.vf vf23 vf23 vf1 :mask #b10)) - (label cfg-50) - (format 0 "NO~%") - (b! #t cfg-4 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b10)) - (label cfg-51) - (format 0 "NO~%") - (b! #t cfg-4 :delay (.add.x.vf vf23 vf0 vf1 :mask #b10)) - (label cfg-52) - (format 0 "NO~%") - (b! #t cfg-4 :delay (.svf (&-> v1-5 save quad) vf23)) - (label cfg-53) - (format 0 "NO~%") - (b! #t cfg-4 :delay (.lvf vf23 (&-> v1-5 save quad))) - (label cfg-54) - (format 0 "NO~%") - (let ((t4-11 (-> (the-as (pointer uint8) arg0) 4))) - (set! arg0 (the-as string (&-> (the-as (pointer uint8) arg0) 1))) - (.add.vf vf4 vf23 vf15 :mask #b111) - (let ((t4-12 (logand t4-11 127))) - (.sub.vf vf1 vf25 vf23) - (let ((t4-13 (+ t4-12 255))) - (b! #t cfg-62 :delay (.sll t5-9 (the-as int t4-13) 4)) - ) - ) - ) - (label cfg-55) - ;; gets here with a non-tilde arg - ;;(print-vf vf23 :name next-vf23) ;; these increase, like you'd expect - (.add.vf vf4 vf23 vf15 :mask #b111) - (.sll t5-9 (the-as int t4-4) 4) - ;;(print-vf vf25 :name vf25) ;; 0.0 in y (suspicious of this) - ;;(print-vf vf23 :name vf23) ;; -18.0 in y - (.sub.vf vf1 vf25 vf23) - ;;(print-vf vf1 :name bad-vf1) has -18.0 in y. - - ;;(format 0 "!!!!~d ~c~%" t5-9 t4-4) also see first char here - (b! (= t4-4 10) cfg-57 :delay (set! t4-14 (+ t4-4 -13))) - ) - (b! (nonzero? t4-14) cfg-62) - (label cfg-57) - (.sub.vf vf1 vf23 vf24) - (b! (logtest? t2-0 16) cfg-60 :delay (set! t4-16 (logand t2-0 4))) - (b! (nonzero? t4-16) cfg-61) - (.add.x.vf vf23 vf0 vf24 :mask #b1) - (nop!) - (.svf (&-> (the-as font-work t3-6) justify 0 quad) vf23) - (.add.w.vf vf23 vf23 vf15 :mask #b10) - (b! - #t - cfg-4 - :delay - (set! t3-6 (-> (the-as font-work t3-6) font-tmpl gif)) - ) - (label cfg-60) - (.sub.vf vf23 vf24 vf1 :mask #b1) - (.svf (&-> (the-as font-work t3-6) justify 0 quad) vf23) - (.add.x.vf vf23 vf0 vf24 :mask #b1) - (.add.w.vf vf23 vf23 vf15 :mask #b10) - (b! - #t - cfg-4 - :delay - (set! t3-6 (-> (the-as font-work t3-6) font-tmpl gif)) - ) - (label cfg-61) - (.mul.w.vf vf1 vf1 vf16 :mask #b1) - (nop!) - (.sub.vf vf23 vf24 vf1 :mask #b1) - (.svf (&-> (the-as font-work t3-6) justify 0 quad) vf23) - (.add.x.vf vf23 vf0 vf24 :mask #b1) - (.add.w.vf vf23 vf23 vf15 :mask #b10) - (b! - #t - cfg-4 - :delay - (set! t3-6 (-> (the-as font-work t3-6) font-tmpl gif)) - ) - (label cfg-62) - ;; stuff above is newline stuff. - ;; here, I think t5-9 is the offset. - ;;(format #t "at render part, offset is ~d~%" t5-9) seems legit - (.addu t4-17 t5-9 a3-2) - ;; (format #t "addu ~x ~x ~x~%" t4-17 t5-9 a3-2) - (nop!) - (.lvf vf5 (+ t4-17 -256)) - ;;(print-vf vf5) - (.mov t4-18 vf1) - ;;(format #t "t4-18 = ~d~%" t4-18) we do take this branch, and I am pretty sure this is wrong. - ;;(print-vf vf1) - ;;(format #t "~%") - - - - - ;; PART 2 (the good part) - - (b! (< (the-as int t4-18) 0) cfg-67 :delay (.sra t4-19 t4-18 31)) - (.mul.vf vf19 vf5 vf13) - (b! (zero? (logand t2-0 2)) cfg-65) - (b! #t cfg-66 :delay (.add.w.vf vf23 vf23 vf19 :mask #b1)) - (label cfg-65) - (nop!) - (.add.w.vf vf23 vf23 vf14 :mask #b1) - (label cfg-66) - (b! #t cfg-4) - (label cfg-67) - ;;(print-vf vf23 :name vf23-good-part) - ;;(format 0 "flag ~d~%" t2-0) - (.sub.vf vf1 vf23 vf24) - ;;(print-vf vf1 :name set-vf1) - (b! (logtest? t2-0 16) cfg-70 :delay (set! a0-2 (logand t2-0 4))) - (b! (nonzero? a0-2) cfg-71) - (.add.x.vf vf23 vf0 vf24 :mask #b1) - (nop!) - (b! - #t - cfg-72 - :delay - (.svf (&-> (the-as font-work t3-6) justify 0 quad) vf23) - ) - (label cfg-70) - ;; vf23.x is our position. - ;; vf24 is the origin. - ;; vf1 ?? - ;;(print-vf vf1 :name vf1-sub) - ;;(print-vf vf24 :name vf24-sub) - (.sub.vf vf23 vf24 vf1 :mask #b1) - ;;(print-vf vf23 :name vf23-good-part) - (nop!) - (b! - #t - cfg-72 - :delay - (.svf (&-> (the-as font-work t3-6) justify 0 quad) vf23) - ) - (label cfg-71) - (.mul.w.vf vf1 vf1 vf16 :mask #b1) - (nop!) - (.sub.vf vf23 vf24 vf1 :mask #b1) - (.svf (&-> (the-as font-work t3-6) justify 0 quad) vf23) - ) - (label cfg-72) - (let ((a0-3 (-> v1-5 flags-signed))) - (let ((t2-1 (the-as object v1-5)) - (t3-7 (-> v1-5 str-ptr-signed)) - ) - (.lvf vf23 (&-> (the-as font-work t2-1) justify 0 quad)) - (label cfg-73) - (let ((t4-21 (-> t3-7 4))) - ; (format #t "paa char ~c~%" t4-21) ;; we get here with the v. - (set! t3-7 (&-> t3-7 1)) - (b! (zero? t4-21) cfg-131 :delay (set! t5-10 (+ t4-21 -1))) - (b! (zero? t5-10) cfg-121 :delay (set! t5-11 (+ t4-21 -126))) - (b! (nonzero? t5-11) cfg-122) - ;; get here as well - (set! t4-21 (-> t3-7 4)) - ;;(format #t "eat char ~c~%" t4-21) - (set! t3-7 (&-> t3-7 1)) - 0 - (let ((t6-9 0)) - (b! (zero? t4-21) cfg-131 :delay (set! t7-18 (+ t4-21 -43))) - ; (format #t "movz ~d ~d ~d~%" t5-13 t4-21 t7-18) - (.movz t5-13 (the-as int t4-21) t7-18) - ; (format #t "res ~d~%" t5-13) - (let ((t7-19 (+ t4-21 -45))) - (.movz t5-14 (the-as int t4-21) t7-19) - ) - (nop!) - (b! (nonzero? t5-14) cfg-84 :delay (set! t7-20 (+ t4-21 -121))) - (b! (zero? t7-20) cfg-119 :delay (set! t6-10 (+ t4-21 -89))) - (b! (zero? t6-10) cfg-119 :delay (set! t6-11 (+ t4-21 -122))) - (b! (zero? t6-11) cfg-120 :delay (set! t6-12 (+ t4-21 -90))) - (b! (zero? t6-12) cfg-120 :delay (set! t6-13 (+ t4-21 -48))) - (b! - (< (the-as int t6-13) 0) - cfg-122 - :delay - (set! t6-14 (+ t4-21 -57)) - ) - (b! - (> (the-as int t6-14) 0) - cfg-122 - :delay - (set! t6-9 (the-as int (+ t4-21 -48))) - ) - (label cfg-84) - (set! t4-21 (-> t3-7 4)) - (set! t3-7 (&-> t3-7 1)) - (b! (zero? t4-21) cfg-131 :delay (set! t7-21 (+ t4-21 -110))) - (b! (zero? t7-21) cfg-102 :delay (set! t7-22 (+ t4-21 -78))) - (b! (zero? t7-22) cfg-102 :delay (set! t7-23 (+ t4-21 -108))) - (b! (zero? t7-23) cfg-73 :delay (set! t7-24 (+ t4-21 -76))) - (b! (zero? t7-24) cfg-73 :delay (set! t7-25 (+ t4-21 -119))) - (b! (zero? t7-25) cfg-105 :delay (set! t7-26 (+ t4-21 -87))) - (b! (zero? t7-26) cfg-105 :delay (set! t7-27 (+ t4-21 -107))) - (b! (zero? t7-27) cfg-107 :delay (set! t7-28 (+ t4-21 -75))) - (b! (zero? t7-28) cfg-107 :delay (set! t7-29 (+ t4-21 -106))) - (b! (zero? t7-29) cfg-73 :delay (set! t7-30 (+ t4-21 -74))) - (b! (zero? t7-30) cfg-73 :delay (set! t7-31 (+ t4-21 -104))) - (b! (zero? t7-31) cfg-109 :delay (set! t7-32 (+ t4-21 -72))) - (b! (zero? t7-32) cfg-109 :delay (set! t7-33 (+ t4-21 -118))) - (b! (zero? t7-33) cfg-114 :delay (set! t7-34 (+ t4-21 -86))) - (b! (zero? t7-34) cfg-114 :delay (set! t7-35 (+ t4-21 -48))) - (b! - (< (the-as int t7-35) 0) - cfg-122 - :delay - (set! t8-2 (+ t4-21 -57)) - ) - (b! (> (the-as int t8-2) 0) cfg-122 :delay (.sll t8-3 t6-9 2)) - (let ((t4-22 (+ t6-9 t8-3))) - (nop!) - (.sll t4-23 t4-22 1) - ) - (nop!) - (b! #t cfg-84 :delay (set! t6-9 (+ t4-23 t7-35))) - (label cfg-102) - (b! (nonzero? t6-9) cfg-104 :delay (set! a3-6 *font12-table*)) - (set! a3-2 a3-6) - (let ((t0-2 -33)) - (.lvf vf13 (&-> v1-5 size1-small quad)) - (nop!) - (.lvf vf14 (&-> v1-5 size2-small quad)) - (nop!) - (.lvf vf15 (&-> v1-5 size3-small quad)) - (set! a0-3 (logand a0-3 t0-2)) - ) - (set! t0-0 (-> v1-5 small-font-lo-tmpl-qw)) - (b! #t cfg-73 :delay (set! t1-0 (-> v1-5 small-font-hi-tmpl-qw))) - (label cfg-104) - (nop!) - (set! a3-2 *font24-table*) - (nop!) - (.lvf vf13 (&-> v1-5 size1-large quad)) - (nop!) - (.lvf vf14 (&-> v1-5 size2-large quad)) - (nop!) - (.lvf vf15 (&-> v1-5 size3-large quad)) - (set! a0-3 (logior a0-3 32)) - (set! t0-0 (-> v1-5 large-font-lo-tmpl-qw)) - (b! #t cfg-73 :delay (set! t1-0 (-> v1-5 large-font-hi-tmpl-qw))) - (label cfg-105) - (let ((t4-24 -2)) - (nop!) - (b! (zero? t6-9) cfg-73 :delay (set! a0-3 (logand a0-3 t4-24))) - ) - (b! #t cfg-73 :delay (set! a0-3 (logior a0-3 1))) - (label cfg-107) - (let ((t4-25 -3)) - (nop!) - (b! (zero? t6-9) cfg-73 :delay (set! a0-3 (logand a0-3 t4-25))) - ) - (b! #t cfg-73 :delay (set! a0-3 (logior a0-3 2))) - (label cfg-109) - (.mov vf1 t6-9) - (let ((t4-26 (+ t5-14 -45))) - ; (format #t "itof122~%") - (b! (zero? t5-14) cfg-113 :delay (.itof.vf vf1 vf1)) - (b! (zero? t4-26) cfg-112) - ) - (b! #t cfg-73 :delay (.add.x.vf vf23 vf23 vf1 :mask #b1)) - (label cfg-112) - (b! #t cfg-73 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b1)) - (label cfg-113) - (b! #t cfg-73 :delay (.add.x.vf vf23 vf0 vf1 :mask #b1)) - (label cfg-114) - (.mov vf1 t6-9) - ) - (let ((t4-27 (+ t5-14 -45))) - ; (format #t "itof12323~%") - (b! (zero? t5-14) cfg-118 :delay (.itof.vf vf1 vf1)) - (b! (zero? t4-27) cfg-117) - ) - (b! #t cfg-73 :delay (.add.x.vf vf23 vf23 vf1 :mask #b10)) - (label cfg-117) - (b! #t cfg-73 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b10)) - (label cfg-118) - (b! #t cfg-73 :delay (.add.x.vf vf23 vf0 vf1 :mask #b10)) - (label cfg-119) - (b! #t cfg-73 :delay (.svf (&-> v1-5 save quad) vf23)) - (label cfg-120) - (b! #t cfg-73 :delay (.lvf vf23 (&-> v1-5 save quad))) - (label cfg-121) - (set! t4-21 (-> t3-7 4)) - (set! t3-7 (&-> t3-7 1)) - (.add.vf vf4 vf23 vf15 :mask #b111) - (let ((t5-15 (logand t4-21 127))) - (.sub.vf vf1 vf25 vf23) - (let ((t5-16 (+ t5-15 255))) - (b! #t cfg-125 :delay (.sll t5-17 t5-16 4)) - ) - ) - (label cfg-122) - (.add.vf vf4 vf23 vf15 :mask #b111) - (.sll t5-17 t4-21 4) - (.sub.vf vf1 vf25 vf23) - (b! (= t4-21 10) cfg-124 :delay (set! t6-16 (+ t4-21 -13))) - (b! (nonzero? t6-16) cfg-125 :delay (logand a0-3 1)) - (label cfg-124) - (set! t2-1 (&-> (the-as (pointer uint64) t2-1) 2)) - (nop!) - (b! - #t - cfg-73 - :delay - (.lvf vf23 (+ (the-as int t2-1) 944)) - ) - (label cfg-125) ;; get here - ; (format #t "aa~%") - (.addu t5-18 t5-17 a3-2) - (nop!) - (.lvf vf5 (+ t5-18 -256)) - (.mov t5-19 vf1) - (b! - (< (the-as int t5-19) 0) - cfg-131 - :delay - (.add.vf vf6 vf5 vf16 :mask #b111) - ) - ; (format #t "b~%") - (.sra t5-20 t5-19 31) - (.add.vf vf7 vf5 vf17 :mask #b111) - (b! (< t5-20 0) cfg-73 :delay (.add.vf vf8 vf5 vf18 :mask #b111)) - (.add.vf vf1 vf23 vf0 :mask #b111) - (nop!) - (.add.vf vf2 vf23 vf13 :mask #b111) - (.svf (&-> v1-5 current-verts tex-st 0 quad) vf5) - (.add.vf vf3 vf23 vf14 :mask #b111) - (.svf (&-> v1-5 current-verts tex-st 1 quad) vf6) - (.mul.vf vf19 vf5 vf13) - (.svf (&-> v1-5 current-verts tex-st 2 quad) vf7) - (nop!) - (.svf (&-> v1-5 current-verts tex-st 3 quad) vf8) - (nop!) - (.svf (&-> v1-5 current-verts pos 0 quad) vf1) - (nop!) - (.svf (&-> v1-5 current-verts pos 1 quad) vf2) - (nop!) - (.svf (&-> v1-5 current-verts pos 2 quad) vf3) - (nop!) - (.svf (&-> v1-5 current-verts pos 3 quad) vf4) - (.lvf vf1 (&-> v1-5 current-verts pos 0 quad)) - (nop!) - (.lvf vf2 (&-> v1-5 current-verts pos 1 quad)) - (.mul.w.vf acc vf31 vf0) - (.lvf vf3 (&-> v1-5 current-verts pos 2 quad)) - (.add.mul.x.vf acc vf28 vf1 acc) - (.lvf vf4 (&-> v1-5 current-verts pos 3 quad)) - (.add.mul.y.vf acc vf29 vf1 acc) - (nop!) - (.add.mul.z.vf vf1 vf30 vf1 acc) - (nop!) - (.mul.w.vf acc vf31 vf0) - (nop!) - (.add.mul.x.vf acc vf28 vf2 acc) - (nop!) - (.add.mul.y.vf acc vf29 vf2 acc) - (nop!) - (.add.mul.z.vf vf2 vf30 vf2 acc) - (nop!) - (.mul.w.vf acc vf31 vf0) - (nop!) - (.add.mul.x.vf acc vf28 vf3 acc) - (nop!) - (.add.mul.y.vf acc vf29 vf3 acc) - (nop!) - (.add.mul.z.vf vf3 vf30 vf3 acc) - (nop!) - (.mul.w.vf acc vf31 vf0) - (nop!) - (.add.mul.x.vf acc vf28 vf4 acc) - (nop!) - (.add.mul.y.vf acc vf29 vf4 acc) - (nop!) - (.add.mul.z.vf vf4 vf30 vf4 acc) - (.div.vf Q vf25 vf1 :fsf #b10 :ftf #b11) - (let ((t5-21 (-> v1-5 char-tmpl dma-vif quad))) - (nop!) - (let ((t6-18 (-> v1-5 char-tmpl quad 1))) - (nop!) - (set! (-> (the-as (pointer uint128) a1-1) 0) t5-21) - (nop!) - (set! (-> (the-as (pointer uint128) a1-1) 1) t6-18) - ) - ) - (.lvf vf5 (&-> v1-5 current-verts tex-st 0 quad)) - (.lvf vf6 (&-> v1-5 current-verts tex-st 1 quad)) - (let ((t4-28 (logand t4-21 128))) - (.lvf vf7 (&-> v1-5 current-verts tex-st 2 quad)) - (.movn t5-23 t1-0 t4-28) - ) - ) - ) - (.mul.vf vf1 vf1 Q :mask #b111) - (set! (-> (the-as (pointer uint128) a1-1) 2) (the-as uint128 t5-23)) - (.mul.vf vf5 vf5 Q :mask #b111) - (nop!) - (.nop.vf) - (nop!) - (.nop.vf) - (nop!) - (.div.vf Q vf25 vf2 :fsf #b10 :ftf #b11) - (nop!) - (.lvf vf8 (&-> v1-5 current-verts tex-st 3 quad)) - (nop!) - (.add.vf vf1 vf1 vf26) - (nop!) - (.lvf vf9 (&-> v1-5 color-shadow quad)) - (nop!) - (nop!) - (nop!) - (nop!) - (nop!) - (vftoi4.xyzw vf1 vf1) - (nop!) - (.mul.vf vf2 vf2 Q :mask #b111) - (nop!) - (.mul.vf vf6 vf6 Q :mask #b111) - (.svf (&-> (the-as (pointer uint128) a1-1) 3) vf5) - (.nop.vf) - (nop!) - (.nop.vf) - (nop!) - (.div.vf Q vf25 vf3 :fsf #b10 :ftf #b11) - (.svf (&-> (the-as (pointer uint128) a1-1) 4) vf9) - (nop!) - (.svf (&-> (the-as (pointer uint128) a1-1) 5) vf1) - (.add.vf vf2 vf2 vf26) - (nop!) - (nop!) - (nop!) - (nop!) - (nop!) - (nop!) - (nop!) - (vftoi4.xyzw vf2 vf2) - (nop!) - (.mul.vf vf3 vf3 Q :mask #b111) - (nop!) - (.mul.vf vf7 vf7 Q :mask #b111) - (.svf (&-> (the-as (pointer uint128) a1-1) 6) vf6) - (.nop.vf) - (nop!) - (.nop.vf) - (nop!) - (.div.vf Q vf25 vf4 :fsf #b10 :ftf #b11) - (.svf (&-> (the-as (pointer uint128) a1-1) 7) vf9) - (nop!) - (.svf (&-> (the-as (pointer uint128) a1-1) 8) vf2) - (.add.vf vf3 vf3 vf26) - (nop!) - (nop!) - (nop!) - (nop!) - (nop!) - (nop!) - (nop!) - (vftoi4.xyzw vf3 vf3) - (nop!) - (.mul.vf vf4 vf4 Q :mask #b111) - (nop!) - (.mul.vf vf8 vf8 Q :mask #b111) - (.svf (&-> (the-as (pointer uint128) a1-1) 9) vf7) - (nop!) - (.svf (&-> (the-as (pointer uint128) a1-1) 10) vf9) - (.add.vf vf4 vf4 vf26) - (.svf (&-> (the-as (pointer uint128) a1-1) 11) vf3) - (let ((t4-29 (logand a0-3 2))) - (nop!) - (b! (zero? t4-29) cfg-129) - ) - ) - (b! #t cfg-130 :delay (.add.w.vf vf23 vf23 vf19 :mask #b1)) - (label cfg-129) - (nop!) - (.add.w.vf vf23 vf23 vf14 :mask #b1) - (label cfg-130) - (vftoi4.xyzw vf4 vf4) - (nop!) - (nop!) - (nop!) - (nop!) - (.svf (&-> (the-as (pointer uint128) a1-1) 12) vf8) - (nop!) - (.svf (&-> (the-as (pointer uint128) a1-1) 13) vf9) - (nop!) - (.svf (&-> (the-as (pointer uint128) a1-1) 14) vf4) - (b! - #t - cfg-73 - :delay - (set! a1-1 (&-> (the-as (pointer uint128) a1-1) 15)) - ) - (label cfg-131) - (let ((a0-4 (-> v1-5 flags-signed))) - (let ((t2-2 (the-as object v1-5)) - (t3-8 (-> v1-5 str-ptr-signed)) - ) - (.lvf vf23 (&-> (the-as font-work t2-2) justify 0 quad)) - (label cfg-132) - (let ((t4-30 (-> t3-8 4))) - (set! t3-8 (&-> t3-8 1)) - ;;(format #t "yac: ~c~%" t4-30) get the v here as well. - (b! (zero? t4-30) cfg-189 :delay (set! t5-24 (+ t4-30 -1))) - (b! (zero? t5-24) cfg-179 :delay (set! t5-25 (+ t4-30 -126))) - (b! (nonzero? t5-25) cfg-180) - (set! t4-30 (-> t3-8 4)) - (set! t3-8 (&-> t3-8 1)) - 0 - (let ((t6-19 0)) - (b! (zero? t4-30) cfg-189 :delay (set! t7-36 (+ t4-30 -43))) - (.movz t5-27 t4-30 t7-36) - (let ((t7-37 (+ t4-30 -45))) - (.movz t5-28 t4-30 t7-37) - ) - (nop!) - (b! (nonzero? t5-28) cfg-143 :delay (set! t7-38 (+ t4-30 -121))) - (b! (zero? t7-38) cfg-177 :delay (set! t6-20 (+ t4-30 -89))) - (b! (zero? t6-20) cfg-177 :delay (set! t6-21 (+ t4-30 -122))) - (b! (zero? t6-21) cfg-178 :delay (set! t6-22 (+ t4-30 -90))) - (b! (zero? t6-22) cfg-178 :delay (set! t6-23 (+ t4-30 -48))) - (b! - (< (the-as int t6-23) 0) - cfg-180 - :delay - (set! t6-24 (+ t4-30 -57)) - ) - (b! - (> (the-as int t6-24) 0) - cfg-180 - :delay - (set! t6-19 (the-as int (+ t4-30 -48))) - ) - (label cfg-143) - (set! t4-30 (-> t3-8 4)) - (set! t3-8 (&-> t3-8 1)) - (b! (zero? t4-30) cfg-189 :delay (set! t7-39 (+ t4-30 -110))) - (b! (zero? t7-39) cfg-161 :delay (set! t7-40 (+ t4-30 -78))) - (b! (zero? t7-40) cfg-161 :delay (set! t7-41 (+ t4-30 -108))) - (b! (zero? t7-41) cfg-164 :delay (set! t7-42 (+ t4-30 -76))) - (b! (zero? t7-42) cfg-164 :delay (set! t7-43 (+ t4-30 -119))) - (b! (zero? t7-43) cfg-132 :delay (set! t7-44 (+ t4-30 -87))) - (b! (zero? t7-44) cfg-132 :delay (set! t7-45 (+ t4-30 -107))) - (b! (zero? t7-45) cfg-165 :delay (set! t7-46 (+ t4-30 -75))) - (b! (zero? t7-46) cfg-165 :delay (set! t7-47 (+ t4-30 -106))) - (b! (zero? t7-47) cfg-132 :delay (set! t7-48 (+ t4-30 -74))) - (b! (zero? t7-48) cfg-132 :delay (set! t7-49 (+ t4-30 -104))) - (b! (zero? t7-49) cfg-167 :delay (set! t7-50 (+ t4-30 -72))) - (b! (zero? t7-50) cfg-167 :delay (set! t7-51 (+ t4-30 -118))) - (b! (zero? t7-51) cfg-172 :delay (set! t7-52 (+ t4-30 -86))) - (b! (zero? t7-52) cfg-172 :delay (set! t7-53 (+ t4-30 -48))) - (b! - (< (the-as int t7-53) 0) - cfg-180 - :delay - (set! t8-4 (+ t4-30 -57)) - ) - (b! (> (the-as int t8-4) 0) cfg-180 :delay (.sll t8-5 t6-19 2)) - (let ((t4-31 (+ t6-19 t8-5))) - (nop!) - (.sll t4-32 t4-31 1) - ) - (nop!) - (b! #t cfg-143 :delay (set! t6-19 (+ t4-32 t7-53))) - (label cfg-161) - (b! (nonzero? t6-19) cfg-163 :delay (set! a3-8 *font12-table*)) - (set! a3-2 a3-8) - (let ((t0-3 -33)) - (.lvf vf13 (&-> v1-5 size1-small quad)) - (nop!) - (.lvf vf14 (&-> v1-5 size2-small quad)) - (nop!) - (.lvf vf15 (&-> v1-5 size3-small quad)) - (set! a0-4 (logand a0-4 t0-3)) - ) - (set! t0-0 (-> v1-5 small-font-lo-tmpl-qw)) - (b! #t cfg-132 :delay (set! t1-0 (-> v1-5 small-font-hi-tmpl-qw))) - (label cfg-163) - (nop!) - (set! a3-2 *font24-table*) - (nop!) - (.lvf vf13 (&-> v1-5 size1-large quad)) - (nop!) - (.lvf vf14 (&-> v1-5 size2-large quad)) - (nop!) - (.lvf vf15 (&-> v1-5 size3-large quad)) - (set! a0-4 (logior a0-4 32)) - (set! t0-0 (-> v1-5 large-font-lo-tmpl-qw)) - (b! #t cfg-132 :delay (set! t1-0 (-> v1-5 large-font-hi-tmpl-qw))) - (label cfg-164) - (nop!) - (set! (-> v1-5 last-color-32) t6-19) - (.sll t4-33 t6-19 4) - (let ((t5-29 (-> v1-5 current-verts color 0 quad)) - (t4-34 (the-as object (+ t4-33 (the-as int v1-5)))) - ) - (let ((t6-25 (-> v1-5 current-verts color 1 quad))) - (nop!) - (set! (-> v1-5 src-verts color 0 quad) t5-29) - (nop!) - (set! (-> v1-5 src-verts color 1 quad) t6-25) - ) - (nop!) - (let ((t5-30 (-> v1-5 current-verts color 2 quad))) - (nop!) - (let ((t6-26 (-> v1-5 current-verts color 3 quad))) - (nop!) - (set! (-> v1-5 src-verts color 2 quad) t5-30) - (nop!) - (set! (-> v1-5 src-verts color 3 quad) t6-26) - ) - ) - (nop!) - (let ((t6-27 (the-as uint128 (deref uint32 (+ (the-as int t4-34) 1984))))) - (nop!) - (let - ((t5-31 - (the-as - uint128 - (-> (the-as font-work t4-34) color-table 0 color 1) - ) - ) - ) - (.pextlb t6-28 r0 t6-27) - ;;(.mov r0 f31-0) - (.pextlh t6-29 r0 t6-28) - ;;(.mov r0-2 f31-0) - (.pextlb t5-32 r0 t5-31) - ) - ) - (set! (-> v1-5 current-verts color 0 quad) (the-as uint128 t6-29)) - (.pextlh t5-33 r0 t5-32) - (set! (-> v1-5 dest-verts color 0 quad) (the-as uint128 t6-29)) - (nop!) - (set! (-> v1-5 current-verts color 1 quad) (the-as uint128 t5-33)) - (nop!) - (set! (-> v1-5 dest-verts color 1 quad) (the-as uint128 t5-33)) - (nop!) - (let - ((t5-34 - (the-as - uint128 - (-> (the-as font-work t4-34) color-table 0 color 2) - ) - ) - ) - (nop!) - (let - ((t4-35 - (the-as - uint128 - (-> (the-as font-work t4-34) color-table 0 color 3) - ) - ) - ) - (.pextlb t5-35 r0 t5-34) - ;;(.mov r0-3 f31-0) - (.pextlh t5-36 r0 t5-35) - ;;(.mov r0-0 f31-0) - (.pextlb t4-36 r0 t4-35) - ) - ) - ) - (set! (-> v1-5 current-verts color 2 quad) (the-as uint128 t5-36)) - (.pextlh t4-37 r0 t4-36) - (set! (-> v1-5 dest-verts color 2 quad) (the-as uint128 t5-36)) - (nop!) - (set! (-> v1-5 current-verts color 3 quad) (the-as uint128 t4-37)) - (b! - #t - cfg-132 - :delay - (set! - (-> v1-5 dest-verts color 3 quad) - (the-as uint128 (the-as int t4-37)) - ) - ) - (label cfg-165) - (let ((t4-38 -3)) - (nop!) - (b! (zero? t6-19) cfg-132 :delay (set! a0-4 (logand a0-4 t4-38))) - ) - (b! #t cfg-132 :delay (set! a0-4 (logior a0-4 2))) - (label cfg-167) - (.mov vf1 t6-19) - (let ((t4-39 (+ t5-28 -45))) - ; (format #t "itof13424~%") - (b! (zero? t5-28) cfg-171 :delay (.itof.vf vf1 vf1)) - (b! (zero? t4-39) cfg-170) - ) - (b! #t cfg-132 :delay (.add.x.vf vf23 vf23 vf1 :mask #b1)) - (label cfg-170) - (b! #t cfg-132 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b1)) - (label cfg-171) - (b! #t cfg-132 :delay (.add.x.vf vf23 vf0 vf1 :mask #b1)) - (label cfg-172) - (.mov vf1 t6-19) - ) - (let ((t4-40 (+ t5-28 -45))) - ; (format #t "itof153532~%") - (b! (zero? t5-28) cfg-176 :delay (.itof.vf vf1 vf1)) - (b! (zero? t4-40) cfg-175) - ) - (b! #t cfg-132 :delay (.add.x.vf vf23 vf23 vf1 :mask #b10)) - (label cfg-175) - (b! #t cfg-132 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b10)) - (label cfg-176) - (b! #t cfg-132 :delay (.add.x.vf vf23 vf0 vf1 :mask #b10)) - (label cfg-177) - (nop!) - (let ((t4-41 (-> v1-5 last-color-32))) - (nop!) - (.lvf vf9 (&-> v1-5 current-verts color 0 quad)) - (nop!) - (.lvf vf10 (&-> v1-5 current-verts color 1 quad)) - (nop!) - (.lvf vf11 (&-> v1-5 current-verts color 2 quad)) - (nop!) - (.lvf vf12 (&-> v1-5 current-verts color 3 quad)) - (nop!) - (set! (-> v1-5 save-last-color-32) t4-41) - ) - (nop!) - (.svf (&-> v1-5 save-color 0 quad) vf9) - (nop!) - (.svf (&-> v1-5 save-color 1 quad) vf10) - (nop!) - (.svf (&-> v1-5 save-color 2 quad) vf11) - (nop!) - (.svf (&-> v1-5 save-color 3 quad) vf12) - (b! #t cfg-132 :delay (.svf (&-> v1-5 save quad) vf23)) - (label cfg-178) - (nop!) - (let ((t4-42 (-> v1-5 save-last-color-32))) - (nop!) - (.lvf vf9 (&-> v1-5 save-color 0 quad)) - (nop!) - (.lvf vf10 (&-> v1-5 save-color 1 quad)) - (nop!) - (.lvf vf11 (&-> v1-5 save-color 2 quad)) - (nop!) - (.lvf vf12 (&-> v1-5 save-color 3 quad)) - (nop!) - (set! (-> v1-5 last-color-32) t4-42) - ) - (nop!) - (.svf (&-> v1-5 current-verts color 0 quad) vf9) - (nop!) - (.svf (&-> v1-5 dest-verts color 0 quad) vf9) - (nop!) - (.svf (&-> v1-5 current-verts color 1 quad) vf10) - (nop!) - (.svf (&-> v1-5 dest-verts color 1 quad) vf10) - (nop!) - (.svf (&-> v1-5 current-verts color 2 quad) vf11) - (nop!) - (.svf (&-> v1-5 dest-verts color 2 quad) vf11) - (nop!) - (.svf (&-> v1-5 current-verts color 3 quad) vf12) - (nop!) - (.svf (&-> v1-5 dest-verts color 3 quad) vf12) - (b! #t cfg-132 :delay (.lvf vf23 (&-> v1-5 save quad))) - (label cfg-179) - (set! t4-30 (-> t3-8 4)) - (set! t3-8 (&-> t3-8 1)) - (.add.vf vf4 vf23 vf15 :mask #b111) - (let ((t5-37 (logand t4-30 127))) - (.sub.vf vf1 vf25 vf23) - (let ((t5-38 (+ t5-37 255))) - (b! #t cfg-183 :delay (.sll t5-39 t5-38 4)) - ) - ) - (label cfg-180) - ;;(format #t "aaaa~%") get here - (.add.vf vf4 vf23 vf15 :mask #b111) - (.sll t5-39 t4-30 4) - (.sub.vf vf1 vf25 vf23) - (b! (= t4-30 10) cfg-182 :delay (set! t6-31 (+ t4-30 -13))) - (b! (nonzero? t6-31) cfg-183) - (label cfg-182) - (set! t2-2 (&-> (the-as (pointer uint64) t2-2) 2)) - (nop!) - (b! - #t - cfg-132 - :delay - (.lvf vf23 (+ (the-as int t2-2) 944)) - ) - (label cfg-183) - ;;(format #t "ok~%") ;;here as well - (.addu t5-40 t5-39 a3-2) - (nop!) - (.lvf vf5 (+ t5-40 -256)) - (.mov t5-41 vf1) - (b! - (< (the-as int t5-41) 0) - cfg-189 - :delay - (.add.vf vf6 vf5 vf16 :mask #b111) - ) - (.sra t5-42 t5-41 31) - (.add.vf vf7 vf5 vf17 :mask #b111) - (b! (< t5-42 0) cfg-132 :delay (.add.vf vf8 vf5 vf18 :mask #b111)) - (.add.vf vf1 vf23 vf0 :mask #b111) - (nop!) - (.add.vf vf2 vf23 vf13 :mask #b111) - (nop!) - (.add.vf vf3 vf23 vf14 :mask #b111) - (.svf (&-> v1-5 current-verts tex-st 0 quad) vf5) - (.add.vf vf4 vf23 vf15 :mask #b111) - (.svf (&-> v1-5 current-verts tex-st 1 quad) vf6) - (.mul.vf vf19 vf5 vf13) - (.svf (&-> v1-5 current-verts tex-st 2 quad) vf7) - (nop!) - (.svf (&-> v1-5 current-verts tex-st 3 quad) vf8) - (nop!) - (.svf (&-> v1-5 current-verts pos 0 quad) vf1) - (nop!) - (.svf (&-> v1-5 current-verts pos 1 quad) vf2) - (nop!) - (.svf (&-> v1-5 current-verts pos 2 quad) vf3) - (nop!) - (.svf (&-> v1-5 current-verts pos 3 quad) vf4) - (.lvf vf1 (&-> v1-5 current-verts pos 0 quad)) - (nop!) - (.lvf vf2 (&-> v1-5 current-verts pos 1 quad)) - (.mul.w.vf acc vf31 vf0) - (.lvf vf3 (&-> v1-5 current-verts pos 2 quad)) - (.add.mul.x.vf acc vf28 vf1 acc) - (.lvf vf4 (&-> v1-5 current-verts pos 3 quad)) - (.add.mul.y.vf acc vf29 vf1 acc) - (nop!) - (.add.mul.z.vf vf1 vf30 vf1 acc) - (nop!) - (.mul.w.vf acc vf31 vf0) - (nop!) - (.add.mul.x.vf acc vf28 vf2 acc) - (nop!) - (.add.mul.y.vf acc vf29 vf2 acc) - (nop!) - (.add.mul.z.vf vf2 vf30 vf2 acc) - (nop!) - (.mul.w.vf acc vf31 vf0) - (nop!) - (.add.mul.x.vf acc vf28 vf3 acc) - (nop!) - (.add.mul.y.vf acc vf29 vf3 acc) - (nop!) - (.add.mul.z.vf vf3 vf30 vf3 acc) - (nop!) - (.mul.w.vf acc vf31 vf0) - (nop!) - (.add.mul.x.vf acc vf28 vf4 acc) - (nop!) - (.add.mul.y.vf acc vf29 vf4 acc) - (nop!) - (.add.mul.z.vf vf4 vf30 vf4 acc) - (.div.vf Q vf25 vf1 :fsf #b10 :ftf #b11) - (let ((t5-43 (-> v1-5 char-tmpl dma-vif quad))) - (nop!) - (let ((t6-32 (-> v1-5 char-tmpl quad 1))) - (nop!) - (set! (-> (the-as (pointer uint128) a1-1) 0) t5-43) - (nop!) - (set! (-> (the-as (pointer uint128) a1-1) 1) t6-32) - ) - ) - (.lvf vf5 (&-> v1-5 current-verts tex-st 0 quad)) - (.lvf vf6 (&-> v1-5 current-verts tex-st 1 quad)) - (let ((t4-43 (logand t4-30 128))) - (.lvf vf7 (&-> v1-5 current-verts tex-st 2 quad)) - (.movn t5-45 t1-0 t4-43) - ) - ) - ) - (.mul.vf vf1 vf1 Q :mask #b111) - (set! (-> (the-as (pointer uint128) a1-1) 2) (the-as uint128 t5-45)) - (.mul.vf vf5 vf5 Q :mask #b111) - (nop!) - (.nop.vf) - (nop!) - (.nop.vf) - (nop!) - (.div.vf Q vf25 vf2 :fsf #b10 :ftf #b11) - (nop!) - (.lvf vf8 (&-> v1-5 current-verts tex-st 3 quad)) - (nop!) - (.add.vf vf1 vf1 vf27) - (nop!) - (.lvf vf9 (&-> v1-5 current-verts color 0 quad)) - (nop!) - (.lvf vf10 (&-> v1-5 current-verts color 1 quad)) - (nop!) - (.lvf vf11 (&-> v1-5 current-verts color 2 quad)) - (nop!) - (vftoi4.xyzw vf1 vf1) - (nop!) - (.mul.vf vf2 vf2 Q :mask #b111) - (nop!) - (.mul.vf vf6 vf6 Q :mask #b111) - (.svf (&-> (the-as (pointer uint128) a1-1) 3) vf5) - (.nop.vf) - (nop!) - (.nop.vf) - (nop!) - (.div.vf Q vf25 vf3 :fsf #b10 :ftf #b11) - (.svf (&-> (the-as (pointer uint128) a1-1) 4) vf9) - (.lvf vf12 (&-> v1-5 current-verts color 3 quad)) - (.svf (&-> (the-as (pointer uint128) a1-1) 5) vf1) - (.add.vf vf2 vf2 vf27) - (nop!) - (nop!) - (nop!) - (nop!) - (nop!) - (nop!) - (nop!) - (vftoi4.xyzw vf2 vf2) - (nop!) - (.mul.vf vf3 vf3 Q :mask #b111) - (nop!) - (.mul.vf vf7 vf7 Q :mask #b111) - (.svf (&-> (the-as (pointer uint128) a1-1) 6) vf6) - (.nop.vf) - (nop!) - (.nop.vf) - (nop!) - (.div.vf Q vf25 vf4 :fsf #b10 :ftf #b11) - (.svf (&-> (the-as (pointer uint128) a1-1) 7) vf10) - (nop!) - (.svf (&-> (the-as (pointer uint128) a1-1) 8) vf2) - (.add.vf vf3 vf3 vf27) - (nop!) - (nop!) - (nop!) - (nop!) - (nop!) - (nop!) - (nop!) - (vftoi4.xyzw vf3 vf3) - (nop!) - (.mul.vf vf4 vf4 Q :mask #b111) - (nop!) - (.mul.vf vf8 vf8 Q :mask #b111) - (.svf (&-> (the-as (pointer uint128) a1-1) 9) vf7) - (nop!) - (.svf (&-> (the-as (pointer uint128) a1-1) 10) vf11) - (.add.vf vf4 vf4 vf27) - ;;(s.vf! (+ a1-1 176) vf3) - (.svf (+ 176 (the int a1-1)) vf3) - ;;(format #t "here~%") - (let ((t4-44 (logand a0-4 2))) - (nop!) - (b! (zero? t4-44) cfg-187) - ) - ) + ) + (nop!) + (let + ((q-verts-1p + (the-as uint128 (-> (the-as (pointer uint32) fw+col) 497)) + ) + ) + (.pextlb q-verts-0t r0 q-verts-0p) + (let + ((q-verts-2p + (the-as uint128 (-> (the-as (pointer uint32) fw+col) 498)) ) + ) + (.pextlh q-verts-0 r0 q-verts-0t) + (let + ((q-verts-3p + (the-as uint128 (-> (the-as (pointer uint32) fw+col) 499)) + ) + ) + (.pextlb q-verts-1t r0 q-verts-1p) + (set! + (-> fw current-verts color 0 quad) + (the-as uint128 q-verts-0) + ) + (.pextlh q-verts-1 r0 q-verts-1t) + (set! (-> fw dest-verts color 0 quad) (the-as uint128 q-verts-0)) + (.pextlb q-verts-2t r0 q-verts-2p) + (set! + (-> fw current-verts color 1 quad) + (the-as uint128 q-verts-1) + ) + (.pextlh q-verts-2 r0 q-verts-2t) + (set! (-> fw dest-verts color 1 quad) (the-as uint128 q-verts-1)) + (.pextlb q-verts-3t r0 q-verts-3p) + ) ) + ) ) - (b! #t cfg-188 :delay (.add.w.vf vf23 vf23 vf19 :mask #b1)) - (label cfg-187) + ) + (set! (-> fw current-verts color 2 quad) (the-as uint128 q-verts-2)) + (.pextlh q-verts-3 r0 q-verts-3t) + (set! (-> fw dest-verts color 2 quad) (the-as uint128 q-verts-2)) + (nop!) + (set! (-> fw current-verts color 3 quad) (the-as uint128 q-verts-3)) + (nop!) + (set! (-> fw dest-verts color 3 quad) (the-as uint128 q-verts-3)) + (let ((fw2 (the-as object fw))) + (nop!) + (label cfg-4) + (let ((str-char (-> (the-as (pointer uint8) str-in) 4))) + (set! str-in (the-as string (&-> (the-as (pointer uint8) str-in) 1))) + (b! (zero? str-char) cfg-67 :delay (set! not-sc-lit1 (+ str-char -1))) + (b! + (zero? not-sc-lit1) + cfg-54 + :delay + (set! not-sc-~ (+ str-char -126)) + ) + (b! (nonzero? not-sc-~) cfg-55) + (set! str-char (-> (the-as (pointer uint8) str-in) 4)) + (set! str-in (the-as string (&-> (the-as (pointer uint8) str-in) 1))) + (let ((t5-5 0) + (t6-2 0) + ) + (b! (zero? str-char) cfg-67 :delay (set! t7-0 (+ str-char -43))) + (.movz t5-6 str-char t7-0 t5-5) + (let ((t7-1 (+ str-char -45))) + (.movz t5-7 str-char t7-1 t5-6) + ) + (nop!) + (b! (nonzero? t5-7) cfg-15 :delay (set! t7-2 (+ str-char -121))) + (b! (zero? t7-2) cfg-52 :delay (set! t6-3 (+ str-char -89))) + (b! (zero? t6-3) cfg-52 :delay (set! t6-4 (+ str-char -122))) + (b! (zero? t6-4) cfg-53 :delay (set! t6-5 (+ str-char -90))) + (b! (zero? t6-5) cfg-53 :delay (set! t6-6 (+ str-char -48))) + (b! + (< (the-as int t6-6) 0) + cfg-55 + :delay + (set! t6-7 (+ str-char -57)) + ) + (b! + (> (the-as int t6-7) 0) + cfg-55 + :delay + (set! t6-2 (the-as int (+ str-char -48))) + ) + (label cfg-15) + (set! str-char (-> (the-as (pointer uint8) str-in) 4)) + (set! str-in (the-as string (&-> (the-as (pointer uint8) str-in) 1))) + (b! (zero? str-char) cfg-67 :delay (set! t7-3 (+ str-char -110))) + (b! (zero? t7-3) cfg-33 :delay (set! t7-4 (+ str-char -78))) + (b! (zero? t7-4) cfg-33 :delay (set! t7-5 (+ str-char -108))) + (b! (zero? t7-5) cfg-4 :delay (set! t7-6 (+ str-char -76))) + (b! (zero? t7-6) cfg-4 :delay (set! t7-7 (+ str-char -119))) + (b! (zero? t7-7) cfg-4 :delay (set! t7-8 (+ str-char -87))) + (b! (zero? t7-8) cfg-4 :delay (set! t7-9 (+ str-char -107))) + (b! (zero? t7-9) cfg-36 :delay (set! t7-10 (+ str-char -75))) + (b! (zero? t7-10) cfg-36 :delay (set! t7-11 (+ str-char -106))) + (b! (zero? t7-11) cfg-38 :delay (set! t7-12 (+ str-char -74))) + (b! (zero? t7-12) cfg-38 :delay (set! t7-13 (+ str-char -104))) + (b! (zero? t7-13) cfg-42 :delay (set! t7-14 (+ str-char -72))) + (b! (zero? t7-14) cfg-42 :delay (set! t7-15 (+ str-char -118))) + (b! (zero? t7-15) cfg-47 :delay (set! t7-16 (+ str-char -86))) + (b! (zero? t7-16) cfg-47 :delay (set! t7-17 (+ str-char -48))) + (b! + (< (the-as int t7-17) 0) + cfg-55 + :delay + (set! t8-0 (+ str-char -57)) + ) + (b! (> (the-as int t8-0) 0) cfg-55 :delay (.sll t8-1 t6-2 2)) + (let ((t4-5 (+ t6-2 t8-1))) + (nop!) + (.sll t4-6 t4-5 1) + ) + (nop!) + (b! #t cfg-15 :delay (set! t6-2 (+ t4-6 t7-17))) + (label cfg-33) + (b! (nonzero? t6-2) cfg-35 :delay (set! t0-1 -33)) + (set! font-table-to-use *font12-table*) + (.lvf vf13 (&-> fw size1-small quad)) + (nop!) + (.lvf vf14 (&-> fw size2-small quad)) + (nop!) + (.lvf vf15 (&-> fw size3-small quad)) + (set! flags (logand flags t0-1)) + (set! q-lo-tmpl (-> fw small-font-lo-tmpl-qw)) + (b! #t cfg-4 :delay (set! q-hi-tmpl (-> fw small-font-hi-tmpl-qw))) + (label cfg-35) + (nop!) + (set! font-table-to-use *font24-table*) + (nop!) + (.lvf vf13 (&-> fw size1-large quad)) + (nop!) + (.lvf vf14 (&-> fw size2-large quad)) + (nop!) + (.lvf vf15 (&-> fw size3-large quad)) + (set! flags (logior flags 32)) + (set! q-lo-tmpl (-> fw large-font-lo-tmpl-qw)) + (b! #t cfg-4 :delay (set! q-hi-tmpl (-> fw large-font-hi-tmpl-qw))) + (label cfg-36) + (let ((t4-7 -3)) + (nop!) + (b! (zero? t6-2) cfg-4 :delay (set! flags (logand flags t4-7))) + ) + (b! #t cfg-4 :delay (set! flags (logior flags 2))) + (label cfg-38) + (let ((t4-8 -21) + (t5-8 (+ t6-2 -2)) + ) + (b! (zero? t6-2) cfg-4 :delay (set! flags (logand flags t4-8))) + (b! (zero? t5-8) cfg-41) + ) + (b! #t cfg-4 :delay (set! flags (logior flags 16))) + (label cfg-41) + (b! #t cfg-4 :delay (set! flags (logior flags 4))) + (label cfg-42) + (.mov vf1 t6-2) + (let ((t4-9 (+ t5-7 -45))) + (b! (zero? t5-7) cfg-46 :delay (.itof.vf vf1 vf1)) + (b! (zero? t4-9) cfg-45) + ) + (b! #t cfg-4 :delay (.add.x.vf vf23 vf23 vf1 :mask #b1)) + (label cfg-45) + (b! #t cfg-4 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b1)) + (label cfg-46) + (b! #t cfg-4 :delay (.add.x.vf vf23 vf0 vf1 :mask #b1)) + (label cfg-47) + (.mov vf1 t6-2) + ) + (let ((t4-10 (+ t5-7 -45))) + (b! (zero? t5-7) cfg-51 :delay (.itof.vf vf1 vf1)) + (b! (zero? t4-10) cfg-50) + ) + (b! #t cfg-4 :delay (.add.x.vf vf23 vf23 vf1 :mask #b10)) + (label cfg-50) + (b! #t cfg-4 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b10)) + (label cfg-51) + (b! #t cfg-4 :delay (.add.x.vf vf23 vf0 vf1 :mask #b10)) + (label cfg-52) + (b! #t cfg-4 :delay (.svf (&-> fw save quad) vf23)) + (label cfg-53) + (b! #t cfg-4 :delay (.lvf vf23 (&-> fw save quad))) + (label cfg-54) + (let ((t4-11 (-> (the-as (pointer uint8) str-in) 4))) + (set! str-in (the-as string (&-> (the-as (pointer uint8) str-in) 1))) + (.add.vf vf4 vf23 vf15 :mask #b111) + (let ((t4-12 (logand t4-11 127))) + (.sub.vf vf1 vf25 vf23) + (let ((t4-13 (+ t4-12 255))) + (b! #t cfg-62 :delay (.sll t5-9 t4-13 4)) + ) + ) + ) + (label cfg-55) + (.add.vf vf4 vf23 vf15 :mask #b111) + (.sll t5-9 str-char 4) + (.sub.vf vf1 vf25 vf23) + (b! (= str-char 10) cfg-57 :delay (set! fc-cr (+ str-char -13))) + ) + (b! (nonzero? fc-cr) cfg-62) + (label cfg-57) + (.sub.vf vf1 vf23 vf24) + (b! (logtest? flags 16) cfg-60 :delay (set! t4-16 (logand flags 4))) + (b! (nonzero? t4-16) cfg-61) + (.add.x.vf vf23 vf0 vf24 :mask #b1) + (nop!) + (.svf (&-> (the-as font-work fw2) justify 0 quad) vf23) + (.add.w.vf vf23 vf23 vf15 :mask #b10) + (b! + #t + cfg-4 + :delay + (set! fw2 (-> (the-as font-work fw2) font-tmpl gif)) + ) + (label cfg-60) + (.sub.vf vf23 vf24 vf1 :mask #b1) + (.svf (&-> (the-as font-work fw2) justify 0 quad) vf23) + (.add.x.vf vf23 vf0 vf24 :mask #b1) + (.add.w.vf vf23 vf23 vf15 :mask #b10) + (b! + #t + cfg-4 + :delay + (set! fw2 (-> (the-as font-work fw2) font-tmpl gif)) + ) + (label cfg-61) + (.mul.w.vf vf1 vf1 vf16 :mask #b1) + (nop!) + (.sub.vf vf23 vf24 vf1 :mask #b1) + (.svf (&-> (the-as font-work fw2) justify 0 quad) vf23) + (.add.x.vf vf23 vf0 vf24 :mask #b1) + (.add.w.vf vf23 vf23 vf15 :mask #b10) + (b! + #t + cfg-4 + :delay + (set! fw2 (-> (the-as font-work fw2) font-tmpl gif)) + ) + (label cfg-62) + (.addu t4-17 t5-9 font-table-to-use) + (nop!) + (.lvf vf5 (+ t4-17 -256)) + (.mov t4-18 vf1) + (b! (< (the-as int t4-18) 0) cfg-67 :delay (.sra t4-19 t4-18 31)) + (.mul.vf vf19 vf5 vf13) + (b! (zero? (logand flags 2)) cfg-65) + (b! #t cfg-66 :delay (.add.w.vf vf23 vf23 vf19 :mask #b1)) + (label cfg-65) + (nop!) + (.add.w.vf vf23 vf23 vf14 :mask #b1) + (label cfg-66) + (b! #t cfg-4) + (label cfg-67) + (.sub.vf vf1 vf23 vf24) + (b! (logtest? flags 16) cfg-70 :delay (set! a0-2 (logand flags 4))) + (b! (nonzero? a0-2) cfg-71) + (.add.x.vf vf23 vf0 vf24 :mask #b1) + (nop!) + (b! + #t + cfg-72 + :delay + (.svf (&-> (the-as font-work fw2) justify 0 quad) vf23) + ) + (label cfg-70) + (.sub.vf vf23 vf24 vf1 :mask #b1) + (nop!) + (b! + #t + cfg-72 + :delay + (.svf (&-> (the-as font-work fw2) justify 0 quad) vf23) + ) + (label cfg-71) + (.mul.w.vf vf1 vf1 vf16 :mask #b1) + (nop!) + (.sub.vf vf23 vf24 vf1 :mask #b1) + (.svf (&-> (the-as font-work fw2) justify 0 quad) vf23) + ) + (label cfg-72) + (let ((a0-3 (-> fw flags-signed))) + (let ((t2-1 (the-as object fw)) + (t3-7 (-> fw str-ptr-signed)) + ) + (.lvf vf23 (&-> (the-as font-work t2-1) justify 0 quad)) + (label cfg-73) + (let ((t4-21 (-> t3-7 4))) + (set! t3-7 (&-> t3-7 1)) + (b! (zero? t4-21) cfg-131 :delay (set! t5-10 (+ t4-21 -1))) + (b! (zero? t5-10) cfg-121 :delay (set! t5-11 (+ t4-21 -126))) + (b! (nonzero? t5-11) cfg-122) + (set! t4-21 (-> t3-7 4)) + (set! t3-7 (&-> t3-7 1)) + (let ((t5-12 0) + (t6-9 0) + ) + (b! (zero? t4-21) cfg-131 :delay (set! t7-18 (+ t4-21 -43))) + (.movz t5-13 t4-21 t7-18 t5-12) + (let ((t7-19 (+ t4-21 -45))) + (.movz t5-14 t4-21 t7-19 t5-13) + ) + (nop!) + (b! (nonzero? t5-14) cfg-84 :delay (set! t7-20 (+ t4-21 -121))) + (b! (zero? t7-20) cfg-119 :delay (set! t6-10 (+ t4-21 -89))) + (b! (zero? t6-10) cfg-119 :delay (set! t6-11 (+ t4-21 -122))) + (b! (zero? t6-11) cfg-120 :delay (set! t6-12 (+ t4-21 -90))) + (b! (zero? t6-12) cfg-120 :delay (set! t6-13 (+ t4-21 -48))) + (b! + (< (the-as int t6-13) 0) + cfg-122 + :delay + (set! t6-14 (+ t4-21 -57)) + ) + (b! + (> (the-as int t6-14) 0) + cfg-122 + :delay + (set! t6-9 (the-as int (+ t4-21 -48))) + ) + (label cfg-84) + (set! t4-21 (-> t3-7 4)) + (set! t3-7 (&-> t3-7 1)) + (b! (zero? t4-21) cfg-131 :delay (set! t7-21 (+ t4-21 -110))) + (b! (zero? t7-21) cfg-102 :delay (set! t7-22 (+ t4-21 -78))) + (b! (zero? t7-22) cfg-102 :delay (set! t7-23 (+ t4-21 -108))) + (b! (zero? t7-23) cfg-73 :delay (set! t7-24 (+ t4-21 -76))) + (b! (zero? t7-24) cfg-73 :delay (set! t7-25 (+ t4-21 -119))) + (b! (zero? t7-25) cfg-105 :delay (set! t7-26 (+ t4-21 -87))) + (b! (zero? t7-26) cfg-105 :delay (set! t7-27 (+ t4-21 -107))) + (b! (zero? t7-27) cfg-107 :delay (set! t7-28 (+ t4-21 -75))) + (b! (zero? t7-28) cfg-107 :delay (set! t7-29 (+ t4-21 -106))) + (b! (zero? t7-29) cfg-73 :delay (set! t7-30 (+ t4-21 -74))) + (b! (zero? t7-30) cfg-73 :delay (set! t7-31 (+ t4-21 -104))) + (b! (zero? t7-31) cfg-109 :delay (set! t7-32 (+ t4-21 -72))) + (b! (zero? t7-32) cfg-109 :delay (set! t7-33 (+ t4-21 -118))) + (b! (zero? t7-33) cfg-114 :delay (set! t7-34 (+ t4-21 -86))) + (b! (zero? t7-34) cfg-114 :delay (set! t7-35 (+ t4-21 -48))) + (b! + (< (the-as int t7-35) 0) + cfg-122 + :delay + (set! t8-2 (+ t4-21 -57)) + ) + (b! (> (the-as int t8-2) 0) cfg-122 :delay (.sll t8-3 t6-9 2)) + (let ((t4-22 (+ t6-9 t8-3))) + (nop!) + (.sll t4-23 t4-22 1) + ) + (nop!) + (b! #t cfg-84 :delay (set! t6-9 (+ t4-23 t7-35))) + (label cfg-102) + (b! (nonzero? t6-9) cfg-104 :delay (set! a3-6 *font12-table*)) + (set! font-table-to-use a3-6) + (let ((t0-2 -33)) + (.lvf vf13 (&-> fw size1-small quad)) + (nop!) + (.lvf vf14 (&-> fw size2-small quad)) + (nop!) + (.lvf vf15 (&-> fw size3-small quad)) + (set! a0-3 (logand a0-3 t0-2)) + ) + (set! q-lo-tmpl (-> fw small-font-lo-tmpl-qw)) + (b! #t cfg-73 :delay (set! q-hi-tmpl (-> fw small-font-hi-tmpl-qw))) + (label cfg-104) + (nop!) + (set! font-table-to-use *font24-table*) + (nop!) + (.lvf vf13 (&-> fw size1-large quad)) + (nop!) + (.lvf vf14 (&-> fw size2-large quad)) + (nop!) + (.lvf vf15 (&-> fw size3-large quad)) + (set! a0-3 (logior a0-3 32)) + (set! q-lo-tmpl (-> fw large-font-lo-tmpl-qw)) + (b! #t cfg-73 :delay (set! q-hi-tmpl (-> fw large-font-hi-tmpl-qw))) + (label cfg-105) + (let ((t4-24 -2)) + (nop!) + (b! (zero? t6-9) cfg-73 :delay (set! a0-3 (logand a0-3 t4-24))) + ) + (b! #t cfg-73 :delay (set! a0-3 (logior a0-3 1))) + (label cfg-107) + (let ((t4-25 -3)) + (nop!) + (b! (zero? t6-9) cfg-73 :delay (set! a0-3 (logand a0-3 t4-25))) + ) + (b! #t cfg-73 :delay (set! a0-3 (logior a0-3 2))) + (label cfg-109) + (.mov vf1 t6-9) + (let ((t4-26 (+ t5-14 -45))) + (b! (zero? t5-14) cfg-113 :delay (.itof.vf vf1 vf1)) + (b! (zero? t4-26) cfg-112) + ) + (b! #t cfg-73 :delay (.add.x.vf vf23 vf23 vf1 :mask #b1)) + (label cfg-112) + (b! #t cfg-73 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b1)) + (label cfg-113) + (b! #t cfg-73 :delay (.add.x.vf vf23 vf0 vf1 :mask #b1)) + (label cfg-114) + (.mov vf1 t6-9) + ) + (let ((t4-27 (+ t5-14 -45))) + (b! (zero? t5-14) cfg-118 :delay (.itof.vf vf1 vf1)) + (b! (zero? t4-27) cfg-117) + ) + (b! #t cfg-73 :delay (.add.x.vf vf23 vf23 vf1 :mask #b10)) + (label cfg-117) + (b! #t cfg-73 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b10)) + (label cfg-118) + (b! #t cfg-73 :delay (.add.x.vf vf23 vf0 vf1 :mask #b10)) + (label cfg-119) + (b! #t cfg-73 :delay (.svf (&-> fw save quad) vf23)) + (label cfg-120) + (b! #t cfg-73 :delay (.lvf vf23 (&-> fw save quad))) + (label cfg-121) + (set! t4-21 (-> t3-7 4)) + (set! t3-7 (&-> t3-7 1)) + (.add.vf vf4 vf23 vf15 :mask #b111) + (let ((t5-15 (logand t4-21 127))) + (.sub.vf vf1 vf25 vf23) + (let ((t5-16 (+ t5-15 255))) + (b! #t cfg-125 :delay (.sll t5-17 t5-16 4)) + ) + ) + (label cfg-122) + (.add.vf vf4 vf23 vf15 :mask #b111) + (.sll t5-17 t4-21 4) + (.sub.vf vf1 vf25 vf23) + (b! (= t4-21 10) cfg-124 :delay (set! t6-16 (+ t4-21 -13))) + (b! (nonzero? t6-16) cfg-125 :delay (logand a0-3 1)) + (label cfg-124) + (set! t2-1 (&-> (the-as (pointer uint64) t2-1) 2)) + (nop!) + (b! + #t + cfg-73 + :delay + (.lvf vf23 (+ (the-as int t2-1) 944)) + ) + (label cfg-125) + (.addu t5-18 t5-17 font-table-to-use) + (nop!) + (.lvf vf5 (+ t5-18 -256)) + (.mov t5-19 vf1) + (b! + (< (the-as int t5-19) 0) + cfg-131 + :delay + (.add.vf vf6 vf5 vf16 :mask #b111) + ) + (.sra t5-20 t5-19 31) + (.add.vf vf7 vf5 vf17 :mask #b111) + (b! (< t5-20 0) cfg-73 :delay (.add.vf vf8 vf5 vf18 :mask #b111)) + (.add.vf vf1 vf23 vf0 :mask #b111) + (nop!) + (.add.vf vf2 vf23 vf13 :mask #b111) + (.svf (&-> fw current-verts tex-st 0 quad) vf5) + (.add.vf vf3 vf23 vf14 :mask #b111) + (.svf (&-> fw current-verts tex-st 1 quad) vf6) + (.mul.vf vf19 vf5 vf13) + (.svf (&-> fw current-verts tex-st 2 quad) vf7) + (nop!) + (.svf (&-> fw current-verts tex-st 3 quad) vf8) + (nop!) + (.svf (&-> fw current-verts pos 0 quad) vf1) + (nop!) + (.svf (&-> fw current-verts pos 1 quad) vf2) + (nop!) + (.svf (&-> fw current-verts pos 2 quad) vf3) + (nop!) + (.svf (&-> fw current-verts pos 3 quad) vf4) + (.lvf vf1 (&-> fw current-verts pos 0 quad)) + (nop!) + (.lvf vf2 (&-> fw current-verts pos 1 quad)) + (.mul.w.vf acc vf31 vf0) + (.lvf vf3 (&-> fw current-verts pos 2 quad)) + (.add.mul.x.vf acc vf28 vf1 acc) + (.lvf vf4 (&-> fw current-verts pos 3 quad)) + (.add.mul.y.vf acc vf29 vf1 acc) + (nop!) + (.add.mul.z.vf vf1 vf30 vf1 acc) + (nop!) + (.mul.w.vf acc vf31 vf0) + (nop!) + (.add.mul.x.vf acc vf28 vf2 acc) + (nop!) + (.add.mul.y.vf acc vf29 vf2 acc) + (nop!) + (.add.mul.z.vf vf2 vf30 vf2 acc) + (nop!) + (.mul.w.vf acc vf31 vf0) + (nop!) + (.add.mul.x.vf acc vf28 vf3 acc) + (nop!) + (.add.mul.y.vf acc vf29 vf3 acc) + (nop!) + (.add.mul.z.vf vf3 vf30 vf3 acc) + (nop!) + (.mul.w.vf acc vf31 vf0) + (nop!) + (.add.mul.x.vf acc vf28 vf4 acc) + (nop!) + (.add.mul.y.vf acc vf29 vf4 acc) + (nop!) + (.add.mul.z.vf vf4 vf30 vf4 acc) + (.div.vf Q vf25 vf1 :fsf #b10 :ftf #b11) + (let ((t5-21 (-> fw char-tmpl dma-vif quad))) + (nop!) + (let ((t6-18 (-> fw char-tmpl quad 1))) + (nop!) + (set! (-> (the-as (pointer uint128) dma-out) 0) t5-21) + (nop!) + (set! (-> (the-as (pointer uint128) dma-out) 1) t6-18) + ) + ) + (.lvf vf5 (&-> fw current-verts tex-st 0 quad)) + (let ((t5-22 q-lo-tmpl)) + (.lvf vf6 (&-> fw current-verts tex-st 1 quad)) + (let ((t4-28 (logand t4-21 128))) + (.lvf vf7 (&-> fw current-verts tex-st 2 quad)) + ;; note: this relies on (somewhat) undefined behavior that the upper 64-bits of a + ;; gpr aren't changed during movn. + (.movn-128 t5-23 q-hi-tmpl t4-28 t5-22) + ) + ) + ) + ) + (.mul.vf vf1 vf1 Q :mask #b111) + (set! (-> (the-as (pointer uint128) dma-out) 2) (the-as uint128 t5-23)) + (.mul.vf vf5 vf5 Q :mask #b111) + (nop!) + (.nop.vf) + (nop!) + (.nop.vf) + (nop!) + (.div.vf Q vf25 vf2 :fsf #b10 :ftf #b11) + (nop!) + (.lvf vf8 (&-> fw current-verts tex-st 3 quad)) + (nop!) + (.add.vf vf1 vf1 vf26) + (nop!) + (.lvf vf9 (&-> fw color-shadow quad)) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (vftoi4.xyzw vf1 vf1) + (nop!) + (.mul.vf vf2 vf2 Q :mask #b111) + (nop!) + (.mul.vf vf6 vf6 Q :mask #b111) + (.svf (&-> (the-as (pointer uint128) dma-out) 3) vf5) + (.nop.vf) + (nop!) + (.nop.vf) + (nop!) + (.div.vf Q vf25 vf3 :fsf #b10 :ftf #b11) + (.svf (&-> (the-as (pointer uint128) dma-out) 4) vf9) + (nop!) + (.svf (&-> (the-as (pointer uint128) dma-out) 5) vf1) + (.add.vf vf2 vf2 vf26) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (vftoi4.xyzw vf2 vf2) + (nop!) + (.mul.vf vf3 vf3 Q :mask #b111) + (nop!) + (.mul.vf vf7 vf7 Q :mask #b111) + (.svf (&-> (the-as (pointer uint128) dma-out) 6) vf6) + (.nop.vf) + (nop!) + (.nop.vf) + (nop!) + (.div.vf Q vf25 vf4 :fsf #b10 :ftf #b11) + (.svf (&-> (the-as (pointer uint128) dma-out) 7) vf9) + (nop!) + (.svf (&-> (the-as (pointer uint128) dma-out) 8) vf2) + (.add.vf vf3 vf3 vf26) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (vftoi4.xyzw vf3 vf3) + (nop!) + (.mul.vf vf4 vf4 Q :mask #b111) + (nop!) + (.mul.vf vf8 vf8 Q :mask #b111) + (.svf (&-> (the-as (pointer uint128) dma-out) 9) vf7) + (nop!) + (.svf (&-> (the-as (pointer uint128) dma-out) 10) vf9) + (.add.vf vf4 vf4 vf26) + (.svf (&-> (the-as (pointer uint128) dma-out) 11) vf3) + (let ((t4-29 (logand a0-3 2))) + (nop!) + (b! (zero? t4-29) cfg-129) + ) + ) + (b! #t cfg-130 :delay (.add.w.vf vf23 vf23 vf19 :mask #b1)) + (label cfg-129) (nop!) (.add.w.vf vf23 vf23 vf14 :mask #b1) - (label cfg-188) + (label cfg-130) (vftoi4.xyzw vf4 vf4) (nop!) (nop!) (nop!) (nop!) - ;;(s.vf! (+ a1-1 192) vf8) - (.svf (+ 192 (the int a1-1)) vf8) + (.svf (&-> (the-as (pointer uint128) dma-out) 12) vf8) (nop!) - ;;(s.vf! (+ a1-1 208) vf12) - (.svf (+ 208 (the int a1-1)) vf12) + (.svf (&-> (the-as (pointer uint128) dma-out) 13) vf9) (nop!) - ;;(s.vf! (+ a1-1 224) vf4) - (.svf (+ 224 (the int a1-1)) vf4) - (b! #t cfg-132 :delay (set! a1-1 (the pointer (+ (the-as int a1-1) 240)))) - (label cfg-189) - (let ((v1-6 (-> v1-5 buf))) - ;;(s.w! (+ v1-6 4) a1-1) - (set! (-> (the-as (pointer pointer) v1-6) 1) a1-1) + (.svf (&-> (the-as (pointer uint128) dma-out) 14) vf4) + (b! + #t + cfg-73 + :delay + (set! dma-out (&-> (the-as (pointer uint128) dma-out) 15)) + ) + (label cfg-131) + (let ((a0-4 (-> fw flags-signed))) + (let ((t2-2 (the-as object fw)) + (t3-8 (-> fw str-ptr-signed)) + ) + (.lvf vf23 (&-> (the-as font-work t2-2) justify 0 quad)) + (label cfg-132) + (let ((t4-30 (-> t3-8 4))) + (set! t3-8 (&-> t3-8 1)) + (b! (zero? t4-30) cfg-189 :delay (set! t5-24 (+ t4-30 -1))) + (b! (zero? t5-24) cfg-179 :delay (set! t5-25 (+ t4-30 -126))) + (b! (nonzero? t5-25) cfg-180) + (set! t4-30 (-> t3-8 4)) + (set! t3-8 (&-> t3-8 1)) + (let ((t5-26 0) + (t6-19 0) + ) + (b! (zero? t4-30) cfg-189 :delay (set! t7-36 (+ t4-30 -43))) + (.movz t5-27 t4-30 t7-36 t5-26) + (let ((t7-37 (+ t4-30 -45))) + (.movz t5-28 t4-30 t7-37 t5-27) + ) + (nop!) + (b! (nonzero? t5-28) cfg-143 :delay (set! t7-38 (+ t4-30 -121))) + (b! (zero? t7-38) cfg-177 :delay (set! t6-20 (+ t4-30 -89))) + (b! (zero? t6-20) cfg-177 :delay (set! t6-21 (+ t4-30 -122))) + (b! (zero? t6-21) cfg-178 :delay (set! t6-22 (+ t4-30 -90))) + (b! (zero? t6-22) cfg-178 :delay (set! t6-23 (+ t4-30 -48))) + (b! + (< (the-as int t6-23) 0) + cfg-180 + :delay + (set! t6-24 (+ t4-30 -57)) + ) + (b! + (> (the-as int t6-24) 0) + cfg-180 + :delay + (set! t6-19 (the-as int (+ t4-30 -48))) + ) + (label cfg-143) + (set! t4-30 (-> t3-8 4)) + (set! t3-8 (&-> t3-8 1)) + (b! (zero? t4-30) cfg-189 :delay (set! t7-39 (+ t4-30 -110))) + (b! (zero? t7-39) cfg-161 :delay (set! t7-40 (+ t4-30 -78))) + (b! (zero? t7-40) cfg-161 :delay (set! t7-41 (+ t4-30 -108))) + (b! (zero? t7-41) cfg-164 :delay (set! t7-42 (+ t4-30 -76))) + (b! (zero? t7-42) cfg-164 :delay (set! t7-43 (+ t4-30 -119))) + (b! (zero? t7-43) cfg-132 :delay (set! t7-44 (+ t4-30 -87))) + (b! (zero? t7-44) cfg-132 :delay (set! t7-45 (+ t4-30 -107))) + (b! (zero? t7-45) cfg-165 :delay (set! t7-46 (+ t4-30 -75))) + (b! (zero? t7-46) cfg-165 :delay (set! t7-47 (+ t4-30 -106))) + (b! (zero? t7-47) cfg-132 :delay (set! t7-48 (+ t4-30 -74))) + (b! (zero? t7-48) cfg-132 :delay (set! t7-49 (+ t4-30 -104))) + (b! (zero? t7-49) cfg-167 :delay (set! t7-50 (+ t4-30 -72))) + (b! (zero? t7-50) cfg-167 :delay (set! t7-51 (+ t4-30 -118))) + (b! (zero? t7-51) cfg-172 :delay (set! t7-52 (+ t4-30 -86))) + (b! (zero? t7-52) cfg-172 :delay (set! t7-53 (+ t4-30 -48))) + (b! + (< (the-as int t7-53) 0) + cfg-180 + :delay + (set! t8-4 (+ t4-30 -57)) + ) + (b! (> (the-as int t8-4) 0) cfg-180 :delay (.sll t8-5 t6-19 2)) + (let ((t4-31 (+ t6-19 t8-5))) + (nop!) + (.sll t4-32 t4-31 1) + ) + (nop!) + (b! #t cfg-143 :delay (set! t6-19 (+ t4-32 t7-53))) + (label cfg-161) + (b! (nonzero? t6-19) cfg-163 :delay (set! a3-8 *font12-table*)) + (set! font-table-to-use a3-8) + (let ((t0-3 -33)) + (.lvf vf13 (&-> fw size1-small quad)) + (nop!) + (.lvf vf14 (&-> fw size2-small quad)) + (nop!) + (.lvf vf15 (&-> fw size3-small quad)) + (set! a0-4 (logand a0-4 t0-3)) + ) + (set! q-lo-tmpl (-> fw small-font-lo-tmpl-qw)) + (b! + #t + cfg-132 + :delay + (set! q-hi-tmpl (-> fw small-font-hi-tmpl-qw)) + ) + (label cfg-163) + (nop!) + (set! font-table-to-use *font24-table*) + (nop!) + (.lvf vf13 (&-> fw size1-large quad)) + (nop!) + (.lvf vf14 (&-> fw size2-large quad)) + (nop!) + (.lvf vf15 (&-> fw size3-large quad)) + (set! a0-4 (logior a0-4 32)) + (set! q-lo-tmpl (-> fw large-font-lo-tmpl-qw)) + (b! + #t + cfg-132 + :delay + (set! q-hi-tmpl (-> fw large-font-hi-tmpl-qw)) + ) + (label cfg-164) + (nop!) + (set! (-> fw last-color-32) t6-19) + (.sll t4-33 t6-19 4) + (let ((t5-29 (-> fw current-verts color 0 quad)) + (t4-34 (the-as object (+ t4-33 (the-as int fw)))) + ) + (let ((t6-25 (-> fw current-verts color 1 quad))) + (nop!) + (set! (-> fw src-verts color 0 quad) t5-29) + (nop!) + (set! (-> fw src-verts color 1 quad) t6-25) + ) + (nop!) + (let ((t5-30 (-> fw current-verts color 2 quad))) + (nop!) + (let ((t6-26 (-> fw current-verts color 3 quad))) + (nop!) + (set! (-> fw src-verts color 2 quad) t5-30) + (nop!) + (set! (-> fw src-verts color 3 quad) t6-26) + ) + ) + (nop!) + (let ((t6-27 (the-as uint128 (deref uint32 (+ (the-as int t4-34) 1984))))) + (nop!) + (let + ((t5-31 + (the-as + uint128 + (-> (the-as font-work t4-34) color-table 0 color 1) + ) + ) + ) + (.pextlb t6-28 r0 t6-27) + (.mov r0 f31-0) + (.pextlh t6-29 r0 t6-28) + (.mov r0 f31-0) + (.pextlb t5-32 r0 t5-31) + ) + ) + (set! (-> fw current-verts color 0 quad) (the-as uint128 t6-29)) + (.pextlh t5-33 r0 t5-32) + (set! (-> fw dest-verts color 0 quad) (the-as uint128 t6-29)) + (nop!) + (set! (-> fw current-verts color 1 quad) (the-as uint128 t5-33)) + (nop!) + (set! (-> fw dest-verts color 1 quad) (the-as uint128 t5-33)) + (nop!) + (let + ((t5-34 + (the-as + uint128 + (-> (the-as font-work t4-34) color-table 0 color 2) + ) + ) + ) + (nop!) + (let + ((t4-35 + (the-as + uint128 + (-> (the-as font-work t4-34) color-table 0 color 3) + ) + ) + ) + (.pextlb t5-35 r0 t5-34) + (.mov r0 f31-0) + (.pextlh t5-36 r0 t5-35) + (.mov r0 f31-0) + (.pextlb t4-36 r0 t4-35) + ) + ) + ) + (set! (-> fw current-verts color 2 quad) (the-as uint128 t5-36)) + (.pextlh t4-37 r0 t4-36) + (set! (-> fw dest-verts color 2 quad) (the-as uint128 t5-36)) + (nop!) + (set! (-> fw current-verts color 3 quad) (the-as uint128 t4-37)) + (b! + #t + cfg-132 + :delay + (set! + (-> fw dest-verts color 3 quad) + (the-as uint128 (the-as int t4-37)) + ) + ) + (label cfg-165) + (let ((t4-38 -3)) + (nop!) + (b! (zero? t6-19) cfg-132 :delay (set! a0-4 (logand a0-4 t4-38))) + ) + (b! #t cfg-132 :delay (set! a0-4 (logior a0-4 2))) + (label cfg-167) + (.mov vf1 t6-19) + (let ((t4-39 (+ t5-28 -45))) + (b! (zero? t5-28) cfg-171 :delay (.itof.vf vf1 vf1)) + (b! (zero? t4-39) cfg-170) + ) + (b! #t cfg-132 :delay (.add.x.vf vf23 vf23 vf1 :mask #b1)) + (label cfg-170) + (b! #t cfg-132 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b1)) + (label cfg-171) + (b! #t cfg-132 :delay (.add.x.vf vf23 vf0 vf1 :mask #b1)) + (label cfg-172) + (.mov vf1 t6-19) + ) + (let ((t4-40 (+ t5-28 -45))) + (b! (zero? t5-28) cfg-176 :delay (.itof.vf vf1 vf1)) + (b! (zero? t4-40) cfg-175) + ) + (b! #t cfg-132 :delay (.add.x.vf vf23 vf23 vf1 :mask #b10)) + (label cfg-175) + (b! #t cfg-132 :delay (.sub.x.vf vf23 vf23 vf1 :mask #b10)) + (label cfg-176) + (b! #t cfg-132 :delay (.add.x.vf vf23 vf0 vf1 :mask #b10)) + (label cfg-177) + (nop!) + (let ((t4-41 (-> fw last-color-32))) + (nop!) + (.lvf vf9 (&-> fw current-verts color 0 quad)) + (nop!) + (.lvf vf10 (&-> fw current-verts color 1 quad)) + (nop!) + (.lvf vf11 (&-> fw current-verts color 2 quad)) + (nop!) + (.lvf vf12 (&-> fw current-verts color 3 quad)) + (nop!) + (set! (-> fw save-last-color-32) t4-41) + ) + (nop!) + (.svf (&-> fw save-color 0 quad) vf9) + (nop!) + (.svf (&-> fw save-color 1 quad) vf10) + (nop!) + (.svf (&-> fw save-color 2 quad) vf11) + (nop!) + (.svf (&-> fw save-color 3 quad) vf12) + (b! #t cfg-132 :delay (.svf (&-> fw save quad) vf23)) + (label cfg-178) + (nop!) + (let ((t4-42 (-> fw save-last-color-32))) + (nop!) + (.lvf vf9 (&-> fw save-color 0 quad)) + (nop!) + (.lvf vf10 (&-> fw save-color 1 quad)) + (nop!) + (.lvf vf11 (&-> fw save-color 2 quad)) + (nop!) + (.lvf vf12 (&-> fw save-color 3 quad)) + (nop!) + (set! (-> fw last-color-32) t4-42) + ) + (nop!) + (.svf (&-> fw current-verts color 0 quad) vf9) + (nop!) + (.svf (&-> fw dest-verts color 0 quad) vf9) + (nop!) + (.svf (&-> fw current-verts color 1 quad) vf10) + (nop!) + (.svf (&-> fw dest-verts color 1 quad) vf10) + (nop!) + (.svf (&-> fw current-verts color 2 quad) vf11) + (nop!) + (.svf (&-> fw dest-verts color 2 quad) vf11) + (nop!) + (.svf (&-> fw current-verts color 3 quad) vf12) + (nop!) + (.svf (&-> fw dest-verts color 3 quad) vf12) + (b! #t cfg-132 :delay (.lvf vf23 (&-> fw save quad))) + (label cfg-179) + (set! t4-30 (-> t3-8 4)) + (set! t3-8 (&-> t3-8 1)) + (.add.vf vf4 vf23 vf15 :mask #b111) + (let ((t5-37 (logand t4-30 127))) + (.sub.vf vf1 vf25 vf23) + (let ((t5-38 (+ t5-37 255))) + (b! #t cfg-183 :delay (.sll t5-39 t5-38 4)) + ) + ) + (label cfg-180) + (.add.vf vf4 vf23 vf15 :mask #b111) + (.sll t5-39 t4-30 4) + (.sub.vf vf1 vf25 vf23) + (b! (= t4-30 10) cfg-182 :delay (set! t6-31 (+ t4-30 -13))) + (b! (nonzero? t6-31) cfg-183) + (label cfg-182) + (set! t2-2 (&-> (the-as (pointer uint64) t2-2) 2)) + (nop!) + (b! + #t + cfg-132 + :delay + (.lvf vf23 (+ (the-as int t2-2) 944)) + ) + (label cfg-183) + (.addu t5-40 t5-39 font-table-to-use) + (nop!) + (.lvf vf5 (+ t5-40 -256)) + (.mov t5-41 vf1) + (b! + (< (the-as int t5-41) 0) + cfg-189 + :delay + (.add.vf vf6 vf5 vf16 :mask #b111) + ) + (.sra t5-42 t5-41 31) + (.add.vf vf7 vf5 vf17 :mask #b111) + (b! (< t5-42 0) cfg-132 :delay (.add.vf vf8 vf5 vf18 :mask #b111)) + (.add.vf vf1 vf23 vf0 :mask #b111) + (nop!) + (.add.vf vf2 vf23 vf13 :mask #b111) + (nop!) + (.add.vf vf3 vf23 vf14 :mask #b111) + (.svf (&-> fw current-verts tex-st 0 quad) vf5) + (.add.vf vf4 vf23 vf15 :mask #b111) + (.svf (&-> fw current-verts tex-st 1 quad) vf6) + (.mul.vf vf19 vf5 vf13) + (.svf (&-> fw current-verts tex-st 2 quad) vf7) + (nop!) + (.svf (&-> fw current-verts tex-st 3 quad) vf8) + (nop!) + (.svf (&-> fw current-verts pos 0 quad) vf1) + (nop!) + (.svf (&-> fw current-verts pos 1 quad) vf2) + (nop!) + (.svf (&-> fw current-verts pos 2 quad) vf3) + (nop!) + (.svf (&-> fw current-verts pos 3 quad) vf4) + (.lvf vf1 (&-> fw current-verts pos 0 quad)) + (nop!) + (.lvf vf2 (&-> fw current-verts pos 1 quad)) + (.mul.w.vf acc vf31 vf0) + (.lvf vf3 (&-> fw current-verts pos 2 quad)) + (.add.mul.x.vf acc vf28 vf1 acc) + (.lvf vf4 (&-> fw current-verts pos 3 quad)) + (.add.mul.y.vf acc vf29 vf1 acc) + (nop!) + (.add.mul.z.vf vf1 vf30 vf1 acc) + (nop!) + (.mul.w.vf acc vf31 vf0) + (nop!) + (.add.mul.x.vf acc vf28 vf2 acc) + (nop!) + (.add.mul.y.vf acc vf29 vf2 acc) + (nop!) + (.add.mul.z.vf vf2 vf30 vf2 acc) + (nop!) + (.mul.w.vf acc vf31 vf0) + (nop!) + (.add.mul.x.vf acc vf28 vf3 acc) + (nop!) + (.add.mul.y.vf acc vf29 vf3 acc) + (nop!) + (.add.mul.z.vf vf3 vf30 vf3 acc) + (nop!) + (.mul.w.vf acc vf31 vf0) + (nop!) + (.add.mul.x.vf acc vf28 vf4 acc) + (nop!) + (.add.mul.y.vf acc vf29 vf4 acc) + (nop!) + (.add.mul.z.vf vf4 vf30 vf4 acc) + (.div.vf Q vf25 vf1 :fsf #b10 :ftf #b11) + (let ((t5-43 (-> fw char-tmpl dma-vif quad))) + (nop!) + (let ((t6-32 (-> fw char-tmpl quad 1))) + (nop!) + (set! (-> (the-as (pointer uint128) dma-out) 0) t5-43) + (nop!) + (set! (-> (the-as (pointer uint128) dma-out) 1) t6-32) + ) + ) + (.lvf vf5 (&-> fw current-verts tex-st 0 quad)) + (let ((t5-44 q-lo-tmpl)) + (.lvf vf6 (&-> fw current-verts tex-st 1 quad)) + (let ((t4-43 (logand t4-30 128))) + (.lvf vf7 (&-> fw current-verts tex-st 2 quad)) + (.movn-128 t5-45 q-hi-tmpl t4-43 t5-44) + ) + ) + ) ) + (.mul.vf vf1 vf1 Q :mask #b111) + (set! (-> (the-as (pointer uint128) dma-out) 2) (the uint128 t5-45)) + (.mul.vf vf5 vf5 Q :mask #b111) + (nop!) + (.nop.vf) + (nop!) + (.nop.vf) + (nop!) + (.div.vf Q vf25 vf2 :fsf #b10 :ftf #b11) + (nop!) + (.lvf vf8 (&-> fw current-verts tex-st 3 quad)) + (nop!) + (.add.vf vf1 vf1 vf27) + (nop!) + (.lvf vf9 (&-> fw current-verts color 0 quad)) + (nop!) + (.lvf vf10 (&-> fw current-verts color 1 quad)) + (nop!) + (.lvf vf11 (&-> fw current-verts color 2 quad)) + (nop!) + (vftoi4.xyzw vf1 vf1) + (nop!) + (.mul.vf vf2 vf2 Q :mask #b111) + (nop!) + (.mul.vf vf6 vf6 Q :mask #b111) + (.svf (&-> (the-as (pointer uint128) dma-out) 3) vf5) + (.nop.vf) + (nop!) + (.nop.vf) + (nop!) + (.div.vf Q vf25 vf3 :fsf #b10 :ftf #b11) + (.svf (&-> (the-as (pointer uint128) dma-out) 4) vf9) + (.lvf vf12 (&-> fw current-verts color 3 quad)) + (.svf (&-> (the-as (pointer uint128) dma-out) 5) vf1) + (.add.vf vf2 vf2 vf27) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (vftoi4.xyzw vf2 vf2) + (nop!) + (.mul.vf vf3 vf3 Q :mask #b111) + (nop!) + (.mul.vf vf7 vf7 Q :mask #b111) + (.svf (&-> (the-as (pointer uint128) dma-out) 6) vf6) + (.nop.vf) + (nop!) + (.nop.vf) + (nop!) + (.div.vf Q vf25 vf4 :fsf #b10 :ftf #b11) + (.svf (&-> (the-as (pointer uint128) dma-out) 7) vf10) + (nop!) + (.svf (&-> (the-as (pointer uint128) dma-out) 8) vf2) + (.add.vf vf3 vf3 vf27) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (nop!) + (vftoi4.xyzw vf3 vf3) + (nop!) + (.mul.vf vf4 vf4 Q :mask #b111) + (nop!) + (.mul.vf vf8 vf8 Q :mask #b111) + (.svf (&-> (the-as (pointer uint128) dma-out) 9) vf7) + (nop!) + (.svf (&-> (the-as (pointer uint128) dma-out) 10) vf11) + (.add.vf vf4 vf4 vf27) + ;;(s.vf! (+ dma-out 176) vf3) + (.svf (+ (the-as int dma-out) 176) vf3) + (let ((t4-44 (logand a0-4 2))) + (nop!) + (b! (zero? t4-44) cfg-187) + ) + ) ) + ) ) - (.lvf vf24 (&-> arg2 origin quad)) - ;; vf23.x is the x position of the string, which somehow moves backward... - (.sub.vf vf23 vf23 vf24) - (.mov v0-0 vf23) - ;(print-vf vf0) - ;;(format 0 "String result ~f~%" v0-0) - v0-0 + (b! #t cfg-188 :delay (.add.w.vf vf23 vf23 vf19 :mask #b1)) + (label cfg-187) + (nop!) + (.add.w.vf vf23 vf23 vf14 :mask #b1) + (label cfg-188) + (vftoi4.xyzw vf4 vf4) + (nop!) + (nop!) + (nop!) + (nop!) + ;;(s.vf! (+ dma-out 192) vf8) + (.svf (+ (the-as int dma-out) 192) vf8) + (nop!) + ;;(s.vf! (+ dma-out 208) vf12) + (.svf (+ (the-as int dma-out) 208) vf12) + (nop!) + ;;(s.vf! (+ dma-out 224) vf4) + (.svf (+ (the-as int dma-out) 224) vf4) + (b! #t cfg-132 :delay (set! dma-out (&+ dma-out 240))) + (label cfg-189) + (let ((v1-6 (-> fw buf))) + ;;(s.w! (+ v1-6 4) dma-out) + (set! (-> (the-as (pointer pointer) v1-6) 1) dma-out) + ) + ) ) + (.lvf vf24 (&-> arg2 origin quad)) + (.sub.vf vf23 vf23 vf24) + (.mov v0-0 vf23) + v0-0 + ) ) @@ -2108,9 +3517,9 @@ 0 (let ((t1-0 0)) (b! (zero? a3-0) cfg-51 :delay (set! t2-0 (+ a3-0 -43))) - (.movz t0-3 a3-0 t2-0) + (.movz t0-3 a3-0 t2-0 0) ;; TODO Wrong (let ((t2-1 (+ a3-0 -45))) - (.movz t0-4 a3-0 t2-1) + (.movz t0-4 a3-0 t2-1 0 );; TODO wrong ) (nop!) (b! (nonzero? t0-4) cfg-14 :delay (set! t2-2 (+ a3-0 -121)))