user: 这段汇编代码用C语言表示是什么样的?

```asm
<write_matrix>:
  endbr64
  push   %r15
  mov    %r8d,%r15d
  push   %r14
  mov    %r9d,%r14d
  push   %r13
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %edx,%ebx
  sub    %ebx,%ecx
  add    $0x1,%ecx
  sub    $0x88,%rsp
  mov    0xc0(%rsp),%edx
  mov    %rdi,(%rsp)
  mov    %edx,0x10(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  mov    %r9d,%eax
  sub    %r8d,%eax
  add    $0x1,%eax
  imul   %eax,%ecx
  movslq %ecx,%rdi
  mov    %ecx,0xc(%rsp)
  shl    $0x2,%rdi
  call   <malloc@plt>
  mov    0x10(%rsp),%edx
  mov    %rax,%r13
  test   %edx,%edx
  je     L48
  mov    (%rsp),%rdi
  lea    D57(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,0x10(%rsp)
  test   %rax,%rax
  je     L69
L115:
  cmp    %r15d,%r14d
  jl     L92
  movslq %r15d,%rax
  sub    %r15d,%r14d
  mov    %r12d,%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   0x0(%rax)
L11:
  cmp    %ebx,%r12d
  jl     L43
  movslq %r8d,%rdx
  lea    (%r14,%rdx,1),%rsi
  lea    0x0(%r13,%rdx,4),%rax
  neg    %rdx
  lea    (%r15,%rdx,8),%rdx
  lea    (%r11,%rsi,4),%rsi
  add    %rbp,%rdx
  nopw   0x0(%rax,%rax,1)
L72:
  mov    (%rdx,%rax,2),%rdi
  pxor   %xmm0,%xmm0
  add    $0x4,%rax
  cvtsd2ss (%rdi,%rcx,1),%xmm0
  movss  %xmm0,-0x4(%rax)
  cmp    %rsi,%rax
  jne    L72
  add    %r10d,%r8d
L43:
  add    $0x8,%rcx
  cmp    %r9,%rcx
  jne    L11
L92:
  mov    0x10(%rsp),%rbx
  mov    0xc(%rsp),%edx
  mov    %r13,%rdi
  mov    $0x4,%esi
  mov    %rbx,%rcx
  call   <fwrite@plt>
  mov    %rbx,%rdi
  call   <fclose@plt>
  test   %rax,%rax
  jne    L25
L10:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L16
  add    $0x88,%rsp
  mov    %r13,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10c0 <free@plt>
L48:
  mov    (%rsp),%rdi
  lea    D5(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,0x10(%rsp)
  test   %rax,%rax
  jne    L115
  lea    0x20(%rsp),%r8
  mov    (%rsp),%rdx
  lea    D51(%rip),%rsi
  mov    %r8,%rdi
  mov    %r8,0x18(%rsp)
  call   <sprintf@plt>
  mov    0x18(%rsp),%rdx
  mov    $0x107,%edi
  lea    D27(%rip),%rsi
  call   <errhandler@plt>
  jmp    L115
L25:
  mov    (%rsp),%rdx
  lea    0x20(%rsp),%r12
  lea    D26(%rip),%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    $0x115,%edi
  lea    D27(%rip),%rsi
  call   <errhandler@plt>
  jmp    L10
L69:
  lea    0x20(%rsp),%r8
  mov    (%rsp),%rdx
  lea    D58(%rip),%rsi
  mov    %r8,%rdi
  mov    %r8,0x18(%rsp)
  call   <sprintf@plt>
  mov    0x18(%rsp),%rdx
  mov    $0xfb,%edi
  lea    D27(%rip),%rsi
  call   <errhandler@plt>
  jmp    L115
L16:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: data_label: D57
datatype: string
name: parse_data
arguments: data_label: D5
datatype: string
name: parse_data
arguments: data_label: D51
datatype: string
name: parse_data
arguments: data_label: D27
datatype: string
name: parse_data
arguments: data_label: D26
datatype: string
name: parse_data
arguments: data_label: D58
datatype: string

tool: D57: w

tool: D5: a

tool: D51: Outputfile %s cannot be opened

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

tool: D26: Outputfile %s cannot be closed

tool: D58: Outputfile %s cannot be created

assistant: ```c
void write_matrix(const char *szFileName, double **m, int nrl, int nrh, int ncl, int nch, double xlength, double ylength, int fFirst) {
  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;
  if (fFirst) {
    fh = fopen(szFileName, "w");
    if (fh == NULL) {
      char szBuff[80];
      sprintf(szBuff, "Outputfile %s cannot be created", szFileName);
      errhandler(251, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/grantathon/computational_fluid_dynamics/refs/heads/master/01_assignment/helper.c", szBuff);
    }
  } else {
    fh = fopen(szFileName, "a");
    if (fh == NULL) {
      char szBuff[80];
      sprintf(szBuff, "Outputfile %s cannot be opened", szFileName);
      errhandler(263, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/grantathon/computational_fluid_dynamics/refs/heads/master/01_assignment/helper.c", szBuff);
    }
  }
  for (j = ncl; j <= nch; j++)
    for (i = nrl; i <= nrh; i++)
      tmp[k++] = (float)m[i][j];
  fwrite(tmp, sizeof(float), nSize, fh);
  if (fclose(fh)) {
    char szBuff[80];
    sprintf(szBuff, "Outputfile %s cannot be closed", szFileName);
    errhandler(277, "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/grantathon/computational_fluid_dynamics/refs/heads/master/01_assignment/helper.c", szBuff);
  };
  free(tmp);
}
```