// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: addReplyCommand
void addReplyCommand(client *c, struct redisCommand *cmd) {
    if (!cmd) {
        addReply(c, shared.nullbulk);
    } else {
        /* We are adding: command name, arg count, flags, first, last, offset */
        addReplyMultiBulkLen(c, 6);
        addReplyBulkCString(c, cmd->name);
        addReplyLongLong(c, cmd->arity);

        int flagcount = 0;
        void *flaglen = addDeferredMultiBulkLength(c);
        flagcount += addReplyCommandFlag(c,cmd,CMD_WRITE, "write");
        flagcount += addReplyCommandFlag(c,cmd,CMD_READONLY, "readonly");
        flagcount += addReplyCommandFlag(c,cmd,CMD_DENYOOM, "denyoom");
        flagcount += addReplyCommandFlag(c,cmd,CMD_ADMIN, "admin");
        flagcount += addReplyCommandFlag(c,cmd,CMD_PUBSUB, "pubsub");
        flagcount += addReplyCommandFlag(c,cmd,CMD_NOSCRIPT, "noscript");
        flagcount += addReplyCommandFlag(c,cmd,CMD_RANDOM, "random");
        flagcount += addReplyCommandFlag(c,cmd,CMD_SORT_FOR_SCRIPT,"sort_for_script");
        flagcount += addReplyCommandFlag(c,cmd,CMD_LOADING, "loading");
        flagcount += addReplyCommandFlag(c,cmd,CMD_STALE, "stale");
        flagcount += addReplyCommandFlag(c,cmd,CMD_SKIP_MONITOR, "skip_monitor");
        flagcount += addReplyCommandFlag(c,cmd,CMD_ASKING, "asking");
        flagcount += addReplyCommandFlag(c,cmd,CMD_FAST, "fast");
        if (cmd->getkeys_proc) {
            addReplyStatus(c, "movablekeys");
            flagcount += 1;
        }
        setDeferredMultiBulkLength(c, flaglen, flagcount);

        addReplyLongLong(c, cmd->firstkey);
        addReplyLongLong(c, cmd->lastkey);
        addReplyLongLong(c, cmd->keystep);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
testq %rsi, %rsi
je 0x2f2f4
movq %rsi, %r14
pushq $0x6
popq %rsi
movq %rbx, %rdi
callq 0x370d9
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x36f5d
movslq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x370a6
movq %rbx, %rdi
callq 0x36dad
movq %rax, %r15
leaq 0x87da2(%rip), %rcx     # 0xb6ee1
pushq $0x1
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2f0d8
movl %eax, %ebp
leaq 0x7f6b9(%rip), %rcx     # 0xae80f
pushq $0x2
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2f0d8
movl %eax, %r13d
addl %ebp, %r13d
leaq 0x8065e(%rip), %rcx     # 0xaf7cf
pushq $0x4
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2f0d8
movl %eax, %ebp
leaq 0x8064f(%rip), %rcx     # 0xaf7d7
pushq $0x10
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2f0d8
movl %eax, %r12d
addl %ebp, %r12d
addl %r13d, %r12d
leaq 0x7f62a(%rip), %rcx     # 0xae7d0
pushq $0x20
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2f0d8
movl %eax, %ebp
leaq 0x80620(%rip), %rcx     # 0xaf7dd
pushq $0x40
popq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2f0d8
movl %eax, %r13d
addl %ebp, %r13d
leaq 0x85f1a(%rip), %rcx     # 0xb50f2
movq %rbx, %rdi
movq %r14, %rsi
movl $0x80, %edx
callq 0x2f0d8
movl %eax, %ebp
addl %r13d, %ebp
addl %r12d, %ebp
leaq 0x805ef(%rip), %rcx     # 0xaf7e6
movq %rbx, %rdi
movq %r14, %rsi
movl $0x100, %edx            # imm = 0x100
callq 0x2f0d8
movl %eax, %r12d
leaq 0x86ee1(%rip), %rcx     # 0xb60f2
movq %rbx, %rdi
movq %r14, %rsi
movl $0x200, %edx            # imm = 0x200
callq 0x2f0d8
movl %eax, %r13d
addl %r12d, %r13d
leaq 0x805c8(%rip), %rcx     # 0xaf7f6
movq %rbx, %rdi
movq %r14, %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x2f0d8
movl %eax, %r12d
addl %r13d, %r12d
leaq 0x805b1(%rip), %rcx     # 0xaf7fc
movq %rbx, %rdi
movq %r14, %rsi
movl $0x800, %edx            # imm = 0x800
callq 0x2f0d8
movl %eax, %r13d
addl %r12d, %r13d
addl %ebp, %r13d
leaq 0x7f591(%rip), %rcx     # 0xae7fc
movq %rbx, %rdi
movq %r14, %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x2f0d8
movl %eax, %r12d
leaq 0x80584(%rip), %rcx     # 0xaf809
movq %rbx, %rdi
movq %r14, %rsi
movl $0x2000, %edx           # imm = 0x2000
callq 0x2f0d8
movl %eax, %ebp
addl %r12d, %ebp
addl %r13d, %ebp
cmpq $0x0, 0x28(%r14)
je 0x2f2b5
leaq 0x80563(%rip), %rsi     # 0xaf80e
movq %rbx, %rdi
callq 0x36cc3
incl %ebp
movl %ebp, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x36de9
movslq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0x370a6
movslq 0x34(%r14), %rsi
movq %rbx, %rdi
callq 0x370a6
movslq 0x38(%r14), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x370a6
movq 0xcb065(%rip), %rsi     # 0xfa360
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x36987