// File: /workspace/github_c_makefile_star2_O0/redis-force[P]rpm/module/rpm_redis.c
// Function: redis_response_reader_read_multi_bulk_item
static int32_t redis_response_reader_read_multi_bulk_item(redis_response_reader *reader) {
  redis_response_reader_task *cur = reader->tasks + reader->task_idx;
  void *obj;
  char *p;
  long elements;
  int32_t root = 0;
  char error[64];

  if (reader->task_idx == reader->max_task_idx) {
    snprintf(error, sizeof(error), "Invalid nested multi bulk replies with depth greater than %d", reader->max_task_idx);
    redis_response_reader_set_error(reader, REDIS_RESPONSE_ERROR_PROTOCOL, error);
    return reader->err;
  }

  if ((p = redis_response_reader_read_line(reader, NULL)) != NULL) {
    elements = redis_response_reader_read_integer(p);
    root = (reader->task_idx == 0);

    if (elements == -1) {
      if ((obj = redis_response_reader_create_nil(reader, cur)) == NULL) {
        redis_response_reader_set_error_oom(reader);
        return reader->err;
      }
      redis_response_reader_next_task(reader);
    } else {
      if ((obj = redis_response_reader_create_array(reader, cur, elements)) == NULL) {
        redis_response_reader_set_error_oom(reader);
        return reader->err;
      }
      if (elements > 0) {
        cur->elements = elements;
        cur->obj = obj;
        redis_response_reader_task_init(cur, reader->tasks + (++reader->task_idx), 0);
      } else {
        redis_response_reader_next_task(reader);
      }
    }

    if (root) {
      reader->response = obj;
    }
    return REDIS_RESPONSE_OK;
  }

  return REDIS_RESPONSE_ERROR_WOULDBLOCK;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x68(%rsp)
movq 0x68(%rsp), %rax
addq $0xb8, %rax
movq 0x68(%rsp), %rcx
movslq 0x1d8(%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x60(%rsp)
movl $0x0, 0x44(%rsp)
movq 0x68(%rsp), %rax
movl 0x1d8(%rax), %eax
movq 0x68(%rsp), %rcx
cmpl 0x1dc(%rcx), %eax
jne 0xba5f
movq %rsp, %rdi
movq 0x68(%rsp), %rax
movl 0x1dc(%rax), %ecx
movl $0x40, %esi
leaq 0x2c0a(%rip), %rdx      # 0xe640
movb $0x0, %al
callq 0x50f0
movq 0x68(%rsp), %rdi
movq %rsp, %rdx
movl $0x2, %esi
callq 0xb4b0
movq 0x68(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x74(%rsp)
jmp 0xbbbb
movq 0x68(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xbda0
movq %rax, 0x50(%rsp)
cmpq $0x0, %rax
je 0xbbb3
movq 0x50(%rsp), %rdi
callq 0xbf30
movq %rax, 0x48(%rsp)
movq 0x68(%rsp), %rax
cmpl $0x0, 0x1d8(%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x44(%rsp)
cmpq $-0x1, 0x48(%rsp)
jne 0xbaee
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0xc3f0
movq %rax, 0x58(%rsp)
cmpq $0x0, %rax
jne 0xbadf
movq 0x68(%rsp), %rdi
callq 0xb0b0
movq 0x68(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x74(%rsp)
jmp 0xbbbb
movq 0x68(%rsp), %rdi
callq 0xc180
jmp 0xbb91
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
movq 0x48(%rsp), %rax
movl %eax, %edx
callq 0xc4a0
movq %rax, 0x58(%rsp)
cmpq $0x0, %rax
jne 0xbb29
movq 0x68(%rsp), %rdi
callq 0xb0b0
movq 0x68(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x74(%rsp)
jmp 0xbbbb
cmpq $0x0, 0x48(%rsp)
jle 0xbb85
movq 0x48(%rsp), %rax
movl %eax, %ecx
movq 0x60(%rsp), %rax
movl %ecx, 0x4(%rax)
movq 0x58(%rsp), %rcx
movq 0x60(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x60(%rsp), %rdi
movq 0x68(%rsp), %rsi
addq $0xb8, %rsi
movq 0x68(%rsp), %rcx
movl 0x1d8(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x1d8(%rcx)
cltq
shlq $0x5, %rax
addq %rax, %rsi
xorl %edx, %edx
callq 0xb270
jmp 0xbb8f
movq 0x68(%rsp), %rdi
callq 0xc180
jmp 0xbb91
cmpl $0x0, 0x44(%rsp)
je 0xbba9
movq 0x58(%rsp), %rcx
movq 0x68(%rsp), %rax
movq %rcx, 0x1e0(%rax)
movl $0x0, 0x74(%rsp)
jmp 0xbbbb
movl $0x1, 0x74(%rsp)
movl 0x74(%rsp), %eax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)