• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2019-2021 Arm Limited.
3  *
4  * SPDX-License-Identifier: MIT
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a copy
7  * of this software and associated documentation files (the "Software"), to
8  * deal in the Software without restriction, including without limitation the
9  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
10  * sell copies of the Software, and to permit persons to whom the Software is
11  * furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included in
14  * all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22  * IN THE SOFTWARE.
23  */
24 #ifdef ARM_COMPUTE_ENABLE_SVE
25 
26 #include "arm_gemm.hpp"
27 #include "../../utils.hpp"
28 #include "../../bfloat.hpp"
29 
30 #include <cassert>
31 #include <limits>
32 
33 namespace arm_gemm {
34 
sve_hybrid_bf16fp32_dot_6x4VL(unsigned int num_strings,const unsigned int * string_lengths,IndirectInputArg<bfloat16> A_arg,size_t M,size_t N,const bfloat16 * B_ptr,IndirectOutputArg<float> output_arg,const float * bias,Activation act,bool accumulate)35 void sve_hybrid_bf16fp32_dot_6x4VL (
36     unsigned int num_strings, const unsigned int *string_lengths, IndirectInputArg<bfloat16> A_arg,
37     size_t M, size_t N, const bfloat16 *B_ptr, IndirectOutputArg<float> output_arg,
38     const float *bias, Activation act, bool accumulate
39 )
40 {
41     struct KernelArgs {
42         float maxval = static_cast<float>(std::numeric_limits<float>::infinity());
43         float minval = - static_cast<float>(std::numeric_limits<float>::infinity());
44         unsigned int num_strings = {};
45         const unsigned int *string_lengths = {};
46         size_t N = {};
47         const bfloat16 *B_ptr = {};
48         size_t output_offset = {};
49         size_t input_initial_col = {};
50         size_t input_offset = {};
51     } ka;
52 
53     unsigned long flags=0;
54     void *output_ptr;
55     void *input_ptr;
56 
57     if (output_arg.is_indirect) {
58         output_ptr=(void *)(output_arg.indirect.ptr);
59         ka.output_offset=output_arg.indirect.offset;
60         flags |= 0x4;
61     } else {
62         output_ptr=(void *)(output_arg.direct.base);
63         ka.output_offset=output_arg.direct.stride;
64     }
65 
66     if (A_arg.is_indirect) {
67         input_ptr=(void *)(A_arg.indirect.ptr);
68         ka.input_offset=A_arg.indirect.start_row;
69         ka.input_initial_col=A_arg.indirect.start_col;
70         flags |= 0x8;
71     } else {
72         assert(num_strings==1);
73         input_ptr=(void *)(A_arg.direct.base);
74         ka.input_offset=A_arg.direct.stride;
75     }
76     if (accumulate) {
77         flags |= 0x1;
78     }
79     ka.num_strings = num_strings;
80     ka.string_lengths = string_lengths;
81     ka.N = N;
82     ka.B_ptr = B_ptr;
83     switch(act.type) {
84         default:
85         case Activation::Type::None:
86             break;
87         case Activation::Type::BoundedReLU:
88             ka.maxval = static_cast<float>(act.param1);
89             /* fall through */
90         case Activation::Type::ReLU:
91             ka.minval = 0;
92             flags |= 0x2;
93             break;
94     }
95     __asm__ __volatile__(
96       "ptrue p5.b\n"
97       "1:"  // Row loop
98       "cmp %x[M], #0x6\n"
99       "bge 66f\n"
100       "cmp %x[M], #0x4\n"
101       "bgt 53f\n"
102       "beq 40f\n"
103       "cmp %x[M], #0x2\n"
104       "bgt 27f\n"
105       "beq 14f\n"
106       "ldr x11, [%x[args_ptr], %[offsetof_N]]\n"
107       "ldr x10, [%x[args_ptr], %[offsetof_B_ptr]]\n"
108       "mov x9, %x[bias]\n"
109       "mov x28, %x[output_ptr]\n"
110       "2:"  // Height 1: Column loop
111       "mov x19, #0x0\n"
112       "whilelt p4.s, x19, x11\n"
113       "incw x19\n"
114       "whilelt p3.s, x19, x11\n"
115       "incw x19\n"
116       "whilelt p2.s, x19, x11\n"
117       "incw x19\n"
118       "whilelt p1.s, x19, x11\n"
119       "cbz x9, 3f\n"
120       "ld1w { z8.s }, p5/Z, [x9]\n"
121       "ld1w { z9.s }, p5/Z, [x9, #1, MUL VL]\n"
122       "ld1w { z10.s }, p5/Z, [x9, #2, MUL VL]\n"
123       "ld1w { z11.s }, p5/Z, [x9, #3, MUL VL]\n"
124       "addvl x9, x9, #4\n"
125       "b 5f\n"
126       "3:"  // Height 1: no bias
127       "tbz %x[flags], #0, 4f\n"
128       "ld1w { z8.s }, p4/Z, [x28]\n"
129       "ld1w { z9.s }, p3/Z, [x28, #1, MUL VL]\n"
130       "ld1w { z10.s }, p2/Z, [x28, #2, MUL VL]\n"
131       "ld1w { z11.s }, p1/Z, [x28, #3, MUL VL]\n"
132       "b 5f\n"
133       "4:"  // Height 1: no accumulate
134       "mov z8.b, #0x0\n"
135       "mov z9.b, #0x0\n"
136       "mov z10.b, #0x0\n"
137       "mov z11.b, #0x0\n"
138       "5:"  // Height 1: setup done
139       "mov x27, #0x0\n"
140       "6:"  // Height 1: String loop
141       "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
142       "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
143       "ldr w26, [x20, x27, LSL #0x2]\n"
144       "tbz %x[flags], #3, 7f\n"
145       "ldr x20, [%x[input_ptr], x27, LSL #0x3]\n"
146       "add x20, x20, x19, LSL #3\n"
147       "ldr x25, [x20, #0x0]\n"
148       "cbnz x27, 8f\n"
149       "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
150       "add x25, x25, x19, LSL #1\n"
151       "b 8f\n"
152       "7:"  // Height 1: setup direct input
153       "mov x25, %x[input_ptr]\n"
154       "8:"  // Height 1: input setup done
155       "cmp x26, #0x8\n"
156       "ble 10f\n"
157       "9:"  // Height 1: Multiply loop: Main loop head
158       "ld1h { z6.h }, p5/Z, [x10]\n"
159       "whilelt p0.h, XZR, x26\n"
160       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
161       "sub x26, x26, #0x8\n"
162       "ld1rqh { z0.h }, p0/Z, [x25]\n"
163       ".inst 0x646040c8  // bfdot z8.s, z6.h, z0.h[0]\n"
164       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
165       "cmp x26, #0x8\n"
166       ".inst 0x646040e9  // bfdot z9.s, z7.h, z0.h[0]\n"
167       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
168       "add x25, x25, #0x10\n"
169       ".inst 0x646040ca  // bfdot z10.s, z6.h, z0.h[0]\n"
170       "ld1h { z6.h }, p5/Z, [x10, #4, MUL VL]\n"
171       ".inst 0x646040eb  // bfdot z11.s, z7.h, z0.h[0]\n"
172       "ld1h { z7.h }, p5/Z, [x10, #5, MUL VL]\n"
173       ".inst 0x646840c8  // bfdot z8.s, z6.h, z0.h[1]\n"
174       "ld1h { z6.h }, p5/Z, [x10, #6, MUL VL]\n"
175       ".inst 0x646840e9  // bfdot z9.s, z7.h, z0.h[1]\n"
176       "ld1h { z7.h }, p5/Z, [x10, #7, MUL VL]\n"
177       "addvl x10, x10, #16\n"
178       ".inst 0x646840ca  // bfdot z10.s, z6.h, z0.h[1]\n"
179       "ld1h { z6.h }, p5/Z, [x10, #-8, MUL VL]\n"
180       ".inst 0x646840eb  // bfdot z11.s, z7.h, z0.h[1]\n"
181       "ld1h { z7.h }, p5/Z, [x10, #-7, MUL VL]\n"
182       ".inst 0x647040c8  // bfdot z8.s, z6.h, z0.h[2]\n"
183       "ld1h { z6.h }, p5/Z, [x10, #-6, MUL VL]\n"
184       ".inst 0x647040e9  // bfdot z9.s, z7.h, z0.h[2]\n"
185       "ld1h { z7.h }, p5/Z, [x10, #-5, MUL VL]\n"
186       ".inst 0x647040ca  // bfdot z10.s, z6.h, z0.h[2]\n"
187       "ld1h { z6.h }, p5/Z, [x10, #-4, MUL VL]\n"
188       ".inst 0x647040eb  // bfdot z11.s, z7.h, z0.h[2]\n"
189       "ld1h { z7.h }, p5/Z, [x10, #-3, MUL VL]\n"
190       ".inst 0x647840c8  // bfdot z8.s, z6.h, z0.h[3]\n"
191       "ld1h { z6.h }, p5/Z, [x10, #-2, MUL VL]\n"
192       ".inst 0x647840e9  // bfdot z9.s, z7.h, z0.h[3]\n"
193       "ld1h { z7.h }, p5/Z, [x10, #-1, MUL VL]\n"
194       ".inst 0x647840ca  // bfdot z10.s, z6.h, z0.h[3]\n"
195       ".inst 0x647840eb  // bfdot z11.s, z7.h, z0.h[3]\n"
196       "bgt 9b\n"
197       "10:"  // Height 1: Multiply loop: Single iteration only
198       "ld1h { z6.h }, p5/Z, [x10]\n"
199       "whilelt p0.h, XZR, x26\n"
200       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
201       "subs x26, x26, #0x2\n"
202       "ld1rqh { z0.h }, p0/Z, [x25]\n"
203       ".inst 0x646040c8  // bfdot z8.s, z6.h, z0.h[0]\n"
204       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
205       ".inst 0x646040e9  // bfdot z9.s, z7.h, z0.h[0]\n"
206       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
207       "addvl x10, x10, #4\n"
208       ".inst 0x646040ca  // bfdot z10.s, z6.h, z0.h[0]\n"
209       ".inst 0x646040eb  // bfdot z11.s, z7.h, z0.h[0]\n"
210       "ble 11f\n"
211       "ld1h { z6.h }, p5/Z, [x10]\n"
212       ".inst 0x646840c8  // bfdot z8.s, z6.h, z0.h[1]\n"
213       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
214       "subs x26, x26, #0x2\n"
215       ".inst 0x646840e9  // bfdot z9.s, z7.h, z0.h[1]\n"
216       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
217       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
218       ".inst 0x646840ca  // bfdot z10.s, z6.h, z0.h[1]\n"
219       "addvl x10, x10, #4\n"
220       ".inst 0x646840eb  // bfdot z11.s, z7.h, z0.h[1]\n"
221       "ble 11f\n"
222       "ld1h { z6.h }, p5/Z, [x10]\n"
223       ".inst 0x647040c8  // bfdot z8.s, z6.h, z0.h[2]\n"
224       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
225       "subs x26, x26, #0x2\n"
226       ".inst 0x647040e9  // bfdot z9.s, z7.h, z0.h[2]\n"
227       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
228       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
229       ".inst 0x647040ca  // bfdot z10.s, z6.h, z0.h[2]\n"
230       "addvl x10, x10, #4\n"
231       ".inst 0x647040eb  // bfdot z11.s, z7.h, z0.h[2]\n"
232       "ble 11f\n"
233       "ld1h { z6.h }, p5/Z, [x10]\n"
234       ".inst 0x647840c8  // bfdot z8.s, z6.h, z0.h[3]\n"
235       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
236       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
237       ".inst 0x647840e9  // bfdot z9.s, z7.h, z0.h[3]\n"
238       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
239       "addvl x10, x10, #4\n"
240       ".inst 0x647840ca  // bfdot z10.s, z6.h, z0.h[3]\n"
241       ".inst 0x647840eb  // bfdot z11.s, z7.h, z0.h[3]\n"
242       "11:"  // Height 1: Multiply loop: multiply skip
243       "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
244       "add x27, x27, #0x1\n"
245       "cmp x27, x19\n"
246       "bne 6b\n"
247       "tbz %x[flags], #1, 12f\n"
248       "add x19, %x[args_ptr], %[offset_min]\n"
249       "ld1rw { z1.s }, p5/Z, [x19]\n"
250       "add x19, %x[args_ptr], %[offset_max]\n"
251       "ld1rw { z0.s }, p5/Z, [x19]\n"
252       "fmin z8.s, p5/M, z8.s, z0.s\n"
253       "fmin z9.s, p5/M, z9.s, z0.s\n"
254       "fmin z10.s, p5/M, z10.s, z0.s\n"
255       "fmin z11.s, p5/M, z11.s, z0.s\n"
256       "fmax z8.s, p5/M, z8.s, z1.s\n"
257       "fmax z9.s, p5/M, z9.s, z1.s\n"
258       "fmax z10.s, p5/M, z10.s, z1.s\n"
259       "fmax z11.s, p5/M, z11.s, z1.s\n"
260       "12:"  // Height 1: No activation
261       "st1w { z8.s }, p4, [x28]\n"
262       "st1w { z9.s }, p3, [x28, #1, MUL VL]\n"
263       "st1w { z10.s }, p2, [x28, #2, MUL VL]\n"
264       "st1w { z11.s }, p1, [x28, #3, MUL VL]\n"
265       "addvl x28, x28, #4\n"
266       "13:"  // Height 1: Writeback done
267       "decw x11, ALL, MUL #4\n"
268       "cmp x11, XZR\n"
269       "bgt 2b\n"
270       "b 80f\n"
271       "14:"  // Height 2
272       "ldr x11, [%x[args_ptr], %[offsetof_N]]\n"
273       "mov x9, %x[bias]\n"
274       "ldr x10, [%x[args_ptr], %[offsetof_B_ptr]]\n"
275       "mov x28, %x[output_ptr]\n"
276       "15:"  // Height 2: Column loop
277       "mov x19, #0x0\n"
278       "whilelt p4.s, x19, x11\n"
279       "incw x19\n"
280       "whilelt p3.s, x19, x11\n"
281       "incw x19\n"
282       "whilelt p2.s, x19, x11\n"
283       "incw x19\n"
284       "whilelt p1.s, x19, x11\n"
285       "cbz x9, 16f\n"
286       "ld1w { z8.s }, p5/Z, [x9]\n"
287       "mov z12.d, z8.d\n"
288       "ld1w { z9.s }, p5/Z, [x9, #1, MUL VL]\n"
289       "ld1w { z10.s }, p5/Z, [x9, #2, MUL VL]\n"
290       "mov z13.d, z9.d\n"
291       "ld1w { z11.s }, p5/Z, [x9, #3, MUL VL]\n"
292       "addvl x9, x9, #4\n"
293       "mov z14.d, z10.d\n"
294       "mov z15.d, z11.d\n"
295       "b 18f\n"
296       "16:"  // Height 2: no bias
297       "tbz %x[flags], #0, 17f\n"
298       "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
299       "ld1w { z8.s }, p4/Z, [x28]\n"
300       "add x24, x28, x19, LSL #2\n"
301       "ld1w { z9.s }, p3/Z, [x28, #1, MUL VL]\n"
302       "ld1w { z10.s }, p2/Z, [x28, #2, MUL VL]\n"
303       "ld1w { z11.s }, p1/Z, [x28, #3, MUL VL]\n"
304       "ld1w { z12.s }, p4/Z, [x24]\n"
305       "ld1w { z13.s }, p3/Z, [x24, #1, MUL VL]\n"
306       "ld1w { z14.s }, p2/Z, [x24, #2, MUL VL]\n"
307       "ld1w { z15.s }, p1/Z, [x24, #3, MUL VL]\n"
308       "b 18f\n"
309       "17:"  // Height 2: no accumulate
310       "mov z8.b, #0x0\n"
311       "mov z9.b, #0x0\n"
312       "mov z10.b, #0x0\n"
313       "mov z11.b, #0x0\n"
314       "mov z12.b, #0x0\n"
315       "mov z13.b, #0x0\n"
316       "mov z14.b, #0x0\n"
317       "mov z15.b, #0x0\n"
318       "18:"  // Height 2: setup done
319       "mov x27, #0x0\n"
320       "19:"  // Height 2: String loop
321       "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
322       "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
323       "ldr w26, [x20, x27, LSL #0x2]\n"
324       "tbz %x[flags], #3, 20f\n"
325       "ldr x20, [%x[input_ptr], x27, LSL #0x3]\n"
326       "add x20, x20, x19, LSL #3\n"
327       "ldr x25, [x20, #0x0]\n"
328       "ldr x24, [x20, #0x8]\n"
329       "cbnz x27, 21f\n"
330       "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
331       "add x25, x25, x19, LSL #1\n"
332       "add x24, x24, x19, LSL #1\n"
333       "b 21f\n"
334       "20:"  // Height 2: setup direct input
335       "mov x25, %x[input_ptr]\n"
336       "add x24, x25, x19, LSL #1\n"
337       "21:"  // Height 2: input setup done
338       "cmp x26, #0x8\n"
339       "ble 23f\n"
340       "22:"  // Height 2: Multiply loop: Main loop head
341       "ld1h { z6.h }, p5/Z, [x10]\n"
342       "whilelt p0.h, XZR, x26\n"
343       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
344       "sub x26, x26, #0x8\n"
345       "ld1rqh { z0.h }, p0/Z, [x25]\n"
346       ".inst 0x646040c8  // bfdot z8.s, z6.h, z0.h[0]\n"
347       "ld1rqh { z1.h }, p0/Z, [x24]\n"
348       "cmp x26, #0x8\n"
349       ".inst 0x646040e9  // bfdot z9.s, z7.h, z0.h[0]\n"
350       "add x25, x25, #0x10\n"
351       "add x24, x24, #0x10\n"
352       ".inst 0x646140cc  // bfdot z12.s, z6.h, z1.h[0]\n"
353       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
354       ".inst 0x646140ed  // bfdot z13.s, z7.h, z1.h[0]\n"
355       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
356       ".inst 0x646040ca  // bfdot z10.s, z6.h, z0.h[0]\n"
357       ".inst 0x646140ce  // bfdot z14.s, z6.h, z1.h[0]\n"
358       "ld1h { z6.h }, p5/Z, [x10, #4, MUL VL]\n"
359       ".inst 0x646040eb  // bfdot z11.s, z7.h, z0.h[0]\n"
360       ".inst 0x646140ef  // bfdot z15.s, z7.h, z1.h[0]\n"
361       "ld1h { z7.h }, p5/Z, [x10, #5, MUL VL]\n"
362       ".inst 0x646840c8  // bfdot z8.s, z6.h, z0.h[1]\n"
363       ".inst 0x646940cc  // bfdot z12.s, z6.h, z1.h[1]\n"
364       "ld1h { z6.h }, p5/Z, [x10, #6, MUL VL]\n"
365       ".inst 0x646840e9  // bfdot z9.s, z7.h, z0.h[1]\n"
366       ".inst 0x646940ed  // bfdot z13.s, z7.h, z1.h[1]\n"
367       "ld1h { z7.h }, p5/Z, [x10, #7, MUL VL]\n"
368       "addvl x10, x10, #16\n"
369       ".inst 0x646840ca  // bfdot z10.s, z6.h, z0.h[1]\n"
370       ".inst 0x646940ce  // bfdot z14.s, z6.h, z1.h[1]\n"
371       "ld1h { z6.h }, p5/Z, [x10, #-8, MUL VL]\n"
372       ".inst 0x646840eb  // bfdot z11.s, z7.h, z0.h[1]\n"
373       ".inst 0x646940ef  // bfdot z15.s, z7.h, z1.h[1]\n"
374       "ld1h { z7.h }, p5/Z, [x10, #-7, MUL VL]\n"
375       ".inst 0x647040c8  // bfdot z8.s, z6.h, z0.h[2]\n"
376       ".inst 0x647140cc  // bfdot z12.s, z6.h, z1.h[2]\n"
377       "ld1h { z6.h }, p5/Z, [x10, #-6, MUL VL]\n"
378       ".inst 0x647040e9  // bfdot z9.s, z7.h, z0.h[2]\n"
379       ".inst 0x647140ed  // bfdot z13.s, z7.h, z1.h[2]\n"
380       "ld1h { z7.h }, p5/Z, [x10, #-5, MUL VL]\n"
381       ".inst 0x647040ca  // bfdot z10.s, z6.h, z0.h[2]\n"
382       ".inst 0x647140ce  // bfdot z14.s, z6.h, z1.h[2]\n"
383       "ld1h { z6.h }, p5/Z, [x10, #-4, MUL VL]\n"
384       ".inst 0x647040eb  // bfdot z11.s, z7.h, z0.h[2]\n"
385       ".inst 0x647140ef  // bfdot z15.s, z7.h, z1.h[2]\n"
386       "ld1h { z7.h }, p5/Z, [x10, #-3, MUL VL]\n"
387       ".inst 0x647840c8  // bfdot z8.s, z6.h, z0.h[3]\n"
388       ".inst 0x647940cc  // bfdot z12.s, z6.h, z1.h[3]\n"
389       "ld1h { z6.h }, p5/Z, [x10, #-2, MUL VL]\n"
390       ".inst 0x647840e9  // bfdot z9.s, z7.h, z0.h[3]\n"
391       ".inst 0x647940ed  // bfdot z13.s, z7.h, z1.h[3]\n"
392       "ld1h { z7.h }, p5/Z, [x10, #-1, MUL VL]\n"
393       ".inst 0x647840ca  // bfdot z10.s, z6.h, z0.h[3]\n"
394       ".inst 0x647940ce  // bfdot z14.s, z6.h, z1.h[3]\n"
395       ".inst 0x647840eb  // bfdot z11.s, z7.h, z0.h[3]\n"
396       ".inst 0x647940ef  // bfdot z15.s, z7.h, z1.h[3]\n"
397       "bgt 22b\n"
398       "23:"  // Height 2: Multiply loop: Single iteration only
399       "ld1h { z6.h }, p5/Z, [x10]\n"
400       "whilelt p0.h, XZR, x26\n"
401       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
402       "subs x26, x26, #0x2\n"
403       "ld1rqh { z0.h }, p0/Z, [x25]\n"
404       ".inst 0x646040c8  // bfdot z8.s, z6.h, z0.h[0]\n"
405       "ld1rqh { z1.h }, p0/Z, [x24]\n"
406       ".inst 0x646040e9  // bfdot z9.s, z7.h, z0.h[0]\n"
407       ".inst 0x646140cc  // bfdot z12.s, z6.h, z1.h[0]\n"
408       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
409       ".inst 0x646140ed  // bfdot z13.s, z7.h, z1.h[0]\n"
410       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
411       "addvl x10, x10, #4\n"
412       ".inst 0x646040ca  // bfdot z10.s, z6.h, z0.h[0]\n"
413       ".inst 0x646140ce  // bfdot z14.s, z6.h, z1.h[0]\n"
414       ".inst 0x646040eb  // bfdot z11.s, z7.h, z0.h[0]\n"
415       ".inst 0x646140ef  // bfdot z15.s, z7.h, z1.h[0]\n"
416       "ble 24f\n"
417       "ld1h { z6.h }, p5/Z, [x10]\n"
418       ".inst 0x646840c8  // bfdot z8.s, z6.h, z0.h[1]\n"
419       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
420       "subs x26, x26, #0x2\n"
421       ".inst 0x646940cc  // bfdot z12.s, z6.h, z1.h[1]\n"
422       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
423       ".inst 0x646840e9  // bfdot z9.s, z7.h, z0.h[1]\n"
424       ".inst 0x646940ed  // bfdot z13.s, z7.h, z1.h[1]\n"
425       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
426       "addvl x10, x10, #4\n"
427       ".inst 0x646840ca  // bfdot z10.s, z6.h, z0.h[1]\n"
428       ".inst 0x646940ce  // bfdot z14.s, z6.h, z1.h[1]\n"
429       ".inst 0x646840eb  // bfdot z11.s, z7.h, z0.h[1]\n"
430       ".inst 0x646940ef  // bfdot z15.s, z7.h, z1.h[1]\n"
431       "ble 24f\n"
432       "ld1h { z6.h }, p5/Z, [x10]\n"
433       ".inst 0x647040c8  // bfdot z8.s, z6.h, z0.h[2]\n"
434       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
435       "subs x26, x26, #0x2\n"
436       ".inst 0x647140cc  // bfdot z12.s, z6.h, z1.h[2]\n"
437       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
438       ".inst 0x647040e9  // bfdot z9.s, z7.h, z0.h[2]\n"
439       ".inst 0x647140ed  // bfdot z13.s, z7.h, z1.h[2]\n"
440       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
441       "addvl x10, x10, #4\n"
442       ".inst 0x647040ca  // bfdot z10.s, z6.h, z0.h[2]\n"
443       ".inst 0x647140ce  // bfdot z14.s, z6.h, z1.h[2]\n"
444       ".inst 0x647040eb  // bfdot z11.s, z7.h, z0.h[2]\n"
445       ".inst 0x647140ef  // bfdot z15.s, z7.h, z1.h[2]\n"
446       "ble 24f\n"
447       "ld1h { z6.h }, p5/Z, [x10]\n"
448       ".inst 0x647840c8  // bfdot z8.s, z6.h, z0.h[3]\n"
449       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
450       ".inst 0x647940cc  // bfdot z12.s, z6.h, z1.h[3]\n"
451       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
452       ".inst 0x647840e9  // bfdot z9.s, z7.h, z0.h[3]\n"
453       ".inst 0x647940ed  // bfdot z13.s, z7.h, z1.h[3]\n"
454       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
455       "addvl x10, x10, #4\n"
456       ".inst 0x647840ca  // bfdot z10.s, z6.h, z0.h[3]\n"
457       ".inst 0x647940ce  // bfdot z14.s, z6.h, z1.h[3]\n"
458       ".inst 0x647840eb  // bfdot z11.s, z7.h, z0.h[3]\n"
459       ".inst 0x647940ef  // bfdot z15.s, z7.h, z1.h[3]\n"
460       "24:"  // Height 2: Multiply loop: multiply skip
461       "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
462       "add x27, x27, #0x1\n"
463       "cmp x27, x19\n"
464       "bne 19b\n"
465       "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
466       "add x24, x28, x19, LSL #2\n"
467       "tbz %x[flags], #1, 25f\n"
468       "add x19, %x[args_ptr], %[offset_min]\n"
469       "ld1rw { z1.s }, p5/Z, [x19]\n"
470       "add x19, %x[args_ptr], %[offset_max]\n"
471       "ld1rw { z0.s }, p5/Z, [x19]\n"
472       "fmin z8.s, p5/M, z8.s, z0.s\n"
473       "fmin z9.s, p5/M, z9.s, z0.s\n"
474       "fmin z10.s, p5/M, z10.s, z0.s\n"
475       "fmin z11.s, p5/M, z11.s, z0.s\n"
476       "fmin z12.s, p5/M, z12.s, z0.s\n"
477       "fmax z8.s, p5/M, z8.s, z1.s\n"
478       "fmax z9.s, p5/M, z9.s, z1.s\n"
479       "fmax z10.s, p5/M, z10.s, z1.s\n"
480       "fmax z11.s, p5/M, z11.s, z1.s\n"
481       "fmax z12.s, p5/M, z12.s, z1.s\n"
482       "fmin z13.s, p5/M, z13.s, z0.s\n"
483       "fmin z14.s, p5/M, z14.s, z0.s\n"
484       "fmin z15.s, p5/M, z15.s, z0.s\n"
485       "fmax z13.s, p5/M, z13.s, z1.s\n"
486       "fmax z14.s, p5/M, z14.s, z1.s\n"
487       "fmax z15.s, p5/M, z15.s, z1.s\n"
488       "25:"  // Height 2: No activation
489       "st1w { z8.s }, p4, [x28]\n"
490       "st1w { z9.s }, p3, [x28, #1, MUL VL]\n"
491       "st1w { z10.s }, p2, [x28, #2, MUL VL]\n"
492       "st1w { z11.s }, p1, [x28, #3, MUL VL]\n"
493       "addvl x28, x28, #4\n"
494       "st1w { z12.s }, p4, [x24]\n"
495       "st1w { z13.s }, p3, [x24, #1, MUL VL]\n"
496       "st1w { z14.s }, p2, [x24, #2, MUL VL]\n"
497       "st1w { z15.s }, p1, [x24, #3, MUL VL]\n"
498       "26:"  // Height 2: Writeback done
499       "decw x11, ALL, MUL #4\n"
500       "cmp x11, XZR\n"
501       "bgt 15b\n"
502       "b 80f\n"
503       "27:"  // Height 3
504       "ldr x11, [%x[args_ptr], %[offsetof_N]]\n"
505       "mov x9, %x[bias]\n"
506       "ldr x10, [%x[args_ptr], %[offsetof_B_ptr]]\n"
507       "mov x28, %x[output_ptr]\n"
508       "28:"  // Height 3: Column loop
509       "mov x19, #0x0\n"
510       "whilelt p4.s, x19, x11\n"
511       "incw x19\n"
512       "whilelt p3.s, x19, x11\n"
513       "incw x19\n"
514       "whilelt p2.s, x19, x11\n"
515       "incw x19\n"
516       "whilelt p1.s, x19, x11\n"
517       "cbz x9, 29f\n"
518       "ld1w { z8.s }, p5/Z, [x9]\n"
519       "mov z12.d, z8.d\n"
520       "ld1w { z9.s }, p5/Z, [x9, #1, MUL VL]\n"
521       "mov z16.d, z8.d\n"
522       "ld1w { z10.s }, p5/Z, [x9, #2, MUL VL]\n"
523       "ld1w { z11.s }, p5/Z, [x9, #3, MUL VL]\n"
524       "mov z13.d, z9.d\n"
525       "addvl x9, x9, #4\n"
526       "mov z17.d, z9.d\n"
527       "mov z14.d, z10.d\n"
528       "mov z15.d, z11.d\n"
529       "mov z18.d, z10.d\n"
530       "mov z19.d, z11.d\n"
531       "b 31f\n"
532       "29:"  // Height 3: no bias
533       "tbz %x[flags], #0, 30f\n"
534       "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
535       "ld1w { z8.s }, p4/Z, [x28]\n"
536       "add x24, x28, x19, LSL #2\n"
537       "ld1w { z9.s }, p3/Z, [x28, #1, MUL VL]\n"
538       "ld1w { z10.s }, p2/Z, [x28, #2, MUL VL]\n"
539       "add x23, x24, x19, LSL #2\n"
540       "ld1w { z11.s }, p1/Z, [x28, #3, MUL VL]\n"
541       "ld1w { z12.s }, p4/Z, [x24]\n"
542       "ld1w { z13.s }, p3/Z, [x24, #1, MUL VL]\n"
543       "ld1w { z14.s }, p2/Z, [x24, #2, MUL VL]\n"
544       "ld1w { z15.s }, p1/Z, [x24, #3, MUL VL]\n"
545       "ld1w { z16.s }, p4/Z, [x23]\n"
546       "ld1w { z17.s }, p3/Z, [x23, #1, MUL VL]\n"
547       "ld1w { z18.s }, p2/Z, [x23, #2, MUL VL]\n"
548       "ld1w { z19.s }, p1/Z, [x23, #3, MUL VL]\n"
549       "b 31f\n"
550       "30:"  // Height 3: no accumulate
551       "mov z8.b, #0x0\n"
552       "mov z9.b, #0x0\n"
553       "mov z10.b, #0x0\n"
554       "mov z11.b, #0x0\n"
555       "mov z12.b, #0x0\n"
556       "mov z13.b, #0x0\n"
557       "mov z14.b, #0x0\n"
558       "mov z15.b, #0x0\n"
559       "mov z16.b, #0x0\n"
560       "mov z17.b, #0x0\n"
561       "mov z18.b, #0x0\n"
562       "mov z19.b, #0x0\n"
563       "31:"  // Height 3: setup done
564       "mov x27, #0x0\n"
565       "32:"  // Height 3: String loop
566       "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
567       "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
568       "ldr w26, [x20, x27, LSL #0x2]\n"
569       "tbz %x[flags], #3, 33f\n"
570       "ldr x20, [%x[input_ptr], x27, LSL #0x3]\n"
571       "add x20, x20, x19, LSL #3\n"
572       "ldr x25, [x20, #0x0]\n"
573       "ldr x24, [x20, #0x8]\n"
574       "ldr x23, [x20, #0x10]\n"
575       "cbnz x27, 34f\n"
576       "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
577       "add x25, x25, x19, LSL #1\n"
578       "add x24, x24, x19, LSL #1\n"
579       "add x23, x23, x19, LSL #1\n"
580       "b 34f\n"
581       "33:"  // Height 3: setup direct input
582       "mov x25, %x[input_ptr]\n"
583       "add x24, x25, x19, LSL #1\n"
584       "add x23, x24, x19, LSL #1\n"
585       "34:"  // Height 3: input setup done
586       "cmp x26, #0x8\n"
587       "ble 36f\n"
588       "35:"  // Height 3: Multiply loop: Main loop head
589       "ld1h { z6.h }, p5/Z, [x10]\n"
590       "whilelt p0.h, XZR, x26\n"
591       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
592       "sub x26, x26, #0x8\n"
593       "ld1rqh { z0.h }, p0/Z, [x25]\n"
594       ".inst 0x646040c8  // bfdot z8.s, z6.h, z0.h[0]\n"
595       "ld1rqh { z1.h }, p0/Z, [x24]\n"
596       "cmp x26, #0x8\n"
597       ".inst 0x646040e9  // bfdot z9.s, z7.h, z0.h[0]\n"
598       "ld1rqh { z2.h }, p0/Z, [x23]\n"
599       "add x25, x25, #0x10\n"
600       ".inst 0x646140cc  // bfdot z12.s, z6.h, z1.h[0]\n"
601       "add x24, x24, #0x10\n"
602       ".inst 0x646140ed  // bfdot z13.s, z7.h, z1.h[0]\n"
603       "add x23, x23, #0x10\n"
604       ".inst 0x646240d0  // bfdot z16.s, z6.h, z2.h[0]\n"
605       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
606       ".inst 0x646240f1  // bfdot z17.s, z7.h, z2.h[0]\n"
607       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
608       ".inst 0x646040ca  // bfdot z10.s, z6.h, z0.h[0]\n"
609       ".inst 0x646140ce  // bfdot z14.s, z6.h, z1.h[0]\n"
610       ".inst 0x646240d2  // bfdot z18.s, z6.h, z2.h[0]\n"
611       "ld1h { z6.h }, p5/Z, [x10, #4, MUL VL]\n"
612       ".inst 0x646040eb  // bfdot z11.s, z7.h, z0.h[0]\n"
613       ".inst 0x646140ef  // bfdot z15.s, z7.h, z1.h[0]\n"
614       ".inst 0x646240f3  // bfdot z19.s, z7.h, z2.h[0]\n"
615       "ld1h { z7.h }, p5/Z, [x10, #5, MUL VL]\n"
616       ".inst 0x646840c8  // bfdot z8.s, z6.h, z0.h[1]\n"
617       ".inst 0x646940cc  // bfdot z12.s, z6.h, z1.h[1]\n"
618       ".inst 0x646a40d0  // bfdot z16.s, z6.h, z2.h[1]\n"
619       "ld1h { z6.h }, p5/Z, [x10, #6, MUL VL]\n"
620       ".inst 0x646840e9  // bfdot z9.s, z7.h, z0.h[1]\n"
621       ".inst 0x646940ed  // bfdot z13.s, z7.h, z1.h[1]\n"
622       ".inst 0x646a40f1  // bfdot z17.s, z7.h, z2.h[1]\n"
623       "ld1h { z7.h }, p5/Z, [x10, #7, MUL VL]\n"
624       "addvl x10, x10, #16\n"
625       ".inst 0x646840ca  // bfdot z10.s, z6.h, z0.h[1]\n"
626       ".inst 0x646940ce  // bfdot z14.s, z6.h, z1.h[1]\n"
627       ".inst 0x646a40d2  // bfdot z18.s, z6.h, z2.h[1]\n"
628       "ld1h { z6.h }, p5/Z, [x10, #-8, MUL VL]\n"
629       ".inst 0x646840eb  // bfdot z11.s, z7.h, z0.h[1]\n"
630       ".inst 0x646940ef  // bfdot z15.s, z7.h, z1.h[1]\n"
631       ".inst 0x646a40f3  // bfdot z19.s, z7.h, z2.h[1]\n"
632       "ld1h { z7.h }, p5/Z, [x10, #-7, MUL VL]\n"
633       ".inst 0x647040c8  // bfdot z8.s, z6.h, z0.h[2]\n"
634       ".inst 0x647140cc  // bfdot z12.s, z6.h, z1.h[2]\n"
635       ".inst 0x647240d0  // bfdot z16.s, z6.h, z2.h[2]\n"
636       "ld1h { z6.h }, p5/Z, [x10, #-6, MUL VL]\n"
637       ".inst 0x647040e9  // bfdot z9.s, z7.h, z0.h[2]\n"
638       ".inst 0x647140ed  // bfdot z13.s, z7.h, z1.h[2]\n"
639       ".inst 0x647240f1  // bfdot z17.s, z7.h, z2.h[2]\n"
640       "ld1h { z7.h }, p5/Z, [x10, #-5, MUL VL]\n"
641       ".inst 0x647040ca  // bfdot z10.s, z6.h, z0.h[2]\n"
642       ".inst 0x647140ce  // bfdot z14.s, z6.h, z1.h[2]\n"
643       ".inst 0x647240d2  // bfdot z18.s, z6.h, z2.h[2]\n"
644       "ld1h { z6.h }, p5/Z, [x10, #-4, MUL VL]\n"
645       ".inst 0x647040eb  // bfdot z11.s, z7.h, z0.h[2]\n"
646       ".inst 0x647140ef  // bfdot z15.s, z7.h, z1.h[2]\n"
647       ".inst 0x647240f3  // bfdot z19.s, z7.h, z2.h[2]\n"
648       "ld1h { z7.h }, p5/Z, [x10, #-3, MUL VL]\n"
649       ".inst 0x647840c8  // bfdot z8.s, z6.h, z0.h[3]\n"
650       ".inst 0x647940cc  // bfdot z12.s, z6.h, z1.h[3]\n"
651       ".inst 0x647a40d0  // bfdot z16.s, z6.h, z2.h[3]\n"
652       "ld1h { z6.h }, p5/Z, [x10, #-2, MUL VL]\n"
653       ".inst 0x647840e9  // bfdot z9.s, z7.h, z0.h[3]\n"
654       ".inst 0x647940ed  // bfdot z13.s, z7.h, z1.h[3]\n"
655       ".inst 0x647a40f1  // bfdot z17.s, z7.h, z2.h[3]\n"
656       "ld1h { z7.h }, p5/Z, [x10, #-1, MUL VL]\n"
657       ".inst 0x647840ca  // bfdot z10.s, z6.h, z0.h[3]\n"
658       ".inst 0x647940ce  // bfdot z14.s, z6.h, z1.h[3]\n"
659       ".inst 0x647a40d2  // bfdot z18.s, z6.h, z2.h[3]\n"
660       ".inst 0x647840eb  // bfdot z11.s, z7.h, z0.h[3]\n"
661       ".inst 0x647940ef  // bfdot z15.s, z7.h, z1.h[3]\n"
662       ".inst 0x647a40f3  // bfdot z19.s, z7.h, z2.h[3]\n"
663       "bgt 35b\n"
664       "36:"  // Height 3: Multiply loop: Single iteration only
665       "ld1h { z6.h }, p5/Z, [x10]\n"
666       "whilelt p0.h, XZR, x26\n"
667       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
668       "subs x26, x26, #0x2\n"
669       "ld1rqh { z0.h }, p0/Z, [x25]\n"
670       ".inst 0x646040c8  // bfdot z8.s, z6.h, z0.h[0]\n"
671       "ld1rqh { z1.h }, p0/Z, [x24]\n"
672       ".inst 0x646040e9  // bfdot z9.s, z7.h, z0.h[0]\n"
673       "ld1rqh { z2.h }, p0/Z, [x23]\n"
674       ".inst 0x646140cc  // bfdot z12.s, z6.h, z1.h[0]\n"
675       ".inst 0x646140ed  // bfdot z13.s, z7.h, z1.h[0]\n"
676       ".inst 0x646240d0  // bfdot z16.s, z6.h, z2.h[0]\n"
677       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
678       ".inst 0x646240f1  // bfdot z17.s, z7.h, z2.h[0]\n"
679       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
680       "addvl x10, x10, #4\n"
681       ".inst 0x646040ca  // bfdot z10.s, z6.h, z0.h[0]\n"
682       ".inst 0x646140ce  // bfdot z14.s, z6.h, z1.h[0]\n"
683       ".inst 0x646240d2  // bfdot z18.s, z6.h, z2.h[0]\n"
684       ".inst 0x646040eb  // bfdot z11.s, z7.h, z0.h[0]\n"
685       ".inst 0x646140ef  // bfdot z15.s, z7.h, z1.h[0]\n"
686       ".inst 0x646240f3  // bfdot z19.s, z7.h, z2.h[0]\n"
687       "ble 37f\n"
688       "ld1h { z6.h }, p5/Z, [x10]\n"
689       ".inst 0x646840c8  // bfdot z8.s, z6.h, z0.h[1]\n"
690       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
691       "subs x26, x26, #0x2\n"
692       ".inst 0x646940cc  // bfdot z12.s, z6.h, z1.h[1]\n"
693       ".inst 0x646a40d0  // bfdot z16.s, z6.h, z2.h[1]\n"
694       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
695       ".inst 0x646840e9  // bfdot z9.s, z7.h, z0.h[1]\n"
696       ".inst 0x646940ed  // bfdot z13.s, z7.h, z1.h[1]\n"
697       ".inst 0x646a40f1  // bfdot z17.s, z7.h, z2.h[1]\n"
698       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
699       "addvl x10, x10, #4\n"
700       ".inst 0x646840ca  // bfdot z10.s, z6.h, z0.h[1]\n"
701       ".inst 0x646940ce  // bfdot z14.s, z6.h, z1.h[1]\n"
702       ".inst 0x646a40d2  // bfdot z18.s, z6.h, z2.h[1]\n"
703       ".inst 0x646840eb  // bfdot z11.s, z7.h, z0.h[1]\n"
704       ".inst 0x646940ef  // bfdot z15.s, z7.h, z1.h[1]\n"
705       ".inst 0x646a40f3  // bfdot z19.s, z7.h, z2.h[1]\n"
706       "ble 37f\n"
707       "ld1h { z6.h }, p5/Z, [x10]\n"
708       ".inst 0x647040c8  // bfdot z8.s, z6.h, z0.h[2]\n"
709       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
710       "subs x26, x26, #0x2\n"
711       ".inst 0x647140cc  // bfdot z12.s, z6.h, z1.h[2]\n"
712       ".inst 0x647240d0  // bfdot z16.s, z6.h, z2.h[2]\n"
713       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
714       ".inst 0x647040e9  // bfdot z9.s, z7.h, z0.h[2]\n"
715       ".inst 0x647140ed  // bfdot z13.s, z7.h, z1.h[2]\n"
716       ".inst 0x647240f1  // bfdot z17.s, z7.h, z2.h[2]\n"
717       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
718       "addvl x10, x10, #4\n"
719       ".inst 0x647040ca  // bfdot z10.s, z6.h, z0.h[2]\n"
720       ".inst 0x647140ce  // bfdot z14.s, z6.h, z1.h[2]\n"
721       ".inst 0x647240d2  // bfdot z18.s, z6.h, z2.h[2]\n"
722       ".inst 0x647040eb  // bfdot z11.s, z7.h, z0.h[2]\n"
723       ".inst 0x647140ef  // bfdot z15.s, z7.h, z1.h[2]\n"
724       ".inst 0x647240f3  // bfdot z19.s, z7.h, z2.h[2]\n"
725       "ble 37f\n"
726       "ld1h { z6.h }, p5/Z, [x10]\n"
727       ".inst 0x647840c8  // bfdot z8.s, z6.h, z0.h[3]\n"
728       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
729       ".inst 0x647940cc  // bfdot z12.s, z6.h, z1.h[3]\n"
730       ".inst 0x647a40d0  // bfdot z16.s, z6.h, z2.h[3]\n"
731       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
732       ".inst 0x647840e9  // bfdot z9.s, z7.h, z0.h[3]\n"
733       ".inst 0x647940ed  // bfdot z13.s, z7.h, z1.h[3]\n"
734       ".inst 0x647a40f1  // bfdot z17.s, z7.h, z2.h[3]\n"
735       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
736       "addvl x10, x10, #4\n"
737       ".inst 0x647840ca  // bfdot z10.s, z6.h, z0.h[3]\n"
738       ".inst 0x647940ce  // bfdot z14.s, z6.h, z1.h[3]\n"
739       ".inst 0x647a40d2  // bfdot z18.s, z6.h, z2.h[3]\n"
740       ".inst 0x647840eb  // bfdot z11.s, z7.h, z0.h[3]\n"
741       ".inst 0x647940ef  // bfdot z15.s, z7.h, z1.h[3]\n"
742       ".inst 0x647a40f3  // bfdot z19.s, z7.h, z2.h[3]\n"
743       "37:"  // Height 3: Multiply loop: multiply skip
744       "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
745       "add x27, x27, #0x1\n"
746       "cmp x27, x19\n"
747       "bne 32b\n"
748       "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
749       "add x24, x28, x19, LSL #2\n"
750       "add x23, x24, x19, LSL #2\n"
751       "tbz %x[flags], #1, 38f\n"
752       "add x19, %x[args_ptr], %[offset_min]\n"
753       "ld1rw { z1.s }, p5/Z, [x19]\n"
754       "add x19, %x[args_ptr], %[offset_max]\n"
755       "ld1rw { z0.s }, p5/Z, [x19]\n"
756       "fmin z8.s, p5/M, z8.s, z0.s\n"
757       "fmin z9.s, p5/M, z9.s, z0.s\n"
758       "fmin z10.s, p5/M, z10.s, z0.s\n"
759       "fmin z11.s, p5/M, z11.s, z0.s\n"
760       "fmin z12.s, p5/M, z12.s, z0.s\n"
761       "fmax z8.s, p5/M, z8.s, z1.s\n"
762       "fmax z9.s, p5/M, z9.s, z1.s\n"
763       "fmax z10.s, p5/M, z10.s, z1.s\n"
764       "fmax z11.s, p5/M, z11.s, z1.s\n"
765       "fmax z12.s, p5/M, z12.s, z1.s\n"
766       "fmin z13.s, p5/M, z13.s, z0.s\n"
767       "fmin z14.s, p5/M, z14.s, z0.s\n"
768       "fmin z15.s, p5/M, z15.s, z0.s\n"
769       "fmin z16.s, p5/M, z16.s, z0.s\n"
770       "fmax z13.s, p5/M, z13.s, z1.s\n"
771       "fmax z14.s, p5/M, z14.s, z1.s\n"
772       "fmax z15.s, p5/M, z15.s, z1.s\n"
773       "fmax z16.s, p5/M, z16.s, z1.s\n"
774       "fmin z17.s, p5/M, z17.s, z0.s\n"
775       "fmin z18.s, p5/M, z18.s, z0.s\n"
776       "fmin z19.s, p5/M, z19.s, z0.s\n"
777       "fmax z17.s, p5/M, z17.s, z1.s\n"
778       "fmax z18.s, p5/M, z18.s, z1.s\n"
779       "fmax z19.s, p5/M, z19.s, z1.s\n"
780       "38:"  // Height 3: No activation
781       "st1w { z8.s }, p4, [x28]\n"
782       "st1w { z9.s }, p3, [x28, #1, MUL VL]\n"
783       "st1w { z10.s }, p2, [x28, #2, MUL VL]\n"
784       "st1w { z11.s }, p1, [x28, #3, MUL VL]\n"
785       "addvl x28, x28, #4\n"
786       "st1w { z12.s }, p4, [x24]\n"
787       "st1w { z13.s }, p3, [x24, #1, MUL VL]\n"
788       "st1w { z14.s }, p2, [x24, #2, MUL VL]\n"
789       "st1w { z15.s }, p1, [x24, #3, MUL VL]\n"
790       "st1w { z16.s }, p4, [x23]\n"
791       "st1w { z17.s }, p3, [x23, #1, MUL VL]\n"
792       "st1w { z18.s }, p2, [x23, #2, MUL VL]\n"
793       "st1w { z19.s }, p1, [x23, #3, MUL VL]\n"
794       "39:"  // Height 3: Writeback done
795       "decw x11, ALL, MUL #4\n"
796       "cmp x11, XZR\n"
797       "bgt 28b\n"
798       "b 80f\n"
799       "40:"  // Height 4
800       "ldr x11, [%x[args_ptr], %[offsetof_N]]\n"
801       "mov x9, %x[bias]\n"
802       "ldr x10, [%x[args_ptr], %[offsetof_B_ptr]]\n"
803       "mov x28, %x[output_ptr]\n"
804       "41:"  // Height 4: Column loop
805       "mov x19, #0x0\n"
806       "whilelt p4.s, x19, x11\n"
807       "incw x19\n"
808       "whilelt p3.s, x19, x11\n"
809       "incw x19\n"
810       "whilelt p2.s, x19, x11\n"
811       "incw x19\n"
812       "whilelt p1.s, x19, x11\n"
813       "cbz x9, 42f\n"
814       "ld1w { z8.s }, p5/Z, [x9]\n"
815       "mov z12.d, z8.d\n"
816       "ld1w { z9.s }, p5/Z, [x9, #1, MUL VL]\n"
817       "mov z16.d, z8.d\n"
818       "ld1w { z10.s }, p5/Z, [x9, #2, MUL VL]\n"
819       "mov z20.d, z8.d\n"
820       "ld1w { z11.s }, p5/Z, [x9, #3, MUL VL]\n"
821       "addvl x9, x9, #4\n"
822       "mov z13.d, z9.d\n"
823       "mov z17.d, z9.d\n"
824       "mov z14.d, z10.d\n"
825       "mov z15.d, z11.d\n"
826       "mov z18.d, z10.d\n"
827       "mov z19.d, z11.d\n"
828       "mov z21.d, z9.d\n"
829       "mov z22.d, z10.d\n"
830       "mov z23.d, z11.d\n"
831       "b 44f\n"
832       "42:"  // Height 4: no bias
833       "tbz %x[flags], #0, 43f\n"
834       "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
835       "ld1w { z8.s }, p4/Z, [x28]\n"
836       "add x24, x28, x19, LSL #2\n"
837       "ld1w { z9.s }, p3/Z, [x28, #1, MUL VL]\n"
838       "ld1w { z10.s }, p2/Z, [x28, #2, MUL VL]\n"
839       "add x23, x24, x19, LSL #2\n"
840       "ld1w { z11.s }, p1/Z, [x28, #3, MUL VL]\n"
841       "add x22, x23, x19, LSL #2\n"
842       "ld1w { z12.s }, p4/Z, [x24]\n"
843       "ld1w { z13.s }, p3/Z, [x24, #1, MUL VL]\n"
844       "ld1w { z14.s }, p2/Z, [x24, #2, MUL VL]\n"
845       "ld1w { z15.s }, p1/Z, [x24, #3, MUL VL]\n"
846       "ld1w { z16.s }, p4/Z, [x23]\n"
847       "ld1w { z17.s }, p3/Z, [x23, #1, MUL VL]\n"
848       "ld1w { z18.s }, p2/Z, [x23, #2, MUL VL]\n"
849       "ld1w { z19.s }, p1/Z, [x23, #3, MUL VL]\n"
850       "ld1w { z20.s }, p4/Z, [x22]\n"
851       "ld1w { z21.s }, p3/Z, [x22, #1, MUL VL]\n"
852       "ld1w { z22.s }, p2/Z, [x22, #2, MUL VL]\n"
853       "ld1w { z23.s }, p1/Z, [x22, #3, MUL VL]\n"
854       "b 44f\n"
855       "43:"  // Height 4: no accumulate
856       "mov z8.b, #0x0\n"
857       "mov z9.b, #0x0\n"
858       "mov z10.b, #0x0\n"
859       "mov z11.b, #0x0\n"
860       "mov z12.b, #0x0\n"
861       "mov z13.b, #0x0\n"
862       "mov z14.b, #0x0\n"
863       "mov z15.b, #0x0\n"
864       "mov z16.b, #0x0\n"
865       "mov z17.b, #0x0\n"
866       "mov z18.b, #0x0\n"
867       "mov z19.b, #0x0\n"
868       "mov z20.b, #0x0\n"
869       "mov z21.b, #0x0\n"
870       "mov z22.b, #0x0\n"
871       "mov z23.b, #0x0\n"
872       "44:"  // Height 4: setup done
873       "mov x27, #0x0\n"
874       "45:"  // Height 4: String loop
875       "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
876       "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
877       "ldr w26, [x20, x27, LSL #0x2]\n"
878       "tbz %x[flags], #3, 46f\n"
879       "ldr x20, [%x[input_ptr], x27, LSL #0x3]\n"
880       "add x20, x20, x19, LSL #3\n"
881       "ldr x25, [x20, #0x0]\n"
882       "ldr x24, [x20, #0x8]\n"
883       "ldr x23, [x20, #0x10]\n"
884       "ldr x22, [x20, #0x18]\n"
885       "cbnz x27, 47f\n"
886       "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
887       "add x25, x25, x19, LSL #1\n"
888       "add x24, x24, x19, LSL #1\n"
889       "add x23, x23, x19, LSL #1\n"
890       "add x22, x22, x19, LSL #1\n"
891       "b 47f\n"
892       "46:"  // Height 4: setup direct input
893       "mov x25, %x[input_ptr]\n"
894       "add x24, x25, x19, LSL #1\n"
895       "add x23, x24, x19, LSL #1\n"
896       "add x22, x23, x19, LSL #1\n"
897       "47:"  // Height 4: input setup done
898       "cmp x26, #0x8\n"
899       "ble 49f\n"
900       "48:"  // Height 4: Multiply loop: Main loop head
901       "ld1h { z6.h }, p5/Z, [x10]\n"
902       "whilelt p0.h, XZR, x26\n"
903       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
904       "sub x26, x26, #0x8\n"
905       "ld1rqh { z0.h }, p0/Z, [x25]\n"
906       ".inst 0x646040c8  // bfdot z8.s, z6.h, z0.h[0]\n"
907       "ld1rqh { z1.h }, p0/Z, [x24]\n"
908       "cmp x26, #0x8\n"
909       ".inst 0x646040e9  // bfdot z9.s, z7.h, z0.h[0]\n"
910       "ld1rqh { z2.h }, p0/Z, [x23]\n"
911       "add x25, x25, #0x10\n"
912       ".inst 0x646140cc  // bfdot z12.s, z6.h, z1.h[0]\n"
913       "ld1rqh { z3.h }, p0/Z, [x22]\n"
914       "add x24, x24, #0x10\n"
915       ".inst 0x646240d0  // bfdot z16.s, z6.h, z2.h[0]\n"
916       "add x23, x23, #0x10\n"
917       ".inst 0x646140ed  // bfdot z13.s, z7.h, z1.h[0]\n"
918       "add x22, x22, #0x10\n"
919       ".inst 0x646240f1  // bfdot z17.s, z7.h, z2.h[0]\n"
920       ".inst 0x646340d4  // bfdot z20.s, z6.h, z3.h[0]\n"
921       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
922       ".inst 0x646340f5  // bfdot z21.s, z7.h, z3.h[0]\n"
923       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
924       ".inst 0x646040ca  // bfdot z10.s, z6.h, z0.h[0]\n"
925       ".inst 0x646140ce  // bfdot z14.s, z6.h, z1.h[0]\n"
926       ".inst 0x646240d2  // bfdot z18.s, z6.h, z2.h[0]\n"
927       ".inst 0x646340d6  // bfdot z22.s, z6.h, z3.h[0]\n"
928       "ld1h { z6.h }, p5/Z, [x10, #4, MUL VL]\n"
929       ".inst 0x646040eb  // bfdot z11.s, z7.h, z0.h[0]\n"
930       ".inst 0x646140ef  // bfdot z15.s, z7.h, z1.h[0]\n"
931       ".inst 0x646240f3  // bfdot z19.s, z7.h, z2.h[0]\n"
932       ".inst 0x646340f7  // bfdot z23.s, z7.h, z3.h[0]\n"
933       "ld1h { z7.h }, p5/Z, [x10, #5, MUL VL]\n"
934       ".inst 0x646840c8  // bfdot z8.s, z6.h, z0.h[1]\n"
935       ".inst 0x646940cc  // bfdot z12.s, z6.h, z1.h[1]\n"
936       ".inst 0x646a40d0  // bfdot z16.s, z6.h, z2.h[1]\n"
937       ".inst 0x646b40d4  // bfdot z20.s, z6.h, z3.h[1]\n"
938       "ld1h { z6.h }, p5/Z, [x10, #6, MUL VL]\n"
939       ".inst 0x646840e9  // bfdot z9.s, z7.h, z0.h[1]\n"
940       ".inst 0x646940ed  // bfdot z13.s, z7.h, z1.h[1]\n"
941       ".inst 0x646a40f1  // bfdot z17.s, z7.h, z2.h[1]\n"
942       ".inst 0x646b40f5  // bfdot z21.s, z7.h, z3.h[1]\n"
943       "ld1h { z7.h }, p5/Z, [x10, #7, MUL VL]\n"
944       "addvl x10, x10, #16\n"
945       ".inst 0x646840ca  // bfdot z10.s, z6.h, z0.h[1]\n"
946       ".inst 0x646940ce  // bfdot z14.s, z6.h, z1.h[1]\n"
947       ".inst 0x646a40d2  // bfdot z18.s, z6.h, z2.h[1]\n"
948       ".inst 0x646b40d6  // bfdot z22.s, z6.h, z3.h[1]\n"
949       "ld1h { z6.h }, p5/Z, [x10, #-8, MUL VL]\n"
950       ".inst 0x646840eb  // bfdot z11.s, z7.h, z0.h[1]\n"
951       ".inst 0x646940ef  // bfdot z15.s, z7.h, z1.h[1]\n"
952       ".inst 0x646a40f3  // bfdot z19.s, z7.h, z2.h[1]\n"
953       ".inst 0x646b40f7  // bfdot z23.s, z7.h, z3.h[1]\n"
954       "ld1h { z7.h }, p5/Z, [x10, #-7, MUL VL]\n"
955       ".inst 0x647040c8  // bfdot z8.s, z6.h, z0.h[2]\n"
956       ".inst 0x647140cc  // bfdot z12.s, z6.h, z1.h[2]\n"
957       ".inst 0x647240d0  // bfdot z16.s, z6.h, z2.h[2]\n"
958       ".inst 0x647340d4  // bfdot z20.s, z6.h, z3.h[2]\n"
959       "ld1h { z6.h }, p5/Z, [x10, #-6, MUL VL]\n"
960       ".inst 0x647040e9  // bfdot z9.s, z7.h, z0.h[2]\n"
961       ".inst 0x647140ed  // bfdot z13.s, z7.h, z1.h[2]\n"
962       ".inst 0x647240f1  // bfdot z17.s, z7.h, z2.h[2]\n"
963       ".inst 0x647340f5  // bfdot z21.s, z7.h, z3.h[2]\n"
964       "ld1h { z7.h }, p5/Z, [x10, #-5, MUL VL]\n"
965       ".inst 0x647040ca  // bfdot z10.s, z6.h, z0.h[2]\n"
966       ".inst 0x647140ce  // bfdot z14.s, z6.h, z1.h[2]\n"
967       ".inst 0x647240d2  // bfdot z18.s, z6.h, z2.h[2]\n"
968       ".inst 0x647340d6  // bfdot z22.s, z6.h, z3.h[2]\n"
969       "ld1h { z6.h }, p5/Z, [x10, #-4, MUL VL]\n"
970       ".inst 0x647040eb  // bfdot z11.s, z7.h, z0.h[2]\n"
971       ".inst 0x647140ef  // bfdot z15.s, z7.h, z1.h[2]\n"
972       ".inst 0x647240f3  // bfdot z19.s, z7.h, z2.h[2]\n"
973       ".inst 0x647340f7  // bfdot z23.s, z7.h, z3.h[2]\n"
974       "ld1h { z7.h }, p5/Z, [x10, #-3, MUL VL]\n"
975       ".inst 0x647840c8  // bfdot z8.s, z6.h, z0.h[3]\n"
976       ".inst 0x647940cc  // bfdot z12.s, z6.h, z1.h[3]\n"
977       ".inst 0x647a40d0  // bfdot z16.s, z6.h, z2.h[3]\n"
978       ".inst 0x647b40d4  // bfdot z20.s, z6.h, z3.h[3]\n"
979       "ld1h { z6.h }, p5/Z, [x10, #-2, MUL VL]\n"
980       ".inst 0x647840e9  // bfdot z9.s, z7.h, z0.h[3]\n"
981       ".inst 0x647940ed  // bfdot z13.s, z7.h, z1.h[3]\n"
982       ".inst 0x647a40f1  // bfdot z17.s, z7.h, z2.h[3]\n"
983       ".inst 0x647b40f5  // bfdot z21.s, z7.h, z3.h[3]\n"
984       "ld1h { z7.h }, p5/Z, [x10, #-1, MUL VL]\n"
985       ".inst 0x647840ca  // bfdot z10.s, z6.h, z0.h[3]\n"
986       ".inst 0x647940ce  // bfdot z14.s, z6.h, z1.h[3]\n"
987       ".inst 0x647a40d2  // bfdot z18.s, z6.h, z2.h[3]\n"
988       ".inst 0x647b40d6  // bfdot z22.s, z6.h, z3.h[3]\n"
989       ".inst 0x647840eb  // bfdot z11.s, z7.h, z0.h[3]\n"
990       ".inst 0x647940ef  // bfdot z15.s, z7.h, z1.h[3]\n"
991       ".inst 0x647a40f3  // bfdot z19.s, z7.h, z2.h[3]\n"
992       ".inst 0x647b40f7  // bfdot z23.s, z7.h, z3.h[3]\n"
993       "bgt 48b\n"
994       "49:"  // Height 4: Multiply loop: Single iteration only
995       "ld1h { z6.h }, p5/Z, [x10]\n"
996       "whilelt p0.h, XZR, x26\n"
997       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
998       "subs x26, x26, #0x2\n"
999       "ld1rqh { z0.h }, p0/Z, [x25]\n"
1000       ".inst 0x646040c8  // bfdot z8.s, z6.h, z0.h[0]\n"
1001       "ld1rqh { z1.h }, p0/Z, [x24]\n"
1002       ".inst 0x646040e9  // bfdot z9.s, z7.h, z0.h[0]\n"
1003       "ld1rqh { z2.h }, p0/Z, [x23]\n"
1004       "ld1rqh { z3.h }, p0/Z, [x22]\n"
1005       ".inst 0x646140cc  // bfdot z12.s, z6.h, z1.h[0]\n"
1006       ".inst 0x646140ed  // bfdot z13.s, z7.h, z1.h[0]\n"
1007       ".inst 0x646240d0  // bfdot z16.s, z6.h, z2.h[0]\n"
1008       ".inst 0x646340d4  // bfdot z20.s, z6.h, z3.h[0]\n"
1009       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
1010       ".inst 0x646240f1  // bfdot z17.s, z7.h, z2.h[0]\n"
1011       ".inst 0x646340f5  // bfdot z21.s, z7.h, z3.h[0]\n"
1012       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
1013       "addvl x10, x10, #4\n"
1014       ".inst 0x646040ca  // bfdot z10.s, z6.h, z0.h[0]\n"
1015       ".inst 0x646140ce  // bfdot z14.s, z6.h, z1.h[0]\n"
1016       ".inst 0x646240d2  // bfdot z18.s, z6.h, z2.h[0]\n"
1017       ".inst 0x646340d6  // bfdot z22.s, z6.h, z3.h[0]\n"
1018       ".inst 0x646040eb  // bfdot z11.s, z7.h, z0.h[0]\n"
1019       ".inst 0x646140ef  // bfdot z15.s, z7.h, z1.h[0]\n"
1020       ".inst 0x646240f3  // bfdot z19.s, z7.h, z2.h[0]\n"
1021       ".inst 0x646340f7  // bfdot z23.s, z7.h, z3.h[0]\n"
1022       "ble 50f\n"
1023       "ld1h { z6.h }, p5/Z, [x10]\n"
1024       ".inst 0x646840c8  // bfdot z8.s, z6.h, z0.h[1]\n"
1025       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
1026       "subs x26, x26, #0x2\n"
1027       ".inst 0x646940cc  // bfdot z12.s, z6.h, z1.h[1]\n"
1028       ".inst 0x646a40d0  // bfdot z16.s, z6.h, z2.h[1]\n"
1029       ".inst 0x646b40d4  // bfdot z20.s, z6.h, z3.h[1]\n"
1030       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
1031       ".inst 0x646840e9  // bfdot z9.s, z7.h, z0.h[1]\n"
1032       ".inst 0x646940ed  // bfdot z13.s, z7.h, z1.h[1]\n"
1033       ".inst 0x646a40f1  // bfdot z17.s, z7.h, z2.h[1]\n"
1034       ".inst 0x646b40f5  // bfdot z21.s, z7.h, z3.h[1]\n"
1035       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
1036       "addvl x10, x10, #4\n"
1037       ".inst 0x646840ca  // bfdot z10.s, z6.h, z0.h[1]\n"
1038       ".inst 0x646940ce  // bfdot z14.s, z6.h, z1.h[1]\n"
1039       ".inst 0x646a40d2  // bfdot z18.s, z6.h, z2.h[1]\n"
1040       ".inst 0x646b40d6  // bfdot z22.s, z6.h, z3.h[1]\n"
1041       ".inst 0x646840eb  // bfdot z11.s, z7.h, z0.h[1]\n"
1042       ".inst 0x646940ef  // bfdot z15.s, z7.h, z1.h[1]\n"
1043       ".inst 0x646a40f3  // bfdot z19.s, z7.h, z2.h[1]\n"
1044       ".inst 0x646b40f7  // bfdot z23.s, z7.h, z3.h[1]\n"
1045       "ble 50f\n"
1046       "ld1h { z6.h }, p5/Z, [x10]\n"
1047       ".inst 0x647040c8  // bfdot z8.s, z6.h, z0.h[2]\n"
1048       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
1049       "subs x26, x26, #0x2\n"
1050       ".inst 0x647140cc  // bfdot z12.s, z6.h, z1.h[2]\n"
1051       ".inst 0x647240d0  // bfdot z16.s, z6.h, z2.h[2]\n"
1052       ".inst 0x647340d4  // bfdot z20.s, z6.h, z3.h[2]\n"
1053       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
1054       ".inst 0x647040e9  // bfdot z9.s, z7.h, z0.h[2]\n"
1055       ".inst 0x647140ed  // bfdot z13.s, z7.h, z1.h[2]\n"
1056       ".inst 0x647240f1  // bfdot z17.s, z7.h, z2.h[2]\n"
1057       ".inst 0x647340f5  // bfdot z21.s, z7.h, z3.h[2]\n"
1058       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
1059       "addvl x10, x10, #4\n"
1060       ".inst 0x647040ca  // bfdot z10.s, z6.h, z0.h[2]\n"
1061       ".inst 0x647140ce  // bfdot z14.s, z6.h, z1.h[2]\n"
1062       ".inst 0x647240d2  // bfdot z18.s, z6.h, z2.h[2]\n"
1063       ".inst 0x647340d6  // bfdot z22.s, z6.h, z3.h[2]\n"
1064       ".inst 0x647040eb  // bfdot z11.s, z7.h, z0.h[2]\n"
1065       ".inst 0x647140ef  // bfdot z15.s, z7.h, z1.h[2]\n"
1066       ".inst 0x647240f3  // bfdot z19.s, z7.h, z2.h[2]\n"
1067       ".inst 0x647340f7  // bfdot z23.s, z7.h, z3.h[2]\n"
1068       "ble 50f\n"
1069       "ld1h { z6.h }, p5/Z, [x10]\n"
1070       ".inst 0x647840c8  // bfdot z8.s, z6.h, z0.h[3]\n"
1071       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
1072       ".inst 0x647940cc  // bfdot z12.s, z6.h, z1.h[3]\n"
1073       ".inst 0x647a40d0  // bfdot z16.s, z6.h, z2.h[3]\n"
1074       ".inst 0x647b40d4  // bfdot z20.s, z6.h, z3.h[3]\n"
1075       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
1076       ".inst 0x647840e9  // bfdot z9.s, z7.h, z0.h[3]\n"
1077       ".inst 0x647940ed  // bfdot z13.s, z7.h, z1.h[3]\n"
1078       ".inst 0x647a40f1  // bfdot z17.s, z7.h, z2.h[3]\n"
1079       ".inst 0x647b40f5  // bfdot z21.s, z7.h, z3.h[3]\n"
1080       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
1081       "addvl x10, x10, #4\n"
1082       ".inst 0x647840ca  // bfdot z10.s, z6.h, z0.h[3]\n"
1083       ".inst 0x647940ce  // bfdot z14.s, z6.h, z1.h[3]\n"
1084       ".inst 0x647a40d2  // bfdot z18.s, z6.h, z2.h[3]\n"
1085       ".inst 0x647b40d6  // bfdot z22.s, z6.h, z3.h[3]\n"
1086       ".inst 0x647840eb  // bfdot z11.s, z7.h, z0.h[3]\n"
1087       ".inst 0x647940ef  // bfdot z15.s, z7.h, z1.h[3]\n"
1088       ".inst 0x647a40f3  // bfdot z19.s, z7.h, z2.h[3]\n"
1089       ".inst 0x647b40f7  // bfdot z23.s, z7.h, z3.h[3]\n"
1090       "50:"  // Height 4: Multiply loop: multiply skip
1091       "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
1092       "add x27, x27, #0x1\n"
1093       "cmp x27, x19\n"
1094       "bne 45b\n"
1095       "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
1096       "add x24, x28, x19, LSL #2\n"
1097       "add x23, x24, x19, LSL #2\n"
1098       "add x22, x23, x19, LSL #2\n"
1099       "tbz %x[flags], #1, 51f\n"
1100       "add x19, %x[args_ptr], %[offset_min]\n"
1101       "ld1rw { z1.s }, p5/Z, [x19]\n"
1102       "add x19, %x[args_ptr], %[offset_max]\n"
1103       "ld1rw { z0.s }, p5/Z, [x19]\n"
1104       "fmin z8.s, p5/M, z8.s, z0.s\n"
1105       "fmin z9.s, p5/M, z9.s, z0.s\n"
1106       "fmin z10.s, p5/M, z10.s, z0.s\n"
1107       "fmin z11.s, p5/M, z11.s, z0.s\n"
1108       "fmin z12.s, p5/M, z12.s, z0.s\n"
1109       "fmax z8.s, p5/M, z8.s, z1.s\n"
1110       "fmax z9.s, p5/M, z9.s, z1.s\n"
1111       "fmax z10.s, p5/M, z10.s, z1.s\n"
1112       "fmax z11.s, p5/M, z11.s, z1.s\n"
1113       "fmax z12.s, p5/M, z12.s, z1.s\n"
1114       "fmin z13.s, p5/M, z13.s, z0.s\n"
1115       "fmin z14.s, p5/M, z14.s, z0.s\n"
1116       "fmin z15.s, p5/M, z15.s, z0.s\n"
1117       "fmin z16.s, p5/M, z16.s, z0.s\n"
1118       "fmax z13.s, p5/M, z13.s, z1.s\n"
1119       "fmax z14.s, p5/M, z14.s, z1.s\n"
1120       "fmax z15.s, p5/M, z15.s, z1.s\n"
1121       "fmax z16.s, p5/M, z16.s, z1.s\n"
1122       "fmin z17.s, p5/M, z17.s, z0.s\n"
1123       "fmin z18.s, p5/M, z18.s, z0.s\n"
1124       "fmin z19.s, p5/M, z19.s, z0.s\n"
1125       "fmin z20.s, p5/M, z20.s, z0.s\n"
1126       "fmax z17.s, p5/M, z17.s, z1.s\n"
1127       "fmax z18.s, p5/M, z18.s, z1.s\n"
1128       "fmax z19.s, p5/M, z19.s, z1.s\n"
1129       "fmax z20.s, p5/M, z20.s, z1.s\n"
1130       "fmin z21.s, p5/M, z21.s, z0.s\n"
1131       "fmin z22.s, p5/M, z22.s, z0.s\n"
1132       "fmin z23.s, p5/M, z23.s, z0.s\n"
1133       "fmax z21.s, p5/M, z21.s, z1.s\n"
1134       "fmax z22.s, p5/M, z22.s, z1.s\n"
1135       "fmax z23.s, p5/M, z23.s, z1.s\n"
1136       "51:"  // Height 4: No activation
1137       "st1w { z8.s }, p4, [x28]\n"
1138       "st1w { z9.s }, p3, [x28, #1, MUL VL]\n"
1139       "st1w { z10.s }, p2, [x28, #2, MUL VL]\n"
1140       "st1w { z11.s }, p1, [x28, #3, MUL VL]\n"
1141       "addvl x28, x28, #4\n"
1142       "st1w { z12.s }, p4, [x24]\n"
1143       "st1w { z13.s }, p3, [x24, #1, MUL VL]\n"
1144       "st1w { z14.s }, p2, [x24, #2, MUL VL]\n"
1145       "st1w { z15.s }, p1, [x24, #3, MUL VL]\n"
1146       "st1w { z16.s }, p4, [x23]\n"
1147       "st1w { z17.s }, p3, [x23, #1, MUL VL]\n"
1148       "st1w { z18.s }, p2, [x23, #2, MUL VL]\n"
1149       "st1w { z19.s }, p1, [x23, #3, MUL VL]\n"
1150       "st1w { z20.s }, p4, [x22]\n"
1151       "st1w { z21.s }, p3, [x22, #1, MUL VL]\n"
1152       "st1w { z22.s }, p2, [x22, #2, MUL VL]\n"
1153       "st1w { z23.s }, p1, [x22, #3, MUL VL]\n"
1154       "52:"  // Height 4: Writeback done
1155       "decw x11, ALL, MUL #4\n"
1156       "cmp x11, XZR\n"
1157       "bgt 41b\n"
1158       "b 80f\n"
1159       "53:"  // Height 5
1160       "ldr x11, [%x[args_ptr], %[offsetof_N]]\n"
1161       "mov x9, %x[bias]\n"
1162       "ldr x10, [%x[args_ptr], %[offsetof_B_ptr]]\n"
1163       "mov x28, %x[output_ptr]\n"
1164       "54:"  // Height 5: Column loop
1165       "mov x19, #0x0\n"
1166       "whilelt p4.s, x19, x11\n"
1167       "incw x19\n"
1168       "whilelt p3.s, x19, x11\n"
1169       "incw x19\n"
1170       "whilelt p2.s, x19, x11\n"
1171       "incw x19\n"
1172       "whilelt p1.s, x19, x11\n"
1173       "cbz x9, 55f\n"
1174       "ld1w { z8.s }, p5/Z, [x9]\n"
1175       "mov z12.d, z8.d\n"
1176       "ld1w { z9.s }, p5/Z, [x9, #1, MUL VL]\n"
1177       "mov z16.d, z8.d\n"
1178       "ld1w { z10.s }, p5/Z, [x9, #2, MUL VL]\n"
1179       "mov z20.d, z8.d\n"
1180       "ld1w { z11.s }, p5/Z, [x9, #3, MUL VL]\n"
1181       "addvl x9, x9, #4\n"
1182       "mov z13.d, z9.d\n"
1183       "mov z17.d, z9.d\n"
1184       "mov z14.d, z10.d\n"
1185       "mov z15.d, z11.d\n"
1186       "mov z18.d, z10.d\n"
1187       "mov z19.d, z11.d\n"
1188       "mov z21.d, z9.d\n"
1189       "mov z22.d, z10.d\n"
1190       "mov z23.d, z11.d\n"
1191       "mov z24.d, z8.d\n"
1192       "mov z25.d, z9.d\n"
1193       "mov z26.d, z10.d\n"
1194       "mov z27.d, z11.d\n"
1195       "b 57f\n"
1196       "55:"  // Height 5: no bias
1197       "tbz %x[flags], #0, 56f\n"
1198       "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
1199       "ld1w { z8.s }, p4/Z, [x28]\n"
1200       "add x24, x28, x19, LSL #2\n"
1201       "ld1w { z9.s }, p3/Z, [x28, #1, MUL VL]\n"
1202       "ld1w { z10.s }, p2/Z, [x28, #2, MUL VL]\n"
1203       "add x23, x24, x19, LSL #2\n"
1204       "ld1w { z11.s }, p1/Z, [x28, #3, MUL VL]\n"
1205       "add x22, x23, x19, LSL #2\n"
1206       "ld1w { z12.s }, p4/Z, [x24]\n"
1207       "add x21, x22, x19, LSL #2\n"
1208       "ld1w { z13.s }, p3/Z, [x24, #1, MUL VL]\n"
1209       "ld1w { z14.s }, p2/Z, [x24, #2, MUL VL]\n"
1210       "ld1w { z15.s }, p1/Z, [x24, #3, MUL VL]\n"
1211       "ld1w { z16.s }, p4/Z, [x23]\n"
1212       "ld1w { z17.s }, p3/Z, [x23, #1, MUL VL]\n"
1213       "ld1w { z18.s }, p2/Z, [x23, #2, MUL VL]\n"
1214       "ld1w { z19.s }, p1/Z, [x23, #3, MUL VL]\n"
1215       "ld1w { z20.s }, p4/Z, [x22]\n"
1216       "ld1w { z21.s }, p3/Z, [x22, #1, MUL VL]\n"
1217       "ld1w { z22.s }, p2/Z, [x22, #2, MUL VL]\n"
1218       "ld1w { z23.s }, p1/Z, [x22, #3, MUL VL]\n"
1219       "ld1w { z24.s }, p4/Z, [x21]\n"
1220       "ld1w { z25.s }, p3/Z, [x21, #1, MUL VL]\n"
1221       "ld1w { z26.s }, p2/Z, [x21, #2, MUL VL]\n"
1222       "ld1w { z27.s }, p1/Z, [x21, #3, MUL VL]\n"
1223       "b 57f\n"
1224       "56:"  // Height 5: no accumulate
1225       "mov z8.b, #0x0\n"
1226       "mov z9.b, #0x0\n"
1227       "mov z10.b, #0x0\n"
1228       "mov z11.b, #0x0\n"
1229       "mov z12.b, #0x0\n"
1230       "mov z13.b, #0x0\n"
1231       "mov z14.b, #0x0\n"
1232       "mov z15.b, #0x0\n"
1233       "mov z16.b, #0x0\n"
1234       "mov z17.b, #0x0\n"
1235       "mov z18.b, #0x0\n"
1236       "mov z19.b, #0x0\n"
1237       "mov z20.b, #0x0\n"
1238       "mov z21.b, #0x0\n"
1239       "mov z22.b, #0x0\n"
1240       "mov z23.b, #0x0\n"
1241       "mov z24.b, #0x0\n"
1242       "mov z25.b, #0x0\n"
1243       "mov z26.b, #0x0\n"
1244       "mov z27.b, #0x0\n"
1245       "57:"  // Height 5: setup done
1246       "mov x27, #0x0\n"
1247       "58:"  // Height 5: String loop
1248       "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
1249       "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
1250       "ldr w26, [x20, x27, LSL #0x2]\n"
1251       "tbz %x[flags], #3, 59f\n"
1252       "ldr x20, [%x[input_ptr], x27, LSL #0x3]\n"
1253       "add x20, x20, x19, LSL #3\n"
1254       "ldr x25, [x20, #0x0]\n"
1255       "ldr x24, [x20, #0x8]\n"
1256       "ldr x23, [x20, #0x10]\n"
1257       "ldr x22, [x20, #0x18]\n"
1258       "ldr x21, [x20, #0x20]\n"
1259       "cbnz x27, 60f\n"
1260       "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
1261       "add x25, x25, x19, LSL #1\n"
1262       "add x24, x24, x19, LSL #1\n"
1263       "add x23, x23, x19, LSL #1\n"
1264       "add x22, x22, x19, LSL #1\n"
1265       "add x21, x21, x19, LSL #1\n"
1266       "b 60f\n"
1267       "59:"  // Height 5: setup direct input
1268       "mov x25, %x[input_ptr]\n"
1269       "add x24, x25, x19, LSL #1\n"
1270       "add x23, x24, x19, LSL #1\n"
1271       "add x22, x23, x19, LSL #1\n"
1272       "add x21, x22, x19, LSL #1\n"
1273       "60:"  // Height 5: input setup done
1274       "cmp x26, #0x8\n"
1275       "ble 62f\n"
1276       "61:"  // Height 5: Multiply loop: Main loop head
1277       "ld1h { z6.h }, p5/Z, [x10]\n"
1278       "whilelt p0.h, XZR, x26\n"
1279       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
1280       "sub x26, x26, #0x8\n"
1281       "ld1rqh { z0.h }, p0/Z, [x25]\n"
1282       ".inst 0x646040c8  // bfdot z8.s, z6.h, z0.h[0]\n"
1283       "ld1rqh { z1.h }, p0/Z, [x24]\n"
1284       "cmp x26, #0x8\n"
1285       ".inst 0x646040e9  // bfdot z9.s, z7.h, z0.h[0]\n"
1286       "ld1rqh { z2.h }, p0/Z, [x23]\n"
1287       "add x25, x25, #0x10\n"
1288       ".inst 0x646140cc  // bfdot z12.s, z6.h, z1.h[0]\n"
1289       "ld1rqh { z3.h }, p0/Z, [x22]\n"
1290       "add x24, x24, #0x10\n"
1291       ".inst 0x646240d0  // bfdot z16.s, z6.h, z2.h[0]\n"
1292       "ld1rqh { z4.h }, p0/Z, [x21]\n"
1293       "add x23, x23, #0x10\n"
1294       ".inst 0x646140ed  // bfdot z13.s, z7.h, z1.h[0]\n"
1295       "add x22, x22, #0x10\n"
1296       ".inst 0x646240f1  // bfdot z17.s, z7.h, z2.h[0]\n"
1297       "add x21, x21, #0x10\n"
1298       ".inst 0x646340d4  // bfdot z20.s, z6.h, z3.h[0]\n"
1299       ".inst 0x646440d8  // bfdot z24.s, z6.h, z4.h[0]\n"
1300       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
1301       ".inst 0x646340f5  // bfdot z21.s, z7.h, z3.h[0]\n"
1302       ".inst 0x646440f9  // bfdot z25.s, z7.h, z4.h[0]\n"
1303       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
1304       ".inst 0x646040ca  // bfdot z10.s, z6.h, z0.h[0]\n"
1305       ".inst 0x646140ce  // bfdot z14.s, z6.h, z1.h[0]\n"
1306       ".inst 0x646240d2  // bfdot z18.s, z6.h, z2.h[0]\n"
1307       ".inst 0x646340d6  // bfdot z22.s, z6.h, z3.h[0]\n"
1308       ".inst 0x646440da  // bfdot z26.s, z6.h, z4.h[0]\n"
1309       "ld1h { z6.h }, p5/Z, [x10, #4, MUL VL]\n"
1310       ".inst 0x646040eb  // bfdot z11.s, z7.h, z0.h[0]\n"
1311       ".inst 0x646140ef  // bfdot z15.s, z7.h, z1.h[0]\n"
1312       ".inst 0x646240f3  // bfdot z19.s, z7.h, z2.h[0]\n"
1313       ".inst 0x646340f7  // bfdot z23.s, z7.h, z3.h[0]\n"
1314       ".inst 0x646440fb  // bfdot z27.s, z7.h, z4.h[0]\n"
1315       "ld1h { z7.h }, p5/Z, [x10, #5, MUL VL]\n"
1316       ".inst 0x646840c8  // bfdot z8.s, z6.h, z0.h[1]\n"
1317       ".inst 0x646940cc  // bfdot z12.s, z6.h, z1.h[1]\n"
1318       ".inst 0x646a40d0  // bfdot z16.s, z6.h, z2.h[1]\n"
1319       ".inst 0x646b40d4  // bfdot z20.s, z6.h, z3.h[1]\n"
1320       ".inst 0x646c40d8  // bfdot z24.s, z6.h, z4.h[1]\n"
1321       "ld1h { z6.h }, p5/Z, [x10, #6, MUL VL]\n"
1322       ".inst 0x646840e9  // bfdot z9.s, z7.h, z0.h[1]\n"
1323       ".inst 0x646940ed  // bfdot z13.s, z7.h, z1.h[1]\n"
1324       ".inst 0x646a40f1  // bfdot z17.s, z7.h, z2.h[1]\n"
1325       ".inst 0x646b40f5  // bfdot z21.s, z7.h, z3.h[1]\n"
1326       ".inst 0x646c40f9  // bfdot z25.s, z7.h, z4.h[1]\n"
1327       "ld1h { z7.h }, p5/Z, [x10, #7, MUL VL]\n"
1328       "addvl x10, x10, #16\n"
1329       ".inst 0x646840ca  // bfdot z10.s, z6.h, z0.h[1]\n"
1330       ".inst 0x646940ce  // bfdot z14.s, z6.h, z1.h[1]\n"
1331       ".inst 0x646a40d2  // bfdot z18.s, z6.h, z2.h[1]\n"
1332       ".inst 0x646b40d6  // bfdot z22.s, z6.h, z3.h[1]\n"
1333       ".inst 0x646c40da  // bfdot z26.s, z6.h, z4.h[1]\n"
1334       "ld1h { z6.h }, p5/Z, [x10, #-8, MUL VL]\n"
1335       ".inst 0x646840eb  // bfdot z11.s, z7.h, z0.h[1]\n"
1336       ".inst 0x646940ef  // bfdot z15.s, z7.h, z1.h[1]\n"
1337       ".inst 0x646a40f3  // bfdot z19.s, z7.h, z2.h[1]\n"
1338       ".inst 0x646b40f7  // bfdot z23.s, z7.h, z3.h[1]\n"
1339       ".inst 0x646c40fb  // bfdot z27.s, z7.h, z4.h[1]\n"
1340       "ld1h { z7.h }, p5/Z, [x10, #-7, MUL VL]\n"
1341       ".inst 0x647040c8  // bfdot z8.s, z6.h, z0.h[2]\n"
1342       ".inst 0x647140cc  // bfdot z12.s, z6.h, z1.h[2]\n"
1343       ".inst 0x647240d0  // bfdot z16.s, z6.h, z2.h[2]\n"
1344       ".inst 0x647340d4  // bfdot z20.s, z6.h, z3.h[2]\n"
1345       ".inst 0x647440d8  // bfdot z24.s, z6.h, z4.h[2]\n"
1346       "ld1h { z6.h }, p5/Z, [x10, #-6, MUL VL]\n"
1347       ".inst 0x647040e9  // bfdot z9.s, z7.h, z0.h[2]\n"
1348       ".inst 0x647140ed  // bfdot z13.s, z7.h, z1.h[2]\n"
1349       ".inst 0x647240f1  // bfdot z17.s, z7.h, z2.h[2]\n"
1350       ".inst 0x647340f5  // bfdot z21.s, z7.h, z3.h[2]\n"
1351       ".inst 0x647440f9  // bfdot z25.s, z7.h, z4.h[2]\n"
1352       "ld1h { z7.h }, p5/Z, [x10, #-5, MUL VL]\n"
1353       ".inst 0x647040ca  // bfdot z10.s, z6.h, z0.h[2]\n"
1354       ".inst 0x647140ce  // bfdot z14.s, z6.h, z1.h[2]\n"
1355       ".inst 0x647240d2  // bfdot z18.s, z6.h, z2.h[2]\n"
1356       ".inst 0x647340d6  // bfdot z22.s, z6.h, z3.h[2]\n"
1357       ".inst 0x647440da  // bfdot z26.s, z6.h, z4.h[2]\n"
1358       "ld1h { z6.h }, p5/Z, [x10, #-4, MUL VL]\n"
1359       ".inst 0x647040eb  // bfdot z11.s, z7.h, z0.h[2]\n"
1360       ".inst 0x647140ef  // bfdot z15.s, z7.h, z1.h[2]\n"
1361       ".inst 0x647240f3  // bfdot z19.s, z7.h, z2.h[2]\n"
1362       ".inst 0x647340f7  // bfdot z23.s, z7.h, z3.h[2]\n"
1363       ".inst 0x647440fb  // bfdot z27.s, z7.h, z4.h[2]\n"
1364       "ld1h { z7.h }, p5/Z, [x10, #-3, MUL VL]\n"
1365       ".inst 0x647840c8  // bfdot z8.s, z6.h, z0.h[3]\n"
1366       ".inst 0x647940cc  // bfdot z12.s, z6.h, z1.h[3]\n"
1367       ".inst 0x647a40d0  // bfdot z16.s, z6.h, z2.h[3]\n"
1368       ".inst 0x647b40d4  // bfdot z20.s, z6.h, z3.h[3]\n"
1369       ".inst 0x647c40d8  // bfdot z24.s, z6.h, z4.h[3]\n"
1370       "ld1h { z6.h }, p5/Z, [x10, #-2, MUL VL]\n"
1371       ".inst 0x647840e9  // bfdot z9.s, z7.h, z0.h[3]\n"
1372       ".inst 0x647940ed  // bfdot z13.s, z7.h, z1.h[3]\n"
1373       ".inst 0x647a40f1  // bfdot z17.s, z7.h, z2.h[3]\n"
1374       ".inst 0x647b40f5  // bfdot z21.s, z7.h, z3.h[3]\n"
1375       ".inst 0x647c40f9  // bfdot z25.s, z7.h, z4.h[3]\n"
1376       "ld1h { z7.h }, p5/Z, [x10, #-1, MUL VL]\n"
1377       ".inst 0x647840ca  // bfdot z10.s, z6.h, z0.h[3]\n"
1378       ".inst 0x647940ce  // bfdot z14.s, z6.h, z1.h[3]\n"
1379       ".inst 0x647a40d2  // bfdot z18.s, z6.h, z2.h[3]\n"
1380       ".inst 0x647b40d6  // bfdot z22.s, z6.h, z3.h[3]\n"
1381       ".inst 0x647c40da  // bfdot z26.s, z6.h, z4.h[3]\n"
1382       ".inst 0x647840eb  // bfdot z11.s, z7.h, z0.h[3]\n"
1383       ".inst 0x647940ef  // bfdot z15.s, z7.h, z1.h[3]\n"
1384       ".inst 0x647a40f3  // bfdot z19.s, z7.h, z2.h[3]\n"
1385       ".inst 0x647b40f7  // bfdot z23.s, z7.h, z3.h[3]\n"
1386       ".inst 0x647c40fb  // bfdot z27.s, z7.h, z4.h[3]\n"
1387       "bgt 61b\n"
1388       "62:"  // Height 5: Multiply loop: Single iteration only
1389       "ld1h { z6.h }, p5/Z, [x10]\n"
1390       "whilelt p0.h, XZR, x26\n"
1391       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
1392       "subs x26, x26, #0x2\n"
1393       "ld1rqh { z0.h }, p0/Z, [x25]\n"
1394       ".inst 0x646040c8  // bfdot z8.s, z6.h, z0.h[0]\n"
1395       "ld1rqh { z1.h }, p0/Z, [x24]\n"
1396       ".inst 0x646040e9  // bfdot z9.s, z7.h, z0.h[0]\n"
1397       "ld1rqh { z2.h }, p0/Z, [x23]\n"
1398       "ld1rqh { z3.h }, p0/Z, [x22]\n"
1399       ".inst 0x646140cc  // bfdot z12.s, z6.h, z1.h[0]\n"
1400       "ld1rqh { z4.h }, p0/Z, [x21]\n"
1401       ".inst 0x646140ed  // bfdot z13.s, z7.h, z1.h[0]\n"
1402       ".inst 0x646240d0  // bfdot z16.s, z6.h, z2.h[0]\n"
1403       ".inst 0x646340d4  // bfdot z20.s, z6.h, z3.h[0]\n"
1404       ".inst 0x646440d8  // bfdot z24.s, z6.h, z4.h[0]\n"
1405       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
1406       ".inst 0x646240f1  // bfdot z17.s, z7.h, z2.h[0]\n"
1407       ".inst 0x646340f5  // bfdot z21.s, z7.h, z3.h[0]\n"
1408       ".inst 0x646440f9  // bfdot z25.s, z7.h, z4.h[0]\n"
1409       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
1410       "addvl x10, x10, #4\n"
1411       ".inst 0x646040ca  // bfdot z10.s, z6.h, z0.h[0]\n"
1412       ".inst 0x646140ce  // bfdot z14.s, z6.h, z1.h[0]\n"
1413       ".inst 0x646240d2  // bfdot z18.s, z6.h, z2.h[0]\n"
1414       ".inst 0x646340d6  // bfdot z22.s, z6.h, z3.h[0]\n"
1415       ".inst 0x646440da  // bfdot z26.s, z6.h, z4.h[0]\n"
1416       ".inst 0x646040eb  // bfdot z11.s, z7.h, z0.h[0]\n"
1417       ".inst 0x646140ef  // bfdot z15.s, z7.h, z1.h[0]\n"
1418       ".inst 0x646240f3  // bfdot z19.s, z7.h, z2.h[0]\n"
1419       ".inst 0x646340f7  // bfdot z23.s, z7.h, z3.h[0]\n"
1420       ".inst 0x646440fb  // bfdot z27.s, z7.h, z4.h[0]\n"
1421       "ble 63f\n"
1422       "ld1h { z6.h }, p5/Z, [x10]\n"
1423       ".inst 0x646840c8  // bfdot z8.s, z6.h, z0.h[1]\n"
1424       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
1425       "subs x26, x26, #0x2\n"
1426       ".inst 0x646940cc  // bfdot z12.s, z6.h, z1.h[1]\n"
1427       ".inst 0x646a40d0  // bfdot z16.s, z6.h, z2.h[1]\n"
1428       ".inst 0x646b40d4  // bfdot z20.s, z6.h, z3.h[1]\n"
1429       ".inst 0x646c40d8  // bfdot z24.s, z6.h, z4.h[1]\n"
1430       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
1431       ".inst 0x646840e9  // bfdot z9.s, z7.h, z0.h[1]\n"
1432       ".inst 0x646940ed  // bfdot z13.s, z7.h, z1.h[1]\n"
1433       ".inst 0x646a40f1  // bfdot z17.s, z7.h, z2.h[1]\n"
1434       ".inst 0x646b40f5  // bfdot z21.s, z7.h, z3.h[1]\n"
1435       ".inst 0x646c40f9  // bfdot z25.s, z7.h, z4.h[1]\n"
1436       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
1437       "addvl x10, x10, #4\n"
1438       ".inst 0x646840ca  // bfdot z10.s, z6.h, z0.h[1]\n"
1439       ".inst 0x646940ce  // bfdot z14.s, z6.h, z1.h[1]\n"
1440       ".inst 0x646a40d2  // bfdot z18.s, z6.h, z2.h[1]\n"
1441       ".inst 0x646b40d6  // bfdot z22.s, z6.h, z3.h[1]\n"
1442       ".inst 0x646c40da  // bfdot z26.s, z6.h, z4.h[1]\n"
1443       ".inst 0x646840eb  // bfdot z11.s, z7.h, z0.h[1]\n"
1444       ".inst 0x646940ef  // bfdot z15.s, z7.h, z1.h[1]\n"
1445       ".inst 0x646a40f3  // bfdot z19.s, z7.h, z2.h[1]\n"
1446       ".inst 0x646b40f7  // bfdot z23.s, z7.h, z3.h[1]\n"
1447       ".inst 0x646c40fb  // bfdot z27.s, z7.h, z4.h[1]\n"
1448       "ble 63f\n"
1449       "ld1h { z6.h }, p5/Z, [x10]\n"
1450       ".inst 0x647040c8  // bfdot z8.s, z6.h, z0.h[2]\n"
1451       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
1452       "subs x26, x26, #0x2\n"
1453       ".inst 0x647140cc  // bfdot z12.s, z6.h, z1.h[2]\n"
1454       ".inst 0x647240d0  // bfdot z16.s, z6.h, z2.h[2]\n"
1455       ".inst 0x647340d4  // bfdot z20.s, z6.h, z3.h[2]\n"
1456       ".inst 0x647440d8  // bfdot z24.s, z6.h, z4.h[2]\n"
1457       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
1458       ".inst 0x647040e9  // bfdot z9.s, z7.h, z0.h[2]\n"
1459       ".inst 0x647140ed  // bfdot z13.s, z7.h, z1.h[2]\n"
1460       ".inst 0x647240f1  // bfdot z17.s, z7.h, z2.h[2]\n"
1461       ".inst 0x647340f5  // bfdot z21.s, z7.h, z3.h[2]\n"
1462       ".inst 0x647440f9  // bfdot z25.s, z7.h, z4.h[2]\n"
1463       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
1464       "addvl x10, x10, #4\n"
1465       ".inst 0x647040ca  // bfdot z10.s, z6.h, z0.h[2]\n"
1466       ".inst 0x647140ce  // bfdot z14.s, z6.h, z1.h[2]\n"
1467       ".inst 0x647240d2  // bfdot z18.s, z6.h, z2.h[2]\n"
1468       ".inst 0x647340d6  // bfdot z22.s, z6.h, z3.h[2]\n"
1469       ".inst 0x647440da  // bfdot z26.s, z6.h, z4.h[2]\n"
1470       ".inst 0x647040eb  // bfdot z11.s, z7.h, z0.h[2]\n"
1471       ".inst 0x647140ef  // bfdot z15.s, z7.h, z1.h[2]\n"
1472       ".inst 0x647240f3  // bfdot z19.s, z7.h, z2.h[2]\n"
1473       ".inst 0x647340f7  // bfdot z23.s, z7.h, z3.h[2]\n"
1474       ".inst 0x647440fb  // bfdot z27.s, z7.h, z4.h[2]\n"
1475       "ble 63f\n"
1476       "ld1h { z6.h }, p5/Z, [x10]\n"
1477       ".inst 0x647840c8  // bfdot z8.s, z6.h, z0.h[3]\n"
1478       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
1479       ".inst 0x647940cc  // bfdot z12.s, z6.h, z1.h[3]\n"
1480       ".inst 0x647a40d0  // bfdot z16.s, z6.h, z2.h[3]\n"
1481       ".inst 0x647b40d4  // bfdot z20.s, z6.h, z3.h[3]\n"
1482       ".inst 0x647c40d8  // bfdot z24.s, z6.h, z4.h[3]\n"
1483       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
1484       ".inst 0x647840e9  // bfdot z9.s, z7.h, z0.h[3]\n"
1485       ".inst 0x647940ed  // bfdot z13.s, z7.h, z1.h[3]\n"
1486       ".inst 0x647a40f1  // bfdot z17.s, z7.h, z2.h[3]\n"
1487       ".inst 0x647b40f5  // bfdot z21.s, z7.h, z3.h[3]\n"
1488       ".inst 0x647c40f9  // bfdot z25.s, z7.h, z4.h[3]\n"
1489       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
1490       "addvl x10, x10, #4\n"
1491       ".inst 0x647840ca  // bfdot z10.s, z6.h, z0.h[3]\n"
1492       ".inst 0x647940ce  // bfdot z14.s, z6.h, z1.h[3]\n"
1493       ".inst 0x647a40d2  // bfdot z18.s, z6.h, z2.h[3]\n"
1494       ".inst 0x647b40d6  // bfdot z22.s, z6.h, z3.h[3]\n"
1495       ".inst 0x647c40da  // bfdot z26.s, z6.h, z4.h[3]\n"
1496       ".inst 0x647840eb  // bfdot z11.s, z7.h, z0.h[3]\n"
1497       ".inst 0x647940ef  // bfdot z15.s, z7.h, z1.h[3]\n"
1498       ".inst 0x647a40f3  // bfdot z19.s, z7.h, z2.h[3]\n"
1499       ".inst 0x647b40f7  // bfdot z23.s, z7.h, z3.h[3]\n"
1500       ".inst 0x647c40fb  // bfdot z27.s, z7.h, z4.h[3]\n"
1501       "63:"  // Height 5: Multiply loop: multiply skip
1502       "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
1503       "add x27, x27, #0x1\n"
1504       "cmp x27, x19\n"
1505       "bne 58b\n"
1506       "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
1507       "add x24, x28, x19, LSL #2\n"
1508       "add x23, x24, x19, LSL #2\n"
1509       "add x22, x23, x19, LSL #2\n"
1510       "add x21, x22, x19, LSL #2\n"
1511       "tbz %x[flags], #1, 64f\n"
1512       "add x19, %x[args_ptr], %[offset_min]\n"
1513       "ld1rw { z1.s }, p5/Z, [x19]\n"
1514       "add x19, %x[args_ptr], %[offset_max]\n"
1515       "ld1rw { z0.s }, p5/Z, [x19]\n"
1516       "fmin z8.s, p5/M, z8.s, z0.s\n"
1517       "fmin z9.s, p5/M, z9.s, z0.s\n"
1518       "fmin z10.s, p5/M, z10.s, z0.s\n"
1519       "fmin z11.s, p5/M, z11.s, z0.s\n"
1520       "fmin z12.s, p5/M, z12.s, z0.s\n"
1521       "fmax z8.s, p5/M, z8.s, z1.s\n"
1522       "fmax z9.s, p5/M, z9.s, z1.s\n"
1523       "fmax z10.s, p5/M, z10.s, z1.s\n"
1524       "fmax z11.s, p5/M, z11.s, z1.s\n"
1525       "fmax z12.s, p5/M, z12.s, z1.s\n"
1526       "fmin z13.s, p5/M, z13.s, z0.s\n"
1527       "fmin z14.s, p5/M, z14.s, z0.s\n"
1528       "fmin z15.s, p5/M, z15.s, z0.s\n"
1529       "fmin z16.s, p5/M, z16.s, z0.s\n"
1530       "fmax z13.s, p5/M, z13.s, z1.s\n"
1531       "fmax z14.s, p5/M, z14.s, z1.s\n"
1532       "fmax z15.s, p5/M, z15.s, z1.s\n"
1533       "fmax z16.s, p5/M, z16.s, z1.s\n"
1534       "fmin z17.s, p5/M, z17.s, z0.s\n"
1535       "fmin z18.s, p5/M, z18.s, z0.s\n"
1536       "fmin z19.s, p5/M, z19.s, z0.s\n"
1537       "fmin z20.s, p5/M, z20.s, z0.s\n"
1538       "fmax z17.s, p5/M, z17.s, z1.s\n"
1539       "fmax z18.s, p5/M, z18.s, z1.s\n"
1540       "fmax z19.s, p5/M, z19.s, z1.s\n"
1541       "fmax z20.s, p5/M, z20.s, z1.s\n"
1542       "fmin z21.s, p5/M, z21.s, z0.s\n"
1543       "fmin z22.s, p5/M, z22.s, z0.s\n"
1544       "fmin z23.s, p5/M, z23.s, z0.s\n"
1545       "fmin z24.s, p5/M, z24.s, z0.s\n"
1546       "fmax z21.s, p5/M, z21.s, z1.s\n"
1547       "fmax z22.s, p5/M, z22.s, z1.s\n"
1548       "fmax z23.s, p5/M, z23.s, z1.s\n"
1549       "fmax z24.s, p5/M, z24.s, z1.s\n"
1550       "fmin z25.s, p5/M, z25.s, z0.s\n"
1551       "fmin z26.s, p5/M, z26.s, z0.s\n"
1552       "fmin z27.s, p5/M, z27.s, z0.s\n"
1553       "fmax z25.s, p5/M, z25.s, z1.s\n"
1554       "fmax z26.s, p5/M, z26.s, z1.s\n"
1555       "fmax z27.s, p5/M, z27.s, z1.s\n"
1556       "64:"  // Height 5: No activation
1557       "st1w { z8.s }, p4, [x28]\n"
1558       "st1w { z9.s }, p3, [x28, #1, MUL VL]\n"
1559       "st1w { z10.s }, p2, [x28, #2, MUL VL]\n"
1560       "st1w { z11.s }, p1, [x28, #3, MUL VL]\n"
1561       "addvl x28, x28, #4\n"
1562       "st1w { z12.s }, p4, [x24]\n"
1563       "st1w { z13.s }, p3, [x24, #1, MUL VL]\n"
1564       "st1w { z14.s }, p2, [x24, #2, MUL VL]\n"
1565       "st1w { z15.s }, p1, [x24, #3, MUL VL]\n"
1566       "st1w { z16.s }, p4, [x23]\n"
1567       "st1w { z17.s }, p3, [x23, #1, MUL VL]\n"
1568       "st1w { z18.s }, p2, [x23, #2, MUL VL]\n"
1569       "st1w { z19.s }, p1, [x23, #3, MUL VL]\n"
1570       "st1w { z20.s }, p4, [x22]\n"
1571       "st1w { z21.s }, p3, [x22, #1, MUL VL]\n"
1572       "st1w { z22.s }, p2, [x22, #2, MUL VL]\n"
1573       "st1w { z23.s }, p1, [x22, #3, MUL VL]\n"
1574       "st1w { z24.s }, p4, [x21]\n"
1575       "st1w { z25.s }, p3, [x21, #1, MUL VL]\n"
1576       "st1w { z26.s }, p2, [x21, #2, MUL VL]\n"
1577       "st1w { z27.s }, p1, [x21, #3, MUL VL]\n"
1578       "65:"  // Height 5: Writeback done
1579       "decw x11, ALL, MUL #4\n"
1580       "cmp x11, XZR\n"
1581       "bgt 54b\n"
1582       "b 80f\n"
1583       "66:"  // Height 6
1584       "ldr x11, [%x[args_ptr], %[offsetof_N]]\n"
1585       "mov x9, %x[bias]\n"
1586       "ldr x10, [%x[args_ptr], %[offsetof_B_ptr]]\n"
1587       "mov x28, %x[output_ptr]\n"
1588       "ldr x20, [%x[args_ptr], %[offsetof_output_offset]]\n"
1589       "mov x19, #0x18\n"
1590       "madd %x[output_ptr], x20, x19, %x[output_ptr]\n"
1591       "67:"  // Height 6: Column loop
1592       "mov x19, #0x0\n"
1593       "whilelt p4.s, x19, x11\n"
1594       "incw x19\n"
1595       "whilelt p3.s, x19, x11\n"
1596       "incw x19\n"
1597       "whilelt p2.s, x19, x11\n"
1598       "incw x19\n"
1599       "whilelt p1.s, x19, x11\n"
1600       "cbz x9, 68f\n"
1601       "ld1w { z8.s }, p5/Z, [x9]\n"
1602       "mov z12.d, z8.d\n"
1603       "ld1w { z9.s }, p5/Z, [x9, #1, MUL VL]\n"
1604       "mov z16.d, z8.d\n"
1605       "ld1w { z10.s }, p5/Z, [x9, #2, MUL VL]\n"
1606       "mov z20.d, z8.d\n"
1607       "ld1w { z11.s }, p5/Z, [x9, #3, MUL VL]\n"
1608       "addvl x9, x9, #4\n"
1609       "mov z13.d, z9.d\n"
1610       "mov z17.d, z9.d\n"
1611       "mov z14.d, z10.d\n"
1612       "mov z15.d, z11.d\n"
1613       "mov z18.d, z10.d\n"
1614       "mov z19.d, z11.d\n"
1615       "mov z21.d, z9.d\n"
1616       "mov z22.d, z10.d\n"
1617       "mov z23.d, z11.d\n"
1618       "mov z24.d, z8.d\n"
1619       "mov z25.d, z9.d\n"
1620       "mov z26.d, z10.d\n"
1621       "mov z27.d, z11.d\n"
1622       "mov z28.d, z8.d\n"
1623       "mov z29.d, z9.d\n"
1624       "mov z30.d, z10.d\n"
1625       "mov z31.d, z11.d\n"
1626       "b 70f\n"
1627       "68:"  // Height 6: no bias
1628       "tbz %x[flags], #0, 69f\n"
1629       "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
1630       "ld1w { z8.s }, p4/Z, [x28]\n"
1631       "add x24, x28, x19, LSL #2\n"
1632       "ld1w { z9.s }, p3/Z, [x28, #1, MUL VL]\n"
1633       "ld1w { z10.s }, p2/Z, [x28, #2, MUL VL]\n"
1634       "add x23, x24, x19, LSL #2\n"
1635       "ld1w { z11.s }, p1/Z, [x28, #3, MUL VL]\n"
1636       "add x22, x23, x19, LSL #2\n"
1637       "ld1w { z12.s }, p4/Z, [x24]\n"
1638       "add x21, x22, x19, LSL #2\n"
1639       "ld1w { z13.s }, p3/Z, [x24, #1, MUL VL]\n"
1640       "add x20, x21, x19, LSL #2\n"
1641       "ld1w { z14.s }, p2/Z, [x24, #2, MUL VL]\n"
1642       "ld1w { z15.s }, p1/Z, [x24, #3, MUL VL]\n"
1643       "ld1w { z16.s }, p4/Z, [x23]\n"
1644       "ld1w { z17.s }, p3/Z, [x23, #1, MUL VL]\n"
1645       "ld1w { z18.s }, p2/Z, [x23, #2, MUL VL]\n"
1646       "ld1w { z19.s }, p1/Z, [x23, #3, MUL VL]\n"
1647       "ld1w { z20.s }, p4/Z, [x22]\n"
1648       "ld1w { z21.s }, p3/Z, [x22, #1, MUL VL]\n"
1649       "ld1w { z22.s }, p2/Z, [x22, #2, MUL VL]\n"
1650       "ld1w { z23.s }, p1/Z, [x22, #3, MUL VL]\n"
1651       "ld1w { z24.s }, p4/Z, [x21]\n"
1652       "ld1w { z25.s }, p3/Z, [x21, #1, MUL VL]\n"
1653       "ld1w { z26.s }, p2/Z, [x21, #2, MUL VL]\n"
1654       "ld1w { z27.s }, p1/Z, [x21, #3, MUL VL]\n"
1655       "ld1w { z28.s }, p4/Z, [x20]\n"
1656       "ld1w { z29.s }, p3/Z, [x20, #1, MUL VL]\n"
1657       "ld1w { z30.s }, p2/Z, [x20, #2, MUL VL]\n"
1658       "ld1w { z31.s }, p1/Z, [x20, #3, MUL VL]\n"
1659       "b 70f\n"
1660       "69:"  // Height 6: no accumulate
1661       "mov z8.b, #0x0\n"
1662       "mov z9.b, #0x0\n"
1663       "mov z10.b, #0x0\n"
1664       "mov z11.b, #0x0\n"
1665       "mov z12.b, #0x0\n"
1666       "mov z13.b, #0x0\n"
1667       "mov z14.b, #0x0\n"
1668       "mov z15.b, #0x0\n"
1669       "mov z16.b, #0x0\n"
1670       "mov z17.b, #0x0\n"
1671       "mov z18.b, #0x0\n"
1672       "mov z19.b, #0x0\n"
1673       "mov z20.b, #0x0\n"
1674       "mov z21.b, #0x0\n"
1675       "mov z22.b, #0x0\n"
1676       "mov z23.b, #0x0\n"
1677       "mov z24.b, #0x0\n"
1678       "mov z25.b, #0x0\n"
1679       "mov z26.b, #0x0\n"
1680       "mov z27.b, #0x0\n"
1681       "mov z28.b, #0x0\n"
1682       "mov z29.b, #0x0\n"
1683       "mov z30.b, #0x0\n"
1684       "mov z31.b, #0x0\n"
1685       "70:"  // Height 6: setup done
1686       "mov x27, #0x0\n"
1687       "71:"  // Height 6: String loop
1688       "ldr x20, [%x[args_ptr], %[offsetof_string_lengths]]\n"
1689       "ldr x19, [%x[args_ptr], %[offsetof_input_offset]]\n"
1690       "ldr w26, [x20, x27, LSL #0x2]\n"
1691       "tbz %x[flags], #3, 72f\n"
1692       "ldr x20, [%x[input_ptr], x27, LSL #0x3]\n"
1693       "add x20, x20, x19, LSL #3\n"
1694       "ldr x25, [x20, #0x0]\n"
1695       "ldr x24, [x20, #0x8]\n"
1696       "ldr x23, [x20, #0x10]\n"
1697       "ldr x22, [x20, #0x18]\n"
1698       "ldr x21, [x20, #0x20]\n"
1699       "ldr x20, [x20, #0x28]\n"
1700       "cbnz x27, 73f\n"
1701       "ldr x19, [%x[args_ptr], %[offsetof_input_initial_col]]\n"
1702       "add x25, x25, x19, LSL #1\n"
1703       "add x24, x24, x19, LSL #1\n"
1704       "add x23, x23, x19, LSL #1\n"
1705       "add x22, x22, x19, LSL #1\n"
1706       "add x21, x21, x19, LSL #1\n"
1707       "add x20, x20, x19, LSL #1\n"
1708       "b 73f\n"
1709       "72:"  // Height 6: setup direct input
1710       "mov x25, %x[input_ptr]\n"
1711       "add x24, x25, x19, LSL #1\n"
1712       "add x23, x24, x19, LSL #1\n"
1713       "add x22, x23, x19, LSL #1\n"
1714       "add x21, x22, x19, LSL #1\n"
1715       "add x20, x21, x19, LSL #1\n"
1716       "73:"  // Height 6: input setup done
1717       "cmp x26, #0x8\n"
1718       "ble 75f\n"
1719       "74:"  // Height 6: Multiply loop: Main loop head
1720       "ld1h { z6.h }, p5/Z, [x10]\n"
1721       "whilelt p0.h, XZR, x26\n"
1722       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
1723       "sub x26, x26, #0x8\n"
1724       "ld1rqh { z0.h }, p0/Z, [x25]\n"
1725       ".inst 0x646040c8  // bfdot z8.s, z6.h, z0.h[0]\n"
1726       "ld1rqh { z1.h }, p0/Z, [x24]\n"
1727       "cmp x26, #0x8\n"
1728       ".inst 0x646040e9  // bfdot z9.s, z7.h, z0.h[0]\n"
1729       "ld1rqh { z2.h }, p0/Z, [x23]\n"
1730       "add x25, x25, #0x10\n"
1731       ".inst 0x646140cc  // bfdot z12.s, z6.h, z1.h[0]\n"
1732       "ld1rqh { z3.h }, p0/Z, [x22]\n"
1733       "add x24, x24, #0x10\n"
1734       ".inst 0x646240d0  // bfdot z16.s, z6.h, z2.h[0]\n"
1735       "ld1rqh { z4.h }, p0/Z, [x21]\n"
1736       "add x23, x23, #0x10\n"
1737       ".inst 0x646140ed  // bfdot z13.s, z7.h, z1.h[0]\n"
1738       "ld1rqh { z5.h }, p0/Z, [x20]\n"
1739       "add x22, x22, #0x10\n"
1740       ".inst 0x646340d4  // bfdot z20.s, z6.h, z3.h[0]\n"
1741       "add x21, x21, #0x10\n"
1742       ".inst 0x646240f1  // bfdot z17.s, z7.h, z2.h[0]\n"
1743       "add x20, x20, #0x10\n"
1744       ".inst 0x646440d8  // bfdot z24.s, z6.h, z4.h[0]\n"
1745       ".inst 0x646540dc  // bfdot z28.s, z6.h, z5.h[0]\n"
1746       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
1747       ".inst 0x646340f5  // bfdot z21.s, z7.h, z3.h[0]\n"
1748       ".inst 0x646440f9  // bfdot z25.s, z7.h, z4.h[0]\n"
1749       ".inst 0x646540fd  // bfdot z29.s, z7.h, z5.h[0]\n"
1750       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
1751       ".inst 0x646040ca  // bfdot z10.s, z6.h, z0.h[0]\n"
1752       ".inst 0x646140ce  // bfdot z14.s, z6.h, z1.h[0]\n"
1753       ".inst 0x646240d2  // bfdot z18.s, z6.h, z2.h[0]\n"
1754       ".inst 0x646340d6  // bfdot z22.s, z6.h, z3.h[0]\n"
1755       ".inst 0x646440da  // bfdot z26.s, z6.h, z4.h[0]\n"
1756       ".inst 0x646540de  // bfdot z30.s, z6.h, z5.h[0]\n"
1757       "ld1h { z6.h }, p5/Z, [x10, #4, MUL VL]\n"
1758       ".inst 0x646040eb  // bfdot z11.s, z7.h, z0.h[0]\n"
1759       ".inst 0x646140ef  // bfdot z15.s, z7.h, z1.h[0]\n"
1760       ".inst 0x646240f3  // bfdot z19.s, z7.h, z2.h[0]\n"
1761       ".inst 0x646340f7  // bfdot z23.s, z7.h, z3.h[0]\n"
1762       ".inst 0x646440fb  // bfdot z27.s, z7.h, z4.h[0]\n"
1763       ".inst 0x646540ff  // bfdot z31.s, z7.h, z5.h[0]\n"
1764       "ld1h { z7.h }, p5/Z, [x10, #5, MUL VL]\n"
1765       ".inst 0x646840c8  // bfdot z8.s, z6.h, z0.h[1]\n"
1766       ".inst 0x646940cc  // bfdot z12.s, z6.h, z1.h[1]\n"
1767       ".inst 0x646a40d0  // bfdot z16.s, z6.h, z2.h[1]\n"
1768       ".inst 0x646b40d4  // bfdot z20.s, z6.h, z3.h[1]\n"
1769       ".inst 0x646c40d8  // bfdot z24.s, z6.h, z4.h[1]\n"
1770       ".inst 0x646d40dc  // bfdot z28.s, z6.h, z5.h[1]\n"
1771       "ld1h { z6.h }, p5/Z, [x10, #6, MUL VL]\n"
1772       ".inst 0x646840e9  // bfdot z9.s, z7.h, z0.h[1]\n"
1773       ".inst 0x646940ed  // bfdot z13.s, z7.h, z1.h[1]\n"
1774       ".inst 0x646a40f1  // bfdot z17.s, z7.h, z2.h[1]\n"
1775       ".inst 0x646b40f5  // bfdot z21.s, z7.h, z3.h[1]\n"
1776       ".inst 0x646c40f9  // bfdot z25.s, z7.h, z4.h[1]\n"
1777       ".inst 0x646d40fd  // bfdot z29.s, z7.h, z5.h[1]\n"
1778       "ld1h { z7.h }, p5/Z, [x10, #7, MUL VL]\n"
1779       "addvl x10, x10, #16\n"
1780       ".inst 0x646840ca  // bfdot z10.s, z6.h, z0.h[1]\n"
1781       ".inst 0x646940ce  // bfdot z14.s, z6.h, z1.h[1]\n"
1782       ".inst 0x646a40d2  // bfdot z18.s, z6.h, z2.h[1]\n"
1783       ".inst 0x646b40d6  // bfdot z22.s, z6.h, z3.h[1]\n"
1784       ".inst 0x646c40da  // bfdot z26.s, z6.h, z4.h[1]\n"
1785       ".inst 0x646d40de  // bfdot z30.s, z6.h, z5.h[1]\n"
1786       "ld1h { z6.h }, p5/Z, [x10, #-8, MUL VL]\n"
1787       ".inst 0x646840eb  // bfdot z11.s, z7.h, z0.h[1]\n"
1788       ".inst 0x646940ef  // bfdot z15.s, z7.h, z1.h[1]\n"
1789       ".inst 0x646a40f3  // bfdot z19.s, z7.h, z2.h[1]\n"
1790       ".inst 0x646b40f7  // bfdot z23.s, z7.h, z3.h[1]\n"
1791       ".inst 0x646c40fb  // bfdot z27.s, z7.h, z4.h[1]\n"
1792       ".inst 0x646d40ff  // bfdot z31.s, z7.h, z5.h[1]\n"
1793       "ld1h { z7.h }, p5/Z, [x10, #-7, MUL VL]\n"
1794       ".inst 0x647040c8  // bfdot z8.s, z6.h, z0.h[2]\n"
1795       ".inst 0x647140cc  // bfdot z12.s, z6.h, z1.h[2]\n"
1796       ".inst 0x647240d0  // bfdot z16.s, z6.h, z2.h[2]\n"
1797       ".inst 0x647340d4  // bfdot z20.s, z6.h, z3.h[2]\n"
1798       ".inst 0x647440d8  // bfdot z24.s, z6.h, z4.h[2]\n"
1799       ".inst 0x647540dc  // bfdot z28.s, z6.h, z5.h[2]\n"
1800       "ld1h { z6.h }, p5/Z, [x10, #-6, MUL VL]\n"
1801       ".inst 0x647040e9  // bfdot z9.s, z7.h, z0.h[2]\n"
1802       ".inst 0x647140ed  // bfdot z13.s, z7.h, z1.h[2]\n"
1803       ".inst 0x647240f1  // bfdot z17.s, z7.h, z2.h[2]\n"
1804       ".inst 0x647340f5  // bfdot z21.s, z7.h, z3.h[2]\n"
1805       ".inst 0x647440f9  // bfdot z25.s, z7.h, z4.h[2]\n"
1806       ".inst 0x647540fd  // bfdot z29.s, z7.h, z5.h[2]\n"
1807       "ld1h { z7.h }, p5/Z, [x10, #-5, MUL VL]\n"
1808       ".inst 0x647040ca  // bfdot z10.s, z6.h, z0.h[2]\n"
1809       ".inst 0x647140ce  // bfdot z14.s, z6.h, z1.h[2]\n"
1810       ".inst 0x647240d2  // bfdot z18.s, z6.h, z2.h[2]\n"
1811       ".inst 0x647340d6  // bfdot z22.s, z6.h, z3.h[2]\n"
1812       ".inst 0x647440da  // bfdot z26.s, z6.h, z4.h[2]\n"
1813       ".inst 0x647540de  // bfdot z30.s, z6.h, z5.h[2]\n"
1814       "ld1h { z6.h }, p5/Z, [x10, #-4, MUL VL]\n"
1815       ".inst 0x647040eb  // bfdot z11.s, z7.h, z0.h[2]\n"
1816       ".inst 0x647140ef  // bfdot z15.s, z7.h, z1.h[2]\n"
1817       ".inst 0x647240f3  // bfdot z19.s, z7.h, z2.h[2]\n"
1818       ".inst 0x647340f7  // bfdot z23.s, z7.h, z3.h[2]\n"
1819       ".inst 0x647440fb  // bfdot z27.s, z7.h, z4.h[2]\n"
1820       ".inst 0x647540ff  // bfdot z31.s, z7.h, z5.h[2]\n"
1821       "ld1h { z7.h }, p5/Z, [x10, #-3, MUL VL]\n"
1822       ".inst 0x647840c8  // bfdot z8.s, z6.h, z0.h[3]\n"
1823       ".inst 0x647940cc  // bfdot z12.s, z6.h, z1.h[3]\n"
1824       ".inst 0x647a40d0  // bfdot z16.s, z6.h, z2.h[3]\n"
1825       ".inst 0x647b40d4  // bfdot z20.s, z6.h, z3.h[3]\n"
1826       ".inst 0x647c40d8  // bfdot z24.s, z6.h, z4.h[3]\n"
1827       ".inst 0x647d40dc  // bfdot z28.s, z6.h, z5.h[3]\n"
1828       "ld1h { z6.h }, p5/Z, [x10, #-2, MUL VL]\n"
1829       ".inst 0x647840e9  // bfdot z9.s, z7.h, z0.h[3]\n"
1830       ".inst 0x647940ed  // bfdot z13.s, z7.h, z1.h[3]\n"
1831       ".inst 0x647a40f1  // bfdot z17.s, z7.h, z2.h[3]\n"
1832       ".inst 0x647b40f5  // bfdot z21.s, z7.h, z3.h[3]\n"
1833       ".inst 0x647c40f9  // bfdot z25.s, z7.h, z4.h[3]\n"
1834       ".inst 0x647d40fd  // bfdot z29.s, z7.h, z5.h[3]\n"
1835       "ld1h { z7.h }, p5/Z, [x10, #-1, MUL VL]\n"
1836       ".inst 0x647840ca  // bfdot z10.s, z6.h, z0.h[3]\n"
1837       ".inst 0x647940ce  // bfdot z14.s, z6.h, z1.h[3]\n"
1838       ".inst 0x647a40d2  // bfdot z18.s, z6.h, z2.h[3]\n"
1839       ".inst 0x647b40d6  // bfdot z22.s, z6.h, z3.h[3]\n"
1840       ".inst 0x647c40da  // bfdot z26.s, z6.h, z4.h[3]\n"
1841       ".inst 0x647d40de  // bfdot z30.s, z6.h, z5.h[3]\n"
1842       ".inst 0x647840eb  // bfdot z11.s, z7.h, z0.h[3]\n"
1843       ".inst 0x647940ef  // bfdot z15.s, z7.h, z1.h[3]\n"
1844       ".inst 0x647a40f3  // bfdot z19.s, z7.h, z2.h[3]\n"
1845       ".inst 0x647b40f7  // bfdot z23.s, z7.h, z3.h[3]\n"
1846       ".inst 0x647c40fb  // bfdot z27.s, z7.h, z4.h[3]\n"
1847       ".inst 0x647d40ff  // bfdot z31.s, z7.h, z5.h[3]\n"
1848       "bgt 74b\n"
1849       "75:"  // Height 6: Multiply loop: Single iteration only
1850       "ld1h { z6.h }, p5/Z, [x10]\n"
1851       "whilelt p0.h, XZR, x26\n"
1852       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
1853       "subs x26, x26, #0x2\n"
1854       "ld1rqh { z0.h }, p0/Z, [x25]\n"
1855       ".inst 0x646040c8  // bfdot z8.s, z6.h, z0.h[0]\n"
1856       "ld1rqh { z1.h }, p0/Z, [x24]\n"
1857       ".inst 0x646040e9  // bfdot z9.s, z7.h, z0.h[0]\n"
1858       "ld1rqh { z2.h }, p0/Z, [x23]\n"
1859       "ld1rqh { z3.h }, p0/Z, [x22]\n"
1860       ".inst 0x646140cc  // bfdot z12.s, z6.h, z1.h[0]\n"
1861       "ld1rqh { z4.h }, p0/Z, [x21]\n"
1862       ".inst 0x646140ed  // bfdot z13.s, z7.h, z1.h[0]\n"
1863       "ld1rqh { z5.h }, p0/Z, [x20]\n"
1864       ".inst 0x646240d0  // bfdot z16.s, z6.h, z2.h[0]\n"
1865       ".inst 0x646340d4  // bfdot z20.s, z6.h, z3.h[0]\n"
1866       ".inst 0x646440d8  // bfdot z24.s, z6.h, z4.h[0]\n"
1867       ".inst 0x646540dc  // bfdot z28.s, z6.h, z5.h[0]\n"
1868       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
1869       ".inst 0x646240f1  // bfdot z17.s, z7.h, z2.h[0]\n"
1870       ".inst 0x646340f5  // bfdot z21.s, z7.h, z3.h[0]\n"
1871       ".inst 0x646440f9  // bfdot z25.s, z7.h, z4.h[0]\n"
1872       ".inst 0x646540fd  // bfdot z29.s, z7.h, z5.h[0]\n"
1873       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
1874       "addvl x10, x10, #4\n"
1875       ".inst 0x646040ca  // bfdot z10.s, z6.h, z0.h[0]\n"
1876       ".inst 0x646140ce  // bfdot z14.s, z6.h, z1.h[0]\n"
1877       ".inst 0x646240d2  // bfdot z18.s, z6.h, z2.h[0]\n"
1878       ".inst 0x646340d6  // bfdot z22.s, z6.h, z3.h[0]\n"
1879       ".inst 0x646440da  // bfdot z26.s, z6.h, z4.h[0]\n"
1880       ".inst 0x646540de  // bfdot z30.s, z6.h, z5.h[0]\n"
1881       ".inst 0x646040eb  // bfdot z11.s, z7.h, z0.h[0]\n"
1882       ".inst 0x646140ef  // bfdot z15.s, z7.h, z1.h[0]\n"
1883       ".inst 0x646240f3  // bfdot z19.s, z7.h, z2.h[0]\n"
1884       ".inst 0x646340f7  // bfdot z23.s, z7.h, z3.h[0]\n"
1885       ".inst 0x646440fb  // bfdot z27.s, z7.h, z4.h[0]\n"
1886       ".inst 0x646540ff  // bfdot z31.s, z7.h, z5.h[0]\n"
1887       "ble 76f\n"
1888       "ld1h { z6.h }, p5/Z, [x10]\n"
1889       ".inst 0x646840c8  // bfdot z8.s, z6.h, z0.h[1]\n"
1890       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
1891       "subs x26, x26, #0x2\n"
1892       ".inst 0x646940cc  // bfdot z12.s, z6.h, z1.h[1]\n"
1893       ".inst 0x646a40d0  // bfdot z16.s, z6.h, z2.h[1]\n"
1894       ".inst 0x646b40d4  // bfdot z20.s, z6.h, z3.h[1]\n"
1895       ".inst 0x646c40d8  // bfdot z24.s, z6.h, z4.h[1]\n"
1896       ".inst 0x646d40dc  // bfdot z28.s, z6.h, z5.h[1]\n"
1897       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
1898       ".inst 0x646840e9  // bfdot z9.s, z7.h, z0.h[1]\n"
1899       ".inst 0x646940ed  // bfdot z13.s, z7.h, z1.h[1]\n"
1900       ".inst 0x646a40f1  // bfdot z17.s, z7.h, z2.h[1]\n"
1901       ".inst 0x646b40f5  // bfdot z21.s, z7.h, z3.h[1]\n"
1902       ".inst 0x646c40f9  // bfdot z25.s, z7.h, z4.h[1]\n"
1903       ".inst 0x646d40fd  // bfdot z29.s, z7.h, z5.h[1]\n"
1904       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
1905       "addvl x10, x10, #4\n"
1906       ".inst 0x646840ca  // bfdot z10.s, z6.h, z0.h[1]\n"
1907       ".inst 0x646940ce  // bfdot z14.s, z6.h, z1.h[1]\n"
1908       ".inst 0x646a40d2  // bfdot z18.s, z6.h, z2.h[1]\n"
1909       ".inst 0x646b40d6  // bfdot z22.s, z6.h, z3.h[1]\n"
1910       ".inst 0x646c40da  // bfdot z26.s, z6.h, z4.h[1]\n"
1911       ".inst 0x646d40de  // bfdot z30.s, z6.h, z5.h[1]\n"
1912       ".inst 0x646840eb  // bfdot z11.s, z7.h, z0.h[1]\n"
1913       ".inst 0x646940ef  // bfdot z15.s, z7.h, z1.h[1]\n"
1914       ".inst 0x646a40f3  // bfdot z19.s, z7.h, z2.h[1]\n"
1915       ".inst 0x646b40f7  // bfdot z23.s, z7.h, z3.h[1]\n"
1916       ".inst 0x646c40fb  // bfdot z27.s, z7.h, z4.h[1]\n"
1917       ".inst 0x646d40ff  // bfdot z31.s, z7.h, z5.h[1]\n"
1918       "ble 76f\n"
1919       "ld1h { z6.h }, p5/Z, [x10]\n"
1920       ".inst 0x647040c8  // bfdot z8.s, z6.h, z0.h[2]\n"
1921       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
1922       "subs x26, x26, #0x2\n"
1923       ".inst 0x647140cc  // bfdot z12.s, z6.h, z1.h[2]\n"
1924       ".inst 0x647240d0  // bfdot z16.s, z6.h, z2.h[2]\n"
1925       ".inst 0x647340d4  // bfdot z20.s, z6.h, z3.h[2]\n"
1926       ".inst 0x647440d8  // bfdot z24.s, z6.h, z4.h[2]\n"
1927       ".inst 0x647540dc  // bfdot z28.s, z6.h, z5.h[2]\n"
1928       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
1929       ".inst 0x647040e9  // bfdot z9.s, z7.h, z0.h[2]\n"
1930       ".inst 0x647140ed  // bfdot z13.s, z7.h, z1.h[2]\n"
1931       ".inst 0x647240f1  // bfdot z17.s, z7.h, z2.h[2]\n"
1932       ".inst 0x647340f5  // bfdot z21.s, z7.h, z3.h[2]\n"
1933       ".inst 0x647440f9  // bfdot z25.s, z7.h, z4.h[2]\n"
1934       ".inst 0x647540fd  // bfdot z29.s, z7.h, z5.h[2]\n"
1935       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
1936       "addvl x10, x10, #4\n"
1937       ".inst 0x647040ca  // bfdot z10.s, z6.h, z0.h[2]\n"
1938       ".inst 0x647140ce  // bfdot z14.s, z6.h, z1.h[2]\n"
1939       ".inst 0x647240d2  // bfdot z18.s, z6.h, z2.h[2]\n"
1940       ".inst 0x647340d6  // bfdot z22.s, z6.h, z3.h[2]\n"
1941       ".inst 0x647440da  // bfdot z26.s, z6.h, z4.h[2]\n"
1942       ".inst 0x647540de  // bfdot z30.s, z6.h, z5.h[2]\n"
1943       ".inst 0x647040eb  // bfdot z11.s, z7.h, z0.h[2]\n"
1944       ".inst 0x647140ef  // bfdot z15.s, z7.h, z1.h[2]\n"
1945       ".inst 0x647240f3  // bfdot z19.s, z7.h, z2.h[2]\n"
1946       ".inst 0x647340f7  // bfdot z23.s, z7.h, z3.h[2]\n"
1947       ".inst 0x647440fb  // bfdot z27.s, z7.h, z4.h[2]\n"
1948       ".inst 0x647540ff  // bfdot z31.s, z7.h, z5.h[2]\n"
1949       "ble 76f\n"
1950       "ld1h { z6.h }, p5/Z, [x10]\n"
1951       ".inst 0x647840c8  // bfdot z8.s, z6.h, z0.h[3]\n"
1952       "ld1h { z7.h }, p5/Z, [x10, #1, MUL VL]\n"
1953       ".inst 0x647940cc  // bfdot z12.s, z6.h, z1.h[3]\n"
1954       ".inst 0x647a40d0  // bfdot z16.s, z6.h, z2.h[3]\n"
1955       ".inst 0x647b40d4  // bfdot z20.s, z6.h, z3.h[3]\n"
1956       ".inst 0x647c40d8  // bfdot z24.s, z6.h, z4.h[3]\n"
1957       ".inst 0x647d40dc  // bfdot z28.s, z6.h, z5.h[3]\n"
1958       "ld1h { z6.h }, p5/Z, [x10, #2, MUL VL]\n"
1959       ".inst 0x647840e9  // bfdot z9.s, z7.h, z0.h[3]\n"
1960       ".inst 0x647940ed  // bfdot z13.s, z7.h, z1.h[3]\n"
1961       ".inst 0x647a40f1  // bfdot z17.s, z7.h, z2.h[3]\n"
1962       ".inst 0x647b40f5  // bfdot z21.s, z7.h, z3.h[3]\n"
1963       ".inst 0x647c40f9  // bfdot z25.s, z7.h, z4.h[3]\n"
1964       ".inst 0x647d40fd  // bfdot z29.s, z7.h, z5.h[3]\n"
1965       "ld1h { z7.h }, p5/Z, [x10, #3, MUL VL]\n"
1966       "addvl x10, x10, #4\n"
1967       ".inst 0x647840ca  // bfdot z10.s, z6.h, z0.h[3]\n"
1968       ".inst 0x647940ce  // bfdot z14.s, z6.h, z1.h[3]\n"
1969       ".inst 0x647a40d2  // bfdot z18.s, z6.h, z2.h[3]\n"
1970       ".inst 0x647b40d6  // bfdot z22.s, z6.h, z3.h[3]\n"
1971       ".inst 0x647c40da  // bfdot z26.s, z6.h, z4.h[3]\n"
1972       ".inst 0x647d40de  // bfdot z30.s, z6.h, z5.h[3]\n"
1973       ".inst 0x647840eb  // bfdot z11.s, z7.h, z0.h[3]\n"
1974       ".inst 0x647940ef  // bfdot z15.s, z7.h, z1.h[3]\n"
1975       ".inst 0x647a40f3  // bfdot z19.s, z7.h, z2.h[3]\n"
1976       ".inst 0x647b40f7  // bfdot z23.s, z7.h, z3.h[3]\n"
1977       ".inst 0x647c40fb  // bfdot z27.s, z7.h, z4.h[3]\n"
1978       ".inst 0x647d40ff  // bfdot z31.s, z7.h, z5.h[3]\n"
1979       "76:"  // Height 6: Multiply loop: multiply skip
1980       "ldr w19, [%x[args_ptr], %[offsetof_num_strings]]\n"
1981       "add x27, x27, #0x1\n"
1982       "cmp x27, x19\n"
1983       "bne 71b\n"
1984       "ldr x19, [%x[args_ptr], %[offsetof_output_offset]]\n"
1985       "add x24, x28, x19, LSL #2\n"
1986       "add x23, x24, x19, LSL #2\n"
1987       "add x22, x23, x19, LSL #2\n"
1988       "add x21, x22, x19, LSL #2\n"
1989       "add x20, x21, x19, LSL #2\n"
1990       "tbz %x[flags], #1, 77f\n"
1991       "add x19, %x[args_ptr], %[offset_min]\n"
1992       "ld1rw { z1.s }, p5/Z, [x19]\n"
1993       "add x19, %x[args_ptr], %[offset_max]\n"
1994       "ld1rw { z0.s }, p5/Z, [x19]\n"
1995       "fmin z8.s, p5/M, z8.s, z0.s\n"
1996       "fmin z9.s, p5/M, z9.s, z0.s\n"
1997       "fmin z10.s, p5/M, z10.s, z0.s\n"
1998       "fmin z11.s, p5/M, z11.s, z0.s\n"
1999       "fmin z12.s, p5/M, z12.s, z0.s\n"
2000       "fmax z8.s, p5/M, z8.s, z1.s\n"
2001       "fmax z9.s, p5/M, z9.s, z1.s\n"
2002       "fmax z10.s, p5/M, z10.s, z1.s\n"
2003       "fmax z11.s, p5/M, z11.s, z1.s\n"
2004       "fmax z12.s, p5/M, z12.s, z1.s\n"
2005       "fmin z13.s, p5/M, z13.s, z0.s\n"
2006       "fmin z14.s, p5/M, z14.s, z0.s\n"
2007       "fmin z15.s, p5/M, z15.s, z0.s\n"
2008       "fmin z16.s, p5/M, z16.s, z0.s\n"
2009       "fmax z13.s, p5/M, z13.s, z1.s\n"
2010       "fmax z14.s, p5/M, z14.s, z1.s\n"
2011       "fmax z15.s, p5/M, z15.s, z1.s\n"
2012       "fmax z16.s, p5/M, z16.s, z1.s\n"
2013       "fmin z17.s, p5/M, z17.s, z0.s\n"
2014       "fmin z18.s, p5/M, z18.s, z0.s\n"
2015       "fmin z19.s, p5/M, z19.s, z0.s\n"
2016       "fmin z20.s, p5/M, z20.s, z0.s\n"
2017       "fmax z17.s, p5/M, z17.s, z1.s\n"
2018       "fmax z18.s, p5/M, z18.s, z1.s\n"
2019       "fmax z19.s, p5/M, z19.s, z1.s\n"
2020       "fmax z20.s, p5/M, z20.s, z1.s\n"
2021       "fmin z21.s, p5/M, z21.s, z0.s\n"
2022       "fmin z22.s, p5/M, z22.s, z0.s\n"
2023       "fmin z23.s, p5/M, z23.s, z0.s\n"
2024       "fmin z24.s, p5/M, z24.s, z0.s\n"
2025       "fmax z21.s, p5/M, z21.s, z1.s\n"
2026       "fmax z22.s, p5/M, z22.s, z1.s\n"
2027       "fmax z23.s, p5/M, z23.s, z1.s\n"
2028       "fmax z24.s, p5/M, z24.s, z1.s\n"
2029       "fmin z25.s, p5/M, z25.s, z0.s\n"
2030       "fmin z26.s, p5/M, z26.s, z0.s\n"
2031       "fmin z27.s, p5/M, z27.s, z0.s\n"
2032       "fmin z28.s, p5/M, z28.s, z0.s\n"
2033       "fmax z25.s, p5/M, z25.s, z1.s\n"
2034       "fmax z26.s, p5/M, z26.s, z1.s\n"
2035       "fmax z27.s, p5/M, z27.s, z1.s\n"
2036       "fmax z28.s, p5/M, z28.s, z1.s\n"
2037       "fmin z29.s, p5/M, z29.s, z0.s\n"
2038       "fmin z30.s, p5/M, z30.s, z0.s\n"
2039       "fmin z31.s, p5/M, z31.s, z0.s\n"
2040       "fmax z29.s, p5/M, z29.s, z1.s\n"
2041       "fmax z30.s, p5/M, z30.s, z1.s\n"
2042       "fmax z31.s, p5/M, z31.s, z1.s\n"
2043       "77:"  // Height 6: No activation
2044       "st1w { z8.s }, p4, [x28]\n"
2045       "st1w { z9.s }, p3, [x28, #1, MUL VL]\n"
2046       "st1w { z10.s }, p2, [x28, #2, MUL VL]\n"
2047       "st1w { z11.s }, p1, [x28, #3, MUL VL]\n"
2048       "addvl x28, x28, #4\n"
2049       "st1w { z12.s }, p4, [x24]\n"
2050       "st1w { z13.s }, p3, [x24, #1, MUL VL]\n"
2051       "st1w { z14.s }, p2, [x24, #2, MUL VL]\n"
2052       "st1w { z15.s }, p1, [x24, #3, MUL VL]\n"
2053       "st1w { z16.s }, p4, [x23]\n"
2054       "st1w { z17.s }, p3, [x23, #1, MUL VL]\n"
2055       "st1w { z18.s }, p2, [x23, #2, MUL VL]\n"
2056       "st1w { z19.s }, p1, [x23, #3, MUL VL]\n"
2057       "st1w { z20.s }, p4, [x22]\n"
2058       "st1w { z21.s }, p3, [x22, #1, MUL VL]\n"
2059       "st1w { z22.s }, p2, [x22, #2, MUL VL]\n"
2060       "st1w { z23.s }, p1, [x22, #3, MUL VL]\n"
2061       "st1w { z24.s }, p4, [x21]\n"
2062       "st1w { z25.s }, p3, [x21, #1, MUL VL]\n"
2063       "st1w { z26.s }, p2, [x21, #2, MUL VL]\n"
2064       "st1w { z27.s }, p1, [x21, #3, MUL VL]\n"
2065       "st1w { z28.s }, p4, [x20]\n"
2066       "st1w { z29.s }, p3, [x20, #1, MUL VL]\n"
2067       "st1w { z30.s }, p2, [x20, #2, MUL VL]\n"
2068       "st1w { z31.s }, p1, [x20, #3, MUL VL]\n"
2069       "78:"  // Height 6: Writeback done
2070       "decw x11, ALL, MUL #4\n"
2071       "cmp x11, XZR\n"
2072       "bgt 67b\n"
2073       "subs %x[M], %x[M], #0x6\n"
2074       "beq 80f\n"
2075       "ldr x20, [%x[args_ptr], %[offsetof_input_offset]]\n"
2076       "tbz %x[flags], #3, 79f\n"
2077       "add x20, x20, #0x6\n"
2078       "str x20, [%x[args_ptr], %[offsetof_input_offset]]\n"
2079       "b 1b\n"
2080       "79:"  // Update direct input
2081       "mov x19, #0xc\n"
2082       "madd %x[input_ptr], x19, x20, %x[input_ptr]\n"
2083       "b 1b\n"
2084       "80:"  // Exit
2085 
2086       : [M] "+&r" (M), [input_ptr] "+&r" (input_ptr), [output_ptr] "+&r" (output_ptr)
2087       : [args_ptr] "r" (&ka), [bias] "r" (bias), [flags] "r" (flags), [offset_max] "I" (offsetof(KernelArgs, maxval)), [offset_min] "I" (offsetof(KernelArgs, 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))
2088       : "cc", "memory", "p0", "p1", "p2", "p3", "p4", "p5", "x9", "x10", "x11", "x19", "x20", "x21", "x22", "x23", "x24", "x25", "x26", "x27", "x28", "z0", "z1", "z2", "z3", "z4", "z5", "z6", "z7", "z8", "z9", "z10", "z11", "z12", "z13", "z14", "z15", "z16", "z17", "z18", "z19", "z20", "z21", "z22", "z23", "z24", "z25", "z26", "z27", "z28", "z29", "z30", "z31"
2089     );
2090 }
2091 
2092 } // namespace arm_gemm
2093 #endif // __ARM_FEATURE_SVE
2094