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

```asm
<write_matrix2>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xf0,%rsp
  mov    %rdi,-0xd8(%rbp)
  mov    %esi,-0xdc(%rbp)
  mov    %rdx,-0xe8(%rbp)
  mov    %ecx,-0xe0(%rbp)
  mov    %r8d,-0xec(%rbp)
  mov    %r9d,-0xf0(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0xb8(%rbp)
  mov    -0xd8(%rbp),%rcx
  mov    -0xdc(%rbp),%edx
  lea    -0xb0(%rbp),%rax
  lea    D6(%rip),%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    -0xb0(%rbp),%rax
  lea    D31(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <fopen@plt>
  mov    %rax,-0xb8(%rbp)
  cmpq   $0x0,-0xb8(%rbp)
  jne    L42
  lea    -0xb0(%rbp),%rdx
  lea    -0x60(%rbp),%rax
  lea    D67(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    -0x60(%rbp),%rax
  mov    %rax,%rdx
  lea    D56(%rip),%rax
  mov    %rax,%rsi
  mov    $0x13a,%edi
  call   <errhandler@plt>
L42:
  mov    0x18(%rbp),%eax
  mov    %eax,-0xbc(%rbp)
  jmp    L39
L72:
  mov    -0xf0(%rbp),%eax
  mov    %eax,-0xc0(%rbp)
  jmp    L5
L70:
  mov    -0xe0(%rbp),%eax
  mov    %eax,-0xc4(%rbp)
  jmp    L1
L14:
  mov    -0xc4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xe8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xc0(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xbc(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xb8(%rbp),%rax
  movq   %rdx,%xmm0
  lea    D3(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <fprintf@plt>
  addl   $0x1,-0xc4(%rbp)
L1:
  mov    -0xc4(%rbp),%eax
  cmp    -0xec(%rbp),%eax
  jle    L14
  mov    -0xb8(%rbp),%rax
  mov    %rax,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  addl   $0x1,-0xc0(%rbp)
L5:
  mov    -0xc0(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jle    L70
  mov    -0xb8(%rbp),%rax
  mov    %rax,%rcx
  mov    $0x3c,%edx
  mov    $0x1,%esi
  lea    D18(%rip),%rax
  mov    %rax,%rdi
  call   <fwrite@plt>
  addl   $0x1,-0xbc(%rbp)
L39:
  mov    -0xbc(%rbp),%eax
  cmp    0x20(%rbp),%eax
  jle    L72
  mov    -0xb8(%rbp),%rax
  mov    %rax,%rdi
  call   <fclose@plt>
  test   %rax,%rax
  je     L68
  lea    -0xb0(%rbp),%rdx
  lea    -0x60(%rbp),%rax
  lea    D21(%rip),%rcx
  mov    %rcx,%rsi
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <sprintf@plt>
  lea    -0x60(%rbp),%rax
  mov    %rax,%rdx
  lea    D56(%rip),%rax
  mov    %rax,%rsi
  mov    $0x14d,%edi
  call   <errhandler@plt>
L68:
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L6
  call   <__stack_chk_fail@plt>
L6:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D6
type_guessed: string
name: retrieve_data
arguments: data_tag: D31
type_guessed: string
name: retrieve_data
arguments: data_tag: D67
type_guessed: string
name: retrieve_data
arguments: data_tag: D56
type_guessed: string
name: retrieve_data
arguments: data_tag: D3
type_guessed: string
name: retrieve_data
arguments: data_tag: D18
type_guessed: string
name: retrieve_data
arguments: data_tag: D21
type_guessed: string

tool: D6: debug/d%i_%s

tool: D31: w

tool: D67: Outputfile %s cannot be created

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

tool: D3: %f 

tool: D18: -----------------------------------------------------------


tool: D21: Outputfile %s cannot be closed

assistant: ```c
void write_matrix2(const char *szDebug, int timeStepNumber, double ***m, int nrl, int nrh, int ncl, int nch, int nll, int nlh) {
  int i, j, k;
  FILE *fh = 0;
  char szFileName[80];
  sprintf(szFileName, "debug/d%i_%s", timeStepNumber, szDebug);
  fh = fopen(szFileName, "w");
  if (fh == NULL) {
    char szBuff[80];
    sprintf(szBuff, "Outputfile %s cannot be created", szFileName);
    errhandler(314, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProjectPresentation/helper.c", szBuff);
  }
  for (k = nll; k <= nlh; k++) {
    for (j = ncl; j <= nch; j++) {
      for (i = nrl; i <= nrh; i++) {
        fprintf(fh, "%f ", m[i][j][k]);
      }
      fprintf(fh, "\n");
    }
    fprintf(fh, "-----------------------------------------------------------\n");
  }
  if (fclose(fh)) {
    char szBuff[80];
    sprintf(szBuff, "Outputfile %s cannot be closed", szFileName);
    errhandler(333, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProjectPresentation/helper.c", szBuff);
  };
}
```