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

```asm
<lookup>:
  endbr64
  push   %rbp
  mov    $0x2e,%esi
  call   <strrchr@plt>
  lea    D40(%rip),%rsi
  mov    %rax,%rdi
  mov    %rax,%rbp
  call   <strcasecmp@plt>
  mov    %rax,%r8
  lea    D141(%rip),%rax
  test   %r8,%r8
  jne    L37
L12:
  pop    %rbp
  ret
  nopw   0x0(%rax,%rax,1)
L37:
  lea    D14(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  mov    %rax,%r8
  lea    D158(%rip),%rax
  test   %r8,%r8
  je     L12
  lea    D125(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  mov    %rax,%r8
  lea    D111(%rip),%rax
  test   %r8,%r8
  je     L12
  lea    D139(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  mov    %rax,%r8
  lea    D133(%rip),%rax
  test   %r8,%r8
  je     L12
  lea    D145(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  mov    %rax,%r8
  lea    D142(%rip),%rax
  test   %r8,%r8
  je     L12
  lea    D90(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  mov    %rax,%r8
  lea    D148(%rip),%rax
  test   %r8,%r8
  je     L12
  lea    D156(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcasecmp@plt>
  mov    %rax,%r8
  lea    D109(%rip),%rax
  test   %r8,%r8
  je     L12
  mov    %rbp,%rdi
  lea    D55(%rip),%rsi
  call   <strcasecmp@plt>
  mov    $0x0,%edx
  pop    %rbp
  test   %rax,%rax
  lea    D106(%rip),%rax
  cmovne %rdx,%rax
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D40
type_guessed: string
name: retrieve_data
arguments: data_tag: D141
type_guessed: string
name: retrieve_data
arguments: data_tag: D14
type_guessed: string
name: retrieve_data
arguments: data_tag: D158
type_guessed: string
name: retrieve_data
arguments: data_tag: D125
type_guessed: string
name: retrieve_data
arguments: data_tag: D111
type_guessed: string
name: retrieve_data
arguments: data_tag: D139
type_guessed: string
name: retrieve_data
arguments: data_tag: D133
type_guessed: string
name: retrieve_data
arguments: data_tag: D145
type_guessed: string
name: retrieve_data
arguments: data_tag: D142
type_guessed: string
name: retrieve_data
arguments: data_tag: D90
type_guessed: string
name: retrieve_data
arguments: data_tag: D148
type_guessed: string
name: retrieve_data
arguments: data_tag: D156
type_guessed: string
name: retrieve_data
arguments: data_tag: D109
type_guessed: string
name: retrieve_data
arguments: data_tag: D55
type_guessed: string
name: retrieve_data
arguments: data_tag: D106
type_guessed: string

tool: D40: .css

tool: D141: text/css

tool: D14: .html

tool: D158: text/html

tool: D125: .gif

tool: D111: image/gif

tool: D139: .ico

tool: D133: image/x-ico

tool: D145: .jpg

tool: D142: image/jpeg

tool: D90: .js

tool: D148: text/javascript

tool: D156: .php

tool: D109: text/x-php

tool: D55: .png

tool: D106: image/png

assistant: ```c
const char *lookup(const char *path) {
  char *ext = strrchr(path, '.');
  const char *type;
  if (strcasecmp(ext, ".css") == 0) {
    type = "text/css";
  } else if (strcasecmp(ext, ".html") == 0) {
    type = "text/html";
  } else if (strcasecmp(ext, ".gif") == 0) {
    type = "image/gif";
  } else if (strcasecmp(ext, ".ico") == 0) {
    type = "image/x-ico";
  } else if (strcasecmp(ext, ".jpg") == 0) {
    type = "image/jpeg";
  } else if (strcasecmp(ext, ".js") == 0) {
    type = "text/javascript";
  } else if (strcasecmp(ext, ".php") == 0) {
    type = "text/x-php";
  } else if (strcasecmp(ext, ".png") == 0) {
    type = "image/png";
  } else {
    type = NULL;
  }
  return type;
}
```