#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*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ free(char const *);
int /*<<< orphan*/ printf(char *, char const *, char const *);
char *snippet_encrypt(char const *, char const *);
int main(int UNUSED_argc __attribute__((__unused__)),
         char **UNUSED_argv __attribute__((__unused__))) {
  const char *plain_text = "abcdefghijklmnopqrstuvwxyz0123456789";
  const char *password = "DealWithItDealWithItDealWithItDealWithItDealWithItDea"
                         "lWithItDealWithItDealWithItDealWithItDealWithIt";
  const char *cipher_text = snippet_encrypt(plain_text, password);
  printf("[%s] = [%s]\n", plain_text, cipher_text);
  free(cipher_text);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xea3(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xebd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1040 <snippet_encrypt@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x28(%rbp),%rdx
lea    0xefe(%rip),%rdi
call   1050 <printf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    0x2e3f(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%r14
lea    0xed3(%rip),%rsi
mov    %r14,%rdi
call   1040 <snippet_encrypt@plt>
mov    %rax,%rbx
lea    0xf26(%rip),%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x2e62(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"abcdefghijklmnopqrstuvwxyz0123456789\00"
@.str.1 = [101 x i8] c"DealWithItDealWithItDealWithItDealWithItDealWithItDealWithItDealWithItDealWithItDealWithItDealWithIt\00"
@.str.2 = [13 x i8] c"[%s] = [%s]\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.1, i64 0, i64 0), i8** %7
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = call i8* @snippet_encrypt(i8* %9, i8* %10)
store i8* %11, i8** %8
%12 = load i8*, i8** %6
%13 = load i8*, i8** %8
%14 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %12, i8* %13)
%15 = load i8*, i8** %8
%16 = call i32 @free(i8* %15)
%17 = load i32, i32* @EXIT_SUCCESS
%18 = call i32 @exit(i32 %17)
unreachable
}

LLVM IR (-O2):
@.str = [37 x i8] c"abcdefghijklmnopqrstuvwxyz0123456789\00"
@.str.1 = [101 x i8] c"DealWithItDealWithItDealWithItDealWithItDealWithItDealWithItDealWithItDealWithItDealWithItDealWithIt\00"
@.str.2 = [13 x i8] c"[%s] = [%s]\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @snippet_encrypt(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([101 x i8], [101 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @free(i8* %3)
%6 = load i32, i32* @EXIT_SUCCESS
%7 = tail call i32 @exit(i32 %6)
unreachable
}