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

```asm
<grabber_local_get>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x4b8,%rsp
  mov    %rdi,-0x4b8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  movq   $0x0,-0x4a0(%rbp)
  movq   $0x0,-0x498(%rbp)
  movq   $0x0,-0x490(%rbp)
  lea    D18(%rip),%rax
  mov    %rax,-0x480(%rbp)
  lea    D98(%rip),%rax
  mov    %rax,-0x478(%rbp)
  lea    D14(%rip),%rax
  mov    %rax,-0x470(%rbp)
  lea    D66(%rip),%rax
  mov    %rax,-0x468(%rbp)
  lea    D52(%rip),%rax
  mov    %rax,-0x460(%rbp)
  lea    D24(%rip),%rax
  mov    %rax,-0x458(%rbp)
  lea    D30(%rip),%rax
  mov    %rax,-0x450(%rbp)
  lea    D93(%rip),%rax
  mov    %rax,-0x448(%rbp)
  lea    D33(%rip),%rax
  mov    %rax,-0x440(%rbp)
  lea    D92(%rip),%rax
  mov    %rax,-0x438(%rbp)
  lea    D108(%rip),%rax
  mov    %rax,-0x430(%rbp)
  lea    D61(%rip),%rax
  mov    %rax,-0x428(%rbp)
  cmpq   $0x0,-0x4b8(%rbp)
  je     L158
  mov    -0x4b8(%rbp),%rax
  mov    $0x2f,%esi
  mov    %rax,%rdi
  call   <strrchr@plt>
  mov    %rax,-0x488(%rbp)
  cmpq   $0x0,-0x488(%rbp)
  je     L9
  mov    -0x4b8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    -0x488(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    %eax,%ebx
  mov    %ebx,%edx
  mov    -0x4b8(%rbp),%rax
  mov    %edx,%esi
  mov    %rax,%rdi
  call   <strndup@plt>
  mov    %rax,-0x4a0(%rbp)
  mov    -0x4b8(%rbp),%rax
  mov    $0x2e,%esi
  mov    %rax,%rdi
  call   <strrchr@plt>
  mov    %rax,-0x488(%rbp)
  cmpq   $0x0,-0x488(%rbp)
  je     L117
  mov    -0x4b8(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%ebx
  mov    -0x4a0(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  sub    %eax,%ebx
  mov    -0x488(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  mov    %eax,%edx
  mov    %ebx,%eax
  sub    %edx,%eax
  lea    -0x1(%rax),%ebx
  mov    -0x4a0(%rbp),%rax
  mov    %rax,%rdi
  call   <strlen@plt>
  cltq
  lea    0x1(%rax),%rdx
  mov    -0x4b8(%rbp),%rax
  add    %rdx,%rax
  mov    %ebx,%esi
  mov    %rax,%rdi
  call   <strndup@plt>
  mov    %rax,-0x498(%rbp)
  movl   $0x0,-0x4a8(%rbp)
  jmp    L157
L133:
  movq   $0x0,-0x420(%rbp)
  movq   $0x0,-0x418(%rbp)
  lea    -0x410(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x7e,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  mov    -0x4a8(%rbp),%eax
  mov    -0x460(%rbp,%rax,8),%rsi
  mov    -0x498(%rbp),%rcx
  mov    -0x4a0(%rbp),%rdx
  lea    -0x420(%rbp),%rax
  mov    %rsi,%r9
  mov    %rcx,%r8
  mov    %rdx,%rcx
  lea    D48(%rip),%rdx
  mov    $0x400,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  lea    -0x420(%rbp),%rax
  mov    %rax,%rdi
  call   <vh_file_exists@plt>
  test   %rax,%rax
  je     L27
  lea    -0x420(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,-0x490(%rbp)
  jmp    L179
L27:
  addl   $0x1,-0x4a8(%rbp)
L157:
  cmpl   $0x7,-0x4a8(%rbp)
  jbe    L133
  movl   $0x0,-0x4a8(%rbp)
  jmp    L88
L141:
  movl   $0x0,-0x4a4(%rbp)
  jmp    L177
L135:
  movq   $0x0,-0x420(%rbp)
  movq   $0x0,-0x418(%rbp)
  lea    -0x410(%rbp),%rdx
  mov    $0x0,%eax
  mov    $0x7e,%ecx
  mov    %rdx,%rdi
  rep stos %rax,%es:(%rdi)
  mov    -0x4a8(%rbp),%eax
  mov    -0x460(%rbp,%rax,8),%rsi
  mov    -0x4a4(%rbp),%eax
  mov    -0x480(%rbp,%rax,8),%rcx
  mov    -0x4a0(%rbp),%rdx
  lea    -0x420(%rbp),%rax
  mov    %rsi,%r9
  mov    %rcx,%r8
  mov    %rdx,%rcx
  lea    D48(%rip),%rdx
  mov    $0x400,%esi
  mov    %rax,%rdi
  call   <snprintf@plt>
  lea    -0x420(%rbp),%rax
  mov    %rax,%rdi
  call   <vh_file_exists@plt>
  test   %rax,%rax
  je     L105
  lea    -0x420(%rbp),%rax
  mov    %rax,%rdi
  call   <strdup@plt>
  mov    %rax,-0x490(%rbp)
  jmp    L179
L105:
  addl   $0x1,-0x4a4(%rbp)
L177:
  cmpl   $0x3,-0x4a4(%rbp)
  jbe    L135
  addl   $0x1,-0x4a8(%rbp)
L88:
  cmpl   $0x7,-0x4a8(%rbp)
  jbe    L141
  jmp    L179
L158:
  nop
  jmp    L179
L9:
  nop
  jmp    L179
L117:
  nop
L179:
  cmpq   $0x0,-0x4a0(%rbp)
  je     L147
  mov    -0x4a0(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L147:
  cmpq   $0x0,-0x498(%rbp)
  je     L85
  mov    -0x498(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
L85:
  mov    -0x490(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L75
  call   <__stack_chk_fail@plt>
L75:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D18
data_type: string
name: disassemble_data
arguments: tag: D98
data_type: string
name: disassemble_data
arguments: tag: D14
data_type: string
name: disassemble_data
arguments: tag: D66
data_type: string
name: disassemble_data
arguments: tag: D52
data_type: string
name: disassemble_data
arguments: tag: D24
data_type: string
name: disassemble_data
arguments: tag: D30
data_type: string
name: disassemble_data
arguments: tag: D93
data_type: string
name: disassemble_data
arguments: tag: D33
data_type: string
name: disassemble_data
arguments: tag: D92
data_type: string
name: disassemble_data
arguments: tag: D108
data_type: string
name: disassemble_data
arguments: tag: D61
data_type: string
name: disassemble_data
arguments: tag: D48
data_type: string

tool: D18: cover

tool: D98: COVER

tool: D14: front

tool: D66: FRONT

tool: D52: jpg

tool: D24: JPG

tool: D30: jpeg

tool: D93: JPEG

tool: D33: png

tool: D92: PNG

tool: D108: tbn

tool: D61: TBN

tool: D48: %s/%s.%s

assistant: ```c
char *grabber_local_get(const char *filename) {
  char *s, *dir = NULL, *file = NULL, *cv = NULL;
  unsigned int i, j;
  const char *known_filenames[] = {"cover", "COVER", "front", "FRONT"};
  const char *known_extensions[] = {"jpg", "JPG", "jpeg", "JPEG", "png", "PNG", "tbn", "TBN"};
  if (!filename)
    goto get_end;
  s = strrchr(filename, '/');
  if (!s)
    goto get_end;
  dir = strndup(filename, strlen(filename) - strlen(s));
  s = strrchr(filename, '.');
  if (!s)
    goto get_end;
  file = strndup(filename + strlen(dir) + 1, strlen(filename) - strlen(dir) - strlen(s) - 1);
  for (i = 0; i < (sizeof(known_extensions) / sizeof(known_extensions[0])); i++) {
    char cover[1024] = {0};
    snprintf(cover, sizeof(cover), "%s/%s.%s", dir, file, known_extensions[i]);
    if (vh_file_exists(cover)) {
      cv = strdup(cover);
      goto get_end;
    }
  }
  for (i = 0; i < (sizeof(known_extensions) / sizeof(known_extensions[0])); i++)
    for (j = 0; j < (sizeof(known_filenames) / sizeof(known_filenames[0])); j++) {
      char cover[1024] = {0};
      snprintf(cover, sizeof(cover), "%s/%s.%s", dir, known_filenames[j], known_extensions[i]);
      if (vh_file_exists(cover)) {
        cv = strdup(cover);
        goto get_end;
      }
    }
get_end:
  if (dir)
    free(dir);
  if (file)
    free(file);
  return cv;
}
```