user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<write_vtkHeader>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x60,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x58(%rsp)
  xor    %eax,%eax
  test   %rdi,%rdi
  je     L14
  mov    %rdi,%rbp
  mov    %rdi,%rcx
  mov    %esi,%r12d
  mov    %edx,%ebx
  mov    $0x1,%esi
  mov    $0x1b,%edx
  add    $0x1,%ebx
  add    $0x1,%r12d
  lea    D42(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x3f,%edx
  mov    $0x1,%esi
  lea    D62(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x6,%edx
  mov    $0x1,%esi
  lea    D70(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rsi
  mov    $0xa,%edi
  call   <fputc@plt>
  mov    %rbp,%rcx
  mov    $0x18,%edx
  mov    $0x1,%esi
  lea    D76(%rip),%rdi
  call   <fwrite@plt>
  mov    %ebx,%ecx
  imul   %r12d,%ebx
  mov    %r12d,%edx
  lea    D10(%rip),%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  xor    %eax,%eax
  lea    D22(%rip),%rsi
  mov    %rbp,%rdi
  mov    %ebx,%edx
  call   <fprintf@plt>
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L11
  add    $0x60,%rsp
  mov    %rbp,%rsi
  mov    $0xa,%edi
  pop    %rbx
  pop    %rbp
  pop    %r12
  jmp    10c0 <fputc@plt>
  nopw   0x0(%rax,%rax,1)
L14:
  mov    %rsp,%r12
  lea    D68(%rip),%rsi
  mov    %r12,%rdi
  call   <sprintf@plt>
  mov    %r12,%rdx
  mov    $0x59,%edi
  lea    D66(%rip),%rsi
  call   <errhandler@plt>
  mov    0x58(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L11
  add    $0x60,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L11:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D42
datatype: string
name: parse_data
arguments: label: D62
datatype: string
name: parse_data
arguments: label: D70
datatype: string
name: parse_data
arguments: label: D76
datatype: string
name: parse_data
arguments: label: D10
datatype: string
name: parse_data
arguments: label: D22
datatype: string
name: parse_data
arguments: label: D68
datatype: string
name: parse_data
arguments: label: D66
datatype: string

tool: D42: # vtk DataFile Version 2.0


tool: D62: generated by CFD-lab course output (written by Tobias Neckel) 


tool: D70: ASCII


tool: D76: DATASET STRUCTURED_GRID


tool: D10: DIMENSIONS  %i %i 1 


tool: D22: POINTS %i float


tool: D68: Null pointer in write_vtkHeader

tool: D66: /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_serial/visual.c

assistant: ```c
void write_vtkHeader(FILE *fp, int imax, int jmax, double dx, double dy) {
  if (fp == NULL) {
    char szBuff[80];
    sprintf(szBuff, "Null pointer in write_vtkHeader");
    errhandler(89, "/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_serial/visual.c", szBuff);
    return;
  }
  fprintf(fp, "# vtk DataFile Version 2.0\n");
  fprintf(fp, "generated by CFD-lab course output (written by Tobias Neckel) \n");
  fprintf(fp, "ASCII\n");
  fprintf(fp, "\n");
  fprintf(fp, "DATASET STRUCTURED_GRID\n");
  fprintf(fp, "DIMENSIONS  %i %i 1 \n", imax + 1, jmax + 1);
  fprintf(fp, "POINTS %i float\n", (imax + 1) * (jmax + 1));
  fprintf(fp, "\n");
}
```