LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: usage
void usage(void) {
    fprintf(stderr,"Usage: ./redis-server [/path/to/redis.conf] [options]\n");
    fprintf(stderr,"       ./redis-server - (read config from stdin)\n");
    fprintf(stderr,"       ./redis-server -v or --version\n");
    fprintf(stderr,"       ./redis-server -h or --help\n");
    fprintf(stderr,"       ./redis-server --test-memory <megabytes>\n\n");
    fprintf(stderr,"Examples:\n");
    fprintf(stderr,"       ./redis-server (run the server with default conf)\n");
    fprintf(stderr,"       ./redis-server /etc/redis/6379.conf\n");
    fprintf(stderr,"       ./redis-server --port 7777\n");
    fprintf(stderr,"       ./redis-server --port 7777 --slaveof 127.0.0.1 8888\n");
    fprintf(stderr,"       ./redis-server /etc/myredis.conf --loglevel verbose\n\n");
    fprintf(stderr,"Sentinel mode:\n");
    fprintf(stderr,"       ./redis-server /etc/sentinel.conf --sentinel\n");
    exit(1);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq 0xc4af4(%rip), %r15     # 0xf4fc8
movq (%r15), %rcx
leaq 0x80238(%rip), %rdi     # 0xb0716
pushq $0x36
popq %rsi
pushq $0x1
popq %rbx
movq %rbx, %rdx
callq 0x26b10
movq (%r15), %rcx
leaq 0x80257(%rip), %rdi     # 0xb074d
pushq $0x31
popq %r14
movq %r14, %rsi
movq %rbx, %rdx
callq 0x26b10
movq (%r15), %rcx
leaq 0x80270(%rip), %rdi     # 0xb077f
pushq $0x26
popq %rsi
movq %rbx, %rdx
callq 0x26b10
movq (%r15), %rcx
leaq 0x80282(%rip), %rdi     # 0xb07a6
pushq $0x23
popq %rsi
movq %rbx, %rdx
callq 0x26b10
movq (%r15), %rcx
leaq 0x80291(%rip), %rdi     # 0xb07ca
movq %r14, %rsi
movq %rbx, %rdx
callq 0x26b10
movq (%r15), %rcx
leaq 0x802ae(%rip), %rdi     # 0xb07fc
pushq $0xa
popq %rsi
movq %rbx, %rdx
callq 0x26b10
movq (%r15), %rcx
leaq 0x802a4(%rip), %rdi     # 0xb0807
pushq $0x39
popq %rsi
movq %rbx, %rdx
callq 0x26b10
movq (%r15), %rcx
leaq 0x802c9(%rip), %rdi     # 0xb0841
pushq $0x2b
popq %rsi
movq %rbx, %rdx
callq 0x26b10
movq (%r15), %rcx
leaq 0x802e0(%rip), %rdi     # 0xb086d
pushq $0x22
popq %rsi
movq %rbx, %rdx
callq 0x26b10
movq (%r15), %rcx
leaq 0x802ee(%rip), %rdi     # 0xb0890
pushq $0x3b
popq %rsi
movq %rbx, %rdx
callq 0x26b10
movq (%r15), %rcx
leaq 0x80315(%rip), %rdi     # 0xb08cc
pushq $0x3c
popq %rsi
movq %rbx, %rdx
callq 0x26b10
movq (%r15), %rcx
leaq 0x8033d(%rip), %rdi     # 0xb0909
pushq $0xf
popq %rsi
movq %rbx, %rdx
callq 0x26b10
movq (%r15), %rcx
leaq 0x80338(%rip), %rdi     # 0xb0919
pushq $0x34
popq %rsi
movq %rbx, %rdx
callq 0x26b10
pushq $0x1
popq %rdi
callq 0x262c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: redisAsciiArt
void redisAsciiArt(void) {
#include "asciilogo.h"
    char *buf = zmalloc(1024*16);
    char *mode;

    if (server.cluster_enabled) mode = "cluster";
    else if (server.sentinel_mode) mode = "sentinel";
    else mode = "standalone";

    if (server.syslog_enabled) {
        serverLog(LL_NOTICE,
            "Redis %s (%s/%d) %s bit, %s mode, port %d, pid %ld ready to start.",
            REDIS_VERSION,
            redisGitSHA1(),
            strtol(redisGitDirty(),NULL,10) > 0,
            (sizeof(long) == 8) ? "64" : "32",
            mode, server.port,
            (long) getpid()
        );
    } else {
        snprintf(buf,1024*16,ascii_logo,
            REDIS_VERSION,
            redisGitSHA1(),
            strtol(redisGitDirty(),NULL,10) > 0,
            (sizeof(long) == 8) ? "64" : "32",
            mode, server.port,
            (long) getpid()
        );
        serverLogRaw(LL_NOTICE|LL_RAW,buf);
    }
    zfree(buf);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl $0x4000, %edi           # imm = 0x4000
callq 0x327b9
movq %rax, %rbx
cmpl $0x0, 0xc9331(%rip)     # 0xf9944
leaq 0x7f2b1(%rip), %rax     # 0xaf8cb
leaq 0x8d1f1(%rip), %rcx     # 0xbd812
cmoveq %rax, %rcx
cmpl $0x0, 0xc9c18(%rip)     # 0xfa244
leaq 0x7e1b1(%rip), %r15     # 0xae7e4
cmoveq %rcx, %r15
movl 0xc9a12(%rip), %r13d    # 0xfa050
callq 0x360a8
movq %rax, %r14
callq 0x360b0
pushq $0xa
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x26720
xorl %ebp, %ebp
testq %rax, %rax
setg %bpl
movl 0xc92e0(%rip), %r12d    # 0xf9948
callq 0x26420
movslq %eax, %r10
testl %r13d, %r13d
je 0x306aa
subq $0x8, %rsp
leaq 0x8073b(%rip), %rsi     # 0xb0dbb
leaq 0x80b52(%rip), %rdx     # 0xb11d9
leaq 0x80770(%rip), %r9      # 0xb0dfe
pushq $0x2
popq %rdi
movq %r14, %rcx
movl %ebp, %r8d
xorl %eax, %eax
pushq %r10
pushq %r12
pushq %r15
callq 0x2b699
addq $0x20, %rsp
jmp 0x306ed
leaq 0x8074d(%rip), %r11     # 0xb0dfe
leaq 0x80296(%rip), %rdx     # 0xb094e
leaq 0x80b1a(%rip), %rcx     # 0xb11d9
movl $0x4000, %esi           # imm = 0x4000
movq %rbx, %rdi
movq %r14, %r8
movl %ebp, %r9d
xorl %eax, %eax
pushq %r10
pushq %r12
pushq %r15
pushq %r11
callq 0x26120
addq $0x20, %rsp
movl $0x402, %edi            # imm = 0x402
movq %rbx, %rsi
callq 0x2b51f
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x328f9
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: sigShutdownHandler
static void sigShutdownHandler(int sig) {
    char *msg;

    switch (sig) {
    case SIGINT:
        msg = "Received SIGINT scheduling shutdown...";
        break;
    case SIGTERM:
        msg = "Received SIGTERM scheduling shutdown...";
        break;
    default:
        msg = "Received shutdown signal, scheduling shutdown...";
    };

    /* SIGINT is often delivered via Ctrl+C in an interactive session.
     * If we receive the signal the second time, we interpret this as
     * the user really wanting to quit ASAP without waiting to persist
     * on disk. */
    if (server.shutdown_asap && sig == SIGINT) {
        serverLogFromHandler(LL_WARNING, "You insist... exiting now.");
        rdbRemoveTempFile(getpid());
        exit(1); /* Exit with an error since this was not a clean shutdown. */
    } else if (server.loading) {
        exit(0);
    }

    serverLogFromHandler(LL_WARNING, msg);
    server.shutdown_asap = 1;
}

// Assembly:
pushq %rax
cmpl $0x2, %edi
jne 0x30712
cmpl $0x0, 0xc91e4(%rip)     # 0xf98f4
jne 0x30752
cmpl $0x0, 0xc94ab(%rip)     # 0xf9bc4
jne 0x30775
cmpl $0xf, %edi
leaq 0x80c27(%rip), %rax     # 0xb134c
leaq 0x80c48(%rip), %rcx     # 0xb1374
cmoveq %rax, %rcx
cmpl $0x2, %edi
leaq 0x80beb(%rip), %rsi     # 0xb1325
cmovneq %rcx, %rsi
pushq $0x3
popq %rdi
callq 0x2b754
movl $0x1, 0xc91a4(%rip)     # 0xf98f4
popq %rax
retq
leaq 0x80c4c(%rip), %rsi     # 0xb13a5
pushq $0x3
popq %rdi
callq 0x2b754
callq 0x26420
movl %eax, %edi
callq 0x41d27
pushq $0x1
popq %rdi
callq 0x262c0
xorl %edi, %edi
callq 0x262c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: checkForSentinelMode
int checkForSentinelMode(int argc, char **argv) {
    int j;

    if (strstr(argv[0],"redis-sentinel") != NULL) return 1;
    for (j = 1; j < argc; j++)
        if (!strcmp(argv[j],"--sentinel")) return 1;
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movl %edi, %r14d
movq (%rsi), %rdi
leaq 0x8066d(%rip), %rsi     # 0xb0e01
callq 0x266b0
pushq $0x1
popq %rbp
testq %rax, %rax
jne 0x307cb
movslq %r14d, %r15
pushq $0x1
popq %r12
leaq 0x80661(%rip), %r14     # 0xb0e10
cmpq %r15, %r12
jge 0x307c9
movq (%rbx,%r12,8), %rdi
movq %r14, %rsi
callq 0x268f0
incq %r12
testl %eax, %eax
jne 0x307af
jmp 0x307cb
xorl %ebp, %ebp
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: loadDataFromDisk
void loadDataFromDisk(void) {
    long long start = ustime();
    if (server.aof_state == AOF_ON) {
        if (loadAppendOnlyFile(server.aof_filename) == C_OK)
            serverLog(LL_NOTICE,"DB loaded from append only file: %.3f seconds",(float)(ustime()-start)/1000000);
    } else {
        if (rdbLoad(server.rdb_filename) == C_OK) {
            serverLog(LL_NOTICE,"DB loaded from disk: %.3f seconds",
                (float)(ustime()-start)/1000000);
        } else if (errno != ENOENT) {
            serverLog(LL_WARNING,"Fatal error loading the DB: %s. Exiting.",strerror(errno));
            exit(1);
        }
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
callq 0x2b88b
movq %rax, %rbx
cmpl $0x1, 0xc9727(%rip)     # 0xf9f10
jne 0x30804
movq 0xc9726(%rip), %rdi     # 0xf9f18
callq 0x54983
testl %eax, %eax
jne 0x30820
leaq 0x80619(%rip), %r14     # 0xb0e1b
jmp 0x3082f
movq 0xc97e5(%rip), %rdi     # 0xf9ff0
callq 0x425c7
testl %eax, %eax
je 0x30828
callq 0x26880
movl (%rax), %edi
cmpl $0x2, %edi
jne 0x3085c
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x8061a(%rip), %r14     # 0xb0e49
callq 0x2b88b
subq %rbx, %rax
cvtsi2ss %rax, %xmm0
divss 0x7dc10(%rip), %xmm0    # 0xae454
cvtss2sd %xmm0, %xmm0
pushq $0x2
popq %rdi
movq %r14, %rsi
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2b699
callq 0x26680
leaq 0x80603(%rip), %rsi     # 0xb0e6b
pushq $0x3
popq %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2b699
pushq $0x1
popq %rdi
callq 0x262c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: redisSetProcTitle
void redisSetProcTitle(char *title) {
#ifdef USE_SETPROCTITLE
    char *server_mode = "";
    if (server.cluster_enabled) server_mode = " [cluster]";
    else if (server.sentinel_mode) server_mode = " [sentinel]";

    setproctitle("%s %s:%d%s",
        title,
        server.bindaddr_count ? server.bindaddr[0] : "*",
        server.port,
        server_mode);
#else
    UNUSED(title);
#endif
}

// Assembly:
cmpl $0x0, 0xc908b(%rip)     # 0xf9944
leaq 0x81b45(%rip), %rax     # 0xb2405
leaq 0x8061f(%rip), %rcx     # 0xb0ee6
cmoveq %rax, %rcx
movq %rdi, %rsi
cmpl $0x0, 0xc996f(%rip)     # 0xfa244
leaq 0x805ff(%rip), %r8      # 0xb0edb
cmoveq %rcx, %r8
cmpl $0x0, 0xc90e9(%rip)     # 0xf99d0
je 0x308f2
movq 0xc9060(%rip), %rdx     # 0xf9950
jmp 0x308f9
leaq 0x7e1f2(%rip), %rdx     # 0xaeaeb
movl 0xc9049(%rip), %ecx     # 0xf9948
leaq 0x805ec(%rip), %rdi     # 0xb0ef2
xorl %eax, %eax
jmp 0x6fe8b
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: redisSupervisedUpstart
int redisSupervisedUpstart(void) {
    const char *upstart_job = getenv("UPSTART_JOB");

    if (!upstart_job) {
        serverLog(LL_WARNING,
                "upstart supervision requested, but UPSTART_JOB not found");
        return 0;
    }

    serverLog(LL_NOTICE, "supervised by upstart, will stop to signal readiness");
    raise(SIGSTOP);
    unsetenv("UPSTART_JOB");
    return 1;
}

// Assembly:
pushq %rbx
leaq 0x805e8(%rip), %rdi     # 0xb0efd
callq 0x26850
testq %rax, %rax
je 0x30949
leaq 0x8061c(%rip), %rsi     # 0xb0f42
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x2b699
pushq $0x13
popq %rdi
callq 0x267b0
leaq 0x805be(%rip), %rdi     # 0xb0efd
callq 0x26a80
pushq $0x1
popq %rbx
jmp 0x3095c
leaq 0x805b9(%rip), %rsi     # 0xb0f09
xorl %ebx, %ebx
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x2b699
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/server.c
// Function: redisIsSupervised
int redisIsSupervised(int mode) {
    if (mode == SUPERVISED_AUTODETECT) {
        const char *upstart_job = getenv("UPSTART_JOB");
        const char *notify_socket = getenv("NOTIFY_SOCKET");

        if (upstart_job) {
            redisSupervisedUpstart();
        } else if (notify_socket) {
            redisSupervisedSystemd();
        }
    } else if (mode == SUPERVISED_UPSTART) {
        return redisSupervisedUpstart();
    } else if (mode == SUPERVISED_SYSTEMD) {
        return redisSupervisedSystemd();
    }

    return 0;
}

// Assembly:
cmpl $0x3, %edi
je 0x3090d
cmpl $0x2, %edi
je 0x30960
cmpl $0x1, %edi
jne 0x30b3d
pushq %rbx
leaq 0x803eb(%rip), %rdi     # 0xb0efd
callq 0x26850
movq %rax, %rbx
leaq 0x80456(%rip), %rdi     # 0xb0f77
callq 0x26850
testq %rbx, %rbx
je 0x30b32
callq 0x3090d
jmp 0x30b3c
testq %rax, %rax
je 0x30b3c
callq 0x30960
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/sds.c
// Function: sdsReqType
static inline char sdsReqType(size_t string_size) {
    if (string_size < 1<<5)
        return SDS_TYPE_5;
    if (string_size < 1<<8)
        return SDS_TYPE_8;
    if (string_size < 1<<16)
        return SDS_TYPE_16;
    if (string_size < 1ll<<32)
        return SDS_TYPE_32;
    return SDS_TYPE_64;
}

// Assembly:
cmpq $0x20, %rdi
jae 0x3110e
xorl %eax, %eax
retq
movb $0x1, %al
cmpq $0x100, %rdi            # imm = 0x100
jb 0x3110d
movb $0x2, %al
cmpq $0x10000, %rdi          # imm = 0x10000
jb 0x3110d
shrq $0x20, %rdi
cmpq $0x1, %rdi
movb $0x4, %al
sbbb $0x0, %al
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/pqsort.c
// Function: swapfunc
static inline void
swapfunc(char *a, char *b, size_t n, int swaptype)
{

	if (swaptype <= 1)
		swapcode(long, a, b, n)
	else
		swapcode(char, a, b, n)
}

// Assembly:
cmpl $0x2, %ecx
jge 0x33786
shrq $0x3, %rdx
xorl %eax, %eax
movq (%rdi,%rax,8), %rcx
movq (%rsi,%rax,8), %r8
movq %r8, (%rdi,%rax,8)
movq %rcx, (%rsi,%rax,8)
incq %rax
cmpq %rax, %rdx
jne 0x3376c
jmp 0x3379e
xorl %eax, %eax
movb (%rdi,%rax), %cl
movb (%rsi,%rax), %r8b
movb %r8b, (%rdi,%rax)
movb %cl, (%rsi,%rax)
incq %rax
cmpq %rax, %rdx
jne 0x33788
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/zipmap.c
// Function: zipmapNew
unsigned char *zipmapNew(void) {
    unsigned char *zm = zmalloc(2);

    zm[0] = 0; /* Length */
    zm[1] = ZIPMAP_END;
    return zm;
}

// Assembly:
pushq %rax
pushq $0x2
popq %rdi
callq 0x327b9
movw $0xff00, (%rax)         # imm = 0xFF00
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/zipmap.c
// Function: zipmapLookupRaw
static unsigned char *zipmapLookupRaw(unsigned char *zm, unsigned char *key, unsigned int klen, unsigned int *totlen) {
    unsigned char *p = zm+1, *k = NULL;
    unsigned int l,llen;

    while(*p != ZIPMAP_END) {
        unsigned char free;

        /* Match or skip the key */
        l = zipmapDecodeLength(p);
        llen = zipmapEncodeLength(NULL,l);
        if (key != NULL && k == NULL && l == klen && !memcmp(p+llen,key,l)) {
            /* Only return when the user doesn't care
             * for the total length of the zipmap. */
            if (totlen != NULL) {
                k = p;
            } else {
                return p;
            }
        }
        p += llen+l;
        /* Skip the value as well */
        l = zipmapDecodeLength(p);
        p += zipmapEncodeLength(NULL,l);
        free = p[0];
        p += l+1+free; /* +1 to skip the free byte */
    }
    if (totlen != NULL) *totlen = (unsigned int)(p-zm)+1;
    return k;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbp
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, 0x8(%rsp)
leaq 0x1(%rdi), %r13
movl %edx, %eax
movq %rax, 0x10(%rsp)
xorl %eax, %eax
movzbl (%r13), %r14d
cmpl $0xfe, %r14d
je 0x33a44
cmpl $0xff, %r14d
jne 0x33a48
jmp 0x33adf
movl 0x1(%r13), %r14d
xorl %edx, %edx
cmpl $0xfe, %r14d
setae %dl
leal 0x1(,%rdx,4), %ebx
testq %r12, %r12
je 0x33a9c
testq %rax, %rax
jne 0x33a9c
cmpl %r15d, %r14d
jne 0x33a9a
testq %rbp, %rbp
sete 0x7(%rsp)
movl %ebx, %edi
addq %r13, %rdi
movq %r12, %rsi
movq 0x10(%rsp), %rdx
callq 0x266f0
testl %eax, %eax
sete %dl
movl $0x0, %eax
cmoveq %r13, %rax
testb %dl, 0x7(%rsp)
je 0x33a9c
jmp 0x33af2
xorl %eax, %eax
addl %r14d, %ebx
leaq (%rbx,%r13), %rdx
movzbl (%r13,%rbx), %r8d
cmpl $0xfd, %r8d
jbe 0x33ab6
movl 0x1(%rdx), %r8d
xorl %r10d, %r10d
cmpl $0xfe, %r8d
setae %r10b
leaq (%rdx,%r10,4), %rdi
movzbl 0x1(%rdx,%r10,4), %edx
addl %r8d, %edx
incl %edx
leaq (%rdx,%rdi), %r13
incq %r13
jmp 0x33a28
testq %rbp, %rbp
je 0x33af5
subl 0x8(%rsp), %r13d
incl %r13d
movl %r13d, (%rbp)
jmp 0x33af5
movq %r13, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/zipmap.c
// Function: zipmapRawEntryLength
static unsigned int zipmapDecodeLength(unsigned char *p) {
    unsigned int len = *p;

    if (len < ZIPMAP_BIGLEN) return len;
    memcpy(&len,p+1,sizeof(unsigned int));
    memrev32ifbe(&len);
    return len;
}

// Assembly:
movzbl (%rdi), %eax
cmpl $0xfd, %eax
jbe 0x33b23
movl 0x1(%rdi), %eax
pushq %rbx
xorl %ecx, %ecx
cmpl $0xfe, %eax
setae %cl
leal (%rax,%rcx,4), %ebx
leal (%rax,%rcx,4), %eax
incl %eax
addq %rax, %rdi
callq 0x33c69
addl %ebx, %eax
incl %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/zipmap.c
// Function: zipmapDel
unsigned char *zipmapDel(unsigned char *zm, unsigned char *key, unsigned int klen, int *deleted) {
    unsigned int zmlen, freelen;
    unsigned char *p = zipmapLookupRaw(zm,key,klen,&zmlen);
    if (p) {
        freelen = zipmapRawEntryLength(p);
        memmove(p, p+freelen, zmlen-((p-zm)+freelen+1));
        zm = zipmapResize(zm, zmlen-freelen);

        /* Decrease zipmap length */
        if (zm[0] < ZIPMAP_BIGLEN) zm[0]--;

        if (deleted) *deleted = 1;
    } else {
        if (deleted) *deleted = 0;
    }
    return zm;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdi, %r14
leaq 0x4(%rsp), %rcx
callq 0x339ff
testq %rax, %rax
je 0x33bb4
movq %rax, %r15
movq %rax, %rdi
callq 0x33b16
movl %eax, %ebp
movl %eax, %eax
leaq (%r15,%rax), %rsi
movl 0x4(%rsp), %ecx
movq %r15, %rdx
subq %r14, %rdx
addq %rax, %rdx
notq %rdx
addq %rcx, %rdx
movq %r15, %rdi
callq 0x267e0
movl 0x4(%rsp), %esi
subl %ebp, %esi
movq %r14, %rdi
callq 0x33b04
movq %rax, %r14
movb (%rax), %al
cmpb $-0x3, %al
ja 0x33baa
decb %al
movb %al, (%r14)
testq %rbx, %rbx
je 0x33bbd
pushq $0x1
popq %rax
jmp 0x33bbb
xorl %eax, %eax
testq %rbx, %rbx
je 0x33bbd
movl %eax, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/zipmap.c
// Function: zipmapNext
unsigned char *zipmapNext(unsigned char *zm, unsigned char **key, unsigned int *klen, unsigned char **value, unsigned int *vlen) {
    if (zm[0] == ZIPMAP_END) return NULL;
    if (key) {
        *key = zm;
        *klen = zipmapDecodeLength(zm);
        *key += ZIPMAP_LEN_BYTES(*klen);
    }
    zm += zipmapRawKeyLength(zm);
    if (value) {
        *value = zm+1;
        *vlen = zipmapDecodeLength(zm);
        *value += ZIPMAP_LEN_BYTES(*vlen);
    }
    zm += zipmapRawValueLength(zm);
    return zm;
}

// Assembly:
movb (%rdi), %al
cmpb $-0x1, %al
je 0x33c10
pushq %rbx
movq %rdi, %rbx
testq %rsi, %rsi
je 0x33c07
movq %rbx, (%rsi)
movzbl (%rbx), %eax
cmpl $0xfd, %eax
jbe 0x33bef
movl 0x1(%rbx), %eax
movl %eax, (%rdx)
xorl %edx, %edx
cmpl $0xfe, %eax
setae %dl
leaq (%rbx,%rdx,4), %rax
incq %rax
movq %rax, (%rsi)
movb (%rbx), %al
cmpb $-0x3, %al
ja 0x33c13
movzbl %al, %eax
jmp 0x33c16
xorl %eax, %eax
retq
movl 0x1(%rbx), %eax
xorl %edx, %edx
cmpl $0xfe, %eax
setae %dl
leal (%rax,%rdx,4), %eax
incl %eax
addq %rax, %rbx
testq %rcx, %rcx
je 0x33c5a
leaq 0x1(%rbx), %rax
movq %rax, (%rcx)
movzbl (%rbx), %edx
cmpl $0xfd, %edx
jbe 0x33c41
movl (%rax), %edx
movl %edx, (%r8)
xorl %esi, %esi
cmpl $0xfe, %edx
setae %sil
leaq (%rax,%rsi,4), %rax
incq %rax
movq %rax, (%rcx)
movq %rbx, %rdi
callq 0x33c69
movl %eax, %eax
addq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/zipmap.c
// Function: zipmapGet
int zipmapGet(unsigned char *zm, unsigned char *key, unsigned int klen, unsigned char **value, unsigned int *vlen) {
    unsigned char *p;

    if ((p = zipmapLookupRaw(zm,key,klen,NULL)) == NULL) return 0;
    p += zipmapRawKeyLength(p);
    *vlen = zipmapDecodeLength(p);
    *value = p + ZIPMAP_LEN_BYTES(*vlen) + 1;
    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %r8, %r14
movq %rcx, %rbx
xorl %r15d, %r15d
xorl %ecx, %ecx
callq 0x339ff
testq %rax, %rax
je 0x33cf9
movq %rax, %rcx
movzbl (%rax), %edx
cmpl $0xfd, %edx
jbe 0x33cb9
movl 0x1(%rcx), %edx
xorl %esi, %esi
cmpl $0xfe, %edx
setae %sil
leal (%rdx,%rsi,4), %edx
incl %edx
addq %rdx, %rax
movzbl (%rcx,%rdx), %ecx
cmpl $0xfd, %ecx
jbe 0x33cdc
movl 0x1(%rax), %ecx
movl %ecx, (%r14)
xorl %edx, %edx
cmpl $0xfe, %ecx
setae %dl
leaq (%rax,%rdx,4), %rax
addq $0x2, %rax
movq %rax, (%rbx)
pushq $0x1
popq %r15
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/zipmap.c
// Function: zipmapLen
unsigned int zipmapLen(unsigned char *zm) {
    unsigned int len = 0;
    if (zm[0] < ZIPMAP_BIGLEN) {
        len = zm[0];
    } else {
        unsigned char *p = zipmapRewind(zm);
        while((p = zipmapNext(p,NULL,NULL,NULL,NULL)) != NULL) len++;

        /* Re-store length if small enough */
        if (len < ZIPMAP_BIGLEN) zm[0] = len;
    }
    return len;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movzbl (%rdi), %ebx
cmpl $0xfd, %ebx
jbe 0x33d52
movq %rdi, %r14
leaq 0x1(%rdi), %rax
pushq $-0x1
popq %rbx
movq %rax, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x33bd0
incl %ebx
testq %rax, %rax
jne 0x33d2f
cmpl $0xfd, %ebx
ja 0x33d52
movb %bl, (%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/sha1.c
// Function: SHA1Update
void SHA1Update(SHA1_CTX* context, const unsigned char* data, uint32_t len)
{
    uint32_t i, j;

    j = context->count[0];
    if ((context->count[0] += len << 3) < j)
        context->count[1]++;
    context->count[1] += (len>>29);
    j = (j >> 3) & 63;
    if ((j + len) > 63) {
        memcpy(&context->buffer[j], data, (i = 64-j));
        SHA1Transform(context->state, context->buffer);
        for ( ; i + 63 < len; i += 64) {
            SHA1Transform(context->state, &data[i]);
        }
        j = 0;
    }
    else i = 0;
    memcpy(&context->buffer[j], &data[i], len - i);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl 0x14(%rdi), %eax
leal (,%rbx,8), %ecx
shrl $0x1d, %edx
addl %eax, %ecx
movl %ecx, 0x14(%rdi)
adcl %edx, 0x18(%rdi)
shrl $0x3, %eax
andl $0x3f, %eax
leal (%rax,%rbx), %ecx
cmpl $0x40, %ecx
jb 0x34efe
leaq 0x1c(%r15), %r13
leaq (%r15,%rax), %rdi
addq $0x1c, %rdi
pushq $0x40
popq %r12
subl %eax, %r12d
movq %r14, %rsi
movq %r12, %rdx
callq 0x26c50
movq %r15, %rdi
movq %r13, %rsi
callq 0x33d7c
xorl %r13d, %r13d
leal 0x3f(%r12), %eax
cmpl %ebx, %eax
jae 0x34f04
movl %r12d, %esi
addq %r14, %rsi
movq %r15, %rdi
callq 0x33d7c
addl $0x40, %r12d
jmp 0x34ee1
movl %eax, %r13d
xorl %r12d, %r12d
leaq (%r15,%r13), %rdi
addq $0x1c, %rdi
movl %r12d, %eax
addq %rax, %r14
subl %r12d, %ebx
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x26c50
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/sha1.c
// Function: SHA1Final
void SHA1Final(unsigned char digest[20], SHA1_CTX* context)
{
    unsigned i;
    unsigned char finalcount[8];
    unsigned char c;

#if 0	/* untested "improvement" by DHR */
    /* Convert context->count to a sequence of bytes
     * in finalcount.  Second element first, but
     * big-endian order within element.
     * But we do it all backwards.
     */
    unsigned char *fcp = &finalcount[8];

    for (i = 0; i < 2; i++)
       {
        uint32_t t = context->count[i];
        int j;

        for (j = 0; j < 4; t >>= 8, j++)
	          *--fcp = (unsigned char) t;
    }
#else
    for (i = 0; i < 8; i++) {
        finalcount[i] = (unsigned char)((context->count[(i >= 4 ? 0 : 1)]
         >> ((3-(i & 3)) * 8) ) & 255);  /* Endian independent */
    }
#endif
    c = 0200;
    SHA1Update(context, &c, 1);
    while ((context->count[0] & 504) != 448) {
	c = 0000;
        SHA1Update(context, &c, 1);
    }
    SHA1Update(context, finalcount, 8);  /* Should cause a SHA1Transform() */
    for (i = 0; i < 20; i++) {
        digest[i] = (unsigned char)
         ((context->state[i>>2] >> ((3-(i & 3)) * 8) ) & 255);
    }
    /* Wipe variables */
    memset(context, '\0', sizeof(*context));
    memset(&finalcount, '\0', sizeof(finalcount));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
xorl %edx, %edx
cmpq $0x8, %rdx
je 0x34f68
xorl %ecx, %ecx
cmpq $0x4, %rdx
setb %cl
movl 0x14(%rbx,%rcx,4), %esi
movl %eax, %ecx
notb %cl
andb $0x18, %cl
shrl %cl, %esi
movb %sil, 0x8(%rsp,%rdx)
incq %rdx
addl $0x8, %eax
jmp 0x34f3f
leaq 0x7(%rsp), %r15
movb $-0x80, (%r15)
pushq $0x1
popq %rbp
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x34e81
movl $0x1f8, %r12d           # imm = 0x1F8
movl 0x14(%rbx), %eax
andl %r12d, %eax
cmpl $0x1c0, %eax            # imm = 0x1C0
je 0x34fa8
movb $0x0, 0x7(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x34e81
jmp 0x34f87
leaq 0x8(%rsp), %rsi
pushq $0x8
popq %rdx
movq %rbx, %rdi
callq 0x34e81
xorl %eax, %eax
xorl %edx, %edx
cmpq $0x14, %rdx
je 0x34fdf
movl %edx, %ecx
andl $-0x4, %ecx
movl (%rbx,%rcx), %esi
movl %eax, %ecx
notb %cl
andb $0x18, %cl
shrl %cl, %esi
movb %sil, (%r14,%rdx)
incq %rdx
addl $0x8, %eax
jmp 0x34fbc
xorps %xmm0, %xmm0
movups %xmm0, 0x4c(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ziplist.c
// Function: zipEncodeLength
unsigned int zipEncodeLength(unsigned char *p, unsigned char encoding, unsigned int rawlen) {
    unsigned char len = 1, buf[5];

    if (ZIP_IS_STR(encoding)) {
        /* Although encoding is given it may not be set for strings,
         * so we determine it here using the raw length. */
        if (rawlen <= 0x3f) {
            if (!p) return len;
            buf[0] = ZIP_STR_06B | rawlen;
        } else if (rawlen <= 0x3fff) {
            len += 1;
            if (!p) return len;
            buf[0] = ZIP_STR_14B | ((rawlen >> 8) & 0x3f);
            buf[1] = rawlen & 0xff;
        } else {
            len += 4;
            if (!p) return len;
            buf[0] = ZIP_STR_32B;
            buf[1] = (rawlen >> 24) & 0xff;
            buf[2] = (rawlen >> 16) & 0xff;
            buf[3] = (rawlen >> 8) & 0xff;
            buf[4] = rawlen & 0xff;
        }
    } else {
        /* Implies integer encoding, so length is always 1. */
        if (!p) return len;
        buf[0] = encoding;
    }

    /* Store this length at p */
    memcpy(p,buf,len);
    return len;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
cmpb $-0x41, %sil
jbe 0x3505e
testq %rdi, %rdi
je 0x35080
movb %sil, 0xb(%rsp)
jmp 0x3506c
cmpl $0x3f, %edx
ja 0x3508b
testq %rdi, %rdi
je 0x35080
movb %dl, 0xb(%rsp)
movb $0x1, %al
movzbl %al, %ebx
leaq 0xb(%rsp), %rsi
movq %rbx, %rdx
callq 0x26c50
jmp 0x35083
pushq $0x1
popq %rbx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
cmpl $0x3fff, %edx           # imm = 0x3FFF
ja 0x350ab
testq %rdi, %rdi
je 0x350d3
movl %edx, %eax
shrl $0x8, %eax
orb $0x40, %al
movb %al, 0xb(%rsp)
movb %dl, 0xc(%rsp)
movb $0x2, %al
jmp 0x3506e
testq %rdi, %rdi
je 0x350d7
movb $-0x80, 0xb(%rsp)
movl %edx, %eax
shrl $0x18, %eax
movb %al, 0xc(%rsp)
movl %edx, %eax
shrl $0x10, %eax
movb %al, 0xd(%rsp)
movb %dh, 0xe(%rsp)
movb %dl, 0xf(%rsp)
movb $0x5, %al
jmp 0x3506e
pushq $0x2
jmp 0x35082
pushq $0x5
jmp 0x35082
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ziplist.c
// Function: zipPrevEncodeLength
unsigned int zipPrevEncodeLength(unsigned char *p, unsigned int len) {
    if (p == NULL) {
        return (len < ZIP_BIGLEN) ? 1 : sizeof(len)+1;
    } else {
        if (len < ZIP_BIGLEN) {
            p[0] = len;
            return 1;
        } else {
            p[0] = ZIP_BIGLEN;
            memcpy(p+1,&len,sizeof(len));
            memrev32ifbe(p+1);
            return 1+sizeof(len);
        }
    }
}

// Assembly:
testq %rdi, %rdi
je 0x350ef
cmpl $0xfd, %esi
ja 0x35102
movb %sil, (%rdi)
pushq $0x1
jmp 0x3510a
xorl %eax, %eax
cmpl $0xfe, %esi
setae %al
leal 0x1(,%rax,4), %eax
retq
movb $-0x2, (%rdi)
movl %esi, 0x1(%rdi)
pushq $0x5
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ziplist.c
// Function: zipRawEntryLength
unsigned int zipRawEntryLength(unsigned char *p) {
    unsigned int prevlensize, encoding, lensize, len;
    ZIP_DECODE_PREVLENSIZE(p, prevlensize);
    ZIP_DECODE_LENGTH(p + prevlensize, encoding, lensize, len);
    return prevlensize + lensize + len;
}

// Assembly:
pushq %rbx
xorl %eax, %eax
cmpb $-0x2, (%rdi)
setae %al
leal 0x1(,%rax,4), %ebx
movzbl (%rdi,%rbx), %eax
movl %eax, %ecx
andl $-0x40, %ecx
cmpl $0xc0, %eax
cmovael %eax, %ecx
cmpl $0xbf, %ecx
ja 0x35172
cmpb $-0x80, %cl
je 0x35196
movzbl %cl, %ecx
cmpl $0x40, %ecx
je 0x35185
testl %ecx, %ecx
jne 0x351a0
andl $0x3f, %eax
jmp 0x3517a
movzbl %cl, %edi
callq 0x35008
pushq $0x1
popq %rcx
addl %ecx, %ebx
addl %eax, %ebx
movl %ebx, %eax
popq %rbx
retq
andl $0x3f, %eax
shll $0x8, %eax
movzbl 0x1(%rdi,%rbx), %ecx
orl %ecx, %eax
pushq $0x2
jmp 0x3517c
movl 0x1(%rdi,%rbx), %eax
bswapl %eax
pushq $0x5
jmp 0x3517c
leaq 0x7faa8(%rip), %rdi     # 0xb4c4f
leaq 0x7c622(%rip), %rsi     # 0xb17d0
movl $0x142, %edx            # imm = 0x142
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ziplist.c
// Function: zipTryEncoding
int zipTryEncoding(unsigned char *entry, unsigned int entrylen, long long *v, unsigned char *encoding) {
    long long value;

    if (entrylen >= 32 || entrylen == 0) return 0;
    if (string2ll((char*)entry,entrylen,&value)) {
        /* Great, the string can be encoded. Check what's the smallest
         * of our encoding types that can hold this value. */
        if (value >= 0 && value <= 12) {
            *encoding = ZIP_INT_IMM_MIN+value;
        } else if (value >= INT8_MIN && value <= INT8_MAX) {
            *encoding = ZIP_INT_8B;
        } else if (value >= INT16_MIN && value <= INT16_MAX) {
            *encoding = ZIP_INT_16B;
        } else if (value >= INT24_MIN && value <= INT24_MAX) {
            *encoding = ZIP_INT_24B;
        } else if (value >= INT32_MIN && value <= INT32_MAX) {
            *encoding = ZIP_INT_32B;
        } else {
            *encoding = ZIP_INT_64B;
        }
        *v = value;
        return 1;
    }
    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
leal -0x20(%rsi), %eax
xorl %ebp, %ebp
cmpl $-0x1f, %eax
jb 0x35238
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %esi
leaq 0x8(%rsp), %rdx
callq 0x39865
testl %eax, %eax
je 0x35238
movq 0x8(%rsp), %rax
cmpq $0xc, %rax
ja 0x351f8
leal -0xf(%rax), %ecx
jmp 0x3522f
movsbq %al, %rdx
movb $-0x2, %cl
cmpq %rax, %rdx
je 0x3522f
movswq %ax, %rdx
movb $-0x40, %cl
cmpq %rax, %rdx
je 0x3522f
leaq 0x800000(%rax), %rdx
movb $-0x10, %cl
cmpq $0x1000000, %rdx        # imm = 0x1000000
jb 0x3522f
movslq %eax, %rcx
cmpq %rax, %rcx
setne %cl
shlb $0x4, %cl
addb $-0x30, %cl
movb %cl, (%r14)
movq %rax, (%rbx)
pushq $0x1
popq %rbp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ziplist.c
// Function: zipSaveInteger
void zipSaveInteger(unsigned char *p, int64_t value, unsigned char encoding) {
    int16_t i16;
    int32_t i32;
    int64_t i64;
    if (encoding == ZIP_INT_8B) {
        ((int8_t*)p)[0] = (int8_t)value;
    } else if (encoding == ZIP_INT_16B) {
        i16 = value;
        memcpy(p,&i16,sizeof(i16));
        memrev16ifbe(p);
    } else if (encoding == ZIP_INT_24B) {
        i32 = value<<8;
        memrev32ifbe(&i32);
        memcpy(p,((uint8_t*)&i32)+1,sizeof(i32)-sizeof(uint8_t));
    } else if (encoding == ZIP_INT_32B) {
        i32 = value;
        memcpy(p,&i32,sizeof(i32));
        memrev32ifbe(p);
    } else if (encoding == ZIP_INT_64B) {
        i64 = value;
        memcpy(p,&i64,sizeof(i64));
        memrev64ifbe(p);
    } else if (encoding >= ZIP_INT_IMM_MIN && encoding <= ZIP_INT_IMM_MAX) {
        /* Nothing to do, the value is stored in the encoding itself. */
    } else {
        assert(NULL);
    }
}

// Assembly:
cmpl $0xc0, %edx
je 0x3528a
cmpl $0xd0, %edx
je 0x3526f
cmpl $0xe0, %edx
je 0x3527d
cmpl $0xf0, %edx
je 0x35272
cmpl $0xfe, %edx
jne 0x35281
movb %sil, (%rdi)
retq
movl %esi, (%rdi)
retq
movw %si, (%rdi)
shrl $0x10, %esi
movb %sil, 0x2(%rdi)
retq
movq %rsi, (%rdi)
retq
addb $0xf, %dl
cmpb $0xe, %dl
jae 0x3528e
retq
movw %si, (%rdi)
retq
pushq %rax
leaq 0x7f9b9(%rip), %rdi     # 0xb4c4f
leaq 0x7c533(%rip), %rsi     # 0xb17d0
movl $0x17c, %edx            # imm = 0x17C
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ziplist.c
// Function: zipLoadInteger
int64_t zipLoadInteger(unsigned char *p, unsigned char encoding) {
    int16_t i16;
    int32_t i32;
    int64_t i64, ret = 0;
    if (encoding == ZIP_INT_8B) {
        ret = ((int8_t*)p)[0];
    } else if (encoding == ZIP_INT_16B) {
        memcpy(&i16,p,sizeof(i16));
        memrev16ifbe(&i16);
        ret = i16;
    } else if (encoding == ZIP_INT_32B) {
        memcpy(&i32,p,sizeof(i32));
        memrev32ifbe(&i32);
        ret = i32;
    } else if (encoding == ZIP_INT_24B) {
        i32 = 0;
        memcpy(((uint8_t*)&i32)+1,p,sizeof(i32)-sizeof(uint8_t));
        memrev32ifbe(&i32);
        ret = i32>>8;
    } else if (encoding == ZIP_INT_64B) {
        memcpy(&i64,p,sizeof(i64));
        memrev64ifbe(&i64);
        ret = i64;
    } else if (encoding >= ZIP_INT_IMM_MIN && encoding <= ZIP_INT_IMM_MAX) {
        ret = (encoding & ZIP_INT_IMM_MASK)-1;
    } else {
        assert(NULL);
    }
    return ret;
}

// Assembly:
cmpl $0xc0, %esi
je 0x35307
cmpl $0xd0, %esi
je 0x352dc
cmpl $0xe0, %esi
je 0x352f0
cmpl $0xf0, %esi
je 0x352e0
cmpl $0xfe, %esi
jne 0x352f4
movsbq (%rdi), %rax
retq
movslq (%rdi), %rax
retq
movsbq 0x2(%rdi), %rcx
shlq $0x10, %rcx
movzwl (%rdi), %eax
orq %rcx, %rax
retq
movq (%rdi), %rax
retq
leal 0xf(%rsi), %eax
cmpb $0xd, %al
ja 0x3530c
andb $0xf, %sil
movzbl %sil, %eax
decq %rax
retq
movswq (%rdi), %rax
retq
pushq %rax
leaq 0x7f93b(%rip), %rdi     # 0xb4c4f
leaq 0x7c4b5(%rip), %rsi     # 0xb17d0
movl $0x19b, %edx            # imm = 0x19B
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ziplist.c
// Function: zipEntry
void zipEntry(unsigned char *p, zlentry *e) {

    ZIP_DECODE_PREVLEN(p, e->prevrawlensize, e->prevrawlen);
    ZIP_DECODE_LENGTH(p + e->prevrawlensize, e->encoding, e->lensize, e->len);
    e->headersize = e->prevrawlensize + e->lensize;
    e->p = p;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movb (%rdi), %al
xorl %ecx, %ecx
cmpb $-0x2, %al
setae %cl
leal 0x1(,%rcx,4), %ebp
movl %ebp, (%rsi)
jb 0x35351
movl 0x1(%r14), %eax
jmp 0x35355
movzbl (%r14), %eax
movl %eax, 0x4(%rbx)
movl %ebp, %eax
movzbl (%r14,%rax), %edi
movl %edi, %ecx
andb $-0x40, %cl
movzbl %cl, %ecx
cmpl $0xc0, %edi
cmovael %edi, %ecx
movb %cl, 0x14(%rbx)
jae 0x3539d
shrl $0x6, %edi
xorl $0x2, %edi
leaq 0x7c43e(%rip), %rcx     # 0xb17c0
movslq (%rcx,%rdi,4), %rdx
addq %rcx, %rdx
jmpq *%rdx
movl $0x5, 0x8(%rbx)
movl 0x1(%r14,%rax), %eax
bswapl %eax
pushq $0x5
jmp 0x353bc
movl $0x1, 0x8(%rbx)
callq 0x35008
jmp 0x353ba
movl $0x1, 0x8(%rbx)
movzbl (%r14,%rax), %eax
andl $0x3f, %eax
pushq $0x1
popq %rcx
movl %eax, 0xc(%rbx)
addl %ebp, %ecx
movl %ecx, 0x10(%rbx)
movq %r14, 0x18(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
movl $0x2, 0x8(%rbx)
movzbl (%r14,%rax), %ecx
andl $0x3f, %ecx
shll $0x8, %ecx
movzbl 0x1(%r14,%rax), %eax
orl %ecx, %eax
pushq $0x2
jmp 0x353bc
leaq 0x7f85c(%rip), %rdi     # 0xb4c4f
leaq 0x7c3d6(%rip), %rsi     # 0xb17d0
movl $0x1a4, %edx            # imm = 0x1A4
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ziplist.c
// Function: ziplistNew
unsigned char *ziplistNew(void) {
    unsigned int bytes = ZIPLIST_HEADER_SIZE+1;
    unsigned char *zl = zmalloc(bytes);
    ZIPLIST_BYTES(zl) = intrev32ifbe(bytes);
    ZIPLIST_TAIL_OFFSET(zl) = intrev32ifbe(ZIPLIST_HEADER_SIZE);
    ZIPLIST_LENGTH(zl) = 0;
    zl[bytes-1] = ZIP_END;
    return zl;
}

// Assembly:
pushq %rax
pushq $0xb
popq %rdi
callq 0x327b9
movabsq $0xa0000000b, %rcx      # imm = 0xA0000000B
movq %rcx, (%rax)
andw $0x0, 0x8(%rax)
movb $-0x1, 0xa(%rax)
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ziplist.c
// Function: ziplistResize
unsigned char *ziplistResize(unsigned char *zl, unsigned int len) {
    zl = zrealloc(zl,len);
    ZIPLIST_BYTES(zl) = intrev32ifbe(len);
    zl[len-1] = ZIP_END;
    return zl;
}

// Assembly:
pushq %rbx
movl %esi, %ebx
movl %esi, %esi
callq 0x32863
movl %ebx, (%rax)
decl %ebx
movb $-0x1, (%rax,%rbx)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ziplist.c
// Function: ziplistIndex
unsigned char *ziplistIndex(unsigned char *zl, int index) {
    unsigned char *p;
    unsigned int prevlensize, prevlen = 0;
    if (index < 0) {
        index = (-index)-1;
        p = ZIPLIST_ENTRY_TAIL(zl);
        if (p[0] != ZIP_END) {
            ZIP_DECODE_PREVLEN(p, prevlensize, prevlen);
            while (prevlen > 0 && index--) {
                p -= prevlen;
                ZIP_DECODE_PREVLEN(p, prevlensize, prevlen);
            }
        }
    } else {
        p = ZIPLIST_ENTRY_HEAD(zl);
        while (p[0] != ZIP_END && index--) {
            p += zipRawEntryLength(p);
        }
    }
    return (p[0] == ZIP_END || index > 0) ? NULL : p;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %esi, %ebx
testl %esi, %esi
js 0x35af9
addq $0xa, %rdi
pushq $-0x1
popq %rbp
movq %rdi, %r14
movb (%r14), %al
cmpb $-0x1, %al
je 0x35b18
subl $0x1, %ebx
jb 0x35b1c
movq %r14, %rdi
callq 0x35133
movl %eax, %eax
addq %rax, %r14
jmp 0x35ade
notl %ebx
movl 0x4(%rdi), %eax
leaq (%rdi,%rax), %r14
movzbl (%rdi,%rax), %eax
cmpl $0xfe, %eax
je 0x35b20
movl %eax, %edx
cmpl $0xff, %eax
je 0x35b4a
jmp 0x35b24
movb $-0x1, %al
jmp 0x35b4a
movl %ebp, %ebx
jmp 0x35b4a
movl 0x1(%r14), %edx
pushq $-0x1
popq %rcx
testl %edx, %edx
je 0x35b4a
subl $0x1, %ebx
jb 0x35b48
movl %edx, %eax
subq %rax, %r14
movzbl (%r14), %eax
movl %eax, %edx
cmpl $0xfd, %eax
jbe 0x35b27
movl 0x1(%r14), %edx
jmp 0x35b27
movl %ecx, %ebx
xorl %ecx, %ecx
testl %ebx, %ebx
cmovgq %rcx, %r14
cmpb $-0x1, %al
cmoveq %rcx, %r14
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ziplist.c
// Function: ziplistPrev
unsigned char *ziplistPrev(unsigned char *zl, unsigned char *p) {
    unsigned int prevlensize, prevlen = 0;

    /* Iterating backwards from ZIP_END should return the tail. When "p" is
     * equal to the first element of the list, we're already at the head,
     * and should return NULL. */
    if (p[0] == ZIP_END) {
        p = ZIPLIST_ENTRY_TAIL(zl);
        return (p[0] == ZIP_END) ? NULL : p;
    } else if (p == ZIPLIST_ENTRY_HEAD(zl)) {
        return NULL;
    } else {
        ZIP_DECODE_PREVLEN(p, prevlensize, prevlen);
        assert(prevlen > 0);
        return p-prevlen;
    }
}

// Assembly:
movzbl (%rsi), %eax
cmpl $0xff, %eax
je 0x35bae
addq $0xa, %rdi
cmpq %rsi, %rdi
je 0x35bc1
cmpl $0xfe, %eax
jne 0x35ba3
movl 0x1(%rsi), %eax
testl %eax, %eax
je 0x35bc7
movl %eax, %eax
subq %rax, %rsi
jmp 0x35bc3
movl 0x4(%rdi), %eax
leaq (%rdi,%rax), %rcx
xorl %esi, %esi
cmpb $-0x1, (%rdi,%rax)
cmovneq %rcx, %rsi
jmp 0x35bc3
xorl %esi, %esi
movq %rsi, %rax
retq
pushq %rax
leaq 0x7bc0b(%rip), %rdi     # 0xb17da
leaq 0x7bbfa(%rip), %rsi     # 0xb17d0
movl $0x364, %edx            # imm = 0x364
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ziplist.c
// Function: ziplistGet
unsigned int ziplistGet(unsigned char *p, unsigned char **sstr, unsigned int *slen, long long *sval) {
    zlentry entry;
    if (p == NULL || p[0] == ZIP_END) return 0;
    if (sstr) *sstr = NULL;

    zipEntry(p, &entry);
    if (ZIP_IS_STR(entry.encoding)) {
        if (sstr) {
            *slen = entry.len;
            *sstr = p+entry.headersize;
        }
    } else {
        if (sval) {
            *sval = zipLoadInteger(p+entry.headersize,entry.encoding);
        }
    }
    return 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x20, %rsp
xorl %ebx, %ebx
testq %rdi, %rdi
je 0x35c63
movq %rdi, %r14
cmpb $-0x1, (%rdi)
je 0x35c63
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r12
testq %rsi, %rsi
je 0x35c17
andq $0x0, (%r12)
movq %rsp, %rbx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3532d
movb 0x14(%rbx), %al
pushq $0x1
popq %rbx
cmpb $-0x41, %al
jbe 0x35c4b
testq %r15, %r15
je 0x35c63
movl 0x10(%rsp), %ecx
addq %rcx, %r14
movzbl %al, %esi
movq %r14, %rdi
callq 0x352af
movq %rax, (%r15)
jmp 0x35c63
testq %r12, %r12
je 0x35c63
movl 0xc(%rsp), %eax
movl %eax, (%r13)
movl 0x10(%rsp), %eax
addq %rax, %r14
movq %r14, (%r12)
movl %ebx, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ziplist.c
// Function: ziplistDelete
unsigned char *ziplistDelete(unsigned char *zl, unsigned char **p) {
    size_t offset = *p-zl;
    zl = __ziplistDelete(zl,*p,1);

    /* Store pointer to current element in p, because ziplistDelete will
     * do a realloc which might result in a different "zl"-pointer.
     * When the delete direction is back to front, we might delete the last
     * entry and end up with "p" pointing to ZIP_END, so check this. */
    *p = zl+offset;
    return zl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq (%rsi), %rsi
movq %rsi, %r14
subq %rdi, %r14
pushq $0x1
popq %rdx
callq 0x35575
addq %rax, %r14
movq %r14, (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ziplist.c
// Function: ziplistCompare
unsigned int ziplistCompare(unsigned char *p, unsigned char *sstr, unsigned int slen) {
    zlentry entry;
    unsigned char sencoding;
    long long zval, sval;
    if (p[0] == ZIP_END) return 0;

    zipEntry(p, &entry);
    if (ZIP_IS_STR(entry.encoding)) {
        /* Raw compare */
        if (entry.len == slen) {
            return memcmp(p+entry.headersize,sstr,slen) == 0;
        } else {
            return 0;
        }
    } else {
        /* Try to compare encoded values. Don't compare encoding because
         * different implementations may encoded integers differently. */
        if (zipTryEncoding(sstr,slen,&sval,&sencoding)) {
          zval = zipLoadInteger(p+entry.headersize,entry.encoding);
          return zval == sval;
        }
    }
    return 0;
}

// Assembly:
cmpb $-0x1, (%rdi)
je 0x35d30
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r15
movq %r15, %rsi
callq 0x3532d
movb 0x14(%r15), %r15b
cmpb $-0x41, %r15b
jbe 0x35d34
leaq 0x10(%rsp), %rdx
leaq 0xf(%rsp), %rcx
movq %r14, %rdi
movl %ebp, %esi
callq 0x351c0
testl %eax, %eax
je 0x35d55
movl 0x28(%rsp), %eax
addq %rax, %rbx
movzbl %r15b, %esi
movq %rbx, %rdi
callq 0x352af
cmpq 0x10(%rsp), %rax
jmp 0x35d50
xorl %eax, %eax
jmp 0x35d61
cmpl %ebp, 0x24(%rsp)
jne 0x35d55
movl 0x28(%rsp), %eax
addq %rax, %rbx
movl %ebp, %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x266f0
testl %eax, %eax
sete %al
jmp 0x35d57
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
movzbl %al, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ziplist.c
// Function: ziplistLen
unsigned int ziplistLen(unsigned char *zl) {
    unsigned int len = 0;
    if (intrev16ifbe(ZIPLIST_LENGTH(zl)) < UINT16_MAX) {
        len = intrev16ifbe(ZIPLIST_LENGTH(zl));
    } else {
        unsigned char *p = zl+ZIPLIST_HEADER_SIZE;
        while (*p != ZIP_END) {
            p += zipRawEntryLength(p);
            len++;
        }

        /* Re-store length if small enough */
        if (len < UINT16_MAX) ZIPLIST_LENGTH(zl) = intrev16ifbe(len);
    }
    return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movzwl 0x8(%rdi), %ebx
cmpl $0xffff, %ebx           # imm = 0xFFFF
jne 0x35f4a
movq %rdi, %r14
leaq 0xa(%rdi), %r15
xorl %ebx, %ebx
cmpb $-0x1, (%r15)
je 0x35f3d
movq %r15, %rdi
callq 0x35133
movl %eax, %eax
addq %rax, %r15
incl %ebx
jmp 0x35f26
cmpl $0xfffe, %ebx           # imm = 0xFFFE
ja 0x35f4a
movw %bx, 0x8(%r14)
movl %ebx, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: getStringObjectSdsUsedMemory
size_t getStringObjectSdsUsedMemory(robj *o) {
    serverAssertWithInfo(NULL,o,o->type == OBJ_STRING);
    switch(o->encoding) {
    case OBJ_ENCODING_RAW: return sdsZmallocSize(o->ptr);
    case OBJ_ENCODING_EMBSTR: return zmalloc_size(o)-sizeof(robj);
    default: return 0; /* Just integer encoding for now. */
    }
}

// Assembly:
pushq %rax
movq %rdi, %rsi
movl (%rdi), %eax
testb $0xf, %al
jne 0x36110
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
je 0x360fe
testl %eax, %eax
jne 0x3610c
movq 0x8(%rsi), %rdi
popq %rax
jmp 0x360cc
movq %rsi, %rdi
callq 0x937aa
addq $-0x10, %rax
jmp 0x3610e
xorl %eax, %eax
popq %rcx
retq
leaq 0x7b7cd(%rip), %rdx     # 0xb18e4
leaq 0x7b7dc(%rip), %rcx     # 0xb18fa
pushq $0x2f
popq %r8
xorl %edi, %edi
callq 0x588a4
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/networking.c
// Function: prepareClientToWrite
int prepareClientToWrite(client *c) {
    /* If it's the Lua client we always return ok without installing any
     * handler since there is no socket at all. */
    if (c->flags & CLIENT_LUA) return C_OK;

    /* CLIENT REPLY OFF / SKIP handling: don't send replies. */
    if (c->flags & (CLIENT_REPLY_OFF|CLIENT_REPLY_SKIP)) return C_ERR;

    /* Masters don't receive replies, unless CLIENT_MASTER_FORCE_REPLY flag
     * is set. */
    if ((c->flags & CLIENT_MASTER) &&
        !(c->flags & CLIENT_MASTER_FORCE_REPLY)) return C_ERR;

    if (c->fd <= 0) return C_ERR; /* Fake client for AOF loading. */

    /* Schedule the client to write the output buffers to the socket only
     * if not already done (there were no pending writes already and the client
     * was yet not flagged), and, for slaves, if the slave can actually
     * receive writes at this stage. */
    if (!clientHasPendingReplies(c) &&
        !(c->flags & CLIENT_PENDING_WRITE) &&
        (c->replstate == REPL_STATE_NONE ||
         (c->replstate == SLAVE_STATE_ONLINE && !c->repl_put_online_on_ack)))
    {
        /* Here instead of installing the write handler, we just flag the
         * client and put it into a list of clients that have something
         * to write to the socket. This way before re-entering the event
         * loop, we can try to directly write to the client sockets avoiding
         * a system call. We'll only really install the write handler if
         * we'll not be able to write the whole reply at once. */
        c->flags |= CLIENT_PENDING_WRITE;
        listAddNodeHead(server.clients_pending_write,c);
    }

    /* Authorize the caller to queue in the output buffer of this client. */
    return C_OK;
}

// Assembly:
movl 0x98(%rdi), %ecx
btl $0x8, %ecx
jb 0x3650b
testl $0x1400000, %ecx        # imm = 0x1400000
setne %al
movl %ecx, %edx
andl $0x2002, %edx           # imm = 0x2002
cmpl $0x2, %edx
sete %dl
orb %al, %dl
pushq $-0x1
popq %rax
jne 0x3655d
movq %rdi, %rsi
cmpl $0x0, 0x8(%rdi)
jle 0x3655d
cmpl $0x0, 0x1c0(%rsi)
je 0x3650e
xorl %eax, %eax
retq
btl $0x15, %ecx
jb 0x3650b
movq 0x68(%rsi), %rax
cmpq $0x0, 0x28(%rax)
jne 0x3650b
movl 0xa0(%rsi), %eax
testl %eax, %eax
je 0x36537
cmpl $0x9, %eax
jne 0x3650b
cmpl $0x0, 0xa4(%rsi)
jne 0x3650b
pushq %rax
orl $0x200000, %ecx         # imm = 0x200000
movl %ecx, 0x98(%rsi)
leaq 0xc335d(%rip), %rax     # 0xf98a8
movq 0x1d8(%rax), %rdi
callq 0x26e75
xorl %eax, %eax
addq $0x8, %rsp
retq