#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 */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
int b64(int);
void base64triple_7(uint8_t b[4], const uint8_t t[3]) {
  uint32_t u;
  u = (t[0] << 16) | (t[1] << 8) | t[2];
  b[0] = b64((u >> (3 * 6)) & 63);
  b[1] = b64((u >> (2 * 6)) & 63);
  b[2] = b64((u >> (1 * 6)) & 63);
  b[3] = b64((u >> (0 * 6)) & 63);
}


x86 assembly (clang, -O0):
<base64triple_7>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
shl    $0x10,%eax
mov    -0x10(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%rcx
or     0x8(%rcx),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
sar    $0x12,%edi
and    $0x3f,%edi
call   1030 <b64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%edi
sar    $0xc,%edi
and    $0x3f,%edi
call   1030 <b64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x14(%rbp),%edi
sar    $0x6,%edi
and    $0x3f,%edi
call   1030 <b64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x14(%rbp),%edi
sar    $0x0,%edi
and    $0x3f,%edi
call   1030 <b64@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<base64triple_7>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    (%rsi),%eax
mov    0x4(%rsi),%ebx
shl    $0x10,%eax
shl    $0x8,%ebx
or     %eax,%ebx
mov    0x8(%rsi),%ebp
or     %ebp,%ebx
mov    %ebx,%edi
shr    $0x12,%edi
and    $0x3f,%edi
call   1030 <b64@plt>
mov    %eax,(%r14)
mov    %ebx,%edi
shr    $0xc,%edi
and    $0x3f,%edi
call   1030 <b64@plt>
mov    %eax,0x4(%r14)
shr    $0x6,%ebx
and    $0x3f,%ebx
mov    %ebx,%edi
call   1030 <b64@plt>
mov    %eax,0x8(%r14)
and    $0x3f,%ebp
mov    %ebp,%edi
call   1030 <b64@plt>
mov    %eax,0xc(%r14)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @base64triple_7(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = getelementptr inbounds i32, i32* %6, i64 0
%8 = load i32, i32* %7
%9 = shl i32 %8, 16
%10 = load i32*, i32** %4
%11 = getelementptr inbounds i32, i32* %10, i64 1
%12 = load i32, i32* %11
%13 = shl i32 %12, 8
%14 = or i32 %9, %13
%15 = load i32*, i32** %4
%16 = getelementptr inbounds i32, i32* %15, i64 2
%17 = load i32, i32* %16
%18 = or i32 %14, %17
store i32 %18, i32* %5
%19 = load i32, i32* %5
%20 = ashr i32 %19, 18
%21 = and i32 %20, 63
%22 = call i32 @b64(i32 %21)
%23 = load i32*, i32** %3
%24 = getelementptr inbounds i32, i32* %23, i64 0
store i32 %22, i32* %24
%25 = load i32, i32* %5
%26 = ashr i32 %25, 12
%27 = and i32 %26, 63
%28 = call i32 @b64(i32 %27)
%29 = load i32*, i32** %3
%30 = getelementptr inbounds i32, i32* %29, i64 1
store i32 %28, i32* %30
%31 = load i32, i32* %5
%32 = ashr i32 %31, 6
%33 = and i32 %32, 63
%34 = call i32 @b64(i32 %33)
%35 = load i32*, i32** %3
%36 = getelementptr inbounds i32, i32* %35, i64 2
store i32 %34, i32* %36
%37 = load i32, i32* %5
%38 = ashr i32 %37, 0
%39 = and i32 %38, 63
%40 = call i32 @b64(i32 %39)
%41 = load i32*, i32** %3
%42 = getelementptr inbounds i32, i32* %41, i64 3
store i32 %40, i32* %42
ret void
}

LLVM IR (-O2):
define void @base64triple_7(i32* nocapture writeonly %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 16
%5 = getelementptr inbounds i32, i32* %1, i64 1
%6 = load i32, i32* %5
%7 = shl i32 %6, 8
%8 = or i32 %7, %4
%9 = getelementptr inbounds i32, i32* %1, i64 2
%10 = load i32, i32* %9
%11 = or i32 %8, %10
%12 = lshr i32 %11, 18
%13 = and i32 %12, 63
%14 = tail call i32 @b64(i32 %13)
store i32 %14, i32* %0
%15 = lshr i32 %11, 12
%16 = and i32 %15, 63
%17 = tail call i32 @b64(i32 %16)
%18 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %17, i32* %18
%19 = lshr i32 %11, 6
%20 = and i32 %19, 63
%21 = tail call i32 @b64(i32 %20)
%22 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %21, i32* %22
%23 = and i32 %10, 63
%24 = tail call i32 @b64(i32 %23)
%25 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %24, i32* %25
ret void
}