user: Please show me the C implementation that matches the assembly code listed below:

```asm
<kernel_dsymv_3_lib4>:
  endbr64
  mov    %edi,%r11d
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    0x38(%rsp),%rdi
  mov    0x40(%rsp),%r14
  mov    0x48(%rsp),%r15
  test   %r11d,%r11d
  jle    L10
  movsd  0x10(%rcx),%xmm2
  cmpl   $0x1,0x58(%rsp)
  mov    %edx,%eax
  movsd  (%rcx),%xmm7
  movsd  0x8(%rcx),%xmm8
  movsd  %xmm2,-0x20(%rsp)
  je     L8
  movq   D7(%rip),%xmm0
  xorpd  %xmm0,%xmm2
  xorpd  %xmm0,%xmm7
  xorpd  %xmm0,%xmm8
  movsd  %xmm2,-0x20(%rsp)
L8:
  cmpl   $0x1,0x50(%rsp)
  je     L185
  pxor   %xmm0,%xmm0
  xor    %r12d,%r12d
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm1
L165:
  lea    -0x3(%r11),%edx
  cmp    %edx,%r12d
  jge    L92
  lea    -0x4(%r11),%r13d
  shl    $0x2,%eax
  sub    %r12d,%r13d
  cltq
  shr    $0x2,%r13d
  shl    $0x3,%rax
  lea    0x1(%r13),%r10d
  mov    %rax,%rdx
  mov    %r10,%rcx
  sub    $0x1,%r10
  imul   %r10,%rdx
  shl    $0x5,%r10
  lea    0x18(%r9,%r10,1),%rbx
  xor    %r10d,%r10d
  test   %rax,%rax
  cmovs  %rdx,%r10
  add    %rsi,%r10
  cmp    %r10,%rbx
  mov    $0x58,%ebx
  setb   %r10b
  add    $0x58,%rdx
  test   %rax,%rax
  cmovs  %rbx,%rdx
  add    %rsi,%rdx
  cmp    %rdx,%r9
  seta   %dl
  or     %r10b,%dl
  je     L19
  lea    0x1f(%rdi),%rdx
  sub    %r9,%rdx
  cmp    $0x3e,%rdx
  lea    0x1f(%r9),%rdx
  seta   %r10b
  sub    %r8,%rdx
  cmp    $0x3e,%rdx
  seta   %dl
  test   %dl,%r10b
  je     L19
  movsd  -0x20(%rsp),%xmm11
  movapd %xmm8,%xmm10
  xor    %edx,%edx
  xor    %ebx,%ebx
  movapd %xmm7,%xmm9
  unpcklpd %xmm10,%xmm10
  mov    %rsi,%r10
  unpcklpd %xmm11,%xmm11
  unpcklpd %xmm9,%xmm9
  nopl   0x0(%rax,%rax,1)
L51:
  movupd (%rdi,%rdx,1),%xmm3
  movupd (%r10),%xmm5
  add    $0x1,%ebx
  movupd 0x40(%r10),%xmm15
  movupd 0x20(%r10),%xmm12
  mulpd  %xmm3,%xmm5
  movupd 0x10(%rdi,%rdx,1),%xmm4
  movupd 0x10(%r10),%xmm6
  mulpd  %xmm3,%xmm12
  mulpd  %xmm15,%xmm3
  movupd 0x50(%r10),%xmm15
  mulpd  %xmm4,%xmm6
  addsd  %xmm5,%xmm1
  unpckhpd %xmm5,%xmm5
  addsd  %xmm12,%xmm2
  unpckhpd %xmm12,%xmm12
  addsd  %xmm3,%xmm0
  unpckhpd %xmm3,%xmm3
  addsd  %xmm5,%xmm1
  movupd 0x30(%r10),%xmm5
  addsd  %xmm12,%xmm2
  mulpd  %xmm4,%xmm5
  addsd  %xmm3,%xmm0
  movupd 0x10(%r10),%xmm3
  mulpd  %xmm15,%xmm4
  movupd 0x10(%r8,%rdx,1),%xmm15
  addsd  %xmm6,%xmm1
  unpckhpd %xmm6,%xmm6
  mulpd  %xmm9,%xmm3
  addsd  %xmm6,%xmm1
  movupd (%r8,%rdx,1),%xmm6
  addsd  %xmm5,%xmm2
  unpckhpd %xmm5,%xmm5
  addsd  %xmm4,%xmm0
  unpckhpd %xmm4,%xmm4
  addpd  %xmm15,%xmm3
  movupd 0x30(%r10),%xmm15
  addsd  %xmm5,%xmm2
  movupd 0x20(%r10),%xmm5
  addsd  %xmm4,%xmm0
  movupd (%r10),%xmm4
  mulpd  %xmm10,%xmm15
  mulpd  %xmm10,%xmm5
  mulpd  %xmm9,%xmm4
  addpd  %xmm15,%xmm3
  movupd 0x50(%r10),%xmm15
  addpd  %xmm6,%xmm4
  mulpd  %xmm11,%xmm15
  addpd  %xmm5,%xmm4
  movupd 0x40(%r10),%xmm5
  add    %rax,%r10
  mulpd  %xmm11,%xmm5
  addpd  %xmm15,%xmm3
  movups %xmm3,0x10(%r9,%rdx,1)
  addpd  %xmm5,%xmm4
  movups %xmm4,(%r9,%rdx,1)
  add    $0x20,%rdx
  cmp    %ebx,%ecx
  ja     L51
L101:
  mov    %ecx,%ecx
  lea    0x4(%r12,%r13,4),%r12d
  imul   %rcx,%rax
  shl    $0x5,%rcx
  add    %rcx,%r8
  add    %rcx,%r9
  add    %rcx,%rdi
  add    %rax,%rsi
L92:
  cmp    %r12d,%r11d
  jle    L116
  lea    0x8(%rdi),%rax
  mov    %r11d,%edx
  lea    0x8(%r8),%rcx
  sub    %r12d,%edx
  cmp    %rax,%r9
  setne  %al
  cmp    %rcx,%r9
  setne  %cl
  and    %ecx,%eax
  cmp    $0x1,%edx
  setne  %cl
  test   %cl,%al
  je     L68
  lea    0x8(%rsi),%rcx
  mov    %r9,%rax
  sub    %rcx,%rax
  cmp    $0x40,%rax
  jbe    L68
  movupd (%rdi),%xmm3
  movupd (%rsi),%xmm9
  movapd %xmm7,%xmm6
  mov    %edx,%eax
  movupd 0x40(%rsi),%xmm14
  unpcklpd %xmm6,%xmm6
  movapd %xmm8,%xmm5
  shr    %eax
  mulpd  %xmm3,%xmm9
  unpcklpd %xmm5,%xmm5
  movsd  -0x20(%rsp),%xmm4
  unpcklpd %xmm4,%xmm4
  addsd  %xmm9,%xmm1
  unpckhpd %xmm9,%xmm9
  addsd  %xmm9,%xmm1
  movupd 0x20(%rsi),%xmm9
  mulpd  %xmm3,%xmm9
  mulpd  %xmm14,%xmm3
  movupd (%r8),%xmm14
  addsd  %xmm9,%xmm2
  unpckhpd %xmm9,%xmm9
  addsd  %xmm3,%xmm0
  unpckhpd %xmm3,%xmm3
  addsd  %xmm9,%xmm2
  movupd 0x20(%rsi),%xmm9
  addsd  %xmm3,%xmm0
  movupd (%rsi),%xmm3
  mulpd  %xmm5,%xmm9
  mulpd  %xmm6,%xmm3
  addpd  %xmm14,%xmm3
  addpd  %xmm9,%xmm3
  movupd 0x40(%rsi),%xmm9
  mulpd  %xmm4,%xmm9
  addpd  %xmm9,%xmm3
  movups %xmm3,(%r9)
  cmp    $0x1,%eax
  jne    L199
L84:
  mov    %edx,%ecx
  and    $0xfffffffe,%ecx
  mov    %ecx,%eax
  shl    $0x3,%rax
  add    %rax,%rsi
  add    %rax,%r8
  add    %rax,%r9
  add    %rdi,%rax
  cmp    %ecx,%edx
  je     L116
  movsd  0x20(%rsi),%xmm5
  movsd  (%rsi),%xmm6
  movsd  (%rax),%xmm4
  movsd  0x40(%rsi),%xmm3
  mulsd  %xmm5,%xmm8
  mulsd  %xmm6,%xmm7
  addsd  (%r8),%xmm7
  mulsd  %xmm4,%xmm6
  mulsd  %xmm4,%xmm5
  mulsd  %xmm3,%xmm4
  mulsd  -0x20(%rsp),%xmm3
  addsd  %xmm7,%xmm8
  addsd  %xmm6,%xmm1
  addsd  %xmm5,%xmm2
  addsd  %xmm4,%xmm0
  addsd  %xmm8,%xmm3
  movsd  %xmm3,(%r9)
L116:
  cmpl   $0x1,0x58(%rsp)
  movsd  (%r14),%xmm3
  je     L83
  subsd  %xmm1,%xmm3
  movsd  %xmm3,(%r15)
  movsd  0x8(%r14),%xmm1
  subsd  %xmm2,%xmm1
  movsd  %xmm1,0x8(%r15)
  movsd  0x10(%r14),%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,0x10(%r15)
L10:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L185:
  movsd  (%r8),%xmm0
  movsd  (%rdi),%xmm1
  pxor   %xmm4,%xmm4
  movapd %xmm7,%xmm6
  mulsd  (%rsi),%xmm1
  movsd  %xmm0,(%r9)
  movsd  0x8(%rdi),%xmm2
  movsd  0x8(%rsi),%xmm0
  movapd %xmm2,%xmm9
  mulsd  0x28(%rsi),%xmm2
  mulsd  %xmm0,%xmm9
  addsd  %xmm4,%xmm1
  mulsd  %xmm7,%xmm0
  addsd  0x8(%r8),%xmm0
  addsd  %xmm4,%xmm2
  movsd  %xmm0,0x8(%r9)
  movsd  0x10(%rdi),%xmm0
  movsd  0x30(%rsi),%xmm3
  addsd  %xmm1,%xmm9
  movsd  0x10(%rsi),%xmm1
  movapd %xmm2,%xmm5
  movapd %xmm0,%xmm2
  mulsd  %xmm3,%xmm2
  mulsd  %xmm8,%xmm3
  mulsd  %xmm1,%xmm6
  addsd  0x10(%r8),%xmm6
  mulsd  %xmm0,%xmm1
  mulsd  0x50(%rsi),%xmm0
  addsd  %xmm5,%xmm2
  addsd  %xmm6,%xmm3
  addsd  %xmm9,%xmm1
  addsd  %xmm4,%xmm0
  movsd  %xmm3,0x10(%r9)
  cmp    $0x3,%r11d
  je     L116
  movsd  0x18(%rdi),%xmm4
  movsd  0x18(%rsi),%xmm6
  movapd %xmm7,%xmm9
  movsd  0x38(%rsi),%xmm5
  movsd  0x58(%rsi),%xmm3
  mulsd  %xmm6,%xmm9
  mulsd  %xmm4,%xmm6
  addsd  0x18(%r8),%xmm9
  addsd  %xmm6,%xmm1
  movapd %xmm8,%xmm6
  mulsd  %xmm5,%xmm6
  mulsd  %xmm4,%xmm5
  mulsd  %xmm3,%xmm4
  mulsd  -0x20(%rsp),%xmm3
  addsd  %xmm9,%xmm6
  addsd  %xmm5,%xmm2
  addsd  %xmm4,%xmm0
  addsd  %xmm6,%xmm3
  movsd  %xmm3,0x18(%r9)
  cmp    $0x4,%r11d
  je     L116
  lea    -0x4(,%rax,4),%edx
  add    $0x20,%r8
  add    $0x20,%r9
  add    $0x20,%rdi
  movslq %edx,%rdx
  mov    $0x4,%r12d
  lea    0x20(%rsi,%rdx,8),%rsi
  jmp    L165
  cs nopw 0x0(%rax,%rax,1)
L83:
  addsd  %xmm1,%xmm3
  movsd  %xmm3,(%r15)
  addsd  0x8(%r14),%xmm2
  movsd  %xmm2,0x8(%r15)
  addsd  0x10(%r14),%xmm0
  movsd  %xmm0,0x10(%r15)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L199:
  movupd 0x10(%rdi),%xmm3
  movupd 0x10(%rsi),%xmm9
  movupd 0x50(%rsi),%xmm14
  mulpd  %xmm3,%xmm9
  mulpd  %xmm14,%xmm4
  addsd  %xmm9,%xmm1
  unpckhpd %xmm9,%xmm9
  addsd  %xmm9,%xmm1
  movupd 0x30(%rsi),%xmm9
  mulpd  %xmm3,%xmm9
  mulpd  %xmm14,%xmm3
  addsd  %xmm9,%xmm2
  unpckhpd %xmm9,%xmm9
  addsd  %xmm3,%xmm0
  unpckhpd %xmm3,%xmm3
  addsd  %xmm9,%xmm2
  addsd  %xmm3,%xmm0
  movupd 0x10(%rsi),%xmm3
  mulpd  %xmm6,%xmm3
  movupd 0x10(%r8),%xmm6
  addpd  %xmm6,%xmm3
  movupd 0x30(%rsi),%xmm6
  mulpd  %xmm6,%xmm5
  addpd  %xmm5,%xmm3
  addpd  %xmm4,%xmm3
  movups %xmm3,0x10(%r9)
  jmp    L84
  nopl   0x0(%rax,%rax,1)
L19:
  mov    %ecx,%edx
  mov    %r12d,-0xc(%rsp)
  movsd  -0x20(%rsp),%xmm5
  mov    %rdi,%rbp
  shl    $0x5,%rdx
  movapd %xmm2,%xmm6
  movapd %xmm0,%xmm4
  mov    %r8,%r10
  lea    (%r8,%rdx,1),%rbx
  mov    %rsi,%rdx
  mov    %rbx,-0x18(%rsp)
  mov    -0x18(%rsp),%r12
  mov    %r9,%rbx
  nopl   0x0(%rax,%rax,1)
L60:
  movsd  0x0(%rbp),%xmm0
  movsd  (%rdx),%xmm9
  movapd %xmm7,%xmm10
  add    $0x20,%r10
  movsd  0x20(%rdx),%xmm2
  movsd  0x40(%rdx),%xmm3
  add    $0x20,%rbx
  add    $0x20,%rbp
  mulsd  %xmm9,%xmm10
  mulsd  %xmm0,%xmm9
  addsd  -0x20(%r10),%xmm10
  addsd  %xmm1,%xmm9
  movapd %xmm8,%xmm1
  mulsd  %xmm2,%xmm1
  mulsd  %xmm0,%xmm2
  mulsd  %xmm3,%xmm0
  mulsd  %xmm5,%xmm3
  addsd  %xmm10,%xmm1
  movapd %xmm7,%xmm10
  addsd  %xmm6,%xmm2
  addsd  %xmm0,%xmm4
  addsd  %xmm1,%xmm3
  movsd  %xmm3,-0x20(%rbx)
  movsd  -0x18(%rbp),%xmm0
  movsd  0x8(%rdx),%xmm6
  movsd  0x28(%rdx),%xmm1
  movsd  0x48(%rdx),%xmm3
  mulsd  %xmm6,%xmm10
  mulsd  %xmm0,%xmm6
  addsd  -0x18(%r10),%xmm10
  addsd  %xmm9,%xmm6
  movapd %xmm8,%xmm9
  mulsd  %xmm1,%xmm9
  mulsd  %xmm0,%xmm1
  mulsd  %xmm3,%xmm0
  mulsd  %xmm5,%xmm3
  addsd  %xmm10,%xmm9
  movapd %xmm7,%xmm10
  addsd  %xmm2,%xmm1
  addsd  %xmm0,%xmm4
  addsd  %xmm9,%xmm3
  movsd  %xmm3,-0x18(%rbx)
  movsd  -0x10(%rbp),%xmm0
  movsd  0x10(%rdx),%xmm9
  movsd  0x30(%rdx),%xmm2
  movsd  0x50(%rdx),%xmm3
  mulsd  %xmm9,%xmm10
  mulsd  %xmm0,%xmm9
  addsd  -0x10(%r10),%xmm10
  addsd  %xmm6,%xmm9
  movapd %xmm8,%xmm6
  mulsd  %xmm2,%xmm6
  mulsd  %xmm0,%xmm2
  mulsd  %xmm3,%xmm0
  mulsd  %xmm5,%xmm3
  addsd  %xmm10,%xmm6
  movapd %xmm7,%xmm10
  addsd  %xmm1,%xmm2
  addsd  %xmm4,%xmm0
  addsd  %xmm6,%xmm3
  movsd  %xmm3,-0x10(%rbx)
  movsd  -0x8(%rbp),%xmm4
  movsd  0x18(%rdx),%xmm1
  movsd  0x38(%rdx),%xmm6
  movsd  0x58(%rdx),%xmm3
  add    %rax,%rdx
  mulsd  %xmm1,%xmm10
  mulsd  %xmm4,%xmm1
  addsd  -0x8(%r10),%xmm10
  addsd  %xmm9,%xmm1
  movapd %xmm8,%xmm9
  mulsd  %xmm6,%xmm9
  mulsd  %xmm4,%xmm6
  mulsd  %xmm3,%xmm4
  mulsd  %xmm5,%xmm3
  addsd  %xmm10,%xmm9
  addsd  %xmm2,%xmm6
  addsd  %xmm0,%xmm4
  addsd  %xmm9,%xmm3
  movsd  %xmm3,-0x8(%rbx)
  cmp    %r10,%r12
  jne    L60
  mov    -0xc(%rsp),%r12d
  movapd %xmm6,%xmm2
  movapd %xmm4,%xmm0
  jmp    L101
  nopl   0x0(%rax)
L68:
  movsd  (%rdi),%xmm4
  movsd  (%rsi),%xmm6
  movapd %xmm7,%xmm9
  lea    0x1(%r12),%eax
  movsd  0x20(%rsi),%xmm5
  movsd  0x40(%rsi),%xmm3
  mulsd  %xmm6,%xmm9
  movsd  -0x20(%rsp),%xmm14
  mulsd  %xmm4,%xmm6
  addsd  (%r8),%xmm9
  addsd  %xmm6,%xmm1
  movapd %xmm8,%xmm6
  mulsd  %xmm5,%xmm6
  mulsd  %xmm4,%xmm5
  mulsd  %xmm3,%xmm4
  mulsd  %xmm14,%xmm3
  addsd  %xmm9,%xmm6
  addsd  %xmm5,%xmm2
  addsd  %xmm4,%xmm0
  addsd  %xmm6,%xmm3
  movsd  %xmm3,(%r9)
  cmp    %eax,%r11d
  jle    L116
  movsd  0x8(%rdi),%xmm4
  movsd  0x8(%rsi),%xmm6
  movapd %xmm7,%xmm9
  lea    0x2(%r12),%eax
  movsd  0x28(%rsi),%xmm5
  movsd  0x48(%rsi),%xmm3
  mulsd  %xmm6,%xmm9
  mulsd  %xmm4,%xmm6
  addsd  0x8(%r8),%xmm9
  addsd  %xmm6,%xmm1
  movapd %xmm5,%xmm6
  mulsd  %xmm8,%xmm6
  mulsd  %xmm4,%xmm5
  mulsd  %xmm3,%xmm4
  mulsd  %xmm14,%xmm3
  addsd  %xmm9,%xmm6
  addsd  %xmm5,%xmm2
  addsd  %xmm4,%xmm0
  addsd  %xmm6,%xmm3
  movsd  %xmm3,0x8(%r9)
  cmp    %r11d,%eax
  jge    L116
  movsd  0x10(%rdi),%xmm4
  movsd  0x10(%rsi),%xmm6
  movapd %xmm7,%xmm9
  add    $0x3,%r12d
  movsd  0x30(%rsi),%xmm5
  movsd  0x50(%rsi),%xmm3
  mulsd  %xmm6,%xmm9
  mulsd  %xmm4,%xmm6
  addsd  0x10(%r8),%xmm9
  addsd  %xmm6,%xmm1
  movapd %xmm5,%xmm6
  mulsd  %xmm8,%xmm6
  mulsd  %xmm4,%xmm5
  mulsd  %xmm3,%xmm4
  mulsd  %xmm14,%xmm3
  addsd  %xmm9,%xmm6
  addsd  %xmm5,%xmm2
  addsd  %xmm4,%xmm0
  addsd  %xmm6,%xmm3
  movsd  %xmm3,0x10(%r9)
  cmp    %r12d,%r11d
  jle    L116
  movsd  0x18(%rdi),%xmm3
  movsd  0x18(%rsi),%xmm5
  movsd  0x38(%rsi),%xmm4
  movsd  0x58(%rsi),%xmm6
  mulsd  %xmm5,%xmm7
  mulsd  %xmm4,%xmm8
  addsd  0x18(%r8),%xmm7
  mulsd  %xmm3,%xmm5
  mulsd  %xmm3,%xmm4
  mulsd  %xmm6,%xmm3
  addsd  %xmm7,%xmm8
  addsd  %xmm5,%xmm1
  addsd  %xmm4,%xmm2
  addsd  %xmm3,%xmm0
  movapd %xmm14,%xmm3
  mulsd  %xmm6,%xmm3
  addsd  %xmm8,%xmm3
  movsd  %xmm3,0x18(%r9)
  jmp    L116
```

tool_calls: name: read_data
arguments: tag: D7
type: byte[8]

tool: {"D7": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

assistant: ```c
void kernel_dsymv_3_lib4(int kmax, double *A, int sda, double *x_n, double *y_n, double *z_n, double *x_t, double *y_t, double *z_t, int tri, int alg) {
  if (kmax <= 0)
    return;
  const int bs = 4;
  int k;
  double a_00, a_01, a_02, x_n_0, x_n_1, x_n_2, y_n_0, x_t_0, y_t_0, y_t_1, y_t_2;
  if (alg == 1) {
    x_n_0 = x_n[0];
    x_n_1 = x_n[1];
    x_n_2 = x_n[2];
  } else {
    x_n_0 = -x_n[0];
    x_n_1 = -x_n[1];
    x_n_2 = -x_n[2];
  }
  y_t_0 = 0;
  y_t_1 = 0;
  y_t_2 = 0;
  k = 0;
  if (tri == 1) {
    y_n_0 = y_n[0];
    x_t_0 = x_t[0];
    a_00 = A[0 + bs * 0];
    y_t_0 += a_00 * x_t_0;
    z_n[0] = y_n_0;
    y_n_0 = y_n[1];
    x_t_0 = x_t[1];
    a_00 = A[1 + bs * 0];
    a_01 = A[1 + bs * 1];
    y_n_0 += a_00 * x_n_0;
    y_t_0 += a_00 * x_t_0;
    y_t_1 += a_01 * x_t_0;
    z_n[1] = y_n_0;
    y_n_0 = y_n[2];
    x_t_0 = x_t[2];
    a_00 = A[2 + bs * 0];
    a_01 = A[2 + bs * 1];
    a_02 = A[2 + bs * 2];
    y_n_0 += a_00 * x_n_0;
    y_t_0 += a_00 * x_t_0;
    y_n_0 += a_01 * x_n_1;
    y_t_1 += a_01 * x_t_0;
    y_t_2 += a_02 * x_t_0;
    z_n[2] = y_n_0;
    if (kmax == 3)
      goto STORE_3;
    y_n_0 = y_n[3];
    x_t_0 = x_t[3];
    a_00 = A[3 + bs * 0];
    a_01 = A[3 + bs * 1];
    a_02 = A[3 + bs * 2];
    y_n_0 += a_00 * x_n_0;
    y_t_0 += a_00 * x_t_0;
    y_n_0 += a_01 * x_n_1;
    y_t_1 += a_01 * x_t_0;
    y_n_0 += a_02 * x_n_2;
    y_t_2 += a_02 * x_t_0;
    z_n[3] = y_n_0;
    if (kmax == 4)
      goto STORE_3;
    A += 4;
    y_n += 4;
    z_n += 4;
    x_t += 4;
    k += 4;
    A += (sda - 1) * bs;
  }
  for (; k < kmax - 3; k += bs) {
    y_n_0 = y_n[0];
    x_t_0 = x_t[0];
    a_00 = A[0 + bs * 0];
    a_01 = A[0 + bs * 1];
    a_02 = A[0 + bs * 2];
    y_n_0 += a_00 * x_n_0;
    y_t_0 += a_00 * x_t_0;
    y_n_0 += a_01 * x_n_1;
    y_t_1 += a_01 * x_t_0;
    y_n_0 += a_02 * x_n_2;
    y_t_2 += a_02 * x_t_0;
    z_n[0] = y_n_0;
    y_n_0 = y_n[1];
    x_t_0 = x_t[1];
    a_00 = A[1 + bs * 0];
    a_01 = A[1 + bs * 1];
    a_02 = A[1 + bs * 2];
    y_n_0 += a_00 * x_n_0;
    y_t_0 += a_00 * x_t_0;
    y_n_0 += a_01 * x_n_1;
    y_t_1 += a_01 * x_t_0;
    y_n_0 += a_02 * x_n_2;
    y_t_2 += a_02 * x_t_0;
    z_n[1] = y_n_0;
    y_n_0 = y_n[2];
    x_t_0 = x_t[2];
    a_00 = A[2 + bs * 0];
    a_01 = A[2 + bs * 1];
    a_02 = A[2 + bs * 2];
    y_n_0 += a_00 * x_n_0;
    y_t_0 += a_00 * x_t_0;
    y_n_0 += a_01 * x_n_1;
    y_t_1 += a_01 * x_t_0;
    y_n_0 += a_02 * x_n_2;
    y_t_2 += a_02 * x_t_0;
    z_n[2] = y_n_0;
    y_n_0 = y_n[3];
    x_t_0 = x_t[3];
    a_00 = A[3 + bs * 0];
    a_01 = A[3 + bs * 1];
    a_02 = A[3 + bs * 2];
    y_n_0 += a_00 * x_n_0;
    y_t_0 += a_00 * x_t_0;
    y_n_0 += a_01 * x_n_1;
    y_t_1 += a_01 * x_t_0;
    y_n_0 += a_02 * x_n_2;
    y_t_2 += a_02 * x_t_0;
    z_n[3] = y_n_0;
    A += sda * bs;
    y_n += 4;
    z_n += 4;
    x_t += 4;
  }
  for (; k < kmax; k++) {
    y_n_0 = y_n[0];
    x_t_0 = x_t[0];
    a_00 = A[0 + bs * 0];
    a_01 = A[0 + bs * 1];
    a_02 = A[0 + bs * 2];
    y_n_0 += a_00 * x_n_0;
    y_t_0 += a_00 * x_t_0;
    y_n_0 += a_01 * x_n_1;
    y_t_1 += a_01 * x_t_0;
    y_n_0 += a_02 * x_n_2;
    y_t_2 += a_02 * x_t_0;
    z_n[0] = y_n_0;
    A += 1;
    y_n += 1;
    z_n += 1;
    x_t += 1;
  }
STORE_3:
  if (alg == 1) {
    z_t[0] = y_t[0] + y_t_0;
    z_t[1] = y_t[1] + y_t_1;
    z_t[2] = y_t[2] + y_t_2;
  } else {
    z_t[0] = y_t[0] - y_t_0;
    z_t[1] = y_t[1] - y_t_1;
    z_t[2] = y_t[2] - y_t_2;
  }
}
```