// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/cluster.c
// Function: clusterGenNodeDescription
sds clusterGenNodeDescription(clusterNode *node) {
    int j, start;
    sds ci;

    /* Node coordinates */
    ci = sdscatprintf(sdsempty(),"%.40s %s:%d ",
        node->name,
        node->ip,
        node->port);

    /* Flags */
    ci = representClusterNodeFlags(ci, node->flags);

    /* Slave of... or just "-" */
    if (node->slaveof)
        ci = sdscatprintf(ci," %.40s ",node->slaveof->name);
    else
        ci = sdscatlen(ci," - ",3);

    /* Latency from the POV of this node, config epoch, link status */
    ci = sdscatprintf(ci,"%lld %lld %llu %s",
        (long long) node->ping_sent,
        (long long) node->pong_received,
        (unsigned long long) node->configEpoch,
        (node->link || node->flags & CLUSTER_NODE_MYSELF) ?
                    "connected" : "disconnected");

    /* Slots served by this instance */
    start = -1;
    for (j = 0; j < CLUSTER_SLOTS; j++) {
        int bit;

        if ((bit = clusterNodeGetSlotBit(node,j)) != 0) {
            if (start == -1) start = j;
        }
        if (start != -1 && (!bit || j == CLUSTER_SLOTS-1)) {
            if (bit && j == CLUSTER_SLOTS-1) j++;

            if (start == j-1) {
                ci = sdscatprintf(ci," %d",start);
            } else {
                ci = sdscatprintf(ci," %d-%d",start,j-1);
            }
            start = -1;
        }
    }

    /* Just for MYSELF node we also dump info about slots that
     * we are migrating to other instances or importing from other
     * instances. */
    if (node->flags & CLUSTER_NODE_MYSELF) {
        for (j = 0; j < CLUSTER_SLOTS; j++) {
            if (server.cluster->migrating_slots_to[j]) {
                ci = sdscatprintf(ci," [%d->-%.40s]",j,
                    server.cluster->migrating_slots_to[j]->name);
            } else if (server.cluster->importing_slots_from[j]) {
                ci = sdscatprintf(ci," [%d-<-%.40s]",j,
                    server.cluster->importing_slots_from[j]->name);
            }
        }
    }
    return ci;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3114c
leaq 0x8(%rbx), %rdx
leaq 0x890(%rbx), %rcx
movl 0x8c0(%rbx), %r8d
leaq 0x5a09e(%rip), %rsi     # 0xb96a5
movq %rax, %rdi
xorl %eax, %eax
callq 0x31a38
movzwl 0x30(%rbx), %esi
movq %rax, %rdi
callq 0x5cb30
movq 0x850(%rbx), %rdx
testq %rdx, %rdx
je 0x5f640
addq $0x8, %rdx
leaq 0x5a07e(%rip), %rsi     # 0xb96b2
movq %rax, %rdi
xorl %eax, %eax
callq 0x31a38
jmp 0x5f652
leaq 0x5a073(%rip), %rsi     # 0xb96ba
pushq $0x3
popq %rdx
movq %rax, %rdi
callq 0x31758
movq 0x858(%rbx), %rdx
movq 0x860(%rbx), %rcx
movq 0x38(%rbx), %r8
cmpq $0x0, 0x8c8(%rbx)
je 0x5f677
leaq 0x5a05e(%rip), %r9      # 0xb96d3
jmp 0x5f68d
testb $0x10, 0x30(%rbx)
leaq 0x5a04e(%rip), %rsi     # 0xb96d0
leaq 0x5a04a(%rip), %r9      # 0xb96d3
cmoveq %rsi, %r9
leaq 0x5a02a(%rip), %rsi     # 0xb96be
movq %rax, %rdi
xorl %eax, %eax
callq 0x31a38
movq %rax, %rdi
pushq $-0x1
popq %rbp
pushq $0x8
popq %r12
leaq 0x5863c(%rip), %r14     # 0xb7ceb
leaq 0x5a027(%rip), %r15     # 0xb96dd
movl %ebp, %r8d
xorl %esi, %esi
cmpl $0x3fff, %esi           # imm = 0x3FFF
jg 0x5f757
movl %esi, %eax
cltd
idivl %r12d
cltq
movzbl 0x40(%rbx,%rax), %edx
movl %esi, %ecx
andb $0x7, %cl
movl %edx, %eax
shrl %cl, %eax
movl %esi, %ecx
andl $0x7, %ecx
btl %ecx, %edx
movl %esi, %edx
jb 0x5f6ec
movl %r8d, %edx
cmpl $-0x1, %r8d
cmovnel %r8d, %edx
cmpl $-0x1, %edx
je 0x5f733
cmpl $0x3fff, %esi           # imm = 0x3FFF
je 0x5f708
movl %eax, %ecx
andl $0x1, %ecx
jne 0x5f735
movl $0x4000, %r13d          # imm = 0x4000
testb $0x1, %al
jne 0x5f715
movl %esi, %r13d
cmpl $0x3fff, %esi           # imm = 0x3FFF
cmovnel %esi, %r13d
leal -0x1(%r13), %ecx
cmpl %ecx, %edx
jne 0x5f73a
movq %r14, %rsi
xorl %eax, %eax
callq 0x31a38
jmp 0x5f744
movl %ebp, %edx
movl %esi, %r13d
jmp 0x5f749
movq %r15, %rsi
xorl %eax, %eax
callq 0x31a38
movq %rax, %rdi
movl %ebp, %edx
incl %r13d
movl %edx, %r8d
movl %r13d, %esi
jmp 0x5f6bb
testb $0x10, 0x30(%rbx)
jne 0x5f76f
movq %rdi, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x9a132(%rip), %r14     # 0xf98a8
leaq 0x59f67(%rip), %r15     # 0xb96e4
leaq 0x59f6e(%rip), %r12     # 0xb96f2
xorl %ebx, %ebx
cmpq $0x4000, %rbx           # imm = 0x4000
je 0x5f75d
movq 0x9b0(%r14), %rax
movq 0x28(%rax,%rbx,8), %rcx
movq %r15, %rsi
testq %rcx, %rcx
jne 0x5f7b3
movq 0x20028(%rax,%rbx,8), %rcx
movq %r12, %rsi
testq %rcx, %rcx
je 0x5f7c3
addq $0x8, %rcx
movl %ebx, %edx
xorl %eax, %eax
callq 0x31a38
movq %rax, %rdi
incq %rbx
jmp 0x5f786