#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*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
void printHandler(int flag) {
  if (flag == 0) {
    fprintf(stdout, "\n Original\tASCII\tDecimal\tParity\tT.Error");
    fprintf(stdout, "\n --------\t-----\t-------\t------\t-------\n");
  }
  if (flag == 1) {
    fprintf(stdout, "EVEN\tFALSE\n");
  }
  if (flag == 2) {
    fprintf(stdout, "ODD\tTRUE\n");
  }
  if (flag == 9) {
    fprintf(stderr, "ERROR!\n");
  }
}


x86 assembly (clang, -O0):
<printHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    114f <printHandler+0x3f>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
lea    0xecb(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xede(%rip),%rsi
call   1030 <fprintf@plt>
cmpl   $0x1,-0x4(%rbp)
jne    116e <printHandler+0x5e>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
lea    0xee8(%rip),%rsi
call   1030 <fprintf@plt>
cmpl   $0x2,-0x4(%rbp)
jne    118d <printHandler+0x7d>
mov    0x2e59(%rip),%rax
mov    (%rax),%edi
lea    0xed5(%rip),%rsi
call   1030 <fprintf@plt>
cmpl   $0x9,-0x4(%rbp)
jne    11ac <printHandler+0x9c>
mov    0x2e42(%rip),%rax
mov    (%rax),%edi
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printHandler>:
push   %rbx
cmp    $0x9,%edi
ja     115d <printHandler+0x4d>
lea    0xf5c(%rip),%rsi
mov    0x2eb4(%rip),%rbx
mov    %edi,%eax
lea    0xed3(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2e9b(%rip),%rbx
mov    (%rbx),%edi
lea    0xee2(%rip),%rsi
call   1030 <fprintf@plt>
lea    0xefe(%rip),%rsi
jmp    116d <printHandler+0x5d>
lea    0xf2a(%rip),%rsi
jmp    116d <printHandler+0x5d>
pop    %rbx
ret
lea    0xf29(%rip),%rsi
mov    0x2e73(%rip),%rbx
mov    (%rbx),%edi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stdout = global i32 0
@.str = [40 x i8] c"\0A Original\09ASCII\09Decimal\09Parity\09T.Error\00"
@.str.1 = [41 x i8] c"\0A --------\09-----\09-------\09------\09-------\0A\00"
@.str.2 = [12 x i8] c"EVEN\09FALSE\0A\00"
@.str.3 = [10 x i8] c"ODD\09TRUE\0A\00"
@stderr = global i32 0
@.str.4 = [8 x i8] c"ERROR!\0A\00"
define void @printHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* @stdout
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @stdout
%9 = call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %5, %1
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 1
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load i32, i32* @stdout
%15 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %13, %10
%17 = load i32, i32* %2
%18 = icmp eq i32 %17, 2
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = load i32, i32* @stdout
%21 = call i32 @fprintf(i32 %20, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %22
22: ; preds = %19, %16
%23 = load i32, i32* %2
%24 = icmp eq i32 %23, 9
br i1 %24, label %25, label %28
25: ; preds = %22
%26 = load i32, i32* @stderr
%27 = call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %28
28: ; preds = %25, %22
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [40 x i8] c"\0A Original\09ASCII\09Decimal\09Parity\09T.Error\00"
@.str.1 = [41 x i8] c"\0A --------\09-----\09-------\09------\09-------\0A\00"
@.str.2 = [12 x i8] c"EVEN\09FALSE\0A\00"
@.str.3 = [10 x i8] c"ODD\09TRUE\0A\00"
@stderr = global i32 0
@.str.4 = [8 x i8] c"ERROR!\0A\00"
define void @printHandler(i32 %0) {
switch i32 %0, label %12 [
i32 0, label %2
i32 1, label %7
i32 2, label %5
i32 9, label %6
]
2: ; preds = %1
%3 = load i32, i32* @stdout
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %1, %6, %2, %5
%8 = phi i32* [ @stdout, %5 ], [ @stdout, %2 ], [ @stderr, %6 ], [ @stdout, %1 ]
%9 = phi i8* [ getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0), %5 ], [ getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), %6 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), %1 ]
%10 = load i32, i32* %8
%11 = tail call i32 @fprintf(i32 %10, i8* %9)
br label %12
12: ; preds = %7, %1
ret void
}