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

```asm
<get_file_type>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    %rsi,-0x20(%rbp)
  mov    -0x18(%rbp),%rax
  mov    $0x2e,%esi
  mov    %rax,%rdi
  call   <strrchr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  je     L103
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  movzbl (%rax),%eax
  test   %al,%al
  jne    L32
L103:
  mov    -0x20(%rbp),%rax
  lea    D57(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L46
L32:
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  lea    D22(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L73
  mov    -0x20(%rbp),%rax
  lea    D57(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L46
L73:
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  lea    D63(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L113
  mov    -0x20(%rbp),%rax
  lea    D71(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L46
L113:
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  lea    D34(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L82
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  lea    D80(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L59
L82:
  mov    -0x20(%rbp),%rax
  lea    D104(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L46
L59:
  mov    -0x8(%rbp),%rax
  add    $0x1,%rax
  lea    D72(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L98
  mov    -0x20(%rbp),%rax
  lea    D52(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L46
L98:
  mov    -0x20(%rbp),%rax
  lea    D57(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcpy@plt>
  jmp    L46
L46:
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D57
data_type: string
name: parse_data
arguments: tag: D22
data_type: string
name: parse_data
arguments: tag: D63
data_type: string
name: parse_data
arguments: tag: D71
data_type: string
name: parse_data
arguments: tag: D34
data_type: string
name: parse_data
arguments: tag: D80
data_type: string
name: parse_data
arguments: tag: D104
data_type: string
name: parse_data
arguments: tag: D72
data_type: string
name: parse_data
arguments: tag: D52
data_type: string

tool: D57: text/plain

tool: D22: txt

tool: D63: html

tool: D71: text/html

tool: D34: jpeg

tool: D80: jpg

tool: D104: image/jpeg

tool: D72: png

tool: D52: image/png

assistant: ```c
void get_file_type(const char *file, char *type) {
  char *ext = strrchr(file, '.');
  if (!ext || !*(ext + 1))
    strcpy(type, "text/plain");
  else if (!strcmp(ext + 1, "txt"))
    strcpy(type, "text/plain");
  else if (!strcmp(ext + 1, "html"))
    strcpy(type, "text/html");
  else if (!strcmp(ext + 1, "jpeg") || !strcmp(ext + 1, "jpg"))
    strcpy(type, "image/jpeg");
  else if (!strcmp(ext + 1, "png"))
    strcpy(type, "image/png");
  else
    strcpy(type, "text/plain");
}
```