LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterUpdateReachableNodes
void clusterUpdateReachableNodes(void) {
    dictIterator *di;
    dictEntry *de;
    int maxsize = dictSize(server.cluster->nodes) * sizeof(clusterNode*);

    server.cluster->reachable_nodes =
        zrealloc(server.cluster->reachable_nodes,maxsize);
    server.cluster->reachable_nodes_count = 0;
    server.cluster->failing_nodes_count = 0;

    di = dictGetIterator(server.cluster->nodes);
    while((de = dictNext(di)) != NULL) {
        clusterNode *node = dictGetVal(de);

        if (node->flags & (CLUSTER_NODE_PFAIL|
                           CLUSTER_NODE_FAIL)) server.cluster->failing_nodes_count++;

        if (node->flags & (CLUSTER_NODE_MYSELF|
                           CLUSTER_NODE_HANDSHAKE|
                           CLUSTER_NODE_PFAIL|
                           CLUSTER_NODE_FAIL)) continue;
        server.cluster->reachable_nodes[server.cluster->reachable_nodes_count++]
            = node;
    }
    dictReleaseIterator(di);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x8c8e9(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rax
leaq 0x8c8d3(%rip), %rcx     # 0xbf0e8
movq 0x668(%rcx), %rcx
movq 0x10(%rcx), %rcx
addq 0x48(%rcx), %rax
shlq $0x3, %rax
movl %eax, -0x14(%rbp)
leaq 0x8c8b6(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x30(%rax), %rdi
movslq -0x14(%rbp), %rsi
callq 0x20b80
movq %rax, %rcx
leaq 0x8c898(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq %rcx, 0x30(%rax)
leaq 0x8c886(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movl $0x0, 0x38(%rax)
leaq 0x8c871(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movl $0x0, 0x3c(%rax)
leaq 0x8c85c(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x17300
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x173a0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x32931
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x3, %eax
cmpl $0x0, %eax
je 0x328e5
leaq 0x8c813(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movl 0x3c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x3c(%rax)
movq -0x20(%rbp), %rax
movl 0x30(%rax), %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x328f6
jmp 0x328a0
movq -0x20(%rbp), %rdx
leaq 0x8c7e7(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x30(%rax), %rax
leaq 0x8c7d5(%rip), %rcx     # 0xbf0e8
movq 0x668(%rcx), %rsi
movl 0x38(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x38(%rsi)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x328a0
movq -0x8(%rbp), %rdi
callq 0x17510
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterReset
void clusterReset(int hard) {
    dictIterator *di;
    dictEntry *de;

    /* Forget all the nodes, but myself. */
    di = dictGetSafeIterator(server.cluster->nodes);
    while((de = dictNext(di)) != NULL) {
        clusterNode *node = dictGetVal(de);

        if (node == myself) continue;
        clusterDelNode(node);
    }
    dictReleaseIterator(di);

    /* Information about reachable nodes is no longer valid. Update it. */
    clusterUpdateReachableNodes();

    /* Hard reset only: change node ID. */
    if (hard) {
        sds oldname;

        /* To change the Node ID we need to remove the old name from the
         * nodes table, change the ID, and re-add back with new name. */
        oldname = sdsnewlen(myself->name, CLUSTER_NAMELEN);
        dictDelete(server.cluster->nodes,oldname);
        sdsfree(oldname);
        getRandomHexChars(myself->name, CLUSTER_NAMELEN);
        clusterAddNode(myself);
    }

    flushServerData();

    /* Make sure to persist the new config and update the state. */
    clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG|
                         CLUSTER_TODO_UPDATE_STATE|
                         CLUSTER_TODO_FSYNC_CONFIG);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
leaq 0x8c796(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x17370
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x173a0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x3299f
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq 0xa0c70(%rip), %rax     # 0xd3600
jne 0x32994
jmp 0x32966
movq -0x20(%rbp), %rdi
callq 0x32a20
jmp 0x32966
movq -0x10(%rbp), %rdi
callq 0x17510
callq 0x327f0
cmpl $0x0, -0x4(%rbp)
je 0x32a09
movq 0xa0c46(%rip), %rdi     # 0xd3600
movl $0x28, %esi
callq 0x1dfe0
movq %rax, -0x28(%rbp)
leaq 0x8c719(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x16b60
movq -0x28(%rbp), %rdi
callq 0x1e3c0
movq 0xa0c0d(%rip), %rdi     # 0xd3600
movl $0x28, %esi
callq 0x28b10
movq 0xa0bfc(%rip), %rdi     # 0xd3600
callq 0x31e80
callq 0x19480
movl $0x7, %edi
callq 0x32aa0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterDelNode
void clusterDelNode(clusterNode *delnode) {
    dictIterator *di;
    dictEntry *de;

    /* 1) Remove failure reports. */
    di = dictGetSafeIterator(server.cluster->nodes);
    while((de = dictNext(di)) != NULL) {
        clusterNode *node = dictGetVal(de);

        if (node == delnode) continue;
        clusterNodeDelFailureReport(node,delnode);
    }
    dictReleaseIterator(di);

    /* 2) Free the node, unlinking it from the cluster. */
    freeClusterNode(delnode);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x8c6b5(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x17370
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x173a0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x32a81
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x8(%rbp), %rax
jne 0x32a72
jmp 0x32a47
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rsi
callq 0x32fa0
jmp 0x32a47
movq -0x10(%rbp), %rdi
callq 0x17510
movq -0x8(%rbp), %rdi
callq 0x33070
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: freeClusterNode
void freeClusterNode(clusterNode *n) {
    serverAssert(dictDelete(server.cluster->nodes,n->name) == DICT_OK);
    if (n->link) freeClusterLink(n->link);
    /* We can free nodes in handshake state, but we can't free nodes
     * that were part of the cluster: they may still be referenced
     * by jobs. */
    if (nodeInHandshake(n)) {
        listRelease(n->fail_reports);
        zfree(n);
    } else {
        dictAdd(server.cluster->deleted_nodes,n->name,n);
        n->flags |= CLUSTER_NODE_DELETED;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x8c065(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x16b60
cmpl $0x0, %eax
jne 0x3309e
jmp 0x330c0
leaq 0x7452d(%rip), %rdi     # 0xa75d2
leaq 0x74211(%rip), %rsi     # 0xa72bd
movl $0x27f, %edx            # imm = 0x27F
callq 0x300b0
movl $0x1, %edi
callq 0x12100
movq -0x8(%rbp), %rax
cmpq $0x0, 0x88(%rax)
je 0x330de
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0x32b30
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x33108
movq -0x8(%rbp), %rax
movq 0x90(%rax), %rdi
callq 0x12b80
movq -0x8(%rbp), %rdi
callq 0x20ce0
jmp 0x33134
leaq 0x8bfd9(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x18(%rax), %rdi
movq -0x8(%rbp), %rsi
movq -0x8(%rbp), %rdx
callq 0x166b0
movq -0x8(%rbp), %rax
movl 0x30(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0x30(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterBlacklistAddNode
void clusterBlacklistAddNode(clusterNode *node) {
    dictEntry *de;
    sds id = sdsnewlen(node->name,CLUSTER_NAMELEN);

    clusterBlacklistCleanup();
    if (dictAdd(server.cluster->nodes_black_list,id,NULL) == DICT_OK) {
        /* If the key was added, duplicate the sds string representation of
         * the key for the next lookup. We'll free it at the end. */
        id = sdsdup(id);
    }
    de = dictFind(server.cluster->nodes_black_list,id);
    dictSetUnsignedIntegerVal(de,time(NULL)+DISCNT_CLUSTER_BLACKLIST_TTL);
    sdsfree(id);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x28, %esi
callq 0x1dfe0
movq %rax, -0x18(%rbp)
callq 0x331f0
leaq 0x8be3e(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x20(%rax), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x166b0
cmpl $0x0, %eax
jne 0x332d4
movq -0x18(%rbp), %rdi
callq 0x1e300
movq %rax, -0x18(%rbp)
leaq 0x8be0d(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x20(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x17030
movq %rax, -0x10(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x12530
movq %rax, %rcx
addq $0x3c, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rdi
callq 0x1e3c0
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: markNodeAsFailingIfNeeded
void markNodeAsFailingIfNeeded(clusterNode *node) {
    int failures;
    int needed_quorum = (server.cluster->size / 2) + 1;

    if (!nodeTimedOut(node)) return; /* We can reach it. */
    if (nodeFailed(node)) return; /* Already FAILing. */

    failures = clusterNodeFailureReportsCount(node);
    /* Also count myself as a voter if I'm a master. */
    failures++;
    if (failures < needed_quorum) return; /* No weak agreement from masters. */

    serverLog(LL_VERBOSE,
        "Marking node %.40s as failing (quorum reached).", node->name);

    /* Mark the node as failing. */
    node->flags &= ~CLUSTER_NODE_PFAIL;
    node->flags |= CLUSTER_NODE_FAIL;
    node->fail_time = mstime();

    /* Broadcast the failing node name to everybody, forcing all the other
     * reachable nodes to flag the node as FAIL. */
    clusterSendFail(node->name);
    clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|CLUSTER_TODO_SAVE_CONFIG);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x8bd55(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movl 0xc(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
addl $0x1, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x333bf
jmp 0x33443
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x333d0
jmp 0x33443
movq -0x8(%rbp), %rdi
callq 0x33040
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x333ef
jmp 0x33443
movq -0x8(%rbp), %rdx
movl $0x1, %edi
leaq 0x74227(%rip), %rsi     # 0xa7626
movb $0x0, %al
callq 0x18b10
movq -0x8(%rbp), %rax
movl 0x30(%rax), %ecx
andl $-0x2, %ecx
movl %ecx, 0x30(%rax)
movq -0x8(%rbp), %rax
movl 0x30(%rax), %ecx
orl $0x2, %ecx
movl %ecx, 0x30(%rax)
callq 0x18e20
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rdi
callq 0x33450
movl $0x3, %edi
callq 0x32aa0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterSendFail
void clusterSendFail(char *nodename) {
    unsigned char buf[sizeof(clusterMsg)];
    clusterMsg *hdr = (clusterMsg*) buf;

    clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_FAIL);
    memcpy(hdr->data.fail.about.nodename,nodename,CLUSTER_NAMELEN);
    clusterBroadcastMessage(server.cluster->nodes,buf,ntohl(hdr->totlen));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
movl $0x3, %esi
callq 0x34a10
movq -0xd8(%rbp), %rdi
addq $0x60, %rdi
movq -0x8(%rbp), %rsi
movl $0x28, %edx
callq 0x12500
leaq 0x8bc4a(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0xe8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x128e0
movq -0xe8(%rbp), %rdi
movq -0xe0(%rbp), %rsi
movl %eax, %eax
movl %eax, %edx
callq 0x34980
addq $0xf0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clearNodeFailureIfNeeded
void clearNodeFailureIfNeeded(clusterNode *node) {
    serverAssert(nodeFailed(node));

    /* We always clear the FAIL flag if we can contact the node again. */
    serverLog(LL_VERBOSE,
        "Clear FAIL state for node %.40s: it is reachable again.",
            node->name);
    node->flags &= ~CLUSTER_NODE_FAIL;
    clusterDoBeforeSleep(CLUSTER_TODO_UPDATE_STATE|CLUSTER_TODO_SAVE_CONFIG);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x3350d
jmp 0x3352f
leaq 0x74142(%rip), %rdi     # 0xa7656
leaq 0x73da2(%rip), %rsi     # 0xa72bd
movl $0x344, %edx            # imm = 0x344
callq 0x300b0
movl $0x1, %edi
callq 0x12100
movq -0x8(%rbp), %rdx
movl $0x1, %edi
leaq 0x74128(%rip), %rsi     # 0xa7667
movb $0x0, %al
callq 0x18b10
movq -0x8(%rbp), %rax
movl 0x30(%rax), %ecx
andl $-0x3, %ecx
movl %ecx, 0x30(%rax)
movl $0x3, %edi
callq 0x32aa0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: nodeUpdateAddressIfNeeded
int nodeUpdateAddressIfNeeded(clusterNode *node, clusterLink *link, int port) {
    char ip[NET_IP_STR_LEN] = {0};

    /* We don't proceed if the link is the same as the sender link, as this
     * function is designed to see if the node link is consistent with the
     * symmetric link that is used to receive PINGs from the node.
     *
     * As a side effect this function never frees the passed 'link', so
     * it is safe to call during packet processing. */
    if (link == node->link) return 0;

    nodeIp2String(ip,link);
    if (node->port == port && strcmp(ip,node->ip) == 0) return 0;

    /* IP / port is different, update it. */
    memcpy(node->ip,ip,sizeof(ip));
    node->port = port;
    if (node->link) freeClusterLink(node->link);
    node->flags &= ~CLUSTER_NODE_NOADDR;
    serverLog(LL_WARNING,"Address updated for node %.40s, now %s:%d",
        node->name, node->ip, node->port);

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x2e, %edx
callq 0x12370
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x88(%rcx), %rax
jne 0x33a10
movl $0x0, -0x4(%rbp)
jmp 0x33aca
leaq -0x50(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x339a0
movq -0x10(%rbp), %rax
movl 0x80(%rax), %eax
cmpl -0x1c(%rbp), %eax
jne 0x33a4b
leaq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
addq $0x50, %rsi
callq 0x12480
cmpl $0x0, %eax
jne 0x33a4b
movl $0x0, -0x4(%rbp)
jmp 0x33aca
movq -0x10(%rbp), %rdi
addq $0x50, %rdi
leaq -0x50(%rbp), %rsi
movl $0x2e, %edx
callq 0x12500
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x80(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x88(%rax)
je 0x33a8c
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0x32b30
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
andl $-0x11, %ecx
movl %ecx, 0x30(%rax)
movq -0x10(%rbp), %rdx
movq -0x10(%rbp), %rcx
addq $0x50, %rcx
movq -0x10(%rbp), %rax
movl 0x80(%rax), %r8d
movl $0x3, %edi
leaq 0x73c43(%rip), %rsi     # 0xa76ff
movb $0x0, %al
callq 0x18b10
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: cluserReadAck
void cluserReadAck(const clusterMsgDataAck *msg, clusterNode *node) {
    uint32_t name_length, revision;
    counter *cntr;
    sds name;

    name_length = intrev16ifbe(msg->name_length);
    name = sdsnewlen(msg->name,name_length);

    revision = intrev32ifbe(msg->revision);

    cntr = counterLookup(name);
    if (cntr != NULL) {
        if (cntr->revision == revision) {
            counterGotAck(cntr,node);
        } else {
            serverLog(LL_VERBOSE,"Ack from %.40s for invalid revision %u of %s at %u",
                node->name, revision, name, cntr->revision);
        }
    } else {
        serverLog(LL_VERBOSE,"Ack from %.40s for unknown counter %s",
            node->name, name);
    }

    sdsfree(name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movzwl 0x4(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x8(%rbp), %rdi
addq $0x6, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x1dfe0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x28(%rbp), %rdi
callq 0x396f0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x347c1
movq -0x20(%rbp), %rax
movl 0x38(%rax), %eax
cmpl -0x18(%rbp), %eax
jne 0x34799
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x395d0
jmp 0x347bf
movq -0x10(%rbp), %rdx
movl -0x18(%rbp), %ecx
movq -0x28(%rbp), %r8
movq -0x20(%rbp), %rax
movl 0x38(%rax), %r9d
movl $0x1, %edi
leaq 0x7344d(%rip), %rsi     # 0xa7c05
movb $0x0, %al
callq 0x18b10
jmp 0x347dc
movq -0x10(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl $0x1, %edi
leaq 0x73463(%rip), %rsi     # 0xa7c38
movb $0x0, %al
callq 0x18b10
movq -0x28(%rbp), %rdi
callq 0x1e3c0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterBroadcastMessage
void clusterBroadcastMessage(dict *nodes, void *buf, size_t len) {
    dictIterator *di;
    dictEntry *de;

    di = dictGetSafeIterator(nodes);
    while((de = dictNext(di)) != NULL) {
        clusterNode *node = dictGetKey(de);

        if (!node->link) continue;
        if (node->flags & (CLUSTER_NODE_MYSELF|CLUSTER_NODE_HANDSHAKE))
            continue;
        clusterSendMessage(node->link,buf,len);
    }
    dictReleaseIterator(di);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x17370
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x173a0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x349fa
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x88(%rax)
jne 0x349cf
jmp 0x349a1
movq -0x30(%rbp), %rax
movl 0x30(%rax), %eax
andl $0xc, %eax
cmpl $0x0, %eax
je 0x349e0
jmp 0x349a1
movq -0x30(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x348e0
jmp 0x349a1
movq -0x20(%rbp), %rdi
callq 0x17510
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterBuildMessageHdr
void clusterBuildMessageHdr(clusterMsg *hdr, int type) {
    int totlen = 0;

    memset(hdr,0,sizeof(*hdr));
    hdr->ver = htons(CLUSTER_PROTO_VER);
    hdr->sig[0] = 'D';
    hdr->sig[1] = 'b';
    hdr->sig[2] = 'u';
    hdr->sig[3] = 'Z';
    hdr->type = htons(type);
    memcpy(hdr->sender,myself->name,CLUSTER_NAMELEN);
    hdr->port = htons(server.port);
    hdr->flags = htons(myself->flags);
    hdr->state = server.cluster->state;

    /* Compute the message length for certain messages. For other messages
     * this is up to the caller. */
    if (type == CLUSTERMSG_TYPE_FAIL) {
        totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData);
        totlen += sizeof(clusterMsgDataFail);
    } else if (type == CLUSTERMSG_TYPE_RESET) {
        totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData);
        totlen += sizeof(clusterMsgDataReset);
    }
    hdr->totlen = htonl(totlen);
    /* For PING, PONG, MEET and COUNTER, fixing the totlen field is up to the caller. */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
movl $0xc8, %edx
callq 0x12370
xorl %edi, %edi
callq 0x12280
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x8(%rax)
movq -0x8(%rbp), %rax
movb $0x44, (%rax)
movq -0x8(%rbp), %rax
movb $0x62, 0x1(%rax)
movq -0x8(%rbp), %rax
movb $0x75, 0x2(%rax)
movq -0x8(%rbp), %rax
movb $0x5a, 0x3(%rax)
movl -0xc(%rbp), %eax
movzwl %ax, %edi
callq 0x12280
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0xc(%rax)
movq -0x8(%rbp), %rdi
addq $0x10, %rdi
movq 0x9eb74(%rip), %rsi     # 0xd3600
movl $0x28, %edx
callq 0x12500
leaq 0x8a64b(%rip), %rax     # 0xbf0e8
movl 0xb4(%rax), %eax
movzwl %ax, %edi
callq 0x12280
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x58(%rax)
movq 0x9eb43(%rip), %rax     # 0xd3600
movl 0x30(%rax), %eax
movzwl %ax, %edi
callq 0x12280
movw %ax, %cx
movq -0x8(%rbp), %rax
movw %cx, 0x5a(%rax)
leaq 0x8a60e(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movl 0x8(%rax), %eax
movb %al, %cl
movq -0x8(%rbp), %rax
movb %cl, 0x5c(%rax)
cmpl $0x3, -0xc(%rbp)
jne 0x34b07
movl $0x60, -0x10(%rbp)
movslq -0x10(%rbp), %rax
addq $0x28, %rax
movl %eax, -0x10(%rbp)
jmp 0x34b21
cmpl $0x6, -0xc(%rbp)
jne 0x34b1f
movl $0x60, -0x10(%rbp)
movslq -0x10(%rbp), %rax
addq $0x4, %rax
movl %eax, -0x10(%rbp)
jmp 0x34b21
movl -0x10(%rbp), %edi
callq 0x12360
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterBeforeSleep
void clusterBeforeSleep(void) {
    /* Update the cluster state. */
    if (server.cluster->todo_before_sleep & CLUSTER_TODO_UPDATE_STATE)
        clusterUpdateState();

    /* Save the config, possibly using fsync. */
    if (server.cluster->todo_before_sleep & CLUSTER_TODO_SAVE_CONFIG) {
        int fsync = server.cluster->todo_before_sleep &
                    CLUSTER_TODO_FSYNC_CONFIG;
        clusterSaveConfigOrDie(fsync);
    }

    /* Reset our flags (not strictly needed since every single function
     * called for flags set should be able to clear its flag). */
    server.cluster->todo_before_sleep = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x8a019(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movl 0x28(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x350e6
callq 0x32740
leaq 0x89ffb(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movl 0x28(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x3511e
leaq 0x89fe2(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movl 0x28(%rax), %eax
andl $0x4, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %edi
callq 0x321f0
leaq 0x89fc3(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movl $0x0, 0x28(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: representClusterNodeFlags
sds representClusterNodeFlags(sds ci, uint16_t flags) {
    if (flags == 0) {
        ci = sdscat(ci,"noflags,");
    } else {
        int i, size = sizeof(discntNodeFlagsTable)/sizeof(struct discntNodeFlags);
        for (i = 0; i < size; i++) {
            struct discntNodeFlags *nodeflag = discntNodeFlagsTable + i;
            if (flags & nodeflag->flag) ci = sdscat(ci, nodeflag->name);
        }
    }
    sdsIncrLen(ci,-1); /* Remove trailing comma. */
    return ci;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movzwl -0xa(%rbp), %eax
cmpl $0x0, %eax
jne 0x35172
movq -0x8(%rbp), %rdi
leaq 0x727ef(%rip), %rsi     # 0xa7956
callq 0x1ee70
movq %rax, -0x8(%rbp)
jmp 0x351d4
movl $0x5, -0x14(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x351d2
movslq -0x10(%rbp), %rcx
leaq 0x89e1d(%rip), %rax     # 0xbefb0
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movzwl -0xa(%rbp), %eax
movq -0x20(%rbp), %rcx
movzwl (%rcx), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x351c5
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x1ee70
movq %rax, -0x8(%rbp)
jmp 0x351c7
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x35180
jmp 0x351d4
movq -0x8(%rbp), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x1ea80
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterGenNodeDescription
sds clusterGenNodeDescription(clusterNode *node) {
    sds ci;

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

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

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

    return ci;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
callq 0x1e290
movq %rax, %rdi
movq -0x8(%rbp), %rdx
movq -0x8(%rbp), %rcx
addq $0x50, %rcx
movq -0x8(%rbp), %rax
movl 0x80(%rax), %r8d
leaq 0x7273d(%rip), %rsi     # 0xa795f
movb $0x0, %al
callq 0x1f350
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
movzwl %ax, %esi
callq 0x35140
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rcx
movb $0x1, %al
cmpq $0x0, 0x88(%rcx)
movb %al, -0x11(%rbp)
jne 0x3528a
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
setne %al
movb %al, -0x11(%rbp)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rdi
movb -0x11(%rbp), %sil
leaq 0x726d9(%rip), %r8      # 0xa797a
leaq 0x726d5(%rip), %rax     # 0xa797d
testb $0x1, %sil
cmovneq %rax, %r8
leaq 0x726b5(%rip), %rsi     # 0xa796c
movb $0x0, %al
callq 0x1f350
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterShuffleReachableNodes
void clusterShuffleReachableNodes(void) {
    int r, i;
    clusterNode *tmp;
    for(i = server.cluster->reachable_nodes_count - 1; i > 0; i--) {
        r = rand() % (i + 1);
        tmp = server.cluster->reachable_nodes[r];
        server.cluster->reachable_nodes[r] = server.cluster->reachable_nodes[i];
        server.cluster->reachable_nodes[i] = tmp;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x89e09(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movl 0x38(%rax), %eax
subl $0x1, %eax
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jle 0x35388
callq 0x12990
movl -0x8(%rbp), %ecx
addl $0x1, %ecx
cltd
idivl %ecx
movl %edx, -0x4(%rbp)
leaq 0x89dd7(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x30(%rax), %rax
movslq -0x4(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
leaq 0x89db9(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x30(%rax), %rax
movslq -0x8(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x89d9f(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x30(%rax), %rax
movslq -0x4(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rdx
leaq 0x89d81(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x30(%rax), %rax
movslq -0x8(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x352ef
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: helloCommand
void helloCommand(client *c) {
    dictIterator *di = dictGetIterator(server.cluster->nodes);
    dictEntry *de;

    addReplyMultiBulkLen(c,2+dictSize(server.cluster->nodes));
    addReplyLongLong(c,1); /* Version. */
    addReplyBulkCBuffer(c,myself->name,CLUSTER_NAMELEN); /* My ID. */

    while((de = dictNext(di)) != NULL) {
        clusterNode *node = dictGetVal(de);
        int priority = 1;
        if (node->link == NULL && node != server.cluster->myself) priority = 5;
        if (node->flags & CLUSTER_NODE_PFAIL) priority = 10;
        if (node->flags & CLUSTER_NODE_FAIL) priority = 100;
        addReplyMultiBulkLen(c,4);
        addReplyBulkCBuffer(c,node->name,CLUSTER_NAMELEN); /* ID. */
        addReplyBulkCString(c,node->ip); /* IP address. */
        addReplyBulkLongLong(c,node->port); /* TCP port. */
        addReplyBulkLongLong(c,priority); /* Priority. */
    }
    dictReleaseIterator(di);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x897d5(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x17300
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x897b6(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x10(%rax), %rax
movq 0x28(%rax), %rsi
leaq 0x897a0(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x10(%rax), %rax
addq 0x48(%rax), %rsi
addq $0x2, %rsi
callq 0x24b20
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x24ab0
movq -0x8(%rbp), %rdi
movq 0x9dc87(%rip), %rsi     # 0xd3600
movl $0x28, %edx
callq 0x24ca0
movq -0x10(%rbp), %rdi
callq 0x173a0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x35a5c
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movl $0x1, -0x24(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x88(%rax)
jne 0x359d9
movq -0x20(%rbp), %rax
leaq 0x89722(%rip), %rcx     # 0xbf0e8
movq 0x668(%rcx), %rcx
cmpq (%rcx), %rax
je 0x359d9
movl $0x5, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x359ef
movl $0xa, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x35a05
movl $0x64, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movl $0x4, %esi
callq 0x24b20
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl $0x28, %edx
callq 0x24ca0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x50, %rsi
callq 0x24860
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq 0x80(%rax), %rsi
callq 0x24d70
movq -0x8(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0x24d70
jmp 0x35983
movq -0x10(%rbp), %rdi
callq 0x17510
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterSendShard
void clusterSendShard(counter *cntr) {
    dictIterator *di;
    dictEntry *de;
    clusterNode *node;

    counterClearWantAcks(cntr);

    di = dictGetIterator(server.cluster->nodes);
    while((de = dictNext(di)) != NULL) {
        node = dictGetVal(de);

        if (node == myself) continue;
        if (nodeInHandshake(node)) continue;

        counterWantAck(cntr, node);

        clusterSendShardToNode(cntr, node);
    }
    dictReleaseIterator(di);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x39520
leaq 0x8942c(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x10(%rax), %rdi
callq 0x17300
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x173a0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x35d2b
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq 0x9d906(%rip), %rax     # 0xd3600
jne 0x35cfe
jmp 0x35cd0
movq -0x20(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x35d0f
jmp 0x35cd0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x39570
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x35a70
jmp 0x35cd0
movq -0x10(%rbp), %rdi
callq 0x17510
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterSendAck
void clusterSendAck(clusterNode *node, uint32_t revision, const sds name) {
    unsigned char buf[sizeof(clusterMsg) + 64], *payload;
    clusterMsg *hdr = (clusterMsg*) buf;
    uint32_t totlen;

    if (node->link == NULL) return;

    totlen = sizeof(clusterMsg)-sizeof(union clusterMsgData);
    totlen += sizeof(clusterMsgDataAck) - sizeof(hdr->data.ack.about.name);
    totlen += sdslen(name);

    clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_ACK);
    hdr->totlen = htonl(totlen);

    hdr->data.ack.about.revision    = intrev32ifbe(revision);
    hdr->data.ack.about.name_length = intrev16ifbe(sdslen(name));

    if (totlen < sizeof(buf)) {
        payload = buf;
    } else {
        payload = zmalloc(totlen);
        memcpy(payload,buf,sizeof(clusterMsg));
        hdr = (clusterMsg*) payload;

        serverLog(LL_DEBUG,"Need to resize payload buffer to %u bytes for ack for %s",
            totlen, name);
    }

    memcpy(hdr->data.ack.about.name, name, sdslen(name));

    clusterSendMessage(node->link,payload,totlen);

    if (totlen >= sizeof(buf)) {
        zfree(payload);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x120(%rbp), %rax
movq %rax, -0x130(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x88(%rax)
jne 0x35d77
jmp 0x35ee3
movl $0x60, -0x134(%rbp)
movl -0x134(%rbp), %eax
addq $0x6, %rax
movl %eax, -0x134(%rbp)
movq -0x18(%rbp), %rdi
callq 0x32160
movq %rax, %rcx
movl -0x134(%rbp), %eax
addq %rcx, %rax
movl %eax, -0x134(%rbp)
movq -0x130(%rbp), %rdi
movl $0x5, %esi
callq 0x34a10
movl -0x134(%rbp), %edi
callq 0x12360
movl %eax, %ecx
movq -0x130(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0xc(%rbp), %ecx
movq -0x130(%rbp), %rax
movl %ecx, 0x60(%rax)
movq -0x18(%rbp), %rdi
callq 0x32160
movw %ax, %cx
movq -0x130(%rbp), %rax
movw %cx, 0x64(%rax)
movl -0x134(%rbp), %eax
cmpq $0x108, %rax            # imm = 0x108
jae 0x35e16
leaq -0x120(%rbp), %rax
movq %rax, -0x128(%rbp)
jmp 0x35e6a
movl -0x134(%rbp), %eax
movl %eax, %edi
callq 0x20a00
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rdi
leaq -0x120(%rbp), %rsi
movl $0xc8, %edx
callq 0x12500
movq -0x128(%rbp), %rax
movq %rax, -0x130(%rbp)
movl -0x134(%rbp), %edx
movq -0x18(%rbp), %rcx
xorl %edi, %edi
leaq 0x71d69(%rip), %rsi     # 0xa7bcc
movb $0x0, %al
callq 0x18b10
movq -0x130(%rbp), %rax
addq $0x60, %rax
addq $0x6, %rax
movq %rax, -0x148(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x18(%rbp), %rdi
callq 0x32160
movq -0x148(%rbp), %rdi
movq -0x140(%rbp), %rsi
movq %rax, %rdx
callq 0x12500
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x128(%rbp), %rsi
movl -0x134(%rbp), %eax
movl %eax, %edx
callq 0x348e0
movl -0x134(%rbp), %eax
cmpq $0x108, %rax            # imm = 0x108
jb 0x35ee3
movq -0x128(%rbp), %rdi
callq 0x20ce0
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/cluster.c
// Function: clusterBroadcastResetMessage
void clusterBroadcastResetMessage(void) {
    unsigned char buf[sizeof(clusterMsg)];
    clusterMsg *hdr = (clusterMsg*) buf;

    clusterBuildMessageHdr(hdr,CLUSTERMSG_TYPE_RESET);
    clusterBroadcastMessage(server.cluster->nodes,buf,ntohl(hdr->totlen));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
leaq -0xd0(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rdi
movl $0x6, %esi
callq 0x34a10
leaq 0x891c7(%rip), %rax     # 0xbf0e8
movq 0x668(%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0xe8(%rbp)
leaq -0xd0(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rax
movl 0x4(%rax), %edi
callq 0x128e0
movq -0xe8(%rbp), %rdi
movq -0xe0(%rbp), %rsi
movl %eax, %eax
movl %eax, %edx
callq 0x34980
addq $0xf0, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/endianconv.c
// Function: pack754
uint64_t pack754(long double f, unsigned bits, unsigned expbits)
{
    long double fnorm;
    int shift;
    long long sign, exp, significand;
    unsigned significandbits = bits - expbits - 1; // -1 for sign bit

    if (f == 0.0) return 0; // get this special case out of the way

    // check sign and begin normalization
    if (f < 0) { sign = 1; fnorm = -f; }
    else { sign = 0; fnorm = f; }

    // get the normalized form of f and track the exponent
    shift = 0;
    while(fnorm >= 2.0) { fnorm /= 2.0; shift++; }
    while(fnorm < 1.0) { fnorm *= 2.0; shift--; }
    fnorm = fnorm - 1.0;

    // calculate the binary form (non-float) of the significand data
    significand = fnorm * ((1LL<<significandbits) + 0.5f);

    // get the biased exponent
    exp = shift + ((1<<(expbits-1)) - 1); // shift + bias

    // return the final answer
    return (sign<<(bits-1)) | (exp<<(bits-expbits-1)) | significand;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
fldt 0x10(%rbp)
fstpt -0x20(%rbp)
movl %edi, -0x24(%rbp)
movl %esi, -0x28(%rbp)
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %eax
notl %eax
addl %ecx, %eax
movl %eax, -0x64(%rbp)
fldt -0x20(%rbp)
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x3615b
jp 0x3615b
jmp 0x3614e
movq $0x0, -0x8(%rbp)
jmp 0x3627f
fldt -0x20(%rbp)
fldz
fucompi %st(1), %st
fstp %st(0)
jbe 0x3617a
jmp 0x36168
movq $0x1, -0x50(%rbp)
fldt -0x20(%rbp)
fchs
fstpt -0x40(%rbp)
jmp 0x36188
movq $0x0, -0x50(%rbp)
fldt -0x20(%rbp)
fstpt -0x40(%rbp)
movl $0x0, -0x44(%rbp)
fldt -0x40(%rbp)
flds 0x71af0(%rip)           # 0xa7c88
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jb 0x361bb
jmp 0x361a2
fldt -0x40(%rbp)
flds 0x71ae1(%rip)           # 0xa7c8c
fmulp %st, %st(1)
fstpt -0x40(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x3618f
jmp 0x361bd
fldt -0x40(%rbp)
fld1
fucompi %st(1), %st
fstp %st(0)
jbe 0x361dd
jmp 0x361ca
fldt -0x40(%rbp)
fadd %st, %st(0)
fstpt -0x40(%rbp)
movl -0x44(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x361bd
fldt -0x40(%rbp)
fld1
fchs
faddp %st, %st(1)
fstpt -0x40(%rbp)
fldt -0x40(%rbp)
movb -0x64(%rbp), %cl
movl $0x1, %eax
shlq %cl, %rax
cvtsi2ss %rax, %xmm0
movss 0x71a88(%rip), %xmm1    # 0xa7c8c
addss %xmm1, %xmm0
movss %xmm0, -0x74(%rbp)
flds -0x74(%rbp)
fmulp %st, %st(1)
fnstcw -0x76(%rbp)
movzwl -0x76(%rbp), %eax
orl $0xc00, %eax            # imm = 0xC00
movw %ax, -0x78(%rbp)
fldcw -0x78(%rbp)
fistpll -0x70(%rbp)
fldcw -0x76(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x44(%rbp), %eax
movl -0x28(%rbp), %ecx
subl $0x1, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
addl %ecx, %eax
cltq
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
shlq %cl, %rax
movq -0x58(%rbp), %rdx
movl -0x24(%rbp), %ecx
subl -0x28(%rbp), %ecx
subl $0x1, %ecx
movl %ecx, %ecx
shlq %cl, %rdx
movq %rdx, %rcx
orq %rcx, %rax
orq -0x60(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/endianconv.c
// Function: unpack754
long double unpack754(uint64_t i, unsigned bits, unsigned expbits)
{
    long double result;
    long long shift;
    unsigned bias;
    unsigned significandbits = bits - expbits - 1; // -1 for sign bit

    if (i == 0) return 0.0;

    // pull the significand
    result = (i&((1LL<<significandbits)-1)); // mask
    result /= (1LL<<significandbits); // convert back to float
    result += 1.0f; // add the one back on

    // deal with the exponent
    bias = (1<<(expbits-1)) - 1;
    shift = ((i>>significandbits)&((1LL<<expbits)-1)) - bias;
    while(shift > 0) { result *= 2.0; shift--; }
    while(shift < 0) { result /= 2.0; shift++; }

    // sign it
    result *= (i>>(bits-1))&1? -1.0: 1.0;

    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x18(%rbp)
movl %esi, -0x1c(%rbp)
movl %edx, -0x20(%rbp)
movl -0x1c(%rbp), %eax
subl -0x20(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x40(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x362bb
fldz
fstpt -0x10(%rbp)
jmp 0x363c6
movq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movb -0x40(%rbp), %cl
movl $0x1, %eax
movq %rax, %rdx
shlq %cl, %rdx
movq -0x58(%rbp), %rcx
decq %rdx
andq %rdx, %rcx
movq %rcx, -0x50(%rbp)
sets %cl
movzbl %cl, %ecx
movl %ecx, %edx
fildll -0x50(%rbp)
leaq 0x7199f(%rip), %rcx     # 0xa7c90
flds (%rcx,%rdx,4)
faddp %st, %st(1)
fstpt -0x30(%rbp)
movb -0x40(%rbp), %cl
shlq %cl, %rax
movq %rax, -0x48(%rbp)
fildll -0x48(%rbp)
fldt -0x30(%rbp)
fdivp %st, %st(1)
fstpt -0x30(%rbp)
fldt -0x30(%rbp)
fld1
faddp %st, %st(1)
fstpt -0x30(%rbp)
movl -0x20(%rbp), %ecx
subl $0x1, %ecx
movl $0x1, %eax
shll %cl, %eax
subl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movl -0x40(%rbp), %ecx
shrq %cl, %rax
movl -0x20(%rbp), %ecx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
subq $0x1, %rcx
andq %rcx, %rax
movl -0x3c(%rbp), %ecx
subq %rcx, %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jle 0x36371
fldt -0x30(%rbp)
fadd %st, %st(0)
fstpt -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x36354
jmp 0x36373
cmpq $0x0, -0x38(%rbp)
jge 0x36396
fldt -0x30(%rbp)
flds 0x71909(%rip)           # 0xa7c8c
fmulp %st, %st(1)
fstpt -0x30(%rbp)
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x36373
movq -0x18(%rbp), %rax
movb -0x1c(%rbp), %cl
decb %cl
movzbl %cl, %ecx
btq %rcx, %rax
setb %al
movzbl %al, %eax
movl %eax, %ecx
leaq 0x718e3(%rip), %rax     # 0xa7c98
fldl (%rax,%rcx,8)
fldt -0x30(%rbp)
fmulp %st, %st(1)
fstpt -0x30(%rbp)
fldt -0x30(%rbp)
fstpt -0x10(%rbp)
fldt -0x10(%rbp)
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/bio.c
// Function: bioCreateBackgroundJob
void bioCreateBackgroundJob(int type, void *arg1, void *arg2, void *arg3) {
    struct bio_job *job = zmalloc(sizeof(*job));

    job->time = time(NULL);
    job->arg1 = arg1;
    job->arg2 = arg2;
    job->arg3 = arg3;
    pthread_mutex_lock(&bio_mutex[type]);
    listAddNodeTail(bio_jobs[type],job);
    bio_pending[type]++;
    pthread_cond_signal(&bio_newjob_cond[type]);
    pthread_mutex_unlock(&bio_mutex[type]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x20, %edi
callq 0x20a00
movq %rax, -0x28(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x12530
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movslq -0x4(%rbp), %rax
leaq 0x9ce79(%rip), %rdi     # 0xd3610
imulq $0x28, %rax, %rax
addq %rax, %rdi
callq 0x12970
movslq -0x4(%rbp), %rcx
leaq 0x9cf72(%rip), %rax     # 0xd3720
movq (%rax,%rcx,8), %rdi
movq -0x28(%rbp), %rsi
callq 0x12ce0
movslq -0x4(%rbp), %rcx
leaq 0x9cf6a(%rip), %rax     # 0xd3730
movq (%rax,%rcx,8), %rdx
addq $0x1, %rdx
leaq 0x9cf5b(%rip), %rax     # 0xd3730
movq %rdx, (%rax,%rcx,8)
movslq -0x4(%rbp), %rax
leaq 0x9ce7c(%rip), %rdi     # 0xd3660
imulq $0x30, %rax, %rax
addq %rax, %rdi
callq 0x12460
movslq -0x4(%rbp), %rax
leaq 0x9ce15(%rip), %rdi     # 0xd3610
imulq $0x28, %rax, %rax
addq %rax, %rdi
callq 0x125a0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/bio.c
// Function: bioWaitStepOfType
unsigned long long bioWaitStepOfType(int type) {
    unsigned long long val;
    pthread_mutex_lock(&bio_mutex[type]);
    val = bio_pending[type];
    if (val != 0) {
        pthread_cond_wait(&bio_step_cond[type],&bio_mutex[type]);
        val = bio_pending[type];
    }
    pthread_mutex_unlock(&bio_mutex[type]);
    return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movslq -0x4(%rbp), %rax
leaq 0x9cd8a(%rip), %rdi     # 0xd3610
imulq $0x28, %rax, %rax
addq %rax, %rdi
callq 0x12970
movslq -0x4(%rbp), %rcx
leaq 0x9ce93(%rip), %rax     # 0xd3730
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x368e8
movslq -0x4(%rbp), %rax
leaq 0x9ce09(%rip), %rdi     # 0xd36c0
imulq $0x30, %rax, %rax
addq %rax, %rdi
movslq -0x4(%rbp), %rax
leaq 0x9cd47(%rip), %rsi     # 0xd3610
imulq $0x28, %rax, %rax
addq %rax, %rsi
callq 0x121e0
movslq -0x4(%rbp), %rcx
leaq 0x9ce50(%rip), %rax     # 0xd3730
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movslq -0x4(%rbp), %rax
leaq 0x9cd1d(%rip), %rdi     # 0xd3610
imulq $0x28, %rax, %rax
addq %rax, %rdi
callq 0x125a0
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/memtest.c
// Function: memtest_addressing
void memtest_addressing(unsigned long *l, size_t bytes) {
    unsigned long words = bytes/sizeof(unsigned long);
    unsigned long j, *p;

    /* Fill */
    p = l;
    for (j = 0; j < words; j++) {
        *p = (unsigned long)p;
        p++;
        if ((j & 0xffff) == 0) memtest_progress_step(j,words*2,'A');
    }
    /* Test */
    p = l;
    for (j = 0; j < words; j++) {
        if (*p != (unsigned long)p) {
            printf("\n*** MEMORY ADDRESSING ERROR: %p contains %lu\n",
                (void*) p, *p);
            exit(1);
        }
        p++;
        if ((j & 0xffff) == 0) memtest_progress_step(j+words,words*2,'A');
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
shrq $0x3, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x36bd2
movq -0x28(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq $0x0, %rax
jne 0x36bc2
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
shlq %rsi
movl $0x41, %edx
callq 0x36ac0
jmp 0x36bc4
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x36b7c
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x36c67
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x28(%rbp), %rcx
cmpq %rcx, %rax
je 0x36c1f
movq -0x28(%rbp), %rsi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x71256(%rip), %rdi     # 0xa7e64
movb $0x0, %al
callq 0x122b0
movl $0x1, %edi
callq 0x12870
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq $0x0, %rax
jne 0x36c54
movq -0x20(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rsi
shlq %rsi
movl $0x41, %edx
callq 0x36ac0
jmp 0x36c56
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x36be2
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/erikdubbelboer[P]discnt/src/memtest.c
// Function: memtest_compare
void memtest_compare(unsigned long *l, size_t bytes) {
    unsigned long words = bytes/sizeof(unsigned long)/2;
    unsigned long w, *l1, *l2;

    assert((bytes & 4095) == 0);
    l1 = l;
    l2 = l1+words;
    for (w = 0; w < words; w++) {
        if (*l1 != *l2) {
            printf("\n*** MEMORY ERROR DETECTED: %p != %p (%lu vs %lu)\n",
                (void*)l1, (void*)l2, *l1, *l2);
            exit(1);
        }
        l1 ++;
        l2 ++;
        if ((w & 0xffff) == 0) memtest_progress_step(w,words,'=');
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
shrq $0x3, %rax
shrq %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
andq $0xfff, %rax            # imm = 0xFFF
cmpq $0x0, %rax
jne 0x36ff1
jmp 0x37010
leaq 0x70e9b(%rip), %rdi     # 0xa7e93
leaq 0x70ea8(%rip), %rsi     # 0xa7ea7
movl $0xb7, %edx
leaq 0x70f2d(%rip), %rcx     # 0xa7f38
callq 0x12340
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x18(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x370cc
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq -0x30(%rbp), %rcx
cmpq (%rcx), %rax
je 0x3707f
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x30(%rbp), %rax
movq (%rax), %r8
leaq 0x70ef8(%rip), %rdi     # 0xa7f66
movb $0x0, %al
callq 0x122b0
movl $0x1, %edi
callq 0x12870
movq -0x28(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq $0x0, %rax
jne 0x370b9
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl $0x3d, %edx
callq 0x36ac0
jmp 0x370bb
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x37033
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)