#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_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_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*/ 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, "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;
}


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     120a <main+0x2a>
mov    $0x1,%edi
call   10d0 <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   10c0 <output_title@plt>
mov    -0x20(%rbp),%rdi
lea    0xdca(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
je     128f <main+0xaf>
mov    -0x20(%rbp),%rdi
lea    0xdb8(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
je     128f <main+0xaf>
mov    -0x20(%rbp),%rdi
lea    0xdaa(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
je     128f <main+0xaf>
mov    -0x20(%rbp),%rdi
lea    0xd9a(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    129d <main+0xbd>
mov    -0x20(%rbp),%rdi
call   10e0 <do_normal@plt>
jmp    14aa <main+0x2ca>
mov    -0x20(%rbp),%rdi
lea    0xd7c(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
je     12e8 <main+0x108>
mov    -0x20(%rbp),%rdi
lea    0xd6e(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
je     12e8 <main+0x108>
mov    -0x20(%rbp),%rdi
lea    0xd60(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    12f6 <main+0x116>
mov    -0x20(%rbp),%rdi
call   1090 <do_normal_only_charset2uni@plt>
jmp    14a5 <main+0x2c5>
mov    -0x20(%rbp),%rdi
lea    0xd44(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    131d <main+0x13d>
mov    -0x20(%rbp),%rdi
call   1030 <do_cns11643_only_uni2charset@plt>
jmp    14a0 <main+0x2c0>
mov    -0x20(%rbp),%rdi
lea    0xd2a(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    1344 <main+0x164>
mov    -0x20(%rbp),%rdi
call   1040 <do_gbk1_only_charset2uni@plt>
jmp    149b <main+0x2bb>
mov    -0x20(%rbp),%rdi
lea    0xd0b(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    136b <main+0x18b>
mov    -0x20(%rbp),%rdi
call   1080 <do_gbk2_only_charset2uni@plt>
jmp    1496 <main+0x2b6>
mov    -0x20(%rbp),%rdi
lea    0xcec(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    1392 <main+0x1b2>
mov    -0x20(%rbp),%rdi
call   1050 <do_gbk1_only_uni2charset@plt>
jmp    1491 <main+0x2b1>
mov    -0x20(%rbp),%rdi
lea    0xcd0(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    13b9 <main+0x1d9>
mov    -0x20(%rbp),%rdi
call   1100 <do_gbk1@plt>
jmp    148c <main+0x2ac>
mov    -0x20(%rbp),%rdi
lea    0xcb2(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    13e0 <main+0x200>
mov    -0x20(%rbp),%rdi
call   10f0 <do_ksc5601@plt>
jmp    1487 <main+0x2a7>
mov    -0x20(%rbp),%rdi
lea    0xc93(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
je     1412 <main+0x232>
mov    -0x20(%rbp),%rdi
lea    0xc7f(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    1420 <main+0x240>
mov    -0x20(%rbp),%rdi
call   10a0 <do_big5@plt>
jmp    1482 <main+0x2a2>
mov    -0x20(%rbp),%rdi
lea    0xc61(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    1447 <main+0x267>
mov    -0x20(%rbp),%rdi
call   1060 <do_johab_hangul@plt>
jmp    147d <main+0x29d>
mov    -0x20(%rbp),%rdi
lea    0xc47(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%eax
jne    146e <main+0x28e>
mov    -0x20(%rbp),%rdi
call   10b0 <do_sjis@plt>
jmp    1478 <main+0x298>
mov    $0x1,%edi
call   10d0 <exit@plt>
jmp    147d <main+0x29d>
jmp    1482 <main+0x2a2>
jmp    1487 <main+0x2a7>
jmp    148c <main+0x2ac>
jmp    1491 <main+0x2b1>
jmp    1496 <main+0x2b6>
jmp    149b <main+0x2bb>
jmp    14a0 <main+0x2c0>
jmp    14a5 <main+0x2c5>
jmp    14aa <main+0x2ca>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x3,%edi
jne    13e2 <main+0x202>
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rbx
call   10c0 <output_title@plt>
lea    0xe02(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     137c <main+0x19c>
lea    0xdf2(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     137c <main+0x19c>
lea    0xde6(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     137c <main+0x19c>
lea    0xdd8(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     137c <main+0x19c>
lea    0xdca(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     1388 <main+0x1a8>
lea    0xdbe(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     1388 <main+0x1a8>
lea    0xdb2(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     1388 <main+0x1a8>
lea    0xda6(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     1392 <main+0x1b2>
lea    0xd9c(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     139c <main+0x1bc>
lea    0xd8d(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     13a6 <main+0x1c6>
lea    0xd7e(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     13b0 <main+0x1d0>
lea    0xd72(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     13ba <main+0x1da>
lea    0xd64(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     13ce <main+0x1ee>
lea    0xd55(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     13c4 <main+0x1e4>
lea    0xd43(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     13c4 <main+0x1e4>
lea    0xd39(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
je     13d8 <main+0x1f8>
lea    0xd33(%rip),%rsi
mov    %rbx,%rdi
call   1070 <strcmp@plt>
test   %eax,%eax
jne    13e2 <main+0x202>
mov    %rbx,%rdi
call   10b0 <do_sjis@plt>
jmp    1384 <main+0x1a4>
mov    %rbx,%rdi
call   10e0 <do_normal@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    %rbx,%rdi
call   1090 <do_normal_only_charset2uni@plt>
jmp    1384 <main+0x1a4>
mov    %rbx,%rdi
call   1030 <do_cns11643_only_uni2charset@plt>
jmp    1384 <main+0x1a4>
mov    %rbx,%rdi
call   1040 <do_gbk1_only_charset2uni@plt>
jmp    1384 <main+0x1a4>
mov    %rbx,%rdi
call   1080 <do_gbk2_only_charset2uni@plt>
jmp    1384 <main+0x1a4>
mov    %rbx,%rdi
call   1050 <do_gbk1_only_uni2charset@plt>
jmp    1384 <main+0x1a4>
mov    %rbx,%rdi
call   1100 <do_gbk1@plt>
jmp    1384 <main+0x1a4>
mov    %rbx,%rdi
call   10a0 <do_big5@plt>
jmp    1384 <main+0x1a4>
mov    %rbx,%rdi
call   10f0 <do_ksc5601@plt>
jmp    1384 <main+0x1a4>
mov    %rbx,%rdi
call   1060 <do_johab_hangul@plt>
jmp    1384 <main+0x1a4>
mov    $0x1,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"gb2312\00"
@.str.1 = [11 x i8] c"gb12345ext\00"
@.str.2 = [9 x i8] c"jisx0208\00"
@.str.3 = [9 x i8] c"jisx0212\00"
@.str.4 = [11 x i8] c"cns11643_1\00"
@.str.5 = [11 x i8] c"cns11643_2\00"
@.str.6 = [11 x i8] c"cns11643_3\00"
@.str.7 = [13 x i8] c"cns11643_inv\00"
@.str.8 = [8 x i8] c"gbkext1\00"
@.str.9 = [8 x i8] c"gbkext2\00"
@.str.10 = [11 x i8] c"gbkext_inv\00"
@.str.11 = [9 x i8] c"cp936ext\00"
@.str.12 = [8 x i8] c"ksc5601\00"
@.str.13 = [5 x i8] c"big5\00"
@.str.14 = [9 x i8] c"cp950ext\00"
@.str.15 = [13 x i8] c"johab_hangul\00"
@.str.16 = [9 x i8] c"cp932ext\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 %36
24: ; preds = %12
%25 = load i8*, i8** %7
%26 = call i32 @strcmp(i8* %25, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %36
28: ; preds = %24
%29 = load i8*, i8** %7
%30 = call i32 @strcmp(i8* %29, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %36
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 %39, label %36
36: ; preds = %32, %28, %24, %12
%37 = load i8*, i8** %7
%38 = call i32 @do_normal(i8* %37)
br label %133
39: ; preds = %32
%40 = load i8*, i8** %7
%41 = call i32 @strcmp(i8* %40, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%42 = icmp ne i32 %41, 0
br i1 %42, label %43, label %51
43: ; preds = %39
%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 %51
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 %54, label %51
51: ; preds = %47, %43, %39
%52 = load i8*, i8** %7
%53 = call i32 @do_normal_only_charset2uni(i8* %52)
br label %132
54: ; preds = %47
%55 = load i8*, i8** %7
%56 = call i32 @strcmp(i8* %55, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%57 = icmp ne i32 %56, 0
br i1 %57, label %61, label %58
58: ; preds = %54
%59 = load i8*, i8** %7
%60 = call i32 @do_cns11643_only_uni2charset(i8* %59)
br label %131
61: ; preds = %54
%62 = load i8*, i8** %7
%63 = call i32 @strcmp(i8* %62, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%64 = icmp ne i32 %63, 0
br i1 %64, label %68, label %65
65: ; preds = %61
%66 = load i8*, i8** %7
%67 = call i32 @do_gbk1_only_charset2uni(i8* %66)
br label %130
68: ; preds = %61
%69 = load i8*, i8** %7
%70 = call i32 @strcmp(i8* %69, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%71 = icmp ne i32 %70, 0
br i1 %71, label %75, label %72
72: ; preds = %68
%73 = load i8*, i8** %7
%74 = call i32 @do_gbk2_only_charset2uni(i8* %73)
br label %129
75: ; preds = %68
%76 = load i8*, i8** %7
%77 = call i32 @strcmp(i8* %76, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.10, i64 0, i64 0))
%78 = icmp ne i32 %77, 0
br i1 %78, label %82, label %79
79: ; preds = %75
%80 = load i8*, i8** %7
%81 = call i32 @do_gbk1_only_uni2charset(i8* %80)
br label %128
82: ; preds = %75
%83 = load i8*, i8** %7
%84 = call i32 @strcmp(i8* %83, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, 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_gbk1(i8* %87)
br label %127
89: ; preds = %82
%90 = load i8*, i8** %7
%91 = call i32 @strcmp(i8* %90, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, 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_ksc5601(i8* %94)
br label %126
96: ; preds = %89
%97 = load i8*, i8** %7
%98 = call i32 @strcmp(i8* %97, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%99 = icmp ne i32 %98, 0
br i1 %99, label %100, label %104
100: ; preds = %96
%101 = load i8*, i8** %7
%102 = call i32 @strcmp(i8* %101, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0))
%103 = icmp ne i32 %102, 0
br i1 %103, label %107, label %104
104: ; preds = %100, %96
%105 = load i8*, i8** %7
%106 = call i32 @do_big5(i8* %105)
br label %125
107: ; preds = %100
%108 = load i8*, i8** %7
%109 = call i32 @strcmp(i8* %108, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.15, i64 0, i64 0))
%110 = icmp ne i32 %109, 0
br i1 %110, label %114, label %111
111: ; preds = %107
%112 = load i8*, i8** %7
%113 = call i32 @do_johab_hangul(i8* %112)
br label %124
114: ; preds = %107
%115 = load i8*, i8** %7
%116 = call i32 @strcmp(i8* %115, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0))
%117 = icmp ne i32 %116, 0
br i1 %117, label %121, label %118
118: ; preds = %114
%119 = load i8*, i8** %7
%120 = call i32 @do_sjis(i8* %119)
br label %123
121: ; preds = %114
%122 = call i32 @exit(i32 1)
unreachable
123: ; preds = %118
br label %124
124: ; preds = %123, %111
br label %125
125: ; preds = %124, %104
br label %126
126: ; preds = %125, %93
br label %127
127: ; preds = %126, %86
br label %128
128: ; preds = %127, %79
br label %129
129: ; preds = %128, %72
br label %130
130: ; preds = %129, %65
br label %131
131: ; preds = %130, %58
br label %132
132: ; preds = %131, %51
br label %133
133: ; preds = %132, %36
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"gb2312\00"
@.str.1 = [11 x i8] c"gb12345ext\00"
@.str.2 = [9 x i8] c"jisx0208\00"
@.str.3 = [9 x i8] c"jisx0212\00"
@.str.4 = [11 x i8] c"cns11643_1\00"
@.str.5 = [11 x i8] c"cns11643_2\00"
@.str.6 = [11 x i8] c"cns11643_3\00"
@.str.7 = [13 x i8] c"cns11643_inv\00"
@.str.8 = [8 x i8] c"gbkext1\00"
@.str.9 = [8 x i8] c"gbkext2\00"
@.str.10 = [11 x i8] c"gbkext_inv\00"
@.str.11 = [9 x i8] c"cp936ext\00"
@.str.12 = [8 x i8] c"ksc5601\00"
@.str.13 = [5 x i8] c"big5\00"
@.str.14 = [9 x i8] c"cp950ext\00"
@.str.15 = [13 x i8] c"johab_hangul\00"
@.str.16 = [9 x i8] c"cp932ext\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 %23, label %14
14: ; preds = %6
%15 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%16 = icmp eq i32 %15, 0
br i1 %16, label %23, label %17
17: ; preds = %14
%18 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
%19 = icmp eq i32 %18, 0
br i1 %19, label %23, 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 %23, label %25
23: ; preds = %20, %17, %14, %6
%24 = tail call i32 @do_normal(i8* %10)
br label %86
25: ; preds = %20
%26 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(11) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
br i1 %27, label %34, label %28
28: ; preds = %25
%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 %34, 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 %34, label %36
34: ; preds = %31, %28, %25
%35 = tail call i32 @do_normal_only_charset2uni(i8* %10)
br label %86
36: ; preds = %31
%37 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%38 = icmp eq i32 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = tail call i32 @do_cns11643_only_uni2charset(i8* %10)
br label %86
41: ; preds = %36
%42 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%43 = icmp eq i32 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = tail call i32 @do_gbk1_only_charset2uni(i8* %10)
br label %86
46: ; preds = %41
%47 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%48 = icmp eq i32 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %46
%50 = tail call i32 @do_gbk2_only_charset2uni(i8* %10)
br label %86
51: ; preds = %46
%52 = 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))
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = tail call i32 @do_gbk1_only_uni2charset(i8* %10)
br label %86
56: ; preds = %51
%57 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0))
%58 = icmp eq i32 %57, 0
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = tail call i32 @do_gbk1(i8* %10)
br label %86
61: ; preds = %56
%62 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.12, i64 0, i64 0))
%63 = icmp eq i32 %62, 0
br i1 %63, label %64, label %66
64: ; preds = %61
%65 = tail call i32 @do_ksc5601(i8* %10)
br label %86
66: ; preds = %61
%67 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%68 = icmp eq i32 %67, 0
br i1 %68, label %72, label %69
69: ; preds = %66
%70 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.14, i64 0, i64 0))
%71 = icmp eq i32 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %69, %66
%73 = tail call i32 @do_big5(i8* %10)
br label %86
74: ; preds = %69
%75 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(13) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.15, i64 0, i64 0))
%76 = icmp eq i32 %75, 0
br i1 %76, label %77, label %79
77: ; preds = %74
%78 = tail call i32 @do_johab_hangul(i8* %10)
br label %86
79: ; preds = %74
%80 = tail call i32 @strcmp(i8* dereferenceable(1) %10, i8* dereferenceable(9) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.16, i64 0, i64 0))
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %84
82: ; preds = %79
%83 = tail call i32 @do_sjis(i8* %10)
br label %86
84: ; preds = %79
%85 = tail call i32 @exit(i32 1)
unreachable
86: ; preds = %34, %44, %54, %64, %77, %82, %72, %59, %49, %39, %23
ret i32 0
}