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

```asm
<smatvec>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %edi,-0x10(%rsp)
  mov    %edx,-0x24(%rsp)
  mov    %r8,-0x20(%rsp)
  cmp    $0x7,%edx
  jle    L21
  lea    -0x8(%rdx),%edx
  movslq %edi,%rax
  mov    %r13,-0x8(%rsp)
  mov    %r8,%rcx
  shr    $0x3,%edx
  mov    %rax,%rsi
  mov    %rax,%r15
  movslq %ebp,%r14
  mov    %edx,-0xc(%rsp)
  shl    $0x6,%rsi
  mov    %edx,%ebx
  shl    $0x4,%r15
  mov    %rbx,%rdx
  mov    %rbx,-0x18(%rsp)
  shl    $0x6,%rdx
  mov    %rsi,-0x40(%rsp)
  lea    0x0(%r13,%rax,8),%rsi
  lea    0x40(%r8,%rdx,1),%rbx
  mov    %r13,%rdx
  mov    %rbx,-0x30(%rsp)
  mov    %rax,%rbx
  lea    (%rax,%rax,2),%rax
  shl    $0x5,%rbx
  shl    $0x4,%rax
  mov    %rbx,-0x38(%rsp)
  mov    %rax,%r13
  nopl   0x0(%rax,%rax,1)
L107:
  mov    -0x38(%rsp),%rax
  lea    (%r15,%rsi,1),%r10
  movsd  (%rcx),%xmm1
  lea    (%rdx,%r15,1),%r12
  lea    (%r10,%r15,1),%r8
  movsd  0x8(%rcx),%xmm2
  movsd  0x10(%rcx),%xmm3
  lea    (%rdx,%r13,1),%r11
  movsd  0x18(%rcx),%xmm4
  movsd  0x20(%rcx),%xmm5
  lea    (%rax,%rdx,1),%rbx
  lea    (%r8,%r15,1),%rdi
  movsd  0x28(%rcx),%xmm6
  movsd  0x30(%rcx),%xmm7
  movsd  0x38(%rcx),%xmm8
  test   %ebp,%ebp
  jle    L30
  xor    %eax,%eax
  nop
L28:
  movsd  (%rdx,%rax,8),%xmm0
  movsd  (%rsi,%rax,8),%xmm9
  mulsd  %xmm1,%xmm0
  mulsd  %xmm2,%xmm9
  addsd  %xmm9,%xmm0
  movsd  (%r12,%rax,8),%xmm9
  mulsd  %xmm3,%xmm9
  addsd  %xmm9,%xmm0
  movsd  (%r10,%rax,8),%xmm9
  mulsd  %xmm4,%xmm9
  addsd  %xmm9,%xmm0
  movsd  (%rbx,%rax,8),%xmm9
  mulsd  %xmm5,%xmm9
  addsd  %xmm9,%xmm0
  movsd  (%r8,%rax,8),%xmm9
  mulsd  %xmm6,%xmm9
  addsd  %xmm9,%xmm0
  movsd  (%r11,%rax,8),%xmm9
  mulsd  %xmm7,%xmm9
  addsd  %xmm9,%xmm0
  movsd  (%rdi,%rax,8),%xmm9
  mulsd  %xmm8,%xmm9
  addsd  %xmm9,%xmm0
  addsd  (%r9,%rax,8),%xmm0
  movsd  %xmm0,(%r9,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r14
  jne    L28
L30:
  add    -0x40(%rsp),%rdx
  add    $0x40,%rcx
  lea    (%rdi,%r15,1),%rsi
  cmp    %rcx,-0x30(%rsp)
  jne    L107
  mov    -0x18(%rsp),%rax
  mov    -0x8(%rsp),%r13
  add    $0x1,%rax
  imul   -0x40(%rsp),%rax
  add    %rax,%r13
  mov    -0xc(%rsp),%eax
  lea    0x8(,%rax,8),%eax
  mov    %eax,-0x40(%rsp)
L89:
  mov    -0x24(%rsp),%esi
  mov    -0x40(%rsp),%ebx
  lea    -0x3(%rsi),%eax
  cmp    %ebx,%eax
  jle    L12
  lea    -0x4(%rsi),%edx
  movslq -0x10(%rsp),%rax
  movslq %ebx,%rcx
  mov    -0x20(%rsp),%rdi
  sub    %ebx,%edx
  movslq %ebp,%r8
  shr    $0x2,%edx
  mov    %rax,%r12
  lea    (%rdi,%rcx,8),%r10
  mov    %edx,%ebx
  mov    %edx,-0x30(%rsp)
  shl    $0x4,%r12
  lea    0x0(,%rax,4),%r11d
  lea    (%rcx,%rbx,4),%rdx
  mov    %rbx,-0x38(%rsp)
  movslq %r11d,%r11
  lea    (%rax,%rax,2),%rbx
  lea    0x20(%rdi,%rdx,8),%r14
  shl    $0x3,%r11
  shl    $0x3,%rbx
  mov    %r13,%rdx
  lea    0x0(,%rax,8),%r15
  nopl   0x0(%rax)
L83:
  movsd  (%r10),%xmm2
  movsd  0x8(%r10),%xmm3
  lea    (%r15,%rdx,1),%rdi
  lea    (%r12,%rdx,1),%rsi
  movsd  0x10(%r10),%xmm4
  movsd  0x18(%r10),%xmm5
  lea    (%rdx,%rbx,1),%rcx
  test   %ebp,%ebp
  jle    L118
  xor    %eax,%eax
  nopl   0x0(%rax)
L32:
  movsd  (%rdx,%rax,8),%xmm0
  movsd  (%rdi,%rax,8),%xmm1
  mulsd  %xmm2,%xmm0
  mulsd  %xmm3,%xmm1
  addsd  %xmm1,%xmm0
  movsd  (%rsi,%rax,8),%xmm1
  mulsd  %xmm4,%xmm1
  addsd  %xmm1,%xmm0
  movsd  (%rcx,%rax,8),%xmm1
  mulsd  %xmm5,%xmm1
  addsd  %xmm1,%xmm0
  addsd  (%r9,%rax,8),%xmm0
  movsd  %xmm0,(%r9,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r8
  jne    L32
L118:
  add    $0x20,%r10
  add    %r11,%rdx
  cmp    %r10,%r14
  jne    L83
  mov    -0x38(%rsp),%rax
  mov    -0x30(%rsp),%ebx
  add    $0x1,%rax
  imul   %r11,%rax
  add    %rax,%r13
  mov    -0x40(%rsp),%eax
  lea    0x4(%rax,%rbx,4),%eax
  mov    %eax,-0x40(%rsp)
L12:
  mov    -0x24(%rsp),%edi
  mov    -0x40(%rsp),%eax
  cmp    %eax,%edi
  jle    L78
  movslq -0x10(%rsp),%rsi
  mov    -0x20(%rsp),%r8
  movslq %eax,%rcx
  movslq %ebp,%rdx
  shl    $0x3,%rsi
L41:
  movsd  (%r8,%rcx,8),%xmm1
  test   %ebp,%ebp
  jle    L85
  xor    %eax,%eax
  nopl   0x0(%rax)
L106:
  movsd  0x0(%r13,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  (%r9,%rax,8),%xmm0
  movsd  %xmm0,(%r9,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L106
L85:
  add    $0x1,%rcx
  add    %rsi,%r13
  cmp    %ecx,%edi
  jg     L41
L78:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L21:
  movl   $0x0,-0x40(%rsp)
  jmp    L89
```

assistant: ```c
void smatvec(ldm, nrow, ncol, M, vec, Mxvec) int ldm;
int nrow;
int ncol;
double *M;
double *vec;
double *Mxvec;
{
  double vi0, vi1, vi2, vi3, vi4, vi5, vi6, vi7;
  double *M0;
  register double *Mki0, *Mki1, *Mki2, *Mki3, *Mki4, *Mki5, *Mki6, *Mki7;
  register int firstcol = 0;
  int k;
  M0 = &M[0];
  while (firstcol < ncol - 7) {
    Mki0 = M0;
    Mki1 = Mki0 + ldm;
    Mki2 = Mki1 + ldm;
    Mki3 = Mki2 + ldm;
    Mki4 = Mki3 + ldm;
    Mki5 = Mki4 + ldm;
    Mki6 = Mki5 + ldm;
    Mki7 = Mki6 + ldm;
    vi0 = vec[firstcol++];
    vi1 = vec[firstcol++];
    vi2 = vec[firstcol++];
    vi3 = vec[firstcol++];
    vi4 = vec[firstcol++];
    vi5 = vec[firstcol++];
    vi6 = vec[firstcol++];
    vi7 = vec[firstcol++];
    for (k = 0; k < nrow; k++)
      Mxvec[k] += vi0 * *Mki0++ + vi1 * *Mki1++ + vi2 * *Mki2++ + vi3 * *Mki3++ + vi4 * *Mki4++ + vi5 * *Mki5++ + vi6 * *Mki6++ + vi7 * *Mki7++;
    M0 += 8 * ldm;
  }
  while (firstcol < ncol - 3) {
    Mki0 = M0;
    Mki1 = Mki0 + ldm;
    Mki2 = Mki1 + ldm;
    Mki3 = Mki2 + ldm;
    vi0 = vec[firstcol++];
    vi1 = vec[firstcol++];
    vi2 = vec[firstcol++];
    vi3 = vec[firstcol++];
    for (k = 0; k < nrow; k++)
      Mxvec[k] += vi0 * *Mki0++ + vi1 * *Mki1++ + vi2 * *Mki2++ + vi3 * *Mki3++;
    M0 += 4 * ldm;
  }
  while (firstcol < ncol) {
    Mki0 = M0;
    vi0 = vec[firstcol++];
    for (k = 0; k < nrow; k++)
      Mxvec[k] += vi0 * *Mki0++;
    M0 += ldm;
  }
}
```