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

```asm
<lookup>:
  endbr64
  push   %rbp
  mov    $0x2e,%esi
  mov    %rsp,%rbp
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x10,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  call   <strrchr@plt>
  mov    %rax,%rdi
  mov    %rax,%r13
  call   <strlen@plt>
  mov    %rsp,%rsi
  lea    0x1(%rax),%edx
  movslq %edx,%rdx
  add    $0xf,%rdx
  mov    %rdx,%rcx
  and    $0xfffffffffffff000,%rdx
  sub    %rdx,%rsi
  and    $0xfffffffffffffff0,%rcx
  cmp    %rsi,%rsp
  je     L135
L110:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L110
L135:
  and    $0xfff,%ecx
  sub    %rcx,%rsp
  test   %rcx,%rcx
  jne    L30
L73:
  mov    %rsp,%r14
  movslq %eax,%r12
  xor    %ebx,%ebx
  test   %eax,%eax
  jle    L61
  nopl   (%rax)
L93:
  movsbl 0x0(%r13,%rbx,1),%edi
  call   <tolower@plt>
  mov    %al,(%r14,%rbx,1)
  add    $0x1,%rbx
  cmp    %rbx,%r12
  jne    L93
L61:
  lea    D151(%rip),%rsi
  mov    %r14,%rdi
  movb   $0x0,(%r14,%r12,1)
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D72(%rip),%rax
  test   %r8,%r8
  je     L111
  lea    D154(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D3(%rip),%rax
  test   %r8,%r8
  je     L111
  lea    D60(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D45(%rip),%rax
  test   %r8,%r8
  jne    L72
  nopw   0x0(%rax,%rax,1)
L111:
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L12
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
L30:
  orq    $0x0,-0x8(%rsp,%rcx,1)
  jmp    L73
  nopl   0x0(%rax,%rax,1)
L72:
  lea    D139(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D98(%rip),%rax
  test   %r8,%r8
  je     L111
  lea    D70(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D117(%rip),%rax
  test   %r8,%r8
  je     L111
  lea    D29(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D102(%rip),%rax
  test   %r8,%r8
  je     L111
  lea    D95(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  mov    %rax,%r8
  lea    D138(%rip),%rax
  test   %r8,%r8
  je     L111
  lea    D50(%rip),%rsi
  mov    %r14,%rdi
  call   <strcmp@plt>
  mov    $0x0,%edx
  test   %rax,%rax
  lea    D87(%rip),%rax
  cmovne %rdx,%rax
  jmp    L111
L12:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: parse_data
arguments: label: D151
type_guessed: string
name: parse_data
arguments: label: D72
type_guessed: string
name: parse_data
arguments: label: D154
type_guessed: string
name: parse_data
arguments: label: D3
type_guessed: string
name: parse_data
arguments: label: D60
type_guessed: string
name: parse_data
arguments: label: D45
type_guessed: string
name: parse_data
arguments: label: D139
type_guessed: string
name: parse_data
arguments: label: D98
type_guessed: string
name: parse_data
arguments: label: D70
type_guessed: string
name: parse_data
arguments: label: D117
type_guessed: string
name: parse_data
arguments: label: D29
type_guessed: string
name: parse_data
arguments: label: D102
type_guessed: string
name: parse_data
arguments: label: D95
type_guessed: string
name: parse_data
arguments: label: D138
type_guessed: string
name: parse_data
arguments: label: D50
type_guessed: string
name: parse_data
arguments: label: D87
type_guessed: string

tool: D151: .css

tool: D72: text/css

tool: D154: .html

tool: D3: text/html

tool: D60: .gif

tool: D45: image/gif

tool: D139: .ico

tool: D98: image/x-icon

tool: D70: .jpg

tool: D117: image/jpeg

tool: D29: .js

tool: D102: text/javascript

tool: D95: .php

tool: D138: text/x-php

tool: D50: .png

tool: D87: image/png

assistant: ```c
const char *lookup(const char *path) {
  char *suffixPtr = strrchr(path, '.');
  int suffixLength = strlen(suffixPtr);
  char suffix[suffixLength + 1];
  for (int i = 0; i < suffixLength; i++) {
    suffix[i] = tolower(suffixPtr[i]);
  }
  suffix[suffixLength] = '\0';
  if (strcmp(suffix, ".css") == 0)
    return "text/css";
  else if (strcmp(suffix, ".html") == 0)
    return "text/html";
  else if (strcmp(suffix, ".gif") == 0)
    return "image/gif";
  else if (strcmp(suffix, ".ico") == 0)
    return "image/x-icon";
  else if (strcmp(suffix, ".jpg") == 0)
    return "image/jpeg";
  else if (strcmp(suffix, ".js") == 0)
    return "text/javascript";
  else if (strcmp(suffix, ".php") == 0)
    return "text/x-php";
  else if (strcmp(suffix, ".png") == 0)
    return "image/png";
  else
    return NULL;
}
```