LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/debug.c
// Function: dumpX86Calls
void dumpX86Calls(void *addr, size_t len) {
    size_t j;
    unsigned char *p = addr;
    Dl_info info;
    /* Hash table to best-effort avoid printing the same symbol
     * multiple times. */
    unsigned long ht[256] = {0};

    if (len < 5) return;
    for (j = 0; j < len-4; j++) {
        if (p[j] != 0xE8) continue; /* Not an E8 CALL opcode. */
        unsigned long target = (unsigned long)addr+j+5;
        target += *((int32_t*)(p+j+1));
        if (dladdr((void*)target, &info) != 0 && info.dli_sname != NULL) {
            if (ht[target&0xff] != target) {
                printf("Function at 0x%lx is %s\n",target,info.dli_sname);
                ht[target&0xff] = target;
            }
            j += 4; /* Skip the 32 bit immediate. */
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x850, %rsp            # imm = 0x850
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x840(%rbp), %rdi
xorl %esi, %esi
movl $0x800, %edx            # imm = 0x800
callq 0x26110
cmpq $0x5, -0x10(%rbp)
jae 0x792aa
jmp 0x7939b
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
subq $0x4, %rcx
cmpq %rcx, %rax
jae 0x7939b
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
cmpl $0xe8, %eax
je 0x792df
jmp 0x7938a
movq -0x8(%rbp), %rax
addq -0x18(%rbp), %rax
addq $0x5, %rax
movq %rax, -0x848(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
movslq 0x1(%rax,%rcx), %rax
addq -0x848(%rbp), %rax
movq %rax, -0x848(%rbp)
movq -0x848(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x26860
cmpl $0x0, %eax
je 0x79388
cmpq $0x0, -0x30(%rbp)
je 0x79388
movq -0x848(%rbp), %rax
andq $0xff, %rax
movq -0x840(%rbp,%rax,8), %rax
cmpq -0x848(%rbp), %rax
je 0x7937c
movq -0x848(%rbp), %rsi
movq -0x30(%rbp), %rdx
leaq 0xc7e3a(%rip), %rdi     # 0x141193
movb $0x0, %al
callq 0x260a0
movq -0x848(%rbp), %rcx
movq -0x848(%rbp), %rax
andq $0xff, %rax
movq %rcx, -0x840(%rbp,%rax,8)
movq -0x18(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x18(%rbp)
jmp 0x7938a
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x792b2
addq $0x850, %rsp            # imm = 0x850
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/debug.c
// Function: serverLogHexDump
void serverLogHexDump(int level, char *descr, void *value, size_t len) {
    char buf[65], *b;
    unsigned char *v = value;
    char charset[] = "0123456789abcdef";

    serverLog(level,"%s (hexdump of %zu bytes):", descr, len);
    b = buf;
    while(len) {
        b[0] = charset[(*v)>>4];
        b[1] = charset[(*v)&0xf];
        b[2] = '\0';
        b += 2;
        len--;
        v++;
        if (b-buf == 64 || len == 0) {
            serverLogRaw(level|LL_RAW,buf);
            b = buf;
        }
    }
    serverLogRaw(level|LL_RAW,"\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
movq 0xc7e17(%rip), %rax     # 0x141590
movq %rax, -0xa0(%rbp)
movq 0xc7e11(%rip), %rax     # 0x141598
movq %rax, -0x98(%rbp)
movb 0xc7e0c(%rip), %al      # 0x1415a0
movb %al, -0x90(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rdx
movq -0x20(%rbp), %rcx
leaq 0xc7d90(%rip), %rsi     # 0x14153c
movb $0x0, %al
callq 0x2fc60
leaq -0x70(%rbp), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x7985c
movq -0x80(%rbp), %rax
movzbl (%rax), %eax
sarl $0x4, %eax
cltq
movb -0xa0(%rbp,%rax), %cl
movq -0x78(%rbp), %rax
movb %cl, (%rax)
movq -0x80(%rbp), %rax
movzbl (%rax), %eax
andl $0xf, %eax
cltq
movb -0xa0(%rbp,%rax), %cl
movq -0x78(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x78(%rbp), %rax
movb $0x0, 0x2(%rax)
movq -0x78(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x78(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rax
leaq -0x70(%rbp), %rcx
subq %rcx, %rax
cmpq $0x40, %rax
je 0x7983d
cmpq $0x0, -0x20(%rbp)
jne 0x79857
movl -0x4(%rbp), %edi
orl $0x400, %edi            # imm = 0x400
leaq -0x70(%rbp), %rsi
callq 0x2fa20
leaq -0x70(%rbp), %rax
movq %rax, -0x78(%rbp)
jmp 0x797bb
movl -0x4(%rbp), %edi
orl $0x400, %edi            # imm = 0x400
leaq 0xc05cd(%rip), %rsi     # 0x139e39
callq 0x2fa20
addq $0xa0, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/debug.c
// Function: watchdogSignalHandler
void watchdogSignalHandler(int sig, siginfo_t *info, void *secret) {
#ifdef HAVE_BACKTRACE
    ucontext_t *uc = (ucontext_t*) secret;
#endif
    UNUSED(info);
    UNUSED(sig);

    serverLogFromHandler(LL_WARNING,"\n--- WATCHDOG TIMER EXPIRED ---");
#ifdef HAVE_BACKTRACE
    logStackTrace(uc);
#else
    serverLogFromHandler(LL_WARNING,"Sorry: no support for backtrace().");
#endif
    serverLogFromHandler(LL_WARNING,"--------\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movl $0x3, %edi
leaq 0xc7cb0(%rip), %rsi     # 0x141557
callq 0x2fd40
movq -0x20(%rbp), %rdi
callq 0x78bc0
movl $0x3, %edi
leaq 0xc7cb6(%rip), %rsi     # 0x141577
callq 0x2fd40
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/debug.c
// Function: watchdogScheduleSignal
void watchdogScheduleSignal(int period) {
    struct itimerval it;

    /* Will stop the timer if period is 0. */
    it.it_value.tv_sec = period/1000;
    it.it_value.tv_usec = (period%1000)*1000;
    /* Don't automatically restart. */
    it.it_interval.tv_sec = 0;
    it.it_interval.tv_usec = 0;
    setitimer(ITIMER_REAL, &it, NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
cltq
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
imull $0x3e8, %edx, %eax      # imm = 0x3E8
cltq
movq %rax, -0x10(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x20(%rbp)
xorl %edi, %edi
leaq -0x28(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x26380
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/debug.c
// Function: enableWatchdog
void enableWatchdog(int period) {
    int min_period;

    if (server.watchdog_period == 0) {
        struct sigaction act;

        /* Watchdog was actually disabled, so we have to setup the signal
         * handler. */
        sigemptyset(&act.sa_mask);
        act.sa_flags = SA_ONSTACK | SA_SIGINFO;
        act.sa_sigaction = watchdogSignalHandler;
        sigaction(SIGALRM, &act, NULL);
    }
    /* If the configured period is smaller than twice the timer period, it is
     * too short for the software watchdog to work reliably. Fix it now
     * if needed. */
    min_period = (1000/server.hz)*2;
    if (period < min_period) period = min_period;
    watchdogScheduleSignal(period); /* Adjust the current timer. */
    server.watchdog_period = period;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl %edi, -0x4(%rbp)
leaq 0xfe893(%rip), %rax     # 0x1781d8
cmpl $0x0, 0xa40(%rax)
jne 0x79988
leaq -0xa0(%rbp), %rdi
addq $0x8, %rdi
callq 0x26ac0
movl $0x8000004, -0x18(%rbp) # imm = 0x8000004
leaq -0xec(%rip), %rax       # 0x79880
movq %rax, -0xa0(%rbp)
movl $0xe, %edi
leaq -0xa0(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x266d0
movl $0x3e8, %eax            # imm = 0x3E8
leaq 0xfe844(%rip), %rcx     # 0x1781d8
cltd
idivl 0x20(%rcx)
shll %eax
movl %eax, -0x8(%rbp)
movl -0x4(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x799ab
movl -0x8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %edi
callq 0x798d0
movl -0x4(%rbp), %ecx
leaq 0xfe81b(%rip), %rax     # 0x1781d8
movl %ecx, 0xa40(%rax)
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/debug.c
// Function: disableWatchdog
void disableWatchdog(void) {
    struct sigaction act;
    if (server.watchdog_period == 0) return; /* Already disabled. */
    watchdogScheduleSignal(0); /* Stop the current timer. */

    /* Set the signal handler to SIG_IGN, this will also remove pending
     * signals from the queue. */
    sigemptyset(&act.sa_mask);
    act.sa_flags = 0;
    act.sa_handler = SIG_IGN;
    sigaction(SIGALRM, &act, NULL);
    server.watchdog_period = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
leaq 0xfe7f6(%rip), %rax     # 0x1781d8
cmpl $0x0, 0xa40(%rax)
jne 0x799ed
jmp 0x79a3d
xorl %edi, %edi
callq 0x798d0
leaq -0x98(%rbp), %rdi
addq $0x8, %rdi
callq 0x26ac0
movl $0x0, -0x10(%rbp)
movl $0x1, %eax
movq %rax, -0x98(%rbp)
movl $0xe, %edi
leaq -0x98(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x266d0
leaq 0xfe7a5(%rip), %rax     # 0x1781d8
movl $0x0, 0xa40(%rax)
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sort.c
// Function: createSortOperation
redisSortOperation *createSortOperation(int type, robj *pattern) {
    redisSortOperation *so = zmalloc(sizeof(*so));
    so->type = type;
    so->pattern = pattern;
    return so;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x10, %edi
callq 0x3acd0
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/intset.c
// Function: intsetNew
intset *intsetNew(void) {
    intset *is = zmalloc(sizeof(intset));
    is->encoding = intrev32ifbe(INTSET_ENC_INT16);
    is->length = 0;
    return is;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x8, %edi
callq 0x3acd0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x2, (%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/intset.c
// Function: intsetAdd
intset *intsetAdd(intset *is, int64_t value, uint8_t *success) {
    uint8_t valenc = _intsetValueEncoding(value);
    uint32_t pos;
    if (success) *success = 1;

    /* Upgrade encoding if necessary. If we need to upgrade, we know that
     * this value should be either appended (if > 0) or prepended (if < 0),
     * because it lies outside the range of existing values. */
    if (valenc > intrev32ifbe(is->encoding)) {
        /* This always succeeds, so we don't need to curry *success. */
        return intsetUpgradeAndAdd(is,value);
    } else {
        /* Abort if the value is already present in the set.
         * This call will populate "pos" with the right position to insert
         * the value when it cannot be found. */
        if (intsetSearch(is,value,&pos)) {
            if (success) *success = 0;
            return is;
        }

        is = intsetResize(is,intrev32ifbe(is->length)+1);
        if (pos < intrev32ifbe(is->length)) intsetMoveTail(is,pos,pos+1);
    }

    _intsetSet(is,pos,value);
    is->length = intrev32ifbe(intrev32ifbe(is->length)+1);
    return is;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7b3e0
movb %al, -0x21(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x7b31e
movq -0x20(%rbp), %rax
movb $0x1, (%rax)
movzbl -0x21(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jbe 0x7b340
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7b430
movq %rax, -0x8(%rbp)
jmp 0x7b3cd
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x7b520
cmpb $0x0, %al
je 0x7b36d
cmpq $0x0, -0x20(%rbp)
je 0x7b363
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7b3cd
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x4(%rax), %esi
addl $0x1, %esi
callq 0x7b690
movq %rax, -0x10(%rbp)
movl -0x28(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x7b3a2
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %esi
movl -0x28(%rbp), %edx
addl $0x1, %edx
callq 0x7b6d0
jmp 0x7b3a4
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x7b7d0
movq -0x10(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/intset.c
// Function: intsetValueEncoding
static uint8_t _intsetValueEncoding(int64_t v) {
    if (v < INT32_MIN || v > INT32_MAX)
        return INTSET_ENC_INT64;
    else if (v < INT16_MIN || v > INT16_MAX)
        return INTSET_ENC_INT32;
    else
        return INTSET_ENC_INT16;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
cmpq $-0x80000000, -0x10(%rbp) # imm = 0x80000000
jl 0x7b3fc
cmpq $0x7fffffff, -0x10(%rbp) # imm = 0x7FFFFFFF
jle 0x7b402
movb $0x8, -0x1(%rbp)
jmp 0x7b420
cmpq $-0x8000, -0x10(%rbp)   # imm = 0x8000
jl 0x7b416
cmpq $0x7fff, -0x10(%rbp)    # imm = 0x7FFF
jle 0x7b41c
movb $0x4, -0x1(%rbp)
jmp 0x7b420
movb $0x2, -0x1(%rbp)
movb -0x1(%rbp), %al
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/intset.c
// Function: intsetUpgradeAndAdd
static intset *intsetUpgradeAndAdd(intset *is, int64_t value) {
    uint8_t curenc = intrev32ifbe(is->encoding);
    uint8_t newenc = _intsetValueEncoding(value);
    int length = intrev32ifbe(is->length);
    int prepend = value < 0 ? 1 : 0;

    /* First set new encoding and resize */
    is->encoding = intrev32ifbe(newenc);
    is = intsetResize(is,intrev32ifbe(is->length)+1);

    /* Upgrade back-to-front so we don't overwrite values.
     * Note that the "prepend" variable is used to make sure we have an empty
     * space at either the beginning or the end of the intset. */
    while(length--)
        _intsetSet(is,length+prepend,_intsetGetEncoded(is,length,curenc));

    /* Set the value at the beginning or the end. */
    if (prepend)
        _intsetSet(is,0,value);
    else
        _intsetSet(is,intrev32ifbe(is->length),value);
    is->length = intrev32ifbe(intrev32ifbe(is->length)+1);
    return is;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7b3e0
movb %al, -0x12(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x18(%rbp)
movq -0x10(%rbp), %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmovll %ecx, %eax
movl %eax, -0x1c(%rbp)
movzbl -0x12(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %esi
addl $0x1, %esi
callq 0x7b690
movq %rax, -0x8(%rbp)
movl -0x18(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x18(%rbp)
cmpl $0x0, %eax
je 0x7b4d7
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x18(%rbp), %eax
addl -0x1c(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0x18(%rbp), %esi
movzbl -0x11(%rbp), %edx
callq 0x7ba60
movq -0x28(%rbp), %rdi
movl -0x20(%rbp), %esi
movq %rax, %rdx
callq 0x7b7d0
jmp 0x7b495
cmpl $0x0, -0x1c(%rbp)
je 0x7b4ee
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rdx
xorl %esi, %esi
callq 0x7b7d0
jmp 0x7b502
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %esi
movq -0x10(%rbp), %rdx
callq 0x7b7d0
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/intset.c
// Function: intsetMoveTail
static void intsetMoveTail(intset *is, uint32_t from, uint32_t to) {
    void *src, *dst;
    uint32_t bytes = intrev32ifbe(is->length)-from;
    uint32_t encoding = intrev32ifbe(is->encoding);

    if (encoding == INTSET_ENC_INT64) {
        src = (int64_t*)is->contents+from;
        dst = (int64_t*)is->contents+to;
        bytes *= sizeof(int64_t);
    } else if (encoding == INTSET_ENC_INT32) {
        src = (int32_t*)is->contents+from;
        dst = (int32_t*)is->contents+to;
        bytes *= sizeof(int32_t);
    } else {
        src = (int16_t*)is->contents+from;
        dst = (int16_t*)is->contents+to;
        bytes *= sizeof(int16_t);
    }
    memmove(dst,src,bytes);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
subl -0xc(%rbp), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpq $0x8, %rax
jne 0x7b739
movq -0x8(%rbp), %rax
addq $0x8, %rax
movl -0xc(%rbp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movl -0x10(%rbp), %ecx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
shlq $0x3, %rax
movl %eax, -0x24(%rbp)
jmp 0x7b7af
movl -0x28(%rbp), %eax
cmpq $0x4, %rax
jne 0x7b77a
movq -0x8(%rbp), %rax
addq $0x8, %rax
movl -0xc(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movl -0x10(%rbp), %ecx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
shlq $0x2, %rax
movl %eax, -0x24(%rbp)
jmp 0x7b7ad
movq -0x8(%rbp), %rax
addq $0x8, %rax
movl -0xc(%rbp), %ecx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movl -0x10(%rbp), %ecx
shlq %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x24(%rbp), %eax
shlq %rax
movl %eax, -0x24(%rbp)
jmp 0x7b7af
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x24(%rbp), %eax
movl %eax, %edx
callq 0x267e0
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/intset.c
// Function: intsetSet
static void _intsetSet(intset *is, int pos, int64_t value) {
    uint32_t encoding = intrev32ifbe(is->encoding);

    if (encoding == INTSET_ENC_INT64) {
        ((int64_t*)is->contents)[pos] = value;
        memrev64ifbe(((int64_t*)is->contents)+pos);
    } else if (encoding == INTSET_ENC_INT32) {
        ((int32_t*)is->contents)[pos] = value;
        memrev32ifbe(((int32_t*)is->contents)+pos);
    } else {
        ((int16_t*)is->contents)[pos] = value;
        memrev16ifbe(((int16_t*)is->contents)+pos);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpq $0x8, %rax
jne 0x7b804
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, 0x8(%rax,%rcx,8)
jmp 0x7b837
movl -0x1c(%rbp), %eax
cmpq $0x4, %rax
jne 0x7b821
movq -0x18(%rbp), %rax
movl %eax, %edx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl %edx, 0x8(%rax,%rcx,4)
jmp 0x7b835
movq -0x18(%rbp), %rax
movw %ax, %dx
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movw %dx, 0x8(%rax,%rcx,2)
jmp 0x7b837
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/intset.c
// Function: intsetRemove
intset *intsetRemove(intset *is, int64_t value, int *success) {
    uint8_t valenc = _intsetValueEncoding(value);
    uint32_t pos;
    if (success) *success = 0;

    if (valenc <= intrev32ifbe(is->encoding) && intsetSearch(is,value,&pos)) {
        uint32_t len = intrev32ifbe(is->length);

        /* We know we can delete */
        if (success) *success = 1;

        /* Overwrite value with tail and update length */
        if (pos < (len-1)) intsetMoveTail(is,pos+1,pos);
        is = intsetResize(is,len-1);
        is->length = intrev32ifbe(len-1);
    }
    return is;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x7b3e0
movb %al, -0x19(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x7b871
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movzbl -0x19(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl (%rcx), %eax
ja 0x7b8f0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
leaq -0x20(%rbp), %rdx
callq 0x7b520
movzbl %al, %eax
cmpl $0x0, %eax
je 0x7b8f0
movq -0x8(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x24(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x7b8b1
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movl -0x20(%rbp), %eax
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jae 0x7b8d0
movq -0x8(%rbp), %rdi
movl -0x20(%rbp), %esi
addl $0x1, %esi
movl -0x20(%rbp), %edx
callq 0x7b6d0
movq -0x8(%rbp), %rdi
movl -0x24(%rbp), %esi
subl $0x1, %esi
callq 0x7b690
movq %rax, -0x8(%rbp)
movl -0x24(%rbp), %ecx
subl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/intset.c
// Function: intsetGet
uint8_t intsetGet(intset *is, uint32_t pos, int64_t *value) {
    if (pos < intrev32ifbe(is->length)) {
        *value = _intsetGet(is,pos);
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jae 0x7ba0b
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x7b9a0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movb $0x1, -0x1(%rbp)
jmp 0x7ba0f
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/intset.c
// Function: intsetGetEncoded
static int64_t _intsetGetEncoded(intset *is, int pos, uint8_t enc) {
    int64_t v64;
    int32_t v32;
    int16_t v16;

    if (enc == INTSET_ENC_INT64) {
        memcpy(&v64,((int64_t*)is->contents)+pos,sizeof(v64));
        memrev64ifbe(&v64);
        return v64;
    } else if (enc == INTSET_ENC_INT32) {
        memcpy(&v32,((int32_t*)is->contents)+pos,sizeof(v32));
        memrev32ifbe(&v32);
        return v32;
    } else {
        memcpy(&v16,((int16_t*)is->contents)+pos,sizeof(v16));
        memrev16ifbe(&v16);
        return v16;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movb %al, -0x15(%rbp)
movzbl -0x15(%rbp), %eax
cmpq $0x8, %rax
jne 0x7ba95
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq 0x8(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7bad2
movzbl -0x15(%rbp), %eax
cmpq $0x4, %rax
jne 0x7bab8
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movl 0x8(%rax,%rcx,4), %eax
movl %eax, -0x24(%rbp)
movslq -0x24(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7bad2
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movw 0x8(%rax,%rcx,2), %ax
movw %ax, -0x26(%rbp)
movswq -0x26(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/syncio.c
// Function: syncWrite
ssize_t syncWrite(int fd, char *ptr, ssize_t size, long long timeout) {
    ssize_t nwritten, ret = size;
    long long start = mstime();
    long long remaining = timeout;

    while(1) {
        long long wait = (remaining > SYNCIO__RESOLUTION) ?
                          remaining : SYNCIO__RESOLUTION;
        long long elapsed;

        /* Optimistically try to write before checking if the file descriptor
         * is actually writable. At worst we get EAGAIN. */
        nwritten = write(fd,ptr,size);
        if (nwritten == -1) {
            if (errno != EAGAIN) return -1;
        } else {
            ptr += nwritten;
            size -= nwritten;
        }
        if (size == 0) return ret;

        /* Wait */
        aeWait(fd,AE_WRITABLE,wait);
        elapsed = mstime() - start;
        if (elapsed >= timeout) {
            errno = ETIMEDOUT;
            return -1;
        }
        remaining = timeout - elapsed;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
callq 0x2ff70
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0xa, -0x48(%rbp)
jle 0x7bb21
movq -0x48(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x7bb2c
movl $0xa, %eax
movq %rax, -0x60(%rbp)
jmp 0x7bb2c
movq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x26bc0
movq %rax, -0x30(%rbp)
cmpq $-0x1, -0x30(%rbp)
jne 0x7bb65
callq 0x26880
cmpl $0xb, (%rax)
je 0x7bb63
movq $-0x1, -0x8(%rbp)
jmp 0x7bbdf
jmp 0x7bb80
movq -0x30(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7bb91
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7bbdf
movl -0xc(%rbp), %edi
movq -0x50(%rbp), %rdx
movl $0x2, %esi
callq 0x2b540
callq 0x2ff70
subq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x28(%rbp), %rax
jl 0x7bbce
callq 0x26880
movl $0x6e, (%rax)
movq $-0x1, -0x8(%rbp)
jmp 0x7bbdf
movq -0x28(%rbp), %rax
subq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x7bb10
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/syncio.c
// Function: syncRead
ssize_t syncRead(int fd, char *ptr, ssize_t size, long long timeout) {
    ssize_t nread, totread = 0;
    long long start = mstime();
    long long remaining = timeout;

    if (size == 0) return 0;
    while(1) {
        long long wait = (remaining > SYNCIO__RESOLUTION) ?
                          remaining : SYNCIO__RESOLUTION;
        long long elapsed;

        /* Optimistically try to read before checking if the file descriptor
         * is actually readable. At worst we get EAGAIN. */
        nread = read(fd,ptr,size);
        if (nread == 0) return -1; /* short read. */
        if (nread == -1) {
            if (errno != EAGAIN) return -1;
        } else {
            ptr += nread;
            size -= nread;
            totread += nread;
        }
        if (size == 0) return totread;

        /* Wait */
        aeWait(fd,AE_READABLE,wait);
        elapsed = mstime() - start;
        if (elapsed >= timeout) {
            errno = ETIMEDOUT;
            return -1;
        }
        remaining = timeout - elapsed;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
callq 0x2ff70
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7bc34
movq $0x0, -0x8(%rbp)
jmp 0x7bd28
jmp 0x7bc36
cmpq $0xa, -0x48(%rbp)
jle 0x7bc47
movq -0x48(%rbp), %rax
movq %rax, -0x60(%rbp)
jmp 0x7bc52
movl $0xa, %eax
movq %rax, -0x60(%rbp)
jmp 0x7bc52
movq -0x60(%rbp), %rax
movq %rax, -0x50(%rbp)
movl -0xc(%rbp), %edi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x26340
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x7bc82
movq $-0x1, -0x8(%rbp)
jmp 0x7bd28
cmpq $-0x1, -0x30(%rbp)
jne 0x7bca2
callq 0x26880
cmpl $0xb, (%rax)
je 0x7bca0
movq $-0x1, -0x8(%rbp)
jmp 0x7bd28
jmp 0x7bcc9
movq -0x30(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7bcda
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7bd28
movl -0xc(%rbp), %edi
movq -0x50(%rbp), %rdx
movl $0x1, %esi
callq 0x2b540
callq 0x2ff70
subq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x28(%rbp), %rax
jl 0x7bd17
callq 0x26880
movl $0x6e, (%rax)
movq $-0x1, -0x8(%rbp)
jmp 0x7bd28
movq -0x28(%rbp), %rax
subq -0x58(%rbp), %rax
movq %rax, -0x48(%rbp)
jmp 0x7bc36
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/syncio.c
// Function: syncReadLine
ssize_t syncReadLine(int fd, char *ptr, ssize_t size, long long timeout) {
    ssize_t nread = 0;

    size--;
    while(size) {
        char c;

        if (syncRead(fd,&c,1,timeout) == -1) return -1;
        if (c == '\n') {
            *ptr = '\0';
            if (nread && *(ptr-1) == '\r') *(ptr-1) = '\0';
            return nread;
        } else {
            *ptr++ = c;
            *ptr = '\0';
            nread++;
        }
        size--;
    }
    return nread;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x7be09
movl -0xc(%rbp), %edi
movq -0x28(%rbp), %rcx
leaq -0x31(%rbp), %rsi
movl $0x1, %edx
callq 0x7bbf0
cmpq $-0x1, %rax
jne 0x7bd9b
movq $-0x1, -0x8(%rbp)
jmp 0x7be11
movsbl -0x31(%rbp), %eax
cmpl $0xa, %eax
jne 0x7bdd1
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
cmpq $0x0, -0x30(%rbp)
je 0x7bdc7
movq -0x18(%rbp), %rax
movsbl -0x1(%rax), %eax
cmpl $0xd, %eax
jne 0x7bdc7
movq -0x18(%rbp), %rax
movb $0x0, -0x1(%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x7be11
movb -0x31(%rbp), %cl
movq -0x18(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x18(%rbp)
movb %cl, (%rax)
movq -0x18(%rbp), %rax
movb $0x0, (%rax)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x7bd6b
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/cluster.c
// Function: clusterLookupNode
clusterNode *clusterLookupNode(char *name) {
    sds s = sdsnewlen(name, CLUSTER_NAMELEN);
    dictEntry *de;

    de = dictFind(server.cluster->nodes,s);
    sdsfree(s);
    if (de == NULL) return NULL;
    return dictGetVal(de);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x28, %esi
callq 0x38230
movq %rax, -0x18(%rbp)
leaq 0xfb993(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x2dcb0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x38620
cmpq $0x0, -0x20(%rbp)
jne 0x7c877
movq $0x0, -0x8(%rbp)
jmp 0x7c883
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/cluster.c
// Function: createClusterNode
clusterNode *createClusterNode(char *nodename, int flags) {
    clusterNode *node = zmalloc(sizeof(*node));

    if (nodename)
        memcpy(node->name, nodename, CLUSTER_NAMELEN);
    else
        getRandomHexChars(node->name, CLUSTER_NAMELEN);
    node->ctime = mstime();
    node->configEpoch = 0;
    node->flags = flags;
    memset(node->slots,0,sizeof(node->slots));
    node->numslots = 0;
    node->numslaves = 0;
    node->slaves = NULL;
    node->slaveof = NULL;
    node->ping_sent = node->pong_received = 0;
    node->fail_time = 0;
    node->link = NULL;
    memset(node->ip,0,sizeof(node->ip));
    node->port = 0;
    node->fail_reports = listCreate();
    node->voted_time = 0;
    node->orphaned_time = 0;
    node->repl_offset_time = 0;
    node->repl_offset = 0;
    listSetFreeMethod(node->fail_reports,zfree);
    return node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x8d8, %edi            # imm = 0x8D8
callq 0x3acd0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x7c8cc
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movq -0x8(%rbp), %rsi
movl $0x28, %edx
callq 0x26c60
jmp 0x7c8de
movq -0x18(%rbp), %rdi
addq $0x8, %rdi
movl $0x28, %esi
callq 0x47e40
callq 0x2ff70
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x38(%rax)
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x18(%rbp), %rdi
addq $0x40, %rdi
xorl %esi, %esi
movl $0x800, %edx            # imm = 0x800
callq 0x26110
movq -0x18(%rbp), %rax
movl $0x0, 0x840(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x844(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x848(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x850(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x860(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x858(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x868(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8c8(%rax)
movq -0x18(%rbp), %rdi
addq $0x890, %rdi            # imm = 0x890
xorl %esi, %esi
movl $0x2e, %edx
callq 0x26110
movq -0x18(%rbp), %rax
movl $0x0, 0x8c0(%rax)
callq 0x26e20
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8d0(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x870(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x880(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x878(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x888(%rax)
movq -0x18(%rbp), %rax
movq 0x8d0(%rax), %rax
leaq -0x41a73(%rip), %rcx    # 0x3afa0
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/cluster.c
// Function: clusterAddNode
int clusterAddNode(clusterNode *node) {
    int retval;

    retval = dictAdd(server.cluster->nodes,
            sdsnewlen(node->name,CLUSTER_NAMELEN), node);
    return (retval == DICT_OK) ? C_OK : C_ERR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
leaq 0xfb795(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movq 0x18(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movl $0x28, %esi
callq 0x38230
movq -0x18(%rbp), %rdi
movq %rax, %rsi
movq -0x8(%rbp), %rdx
callq 0x2d8c0
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/cluster.c
// Function: clusterNodeAddSlave
int clusterNodeAddSlave(clusterNode *master, clusterNode *slave) {
    int j;

    /* If it's already a slave, don't add it again. */
    for (j = 0; j < master->numslaves; j++)
        if (master->slaves[j] == slave) return C_ERR;
    master->slaves = zrealloc(master->slaves,
        sizeof(clusterNode*)*(master->numslaves+1));
    master->slaves[master->numslaves] = slave;
    master->numslaves++;
    master->flags |= CLUSTER_NODE_MIGRATE_TO;
    return C_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x844(%rcx), %eax
jge 0x7cae8
movq -0x10(%rbp), %rax
movq 0x848(%rax), %rax
movslq -0x1c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
cmpq -0x18(%rbp), %rax
jne 0x7cadb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7cb62
jmp 0x7cadd
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x7caa7
movq -0x10(%rbp), %rax
movq 0x848(%rax), %rdi
movq -0x10(%rbp), %rax
movl 0x844(%rax), %eax
addl $0x1, %eax
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x3ae40
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x848(%rax)
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x848(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x844(%rcx), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x10(%rbp), %rax
movl 0x844(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x844(%rax)
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, 0x30(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/cluster.c
// Function: clusterAddSlot
int clusterAddSlot(clusterNode *n, int slot) {
    if (server.cluster->slots[slot]) return C_ERR;
    clusterNodeSetSlotBit(n,slot);
    server.cluster->slots[slot] = n;
    return C_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq 0xfb652(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movslq -0x14(%rbp), %rcx
cmpq $0x0, 0x40028(%rax,%rcx,8)
je 0x7cba5
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7cbd6
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x833c0
movq -0x10(%rbp), %rdx
leaq 0xfb61c(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, 0x40028(%rax,%rcx,8)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/cluster.c
// Function: clusterGetMaxEpoch
uint64_t clusterGetMaxEpoch(void) {
    uint64_t max = 0;
    dictIterator *di;
    dictEntry *de;

    di = dictGetSafeIterator(server.cluster->nodes);
    while((de = dictNext(di)) != NULL) {
        clusterNode *node = dictGetVal(de);
        if (node->configEpoch > max) max = node->configEpoch;
    }
    dictReleaseIterator(di);
    if (max < server.cluster->currentEpoch) max = server.cluster->currentEpoch;
    return max;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq $0x0, -0x8(%rbp)
leaq 0xfb5e1(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x2e470
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2e4a0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x7cc46
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
cmpq -0x8(%rbp), %rax
jbe 0x7cc44
movq -0x20(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x7cc0b
movq -0x10(%rbp), %rdi
callq 0x2e600
movq -0x8(%rbp), %rax
leaq 0xfb57e(%rip), %rcx     # 0x1781d8
movq 0x9b0(%rcx), %rcx
cmpq 0x8(%rcx), %rax
jae 0x7cc7d
leaq 0xfb56a(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/cluster.c
// Function: clusterGenNodesDescription
sds clusterGenNodesDescription(int filter) {
    sds ci = sdsempty(), ni;
    dictIterator *di;
    dictEntry *de;

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

        if (node->flags & filter) continue;
        ni = clusterGenNodeDescription(node);
        ci = sdscatsds(ci,ni);
        sdsfree(ni);
        ci = sdscatlen(ci,"\n",1);
    }
    dictReleaseIterator(di);
    return ci;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
callq 0x384f0
movq %rax, -0x10(%rbp)
leaq 0xfb31d(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movq 0x18(%rax), %rdi
callq 0x2e470
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2e4a0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x7cf41
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl 0x30(%rax), %eax
andl -0x4(%rbp), %eax
cmpl $0x0, %eax
je 0x7ceff
jmp 0x7cecf
movq -0x30(%rbp), %rdi
callq 0x83680
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x39110
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
callq 0x38620
movq -0x10(%rbp), %rdi
leaq 0xbcf08(%rip), %rsi     # 0x139e39
movl $0x1, %edx
callq 0x39040
movq %rax, -0x10(%rbp)
jmp 0x7cecf
movq -0x20(%rbp), %rdi
callq 0x2e600
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/cluster.c
// Function: clusterLockConfig
int clusterLockConfig(char *filename) {
/* flock() does not exist on Solaris
 * and a fcntl-based solution won't help, as we constantly re-open that file,
 * which will release _all_ locks anyway
 */
#if !defined(__sun)
    /* To lock it, we need to open the file in a way it is created if
     * it does not exist, otherwise there is a race condition with other
     * processes. */
    int fd = open(filename,O_WRONLY|O_CREAT,0644);
    if (fd == -1) {
        serverLog(LL_WARNING,
            "Can't open %s in order to acquire a lock: %s",
            filename, strerror(errno));
        return C_ERR;
    }

    if (flock(fd,LOCK_EX|LOCK_NB) == -1) {
        if (errno == EWOULDBLOCK) {
            serverLog(LL_WARNING,
                 "Sorry, the cluster configuration file %s is already used "
                 "by a different Redis Cluster node. Please make sure that "
                 "different nodes use different cluster configuration "
                 "files.", filename);
        } else {
            serverLog(LL_WARNING,
                "Impossible to lock %s: %s", filename, strerror(errno));
        }
        close(fd);
        return C_ERR;
    }
    /* Lock acquired: leak the 'fd' by not closing it, so that we'll retain the
     * lock to the file as long as the process exists. */
#endif /* __sun */

    return C_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl $0x41, %esi
movl $0x1a4, %edx            # imm = 0x1A4
movb $0x0, %al
callq 0x266a0
movl %eax, -0x14(%rbp)
cmpl $-0x1, -0x14(%rbp)
jne 0x7d091
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
callq 0x26880
movl (%rax), %edi
callq 0x26690
movq -0x20(%rbp), %rdx
movq %rax, %rcx
movl $0x3, %edi
leaq 0xc4812(%rip), %rsi     # 0x141893
movb $0x0, %al
callq 0x2fc60
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7d10c
movl -0x14(%rbp), %edi
movl $0x6, %esi
callq 0x26660
cmpl $-0x1, %eax
jne 0x7d105
callq 0x26880
cmpl $0xb, (%rax)
jne 0x7d0c6
movq -0x10(%rbp), %rdx
movl $0x3, %edi
leaq 0xc4803(%rip), %rsi     # 0x1418c0
movb $0x0, %al
callq 0x2fc60
jmp 0x7d0f4
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x26880
movl (%rax), %edi
callq 0x26690
movq -0x28(%rbp), %rdx
movq %rax, %rcx
movl $0x3, %edi
leaq 0xc4880(%rip), %rsi     # 0x14196d
movb $0x0, %al
callq 0x2fc60
movl -0x14(%rbp), %edi
callq 0x26180
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x7d10c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/cluster.c
// Function: clusterAcceptHandler
void clusterAcceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
    int cport, cfd;
    int max = MAX_CLUSTER_ACCEPTS_PER_CALL;
    char cip[NET_IP_STR_LEN];
    clusterLink *link;
    UNUSED(el);
    UNUSED(mask);
    UNUSED(privdata);

    /* If the server is starting up, don't accept cluster connections:
     * UPDATE messages may interact with the database content. */
    if (server.masterhost == NULL && server.loading) return;

    while(max--) {
        cfd = anetTcpAccept(server.neterr, fd, cip, sizeof(cip), &cport);
        if (cfd == ANET_ERR) {
            if (errno != EWOULDBLOCK)
                serverLog(LL_VERBOSE,
                    "Error accepting cluster node: %s", server.neterr);
            return;
        }
        anetNonBlock(NULL,cfd);
        anetEnableTcpNoDelay(NULL,cfd);

        /* Use non-blocking I/O for cluster messages. */
        serverLog(LL_VERBOSE,"Accepted cluster node %s:%d", cip, cport);
        /* Create a link object we use to handle the connection.
         * It gets passed to the readable handler when data is available.
         * Initiallly the link->node pointer is set to NULL as we don't know
         * which node is, but the right node is references once we know the
         * node identity. */
        link = createClusterLink(NULL);
        link->fd = cfd;
        aeCreateFileEvent(server.el,cfd,AE_READABLE,clusterReadHandler,link);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movl $0x3e8, -0x28(%rbp)     # imm = 0x3E8
leaq 0xfac74(%rip), %rax     # 0x1781d8
cmpq $0x0, 0x828(%rax)
jne 0x7d583
leaq 0xfac63(%rip), %rax     # 0x1781d8
cmpl $0x0, 0x31c(%rax)
je 0x7d583
jmp 0x7d663
jmp 0x7d585
movl -0x28(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x28(%rbp)
cmpl $0x0, %eax
je 0x7d663
movl -0xc(%rbp), %esi
leaq -0x60(%rbp), %rdx
leaq 0xfac31(%rip), %rdi     # 0x1781d8
addq $0x208, %rdi            # imm = 0x208
movl $0x2e, %ecx
leaq -0x20(%rbp), %r8
callq 0x2c9e0
movl %eax, -0x24(%rbp)
cmpl $-0x1, -0x24(%rbp)
jne 0x7d5f2
callq 0x26880
cmpl $0xb, (%rax)
je 0x7d5f0
movl $0x1, %edi
leaq 0xc44f9(%rip), %rsi     # 0x141ad4
leaq 0xfabf6(%rip), %rdx     # 0x1781d8
addq $0x208, %rdx            # imm = 0x208
movb $0x0, %al
callq 0x2fc60
jmp 0x7d663
movl -0x24(%rbp), %esi
xorl %eax, %eax
movl %eax, %edi
callq 0x2b860
movl -0x24(%rbp), %esi
xorl %eax, %eax
movl %eax, %edi
callq 0x2ba60
leaq -0x60(%rbp), %rdx
movl -0x20(%rbp), %ecx
movl $0x1, %edi
leaq 0xc44d8(%rip), %rsi     # 0x141af5
movb $0x0, %al
callq 0x2fc60
xorl %eax, %eax
movl %eax, %edi
callq 0x7db80
movq %rax, -0x68(%rbp)
movl -0x24(%rbp), %ecx
movq -0x68(%rbp), %rax
movl %ecx, 0x8(%rax)
leaq 0xfab96(%rip), %rax     # 0x1781d8
movq 0x40(%rax), %rdi
movl -0x24(%rbp), %esi
movq -0x68(%rbp), %r8
movl $0x1, %edx
leaq 0x647(%rip), %rcx       # 0x7dca0
callq 0x2a8f0
jmp 0x7d585
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/cluster.c
// Function: resetManualFailover
void resetManualFailover(void) {
    if (server.cluster->mf_end && clientsArePaused()) {
        server.clients_pause_end_time = 0;
        clientsArePaused(); /* Just use the side effect of the function. */
    }
    server.cluster->mf_end = 0; /* No manual failover in progress. */
    server.cluster->mf_can_start = 0;
    server.cluster->mf_slave = NULL;
    server.cluster->mf_master_offset = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0xfab5d(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
cmpq $0x0, 0x60058(%rax)
je 0x7d6ad
callq 0x454e0
cmpl $0x0, %eax
je 0x7d6ad
leaq 0xfab3b(%rip), %rax     # 0x1781d8
movq $0x0, 0x200(%rax)
callq 0x454e0
leaq 0xfab24(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movq $0x0, 0x60058(%rax)
leaq 0xfab0b(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movl $0x0, 0x60070(%rax)
leaq 0xfaaf3(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movq $0x0, 0x60060(%rax)
leaq 0xfaada(%rip), %rax     # 0x1781d8
movq 0x9b0(%rax), %rax
movq $0x0, 0x60068(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/cluster.c
// Function: clusterSetNodeAsMaster
void clusterSetNodeAsMaster(clusterNode *n) {
    if (nodeIsMaster(n)) return;

    if (n->slaveof) {
        clusterNodeRemoveSlave(n->slaveof,n);
        if (n != myself) n->flags |= CLUSTER_NODE_MIGRATE_TO;
    }
    n->flags &= ~CLUSTER_NODE_SLAVE;
    n->flags |= CLUSTER_NODE_MASTER;
    n->slaveof = NULL;

    /* Update config and state. */
    clusterDoBeforeSleep(CLUSTER_TODO_SAVE_CONFIG|
                         CLUSTER_TODO_UPDATE_STATE);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x7d8ed
jmp 0x7d961
movq -0x8(%rbp), %rax
cmpq $0x0, 0x850(%rax)
je 0x7d92e
movq -0x8(%rbp), %rax
movq 0x850(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x7e230
movq -0x8(%rbp), %rax
cmpq 0x10f246(%rip), %rax    # 0x18cb60
je 0x7d92c
movq -0x8(%rbp), %rax
movl 0x30(%rax), %ecx
orl $0x100, %ecx            # imm = 0x100
movl %ecx, 0x30(%rax)
jmp 0x7d92e
movq -0x8(%rbp), %rax
movl 0x30(%rax), %ecx
andl $-0x3, %ecx
movl %ecx, 0x30(%rax)
movq -0x8(%rbp), %rax
movl 0x30(%rax), %ecx
orl $0x1, %ecx
movl %ecx, 0x30(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x850(%rax)
movl $0x6, %edi
callq 0x7db50
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)