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

```asm
<allocateDbl3DMatrix>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %edi,-0x34(%rbp)
  mov    %esi,-0x38(%rbp)
  mov    %edx,-0x3c(%rbp)
  mov    -0x34(%rbp),%eax
  imul   -0x38(%rbp),%eax
  imul   -0x3c(%rbp),%eax
  shl    $0x3,%eax
  mov    %eax,-0x1c(%rbp)
  cmpl   $0x0,-0x34(%rbp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <assert@plt>
  cmpl   $0x0,-0x38(%rbp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <assert@plt>
  cmpl   $0x0,-0x3c(%rbp)
  setne  %al
  movzbl %al,%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <assert@plt>
  mov    -0x34(%rbp),%eax
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L67
  mov    $0x0,%eax
  call   <PyErr_NoMemory@plt>
  mov    $0x0,%eax
  jmp    L25
L67:
  mov    -0x38(%rbp),%eax
  imul   -0x34(%rbp),%eax
  mov    %eax,%eax
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L80
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  call   <PyErr_NoMemory@plt>
  mov    $0x0,%eax
  jmp    L25
L80:
  mov    -0x1c(%rbp),%eax
  cltq
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  jne    L119
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  call   <PyErr_NoMemory@plt>
  mov    $0x0,%eax
  jmp    L25
L119:
  movl   $0x0,-0x28(%rbp)
  jmp    L7
L15:
  mov    -0x28(%rbp),%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x18(%rbp),%rax
  mov    %rax,(%rdx)
  movl   $0x0,-0x24(%rbp)
  jmp    L76
L39:
  mov    -0x18(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x18(%rbp)
  mov    -0x10(%rbp),%rdx
  mov    %rdx,(%rax)
  movl   $0x0,-0x20(%rbp)
  jmp    L41
L46:
  mov    -0x10(%rbp),%rax
  lea    0x8(%rax),%rdx
  mov    %rdx,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x20(%rbp)
L41:
  mov    -0x20(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  jb     L46
  addl   $0x1,-0x24(%rbp)
L76:
  mov    -0x24(%rbp),%eax
  cmp    -0x38(%rbp),%eax
  jb     L39
  addl   $0x1,-0x28(%rbp)
L7:
  mov    -0x28(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jb     L15
  mov    -0x8(%rbp),%rax
L25:
  leave
  ret
```

assistant: ```c
double ***allocateDbl3DMatrix(unsigned nm, unsigned nr, unsigned nc) {
  double ***mat_list_p;
  double **mat_walk;
  double *arr;
  const int arr_len = nm * nr * nc * (sizeof(double));
  unsigned i, j, k;
  ;
  assert(nm > 0);
  assert(nr > 0);
  assert(nc > 0);
  mat_list_p = (double ***)malloc(nm * sizeof(double **));
  if (mat_list_p == 0L) {
    PyErr_NoMemory();
    return 0L;
  }
  mat_walk = (double **)malloc(nr * nm * sizeof(double *));
  if (mat_walk == 0L) {
    free(mat_list_p);
    PyErr_NoMemory();
    return 0L;
  }
  arr = (double *)malloc(arr_len);
  if (arr == 0L) {
    free(mat_list_p);
    free(mat_walk);
    PyErr_NoMemory();
    return 0L;
  }
  for (i = 0; i < nm; ++i) {
    mat_list_p[i] = mat_walk;
    for (j = 0; j < nr; ++j) {
      *mat_walk++ = arr;
      for (k = 0; k < nc; ++k) {
        *arr++ = 0.0;
      }
    }
  }
  return mat_list_p;
}
```