user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<kernel_dgemv_t_4_lib4>:
  endbr64
  push   %rbp
  push   %rbx
  mov    0x18(%rsp),%r11d
  test   %edi,%edi
  jle    L76
  cmp    $0x3,%edi
  jle    L62
  lea    -0x4(%rdi),%ebx
  shl    $0x2,%edx
  pxor   %xmm8,%xmm8
  mov    %rsi,%rax
  shr    $0x2,%ebx
  movapd %xmm8,%xmm4
  movapd %xmm8,%xmm5
  movslq %edx,%rdx
  lea    0x1(%rbx),%ebp
  shl    $0x3,%rdx
  movapd %xmm8,%xmm6
  mov    %rbp,%r10
  mov    %rbp,%rbx
  shl    $0x5,%r10
  add    %rcx,%r10
  nopl   0x0(%rax,%rax,1)
L45:
  movsd  (%rcx),%xmm2
  movsd  (%rax),%xmm7
  add    $0x20,%rcx
  movsd  -0x18(%rcx),%xmm1
  movsd  -0x10(%rcx),%xmm0
  mulsd  %xmm2,%xmm7
  movsd  -0x8(%rcx),%xmm3
  addsd  %xmm6,%xmm7
  movsd  0x20(%rax),%xmm6
  mulsd  %xmm2,%xmm6
  addsd  %xmm5,%xmm6
  movsd  0x40(%rax),%xmm5
  mulsd  %xmm2,%xmm5
  mulsd  0x60(%rax),%xmm2
  addsd  %xmm4,%xmm5
  movsd  0x8(%rax),%xmm4
  addsd  %xmm8,%xmm2
  mulsd  %xmm1,%xmm4
  addsd  %xmm7,%xmm4
  movsd  0x28(%rax),%xmm7
  mulsd  %xmm1,%xmm7
  addsd  %xmm6,%xmm7
  movsd  0x48(%rax),%xmm6
  mulsd  %xmm1,%xmm6
  mulsd  0x68(%rax),%xmm1
  addsd  %xmm5,%xmm6
  movsd  0x10(%rax),%xmm5
  addsd  %xmm2,%xmm1
  movsd  0x50(%rax),%xmm2
  mulsd  %xmm0,%xmm5
  mulsd  %xmm0,%xmm2
  addsd  %xmm4,%xmm5
  movsd  0x30(%rax),%xmm4
  addsd  %xmm6,%xmm2
  movsd  0x18(%rax),%xmm6
  mulsd  %xmm0,%xmm4
  mulsd  %xmm3,%xmm6
  mulsd  0x70(%rax),%xmm0
  addsd  %xmm7,%xmm4
  addsd  %xmm5,%xmm6
  movsd  0x38(%rax),%xmm5
  addsd  %xmm1,%xmm0
  mulsd  %xmm3,%xmm5
  addsd  %xmm4,%xmm5
  movsd  0x58(%rax),%xmm4
  mulsd  %xmm3,%xmm4
  mulsd  0x78(%rax),%xmm3
  add    %rdx,%rax
  addsd  %xmm2,%xmm4
  addsd  %xmm0,%xmm3
  movapd %xmm3,%xmm8
  cmp    %r10,%rcx
  jne    L45
  imul   %rbp,%rdx
  add    %rdx,%rsi
  lea    0x0(,%rbx,4),%edx
  cmp    %edx,%edi
  jle    L11
L30:
  xor    %eax,%eax
L55:
  movsd  (%r10,%rax,8),%xmm0
  movsd  (%rsi,%rax,8),%xmm1
  mulsd  %xmm0,%xmm1
  addsd  %xmm1,%xmm6
  movsd  0x20(%rsi,%rax,8),%xmm1
  mulsd  %xmm0,%xmm1
  addsd  %xmm1,%xmm5
  movsd  0x40(%rsi,%rax,8),%xmm1
  mulsd  %xmm0,%xmm1
  mulsd  0x60(%rsi,%rax,8),%xmm0
  add    $0x1,%rax
  lea    (%rdx,%rax,1),%ecx
  addsd  %xmm1,%xmm4
  addsd  %xmm0,%xmm8
  cmp    %ecx,%edi
  jg     L55
L11:
  test   %r11d,%r11d
  je     L39
  movsd  (%r8),%xmm0
  cmp    $0x1,%r11d
  je     L77
  subsd  %xmm6,%xmm0
  movsd  %xmm0,(%r9)
  movsd  0x8(%r8),%xmm0
  subsd  %xmm5,%xmm0
  movsd  %xmm0,0x8(%r9)
  movsd  0x10(%r8),%xmm0
  subsd  %xmm4,%xmm0
  movsd  %xmm0,0x10(%r9)
  movsd  0x18(%r8),%xmm0
  subsd  %xmm8,%xmm0
  movsd  %xmm0,0x18(%r9)
L76:
  pop    %rbx
  pop    %rbp
  ret
  cs nopw 0x0(%rax,%rax,1)
L39:
  pop    %rbx
  movsd  %xmm6,(%r8)
  pop    %rbp
  movsd  %xmm5,0x8(%r8)
  movsd  %xmm4,0x10(%r8)
  movsd  %xmm8,0x18(%r8)
  ret
  nopw   0x0(%rax,%rax,1)
L77:
  addsd  %xmm6,%xmm0
  pop    %rbx
  pop    %rbp
  movsd  %xmm0,(%r9)
  addsd  0x8(%r8),%xmm5
  movsd  %xmm5,0x8(%r9)
  addsd  0x10(%r8),%xmm4
  movsd  %xmm4,0x10(%r9)
  addsd  0x18(%r8),%xmm8
  movsd  %xmm8,0x18(%r9)
  ret
L62:
  pxor   %xmm8,%xmm8
  mov    %rcx,%r10
  xor    %edx,%edx
  movapd %xmm8,%xmm4
  movapd %xmm8,%xmm5
  movapd %xmm8,%xmm6
  jmp    L30
```

assistant: ```c
void kernel_dgemv_t_4_lib4(int kmax, double *A, int sda, double *x, double *y, double *z, int alg) {
  if (kmax <= 0)
    return;
  const int lda = 4;
  const int bs = 4;
  int k, ka = kmax;
  double x_0, x_1, x_2, x_3, y_0 = 0, y_1 = 0, y_2 = 0, y_3 = 0;
  k = 0;
  for (; k < ka - bs + 1; k += bs) {
    x_0 = x[0];
    x_1 = x[1];
    x_2 = x[2];
    x_3 = x[3];
    y_0 += A[0 + lda * 0] * x_0;
    y_1 += A[0 + lda * 1] * x_0;
    y_2 += A[0 + lda * 2] * x_0;
    y_3 += A[0 + lda * 3] * x_0;
    y_0 += A[1 + lda * 0] * x_1;
    y_1 += A[1 + lda * 1] * x_1;
    y_2 += A[1 + lda * 2] * x_1;
    y_3 += A[1 + lda * 3] * x_1;
    y_0 += A[2 + lda * 0] * x_2;
    y_1 += A[2 + lda * 1] * x_2;
    y_2 += A[2 + lda * 2] * x_2;
    y_3 += A[2 + lda * 3] * x_2;
    y_0 += A[3 + lda * 0] * x_3;
    y_1 += A[3 + lda * 1] * x_3;
    y_2 += A[3 + lda * 2] * x_3;
    y_3 += A[3 + lda * 3] * x_3;
    A += sda * bs;
    x += 4;
  }
  for (; k < ka; k++) {
    x_0 = x[0];
    y_0 += A[0 + lda * 0] * x_0;
    y_1 += A[0 + lda * 1] * x_0;
    y_2 += A[0 + lda * 2] * x_0;
    y_3 += A[0 + lda * 3] * x_0;
    A += 1;
    x += 1;
  }
  if (alg == 0) {
    y[0] = y_0;
    y[1] = y_1;
    y[2] = y_2;
    y[3] = y_3;
  } else if (alg == 1) {
    z[0] = y[0] + y_0;
    z[1] = y[1] + y_1;
    z[2] = y[2] + y_2;
    z[3] = y[3] + y_3;
  } else {
    z[0] = y[0] - y_0;
    z[1] = y[1] - y_1;
    z[2] = y[2] - y_2;
    z[3] = y[3] - y_3;
  }
}
```