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

```asm
<dump_vorticity_c>:
  endbr64
  push   %r15
  lea    D34(%rip),%r15
  push   %r14
  mov    %ecx,%r14d
  mov    %rdi,%rcx
  push   %r13
  mov    %rdi,%r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x228,%rsp
  mov    %edx,(%rsp)
  lea    0x110(%rsp),%r12
  lea    D24(%rip),%rdx
  mov    %r8d,0x4(%rsp)
  mov    %r12,%rdi
  mov    %rsi,%r8
  mov    $0x100,%esi
  mov    %r9,0x8(%rsp)
  lea    0x10(%rsp),%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x218(%rsp)
  xor    %eax,%eax
  call   <snprintf@plt>
  mov    %r15,%rsi
  mov    %r12,%rdi
  call   <fopen@plt>
  mov    %r12,%rcx
  lea    D107(%rip),%rdx
  test   %rax,%rax
  je     L36
  mov    %rax,%rbp
  mov    %rbx,%rcx
  lea    D58(%rip),%rdx
  mov    %r12,%rdi
  mov    $0x100,%esi
  xor    %eax,%eax
  call   <snprintf@plt>
  mov    %rbp,%rcx
  mov    $0x14,%edx
  mov    $0x1,%esi
  lea    D0(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rdi
  mov    %r12,%rdx
  xor    %eax,%eax
  lea    D20(%rip),%rsi
  call   <fprintf@plt>
  mov    0x4(%rsp),%r8d
  mov    (%rsp),%edx
  mov    %rbp,%rdi
  mov    %r14d,%ecx
  lea    D63(%rip),%rsi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    %rbp,%rcx
  mov    $0x13,%edx
  mov    $0x1,%esi
  lea    D116(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x14,%edx
  mov    $0x1,%esi
  lea    D47(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rcx
  mov    $0x14,%edx
  mov    $0x1,%esi
  lea    D56(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    %rbx,%r8
  mov    %r13,%rcx
  mov    $0x100,%esi
  lea    D108(%rip),%rdx
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <snprintf@plt>
  mov    %r15,%rsi
  mov    %r12,%rdi
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L7
  mov    (%rsp),%edx
  mov    0x8(%rsp),%rdi
  mov    %rax,%rcx
  mov    $0x8,%esi
  imul   %r14d,%edx
  imul   0x4(%rsp),%edx
  call   <fwrite@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
L27:
  mov    0x218(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L12
  add    $0x228,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L7:
  lea    0x10(%rsp),%rbp
  mov    %r12,%rcx
  lea    D36(%rip),%rdx
L36:
  mov    %rbp,%rdi
  mov    $0x100,%esi
  xor    %eax,%eax
  call   <snprintf@plt>
  mov    %rbp,%rdi
  call   <perror@plt>
  jmp    L27
L12:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: label: D34
data_type: string
name: retrieve_data
arguments: label: D24
data_type: string
name: retrieve_data
arguments: label: D107
data_type: string
name: retrieve_data
arguments: label: D58
data_type: string
name: retrieve_data
arguments: label: D0
data_type: string
name: retrieve_data
arguments: label: D20
data_type: string
name: retrieve_data
arguments: label: D63
data_type: string
name: retrieve_data
arguments: label: D116
data_type: string
name: retrieve_data
arguments: label: D47
data_type: string
name: retrieve_data
arguments: label: D56
data_type: string
name: retrieve_data
arguments: label: D108
data_type: string
name: retrieve_data
arguments: label: D36
data_type: string

tool: D34: wb

tool: D24: %s/%s.bov

tool: D107: WARNING: Unable to create BOV file (%s)

tool: D58: %s.dat

tool: D0: VARIABLE: vorticity


tool: D20: DATA_FILE: %s


tool: D63: DATA_SIZE: %d %d %d


tool: D116: DATA_COMPONENTS: 1


tool: D47: DATA_FORMAT: DOUBLE


tool: D56: DATA_ENDIAN: LITTLE


tool: D108: %s/%s.dat

tool: D36: WARNING: Unable to create DAT file (%s)

assistant: ```c
void dump_vorticity_c(char *dname, char *fname, int nx, int ny, int nz, double *array) {
  int i, j, k;
  FILE *fp;
  char errmsg[256];
  char buf[256];
  snprintf(buf, 256, "%s/%s.bov", dname, fname);
  fp = fopen(buf, "wb");
  if (fp == NULL) {
    snprintf(errmsg, 256, "WARNING: Unable to create BOV file (%s)", buf);
    perror(errmsg);
    return;
  }
  snprintf(buf, 256, "%s.dat", fname);
  fprintf(fp, "VARIABLE: vorticity\n");
  fprintf(fp, "DATA_FILE: %s\n", buf);
  fprintf(fp, "DATA_SIZE: %d %d %d\n", nx, ny, nz);
  fprintf(fp, "DATA_COMPONENTS: 1\n");
  fprintf(fp, "DATA_FORMAT: DOUBLE\n");
  fprintf(fp, "DATA_ENDIAN: LITTLE\n");
  fclose(fp);
  snprintf(buf, 256, "%s/%s.dat", dname, fname);
  fp = fopen(buf, "wb");
  if (fp == NULL) {
    snprintf(errmsg, 256, "WARNING: Unable to create DAT file (%s)", buf);
    perror(errmsg);
    return;
  }
  fwrite(array, sizeof(double), nx * ny * nz, fp);
  fclose(fp);
}
```