user: 请从给定的汇编指令推导出C源代码：

```asm
<main>:
  endbr64
  push   %rbp
  push   %rbx
  sub    $0x8,%rsp
  mov    %rsi,%rbx
  cmp    $0x3,%edi
  jne    L86
L212:
  mov    0x10(%rbx),%rbp
  mov    0x8(%rbx),%rdi
  call   <output_title@plt>
  lea    D143(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L96
  lea    D47(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L96
  lea    D101(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L96
  lea    D121(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L172
L96:
  mov    %rbp,%rdi
  call   <do_normal@plt>
L171:
  mov    $0x0,%eax
  add    $0x8,%rsp
  pop    %rbx
  pop    %rbp
  ret
L86:
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L212
L172:
  lea    D152(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L193
  lea    D160(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L193
  lea    D26(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L66
L193:
  mov    %rbp,%rdi
  call   <do_normal_only_charset2uni@plt>
  jmp    L171
L66:
  lea    D139(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L50
  lea    D29(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L291
  lea    D125(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L74
  lea    D135(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L4
  lea    D104(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L162
  lea    D118(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L296
  lea    D109(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L16
  lea    D177(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L1
L16:
  mov    %rbp,%rdi
  call   <do_big5@plt>
  jmp    L171
L50:
  mov    %rbp,%rdi
  call   <do_cns11643_only_uni2charset@plt>
  jmp    L171
L291:
  mov    %rbp,%rdi
  call   <do_gbk1_only_charset2uni@plt>
  jmp    L171
L74:
  mov    %rbp,%rdi
  call   <do_gbk2_only_charset2uni@plt>
  jmp    L171
L4:
  mov    %rbp,%rdi
  call   <do_gbk1_only_uni2charset@plt>
  jmp    L171
L162:
  mov    %rbp,%rdi
  call   <do_gbk1@plt>
  jmp    L171
L296:
  mov    %rbp,%rdi
  call   <do_ksc5601@plt>
  jmp    L171
L1:
  lea    D18(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L283
  lea    D123(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  je     L169
  lea    D146(%rip),%rsi
  mov    %rbp,%rdi
  call   <strcmp@plt>
  test   %eax,%eax
  jne    L164
  mov    %rbp,%rdi
  call   <do_sjis@plt>
  jmp    L171
L283:
  mov    %rbp,%rdi
  call   <do_big5hkscs@plt>
  jmp    L171
L169:
  mov    %rbp,%rdi
  call   <do_johab_hangul@plt>
  jmp    L171
L164:
  mov    $0x1,%edi
  call   <exit@plt>
  jmp    L171
```

tool_calls: name: retrieve_data
arguments: tag: D143
type: string
name: retrieve_data
arguments: tag: D47
type: string
name: retrieve_data
arguments: tag: D101
type: string
name: retrieve_data
arguments: tag: D121
type: string
name: retrieve_data
arguments: tag: D152
type: string
name: retrieve_data
arguments: tag: D160
type: string
name: retrieve_data
arguments: tag: D26
type: string
name: retrieve_data
arguments: tag: D139
type: string
name: retrieve_data
arguments: tag: D29
type: string
name: retrieve_data
arguments: tag: D125
type: string
name: retrieve_data
arguments: tag: D135
type: string
name: retrieve_data
arguments: tag: D104
type: string
name: retrieve_data
arguments: tag: D118
type: string
name: retrieve_data
arguments: tag: D109
type: string
name: retrieve_data
arguments: tag: D177
type: string
name: retrieve_data
arguments: tag: D18
type: string
name: retrieve_data
arguments: tag: D123
type: string
name: retrieve_data
arguments: tag: D146
type: string

tool: D143: gb2312

tool: D47: gb12345ext

tool: D101: jisx0208

tool: D121: jisx0212

tool: D152: cns11643_1

tool: D160: cns11643_2

tool: D26: cns11643_3

tool: D139: cns11643_inv

tool: D29: gbkext1

tool: D125: gbkext2

tool: D135: gbkext_inv

tool: D104: cp936ext

tool: D118: ksc5601

tool: D109: big5

tool: D177: cp950ext

tool: D18: big5hkscs

tool: D123: johab_hangul

tool: D146: 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, "big5hkscs"))
    do_big5hkscs(name);
  else if (!strcmp(name, "johab_hangul"))
    do_johab_hangul(name);
  else if (!strcmp(name, "cp932ext"))
    do_sjis(name);
  else
    exit(1);
  return 0;
}
```