// File: /workspace/github_c_makefile_star2_O3/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 $0x28, %rsp
movl %r8d, %r15d
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, (%rsp)
movq %rdi, %r12
leaq 0x78be5(%rip), %rdi     # 0xbd012
callq 0x362b0
movq %rax, %r13
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26300
movq (%rbx), %rdx
movq 0x8(%rbx), %rcx
leaq 0x7ce51(%rip), %rsi     # 0xc12a3
movq %r13, %rdi
xorl %eax, %eax
callq 0x36f2d
movq %rax, %r13
movl 0x98(%r12), %eax
btl $0x8, %eax
jb 0x4448c
btl $0xb, %eax
jb 0x444a1
movq %r12, %rdi
callq 0x3ed41
leaq 0x7ce44(%rip), %rsi     # 0xc12c6
movq %r13, %rdi
movl %ebp, %edx
movq %rax, %rcx
jmp 0x444bb
leaq 0x7ce1b(%rip), %rsi     # 0xc12ae
movq %r13, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x36f2d
jmp 0x444c2
leaq 0xbd400(%rip), %rax     # 0x1018a8
movq 0x130(%rax), %rcx
leaq 0x7ce02(%rip), %rsi     # 0xc12b8
movq %r13, %rdi
movl %ebp, %edx
xorl %eax, %eax
callq 0x36f2d
testl %r15d, %r15d
jle 0x4456d
leal -0x1(%r15), %ebx
movl %r15d, %r13d
movl $0xf0, %ebp
leaq 0x7cc3e(%rip), %r15     # 0xc111c
xorl %r12d, %r12d
movq (%r14,%r12,8), %rcx
movl (%rcx), %esi
andl %ebp, %esi
movq 0x8(%rcx), %rdx
cmpl $0x10, %esi
jne 0x44505
movq %rax, %rdi
leaq 0x7cdd3(%rip), %rsi     # 0xc12cf
xorl %eax, %eax
callq 0x36f2d
jmp 0x44548
movzbl -0x1(%rdx), %ecx
movl %ecx, %esi
andl $0x7, %esi
cmpl $0x4, %esi
ja 0x44538
movslq (%r15,%rsi,4), %rsi
addq %r15, %rsi
jmpq *%rsi
shrl $0x3, %ecx
jmp 0x4453a
movq -0x11(%rdx), %rcx
jmp 0x4453a
movzwl -0x5(%rdx), %ecx
jmp 0x4453a
movl -0x9(%rdx), %ecx
jmp 0x4453a
movzbl -0x3(%rdx), %ecx
jmp 0x4453a
xorl %ecx, %ecx
movq %rax, %rdi
movq %rdx, %rsi
movq %rcx, %rdx
callq 0x37c36
cmpq %r12, %rbx
je 0x44561
movl $0x1, %edx
movq %rax, %rdi
leaq 0x80741(%rip), %rsi     # 0xc4c9d
callq 0x36ad1
incq %r12
cmpq %r12, %r13
jne 0x444e1
leaq 0x7f868(%rip), %rsi     # 0xc3ddc
movl $0x2, %edx
movq %rax, %rdi
callq 0x36ad1
xorl %edi, %edi
movq %rax, %rsi
callq 0x40650
movq %rax, %r14
leaq 0x8(%rsp), %rbx
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0x2b3b7
movq %rbx, %rdi
callq 0x2b3d4
testq %rax, %rax
je 0x445ca
leaq 0x8(%rsp), %rbx
movq 0x10(%rax), %rdi
movq %r14, %rsi
callq 0x3c854
movq %rbx, %rdi
callq 0x2b3d4
testq %rax, %rax
jne 0x445b1
movq %r14, %rdi
callq 0x40c8f
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq