LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/debug.c
// Function: xorDigest
void xorDigest(unsigned char *digest, void *ptr, size_t len) {
    SHA1_CTX ctx;
    unsigned char hash[20], *s = ptr;
    int j;

    SHA1Init(&ctx);
    SHA1Update(&ctx,s,len);
    SHA1Final(hash,&ctx);

    for (j = 0; j < 20; j++)
        digest[j] ^= hash[j];
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x1c(%rsp), %r12
movq %r12, %rdi
callq 0x34e69
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x34e81
movq %rsp, %rdi
movq %r12, %rsi
callq 0x34f29
xorl %eax, %eax
cmpq $0x14, %rax
je 0x57495
movb (%rsp,%rax), %cl
xorb %cl, (%rbx,%rax)
incq %rax
jmp 0x57484
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/debug.c
// Function: mixDigest
void mixDigest(unsigned char *digest, void *ptr, size_t len) {
    SHA1_CTX ctx;
    char *s = ptr;

    xorDigest(digest,s,len);
    SHA1Init(&ctx);
    SHA1Update(&ctx,digest,20);
    SHA1Final(digest,&ctx);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
callq 0x57448
leaq 0xc(%rsp), %r14
movq %r14, %rdi
callq 0x34e69
pushq $0x14
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x34e81
movq %rbx, %rdi
movq %r14, %rsi
callq 0x34f29
addq $0x68, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/debug.c
// Function: serverAssert
void _serverAssert(char *estr, char *file, int line) {
    bugReportStart();
    serverLog(LL_WARNING,"=== ASSERTION FAILED ===");
    serverLog(LL_WARNING,"==> %s:%d '%s' is not true",file,line,estr);
#ifdef HAVE_BACKTRACE
    server.assert_failed = estr;
    server.assert_file = file;
    server.assert_line = line;
    serverLog(LL_WARNING,"(forcing SIGSEGV to print the bug report.)");
#endif
    *((char*)-1) = 'x';
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
callq 0x5892e
leaq 0x600fb(%rip), %rsi     # 0xb7bde
pushq $0x3
popq %rbp
movl %ebp, %edi
xorl %eax, %eax
callq 0x2b699
leaq 0x60101(%rip), %rsi     # 0xb7bf7
movl %ebp, %edi
movq %r14, %rdx
movl %ebx, %ecx
movq %r15, %r8
xorl %eax, %eax
callq 0x2b699
leaq 0xa1d9a(%rip), %rax     # 0xf98a8
movq %r15, 0xa28(%rax)
movq %r14, 0xa30(%rax)
movl %ebx, 0xa38(%rax)
leaq 0x600e9(%rip), %rsi     # 0xb7c12
movl %ebp, %edi
xorl %eax, %eax
callq 0x2b699
movb $0x78, -0x1
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/debug.c
// Function: serverPanic
void _serverPanic(char *msg, char *file, int line) {
    bugReportStart();
    serverLog(LL_WARNING,"------------------------------------------------");
    serverLog(LL_WARNING,"!!! Software Failure. Press left mouse button to continue");
    serverLog(LL_WARNING,"Guru Meditation: %s #%s:%d",msg,file,line);
#ifdef HAVE_BACKTRACE
    serverLog(LL_WARNING,"(forcing SIGSEGV in order to print the stack trace)");
#endif
    serverLog(LL_WARNING,"------------------------------------------------");
    *((char*)-1) = 'x';
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %r12
callq 0x5892e
leaq 0x60268(%rip), %rbx     # 0xb7dca
pushq $0x3
popq %rbp
movl %ebp, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2b699
leaq 0x60283(%rip), %rsi     # 0xb7dfb
movl %ebp, %edi
xorl %eax, %eax
callq 0x2b699
leaq 0x602ad(%rip), %rsi     # 0xb7e35
movl %ebp, %edi
movq %r12, %rdx
movq %r15, %rcx
movl %r14d, %r8d
xorl %eax, %eax
callq 0x2b699
leaq 0x602af(%rip), %rsi     # 0xb7e50
movl %ebp, %edi
xorl %eax, %eax
callq 0x2b699
movl %ebp, %edi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x2b699
movb $0x78, -0x1
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/debug.c
// Function: bugReportStart
void bugReportStart(void) {
    if (server.bug_report_start == 0) {
        serverLogRaw(LL_WARNING|LL_RAW,
        "\n\n=== REDIS BUG REPORT START: Cut & paste starting from here ===\n");
        server.bug_report_start = 1;
    }
}

// Assembly:
pushq %rbx
leaq 0xa0f72(%rip), %rbx     # 0xf98a8
cmpl $0x0, 0xa3c(%rbx)
jne 0x5895a
leaq 0x5f53e(%rip), %rsi     # 0xb7e84
movl $0x403, %edi            # imm = 0x403
callq 0x2b51f
movl $0x1, 0xa3c(%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/debug.c
// Function: serverAssertPrintClientInfo
void _serverAssertPrintClientInfo(client *c) {
    int j;

    bugReportStart();
    serverLog(LL_WARNING,"=== ASSERTION FAILED CLIENT CONTEXT ===");
    serverLog(LL_WARNING,"client->flags = %d", c->flags);
    serverLog(LL_WARNING,"client->fd = %d", c->fd);
    serverLog(LL_WARNING,"client->argc = %d", c->argc);
    for (j=0; j < c->argc; j++) {
        char buf[128];
        char *arg;

        if (c->argv[j]->type == OBJ_STRING && sdsEncodedObject(c->argv[j])) {
            arg = (char*) c->argv[j]->ptr;
        } else {
            snprintf(buf,sizeof(buf),"Object type: %u, encoding: %u",
                c->argv[j]->type, c->argv[j]->encoding);
            arg = buf;
        }
        serverLog(LL_WARNING,"client->argv[%d] = \"%s\" (refcount: %d)",
            j, arg, c->argv[j]->refcount);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
callq 0x5892e
leaq 0x5f2c1(%rip), %rsi     # 0xb7c3d
pushq $0x3
popq %rbp
movl %ebp, %edi
xorl %eax, %eax
callq 0x2b699
movl 0x98(%rbx), %edx
leaq 0x5f2d0(%rip), %rsi     # 0xb7c65
movl %ebp, %edi
xorl %eax, %eax
callq 0x2b699
movl 0x8(%rbx), %edx
leaq 0x5f2d0(%rip), %rsi     # 0xb7c78
movl %ebp, %edi
xorl %eax, %eax
callq 0x2b699
movl 0x38(%rbx), %edx
leaq 0x5f2cd(%rip), %rsi     # 0xb7c88
movl %ebp, %edi
xorl %eax, %eax
callq 0x2b699
leaq 0x5f2ed(%rip), %r14     # 0xb7cb8
leaq 0x5f2c8(%rip), %r15     # 0xb7c9a
movq %rsp, %r12
xorl %r13d, %r13d
movslq 0x38(%rbx), %rax
cmpq %rax, %r13
jge 0x58a3c
movq 0x40(%rbx), %rax
movq (%rax,%r13,8), %rax
movl (%rax), %ecx
movl %ecx, %r8d
shrl $0x4, %r8d
andl $0xf, %r8d
andl $0xf, %ecx
je 0x58a1a
movl $0x80, %esi
movq %r12, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x26120
movq 0x40(%rbx), %rax
movq (%rax,%r13,8), %rax
movq %r12, %rcx
jmp 0x58a24
testb $0x7, %r8b
jne 0x589fb
movq 0x8(%rax), %rcx
movl 0x4(%rax), %r8d
movl %ebp, %edi
movq %r14, %rsi
movl %r13d, %edx
xorl %eax, %eax
callq 0x2b699
incq %r13
jmp 0x589d8
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/debug.c
// Function: serverLogObjectDebugInfo
void serverLogObjectDebugInfo(robj *o) {
    serverLog(LL_WARNING,"Object type: %d", o->type);
    serverLog(LL_WARNING,"Object encoding: %d", o->encoding);
    serverLog(LL_WARNING,"Object refcount: %d", o->refcount);
    if (o->type == OBJ_STRING && sdsEncodedObject(o)) {
        serverLog(LL_WARNING,"Object raw string len: %zu", sdslen(o->ptr));
        if (sdslen(o->ptr) < 4096) {
            sds repr = sdscatrepr(sdsempty(),o->ptr,sdslen(o->ptr));
            serverLog(LL_WARNING,"Object raw string content: %s", repr);
            sdsfree(repr);
        }
    } else if (o->type == OBJ_LIST) {
        serverLog(LL_WARNING,"List length: %d", (int) listTypeLength(o));
    } else if (o->type == OBJ_SET) {
        serverLog(LL_WARNING,"Set size: %d", (int) setTypeSize(o));
    } else if (o->type == OBJ_HASH) {
        serverLog(LL_WARNING,"Hash size: %d", (int) hashTypeLength(o));
    } else if (o->type == OBJ_ZSET) {
        serverLog(LL_WARNING,"Sorted set size: %d", (int) zsetLength(o));
        if (o->encoding == OBJ_ENCODING_SKIPLIST)
            serverLog(LL_WARNING,"Skiplist level: %d", (int) ((zset*)o->ptr)->zsl->level);
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edx
andl $0xf, %edx
leaq 0x5f27e(%rip), %rsi     # 0xb7cdf
pushq $0x3
popq %rbp
movl %ebp, %edi
xorl %eax, %eax
callq 0x2b699
movl (%rbx), %edx
shrl $0x4, %edx
andl $0xf, %edx
leaq 0x5f273(%rip), %rsi     # 0xb7cef
movl %ebp, %edi
xorl %eax, %eax
callq 0x2b699
movl 0x4(%rbx), %edx
leaq 0x5f274(%rip), %rsi     # 0xb7d03
movl %ebp, %edi
xorl %eax, %eax
callq 0x2b699
movl (%rbx), %eax
movl %eax, %ecx
andl $0xf, %ecx
cmpl $0x4, %ecx
ja 0x58b9a
leaq 0x5e6f5(%rip), %rdx     # 0xb71a4
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
shrl $0x4, %eax
testb $0x7, %al
jne 0x58b9a
movq 0x8(%rbx), %rdi
callq 0x574db
leaq 0x5f244(%rip), %rsi     # 0xb7d17
pushq $0x3
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2b699
movq 0x8(%rbx), %rdi
callq 0x574db
cmpq $0xfff, %rax            # imm = 0xFFF
ja 0x58b9a
callq 0x3114c
movq %rax, %r14
movq 0x8(%rbx), %rbx
movq %rbx, %rdi
callq 0x574db
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x321f1
movq %rax, %rbx
leaq 0x5f211(%rip), %rsi     # 0xb7d32
pushq $0x3
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2b699
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x311c8
movq %rbx, %rdi
callq 0x4cbe1
leaq 0x5f224(%rip), %rsi     # 0xb7d6d
jmp 0x58bae
movq %rbx, %rdi
callq 0x461ae
leaq 0x5f206(%rip), %rsi     # 0xb7d60
jmp 0x58bae
movq %rbx, %rdi
callq 0x490f5
leaq 0x5f210(%rip), %rsi     # 0xb7d7b
pushq $0x3
popq %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x2b699
movl $0xf0, %eax
andl (%rbx), %eax
cmpl $0x70, %eax
jne 0x58b9a
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rax
movl 0x18(%rax), %edx
leaq 0x5f1fa(%rip), %rsi     # 0xb7d8f
pushq $0x3
popq %rdi
jmp 0x58bb3
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0x4427e
leaq 0x5f1a2(%rip), %rsi     # 0xb7d50
pushq $0x3
popq %rdi
movl %eax, %edx
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
jmp 0x2b699
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/debug.c
// Function: logStackContent
void logStackContent(void **sp) {
    int i;
    for (i = 15; i >= 0; i--) {
        unsigned long addr = (unsigned long) sp+i;
        unsigned long val = (unsigned long) sp[i];

        if (sizeof(long) == 4)
            serverLog(LL_WARNING, "(%08lx) -> %08lx", addr, val);
        else
            serverLog(LL_WARNING, "(%016lx) -> %016lx", addr, val);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0xf
popq %r15
leaq 0x5f2d0(%rip), %r14     # 0xb7ec6
pushq $0x3
popq %rbp
testl %r15d, %r15d
js 0x58c19
movl %r15d, %edx
movq (%rbx,%rdx,8), %rcx
addq %rbx, %rdx
movl %ebp, %edi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2b699
decl %r15d
jmp 0x58bf9
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/debug.c
// Function: openDirectLogFiledes
int openDirectLogFiledes(void) {
    int log_to_stdout = server.logfile[0] == '\0';
    int fd = log_to_stdout ?
        STDOUT_FILENO :
        open(server.logfile, O_APPEND|O_CREAT|O_WRONLY, 0644);
    return fd;
}

// Assembly:
leaq 0xa0b53(%rip), %rax     # 0xf98a8
movq 0x7a0(%rax), %rdi
cmpb $0x0, (%rdi)
je 0x58d72
movl $0x441, %esi            # imm = 0x441
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
jmp 0x26690
pushq $0x1
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/debug.c
// Function: logStackTrace
void logStackTrace(ucontext_t *uc) {
    void *trace[101];
    int trace_size = 0, fd = openDirectLogFiledes();

    if (fd == -1) return; /* If we can't log there is anything to do. */

    /* Generate the stack trace */
    trace_size = backtrace(trace+1, 100);

    if (getMcontextEip(uc) != NULL) {
        char *msg1 = "EIP:\n";
        char *msg2 = "\nBacktrace:\n";
        if (write(fd,msg1,strlen(msg1)) == -1) {/* Avoid warning. */};
        trace[0] = getMcontextEip(uc);
        backtrace_symbols_fd(trace, 1, fd);
        if (write(fd,msg2,strlen(msg2)) == -1) {/* Avoid warning. */};
    }

    /* Write symbols to log file */
    backtrace_symbols_fd(trace+1, trace_size, fd);

    /* Cleanup */
    closeDirectLogFiledes(fd);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x328, %rsp            # imm = 0x328
movq %rdi, %r15
callq 0x58d4e
cmpl $-0x1, %eax
je 0x58e12
movl %eax, %ebx
leaq 0x8(%rsp), %r14
pushq $0x64
popq %rsi
movq %r14, %rdi
callq 0x26140
movl %eax, %ebp
cmpq $0x0, 0xa8(%r15)
je 0x58dff
leaq 0x5f1fb(%rip), %rsi     # 0xb7fc8
pushq $0x5
popq %rdx
movl %ebx, %edi
callq 0x26bb0
movq 0xa8(%r15), %rax
movq %rsp, %rdi
movq %rax, (%rdi)
pushq $0x1
popq %rsi
movl %ebx, %edx
callq 0x26a00
leaq 0x5f1d9(%rip), %rsi     # 0xb7fce
pushq $0xc
popq %rdx
movl %ebx, %edi
callq 0x26bb0
movq %r14, %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0x26a00
movl %ebx, %edi
callq 0x58d76
addq $0x328, %rsp            # imm = 0x328
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/debug.c
// Function: logCurrentClient
void logCurrentClient(void) {
    if (server.current_client == NULL) return;

    client *cc = server.current_client;
    sds client;
    int j;

    serverLogRaw(LL_WARNING|LL_RAW, "\n------ CURRENT CLIENT INFO ------\n");
    client = catClientInfoString(sdsempty(),cc);
    serverLog(LL_WARNING|LL_RAW,"%s\n", client);
    sdsfree(client);
    for (j = 0; j < cc->argc; j++) {
        robj *decoded;

        decoded = getDecodedObject(cc->argv[j]);
        serverLog(LL_WARNING|LL_RAW,"argv[%d]: '%s'\n", j,
            (char*)decoded->ptr);
        decrRefCount(decoded);
    }
    /* Check if the first argument, usually a key, is found inside the
     * selected DB, and if so print info about the associated object. */
    if (cc->argc >= 1) {
        robj *val, *key;
        dictEntry *de;

        key = getDecodedObject(cc->argv[1]);
        de = dictFind(cc->db->dict, key->ptr);
        if (de) {
            val = dictGetVal(de);
            serverLog(LL_WARNING,"key '%s' found in DB containing the following object:", (char*)key->ptr);
            serverLogObjectDebugInfo(val);
        }
        decrRefCount(key);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0xa0a79(%rip), %rax     # 0xf98a8
movq 0x1f0(%rax), %rbx
testq %rbx, %rbx
je 0x58f24
leaq 0x5f195(%rip), %rsi     # 0xb7fdb
movl $0x403, %edi            # imm = 0x403
callq 0x2b51f
callq 0x3114c
movq %rax, %rdi
movq %rbx, %rsi
callq 0x383ac
movq %rax, %r14
leaq 0x6b398(%rip), %rsi     # 0xc4202
movl $0x403, %edi            # imm = 0x403
movq %rax, %rdx
xorl %eax, %eax
callq 0x2b699
movq %r14, %rdi
callq 0x311c8
leaq 0x5f177(%rip), %r14     # 0xb7fff
xorl %r15d, %r15d
movslq 0x38(%rbx), %rax
cmpq %rax, %r15
jge 0x58ec7
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x3a57d
movq %rax, %r12
movq 0x8(%rax), %rcx
movl $0x403, %edi            # imm = 0x403
movq %r14, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x2b699
movq %r12, %rdi
callq 0x3a265
incq %r15
jmp 0x58e8b
testl %eax, %eax
jle 0x58f24
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rdi
callq 0x3a57d
movq %rax, %r14
movq 0x10(%rbx), %rax
movq (%rax), %rdi
movq 0x8(%r14), %rsi
callq 0x2a5f9
testq %rax, %rax
je 0x58f11
movq 0x8(%rax), %rbx
movq 0x8(%r14), %rdx
leaq 0x5f110(%rip), %rsi     # 0xb800f
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x2b699
movq %rbx, %rdi
callq 0x58a4e
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3a265
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x838, %rsp            # imm = 0x838
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x30(%rsp), %rdi
movl $0x800, %edx            # imm = 0x800
xorl %esi, %esi
callq 0x26110
cmpq $0x5, %rbx
jae 0x5919a
addq $0x838, %rsp            # imm = 0x838
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $-0x4, %rbx
leaq 0x5(%r14), %rbp
leaq 0x10(%rsp), %r15
xorl %r12d, %r12d
movq %rbp, 0x8(%rsp)
cmpq %rbx, %r12
jae 0x59188
cmpb $-0x18, (%r14,%r12)
jne 0x5921c
movslq 0x1(%r14,%r12), %r13
leaq (%r12,%rbp), %rax
addq %rax, %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x26860
testl %eax, %eax
setne %al
movq 0x20(%rsp), %rdx
testq %rdx, %rdx
setne %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x5921c
movq %r15, %rbp
movzbl %r13b, %r15d
movl %r15d, %eax
cmpq %r13, 0x30(%rsp,%rax,8)
je 0x59210
leaq 0x5eea6(%rip), %rdi     # 0xb80a7
movq %r13, %rsi
xorl %eax, %eax
callq 0x260a0
movq %r13, 0x30(%rsp,%r15,8)
addq $0x4, %r12
movq %rbp, %r15
movq 0x8(%rsp), %rbp
incq %r12
jmp 0x591af
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %rdx
movl %edi, %ebx
leaq 0x5ef78(%rip), %rsi     # 0xb8450
xorl %r13d, %r13d
xorl %eax, %eax
callq 0x2b699
orl $0x400, %ebx            # imm = 0x400
movl %ebx, 0x4(%rsp)
leaq -0x1(%r14), %rbp
leaq 0x10(%rsp), %r12
leaq 0x5efa4(%rip), %rbx     # 0xb84a0
movq %r12, %rcx
negq %rcx
movq %rcx, 0x8(%rsp)
cmpq %r13, %r14
je 0x59564
movzbl (%r15,%r13), %ecx
shrl $0x4, %ecx
movb (%rcx,%rbx), %cl
movb %cl, (%r12)
movzbl (%r15,%r13), %ecx
andl $0xf, %ecx
movb (%rcx,%rbx), %cl
movb %cl, 0x1(%r12)
movb $0x0, 0x2(%r12)
cmpq %r13, %rbp
je 0x5954e
movq 0x8(%rsp), %rcx
addq %r12, %rcx
addq $0x2, %rcx
cmpq $0x40, %rcx
je 0x5954e
addq $0x2, %r12
jmp 0x5955f
movl 0x4(%rsp), %edi
leaq 0x10(%rsp), %r12
movq %r12, %rsi
callq 0x2b51f
incq %r13
jmp 0x59507
leaq 0x5784e(%rip), %rsi     # 0xb0db9
movl 0x4(%rsp), %edi
callq 0x2b51f
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rbx
pushq %rax
movq %rdx, %rbx
leaq 0x5eedb(%rip), %rsi     # 0xb846b
pushq $0x3
popq %rbp
movl %ebp, %edi
callq 0x2b754
movq %rbx, %rdi
callq 0x58d8e
leaq 0x5eee2(%rip), %rsi     # 0xb848b
movl %ebp, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2b754
// File: /workspace/github_c_makefile_star2_O2/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:
subq $0x28, %rsp
movl %edi, %eax
movl $0x3e8, %ecx            # imm = 0x3E8
cltd
idivl %ecx
cltq
movq %rsp, %rsi
movq %rax, 0x10(%rsi)
imull $0x3e8, %edx, %eax      # imm = 0x3E8
cltq
movq %rax, 0x18(%rsi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rsi)
xorl %edi, %edi
xorl %edx, %edx
callq 0x26380
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x98, %rsp
movl %edi, %ebx
leaq 0xa02a5(%rip), %r15     # 0xf98a8
cmpl $0x0, 0xa40(%r15)
jne 0x5963d
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x26ac0
movl $0x8000004, 0x80(%r14) # imm = 0x8000004
leaq -0xa9(%rip), %rax       # 0x59583
movq %rax, -0x8(%r14)
pushq $0xe
popq %rdi
movq %rsp, %rsi
xorl %edx, %edx
callq 0x266c0
movl $0x3e8, %eax            # imm = 0x3E8
xorl %edx, %edx
idivl 0x20(%r15)
movl %eax, %ebp
addl %eax, %ebp
cmpl %ebx, %ebp
cmovlel %ebx, %ebp
movl %ebp, %edi
callq 0x595b6
movl %ebp, 0xa40(%r15)
addq $0x98, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
subq $0x98, %rsp
leaq 0xa022a(%rip), %r14     # 0xf98a8
cmpl $0x0, 0xa40(%r14)
je 0x596c0
xorl %edi, %edi
callq 0x595b6
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x26ac0
andl $0x0, 0x80(%rbx)
movq $0x1, -0x8(%rbx)
pushq $0xe
popq %rdi
movq %rsp, %rsi
xorl %edx, %edx
callq 0x266c0
andl $0x0, 0xa40(%r14)
addq $0x98, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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
pushq %rbx
pushq %rax
movq %rsi, %rbx
movl %edi, %ebp
pushq $0x10
popq %rdi
callq 0x327b9
movl %ebp, (%rax)
movq %rbx, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/sort.c
// Function: sortCompare
int sortCompare(const void *s1, const void *s2) {
    const redisSortObject *so1 = s1, *so2 = s2;
    int cmp;

    if (!server.sort_alpha) {
        /* Numeric sorting. Here it's trivial as we precomputed scores */
        if (so1->u.score > so2->u.score) {
            cmp = 1;
        } else if (so1->u.score < so2->u.score) {
            cmp = -1;
        } else {
            /* Objects have the same score, but we don't want the comparison
             * to be undefined, so we compare objects lexicographically.
             * This way the result of SORT is deterministic. */
            cmp = compareStringObjects(so1->obj,so2->obj);
        }
    } else {
        /* Alphanumeric sorting */
        if (server.sort_bypattern) {
            if (!so1->u.cmpobj || !so2->u.cmpobj) {
                /* At least one compare object is NULL */
                if (so1->u.cmpobj == so2->u.cmpobj)
                    cmp = 0;
                else if (so1->u.cmpobj == NULL)
                    cmp = -1;
                else
                    cmp = 1;
            } else {
                /* We have both the objects, compare them. */
                if (server.sort_store) {
                    cmp = compareStringObjects(so1->u.cmpobj,so2->u.cmpobj);
                } else {
                    /* Here we can use strcoll() directly as we are sure that
                     * the objects are decoded string objects. */
                    cmp = strcoll(so1->u.cmpobj->ptr,so2->u.cmpobj->ptr);
                }
            }
        } else {
            /* Compare elements directly. */
            if (server.sort_store) {
                cmp = compareStringObjects(so1->obj,so2->obj);
            } else {
                cmp = collateStringObjects(so1->obj,so2->obj);
            }
        }
    }
    return server.sort_desc ? -cmp : cmp;
}

// Assembly:
pushq %rbx
leaq 0x9ffa0(%rip), %rbx     # 0xf98a8
cmpl $0x0, 0x934(%rbx)
je 0x59944
cmpl $0x0, 0x938(%rbx)
je 0x59958
movq 0x8(%rdi), %rdi
movq 0x8(%rsi), %rsi
testq %rdi, %rdi
je 0x59979
testq %rsi, %rsi
je 0x5998b
cmpl $0x0, 0x93c(%rbx)
jne 0x59984
movq 0x8(%rdi), %rdi
movq 0x8(%rsi), %rsi
callq 0x260e0
jmp 0x59998
movsd 0x8(%rdi), %xmm0
movsd 0x8(%rsi), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x5996e
pushq $0x1
jmp 0x59976
cmpl $0x0, 0x93c(%rbx)
movq (%rdi), %rdi
movq (%rsi), %rsi
jne 0x59984
callq 0x3a70a
jmp 0x59998
ucomisd %xmm0, %xmm1
jbe 0x5997e
pushq $-0x1
popq %rax
jmp 0x59998
pushq $-0x1
popq %rcx
jmp 0x59990
movq (%rdi), %rdi
movq (%rsi), %rsi
callq 0x3a702
jmp 0x59998
pushq $0x1
popq %rcx
xorl %esi, %esi
xorl %eax, %eax
cmpq %rsi, %rdi
cmovnel %ecx, %eax
movl %eax, %ecx
negl %ecx
cmpl $0x0, 0x930(%rbx)
cmovel %eax, %ecx
movl %ecx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/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 %rax
pushq $0x8
popq %rdi
callq 0x327b9
movq $0x2, (%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %rbx
leaq -0x80000000(%rsi), %rcx
movswq %r13w, %rax
xorl %edx, %edx
cmpq %rsi, %rax
setne %dl
leal 0x2(,%rdx,2), %eax
testq %r15, %r15
je 0x5a698
movb $0x1, (%r15)
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rcx
pushq $0x8
popq %rcx
cmovbl %ecx, %eax
movl (%rbx), %r12d
cmpl %eax, %r12d
jae 0x5a714
movslq 0x4(%rbx), %r14
movq %r13, 0x10(%rsp)
shrq $0x3f, %r13
movl %eax, (%rbx)
leal 0x1(%r14), %esi
movq %rbx, %rdi
callq 0x5a846
movq %rax, %rbx
leal (%r14,%r13), %ebp
decl %ebp
movzbl %r12b, %r15d
movq %r14, %r13
subq $0x1, %r13
jb 0x5a733
cmpb $0x4, %r12b
je 0x5a6f6
cmpl $0x8, %r15d
jne 0x5a6fd
movq (%rbx,%r14,8), %rdx
jmp 0x5a703
movslq 0x8(%rbx,%r13,4), %rdx
jmp 0x5a703
movswq 0x8(%rbx,%r13,2), %rdx
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5a89e
decl %ebp
movq %r13, %r14
jmp 0x5a6de
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x5a7aa
testb %al, %al
je 0x5a745
testq %r15, %r15
je 0x5a77b
movb $0x0, (%r15)
jmp 0x5a77b
movq 0x10(%rsp), %rdx
testq %rdx, %rdx
js 0x5a78d
movl 0x4(%rbx), %esi
movq %rbx, %rdi
jmp 0x5a773
movl 0x4(%rbx), %esi
incl %esi
movq %rbx, %rdi
callq 0x5a846
movq %rax, %rbx
movl 0xc(%rsp), %esi
cmpl 0x4(%rax), %esi
jae 0x5a76d
leal 0x1(%rsi), %edx
movq %rbx, %rdi
callq 0x5a852
movl 0xc(%rsp), %esi
movq %rbx, %rdi
movq %r13, %rdx
callq 0x5a89e
incl 0x4(%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl (%rbx), %eax
cmpl $0x4, %eax
je 0x5a79f
cmpl $0x8, %eax
jne 0x5a7a4
movq %rdx, 0x8(%rbx)
jmp 0x5a778
movl %edx, 0x8(%rbx)
jmp 0x5a778
movw %dx, 0x8(%rbx)
jmp 0x5a778
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/intset.c
// Function: intsetSearch
static uint8_t intsetSearch(intset *is, int64_t value, uint32_t *pos) {
    int min = 0, max = intrev32ifbe(is->length)-1, mid = -1;
    int64_t cur = -1;

    /* The value can never be found when the set is empty */
    if (intrev32ifbe(is->length) == 0) {
        if (pos) *pos = 0;
        return 0;
    } else {
        /* Check for the case where we know we cannot find the value,
         * but do know the insert position. */
        if (value > _intsetGet(is,intrev32ifbe(is->length)-1)) {
            if (pos) *pos = intrev32ifbe(is->length);
            return 0;
        } else if (value < _intsetGet(is,0)) {
            if (pos) *pos = 0;
            return 0;
        }
    }

    while(max >= min) {
        mid = ((unsigned int)min + (unsigned int)max) >> 1;
        cur = _intsetGet(is,mid);
        if (value > cur) {
            min = mid+1;
        } else if (value < cur) {
            max = mid-1;
        } else {
            break;
        }
    }

    if (value == cur) {
        if (pos) *pos = mid;
        return 1;
    } else {
        if (pos) *pos = min;
        return 0;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movl 0x4(%rdi), %ebp
movl %ebp, %r12d
subl $0x1, %r12d
jae 0x5a7cd
xorl %ebp, %ebp
movl $0x0, %eax
jmp 0x5a830
movq %rsi, %r14
movq %rdi, %r15
movl %r12d, %esi
callq 0x5a99d
cmpq %r14, %rax
jge 0x5a7e4
xorl %eax, %eax
jmp 0x5a830
xorl %ebp, %ebp
movq %r15, %rdi
xorl %esi, %esi
callq 0x5a99d
cmpq %r14, %rax
jg 0x5a7c4
pushq $-0x1
popq %rax
pushq $-0x1
popq %r13
cmpl %ebp, %r12d
jl 0x5a826
leal (%r12,%rbp), %r13d
shrl %r13d
movq %r15, %rdi
movl %r13d, %esi
callq 0x5a99d
cmpq %r14, %rax
jl 0x5a820
jle 0x5a826
leal -0x1(%r13), %r12d
jmp 0x5a7fc
leal 0x1(%r13), %ebp
jmp 0x5a7fc
cmpq %r14, %rax
sete %al
cmovel %r13d, %ebp
testq %rbx, %rbx
je 0x5a837
movl %ebp, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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:
movl %edx, %eax
movl (%rdi), %r9d
movl 0x4(%rdi), %edx
addq $0x8, %rdi
movl %esi, %r8d
movl %eax, %ecx
cmpl $0x4, %r9d
je 0x5a87b
cmpl $0x8, %r9d
jne 0x5a887
leaq (%rdi,%r8,8), %rax
leaq (%rdi,%rcx,8), %rdi
pushq $0x3
jmp 0x5a891
leaq (%rdi,%r8,4), %rax
leaq (%rdi,%rcx,4), %rdi
pushq $0x2
jmp 0x5a891
leaq (%rdi,%r8,2), %rax
leaq (%rdi,%rcx,2), %rdi
pushq $0x1
popq %rcx
subl %esi, %edx
shll %cl, %edx
movq %rax, %rsi
jmp 0x267e0
// File: /workspace/github_c_makefile_star2_O2/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:
movl (%rdi), %eax
cmpl $0x4, %eax
je 0x5a8b3
cmpl $0x8, %eax
jne 0x5a8bb
movslq %esi, %rax
movq %rdx, 0x8(%rdi,%rax,8)
retq
movslq %esi, %rax
movl %edx, 0x8(%rdi,%rax,4)
retq
movslq %esi, %rax
movw %dx, 0x8(%rdi,%rax,2)
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdx, %r14
movq %rdi, %rbx
leaq -0x80000000(%rsi), %rax
movswq %si, %rcx
xorl %edx, %edx
cmpq %rsi, %rcx
setne %dl
leal 0x2(,%rdx,2), %ecx
testq %r14, %r14
je 0x5a8f5
andl $0x0, (%r14)
movabsq $-0x100000000, %rdx     # imm = 0xFFFFFFFF00000000
cmpq %rdx, %rax
pushq $0x8
popq %rax
cmovbl %eax, %ecx
cmpl %ecx, (%rbx)
jb 0x5a951
leaq 0xc(%rsp), %rdx
movq %rbx, %rdi
callq 0x5a7aa
testb %al, %al
je 0x5a951
movl 0x4(%rbx), %ebp
testq %r14, %r14
je 0x5a92c
movl $0x1, (%r14)
movl 0xc(%rsp), %edx
decl %ebp
cmpl %ebp, %edx
jae 0x5a941
leal 0x1(%rdx), %esi
movq %rbx, %rdi
callq 0x5a852
movq %rbx, %rdi
movl %ebp, %esi
callq 0x5a846
movq %rax, %rbx
movl %ebp, 0x4(%rax)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r12
movl %edi, %ebp
callq 0x2b8ae
movq %rax, %r13
movq %r14, (%rsp)
movq %rbx, %r15
cmpq $0xb, %r15
pushq $0xa
popq %rax
cmovlq %rax, %r15
movl %ebp, %edi
movq %r12, %rsi
movq %r14, %rdx
callq 0x26bb0
cmpq $-0x1, %rax
je 0x5aa33
addq %rax, %r12
subq %rax, %r14
jmp 0x5aa3d
callq 0x26880
cmpl $0xb, (%rax)
jne 0x5aa6a
testq %r14, %r14
je 0x5aa6f
movl %ebp, %edi
pushq $0x2
popq %rsi
movq %r15, %rdx
callq 0x290e1
callq 0x2b8ae
subq %r13, %rax
movq %rbx, %r15
subq %rax, %r15
jg 0x5aa0d
callq 0x26880
movl $0x6e, (%rax)
pushq $-0x1
popq %rax
jmp 0x5aa73
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movl %edi, %ebp
callq 0x2b8ae
movq %rax, (%rsp)
testq %r15, %r15
je 0x5ab14
xorl %r13d, %r13d
movq %rbx, %r14
cmpq $0xb, %r14
pushq $0xa
popq %rax
cmovlq %rax, %r14
movl %ebp, %edi
movq %r12, %rsi
movq %r15, %rdx
callq 0x26340
cmpq $-0x1, %rax
je 0x5aadc
testq %rax, %rax
je 0x5ab0f
addq %rax, %r13
subq %rax, %r15
je 0x5ab18
addq %rax, %r12
jmp 0x5aae6
callq 0x26880
cmpl $0xb, (%rax)
jne 0x5ab0f
movl %ebp, %edi
pushq $0x1
popq %rsi
movq %r14, %rdx
callq 0x290e1
callq 0x2b8ae
subq (%rsp), %rax
movq %rbx, %r14
subq %rax, %r14
jg 0x5aaac
callq 0x26880
movl $0x6e, (%rax)
pushq $-0x1
popq %rax
jmp 0x5ab1b
xorl %eax, %eax
jmp 0x5ab1b
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
movl %edi, %ebp
decq %r12
xorl %r14d, %r14d
pushq $0x1
popq %r13
cmpq %r14, %r12
je 0x5aba4
movl %ebp, %edi
leaq 0x7(%rsp), %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x5aa82
cmpq $-0x1, %rax
je 0x5ab7e
movb 0x7(%rsp), %al
cmpb $0xa, %al
je 0x5ab84
movb %al, (%rbx,%r14)
movb $0x0, 0x1(%rbx,%r14)
incq %r14
jmp 0x5ab4a
pushq $-0x1
popq %r14
jmp 0x5aba1
movb $0x0, (%rbx,%r14)
testq %r14, %r14
je 0x5ab9e
cmpb $0xd, -0x1(%rbx,%r14)
jne 0x5aba1
movb $0x0, -0x1(%rbx,%r14)
jmp 0x5aba1
xorl %r14d, %r14d
movq %r14, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
pushq $0x28
popq %rsi
callq 0x31018
movq %rax, %r14
leaq 0x9e6d3(%rip), %rax     # 0xf98a8
movq 0x9b0(%rax), %rax
movq 0x18(%rax), %rdi
movq %r14, %rsi
callq 0x2a5f9
movq %rax, %rbx
movq %r14, %rdi
callq 0x311c8
testq %rbx, %rbx
je 0x5b1fe
movq 0x8(%rbx), %rax
jmp 0x5b200
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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
pushq %r14
pushq %rbx
movl %esi, %ebp
movq %rdi, %r14
movl $0x8d8, %edi            # imm = 0x8D8
callq 0x327b9
movq %rax, %rbx
leaq 0x8(%rax), %rdi
testq %r14, %r14
je 0x5b241
movq 0x20(%r14), %rax
movq %rax, 0x20(%rdi)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rdi)
movups %xmm0, (%rdi)
jmp 0x5b249
pushq $0x28
popq %rsi
callq 0x39a57
callq 0x2b8ae
movq %rax, (%rbx)
andq $0x0, 0x38(%rbx)
movl %ebp, 0x30(%rbx)
movq %rbx, %rdi
andq $0x0, 0x8c8(%rbx)
addq $0x40, %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x890(%rbx)
movups %xmm0, 0x8a0(%rbx)
movups %xmm0, 0x8ae(%rbx)
andl $0x0, 0x8c0(%rbx)
movl $0x830, %edx            # imm = 0x830
xorl %esi, %esi
callq 0x26110
callq 0x26e0c
movq %rax, 0x8d0(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x870(%rbx)
movups %xmm0, 0x880(%rbx)
leaq -0x289be(%rip), %rcx    # 0x328f9
movq %rcx, 0x18(%rax)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x9e5d7(%rip), %rax     # 0xf98a8
movq 0x9b0(%rax), %rax
movq 0x18(%rax), %r14
addq $0x8, %rdi
pushq $0x28
popq %rsi
callq 0x31018
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x2a3ed
xorl %ecx, %ecx
negl %eax
sbbl %ecx, %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movslq 0x844(%rdi), %rcx
xorl %edx, %edx
testl %ecx, %ecx
movl $0x0, %esi
cmovgl %ecx, %esi
movq 0x848(%rdi), %rdi
pushq $-0x1
popq %rax
cmpq %rdx, %rsi
je 0x5b341
leaq 0x1(%rdx), %r8
cmpq %r14, (%rdi,%rdx,8)
movq %r8, %rdx
jne 0x5b32d
jmp 0x5b36f
leaq 0x8(,%rcx,8), %rsi
callq 0x32863
movq %rax, 0x848(%rbx)
movslq 0x844(%rbx), %rcx
movq %r14, (%rax,%rcx,8)
leal 0x1(%rcx), %eax
movl %eax, 0x844(%rbx)
orb $0x1, 0x31(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
leaq 0x9e525(%rip), %r15     # 0xf98a8
movq 0x9b0(%r15), %rax
movslq %esi, %r14
cmpq $0x0, 0x40028(%rax,%r14,8)
je 0x5b39d
pushq $-0x1
popq %rax
jmp 0x5b3b9
movq %rdi, %rbx
movl %r14d, %esi
callq 0x5f428
movq 0x9b0(%r15), %rax
movq %rbx, 0x40028(%rax,%r14,8)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
leaq 0x9e4dd(%rip), %r14     # 0xf98a8
movq 0x9b0(%r14), %rax
movq 0x18(%rax), %rdi
callq 0x2a9c4
movq %rax, %rbx
xorl %r15d, %r15d
movq %rbx, %rdi
callq 0x2a9d3
testq %rax, %rax
je 0x5b3ff
movq 0x8(%rax), %rax
movq 0x38(%rax), %rax
cmpq %r15, %rax
cmovaq %rax, %r15
jmp 0x5b3e1
movq %rbx, %rdi
callq 0x2aa94
movq 0x9b0(%r14), %rax
movq 0x8(%rax), %rax
cmpq %rax, %r15
cmovaq %r15, %rax
popq %rbx
popq %r14
popq %r15
retq