#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ stdin;
int main() {
  char str[101];
  fgets(str, 100, stdin);
  for (int i = 0; str[i] && str[i] != '\n'; i++)
    printf("%c", str[i] + 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1040 <fgets@plt>
movl   $0x0,-0x74(%rbp)
movslq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x75(%rbp)
je     1179 <main+0x59>
movslq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x75(%rbp)
mov    -0x75(%rbp),%al
test   $0x1,%al
jne    1189 <main+0x69>
jmp    11b2 <main+0x92>
movslq -0x74(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
add    $0x1,%eax
lea    0xe64(%rip),%rdi
movsbl %al,%esi
call   1030 <printf@plt>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1150 <main+0x30>
mov    -0x4(%rbp),%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1040 <fgets@plt>
lea    0xeb9(%rip),%r14
nopw   0x0(%rax,%rax,1)
movzbl (%rbx),%eax
cmp    $0xa,%al
je     116e <main+0x4e>
test   %al,%al
je     116e <main+0x4e>
add    $0x1,%al
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
jmp    1150 <main+0x30>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@stdin = global i32 0
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca [101 x i8]
%2 = getelementptr inbounds [101 x i8], [101 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @stdin
%4 = call i32 @fgets(i8* %2, i32 100, i32 %3)
br label %5
5: ; preds = %10, %0
%6 = phi i64 [ %13, %10 ], [ 0, %0 ]
%7 = getelementptr inbounds [101 x i8], [101 x i8]* %1, i64 0, i64 %6
%8 = load i8, i8* %7
switch i8 %8, label %10 [
i8 0, label %9
i8 10, label %9
]
9: ; preds = %5, %5
ret i32 0
10: ; preds = %5
%11 = add i8 %8, 1
%12 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %11)
%13 = add nuw i64 %6, 1
br label %5
}