LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbSaveObjectType
int rdbSaveObjectType(rio *rdb, robj *o) {
    switch (o->type) {
    case OBJ_STRING:
        return rdbSaveType(rdb,RDB_TYPE_STRING);
    case OBJ_LIST:
        if (o->encoding == OBJ_ENCODING_QUICKLIST)
            return rdbSaveType(rdb,RDB_TYPE_LIST_QUICKLIST);
        else
            serverPanic("Unknown list encoding");
    case OBJ_SET:
        if (o->encoding == OBJ_ENCODING_INTSET)
            return rdbSaveType(rdb,RDB_TYPE_SET_INTSET);
        else if (o->encoding == OBJ_ENCODING_HT)
            return rdbSaveType(rdb,RDB_TYPE_SET);
        else
            serverPanic("Unknown set encoding");
    case OBJ_ZSET:
        if (o->encoding == OBJ_ENCODING_ZIPLIST)
            return rdbSaveType(rdb,RDB_TYPE_ZSET_ZIPLIST);
        else if (o->encoding == OBJ_ENCODING_SKIPLIST)
            return rdbSaveType(rdb,RDB_TYPE_ZSET);
        else
            serverPanic("Unknown sorted set encoding");
    case OBJ_HASH:
        if (o->encoding == OBJ_ENCODING_ZIPLIST)
            return rdbSaveType(rdb,RDB_TYPE_HASH_ZIPLIST);
        else if (o->encoding == OBJ_ENCODING_HT)
            return rdbSaveType(rdb,RDB_TYPE_HASH);
        else
            serverPanic("Unknown hash encoding");
    default:
        serverPanic("Unknown object type");
    }
    return -1; /* avoid warning */
}

// Assembly:
pushq %rax
movl (%rsi), %eax
movl %eax, %ecx
andl $0xf, %ecx
cmpl $0x4, %ecx
ja 0x48aaf
leaq 0x79e12(%rip), %rdx     # 0xc2800
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq %rsp, %rsi
movb $0x0, (%rsi)
jmp 0x48a8e
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x48a72
cmpl $0x5, %eax
jne 0x48ac4
leaq 0x6(%rsp), %rsi
movb $0xd, (%rsi)
jmp 0x48a8e
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
je 0x48a7c
cmpl $0x6, %eax
jne 0x48ad9
leaq 0x2(%rsp), %rsi
movb $0xb, (%rsi)
jmp 0x48a8e
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x7, %eax
je 0x48a86
cmpl $0x5, %eax
jne 0x48aee
leaq 0x4(%rsp), %rsi
movb $0xc, (%rsi)
jmp 0x48a8e
andl $0xf0, %eax
cmpl $0x90, %eax
jne 0x48a9a
leaq 0x1(%rsp), %rsi
movb $0xe, (%rsi)
jmp 0x48a8e
leaq 0x7(%rsp), %rsi
movb $0x4, (%rsi)
jmp 0x48a8e
leaq 0x3(%rsp), %rsi
movb $0x2, (%rsi)
jmp 0x48a8e
leaq 0x5(%rsp), %rsi
movb $0x3, (%rsi)
movl $0x1, %edx
callq 0x47a98
popq %rcx
retq
leaq 0x79fb1(%rip), %rdi     # 0xc2a52
leaq 0x79f66(%rip), %rsi     # 0xc2a0e
movl $0x215, %edx            # imm = 0x215
jmp 0x48b01
leaq 0x78270(%rip), %rdi     # 0xc0d26
leaq 0x79f51(%rip), %rsi     # 0xc2a0e
movl $0x22c, %edx            # imm = 0x22C
jmp 0x48b01
leaq 0x79fb6(%rip), %rdi     # 0xc2a81
leaq 0x79f3c(%rip), %rsi     # 0xc2a0e
movl $0x22a, %edx            # imm = 0x22A
jmp 0x48b01
leaq 0x79f8a(%rip), %rdi     # 0xc2a6a
leaq 0x79f27(%rip), %rsi     # 0xc2a0e
movl $0x21c, %edx            # imm = 0x21C
jmp 0x48b01
leaq 0x781d1(%rip), %rdi     # 0xc0cc6
leaq 0x79f12(%rip), %rsi     # 0xc2a0e
movl $0x223, %edx            # imm = 0x223
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbSaveKeyValuePair
int rdbSaveKeyValuePair(rio *rdb, robj *key, robj *val,
                        long long expiretime, long long now)
{
    /* Save the expire time */
    if (expiretime != -1) {
        /* If this key is already expired skip it */
        if (expiretime < now) return 0;
        if (rdbSaveType(rdb,RDB_OPCODE_EXPIRETIME_MS) == -1) return -1;
        if (rdbSaveMillisecondTime(rdb,expiretime) == -1) return -1;
    }

    /* Save type, key, value */
    if (rdbSaveObjectType(rdb,val) == -1) return -1;
    if (rdbSaveStringObject(rdb,key) == -1) return -1;
    if (rdbSaveObject(rdb,val) == -1) return -1;
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
cmpq $-0x1, %rcx
je 0x48f1a
movq %rcx, %r12
xorl %ebp, %ebp
cmpq %r8, %rcx
jl 0x48f5a
leaq 0x7(%rsp), %rsi
movb $-0x4, (%rsi)
movl $0x1, %edx
movq %r14, %rdi
callq 0x47a98
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x48f5a
leaq 0x8(%rsp), %rsi
movq %r12, (%rsi)
movl $0x8, %edx
movq %r14, %rdi
callq 0x47a98
cmpl $-0x1, %eax
je 0x48f5a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x489d6
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x48f5a
movq %r14, %rdi
movq %r15, %rsi
callq 0x485f3
cmpl $-0x1, %eax
je 0x48f5a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x48b30
xorl %ecx, %ecx
cmpq $-0x1, %rax
setne %cl
leal -0x1(,%rcx,2), %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbSaveAuxField
int rdbSaveAuxField(rio *rdb, void *key, size_t keylen, void *val, size_t vallen) {
    if (rdbSaveType(rdb,RDB_OPCODE_AUX) == -1) return -1;
    if (rdbSaveRawString(rdb,key,keylen) == -1) return -1;
    if (rdbSaveRawString(rdb,val,vallen) == -1) return -1;
    return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %r15
leaq 0x7(%rsp), %rsi
movb $-0x6, (%rsi)
movl $0x1, %edx
callq 0x47a98
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x48fd1
movq %r15, %rdi
movq %r13, %rsi
movq %r12, %rdx
callq 0x48479
cmpq $-0x1, %rax
je 0x48fd1
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x48479
xorl %ecx, %ecx
cmpq $-0x1, %rax
setne %cl
leal -0x1(,%rcx,2), %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbSaveInfoAuxFields
int rdbSaveInfoAuxFields(rio *rdb) {
    int redis_bits = (sizeof(void*) == 8) ? 64 : 32;

    /* Add a few fields about the state when the RDB was created. */
    if (rdbSaveAuxFieldStrStr(rdb,"redis-ver",REDIS_VERSION) == -1) return -1;
    if (rdbSaveAuxFieldStrInt(rdb,"redis-bits",redis_bits) == -1) return -1;
    if (rdbSaveAuxFieldStrInt(rdb,"ctime",time(NULL)) == -1) return -1;
    if (rdbSaveAuxFieldStrInt(rdb,"used-mem",zmalloc_used_memory()) == -1) return -1;
    return 1;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x79a28(%rip), %rsi     # 0xc2aa3
leaq 0x76267(%rip), %rdx     # 0xbf2e9
callq 0x48fe2
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x490ee
leaq 0x79a15(%rip), %rsi     # 0xc2aad
movl $0x40, %edx
movq %rbx, %rdi
callq 0x49025
cmpl $-0x1, %eax
je 0x490ee
xorl %edi, %edi
callq 0x26cd0
leaq 0x79a00(%rip), %rsi     # 0xc2ab8
movq %rbx, %rdi
movq %rax, %rdx
callq 0x49025
cmpl $-0x1, %eax
je 0x490ee
callq 0x3847a
leaq 0x799ea(%rip), %rsi     # 0xc2abe
movq %rbx, %rdi
movq %rax, %rdx
callq 0x49025
xorl %ecx, %ecx
cmpl $-0x1, %eax
setne %cl
leal -0x1(,%rcx,2), %ebp
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbSaveRioWithEOFMark
int rdbSaveRioWithEOFMark(rio *rdb, int *error) {
    char eofmark[RDB_EOF_MARK_SIZE];

    getRandomHexChars(eofmark,RDB_EOF_MARK_SIZE);
    if (error) *error = 0;
    if (rioWrite(rdb,"$EOF:",5) == 0) goto werr;
    if (rioWrite(rdb,eofmark,RDB_EOF_MARK_SIZE) == 0) goto werr;
    if (rioWrite(rdb,"\r\n",2) == 0) goto werr;
    if (rdbSaveRio(rdb,error) == C_ERR) goto werr;
    if (rioWrite(rdb,eofmark,RDB_EOF_MARK_SIZE) == 0) goto werr;
    return C_OK;

werr: /* Write error. */
    /* Set 'error' only if not already set by rdbSaveRio() call. */
    if (error && *error == 0) *error = errno;
    return C_ERR;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rdi
movl $0x28, %esi
callq 0x40256
testq %rbx, %rbx
je 0x4940a
movl $0x0, (%rbx)
leaq 0x796c0(%rip), %r12     # 0xc2ad1
movl $0x5, %ebp
movq 0x20(%r14), %rax
movq 0x38(%r14), %rcx
cmpq %rbp, %rcx
movq %rbp, %r13
cmovbq %rcx, %r13
testq %rcx, %rcx
cmoveq %rbp, %r13
testq %rax, %rax
je 0x4943f
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *%rax
movq %r14, %rdi
movq %r12, %rsi
movq %r13, %rdx
callq *0x8(%r14)
testq %rax, %rax
je 0x4956a
addq %r13, %r12
addq %r13, 0x30(%r14)
subq %r13, %rbp
jne 0x49416
movl $0x28, %r13d
movq 0x20(%r14), %rax
movq 0x38(%r14), %rcx
cmpq %r13, %rcx
movq %r13, %r12
cmovbq %rcx, %r12
testq %rcx, %rcx
cmoveq %r13, %r12
testq %rax, %rax
je 0x49490
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *%rax
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x8(%r14)
testq %rax, %rax
je 0x4956a
addq %r12, %r15
addq %r12, 0x30(%r14)
subq %r12, %r13
jne 0x49467
leaq 0x7a923(%rip), %r15     # 0xc3ddc
movl $0x2, %r13d
movq 0x20(%r14), %rax
movq 0x38(%r14), %rcx
cmpq %r13, %rcx
movq %r13, %r12
cmovbq %rcx, %r12
testq %rcx, %rcx
cmoveq %r13, %r12
testq %rax, %rax
je 0x494e8
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *%rax
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x8(%r14)
testq %rax, %rax
je 0x4956a
addq %r12, %r15
addq %r12, 0x30(%r14)
subq %r12, %r13
jne 0x494bf
movq %r14, %rdi
movq %rbx, %rsi
callq 0x490f7
cmpl $-0x1, %eax
je 0x4956a
movq %rsp, %r15
movl $0x28, %r13d
movq 0x20(%r14), %rax
movq 0x38(%r14), %rcx
cmpq %r13, %rcx
movq %r13, %r12
cmovbq %rcx, %r12
testq %rcx, %rcx
cmoveq %r13, %r12
testq %rax, %rax
je 0x49548
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *%rax
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq *0x8(%r14)
testq %rax, %rax
je 0x4956a
addq %r12, %r15
addq %r12, 0x30(%r14)
subq %r12, %r13
jne 0x4951f
xorl %ebp, %ebp
jmp 0x49582
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rbx, %rbx
je 0x49582
cmpl $0x0, (%rbx)
jne 0x49582
callq 0x26880
movl (%rax), %eax
movl %eax, (%rbx)
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/rdb.c
// Function: startLoading
void startLoading(FILE *fp) {
    struct stat sb;

    /* Load the DB */
    server.loading = 1;
    server.loading_start_time = time(NULL);
    server.loading_loaded_bytes = 0;
    if (fstat(fileno(fp), &sb) == -1) {
        server.loading_total_bytes = 0;
    } else {
        server.loading_total_bytes = sb.st_size;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x90, %rsp
movq %rdi, %rbx
leaq 0xb75db(%rip), %r14     # 0x1018a8
movl $0x1, 0x31c(%r14)
xorl %r15d, %r15d
xorl %edi, %edi
callq 0x26cd0
movq %rax, 0x330(%r14)
movq %r15, 0x328(%r14)
movq %rbx, %rdi
callq 0x26070
movq %rsp, %rsi
movl %eax, %edi
callq 0x266e0
cmpl $-0x1, %eax
je 0x4a30c
movq 0x30(%rsp), %r15
movq %r15, 0x320(%r14)
addq $0x90, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbLoadProgressCallback
void rdbLoadProgressCallback(rio *r, const void *buf, size_t len) {
    if (server.rdb_checksum)
        rioGenericUpdateChecksum(r, buf, len);
    if (server.loading_process_events_interval_bytes &&
        (r->processed_bytes + len)/server.loading_process_events_interval_bytes > r->processed_bytes/server.loading_process_events_interval_bytes)
    {
        /* The DB can take some non trivial amount of time to load. Update
         * our cached time since it is used to create and update the last
         * interaction time with clients and for other important things. */
        updateCachedTime();
        if (server.masterhost && server.repl_state == REPL_STATE_TRANSFER)
            replicationSendNewlineToMaster();
        loadingProgress(r->processed_bytes);
        processEventsWhileBlocked();
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movq %rdi, %rbx
leaq 0xb752d(%rip), %r15     # 0x1018a8
cmpl $0x0, 0x754(%r15)
je 0x4a390
movq %rbx, %rdi
movq %r14, %rdx
callq 0x7278d
movq 0x338(%r15), %rdi
testq %rdi, %rdi
je 0x4a3ec
movq 0x30(%rbx), %rcx
addq %rcx, %r14
movq %r14, %rax
xorl %edx, %edx
divq %rdi
movq %rax, %rsi
movq %rcx, %rax
xorl %edx, %edx
divq %rdi
cmpq %rax, %rsi
jbe 0x4a3ec
callq 0x30c41
cmpq $0x0, 0x828(%r15)
je 0x4a3d9
cmpl $0xe, 0x84c(%r15)
jne 0x4a3d9
callq 0x456ae
movq 0x30(%rbx), %rdi
callq 0x4a320
popq %rbx
popq %r14
popq %r15
jmp 0x3f9e8
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/rdb.c
// Function: saveCommand
void saveCommand(client *c) {
    if (server.rdb_child_pid != -1) {
        addReplyError(c,"Background save already in progress");
        return;
    }
    if (rdbSave(server.rdb_filename) == C_OK) {
        addReply(c,shared.ok);
    } else {
        addReply(c,shared.err);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
leaq 0xb6810(%rip), %rax     # 0x1018a8
cmpl $-0x1, 0x730(%rax)
je 0x4b0b1
leaq 0x77f8e(%rip), %rsi     # 0xc3036
movq %rbx, %rdi
popq %rbx
jmp 0x3cc06
movq 0x748(%rax), %rdi
callq 0x49593
testl %eax, %eax
je 0x4b0ce
leaq 0xb7248(%rip), %rax     # 0x102310
movq 0x10(%rax), %rsi
jmp 0x4b0d9
leaq 0xb723b(%rip), %rax     # 0x102310
movq 0x8(%rax), %rsi
movq %rbx, %rdi
popq %rbx
jmp 0x3c854
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/rdb.c
// Function: bgsaveCommand
void bgsaveCommand(client *c) {
    int schedule = 0;

    /* The SCHEDULE option changes the behavior of BGSAVE when an AOF rewrite
     * is in progress. Instead of returning an error a BGSAVE gets scheduled. */
    if (c->argc > 1) {
        if (c->argc == 2 && !strcasecmp(c->argv[1]->ptr,"schedule")) {
            schedule = 1;
        } else {
            addReply(c,shared.syntaxerr);
            return;
        }
    }

    if (server.rdb_child_pid != -1) {
        addReplyError(c,"Background save already in progress");
    } else if (server.aof_child_pid != -1) {
        if (schedule) {
            server.rdb_bgsave_scheduled = 1;
            addReplyStatus(c,"Background saving scheduled");
        } else {
            addReplyError(c,
                "An AOF log rewriting in progress: can't BGSAVE right now. "
                "Use BGSAVE SCHEDULE in order to schedule a BGSAVE whenver "
                "possible.");
        }
    } else if (rdbSaveBackground(server.rdb_filename) == C_OK) {
        addReplyStatus(c,"Background saving started");
    } else {
        addReply(c,shared.err);
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x38(%rdi), %ebp
cmpl $0x2, %ebp
jge 0x4b115
leaq 0xb67b1(%rip), %rax     # 0x1018a8
cmpl $-0x1, 0x730(%rax)
je 0x4b14f
leaq 0x77f2f(%rip), %rsi     # 0xc3036
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3cc06
jne 0x4b133
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x77f30(%rip), %rsi     # 0xc305a
callq 0x262f0
testl %eax, %eax
je 0x4b0f0
leaq 0xb71d6(%rip), %rax     # 0x102310
movq 0x80(%rax), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3c854
cmpl $-0x1, 0x69c(%rax)
je 0x4b166
cmpl $0x2, %ebp
jge 0x4b183
leaq 0x77f1b(%rip), %rsi     # 0xc307f
jmp 0x4b107
movq 0x748(%rax), %rdi
callq 0x49797
testl %eax, %eax
je 0x4b196
leaq 0xb7193(%rip), %rax     # 0x102310
movq 0x10(%rax), %rsi
jmp 0x4b141
movl $0x1, 0x778(%rax)
leaq 0x77ecf(%rip), %rsi     # 0xc3063
jmp 0x4b19d
leaq 0x77f60(%rip), %rsi     # 0xc30fd
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3cdcb
nop
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_string.c
// Function: setGenericCommand
void setGenericCommand(client *c, int flags, robj *key, robj *val, robj *expire, int unit, robj *ok_reply, robj *abort_reply) {
    long long milliseconds = 0; /* initialized to avoid any harmness warning */

    if (expire) {
        if (getLongLongFromObjectOrReply(c, expire, &milliseconds, NULL) != C_OK)
            return;
        if (milliseconds <= 0) {
            addReplyErrorFormat(c,"invalid expire time in %s",c->cmd->name);
            return;
        }
        if (unit == UNIT_SECONDS) milliseconds *= 1000;
    }

    if ((flags & OBJ_SET_NX && lookupKeyWrite(c->db,key) != NULL) ||
        (flags & OBJ_SET_XX && lookupKeyWrite(c->db,key) == NULL))
    {
        addReply(c, abort_reply ? abort_reply : shared.nullbulk);
        return;
    }
    setKey(c->db,key,val);
    server.dirty++;
    if (expire) setExpire(c->db,key,mstime()+milliseconds);
    notifyKeyspaceEvent(NOTIFY_STRING,"set",key,c->db->id);
    if (expire) notifyKeyspaceEvent(NOTIFY_GENERIC,
        "expire",key,c->db->id);
    addReply(c, ok_reply ? ok_reply : shared.ok);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r14
movl %esi, %ebp
movq %rdi, %rbx
movq $0x0, (%rsp)
testq %r8, %r8
je 0x4b20a
movl %r9d, %r13d
movq %rsp, %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0x416bb
testl %eax, %eax
jne 0x4b2fc
movq (%rsp), %rax
testq %rax, %rax
jle 0x4b30b
testl %r13d, %r13d
jne 0x4b20a
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, (%rsp)
testb $0x1, %bpl
je 0x4b225
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x41ad6
testq %rax, %rax
jne 0x4b2ae
testb $0x2, %bpl
je 0x4b23c
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x41ad6
testq %rax, %rax
je 0x4b2ae
movq 0x40(%rsp), %r13
movq 0x10(%rbx), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x41cd2
leaq 0xb6651(%rip), %rax     # 0x1018a8
incq 0x720(%rax)
movq 0x10(%rbx), %r12
testq %r15, %r15
je 0x4b2c8
callq 0x2ffce
addq (%rsp), %rax
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x430b0
movq 0x10(%rbx), %rax
movl 0x30(%rax), %ecx
leaq 0x72639(%rip), %rsi     # 0xbd8c5
movl $0x8, %edi
movq %r14, %rdx
callq 0x7c665
movq 0x10(%rbx), %rax
movl 0x30(%rax), %ecx
leaq 0x84064(%rip), %rsi     # 0xcf30b
movl $0x4, %edi
jmp 0x4b2d9
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
jne 0x4b2c3
leaq 0xb7051(%rip), %rax     # 0x102310
movq 0x50(%rax), %rsi
movq %rbx, %rdi
jmp 0x4b2f7
movl 0x30(%r12), %ecx
leaq 0x725f1(%rip), %rsi     # 0xbd8c5
movl $0x8, %edi
movq %r14, %rdx
callq 0x7c665
testq %r13, %r13
jne 0x4b2f1
leaq 0xb7023(%rip), %rax     # 0x102310
movq 0x8(%rax), %r13
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3c854
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x48(%rbx), %rax
movq (%rax), %rdx
leaq 0x77f03(%rip), %rsi     # 0xc321c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3cc2d
jmp 0x4b2fc
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_string.c
// Function: getGenericCommand
int getGenericCommand(client *c) {
    robj *o;

    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.nullbulk)) == NULL)
        return C_OK;

    if (o->type != OBJ_STRING) {
        addReply(c,shared.wrongtypeerr);
        return C_ERR;
    } else {
        addReplyBulk(c,o);
        return C_OK;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xb6cf4(%rip), %r14     # 0x102310
movq 0x50(%r14), %rdx
callq 0x41af9
xorl %ebp, %ebp
testq %rax, %rax
je 0x4b64f
testb $0xf, (%rax)
je 0x4b644
movq 0x70(%r14), %rsi
movq %rbx, %rdi
callq 0x3c854
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0x4b64f
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3d170
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_string.c
// Function: getsetCommand
void getsetCommand(client *c) {
    if (getGenericCommand(c) == C_ERR) return;
    c->argv[2] = tryObjectEncoding(c->argv[2]);
    setKey(c->db,c->argv[1],c->argv[2]);
    notifyKeyspaceEvent(NOTIFY_STRING,"set",c->argv[1],c->db->id);
    server.dirty++;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x4b606
cmpl $-0x1, %eax
je 0x4b6c1
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rdi
callq 0x40e09
movq 0x40(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
callq 0x41cd2
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x7221c(%rip), %rsi     # 0xbd8c5
movl $0x8, %edi
callq 0x7c665
leaq 0xb61ee(%rip), %rax     # 0x1018a8
incq 0x720(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_string.c
// Function: getrangeCommand
void getrangeCommand(client *c) {
    robj *o;
    long long start, end;
    char *str, llbuf[32];
    size_t strlen;

    if (getLongLongFromObjectOrReply(c,c->argv[2],&start,NULL) != C_OK)
        return;
    if (getLongLongFromObjectOrReply(c,c->argv[3],&end,NULL) != C_OK)
        return;
    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.emptybulk)) == NULL ||
        checkType(c,o,OBJ_STRING)) return;

    if (o->encoding == OBJ_ENCODING_INT) {
        str = llbuf;
        strlen = ll2string(llbuf,sizeof(llbuf),(long)o->ptr);
    } else {
        str = o->ptr;
        strlen = sdslen(str);
    }

    /* Convert negative indexes */
    if (start < 0 && end < 0 && start > end) {
        addReply(c,shared.emptybulk);
        return;
    }
    if (start < 0) start = strlen+start;
    if (end < 0) end = strlen+end;
    if (start < 0) start = 0;
    if (end < 0) end = 0;
    if ((unsigned long long)end >= strlen) end = strlen-1;

    /* Precondition: end >= 0 && end < strlen, so the only condition where
     * nothing can be returned is: start > end. */
    if (start > end || strlen == 0) {
        addReply(c,shared.emptybulk);
    } else {
        addReplyBulkCBuffer(c,(char*)str+start,end-start+1);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x10(%rax), %rsi
leaq 0x8(%rsp), %rdx
xorl %ecx, %ecx
callq 0x416bb
testl %eax, %eax
jne 0x4badb
movq 0x40(%rbx), %rax
movq 0x18(%rax), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x416bb
testl %eax, %eax
je 0x4bae7
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0xb681a(%rip), %r12     # 0x102310
movq 0x18(%r12), %rdx
movq %rbx, %rdi
callq 0x41af9
testq %rax, %rax
je 0x4badb
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x40d47
testl %eax, %eax
jne 0x4badb
movl $0xf0, %eax
andl (%r14), %eax
movq 0x8(%r14), %r14
cmpl $0x10, %eax
jne 0x4bb49
leaq 0x10(%rsp), %r15
movl $0x20, %esi
movq %r15, %rdi
movq %r14, %rdx
callq 0x3ff83
cltq
movq %r15, %r14
jmp 0x4bb51
movq %r14, %rdi
callq 0x4ba64
movq 0x8(%rsp), %rcx
movq (%rsp), %rdx
testq %rcx, %rcx
jns 0x4bb7b
testq %rdx, %rdx
jns 0x4bb7b
cmpq %rdx, %rcx
jle 0x4bb7b
movq 0x18(%r12), %rsi
movq %rbx, %rdi
callq 0x3c854
jmp 0x4badb
testq %rcx, %rcx
jns 0x4bb88
addq %rax, %rcx
movq %rcx, 0x8(%rsp)
testq %rdx, %rdx
jns 0x4bb94
addq %rax, %rdx
movq %rdx, (%rsp)
testq %rcx, %rcx
jns 0x4bba4
movq $0x0, 0x8(%rsp)
xorl %ecx, %ecx
xorl %esi, %esi
testq %rdx, %rdx
setns %dil
cmovgq %rdx, %rsi
leaq -0x1(%rax), %rdx
cmpq %rax, %rsi
setb %r8b
cmovbq %rsi, %rdx
testb %r8b, %dil
jne 0x4bbc9
movq %rdx, (%rsp)
subq %rcx, %rdx
jl 0x4bb69
testq %rax, %rax
je 0x4bb69
addq %rcx, %r14
incq %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3d346
jmp 0x4badb
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_string.c
// Function: mgetCommand
void mgetCommand(client *c) {
    int j;

    addReplyMultiBulkLen(c,c->argc-1);
    for (j = 1; j < c->argc; j++) {
        robj *o = lookupKeyRead(c->db,c->argv[j]);
        if (o == NULL) {
            addReply(c,shared.nullbulk);
        } else {
            if (o->type != OBJ_STRING) {
                addReply(c,shared.nullbulk);
            } else {
                addReplyBulk(c,o);
            }
        }
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movslq 0x38(%rdi), %rsi
decq %rsi
callq 0x3d274
cmpl $0x2, 0x38(%rbx)
jl 0x4bc50
movl $0x1, %r14d
leaq 0xb6700(%rip), %r15     # 0x102310
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq (%rax,%r14,8), %rsi
callq 0x41acf
testq %rax, %rax
je 0x4bc2b
testb $0xf, (%rax)
je 0x4bc39
movq 0x50(%r15), %rsi
movq %rbx, %rdi
callq 0x3c854
jmp 0x4bc44
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3d170
incq %r14
movslq 0x38(%rbx), %rax
cmpq %rax, %r14
jl 0x4bc10
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_string.c
// Function: msetGenericCommand
void msetGenericCommand(client *c, int nx) {
    int j, busykeys = 0;

    if ((c->argc % 2) == 0) {
        addReplyError(c,"wrong number of arguments for MSET");
        return;
    }
    /* Handle the NX flag. The MSETNX semantic is to return zero and don't
     * set nothing at all if at least one already key exists. */
    if (nx) {
        for (j = 1; j < c->argc; j += 2) {
            if (lookupKeyWrite(c->db,c->argv[j]) != NULL) {
                busykeys++;
            }
        }
        if (busykeys) {
            addReply(c, shared.czero);
            return;
        }
    }

    for (j = 1; j < c->argc; j += 2) {
        c->argv[j+1] = tryObjectEncoding(c->argv[j+1]);
        setKey(c->db,c->argv[j],c->argv[j+1]);
        notifyKeyspaceEvent(NOTIFY_STRING,"set",c->argv[j],c->db->id);
    }
    server.dirty += (c->argc-1)/2;
    addReply(c, nx ? shared.cone : shared.ok);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x38(%rdi), %eax
testb $0x1, %al
jne 0x4bc80
leaq 0x775df(%rip), %rsi     # 0xc324d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3cc06
movl %esi, %ebp
testl %esi, %esi
je 0x4bcd2
cmpl $0x2, %eax
jl 0x4bd39
xorl %r14d, %r14d
movl $0x1, %r15d
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rsi
callq 0x41ad6
cmpq $0x1, %rax
sbbl $-0x1, %r14d
addq $0x2, %r15
movl 0x38(%rbx), %eax
cmpl %r15d, %eax
jg 0x4bc98
testl %r14d, %r14d
je 0x4bcd2
leaq 0xb6647(%rip), %rax     # 0x102310
movq 0x20(%rax), %rsi
jmp 0x4bd6c
cmpl $0x2, %eax
jl 0x4bd39
movl $0x1, %r15d
leaq 0x71be1(%rip), %r14     # 0xbd8c5
movq 0x40(%rbx), %rax
movq 0x8(%rax,%r15,8), %rdi
callq 0x40e09
movq 0x40(%rbx), %rcx
movq %rax, 0x8(%rcx,%r15,8)
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq 0x8(%rax,%r15,8), %rdx
callq 0x41cd2
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq (%rcx,%r15,8), %rdx
movl 0x30(%rax), %ecx
movl $0x8, %edi
movq %r14, %rsi
callq 0x7c665
addq $0x2, %r15
movl 0x38(%rbx), %eax
cmpl %r15d, %eax
jg 0x4bce4
xorl %ecx, %ecx
testl %ebp, %ebp
setne %cl
movl %eax, %edx
decl %edx
shrl $0x1f, %edx
addl %edx, %eax
decl %eax
sarl %eax
cltq
leaq 0xb5b52(%rip), %rdx     # 0x1018a8
addq %rax, 0x720(%rdx)
leaq 0xb65ac(%rip), %rax     # 0x102310
shll $0x5, %ecx
movq 0x8(%rax,%rcx), %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x3c854
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_string.c
// Function: incrbyfloatCommand
void incrbyfloatCommand(client *c) {
    long double incr, value;
    robj *o, *new, *aux;

    o = lookupKeyWrite(c->db,c->argv[1]);
    if (o != NULL && checkType(c,o,OBJ_STRING)) return;
    if (getLongDoubleFromObjectOrReply(c,o,&value,NULL) != C_OK ||
        getLongDoubleFromObjectOrReply(c,c->argv[2],&incr,NULL) != C_OK)
        return;

    value += incr;
    if (isnan(value) || isinf(value)) {
        addReplyError(c,"increment would produce NaN or Infinity");
        return;
    }
    new = createStringObjectFromLongDouble(value,1);
    if (o)
        dbOverwrite(c->db,c->argv[1],new);
    else
        dbAdd(c->db,c->argv[1],new);
    signalModifiedKey(c->db,c->argv[1]);
    notifyKeyspaceEvent(NOTIFY_STRING,"incrbyfloat",c->argv[1],c->db->id);
    server.dirty++;
    addReplyBulk(c,new);

    /* Always replicate INCRBYFLOAT as a SET command with the final value
     * in order to make sure that differences in float precision or formatting
     * will not create differences in replicas or after an AOF restart. */
    aux = createStringObject("SET",3);
    rewriteClientCommandArgument(c,0,aux);
    decrRefCount(aux);
    rewriteClientCommandArgument(c,2,new);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x41ad6
movq %rax, %r14
testq %rax, %rax
je 0x4bfd6
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x40d47
testl %eax, %eax
jne 0x4c11c
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0x41571
testl %eax, %eax
jne 0x4c11c
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
leaq 0x30(%rsp), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x41571
testl %eax, %eax
jne 0x4c11c
fldt 0x30(%rsp)
fldt 0x20(%rsp)
faddp %st, %st(1)
fld %st(0)
fstpt 0x10(%rsp)
movzwl 0x18(%rsp), %eax
movq 0x10(%rsp), %rcx
fld %st(0)
fstpt 0x20(%rsp)
shrq $0x3f, %rcx
andl $0x7fff, %eax           # imm = 0x7FFF
leal -0x1(%rax), %edx
movzwl %dx, %edx
cmpl $0x7ffe, %edx           # imm = 0x7FFE
setb %dl
andb %cl, %dl
testq %rax, %rax
sete %al
orb %dl, %al
jne 0x4c069
fstp %st(0)
leaq 0x7723a(%rip), %rsi     # 0xc3296
movq %rbx, %rdi
callq 0x3cc06
jmp 0x4c11c
fstpt (%rsp)
movl $0x1, %edi
callq 0x407ac
movq %rax, %r15
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
movq %r15, %rdx
testq %r14, %r14
je 0x4c094
callq 0x41c77
jmp 0x4c099
callq 0x41b77
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x41d90
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
leaq 0x706ce(%rip), %rsi     # 0xbc78e
movl $0x8, %edi
callq 0x7c665
leaq 0xb57d7(%rip), %rax     # 0x1018a8
incq 0x720(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3d170
leaq 0x812ca(%rip), %rdi     # 0xcd3b4
movl $0x3, %esi
callq 0x40744
movq %rax, %r14
movq %rbx, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x3f7dc
movq %r14, %rdi
callq 0x40c8f
movq %rbx, %rdi
movl $0x2, %esi
movq %r15, %rdx
callq 0x3f7dc
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_string.c
// Function: strlenCommand
void strlenCommand(client *c) {
    robj *o;
    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL ||
        checkType(c,o,OBJ_STRING)) return;
    addReplyLongLong(c,stringObjectLen(o));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xb5fd7(%rip), %rax     # 0x102310
movq 0x20(%rax), %rdx
callq 0x41af9
testq %rax, %rax
je 0x4c35b
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x40d47
testl %eax, %eax
je 0x4c363
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %r14, %rdi
callq 0x41270
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3d23f
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: listTypePush
void listTypePush(robj *subject, robj *value, int where) {
    if (subject->encoding == OBJ_ENCODING_QUICKLIST) {
        int pos = (where == LIST_HEAD) ? QUICKLIST_HEAD : QUICKLIST_TAIL;
        value = getDecodedObject(value);
        size_t len = sdslen(value->ptr);
        quicklistPush(subject->ptr, value->ptr, len, pos);
        decrRefCount(value);
    } else {
        serverPanic("Unknown list encoding");
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl $0xf0, %eax
andl (%rdi), %eax
cmpl $0x90, %eax
jne 0x4c3fd
movl %edx, %ebp
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x41026
movq %rax, %r14
movq 0x8(%rax), %rsi
movzbl -0x1(%rsi), %edx
movl %edx, %eax
andl $0x7, %eax
xorl %ecx, %ecx
cmpl $0x4, %eax
ja 0x4c3e2
leaq 0x76f2f(%rip), %rdi     # 0xc32ec
movslq (%rdi,%rax,4), %rax
addq %rdi, %rax
jmpq *%rax
shrl $0x3, %edx
jmp 0x4c3e4
movq -0x11(%rsi), %rdx
jmp 0x4c3e4
movzwl -0x5(%rsi), %edx
jmp 0x4c3e4
movl -0x9(%rsi), %edx
jmp 0x4c3e4
movzbl -0x3(%rsi), %edx
jmp 0x4c3e4
xorl %edx, %edx
negl %ebp
sbbl %ecx, %ecx
movq 0x8(%rbx), %rdi
callq 0x2ca30
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x40c8f
leaq 0x7664e(%rip), %rdi     # 0xc2a52
leaq 0x76f31(%rip), %rsi     # 0xc333c
movl $0x31, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: listTypePop
robj *listTypePop(robj *subject, int where) {
    long long vlong;
    robj *value = NULL;

    int ql_where = where == LIST_HEAD ? QUICKLIST_HEAD : QUICKLIST_TAIL;
    if (subject->encoding == OBJ_ENCODING_QUICKLIST) {
        if (quicklistPopCustom(subject->ptr, ql_where, (unsigned char **)&value,
                               NULL, &vlong, listPopSaver)) {
            if (!value)
                value = createStringObjectFromLongLong(vlong);
        }
    } else {
        serverPanic("Unknown list encoding");
    }
    return value;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq $0x0, (%rsp)
movl $0xf0, %eax
andl (%rdi), %eax
cmpl $0x90, %eax
jne 0x4c488
xorl %eax, %eax
negl %esi
sbbl %eax, %eax
movq 0x8(%rdi), %rdi
leaq -0x33(%rip), %r9        # 0x4c41f
movq %rsp, %rbx
leaq 0x8(%rsp), %r8
movl %eax, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x2c88d
testl %eax, %eax
sete %cl
movq (%rbx), %rax
testq %rax, %rax
setne %dl
orb %cl, %dl
jne 0x4c482
movq 0x8(%rsp), %rdi
callq 0x40753
addq $0x10, %rsp
popq %rbx
retq
leaq 0x765c3(%rip), %rdi     # 0xc2a52
leaq 0x76ea6(%rip), %rsi     # 0xc333c
movl $0x45, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: listTypeLength
unsigned long listTypeLength(robj *subject) {
    if (subject->encoding == OBJ_ENCODING_QUICKLIST) {
        return quicklistCount(subject->ptr);
    } else {
        serverPanic("Unknown list encoding");
    }
}

// Assembly:
pushq %rax
movl $0xf0, %eax
andl (%rdi), %eax
cmpl $0x90, %eax
jne 0x4c4c6
movq 0x8(%rdi), %rdi
callq 0x2b654
movl %eax, %eax
popq %rcx
retq
leaq 0x76585(%rip), %rdi     # 0xc2a52
leaq 0x76e68(%rip), %rsi     # 0xc333c
movl $0x4e, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: listTypeInitIterator
listTypeIterator *listTypeInitIterator(robj *subject, long index,
                                       unsigned char direction) {
    listTypeIterator *li = zmalloc(sizeof(listTypeIterator));
    li->subject = subject;
    li->encoding = subject->encoding;
    li->direction = direction;
    li->iter = NULL;
    /* LIST_HEAD means start at TAIL and move *towards* head.
     * LIST_TAIL means start at HEAD and move *towards tail. */
    int iter_direction =
        direction == LIST_HEAD ? AL_START_TAIL : AL_START_HEAD;
    if (li->encoding == OBJ_ENCODING_QUICKLIST) {
        li->iter = quicklistGetIteratorAtIdx(li->subject->ptr,
                                             iter_direction, index);
    } else {
        serverPanic("Unknown list encoding");
    }
    return li;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r15
movl $0x18, %edi
callq 0x382d1
movq %rax, %r14
movq %r15, (%rax)
movb (%r15), %al
shrb $0x4, %al
movb %al, 0x8(%r14)
movb %bpl, 0x9(%r14)
movq $0x0, 0x10(%r14)
cmpb $0x9, %al
jne 0x4c548
xorl %esi, %esi
testb %bpl, %bpl
sete %sil
movq 0x8(%r15), %rdi
movq %rbx, %rdx
callq 0x270d9
movq %rax, 0x10(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x76503(%rip), %rdi     # 0xc2a52
leaq 0x76de6(%rip), %rsi     # 0xc333c
movl $0x62, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: listTypeNext
int listTypeNext(listTypeIterator *li, listTypeEntry *entry) {
    /* Protect from converting when iterating */
    serverAssert(li->subject->encoding == li->encoding);

    entry->li = li;
    if (li->encoding == OBJ_ENCODING_QUICKLIST) {
        return quicklistNext(li->iter, &entry->entry);
    } else {
        serverPanic("Unknown list encoding");
    }
    return 0;
}

// Assembly:
pushq %rax
movq (%rdi), %rax
movl (%rax), %ecx
shrl $0x4, %ecx
andl $0xf, %ecx
movzbl 0x8(%rdi), %eax
cmpl %eax, %ecx
jne 0x4c5a9
movq %rdi, (%rsi)
cmpb $0x9, %al
jne 0x4c5c3
movq 0x10(%rdi), %rdi
addq $0x8, %rsi
popq %rax
jmp 0x2c4fb
leaq 0x76d95(%rip), %rdi     # 0xc3345
leaq 0x76d85(%rip), %rsi     # 0xc333c
movl $0x72, %edx
callq 0x61908
jmp 0x4c5db
leaq 0x76488(%rip), %rdi     # 0xc2a52
leaq 0x76d6b(%rip), %rsi     # 0xc333c
movl $0x78, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: listTypeGet
robj *listTypeGet(listTypeEntry *entry) {
    robj *value = NULL;
    if (entry->li->encoding == OBJ_ENCODING_QUICKLIST) {
        if (entry->entry.value) {
            value = createStringObject((char *)entry->entry.value,
                                       entry->entry.sz);
        } else {
            value = createStringObjectFromLongLong(entry->entry.longval);
        }
    } else {
        serverPanic("Unknown list encoding");
    }
    return value;
}

// Assembly:
movq (%rdi), %rax
cmpb $0x9, 0x8(%rax)
jne 0x4c60b
movq 0x20(%rdi), %rax
testq %rax, %rax
je 0x4c602
movl 0x30(%rdi), %esi
movq %rax, %rdi
jmp 0x40744
movq 0x28(%rdi), %rdi
jmp 0x40753
pushq %rax
leaq 0x7643f(%rip), %rdi     # 0xc2a52
leaq 0x76d22(%rip), %rsi     # 0xc333c
movl $0x88, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: listTypeInsert
void listTypeInsert(listTypeEntry *entry, robj *value, int where) {
    if (entry->li->encoding == OBJ_ENCODING_QUICKLIST) {
        value = getDecodedObject(value);
        sds str = value->ptr;
        size_t len = sdslen(str);
        if (where == LIST_TAIL) {
            quicklistInsertAfter((quicklist *)entry->entry.quicklist,
                                 &entry->entry, str, len);
        } else if (where == LIST_HEAD) {
            quicklistInsertBefore((quicklist *)entry->entry.quicklist,
                                  &entry->entry, str, len);
        }
        decrRefCount(value);
    } else {
        serverPanic("Unknown list encoding");
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rax
cmpb $0x9, 0x8(%rax)
jne 0x4c6c6
movl %edx, %ebp
movq %rdi, %r14
movq %rsi, %rdi
callq 0x41026
movq %rax, %rbx
movq 0x8(%rax), %rdx
movzbl -0x1(%rdx), %ecx
movl %ecx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x4c68d
leaq 0x76c98(%rip), %rsi     # 0xc3300
movslq (%rsi,%rax,4), %rax
addq %rsi, %rax
jmpq *%rax
shrl $0x3, %ecx
jmp 0x4c68f
movq -0x11(%rdx), %rcx
jmp 0x4c68f
movzwl -0x5(%rdx), %ecx
jmp 0x4c68f
movl -0x9(%rdx), %ecx
jmp 0x4c68f
movzbl -0x3(%rdx), %ecx
jmp 0x4c68f
xorl %ecx, %ecx
testl %ebp, %ebp
je 0x4c6aa
cmpl $0x1, %ebp
jne 0x4c6ba
movq 0x8(%r14), %rdi
addq $0x8, %r14
movq %r14, %rsi
callq 0x2c311
jmp 0x4c6ba
movq 0x8(%r14), %rdi
addq $0x8, %r14
movq %r14, %rsi
callq 0x2c309
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x40c8f
leaq 0x76385(%rip), %rdi     # 0xc2a52
leaq 0x76c68(%rip), %rsi     # 0xc333c
movl $0x9b, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: listTypeEqual
int listTypeEqual(listTypeEntry *entry, robj *o) {
    if (entry->li->encoding == OBJ_ENCODING_QUICKLIST) {
        serverAssertWithInfo(NULL,o,sdsEncodedObject(o));
        return quicklistCompare(entry->entry.zi,o->ptr,sdslen(o->ptr));
    } else {
        serverPanic("Unknown list encoding");
    }
}

// Assembly:
pushq %rax
movq (%rdi), %rax
cmpb $0x9, 0x8(%rax)
jne 0x4c745
movl (%rsi), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x4c75f
movq 0x18(%rdi), %rdi
movq 0x8(%rsi), %rsi
movzbl -0x1(%rsi), %edx
movl %edx, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x4c73d
leaq 0x76bfc(%rip), %rcx     # 0xc3314
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
shrl $0x3, %edx
jmp 0x4c73f
movq -0x11(%rsi), %rdx
jmp 0x4c73f
movzwl -0x5(%rsi), %edx
jmp 0x4c73f
movl -0x9(%rsi), %edx
jmp 0x4c73f
movzbl -0x3(%rsi), %edx
jmp 0x4c73f
xorl %edx, %edx
popq %rax
jmp 0x2c46c
leaq 0x76306(%rip), %rdi     # 0xc2a52
leaq 0x76be9(%rip), %rsi     # 0xc333c
movl $0xa5, %edx
callq 0x619b4
jmp 0x4c77a
leaq 0x76c05(%rip), %rdx     # 0xc336b
leaq 0x76bcf(%rip), %rcx     # 0xc333c
xorl %edi, %edi
movl $0xa2, %r8d
callq 0x627c3
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: listTypeConvert
void listTypeConvert(robj *subject, int enc) {
    serverAssertWithInfo(NULL,subject,subject->type==OBJ_LIST);
    serverAssertWithInfo(NULL,subject,subject->encoding==OBJ_ENCODING_ZIPLIST);

    if (enc == OBJ_ENCODING_QUICKLIST) {
        size_t zlen = server.list_max_ziplist_size;
        int depth = server.list_compress_depth;
        subject->ptr = quicklistCreateFromZiplist(zlen, depth, subject->ptr);
        subject->encoding = OBJ_ENCODING_QUICKLIST;
    } else {
        serverPanic("Unsupported list conversion");
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %eax
movl %eax, %ecx
andl $0xf, %ecx
cmpl $0x1, %ecx
jne 0x4c80c
andl $0xf0, %eax
cmpl $0x50, %eax
jne 0x4c827
cmpl $0x9, %esi
jne 0x4c847
leaq 0xb50c5(%rip), %rax     # 0x1018a8
movl 0x970(%rax), %edi
movl 0x974(%rax), %esi
movq 0x8(%rbx), %rdx
callq 0x2bb2b
movq %rax, 0x8(%rbx)
movl $0xffffff0f, %eax       # imm = 0xFFFFFF0F
andl (%rbx), %eax
orl $0x90, %eax
movl %eax, (%rbx)
popq %rbx
retq
leaq 0x76b6c(%rip), %rdx     # 0xc337f
leaq 0x76b22(%rip), %rcx     # 0xc333c
xorl %edi, %edi
movq %rbx, %rsi
movl $0xb4, %r8d
jmp 0x4c840
leaq 0x76b69(%rip), %rdx     # 0xc3397
leaq 0x76b07(%rip), %rcx     # 0xc333c
xorl %edi, %edi
movq %rbx, %rsi
movl $0xb5, %r8d
callq 0x627c3
jmp 0x4c85f
leaq 0x76b71(%rip), %rdi     # 0xc33bf
leaq 0x76ae7(%rip), %rsi     # 0xc333c
movl $0xbd, %edx
callq 0x619b4
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: pushGenericCommand
void pushGenericCommand(client *c, int where) {
    int j, waiting = 0, pushed = 0;
    robj *lobj = lookupKeyWrite(c->db,c->argv[1]);

    if (lobj && lobj->type != OBJ_LIST) {
        addReply(c,shared.wrongtypeerr);
        return;
    }

    for (j = 2; j < c->argc; j++) {
        c->argv[j] = tryObjectEncoding(c->argv[j]);
        if (!lobj) {
            lobj = createQuicklistObject();
            quicklistSetOptions(lobj->ptr, server.list_max_ziplist_size,
                                server.list_compress_depth);
            dbAdd(c->db,c->argv[1],lobj);
        }
        listTypePush(lobj,c->argv[j],where);
        pushed++;
    }
    addReplyLongLong(c, waiting + (lobj ? listTypeLength(lobj) : 0));
    if (pushed) {
        char *event = (where == LIST_HEAD) ? "lpush" : "rpush";

        signalModifiedKey(c->db,c->argv[1]);
        notifyKeyspaceEvent(NOTIFY_LIST,event,c->argv[1],c->db->id);
    }
    server.dirty += pushed;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %esi, %ebp
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x41ad6
movq %rax, %r14
testq %rax, %rax
je 0x4c89e
movl (%r14), %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0x4c98e
cmpl $0x3, 0x38(%rbx)
jl 0x4c928
movl $0x2, %r15d
leaq 0xb4ff3(%rip), %r12     # 0x1018a8
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0x40e09
movq 0x40(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
testq %r14, %r14
jne 0x4c904
callq 0x409c1
movq %rax, %r14
movq 0x8(%rax), %rdi
movl 0x970(%r12), %esi
movl 0x974(%r12), %edx
callq 0x2b58c
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdx
callq 0x41b77
movq 0x40(%rbx), %rax
movq (%rax,%r15,8), %rsi
movq %r14, %rdi
movl %ebp, %edx
callq 0x4c380
incq %r15
movslq 0x38(%rbx), %rax
cmpq %rax, %r15
jl 0x4c8b5
addl $-0x2, %r15d
jmp 0x4c930
xorl %r15d, %r15d
testq %r14, %r14
je 0x4c9ae
movq %r14, %rdi
callq 0x4c4aa
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3d23f
testl %r15d, %r15d
je 0x4c9a9
testl %ebp, %ebp
leaq 0x6fc91(%rip), %rax     # 0xbc5e2
leaq 0x6fc5d(%rip), %r14     # 0xbc5b5
cmoveq %rax, %r14
movq 0x10(%rbx), %rdi
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
callq 0x41d90
movq 0x10(%rbx), %rax
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
movl 0x30(%rax), %ecx
movl $0x10, %edi
movq %r14, %rsi
callq 0x7c665
movl %r15d, %r14d
jmp 0x4c9bb
leaq 0xb597b(%rip), %rax     # 0x102310
movq 0x70(%rax), %rsi
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x3c854
xorl %r14d, %r14d
jmp 0x4c9bb
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x3d23f
leaq 0xb4ee6(%rip), %rax     # 0x1018a8
addq %r14, 0x720(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: linsertCommand
void linsertCommand(client *c) {
    c->argv[4] = tryObjectEncoding(c->argv[4]);
    if (strcasecmp(c->argv[2]->ptr,"after") == 0) {
        pushxGenericCommand(c,c->argv[3],c->argv[4],LIST_TAIL);
    } else if (strcasecmp(c->argv[2]->ptr,"before") == 0) {
        pushxGenericCommand(c,c->argv[3],c->argv[4],LIST_HEAD);
    } else {
        addReply(c,shared.syntaxerr);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x20(%rax), %rdi
callq 0x40e09
movq 0x40(%rbx), %rcx
movq %rax, 0x20(%rcx)
movq 0x40(%rbx), %r15
movq 0x10(%r15), %rax
movq 0x8(%rax), %r14
leaq 0x767db(%rip), %rsi     # 0xc33dd
movq %r14, %rdi
callq 0x262f0
testl %eax, %eax
je 0x4cc3c
leaq 0x767ce(%rip), %rsi     # 0xc33e3
movq %r14, %rdi
callq 0x262f0
testl %eax, %eax
je 0x4cc4e
leaq 0xb56e8(%rip), %rax     # 0x102310
movq 0x80(%rax), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x3c854
movq 0x18(%r15), %rsi
movq 0x20(%r15), %rdx
movq %rbx, %rdi
movl $0x1, %ecx
jmp 0x4cc5b
movq 0x18(%r15), %rsi
movq 0x20(%r15), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0x4c9e3
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/t_list.c
// Function: lindexCommand
void lindexCommand(client *c) {
    robj *o = lookupKeyReadOrReply(c,c->argv[1],shared.nullbulk);
    if (o == NULL || checkType(c,o,OBJ_LIST)) return;
    long index;
    robj *value = NULL;

    if ((getLongFromObjectOrReply(c, c->argv[2], &index, NULL) != C_OK))
        return;

    if (o->encoding == OBJ_ENCODING_QUICKLIST) {
        quicklistEntry entry;
        if (quicklistIndex(o->ptr, index, &entry)) {
            if (entry.value) {
                value = createStringObject((char*)entry.value,entry.sz);
            } else {
                value = createStringObjectFromLongLong(entry.longval);
            }
            addReplyBulk(c,value);
            decrRefCount(value);
        } else {
            addReply(c,shared.nullbulk);
        }
    } else {
        serverPanic("Unknown list encoding");
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xb5633(%rip), %r15     # 0x102310
movq 0x50(%r15), %rdx
callq 0x41af9
testq %rax, %rax
je 0x4cd8e
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x40d47
testl %eax, %eax
jne 0x4cd8e
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x41718
testl %eax, %eax
jne 0x4cd8e
movl $0xf0, %eax
andl (%r14), %eax
cmpl $0x90, %eax
jne 0x4cd98
movq 0x8(%r14), %rdi
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x26fde
testl %eax, %eax
je 0x4cd60
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x4cd6e
movl 0x38(%rsp), %esi
callq 0x40744
jmp 0x4cd78
movq 0x50(%r15), %rsi
movq %rbx, %rdi
callq 0x3c854
jmp 0x4cd8e
movq 0x30(%rsp), %rdi
callq 0x40753
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3d170
movq %r14, %rdi
callq 0x40c8f
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x75cb3(%rip), %rdi     # 0xc2a52
leaq 0x76596(%rip), %rsi     # 0xc333c
movl $0x148, %edx            # imm = 0x148
callq 0x619b4
movl $0x1, %edi
callq 0x263c0