user: Translate the below assembly code into C programming language:

```asm
<get_fixed_filename>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x40,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  mov    %ecx,-0x38(%rbp)
  movb   $0x0,D41(%rip)
  mov    -0x28(%rbp),%rax
  mov    $0x22,%esi
  mov    %rax,%rdi
  call   <strchr@plt>
  mov    %rax,-0x18(%rbp)
  cmpq   $0x0,-0x18(%rbp)
  je     L72
  addq   $0x1,-0x18(%rbp)
L72:
  cmpq   $0x0,-0x18(%rbp)
  je     L226
  mov    -0x18(%rbp),%rax
  jmp    L89
L226:
  mov    -0x28(%rbp),%rax
L89:
  mov    $0x2f,%esi
  mov    %rax,%rdi
  call   <strrchr@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  je     L52
  addq   $0x1,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x18(%rbp)
L52:
  cmpq   $0x0,-0x18(%rbp)
  je     L180
  mov    -0x18(%rbp),%rax
  jmp    L20
L180:
  mov    -0x28(%rbp),%rax
L20:
  mov    $0x5c,%esi
  mov    %rax,%rdi
  call   <strrchr@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  je     L199
  addq   $0x1,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x18(%rbp)
L199:
  cmpq   $0x0,-0x18(%rbp)
  je     L220
  mov    -0x18(%rbp),%rax
  jmp    L98
L220:
  mov    -0x28(%rbp),%rax
L98:
  mov    $0x3a,%esi
  mov    %rax,%rdi
  call   <strrchr@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  je     L116
  addq   $0x1,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,-0x18(%rbp)
L116:
  cmpq   $0x0,-0x18(%rbp)
  jne    L185
  mov    -0x28(%rbp),%rax
  mov    %rax,-0x18(%rbp)
  jmp    L185
L28:
  addq   $0x1,-0x18(%rbp)
L185:
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  je     L44
  mov    -0x18(%rbp),%rax
  movzbl (%rax),%eax
  movsbl %al,%eax
  mov    %eax,%edi
  call   <isspace@plt>
  test   %rax,%rax
  jne    L28
L44:
  lea    D41(%rip),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x18(%rbp),%rax
  mov    %rax,-0x10(%rbp)
  jmp    L45
L75:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x22,%al
  je     L213
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  cmp    $0x3b,%al
  je     L213
  mov    -0x8(%rbp),%rax
  lea    0x1(%rax),%rdx
  mov    %rdx,-0x8(%rbp)
  mov    -0x10(%rbp),%rdx
  movzbl (%rdx),%edx
  mov    %dl,(%rax)
  addq   $0x1,-0x10(%rbp)
L45:
  mov    -0x10(%rbp),%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L75
L213:
  mov    -0x8(%rbp),%rax
  movb   $0x0,(%rax)
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  call   <strtrim@plt>
  mov    $0x2e,%esi
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  call   <strrchr@plt>
  mov    %rax,-0x10(%rbp)
  cmpq   $0x0,-0x10(%rbp)
  je     L53
  mov    -0x10(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L70
  mov    -0x10(%rbp),%rax
  movb   $0x0,(%rax)
  jmp    L53
L70:
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <strlwc@plt>
L53:
  movzbl D41(%rip),%eax
  test   %al,%al
  jne    L14
  cmpl   $0x0,-0x38(%rbp)
  je     L14
  mov    $0x0,%edi
  call   <time@plt>
  mov    %eax,%ecx
  mov    -0x34(%rbp),%edx
  mov    -0x30(%rbp),%rax
  mov    %ecx,%r8d
  mov    %edx,%ecx
  mov    %rax,%rdx
  lea    D64(%rip),%rax
  mov    %rax,%rsi
  lea    D41(%rip),%rax
  mov    %rax,%rdi
  call   <sprintf@plt>
L14:
  lea    D41(%rip),%rax
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D64
datatype: string

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