#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 decode();
int getchar();
int /*<<< orphan*/ putchar(int);
int main(void) {
  int c;
  unsigned long seconds;
  unsigned long nanoseconds;
  while ((c = getchar()) != EOF) {
    if (c == '@')
      c = decode();
    while (c != EOF) {
      putchar(c);
      if (c == '\n')
        break;
      c = getchar();
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e98(%rip),%rcx
cmp    (%rcx),%eax
je     11ae <main+0x7e>
cmpl   $0x40,-0x8(%rbp)
jne    116c <main+0x3c>
mov    $0x0,%al
call   1050 <decode@plt>
mov    %eax,-0x8(%rbp)
jmp    1171 <main+0x41>
mov    -0x8(%rbp),%eax
mov    0x2e6d(%rip),%rcx
cmp    (%rcx),%eax
je     11a9 <main+0x79>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
cmpl   $0xa,-0x8(%rbp)
jne    119a <main+0x6a>
jmp    11a9 <main+0x79>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
jmp    1171 <main+0x41>
jmp    113f <main+0xf>
mov    -0x4(%rbp),%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    %eax,%ebx
mov    0x2ea4(%rip),%r14
jmp    1159 <main+0x29>
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
mov    (%r14),%eax
cmp    %eax,%ebx
je     119c <main+0x6c>
cmp    $0x40,%ebx
jne    1171 <main+0x41>
xor    %eax,%eax
call   1050 <decode@plt>
mov    %eax,%ebx
mov    (%r14),%eax
cmp    %eax,%ebx
je     1150 <main+0x20>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%edi
call   1030 <putchar@plt>
cmp    $0xa,%ebx
je     1150 <main+0x20>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
cmp    (%r14),%eax
jne    1180 <main+0x50>
jmp    1150 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@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, %23
%5 = phi i32 [ %25, %23 ], [ %2, %0 ]
%6 = phi i32 [ %24, %23 ], [ %1, %0 ]
%7 = icmp eq i32 %6, 64
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = tail call i32 (...) @decode()
%10 = load i32, i32* @EOF
br label %11
11: ; preds = %8, %4
%12 = phi i32 [ %10, %8 ], [ %5, %4 ]
%13 = phi i32 [ %9, %8 ], [ %6, %4 ]
%14 = icmp eq i32 %13, %12
br i1 %14, label %23, label %15
15: ; preds = %11, %19
%16 = phi i32 [ %20, %19 ], [ %13, %11 ]
%17 = tail call i32 @putchar(i32 %16)
%18 = icmp eq i32 %16, 10
br i1 %18, label %23, label %19
19: ; preds = %15
%20 = tail call i32 (...) @getchar()
%21 = load i32, i32* @EOF
%22 = icmp eq i32 %20, %21
br i1 %22, label %23, label %15
23: ; preds = %19, %15, %11
%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 = %23, %0
ret i32 0
}