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

```asm
<lookup>:
  endbr64
  push   %r13
  mov    $0x2e,%esi
  push   %r12
  push   %rbp
  push   %rbx
  xor    %ebx,%ebx
  sub    $0x98,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  mov    %rsp,%r12
  call   <strrchr@plt>
  lea    D34(%rip),%rcx
  lea    D21(%rip),%rdx
  mov    %rax,%rbp
  lea    D123(%rip),%rax
  movq   %rcx,%xmm0
  movq   %rax,%xmm1
  lea    D157(%rip),%rax
  lea    D15(%rip),%rcx
  punpcklqdq %xmm1,%xmm0
  movq   %rax,%xmm2
  lea    D148(%rip),%rax
  movaps %xmm0,(%rsp)
  movq   %rdx,%xmm0
  movq   %rax,%xmm3
  lea    D44(%rip),%rdx
  punpcklqdq %xmm2,%xmm0
  lea    D8(%rip),%rax
  movaps %xmm0,0x10(%rsp)
  movq   %rcx,%xmm0
  movq   %rax,%xmm4
  lea    D159(%rip),%rcx
  punpcklqdq %xmm3,%xmm0
  lea    D25(%rip),%rax
  movaps %xmm0,0x20(%rsp)
  movq   %rdx,%xmm0
  movq   %rax,%xmm5
  lea    D28(%rip),%rdx
  punpcklqdq %xmm4,%xmm0
  lea    D155(%rip),%rax
  movaps %xmm0,0x30(%rsp)
  movq   %rcx,%xmm0
  movq   %rax,%xmm6
  lea    D80(%rip),%rcx
  punpcklqdq %xmm5,%xmm0
  lea    D59(%rip),%rax
  movaps %xmm0,0x40(%rsp)
  movq   %rdx,%xmm0
  movq   %rax,%xmm7
  lea    D47(%rip),%rdx
  punpcklqdq %xmm6,%xmm0
  lea    D5(%rip),%rax
  movaps %xmm0,0x50(%rsp)
  movq   %rcx,%xmm0
  movq   %rax,%xmm1
  punpcklqdq %xmm7,%xmm0
  movaps %xmm0,0x60(%rsp)
  movq   %rdx,%xmm0
  punpcklqdq %xmm1,%xmm0
  movaps %xmm0,0x70(%rsp)
  nopl   (%rax)
L6:
  mov    (%r12,%rbx,8),%rsi
  mov    %rbp,%rdi
  movslq %ebx,%r13
  call   <strcasecmp@plt>
  test   %rax,%rax
  je     L38
  add    $0x1,%rbx
  cmp    $0x8,%rbx
  jne    L6
  xor    %eax,%eax
L28:
  mov    0x88(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L3
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L38:
  mov    0x40(%rsp,%r13,8),%rax
  jmp    L28
L3:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: data_label: D34
type: string
name: read_data
arguments: data_label: D21
type: string
name: read_data
arguments: data_label: D123
type: string
name: read_data
arguments: data_label: D157
type: string
name: read_data
arguments: data_label: D15
type: string
name: read_data
arguments: data_label: D148
type: string
name: read_data
arguments: data_label: D44
type: string
name: read_data
arguments: data_label: D8
type: string
name: read_data
arguments: data_label: D159
type: string
name: read_data
arguments: data_label: D25
type: string
name: read_data
arguments: data_label: D28
type: string
name: read_data
arguments: data_label: D155
type: string
name: read_data
arguments: data_label: D80
type: string
name: read_data
arguments: data_label: D59
type: string
name: read_data
arguments: data_label: D47
type: string
name: read_data
arguments: data_label: D5
type: string

tool: D34: .css

tool: D21: .gif

tool: D123: .html

tool: D157: .ico

tool: D15: .jpg

tool: D148: .js

tool: D44: .php

tool: D8: .png

tool: D159: text/css

tool: D25: text/html

tool: D28: image/gif

tool: D155: image/x-icon

tool: D80: image/jpeg

tool: D59: text/javascript

tool: D47: text/x-php

tool: D5: image/png

assistant: ```c
const char *lookup(const char *path) {
  const int SIZE = 8;
  const char dot = '.';
  char *getExtension = strrchr(path, dot);
  char *extensions[8] = {".css", ".html", ".gif", ".ico", ".jpg", ".js", ".php", ".png"};
  char *texts[8] = {"text/css", "text/html", "image/gif", "image/x-icon", "image/jpeg", "text/javascript", "text/x-php", "image/png"};
  for (int i = 0; i < SIZE; i++) {
    if (strcasecmp(getExtension, extensions[i]) == 0) {
      return texts[i];
    }
  }
  return NULL;
}
```