#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);
size_t ybase64_decode(const char *from, const size_t strlen, void *to,
                      const size_t to_len) {
  static char base64_decoding_map[256] = {
      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 62,   0xff, 0xff, 0xff, 63,
      52,   53,   54,   55,   56,   57,   58,   59,   60,   61,   0xff, 0xff,
      0xff, 0xff, 0xff, 0xff, 0xff, 0,    1,    2,    3,    4,    5,    6,
      7,    8,    9,    10,   11,   12,   13,   14,   15,   16,   17,   18,
      19,   20,   21,   22,   23,   24,   25,   0xff, 0xff, 0xff, 0xff, 0xff,
      0xff, 26,   27,   28,   29,   30,   31,   32,   33,   34,   35,   36,
      37,   38,   39,   40,   41,   42,   43,   44,   45,   46,   47,   48,
      49,   50,   51,   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
      0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
      0xff, 0xff, 0xff, 0xff,
  };
  if (0 == strlen || 1 == strlen) {
    return 0;
  }
  const unsigned char *p_from = (const unsigned char *)from;
  unsigned char *p_to = (unsigned char *)to;
  size_t last_index = strlen - 1;
  while (last_index > 0) {
    if (*(p_from + last_index) != '=') {
      break;
    }
    last_index--;
  }
  if (0 == last_index) {
    return 0;
  }
  const size_t padding = strlen - 1 - last_index;
  if (padding > 2) {
    return 0;
  }
  size_t tmp_len, padding_bytes_len = 0;
  if (2 == padding) {
    tmp_len = last_index + 1 - 2;
    padding_bytes_len = 1;
  } else if (1 == padding) {
    tmp_len = last_index + 1 - 3;
    padding_bytes_len = 2;
  } else {
    tmp_len = last_index + 1;
  }
  if (tmp_len & 0x3)
    return 0;
  const size_t aligned_len = tmp_len;
  const size_t need_len = (aligned_len >> 2) * 3 + padding_bytes_len;
  if (NULL == p_to) {
    return need_len;
  }
  if (to_len < need_len) {
    return 0;
  }
  unsigned char c1, c2, c3, c4;
  unsigned char b1, b2, b3;
  unsigned char d1, d2, d3, d4;
  unsigned int d;
  size_t i = 0, j = 0;
  for (; i < aligned_len;) {
    c1 = *(p_from + i);
    c2 = *(p_from + i + 1);
    c3 = *(p_from + i + 2);
    c4 = *(p_from + i + 3);
    i += 4;
    d1 = base64_decoding_map[c1] & 0x3f;
    d2 = base64_decoding_map[c2] & 0x3f;
    d3 = base64_decoding_map[c3] & 0x3f;
    d4 = base64_decoding_map[c4] & 0x3f;
    if (0xff == d1 || 0xff == d2 || 0xff == d3 || 0xff == d4) {
      return j;
    }
    d = (d1 << 18) | (d2 << 12) | (d3 << 6) | (d4);
    b1 = (d & 0xff0000) >> 16;
    b2 = (d & 0xff00) >> 8;
    b3 = (d & 0xff);
    if (p_to) {
      *(p_to + j) = b1;
      *(p_to + j + 1) = b2;
      *(p_to + j + 2) = b3;
    }
    j += 3;
  }
  switch (padding) {
  case 0:
    break;
  case 1: {
    c1 = *(p_from + i);
    c2 = *(p_from + i + 1);
    c3 = *(p_from + i + 2);
    d1 = base64_decoding_map[c1];
    d2 = base64_decoding_map[c2];
    d3 = base64_decoding_map[c3];
    if (0xff == d1 || 0xff == d2 || 0xff == d3 || (d3 & 0x3)) {
      return j;
    }
    d = (d1 << 18) | (d2 << 12) | (d3 << 6);
    b1 = (d & 0xff0000) >> 16;
    b2 = (d & 0xff00) >> 8;
    if (p_to) {
      *(p_to + j) = b1;
      *(p_to + j + 1) = b2;
    }
    j += 2;
  } break;
  case 2: {
    c1 = *(p_from + i);
    c2 = *(p_from + i + 1);
    d1 = base64_decoding_map[c1];
    d2 = base64_decoding_map[c2];
    if (0xff == d1 || 0xff == d2 || d2 & 0xf) {
      return j;
    }
    b1 = (d1 << 2) | (d2 >> 4);
    if (p_to) {
      *(p_to + j) = b1;
    }
    j += 1;
  } break;
  default:
    break;
  }
  assert(j == need_len);
  return j;
}


x86 assembly (clang, -O0):
<ybase64_decode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
je     1146 <ybase64_decode+0x36>
mov    $0x1,%eax
cmp    -0x18(%rbp),%rax
jne    1153 <ybase64_decode+0x43>
movq   $0x0,-0x8(%rbp)
jmp    16f0 <ybase64_decode+0x5e0>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x18(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jbe    11a5 <ybase64_decode+0x95>
mov    -0x30(%rbp),%rax
mov    -0x40(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x3d,%eax
je     1194 <ybase64_decode+0x84>
jmp    11a5 <ybase64_decode+0x95>
mov    -0x40(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x40(%rbp)
jmp    116f <ybase64_decode+0x5f>
xor    %eax,%eax
cmp    -0x40(%rbp),%rax
jne    11be <ybase64_decode+0xae>
movq   $0x0,-0x8(%rbp)
jmp    16f0 <ybase64_decode+0x5e0>
mov    -0x18(%rbp),%rax
sub    $0x1,%rax
sub    -0x40(%rbp),%rax
mov    %rax,-0x48(%rbp)
cmpq   $0x2,-0x48(%rbp)
jbe    11e6 <ybase64_decode+0xd6>
movq   $0x0,-0x8(%rbp)
jmp    16f0 <ybase64_decode+0x5e0>
movq   $0x0,-0x58(%rbp)
mov    $0x2,%eax
cmp    -0x48(%rbp),%rax
jne    121a <ybase64_decode+0x10a>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
sub    $0x2,%rax
mov    %rax,-0x50(%rbp)
movq   $0x1,-0x58(%rbp)
jmp    1257 <ybase64_decode+0x147>
mov    $0x1,%eax
cmp    -0x48(%rbp),%rax
jne    1246 <ybase64_decode+0x136>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
sub    $0x3,%rax
mov    %rax,-0x50(%rbp)
movq   $0x2,-0x58(%rbp)
jmp    1252 <ybase64_decode+0x142>
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x50(%rbp)
jmp    1257 <ybase64_decode+0x147>
mov    -0x50(%rbp),%rax
and    $0x3,%rax
cmp    $0x0,%rax
je     1276 <ybase64_decode+0x166>
movq   $0x0,-0x8(%rbp)
jmp    16f0 <ybase64_decode+0x5e0>
mov    -0x50(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
shr    $0x2,%rax
imul   $0x3,%rax,%rax
add    -0x58(%rbp),%rax
mov    %rax,-0x68(%rbp)
xor    %eax,%eax
cmp    -0x38(%rbp),%rax
jne    12ab <ybase64_decode+0x19b>
mov    -0x68(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    16f0 <ybase64_decode+0x5e0>
mov    -0x28(%rbp),%rax
cmp    -0x68(%rbp),%rax
jae    12c6 <ybase64_decode+0x1b6>
movq   $0x0,-0x8(%rbp)
jmp    16f0 <ybase64_decode+0x5e0>
movq   $0x0,-0x80(%rbp)
movq   $0x0,-0x88(%rbp)
mov    -0x80(%rbp),%rax
cmp    -0x60(%rbp),%rax
jae    147e <ybase64_decode+0x36e>
mov    -0x30(%rbp),%rax
mov    -0x80(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x69(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x80(%rbp),%rcx
mov    0x1(%rax,%rcx,1),%al
mov    %al,-0x6a(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x80(%rbp),%rcx
mov    0x2(%rax,%rcx,1),%al
mov    %al,-0x6b(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x80(%rbp),%rcx
mov    0x3(%rax,%rcx,1),%al
mov    %al,-0x6c(%rbp)
mov    -0x80(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x80(%rbp)
movzbl -0x69(%rbp),%eax
mov    %eax,%ecx
lea    0x2cf5(%rip),%rax
movsbl (%rax,%rcx,1),%eax
and    $0x3f,%eax
mov    %al,-0x70(%rbp)
movzbl -0x6a(%rbp),%eax
mov    %eax,%ecx
lea    0x2cde(%rip),%rax
movsbl (%rax,%rcx,1),%eax
and    $0x3f,%eax
mov    %al,-0x71(%rbp)
movzbl -0x6b(%rbp),%eax
mov    %eax,%ecx
lea    0x2cc7(%rip),%rax
movsbl (%rax,%rcx,1),%eax
and    $0x3f,%eax
mov    %al,-0x72(%rbp)
movzbl -0x6c(%rbp),%eax
mov    %eax,%ecx
lea    0x2cb0(%rip),%rax
movsbl (%rax,%rcx,1),%eax
and    $0x3f,%eax
mov    %al,-0x73(%rbp)
movzbl -0x70(%rbp),%ecx
mov    $0xff,%eax
cmp    %ecx,%eax
je     13ce <ybase64_decode+0x2be>
movzbl -0x71(%rbp),%ecx
mov    $0xff,%eax
cmp    %ecx,%eax
je     13ce <ybase64_decode+0x2be>
movzbl -0x72(%rbp),%ecx
mov    $0xff,%eax
cmp    %ecx,%eax
je     13ce <ybase64_decode+0x2be>
movzbl -0x73(%rbp),%ecx
mov    $0xff,%eax
cmp    %ecx,%eax
jne    13de <ybase64_decode+0x2ce>
mov    -0x88(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    16f0 <ybase64_decode+0x5e0>
movzbl -0x70(%rbp),%eax
shl    $0x12,%eax
movzbl -0x71(%rbp),%ecx
shl    $0xc,%ecx
or     %ecx,%eax
movzbl -0x72(%rbp),%ecx
shl    $0x6,%ecx
or     %ecx,%eax
movzbl -0x73(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x78(%rbp)
mov    -0x78(%rbp),%eax
and    $0xff0000,%eax
shr    $0x10,%eax
mov    %al,-0x6d(%rbp)
mov    -0x78(%rbp),%eax
and    $0xff00,%eax
shr    $0x8,%eax
mov    %al,-0x6e(%rbp)
mov    -0x78(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x6f(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     1467 <ybase64_decode+0x357>
mov    -0x6d(%rbp),%dl
mov    -0x38(%rbp),%rax
mov    -0x88(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x6e(%rbp),%dl
mov    -0x38(%rbp),%rax
mov    -0x88(%rbp),%rcx
mov    %dl,0x1(%rax,%rcx,1)
mov    -0x6f(%rbp),%dl
mov    -0x38(%rbp),%rax
mov    -0x88(%rbp),%rcx
mov    %dl,0x2(%rax,%rcx,1)
mov    -0x88(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x88(%rbp)
jmp    12d9 <ybase64_decode+0x1c9>
mov    -0x48(%rbp),%rax
mov    %rax,-0x90(%rbp)
test   %rax,%rax
je     14c3 <ybase64_decode+0x3b3>
jmp    1497 <ybase64_decode+0x387>
mov    -0x90(%rbp),%rax
sub    $0x1,%rax
je     14c8 <ybase64_decode+0x3b8>
jmp    14ad <ybase64_decode+0x39d>
mov    -0x90(%rbp),%rax
sub    $0x2,%rax
je     15fd <ybase64_decode+0x4ed>
jmp    16c8 <ybase64_decode+0x5b8>
jmp    16cd <ybase64_decode+0x5bd>
mov    -0x30(%rbp),%rax
mov    -0x80(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x69(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x80(%rbp),%rcx
mov    0x1(%rax,%rcx,1),%al
mov    %al,-0x6a(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x80(%rbp),%rcx
mov    0x2(%rax,%rcx,1),%al
mov    %al,-0x6b(%rbp)
movzbl -0x69(%rbp),%eax
mov    %eax,%ecx
lea    0x2b2f(%rip),%rax
mov    (%rax,%rcx,1),%al
mov    %al,-0x70(%rbp)
movzbl -0x6a(%rbp),%eax
mov    %eax,%ecx
lea    0x2b1c(%rip),%rax
mov    (%rax,%rcx,1),%al
mov    %al,-0x71(%rbp)
movzbl -0x6b(%rbp),%eax
mov    %eax,%ecx
lea    0x2b09(%rip),%rax
mov    (%rax,%rcx,1),%al
mov    %al,-0x72(%rbp)
movzbl -0x70(%rbp),%ecx
mov    $0xff,%eax
cmp    %ecx,%eax
je     1570 <ybase64_decode+0x460>
movzbl -0x71(%rbp),%ecx
mov    $0xff,%eax
cmp    %ecx,%eax
je     1570 <ybase64_decode+0x460>
movzbl -0x72(%rbp),%ecx
mov    $0xff,%eax
cmp    %ecx,%eax
je     1570 <ybase64_decode+0x460>
movzbl -0x72(%rbp),%eax
and    $0x3,%eax
cmp    $0x0,%eax
je     1580 <ybase64_decode+0x470>
mov    -0x88(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    16f0 <ybase64_decode+0x5e0>
movzbl -0x70(%rbp),%eax
shl    $0x12,%eax
movzbl -0x71(%rbp),%ecx
shl    $0xc,%ecx
or     %ecx,%eax
movzbl -0x72(%rbp),%ecx
shl    $0x6,%ecx
or     %ecx,%eax
mov    %eax,-0x78(%rbp)
mov    -0x78(%rbp),%eax
and    $0xff0000,%eax
shr    $0x10,%eax
mov    %al,-0x6d(%rbp)
mov    -0x78(%rbp),%eax
and    $0xff00,%eax
shr    $0x8,%eax
mov    %al,-0x6e(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     15e6 <ybase64_decode+0x4d6>
mov    -0x6d(%rbp),%dl
mov    -0x38(%rbp),%rax
mov    -0x88(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x6e(%rbp),%dl
mov    -0x38(%rbp),%rax
mov    -0x88(%rbp),%rcx
mov    %dl,0x1(%rax,%rcx,1)
mov    -0x88(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x88(%rbp)
jmp    16cd <ybase64_decode+0x5bd>
mov    -0x30(%rbp),%rax
mov    -0x80(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x69(%rbp)
mov    -0x30(%rbp),%rax
mov    -0x80(%rbp),%rcx
mov    0x1(%rax,%rcx,1),%al
mov    %al,-0x6a(%rbp)
movzbl -0x69(%rbp),%eax
mov    %eax,%ecx
lea    0x2a09(%rip),%rax
mov    (%rax,%rcx,1),%al
mov    %al,-0x70(%rbp)
movzbl -0x6a(%rbp),%eax
mov    %eax,%ecx
lea    0x29f6(%rip),%rax
mov    (%rax,%rcx,1),%al
mov    %al,-0x71(%rbp)
movzbl -0x70(%rbp),%ecx
mov    $0xff,%eax
cmp    %ecx,%eax
je     1672 <ybase64_decode+0x562>
movzbl -0x71(%rbp),%ecx
mov    $0xff,%eax
cmp    %ecx,%eax
je     1672 <ybase64_decode+0x562>
movzbl -0x71(%rbp),%eax
and    $0xf,%eax
cmp    $0x0,%eax
je     1682 <ybase64_decode+0x572>
mov    -0x88(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    16f0 <ybase64_decode+0x5e0>
movzbl -0x70(%rbp),%eax
shl    $0x2,%eax
movzbl -0x71(%rbp),%ecx
sar    $0x4,%ecx
or     %ecx,%eax
mov    %al,-0x6d(%rbp)
cmpq   $0x0,-0x38(%rbp)
je     16b1 <ybase64_decode+0x5a1>
mov    -0x6d(%rbp),%dl
mov    -0x38(%rbp),%rax
mov    -0x88(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x88(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x88(%rbp)
jmp    16cd <ybase64_decode+0x5bd>
jmp    16cd <ybase64_decode+0x5bd>
mov    -0x88(%rbp),%rax
cmp    -0x68(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x88(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ybase64_decode>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%rsi
jb     1189 <ybase64_decode+0x79>
add    $0xffffffffffffffff,%rsi
xor    %eax,%eax
mov    %rdi,%rbp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x3d,0x0(%rbp,%rsi,1)
jne    1146 <ybase64_decode+0x36>
add    $0x1,%rbx
add    $0xffffffffffffffff,%rbp
cmp    %rbx,%rsi
jne    1130 <ybase64_decode+0x20>
jmp    118b <ybase64_decode+0x7b>
cmp    $0x2,%rbx
ja     1189 <ybase64_decode+0x79>
je     1163 <ybase64_decode+0x53>
cmp    $0x1,%rbx
jne    1172 <ybase64_decode+0x62>
mov    $0x2,%r8d
mov    $0xfffffffffffffffe,%rbp
jmp    117a <ybase64_decode+0x6a>
mov    $0x1,%r8d
mov    $0xffffffffffffffff,%rbp
jmp    117a <ybase64_decode+0x6a>
mov    $0x1,%ebp
xor    %r8d,%r8d
add    %rsi,%rbp
mov    %rbp,%r9
sub    %rbx,%r9
test   $0x3,%r9b
je     1190 <ybase64_decode+0x80>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %r9,%rax
shr    $0x2,%rax
lea    (%rax,%rax,2),%rax
add    %r8,%rax
test   %rdx,%rdx
je     118b <ybase64_decode+0x7b>
cmp    %rcx,%rax
ja     1189 <ybase64_decode+0x79>
cmp    %rbx,%rbp
jne    11b4 <ybase64_decode+0xa4>
xor    %r10d,%r10d
xor    %ebp,%ebp
jmp    122c <ybase64_decode+0x11c>
xor    %ebp,%ebp
lea    0xe43(%rip),%r8
xor    %esi,%esi
nop
lea    0x4(%rsi),%r10
movzbl 0x2(%rdi,%rsi,1),%ecx
movzbl (%rcx,%r8,1),%ecx
and    $0x3f,%ecx
mov    %rbp,%r14
movzbl 0x1(%rdi,%rsi,1),%ebp
movzbl 0x0(%rbp,%r8,1),%r11d
and    $0x3f,%r11d
shl    $0xc,%r11d
shl    $0x6,%ecx
movzbl (%rdi,%rsi,1),%ebp
movzbl 0x0(%rbp,%r8,1),%ebp
shl    $0x12,%ebp
or     %r11d,%ebp
movzbl 0x3(%rdi,%rsi,1),%esi
movzbl (%rsi,%r8,1),%esi
and    $0x3f,%sil
add    %ecx,%esi
or     %r11d,%ecx
shr    $0x10,%ebp
mov    %bpl,(%rdx,%r14,1)
mov    %r14,%rbp
mov    %ch,0x1(%rdx,%rbp,1)
mov    %sil,0x2(%rdx,%r14,1)
add    $0x3,%rbp
mov    %r10,%rsi
cmp    %r9,%r10
jb     11c0 <ybase64_decode+0xb0>
cmp    $0x2,%rbx
je     12a5 <ybase64_decode+0x195>
cmp    $0x1,%rbx
jne    12e1 <ybase64_decode+0x1d1>
movzbl (%rdi,%r10,1),%ecx
lea    0xdb8(%rip),%rbx
movzbl (%rcx,%rbx,1),%ecx
cmp    $0xff,%ecx
je     12ef <ybase64_decode+0x1df>
movzbl 0x1(%rdi,%r10,1),%esi
mov    (%rsi,%rbx,1),%sil
cmp    $0xff,%sil
je     12ef <ybase64_decode+0x1df>
movzbl 0x2(%rdi,%r10,1),%edi
mov    (%rdi,%rbx,1),%bl
cmp    $0xff,%bl
je     12ef <ybase64_decode+0x1df>
movzbl %bl,%ebx
mov    %ebx,%edi
and    $0x3,%edi
jne    12ef <ybase64_decode+0x1df>
movzbl %sil,%esi
shl    $0xc,%esi
shl    $0x6,%ebx
or     %esi,%ebx
shl    $0x12,%ecx
or     %esi,%ecx
shr    $0x10,%ecx
mov    %cl,(%rdx,%rbp,1)
mov    %bh,0x1(%rdx,%rbp,1)
add    $0x2,%rbp
jmp    12e1 <ybase64_decode+0x1d1>
movzbl (%rdi,%r10,1),%ecx
lea    0xd4f(%rip),%rsi
mov    (%rcx,%rsi,1),%r8b
cmp    $0xff,%r8b
je     12ef <ybase64_decode+0x1df>
movzbl 0x1(%rdi,%r10,1),%edi
mov    (%rdi,%rsi,1),%cl
cmp    $0xff,%cl
je     12ef <ybase64_decode+0x1df>
mov    %ecx,%ebx
and    $0xf,%bl
jne    12ef <ybase64_decode+0x1df>
shl    $0x2,%r8b
shr    $0x4,%cl
or     %r8b,%cl
mov    %cl,(%rdx,%rbp,1)
add    $0x1,%rbp
xor    %edi,%edi
cmp    %rax,%rbp
sete   %dil
call   1030 <assert@plt>
mov    %rbp,%rax
jmp    118b <ybase64_decode+0x7b>

LLVM IR (-O0):
@ybase64_decode.base64_decoding_map = internal global [256 x i8] c"\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF>\FF\FF\FF?456789:;<=\FF\FF\FF\FF\FF\FF\FF\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\FF\FF\FF\FF\FF\FF\1A\1B\1C\1D\1E\1F !\22#$%&'()*+,-./0123\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF"
define i64 @ybase64_decode(i8* %0, i64 %1, i8* %2, i64 %3) {
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i8
%19 = alloca i8
%20 = alloca i8
%21 = alloca i8
%22 = alloca i8
%23 = alloca i8
%24 = alloca i8
%25 = alloca i8
%26 = alloca i8
%27 = alloca i8
%28 = alloca i8
%29 = alloca i32
%30 = alloca i64
%31 = alloca i64
store i8* %0, i8** %6
store i64 %1, i64* %7
store i8* %2, i8** %8
store i64 %3, i64* %9
%32 = load i64, i64* %7
%33 = icmp eq i64 0, %32
br i1 %33, label %37, label %34
34: ; preds = %4
%35 = load i64, i64* %7
%36 = icmp eq i64 1, %35
br i1 %36, label %37, label %38
37: ; preds = %34, %4
store i64 0, i64* %5
br label %368
38: ; preds = %34
%39 = load i8*, i8** %6
store i8* %39, i8** %10
%40 = load i8*, i8** %8
store i8* %40, i8** %11
%41 = load i64, i64* %7
%42 = sub i64 %41, 1
store i64 %42, i64* %12
br label %43
43: ; preds = %54, %38
%44 = load i64, i64* %12
%45 = icmp ugt i64 %44, 0
br i1 %45, label %46, label %57
46: ; preds = %43
%47 = load i8*, i8** %10
%48 = load i64, i64* %12
%49 = getelementptr inbounds i8, i8* %47, i64 %48
%50 = load i8, i8* %49
%51 = zext i8 %50 to i32
%52 = icmp ne i32 %51, 61
br i1 %52, label %53, label %54
53: ; preds = %46
br label %57
54: ; preds = %46
%55 = load i64, i64* %12
%56 = add i64 %55, -1
store i64 %56, i64* %12
br label %43
57: ; preds = %53, %43
%58 = load i64, i64* %12
%59 = icmp eq i64 0, %58
br i1 %59, label %60, label %61
60: ; preds = %57
store i64 0, i64* %5
br label %368
61: ; preds = %57
%62 = load i64, i64* %7
%63 = sub i64 %62, 1
%64 = load i64, i64* %12
%65 = sub i64 %63, %64
store i64 %65, i64* %13
%66 = load i64, i64* %13
%67 = icmp ugt i64 %66, 2
br i1 %67, label %68, label %69
68: ; preds = %61
store i64 0, i64* %5
br label %368
69: ; preds = %61
store i64 0, i64* %15
%70 = load i64, i64* %13
%71 = icmp eq i64 2, %70
br i1 %71, label %72, label %76
72: ; preds = %69
%73 = load i64, i64* %12
%74 = add i64 %73, 1
%75 = sub i64 %74, 2
store i64 %75, i64* %14
store i64 1, i64* %15
br label %87
76: ; preds = %69
%77 = load i64, i64* %13
%78 = icmp eq i64 1, %77
br i1 %78, label %79, label %83
79: ; preds = %76
%80 = load i64, i64* %12
%81 = add i64 %80, 1
%82 = sub i64 %81, 3
store i64 %82, i64* %14
store i64 2, i64* %15
br label %86
83: ; preds = %76
%84 = load i64, i64* %12
%85 = add i64 %84, 1
store i64 %85, i64* %14
br label %86
86: ; preds = %83, %79
br label %87
87: ; preds = %86, %72
%88 = load i64, i64* %14
%89 = and i64 %88, 3
%90 = icmp ne i64 %89, 0
br i1 %90, label %91, label %92
91: ; preds = %87
store i64 0, i64* %5
br label %368
92: ; preds = %87
%93 = load i64, i64* %14
store i64 %93, i64* %16
%94 = load i64, i64* %16
%95 = lshr i64 %94, 2
%96 = mul i64 %95, 3
%97 = load i64, i64* %15
%98 = add i64 %96, %97
store i64 %98, i64* %17
%99 = load i8*, i8** %11
%100 = icmp eq i8* null, %99
br i1 %100, label %101, label %103
101: ; preds = %92
%102 = load i64, i64* %17
store i64 %102, i64* %5
br label %368
103: ; preds = %92
%104 = load i64, i64* %9
%105 = load i64, i64* %17
%106 = icmp ult i64 %104, %105
br i1 %106, label %107, label %108
107: ; preds = %103
store i64 0, i64* %5
br label %368
108: ; preds = %103
store i64 0, i64* %30
store i64 0, i64* %31
br label %109
109: ; preds = %223, %108
%110 = load i64, i64* %30
%111 = load i64, i64* %16
%112 = icmp ult i64 %110, %111
br i1 %112, label %113, label %226
113: ; preds = %109
%114 = load i8*, i8** %10
%115 = load i64, i64* %30
%116 = getelementptr inbounds i8, i8* %114, i64 %115
%117 = load i8, i8* %116
store i8 %117, i8* %18
%118 = load i8*, i8** %10
%119 = load i64, i64* %30
%120 = getelementptr inbounds i8, i8* %118, i64 %119
%121 = getelementptr inbounds i8, i8* %120, i64 1
%122 = load i8, i8* %121
store i8 %122, i8* %19
%123 = load i8*, i8** %10
%124 = load i64, i64* %30
%125 = getelementptr inbounds i8, i8* %123, i64 %124
%126 = getelementptr inbounds i8, i8* %125, i64 2
%127 = load i8, i8* %126
store i8 %127, i8* %20
%128 = load i8*, i8** %10
%129 = load i64, i64* %30
%130 = getelementptr inbounds i8, i8* %128, i64 %129
%131 = getelementptr inbounds i8, i8* %130, i64 3
%132 = load i8, i8* %131
store i8 %132, i8* %21
%133 = load i64, i64* %30
%134 = add i64 %133, 4
store i64 %134, i64* %30
%135 = load i8, i8* %18
%136 = zext i8 %135 to i64
%137 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %136
%138 = load i8, i8* %137
%139 = sext i8 %138 to i32
%140 = and i32 %139, 63
%141 = trunc i32 %140 to i8
store i8 %141, i8* %25
%142 = load i8, i8* %19
%143 = zext i8 %142 to i64
%144 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %143
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
%147 = and i32 %146, 63
%148 = trunc i32 %147 to i8
store i8 %148, i8* %26
%149 = load i8, i8* %20
%150 = zext i8 %149 to i64
%151 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %150
%152 = load i8, i8* %151
%153 = sext i8 %152 to i32
%154 = and i32 %153, 63
%155 = trunc i32 %154 to i8
store i8 %155, i8* %27
%156 = load i8, i8* %21
%157 = zext i8 %156 to i64
%158 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %157
%159 = load i8, i8* %158
%160 = sext i8 %159 to i32
%161 = and i32 %160, 63
%162 = trunc i32 %161 to i8
store i8 %162, i8* %28
%163 = load i8, i8* %25
%164 = zext i8 %163 to i32
%165 = icmp eq i32 255, %164
br i1 %165, label %178, label %166
166: ; preds = %113
%167 = load i8, i8* %26
%168 = zext i8 %167 to i32
%169 = icmp eq i32 255, %168
br i1 %169, label %178, label %170
170: ; preds = %166
%171 = load i8, i8* %27
%172 = zext i8 %171 to i32
%173 = icmp eq i32 255, %172
br i1 %173, label %178, label %174
174: ; preds = %170
%175 = load i8, i8* %28
%176 = zext i8 %175 to i32
%177 = icmp eq i32 255, %176
br i1 %177, label %178, label %180
178: ; preds = %174, %170, %166, %113
%179 = load i64, i64* %31
store i64 %179, i64* %5
br label %368
180: ; preds = %174
%181 = load i8, i8* %25
%182 = zext i8 %181 to i32
%183 = shl i32 %182, 18
%184 = load i8, i8* %26
%185 = zext i8 %184 to i32
%186 = shl i32 %185, 12
%187 = or i32 %183, %186
%188 = load i8, i8* %27
%189 = zext i8 %188 to i32
%190 = shl i32 %189, 6
%191 = or i32 %187, %190
%192 = load i8, i8* %28
%193 = zext i8 %192 to i32
%194 = or i32 %191, %193
store i32 %194, i32* %29
%195 = load i32, i32* %29
%196 = and i32 %195, 16711680
%197 = lshr i32 %196, 16
%198 = trunc i32 %197 to i8
store i8 %198, i8* %22
%199 = load i32, i32* %29
%200 = and i32 %199, 65280
%201 = lshr i32 %200, 8
%202 = trunc i32 %201 to i8
store i8 %202, i8* %23
%203 = load i32, i32* %29
%204 = and i32 %203, 255
%205 = trunc i32 %204 to i8
store i8 %205, i8* %24
%206 = load i8*, i8** %11
%207 = icmp ne i8* %206, null
br i1 %207, label %208, label %223
208: ; preds = %180
%209 = load i8, i8* %22
%210 = load i8*, i8** %11
%211 = load i64, i64* %31
%212 = getelementptr inbounds i8, i8* %210, i64 %211
store i8 %209, i8* %212
%213 = load i8, i8* %23
%214 = load i8*, i8** %11
%215 = load i64, i64* %31
%216 = getelementptr inbounds i8, i8* %214, i64 %215
%217 = getelementptr inbounds i8, i8* %216, i64 1
store i8 %213, i8* %217
%218 = load i8, i8* %24
%219 = load i8*, i8** %11
%220 = load i64, i64* %31
%221 = getelementptr inbounds i8, i8* %219, i64 %220
%222 = getelementptr inbounds i8, i8* %221, i64 2
store i8 %218, i8* %222
br label %223
223: ; preds = %208, %180
%224 = load i64, i64* %31
%225 = add i64 %224, 3
store i64 %225, i64* %31
br label %109
226: ; preds = %109
%227 = load i64, i64* %13
switch i64 %227, label %360 [
i64 0, label %228
i64 1, label %229
i64 2, label %309
]
228: ; preds = %226
br label %361
229: ; preds = %226
%230 = load i8*, i8** %10
%231 = load i64, i64* %30
%232 = getelementptr inbounds i8, i8* %230, i64 %231
%233 = load i8, i8* %232
store i8 %233, i8* %18
%234 = load i8*, i8** %10
%235 = load i64, i64* %30
%236 = getelementptr inbounds i8, i8* %234, i64 %235
%237 = getelementptr inbounds i8, i8* %236, i64 1
%238 = load i8, i8* %237
store i8 %238, i8* %19
%239 = load i8*, i8** %10
%240 = load i64, i64* %30
%241 = getelementptr inbounds i8, i8* %239, i64 %240
%242 = getelementptr inbounds i8, i8* %241, i64 2
%243 = load i8, i8* %242
store i8 %243, i8* %20
%244 = load i8, i8* %18
%245 = zext i8 %244 to i64
%246 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %245
%247 = load i8, i8* %246
store i8 %247, i8* %25
%248 = load i8, i8* %19
%249 = zext i8 %248 to i64
%250 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %249
%251 = load i8, i8* %250
store i8 %251, i8* %26
%252 = load i8, i8* %20
%253 = zext i8 %252 to i64
%254 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %253
%255 = load i8, i8* %254
store i8 %255, i8* %27
%256 = load i8, i8* %25
%257 = zext i8 %256 to i32
%258 = icmp eq i32 255, %257
br i1 %258, label %272, label %259
259: ; preds = %229
%260 = load i8, i8* %26
%261 = zext i8 %260 to i32
%262 = icmp eq i32 255, %261
br i1 %262, label %272, label %263
263: ; preds = %259
%264 = load i8, i8* %27
%265 = zext i8 %264 to i32
%266 = icmp eq i32 255, %265
br i1 %266, label %272, label %267
267: ; preds = %263
%268 = load i8, i8* %27
%269 = zext i8 %268 to i32
%270 = and i32 %269, 3
%271 = icmp ne i32 %270, 0
br i1 %271, label %272, label %274
272: ; preds = %267, %263, %259, %229
%273 = load i64, i64* %31
store i64 %273, i64* %5
br label %368
274: ; preds = %267
%275 = load i8, i8* %25
%276 = zext i8 %275 to i32
%277 = shl i32 %276, 18
%278 = load i8, i8* %26
%279 = zext i8 %278 to i32
%280 = shl i32 %279, 12
%281 = or i32 %277, %280
%282 = load i8, i8* %27
%283 = zext i8 %282 to i32
%284 = shl i32 %283, 6
%285 = or i32 %281, %284
store i32 %285, i32* %29
%286 = load i32, i32* %29
%287 = and i32 %286, 16711680
%288 = lshr i32 %287, 16
%289 = trunc i32 %288 to i8
store i8 %289, i8* %22
%290 = load i32, i32* %29
%291 = and i32 %290, 65280
%292 = lshr i32 %291, 8
%293 = trunc i32 %292 to i8
store i8 %293, i8* %23
%294 = load i8*, i8** %11
%295 = icmp ne i8* %294, null
br i1 %295, label %296, label %306
296: ; preds = %274
%297 = load i8, i8* %22
%298 = load i8*, i8** %11
%299 = load i64, i64* %31
%300 = getelementptr inbounds i8, i8* %298, i64 %299
store i8 %297, i8* %300
%301 = load i8, i8* %23
%302 = load i8*, i8** %11
%303 = load i64, i64* %31
%304 = getelementptr inbounds i8, i8* %302, i64 %303
%305 = getelementptr inbounds i8, i8* %304, i64 1
store i8 %301, i8* %305
br label %306
306: ; preds = %296, %274
%307 = load i64, i64* %31
%308 = add i64 %307, 2
store i64 %308, i64* %31
br label %361
309: ; preds = %226
%310 = load i8*, i8** %10
%311 = load i64, i64* %30
%312 = getelementptr inbounds i8, i8* %310, i64 %311
%313 = load i8, i8* %312
store i8 %313, i8* %18
%314 = load i8*, i8** %10
%315 = load i64, i64* %30
%316 = getelementptr inbounds i8, i8* %314, i64 %315
%317 = getelementptr inbounds i8, i8* %316, i64 1
%318 = load i8, i8* %317
store i8 %318, i8* %19
%319 = load i8, i8* %18
%320 = zext i8 %319 to i64
%321 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %320
%322 = load i8, i8* %321
store i8 %322, i8* %25
%323 = load i8, i8* %19
%324 = zext i8 %323 to i64
%325 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %324
%326 = load i8, i8* %325
store i8 %326, i8* %26
%327 = load i8, i8* %25
%328 = zext i8 %327 to i32
%329 = icmp eq i32 255, %328
br i1 %329, label %339, label %330
330: ; preds = %309
%331 = load i8, i8* %26
%332 = zext i8 %331 to i32
%333 = icmp eq i32 255, %332
br i1 %333, label %339, label %334
334: ; preds = %330
%335 = load i8, i8* %26
%336 = zext i8 %335 to i32
%337 = and i32 %336, 15
%338 = icmp ne i32 %337, 0
br i1 %338, label %339, label %341
339: ; preds = %334, %330, %309
%340 = load i64, i64* %31
store i64 %340, i64* %5
br label %368
341: ; preds = %334
%342 = load i8, i8* %25
%343 = zext i8 %342 to i32
%344 = shl i32 %343, 2
%345 = load i8, i8* %26
%346 = zext i8 %345 to i32
%347 = ashr i32 %346, 4
%348 = or i32 %344, %347
%349 = trunc i32 %348 to i8
store i8 %349, i8* %22
%350 = load i8*, i8** %11
%351 = icmp ne i8* %350, null
br i1 %351, label %352, label %357
352: ; preds = %341
%353 = load i8, i8* %22
%354 = load i8*, i8** %11
%355 = load i64, i64* %31
%356 = getelementptr inbounds i8, i8* %354, i64 %355
store i8 %353, i8* %356
br label %357
357: ; preds = %352, %341
%358 = load i64, i64* %31
%359 = add i64 %358, 1
store i64 %359, i64* %31
br label %361
360: ; preds = %226
br label %361
361: ; preds = %360, %357, %306, %228
%362 = load i64, i64* %31
%363 = load i64, i64* %17
%364 = icmp eq i64 %362, %363
%365 = zext i1 %364 to i32
%366 = call i32 @assert(i32 %365)
%367 = load i64, i64* %31
store i64 %367, i64* %5
br label %368
368: ; preds = %361, %339, %272, %178, %107, %101, %91, %68, %60, %37
%369 = load i64, i64* %5
ret i64 %369
}

LLVM IR (-O2):
@ybase64_decode.base64_decoding_map = internal unnamed_addr constant [256 x i8] c"\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF>\FF\FF\FF?456789:;<=\FF\FF\FF\FF\FF\FF\FF\00\01\02\03\04\05\06\07\08\09\0A\0B\0C\0D\0E\0F\10\11\12\13\14\15\16\17\18\19\FF\FF\FF\FF\FF\FF\1A\1B\1C\1D\1E\1F !\22#$%&'()*+,-./0123\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF\FF"
define i64 @ybase64_decode(i8* nocapture %0, i64 %1, i8* writeonly %2, i64 %3) {
%5 = icmp ult i64 %1, 2
br i1 %5, label %154, label %6
6: ; preds = %4
%7 = add i64 %1, -1
br label %8
8: ; preds = %6, %13
%9 = phi i64 [ %14, %13 ], [ %7, %6 ]
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 61
br i1 %12, label %13, label %16
13: ; preds = %8
%14 = add i64 %9, -1
%15 = icmp eq i64 %14, 0
br i1 %15, label %154, label %8
16: ; preds = %8
%17 = sub i64 %7, %9
%18 = icmp ugt i64 %17, 2
br i1 %18, label %154, label %19
19: ; preds = %16
switch i64 %17, label %21 [
i64 2, label %22
i64 1, label %20
]
20: ; preds = %19
br label %22
21: ; preds = %19
br label %22
22: ; preds = %19, %20, %21
%23 = phi i64 [ -2, %20 ], [ 1, %21 ], [ -1, %19 ]
%24 = phi i64 [ 2, %20 ], [ 0, %21 ], [ 1, %19 ]
%25 = add i64 %9, %23
%26 = and i64 %25, 3
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %154
28: ; preds = %22
%29 = lshr i64 %25, 2
%30 = mul nuw i64 %29, 3
%31 = add nuw i64 %30, %24
%32 = icmp eq i8* %2, null
br i1 %32, label %154, label %33
33: ; preds = %28
%34 = icmp ugt i64 %31, %3
br i1 %34, label %154, label %35
35: ; preds = %33
%36 = icmp eq i64 %25, 0
br i1 %36, label %83, label %37
37: ; preds = %35, %37
%38 = phi i64 [ %81, %37 ], [ 0, %35 ]
%39 = phi i64 [ %41, %37 ], [ 0, %35 ]
%40 = getelementptr inbounds i8, i8* %0, i64 %39
%41 = add nuw i64 %39, 4
%42 = getelementptr inbounds i8, i8* %40, i64 2
%43 = load i8, i8* %42
%44 = zext i8 %43 to i64
%45 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %44
%46 = load i8, i8* %45
%47 = and i8 %46, 63
%48 = zext i8 %47 to i32
%49 = getelementptr inbounds i8, i8* %40, i64 1
%50 = load i8, i8* %49
%51 = zext i8 %50 to i64
%52 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %51
%53 = load i8, i8* %52
%54 = and i8 %53, 63
%55 = zext i8 %54 to i32
%56 = shl nuw nsw i32 %55, 12
%57 = shl nuw nsw i32 %48, 6
%58 = load i8, i8* %40
%59 = zext i8 %58 to i64
%60 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %59
%61 = load i8, i8* %60
%62 = zext i8 %61 to i32
%63 = shl nuw nsw i32 %62, 18
%64 = or i32 %63, %56
%65 = getelementptr inbounds i8, i8* %40, i64 3
%66 = load i8, i8* %65
%67 = zext i8 %66 to i64
%68 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %67
%69 = load i8, i8* %68
%70 = and i8 %69, 63
%71 = trunc i32 %57 to i8
%72 = or i8 %70, %71
%73 = or i32 %56, %57
%74 = lshr i32 %73, 8
%75 = trunc i32 %74 to i8
%76 = lshr i32 %64, 16
%77 = trunc i32 %76 to i8
%78 = getelementptr inbounds i8, i8* %2, i64 %38
store i8 %77, i8* %78
%79 = getelementptr inbounds i8, i8* %78, i64 1
store i8 %75, i8* %79
%80 = getelementptr inbounds i8, i8* %78, i64 2
store i8 %72, i8* %80
%81 = add nuw i64 %38, 3
%82 = icmp ult i64 %41, %25
br i1 %82, label %37, label %83
83: ; preds = %37, %35
%84 = phi i64 [ 0, %35 ], [ %41, %37 ]
%85 = phi i64 [ 0, %35 ], [ %81, %37 ]
switch i64 %17, label %149 [
i64 2, label %126
i64 1, label %86
]
86: ; preds = %83
%87 = getelementptr inbounds i8, i8* %0, i64 %84
%88 = load i8, i8* %87
%89 = getelementptr inbounds i8, i8* %87, i64 1
%90 = load i8, i8* %89
%91 = getelementptr inbounds i8, i8* %87, i64 2
%92 = load i8, i8* %91
%93 = zext i8 %88 to i64
%94 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %93
%95 = load i8, i8* %94
%96 = zext i8 %90 to i64
%97 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %96
%98 = load i8, i8* %97
%99 = zext i8 %92 to i64
%100 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %99
%101 = load i8, i8* %100
%102 = icmp ne i8 %95, -1
%103 = icmp ne i8 %98, -1
%104 = select i1 %102, i1 %103, i1 false
%105 = zext i8 %101 to i32
%106 = icmp ne i8 %101, -1
%107 = select i1 %104, i1 %106, i1 false
%108 = and i32 %105, 3
%109 = icmp eq i32 %108, 0
%110 = select i1 %107, i1 %109, i1 false
br i1 %110, label %111, label %154
111: ; preds = %86
%112 = zext i8 %98 to i32
%113 = zext i8 %95 to i32
%114 = shl nuw nsw i32 %112, 12
%115 = shl nuw nsw i32 %105, 6
%116 = or i32 %115, %114
%117 = lshr i32 %116, 8
%118 = trunc i32 %117 to i8
%119 = shl nuw nsw i32 %113, 18
%120 = or i32 %114, %119
%121 = lshr i32 %120, 16
%122 = trunc i32 %121 to i8
%123 = getelementptr inbounds i8, i8* %2, i64 %85
store i8 %122, i8* %123
%124 = getelementptr inbounds i8, i8* %123, i64 1
store i8 %118, i8* %124
%125 = add i64 %85, 2
br label %149
126: ; preds = %83
%127 = getelementptr inbounds i8, i8* %0, i64 %84
%128 = load i8, i8* %127
%129 = getelementptr inbounds i8, i8* %127, i64 1
%130 = load i8, i8* %129
%131 = zext i8 %128 to i64
%132 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %131
%133 = load i8, i8* %132
%134 = zext i8 %130 to i64
%135 = getelementptr inbounds [256 x i8], [256 x i8]* @ybase64_decode.base64_decoding_map, i64 0, i64 %134
%136 = load i8, i8* %135
%137 = icmp ne i8 %133, -1
%138 = icmp ne i8 %136, -1
%139 = select i1 %137, i1 %138, i1 false
%140 = and i8 %136, 15
%141 = icmp eq i8 %140, 0
%142 = select i1 %139, i1 %141, i1 false
br i1 %142, label %143, label %154
143: ; preds = %126
%144 = shl i8 %133, 2
%145 = lshr i8 %136, 4
%146 = or i8 %145, %144
%147 = getelementptr inbounds i8, i8* %2, i64 %85
store i8 %146, i8* %147
%148 = add i64 %85, 1
br label %149
149: ; preds = %83, %143, %111
%150 = phi i64 [ %85, %83 ], [ %125, %111 ], [ %148, %143 ]
%151 = icmp eq i64 %150, %31
%152 = zext i1 %151 to i32
%153 = tail call i32 @assert(i32 %152)
br label %154
154: ; preds = %13, %22, %149, %86, %126, %33, %28, %16, %4
%155 = phi i64 [ 0, %4 ], [ 0, %16 ], [ 0, %22 ], [ %31, %28 ], [ 0, %33 ], [ %150, %149 ], [ %85, %86 ], [ %85, %126 ], [ 0, %13 ]
ret i64 %155
}