#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 */
struct option {
  char *member_0;
  char member_3;
  int /*<<< orphan*/ member_2;
  int /*<<< orphan*/ const member_1;
};

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ abort();
int /*<<< orphan*/ dictionary(char *, char *, char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int getopt_long(int, char **, char *, struct option *, int *);
#define no_argument 129
char *optarg;
int optind;
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ pronunciation(char *);
#define required_argument 128
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ translation(char *, char *, char *);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  char *from_lang = NULL, *to_lang = NULL;
  int index, c, option_index = 0;
  if (argc == 1) {
    printf("Usage: dtool [from-language] [to-language] [option] \"word or "
           "phrase\"\n");
    printf("For help try: dtool --help\n");
    exit(EXIT_SUCCESS);
  }
  while (1) {
    static struct option long_options[] = {
        {"dictionary", required_argument, 0, 'd'},
        {"pronunciation", required_argument, 0, 'p'},
        {"translation", required_argument, 0, 'T'},
        {"from", required_argument, 0, 'f'},
        {"to", required_argument, 0, 't'},
        {"help", no_argument, 0, 'h'},
        {0, 0, 0, 0}};
    c = getopt_long(argc, argv, "d:p:T:f:t:h", long_options, &option_index);
    if (c == -1) {
      break;
    }
    switch (c) {
    case 'd':
      if ((from_lang == NULL) && (to_lang == NULL))
        dictionary(optarg, "en", "en");
      else if ((from_lang == NULL) && (to_lang != NULL))
        dictionary(optarg, "en", to_lang);
      else if ((from_lang != NULL) && (to_lang == NULL))
        dictionary(optarg, from_lang, "en");
      else
        dictionary(optarg, from_lang, to_lang);
      break;
    case 'p':
      pronunciation(optarg);
      break;
    case 'T':
      if ((from_lang == NULL) && (to_lang == NULL)) {
        fprintf(stderr, "Missing argument.\n");
        usage();
        exit(EXIT_FAILURE);
      } else if (((strcmp(from_lang, "en")) != 0) && (to_lang == NULL))
        translation(optarg, from_lang, "en");
      else
        translation(optarg, from_lang, to_lang);
      break;
    case 'f':
      from_lang = optarg;
      break;
    case 't':
      to_lang = optarg;
      break;
    case 'h':
      usage();
      exit(EXIT_SUCCESS);
      break;
    case '?':
      break;
    default:
      abort();
    }
  }
  for (index = optind; index < argc; index++)
    fprintf(stderr, "Non-option argument %s\n", argv[index]);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    11fd <main+0x5d>
lea    0xefa(%rip),%rdi
call   1050 <printf@plt>
lea    0xf34(%rip),%rdi
call   1050 <printf@plt>
mov    0x2dca(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
jmp    1202 <main+0x62>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xf5c(%rip),%rdx
lea    0x2e69(%rip),%rcx
lea    -0x2c(%rbp),%r8
call   1040 <getopt_long@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0xffffffff,-0x28(%rbp)
jne    1232 <main+0x92>
jmp    1425 <main+0x285>
mov    -0x28(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0x38(%rbp)
sub    $0x35,%eax
ja     1419 <main+0x279>
mov    -0x38(%rbp),%rax
lea    0xdae(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
cmpq   $0x0,-0x18(%rbp)
jne    128f <main+0xef>
cmpq   $0x0,-0x20(%rbp)
jne    128f <main+0xef>
mov    0x2d80(%rip),%rax
mov    (%rax),%rdi
lea    0xef6(%rip),%rdx
mov    %rdx,%rsi
call   10c0 <dictionary@plt>
jmp    131a <main+0x17a>
cmpq   $0x0,-0x18(%rbp)
jne    12c4 <main+0x124>
cmpq   $0x0,-0x20(%rbp)
je     12c4 <main+0x124>
mov    0x2d4c(%rip),%rax
mov    (%rax),%rdi
mov    -0x20(%rbp),%rdx
lea    0xebe(%rip),%rsi
call   10c0 <dictionary@plt>
jmp    1315 <main+0x175>
cmpq   $0x0,-0x18(%rbp)
je     12f9 <main+0x159>
cmpq   $0x0,-0x20(%rbp)
jne    12f9 <main+0x159>
mov    0x2d17(%rip),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
lea    0xe89(%rip),%rdx
call   10c0 <dictionary@plt>
jmp    1310 <main+0x170>
mov    0x2cf8(%rip),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   10c0 <dictionary@plt>
jmp    1315 <main+0x175>
jmp    131a <main+0x17a>
jmp    1420 <main+0x280>
mov    0x2cd2(%rip),%rax
mov    (%rax),%rdi
call   1080 <pronunciation@plt>
jmp    1420 <main+0x280>
cmpq   $0x0,-0x18(%rbp)
jne    1375 <main+0x1d5>
cmpq   $0x0,-0x20(%rbp)
jne    1375 <main+0x1d5>
mov    0x2c80(%rip),%rax
mov    (%rax),%edi
lea    0xe22(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    $0x0,%al
call   1090 <usage@plt>
mov    0x2c5a(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
mov    -0x18(%rbp),%rdi
lea    0xdf8(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
je     13b8 <main+0x218>
cmpq   $0x0,-0x20(%rbp)
jne    13b8 <main+0x218>
mov    0x2c58(%rip),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
lea    0xdca(%rip),%rdx
call   10b0 <translation@plt>
jmp    13cf <main+0x22f>
mov    0x2c39(%rip),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   10b0 <translation@plt>
jmp    13d4 <main+0x234>
jmp    1420 <main+0x280>
mov    0x2c18(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
jmp    1420 <main+0x280>
mov    0x2c05(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
jmp    1420 <main+0x280>
mov    $0x0,%al
call   1090 <usage@plt>
mov    0x2bb3(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
jmp    1420 <main+0x280>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1202 <main+0x62>
mov    0x2bb4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    146e <main+0x2ce>
mov    0x2b8c(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xd35(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1431 <main+0x291>
mov    0x2b4b(%rip),%rax
mov    (%rax),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
cmp    $0x1,%edi
je     13db <main+0x23b>
mov    %rsi,%rbx
mov    %edi,%r14d
xor    %ebp,%ebp
lea    0x4(%rsp),%r13
lea    0xe30(%rip),%r12
jmp    11fb <main+0x5b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    0x2e11(%rip),%rax
mov    (%rax),%rdi
lea    0xf20(%rip),%rdx
mov    %rdx,%rsi
call   10c0 <dictionary@plt>
xor    %ebp,%ebp
xor    %r15d,%r15d
jmp    1210 <main+0x70>
mov    0x2df1(%rip),%rax
mov    (%rax),%rbp
nopw   0x0(%rax,%rax,1)
mov    %r14d,%edi
mov    %rbx,%rsi
lea    0xee8(%rip),%rdx
lea    0x2e5c(%rip),%rcx
mov    %r13,%r8
call   1050 <getopt_long@plt>
lea    -0x3f(%rax),%ecx
cmp    $0x35,%ecx
ja     132e <main+0x18e>
movslq (%r12,%rcx,4),%rax
add    %r12,%rax
jmp    *%rax
mov    %r15,%rax
or     %rbp,%rax
je     13af <main+0x20f>
mov    %r15,%rdi
lea    0xeba(%rip),%rsi
call   1060 <strcmp@plt>
mov    0x2d95(%rip),%rcx
mov    (%rcx),%rdi
test   %eax,%eax
je     12e5 <main+0x145>
test   %rbp,%rbp
jne    12e5 <main+0x145>
mov    %r15,%rsi
lea    0xe98(%rip),%rdx
call   10b0 <translation@plt>
xor    %ebp,%ebp
jmp    1210 <main+0x70>
mov    %r15,%rax
or     %rbp,%rax
je     11e0 <main+0x40>
test   %r15,%r15
jne    1298 <main+0xf8>
test   %rbp,%rbp
jne    1310 <main+0x170>
mov    0x2d59(%rip),%rax
mov    (%rax),%rdi
test   %r15,%r15
je     12f5 <main+0x155>
test   %rbp,%rbp
jne    12f5 <main+0x155>
mov    %r15,%rsi
lea    0xe5b(%rip),%rdx
call   10c0 <dictionary@plt>
xor    %ebp,%ebp
jmp    1210 <main+0x70>
mov    0x2d2f(%rip),%rax
mov    (%rax),%r15
jmp    1210 <main+0x70>
mov    0x2d20(%rip),%rax
mov    (%rax),%rdi
call   1080 <pronunciation@plt>
jmp    1210 <main+0x70>
mov    %r15,%rsi
mov    %rbp,%rdx
call   10b0 <translation@plt>
jmp    1210 <main+0x70>
mov    %r15,%rsi
mov    %rbp,%rdx
call   10c0 <dictionary@plt>
jmp    1210 <main+0x70>
cs nopw 0x0(%rax,%rax,1)
nop
mov    0x2ce1(%rip),%rax
mov    (%rax),%rdi
lea    0xdf0(%rip),%rsi
mov    %rbp,%rdx
call   10c0 <dictionary@plt>
jmp    11fb <main+0x5b>
cmp    $0xffffffff,%eax
jne    1393 <main+0x1f3>
mov    0x2ca6(%rip),%rax
movslq (%rax),%rax
cmp    %r14d,%eax
jge    137b <main+0x1db>
lea    (%rbx,%rax,8),%rbp
sub    %eax,%r14d
mov    0x2c80(%rip),%r15
lea    0xdd0(%rip),%r12
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r15),%edi
mov    0x0(%rbp,%rbx,8),%rdx
mov    %r12,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0x1,%rbx
cmp    %ebx,%r14d
jne    1360 <main+0x1c0>
mov    0x2c3e(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
call   1030 <abort@plt>
xor    %eax,%eax
call   1090 <usage@plt>
mov    0x2c18(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
mov    0x2c1a(%rip),%rax
mov    (%rax),%edi
lea    0xd55(%rip),%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
xor    %eax,%eax
call   1090 <usage@plt>
mov    0x2bf4(%rip),%rax
mov    (%rax),%edi
call   10a0 <exit@plt>
lea    0xd5d(%rip),%rdi
call   1040 <puts@plt>
lea    0xd96(%rip),%rdi
call   1040 <puts@plt>
jmp    13a1 <main+0x201>

LLVM IR (-O0):
%struct.option = type { i8*, i8, i32, i32 }
@.str = [70 x i8] c"Usage: dtool [from-language] [to-language] [option] \22word or phrase\22\0A\00"
@.str.1 = [28 x i8] c"For help try: dtool --help\0A\00"
@EXIT_SUCCESS = global i32 0
@main.long_options = internal global [7 x %struct.option] [%struct.option { i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i32 0, i32 0), i8 -128, i32 0, i32 100 }, %struct.option { i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i32 0, i32 0), i8 -128, i32 0, i32 112 }, %struct.option { i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i32 0, i32 0), i8 -128, i32 0, i32 84 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8 -128, i32 0, i32 102 }, %struct.option { i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i32 0, i32 0), i8 -128, i32 0, i32 116 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i32 0, i32 0), i8 -127, i32 0, i32 104 }, %struct.option zeroinitializer]
@.str.2 = [11 x i8] c"dictionary\00"
@.str.3 = [14 x i8] c"pronunciation\00"
@.str.4 = [12 x i8] c"translation\00"
@.str.5 = [5 x i8] c"from\00"
@.str.6 = [3 x i8] c"to\00"
@.str.7 = [5 x i8] c"help\00"
@.str.8 = [12 x i8] c"d:p:T:f:t:h\00"
@optarg = global i8* null
@.str.9 = [3 x i8] c"en\00"
@stderr = global i32 0
@.str.10 = [19 x i8] c"Missing argument.\0A\00"
@EXIT_FAILURE = global i32 0
@optind = global i32 0
@.str.11 = [24 x i8] c"Non-option argument %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
store i8* null, i8** %7
store i32 0, i32* %10
%11 = load i32, i32* %4
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%16 = load i32, i32* @EXIT_SUCCESS
%17 = call i32 @exit(i32 %16)
unreachable
18: ; preds = %2
br label %19
19: ; preds = %18, %109
%20 = load i32, i32* %4
%21 = load i8**, i8*** %5
%22 = call i32 @getopt_long(i32 %20, i8** %21, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), %struct.option* getelementptr inbounds ([7 x %struct.option], [7 x %struct.option]* @main.long_options, i64 0, i64 0), i32* %10)
store i32 %22, i32* %9
%23 = load i32, i32* %9
%24 = icmp eq i32 %23, -1
br i1 %24, label %25, label %26
25: ; preds = %19
br label %110
26: ; preds = %19
%27 = load i32, i32* %9
switch i32 %27, label %107 [
i32 100, label %28
i32 112, label %65
i32 84, label %68
i32 102, label %98
i32 116, label %100
i32 104, label %102
i32 63, label %106
]
28: ; preds = %26
%29 = load i8*, i8** %6
%30 = icmp eq i8* %29, null
br i1 %30, label %31, label %37
31: ; preds = %28
%32 = load i8*, i8** %7
%33 = icmp eq i8* %32, null
br i1 %33, label %34, label %37
34: ; preds = %31
%35 = load i8*, i8** @optarg
%36 = call i32 @dictionary(i8* %35, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %64
37: ; preds = %31, %28
%38 = load i8*, i8** %6
%39 = icmp eq i8* %38, null
br i1 %39, label %40, label %47
40: ; preds = %37
%41 = load i8*, i8** %7
%42 = icmp ne i8* %41, null
br i1 %42, label %43, label %47
43: ; preds = %40
%44 = load i8*, i8** @optarg
%45 = load i8*, i8** %7
%46 = call i32 @dictionary(i8* %44, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %45)
br label %63
47: ; preds = %40, %37
%48 = load i8*, i8** %6
%49 = icmp ne i8* %48, null
br i1 %49, label %50, label %57
50: ; preds = %47
%51 = load i8*, i8** %7
%52 = icmp eq i8* %51, null
br i1 %52, label %53, label %57
53: ; preds = %50
%54 = load i8*, i8** @optarg
%55 = load i8*, i8** %6
%56 = call i32 @dictionary(i8* %54, i8* %55, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %62
57: ; preds = %50, %47
%58 = load i8*, i8** @optarg
%59 = load i8*, i8** %6
%60 = load i8*, i8** %7
%61 = call i32 @dictionary(i8* %58, i8* %59, i8* %60)
br label %62
62: ; preds = %57, %53
br label %63
63: ; preds = %62, %43
br label %64
64: ; preds = %63, %34
br label %109
65: ; preds = %26
%66 = load i8*, i8** @optarg
%67 = call i32 @pronunciation(i8* %66)
br label %109
68: ; preds = %26
%69 = load i8*, i8** %6
%70 = icmp eq i8* %69, null
br i1 %70, label %71, label %80
71: ; preds = %68
%72 = load i8*, i8** %7
%73 = icmp eq i8* %72, null
br i1 %73, label %74, label %80
74: ; preds = %71
%75 = load i32, i32* @stderr
%76 = call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))
%77 = call i32 (...) @usage()
%78 = load i32, i32* @EXIT_FAILURE
%79 = call i32 @exit(i32 %78)
unreachable
80: ; preds = %71, %68
%81 = load i8*, i8** %6
%82 = call i32 @strcmp(i8* %81, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%83 = icmp ne i32 %82, 0
br i1 %83, label %84, label %91
84: ; preds = %80
%85 = load i8*, i8** %7
%86 = icmp eq i8* %85, null
br i1 %86, label %87, label %91
87: ; preds = %84
%88 = load i8*, i8** @optarg
%89 = load i8*, i8** %6
%90 = call i32 @translation(i8* %88, i8* %89, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %96
91: ; preds = %84, %80
%92 = load i8*, i8** @optarg
%93 = load i8*, i8** %6
%94 = load i8*, i8** %7
%95 = call i32 @translation(i8* %92, i8* %93, i8* %94)
br label %96
96: ; preds = %91, %87
br label %97
97: ; preds = %96
br label %109
98: ; preds = %26
%99 = load i8*, i8** @optarg
store i8* %99, i8** %6
br label %109
100: ; preds = %26
%101 = load i8*, i8** @optarg
store i8* %101, i8** %7
br label %109
102: ; preds = %26
%103 = call i32 (...) @usage()
%104 = load i32, i32* @EXIT_SUCCESS
%105 = call i32 @exit(i32 %104)
unreachable
106: ; preds = %26
br label %109
107: ; preds = %26
%108 = call i32 (...) @abort()
unreachable
109: ; preds = %106, %100, %98, %97, %65, %64
br label %19
110: ; preds = %25
%111 = load i32, i32* @optind
store i32 %111, i32* %8
br label %112
112: ; preds = %124, %110
%113 = load i32, i32* %8
%114 = load i32, i32* %4
%115 = icmp slt i32 %113, %114
br i1 %115, label %116, label %127
116: ; preds = %112
%117 = load i32, i32* @stderr
%118 = load i8**, i8*** %5
%119 = load i32, i32* %8
%120 = sext i32 %119 to i64
%121 = getelementptr inbounds i8*, i8** %118, i64 %120
%122 = load i8*, i8** %121
%123 = call i32 (i32, i8*, ...) @fprintf(i32 %117, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0), i8* %122)
br label %124
124: ; preds = %116
%125 = load i32, i32* %8
%126 = add nsw i32 %125, 1
store i32 %126, i32* %8
br label %112
127: ; preds = %112
%128 = load i32, i32* @EXIT_SUCCESS
ret i32 %128
}

LLVM IR (-O2):
%struct.option = type { i8*, i8, i32, i32 }
@EXIT_SUCCESS = global i32 0
@main.long_options = internal global [7 x %struct.option] [%struct.option { i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i32 0, i32 0), i8 -128, i32 0, i32 100 }, %struct.option { i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i32 0, i32 0), i8 -128, i32 0, i32 112 }, %struct.option { i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i32 0, i32 0), i8 -128, i32 0, i32 84 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8 -128, i32 0, i32 102 }, %struct.option { i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i32 0, i32 0), i8 -128, i32 0, i32 116 }, %struct.option { i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i32 0, i32 0), i8 -127, i32 0, i32 104 }, %struct.option zeroinitializer]
@.str.2 = [11 x i8] c"dictionary\00"
@.str.3 = [14 x i8] c"pronunciation\00"
@.str.4 = [12 x i8] c"translation\00"
@.str.5 = [5 x i8] c"from\00"
@.str.6 = [3 x i8] c"to\00"
@.str.7 = [5 x i8] c"help\00"
@.str.8 = [12 x i8] c"d:p:T:f:t:h\00"
@optarg = global i8* null
@.str.9 = [3 x i8] c"en\00"
@stderr = global i32 0
@.str.10 = [19 x i8] c"Missing argument.\0A\00"
@EXIT_FAILURE = global i32 0
@optind = global i32 0
@.str.11 = [24 x i8] c"Non-option argument %s\0A\00"
@str = [69 x i8] c"Usage: dtool [from-language] [to-language] [option] \22word or phrase\22\00"
@str.12 = [27 x i8] c"For help try: dtool --help\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = icmp eq i32 %0, 1
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.12, i64 0, i64 0))
%9 = load i32, i32* @EXIT_SUCCESS
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %2, %15
%12 = phi i8* [ %16, %15 ], [ null, %2 ]
%13 = phi i8* [ %17, %15 ], [ null, %2 ]
%14 = call i32 @getopt_long(i32 %0, i8** %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), %struct.option* getelementptr inbounds ([7 x %struct.option], [7 x %struct.option]* @main.long_options, i64 0, i64 0), i32* %3)
switch i32 %14, label %69 [
i32 -1, label %71
i32 100, label %18
i32 112, label %39
i32 84, label %42
i32 102, label %61
i32 116, label %63
i32 104, label %65
i32 63, label %15
]
15: ; preds = %11, %59, %57, %22, %35, %37, %28, %63, %61, %39
%16 = phi i8* [ %64, %63 ], [ %12, %61 ], [ null, %57 ], [ %12, %59 ], [ %12, %39 ], [ null, %22 ], [ %12, %28 ], [ null, %35 ], [ %12, %37 ], [ %12, %11 ]
%17 = phi i8* [ %13, %63 ], [ %62, %61 ], [ %13, %57 ], [ %13, %59 ], [ %13, %39 ], [ null, %22 ], [ null, %28 ], [ %13, %35 ], [ %13, %37 ], [ %13, %11 ]
br label %11
18: ; preds = %11
%19 = icmp eq i8* %13, null
%20 = icmp eq i8* %12, null
%21 = select i1 %19, i1 %20, i1 false
br i1 %21, label %22, label %25
22: ; preds = %18
%23 = load i8*, i8** @optarg
%24 = call i32 @dictionary(i8* %23, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %15
25: ; preds = %18
%26 = icmp ne i8* %12, null
%27 = select i1 %19, i1 %26, i1 false
br i1 %27, label %28, label %31
28: ; preds = %25
%29 = load i8*, i8** @optarg
%30 = call i32 @dictionary(i8* %29, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i8* %12)
br label %15
31: ; preds = %25
%32 = icmp ne i8* %13, null
%33 = select i1 %32, i1 %20, i1 false
%34 = load i8*, i8** @optarg
br i1 %33, label %35, label %37
35: ; preds = %31
%36 = call i32 @dictionary(i8* %34, i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %15
37: ; preds = %31
%38 = call i32 @dictionary(i8* %34, i8* %13, i8* %12)
br label %15
39: ; preds = %11
%40 = load i8*, i8** @optarg
%41 = call i32 @pronunciation(i8* %40)
br label %15
42: ; preds = %11
%43 = icmp eq i8* %13, null
%44 = icmp eq i8* %12, null
%45 = select i1 %43, i1 %44, i1 false
br i1 %45, label %46, label %52
46: ; preds = %42
%47 = load i32, i32* @stderr
%48 = call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0))
%49 = call i32 (...) @usage()
%50 = load i32, i32* @EXIT_FAILURE
%51 = call i32 @exit(i32 %50)
unreachable
52: ; preds = %42
%53 = call i32 @strcmp(i8* dereferenceable(1) %13, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
%54 = icmp ne i32 %53, 0
%55 = select i1 %54, i1 %44, i1 false
%56 = load i8*, i8** @optarg
br i1 %55, label %57, label %59
57: ; preds = %52
%58 = call i32 @translation(i8* %56, i8* %13, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %15
59: ; preds = %52
%60 = call i32 @translation(i8* %56, i8* %13, i8* %12)
br label %15
61: ; preds = %11
%62 = load i8*, i8** @optarg
br label %15
63: ; preds = %11
%64 = load i8*, i8** @optarg
br label %15
65: ; preds = %11
%66 = call i32 (...) @usage()
%67 = load i32, i32* @EXIT_SUCCESS
%68 = call i32 @exit(i32 %67)
unreachable
69: ; preds = %11
%70 = call i32 (...) @abort()
unreachable
71: ; preds = %11
%72 = load i32, i32* @optind
%73 = icmp slt i32 %72, %0
br i1 %73, label %74, label %85
74: ; preds = %71
%75 = sext i32 %72 to i64
br label %76
76: ; preds = %74, %76
%77 = phi i64 [ %75, %74 ], [ %82, %76 ]
%78 = load i32, i32* @stderr
%79 = getelementptr inbounds i8*, i8** %1, i64 %77
%80 = load i8*, i8** %79
%81 = call i32 (i32, i8*, ...) @fprintf(i32 %78, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.11, i64 0, i64 0), i8* %80)
%82 = add nsw i64 %77, 1
%83 = trunc i64 %82 to i32
%84 = icmp eq i32 %83, %0
br i1 %84, label %85, label %76
85: ; preds = %76, %71
%86 = load i32, i32* @EXIT_SUCCESS
ret i32 %86
}