#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 */
typedef int uint8_t;

/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(char);
int main(void) {
  uint8_t s[64] = {0};
  int lsize = 64 * 3;
  for (int c, i = 0; (c = getchar()) != EOF; i++) {
    if (c == '\n' && i < lsize)
      lsize = i + 1;
    else if (c == 'O')
      s[(i % lsize) / 3] |= (1 << (2 * (i / lsize) + i % 3));
  }
  for (int i = 0; i < lsize / 3; i++)
    putchar(
        "_a_c_bif_e_d_hjg_k_m_lsp_o_n_rtq______________w__u_x_v___z_y__"[s[i]]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1040 <memset@plt>
movl   $0xc0,-0x114(%rbp)
movl   $0x0,-0x11c(%rbp)
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %eax,-0x118(%rbp)
mov    0x2e6b(%rip),%rcx
cmp    (%rcx),%eax
je     1235 <main+0x105>
cmpl   $0xa,-0x118(%rbp)
jne    11b8 <main+0x88>
mov    -0x11c(%rbp),%eax
cmp    -0x114(%rbp),%eax
jge    11b8 <main+0x88>
mov    -0x11c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x114(%rbp)
jmp    121c <main+0xec>
cmpl   $0x4f,-0x118(%rbp)
jne    1217 <main+0xe7>
mov    -0x11c(%rbp),%eax
cltd
idivl  -0x114(%rbp)
mov    %eax,%ecx
shl    $0x1,%ecx
mov    -0x11c(%rbp),%eax
mov    $0x3,%esi
cltd
idiv   %esi
add    %edx,%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
mov    -0x11c(%rbp),%eax
cltd
idivl  -0x114(%rbp)
mov    %edx,%eax
mov    $0x3,%esi
cltd
idiv   %esi
cltq
or     -0x110(%rbp,%rax,4),%ecx
mov    %ecx,-0x110(%rbp,%rax,4)
jmp    121c <main+0xec>
jmp    1221 <main+0xf1>
mov    -0x11c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x11c(%rbp)
jmp    1169 <main+0x39>
movl   $0x0,-0x120(%rbp)
mov    -0x120(%rbp),%eax
mov    %eax,-0x124(%rbp)
mov    -0x114(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x124(%rbp),%eax
cmp    %ecx,%eax
jge    129c <main+0x16c>
movslq -0x120(%rbp),%rax
movslq -0x110(%rbp,%rax,4),%rcx
ff
lea    0xd81(%rip),%rax
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
mov    -0x120(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x120(%rbp)
jmp    123f <main+0x10f>
mov    -0x4(%rbp),%eax
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x108,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2e43(%rip),%r14
mov    $0xc0,%ebp
cmp    (%r14),%eax
je     1212 <main+0xf2>
mov    $0xc0,%ebp
mov    $0xaaaaaaab,%r15d
xor    %ebx,%ebx
jmp    11d2 <main+0xb2>
xchg   %ax,%ax
lea    0x1(%rbx),%ebp
add    $0x1,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
je     120d <main+0xed>
cmp    $0xa,%eax
jne    11db <main+0xbb>
cmp    %ebp,%ebx
jl     11c0 <main+0xa0>
cmp    $0x4f,%eax
jne    11c3 <main+0xa3>
mov    %ebx,%eax
cltd
idiv   %ebp
mov    %ebx,%ecx
imul   %r15,%rcx
shr    $0x21,%rcx
lea    (%rcx,%rcx,2),%esi
neg    %esi
lea    (%rbx,%rax,2),%ecx
add    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
imul   %r15,%rdx
shr    $0x21,%rdx
or     %eax,(%rsp,%rdx,4)
jmp    11c3 <main+0xa3>
cmp    $0x3,%ebp
jl     1247 <main+0x127>
mov    %ebp,%eax
mov    $0xaaaaaaab,%ebx
imul   %rax,%rbx
shr    $0x21,%rbx
xor    %ebp,%ebp
lea    0xdd6(%rip),%r14
nopw   0x0(%rax,%rax,1)
movslq (%rsp,%rbp,4),%rax
movsbl (%rax,%r14,1),%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1230 <main+0x110>
xor    %eax,%eax
add    $0x108,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i32 0
@.str = [63 x i8] c"_a_c_bif_e_d_hjg_k_m_lsp_o_n_rtq______________w__u_x_v___z_y__\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = bitcast [64 x i32]* %2 to i8*
store i32 192, i32* %3
store i32 0, i32* %5
br label %8
8: ; preds = %44, %0
%9 = call i32 (...) @getchar()
store i32 %9, i32* %4
%10 = load i32, i32* @EOF
%11 = icmp ne i32 %9, %10
br i1 %11, label %12, label %47
12: ; preds = %8
%13 = load i32, i32* %4
%14 = icmp eq i32 %13, 10
br i1 %14, label %15, label %22
15: ; preds = %12
%16 = load i32, i32* %5
%17 = load i32, i32* %3
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %22
19: ; preds = %15
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %3
br label %43
22: ; preds = %15, %12
%23 = load i32, i32* %4
%24 = icmp eq i32 %23, 79
br i1 %24, label %25, label %42
25: ; preds = %22
%26 = load i32, i32* %5
%27 = load i32, i32* %3
%28 = sdiv i32 %26, %27
%29 = mul nsw i32 2, %28
%30 = load i32, i32* %5
%31 = srem i32 %30, 3
%32 = add nsw i32 %29, %31
%33 = shl i32 1, %32
%34 = load i32, i32* %5
%35 = load i32, i32* %3
%36 = srem i32 %34, %35
%37 = sdiv i32 %36, 3
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 %38
%40 = load i32, i32* %39
%41 = or i32 %40, %33
store i32 %41, i32* %39
br label %42
42: ; preds = %25, %22
br label %43
43: ; preds = %42, %19
br label %44
44: ; preds = %43
%45 = load i32, i32* %5
%46 = add nsw i32 %45, 1
store i32 %46, i32* %5
br label %8
47: ; preds = %8
store i32 0, i32* %6
br label %48
48: ; preds = %62, %47
%49 = load i32, i32* %6
%50 = load i32, i32* %3
%51 = sdiv i32 %50, 3
%52 = icmp slt i32 %49, %51
br i1 %52, label %53, label %65
53: ; preds = %48
%54 = load i32, i32* %6
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [64 x i32], [64 x i32]* %2, i64 0, i64 %55
%57 = load i32, i32* %56
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds [63 x i8], [63 x i8]* @.str, i64 0, i64 %58
%60 = load i8, i8* %59
%61 = call i32 @putchar(i8 signext %60)
br label %62
62: ; preds = %53
%63 = load i32, i32* %6
%64 = add nsw i32 %63, 1
store i32 %64, i32* %6
br label %48
65: ; preds = %48
%66 = load i32, i32* %1
ret i32 %66
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [63 x i8] c"_a_c_bif_e_d_hjg_k_m_lsp_o_n_rtq______________w__u_x_v___z_y__\00"
define i32 @main() {
%1 = alloca [64 x i32]
%2 = bitcast [64 x i32]* %1 to i8*
%3 = tail call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %8, label %12
6: ; preds = %35
%7 = icmp sgt i32 %36, 2
br i1 %7, label %8, label %41
8: ; preds = %0, %6
%9 = phi i32 [ %36, %6 ], [ 192, %0 ]
%10 = udiv i32 %9, 3
%11 = zext i32 %10 to i64
br label %42
12: ; preds = %0, %35
%13 = phi i32 [ %38, %35 ], [ %3, %0 ]
%14 = phi i32 [ %37, %35 ], [ 0, %0 ]
%15 = phi i32 [ %36, %35 ], [ 192, %0 ]
%16 = icmp eq i32 %13, 10
%17 = icmp slt i32 %14, %15
%18 = select i1 %16, i1 %17, i1 false
br i1 %18, label %19, label %21
19: ; preds = %12
%20 = add nuw nsw i32 %14, 1
br label %35
21: ; preds = %12
%22 = icmp eq i32 %13, 79
br i1 %22, label %23, label %35
23: ; preds = %21
%24 = sdiv i32 %14, %15
%25 = shl nsw i32 %24, 1
%26 = urem i32 %14, 3
%27 = add nsw i32 %25, %26
%28 = shl nuw i32 1, %27
%29 = srem i32 %14, %15
%30 = udiv i32 %29, 3
%31 = zext i32 %30 to i64
%32 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 %31
%33 = load i32, i32* %32
%34 = or i32 %28, %33
store i32 %34, i32* %32
br label %35
35: ; preds = %19, %23, %21
%36 = phi i32 [ %20, %19 ], [ %15, %23 ], [ %15, %21 ]
%37 = add nuw nsw i32 %14, 1
%38 = tail call i32 (...) @getchar()
%39 = load i32, i32* @EOF
%40 = icmp eq i32 %38, %39
br i1 %40, label %6, label %12
41: ; preds = %42, %6
ret i32 0
42: ; preds = %8, %42
%43 = phi i64 [ 0, %8 ], [ %50, %42 ]
%44 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 %43
%45 = load i32, i32* %44
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds [63 x i8], [63 x i8]* @.str, i64 0, i64 %46
%48 = load i8, i8* %47
%49 = tail call i32 @putchar(i8 signext %48)
%50 = add nuw nsw i64 %43, 1
%51 = icmp eq i64 %50, %11
br i1 %51, label %41, label %42
}