#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 */
typedef int /*<<< orphan*/ string;
typedef int /*<<< orphan*/ result;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void rot13() {
  int i;
  char string[] = "xrrJfvuGrgveJhbLqvQfznetbeClanZjbU";
  for (i = 0; string[i] != '\0'; i++) {
    if (('Z' - string[i] >= 13) ||
        (('z' - string[i] > 13) && ('z' - string[i] < 26))) {
      string[i] = string[i] + 13;
    } else {
      string[i] = string[i] - 13;
    }
  }
  int size = sizeof(string) / sizeof(string[0]) - 1;
  char result[size];
  for (i = 0; i < size; i++) {
    result[i] = string[size - (i + 1)];
  }
  printf("%s\n", result);
  int size2 = sizeof(result) / sizeof(result[0]);
  printf("%d", size);
}


x86 assembly (clang, -O0):
<rot13>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x30(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x23,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%eax
cmp    $0x0,%eax
je     11e5 <rot13+0xc5>
movslq -0x4(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%ecx
mov    $0x5a,%eax
sub    %ecx,%eax
cmp    $0xd,%eax
jge    11a1 <rot13+0x81>
movslq -0x4(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%ecx
mov    $0x7a,%eax
sub    %ecx,%eax
cmp    $0xd,%eax
jle    11bc <rot13+0x9c>
movslq -0x4(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%ecx
mov    $0x7a,%eax
sub    %ecx,%eax
cmp    $0x1a,%eax
jge    11bc <rot13+0x9c>
movslq -0x4(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%eax
add    $0xd,%eax
mov    %al,%cl
movslq -0x4(%rbp),%rax
mov    %cl,-0x30(%rbp,%rax,1)
jmp    11d2 <rot13+0xb2>
movslq -0x4(%rbp),%rax
movsbl -0x30(%rbp,%rax,1),%eax
sub    $0xd,%eax
mov    %al,%cl
movslq -0x4(%rbp),%rax
mov    %cl,-0x30(%rbp,%rax,1)
jmp    11d7 <rot13+0xb7>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1144 <rot13+0x24>
movl   $0x22,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    %rax,-0x60(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x40(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x58(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1254 <rot13+0x134>
mov    -0x58(%rbp),%rax
mov    -0x34(%rbp),%ecx
mov    -0x4(%rbp),%edx
add    $0x1,%edx
sub    %edx,%ecx
movslq %ecx,%rcx
mov    -0x30(%rbp,%rcx,1),%dl
movslq -0x4(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    121d <rot13+0xfd>
mov    -0x58(%rbp),%rsi
lea    0xdc4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x60(%rbp),%rax
shr    $0x0,%rax
mov    %eax,-0x4c(%rbp)
mov    -0x34(%rbp),%esi
lea    0xdac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x40(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot13>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x28,%rsp
movaps 0xee0(%rip),%xmm0
movaps %xmm0,-0x20(%rbp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,-0x30(%rbp)
movl   $0x55626a,-0x11(%rbp)
lea    -0x2f(%rbp),%rax
mov    $0x78,%cl
mov    $0xd,%esi
jmp    1176 <rot13+0x56>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    $0x4e,%cl
cmovl  %esi,%edx
add    %cl,%dl
mov    %dl,-0x1(%rax)
movzbl (%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
je     118b <rot13+0x6b>
lea    -0x61(%rcx),%edi
mov    $0xd,%edx
cmp    $0xc,%dil
jb     1160 <rot13+0x40>
mov    $0xf3,%edx
jmp    1160 <rot13+0x40>
mov    %rsp,%rbx
mov    %rsp,%rax
lea    -0x30(%rax),%rdi
mov    %rdi,%rsp
movdqu -0x1e(%rbp),%xmm0
pxor   %xmm1,%xmm1
movdqa %xmm0,%xmm2
punpcklbw %xmm1,%xmm2
pshufd $0x4e,%xmm2,%xmm2
pshuflw $0x1b,%xmm2,%xmm2
pshufhw $0x1b,%xmm2,%xmm2
punpckhbw %xmm1,%xmm0
pshufd $0x4e,%xmm0,%xmm0
pshuflw $0x1b,%xmm0,%xmm0
pshufhw $0x1b,%xmm0,%xmm0
packuswb %xmm2,%xmm0
movdqa %xmm0,-0x30(%rax)
movdqu -0x2e(%rbp),%xmm0
movdqa %xmm0,%xmm2
punpcklbw %xmm1,%xmm2
pshufd $0x4e,%xmm2,%xmm2
pshuflw $0x1b,%xmm2,%xmm2
pshufhw $0x1b,%xmm2,%xmm2
punpckhbw %xmm1,%xmm0
pshufd $0x4e,%xmm0,%xmm0
pshuflw $0x1b,%xmm0,%xmm0
pshufhw $0x1b,%xmm0,%xmm0
packuswb %xmm2,%xmm0
movdqa %xmm0,-0x20(%rax)
mov    -0x2f(%rbp),%cl
mov    %cl,-0x10(%rax)
mov    -0x30(%rbp),%cl
mov    %cl,-0xf(%rax)
call   1030 <puts@plt>
lea    0xdff(%rip),%rdi
mov    $0x22,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rsp
lea    -0x8(%rbp),%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@__const.rot13.string = [35 x i8] c"xrrJfvuGrgveJhbLqvQfznetbeClanZjbU\00"
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define void @rot13() {
%1 = alloca i32
%2 = alloca [35 x i8]
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
%7 = bitcast [35 x i8]* %2 to i8*
store i32 0, i32* %1
br label %8
8: ; preds = %62, %0
%9 = load i32, i32* %1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %65
15: ; preds = %8
%16 = load i32, i32* %1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = sub nsw i32 90, %20
%22 = icmp sge i32 %21, 13
br i1 %22, label %39, label %23
23: ; preds = %15
%24 = load i32, i32* %1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = sub nsw i32 122, %28
%30 = icmp sgt i32 %29, 13
br i1 %30, label %31, label %50
31: ; preds = %23
%32 = load i32, i32* %1
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 %33
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = sub nsw i32 122, %36
%38 = icmp slt i32 %37, 26
br i1 %38, label %39, label %50
39: ; preds = %31, %15
%40 = load i32, i32* %1
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 %41
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = add nsw i32 %44, 13
%46 = trunc i32 %45 to i8
%47 = load i32, i32* %1
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 %48
store i8 %46, i8* %49
br label %61
50: ; preds = %31, %23
%51 = load i32, i32* %1
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 %52
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = sub nsw i32 %55, 13
%57 = trunc i32 %56 to i8
%58 = load i32, i32* %1
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 %59
store i8 %57, i8* %60
br label %61
61: ; preds = %50, %39
br label %62
62: ; preds = %61
%63 = load i32, i32* %1
%64 = add nsw i32 %63, 1
store i32 %64, i32* %1
br label %8
65: ; preds = %8
store i32 34, i32* %3
%66 = load i32, i32* %3
%67 = zext i32 %66 to i64
%68 = call i8* @llvm.stacksave()
store i8* %68, i8** %4
%69 = alloca i8, i64 %67
store i64 %67, i64* %5
store i32 0, i32* %1
br label %70
70: ; preds = %85, %65
%71 = load i32, i32* %1
%72 = load i32, i32* %3
%73 = icmp slt i32 %71, %72
br i1 %73, label %74, label %88
74: ; preds = %70
%75 = load i32, i32* %3
%76 = load i32, i32* %1
%77 = add nsw i32 %76, 1
%78 = sub nsw i32 %75, %77
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 %79
%81 = load i8, i8* %80
%82 = load i32, i32* %1
%83 = sext i32 %82 to i64
%84 = getelementptr inbounds i8, i8* %69, i64 %83
store i8 %81, i8* %84
br label %85
85: ; preds = %74
%86 = load i32, i32* %1
%87 = add nsw i32 %86, 1
store i32 %87, i32* %1
br label %70
88: ; preds = %70
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %69)
%90 = udiv i64 %67, 1
%91 = trunc i64 %90 to i32
store i32 %91, i32* %6
%92 = load i32, i32* %3
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %92)
%94 = load i8*, i8** %4
ret void
}

LLVM IR (-O2):
@__const.rot13.string = [35 x i8] c"xrrJfvuGrgveJhbLqvQfznetbeClanZjbU\00"
@.str.1 = [3 x i8] c"%d\00"
define void @rot13() {
%1 = alloca [35 x i8]
%2 = getelementptr inbounds [35 x i8], [35 x i8]* %1, i64 0, i64 0
br label %3
3: ; preds = %0, %3
%4 = phi i64 [ 0, %0 ], [ %13, %3 ]
%5 = phi i8 [ 120, %0 ], [ %15, %3 ]
%6 = phi i8* [ %2, %0 ], [ %14, %3 ]
%7 = icmp slt i8 %5, 78
%8 = add i8 %5, -97
%9 = icmp ult i8 %8, 12
%10 = or i1 %7, %9
%11 = select i1 %10, i8 13, i8 -13
%12 = add i8 %5, %11
store i8 %12, i8* %6
%13 = add nuw nsw i64 %4, 1
%14 = getelementptr inbounds [35 x i8], [35 x i8]* %1, i64 0, i64 %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
br i1 %16, label %17, label %3
17: ; preds = %3
%18 = tail call i8* @llvm.stacksave()
%19 = alloca [34 x i8]
%20 = getelementptr inbounds [35 x i8], [35 x i8]* %1, i64 0, i64 18
%21 = bitcast i8* %20 to <16 x i8>*
%22 = load <16 x i8>, <16 x i8>* %21
%23 = shufflevector <16 x i8> %22, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
%24 = bitcast [34 x i8]* %19 to <16 x i8>*
store <16 x i8> %23, <16 x i8>* %24
%25 = getelementptr inbounds [35 x i8], [35 x i8]* %1, i64 0, i64 2
%26 = bitcast i8* %25 to <16 x i8>*
%27 = load <16 x i8>, <16 x i8>* %26
%28 = shufflevector <16 x i8> %27, <16 x i8> poison, <16 x i32> <i32 15, i32 14, i32 13, i32 12, i32 11, i32 10, i32 9, i32 8, i32 7, i32 6, i32 5, i32 4, i32 3, i32 2, i32 1, i32 0>
%29 = getelementptr inbounds [34 x i8], [34 x i8]* %19, i64 0, i64 16
%30 = bitcast i8* %29 to <16 x i8>*
store <16 x i8> %28, <16 x i8>* %30
%31 = getelementptr inbounds [35 x i8], [35 x i8]* %1, i64 0, i64 1
%32 = load i8, i8* %31
%33 = getelementptr inbounds [34 x i8], [34 x i8]* %19, i64 0, i64 32
store i8 %32, i8* %33
%34 = getelementptr inbounds [35 x i8], [35 x i8]* %1, i64 0, i64 0
%35 = load i8, i8* %34
%36 = getelementptr inbounds [34 x i8], [34 x i8]* %19, i64 0, i64 33
store i8 %35, i8* %36
%37 = getelementptr inbounds [34 x i8], [34 x i8]* %19, i64 0, i64 0
%38 = call i32 @puts(i8* %37)
%39 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 34)
tail call void @llvm.stackrestore(i8* %18)
ret void
}