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

```asm
<wide_convert>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x428,%rsp
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  mov    %fs:0x28,%rax
  mov    %rax,0x418(%rsp)
  xor    %eax,%eax
  lea    0x10(%rsp),%rdi
  mov    $0x200,%esi
  call   <bzero@plt>
  lea    0x210(%rsp),%rdi
  mov    $0x200,%esi
  call   <bzero@plt>
  lea    D27(%rip),%rsi
  mov    %rbx,%rdi
  call   <fopen@plt>
  mov    %rax,%r14
  mov    $0x0,%eax
  test   %r14,%r14
  je     L16
  lea    D47(%rip),%rsi
  mov    %rbp,%rdi
  call   <fopen@plt>
  mov    %rax,%r13
  mov    $0x0,%r15d
  lea    0x10(%rsp),%r12
  lea    0x210(%rsp),%rax
  mov    %rax,0x8(%rsp)
  test   %r13,%r13
  jne    L68
  mov    %r14,%rdi
  call   <fclose@plt>
  mov    $0x0,%eax
  jmp    L16
L62:
  mov    0x8(%rsp),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L31
  mov    %r12,%rsi
  mov    0x8(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strcpy@plt>
  mov    %rbx,%rdx
  lea    D33(%rip),%rsi
  mov    %r13,%rdi
  call   <fprintf@plt>
  jmp    L31
L99:
  lea    0x1(%rbp),%rdx
  lea    D38(%rip),%rsi
  mov    %r13,%rdi
  call   <fprintf@plt>
L68:
  mov    $0x0,%esi
  mov    %r14,%rdi
  call   <get_line@plt>
  mov    %rax,%rbx
  test   %rax,%rax
  je     L87
  mov    $0x3a,%esi
  mov    %rbx,%rdi
  call   <strchr@plt>
  mov    %rax,%rbp
  mov    $0x200,%esi
  mov    %r12,%rdi
  call   <bzero@plt>
  mov    %ebp,%edx
  sub    %ebx,%edx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  call   <strncpy@plt>
  test   %r15d,%r15d
  jne    L62
L31:
  cmpb   $0x0,0x210(%rsp)
  jne    L99
  mov    %r12,%rsi
  mov    0x8(%rsp),%rbx
  mov    %rbx,%rdi
  call   <strcpy@plt>
  mov    %rbx,%rdx
  lea    D33(%rip),%rsi
  mov    %r13,%rdi
  call   <fprintf@plt>
  mov    $0x1,%r15d
  jmp    L99
L87:
  mov    %r13,%rdi
  call   <fclose@plt>
  mov    %r14,%rdi
  call   <fclose@plt>
  mov    $0x1,%eax
L16:
  mov    0x418(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L32
  add    $0x428,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L32:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_tag: D27
type_guessed: string
name: read_data
arguments: data_tag: D47
type_guessed: string
name: read_data
arguments: data_tag: D33
type_guessed: string
name: read_data
arguments: data_tag: D38
type_guessed: string

tool: D27: r

tool: D47: w

tool: D33: File: %s


tool: D38: %s


assistant: ```c
int wide_convert(char *catfile, char *grp) {
  FILE *pfile;
  FILE *out;
  char *str;
  char *p, *q;
  char FileName[512];
  char LastFileName[512];
  int gotFileName = 0;
  bzero(FileName, 512);
  bzero(LastFileName, 512);
  pfile = fopen(catfile, "r");
  if (!pfile) {
    return (0);
  }
  out = fopen(grp, "w");
  if (!out) {
    fclose(pfile);
    return (0);
  }
  while ((str = get_line(pfile, 0)) != NULL) {
    p = strstr(str, ":");
    bzero(FileName, 512);
    strncpy(FileName, str, p - str);
    if (gotFileName) {
      if (strcmp(FileName, LastFileName)) {
        strcpy(LastFileName, FileName);
        fprintf(out, "File: %s\n", LastFileName);
      }
    }
    if (strlen(LastFileName) == 0) {
      strcpy(LastFileName, FileName);
      gotFileName = 1;
      fprintf(out, "File: %s\n", LastFileName);
    }
    q = strstr(p + 1, ":");
    fprintf(out, "%s\n", p + 1);
  }
  fclose(out);
  fclose(pfile);
  return (1);
}
```