LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/replication.c
// Function: replicationHandleMasterDisconnection
void replicationHandleMasterDisconnection(void) {
    server.master = NULL;
    server.repl_state = REPL_STATE_CONNECT;
    server.repl_down_since = server.unixtime;
    /* We lost connection with our master, don't disconnect slaves yet,
     * maybe we'll be able to PSYNC with our master later. We'll disconnect
     * the slaves only if we'll have to do a full resync with our master. */
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1268ad(%rip), %rax    # 0x1781d8
movq $0x0, 0x838(%rax)
leaq 0x12689b(%rip), %rax    # 0x1781d8
movl $0x1, 0x84c(%rax)
leaq 0x12688a(%rip), %rax    # 0x1781d8
movq 0x978(%rax), %rcx
leaq 0x12687c(%rip), %rax    # 0x1781d8
movq %rcx, 0x888(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/replication.c
// Function: replicationCacheMaster
void replicationCacheMaster(client *c) {
    serverAssert(server.master != NULL && server.cached_master == NULL);
    serverLog(LL_NOTICE,"Caching the disconnected master state.");

    /* Unlink the client from the server structures. */
    unlinkClient(c);

    /* Save the master. Server.master will be set to null later by
     * replicationHandleMasterDisconnection(). */
    server.cached_master = server.master;

    /* Invalidate the Peer ID cache. */
    if (c->peerid) {
        sdsfree(c->peerid);
        c->peerid = NULL;
    }

    /* Caching the master happens instead of the actual freeClient() call,
     * so make sure to adjust the replication state. This function will
     * also set server.master to NULL. */
    replicationHandleMasterDisconnection();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x126385(%rip), %rax    # 0x1781d8
cmpq $0x0, 0x838(%rax)
je 0x51e70
leaq 0x126374(%rip), %rax    # 0x1781d8
cmpq $0x0, 0x840(%rax)
jne 0x51e70
jmp 0x51e92
leaq 0xeaf8b(%rip), %rdi     # 0x13ce02
leaq 0xe9c7e(%rip), %rsi     # 0x13bafc
movl $0x776, %edx            # imm = 0x776
callq 0x76ce0
movl $0x1, %edi
callq 0x263c0
movl $0x2, %edi
leaq 0xeaf9a(%rip), %rsi     # 0x13ce38
movb $0x0, %al
callq 0x2fc60
movq -0x8(%rbp), %rdi
callq 0x44200
leaq 0x126323(%rip), %rax    # 0x1781d8
movq 0x838(%rax), %rcx
leaq 0x126315(%rip), %rax    # 0x1781d8
movq %rcx, 0x840(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x1b8(%rax)
je 0x51ef7
movq -0x8(%rbp), %rax
movq 0x1b8(%rax), %rdi
callq 0x38620
movq -0x8(%rbp), %rax
movq $0x0, 0x1b8(%rax)
callq 0x51920
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/replication.c
// Function: replicationScriptCacheAdd
void replicationScriptCacheAdd(sds sha1) {
    int retval;
    sds key = sdsdup(sha1);

    /* Evict oldest. */
    if (listLength(server.repl_scriptcache_fifo) == server.repl_scriptcache_size)
    {
        listNode *ln = listLast(server.repl_scriptcache_fifo);
        sds oldest = listNodeValue(ln);

        retval = dictDelete(server.repl_scriptcache_dict,oldest);
        serverAssert(retval == DICT_OK);
        listDelNode(server.repl_scriptcache_fifo,ln);
    }

    /* Add current. */
    retval = dictAdd(server.repl_scriptcache_dict,key,NULL);
    listAddNodeHead(server.repl_scriptcache_fifo,key);
    serverAssert(retval == DICT_OK);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x38560
movq %rax, -0x18(%rbp)
leaq 0x126258(%rip), %rax    # 0x1781d8
movq 0x8e8(%rax), %rax
movq 0x28(%rax), %rax
leaq 0x126246(%rip), %rcx    # 0x1781d8
movl 0x8f0(%rcx), %ecx
cmpq %rcx, %rax
jne 0x5201a
leaq 0x126234(%rip), %rax    # 0x1781d8
movq 0x8e8(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
leaq 0x126212(%rip), %rax    # 0x1781d8
movq 0x8e0(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x2de50
movl %eax, -0xc(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x51fe1
jmp 0x52003
leaq 0xe98a4(%rip), %rdi     # 0x13b88c
leaq 0xe9b0d(%rip), %rsi     # 0x13bafc
movl $0x815, %edx            # imm = 0x815
callq 0x76ce0
movl $0x1, %edi
callq 0x263c0
leaq 0x1261ce(%rip), %rax    # 0x1781d8
movq 0x8e8(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x271e0
leaq 0x1261b7(%rip), %rax    # 0x1781d8
movq 0x8e0(%rax), %rdi
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x2d8c0
movl %eax, -0xc(%rbp)
leaq 0x126199(%rip), %rax    # 0x1781d8
movq 0x8e8(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x26f30
cmpl $0x0, -0xc(%rbp)
jne 0x52057
jmp 0x52079
leaq 0xe982e(%rip), %rdi     # 0x13b88c
leaq 0xe9a97(%rip), %rsi     # 0x13bafc
movl $0x81c, %edx            # imm = 0x81C
callq 0x76ce0
movl $0x1, %edi
callq 0x263c0
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/replication.c
// Function: replicationCountAcksByOffset
int replicationCountAcksByOffset(long long offset) {
    listIter li;
    listNode *ln;
    int count = 0;

    listRewind(server.slaves,&li);
    while((ln = listNext(&li))) {
        client *slave = ln->value;

        if (slave->replstate != SLAVE_STATE_ONLINE) continue;
        if (slave->repl_ack_off >= offset) count++;
    }
    return count;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0x24(%rbp)
leaq 0x1260de(%rip), %rax    # 0x1781d8
movq 0x1e0(%rax), %rdi
leaq -0x18(%rbp), %rsi
callq 0x27320
leaq -0x18(%rbp), %rdi
callq 0x27380
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x52154
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpl $0x9, 0xa0(%rax)
je 0x52138
jmp 0x5210a
movq -0x30(%rbp), %rax
movq 0xd0(%rax), %rax
cmpq -0x8(%rbp), %rax
jl 0x52152
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x5210a
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/replication.c
// Function: waitCommand
void waitCommand(client *c) {
    mstime_t timeout;
    long numreplicas, ackreplicas;
    long long offset = c->woff;

    /* Argument parsing. */
    if (getLongFromObjectOrReply(c,c->argv[1],&numreplicas,NULL) != C_OK)
        return;
    if (getTimeoutFromObjectOrReply(c,c->argv[2],&timeout,UNIT_MILLISECONDS)
        != C_OK) return;

    /* First try without blocking at all. */
    ackreplicas = replicationCountAcksByOffset(c->woff);
    if (ackreplicas >= numreplicas || c->flags & CLIENT_MULTI) {
        addReplyLongLong(c,ackreplicas);
        return;
    }

    /* Otherwise block the client and put it into our list of clients
     * waiting for ack from slaves. */
    c->bpop.timeout = timeout;
    c->bpop.reploffset = offset;
    c->bpop.numreplicas = numreplicas;
    listAddNodeTail(server.clients_waiting_acks,c);
    blockClient(c,BLOCKED_WAIT);

    /* Make sure that the server will send an ACK request to all the slaves
     * before returning to the event loop. */
    replicationRequestAckFromSlaves();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x198(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
leaq -0x18(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
callq 0x49f20
cmpl $0x0, %eax
je 0x521a2
jmp 0x52263
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rsi
leaq -0x10(%rbp), %rdx
movl $0x1, %ecx
callq 0x9d6d0
cmpl $0x0, %eax
je 0x521ca
jmp 0x52263
movq -0x8(%rbp), %rax
movq 0x198(%rax), %rdi
callq 0x520e0
cltq
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x18(%rbp), %rax
jge 0x521fc
movq -0x8(%rbp), %rax
movl 0x98(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x5220b
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x43780
jmp 0x52263
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x170(%rax)
movq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x190(%rax)
movq -0x18(%rbp), %rax
movl %eax, %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x188(%rax)
leaq 0x125f98(%rip), %rax    # 0x1781d8
movq 0x8f8(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x27000
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x9d770
callq 0x520c0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/replication.c
// Function: processClientsWaitingReplicas
void processClientsWaitingReplicas(void) {
    long long last_offset = 0;
    int last_numreplicas = 0;

    listIter li;
    listNode *ln;

    listRewind(server.clients_waiting_acks,&li);
    while((ln = listNext(&li))) {
        client *c = ln->value;

        /* Every time we find a client that is satisfied for a given
         * offset and number of replicas, we remember it so the next client
         * may be unblocked without calling replicationCountAcksByOffset()
         * if the requested offset / replicas were equal or less. */
        if (last_offset && last_offset > c->bpop.reploffset &&
                           last_numreplicas > c->bpop.numreplicas)
        {
            unblockClient(c);
            addReplyLongLong(c,last_numreplicas);
        } else {
            int numreplicas = replicationCountAcksByOffset(c->bpop.reploffset);

            if (numreplicas >= c->bpop.numreplicas) {
                last_offset = c->bpop.reploffset;
                last_numreplicas = numreplicas;
                unblockClient(c);
                addReplyLongLong(c,numreplicas);
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq $0x0, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
leaq 0x125eda(%rip), %rax    # 0x1781d8
movq 0x8f8(%rax), %rdi
leaq -0x20(%rbp), %rsi
callq 0x27320
leaq -0x20(%rbp), %rdi
callq 0x27380
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x523c4
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x52370
movq -0x8(%rbp), %rax
movq -0x30(%rbp), %rcx
cmpq 0x190(%rcx), %rax
jle 0x52370
movl -0xc(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x188(%rcx), %eax
jle 0x52370
movq -0x30(%rbp), %rdi
callq 0x9d930
movq -0x30(%rbp), %rdi
movslq -0xc(%rbp), %rsi
callq 0x43780
jmp 0x523bf
movq -0x30(%rbp), %rax
movq 0x190(%rax), %rdi
callq 0x520e0
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x30(%rbp), %rcx
cmpl 0x188(%rcx), %eax
jl 0x523bd
movq -0x30(%rbp), %rax
movq 0x190(%rax), %rax
movq %rax, -0x8(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0xc(%rbp)
movq -0x30(%rbp), %rdi
callq 0x9d930
movq -0x30(%rbp), %rdi
movslq -0x34(%rbp), %rsi
callq 0x43780
jmp 0x523bf
jmp 0x5230e
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/replication.c
// Function: replicationGetSlaveOffset
long long replicationGetSlaveOffset(void) {
    long long offset = 0;

    if (server.masterhost != NULL) {
        if (server.master) {
            offset = server.master->reploff;
        } else if (server.cached_master) {
            offset = server.cached_master->reploff;
        }
    }
    /* offset may be -1 when the master does not support it at all, however
     * this function is designed to return an offset that can express the
     * amount of data processed by the master, so we return a positive
     * integer. */
    if (offset < 0) offset = 0;
    return offset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq $0x0, -0x8(%rbp)
leaq 0x125df5(%rip), %rax    # 0x1781d8
cmpq $0x0, 0x828(%rax)
je 0x52447
leaq 0x125de4(%rip), %rax    # 0x1781d8
cmpq $0x0, 0x838(%rax)
je 0x52419
leaq 0x125dd3(%rip), %rax    # 0x1781d8
movq 0x838(%rax), %rax
movq 0xc8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x52445
leaq 0x125db8(%rip), %rax    # 0x1781d8
cmpq $0x0, 0x840(%rax)
je 0x52443
leaq 0x125da7(%rip), %rax    # 0x1781d8
movq 0x840(%rax), %rax
movq 0xc8(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x52445
jmp 0x52447
cmpq $0x0, -0x8(%rbp)
jge 0x52456
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbCheckThenExit
void rdbCheckThenExit(int linenum, char *reason, ...) {
    va_list ap;
    char msg[1024];
    int len;

    len = snprintf(msg,sizeof(msg),
        "Internal error in RDB reading function at rdb.c:%d -> ", linenum);
    va_start(ap,reason);
    vsnprintf(msg+len,sizeof(msg)-len,reason,ap);
    va_end(ap);

    if (!rdbCheckMode) {
        serverLog(LL_WARNING, "%s", msg);
        char *argv[2] = {"",server.rdb_filename};
        redis_check_rdb_main(2,argv);
    } else {
        rdbCheckError("%s",msg);
    }
    exit(1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x500, %rsp            # imm = 0x500
testb %al, %al
je 0x52a97
movaps %xmm0, -0x4d0(%rbp)
movaps %xmm1, -0x4c0(%rbp)
movaps %xmm2, -0x4b0(%rbp)
movaps %xmm3, -0x4a0(%rbp)
movaps %xmm4, -0x490(%rbp)
movaps %xmm5, -0x480(%rbp)
movaps %xmm6, -0x470(%rbp)
movaps %xmm7, -0x460(%rbp)
movq %r9, -0x4d8(%rbp)
movq %r8, -0x4e0(%rbp)
movq %rcx, -0x4e8(%rbp)
movq %rdx, -0x4f0(%rbp)
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x430(%rbp), %rdi
movl -0x4(%rbp), %ecx
movl $0x400, %esi            # imm = 0x400
leaq 0xea620(%rip), %rdx     # 0x13d0f0
movb $0x0, %al
callq 0x26120
movl %eax, -0x434(%rbp)
leaq -0x30(%rbp), %rax
leaq -0x500(%rbp), %rcx
movq %rcx, 0x10(%rax)
leaq 0x10(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x30, 0x4(%rax)
movl $0x10, (%rax)
leaq -0x430(%rbp), %rdi
movslq -0x434(%rbp), %rax
addq %rax, %rdi
movslq -0x434(%rbp), %rax
movl $0x400, %esi            # imm = 0x400
subq %rax, %rsi
movq -0x10(%rbp), %rdx
leaq -0x30(%rbp), %rcx
callq 0x26810
leaq -0x30(%rbp), %rax
leaq 0x13a787(%rip), %rax    # 0x18d2c0
cmpl $0x0, (%rax)
jne 0x52b8e
leaq -0x430(%rbp), %rdx
movl $0x3, %edi
leaq 0xf3b35(%rip), %rsi     # 0x146686
movb $0x0, %al
callq 0x2fc60
leaq 0xe8ab3(%rip), %rax     # 0x13b612
movq %rax, -0x450(%rbp)
leaq 0x12566b(%rip), %rax    # 0x1781d8
movq 0x748(%rax), %rax
movq %rax, -0x448(%rbp)
leaq -0x450(%rbp), %rsi
movl $0x2, %edi
callq 0xa3710
jmp 0x52ba3
leaq -0x430(%rbp), %rsi
leaq 0xf3aea(%rip), %rdi     # 0x146686
movb $0x0, %al
callq 0xa2c30
movl $0x1, %edi
callq 0x262d0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/./rio.h
// Function: rioRead
static inline size_t rioRead(rio *r, void *buf, size_t len) {
    while (len) {
        size_t bytes_to_read = (r->max_processing_chunk && r->max_processing_chunk < len) ? r->max_processing_chunk : len;
        if (r->read(r,buf,bytes_to_read) == 0)
            return 0;
        if (r->update_cksum) r->update_cksum(r,buf,bytes_to_read);
        buf = (char*)buf + bytes_to_read;
        len -= bytes_to_read;
        r->processed_bytes += bytes_to_read;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x52d3c
movq -0x10(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x52cb6
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
cmpq -0x20(%rbp), %rax
jae 0x52cb6
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x52cbe
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq *%rax
cmpq $0x0, %rax
jne 0x52ceb
movq $0x0, -0x8(%rbp)
jmp 0x52d44
movq -0x10(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x52d0c
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq *%rax
movq -0x18(%rbp), %rax
addq -0x28(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
jmp 0x52c84
movq $0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbSaveLen
int rdbSaveLen(rio *rdb, uint32_t len) {
    unsigned char buf[2];
    size_t nwritten;

    if (len < (1<<6)) {
        /* Save a 6 bit len */
        buf[0] = (len&0xFF)|(RDB_6BITLEN<<6);
        if (rdbWriteRaw(rdb,buf,1) == -1) return -1;
        nwritten = 1;
    } else if (len < (1<<14)) {
        /* Save a 14 bit len */
        buf[0] = ((len>>8)&0xFF)|(RDB_14BITLEN<<6);
        buf[1] = len&0xFF;
        if (rdbWriteRaw(rdb,buf,2) == -1) return -1;
        nwritten = 2;
    } else {
        /* Save a 32 bit len */
        buf[0] = (RDB_32BITLEN<<6);
        if (rdbWriteRaw(rdb,buf,1) == -1) return -1;
        len = htonl(len);
        if (rdbWriteRaw(rdb,&len,4) == -1) return -1;
        nwritten = 1+4;
    }
    return nwritten;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x40, -0x14(%rbp)
jae 0x52e53
movl -0x14(%rbp), %eax
andl $0xff, %eax
orl $0x0, %eax
movb %al, -0x16(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x16(%rbp), %rsi
movl $0x1, %edx
callq 0x52be0
cmpl $-0x1, %eax
jne 0x52e46
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x52f02
movq $0x1, -0x20(%rbp)
jmp 0x52efb
cmpl $0x4000, -0x14(%rbp)    # imm = 0x4000
jae 0x52ea2
movl -0x14(%rbp), %eax
shrl $0x8, %eax
andl $0xff, %eax
orl $0x40, %eax
movb %al, -0x16(%rbp)
movl -0x14(%rbp), %eax
andl $0xff, %eax
movb %al, -0x15(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x16(%rbp), %rsi
movl $0x2, %edx
callq 0x52be0
cmpl $-0x1, %eax
jne 0x52e98
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x52f02
movq $0x2, -0x20(%rbp)
jmp 0x52ef9
movb $-0x80, -0x16(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x16(%rbp), %rsi
movl $0x1, %edx
callq 0x52be0
cmpl $-0x1, %eax
jne 0x52ec6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x52f02
movl -0x14(%rbp), %edi
callq 0x26b20
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x14(%rbp), %rsi
movl $0x4, %edx
callq 0x52be0
cmpl $-0x1, %eax
jne 0x52ef1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x52f02
movq $0x5, -0x20(%rbp)
jmp 0x52efb
movq -0x20(%rbp), %rax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbLoadLen
uint32_t rdbLoadLen(rio *rdb, int *isencoded) {
    unsigned char buf[2];
    uint32_t len;
    int type;

    if (isencoded) *isencoded = 0;
    if (rioRead(rdb,buf,1) == 0) return RDB_LENERR;
    type = (buf[0]&0xC0)>>6;
    if (type == RDB_ENCVAL) {
        /* Read a 6 bit encoding type. */
        if (isencoded) *isencoded = 1;
        return buf[0]&0x3F;
    } else if (type == RDB_6BITLEN) {
        /* Read a 6 bit len. */
        return buf[0]&0x3F;
    } else if (type == RDB_14BITLEN) {
        /* Read a 14 bit len. */
        if (rioRead(rdb,buf+1,1) == 0) return RDB_LENERR;
        return ((buf[0]&0x3F)<<8)|buf[1];
    } else if (type == RDB_32BITLEN) {
        /* Read a 32 bit len. */
        if (rioRead(rdb,&len,4) == 0) return RDB_LENERR;
        return ntohl(len);
    } else {
        rdbExitReportCorruptRDB(
            "Unknown length encoding %d in rdbLoadLen()",type);
        return -1; /* Never reached. */
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x52f31
movq -0x18(%rbp), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rdi
leaq -0x1a(%rbp), %rsi
movl $0x1, %edx
callq 0x52c70
cmpq $0x0, %rax
jne 0x52f55
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x53030
movzbl -0x1a(%rbp), %eax
andl $0xc0, %eax
sarl $0x6, %eax
movl %eax, -0x24(%rbp)
cmpl $0x3, -0x24(%rbp)
jne 0x52f8a
cmpq $0x0, -0x18(%rbp)
je 0x52f7b
movq -0x18(%rbp), %rax
movl $0x1, (%rax)
movzbl -0x1a(%rbp), %eax
andl $0x3f, %eax
movl %eax, -0x4(%rbp)
jmp 0x53030
cmpl $0x0, -0x24(%rbp)
jne 0x52f9f
movzbl -0x1a(%rbp), %eax
andl $0x3f, %eax
movl %eax, -0x4(%rbp)
jmp 0x53030
cmpl $0x1, -0x24(%rbp)
jne 0x52fdf
movq -0x10(%rbp), %rdi
leaq -0x1a(%rbp), %rsi
addq $0x1, %rsi
movl $0x1, %edx
callq 0x52c70
cmpq $0x0, %rax
jne 0x52fca
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x53030
movzbl -0x1a(%rbp), %eax
andl $0x3f, %eax
shll $0x8, %eax
movzbl -0x19(%rbp), %ecx
orl %ecx, %eax
movl %eax, -0x4(%rbp)
jmp 0x53030
cmpl $0x2, -0x24(%rbp)
jne 0x53013
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
movl $0x4, %edx
callq 0x52c70
cmpq $0x0, %rax
jne 0x53006
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x53030
movl -0x20(%rbp), %edi
callq 0x265c0
movl %eax, -0x4(%rbp)
jmp 0x53030
movl -0x24(%rbp), %edx
movl $0xa8, %edi
leaq 0xea105(%rip), %rsi     # 0x13d127
movb $0x0, %al
callq 0x52a50
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbEncodeInteger
int rdbEncodeInteger(long long value, unsigned char *enc) {
    if (value >= -(1<<7) && value <= (1<<7)-1) {
        enc[0] = (RDB_ENCVAL<<6)|RDB_ENC_INT8;
        enc[1] = value&0xFF;
        return 2;
    } else if (value >= -(1<<15) && value <= (1<<15)-1) {
        enc[0] = (RDB_ENCVAL<<6)|RDB_ENC_INT16;
        enc[1] = value&0xFF;
        enc[2] = (value>>8)&0xFF;
        return 3;
    } else if (value >= -((long long)1<<31) && value <= ((long long)1<<31)-1) {
        enc[0] = (RDB_ENCVAL<<6)|RDB_ENC_INT32;
        enc[1] = value&0xFF;
        enc[2] = (value>>8)&0xFF;
        enc[3] = (value>>16)&0xFF;
        enc[4] = (value>>24)&0xFF;
        return 5;
    } else {
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $-0x80, -0x10(%rbp)
jl 0x53080
cmpq $0x7f, -0x10(%rbp)
jg 0x53080
movq -0x18(%rbp), %rax
movb $-0x40, (%rax)
movq -0x10(%rbp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x1(%rax)
movl $0x2, -0x4(%rbp)
jmp 0x53154
cmpq $-0x8000, -0x10(%rbp)   # imm = 0x8000
jl 0x530d1
cmpq $0x7fff, -0x10(%rbp)    # imm = 0x7FFF
jg 0x530d1
movq -0x18(%rbp), %rax
movb $-0x3f, (%rax)
movq -0x10(%rbp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
sarq $0x8, %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x2(%rax)
movl $0x3, -0x4(%rbp)
jmp 0x53154
cmpq $-0x80000000, -0x10(%rbp) # imm = 0x80000000
jl 0x5314d
cmpq $0x7fffffff, -0x10(%rbp) # imm = 0x7FFFFFFF
jg 0x5314d
movq -0x18(%rbp), %rax
movb $-0x3e, (%rax)
movq -0x10(%rbp), %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rax
sarq $0x8, %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x10(%rbp), %rax
sarq $0x10, %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x3(%rax)
movq -0x10(%rbp), %rax
sarq $0x18, %rax
andq $0xff, %rax
movb %al, %cl
movq -0x18(%rbp), %rax
movb %cl, 0x4(%rax)
movl $0x5, -0x4(%rbp)
jmp 0x53154
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/rdb.c
// Function: rdbTryIntegerEncoding
int rdbTryIntegerEncoding(char *s, size_t len, unsigned char *enc) {
    long long value;
    char *endptr, buf[32];

    /* Check if it's possible to encode this value as a number */
    value = strtoll(s, &endptr, 10);
    if (endptr[0] != '\0') return 0;
    ll2string(buf,32,value);

    /* If the number converted back into a string is not identical
     * then it's not possible to encode the string as integer */
    if (strlen(buf) != len || memcmp(buf,s,len)) return 0;

    return rdbEncodeInteger(value,enc);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x30(%rbp), %rsi
movl $0xa, %edx
callq 0x26af0
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x5333f
movl $0x0, -0x4(%rbp)
jmp 0x5338f
leaq -0x50(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl $0x20, %esi
callq 0x477e0
leaq -0x50(%rbp), %rdi
callq 0x264f0
cmpq -0x18(%rbp), %rax
jne 0x53376
leaq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x269b0
cmpl $0x0, %eax
je 0x5337f
movl $0x0, -0x4(%rbp)
jmp 0x5338f
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x53040
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbSaveLzfBlob
ssize_t rdbSaveLzfBlob(rio *rdb, void *data, size_t compress_len,
                       size_t original_len) {
    unsigned char byte;
    ssize_t n, nwritten = 0;

    /* Data compressed! Let's save it on disk */
    byte = (RDB_ENCVAL<<6)|RDB_ENC_LZF;
    if ((n = rdbWriteRaw(rdb,&byte,1)) == -1) goto writeerr;
    nwritten += n;

    if ((n = rdbSaveLen(rdb,compress_len)) == -1) goto writeerr;
    nwritten += n;

    if ((n = rdbSaveLen(rdb,original_len)) == -1) goto writeerr;
    nwritten += n;

    if ((n = rdbWriteRaw(rdb,data,compress_len)) == -1) goto writeerr;
    nwritten += n;

    return nwritten;

writeerr:
    return -1;
}

// 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 $0x0, -0x40(%rbp)
movb $-0x3d, -0x29(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x29(%rbp), %rsi
movl $0x1, %edx
callq 0x52be0
cltq
movq %rax, -0x38(%rbp)
cmpq $-0x1, %rax
jne 0x533e7
jmp 0x5347a
movq -0x38(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %esi
callq 0x52e00
cltq
movq %rax, -0x38(%rbp)
cmpq $-0x1, %rax
jne 0x53410
jmp 0x5347a
movq -0x38(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rax
movl %eax, %esi
callq 0x52e00
cltq
movq %rax, -0x38(%rbp)
cmpq $-0x1, %rax
jne 0x53439
jmp 0x5347a
movq -0x38(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x52be0
cltq
movq %rax, -0x38(%rbp)
cmpq $-0x1, %rax
jne 0x53464
jmp 0x5347a
movq -0x38(%rbp), %rax
addq -0x40(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x53482
movq $-0x1, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbSaveLzfStringObject
ssize_t rdbSaveLzfStringObject(rio *rdb, unsigned char *s, size_t len) {
    size_t comprlen, outlen;
    void *out;

    /* We require at least four bytes compression for this to be worth it */
    if (len <= 4) return 0;
    outlen = len-4;
    if ((out = zmalloc(outlen+1)) == NULL) return 0;
    comprlen = lzf_compress(s, len, out, outlen);
    if (comprlen == 0) {
        zfree(out);
        return 0;
    }
    ssize_t nwritten = rdbSaveLzfBlob(rdb, out, comprlen, len);
    zfree(out);
    return nwritten;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x4, -0x20(%rbp)
ja 0x534b8
movq $0x0, -0x8(%rbp)
jmp 0x53548
movq -0x20(%rbp), %rax
subq $0x4, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
addq $0x1, %rdi
callq 0x3acd0
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
jne 0x534e5
movq $0x0, -0x8(%rbp)
jmp 0x53548
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %esi
movq -0x38(%rbp), %rdx
movq -0x30(%rbp), %rax
movl %eax, %ecx
callq 0x3b540
movl %eax, %eax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x5351e
movq -0x38(%rbp), %rdi
callq 0x3afa0
movq $0x0, -0x8(%rbp)
jmp 0x53548
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x533a0
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
callq 0x3afa0
movq -0x40(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbLoadLzfStringObject
void *rdbLoadLzfStringObject(rio *rdb, int flags) {
    int plain = flags & RDB_LOAD_PLAIN;
    unsigned int len, clen;
    unsigned char *c = NULL;
    sds val = NULL;

    if ((clen = rdbLoadLen(rdb,NULL)) == RDB_LENERR) return NULL;
    if ((len = rdbLoadLen(rdb,NULL)) == RDB_LENERR) return NULL;
    if ((c = zmalloc(clen)) == NULL) goto err;

    /* Allocate our target according to the uncompressed size. */
    if (plain) {
        val = zmalloc(len);
    } else {
        if ((val = sdsnewlen(NULL,len)) == NULL) goto err;
    }

    /* Load the compressed representation and uncompress it to target. */
    if (rioRead(rdb,c,clen) == 0) goto err;
    if (lzf_decompress(c,clen,val,len) == 0) {
        if (rdbCheckMode) rdbCheckSetError("Invalid LZF compressed string");
        goto err;
    }
    zfree(c);

    if (plain)
        return val;
    else
        return createObject(OBJ_STRING,val);
err:
    zfree(c);
    if (plain)
        zfree(val);
    else
        sdsfree(val);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x2, %eax
movl %eax, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x52f10
movl %eax, -0x20(%rbp)
cmpl $-0x1, %eax
jne 0x535aa
movq $0x0, -0x8(%rbp)
jmp 0x536ba
movq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x52f10
movl %eax, -0x1c(%rbp)
cmpl $-0x1, %eax
jne 0x535cc
movq $0x0, -0x8(%rbp)
jmp 0x536ba
movl -0x20(%rbp), %eax
movl %eax, %edi
callq 0x3acd0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x535e5
jmp 0x5368f
cmpl $0x0, -0x18(%rbp)
je 0x535fb
movl -0x1c(%rbp), %eax
movl %eax, %edi
callq 0x3acd0
movq %rax, -0x30(%rbp)
jmp 0x53617
movl -0x1c(%rbp), %eax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edi
callq 0x38230
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
jne 0x53615
jmp 0x5368f
jmp 0x53617
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x20(%rbp), %eax
movl %eax, %edx
callq 0x52c70
cmpq $0x0, %rax
jne 0x53631
jmp 0x5368f
movq -0x28(%rbp), %rdi
movl -0x20(%rbp), %esi
movq -0x30(%rbp), %rdx
movl -0x1c(%rbp), %ecx
callq 0x3c0a0
cmpl $0x0, %eax
jne 0x53665
leaq 0x139c70(%rip), %rax    # 0x18d2c0
cmpl $0x0, (%rax)
je 0x53663
leaq 0xe9b1b(%rip), %rdi     # 0x13d177
movb $0x0, %al
callq 0xa2f10
jmp 0x5368f
movq -0x28(%rbp), %rdi
callq 0x3afa0
cmpl $0x0, -0x18(%rbp)
je 0x5367e
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x536ba
movq -0x30(%rbp), %rsi
xorl %edi, %edi
callq 0x48480
movq %rax, -0x8(%rbp)
jmp 0x536ba
movq -0x28(%rbp), %rdi
callq 0x3afa0
cmpl $0x0, -0x18(%rbp)
je 0x536a9
movq -0x30(%rbp), %rdi
callq 0x3afa0
jmp 0x536b2
movq -0x30(%rbp), %rdi
callq 0x38620
movq $0x0, -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/rdb.c
// Function: rdbSaveRawString
ssize_t rdbSaveRawString(rio *rdb, unsigned char *s, size_t len) {
    int enclen;
    ssize_t n, nwritten = 0;

    /* Try integer encoding */
    if (len <= 11) {
        unsigned char buf[5];
        if ((enclen = rdbTryIntegerEncoding((char*)s,len,buf)) > 0) {
            if (rdbWriteRaw(rdb,buf,enclen) == -1) return -1;
            return enclen;
        }
    }

    /* Try LZF compression - under 20 bytes it's unable to compress even
     * aaaaaaaaaaaaaaaaaa so skip it */
    if (server.rdb_compression && len > 20) {
        n = rdbSaveLzfStringObject(rdb,s,len);
        if (n == -1) return -1;
        if (n > 0) return n;
        /* Return value of 0 means data can't be compressed, save the old way */
    }

    /* Store verbatim */
    if ((n = rdbSaveLen(rdb,len)) == -1) return -1;
    nwritten += n;
    if (len > 0) {
        if (rdbWriteRaw(rdb,s,len) == -1) return -1;
        nwritten += len;
    }
    return nwritten;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0xb, -0x20(%rbp)
ja 0x5373e
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq -0x3d(%rbp), %rdx
callq 0x53300
movl %eax, -0x24(%rbp)
cmpl $0x0, %eax
jle 0x5373c
movq -0x10(%rbp), %rdi
leaq -0x3d(%rbp), %rsi
movslq -0x24(%rbp), %rdx
callq 0x52be0
cmpl $-0x1, %eax
jne 0x5372f
movq $-0x1, -0x8(%rbp)
jmp 0x537fa
movslq -0x24(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x537fa
jmp 0x5373e
leaq 0x124a93(%rip), %rax    # 0x1781d8
cmpl $0x0, 0x750(%rax)
je 0x5378e
cmpq $0x14, -0x20(%rbp)
jbe 0x5378e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x53490
movq %rax, -0x30(%rbp)
cmpq $-0x1, -0x30(%rbp)
jne 0x5377b
movq $-0x1, -0x8(%rbp)
jmp 0x537fa
cmpq $0x0, -0x30(%rbp)
jle 0x5378c
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x537fa
jmp 0x5378e
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rax
movl %eax, %esi
callq 0x52e00
cltq
movq %rax, -0x30(%rbp)
cmpq $-0x1, %rax
jne 0x537b3
movq $-0x1, -0x8(%rbp)
jmp 0x537fa
movq -0x30(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x20(%rbp)
jbe 0x537f2
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x52be0
cmpl $-0x1, %eax
jne 0x537e6
movq $-0x1, -0x8(%rbp)
jmp 0x537fa
movq -0x20(%rbp), %rax
addq -0x38(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbSaveLongLongAsStringObject
ssize_t rdbSaveLongLongAsStringObject(rio *rdb, long long value) {
    unsigned char buf[32];
    ssize_t n, nwritten = 0;
    int enclen = rdbEncodeInteger(value,buf);
    if (enclen > 0) {
        return rdbWriteRaw(rdb,buf,enclen);
    } else {
        /* Encode as string */
        enclen = ll2string((char*)buf,32,value);
        serverAssert(enclen < 32);
        if ((n = rdbSaveLen(rdb,enclen)) == -1) return -1;
        nwritten += n;
        if ((n = rdbWriteRaw(rdb,buf,enclen)) == -1) return -1;
        nwritten += n;
    }
    return nwritten;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x53040
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
jle 0x5385a
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movslq -0x54(%rbp), %rdx
callq 0x52be0
cltq
movq %rax, -0x8(%rbp)
jmp 0x53902
leaq -0x40(%rbp), %rdi
movq -0x18(%rbp), %rdx
movl $0x20, %esi
callq 0x477e0
movl %eax, -0x54(%rbp)
cmpl $0x20, -0x54(%rbp)
jge 0x53877
jmp 0x53899
leaq 0xe9917(%rip), %rdi     # 0x13d195
leaq 0xe991c(%rip), %rsi     # 0x13d1a1
movl $0x181, %edx            # imm = 0x181
callq 0x76ce0
movl $0x1, %edi
callq 0x263c0
movq -0x10(%rbp), %rdi
movl -0x54(%rbp), %esi
callq 0x52e00
cltq
movq %rax, -0x48(%rbp)
cmpq $-0x1, %rax
jne 0x538bb
movq $-0x1, -0x8(%rbp)
jmp 0x53902
movq -0x48(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x40(%rbp), %rsi
movslq -0x54(%rbp), %rdx
callq 0x52be0
cltq
movq %rax, -0x48(%rbp)
cmpq $-0x1, %rax
jne 0x538ee
movq $-0x1, -0x8(%rbp)
jmp 0x53902
movq -0x48(%rbp), %rax
addq -0x50(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbSaveStringObject
int rdbSaveStringObject(rio *rdb, robj *obj) {
    /* Avoid to decode the object, then encode it again, if the
     * object is already integer encoded. */
    if (obj->encoding == OBJ_ENCODING_INT) {
        return rdbSaveLongLongAsStringObject(rdb,(long)obj->ptr);
    } else {
        serverAssertWithInfo(NULL,obj,sdsEncodedObject(obj));
        return rdbSaveRawString(rdb,obj->ptr,sdslen(obj->ptr));
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0x5394a
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x53810
movl %eax, -0x4(%rbp)
jmp 0x539cd
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x5396c
movq -0x18(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x5396e
jmp 0x53999
movq -0x18(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
leaq 0xe982a(%rip), %rdx     # 0x13d1a7
leaq 0xe981d(%rip), %rcx     # 0x13d1a1
movl $0x191, %r8d            # imm = 0x191
callq 0x78360
movl $0x1, %edi
callq 0x263c0
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x539e0
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq %rax, %rdx
callq 0x536d0
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/rdb.c
// Function: rdbGenericLoadStringObject
void *rdbGenericLoadStringObject(rio *rdb, int flags) {
    int encode = flags & RDB_LOAD_ENC;
    int plain = flags & RDB_LOAD_PLAIN;
    int isencoded;
    uint32_t len;

    len = rdbLoadLen(rdb,&isencoded);
    if (isencoded) {
        switch(len) {
        case RDB_ENC_INT8:
        case RDB_ENC_INT16:
        case RDB_ENC_INT32:
            return rdbLoadIntegerObject(rdb,len,flags);
        case RDB_ENC_LZF:
            return rdbLoadLzfStringObject(rdb,flags);
        default:
            rdbExitReportCorruptRDB("Unknown RDB string encoding type %d",len);
        }
    }

    if (len == RDB_LENERR) return NULL;
    if (!plain) {
        robj *o = encode ? createStringObject(NULL,len) :
                           createRawStringObject(NULL,len);
        if (len && rioRead(rdb,o->ptr,len) == 0) {
            decrRefCount(o);
            return NULL;
        }
        return o;
    } else {
        void *buf = zmalloc(len);
        if (len && rioRead(rdb,buf,len) == 0) {
            zfree(buf);
            return NULL;
        }
        return buf;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
andl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
andl $0x2, %eax
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x52f10
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x20(%rbp)
je 0x53b03
movl -0x24(%rbp), %eax
movl %eax, -0x3c(%rbp)
subl $0x3, %eax
jb 0x53abe
jmp 0x53ab4
movl -0x3c(%rbp), %eax
subl $0x3, %eax
je 0x53ad6
jmp 0x53aeb
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0x53160
movq %rax, -0x8(%rbp)
jmp 0x53bd6
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x53560
movq %rax, -0x8(%rbp)
jmp 0x53bd6
movl -0x24(%rbp), %edx
movl $0x1b1, %edi            # imm = 0x1B1
leaq 0xe96c3(%rip), %rsi     # 0x13d1bd
movb $0x0, %al
callq 0x52a50
jmp 0x53b03
cmpl $-0x1, -0x24(%rbp)
jne 0x53b16
movq $0x0, -0x8(%rbp)
jmp 0x53bd6
cmpl $0x0, -0x1c(%rbp)
jne 0x53b8f
cmpl $0x0, -0x18(%rbp)
je 0x53b36
movl -0x24(%rbp), %eax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edi
callq 0x486a0
movq %rax, -0x48(%rbp)
jmp 0x53b48
movl -0x24(%rbp), %eax
movl %eax, %esi
xorl %eax, %eax
movl %eax, %edi
callq 0x48540
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x53b85
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0x24(%rbp), %eax
movl %eax, %edx
callq 0x52c70
cmpq $0x0, %rax
jne 0x53b85
movq -0x30(%rbp), %rdi
callq 0x48f70
movq $0x0, -0x8(%rbp)
jmp 0x53bd6
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x53bd6
movl -0x24(%rbp), %eax
movl %eax, %edi
callq 0x3acd0
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x53bce
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movl -0x24(%rbp), %eax
movl %eax, %edx
callq 0x52c70
cmpq $0x0, %rax
jne 0x53bce
movq -0x38(%rbp), %rdi
callq 0x3afa0
movq $0x0, -0x8(%rbp)
jmp 0x53bd6
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbSaveDoubleValue
int rdbSaveDoubleValue(rio *rdb, double val) {
    unsigned char buf[128];
    int len;

    if (isnan(val)) {
        buf[0] = 253;
        len = 1;
    } else if (!isfinite(val)) {
        len = 1;
        buf[0] = (val < 0) ? 255 : 254;
    } else {
#if (DBL_MANT_DIG >= 52) && (LLONG_MAX == 0x7fffffffffffffffLL)
        /* Check if the float is in a safe range to be casted into a
         * long long. We are assuming that long long is 64 bit here.
         * Also we are assuming that there are no implementations around where
         * double has precision < 52 bit.
         *
         * Under this assumptions we test if a double is inside an interval
         * where casting to long long is safe. Then using two castings we
         * make sure the decimal part is zero. If all this is true we use
         * integer printing function that is much faster. */
        double min = -4503599627370495; /* (2^52)-1 */
        double max = 4503599627370496; /* -(2^52) */
        if (val > min && val < max && val == ((double)((long long)val)))
            ll2string((char*)buf+1,sizeof(buf)-1,(long long)val);
        else
#endif
            snprintf((char*)buf+1,sizeof(buf)-1,"%.17g",val);
        buf[0] = strlen((char*)buf+1);
        len = buf[0]+1;
    }
    return rdbWriteRaw(rdb,buf,len);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm0
ucomisd %xmm0, %xmm0
setp %al
testb $0x1, %al
jne 0x53c46
jmp 0x53c5c
movb $-0x3, -0x90(%rbp)
movl $0x1, -0x94(%rbp)
jmp 0x53cfd
movsd -0x10(%rbp), %xmm0
movq %xmm0, %rax
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq %rcx, %rax
movabsq $0x7ff0000000000000, %rcx # imm = 0x7FF0000000000000
subq %rcx, %rax
setl %al
testb $0x1, %al
jne 0x53cb2
movl $0x1, -0x94(%rbp)
movsd -0x10(%rbp), %xmm1
xorps %xmm0, %xmm0
movl $0xfe, %eax
movl $0xff, %ecx
ucomisd %xmm1, %xmm0
cmoval %ecx, %eax
movb %al, -0x90(%rbp)
jmp 0x53cfb
leaq -0x90(%rbp), %rdi
addq $0x1, %rdi
movsd -0x10(%rbp), %xmm0
movl $0x7f, %esi
leaq 0xe6dc1(%rip), %rdx     # 0x13aa8f
movb $0x1, %al
callq 0x26120
leaq -0x90(%rbp), %rdi
addq $0x1, %rdi
callq 0x264f0
movb %al, -0x90(%rbp)
movzbl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x53cfd
movq -0x8(%rbp), %rdi
leaq -0x90(%rbp), %rsi
movslq -0x94(%rbp), %rdx
callq 0x52be0
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbLoadDoubleValue
int rdbLoadDoubleValue(rio *rdb, double *val) {
    char buf[256];
    unsigned char len;

    if (rioRead(rdb,&len,1) == 0) return -1;
    switch(len) {
    case 255: *val = R_NegInf; return 0;
    case 254: *val = R_PosInf; return 0;
    case 253: *val = R_Nan; return 0;
    default:
        if (rioRead(rdb,buf,len) == 0) return -1;
        buf[len] = '\0';
        sscanf(buf, "%lg", val);
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x130, %rsp            # imm = 0x130
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x121(%rbp), %rsi
movl $0x1, %edx
callq 0x52c70
cmpq $0x0, %rax
jne 0x53d5a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x53e3c
movzbl -0x121(%rbp), %eax
movl %eax, -0x128(%rbp)
subl $0xfd, %eax
je 0x53dc9
jmp 0x53d70
movl -0x128(%rbp), %eax
subl $0xfe, %eax
je 0x53dad
jmp 0x53d7f
movl -0x128(%rbp), %eax
subl $0xff, %eax
jne 0x53de5
jmp 0x53d8e
leaq 0x138aeb(%rip), %rax    # 0x18c880
movsd (%rax), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x53e3c
leaq 0x138ac4(%rip), %rax    # 0x18c878
movsd (%rax), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x53e3c
leaq 0x138ab8(%rip), %rax    # 0x18c888
movsd (%rax), %xmm0
movq -0x18(%rbp), %rax
movsd %xmm0, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x53e3c
movq -0x10(%rbp), %rdi
leaq -0x120(%rbp), %rsi
movzbl -0x121(%rbp), %eax
movl %eax, %edx
callq 0x52c70
cmpq $0x0, %rax
jne 0x53e0d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x53e3c
movzbl -0x121(%rbp), %eax
movb $0x0, -0x120(%rbp,%rax)
leaq -0x120(%rbp), %rdi
movq -0x18(%rbp), %rdx
leaq 0xe93b3(%rip), %rsi     # 0x13d1e1
movb $0x0, %al
callq 0x26290
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x130, %rsp            # imm = 0x130
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/rdb.c
// Function: rdbLoadObjectType
int rdbLoadObjectType(rio *rdb) {
    int type;
    if ((type = rdbLoadType(rdb)) == -1) return -1;
    if (!rdbIsObjectType(type)) return -1;
    return type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x52c30
movl %eax, -0x14(%rbp)
cmpl $-0x1, %eax
jne 0x54086
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x540ad
cmpl $0x0, -0x14(%rbp)
jl 0x54092
cmpl $0x4, -0x14(%rbp)
jle 0x540a7
cmpl $0x9, -0x14(%rbp)
jl 0x5409e
cmpl $0xe, -0x14(%rbp)
jle 0x540a7
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x540ad
movl -0x14(%rbp), %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/rdb.c
// Function: rdbSaveKeyValuePair
int rdbSaveKeyValuePair(rio *rdb, robj *key, robj *val,
                        long long expiretime, long long now)
{
    /* Save the expire time */
    if (expiretime != -1) {
        /* If this key is already expired skip it */
        if (expiretime < now) return 0;
        if (rdbSaveType(rdb,RDB_OPCODE_EXPIRETIME_MS) == -1) return -1;
        if (rdbSaveMillisecondTime(rdb,expiretime) == -1) return -1;
    }

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpq $-0x1, -0x28(%rbp)
je 0x54892
movq -0x28(%rbp), %rax
cmpq -0x30(%rbp), %rax
jge 0x54859
movl $0x0, -0x4(%rbp)
jmp 0x548eb
movq -0x10(%rbp), %rdi
movl $0xfc, %esi
callq 0x52bb0
cmpl $-0x1, %eax
jne 0x54875
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x548eb
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x52d90
cmpl $-0x1, %eax
jne 0x54890
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x548eb
jmp 0x54892
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x53e50
cmpl $-0x1, %eax
jne 0x548ad
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x548eb
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x53910
cmpl $-0x1, %eax
jne 0x548c8
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x548eb
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x540c0
cmpq $-0x1, %rax
jne 0x548e4
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x548eb
movl $0x1, -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/rdb.c
// Function: rdbSaveAuxField
int rdbSaveAuxField(rio *rdb, void *key, size_t keylen, void *val, size_t vallen) {
    if (rdbSaveType(rdb,RDB_OPCODE_AUX) == -1) return -1;
    if (rdbSaveRawString(rdb,key,keylen) == -1) return -1;
    if (rdbSaveRawString(rdb,val,vallen) == -1) return -1;
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl $0xfa, %esi
callq 0x52bb0
cmpl $-0x1, %eax
jne 0x54938
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5497f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x536d0
cmpq $-0x1, %rax
jne 0x54958
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5497f
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x536d0
cmpq $-0x1, %rax
jne 0x54978
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x5497f
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)