// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/discnt-cli.c
// Function: cliReadReply
static int cliReadReply(int output_raw_strings) {
    void *_reply;
    redisReply *reply;
    sds out = NULL;

    if (redisGetReply(context,&_reply) != REDIS_OK) {
        if (config.shutdown) {
            redisFree(context);
            context = NULL;
            return REDIS_OK;
        }
        if (config.interactive) {
            /* Filter cases where we should reconnect */
            if (context->err == REDIS_ERR_IO &&
                (errno == ECONNRESET || errno == EPIPE))
                return REDIS_ERR;
            if (context->err == REDIS_ERR_EOF)
                return REDIS_ERR;
        }
        cliPrintContextError();
        exit(1);
        return REDIS_ERR; /* avoid compiler warning */
    }

    reply = (redisReply*)_reply;

    config.last_cmd_type = reply->type;

    if (output_raw_strings) {
        out = cliFormatReplyRaw(reply);
    } else {
        if (config.output == OUTPUT_RAW) {
            out = cliFormatReplyRaw(reply);
            out = sdscat(out,"\n");
        } else if (config.output == OUTPUT_STANDARD) {
            out = cliFormatReplyTTY(reply,"");
        } else if (config.output == OUTPUT_CSV) {
            out = cliFormatReplyCSV(reply);
            out = sdscat(out,"\n");
        }
    }
    fwrite(out,sdslen(out),1,stdout);
    sdsfree(out);
    freeReplyObject(reply);
    return REDIS_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x8(%rbp)
movq $0x0, -0x20(%rbp)
movq 0x82bae(%rip), %rdi     # 0x96cc8
leaq -0x10(%rbp), %rsi
callq 0x186e0
cmpl $0x0, %eax
je 0x141b6
cmpl $0x0, 0x82ab1(%rip)     # 0x96be4
je 0x14158
movq 0x82b8c(%rip), %rdi     # 0x96cc8
callq 0x17ec0
movq $0x0, 0x82b7c(%rip) # 0x96cc8
movl $0x0, -0x4(%rbp)
jmp 0x1429f
cmpl $0x0, 0x82a81(%rip)     # 0x96be0
je 0x141a7
movq 0x82b60(%rip), %rax     # 0x96cc8
cmpl $0x1, (%rax)
jne 0x1418d
callq 0xc080
cmpl $0x68, (%rax)
je 0x14181
callq 0xc080
cmpl $0x20, (%rax)
jne 0x1418d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1429f
movq 0x82b34(%rip), %rax     # 0x96cc8
cmpl $0x3, (%rax)
jne 0x141a5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1429f
jmp 0x141a7
callq 0x13e80
movl $0x1, %edi
callq 0xc590
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, 0x82ae6(%rip)     # 0x96cb0
cmpl $0x0, -0x8(%rbp)
je 0x141df
movq -0x18(%rbp), %rdi
callq 0x14380
movq %rax, -0x20(%rbp)
jmp 0x1425a
cmpl $0x1, 0x82a32(%rip)     # 0x96c18
jne 0x1420b
movq -0x18(%rbp), %rdi
callq 0x14380
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x6f710(%rip), %rsi     # 0x83910
callq 0xeff0
movq %rax, -0x20(%rbp)
jmp 0x14258
cmpl $0x0, 0x82a06(%rip)     # 0x96c18
jne 0x1422a
movq -0x18(%rbp), %rdi
leaq 0x70f54(%rip), %rsi     # 0x85173
callq 0x14510
movq %rax, -0x20(%rbp)
jmp 0x14256
cmpl $0x2, 0x829e7(%rip)     # 0x96c18
jne 0x14254
movq -0x18(%rbp), %rdi
callq 0x147d0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x6f6c5(%rip), %rsi     # 0x83910
callq 0xeff0
movq %rax, -0x20(%rbp)
jmp 0x14256
jmp 0x14258
jmp 0x1425a
movq -0x20(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x14070
movq -0x28(%rbp), %rdi
movq %rax, %rsi
movq 0x81d47(%rip), %rax     # 0x95fc0
movq (%rax), %rcx
movl $0x1, %edx
callq 0xc5b0
movq -0x20(%rbp), %rdi
callq 0xe540
movq -0x18(%rbp), %rdi
callq 0x165c0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)