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

```asm
<write_matrix2>:
  endbr64
  push   %r15
  mov    %rdi,%r11
  push   %r14
  push   %r13
  mov    %rdx,%r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xd8,%rsp
  mov    %ecx,0x8(%rsp)
  mov    %r8d,(%rsp)
  mov    %r9d,0xc(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0xc8(%rsp)
  xor    %eax,%eax
  cmp    $0x3e7,%esi
  jg     L15
  lea    0x20(%rsp),%rdi
  mov    %esi,%edx
  mov    %r11,%rcx
  lea    D4(%rip),%rsi
  mov    %rdi,0x18(%rsp)
  call   <sprintf@plt>
L104:
  mov    0x18(%rsp),%rdi
  lea    D46(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%r15
  test   %rax,%rax
  je     L35
L62:
  mov    0x120(%rsp),%eax
  cmp    %eax,0x118(%rsp)
  jg     L37
  movslq 0xc(%rsp),%rax
  movslq 0x118(%rsp),%r12
  lea    D79(%rip),%r14
  shl    $0x3,%rax
  shl    $0x3,%r12
  mov    %rax,0x10(%rsp)
  nopl   0x0(%rax)
L44:
  mov    0xc(%rsp),%eax
  mov    0x10(%rsp),%rbx
  mov    %eax,0x4(%rsp)
  cmp    0x110(%rsp),%eax
  jg     L73
  xchg   %ax,%ax
L9:
  movslq 0x8(%rsp),%rbp
  cmp    (%rsp),%ebp
  jg     L68
  nopw   0x0(%rax,%rax,1)
L36:
  mov    0x0(%r13,%rbp,8),%rax
  mov    %r14,%rsi
  mov    %r15,%rdi
  add    $0x1,%rbp
  mov    (%rax,%rbx,1),%rax
  movsd  (%rax,%r12,1),%xmm0
  mov    $0x1,%eax
  call   <fprintf@plt>
  cmp    %ebp,(%rsp)
  jge    L36
L68:
  mov    %r15,%rsi
  mov    $0xa,%edi
  add    $0x8,%rbx
  call   <fputc@plt>
  addl   $0x1,0x4(%rsp)
  mov    0x4(%rsp),%eax
  cmp    %eax,0x110(%rsp)
  jge    L9
L73:
  mov    %r15,%rcx
  mov    $0x3c,%edx
  mov    $0x1,%esi
  add    $0x8,%r12
  lea    D20(%rip),%rdi
  call   <fwrite@plt>
  addl   $0x1,0x118(%rsp)
  mov    0x118(%rsp),%eax
  cmp    %eax,0x120(%rsp)
  jge    L44
L37:
  mov    %r15,%rdi
  call   <fclose@plt>
  test   %rax,%rax
  jne    L56
L23:
  mov    0xc8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L69
  add    $0xd8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L15:
  lea    -0x3e8(%rsi),%edx
  lea    0x20(%rsp),%rdi
  mov    %r11,%rcx
  xor    %eax,%eax
  lea    D31(%rip),%rsi
  mov    %rdi,0x18(%rsp)
  call   <sprintf@plt>
  jmp    L104
L56:
  mov    0x18(%rsp),%rdx
  lea    0x70(%rsp),%r12
  lea    D74(%rip),%rsi
  xor    %eax,%eax
  mov    %r12,%rdi
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    $0x1e0,%edi
  lea    D48(%rip),%rsi
  call   <errhandler@plt>
  jmp    L23
L35:
  mov    0x18(%rsp),%rdx
  lea    0x70(%rsp),%r12
  lea    D35(%rip),%rsi
  xor    %eax,%eax
  mov    %r12,%rdi
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    $0x1cd,%edi
  lea    D48(%rip),%rsi
  call   <errhandler@plt>
  jmp    L62
L69:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: tag: D4
type_guessed: string
name: read_data
arguments: tag: D46
type_guessed: string
name: read_data
arguments: tag: D79
type_guessed: string
name: read_data
arguments: tag: D20
type_guessed: string
name: read_data
arguments: tag: D31
type_guessed: string
name: read_data
arguments: tag: D74
type_guessed: string
name: read_data
arguments: tag: D48
type_guessed: string
name: read_data
arguments: tag: D35
type_guessed: string

tool: D4: /media/norbert/940CB6150CB5F27A/Documents/simulation/debug/d%i_%s

tool: D46: w

tool: D79: %f 

tool: D20: -----------------------------------------------------------


tool: D31: /media/norbert/940CB6150CB5F27A/Documents/simulation/debug/P/d%i_%s

tool: D74: Outputfile %s cannot be closed

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

tool: D35: Outputfile %s cannot be created

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];
  if (timeStepNumber < 1000) {
    sprintf(szFileName, "/media/norbert/940CB6150CB5F27A/Documents/simulation/debug/d%i_%s", timeStepNumber, szDebug);
  } else {
    timeStepNumber = timeStepNumber - 1000;
    sprintf(szFileName, "/media/norbert/940CB6150CB5F27A/Documents/simulation/debug/P/d%i_%s", timeStepNumber, szDebug);
  }
  fh = fopen(szFileName, "w");
  if (fh == NULL) {
    char szBuff[80];
    sprintf(szBuff, "Outputfile %s cannot be created", szFileName);
    errhandler(461, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProject/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(480, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/EvaBr/CFD-Lab/refs/heads/master/Backup/FinalProject/helper.c", szBuff);
  };
}
```