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

```asm
<mime_to_ext>:
  endbr64
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %rsi,%rbp
  movzbl (%rdi),%eax
  cmp    $0x69,%al
  je     L15
  cmp    $0x76,%al
  je     L525
  cmp    $0x61,%al
  je     L477
  lea    D153(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
L334:
  pop    %rbx
  pop    %rbp
  pop    %r12
  ret
L477:
  lea    0x6(%rdi),%r12
  lea    D210(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L249
  lea    D334(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L139
  lea    D170(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L130
  lea    D155(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L40
  lea    D120(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L227
  lea    D469(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L263
  lea    D504(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L249:
  lea    D216(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L139:
  lea    D379(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L130:
  lea    D95(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L40:
  lea    D120(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L227:
  lea    D120(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L263:
  mov    $0x3,%edx
  lea    D77(%rip),%rsi
  mov    %r12,%rdi
  call   <strncmp@plt>
  test   %eax,%eax
  je     L96
  lea    D411(%rip),%rsi
  mov    %r12,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L66
  lea    D251(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L75
  lea    D121(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L96:
  lea    D235(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L66:
  lea    D371(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L75:
  lea    D153(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L525:
  add    $0x6,%rbx
  lea    D183(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L310
  lea    D1(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L408
  lea    D119(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L538
  lea    D210(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L401
  lea    D334(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L416
  lea    D75(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L274
  lea    D42(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L205
  lea    D28(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L450
  lea    D450(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L336
  lea    D214(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L452
  lea    D510(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L277
  lea    D411(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L115
  lea    D138(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L212
  lea    D140(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L310:
  lea    D183(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L408:
  lea    D183(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L538:
  lea    D183(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L401:
  lea    D429(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L416:
  lea    D334(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L274:
  lea    D350(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L205:
  lea    D18(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L450:
  lea    D18(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L336:
  lea    D259(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L452:
  lea    D429(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L277:
  lea    D205(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L115:
  lea    D371(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L212:
  lea    D153(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L15:
  add    $0x6,%rbx
  lea    D111(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L183
  lea    D328(%rip),%rsi
  mov    %rbx,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L180
  lea    D328(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L183:
  lea    D452(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
L180:
  lea    D153(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcpy@plt>
  jmp    L334
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D153
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D210
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D334
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D170
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D155
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D120
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D469
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D504
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D216
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D379
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D95
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D77
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D411
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D251
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D121
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D235
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D371
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D183
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D1
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D119
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D75
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D42
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D28
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D450
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D214
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D510
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D138
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D140
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D429
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D350
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D18
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D259
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D205
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D111
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D328
type_guessed: string
name: extract_symbolic_data
arguments: data_label: D452
type_guessed: string

tool: D153: dat

tool: D210: mpeg

tool: D334: mp4

tool: D170: x-ms-wma

tool: D155: x-flac

tool: D120: flac

tool: D469: x-wav

tool: D504: wav

tool: D216: mp3

tool: D379: m4a

tool: D95: wma

tool: D77: L16

tool: D411: 3gpp

tool: D251: application/ogg

tool: D121: ogg

tool: D235: pcm

tool: D371: 3gp

tool: D183: avi

tool: D1: divx

tool: D119: x-msvideo

tool: D75: x-ms-wmv

tool: D42: x-matroska

tool: D28: x-mkv

tool: D450: x-flv

tool: D214: vnd.dlna.mpeg-tts

tool: D510: quicktime

tool: D138: x-tivo-mpeg

tool: D140: TiVo

tool: D429: mpg

tool: D350: wmv

tool: D18: mkv

tool: D259: flv

tool: D205: mov

tool: D111: jpeg

tool: D328: png

tool: D452: jpg

assistant: ```c
void mime_to_ext(const char *mime, char *buf) {
  switch (*mime) {
  case 'a':
    if (strcmp(mime + 6, "mpeg") == 0)
      strcpy(buf, "mp3");
    else if (strcmp(mime + 6, "mp4") == 0)
      strcpy(buf, "m4a");
    else if (strcmp(mime + 6, "x-ms-wma") == 0)
      strcpy(buf, "wma");
    else if (strcmp(mime + 6, "x-flac") == 0)
      strcpy(buf, "flac");
    else if (strcmp(mime + 6, "flac") == 0)
      strcpy(buf, "flac");
    else if (strcmp(mime + 6, "x-wav") == 0)
      strcpy(buf, "wav");
    else if (strncmp(mime + 6, "L16", 3) == 0)
      strcpy(buf, "pcm");
    else if (strcmp(mime + 6, "3gpp") == 0)
      strcpy(buf, "3gp");
    else if (strcmp(mime, "application/ogg") == 0)
      strcpy(buf, "ogg");
    else
      strcpy(buf, "dat");
    break;
  case 'v':
    if (strcmp(mime + 6, "avi") == 0)
      strcpy(buf, "avi");
    else if (strcmp(mime + 6, "divx") == 0)
      strcpy(buf, "avi");
    else if (strcmp(mime + 6, "x-msvideo") == 0)
      strcpy(buf, "avi");
    else if (strcmp(mime + 6, "mpeg") == 0)
      strcpy(buf, "mpg");
    else if (strcmp(mime + 6, "mp4") == 0)
      strcpy(buf, "mp4");
    else if (strcmp(mime + 6, "x-ms-wmv") == 0)
      strcpy(buf, "wmv");
    else if (strcmp(mime + 6, "x-matroska") == 0)
      strcpy(buf, "mkv");
    else if (strcmp(mime + 6, "x-mkv") == 0)
      strcpy(buf, "mkv");
    else if (strcmp(mime + 6, "x-flv") == 0)
      strcpy(buf, "flv");
    else if (strcmp(mime + 6, "vnd.dlna.mpeg-tts") == 0)
      strcpy(buf, "mpg");
    else if (strcmp(mime + 6, "quicktime") == 0)
      strcpy(buf, "mov");
    else if (strcmp(mime + 6, "3gpp") == 0)
      strcpy(buf, "3gp");
    else if (strcmp(mime + 6, "x-tivo-mpeg") == 0)
      strcpy(buf, "TiVo");
    else
      strcpy(buf, "dat");
    break;
  case 'i':
    if (strcmp(mime + 6, "jpeg") == 0)
      strcpy(buf, "jpg");
    else if (strcmp(mime + 6, "png") == 0)
      strcpy(buf, "png");
    else
      strcpy(buf, "dat");
    break;
  default:
    strcpy(buf, "dat");
    break;
  }
}
```