// File: /workspace/github_c_makefile_star2_O0/rpeepz[P]ft_ssl/srcs/encode/base64.c
// Function: base64_decode
int				base64_decode(uint8_t *enc, uint8_t *dec, int len)
{
	int		i;

	i = 0;
	while (i < len)
	{
		if ((i + 4) % 64 == 0)
		{
			if (len != 65)
				i++;
			if (i == len)
				return (i - 1);
		}
		dec[3 * (i / 4)] |= (g_base64_decode[enc[i]]) << 2;
		dec[3 * (i / 4)] |= ((g_base64_decode[enc[i + 1]] & 0x30) >> 4);
		dec[3 * (i / 4) + 1] |= ((g_base64_decode[enc[i + 1]] & 0x0F) << 4);
		dec[3 * (i / 4) + 1] |= (g_base64_decode[enc[i + 2]] >> 2);
		dec[3 * (i / 4) + 2] |= (g_base64_decode[enc[i + 2]] << 6);
		dec[3 * (i / 4) + 2] |= g_base64_decode[enc[i + 3]];
		i += 4;
	}
	return (i);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0x225a
movl -0x20(%rbp), %eax
addl $0x4, %eax
movl $0x40, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x208c
cmpl $0x41, -0x1c(%rbp)
je 0x2074
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jne 0x208a
movl -0x20(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x2260
jmp 0x208c
movq -0x10(%rbp), %rax
movslq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x1602f(%rip), %rax     # 0x180d0
movzbl (%rax,%rcx), %esi
shll $0x2, %esi
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0x20(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x50(%rbp), %rax
imull $0x3, %ecx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x15fe6(%rip), %rax     # 0x180d0
movzbl (%rax,%rcx), %esi
andl $0x30, %esi
sarl $0x4, %esi
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x20(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x48(%rbp), %rax
imull $0x3, %ecx, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x15f9a(%rip), %rax     # 0x180d0
movzbl (%rax,%rcx), %esi
andl $0xf, %esi
shll $0x4, %esi
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x20(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x40(%rbp), %rax
imull $0x3, %ecx, %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x15f4b(%rip), %rax     # 0x180d0
movzbl (%rax,%rcx), %esi
sarl $0x2, %esi
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x20(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x38(%rbp), %rax
imull $0x3, %ecx, %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x15eff(%rip), %rax     # 0x180d0
movzbl (%rax,%rcx), %esi
shll $0x6, %esi
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x20(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x30(%rbp), %rax
imull $0x3, %ecx, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, %ecx
leaq 0x15eb3(%rip), %rax     # 0x180d0
movzbl (%rax,%rcx), %esi
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x20(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x28(%rbp), %rax
imull $0x3, %ecx, %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
movl -0x20(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x20(%rbp)
jmp 0x2046
movl -0x20(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)