// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: cliFormatReplyRaw
static sds cliFormatReplyRaw(redisReply *r) {
    sds out = sdsempty(), tmp;
    size_t i;

    switch (r->type) {
    case REDIS_REPLY_NIL:
        /* Nothing... */
        break;
    case REDIS_REPLY_ERROR:
        out = sdscatlen(out,r->str,r->len);
        out = sdscatlen(out,"\n",1);
        break;
    case REDIS_REPLY_STATUS:
    case REDIS_REPLY_STRING:
        if (r->type == REDIS_REPLY_STATUS && config.eval_ldb) {
            /* The Lua debugger replies with arrays of simple (status)
             * strings. We colorize the output for more fun if this
             * is a debugging session. */

            /* Detect the end of a debugging session. */
            if (strstr(r->str,"<endsession>") == r->str) {
                config.enable_ldb_on_eval = 0;
                config.eval_ldb = 0;
                config.eval_ldb_end = 1; /* Signal the caller session ended. */
                config.output = OUTPUT_STANDARD;
                cliRefreshPrompt();
            } else {
                out = sdsCatColorizedLdbReply(out,r->str,r->len);
            }
        } else {
            out = sdscatlen(out,r->str,r->len);
        }
        break;
    case REDIS_REPLY_INTEGER:
        out = sdscatprintf(out,"%lld",r->integer);
        break;
    case REDIS_REPLY_ARRAY:
        for (i = 0; i < r->elements; i++) {
            if (i > 0) out = sdscat(out,config.mb_delim);
            tmp = cliFormatReplyRaw(r->element[i]);
            out = sdscatlen(out,tmp,sdslen(tmp));
            sdsfree(tmp);
        }
        break;
    default:
        fprintf(stderr,"Unknown reply type: %d\n", r->type);
        exit(1);
    }
    return out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r14
callq 0x1d966
movq %rax, %rbx
movl (%r14), %edi
leal -0x1(%rdi), %eax
cmpl $0x5, %eax
ja 0x19916
leaq 0x26af8(%rip), %rcx     # 0x402a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%r14), %r15
cmpl $0x5, %edi
jne 0x197fb
cmpl $0x0, 0x40d7b(%rip)     # 0x5a540
je 0x197fb
leaq 0x2b757(%rip), %rsi     # 0x44f25
movl $0xc, %edx
movq %r15, %rdi
callq 0x100c0
testl %eax, %eax
je 0x198eb
movslq 0x10(%r14), %rdx
movq %rbx, %rdi
movq %r15, %rsi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x15da2
movslq 0x10(%r14), %rdx
movq %rbx, %rdi
movq %r15, %rsi
jmp 0x198bf
cmpq $0x0, 0x20(%r14)
je 0x19909
xorl %r12d, %r12d
leaq 0x26a9d(%rip), %r13     # 0x402bc
testq %r12, %r12
je 0x19836
movq 0x40c85(%rip), %rsi     # 0x5a4b0
movq %rbx, %rdi
callq 0x1e279
movq %rax, %rbx
movq 0x28(%r14), %rax
movq (%rax,%r12,8), %rdi
callq 0x19782
movq %rax, %r15
movzbl -0x1(%rax), %edx
movl %edx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x1987d
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
shrl $0x3, %edx
jmp 0x1987f
movq -0x11(%r15), %rdx
jmp 0x1987f
movzwl -0x5(%r15), %edx
jmp 0x1987f
movl -0x9(%r15), %edx
jmp 0x1987f
movzbl -0x3(%r15), %edx
jmp 0x1987f
xorl %edx, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1e1ae
movq %rax, %rbx
movq %r15, %rdi
callq 0x1da09
incq %r12
cmpq 0x20(%r14), %r12
jb 0x1981f
jmp 0x19909
movq 0x18(%r14), %rsi
movslq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x1e1ae
leaq 0x2b9d8(%rip), %rsi     # 0x4528f
movl $0x1, %edx
movq %rax, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1e1ae
movq 0x8(%r14), %rdx
leaq 0x2b65a(%rip), %rsi     # 0x44f32
movq %rbx, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1e60a
xorl %eax, %eax
movl %eax, 0x40c4d(%rip)     # 0x5a540
movq $0x1, 0x40c4a(%rip) # 0x5a548
movl %eax, 0x40ba4(%rip)     # 0x5a4a8
callq 0x196cc
movq %rbx, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0x10e58