// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
callq 0x384f0
movq %rax, %rdi
movq -0x8(%rbp), %rdx
addq $0x8, %rdx
movq -0x8(%rbp), %rcx
addq $0x890, %rcx            # imm = 0x890
movq -0x8(%rbp), %rax
movl 0x8c0(%rax), %r8d
leaq 0xbf085(%rip), %rsi     # 0x14273e
movb $0x0, %al
callq 0x395b0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
movzwl %ax, %esi
callq 0x7f090
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x850(%rax)
je 0x83710
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x850(%rax), %rdx
addq $0x8, %rdx
leaq 0xbf048(%rip), %rsi     # 0x14274b
movb $0x0, %al
callq 0x395b0
movq %rax, -0x18(%rbp)
jmp 0x83729
movq -0x18(%rbp), %rdi
leaq 0xbf038(%rip), %rsi     # 0x142753
movl $0x3, %edx
callq 0x39040
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x858(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x860(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rcx
movb $0x1, %al
cmpq $0x0, 0x8c8(%rcx)
movb %al, -0x1d(%rbp)
jne 0x83781
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x1d(%rbp)
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %rdx
movq -0x40(%rbp), %rdi
movb -0x1d(%rbp), %sil
leaq 0xbefcd(%rip), %r9      # 0x142769
leaq 0xbefc9(%rip), %rax     # 0x14276c
testb $0x1, %sil
cmovneq %rax, %r9
leaq 0xbefa5(%rip), %rsi     # 0x142757
movb $0x0, %al
callq 0x395b0
movq %rax, -0x18(%rbp)
movl $0xffffffff, -0x10(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0xc(%rbp)
cmpl $0x4000, -0xc(%rbp)     # imm = 0x4000
jge 0x83885
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x81d00
movl %eax, -0x1c(%rbp)
cmpl $0x0, %eax
je 0x837fa
cmpl $-0x1, -0x10(%rbp)
jne 0x837f8
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x837fa
cmpl $-0x1, -0x10(%rbp)
je 0x83875
cmpl $0x0, -0x1c(%rbp)
je 0x8380f
cmpl $0x3fff, -0xc(%rbp)     # imm = 0x3FFF
jne 0x83875
cmpl $0x0, -0x1c(%rbp)
je 0x83827
cmpl $0x3fff, -0xc(%rbp)     # imm = 0x3FFF
jne 0x83827
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x10(%rbp), %eax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x8384f
movq -0x18(%rbp), %rdi
movl -0x10(%rbp), %edx
leaq 0xbd595(%rip), %rsi     # 0x140dd7
movb $0x0, %al
callq 0x395b0
movq %rax, -0x18(%rbp)
jmp 0x8386e
movq -0x18(%rbp), %rdi
movl -0x10(%rbp), %edx
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
leaq 0xbef13(%rip), %rsi     # 0x142776
movb $0x0, %al
callq 0x395b0
movq %rax, -0x18(%rbp)
movl $0xffffffff, -0x10(%rbp) # imm = 0xFFFFFFFF
jmp 0x83877
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x837cb
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x83964
movl $0x0, -0xc(%rbp)
cmpl $0x4000, -0xc(%rbp)     # imm = 0x4000
jge 0x83962
leaq 0xf4925(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, 0x28(%rax,%rcx,8)
je 0x838fc
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0xf4904(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movslq -0xc(%rbp), %rcx
movq 0x28(%rax,%rcx,8), %rcx
addq $0x8, %rcx
leaq 0xbee8e(%rip), %rsi     # 0x14277d
movb $0x0, %al
callq 0x395b0
movq %rax, -0x18(%rbp)
jmp 0x83952
leaq 0xf48d5(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, 0x20028(%rax,%rcx,8)
je 0x83950
movq -0x18(%rbp), %rdi
movl -0xc(%rbp), %edx
leaq 0xf48b1(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movslq -0xc(%rbp), %rcx
movq 0x20028(%rax,%rcx,8), %rcx
addq $0x8, %rcx
leaq 0xbee46(%rip), %rsi     # 0x14278b
movb $0x0, %al
callq 0x395b0
movq %rax, -0x18(%rbp)
jmp 0x83952
jmp 0x83954
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x8389f
jmp 0x83964
movq -0x18(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop