user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<mime_type>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %rdi,-0x18(%rbp)
  mov    -0x18(%rbp),%rax
  mov    $0x2e,%esi
  mov    %rax,%rdi
  call   <strrchr@plt>
  mov    %rax,-0x8(%rbp)
  cmpq   $0x0,-0x8(%rbp)
  jne    L114
  lea    D49(%rip),%rax
  jmp    L29
L114:
  mov    -0x8(%rbp),%rax
  lea    D1(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L85
  lea    D104(%rip),%rax
  jmp    L29
L85:
  mov    -0x8(%rbp),%rax
  lea    D92(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L129
  lea    D99(%rip),%rax
  jmp    L29
L129:
  mov    -0x8(%rbp),%rax
  lea    D94(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L79
  lea    D3(%rip),%rax
  jmp    L29
L79:
  mov    -0x8(%rbp),%rax
  lea    D29(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L34
  lea    D130(%rip),%rax
  jmp    L29
L34:
  mov    -0x8(%rbp),%rax
  lea    D76(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L68
  lea    D25(%rip),%rax
  jmp    L29
L68:
  mov    -0x8(%rbp),%rax
  lea    D75(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L54
  lea    D118(%rip),%rax
  jmp    L29
L54:
  lea    D49(%rip),%rax
L29:
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_tag: D49
type_guessed: string
name: disassemble_data
arguments: data_tag: D1
type_guessed: string
name: disassemble_data
arguments: data_tag: D104
type_guessed: string
name: disassemble_data
arguments: data_tag: D92
type_guessed: string
name: disassemble_data
arguments: data_tag: D99
type_guessed: string
name: disassemble_data
arguments: data_tag: D94
type_guessed: string
name: disassemble_data
arguments: data_tag: D3
type_guessed: string
name: disassemble_data
arguments: data_tag: D29
type_guessed: string
name: disassemble_data
arguments: data_tag: D130
type_guessed: string
name: disassemble_data
arguments: data_tag: D76
type_guessed: string
name: disassemble_data
arguments: data_tag: D25
type_guessed: string
name: disassemble_data
arguments: data_tag: D75
type_guessed: string
name: disassemble_data
arguments: data_tag: D118
type_guessed: string

tool: D49: text/plain

tool: D1: .xml

tool: D104: application/octet-stream

tool: D92: .zip

tool: D99: application/zip

tool: D94: .gif

tool: D3: image/gif

tool: D29: .jpg

tool: D130: image/jpeg

tool: D76: .png

tool: D25: image/png

tool: D75: .svg

tool: D118: image/svg+xml

assistant: ```c
const char *mime_type(const char *path) {
  char *pos = strrchr(path, '.');
  if (pos == NULL)
    return "text/plain";
  else if (strcmp(pos, ".xml") == 0)
    return "application/octet-stream";
  else if (strcmp(pos, ".zip") == 0)
    return "application/zip";
  else if (strcmp(pos, ".gif") == 0)
    return "image/gif";
  else if (strcmp(pos, ".jpg") == 0)
    return "image/jpeg";
  else if (strcmp(pos, ".png") == 0)
    return "image/png";
  else if (strcmp(pos, ".svg") == 0)
    return "image/svg+xml";
  else
    return "text/plain";
}
```