#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 */
unsigned int EOF;
unsigned int getchar();
int /*<<< orphan*/ putchar(unsigned int);
main() {
  unsigned int c;
  int first_character = 1;
  while (1) {
    c = getchar();
    if (c == EOF)
      break;
    if (first_character) {
      if (c == 12) {
        first_character = 0;
        continue;
      }
    }
    putchar(c);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%eax
jne    1157 <main+0x37>
jmp    1189 <main+0x69>
cmpl   $0x0,-0xc(%rbp)
je     117c <main+0x5c>
cmpl   $0xc,-0x8(%rbp)
jne    1177 <main+0x57>
movl   $0x0,-0xc(%rbp)
jmp    1136 <main+0x16>
jmp    117c <main+0x5c>
mov    -0x8(%rbp),%edi
call   1030 <putchar@plt>
jmp    1136 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb7(%rip),%rbx
cmp    (%rbx),%eax
jne    113e <main+0x1e>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    $0x1,%bpl
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmp    $0xc,%eax
sete   %cl
test   %cl,%bpl
jne    116f <main+0x4f>
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1150 <main+0x30>
jmp    1135 <main+0x15>
xor    %ebp,%ebp
jmp    1162 <main+0x42>

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

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 %20, label %8
4: ; preds = %11
%5 = tail call i32 (...) @getchar()
%6 = load i32, i32* @EOF
%7 = icmp eq i32 %5, %6
br i1 %7, label %20, label %8
8: ; preds = %0, %4
%9 = phi i32 [ %5, %4 ], [ %1, %0 ]
%10 = phi i1 [ false, %4 ], [ true, %0 ]
br label %11
11: ; preds = %8, %15
%12 = phi i32 [ %9, %8 ], [ %17, %15 ]
%13 = icmp eq i32 %12, 12
%14 = and i1 %10, %13
br i1 %14, label %4, label %15
15: ; preds = %11
%16 = tail call i32 @putchar(i32 %12)
%17 = tail call i32 (...) @getchar()
%18 = load i32, i32* @EOF
%19 = icmp eq i32 %17, %18
br i1 %19, label %20, label %11
20: ; preds = %4, %15, %0
ret i32 0
}