LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: strEncoding
char *strEncoding(int encoding) {
    switch(encoding) {
    case OBJ_ENCODING_RAW: return "raw";
    case OBJ_ENCODING_INT: return "int";
    case OBJ_ENCODING_HT: return "hashtable";
    case OBJ_ENCODING_QUICKLIST: return "quicklist";
    case OBJ_ENCODING_ZIPLIST: return "ziplist";
    case OBJ_ENCODING_INTSET: return "intset";
    case OBJ_ENCODING_SKIPLIST: return "skiplist";
    case OBJ_ENCODING_EMBSTR: return "embstr";
    default: return "unknown";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x9, %rax
ja 0x4a060
movq -0x18(%rbp), %rax
leaq 0xf1665(%rip), %rcx     # 0x13b654
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xf1800(%rip), %rax     # 0x13b7ff
movq %rax, -0x8(%rbp)
jmp 0x4a06b
leaq 0xfafb1(%rip), %rax     # 0x144fbd
movq %rax, -0x8(%rbp)
jmp 0x4a06b
leaq 0xff0fe(%rip), %rax     # 0x149117
movq %rax, -0x8(%rbp)
jmp 0x4a06b
leaq 0xf17dd(%rip), %rax     # 0x13b803
movq %rax, -0x8(%rbp)
jmp 0x4a06b
leaq 0xff139(%rip), %rax     # 0x14916c
movq %rax, -0x8(%rbp)
jmp 0x4a06b
leaq 0xff113(%rip), %rax     # 0x149153
movq %rax, -0x8(%rbp)
jmp 0x4a06b
leaq 0xf17c0(%rip), %rax     # 0x13b80d
movq %rax, -0x8(%rbp)
jmp 0x4a06b
leaq 0xf17bc(%rip), %rax     # 0x13b816
movq %rax, -0x8(%rbp)
jmp 0x4a06b
leaq 0xf17b6(%rip), %rax     # 0x13b81d
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: estimateObjectIdleTime
unsigned long long estimateObjectIdleTime(robj *o) {
    unsigned long long lruclock = LRU_CLOCK();
    if (lruclock >= o->lru) {
        return (lruclock - o->lru) * LRU_CLOCK_RESOLUTION;
    } else {
        return (lruclock + (LRU_CLOCK_MAX - o->lru)) *
                    LRU_CLOCK_RESOLUTION;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
leaq 0x12e140(%rip), %rcx    # 0x1781d8
cltd
idivl 0x20(%rcx)
cmpl $0x3e8, %eax            # imm = 0x3E8
jg 0x4a0b7
leaq 0x12e12e(%rip), %rax    # 0x1781d8
movl 0x48(%rax), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x1c(%rbp)
jmp 0x4a0bf
callq 0x30a00
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, %eax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shrl $0x8, %ecx
movl %ecx, %ecx
cmpq %rcx, %rax
jb 0x4a0fb
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %ecx
shrl $0x8, %ecx
movl %ecx, %ecx
subq %rcx, %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, -0x8(%rbp)
jmp 0x4a120
movq -0x18(%rbp), %rax
movq -0x10(%rbp), %rcx
movl (%rcx), %edx
shrl $0x8, %edx
movl $0xffffff, %ecx         # imm = 0xFFFFFF
subl %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: objectCommand
void objectCommand(client *c) {
    robj *o;

    if (!strcasecmp(c->argv[1]->ptr,"refcount") && c->argc == 3) {
        if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.nullbulk))
                == NULL) return;
        addReplyLongLong(c,o->refcount);
    } else if (!strcasecmp(c->argv[1]->ptr,"encoding") && c->argc == 3) {
        if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.nullbulk))
                == NULL) return;
        addReplyBulkCString(c,strEncoding(o->encoding));
    } else if (!strcasecmp(c->argv[1]->ptr,"idletime") && c->argc == 3) {
        if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.nullbulk))
                == NULL) return;
        addReplyLongLong(c,estimateObjectIdleTime(o)/1000);
    } else {
        addReplyError(c,"Syntax error. Try OBJECT (refcount|encoding|idletime)");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0xfc833(%rip), %rsi     # 0x146a36
callq 0x26300
cmpl $0x0, %eax
jne 0x4a25c
movq -0x8(%rbp), %rax
cmpl $0x3, 0x38(%rax)
jne 0x4a25c
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rsi
leaq 0x12ea12(%rip), %rax    # 0x178c40
movq 0x50(%rax), %rdx
callq 0x4a190
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x4a246
jmp 0x4a374
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movslq 0x4(%rax), %rsi
callq 0x43780
jmp 0x4a374
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0xf3757(%rip), %rsi     # 0x13d9ca
callq 0x26300
cmpl $0x0, %eax
jne 0x4a2e0
movq -0x8(%rbp), %rax
cmpl $0x3, 0x38(%rax)
jne 0x4a2e0
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rsi
leaq 0x12e9a2(%rip), %rax    # 0x178c40
movq 0x50(%rax), %rdx
callq 0x4a190
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x4a2b6
jmp 0x4a374
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %edi
shrl $0x4, %edi
andl $0xf, %edi
callq 0x49fd0
movq -0x18(%rbp), %rdi
movq %rax, %rsi
callq 0x43580
jmp 0x4a372
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0xf152e(%rip), %rsi     # 0x13b825
callq 0x26300
cmpl $0x0, %eax
jne 0x4a360
movq -0x8(%rbp), %rax
cmpl $0x3, 0x38(%rax)
jne 0x4a360
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rsi
leaq 0x12e91e(%rip), %rax    # 0x178c40
movq 0x50(%rax), %rdx
callq 0x4a190
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x4a337
jmp 0x4a374
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4a080
movq -0x20(%rbp), %rdi
movl $0x3e8, %ecx            # imm = 0x3E8
xorl %edx, %edx
divq %rcx
movq %rax, %rsi
callq 0x43780
jmp 0x4a370
movq -0x8(%rbp), %rdi
leaq 0xf14c3(%rip), %rsi     # 0x13b82e
callq 0x42f90
jmp 0x4a372
jmp 0x4a374
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: lookupKey
robj *lookupKey(redisDb *db, robj *key, int flags) {
    dictEntry *de = dictFind(db->dict,key->ptr);
    if (de) {
        robj *val = dictGetVal(de);

        /* Update the access time for the ageing algorithm.
         * Don't do it if we have a saving child, as this will trigger
         * a copy on write madness. */
        if (server.rdb_child_pid == -1 &&
            server.aof_child_pid == -1 &&
            !(flags & LOOKUP_NOTOUCH))
        {
            val->lru = LRU_CLOCK();
        }
        return val;
    } else {
        return NULL;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x2dcb0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x4a446
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
leaq 0x12de0f(%rip), %rax    # 0x1781d8
cmpl $-0x1, 0x730(%rax)
jne 0x4a43c
leaq 0x12ddff(%rip), %rax    # 0x1781d8
cmpl $-0x1, 0x69c(%rax)
jne 0x4a43c
movl -0x1c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x4a43c
movl $0x3e8, %eax            # imm = 0x3E8
leaq 0x12dddf(%rip), %rcx    # 0x1781d8
cltd
idivl 0x20(%rcx)
cmpl $0x3e8, %eax            # imm = 0x3E8
jg 0x4a418
leaq 0x12ddcd(%rip), %rax    # 0x1781d8
movl 0x48(%rax), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x34(%rbp)
jmp 0x4a420
callq 0x30a00
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %edx
movq -0x30(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff, %edx         # imm = 0xFFFFFF
shll $0x8, %edx
andl $0xff, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x4a44e
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: lookupKeyReadWithFlags
robj *lookupKeyReadWithFlags(redisDb *db, robj *key, int flags) {
    robj *val;

    if (expireIfNeeded(db,key) == 1) {
        /* Key expired. If we are in the context of a master, expireIfNeeded()
         * returns 0 only when the key does not exist at all, so it's safe
         * to return NULL ASAP. */
        if (server.masterhost == NULL) return NULL;

        /* However if we are in the context of a slave, expireIfNeeded() will
         * not really try to expire the key, it only returns information
         * about the "logical" status of the key: key expiring is up to the
         * master in order to have a consistent view of master's data set.
         *
         * However, if the command caller is not the master, and as additional
         * safety measure, the command invoked is a read-only command, we can
         * safely return NULL here, and provide a more consistent behavior
         * to clients accessign expired values in a read-only fashion, that
         * will say the key as non exisitng.
         *
         * Notably this covers GETs when slaves are used to scale reads. */
        if (server.current_client &&
            server.current_client != server.master &&
            server.current_client->cmd &&
            server.current_client->cmd->flags & CMD_READONLY)
        {
            return NULL;
        }
    }
    val = lookupKey(db,key,flags);
    if (val == NULL)
        server.stat_keyspace_misses++;
    else
        server.stat_keyspace_hits++;
    return val;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4a590
cmpl $0x1, %eax
jne 0x4a514
leaq 0x12dd48(%rip), %rax    # 0x1781d8
cmpq $0x0, 0x828(%rax)
jne 0x4a4a7
movq $0x0, -0x8(%rbp)
jmp 0x4a579
leaq 0x12dd2a(%rip), %rax    # 0x1781d8
cmpq $0x0, 0x1f0(%rax)
je 0x4a512
leaq 0x12dd19(%rip), %rax    # 0x1781d8
movq 0x1f0(%rax), %rax
leaq 0x12dd0b(%rip), %rcx    # 0x1781d8
cmpq 0x838(%rcx), %rax
je 0x4a512
leaq 0x12dcfb(%rip), %rax    # 0x1781d8
movq 0x1f0(%rax), %rax
cmpq $0x0, 0x48(%rax)
je 0x4a512
leaq 0x12dce6(%rip), %rax    # 0x1781d8
movq 0x1f0(%rax), %rax
movq 0x48(%rax), %rax
movl 0x20(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4a512
movq $0x0, -0x8(%rbp)
jmp 0x4a579
jmp 0x4a514
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x4a380
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x4a551
leaq 0x12dca2(%rip), %rax    # 0x1781d8
movq 0x3b8(%rax), %rcx
addq $0x1, %rcx
leaq 0x12dc90(%rip), %rax    # 0x1781d8
movq %rcx, 0x3b8(%rax)
jmp 0x4a571
leaq 0x12dc80(%rip), %rax    # 0x1781d8
movq 0x3b0(%rax), %rcx
addq $0x1, %rcx
leaq 0x12dc6e(%rip), %rax    # 0x1781d8
movq %rcx, 0x3b0(%rax)
movq -0x28(%rbp), %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/db.c
// Function: expireIfNeeded
int expireIfNeeded(redisDb *db, robj *key) {
    mstime_t when = getExpire(db,key);
    mstime_t now;

    if (when < 0) return 0; /* No expire for this key */

    /* Don't expire anything while loading. It will be done later. */
    if (server.loading) return 0;

    /* If we are in the context of a Lua script, we claim that time is
     * blocked to when the Lua script started. This way a key can expire
     * only the first time it is accessed and not in the middle of the
     * script execution, making propagation to slaves / AOF consistent.
     * See issue #1525 on Github for more information. */
    now = server.lua_caller ? server.lua_time_start : mstime();

    /* If we are running in the context of a slave, return ASAP:
     * the slave key expiration is controlled by the master that will
     * send us synthesized DEL operations for expired keys.
     *
     * Still we try to return the right information to the caller,
     * that is, 0 if we think the key should be still valid, 1 if
     * we think the key is expired at this time. */
    if (server.masterhost != NULL) return now > when;

    /* Return when this key has not expired */
    if (now <= when) return 0;

    /* Delete the key */
    server.stat_expiredkeys++;
    propagateExpire(db,key);
    notifyKeyspaceEvent(NOTIFY_EXPIRED,
        "expired",key,db->id);
    return dbDelete(db,key);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4c430
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jge 0x4a5c4
movl $0x0, -0x4(%rbp)
jmp 0x4a6a8
leaq 0x12dc0d(%rip), %rax    # 0x1781d8
cmpl $0x0, 0x31c(%rax)
je 0x4a5e0
movl $0x0, -0x4(%rbp)
jmp 0x4a6a8
leaq 0x12dbf1(%rip), %rax    # 0x1781d8
cmpq $0x0, 0x9d8(%rax)
je 0x4a605
leaq 0x12dbe0(%rip), %rax    # 0x1781d8
movq 0x9f0(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x4a60e
callq 0x2ff70
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0x12dbbb(%rip), %rax    # 0x1781d8
cmpq $0x0, 0x828(%rax)
je 0x4a63c
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
setg %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x4a6a8
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
jg 0x4a64f
movl $0x0, -0x4(%rbp)
jmp 0x4a6a8
leaq 0x12db82(%rip), %rax    # 0x1781d8
movq 0x3a0(%rax), %rcx
addq $0x1, %rcx
leaq 0x12db70(%rip), %rax    # 0x1781d8
movq %rcx, 0x3a0(%rax)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4c7d0
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
movl 0x30(%rax), %ecx
movl $0x100, %edi            # imm = 0x100
leaq 0xed308(%rip), %rsi     # 0x13799b
callq 0x9ce20
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4ac10
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: dbAdd
void dbAdd(redisDb *db, robj *key, robj *val) {
    sds copy = sdsdup(key->ptr);
    int retval = dictAdd(db->dict, copy, val);

    serverAssertWithInfo(NULL,key,retval == DICT_OK);
    if (val->type == OBJ_LIST) signalListAsReady(db, key);
    if (server.cluster_enabled) slotToKeyAdd(key);
 }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x38560
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x2d8c0
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x4a814
jmp 0x4a83f
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0xf1069(%rip), %rdx     # 0x13b88c
leaq 0xf2978(%rip), %rcx     # 0x13d1a2
movl $0xa1, %r8d
callq 0x78360
movl $0x1, %edi
callq 0x263c0
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0x4a85a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5adb0
leaq 0x12d977(%rip), %rax    # 0x1781d8
cmpl $0x0, 0x99c(%rax)
je 0x4a873
movq -0x10(%rbp), %rdi
callq 0x4a880
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: setKey
void setKey(redisDb *db, robj *key, robj *val) {
    if (lookupKeyWrite(db,key) == NULL) {
        dbAdd(db,key,val);
    } else {
        dbOverwrite(db,key,val);
    }
    incrRefCount(val);
    removeExpire(db,key);
    signalModifiedKey(db,key);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4a6f0
cmpq $0x0, %rax
jne 0x4a99a
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4a7d0
jmp 0x4a9ab
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4a8e0
movq -0x18(%rbp), %rdi
callq 0x487b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4a9e0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x4aa60
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: dbRandomKey
robj *dbRandomKey(redisDb *db) {
    dictEntry *de;

    while(1) {
        sds key;
        robj *keyobj;

        de = dictGetRandomKey(db->dict);
        if (de == NULL) return NULL;

        key = dictGetKey(de);
        keyobj = createStringObject(key,sdslen(key));
        if (dictFind(db->expires,key)) {
            if (expireIfNeeded(db,keyobj)) {
                decrRefCount(keyobj);
                continue; /* search for another key. This expired. */
            }
        }
        return keyobj;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2e6a0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x4aafd
movq $0x0, -0x8(%rbp)
jmp 0x4ab6a
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rdi
callq 0x4ab80
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x486a0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x2dcb0
cmpq $0x0, %rax
je 0x4ab62
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x4a590
cmpl $0x0, %eax
je 0x4ab60
movq -0x28(%rbp), %rdi
callq 0x48f70
jmp 0x4aadc
jmp 0x4ab62
movq -0x28(%rbp), %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/db.c
// Function: dbDelete
int dbDelete(redisDb *db, robj *key) {
    /* Deleting an entry from the expires dict will not free the sds of
     * the key, because it is shared with the main dictionary. */
    if (dictSize(db->expires) > 0) dictDelete(db->expires,key->ptr);
    if (dictDelete(db->dict,key->ptr) == DICT_OK) {
        if (server.cluster_enabled) slotToKeyDel(key);
        return 1;
    } else {
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
addq 0x48(%rcx), %rax
cmpq $0x0, %rax
jbe 0x4ac53
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x2de50
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x2de50
cmpl $0x0, %eax
jne 0x4ac8e
leaq 0x12d565(%rip), %rax    # 0x1781d8
cmpl $0x0, 0x99c(%rax)
je 0x4ac85
movq -0x18(%rbp), %rdi
callq 0x4aca0
movl $0x1, -0x4(%rbp)
jmp 0x4ac95
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: dbUnshareStringValue
robj *dbUnshareStringValue(redisDb *db, robj *key, robj *o) {
    serverAssert(o->type == OBJ_STRING);
    if (o->refcount != 1 || o->encoding != OBJ_ENCODING_RAW) {
        robj *decoded = getDecodedObject(o);
        o = createRawStringObject(decoded->ptr, sdslen(decoded->ptr));
        decrRefCount(decoded);
        dbOverwrite(db,key,o);
    }
    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x4ad24
jmp 0x4ad46
leaq 0xefcf5(%rip), %rdi     # 0x13aa20
leaq 0xf2470(%rip), %rsi     # 0x13d1a2
movl $0x10a, %edx            # imm = 0x10A
callq 0x76ce0
movl $0x1, %edi
callq 0x263c0
movq -0x18(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jne 0x4ad61
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x4adb1
movq -0x18(%rbp), %rdi
callq 0x494f0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x4ab80
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x48540
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
callq 0x48f70
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x4a8e0
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: emptyDb
long long emptyDb(void(callback)(void*)) {
    int j;
    long long removed = 0;

    for (j = 0; j < server.dbnum; j++) {
        removed += dictSize(server.db[j].dict);
        dictEmpty(server.db[j].dict,callback);
        dictEmpty(server.db[j].expires,callback);
    }
    if (server.cluster_enabled) slotToKeyFlush();
    return removed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
leaq 0x12d3f3(%rip), %rcx    # 0x1781d8
cmpl 0x610(%rcx), %eax
jge 0x4ae86
leaq 0x12d3e0(%rip), %rax    # 0x1781d8
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
leaq 0x12d3c3(%rip), %rcx    # 0x1781d8
movq 0x28(%rcx), %rcx
movslq -0xc(%rbp), %rdx
shlq $0x6, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
addq 0x48(%rcx), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0x12d39e(%rip), %rax    # 0x1781d8
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x2ed40
leaq 0x12d37c(%rip), %rax    # 0x1781d8
movq 0x28(%rax), %rax
movslq -0xc(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x2ed40
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4addb
leaq 0x12d34b(%rip), %rax    # 0x1781d8
cmpl $0x0, 0x99c(%rax)
je 0x4ae9b
callq 0x4aeb0
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: selectDb
int selectDb(client *c, int id) {
    if (id < 0 || id >= server.dbnum)
        return C_ERR;
    c->db = &server.db[id];
    return C_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x4af13
movl -0x14(%rbp), %eax
leaq 0x12d2cd(%rip), %rcx    # 0x1781d8
cmpl 0x610(%rcx), %eax
jl 0x4af1c
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4af41
leaq 0x12d2b5(%rip), %rax    # 0x1781d8
movq 0x28(%rax), %rcx
movslq -0x14(%rbp), %rax
shlq $0x6, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, -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/db.c
// Function: flushdbCommand
void flushdbCommand(client *c) {
    server.dirty += dictSize(c->db->dict);
    signalFlushedDb(c->db->id);
    dictEmpty(c->db->dict,NULL);
    dictEmpty(c->db->expires,NULL);
    if (server.cluster_enabled) slotToKeyFlush();
    addReply(c,shared.ok);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq 0x28(%rax), %rcx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
addq 0x48(%rax), %rcx
leaq 0x12d237(%rip), %rax    # 0x1781d8
addq 0x720(%rax), %rcx
leaq 0x12d229(%rip), %rax    # 0x1781d8
movq %rcx, 0x720(%rax)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x30(%rax), %edi
callq 0x4af50
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2ed40
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2ed40
leaq 0x12d1e2(%rip), %rax    # 0x1781d8
cmpl $0x0, 0x99c(%rax)
je 0x4b004
callq 0x4aeb0
movq -0x8(%rbp), %rdi
leaq 0x12dc31(%rip), %rax    # 0x178c40
movq 0x8(%rax), %rsi
callq 0x42cc0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: flushallCommand
void flushallCommand(client *c) {
    signalFlushedDb(-1);
    server.dirty += emptyDb(NULL);
    addReply(c,shared.ok);
    if (server.rdb_child_pid != -1) {
        kill(server.rdb_child_pid,SIGUSR1);
        rdbRemoveTempFile(server.rdb_child_pid);
    }
    if (server.saveparamslen > 0) {
        /* Normally rdbSave() will reset dirty, but we don't want this here
         * as otherwise FLUSHALL will not be replicated nor put into the AOF. */
        int saved_dirty = server.dirty;
        rdbSave(server.rdb_filename);
        server.dirty = saved_dirty;
    }
    server.dirty++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x4af50
xorl %eax, %eax
movl %eax, %edi
callq 0x4adc0
movq %rax, %rcx
leaq 0x12d18f(%rip), %rax    # 0x1781d8
addq 0x720(%rax), %rcx
leaq 0x12d181(%rip), %rax    # 0x1781d8
movq %rcx, 0x720(%rax)
movq -0x8(%rbp), %rdi
leaq 0x12dbd7(%rip), %rax    # 0x178c40
movq 0x8(%rax), %rsi
callq 0x42cc0
leaq 0x12d15f(%rip), %rax    # 0x1781d8
cmpl $-0x1, 0x730(%rax)
je 0x4b0ab
leaq 0x12d14f(%rip), %rax    # 0x1781d8
movl 0x730(%rax), %edi
movl $0xa, %esi
callq 0x26670
leaq 0x12d138(%rip), %rax    # 0x1781d8
movl 0x730(%rax), %edi
callq 0x555f0
leaq 0x12d126(%rip), %rax    # 0x1781d8
cmpl $0x0, 0x740(%rax)
jle 0x4b0f1
leaq 0x12d116(%rip), %rax    # 0x1781d8
movq 0x720(%rax), %rax
movl %eax, -0xc(%rbp)
leaq 0x12d105(%rip), %rax    # 0x1781d8
movq 0x748(%rax), %rdi
callq 0x55050
movslq -0xc(%rbp), %rcx
leaq 0x12d0ee(%rip), %rax    # 0x1781d8
movq %rcx, 0x720(%rax)
leaq 0x12d0e0(%rip), %rax    # 0x1781d8
movq 0x720(%rax), %rcx
addq $0x1, %rcx
leaq 0x12d0ce(%rip), %rax    # 0x1781d8
movq %rcx, 0x720(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: delCommand
void delCommand(client *c) {
    int deleted = 0, j;

    for (j = 1; j < c->argc; j++) {
        expireIfNeeded(c->db,c->argv[j]);
        if (dbDelete(c->db,c->argv[j])) {
            signalModifiedKey(c->db,c->argv[j]);
            notifyKeyspaceEvent(NOTIFY_GENERIC,
                "del",c->argv[j],c->db->id);
            server.dirty++;
            deleted++;
        }
    }
    addReplyLongLong(c,deleted);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jge 0x4b20b
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4a590
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4ac10
cmpl $0x0, %eax
je 0x4b1fb
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4aa60
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x30(%rax), %ecx
movl $0x4, %edi
leaq 0xee2cb(%rip), %rsi     # 0x139498
callq 0x9ce20
leaq 0x12cfff(%rip), %rax    # 0x1781d8
movq 0x720(%rax), %rcx
addq $0x1, %rcx
leaq 0x12cfed(%rip), %rax    # 0x1781d8
movq %rcx, 0x720(%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4b1fd
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x4b13a
movq -0x8(%rbp), %rdi
movslq -0xc(%rbp), %rsi
callq 0x43780
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: existsCommand
void existsCommand(client *c) {
    long long count = 0;
    int j;

    for (j = 1; j < c->argc; j++) {
        expireIfNeeded(c->db,c->argv[j]);
        if (dbExists(c->db,c->argv[j])) count++;
    }
    addReplyLongLong(c,count);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jge 0x4b29f
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4a590
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x4aa90
cmpl $0x0, %eax
je 0x4b292
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x4b294
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4b23b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x43780
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: selectCommand
void selectCommand(client *c) {
    long id;

    if (getLongFromObjectOrReply(c, c->argv[1], &id,
        "invalid DB index") != C_OK)
        return;

    if (server.cluster_enabled && id != 0) {
        addReplyError(c,"SELECT is not allowed in cluster mode");
        return;
    }
    if (selectDb(c,id) == C_ERR) {
        addReplyError(c,"invalid DB index");
    } else {
        addReply(c,shared.ok);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
leaq -0x10(%rbp), %rdx
leaq 0xf05b7(%rip), %rcx     # 0x13b89e
callq 0x49f20
cmpl $0x0, %eax
je 0x4b2f3
jmp 0x4b356
leaq 0x12cede(%rip), %rax    # 0x1781d8
cmpl $0x0, 0x99c(%rax)
je 0x4b31c
cmpq $0x0, -0x10(%rbp)
je 0x4b31c
movq -0x8(%rbp), %rdi
leaq 0xf059a(%rip), %rsi     # 0x13b8af
callq 0x42f90
jmp 0x4b356
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl %eax, %esi
callq 0x4aef0
cmpl $-0x1, %eax
jne 0x4b342
movq -0x8(%rbp), %rdi
leaq 0xf0563(%rip), %rsi     # 0x13b89e
callq 0x42f90
jmp 0x4b356
movq -0x8(%rbp), %rdi
leaq 0x12d8f3(%rip), %rax    # 0x178c40
movq 0x8(%rax), %rsi
callq 0x42cc0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: randomkeyCommand
void randomkeyCommand(client *c) {
    robj *key;

    if ((key = dbRandomKey(c->db)) == NULL) {
        addReply(c,shared.nullbulk);
        return;
    }

    addReplyBulk(c,key);
    decrRefCount(key);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4aad0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
jne 0x4b399
movq -0x8(%rbp), %rdi
leaq 0x12d8b2(%rip), %rax    # 0x178c40
movq 0x50(%rax), %rsi
callq 0x42cc0
jmp 0x4b3af
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x43630
movq -0x10(%rbp), %rdi
callq 0x48f70
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: keysCommand
void keysCommand(client *c) {
    dictIterator *di;
    dictEntry *de;
    sds pattern = c->argv[1]->ptr;
    int plen = sdslen(pattern), allkeys;
    unsigned long numkeys = 0;
    void *replylen = addDeferredMultiBulkLength(c);

    di = dictGetSafeIterator(c->db->dict);
    allkeys = (pattern[0] == '*' && pattern[1] == '\0');
    while((de = dictNext(di)) != NULL) {
        sds key = dictGetKey(de);
        robj *keyobj;

        if (allkeys || stringmatchlen(pattern,plen,key,sdslen(key),0)) {
            keyobj = createStringObject(key,sdslen(key));
            if (expireIfNeeded(c->db,keyobj) == 0) {
                addReplyBulk(c,keyobj);
                numkeys++;
            }
            decrRefCount(keyobj);
        }
    }
    dictReleaseIterator(di);
    setDeferredMultiBulkLength(c,replylen,numkeys);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x4ab80
movl %eax, -0x24(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x432a0
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
callq 0x2e470
movq %rax, -0x10(%rbp)
movq -0x20(%rbp), %rax
movsbl (%rax), %ecx
xorl %eax, %eax
cmpl $0x2a, %ecx
movb %al, -0x49(%rbp)
jne 0x4b437
movq -0x20(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x49(%rbp)
movb -0x49(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2e4a0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x4b501
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
cmpl $0x0, -0x28(%rbp)
jne 0x4b4a3
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movl -0x24(%rbp), %eax
movl %eax, -0x5c(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x40(%rbp), %rdi
callq 0x4ab80
movq -0x68(%rbp), %rdi
movl -0x5c(%rbp), %esi
movq -0x58(%rbp), %rdx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x46ef0
cmpl $0x0, %eax
je 0x4b4fc
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x40(%rbp), %rdi
callq 0x4ab80
movq -0x70(%rbp), %rdi
movq %rax, %rsi
callq 0x486a0
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x48(%rbp), %rsi
callq 0x4a590
cmpl $0x0, %eax
jne 0x4b4f3
movq -0x8(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x43630
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
movq -0x48(%rbp), %rdi
callq 0x48f70
jmp 0x4b442
movq -0x10(%rbp), %rdi
callq 0x2e600
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x43310
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: scanCallback
void scanCallback(void *privdata, const dictEntry *de) {
    void **pd = (void**) privdata;
    list *keys = pd[0];
    robj *o = pd[1];
    robj *key, *val = NULL;

    if (o == NULL) {
        sds sdskey = dictGetKey(de);
        key = createStringObject(sdskey, sdslen(sdskey));
    } else if (o->type == OBJ_SET) {
        key = dictGetKey(de);
        incrRefCount(key);
    } else if (o->type == OBJ_HASH) {
        key = dictGetKey(de);
        incrRefCount(key);
        val = dictGetVal(de);
        incrRefCount(val);
    } else if (o->type == OBJ_ZSET) {
        key = dictGetKey(de);
        incrRefCount(key);
        val = createStringObjectFromLongDouble(*(double*)dictGetVal(de),0);
    } else {
        serverPanic("Type not handled in SCAN callback.");
    }

    listAddNodeTail(keys, key);
    if (val) listAddNodeTail(keys, val);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x4b59f
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rdi
callq 0x4ab80
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x486a0
movq %rax, -0x30(%rbp)
jmp 0x4b665
movq -0x28(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x2, %eax
jne 0x4b5c6
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x487b0
jmp 0x4b663
movq -0x28(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x4, %eax
jne 0x4b5ff
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x487b0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
callq 0x487b0
jmp 0x4b661
movq -0x28(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x3, %eax
jne 0x4b63d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x487b0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
fldl (%rax)
movq %rsp, %rax
fstpt (%rax)
xorl %edi, %edi
callq 0x487d0
movq %rax, -0x38(%rbp)
jmp 0x4b65f
leaq 0xf0291(%rip), %rdi     # 0x13b8d5
leaq 0xf1b57(%rip), %rsi     # 0x13d1a2
movl $0x1c6, %edx            # imm = 0x1C6
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
jmp 0x4b661
jmp 0x4b663
jmp 0x4b665
movq -0x20(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x27000
cmpq $0x0, -0x38(%rbp)
je 0x4b686
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x27000
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: parseScanCursorOrReply
int parseScanCursorOrReply(client *c, robj *o, unsigned long *cursor) {
    char *eptr;

    /* Use strtoul() because we need an *unsigned* long, so
     * getLongLongFromObject() does not cover the whole cursor space. */
    errno = 0;
    *cursor = strtoul(o->ptr, &eptr, 10);
    if (isspace(((char*)o->ptr)[0]) || eptr[0] != '\0' || errno == ERANGE)
    {
        addReplyError(c, "invalid cursor");
        return C_ERR;
    }
    return C_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
callq 0x26880
movl $0x0, (%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x28(%rbp), %rsi
movl $0xa, %edx
callq 0x26c30
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
callq 0x26550
movq (%rax), %rax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x4b709
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x4b709
callq 0x26880
cmpl $0x22, (%rax)
jne 0x4b722
movq -0x10(%rbp), %rdi
leaq 0xf01e6(%rip), %rsi     # 0x13b8fa
callq 0x42f90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b729
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: typeCommand
void typeCommand(client *c) {
    robj *o;
    char *type;

    o = lookupKeyReadWithFlags(c->db,c->argv[1],LOOKUP_NOTOUCH);
    if (o == NULL) {
        type = "none";
    } else {
        switch(o->type) {
        case OBJ_STRING: type = "string"; break;
        case OBJ_LIST: type = "list"; break;
        case OBJ_SET: type = "set"; break;
        case OBJ_ZSET: type = "zset"; break;
        case OBJ_HASH: type = "hash"; break;
        default: type = "unknown"; break;
        }
    }
    addReplyStatus(c,type);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
movl $0x1, %edx
callq 0x4a460
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x4c002
leaq 0xef99e(%rip), %rax     # 0x13b99a
movq %rax, -0x18(%rbp)
jmp 0x4c078
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x4, %eax
ja 0x4c06b
movq -0x20(%rbp), %rax
leaq 0xef857(%rip), %rcx     # 0x13b878
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xfed5e(%rip), %rax     # 0x14ad8f
movq %rax, -0x18(%rbp)
jmp 0x4c076
leaq 0xef7ca(%rip), %rax     # 0x13b808
movq %rax, -0x18(%rbp)
jmp 0x4c076
leaq 0xec7ea(%rip), %rax     # 0x138835
movq %rax, -0x18(%rbp)
jmp 0x4c076
leaq 0xef947(%rip), %rax     # 0x13b99f
movq %rax, -0x18(%rbp)
jmp 0x4c076
leaq 0xfd523(%rip), %rax     # 0x149588
movq %rax, -0x18(%rbp)
jmp 0x4c076
leaq 0xef7ab(%rip), %rax     # 0x13b81d
movq %rax, -0x18(%rbp)
jmp 0x4c078
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43180
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: shutdownCommand
void shutdownCommand(client *c) {
    int flags = 0;

    if (c->argc > 2) {
        addReply(c,shared.syntaxerr);
        return;
    } else if (c->argc == 2) {
        if (!strcasecmp(c->argv[1]->ptr,"nosave")) {
            flags |= SHUTDOWN_NOSAVE;
        } else if (!strcasecmp(c->argv[1]->ptr,"save")) {
            flags |= SHUTDOWN_SAVE;
        } else {
            addReply(c,shared.syntaxerr);
            return;
        }
    }
    /* When SHUTDOWN is called while the server is loading a dataset in
     * memory we need to make sure no attempt is performed to save
     * the dataset on shutdown (otherwise it could overwrite the current DB
     * with half-read data).
     *
     * Also when in Sentinel mode clear the SAVE flag and force NOSAVE. */
    if (server.loading || server.sentinel_mode)
        flags = (flags & ~SHUTDOWN_SAVE) | SHUTDOWN_NOSAVE;
    if (prepareForShutdown(flags) == C_OK) exit(0);
    addReplyError(c,"Errors trying to SHUTDOWN. Check logs.");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x2, 0x38(%rax)
jle 0x4c0c9
movq -0x8(%rbp), %rdi
leaq 0x12cb88(%rip), %rax    # 0x178c40
movq 0x80(%rax), %rsi
callq 0x42cc0
jmp 0x4c19c
movq -0x8(%rbp), %rax
cmpl $0x2, 0x38(%rax)
jne 0x4c148
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0xef8ba(%rip), %rsi     # 0x13b9a4
callq 0x26300
cmpl $0x0, %eax
jne 0x4c0ff
movl -0xc(%rbp), %eax
orl $0x2, %eax
movl %eax, -0xc(%rbp)
jmp 0x4c146
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0xf123a(%rip), %rsi     # 0x13d350
callq 0x26300
cmpl $0x0, %eax
jne 0x4c12b
movl -0xc(%rbp), %eax
orl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x4c144
movq -0x8(%rbp), %rdi
leaq 0x12cb0a(%rip), %rax    # 0x178c40
movq 0x80(%rax), %rsi
callq 0x42cc0
jmp 0x4c19c
jmp 0x4c146
jmp 0x4c148
jmp 0x4c14a
leaq 0x12c087(%rip), %rax    # 0x1781d8
cmpl $0x0, 0x31c(%rax)
jne 0x4c16a
leaq 0x12c077(%rip), %rax    # 0x1781d8
cmpl $0x0, 0x9c(%rax)
je 0x4c176
movl -0xc(%rbp), %eax
andl $-0x2, %eax
orl $0x2, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %edi
movb $0x0, %al
callq 0x35010
cmpl $0x0, %eax
jne 0x4c18c
xorl %edi, %edi
callq 0x262d0
movq -0x8(%rbp), %rdi
leaq 0xef814(%rip), %rsi     # 0x13b9ab
callq 0x42f90
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: getExpire
long long getExpire(redisDb *db, robj *key) {
    dictEntry *de;

    /* No expire? return ASAP */
    if (dictSize(db->expires) == 0 ||
       (de = dictFind(db->expires,key->ptr)) == NULL) return -1;

    /* The entry was found in the expire dict, this means it should also
     * be present in the main dict (safety check). */
    serverAssertWithInfo(NULL,key,dictFind(db->dict,key->ptr) != NULL);
    return dictGetSignedIntegerVal(de);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rbp), %rcx
movq 0x8(%rcx), %rcx
addq 0x48(%rcx), %rax
cmpq $0x0, %rax
je 0x4c47d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x2dcb0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x4c487
movq $-0x1, -0x8(%rbp)
jmp 0x4c4da
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x2dcb0
cmpq $0x0, %rax
je 0x4c4a3
jmp 0x4c4ce
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0xef55a(%rip), %rdx     # 0x13ba0c
leaq 0xf0ce9(%rip), %rcx     # 0x13d1a2
movl $0x364, %r8d            # imm = 0x364
callq 0x78360
movl $0x1, %edi
callq 0x263c0
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: setExpire
void setExpire(redisDb *db, robj *key, long long when) {
    dictEntry *kde, *de;

    /* Reuse the sds from the main dict in the expire dict */
    kde = dictFind(db->dict,key->ptr);
    serverAssertWithInfo(NULL,key,kde != NULL);
    de = dictReplaceRaw(db->expires,dictGetKey(kde));
    dictSetSignedIntegerVal(de,when);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x2dcb0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x4c525
jmp 0x4c550
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0xef4fc(%rip), %rdx     # 0x13ba30
leaq 0xf0c67(%rip), %rcx     # 0x13d1a2
movl $0x354, %r8d            # imm = 0x354
callq 0x78360
movl $0x1, %edi
callq 0x263c0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rsi
callq 0x2de00
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: propagateExpire
void propagateExpire(redisDb *db, robj *key) {
    robj *argv[2];

    argv[0] = shared.del;
    argv[1] = key;
    incrRefCount(argv[0]);
    incrRefCount(argv[1]);

    if (server.aof_state != AOF_OFF)
        feedAppendOnlyFile(server.delCommand,db->id,argv,2);
    replicationFeedSlaves(server.slaves,db->id,argv,2);

    decrRefCount(argv[0]);
    decrRefCount(argv[1]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq 0x12c459(%rip), %rax    # 0x178c40
movq 0x128(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
callq 0x487b0
movq -0x18(%rbp), %rdi
callq 0x487b0
leaq 0x12b9c5(%rip), %rax    # 0x1781d8
cmpl $0x0, 0x668(%rax)
je 0x4c83f
leaq 0x12b9b5(%rip), %rax    # 0x1781d8
movq 0x340(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x30(%rax), %esi
leaq -0x20(%rbp), %rdx
movl $0x2, %ecx
callq 0x71c80
leaq 0x12b992(%rip), %rax    # 0x1781d8
movq 0x1e0(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x30(%rax), %esi
leaq -0x20(%rbp), %rdx
movl $0x2, %ecx
callq 0x4dcc0
movq -0x20(%rbp), %rdi
callq 0x48f70
movq -0x18(%rbp), %rdi
callq 0x48f70
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/db.c
// Function: ttlGenericCommand
void ttlGenericCommand(client *c, int output_ms) {
    long long expire, ttl = -1;

    /* If the key does not exist at all, return -2 */
    if (lookupKeyReadWithFlags(c->db,c->argv[1],LOOKUP_NOTOUCH) == NULL) {
        addReplyLongLong(c,-2);
        return;
    }
    /* The key exists. Return -1 if it has no expire, or the actual
     * TTL value otherwise. */
    expire = getExpire(c->db,c->argv[1]);
    if (expire != -1) {
        ttl = expire-mstime();
        if (ttl < 0) ttl = 0;
    }
    if (ttl == -1) {
        addReplyLongLong(c,-1);
    } else {
        addReplyLongLong(c,output_ms ? ttl : ((ttl+500)/1000));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq $-0x1, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
movl $0x1, %edx
callq 0x4a460
cmpq $0x0, %rax
jne 0x4cbe0
movq -0x8(%rbp), %rdi
movq $-0x2, %rsi
callq 0x43780
jmp 0x4cc86
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x4c430
movq %rax, -0x18(%rbp)
cmpq $-0x1, -0x18(%rbp)
je 0x4cc30
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
callq 0x2ff70
movq %rax, %rcx
movq -0x28(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jge 0x4cc2e
movq $0x0, -0x20(%rbp)
jmp 0x4cc30
cmpq $-0x1, -0x20(%rbp)
jne 0x4cc49
movq -0x8(%rbp), %rdi
movq $-0x1, %rsi
callq 0x43780
jmp 0x4cc86
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x4cc61
movq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x4cc79
movq -0x20(%rbp), %rax
addq $0x1f4, %rax            # imm = 0x1F4
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x43780
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)