user: Please show me the C implementation that matches the assembly code listed below:

```asm
<main>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x20,%rsp
  mov    %edi,-0x14(%rbp)
  mov    %rsi,-0x20(%rbp)
  cmpl   $0x3,-0x14(%rbp)
  je     L54
  mov    $0x1,%edi
  call   <exit@plt>
L54:
  mov    -0x20(%rbp),%rax
  mov    0x8(%rax),%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x20(%rbp),%rax
  mov    0x10(%rax),%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <output_title@plt>
  mov    -0x8(%rbp),%rax
  lea    D47(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L68
  mov    -0x8(%rbp),%rax
  lea    D117(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L68
  mov    -0x8(%rbp),%rax
  lea    D3(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L68
  mov    -0x8(%rbp),%rax
  lea    D80(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L33
L68:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <do_normal@plt>
  jmp    L272
L33:
  mov    -0x8(%rbp),%rax
  lea    D19(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L197
  mov    -0x8(%rbp),%rax
  lea    D0(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L197
  mov    -0x8(%rbp),%rax
  lea    D163(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L184
L197:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <do_normal_only_charset2uni@plt>
  jmp    L272
L184:
  mov    -0x8(%rbp),%rax
  lea    D150(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L207
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <do_cns11643_only_uni2charset@plt>
  jmp    L272
L207:
  mov    -0x8(%rbp),%rax
  lea    D72(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L3
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <do_gbk1_only_charset2uni@plt>
  jmp    L272
L3:
  mov    -0x8(%rbp),%rax
  lea    D129(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L174
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <do_gbk2_only_charset2uni@plt>
  jmp    L272
L174:
  mov    -0x8(%rbp),%rax
  lea    D25(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L64
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <do_gbk1_only_uni2charset@plt>
  jmp    L272
L64:
  mov    -0x8(%rbp),%rax
  lea    D96(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L152
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <do_gbk1@plt>
  jmp    L272
L152:
  mov    -0x8(%rbp),%rax
  lea    D69(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L164
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <do_ksc5601@plt>
  jmp    L272
L164:
  mov    -0x8(%rbp),%rax
  lea    D6(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L166
  mov    -0x8(%rbp),%rax
  lea    D106(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L251
L166:
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <do_big5@plt>
  jmp    L272
L251:
  mov    -0x8(%rbp),%rax
  lea    D28(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L153
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <do_johab_hangul@plt>
  jmp    L272
L153:
  mov    -0x8(%rbp),%rax
  lea    D55(%rip),%rdx
  mov    %rdx,%rsi
  mov    %rax,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L73
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <do_sjis@plt>
  jmp    L272
L73:
  mov    $0x1,%edi
  call   <exit@plt>
L272:
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D47
type: string
name: extract_symbolic_data
arguments: data_label: D117
type: string
name: extract_symbolic_data
arguments: data_label: D3
type: string
name: extract_symbolic_data
arguments: data_label: D80
type: string
name: extract_symbolic_data
arguments: data_label: D19
type: string
name: extract_symbolic_data
arguments: data_label: D0
type: string
name: extract_symbolic_data
arguments: data_label: D163
type: string
name: extract_symbolic_data
arguments: data_label: D150
type: string
name: extract_symbolic_data
arguments: data_label: D72
type: string
name: extract_symbolic_data
arguments: data_label: D129
type: string
name: extract_symbolic_data
arguments: data_label: D25
type: string
name: extract_symbolic_data
arguments: data_label: D96
type: string
name: extract_symbolic_data
arguments: data_label: D69
type: string
name: extract_symbolic_data
arguments: data_label: D6
type: string
name: extract_symbolic_data
arguments: data_label: D106
type: string
name: extract_symbolic_data
arguments: data_label: D28
type: string
name: extract_symbolic_data
arguments: data_label: D55
type: string

tool: D47: gb2312

tool: D117: gb12345ext

tool: D3: jisx0208

tool: D80: jisx0212

tool: D19: cns11643_1

tool: D0: cns11643_2

tool: D163: cns11643_3

tool: D150: cns11643_inv

tool: D72: gbkext1

tool: D129: gbkext2

tool: D25: gbkext_inv

tool: D96: cp936ext

tool: D69: ksc5601

tool: D6: big5

tool: D106: cp950ext

tool: D28: johab_hangul

tool: D55: cp932ext

assistant: ```c
int main(int argc, char *argv[]) {
  const char *charsetname;
  const char *name;
  if (argc != 3)
    exit(1);
  charsetname = argv[1];
  name = argv[2];
  output_title(charsetname);
  if (!strcmp(name, "gb2312") || !strcmp(name, "gb12345ext") || !strcmp(name, "jisx0208") || !strcmp(name, "jisx0212"))
    do_normal(name);
  else if (!strcmp(name, "cns11643_1") || !strcmp(name, "cns11643_2") || !strcmp(name, "cns11643_3"))
    do_normal_only_charset2uni(name);
  else if (!strcmp(name, "cns11643_inv"))
    do_cns11643_only_uni2charset(name);
  else if (!strcmp(name, "gbkext1"))
    do_gbk1_only_charset2uni(name);
  else if (!strcmp(name, "gbkext2"))
    do_gbk2_only_charset2uni(name);
  else if (!strcmp(name, "gbkext_inv"))
    do_gbk1_only_uni2charset(name);
  else if (!strcmp(name, "cp936ext"))
    do_gbk1(name);
  else if (!strcmp(name, "ksc5601"))
    do_ksc5601(name);
  else if (!strcmp(name, "big5") || !strcmp(name, "cp950ext"))
    do_big5(name);
  else if (!strcmp(name, "johab_hangul"))
    do_johab_hangul(name);
  else if (!strcmp(name, "cp932ext"))
    do_sjis(name);
  else
    exit(1);
  return 0;
}
```