#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*/ assert(int);
int /*<<< orphan*/ assert_equal(unsigned char *, int, unsigned char *, int);
unsigned char *base64_decode(char *, int *);
char *base64_encode(unsigned char *, int);
int base64_length_for_data_length(int);
int data_length_for_base64(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int num_base64_padding_chars_for_data_length(int);
int /*<<< orphan*/ stderr;
scalar_t__ strcmp(char *, char *);
int /*<<< orphan*/ test_data(unsigned char *, int);
int main() {
  int data_length, data2_length;
  unsigned char d[200];
  unsigned char *data2;
  char *base64;
  assert(base64_length_for_data_length(0) == 0);
  assert(base64_length_for_data_length(1) == 4);
  assert(base64_length_for_data_length(2) == 4);
  assert(base64_length_for_data_length(3) == 4);
  assert(base64_length_for_data_length(4) == 8);
  assert(num_base64_padding_chars_for_data_length(0) == 0);
  assert(num_base64_padding_chars_for_data_length(1) == 2);
  assert(num_base64_padding_chars_for_data_length(2) == 1);
  assert(num_base64_padding_chars_for_data_length(3) == 0);
  assert(num_base64_padding_chars_for_data_length(4) == 2);
  assert(num_base64_padding_chars_for_data_length(5) == 1);
  assert(num_base64_padding_chars_for_data_length(6) == 0);
  assert(data_length_for_base64("") == 0);
  assert(data_length_for_base64("AA==") == 1);
  assert(data_length_for_base64("AAA=") == 2);
  assert(data_length_for_base64("AAAA") == 3);
  assert(data_length_for_base64("AAAAAA==") == 4);
  assert(data_length_for_base64("AAAAAAA=") == 5);
  assert(data_length_for_base64("AAAAAAAA") == 6);
  base64 = "";
  data2 = base64_decode(base64, &data2_length);
  assert(data2_length == 0);
  base64 = "AA==";
  data2 = base64_decode(base64, &data2_length);
  assert(data2_length == 1);
  base64 = "AAA=";
  data2 = base64_decode(base64, &data2_length);
  assert(data2_length == 2);
  base64 = "AAAA";
  data2 = base64_decode(base64, &data2_length);
  assert(data2_length == 3);
  base64 = "AAAAAA==";
  data2 = base64_decode(base64, &data2_length);
  assert(data2_length == 4);
  d[0] = d[1] = d[2] = d[3] = 0;
  base64 = base64_encode(d, 0);
  assert(0 == strcmp(base64, ""));
  base64 = base64_encode(d, 1);
  assert(0 == strcmp(base64, "AA=="));
  base64 = base64_encode(d, 2);
  assert(0 == strcmp(base64, "AAA="));
  base64 = base64_encode(d, 3);
  assert(0 == strcmp(base64, "AAAA"));
  base64 = base64_encode(d, 4);
  assert(0 == strcmp(base64, "AAAAAA=="));
  int i, j;
  for (i = 0; i < 256; i++) {
    for (j = 0; j < 256; j++) {
      d[0] = i;
      d[1] = j;
      d[2] = (i + j) % 256;
      test_data(d, 3);
      d[0] = (i + j) % 256;
      d[1] = i;
      d[2] = j;
      test_data(d, 3);
    }
  }
  d[0] = 0x7b;
  d[1] = 0x22;
  d[2] = 0x74;
  d[3] = 0x6f;
  d[4] = 0x22;
  d[5] = 0x3a;
  d[6] = 0x22;
  d[7] = 0x6a;
  d[8] = 0x73;
  d[9] = 0x22;
  d[10] = 0x2c;
  d[11] = 0x22;
  d[12] = 0x69;
  d[13] = 0x64;
  d[14] = 0x22;
  d[15] = 0x3a;
  d[16] = 0x31;
  d[17] = 0x2c;
  d[18] = 0x22;
  d[19] = 0x72;
  d[20] = 0x65;
  d[21] = 0x73;
  d[22] = 0x75;
  d[23] = 0x6c;
  d[24] = 0x74;
  d[25] = 0x22;
  d[26] = 0x3a;
  d[27] = 0x7b;
  d[28] = 0x7d;
  d[29] = 0x2c;
  d[30] = 0x22;
  d[31] = 0x66;
  d[32] = 0x72;
  d[33] = 0x6f;
  d[34] = 0x6d;
  d[35] = 0x22;
  d[36] = 0x3a;
  d[37] = 0x22;
  d[38] = 0x73;
  d[39] = 0x75;
  d[40] = 0x62;
  d[41] = 0x70;
  d[42] = 0x72;
  d[43] = 0x6f;
  d[44] = 0x63;
  d[45] = 0x65;
  d[46] = 0x73;
  d[47] = 0x73;
  d[48] = 0x22;
  d[49] = 0x7d;
  data_length = 50;
  data2 = base64_decode(
      "eyJ0byI6ImpzIiwiaWQiOjEsInJlc3VsdCI6e30sImZyb20iOiJzdWJwcm9jZXNzIn0=",
      &data2_length);
  assert_equal(d, data_length, data2, data2_length);
  fprintf(stderr, "OK\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   10b0 <base64_length_for_data_length@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x1,%edi
call   10b0 <base64_length_for_data_length@plt>
cmp    $0x4,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x2,%edi
call   10b0 <base64_length_for_data_length@plt>
cmp    $0x4,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x3,%edi
call   10b0 <base64_length_for_data_length@plt>
cmp    $0x4,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x4,%edi
call   10b0 <base64_length_for_data_length@plt>
cmp    $0x8,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %edi,%edi
call   10a0 <num_base64_padding_chars_for_data_length@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x1,%edi
call   10a0 <num_base64_padding_chars_for_data_length@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x2,%edi
call   10a0 <num_base64_padding_chars_for_data_length@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x3,%edi
call   10a0 <num_base64_padding_chars_for_data_length@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x4,%edi
call   10a0 <num_base64_padding_chars_for_data_length@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x5,%edi
call   10a0 <num_base64_padding_chars_for_data_length@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x6,%edi
call   10a0 <num_base64_padding_chars_for_data_length@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xd78(%rip),%rdi
call   1090 <data_length_for_base64@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xcfd(%rip),%rdi
call   1090 <data_length_for_base64@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xcea(%rip),%rdi
call   1090 <data_length_for_base64@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xcd7(%rip),%rdi
call   1090 <data_length_for_base64@plt>
cmp    $0x3,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xca5(%rip),%rdi
call   1090 <data_length_for_base64@plt>
cmp    $0x4,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xc92(%rip),%rdi
call   1090 <data_length_for_base64@plt>
cmp    $0x5,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xc7f(%rip),%rdi
call   1090 <data_length_for_base64@plt>
cmp    $0x6,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xcb4(%rip),%rax
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   10c0 <base64_decode@plt>
mov    %rax,-0xe8(%rbp)
cmpl   $0x0,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xc1f(%rip),%rax
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   10c0 <base64_decode@plt>
mov    %rax,-0xe8(%rbp)
cmpl   $0x1,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xbf2(%rip),%rax
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   10c0 <base64_decode@plt>
mov    %rax,-0xe8(%rbp)
cmpl   $0x2,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xbc5(%rip),%rax
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   10c0 <base64_decode@plt>
mov    %rax,-0xe8(%rbp)
cmpl   $0x3,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xb79(%rip),%rax
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rdi
lea    -0xc(%rbp),%rsi
call   10c0 <base64_decode@plt>
mov    %rax,-0xe8(%rbp)
cmpl   $0x4,-0xc(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
movb   $0x0,-0xdd(%rbp)
movb   $0x0,-0xde(%rbp)
movb   $0x0,-0xdf(%rbp)
movb   $0x0,-0xe0(%rbp)
lea    -0xe0(%rbp),%rdi
xor    %esi,%esi
call   1070 <base64_encode@plt>
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rdi
lea    0xb6e(%rip),%rsi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0xe0(%rbp),%rdi
mov    $0x1,%esi
call   1070 <base64_encode@plt>
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rdi
lea    0xacf(%rip),%rsi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0xe0(%rbp),%rdi
mov    $0x2,%esi
call   1070 <base64_encode@plt>
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rdi
lea    0xa98(%rip),%rsi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0xe0(%rbp),%rdi
mov    $0x3,%esi
call   1070 <base64_encode@plt>
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rdi
lea    0xa61(%rip),%rsi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    -0xe0(%rbp),%rdi
mov    $0x4,%esi
call   1070 <base64_encode@plt>
mov    %rax,-0xf0(%rbp)
mov    -0xf0(%rbp),%rdi
lea    0xa0b(%rip),%rsi
call   1040 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
movl   $0x0,-0xf4(%rbp)
cmpl   $0x100,-0xf4(%rbp)
jge    16fa <main+0x55a>
movl   $0x0,-0xf8(%rbp)
cmpl   $0x100,-0xf8(%rbp)
jge    16e1 <main+0x541>
mov    -0xf4(%rbp),%eax
mov    %al,-0xe0(%rbp)
mov    -0xf8(%rbp),%eax
mov    %al,-0xdf(%rbp)
mov    -0xf4(%rbp),%eax
add    -0xf8(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %dl,%al
mov    %al,-0xde(%rbp)
lea    -0xe0(%rbp),%rdi
mov    $0x3,%esi
call   1030 <test_data@plt>
mov    -0xf4(%rbp),%eax
add    -0xf8(%rbp),%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %dl,%al
mov    %al,-0xe0(%rbp)
mov    -0xf4(%rbp),%eax
mov    %al,-0xdf(%rbp)
mov    -0xf8(%rbp),%eax
mov    %al,-0xde(%rbp)
lea    -0xe0(%rbp),%rdi
mov    $0x3,%esi
call   1030 <test_data@plt>
mov    -0xf8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf8(%rbp)
jmp    1633 <main+0x493>
jmp    16e6 <main+0x546>
mov    -0xf4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xf4(%rbp)
jmp    1619 <main+0x479>
movb   $0x7b,-0xe0(%rbp)
movb   $0x22,-0xdf(%rbp)
movb   $0x74,-0xde(%rbp)
movb   $0x6f,-0xdd(%rbp)
movb   $0x22,-0xdc(%rbp)
movb   $0x3a,-0xdb(%rbp)
movb   $0x22,-0xda(%rbp)
movb   $0x6a,-0xd9(%rbp)
movb   $0x73,-0xd8(%rbp)
movb   $0x22,-0xd7(%rbp)
movb   $0x2c,-0xd6(%rbp)
movb   $0x22,-0xd5(%rbp)
movb   $0x69,-0xd4(%rbp)
movb   $0x64,-0xd3(%rbp)
movb   $0x22,-0xd2(%rbp)
movb   $0x3a,-0xd1(%rbp)
movb   $0x31,-0xd0(%rbp)
movb   $0x2c,-0xcf(%rbp)
movb   $0x22,-0xce(%rbp)
movb   $0x72,-0xcd(%rbp)
movb   $0x65,-0xcc(%rbp)
movb   $0x73,-0xcb(%rbp)
movb   $0x75,-0xca(%rbp)
movb   $0x6c,-0xc9(%rbp)
movb   $0x74,-0xc8(%rbp)
movb   $0x22,-0xc7(%rbp)
movb   $0x3a,-0xc6(%rbp)
movb   $0x7b,-0xc5(%rbp)
movb   $0x7d,-0xc4(%rbp)
movb   $0x2c,-0xc3(%rbp)
movb   $0x22,-0xc2(%rbp)
movb   $0x66,-0xc1(%rbp)
movb   $0x72,-0xc0(%rbp)
movb   $0x6f,-0xbf(%rbp)
movb   $0x6d,-0xbe(%rbp)
movb   $0x22,-0xbd(%rbp)
movb   $0x3a,-0xbc(%rbp)
movb   $0x22,-0xbb(%rbp)
movb   $0x73,-0xba(%rbp)
movb   $0x75,-0xb9(%rbp)
movb   $0x62,-0xb8(%rbp)
movb   $0x70,-0xb7(%rbp)
movb   $0x72,-0xb6(%rbp)
movb   $0x6f,-0xb5(%rbp)
movb   $0x63,-0xb4(%rbp)
movb   $0x65,-0xb3(%rbp)
movb   $0x73,-0xb2(%rbp)
movb   $0x73,-0xb1(%rbp)
movb   $0x22,-0xb0(%rbp)
movb   $0x7d,-0xaf(%rbp)
movl   $0x32,-0x8(%rbp)
lea    0x7b5(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   10c0 <base64_decode@plt>
mov    %rax,-0xe8(%rbp)
lea    -0xe0(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    -0xe8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
call   1080 <assert_equal@plt>
mov    0x274a(%rip),%rax
mov    (%rax),%edi
lea    0x7c1(%rip),%rsi
call   1060 <fprintf@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
xor    %r14d,%r14d
xor    %edi,%edi
call   10b0 <base64_length_for_data_length@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x1,%edi
call   10b0 <base64_length_for_data_length@plt>
xor    %edi,%edi
cmp    $0x4,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x2,%edi
call   10b0 <base64_length_for_data_length@plt>
xor    %edi,%edi
cmp    $0x4,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x3,%edi
call   10b0 <base64_length_for_data_length@plt>
xor    %edi,%edi
cmp    $0x4,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x4,%edi
call   10b0 <base64_length_for_data_length@plt>
xor    %edi,%edi
cmp    $0x8,%eax
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
call   10a0 <num_base64_padding_chars_for_data_length@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x1,%edi
call   10a0 <num_base64_padding_chars_for_data_length@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x2,%edi
call   10a0 <num_base64_padding_chars_for_data_length@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x3,%edi
call   10a0 <num_base64_padding_chars_for_data_length@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x4,%edi
call   10a0 <num_base64_padding_chars_for_data_length@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x5,%edi
call   10a0 <num_base64_padding_chars_for_data_length@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x6,%edi
call   10a0 <num_base64_padding_chars_for_data_length@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
lea    0xdc2(%rip),%rdi
call   1090 <data_length_for_base64@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
lea    0xd4a(%rip),%r12
mov    %r12,%rdi
call   1090 <data_length_for_base64@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1050 <assert@plt>
lea    0xd36(%rip),%r13
mov    %r13,%rdi
call   1090 <data_length_for_base64@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1050 <assert@plt>
lea    0xd22(%rip),%r15
mov    %r15,%rdi
call   1090 <data_length_for_base64@plt>
xor    %edi,%edi
cmp    $0x3,%eax
sete   %dil
call   1050 <assert@plt>
lea    0xcef(%rip),%rbx
mov    %rbx,%rdi
call   1090 <data_length_for_base64@plt>
xor    %edi,%edi
cmp    $0x4,%eax
sete   %dil
call   1050 <assert@plt>
lea    0xcdb(%rip),%rdi
call   1090 <data_length_for_base64@plt>
xor    %edi,%edi
cmp    $0x5,%eax
sete   %dil
call   1050 <assert@plt>
lea    0xcca(%rip),%rdi
call   1090 <data_length_for_base64@plt>
xor    %edi,%edi
cmp    $0x6,%eax
sete   %dil
call   1050 <assert@plt>
lea    0xc(%rsp),%rbp
lea    0xcfc(%rip),%rdi
mov    %rbp,%rsi
call   10c0 <base64_decode@plt>
xor    %edi,%edi
cmpl   $0x0,0xc(%rsp)
sete   %dil
call   1050 <assert@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
call   10c0 <base64_decode@plt>
xor    %edi,%edi
cmpl   $0x1,0xc(%rsp)
sete   %dil
call   1050 <assert@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
call   10c0 <base64_decode@plt>
xor    %edi,%edi
cmpl   $0x2,0xc(%rsp)
sete   %dil
call   1050 <assert@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
call   10c0 <base64_decode@plt>
xor    %edi,%edi
cmpl   $0x3,0xc(%rsp)
sete   %dil
call   1050 <assert@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10c0 <base64_decode@plt>
xor    %edi,%edi
cmpl   $0x4,0xc(%rsp)
sete   %dil
call   1050 <assert@plt>
movl   $0x0,0x10(%rsp)
lea    0x10(%rsp),%r15
mov    %r15,%rdi
xor    %esi,%esi
call   1070 <base64_encode@plt>
mov    %rax,%rdi
lea    0xc57(%rip),%rsi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
mov    %r15,%rdi
mov    $0x1,%esi
call   1070 <base64_encode@plt>
mov    %rax,%rdi
mov    %r12,%rsi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
mov    %r15,%rdi
mov    $0x2,%esi
call   1070 <base64_encode@plt>
mov    %rax,%rdi
mov    %r13,%rsi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
mov    %r15,%rdi
mov    $0x3,%esi
call   1070 <base64_encode@plt>
mov    %rax,%rdi
lea    0xb94(%rip),%rsi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
mov    %r15,%rdi
mov    $0x4,%esi
call   1070 <base64_encode@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
nopl   0x0(%rax,%rax,1)
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14b,0x10(%rsp)
mov    %bl,0x11(%rsp)
lea    (%r14,%rbx,1),%ebp
mov    %bpl,0x12(%rsp)
mov    %r15,%rdi
mov    $0x3,%esi
call   1030 <test_data@plt>
mov    %bpl,0x10(%rsp)
mov    %r14b,0x11(%rsp)
mov    %bl,0x12(%rsp)
mov    %r15,%rdi
mov    $0x3,%esi
call   1030 <test_data@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1500 <main+0x360>
add    $0x1,%r14d
cmp    $0x100,%r14d
jne    14f0 <main+0x350>
movaps 0xaa7(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xaab(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xaaf(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movw   $0x7d22,0x40(%rsp)
lea    0xac7(%rip),%rdi
lea    0xc(%rsp),%rsi
call   10c0 <base64_decode@plt>
mov    0xc(%rsp),%ecx
lea    0x10(%rsp),%rdi
mov    $0x32,%esi
mov    %rax,%rdx
call   1080 <assert_equal@plt>
mov    0x2a35(%rip),%rax
mov    (%rax),%edi
lea    0xadc(%rip),%rsi
call   1060 <fprintf@plt>
xor    %eax,%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [5 x i8] c"AA==\00"
@.str.2 = [5 x i8] c"AAA=\00"
@.str.3 = [5 x i8] c"AAAA\00"
@.str.4 = [9 x i8] c"AAAAAA==\00"
@.str.5 = [9 x i8] c"AAAAAAA=\00"
@.str.6 = [9 x i8] c"AAAAAAAA\00"
@.str.7 = [69 x i8] c"eyJ0byI6ImpzIiwiaWQiOjEsInJlc3VsdCI6e30sImZyb20iOiJzdWJwcm9jZXNzIn0=\00"
@stderr = global i32 0
@.str.8 = [4 x i8] c"OK\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [200 x i8]
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i32 0, i32* %1
%9 = call i32 @base64_length_for_data_length(i32 0)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = call i32 @base64_length_for_data_length(i32 1)
%14 = icmp eq i32 %13, 4
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = call i32 @base64_length_for_data_length(i32 2)
%18 = icmp eq i32 %17, 4
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
%21 = call i32 @base64_length_for_data_length(i32 3)
%22 = icmp eq i32 %21, 4
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
%25 = call i32 @base64_length_for_data_length(i32 4)
%26 = icmp eq i32 %25, 8
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
%29 = call i32 @num_base64_padding_chars_for_data_length(i32 0)
%30 = icmp eq i32 %29, 0
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
%33 = call i32 @num_base64_padding_chars_for_data_length(i32 1)
%34 = icmp eq i32 %33, 2
%35 = zext i1 %34 to i32
%36 = call i32 @assert(i32 %35)
%37 = call i32 @num_base64_padding_chars_for_data_length(i32 2)
%38 = icmp eq i32 %37, 1
%39 = zext i1 %38 to i32
%40 = call i32 @assert(i32 %39)
%41 = call i32 @num_base64_padding_chars_for_data_length(i32 3)
%42 = icmp eq i32 %41, 0
%43 = zext i1 %42 to i32
%44 = call i32 @assert(i32 %43)
%45 = call i32 @num_base64_padding_chars_for_data_length(i32 4)
%46 = icmp eq i32 %45, 2
%47 = zext i1 %46 to i32
%48 = call i32 @assert(i32 %47)
%49 = call i32 @num_base64_padding_chars_for_data_length(i32 5)
%50 = icmp eq i32 %49, 1
%51 = zext i1 %50 to i32
%52 = call i32 @assert(i32 %51)
%53 = call i32 @num_base64_padding_chars_for_data_length(i32 6)
%54 = icmp eq i32 %53, 0
%55 = zext i1 %54 to i32
%56 = call i32 @assert(i32 %55)
%57 = call i32 @data_length_for_base64(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%58 = icmp eq i32 %57, 0
%59 = zext i1 %58 to i32
%60 = call i32 @assert(i32 %59)
%61 = call i32 @data_length_for_base64(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%62 = icmp eq i32 %61, 1
%63 = zext i1 %62 to i32
%64 = call i32 @assert(i32 %63)
%65 = call i32 @data_length_for_base64(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%66 = icmp eq i32 %65, 2
%67 = zext i1 %66 to i32
%68 = call i32 @assert(i32 %67)
%69 = call i32 @data_length_for_base64(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%70 = icmp eq i32 %69, 3
%71 = zext i1 %70 to i32
%72 = call i32 @assert(i32 %71)
%73 = call i32 @data_length_for_base64(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%74 = icmp eq i32 %73, 4
%75 = zext i1 %74 to i32
%76 = call i32 @assert(i32 %75)
%77 = call i32 @data_length_for_base64(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%78 = icmp eq i32 %77, 5
%79 = zext i1 %78 to i32
%80 = call i32 @assert(i32 %79)
%81 = call i32 @data_length_for_base64(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%82 = icmp eq i32 %81, 6
%83 = zext i1 %82 to i32
%84 = call i32 @assert(i32 %83)
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %6
%85 = load i8*, i8** %6
%86 = call i8* @base64_decode(i8* %85, i32* %3)
store i8* %86, i8** %5
%87 = load i32, i32* %3
%88 = icmp eq i32 %87, 0
%89 = zext i1 %88 to i32
%90 = call i32 @assert(i32 %89)
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %6
%91 = load i8*, i8** %6
%92 = call i8* @base64_decode(i8* %91, i32* %3)
store i8* %92, i8** %5
%93 = load i32, i32* %3
%94 = icmp eq i32 %93, 1
%95 = zext i1 %94 to i32
%96 = call i32 @assert(i32 %95)
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %6
%97 = load i8*, i8** %6
%98 = call i8* @base64_decode(i8* %97, i32* %3)
store i8* %98, i8** %5
%99 = load i32, i32* %3
%100 = icmp eq i32 %99, 2
%101 = zext i1 %100 to i32
%102 = call i32 @assert(i32 %101)
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8** %6
%103 = load i8*, i8** %6
%104 = call i8* @base64_decode(i8* %103, i32* %3)
store i8* %104, i8** %5
%105 = load i32, i32* %3
%106 = icmp eq i32 %105, 3
%107 = zext i1 %106 to i32
%108 = call i32 @assert(i32 %107)
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i8** %6
%109 = load i8*, i8** %6
%110 = call i8* @base64_decode(i8* %109, i32* %3)
store i8* %110, i8** %5
%111 = load i32, i32* %3
%112 = icmp eq i32 %111, 4
%113 = zext i1 %112 to i32
%114 = call i32 @assert(i32 %113)
%115 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 3
store i8 0, i8* %115
%116 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 2
store i8 0, i8* %116
%117 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 1
store i8 0, i8* %117
%118 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
store i8 0, i8* %118
%119 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%120 = call i8* @base64_encode(i8* %119, i32 0)
store i8* %120, i8** %6
%121 = load i8*, i8** %6
%122 = call i64 @strcmp(i8* %121, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%123 = icmp eq i64 0, %122
%124 = zext i1 %123 to i32
%125 = call i32 @assert(i32 %124)
%126 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%127 = call i8* @base64_encode(i8* %126, i32 1)
store i8* %127, i8** %6
%128 = load i8*, i8** %6
%129 = call i64 @strcmp(i8* %128, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%130 = icmp eq i64 0, %129
%131 = zext i1 %130 to i32
%132 = call i32 @assert(i32 %131)
%133 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%134 = call i8* @base64_encode(i8* %133, i32 2)
store i8* %134, i8** %6
%135 = load i8*, i8** %6
%136 = call i64 @strcmp(i8* %135, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%137 = icmp eq i64 0, %136
%138 = zext i1 %137 to i32
%139 = call i32 @assert(i32 %138)
%140 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%141 = call i8* @base64_encode(i8* %140, i32 3)
store i8* %141, i8** %6
%142 = load i8*, i8** %6
%143 = call i64 @strcmp(i8* %142, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%144 = icmp eq i64 0, %143
%145 = zext i1 %144 to i32
%146 = call i32 @assert(i32 %145)
%147 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%148 = call i8* @base64_encode(i8* %147, i32 4)
store i8* %148, i8** %6
%149 = load i8*, i8** %6
%150 = call i64 @strcmp(i8* %149, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%151 = icmp eq i64 0, %150
%152 = zext i1 %151 to i32
%153 = call i32 @assert(i32 %152)
store i32 0, i32* %7
br label %154
154: ; preds = %194, %0
%155 = load i32, i32* %7
%156 = icmp slt i32 %155, 256
br i1 %156, label %157, label %197
157: ; preds = %154
store i32 0, i32* %8
br label %158
158: ; preds = %190, %157
%159 = load i32, i32* %8
%160 = icmp slt i32 %159, 256
br i1 %160, label %161, label %193
161: ; preds = %158
%162 = load i32, i32* %7
%163 = trunc i32 %162 to i8
%164 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
store i8 %163, i8* %164
%165 = load i32, i32* %8
%166 = trunc i32 %165 to i8
%167 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 1
store i8 %166, i8* %167
%168 = load i32, i32* %7
%169 = load i32, i32* %8
%170 = add nsw i32 %168, %169
%171 = srem i32 %170, 256
%172 = trunc i32 %171 to i8
%173 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 2
store i8 %172, i8* %173
%174 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%175 = call i32 @test_data(i8* %174, i32 3)
%176 = load i32, i32* %7
%177 = load i32, i32* %8
%178 = add nsw i32 %176, %177
%179 = srem i32 %178, 256
%180 = trunc i32 %179 to i8
%181 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
store i8 %180, i8* %181
%182 = load i32, i32* %7
%183 = trunc i32 %182 to i8
%184 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 1
store i8 %183, i8* %184
%185 = load i32, i32* %8
%186 = trunc i32 %185 to i8
%187 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 2
store i8 %186, i8* %187
%188 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%189 = call i32 @test_data(i8* %188, i32 3)
br label %190
190: ; preds = %161
%191 = load i32, i32* %8
%192 = add nsw i32 %191, 1
store i32 %192, i32* %8
br label %158
193: ; preds = %158
br label %194
194: ; preds = %193
%195 = load i32, i32* %7
%196 = add nsw i32 %195, 1
store i32 %196, i32* %7
br label %154
197: ; preds = %154
%198 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
store i8 123, i8* %198
%199 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 1
store i8 34, i8* %199
%200 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 2
store i8 116, i8* %200
%201 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 3
store i8 111, i8* %201
%202 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 4
store i8 34, i8* %202
%203 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 5
store i8 58, i8* %203
%204 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 6
store i8 34, i8* %204
%205 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 7
store i8 106, i8* %205
%206 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 8
store i8 115, i8* %206
%207 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 9
store i8 34, i8* %207
%208 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 10
store i8 44, i8* %208
%209 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 11
store i8 34, i8* %209
%210 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 12
store i8 105, i8* %210
%211 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 13
store i8 100, i8* %211
%212 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 14
store i8 34, i8* %212
%213 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 15
store i8 58, i8* %213
%214 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 16
store i8 49, i8* %214
%215 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 17
store i8 44, i8* %215
%216 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 18
store i8 34, i8* %216
%217 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 19
store i8 114, i8* %217
%218 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 20
store i8 101, i8* %218
%219 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 21
store i8 115, i8* %219
%220 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 22
store i8 117, i8* %220
%221 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 23
store i8 108, i8* %221
%222 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 24
store i8 116, i8* %222
%223 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 25
store i8 34, i8* %223
%224 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 26
store i8 58, i8* %224
%225 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 27
store i8 123, i8* %225
%226 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 28
store i8 125, i8* %226
%227 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 29
store i8 44, i8* %227
%228 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 30
store i8 34, i8* %228
%229 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 31
store i8 102, i8* %229
%230 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 32
store i8 114, i8* %230
%231 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 33
store i8 111, i8* %231
%232 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 34
store i8 109, i8* %232
%233 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 35
store i8 34, i8* %233
%234 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 36
store i8 58, i8* %234
%235 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 37
store i8 34, i8* %235
%236 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 38
store i8 115, i8* %236
%237 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 39
store i8 117, i8* %237
%238 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 40
store i8 98, i8* %238
%239 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 41
store i8 112, i8* %239
%240 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 42
store i8 114, i8* %240
%241 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 43
store i8 111, i8* %241
%242 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 44
store i8 99, i8* %242
%243 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 45
store i8 101, i8* %243
%244 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 46
store i8 115, i8* %244
%245 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 47
store i8 115, i8* %245
%246 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 48
store i8 34, i8* %246
%247 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 49
store i8 125, i8* %247
store i32 50, i32* %2
%248 = call i8* @base64_decode(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.7, i64 0, i64 0), i32* %3)
store i8* %248, i8** %5
%249 = getelementptr inbounds [200 x i8], [200 x i8]* %4, i64 0, i64 0
%250 = load i32, i32* %2
%251 = load i8*, i8** %5
%252 = load i32, i32* %3
%253 = call i32 @assert_equal(i8* %249, i32 %250, i8* %251, i32 %252)
%254 = load i32, i32* @stderr
%255 = call i32 @fprintf(i32 %254, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [5 x i8] c"AA==\00"
@.str.2 = [5 x i8] c"AAA=\00"
@.str.3 = [5 x i8] c"AAAA\00"
@.str.4 = [9 x i8] c"AAAAAA==\00"
@.str.5 = [9 x i8] c"AAAAAAA=\00"
@.str.6 = [9 x i8] c"AAAAAAAA\00"
@.str.7 = [69 x i8] c"eyJ0byI6ImpzIiwiaWQiOjEsInJlc3VsdCI6e30sImZyb20iOiJzdWJwcm9jZXNzIn0=\00"
@stderr = global i32 0
@.str.8 = [4 x i8] c"OK\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [200 x i8]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 0
%5 = tail call i32 @base64_length_for_data_length(i32 0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @base64_length_for_data_length(i32 1)
%10 = icmp eq i32 %9, 4
%11 = zext i1 %10 to i32
%12 = tail call i32 @assert(i32 %11)
%13 = tail call i32 @base64_length_for_data_length(i32 2)
%14 = icmp eq i32 %13, 4
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = tail call i32 @base64_length_for_data_length(i32 3)
%18 = icmp eq i32 %17, 4
%19 = zext i1 %18 to i32
%20 = tail call i32 @assert(i32 %19)
%21 = tail call i32 @base64_length_for_data_length(i32 4)
%22 = icmp eq i32 %21, 8
%23 = zext i1 %22 to i32
%24 = tail call i32 @assert(i32 %23)
%25 = tail call i32 @num_base64_padding_chars_for_data_length(i32 0)
%26 = icmp eq i32 %25, 0
%27 = zext i1 %26 to i32
%28 = tail call i32 @assert(i32 %27)
%29 = tail call i32 @num_base64_padding_chars_for_data_length(i32 1)
%30 = icmp eq i32 %29, 2
%31 = zext i1 %30 to i32
%32 = tail call i32 @assert(i32 %31)
%33 = tail call i32 @num_base64_padding_chars_for_data_length(i32 2)
%34 = icmp eq i32 %33, 1
%35 = zext i1 %34 to i32
%36 = tail call i32 @assert(i32 %35)
%37 = tail call i32 @num_base64_padding_chars_for_data_length(i32 3)
%38 = icmp eq i32 %37, 0
%39 = zext i1 %38 to i32
%40 = tail call i32 @assert(i32 %39)
%41 = tail call i32 @num_base64_padding_chars_for_data_length(i32 4)
%42 = icmp eq i32 %41, 2
%43 = zext i1 %42 to i32
%44 = tail call i32 @assert(i32 %43)
%45 = tail call i32 @num_base64_padding_chars_for_data_length(i32 5)
%46 = icmp eq i32 %45, 1
%47 = zext i1 %46 to i32
%48 = tail call i32 @assert(i32 %47)
%49 = tail call i32 @num_base64_padding_chars_for_data_length(i32 6)
%50 = icmp eq i32 %49, 0
%51 = zext i1 %50 to i32
%52 = tail call i32 @assert(i32 %51)
%53 = tail call i32 @data_length_for_base64(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%54 = icmp eq i32 %53, 0
%55 = zext i1 %54 to i32
%56 = tail call i32 @assert(i32 %55)
%57 = tail call i32 @data_length_for_base64(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%58 = icmp eq i32 %57, 1
%59 = zext i1 %58 to i32
%60 = tail call i32 @assert(i32 %59)
%61 = tail call i32 @data_length_for_base64(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%62 = icmp eq i32 %61, 2
%63 = zext i1 %62 to i32
%64 = tail call i32 @assert(i32 %63)
%65 = tail call i32 @data_length_for_base64(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%66 = icmp eq i32 %65, 3
%67 = zext i1 %66 to i32
%68 = tail call i32 @assert(i32 %67)
%69 = tail call i32 @data_length_for_base64(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%70 = icmp eq i32 %69, 4
%71 = zext i1 %70 to i32
%72 = tail call i32 @assert(i32 %71)
%73 = tail call i32 @data_length_for_base64(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
%74 = icmp eq i32 %73, 5
%75 = zext i1 %74 to i32
%76 = tail call i32 @assert(i32 %75)
%77 = tail call i32 @data_length_for_base64(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%78 = icmp eq i32 %77, 6
%79 = zext i1 %78 to i32
%80 = tail call i32 @assert(i32 %79)
%81 = call i8* @base64_decode(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32* %1)
%82 = load i32, i32* %1
%83 = icmp eq i32 %82, 0
%84 = zext i1 %83 to i32
%85 = call i32 @assert(i32 %84)
%86 = call i8* @base64_decode(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%87 = load i32, i32* %1
%88 = icmp eq i32 %87, 1
%89 = zext i1 %88 to i32
%90 = call i32 @assert(i32 %89)
%91 = call i8* @base64_decode(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%92 = load i32, i32* %1
%93 = icmp eq i32 %92, 2
%94 = zext i1 %93 to i32
%95 = call i32 @assert(i32 %94)
%96 = call i8* @base64_decode(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32* %1)
%97 = load i32, i32* %1
%98 = icmp eq i32 %97, 3
%99 = zext i1 %98 to i32
%100 = call i32 @assert(i32 %99)
%101 = call i8* @base64_decode(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0), i32* %1)
%102 = load i32, i32* %1
%103 = icmp eq i32 %102, 4
%104 = zext i1 %103 to i32
%105 = call i32 @assert(i32 %104)
%106 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 2
%107 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 1
%108 = bitcast [200 x i8]* %2 to i32*
store i32 0, i32* %108
%109 = call i8* @base64_encode(i8* %4, i32 0)
%110 = call i64 @strcmp(i8* %109, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%111 = icmp eq i64 %110, 0
%112 = zext i1 %111 to i32
%113 = call i32 @assert(i32 %112)
%114 = call i8* @base64_encode(i8* %4, i32 1)
%115 = call i64 @strcmp(i8* %114, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%116 = icmp eq i64 %115, 0
%117 = zext i1 %116 to i32
%118 = call i32 @assert(i32 %117)
%119 = call i8* @base64_encode(i8* %4, i32 2)
%120 = call i64 @strcmp(i8* %119, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%121 = icmp eq i64 %120, 0
%122 = zext i1 %121 to i32
%123 = call i32 @assert(i32 %122)
%124 = call i8* @base64_encode(i8* %4, i32 3)
%125 = call i64 @strcmp(i8* %124, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%126 = icmp eq i64 %125, 0
%127 = zext i1 %126 to i32
%128 = call i32 @assert(i32 %127)
%129 = call i8* @base64_encode(i8* %4, i32 4)
%130 = call i64 @strcmp(i8* %129, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.4, i64 0, i64 0))
%131 = icmp eq i64 %130, 0
%132 = zext i1 %131 to i32
%133 = call i32 @assert(i32 %132)
br label %134
134: ; preds = %0, %146
%135 = phi i32 [ 0, %0 ], [ %147, %146 ]
%136 = trunc i32 %135 to i8
br label %137
137: ; preds = %134, %137
%138 = phi i32 [ 0, %134 ], [ %144, %137 ]
store i8 %136, i8* %4
%139 = trunc i32 %138 to i8
store i8 %139, i8* %107
%140 = add nuw nsw i32 %138, %135
%141 = trunc i32 %140 to i8
store i8 %141, i8* %106
%142 = call i32 @test_data(i8* %4, i32 3)
store i8 %141, i8* %4
store i8 %136, i8* %107
store i8 %139, i8* %106
%143 = call i32 @test_data(i8* %4, i32 3)
%144 = add nuw nsw i32 %138, 1
%145 = icmp eq i32 %144, 256
br i1 %145, label %146, label %137
146: ; preds = %137
%147 = add nuw nsw i32 %135, 1
%148 = icmp eq i32 %147, 256
br i1 %148, label %149, label %134
149: ; preds = %146
%150 = bitcast [200 x i8]* %2 to <16 x i8>*
store <16 x i8> <i8 123, i8 34, i8 116, i8 111, i8 34, i8 58, i8 34, i8 106, i8 115, i8 34, i8 44, i8 34, i8 105, i8 100, i8 34, i8 58>, <16 x i8>* %150
%151 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 16
%152 = bitcast i8* %151 to <16 x i8>*
store <16 x i8> <i8 49, i8 44, i8 34, i8 114, i8 101, i8 115, i8 117, i8 108, i8 116, i8 34, i8 58, i8 123, i8 125, i8 44, i8 34, i8 102>, <16 x i8>* %152
%153 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 32
%154 = bitcast i8* %153 to <16 x i8>*
store <16 x i8> <i8 114, i8 111, i8 109, i8 34, i8 58, i8 34, i8 115, i8 117, i8 98, i8 112, i8 114, i8 111, i8 99, i8 101, i8 115, i8 115>, <16 x i8>* %154
%155 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 48
store i8 34, i8* %155
%156 = getelementptr inbounds [200 x i8], [200 x i8]* %2, i64 0, i64 49
store i8 125, i8* %156
%157 = call i8* @base64_decode(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.7, i64 0, i64 0), i32* %1)
%158 = load i32, i32* %1
%159 = call i32 @assert_equal(i8* %4, i32 50, i8* %157, i32 %158)
%160 = load i32, i32* @stderr
%161 = call i32 @fprintf(i32 %160, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0))
ret i32 0
}