user: Please show me the C implementation that matches the assembly code listed below:

```asm
<read_matrix>:
  endbr64
  push   %r15
  mov    %r8d,%r15d
  mov    %ecx,%r8d
  push   %r14
  sub    %edx,%r8d
  mov    %r9d,%r14d
  push   %r13
  add    $0x1,%r8d
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x88,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  mov    %r9d,%eax
  sub    %r15d,%eax
  add    $0x1,%eax
  imul   %eax,%r8d
  movslq %r8d,%rdi
  mov    %r8d,0x10(%rsp)
  shl    $0x2,%rdi
  call   <malloc@plt>
  mov    0x8(%rsp),%rdi
  lea    D39(%rip),%rsi
  mov    %rax,%r13
  call   <fopen@plt>
  mov    0x10(%rsp),%r8d
  test   %rax,%rax
  mov    %rax,(%rsp)
  je     L54
L29:
  mov    (%rsp),%rcx
  mov    %r8d,%edx
  mov    $0x4,%esi
  mov    %r13,%rdi
  call   <fread@plt>
  cmp    %r15d,%r14d
  jl     L70
  movslq %r15d,%rax
  sub    %r15d,%r14d
  mov    %ebp,%r10d
  movslq %ebx,%rdx
  lea    0x1(%rax,%r14,1),%r9
  sub    %ebx,%r10d
  lea    0x4(%r13),%r11
  xor    %r8d,%r8d
  lea    0x0(,%rax,8),%rcx
  mov    %r13,%rax
  mov    %r10d,%r14d
  shl    $0x3,%r9
  neg    %rax
  add    $0x1,%r10d
  add    %rax,%rax
  lea    (%rax,%rdx,8),%r15
  nopl   (%rax)
L34:
  cmp    %ebx,%ebp
  jl     L12
  movslq %r8d,%rdx
  lea    (%r14,%rdx,1),%rsi
  lea    0x0(%r13,%rdx,4),%rax
  neg    %rdx
  lea    (%r11,%rsi,4),%rdi
  lea    (%r15,%rdx,8),%rsi
  add    %r12,%rsi
  xchg   %ax,%ax
L88:
  mov    (%rsi,%rax,2),%rdx
  pxor   %xmm0,%xmm0
  add    $0x4,%rax
  cvtss2sd -0x4(%rax),%xmm0
  movsd  %xmm0,(%rdx,%rcx,1)
  cmp    %rdi,%rax
  jne    L88
  add    %r10d,%r8d
L12:
  add    $0x8,%rcx
  cmp    %r9,%rcx
  jne    L34
L70:
  mov    (%rsp),%rdi
  call   <fclose@plt>
  test   %rax,%rax
  jne    L64
L22:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L82
  add    $0x88,%rsp
  mov    %r13,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10c0 <free@plt>
L64:
  mov    0x8(%rsp),%rdx
  lea    0x20(%rsp),%r12
  lea    D14(%rip),%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    $0x13f,%edi
  lea    D26(%rip),%rsi
  call   <errhandler@plt>
  jmp    L22
L54:
  lea    0x20(%rsp),%r9
  mov    0x8(%rsp),%rdx
  mov    %r8d,0x1c(%rsp)
  lea    D36(%rip),%rsi
  mov    %r9,%rdi
  mov    %r9,0x10(%rsp)
  call   <sprintf@plt>
  mov    0x10(%rsp),%rdx
  mov    $0x12f,%edi
  lea    D26(%rip),%rsi
  call   <errhandler@plt>
  mov    0x1c(%rsp),%r8d
  jmp    L29
L82:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D39
datatype: string
name: extract_symbolic_data
arguments: tag: D14
datatype: string
name: extract_symbolic_data
arguments: tag: D26
datatype: string
name: extract_symbolic_data
arguments: tag: D36
datatype: string

tool: D39: r

tool: D14: Inputfile %s cannot be closed

tool: D26: /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/grantathon/computational_fluid_dynamics/refs/heads/master/project/ns_sim_parallel/helper.c

tool: D36: Can not read file %s !!!

assistant: ```c
void read_matrix(const char *szFileName, double **m, int nrl, int nrh, int ncl, int nch) {
  int i, j;
  FILE *fh = 0;
  int nSize = (nrh - nrl + 1) * (nch - ncl + 1);
  float *tmp = (float *)malloc((size_t)(nSize * sizeof(float)));
  int k = 0;
  fh = fopen(szFileName, "r");
  if (fh == NULL) {
    char szBuff[80];
    sprintf(szBuff, "Can not read file %s !!!", szFileName);
    errhandler(303, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/grantathon/computational_fluid_dynamics/refs/heads/master/project/ns_sim_parallel/helper.c", szBuff);
  }
  fread(tmp, sizeof(float), nSize, fh);
  for (j = ncl; j <= nch; j++)
    for (i = nrl; i <= nrh; i++)
      m[i][j] = tmp[k++];
  if (fclose(fh)) {
    char szBuff[80];
    sprintf(szBuff, "Inputfile %s cannot be closed", szFileName);
    errhandler(319, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/grantathon/computational_fluid_dynamics/refs/heads/master/project/ns_sim_parallel/helper.c", szBuff);
  };
  free(tmp);
}
```