// File: Sherhang[P]redis-for-cpp/credis.cpp
// Function: Redis::mset(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>>>> const&)
bool Redis::mset(const std::vector<std::string> & keys, const std::vector<std::string> & values)
{
    if(_context==NULL)
    {
        return false;
    }
    
    if(keys.size() != values.size())
    {
        return false;
    }
    
    int len = keys.size()+values.size();
    int argc = 1;
    size_t argvlen[len+1];
    argvlen[0] = 4; 
    
    const char* argv[len+1];
    char argv1[] = "MSET";
    argv[0] = argv1;

    for(size_t t=0; t<keys.size(); t++)
    {
        argvlen[argc] = keys[t].size();
        argv[argc] = keys[t].c_str();
        argc++;
        
        argvlen[argc] = values[t].size();
        argv[argc] = values[t].c_str();
        argc++;
    }
    redisReply* _reply = (redisReply*)::redisCommandArgv(_context, argc, argv, argvlen);
    if (_reply && _reply->type == REDIS_REPLY_STATUS )
    {
        if(strcasecmp(_reply->str, "OK") == 0)
        {
            freeReply(_reply);
            return true;
        }
        else
        {
        }
    }
    freeReply(_reply);
    
    return false;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, 0x8(%rax)
jne 0x77bf
movb $0x0, -0x1(%rbp)
jmp 0x79f3
movq -0x18(%rbp), %rdi
callq 0x4540
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rdi
callq 0x4540
movq %rax, %rcx
movq -0x70(%rbp), %rax
cmpq %rcx, %rax
je 0x77ea
movb $0x0, -0x1(%rbp)
jmp 0x79f3
movq -0x18(%rbp), %rdi
callq 0x4540
movq %rax, -0x88(%rbp)
movq -0x20(%rbp), %rdi
callq 0x4540
movq %rax, %rcx
movq -0x88(%rbp), %rax
addl %ecx, %eax
movl %eax, -0x24(%rbp)
movl $0x1, -0x28(%rbp)
movl -0x24(%rbp), %eax
incl %eax
movl %eax, %edx
movq %rsp, %rax
movq %rax, -0x30(%rbp)
leaq 0xf(,%rdx,8), %rcx
andq $-0x10, %rcx
movq %rsp, %rax
movq %rax, %rsi
subq %rcx, %rsi
movq %rsi, -0x80(%rbp)
movq %rsi, %rsp
negq %rcx
movq %rdx, -0x38(%rbp)
movq $0x4, (%rax,%rcx)
movl -0x24(%rbp), %eax
incl %eax
movl %eax, %ecx
leaq 0xf(,%rcx,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rax
subq %rdx, %rax
movq %rax, -0x78(%rbp)
movq %rax, %rsp
movq %rcx, -0x40(%rbp)
movl 0x10893(%rip), %ecx     # 0x1810f
movl %ecx, -0x45(%rbp)
movb 0x1088e(%rip), %cl      # 0x18113
movb %cl, -0x41(%rbp)
leaq -0x45(%rbp), %rcx
movq %rcx, (%rax)
movq $0x0, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rdi
callq 0x4540
movq %rax, %rcx
movq -0x90(%rbp), %rax
cmpq %rcx, %rax
jae 0x7971
movq -0x18(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0xbac0
movq %rax, %rdi
callq 0x32d0
movq %rax, %rdx
movq -0x80(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0xbac0
movq %rax, %rdi
callq 0x3190
movq %rax, %rdx
movq -0x78(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0xbac0
movq %rax, %rdi
callq 0x32d0
movq %rax, %rdx
movq -0x80(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x20(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0xbac0
movq %rax, %rdi
callq 0x3190
movq %rax, %rdx
movq -0x78(%rbp), %rax
movslq -0x28(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x50(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x7897
movq -0x80(%rbp), %rcx
movq -0x78(%rbp), %rdx
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0x28(%rbp), %esi
callq 0x11b20
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0x79d4
movq -0x58(%rbp), %rax
cmpl $0x5, (%rax)
jne 0x79d4
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rdi
leaq 0x10768(%rip), %rsi     # 0x18114
callq 0x3430
cmpl $0x0, %eax
jne 0x79d0
movq -0x68(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x59c0
movb $0x1, -0x1(%rbp)
movl $0x1, -0x5c(%rbp)
jmp 0x79ec
jmp 0x79d2
jmp 0x79d4
movq -0x68(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x59c0
movb $0x0, -0x1(%rbp)
movl $0x1, -0x5c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rsp
movb -0x1(%rbp), %al
andb $0x1, %al
movq %rbp, %rsp
popq %rbp
retq
nopl (%rax)