// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/replication.c
// Function: replicationFeedMonitors
void replicationFeedMonitors(client *c, list *monitors, int dictid, robj **argv, int argc) {
    listNode *ln;
    listIter li;
    int j;
    sds cmdrepr = sdsnew("+");
    robj *cmdobj;
    struct timeval tv;

    gettimeofday(&tv,NULL);
    cmdrepr = sdscatprintf(cmdrepr,"%ld.%06ld ",(long)tv.tv_sec,(long)tv.tv_usec);
    if (c->flags & CLIENT_LUA) {
        cmdrepr = sdscatprintf(cmdrepr,"[%d lua] ",dictid);
    } else if (c->flags & CLIENT_UNIX_SOCKET) {
        cmdrepr = sdscatprintf(cmdrepr,"[%d unix:%s] ",dictid,server.unixsocket);
    } else {
        cmdrepr = sdscatprintf(cmdrepr,"[%d %s] ",dictid,getClientPeerId(c));
    }

    for (j = 0; j < argc; j++) {
        if (argv[j]->encoding == OBJ_ENCODING_INT) {
            cmdrepr = sdscatprintf(cmdrepr, "\"%ld\"", (long)argv[j]->ptr);
        } else {
            cmdrepr = sdscatrepr(cmdrepr,(char*)argv[j]->ptr,
                        sdslen(argv[j]->ptr));
        }
        if (j != argc-1)
            cmdrepr = sdscatlen(cmdrepr," ",1);
    }
    cmdrepr = sdscatlen(cmdrepr,"\r\n",2);
    cmdobj = createObject(OBJ_STRING,cmdrepr);

    listRewind(monitors,&li);
    while((ln = listNext(&li))) {
        client *monitor = ln->value;
        addReply(monitor,cmdobj);
    }
    decrRefCount(cmdobj);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %r8d, %r15d
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, (%rsp)
movq %rdi, %r12
leaq 0x78967(%rip), %rdi     # 0xbffa0
callq 0x39245
movq %rax, %r13
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26310
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
leaq 0x7cbb1(%rip), %rsi     # 0xc420f
movq %r13, %rdi
xorl %eax, %eax
callq 0x39eb7
movq %rax, %r13
movl 0x98(%r12), %eax
btl $0x8, %eax
jb 0x47698
btl $0xb, %eax
jb 0x476ad
movq %r12, %rdi
callq 0x4210d
leaq 0x7cba4(%rip), %rsi     # 0xc4232
movq %r13, %rdi
movl %ebp, %edx
movq %rax, %rcx
jmp 0x476c7
leaq 0x7cb7b(%rip), %rsi     # 0xc421a
movq %r13, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x39eb7
jmp 0x476ce
leaq 0xbf1a4(%rip), %rax     # 0x106858
movq 0x130(%rax), %rcx
leaq 0x7cb62(%rip), %rsi     # 0xc4224
movq %r13, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x39eb7
testl %r15d, %r15d
jle 0x47779
leal -0x1(%r15), %ebx
movl %r15d, %r13d
movl $0xf0, %ebp
leaq 0x7c9c6(%rip), %r15     # 0xc40b0
xorl %r12d, %r12d
movq (%r14,%r12,8), %rcx
movl (%rcx), %esi
andl %ebp, %esi
movq 0x8(%rcx), %rdx
cmpl $0x10, %esi
jne 0x47711
movq %rax, %rdi
leaq 0x7cb33(%rip), %rsi     # 0xc423b
xorl %eax, %eax
callq 0x39eb7
jmp 0x47754
movzbl -0x1(%rdx), %ecx
movl %ecx, %esi
andl $0x7, %esi
cmpl $0x4, %esi
ja 0x47744
movslq (%r15,%rsi,4), %rsi
addq %r15, %rsi
jmpq *%rsi
shrl $0x3, %ecx
jmp 0x47746
movq -0x11(%rdx), %rcx
jmp 0x47746
movzwl -0x5(%rdx), %ecx
jmp 0x47746
movl -0x9(%rdx), %ecx
jmp 0x47746
movzbl -0x3(%rdx), %ecx
jmp 0x47746
xorl %ecx, %ecx
movq %rax, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x3abb1
cmpq %r12, %rbx
je 0x4776d
movl $0x1, %edx
movq %rax, %rdi
leaq 0x804c9(%rip), %rsi     # 0xc7c31
callq 0x39a56
incq %r12
cmpq %r12, %r13
jne 0x476ed
leaq 0x7f5f0(%rip), %rsi     # 0xc6d70
movl $0x2, %edx
movq %rax, %rdi
callq 0x39a56
xorl %edi, %edi
movq %rax, %rsi
callq 0x43ab4
movq %rax, %r14
leaq 0x8(%rsp), %rbx
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0x2e582
movq %rbx, %rdi
callq 0x2e59f
testq %rax, %rax
je 0x477d6
leaq 0x8(%rsp), %rbx
movq 0x10(%rax), %rdi
movq %r14, %rsi
callq 0x3fc19
movq %rbx, %rdi
callq 0x2e59f
testq %rax, %rax
jne 0x477bd
movq %r14, %rdi
callq 0x440f3
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq