#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*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char let, oplet;
  int letnum, opletnum, help;
  do {
    scanf("%c", &let);
  } while (let > 'z' || let < 'a');
  letnum = let;
  help = letnum - 'a';
  opletnum = 'z' - help;
  oplet = opletnum;
  printf("%c", oplet);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x15(%rbp)
jg     115e <main+0x3e>
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
setl   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    112f <main+0xf>
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x61,%eax
mov    %eax,-0x14(%rbp)
mov    $0x7a,%eax
sub    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %al,-0x6(%rbp)
lea    0xe6f(%rip),%rdi
movsbl -0x6(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%r14
lea    0x7(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
movzbl 0x7(%rsp),%eax
lea    -0x7b(%rax),%ecx
cmp    $0xe6,%cl
jb     1130 <main+0x10>
mov    $0xdb,%cl
sub    %al,%cl
movsbl %cl,%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i8
br label %2
2: ; preds = %2, %0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = add i8 %4, -123
%6 = icmp ult i8 %5, -26
br i1 %6, label %2, label %7
7: ; preds = %2
%8 = sub nuw i8 -37, %4
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %8)
ret i32 0
}