// File: /workspace/github_c_makefile_star2_O0/andyfighting[P]hiredis_timer_cmpt/read.c
// Function: processBulkItem
static int processBulkItem(redisReader *r) {
    redisReadTask *cur = &(r->rstack[r->ridx]);
    void *obj = NULL;
    char *p, *s;
    long len;
    unsigned long bytelen;
    int success = 0;

    p = r->buf+r->pos;
    s = seekNewline(p,r->len-r->pos);
    if (s != NULL) {
        p = r->buf+r->pos;
        bytelen = s-(r->buf+r->pos)+2; /* include \r\n */
        len = readLongLong(p);

        if (len < 0) {
            /* The nil object can always be created. */
            if (r->fn && r->fn->createNil)
                obj = r->fn->createNil(cur);
            else
                obj = (void*)REDIS_REPLY_NIL;
            success = 1;
        } else {
            /* Only continue when the buffer contains the entire bulk item. */
            bytelen += len+2; /* include \r\n */
            if (r->pos+bytelen <= r->len) {
                if (r->fn && r->fn->createString)
                    obj = r->fn->createString(cur,s+2,len);
                else
                    obj = (void*)REDIS_REPLY_STRING;
                success = 1;
            }
        }

        /* Proceed when obj was created. */
        if (success) {
            if (obj == NULL) {
                __redisReaderSetErrorOOM(r);
                return REDIS_ERR;
            }

            r->pos += bytelen;

            /* Set reply if this is the root object. */
            if (r->ridx == 0) r->reply = obj;
            moveToNextTask(r);
            return REDIS_OK;
        }
    }

    return REDIS_ERR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0xa8, %rax
movq -0x10(%rbp), %rcx
movslq 0x210(%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x90(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x98(%rax), %rsi
movq -0x10(%rbp), %rax
subq 0x90(%rax), %rsi
callq 0xc620
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0xbebe
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq -0x10(%rbp), %rcx
addq 0x90(%rcx), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0x88(%rcx), %rcx
movq -0x10(%rbp), %rdx
addq 0x90(%rdx), %rcx
subq %rcx, %rax
addq $0x2, %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdi
callq 0xc410
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jge 0xbdd6
movq -0x10(%rbp), %rax
cmpq $0x0, 0x220(%rax)
je 0xbdc1
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0xbdc1
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rdi
callq *%rax
movq %rax, -0x20(%rbp)
jmp 0xbdca
movl $0x4, %eax
movq %rax, -0x20(%rbp)
movl $0x1, -0x44(%rbp)
jmp 0xbe59
movq -0x38(%rbp), %rax
addq $0x2, %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0x90(%rax), %rax
addq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x98(%rcx), %rax
ja 0xbe57
movq -0x10(%rbp), %rax
cmpq $0x0, 0x220(%rax)
je 0xbe47
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rax
cmpq $0x0, (%rax)
je 0xbe47
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rsi
addq $0x2, %rsi
movq -0x38(%rbp), %rdx
callq *%rax
movq %rax, -0x20(%rbp)
jmp 0xbe50
movl $0x1, %eax
movq %rax, -0x20(%rbp)
movl $0x1, -0x44(%rbp)
jmp 0xbe59
cmpl $0x0, -0x44(%rbp)
je 0xbebc
cmpq $0x0, -0x20(%rbp)
jne 0xbe78
movq -0x10(%rbp), %rdi
callq 0xb5e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xbec5
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x90(%rax), %rcx
movq %rcx, 0x90(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x210(%rax)
jne 0xbeaa
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x218(%rax)
movq -0x10(%rbp), %rdi
callq 0xc4e0
movl $0x0, -0x4(%rbp)
jmp 0xbec5
jmp 0xbebe
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nop