#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 *decode_base64(char *, unsigned int *);
char *encode_base64(char const *, unsigned int);
int /*<<< orphan*/ printf(char *, ...);
unsigned int strlen(char const *);
int main(int argc, char **argv) {
  const char *str = "A";
  char *base64 = encode_base64(str, strlen(str));
  printf("[%lu]%s > [%lu]%s\n", strlen(str), str, strlen(base64), base64);
  const char *str2 = "AB";
  char *base642 = encode_base64(str2, strlen(str2));
  printf("[%lu]%s > [%lu]%s\n", strlen(str2), str2, strlen(base642), base642);
  const char *str3 = "ABC";
  char *base643 = encode_base64(str3, strlen(str3));
  printf("[%lu]%s > [%lu]%s\n", strlen(str3), str3, strlen(base643), base643);
  const char *str4 = "ABCA";
  char *base644 = encode_base64(str4, strlen(str4));
  printf("[%lu]%s > [%lu]%s\n", strlen(str4), str4, strlen(base644), base644);
  const char *str5 = "ABCAB";
  char *base645 = encode_base64(str5, strlen(str5));
  printf("[%lu]%s > [%lu]%s\n", strlen(str5), str5, strlen(base645), base645);
  const char *str6 = "ABCABC";
  char *base646 = encode_base64(str6, strlen(str6));
  printf("[%lu]%s > [%lu]%s\n", strlen(str6), str6, strlen(base646), base646);
  printf("------------------\n");
  unsigned int len = 0;
  char *decode = decode_base64(base64, &len);
  printf("[%lu]%s > [%d]%s\n", strlen(base64), base64, len, decode);
  unsigned int len2 = 0;
  char *decode2 = decode_base64(base642, &len2);
  printf("[%lu]%s > [%d]%s\n", strlen(base642), base642, len2, decode2);
  unsigned int len3 = 0;
  char *decode3 = decode_base64(base643, &len3);
  printf("[%lu]%s > [%d]%s\n", strlen(base643), base643, len3, decode3);
  unsigned int len4 = 0;
  char *decode4 = decode_base64(base644, &len4);
  printf("[%lu]%s > [%d]%s\n", strlen(base644), base644, len4, decode4);
  unsigned int len5 = 0;
  char *decode5 = decode_base64(base645, &len5);
  printf("[%lu]%s > [%d]%s\n", strlen(base645), base645, len5, decode5);
  unsigned int len6 = 0;
  char *decode6 = decode_base64(base646, &len6);
  printf("[%lu]%s > [%d]%s\n", strlen(base646), base646, len6, decode6);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x160,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb6(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x160(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x160(%rbp),%rdi
mov    %eax,%esi
call   1060 <encode_base64@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x154(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x150(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x154(%rbp),%esi
mov    -0x150(%rbp),%rdx
mov    %eax,%ecx
mov    -0x20(%rbp),%r8
lea    0xe39(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe46(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x148(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x148(%rbp),%rdi
mov    %eax,%esi
call   1060 <encode_base64@plt>
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x13c(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x138(%rbp)
mov    -0x30(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x13c(%rbp),%esi
mov    -0x138(%rbp),%rdx
mov    %eax,%ecx
mov    -0x30(%rbp),%r8
lea    0xdc4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdd7(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x130(%rbp)
mov    -0x38(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x130(%rbp),%rdi
mov    %eax,%esi
call   1060 <encode_base64@plt>
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x124(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x120(%rbp)
mov    -0x40(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x124(%rbp),%esi
mov    -0x120(%rbp),%rdx
mov    %eax,%ecx
mov    -0x40(%rbp),%r8
lea    0xd4f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd54(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x118(%rbp)
mov    -0x48(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x118(%rbp),%rdi
mov    %eax,%esi
call   1060 <encode_base64@plt>
mov    %rax,-0x50(%rbp)
mov    -0x48(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x10c(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x108(%rbp)
mov    -0x50(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10c(%rbp),%esi
mov    -0x108(%rbp),%rdx
mov    %eax,%ecx
mov    -0x50(%rbp),%r8
lea    0xcda(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xce4(%rip),%rax
mov    %rax,-0x58(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x100(%rbp)
mov    -0x58(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x100(%rbp),%rdi
mov    %eax,%esi
call   1060 <encode_base64@plt>
mov    %rax,-0x60(%rbp)
mov    -0x58(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xf4(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0xf0(%rbp)
mov    -0x60(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0xf4(%rbp),%esi
mov    -0xf0(%rbp),%rdx
mov    %eax,%ecx
mov    -0x60(%rbp),%r8
lea    0xc65(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc75(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0xe8(%rbp)
mov    -0x68(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0xe8(%rbp),%rdi
mov    %eax,%esi
call   1060 <encode_base64@plt>
mov    %rax,-0x70(%rbp)
mov    -0x68(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xdc(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,-0xd8(%rbp)
mov    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0xdc(%rbp),%esi
mov    -0xd8(%rbp),%rdx
mov    %eax,%ecx
mov    -0x70(%rbp),%r8
lea    0xbf0(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xc07(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x74(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x74(%rbp),%rsi
call   1050 <decode_base64@plt>
mov    %rax,-0x80(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
mov    -0x20(%rbp),%rdx
mov    -0x74(%rbp),%ecx
mov    -0x80(%rbp),%r8
lea    0xbdf(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x84(%rbp)
mov    -0x30(%rbp),%rdi
lea    -0x84(%rbp),%rsi
call   1050 <decode_base64@plt>
mov    %rax,-0x90(%rbp)
mov    -0x30(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
mov    -0x30(%rbp),%rdx
mov    -0x84(%rbp),%ecx
mov    -0x90(%rbp),%r8
lea    0xb94(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x94(%rbp)
mov    -0x40(%rbp),%rdi
lea    -0x94(%rbp),%rsi
call   1050 <decode_base64@plt>
mov    %rax,-0xa0(%rbp)
mov    -0x40(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
mov    -0x40(%rbp),%rdx
mov    -0x94(%rbp),%ecx
mov    -0xa0(%rbp),%r8
lea    0xb49(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xa4(%rbp)
mov    -0x50(%rbp),%rdi
lea    -0xa4(%rbp),%rsi
call   1050 <decode_base64@plt>
mov    %rax,-0xb0(%rbp)
mov    -0x50(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
mov    -0x50(%rbp),%rdx
mov    -0xa4(%rbp),%ecx
mov    -0xb0(%rbp),%r8
lea    0xafe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xb4(%rbp)
mov    -0x60(%rbp),%rdi
lea    -0xb4(%rbp),%rsi
call   1050 <decode_base64@plt>
mov    %rax,-0xc0(%rbp)
mov    -0x60(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
mov    -0x60(%rbp),%rdx
mov    -0xb4(%rbp),%ecx
mov    -0xc0(%rbp),%r8
lea    0xab3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0xc4(%rbp)
mov    -0x70(%rbp),%rdi
lea    -0xc4(%rbp),%rsi
call   1050 <decode_base64@plt>
mov    %rax,-0xd0(%rbp)
mov    -0x70(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
mov    -0x70(%rbp),%rdx
mov    -0xc4(%rbp),%ecx
mov    -0xd0(%rbp),%r8
lea    0xa68(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x160,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
lea    0xeb1(%rip),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1070 <encode_base64@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %rbx,0x30(%rsp)
call   1040 <strlen@plt>
lea    0xe68(%rip),%r15
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %eax,%ecx
mov    %rbx,%r8
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe68(%rip),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1070 <encode_base64@plt>
mov    %rax,%rbx
mov    %rax,0x28(%rsp)
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %eax,%ecx
mov    %rbx,%r8
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe27(%rip),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1070 <encode_base64@plt>
mov    %rax,%rbx
mov    %rax,0x20(%rsp)
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %eax,%ecx
mov    %rbx,%r8
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdd2(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1070 <encode_base64@plt>
mov    %rax,%r13
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r13,%rdi
call   1040 <strlen@plt>
mov    %r15,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
mov    %eax,%ecx
mov    %r13,%r8
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd95(%rip),%rbp
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    %rbp,%rdi
mov    %eax,%esi
call   1070 <encode_base64@plt>
mov    %rax,%r15
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    %eax,%r14d
mov    %r15,%rdi
call   1040 <strlen@plt>
lea    0xd4e(%rip),%rdi
mov    %r14d,%esi
mov    %rbp,%rdx
mov    %eax,%ecx
mov    %r15,%r8
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd53(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1070 <encode_base64@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    0xd07(%rip),%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
mov    %eax,%ecx
mov    %r14,%r8
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd26(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,0x1c(%rsp)
lea    0x1c(%rsp),%rsi
mov    0x30(%rsp),%rbp
mov    %rbp,%rdi
call   1060 <decode_base64@plt>
mov    %rax,%rbx
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    0x1c(%rsp),%ecx
lea    0xcdf(%rip),%r12
mov    %r12,%rdi
mov    %eax,%esi
mov    %rbp,%rdx
mov    %rbx,%r8
xor    %eax,%eax
call   1050 <printf@plt>
movl   $0x0,0x18(%rsp)
lea    0x18(%rsp),%rsi
mov    0x28(%rsp),%rbp
mov    %rbp,%rdi
call   1060 <decode_base64@plt>
mov    %rax,%rbx
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    0x18(%rsp),%ecx
mov    %r12,%rdi
mov    %eax,%esi
mov    %rbp,%rdx
mov    %rbx,%r8
xor    %eax,%eax
call   1050 <printf@plt>
movl   $0x0,0x14(%rsp)
lea    0x14(%rsp),%rsi
mov    0x20(%rsp),%rbp
mov    %rbp,%rdi
call   1060 <decode_base64@plt>
mov    %rax,%rbx
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    0x14(%rsp),%ecx
mov    %r12,%rdi
mov    %eax,%esi
mov    %rbp,%rdx
mov    %rbx,%r8
xor    %eax,%eax
call   1050 <printf@plt>
movl   $0x0,0x10(%rsp)
lea    0x10(%rsp),%rsi
mov    %r13,%rdi
call   1060 <decode_base64@plt>
mov    %rax,%rbx
mov    %r13,%rdi
call   1040 <strlen@plt>
mov    0x10(%rsp),%ecx
mov    %r12,%rdi
mov    %eax,%esi
mov    %r13,%rdx
mov    %rbx,%r8
xor    %eax,%eax
call   1050 <printf@plt>
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    %r15,%rdi
call   1060 <decode_base64@plt>
mov    %rax,%rbx
mov    %r15,%rdi
call   1040 <strlen@plt>
mov    0xc(%rsp),%ecx
mov    %r12,%rdi
mov    %eax,%esi
mov    %r15,%rdx
mov    %rbx,%r8
xor    %eax,%eax
call   1050 <printf@plt>
movl   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rsi
mov    %r14,%rdi
call   1060 <decode_base64@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    0x8(%rsp),%ecx
mov    %r12,%rdi
mov    %eax,%esi
mov    %r14,%rdx
mov    %rbx,%r8
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"A\00"
@.str.1 = [19 x i8] c"[%lu]%s > [%lu]%s\0A\00"
@.str.2 = [3 x i8] c"AB\00"
@.str.3 = [4 x i8] c"ABC\00"
@.str.4 = [5 x i8] c"ABCA\00"
@.str.5 = [6 x i8] c"ABCAB\00"
@.str.6 = [7 x i8] c"ABCABC\00"
@.str.7 = [20 x i8] c"------------------\0A\00"
@.str.8 = [18 x i8] c"[%lu]%s > [%d]%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*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i8*
%18 = alloca i32
%19 = alloca i8*
%20 = alloca i32
%21 = alloca i8*
%22 = alloca i32
%23 = alloca i8*
%24 = alloca i32
%25 = alloca i8*
%26 = alloca i32
%27 = alloca i8*
%28 = alloca i32
%29 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8** %6
%30 = load i8*, i8** %6
%31 = load i8*, i8** %6
%32 = call i32 @strlen(i8* %31)
%33 = call i8* @encode_base64(i8* %30, i32 %32)
store i8* %33, i8** %7
%34 = load i8*, i8** %6
%35 = call i32 @strlen(i8* %34)
%36 = load i8*, i8** %6
%37 = load i8*, i8** %7
%38 = call i32 @strlen(i8* %37)
%39 = load i8*, i8** %7
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %35, i8* %36, i32 %38, i8* %39)
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8** %8
%41 = load i8*, i8** %8
%42 = load i8*, i8** %8
%43 = call i32 @strlen(i8* %42)
%44 = call i8* @encode_base64(i8* %41, i32 %43)
store i8* %44, i8** %9
%45 = load i8*, i8** %8
%46 = call i32 @strlen(i8* %45)
%47 = load i8*, i8** %8
%48 = load i8*, i8** %9
%49 = call i32 @strlen(i8* %48)
%50 = load i8*, i8** %9
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %46, i8* %47, i32 %49, i8* %50)
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %10
%52 = load i8*, i8** %10
%53 = load i8*, i8** %10
%54 = call i32 @strlen(i8* %53)
%55 = call i8* @encode_base64(i8* %52, i32 %54)
store i8* %55, i8** %11
%56 = load i8*, i8** %10
%57 = call i32 @strlen(i8* %56)
%58 = load i8*, i8** %10
%59 = load i8*, i8** %11
%60 = call i32 @strlen(i8* %59)
%61 = load i8*, i8** %11
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %57, i8* %58, i32 %60, i8* %61)
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8** %12
%63 = load i8*, i8** %12
%64 = load i8*, i8** %12
%65 = call i32 @strlen(i8* %64)
%66 = call i8* @encode_base64(i8* %63, i32 %65)
store i8* %66, i8** %13
%67 = load i8*, i8** %12
%68 = call i32 @strlen(i8* %67)
%69 = load i8*, i8** %12
%70 = load i8*, i8** %13
%71 = call i32 @strlen(i8* %70)
%72 = load i8*, i8** %13
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %68, i8* %69, i32 %71, i8* %72)
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8** %14
%74 = load i8*, i8** %14
%75 = load i8*, i8** %14
%76 = call i32 @strlen(i8* %75)
%77 = call i8* @encode_base64(i8* %74, i32 %76)
store i8* %77, i8** %15
%78 = load i8*, i8** %14
%79 = call i32 @strlen(i8* %78)
%80 = load i8*, i8** %14
%81 = load i8*, i8** %15
%82 = call i32 @strlen(i8* %81)
%83 = load i8*, i8** %15
%84 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %79, i8* %80, i32 %82, i8* %83)
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i8** %16
%85 = load i8*, i8** %16
%86 = load i8*, i8** %16
%87 = call i32 @strlen(i8* %86)
%88 = call i8* @encode_base64(i8* %85, i32 %87)
store i8* %88, i8** %17
%89 = load i8*, i8** %16
%90 = call i32 @strlen(i8* %89)
%91 = load i8*, i8** %16
%92 = load i8*, i8** %17
%93 = call i32 @strlen(i8* %92)
%94 = load i8*, i8** %17
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %90, i8* %91, i32 %93, i8* %94)
%96 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %18
%97 = load i8*, i8** %7
%98 = call i8* @decode_base64(i8* %97, i32* %18)
store i8* %98, i8** %19
%99 = load i8*, i8** %7
%100 = call i32 @strlen(i8* %99)
%101 = load i8*, i8** %7
%102 = load i32, i32* %18
%103 = load i8*, i8** %19
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %100, i8* %101, i32 %102, i8* %103)
store i32 0, i32* %20
%105 = load i8*, i8** %9
%106 = call i8* @decode_base64(i8* %105, i32* %20)
store i8* %106, i8** %21
%107 = load i8*, i8** %9
%108 = call i32 @strlen(i8* %107)
%109 = load i8*, i8** %9
%110 = load i32, i32* %20
%111 = load i8*, i8** %21
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %108, i8* %109, i32 %110, i8* %111)
store i32 0, i32* %22
%113 = load i8*, i8** %11
%114 = call i8* @decode_base64(i8* %113, i32* %22)
store i8* %114, i8** %23
%115 = load i8*, i8** %11
%116 = call i32 @strlen(i8* %115)
%117 = load i8*, i8** %11
%118 = load i32, i32* %22
%119 = load i8*, i8** %23
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %116, i8* %117, i32 %118, i8* %119)
store i32 0, i32* %24
%121 = load i8*, i8** %13
%122 = call i8* @decode_base64(i8* %121, i32* %24)
store i8* %122, i8** %25
%123 = load i8*, i8** %13
%124 = call i32 @strlen(i8* %123)
%125 = load i8*, i8** %13
%126 = load i32, i32* %24
%127 = load i8*, i8** %25
%128 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %124, i8* %125, i32 %126, i8* %127)
store i32 0, i32* %26
%129 = load i8*, i8** %15
%130 = call i8* @decode_base64(i8* %129, i32* %26)
store i8* %130, i8** %27
%131 = load i8*, i8** %15
%132 = call i32 @strlen(i8* %131)
%133 = load i8*, i8** %15
%134 = load i32, i32* %26
%135 = load i8*, i8** %27
%136 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %132, i8* %133, i32 %134, i8* %135)
store i32 0, i32* %28
%137 = load i8*, i8** %17
%138 = call i8* @decode_base64(i8* %137, i32* %28)
store i8* %138, i8** %29
%139 = load i8*, i8** %17
%140 = call i32 @strlen(i8* %139)
%141 = load i8*, i8** %17
%142 = load i32, i32* %28
%143 = load i8*, i8** %29
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %140, i8* %141, i32 %142, i8* %143)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"A\00"
@.str.1 = [19 x i8] c"[%lu]%s > [%lu]%s\0A\00"
@.str.2 = [3 x i8] c"AB\00"
@.str.3 = [4 x i8] c"ABC\00"
@.str.4 = [5 x i8] c"ABCA\00"
@.str.5 = [6 x i8] c"ABCAB\00"
@.str.6 = [7 x i8] c"ABCABC\00"
@.str.8 = [18 x i8] c"[%lu]%s > [%d]%s\0A\00"
@str = [19 x i8] c"------------------\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = tail call i32 @strlen(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%10 = tail call i8* @encode_base64(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = tail call i32 @strlen(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%12 = tail call i32 @strlen(i8* %10)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 %12, i8* %10)
%14 = tail call i32 @strlen(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%15 = tail call i8* @encode_base64(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%16 = tail call i32 @strlen(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%17 = tail call i32 @strlen(i8* %15)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %17, i8* %15)
%19 = tail call i32 @strlen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%20 = tail call i8* @encode_base64(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %19)
%21 = tail call i32 @strlen(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%22 = tail call i32 @strlen(i8* %20)
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %21, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %22, i8* %20)
%24 = tail call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%25 = tail call i8* @encode_base64(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %24)
%26 = tail call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%27 = tail call i32 @strlen(i8* %25)
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %26, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %27, i8* %25)
%29 = tail call i32 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%30 = tail call i8* @encode_base64(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %29)
%31 = tail call i32 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%32 = tail call i32 @strlen(i8* %30)
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %31, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i32 %32, i8* %30)
%34 = tail call i32 @strlen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%35 = tail call i8* @encode_base64(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %34)
%36 = tail call i32 @strlen(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%37 = tail call i32 @strlen(i8* %35)
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %36, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %37, i8* %35)
%39 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%40 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%41 = call i8* @decode_base64(i8* %10, i32* %3)
%42 = call i32 @strlen(i8* %10)
%43 = load i32, i32* %3
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %42, i8* %10, i32 %43, i8* %41)
%45 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%46 = call i8* @decode_base64(i8* %15, i32* %4)
%47 = call i32 @strlen(i8* %15)
%48 = load i32, i32* %4
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %47, i8* %15, i32 %48, i8* %46)
%50 = bitcast i32* %5 to i8*
store i32 0, i32* %5
%51 = call i8* @decode_base64(i8* %20, i32* %5)
%52 = call i32 @strlen(i8* %20)
%53 = load i32, i32* %5
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %52, i8* %20, i32 %53, i8* %51)
%55 = bitcast i32* %6 to i8*
store i32 0, i32* %6
%56 = call i8* @decode_base64(i8* %25, i32* %6)
%57 = call i32 @strlen(i8* %25)
%58 = load i32, i32* %6
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %57, i8* %25, i32 %58, i8* %56)
%60 = bitcast i32* %7 to i8*
store i32 0, i32* %7
%61 = call i8* @decode_base64(i8* %30, i32* %7)
%62 = call i32 @strlen(i8* %30)
%63 = load i32, i32* %7
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %62, i8* %30, i32 %63, i8* %61)
%65 = bitcast i32* %8 to i8*
store i32 0, i32* %8
%66 = call i8* @decode_base64(i8* %35, i32* %8)
%67 = call i32 @strlen(i8* %35)
%68 = load i32, i32* %8
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.8, i64 0, i64 0), i32 %67, i8* %35, i32 %68, i8* %66)
ret i32 0
}