#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[]) {
  int c;
  while ((c = getchar()) != EOF) {
    if (c < '!' || c > '~') {
      putchar('\n');
    } else {
      if (c != '\n') {
        putchar(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)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     118e <main+0x6e>
cmpl   $0x21,-0x14(%rbp)
jl     1163 <main+0x43>
cmpl   $0x7e,-0x14(%rbp)
jle    1172 <main+0x52>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1189 <main+0x69>
cmpl   $0xa,-0x14(%rbp)
je     1184 <main+0x64>
mov    -0x14(%rbp),%edi
call   1030 <putchar@plt>
jmp    1189 <main+0x69>
jmp    1136 <main+0x16>
xor    %eax,%eax
add    $0x20,%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
je     115b <main+0x3b>
mov    $0xa,%ebp
nopw   0x0(%rax,%rax,1)
lea    -0x7f(%rax),%ecx
cmp    $0xffffffa2,%ecx
cmovb  %ebp,%eax
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %26, %2
%8 = call i32 (...) @getchar()
store i32 %8, i32* %6
%9 = load i32, i32* @EOF
%10 = icmp ne i32 %8, %9
br i1 %10, label %11, label %27
11: ; preds = %7
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 33
br i1 %13, label %17, label %14
14: ; preds = %11
%15 = load i32, i32* %6
%16 = icmp sgt i32 %15, 126
br i1 %16, label %17, label %19
17: ; preds = %14, %11
%18 = call i32 @putchar(i32 10)
br label %26
19: ; preds = %14
%20 = load i32, i32* %6
%21 = icmp ne i32 %20, 10
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i32, i32* %6
%24 = call i32 @putchar(i32 %23)
br label %25
25: ; preds = %22, %19
br label %26
26: ; preds = %25, %17
br label %7
27: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %15, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %12, %6 ], [ %3, %2 ]
%8 = add i32 %7, -127
%9 = icmp ult i32 %8, -94
%10 = select i1 %9, i32 10, i32 %7
%11 = tail call i32 @putchar(i32 %10)
%12 = tail call i32 (...) @getchar()
%13 = load i32, i32* @EOF
%14 = icmp eq i32 %12, %13
br i1 %14, label %15, label %6
15: ; preds = %6, %2
ret i32 0
}