#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 strlen(char const *);
char get_symmetric_letter(char input) {
  const char alphabet[26] = "abcdefghijklmnopqrstuvwxyz";
  int index_of_input = 0;
  for (int i = 0; i < strlen(alphabet); i++) {
    if (alphabet[i] == input) {
      index_of_input = i;
      break;
    }
  }
  return alphabet[26 - 1 - index_of_input];
}


x86 assembly (clang, -O0):
<get_symmetric_letter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed8(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed5(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed2(%rip),%ax
mov    %ax,-0x8(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x2c(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
cmp    %ecx,%eax
jge    11a7 <get_symmetric_letter+0x97>
movslq -0x28(%rbp),%rax
movsbl -0x20(%rbp,%rax,1),%eax
movsbl -0x1(%rbp),%ecx
cmp    %ecx,%eax
jne    1194 <get_symmetric_letter+0x84>
mov    -0x28(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    11a7 <get_symmetric_letter+0x97>
jmp    1199 <get_symmetric_letter+0x89>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1158 <get_symmetric_letter+0x48>
mov    $0x19,%eax
sub    -0x24(%rbp),%eax
cltq
movsbl -0x20(%rbp,%rax,1),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_symmetric_letter>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %edi,%ebp
movups 0xee9(%rip),%xmm0
movups %xmm0,0xa(%rsp)
movaps 0xed3(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <strlen@plt>
test   %eax,%eax
jle    1169 <get_symmetric_letter+0x59>
mov    %rsp,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    %bpl,(%rsp,%rbx,1)
je     116b <get_symmetric_letter+0x5b>
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1150 <get_symmetric_letter+0x40>
xor    %ebx,%ebx
shl    $0x20,%rbx
movabs $0x1900000000,%rax
sub    %rbx,%rax
sar    $0x20,%rax
mov    (%rsp,%rax,1),%al
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@__const.get_symmetric_letter.alphabet = [26 x i8] c"abcdefghijklmnopqrstuvwxyz"
define signext i8 @get_symmetric_letter(i8 signext %0) {
%2 = alloca i8
%3 = alloca [26 x i8]
%4 = alloca i32
%5 = alloca i32
store i8 %0, i8* %2
%6 = bitcast [26 x i8]* %3 to i8*
store i32 0, i32* %4
store i32 0, i32* %5
br label %7
7: ; preds = %24, %1
%8 = load i32, i32* %5
%9 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 0
%10 = call i32 @strlen(i8* %9)
%11 = icmp slt i32 %8, %10
br i1 %11, label %12, label %27
12: ; preds = %7
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %17, %19
br i1 %20, label %21, label %23
21: ; preds = %12
%22 = load i32, i32* %5
store i32 %22, i32* %4
br label %27
23: ; preds = %12
br label %24
24: ; preds = %23
%25 = load i32, i32* %5
%26 = add nsw i32 %25, 1
store i32 %26, i32* %5
br label %7
27: ; preds = %21, %7
%28 = load i32, i32* %4
%29 = sub nsw i32 25, %28
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [26 x i8], [26 x i8]* %3, i64 0, i64 %30
%32 = load i8, i8* %31
ret i8 %32
}

LLVM IR (-O2):
@__const.get_symmetric_letter.alphabet = [26 x i8] c"abcdefghijklmnopqrstuvwxyz"
define signext i8 @get_symmetric_letter(i8 signext %0) {
%2 = alloca [26 x i8]
%3 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 0
%4 = call i32 @strlen(i8* %3)
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %16
6: ; preds = %1, %11
%7 = phi i64 [ %12, %11 ], [ 0, %1 ]
%8 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, %0
br i1 %10, label %16, label %11
11: ; preds = %6
%12 = add nuw nsw i64 %7, 1
%13 = call i32 @strlen(i8* %3)
%14 = sext i32 %13 to i64
%15 = icmp slt i64 %12, %14
br i1 %15, label %6, label %16
16: ; preds = %11, %6, %1
%17 = phi i64 [ 0, %1 ], [ %7, %6 ], [ 0, %11 ]
%18 = mul i64 %17, -4294967296
%19 = add i64 %18, 107374182400
%20 = ashr exact i64 %19, 32
%21 = getelementptr inbounds [26 x i8], [26 x i8]* %2, i64 0, i64 %20
%22 = load i8, i8* %21
ret i8 %22
}