aboutsummaryrefslogtreecommitdiff
path: root/src/core/NEON/kernels/arm_gemm/kernels/a64_hybrid_u8qa_dot_4x16/generic.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/NEON/kernels/arm_gemm/kernels/a64_hybrid_u8qa_dot_4x16/generic.cpp')
-rw-r--r--src/core/NEON/kernels/arm_gemm/kernels/a64_hybrid_u8qa_dot_4x16/generic.cpp2072
1 files changed, 2072 insertions, 0 deletions
diff --git a/src/core/NEON/kernels/arm_gemm/kernels/a64_hybrid_u8qa_dot_4x16/generic.cpp b/src/core/NEON/kernels/arm_gemm/kernels/a64_hybrid_u8qa_dot_4x16/generic.cpp
new file mode 100644
index 0000000000..ff12472063
--- /dev/null
+++ b/src/core/NEON/kernels/arm_gemm/kernels/a64_hybrid_u8qa_dot_4x16/generic.cpp
@@ -0,0 +1,2072 @@
+/*
+ * Copyright (c) 2019-2020 Arm Limited.
+ *
+ * SPDX-License-Identifier: MIT
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+#ifdef __aarch64__
+
+#include "arm_gemm.hpp"
+#include "../../utils.hpp"
+
+#include <cassert>
+#include <cstdint>
+
+namespace arm_gemm {
+
+void a64_hybrid_u8qa_dot_4x16 (
+ unsigned int num_strings, const unsigned int *string_lengths, IndirectInputArg<uint8_t> A_arg,
+ size_t M, size_t N, const uint8_t *B_ptr, IndirectOutputArg<uint8_t> output_arg,
+ const Requantize32 *qp, const int32_t *col_bias, unsigned int
+)
+{
+ struct KernelArgs {
+ unsigned int num_strings = {};
+ const unsigned int *string_lengths = {};
+ size_t N = {};
+ const uint8_t *B_ptr = {};
+ size_t output_offset = {};
+ size_t input_initial_col = {};
+ size_t input_offset = {};
+ } ka;
+
+ unsigned long flags=0;
+ void *output_ptr;
+ void *input_ptr;
+
+ if (output_arg.is_indirect) {
+ output_ptr=(void *)(output_arg.indirect.ptr);
+ ka.output_offset=output_arg.indirect.offset;
+ flags |= 0x4;
+ } else {
+ output_ptr=(void *)(output_arg.direct.base);
+ ka.output_offset=output_arg.direct.stride;
+ }
+
+ if (A_arg.is_indirect) {
+ input_ptr=(void *)(A_arg.indirect.ptr);
+ ka.input_offset=A_arg.indirect.start_row;
+ ka.input_initial_col=A_arg.indirect.start_col;
+ flags |= 0x8;
+ } else {
+ assert(num_strings==1);
+ input_ptr=(void *)(A_arg.direct.base);
+ ka.input_offset=A_arg.direct.stride;
+ }
+ ka.num_strings = num_strings;
+ ka.string_lengths = string_lengths;
+ ka.N = N;
+ ka.B_ptr = B_ptr;
+ if (qp->c_offset > qp->minval) {
+ flags |= 0x20;
+ }
+ __asm__ __volatile__(
+
+ "1:" // Row loop
+ "cmp %x[M], #0x4\n"
+ "bge 94f\n"
+ "cmp %x[M], #0x2\n"
+ "bgt 63f\n"
+ "beq 32f\n"
+ "movi v11.4s, #0x0\n"
+ "ldr x12, [%x[args_ptr], %[offsetof_N]]\n"
+ "movi v12.4s, #0x0\n"
+ "ldr x11, [%x[args_ptr], %[offsetof_B_ptr]]\n"
+ "mov x10, %x[col_bias]\n"
+ "movi v13.4s, #0x0\n"
+ "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
+ "bic %x[flags], %x[flags], #0x80000000\n"
+ "movi v14.4s, #0x0\n"
+ "movi v15.16b, #0x1\n"
+ "tbz %x[flags], #2, 2f\n"
+ "ldr x9, [%x[output_ptr], #0x0]\n"
+ "add x9, x9, x19\n"
+ "b 3f\n"
+ "2:" // Height 1: setup direct output
+ "mov x9, %x[output_ptr]\n"
+ "3:" // Height 1: Column loop
+ "movi v16.4s, #0x0\n"
+ "movi v17.4s, #0x0\n"
+ "movi v18.4s, #0x0\n"
+ "movi v19.4s, #0x0\n"
+ "4:" // Height 1: setup done
+ "mov x28, #0x0\n"
+ "5:" // Height 1: String loop
+ "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
+ "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
+ "ldr w27, [x20, x28, LSL #0x2]\n"
+ "tbz %x[flags], #3, 6f\n"
+ "ldr x20, [%x[input_ptr], x28, LSL #0x3]\n"
+ "add x20, x20, x19, LSL #3\n"
+ "ldr x26, [x20, #0x0]\n"
+ "cbnz x28, 7f\n"
+ "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
+ "add x26, x26, x19\n"
+ "b 7f\n"
+ "6:" // Height 1: setup direct input
+ "mov x26, %x[input_ptr]\n"
+ "7:" // Height 1: input setup done
+ "cmp x27, #0x10\n"
+ "blt 12f\n"
+ "cmp x27, #0x20\n"
+ "blt 10f\n"
+ "8:" // Height 1: Multiply loop: Main loop head
+ "ldr q0, [x26, #0x0]\n"
+ "ldr q4, [x11, #0x0]\n"
+ ".inst 0x6f80e090 // udot v16.4s, v4.16b, v0.4b[0]\n"
+ "ldr q5, [x11, #0x10]\n"
+ "ldr q6, [x11, #0x20]\n"
+ ".inst 0x6f80e0b1 // udot v17.4s, v5.16b, v0.4b[0]\n"
+ "ldr q7, [x11, #0x30]\n"
+ ".inst 0x6f80e0d2 // udot v18.4s, v6.16b, v0.4b[0]\n"
+ "ldr q8, [x11, #0x40]\n"
+ "ldr q9, [x11, #0x50]\n"
+ ".inst 0x6f80e0f3 // udot v19.4s, v7.16b, v0.4b[0]\n"
+ "ldr q10, [x11, #0x60]\n"
+ "ldr q4, [x11, #0x70]\n"
+ ".inst 0x6fa0e110 // udot v16.4s, v8.16b, v0.4b[1]\n"
+ ".inst 0x6fa0e131 // udot v17.4s, v9.16b, v0.4b[1]\n"
+ "ldr q5, [x11, #0x80]\n"
+ "ldr q6, [x11, #0x90]\n"
+ ".inst 0x6fa0e152 // udot v18.4s, v10.16b, v0.4b[1]\n"
+ "ldr q7, [x11, #0xa0]\n"
+ ".inst 0x6fa0e093 // udot v19.4s, v4.16b, v0.4b[1]\n"
+ "ldr q8, [x11, #0xb0]\n"
+ "ldr q9, [x11, #0xc0]\n"
+ ".inst 0x6f80e8b0 // udot v16.4s, v5.16b, v0.4b[2]\n"
+ ".inst 0x6f80e8d1 // udot v17.4s, v6.16b, v0.4b[2]\n"
+ "ldr q10, [x11, #0xd0]\n"
+ "ldr q4, [x11, #0xe0]\n"
+ ".inst 0x6f80e8f2 // udot v18.4s, v7.16b, v0.4b[2]\n"
+ "ldr q5, [x11, #0xf0]\n"
+ "add x26, x26, #0x10\n"
+ ".inst 0x6f80e913 // udot v19.4s, v8.16b, v0.4b[2]\n"
+ ".inst 0x6fa0e930 // udot v16.4s, v9.16b, v0.4b[3]\n"
+ "add x11, x11, #0x100\n"
+ ".inst 0x6fa0e951 // udot v17.4s, v10.16b, v0.4b[3]\n"
+ ".inst 0x6fa0e892 // udot v18.4s, v4.16b, v0.4b[3]\n"
+ ".inst 0x6fa0e8b3 // udot v19.4s, v5.16b, v0.4b[3]\n"
+ "tbnz %x[flags], #31, 9f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ "9:" // Height 1: Multiply loop: unique 1: skip row sum
+ "prfm pldl1keep, [x26, #0x80]\n"
+ "sub x27, x27, #0x10\n"
+ "cmp x27, #0x20\n"
+ "bge 8b\n"
+ "10:" // Height 1: Multiply loop: Single iteration only
+ "sub x27, x27, #0x10\n"
+ "ldr q0, [x26, #0x0]\n"
+ "ldr q6, [x11, #0x0]\n"
+ ".inst 0x6f80e0d0 // udot v16.4s, v6.16b, v0.4b[0]\n"
+ "ldr q7, [x11, #0x10]\n"
+ "ldr q8, [x11, #0x20]\n"
+ ".inst 0x6f80e0f1 // udot v17.4s, v7.16b, v0.4b[0]\n"
+ "ldr q9, [x11, #0x30]\n"
+ ".inst 0x6f80e112 // udot v18.4s, v8.16b, v0.4b[0]\n"
+ "ldr q10, [x11, #0x40]\n"
+ "ldr q4, [x11, #0x50]\n"
+ ".inst 0x6f80e133 // udot v19.4s, v9.16b, v0.4b[0]\n"
+ "ldr q5, [x11, #0x60]\n"
+ "ldr q6, [x11, #0x70]\n"
+ ".inst 0x6fa0e150 // udot v16.4s, v10.16b, v0.4b[1]\n"
+ ".inst 0x6fa0e091 // udot v17.4s, v4.16b, v0.4b[1]\n"
+ "ldr q7, [x11, #0x80]\n"
+ "ldr q8, [x11, #0x90]\n"
+ ".inst 0x6fa0e0b2 // udot v18.4s, v5.16b, v0.4b[1]\n"
+ "ldr q9, [x11, #0xa0]\n"
+ ".inst 0x6fa0e0d3 // udot v19.4s, v6.16b, v0.4b[1]\n"
+ "ldr q10, [x11, #0xb0]\n"
+ "ldr q4, [x11, #0xc0]\n"
+ ".inst 0x6f80e8f0 // udot v16.4s, v7.16b, v0.4b[2]\n"
+ ".inst 0x6f80e911 // udot v17.4s, v8.16b, v0.4b[2]\n"
+ "ldr q5, [x11, #0xd0]\n"
+ "ldr q6, [x11, #0xe0]\n"
+ ".inst 0x6f80e932 // udot v18.4s, v9.16b, v0.4b[2]\n"
+ "ldr q7, [x11, #0xf0]\n"
+ "add x26, x26, #0x10\n"
+ ".inst 0x6f80e953 // udot v19.4s, v10.16b, v0.4b[2]\n"
+ ".inst 0x6fa0e890 // udot v16.4s, v4.16b, v0.4b[3]\n"
+ "add x11, x11, #0x100\n"
+ ".inst 0x6fa0e8b1 // udot v17.4s, v5.16b, v0.4b[3]\n"
+ ".inst 0x6fa0e8d2 // udot v18.4s, v6.16b, v0.4b[3]\n"
+ ".inst 0x6fa0e8f3 // udot v19.4s, v7.16b, v0.4b[3]\n"
+ "tbnz %x[flags], #31, 11f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ "11:" // Height 1: Multiply loop: unique 2: skip row sum
+ "prfm pldl1keep, [x26, #0x80]\n"
+ "12:" // Height 1: Multiply loop: Main loop skip
+ "cbz x27, 19f\n"
+ "cmp x27, #0x4\n"
+ "blt 15f\n"
+ "13:" // Height 1: Multiply loop: Odd block loop
+ "ldr s0, [x26], #0x4\n"
+ "tbnz %x[flags], #31, 14f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ "14:" // Height 1: Multiply loop: unique 3: skip row sum
+ "ldr q8, [x11, #0x0]\n"
+ ".inst 0x6f80e110 // udot v16.4s, v8.16b, v0.4b[0]\n"
+ "ldr q9, [x11, #0x10]\n"
+ "ldr q10, [x11, #0x20]\n"
+ ".inst 0x6f80e131 // udot v17.4s, v9.16b, v0.4b[0]\n"
+ "ldr q4, [x11, #0x30]\n"
+ ".inst 0x6f80e152 // udot v18.4s, v10.16b, v0.4b[0]\n"
+ "sub x27, x27, #0x4\n"
+ "add x11, x11, #0x40\n"
+ ".inst 0x6f80e093 // udot v19.4s, v4.16b, v0.4b[0]\n"
+ "cmp x27, #0x4\n"
+ "bge 13b\n"
+ "cbz x27, 19f\n"
+ "15:" // Height 1: Multiply loop: Skip odd blocks
+ "tbz x27, #1, 16f\n"
+ "ldr h0, [x26], #0x2\n"
+ "tbz x27, #0, 17f\n"
+ "ld1 { v0.b }[2], [x26]\n"
+ "b 17f\n"
+ "16:" // Height 1: Multiply loop: Ragged operand read: partial_1_0
+ "ldr b0, [x26, #0x0]\n"
+ "17:" // Height 1: Multiply loop: Ragged operand read: Done
+ "tbnz %x[flags], #31, 18f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ "18:" // Height 1: Multiply loop: unique 4: skip row sum
+ "ldr q5, [x11, #0x0]\n"
+ ".inst 0x6f80e0b0 // udot v16.4s, v5.16b, v0.4b[0]\n"
+ "ldr q6, [x11, #0x10]\n"
+ "ldr q7, [x11, #0x20]\n"
+ ".inst 0x6f80e0d1 // udot v17.4s, v6.16b, v0.4b[0]\n"
+ "ldr q8, [x11, #0x30]\n"
+ ".inst 0x6f80e0f2 // udot v18.4s, v7.16b, v0.4b[0]\n"
+ "add x11, x11, #0x40\n"
+ ".inst 0x6f80e113 // udot v19.4s, v8.16b, v0.4b[0]\n"
+ "19:" // Height 1: Multiply loop: No odd multiplies
+ "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
+ "add x28, x28, #0x1\n"
+ "cmp x28, x19\n"
+ "bne 5b\n"
+ "prfm pstl1keep, [x9, #0x0]\n"
+ "tbnz %x[flags], #31, 20f\n"
+ "addp v11.4s, v11.4s, v11.4s\n"
+ "add x19, %x[qp], %[b_offset]\n"
+ "addp v11.4s, v11.4s, v11.4s\n"
+ "ld1r { v1.4s }, [x19]\n"
+ "neg v1.4s, v1.4s\n"
+ "mul v11.4s, v11.4s, v1.4s\n"
+ "20:" // Height 1: skip row sum fixup
+ "add v16.4s, v16.4s, v11.4s\n"
+ "orr %x[flags], %x[flags], #0x80000000\n"
+ "add v17.4s, v17.4s, v11.4s\n"
+ "ldr q0, [x10, #0x0]\n"
+ "add v18.4s, v18.4s, v11.4s\n"
+ "ldr q1, [x10, #0x10]\n"
+ "add v19.4s, v19.4s, v11.4s\n"
+ "ldr q2, [x10, #0x20]\n"
+ "ldr q3, [x10, #0x30]\n"
+ "add v16.4s, v16.4s, v0.4s\n"
+ "add x20, %x[qp], %[per_layer_right_shift]\n"
+ "ld1r { v0.4s }, [x20]\n"
+ "add v17.4s, v17.4s, v1.4s\n"
+ "add x19, %x[qp], %[per_layer_mul]\n"
+ "add v18.4s, v18.4s, v2.4s\n"
+ "ld1r { v4.4s }, [x19]\n"
+ "add x10, x10, #0x40\n"
+ "add v19.4s, v19.4s, v3.4s\n"
+ "sqrdmulh v16.4s, v16.4s, v4.4s\n"
+ "sqrdmulh v17.4s, v17.4s, v4.4s\n"
+ "sqrdmulh v18.4s, v18.4s, v4.4s\n"
+ "sqrdmulh v19.4s, v19.4s, v4.4s\n"
+ "tbz %x[flags], #5, 21f\n"
+ "and v4.16b, v16.16b, v0.16b\n"
+ "sshr v4.4s, v4.4s, #0x1f\n"
+ "and v5.16b, v17.16b, v0.16b\n"
+ "and v6.16b, v18.16b, v0.16b\n"
+ "sshr v5.4s, v5.4s, #0x1f\n"
+ "and v7.16b, v19.16b, v0.16b\n"
+ "sshr v6.4s, v6.4s, #0x1f\n"
+ "sqadd v16.4s, v16.4s, v4.4s\n"
+ "sshr v7.4s, v7.4s, #0x1f\n"
+ "sqadd v17.4s, v17.4s, v5.4s\n"
+ "sqadd v18.4s, v18.4s, v6.4s\n"
+ "sqadd v19.4s, v19.4s, v7.4s\n"
+ "21:" // Height 1: no shift correction
+ "srshl v16.4s, v16.4s, v0.4s\n"
+ "add x19, %x[qp], %[c_offset]\n"
+ "ld1r { v4.4s }, [x19]\n"
+ "srshl v17.4s, v17.4s, v0.4s\n"
+ "add x19, %x[qp], %[minval]\n"
+ "srshl v18.4s, v18.4s, v0.4s\n"
+ "ld1r { v5.4s }, [x19]\n"
+ "add x19, %x[qp], %[maxval]\n"
+ "srshl v19.4s, v19.4s, v0.4s\n"
+ "ld1r { v6.4s }, [x19]\n"
+ "cmp x12, #0x10\n"
+ "add v16.4s, v16.4s, v4.4s\n"
+ "add v17.4s, v17.4s, v4.4s\n"
+ "add v18.4s, v18.4s, v4.4s\n"
+ "add v19.4s, v19.4s, v4.4s\n"
+ "smin v16.4s, v16.4s, v6.4s\n"
+ "smin v17.4s, v17.4s, v6.4s\n"
+ "smin v18.4s, v18.4s, v6.4s\n"
+ "smax v16.4s, v16.4s, v5.4s\n"
+ "smax v17.4s, v17.4s, v5.4s\n"
+ "smax v18.4s, v18.4s, v5.4s\n"
+ "smin v19.4s, v19.4s, v6.4s\n"
+ "uzp1 v16.8h, v16.8h, v17.8h\n"
+ "smax v19.4s, v19.4s, v5.4s\n"
+ "uzp1 v17.8h, v18.8h, v19.8h\n"
+ "uzp1 v16.16b, v16.16b, v17.16b\n"
+ "bge 30f\n"
+ "tbz x12, #3, 25f\n"
+ "str d16, [x9], #0x8\n"
+ "tbz x12, #2, 23f\n"
+ "st1 { v16.s }[2], [x9], #0x4\n"
+ "tbz x12, #1, 22f\n"
+ "st1 { v16.h }[6], [x9], #0x2\n"
+ "tbz x12, #0, 29f\n"
+ "st1 { v16.b }[14], [x9]\n"
+ "b 29f\n"
+ "22:" // Height 1: Partial direct writeback: partial_1_12
+ "tbz x12, #0, 29f\n"
+ "st1 { v16.b }[12], [x9]\n"
+ "b 29f\n"
+ "23:" // Height 1: Partial direct writeback: partial_2_8
+ "tbz x12, #1, 24f\n"
+ "st1 { v16.h }[4], [x9], #0x2\n"
+ "tbz x12, #0, 29f\n"
+ "st1 { v16.b }[10], [x9]\n"
+ "b 29f\n"
+ "24:" // Height 1: Partial direct writeback: partial_1_8
+ "tbz x12, #0, 29f\n"
+ "st1 { v16.b }[8], [x9]\n"
+ "b 29f\n"
+ "25:" // Height 1: Partial direct writeback: partial_4_0
+ "tbz x12, #2, 27f\n"
+ "str s16, [x9], #0x4\n"
+ "tbz x12, #1, 26f\n"
+ "st1 { v16.h }[2], [x9], #0x2\n"
+ "tbz x12, #0, 29f\n"
+ "st1 { v16.b }[6], [x9]\n"
+ "b 29f\n"
+ "26:" // Height 1: Partial direct writeback: partial_1_4
+ "tbz x12, #0, 29f\n"
+ "st1 { v16.b }[4], [x9]\n"
+ "b 29f\n"
+ "27:" // Height 1: Partial direct writeback: partial_2_0
+ "tbz x12, #1, 28f\n"
+ "str h16, [x9], #0x2\n"
+ "tbz x12, #0, 29f\n"
+ "st1 { v16.b }[2], [x9]\n"
+ "b 29f\n"
+ "28:" // Height 1: Partial direct writeback: partial_1_0
+ "str b16, [x9, #0x0]\n"
+ "29:" // Height 1: Partial direct writeback: Done
+ "b 31f\n"
+ "30:" // Height 1: Full writeback
+ "str q16, [x9, #0x0]\n"
+ "add x9, x9, #0x10\n"
+ "31:" // Height 1: Writeback done
+ "subs x12, x12, #0x10\n"
+ "bgt 3b\n"
+ "b 126f\n"
+ "32:" // Height 2
+ "movi v11.4s, #0x0\n"
+ "ldr x12, [%x[args_ptr], %[offsetof_N]]\n"
+ "mov x10, %x[col_bias]\n"
+ "movi v12.4s, #0x0\n"
+ "ldr x11, [%x[args_ptr], %[offsetof_B_ptr]]\n"
+ "bic %x[flags], %x[flags], #0x80000000\n"
+ "movi v13.4s, #0x0\n"
+ "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
+ "movi v14.4s, #0x0\n"
+ "movi v15.16b, #0x1\n"
+ "tbz %x[flags], #2, 33f\n"
+ "ldr x9, [%x[output_ptr], #0x0]\n"
+ "ldr x25, [%x[output_ptr], #0x8]\n"
+ "add x9, x9, x19\n"
+ "add x25, x25, x19\n"
+ "b 34f\n"
+ "33:" // Height 2: setup direct output
+ "mov x9, %x[output_ptr]\n"
+ "add x25, x9, x19\n"
+ "34:" // Height 2: Column loop
+ "movi v16.4s, #0x0\n"
+ "movi v17.4s, #0x0\n"
+ "movi v18.4s, #0x0\n"
+ "movi v19.4s, #0x0\n"
+ "movi v20.4s, #0x0\n"
+ "movi v21.4s, #0x0\n"
+ "movi v22.4s, #0x0\n"
+ "movi v23.4s, #0x0\n"
+ "35:" // Height 2: setup done
+ "mov x28, #0x0\n"
+ "36:" // Height 2: String loop
+ "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
+ "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
+ "ldr w27, [x20, x28, LSL #0x2]\n"
+ "tbz %x[flags], #3, 37f\n"
+ "ldr x20, [%x[input_ptr], x28, LSL #0x3]\n"
+ "add x20, x20, x19, LSL #3\n"
+ "ldr x26, [x20, #0x0]\n"
+ "ldr x24, [x20, #0x8]\n"
+ "cbnz x28, 38f\n"
+ "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
+ "add x26, x26, x19\n"
+ "add x24, x24, x19\n"
+ "b 38f\n"
+ "37:" // Height 2: setup direct input
+ "mov x26, %x[input_ptr]\n"
+ "add x24, x26, x19\n"
+ "38:" // Height 2: input setup done
+ "cmp x27, #0x10\n"
+ "blt 43f\n"
+ "cmp x27, #0x20\n"
+ "blt 41f\n"
+ "39:" // Height 2: Multiply loop: Main loop head
+ "ldr q0, [x26, #0x0]\n"
+ "ldr q1, [x24, #0x0]\n"
+ "ldr q4, [x11, #0x0]\n"
+ ".inst 0x6f80e090 // udot v16.4s, v4.16b, v0.4b[0]\n"
+ "ldr q5, [x11, #0x10]\n"
+ ".inst 0x6f81e094 // udot v20.4s, v4.16b, v1.4b[0]\n"
+ "ldr q6, [x11, #0x20]\n"
+ "ldr q7, [x11, #0x30]\n"
+ ".inst 0x6f80e0b1 // udot v17.4s, v5.16b, v0.4b[0]\n"
+ "ldr q8, [x11, #0x40]\n"
+ ".inst 0x6f81e0b5 // udot v21.4s, v5.16b, v1.4b[0]\n"
+ "ldr q9, [x11, #0x50]\n"
+ ".inst 0x6f80e0d2 // udot v18.4s, v6.16b, v0.4b[0]\n"
+ "ldr q10, [x11, #0x60]\n"
+ ".inst 0x6f81e0d6 // udot v22.4s, v6.16b, v1.4b[0]\n"
+ "ldr q4, [x11, #0x70]\n"
+ ".inst 0x6f80e0f3 // udot v19.4s, v7.16b, v0.4b[0]\n"
+ "ldr q5, [x11, #0x80]\n"
+ ".inst 0x6f81e0f7 // udot v23.4s, v7.16b, v1.4b[0]\n"
+ "ldr q6, [x11, #0x90]\n"
+ ".inst 0x6fa0e110 // udot v16.4s, v8.16b, v0.4b[1]\n"
+ "ldr q7, [x11, #0xa0]\n"
+ ".inst 0x6fa1e114 // udot v20.4s, v8.16b, v1.4b[1]\n"
+ "ldr q8, [x11, #0xb0]\n"
+ ".inst 0x6fa0e131 // udot v17.4s, v9.16b, v0.4b[1]\n"
+ "add x26, x26, #0x10\n"
+ ".inst 0x6fa1e135 // udot v21.4s, v9.16b, v1.4b[1]\n"
+ "ldr q9, [x11, #0xc0]\n"
+ ".inst 0x6fa0e152 // udot v18.4s, v10.16b, v0.4b[1]\n"
+ "add x24, x24, #0x10\n"
+ ".inst 0x6fa1e156 // udot v22.4s, v10.16b, v1.4b[1]\n"
+ "ldr q10, [x11, #0xd0]\n"
+ ".inst 0x6fa0e093 // udot v19.4s, v4.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e097 // udot v23.4s, v4.16b, v1.4b[1]\n"
+ "ldr q4, [x11, #0xe0]\n"
+ ".inst 0x6f80e8b0 // udot v16.4s, v5.16b, v0.4b[2]\n"
+ ".inst 0x6f81e8b4 // udot v20.4s, v5.16b, v1.4b[2]\n"
+ "ldr q5, [x11, #0xf0]\n"
+ ".inst 0x6f80e8d1 // udot v17.4s, v6.16b, v0.4b[2]\n"
+ "add x11, x11, #0x100\n"
+ ".inst 0x6f81e8d5 // udot v21.4s, v6.16b, v1.4b[2]\n"
+ ".inst 0x6f80e8f2 // udot v18.4s, v7.16b, v0.4b[2]\n"
+ ".inst 0x6f81e8f6 // udot v22.4s, v7.16b, v1.4b[2]\n"
+ ".inst 0x6f80e913 // udot v19.4s, v8.16b, v0.4b[2]\n"
+ ".inst 0x6f81e917 // udot v23.4s, v8.16b, v1.4b[2]\n"
+ ".inst 0x6fa0e930 // udot v16.4s, v9.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e934 // udot v20.4s, v9.16b, v1.4b[3]\n"
+ ".inst 0x6fa0e951 // udot v17.4s, v10.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e955 // udot v21.4s, v10.16b, v1.4b[3]\n"
+ ".inst 0x6fa0e892 // udot v18.4s, v4.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e896 // udot v22.4s, v4.16b, v1.4b[3]\n"
+ ".inst 0x6fa0e8b3 // udot v19.4s, v5.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e8b7 // udot v23.4s, v5.16b, v1.4b[3]\n"
+ "tbnz %x[flags], #31, 40f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ ".inst 0x6e8f942c // udot v12.4s, v1.16b, v15.16b\n"
+ "40:" // Height 2: Multiply loop: unique 5: skip row sum
+ "prfm pldl1keep, [x26, #0x80]\n"
+ "sub x27, x27, #0x10\n"
+ "prfm pldl1keep, [x24, #0x80]\n"
+ "cmp x27, #0x20\n"
+ "bge 39b\n"
+ "41:" // Height 2: Multiply loop: Single iteration only
+ "sub x27, x27, #0x10\n"
+ "ldr q0, [x26, #0x0]\n"
+ "ldr q1, [x24, #0x0]\n"
+ "ldr q6, [x11, #0x0]\n"
+ ".inst 0x6f80e0d0 // udot v16.4s, v6.16b, v0.4b[0]\n"
+ "ldr q7, [x11, #0x10]\n"
+ ".inst 0x6f81e0d4 // udot v20.4s, v6.16b, v1.4b[0]\n"
+ "ldr q8, [x11, #0x20]\n"
+ "ldr q9, [x11, #0x30]\n"
+ ".inst 0x6f80e0f1 // udot v17.4s, v7.16b, v0.4b[0]\n"
+ "ldr q10, [x11, #0x40]\n"
+ ".inst 0x6f81e0f5 // udot v21.4s, v7.16b, v1.4b[0]\n"
+ "ldr q4, [x11, #0x50]\n"
+ ".inst 0x6f80e112 // udot v18.4s, v8.16b, v0.4b[0]\n"
+ "ldr q5, [x11, #0x60]\n"
+ ".inst 0x6f81e116 // udot v22.4s, v8.16b, v1.4b[0]\n"
+ "ldr q6, [x11, #0x70]\n"
+ ".inst 0x6f80e133 // udot v19.4s, v9.16b, v0.4b[0]\n"
+ "ldr q7, [x11, #0x80]\n"
+ ".inst 0x6f81e137 // udot v23.4s, v9.16b, v1.4b[0]\n"
+ "ldr q8, [x11, #0x90]\n"
+ ".inst 0x6fa0e150 // udot v16.4s, v10.16b, v0.4b[1]\n"
+ "ldr q9, [x11, #0xa0]\n"
+ ".inst 0x6fa1e154 // udot v20.4s, v10.16b, v1.4b[1]\n"
+ "ldr q10, [x11, #0xb0]\n"
+ ".inst 0x6fa0e091 // udot v17.4s, v4.16b, v0.4b[1]\n"
+ "add x26, x26, #0x10\n"
+ ".inst 0x6fa1e095 // udot v21.4s, v4.16b, v1.4b[1]\n"
+ "ldr q4, [x11, #0xc0]\n"
+ ".inst 0x6fa0e0b2 // udot v18.4s, v5.16b, v0.4b[1]\n"
+ "add x24, x24, #0x10\n"
+ ".inst 0x6fa1e0b6 // udot v22.4s, v5.16b, v1.4b[1]\n"
+ "ldr q5, [x11, #0xd0]\n"
+ ".inst 0x6fa0e0d3 // udot v19.4s, v6.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e0d7 // udot v23.4s, v6.16b, v1.4b[1]\n"
+ "ldr q6, [x11, #0xe0]\n"
+ ".inst 0x6f80e8f0 // udot v16.4s, v7.16b, v0.4b[2]\n"
+ ".inst 0x6f81e8f4 // udot v20.4s, v7.16b, v1.4b[2]\n"
+ "ldr q7, [x11, #0xf0]\n"
+ ".inst 0x6f80e911 // udot v17.4s, v8.16b, v0.4b[2]\n"
+ "add x11, x11, #0x100\n"
+ ".inst 0x6f81e915 // udot v21.4s, v8.16b, v1.4b[2]\n"
+ ".inst 0x6f80e932 // udot v18.4s, v9.16b, v0.4b[2]\n"
+ ".inst 0x6f81e936 // udot v22.4s, v9.16b, v1.4b[2]\n"
+ ".inst 0x6f80e953 // udot v19.4s, v10.16b, v0.4b[2]\n"
+ ".inst 0x6f81e957 // udot v23.4s, v10.16b, v1.4b[2]\n"
+ ".inst 0x6fa0e890 // udot v16.4s, v4.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e894 // udot v20.4s, v4.16b, v1.4b[3]\n"
+ ".inst 0x6fa0e8b1 // udot v17.4s, v5.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e8b5 // udot v21.4s, v5.16b, v1.4b[3]\n"
+ ".inst 0x6fa0e8d2 // udot v18.4s, v6.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e8d6 // udot v22.4s, v6.16b, v1.4b[3]\n"
+ ".inst 0x6fa0e8f3 // udot v19.4s, v7.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e8f7 // udot v23.4s, v7.16b, v1.4b[3]\n"
+ "tbnz %x[flags], #31, 42f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ ".inst 0x6e8f942c // udot v12.4s, v1.16b, v15.16b\n"
+ "42:" // Height 2: Multiply loop: unique 6: skip row sum
+ "prfm pldl1keep, [x26, #0x80]\n"
+ "prfm pldl1keep, [x24, #0x80]\n"
+ "43:" // Height 2: Multiply loop: Main loop skip
+ "cbz x27, 50f\n"
+ "cmp x27, #0x4\n"
+ "blt 46f\n"
+ "44:" // Height 2: Multiply loop: Odd block loop
+ "ldr s0, [x26], #0x4\n"
+ "ldr s1, [x24], #0x4\n"
+ "tbnz %x[flags], #31, 45f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ ".inst 0x6e8f942c // udot v12.4s, v1.16b, v15.16b\n"
+ "45:" // Height 2: Multiply loop: unique 7: skip row sum
+ "ldr q8, [x11, #0x0]\n"
+ ".inst 0x6f80e110 // udot v16.4s, v8.16b, v0.4b[0]\n"
+ "ldr q9, [x11, #0x10]\n"
+ ".inst 0x6f81e114 // udot v20.4s, v8.16b, v1.4b[0]\n"
+ "ldr q10, [x11, #0x20]\n"
+ "ldr q4, [x11, #0x30]\n"
+ ".inst 0x6f80e131 // udot v17.4s, v9.16b, v0.4b[0]\n"
+ "sub x27, x27, #0x4\n"
+ ".inst 0x6f81e135 // udot v21.4s, v9.16b, v1.4b[0]\n"
+ "cmp x27, #0x4\n"
+ ".inst 0x6f80e152 // udot v18.4s, v10.16b, v0.4b[0]\n"
+ "add x11, x11, #0x40\n"
+ ".inst 0x6f81e156 // udot v22.4s, v10.16b, v1.4b[0]\n"
+ ".inst 0x6f80e093 // udot v19.4s, v4.16b, v0.4b[0]\n"
+ ".inst 0x6f81e097 // udot v23.4s, v4.16b, v1.4b[0]\n"
+ "bge 44b\n"
+ "cbz x27, 50f\n"
+ "46:" // Height 2: Multiply loop: Skip odd blocks
+ "tbz x27, #1, 47f\n"
+ "ldr h0, [x26], #0x2\n"
+ "ldr h1, [x24], #0x2\n"
+ "tbz x27, #0, 48f\n"
+ "ld1 { v0.b }[2], [x26]\n"
+ "ld1 { v1.b }[2], [x24]\n"
+ "b 48f\n"
+ "47:" // Height 2: Multiply loop: Ragged operand read: partial_1_0
+ "ldr b0, [x26, #0x0]\n"
+ "ldr b1, [x24, #0x0]\n"
+ "48:" // Height 2: Multiply loop: Ragged operand read: Done
+ "tbnz %x[flags], #31, 49f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ ".inst 0x6e8f942c // udot v12.4s, v1.16b, v15.16b\n"
+ "49:" // Height 2: Multiply loop: unique 8: skip row sum
+ "ldr q5, [x11, #0x0]\n"
+ ".inst 0x6f80e0b0 // udot v16.4s, v5.16b, v0.4b[0]\n"
+ "ldr q6, [x11, #0x10]\n"
+ ".inst 0x6f81e0b4 // udot v20.4s, v5.16b, v1.4b[0]\n"
+ "ldr q7, [x11, #0x20]\n"
+ "ldr q8, [x11, #0x30]\n"
+ ".inst 0x6f80e0d1 // udot v17.4s, v6.16b, v0.4b[0]\n"
+ "add x11, x11, #0x40\n"
+ ".inst 0x6f81e0d5 // udot v21.4s, v6.16b, v1.4b[0]\n"
+ ".inst 0x6f80e0f2 // udot v18.4s, v7.16b, v0.4b[0]\n"
+ ".inst 0x6f81e0f6 // udot v22.4s, v7.16b, v1.4b[0]\n"
+ ".inst 0x6f80e113 // udot v19.4s, v8.16b, v0.4b[0]\n"
+ ".inst 0x6f81e117 // udot v23.4s, v8.16b, v1.4b[0]\n"
+ "50:" // Height 2: Multiply loop: No odd multiplies
+ "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
+ "add x28, x28, #0x1\n"
+ "cmp x28, x19\n"
+ "bne 36b\n"
+ "prfm pstl1keep, [x9, #0x0]\n"
+ "prfm pstl1keep, [x25, #0x0]\n"
+ "tbnz %x[flags], #31, 51f\n"
+ "addp v11.4s, v11.4s, v11.4s\n"
+ "add x19, %x[qp], %[b_offset]\n"
+ "ld1r { v2.4s }, [x19]\n"
+ "addp v12.4s, v12.4s, v12.4s\n"
+ "addp v11.4s, v11.4s, v11.4s\n"
+ "addp v12.4s, v12.4s, v12.4s\n"
+ "neg v2.4s, v2.4s\n"
+ "mul v11.4s, v11.4s, v2.4s\n"
+ "mul v12.4s, v12.4s, v2.4s\n"
+ "51:" // Height 2: skip row sum fixup
+ "add v16.4s, v16.4s, v11.4s\n"
+ "orr %x[flags], %x[flags], #0x80000000\n"
+ "add v17.4s, v17.4s, v11.4s\n"
+ "ldr q0, [x10, #0x0]\n"
+ "add v18.4s, v18.4s, v11.4s\n"
+ "ldr q1, [x10, #0x10]\n"
+ "add v19.4s, v19.4s, v11.4s\n"
+ "ldr q2, [x10, #0x20]\n"
+ "add v20.4s, v20.4s, v12.4s\n"
+ "ldr q3, [x10, #0x30]\n"
+ "add v21.4s, v21.4s, v12.4s\n"
+ "add x20, %x[qp], %[per_layer_right_shift]\n"
+ "add v22.4s, v22.4s, v12.4s\n"
+ "add x19, %x[qp], %[per_layer_mul]\n"
+ "ld1r { v4.4s }, [x19]\n"
+ "add v23.4s, v23.4s, v12.4s\n"
+ "add x10, x10, #0x40\n"
+ "add v16.4s, v16.4s, v0.4s\n"
+ "add v17.4s, v17.4s, v1.4s\n"
+ "add v18.4s, v18.4s, v2.4s\n"
+ "add v19.4s, v19.4s, v3.4s\n"
+ "add v20.4s, v20.4s, v0.4s\n"
+ "ld1r { v0.4s }, [x20]\n"
+ "add v21.4s, v21.4s, v1.4s\n"
+ "add v22.4s, v22.4s, v2.4s\n"
+ "add v23.4s, v23.4s, v3.4s\n"
+ "sqrdmulh v16.4s, v16.4s, v4.4s\n"
+ "sqrdmulh v17.4s, v17.4s, v4.4s\n"
+ "sqrdmulh v18.4s, v18.4s, v4.4s\n"
+ "sqrdmulh v19.4s, v19.4s, v4.4s\n"
+ "sqrdmulh v20.4s, v20.4s, v4.4s\n"
+ "sqrdmulh v21.4s, v21.4s, v4.4s\n"
+ "sqrdmulh v22.4s, v22.4s, v4.4s\n"
+ "sqrdmulh v23.4s, v23.4s, v4.4s\n"
+ "tbz %x[flags], #5, 52f\n"
+ "and v4.16b, v16.16b, v0.16b\n"
+ "sshr v4.4s, v4.4s, #0x1f\n"
+ "and v5.16b, v17.16b, v0.16b\n"
+ "and v6.16b, v18.16b, v0.16b\n"
+ "sshr v5.4s, v5.4s, #0x1f\n"
+ "and v7.16b, v19.16b, v0.16b\n"
+ "and v8.16b, v20.16b, v0.16b\n"
+ "sshr v6.4s, v6.4s, #0x1f\n"
+ "and v9.16b, v21.16b, v0.16b\n"
+ "sshr v7.4s, v7.4s, #0x1f\n"
+ "sqadd v16.4s, v16.4s, v4.4s\n"
+ "and v10.16b, v22.16b, v0.16b\n"
+ "sshr v8.4s, v8.4s, #0x1f\n"
+ "and v4.16b, v23.16b, v0.16b\n"
+ "sshr v9.4s, v9.4s, #0x1f\n"
+ "sqadd v17.4s, v17.4s, v5.4s\n"
+ "sshr v10.4s, v10.4s, #0x1f\n"
+ "sqadd v18.4s, v18.4s, v6.4s\n"
+ "sshr v4.4s, v4.4s, #0x1f\n"
+ "sqadd v19.4s, v19.4s, v7.4s\n"
+ "sqadd v20.4s, v20.4s, v8.4s\n"
+ "sqadd v21.4s, v21.4s, v9.4s\n"
+ "sqadd v22.4s, v22.4s, v10.4s\n"
+ "sqadd v23.4s, v23.4s, v4.4s\n"
+ "52:" // Height 2: no shift correction
+ "srshl v16.4s, v16.4s, v0.4s\n"
+ "add x19, %x[qp], %[c_offset]\n"
+ "ld1r { v4.4s }, [x19]\n"
+ "srshl v17.4s, v17.4s, v0.4s\n"
+ "add x19, %x[qp], %[minval]\n"
+ "srshl v18.4s, v18.4s, v0.4s\n"
+ "ld1r { v5.4s }, [x19]\n"
+ "add x19, %x[qp], %[maxval]\n"
+ "srshl v19.4s, v19.4s, v0.4s\n"
+ "ld1r { v6.4s }, [x19]\n"
+ "cmp x12, #0x10\n"
+ "srshl v20.4s, v20.4s, v0.4s\n"
+ "srshl v21.4s, v21.4s, v0.4s\n"
+ "srshl v22.4s, v22.4s, v0.4s\n"
+ "srshl v23.4s, v23.4s, v0.4s\n"
+ "add v16.4s, v16.4s, v4.4s\n"
+ "add v17.4s, v17.4s, v4.4s\n"
+ "add v18.4s, v18.4s, v4.4s\n"
+ "smin v16.4s, v16.4s, v6.4s\n"
+ "smin v17.4s, v17.4s, v6.4s\n"
+ "smin v18.4s, v18.4s, v6.4s\n"
+ "smax v16.4s, v16.4s, v5.4s\n"
+ "smax v17.4s, v17.4s, v5.4s\n"
+ "smax v18.4s, v18.4s, v5.4s\n"
+ "add v19.4s, v19.4s, v4.4s\n"
+ "add v20.4s, v20.4s, v4.4s\n"
+ "add v21.4s, v21.4s, v4.4s\n"
+ "smin v19.4s, v19.4s, v6.4s\n"
+ "smin v20.4s, v20.4s, v6.4s\n"
+ "smin v21.4s, v21.4s, v6.4s\n"
+ "smax v19.4s, v19.4s, v5.4s\n"
+ "smax v20.4s, v20.4s, v5.4s\n"
+ "smax v21.4s, v21.4s, v5.4s\n"
+ "add v22.4s, v22.4s, v4.4s\n"
+ "add v23.4s, v23.4s, v4.4s\n"
+ "uzp1 v16.8h, v16.8h, v17.8h\n"
+ "smin v22.4s, v22.4s, v6.4s\n"
+ "smin v23.4s, v23.4s, v6.4s\n"
+ "uzp1 v17.8h, v18.8h, v19.8h\n"
+ "smax v22.4s, v22.4s, v5.4s\n"
+ "smax v23.4s, v23.4s, v5.4s\n"
+ "uzp1 v20.8h, v20.8h, v21.8h\n"
+ "uzp1 v16.16b, v16.16b, v17.16b\n"
+ "uzp1 v21.8h, v22.8h, v23.8h\n"
+ "uzp1 v20.16b, v20.16b, v21.16b\n"
+ "bge 61f\n"
+ "tbz x12, #3, 56f\n"
+ "str d16, [x9], #0x8\n"
+ "str d20, [x25], #0x8\n"
+ "tbz x12, #2, 54f\n"
+ "st1 { v16.s }[2], [x9], #0x4\n"
+ "st1 { v20.s }[2], [x25], #0x4\n"
+ "tbz x12, #1, 53f\n"
+ "st1 { v16.h }[6], [x9], #0x2\n"
+ "st1 { v20.h }[6], [x25], #0x2\n"
+ "tbz x12, #0, 60f\n"
+ "st1 { v16.b }[14], [x9]\n"
+ "st1 { v20.b }[14], [x25]\n"
+ "b 60f\n"
+ "53:" // Height 2: Partial direct writeback: partial_1_12
+ "tbz x12, #0, 60f\n"
+ "st1 { v16.b }[12], [x9]\n"
+ "st1 { v20.b }[12], [x25]\n"
+ "b 60f\n"
+ "54:" // Height 2: Partial direct writeback: partial_2_8
+ "tbz x12, #1, 55f\n"
+ "st1 { v16.h }[4], [x9], #0x2\n"
+ "st1 { v20.h }[4], [x25], #0x2\n"
+ "tbz x12, #0, 60f\n"
+ "st1 { v16.b }[10], [x9]\n"
+ "st1 { v20.b }[10], [x25]\n"
+ "b 60f\n"
+ "55:" // Height 2: Partial direct writeback: partial_1_8
+ "tbz x12, #0, 60f\n"
+ "st1 { v16.b }[8], [x9]\n"
+ "st1 { v20.b }[8], [x25]\n"
+ "b 60f\n"
+ "56:" // Height 2: Partial direct writeback: partial_4_0
+ "tbz x12, #2, 58f\n"
+ "str s16, [x9], #0x4\n"
+ "str s20, [x25], #0x4\n"
+ "tbz x12, #1, 57f\n"
+ "st1 { v16.h }[2], [x9], #0x2\n"
+ "st1 { v20.h }[2], [x25], #0x2\n"
+ "tbz x12, #0, 60f\n"
+ "st1 { v16.b }[6], [x9]\n"
+ "st1 { v20.b }[6], [x25]\n"
+ "b 60f\n"
+ "57:" // Height 2: Partial direct writeback: partial_1_4
+ "tbz x12, #0, 60f\n"
+ "st1 { v16.b }[4], [x9]\n"
+ "st1 { v20.b }[4], [x25]\n"
+ "b 60f\n"
+ "58:" // Height 2: Partial direct writeback: partial_2_0
+ "tbz x12, #1, 59f\n"
+ "str h16, [x9], #0x2\n"
+ "str h20, [x25], #0x2\n"
+ "tbz x12, #0, 60f\n"
+ "st1 { v16.b }[2], [x9]\n"
+ "st1 { v20.b }[2], [x25]\n"
+ "b 60f\n"
+ "59:" // Height 2: Partial direct writeback: partial_1_0
+ "str b16, [x9, #0x0]\n"
+ "str b20, [x25, #0x0]\n"
+ "60:" // Height 2: Partial direct writeback: Done
+ "b 62f\n"
+ "61:" // Height 2: Full writeback
+ "str q16, [x9, #0x0]\n"
+ "str q20, [x25, #0x0]\n"
+ "add x9, x9, #0x10\n"
+ "add x25, x25, #0x10\n"
+ "62:" // Height 2: Writeback done
+ "subs x12, x12, #0x10\n"
+ "bgt 34b\n"
+ "b 126f\n"
+ "63:" // Height 3
+ "movi v11.4s, #0x0\n"
+ "ldr x12, [%x[args_ptr], %[offsetof_N]]\n"
+ "mov x10, %x[col_bias]\n"
+ "movi v12.4s, #0x0\n"
+ "ldr x11, [%x[args_ptr], %[offsetof_B_ptr]]\n"
+ "bic %x[flags], %x[flags], #0x80000000\n"
+ "movi v13.4s, #0x0\n"
+ "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
+ "movi v14.4s, #0x0\n"
+ "movi v15.16b, #0x1\n"
+ "tbz %x[flags], #2, 64f\n"
+ "ldr x9, [%x[output_ptr], #0x0]\n"
+ "ldr x25, [%x[output_ptr], #0x8]\n"
+ "add x9, x9, x19\n"
+ "ldr x23, [%x[output_ptr], #0x10]\n"
+ "add x25, x25, x19\n"
+ "add x23, x23, x19\n"
+ "b 65f\n"
+ "64:" // Height 3: setup direct output
+ "mov x9, %x[output_ptr]\n"
+ "add x25, x9, x19\n"
+ "add x23, x25, x19\n"
+ "65:" // Height 3: Column loop
+ "movi v16.4s, #0x0\n"
+ "movi v17.4s, #0x0\n"
+ "movi v18.4s, #0x0\n"
+ "movi v19.4s, #0x0\n"
+ "movi v20.4s, #0x0\n"
+ "movi v21.4s, #0x0\n"
+ "movi v22.4s, #0x0\n"
+ "movi v23.4s, #0x0\n"
+ "movi v24.4s, #0x0\n"
+ "movi v25.4s, #0x0\n"
+ "movi v26.4s, #0x0\n"
+ "movi v27.4s, #0x0\n"
+ "66:" // Height 3: setup done
+ "mov x28, #0x0\n"
+ "67:" // Height 3: String loop
+ "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
+ "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
+ "ldr w27, [x20, x28, LSL #0x2]\n"
+ "tbz %x[flags], #3, 68f\n"
+ "ldr x20, [%x[input_ptr], x28, LSL #0x3]\n"
+ "add x20, x20, x19, LSL #3\n"
+ "ldr x26, [x20, #0x0]\n"
+ "ldr x24, [x20, #0x8]\n"
+ "ldr x22, [x20, #0x10]\n"
+ "cbnz x28, 69f\n"
+ "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
+ "add x26, x26, x19\n"
+ "add x24, x24, x19\n"
+ "add x22, x22, x19\n"
+ "b 69f\n"
+ "68:" // Height 3: setup direct input
+ "mov x26, %x[input_ptr]\n"
+ "add x24, x26, x19\n"
+ "add x22, x24, x19\n"
+ "69:" // Height 3: input setup done
+ "cmp x27, #0x10\n"
+ "blt 74f\n"
+ "cmp x27, #0x20\n"
+ "blt 72f\n"
+ "70:" // Height 3: Multiply loop: Main loop head
+ "ldr q0, [x26, #0x0]\n"
+ "ldr q1, [x24, #0x0]\n"
+ "ldr q2, [x22, #0x0]\n"
+ "ldr q4, [x11, #0x0]\n"
+ ".inst 0x6f80e090 // udot v16.4s, v4.16b, v0.4b[0]\n"
+ "ldr q5, [x11, #0x10]\n"
+ ".inst 0x6f81e094 // udot v20.4s, v4.16b, v1.4b[0]\n"
+ "ldr q6, [x11, #0x20]\n"
+ ".inst 0x6f82e098 // udot v24.4s, v4.16b, v2.4b[0]\n"
+ "ldr q7, [x11, #0x30]\n"
+ "ldr q8, [x11, #0x40]\n"
+ ".inst 0x6f80e0b1 // udot v17.4s, v5.16b, v0.4b[0]\n"
+ "ldr q9, [x11, #0x50]\n"
+ ".inst 0x6f81e0b5 // udot v21.4s, v5.16b, v1.4b[0]\n"
+ "ldr q10, [x11, #0x60]\n"
+ ".inst 0x6f82e0b9 // udot v25.4s, v5.16b, v2.4b[0]\n"
+ "ldr q4, [x11, #0x70]\n"
+ ".inst 0x6f80e0d2 // udot v18.4s, v6.16b, v0.4b[0]\n"
+ "ldr q5, [x11, #0x80]\n"
+ ".inst 0x6f81e0d6 // udot v22.4s, v6.16b, v1.4b[0]\n"
+ "add x26, x26, #0x10\n"
+ ".inst 0x6f82e0da // udot v26.4s, v6.16b, v2.4b[0]\n"
+ "ldr q6, [x11, #0x90]\n"
+ ".inst 0x6f80e0f3 // udot v19.4s, v7.16b, v0.4b[0]\n"
+ "add x24, x24, #0x10\n"
+ ".inst 0x6f81e0f7 // udot v23.4s, v7.16b, v1.4b[0]\n"
+ "add x22, x22, #0x10\n"
+ ".inst 0x6f82e0fb // udot v27.4s, v7.16b, v2.4b[0]\n"
+ "ldr q7, [x11, #0xa0]\n"
+ ".inst 0x6fa0e110 // udot v16.4s, v8.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e114 // udot v20.4s, v8.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e118 // udot v24.4s, v8.16b, v2.4b[1]\n"
+ "ldr q8, [x11, #0xb0]\n"
+ ".inst 0x6fa0e131 // udot v17.4s, v9.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e135 // udot v21.4s, v9.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e139 // udot v25.4s, v9.16b, v2.4b[1]\n"
+ "ldr q9, [x11, #0xc0]\n"
+ ".inst 0x6fa0e152 // udot v18.4s, v10.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e156 // udot v22.4s, v10.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e15a // udot v26.4s, v10.16b, v2.4b[1]\n"
+ "ldr q10, [x11, #0xd0]\n"
+ ".inst 0x6fa0e093 // udot v19.4s, v4.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e097 // udot v23.4s, v4.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e09b // udot v27.4s, v4.16b, v2.4b[1]\n"
+ "ldr q4, [x11, #0xe0]\n"
+ ".inst 0x6f80e8b0 // udot v16.4s, v5.16b, v0.4b[2]\n"
+ ".inst 0x6f81e8b4 // udot v20.4s, v5.16b, v1.4b[2]\n"
+ ".inst 0x6f82e8b8 // udot v24.4s, v5.16b, v2.4b[2]\n"
+ "ldr q5, [x11, #0xf0]\n"
+ ".inst 0x6f80e8d1 // udot v17.4s, v6.16b, v0.4b[2]\n"
+ "add x11, x11, #0x100\n"
+ ".inst 0x6f81e8d5 // udot v21.4s, v6.16b, v1.4b[2]\n"
+ ".inst 0x6f82e8d9 // udot v25.4s, v6.16b, v2.4b[2]\n"
+ ".inst 0x6f80e8f2 // udot v18.4s, v7.16b, v0.4b[2]\n"
+ ".inst 0x6f81e8f6 // udot v22.4s, v7.16b, v1.4b[2]\n"
+ ".inst 0x6f82e8fa // udot v26.4s, v7.16b, v2.4b[2]\n"
+ ".inst 0x6f80e913 // udot v19.4s, v8.16b, v0.4b[2]\n"
+ ".inst 0x6f81e917 // udot v23.4s, v8.16b, v1.4b[2]\n"
+ ".inst 0x6f82e91b // udot v27.4s, v8.16b, v2.4b[2]\n"
+ ".inst 0x6fa0e930 // udot v16.4s, v9.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e934 // udot v20.4s, v9.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e938 // udot v24.4s, v9.16b, v2.4b[3]\n"
+ ".inst 0x6fa0e951 // udot v17.4s, v10.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e955 // udot v21.4s, v10.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e959 // udot v25.4s, v10.16b, v2.4b[3]\n"
+ ".inst 0x6fa0e892 // udot v18.4s, v4.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e896 // udot v22.4s, v4.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e89a // udot v26.4s, v4.16b, v2.4b[3]\n"
+ ".inst 0x6fa0e8b3 // udot v19.4s, v5.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e8b7 // udot v23.4s, v5.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e8bb // udot v27.4s, v5.16b, v2.4b[3]\n"
+ "tbnz %x[flags], #31, 71f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ ".inst 0x6e8f942c // udot v12.4s, v1.16b, v15.16b\n"
+ ".inst 0x6e8f944d // udot v13.4s, v2.16b, v15.16b\n"
+ "71:" // Height 3: Multiply loop: unique 9: skip row sum
+ "prfm pldl1keep, [x26, #0x80]\n"
+ "sub x27, x27, #0x10\n"
+ "prfm pldl1keep, [x24, #0x80]\n"
+ "cmp x27, #0x20\n"
+ "prfm pldl1keep, [x22, #0x80]\n"
+ "bge 70b\n"
+ "72:" // Height 3: Multiply loop: Single iteration only
+ "sub x27, x27, #0x10\n"
+ "ldr q0, [x26, #0x0]\n"
+ "ldr q1, [x24, #0x0]\n"
+ "ldr q2, [x22, #0x0]\n"
+ "ldr q6, [x11, #0x0]\n"
+ ".inst 0x6f80e0d0 // udot v16.4s, v6.16b, v0.4b[0]\n"
+ "ldr q7, [x11, #0x10]\n"
+ ".inst 0x6f81e0d4 // udot v20.4s, v6.16b, v1.4b[0]\n"
+ "ldr q8, [x11, #0x20]\n"
+ ".inst 0x6f82e0d8 // udot v24.4s, v6.16b, v2.4b[0]\n"
+ "ldr q9, [x11, #0x30]\n"
+ "ldr q10, [x11, #0x40]\n"
+ ".inst 0x6f80e0f1 // udot v17.4s, v7.16b, v0.4b[0]\n"
+ "ldr q4, [x11, #0x50]\n"
+ ".inst 0x6f81e0f5 // udot v21.4s, v7.16b, v1.4b[0]\n"
+ "ldr q5, [x11, #0x60]\n"
+ ".inst 0x6f82e0f9 // udot v25.4s, v7.16b, v2.4b[0]\n"
+ "ldr q6, [x11, #0x70]\n"
+ ".inst 0x6f80e112 // udot v18.4s, v8.16b, v0.4b[0]\n"
+ "ldr q7, [x11, #0x80]\n"
+ ".inst 0x6f81e116 // udot v22.4s, v8.16b, v1.4b[0]\n"
+ "add x26, x26, #0x10\n"
+ ".inst 0x6f82e11a // udot v26.4s, v8.16b, v2.4b[0]\n"
+ "ldr q8, [x11, #0x90]\n"
+ ".inst 0x6f80e133 // udot v19.4s, v9.16b, v0.4b[0]\n"
+ "add x24, x24, #0x10\n"
+ ".inst 0x6f81e137 // udot v23.4s, v9.16b, v1.4b[0]\n"
+ "add x22, x22, #0x10\n"
+ ".inst 0x6f82e13b // udot v27.4s, v9.16b, v2.4b[0]\n"
+ "ldr q9, [x11, #0xa0]\n"
+ ".inst 0x6fa0e150 // udot v16.4s, v10.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e154 // udot v20.4s, v10.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e158 // udot v24.4s, v10.16b, v2.4b[1]\n"
+ "ldr q10, [x11, #0xb0]\n"
+ ".inst 0x6fa0e091 // udot v17.4s, v4.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e095 // udot v21.4s, v4.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e099 // udot v25.4s, v4.16b, v2.4b[1]\n"
+ "ldr q4, [x11, #0xc0]\n"
+ ".inst 0x6fa0e0b2 // udot v18.4s, v5.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e0b6 // udot v22.4s, v5.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e0ba // udot v26.4s, v5.16b, v2.4b[1]\n"
+ "ldr q5, [x11, #0xd0]\n"
+ ".inst 0x6fa0e0d3 // udot v19.4s, v6.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e0d7 // udot v23.4s, v6.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e0db // udot v27.4s, v6.16b, v2.4b[1]\n"
+ "ldr q6, [x11, #0xe0]\n"
+ ".inst 0x6f80e8f0 // udot v16.4s, v7.16b, v0.4b[2]\n"
+ ".inst 0x6f81e8f4 // udot v20.4s, v7.16b, v1.4b[2]\n"
+ ".inst 0x6f82e8f8 // udot v24.4s, v7.16b, v2.4b[2]\n"
+ "ldr q7, [x11, #0xf0]\n"
+ ".inst 0x6f80e911 // udot v17.4s, v8.16b, v0.4b[2]\n"
+ "add x11, x11, #0x100\n"
+ ".inst 0x6f81e915 // udot v21.4s, v8.16b, v1.4b[2]\n"
+ ".inst 0x6f82e919 // udot v25.4s, v8.16b, v2.4b[2]\n"
+ ".inst 0x6f80e932 // udot v18.4s, v9.16b, v0.4b[2]\n"
+ ".inst 0x6f81e936 // udot v22.4s, v9.16b, v1.4b[2]\n"
+ ".inst 0x6f82e93a // udot v26.4s, v9.16b, v2.4b[2]\n"
+ ".inst 0x6f80e953 // udot v19.4s, v10.16b, v0.4b[2]\n"
+ ".inst 0x6f81e957 // udot v23.4s, v10.16b, v1.4b[2]\n"
+ ".inst 0x6f82e95b // udot v27.4s, v10.16b, v2.4b[2]\n"
+ ".inst 0x6fa0e890 // udot v16.4s, v4.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e894 // udot v20.4s, v4.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e898 // udot v24.4s, v4.16b, v2.4b[3]\n"
+ ".inst 0x6fa0e8b1 // udot v17.4s, v5.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e8b5 // udot v21.4s, v5.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e8b9 // udot v25.4s, v5.16b, v2.4b[3]\n"
+ ".inst 0x6fa0e8d2 // udot v18.4s, v6.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e8d6 // udot v22.4s, v6.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e8da // udot v26.4s, v6.16b, v2.4b[3]\n"
+ ".inst 0x6fa0e8f3 // udot v19.4s, v7.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e8f7 // udot v23.4s, v7.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e8fb // udot v27.4s, v7.16b, v2.4b[3]\n"
+ "tbnz %x[flags], #31, 73f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ ".inst 0x6e8f942c // udot v12.4s, v1.16b, v15.16b\n"
+ ".inst 0x6e8f944d // udot v13.4s, v2.16b, v15.16b\n"
+ "73:" // Height 3: Multiply loop: unique 10: skip row sum
+ "prfm pldl1keep, [x26, #0x80]\n"
+ "prfm pldl1keep, [x24, #0x80]\n"
+ "prfm pldl1keep, [x22, #0x80]\n"
+ "74:" // Height 3: Multiply loop: Main loop skip
+ "cbz x27, 81f\n"
+ "cmp x27, #0x4\n"
+ "blt 77f\n"
+ "75:" // Height 3: Multiply loop: Odd block loop
+ "ldr s0, [x26], #0x4\n"
+ "ldr s1, [x24], #0x4\n"
+ "ldr s2, [x22], #0x4\n"
+ "tbnz %x[flags], #31, 76f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ ".inst 0x6e8f942c // udot v12.4s, v1.16b, v15.16b\n"
+ ".inst 0x6e8f944d // udot v13.4s, v2.16b, v15.16b\n"
+ "76:" // Height 3: Multiply loop: unique 11: skip row sum
+ "ldr q8, [x11, #0x0]\n"
+ ".inst 0x6f80e110 // udot v16.4s, v8.16b, v0.4b[0]\n"
+ "ldr q9, [x11, #0x10]\n"
+ ".inst 0x6f81e114 // udot v20.4s, v8.16b, v1.4b[0]\n"
+ "ldr q10, [x11, #0x20]\n"
+ ".inst 0x6f82e118 // udot v24.4s, v8.16b, v2.4b[0]\n"
+ "ldr q4, [x11, #0x30]\n"
+ "sub x27, x27, #0x4\n"
+ ".inst 0x6f80e131 // udot v17.4s, v9.16b, v0.4b[0]\n"
+ "cmp x27, #0x4\n"
+ ".inst 0x6f81e135 // udot v21.4s, v9.16b, v1.4b[0]\n"
+ "add x11, x11, #0x40\n"
+ ".inst 0x6f82e139 // udot v25.4s, v9.16b, v2.4b[0]\n"
+ ".inst 0x6f80e152 // udot v18.4s, v10.16b, v0.4b[0]\n"
+ ".inst 0x6f81e156 // udot v22.4s, v10.16b, v1.4b[0]\n"
+ ".inst 0x6f82e15a // udot v26.4s, v10.16b, v2.4b[0]\n"
+ ".inst 0x6f80e093 // udot v19.4s, v4.16b, v0.4b[0]\n"
+ ".inst 0x6f81e097 // udot v23.4s, v4.16b, v1.4b[0]\n"
+ ".inst 0x6f82e09b // udot v27.4s, v4.16b, v2.4b[0]\n"
+ "bge 75b\n"
+ "cbz x27, 81f\n"
+ "77:" // Height 3: Multiply loop: Skip odd blocks
+ "tbz x27, #1, 78f\n"
+ "ldr h0, [x26], #0x2\n"
+ "ldr h1, [x24], #0x2\n"
+ "ldr h2, [x22], #0x2\n"
+ "tbz x27, #0, 79f\n"
+ "ld1 { v0.b }[2], [x26]\n"
+ "ld1 { v1.b }[2], [x24]\n"
+ "ld1 { v2.b }[2], [x22]\n"
+ "b 79f\n"
+ "78:" // Height 3: Multiply loop: Ragged operand read: partial_1_0
+ "ldr b0, [x26, #0x0]\n"
+ "ldr b1, [x24, #0x0]\n"
+ "ldr b2, [x22, #0x0]\n"
+ "79:" // Height 3: Multiply loop: Ragged operand read: Done
+ "tbnz %x[flags], #31, 80f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ ".inst 0x6e8f942c // udot v12.4s, v1.16b, v15.16b\n"
+ ".inst 0x6e8f944d // udot v13.4s, v2.16b, v15.16b\n"
+ "80:" // Height 3: Multiply loop: unique 12: skip row sum
+ "ldr q5, [x11, #0x0]\n"
+ ".inst 0x6f80e0b0 // udot v16.4s, v5.16b, v0.4b[0]\n"
+ "ldr q6, [x11, #0x10]\n"
+ ".inst 0x6f81e0b4 // udot v20.4s, v5.16b, v1.4b[0]\n"
+ "ldr q7, [x11, #0x20]\n"
+ ".inst 0x6f82e0b8 // udot v24.4s, v5.16b, v2.4b[0]\n"
+ "ldr q8, [x11, #0x30]\n"
+ "add x11, x11, #0x40\n"
+ ".inst 0x6f80e0d1 // udot v17.4s, v6.16b, v0.4b[0]\n"
+ ".inst 0x6f81e0d5 // udot v21.4s, v6.16b, v1.4b[0]\n"
+ ".inst 0x6f82e0d9 // udot v25.4s, v6.16b, v2.4b[0]\n"
+ ".inst 0x6f80e0f2 // udot v18.4s, v7.16b, v0.4b[0]\n"
+ ".inst 0x6f81e0f6 // udot v22.4s, v7.16b, v1.4b[0]\n"
+ ".inst 0x6f82e0fa // udot v26.4s, v7.16b, v2.4b[0]\n"
+ ".inst 0x6f80e113 // udot v19.4s, v8.16b, v0.4b[0]\n"
+ ".inst 0x6f81e117 // udot v23.4s, v8.16b, v1.4b[0]\n"
+ ".inst 0x6f82e11b // udot v27.4s, v8.16b, v2.4b[0]\n"
+ "81:" // Height 3: Multiply loop: No odd multiplies
+ "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
+ "add x28, x28, #0x1\n"
+ "cmp x28, x19\n"
+ "bne 67b\n"
+ "prfm pstl1keep, [x9, #0x0]\n"
+ "prfm pstl1keep, [x25, #0x0]\n"
+ "prfm pstl1keep, [x23, #0x0]\n"
+ "tbnz %x[flags], #31, 82f\n"
+ "addp v11.4s, v11.4s, v11.4s\n"
+ "add x19, %x[qp], %[b_offset]\n"
+ "ld1r { v3.4s }, [x19]\n"
+ "addp v12.4s, v12.4s, v12.4s\n"
+ "addp v13.4s, v13.4s, v13.4s\n"
+ "addp v11.4s, v11.4s, v11.4s\n"
+ "addp v12.4s, v12.4s, v12.4s\n"
+ "addp v13.4s, v13.4s, v13.4s\n"
+ "neg v3.4s, v3.4s\n"
+ "mul v11.4s, v11.4s, v3.4s\n"
+ "mul v12.4s, v12.4s, v3.4s\n"
+ "mul v13.4s, v13.4s, v3.4s\n"
+ "82:" // Height 3: skip row sum fixup
+ "add v16.4s, v16.4s, v11.4s\n"
+ "orr %x[flags], %x[flags], #0x80000000\n"
+ "add v17.4s, v17.4s, v11.4s\n"
+ "ldr q0, [x10, #0x0]\n"
+ "add v18.4s, v18.4s, v11.4s\n"
+ "ldr q1, [x10, #0x10]\n"
+ "add v19.4s, v19.4s, v11.4s\n"
+ "ldr q2, [x10, #0x20]\n"
+ "add v20.4s, v20.4s, v12.4s\n"
+ "ldr q3, [x10, #0x30]\n"
+ "add v21.4s, v21.4s, v12.4s\n"
+ "add x20, %x[qp], %[per_layer_right_shift]\n"
+ "add v22.4s, v22.4s, v12.4s\n"
+ "add x19, %x[qp], %[per_layer_mul]\n"
+ "ld1r { v4.4s }, [x19]\n"
+ "add v23.4s, v23.4s, v12.4s\n"
+ "add x10, x10, #0x40\n"
+ "add v24.4s, v24.4s, v13.4s\n"
+ "add v25.4s, v25.4s, v13.4s\n"
+ "add v26.4s, v26.4s, v13.4s\n"
+ "add v27.4s, v27.4s, v13.4s\n"
+ "add v16.4s, v16.4s, v0.4s\n"
+ "add v17.4s, v17.4s, v1.4s\n"
+ "add v18.4s, v18.4s, v2.4s\n"
+ "add v19.4s, v19.4s, v3.4s\n"
+ "add v20.4s, v20.4s, v0.4s\n"
+ "add v21.4s, v21.4s, v1.4s\n"
+ "add v22.4s, v22.4s, v2.4s\n"
+ "add v23.4s, v23.4s, v3.4s\n"
+ "add v24.4s, v24.4s, v0.4s\n"
+ "ld1r { v0.4s }, [x20]\n"
+ "add v25.4s, v25.4s, v1.4s\n"
+ "add v26.4s, v26.4s, v2.4s\n"
+ "add v27.4s, v27.4s, v3.4s\n"
+ "sqrdmulh v16.4s, v16.4s, v4.4s\n"
+ "sqrdmulh v17.4s, v17.4s, v4.4s\n"
+ "sqrdmulh v18.4s, v18.4s, v4.4s\n"
+ "sqrdmulh v19.4s, v19.4s, v4.4s\n"
+ "sqrdmulh v20.4s, v20.4s, v4.4s\n"
+ "sqrdmulh v21.4s, v21.4s, v4.4s\n"
+ "sqrdmulh v22.4s, v22.4s, v4.4s\n"
+ "sqrdmulh v23.4s, v23.4s, v4.4s\n"
+ "sqrdmulh v24.4s, v24.4s, v4.4s\n"
+ "sqrdmulh v25.4s, v25.4s, v4.4s\n"
+ "sqrdmulh v26.4s, v26.4s, v4.4s\n"
+ "sqrdmulh v27.4s, v27.4s, v4.4s\n"
+ "tbz %x[flags], #5, 83f\n"
+ "and v4.16b, v16.16b, v0.16b\n"
+ "sshr v4.4s, v4.4s, #0x1f\n"
+ "and v5.16b, v17.16b, v0.16b\n"
+ "and v6.16b, v18.16b, v0.16b\n"
+ "sshr v5.4s, v5.4s, #0x1f\n"
+ "and v7.16b, v19.16b, v0.16b\n"
+ "and v8.16b, v20.16b, v0.16b\n"
+ "sshr v6.4s, v6.4s, #0x1f\n"
+ "and v9.16b, v21.16b, v0.16b\n"
+ "sshr v7.4s, v7.4s, #0x1f\n"
+ "sqadd v16.4s, v16.4s, v4.4s\n"
+ "and v10.16b, v22.16b, v0.16b\n"
+ "sshr v8.4s, v8.4s, #0x1f\n"
+ "and v4.16b, v23.16b, v0.16b\n"
+ "sshr v9.4s, v9.4s, #0x1f\n"
+ "sqadd v17.4s, v17.4s, v5.4s\n"
+ "sshr v10.4s, v10.4s, #0x1f\n"
+ "sqadd v18.4s, v18.4s, v6.4s\n"
+ "sshr v4.4s, v4.4s, #0x1f\n"
+ "and v5.16b, v24.16b, v0.16b\n"
+ "sshr v5.4s, v5.4s, #0x1f\n"
+ "sqadd v19.4s, v19.4s, v7.4s\n"
+ "sqadd v20.4s, v20.4s, v8.4s\n"
+ "sqadd v21.4s, v21.4s, v9.4s\n"
+ "sqadd v22.4s, v22.4s, v10.4s\n"
+ "sqadd v23.4s, v23.4s, v4.4s\n"
+ "and v6.16b, v25.16b, v0.16b\n"
+ "sshr v6.4s, v6.4s, #0x1f\n"
+ "sqadd v24.4s, v24.4s, v5.4s\n"
+ "and v7.16b, v26.16b, v0.16b\n"
+ "sshr v7.4s, v7.4s, #0x1f\n"
+ "and v8.16b, v27.16b, v0.16b\n"
+ "sqadd v25.4s, v25.4s, v6.4s\n"
+ "sshr v8.4s, v8.4s, #0x1f\n"
+ "sqadd v26.4s, v26.4s, v7.4s\n"
+ "sqadd v27.4s, v27.4s, v8.4s\n"
+ "83:" // Height 3: no shift correction
+ "srshl v16.4s, v16.4s, v0.4s\n"
+ "add x19, %x[qp], %[c_offset]\n"
+ "ld1r { v4.4s }, [x19]\n"
+ "srshl v17.4s, v17.4s, v0.4s\n"
+ "add x19, %x[qp], %[minval]\n"
+ "srshl v18.4s, v18.4s, v0.4s\n"
+ "ld1r { v5.4s }, [x19]\n"
+ "add x19, %x[qp], %[maxval]\n"
+ "srshl v19.4s, v19.4s, v0.4s\n"
+ "ld1r { v6.4s }, [x19]\n"
+ "cmp x12, #0x10\n"
+ "srshl v20.4s, v20.4s, v0.4s\n"
+ "srshl v21.4s, v21.4s, v0.4s\n"
+ "srshl v22.4s, v22.4s, v0.4s\n"
+ "srshl v23.4s, v23.4s, v0.4s\n"
+ "add v16.4s, v16.4s, v4.4s\n"
+ "add v17.4s, v17.4s, v4.4s\n"
+ "add v18.4s, v18.4s, v4.4s\n"
+ "smin v16.4s, v16.4s, v6.4s\n"
+ "smin v17.4s, v17.4s, v6.4s\n"
+ "smin v18.4s, v18.4s, v6.4s\n"
+ "smax v16.4s, v16.4s, v5.4s\n"
+ "smax v17.4s, v17.4s, v5.4s\n"
+ "smax v18.4s, v18.4s, v5.4s\n"
+ "add v19.4s, v19.4s, v4.4s\n"
+ "add v20.4s, v20.4s, v4.4s\n"
+ "add v21.4s, v21.4s, v4.4s\n"
+ "smin v19.4s, v19.4s, v6.4s\n"
+ "smin v20.4s, v20.4s, v6.4s\n"
+ "smin v21.4s, v21.4s, v6.4s\n"
+ "smax v19.4s, v19.4s, v5.4s\n"
+ "smax v20.4s, v20.4s, v5.4s\n"
+ "smax v21.4s, v21.4s, v5.4s\n"
+ "add v22.4s, v22.4s, v4.4s\n"
+ "add v23.4s, v23.4s, v4.4s\n"
+ "srshl v24.4s, v24.4s, v0.4s\n"
+ "smin v22.4s, v22.4s, v6.4s\n"
+ "smin v23.4s, v23.4s, v6.4s\n"
+ "srshl v25.4s, v25.4s, v0.4s\n"
+ "smax v22.4s, v22.4s, v5.4s\n"
+ "smax v23.4s, v23.4s, v5.4s\n"
+ "add v24.4s, v24.4s, v4.4s\n"
+ "add v25.4s, v25.4s, v4.4s\n"
+ "srshl v26.4s, v26.4s, v0.4s\n"
+ "smin v24.4s, v24.4s, v6.4s\n"
+ "smin v25.4s, v25.4s, v6.4s\n"
+ "srshl v27.4s, v27.4s, v0.4s\n"
+ "smax v24.4s, v24.4s, v5.4s\n"
+ "smax v25.4s, v25.4s, v5.4s\n"
+ "add v26.4s, v26.4s, v4.4s\n"
+ "add v27.4s, v27.4s, v4.4s\n"
+ "uzp1 v16.8h, v16.8h, v17.8h\n"
+ "smin v26.4s, v26.4s, v6.4s\n"
+ "smin v27.4s, v27.4s, v6.4s\n"
+ "uzp1 v17.8h, v18.8h, v19.8h\n"
+ "smax v26.4s, v26.4s, v5.4s\n"
+ "smax v27.4s, v27.4s, v5.4s\n"
+ "uzp1 v20.8h, v20.8h, v21.8h\n"
+ "uzp1 v21.8h, v22.8h, v23.8h\n"
+ "uzp1 v24.8h, v24.8h, v25.8h\n"
+ "uzp1 v25.8h, v26.8h, v27.8h\n"
+ "uzp1 v16.16b, v16.16b, v17.16b\n"
+ "uzp1 v20.16b, v20.16b, v21.16b\n"
+ "uzp1 v24.16b, v24.16b, v25.16b\n"
+ "bge 92f\n"
+ "tbz x12, #3, 87f\n"
+ "str d16, [x9], #0x8\n"
+ "str d20, [x25], #0x8\n"
+ "str d24, [x23], #0x8\n"
+ "tbz x12, #2, 85f\n"
+ "st1 { v16.s }[2], [x9], #0x4\n"
+ "st1 { v20.s }[2], [x25], #0x4\n"
+ "st1 { v24.s }[2], [x23], #0x4\n"
+ "tbz x12, #1, 84f\n"
+ "st1 { v16.h }[6], [x9], #0x2\n"
+ "st1 { v20.h }[6], [x25], #0x2\n"
+ "st1 { v24.h }[6], [x23], #0x2\n"
+ "tbz x12, #0, 91f\n"
+ "st1 { v16.b }[14], [x9]\n"
+ "st1 { v20.b }[14], [x25]\n"
+ "st1 { v24.b }[14], [x23]\n"
+ "b 91f\n"
+ "84:" // Height 3: Partial direct writeback: partial_1_12
+ "tbz x12, #0, 91f\n"
+ "st1 { v16.b }[12], [x9]\n"
+ "st1 { v20.b }[12], [x25]\n"
+ "st1 { v24.b }[12], [x23]\n"
+ "b 91f\n"
+ "85:" // Height 3: Partial direct writeback: partial_2_8
+ "tbz x12, #1, 86f\n"
+ "st1 { v16.h }[4], [x9], #0x2\n"
+ "st1 { v20.h }[4], [x25], #0x2\n"
+ "st1 { v24.h }[4], [x23], #0x2\n"
+ "tbz x12, #0, 91f\n"
+ "st1 { v16.b }[10], [x9]\n"
+ "st1 { v20.b }[10], [x25]\n"
+ "st1 { v24.b }[10], [x23]\n"
+ "b 91f\n"
+ "86:" // Height 3: Partial direct writeback: partial_1_8
+ "tbz x12, #0, 91f\n"
+ "st1 { v16.b }[8], [x9]\n"
+ "st1 { v20.b }[8], [x25]\n"
+ "st1 { v24.b }[8], [x23]\n"
+ "b 91f\n"
+ "87:" // Height 3: Partial direct writeback: partial_4_0
+ "tbz x12, #2, 89f\n"
+ "str s16, [x9], #0x4\n"
+ "str s20, [x25], #0x4\n"
+ "str s24, [x23], #0x4\n"
+ "tbz x12, #1, 88f\n"
+ "st1 { v16.h }[2], [x9], #0x2\n"
+ "st1 { v20.h }[2], [x25], #0x2\n"
+ "st1 { v24.h }[2], [x23], #0x2\n"
+ "tbz x12, #0, 91f\n"
+ "st1 { v16.b }[6], [x9]\n"
+ "st1 { v20.b }[6], [x25]\n"
+ "st1 { v24.b }[6], [x23]\n"
+ "b 91f\n"
+ "88:" // Height 3: Partial direct writeback: partial_1_4
+ "tbz x12, #0, 91f\n"
+ "st1 { v16.b }[4], [x9]\n"
+ "st1 { v20.b }[4], [x25]\n"
+ "st1 { v24.b }[4], [x23]\n"
+ "b 91f\n"
+ "89:" // Height 3: Partial direct writeback: partial_2_0
+ "tbz x12, #1, 90f\n"
+ "str h16, [x9], #0x2\n"
+ "str h20, [x25], #0x2\n"
+ "str h24, [x23], #0x2\n"
+ "tbz x12, #0, 91f\n"
+ "st1 { v16.b }[2], [x9]\n"
+ "st1 { v20.b }[2], [x25]\n"
+ "st1 { v24.b }[2], [x23]\n"
+ "b 91f\n"
+ "90:" // Height 3: Partial direct writeback: partial_1_0
+ "str b16, [x9, #0x0]\n"
+ "str b20, [x25, #0x0]\n"
+ "str b24, [x23, #0x0]\n"
+ "91:" // Height 3: Partial direct writeback: Done
+ "b 93f\n"
+ "92:" // Height 3: Full writeback
+ "str q16, [x9, #0x0]\n"
+ "str q20, [x25, #0x0]\n"
+ "str q24, [x23, #0x0]\n"
+ "add x9, x9, #0x10\n"
+ "add x25, x25, #0x10\n"
+ "add x23, x23, #0x10\n"
+ "93:" // Height 3: Writeback done
+ "subs x12, x12, #0x10\n"
+ "bgt 65b\n"
+ "b 126f\n"
+ "94:" // Height 4
+ "movi v11.4s, #0x0\n"
+ "ldr x12, [%x[args_ptr], %[offsetof_N]]\n"
+ "mov x10, %x[col_bias]\n"
+ "movi v12.4s, #0x0\n"
+ "ldr x11, [%x[args_ptr], %[offsetof_B_ptr]]\n"
+ "bic %x[flags], %x[flags], #0x80000000\n"
+ "movi v13.4s, #0x0\n"
+ "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
+ "movi v14.4s, #0x0\n"
+ "movi v15.16b, #0x1\n"
+ "tbz %x[flags], #2, 95f\n"
+ "ldr x9, [%x[output_ptr], #0x0]\n"
+ "ldr x25, [%x[output_ptr], #0x8]\n"
+ "add x9, x9, x19\n"
+ "ldr x23, [%x[output_ptr], #0x10]\n"
+ "ldr x21, [%x[output_ptr], #0x18]\n"
+ "add x25, x25, x19\n"
+ "add %x[output_ptr], %x[output_ptr], #0x20\n"
+ "add x23, x23, x19\n"
+ "add x21, x21, x19\n"
+ "b 96f\n"
+ "95:" // Height 4: setup direct output
+ "mov x9, %x[output_ptr]\n"
+ "add x25, x9, x19\n"
+ "add x23, x25, x19\n"
+ "add x21, x23, x19\n"
+ "add %x[output_ptr], x21, x19\n"
+ "96:" // Height 4: Column loop
+ "movi v16.4s, #0x0\n"
+ "movi v17.4s, #0x0\n"
+ "movi v18.4s, #0x0\n"
+ "movi v19.4s, #0x0\n"
+ "movi v20.4s, #0x0\n"
+ "movi v21.4s, #0x0\n"
+ "movi v22.4s, #0x0\n"
+ "movi v23.4s, #0x0\n"
+ "movi v24.4s, #0x0\n"
+ "movi v25.4s, #0x0\n"
+ "movi v26.4s, #0x0\n"
+ "movi v27.4s, #0x0\n"
+ "movi v28.4s, #0x0\n"
+ "movi v29.4s, #0x0\n"
+ "movi v30.4s, #0x0\n"
+ "movi v31.4s, #0x0\n"
+ "97:" // Height 4: setup done
+ "mov x28, #0x0\n"
+ "98:" // Height 4: String loop
+ "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
+ "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
+ "ldr w27, [x20, x28, LSL #0x2]\n"
+ "tbz %x[flags], #3, 99f\n"
+ "ldr x20, [%x[input_ptr], x28, LSL #0x3]\n"
+ "add x20, x20, x19, LSL #3\n"
+ "ldr x26, [x20, #0x0]\n"
+ "ldr x24, [x20, #0x8]\n"
+ "ldr x22, [x20, #0x10]\n"
+ "ldr x20, [x20, #0x18]\n"
+ "cbnz x28, 100f\n"
+ "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
+ "add x26, x26, x19\n"
+ "add x24, x24, x19\n"
+ "add x22, x22, x19\n"
+ "add x20, x20, x19\n"
+ "b 100f\n"
+ "99:" // Height 4: setup direct input
+ "mov x26, %x[input_ptr]\n"
+ "add x24, x26, x19\n"
+ "add x22, x24, x19\n"
+ "add x20, x22, x19\n"
+ "100:" // Height 4: input setup done
+ "cmp x27, #0x10\n"
+ "blt 105f\n"
+ "cmp x27, #0x20\n"
+ "blt 103f\n"
+ "101:" // Height 4: Multiply loop: Main loop head
+ "ldr q0, [x26, #0x0]\n"
+ "ldr q1, [x24, #0x0]\n"
+ "ldr q2, [x22, #0x0]\n"
+ "ldr q3, [x20, #0x0]\n"
+ "ldr q4, [x11, #0x0]\n"
+ ".inst 0x6f80e090 // udot v16.4s, v4.16b, v0.4b[0]\n"
+ "ldr q5, [x11, #0x10]\n"
+ ".inst 0x6f81e094 // udot v20.4s, v4.16b, v1.4b[0]\n"
+ "ldr q6, [x11, #0x20]\n"
+ ".inst 0x6f82e098 // udot v24.4s, v4.16b, v2.4b[0]\n"
+ "ldr q7, [x11, #0x30]\n"
+ ".inst 0x6f83e09c // udot v28.4s, v4.16b, v3.4b[0]\n"
+ "ldr q8, [x11, #0x40]\n"
+ "ldr q9, [x11, #0x50]\n"
+ ".inst 0x6f80e0b1 // udot v17.4s, v5.16b, v0.4b[0]\n"
+ "ldr q10, [x11, #0x60]\n"
+ ".inst 0x6f81e0b5 // udot v21.4s, v5.16b, v1.4b[0]\n"
+ "ldr q4, [x11, #0x70]\n"
+ ".inst 0x6f82e0b9 // udot v25.4s, v5.16b, v2.4b[0]\n"
+ "add x26, x26, #0x10\n"
+ ".inst 0x6f83e0bd // udot v29.4s, v5.16b, v3.4b[0]\n"
+ "ldr q5, [x11, #0x80]\n"
+ ".inst 0x6f80e0d2 // udot v18.4s, v6.16b, v0.4b[0]\n"
+ "add x24, x24, #0x10\n"
+ ".inst 0x6f81e0d6 // udot v22.4s, v6.16b, v1.4b[0]\n"
+ "add x22, x22, #0x10\n"
+ ".inst 0x6f82e0da // udot v26.4s, v6.16b, v2.4b[0]\n"
+ "add x20, x20, #0x10\n"
+ ".inst 0x6f83e0de // udot v30.4s, v6.16b, v3.4b[0]\n"
+ "ldr q6, [x11, #0x90]\n"
+ ".inst 0x6f80e0f3 // udot v19.4s, v7.16b, v0.4b[0]\n"
+ ".inst 0x6f81e0f7 // udot v23.4s, v7.16b, v1.4b[0]\n"
+ ".inst 0x6f82e0fb // udot v27.4s, v7.16b, v2.4b[0]\n"
+ ".inst 0x6f83e0ff // udot v31.4s, v7.16b, v3.4b[0]\n"
+ "ldr q7, [x11, #0xa0]\n"
+ ".inst 0x6fa0e110 // udot v16.4s, v8.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e114 // udot v20.4s, v8.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e118 // udot v24.4s, v8.16b, v2.4b[1]\n"
+ ".inst 0x6fa3e11c // udot v28.4s, v8.16b, v3.4b[1]\n"
+ "ldr q8, [x11, #0xb0]\n"
+ ".inst 0x6fa0e131 // udot v17.4s, v9.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e135 // udot v21.4s, v9.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e139 // udot v25.4s, v9.16b, v2.4b[1]\n"
+ ".inst 0x6fa3e13d // udot v29.4s, v9.16b, v3.4b[1]\n"
+ "ldr q9, [x11, #0xc0]\n"
+ ".inst 0x6fa0e152 // udot v18.4s, v10.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e156 // udot v22.4s, v10.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e15a // udot v26.4s, v10.16b, v2.4b[1]\n"
+ ".inst 0x6fa3e15e // udot v30.4s, v10.16b, v3.4b[1]\n"
+ "ldr q10, [x11, #0xd0]\n"
+ ".inst 0x6fa0e093 // udot v19.4s, v4.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e097 // udot v23.4s, v4.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e09b // udot v27.4s, v4.16b, v2.4b[1]\n"
+ ".inst 0x6fa3e09f // udot v31.4s, v4.16b, v3.4b[1]\n"
+ "ldr q4, [x11, #0xe0]\n"
+ ".inst 0x6f80e8b0 // udot v16.4s, v5.16b, v0.4b[2]\n"
+ ".inst 0x6f81e8b4 // udot v20.4s, v5.16b, v1.4b[2]\n"
+ ".inst 0x6f82e8b8 // udot v24.4s, v5.16b, v2.4b[2]\n"
+ ".inst 0x6f83e8bc // udot v28.4s, v5.16b, v3.4b[2]\n"
+ "ldr q5, [x11, #0xf0]\n"
+ ".inst 0x6f80e8d1 // udot v17.4s, v6.16b, v0.4b[2]\n"
+ "add x11, x11, #0x100\n"
+ ".inst 0x6f81e8d5 // udot v21.4s, v6.16b, v1.4b[2]\n"
+ ".inst 0x6f82e8d9 // udot v25.4s, v6.16b, v2.4b[2]\n"
+ ".inst 0x6f83e8dd // udot v29.4s, v6.16b, v3.4b[2]\n"
+ ".inst 0x6f80e8f2 // udot v18.4s, v7.16b, v0.4b[2]\n"
+ ".inst 0x6f81e8f6 // udot v22.4s, v7.16b, v1.4b[2]\n"
+ ".inst 0x6f82e8fa // udot v26.4s, v7.16b, v2.4b[2]\n"
+ ".inst 0x6f83e8fe // udot v30.4s, v7.16b, v3.4b[2]\n"
+ ".inst 0x6f80e913 // udot v19.4s, v8.16b, v0.4b[2]\n"
+ ".inst 0x6f81e917 // udot v23.4s, v8.16b, v1.4b[2]\n"
+ ".inst 0x6f82e91b // udot v27.4s, v8.16b, v2.4b[2]\n"
+ ".inst 0x6f83e91f // udot v31.4s, v8.16b, v3.4b[2]\n"
+ ".inst 0x6fa0e930 // udot v16.4s, v9.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e934 // udot v20.4s, v9.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e938 // udot v24.4s, v9.16b, v2.4b[3]\n"
+ ".inst 0x6fa3e93c // udot v28.4s, v9.16b, v3.4b[3]\n"
+ ".inst 0x6fa0e951 // udot v17.4s, v10.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e955 // udot v21.4s, v10.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e959 // udot v25.4s, v10.16b, v2.4b[3]\n"
+ ".inst 0x6fa3e95d // udot v29.4s, v10.16b, v3.4b[3]\n"
+ ".inst 0x6fa0e892 // udot v18.4s, v4.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e896 // udot v22.4s, v4.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e89a // udot v26.4s, v4.16b, v2.4b[3]\n"
+ ".inst 0x6fa3e89e // udot v30.4s, v4.16b, v3.4b[3]\n"
+ ".inst 0x6fa0e8b3 // udot v19.4s, v5.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e8b7 // udot v23.4s, v5.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e8bb // udot v27.4s, v5.16b, v2.4b[3]\n"
+ ".inst 0x6fa3e8bf // udot v31.4s, v5.16b, v3.4b[3]\n"
+ "tbnz %x[flags], #31, 102f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ ".inst 0x6e8f942c // udot v12.4s, v1.16b, v15.16b\n"
+ ".inst 0x6e8f944d // udot v13.4s, v2.16b, v15.16b\n"
+ ".inst 0x6e8f946e // udot v14.4s, v3.16b, v15.16b\n"
+ "102:" // Height 4: Multiply loop: unique 13: skip row sum
+ "prfm pldl1keep, [x26, #0x80]\n"
+ "sub x27, x27, #0x10\n"
+ "prfm pldl1keep, [x24, #0x80]\n"
+ "cmp x27, #0x20\n"
+ "prfm pldl1keep, [x22, #0x80]\n"
+ "prfm pldl1keep, [x20, #0x80]\n"
+ "bge 101b\n"
+ "103:" // Height 4: Multiply loop: Single iteration only
+ "sub x27, x27, #0x10\n"
+ "ldr q0, [x26, #0x0]\n"
+ "ldr q1, [x24, #0x0]\n"
+ "ldr q2, [x22, #0x0]\n"
+ "ldr q3, [x20, #0x0]\n"
+ "ldr q6, [x11, #0x0]\n"
+ ".inst 0x6f80e0d0 // udot v16.4s, v6.16b, v0.4b[0]\n"
+ "ldr q7, [x11, #0x10]\n"
+ ".inst 0x6f81e0d4 // udot v20.4s, v6.16b, v1.4b[0]\n"
+ "ldr q8, [x11, #0x20]\n"
+ ".inst 0x6f82e0d8 // udot v24.4s, v6.16b, v2.4b[0]\n"
+ "ldr q9, [x11, #0x30]\n"
+ ".inst 0x6f83e0dc // udot v28.4s, v6.16b, v3.4b[0]\n"
+ "ldr q10, [x11, #0x40]\n"
+ "ldr q4, [x11, #0x50]\n"
+ ".inst 0x6f80e0f1 // udot v17.4s, v7.16b, v0.4b[0]\n"
+ "ldr q5, [x11, #0x60]\n"
+ ".inst 0x6f81e0f5 // udot v21.4s, v7.16b, v1.4b[0]\n"
+ "ldr q6, [x11, #0x70]\n"
+ ".inst 0x6f82e0f9 // udot v25.4s, v7.16b, v2.4b[0]\n"
+ "add x26, x26, #0x10\n"
+ ".inst 0x6f83e0fd // udot v29.4s, v7.16b, v3.4b[0]\n"
+ "ldr q7, [x11, #0x80]\n"
+ ".inst 0x6f80e112 // udot v18.4s, v8.16b, v0.4b[0]\n"
+ "add x24, x24, #0x10\n"
+ ".inst 0x6f81e116 // udot v22.4s, v8.16b, v1.4b[0]\n"
+ "add x22, x22, #0x10\n"
+ ".inst 0x6f82e11a // udot v26.4s, v8.16b, v2.4b[0]\n"
+ "add x20, x20, #0x10\n"
+ ".inst 0x6f83e11e // udot v30.4s, v8.16b, v3.4b[0]\n"
+ "ldr q8, [x11, #0x90]\n"
+ ".inst 0x6f80e133 // udot v19.4s, v9.16b, v0.4b[0]\n"
+ ".inst 0x6f81e137 // udot v23.4s, v9.16b, v1.4b[0]\n"
+ ".inst 0x6f82e13b // udot v27.4s, v9.16b, v2.4b[0]\n"
+ ".inst 0x6f83e13f // udot v31.4s, v9.16b, v3.4b[0]\n"
+ "ldr q9, [x11, #0xa0]\n"
+ ".inst 0x6fa0e150 // udot v16.4s, v10.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e154 // udot v20.4s, v10.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e158 // udot v24.4s, v10.16b, v2.4b[1]\n"
+ ".inst 0x6fa3e15c // udot v28.4s, v10.16b, v3.4b[1]\n"
+ "ldr q10, [x11, #0xb0]\n"
+ ".inst 0x6fa0e091 // udot v17.4s, v4.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e095 // udot v21.4s, v4.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e099 // udot v25.4s, v4.16b, v2.4b[1]\n"
+ ".inst 0x6fa3e09d // udot v29.4s, v4.16b, v3.4b[1]\n"
+ "ldr q4, [x11, #0xc0]\n"
+ ".inst 0x6fa0e0b2 // udot v18.4s, v5.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e0b6 // udot v22.4s, v5.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e0ba // udot v26.4s, v5.16b, v2.4b[1]\n"
+ ".inst 0x6fa3e0be // udot v30.4s, v5.16b, v3.4b[1]\n"
+ "ldr q5, [x11, #0xd0]\n"
+ ".inst 0x6fa0e0d3 // udot v19.4s, v6.16b, v0.4b[1]\n"
+ ".inst 0x6fa1e0d7 // udot v23.4s, v6.16b, v1.4b[1]\n"
+ ".inst 0x6fa2e0db // udot v27.4s, v6.16b, v2.4b[1]\n"
+ ".inst 0x6fa3e0df // udot v31.4s, v6.16b, v3.4b[1]\n"
+ "ldr q6, [x11, #0xe0]\n"
+ ".inst 0x6f80e8f0 // udot v16.4s, v7.16b, v0.4b[2]\n"
+ ".inst 0x6f81e8f4 // udot v20.4s, v7.16b, v1.4b[2]\n"
+ ".inst 0x6f82e8f8 // udot v24.4s, v7.16b, v2.4b[2]\n"
+ ".inst 0x6f83e8fc // udot v28.4s, v7.16b, v3.4b[2]\n"
+ "ldr q7, [x11, #0xf0]\n"
+ ".inst 0x6f80e911 // udot v17.4s, v8.16b, v0.4b[2]\n"
+ "add x11, x11, #0x100\n"
+ ".inst 0x6f81e915 // udot v21.4s, v8.16b, v1.4b[2]\n"
+ ".inst 0x6f82e919 // udot v25.4s, v8.16b, v2.4b[2]\n"
+ ".inst 0x6f83e91d // udot v29.4s, v8.16b, v3.4b[2]\n"
+ ".inst 0x6f80e932 // udot v18.4s, v9.16b, v0.4b[2]\n"
+ ".inst 0x6f81e936 // udot v22.4s, v9.16b, v1.4b[2]\n"
+ ".inst 0x6f82e93a // udot v26.4s, v9.16b, v2.4b[2]\n"
+ ".inst 0x6f83e93e // udot v30.4s, v9.16b, v3.4b[2]\n"
+ ".inst 0x6f80e953 // udot v19.4s, v10.16b, v0.4b[2]\n"
+ ".inst 0x6f81e957 // udot v23.4s, v10.16b, v1.4b[2]\n"
+ ".inst 0x6f82e95b // udot v27.4s, v10.16b, v2.4b[2]\n"
+ ".inst 0x6f83e95f // udot v31.4s, v10.16b, v3.4b[2]\n"
+ ".inst 0x6fa0e890 // udot v16.4s, v4.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e894 // udot v20.4s, v4.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e898 // udot v24.4s, v4.16b, v2.4b[3]\n"
+ ".inst 0x6fa3e89c // udot v28.4s, v4.16b, v3.4b[3]\n"
+ ".inst 0x6fa0e8b1 // udot v17.4s, v5.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e8b5 // udot v21.4s, v5.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e8b9 // udot v25.4s, v5.16b, v2.4b[3]\n"
+ ".inst 0x6fa3e8bd // udot v29.4s, v5.16b, v3.4b[3]\n"
+ ".inst 0x6fa0e8d2 // udot v18.4s, v6.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e8d6 // udot v22.4s, v6.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e8da // udot v26.4s, v6.16b, v2.4b[3]\n"
+ ".inst 0x6fa3e8de // udot v30.4s, v6.16b, v3.4b[3]\n"
+ ".inst 0x6fa0e8f3 // udot v19.4s, v7.16b, v0.4b[3]\n"
+ ".inst 0x6fa1e8f7 // udot v23.4s, v7.16b, v1.4b[3]\n"
+ ".inst 0x6fa2e8fb // udot v27.4s, v7.16b, v2.4b[3]\n"
+ ".inst 0x6fa3e8ff // udot v31.4s, v7.16b, v3.4b[3]\n"
+ "tbnz %x[flags], #31, 104f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ ".inst 0x6e8f942c // udot v12.4s, v1.16b, v15.16b\n"
+ ".inst 0x6e8f944d // udot v13.4s, v2.16b, v15.16b\n"
+ ".inst 0x6e8f946e // udot v14.4s, v3.16b, v15.16b\n"
+ "104:" // Height 4: Multiply loop: unique 14: skip row sum
+ "prfm pldl1keep, [x26, #0x80]\n"
+ "prfm pldl1keep, [x24, #0x80]\n"
+ "prfm pldl1keep, [x22, #0x80]\n"
+ "prfm pldl1keep, [x20, #0x80]\n"
+ "105:" // Height 4: Multiply loop: Main loop skip
+ "cbz x27, 112f\n"
+ "cmp x27, #0x4\n"
+ "blt 108f\n"
+ "106:" // Height 4: Multiply loop: Odd block loop
+ "ldr s0, [x26], #0x4\n"
+ "ldr s1, [x24], #0x4\n"
+ "ldr s2, [x22], #0x4\n"
+ "ldr s3, [x20], #0x4\n"
+ "tbnz %x[flags], #31, 107f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ ".inst 0x6e8f942c // udot v12.4s, v1.16b, v15.16b\n"
+ ".inst 0x6e8f944d // udot v13.4s, v2.16b, v15.16b\n"
+ ".inst 0x6e8f946e // udot v14.4s, v3.16b, v15.16b\n"
+ "107:" // Height 4: Multiply loop: unique 15: skip row sum
+ "ldr q8, [x11, #0x0]\n"
+ ".inst 0x6f80e110 // udot v16.4s, v8.16b, v0.4b[0]\n"
+ "ldr q9, [x11, #0x10]\n"
+ ".inst 0x6f81e114 // udot v20.4s, v8.16b, v1.4b[0]\n"
+ "ldr q10, [x11, #0x20]\n"
+ ".inst 0x6f82e118 // udot v24.4s, v8.16b, v2.4b[0]\n"
+ "ldr q4, [x11, #0x30]\n"
+ ".inst 0x6f83e11c // udot v28.4s, v8.16b, v3.4b[0]\n"
+ "sub x27, x27, #0x4\n"
+ "add x11, x11, #0x40\n"
+ ".inst 0x6f80e131 // udot v17.4s, v9.16b, v0.4b[0]\n"
+ "cmp x27, #0x4\n"
+ ".inst 0x6f81e135 // udot v21.4s, v9.16b, v1.4b[0]\n"
+ ".inst 0x6f82e139 // udot v25.4s, v9.16b, v2.4b[0]\n"
+ ".inst 0x6f83e13d // udot v29.4s, v9.16b, v3.4b[0]\n"
+ ".inst 0x6f80e152 // udot v18.4s, v10.16b, v0.4b[0]\n"
+ ".inst 0x6f81e156 // udot v22.4s, v10.16b, v1.4b[0]\n"
+ ".inst 0x6f82e15a // udot v26.4s, v10.16b, v2.4b[0]\n"
+ ".inst 0x6f83e15e // udot v30.4s, v10.16b, v3.4b[0]\n"
+ ".inst 0x6f80e093 // udot v19.4s, v4.16b, v0.4b[0]\n"
+ ".inst 0x6f81e097 // udot v23.4s, v4.16b, v1.4b[0]\n"
+ ".inst 0x6f82e09b // udot v27.4s, v4.16b, v2.4b[0]\n"
+ ".inst 0x6f83e09f // udot v31.4s, v4.16b, v3.4b[0]\n"
+ "bge 106b\n"
+ "cbz x27, 112f\n"
+ "108:" // Height 4: Multiply loop: Skip odd blocks
+ "tbz x27, #1, 109f\n"
+ "ldr h0, [x26], #0x2\n"
+ "ldr h1, [x24], #0x2\n"
+ "ldr h2, [x22], #0x2\n"
+ "ldr h3, [x20], #0x2\n"
+ "tbz x27, #0, 110f\n"
+ "ld1 { v0.b }[2], [x26]\n"
+ "ld1 { v1.b }[2], [x24]\n"
+ "ld1 { v2.b }[2], [x22]\n"
+ "ld1 { v3.b }[2], [x20]\n"
+ "b 110f\n"
+ "109:" // Height 4: Multiply loop: Ragged operand read: partial_1_0
+ "ldr b0, [x26, #0x0]\n"
+ "ldr b1, [x24, #0x0]\n"
+ "ldr b2, [x22, #0x0]\n"
+ "ldr b3, [x20, #0x0]\n"
+ "110:" // Height 4: Multiply loop: Ragged operand read: Done
+ "tbnz %x[flags], #31, 111f\n"
+ ".inst 0x6e8f940b // udot v11.4s, v0.16b, v15.16b\n"
+ ".inst 0x6e8f942c // udot v12.4s, v1.16b, v15.16b\n"
+ ".inst 0x6e8f944d // udot v13.4s, v2.16b, v15.16b\n"
+ ".inst 0x6e8f946e // udot v14.4s, v3.16b, v15.16b\n"
+ "111:" // Height 4: Multiply loop: unique 16: skip row sum
+ "ldr q5, [x11, #0x0]\n"
+ ".inst 0x6f80e0b0 // udot v16.4s, v5.16b, v0.4b[0]\n"
+ "ldr q6, [x11, #0x10]\n"
+ ".inst 0x6f81e0b4 // udot v20.4s, v5.16b, v1.4b[0]\n"
+ "ldr q7, [x11, #0x20]\n"
+ ".inst 0x6f82e0b8 // udot v24.4s, v5.16b, v2.4b[0]\n"
+ "ldr q8, [x11, #0x30]\n"
+ ".inst 0x6f83e0bc // udot v28.4s, v5.16b, v3.4b[0]\n"
+ "add x11, x11, #0x40\n"
+ ".inst 0x6f80e0d1 // udot v17.4s, v6.16b, v0.4b[0]\n"
+ ".inst 0x6f81e0d5 // udot v21.4s, v6.16b, v1.4b[0]\n"
+ ".inst 0x6f82e0d9 // udot v25.4s, v6.16b, v2.4b[0]\n"
+ ".inst 0x6f83e0dd // udot v29.4s, v6.16b, v3.4b[0]\n"
+ ".inst 0x6f80e0f2 // udot v18.4s, v7.16b, v0.4b[0]\n"
+ ".inst 0x6f81e0f6 // udot v22.4s, v7.16b, v1.4b[0]\n"
+ ".inst 0x6f82e0fa // udot v26.4s, v7.16b, v2.4b[0]\n"
+ ".inst 0x6f83e0fe // udot v30.4s, v7.16b, v3.4b[0]\n"
+ ".inst 0x6f80e113 // udot v19.4s, v8.16b, v0.4b[0]\n"
+ ".inst 0x6f81e117 // udot v23.4s, v8.16b, v1.4b[0]\n"
+ ".inst 0x6f82e11b // udot v27.4s, v8.16b, v2.4b[0]\n"
+ ".inst 0x6f83e11f // udot v31.4s, v8.16b, v3.4b[0]\n"
+ "112:" // Height 4: Multiply loop: No odd multiplies
+ "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
+ "add x28, x28, #0x1\n"
+ "cmp x28, x19\n"
+ "bne 98b\n"
+ "prfm pstl1keep, [x9, #0x0]\n"
+ "prfm pstl1keep, [x25, #0x0]\n"
+ "prfm pstl1keep, [x23, #0x0]\n"
+ "prfm pstl1keep, [x21, #0x0]\n"
+ "tbnz %x[flags], #31, 113f\n"
+ "addp v11.4s, v11.4s, v11.4s\n"
+ "add x19, %x[qp], %[b_offset]\n"
+ "ld1r { v4.4s }, [x19]\n"
+ "addp v12.4s, v12.4s, v12.4s\n"
+ "addp v13.4s, v13.4s, v13.4s\n"
+ "addp v14.4s, v14.4s, v14.4s\n"
+ "addp v11.4s, v11.4s, v11.4s\n"
+ "addp v12.4s, v12.4s, v12.4s\n"
+ "addp v13.4s, v13.4s, v13.4s\n"
+ "addp v14.4s, v14.4s, v14.4s\n"
+ "neg v4.4s, v4.4s\n"
+ "mul v11.4s, v11.4s, v4.4s\n"
+ "mul v12.4s, v12.4s, v4.4s\n"
+ "mul v13.4s, v13.4s, v4.4s\n"
+ "mul v14.4s, v14.4s, v4.4s\n"
+ "113:" // Height 4: skip row sum fixup
+ "add v16.4s, v16.4s, v11.4s\n"
+ "orr %x[flags], %x[flags], #0x80000000\n"
+ "add v17.4s, v17.4s, v11.4s\n"
+ "ldr q0, [x10, #0x0]\n"
+ "add v18.4s, v18.4s, v11.4s\n"
+ "ldr q1, [x10, #0x10]\n"
+ "add v19.4s, v19.4s, v11.4s\n"
+ "ldr q2, [x10, #0x20]\n"
+ "add v20.4s, v20.4s, v12.4s\n"
+ "ldr q3, [x10, #0x30]\n"
+ "add v21.4s, v21.4s, v12.4s\n"
+ "add x20, %x[qp], %[per_layer_right_shift]\n"
+ "add v22.4s, v22.4s, v12.4s\n"
+ "add x19, %x[qp], %[per_layer_mul]\n"
+ "ld1r { v4.4s }, [x19]\n"
+ "add v23.4s, v23.4s, v12.4s\n"
+ "add x10, x10, #0x40\n"
+ "add v24.4s, v24.4s, v13.4s\n"
+ "add v25.4s, v25.4s, v13.4s\n"
+ "add v26.4s, v26.4s, v13.4s\n"
+ "add v27.4s, v27.4s, v13.4s\n"
+ "add v28.4s, v28.4s, v14.4s\n"
+ "add v29.4s, v29.4s, v14.4s\n"
+ "add v30.4s, v30.4s, v14.4s\n"
+ "add v31.4s, v31.4s, v14.4s\n"
+ "add v16.4s, v16.4s, v0.4s\n"
+ "add v17.4s, v17.4s, v1.4s\n"
+ "add v18.4s, v18.4s, v2.4s\n"
+ "add v19.4s, v19.4s, v3.4s\n"
+ "add v20.4s, v20.4s, v0.4s\n"
+ "add v21.4s, v21.4s, v1.4s\n"
+ "add v22.4s, v22.4s, v2.4s\n"
+ "add v23.4s, v23.4s, v3.4s\n"
+ "add v24.4s, v24.4s, v0.4s\n"
+ "add v25.4s, v25.4s, v1.4s\n"
+ "add v26.4s, v26.4s, v2.4s\n"
+ "add v27.4s, v27.4s, v3.4s\n"
+ "add v28.4s, v28.4s, v0.4s\n"
+ "ld1r { v0.4s }, [x20]\n"
+ "add v29.4s, v29.4s, v1.4s\n"
+ "add v30.4s, v30.4s, v2.4s\n"
+ "add v31.4s, v31.4s, v3.4s\n"
+ "sqrdmulh v16.4s, v16.4s, v4.4s\n"
+ "sqrdmulh v17.4s, v17.4s, v4.4s\n"
+ "sqrdmulh v18.4s, v18.4s, v4.4s\n"
+ "sqrdmulh v19.4s, v19.4s, v4.4s\n"
+ "sqrdmulh v20.4s, v20.4s, v4.4s\n"
+ "sqrdmulh v21.4s, v21.4s, v4.4s\n"
+ "sqrdmulh v22.4s, v22.4s, v4.4s\n"
+ "sqrdmulh v23.4s, v23.4s, v4.4s\n"
+ "sqrdmulh v24.4s, v24.4s, v4.4s\n"
+ "sqrdmulh v25.4s, v25.4s, v4.4s\n"
+ "sqrdmulh v26.4s, v26.4s, v4.4s\n"
+ "sqrdmulh v27.4s, v27.4s, v4.4s\n"
+ "sqrdmulh v28.4s, v28.4s, v4.4s\n"
+ "sqrdmulh v29.4s, v29.4s, v4.4s\n"
+ "sqrdmulh v30.4s, v30.4s, v4.4s\n"
+ "sqrdmulh v31.4s, v31.4s, v4.4s\n"
+ "tbz %x[flags], #5, 114f\n"
+ "and v4.16b, v16.16b, v0.16b\n"
+ "sshr v4.4s, v4.4s, #0x1f\n"
+ "and v5.16b, v17.16b, v0.16b\n"
+ "and v6.16b, v18.16b, v0.16b\n"
+ "sshr v5.4s, v5.4s, #0x1f\n"
+ "and v7.16b, v19.16b, v0.16b\n"
+ "and v8.16b, v20.16b, v0.16b\n"
+ "sshr v6.4s, v6.4s, #0x1f\n"
+ "and v9.16b, v21.16b, v0.16b\n"
+ "sshr v7.4s, v7.4s, #0x1f\n"
+ "sqadd v16.4s, v16.4s, v4.4s\n"
+ "and v10.16b, v22.16b, v0.16b\n"
+ "sshr v8.4s, v8.4s, #0x1f\n"
+ "and v4.16b, v23.16b, v0.16b\n"
+ "sshr v9.4s, v9.4s, #0x1f\n"
+ "sqadd v17.4s, v17.4s, v5.4s\n"
+ "sshr v10.4s, v10.4s, #0x1f\n"
+ "sqadd v18.4s, v18.4s, v6.4s\n"
+ "sshr v4.4s, v4.4s, #0x1f\n"
+ "and v5.16b, v24.16b, v0.16b\n"
+ "sshr v5.4s, v5.4s, #0x1f\n"
+ "sqadd v19.4s, v19.4s, v7.4s\n"
+ "sqadd v20.4s, v20.4s, v8.4s\n"
+ "sqadd v21.4s, v21.4s, v9.4s\n"
+ "sqadd v22.4s, v22.4s, v10.4s\n"
+ "sqadd v23.4s, v23.4s, v4.4s\n"
+ "and v6.16b, v25.16b, v0.16b\n"
+ "sshr v6.4s, v6.4s, #0x1f\n"
+ "sqadd v24.4s, v24.4s, v5.4s\n"
+ "and v7.16b, v26.16b, v0.16b\n"
+ "sshr v7.4s, v7.4s, #0x1f\n"
+ "and v8.16b, v27.16b, v0.16b\n"
+ "and v9.16b, v28.16b, v0.16b\n"
+ "sshr v8.4s, v8.4s, #0x1f\n"
+ "sqadd v25.4s, v25.4s, v6.4s\n"
+ "and v10.16b, v29.16b, v0.16b\n"
+ "sshr v9.4s, v9.4s, #0x1f\n"
+ "and v4.16b, v30.16b, v0.16b\n"
+ "sshr v10.4s, v10.4s, #0x1f\n"
+ "sqadd v26.4s, v26.4s, v7.4s\n"
+ "and v5.16b, v31.16b, v0.16b\n"
+ "sshr v4.4s, v4.4s, #0x1f\n"
+ "sqadd v27.4s, v27.4s, v8.4s\n"
+ "sshr v5.4s, v5.4s, #0x1f\n"
+ "sqadd v28.4s, v28.4s, v9.4s\n"
+ "sqadd v29.4s, v29.4s, v10.4s\n"
+ "sqadd v30.4s, v30.4s, v4.4s\n"
+ "sqadd v31.4s, v31.4s, v5.4s\n"
+ "114:" // Height 4: no shift correction
+ "srshl v16.4s, v16.4s, v0.4s\n"
+ "add x19, %x[qp], %[c_offset]\n"
+ "ld1r { v4.4s }, [x19]\n"
+ "srshl v17.4s, v17.4s, v0.4s\n"
+ "add x19, %x[qp], %[minval]\n"
+ "srshl v18.4s, v18.4s, v0.4s\n"
+ "ld1r { v5.4s }, [x19]\n"
+ "add x19, %x[qp], %[maxval]\n"
+ "srshl v19.4s, v19.4s, v0.4s\n"
+ "ld1r { v6.4s }, [x19]\n"
+ "cmp x12, #0x10\n"
+ "srshl v20.4s, v20.4s, v0.4s\n"
+ "srshl v21.4s, v21.4s, v0.4s\n"
+ "srshl v22.4s, v22.4s, v0.4s\n"
+ "srshl v23.4s, v23.4s, v0.4s\n"
+ "add v16.4s, v16.4s, v4.4s\n"
+ "add v17.4s, v17.4s, v4.4s\n"
+ "add v18.4s, v18.4s, v4.4s\n"
+ "smin v16.4s, v16.4s, v6.4s\n"
+ "smin v17.4s, v17.4s, v6.4s\n"
+ "smin v18.4s, v18.4s, v6.4s\n"
+ "smax v16.4s, v16.4s, v5.4s\n"
+ "smax v17.4s, v17.4s, v5.4s\n"
+ "smax v18.4s, v18.4s, v5.4s\n"
+ "add v19.4s, v19.4s, v4.4s\n"
+ "add v20.4s, v20.4s, v4.4s\n"
+ "add v21.4s, v21.4s, v4.4s\n"
+ "smin v19.4s, v19.4s, v6.4s\n"
+ "smin v20.4s, v20.4s, v6.4s\n"
+ "smin v21.4s, v21.4s, v6.4s\n"
+ "smax v19.4s, v19.4s, v5.4s\n"
+ "smax v20.4s, v20.4s, v5.4s\n"
+ "smax v21.4s, v21.4s, v5.4s\n"
+ "add v22.4s, v22.4s, v4.4s\n"
+ "add v23.4s, v23.4s, v4.4s\n"
+ "srshl v24.4s, v24.4s, v0.4s\n"
+ "smin v22.4s, v22.4s, v6.4s\n"
+ "smin v23.4s, v23.4s, v6.4s\n"
+ "srshl v25.4s, v25.4s, v0.4s\n"
+ "smax v22.4s, v22.4s, v5.4s\n"
+ "smax v23.4s, v23.4s, v5.4s\n"
+ "add v24.4s, v24.4s, v4.4s\n"
+ "add v25.4s, v25.4s, v4.4s\n"
+ "srshl v26.4s, v26.4s, v0.4s\n"
+ "smin v24.4s, v24.4s, v6.4s\n"
+ "smin v25.4s, v25.4s, v6.4s\n"
+ "srshl v27.4s, v27.4s, v0.4s\n"
+ "smax v24.4s, v24.4s, v5.4s\n"
+ "smax v25.4s, v25.4s, v5.4s\n"
+ "add v26.4s, v26.4s, v4.4s\n"
+ "add v27.4s, v27.4s, v4.4s\n"
+ "srshl v28.4s, v28.4s, v0.4s\n"
+ "smin v26.4s, v26.4s, v6.4s\n"
+ "smin v27.4s, v27.4s, v6.4s\n"
+ "srshl v29.4s, v29.4s, v0.4s\n"
+ "smax v26.4s, v26.4s, v5.4s\n"
+ "smax v27.4s, v27.4s, v5.4s\n"
+ "add v28.4s, v28.4s, v4.4s\n"
+ "add v29.4s, v29.4s, v4.4s\n"
+ "srshl v30.4s, v30.4s, v0.4s\n"
+ "smin v28.4s, v28.4s, v6.4s\n"
+ "smin v29.4s, v29.4s, v6.4s\n"
+ "srshl v31.4s, v31.4s, v0.4s\n"
+ "smax v28.4s, v28.4s, v5.4s\n"
+ "smax v29.4s, v29.4s, v5.4s\n"
+ "add v30.4s, v30.4s, v4.4s\n"
+ "add v31.4s, v31.4s, v4.4s\n"
+ "uzp1 v16.8h, v16.8h, v17.8h\n"
+ "smin v30.4s, v30.4s, v6.4s\n"
+ "smin v31.4s, v31.4s, v6.4s\n"
+ "uzp1 v17.8h, v18.8h, v19.8h\n"
+ "smax v30.4s, v30.4s, v5.4s\n"
+ "smax v31.4s, v31.4s, v5.4s\n"
+ "uzp1 v20.8h, v20.8h, v21.8h\n"
+ "uzp1 v21.8h, v22.8h, v23.8h\n"
+ "uzp1 v24.8h, v24.8h, v25.8h\n"
+ "uzp1 v25.8h, v26.8h, v27.8h\n"
+ "uzp1 v28.8h, v28.8h, v29.8h\n"
+ "uzp1 v29.8h, v30.8h, v31.8h\n"
+ "uzp1 v16.16b, v16.16b, v17.16b\n"
+ "uzp1 v20.16b, v20.16b, v21.16b\n"
+ "uzp1 v24.16b, v24.16b, v25.16b\n"
+ "uzp1 v28.16b, v28.16b, v29.16b\n"
+ "bge 123f\n"
+ "tbz x12, #3, 118f\n"
+ "str d16, [x9], #0x8\n"
+ "str d20, [x25], #0x8\n"
+ "str d24, [x23], #0x8\n"
+ "str d28, [x21], #0x8\n"
+ "tbz x12, #2, 116f\n"
+ "st1 { v16.s }[2], [x9], #0x4\n"
+ "st1 { v20.s }[2], [x25], #0x4\n"
+ "st1 { v24.s }[2], [x23], #0x4\n"
+ "st1 { v28.s }[2], [x21], #0x4\n"
+ "tbz x12, #1, 115f\n"
+ "st1 { v16.h }[6], [x9], #0x2\n"
+ "st1 { v20.h }[6], [x25], #0x2\n"
+ "st1 { v24.h }[6], [x23], #0x2\n"
+ "st1 { v28.h }[6], [x21], #0x2\n"
+ "tbz x12, #0, 122f\n"
+ "st1 { v16.b }[14], [x9]\n"
+ "st1 { v20.b }[14], [x25]\n"
+ "st1 { v24.b }[14], [x23]\n"
+ "st1 { v28.b }[14], [x21]\n"
+ "b 122f\n"
+ "115:" // Height 4: Partial direct writeback: partial_1_12
+ "tbz x12, #0, 122f\n"
+ "st1 { v16.b }[12], [x9]\n"
+ "st1 { v20.b }[12], [x25]\n"
+ "st1 { v24.b }[12], [x23]\n"
+ "st1 { v28.b }[12], [x21]\n"
+ "b 122f\n"
+ "116:" // Height 4: Partial direct writeback: partial_2_8
+ "tbz x12, #1, 117f\n"
+ "st1 { v16.h }[4], [x9], #0x2\n"
+ "st1 { v20.h }[4], [x25], #0x2\n"
+ "st1 { v24.h }[4], [x23], #0x2\n"
+ "st1 { v28.h }[4], [x21], #0x2\n"
+ "tbz x12, #0, 122f\n"
+ "st1 { v16.b }[10], [x9]\n"
+ "st1 { v20.b }[10], [x25]\n"
+ "st1 { v24.b }[10], [x23]\n"
+ "st1 { v28.b }[10], [x21]\n"
+ "b 122f\n"
+ "117:" // Height 4: Partial direct writeback: partial_1_8
+ "tbz x12, #0, 122f\n"
+ "st1 { v16.b }[8], [x9]\n"
+ "st1 { v20.b }[8], [x25]\n"
+ "st1 { v24.b }[8], [x23]\n"
+ "st1 { v28.b }[8], [x21]\n"
+ "b 122f\n"
+ "118:" // Height 4: Partial direct writeback: partial_4_0
+ "tbz x12, #2, 120f\n"
+ "str s16, [x9], #0x4\n"
+ "str s20, [x25], #0x4\n"
+ "str s24, [x23], #0x4\n"
+ "str s28, [x21], #0x4\n"
+ "tbz x12, #1, 119f\n"
+ "st1 { v16.h }[2], [x9], #0x2\n"
+ "st1 { v20.h }[2], [x25], #0x2\n"
+ "st1 { v24.h }[2], [x23], #0x2\n"
+ "st1 { v28.h }[2], [x21], #0x2\n"
+ "tbz x12, #0, 122f\n"
+ "st1 { v16.b }[6], [x9]\n"
+ "st1 { v20.b }[6], [x25]\n"
+ "st1 { v24.b }[6], [x23]\n"
+ "st1 { v28.b }[6], [x21]\n"
+ "b 122f\n"
+ "119:" // Height 4: Partial direct writeback: partial_1_4
+ "tbz x12, #0, 122f\n"
+ "st1 { v16.b }[4], [x9]\n"
+ "st1 { v20.b }[4], [x25]\n"
+ "st1 { v24.b }[4], [x23]\n"
+ "st1 { v28.b }[4], [x21]\n"
+ "b 122f\n"
+ "120:" // Height 4: Partial direct writeback: partial_2_0
+ "tbz x12, #1, 121f\n"
+ "str h16, [x9], #0x2\n"
+ "str h20, [x25], #0x2\n"
+ "str h24, [x23], #0x2\n"
+ "str h28, [x21], #0x2\n"
+ "tbz x12, #0, 122f\n"
+ "st1 { v16.b }[2], [x9]\n"
+ "st1 { v20.b }[2], [x25]\n"
+ "st1 { v24.b }[2], [x23]\n"
+ "st1 { v28.b }[2], [x21]\n"
+ "b 122f\n"
+ "121:" // Height 4: Partial direct writeback: partial_1_0
+ "str b16, [x9, #0x0]\n"
+ "str b20, [x25, #0x0]\n"
+ "str b24, [x23, #0x0]\n"
+ "str b28, [x21, #0x0]\n"
+ "122:" // Height 4: Partial direct writeback: Done
+ "b 124f\n"
+ "123:" // Height 4: Full writeback
+ "str q16, [x9, #0x0]\n"
+ "str q20, [x25, #0x0]\n"
+ "str q24, [x23, #0x0]\n"
+ "str q28, [x21, #0x0]\n"
+ "add x9, x9, #0x10\n"
+ "add x25, x25, #0x10\n"
+ "add x23, x23, #0x10\n"
+ "add x21, x21, #0x10\n"
+ "124:" // Height 4: Writeback done
+ "subs x12, x12, #0x10\n"
+ "bgt 96b\n"
+ "subs %x[M], %x[M], #0x4\n"
+ "beq 126f\n"
+ "ldr x20, [%x[args_ptr], %[offsetof_input_offset]]\n"
+ "tbz %x[flags], #3, 125f\n"
+ "add x20, x20, #0x4\n"
+ "str x20, [%x[args_ptr], %[offsetof_input_offset]]\n"
+ "b 1b\n"
+ "125:" // Update direct input
+ "mov x19, #0x4\n"
+ "madd %x[input_ptr], x19, x20, %x[input_ptr]\n"
+ "b 1b\n"
+ "126:" // Exit
+
+ : [M] "+r" (M), [flags] "+r" (flags), [input_ptr] "+r" (input_ptr), [output_ptr] "+r" (output_ptr)
+ : [args_ptr] "r" (&ka), [b_offset] "I" (offsetof(Requantize32, b_offset)), [c_offset] "I" (offsetof(Requantize32, c_offset)), [col_bias] "r" (col_bias), [maxval] "I" (offsetof(Requantize32, maxval)), [minval] "I" (offsetof(Requantize32, minval)), [offsetof_B_ptr] "I" (offsetof(KernelArgs, B_ptr)), [offsetof_N] "I" (offsetof(KernelArgs, N)), [offsetof_input_initial_col] "I" (offsetof(KernelArgs, input_initial_col)), [offsetof_input_offset] "I" (offsetof(KernelArgs, input_offset)), [offsetof_num_strings] "I" (offsetof(KernelArgs, num_strings)), [offsetof_output_offset] "I" (offsetof(KernelArgs, output_offset)), [offsetof_string_lengths] "I" (offsetof(KernelArgs, string_lengths)), [per_layer_mul] "I" (offsetof(Requantize32, per_layer_mul)), [per_layer_right_shift] "I" (offsetof(Requantize32, per_layer_right_shift)), [qp] "r" (qp)
+ : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7", "v8", "v9", "v10", "v11", "v12", "v13", "v14", "v15", "v16", "v17", "v18", "v19", "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31", "x9", "x10", "x11", "x12", "x19", "x20", "x21", "x22", "x23", "x24", "x25", "x26", "x27", "x28"
+ );
+}
+
+} // namespace arm_gemm
+#endif // __aarch64__