user: 请将以下的汇编代码转换成C语言代码:

```asm
<get_fixed_filename>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %rsi,%r12
  mov    %edx,%r13d
  mov    %ecx,%ebp
  movb   $0x0,D65(%rip)
  mov    $0x22,%esi
  call   <strchr@plt>
  mov    %rax,%r14
  mov    %rbx,%rdi
  test   %rax,%rax
  je     L132
  lea    0x1(%rax),%rdi
  mov    %rdi,%r14
L132:
  mov    $0x2f,%esi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L16
  lea    0x1(%rax),%r14
  mov    %r14,%rbx
L50:
  mov    $0x5c,%esi
  mov    %r14,%rdi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L137
L70:
  lea    0x1(%rax),%rbx
L137:
  mov    $0x3a,%esi
  mov    %rbx,%rdi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L148
L196:
  lea    0x1(%rax),%rbx
L148:
  movzbl (%rbx),%edi
  test   %dil,%dil
  je     L55
L234:
  movsbl %dil,%edi
  call   <isspace@plt>
  test   %rax,%rax
  je     L14
  add    $0x1,%rbx
  movzbl (%rbx),%edi
  test   %dil,%dil
  jne    L234
L55:
  lea    D65(%rip),%rdx
  jmp    L186
L16:
  test   %r14,%r14
  jne    L47
  mov    $0x5c,%esi
  mov    %rbx,%rdi
  call   <strrchr@plt>
  test   %rax,%rax
  jne    L70
  mov    $0x3a,%esi
  mov    %rbx,%rdi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L148
  jmp    L196
L14:
  movzbl (%rbx),%eax
  test   %al,%al
  je     L181
  lea    D65(%rip),%rdx
L214:
  cmp    $0x22,%al
  je     L186
  cmp    $0x3b,%al
  je     L186
  add    $0x1,%rdx
  mov    %al,-0x1(%rdx)
  add    $0x1,%rbx
  movzbl (%rbx),%eax
  test   %al,%al
  jne    L214
L186:
  movb   $0x0,(%rdx)
  lea    D65(%rip),%rbx
  mov    %rbx,%rdi
  call   <strtrim@plt>
  mov    $0x2e,%esi
  mov    %rbx,%rdi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L88
  cmpb   $0x0,0x1(%rax)
  jne    L54
  movb   $0x0,(%rax)
L88:
  cmpb   $0x0,D65(%rip)
  jne    L156
  test   %ebp,%ebp
  jne    L161
L156:
  lea    D65(%rip),%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L181:
  lea    D65(%rip),%rdx
  jmp    L186
L54:
  mov    %rax,%rdi
  call   <strlwc@plt>
  jmp    L88
L161:
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%r8d
  mov    %r13d,%ecx
  mov    %r12,%rdx
  lea    D21(%rip),%rsi
  lea    D65(%rip),%rdi
  call   <sprintf@plt>
  jmp    L156
L47:
  mov    %r14,%rbx
  jmp    L50
```

tool_calls: name: read_data
arguments: data_tag: D21
datatype: string

tool: D21: unknown-%ld%d%ld.bin

assistant: ```c
char *get_fixed_filename(char *line, long size, unsigned int msg_crc, int generate_filename) {
  static char filename[1024];
  char *p, *q, *r;
  *filename = 0;
  if ((p = strchr(line, '\"'))) {
    p++;
  }
  if ((q = strrchr((p ? p : line), '/'))) {
    p = ++q;
  }
  if ((q = strrchr((p ? p : line), '\\'))) {
    p = ++q;
  }
  if ((q = strrchr((p ? p : line), ':'))) {
    p = ++q;
  }
  if (!p) {
    p = line;
  }
  while (*p && isspace(*p & 0xff))
    p++;
  for (r = filename, q = p; *q; q++) {
    if (*q == '"' || *q == ';') {
      break;
    }
    *r++ = *q;
  }
  *r = 0;
  strtrim(filename);
  if ((q = strrchr(filename, '.'))) {
    if (!*(q + 1)) {
      *q = 0;
    } else {
      strlwc(q);
    }
  }
  if (!*filename && generate_filename) {
    sprintf(filename, "unknown-%ld%d%ld.bin", size, msg_crc, time(0));
  }
  return filename;
}
```