LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/networking.c
// Function: getClientTypeByName
int getClientTypeByName(char *name) {
    if (!strcasecmp(name,"normal")) return CLIENT_TYPE_NORMAL;
    else if (!strcasecmp(name,"slave")) return CLIENT_TYPE_SLAVE;
    else if (!strcasecmp(name,"pubsub")) return CLIENT_TYPE_PUBSUB;
    else if (!strcasecmp(name,"master")) return CLIENT_TYPE_MASTER;
    else return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x100bdc(%rip), %rsi    # 0x147243
callq 0x26300
cmpl $0x0, %eax
jne 0x4667a
movl $0x0, -0x4(%rbp)
jmp 0x466db
movq -0x10(%rbp), %rdi
leaq 0xfc6f1(%rip), %rsi     # 0x142d76
callq 0x26300
cmpl $0x0, %eax
jne 0x46698
movl $0x1, -0x4(%rbp)
jmp 0x466db
movq -0x10(%rbp), %rdi
leaq 0xf11ad(%rip), %rsi     # 0x137850
callq 0x26300
cmpl $0x0, %eax
jne 0x466b6
movl $0x2, -0x4(%rbp)
jmp 0x466db
movq -0x10(%rbp), %rdi
leaq 0xfc663(%rip), %rsi     # 0x142d24
callq 0x26300
cmpl $0x0, %eax
jne 0x466d4
movl $0x3, -0x4(%rbp)
jmp 0x466db
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/networking.c
// Function: getClientType
int getClientType(client *c) {
    if (c->flags & CLIENT_MASTER) return CLIENT_TYPE_MASTER;
    if ((c->flags & CLIENT_SLAVE) && !(c->flags & CLIENT_MONITOR))
        return CLIENT_TYPE_SLAVE;
    if (c->flags & CLIENT_PUBSUB) return CLIENT_TYPE_PUBSUB;
    return CLIENT_TYPE_NORMAL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x46713
movl $0x3, -0x4(%rbp)
jmp 0x46764
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x46740
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
jne 0x46740
movl $0x1, -0x4(%rbp)
jmp 0x46764
movq -0x10(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x40000, %eax          # imm = 0x40000
cmpl $0x0, %eax
je 0x4675d
movl $0x2, -0x4(%rbp)
jmp 0x46764
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/networking.c
// Function: securityWarningCommand
void securityWarningCommand(client *c) {
    static time_t logged_time;
    time_t now = time(NULL);

    if (labs(now-logged_time) > 60) {
        serverLog(LL_WARNING,"Possible SECURITY ATTACK detected. It looks like somebody is sending POST or Host: commands to Redis. This is likely due to an attacker attempting to use Cross Protocol Scripting to compromise your Redis instance. Connection aborted.");
        logged_time = now;
    }
    freeClientAsync(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
xorl %eax, %eax
movl %eax, %edi
callq 0x26ce0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
subq 0x14625c(%rip), %rax    # 0x18ca50
movq %rax, %rcx
negq %rcx
cmovnsq %rcx, %rax
cmpq $0x3c, %rax
jle 0x46822
movl $0x3, %edi
leaq 0xf4697(%rip), %rsi     # 0x13aea7
movb $0x0, %al
callq 0x2fc60
movq -0x10(%rbp), %rax
movq %rax, 0x14622e(%rip)    # 0x18ca50
movq -0x8(%rbp), %rdi
callq 0x44460
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/networking.c
// Function: replaceClientCommandVector
void replaceClientCommandVector(client *c, int argc, robj **argv) {
    freeClientArgv(c);
    zfree(c->argv);
    c->argv = argv;
    c->argc = argc;
    c->cmd = lookupCommandOrOriginal(c->argv[0]->ptr);
    serverAssertWithInfo(c,NULL,c->cmd != NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x44400
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x3afa0
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x33b30
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x46a9b
jmp 0x46ac6
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xf44e7(%rip), %rdx     # 0x13af91
leaq 0xf3f85(%rip), %rcx     # 0x13aa36
movl $0x6a3, %r8d            # imm = 0x6A3
callq 0x78360
movl $0x1, %edi
callq 0x263c0
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/networking.c
// Function: rewriteClientCommandArgument
void rewriteClientCommandArgument(client *c, int i, robj *newval) {
    robj *oldval;

    if (i >= c->argc) {
        c->argv = zrealloc(c->argv,sizeof(robj*)*(i+1));
        c->argc = i+1;
        c->argv[i] = NULL;
    }
    oldval = c->argv[i];
    c->argv[i] = newval;
    incrRefCount(newval);
    if (oldval) decrRefCount(oldval);

    /* If this is the command name make sure to fix c->cmd. */
    if (i == 0) {
        c->cmd = lookupCommandOrOriginal(c->argv[0]->ptr);
        serverAssertWithInfo(c,NULL,c->cmd != NULL);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x38(%rcx), %eax
jl 0x46b35
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rdi
movl -0xc(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
shlq $0x3, %rsi
callq 0x3ae40
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x38(%rax)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0xc(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdx
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0xc(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x18(%rbp), %rdi
callq 0x487b0
cmpq $0x0, -0x20(%rbp)
je 0x46b76
movq -0x20(%rbp), %rdi
callq 0x48f70
cmpl $0x0, -0xc(%rbp)
jne 0x46bd5
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax), %rax
movq 0x8(%rax), %rdi
callq 0x33b30
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x46ba8
jmp 0x46bd3
movq -0x8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq 0xf43da(%rip), %rdx     # 0x13af91
leaq 0xf3e78(%rip), %rcx     # 0x13aa36
movl $0x6c1, %r8d            # imm = 0x6C1
callq 0x78360
movl $0x1, %edi
callq 0x263c0
jmp 0x46bd5
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/networking.c
// Function: getClientTypeName
char *getClientTypeName(int class) {
    switch(class) {
    case CLIENT_TYPE_NORMAL: return "normal";
    case CLIENT_TYPE_SLAVE:  return "slave";
    case CLIENT_TYPE_PUBSUB: return "pubsub";
    case CLIENT_TYPE_MASTER: return "master";
    default:                       return NULL;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq %rax, -0x18(%rbp)
subq $0x3, %rax
ja 0x46c3c
movq -0x18(%rbp), %rax
leaq 0xf3df1(%rip), %rcx     # 0x13a9f0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x100634(%rip), %rax    # 0x147243
movq %rax, -0x8(%rbp)
jmp 0x46c44
leaq 0xfc15a(%rip), %rax     # 0x142d76
movq %rax, -0x8(%rbp)
jmp 0x46c44
leaq 0xf0c27(%rip), %rax     # 0x137850
movq %rax, -0x8(%rbp)
jmp 0x46c44
leaq 0xfc0ee(%rip), %rax     # 0x142d24
movq %rax, -0x8(%rbp)
jmp 0x46c44
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/networking.c
// Function: flushSlavesOutputBuffers
void flushSlavesOutputBuffers(void) {
    listIter li;
    listNode *ln;

    listRewind(server.slaves,&li);
    while((ln = listNext(&li))) {
        client *slave = listNodeValue(ln);
        int events;

        /* Note that the following will not flush output buffers of slaves
         * in STATE_ONLINE but having put_online_on_ack set to true: in this
         * case the writable event is never installed, since the purpose
         * of put_online_on_ack is to postpone the moment it is installed.
         * This is what we want since slaves in this state should not receive
         * writes before the first ACK. */
        events = aeGetFileEvents(server.el,slave->fd);
        if (events & AE_WRITABLE &&
            slave->replstate == SLAVE_STATE_ONLINE &&
            clientHasPendingReplies(slave))
        {
            writeToClient(slave->fd,slave,0);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
leaq 0x1313e9(%rip), %rax    # 0x1781d8
movq 0x1e0(%rax), %rdi
leaq -0x10(%rbp), %rsi
callq 0x27320
leaq -0x10(%rbp), %rdi
callq 0x27380
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x46e72
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
leaq 0x1313b3(%rip), %rax    # 0x1781d8
movq 0x40(%rax), %rdi
movq -0x20(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x2ac40
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x46e70
movq -0x20(%rbp), %rax
cmpl $0x9, 0xa0(%rax)
jne 0x46e70
movq -0x20(%rbp), %rdi
callq 0x424d0
cmpl $0x0, %eax
je 0x46e70
movq -0x20(%rbp), %rax
movl 0x8(%rax), %edi
movq -0x20(%rbp), %rsi
xorl %edx, %edx
callq 0x44550
jmp 0x46dff
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/networking.c
// Function: processEventsWhileBlocked
int processEventsWhileBlocked(void) {
    int iterations = 4; /* See the function top-comment. */
    int count = 0;
    while (iterations--) {
        int events = 0;
        events += aeProcessEvents(server.el, AE_FILE_EVENTS|AE_DONT_WAIT);
        events += handleClientsWithPendingWrites();
        if (!events) break;
        count += events;
    }
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x4, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x4(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x4(%rbp)
cmpl $0x0, %eax
je 0x46ee6
movl $0x0, -0xc(%rbp)
leaq 0x131324(%rip), %rax    # 0x1781d8
movq 0x40(%rax), %rdi
movl $0x5, %esi
callq 0x2ae70
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
callq 0x448b0
addl -0xc(%rbp), %eax
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x46edb
jmp 0x46ee6
movl -0xc(%rbp), %eax
addl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
jmp 0x46e96
movl -0x8(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/util.c
// Function: digits10
uint32_t digits10(uint64_t v) {
    if (v < 10) return 1;
    if (v < 100) return 2;
    if (v < 1000) return 3;
    if (v < 1000000000000UL) {
        if (v < 100000000UL) {
            if (v < 1000000) {
                if (v < 10000) return 4;
                return 5 + (v >= 100000);
            }
            return 7 + (v >= 10000000UL);
        }
        if (v < 10000000000UL) {
            return 9 + (v >= 1000000000UL);
        }
        return 11 + (v >= 100000000000UL);
    }
    return 12 + digits10(v / 1000000000000UL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0xa, -0x10(%rbp)
jae 0x4765f
movl $0x1, -0x4(%rbp)
jmp 0x4775d
cmpq $0x64, -0x10(%rbp)
jae 0x47672
movl $0x2, -0x4(%rbp)
jmp 0x4775d
cmpq $0x3e8, -0x10(%rbp)     # imm = 0x3E8
jae 0x47688
movl $0x3, -0x4(%rbp)
jmp 0x4775d
movabsq $0xe8d4a51000, %rax     # imm = 0xE8D4A51000
cmpq %rax, -0x10(%rbp)
jae 0x4773c
cmpq $0x5f5e100, -0x10(%rbp) # imm = 0x5F5E100
jae 0x476f6
cmpq $0xf4240, -0x10(%rbp)   # imm = 0xF4240
jae 0x476de
cmpq $0x2710, -0x10(%rbp)    # imm = 0x2710
jae 0x476c6
movl $0x4, -0x4(%rbp)
jmp 0x4775d
cmpq $0x186a0, -0x10(%rbp)   # imm = 0x186A0
setae %al
andb $0x1, %al
movzbl %al, %eax
addl $0x5, %eax
movl %eax, -0x4(%rbp)
jmp 0x4775d
cmpq $0x989680, -0x10(%rbp)  # imm = 0x989680
setae %al
andb $0x1, %al
movzbl %al, %eax
addl $0x7, %eax
movl %eax, -0x4(%rbp)
jmp 0x4775d
movabsq $0x2540be400, %rax      # imm = 0x2540BE400
cmpq %rax, -0x10(%rbp)
jae 0x4771e
cmpq $0x3b9aca00, -0x10(%rbp) # imm = 0x3B9ACA00
setae %al
andb $0x1, %al
movzbl %al, %eax
addl $0x9, %eax
movl %eax, -0x4(%rbp)
jmp 0x4775d
movabsq $0x174876e800, %rax     # imm = 0x174876E800
cmpq %rax, -0x10(%rbp)
setae %al
andb $0x1, %al
movzbl %al, %eax
addl $0xb, %eax
movl %eax, -0x4(%rbp)
jmp 0x4775d
movq -0x10(%rbp), %rax
movabsq $0xe8d4a51000, %rcx     # imm = 0xE8D4A51000
xorl %edx, %edx
divq %rcx
movq %rax, %rdi
callq 0x47640
addl $0xc, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/util.c
// Function: sdigits10
uint32_t sdigits10(int64_t v) {
    if (v < 0) {
        /* Abs value of LLONG_MIN requires special handling. */
        uint64_t uv = (v != LLONG_MIN) ?
                      (uint64_t)-v : ((uint64_t) LLONG_MAX)+1;
        return digits10(uv)+1; /* +1 for the minus. */
    } else {
        return digits10(v);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jge 0x477c8
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x10(%rbp)
je 0x4779f
xorl %eax, %eax
subq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
jmp 0x477af
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, -0x20(%rbp)
jmp 0x477af
movq -0x20(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x47640
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x477d4
movq -0x10(%rbp), %rdi
callq 0x47640
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/util.c
// Function: string2l
int string2l(const char *s, size_t slen, long *lval) {
    long long llval;

    if (!string2ll(s,slen,&llval))
        return 0;

    if (llval < LONG_MIN || llval > LONG_MAX)
        return 0;

    *lval = (long)llval;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq -0x28(%rbp), %rdx
callq 0x47970
cmpl $0x0, %eax
jne 0x47c13
movl $0x0, -0x4(%rbp)
jmp 0x47c4e
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x28(%rbp)
jl 0x47c33
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x28(%rbp)
jle 0x47c3c
movl $0x0, -0x4(%rbp)
jmp 0x47c4e
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: createObject
robj *createObject(int type, void *ptr) {
    robj *o = zmalloc(sizeof(*o));
    o->type = type;
    o->encoding = OBJ_ENCODING_RAW;
    o->ptr = ptr;
    o->refcount = 1;

    /* Set the LRU to the current lruclock (minutes resolution). */
    o->lru = LRU_CLOCK();
    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x10, %edi
callq 0x3acd0
movq %rax, -0x18(%rbp)
movl -0x4(%rbp), %edx
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xf, %edx
andl $-0x10, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x4(%rax)
movl $0x3e8, %eax            # imm = 0x3E8
leaq 0x12fcf4(%rip), %rcx    # 0x1781d8
cltd
idivl 0x20(%rcx)
cmpl $0x3e8, %eax            # imm = 0x3E8
jg 0x48503
leaq 0x12fce2(%rip), %rax    # 0x1781d8
movl 0x48(%rax), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x1c(%rbp)
jmp 0x4850b
callq 0x30a00
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %edx
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff, %edx         # imm = 0xFFFFFF
shll $0x8, %edx
andl $0xff, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
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/object.c
// Function: createEmbeddedStringObject
robj *createEmbeddedStringObject(const char *ptr, size_t len) {
    robj *o = zmalloc(sizeof(robj)+sizeof(struct sdshdr8)+len+1);
    struct sdshdr8 *sh = (void*)(o+1);

    o->type = OBJ_STRING;
    o->encoding = OBJ_ENCODING_EMBSTR;
    o->ptr = sh+1;
    o->refcount = 1;
    o->lru = LRU_CLOCK();

    sh->len = len;
    sh->alloc = len;
    sh->flags = SDS_TYPE_8;
    if (ptr) {
        memcpy(sh->buf,ptr,len);
        sh->buf[len] = '\0';
    } else {
        memset(sh->buf,0,len+1);
    }
    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x13, %rdi
addq $0x1, %rdi
callq 0x3acd0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $-0x10, %ecx
orl $0x0, %ecx
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x80, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rcx
addq $0x3, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x4(%rax)
movl $0x3e8, %eax            # imm = 0x3E8
leaq 0x12fbee(%rip), %rcx    # 0x1781d8
cltd
idivl 0x20(%rcx)
cmpl $0x3e8, %eax            # imm = 0x3E8
jg 0x48609
leaq 0x12fbdc(%rip), %rax    # 0x1781d8
movl 0x48(%rax), %eax
andl $0xffffff, %eax         # imm = 0xFFFFFF
movl %eax, -0x24(%rbp)
jmp 0x48611
callq 0x30a00
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %edx
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff, %edx         # imm = 0xFFFFFF
shll $0x8, %edx
andl $0xff, %ecx
orl %edx, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rax
movb %al, %cl
movq -0x20(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x20(%rbp), %rax
movb $0x1, 0x2(%rax)
cmpq $0x0, -0x8(%rbp)
je 0x48679
movq -0x20(%rbp), %rdi
addq $0x3, %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x26c60
movq -0x20(%rbp), %rax
movq -0x10(%rbp), %rcx
movb $0x0, 0x3(%rax,%rcx)
jmp 0x48690
movq -0x20(%rbp), %rdi
addq $0x3, %rdi
movq -0x10(%rbp), %rdx
addq $0x1, %rdx
xorl %esi, %esi
callq 0x26110
movq -0x18(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: createStringObject
robj *createStringObject(const char *ptr, size_t len) {
    if (len <= OBJ_ENCODING_EMBSTR_SIZE_LIMIT)
        return createEmbeddedStringObject(ptr,len);
    else
        return createRawStringObject(ptr,len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x2c, -0x18(%rbp)
ja 0x486ca
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x48570
movq %rax, -0x8(%rbp)
jmp 0x486db
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x48540
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/object.c
// Function: createStringObjectFromLongLong
robj *createStringObjectFromLongLong(long long value) {
    robj *o;
    if (value >= 0 && value < OBJ_SHARED_INTEGERS) {
        incrRefCount(shared.integers[value]);
        o = shared.integers[value];
    } else {
        if (value >= LONG_MIN && value <= LONG_MAX) {
            o = createObject(OBJ_STRING, NULL);
            o->encoding = OBJ_ENCODING_INT;
            o->ptr = (void*)((long)value);
        } else {
            o = createObject(OBJ_STRING,sdsfromlonglong(value));
        }
    }
    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jl 0x4873e
cmpq $0x2710, -0x8(%rbp)     # imm = 0x2710
jge 0x4873e
movq -0x8(%rbp), %rcx
leaq 0x130528(%rip), %rax    # 0x178c40
movq 0x1b0(%rax,%rcx,8), %rdi
callq 0x487b0
movq -0x8(%rbp), %rcx
leaq 0x130510(%rip), %rax    # 0x178c40
movq 0x1b0(%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
jmp 0x487a5
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x8(%rbp)
jl 0x4878c
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x8(%rbp)
jg 0x4878c
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x48480
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x10, %ecx
movl %ecx, (%rax)
movq -0x8(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x487a3
movq -0x8(%rbp), %rdi
callq 0x393f0
movq %rax, %rsi
xorl %edi, %edi
callq 0x48480
movq %rax, -0x10(%rbp)
jmp 0x487a5
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: dupStringObject
robj *dupStringObject(robj *o) {
    robj *d;

    serverAssert(o->type == OBJ_STRING);

    switch(o->encoding) {
    case OBJ_ENCODING_RAW:
        return createRawStringObject(o->ptr,sdslen(o->ptr));
    case OBJ_ENCODING_EMBSTR:
        return createEmbeddedStringObject(o->ptr,sdslen(o->ptr));
    case OBJ_ENCODING_INT:
        d = createObject(OBJ_STRING, NULL);
        d->encoding = OBJ_ENCODING_INT;
        d->ptr = o->ptr;
        return d;
    default:
        serverPanic("Wrong encoding.");
        break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x4898c
jmp 0x489ae
leaq 0xf208d(%rip), %rdi     # 0x13aa20
leaq 0xf2cfc(%rip), %rsi     # 0x13b696
movl $0xa6, %edx
callq 0x76ce0
movl $0x1, %edi
callq 0x263c0
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
movl %eax, -0x1c(%rbp)
je 0x489d8
jmp 0x489c1
movl -0x1c(%rbp), %eax
subl $0x1, %eax
je 0x48a31
jmp 0x489cb
movl -0x1c(%rbp), %eax
subl $0x8, %eax
je 0x48a06
jmp 0x48a6b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x48aa0
movq -0x28(%rbp), %rdi
movq %rax, %rsi
callq 0x48540
movq %rax, -0x8(%rbp)
jmp 0x48a8d
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x48aa0
movq -0x30(%rbp), %rdi
movq %rax, %rsi
callq 0x48570
movq %rax, -0x8(%rbp)
jmp 0x48a8d
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x48480
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x10, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x48a8d
leaq 0xf2c2d(%rip), %rdi     # 0x13b69f
leaq 0xf2c1d(%rip), %rsi     # 0x13b696
movl $0xb3, %edx
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: createQuicklistObject
robj *createQuicklistObject(void) {
    quicklist *l = quicklistCreate();
    robj *o = createObject(OBJ_LIST,l);
    o->encoding = OBJ_ENCODING_QUICKLIST;
    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x276a0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movl $0x1, %edi
callq 0x48480
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x90, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: createZiplistObject
robj *createZiplistObject(void) {
    unsigned char *zl = ziplistNew();
    robj *o = createObject(OBJ_LIST,zl);
    o->encoding = OBJ_ENCODING_ZIPLIST;
    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x40630
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movl $0x1, %edi
callq 0x48480
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x50, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: createSetObject
robj *createSetObject(void) {
    dict *d = dictCreate(&setDictType,NULL);
    robj *o = createObject(OBJ_SET,d);
    o->encoding = OBJ_ENCODING_HT;
    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0x12e1e1(%rip), %rdi    # 0x176db0
xorl %eax, %eax
movl %eax, %esi
callq 0x2d330
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movl $0x2, %edi
callq 0x48480
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x20, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: createIntsetObject
robj *createIntsetObject(void) {
    intset *is = intsetNew();
    robj *o = createObject(OBJ_SET,is);
    o->encoding = OBJ_ENCODING_INTSET;
    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x7b2b0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rsi
movl $0x2, %edi
callq 0x48480
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x60, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: createZsetObject
robj *createZsetObject(void) {
    zset *zs = zmalloc(sizeof(*zs));
    robj *o;

    zs->dict = dictCreate(&zsetDictType,NULL);
    zs->zsl = zslCreate();
    o = createObject(OBJ_ZSET,zs);
    o->encoding = OBJ_ENCODING_SKIPLIST;
    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x10, %edi
callq 0x3acd0
movq %rax, -0x8(%rbp)
leaq 0x12e133(%rip), %rdi    # 0x176de0
xorl %eax, %eax
movl %eax, %esi
callq 0x2d330
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
callq 0x5dfb0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rsi
movl $0x3, %edi
callq 0x48480
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x70, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: freeListObject
void freeListObject(robj *o) {
    if (o->encoding == OBJ_ENCODING_QUICKLIST) {
        quicklistRelease(o->ptr);
    } else {
        serverPanic("Unknown list encoding type");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x9, %eax
jne 0x48d9c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x278e0
jmp 0x48dbe
leaq 0xf290e(%rip), %rdi     # 0x13b6b1
leaq 0xf28ec(%rip), %rsi     # 0x13b696
movl $0xf7, %edx
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: freeSetObject
void freeSetObject(robj *o) {
    switch (o->encoding) {
    case OBJ_ENCODING_HT:
        dictRelease((dict*) o->ptr);
        break;
    case OBJ_ENCODING_INTSET:
        zfree(o->ptr);
        break;
    default:
        serverPanic("Unknown set encoding type");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
movl %eax, -0xc(%rbp)
subl $0x2, %eax
je 0x48dfc
jmp 0x48df2
movl -0xc(%rbp), %eax
subl $0x6, %eax
je 0x48e0b
jmp 0x48e1a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2e230
jmp 0x48e3c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3afa0
jmp 0x48e3c
leaq 0xf28ad(%rip), %rdi     # 0x13b6ce
leaq 0xf286e(%rip), %rsi     # 0x13b696
movl $0x104, %edx            # imm = 0x104
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: freeZsetObject
void freeZsetObject(robj *o) {
    zset *zs;
    switch (o->encoding) {
    case OBJ_ENCODING_SKIPLIST:
        zs = o->ptr;
        dictRelease(zs->dict);
        zslFree(zs->zsl);
        zfree(zs);
        break;
    case OBJ_ENCODING_ZIPLIST:
        zfree(o->ptr);
        break;
    default:
        serverPanic("Unknown sorted set encoding");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
movl %eax, -0x14(%rbp)
subl $0x5, %eax
je 0x48eac
jmp 0x48e72
movl -0x14(%rbp), %eax
subl $0x7, %eax
jne 0x48ebb
jmp 0x48e7c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x2e230
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x5e0a0
movq -0x10(%rbp), %rdi
callq 0x3afa0
jmp 0x48edd
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3afa0
jmp 0x48edd
leaq 0xf2828(%rip), %rdi     # 0x13b6ea
leaq 0xf27cd(%rip), %rsi     # 0x13b696
movl $0x115, %edx            # imm = 0x115
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: freeHashObject
void freeHashObject(robj *o) {
    switch (o->encoding) {
    case OBJ_ENCODING_HT:
        dictRelease((dict*) o->ptr);
        break;
    case OBJ_ENCODING_ZIPLIST:
        zfree(o->ptr);
        break;
    default:
        serverPanic("Unknown hash encoding type");
        break;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
movl %eax, -0xc(%rbp)
subl $0x2, %eax
je 0x48f1c
jmp 0x48f12
movl -0xc(%rbp), %eax
subl $0x5, %eax
je 0x48f2b
jmp 0x48f3a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2e230
jmp 0x48f5c
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3afa0
jmp 0x48f5c
leaq 0xf27c7(%rip), %rdi     # 0x13b708
leaq 0xf274e(%rip), %rsi     # 0x13b696
movl $0x122, %edx            # imm = 0x122
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: decrRefCount
void decrRefCount(robj *o) {
    if (o->refcount <= 0) serverPanic("decrRefCount against refcount <= 0");
    if (o->refcount == 1) {
        switch(o->type) {
        case OBJ_STRING: freeStringObject(o); break;
        case OBJ_LIST: freeListObject(o); break;
        case OBJ_SET: freeSetObject(o); break;
        case OBJ_ZSET: freeZsetObject(o); break;
        case OBJ_HASH: freeHashObject(o); break;
        default: serverPanic("Unknown object type"); break;
        }
        zfree(o);
    } else {
        o->refcount--;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x0, 0x4(%rax)
jg 0x48fa8
leaq 0xf2798(%rip), %rdi     # 0x13b725
leaq 0xf2702(%rip), %rsi     # 0x13b696
movl $0x12c, %edx            # imm = 0x12C
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
movq -0x8(%rbp), %rax
cmpl $0x1, 0x4(%rax)
jne 0x49042
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
movl %eax, %ecx
movq %rcx, -0x10(%rbp)
subl $0x4, %eax
ja 0x49015
movq -0x10(%rbp), %rax
leaq 0xf2657(%rip), %rcx     # 0x13b62c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
callq 0x48d40
jmp 0x49037
movq -0x8(%rbp), %rdi
callq 0x48d70
jmp 0x49037
movq -0x8(%rbp), %rdi
callq 0x48dd0
jmp 0x49037
movq -0x8(%rbp), %rdi
callq 0x48e50
jmp 0x49037
movq -0x8(%rbp), %rdi
callq 0x48ef0
jmp 0x49037
leaq 0xf272e(%rip), %rdi     # 0x13b74a
leaq 0xf2673(%rip), %rsi     # 0x13b696
movl $0x134, %edx            # imm = 0x134
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
movq -0x8(%rbp), %rdi
callq 0x3afa0
jmp 0x4904f
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: checkType
int checkType(client *c, robj *o, int type) {
    if (o->type != type) {
        addReply(c,shared.wrongtypeerr);
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl -0x1c(%rbp), %eax
je 0x490de
movq -0x10(%rbp), %rdi
leaq 0x12fb74(%rip), %rax    # 0x178c40
movq 0x70(%rax), %rsi
callq 0x42cc0
movl $0x1, -0x4(%rbp)
jmp 0x490e5
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/object.c
// Function: isObjectRepresentableAsLongLong
int isObjectRepresentableAsLongLong(robj *o, long long *llval) {
    serverAssertWithInfo(NULL,o,o->type == OBJ_STRING);
    if (o->encoding == OBJ_ENCODING_INT) {
        if (llval) *llval = (long) o->ptr;
        return C_OK;
    } else {
        return string2ll(o->ptr,sdslen(o->ptr),llval) ? C_OK : C_ERR;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x49110
jmp 0x4913b
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0xf1901(%rip), %rdx     # 0x13aa20
leaq 0xf2570(%rip), %rcx     # 0x13b696
movl $0x15d, %r8d            # imm = 0x15D
callq 0x78360
movl $0x1, %edi
callq 0x263c0
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0x4916b
cmpq $0x0, -0x18(%rbp)
je 0x49162
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x491a6
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x48aa0
movq -0x20(%rbp), %rdi
movq %rax, %rsi
movq -0x18(%rbp), %rdx
callq 0x47970
movl %eax, %edx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movl %eax, -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/object.c
// Function: getDecodedObject
robj *getDecodedObject(robj *o) {
    robj *dec;

    if (sdsEncodedObject(o)) {
        incrRefCount(o);
        return o;
    }
    if (o->type == OBJ_STRING && o->encoding == OBJ_ENCODING_INT) {
        char buf[32];

        ll2string(buf,32,(long)o->ptr);
        dec = createStringObject(buf,strlen(buf));
        return dec;
    } else {
        serverPanic("Unknown encoding type");
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x4951e
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x49534
movq -0x10(%rbp), %rdi
callq 0x487b0
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x495b6
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x49594
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0x49594
leaq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
movl $0x20, %esi
callq 0x477e0
leaq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x264f0
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x486a0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x495b6
leaq 0xf21c5(%rip), %rdi     # 0x13b760
leaq 0xf20f4(%rip), %rsi     # 0x13b696
movl $0x1c6, %edx            # imm = 0x1C6
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: equalStringObjects
int equalStringObjects(robj *a, robj *b) {
    if (a->encoding == OBJ_ENCODING_INT &&
        b->encoding == OBJ_ENCODING_INT){
        /* If both strings are integer encoded just check if the stored
         * long is the same. */
        return a->ptr == b->ptr;
    } else {
        return compareStringObjects(a,b) == 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0x4988f
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0x4988f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
jmp 0x498aa
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x497e0
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: stringObjectLen
size_t stringObjectLen(robj *o) {
    serverAssertWithInfo(NULL,o,o->type == OBJ_STRING);
    if (sdsEncodedObject(o)) {
        return sdslen(o->ptr);
    } else {
        return sdigits10((long)o->ptr);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x498dc
jmp 0x49907
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0xf1135(%rip), %rdx     # 0x13aa20
leaq 0xf1da4(%rip), %rcx     # 0x13b696
movl $0x20f, %r8d            # imm = 0x20F
callq 0x78360
movl $0x1, %edi
callq 0x263c0
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x49929
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x4993c
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x48aa0
movq %rax, -0x8(%rbp)
jmp 0x4994f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x47770
movl %eax, %eax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: getDoubleFromObjectOrReply
int getDoubleFromObjectOrReply(client *c, robj *o, double *target, const char *msg) {
    double value;
    if (getDoubleFromObject(o, &value) != C_OK) {
        if (msg != NULL) {
            addReplyError(c,(char*)msg);
        } else {
            addReplyError(c,"value is not a valid float");
        }
        return C_ERR;
    }
    *target = value;
    return C_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x49960
cmpl $0x0, %eax
je 0x49b69
cmpq $0x0, -0x28(%rbp)
je 0x49b50
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x42f90
jmp 0x49b60
movq -0x10(%rbp), %rdi
leaq 0xf4632(%rip), %rsi     # 0x13e18d
callq 0x42f90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x49b7d
movsd -0x30(%rbp), %xmm0
movq -0x20(%rbp), %rax
movsd %xmm0, (%rax)
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/object.c
// Function: getLongDoubleFromObject
int getLongDoubleFromObject(robj *o, long double *target) {
    long double value;
    char *eptr;

    if (o == NULL) {
        value = 0;
    } else {
        serverAssertWithInfo(NULL,o,o->type == OBJ_STRING);
        if (sdsEncodedObject(o)) {
            errno = 0;
            value = strtold(o->ptr, &eptr);
            if (isspace(((char*)o->ptr)[0]) || eptr[0] != '\0' ||
                errno == ERANGE || isnan(value))
                return C_ERR;
        } else if (o->encoding == OBJ_ENCODING_INT) {
            value = (long)o->ptr;
        } else {
            serverPanic("Unknown string encoding");
        }
    }
    *target = value;
    return C_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x49bb1
fldz
fstpt -0x30(%rbp)
jmp 0x49ccb
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x49bc1
jmp 0x49bec
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0xf0e50(%rip), %rdx     # 0x13aa20
leaq 0xf1abf(%rip), %rcx     # 0x13b696
movl $0x248, %r8d            # imm = 0x248
callq 0x78360
movl $0x1, %edi
callq 0x263c0
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x49c0e
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x49c80
callq 0x26880
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq -0x38(%rbp), %rsi
callq 0x260f0
fstpt -0x30(%rbp)
callq 0x26550
movq (%rax), %rax
movq -0x10(%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 0x49c75
movq -0x38(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x49c75
callq 0x26880
cmpl $0x22, (%rax)
je 0x49c75
fldt -0x30(%rbp)
fucompi %st(0), %st
setp %al
testb $0x1, %al
jne 0x49c75
jmp 0x49c7e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x49cdb
jmp 0x49cc9
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0x49ca5
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
fildll -0x40(%rbp)
fstpt -0x30(%rbp)
jmp 0x49cc7
leaq 0xf1afb(%rip), %rdi     # 0x13b7a7
leaq 0xf19e3(%rip), %rsi     # 0x13b696
movl $0x252, %edx            # imm = 0x252
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
jmp 0x49cc9
jmp 0x49ccb
fldt -0x30(%rbp)
movq -0x18(%rbp), %rax
fstpt (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: getLongDoubleFromObjectOrReply
int getLongDoubleFromObjectOrReply(client *c, robj *o, long double *target, const char *msg) {
    long double value;
    if (getLongDoubleFromObject(o, &value) != C_OK) {
        if (msg != NULL) {
            addReplyError(c,(char*)msg);
        } else {
            addReplyError(c,"value is not a valid float");
        }
        return C_ERR;
    }
    *target = value;
    return C_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x49b90
cmpl $0x0, %eax
je 0x49d49
cmpq $0x0, -0x28(%rbp)
je 0x49d30
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x42f90
jmp 0x49d40
movq -0x10(%rbp), %rdi
leaq 0xf4452(%rip), %rsi     # 0x13e18d
callq 0x42f90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x49d59
fldt -0x40(%rbp)
movq -0x20(%rbp), %rax
fstpt (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/object.c
// Function: getLongLongFromObject
int getLongLongFromObject(robj *o, long long *target) {
    long long value;

    if (o == NULL) {
        value = 0;
    } else {
        serverAssertWithInfo(NULL,o,o->type == OBJ_STRING);
        if (sdsEncodedObject(o)) {
            if (string2ll(o->ptr,sdslen(o->ptr),&value) == 0) return C_ERR;
        } else if (o->encoding == OBJ_ENCODING_INT) {
            value = (long)o->ptr;
        } else {
            serverPanic("Unknown string encoding");
        }
    }
    if (target) *target = value;
    return C_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x49d94
movq $0x0, -0x20(%rbp)
jmp 0x49e6f
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x49da4
jmp 0x49dcf
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0xf0c6d(%rip), %rdx     # 0x13aa20
leaq 0xf18dc(%rip), %rcx     # 0x13b696
movl $0x26d, %r8d            # imm = 0x26D
callq 0x78360
movl $0x1, %edi
callq 0x263c0
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x49df1
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x49e2a
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x48aa0
movq -0x28(%rbp), %rdi
movq %rax, %rsi
leaq -0x20(%rbp), %rdx
callq 0x47970
cmpl $0x0, %eax
jne 0x49e28
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x49e88
jmp 0x49e6d
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0x49e49
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x49e6b
leaq 0xf1957(%rip), %rdi     # 0x13b7a7
leaq 0xf183f(%rip), %rsi     # 0x13b696
movl $0x273, %edx            # imm = 0x273
callq 0x76d80
movl $0x1, %edi
callq 0x263c0
jmp 0x49e6d
jmp 0x49e6f
cmpq $0x0, -0x18(%rbp)
je 0x49e81
movq -0x20(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
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/object.c
// Function: getLongLongFromObjectOrReply
int getLongLongFromObjectOrReply(client *c, robj *o, long long *target, const char *msg) {
    long long value;
    if (getLongLongFromObject(o, &value) != C_OK) {
        if (msg != NULL) {
            addReplyError(c,(char*)msg);
        } else {
            addReplyError(c,"value is not an integer or out of range");
        }
        return C_ERR;
    }
    *target = value;
    return C_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x49d70
cmpl $0x0, %eax
je 0x49ef9
cmpq $0x0, -0x28(%rbp)
je 0x49ee0
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x42f90
jmp 0x49ef0
movq -0x10(%rbp), %rdi
leaq 0xf18d6(%rip), %rsi     # 0x13b7c1
callq 0x42f90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x49f0b
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
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/object.c
// Function: getLongFromObjectOrReply
int getLongFromObjectOrReply(client *c, robj *o, long *target, const char *msg) {
    long long value;

    if (getLongLongFromObjectOrReply(c, o, &value, msg) != C_OK) return C_ERR;
    if (value < LONG_MIN || value > LONG_MAX) {
        if (msg != NULL) {
            addReplyError(c,(char*)msg);
        } else {
            addReplyError(c,"value is out of range");
        }
        return C_ERR;
    }
    *target = value;
    return C_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq -0x30(%rbp), %rdx
callq 0x49ea0
cmpl $0x0, %eax
je 0x49f5b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x49fbc
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmpq %rax, -0x30(%rbp)
jl 0x49f7b
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
cmpq %rax, -0x30(%rbp)
jle 0x49faa
cmpq $0x0, -0x28(%rbp)
je 0x49f91
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x42f90
jmp 0x49fa1
movq -0x10(%rbp), %rdi
leaq 0xf184d(%rip), %rsi     # 0x13b7e9
callq 0x42f90
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x49fbc
movq -0x30(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)