// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: getKeyTypes
static void getKeyTypes(redisReply *keys, int *types) {
    redisReply *reply;
    unsigned int i;

    /* Pipeline TYPE commands */
    for(i=0;i<keys->elements;i++) {
        redisAppendCommand(context, "TYPE %s", keys->element[i]->str);
    }

    /* Retrieve types */
    for(i=0;i<keys->elements;i++) {
        if(redisGetReply(context, (void**)&reply)!=REDIS_OK) {
            fprintf(stderr, "Error getting type for key '%s' (%d: %s)\n",
                keys->element[i]->str, context->err, context->errstr);
            exit(1);
        } else if(reply->type != REDIS_REPLY_STATUS) {
            if(reply->type == REDIS_REPLY_ERROR) {
                fprintf(stderr, "TYPE returned an error: %s\n", reply->str);
            } else {
                fprintf(stderr,
                    "Invalid reply type (%d) for TYPE on key '%s'!\n",
                    reply->type, keys->element[i]->str);
            }
            exit(1);
        }

        types[i] = toIntType(keys->element[i]->str, reply->str);
        freeReplyObject(reply);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x17ef7
movq 0x8970d(%rip), %rdi     # 0xa15d8
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rdx
leaq 0x74612(%rip), %rsi     # 0x8c4f7
movb $0x0, %al
callq 0x1d600
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x17eb7
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jae 0x18021
movq 0x896c2(%rip), %rdi     # 0xa15d8
leaq -0x18(%rbp), %rsi
callq 0x1d3b0
cmpl $0x0, %eax
je 0x17f6d
movq 0x870c5(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rdx
movq 0x89690(%rip), %rax     # 0xa15d8
movl (%rax), %ecx
movq 0x89687(%rip), %r8      # 0xa15d8
addq $0x4, %r8
leaq 0x745a3(%rip), %rsi     # 0x8c4ff
movb $0x0, %al
callq 0x10360
movl $0x1, %edi
callq 0x10600
movq -0x18(%rbp), %rax
cmpl $0x5, (%rax)
je 0x17fdc
movq -0x18(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x17fa1
movq 0x8706a(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
leaq 0x74591(%rip), %rsi     # 0x8c529
movb $0x0, %al
callq 0x10360
jmp 0x17fd2
movq 0x87048(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %edx
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rcx
leaq 0x7457a(%rip), %rsi     # 0x8c545
movb $0x0, %al
callq 0x10360
movl $0x1, %edi
callq 0x10600
jmp 0x17fde
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movl -0x1c(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x181e0
movl %eax, %edx
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movq -0x18(%rbp), %rdi
callq 0x1b290
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x17efe
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)