user: What is the c source code of the assembly code below?

```asm
<get_fixed_filename>:
  endbr64
  push   %r14
  push   %r13
  mov    %edx,%r13d
  push   %r12
  mov    %rsi,%r12
  mov    $0x22,%esi
  push   %rbp
  mov    %ecx,%ebp
  push   %rbx
  mov    %rdi,%rbx
  movb   $0x0,D35(%rip)
  call   <strchr@plt>
  test   %rax,%rax
  je     L114
  lea    0x1(%rax),%rbx
  mov    $0x2f,%esi
  mov    %rbx,%rdi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L152
L207:
  lea    0x1(%rax),%rbx
L152:
  mov    $0x5c,%esi
  mov    %rbx,%rdi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L172
L203:
  lea    0x1(%rax),%rbx
L172:
  mov    $0x3a,%esi
  mov    %rbx,%rdi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L136
L194:
  lea    0x1(%rax),%rbx
  jmp    L136
  nopl   0x0(%rax)
L21:
  call   <isspace@plt>
  test   %rax,%rax
  je     L140
  add    $0x1,%rbx
L136:
  movsbl (%rbx),%edi
  test   %dil,%dil
  jne    L21
L97:
  lea    D35(%rip),%r14
  mov    %r14,%rdx
L169:
  movb   $0x0,(%rdx)
  mov    %r14,%rdi
  call   <strtrim@plt>
  mov    $0x2e,%esi
  mov    %r14,%rdi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L160
  cmpb   $0x0,0x1(%rax)
  jne    L148
  movb   $0x0,(%rax)
L160:
  cmpb   $0x0,D35(%rip)
  jne    L162
  test   %ebp,%ebp
  jne    L78
L162:
  pop    %rbx
  mov    %r14,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L140:
  movzbl (%rbx),%eax
  test   %al,%al
  je     L97
  lea    D35(%rip),%r14
  mov    %r14,%rdx
  nopl   0x0(%rax)
L166:
  cmp    $0x22,%al
  je     L169
  cmp    $0x3b,%al
  je     L169
  add    $0x1,%rbx
  mov    %al,(%rdx)
  add    $0x1,%rdx
  movzbl (%rbx),%eax
  test   %al,%al
  jne    L166
  jmp    L169
  nopl   0x0(%rax,%rax,1)
L148:
  mov    %rax,%rdi
  call   <strlwc@plt>
  jmp    L160
  nopw   0x0(%rax,%rax,1)
L114:
  mov    $0x2f,%esi
  mov    %rbx,%rdi
  call   <strrchr@plt>
  test   %rax,%rax
  jne    L207
  mov    $0x5c,%esi
  mov    %rbx,%rdi
  call   <strrchr@plt>
  test   %rax,%rax
  jne    L203
  mov    $0x3a,%esi
  mov    %rbx,%rdi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L136
  jmp    L194
  nopw   0x0(%rax,%rax,1)
L78:
  xor    %edi,%edi
  call   <time@plt>
  mov    %r13d,%ecx
  mov    %r12,%rdx
  mov    %r14,%rdi
  mov    %eax,%r8d
  lea    D28(%rip),%rsi
  call   <sprintf@plt>
  pop    %rbx
  mov    %r14,%rax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
```

tool_calls: name: extract_symbolic_data
arguments: tag: D28
data_type: string

tool: D28: 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;
}
```