#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 getchar();
int /*<<< orphan*/ putchar(char);
int main() {
  int c, i;
  static char latin1[][2] = {
      {'8', '0'},  {'8', '1'}, {'8', '2'},   {'8', '3'},  {'8', '4'},
      {'8', '5'},  {'8', '6'}, {'8', '7'},   {'8', '8'},  {'8', '9'},
      {'8', 'A'},  {'8', 'B'}, {'8', 'C'},   {'8', 'D'},  {'8', 'E'},
      {'8', 'F'},  {'9', '0'}, {'9', '1'},   {'9', '2'},  {'9', '3'},
      {'9', '4'},  {'9', '5'}, {'9', '6'},   {'9', '7'},  {'9', '8'},
      {'9', '9'},  {'9', 'A'}, {'9', 'B'},   {'9', 'C'},  {'9', 'D'},
      {'9', 'E'},  {'9', 'F'}, {'\0', ' '},  {'!', '!'},  {'c', '|'},
      {'L', '-'},  {'x', 'o'}, {'Y', '-'},   {'|', '|'},  {'s', 'o'},
      {'"', '"'},  {'c', 'o'}, {'a', '_'},   {'<', '<'},  {'-', ','},
      {'-', '-'},  {'r', 'o'}, {'-', '^'},   {'0', '^'},  {'+', '-'},
      {'2', '^'},  {'3', '^'}, {'\0', '\''}, {'/', 'u'},  {'P', '!'},
      {'.', '^'},  {',', ','}, {'1', '^'},   {'o', '_'},  {'>', '>'},
      {'1', '4'},  {'1', '2'}, {'3', '4'},   {'?', '?'},  {'A', '`'},
      {'A', '\''}, {'A', '^'}, {'A', '~'},   {'A', '"'},  {'A', '*'},
      {'A', 'E'},  {'C', ','}, {'E', '`'},   {'E', '\''}, {'E', '^'},
      {'E', '"'},  {'I', '`'}, {'I', '\''},  {'I', '^'},  {'I', '"'},
      {'D', '-'},  {'N', '~'}, {'O', '`'},   {'O', '\''}, {'O', '^'},
      {'O', '~'},  {'O', '"'}, {'x', 'x'},   {'O', '/'},  {'U', '`'},
      {'U', '\''}, {'U', '^'}, {'U', '"'},   {'Y', '\''}, {'T', 'H'},
      {'s', 's'},  {'a', '`'}, {'a', '\''},  {'a', '^'},  {'a', '~'},
      {'a', '"'},  {'a', '*'}, {'a', 'e'},   {'c', ','},  {'e', '`'},
      {'e', '\''}, {'e', '^'}, {'e', '"'},   {'i', '`'},  {'i', '\''},
      {'i', '^'},  {'i', '"'}, {'d', '-'},   {'n', '~'},  {'o', '`'},
      {'o', '\''}, {'o', '^'}, {'o', '~'},   {'o', '"'},  {'-', ':'},
      {'o', '/'},  {'u', '`'}, {'u', '\''},  {'u', '^'},  {'u', '"'},
      {'y', '\''}, {'t', 'h'}, {'y', '"'}};
  while ((c = getchar()) != EOF) {
    if (c < 128)
      putchar(c);
    else {
      i = c - 128;
      putchar('\\');
      if (latin1[i][0] != '\0') {
        putchar('(');
        putchar(latin1[i][0]);
      }
      putchar(latin1[i][1]);
    }
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea8(%rip),%rcx
cmp    (%rcx),%eax
je     11ca <main+0xaa>
cmpl   $0x80,-0x8(%rbp)
jge    1165 <main+0x45>
mov    -0x8(%rbp),%eax
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    11c5 <main+0xa5>
mov    -0x8(%rbp),%eax
sub    $0x80,%eax
mov    %eax,-0xc(%rbp)
mov    $0x5c,%edi
call   1030 <putchar@plt>
movslq -0xc(%rbp),%rcx
lea    0x2ebb(%rip),%rax
movsbl (%rax,%rcx,2),%eax
cmp    $0x0,%eax
je     11b0 <main+0x90>
mov    $0x28,%edi
call   1030 <putchar@plt>
movslq -0xc(%rbp),%rcx
lea    0x2e99(%rip),%rax
movsbl (%rax,%rcx,2),%edi
call   1030 <putchar@plt>
movslq -0xc(%rbp),%rcx
lea    0x2e85(%rip),%rax
movsbl 0x1(%rax,%rcx,2),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb2(%rip),%r14
cmp    (%r14),%eax
jne    1149 <main+0x29>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
mov    %eax,%ebx
lea    0xeae(%rip),%r15
jmp    117c <main+0x5c>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl 0x1(%r15,%r12,2),%ebx
movsbl %bl,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
cmp    (%r14),%eax
je     113b <main+0x1b>
cmp    $0x7f,%ebx
jle    1166 <main+0x46>
lea    -0x80(%rbx),%r12d
mov    $0x5c,%edi
call   1030 <putchar@plt>
cmp    $0xa0,%ebx
je     1160 <main+0x40>
cmp    $0xb4,%ebx
je     1160 <main+0x40>
mov    $0x28,%edi
call   1030 <putchar@plt>
movsbl (%r15,%r12,2),%edi
call   1030 <putchar@plt>
jmp    1160 <main+0x40>

LLVM IR (-O0):
@main.latin1 = internal global [128 x [2 x i8]] [[2 x i8] c"80", [2 x i8] c"81", [2 x i8] c"82", [2 x i8] c"83", [2 x i8] c"84", [2 x i8] c"85", [2 x i8] c"86", [2 x i8] c"87", [2 x i8] c"88", [2 x i8] c"89", [2 x i8] c"8A", [2 x i8] c"8B", [2 x i8] c"8C", [2 x i8] c"8D", [2 x i8] c"8E", [2 x i8] c"8F", [2 x i8] c"90", [2 x i8] c"91", [2 x i8] c"92", [2 x i8] c"93", [2 x i8] c"94", [2 x i8] c"95", [2 x i8] c"96", [2 x i8] c"97", [2 x i8] c"98", [2 x i8] c"99", [2 x i8] c"9A", [2 x i8] c"9B", [2 x i8] c"9C", [2 x i8] c"9D", [2 x i8] c"9E", [2 x i8] c"9F", [2 x i8] c"\00 ", [2 x i8] c"!!", [2 x i8] c"c|", [2 x i8] c"L-", [2 x i8] c"xo", [2 x i8] c"Y-", [2 x i8] c"||", [2 x i8] c"so", [2 x i8] c"\22\22", [2 x i8] c"co", [2 x i8] c"a_", [2 x i8] c"<<", [2 x i8] c"-,", [2 x i8] c"--", [2 x i8] c"ro", [2 x i8] c"-^", [2 x i8] c"0^", [2 x i8] c"+-", [2 x i8] c"2^", [2 x i8] c"3^", [2 x i8] c"\00'", [2 x i8] c"/u", [2 x i8] c"P!", [2 x i8] c".^", [2 x i8] c",,", [2 x i8] c"1^", [2 x i8] c"o_", [2 x i8] c">>", [2 x i8] c"14", [2 x i8] c"12", [2 x i8] c"34", [2 x i8] c"??", [2 x i8] c"A`", [2 x i8] c"A'", [2 x i8] c"A^", [2 x i8] c"A~", [2 x i8] c"A\22", [2 x i8] c"A*", [2 x i8] c"AE", [2 x i8] c"C,", [2 x i8] c"E`", [2 x i8] c"E'", [2 x i8] c"E^", [2 x i8] c"E\22", [2 x i8] c"I`", [2 x i8] c"I'", [2 x i8] c"I^", [2 x i8] c"I\22", [2 x i8] c"D-", [2 x i8] c"N~", [2 x i8] c"O`", [2 x i8] c"O'", [2 x i8] c"O^", [2 x i8] c"O~", [2 x i8] c"O\22", [2 x i8] c"xx", [2 x i8] c"O/", [2 x i8] c"U`", [2 x i8] c"U'", [2 x i8] c"U^", [2 x i8] c"U\22", [2 x i8] c"Y'", [2 x i8] c"TH", [2 x i8] c"ss", [2 x i8] c"a`", [2 x i8] c"a'", [2 x i8] c"a^", [2 x i8] c"a~", [2 x i8] c"a\22", [2 x i8] c"a*", [2 x i8] c"ae", [2 x i8] c"c,", [2 x i8] c"e`", [2 x i8] c"e'", [2 x i8] c"e^", [2 x i8] c"e\22", [2 x i8] c"i`", [2 x i8] c"i'", [2 x i8] c"i^", [2 x i8] c"i\22", [2 x i8] c"d-", [2 x i8] c"n~", [2 x i8] c"o`", [2 x i8] c"o'", [2 x i8] c"o^", [2 x i8] c"o~", [2 x i8] c"o\22", [2 x i8] c"-:", [2 x i8] c"o/", [2 x i8] c"u`", [2 x i8] c"u'", [2 x i8] c"u^", [2 x i8] c"u\22", [2 x i8] c"y'", [2 x i8] c"th", [2 x i8] c"y\22"]
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
br label %4
4: ; preds = %41, %0
%5 = call i32 (...) @getchar()
store i32 %5, i32* %2
%6 = load i32, i32* @EOF
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %42
8: ; preds = %4
%9 = load i32, i32* %2
%10 = icmp slt i32 %9, 128
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = load i32, i32* %2
%13 = trunc i32 %12 to i8
%14 = call i32 @putchar(i8 signext %13)
br label %41
15: ; preds = %8
%16 = load i32, i32* %2
%17 = sub nsw i32 %16, 128
store i32 %17, i32* %3
%18 = call i32 @putchar(i8 signext 92)
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [128 x [2 x i8]], [128 x [2 x i8]]* @main.latin1, i64 0, i64 %20
%22 = getelementptr inbounds [2 x i8], [2 x i8]* %21, i64 0, i64 0
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %34
26: ; preds = %15
%27 = call i32 @putchar(i8 signext 40)
%28 = load i32, i32* %3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [128 x [2 x i8]], [128 x [2 x i8]]* @main.latin1, i64 0, i64 %29
%31 = getelementptr inbounds [2 x i8], [2 x i8]* %30, i64 0, i64 0
%32 = load i8, i8* %31
%33 = call i32 @putchar(i8 signext %32)
br label %34
34: ; preds = %26, %15
%35 = load i32, i32* %3
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [128 x [2 x i8]], [128 x [2 x i8]]* @main.latin1, i64 0, i64 %36
%38 = getelementptr inbounds [2 x i8], [2 x i8]* %37, i64 0, i64 1
%39 = load i8, i8* %38
%40 = call i32 @putchar(i8 signext %39)
br label %41
41: ; preds = %34, %11
br label %4
42: ; preds = %4
ret i32 0
}

LLVM IR (-O2):
@main.latin1 = internal unnamed_addr constant [128 x [2 x i8]] [[2 x i8] c"80", [2 x i8] c"81", [2 x i8] c"82", [2 x i8] c"83", [2 x i8] c"84", [2 x i8] c"85", [2 x i8] c"86", [2 x i8] c"87", [2 x i8] c"88", [2 x i8] c"89", [2 x i8] c"8A", [2 x i8] c"8B", [2 x i8] c"8C", [2 x i8] c"8D", [2 x i8] c"8E", [2 x i8] c"8F", [2 x i8] c"90", [2 x i8] c"91", [2 x i8] c"92", [2 x i8] c"93", [2 x i8] c"94", [2 x i8] c"95", [2 x i8] c"96", [2 x i8] c"97", [2 x i8] c"98", [2 x i8] c"99", [2 x i8] c"9A", [2 x i8] c"9B", [2 x i8] c"9C", [2 x i8] c"9D", [2 x i8] c"9E", [2 x i8] c"9F", [2 x i8] c"\00 ", [2 x i8] c"!!", [2 x i8] c"c|", [2 x i8] c"L-", [2 x i8] c"xo", [2 x i8] c"Y-", [2 x i8] c"||", [2 x i8] c"so", [2 x i8] c"\22\22", [2 x i8] c"co", [2 x i8] c"a_", [2 x i8] c"<<", [2 x i8] c"-,", [2 x i8] c"--", [2 x i8] c"ro", [2 x i8] c"-^", [2 x i8] c"0^", [2 x i8] c"+-", [2 x i8] c"2^", [2 x i8] c"3^", [2 x i8] c"\00'", [2 x i8] c"/u", [2 x i8] c"P!", [2 x i8] c".^", [2 x i8] c",,", [2 x i8] c"1^", [2 x i8] c"o_", [2 x i8] c">>", [2 x i8] c"14", [2 x i8] c"12", [2 x i8] c"34", [2 x i8] c"??", [2 x i8] c"A`", [2 x i8] c"A'", [2 x i8] c"A^", [2 x i8] c"A~", [2 x i8] c"A\22", [2 x i8] c"A*", [2 x i8] c"AE", [2 x i8] c"C,", [2 x i8] c"E`", [2 x i8] c"E'", [2 x i8] c"E^", [2 x i8] c"E\22", [2 x i8] c"I`", [2 x i8] c"I'", [2 x i8] c"I^", [2 x i8] c"I\22", [2 x i8] c"D-", [2 x i8] c"N~", [2 x i8] c"O`", [2 x i8] c"O'", [2 x i8] c"O^", [2 x i8] c"O~", [2 x i8] c"O\22", [2 x i8] c"xx", [2 x i8] c"O/", [2 x i8] c"U`", [2 x i8] c"U'", [2 x i8] c"U^", [2 x i8] c"U\22", [2 x i8] c"Y'", [2 x i8] c"TH", [2 x i8] c"ss", [2 x i8] c"a`", [2 x i8] c"a'", [2 x i8] c"a^", [2 x i8] c"a~", [2 x i8] c"a\22", [2 x i8] c"a*", [2 x i8] c"ae", [2 x i8] c"c,", [2 x i8] c"e`", [2 x i8] c"e'", [2 x i8] c"e^", [2 x i8] c"e\22", [2 x i8] c"i`", [2 x i8] c"i'", [2 x i8] c"i^", [2 x i8] c"i\22", [2 x i8] c"d-", [2 x i8] c"n~", [2 x i8] c"o`", [2 x i8] c"o'", [2 x i8] c"o^", [2 x i8] c"o~", [2 x i8] c"o\22", [2 x i8] c"-:", [2 x i8] c"o/", [2 x i8] c"u`", [2 x i8] c"u'", [2 x i8] c"u^", [2 x i8] c"u\22", [2 x i8] c"y'", [2 x i8] c"th", [2 x i8] c"y\22"]
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %27, label %4
4: ; preds = %0, %21
%5 = phi i32 [ %24, %21 ], [ %1, %0 ]
%6 = icmp slt i32 %5, 128
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = trunc i32 %5 to i8
br label %21
9: ; preds = %4
%10 = add nsw i32 %5, -128
%11 = tail call i32 @putchar(i8 signext 92)
%12 = zext i32 %10 to i64
switch i32 %5, label %13 [
i32 180, label %18
i32 160, label %18
]
13: ; preds = %9
%14 = getelementptr inbounds [128 x [2 x i8]], [128 x [2 x i8]]* @main.latin1, i64 0, i64 %12, i64 0
%15 = tail call i32 @putchar(i8 signext 40)
%16 = load i8, i8* %14
%17 = tail call i32 @putchar(i8 signext %16)
br label %18
18: ; preds = %9, %9, %13
%19 = getelementptr inbounds [128 x [2 x i8]], [128 x [2 x i8]]* @main.latin1, i64 0, i64 %12, i64 1
%20 = load i8, i8* %19
br label %21
21: ; preds = %18, %7
%22 = phi i8 [ %20, %18 ], [ %8, %7 ]
%23 = tail call i32 @putchar(i8 signext %22)
%24 = tail call i32 (...) @getchar()
%25 = load i32, i32* @EOF
%26 = icmp eq i32 %24, %25
br i1 %26, label %27, label %4
27: ; preds = %21, %0
ret i32 0
}