#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 EOF;
int decdigit(int);
int getchar();
int hexdigitz(int);
int /*<<< orphan*/ putchar(int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char **argv) {
  int i, c[2], p[2], mode = 0, mode2 = 0, flag10 = 0;
  for (i = 1; i < argc; i++) {
    if (!strcmp(argv[i], "-c"))
      mode = 1;
    if (!strcmp(argv[i], "-d"))
      mode = 0;
    if (!strcmp(argv[i], "-t"))
      mode2 = 1;
    if (!strcmp(argv[i], "-b"))
      mode2 = 0;
    if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help")) {
      puts("Options:");
      puts("-c - compile binary file");
      puts("-d - decompile to hex digits");
      puts("-t - text (void newline symbol before EOF)");
      puts("-b - binary (default)");
      puts("-h/--help - help");
      return 0;
    }
  }
  for (;;) {
    if ((c[0] = getchar()) == EOF)
      break;
    if (mode)
      if ((c[1] = getchar()) == EOF)
        c[1] = 0;
    switch (mode) {
    case 0:
      if (mode2) {
        if (flag10) {
          flag10 = 0;
          putchar('0');
          putchar('a');
        }
        if (c[0] == 10 && !flag10) {
          flag10 = 1;
          continue;
        }
      }
      p[1] = hexdigitz(c[0] % 16);
      p[0] = hexdigitz(c[0] >> 4);
      putchar(p[0]);
      putchar(p[1]);
      break;
    case 1:
      p[0] = decdigit(c[0]) * 16 + decdigit(c[1]);
      putchar(p[0]);
    }
  }
  return 0;
}


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)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12e7 <main+0x187>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe4f(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11c6 <main+0x66>
movl   $0x1,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe2a(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11ee <main+0x8e>
movl   $0x0,-0x28(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe05(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1216 <main+0xb6>
movl   $0x1,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xde0(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    123e <main+0xde>
movl   $0x0,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdbb(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
je     1280 <main+0x120>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xd9d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    12d4 <main+0x174>
lea    0xd8f(%rip),%rdi
call   1040 <puts@plt>
lea    0xd8c(%rip),%rdi
call   1040 <puts@plt>
lea    0xd99(%rip),%rdi
call   1040 <puts@plt>
lea    0xdaa(%rip),%rdi
call   1040 <puts@plt>
lea    0xdc9(%rip),%rdi
call   1040 <puts@plt>
lea    0xdd3(%rip),%rdi
call   1040 <puts@plt>
movl   $0x0,-0x4(%rbp)
jmp    141d <main+0x2bd>
jmp    12d9 <main+0x179>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1192 <main+0x32>
jmp    12ec <main+0x18c>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %eax,-0x1c(%rbp)
mov    0x2ceb(%rip),%rcx
cmp    (%rcx),%eax
jne    130a <main+0x1aa>
jmp    1416 <main+0x2b6>
cmpl   $0x0,-0x28(%rbp)
je     1339 <main+0x1d9>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %eax,-0x18(%rbp)
mov    0x2cc3(%rip),%rcx
cmp    (%rcx),%eax
jne    1334 <main+0x1d4>
movl   $0x0,-0x18(%rbp)
jmp    1339 <main+0x1d9>
mov    -0x28(%rbp),%eax
mov    %eax,-0x34(%rbp)
test   %eax,%eax
je     135d <main+0x1fd>
jmp    134c <main+0x1ec>
mov    -0x34(%rbp),%eax
sub    $0x1,%eax
je     13e9 <main+0x289>
jmp    1411 <main+0x2b1>
cmpl   $0x0,-0x2c(%rbp)
je     13b1 <main+0x251>
cmpl   $0x0,-0x30(%rbp)
je     138c <main+0x22c>
movl   $0x0,-0x30(%rbp)
mov    $0x30,%edi
call   1030 <putchar@plt>
mov    $0x61,%edi
call   1030 <putchar@plt>
cmpl   $0xa,-0x1c(%rbp)
jne    13ac <main+0x24c>
cmpl   $0x0,-0x30(%rbp)
jne    13ac <main+0x24c>
movl   $0x1,-0x30(%rbp)
jmp    12ec <main+0x18c>
jmp    13b1 <main+0x251>
mov    -0x1c(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1080 <hexdigitz@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
sar    $0x4,%edi
call   1080 <hexdigitz@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x20(%rbp),%edi
call   1030 <putchar@plt>
jmp    1411 <main+0x2b1>
mov    -0x1c(%rbp),%edi
call   1070 <decdigit@plt>
shl    $0x4,%eax
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%edi
call   1070 <decdigit@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
call   1030 <putchar@plt>
jmp    12ec <main+0x18c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    $0x1,%al
xor    %r15d,%r15d
mov    $0x0,%r13d
mov    $0x1,%r14b
cmp    $0x2,%edi
jl     1254 <main+0xf4>
mov    %edi,%eax
mov    %rax,0x8(%rsp)
xor    %ebx,%ebx
mov    $0x1,%r15d
xor    %r13d,%r13d
mov    %rsi,0x10(%rsp)
nopl   0x0(%rax)
mov    (%rsi,%r15,8),%r12
mov    %r12,%rdi
lea    0xe5e(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     1312 <main+0x1b2>
mov    %r12,%rdi
lea    0xe44(%rip),%rsi
call   1050 <strcmp@plt>
mov    %eax,%r14d
mov    %r12,%rdi
lea    0xe2f(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
mov    $0x1,%eax
cmove  %eax,%ebx
test   %r14d,%r14d
cmove  %r14d,%ebx
mov    %r12,%rdi
lea    0xe0c(%rip),%rsi
call   1050 <strcmp@plt>
mov    %eax,%ebp
mov    %r12,%rdi
lea    0xdf8(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
mov    $0x1,%eax
cmove  %eax,%r13d
test   %ebp,%ebp
cmove  %ebp,%r13d
mov    %r12,%rdi
lea    0xde7(%rip),%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     1312 <main+0x1b2>
add    $0x1,%r15
cmp    %r15,0x8(%rsp)
mov    0x10(%rsp),%rsi
jne    11a0 <main+0x40>
test   %ebx,%ebx
sete   %r14b
xor    %r15d,%r15d
mov    $0x1,%al
mov    0x2d8d(%rip),%r12
jmp    1288 <main+0x128>
nopl   (%rax)
cmp    (%r12),%ebp
cmove  %r15d,%ebp
mov    %ebx,%edi
call   1070 <decdigit@plt>
mov    %eax,%ebx
shl    $0x4,%ebx
mov    %ebp,%edi
call   1070 <decdigit@plt>
mov    %eax,%ebp
add    %ebx,%ebp
mov    %ebp,%edi
call   1030 <putchar@plt>
mov    $0x1,%al
mov    %eax,%ebp
xor    %eax,%eax
call   1060 <getchar@plt>
cmp    (%r12),%eax
je     135a <main+0x1fa>
mov    %eax,%ebx
test   %r13d,%r13d
je     12c0 <main+0x160>
xor    %eax,%eax
call   1060 <getchar@plt>
mov    %eax,%ebp
mov    $0x1,%al
cmp    $0x1,%r13d
jne    1288 <main+0x128>
jmp    1260 <main+0x100>
cs nopw 0x0(%rax,%rax,1)
nop
test   %r14b,%r14b
jne    12e6 <main+0x186>
test   $0x1,%bpl
jne    12df <main+0x17f>
mov    $0x30,%edi
call   1030 <putchar@plt>
mov    $0x61,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
cmp    $0xa,%ebx
je     1288 <main+0x128>
lea    0xf(%rbx),%eax
test   %ebx,%ebx
cmovns %ebx,%eax
and    $0xfffffff0,%eax
mov    %ebx,%edi
sub    %eax,%edi
call   1080 <hexdigitz@plt>
mov    %eax,%ebp
sar    $0x4,%ebx
mov    %ebx,%edi
call   1080 <hexdigitz@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
jmp    127f <main+0x11f>
lea    0xcfd(%rip),%rdi
call   1040 <puts@plt>
lea    0xcfa(%rip),%rdi
call   1040 <puts@plt>
lea    0xd07(%rip),%rdi
call   1040 <puts@plt>
lea    0xd18(%rip),%rdi
call   1040 <puts@plt>
lea    0xd37(%rip),%rdi
call   1040 <puts@plt>
lea    0xd41(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"-c\00"
@.str.1 = [3 x i8] c"-d\00"
@.str.2 = [3 x i8] c"-t\00"
@.str.3 = [3 x i8] c"-b\00"
@.str.4 = [3 x i8] c"-h\00"
@.str.5 = [7 x i8] c"--help\00"
@.str.6 = [9 x i8] c"Options:\00"
@.str.7 = [25 x i8] c"-c - compile binary file\00"
@.str.8 = [29 x i8] c"-d - decompile to hex digits\00"
@.str.9 = [43 x i8] c"-t - text (void newline symbol before EOF)\00"
@.str.10 = [22 x i8] c"-b - binary (default)\00"
@.str.11 = [17 x i8] c"-h/--help - help\00"
@EOF = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [2 x i32]
%8 = alloca [2 x i32]
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 1, i32* %6
br label %12
12: ; preds = %76, %2
%13 = load i32, i32* %6
%14 = load i32, i32* %4
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %79
16: ; preds = %12
%17 = load i8**, i8*** %5
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %17, i64 %19
%21 = load i8*, i8** %20
%22 = call i32 @strcmp(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%23 = icmp ne i32 %22, 0
br i1 %23, label %25, label %24
24: ; preds = %16
store i32 1, i32* %9
br label %25
25: ; preds = %24, %16
%26 = load i8**, i8*** %5
%27 = load i32, i32* %6
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8*, i8** %26, i64 %28
%30 = load i8*, i8** %29
%31 = call i32 @strcmp(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%32 = icmp ne i32 %31, 0
br i1 %32, label %34, label %33
33: ; preds = %25
store i32 0, i32* %9
br label %34
34: ; preds = %33, %25
%35 = load i8**, i8*** %5
%36 = load i32, i32* %6
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8*, i8** %35, i64 %37
%39 = load i8*, i8** %38
%40 = call i32 @strcmp(i8* %39, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%41 = icmp ne i32 %40, 0
br i1 %41, label %43, label %42
42: ; preds = %34
store i32 1, i32* %10
br label %43
43: ; preds = %42, %34
%44 = load i8**, i8*** %5
%45 = load i32, i32* %6
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds i8*, i8** %44, i64 %46
%48 = load i8*, i8** %47
%49 = call i32 @strcmp(i8* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%50 = icmp ne i32 %49, 0
br i1 %50, label %52, label %51
51: ; preds = %43
store i32 0, i32* %10
br label %52
52: ; preds = %51, %43
%53 = load i8**, i8*** %5
%54 = load i32, i32* %6
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8*, i8** %53, i64 %55
%57 = load i8*, i8** %56
%58 = call i32 @strcmp(i8* %57, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %68
60: ; preds = %52
%61 = load i8**, i8*** %5
%62 = load i32, i32* %6
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds i8*, i8** %61, i64 %63
%65 = load i8*, i8** %64
%66 = call i32 @strcmp(i8* %65, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%67 = icmp ne i32 %66, 0
br i1 %67, label %75, label %68
68: ; preds = %60, %52
%69 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%70 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%71 = call i32 @puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%72 = call i32 @puts(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.9, i64 0, i64 0))
%73 = call i32 @puts(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
%74 = call i32 @puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
store i32 0, i32* %3
br label %149
75: ; preds = %60
br label %76
76: ; preds = %75
%77 = load i32, i32* %6
%78 = add nsw i32 %77, 1
store i32 %78, i32* %6
br label %12
79: ; preds = %12
br label %80
80: ; preds = %147, %115, %79
%81 = call i32 (...) @getchar()
%82 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32 %81, i32* %82
%83 = load i32, i32* @EOF
%84 = icmp eq i32 %81, %83
br i1 %84, label %85, label %86
85: ; preds = %80
br label %148
86: ; preds = %80
%87 = load i32, i32* %9
%88 = icmp ne i32 %87, 0
br i1 %88, label %89, label %97
89: ; preds = %86
%90 = call i32 (...) @getchar()
%91 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
store i32 %90, i32* %91
%92 = load i32, i32* @EOF
%93 = icmp eq i32 %90, %92
br i1 %93, label %94, label %96
94: ; preds = %89
%95 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
store i32 0, i32* %95
br label %96
96: ; preds = %94, %89
br label %97
97: ; preds = %96, %86
%98 = load i32, i32* %9
switch i32 %98, label %147 [
i32 0, label %99
i32 1, label %134
]
99: ; preds = %97
%100 = load i32, i32* %10
%101 = icmp ne i32 %100, 0
br i1 %101, label %102, label %117
102: ; preds = %99
%103 = load i32, i32* %11
%104 = icmp ne i32 %103, 0
br i1 %104, label %105, label %108
105: ; preds = %102
store i32 0, i32* %11
%106 = call i32 @putchar(i32 48)
%107 = call i32 @putchar(i32 97)
br label %108
108: ; preds = %105, %102
%109 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%110 = load i32, i32* %109
%111 = icmp eq i32 %110, 10
br i1 %111, label %112, label %116
112: ; preds = %108
%113 = load i32, i32* %11
%114 = icmp ne i32 %113, 0
br i1 %114, label %116, label %115
115: ; preds = %112
store i32 1, i32* %11
br label %80
116: ; preds = %112, %108
br label %117
117: ; preds = %116, %99
%118 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%119 = load i32, i32* %118
%120 = srem i32 %119, 16
%121 = call i32 @hexdigitz(i32 %120)
%122 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
store i32 %121, i32* %122
%123 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%124 = load i32, i32* %123
%125 = ashr i32 %124, 4
%126 = call i32 @hexdigitz(i32 %125)
%127 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
store i32 %126, i32* %127
%128 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%129 = load i32, i32* %128
%130 = call i32 @putchar(i32 %129)
%131 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 1
%132 = load i32, i32* %131
%133 = call i32 @putchar(i32 %132)
br label %147
134: ; preds = %97
%135 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%136 = load i32, i32* %135
%137 = call i32 @decdigit(i32 %136)
%138 = mul nsw i32 %137, 16
%139 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
%140 = load i32, i32* %139
%141 = call i32 @decdigit(i32 %140)
%142 = add nsw i32 %138, %141
%143 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
store i32 %142, i32* %143
%144 = getelementptr inbounds [2 x i32], [2 x i32]* %8, i64 0, i64 0
%145 = load i32, i32* %144
%146 = call i32 @putchar(i32 %145)
br label %147
147: ; preds = %134, %97, %117
br label %80
148: ; preds = %85
store i32 0, i32* %3
br label %149
149: ; preds = %148, %68
%150 = load i32, i32* %3
ret i32 %150
}

LLVM IR (-O2):
@.str = [3 x i8] c"-c\00"
@.str.1 = [3 x i8] c"-d\00"
@.str.2 = [3 x i8] c"-t\00"
@.str.3 = [3 x i8] c"-b\00"
@.str.4 = [3 x i8] c"-h\00"
@.str.5 = [7 x i8] c"--help\00"
@.str.6 = [9 x i8] c"Options:\00"
@.str.7 = [25 x i8] c"-c - compile binary file\00"
@.str.8 = [29 x i8] c"-d - decompile to hex digits\00"
@.str.9 = [43 x i8] c"-t - text (void newline symbol before EOF)\00"
@.str.10 = [22 x i8] c"-b - binary (default)\00"
@.str.11 = [17 x i8] c"-h/--help - help\00"
@EOF = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %15
6: ; preds = %23
%7 = icmp eq i64 %38, %5
br i1 %7, label %8, label %15
8: ; preds = %6
%9 = icmp eq i32 %29, 0
br label %10
10: ; preds = %8, %2
%11 = phi i32 [ 0, %2 ], [ %35, %8 ]
%12 = phi i1 [ true, %2 ], [ %9, %8 ]
%13 = icmp eq i32 %11, 0
%14 = icmp eq i32 %11, 1
br label %46
15: ; preds = %4, %6
%16 = phi i64 [ 1, %4 ], [ %38, %6 ]
%17 = phi i32 [ 0, %4 ], [ %29, %6 ]
%18 = phi i32 [ 0, %4 ], [ %35, %6 ]
%19 = getelementptr inbounds i8*, i8** %1, i64 %16
%20 = load i8*, i8** %19
%21 = tail call i32 @strcmp(i8* dereferenceable(1) %20, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%22 = icmp eq i32 %21, 0
br i1 %22, label %39, label %23
23: ; preds = %15
%24 = tail call i32 @strcmp(i8* dereferenceable(1) %20, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%25 = icmp eq i32 %24, 0
%26 = tail call i32 @strcmp(i8* dereferenceable(1) %20, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%27 = icmp eq i32 %26, 0
%28 = select i1 %27, i32 1, i32 %17
%29 = select i1 %25, i32 0, i32 %28
%30 = tail call i32 @strcmp(i8* dereferenceable(1) %20, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%31 = icmp eq i32 %30, 0
%32 = tail call i32 @strcmp(i8* dereferenceable(1) %20, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%33 = icmp eq i32 %32, 0
%34 = select i1 %33, i32 1, i32 %18
%35 = select i1 %31, i32 0, i32 %34
%36 = tail call i32 @strcmp(i8* dereferenceable(1) %20, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%37 = icmp eq i32 %36, 0
%38 = add nuw nsw i64 %16, 1
br i1 %37, label %39, label %6
39: ; preds = %23, %15
%40 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%41 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0))
%42 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%43 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.9, i64 0, i64 0))
%44 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
%45 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
br label %80
46: ; preds = %61, %10
%47 = phi i1 [ true, %10 ], [ %62, %61 ]
%48 = tail call i32 (...) @getchar()
%49 = load i32, i32* @EOF
%50 = icmp eq i32 %48, %49
br i1 %50, label %80, label %51
51: ; preds = %46
br i1 %13, label %54, label %52
52: ; preds = %51
%53 = tail call i32 (...) @getchar()
br i1 %14, label %69, label %61
54: ; preds = %51
br i1 %12, label %63, label %55
55: ; preds = %54
br i1 %47, label %59, label %56
56: ; preds = %55
%57 = tail call i32 @putchar(i32 48)
%58 = tail call i32 @putchar(i32 97)
br label %59
59: ; preds = %56, %55
%60 = icmp eq i32 %48, 10
br i1 %60, label %61, label %63
61: ; preds = %59, %52, %77
%62 = phi i1 [ false, %59 ], [ true, %52 ], [ true, %77 ]
br label %46
63: ; preds = %59, %54
%64 = srem i32 %48, 16
%65 = tail call i32 @hexdigitz(i32 %64)
%66 = ashr i32 %48, 4
%67 = tail call i32 @hexdigitz(i32 %66)
%68 = tail call i32 @putchar(i32 %67)
br label %77
69: ; preds = %52
%70 = load i32, i32* @EOF
%71 = icmp eq i32 %53, %70
%72 = select i1 %71, i32 0, i32 %53
%73 = tail call i32 @decdigit(i32 %48)
%74 = shl nsw i32 %73, 4
%75 = tail call i32 @decdigit(i32 %72)
%76 = add nsw i32 %74, %75
br label %77
77: ; preds = %63, %69
%78 = phi i32 [ %76, %69 ], [ %65, %63 ]
%79 = tail call i32 @putchar(i32 %78)
br label %61
80: ; preds = %46, %39
ret i32 0
}