#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*/ printf(char *, ...);
int __fcat__() {
  int i;
  while ((i = getchar()) != EOF) {
    if (i == 62) {
      while ((i = getchar()) != '\n')
        ;
      printf("\n");
    } else if (i == '\n') {
    } else {
      printf("%c", i);
    }
  }
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<__fcat__>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x4(%rbp)
mov    0x2eaf(%rip),%rcx
cmp    (%rcx),%eax
je     11a5 <__fcat__+0x85>
cmpl   $0x3e,-0x4(%rbp)
jne    117b <__fcat__+0x5b>
jmp    1150 <__fcat__+0x30>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x4(%rbp)
cmp    $0xa,%eax
je     1168 <__fcat__+0x48>
jmp    1150 <__fcat__+0x30>
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a0 <__fcat__+0x80>
cmpl   $0xa,-0x4(%rbp)
jne    118a <__fcat__+0x6a>
jmp    119b <__fcat__+0x7b>
mov    -0x4(%rbp),%esi
lea    0xe6e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a0 <__fcat__+0x80>
jmp    1128 <__fcat__+0x8>
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fcat__>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
jmp    114e <__fcat__+0x2e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
je     1173 <__fcat__+0x53>
cmp    $0xa,%eax
je     1147 <__fcat__+0x27>
cmp    $0x3e,%eax
jne    1140 <__fcat__+0x20>
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%eax
jne    1160 <__fcat__+0x40>
mov    $0xa,%eax
jmp    1140 <__fcat__+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
@.str = [2 x i8] c"\0A\00"
@.str.1 = [3 x i8] c"%c\00"
define i32 @__fcat__() {
%1 = alloca i32
br label %2
2: ; preds = %24, %0
%3 = call i32 (...) @getchar()
store i32 %3, i32* %1
%4 = load i32, i32* @EOF
%5 = icmp ne i32 %3, %4
br i1 %5, label %6, label %25
6: ; preds = %2
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 62
br i1 %8, label %9, label %16
9: ; preds = %6
br label %10
10: ; preds = %13, %9
%11 = call i32 (...) @getchar()
store i32 %11, i32* %1
%12 = icmp ne i32 %11, 10
br i1 %12, label %13, label %14
13: ; preds = %10
br label %10
14: ; preds = %10
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %24
16: ; preds = %6
%17 = load i32, i32* %1
%18 = icmp eq i32 %17, 10
br i1 %18, label %19, label %20
19: ; preds = %16
br label %23
20: ; preds = %16
%21 = load i32, i32* %1
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %21)
br label %23
23: ; preds = %20, %19
br label %24
24: ; preds = %23, %14
br label %2
25: ; preds = %2
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @__fcat__() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %16, label %4
4: ; preds = %0, %12
%5 = phi i32 [ %13, %12 ], [ %1, %0 ]
switch i32 %5, label %9 [
i32 62, label %6
i32 10, label %12
]
6: ; preds = %4, %6
%7 = tail call i32 (...) @getchar()
%8 = icmp eq i32 %7, 10
br i1 %8, label %9, label %6
9: ; preds = %6, %4
%10 = phi i32 [ %5, %4 ], [ 10, %6 ]
%11 = tail call i32 @putchar(i32 %10)
br label %12
12: ; preds = %9, %4
%13 = tail call i32 (...) @getchar()
%14 = load i32, i32* @EOF
%15 = icmp eq i32 %13, %14
br i1 %15, label %16, label %4
16: ; preds = %12, %0
%17 = tail call i32 @putchar(i32 10)
ret i32 0
}