user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<kernel_sgemv_t_3_lib4>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    0x38(%rsp),%r13d
  test   %edi,%edi
  jle    L181
  mov    %ecx,%eax
  mov    %edi,%ecx
  sub    %esi,%ecx
  test   %esi,%esi
  jle    L211
  lea    -0x1(%rsi),%edi
  cmp    $0x2,%edi
  jbe    L177
  mov    %esi,%ebx
  lea    0x10(%rdx),%rbp
  lea    0x20(%rdx),%r10
  shr    $0x2,%ebx
  lea    -0x1(%rbx),%edi
  cmp    $0x1,%edi
  jbe    L159
  lea    -0x3(%rbx),%r14d
  pxor   %xmm3,%xmm3
  movups 0x10(%rdx),%xmm6
  movups (%rdx),%xmm0
  and    $0xfffffffe,%r14d
  mov    %r8,%r11
  movaps %xmm3,%xmm1
  mov    $0x2,%r15d
  add    $0x4,%r14d
  movaps %xmm3,%xmm5
  jmp    L235
  cs nopw 0x0(%rax,%rax,1)
L26:
  movaps %xmm2,%xmm0
L235:
  movups (%r11),%xmm4
  mov    %r15d,%edi
  add    $0x2,%r15d
  lea    0x10(%r10),%rbp
  mov    %r10,%r12
  add    $0x20,%r11
  add    $0x20,%r10
  mulps  %xmm4,%xmm0
  addss  %xmm0,%xmm5
  movaps %xmm0,%xmm2
  shufps $0x55,%xmm0,%xmm2
  addss  %xmm2,%xmm5
  movaps %xmm0,%xmm2
  unpckhps %xmm0,%xmm2
  shufps $0xff,%xmm0,%xmm0
  addss  %xmm2,%xmm5
  addss  %xmm0,%xmm5
  movaps %xmm6,%xmm0
  mulps  %xmm4,%xmm0
  addss  %xmm0,%xmm1
  movaps %xmm0,%xmm2
  shufps $0x55,%xmm0,%xmm2
  addss  %xmm2,%xmm1
  movaps %xmm0,%xmm2
  unpckhps %xmm0,%xmm2
  shufps $0xff,%xmm0,%xmm0
  addss  %xmm2,%xmm1
  movups -0x20(%r10),%xmm2
  mulps  %xmm2,%xmm4
  addss  %xmm0,%xmm1
  addss  %xmm4,%xmm3
  movaps %xmm4,%xmm0
  shufps $0x55,%xmm4,%xmm4
  addss  %xmm4,%xmm3
  movaps %xmm0,%xmm4
  unpckhps %xmm0,%xmm4
  shufps $0xff,%xmm0,%xmm0
  addss  %xmm4,%xmm3
  movups -0x10(%r11),%xmm4
  mulps  %xmm4,%xmm6
  addss  %xmm0,%xmm3
  addss  %xmm6,%xmm5
  movaps %xmm6,%xmm0
  shufps $0x55,%xmm6,%xmm6
  addss  %xmm6,%xmm5
  movaps %xmm0,%xmm6
  unpckhps %xmm0,%xmm6
  shufps $0xff,%xmm0,%xmm0
  addss  %xmm6,%xmm5
  addss  %xmm0,%xmm5
  movaps %xmm4,%xmm0
  mulps  %xmm2,%xmm0
  addss  %xmm0,%xmm1
  movaps %xmm0,%xmm6
  shufps $0x55,%xmm0,%xmm6
  addss  %xmm6,%xmm1
  movaps %xmm0,%xmm6
  unpckhps %xmm0,%xmm6
  shufps $0xff,%xmm0,%xmm0
  addss  %xmm6,%xmm1
  movups -0x10(%r10),%xmm6
  mulps  %xmm6,%xmm4
  addss  %xmm0,%xmm1
  movaps %xmm5,%xmm0
  unpcklps %xmm1,%xmm0
  addss  %xmm4,%xmm3
  movaps %xmm4,%xmm7
  shufps $0x55,%xmm4,%xmm7
  addss  %xmm3,%xmm7
  movaps %xmm4,%xmm3
  unpckhps %xmm4,%xmm3
  shufps $0xff,%xmm4,%xmm4
  addss  %xmm7,%xmm3
  addss  %xmm4,%xmm3
  cmp    %r15d,%r14d
  jne    L26
L18:
  xor    %r14d,%r14d
  movaps %xmm0,%xmm6
  nop
L39:
  movups (%r11,%r14,1),%xmm5
  movups (%r12,%r14,1),%xmm1
  add    $0x1,%edi
  movups 0x0(%rbp,%r14,1),%xmm4
  mulps  %xmm5,%xmm1
  mulps  %xmm5,%xmm4
  movaps %xmm1,%xmm0
  movaps %xmm1,%xmm2
  unpcklps %xmm4,%xmm0
  shufps $0x55,%xmm1,%xmm2
  unpckhps %xmm4,%xmm1
  addps  %xmm6,%xmm0
  movaps %xmm4,%xmm6
  shufps $0x55,%xmm4,%xmm6
  unpcklps %xmm6,%xmm2
  addps  %xmm2,%xmm0
  movaps %xmm1,%xmm2
  shufps $0xd4,%xmm1,%xmm2
  shufps $0xde,%xmm1,%xmm1
  movdqa %xmm1,%xmm6
  movups (%r10,%r14,1),%xmm1
  add    $0x10,%r14
  mulps  %xmm5,%xmm1
  addps  %xmm2,%xmm0
  addps  %xmm0,%xmm6
  addss  %xmm1,%xmm3
  movaps %xmm1,%xmm2
  shufps $0x55,%xmm1,%xmm2
  addss  %xmm2,%xmm3
  movaps %xmm1,%xmm2
  unpckhps %xmm1,%xmm2
  shufps $0xff,%xmm1,%xmm1
  movaps %xmm3,%xmm4
  movaps %xmm2,%xmm3
  addss  %xmm4,%xmm3
  addss  %xmm1,%xmm3
  cmp    %ebx,%edi
  jb     L39
  mov    %esi,%ebp
  movaps %xmm6,%xmm0
  and    $0xfffffffc,%ebp
  mov    %ebp,%r10d
  shl    $0x2,%r10
  lea    (%rdx,%r10,1),%rdi
  add    %r8,%r10
  cmp    %ebp,%esi
  je     L140
L168:
  mov    %esi,%r11d
  sub    %ebp,%r11d
  cmp    $0x1,%r11d
  je     L152
  movq   (%r8,%rbp,4),%xmm5
  lea    0x0(,%rbp,4),%rbx
  movq   (%rdx,%rbp,4),%xmm1
  mov    %r11d,%ebp
  movq   0x10(%rdx,%rbx,1),%xmm2
  and    $0xfffffffe,%ebp
  mulps  %xmm5,%xmm1
  mulps  %xmm5,%xmm2
  movaps %xmm1,%xmm4
  shufps $0xe5,%xmm1,%xmm1
  unpcklps %xmm2,%xmm4
  shufps $0xe5,%xmm2,%xmm2
  unpcklps %xmm2,%xmm1
  addps  %xmm4,%xmm0
  addps  %xmm1,%xmm0
  movq   0x20(%rdx,%rbx,1),%xmm1
  mov    %ebp,%ebx
  shl    $0x2,%rbx
  mulps  %xmm5,%xmm1
  add    %rbx,%rdi
  add    %rbx,%r10
  movaps %xmm1,%xmm2
  shufps $0xe5,%xmm1,%xmm1
  addss  %xmm3,%xmm2
  movaps %xmm1,%xmm3
  addss  %xmm2,%xmm3
  cmp    %ebp,%r11d
  je     L140
L152:
  movss  (%r10),%xmm1
  movss  0x10(%rdi),%xmm4
  movss  (%rdi),%xmm2
  unpcklps %xmm4,%xmm2
  movaps %xmm1,%xmm4
  shufps $0xe0,%xmm4,%xmm4
  mulss  0x20(%rdi),%xmm1
  mulps  %xmm4,%xmm2
  addss  %xmm1,%xmm3
  addps  %xmm2,%xmm0
L140:
  mov    %esi,%esi
  lea    -0x4(,%rax,4),%edi
  shl    $0x2,%rsi
  movslq %edi,%rdi
  add    %rsi,%r8
  lea    (%rsi,%rdi,4),%rsi
  add    %rsi,%rdx
  jmp    L148
  xchg   %ax,%ax
L211:
  xorps  %xmm0,%xmm0
  pxor   %xmm3,%xmm3
L148:
  cmp    $0x3,%ecx
  jle    L3
  shl    $0x2,%eax
  lea    -0x4(%rcx),%r10d
  mov    %rdx,%rsi
  xor    %edi,%edi
  cltq
  shr    $0x2,%r10d
  movaps %xmm0,%xmm6
  shl    $0x2,%rax
  add    $0x1,%r10d
  nopl   (%rax)
L11:
  mov    %rdi,%r11
  movups (%rsi),%xmm1
  movups 0x10(%rsi),%xmm4
  add    $0x1,%rdi
  shl    $0x4,%r11
  movups (%r8,%r11,1),%xmm5
  mulps  %xmm5,%xmm1
  mulps  %xmm5,%xmm4
  movaps %xmm1,%xmm0
  movaps %xmm1,%xmm2
  unpcklps %xmm4,%xmm0
  shufps $0x55,%xmm1,%xmm2
  unpckhps %xmm4,%xmm1
  addps  %xmm6,%xmm0
  movaps %xmm4,%xmm6
  shufps $0x55,%xmm4,%xmm6
  unpcklps %xmm6,%xmm2
  addps  %xmm2,%xmm0
  movaps %xmm1,%xmm2
  shufps $0xd4,%xmm1,%xmm2
  shufps $0xde,%xmm1,%xmm1
  movdqa %xmm1,%xmm6
  movups 0x20(%rsi),%xmm1
  add    %rax,%rsi
  mulps  %xmm5,%xmm1
  addps  %xmm2,%xmm0
  addps  %xmm0,%xmm6
  addss  %xmm1,%xmm3
  movaps %xmm1,%xmm2
  shufps $0x55,%xmm1,%xmm2
  addss  %xmm2,%xmm3
  movaps %xmm1,%xmm2
  unpckhps %xmm1,%xmm2
  shufps $0xff,%xmm1,%xmm1
  addss  %xmm2,%xmm3
  addss  %xmm1,%xmm3
  cmp    %edi,%r10d
  ja     L11
  mov    %r10d,%esi
  movaps %xmm6,%xmm0
  shl    $0x2,%r10d
  imul   %rsi,%rax
  shl    $0x4,%rsi
  add    %rsi,%r8
  add    %rax,%rdx
L188:
  cmp    %ecx,%r10d
  jge    L231
  sub    %r10d,%ecx
  lea    -0x1(%rcx),%eax
  cmp    $0x2,%eax
  jbe    L120
  movups (%r8),%xmm5
  movups (%rdx),%xmm1
  mov    %ecx,%eax
  movups 0x10(%rdx),%xmm4
  and    $0xfffffffc,%eax
  mulps  %xmm5,%xmm1
  mov    %eax,%esi
  mulps  %xmm5,%xmm4
  shl    $0x2,%rsi
  lea    (%rdx,%rsi,1),%rdi
  add    %r8,%rsi
  movaps %xmm1,%xmm2
  unpcklps %xmm4,%xmm2
  movaps %xmm4,%xmm6
  addps  %xmm0,%xmm2
  movaps %xmm1,%xmm0
  shufps $0x55,%xmm4,%xmm6
  shufps $0x55,%xmm1,%xmm0
  unpcklps %xmm6,%xmm0
  addps  %xmm0,%xmm2
  movaps %xmm1,%xmm0
  unpckhps %xmm4,%xmm0
  movaps %xmm0,%xmm1
  shufps $0xd4,%xmm0,%xmm1
  addps  %xmm2,%xmm1
  shufps $0xde,%xmm0,%xmm0
  addps  %xmm1,%xmm0
  movups 0x20(%rdx),%xmm1
  mulps  %xmm5,%xmm1
  addss  %xmm1,%xmm3
  movaps %xmm1,%xmm2
  shufps $0x55,%xmm1,%xmm2
  addss  %xmm3,%xmm2
  movaps %xmm1,%xmm3
  unpckhps %xmm1,%xmm3
  shufps $0xff,%xmm1,%xmm1
  addss  %xmm2,%xmm3
  addss  %xmm1,%xmm3
  cmp    %ecx,%eax
  je     L231
L229:
  sub    %eax,%ecx
  cmp    $0x1,%ecx
  je     L197
  movq   (%r8,%rax,4),%xmm5
  movq   (%rdx,%rax,4),%xmm1
  lea    0x0(,%rax,4),%r10
  movq   0x10(%rdx,%r10,1),%xmm2
  mulps  %xmm5,%xmm1
  mulps  %xmm5,%xmm2
  movaps %xmm1,%xmm4
  shufps $0xe5,%xmm1,%xmm1
  unpcklps %xmm2,%xmm4
  shufps $0xe5,%xmm2,%xmm2
  unpcklps %xmm2,%xmm1
  addps  %xmm4,%xmm0
  addps  %xmm1,%xmm0
  movq   0x20(%rdx,%r10,1),%xmm1
  mov    %ecx,%edx
  and    $0xfffffffe,%edx
  mulps  %xmm5,%xmm1
  mov    %edx,%eax
  shl    $0x2,%rax
  add    %rax,%rdi
  add    %rax,%rsi
  movaps %xmm1,%xmm2
  shufps $0xe5,%xmm1,%xmm1
  addss  %xmm3,%xmm2
  movaps %xmm1,%xmm3
  addss  %xmm2,%xmm3
  cmp    %edx,%ecx
  je     L231
L197:
  movss  (%rsi),%xmm1
  movss  0x10(%rdi),%xmm4
  movss  (%rdi),%xmm2
  unpcklps %xmm4,%xmm2
  movaps %xmm1,%xmm4
  shufps $0xe0,%xmm4,%xmm4
  mulss  0x20(%rdi),%xmm1
  mulps  %xmm4,%xmm2
  addss  %xmm1,%xmm3
  addps  %xmm2,%xmm0
L231:
  test   %r13d,%r13d
  jne    L174
  movlps %xmm0,(%r9)
  movss  %xmm3,0x8(%r9)
L181:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L174:
  movq   (%r9),%xmm2
  movss  0x8(%r9),%xmm1
  cmp    $0x1,%r13d
  je     L109
  subps  %xmm0,%xmm2
  subss  %xmm3,%xmm1
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  movlps %xmm2,(%r9)
  movss  %xmm1,0x8(%r9)
  ret
  nopl   (%rax)
L109:
  addps  %xmm0,%xmm2
  addss  %xmm3,%xmm1
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  movlps %xmm2,(%r9)
  movss  %xmm1,0x8(%r9)
  ret
  nopl   0x0(%rax)
L3:
  xor    %r10d,%r10d
  jmp    L188
L120:
  mov    %r8,%rsi
  mov    %rdx,%rdi
  xor    %eax,%eax
  jmp    L229
L177:
  mov    %r8,%r10
  mov    %rdx,%rdi
  xorps  %xmm0,%xmm0
  xor    %ebp,%ebp
  pxor   %xmm3,%xmm3
  jmp    L168
L159:
  mov    %rdx,%r12
  mov    %r8,%r11
  xorps  %xmm0,%xmm0
  xor    %edi,%edi
  pxor   %xmm3,%xmm3
  jmp    L18
```

assistant: ```c
void kernel_sgemv_t_3_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, y_1 = 0, y_2 = 0;
  if (kna > 0) {
    k = 0;
    for (; k < kna; 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;
      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_1 += A[0 + lda * 1] * x_0;
    y_2 += A[0 + lda * 2] * 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_0 += A[2 + lda * 0] * x_2;
    y_1 += A[2 + lda * 1] * x_2;
    y_2 += A[2 + lda * 2] * 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;
    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;
    A += 1;
    x += 1;
  }
  if (alg == 0) {
    y[0] = y_0;
    y[1] = y_1;
    y[2] = y_2;
  } else if (alg == 1) {
    y[0] += y_0;
    y[1] += y_1;
    y[2] += y_2;
  } else {
    y[0] -= y_0;
    y[1] -= y_1;
    y[2] -= y_2;
  }
}
```