#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 /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
int main(void) {
  char s[1001];
  int a, b, n, i;
  while (1) {
    if (!(gets(s)))
      break;
    n = strlen(s);
    for (i = 0; i < n; i++) {
      if (s[i] != '\n')
        printf("%c", s[i] - 7);
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
call   1050 <gets@plt>
cmp    $0x0,%eax
jne    115c <main+0x2c>
jmp    11ee <main+0xbe>
lea    -0x3f0(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x3fc(%rbp)
movl   $0x0,-0x400(%rbp)
mov    -0x400(%rbp),%eax
cmp    -0x3fc(%rbp),%eax
jge    11db <main+0xab>
movslq -0x400(%rbp),%rax
movsbl -0x3f0(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
je     11c2 <main+0x92>
movslq -0x400(%rbp),%rax
movsbl -0x3f0(%rbp,%rax,1),%esi
ff
sub    $0x7,%esi
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11c7 <main+0x97>
mov    -0x400(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x400(%rbp)
jmp    1178 <main+0x48>
lea    0xe21(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1142 <main+0x12>
xor    %eax,%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x3f0,%rsp
mov    %rsp,%rdi
call   1050 <gets@plt>
test   %eax,%eax
je     119c <main+0x6c>
mov    %rsp,%r14
jmp    1166 <main+0x36>
nopl   (%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rdi
call   1050 <gets@plt>
test   %eax,%eax
je     119c <main+0x6c>
mov    %r14,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    1150 <main+0x20>
mov    %eax,%r15d
xor    %ebx,%ebx
jmp    1189 <main+0x59>
nopl   0x0(%rax)
add    $0x1,%rbx
cmp    %rbx,%r15
je     1150 <main+0x20>
movsbl (%rsp,%rbx,1),%edi
cmp    $0xa,%edi
je     1180 <main+0x50>
add    $0xfffffff9,%edi
call   1030 <putchar@plt>
jmp    1180 <main+0x50>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1001 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
br label %7
7: ; preds = %0, %38
%8 = getelementptr inbounds [1001 x i8], [1001 x i8]* %2, i64 0, i64 0
%9 = call i32 @gets(i8* %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %12, label %11
11: ; preds = %7
br label %40
12: ; preds = %7
%13 = getelementptr inbounds [1001 x i8], [1001 x i8]* %2, i64 0, i64 0
%14 = call i32 @strlen(i8* %13)
store i32 %14, i32* %5
store i32 0, i32* %6
br label %15
15: ; preds = %35, %12
%16 = load i32, i32* %6
%17 = load i32, i32* %5
%18 = icmp slt i32 %16, %17
br i1 %18, label %19, label %38
19: ; preds = %15
%20 = load i32, i32* %6
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [1001 x i8], [1001 x i8]* %2, i64 0, i64 %21
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 10
br i1 %25, label %26, label %34
26: ; preds = %19
%27 = load i32, i32* %6
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [1001 x i8], [1001 x i8]* %2, i64 0, i64 %28
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = sub nsw i32 %31, 7
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %32)
br label %34
34: ; preds = %26, %19
br label %35
35: ; preds = %34
%36 = load i32, i32* %6
%37 = add nsw i32 %36, 1
store i32 %37, i32* %6
br label %15
38: ; preds = %15
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %7
40: ; preds = %11
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1001 x i8]
%2 = getelementptr inbounds [1001 x i8], [1001 x i8]* %1, i64 0, i64 0
%3 = call i32 @gets(i8* %2)
%4 = icmp eq i32 %3, 0
br i1 %4, label %26, label %5
5: ; preds = %0, %22
%6 = call i32 @strlen(i8* %2)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %22
8: ; preds = %5
%9 = zext i32 %6 to i64
br label %10
10: ; preds = %8, %19
%11 = phi i64 [ 0, %8 ], [ %20, %19 ]
%12 = getelementptr inbounds [1001 x i8], [1001 x i8]* %1, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 10
br i1 %14, label %19, label %15
15: ; preds = %10
%16 = sext i8 %13 to i32
%17 = add nsw i32 %16, -7
%18 = call i32 @putchar(i32 %17)
br label %19
19: ; preds = %10, %15
%20 = add nuw nsw i64 %11, 1
%21 = icmp eq i64 %20, %9
br i1 %21, label %22, label %10
22: ; preds = %19, %5
%23 = call i32 @putchar(i32 10)
%24 = call i32 @gets(i8* %2)
%25 = icmp eq i32 %24, 0
br i1 %25, label %26, label %5
26: ; preds = %22, %0
ret i32 0
}