#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 *botan_fpe_decrypt(char const *, int, char *, char *);
char *botan_fpe_encrypt(char *, int, char *, char *);
int /*<<< orphan*/ botan_fpe_init();
int /*<<< orphan*/ printf(char *, char const *);
int main(int argc, char *argv[]) {
  botan_fpe_init();
  printf("%s \n ", argv[1]);
  const char *enc = botan_fpe_encrypt(argv[1], 5, argv[3], argv[2]);
  printf("%s \n ", enc);
  const char *dec = botan_fpe_decrypt(enc, 5, argv[3], argv[2]);
  printf("%s \n ", dec);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <botan_fpe_init@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rcx
mov    $0x5,%esi
call   1060 <botan_fpe_encrypt@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xe5e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdx
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rcx
mov    $0x5,%esi
call   1040 <botan_fpe_decrypt@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rsi
lea    0xe2c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
xor    %eax,%eax
call   1050 <botan_fpe_init@plt>
mov    0x8(%rbx),%rsi
lea    0xea6(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0x18(%rbx),%rdx
mov    0x8(%rbx),%rdi
mov    0x10(%rbx),%rcx
mov    $0x5,%esi
call   1060 <botan_fpe_encrypt@plt>
mov    %rax,%r15
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    0x10(%rbx),%rcx
mov    0x18(%rbx),%rdx
mov    %r15,%rdi
mov    $0x5,%esi
call   1040 <botan_fpe_decrypt@plt>
mov    %r14,%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s \0A \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = call i32 (...) @botan_fpe_init()
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %11)
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 3
%18 = load i8*, i8** %17
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 2
%21 = load i8*, i8** %20
%22 = call i8* @botan_fpe_encrypt(i8* %15, i32 5, i8* %18, i8* %21)
store i8* %22, i8** %6
%23 = load i8*, i8** %6
%24 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %23)
%25 = load i8*, i8** %6
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 3
%28 = load i8*, i8** %27
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 2
%31 = load i8*, i8** %30
%32 = call i8* @botan_fpe_decrypt(i8* %25, i32 5, i8* %28, i8* %31)
store i8* %32, i8** %7
%33 = load i8*, i8** %7
%34 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %33)
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s \0A \00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 (...) @botan_fpe_init()
%4 = getelementptr inbounds i8*, i8** %1, i64 1
%5 = load i8*, i8** %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8*, i8** %1, i64 3
%9 = load i8*, i8** %8
%10 = getelementptr inbounds i8*, i8** %1, i64 2
%11 = load i8*, i8** %10
%12 = tail call i8* @botan_fpe_encrypt(i8* %7, i32 5, i8* %9, i8* %11)
%13 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = load i8*, i8** %8
%15 = load i8*, i8** %10
%16 = tail call i8* @botan_fpe_decrypt(i8* %12, i32 5, i8* %14, i8* %15)
%17 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %16)
ret i32 0
}