// File: /workspace/github_cpp_makefile_star2_O3/Sherhang[P]redis-for-cpp/credis.cpp
// Function: Redis::mget(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>> const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>&)
bool Redis::mget(const std::vector<std::string>& keys, std::vector<std::string>& values)
{
    if(_context==NULL)
    {
        return false;
    }
    values.clear(); 
    uint32_t len = keys.size();
    values.reserve(len);
    uint32_t argc = 1;
    size_t argvlen[len+1];
    argvlen[0] = 4; 
    
    const char* argv[len+1];
    char argv1[] = "MGET";
    argv[0] = argv1;
    
    for(size_t t=0; t<keys.size(); t++)
    {
        argvlen[t+1] = keys[t].size();
        argv[t+1] = keys[t].c_str();
        argc++;
    }

    redisReply* _reply = (redisReply*)::redisCommandArgv(_context, argc, argv, argvlen);
    
    if (_reply && _reply->type == REDIS_REPLY_ARRAY)
    {
	    for (unsigned int i = 0; i < _reply->elements; i++)
	    {
                std::string strTemp(_reply->element[i]->str,_reply->element[i]->len);
                if(strTemp.size() <= 0)
                    strTemp="";
                values.push_back(strTemp);
	    }
    }

    freeReply(_reply);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq 0x8(%rdi), %r13
testq %r13, %r13
je 0x63e7
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq %rdx, %rdi
callq 0xa780
movq 0x8(%r15), %r12
subq (%r15), %r12
sarq $0x5, %r12
movl %r12d, %esi
movq %rbx, %rdi
callq 0xa7c6
movq %rsp, -0x38(%rbp)
incl %r12d
leaq 0xf(,%r12,8), %rax
andq $-0x10, %rax
movq %rsp, %rcx
subq %rax, %rcx
movq %rcx, %rsp
movq $0x4, (%rcx)
movq %rsp, %rdx
subq %rax, %rdx
movq %rdx, %rsp
leaq -0x40(%rbp), %rax
movb $0x0, 0x4(%rax)
movl $0x5445474d, (%rax)     # imm = 0x5445474D
movq %rax, (%rdx)
movq (%r15), %rsi
movq 0x8(%r15), %rax
subq %rsi, %rax
je 0x633c
sarq $0x5, %rax
cmpq $0x1, %rax
adcq $0x0, %rax
addq $0x8, %rsi
xorl %edi, %edi
movq (%rsi), %r8
movq %r8, 0x8(%rcx,%rdi,8)
movq -0x8(%rsi), %r8
movq %r8, 0x8(%rdx,%rdi,8)
leaq 0x1(%rdi), %r8
addq $0x20, %rsi
movq %r8, %rdi
cmpq %r8, %rax
jne 0x6316
leal 0x1(%rax), %esi
jmp 0x6341
movl $0x1, %esi
movq 0x8(%r14), %rdi
callq 0xe270
testq %rax, %rax
je 0x63e3
movq %rax, %r14
movq %r13, -0x30(%rbp)
cmpl $0x2, (%rax)
jne 0x63d7
cmpq $0x0, 0x20(%r14)
je 0x63d7
movl $0x1, %r13d
leaq -0x50(%rbp), %r12
xorl %eax, %eax
leaq -0x60(%rbp), %r15
movq 0x28(%r14), %rcx
movq (%rcx,%rax,8), %rax
movq 0x18(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
movq %r12, -0x60(%rbp)
movq %r15, %rdi
callq 0x42ba
cmpq $0x0, -0x58(%rbp)
jne 0x63b2
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
leaq 0xdef8(%rip), %rcx      # 0x142a2
xorl %r8d, %r8d
callq 0x3500
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa8a6
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x63cb
callq 0x3350
movl %r13d, %eax
incl %r13d
cmpq %rax, 0x20(%r14)
ja 0x6376
movq %r14, %rdi
callq 0xbb00
movq -0x30(%rbp), %r13
movq -0x38(%rbp), %rsp
testq %r13, %r13
setne %al
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r12, %rdi
je 0x640d
callq 0x3350
movq %rbx, %rdi
callq 0x35b0
nop