user: What is the c source code of the assembly code below?

```asm
<dmatrix>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,-0x38(%rbp)
  mov    %rsi,-0x40(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rcx,-0x50(%rbp)
  mov    -0x40(%rbp),%rax
  sub    -0x38(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x28(%rbp)
  mov    -0x50(%rbp),%rax
  sub    -0x48(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x20(%rbp)
  mov    -0x28(%rbp),%rax
  add    $0x1,%rax
  shl    $0x3,%eax
  mov    %eax,%eax
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  jne    L19
  lea    D10(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <nrerror@plt>
L19:
  addq   $0x8,-0x18(%rbp)
  mov    -0x38(%rbp),%rax
  shl    $0x3,%rax
  neg    %rax
  add    %rax,-0x18(%rbp)
  mov    -0x28(%rbp),%rax
  imul   -0x20(%rbp),%rax
  add    $0x1,%rax
  shl    $0x3,%eax
  mov    %eax,%edx
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x18(%rbp),%rax
  lea    (%rcx,%rax,1),%rbx
  mov    %rdx,%rdi
  call   <malloc@plt>
  mov    %rax,(%rbx)
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  test   %rax,%rax
  jne    L39
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <nrerror@plt>
L39:
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x18(%rbp),%rax
  add    %rcx,%rax
  add    $0x8,%rdx
  mov    %rdx,(%rax)
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x48(%rbp),%rax
  shl    $0x3,%rax
  neg    %rax
  mov    %rax,%rcx
  mov    -0x38(%rbp),%rax
  lea    0x0(,%rax,8),%rsi
  mov    -0x18(%rbp),%rax
  add    %rsi,%rax
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  mov    -0x38(%rbp),%rax
  add    $0x1,%rax
  mov    %rax,-0x30(%rbp)
  jmp    L30
L0:
  mov    -0x30(%rbp),%rax
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x20(%rbp),%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  lea    0x0(,%rax,8),%rsi
  mov    -0x18(%rbp),%rax
  add    %rsi,%rax
  add    %rcx,%rdx
  mov    %rdx,(%rax)
  addq   $0x1,-0x30(%rbp)
L30:
  mov    -0x30(%rbp),%rax
  cmp    -0x40(%rbp),%rax
  jle    L0
  mov    -0x18(%rbp),%rax
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: tag: D10
data_type: string
name: retrieve_data
arguments: tag: D18
data_type: string

tool: D10: allocation failure 1 in matrix()

tool: D18: allocation failure 2 in matrix()

assistant: ```c
double **dmatrix(nrl, nrh, ncl, nch)
long nch, ncl, nrh, nrl;
{
  long i, nrow = nrh - nrl + 1, ncol = nch - ncl + 1;
  double **m;
  m = (double **)malloc((unsigned int)((nrow + 1) * sizeof(double *)));
  if (!m)
    nrerror("allocation failure 1 in matrix()");
  m += 1;
  m -= nrl;
  m[nrl] = (double *)malloc((unsigned int)((nrow * ncol + 1) * sizeof(double)));
  if (!m[nrl])
    nrerror("allocation failure 2 in matrix()");
  m[nrl] += 1;
  m[nrl] -= ncl;
  for (i = nrl + 1; i <= nrh; i++)
    m[i] = m[i - 1] + ncol;
  return m;
}
```