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

```asm
<matrix_mult>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdx,%r9
  mov    %rcx,-0x30(%rsp)
  movslq %edi,%rbp
  mov    %rbp,%rdx
  imul   %rbp,%rdx
  imul   %rbp,%rdx
  lea    (%rdx,%rdx,1),%rbx
  mov    %rbx,-0x8(%rsp)
  test   %edi,%edi
  jle    L57
  mov    %rsi,%rax
  mov    %r9,%r11
  shl    $0x3,%rbp
  lea    -0x1(%rdi),%edx
  lea    0x8(%r9,%rdx,8),%rsi
  mov    %r9,%r8
  mov    $0x0,%r10d
  mov    %edi,%ebx
  neg    %rbx
  shl    $0x3,%rbx
L5:
  lea    (%rbx,%rsi,1),%rdx
  mov    %r8,%rcx
L21:
  movsd  (%rdx),%xmm0
  movsd  (%rcx),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rcx)
  add    $0x8,%rdx
  add    %rbp,%rcx
  cmp    %rsi,%rdx
  jne    L21
  lea    0x1(%r10),%r13d
  add    $0x8,%r8
  add    %rbp,%rsi
  cmp    %r13d,%edi
  je     L35
  mov    %r13d,%r10d
  jmp    L5
L35:
  lea    0x0(%r13,%r13,1),%edx
  movslq %edx,%rbx
  mov    %rbx,-0x18(%rsp)
  shl    $0x3,%rbx
  add    %rbp,%r9
  mov    -0x30(%rsp),%rdi
  add    %rbp,%rdi
  mov    %rdi,-0x28(%rsp)
  mov    %r10d,%edx
  shr    %edx
  mov    %edx,%edx
  lea    (%rdx,%rdx,1),%rdi
  mov    %rdi,-0x20(%rsp)
  mov    %rax,%rdx
  mov    $0x0,%r12d
  mov    $0x0,%r14d
  add    $0x10,%rax
  mov    %rax,-0x10(%rsp)
  mov    %r10d,%r10d
  mov    %rbp,-0x38(%rsp)
L47:
  mov    -0x30(%rsp),%r8
  mov    -0x38(%rsp),%rax
  lea    (%rdx,%rax,1),%r15
  mov    -0x20(%rsp),%rax
  add    %r12,%rax
  mov    -0x10(%rsp),%rdi
  lea    (%rdi,%rax,8),%rbp
  mov    -0x28(%rsp),%rdi
  mov    %r15,%rcx
L33:
  mov    $0x0,%eax
L54:
  movsd  (%r11,%rax,8),%xmm1
  movsd  (%r8,%rax,8),%xmm2
  movapd %xmm1,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  (%rdx),%xmm0
  movsd  %xmm0,(%rdx)
  movsd  (%r9,%rax,8),%xmm0
  mulsd  %xmm0,%xmm2
  addsd  (%rcx),%xmm2
  movsd  %xmm2,(%rcx)
  movsd  (%rdi,%rax,8),%xmm2
  mulsd  %xmm2,%xmm1
  addsd  0x8(%rdx),%xmm1
  movsd  %xmm1,0x8(%rdx)
  mulsd  %xmm2,%xmm0
  addsd  0x8(%rcx),%xmm0
  movsd  %xmm0,0x8(%rcx)
  mov    %rax,%rsi
  add    $0x1,%rax
  cmp    %rsi,%r10
  jne    L54
  add    $0x10,%rdx
  add    %rbx,%r8
  add    $0x10,%rcx
  add    %rbx,%rdi
  cmp    %rbp,%rdx
  jne    L33
  add    $0x2,%r14d
  add    -0x18(%rsp),%r12
  add    %rbx,%r11
  add    %rbx,%r9
  mov    -0x38(%rsp),%rax
  lea    (%r15,%rax,1),%rdx
  cmp    %r13d,%r14d
  jl     L47
L57:
  mov    -0x8(%rsp),%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

assistant: ```c
size_t matrix_mult(int len, double *restrict a, double *restrict b, double *restrict c) {
  int i, j, k, l, m;
  size_t fpops;
  double temp;
  fpops = (size_t)2 * len * len * len;
  for (i = 0; i < len; i++) {
    for (j = 0; j < len; j++) {
      temp = b[i * len + j];
      b[i * len + j] = b[j * len + i];
      b[j * len + i] = temp;
    }
  }
  for (i = 0; i < len; i += 2) {
    for (j = 0; j < len; j += 2) {
      for (k = 0; k < len; k++) {
        a[i * len + j] += b[i * len + k] * c[j * len + k];
        a[(i + 1) * len + j] += b[(i + 1) * len + k] * c[j * len + k];
        a[i * len + (j + 1)] += b[i * len + k] * c[(j + 1) * len + k];
        a[(i + 1) * len + (j + 1)] += b[(i + 1) * len + k] * c[(j + 1) * len + k];
      }
    }
  }
  return fpops;
}
```