user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<Matrix4Double>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x18,%rsp
  mov    %edi,%r12d
  mov    %esi,%ebp
  mov    %edx,%ebx
  mov    %ecx,%r15d
  mov    %ecx,0xc(%rsp)
  mov    $0x8,%esi
  call   <calloc@plt>
  mov    %rax,%r13
  mov    %r12d,%r14d
  imul   %ebp,%r14d
  mov    $0x8,%esi
  mov    %r14d,%edi
  call   <calloc@plt>
  mov    %rax,0x0(%r13)
  imul   %ebx,%r14d
  mov    $0x8,%esi
  mov    %r14d,%edi
  call   <calloc@plt>
  mov    0x0(%r13),%rdx
  mov    %rax,(%rdx)
  mov    %r14d,%edi
  imul   %r15d,%edi
  mov    $0x8,%esi
  call   <calloc@plt>
  mov    %rax,%rdx
  mov    0x0(%r13),%rax
  mov    (%rax),%rax
  mov    %rdx,(%rax)
  cmp    $0x1,%r12d
  jle    L133
  movslq %ebp,%r8
  shl    $0x3,%r8
  mov    %ebp,%eax
  imul   %ebx,%eax
  movslq %eax,%rdi
  shl    $0x3,%rdi
  imul   %r15d,%eax
  movslq %eax,%rsi
  shl    $0x3,%rsi
  mov    %r13,%rax
  lea    -0x1(%r12),%edx
  lea    0x0(%r13,%rdx,8),%r9
L113:
  mov    %rax,%rdx
  add    $0x8,%rax
  mov    %r8,%rcx
  add    (%rdx),%rcx
  mov    %rcx,(%rax)
  mov    (%rdx),%r10
  mov    %rdi,%r14
  add    (%r10),%r14
  mov    %r14,(%rcx)
  mov    (%rax),%rcx
  mov    (%rcx),%rcx
  mov    (%rdx),%rdx
  mov    (%rdx),%rdx
  mov    %rsi,%r11
  add    (%rdx),%r11
  mov    %r11,(%rcx)
  cmp    %r9,%rax
  jne    L113
L29:
  movslq %ebx,%r8
  shl    $0x3,%r8
  mov    0xc(%rsp),%edi
  imul   %ebx,%edi
  movslq %edi,%rdi
  shl    $0x3,%rdi
  mov    %r13,%r14
  lea    -0x2(%rbp),%eax
  lea    0x8(,%rax,8),%r9
  mov    %r13,%r11
  mov    $0x0,%r10d
  jmp    L60
L133:
  je     L29
L55:
  mov    %r13,%rax
  add    $0x18,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L136:
  mov    (%rsi),%rcx
  mov    %rax,%rdx
  add    $0x8,%rax
  mov    %r8,%r15
  add    (%rcx,%rdx,1),%r15
  mov    %r15,(%rcx,%rax,1)
  mov    (%rsi),%rcx
  mov    (%rcx,%rax,1),%r15
  mov    (%rcx,%rdx,1),%rdx
  mov    %rdi,%rcx
  add    (%rdx),%rcx
  mov    %rcx,(%r15)
  cmp    %r9,%rax
  jne    L136
L36:
  add    $0x1,%r10d
  add    $0x8,%r11
  cmp    %r10d,%r12d
  jle    L30
L60:
  mov    %r11,%rsi
  mov    $0x0,%eax
  cmp    $0x1,%ebp
  jg     L136
  jmp    L36
L30:
  movslq 0xc(%rsp),%r8
  shl    $0x3,%r8
  lea    -0x1(%rbp),%eax
  lea    0x8(,%rax,8),%r10
  lea    -0x2(%rbx),%eax
  lea    0x8(,%rax,8),%r9
  mov    $0x0,%r11d
  jmp    L0
L33:
  mov    (%rdi),%rdx
  mov    (%rdx,%rsi,1),%rdx
  mov    %rax,%rcx
  add    $0x8,%rax
  mov    %r8,%r15
  add    (%rdx,%rcx,1),%r15
  mov    %r15,(%rdx,%rax,1)
  cmp    %r9,%rax
  jne    L33
L101:
  add    $0x8,%rsi
  cmp    %rsi,%r10
  je     L35
L31:
  mov    $0x0,%eax
  cmp    $0x1,%ebx
  jg     L33
  jmp    L101
L35:
  add    $0x1,%r11d
  add    $0x8,%r14
  cmp    %r11d,%r12d
  jle    L55
L0:
  test   %ebp,%ebp
  jle    L35
  mov    %r14,%rdi
  mov    $0x0,%esi
  jmp    L31
```

assistant: ```c
double ****Matrix4Double(int M, int N, int P, int Q) {
  double ****out;
  int i, j, k;
  out = (double ****)calloc(M, sizeof(double ***));
  out[0] = (double ***)calloc(M * N, sizeof(double **));
  out[0][0] = (double **)calloc(M * N * P, sizeof(double *));
  out[0][0][0] = (double *)calloc(M * N * P * Q, sizeof(double));
  for (i = 1; i < M; i++) {
    out[i] = out[i - 1] + N;
    out[i][0] = out[i - 1][0] + N * P;
    out[i][0][0] = out[i - 1][0][0] + N * P * Q;
  }
  for (i = 0; i < M; i++)
    for (j = 1; j < N; j++) {
      out[i][j] = out[i][j - 1] + P;
      out[i][j][0] = out[i][j - 1][0] + P * Q;
    }
  for (i = 0; i < M; i++)
    for (j = 0; j < N; j++)
      for (k = 1; k < P; k++)
        out[i][j][k] = out[i][j][k - 1] + Q;
  return out;
}
```