LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/scripting.c
// Function: ldbRedis
void ldbRedis(lua_State *lua, sds *argv, int argc) {
    int j, saved_rc = server.lua_replicate_commands;

    lua_getglobal(lua,"redis");
    lua_pushstring(lua,"call");
    lua_gettable(lua,-2);       /* Stack: redis, redis.call */
    for (j = 1; j < argc; j++)
        lua_pushlstring(lua,argv[j],sdslen(argv[j]));
    ldb.step = 1;               /* Force redis.call() to log. */
    server.lua_replicate_commands = 1;
    lua_pcall(lua,argc-1,1,0);  /* Stack: redis, result */
    ldb.step = 0;               /* Disable logging. */
    server.lua_replicate_commands = saved_rc;
    lua_pop(lua,2);             /* Discard the result and clean the stack. */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x93a23(%rip), %rax     # 0xf98a8
movl 0xa00(%rax), %eax
movl %eax, 0x4(%rsp)
leaq 0x49122(%rip), %rdx     # 0xaefb8
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
callq 0x78d22
leaq 0x5c866(%rip), %rsi     # 0xc270d
movq %rbx, %rdi
callq 0x78aec
pushq $-0x2
popq %rsi
movq %rbx, %rdi
callq 0x78d02
movslq %ebp, %r12
pushq $0x1
popq %r13
cmpq %r12, %r13
jge 0x65ee5
movq (%r14,%r13,8), %r15
movq %r15, %rdi
callq 0x63370
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x78a95
incq %r13
jmp 0x65ec1
pushq $0x1
popq %rdx
movl %edx, 0xa849e(%rip)     # 0x10e38c
leaq 0x939b3(%rip), %r14     # 0xf98a8
movl %edx, 0xa00(%r14)
decl %ebp
movq %rbx, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
callq 0x79168
andl $0x0, 0xa847b(%rip)     # 0x10e38c
movl 0x4(%rsp), %eax
movl %eax, 0xa00(%r14)
pushq $-0x3
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x78478
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/scripting.c
// Function: ldbTrace
void ldbTrace(lua_State *lua) {
    lua_Debug ar;
    int level = 0;

    while(lua_getstack(lua,level,&ar)) {
        lua_getinfo(lua,"Snl",&ar);
        if(strstr(ar.short_src,"user_script") != NULL) {
            ldbLog(sdscatprintf(sdsempty(),"%s %s:",
                (level == 0) ? "In" : "From",
                ar.name ? ar.name : "top level"));
            ldbLogSourceLine(ar.currentline);
        }
        level++;
    }
    if (level == 0) {
        ldbLog(sdsnew("<error> Can't retrieve Lua stack."));
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
leaq 0x38(%rsp), %r14
movq %rsp, %r15
leaq 0x55816(%rip), %r12     # 0xbb76b
leaq 0x55103(%rip), %r13     # 0xbb05f
xorl %ebp, %ebp
movq %rbx, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x7967b
testl %eax, %eax
je 0x65fe2
movq %rbx, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x797e8
movq %r14, %rdi
movq %r13, %rsi
callq 0x266b0
testq %rax, %rax
je 0x65fdb
callq 0x3114c
testl %ebp, %ebp
leaq 0x557de(%rip), %rdx     # 0xbb779
leaq 0x557d4(%rip), %rcx     # 0xbb776
cmoveq %rcx, %rdx
movq 0x8(%rsp), %rcx
testq %rcx, %rcx
leaq 0x557c9(%rip), %rsi     # 0xbb77e
cmoveq %rsi, %rcx
movq %rax, %rdi
leaq 0x557ac(%rip), %rsi     # 0xbb76f
xorl %eax, %eax
callq 0x31a38
movq %rax, %rdi
callq 0x627e8
movl 0x28(%rsp), %edi
callq 0x653e7
incl %ebp
jmp 0x65f5e
testl %ebp, %ebp
jne 0x65ffa
leaq 0x5579b(%rip), %rdi     # 0xbb788
callq 0x3115a
movq %rax, %rdi
callq 0x627e8
addq $0x78, %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/scripting.c
// Function: ldbMaxlen
void ldbMaxlen(sds *argv, int argc) {
    if (argc == 2) {
        int newval = atoi(argv[1]);
        ldb.maxlen_hint_sent = 1; /* User knows about this command. */
        if (newval != 0 && newval <= 60) newval = 60;
        ldb.maxlen = newval;
    }
    if (ldb.maxlen) {
        ldbLog(sdscatprintf(sdsempty(),"<value> replies are truncated at %d bytes.",(int)ldb.maxlen));
    } else {
        ldbLog(sdscatprintf(sdsempty(),"<value> replies are unlimited."));
    }
}

// Assembly:
pushq %rbx
cmpl $0x2, %esi
jne 0x6603d
movq 0x8(%rdi), %rdi
callq 0x26760
movl $0x1, 0xa8396(%rip)     # 0x10e3b8
cmpl $0x3d, %eax
cltq
pushq $0x3c
popq %rbx
cmovgeq %rax, %rbx
testl %eax, %eax
cmoveq %rax, %rbx
movq %rbx, 0xa8375(%rip)     # 0x10e3b0
jmp 0x66044
movq 0xa836c(%rip), %rbx     # 0x10e3b0
callq 0x3114c
testq %rbx, %rbx
je 0x66067
movl 0xa835c(%rip), %edx     # 0x10e3b0
leaq 0x5574f(%rip), %rsi     # 0xbb7aa
movq %rax, %rdi
xorl %eax, %eax
callq 0x31a38
jmp 0x66078
leaq 0x55767(%rip), %rsi     # 0xbb7d5
movq %rax, %rdi
xorl %eax, %eax
callq 0x31a38
movq %rax, %rdi
popq %rbx
jmp 0x627e8
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/bio.c
// Function: bioInit
void bioInit(void) {
    pthread_attr_t attr;
    pthread_t thread;
    size_t stacksize;
    int j;

    /* Initialization of state vars and objects */
    for (j = 0; j < BIO_NUM_OPS; j++) {
        pthread_mutex_init(&bio_mutex[j],NULL);
        pthread_cond_init(&bio_condvar[j],NULL);
        bio_jobs[j] = listCreate();
        bio_pending[j] = 0;
    }

    /* Set the stack size as by default it may be small in some system */
    pthread_attr_init(&attr);
    pthread_attr_getstacksize(&attr,&stacksize);
    if (!stacksize) stacksize = 1; /* The world is full of Solaris Fixes */
    while (stacksize < REDIS_THREAD_STACK_SIZE) stacksize *= 2;
    pthread_attr_setstacksize(&attr, stacksize);

    /* Ready to spawn our threads. We use the single argument the thread
     * function accepts in order to pass the job ID the thread is
     * responsible of. */
    for (j = 0; j < BIO_NUM_OPS; j++) {
        void *arg = (void*)(unsigned long) j;
        if (pthread_create(&thread,&attr,bioProcessBackgroundJobs,arg) != 0) {
            serverLog(LL_WARNING,"Fatal: Can't initialize Background Jobs.");
            exit(1);
        }
        bio_threads[j] = thread;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x50, %rsp
leaq 0xa7f20(%rip), %rbx     # 0x10e630
leaq 0xa7ec9(%rip), %r14     # 0x10e5e0
xorl %r15d, %r15d
leaq 0xa7f6f(%rip), %r12     # 0x10e690
leaq 0xa7f78(%rip), %r13     # 0x10e6a0
cmpq $0x10, %r15
je 0x6675e
movq %r14, %rdi
xorl %esi, %esi
callq 0x26430
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26520
callq 0x26e0c
andq $0x0, (%r15,%r13)
movq %rax, (%r15,%r12)
addq $0x8, %r15
addq $0x30, %rbx
addq $0x28, %r14
jmp 0x66728
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x26a50
leaq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x268e0
movq (%r14), %rsi
testq %rsi, %rsi
jne 0x66799
movq $0x1, 0x8(%rsp)
pushq $0x1
popq %rsi
jmp 0x66799
addq %rsi, %rsi
movq %rsi, 0x8(%rsp)
cmpq $0x3fffff, %rsi         # imm = 0x3FFFFF
jbe 0x66791
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x267c0
leaq 0xa7efa(%rip), %r13     # 0x10e6b0
xorl %r14d, %r14d
leaq 0x59(%rip), %r15        # 0x66819
leaq 0x10(%rsp), %r12
cmpq $0x2, %r14
je 0x667f2
movq %r12, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x26490
testl %eax, %eax
jne 0x66800
movq 0x10(%rsp), %rax
movq %rax, (%r13)
incq %r14
addq $0x8, %r13
jmp 0x667c5
addq $0x50, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x55748(%rip), %rsi     # 0xbbf4f
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x2b699
pushq $0x1
popq %rdi
callq 0x262c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/bio.c
// Function: bioCreateBackgroundJob
void bioCreateBackgroundJob(int type, void *arg1, void *arg2, void *arg3) {
    struct bio_job *job = zmalloc(sizeof(*job));

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
movl %edi, %ebp
pushq $0x20
popq %rdi
callq 0x327b9
movq %rax, %r12
xorl %edi, %edi
callq 0x26cd0
movq %rax, (%r12)
movq %r15, 0x8(%r12)
movq %r14, 0x10(%r12)
movq %rbx, 0x18(%r12)
movslq %ebp, %r14
imulq $0x28, %r14, %rax
leaq 0xa7c51(%rip), %rbx     # 0x10e5e0
addq %rax, %rbx
movq %rbx, %rdi
callq 0x26b20
leaq 0xa7cef(%rip), %rax     # 0x10e690
movq (%rax,%r14,8), %rdi
movq %r12, %rsi
callq 0x26ecc
leaq 0xa7cec(%rip), %rax     # 0x10e6a0
incq (%rax,%r14,8)
imulq $0x30, %r14, %rax
leaq 0xa7c6d(%rip), %rdi     # 0x10e630
addq %rax, %rdi
callq 0x26280
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x26c30
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/bio.c
// Function: bioPendingJobsOfType
unsigned long long bioPendingJobsOfType(int type) {
    unsigned long long val;
    pthread_mutex_lock(&bio_mutex[type]);
    val = bio_pending[type];
    pthread_mutex_unlock(&bio_mutex[type]);
    return val;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movslq %edi, %r14
imulq $0x28, %r14, %rax
leaq 0xa7bf3(%rip), %rbx     # 0x10e5e0
addq %rax, %rbx
movq %rbx, %rdi
callq 0x26b20
leaq 0xa7ca1(%rip), %rax     # 0x10e6a0
movq (%rax,%r14,8), %r14
movq %rbx, %rdi
callq 0x26c30
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/bio.c
// Function: bioKillThreads
void bioKillThreads(void) {
    int err, j;

    for (j = 0; j < BIO_NUM_OPS; j++) {
        if (pthread_cancel(bio_threads[j]) == 0) {
            if ((err = pthread_join(bio_threads[j],NULL)) != 0) {
                serverLog(LL_WARNING,
                    "Bio thread for job type #%d can be joined: %s",
                        j, strerror(err));
            } else {
                serverLog(LL_WARNING,
                    "Bio thread for job type #%d terminated",j);
            }
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
leaq 0xa7c8b(%rip), %r12     # 0x10e6b0
leaq 0x555da(%rip), %rbx     # 0xbc006
pushq $0x3
popq %rbp
leaq 0x555a2(%rip), %r14     # 0xbbfd8
xorl %r15d, %r15d
cmpq $0x2, %r15
je 0x66a8e
movq (%r12), %rdi
callq 0x267a0
testl %eax, %eax
jne 0x66a85
movq (%r12), %rdi
xorl %esi, %esi
callq 0x26080
testl %eax, %eax
je 0x66a76
movl %eax, %edi
callq 0x26680
movl %ebp, %edi
movq %r14, %rsi
movl %r15d, %edx
movq %rax, %rcx
xorl %eax, %eax
callq 0x2b699
jmp 0x66a85
movl %ebp, %edi
movq %rbx, %rsi
movl %r15d, %edx
xorl %eax, %eax
callq 0x2b699
incq %r15
addq $0x8, %r12
jmp 0x66a39
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/rio.c
// Function: rioInitWithFile
void rioInitWithFile(rio *r, FILE *fp) {
    *r = rioFileIO;
    r->io.file.fp = fp;
    r->io.file.buffered = 0;
    r->io.file.autosync = 0;
}

// Assembly:
movq %rsi, %rax
movq %rdi, %rdx
leaq 0x8b356(%rip), %rsi     # 0xf1e18
pushq $0xd
popq %rcx
rep  movsq (%rsi), %es:(%rdi)
movq %rax, 0x40(%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rdx)
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/rio.c
// Function: rioInitWithFdset
void rioInitWithFdset(rio *r, int *fds, int numfds) {
    int j;

    *r = rioFdsetIO;
    r->io.fdset.fds = zmalloc(sizeof(int)*numfds);
    r->io.fdset.state = zmalloc(sizeof(int)*numfds);
    memcpy(r->io.fdset.fds,fds,sizeof(int)*numfds);
    for (j = 0; j < numfds; j++) r->io.fdset.state[j] = 0;
    r->io.fdset.numfds = numfds;
    r->io.fdset.pos = 0;
    r->io.fdset.buf = sdsempty();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8b395(%rip), %rsi     # 0xf1e80
pushq $0xd
popq %rcx
rep  movsq (%rsi), %es:(%rdi)
movslq %edx, %r12
leaq (,%r12,4), %r15
movq %r15, %rdi
callq 0x327b9
movq %rax, 0x40(%rbx)
movq %r15, %rdi
callq 0x327b9
movq %rax, 0x48(%rbx)
movq 0x40(%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x26c50
xorl %eax, %eax
testl %r12d, %r12d
movl $0x0, %ecx
cmovgl %ebp, %ecx
cmpq %rax, %rcx
je 0x66b42
movq 0x48(%rbx), %rdx
andl $0x0, (%rdx,%rax,4)
incq %rax
jmp 0x66b30
movl %ebp, 0x50(%rbx)
andq $0x0, 0x58(%rbx)
callq 0x3114c
movq %rax, 0x60(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/rio.c
// Function: rioWriteBulkCount
size_t rioWriteBulkCount(rio *r, char prefix, int count) {
    char cbuf[128];
    int clen;

    cbuf[0] = prefix;
    clen = 1+ll2string(cbuf+1,sizeof(cbuf)-1,count);
    cbuf[clen++] = '\r';
    cbuf[clen++] = '\n';
    if (rioWrite(r,cbuf,clen) == 0) return 0;
    return clen;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
movq %rdi, %rbx
leaq 0x1(%rsp), %rdi
movb %sil, -0x1(%rdi)
movslq %edx, %rdx
pushq $0x7f
popq %rsi
callq 0x39796
cltq
movq %rsp, %rsi
movw $0xa0d, 0x1(%rax,%rsi)  # imm = 0xA0D
addl $0x3, %eax
movslq %eax, %r14
movq %rbx, %rdi
movq %r14, %rdx
callq 0x66c11
testq %rax, %rax
cmovneq %r14, %rax
addq $0x88, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/rio.c
// Function: rioWriteBulkString
size_t rioWriteBulkString(rio *r, const char *buf, size_t len) {
    size_t nwritten;

    if ((nwritten = rioWriteBulkCount(r,'$',len)) == 0) return 0;
    if (len > 0 && rioWrite(r,buf,len) == 0) return 0;
    if (rioWrite(r,"\r\n",2) == 0) return 0;
    return nwritten+len+2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
pushq $0x24
popq %rsi
callq 0x66bc1
testq %rax, %rax
je 0x66cdf
movq %rax, %r15
testq %rbx, %rbx
je 0x66cbe
movq %r14, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x66c11
testq %rax, %rax
je 0x66cdf
leaq 0x4e4cb(%rip), %rsi     # 0xb5190
pushq $0x2
popq %rdx
movq %r14, %rdi
callq 0x66c11
testq %rax, %rax
je 0x66cdf
leaq (%rbx,%r15), %rax
addq $0x2, %rax
jmp 0x66ce1
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/rio.c
// Function: rioBufferRead
static size_t rioBufferRead(rio *r, void *buf, size_t len) {
    if (sdslen(r->io.buffer.ptr)-r->io.buffer.pos < len)
        return 0; /* not enough buffer to return len bytes. */
    memcpy(buf,r->io.buffer.ptr+r->io.buffer.pos,len);
    r->io.buffer.pos += len;
    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq 0x40(%rdi), %r12
movq %r12, %rdi
callq 0x66ddb
movq 0x48(%r14), %rcx
subq %rcx, %rax
cmpq %rbx, %rax
jae 0x66d88
xorl %eax, %eax
jmp 0x66da0
addq %rcx, %r12
movq %r15, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x26c50
addq %rbx, 0x48(%r14)
pushq $0x1
popq %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/rio.c
// Function: rioFileWrite
static size_t rioFileWrite(rio *r, const void *buf, size_t len) {
    size_t retval;

    retval = fwrite(buf,len,1,r->io.file.fp);
    r->io.file.buffered += len;

    if (r->io.file.autosync &&
        r->io.file.buffered >= r->io.file.autosync)
    {
        fflush(r->io.file.fp);
        aof_fsync(fileno(r->io.file.fp));
        r->io.file.buffered = 0;
    }
    return retval;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rdi, %rbx
movq 0x40(%rdi), %rcx
pushq $0x1
popq %rdx
movq %rsi, %rdi
movq %r15, %rsi
callq 0x26b10
movq %rax, %r14
movq 0x50(%rbx), %rax
addq 0x48(%rbx), %r15
movq %r15, 0x48(%rbx)
testq %rax, %rax
sete %cl
cmpq %rax, %r15
setl %al
orb %cl, %al
jne 0x66e82
movq 0x40(%rbx), %rdi
callq 0x26ce0
movq 0x40(%rbx), %rdi
callq 0x26070
movl %eax, %edi
callq 0x26570
andq $0x0, 0x48(%rbx)
movq %r14, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/rand.c
// Function: redisLrand48
static void next(void) {
    uint32_t p[2], q[2], r[2], carry0, carry1;

    MUL(a[0], x[0], p);
    ADDEQU(p[0], c, carry0);
    ADDEQU(p[1], carry0, carry1);
    MUL(a[0], x[1], q);
    ADDEQU(p[1], q[0], carry0);
    MUL(a[1], x[0], r);
    x[2] = LOW(carry0 + carry1 + CARRY(p[1], r[0]) + q[1] + r[1] +
            a[0] * x[2] + a[1] * x[1] + a[2] * x[0]);
    x[1] = LOW(p[1] + r[0]);
    x[0] = LOW(p[0]);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl 0x9226a(%rip), %edi     # 0xf9298
imull $0xe66d, %edi, %ecx     # imm = 0xE66D
movl $0xffff, %edx           # imm = 0xFFFF
movl %ecx, %eax
andl %edx, %eax
movl %ecx, %esi
shrl $0x10, %esi
addl $0xb, %ecx
andl %edx, %ecx
cmpl $0xfff5, %eax           # imm = 0xFFF5
sbbl $-0x1, %esi
movl %esi, %eax
andl %edx, %eax
movl 0x92242(%rip), %r10d    # 0xf929c
imull $0xe66d, %r10d, %r11d   # imm = 0xE66D
movl %r11d, %r8d
andl %edx, %r8d
addl %eax, %r8d
leal (%rsi,%r11), %eax
shrl $0x10, %r11d
movl %eax, %ebx
andl $0xfffc, %ebx           # imm = 0xFFFC
imull $0xdeec, %edi, %r9d     # imm = 0xDEEC
movl %r9d, %ebp
andl %edx, %ebp
addl %ebx, %ebp
movl %r9d, %ebx
shrl $0x10, %ebx
imull $0xe66d, 0x92207(%rip), %r14d # imm = 0xE66D
addl %r11d, %r14d
imull $0xdeec, %r10d, %r10d   # imm = 0xDEEC
leal (%rdi,%rdi,4), %edi
addl %r10d, %edi
addl %ebx, %edi
addl %r14d, %edi
movl $0x10000, %r10d         # imm = 0x10000
cmpl %r10d, %esi
sbbl $-0x1, %edi
cmpl %r10d, %r8d
sbbl $-0x1, %edi
cmpl %r10d, %ebp
sbbl $-0x1, %edi
andl %edx, %edi
movl %edi, 0x921d2(%rip)     # 0xf92a0
addl %r9d, %eax
andl %edx, %eax
movl %eax, 0x921c3(%rip)     # 0xf929c
movl %ecx, 0x921b9(%rip)     # 0xf9298
shll $0xf, %edi
shrl %eax
orl %edi, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/memtest.c
// Function: memtest_progress_start
void memtest_progress_start(char *title, int pass) {
    int j;

    printf("\x1b[H\x1b[2J");    /* Cursor home, clear screen. */
    /* Fill with dots. */
    for (j = 0; j < ws.ws_col*(ws.ws_row-2); j++) printf(".");
    printf("Please keep the test running several minutes per GB of memory.\n");
    printf("Also check http://www.memtest86.com/ and http://pyropus.ca/software/memtester/");
    printf("\x1b[H\x1b[2K");          /* Cursor home, clear current line.  */
    printf("%s [%d]\n", title, pass); /* Print title. */
    progress_printed = 0;
    progress_full = ws.ws_col*(ws.ws_row-3);
    fflush(stdout);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0x54f49(%rip), %rdi     # 0xbc064
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x260a0
pushq $0x2e
popq %rbp
movzwl 0xa7593(%rip), %eax     # 0x10e6c2
movzwl 0xa758a(%rip), %ecx     # 0x10e6c0
addl $-0x2, %ecx
imull %eax, %ecx
cmpl %ecx, %r15d
jge 0x6714d
movl %ebp, %edi
callq 0x26320
incl %r15d
jmp 0x67128
leaq 0x55121(%rip), %rdi     # 0xbc275
callq 0x26250
leaq 0x54f0c(%rip), %rdi     # 0xbc06c
xorl %eax, %eax
callq 0x260a0
leaq 0x54f4d(%rip), %rdi     # 0xbc0bb
xorl %eax, %eax
callq 0x260a0
leaq 0x54f47(%rip), %rdi     # 0xbc0c3
movq %r14, %rsi
movl %ebx, %edx
xorl %eax, %eax
callq 0x260a0
andq $0x0, 0xa7538(%rip)     # 0x10e6c8
movzwl 0xa752b(%rip), %eax     # 0x10e6c2
movzwl 0xa7522(%rip), %ecx     # 0x10e6c0
addl $-0x3, %ecx
imull %eax, %ecx
movslq %ecx, %rax
movq %rax, 0xa7522(%rip)     # 0x10e6d0
movq 0x8de33(%rip), %rax     # 0xf4fe8
movq (%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x26ce0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/memtest.c
// Function: memtest_progress_step
void memtest_progress_step(size_t curr, size_t size, char c) {
    size_t chars = ((unsigned long long)curr*progress_full)/size, j;

    for (j = 0; j < chars-progress_printed; j++) printf("%c",c);
    progress_printed = chars;
    fflush(stdout);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edx, %ebx
movq %rdi, %rax
imulq 0xa74e9(%rip), %rax     # 0x10e6d0
xorl %r15d, %r15d
xorl %edx, %edx
divq %rsi
movq %rax, %r14
movq %r14, %rax
subq 0xa74cc(%rip), %rax     # 0x10e6c8
cmpq %rax, %r15
jae 0x6720d
movl %ebx, %edi
callq 0x26320
incq %r15
jmp 0x671f2
movq %r14, 0xa74b4(%rip)     # 0x10e6c8
movq 0x8ddcd(%rip), %rax     # 0xf4fe8
movq (%rax), %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x26ce0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/memtest.c
// Function: memtest_addressing
int memtest_addressing(unsigned long *l, size_t bytes, int interactive) {
    unsigned long words = bytes/sizeof(unsigned long);
    unsigned long j, *p;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
shrq $0x3, %r14
leaq (%r14,%r14), %rax
movq %rax, (%rsp)
xorl %r12d, %r12d
pushq $0x41
popq %rbx
movq %rdi, %r13
cmpq %r12, %r14
je 0x67280
testl %ebp, %ebp
sete %al
movq %r13, (%r15,%r12,8)
testw %r12w, %r12w
setne %cl
orb %al, %cl
jne 0x67277
movq %r12, %rdi
movq (%rsp), %rsi
movl %ebx, %edx
callq 0x671d5
incq %r12
addq $0x8, %r13
jmp 0x67250
xorl %r13d, %r13d
movq %r15, %rbx
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x672cb
movq (%r15), %rdx
cmpq %rdx, %rbx
jne 0x672c3
testl %ebp, %ebp
sete %al
testw %r12w, %r12w
setne %cl
orb %al, %cl
jne 0x672b6
leaq (%r14,%r12), %rdi
movq (%rsp), %rsi
pushq $0x41
popq %rdx
callq 0x671d5
addq $0x8, %r15
incq %r12
addq $0x8, %rbx
jmp 0x67289
testl %ebp, %ebp
jne 0x672dd
pushq $0x1
popq %r13
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x54de8(%rip), %rdi     # 0xbc0cc
movq %r15, %rsi
xorl %eax, %eax
callq 0x260a0
pushq $0x1
popq %rdi
callq 0x262c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/memtest.c
// Function: memtest_fill_random
void memtest_fill_random(unsigned long *l, size_t bytes, int interactive) {
    unsigned long step = 4096/sizeof(unsigned long);
    unsigned long words = bytes/sizeof(unsigned long)/2;
    unsigned long iwords = words/step;  /* words per iteration */
    unsigned long off, w, *l1, *l2;
    uint64_t rseed = UINT64_C(0xd13133de9afdb566); /* Just a random seed. */
    uint64_t rout = 0;

    assert((bytes & 4095) == 0);
    for (off = 0; off < step; off++) {
        l1 = l+off;
        l2 = l1+words;
        for (w = 0; w < iwords; w++) {
            xorshift64star_next();
            *l1 = *l2 = (unsigned long) rout;
            l1 += step;
            l2 += step;
            if ((w & 0xffff) == 0 && interactive)
                memtest_progress_step(w+iwords*off,words,'R');
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r12
movq %rdi, 0x8(%rsp)
testw $0xfff, %r12w           # imm = 0xFFF
jne 0x673ed
movl %edx, %r14d
movq %r12, %rbx
shrq $0x4, %rbx
shrq $0xd, %r12
movabsq $-0x2ececc2165024a9a, %rbp # imm = 0xD13133DE9AFDB566
movq $0x0, (%rsp)
movabsq $0x2545f4914f6cdd1d, %rdi # imm = 0x2545F4914F6CDD1D
xorl %ecx, %ecx
cmpq $0x200, %rcx            # imm = 0x200
je 0x673de
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rsp)
leaq (%rax,%rcx,8), %r15
xorl %r13d, %r13d
cmpq %r13, %r12
je 0x673cd
testl %r14d, %r14d
sete %al
movq %rbp, %rcx
shrq $0xc, %rcx
xorq %rbp, %rcx
movq %rcx, %rdx
shlq $0x19, %rdx
xorq %rcx, %rdx
movq %rdx, %rbp
shrq $0x1b, %rbp
xorq %rdx, %rbp
movq %rbp, %rcx
imulq %rdi, %rcx
movq %rcx, (%r15,%rbx,8)
movq %rcx, (%r15)
testw %r13w, %r13w
setne %cl
orb %al, %cl
jne 0x673c1
movq (%rsp), %rax
leaq (%rax,%r13), %rdi
movq %rbx, %rsi
pushq $0x52
popq %rdx
callq 0x671d5
movabsq $0x2545f4914f6cdd1d, %rdi # imm = 0x2545F4914F6CDD1D
addq $0x1000, %r15           # imm = 0x1000
incq %r13
jmp 0x67362
movq 0x10(%rsp), %rcx
incq %rcx
addq %r12, (%rsp)
jmp 0x67344
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x54d07(%rip), %rdi     # 0xbc0fb
leaq 0x54d14(%rip), %rsi     # 0xbc10f
leaq 0x54d17(%rip), %rcx     # 0xbc119
movl $0x92, %edx
callq 0x262d0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/memtest.c
// Function: memtest_fill_value
void memtest_fill_value(unsigned long *l, size_t bytes, unsigned long v1,
                        unsigned long v2, char sym, int interactive)
{
    unsigned long step = 4096/sizeof(unsigned long);
    unsigned long words = bytes/sizeof(unsigned long)/2;
    unsigned long iwords = words/step;  /* words per iteration */
    unsigned long off, w, *l1, *l2, v;

    assert((bytes & 4095) == 0);
    for (off = 0; off < step; off++) {
        l1 = l+off;
        l2 = l1+words;
        v = (off & 1) ? v2 : v1;
        for (w = 0; w < iwords; w++) {
#ifdef MEMTEST_32BIT
            *l1 = *l2 = ((unsigned long)     v) |
                        (((unsigned long)    v) << 16);
#else
            *l1 = *l2 = ((unsigned long)     v) |
                        (((unsigned long)    v) << 16) |
                        (((unsigned long)    v) << 32) |
                        (((unsigned long)    v) << 48);
#endif
            l1 += step;
            l2 += step;
            if ((w & 0xffff) == 0 && interactive)
                memtest_progress_step(w+iwords*off,words,sym);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq %rsi, %r12
movq %rdi, 0x18(%rsp)
testw $0xfff, %r12w           # imm = 0xFFF
jne 0x67500
movl %r9d, %ebx
movq %r12, %rbp
shrq $0x4, %rbp
shrq $0xd, %r12
movq $0x0, 0x10(%rsp)
movsbl %r8b, %eax
movl %eax, 0xc(%rsp)
xorl %ecx, %ecx
cmpq $0x200, %rcx            # imm = 0x200
je 0x674f1
movq 0x18(%rsp), %rax
leaq (%rax,%rcx,8), %r13
movq %rcx, 0x30(%rsp)
testb $0x1, %cl
movq 0x28(%rsp), %rax
cmoveq 0x20(%rsp), %rax
movq %rax, %rcx
movq %rax, %r14
shlq $0x30, %r14
orq %rax, %r14
shlq $0x10, %rax
shlq $0x20, %rcx
orq %rax, %rcx
orq %rcx, %r14
xorl %r15d, %r15d
cmpq %r15, %r12
je 0x674df
testl %ebx, %ebx
sete %al
movq %r14, (%r13,%rbp,8)
movq %r14, (%r13)
testw %r15w, %r15w
setne %cl
orb %al, %cl
jne 0x674d3
movq 0x10(%rsp), %rax
leaq (%rax,%r15), %rdi
movq %rbp, %rsi
movl 0xc(%rsp), %edx
callq 0x671d5
addq $0x1000, %r13           # imm = 0x1000
incq %r15
jmp 0x674a0
movq 0x30(%rsp), %rcx
incq %rcx
addq %r12, 0x10(%rsp)
jmp 0x67459
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x54bf4(%rip), %rdi     # 0xbc0fb
leaq 0x54c01(%rip), %rsi     # 0xbc10f
leaq 0x54c3b(%rip), %rcx     # 0xbc150
movl $0xab, %edx
callq 0x262d0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/memtest.c
// Function: memtest_compare
int memtest_compare(unsigned long *l, size_t bytes, int interactive) {
    unsigned long words = bytes/sizeof(unsigned long)/2;
    unsigned long w, *l1, *l2;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
testw $0xfff, %r14w           # imm = 0xFFF
jne 0x6759a
movl %edx, %ebp
movq %rdi, %rbx
shrq $0x4, %r14
xorl %r15d, %r15d
pushq $0x3d
popq %r12
xorl %r13d, %r13d
cmpq %r13, %r14
je 0x67588
movq (%rbx), %rcx
movq (%rbx,%r14,8), %r8
cmpq %r8, %rcx
jne 0x67580
testl %ebp, %ebp
sete %al
testw %r13w, %r13w
setne %cl
orb %al, %cl
jne 0x67577
movq %r13, %rdi
movq %r14, %rsi
movl %r12d, %edx
callq 0x671d5
addq $0x8, %rbx
incq %r13
jmp 0x67548
testl %ebp, %ebp
jne 0x675b9
pushq $0x1
popq %r15
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x54b5a(%rip), %rdi     # 0xbc0fb
leaq 0x54b67(%rip), %rsi     # 0xbc10f
leaq 0x54bfb(%rip), %rcx     # 0xbc1aa
movl $0xc6, %edx
callq 0x262d0
leaq (%rbx,%r14,8), %rdx
leaq 0x54c18(%rip), %rdi     # 0xbc1dc
movq %rbx, %rsi
xorl %eax, %eax
callq 0x260a0
pushq $0x1
popq %rdi
callq 0x262c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/memtest.c
// Function: memtest_compare_times
int memtest_compare_times(unsigned long *m, size_t bytes, int pass, int times,
                          int interactive)
{
    int j;
    int errors = 0;

    for (j = 0; j < times; j++) {
        if (interactive) memtest_progress_start("Compare",pass);
        errors += memtest_compare(m,bytes,interactive);
        if (interactive) memtest_progress_end();
    }
    return errors;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movl %ecx, %ebp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %r13
xorl %r12d, %r12d
testl %ecx, %ecx
cmovlel %r12d, %ebp
subl $0x1, %ebp
jb 0x6762b
testl %ebx, %ebx
je 0x67610
leaq 0x54c07(%rip), %rdi     # 0xbc20f
movl %r14d, %esi
callq 0x67108
movq %r13, %rdi
movq %r15, %rsi
movl %ebx, %edx
callq 0x6751f
addl %eax, %r12d
testl %ebx, %ebx
je 0x675f8
callq 0x671c7
jmp 0x675f8
movl %r12d, %eax
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/memtest.c
// Function: memtest_alloc_and_test
void memtest_alloc_and_test(size_t megabytes, int passes) {
    size_t bytes = megabytes*1024*1024;
    unsigned long *m = malloc(bytes);

    if (m == NULL) {
        fprintf(stderr,"Unable to allocate %zu megabytes: %s",
            megabytes, strerror(errno));
        exit(1);
    }
    memtest_test(m,bytes,passes,1);
    free(m);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq %rdi, %r14
shlq $0x14, %r14
movq %r14, %rdi
callq 0x26360
testq %rax, %rax
je 0x67a7e
movq %rax, %r15
pushq $0x1
popq %rcx
movq %rax, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0x6763d
movq %r15, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x264d0
movq 0x8d543(%rip), %rax     # 0xf4fc8
movq (%rax), %r14
callq 0x26880
movl (%rax), %edi
callq 0x26680
leaq 0x547b5(%rip), %rsi     # 0xbc250
movq %r14, %rdi
movq %rbx, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x26b90
pushq $0x1
popq %rdi
callq 0x262c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/memtest.c
// Function: memtest
void memtest(size_t megabytes, int passes) {
    if (ioctl(1, TIOCGWINSZ, &ws) == -1) {
        ws.ws_col = 80;
        ws.ws_row = 20;
    }
    memtest_alloc_and_test(megabytes,passes);
    printf("\nYour memory passed this test.\n");
    printf("Please if you are still in doubt use the following two tools:\n");
    printf("1) memtest86: http://www.memtest86.com/\n");
    printf("2) memtester: http://pyropus.ca/software/memtester/\n");
    exit(0);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
leaq 0xa6bfd(%rip), %rdx     # 0x10e6c0
pushq $0x1
popq %rdi
movl $0x5413, %esi           # imm = 0x5413
xorl %eax, %eax
callq 0x261b0
cmpl $-0x1, %eax
jne 0x67ae1
movl $0x500014, 0xa6bdf(%rip) # imm = 0x500014
movq %r14, %rdi
movl %ebx, %esi
callq 0x67a39
leaq 0x547c2(%rip), %rdi     # 0xbc2b4
callq 0x26250
leaq 0x547d5(%rip), %rdi     # 0xbc2d3
callq 0x26250
leaq 0x54807(%rip), %rdi     # 0xbc311
callq 0x26250
leaq 0x54823(%rip), %rdi     # 0xbc339
callq 0x26250
xorl %edi, %edi
callq 0x262c0
nop
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/bitops.c
// Function: setUnsignedBitfield
void setUnsignedBitfield(unsigned char *p, uint64_t offset, uint64_t bits, uint64_t value) {
    uint64_t byte, bit, byteval, bitval, j;

    for (j = 0; j < bits; j++) {
        bitval = (value & ((uint64_t)1<<(bits-1-j))) != 0;
        byte = offset >> 3;
        bit = 7 - (offset & 0x7);
        byteval = p[byte];
        byteval &= ~(1 << bit);
        byteval |= bitval << bit;
        p[byte] = byteval & 0xff;
        offset++;
    }
}

// Assembly:
movq %rcx, %rax
decq %rdx
cmpq $-0x1, %rdx
je 0x67de4
xorl %r8d, %r8d
btq %rdx, %rax
setb %r8b
movq %rsi, %r9
shrq $0x3, %r9
movl %esi, %ecx
notb %cl
andb $0x7, %cl
movzbl (%rdi,%r9), %r10d
btrl %ecx, %r10d
shll %cl, %r8d
orl %r10d, %r8d
movb %r8b, (%rdi,%r9)
incq %rsi
jmp 0x67daa
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/bitops.c
// Function: getUnsignedBitfield
uint64_t getUnsignedBitfield(unsigned char *p, uint64_t offset, uint64_t bits) {
    uint64_t byte, bit, byteval, bitval, j, value = 0;

    for (j = 0; j < bits; j++) {
        byte = offset >> 3;
        bit = 7 - (offset & 0x7);
        byteval = p[byte];
        bitval = (byteval >> bit) & 1;
        value = (value<<1) | bitval;
        offset++;
    }
    return value;
}

// Assembly:
xorl %eax, %eax
subq $0x1, %rdx
jb 0x67e1f
movq %rsi, %rcx
shrq $0x3, %rcx
movzbl (%rdi,%rcx), %ecx
movl %esi, %r8d
notb %r8b
movzbl %r8b, %r8d
andl $0x7, %r8d
xorl %r9d, %r9d
btl %r8d, %ecx
setb %r9b
leaq (%r9,%rax,2), %rax
incq %rsi
jmp 0x67dec
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/bitops.c
// Function: checkUnsignedBitfieldOverflow
int checkUnsignedBitfieldOverflow(uint64_t value, int64_t incr, uint64_t bits, int owtype, uint64_t *limit) {
    uint64_t max = (bits == 64) ? UINT64_MAX : (((uint64_t)1<<bits)-1);
    int64_t maxincr = max-value;
    int64_t minincr = -value;

    if (value > max || (incr > 0 && incr > maxincr)) {
        if (limit) {
            if (owtype == BFOVERFLOW_WRAP) {
                goto handle_wrap;
            } else if (owtype == BFOVERFLOW_SAT) {
                *limit = max;
            }
        }
        return 1;
    } else if (incr < 0 && incr < minincr) {
        if (limit) {
            if (owtype == BFOVERFLOW_WRAP) {
                goto handle_wrap;
            } else if (owtype == BFOVERFLOW_SAT) {
                *limit = 0;
            }
        }
        return -1;
    }
    return 0;

handle_wrap:
    {
        uint64_t mask = ((uint64_t)-1) << bits;
        uint64_t res = value+incr;

        res &= ~mask;
        *limit = res;
    }
    return 1;
}

// Assembly:
movl %ecx, %r9d
movq %rdx, %rcx
pushq $-0x1
popq %r10
movq %r10, %rdx
shlq %cl, %rdx
cmpq $0x40, %rcx
notq %rdx
cmovneq %rdx, %r10
movq %r10, %rax
subq %rdi, %rax
jb 0x67e79
testq %rsi, %rsi
setle %cl
cmpq %rsi, %rax
setge %al
orb %cl, %al
jne 0x67e8d
pushq $0x1
popq %rax
testq %r8, %r8
je 0x67e8c
testl %r9d, %r9d
je 0x67eba
cmpl $0x1, %r9d
je 0x67ec7
retq
movq %rdi, %rax
negq %rax
testq %rsi, %rsi
setns %cl
cmpq %rsi, %rax
setle %r10b
xorl %eax, %eax
orb %cl, %r10b
jne 0x67e8c
pushq $-0x1
popq %rax
testq %r8, %r8
je 0x67e8c
cmpl $0x1, %r9d
je 0x67ece
testl %r9d, %r9d
jne 0x67e8c
pushq $0x1
popq %r9
addq %rdi, %rsi
andq %rdx, %rsi
movq %rsi, %r10
movq %r10, (%r8)
movl %r9d, %eax
retq
xorl %r10d, %r10d
movl %eax, %r9d
jmp 0x67ec7
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/bitops.c
// Function: checkSignedBitfieldOverflow
int checkSignedBitfieldOverflow(int64_t value, int64_t incr, uint64_t bits, int owtype, int64_t *limit) {
    int64_t max = (bits == 64) ? INT64_MAX : (((int64_t)1<<(bits-1))-1);
    int64_t min = (-max)-1;

    /* Note that maxincr and minincr could overflow, but we use the values
     * only after checking 'value' range, so when we use it no overflow
     * happens. */
    int64_t maxincr = max-value;
    int64_t minincr = min-value;

    if (value > max || (bits != 64 && incr > maxincr) || (value >= 0 && incr > 0 && incr > maxincr))
    {
        if (limit) {
            if (owtype == BFOVERFLOW_WRAP) {
                goto handle_wrap;
            } else if (owtype == BFOVERFLOW_SAT) {
                *limit = max;
            }
        }
        return 1;
    } else if (value < min || (bits != 64 && incr < minincr) || (value < 0 && incr < 0 && incr < minincr)) {
        if (limit) {
            if (owtype == BFOVERFLOW_WRAP) {
                goto handle_wrap;
            } else if (owtype == BFOVERFLOW_SAT) {
                *limit = min;
            }
        }
        return -1;
    }
    return 0;

handle_wrap:
    {
        uint64_t mask = ((uint64_t)-1) << bits;
        uint64_t msb = (uint64_t)1 << (bits-1);
        uint64_t a = value, b = incr, c;
        c = a+b; /* Perform addition as unsigned so that's defined. */

        /* If the sign bit is set, propagate to all the higher order
         * bits, to cap the negative value. If it's clear, mask to
         * the positive integer limit. */
        if (c & msb) {
            c |= mask;
        } else {
            c &= ~mask;
        }
        *limit = c;
    }
    return 1;
}

// Assembly:
movl %ecx, %r9d
leal -0x1(%rdx), %ecx
pushq $0x1
popq %r11
shlq %cl, %r11
leaq -0x1(%r11), %rax
cmpq $0x40, %rdx
movabsq $0x7fffffffffffffff, %r10 # imm = 0x7FFFFFFFFFFFFFFF
cmovneq %rax, %r10
movq %r10, %rax
subq %rdi, %rax
jl 0x67f1b
cmpq $0x40, %rdx
je 0x67f0c
cmpq %rsi, %rax
jl 0x67f1b
testq %rdi, %rdi
js 0x67f2f
testq %rsi, %rsi
jle 0x67f2f
cmpq %rsi, %rax
jge 0x67f2f
pushq $0x1
popq %rax
testq %r8, %r8
je 0x67f2e
testl %r9d, %r9d
je 0x67f67
cmpl $0x1, %r9d
je 0x67f8a
retq
notq %r10
cmpq %rdi, %r10
jg 0x67f54
movq %r10, %rcx
subq %rdi, %rcx
cmpq $0x40, %rdx
je 0x67f48
cmpq %rsi, %rcx
jg 0x67f54
xorl %eax, %eax
testq %rdi, %rsi
jns 0x67f2e
cmpq %rsi, %rcx
jle 0x67f2e
pushq $-0x1
popq %rax
testq %r8, %r8
je 0x67f2e
cmpl $0x1, %r9d
je 0x67f91
testl %r9d, %r9d
jne 0x67f2e
pushq $0x1
popq %r9
pushq $-0x1
popq %r10
movl %edx, %ecx
shlq %cl, %r10
addq %rdi, %rsi
movq %r10, %rax
orq %rsi, %rax
notq %r10
andq %rsi, %r10
testq %rsi, %r11
cmovneq %rax, %r10
movq %r10, (%r8)
movl %r9d, %eax
retq
movl %eax, %r9d
jmp 0x67f8a
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/bitops.c
// Function: printBits
void printBits(unsigned char *p, unsigned long count) {
    unsigned long j, i, byte;

    for (j = 0; j < count; j++) {
        byte = p[j];
        for (i = 0x80; i > 0; i /= 2)
            printf("%c", (byte & i) ? '1' : '0');
        printf("|");
    }
    printf("\n");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
pushq $0x31
popq %r12
cmpq %rbx, %r15
je 0x67fe7
movzbl (%r14,%r15), %r13d
movl $0x80, %ebp
testq %rbp, %rbp
je 0x67fda
movl %ebp, %eax
andl %r13d, %eax
cmpl $0x1, %eax
movl %r12d, %edi
sbbl $0x0, %edi
callq 0x26320
shrq %rbp
jmp 0x67fbd
pushq $0x7c
popq %rdi
callq 0x26320
incq %r15
jmp 0x67fae
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x26320
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/bitops.c
// Function: getBitOffsetFromArgument
int getBitOffsetFromArgument(client *c, robj *o, size_t *offset, int hash, int bits) {
    long long loffset;
    char *err = "bit offset is not an integer or out of range";
    char *p = o->ptr;
    size_t plen = sdslen(p);
    int usehash = 0;

    /* Handle #<offset> form. */
    if (p[0] == '#' && hash && bits > 0) usehash = 1;

    if (string2ll(p+usehash,plen-usehash,&loffset) == 0) {
        addReplyError(c,err);
        return C_ERR;
    }

    /* Adjust the offset by 'bits' for #<offset> form. */
    if (usehash) loffset *= bits;

    /* Limit offset to 512MB in bytes */
    if ((loffset < 0) || ((unsigned long long)loffset >> 3) >= (512*1024*1024))
    {
        addReplyError(c,err);
        return C_ERR;
    }

    *offset = (size_t)loffset;
    return C_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movl %r8d, %ebp
movl %ecx, %r15d
movq %rdx, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r12
movq %r12, %rdi
callq 0x680a1
cmpb $0x23, (%r12)
sete %cl
testl %r15d, %r15d
setne %dl
testl %ebp, %ebp
setg %r15b
andb %dl, %r15b
andb %cl, %r15b
movzbl %r15b, %ecx
addq %rcx, %r12
subq %rcx, %rax
leaq 0x8(%rsp), %rdx
movq %r12, %rdi
movq %rax, %rsi
callq 0x39865
testl %eax, %eax
je 0x6807b
testb %r15b, %r15b
je 0x6806d
movl %ebp, %eax
imulq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x68072
movq 0x8(%rsp), %rax
movq %rax, %rcx
shrq $0x20, %rcx
je 0x6808f
leaq 0x54ca7(%rip), %rsi     # 0xbcd29
movq %rbx, %rdi
callq 0x36b6f
pushq $-0x1
popq %rax
jmp 0x68094
movq %rax, (%r14)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/bitops.c
// Function: getBitfieldTypeFromArgument
int getBitfieldTypeFromArgument(client *c, robj *o, int *sign, int *bits) {
    char *p = o->ptr;
    char *err = "Invalid bitfield type. Use something like i16 u8. Note that u64 is not supported but i64 is.";
    long long llbits;

    if (p[0] == 'i') {
        *sign = 1;
    } else if (p[0] == 'u') {
        *sign = 0;
    } else {
        addReplyError(c,err);
        return C_ERR;
    }

    if ((string2ll(p+1,strlen(p+1),&llbits)) == 0 ||
        llbits < 1 ||
        (*sign == 1 && llbits > 64) ||
        (*sign == 0 && llbits > 63))
    {
        addReplyError(c,err);
        return C_ERR;
    }
    *bits = llbits;
    return C_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %r14
movq %rdx, %r15
movq %rdi, %rbx
movq 0x8(%rsi), %r12
movzbl (%r12), %eax
cmpl $0x69, %eax
je 0x68106
cmpl $0x75, %eax
jne 0x68166
xorl %eax, %eax
jmp 0x68109
pushq $0x1
popq %rax
movl %eax, (%r15)
incq %r12
movq %r12, %rdi
callq 0x26500
leaq 0x8(%rsp), %r13
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x39865
testl %eax, %eax
sete %cl
movq (%r13), %rax
testq %rax, %rax
setle %dl
orb %cl, %dl
jne 0x68166
movl (%r15), %ecx
cmpl $0x1, %ecx
sete %dl
cmpq $0x41, %rax
setae %sil
testb %sil, %dl
jne 0x68166
testl %ecx, %ecx
sete %cl
cmpq $0x40, %rax
setae %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x68186
leaq 0x54be9(%rip), %rsi     # 0xbcd56
movq %rbx, %rdi
callq 0x36b6f
pushq $-0x1
popq %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movl %eax, (%r14)
xorl %eax, %eax
jmp 0x68178
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/bitops.c
// Function: lookupStringForBitCommand
robj *lookupStringForBitCommand(client *c, size_t maxbit) {
    size_t byte = maxbit >> 3;
    robj *o = lookupKeyWrite(c->db,c->argv[1]);

    if (o == NULL) {
        o = createObject(OBJ_STRING,sdsnewlen(NULL, byte+1));
        dbAdd(c->db,c->argv[1],o);
    } else {
        if (checkType(c,o,OBJ_STRING)) return NULL;
        o = dbUnshareStringValue(c->db,c->argv[1],o);
        o->ptr = sdsgrowzero(o->ptr,byte+1);
    }
    return o;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
shrq $0x3, %rbx
movq 0x10(%rdi), %rdi
movq 0x40(%r14), %rax
movq 0x8(%rax), %rsi
callq 0x3aec2
testq %rax, %rax
je 0x681f8
movq %rax, %r12
xorl %r15d, %r15d
movq %r14, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x3a311
testl %eax, %eax
jne 0x68226
movq 0x10(%r14), %rdi
movq 0x40(%r14), %rax
movq 0x8(%rax), %rsi
movq %r12, %rdx
callq 0x3b27c
movq %rax, %r15
movq 0x8(%rax), %rdi
incq %rbx
movq %rbx, %rsi
callq 0x316f6
movq %rax, 0x8(%r15)
jmp 0x68226
incq %rbx
xorl %edi, %edi
movq %rbx, %rsi
callq 0x31018
xorl %edi, %edi
movq %rax, %rsi
callq 0x39d58
movq %rax, %r15
movq 0x10(%r14), %rdi
movq 0x40(%r14), %rax
movq 0x8(%rax), %rsi
movq %r15, %rdx
callq 0x3af45
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/bitops.c
// Function: getObjectReadOnlyString
unsigned char *getObjectReadOnlyString(robj *o, long *len, char *llbuf) {
    serverAssert(o->type == OBJ_STRING);
    unsigned char *p = NULL;

    /* Set the 'p' pointer to the string, that can be just a stack allocated
     * array if our string was integer encoded. */
    if (o && o->encoding == OBJ_ENCODING_INT) {
        p = (unsigned char*) llbuf;
        if (len) *len = ll2string(llbuf,LONG_STR_SIZE,(long)o->ptr);
    } else if (o) {
        p = (unsigned char*) o->ptr;
        if (len) *len = sdslen(o->ptr);
    } else {
        if (len) *len = 0;
    }
    return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl (%rdi), %eax
testb $0xf, %al
jne 0x68286
movq %rsi, %r14
andl $0xf0, %eax
cmpl $0x10, %eax
jne 0x68267
movq %rdx, %rbx
testq %r14, %r14
je 0x6827b
movq 0x8(%rdi), %rdx
pushq $0x15
popq %rsi
movq %rbx, %rdi
callq 0x39796
cltq
jmp 0x68278
movq 0x8(%rdi), %rbx
testq %r14, %r14
je 0x6827b
movq %rbx, %rdi
callq 0x680a1
movq %rax, (%r14)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x49657(%rip), %rdi     # 0xb18e4
leaq 0x54a8c(%rip), %rsi     # 0xbcd20
movl $0x1f4, %edx            # imm = 0x1F4
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/bitops.c
// Function: setbitCommand
void setbitCommand(client *c) {
    robj *o;
    char *err = "bit is not an integer or out of range";
    size_t bitoffset;
    ssize_t byte, bit;
    int byteval, bitval;
    long on;

    if (getBitOffsetFromArgument(c,c->argv[2],&bitoffset,0,0) != C_OK)
        return;

    if (getLongFromObjectOrReply(c,c->argv[3],&on,err) != C_OK)
        return;

    /* Bits can only be set or cleared... */
    if (on & ~1) {
        addReplyError(c,err);
        return;
    }

    if ((o = lookupStringForBitCommand(c,bitoffset)) == NULL) return;

    /* Get current values */
    byte = bitoffset >> 3;
    byteval = ((uint8_t*)o->ptr)[byte];
    bit = 7 - (bitoffset & 0x7);
    bitval = byteval & (1 << bit);

    /* Update byte with new bit value and return original value */
    byteval &= ~(1 << bit);
    byteval |= ((on & 0x1) << bit);
    ((uint8_t*)o->ptr)[byte] = byteval;
    signalModifiedKey(c->db,c->argv[1]);
    notifyKeyspaceEvent(NOTIFY_STRING,"setbit",c->argv[1],c->db->id);
    server.dirty++;
    addReply(c, bitval ? shared.cone : shared.czero);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x10(%rax), %rsi
leaq 0x8(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x67ffd
testl %eax, %eax
jne 0x683b1
movq 0x40(%rbx), %rax
movq 0x18(%rax), %rsi
leaq 0x54ad4(%rip), %rcx     # 0xbcdb3
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x3ab5e
testl %eax, %eax
jne 0x683b1
cmpq $0x2, (%rsp)
jae 0x683a2
movq 0x8(%rsp), %r14
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6818d
testq %rax, %rax
je 0x683b1
movq %r14, %rdx
shrq $0x3, %rdx
movq 0x8(%rax), %rax
movzbl (%rax,%rdx), %ebp
notb %r14b
andb $0x7, %r14b
movl %ebp, %esi
btrl %r14d, %esi
movl (%rsp), %edi
andl $0x1, %edi
movl %r14d, %ecx
shll %cl, %edi
orl %esi, %edi
movb %dil, (%rax,%rdx)
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x3b125
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x46106(%rip), %rsi     # 0xae470
pushq $0x8
popq %rdi
callq 0x6fb58
leaq 0x9152f(%rip), %rax     # 0xf98a8
incq 0x720(%rax)
movzbl %r14b, %eax
xorl %ecx, %ecx
btl %eax, %ebp
setb %cl
leaq 0x91f7d(%rip), %rax     # 0xfa310
movq 0x20(%rax,%rcx,8), %rsi
movq %rbx, %rdi
callq 0x36987
jmp 0x683b1
leaq 0x54a0a(%rip), %rsi     # 0xbcdb3
movq %rbx, %rdi
callq 0x36b6f
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq