user: 请将以下的汇编代码转换成C语言代码:

```asm
<get_content_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    L8
  lea    D42(%rip),%rax
  jmp    L99
L8:
  mov    -0x8(%rbp),%rax
  lea    D138(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L33
  mov    -0x8(%rbp),%rax
  lea    D70(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L115
L33:
  lea    D155(%rip),%rax
  jmp    L99
L115:
  mov    -0x8(%rbp),%rax
  lea    D93(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L140
  lea    D42(%rip),%rax
  jmp    L99
L140:
  mov    -0x8(%rbp),%rax
  lea    D69(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L118
  lea    D4(%rip),%rax
  jmp    L99
L118:
  mov    -0x8(%rbp),%rax
  lea    D27(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L92
  mov    -0x8(%rbp),%rax
  lea    D12(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L58
L92:
  lea    D121(%rip),%rax
  jmp    L99
L58:
  mov    -0x8(%rbp),%rax
  lea    D105(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L43
  lea    D81(%rip),%rax
  jmp    L99
L43:
  mov    -0x8(%rbp),%rax
  lea    D89(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L84
  lea    D107(%rip),%rax
  jmp    L99
L84:
  lea    D42(%rip),%rax
L99:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D42
type_guessed: string
name: unpack_data
arguments: data_tag: D138
type_guessed: string
name: unpack_data
arguments: data_tag: D70
type_guessed: string
name: unpack_data
arguments: data_tag: D155
type_guessed: string
name: unpack_data
arguments: data_tag: D93
type_guessed: string
name: unpack_data
arguments: data_tag: D69
type_guessed: string
name: unpack_data
arguments: data_tag: D4
type_guessed: string
name: unpack_data
arguments: data_tag: D27
type_guessed: string
name: unpack_data
arguments: data_tag: D12
type_guessed: string
name: unpack_data
arguments: data_tag: D121
type_guessed: string
name: unpack_data
arguments: data_tag: D105
type_guessed: string
name: unpack_data
arguments: data_tag: D81
type_guessed: string
name: unpack_data
arguments: data_tag: D89
type_guessed: string
name: unpack_data
arguments: data_tag: D107
type_guessed: string

tool: D42: text/plain

tool: D138: .html

tool: D70: .htm

tool: D155: text/html

tool: D93: .txt

tool: D69: .css

tool: D4: text/css

tool: D27: .jpg

tool: D12: .jpeg

tool: D121: image/jpeg

tool: D105: .gif

tool: D81: image/gif

tool: D89: .png

tool: D107: image/png

assistant: ```c
char *get_content_type(char *filename) {
  char *ext = strrchr(filename, '.');
  if (!ext) {
    return "text/plain";
  }
  if (strcmp(ext, ".html") == 0 || strcmp(ext, ".htm") == 0) {
    return "text/html";
  }
  if (strcmp(ext, ".txt") == 0) {
    return "text/plain";
  }
  if (strcmp(ext, ".css") == 0) {
    return "text/css";
  }
  if (strcmp(ext, ".jpg") == 0 || strcmp(ext, ".jpeg") == 0) {
    return "image/jpeg";
  }
  if (strcmp(ext, ".gif") == 0) {
    return "image/gif";
  }
  if (strcmp(ext, ".png") == 0) {
    return "image/png";
  }
  return "text/plain";
}
```