user: 请将以下的汇编代码转换成C语言代码：

```asm
<kernel_sgemv_n_1_lib8>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8d,-0x28(%rbp)
  cmpl   $0x0,-0x24(%rbp)
  jle    L12
  movl   $0x8,-0x14(%rbp)
  pxor   %xmm0,%xmm0
  movss  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L81
L98:
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x10(%rbp)
  mov    -0x38(%rbp),%rax
  movss  0x4(%rax),%xmm0
  movss  %xmm0,-0xc(%rbp)
  mov    -0x38(%rbp),%rax
  movss  0x8(%rax),%xmm0
  movss  %xmm0,-0x8(%rbp)
  mov    -0x38(%rbp),%rax
  movss  0xc(%rax),%xmm0
  movss  %xmm0,-0x4(%rbp)
  mov    -0x30(%rbp),%rax
  movss  (%rax),%xmm0
  mulss  -0x10(%rbp),%xmm0
  movss  -0x18(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  -0xc(%rbp),%xmm0
  movss  -0x18(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x14(%rbp),%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  -0x8(%rbp),%xmm0
  movss  -0x18(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x14(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movss  (%rax),%xmm0
  mulss  -0x4(%rbp),%xmm0
  movss  -0x18(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x14(%rbp),%eax
  shl    $0x2,%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x30(%rbp)
  addq   $0x10,-0x38(%rbp)
  addl   $0x4,-0x1c(%rbp)
L81:
  mov    -0x24(%rbp),%eax
  sub    $0x3,%eax
  cmp    %eax,-0x1c(%rbp)
  jl     L98
  jmp    L36
L20:
  mov    -0x38(%rbp),%rax
  movss  (%rax),%xmm0
  movss  %xmm0,-0x10(%rbp)
  mov    -0x30(%rbp),%rax
  movss  (%rax),%xmm0
  mulss  -0x10(%rbp),%xmm0
  movss  -0x18(%rbp),%xmm1
  addss  %xmm1,%xmm0
  movss  %xmm0,-0x18(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x2,%rax
  add    %rax,-0x30(%rbp)
  addq   $0x4,-0x38(%rbp)
  addl   $0x1,-0x1c(%rbp)
L36:
  mov    -0x1c(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L20
  cmpl   $0x0,-0x28(%rbp)
  jne    L40
  mov    -0x40(%rbp),%rax
  movss  -0x18(%rbp),%xmm0
  movss  %xmm0,(%rax)
  jmp    L93
L40:
  cmpl   $0x1,-0x28(%rbp)
  jne    L10
  mov    -0x40(%rbp),%rax
  movss  (%rax),%xmm0
  addss  -0x18(%rbp),%xmm0
  mov    -0x40(%rbp),%rax
  movss  %xmm0,(%rax)
  jmp    L93
L10:
  mov    -0x40(%rbp),%rax
  movss  (%rax),%xmm0
  subss  -0x18(%rbp),%xmm0
  mov    -0x40(%rbp),%rax
  movss  %xmm0,(%rax)
  jmp    L93
L12:
  nop
L93:
  pop    %rbp
  ret
```

assistant: ```c
void kernel_sgemv_n_1_lib8(int kmax, float *A, float *x, float *y, int alg) {
  if (kmax <= 0)
    return;
  const int lda = 8;
  int k;
  float x_0, x_1, x_2, x_3, y_0 = 0;
  k = 0;
  for (; k < kmax - 3; k += 4) {
    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_0 += A[0 + lda * 1] * x_1;
    y_0 += A[0 + lda * 2] * x_2;
    y_0 += A[0 + lda * 3] * x_3;
    A += 4 * lda;
    x += 4;
  }
  for (; k < kmax; k++) {
    x_0 = x[0];
    y_0 += A[0 + lda * 0] * x_0;
    A += 1 * lda;
    x += 1;
  }
  if (alg == 0) {
    y[0] = y_0;
  } else if (alg == 1) {
    y[0] += y_0;
  } else {
    y[0] -= y_0;
  }
}
```