#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*/ putchar(int);
int main(int argc, char **argv) {
  register int c, lastc = -1;
  while (EOF != (c = getchar())) {
    if ('>' == c) {
      if ('/' == lastc) {
        putchar('\n');
        putchar(lastc);
        putchar(c);
        lastc = -1;
      } else if ('?' != lastc) {
        putchar(lastc);
        putchar('\n');
        putchar(c);
        lastc = -1;
      } else {
        putchar(lastc);
        putchar(c);
        lastc = -1;
      }
    } else {
      if (lastc >= 0)
        putchar(lastc);
      lastc = c;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x18(%rbp)
mov    0x2ea4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
mov    %ecx,-0x14(%rbp)
cmp    %ecx,%eax
je     1214 <main+0xf4>
mov    $0x3e,%eax
cmp    -0x14(%rbp),%eax
jne    11f7 <main+0xd7>
mov    $0x2f,%eax
cmp    -0x18(%rbp),%eax
jne    11a2 <main+0x82>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x18(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x14(%rbp),%edi
call   1030 <putchar@plt>
movl   $0xffffffff,-0x18(%rbp)
jmp    11f2 <main+0xd2>
mov    $0x3f,%eax
cmp    -0x18(%rbp),%eax
je     11d6 <main+0xb6>
mov    -0x18(%rbp),%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x14(%rbp),%edi
call   1030 <putchar@plt>
movl   $0xffffffff,-0x18(%rbp)
jmp    11ed <main+0xcd>
mov    -0x18(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x14(%rbp),%edi
call   1030 <putchar@plt>
movl   $0xffffffff,-0x18(%rbp)
jmp    11f2 <main+0xd2>
jmp    120f <main+0xef>
cmpl   $0x0,-0x18(%rbp)
jl     1209 <main+0xe9>
mov    -0x18(%rbp),%edi
call   1030 <putchar@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    0x2eba(%rip),%r14
mov    (%r14),%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    %eax,%ebx
jne    1149 <main+0x29>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %eax,%ebp
mov    $0xffffffff,%ebx
jmp    1187 <main+0x67>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
call   1030 <putchar@plt>
mov    $0xffffffff,%ebp
mov    $0x3e,%ebx
mov    %ebx,%edi
call   1030 <putchar@plt>
mov    %ebp,%ebx
mov    (%r14),%r15d
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebp
cmp    %eax,%r15d
je     113c <main+0x1c>
cmp    $0x3e,%ebp
jne    11a0 <main+0x80>
cmp    $0x2f,%ebx
je     1152 <main+0x32>
cmp    $0x3f,%ebx
je     115c <main+0x3c>
mov    %ebx,%edi
mov    $0xa,%ebx
jmp    1157 <main+0x37>
nop
test   %ebx,%ebx
jns    116d <main+0x4d>
jmp    1174 <main+0x54>

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 -1, i32* %7
br label %8
8: ; preds = %48, %2
%9 = load i32, i32* @EOF
%10 = call i32 (...) @getchar()
store i32 %10, i32* %6
%11 = icmp ne i32 %9, %10
br i1 %11, label %12, label %49
12: ; preds = %8
%13 = load i32, i32* %6
%14 = icmp eq i32 62, %13
br i1 %14, label %15, label %40
15: ; preds = %12
%16 = load i32, i32* %7
%17 = icmp eq i32 47, %16
br i1 %17, label %18, label %24
18: ; preds = %15
%19 = call i32 @putchar(i32 10)
%20 = load i32, i32* %7
%21 = call i32 @putchar(i32 %20)
%22 = load i32, i32* %6
%23 = call i32 @putchar(i32 %22)
store i32 -1, i32* %7
br label %39
24: ; preds = %15
%25 = load i32, i32* %7
%26 = icmp ne i32 63, %25
br i1 %26, label %27, label %33
27: ; preds = %24
%28 = load i32, i32* %7
%29 = call i32 @putchar(i32 %28)
%30 = call i32 @putchar(i32 10)
%31 = load i32, i32* %6
%32 = call i32 @putchar(i32 %31)
store i32 -1, i32* %7
br label %38
33: ; preds = %24
%34 = load i32, i32* %7
%35 = call i32 @putchar(i32 %34)
%36 = load i32, i32* %6
%37 = call i32 @putchar(i32 %36)
store i32 -1, i32* %7
br label %38
38: ; preds = %33, %27
br label %39
39: ; preds = %38, %18
br label %48
40: ; preds = %12
%41 = load i32, i32* %7
%42 = icmp sge i32 %41, 0
br i1 %42, label %43, label %46
43: ; preds = %40
%44 = load i32, i32* %7
%45 = call i32 @putchar(i32 %44)
br label %46
46: ; preds = %43, %40
%47 = load i32, i32* %6
store i32 %47, i32* %7
br label %48
48: ; preds = %46, %39
br label %8
49: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @EOF
%4 = tail call i32 (...) @getchar()
%5 = icmp eq i32 %3, %4
br i1 %5, label %30, label %6
6: ; preds = %2, %25
%7 = phi i32 [ %28, %25 ], [ %4, %2 ]
%8 = phi i32 [ %26, %25 ], [ -1, %2 ]
%9 = icmp eq i32 %7, 62
br i1 %9, label %10, label %12
10: ; preds = %6
switch i32 %8, label %11 [
i32 47, label %14
i32 63, label %18
]
11: ; preds = %10
br label %14
12: ; preds = %6
%13 = icmp sgt i32 %8, -1
br i1 %13, label %21, label %25
14: ; preds = %10, %11
%15 = phi i32 [ %8, %11 ], [ 10, %10 ]
%16 = phi i32 [ 10, %11 ], [ %8, %10 ]
%17 = tail call i32 @putchar(i32 %15)
br label %18
18: ; preds = %14, %10
%19 = phi i32 [ %8, %10 ], [ %16, %14 ]
%20 = tail call i32 @putchar(i32 %19)
br label %21
21: ; preds = %18, %12
%22 = phi i32 [ %8, %12 ], [ 62, %18 ]
%23 = phi i32 [ %7, %12 ], [ -1, %18 ]
%24 = tail call i32 @putchar(i32 %22)
br label %25
25: ; preds = %21, %12
%26 = phi i32 [ %7, %12 ], [ %23, %21 ]
%27 = load i32, i32* @EOF
%28 = tail call i32 (...) @getchar()
%29 = icmp eq i32 %27, %28
br i1 %29, label %30, label %6
30: ; preds = %25, %2
ret i32 0
}