user: Please show me the C implementation that matches the assembly code listed below:

```asm
<DumpData>:
  endbr64
  push   %r15
  mov    %edx,%r15d
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  push   %rbp
  mov    %rsi,%rbp
  mov    $0x2f,%esi
  push   %rbx
  sub    $0x28,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <strrchr@plt>
  mov    $0x5c,%esi
  mov    %r12,%rdi
  mov    %rax,%rbx
  call   <strrchr@plt>
  cmp    %rax,%rbx
  jb     L12
L18:
  test   %rbx,%rbx
  lea    0x1(%rbx),%r13
  lea    0xf(%rsp),%r14
  mov    %rbp,%rdi
  cmove  %r12,%r13
  lea    D5(%rip),%rsi
  movslq %r15d,%rbx
  call   <fopen@plt>
  mov    $0x9,%edx
  xor    %esi,%esi
  mov    %r14,%rdi
  mov    %rax,%rbp
  call   <memset@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  mov    %r13,%rsi
  mov    %r14,%rdi
  lea    D34(%rip),%r13
  lea    -0x4(%rax),%rdx
  call   <memcpy@plt>
  mov    %r14,%rdx
  mov    %rbp,%rdi
  xor    %eax,%eax
  lea    D38(%rip),%rsi
  lea    D19(%rip),%r14
  call   <fprintf@plt>
  mov    %r12,%rdi
  lea    0x8(%rsp),%rsi
  call   <ReadFile@plt>
  mov    %rax,%r12
  cmp    0x8(%rsp),%r15d
  jge    L44
  nopw   0x0(%rax,%rax,1)
L47:
  movzbl (%r12,%rbx,1),%edx
  mov    %r13,%rsi
  mov    %rbp,%rdi
  xor    %eax,%eax
  call   <fprintf@plt>
  mov    0x8(%rsp),%eax
  lea    -0x1(%rax),%edx
  cmp    %ebx,%edx
  je     L58
  mov    %rbp,%rcx
  mov    $0x3,%edx
  mov    $0x1,%esi
  mov    %r14,%rdi
  call   <fwrite@plt>
  mov    0x8(%rsp),%eax
L58:
  add    $0x1,%rbx
  cmp    %ebx,%eax
  jg     L47
L44:
  mov    %rbp,%rcx
  mov    $0x5,%edx
  mov    $0x1,%esi
  lea    D0(%rip),%rdi
  call   <fwrite@plt>
  mov    %rbp,%rdi
  call   <fclose@plt>
  mov    %r12,%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L25
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  xchg   %ax,%ax
L12:
  mov    $0x5c,%esi
  mov    %r12,%rdi
  call   <strrchr@plt>
  mov    %rax,%rbx
  jmp    L18
L25:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D5
datatype: string
name: extract_symbolic_data
arguments: data_label: D34
datatype: string
name: extract_symbolic_data
arguments: data_label: D38
datatype: string
name: extract_symbolic_data
arguments: data_label: D19
datatype: string
name: extract_symbolic_data
arguments: data_label: D0
datatype: string

tool: D5: wb

tool: D34: %d

tool: D38: char far %s[] ={


tool: D19: ,


tool: D0:  };


assistant: ```c
void DumpData(const char *infn, const char *outfn, int skip) {
  FILE *f;
  int i;
  int insize;
  char symname[9];
  const char *in;
  const char *infn_stripped = strrchr(infn, '/');
  if (strrchr(infn, '\\') > infn_stripped)
    infn_stripped = strrchr(infn, '\\');
  if (infn_stripped == NULL)
    infn_stripped = infn;
  else
    ++infn_stripped;
  f = fopen(outfn, "wb");
  memset(symname, 0, 9);
  memcpy(symname, infn_stripped, strlen(infn_stripped) - 4);
  fprintf(f, "char far %s[] ={\r\n", symname);
  in = ReadFile(infn, &insize);
  for (i = skip; i < insize; ++i) {
    fprintf(f, "%d", (unsigned char)in[i]);
    if (i != insize - 1)
      fprintf(f, ",\r\n");
  }
  fprintf(f, " };\r\n");
  fclose(f);
  free((char *)in);
}
```