user: 请从给定的汇编指令推导出C源代码：

```asm
<ShowRefs>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  mov    %rdi,%r12
  lea    D68(%rip),%rdi
  push   %rbp
  push   %rbx
  sub    $0x410,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x408(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r13
  mov    %r13,%rsi
  call   <FixFilename@plt>
  mov    %r13,%rdi
  call   <strlen@plt>
  cltq
  cmpb   $0x2f,-0x1(%rsp,%rax,1)
  je     L38
  lea    D40(%rip),%rsi
  mov    %r13,%rdi
  call   <strcat@plt>
L38:
  lea    0x100(%rsp),%r14
  mov    %r12,%rsi
  mov    %r14,%rdi
  call   <strcpy@plt>
  mov    $0x2e,%esi
  mov    %r14,%rdi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L28
  movb   $0x0,(%rax)
L28:
  lea    0x200(%rsp),%rbx
  mov    %r14,%rcx
  mov    %r13,%rdx
  lea    D54(%rip),%rsi
  mov    %rbx,%rdi
  call   <sprintf@plt>
  lea    D37(%rip),%rsi
  mov    %rbx,%rdi
  call   <fopen@plt>
  mov    %rax,%rbp
  test   %rax,%rax
  je     L65
  mov    %r12,%rsi
  mov    %rbx,%rdi
  call   <strcpy@plt>
  mov    $0x2e,%esi
  mov    %rbx,%rdi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L69
  movb   $0x0,(%rax)
L69:
  mov    %rbx,%rsi
  lea    D38(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  lea    D36(%rip),%r12
  jmp    L34
  nopl   0x0(%rax)
L42:
  mov    %rbp,%rdx
  mov    $0x1ff,%esi
  mov    %rbx,%rdi
  call   <fgets@plt>
  test   %rax,%rax
  jne    L91
L34:
  mov    %rbp,%rdi
  call   <feof@plt>
  test   %eax,%eax
  je     L42
  mov    %rbp,%rdi
  call   <fclose@plt>
  lea    D14(%rip),%rdi
  call   <puts@plt>
L65:
  mov    0x408(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L0
  add    $0x410,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L91:
  mov    %rbx,%rdi
  call   <strlen@plt>
  cltq
  lea    -0x1(%rbx,%rax,1),%rax
  cmpb   $0xa,(%rax)
  je     L107
  mov    %rbx,%rdx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L34
  cs nopw 0x0(%rax,%rax,1)
L107:
  movb   $0x0,(%rax)
  mov    %rbx,%rdx
  mov    %rbx,%rsi
  mov    %r12,%rdi
  xor    %eax,%eax
  call   <printf@plt>
  jmp    L34
L0:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D68
type: string
name: extract_symbolic_data
arguments: label: D40
type: string
name: extract_symbolic_data
arguments: label: D54
type: string
name: extract_symbolic_data
arguments: label: D37
type: string
name: extract_symbolic_data
arguments: label: D38
type: string
name: extract_symbolic_data
arguments: label: D36
type: string
name: extract_symbolic_data
arguments: label: D14
type: string

tool: D68: logs/

tool: D40: /

tool: D54: %s%s.ref

tool: D37: r

tool: D38: <h2>Reference URL's for %s.html</h2>
<ul>


tool: D36: <li><a href="%s">%s</a><br>


tool: D14: </ul><hr>

assistant: ```c
void ShowRefs(char *filename) {
  char logdir[256];
  char fn[256];
  char buf[512];
  FILE *fp;
  char *s;
  if ("logs/"[0] != '/')
    FixFilename("logs/", logdir);
  else
    strcpy(logdir, "logs/");
  s = logdir + strlen(logdir) - 1;
  if (*s != '/')
    strcat(logdir, "/");
  strcpy(fn, filename);
  s = strrchr(fn, '.');
  if (s)
    *s = '\0';
  sprintf(buf, "%s%s.ref", logdir, fn);
  fp = fopen(buf, "r");
  if (!fp)
    return;
  strcpy(buf, filename);
  s = strrchr(buf, '.');
  if (s)
    *s = '\0';
  printf("<h2>Reference URL's for %s.html</h2>\n<ul>\n", buf);
  while (!feof(fp)) {
    if (fgets(buf, 511, fp)) {
      s = buf + strlen(buf) - 1;
      if (*s == '\n')
        *s = '\0';
      printf("<li><a href=\"%s\">%s</a><br>\n", buf, buf);
    }
  }
  fclose(fp);
  puts("</ul><hr>");
}
```