user: Translate the below assembly code into C programming language:

```asm
<kernel_dgemv_t_4_lib4>:
  endbr64
  push   %rbp
  push   %rbx
  mov    0x18(%rsp),%r11d
  test   %edi,%edi
  jle    L79
  cmp    $0x3,%edi
  jle    L35
  shl    $0x2,%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  lea    -0x4(%rdi),%ebx
  shr    $0x2,%ebx
  lea    0x1(%rbx),%ebp
  mov    %ebp,%ebp
  mov    %rbp,%r10
  shl    $0x5,%r10
  add    %rcx,%r10
  mov    %rsi,%rax
  pxor   %xmm8,%xmm8
  movapd %xmm8,%xmm4
  movapd %xmm8,%xmm5
  movapd %xmm8,%xmm6
L72:
  movsd  (%rcx),%xmm2
  movsd  0x8(%rcx),%xmm1
  movsd  0x10(%rcx),%xmm0
  movsd  0x18(%rcx),%xmm3
  movapd %xmm2,%xmm7
  mulsd  (%rax),%xmm7
  addsd  %xmm6,%xmm7
  movapd %xmm2,%xmm6
  mulsd  0x20(%rax),%xmm6
  addsd  %xmm5,%xmm6
  movapd %xmm2,%xmm5
  mulsd  0x40(%rax),%xmm5
  addsd  %xmm4,%xmm5
  mulsd  0x60(%rax),%xmm2
  addsd  %xmm8,%xmm2
  movapd %xmm1,%xmm4
  mulsd  0x8(%rax),%xmm4
  addsd  %xmm7,%xmm4
  movapd %xmm1,%xmm7
  mulsd  0x28(%rax),%xmm7
  addsd  %xmm6,%xmm7
  movapd %xmm1,%xmm6
  mulsd  0x48(%rax),%xmm6
  addsd  %xmm5,%xmm6
  mulsd  0x68(%rax),%xmm1
  addsd  %xmm2,%xmm1
  movapd %xmm0,%xmm5
  mulsd  0x10(%rax),%xmm5
  addsd  %xmm4,%xmm5
  movapd %xmm0,%xmm4
  mulsd  0x30(%rax),%xmm4
  addsd  %xmm7,%xmm4
  movapd %xmm0,%xmm2
  mulsd  0x50(%rax),%xmm2
  addsd  %xmm6,%xmm2
  mulsd  0x70(%rax),%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm3,%xmm6
  mulsd  0x18(%rax),%xmm6
  addsd  %xmm5,%xmm6
  movapd %xmm3,%xmm5
  mulsd  0x38(%rax),%xmm5
  addsd  %xmm4,%xmm5
  movapd %xmm3,%xmm4
  mulsd  0x58(%rax),%xmm4
  addsd  %xmm2,%xmm4
  mulsd  0x78(%rax),%xmm3
  addsd  %xmm0,%xmm3
  movapd %xmm3,%xmm8
  add    %rdx,%rax
  add    $0x20,%rcx
  cmp    %r10,%rcx
  jne    L72
  imul   %rbp,%rdx
  add    %rdx,%rsi
  lea    0x4(,%rbx,4),%ecx
  cmp    %ecx,%edi
  jle    L34
L53:
  mov    $0x0,%eax
L12:
  movsd  (%r10,%rax,8),%xmm0
  movapd %xmm0,%xmm1
  mulsd  (%rsi,%rax,8),%xmm1
  addsd  %xmm1,%xmm6
  movapd %xmm0,%xmm1
  mulsd  0x20(%rsi,%rax,8),%xmm1
  addsd  %xmm1,%xmm5
  movapd %xmm0,%xmm1
  mulsd  0x40(%rsi,%rax,8),%xmm1
  addsd  %xmm1,%xmm4
  mulsd  0x60(%rsi,%rax,8),%xmm0
  addsd  %xmm0,%xmm8
  add    $0x1,%rax
  lea    (%rcx,%rax,1),%edx
  cmp    %edx,%edi
  jg     L12
L34:
  test   %r11d,%r11d
  jne    L20
  movsd  %xmm6,(%r8)
  movsd  %xmm5,0x8(%r8)
  movsd  %xmm4,0x10(%r8)
  movsd  %xmm8,0x18(%r8)
L79:
  pop    %rbx
  pop    %rbp
  ret
L35:
  mov    %rcx,%r10
  pxor   %xmm8,%xmm8
  movapd %xmm8,%xmm4
  movapd %xmm8,%xmm5
  movapd %xmm8,%xmm6
  mov    $0x0,%ecx
  jmp    L53
L20:
  cmp    $0x1,%r11d
  je     L42
  movsd  (%r8),%xmm0
  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)
  jmp    L79
L42:
  addsd  (%r8),%xmm6
  movsd  %xmm6,(%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)
  jmp    L79
```

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;
  }
}
```