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

```asm
<lookup>:
  endbr64
  push   %rbx
  mov    $0x2e,%esi
  call   <strrchr@plt>
  mov    %rax,%rbx
  lea    D144(%rip),%rsi
  mov    %rax,%rdi
  call   <strcasecmp@plt>
  mov    %rax,%rdx
  lea    D2(%rip),%rax
  test   %rdx,%rdx
  jne    L14
L44:
  pop    %rbx
  ret
L14:
  lea    D95(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcasecmp@plt>
  mov    %rax,%rdx
  lea    D64(%rip),%rax
  test   %rdx,%rdx
  je     L44
  lea    D68(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcasecmp@plt>
  mov    %rax,%rdx
  lea    D40(%rip),%rax
  test   %rdx,%rdx
  je     L44
  lea    D67(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcasecmp@plt>
  mov    %rax,%rdx
  lea    D110(%rip),%rax
  test   %rdx,%rdx
  je     L44
  lea    D113(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcasecmp@plt>
  mov    %rax,%rdx
  lea    D1(%rip),%rax
  test   %rdx,%rdx
  je     L44
  lea    D63(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcasecmp@plt>
  mov    %rax,%rdx
  lea    D52(%rip),%rax
  test   %rdx,%rdx
  je     L44
  lea    D114(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcasecmp@plt>
  mov    %rax,%rdx
  lea    D15(%rip),%rax
  test   %rdx,%rdx
  je     L44
  lea    D30(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcasecmp@plt>
  test   %rax,%rax
  lea    D131(%rip),%rax
  mov    $0x0,%edx
  cmovne %rdx,%rax
  jmp    L44
```

tool_calls: name: parse_data
arguments: data_label: D144
data_type: string
name: parse_data
arguments: data_label: D2
data_type: string
name: parse_data
arguments: data_label: D95
data_type: string
name: parse_data
arguments: data_label: D64
data_type: string
name: parse_data
arguments: data_label: D68
data_type: string
name: parse_data
arguments: data_label: D40
data_type: string
name: parse_data
arguments: data_label: D67
data_type: string
name: parse_data
arguments: data_label: D110
data_type: string
name: parse_data
arguments: data_label: D113
data_type: string
name: parse_data
arguments: data_label: D1
data_type: string
name: parse_data
arguments: data_label: D63
data_type: string
name: parse_data
arguments: data_label: D52
data_type: string
name: parse_data
arguments: data_label: D114
data_type: string
name: parse_data
arguments: data_label: D15
data_type: string
name: parse_data
arguments: data_label: D30
data_type: string
name: parse_data
arguments: data_label: D131
data_type: string

tool: D144: .css

tool: D2: text/css

tool: D95: .html

tool: D64: text/html

tool: D68: .gif

tool: D40: image/gif

tool: D67: .ico

tool: D110: image/x-ico

tool: D113: .jpg

tool: D1: image/jpeg

tool: D63: .js

tool: D52: text/javascript

tool: D114: .php

tool: D15: text/x-php

tool: D30: .png

tool: D131: 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;
}
```