LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
leaq 0xeab3e(%rip), %rax     # 0x1781d8
movl 0xa00(%rax), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movl $0xffffd8ee, %esi       # imm = 0xFFFFD8EE
leaq 0xaa985(%rip), %rdx     # 0x138038
callq 0xad850
movq -0x8(%rbp), %rdi
leaq 0xbe4aa(%rip), %rsi     # 0x14bb6d
callq 0xad410
movq -0x8(%rbp), %rdi
movl $0xfffffffe, %esi       # imm = 0xFFFFFFFE
callq 0xad800
movl $0x1, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x8d729
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x895c0
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq %rax, %rdx
callq 0xad390
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8d6dd
movl $0x1, 0xff589(%rip)     # 0x18ccbc
leaq 0xeaa9e(%rip), %rax     # 0x1781d8
movl $0x1, 0xa00(%rax)
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %esi
subl $0x1, %esi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0xae1c0
movl $0x0, 0xff558(%rip)     # 0x18ccbc
movl -0x1c(%rbp), %ecx
leaq 0xeaa6a(%rip), %rax     # 0x1781d8
movl %ecx, 0xa00(%rax)
movq -0x8(%rbp), %rdi
movl $0xfffffffd, %esi       # imm = 0xFFFFFFFD
callq 0xac570
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x84(%rbp)
movq -0x8(%rbp), %rdi
movl -0x84(%rbp), %esi
leaq -0x80(%rbp), %rdx
callq 0xaec40
cmpl $0x0, %eax
je 0x8d890
movq -0x8(%rbp), %rdi
leaq 0xb708b(%rip), %rsi     # 0x14485b
leaq -0x80(%rbp), %rdx
callq 0xaef40
leaq -0x80(%rbp), %rdi
addq $0x38, %rdi
leaq 0xb6967(%rip), %rsi     # 0x14414f
callq 0x266c0
cmpq $0x0, %rax
je 0x8d87c
callq 0x384f0
movq %rax, -0x98(%rbp)
movl -0x84(%rbp), %edx
leaq 0xb7059(%rip), %rax     # 0x144869
leaq 0xb704f(%rip), %rcx     # 0x144866
cmpl $0x0, %edx
cmoveq %rcx, %rax
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x78(%rbp)
je 0x8d839
movq -0x78(%rbp), %rax
movq %rax, -0xa0(%rbp)
jmp 0x8d849
leaq 0xb702e(%rip), %rax     # 0x14486e
movq %rax, -0xa0(%rbp)
jmp 0x8d849
movq -0x90(%rbp), %rdx
movq -0x98(%rbp), %rdi
movq -0xa0(%rbp), %rcx
leaq 0xb6ffa(%rip), %rsi     # 0x14485f
movb $0x0, %al
callq 0x395b0
movq %rax, %rdi
callq 0x88530
movl -0x58(%rbp), %edi
callq 0x8c770
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0x8d7a9
cmpl $0x0, -0x84(%rbp)
jne 0x8d8ad
leaq 0xb6fd8(%rip), %rdi     # 0x144878
callq 0x38510
movq %rax, %rdi
callq 0x88530
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
cmpl $0x2, -0xc(%rbp)
jne 0x8d90d
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x26760
movl %eax, -0x10(%rbp)
movl $0x1, 0xff3f9(%rip)     # 0x18cce8
cmpl $0x0, -0x10(%rbp)
je 0x8d902
cmpl $0x3c, -0x10(%rbp)
jg 0x8d902
movl $0x3c, -0x10(%rbp)
movslq -0x10(%rbp), %rax
movq %rax, 0xff3d3(%rip)     # 0x18cce0
cmpq $0x0, 0xff3cb(%rip)     # 0x18cce0
je 0x8d940
callq 0x384f0
movq %rax, %rdi
movq 0xff3ba(%rip), %rax     # 0x18cce0
movl %eax, %edx
leaq 0xb6f6b(%rip), %rsi     # 0x14489a
movb $0x0, %al
callq 0x395b0
movq %rax, %rdi
callq 0x88530
jmp 0x8d95e
callq 0x384f0
movq %rax, %rdi
leaq 0xb6f76(%rip), %rsi     # 0x1448c5
movb $0x0, %al
callq 0x395b0
movq %rax, %rdi
callq 0x88530
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl $0x0, -0x4c(%rbp)
cmpl $0x2, -0x4c(%rbp)
jge 0x8e130
movslq -0x4c(%rbp), %rax
leaq 0xfee40(%rip), %rdi     # 0x18cf10
imulq $0x28, %rax, %rax
addq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x26430
movslq -0x4c(%rbp), %rax
leaq 0xfee75(%rip), %rdi     # 0x18cf60
imulq $0x30, %rax, %rax
addq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x26510
callq 0x26e20
movq %rax, %rdx
movslq -0x4c(%rbp), %rcx
leaq 0xfeeb2(%rip), %rax     # 0x18cfc0
movq %rdx, (%rax,%rcx,8)
movslq -0x4c(%rbp), %rcx
leaq 0xfeeb3(%rip), %rax     # 0x18cfd0
movq $0x0, (%rax,%rcx,8)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x8e0bf
leaq -0x38(%rbp), %rdi
callq 0x26a50
leaq -0x38(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x268e0
cmpq $0x0, -0x48(%rbp)
jne 0x8e155
movq $0x1, -0x48(%rbp)
jmp 0x8e157
cmpq $0x400000, -0x48(%rbp)  # imm = 0x400000
jae 0x8e16e
movq -0x48(%rbp), %rax
shlq %rax
movq %rax, -0x48(%rbp)
jmp 0x8e157
movq -0x48(%rbp), %rsi
leaq -0x38(%rbp), %rdi
callq 0x267c0
movl $0x0, -0x4c(%rbp)
cmpl $0x2, -0x4c(%rbp)
jge 0x8e1e8
movslq -0x4c(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rcx
leaq -0x40(%rbp), %rdi
leaq -0x38(%rbp), %rsi
leaq 0x4d(%rip), %rdx        # 0x8e1f0
callq 0x26490
cmpl $0x0, %eax
je 0x8e1ca
movl $0x3, %edi
leaq 0xb6e86(%rip), %rsi     # 0x14503f
movb $0x0, %al
callq 0x2fc60
movl $0x1, %edi
callq 0x262d0
movq -0x40(%rbp), %rdx
movslq -0x4c(%rbp), %rcx
leaq 0xfee07(%rip), %rax     # 0x18cfe0
movq %rdx, (%rax,%rcx,8)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x8e182
addq $0x60, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movl $0x20, %edi
callq 0x3acd0
movq %rax, -0x28(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x26ce0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x18(%rax)
movslq -0x4(%rbp), %rax
leaq 0xfeac9(%rip), %rdi     # 0x18cf10
imulq $0x28, %rax, %rax
addq %rax, %rdi
callq 0x26b30
movslq -0x4(%rbp), %rcx
leaq 0xfeb62(%rip), %rax     # 0x18cfc0
movq (%rax,%rcx,8), %rdi
movq -0x28(%rbp), %rsi
callq 0x27000
movslq -0x4(%rbp), %rcx
leaq 0xfeb5a(%rip), %rax     # 0x18cfd0
movq (%rax,%rcx,8), %rdx
addq $0x1, %rdx
leaq 0xfeb4b(%rip), %rax     # 0x18cfd0
movq %rdx, (%rax,%rcx,8)
movslq -0x4(%rbp), %rax
leaq 0xfeacc(%rip), %rdi     # 0x18cf60
imulq $0x30, %rax, %rax
addq %rax, %rdi
callq 0x26270
movslq -0x4(%rbp), %rax
leaq 0xfea65(%rip), %rdi     # 0x18cf10
imulq $0x28, %rax, %rax
addq %rax, %rdi
callq 0x26c40
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movslq -0x4(%rbp), %rax
leaq 0xfea3a(%rip), %rdi     # 0x18cf10
imulq $0x28, %rax, %rax
addq %rax, %rdi
callq 0x26b30
movslq -0x4(%rbp), %rcx
leaq 0xfeae3(%rip), %rax     # 0x18cfd0
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
movslq -0x4(%rbp), %rax
leaq 0xfea10(%rip), %rdi     # 0x18cf10
imulq $0x28, %rax, %rax
addq %rax, %rdi
callq 0x26c40
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x0, -0x8(%rbp)
cmpl $0x2, -0x8(%rbp)
jge 0x8e5c3
movslq -0x8(%rbp), %rcx
leaq 0xfea9c(%rip), %rax     # 0x18cfe0
movq (%rax,%rcx,8), %rdi
callq 0x267a0
cmpl $0x0, %eax
jne 0x8e5b3
movslq -0x8(%rbp), %rcx
leaq 0xfea83(%rip), %rax     # 0x18cfe0
movq (%rax,%rcx,8), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x26080
movl %eax, -0x4(%rbp)
cmpl $0x0, %eax
je 0x8e59b
movl -0x8(%rbp), %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %edi
callq 0x26690
movl -0xc(%rbp), %edx
movq %rax, %rcx
movl $0x3, %edi
leaq 0xb6b6c(%rip), %rsi     # 0x1450fe
movb $0x0, %al
callq 0x2fc60
jmp 0x8e5b1
movl -0x8(%rbp), %edx
movl $0x3, %edi
leaq 0xb6b82(%rip), %rsi     # 0x14512c
movb $0x0, %al
callq 0x2fc60
jmp 0x8e5b3
jmp 0x8e5b5
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x8e52f
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xe20c5(%rip), %rsi     # 0x170700
movl $0x68, %edx
callq 0x26c60
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x50(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rdi
leaq 0xe20da(%rip), %rsi     # 0x170768
movl $0x68, %edx
callq 0x26c60
movslq -0x14(%rbp), %rdi
shlq $0x2, %rdi
callq 0x3acd0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movslq -0x14(%rbp), %rdi
shlq $0x2, %rdi
callq 0x3acd0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
movq -0x10(%rbp), %rsi
movslq -0x14(%rbp), %rdx
shlq $0x2, %rdx
callq 0x26c60
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x8e70e
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movslq -0x18(%rbp), %rcx
movl $0x0, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8e6e8
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x50(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x58(%rax)
callq 0x384f0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x60(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movl %edx, -0x18(%rbp)
movb -0x11(%rbp), %al
movb %al, -0xa0(%rbp)
leaq -0xa0(%rbp), %rdi
addq $0x1, %rdi
movslq -0x18(%rbp), %rdx
movl $0x7f, %esi
callq 0x477e0
addl $0x1, %eax
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xa4(%rbp)
cltq
movb $0xd, -0xa0(%rbp,%rax)
movl -0xa4(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0xa4(%rbp)
cltq
movb $0xa, -0xa0(%rbp,%rax)
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movslq -0xa4(%rbp), %rdx
callq 0x8e8e0
cmpq $0x0, %rax
jne 0x8e8c0
movq $0x0, -0x8(%rbp)
jmp 0x8e8cb
movslq -0xa4(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %edx
movl $0x24, %esi
callq 0x8e820
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x8e9fc
movq $0x0, -0x8(%rbp)
jmp 0x8ea59
cmpq $0x0, -0x20(%rbp)
jbe 0x8ea24
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x8e8e0
cmpq $0x0, %rax
jne 0x8ea24
movq $0x0, -0x8(%rbp)
jmp 0x8ea59
movq -0x10(%rbp), %rdi
leaq 0xaf859(%rip), %rsi     # 0x13e288
movl $0x2, %edx
callq 0x8e8e0
cmpq $0x0, %rax
jne 0x8ea49
movq $0x0, -0x8(%rbp)
jmp 0x8ea59
movq -0x28(%rbp), %rax
addq -0x20(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x8ec10
movq -0x10(%rbp), %rcx
subq 0x48(%rcx), %rax
cmpq -0x20(%rbp), %rax
jae 0x8eb49
movq $0x0, -0x8(%rbp)
jmp 0x8eb7e
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rsi
movq -0x10(%rbp), %rax
addq 0x48(%rax), %rsi
movq -0x20(%rbp), %rdx
callq 0x26c60
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x48(%rax), %rcx
movq %rcx, 0x48(%rax)
movq $0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rcx
movl $0x1, %edx
callq 0x26b10
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
addq 0x48(%rax), %rcx
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x8ed6c
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq -0x8(%rbp), %rcx
cmpq 0x50(%rcx), %rax
jl 0x8ed6c
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x26cf0
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x26070
movl %eax, %edi
callq 0x26560
movq -0x8(%rbp), %rax
movq $0x0, 0x48(%rax)
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
leaq 0xb5ed2(%rip), %rdi     # 0x145188
movb $0x0, %al
callq 0x260a0
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movzwl 0xfdd24(%rip), %ecx     # 0x18cff2
movzwl 0xfdd1b(%rip), %edx     # 0x18cff0
subl $0x2, %edx
imull %edx, %ecx
cmpl %ecx, %eax
jge 0x8f2f8
leaq 0xb5825(%rip), %rdi     # 0x144b0b
movb $0x0, %al
callq 0x260a0
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x8f2c4
leaq 0xb5e91(%rip), %rdi     # 0x145190
movb $0x0, %al
callq 0x260a0
leaq 0xb5ec3(%rip), %rdi     # 0x1451d0
movb $0x0, %al
callq 0x260a0
leaq 0xb5f04(%rip), %rdi     # 0x14521f
movb $0x0, %al
callq 0x260a0
movq -0x8(%rbp), %rsi
movl -0xc(%rbp), %edx
leaq 0xb5ef7(%rip), %rdi     # 0x145227
movb $0x0, %al
callq 0x260a0
movq $0x0, 0xfdcb6(%rip) # 0x18cff8
movzwl 0xfdca9(%rip), %eax     # 0x18cff2
movzwl 0xfdca0(%rip), %ecx     # 0x18cff0
subl $0x3, %ecx
imull %ecx, %eax
cltq
movq %rax, 0xfdca1(%rip)     # 0x18d000
movq 0xe3c92(%rip), %rax     # 0x172ff8
movq (%rax), %rdi
callq 0x26cf0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb %al, -0x11(%rbp)
movq -0x8(%rbp), %rax
imulq 0xfdc3f(%rip), %rax     # 0x18d000
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x10(%rbp)
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
subq 0xfdc14(%rip), %rcx     # 0x18cff8
cmpq %rcx, %rax
jae 0x8f409
movsbl -0x11(%rbp), %esi
leaq 0xab3ce(%rip), %rdi     # 0x13a7c2
movb $0x0, %al
callq 0x260a0
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x8f3d5
movq -0x20(%rbp), %rax
movq %rax, 0xfdbe4(%rip)     # 0x18cff8
movq 0xe3bdd(%rip), %rax     # 0x172ff8
movq (%rax), %rdi
callq 0x26cf0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
shrq $0x3, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x8f4bb
movq -0x38(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq $0x0, %rax
jne 0x8f4ab
cmpl $0x0, -0x1c(%rbp)
je 0x8f4ab
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
shlq %rsi
movl $0x41, %edx
callq 0x8f3a0
jmp 0x8f4ad
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x8f45f
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x8f569
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x38(%rbp), %rcx
cmpq %rcx, %rax
je 0x8f51b
cmpl $0x0, -0x1c(%rbp)
je 0x8f512
movq -0x38(%rbp), %rsi
movq -0x38(%rbp), %rax
movq (%rax), %rdx
leaq 0xb5d2f(%rip), %rdi     # 0x145230
movb $0x0, %al
callq 0x260a0
movl $0x1, %edi
callq 0x262d0
movl $0x1, -0x4(%rbp)
jmp 0x8f570
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq $0x0, %rax
jne 0x8f556
cmpl $0x0, -0x1c(%rbp)
je 0x8f556
movq -0x30(%rbp), %rdi
addq -0x28(%rbp), %rdi
movq -0x28(%rbp), %rsi
shlq %rsi
movl $0x41, %edx
callq 0x8f3a0
jmp 0x8f558
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x8f4cb
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq $0x200, -0x20(%rbp)     # imm = 0x200
movq -0x10(%rbp), %rax
shrq $0x3, %rax
shrq %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq -0x20(%rbp)
movq %rax, -0x30(%rbp)
movabsq $-0x2ececc2165024a9a, %rax # imm = 0xD13133DE9AFDB566
movq %rax, -0x58(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x10(%rbp), %rax
andq $0xfff, %rax            # imm = 0xFFF
cmpq $0x0, %rax
jne 0x8f5e2
jmp 0x8f601
leaq 0xb5c76(%rip), %rdi     # 0x14525f
leaq 0xb5c83(%rip), %rsi     # 0x145273
movl $0x92, %edx
leaq 0xb5c81(%rip), %rcx     # 0x14527d
callq 0x262e0
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x8f724
movq -0x8(%rbp), %rax
movq -0x38(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq -0x28(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x30(%rbp), %rax
jae 0x8f711
jmp 0x8f655
movq -0x58(%rbp), %rax
shrq $0xc, %rax
xorq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
shlq $0x19, %rax
xorq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
shrq $0x1b, %rax
xorq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movabsq $0x2545f4914f6cdd1d, %rax # imm = 0x2545F4914F6CDD1D
imulq -0x58(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, (%rax)
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
shlq $0x3, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rax
shlq $0x3, %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq $0x0, %rax
jne 0x8f6fe
cmpl $0x0, -0x14(%rbp)
je 0x8f6fe
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %rax
imulq -0x38(%rbp), %rax
addq %rax, %rdi
movq -0x28(%rbp), %rsi
movl $0x52, %edx
callq 0x8f3a0
jmp 0x8f700
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x8f645
jmp 0x8f713
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x8f609
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
shrq $0x3, %rax
shrq %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
andq $0xfff, %rax            # imm = 0xFFF
cmpq $0x0, %rax
jne 0x8f914
jmp 0x8f933
leaq 0xb5944(%rip), %rdi     # 0x14525f
leaq 0xb5951(%rip), %rsi     # 0x145273
movl $0xc6, %edx
leaq 0xb59e0(%rip), %rcx     # 0x14530e
callq 0x262e0
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x8fa04
movq -0x38(%rbp), %rax
movq (%rax), %rax
movq -0x40(%rbp), %rcx
cmpq (%rcx), %rax
je 0x8f9b1
cmpl $0x0, -0x1c(%rbp)
je 0x8f9a8
movq -0x38(%rbp), %rsi
movq -0x40(%rbp), %rdx
movq -0x38(%rbp), %rax
movq (%rax), %rcx
movq -0x40(%rbp), %rax
movq (%rax), %r8
leaq 0xb59a9(%rip), %rdi     # 0x145340
movb $0x0, %al
callq 0x260a0
movl $0x1, %edi
callq 0x262d0
movl $0x1, -0x4(%rbp)
jmp 0x8fa0b
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
andq $0xffff, %rax           # imm = 0xFFFF
cmpq $0x0, %rax
jne 0x8f9f1
cmpl $0x0, -0x1c(%rbp)
je 0x8f9f1
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl $0x3d, %edx
callq 0x8f3a0
jmp 0x8f9f3
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x8f956
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x8fa93
cmpl $0x0, -0x1c(%rbp)
je 0x8fa65
movl -0x14(%rbp), %esi
leaq 0xb5913(%rip), %rdi     # 0x145373
callq 0x8f2a0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x8f8e0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x8fa86
callq 0x8f380
jmp 0x8fa88
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x8fa48
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
shlq $0xa, %rax
shlq $0xa, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x26360
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x90078
movq 0xe2fae(%rip), %rax     # 0x172fe8
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x26880
movl (%rax), %edi
callq 0x26690
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq %rax, %rcx
leaq 0xb534d(%rip), %rsi     # 0x1453b4
movb $0x0, %al
callq 0x26ba0
movl $0x1, %edi
callq 0x262d0
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0xc(%rbp), %edx
movl $0x1, %ecx
callq 0x8faa0
movq -0x20(%rbp), %rdi
callq 0x264c0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x1, %edi
movl $0x5413, %esi           # imm = 0x5413
leaq 0xfcf30(%rip), %rdx     # 0x18cff0
movb $0x0, %al
callq 0x261b0
cmpl $-0x1, %eax
jne 0x900de
movw $0x50, 0xfcf1d(%rip)    # 0x18cff2
movw $0x14, 0xfcf12(%rip)    # 0x18cff0
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x90000
leaq 0xb52e8(%rip), %rdi     # 0x1453d9
movb $0x0, %al
callq 0x260a0
leaq 0xb52fa(%rip), %rdi     # 0x1453f9
movb $0x0, %al
callq 0x260a0
leaq 0xb532b(%rip), %rdi     # 0x145438
movb $0x0, %al
callq 0x260a0
leaq 0xb5346(%rip), %rdi     # 0x145461
movb $0x0, %al
callq 0x260a0
xorl %edi, %edi
callq 0x262d0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x48(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x907db
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
subq -0x48(%rbp), %rcx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
shrq $0x3, %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rcx
andq $0x7, %rcx
movl $0x7, %eax
subq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movl %eax, %ecx
movl $0x1, %eax
shll %cl, %eax
xorl $-0x1, %eax
cltq
andq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
shlq %cl, %rax
orq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
andq $0xff, %rax
movb %al, %dl
movq -0x8(%rbp), %rax
movq -0x28(%rbp), %rcx
movb %dl, (%rax,%rcx)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
jmp 0x9070c
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x908b6
movq -0x10(%rbp), %rax
shrq $0x3, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rcx
andq $0x7, %rcx
movl $0x7, %eax
subq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq -0x20(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x28(%rbp), %rcx
shrq %cl, %rax
andq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x48(%rbp), %rax
shlq %rax
orq -0x38(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0x90840
movq -0x48(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/bitops.c
// Function: getSignedBitfield
int64_t getSignedBitfield(unsigned char *p, uint64_t offset, uint64_t bits) {
    int64_t value;
    union {uint64_t u; int64_t i;} conv;

    /* Converting from unsigned to signed is undefined when the value does
     * not fit, however here we assume two's complement and the original value
     * was obtained from signed -> unsigned conversion, so we'll find the
     * most significant bit set if the original value was negative.
     *
     * Note that two's complement is mandatory for exact-width types
     * according to the C99 standard. */
    conv.u = getUnsignedBitfield(p,offset,bits);
    value = conv.i;

    /* If the top significant bit is 1, propagate it to all the
     * higher bits for two's complement representation of signed
     * integers. */
    if (value & ((uint64_t)1 << (bits-1)))
        value |= ((uint64_t)-1) << bits;
    return value;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x90820
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq -0x18(%rbp), %rcx
subq $0x1, %rcx
movl $0x1, %edx
shlq %cl, %rdx
movq %rdx, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
je 0x90927
movq -0x18(%rbp), %rcx
movq $-0x1, %rax
shlq %cl, %rax
orq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
cmpq $0x40, -0x20(%rbp)
jne 0x9096b
movq $-0x1, %rax
movq %rax, -0x60(%rbp)
jmp 0x9097f
movq -0x20(%rbp), %rcx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
subq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
xorl %eax, %eax
subq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
cmpq -0x38(%rbp), %rax
ja 0x909b8
cmpq $0x0, -0x18(%rbp)
jle 0x909e8
movq -0x18(%rbp), %rax
cmpq -0x40(%rbp), %rax
jle 0x909e8
cmpq $0x0, -0x30(%rbp)
je 0x909dc
cmpl $0x0, -0x24(%rbp)
jne 0x909c7
jmp 0x90a31
cmpl $0x1, -0x24(%rbp)
jne 0x909d8
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
jmp 0x909da
jmp 0x909dc
movl $0x1, -0x4(%rbp)
jmp 0x90a71
cmpq $0x0, -0x18(%rbp)
jge 0x90a26
movq -0x18(%rbp), %rax
cmpq -0x48(%rbp), %rax
jge 0x90a26
cmpq $0x0, -0x30(%rbp)
je 0x90a1d
cmpl $0x0, -0x24(%rbp)
jne 0x90a08
jmp 0x90a31
cmpl $0x1, -0x24(%rbp)
jne 0x90a19
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
jmp 0x90a1b
jmp 0x90a1d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x90a71
jmp 0x90a28
movl $0x0, -0x4(%rbp)
jmp 0x90a71
movq -0x20(%rbp), %rcx
movq $-0x1, %rax
shlq %cl, %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rax
xorq $-0x1, %rax
andq -0x58(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x90ce1
movq -0x8(%rbp), %rax
movq -0x18(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq %rax, -0x28(%rbp)
movq $0x80, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x90cc5
movq -0x28(%rbp), %rcx
andq -0x20(%rbp), %rcx
movl $0x30, %esi
movl $0x31, %eax
cmpq $0x0, %rcx
cmovnel %eax, %esi
leaq 0xa9b11(%rip), %rdi     # 0x13a7c2
movb $0x0, %al
callq 0x260a0
movq -0x20(%rbp), %rax
shrq %rax
movq %rax, -0x20(%rbp)
jmp 0x90c8a
leaq 0xb511d(%rip), %rdi     # 0x145de9
movb $0x0, %al
callq 0x260a0
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x90c68
leaq 0xa9151(%rip), %rdi     # 0x139e39
movb $0x0, %al
callq 0x260a0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
leaq 0xb50c9(%rip), %rax     # 0x145deb
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
callq 0x90e00
movq %rax, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x40(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x90d65
cmpl $0x0, -0x24(%rbp)
je 0x90d65
cmpl $0x0, -0x28(%rbp)
jle 0x90d65
movl $0x1, -0x4c(%rbp)
movq -0x40(%rbp), %rdi
movslq -0x4c(%rbp), %rax
addq %rax, %rdi
movq -0x48(%rbp), %rsi
movslq -0x4c(%rbp), %rax
subq %rax, %rsi
leaq -0x30(%rbp), %rdx
callq 0x47970
cmpl $0x0, %eax
jne 0x90d9f
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x42f90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x90df1
cmpl $0x0, -0x4c(%rbp)
je 0x90db2
movslq -0x28(%rbp), %rax
imulq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jl 0x90dc9
movq -0x30(%rbp), %rax
shrq $0x3, %rax
cmpq $0x20000000, %rax       # imm = 0x20000000
jb 0x90ddf
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x42f90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x90df1
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
leaq 0xb4f5d(%rip), %rax     # 0x145e18
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x69, %eax
jne 0x90ed7
movq -0x20(%rbp), %rax
movl $0x1, (%rax)
jmp 0x90f0a
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x75, %eax
jne 0x90eef
movq -0x20(%rbp), %rax
movl $0x0, (%rax)
jmp 0x90f08
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x42f90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x90f88
jmp 0x90f0a
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rdi
addq $0x1, %rdi
callq 0x264f0
movq -0x48(%rbp), %rdi
movq %rax, %rsi
leaq -0x40(%rbp), %rdx
callq 0x47970
cmpl $0x0, %eax
je 0x90f5f
cmpq $0x1, -0x40(%rbp)
jl 0x90f5f
movq -0x20(%rbp), %rax
cmpl $0x1, (%rax)
jne 0x90f4f
cmpq $0x40, -0x40(%rbp)
jg 0x90f5f
movq -0x20(%rbp), %rax
cmpl $0x0, (%rax)
jne 0x90f75
cmpq $0x3f, -0x40(%rbp)
jle 0x90f75
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x42f90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x90f88
movq -0x40(%rbp), %rax
movl %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)