// File: Sherhang[P]redis-for-cpp/credis.cpp
// Function: Redis::execReplyString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)
bool Redis::execReplyString(const std::string& cmd, std::string& ret)
{
    if(_context==NULL)
    {
        //DEBUG<<"_context is NULL"<<std::endl;
        return false;
    }
    redisReply* _reply = (redisReply*)::redisCommand(_context, cmd.c_str());
    if (!(isError(_reply)))
    {
        if (_reply->type == REDIS_REPLY_STRING || _reply->type == REDIS_REPLY_STATUS)// status --> string
        {
            ret = _reply->str;
            freeReply(_reply);
            return true;
        }

        if (_reply->type == REDIS_REPLY_ERROR)
        {
            std::string reason = _reply->str;
            reason.resize(_reply->len);
            freeReply(_reply);
            return false;
        }
    }
    else
        DEBUG<<"isError(_reply)"<<std::endl;
    freeReply(_reply);
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %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 0x71ef
movb $0x0, -0x1(%rbp)
jmp 0x73bc
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3190
movq -0x70(%rbp), %rdi
movq %rax, %rsi
movb $0x0, %al
callq 0x11a60
movq -0x68(%rbp), %rdi
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rsi
callq 0x59f0
testb $0x1, %al
jne 0x7313
movq -0x28(%rbp), %rax
cmpl $0x1, (%rax)
je 0x723d
movq -0x28(%rbp), %rax
cmpl $0x5, (%rax)
jne 0x7264
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x20(%rbp), %rdi
callq 0x3500
movq -0x68(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x59c0
movb $0x1, -0x1(%rbp)
jmp 0x73bc
movq -0x28(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x730e
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x80(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x3670
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
leaq -0x48(%rbp), %rdi
callq 0x3510
jmp 0x729d
leaq -0x49(%rbp), %rdi
callq 0x3410
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rsi
leaq -0x48(%rbp), %rdi
callq 0x3520
jmp 0x72b9
movq -0x68(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x59c0
jmp 0x72c8
movb $0x0, -0x1(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3290
jmp 0x73bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x49(%rbp), %rdi
callq 0x3410
jmp 0x73ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x3290
jmp 0x73ca
jmp 0x73ab
movq 0x18cbe(%rip), %rdi     # 0x1ffd8
leaq 0x10d82(%rip), %rsi     # 0x180a3
callq 0x33b0
movq %rax, %rdi
leaq 0x10d7b(%rip), %rsi     # 0x180ab
callq 0x33b0
movq %rax, %rdi
leaq 0x10d77(%rip), %rsi     # 0x180b6
callq 0x33b0
movq %rax, %rdi
leaq 0x10e8d(%rip), %rsi     # 0x181db
callq 0x33b0
movq %rax, %rdi
leaq 0x10d59(%rip), %rsi     # 0x180b6
callq 0x33b0
movq %rax, %rdi
leaq 0x10d50(%rip), %rsi     # 0x180bc
callq 0x33b0
movq %rax, %rdi
movl $0x37a, %esi            # imm = 0x37A
callq 0x3650
movq %rax, %rdi
leaq 0x1184a(%rip), %rsi     # 0x18bd2
callq 0x33b0
movq %rax, %rdi
leaq 0x10e54(%rip), %rsi     # 0x181eb
callq 0x33b0
movq %rax, %rdi
movq 0x18c22(%rip), %rsi     # 0x1ffc8
callq 0x33f0
movq -0x68(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x59c0
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x3660
nopw %cs:(%rax,%rax)