// File: /workspace/github_c_makefile_star2_O0/redis-force[P]rpm/module/rpm_redis.c
// Function: redis_response_process_item
static int32_t redis_response_process_item(redis_response_reader *reader) {
  redis_response_reader_task *cur = reader->tasks + reader->task_idx;
  char *p;

  if (cur->type < 0) {
    if ((p = redis_response_reader_read_bytes(reader, 1)) != NULL) {
      switch (*p) {
      case '-':
        cur->type = REDIS_RESPONSE_ERROR;
        break;
      case '+':
        cur->type = REDIS_RESPONSE_STATUS;
        break;
      case ':':
        cur->type = REDIS_RESPONSE_INTEGER;
        break;
      case '$':
        cur->type = REDIS_RESPONSE_STRING;
        break;
      case '*':
        cur->type = REDIS_RESPONSE_ARRAY;
        break;
      default:
        redis_response_reader_set_error_protocol_byte(reader, *p);
        return reader->err;
      }
    } else {
      return REDIS_RESPONSE_ERROR_WOULDBLOCK;
    }
  }

  /* process typed item */
  switch(cur->type) {
  case REDIS_RESPONSE_ERROR:
  case REDIS_RESPONSE_STATUS:
  case REDIS_RESPONSE_INTEGER:
    return redis_response_reader_read_line_item(reader);
  case REDIS_RESPONSE_STRING:
    return redis_response_reader_read_bulk_item(reader);
  case REDIS_RESPONSE_ARRAY:
    return redis_response_reader_read_multi_bulk_item(reader);
  default:
    assert(0);
    redis_response_reader_set_error(reader, REDIS_RESPONSE_ERROR_PROTOCOL, "Invalid response type");
    return REDIS_RESPONSE_ERROR_PROTOCOL;
  }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq 0x28(%rsp), %rax
addq $0xb8, %rax
movq 0x28(%rsp), %rcx
movslq 0x1d8(%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpl $0x0, (%rax)
jge 0xb3b5
movq 0x28(%rsp), %rdi
movl $0x1, %esi
callq 0xb5e0
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
je 0xb3a9
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
addl $-0x24, %eax
movl %eax, %ecx
movq %rcx, 0x10(%rsp)
subl $0x16, %eax
ja 0xb385
movq 0x10(%rsp), %rax
leaq 0x2f65(%rip), %rcx      # 0xe2a0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%rsp), %rax
movl $0x6, (%rax)
jmp 0xb3a7
movq 0x20(%rsp), %rax
movl $0x5, (%rax)
jmp 0xb3a7
movq 0x20(%rsp), %rax
movl $0x3, (%rax)
jmp 0xb3a7
movq 0x20(%rsp), %rax
movl $0x1, (%rax)
jmp 0xb3a7
movq 0x20(%rsp), %rax
movl $0x2, (%rax)
jmp 0xb3a7
movq 0x28(%rsp), %rdi
movq 0x18(%rsp), %rax
movsbl (%rax), %esi
callq 0xb660
movq 0x28(%rsp), %rax
movl (%rax), %eax
movl %eax, 0x34(%rsp)
jmp 0xb42e
jmp 0xb3b3
movl $0x1, 0x34(%rsp)
jmp 0xb42e
jmp 0xb3b5
movq 0x20(%rsp), %rax
movl (%rax), %eax
decl %eax
movl %eax, %ecx
movq %rcx, 0x8(%rsp)
subl $0x5, %eax
ja 0xb40f
movq 0x8(%rsp), %rax
leaq 0x2f26(%rip), %rcx      # 0xe2fc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x28(%rsp), %rdi
callq 0xb6d0
movl %eax, 0x34(%rsp)
jmp 0xb42e
movq 0x28(%rsp), %rdi
callq 0xb7e0
movl %eax, 0x34(%rsp)
jmp 0xb42e
movq 0x28(%rsp), %rdi
callq 0xb9d0
movl %eax, 0x34(%rsp)
jmp 0xb42e
leaq 0x2a5c(%rip), %rdi      # 0xde72
leaq 0x2f11(%rip), %rsi      # 0xe32e
movl $0x251, %edx            # imm = 0x251
leaq 0x2f11(%rip), %rcx      # 0xe33a
callq 0x5100
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)