// File: /workspace/github_c_makefile_star2_O0/sszllzss[P]webSocket_Libevent_ThreadPool/ev_websocket.c
// Function: base64_decode(char const*, unsigned char*)
int base64_decode( const char *base64, unsigned char *bindata)
{
    int i, j;
    unsigned char k;
    unsigned char temp[4];
    for ( i = 0, j = 0; base64[i] != '\0' ; i += 4 )
    {
        memset( temp, 0xFF, sizeof(temp) );
        for ( k = 0 ; k < 64 ; k ++ )
        {
            if ( base64char[k] == base64[i] )
                temp[0]= k;
        }
        for ( k = 0 ; k < 64 ; k ++ )
        {
            if ( base64char[k] == base64[i+1] )
                temp[1]= k;
        }
        for ( k = 0 ; k < 64 ; k ++ )
        {
            if ( base64char[k] == base64[i+2] )
                temp[2]= k;
        }
        for ( k = 0 ; k < 64 ; k ++ )
        {
            if ( base64char[k] == base64[i+3] )
                temp[3]= k;
        }
        bindata[j++] = ((unsigned char)(((unsigned char)(temp[0] << 2))&0xFC)) | \
                       ((unsigned char)((unsigned char)(temp[1]>>4)&0x03));
        if ( base64[i+2] == '=' )
            break;
        bindata[j++] = ((unsigned char)(((unsigned char)(temp[1] << 4))&0xF0)) | \
                       ((unsigned char)((unsigned char)(temp[2]>>2)&0x0F));
        if ( base64[i+3] == '=' )
            break;
        bindata[j++] = ((unsigned char)(((unsigned char)(temp[2] << 6))&0xF0)) | \
                       ((unsigned char)(temp[3]&0x3F));
    }
    return j;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rax
movslq -0x14(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x5031
leaq -0x1d(%rbp), %rdi
movl $0xff, %esi
movl $0x4, %edx
callq 0x4290
movb $0x0, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x40, %eax
jge 0x4e76
movzbl -0x19(%rbp), %eax
movl %eax, %ecx
leaq 0xf1c0(%rip), %rax      # 0x14010
movsbl (%rax,%rcx), %eax
movq -0x8(%rbp), %rcx
movslq -0x14(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x4e6a
movb -0x19(%rbp), %al
movb %al, -0x1d(%rbp)
jmp 0x4e6c
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x4e3a
movb $0x0, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x40, %eax
jge 0x4ebb
movzbl -0x19(%rbp), %eax
movl %eax, %ecx
leaq 0xf180(%rip), %rax      # 0x14010
movsbl (%rax,%rcx), %eax
movq -0x8(%rbp), %rcx
movl -0x14(%rbp), %edx
addl $0x1, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x4eaf
movb -0x19(%rbp), %al
movb %al, -0x1c(%rbp)
jmp 0x4eb1
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x4e7a
movb $0x0, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x40, %eax
jge 0x4f00
movzbl -0x19(%rbp), %eax
movl %eax, %ecx
leaq 0xf13b(%rip), %rax      # 0x14010
movsbl (%rax,%rcx), %eax
movq -0x8(%rbp), %rcx
movl -0x14(%rbp), %edx
addl $0x2, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x4ef4
movb -0x19(%rbp), %al
movb %al, -0x1b(%rbp)
jmp 0x4ef6
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x4ebf
movb $0x0, -0x19(%rbp)
movzbl -0x19(%rbp), %eax
cmpl $0x40, %eax
jge 0x4f45
movzbl -0x19(%rbp), %eax
movl %eax, %ecx
leaq 0xf0f6(%rip), %rax      # 0x14010
movsbl (%rax,%rcx), %eax
movq -0x8(%rbp), %rcx
movl -0x14(%rbp), %edx
addl $0x3, %edx
movslq %edx, %rdx
movsbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x4f39
movb -0x19(%rbp), %al
movb %al, -0x1a(%rbp)
jmp 0x4f3b
movb -0x19(%rbp), %al
addb $0x1, %al
movb %al, -0x19(%rbp)
jmp 0x4f04
movzbl -0x1d(%rbp), %eax
shll $0x2, %eax
movzbl %al, %eax
andl $0xfc, %eax
movzbl %al, %eax
movzbl -0x1c(%rbp), %ecx
sarl $0x4, %ecx
movzbl %cl, %ecx
andl $0x3, %ecx
movzbl %cl, %ecx
orl %ecx, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x18(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3d, %eax
jne 0x4f9b
jmp 0x5031
movzbl -0x1c(%rbp), %eax
shll $0x4, %eax
movzbl %al, %eax
andl $0xf0, %eax
movzbl %al, %eax
movzbl -0x1b(%rbp), %ecx
sarl $0x2, %ecx
movzbl %cl, %ecx
andl $0xf, %ecx
movzbl %cl, %ecx
orl %ecx, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x18(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movq -0x8(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x3, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x3d, %eax
jne 0x4fee
jmp 0x5031
movzbl -0x1b(%rbp), %eax
shll $0x6, %eax
movzbl %al, %eax
andl $0xf0, %eax
movzbl %al, %eax
movzbl -0x1a(%rbp), %ecx
andl $0x3f, %ecx
movzbl %cl, %ecx
orl %ecx, %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x18(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
movl -0x14(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x14(%rbp)
jmp 0x4e0e
movl -0x18(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)