LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/server.c
// Function: alsoPropagate
void alsoPropagate(struct redisCommand *cmd, int dbid, robj **argv, int argc,
                   int target)
{
    robj **argvcopy;
    int j;

    if (server.loading) return; /* No propagation during loading. */

    argvcopy = zmalloc(sizeof(robj*)*argc);
    for (j = 0; j < argc; j++) {
        argvcopy[j] = argv[j];
        incrRefCount(argv[j]);
    }
    redisOpArrayAppend(&server.also_propagate,cmd,dbid,argvcopy,argc,target);
}

// Assembly:
cmpl $0x0, 0xcedee(%rip)     # 0x101bc4
je 0x32dd9
retq
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r13
movq %rdi, %r15
movl %esi, (%rsp)
movl %r8d, 0x4(%rsp)
movslq %ecx, %rbx
leaq (,%rbx,8), %rdi
callq 0x382d1
movq %rax, %r12
testl %ebx, %ebx
jle 0x32e26
movl %ebp, %ebx
xorl %r14d, %r14d
movq (%r13,%r14,8), %rdi
movq %rdi, (%r12,%r14,8)
callq 0x407a8
incq %r14
cmpq %r14, %rbx
jne 0x32e10
movq 0xcf20b(%rip), %rdi     # 0x102038
movslq 0xcf20c(%rip), %rsi     # 0x102040
shlq $0x5, %rsi
addq $0x20, %rsi
callq 0x3837d
movq %rax, 0xcf1f0(%rip)     # 0x102038
movslq 0xcf1f1(%rip), %rcx     # 0x102040
leal 0x1(%rcx), %edx
shlq $0x5, %rcx
movq %r15, 0x18(%rax,%rcx)
movl (%rsp), %esi
movl %esi, 0xc(%rax,%rcx)
movq %r12, (%rax,%rcx)
movl %ebp, 0x8(%rax,%rcx)
movl 0x4(%rsp), %esi
movl %esi, 0x10(%rax,%rcx)
movl %edx, 0xcf1c8(%rip)     # 0x102040
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/server.c
// Function: closeListeningSockets
void closeListeningSockets(int unlink_unix_socket) {
    int j;

    for (j = 0; j < server.ipfd_count; j++) close(server.ipfd[j]);
    if (server.sofd != -1) close(server.sofd);
    if (server.cluster_enabled)
        for (j = 0; j < server.cfd_count; j++) close(server.cfd[j]);
    if (unlink_unix_socket && server.unixsocket) {
        serverLog(LL_NOTICE,"Removing the unix socket file.");
        unlink(server.unixsocket); /* don't care if this fails */
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %ebx
cmpl $0x0, 0xcddec(%rip)     # 0x101a24
leaq 0xcdc69(%rip), %r14     # 0x1018a8
jle 0x33c60
xorl %r15d, %r15d
movl 0x13c(%r14,%r15,4), %edi
callq 0x26180
incq %r15
movslq 0xcddc9(%rip), %rax     # 0x101a24
cmpq %rax, %r15
jl 0x33c44
movl 0xcddc2(%rip), %edi     # 0x101a28
cmpl $-0x1, %edi
je 0x33c70
callq 0x26180
cmpl $0x0, 0xce5cd(%rip)     # 0x102244
je 0x33ca1
cmpl $0x0, 0xcddec(%rip)     # 0x101a6c
jle 0x33ca1
xorl %r15d, %r15d
movl 0x184(%r14,%r15,4), %edi
callq 0x26180
incq %r15
movslq 0xcddd0(%rip), %rax     # 0x101a6c
cmpq %rax, %r15
jl 0x33c85
testl %ebx, %ebx
je 0x33cd3
cmpq $0x0, 0xcdd2b(%rip)     # 0x1019d8
je 0x33cd3
leaq 0x89a70(%rip), %rsi     # 0xbd726
movl $0x2, %edi
xorl %eax, %eax
callq 0x2fdad
movq 0xcdd0f(%rip), %rdi     # 0x1019d8
popq %rbx
popq %r14
popq %r15
jmp 0x263b0
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/server.c
// Function: time_independent_strcmp
int time_independent_strcmp(char *a, char *b) {
    char bufa[CONFIG_AUTHPASS_MAX_LEN], bufb[CONFIG_AUTHPASS_MAX_LEN];
    /* The above two strlen perform len(a) + len(b) operations where either
     * a or b are fixed (our password) length, and the difference is only
     * relative to the length of the user provided string, so no information
     * leak is possible in the following two lines of code. */
    unsigned int alen = strlen(a);
    unsigned int blen = strlen(b);
    unsigned int j;
    int diff = 0;

    /* We can't compare strings longer than our static buffers.
     * Note that this will never pass the first test in practical circumstances
     * so there is no info leak. */
    if (alen > sizeof(bufa) || blen > sizeof(bufb)) return 1;

    memset(bufa,0,sizeof(bufa));        /* Constant time. */
    memset(bufb,0,sizeof(bufb));        /* Constant time. */
    /* Again the time of the following two copies is proportional to
     * len(a) + len(b) so no info is leaked. */
    memcpy(bufa,a,alen);
    memcpy(bufb,b,blen);

    /* Always compare all the chars in the two buffers without
     * conditional expressions. */
    for (j = 0; j < sizeof(bufa); j++) {
        diff |= (bufa[j] ^ bufb[j]);
    }
    /* Length must be equal as well. */
    diff |= alen ^ blen;
    return diff; /* If zero strings are the same. */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rsi, %r15
movq %rdi, %r12
callq 0x26500
movq %rax, %rbx
movq %r15, %rdi
callq 0x26500
movq %rax, %r14
movl %ebx, %r13d
movl $0x201, %eax            # imm = 0x201
cmpq %rax, %r13
setae %cl
movl %r14d, %ebp
cmpq %rax, %rbp
setae %al
orb %cl, %al
movl $0x1, %eax
jne 0x33f52
movq %rbx, 0x8(%rsp)
leaq 0x210(%rsp), %rdi
xorl %ebx, %ebx
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x26110
leaq 0x10(%rsp), %rdi
movl $0x200, %edx            # imm = 0x200
xorl %esi, %esi
callq 0x26110
leaq 0x210(%rsp), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x26c50
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
movq %rbp, %rdx
callq 0x26c50
pxor %xmm0, %xmm0
movl 0x10(%rsp,%rbx), %eax
xorl 0x210(%rsp,%rbx), %eax
movd %eax, %xmm1
punpcklbw %xmm1, %xmm1    # xmm1 = xmm1[0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7]
punpcklwd %xmm1, %xmm1    # xmm1 = xmm1[0,0,1,1,2,2,3,3]
psrad $0x18, %xmm1
por %xmm1, %xmm0
addq $0x4, %rbx
cmpq $0x200, %rbx            # imm = 0x200
jne 0x33f04
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
por %xmm0, %xmm1
pshufd $0x55, %xmm1, %xmm0     # xmm0 = xmm1[1,1,1,1]
por %xmm1, %xmm0
movd %xmm0, %eax
xorl 0x8(%rsp), %r14d
orl %eax, %r14d
movl %r14d, %eax
addq $0x418, %rsp            # imm = 0x418
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/server.c
// Function: bytesToHuman
void bytesToHuman(char *s, unsigned long long n) {
    double d;

    if (n < 1024) {
        /* Bytes */
        sprintf(s,"%lluB",n);
        return;
    } else if (n < (1024*1024)) {
        d = (double)n/(1024);
        sprintf(s,"%.2fK",d);
    } else if (n < (1024LL*1024*1024)) {
        d = (double)n/(1024*1024);
        sprintf(s,"%.2fM",d);
    } else if (n < (1024LL*1024*1024*1024)) {
        d = (double)n/(1024LL*1024*1024);
        sprintf(s,"%.2fG",d);
    } else if (n < (1024LL*1024*1024*1024*1024)) {
        d = (double)n/(1024LL*1024*1024*1024);
        sprintf(s,"%.2fT",d);
    } else if (n < (1024LL*1024*1024*1024*1024*1024)) {
        d = (double)n/(1024LL*1024*1024*1024*1024);
        sprintf(s,"%.2fP",d);
    } else {
        /* Let's hope we never need this */
        sprintf(s,"%lluB",n);
    }
}

// Assembly:
movq %rsi, %rdx
cmpq $0x3ff, %rsi            # imm = 0x3FF
ja 0x34215
leaq 0x897a1(%rip), %rsi     # 0xbd9af
xorl %eax, %eax
jmp 0x26580
cmpq $0xfffff, %rdx          # imm = 0xFFFFF
ja 0x34234
cvtsi2sd %rdx, %xmm0
mulsd 0x88325(%rip), %xmm0    # 0xbc550
leaq 0x89783(%rip), %rsi     # 0xbd9b5
jmp 0x342b2
cmpq $0x3fffffff, %rdx       # imm = 0x3FFFFFFF
ja 0x34253
cvtsi2sd %rdx, %xmm0
mulsd 0x882fe(%rip), %xmm0    # 0xbc548
leaq 0x8976a(%rip), %rsi     # 0xbd9bb
jmp 0x342b2
movq %rdx, %rax
shrq $0x28, %rax
jne 0x34272
cvtsi2sd %rdx, %xmm0
mulsd 0x882d7(%rip), %xmm0    # 0xbc540
leaq 0x89751(%rip), %rsi     # 0xbd9c1
jmp 0x342b2
movq %rdx, %rax
shrq $0x32, %rax
jne 0x34291
cvtsi2sd %rdx, %xmm0
mulsd 0x882b0(%rip), %xmm0    # 0xbc538
leaq 0x89738(%rip), %rsi     # 0xbd9c7
jmp 0x342b2
movq %rdx, %rax
shrq $0x3c, %rax
jne 0x34207
cvtsi2sd %rdx, %xmm0
mulsd 0x88285(%rip), %xmm0    # 0xbc530
leaq 0x8971b(%rip), %rsi     # 0xbd9cd
movb $0x1, %al
jmp 0x26580
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/server.c
// Function: linuxOvercommitMemoryValue
int linuxOvercommitMemoryValue(void) {
    FILE *fp = fopen("/proc/sys/vm/overcommit_memory","r");
    char buf[64];

    if (!fp) return -1;
    if (fgets(buf,64,fp) == NULL) {
        fclose(fp);
        return -1;
    }
    fclose(fp);

    return atoi(buf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
leaq 0x891d0(%rip), %rdi     # 0xbe543
leaq 0x8a6e3(%rip), %rsi     # 0xbfa5d
callq 0x26ae0
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x353b6
movq %rax, %r14
movq %rsp, %rdi
movl $0x40, %esi
movq %rax, %rdx
callq 0x26440
movq %rax, %r15
movq %r14, %rdi
callq 0x26a10
testq %r15, %r15
je 0x353b6
movq %rsp, %rdi
callq 0x26760
movl %eax, %ebx
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/server.c
// Function: linuxMemoryWarnings
void linuxMemoryWarnings(void) {
    if (linuxOvercommitMemoryValue() == 0) {
        serverLog(LL_WARNING,"WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.");
    }
    if (THPIsEnabled()) {
        serverLog(LL_WARNING,"WARNING you have Transparent Huge Pages (THP) support enabled in your kernel. This will create latency and memory usage issues with Redis. To fix this issue run the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' as root, and add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be restarted after THP is disabled.");
    }
}

// Assembly:
pushq %rax
callq 0x35363
testl %eax, %eax
jne 0x353df
leaq 0x8918f(%rip), %rsi     # 0xbe562
movl $0x3, %edi
xorl %eax, %eax
callq 0x2fdad
callq 0x7eadb
testl %eax, %eax
je 0x353fc
leaq 0x89270(%rip), %rsi     # 0xbe65f
movl $0x3, %edi
xorl %eax, %eax
popq %rcx
jmp 0x2fdad
popq %rax
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/server.c
// Function: createPidFile
void createPidFile(void) {
    /* If pidfile requested, but no pidfile defined, use
     * default pidfile path */
    if (!server.pidfile) server.pidfile = zstrdup(CONFIG_DEFAULT_PID_FILE);

    /* Try to write the pid file in a best-effort way. */
    FILE *fp = fopen(server.pidfile,"w");
    if (fp) {
        fprintf(fp,"%d\n",(int)getpid());
        fclose(fp);
    }
}

// Assembly:
pushq %rbx
movq 0xcc502(%rip), %rdi     # 0x101908
testq %rdi, %rdi
jne 0x35421
leaq 0x893bd(%rip), %rdi     # 0xbe7cf
callq 0x3844d
movq %rax, %rdi
movq %rax, 0xcc4e7(%rip)     # 0x101908
leaq 0x8b99f(%rip), %rsi     # 0xc0dc7
callq 0x26ae0
testq %rax, %rax
je 0x35456
movq %rax, %rbx
callq 0x26420
leaq 0x9d12d(%rip), %rsi     # 0xd256e
movq %rbx, %rdi
movl %eax, %edx
xorl %eax, %eax
callq 0x26b90
movq %rbx, %rdi
popq %rbx
jmp 0x26a10
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/server.c
// Function: daemonize
void daemonize(void) {
    int fd;

    if (fork() != 0) exit(0); /* parent exits */
    setsid(); /* create a new session */

    /* Every output goes to /dev/null. If Redis is daemonized but
     * the 'logfile' is set to 'stdout' in the configuration file
     * it will not log at all. */
    if ((fd = open("/dev/null", O_RDWR, 0)) != -1) {
        dup2(fd, STDIN_FILENO);
        dup2(fd, STDOUT_FILENO);
        dup2(fd, STDERR_FILENO);
        if (fd > STDERR_FILENO) close(fd);
    }
}

// Assembly:
pushq %rbx
callq 0x26ab0
testl %eax, %eax
jne 0x354b3
callq 0x26130
leaq 0x89374(%rip), %rdi     # 0xbe7e2
movl $0x2, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x26690
cmpl $-0x1, %eax
je 0x354b1
movl %eax, %ebx
movl %eax, %edi
xorl %esi, %esi
callq 0x26090
movl %ebx, %edi
movl $0x1, %esi
callq 0x26090
movl %ebx, %edi
movl $0x2, %esi
callq 0x26090
cmpl $0x3, %ebx
jl 0x354b1
movl %ebx, %edi
popq %rbx
jmp 0x26180
popq %rbx
retq
xorl %edi, %edi
callq 0x262c0
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/server.c
// Function: version
void version(void) {
    printf("Redis server v=%s sha=%s:%d malloc=%s bits=%d build=%llx\n",
        REDIS_VERSION,
        redisGitSHA1(),
        atoi(redisGitDirty()) > 0,
        ZMALLOC_LIB,
        sizeof(long) == 4 ? 32 : 64,
        (unsigned long long) redisBuildId());
    exit(0);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
callq 0x3bd2c
movq %rax, %rbx
callq 0x3bd34
movq %rax, %rdi
callq 0x26760
xorl %ebp, %ebp
testl %eax, %eax
setg %bpl
callq 0x3bd3c
movq %rax, (%rsp)
leaq 0x89302(%rip), %rdi     # 0xbe7ec
leaq 0x89df8(%rip), %rsi     # 0xbf2e9
leaq 0x887fb(%rip), %r8      # 0xbdcf3
movq %rbx, %rdx
movl %ebp, %ecx
movl $0x40, %r9d
xorl %eax, %eax
callq 0x260a0
xorl %edi, %edi
callq 0x262c0
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq 0xc7aaf(%rip), %rbx     # 0xfcfc8
movq (%rbx), %rcx
leaq 0x89303(%rip), %rdi     # 0xbe826
movl $0x36, %esi
movl $0x1, %edx
callq 0x26b10
movq (%rbx), %rcx
leaq 0x89321(%rip), %rdi     # 0xbe85d
movl $0x31, %esi
movl $0x1, %edx
callq 0x26b10
movq (%rbx), %rcx
leaq 0x8933a(%rip), %rdi     # 0xbe88f
movl $0x26, %esi
movl $0x1, %edx
callq 0x26b10
movq (%rbx), %rcx
leaq 0x89348(%rip), %rdi     # 0xbe8b6
movl $0x23, %esi
movl $0x1, %edx
callq 0x26b10
movq (%rbx), %rcx
leaq 0x89353(%rip), %rdi     # 0xbe8da
movl $0x31, %esi
movl $0x1, %edx
callq 0x26b10
movq (%rbx), %rcx
leaq 0x8936c(%rip), %rdi     # 0xbe90c
movl $0xa, %esi
movl $0x1, %edx
callq 0x26b10
movq (%rbx), %rcx
leaq 0x8935e(%rip), %rdi     # 0xbe917
movl $0x39, %esi
movl $0x1, %edx
callq 0x26b10
movq (%rbx), %rcx
leaq 0x8937f(%rip), %rdi     # 0xbe951
movl $0x2b, %esi
movl $0x1, %edx
callq 0x26b10
movq (%rbx), %rcx
leaq 0x89392(%rip), %rdi     # 0xbe97d
movl $0x22, %esi
movl $0x1, %edx
callq 0x26b10
movq (%rbx), %rcx
leaq 0x8939c(%rip), %rdi     # 0xbe9a0
movl $0x3b, %esi
movl $0x1, %edx
callq 0x26b10
movq (%rbx), %rcx
leaq 0x893bf(%rip), %rdi     # 0xbe9dc
movl $0x3c, %esi
movl $0x1, %edx
callq 0x26b10
movq (%rbx), %rcx
leaq 0x893e3(%rip), %rdi     # 0xbea19
movl $0xf, %esi
movl $0x1, %edx
callq 0x26b10
movq (%rbx), %rcx
leaq 0x893da(%rip), %rdi     # 0xbea29
movl $0x34, %esi
movl $0x1, %edx
callq 0x26b10
movl $0x1, %edi
callq 0x262c0
// File: /workspace/github_c_makefile_star2_O3/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 0x382d1
movq %rax, %rbx
cmpl $0x0, 0xcc2bd(%rip)     # 0x101944
leaq 0x8834d(%rip), %rax     # 0xbd9db
leaq 0x97531(%rip), %rcx     # 0xccbc6
cmoveq %rax, %rcx
cmpl $0x0, 0xccba4(%rip)     # 0x102244
leaq 0x8724d(%rip), %r15     # 0xbc8f4
cmoveq %rcx, %r15
movl 0xcc99e(%rip), %r13d    # 0x102050
callq 0x3bd2c
movq %rax, %r14
callq 0x3bd34
movq %rax, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x26720
xorl %ebp, %ebp
testq %rax, %rax
setg %bpl
movl 0xcc26a(%rip), %r12d    # 0x101948
callq 0x26420
movslq %eax, %r10
testl %r13d, %r13d
je 0x35722
subq $0x8, %rsp
leaq 0x897d5(%rip), %rsi     # 0xbeecb
leaq 0x89bec(%rip), %rdx     # 0xbf2e9
leaq 0x8980a(%rip), %r9      # 0xbef0e
movl $0x2, %edi
movq %r14, %rcx
movl %ebp, %r8d
xorl %eax, %eax
pushq %r10
pushq %r12
pushq %r15
callq 0x2fdad
addq $0x20, %rsp
jmp 0x35765
leaq 0x897e5(%rip), %r11     # 0xbef0e
leaq 0x8932e(%rip), %rdx     # 0xbea5e
leaq 0x89bb2(%rip), %rcx     # 0xbf2e9
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 0x2fc13
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x38413
// File: /workspace/github_c_makefile_star2_O3/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 0x3578a
cmpl $0x0, 0xcc16c(%rip)     # 0x1018f4
jne 0x357cc
cmpl $0x0, 0xcc433(%rip)     # 0x101bc4
jne 0x357f3
cmpl $0xf, %edi
leaq 0x89cbf(%rip), %rax     # 0xbf45c
leaq 0x89ce0(%rip), %rcx     # 0xbf484
cmoveq %rax, %rcx
cmpl $0x2, %edi
leaq 0x89c83(%rip), %rsi     # 0xbf435
cmovneq %rcx, %rsi
movl $0x3, %edi
callq 0x2fe68
movl $0x1, 0xcc12a(%rip)     # 0x1018f4
popq %rax
retq
leaq 0x89ce2(%rip), %rsi     # 0xbf4b5
movl $0x3, %edi
callq 0x2fe68
callq 0x26420
movl %eax, %edi
callq 0x4997e
movl $0x1, %edi
callq 0x262c0
xorl %edi, %edi
callq 0x262c0
// File: /workspace/github_c_makefile_star2_O3/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebp
movq (%rsi), %rdi
leaq 0x896fd(%rip), %rsi     # 0xbef11
callq 0x266b0
movl $0x1, %ebx
testq %rax, %rax
jne 0x35852
cmpl $0x2, %ebp
jl 0x35850
movl %ebp, %r12d
movl $0x1, %r13d
leaq 0x896e8(%rip), %r15     # 0xbef20
movq (%r14,%r13,8), %rdi
movq %r15, %rsi
callq 0x268f0
testl %eax, %eax
je 0x35852
incq %r13
cmpq %r13, %r12
jne 0x35838
xorl %ebx, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/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
subq $0x18, %rsp
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26300
imulq $-0xf4240, (%rbx), %r14 # imm = 0xFFF0BDC0
subq 0x8(%rbx), %r14
cmpl $0x1, 0xcc685(%rip)     # 0x101f10
jne 0x358bc
movq 0xcc684(%rip), %rdi     # 0x101f18
callq 0x5e15d
testl %eax, %eax
jne 0x358d8
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26300
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
leaq 0x89671(%rip), %rsi     # 0xbef2b
jmp 0x358fd
movq 0xcc72d(%rip), %rdi     # 0x101ff0
callq 0x4a3f2
testl %eax, %eax
je 0x358e0
callq 0x26880
movl (%rax), %edi
cmpl $0x2, %edi
jne 0x3592e
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26300
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
leaq 0x8965c(%rip), %rsi     # 0xbef59
imulq $0xf4240, %rcx, %rcx    # imm = 0xF4240
addq %rax, %rcx
addq %r14, %rcx
cvtsi2ss %rcx, %xmm0
divss 0x86c4d(%rip), %xmm0    # 0xbc564
cvtss2sd %xmm0, %xmm0
movl $0x2, %edi
movb $0x1, %al
addq $0x18, %rsp
popq %rbx
popq %r14
jmp 0x2fdad
callq 0x26680
leaq 0x89641(%rip), %rsi     # 0xbef7b
movl $0x3, %edi
movq %rax, %rdx
xorl %eax, %eax
callq 0x2fdad
movl $0x1, %edi
callq 0x262c0
// File: /workspace/github_c_makefile_star2_O3/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, 0xcbfb1(%rip)     # 0x101944
leaq 0x8b11b(%rip), %rax     # 0xc0ab5
leaq 0x89655(%rip), %rcx     # 0xbeff6
cmoveq %rax, %rcx
movq %rdi, %rsi
cmpl $0x0, 0xcc895(%rip)     # 0x102244
leaq 0x89635(%rip), %r8      # 0xbefeb
cmoveq %rcx, %r8
cmpl $0x0, 0xcc00f(%rip)     # 0x1019d0
je 0x359cc
movq 0xcbf86(%rip), %rdx     # 0x101950
jmp 0x359d3
leaq 0x87228(%rip), %rdx     # 0xbcbfb
movl 0xcbf6f(%rip), %ecx     # 0x101948
leaq 0x89622(%rip), %rdi     # 0xbf002
xorl %eax, %eax
jmp 0x7c9bb
// File: /workspace/github_c_makefile_star2_O3/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 0x8961e(%rip), %rdi     # 0xbf00d
callq 0x26850
testq %rax, %rax
je 0x35a29
leaq 0x89652(%rip), %rsi     # 0xbf052
movl $0x2, %edi
xorl %eax, %eax
callq 0x2fdad
movl $0x13, %edi
callq 0x267b0
leaq 0x895f0(%rip), %rdi     # 0xbf00d
callq 0x26a80
movl $0x1, %ebx
jmp 0x35a3e
leaq 0x895e9(%rip), %rsi     # 0xbf019
xorl %ebx, %ebx
movl $0x3, %edi
xorl %eax, %eax
callq 0x2fdad
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x359e7
cmpl $0x2, %edi
je 0x35a42
cmpl $0x1, %edi
jne 0x35c1d
pushq %rbx
leaq 0x8941b(%rip), %rdi     # 0xbf00d
callq 0x26850
movq %rax, %rbx
leaq 0x89486(%rip), %rdi     # 0xbf087
callq 0x26850
testq %rbx, %rbx
je 0x35c12
callq 0x359e7
jmp 0x35c1c
testq %rax, %rax
je 0x35c1c
callq 0x35a42
popq %rbx
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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
movl $0x2, %edi
callq 0x382d1
movw $0xff00, (%rax)         # imm = 0xFF00
popq %rcx
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3938e
cmpl $0xff, %r14d
jne 0x39392
jmp 0x39429
movl 0x1(%r13), %r14d
xorl %edx, %edx
cmpl $0xfe, %r14d
setae %dl
leal 0x1(,%rdx,4), %ebx
testq %r12, %r12
je 0x393e6
testq %rax, %rax
jne 0x393e6
cmpl %r15d, %r14d
jne 0x393e4
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 0x393e6
jmp 0x3943c
xorl %eax, %eax
addl %r14d, %ebx
leaq (%rbx,%r13), %rdx
movzbl (%r13,%rbx), %r8d
cmpl $0xfd, %r8d
jbe 0x39400
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 0x39372
testq %rbp, %rbp
je 0x3943f
subl 0x8(%rsp), %r13d
incl %r13d
movl %r13d, (%rbp)
jmp 0x3943f
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_O3/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 0x3945b
movl 0x1(%rdi), %eax
xorl %ecx, %ecx
cmpl $0xfe, %eax
setae %cl
leal (%rax,%rcx,4), %eax
incl %eax
leaq (%rdi,%rax), %rcx
movzbl (%rdi,%rax), %edx
cmpl $0xfd, %edx
jbe 0x3947d
movl 0x1(%rcx), %edx
xorl %esi, %esi
cmpl $0xfe, %edx
setae %sil
movzbl 0x1(%rcx,%rsi,4), %ecx
addl %edx, %eax
addl %ecx, %eax
leal (%rax,%rsi,4), %eax
addl $0x2, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x39349
testq %rax, %rax
je 0x39513
movq %rax, %r15
movq %rax, %rdi
callq 0x3944e
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), %r15d
subl %ebp, %r15d
movq %r14, %rdi
movq %r15, %rsi
callq 0x3837d
movq %rax, %r14
decl %r15d
movb $-0x1, (%rax,%r15)
movb (%rax), %al
cmpb $-0x3, %al
ja 0x3950c
decb %al
movb %al, (%r14)
movl $0x1, %eax
jmp 0x39515
xorl %eax, %eax
testq %rbx, %rbx
je 0x3951c
movl %eax, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x3956b
testq %rsi, %rsi
je 0x39562
movq %rdi, (%rsi)
movzbl (%rdi), %eax
cmpl $0xfd, %eax
jbe 0x3954a
movl 0x1(%rdi), %eax
movl %eax, (%rdx)
xorl %edx, %edx
cmpl $0xfe, %eax
setae %dl
leaq (%rdi,%rdx,4), %rax
incq %rax
movq %rax, (%rsi)
movb (%rdi), %al
cmpb $-0x3, %al
ja 0x3956e
movzbl %al, %eax
jmp 0x39571
xorl %eax, %eax
retq
movl 0x1(%rdi), %eax
xorl %edx, %edx
cmpl $0xfe, %eax
setae %dl
leal (%rax,%rdx,4), %eax
incl %eax
addq %rax, %rdi
testq %rcx, %rcx
je 0x395b5
leaq 0x1(%rdi), %rax
movq %rax, (%rcx)
movzbl (%rdi), %edx
cmpl $0xfd, %edx
jbe 0x3959c
movl (%rax), %edx
movl %edx, (%r8)
xorl %esi, %esi
cmpl $0xfe, %edx
setae %sil
leaq (%rax,%rsi,4), %rax
incq %rax
movq %rax, (%rcx)
movzbl (%rdi), %eax
cmpl $0xfd, %eax
jbe 0x395c2
movl 0x1(%rdi), %eax
xorl %ecx, %ecx
cmpl $0xfe, %eax
setae %cl
movzbl 0x1(%rdi,%rcx,4), %edx
addl %eax, %edx
leal (%rdx,%rcx,4), %eax
addl $0x2, %eax
addq %rdi, %rax
retq
// File: /workspace/github_c_makefile_star2_O3/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 0x39349
testq %rax, %rax
je 0x3964a
movq %rax, %rcx
movzbl (%rax), %edx
cmpl $0xfd, %edx
jbe 0x39608
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 0x3962b
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)
movl $0x1, %r15d
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movzbl (%rdi), %eax
cmpl $0xfd, %eax
jbe 0x396df
leaq 0x1(%rdi), %rcx
xorl %eax, %eax
movzbl (%rcx), %edx
cmpl $0xfe, %edx
je 0x3968c
cmpl $0xff, %edx
jne 0x3968f
jmp 0x396d6
movl 0x1(%rcx), %edx
xorl %esi, %esi
cmpl $0xfe, %edx
setae %sil
leal (%rdx,%rsi,4), %esi
incl %esi
leaq (%rcx,%rsi), %rdx
movzbl (%rcx,%rsi), %ecx
cmpl $0xfd, %ecx
jbe 0x396b3
movl 0x1(%rdx), %ecx
xorl %esi, %esi
cmpl $0xfe, %ecx
setae %sil
movzbl 0x1(%rdx,%rsi,4), %r8d
addl %ecx, %r8d
leal (%r8,%rsi,4), %ecx
addl $0x2, %ecx
addq %rdx, %rcx
incl %eax
jmp 0x39677
cmpl $0xfd, %eax
ja 0x396df
movb %al, (%rdi)
retq
// File: /workspace/github_c_makefile_star2_O3/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movl 0x14(%rdi), %ebp
leal (,%rbx,8), %eax
movl %edx, %ecx
shrl $0x1d, %ecx
addl %ebp, %eax
movl %eax, 0x14(%rdi)
adcl %ecx, 0x18(%rdi)
shrl $0x3, %ebp
andl $0x3f, %ebp
leal (%rbx,%rbp), %eax
cmpl $0x40, %eax
jb 0x3a891
leaq 0x1c(%r15), %r13
leaq (%r15,%rbp), %rdi
addq $0x1c, %rdi
movl $0x40, %r12d
subl %ebp, %r12d
movq %r14, %rsi
movq %r12, %rdx
callq 0x26c50
movq %r15, %rdi
movq %r13, %rsi
callq 0x39700
xorl $0x7f, %ebp
cmpl %ebx, %ebp
jae 0x3a898
leal -0x3f(%rbp), %esi
addq %r14, %rsi
movq %r15, %rdi
callq 0x39700
addl $0x40, %ebp
cmpl %ebx, %ebp
jb 0x3a872
addl $-0x3f, %ebp
xorl %eax, %eax
movl %ebp, %r12d
jmp 0x3a89a
movl %ebp, %eax
xorl %r12d, %r12d
jmp 0x3a89a
xorl %eax, %eax
leaq (%r15,%rax), %rdi
addq $0x1c, %rdi
movl %r12d, %eax
addq %rax, %r14
subl %r12d, %ebx
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x26c50
// File: /workspace/github_c_makefile_star2_O3/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 %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %eax, %eax
xorl %edx, %edx
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, 0x10(%rsp,%rdx)
incq %rdx
addl $0x8, %eax
cmpq $0x8, %rdx
jne 0x3a8d8
leaq 0xf(%rsp), %rsi
movb $-0x80, (%rsi)
movq %rbx, %rdi
movl $0x1, %edx
callq 0x3a808
movl $0x1f8, %ebp            # imm = 0x1F8
movl 0x14(%rbx), %eax
andl %ebp, %eax
cmpl $0x1c0, %eax            # imm = 0x1C0
je 0x3a94b
leaq 0xf(%rsp), %r15
movb $0x0, 0xf(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movl $0x1, %edx
callq 0x3a808
movl 0x14(%rbx), %eax
andl %ebp, %eax
cmpl $0x1c0, %eax            # imm = 0x1C0
jne 0x3a92a
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movl $0x8, %edx
callq 0x3a808
xorl %eax, %eax
xorl %edx, %edx
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
cmpq $0x14, %rdx
jne 0x3a961
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 $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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 0x3aa10
testq %rdi, %rdi
je 0x3aa32
movb %sil, 0xb(%rsp)
jmp 0x3aa1e
cmpl $0x3f, %edx
ja 0x3aa3f
testq %rdi, %rdi
je 0x3aa32
movb %dl, 0xb(%rsp)
movb $0x1, %al
movzbl %al, %ebx
leaq 0xb(%rsp), %rsi
movq %rbx, %rdx
callq 0x26c50
jmp 0x3aa37
movl $0x1, %ebx
movl %ebx, %eax
addq $0x10, %rsp
popq %rbx
retq
cmpl $0x3fff, %edx           # imm = 0x3FFF
ja 0x3aa5f
testq %rdi, %rdi
je 0x3aa87
movl %edx, %eax
shrl $0x8, %eax
orb $0x40, %al
movb %al, 0xb(%rsp)
movb %dl, 0xc(%rsp)
movb $0x2, %al
jmp 0x3aa20
testq %rdi, %rdi
je 0x3aa8e
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 0x3aa20
movl $0x2, %ebx
jmp 0x3aa37
movl $0x5, %ebx
jmp 0x3aa37
// File: /workspace/github_c_makefile_star2_O3/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 0x3aaab
cmpl $0xfd, %esi
ja 0x3aabe
movb %sil, (%rdi)
movl $0x1, %eax
retq
xorl %eax, %eax
cmpl $0xfe, %esi
setae %al
leal 0x1(,%rax,4), %eax
retq
movb $-0x2, (%rdi)
movl %esi, 0x1(%rdi)
movl $0x5, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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:
xorl %eax, %eax
cmpb $-0x2, (%rdi)
setae %al
leal 0x1(,%rax,4), %eax
movzbl (%rdi,%rax), %ecx
movl %ecx, %edx
andl $-0x40, %edx
cmpl $0xc0, %ecx
cmovael %ecx, %edx
cmpl $0xbf, %edx
ja 0x3ab39
cmpb $-0x80, %dl
je 0x3ab93
movzbl %dl, %edx
cmpl $0x40, %edx
je 0x3ab7f
testl %edx, %edx
jne 0x3abbc
andl $0x3f, %ecx
movl $0x1, %edx
jmp 0x3abb7
movzbl %dl, %ecx
movl $0x1, %edx
cmpl $0xdf, %ecx
jle 0x3ab68
cmpl $0xe0, %ecx
je 0x3aba0
cmpl $0xf0, %ecx
je 0x3aba7
cmpl $0xfe, %ecx
jne 0x3abb5
movl $0x1, %ecx
jmp 0x3abb7
cmpl $0xc0, %ecx
je 0x3abae
cmpl $0xd0, %ecx
jne 0x3abb5
movl $0x4, %ecx
jmp 0x3abb7
andl $0x3f, %ecx
shll $0x8, %ecx
movzbl 0x1(%rdi,%rax), %edx
orl %edx, %ecx
movl $0x2, %edx
jmp 0x3abb7
movl 0x1(%rdi,%rax), %ecx
bswapl %ecx
movl $0x5, %edx
jmp 0x3abb7
movl $0x8, %ecx
jmp 0x3abb7
movl $0x3, %ecx
jmp 0x3abb7
movl $0x2, %ecx
jmp 0x3abb7
xorl %ecx, %ecx
addl %edx, %eax
addl %ecx, %eax
retq
pushq %rax
leaq 0x88c0f(%rip), %rdi     # 0xc37d3
leaq 0x84ff5(%rip), %rsi     # 0xbfbc0
movl $0x142, %edx            # imm = 0x142
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/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 0x3ac59
movq %rcx, %r14
movq %rdx, %rbx
movl %esi, %esi
leaq 0x8(%rsp), %rdx
callq 0x40065
testl %eax, %eax
je 0x3ac59
movq 0x8(%rsp), %rax
cmpq $0xc, %rax
ja 0x3ac17
leal -0xf(%rax), %ecx
jmp 0x3ac4e
movsbq %al, %rdx
movb $-0x2, %cl
cmpq %rax, %rdx
je 0x3ac4e
movswq %ax, %rdx
movb $-0x40, %cl
cmpq %rax, %rdx
je 0x3ac4e
leaq 0x800000(%rax), %rdx
movb $-0x10, %cl
cmpq $0x1000000, %rdx        # imm = 0x1000000
jb 0x3ac4e
movslq %eax, %rcx
cmpq %rax, %rcx
setne %cl
shlb $0x4, %cl
addb $-0x30, %cl
movb %cl, (%r14)
movq %rax, (%rbx)
movl $0x1, %ebp
movl %ebp, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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 $0xdf, %edx
jle 0x3ac88
cmpl $0xe0, %edx
je 0x3ac9b
cmpl $0xf0, %edx
je 0x3ac9f
cmpl $0xfe, %edx
jne 0x3acae
movb %sil, (%rdi)
retq
cmpl $0xc0, %edx
je 0x3acaa
cmpl $0xd0, %edx
jne 0x3acae
movl %esi, (%rdi)
retq
movq %rsi, (%rdi)
retq
movw %si, (%rdi)
shrl $0x10, %esi
movb %sil, 0x2(%rdi)
retq
movw %si, (%rdi)
retq
addb $0xf, %dl
cmpb $0xe, %dl
jae 0x3acb7
retq
pushq %rax
leaq 0x88b14(%rip), %rdi     # 0xc37d3
leaq 0x84efa(%rip), %rsi     # 0xbfbc0
movl $0x17c, %edx            # imm = 0x17C
callq 0x61908
movl $0x1, %edi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O3/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 $0xdf, %esi
jle 0x3acff
cmpl $0xe0, %esi
je 0x3ad13
cmpl $0xf0, %esi
je 0x3ad17
cmpl $0xfe, %esi
jne 0x3ad2c
movsbq (%rdi), %rax
retq
cmpl $0xc0, %esi
je 0x3ad27
cmpl $0xd0, %esi
jne 0x3ad2c
movslq (%rdi), %rax
retq
movq (%rdi), %rax
retq
movsbq 0x2(%rdi), %rcx
shlq $0x10, %rcx
movzwl (%rdi), %eax
orq %rcx, %rax
retq
movswq (%rdi), %rax
retq
leal 0xf(%rsi), %eax
cmpb $0xd, %al
ja 0x3ad3f
andb $0xf, %sil
movzbl %sil, %eax
decq %rax
retq
pushq %rax
leaq 0x88a8c(%rip), %rdi     # 0xc37d3
leaq 0x84e72(%rip), %rsi     # 0xbfbc0
movl $0x19b, %edx            # imm = 0x19B
callq 0x61908
movl $0x1, %edi
callq 0x263c0