#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 */
size_t base64_decode(unsigned char *dst, size_t sizeof_dst,
                     const unsigned char *src, size_t sizeof_src) {
  static const unsigned char rstr[] = {
      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,
  };
  size_t i = 0;
  size_t d = 0;
  while (i < sizeof_src) {
    unsigned b;
    unsigned c = 0;
    while (i < sizeof_src && (c = rstr[src[i]]) > 64)
      i++;
    if (src[i] == '=' || i++ >= sizeof_src)
      break;
    b = (c << 2) & 0xfc;
    while (i < sizeof_src && (c = rstr[src[i]]) > 64)
      i++;
    if (src[i] == '=' || i++ >= sizeof_src)
      break;
    b |= (c >> 4) & 0x03;
    if (d < sizeof_dst)
      dst[d++] = (unsigned char)b;
    if (i >= sizeof_src)
      break;
    b = (c << 4) & 0xF0;
    while (i < sizeof_src && src[i] != '=' && (c = rstr[src[i]]) > 64)
      ;
    if (src[i] == '=' || i++ >= sizeof_src)
      break;
    b |= (c >> 2) & 0x0F;
    if (d < sizeof_dst)
      dst[d++] = (unsigned char)b;
    if (i >= sizeof_src)
      break;
    b = (c << 6) & 0xC0;
    while (i < sizeof_src && src[i] != '=' && (c = rstr[src[i]]) > 64)
      ;
    if (src[i] == '=' || i++ >= sizeof_src)
      break;
    b |= c;
    if (d < sizeof_dst)
      dst[d++] = (unsigned char)b;
    if (i >= sizeof_src)
      break;
  }
  if (d < sizeof_dst)
    dst[d] = '\0';
  return d;
}


x86 assembly (clang, -O0):
<base64_decode>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    148f <base64_decode+0x38f>
movl   $0x0,-0x38(%rbp)
mov    -0x28(%rbp),%rcx
xor    %eax,%eax
cmp    -0x20(%rbp),%rcx
mov    %al,-0x39(%rbp)
jae    1171 <base64_decode+0x71>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,%ecx
lea    0xe9f(%rip),%rax
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x38(%rbp)
cmp    $0x40,%eax
seta   %al
mov    %al,-0x39(%rbp)
mov    -0x39(%rbp),%al
test   $0x1,%al
jne    1181 <base64_decode+0x81>
jmp    1192 <base64_decode+0x92>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    1139 <base64_decode+0x39>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x3d,%eax
je     11c0 <base64_decode+0xc0>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
cmp    -0x20(%rbp),%rax
jb     11c5 <base64_decode+0xc5>
jmp    148f <base64_decode+0x38f>
mov    -0x38(%rbp),%eax
shl    $0x2,%eax
and    $0xfc,%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rcx
xor    %eax,%eax
cmp    -0x20(%rbp),%rcx
mov    %al,-0x3a(%rbp)
jae    120b <base64_decode+0x10b>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,%ecx
lea    0xe05(%rip),%rax
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x38(%rbp)
cmp    $0x40,%eax
seta   %al
mov    %al,-0x3a(%rbp)
mov    -0x3a(%rbp),%al
test   $0x1,%al
jne    121b <base64_decode+0x11b>
jmp    122c <base64_decode+0x12c>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    11d3 <base64_decode+0xd3>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x3d,%eax
je     125a <base64_decode+0x15a>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
cmp    -0x20(%rbp),%rax
jb     125f <base64_decode+0x15f>
jmp    148f <base64_decode+0x38f>
mov    -0x38(%rbp),%eax
shr    $0x4,%eax
and    $0x3,%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1297 <base64_decode+0x197>
mov    -0x34(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x30(%rbp)
mov    %dl,(%rax,%rcx,1)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jb     12aa <base64_decode+0x1aa>
jmp    148f <base64_decode+0x38f>
mov    -0x38(%rbp),%eax
shl    $0x4,%eax
and    $0xf0,%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rcx
xor    %eax,%eax
cmp    -0x20(%rbp),%rcx
mov    %al,-0x3b(%rbp)
jae    130a <base64_decode+0x20a>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
movzbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x3d,%ecx
mov    %al,-0x3b(%rbp)
je     130a <base64_decode+0x20a>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,%ecx
lea    0xd06(%rip),%rax
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x38(%rbp)
cmp    $0x40,%eax
seta   %al
mov    %al,-0x3b(%rbp)
mov    -0x3b(%rbp),%al
test   $0x1,%al
jne    131a <base64_decode+0x21a>
jmp    131f <base64_decode+0x21f>
jmp    12b8 <base64_decode+0x1b8>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x3d,%eax
je     134d <base64_decode+0x24d>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
cmp    -0x20(%rbp),%rax
jb     1352 <base64_decode+0x252>
jmp    148f <base64_decode+0x38f>
mov    -0x38(%rbp),%eax
shr    $0x2,%eax
and    $0xf,%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    138a <base64_decode+0x28a>
mov    -0x34(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x30(%rbp)
mov    %dl,(%rax,%rcx,1)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jb     139d <base64_decode+0x29d>
jmp    148f <base64_decode+0x38f>
mov    -0x38(%rbp),%eax
shl    $0x6,%eax
and    $0xc0,%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rcx
xor    %eax,%eax
cmp    -0x20(%rbp),%rcx
mov    %al,-0x3c(%rbp)
jae    13fd <base64_decode+0x2fd>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
movzbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x3d,%ecx
mov    %al,-0x3c(%rbp)
je     13fd <base64_decode+0x2fd>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,%ecx
lea    0xc13(%rip),%rax
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x38(%rbp)
cmp    $0x40,%eax
seta   %al
mov    %al,-0x3c(%rbp)
mov    -0x3c(%rbp),%al
test   $0x1,%al
jne    140d <base64_decode+0x30d>
jmp    1412 <base64_decode+0x312>
jmp    13ab <base64_decode+0x2ab>
mov    -0x18(%rbp),%rax
mov    -0x28(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
cmp    $0x3d,%eax
je     1440 <base64_decode+0x340>
mov    -0x28(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x28(%rbp)
cmp    -0x20(%rbp),%rax
jb     1445 <base64_decode+0x345>
jmp    148f <base64_decode+0x38f>
mov    -0x38(%rbp),%eax
or     -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1477 <base64_decode+0x377>
mov    -0x34(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %rcx,%rsi
add    $0x1,%rsi
mov    %rsi,-0x30(%rbp)
mov    %dl,(%rax,%rcx,1)
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jb     148a <base64_decode+0x38a>
jmp    148f <base64_decode+0x38f>
jmp    1124 <base64_decode+0x24>
mov    -0x30(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    14a9 <base64_decode+0x3a9>
mov    -0x8(%rbp),%rax
mov    -0x30(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x30(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64_decode>:
push   %r14
push   %rbx
xor    %r9d,%r9d
lea    0xef3(%rip),%r8
xor    %eax,%eax
cmp    %rcx,%r9
jae    1213 <base64_decode+0x113>
lea    0x1(%r9),%r10
nopl   0x0(%rax)
movzbl (%rdx,%r9,1),%ebx
movzbl (%rbx,%r8,1),%r11d
cmp    $0x41,%r11b
jb     1150 <base64_decode+0x50>
add    $0x1,%r9
add    $0x1,%r10
cmp    %r9,%rcx
jne    1120 <base64_decode+0x20>
jmp    1213 <base64_decode+0x113>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    $0x3d,%bl
je     1213 <base64_decode+0x113>
shl    $0x2,%r11b
mov    %r10,%r9
cmp    %rcx,%r9
jae    1213 <base64_decode+0x113>
movzbl (%rdx,%r9,1),%ebx
movzbl (%rbx,%r8,1),%r10d
add    $0x1,%r9
cmp    $0x40,%r10b
ja     1160 <base64_decode+0x60>
cmp    $0x3d,%bl
je     1213 <base64_decode+0x113>
cmp    %rsi,%rax
jae    119e <base64_decode+0x9e>
mov    %r10d,%ebx
shr    $0x4,%bl
and    $0x3,%bl
or     %r11b,%bl
mov    %bl,(%rdi,%rax,1)
add    $0x1,%rax
cmp    %rcx,%r9
jae    1213 <base64_decode+0x113>
movzbl (%rdx,%r9,1),%ebx
cmp    $0x3d,%rbx
je     1213 <base64_decode+0x113>
mov    (%rbx,%r8,1),%r11b
cmp    $0x41,%r11b
jae    1220 <base64_decode+0x120>
lea    0x1(%r9),%r14
cmp    %rsi,%rax
jae    11d8 <base64_decode+0xd8>
shl    $0x4,%r10b
mov    %r11d,%ebx
shr    $0x2,%bl
and    $0xf,%bl
or     %r10b,%bl
mov    %bl,(%rdi,%rax,1)
add    $0x1,%rax
cmp    %rcx,%r14
jae    1213 <base64_decode+0x113>
movzbl 0x1(%rdx,%r9,1),%ebx
cmp    $0x3d,%rbx
je     1213 <base64_decode+0x113>
mov    (%rbx,%r8,1),%bl
cmp    $0x41,%bl
jae    1230 <base64_decode+0x130>
add    $0x2,%r9
cmp    %rsi,%rax
jae    120a <base64_decode+0x10a>
shl    $0x6,%r11b
or     %bl,%r11b
mov    %r11b,(%rdi,%rax,1)
add    $0x1,%rax
cmp    %rcx,%r9
jb     110f <base64_decode+0xf>
cmp    %rsi,%rax
jae    121c <base64_decode+0x11c>
movb   $0x0,(%rdi,%rax,1)
pop    %rbx
pop    %r14
ret
jmp    1220 <base64_decode+0x120>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    1230 <base64_decode+0x130>

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

LLVM IR (-O2):
@base64_decode.rstr = 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 @base64_decode(i8* nocapture writeonly %0, i64 %1, i8* nocapture %2, i64 %3) {
br label %5
5: ; preds = %90, %4
%6 = phi i64 [ 0, %4 ], [ %84, %90 ]
%7 = phi i64 [ 0, %4 ], [ %91, %90 ]
%8 = icmp ult i64 %6, %3
br i1 %8, label %9, label %93
9: ; preds = %5, %17
%10 = phi i64 [ %18, %17 ], [ %6, %5 ]
%11 = getelementptr inbounds i8, i8* %2, i64 %10
%12 = load i8, i8* %11
%13 = zext i8 %12 to i64
%14 = getelementptr inbounds [256 x i8], [256 x i8]* @base64_decode.rstr, i64 0, i64 %13
%15 = load i8, i8* %14
%16 = icmp ugt i8 %15, 64
br i1 %16, label %17, label %20
17: ; preds = %9
%18 = add nuw i64 %10, 1
%19 = icmp eq i64 %18, %3
br i1 %19, label %93, label %9
20: ; preds = %9
%21 = icmp eq i8 %12, 61
br i1 %21, label %93, label %22
22: ; preds = %20
%23 = shl i8 %15, 2
br label %24
24: ; preds = %28, %22
%25 = phi i64 [ %10, %22 ], [ %26, %28 ]
%26 = add i64 %25, 1
%27 = icmp ult i64 %26, %3
br i1 %27, label %28, label %93
28: ; preds = %24
%29 = getelementptr inbounds i8, i8* %2, i64 %26
%30 = load i8, i8* %29
%31 = zext i8 %30 to i64
%32 = getelementptr inbounds [256 x i8], [256 x i8]* @base64_decode.rstr, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = icmp ugt i8 %33, 64
br i1 %34, label %24, label %35
35: ; preds = %28
%36 = icmp eq i8 %30, 61
br i1 %36, label %93, label %37
37: ; preds = %35
%38 = add i64 %25, 2
%39 = icmp ult i64 %7, %1
br i1 %39, label %40, label %46
40: ; preds = %37
%41 = lshr i8 %33, 4
%42 = and i8 %41, 3
%43 = or i8 %42, %23
%44 = add nuw i64 %7, 1
%45 = getelementptr inbounds i8, i8* %0, i64 %7
store i8 %43, i8* %45
br label %46
46: ; preds = %40, %37
%47 = phi i64 [ %44, %40 ], [ %7, %37 ]
%48 = icmp ult i64 %38, %3
br i1 %48, label %49, label %93
49: ; preds = %46
%50 = shl i8 %33, 4
%51 = getelementptr inbounds i8, i8* %2, i64 %38
%52 = load i8, i8* %51
%53 = icmp eq i8 %52, 61
br i1 %53, label %93, label %54
54: ; preds = %49
%55 = zext i8 %52 to i64
%56 = getelementptr inbounds [256 x i8], [256 x i8]* @base64_decode.rstr, i64 0, i64 %55
%57 = load i8, i8* %56
%58 = icmp ugt i8 %57, 64
br i1 %58, label %59, label %60
59: ; preds = %54, %59
br label %59
60: ; preds = %54
%61 = add i64 %25, 3
%62 = icmp ult i64 %47, %1
br i1 %62, label %63, label %69
63: ; preds = %60
%64 = lshr i8 %57, 2
%65 = and i8 %64, 15
%66 = or i8 %50, %65
%67 = add nuw i64 %47, 1
%68 = getelementptr inbounds i8, i8* %0, i64 %47
store i8 %66, i8* %68
br label %69
69: ; preds = %63, %60
%70 = phi i64 [ %67, %63 ], [ %47, %60 ]
%71 = icmp ult i64 %61, %3
br i1 %71, label %72, label %93
72: ; preds = %69
%73 = shl i8 %57, 6
%74 = getelementptr inbounds i8, i8* %2, i64 %61
%75 = load i8, i8* %74
%76 = icmp eq i8 %75, 61
br i1 %76, label %93, label %77
77: ; preds = %72
%78 = zext i8 %75 to i64
%79 = getelementptr inbounds [256 x i8], [256 x i8]* @base64_decode.rstr, i64 0, i64 %78
%80 = load i8, i8* %79
%81 = icmp ugt i8 %80, 64
br i1 %81, label %82, label %83
82: ; preds = %77, %82
br label %82
83: ; preds = %77
%84 = add i64 %25, 4
%85 = icmp ult i64 %70, %1
br i1 %85, label %86, label %90
86: ; preds = %83
%87 = or i8 %73, %80
%88 = add nuw i64 %70, 1
%89 = getelementptr inbounds i8, i8* %0, i64 %70
store i8 %87, i8* %89
br label %90
90: ; preds = %86, %83
%91 = phi i64 [ %88, %86 ], [ %70, %83 ]
%92 = icmp ult i64 %84, %3
br i1 %92, label %5, label %93
93: ; preds = %72, %49, %90, %69, %46, %35, %20, %5, %17, %24
%94 = phi i64 [ %7, %24 ], [ %7, %17 ], [ %70, %72 ], [ %47, %49 ], [ %7, %20 ], [ %7, %35 ], [ %47, %46 ], [ %70, %69 ], [ %91, %90 ], [ %7, %5 ]
%95 = icmp ult i64 %94, %1
br i1 %95, label %96, label %98
96: ; preds = %93
%97 = getelementptr inbounds i8, i8* %0, i64 %94
store i8 0, i8* %97
br label %98
98: ; preds = %96, %93
ret i64 %94
}