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

```asm
<lookup>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%r12
  mov    %fs:0x28,%rax
  mov    %rax,-0x28(%rbp)
  xor    %eax,%eax
  call   <strlen@plt>
  add    $0x10,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffffff0,%rcx
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rdx
  sub    %rax,%rdx
L46:
  cmp    %rdx,%rsp
  je     L110
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L46
L110:
  mov    %rcx,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L49
  orq    $0x0,-0x8(%rsp,%rax,1)
L49:
  mov    %rsp,%r13
  mov    %r12,%rdi
  call   <strlen@plt>
  test   %eax,%eax
  jle    L92
  lea    -0x1(%rax),%r14d
  mov    $0x0,%ebx
L48:
  movsbl (%r12,%rbx,1),%edi
  call   <tolower@plt>
  mov    %al,0x0(%r13,%rbx,1)
  mov    %rbx,%rax
  add    $0x1,%rbx
  cmp    %r14,%rax
  jne    L48
L92:
  mov    %r12,%rdi
  call   <strlen@plt>
  movb   $0x0,0x0(%r13,%rax,1)
  lea    D11(%rip),%rsi
  mov    %r13,%rdi
  call   <strcmp@plt>
  mov    %rax,%rdx
  lea    D39(%rip),%rax
  test   %rdx,%rdx
  jne    L5
L47:
  mov    -0x28(%rbp),%rdx
  sub    %fs:0x28,%rdx
  jne    L7
  lea    -0x20(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %rbp
  ret
L5:
  lea    D25(%rip),%rsi
  mov    %r13,%rdi
  call   <strcmp@plt>
  mov    %rax,%rdx
  lea    D46(%rip),%rax
  test   %rdx,%rdx
  je     L47
  lea    D50(%rip),%rsi
  mov    %r13,%rdi
  call   <strcmp@plt>
  mov    %rax,%rdx
  lea    D64(%rip),%rax
  test   %rdx,%rdx
  je     L47
  lea    D112(%rip),%rsi
  mov    %r13,%rdi
  call   <strcmp@plt>
  mov    %rax,%rdx
  lea    D69(%rip),%rax
  test   %rdx,%rdx
  je     L47
  lea    D121(%rip),%rsi
  mov    %r13,%rdi
  call   <strcmp@plt>
  mov    %rax,%rdx
  lea    D106(%rip),%rax
  test   %rdx,%rdx
  je     L47
  lea    D85(%rip),%rsi
  mov    %r13,%rdi
  call   <strcmp@plt>
  mov    %rax,%rdx
  lea    D61(%rip),%rax
  test   %rdx,%rdx
  je     L47
  lea    D49(%rip),%rsi
  mov    %r13,%rdi
  call   <strcmp@plt>
  test   %rax,%rax
  lea    D98(%rip),%rax
  mov    $0x0,%edx
  cmovne %rdx,%rax
  jmp    L47
L7:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D11
datatype: string
name: disassemble_data
arguments: data_label: D39
datatype: string
name: disassemble_data
arguments: data_label: D25
datatype: string
name: disassemble_data
arguments: data_label: D46
datatype: string
name: disassemble_data
arguments: data_label: D50
datatype: string
name: disassemble_data
arguments: data_label: D64
datatype: string
name: disassemble_data
arguments: data_label: D112
datatype: string
name: disassemble_data
arguments: data_label: D69
datatype: string
name: disassemble_data
arguments: data_label: D121
datatype: string
name: disassemble_data
arguments: data_label: D106
datatype: string
name: disassemble_data
arguments: data_label: D85
datatype: string
name: disassemble_data
arguments: data_label: D61
datatype: string
name: disassemble_data
arguments: data_label: D49
datatype: string
name: disassemble_data
arguments: data_label: D98
datatype: string

tool: D11: css

tool: D39: text/css

tool: D25: html

tool: D46: text/html

tool: D50: js

tool: D64: text/javascript

tool: D112: gif

tool: D69: image/gif

tool: D121: ico

tool: D106: image/x-icon

tool: D85: jpg

tool: D61: image/jpg

tool: D49: png

tool: D98: image/png

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