#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 */
#define EOF 128
int getchar();
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  int c = 0;
  int skipline = 0;
  int linebegin = 1;
  while (c != EOF) {
    c = getchar();
    switch (c) {
    case '>':
      skipline = 1;
      break;
    case '\n':
      if (skipline) {
        skipline = 0;
      } else {
        printf("\n");
      }
      break;
    case '\r':
    case EOF:
      break;
    case 'A':
    case 'a':
      if (!skipline) {
        if (!linebegin) {
          printf("\t");
        }
        printf("0\t1\t0\t0\t0");
      }
      break;
    case 'C':
    case 'c':
      if (!skipline) {
        if (!linebegin) {
          printf("\t");
        }
        printf("0\t0\t1\t0\t0");
      }
      break;
    case 'G':
    case 'g':
      if (!skipline) {
        if (!linebegin) {
          printf("\t");
        }
        printf("0\t0\t0\t1\t0");
      }
      break;
    case 'T':
    case 't':
      if (!skipline) {
        if (!linebegin) {
          printf("\t");
        }
        printf("0\t0\t0\t0\t1");
      }
      break;
    case 'N':
    case '.':
    case '-':
    default:
      if (!skipline) {
        if (!linebegin) {
          printf("\t");
        }
        printf("1\t0\t0\t0\t0");
      }
      break;
    }
    if ((c == '\n') || (c == '\r')) {
      linebegin = 1;
    } else {
      linebegin = 0;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
cmpl   $0x80,-0x14(%rbp)
je     12e9 <main+0x1c9>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0xfffffff6,%eax
mov    %eax,%ecx
mov    %rcx,-0x28(%rbp)
sub    $0x76,%eax
ja     128c <main+0x16c>
mov    -0x28(%rbp),%rax
lea    0xe7e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x18(%rbp)
jmp    12bd <main+0x19d>
cmpl   $0x0,-0x18(%rbp)
je     11ad <main+0x8d>
movl   $0x0,-0x18(%rbp)
jmp    11b9 <main+0x99>
lea    0x1028(%rip),%rdi
call   1030 <printf@plt>
jmp    12bd <main+0x19d>
jmp    12bd <main+0x19d>
cmpl   $0x0,-0x18(%rbp)
jne    11ef <main+0xcf>
cmpl   $0x0,-0x1c(%rbp)
jne    11e3 <main+0xc3>
lea    0x1000(%rip),%rdi
call   1030 <printf@plt>
lea    0xff6(%rip),%rdi
call   1030 <printf@plt>
jmp    12bd <main+0x19d>
cmpl   $0x0,-0x18(%rbp)
jne    1220 <main+0x100>
cmpl   $0x0,-0x1c(%rbp)
jne    1214 <main+0xf4>
lea    0xfcf(%rip),%rdi
call   1030 <printf@plt>
lea    0xfcf(%rip),%rdi
call   1030 <printf@plt>
jmp    12bd <main+0x19d>
cmpl   $0x0,-0x18(%rbp)
jne    1251 <main+0x131>
cmpl   $0x0,-0x1c(%rbp)
jne    1245 <main+0x125>
lea    0xf9e(%rip),%rdi
call   1030 <printf@plt>
lea    0xfa8(%rip),%rdi
call   1030 <printf@plt>
jmp    12bd <main+0x19d>
cmpl   $0x0,-0x18(%rbp)
jne    1282 <main+0x162>
cmpl   $0x0,-0x1c(%rbp)
jne    1276 <main+0x156>
lea    0xf6d(%rip),%rdi
call   1030 <printf@plt>
lea    0xf81(%rip),%rdi
call   1030 <printf@plt>
jmp    12bd <main+0x19d>
jmp    128c <main+0x16c>
cmpl   $0x0,-0x18(%rbp)
jne    12b8 <main+0x198>
cmpl   $0x0,-0x1c(%rbp)
jne    12ac <main+0x18c>
lea    0xf37(%rip),%rdi
call   1030 <printf@plt>
lea    0xf55(%rip),%rdi
call   1030 <printf@plt>
jmp    12bd <main+0x19d>
cmpl   $0xa,-0x14(%rbp)
je     12d1 <main+0x1b1>
cmpl   $0xd,-0x14(%rbp)
jne    12dd <main+0x1bd>
movl   $0x1,-0x1c(%rbp)
jmp    12e4 <main+0x1c4>
movl   $0x0,-0x1c(%rbp)
jmp    114b <main+0x2b>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x1,%r12d
lea    0xeb8(%rip),%r14
lea    0x10a1(%rip),%r13
lea    0x10a4(%rip),%rbx
xor    %r15d,%r15d
jmp    1184 <main+0x54>
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %r15d,%r15d
cmp    $0xd,%ebp
sete   %al
cmp    $0xa,%ebp
sete   %cl
or     %al,%cl
movzbl %cl,%r12d
cmp    $0x80,%ebp
je     1285 <main+0x155>
xor    %eax,%eax
call   1050 <getchar@plt>
mov    %eax,%ebp
lea    -0xa(%rbp),%eax
cmp    $0x76,%eax
ja     1250 <main+0x120>
movslq (%r14,%rax,4),%rax
add    %r14,%rax
jmp    *%rax
test   %r15d,%r15d
mov    $0x1,%r15d
jne    1166 <main+0x36>
test   %r12d,%r12d
jne    11bc <main+0x8c>
mov    $0x9,%edi
call   1030 <putchar@plt>
lea    0x1019(%rip),%rdi
jmp    115e <main+0x2e>
test   %r15d,%r15d
mov    $0x1,%r15d
jne    1166 <main+0x36>
test   %r12d,%r12d
jne    11df <main+0xaf>
mov    $0x9,%edi
call   1030 <putchar@plt>
lea    0x1000(%rip),%rdi
jmp    115e <main+0x2e>
test   %r15d,%r15d
mov    $0x1,%r15d
jne    1166 <main+0x36>
test   %r12d,%r12d
jne    1209 <main+0xd9>
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %r13,%rdi
jmp    115e <main+0x2e>
test   %r15d,%r15d
mov    $0x1,%r15d
jne    1166 <main+0x36>
test   %r12d,%r12d
jne    115b <main+0x2b>
mov    $0x9,%edi
call   1030 <putchar@plt>
jmp    115b <main+0x2b>
test   %r15d,%r15d
jne    1163 <main+0x33>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1163 <main+0x33>
test   %r15d,%r15d
mov    $0x1,%r15d
jne    1166 <main+0x36>
test   %r12d,%r12d
jne    126e <main+0x13e>
mov    $0x9,%edi
call   1030 <putchar@plt>
lea    0xf8f(%rip),%rdi
jmp    115e <main+0x2e>
mov    $0x1,%r15d
jmp    1166 <main+0x36>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [2 x i8] c"\09\00"
@.str.2 = [10 x i8] c"0\091\090\090\090\00"
@.str.3 = [10 x i8] c"0\090\091\090\090\00"
@.str.4 = [10 x i8] c"0\090\090\091\090\00"
@.str.5 = [10 x i8] c"0\090\090\090\091\00"
@.str.6 = [10 x i8] c"1\090\090\090\090\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
store i32 1, i32* %8
br label %9
9: ; preds = %88, %2
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, 128
br i1 %11, label %12, label %89
12: ; preds = %9
%13 = call i32 (...) @getchar()
store i32 %13, i32* %6
%14 = load i32, i32* %6
switch i32 %14, label %69 [
i32 62, label %15
i32 10, label %16
i32 13, label %23
i32 128, label %23
i32 65, label %24
i32 97, label %24
i32 67, label %35
i32 99, label %35
i32 71, label %46
i32 103, label %46
i32 84, label %57
i32 116, label %57
i32 78, label %68
i32 46, label %68
i32 45, label %68
]
15: ; preds = %12
store i32 1, i32* %7
br label %80
16: ; preds = %12
%17 = load i32, i32* %7
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %16
store i32 0, i32* %7
br label %22
20: ; preds = %16
%21 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %22
22: ; preds = %20, %19
br label %80
23: ; preds = %12, %12
br label %80
24: ; preds = %12, %12
%25 = load i32, i32* %7
%26 = icmp ne i32 %25, 0
br i1 %26, label %34, label %27
27: ; preds = %24
%28 = load i32, i32* %8
%29 = icmp ne i32 %28, 0
br i1 %29, label %32, label %30
30: ; preds = %27
%31 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %32
32: ; preds = %30, %27
%33 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %34
34: ; preds = %32, %24
br label %80
35: ; preds = %12, %12
%36 = load i32, i32* %7
%37 = icmp ne i32 %36, 0
br i1 %37, label %45, label %38
38: ; preds = %35
%39 = load i32, i32* %8
%40 = icmp ne i32 %39, 0
br i1 %40, label %43, label %41
41: ; preds = %38
%42 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %43
43: ; preds = %41, %38
%44 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %45
45: ; preds = %43, %35
br label %80
46: ; preds = %12, %12
%47 = load i32, i32* %7
%48 = icmp ne i32 %47, 0
br i1 %48, label %56, label %49
49: ; preds = %46
%50 = load i32, i32* %8
%51 = icmp ne i32 %50, 0
br i1 %51, label %54, label %52
52: ; preds = %49
%53 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %54
54: ; preds = %52, %49
%55 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %56
56: ; preds = %54, %46
br label %80
57: ; preds = %12, %12
%58 = load i32, i32* %7
%59 = icmp ne i32 %58, 0
br i1 %59, label %67, label %60
60: ; preds = %57
%61 = load i32, i32* %8
%62 = icmp ne i32 %61, 0
br i1 %62, label %65, label %63
63: ; preds = %60
%64 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %65
65: ; preds = %63, %60
%66 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
br label %67
67: ; preds = %65, %57
br label %80
68: ; preds = %12, %12, %12
br label %69
69: ; preds = %12, %68
%70 = load i32, i32* %7
%71 = icmp ne i32 %70, 0
br i1 %71, label %79, label %72
72: ; preds = %69
%73 = load i32, i32* %8
%74 = icmp ne i32 %73, 0
br i1 %74, label %77, label %75
75: ; preds = %72
%76 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %77
77: ; preds = %75, %72
%78 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
br label %79
79: ; preds = %77, %69
br label %80
80: ; preds = %79, %67, %56, %45, %34, %23, %22, %15
%81 = load i32, i32* %6
%82 = icmp eq i32 %81, 10
br i1 %82, label %86, label %83
83: ; preds = %80
%84 = load i32, i32* %6
%85 = icmp eq i32 %84, 13
br i1 %85, label %86, label %87
86: ; preds = %83, %80
store i32 1, i32* %8
br label %88
87: ; preds = %83
store i32 0, i32* %8
br label %88
88: ; preds = %87, %86
br label %9
89: ; preds = %9
%90 = load i32, i32* %3
ret i32 %90
}

LLVM IR (-O2):
@.str.2 = [10 x i8] c"0\091\090\090\090\00"
@.str.3 = [10 x i8] c"0\090\091\090\090\00"
@.str.4 = [10 x i8] c"0\090\090\091\090\00"
@.str.5 = [10 x i8] c"0\090\090\090\091\00"
@.str.6 = [10 x i8] c"1\090\090\090\090\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %52
%4 = phi i32 [ 1, %2 ], [ %57, %52 ]
%5 = phi i32 [ 0, %2 ], [ %53, %52 ]
%6 = tail call i32 (...) @getchar()
switch i32 %6, label %44 [
i32 62, label %7
i32 10, label %8
i32 13, label %52
i32 128, label %52
i32 65, label %12
i32 97, label %12
i32 67, label %20
i32 99, label %20
i32 71, label %28
i32 103, label %28
i32 84, label %36
i32 116, label %36
]
7: ; preds = %3
br label %52
8: ; preds = %3
%9 = icmp eq i32 %5, 0
br i1 %9, label %10, label %52
10: ; preds = %8
%11 = tail call i32 @putchar(i32 10)
br label %52
12: ; preds = %3, %3
%13 = icmp eq i32 %5, 0
br i1 %13, label %14, label %52
14: ; preds = %12
%15 = icmp eq i32 %4, 0
br i1 %15, label %16, label %18
16: ; preds = %14
%17 = tail call i32 @putchar(i32 9)
br label %18
18: ; preds = %16, %14
%19 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %52
20: ; preds = %3, %3
%21 = icmp eq i32 %5, 0
br i1 %21, label %22, label %52
22: ; preds = %20
%23 = icmp eq i32 %4, 0
br i1 %23, label %24, label %26
24: ; preds = %22
%25 = tail call i32 @putchar(i32 9)
br label %26
26: ; preds = %24, %22
%27 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.3, i64 0, i64 0))
br label %52
28: ; preds = %3, %3
%29 = icmp eq i32 %5, 0
br i1 %29, label %30, label %52
30: ; preds = %28
%31 = icmp eq i32 %4, 0
br i1 %31, label %32, label %34
32: ; preds = %30
%33 = tail call i32 @putchar(i32 9)
br label %34
34: ; preds = %32, %30
%35 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
br label %52
36: ; preds = %3, %3
%37 = icmp eq i32 %5, 0
br i1 %37, label %38, label %52
38: ; preds = %36
%39 = icmp eq i32 %4, 0
br i1 %39, label %40, label %42
40: ; preds = %38
%41 = tail call i32 @putchar(i32 9)
br label %42
42: ; preds = %40, %38
%43 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.5, i64 0, i64 0))
br label %52
44: ; preds = %3
%45 = icmp eq i32 %5, 0
br i1 %45, label %46, label %52
46: ; preds = %44
%47 = icmp eq i32 %4, 0
br i1 %47, label %48, label %50
48: ; preds = %46
%49 = tail call i32 @putchar(i32 9)
br label %50
50: ; preds = %48, %46
%51 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
br label %52
52: ; preds = %8, %44, %50, %36, %42, %28, %34, %20, %26, %12, %18, %3, %3, %10, %7
%53 = phi i32 [ 1, %44 ], [ 0, %50 ], [ 1, %36 ], [ 0, %42 ], [ 1, %28 ], [ 0, %34 ], [ 1, %20 ], [ 0, %26 ], [ 1, %12 ], [ 0, %18 ], [ %5, %3 ], [ %5, %3 ], [ 0, %10 ], [ 1, %7 ], [ 0, %8 ]
%54 = icmp eq i32 %6, 13
%55 = icmp eq i32 %6, 10
%56 = or i1 %54, %55
%57 = zext i1 %56 to i32
%58 = icmp eq i32 %6, 128
br i1 %58, label %59, label %3
59: ; preds = %52
ret i32 0
}