#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*/ encryptDecrypt(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
int strlen(char *);
int main(int argc, char *argv[]) {
  char baseStr[] = "kylewbanks.com";
  char encrypted[strlen(baseStr)];
  encryptDecrypt(baseStr, encrypted);
  printf("Encrypted:%s\n", encrypted);
  char decrypted[strlen(baseStr)];
  encryptDecrypt(encrypted, decrypted);
  printf("Decrypted:%s\n", decrypted);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movabs $0x6d6f632e736b6e,%rax
mov    %rax,-0x19(%rbp)
movabs $0x6e616277656c796b,%rax
62 61 6e
mov    %rax,-0x20(%rbp)
lea    -0x20(%rbp),%rdi
mov    %rdi,-0x50(%rbp)
call   1040 <strlen@plt>
mov    -0x50(%rbp),%rdi
mov    %eax,%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,-0x48(%rbp)
mov    %rsi,%rsp
mov    %rax,-0x30(%rbp)
call   1030 <encryptDecrypt@plt>
mov    -0x48(%rbp),%rsi
lea    0xe6e(%rip),%rdi
call   1050 <printf@plt>
mov    -0x50(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x48(%rbp),%rdi
mov    %eax,%eax
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rsi
sub    %rcx,%rsi
mov    %rsi,-0x40(%rbp)
mov    %rsi,%rsp
mov    %rax,-0x38(%rbp)
call   1030 <encryptDecrypt@plt>
mov    -0x40(%rbp),%rsi
lea    0xe3c(%rip),%rdi
call   1050 <printf@plt>
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
movabs $0x6d6f632e736b6e,%rax
mov    %rax,-0x29(%rbp)
movabs $0x6e616277656c796b,%rax
62 61 6e
mov    %rax,-0x30(%rbp)
lea    -0x30(%rbp),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %rsp,%r12
mov    %eax,%eax
mov    %rsp,%r15
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r15
mov    %r15,%rsp
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <encryptDecrypt@plt>
lea    0xe80(%rip),%rdi
mov    %r15,%rsi
call   1050 <printf@plt>
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %eax,%eax
mov    %rsp,%rbx
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <encryptDecrypt@plt>
lea    0xe59(%rip),%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
mov    %r12,%rsp
xor    %eax,%eax
lea    -0x20(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.baseStr = [15 x i8] c"kylewbanks.com\00"
@.str = [14 x i8] c"Encrypted:%s\0A\00"
@.str.1 = [14 x i8] c"Decrypted:%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [15 x i8]
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
store i32 %0, i32* %3
store i8** %1, i8*** %4
%9 = bitcast [15 x i8]* %5 to i8*
%10 = getelementptr inbounds [15 x i8], [15 x i8]* %5, i64 0, i64 0
%11 = call i32 @strlen(i8* %10)
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %6
%14 = alloca i8, i64 %12
store i64 %12, i64* %7
%15 = getelementptr inbounds [15 x i8], [15 x i8]* %5, i64 0, i64 0
%16 = call i32 @encryptDecrypt(i8* %15, i8* %14)
%17 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %14)
%18 = getelementptr inbounds [15 x i8], [15 x i8]* %5, i64 0, i64 0
%19 = call i32 @strlen(i8* %18)
%20 = zext i32 %19 to i64
%21 = alloca i8, i64 %20
store i64 %20, i64* %8
%22 = call i32 @encryptDecrypt(i8* %14, i8* %21)
%23 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %21)
%24 = load i8*, i8** %6
ret i32 0
}

LLVM IR (-O2):
@__const.main.baseStr = [15 x i8] c"kylewbanks.com\00"
@.str = [14 x i8] c"Encrypted:%s\0A\00"
@.str.1 = [14 x i8] c"Decrypted:%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [15 x i8]
%4 = getelementptr inbounds [15 x i8], [15 x i8]* %3, i64 0, i64 0
%5 = call i32 @strlen(i8* %4)
%6 = zext i32 %5 to i64
%7 = call i8* @llvm.stacksave()
%8 = alloca i8, i64 %6
%9 = call i32 @encryptDecrypt(i8* %4, i8* %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %8)
%11 = call i32 @strlen(i8* %4)
%12 = zext i32 %11 to i64
%13 = alloca i8, i64 %12
%14 = call i32 @encryptDecrypt(i8* %8, i8* %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i8* %13)
ret i32 0
}