#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 EXIT_SUCCESS;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(int argc, char **argv) {
  int c;
  while ((c = getchar()) != EOF) {
    if (c == '\t') {
      putchar('\\');
      putchar('t');
    } else if (c == '\b') {
      putchar('\\');
      putchar('b');
    } else if (c == '\\') {
      putchar('\\');
      putchar('\\');
    } else {
      putchar(c);
    }
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     11cf <main+0xaf>
cmpl   $0x9,-0x14(%rbp)
jne    1172 <main+0x52>
mov    $0x5c,%edi
call   1030 <putchar@plt>
mov    $0x74,%edi
call   1030 <putchar@plt>
jmp    11ca <main+0xaa>
cmpl   $0x8,-0x14(%rbp)
jne    1195 <main+0x75>
mov    $0x5c,%edi
call   1030 <putchar@plt>
mov    $0x62,%edi
call   1030 <putchar@plt>
jmp    11c5 <main+0xa5>
cmpl   $0x5c,-0x14(%rbp)
jne    11b8 <main+0x98>
mov    $0x5c,%edi
call   1030 <putchar@plt>
mov    $0x5c,%edi
call   1030 <putchar@plt>
jmp    11c0 <main+0xa0>
mov    -0x14(%rbp),%edi
call   1030 <putchar@plt>
jmp    11c5 <main+0xa5>
jmp    11ca <main+0xaa>
jmp    1136 <main+0x16>
mov    0x2e02(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb6(%rip),%r14
cmp    (%r14),%eax
jne    1148 <main+0x28>
mov    0x2e9a(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %eax,%ebx
jmp    1174 <main+0x54>
nopl   0x0(%rax)
mov    $0x74,%ebx
mov    $0x5c,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
cmp    (%r14),%eax
je     1137 <main+0x17>
cmp    $0x5c,%ebx
je     1190 <main+0x70>
cmp    $0x9,%ebx
je     1150 <main+0x30>
cmp    $0x8,%ebx
jne    115f <main+0x3f>
mov    $0x62,%ebx
jmp    1155 <main+0x35>
nopw   0x0(%rax,%rax,1)
mov    $0x5c,%ebx
jmp    1155 <main+0x35>

LLVM IR (-O0):
@EOF = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %34, %2
%8 = call i32 (...) @getchar()
store i32 %8, i32* %6
%9 = load i32, i32* @EOF
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %35
11: ; preds = %7
%12 = load i32, i32* %6
%13 = icmp eq i32 %12, 9
br i1 %13, label %14, label %17
14: ; preds = %11
%15 = call i32 @putchar(i32 92)
%16 = call i32 @putchar(i32 116)
br label %34
17: ; preds = %11
%18 = load i32, i32* %6
%19 = icmp eq i32 %18, 8
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = call i32 @putchar(i32 92)
%22 = call i32 @putchar(i32 98)
br label %33
23: ; preds = %17
%24 = load i32, i32* %6
%25 = icmp eq i32 %24, 92
br i1 %25, label %26, label %29
26: ; preds = %23
%27 = call i32 @putchar(i32 92)
%28 = call i32 @putchar(i32 92)
br label %32
29: ; preds = %23
%30 = load i32, i32* %6
%31 = call i32 @putchar(i32 %30)
br label %32
32: ; preds = %29, %26
br label %33
33: ; preds = %32, %20
br label %34
34: ; preds = %33, %14
br label %7
35: ; preds = %7
%36 = load i32, i32* @EXIT_SUCCESS
ret i32 %36
}

LLVM IR (-O2):
@EOF = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %19, label %6
6: ; preds = %2, %13
%7 = phi i32 [ %16, %13 ], [ %3, %2 ]
switch i32 %7, label %13 [
i32 9, label %10
i32 8, label %8
i32 92, label %9
]
8: ; preds = %6
br label %10
9: ; preds = %6
br label %10
10: ; preds = %6, %9, %8
%11 = phi i32 [ 92, %9 ], [ 98, %8 ], [ 116, %6 ]
%12 = tail call i32 @putchar(i32 92)
br label %13
13: ; preds = %10, %6
%14 = phi i32 [ %7, %6 ], [ %11, %10 ]
%15 = tail call i32 @putchar(i32 %14)
%16 = tail call i32 (...) @getchar()
%17 = load i32, i32* @EOF
%18 = icmp eq i32 %16, %17
br i1 %18, label %19, label %6
19: ; preds = %13, %2
%20 = load i32, i32* @EXIT_SUCCESS
ret i32 %20
}