// File: /workspace/github_c_makefile_star2_O0/aerospike[P]aerospike-common/src/main/citrusleaf/cf_b64.c
// Function: cf_b64_decode_in_place
void
cf_b64_decode_in_place(uint8_t* in_out, uint32_t in_len, uint32_t* out_size)
{
	uint32_t i = 0;
	uint32_t j = 0;

	uint32_t d = 0;

	if (out_size && in_len != 0) {
		if (in_out[in_len - 1] == '=') {
			d++;
		}

		if (in_out[in_len - 2] == '=') {
			d++;
		}
	}

	while (i < in_len) {
		uint8_t i0 = in_out[i];
		uint8_t i1 = in_out[i + 1];
		uint8_t i2 = in_out[i + 2];
		uint8_t i3 = in_out[i + 3];

		uint8_t b0 = (DA[i0] << 2) | (DA[i1] >> 4);
		uint8_t b1 = (DA[i1] << 4) | (DA[i2] >> 2);
		uint8_t b2 = (DA[i2] << 6) |  DA[i3];

		in_out[j]     = b0;
		in_out[j + 1] = b1;
		in_out[j + 2] = b2;

		i += 4;
		j += 3;
	}

	if (out_size) {
		*out_size = j - d;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x2027f
cmpl $0x0, -0xc(%rbp)
je 0x2027f
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x3d, %eax
jne 0x2025f
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x2, %ecx
movl %ecx, %ecx
movzbl (%rax,%rcx), %eax
cmpl $0x3d, %eax
jne 0x2027d
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x2027f
jmp 0x20281
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jae 0x2039c
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x25(%rbp)
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %al
movb %al, -0x26(%rbp)
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %al
movb %al, -0x27(%rbp)
movq -0x8(%rbp), %rax
movl -0x1c(%rbp), %ecx
addl $0x3, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %al
movb %al, -0x28(%rbp)
movzbl -0x25(%rbp), %eax
movl %eax, %ecx
leaq 0x7303(%rip), %rax      # 0x275e0
movzbl (%rax,%rcx), %eax
shll $0x2, %eax
movzbl -0x26(%rbp), %ecx
movl %ecx, %edx
leaq 0x72ef(%rip), %rcx      # 0x275e0
movzbl (%rcx,%rdx), %ecx
sarl $0x4, %ecx
orl %ecx, %eax
movb %al, -0x29(%rbp)
movzbl -0x26(%rbp), %eax
movl %eax, %ecx
leaq 0x72d6(%rip), %rax      # 0x275e0
movzbl (%rax,%rcx), %eax
shll $0x4, %eax
movzbl -0x27(%rbp), %ecx
movl %ecx, %edx
leaq 0x72c2(%rip), %rcx      # 0x275e0
movzbl (%rcx,%rdx), %ecx
sarl $0x2, %ecx
orl %ecx, %eax
movb %al, -0x2a(%rbp)
movzbl -0x27(%rbp), %eax
movl %eax, %ecx
leaq 0x72a9(%rip), %rax      # 0x275e0
movzbl (%rax,%rcx), %eax
shll $0x6, %eax
movzbl -0x28(%rbp), %ecx
movl %ecx, %edx
leaq 0x7295(%rip), %rcx      # 0x275e0
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movb %al, -0x2b(%rbp)
movb -0x29(%rbp), %dl
movq -0x8(%rbp), %rax
movl -0x20(%rbp), %ecx
movb %dl, (%rax,%rcx)
movb -0x2a(%rbp), %dl
movq -0x8(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movb -0x2b(%rbp), %dl
movq -0x8(%rbp), %rax
movl -0x20(%rbp), %ecx
addl $0x2, %ecx
movl %ecx, %ecx
movb %dl, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x1c(%rbp)
movl -0x20(%rbp), %eax
addl $0x3, %eax
movl %eax, -0x20(%rbp)
jmp 0x20281
cmpq $0x0, -0x18(%rbp)
je 0x203af
movl -0x20(%rbp), %ecx
subl -0x24(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)