// File: /workspace/github_c_makefile_star2_O0/rongarret[P]clmm/base64.c
// Function: Base64decode
int Base64decode(char *bufplain, const char *bufcoded)
{
    int nbytesdecoded;
    register const unsigned char *bufin;
    register unsigned char *bufout;
    register int nprbytes;

    bufin = (const unsigned char *) bufcoded;
    while (pr2six[*(bufin++)] <= 63);
    nprbytes = (bufin - (const unsigned char *) bufcoded) - 1;
    nbytesdecoded = ((nprbytes + 3) / 4) * 3;

    bufout = (unsigned char *) bufplain;
    bufin = (const unsigned char *) bufcoded;

    while (nprbytes > 4) {
    *(bufout++) =
        (unsigned char) (pr2six[*bufin] << 2 | pr2six[bufin[1]] >> 4);
    *(bufout++) =
        (unsigned char) (pr2six[bufin[1]] << 4 | pr2six[bufin[2]] >> 2);
    *(bufout++) =
        (unsigned char) (pr2six[bufin[2]] << 6 | pr2six[bufin[3]]);
    bufin += 4;
    nprbytes -= 4;
    }

    /* Note: (nprbytes == 1) would be an error, so just ingore that case */
    if (nprbytes > 1) {
    *(bufout++) =
        (unsigned char) (pr2six[*bufin] << 2 | pr2six[bufin[1]] >> 4);
    }
    if (nprbytes > 2) {
    *(bufout++) =
        (unsigned char) (pr2six[bufin[1]] << 4 | pr2six[bufin[2]] >> 2);
    }
    if (nprbytes > 3) {
    *(bufout++) =
        (unsigned char) (pr2six[bufin[2]] << 6 | pr2six[bufin[3]]);
    }

    *(bufout++) = '\0';
    nbytesdecoded -= (4 - nprbytes) & 3;
    return nbytesdecoded;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x20(%rbp)
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x4681(%rip), %rax      # 0x6150
movzbl (%rax,%rcx), %eax
cmpl $0x3f, %eax
jg 0x1ada
jmp 0x1ab4
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
subq $0x1, %rax
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
addl $0x3, %eax
movl $0x4, %ecx
cltd
idivl %ecx
imull $0x3, %eax, %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x4, -0x2c(%rbp)
jle 0x1bff
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x4626(%rip), %rax      # 0x6150
movzbl (%rax,%rcx), %eax
shll $0x2, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movl %ecx, %edx
leaq 0x460e(%rip), %rcx      # 0x6150
movzbl (%rcx,%rdx), %ecx
sarl $0x4, %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, %ecx
leaq 0x45e1(%rip), %rax      # 0x6150
movzbl (%rax,%rcx), %eax
shll $0x4, %eax
movq -0x20(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
movl %ecx, %edx
leaq 0x45c9(%rip), %rcx      # 0x6150
movzbl (%rcx,%rdx), %ecx
sarl $0x2, %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
movl %eax, %ecx
leaq 0x459c(%rip), %rax      # 0x6150
movzbl (%rax,%rcx), %eax
shll $0x6, %eax
movq -0x20(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
movl %ecx, %edx
leaq 0x4584(%rip), %rcx      # 0x6150
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x20(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x20(%rbp)
movl -0x2c(%rbp), %eax
subl $0x4, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1b10
cmpl $0x1, -0x2c(%rbp)
jle 0x1c49
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x453b(%rip), %rax      # 0x6150
movzbl (%rax,%rcx), %eax
shll $0x2, %eax
movq -0x20(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
movl %ecx, %edx
leaq 0x4523(%rip), %rcx      # 0x6150
movzbl (%rcx,%rdx), %ecx
sarl $0x4, %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
cmpl $0x2, -0x2c(%rbp)
jle 0x1c94
movq -0x20(%rbp), %rax
movzbl 0x1(%rax), %eax
movl %eax, %ecx
leaq 0x44f0(%rip), %rax      # 0x6150
movzbl (%rax,%rcx), %eax
shll $0x4, %eax
movq -0x20(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
movl %ecx, %edx
leaq 0x44d8(%rip), %rcx      # 0x6150
movzbl (%rcx,%rdx), %ecx
sarl $0x2, %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
cmpl $0x3, -0x2c(%rbp)
jle 0x1cdc
movq -0x20(%rbp), %rax
movzbl 0x2(%rax), %eax
movl %eax, %ecx
leaq 0x44a5(%rip), %rax      # 0x6150
movzbl (%rax,%rcx), %eax
shll $0x6, %eax
movq -0x20(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
movl %ecx, %edx
leaq 0x448d(%rip), %rcx      # 0x6150
movzbl (%rcx,%rdx), %ecx
orl %ecx, %eax
movb %al, %cl
movq -0x28(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x28(%rbp)
movb %cl, (%rax)
movq -0x28(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x28(%rbp)
movb $0x0, (%rax)
movl $0x4, %ecx
subl -0x2c(%rbp), %ecx
andl $0x3, %ecx
movl -0x14(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)