#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 */
char *decrypt(char *, char *);
char *encrypt(char *, char *);
int /*<<< orphan*/ printf(char *, char *);
main(int arc, char **argv) {
  char *clear;
  char *crypto;
  char *key = "ERIYZFYLJQSNKCFSZZTUAVIHTVXL "
              "PQDFNQUTCEBSLOCNIJAGRJWASCUBOUADJUIWZBOBVPIFS";
  char *file = "this is the text AND MORE text is now the thing tag is a "
               "sleepy cat very v";
  crypto = encrypt(key, file);
  clear = decrypt(key, crypto);
  printf("%s\n", file);
  printf("%s\n", crypto);
  printf("%s\n", clear);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeba(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xefa(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1050 <encrypt@plt>
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1030 <decrypt@plt>
mov    %rax,-0x18(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xf14(%rip),%rdi
call   1040 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xf04(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rsi
lea    0xef4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xec1(%rip),%r15
lea    0xf05(%rip),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1050 <encrypt@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %rax,%rsi
call   1030 <decrypt@plt>
mov    %rax,%r15
lea    0xf2d(%rip),%r12
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    %r12,%rdi
mov    %r15,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [75 x i8] c"ERIYZFYLJQSNKCFSZZTUAVIHTVXL PQDFNQUTCEBSLOCNIJAGRJWASCUBOUADJUIWZBOBVPIFS\00"
@.str.1 = [75 x i8] c"this is the text AND MORE text is now the thing tag is a sleepy cat very v\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0), i8** %8
%9 = load i8*, i8** %7
%10 = load i8*, i8** %8
%11 = call i8* @encrypt(i8* %9, i8* %10)
store i8* %11, i8** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %6
%14 = call i8* @decrypt(i8* %12, i8* %13)
store i8* %14, i8** %5
%15 = load i8*, i8** %8
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %15)
%17 = load i8*, i8** %6
%18 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %17)
%19 = load i8*, i8** %5
%20 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [75 x i8] c"ERIYZFYLJQSNKCFSZZTUAVIHTVXL PQDFNQUTCEBSLOCNIJAGRJWASCUBOUADJUIWZBOBVPIFS\00"
@.str.1 = [75 x i8] c"this is the text AND MORE text is now the thing tag is a sleepy cat very v\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i8* @encrypt(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i8* @decrypt(i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([75 x i8], [75 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %3)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %4)
ret i32 0
}