// File: /workspace/github_c_makefile_star2_O0/orestesleal[P]base64/base64.c
// Function: base64_dec
void base64_dec(char *s, char b[])
{
	unsigned int x;
	int i,z, w;

	x = w = 0;
	for (i = 0; s[i] != PAD && s[i]; i++) {
		for (x = 0, z = 0; z < 4 && s[i] && s[i] != PAD; z++) {
			x |= get_token_pos(s[i++], 64, b64_alp);
			z < 3 && s[i] != PAD && s[i] ? x <<= 6 : 0;
		}
		/*  TODO: update this to a single computation 
			less than 24 bits of input, add 0s on the right to make
			an integral number of 6 bit groups (sec. 4. rfc4648 */
		for (;z < 4; z++, x <<= 6);  
		x <<= 8;
		b[w++] = x >> 24;
		b[w++] = (x << 8) >> 24;
		b[w++] = (x << 16) >> 24;
		--i;
	}
	b[w] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x3d, %ecx
movb %al, -0x21(%rbp)
je 0x1810
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x181c
jmp 0x1977
movl $0x0, -0x14(%rbp)
movl $0x0, -0x1c(%rbp)
xorl %eax, %eax
cmpl $0x4, -0x1c(%rbp)
movb %al, -0x22(%rbp)
jge 0x1860
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x22(%rbp)
je 0x1860
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3d, %eax
setne %al
movb %al, -0x22(%rbp)
movb -0x22(%rbp), %al
testb $0x1, %al
jne 0x1869
jmp 0x18dc
movq -0x8(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x18(%rbp)
movslq %ecx, %rcx
movl $0x40, %esi
leaq 0x37f9(%rip), %rdx      # 0x5080
movsbl (%rax,%rcx), %edi
callq 0x1340
movzbl %al, %eax
orl -0x14(%rbp), %eax
movl %eax, -0x14(%rbp)
cmpl $0x3, -0x1c(%rbp)
jge 0x18cc
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3d, %eax
je 0x18cc
movq -0x8(%rbp), %rax
movslq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x18cc
movl -0x14(%rbp), %eax
shll $0x6, %eax
movl %eax, -0x14(%rbp)
jmp 0x18ce
jmp 0x18ce
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x182a
jmp 0x18de
cmpl $0x4, -0x1c(%rbp)
jge 0x18fa
jmp 0x18e6
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %eax
shll $0x6, %eax
movl %eax, -0x14(%rbp)
jmp 0x18de
movl -0x14(%rbp), %eax
shll $0x8, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
shrl $0x18, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
shll $0x8, %eax
shrl $0x18, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
shll $0x10, %eax
shrl $0x18, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x20(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x17e5
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movb $0x0, (%rax,%rcx)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)