// File: /workspace/github_c_makefile_star2_O0/andyfighting[P]hiredis_timer_cmpt/read.c
// Function: processMultiBulkItem
static int processMultiBulkItem(redisReader *r) {
    redisReadTask *cur = &(r->rstack[r->ridx]);
    void *obj;
    char *p;
    long elements;
    int root = 0;

    /* Set error for nested multi bulks with depth > 7 */
    if (r->ridx == 8) {
        __redisReaderSetError(r,REDIS_ERR_PROTOCOL,
            "No support for nested multi bulk replies with depth > 7");
        return REDIS_ERR;
    }

    if ((p = readLine(r,NULL)) != NULL) {
        elements = readLongLong(p);
        root = (r->ridx == 0);

        if (elements == -1) {
            if (r->fn && r->fn->createNil)
                obj = r->fn->createNil(cur);
            else
                obj = (void*)REDIS_REPLY_NIL;

            if (obj == NULL) {
                __redisReaderSetErrorOOM(r);
                return REDIS_ERR;
            }

            moveToNextTask(r);
        } else {
            if (r->fn && r->fn->createArray)
                obj = r->fn->createArray(cur,elements);
            else
                obj = (void*)REDIS_REPLY_ARRAY;

            if (obj == NULL) {
                __redisReaderSetErrorOOM(r);
                return REDIS_ERR;
            }

            /* Modify task stack when there are more than 0 elements. */
            if (elements > 0) {
                cur->elements = elements;
                cur->obj = obj;
                r->ridx++;
                r->rstack[r->ridx].type = -1;
                r->rstack[r->ridx].elements = -1;
                r->rstack[r->ridx].idx = 0;
                r->rstack[r->ridx].obj = NULL;
                r->rstack[r->ridx].parent = cur;
                r->rstack[r->ridx].privdata = r->privdata;
            } else {
                moveToNextTask(r);
            }
        }

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

    return REDIS_ERR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %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)
movl $0x0, -0x34(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x8, 0x210(%rax)
jne 0xbf31
movq -0x10(%rbp), %rdi
movl $0x4, %esi
leaq 0x1b0c(%rip), %rdx      # 0xda2c
callq 0xb930
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc18e
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xc350
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0xc187
movq -0x28(%rbp), %rdi
callq 0xc410
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x210(%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x34(%rbp)
cmpq $-0x1, -0x30(%rbp)
jne 0xbfe4
movq -0x10(%rbp), %rax
cmpq $0x0, 0x220(%rax)
je 0xbfb1
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0xbfb1
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rax
movq 0x18(%rax), %rax
movq -0x18(%rbp), %rdi
callq *%rax
movq %rax, -0x20(%rbp)
jmp 0xbfba
movl $0x4, %eax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xbfd6
movq -0x10(%rbp), %rdi
callq 0xb5e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc18e
movq -0x10(%rbp), %rdi
callq 0xc4e0
jmp 0xc169
movq -0x10(%rbp), %rax
cmpq $0x0, 0x220(%rax)
je 0xc025
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rax
cmpq $0x0, 0x8(%rax)
je 0xc025
movq -0x10(%rbp), %rax
movq 0x220(%rax), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rdi
movq -0x30(%rbp), %rcx
movl %ecx, %esi
callq *%rax
movq %rax, -0x20(%rbp)
jmp 0xc02e
movl $0x2, %eax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0xc04a
movq -0x10(%rbp), %rdi
callq 0xb5e0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xc18e
cmpq $0x0, -0x30(%rbp)
jle 0xc15e
movq -0x30(%rbp), %rax
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
movl 0x210(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x210(%rax)
movq -0x10(%rbp), %rax
addq $0xa8, %rax
movq -0x10(%rbp), %rcx
movslq 0x210(%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
addq $0xa8, %rax
movq -0x10(%rbp), %rcx
movslq 0x210(%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, 0x4(%rax)  # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rax
addq $0xa8, %rax
movq -0x10(%rbp), %rcx
movslq 0x210(%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0xa8, %rax
movq -0x10(%rbp), %rcx
movslq 0x210(%rcx), %rcx
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
addq $0xa8, %rax
movq -0x10(%rbp), %rdx
movslq 0x210(%rdx), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x228(%rax), %rcx
movq -0x10(%rbp), %rax
addq $0xa8, %rax
movq -0x10(%rbp), %rdx
movslq 0x210(%rdx), %rdx
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x20(%rax)
jmp 0xc167
movq -0x10(%rbp), %rdi
callq 0xc4e0
jmp 0xc169
cmpl $0x0, -0x34(%rbp)
je 0xc17e
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x218(%rax)
movl $0x0, -0x4(%rbp)
jmp 0xc18e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)