#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 EOF;
int getc(int /*<<< orphan*/);
scalar_t__ isalpha(int);
int /*<<< orphan*/ putc(int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  int c = 0;
  while ((c = getc(stdin)) != EOF) {
    if (isalpha(c)) {
      c += 13;
      if (((c - 13 <= 'Z') && (c > 'Z')) || (c > 'z'))
        c -= 26;
    }
    putc(c, stdout);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1050 <getc@plt>
mov    %eax,-0x14(%rbp)
mov    0x2e7b(%rip),%rcx
cmp    (%rcx),%eax
je     11cf <main+0x9f>
mov    -0x14(%rbp),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
je     11b9 <main+0x89>
mov    -0x14(%rbp),%eax
add    $0xd,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
sub    $0xd,%eax
cmp    $0x5a,%eax
jg     11a1 <main+0x71>
cmpl   $0x5a,-0x14(%rbp)
jg     11ab <main+0x7b>
cmpl   $0x7a,-0x14(%rbp)
jle    11b4 <main+0x84>
mov    -0x14(%rbp),%eax
sub    $0x1a,%eax
mov    %eax,-0x14(%rbp)
jmp    11b9 <main+0x89>
mov    -0x14(%rbp),%edi
mov    0x2e0d(%rip),%rax
mov    (%rax),%esi
call   1030 <putc@plt>
jmp    114d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    0x2ea9(%rip),%r14
mov    (%r14),%edi
call   1050 <getc@plt>
mov    0x2e92(%rip),%r15
cmp    (%r15),%eax
jne    115e <main+0x2e>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %eax,%ebx
mov    0x2e69(%rip),%r12
mov    $0xfffffff3,%ebp
jmp    118a <main+0x5a>
xchg   %ax,%ax
mov    (%r12),%esi
mov    %ebx,%edi
call   1030 <putc@plt>
mov    (%r14),%edi
call   1050 <getc@plt>
mov    %eax,%ebx
cmp    (%r15),%eax
je     1153 <main+0x23>
mov    %ebx,%edi
call   1040 <isalpha@plt>
test   %rax,%rax
je     1170 <main+0x40>
lea    -0x4e(%rbx),%eax
cmp    $0xd,%eax
mov    $0xd,%eax
cmovb  %ebp,%eax
cmp    $0x6e,%ebx
cmovge %ebp,%eax
add    %ebx,%eax
mov    %eax,%ebx
jmp    1170 <main+0x40>

LLVM IR (-O0):
@stdin = global i32 0
@EOF = global i32 0
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
br label %7
7: ; preds = %32, %2
%8 = load i32, i32* @stdin
%9 = call i32 @getc(i32 %8)
store i32 %9, i32* %6
%10 = load i32, i32* @EOF
%11 = icmp ne i32 %9, %10
br i1 %11, label %12, label %36
12: ; preds = %7
%13 = load i32, i32* %6
%14 = call i64 @isalpha(i32 %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %32
16: ; preds = %12
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 13
store i32 %18, i32* %6
%19 = load i32, i32* %6
%20 = sub nsw i32 %19, 13
%21 = icmp sle i32 %20, 90
br i1 %21, label %22, label %25
22: ; preds = %16
%23 = load i32, i32* %6
%24 = icmp sgt i32 %23, 90
br i1 %24, label %28, label %25
25: ; preds = %22, %16
%26 = load i32, i32* %6
%27 = icmp sgt i32 %26, 122
br i1 %27, label %28, label %31
28: ; preds = %25, %22
%29 = load i32, i32* %6
%30 = sub nsw i32 %29, 26
store i32 %30, i32* %6
br label %31
31: ; preds = %28, %25
br label %32
32: ; preds = %31, %12
%33 = load i32, i32* %6
%34 = load i32, i32* @stdout
%35 = call i32 @putc(i32 %33, i32 %34)
br label %7
36: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
@EOF = global i32 0
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdin
%4 = tail call i32 @getc(i32 %3)
%5 = load i32, i32* @EOF
%6 = icmp eq i32 %4, %5
br i1 %6, label %26, label %7
7: ; preds = %2, %18
%8 = phi i32 [ %23, %18 ], [ %4, %2 ]
%9 = tail call i64 @isalpha(i32 %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %18, label %11
11: ; preds = %7
%12 = add i32 %8, -78
%13 = icmp ult i32 %12, 13
%14 = icmp sgt i32 %8, 109
%15 = or i1 %14, %13
%16 = select i1 %15, i32 -13, i32 13
%17 = add nsw i32 %16, %8
br label %18
18: ; preds = %11, %7
%19 = phi i32 [ %8, %7 ], [ %17, %11 ]
%20 = load i32, i32* @stdout
%21 = tail call i32 @putc(i32 %19, i32 %20)
%22 = load i32, i32* @stdin
%23 = tail call i32 @getc(i32 %22)
%24 = load i32, i32* @EOF
%25 = icmp eq i32 %23, %24
br i1 %25, label %26, label %7
26: ; preds = %18, %2
ret i32 0
}