// File: /workspace/github_c_makefile_star2_O0/andyfighting[P]hiredis_timer_cmpt/read.c
// Function: redisReaderGetReply
int redisReaderGetReply(redisReader *r, void **reply) {
    /* Default target pointer to NULL. */
    if (reply != NULL)
        *reply = NULL;

    /* Return early when this reader is in an erroneous state. */
    if (r->err)
        return REDIS_ERR;

    /* When the buffer is empty, there will never be a reply. */
    if (r->len == 0)
        return REDIS_OK;

    /* Set first item to process when the stack is empty. */
    if (r->ridx == -1) {
        r->rstack[0].type = -1;
        r->rstack[0].elements = -1;
        r->rstack[0].idx = -1;
        r->rstack[0].obj = NULL;
        r->rstack[0].parent = NULL;
        r->rstack[0].privdata = r->privdata;
        r->ridx = 0;
    }

    /* Process items in reply. */
    while (r->ridx >= 0)
        if (processItem(r) != REDIS_OK)
            break;

    /* Return ASAP when an error occurred. */
    if (r->err)
        return REDIS_ERR;

    /* Discard part of the buffer when we've consumed at least 1k, to avoid
     * doing unnecessary calls to memmove() in sds.c. */
    if (r->pos >= 1024) {
        sdsrange(r->buf,r->pos,-1);
        r->pos = 0;
        r->len = sdslen(r->buf);
    }

    /* Emit a reply when there is one. */
    if (r->ridx == -1) {
        if (reply != NULL)
            *reply = r->reply;
        r->reply = NULL;
    }
    return REDIS_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0xb632
movq -0x18(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0xb647
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb7ac
movq -0x10(%rbp), %rax
cmpq $0x0, 0x98(%rax)
jne 0xb661
movl $0x0, -0x4(%rbp)
jmp 0xb7ac
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x210(%rax)
jne 0xb6da
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xa8(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xac(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movl $0xffffffff, 0xb0(%rax) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
movq $0x0, 0xb8(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xc0(%rax)
movq -0x10(%rbp), %rax
movq 0x228(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xc8(%rax)
movq -0x10(%rbp), %rax
movl $0x0, 0x210(%rax)
jmp 0xb6dc
movq -0x10(%rbp), %rax
cmpl $0x0, 0x210(%rax)
jl 0xb6fb
movq -0x10(%rbp), %rdi
callq 0xb7c0
cmpl $0x0, %eax
je 0xb6f9
jmp 0xb6fb
jmp 0xb6dc
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0xb710
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xb7ac
movq -0x10(%rbp), %rax
cmpq $0x400, 0x90(%rax) # imm = 0x400
jb 0xb770
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
movl %eax, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x3230
movq -0x10(%rbp), %rax
movq $0x0, 0x90(%rax)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0xb2f0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x98(%rax)
movq -0x10(%rbp), %rax
cmpl $-0x1, 0x210(%rax)
jne 0xb7a5
cmpq $0x0, -0x18(%rbp)
je 0xb796
movq -0x10(%rbp), %rax
movq 0x218(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0x218(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)