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

```asm
<kernel_sgemv_t_4_vs_lib4>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    0x20(%rsp),%r11
  mov    0x28(%rsp),%ebx
  test   %edi,%edi
  jle    L6
  cmp    $0x3,%edi
  jle    L77
  shl    $0x2,%edx
  movslq %edx,%rdx
  shl    $0x2,%rdx
  lea    -0x4(%rdi),%ebp
  shr    $0x2,%ebp
  lea    0x1(%rbp),%r12d
  mov    %r12d,%r12d
  mov    %r12,%r10
  shl    $0x4,%r10
  add    %rcx,%r10
  mov    %rsi,%rax
  pxor   %xmm8,%xmm8
  movaps %xmm8,%xmm6
  movaps %xmm8,%xmm5
  movaps %xmm8,%xmm4
L118:
  movss  (%rcx),%xmm2
  movss  0x4(%rcx),%xmm1
  movss  0x8(%rcx),%xmm0
  movss  0xc(%rcx),%xmm3
  movaps %xmm2,%xmm7
  mulss  (%rax),%xmm7
  addss  %xmm4,%xmm7
  movaps %xmm2,%xmm4
  mulss  0x10(%rax),%xmm4
  addss  %xmm5,%xmm4
  movaps %xmm2,%xmm5
  mulss  0x20(%rax),%xmm5
  addss  %xmm6,%xmm5
  mulss  0x30(%rax),%xmm2
  addss  %xmm8,%xmm2
  movaps %xmm1,%xmm6
  mulss  0x4(%rax),%xmm6
  addss  %xmm7,%xmm6
  movaps %xmm1,%xmm7
  mulss  0x14(%rax),%xmm7
  addss  %xmm4,%xmm7
  movaps %xmm1,%xmm4
  mulss  0x24(%rax),%xmm4
  addss  %xmm5,%xmm4
  mulss  0x34(%rax),%xmm1
  addss  %xmm2,%xmm1
  movaps %xmm0,%xmm5
  mulss  0x8(%rax),%xmm5
  addss  %xmm6,%xmm5
  movaps %xmm0,%xmm6
  mulss  0x18(%rax),%xmm6
  addss  %xmm7,%xmm6
  movaps %xmm0,%xmm2
  mulss  0x28(%rax),%xmm2
  addss  %xmm4,%xmm2
  mulss  0x38(%rax),%xmm0
  addss  %xmm1,%xmm0
  movaps %xmm3,%xmm4
  mulss  0xc(%rax),%xmm4
  addss  %xmm5,%xmm4
  movaps %xmm3,%xmm5
  mulss  0x1c(%rax),%xmm5
  addss  %xmm6,%xmm5
  movaps %xmm3,%xmm6
  mulss  0x2c(%rax),%xmm6
  addss  %xmm2,%xmm6
  mulss  0x3c(%rax),%xmm3
  addss  %xmm0,%xmm3
  movaps %xmm3,%xmm8
  add    %rdx,%rax
  add    $0x10,%rcx
  cmp    %r10,%rcx
  jne    L118
  imul   %r12,%rdx
  add    %rdx,%rsi
  lea    0x4(,%rbp,4),%ecx
  cmp    %ecx,%edi
  jle    L54
L24:
  mov    $0x0,%eax
L73:
  movss  (%r10,%rax,4),%xmm0
  movaps %xmm0,%xmm1
  mulss  (%rsi,%rax,4),%xmm1
  addss  %xmm1,%xmm4
  movaps %xmm0,%xmm1
  mulss  0x10(%rsi,%rax,4),%xmm1
  addss  %xmm1,%xmm5
  movaps %xmm0,%xmm1
  mulss  0x20(%rsi,%rax,4),%xmm1
  addss  %xmm1,%xmm6
  mulss  0x30(%rsi,%rax,4),%xmm0
  addss  %xmm0,%xmm8
  add    $0x1,%rax
  lea    (%rcx,%rax,1),%edx
  cmp    %edx,%edi
  jg     L73
L54:
  test   %r8d,%r8d
  je     L120
  cmp    $0x1,%r8d
  je     L116
  movss  (%r9),%xmm0
  subss  %xmm4,%xmm0
  movaps %xmm0,%xmm4
  movss  0x4(%r9),%xmm0
  subss  %xmm5,%xmm0
  movaps %xmm0,%xmm5
  movss  0x8(%r9),%xmm0
  subss  %xmm6,%xmm0
  movaps %xmm0,%xmm6
  movss  0xc(%r9),%xmm0
  subss  %xmm8,%xmm0
  movaps %xmm0,%xmm8
L120:
  cmp    $0x3,%ebx
  jle    L23
  movss  %xmm4,(%r11)
  movss  %xmm5,0x4(%r11)
  movss  %xmm6,0x8(%r11)
  movss  %xmm8,0xc(%r11)
L6:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L77:
  mov    %rcx,%r10
  pxor   %xmm8,%xmm8
  movaps %xmm8,%xmm6
  movaps %xmm8,%xmm5
  movaps %xmm8,%xmm4
  mov    $0x0,%ecx
  jmp    L24
L116:
  addss  (%r9),%xmm4
  addss  0x4(%r9),%xmm5
  addss  0x8(%r9),%xmm6
  addss  0xc(%r9),%xmm8
  jmp    L120
L23:
  movss  %xmm4,(%r11)
  cmp    $0x1,%ebx
  jle    L6
  movss  %xmm5,0x4(%r11)
  cmp    $0x3,%ebx
  jne    L6
  movss  %xmm6,0x8(%r11)
  jmp    L6
```

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