// File: /workspace/github_c_makefile_star2_O3/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 %r12
pushq %rbx
movq %rdi, %rbx
callq 0x3628d
leaq 0x8(%rbx), %rdx
leaq 0x890(%rbx), %rcx
movl 0x8c0(%rbx), %r8d
leaq 0x5e328(%rip), %rsi     # 0xc86bd
movq %rax, %rdi
xorl %eax, %eax
callq 0x36f2d
movzwl 0x30(%rbx), %esi
movq %rax, %rdi
callq 0x6739b
movq 0x850(%rbx), %rdx
testq %rdx, %rdx
je 0x6a3ce
addq $0x8, %rdx
leaq 0x5e308(%rip), %rsi     # 0xc86ca
movq %rax, %rdi
xorl %eax, %eax
callq 0x36f2d
jmp 0x6a3e2
leaq 0x5e2fd(%rip), %rsi     # 0xc86d2
movl $0x3, %edx
movq %rax, %rdi
callq 0x36ad1
movq 0x858(%rbx), %rdx
movq 0x860(%rbx), %rcx
movq 0x38(%rbx), %r8
cmpq $0x0, 0x8c8(%rbx)
je 0x6a407
leaq 0x5e2e6(%rip), %r9      # 0xc86eb
jmp 0x6a41d
testb $0x10, 0x30(%rbx)
leaq 0x5e2d6(%rip), %rsi     # 0xc86e8
leaq 0x5e2d2(%rip), %r9      # 0xc86eb
cmoveq %rsi, %r9
leaq 0x5e2b2(%rip), %rsi     # 0xc86d6
movq %rax, %rdi
xorl %eax, %eax
callq 0x36f2d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x5c675(%rip), %r14     # 0xc6aaf
leaq 0x5e2b4(%rip), %r15     # 0xc86f5
xorl %esi, %esi
leal 0x7(%rsi), %ecx
testl %esi, %esi
cmovnsl %esi, %ecx
sarl $0x3, %ecx
movslq %ecx, %rcx
movzbl 0x40(%rbx,%rcx), %edx
movl %esi, %ecx
andb $0x7, %cl
movl %edx, %edi
shrl %cl, %edi
movl %esi, %ecx
andl $0x7, %ecx
btl %ecx, %edx
movl %esi, %edx
jb 0x6a46d
movl %ebp, %edx
cmpl $-0x1, %ebp
cmovnel %ebp, %edx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %edx
je 0x6a48e
cmpl $0x3fff, %esi           # imm = 0x3FFF
je 0x6a4a1
movl %edi, %ecx
andl $0x1, %ecx
je 0x6a4a1
movl %edx, %ebp
movl %esi, %r12d
leal 0x1(%r12), %esi
cmpl $0x3fff, %r12d          # imm = 0x3FFF
jl 0x6a443
jmp 0x6a4de
movl $0x4000, %r12d          # imm = 0x4000
testb $0x1, %dil
jne 0x6a4b0
movl %esi, %r12d
cmpl $0x3fff, %esi           # imm = 0x3FFF
cmovnel %esi, %r12d
leal -0x1(%r12), %ecx
movq %rax, %rdi
cmpl %ecx, %edx
jne 0x6a4d2
movq %r14, %rsi
xorl %eax, %eax
callq 0x36f2d
jmp 0x6a491
movq %r15, %rsi
xorl %eax, %eax
callq 0x36f2d
jmp 0x6a491
testb $0x10, 0x30(%rbx)
je 0x6a53b
leaq 0x973bd(%rip), %r14     # 0x1018a8
leaq 0x5e20a(%rip), %r15     # 0xc86fc
leaq 0x5e211(%rip), %r12     # 0xc870a
xorl %ebx, %ebx
movq 0x9b0(%r14), %rdx
movq 0x28(%rdx,%rbx,8), %rcx
movq %r15, %rsi
testq %rcx, %rcx
jne 0x6a51f
movq 0x20028(%rdx,%rbx,8), %rcx
movq %r12, %rsi
testq %rcx, %rcx
je 0x6a52f
addq $0x8, %rcx
movq %rax, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x36f2d
incq %rbx
cmpq $0x4000, %rbx           # imm = 0x4000
jne 0x6a4fb
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq