// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x341e4
movq %rsi, %r14
movl $0x6, %esi
movq %rbx, %rdi
callq 0x3d274
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x3d0f2
movslq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x3d23f
movq %rbx, %rdi
callq 0x3cee9
movq %rax, %r15
movl 0x20(%r14), %eax
xorl %ebp, %ebp
movl $0x0, %r12d
testb $0x1, %al
je 0x33fee
leaq 0x91c19(%rip), %rsi     # 0xc5bf5
movq %rbx, %rdi
callq 0x3cdcb
movl 0x20(%r14), %eax
movl $0x1, %r12d
testb $0x2, %al
je 0x3400a
leaq 0x88926(%rip), %rsi     # 0xbc91f
movq %rbx, %rdi
callq 0x3cdcb
movl 0x20(%r14), %eax
movl $0x1, %ebp
addl %r12d, %ebp
xorl %r12d, %r12d
movl $0x0, %ecx
testb $0x4, %al
je 0x34031
leaq 0x898bf(%rip), %rsi     # 0xbd8df
movq %rbx, %rdi
callq 0x3cdcb
movl 0x20(%r14), %eax
movl $0x1, %ecx
addl %ecx, %ebp
testb $0x10, %al
je 0x34050
leaq 0x898a9(%rip), %rsi     # 0xbd8e7
movq %rbx, %rdi
callq 0x3cdcb
movl 0x20(%r14), %eax
movl $0x1, %r12d
addl %r12d, %ebp
xorl %r12d, %r12d
movl $0x0, %ecx
testb $0x20, %al
je 0x34077
leaq 0x8887a(%rip), %rsi     # 0xbc8e0
movq %rbx, %rdi
callq 0x3cdcb
movl 0x20(%r14), %eax
movl $0x1, %ecx
addl %ecx, %ebp
testb $0x40, %al
je 0x34096
leaq 0x89869(%rip), %rsi     # 0xbd8ed
movq %rbx, %rdi
callq 0x3cdcb
movl 0x20(%r14), %eax
movl $0x1, %r12d
addl %r12d, %ebp
xorl %r12d, %r12d
movl $0x0, %ecx
testb %al, %al
jns 0x340bd
leaq 0x8fc92(%rip), %rsi     # 0xc3d3e
movq %rbx, %rdi
callq 0x3cdcb
movl 0x20(%r14), %eax
movl $0x1, %ecx
addl %ecx, %ebp
btl $0x8, %eax
jae 0x340de
leaq 0x8982a(%rip), %rsi     # 0xbd8f6
movq %rbx, %rdi
callq 0x3cdcb
movl 0x20(%r14), %eax
movl $0x1, %r12d
addl %r12d, %ebp
xorl %r12d, %r12d
btl $0x9, %eax
movl $0x0, %ecx
jae 0x34107
leaq 0x90c48(%rip), %rsi     # 0xc4d3e
movq %rbx, %rdi
callq 0x3cdcb
movl 0x20(%r14), %eax
movl $0x1, %ecx
addl %ecx, %ebp
btl $0xa, %eax
jae 0x34128
leaq 0x897f0(%rip), %rsi     # 0xbd906
movq %rbx, %rdi
callq 0x3cdcb
movl 0x20(%r14), %eax
movl $0x1, %r12d
addl %r12d, %ebp
xorl %r12d, %r12d
btl $0xb, %eax
movl $0x0, %ecx
jae 0x34151
leaq 0x897cc(%rip), %rsi     # 0xbd90c
movq %rbx, %rdi
callq 0x3cdcb
movl 0x20(%r14), %eax
movl $0x1, %ecx
addl %ecx, %ebp
btl $0xc, %eax
jae 0x34172
leaq 0x887ac(%rip), %rsi     # 0xbc90c
movq %rbx, %rdi
callq 0x3cdcb
movl 0x20(%r14), %eax
movl $0x1, %r12d
addl %r12d, %ebp
xorl %ecx, %ecx
btl $0xd, %eax
jae 0x34191
leaq 0x89795(%rip), %rsi     # 0xbd919
movq %rbx, %rdi
callq 0x3cdcb
movl $0x1, %ecx
addl %ecx, %ebp
cmpq $0x0, 0x28(%r14)
je 0x341ab
leaq 0x8977d(%rip), %rsi     # 0xbd91e
movq %rbx, %rdi
callq 0x3cdcb
incl %ebp
movl %ebp, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3cf25
movslq 0x30(%r14), %rsi
movq %rbx, %rdi
callq 0x3d23f
movslq 0x34(%r14), %rsi
movq %rbx, %rdi
callq 0x3d23f
movslq 0x38(%r14), %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3d23f
movq 0xce175(%rip), %rsi     # 0x102360
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3c854