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

```asm
<smatvec>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,-0x18(%rsp)
  mov    %esi,%ebp
  mov    %edx,-0x24(%rsp)
  mov    %rcx,%r13
  mov    %r8,-0x20(%rsp)
  cmp    $0x7,%edx
  jle    L22
  movslq %edi,%rax
  mov    %rax,%rdi
  shl    $0x6,%rdi
  mov    %rdi,-0x40(%rsp)
  mov    %r8,%rsi
  lea    (%rcx,%rax,8),%rcx
  lea    -0x8(%rdx),%edx
  shr    $0x3,%edx
  mov    %edx,-0x14(%rsp)
  mov    %edx,%ebx
  mov    %rbx,-0x10(%rsp)
  mov    %rbx,%rdx
  shl    $0x6,%rdx
  lea    0x40(%r8,%rdx,1),%rdi
  mov    %rax,%r15
  shl    $0x4,%r15
  mov    %rax,%rbx
  shl    $0x5,%rbx
  mov    %rbx,-0x38(%rsp)
  lea    (%rax,%rax,2),%rax
  shl    $0x4,%rax
  mov    %rax,-0x30(%rsp)
  mov    %r13,%rdx
  mov    %ebp,%r14d
  mov    %r13,-0x8(%rsp)
  mov    %rdi,%r13
L122:
  mov    %rcx,%r10
  lea    (%r15,%rdx,1),%r11
  lea    (%rcx,%r15,1),%rdi
  mov    -0x38(%rsp),%rax
  lea    (%rdx,%rax,1),%rbx
  lea    (%r15,%rdi,1),%r8
  mov    -0x30(%rsp),%rax
  lea    (%rdx,%rax,1),%r12
  lea    (%r15,%r8,1),%rcx
  movsd  (%rsi),%xmm1
  movsd  0x8(%rsi),%xmm2
  movsd  0x10(%rsi),%xmm3
  movsd  0x18(%rsi),%xmm4
  movsd  0x20(%rsi),%xmm5
  movsd  0x28(%rsi),%xmm6
  movsd  0x30(%rsi),%xmm7
  movsd  0x38(%rsi),%xmm8
  test   %ebp,%ebp
  jle    L75
  mov    $0x0,%eax
L50:
  movapd %xmm1,%xmm0
  mulsd  (%rdx,%rax,8),%xmm0
  movapd %xmm2,%xmm9
  mulsd  (%r10,%rax,8),%xmm9
  addsd  %xmm9,%xmm0
  movapd %xmm3,%xmm9
  mulsd  (%r11,%rax,8),%xmm9
  addsd  %xmm9,%xmm0
  movapd %xmm4,%xmm9
  mulsd  (%rdi,%rax,8),%xmm9
  addsd  %xmm9,%xmm0
  movapd %xmm5,%xmm9
  mulsd  (%rbx,%rax,8),%xmm9
  addsd  %xmm9,%xmm0
  movapd %xmm6,%xmm9
  mulsd  (%r8,%rax,8),%xmm9
  addsd  %xmm9,%xmm0
  movapd %xmm7,%xmm9
  mulsd  (%r12,%rax,8),%xmm9
  addsd  %xmm9,%xmm0
  movapd %xmm8,%xmm9
  mulsd  (%rcx,%rax,8),%xmm9
  addsd  %xmm9,%xmm0
  addsd  (%r9,%rax,8),%xmm0
  movsd  %xmm0,(%r9,%rax,8)
  add    $0x1,%rax
  cmp    %r14,%rax
  jne    L50
L75:
  add    -0x40(%rsp),%rdx
  add    $0x40,%rsi
  add    %r15,%rcx
  cmp    %r13,%rsi
  jne    L122
  mov    -0x8(%rsp),%r13
  mov    -0x14(%rsp),%eax
  lea    0x8(,%rax,8),%r11d
  mov    -0x10(%rsp),%rax
  add    $0x1,%rax
  imul   -0x40(%rsp),%rax
  add    %rax,%r13
L90:
  mov    -0x24(%rsp),%ebx
  lea    -0x3(%rbx),%eax
  cmp    %r11d,%eax
  jle    L79
  mov    -0x18(%rsp),%edi
  movslq %edi,%rax
  lea    0x0(,%rax,8),%r15
  lea    0x0(,%rdi,4),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rdi
  mov    %rdi,-0x40(%rsp)
  movslq %r11d,%rcx
  mov    -0x20(%rsp),%rsi
  lea    (%rsi,%rcx,8),%r10
  lea    -0x4(%rbx),%edx
  sub    %r11d,%edx
  shr    $0x2,%edx
  mov    %edx,-0x38(%rsp)
  mov    %edx,%ebx
  mov    %rbx,-0x30(%rsp)
  lea    (%rcx,%rbx,4),%rdx
  lea    0x20(%rsi,%rdx,8),%r14
  mov    %rax,%r12
  shl    $0x4,%r12
  lea    (%rax,%rax,2),%rbx
  shl    $0x3,%rbx
  mov    %r13,%rdx
  mov    %ebp,%r8d
L127:
  lea    (%r15,%rdx,1),%rcx
  lea    (%rdx,%r12,1),%rsi
  lea    (%rdx,%rbx,1),%rdi
  movsd  (%r10),%xmm2
  movsd  0x8(%r10),%xmm3
  movsd  0x10(%r10),%xmm4
  movsd  0x18(%r10),%xmm5
  test   %ebp,%ebp
  jle    L46
  mov    $0x0,%eax
L67:
  movapd %xmm2,%xmm0
  mulsd  (%rdx,%rax,8),%xmm0
  movapd %xmm3,%xmm1
  mulsd  (%rcx,%rax,8),%xmm1
  addsd  %xmm1,%xmm0
  movapd %xmm4,%xmm1
  mulsd  (%rsi,%rax,8),%xmm1
  addsd  %xmm1,%xmm0
  movapd %xmm5,%xmm1
  mulsd  (%rdi,%rax,8),%xmm1
  addsd  %xmm1,%xmm0
  addsd  (%r9,%rax,8),%xmm0
  movsd  %xmm0,(%r9,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%r8
  jne    L67
L46:
  add    -0x40(%rsp),%rdx
  add    $0x20,%r10
  cmp    %r14,%r10
  jne    L127
  mov    -0x38(%rsp),%eax
  lea    0x4(%r11,%rax,4),%r11d
  mov    -0x30(%rsp),%rax
  add    $0x1,%rax
  imul   -0x40(%rsp),%rax
  add    %rax,%r13
L79:
  mov    -0x24(%rsp),%esi
  cmp    %r11d,%esi
  jle    L26
  movslq -0x18(%rsp),%rcx
  shl    $0x3,%rcx
  movslq %r11d,%r11
  mov    %ebp,%edx
  mov    -0x20(%rsp),%rdi
L9:
  movsd  (%rdi,%r11,8),%xmm1
  test   %ebp,%ebp
  jle    L29
  mov    $0x0,%eax
L92:
  movapd %xmm1,%xmm0
  mulsd  0x0(%r13,%rax,8),%xmm0
  addsd  (%r9,%rax,8),%xmm0
  movsd  %xmm0,(%r9,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L92
L29:
  add    %rcx,%r13
  add    $0x1,%r11
  cmp    %r11d,%esi
  jg     L9
L26:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L22:
  mov    $0x0,%r11d
  jmp    L90
```

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;
  }
}
```