#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*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char s[256];
  char *c;
  scanf("%[^\n]s", s);
  c = s;
  while (*c != '\0') {
    switch (*c) {
    case 'A':
    case 'a':
      *c = '4';
      break;
    case 'C':
    case 'c':
      *c = '(';
      break;
    case 'E':
    case 'e':
      *c = '3';
      break;
    case 'G':
    case 'g':
      *c = '6';
      break;
    case 'H':
    case 'h':
      *c = '#';
      break;
    case 'I':
    case 'i':
      *c = '1';
      break;
    case 'O':
    case 'o':
      *c = '0';
      break;
    case 'S':
    case 's':
      *c = '$';
      break;
    case 'T':
    case 't':
      *c = '7';
      break;
    case 'X':
    case 'x':
      *c = '%';
      break;
    }
    c++;
  }
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rsi
lea    0xfa0(%rip),%rdi
call   1040 <scanf@plt>
lea    -0x110(%rbp),%rax
mov    %rax,-0x118(%rbp)
mov    -0x118(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1244 <main+0x124>
mov    -0x118(%rbp),%rax
movsbl (%rax),%eax
add    $0xffffffbf,%eax
mov    %eax,%ecx
mov    %rcx,-0x120(%rbp)
sub    $0x37,%eax
ja     122d <main+0x10d>
mov    -0x120(%rbp),%rax
lea    0xe6d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x118(%rbp),%rax
movb   $0x34,(%rax)
jmp    122d <main+0x10d>
mov    -0x118(%rbp),%rax
movb   $0x28,(%rax)
jmp    122d <main+0x10d>
mov    -0x118(%rbp),%rax
movb   $0x33,(%rax)
jmp    122d <main+0x10d>
mov    -0x118(%rbp),%rax
movb   $0x36,(%rax)
jmp    122d <main+0x10d>
mov    -0x118(%rbp),%rax
movb   $0x23,(%rax)
jmp    122d <main+0x10d>
mov    -0x118(%rbp),%rax
movb   $0x31,(%rax)
jmp    122d <main+0x10d>
mov    -0x118(%rbp),%rax
movb   $0x30,(%rax)
jmp    122d <main+0x10d>
mov    -0x118(%rbp),%rax
movb   $0x24,(%rax)
jmp    122d <main+0x10d>
mov    -0x118(%rbp),%rax
movb   $0x37,(%rax)
jmp    122d <main+0x10d>
mov    -0x118(%rbp),%rax
movb   $0x25,(%rax)
mov    -0x118(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x118(%rbp)
jmp    1153 <main+0x33>
lea    -0x110(%rbp),%rsi
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x108,%rsp
lea    0xfb2(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%dl
test   %dl,%dl
je     119e <main+0x7e>
lea    0x1(%rsp),%rax
lea    0xeb7(%rip),%rcx
nopl   0x0(%rax)
movsbl %dl,%esi
add    $0xffffffbf,%esi
cmp    $0x37,%esi
ja     1193 <main+0x73>
mov    $0x34,%dl
movslq (%rcx,%rsi,4),%rsi
add    %rcx,%rsi
jmp    *%rsi
mov    $0x28,%dl
jmp    1190 <main+0x70>
mov    $0x33,%dl
jmp    1190 <main+0x70>
mov    $0x36,%dl
jmp    1190 <main+0x70>
mov    $0x23,%dl
jmp    1190 <main+0x70>
mov    $0x31,%dl
jmp    1190 <main+0x70>
mov    $0x30,%dl
jmp    1190 <main+0x70>
mov    $0x24,%dl
jmp    1190 <main+0x70>
mov    $0x37,%dl
jmp    1190 <main+0x70>
mov    $0x25,%dl
nopl   0x0(%rax,%rax,1)
mov    %dl,-0x1(%rax)
movzbl (%rax),%edx
add    $0x1,%rax
test   %dl,%dl
jne    1150 <main+0x30>
lea    0xf42(%rip),%rdi
mov    %rsp,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x108,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%[^\0A]s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [256 x i8]
%3 = alloca i8*
store i32 0, i32* %1
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
store i8* %6, i8** %3
br label %7
7: ; preds = %36, %0
%8 = load i8*, i8** %3
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %39
12: ; preds = %7
%13 = load i8*, i8** %3
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
switch i32 %15, label %36 [
i32 65, label %16
i32 97, label %16
i32 67, label %18
i32 99, label %18
i32 69, label %20
i32 101, label %20
i32 71, label %22
i32 103, label %22
i32 72, label %24
i32 104, label %24
i32 73, label %26
i32 105, label %26
i32 79, label %28
i32 111, label %28
i32 83, label %30
i32 115, label %30
i32 84, label %32
i32 116, label %32
i32 88, label %34
i32 120, label %34
]
16: ; preds = %12, %12
%17 = load i8*, i8** %3
store i8 52, i8* %17
br label %36
18: ; preds = %12, %12
%19 = load i8*, i8** %3
store i8 40, i8* %19
br label %36
20: ; preds = %12, %12
%21 = load i8*, i8** %3
store i8 51, i8* %21
br label %36
22: ; preds = %12, %12
%23 = load i8*, i8** %3
store i8 54, i8* %23
br label %36
24: ; preds = %12, %12
%25 = load i8*, i8** %3
store i8 35, i8* %25
br label %36
26: ; preds = %12, %12
%27 = load i8*, i8** %3
store i8 49, i8* %27
br label %36
28: ; preds = %12, %12
%29 = load i8*, i8** %3
store i8 48, i8* %29
br label %36
30: ; preds = %12, %12
%31 = load i8*, i8** %3
store i8 36, i8* %31
br label %36
32: ; preds = %12, %12
%33 = load i8*, i8** %3
store i8 55, i8* %33
br label %36
34: ; preds = %12, %12
%35 = load i8*, i8** %3
store i8 37, i8* %35
br label %36
36: ; preds = %12, %34, %32, %30, %28, %26, %24, %22, %20, %18, %16
%37 = load i8*, i8** %3
%38 = getelementptr inbounds i8, i8* %37, i32 1
store i8* %38, i8** %3
br label %7
39: ; preds = %7
%40 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%41 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %40)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%[^\0A]s\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i8, i8* %2
%5 = icmp eq i8 %4, 0
br i1 %5, label %25, label %6
6: ; preds = %0, %21
%7 = phi i8 [ %23, %21 ], [ %4, %0 ]
%8 = phi i8* [ %22, %21 ], [ %2, %0 ]
%9 = sext i8 %7 to i32
switch i32 %9, label %21 [
i32 65, label %19
i32 97, label %19
i32 67, label %10
i32 99, label %10
i32 69, label %11
i32 101, label %11
i32 71, label %12
i32 103, label %12
i32 72, label %13
i32 104, label %13
i32 73, label %14
i32 105, label %14
i32 79, label %15
i32 111, label %15
i32 83, label %16
i32 115, label %16
i32 84, label %17
i32 116, label %17
i32 88, label %18
i32 120, label %18
]
10: ; preds = %6, %6
br label %19
11: ; preds = %6, %6
br label %19
12: ; preds = %6, %6
br label %19
13: ; preds = %6, %6
br label %19
14: ; preds = %6, %6
br label %19
15: ; preds = %6, %6
br label %19
16: ; preds = %6, %6
br label %19
17: ; preds = %6, %6
br label %19
18: ; preds = %6, %6
br label %19
19: ; preds = %6, %6, %10, %11, %12, %13, %14, %15, %16, %17, %18
%20 = phi i8 [ 37, %18 ], [ 55, %17 ], [ 36, %16 ], [ 48, %15 ], [ 49, %14 ], [ 35, %13 ], [ 54, %12 ], [ 51, %11 ], [ 40, %10 ], [ 52, %6 ], [ 52, %6 ]
store i8 %20, i8* %8
br label %21
21: ; preds = %19, %6
%22 = getelementptr inbounds i8, i8* %8, i64 1
%23 = load i8, i8* %22
%24 = icmp eq i8 %23, 0
br i1 %24, label %25, label %6
25: ; preds = %21, %0
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}