user: Please show me the C implementation that matches the assembly code listed below:

```asm
<find_contenttype>:
  endbr64
  push   %rbp
  mov    $0x2e,%esi
  call   <strrchr@plt>
  test   %rax,%rax
  je     L68
  lea    D123(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L53
L29:
  lea    D22(%rip),%rax
L37:
  pop    %rbp
  ret
  nopl   0x0(%rax,%rax,1)
L53:
  lea    D92(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L29
  lea    D168(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D153(%rip),%rax
  test   %r8,%r8
  je     L37
  lea    D90(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D130(%rip),%rax
  test   %r8,%r8
  je     L37
  lea    D122(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D49(%rip),%rax
  test   %r8,%r8
  je     L37
  lea    D79(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D118(%rip),%rax
  test   %r8,%r8
  je     L37
  lea    D108(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L6
  lea    D128(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L6
  lea    D60(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  je     L6
  lea    D143(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  jne    L68
L6:
  lea    D18(%rip),%rax
  pop    %rbp
  ret
  nopl   0x0(%rax)
L68:
  lea    D46(%rip),%rax
  pop    %rbp
  ret
```

tool_calls: name: parse_data
arguments: data_label: D123
datatype: string
name: parse_data
arguments: data_label: D22
datatype: string
name: parse_data
arguments: data_label: D92
datatype: string
name: parse_data
arguments: data_label: D168
datatype: string
name: parse_data
arguments: data_label: D153
datatype: string
name: parse_data
arguments: data_label: D90
datatype: string
name: parse_data
arguments: data_label: D130
datatype: string
name: parse_data
arguments: data_label: D122
datatype: string
name: parse_data
arguments: data_label: D49
datatype: string
name: parse_data
arguments: data_label: D79
datatype: string
name: parse_data
arguments: data_label: D118
datatype: string
name: parse_data
arguments: data_label: D108
datatype: string
name: parse_data
arguments: data_label: D128
datatype: string
name: parse_data
arguments: data_label: D60
datatype: string
name: parse_data
arguments: data_label: D143
datatype: string
name: parse_data
arguments: data_label: D18
datatype: string
name: parse_data
arguments: data_label: D46
datatype: string

tool: D123: .html

tool: D22: text/html

tool: D92: .htm

tool: D168: .jpg

tool: D153: image/jpeg

tool: D90: .png

tool: D130: image/png

tool: D122: .gif

tool: D49: image/gif

tool: D79: .css

tool: D118: text/css

tool: D108: .txt

tool: D128: .c

tool: D60: .cpp

tool: D143: .log

tool: D18: text/plain

tool: D46: application/octet-stream

assistant: ```c
char *find_contenttype(char *path) {
  char *extension = strrchr(path, '.');
  if (extension != NULL) {
    if ((strcmp(extension, ".html") == 0 || strcmp(extension, ".htm") == 0)) {
      return "text/html";
    } else if (strcmp(extension, ".jpg") == 0) {
      return "image/jpeg";
    } else if (strcmp(extension, ".png") == 0) {
      return "image/png";
    } else if (strcmp(extension, ".gif") == 0) {
      return "image/gif";
    } else if (strcmp(extension, ".css") == 0) {
      return "text/css";
    } else if (strcmp(extension, ".txt") == 0 || strcmp(extension, ".c") == 0 || strcmp(extension, ".cpp") == 0 || strcmp(extension, ".log") == 0) {
      return "text/plain";
    }
  }
  return "application/octet-stream";
}
```