#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() {
  int q;
  char a, i, e;
  i = 'a';
  e = 'z';
  q = 0;
  scanf("%c", &a);
  while (i < a) {
    i = i + 1;
    q = q + 1;
  };
  e = e - q;
  printf("%c", e);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x61,-0xa(%rbp)
movb   $0x7a,-0xb(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xebb(%rip),%rdi
lea    -0x9(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0xa(%rbp),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
jge    1176 <main+0x56>
movsbl -0xa(%rbp),%eax
add    $0x1,%eax
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114e <main+0x2e>
movsbl -0xb(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %al,-0xb(%rbp)
lea    0xe79(%rip),%rdi
movsbl -0xb(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1040 <scanf@plt>
movsbl 0x7(%rsp),%eax
mov    $0x7a,%cl
cmp    $0x62,%eax
jl     115d <main+0x3d>
mov    $0x61,%edx
mov    $0x7a,%cl
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%dl
movsbl %dl,%edx
add    $0xff,%cl
cmp    %eax,%edx
jl     1150 <main+0x30>
movsbl %cl,%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
%5 = icmp sgt i8 %3, 97
br i1 %5, label %6, label %17
6: ; preds = %0, %6
%7 = phi i32 [ %12, %6 ], [ 97, %0 ]
%8 = phi i32 [ %9, %6 ], [ 0, %0 ]
%9 = add nuw nsw i32 %8, 1
%10 = shl nsw i32 %7, 24
%11 = add i32 %10, 16777216
%12 = ashr exact i32 %11, 24
%13 = icmp slt i32 %12, %4
br i1 %13, label %6, label %14
14: ; preds = %6
%15 = trunc i32 %9 to i8
%16 = sub i8 122, %15
br label %17
17: ; preds = %14, %0
%18 = phi i8 [ 122, %0 ], [ %16, %14 ]
%19 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %18)
ret i32 0
}