// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/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 $0x38, %rsp
movl %r8d, %r14d
movq %rcx, 0x10(%rsp)
movl %edx, %ebx
movq %rsi, 0x8(%rsp)
movq %rdi, %r12
leaq 0x71d2e(%rip), %rdi     # 0xaef02
callq 0x3115a
movq %rax, %r13
leaq 0x18(%rsp), %rbp
movq %rbp, %rdi
xorl %esi, %esi
callq 0x26300
movq (%rbp), %rdx
movq 0x8(%rbp), %rcx
leaq 0x757f9(%rip), %rsi     # 0xb29f3
movq %r13, %rdi
xorl %eax, %eax
callq 0x31a38
movq %rax, %r13
movl 0x98(%r12), %eax
btl $0x8, %eax
jb 0x3d234
btl $0xb, %eax
jb 0x3d249
movq %r12, %rdi
callq 0x38731
leaq 0x757ec(%rip), %rsi     # 0xb2a16
movq %r13, %rdi
movl %ebx, %edx
movq %rax, %rcx
jmp 0x3d263
leaq 0x757c3(%rip), %rsi     # 0xb29fe
movq %r13, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x31a38
jmp 0x3d26a
leaq 0xbc658(%rip), %rax     # 0xf98a8
movq 0x130(%rax), %rcx
leaq 0x757aa(%rip), %rsi     # 0xb2a08
movq %r13, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x31a38
movq %rax, %r12
leal -0x1(%r14), %ebp
xorl %eax, %eax
testl %r14d, %r14d
cmovlel %eax, %r14d
movl $0xf0, %ebx
xorl %r15d, %r15d
cmpq %r15, %r14
je 0x3d2eb
movq 0x10(%rsp), %rax
movq (%rax,%r15,8), %rax
movl (%rax), %ecx
andl %ebx, %ecx
movq 0x8(%rax), %r13
cmpl $0x10, %ecx
jne 0x3d2b3
movq %r12, %rdi
leaq 0x75778(%rip), %rsi     # 0xb2a1f
movq %r13, %rdx
xorl %eax, %eax
callq 0x31a38
jmp 0x3d2c9
movq %r13, %rdi
callq 0x3cf20
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x321f1
movq %rax, %r12
cmpq %r15, %rbp
je 0x3d2e6
movq %r12, %rdi
leaq 0x78d76(%rip), %rsi     # 0xb6051
pushq $0x1
popq %rdx
callq 0x31758
movq %rax, %r12
incq %r15
jmp 0x3d282
leaq 0x77e9e(%rip), %rsi     # 0xb5190
pushq $0x2
popq %rdx
movq %r12, %rdi
callq 0x31758
xorl %edi, %edi
movq %rax, %rsi
callq 0x39d58
movq %rax, %rbx
leaq 0x28(%rsp), %r14
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x2702c
movq %r14, %rdi
callq 0x27046
testq %rax, %rax
je 0x3d337
movq 0x10(%rax), %rdi
movq %rbx, %rsi
callq 0x36987
jmp 0x3d31c
movq %rbx, %rdi
callq 0x3a265
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq