user: Translate the below assembly code into C programming language:

```asm
<matrix2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x30,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %esi,-0x18(%rbp)
  mov    %edx,-0x1c(%rbp)
  mov    %ecx,-0x20(%rbp)
  mov    %r8d,-0x24(%rbp)
  mov    %r9d,-0x28(%rbp)
  mov    -0x18(%rbp),%eax
  sub    -0x14(%rbp),%eax
  add    $0x1,%eax
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L39
  lea    D39(%rip),%rax
  mov    %rax,%rdx
  lea    D7(%rip),%rax
  mov    %rax,%rsi
  mov    $0x1d2,%edi
  call   <errhandler@plt>
L39:
  mov    -0x14(%rbp),%eax
  cltq
  shl    $0x3,%rax
  neg    %rax
  add    %rax,-0x8(%rbp)
  mov    -0x14(%rbp),%eax
  mov    %eax,-0x10(%rbp)
  jmp    L24
L52:
  mov    -0x20(%rbp),%eax
  sub    -0x1c(%rbp),%eax
  add    $0x1,%eax
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    %rax,(%rdx)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L61
  lea    D39(%rip),%rax
  mov    %rax,%rdx
  lea    D7(%rip),%rax
  mov    %rax,%rsi
  mov    $0x1d7,%edi
  call   <errhandler@plt>
L61:
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x1c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  neg    %rax
  mov    %rax,%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    -0x1c(%rbp),%eax
  mov    %eax,-0xc(%rbp)
  jmp    L69
L62:
  mov    -0x28(%rbp),%eax
  sub    -0x24(%rbp),%eax
  add    $0x1,%eax
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    -0x10(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%rcx
  mov    -0xc(%rbp),%edx
  movslq %edx,%rdx
  shl    $0x3,%rdx
  add    %rcx,%rdx
  mov    %rax,(%rdx)
  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
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L46
  lea    D39(%rip),%rax
  mov    %rax,%rdx
  lea    D7(%rip),%rax
  mov    %rax,%rsi
  mov    $0x1db,%edi
  call   <errhandler@plt>
L46:
  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
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x24(%rbp),%eax
  cltq
  shl    $0x3,%rax
  neg    %rax
  mov    %rax,%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)
L69:
  mov    -0xc(%rbp),%eax
  cmp    -0x20(%rbp),%eax
  jle    L62
  addl   $0x1,-0x10(%rbp)
L24:
  mov    -0x10(%rbp),%eax
  cmp    -0x18(%rbp),%eax
  jle    L52
  mov    -0x8(%rbp),%rax
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_label: D39
type: string
name: retrieve_data
arguments: data_label: D7
type: string

tool: D39: Storage cannot be allocated

tool: D7: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProjectBackup/helper.c

assistant: ```c
double ***matrix2(int nrl, int nrh, int ncl, int nch, int nll, int nlh) {
  double ***pArray;
  int i, j;
  pArray = (double ***)malloc((unsigned)(nrh - nrl + 1) * sizeof(double **));
  if (pArray == 0)
    errhandler(466, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProjectBackup/helper.c", "Storage cannot be allocated");
  pArray -= nrl;
  for (i = nrl; i <= nrh; i++) {
    pArray[i] = (double **)malloc((unsigned)(nch - ncl + 1) * sizeof(double *));
    if (pArray[i] == 0)
      errhandler(471, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProjectBackup/helper.c", "Storage cannot be allocated");
    pArray[i] -= ncl;
    for (j = ncl; j <= nch; j++) {
      pArray[i][j] = (double *)malloc((unsigned)(nlh - nll + 1) * sizeof(double));
      if (pArray[i][j] == 0)
        errhandler(475, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProjectBackup/helper.c", "Storage cannot be allocated");
      pArray[i][j] -= nll;
    }
  }
  return pArray;
}
```