#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 base64dec(unsigned char *, char *, int);
int /*<<< orphan*/ base64enc(char *, char *, int);
int base64enc_str(char *, char *, int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ puts(char *);
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  int ret = 0, tests = 0;
  char b64str[64 + 1];
  unsigned char raw[((64 / 4) * 3) + 1];
  {
    tests++;
    if (!(1 == 1)) {
      ret++;
      puts("test "
           "1 == 1"
           " failed");
    }
  };
  {
    tests++;
    if (!((((0 + 2) / 3) * 4) == 0)) {
      ret++;
      puts("test "
           "BASE64ENC_BYTES(0) == 0"
           " failed");
    }
  };
  {
    tests++;
    if (!((((1 + 2) / 3) * 4) == 4)) {
      ret++;
      puts("test "
           "BASE64ENC_BYTES(1) == 4"
           " failed");
    }
  };
  {
    tests++;
    if (!((((2 + 2) / 3) * 4) == 4)) {
      ret++;
      puts("test "
           "BASE64ENC_BYTES(2) == 4"
           " failed");
    }
  };
  {
    tests++;
    if (!((((3 + 2) / 3) * 4) == 4)) {
      ret++;
      puts("test "
           "BASE64ENC_BYTES(3) == 4"
           " failed");
    }
  };
  {
    tests++;
    if (!((((4 + 2) / 3) * 4) == 8)) {
      ret++;
      puts("test "
           "BASE64ENC_BYTES(4) == 8"
           " failed");
    }
  };
  {
    tests++;
    if (!((((5 + 2) / 3) * 4) == 8)) {
      ret++;
      puts("test "
           "BASE64ENC_BYTES(5) == 8"
           " failed");
    }
  };
  {
    tests++;
    if (!((((6 + 2) / 3) * 4) == 8)) {
      ret++;
      puts("test "
           "BASE64ENC_BYTES(6) == 8"
           " failed");
    }
  };
  {
    tests++;
    if (!((((7 + 2) / 3) * 4) == 12)) {
      ret++;
      puts("test "
           "BASE64ENC_BYTES(7) == 12"
           " failed");
    }
  };
  {
    tests++;
    if (!(((12 / 4) * 3) == 9)) {
      ret++;
      puts("test "
           "BASE64DEC_BYTES(12) == 9"
           " failed");
    }
  };
  {
    tests++;
    if (!(((8 / 4) * 3) == 6)) {
      ret++;
      puts("test "
           "BASE64DEC_BYTES(8) == 6"
           " failed");
    }
  };
  {
    tests++;
    if (!(((4 / 4) * 3) == 3)) {
      ret++;
      puts("test "
           "BASE64DEC_BYTES(4) == 3"
           " failed");
    }
  };
  base64enc(b64str, U"a", 1);
  {
    tests++;
    if (!((strcmp((b64str), ("YQ==")) == 0))) {
      ret++;
      puts("test "
           "str_equal(b64str, \"YQ==\")"
           " failed");
    }
  };
  {
    tests++;
    if (!(base64dec(raw, b64str, sizeof raw) == 1)) {
      ret++;
      puts("test "
           "base64dec(raw, b64str, sizeof raw) == 1"
           " failed");
    }
  };
  {
    tests++;
    if (!((strcmp(((char *)raw), ("a")) == 0))) {
      ret++;
      puts("test "
           "str_equal(C raw, \"a\")"
           " failed");
    }
  };
  base64enc(b64str, U"aa", 2);
  {
    tests++;
    if (!((strcmp((b64str), ("YWE=")) == 0))) {
      ret++;
      puts("test "
           "str_equal(b64str, \"YWE=\")"
           " failed");
    }
  };
  {
    tests++;
    if (!(base64dec(raw, b64str, sizeof raw) == 2)) {
      ret++;
      puts("test "
           "base64dec(raw, b64str, sizeof raw) == 2"
           " failed");
    }
  };
  {
    tests++;
    if (!((strcmp(((char *)raw), ("aa")) == 0))) {
      ret++;
      puts("test "
           "str_equal(C raw, \"aa\")"
           " failed");
    }
  };
  base64enc(b64str, U"aaa", 3);
  {
    tests++;
    if (!((strcmp((b64str), ("YWFh")) == 0))) {
      ret++;
      puts("test "
           "str_equal(b64str, \"YWFh\")"
           " failed");
    }
  };
  {
    tests++;
    if (!(base64dec(raw, b64str, sizeof raw) == 3)) {
      ret++;
      puts("test "
           "base64dec(raw, b64str, sizeof raw) == 3"
           " failed");
    }
  };
  {
    tests++;
    if (!((strcmp(((char *)raw), ("aaa")) == 0))) {
      ret++;
      puts("test "
           "str_equal(C raw, \"aaa\")"
           " failed");
    }
  };
  {
    tests++;
    if (!(base64enc_str(b64str, U"AAAA", sizeof 2) == 0)) {
      ret++;
      puts("test "
           "base64enc_str(b64str, U\"AAAA\", sizeof 2) == 0"
           " failed");
    }
  };
  {
    tests++;
    if (!(base64enc_str(b64str, U"AAAA", sizeof b64str) == 1)) {
      ret++;
      puts("test "
           "base64enc_str(b64str, U\"AAAA\", sizeof b64str) == 1"
           " failed");
    }
  };
  {
    tests++;
    if (!((strcmp((b64str), ("QUFBQQ==")) == 0))) {
      ret++;
      puts("test "
           "str_equal(b64str, \"QUFBQQ==\")"
           " failed");
    }
  };
  {
    tests++;
    if (!(base64dec(raw, b64str, sizeof raw) == 4)) {
      ret++;
      puts("test "
           "base64dec(raw, b64str, sizeof raw) == 4"
           " failed");
    }
  };
  {
    tests++;
    if (!((strcmp(((char *)raw), ("AAAA")) == 0))) {
      ret++;
      puts("test "
           "str_equal(C raw, \"AAAA\")"
           " failed");
    }
  };
  base64enc(b64str, U"AAAA", 4);
  {
    tests++;
    if (!((strcmp((b64str), ("QUFBQQ==")) == 0))) {
      ret++;
      puts("test "
           "str_equal(b64str, \"QUFBQQ==\")"
           " failed");
    }
  };
  {
    tests++;
    if (!(base64dec(raw, b64str, sizeof raw) == 4)) {
      ret++;
      puts("test "
           "base64dec(raw, b64str, sizeof raw) == 4"
           " failed");
    }
  };
  {
    tests++;
    if (!((strcmp(((char *)raw), ("AAAA")) == 0))) {
      ret++;
      puts("test "
           "str_equal(C raw, \"AAAA\")"
           " failed");
    }
  };
  base64enc(b64str, U"\x01\x02\x03\x04\x05", 5);
  {
    tests++;
    if (!((strcmp((b64str), ("AQIDBAU=")) == 0))) {
      ret++;
      puts("test "
           "str_equal(b64str, \"AQIDBAU=\")"
           " failed");
    }
  };
  {
    tests++;
    if (!(base64dec(raw, b64str, sizeof raw) == 5)) {
      ret++;
      puts("test "
           "base64dec(raw, b64str, sizeof raw) == 5"
           " failed");
    }
  };
  {
    tests++;
    if (!((strcmp(((char *)raw), ("\x01\x02\x03\x04\x05")) == 0))) {
      ret++;
      puts("test "
           "str_equal(C raw, \"\\x01\\x02\\x03\\x04\\x05\")"
           " failed");
    }
  };
  {
    tests++;
    if (!(base64dec(raw, "=QIDBAU=", sizeof raw) == 0)) {
      ret++;
      puts("test "
           "base64dec(raw, \"=QIDBAU=\", sizeof raw) == 0"
           " failed");
    }
  };
  {
    tests++;
    if (!(base64dec(raw, "AQ(DBAU=", sizeof raw) == 0)) {
      ret++;
      puts("test "
           "base64dec(raw, \"AQ(DBAU=\", sizeof raw) == 0"
           " failed");
    }
  };
  {
    tests++;
    if (!(base64dec(raw, "AQIDB@U=", sizeof raw) == 0)) {
      ret++;
      puts("test "
           "base64dec(raw, \"AQIDB@U=\", sizeof raw) == 0"
           " failed");
    }
  };
  {
    tests++;
    if (!(base64dec(raw, "AQIDBAU==", sizeof raw) == 0)) {
      ret++;
      puts("test "
           "base64dec(raw, \"AQIDBAU==\", sizeof raw) == 0"
           " failed");
    }
  };
  {
    tests++;
    if (!(base64dec(raw, "AQIDB===", sizeof raw) == 0)) {
      ret++;
      puts("test "
           "base64dec(raw, \"AQIDB===\", sizeof raw) == 0"
           " failed");
    }
  };
  base64enc(b64str,
            U"\x26\xC7\x1B\x28\xFE\xB0\x90\x08\x5A\xDE\xC6\xE0\xF0\xF4\x76\xDD",
            16);
  {
    tests++;
    if (!((strcmp((b64str), ("JscbKP6wkAha3sbg8PR23Q==")) == 0))) {
      ret++;
      puts("test "
           "str_equal(b64str, \"JscbKP6wkAha3sbg8PR23Q==\")"
           " failed");
    }
  };
  {
    tests++;
    if (!(base64dec(raw, b64str, sizeof raw) == 16)) {
      ret++;
      puts("test "
           "base64dec(raw, b64str, sizeof raw) == 16"
           " failed");
    }
  };
  {
    tests++;
    if (!((strcmp(((char *)raw), ("\x26\xC7\x1B\x28\xFE\xB0\x90\x08\x5A\xDE\xC6"
                                  "\xE0\xF0\xF4\x76\xDD")) == 0))) {
      ret++;
      puts("test "
           "str_equal(C raw, "
           "\"\\x26\\xC7\\x1B\\x28\\xFE\\xB0\\x90\\x08\\x5A\\xDE\\xC6\\xE0\\xF0"
           "\\xF4\\x76\\xDD\")"
           " failed");
    }
  };
  base64enc(b64str, U"\xF3\x9B\x70\xA5\x63\xFA\x54\x86\xD1", 9);
  {
    tests++;
    if (!((strcmp((b64str), ("85twpWP6VIbR")) == 0))) {
      ret++;
      puts("test "
           "str_equal(b64str, \"85twpWP6VIbR\")"
           " failed");
    }
  };
  {
    tests++;
    if (!(base64dec(raw, b64str, sizeof raw) == 9)) {
      ret++;
      puts("test "
           "base64dec(raw, b64str, sizeof raw) == 9"
           " failed");
    }
  };
  {
    tests++;
    if (!((strcmp(((char *)raw), ("\xF3\x9B\x70\xA5\x63\xFA\x54\x86\xD1")) ==
           0))) {
      ret++;
      puts("test "
           "str_equal(C raw, \"\\xF3\\x9B\\x70\\xA5\\x63\\xFA\\x54\\x86\\xD1\")"
           " failed");
    }
  };
  printf("%d out of %d tests failed.\n", ret, tests);
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xe0a(%rip),%rsi
mov    $0x1,%edx
call   1080 <base64enc@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xe8c(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1240 <main+0xe0>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xe72(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x1,%eax
je     127c <main+0x11c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xe5c(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xf79(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     12b7 <main+0x157>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xe55(%rip),%rdi
call   1040 <puts@plt>
lea    -0x60(%rbp),%rdi
lea    0xd42(%rip),%rsi
mov    $0x2,%edx
call   1080 <base64enc@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xe49(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1304 <main+0x1a4>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xe2f(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x2,%eax
je     1340 <main+0x1e0>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xe19(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xeb4(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     137b <main+0x21b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xe12(%rip),%rdi
call   1040 <puts@plt>
lea    -0x60(%rbp),%rdi
lea    0xc7a(%rip),%rsi
mov    $0x3,%edx
call   1080 <base64enc@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xe07(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     13c8 <main+0x268>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xded(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x3,%eax
je     1404 <main+0x2a4>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xdd7(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xdef(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     143f <main+0x2df>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xdd4(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xbbd(%rip),%rsi
mov    $0x4,%edx
call   1070 <base64enc_str@plt>
cmp    $0x0,%eax
je     147b <main+0x31b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xdbc(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xb81(%rip),%rsi
mov    $0x41,%edx
call   1070 <base64enc_str@plt>
cmp    $0x1,%eax
je     14b7 <main+0x357>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xdba(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xde0(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     14ef <main+0x38f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xdca(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x4,%eax
je     152b <main+0x3cb>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xdb8(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xdd0(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1566 <main+0x406>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xdb6(%rip),%rdi
call   1040 <puts@plt>
lea    -0x60(%rbp),%rdi
lea    0xa9f(%rip),%rsi
mov    $0x4,%edx
call   1080 <base64enc@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xd1c(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     15b3 <main+0x453>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xd06(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x4,%eax
je     15ef <main+0x48f>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xcf4(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xd0c(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     162a <main+0x4ca>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xcf2(%rip),%rdi
call   1040 <puts@plt>
lea    -0x60(%rbp),%rdi
lea    0x9ef(%rip),%rsi
mov    $0x5,%edx
call   1080 <base64enc@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xce9(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1677 <main+0x517>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xcd3(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x5,%eax
je     16b3 <main+0x553>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xcc1(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xcd9(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     16ee <main+0x58e>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xcc0(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xcd9(%rip),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x0,%eax
je     172d <main+0x5cd>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xcbf(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xcdb(%rip),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x0,%eax
je     176c <main+0x60c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xcc1(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xcdd(%rip),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x0,%eax
je     17ab <main+0x64b>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xcc3(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xcdf(%rip),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x0,%eax
je     17ea <main+0x68a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xcc6(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xce3(%rip),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x0,%eax
je     1829 <main+0x6c9>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xcc9(%rip),%rdi
call   1040 <puts@plt>
lea    -0x60(%rbp),%rdi
lea    0x808(%rip),%rsi
mov    $0x10,%edx
call   1080 <base64enc@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xcd3(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1876 <main+0x716>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xccd(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x10,%eax
je     18b2 <main+0x752>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xccb(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xce4(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     18ed <main+0x78d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xcd6(%rip),%rdi
call   1040 <puts@plt>
lea    -0x60(%rbp),%rdi
lea    0x788(%rip),%rsi
mov    $0x9,%edx
call   1080 <base64enc@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xd09(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     193a <main+0x7da>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xcf7(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    -0x60(%rbp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x9,%eax
je     1976 <main+0x816>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xce9(%rip),%rdi
call   1040 <puts@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
lea    -0xa0(%rbp),%rdi
lea    0xd01(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     19b1 <main+0x851>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    0xcec(%rip),%rdi
call   1040 <puts@plt>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
lea    0xd1f(%rip),%rdi
call   1050 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x88,%rsp
lea    0xe97(%rip),%rsi
lea    0x40(%rsp),%r14
mov    $0x1,%ebx
mov    %r14,%rdi
mov    $0x1,%edx
call   1080 <base64enc@plt>
lea    0xf19(%rip),%rsi
mov    %r14,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     11aa <main+0x4a>
lea    0xf0a(%rip),%rdi
call   1040 <puts@plt>
jmp    11ac <main+0x4c>
xor    %ebx,%ebx
mov    %rsp,%rdi
lea    0x40(%rsp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x1,%eax
je     11d2 <main+0x72>
add    $0x1,%ebx
lea    0xf06(%rip),%rdi
call   1040 <puts@plt>
lea    0x1033(%rip),%rsi
mov    %rsp,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     11f5 <main+0x95>
add    $0x1,%ebx
lea    0xf17(%rip),%rdi
call   1040 <puts@plt>
lea    0xe08(%rip),%rsi
lea    0x40(%rsp),%r14
mov    %r14,%rdi
mov    $0x2,%edx
call   1080 <base64enc@plt>
lea    0xf14(%rip),%rsi
mov    %r14,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1231 <main+0xd1>
add    $0x1,%ebx
lea    0xf02(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
lea    0x40(%rsp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x2,%eax
je     1257 <main+0xf7>
add    $0x1,%ebx
lea    0xf02(%rip),%rdi
call   1040 <puts@plt>
lea    0xfad(%rip),%rsi
mov    %rsp,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     127a <main+0x11a>
add    $0x1,%ebx
lea    0xf13(%rip),%rdi
call   1040 <puts@plt>
lea    0xd7f(%rip),%rsi
lea    0x40(%rsp),%r14
mov    %r14,%rdi
mov    $0x3,%edx
call   1080 <base64enc@plt>
lea    0xf11(%rip),%rsi
mov    %r14,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     12b6 <main+0x156>
add    $0x1,%ebx
lea    0xeff(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
lea    0x40(%rsp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x3,%eax
je     12dc <main+0x17c>
add    $0x1,%ebx
lea    0xeff(%rip),%rdi
call   1040 <puts@plt>
lea    0xf27(%rip),%rsi
mov    %rsp,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     12ff <main+0x19f>
add    $0x1,%ebx
lea    0xf14(%rip),%rdi
call   1040 <puts@plt>
lea    0xd0a(%rip),%rsi
lea    0x40(%rsp),%rdi
mov    $0x4,%edx
call   1070 <base64enc_str@plt>
test   %eax,%eax
je     1328 <main+0x1c8>
add    $0x1,%ebx
lea    0xf0f(%rip),%rdi
call   1040 <puts@plt>
lea    0xce1(%rip),%rsi
lea    0x40(%rsp),%rdi
mov    $0x41,%edx
call   1070 <base64enc_str@plt>
cmp    $0x1,%eax
je     1352 <main+0x1f2>
add    $0x1,%ebx
lea    0xf1f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf52(%rip),%rsi
lea    0x40(%rsp),%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1377 <main+0x217>
add    $0x1,%ebx
lea    0xf42(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
lea    0x40(%rsp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x4,%eax
je     139d <main+0x23d>
add    $0x1,%ebx
lea    0xf46(%rip),%rdi
call   1040 <puts@plt>
lea    0xf6e(%rip),%rsi
mov    %rsp,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     13c0 <main+0x260>
add    $0x1,%ebx
lea    0xf5c(%rip),%rdi
call   1040 <puts@plt>
lea    0xc49(%rip),%rsi
lea    0x40(%rsp),%r14
mov    %r14,%rdi
mov    $0x4,%edx
call   1080 <base64enc@plt>
lea    0xecb(%rip),%rsi
mov    %r14,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     13fc <main+0x29c>
add    $0x1,%ebx
lea    0xebd(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
lea    0x40(%rsp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x4,%eax
je     1422 <main+0x2c2>
add    $0x1,%ebx
lea    0xec1(%rip),%rdi
call   1040 <puts@plt>
lea    0xee9(%rip),%rsi
mov    %rsp,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1445 <main+0x2e5>
add    $0x1,%ebx
lea    0xed7(%rip),%rdi
call   1040 <puts@plt>
lea    0xbd8(%rip),%rsi
lea    0x40(%rsp),%r14
mov    %r14,%rdi
mov    $0x5,%edx
call   1080 <base64enc@plt>
lea    0xed7(%rip),%rsi
mov    %r14,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1481 <main+0x321>
add    $0x1,%ebx
lea    0xec9(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
lea    0x40(%rsp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x5,%eax
je     14a7 <main+0x347>
add    $0x1,%ebx
lea    0xecd(%rip),%rdi
call   1040 <puts@plt>
lea    0xef5(%rip),%rsi
mov    %rsp,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     14ca <main+0x36a>
add    $0x1,%ebx
lea    0xee4(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0d(%rip),%rsi
mov    %rsp,%rdi
mov    $0x31,%edx
call   1030 <base64dec@plt>
test   %eax,%eax
je     14f1 <main+0x391>
add    $0x1,%ebx
lea    0xefb(%rip),%rdi
call   1040 <puts@plt>
lea    0xf27(%rip),%rsi
mov    %rsp,%rdi
mov    $0x31,%edx
call   1030 <base64dec@plt>
test   %eax,%eax
je     1518 <main+0x3b8>
add    $0x1,%ebx
lea    0xf15(%rip),%rdi
call   1040 <puts@plt>
lea    0xf41(%rip),%rsi
mov    %rsp,%rdi
mov    $0x31,%edx
call   1030 <base64dec@plt>
test   %eax,%eax
je     153f <main+0x3df>
add    $0x1,%ebx
lea    0xf2f(%rip),%rdi
call   1040 <puts@plt>
lea    0xf5b(%rip),%rsi
mov    %rsp,%rdi
mov    $0x31,%edx
call   1030 <base64dec@plt>
test   %eax,%eax
je     1566 <main+0x406>
add    $0x1,%ebx
lea    0xf4a(%rip),%rdi
call   1040 <puts@plt>
lea    0xf77(%rip),%rsi
mov    %rsp,%rdi
mov    $0x31,%edx
call   1030 <base64dec@plt>
test   %eax,%eax
je     158d <main+0x42d>
add    $0x1,%ebx
lea    0xf65(%rip),%rdi
call   1040 <puts@plt>
lea    0xaa8(%rip),%rsi
lea    0x40(%rsp),%r14
mov    %r14,%rdi
mov    $0x10,%edx
call   1080 <base64enc@plt>
lea    0xf78(%rip),%rsi
mov    %r14,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     15c9 <main+0x469>
add    $0x1,%ebx
lea    0xf7a(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
lea    0x40(%rsp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x10,%eax
je     15ef <main+0x48f>
add    $0x1,%ebx
lea    0xf8e(%rip),%rdi
call   1040 <puts@plt>
lea    0xfb7(%rip),%rsi
mov    %rsp,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1612 <main+0x4b2>
add    $0x1,%ebx
lea    0xfb1(%rip),%rdi
call   1040 <puts@plt>
lea    0xa67(%rip),%rsi
lea    0x40(%rsp),%r14
mov    %r14,%rdi
mov    $0x9,%edx
call   1080 <base64enc@plt>
lea    0xfed(%rip),%rsi
mov    %r14,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     164e <main+0x4ee>
add    $0x1,%ebx
lea    0xfe3(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rdi
lea    0x40(%rsp),%rsi
mov    $0x31,%edx
call   1030 <base64dec@plt>
cmp    $0x9,%eax
je     1674 <main+0x514>
add    $0x1,%ebx
lea    0xfeb(%rip),%rdi
call   1040 <puts@plt>
lea    0x1013(%rip),%rsi
mov    %rsp,%rdi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1697 <main+0x537>
add    $0x1,%ebx
lea    0x1006(%rip),%rdi
call   1040 <puts@plt>
lea    0x103f(%rip),%rdi
mov    %ebx,%esi
mov    $0x2b,%edx
call   1050 <printf@plt>
mov    %ebx,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i32] [i32 97, i32 0]
@.str.1 = [5 x i8] c"YQ==\00"
@.str.2 = [38 x i8] c"test str_equal(b64str, \22YQ==\22) failed\00"
@.str.3 = [52 x i8] c"test base64dec(raw, b64str, sizeof raw) == 1 failed\00"
@.str.4 = [2 x i8] c"a\00"
@.str.5 = [34 x i8] c"test str_equal(C raw, \22a\22) failed\00"
@.str.6 = [3 x i32] [i32 97, i32 97, i32 0]
@.str.7 = [5 x i8] c"YWE=\00"
@.str.8 = [38 x i8] c"test str_equal(b64str, \22YWE=\22) failed\00"
@.str.9 = [52 x i8] c"test base64dec(raw, b64str, sizeof raw) == 2 failed\00"
@.str.10 = [3 x i8] c"aa\00"
@.str.11 = [35 x i8] c"test str_equal(C raw, \22aa\22) failed\00"
@.str.12 = [4 x i32] [i32 97, i32 97, i32 97, i32 0]
@.str.13 = [5 x i8] c"YWFh\00"
@.str.14 = [38 x i8] c"test str_equal(b64str, \22YWFh\22) failed\00"
@.str.15 = [52 x i8] c"test base64dec(raw, b64str, sizeof raw) == 3 failed\00"
@.str.16 = [4 x i8] c"aaa\00"
@.str.17 = [36 x i8] c"test str_equal(C raw, \22aaa\22) failed\00"
@.str.18 = [5 x i32] [i32 65, i32 65, i32 65, i32 65, i32 0]
@.str.19 = [58 x i8] c"test base64enc_str(b64str, U\22AAAA\22, sizeof 2) == 0 failed\00"
@.str.20 = [63 x i8] c"test base64enc_str(b64str, U\22AAAA\22, sizeof b64str) == 1 failed\00"
@.str.21 = [9 x i8] c"QUFBQQ==\00"
@.str.22 = [42 x i8] c"test str_equal(b64str, \22QUFBQQ==\22) failed\00"
@.str.23 = [52 x i8] c"test base64dec(raw, b64str, sizeof raw) == 4 failed\00"
@.str.24 = [5 x i8] c"AAAA\00"
@.str.25 = [37 x i8] c"test str_equal(C raw, \22AAAA\22) failed\00"
@.str.26 = [6 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 0]
@.str.27 = [9 x i8] c"AQIDBAU=\00"
@.str.28 = [42 x i8] c"test str_equal(b64str, \22AQIDBAU=\22) failed\00"
@.str.29 = [52 x i8] c"test base64dec(raw, b64str, sizeof raw) == 5 failed\00"
@.str.30 = [6 x i8] c"\01\02\03\04\05\00"
@.str.31 = [53 x i8] c"test str_equal(C raw, \22\\x01\\x02\\x03\\x04\\x05\22) failed\00"
@.str.32 = [9 x i8] c"=QIDBAU=\00"
@.str.33 = [56 x i8] c"test base64dec(raw, \22=QIDBAU=\22, sizeof raw) == 0 failed\00"
@.str.34 = [9 x i8] c"AQ(DBAU=\00"
@.str.35 = [56 x i8] c"test base64dec(raw, \22AQ(DBAU=\22, sizeof raw) == 0 failed\00"
@.str.36 = [9 x i8] c"AQIDB@U=\00"
@.str.37 = [56 x i8] c"test base64dec(raw, \22AQIDB@U=\22, sizeof raw) == 0 failed\00"
@.str.38 = [10 x i8] c"AQIDBAU==\00"
@.str.39 = [57 x i8] c"test base64dec(raw, \22AQIDBAU==\22, sizeof raw) == 0 failed\00"
@.str.40 = [9 x i8] c"AQIDB===\00"
@.str.41 = [56 x i8] c"test base64dec(raw, \22AQIDB===\22, sizeof raw) == 0 failed\00"
@.str.42 = [17 x i32] [i32 38, i32 199, i32 27, i32 40, i32 254, i32 176, i32 144, i32 8, i32 90, i32 222, i32 198, i32 224, i32 240, i32 244, i32 118, i32 221, i32 0]
@.str.43 = [25 x i8] c"JscbKP6wkAha3sbg8PR23Q==\00"
@.str.44 = [58 x i8] c"test str_equal(b64str, \22JscbKP6wkAha3sbg8PR23Q==\22) failed\00"
@.str.45 = [53 x i8] c"test base64dec(raw, b64str, sizeof raw) == 16 failed\00"
@.str.46 = [17 x i8] c"&\C7\1B(\FE\B0\90\08Z\DE\C6\E0\F0\F4v\DD\00"
@.str.47 = [97 x i8] c"test str_equal(C raw, \22\\x26\\xC7\\x1B\\x28\\xFE\\xB0\\x90\\x08\\x5A\\xDE\\xC6\\xE0\\xF0\\xF4\\x76\\xDD\22) failed\00"
@.str.48 = [10 x i32] [i32 243, i32 155, i32 112, i32 165, i32 99, i32 250, i32 84, i32 134, i32 209, i32 0]
@.str.49 = [13 x i8] c"85twpWP6VIbR\00"
@.str.50 = [46 x i8] c"test str_equal(b64str, \2285twpWP6VIbR\22) failed\00"
@.str.51 = [52 x i8] c"test base64dec(raw, b64str, sizeof raw) == 9 failed\00"
@.str.52 = [10 x i8] c"\F3\9Bp\A5c\FAT\86\D1\00"
@.str.53 = [69 x i8] c"test str_equal(C raw, \22\\xF3\\x9B\\x70\\xA5\\x63\\xFA\\x54\\x86\\xD1\22) failed\00"
@.str.54 = [28 x i8] c"%d out of %d tests failed.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca [65 x i8]
%9 = alloca [49 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
store i32 0, i32* %7
%10 = load i32, i32* %7
%11 = add nsw i32 %10, 1
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = add nsw i32 %12, 1
store i32 %13, i32* %7
%14 = load i32, i32* %7
%15 = add nsw i32 %14, 1
store i32 %15, i32* %7
%16 = load i32, i32* %7
%17 = add nsw i32 %16, 1
store i32 %17, i32* %7
%18 = load i32, i32* %7
%19 = add nsw i32 %18, 1
store i32 %19, i32* %7
%20 = load i32, i32* %7
%21 = add nsw i32 %20, 1
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = add nsw i32 %22, 1
store i32 %23, i32* %7
%24 = load i32, i32* %7
%25 = add nsw i32 %24, 1
store i32 %25, i32* %7
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 1
store i32 %27, i32* %7
%28 = load i32, i32* %7
%29 = add nsw i32 %28, 1
store i32 %29, i32* %7
%30 = load i32, i32* %7
%31 = add nsw i32 %30, 1
store i32 %31, i32* %7
%32 = load i32, i32* %7
%33 = add nsw i32 %32, 1
store i32 %33, i32* %7
%34 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%35 = call i32 @base64enc(i8* %34, i8* bitcast ([2 x i32]* @.str to i8*), i32 1)
%36 = load i32, i32* %7
%37 = add nsw i32 %36, 1
store i32 %37, i32* %7
%38 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%39 = call i64 @strcmp(i8* %38, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%40 = icmp eq i64 %39, 0
br i1 %40, label %45, label %41
41: ; preds = %2
%42 = load i32, i32* %6
%43 = add nsw i32 %42, 1
store i32 %43, i32* %6
%44 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
br label %45
45: ; preds = %41, %2
%46 = load i32, i32* %7
%47 = add nsw i32 %46, 1
store i32 %47, i32* %7
%48 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%49 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%50 = call i32 @base64dec(i8* %48, i8* %49, i32 49)
%51 = icmp eq i32 %50, 1
br i1 %51, label %56, label %52
52: ; preds = %45
%53 = load i32, i32* %6
%54 = add nsw i32 %53, 1
store i32 %54, i32* %6
%55 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
br label %56
56: ; preds = %52, %45
%57 = load i32, i32* %7
%58 = add nsw i32 %57, 1
store i32 %58, i32* %7
%59 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%60 = call i64 @strcmp(i8* %59, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%61 = icmp eq i64 %60, 0
br i1 %61, label %66, label %62
62: ; preds = %56
%63 = load i32, i32* %6
%64 = add nsw i32 %63, 1
store i32 %64, i32* %6
%65 = call i32 @puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
br label %66
66: ; preds = %62, %56
%67 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%68 = call i32 @base64enc(i8* %67, i8* bitcast ([3 x i32]* @.str.6 to i8*), i32 2)
%69 = load i32, i32* %7
%70 = add nsw i32 %69, 1
store i32 %70, i32* %7
%71 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%72 = call i64 @strcmp(i8* %71, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%73 = icmp eq i64 %72, 0
br i1 %73, label %78, label %74
74: ; preds = %66
%75 = load i32, i32* %6
%76 = add nsw i32 %75, 1
store i32 %76, i32* %6
%77 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0))
br label %78
78: ; preds = %74, %66
%79 = load i32, i32* %7
%80 = add nsw i32 %79, 1
store i32 %80, i32* %7
%81 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%82 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%83 = call i32 @base64dec(i8* %81, i8* %82, i32 49)
%84 = icmp eq i32 %83, 2
br i1 %84, label %89, label %85
85: ; preds = %78
%86 = load i32, i32* %6
%87 = add nsw i32 %86, 1
store i32 %87, i32* %6
%88 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.9, i64 0, i64 0))
br label %89
89: ; preds = %85, %78
%90 = load i32, i32* %7
%91 = add nsw i32 %90, 1
store i32 %91, i32* %7
%92 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%93 = call i64 @strcmp(i8* %92, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%94 = icmp eq i64 %93, 0
br i1 %94, label %99, label %95
95: ; preds = %89
%96 = load i32, i32* %6
%97 = add nsw i32 %96, 1
store i32 %97, i32* %6
%98 = call i32 @puts(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0))
br label %99
99: ; preds = %95, %89
%100 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%101 = call i32 @base64enc(i8* %100, i8* bitcast ([4 x i32]* @.str.12 to i8*), i32 3)
%102 = load i32, i32* %7
%103 = add nsw i32 %102, 1
store i32 %103, i32* %7
%104 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%105 = call i64 @strcmp(i8* %104, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%106 = icmp eq i64 %105, 0
br i1 %106, label %111, label %107
107: ; preds = %99
%108 = load i32, i32* %6
%109 = add nsw i32 %108, 1
store i32 %109, i32* %6
%110 = call i32 @puts(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.14, i64 0, i64 0))
br label %111
111: ; preds = %107, %99
%112 = load i32, i32* %7
%113 = add nsw i32 %112, 1
store i32 %113, i32* %7
%114 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%115 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%116 = call i32 @base64dec(i8* %114, i8* %115, i32 49)
%117 = icmp eq i32 %116, 3
br i1 %117, label %122, label %118
118: ; preds = %111
%119 = load i32, i32* %6
%120 = add nsw i32 %119, 1
store i32 %120, i32* %6
%121 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.15, i64 0, i64 0))
br label %122
122: ; preds = %118, %111
%123 = load i32, i32* %7
%124 = add nsw i32 %123, 1
store i32 %124, i32* %7
%125 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%126 = call i64 @strcmp(i8* %125, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
%127 = icmp eq i64 %126, 0
br i1 %127, label %132, label %128
128: ; preds = %122
%129 = load i32, i32* %6
%130 = add nsw i32 %129, 1
store i32 %130, i32* %6
%131 = call i32 @puts(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.17, i64 0, i64 0))
br label %132
132: ; preds = %128, %122
%133 = load i32, i32* %7
%134 = add nsw i32 %133, 1
store i32 %134, i32* %7
%135 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%136 = call i32 @base64enc_str(i8* %135, i8* bitcast ([5 x i32]* @.str.18 to i8*), i32 4)
%137 = icmp eq i32 %136, 0
br i1 %137, label %142, label %138
138: ; preds = %132
%139 = load i32, i32* %6
%140 = add nsw i32 %139, 1
store i32 %140, i32* %6
%141 = call i32 @puts(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.19, i64 0, i64 0))
br label %142
142: ; preds = %138, %132
%143 = load i32, i32* %7
%144 = add nsw i32 %143, 1
store i32 %144, i32* %7
%145 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%146 = call i32 @base64enc_str(i8* %145, i8* bitcast ([5 x i32]* @.str.18 to i8*), i32 65)
%147 = icmp eq i32 %146, 1
br i1 %147, label %152, label %148
148: ; preds = %142
%149 = load i32, i32* %6
%150 = add nsw i32 %149, 1
store i32 %150, i32* %6
%151 = call i32 @puts(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.20, i64 0, i64 0))
br label %152
152: ; preds = %148, %142
%153 = load i32, i32* %7
%154 = add nsw i32 %153, 1
store i32 %154, i32* %7
%155 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%156 = call i64 @strcmp(i8* %155, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0))
%157 = icmp eq i64 %156, 0
br i1 %157, label %162, label %158
158: ; preds = %152
%159 = load i32, i32* %6
%160 = add nsw i32 %159, 1
store i32 %160, i32* %6
%161 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.22, i64 0, i64 0))
br label %162
162: ; preds = %158, %152
%163 = load i32, i32* %7
%164 = add nsw i32 %163, 1
store i32 %164, i32* %7
%165 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%166 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%167 = call i32 @base64dec(i8* %165, i8* %166, i32 49)
%168 = icmp eq i32 %167, 4
br i1 %168, label %173, label %169
169: ; preds = %162
%170 = load i32, i32* %6
%171 = add nsw i32 %170, 1
store i32 %171, i32* %6
%172 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.23, i64 0, i64 0))
br label %173
173: ; preds = %169, %162
%174 = load i32, i32* %7
%175 = add nsw i32 %174, 1
store i32 %175, i32* %7
%176 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%177 = call i64 @strcmp(i8* %176, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0))
%178 = icmp eq i64 %177, 0
br i1 %178, label %183, label %179
179: ; preds = %173
%180 = load i32, i32* %6
%181 = add nsw i32 %180, 1
store i32 %181, i32* %6
%182 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.25, i64 0, i64 0))
br label %183
183: ; preds = %179, %173
%184 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%185 = call i32 @base64enc(i8* %184, i8* bitcast ([5 x i32]* @.str.18 to i8*), i32 4)
%186 = load i32, i32* %7
%187 = add nsw i32 %186, 1
store i32 %187, i32* %7
%188 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%189 = call i64 @strcmp(i8* %188, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0))
%190 = icmp eq i64 %189, 0
br i1 %190, label %195, label %191
191: ; preds = %183
%192 = load i32, i32* %6
%193 = add nsw i32 %192, 1
store i32 %193, i32* %6
%194 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.22, i64 0, i64 0))
br label %195
195: ; preds = %191, %183
%196 = load i32, i32* %7
%197 = add nsw i32 %196, 1
store i32 %197, i32* %7
%198 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%199 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%200 = call i32 @base64dec(i8* %198, i8* %199, i32 49)
%201 = icmp eq i32 %200, 4
br i1 %201, label %206, label %202
202: ; preds = %195
%203 = load i32, i32* %6
%204 = add nsw i32 %203, 1
store i32 %204, i32* %6
%205 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.23, i64 0, i64 0))
br label %206
206: ; preds = %202, %195
%207 = load i32, i32* %7
%208 = add nsw i32 %207, 1
store i32 %208, i32* %7
%209 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%210 = call i64 @strcmp(i8* %209, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0))
%211 = icmp eq i64 %210, 0
br i1 %211, label %216, label %212
212: ; preds = %206
%213 = load i32, i32* %6
%214 = add nsw i32 %213, 1
store i32 %214, i32* %6
%215 = call i32 @puts(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.25, i64 0, i64 0))
br label %216
216: ; preds = %212, %206
%217 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%218 = call i32 @base64enc(i8* %217, i8* bitcast ([6 x i32]* @.str.26 to i8*), i32 5)
%219 = load i32, i32* %7
%220 = add nsw i32 %219, 1
store i32 %220, i32* %7
%221 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%222 = call i64 @strcmp(i8* %221, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.27, i64 0, i64 0))
%223 = icmp eq i64 %222, 0
br i1 %223, label %228, label %224
224: ; preds = %216
%225 = load i32, i32* %6
%226 = add nsw i32 %225, 1
store i32 %226, i32* %6
%227 = call i32 @puts(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.28, i64 0, i64 0))
br label %228
228: ; preds = %224, %216
%229 = load i32, i32* %7
%230 = add nsw i32 %229, 1
store i32 %230, i32* %7
%231 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%232 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%233 = call i32 @base64dec(i8* %231, i8* %232, i32 49)
%234 = icmp eq i32 %233, 5
br i1 %234, label %239, label %235
235: ; preds = %228
%236 = load i32, i32* %6
%237 = add nsw i32 %236, 1
store i32 %237, i32* %6
%238 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.29, i64 0, i64 0))
br label %239
239: ; preds = %235, %228
%240 = load i32, i32* %7
%241 = add nsw i32 %240, 1
store i32 %241, i32* %7
%242 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%243 = call i64 @strcmp(i8* %242, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.30, i64 0, i64 0))
%244 = icmp eq i64 %243, 0
br i1 %244, label %249, label %245
245: ; preds = %239
%246 = load i32, i32* %6
%247 = add nsw i32 %246, 1
store i32 %247, i32* %6
%248 = call i32 @puts(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.31, i64 0, i64 0))
br label %249
249: ; preds = %245, %239
%250 = load i32, i32* %7
%251 = add nsw i32 %250, 1
store i32 %251, i32* %7
%252 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%253 = call i32 @base64dec(i8* %252, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.32, i64 0, i64 0), i32 49)
%254 = icmp eq i32 %253, 0
br i1 %254, label %259, label %255
255: ; preds = %249
%256 = load i32, i32* %6
%257 = add nsw i32 %256, 1
store i32 %257, i32* %6
%258 = call i32 @puts(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.33, i64 0, i64 0))
br label %259
259: ; preds = %255, %249
%260 = load i32, i32* %7
%261 = add nsw i32 %260, 1
store i32 %261, i32* %7
%262 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%263 = call i32 @base64dec(i8* %262, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.34, i64 0, i64 0), i32 49)
%264 = icmp eq i32 %263, 0
br i1 %264, label %269, label %265
265: ; preds = %259
%266 = load i32, i32* %6
%267 = add nsw i32 %266, 1
store i32 %267, i32* %6
%268 = call i32 @puts(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.35, i64 0, i64 0))
br label %269
269: ; preds = %265, %259
%270 = load i32, i32* %7
%271 = add nsw i32 %270, 1
store i32 %271, i32* %7
%272 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%273 = call i32 @base64dec(i8* %272, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.36, i64 0, i64 0), i32 49)
%274 = icmp eq i32 %273, 0
br i1 %274, label %279, label %275
275: ; preds = %269
%276 = load i32, i32* %6
%277 = add nsw i32 %276, 1
store i32 %277, i32* %6
%278 = call i32 @puts(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.37, i64 0, i64 0))
br label %279
279: ; preds = %275, %269
%280 = load i32, i32* %7
%281 = add nsw i32 %280, 1
store i32 %281, i32* %7
%282 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%283 = call i32 @base64dec(i8* %282, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.38, i64 0, i64 0), i32 49)
%284 = icmp eq i32 %283, 0
br i1 %284, label %289, label %285
285: ; preds = %279
%286 = load i32, i32* %6
%287 = add nsw i32 %286, 1
store i32 %287, i32* %6
%288 = call i32 @puts(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.39, i64 0, i64 0))
br label %289
289: ; preds = %285, %279
%290 = load i32, i32* %7
%291 = add nsw i32 %290, 1
store i32 %291, i32* %7
%292 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%293 = call i32 @base64dec(i8* %292, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.40, i64 0, i64 0), i32 49)
%294 = icmp eq i32 %293, 0
br i1 %294, label %299, label %295
295: ; preds = %289
%296 = load i32, i32* %6
%297 = add nsw i32 %296, 1
store i32 %297, i32* %6
%298 = call i32 @puts(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.41, i64 0, i64 0))
br label %299
299: ; preds = %295, %289
%300 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%301 = call i32 @base64enc(i8* %300, i8* bitcast ([17 x i32]* @.str.42 to i8*), i32 16)
%302 = load i32, i32* %7
%303 = add nsw i32 %302, 1
store i32 %303, i32* %7
%304 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%305 = call i64 @strcmp(i8* %304, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.43, i64 0, i64 0))
%306 = icmp eq i64 %305, 0
br i1 %306, label %311, label %307
307: ; preds = %299
%308 = load i32, i32* %6
%309 = add nsw i32 %308, 1
store i32 %309, i32* %6
%310 = call i32 @puts(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.44, i64 0, i64 0))
br label %311
311: ; preds = %307, %299
%312 = load i32, i32* %7
%313 = add nsw i32 %312, 1
store i32 %313, i32* %7
%314 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%315 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%316 = call i32 @base64dec(i8* %314, i8* %315, i32 49)
%317 = icmp eq i32 %316, 16
br i1 %317, label %322, label %318
318: ; preds = %311
%319 = load i32, i32* %6
%320 = add nsw i32 %319, 1
store i32 %320, i32* %6
%321 = call i32 @puts(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.45, i64 0, i64 0))
br label %322
322: ; preds = %318, %311
%323 = load i32, i32* %7
%324 = add nsw i32 %323, 1
store i32 %324, i32* %7
%325 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%326 = call i64 @strcmp(i8* %325, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.46, i64 0, i64 0))
%327 = icmp eq i64 %326, 0
br i1 %327, label %332, label %328
328: ; preds = %322
%329 = load i32, i32* %6
%330 = add nsw i32 %329, 1
store i32 %330, i32* %6
%331 = call i32 @puts(i8* getelementptr inbounds ([97 x i8], [97 x i8]* @.str.47, i64 0, i64 0))
br label %332
332: ; preds = %328, %322
%333 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%334 = call i32 @base64enc(i8* %333, i8* bitcast ([10 x i32]* @.str.48 to i8*), i32 9)
%335 = load i32, i32* %7
%336 = add nsw i32 %335, 1
store i32 %336, i32* %7
%337 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%338 = call i64 @strcmp(i8* %337, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.49, i64 0, i64 0))
%339 = icmp eq i64 %338, 0
br i1 %339, label %344, label %340
340: ; preds = %332
%341 = load i32, i32* %6
%342 = add nsw i32 %341, 1
store i32 %342, i32* %6
%343 = call i32 @puts(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.50, i64 0, i64 0))
br label %344
344: ; preds = %340, %332
%345 = load i32, i32* %7
%346 = add nsw i32 %345, 1
store i32 %346, i32* %7
%347 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%348 = getelementptr inbounds [65 x i8], [65 x i8]* %8, i64 0, i64 0
%349 = call i32 @base64dec(i8* %347, i8* %348, i32 49)
%350 = icmp eq i32 %349, 9
br i1 %350, label %355, label %351
351: ; preds = %344
%352 = load i32, i32* %6
%353 = add nsw i32 %352, 1
store i32 %353, i32* %6
%354 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.51, i64 0, i64 0))
br label %355
355: ; preds = %351, %344
%356 = load i32, i32* %7
%357 = add nsw i32 %356, 1
store i32 %357, i32* %7
%358 = getelementptr inbounds [49 x i8], [49 x i8]* %9, i64 0, i64 0
%359 = call i64 @strcmp(i8* %358, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.52, i64 0, i64 0))
%360 = icmp eq i64 %359, 0
br i1 %360, label %365, label %361
361: ; preds = %355
%362 = load i32, i32* %6
%363 = add nsw i32 %362, 1
store i32 %363, i32* %6
%364 = call i32 @puts(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.53, i64 0, i64 0))
br label %365
365: ; preds = %361, %355
%366 = load i32, i32* %6
%367 = load i32, i32* %7
%368 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.54, i64 0, i64 0), i32 %366, i32 %367)
%369 = load i32, i32* %6
ret i32 %369
}

LLVM IR (-O2):
@.str = [2 x i32] [i32 97, i32 0]
@.str.1 = [5 x i8] c"YQ==\00"
@.str.2 = [38 x i8] c"test str_equal(b64str, \22YQ==\22) failed\00"
@.str.3 = [52 x i8] c"test base64dec(raw, b64str, sizeof raw) == 1 failed\00"
@.str.4 = [2 x i8] c"a\00"
@.str.5 = [34 x i8] c"test str_equal(C raw, \22a\22) failed\00"
@.str.6 = [3 x i32] [i32 97, i32 97, i32 0]
@.str.7 = [5 x i8] c"YWE=\00"
@.str.8 = [38 x i8] c"test str_equal(b64str, \22YWE=\22) failed\00"
@.str.9 = [52 x i8] c"test base64dec(raw, b64str, sizeof raw) == 2 failed\00"
@.str.10 = [3 x i8] c"aa\00"
@.str.11 = [35 x i8] c"test str_equal(C raw, \22aa\22) failed\00"
@.str.12 = [4 x i32] [i32 97, i32 97, i32 97, i32 0]
@.str.13 = [5 x i8] c"YWFh\00"
@.str.14 = [38 x i8] c"test str_equal(b64str, \22YWFh\22) failed\00"
@.str.15 = [52 x i8] c"test base64dec(raw, b64str, sizeof raw) == 3 failed\00"
@.str.16 = [4 x i8] c"aaa\00"
@.str.17 = [36 x i8] c"test str_equal(C raw, \22aaa\22) failed\00"
@.str.18 = [5 x i32] [i32 65, i32 65, i32 65, i32 65, i32 0]
@.str.19 = [58 x i8] c"test base64enc_str(b64str, U\22AAAA\22, sizeof 2) == 0 failed\00"
@.str.20 = [63 x i8] c"test base64enc_str(b64str, U\22AAAA\22, sizeof b64str) == 1 failed\00"
@.str.21 = [9 x i8] c"QUFBQQ==\00"
@.str.22 = [42 x i8] c"test str_equal(b64str, \22QUFBQQ==\22) failed\00"
@.str.23 = [52 x i8] c"test base64dec(raw, b64str, sizeof raw) == 4 failed\00"
@.str.24 = [5 x i8] c"AAAA\00"
@.str.25 = [37 x i8] c"test str_equal(C raw, \22AAAA\22) failed\00"
@.str.26 = [6 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 0]
@.str.27 = [9 x i8] c"AQIDBAU=\00"
@.str.28 = [42 x i8] c"test str_equal(b64str, \22AQIDBAU=\22) failed\00"
@.str.29 = [52 x i8] c"test base64dec(raw, b64str, sizeof raw) == 5 failed\00"
@.str.30 = [6 x i8] c"\01\02\03\04\05\00"
@.str.31 = [53 x i8] c"test str_equal(C raw, \22\\x01\\x02\\x03\\x04\\x05\22) failed\00"
@.str.32 = [9 x i8] c"=QIDBAU=\00"
@.str.33 = [56 x i8] c"test base64dec(raw, \22=QIDBAU=\22, sizeof raw) == 0 failed\00"
@.str.34 = [9 x i8] c"AQ(DBAU=\00"
@.str.35 = [56 x i8] c"test base64dec(raw, \22AQ(DBAU=\22, sizeof raw) == 0 failed\00"
@.str.36 = [9 x i8] c"AQIDB@U=\00"
@.str.37 = [56 x i8] c"test base64dec(raw, \22AQIDB@U=\22, sizeof raw) == 0 failed\00"
@.str.38 = [10 x i8] c"AQIDBAU==\00"
@.str.39 = [57 x i8] c"test base64dec(raw, \22AQIDBAU==\22, sizeof raw) == 0 failed\00"
@.str.40 = [9 x i8] c"AQIDB===\00"
@.str.41 = [56 x i8] c"test base64dec(raw, \22AQIDB===\22, sizeof raw) == 0 failed\00"
@.str.42 = [17 x i32] [i32 38, i32 199, i32 27, i32 40, i32 254, i32 176, i32 144, i32 8, i32 90, i32 222, i32 198, i32 224, i32 240, i32 244, i32 118, i32 221, i32 0]
@.str.43 = [25 x i8] c"JscbKP6wkAha3sbg8PR23Q==\00"
@.str.44 = [58 x i8] c"test str_equal(b64str, \22JscbKP6wkAha3sbg8PR23Q==\22) failed\00"
@.str.45 = [53 x i8] c"test base64dec(raw, b64str, sizeof raw) == 16 failed\00"
@.str.46 = [17 x i8] c"&\C7\1B(\FE\B0\90\08Z\DE\C6\E0\F0\F4v\DD\00"
@.str.47 = [97 x i8] c"test str_equal(C raw, \22\\x26\\xC7\\x1B\\x28\\xFE\\xB0\\x90\\x08\\x5A\\xDE\\xC6\\xE0\\xF0\\xF4\\x76\\xDD\22) failed\00"
@.str.48 = [10 x i32] [i32 243, i32 155, i32 112, i32 165, i32 99, i32 250, i32 84, i32 134, i32 209, i32 0]
@.str.49 = [13 x i8] c"85twpWP6VIbR\00"
@.str.50 = [46 x i8] c"test str_equal(b64str, \2285twpWP6VIbR\22) failed\00"
@.str.51 = [52 x i8] c"test base64dec(raw, b64str, sizeof raw) == 9 failed\00"
@.str.52 = [10 x i8] c"\F3\9Bp\A5c\FAT\86\D1\00"
@.str.53 = [69 x i8] c"test str_equal(C raw, \22\\xF3\\x9B\\x70\\xA5\\x63\\xFA\\x54\\x86\\xD1\22) failed\00"
@.str.54 = [28 x i8] c"%d out of %d tests failed.\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [65 x i8]
%4 = alloca [49 x i8]
%5 = getelementptr inbounds [65 x i8], [65 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [49 x i8], [49 x i8]* %4, i64 0, i64 0
%7 = call i32 @base64enc(i8* %5, i8* bitcast ([2 x i32]* @.str to i8*), i32 1)
%8 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%9 = icmp eq i64 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0))
br label %12
12: ; preds = %10, %2
%13 = phi i32 [ 0, %2 ], [ 1, %10 ]
%14 = call i32 @base64dec(i8* %6, i8* %5, i32 49)
%15 = icmp eq i32 %14, 1
br i1 %15, label %19, label %16
16: ; preds = %12
%17 = add nuw nsw i32 %13, 1
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.3, i64 0, i64 0))
br label %19
19: ; preds = %16, %12
%20 = phi i32 [ %13, %12 ], [ %17, %16 ]
%21 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %26, label %23
23: ; preds = %19
%24 = add nuw nsw i32 %20, 1
%25 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.5, i64 0, i64 0))
br label %26
26: ; preds = %23, %19
%27 = phi i32 [ %20, %19 ], [ %24, %23 ]
%28 = call i32 @base64enc(i8* %5, i8* bitcast ([3 x i32]* @.str.6 to i8*), i32 2)
%29 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %34, label %31
31: ; preds = %26
%32 = add nuw nsw i32 %27, 1
%33 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.8, i64 0, i64 0))
br label %34
34: ; preds = %31, %26
%35 = phi i32 [ %27, %26 ], [ %32, %31 ]
%36 = call i32 @base64dec(i8* %6, i8* %5, i32 49)
%37 = icmp eq i32 %36, 2
br i1 %37, label %41, label %38
38: ; preds = %34
%39 = add nuw nsw i32 %35, 1
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.9, i64 0, i64 0))
br label %41
41: ; preds = %38, %34
%42 = phi i32 [ %35, %34 ], [ %39, %38 ]
%43 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
%44 = icmp eq i64 %43, 0
br i1 %44, label %48, label %45
45: ; preds = %41
%46 = add nuw nsw i32 %42, 1
%47 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.11, i64 0, i64 0))
br label %48
48: ; preds = %45, %41
%49 = phi i32 [ %42, %41 ], [ %46, %45 ]
%50 = call i32 @base64enc(i8* %5, i8* bitcast ([4 x i32]* @.str.12 to i8*), i32 3)
%51 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%52 = icmp eq i64 %51, 0
br i1 %52, label %56, label %53
53: ; preds = %48
%54 = add nuw nsw i32 %49, 1
%55 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.14, i64 0, i64 0))
br label %56
56: ; preds = %53, %48
%57 = phi i32 [ %49, %48 ], [ %54, %53 ]
%58 = call i32 @base64dec(i8* %6, i8* %5, i32 49)
%59 = icmp eq i32 %58, 3
br i1 %59, label %63, label %60
60: ; preds = %56
%61 = add nuw nsw i32 %57, 1
%62 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.15, i64 0, i64 0))
br label %63
63: ; preds = %60, %56
%64 = phi i32 [ %57, %56 ], [ %61, %60 ]
%65 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
%66 = icmp eq i64 %65, 0
br i1 %66, label %70, label %67
67: ; preds = %63
%68 = add nuw nsw i32 %64, 1
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.17, i64 0, i64 0))
br label %70
70: ; preds = %67, %63
%71 = phi i32 [ %64, %63 ], [ %68, %67 ]
%72 = call i32 @base64enc_str(i8* %5, i8* bitcast ([5 x i32]* @.str.18 to i8*), i32 4)
%73 = icmp eq i32 %72, 0
br i1 %73, label %77, label %74
74: ; preds = %70
%75 = add nuw nsw i32 %71, 1
%76 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.19, i64 0, i64 0))
br label %77
77: ; preds = %74, %70
%78 = phi i32 [ %71, %70 ], [ %75, %74 ]
%79 = call i32 @base64enc_str(i8* %5, i8* bitcast ([5 x i32]* @.str.18 to i8*), i32 65)
%80 = icmp eq i32 %79, 1
br i1 %80, label %84, label %81
81: ; preds = %77
%82 = add nuw nsw i32 %78, 1
%83 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.20, i64 0, i64 0))
br label %84
84: ; preds = %81, %77
%85 = phi i32 [ %78, %77 ], [ %82, %81 ]
%86 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0))
%87 = icmp eq i64 %86, 0
br i1 %87, label %91, label %88
88: ; preds = %84
%89 = add nuw nsw i32 %85, 1
%90 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.22, i64 0, i64 0))
br label %91
91: ; preds = %88, %84
%92 = phi i32 [ %85, %84 ], [ %89, %88 ]
%93 = call i32 @base64dec(i8* %6, i8* %5, i32 49)
%94 = icmp eq i32 %93, 4
br i1 %94, label %98, label %95
95: ; preds = %91
%96 = add nuw nsw i32 %92, 1
%97 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.23, i64 0, i64 0))
br label %98
98: ; preds = %95, %91
%99 = phi i32 [ %92, %91 ], [ %96, %95 ]
%100 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0))
%101 = icmp eq i64 %100, 0
br i1 %101, label %105, label %102
102: ; preds = %98
%103 = add nuw nsw i32 %99, 1
%104 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.25, i64 0, i64 0))
br label %105
105: ; preds = %102, %98
%106 = phi i32 [ %99, %98 ], [ %103, %102 ]
%107 = call i32 @base64enc(i8* %5, i8* bitcast ([5 x i32]* @.str.18 to i8*), i32 4)
%108 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0))
%109 = icmp eq i64 %108, 0
br i1 %109, label %113, label %110
110: ; preds = %105
%111 = add nuw nsw i32 %106, 1
%112 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.22, i64 0, i64 0))
br label %113
113: ; preds = %110, %105
%114 = phi i32 [ %106, %105 ], [ %111, %110 ]
%115 = call i32 @base64dec(i8* %6, i8* %5, i32 49)
%116 = icmp eq i32 %115, 4
br i1 %116, label %120, label %117
117: ; preds = %113
%118 = add nuw nsw i32 %114, 1
%119 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.23, i64 0, i64 0))
br label %120
120: ; preds = %117, %113
%121 = phi i32 [ %114, %113 ], [ %118, %117 ]
%122 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.24, i64 0, i64 0))
%123 = icmp eq i64 %122, 0
br i1 %123, label %127, label %124
124: ; preds = %120
%125 = add nuw nsw i32 %121, 1
%126 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.25, i64 0, i64 0))
br label %127
127: ; preds = %124, %120
%128 = phi i32 [ %121, %120 ], [ %125, %124 ]
%129 = call i32 @base64enc(i8* %5, i8* bitcast ([6 x i32]* @.str.26 to i8*), i32 5)
%130 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.27, i64 0, i64 0))
%131 = icmp eq i64 %130, 0
br i1 %131, label %135, label %132
132: ; preds = %127
%133 = add nuw nsw i32 %128, 1
%134 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.28, i64 0, i64 0))
br label %135
135: ; preds = %132, %127
%136 = phi i32 [ %128, %127 ], [ %133, %132 ]
%137 = call i32 @base64dec(i8* %6, i8* %5, i32 49)
%138 = icmp eq i32 %137, 5
br i1 %138, label %142, label %139
139: ; preds = %135
%140 = add nuw nsw i32 %136, 1
%141 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.29, i64 0, i64 0))
br label %142
142: ; preds = %139, %135
%143 = phi i32 [ %136, %135 ], [ %140, %139 ]
%144 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.30, i64 0, i64 0))
%145 = icmp eq i64 %144, 0
br i1 %145, label %149, label %146
146: ; preds = %142
%147 = add nuw nsw i32 %143, 1
%148 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.31, i64 0, i64 0))
br label %149
149: ; preds = %146, %142
%150 = phi i32 [ %143, %142 ], [ %147, %146 ]
%151 = call i32 @base64dec(i8* %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.32, i64 0, i64 0), i32 49)
%152 = icmp eq i32 %151, 0
br i1 %152, label %156, label %153
153: ; preds = %149
%154 = add nuw nsw i32 %150, 1
%155 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.33, i64 0, i64 0))
br label %156
156: ; preds = %153, %149
%157 = phi i32 [ %150, %149 ], [ %154, %153 ]
%158 = call i32 @base64dec(i8* %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.34, i64 0, i64 0), i32 49)
%159 = icmp eq i32 %158, 0
br i1 %159, label %163, label %160
160: ; preds = %156
%161 = add nuw nsw i32 %157, 1
%162 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.35, i64 0, i64 0))
br label %163
163: ; preds = %160, %156
%164 = phi i32 [ %157, %156 ], [ %161, %160 ]
%165 = call i32 @base64dec(i8* %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.36, i64 0, i64 0), i32 49)
%166 = icmp eq i32 %165, 0
br i1 %166, label %170, label %167
167: ; preds = %163
%168 = add nuw nsw i32 %164, 1
%169 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.37, i64 0, i64 0))
br label %170
170: ; preds = %167, %163
%171 = phi i32 [ %164, %163 ], [ %168, %167 ]
%172 = call i32 @base64dec(i8* %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.38, i64 0, i64 0), i32 49)
%173 = icmp eq i32 %172, 0
br i1 %173, label %177, label %174
174: ; preds = %170
%175 = add nuw nsw i32 %171, 1
%176 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([57 x i8], [57 x i8]* @.str.39, i64 0, i64 0))
br label %177
177: ; preds = %174, %170
%178 = phi i32 [ %171, %170 ], [ %175, %174 ]
%179 = call i32 @base64dec(i8* %6, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.40, i64 0, i64 0), i32 49)
%180 = icmp eq i32 %179, 0
br i1 %180, label %184, label %181
181: ; preds = %177
%182 = add nuw nsw i32 %178, 1
%183 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @.str.41, i64 0, i64 0))
br label %184
184: ; preds = %181, %177
%185 = phi i32 [ %178, %177 ], [ %182, %181 ]
%186 = call i32 @base64enc(i8* %5, i8* bitcast ([17 x i32]* @.str.42 to i8*), i32 16)
%187 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.43, i64 0, i64 0))
%188 = icmp eq i64 %187, 0
br i1 %188, label %192, label %189
189: ; preds = %184
%190 = add nuw nsw i32 %185, 1
%191 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.44, i64 0, i64 0))
br label %192
192: ; preds = %189, %184
%193 = phi i32 [ %185, %184 ], [ %190, %189 ]
%194 = call i32 @base64dec(i8* %6, i8* %5, i32 49)
%195 = icmp eq i32 %194, 16
br i1 %195, label %199, label %196
196: ; preds = %192
%197 = add nuw nsw i32 %193, 1
%198 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str.45, i64 0, i64 0))
br label %199
199: ; preds = %196, %192
%200 = phi i32 [ %193, %192 ], [ %197, %196 ]
%201 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.46, i64 0, i64 0))
%202 = icmp eq i64 %201, 0
br i1 %202, label %206, label %203
203: ; preds = %199
%204 = add nuw nsw i32 %200, 1
%205 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([97 x i8], [97 x i8]* @.str.47, i64 0, i64 0))
br label %206
206: ; preds = %203, %199
%207 = phi i32 [ %200, %199 ], [ %204, %203 ]
%208 = call i32 @base64enc(i8* %5, i8* bitcast ([10 x i32]* @.str.48 to i8*), i32 9)
%209 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.49, i64 0, i64 0))
%210 = icmp eq i64 %209, 0
br i1 %210, label %214, label %211
211: ; preds = %206
%212 = add nuw nsw i32 %207, 1
%213 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @.str.50, i64 0, i64 0))
br label %214
214: ; preds = %211, %206
%215 = phi i32 [ %207, %206 ], [ %212, %211 ]
%216 = call i32 @base64dec(i8* %6, i8* %5, i32 49)
%217 = icmp eq i32 %216, 9
br i1 %217, label %221, label %218
218: ; preds = %214
%219 = add nuw nsw i32 %215, 1
%220 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str.51, i64 0, i64 0))
br label %221
221: ; preds = %218, %214
%222 = phi i32 [ %215, %214 ], [ %219, %218 ]
%223 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.52, i64 0, i64 0))
%224 = icmp eq i64 %223, 0
br i1 %224, label %228, label %225
225: ; preds = %221
%226 = add nuw nsw i32 %222, 1
%227 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.53, i64 0, i64 0))
br label %228
228: ; preds = %225, %221
%229 = phi i32 [ %222, %221 ], [ %226, %225 ]
%230 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.54, i64 0, i64 0), i32 %229, i32 43)
ret i32 %229
}