#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 *, char *);
int main(void) {
  char line[1000000 + 1];
  int ind;
  while (gets(line) != NULL) {
    for (ind = 0; line[ind] != '\0'; ind++)
      line[ind] -= 7;
    printf("%s\n", line);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf4260,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xf4250(%rbp),%rdi
call   1040 <gets@plt>
cmp    $0x0,%rax
je     11af <main+0x8f>
movl   $0x0,-0xf4254(%rbp)
movslq -0xf4254(%rbp),%rax
movsbl -0xf4250(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     1197 <main+0x77>
movslq -0xf4254(%rbp),%rax
movsbl -0xf4250(%rbp,%rax,1),%ecx
ff
sub    $0x7,%ecx
mov    %cl,-0xf4250(%rbp,%rax,1)
mov    -0xf4254(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4254(%rbp)
jmp    1152 <main+0x32>
lea    -0xf4250(%rbp),%rsi
lea    0xe5b(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0xf4260,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0xf4250,%rsp
mov    %rsp,%rdi
call   1040 <gets@plt>
test   %rax,%rax
je     1192 <main+0x72>
lea    0x1(%rsp),%r15
lea    0xebb(%rip),%r14
mov    %rsp,%rbx
jmp    1168 <main+0x48>
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <gets@plt>
test   %rax,%rax
je     1192 <main+0x72>
mov    (%rsp),%al
test   %al,%al
je     1150 <main+0x30>
mov    %r15,%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0xf9,%al
mov    %al,-0x1(%rcx)
movzbl (%rcx),%eax
add    $0x1,%rcx
test   %al,%al
jne    1180 <main+0x60>
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0xf4250,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [1000001 x i8]
%2 = getelementptr inbounds [1000001 x i8], [1000001 x i8]* %1, i64 0, i64 0
%3 = call i32* @gets(i8* %2)
%4 = icmp eq i32* %3, null
br i1 %4, label %21, label %5
5: ; preds = %0, %17
%6 = load i8, i8* %2
%7 = icmp eq i8 %6, 0
br i1 %7, label %17, label %8
8: ; preds = %5, %8
%9 = phi i64 [ %13, %8 ], [ 0, %5 ]
%10 = phi i8 [ %15, %8 ], [ %6, %5 ]
%11 = phi i8* [ %14, %8 ], [ %2, %5 ]
%12 = add i8 %10, -7
store i8 %12, i8* %11
%13 = add nuw nsw i64 %9, 1
%14 = getelementptr inbounds [1000001 x i8], [1000001 x i8]* %1, i64 0, i64 %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %8
17: ; preds = %8, %5
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%19 = call i32* @gets(i8* %2)
%20 = icmp eq i32* %19, null
br i1 %20, label %21, label %5
21: ; preds = %17, %0
ret i32 0
}