#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 */
char getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  char ch;
  char ch1 = 0;
  ch = getchar();
  if (ch >= 97 && ch <= 109) {
    ch1 = ch - 97;
    printf("%c", 122 - ch1);
  } else {
    ch1 = 122 - ch;
    printf("%c", 97 + ch1);
  };
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x0,-0x6(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x61,%eax
jl     117d <main+0x5d>
movsbl -0x5(%rbp),%eax
cmp    $0x6d,%eax
jg     117d <main+0x5d>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
mov    %al,-0x6(%rbp)
movsbl -0x6(%rbp),%eax
mov    $0x7a,%esi
sub    %eax,%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
jmp    119e <main+0x7e>
movsbl -0x5(%rbp),%ecx
mov    $0x7a,%eax
sub    %ecx,%eax
mov    %al,-0x6(%rbp)
movsbl -0x6(%rbp),%esi
add    $0x61,%esi
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <getchar@plt>
lea    -0x61(%rax),%ecx
cmp    $0xc,%cl
ja     113c <main+0x1c>
movzbl %cl,%eax
mov    $0x7a,%esi
sub    %eax,%esi
jmp    1146 <main+0x26>
mov    $0x7a,%cl
sub    %al,%cl
movsbl %cl,%esi
add    $0x61,%esi
lea    0xeb3(%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 i8
%3 = alloca i8
store i32 0, i32* %1
store i8 0, i8* %3
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp sge i32 %6, 97
br i1 %7, label %8, label %21
8: ; preds = %0
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, 109
br i1 %11, label %12, label %21
12: ; preds = %8
%13 = load i8, i8* %2
%14 = sext i8 %13 to i32
%15 = sub nsw i32 %14, 97
%16 = trunc i32 %15 to i8
store i8 %16, i8* %3
%17 = load i8, i8* %3
%18 = sext i8 %17 to i32
%19 = sub nsw i32 122, %18
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %19)
br label %30
21: ; preds = %8, %0
%22 = load i8, i8* %2
%23 = sext i8 %22 to i32
%24 = sub nsw i32 122, %23
%25 = trunc i32 %24 to i8
store i8 %25, i8* %3
%26 = load i8, i8* %3
%27 = sext i8 %26 to i32
%28 = add nsw i32 97, %27
%29 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %28)
br label %30
30: ; preds = %21, %12
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = add i8 %1, -97
%3 = icmp ult i8 %2, 13
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = zext i8 %2 to i32
%6 = sub nuw nsw i32 122, %5
br label %11
7: ; preds = %0
%8 = sub i8 122, %1
%9 = sext i8 %8 to i32
%10 = add nsw i32 %9, 97
br label %11
11: ; preds = %7, %4
%12 = phi i32 [ %10, %7 ], [ %6, %4 ]
%13 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %12)
ret i32 0
}