#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*/ abort();
void Base64Encode(char *outbuf, const void *inbuf, size_t inlen) {
  const unsigned char b64[] =
      "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
  const unsigned char *inb = inbuf;
  unsigned char *out = NULL;
  size_t numb;
  size_t endcnt;
  size_t i;
  numb = inlen;
  if (numb > 0) {
    unsigned int acc = 0;
    out = (unsigned char *)outbuf;
    for (i = 0; i < numb; i++) {
      if (i % 3 == 0) {
        acc = inb[i];
      } else if (i % 3 == 1) {
        acc <<= 8;
        acc |= inb[i];
      } else {
        acc <<= 8;
        acc |= inb[i];
        *out++ = b64[(acc >> 18) & 0x3f];
        *out++ = b64[(acc >> 12) & 0x3f];
        *out++ = b64[(acc >> 6) & 0x3f];
        *out++ = b64[acc & 0x3f];
      }
    }
    if (i % 3 == 0) {
      endcnt = 0;
    } else if (i % 3 == 1) {
      endcnt = 2;
    } else {
      endcnt = 1;
    }
    for (; i % 3; i++) {
      acc <<= 8;
    }
    if (endcnt > 0) {
      *out++ = b64[(acc >> 18) & 0x3f];
      *out++ = b64[(acc >> 12) & 0x3f];
      if (endcnt < 2)
        *out++ = b64[(acc >> 6) & 0x3f];
      if (endcnt < 1)
        *out++ = b64[acc & 0x3f];
      while (endcnt-- > 0)
        *out++ = '=';
    }
  }
  *out++ = '\0';
  out = (unsigned char *)outbuf;
  while (*out) {
    if (*out++ > 127)
      abort();
  }
}


x86 assembly (clang, -O0):
<Base64Encode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
lea    0xebe(%rip),%rsi
mov    $0x41,%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x68(%rbp)
movq   $0x0,-0x70(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x78(%rbp)
cmpq   $0x0,-0x78(%rbp)
jbe    147c <Base64Encode+0x35c>
movl   $0x0,-0x8c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x70(%rbp)
movq   $0x0,-0x88(%rbp)
mov    -0x88(%rbp),%rax
cmp    -0x78(%rbp),%rax
jae    12f0 <Base64Encode+0x1d0>
mov    -0x88(%rbp),%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
cmp    $0x0,%rdx
jne    11d2 <Base64Encode+0xb2>
mov    -0x68(%rbp),%rax
mov    -0x88(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    %eax,-0x8c(%rbp)
jmp    12d4 <Base64Encode+0x1b4>
mov    -0x88(%rbp),%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
cmp    $0x1,%rdx
jne    121c <Base64Encode+0xfc>
mov    -0x8c(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x8c(%rbp)
mov    -0x68(%rbp),%rax
mov    -0x88(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
or     -0x8c(%rbp),%eax
mov    %eax,-0x8c(%rbp)
jmp    12cf <Base64Encode+0x1af>
mov    -0x8c(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x8c(%rbp)
mov    -0x68(%rbp),%rax
mov    -0x88(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
or     -0x8c(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x8c(%rbp),%eax
shr    $0x12,%eax
and    $0x3f,%eax
mov    %eax,%eax
mov    -0x60(%rbp,%rax,1),%cl
mov    -0x70(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x70(%rbp)
mov    %cl,(%rax)
mov    -0x8c(%rbp),%eax
shr    $0xc,%eax
and    $0x3f,%eax
mov    %eax,%eax
mov    -0x60(%rbp,%rax,1),%cl
mov    -0x70(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x70(%rbp)
mov    %cl,(%rax)
mov    -0x8c(%rbp),%eax
shr    $0x6,%eax
and    $0x3f,%eax
mov    %eax,%eax
mov    -0x60(%rbp,%rax,1),%cl
mov    -0x70(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x70(%rbp)
mov    %cl,(%rax)
mov    -0x8c(%rbp),%eax
and    $0x3f,%eax
mov    %eax,%eax
mov    -0x60(%rbp,%rax,1),%cl
mov    -0x70(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x70(%rbp)
mov    %cl,(%rax)
jmp    12d4 <Base64Encode+0x1b4>
jmp    12d9 <Base64Encode+0x1b9>
mov    -0x88(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x88(%rbp)
jmp    118c <Base64Encode+0x6c>
mov    -0x88(%rbp),%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
cmp    $0x0,%rdx
jne    1318 <Base64Encode+0x1f8>
movq   $0x0,-0x80(%rbp)
jmp    134d <Base64Encode+0x22d>
mov    -0x88(%rbp),%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
cmp    $0x1,%rdx
jne    1340 <Base64Encode+0x220>
movq   $0x2,-0x80(%rbp)
jmp    1348 <Base64Encode+0x228>
movq   $0x1,-0x80(%rbp)
jmp    134d <Base64Encode+0x22d>
jmp    1352 <Base64Encode+0x232>
mov    -0x88(%rbp),%rax
mov    $0x3,%ecx
xor    %edx,%edx
div    %rcx
cmp    $0x0,%rdx
je     1393 <Base64Encode+0x273>
mov    -0x8c(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x8c(%rbp)
mov    -0x88(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x88(%rbp)
jmp    1352 <Base64Encode+0x232>
cmpq   $0x0,-0x80(%rbp)
jbe    1477 <Base64Encode+0x357>
mov    -0x8c(%rbp),%eax
shr    $0x12,%eax
and    $0x3f,%eax
mov    %eax,%eax
mov    -0x60(%rbp,%rax,1),%cl
mov    -0x70(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x70(%rbp)
mov    %cl,(%rax)
mov    -0x8c(%rbp),%eax
shr    $0xc,%eax
and    $0x3f,%eax
mov    %eax,%eax
mov    -0x60(%rbp,%rax,1),%cl
mov    -0x70(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x70(%rbp)
mov    %cl,(%rax)
cmpq   $0x2,-0x80(%rbp)
jae    1412 <Base64Encode+0x2f2>
mov    -0x8c(%rbp),%eax
shr    $0x6,%eax
and    $0x3f,%eax
mov    %eax,%eax
mov    -0x60(%rbp,%rax,1),%cl
mov    -0x70(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x70(%rbp)
mov    %cl,(%rax)
cmpq   $0x1,-0x80(%rbp)
jae    143d <Base64Encode+0x31d>
mov    -0x8c(%rbp),%eax
and    $0x3f,%eax
mov    %eax,%eax
mov    -0x60(%rbp,%rax,1),%cl
mov    -0x70(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x70(%rbp)
mov    %cl,(%rax)
jmp    1442 <Base64Encode+0x322>
mov    -0x80(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x80(%rbp)
cmp    $0x0,%rax
jbe    1472 <Base64Encode+0x352>
mov    -0x70(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x70(%rbp)
movb   $0x3d,(%rax)
jmp    1442 <Base64Encode+0x322>
jmp    1477 <Base64Encode+0x357>
jmp    147c <Base64Encode+0x35c>
mov    -0x70(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x70(%rbp)
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
cmpb   $0x0,(%rax)
je     14ca <Base64Encode+0x3aa>
mov    -0x70(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x70(%rbp)
movzbl (%rax),%eax
cmp    $0x7f,%eax
jle    14c5 <Base64Encode+0x3a5>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    1496 <Base64Encode+0x376>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Base64Encode>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r10
mov    %rdi,%r12
xor    %r11d,%r11d
movabs $0xaaaaaaaaaaaaaaab,%r9
aa aa aa
lea    0xebe(%rip),%r8
mov    %rdx,%rcx
xor    %edi,%edi
mov    %r12,%r14
jmp    11ad <Base64Encode+0x8d>
nopl   0x0(%rax)
mov    %r11d,%edx
shl    $0x8,%edx
movzbl (%rsi),%eax
or     %eax,%edx
mov    %r11d,%ebx
shr    $0xa,%ebx
and    $0x3f,%ebx
movzbl (%rbx,%r8,1),%ebx
mov    %bl,(%r14)
shr    $0x4,%r11d
and    $0x3f,%r11d
movzbl (%r11,%r8,1),%ebx
mov    %bl,0x1(%r14)
mov    %edx,%r11d
shr    $0x6,%edx
and    $0x3f,%edx
movzbl (%rdx,%r8,1),%edx
mov    %dl,0x2(%r14)
and    $0x3f,%eax
movzbl (%rax,%r8,1),%eax
mov    %al,0x3(%r14)
add    $0x4,%r14
add    $0x1,%rdi
add    $0x1,%rsi
add    $0xffffffffffffffff,%rcx
je     11ec <Base64Encode+0xcc>
mov    %rdi,%rax
mul    %r9
shr    %rdx
lea    (%rdx,%rdx,2),%rdx
mov    %rdi,%rax
sub    %rdx,%rax
cmp    $0x1,%rax
je     11e0 <Base64Encode+0xc0>
test   %rax,%rax
jne    1150 <Base64Encode+0x30>
movzbl (%rsi),%r11d
jmp    119f <Base64Encode+0x7f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
shl    $0x8,%r11d
movzbl (%rsi),%eax
or     %eax,%r11d
jmp    119f <Base64Encode+0x7f>
mov    %r10,%rax
mul    %r9
shr    %rdx
lea    (%rdx,%rdx,2),%rcx
mov    %r10,%rax
sub    %rcx,%rax
je     128c <Base64Encode+0x16c>
cmp    $0x1,%rax
jne    1215 <Base64Encode+0xf5>
mov    $0x2,%r15d
xor    %ecx,%ecx
jmp    1220 <Base64Encode+0x100>
mov    $0x1,%r15d
mov    $0x1,%cl
nopl   (%rax)
add    $0x1,%r10
mov    %r10,%rax
mul    %r9
shl    $0x8,%r11d
shr    %rdx
lea    (%rdx,%rdx,2),%rax
cmp    %rax,%r10
jne    1220 <Base64Encode+0x100>
mov    %r11d,%eax
shr    $0x12,%eax
and    $0x3f,%eax
mov    (%rax,%r8,1),%al
mov    %al,(%r14)
mov    %r11d,%eax
shr    $0xc,%eax
and    $0x3f,%eax
mov    (%rax,%r8,1),%al
mov    %al,0x1(%r14)
test   %cl,%cl
je     1275 <Base64Encode+0x155>
shr    $0x6,%r11d
and    $0x3c,%r11d
mov    (%r11,%r8,1),%al
mov    %al,0x2(%r14)
add    $0x3,%r14
jmp    1279 <Base64Encode+0x159>
add    $0x2,%r14
mov    %r14,%rdi
mov    $0x3d,%esi
mov    %r15,%rdx
call   1040 <memset@plt>
add    %r15,%r14
movb   $0x0,(%r14)
movzbl (%r12),%eax
test   %al,%al
je     12a8 <Base64Encode+0x188>
add    $0x1,%r12
test   %al,%al
jns    1290 <Base64Encode+0x170>
xor    %eax,%eax
call   1030 <abort@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.Base64Encode.b64 = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define void @Base64Encode(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca [65 x i8]
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%14 = bitcast [65 x i8]* %7 to i8*
%15 = load i8*, i8** %5
store i8* %15, i8** %8
store i8* null, i8** %9
%16 = load i64, i64* %6
store i64 %16, i64* %10
%17 = load i64, i64* %10
%18 = icmp ugt i64 %17, 0
br i1 %18, label %19, label %170
19: ; preds = %3
store i32 0, i32* %13
%20 = load i8*, i8** %4
store i8* %20, i8** %9
store i64 0, i64* %12
br label %21
21: ; preds = %92, %19
%22 = load i64, i64* %12
%23 = load i64, i64* %10
%24 = icmp ult i64 %22, %23
br i1 %24, label %25, label %95
25: ; preds = %21
%26 = load i64, i64* %12
%27 = urem i64 %26, 3
%28 = icmp eq i64 %27, 0
br i1 %28, label %29, label %35
29: ; preds = %25
%30 = load i8*, i8** %8
%31 = load i64, i64* %12
%32 = getelementptr inbounds i8, i8* %30, i64 %31
%33 = load i8, i8* %32
%34 = zext i8 %33 to i32
store i32 %34, i32* %13
br label %91
35: ; preds = %25
%36 = load i64, i64* %12
%37 = urem i64 %36, 3
%38 = icmp eq i64 %37, 1
br i1 %38, label %39, label %49
39: ; preds = %35
%40 = load i32, i32* %13
%41 = shl i32 %40, 8
store i32 %41, i32* %13
%42 = load i8*, i8** %8
%43 = load i64, i64* %12
%44 = getelementptr inbounds i8, i8* %42, i64 %43
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = load i32, i32* %13
%48 = or i32 %47, %46
store i32 %48, i32* %13
br label %90
49: ; preds = %35
%50 = load i32, i32* %13
%51 = shl i32 %50, 8
store i32 %51, i32* %13
%52 = load i8*, i8** %8
%53 = load i64, i64* %12
%54 = getelementptr inbounds i8, i8* %52, i64 %53
%55 = load i8, i8* %54
%56 = zext i8 %55 to i32
%57 = load i32, i32* %13
%58 = or i32 %57, %56
store i32 %58, i32* %13
%59 = load i32, i32* %13
%60 = lshr i32 %59, 18
%61 = and i32 %60, 63
%62 = zext i32 %61 to i64
%63 = getelementptr inbounds [65 x i8], [65 x i8]* %7, i64 0, i64 %62
%64 = load i8, i8* %63
%65 = load i8*, i8** %9
%66 = getelementptr inbounds i8, i8* %65, i32 1
store i8* %66, i8** %9
store i8 %64, i8* %65
%67 = load i32, i32* %13
%68 = lshr i32 %67, 12
%69 = and i32 %68, 63
%70 = zext i32 %69 to i64
%71 = getelementptr inbounds [65 x i8], [65 x i8]* %7, i64 0, i64 %70
%72 = load i8, i8* %71
%73 = load i8*, i8** %9
%74 = getelementptr inbounds i8, i8* %73, i32 1
store i8* %74, i8** %9
store i8 %72, i8* %73
%75 = load i32, i32* %13
%76 = lshr i32 %75, 6
%77 = and i32 %76, 63
%78 = zext i32 %77 to i64
%79 = getelementptr inbounds [65 x i8], [65 x i8]* %7, i64 0, i64 %78
%80 = load i8, i8* %79
%81 = load i8*, i8** %9
%82 = getelementptr inbounds i8, i8* %81, i32 1
store i8* %82, i8** %9
store i8 %80, i8* %81
%83 = load i32, i32* %13
%84 = and i32 %83, 63
%85 = zext i32 %84 to i64
%86 = getelementptr inbounds [65 x i8], [65 x i8]* %7, i64 0, i64 %85
%87 = load i8, i8* %86
%88 = load i8*, i8** %9
%89 = getelementptr inbounds i8, i8* %88, i32 1
store i8* %89, i8** %9
store i8 %87, i8* %88
br label %90
90: ; preds = %49, %39
br label %91
91: ; preds = %90, %29
br label %92
92: ; preds = %91
%93 = load i64, i64* %12
%94 = add i64 %93, 1
store i64 %94, i64* %12
br label %21
95: ; preds = %21
%96 = load i64, i64* %12
%97 = urem i64 %96, 3
%98 = icmp eq i64 %97, 0
br i1 %98, label %99, label %100
99: ; preds = %95
store i64 0, i64* %11
br label %107
100: ; preds = %95
%101 = load i64, i64* %12
%102 = urem i64 %101, 3
%103 = icmp eq i64 %102, 1
br i1 %103, label %104, label %105
104: ; preds = %100
store i64 2, i64* %11
br label %106
105: ; preds = %100
store i64 1, i64* %11
br label %106
106: ; preds = %105, %104
br label %107
107: ; preds = %106, %99
br label %108
108: ; preds = %115, %107
%109 = load i64, i64* %12
%110 = urem i64 %109, 3
%111 = icmp ne i64 %110, 0
br i1 %111, label %112, label %118
112: ; preds = %108
%113 = load i32, i32* %13
%114 = shl i32 %113, 8
store i32 %114, i32* %13
br label %115
115: ; preds = %112
%116 = load i64, i64* %12
%117 = add i64 %116, 1
store i64 %117, i64* %12
br label %108
118: ; preds = %108
%119 = load i64, i64* %11
%120 = icmp ugt i64 %119, 0
br i1 %120, label %121, label %169
121: ; preds = %118
%122 = load i32, i32* %13
%123 = lshr i32 %122, 18
%124 = and i32 %123, 63
%125 = zext i32 %124 to i64
%126 = getelementptr inbounds [65 x i8], [65 x i8]* %7, i64 0, i64 %125
%127 = load i8, i8* %126
%128 = load i8*, i8** %9
%129 = getelementptr inbounds i8, i8* %128, i32 1
store i8* %129, i8** %9
store i8 %127, i8* %128
%130 = load i32, i32* %13
%131 = lshr i32 %130, 12
%132 = and i32 %131, 63
%133 = zext i32 %132 to i64
%134 = getelementptr inbounds [65 x i8], [65 x i8]* %7, i64 0, i64 %133
%135 = load i8, i8* %134
%136 = load i8*, i8** %9
%137 = getelementptr inbounds i8, i8* %136, i32 1
store i8* %137, i8** %9
store i8 %135, i8* %136
%138 = load i64, i64* %11
%139 = icmp ult i64 %138, 2
br i1 %139, label %140, label %149
140: ; preds = %121
%141 = load i32, i32* %13
%142 = lshr i32 %141, 6
%143 = and i32 %142, 63
%144 = zext i32 %143 to i64
%145 = getelementptr inbounds [65 x i8], [65 x i8]* %7, i64 0, i64 %144
%146 = load i8, i8* %145
%147 = load i8*, i8** %9
%148 = getelementptr inbounds i8, i8* %147, i32 1
store i8* %148, i8** %9
store i8 %146, i8* %147
br label %149
149: ; preds = %140, %121
%150 = load i64, i64* %11
%151 = icmp ult i64 %150, 1
br i1 %151, label %152, label %160
152: ; preds = %149
%153 = load i32, i32* %13
%154 = and i32 %153, 63
%155 = zext i32 %154 to i64
%156 = getelementptr inbounds [65 x i8], [65 x i8]* %7, i64 0, i64 %155
%157 = load i8, i8* %156
%158 = load i8*, i8** %9
%159 = getelementptr inbounds i8, i8* %158, i32 1
store i8* %159, i8** %9
store i8 %157, i8* %158
br label %160
160: ; preds = %152, %149
br label %161
161: ; preds = %165, %160
%162 = load i64, i64* %11
%163 = add i64 %162, -1
store i64 %163, i64* %11
%164 = icmp ugt i64 %162, 0
br i1 %164, label %165, label %168
165: ; preds = %161
%166 = load i8*, i8** %9
%167 = getelementptr inbounds i8, i8* %166, i32 1
store i8* %167, i8** %9
store i8 61, i8* %166
br label %161
168: ; preds = %161
br label %169
169: ; preds = %168, %118
br label %170
170: ; preds = %169, %3
%171 = load i8*, i8** %9
%172 = getelementptr inbounds i8, i8* %171, i32 1
store i8* %172, i8** %9
store i8 0, i8* %171
%173 = load i8*, i8** %4
store i8* %173, i8** %9
br label %174
174: ; preds = %186, %170
%175 = load i8*, i8** %9
%176 = load i8, i8* %175
%177 = icmp ne i8 %176, 0
br i1 %177, label %178, label %187
178: ; preds = %174
%179 = load i8*, i8** %9
%180 = getelementptr inbounds i8, i8* %179, i32 1
store i8* %180, i8** %9
%181 = load i8, i8* %179
%182 = zext i8 %181 to i32
%183 = icmp sgt i32 %182, 127
br i1 %183, label %184, label %186
184: ; preds = %178
%185 = call i32 (...) @abort()
unreachable
186: ; preds = %178
br label %174
187: ; preds = %174
ret void
}

LLVM IR (-O2):
@__const.Base64Encode.b64 = [65 x i8] c"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\00"
define void @Base64Encode(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = icmp ne i64 %2, 0
tail call void @llvm.assume(i1 %4)
br label %5
5: ; preds = %3, %49
%6 = phi i32 [ %51, %49 ], [ 0, %3 ]
%7 = phi i64 [ %52, %49 ], [ 0, %3 ]
%8 = phi i8* [ %50, %49 ], [ %0, %3 ]
%9 = urem i64 %7, 3
switch i64 %9, label %20 [
i64 0, label %10
i64 1, label %14
]
10: ; preds = %5
%11 = getelementptr inbounds i8, i8* %1, i64 %7
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
br label %49
14: ; preds = %5
%15 = shl i32 %6, 8
%16 = getelementptr inbounds i8, i8* %1, i64 %7
%17 = load i8, i8* %16
%18 = zext i8 %17 to i32
%19 = or i32 %15, %18
br label %49
20: ; preds = %5
%21 = shl i32 %6, 8
%22 = getelementptr inbounds i8, i8* %1, i64 %7
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = or i32 %21, %24
%26 = lshr i32 %21, 18
%27 = and i32 %26, 63
%28 = zext i32 %27 to i64
%29 = getelementptr inbounds [65 x i8], [65 x i8]* @__const.Base64Encode.b64, i64 0, i64 %28
%30 = load i8, i8* %29
%31 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %30, i8* %8
%32 = lshr i32 %21, 12
%33 = and i32 %32, 63
%34 = zext i32 %33 to i64
%35 = getelementptr inbounds [65 x i8], [65 x i8]* @__const.Base64Encode.b64, i64 0, i64 %34
%36 = load i8, i8* %35
%37 = getelementptr inbounds i8, i8* %8, i64 2
store i8 %36, i8* %31
%38 = lshr i32 %25, 6
%39 = and i32 %38, 63
%40 = zext i32 %39 to i64
%41 = getelementptr inbounds [65 x i8], [65 x i8]* @__const.Base64Encode.b64, i64 0, i64 %40
%42 = load i8, i8* %41
%43 = getelementptr inbounds i8, i8* %8, i64 3
store i8 %42, i8* %37
%44 = and i32 %24, 63
%45 = zext i32 %44 to i64
%46 = getelementptr inbounds [65 x i8], [65 x i8]* @__const.Base64Encode.b64, i64 0, i64 %45
%47 = load i8, i8* %46
%48 = getelementptr inbounds i8, i8* %8, i64 4
store i8 %47, i8* %43
br label %49
49: ; preds = %10, %20, %14
%50 = phi i8* [ %8, %10 ], [ %8, %14 ], [ %48, %20 ]
%51 = phi i32 [ %13, %10 ], [ %19, %14 ], [ %25, %20 ]
%52 = add nuw i64 %7, 1
%53 = icmp eq i64 %52, %2
br i1 %53, label %54, label %5
54: ; preds = %49
%55 = urem i64 %2, 3
switch i64 %55, label %56 [
i64 0, label %90
i64 1, label %57
]
56: ; preds = %54
br label %57
57: ; preds = %54, %56
%58 = phi i1 [ true, %56 ], [ false, %54 ]
%59 = phi i64 [ 1, %56 ], [ 2, %54 ]
br label %60
60: ; preds = %57, %60
%61 = phi i32 [ %63, %60 ], [ %51, %57 ]
%62 = phi i64 [ %64, %60 ], [ %2, %57 ]
%63 = shl i32 %61, 8
%64 = add i64 %62, 1
%65 = urem i64 %64, 3
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %60
67: ; preds = %60
%68 = lshr i32 %63, 18
%69 = and i32 %68, 63
%70 = zext i32 %69 to i64
%71 = getelementptr inbounds [65 x i8], [65 x i8]* @__const.Base64Encode.b64, i64 0, i64 %70
%72 = load i8, i8* %71
%73 = getelementptr inbounds i8, i8* %50, i64 1
store i8 %72, i8* %50
%74 = lshr i32 %63, 12
%75 = and i32 %74, 63
%76 = zext i32 %75 to i64
%77 = getelementptr inbounds [65 x i8], [65 x i8]* @__const.Base64Encode.b64, i64 0, i64 %76
%78 = load i8, i8* %77
%79 = getelementptr inbounds i8, i8* %50, i64 2
store i8 %78, i8* %73
br i1 %58, label %80, label %87
80: ; preds = %67
%81 = lshr exact i32 %63, 6
%82 = and i32 %81, 60
%83 = zext i32 %82 to i64
%84 = getelementptr inbounds [65 x i8], [65 x i8]* @__const.Base64Encode.b64, i64 0, i64 %83
%85 = load i8, i8* %84
%86 = getelementptr inbounds i8, i8* %50, i64 3
store i8 %85, i8* %79
br label %87
87: ; preds = %80, %67
%88 = phi i8* [ %86, %80 ], [ %79, %67 ]
%89 = getelementptr i8, i8* %88, i64 %59
br label %90
90: ; preds = %54, %87
%91 = phi i8* [ %89, %87 ], [ %50, %54 ]
store i8 0, i8* %91
br label %92
92: ; preds = %96, %90
%93 = phi i8* [ %0, %90 ], [ %97, %96 ]
%94 = load i8, i8* %93
%95 = icmp eq i8 %94, 0
br i1 %95, label %101, label %96
96: ; preds = %92
%97 = getelementptr inbounds i8, i8* %93, i64 1
%98 = icmp slt i8 %94, 0
br i1 %98, label %99, label %92
99: ; preds = %96
%100 = tail call i32 (...) @abort()
unreachable
101: ; preds = %92
ret void
}