user: Converte this assembly snippet into its equivalent C code:

```asm
<f3tensor>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,-0x1c(%rbp)
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  imul   -0x18(%rbp),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%rdx
  mov    -0x8(%rbp),%rax
  mov    %rdx,(%rax)
  mov    -0x14(%rbp),%eax
  imul   -0x18(%rbp),%eax
  imul   -0x1c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%rdx
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rax
  mov    %rdx,(%rax)
  movl   $0x1,-0xc(%rbp)
  jmp    L11
L31:
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rdx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x3,%rax
  sub    $0x8,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x8(%rbp),%rax
  mov    (%rax),%rcx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  add    %rsi,%rdx
  mov    %rdx,(%rax)
  addl   $0x1,-0xc(%rbp)
L11:
  mov    -0xc(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jne    L31
  movl   $0x1,-0x10(%rbp)
  jmp    L36
L15:
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rsi
  mov    -0x8(%rbp),%rax
  add    %rsi,%rax
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x10(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    (%rax),%rdx
  mov    -0x18(%rbp),%eax
  imul   -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rsi
  mov    -0x8(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%rax
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  movl   $0x1,-0xc(%rbp)
  jmp    L22
L25:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x3,%rax
  sub    $0x8,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x8(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rcx
  mov    -0xc(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  add    %rsi,%rdx
  mov    %rdx,(%rax)
  addl   $0x1,-0xc(%rbp)
L22:
  mov    -0xc(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jne    L25
  addl   $0x1,-0x10(%rbp)
L36:
  mov    -0x10(%rbp),%eax
  cmp    -0x14(%rbp),%eax
  jne    L15
  mov    -0x8(%rbp),%rax
  leave
  ret
```

assistant: ```c
float ***f3tensor(int nrow, int ncol, int ndep) {
  int i, j;
  float ***t;
  t = (float ***)malloc((size_t)(nrow * sizeof(float **)));
  t[0] = (float **)malloc((size_t)(nrow * ncol * sizeof(float *)));
  t[0][0] = (float *)malloc((size_t)(nrow * ncol * ndep * sizeof(float)));
  for (j = 1; j != ncol; j++)
    t[0][j] = t[0][j - 1] + ndep;
  for (i = 1; i != nrow; i++) {
    t[i] = t[i - 1] + ncol;
    t[i][0] = t[i - 1][0] + ncol * ndep;
    for (j = 1; j != ncol; j++)
      t[i][j] = t[i][j - 1] + ndep;
  }
  return t;
}
```