#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 */
long EOF;
long getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(long);
void e_1_10() {
  long c;
  while ((c = getchar()) != EOF) {
    switch (c) {
    case '\t':
      printf("\\t");
      break;
    case '\b':
      printf("\\b");
      break;
    case '\\':
      printf("\\\\");
      break;
    default:
      putchar(c);
      break;
    }
  }
}


x86 assembly (clang, -O0):
<e_1_10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %rax,-0x8(%rbp)
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%rax
je     11d1 <e_1_10+0xa1>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
sub    $0x8,%rax
je     11a1 <e_1_10+0x71>
jmp    116a <e_1_10+0x3a>
mov    -0x10(%rbp),%rax
sub    $0x9,%rax
je     1190 <e_1_10+0x60>
jmp    117d <e_1_10+0x4d>
mov    -0x10(%rbp),%rax
sub    $0x5c,%rax
je     11b2 <e_1_10+0x82>
jmp    11c3 <e_1_10+0x93>
lea    0xe69(%rip),%rdi
call   1040 <printf@plt>
jmp    11cc <e_1_10+0x9c>
lea    0xe5b(%rip),%rdi
call   1040 <printf@plt>
jmp    11cc <e_1_10+0x9c>
lea    0xe4d(%rip),%rdi
call   1040 <printf@plt>
jmp    11cc <e_1_10+0x9c>
mov    -0x8(%rbp),%rdi
call   1030 <putchar@plt>
jmp    1138 <e_1_10+0x8>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_1_10>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <getchar@plt>
mov    0x2ea2(%rip),%rbx
cmp    (%rbx),%rax
jne    1157 <e_1_10+0x27>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
lea    0xea5(%rip),%r14
lea    0xea1(%rip),%r12
lea    0xe94(%rip),%r15
jmp    1184 <e_1_10+0x54>
xchg   %ax,%ax
mov    %r12,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    (%rbx),%rax
je     114b <e_1_10+0x1b>
cmp    $0x8,%rax
je     11a0 <e_1_10+0x70>
cmp    $0x5c,%rax
je     1170 <e_1_10+0x40>
cmp    $0x9,%rax
jne    11b0 <e_1_10+0x80>
mov    %r15,%rdi
jmp    1173 <e_1_10+0x43>
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
jmp    1173 <e_1_10+0x43>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rax,%rdi
call   1030 <putchar@plt>
jmp    1178 <e_1_10+0x48>

LLVM IR (-O0):
@EOF = global i64 0
@.str = [3 x i8] c"\\t\00"
@.str.1 = [3 x i8] c"\\b\00"
@.str.2 = [3 x i8] c"\\\\\00"
define void @e_1_10() {
%1 = alloca i64
br label %2
2: ; preds = %17, %0
%3 = call i64 (...) @getchar()
store i64 %3, i64* %1
%4 = load i64, i64* @EOF
%5 = icmp ne i64 %3, %4
br i1 %5, label %6, label %18
6: ; preds = %2
%7 = load i64, i64* %1
switch i64 %7, label %14 [
i64 9, label %8
i64 8, label %10
i64 92, label %12
]
8: ; preds = %6
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %17
10: ; preds = %6
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %17
12: ; preds = %6
%13 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %17
14: ; preds = %6
%15 = load i64, i64* %1
%16 = call i32 @putchar(i64 %15)
br label %17
17: ; preds = %14, %12, %10, %8
br label %2
18: ; preds = %2
ret void
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [3 x i8] c"\\t\00"
@.str.1 = [3 x i8] c"\\b\00"
@.str.2 = [3 x i8] c"\\\\\00"
define void @e_1_10() {
%1 = tail call i64 (...) @getchar()
%2 = load i64, i64* @EOF
%3 = icmp eq i64 %1, %2
br i1 %3, label %18, label %4
4: ; preds = %0, %14
%5 = phi i64 [ %15, %14 ], [ %1, %0 ]
switch i64 %5, label %12 [
i64 9, label %6
i64 8, label %8
i64 92, label %10
]
6: ; preds = %4
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %14
8: ; preds = %4
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %14
10: ; preds = %4
%11 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %14
12: ; preds = %4
%13 = tail call i32 @putchar(i64 %5)
br label %14
14: ; preds = %12, %10, %8, %6
%15 = tail call i64 (...) @getchar()
%16 = load i64, i64* @EOF
%17 = icmp eq i64 %15, %16
br i1 %17, label %18, label %4
18: ; preds = %14, %0
ret void
}