#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 */
scalar_t__ check(char const *, char const *);
int /*<<< orphan*/ exit(int);
int main(int argc, char **argv) {
  const char *from[] = {"CP874",  "CP932",  "CP936",  "CP949",  "CP950",
                        "CP1250", "CP1251", "CP1252", "CP1253", "CP1254",
                        "CP1255", "CP1256", "CP1257", "koi8-r", 0};
  const char *to[] = {"UNICODELITTLE", "UNICODEBIG", 0};
  int fromIndex = 0;
  int toIndex = 0;
  while (to[toIndex] != 0) {
    while (from[fromIndex] != 0) {
      if (check(from[fromIndex], to[toIndex]) != 0)
        exit(1);
      fromIndex = fromIndex + 1;
    }
    toIndex = toIndex + 1;
    fromIndex = 0;
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x90(%rbp),%rdi
lea    0x2c29(%rip),%rsi
mov    $0x78,%edx
call   1030 <memcpy@plt>
mov    0x2c98(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0x2c92(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0x2c8c(%rip),%rax
mov    %rax,-0xa0(%rbp)
movl   $0x0,-0xb4(%rbp)
movl   $0x0,-0xb8(%rbp)
movslq -0xb8(%rbp),%rax
cmpq   $0x0,-0xb0(%rbp,%rax,8)
je     1239 <main+0x109>
jmp    11ba <main+0x8a>
movslq -0xb4(%rbp),%rax
cmpq   $0x0,-0x90(%rbp,%rax,8)
je     121b <main+0xeb>
movslq -0xb4(%rbp),%rax
mov    -0x90(%rbp,%rax,8),%rdi
ff
movslq -0xb8(%rbp),%rax
mov    -0xb0(%rbp,%rax,8),%rsi
ff
call   1040 <check@plt>
cmp    $0x0,%rax
je     1207 <main+0xd7>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    11ba <main+0x8a>
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
movl   $0x0,-0xb4(%rbp)
jmp    119f <main+0x6f>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xf2e(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xec2(%rip),%rdi
lea    0xf12(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xeac(%rip),%rdi
lea    0xef6(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xe96(%rip),%rdi
lea    0xeda(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xe80(%rip),%rdi
lea    0xebe(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xe6a(%rip),%rdi
lea    0xea2(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xe55(%rip),%rdi
lea    0xe86(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xe40(%rip),%rdi
lea    0xe6a(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xe2b(%rip),%rdi
lea    0xe4e(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xe16(%rip),%rdi
lea    0xe32(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xe01(%rip),%rdi
lea    0xe16(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xdec(%rip),%rdi
lea    0xdfa(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xdd7(%rip),%rdi
lea    0xdde(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xdc2(%rip),%rdi
lea    0xdc2(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xd50(%rip),%rdi
lea    0xdb4(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xd3a(%rip),%rdi
lea    0xd98(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xd24(%rip),%rdi
lea    0xd7c(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xd0e(%rip),%rdi
lea    0xd60(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xcf8(%rip),%rdi
lea    0xd44(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xce2(%rip),%rdi
lea    0xd28(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xccd(%rip),%rdi
lea    0xd0c(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xcb8(%rip),%rdi
lea    0xcf0(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xca3(%rip),%rdi
lea    0xcd4(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xc92(%rip),%rdi
lea    0xcbc(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xc81(%rip),%rdi
lea    0xca4(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xc70(%rip),%rdi
lea    0xc8c(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xc5f(%rip),%rdi
lea    0xc74(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
lea    0xc4e(%rip),%rdi
lea    0xc5c(%rip),%rsi
call   1030 <check@plt>
test   %rax,%rax
jne    1420 <main+0x300>
xor    %edi,%edi
call   1040 <exit@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"CP874\00"
@.str.1 = [6 x i8] c"CP932\00"
@.str.2 = [6 x i8] c"CP936\00"
@.str.3 = [6 x i8] c"CP949\00"
@.str.4 = [6 x i8] c"CP950\00"
@.str.5 = [7 x i8] c"CP1250\00"
@.str.6 = [7 x i8] c"CP1251\00"
@.str.7 = [7 x i8] c"CP1252\00"
@.str.8 = [7 x i8] c"CP1253\00"
@.str.9 = [7 x i8] c"CP1254\00"
@.str.10 = [7 x i8] c"CP1255\00"
@.str.11 = [7 x i8] c"CP1256\00"
@.str.12 = [7 x i8] c"CP1257\00"
@.str.13 = [7 x i8] c"koi8-r\00"
@__const.main.from = [15 x i8*] [i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i32 0, i32 0), i8* null]
@.str.14 = [14 x i8] c"UNICODELITTLE\00"
@.str.15 = [11 x i8] c"UNICODEBIG\00"
@__const.main.to = [3 x i8*] [i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i32 0, i32 0), i8* null]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [15 x i8*]
%7 = alloca [3 x i8*]
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = bitcast [15 x i8*]* %6 to i8*
%11 = bitcast [3 x i8*]* %7 to i8*
store i32 0, i32* %8
store i32 0, i32* %9
br label %12
12: ; preds = %41, %2
%13 = load i32, i32* %9
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [3 x i8*], [3 x i8*]* %7, i64 0, i64 %14
%16 = load i8*, i8** %15
%17 = icmp ne i8* %16, null
br i1 %17, label %18, label %44
18: ; preds = %12
br label %19
19: ; preds = %38, %18
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [15 x i8*], [15 x i8*]* %6, i64 0, i64 %21
%23 = load i8*, i8** %22
%24 = icmp ne i8* %23, null
br i1 %24, label %25, label %41
25: ; preds = %19
%26 = load i32, i32* %8
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [15 x i8*], [15 x i8*]* %6, i64 0, i64 %27
%29 = load i8*, i8** %28
%30 = load i32, i32* %9
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [3 x i8*], [3 x i8*]* %7, i64 0, i64 %31
%33 = load i8*, i8** %32
%34 = call i64 @check(i8* %29, i8* %33)
%35 = icmp ne i64 %34, 0
br i1 %35, label %36, label %38
36: ; preds = %25
%37 = call i32 @exit(i32 1)
unreachable
38: ; preds = %25
%39 = load i32, i32* %8
%40 = add nsw i32 %39, 1
store i32 %40, i32* %8
br label %19
41: ; preds = %19
%42 = load i32, i32* %9
%43 = add nsw i32 %42, 1
store i32 %43, i32* %9
store i32 0, i32* %8
br label %12
44: ; preds = %12
%45 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [6 x i8] c"CP874\00"
@.str.1 = [6 x i8] c"CP932\00"
@.str.2 = [6 x i8] c"CP936\00"
@.str.3 = [6 x i8] c"CP949\00"
@.str.4 = [6 x i8] c"CP950\00"
@.str.5 = [7 x i8] c"CP1250\00"
@.str.6 = [7 x i8] c"CP1251\00"
@.str.7 = [7 x i8] c"CP1252\00"
@.str.8 = [7 x i8] c"CP1253\00"
@.str.9 = [7 x i8] c"CP1254\00"
@.str.10 = [7 x i8] c"CP1255\00"
@.str.11 = [7 x i8] c"CP1256\00"
@.str.12 = [7 x i8] c"CP1257\00"
@.str.13 = [7 x i8] c"koi8-r\00"
@.str.14 = [14 x i8] c"UNICODELITTLE\00"
@.str.15 = [11 x i8] c"UNICODEBIG\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @check(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %88
5: ; preds = %2
%6 = tail call i64 @check(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %88
8: ; preds = %5
%9 = tail call i64 @check(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %88
11: ; preds = %8
%12 = tail call i64 @check(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %88
14: ; preds = %11
%15 = tail call i64 @check(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %88
17: ; preds = %14
%18 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %88
20: ; preds = %17
%21 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %88
23: ; preds = %20
%24 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
br i1 %25, label %26, label %88
26: ; preds = %23
%27 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %88
29: ; preds = %26
%30 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %32, label %88
32: ; preds = %29
%33 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %88
35: ; preds = %32
%36 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %88
38: ; preds = %35
%39 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %88
41: ; preds = %38
%42 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.14, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %88
44: ; preds = %41
%45 = tail call i64 @check(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %88
47: ; preds = %44
%48 = tail call i64 @check(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %50, label %88
50: ; preds = %47
%51 = tail call i64 @check(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%52 = icmp eq i64 %51, 0
br i1 %52, label %53, label %88
53: ; preds = %50
%54 = tail call i64 @check(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %88
56: ; preds = %53
%57 = tail call i64 @check(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%58 = icmp eq i64 %57, 0
br i1 %58, label %59, label %88
59: ; preds = %56
%60 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%61 = icmp eq i64 %60, 0
br i1 %61, label %62, label %88
62: ; preds = %59
%63 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%64 = icmp eq i64 %63, 0
br i1 %64, label %65, label %88
65: ; preds = %62
%66 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %88
68: ; preds = %65
%69 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%70 = icmp eq i64 %69, 0
br i1 %70, label %71, label %88
71: ; preds = %68
%72 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %88
74: ; preds = %71
%75 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%76 = icmp eq i64 %75, 0
br i1 %76, label %77, label %88
77: ; preds = %74
%78 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%79 = icmp eq i64 %78, 0
br i1 %79, label %80, label %88
80: ; preds = %77
%81 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%82 = icmp eq i64 %81, 0
br i1 %82, label %83, label %88
83: ; preds = %80
%84 = tail call i64 @check(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.15, i64 0, i64 0))
%85 = icmp eq i64 %84, 0
br i1 %85, label %86, label %88
86: ; preds = %83
%87 = tail call i32 @exit(i32 0)
unreachable
88: ; preds = %83, %80, %77, %74, %71, %68, %65, %62, %59, %56, %53, %50, %47, %44, %41, %38, %35, %32, %29, %26, %23, %20, %17, %14, %11, %8, %5, %2
%89 = tail call i32 @exit(i32 1)
unreachable
}