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

```asm
<write_matrix>:
  endbr64
  push   %r15
  push   %r14
  mov    %r8d,%r14d
  push   %r13
  mov    %r9d,%r13d
  push   %r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  mov    %edx,%ebx
  sub    $0x88,%rsp
  mov    0xc0(%rsp),%edx
  mov    %rdi,(%rsp)
  mov    %ecx,0x14(%rsp)
  sub    %ebx,%ecx
  mov    %edx,0x8(%rsp)
  mov    %ecx,%r12d
  add    $0x1,%r12d
  mov    %fs:0x28,%rax
  mov    %rax,0x78(%rsp)
  xor    %eax,%eax
  mov    %r9d,%eax
  sub    %r8d,%eax
  add    $0x1,%eax
  imul   %eax,%r12d
  movslq %r12d,%rdi
  shl    $0x2,%rdi
  call   <malloc@plt>
  mov    0x8(%rsp),%edx
  mov    %rax,%r15
  test   %edx,%edx
  je     L7
  mov    (%rsp),%rdi
  lea    D64(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%r8
  test   %rax,%rax
  je     L114
L81:
  cmp    %r14d,%r13d
  jl     L97
  mov    0x14(%rsp),%esi
  cmp    %ebx,%esi
  jl     L97
  movslq %r14d,%rax
  sub    %r14d,%r13d
  movslq %ebx,%rdx
  xor    %r9d,%r9d
  lea    0x1(%rax,%r13,1),%r11
  lea    0x0(,%rax,8),%rcx
  mov    %r15,%rax
  neg    %rax
  shl    $0x3,%r11
  lea    0x4(%r15),%r13
  add    %rax,%rax
  lea    (%rax,%rdx,8),%r14
  mov    %esi,%eax
  sub    %ebx,%eax
  mov    %eax,%ebx
  lea    0x1(%rax),%r10d
  nopl   (%rax)
L75:
  movslq %r9d,%rdx
  lea    (%rbx,%rdx,1),%rsi
  lea    (%r15,%rdx,4),%rax
  neg    %rdx
  lea    (%r14,%rdx,8),%rdx
  lea    0x0(%r13,%rsi,4),%rsi
  add    %rbp,%rdx
  nopw   0x0(%rax,%rax,1)
L59:
  mov    (%rdx,%rax,2),%rdi
  pxor   %xmm0,%xmm0
  add    $0x4,%rax
  cvtsd2ss (%rdi,%rcx,1),%xmm0
  movss  %xmm0,-0x4(%rax)
  cmp    %rax,%rsi
  jne    L59
  add    $0x8,%rcx
  add    %r10d,%r9d
  cmp    %r11,%rcx
  jne    L75
L97:
  mov    %r15,%rdi
  mov    %r8,%rcx
  mov    %r12d,%edx
  mov    $0x4,%esi
  mov    %r8,0x8(%rsp)
  call   <fwrite@plt>
  mov    0x8(%rsp),%rdi
  call   <fclose@plt>
  test   %rax,%rax
  jne    L18
L105:
  mov    0x78(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L117
  add    $0x88,%rsp
  mov    %r15,%rdi
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    10c0 <free@plt>
L7:
  mov    (%rsp),%rdi
  lea    D41(%rip),%rsi
  call   <fopen@plt>
  mov    %rax,%r8
  test   %rax,%rax
  jne    L81
  lea    0x20(%rsp),%r9
  mov    (%rsp),%rdx
  mov    %rax,0x18(%rsp)
  lea    D65(%rip),%rsi
  mov    %r9,%rdi
  mov    %r9,0x8(%rsp)
  call   <sprintf@plt>
  mov    0x8(%rsp),%rdx
  mov    $0x107,%edi
  lea    D78(%rip),%rsi
  call   <errhandler@plt>
  mov    0x18(%rsp),%r8
  jmp    L81
L18:
  mov    (%rsp),%rdx
  lea    0x20(%rsp),%r12
  lea    D71(%rip),%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    $0x115,%edi
  lea    D78(%rip),%rsi
  call   <errhandler@plt>
  jmp    L105
L114:
  lea    0x20(%rsp),%r9
  mov    (%rsp),%rdx
  mov    %rax,0x18(%rsp)
  lea    D75(%rip),%rsi
  mov    %r9,%rdi
  mov    %r9,0x8(%rsp)
  call   <sprintf@plt>
  mov    0x8(%rsp),%rdx
  mov    $0xfb,%edi
  lea    D78(%rip),%rsi
  call   <errhandler@plt>
  mov    0x18(%rsp),%r8
  jmp    L81
L117:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_tag: D64
type_guessed: string
name: disassemble_data
arguments: data_tag: D41
type_guessed: string
name: disassemble_data
arguments: data_tag: D65
type_guessed: string
name: disassemble_data
arguments: data_tag: D78
type_guessed: string
name: disassemble_data
arguments: data_tag: D71
type_guessed: string
name: disassemble_data
arguments: data_tag: D75
type_guessed: string

tool: D64: w

tool: D41: a

tool: D65: Outputfile %s cannot be opened

tool: D78: /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: D71: Outputfile %s cannot be closed

tool: D75: 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);
}
```