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

```asm
<short_lfn>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  mov    $0x2e,%esi
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  sub    $0x20,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  movb   $0x0,0x17(%rsp)
  movq   $0x0,0xf(%rsp)
  movl   $0x0,0xb(%rsp)
  call   <strrchr@plt>
  test   %rax,%rax
  je     L178
  mov    %rax,%rbx
  cmp    %rax,%rbp
  je     L178
  mov    %rax,%r13
  mov    $0x8,%eax
  lea    0xf(%rsp),%r14
  mov    %rbp,%rsi
  sub    %rbp,%r13
  mov    %r14,%rdi
  cmp    %eax,%r13d
  cmovg  %eax,%r13d
  mov    %r13d,%edx
  movslq %r13d,%r13
  call   <strncpy@plt>
  lea    0x1(%rbx),%rsi
  lea    0xb(%rsp),%rdi
  mov    $0x3,%edx
  movb   $0x0,0xf(%rsp,%r13,1)
  call   <strncpy@plt>
L177:
  movzbl 0xf(%rsp),%eax
  movzbl 0xb(%rsp),%edx
  movb   $0x0,0xe(%rsp)
  test   %al,%al
  je     L125
L97:
  mov    %r14,%rcx
  jmp    L188
  nopl   0x0(%rax)
L202:
  movzbl 0x1(%rcx),%eax
  add    $0x1,%rcx
  test   %al,%al
  je     L125
L188:
  cmp    $0x20,%al
  je     L171
  cmp    $0x2e,%al
  jne    L202
L171:
  movb   $0x5f,(%rcx)
  movzbl 0x1(%rcx),%eax
  add    $0x1,%rcx
  test   %al,%al
  jne    L188
L125:
  test   %dl,%dl
  je     L166
  lea    0xb(%rsp),%rax
  jmp    L47
  cs nopw 0x0(%rax,%rax,1)
L60:
  movzbl 0x1(%rax),%edx
  add    $0x1,%rax
  test   %dl,%dl
  je     L166
L47:
  cmp    $0x20,%dl
  je     L35
  cmp    $0x2e,%dl
  jne    L60
L35:
  movb   $0x5f,(%rax)
  movzbl 0x1(%rax),%edx
  add    $0x1,%rax
  test   %dl,%dl
  jne    L47
L166:
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <strcpy@plt>
  cmpb   $0x0,0xb(%rsp)
  jne    L176
L130:
  mov    0x18(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L54
  add    $0x20,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L178:
  lea    0xf(%rsp),%r14
  mov    $0x8,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <strncpy@plt>
  mov    %rbp,%rdi
  movb   $0x0,0x17(%rsp)
  call   <strlen@plt>
  cmp    $0x8,%eax
  jg     L191
  movzbl 0xf(%rsp),%eax
  movb   $0x0,0xb(%rsp)
  xor    %edx,%edx
  test   %al,%al
  jne    L97
  jmp    L166
  nopl   (%rax)
L176:
  mov    %r12,%rdi
  lea    D7(%rip),%rsi
  call   <strcat@plt>
  lea    0xb(%rsp),%rsi
  mov    %r12,%rdi
  call   <strcat@plt>
  jmp    L130
  nopl   0x0(%rax)
L191:
  lea    0x8(%rbp),%rsi
  lea    0xb(%rsp),%rdi
  mov    $0x3,%edx
  call   <strncpy@plt>
  jmp    L177
L54:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: label: D7
type_infered: string

tool: D7: .

assistant: ```c
char *short_lfn(const char *lfn, char *dos_name) {
  char name[9] = "", ext[4] = "";
  char *dot = strrchr(lfn, '.');
  if (dot == NULL || dot == lfn) {
    strncpy(name, lfn, 8);
    name[8] = '\0';
    if (strlen(lfn) > 8) {
      strncpy(ext, lfn + 8, 3);
      ext[3] = '\0';
    } else
      ext[0] = '\0';
  } else {
    int name_len = dot - lfn;
    if (name_len > 8)
      name_len = 8;
    strncpy(name, lfn, name_len);
    name[name_len] = '\0';
    strncpy(ext, dot + 1, 3);
    ext[3] = '\0';
  }
  {
    char *ptr;
    for (ptr = name; *ptr; ptr++)
      if (*ptr == ' ' || *ptr == '.')
        *ptr = '_';
    for (ptr = ext; *ptr; ptr++)
      if (*ptr == ' ' || *ptr == '.')
        *ptr = '_';
  }
  strcpy(dos_name, name);
  if (*ext) {
    strcat(dos_name, ".");
    strcat(dos_name, ext);
  }
  return dos_name;
}
```