#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ do_big5(char const *);
int /*<<< orphan*/ do_cns11643_only_uni2charset(char const *);
int /*<<< orphan*/ do_gb18030uni(char const *);
int /*<<< orphan*/ do_gbk1(char const *);
int /*<<< orphan*/ do_gbk1_only_charset2uni(char const *);
int /*<<< orphan*/ do_gbk1_only_uni2charset(char const *);
int /*<<< orphan*/ do_gbk2_only_charset2uni(char const *);
int /*<<< orphan*/ do_hkscs(char const *);
int /*<<< orphan*/ do_jisx0213(char const *);
int /*<<< orphan*/ do_johab_hangul(char const *);
int /*<<< orphan*/ do_ksc5601(char const *);
int /*<<< orphan*/ do_normal(char const *);
int /*<<< orphan*/ do_normal_only_charset2uni(char const *);
int /*<<< orphan*/ do_sjis(char const *);
int /*<<< orphan*/ do_uhc_1(char const *);
int /*<<< orphan*/ do_uhc_2(char const *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ output_title(char const *);
int /*<<< orphan*/ strcmp(char const *, char *);
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, "isoir165ext") ||
      !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") || !strcmp(name, "cns11643_4a") ||
           !strcmp(name, "cns11643_4b") || !strcmp(name, "cns11643_5") ||
           !strcmp(name, "cns11643_6") || !strcmp(name, "cns11643_7") ||
           !strcmp(name, "cns11643_15"))
    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") || !strcmp(name, "gb18030ext"))
    do_gbk1(name);
  else if (!strcmp(name, "ksc5601"))
    do_ksc5601(name);
  else if (!strcmp(name, "uhc_1"))
    do_uhc_1(name);
  else if (!strcmp(name, "uhc_2"))
    do_uhc_2(name);
  else if (!strcmp(name, "big5") || !strcmp(name, "cp950ext"))
    do_big5(name);
  else if (!strcmp(name, "hkscs"))
    do_hkscs(name);
  else if (!strcmp(name, "johab_hangul"))
    do_johab_hangul(name);
  else if (!strcmp(name, "cp932ext"))
    do_sjis(name);
  else if (!strcmp(name, "gb18030uni"))
    do_gb18030uni(name);
  else if (!strcmp(name, "jisx0213"))
    do_jisx0213(name);
  else
    exit(1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     125a <main+0x2a>
mov    $0x1,%edi
call   1120 <exit@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1100 <output_title@plt>
mov    -0x20(%rbp),%rdi
lea    0xd7a(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     12f8 <main+0xc8>
mov    -0x20(%rbp),%rdi
lea    0xd68(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     12f8 <main+0xc8>
mov    -0x20(%rbp),%rdi
lea    0xd5b(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     12f8 <main+0xc8>
mov    -0x20(%rbp),%rdi
lea    0xd4d(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     12f8 <main+0xc8>
mov    -0x20(%rbp),%rdi
lea    0xd3d(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    1306 <main+0xd6>
mov    -0x20(%rbp),%rdi
call   1130 <do_normal@plt>
jmp    169e <main+0x46e>
mov    -0x20(%rbp),%rdi
lea    0xd1f(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     13e7 <main+0x1b7>
mov    -0x20(%rbp),%rdi
lea    0xd11(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     13e7 <main+0x1b7>
mov    -0x20(%rbp),%rdi
lea    0xd03(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     13e7 <main+0x1b7>
mov    -0x20(%rbp),%rdi
lea    0xcf5(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     13e7 <main+0x1b7>
mov    -0x20(%rbp),%rdi
lea    0xce8(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     13e7 <main+0x1b7>
mov    -0x20(%rbp),%rdi
lea    0xcdb(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     13e7 <main+0x1b7>
mov    -0x20(%rbp),%rdi
lea    0xccd(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     13e7 <main+0x1b7>
mov    -0x20(%rbp),%rdi
lea    0xcbf(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     13e7 <main+0x1b7>
mov    -0x20(%rbp),%rdi
lea    0xcb1(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    13f5 <main+0x1c5>
mov    -0x20(%rbp),%rdi
call   10c0 <do_normal_only_charset2uni@plt>
jmp    1699 <main+0x469>
mov    -0x20(%rbp),%rdi
lea    0xc96(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    141c <main+0x1ec>
mov    -0x20(%rbp),%rdi
call   1040 <do_cns11643_only_uni2charset@plt>
jmp    1694 <main+0x464>
mov    -0x20(%rbp),%rdi
lea    0xc7c(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    1443 <main+0x213>
mov    -0x20(%rbp),%rdi
call   1060 <do_gbk1_only_charset2uni@plt>
jmp    168f <main+0x45f>
mov    -0x20(%rbp),%rdi
lea    0xc5d(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    146a <main+0x23a>
mov    -0x20(%rbp),%rdi
call   10a0 <do_gbk2_only_charset2uni@plt>
jmp    168a <main+0x45a>
mov    -0x20(%rbp),%rdi
lea    0xc3e(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    1491 <main+0x261>
mov    -0x20(%rbp),%rdi
call   1070 <do_gbk1_only_uni2charset@plt>
jmp    1685 <main+0x455>
mov    -0x20(%rbp),%rdi
lea    0xc22(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     14c3 <main+0x293>
mov    -0x20(%rbp),%rdi
lea    0xc12(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    14d1 <main+0x2a1>
mov    -0x20(%rbp),%rdi
call   1150 <do_gbk1@plt>
jmp    1680 <main+0x450>
mov    -0x20(%rbp),%rdi
lea    0xbf6(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    14f8 <main+0x2c8>
mov    -0x20(%rbp),%rdi
call   1140 <do_ksc5601@plt>
jmp    167b <main+0x44b>
mov    -0x20(%rbp),%rdi
lea    0xbd7(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    151f <main+0x2ef>
mov    -0x20(%rbp),%rdi
call   10f0 <do_uhc_1@plt>
jmp    1676 <main+0x446>
mov    -0x20(%rbp),%rdi
lea    0xbb6(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    1546 <main+0x316>
mov    -0x20(%rbp),%rdi
call   1050 <do_uhc_2@plt>
jmp    1671 <main+0x441>
mov    -0x20(%rbp),%rdi
lea    0xb95(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
je     1578 <main+0x348>
mov    -0x20(%rbp),%rdi
lea    0xb81(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    1586 <main+0x356>
mov    -0x20(%rbp),%rdi
call   10d0 <do_big5@plt>
jmp    166c <main+0x43c>
mov    -0x20(%rbp),%rdi
lea    0xb63(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    15ad <main+0x37d>
mov    -0x20(%rbp),%rdi
call   10b0 <do_hkscs@plt>
jmp    1667 <main+0x437>
mov    -0x20(%rbp),%rdi
lea    0xb42(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    15d4 <main+0x3a4>
mov    -0x20(%rbp),%rdi
call   1080 <do_johab_hangul@plt>
jmp    1662 <main+0x432>
mov    -0x20(%rbp),%rdi
lea    0xb28(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    15fb <main+0x3cb>
mov    -0x20(%rbp),%rdi
call   10e0 <do_sjis@plt>
jmp    165d <main+0x42d>
mov    -0x20(%rbp),%rdi
lea    0xb0a(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    1622 <main+0x3f2>
mov    -0x20(%rbp),%rdi
call   1030 <do_gb18030uni@plt>
jmp    1658 <main+0x428>
mov    -0x20(%rbp),%rdi
lea    0xaee(%rip),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%eax
jne    1649 <main+0x419>
mov    -0x20(%rbp),%rdi
call   1110 <do_jisx0213@plt>
jmp    1653 <main+0x423>
mov    $0x1,%edi
call   1120 <exit@plt>
jmp    1658 <main+0x428>
jmp    165d <main+0x42d>
jmp    1662 <main+0x432>
jmp    1667 <main+0x437>
jmp    166c <main+0x43c>
jmp    1671 <main+0x441>
jmp    1676 <main+0x446>
jmp    167b <main+0x44b>
jmp    1680 <main+0x450>
jmp    1685 <main+0x455>
jmp    168a <main+0x45a>
jmp    168f <main+0x45f>
jmp    1694 <main+0x464>
jmp    1699 <main+0x469>
jmp    169e <main+0x46e>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x3,%edi
jne    1594 <main+0x364>
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rbx
call   1100 <output_title@plt>
lea    0xdb2(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1503 <main+0x2d3>
lea    0xda2(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1503 <main+0x2d3>
lea    0xd97(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1503 <main+0x2d3>
lea    0xd8b(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1503 <main+0x2d3>
lea    0xd7d(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1503 <main+0x2d3>
lea    0xd6f(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     150f <main+0x2df>
lea    0xd63(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     150f <main+0x2df>
lea    0xd57(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     150f <main+0x2df>
lea    0xd4b(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     150f <main+0x2df>
lea    0xd40(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     150f <main+0x2df>
lea    0xd35(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     150f <main+0x2df>
lea    0xd29(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     150f <main+0x2df>
lea    0xd1d(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     150f <main+0x2df>
lea    0xd11(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     150f <main+0x2df>
lea    0xd06(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1519 <main+0x2e9>
lea    0xcfc(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1523 <main+0x2f3>
lea    0xced(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     152d <main+0x2fd>
lea    0xcde(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1541 <main+0x311>
lea    0xcd2(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1537 <main+0x307>
lea    0xcc4(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1537 <main+0x307>
lea    0xcb8(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     154b <main+0x31b>
lea    0xca9(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1555 <main+0x325>
lea    0xc98(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1569 <main+0x339>
lea    0xc87(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     155f <main+0x32f>
lea    0xc75(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     155f <main+0x32f>
lea    0xc67(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1573 <main+0x343>
lea    0xc56(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     157d <main+0x34d>
lea    0xc4c(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     1587 <main+0x357>
lea    0xc3e(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
je     159e <main+0x36e>
lea    0xc32(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcmp@plt>
test   %eax,%eax
jne    1594 <main+0x364>
mov    %rbx,%rdi
call   1110 <do_jisx0213@plt>
jmp    150b <main+0x2db>
mov    %rbx,%rdi
call   1130 <do_normal@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    %rbx,%rdi
call   10c0 <do_normal_only_charset2uni@plt>
jmp    150b <main+0x2db>
mov    %rbx,%rdi
call   1040 <do_cns11643_only_uni2charset@plt>
jmp    150b <main+0x2db>
mov    %rbx,%rdi
call   1060 <do_gbk1_only_charset2uni@plt>
jmp    150b <main+0x2db>
mov    %rbx,%rdi
call   10a0 <do_gbk2_only_charset2uni@plt>
jmp    150b <main+0x2db>
mov    %rbx,%rdi
call   1150 <do_gbk1@plt>
jmp    150b <main+0x2db>
mov    %rbx,%rdi
call   1070 <do_gbk1_only_uni2charset@plt>
jmp    150b <main+0x2db>
mov    %rbx,%rdi
call   1140 <do_ksc5601@plt>
jmp    150b <main+0x2db>
mov    %rbx,%rdi
call   10f0 <do_uhc_1@plt>
jmp    150b <main+0x2db>
mov    %rbx,%rdi
call   10d0 <do_big5@plt>
jmp    150b <main+0x2db>
mov    %rbx,%rdi
call   1050 <do_uhc_2@plt>
jmp    150b <main+0x2db>
mov    %rbx,%rdi
call   10b0 <do_hkscs@plt>
jmp    150b <main+0x2db>
mov    %rbx,%rdi
call   1080 <do_johab_hangul@plt>
jmp    150b <main+0x2db>
mov    %rbx,%rdi
call   10e0 <do_sjis@plt>
jmp    150b <main+0x2db>
mov    $0x1,%edi
call   1120 <exit@plt>
mov    %rbx,%rdi
call   1030 <do_gb18030uni@plt>
jmp    150b <main+0x2db>

LLVM IR (-O0):
@.str = [7 x i8] c"gb2312\00"
@.str.1 = [12 x i8] c"isoir165ext\00"
@.str.2 = [11 x i8] c"gb12345ext\00"
@.str.3 = [9 x i8] c"jisx0208\00"
@.str.4 = [9 x i8] c"jisx0212\00"
@.str.5 = [11 x i8] c"cns11643_1\00"
@.str.6 = [11 x i8] c"cns11643_2\00"
@.str.7 = [11 x i8] c"cns11643_3\00"
@.str.8 = [12 x i8] c"cns11643_4a\00"
@.str.9 = [12 x i8] c"cns11643_4b\00"
@.str.10 = [11 x i8] c"cns11643_5\00"
@.str.11 = [11 x i8] c"cns11643_6\00"
@.str.12 = [11 x i8] c"cns11643_7\00"
@.str.13 = [12 x i8] c"cns11643_15\00"
@.str.14 = [13 x i8] c"cns11643_inv\00"
@.str.15 = [8 x i8] c"gbkext1\00"
@.str.16 = [8 x i8] c"gbkext2\00"
@.str.17 = [11 x i8] c"gbkext_inv\00"
@.str.18 = [9 x i8] c"cp936ext\00"
@.str.19 = [11 x i8] c"gb18030ext\00"
@.str.20 = [8 x i8] c"ksc5601\00"
@.str.21 = [6 x i8] c"uhc_1\00"
@.str.22 = [6 x i8] c"uhc_2\00"
@.str.23 = [5 x i8] c"big5\00"
@.str.24 = [9 x i8] c"cp950ext\00"
@.str.25 = [6 x i8] c"hkscs\00"
@.str.26 = [13 x i8] c"johab_hangul\00"
@.str.27 = [9 x i8] c"cp932ext\00"
@.str.28 = [11 x i8] c"gb18030uni\00"
@.str.29 = [9 x i8] c"jisx0213\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = icmp ne i32 %8, 3
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
store i8* %15, i8** %6
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 2
%18 = load i8*, i8** %17
store i8* %18, i8** %7
%19 = load i8*, i8** %6
%20 = call i32 @output_title(i8* %19)
%21 = load i8*, i8** %7
%22 = call i32 @strcmp(i8* %21, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %40
24: ; preds = %12
%25 = load i8*, i8** %7
%26 = call i32 @strcmp(i8* %25, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %40
28: ; preds = %24
%29 = load i8*, i8** %7
%30 = call i32 @strcmp(i8* %29, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %40
32: ; preds = %28
%33 = load i8*, i8** %7
%34 = call i32 @strcmp(i8* %33, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%35 = icmp ne i32 %34, 0
br i1 %35, label %36, label %40
36: ; preds = %32
%37 = load i8*, i8** %7
%38 = call i32 @strcmp(i8* %37, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%39 = icmp ne i32 %38, 0
br i1 %39, label %43, label %40
40: ; preds = %36, %32, %28, %24, %12
%41 = load i8*, i8** %7
%42 = call i32 @do_normal(i8* %41)
br label %205
43: ; preds = %36
%44 = load i8*, i8** %7
%45 = call i32 @strcmp(i8* %44, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%46 = icmp ne i32 %45, 0
br i1 %46, label %47, label %79
47: ; preds = %43
%48 = load i8*, i8** %7
%49 = call i32 @strcmp(i8* %48, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %79
51: ; preds = %47
%52 = load i8*, i8** %7
%53 = call i32 @strcmp(i8* %52, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %79
55: ; preds = %51
%56 = load i8*, i8** %7
%57 = call i32 @strcmp(i8* %56, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
%58 = icmp ne i32 %57, 0
br i1 %58, label %59, label %79
59: ; preds = %55
%60 = load i8*, i8** %7
%61 = call i32 @strcmp(i8* %60, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0))
%62 = icmp ne i32 %61, 0
br i1 %62, label %63, label %79
63: ; preds = %59
%64 = load i8*, i8** %7
%65 = call i32 @strcmp(i8* %64, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%66 = icmp ne i32 %65, 0
br i1 %66, label %67, label %79
67: ; preds = %63
%68 = load i8*, i8** %7
%69 = call i32 @strcmp(i8* %68, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%70 = icmp ne i32 %69, 0
br i1 %70, label %71, label %79
71: ; preds = %67
%72 = load i8*, i8** %7
%73 = call i32 @strcmp(i8* %72, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0))
%74 = icmp ne i32 %73, 0
br i1 %74, label %75, label %79
75: ; preds = %71
%76 = load i8*, i8** %7
%77 = call i32 @strcmp(i8* %76, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0))
%78 = icmp ne i32 %77, 0
br i1 %78, label %82, label %79
79: ; preds = %75, %71, %67, %63, %59, %55, %51, %47, %43
%80 = load i8*, i8** %7
%81 = call i32 @do_normal_only_charset2uni(i8* %80)
br label %204
82: ; preds = %75
%83 = load i8*, i8** %7
%84 = call i32 @strcmp(i8* %83, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
%85 = icmp ne i32 %84, 0
br i1 %85, label %89, label %86
86: ; preds = %82
%87 = load i8*, i8** %7
%88 = call i32 @do_cns11643_only_uni2charset(i8* %87)
br label %203
89: ; preds = %82
%90 = load i8*, i8** %7
%91 = call i32 @strcmp(i8* %90, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0))
%92 = icmp ne i32 %91, 0
br i1 %92, label %96, label %93
93: ; preds = %89
%94 = load i8*, i8** %7
%95 = call i32 @do_gbk1_only_charset2uni(i8* %94)
br label %202
96: ; preds = %89
%97 = load i8*, i8** %7
%98 = call i32 @strcmp(i8* %97, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0))
%99 = icmp ne i32 %98, 0
br i1 %99, label %103, label %100
100: ; preds = %96
%101 = load i8*, i8** %7
%102 = call i32 @do_gbk2_only_charset2uni(i8* %101)
br label %201
103: ; preds = %96
%104 = load i8*, i8** %7
%105 = call i32 @strcmp(i8* %104, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.17, i64 0, i64 0))
%106 = icmp ne i32 %105, 0
br i1 %106, label %110, label %107
107: ; preds = %103
%108 = load i8*, i8** %7
%109 = call i32 @do_gbk1_only_uni2charset(i8* %108)
br label %200
110: ; preds = %103
%111 = load i8*, i8** %7
%112 = call i32 @strcmp(i8* %111, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.18, i64 0, i64 0))
%113 = icmp ne i32 %112, 0
br i1 %113, label %114, label %118
114: ; preds = %110
%115 = load i8*, i8** %7
%116 = call i32 @strcmp(i8* %115, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.19, i64 0, i64 0))
%117 = icmp ne i32 %116, 0
br i1 %117, label %121, label %118
118: ; preds = %114, %110
%119 = load i8*, i8** %7
%120 = call i32 @do_gbk1(i8* %119)
br label %199
121: ; preds = %114
%122 = load i8*, i8** %7
%123 = call i32 @strcmp(i8* %122, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0))
%124 = icmp ne i32 %123, 0
br i1 %124, label %128, label %125
125: ; preds = %121
%126 = load i8*, i8** %7
%127 = call i32 @do_ksc5601(i8* %126)
br label %198
128: ; preds = %121
%129 = load i8*, i8** %7
%130 = call i32 @strcmp(i8* %129, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
%131 = icmp ne i32 %130, 0
br i1 %131, label %135, label %132
132: ; preds = %128
%133 = load i8*, i8** %7
%134 = call i32 @do_uhc_1(i8* %133)
br label %197
135: ; preds = %128
%136 = load i8*, i8** %7
%137 = call i32 @strcmp(i8* %136, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.22, i64 0, i64 0))
%138 = icmp ne i32 %137, 0
br i1 %138, label %142, label %139
139: ; preds = %135
%140 = load i8*, i8** %7
%141 = call i32 @do_uhc_2(i8* %140)
br label %196
142: ; preds = %135
%143 = load i8*, i8** %7
%144 = call i32 @strcmp(i8* %143, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.23, i64 0, i64 0))
%145 = icmp ne i32 %144, 0
br i1 %145, label %146, label %150
146: ; preds = %142
%147 = load i8*, i8** %7
%148 = call i32 @strcmp(i8* %147, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.24, i64 0, i64 0))
%149 = icmp ne i32 %148, 0
br i1 %149, label %153, label %150
150: ; preds = %146, %142
%151 = load i8*, i8** %7
%152 = call i32 @do_big5(i8* %151)
br label %195
153: ; preds = %146
%154 = load i8*, i8** %7
%155 = call i32 @strcmp(i8* %154, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.25, i64 0, i64 0))
%156 = icmp ne i32 %155, 0
br i1 %156, label %160, label %157
157: ; preds = %153
%158 = load i8*, i8** %7
%159 = call i32 @do_hkscs(i8* %158)
br label %194
160: ; preds = %153
%161 = load i8*, i8** %7
%162 = call i32 @strcmp(i8* %161, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.26, i64 0, i64 0))
%163 = icmp ne i32 %162, 0
br i1 %163, label %167, label %164
164: ; preds = %160
%165 = load i8*, i8** %7
%166 = call i32 @do_johab_hangul(i8* %165)
br label %193
167: ; preds = %160
%168 = load i8*, i8** %7
%169 = call i32 @strcmp(i8* %168, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.27, i64 0, i64 0))
%170 = icmp ne i32 %169, 0
br i1 %170, label %174, label %171
171: ; preds = %167
%172 = load i8*, i8** %7
%173 = call i32 @do_sjis(i8* %172)
br label %192
174: ; preds = %167
%175 = load i8*, i8** %7
%176 = call i32 @strcmp(i8* %175, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.28, i64 0, i64 0))
%177 = icmp ne i32 %176, 0
br i1 %177, label %181, label %178
178: ; preds = %174
%179 = load i8*, i8** %7
%180 = call i32 @do_gb18030uni(i8* %179)
br label %191
181: ; preds = %174
%182 = load i8*, i8** %7
%183 = call i32 @strcmp(i8* %182, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.29, i64 0, i64 0))
%184 = icmp ne i32 %183, 0
br i1 %184, label %188, label %185
185: ; preds = %181
%186 = load i8*, i8** %7
%187 = call i32 @do_jisx0213(i8* %186)
br label %190
188: ; preds = %181
%189 = call i32 @exit(i32 1)
unreachable
190: ; preds = %185
br label %191
191: ; preds = %190, %178
br label %192
192: ; preds = %191, %171
br label %193
193: ; preds = %192, %164
br label %194
194: ; preds = %193, %157
br label %195
195: ; preds = %194, %150
br label %196
196: ; preds = %195, %139
br label %197
197: ; preds = %196, %132
br label %198
198: ; preds = %197, %125
br label %199
199: ; preds = %198, %118
br label %200
200: ; preds = %199, %107
br label %201
201: ; preds = %200, %100
br label %202
202: ; preds = %201, %93
br label %203
203: ; preds = %202, %86
br label %204
204: ; preds = %203, %79
br label %205
205: ; preds = %204, %40
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"gb2312\00"
@.str.1 = [12 x i8] c"isoir165ext\00"
@.str.2 = [11 x i8] c"gb12345ext\00"
@.str.3 = [9 x i8] c"jisx0208\00"
@.str.4 = [9 x i8] c"jisx0212\00"
@.str.5 = [11 x i8] c"cns11643_1\00"
@.str.6 = [11 x i8] c"cns11643_2\00"
@.str.7 = [11 x i8] c"cns11643_3\00"
@.str.8 = [12 x i8] c"cns11643_4a\00"
@.str.9 = [12 x i8] c"cns11643_4b\00"
@.str.10 = [11 x i8] c"cns11643_5\00"
@.str.11 = [11 x i8] c"cns11643_6\00"
@.str.12 = [11 x i8] c"cns11643_7\00"
@.str.13 = [12 x i8] c"cns11643_15\00"
@.str.14 = [13 x i8] c"cns11643_inv\00"
@.str.15 = [8 x i8] c"gbkext1\00"
@.str.16 = [8 x i8] c"gbkext2\00"
@.str.17 = [11 x i8] c"gbkext_inv\00"
@.str.18 = [9 x i8] c"cp936ext\00"
@.str.19 = [11 x i8] c"gb18030ext\00"
@.str.20 = [8 x i8] c"ksc5601\00"
@.str.21 = [6 x i8] c"uhc_1\00"
@.str.22 = [6 x i8] c"uhc_2\00"
@.str.23 = [5 x i8] c"big5\00"
@.str.24 = [9 x i8] c"cp950ext\00"
@.str.25 = [6 x i8] c"hkscs\00"
@.str.26 = [13 x i8] c"johab_hangul\00"
@.str.27 = [9 x i8] c"cp932ext\00"
@.str.28 = [11 x i8] c"gb18030uni\00"
@.str.29 = [9 x i8] c"jisx0213\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @exit(i32 1)
unreachable
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8*, i8** %1, i64 2
%10 = load i8*, i8** %9
%11 = tail call i32 @output_title(i8* %8)
%12 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i32 %12, 0
br i1 %13, label %26, label %14
14: ; preds = %6
%15 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i32 %15, 0
br i1 %16, label %26, label %17
17: ; preds = %14
%18 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%19 = icmp eq i32 %18, 0
br i1 %19, label %26, label %20
20: ; preds = %17
%21 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%22 = icmp eq i32 %21, 0
br i1 %22, label %26, label %23
23: ; preds = %20
%24 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %23, %20, %17, %14, %6
%27 = tail call i32 @do_normal(i8* %10)
br label %135
28: ; preds = %23
%29 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0))
%30 = icmp eq i32 %29, 0
br i1 %30, label %55, label %31
31: ; preds = %28
%32 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0))
%33 = icmp eq i32 %32, 0
br i1 %33, label %55, label %34
34: ; preds = %31
%35 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
%36 = icmp eq i32 %35, 0
br i1 %36, label %55, label %37
37: ; preds = %34
%38 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0))
%39 = icmp eq i32 %38, 0
br i1 %39, label %55, label %40
40: ; preds = %37
%41 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0))
%42 = icmp eq i32 %41, 0
br i1 %42, label %55, label %43
43: ; preds = %40
%44 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%45 = icmp eq i32 %44, 0
br i1 %45, label %55, label %46
46: ; preds = %43
%47 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.11, i64 0, i64 0))
%48 = icmp eq i32 %47, 0
br i1 %48, label %55, label %49
49: ; preds = %46
%50 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0))
%51 = icmp eq i32 %50, 0
br i1 %51, label %55, label %52
52: ; preds = %49
%53 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0))
%54 = icmp eq i32 %53, 0
br i1 %54, label %55, label %57
55: ; preds = %52, %49, %46, %43, %40, %37, %34, %31, %28
%56 = tail call i32 @do_normal_only_charset2uni(i8* %10)
br label %135
57: ; preds = %52
%58 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.14, i64 0, i64 0))
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %62
60: ; preds = %57
%61 = tail call i32 @do_cns11643_only_uni2charset(i8* %10)
br label %135
62: ; preds = %57
%63 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0))
%64 = icmp eq i32 %63, 0
br i1 %64, label %65, label %67
65: ; preds = %62
%66 = tail call i32 @do_gbk1_only_charset2uni(i8* %10)
br label %135
67: ; preds = %62
%68 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.16, i64 0, i64 0))
%69 = icmp eq i32 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %67
%71 = tail call i32 @do_gbk2_only_charset2uni(i8* %10)
br label %135
72: ; preds = %67
%73 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.17, i64 0, i64 0))
%74 = icmp eq i32 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %72
%76 = tail call i32 @do_gbk1_only_uni2charset(i8* %10)
br label %135
77: ; preds = %72
%78 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.18, i64 0, i64 0))
%79 = icmp eq i32 %78, 0
br i1 %79, label %83, label %80
80: ; preds = %77
%81 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.19, i64 0, i64 0))
%82 = icmp eq i32 %81, 0
br i1 %82, label %83, label %85
83: ; preds = %80, %77
%84 = tail call i32 @do_gbk1(i8* %10)
br label %135
85: ; preds = %80
%86 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.20, i64 0, i64 0))
%87 = icmp eq i32 %86, 0
br i1 %87, label %88, label %90
88: ; preds = %85
%89 = tail call i32 @do_ksc5601(i8* %10)
br label %135
90: ; preds = %85
%91 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.21, i64 0, i64 0))
%92 = icmp eq i32 %91, 0
br i1 %92, label %93, label %95
93: ; preds = %90
%94 = tail call i32 @do_uhc_1(i8* %10)
br label %135
95: ; preds = %90
%96 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.22, i64 0, i64 0))
%97 = icmp eq i32 %96, 0
br i1 %97, label %98, label %100
98: ; preds = %95
%99 = tail call i32 @do_uhc_2(i8* %10)
br label %135
100: ; preds = %95
%101 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.23, i64 0, i64 0))
%102 = icmp eq i32 %101, 0
br i1 %102, label %106, label %103
103: ; preds = %100
%104 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.24, i64 0, i64 0))
%105 = icmp eq i32 %104, 0
br i1 %105, label %106, label %108
106: ; preds = %103, %100
%107 = tail call i32 @do_big5(i8* %10)
br label %135
108: ; preds = %103
%109 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.25, i64 0, i64 0))
%110 = icmp eq i32 %109, 0
br i1 %110, label %111, label %113
111: ; preds = %108
%112 = tail call i32 @do_hkscs(i8* %10)
br label %135
113: ; preds = %108
%114 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.26, i64 0, i64 0))
%115 = icmp eq i32 %114, 0
br i1 %115, label %116, label %118
116: ; preds = %113
%117 = tail call i32 @do_johab_hangul(i8* %10)
br label %135
118: ; preds = %113
%119 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.27, i64 0, i64 0))
%120 = icmp eq i32 %119, 0
br i1 %120, label %121, label %123
121: ; preds = %118
%122 = tail call i32 @do_sjis(i8* %10)
br label %135
123: ; preds = %118
%124 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.28, i64 0, i64 0))
%125 = icmp eq i32 %124, 0
br i1 %125, label %126, label %128
126: ; preds = %123
%127 = tail call i32 @do_gb18030uni(i8* %10)
br label %135
128: ; preds = %123
%129 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.29, i64 0, i64 0))
%130 = icmp eq i32 %129, 0
br i1 %130, label %131, label %133
131: ; preds = %128
%132 = tail call i32 @do_jisx0213(i8* %10)
br label %135
133: ; preds = %128
%134 = tail call i32 @exit(i32 1)
unreachable
135: ; preds = %55, %65, %75, %88, %98, %111, %121, %131, %126, %116, %106, %93, %83, %70, %60, %26
ret i32 0
}