// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/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 0x39222
leaq 0x8(%rbx), %rdx
leaq 0x890(%rbx), %rcx
movl 0x8c0(%rbx), %r8d
leaq 0x5d75b(%rip), %rsi     # 0xcb635
movq %rax, %rdi
xorl %eax, %eax
callq 0x39eb7
movzwl 0x30(%rbx), %esi
movq %rax, %rdi
callq 0x6afad
movq 0x850(%rbx), %rdx
testq %rdx, %rdx
je 0x6df13
addq $0x8, %rdx
leaq 0x5d73b(%rip), %rsi     # 0xcb642
movq %rax, %rdi
xorl %eax, %eax
callq 0x39eb7
jmp 0x6df27
leaq 0x5d730(%rip), %rsi     # 0xcb64a
movl $0x3, %edx
movq %rax, %rdi
callq 0x39a56
movq 0x858(%rbx), %rdx
movq 0x860(%rbx), %rcx
movq 0x38(%rbx), %r8
cmpq $0x0, 0x8c8(%rbx)
je 0x6df4c
leaq 0x5d719(%rip), %r9      # 0xcb663
jmp 0x6df62
testb $0x10, 0x30(%rbx)
leaq 0x5d709(%rip), %rsi     # 0xcb660
leaq 0x5d705(%rip), %r9      # 0xcb663
cmoveq %rsi, %r9
leaq 0x5d6e5(%rip), %rsi     # 0xcb64e
movq %rax, %rdi
xorl %eax, %eax
callq 0x39eb7
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x5bad4(%rip), %r14     # 0xc9a53
leaq 0x5d6e7(%rip), %r15     # 0xcb66d
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 0x6dfb2
movl %ebp, %edx
cmpl $-0x1, %ebp
cmovnel %ebp, %edx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %edx
je 0x6dfd3
cmpl $0x3fff, %esi           # imm = 0x3FFF
je 0x6dfe6
movl %edi, %ecx
andl $0x1, %ecx
je 0x6dfe6
movl %edx, %ebp
movl %esi, %r12d
leal 0x1(%r12), %esi
cmpl $0x3fff, %r12d          # imm = 0x3FFF
jl 0x6df88
jmp 0x6e023
movl $0x4000, %r12d          # imm = 0x4000
testb $0x1, %dil
jne 0x6dff5
movl %esi, %r12d
cmpl $0x3fff, %esi           # imm = 0x3FFF
cmovnel %esi, %r12d
leal -0x1(%r12), %ecx
movq %rax, %rdi
cmpl %ecx, %edx
jne 0x6e017
movq %r14, %rsi
xorl %eax, %eax
callq 0x39eb7
jmp 0x6dfd6
movq %r15, %rsi
xorl %eax, %eax
callq 0x39eb7
jmp 0x6dfd6
testb $0x10, 0x30(%rbx)
je 0x6e080
leaq 0x98828(%rip), %r14     # 0x106858
leaq 0x5d63d(%rip), %r15     # 0xcb674
leaq 0x5d644(%rip), %r12     # 0xcb682
xorl %ebx, %ebx
movq 0x9a0(%r14), %rdx
movq 0x28(%rdx,%rbx,8), %rcx
movq %r15, %rsi
testq %rcx, %rcx
jne 0x6e064
movq 0x20028(%rdx,%rbx,8), %rcx
movq %r12, %rsi
testq %rcx, %rcx
je 0x6e074
addq $0x8, %rcx
movq %rax, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x39eb7
incq %rbx
cmpq $0x4000, %rbx           # imm = 0x4000
jne 0x6e040
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq