// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 %r12
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x371ff
movq %rsi, %r14
movl $0x6, %esi
movq %rbx, %rdi
callq 0x4063b
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x404b9
movslq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x40606
movq %rbx, %rdi
callq 0x402b0
movq %rax, %r15
xorl %ebp, %ebp
testb $0x1, 0x20(%r14)
movl $0x0, %r12d
je 0x3701d
leaq 0x91b65(%rip), %rsi     # 0xc8b74
movq %rbx, %rdi
callq 0x40192
movl $0x1, %r12d
testb $0x2, 0x20(%r14)
je 0x37038
leaq 0x888a4(%rip), %rsi     # 0xbf8cf
movq %rbx, %rdi
callq 0x40192
movl $0x1, %ebp
addl %r12d, %ebp
xorl %r12d, %r12d
testb $0x4, 0x20(%r14)
movl $0x0, %eax
je 0x3705e
leaq 0x8981c(%rip), %rsi     # 0xc086d
movq %rbx, %rdi
callq 0x40192
movl $0x1, %eax
addl %eax, %ebp
testb $0x10, 0x20(%r14)
je 0x3707c
leaq 0x89807(%rip), %rsi     # 0xc0875
movq %rbx, %rdi
callq 0x40192
movl $0x1, %r12d
addl %r12d, %ebp
xorl %r12d, %r12d
testb $0x20, 0x20(%r14)
movl $0x0, %eax
je 0x370a2
leaq 0x887fb(%rip), %rsi     # 0xbf890
movq %rbx, %rdi
callq 0x40192
movl $0x1, %eax
addl %eax, %ebp
testb $0x40, 0x20(%r14)
je 0x370c0
leaq 0x897c9(%rip), %rsi     # 0xc087b
movq %rbx, %rdi
callq 0x40192
movl $0x1, %r12d
addl %r12d, %ebp
xorl %r12d, %r12d
testb $-0x80, 0x20(%r14)
movl $0x0, %eax
je 0x370e6
leaq 0x8fbf9(%rip), %rsi     # 0xc6cd2
movq %rbx, %rdi
callq 0x40192
movl $0x1, %eax
addl %eax, %ebp
testb $0x1, 0x21(%r14)
je 0x37104
leaq 0x8978e(%rip), %rsi     # 0xc0884
movq %rbx, %rdi
callq 0x40192
movl $0x1, %r12d
addl %r12d, %ebp
xorl %r12d, %r12d
testb $0x2, 0x21(%r14)
movl $0x0, %eax
je 0x3712a
leaq 0x90bb5(%rip), %rsi     # 0xc7cd2
movq %rbx, %rdi
callq 0x40192
movl $0x1, %eax
addl %eax, %ebp
testb $0x4, 0x21(%r14)
je 0x37148
leaq 0x8975a(%rip), %rsi     # 0xc0894
movq %rbx, %rdi
callq 0x40192
movl $0x1, %r12d
addl %r12d, %ebp
xorl %r12d, %r12d
testb $0x8, 0x21(%r14)
movl $0x0, %eax
je 0x3716e
leaq 0x89739(%rip), %rsi     # 0xc089a
movq %rbx, %rdi
callq 0x40192
movl $0x1, %eax
addl %eax, %ebp
testb $0x10, 0x21(%r14)
je 0x3718c
leaq 0x8873e(%rip), %rsi     # 0xbf8bc
movq %rbx, %rdi
callq 0x40192
movl $0x1, %r12d
addl %r12d, %ebp
xorl %eax, %eax
testb $0x20, 0x21(%r14)
je 0x371ac
leaq 0x89708(%rip), %rsi     # 0xc08a7
movq %rbx, %rdi
callq 0x40192
movl $0x1, %eax
addl %eax, %ebp
cmpq $0x0, 0x28(%r14)
je 0x371c6
leaq 0x896f0(%rip), %rsi     # 0xc08ac
movq %rbx, %rdi
callq 0x40192
incl %ebp
movl %ebp, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x402ec
movslq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0x40606
movslq 0x34(%r14), %rsi
movq %rbx, %rdi
callq 0x40606
movslq 0x38(%r14), %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x40606
movq 0xd00fa(%rip), %rsi     # 0x107300
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3fc19