#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 *);
int strcmp(char *, char *);
int strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
void shift_cipher(char message[]) {
  char *letters[] = {"a", "b", "c", "d", "e", "f", "g", "h", "i",
                     "j", "k", "l", "m", "n", "o", "p", "q", "r",
                     "s", "t", "u", "v", "w", "x", "y", "z"};
  int i;
  int j;
  for (j = 0; j < (strlen(message) - 1); j++) {
    char message_char = message[j];
    int shifted_found = 0;
    for (i = 0; i < 26; i++) {
      if (shifted_found)
        break;
      int result = strcmp(&message_char, letters[i]);
      if (!strncmp(&message_char, letters[i], 1)) {
        int shifted_index = (i + 1) % 26;
        message[j] = *letters[shifted_index];
        shifted_found = 1;
        break;
      } else if ((i + 1) == 26) {
      }
    }
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<shift_cipher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xe0(%rbp),%rdi
lea    0x2be3(%rip),%rsi
mov    $0xd0,%edx
call   1070 <memcpy@plt>
movl   $0x0,-0xe8(%rbp)
mov    -0xe8(%rbp),%eax
mov    %eax,-0xfc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0xfc(%rbp),%eax
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    12cd <shift_cipher+0x17d>
mov    -0x8(%rbp),%rax
movslq -0xe8(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0xe9(%rbp)
movl   $0x0,-0xf0(%rbp)
movl   $0x0,-0xe4(%rbp)
cmpl   $0x1a,-0xe4(%rbp)
jge    12b4 <shift_cipher+0x164>
cmpl   $0x0,-0xf0(%rbp)
je     11f0 <shift_cipher+0xa0>
jmp    12b4 <shift_cipher+0x164>
movslq -0xe4(%rbp),%rax
mov    -0xe0(%rbp,%rax,8),%rsi
ff
lea    -0xe9(%rbp),%rdi
call   1060 <strcmp@plt>
mov    %eax,-0xf4(%rbp)
movslq -0xe4(%rbp),%rax
mov    -0xe0(%rbp,%rax,8),%rsi
ff
lea    -0xe9(%rbp),%rdi
mov    $0x1,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    127f <shift_cipher+0x12f>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    $0x1a,%ecx
cltd
idiv   %ecx
mov    %edx,-0xf8(%rbp)
movslq -0xf8(%rbp),%rax
mov    -0xe0(%rbp,%rax,8),%rax
ff
mov    (%rax),%dl
mov    -0x8(%rbp),%rax
movslq -0xe8(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
movl   $0x1,-0xf0(%rbp)
jmp    12b4 <shift_cipher+0x164>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
cmp    $0x1a,%eax
jne    1296 <shift_cipher+0x146>
jmp    1296 <shift_cipher+0x146>
jmp    129b <shift_cipher+0x14b>
jmp    12a0 <shift_cipher+0x150>
mov    -0xe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe4(%rbp)
jmp    11d1 <shift_cipher+0x81>
jmp    12b9 <shift_cipher+0x169>
mov    -0xe8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xe8(%rbp)
jmp    1181 <shift_cipher+0x31>
lea    0xd60(%rip),%rdi
call   1050 <printf@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift_cipher>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdi,%rbx
call   1050 <strlen@plt>
cmp    $0x2,%eax
jl     11fc <shift_cipher+0xcc>
xor    %r12d,%r12d
lea    0x2bf7(%rip),%rbp
lea    0xf(%rsp),%r15
mov    %rbx,0x10(%rsp)
jmp    11b6 <shift_cipher+0x86>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rax
movabs $0x4ec4ec4ec4ec4ec5,%rcx
ec c4 4e
mul    %rcx
shr    $0x3,%rdx
imul   $0xffffffffffffff30,%rdx,%rax
mov    0x0(%r13,%rax,1),%rax
mov    (%rax),%al
mov    0x10(%rsp),%rcx
mov    %al,(%rcx,%r12,1)
add    $0x1,%r12
mov    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
add    $0xffffffff,%eax
cltq
cmp    %rax,%r12
jge    11fc <shift_cipher+0xcc>
mov    (%rbx,%r12,1),%al
mov    %al,0xf(%rsp)
mov    $0x1,%ebx
xor    %r14d,%r14d
lea    0x2b8b(%rip),%r13
nopl   (%rax)
mov    (%r14,%rbp,1),%rsi
mov    %r15,%rdi
mov    $0x1,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     1170 <shift_cipher+0x40>
add    $0x8,%r13
add    $0x1,%rbx
add    $0x8,%r14
cmp    $0xd0,%r14
jne    11d0 <shift_cipher+0xa0>
jmp    119b <shift_cipher+0x6b>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
@.str.2 = [2 x i8] c"c\00"
@.str.3 = [2 x i8] c"d\00"
@.str.4 = [2 x i8] c"e\00"
@.str.5 = [2 x i8] c"f\00"
@.str.6 = [2 x i8] c"g\00"
@.str.7 = [2 x i8] c"h\00"
@.str.8 = [2 x i8] c"i\00"
@.str.9 = [2 x i8] c"j\00"
@.str.10 = [2 x i8] c"k\00"
@.str.11 = [2 x i8] c"l\00"
@.str.12 = [2 x i8] c"m\00"
@.str.13 = [2 x i8] c"n\00"
@.str.14 = [2 x i8] c"o\00"
@.str.15 = [2 x i8] c"p\00"
@.str.16 = [2 x i8] c"q\00"
@.str.17 = [2 x i8] c"r\00"
@.str.18 = [2 x i8] c"s\00"
@.str.19 = [2 x i8] c"t\00"
@.str.20 = [2 x i8] c"u\00"
@.str.21 = [2 x i8] c"v\00"
@.str.22 = [2 x i8] c"w\00"
@.str.23 = [2 x i8] c"x\00"
@.str.24 = [2 x i8] c"y\00"
@.str.25 = [2 x i8] c"z\00"
@__const.shift_cipher.letters = [26 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i32 0, i32 0)]
@.str.26 = [2 x i8] c"\0A\00"
define void @shift_cipher(i8* %0) {
%2 = alloca i8*
%3 = alloca [26 x i8*]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %2
%10 = bitcast [26 x i8*]* %3 to i8*
store i32 0, i32* %5
br label %11
11: ; preds = %66, %1
%12 = load i32, i32* %5
%13 = load i8*, i8** %2
%14 = call i32 @strlen(i8* %13)
%15 = sub nsw i32 %14, 1
%16 = icmp slt i32 %12, %15
br i1 %16, label %17, label %69
17: ; preds = %11
%18 = load i8*, i8** %2
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %18, i64 %20
%22 = load i8, i8* %21
store i8 %22, i8* %6
store i32 0, i32* %7
store i32 0, i32* %4
br label %23
23: ; preds = %62, %17
%24 = load i32, i32* %4
%25 = icmp slt i32 %24, 26
br i1 %25, label %26, label %65
26: ; preds = %23
%27 = load i32, i32* %7
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %30
29: ; preds = %26
br label %65
30: ; preds = %26
%31 = load i32, i32* %4
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [26 x i8*], [26 x i8*]* %3, i64 0, i64 %32
%34 = load i8*, i8** %33
%35 = call i32 @strcmp(i8* %6, i8* %34)
store i32 %35, i32* %8
%36 = load i32, i32* %4
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [26 x i8*], [26 x i8*]* %3, i64 0, i64 %37
%39 = load i8*, i8** %38
%40 = call i32 @strncmp(i8* %6, i8* %39, i32 1)
%41 = icmp ne i32 %40, 0
br i1 %41, label %55, label %42
42: ; preds = %30
%43 = load i32, i32* %4
%44 = add nsw i32 %43, 1
%45 = srem i32 %44, 26
store i32 %45, i32* %9
%46 = load i32, i32* %9
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds [26 x i8*], [26 x i8*]* %3, i64 0, i64 %47
%49 = load i8*, i8** %48
%50 = load i8, i8* %49
%51 = load i8*, i8** %2
%52 = load i32, i32* %5
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i8, i8* %51, i64 %53
store i8 %50, i8* %54
store i32 1, i32* %7
br label %65
55: ; preds = %30
%56 = load i32, i32* %4
%57 = add nsw i32 %56, 1
%58 = icmp eq i32 %57, 26
br i1 %58, label %59, label %60
59: ; preds = %55
br label %60
60: ; preds = %59, %55
br label %61
61: ; preds = %60
br label %62
62: ; preds = %61
%63 = load i32, i32* %4
%64 = add nsw i32 %63, 1
store i32 %64, i32* %4
br label %23
65: ; preds = %42, %29, %23
br label %66
66: ; preds = %65
%67 = load i32, i32* %5
%68 = add nsw i32 %67, 1
store i32 %68, i32* %5
br label %11
69: ; preds = %11
%70 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.26, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
@.str.1 = [2 x i8] c"b\00"
@.str.2 = [2 x i8] c"c\00"
@.str.3 = [2 x i8] c"d\00"
@.str.4 = [2 x i8] c"e\00"
@.str.5 = [2 x i8] c"f\00"
@.str.6 = [2 x i8] c"g\00"
@.str.7 = [2 x i8] c"h\00"
@.str.8 = [2 x i8] c"i\00"
@.str.9 = [2 x i8] c"j\00"
@.str.10 = [2 x i8] c"k\00"
@.str.11 = [2 x i8] c"l\00"
@.str.12 = [2 x i8] c"m\00"
@.str.13 = [2 x i8] c"n\00"
@.str.14 = [2 x i8] c"o\00"
@.str.15 = [2 x i8] c"p\00"
@.str.16 = [2 x i8] c"q\00"
@.str.17 = [2 x i8] c"r\00"
@.str.18 = [2 x i8] c"s\00"
@.str.19 = [2 x i8] c"t\00"
@.str.20 = [2 x i8] c"u\00"
@.str.21 = [2 x i8] c"v\00"
@.str.22 = [2 x i8] c"w\00"
@.str.23 = [2 x i8] c"x\00"
@.str.24 = [2 x i8] c"y\00"
@.str.25 = [2 x i8] c"z\00"
@__const.shift_cipher.letters = [26 x i8*] [i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.12, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.18, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.20, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.21, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.22, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.24, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.25, i32 0, i32 0)]
define void @shift_cipher(i8* %0) {
%2 = alloca i8
%3 = call i32 @strlen(i8* %0)
%4 = icmp sgt i32 %3, 1
br i1 %4, label %5, label %32
5: ; preds = %1, %26
%6 = phi i64 [ %27, %26 ], [ 0, %1 ]
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
store i8 %8, i8* %2
br label %9
9: ; preds = %5, %23
%10 = phi i64 [ 0, %5 ], [ %24, %23 ]
%11 = getelementptr inbounds [26 x i8*], [26 x i8*]* @__const.shift_cipher.letters, i64 0, i64 %10
%12 = load i8*, i8** %11
%13 = call i32 @strncmp(i8* %2, i8* %12, i32 1)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %23
15: ; preds = %9
%16 = trunc i64 %10 to i8
%17 = add i8 %16, 1
%18 = urem i8 %17, 26
%19 = zext i8 %18 to i64
%20 = getelementptr inbounds [26 x i8*], [26 x i8*]* @__const.shift_cipher.letters, i64 0, i64 %19
%21 = load i8*, i8** %20
%22 = load i8, i8* %21
store i8 %22, i8* %7
br label %26
23: ; preds = %9
%24 = add nuw nsw i64 %10, 1
%25 = icmp eq i64 %24, 26
br i1 %25, label %26, label %9
26: ; preds = %23, %15
%27 = add nuw nsw i64 %6, 1
%28 = call i32 @strlen(i8* %0)
%29 = add nsw i32 %28, -1
%30 = sext i32 %29 to i64
%31 = icmp slt i64 %27, %30
br i1 %31, label %5, label %32
32: ; preds = %26, %1
%33 = call i32 @putchar(i32 10)
ret void
}