#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 EXIT_SUCCESS;
int /*<<< orphan*/ log_init(char *, int);
int /*<<< orphan*/ testB64Decode(char *, char *);
int /*<<< orphan*/ testB64Encode(char *, char *);
int main(int argc, const char *argv[]) {
  log_init("./debug.log", 0x01);
  testB64Encode("pleasure", "cGxlYXN1cmU=");
  testB64Encode("pleasur", "cGxlYXN1cg==");
  testB64Encode("pleasu", "cGxlYXN1");
  testB64Decode("cGxlYXN1cmU=", "pleasure");
  testB64Decode("cGxlYXN1cg==", "pleasur");
  testB64Decode("cGxlYXN1", "pleasu");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
mov    $0x1,%esi
call   1030 <log_init@plt>
lea    0xeae(%rip),%rdi
lea    0xeb0(%rip),%rsi
call   1050 <testB64Encode@plt>
lea    0xeb1(%rip),%rdi
lea    0xeb2(%rip),%rsi
call   1050 <testB64Encode@plt>
lea    0xeb3(%rip),%rdi
lea    0xeb3(%rip),%rsi
call   1050 <testB64Encode@plt>
lea    0xe7e(%rip),%rdi
lea    0xe6e(%rip),%rsi
call   1040 <testB64Decode@plt>
lea    0xe80(%rip),%rdi
lea    0xe71(%rip),%rsi
call   1040 <testB64Decode@plt>
lea    0xe81(%rip),%rdi
lea    0xe73(%rip),%rsi
call   1040 <testB64Decode@plt>
mov    0x2e10(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xebe(%rip),%rdi
mov    $0x1,%esi
call   1030 <log_init@plt>
lea    0xeb9(%rip),%r14
lea    0xebb(%rip),%r12
mov    %r14,%rdi
mov    %r12,%rsi
call   1050 <testB64Encode@plt>
lea    0xeb6(%rip),%r15
lea    0xeb7(%rip),%rbx
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <testB64Encode@plt>
lea    0xeb2(%rip),%r13
lea    0xeb2(%rip),%rbp
mov    %r13,%rdi
mov    %rbp,%rsi
call   1050 <testB64Encode@plt>
mov    %r12,%rdi
mov    %r14,%rsi
call   1040 <testB64Decode@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <testB64Decode@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
call   1040 <testB64Decode@plt>
mov    0x2e21(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"./debug.log\00"
@.str.1 = [9 x i8] c"pleasure\00"
@.str.2 = [13 x i8] c"cGxlYXN1cmU=\00"
@.str.3 = [8 x i8] c"pleasur\00"
@.str.4 = [13 x i8] c"cGxlYXN1cg==\00"
@.str.5 = [7 x i8] c"pleasu\00"
@.str.6 = [9 x i8] c"cGxlYXN1\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @log_init(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1)
%7 = call i32 @testB64Encode(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @testB64Encode(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%9 = call i32 @testB64Encode(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%10 = call i32 @testB64Decode(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @testB64Decode(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%12 = call i32 @testB64Decode(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}

LLVM IR (-O2):
@.str = [12 x i8] c"./debug.log\00"
@.str.1 = [9 x i8] c"pleasure\00"
@.str.2 = [13 x i8] c"cGxlYXN1cmU=\00"
@.str.3 = [8 x i8] c"pleasur\00"
@.str.4 = [13 x i8] c"cGxlYXN1cg==\00"
@.str.5 = [7 x i8] c"pleasu\00"
@.str.6 = [9 x i8] c"cGxlYXN1\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @log_init(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = tail call i32 @testB64Encode(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @testB64Encode(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @testB64Encode(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%7 = tail call i32 @testB64Decode(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @testB64Decode(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%9 = tail call i32 @testB64Decode(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}