#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 */
char EOF;
int /*<<< orphan*/ cdecl(char *, char *);
char getchar();
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main(void) {
  char in[1000], out[1000];
  char c;
  while (1) {
    strcpy(in, "");
    scanf("%[^\n]s", in);
    while ((c = getchar()) != EOF && c != '\n') {
    }
    if (!strcmp(in, ""))
      return 0;
    cdecl(in, out);
    printf("%s\n\n", out);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
lea    0xe8b(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x3f0(%rbp),%rsi
lea    0xe6d(%rip),%rdi
call   1080 <scanf@plt>
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %al,-0x7e1(%rbp)
movsbl %al,%ecx
mov    0x2e39(%rip),%rax
movsbl (%rax),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x7e2(%rbp)
je     11d5 <main+0x75>
movsbl -0x7e1(%rbp),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x7e2(%rbp)
mov    -0x7e2(%rbp),%al
test   $0x1,%al
jne    11e8 <main+0x88>
jmp    11ed <main+0x8d>
jmp    1198 <main+0x38>
lea    -0x3f0(%rbp),%rdi
lea    0xe10(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1214 <main+0xb4>
xor    %eax,%eax
add    $0x7f0,%rsp
pop    %rbp
ret
lea    -0x3f0(%rbp),%rdi
lea    -0x7e0(%rbp),%rsi
call   1070 <cdecl@plt>
lea    -0x7e0(%rbp),%rsi
lea    0xdd2(%rip),%rdi
call   1040 <printf@plt>
jmp    1172 <main+0x12>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x7d8,%rsp
lea    0xea3(%rip),%r14
mov    %rsp,%rbx
lea    0xe8e(%rip),%r15
mov    0x2e6f(%rip),%rbp
lea    0x3f0(%rsp),%r12
lea    0xe7f(%rip),%r13
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1070 <scanf@plt>
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0xa,%al
je     11c0 <main+0x70>
cmp    0x0(%rbp),%al
jne    11b0 <main+0x60>
cmpb   $0x0,(%rsp)
je     11de <main+0x8e>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1060 <cdecl@plt>
mov    %r13,%rdi
mov    %r12,%rsi
call   1040 <printf@plt>
jmp    1190 <main+0x40>
xor    %eax,%eax
add    $0x7d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [7 x i8] c"%[^\0A]s\00"
@EOF = global i8 0
@.str.2 = [5 x i8] c"%s\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
%3 = alloca [1000 x i8]
%4 = alloca i8
store i32 0, i32* %1
br label %5
5: ; preds = %0, %28
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%7 = call i32 @strcpy(i8* %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%8 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%9 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %22, %5
%11 = call signext i8 (...) @getchar()
store i8 %11, i8* %4
%12 = sext i8 %11 to i32
%13 = load i8, i8* @EOF
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %12, %14
br i1 %15, label %16, label %20
16: ; preds = %10
%17 = load i8, i8* %4
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 10
br label %20
20: ; preds = %16, %10
%21 = phi i1 [ false, %10 ], [ %19, %16 ]
br i1 %21, label %22, label %23
22: ; preds = %20
br label %10
23: ; preds = %20
%24 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%25 = call i32 @strcmp(i8* %24, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%26 = icmp ne i32 %25, 0
br i1 %26, label %28, label %27
27: ; preds = %23
ret i32 0
28: ; preds = %23
%29 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
%30 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%31 = call i32 @cdecl(i8* %29, i8* %30)
%32 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%33 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %32)
br label %5
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [7 x i8] c"%[^\0A]s\00"
@EOF = global i8 0
@.str.2 = [5 x i8] c"%s\0A\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = alloca [1000 x i8]
%3 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %2, i64 0, i64 0
br label %5
5: ; preds = %18, %0
%6 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %3)
br label %8
8: ; preds = %8, %5
%9 = call signext i8 (...) @getchar()
%10 = load i8, i8* @EOF
%11 = icmp ne i8 %9, %10
%12 = icmp ne i8 %9, 10
%13 = and i1 %12, %11
br i1 %13, label %8, label %14
14: ; preds = %8
%15 = load i8, i8* %3
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %14
ret i32 0
18: ; preds = %14
%19 = call i32 @cdecl(i8* %3, i8* %4)
%20 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %4)
br label %5
}