#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*/ convert(int, int, char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int getopt(int const, char **, char *);
int /*<<< orphan*/ info();
int /*<<< orphan*/ interactive();
int /*<<< orphan*/ isprint(char);
char *optarg;
scalar_t__ opterr;
int optind;
char optopt;
int /*<<< orphan*/ print_help(int);
int /*<<< orphan*/ printf(char *, char *);
int set_base(char *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ verify_arg(char *, int, int const);
int main(const int argc, char *argv[]) {
  if (argc == 1) {
    interactive();
    return 0;
  }
  char *in_base_value = NULL, *out_base_value = NULL;
  int iflag, oflag, index, c;
  iflag = oflag = c = 0;
  opterr = 0;
  while ((c = getopt(argc, argv, "i:o:hmf")) != -1) {
    switch (c) {
    case 'h':
      print_help(!-1);
      return 0;
    case 'm':
      info();
      return 0;
    case 'f':
      interactive();
      return 0;
    case 'i':
      in_base_value = optarg;
      iflag = 1;
      break;
    case 'o':
      out_base_value = optarg;
      oflag = 1;
      break;
    case '?':
      if ((optopt == 'i') || (optopt == 'o'))
        fprintf(stderr, "error: option -%c requires an argument.\n", optopt);
      else if (isprint(optopt)) {
        fprintf(stderr, "error: unknown option `-%c'.\n", optopt);
        print_help(-1);
      } else
        fprintf(stderr, "error: unknown option char `\\x%x'.\n", optopt);
      return 1;
    default:
      return 1;
    }
  }
  if (iflag != 1 || oflag != 1) {
    fprintf(stderr, "error: in/out base must be specific.\n");
    return 0;
  }
  extern int InNumBase, OutNumBase;
  int error = set_base(in_base_value, out_base_value);
  if (error == -1) {
    fprintf(stderr, "error: couldn't set number base.\n");
    return 1;
  }
  if (argc < 6) {
    fprintf(stderr, "error: no input value!\n");
    return 1;
  }
  char result[1000];
  for (index = optind; index < argc; index++) {
    if (!verify_arg(argv[index], InNumBase, argc)) {
      fprintf(stderr, "error: illegal char(s)\n");
      return 1;
    } else {
      convert(InNumBase, OutNumBase, argv[index], result);
      printf("%s\n", result);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x430,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    11d6 <main+0x36>
mov    $0x0,%al
call   1070 <interactive@plt>
movl   $0x0,-0x4(%rbp)
jmp    14f4 <main+0x354>
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x24(%rbp)
mov    0x2dae(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xead(%rip),%rdx
call   1090 <getopt@plt>
mov    %eax,-0x30(%rbp)
cmp    $0xffffffff,%eax
je     139b <main+0x1fb>
mov    -0x30(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0x428(%rbp)
sub    $0x30,%eax
ja     138a <main+0x1ea>
mov    -0x428(%rbp),%rax
lea    0xdb2(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
xor    %edi,%edi
call   10b0 <print_help@plt>
movl   $0x0,-0x4(%rbp)
jmp    14f4 <main+0x354>
mov    $0x0,%al
call   10c0 <info@plt>
movl   $0x0,-0x4(%rbp)
jmp    14f4 <main+0x354>
mov    $0x0,%al
call   1070 <interactive@plt>
movl   $0x0,-0x4(%rbp)
jmp    14f4 <main+0x354>
mov    0x2d61(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
movl   $0x1,-0x24(%rbp)
jmp    1396 <main+0x1f6>
mov    0x2d47(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
movl   $0x1,-0x28(%rbp)
jmp    1396 <main+0x1f6>
mov    0x2d0d(%rip),%rax
movsbl (%rax),%eax
cmp    $0x69,%eax
je     12ea <main+0x14a>
mov    0x2cfa(%rip),%rax
movsbl (%rax),%eax
cmp    $0x6f,%eax
jne    1310 <main+0x170>
mov    0x2cc7(%rip),%rax
mov    (%rax),%edi
mov    0x2cde(%rip),%rax
movsbl (%rax),%edx
lea    0xdc8(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    137e <main+0x1de>
mov    0x2cc1(%rip),%rax
movsbl (%rax),%edi
call   1080 <isprint@plt>
cmp    $0x0,%eax
je     1358 <main+0x1b8>
mov    0x2c89(%rip),%rax
mov    (%rax),%edi
mov    0x2ca0(%rip),%rax
movsbl (%rax),%edx
lea    0xdb3(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0xffffffff,%edi
call   10b0 <print_help@plt>
jmp    1379 <main+0x1d9>
mov    0x2c59(%rip),%rax
mov    (%rax),%edi
mov    0x2c70(%rip),%rax
movsbl (%rax),%edx
lea    0xda1(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    137e <main+0x1de>
movl   $0x1,-0x4(%rbp)
jmp    14f4 <main+0x354>
movl   $0x1,-0x4(%rbp)
jmp    14f4 <main+0x354>
jmp    1209 <main+0x69>
cmpl   $0x1,-0x24(%rbp)
jne    13af <main+0x20f>
cmpl   $0x1,-0x28(%rbp)
je     13d2 <main+0x232>
mov    0x2c02(%rip),%rax
mov    (%rax),%edi
lea    0xd78(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    14f4 <main+0x354>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   10a0 <set_base@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0xffffffff,-0x34(%rbp)
jne    140f <main+0x26f>
mov    0x2bc5(%rip),%rax
mov    (%rax),%edi
lea    0xd61(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    14f4 <main+0x354>
cmpl   $0x6,-0x8(%rbp)
jge    143c <main+0x29c>
mov    0x2b98(%rip),%rax
mov    (%rax),%edi
lea    0xd56(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    14f4 <main+0x354>
mov    0x2b8d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    14ed <main+0x34d>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    0x2b61(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
call   1060 <verify_arg@plt>
cmp    $0x0,%eax
jne    149d <main+0x2fd>
mov    0x2b37(%rip),%rax
mov    (%rax),%edi
lea    0xd0d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    14f4 <main+0x354>
mov    0x2b24(%rip),%rax
mov    (%rax),%edi
mov    0x2b33(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    -0x420(%rbp),%rcx
call   1030 <convert@plt>
lea    -0x420(%rbp),%rsi
lea    0xcda(%rip),%rdi
call   1040 <printf@plt>
jmp    14df <main+0x33f>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1448 <main+0x2a8>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x430,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x3f8,%rsp
cmp    $0x1,%edi
jne    11d5 <main+0x35>
xor    %r14d,%r14d
xor    %eax,%eax
call   1070 <interactive@plt>
mov    %r14d,%eax
add    $0x3f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rsi,%rbx
mov    %edi,%r15d
mov    0x2dce(%rip),%rax
movq   $0x0,(%rax)
xor    %eax,%eax
mov    %rax,0x8(%rsp)
mov    $0x1,%al
mov    %eax,0x4(%rsp)
lea    0xebf(%rip),%r12
mov    0x2df4(%rip),%r14
xor    %ebp,%ebp
xor    %r13d,%r13d
jmp    1219 <main+0x79>
nopl   0x0(%rax,%rax,1)
mov    (%r14),%rbp
mov    $0x1,%r13d
mov    %r15d,%edi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1090 <getopt@plt>
cmp    $0x6f,%eax
je     1210 <main+0x70>
lea    -0x3f(%rax),%ecx
cmp    $0x2e,%ecx
ja     1256 <main+0xb6>
lea    0xdc5(%rip),%rdx
movslq (%rdx,%rcx,4),%rax
add    %rdx,%rax
jmp    *%rax
mov    (%r14),%rax
mov    %rax,0x8(%rsp)
movl   $0x0,0x4(%rsp)
jmp    1219 <main+0x79>
cmp    $0xffffffff,%eax
jne    1360 <main+0x1c0>
cmp    $0x1,%r13d
setne  %al
mov    0x4(%rsp),%ecx
or     %al,%cl
test   $0x1,%cl
je     12e4 <main+0x144>
mov    0x2d40(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
xor    %r14d,%r14d
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    11c0 <main+0x20>
mov    0x2d41(%rip),%rbx
movzbl (%rbx),%edx
cmp    $0x6f,%edx
je     12a4 <main+0x104>
cmp    $0x69,%dl
jne    130e <main+0x16e>
mov    0x2d0d(%rip),%rax
mov    (%rax),%edi
lea    0xe10(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%r14d
jmp    11c0 <main+0x20>
xor    %r14d,%r14d
xor    %edi,%edi
call   10b0 <print_help@plt>
jmp    11c0 <main+0x20>
xor    %r14d,%r14d
xor    %eax,%eax
call   10c0 <info@plt>
jmp    11c0 <main+0x20>
mov    0x8(%rsp),%rdi
mov    %rbp,%rsi
call   10a0 <set_base@plt>
cmp    $0xffffffff,%eax
je     1349 <main+0x1a9>
cmp    $0x5,%r15d
jg     1377 <main+0x1d7>
mov    0x2cb5(%rip),%rax
mov    (%rax),%edi
lea    0xe6b(%rip),%rsi
jmp    1359 <main+0x1b9>
movsbl %dl,%edi
call   1080 <isprint@plt>
mov    0x2c9b(%rip),%rcx
mov    (%rcx),%edi
movsbl (%rbx),%edx
test   %eax,%eax
je     136b <main+0x1cb>
lea    0xdc0(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0xffffffff,%edi
call   10b0 <print_help@plt>
mov    $0x1,%r14d
jmp    11c0 <main+0x20>
mov    0x2c68(%rip),%rax
mov    (%rax),%edi
lea    0xdfc(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%r14d
jmp    11c0 <main+0x20>
lea    0xd99(%rip),%rsi
jmp    12b4 <main+0x114>
mov    0x2c52(%rip),%rax
movslq (%rax),%rax
xor    %r14d,%r14d
cmp    %r15d,%eax
jge    11c0 <main+0x20>
lea    (%rbx,%rax,8),%rbp
mov    %r15d,%r13d
sub    %eax,%r13d
xor    %ebx,%ebx
mov    0x2c28(%rip),%r14
lea    0x10(%rsp),%r12
mov    0x0(%rbp,%rbx,8),%rdi
mov    (%r14),%esi
mov    %r15d,%edx
call   1060 <verify_arg@plt>
test   %eax,%eax
je     13f2 <main+0x252>
mov    (%r14),%edi
mov    0x2c1d(%rip),%rax
mov    (%rax),%esi
mov    0x0(%rbp,%rbx,8),%rdx
mov    %r12,%rcx
call   1030 <convert@plt>
lea    0xdce(%rip),%rdi
mov    %r12,%rsi
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %ebx,%r13d
jne    13a5 <main+0x205>
xor    %r14d,%r14d
jmp    11c0 <main+0x20>
mov    0x2bbf(%rip),%rax
mov    (%rax),%edi
lea    0xd8d(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%r14d
jmp    11c0 <main+0x20>

LLVM IR (-O0):
@opterr = global i64 0
@.str = [8 x i8] c"i:o:hmf\00"
@optarg = global i8* null
@optopt = global i8 0
@stderr = global i32 0
@.str.1 = [41 x i8] c"error: option -%c requires an argument.\0A\00"
@.str.2 = [30 x i8] c"error: unknown option `-%c'.\0A\00"
@.str.3 = [36 x i8] c"error: unknown option char `\\x%x'.\0A\00"
@.str.4 = [38 x i8] c"error: in/out base must be specific.\0A\00"
@.str.5 = [34 x i8] c"error: couldn't set number base.\0A\00"
@.str.6 = [24 x i8] c"error: no input value!\0A\00"
@optind = global i32 0
@InNumBase = external global i32
@.str.7 = [24 x i8] c"error: illegal char(s)\0A\00"
@OutNumBase = external global i32
@.str.8 = [4 x i8] c"%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
%11 = alloca i32
%12 = alloca i32
%13 = alloca [1000 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %18
16: ; preds = %2
%17 = call i32 (...) @interactive()
store i32 0, i32* %3
br label %128
18: ; preds = %2
store i8* null, i8** %6
store i8* null, i8** %7
store i32 0, i32* %11
store i32 0, i32* %9
store i32 0, i32* %8
store i64 0, i64* @opterr
br label %19
19: ; preds = %67, %18
%20 = load i32, i32* %4
%21 = load i8**, i8*** %5
%22 = call i32 @getopt(i32 %20, i8** %21, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i32 %22, i32* %11
%23 = icmp ne i32 %22, -1
br i1 %23, label %24, label %68
24: ; preds = %19
%25 = load i32, i32* %11
switch i32 %25, label %66 [
i32 104, label %26
i32 109, label %28
i32 102, label %30
i32 105, label %32
i32 111, label %34
i32 63, label %36
]
26: ; preds = %24
%27 = call i32 @print_help(i32 0)
store i32 0, i32* %3
br label %128
28: ; preds = %24
%29 = call i32 (...) @info()
store i32 0, i32* %3
br label %128
30: ; preds = %24
%31 = call i32 (...) @interactive()
store i32 0, i32* %3
br label %128
32: ; preds = %24
%33 = load i8*, i8** @optarg
store i8* %33, i8** %6
store i32 1, i32* %8
br label %67
34: ; preds = %24
%35 = load i8*, i8** @optarg
store i8* %35, i8** %7
store i32 1, i32* %9
br label %67
36: ; preds = %24
%37 = load i8, i8* @optopt
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 105
br i1 %39, label %44, label %40
40: ; preds = %36
%41 = load i8, i8* @optopt
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 111
br i1 %43, label %44, label %49
44: ; preds = %40, %36
%45 = load i32, i32* @stderr
%46 = load i8, i8* @optopt
%47 = sext i8 %46 to i32
%48 = call i32 (i32, i8*, ...) @fprintf(i32 %45, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %47)
br label %65
49: ; preds = %40
%50 = load i8, i8* @optopt
%51 = call i32 @isprint(i8 signext %50)
%52 = icmp ne i32 %51, 0
br i1 %52, label %53, label %59
53: ; preds = %49
%54 = load i32, i32* @stderr
%55 = load i8, i8* @optopt
%56 = sext i8 %55 to i32
%57 = call i32 (i32, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %56)
%58 = call i32 @print_help(i32 -1)
br label %64
59: ; preds = %49
%60 = load i32, i32* @stderr
%61 = load i8, i8* @optopt
%62 = sext i8 %61 to i32
%63 = call i32 (i32, i8*, ...) @fprintf(i32 %60, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %62)
br label %64
64: ; preds = %59, %53
br label %65
65: ; preds = %64, %44
store i32 1, i32* %3
br label %128
66: ; preds = %24
store i32 1, i32* %3
br label %128
67: ; preds = %34, %32
br label %19
68: ; preds = %19
%69 = load i32, i32* %8
%70 = icmp ne i32 %69, 1
br i1 %70, label %74, label %71
71: ; preds = %68
%72 = load i32, i32* %9
%73 = icmp ne i32 %72, 1
br i1 %73, label %74, label %77
74: ; preds = %71, %68
%75 = load i32, i32* @stderr
%76 = call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %3
br label %128
77: ; preds = %71
%78 = load i8*, i8** %6
%79 = load i8*, i8** %7
%80 = call i32 @set_base(i8* %78, i8* %79)
store i32 %80, i32* %12
%81 = load i32, i32* %12
%82 = icmp eq i32 %81, -1
br i1 %82, label %83, label %86
83: ; preds = %77
%84 = load i32, i32* @stderr
%85 = call i32 (i32, i8*, ...) @fprintf(i32 %84, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %3
br label %128
86: ; preds = %77
%87 = load i32, i32* %4
%88 = icmp slt i32 %87, 6
br i1 %88, label %89, label %92
89: ; preds = %86
%90 = load i32, i32* @stderr
%91 = call i32 (i32, i8*, ...) @fprintf(i32 %90, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
store i32 1, i32* %3
br label %128
92: ; preds = %86
%93 = load i32, i32* @optind
store i32 %93, i32* %10
br label %94
94: ; preds = %124, %92
%95 = load i32, i32* %10
%96 = load i32, i32* %4
%97 = icmp slt i32 %95, %96
br i1 %97, label %98, label %127
98: ; preds = %94
%99 = load i8**, i8*** %5
%100 = load i32, i32* %10
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds i8*, i8** %99, i64 %101
%103 = load i8*, i8** %102
%104 = load i32, i32* @InNumBase
%105 = load i32, i32* %4
%106 = call i32 @verify_arg(i8* %103, i32 %104, i32 %105)
%107 = icmp ne i32 %106, 0
br i1 %107, label %111, label %108
108: ; preds = %98
%109 = load i32, i32* @stderr
%110 = call i32 (i32, i8*, ...) @fprintf(i32 %109, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
store i32 1, i32* %3
br label %128
111: ; preds = %98
%112 = load i32, i32* @InNumBase
%113 = load i32, i32* @OutNumBase
%114 = load i8**, i8*** %5
%115 = load i32, i32* %10
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds i8*, i8** %114, i64 %116
%118 = load i8*, i8** %117
%119 = getelementptr inbounds [1000 x i8], [1000 x i8]* %13, i64 0, i64 0
%120 = call i32 @convert(i32 %112, i32 %113, i8* %118, i8* %119)
%121 = getelementptr inbounds [1000 x i8], [1000 x i8]* %13, i64 0, i64 0
%122 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %121)
br label %123
123: ; preds = %111
br label %124
124: ; preds = %123
%125 = load i32, i32* %10
%126 = add nsw i32 %125, 1
store i32 %126, i32* %10
br label %94
127: ; preds = %94
store i32 0, i32* %3
br label %128
128: ; preds = %127, %108, %89, %83, %74, %66, %65, %30, %28, %26, %16
%129 = load i32, i32* %3
ret i32 %129
}

LLVM IR (-O2):
@opterr = global i64 0
@.str = [8 x i8] c"i:o:hmf\00"
@optarg = global i8* null
@optopt = global i8 0
@stderr = global i32 0
@.str.1 = [41 x i8] c"error: option -%c requires an argument.\0A\00"
@.str.2 = [30 x i8] c"error: unknown option `-%c'.\0A\00"
@.str.3 = [36 x i8] c"error: unknown option char `\\x%x'.\0A\00"
@.str.4 = [38 x i8] c"error: in/out base must be specific.\0A\00"
@.str.5 = [34 x i8] c"error: couldn't set number base.\0A\00"
@.str.6 = [24 x i8] c"error: no input value!\0A\00"
@optind = global i32 0
@InNumBase = external global i32
@.str.7 = [24 x i8] c"error: illegal char(s)\0A\00"
@OutNumBase = external global i32
@.str.8 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca [1000 x i8]
%4 = icmp eq i32 %0, 1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @interactive()
br label %88
7: ; preds = %2
store i64 0, i64* @opterr
br label %8
8: ; preds = %23, %7
%9 = phi i8* [ %24, %23 ], [ null, %7 ]
%10 = phi i8* [ %14, %23 ], [ null, %7 ]
%11 = phi i1 [ false, %23 ], [ true, %7 ]
%12 = phi i32 [ %15, %23 ], [ 0, %7 ]
br label %13
13: ; preds = %8, %25
%14 = phi i8* [ %26, %25 ], [ %10, %8 ]
%15 = phi i32 [ 1, %25 ], [ %12, %8 ]
%16 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
switch i32 %16, label %88 [
i32 -1, label %44
i32 104, label %17
i32 109, label %19
i32 102, label %21
i32 105, label %23
i32 111, label %25
i32 63, label %27
]
17: ; preds = %13
%18 = tail call i32 @print_help(i32 0)
br label %88
19: ; preds = %13
%20 = tail call i32 (...) @info()
br label %88
21: ; preds = %13
%22 = tail call i32 (...) @interactive()
br label %88
23: ; preds = %13
%24 = load i8*, i8** @optarg
br label %8
25: ; preds = %13
%26 = load i8*, i8** @optarg
br label %13
27: ; preds = %13
%28 = load i8, i8* @optopt
switch i8 %28, label %33 [
i8 111, label %29
i8 105, label %29
]
29: ; preds = %27, %27
%30 = zext i8 %28 to i32
%31 = load i32, i32* @stderr
%32 = tail call i32 (i32, i8*, ...) @fprintf(i32 %31, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i32 %30)
br label %88
33: ; preds = %27
%34 = tail call i32 @isprint(i8 signext %28)
%35 = icmp eq i32 %34, 0
%36 = load i32, i32* @stderr
%37 = load i8, i8* @optopt
%38 = sext i8 %37 to i32
br i1 %35, label %42, label %39
39: ; preds = %33
%40 = tail call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0), i32 %38)
%41 = tail call i32 @print_help(i32 -1)
br label %88
42: ; preds = %33
%43 = tail call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), i32 %38)
br label %88
44: ; preds = %13
%45 = icmp ne i32 %15, 1
%46 = select i1 %11, i1 true, i1 %45
br i1 %46, label %47, label %50
47: ; preds = %44
%48 = load i32, i32* @stderr
%49 = tail call i32 (i32, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0))
br label %88
50: ; preds = %44
%51 = tail call i32 @set_base(i8* %9, i8* %14)
%52 = icmp eq i32 %51, -1
br i1 %52, label %53, label %56
53: ; preds = %50
%54 = load i32, i32* @stderr
%55 = tail call i32 (i32, i8*, ...) @fprintf(i32 %54, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
br label %88
56: ; preds = %50
%57 = icmp slt i32 %0, 6
br i1 %57, label %58, label %61
58: ; preds = %56
%59 = load i32, i32* @stderr
%60 = tail call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0))
br label %88
61: ; preds = %56
%62 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%63 = load i32, i32* @optind
%64 = icmp slt i32 %63, %0
br i1 %64, label %65, label %86
65: ; preds = %61
%66 = sext i32 %63 to i64
br label %67
67: ; preds = %65, %77
%68 = phi i64 [ %66, %65 ], [ %83, %77 ]
%69 = getelementptr inbounds i8*, i8** %1, i64 %68
%70 = load i8*, i8** %69
%71 = load i32, i32* @InNumBase
%72 = call i32 @verify_arg(i8* %70, i32 %71, i32 %0)
%73 = icmp eq i32 %72, 0
br i1 %73, label %74, label %77
74: ; preds = %67
%75 = load i32, i32* @stderr
%76 = call i32 (i32, i8*, ...) @fprintf(i32 %75, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.7, i64 0, i64 0))
br label %86
77: ; preds = %67
%78 = load i32, i32* @InNumBase
%79 = load i32, i32* @OutNumBase
%80 = load i8*, i8** %69
%81 = call i32 @convert(i32 %78, i32 %79, i8* %80, i8* %62)
%82 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %62)
%83 = add nsw i64 %68, 1
%84 = trunc i64 %83 to i32
%85 = icmp eq i32 %84, %0
br i1 %85, label %86, label %67
86: ; preds = %77, %61, %74
%87 = phi i32 [ 1, %74 ], [ 0, %61 ], [ 0, %77 ]
br label %88
88: ; preds = %13, %17, %19, %21, %47, %39, %42, %29, %86, %58, %53, %5
%89 = phi i32 [ 0, %5 ], [ 0, %21 ], [ 0, %19 ], [ 0, %17 ], [ 0, %47 ], [ 1, %39 ], [ 1, %42 ], [ 1, %29 ], [ 1, %53 ], [ 1, %58 ], [ %87, %86 ], [ 1, %13 ]
ret i32 %89
}