user: 请从给定的汇编指令推导出C源代码:

```asm
<kernel_sgemv_t_1_lib4>:
  endbr64
  push   %rbp
  mov    %edi,%r11d
  push   %rbx
  mov    0x18(%rsp),%ebx
  test   %edi,%edi
  jle    L200
  mov    %esi,%edi
  pxor   %xmm2,%xmm2
  mov    %rdx,%rsi
  mov    %ecx,%edx
  sub    %edi,%r11d
  test   %edi,%edi
  jle    L148
  lea    -0x1(%rdi),%eax
  cmp    $0x2,%eax
  jbe    L11
  mov    %edi,%ecx
  xor    %eax,%eax
  shr    $0x2,%ecx
  shl    $0x4,%rcx
  nopw   0x0(%rax,%rax,1)
L124:
  movups (%r8,%rax,1),%xmm0
  movups (%rsi,%rax,1),%xmm4
  add    $0x10,%rax
  mulps  %xmm4,%xmm0
  movaps %xmm0,%xmm1
  addss  %xmm2,%xmm1
  movaps %xmm0,%xmm2
  shufps $0x55,%xmm0,%xmm2
  addss  %xmm2,%xmm1
  movaps %xmm0,%xmm2
  unpckhps %xmm0,%xmm2
  shufps $0xff,%xmm0,%xmm0
  addss  %xmm2,%xmm1
  addss  %xmm0,%xmm1
  movaps %xmm1,%xmm2
  cmp    %rcx,%rax
  jne    L124
  mov    %edi,%ecx
  and    $0xfffffffc,%ecx
  mov    %ecx,%eax
  shl    $0x2,%rax
  lea    (%rsi,%rax,1),%r10
  add    %r8,%rax
  cmp    %ecx,%edi
  je     L174
L18:
  movss  (%r10),%xmm0
  mulss  (%rax),%xmm0
  lea    0x1(%rcx),%ebp
  addss  %xmm0,%xmm2
  cmp    %ebp,%edi
  jle    L174
  movss  0x4(%rax),%xmm0
  mulss  0x4(%r10),%xmm0
  add    $0x2,%ecx
  addss  %xmm0,%xmm2
  cmp    %ecx,%edi
  jle    L174
  movss  0x8(%rax),%xmm0
  mulss  0x8(%r10),%xmm0
  addss  %xmm0,%xmm2
L174:
  lea    -0x4(,%rdx,4),%eax
  shl    $0x2,%rdi
  cltq
  add    %rdi,%r8
  lea    (%rdi,%rax,4),%rax
  add    %rax,%rsi
L148:
  cmp    $0x3,%r11d
  jle    L149
  lea    -0x4(%r11),%r10d
  lea    0x0(,%rdx,4),%ecx
  mov    $0x0,%eax
  mov    %r10d,%ebp
  movslq %ecx,%rcx
  shr    $0x2,%ebp
  shl    $0x2,%rcx
  add    $0x1,%ebp
  cmp    $0x1,%edx
  mov    %rsi,%rdx
  jne    L125
L73:
  mov    %rax,%rdi
  movups (%rdx),%xmm3
  add    $0x1,%rax
  add    %rcx,%rdx
  shl    $0x4,%rdi
  movups (%r8,%rdi,1),%xmm0
  mulps  %xmm3,%xmm0
  movaps %xmm0,%xmm1
  addss  %xmm2,%xmm1
  movaps %xmm0,%xmm2
  shufps $0x55,%xmm0,%xmm2
  addss  %xmm2,%xmm1
  movaps %xmm0,%xmm2
  unpckhps %xmm0,%xmm2
  shufps $0xff,%xmm0,%xmm0
  addss  %xmm2,%xmm1
  addss  %xmm0,%xmm1
  movaps %xmm1,%xmm2
  cmp    %eax,%ebp
  ja     L73
L25:
  shr    $0x2,%r10d
  lea    0x1(%r10),%edx
  imul   %rdx,%rcx
  mov    %rdx,%rax
  shl    $0x4,%rdx
  add    %rdx,%r8
  shl    $0x2,%eax
  add    %rcx,%rsi
L86:
  cmp    %eax,%r11d
  jle    L176
  mov    %r11d,%ecx
  sub    %eax,%ecx
  lea    -0x1(%rcx),%edx
  cmp    $0x2,%edx
  jbe    L122
  movups (%r8),%xmm0
  movups (%rsi),%xmm6
  mov    %ecx,%edi
  and    $0xfffffffc,%edi
  mulps  %xmm6,%xmm0
  mov    %edi,%edx
  add    %edi,%eax
  shl    $0x2,%rdx
  add    %rdx,%rsi
  add    %rdx,%r8
  movaps %xmm0,%xmm1
  addss  %xmm2,%xmm1
  movaps %xmm0,%xmm2
  shufps $0x55,%xmm0,%xmm2
  addss  %xmm2,%xmm1
  movaps %xmm0,%xmm2
  unpckhps %xmm0,%xmm2
  shufps $0xff,%xmm0,%xmm0
  addss  %xmm2,%xmm1
  addss  %xmm0,%xmm1
  movaps %xmm1,%xmm2
  cmp    %edi,%ecx
  je     L176
L122:
  movss  (%r8),%xmm0
  mulss  (%rsi),%xmm0
  lea    0x1(%rax),%edx
  addss  %xmm0,%xmm2
  cmp    %edx,%r11d
  jle    L176
  movss  0x4(%r8),%xmm0
  mulss  0x4(%rsi),%xmm0
  add    $0x2,%eax
  addss  %xmm0,%xmm2
  cmp    %eax,%r11d
  jle    L176
  movss  0x8(%r8),%xmm0
  mulss  0x8(%rsi),%xmm0
  addss  %xmm0,%xmm2
L176:
  test   %ebx,%ebx
  je     L35
  movss  (%r9),%xmm0
  cmp    $0x1,%ebx
  je     L16
  subss  %xmm2,%xmm0
  movss  %xmm0,(%r9)
L200:
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L125:
  mov    %rax,%rdi
  movups (%rdx),%xmm5
  add    $0x1,%rax
  add    %rcx,%rdx
  shl    $0x4,%rdi
  movups (%r8,%rdi,1),%xmm0
  mulps  %xmm5,%xmm0
  movaps %xmm0,%xmm1
  addss  %xmm2,%xmm1
  movaps %xmm0,%xmm2
  shufps $0x55,%xmm0,%xmm2
  addss  %xmm2,%xmm1
  movaps %xmm0,%xmm2
  unpckhps %xmm0,%xmm2
  shufps $0xff,%xmm0,%xmm0
  addss  %xmm2,%xmm1
  addss  %xmm0,%xmm1
  movaps %xmm1,%xmm2
  cmp    %eax,%ebp
  ja     L125
  jmp    L25
  nopl   0x0(%rax)
L35:
  pop    %rbx
  movss  %xmm2,(%r9)
  pop    %rbp
  ret
L16:
  addss  %xmm2,%xmm0
  pop    %rbx
  pop    %rbp
  movss  %xmm0,(%r9)
  ret
  nopl   0x0(%rax)
L149:
  xor    %eax,%eax
  jmp    L86
L11:
  mov    %r8,%rax
  mov    %rsi,%r10
  xor    %ecx,%ecx
  jmp    L18
```

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