LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: showLatencyDistLegend
void showLatencyDistLegend(void) {
    int j;

    printf("---------------------------------------------\n");
    printf(". - * #          .01 .125 .25 .5 milliseconds\n");
    printf("1,2,3,...,9      from 1 to 9     milliseconds\n");
    printf("A,B,C,D,E        10,20,30,40,50  milliseconds\n");
    printf("F,G,H,I,J        .1,.2,.3,.4,.5       seconds\n");
    printf("K,L,M,N,O,P,Q,?  1,2,4,8,16,30,60,>60 seconds\n");
    printf("From 0 to 100%%: ");
    for (j = 0; j < spectrum_palette_size; j++) {
        printf("\033[48;5;%dm ", spectrum_palette[j]);
    }
    printf("\033[0m\n");
    printf("---------------------------------------------\n");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0x2eb93(%rip), %rdi     # 0x40b4c
callq 0x100e0
leaq 0x2ea9c(%rip), %rdi     # 0x40a61
callq 0x100e0
leaq 0x2eabe(%rip), %rdi     # 0x40a8f
callq 0x100e0
leaq 0x2eae0(%rip), %rdi     # 0x40abd
callq 0x100e0
leaq 0x2eb02(%rip), %rdi     # 0x40aeb
callq 0x100e0
leaq 0x2eb24(%rip), %rdi     # 0x40b19
callq 0x100e0
leaq 0x2cd84(%rip), %rdi     # 0x3ed85
xorl %eax, %eax
callq 0x101f0
leaq 0x2cd88(%rip), %rbx     # 0x3ed97
xorl %r14d, %r14d
movslq 0x443e3(%rip), %rax     # 0x563fc
cmpq %rax, %r14
jge 0x12038
movq 0x443db(%rip), %rax     # 0x56400
movl (%rax,%r14,4), %esi
movq %rbx, %rdi
xorl %eax, %eax
callq 0x101f0
incq %r14
jmp 0x12012
leaq 0x2eb08(%rip), %rdi     # 0x40b47
callq 0x100e0
leaq 0x2eb01(%rip), %rdi     # 0x40b4c
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x100e0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: sendSync
unsigned long long sendSync(int fd) {
    /* To start we need to send the SYNC command and return the payload.
     * The hiredis client lib does not understand this part of the protocol
     * and we don't want to mess with its buffers, so everything is performed
     * using direct low-level I/O. */
    char buf[4096], *p;
    ssize_t nread;

    /* Send the SYNC command. */
    if (write(fd,"SYNC\r\n",6) != 6) {
        fprintf(stderr,"Error writing to master\n");
        exit(1);
    }

    /* Read $<payload>\r\n, making sure to read just up to "\n" */
    p = buf;
    while(1) {
        nread = read(fd,p,1);
        if (nread <= 0) {
            fprintf(stderr,"Error reading bulk length while SYNCing\n");
            exit(1);
        }
        if (*p == '\n' && p != buf) break;
        if (*p != '\n') p++;
    }
    *p = '\0';
    if (buf[0] == '-') {
        printf("SYNC with master failed: %s\n", buf);
        exit(1);
    }
    return strtoull(buf+1,NULL,10);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
movl %edi, %ebx
leaq 0x2cd35(%rip), %rsi     # 0x3eda3
pushq $0x6
popq %rdx
callq 0x10170
cmpq $0x6, %rax
jne 0x12106
movq %rsp, %r12
pushq $0x1
popq %r15
movq %r12, %r14
movl %ebx, %edi
movq %r14, %rsi
movq %r15, %rdx
callq 0x102f0
testq %rax, %rax
jle 0x120e2
movb (%r14), %al
cmpb $0xa, %al
sete %cl
cmpq %r12, %r14
setne %dl
testb %cl, %dl
jne 0x120ba
xorl %ecx, %ecx
cmpb $0xa, %al
setne %cl
addq %rcx, %r14
jmp 0x1208a
movb $0x0, (%r14)
cmpb $0x2d, (%rsp)
je 0x1211b
leaq 0x1(%rsp), %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x10360
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x41f0f(%rip), %rax     # 0x53ff8
movq (%rax), %rcx
leaq 0x2ccd0(%rip), %rdi     # 0x3edc3
pushq $0x28
popq %rsi
pushq $0x1
popq %rdx
callq 0x10650
pushq $0x1
popq %rdi
callq 0x10630
movq 0x41eeb(%rip), %rax     # 0x53ff8
movq (%rax), %rcx
leaq 0x2cc93(%rip), %rdi     # 0x3edaa
pushq $0x18
jmp 0x120f5
leaq 0x2ccca(%rip), %rdi     # 0x3edec
movq %rsp, %rsi
xorl %eax, %eax
callq 0x101f0
jmp 0x120fe
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: bytesToHuman
void bytesToHuman(char *s, long long n) {
    double d;

    if (n < 0) {
        *s = '-';
        s++;
        n = -n;
    }
    if (n < 1024) {
        /* Bytes */
        sprintf(s,"%lldB",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);
    }
}

// Assembly:
movq %rsi, %rdx
testq %rsi, %rsi
jns 0x1213f
movb $0x2d, (%rdi)
incq %rdi
negq %rdx
cmpq $0x3ff, %rdx            # imm = 0x3FF
ja 0x12156
leaq 0x2ccba(%rip), %rsi     # 0x3ee09
xorl %eax, %eax
jmp 0x10620
cmpq $0xfffff, %rdx          # imm = 0xFFFFF
ja 0x12175
cvtsi2sd %rdx, %xmm0
mulsd 0x29044(%rip), %xmm0    # 0x3b1b0
leaq 0x2cc9c(%rip), %rsi     # 0x3ee0f
jmp 0x121b1
cmpq $0x3fffffff, %rdx       # imm = 0x3FFFFFFF
ja 0x12194
cvtsi2sd %rdx, %xmm0
mulsd 0x2901d(%rip), %xmm0    # 0x3b1a8
leaq 0x2cc83(%rip), %rsi     # 0x3ee15
jmp 0x121b1
movq %rdx, %rax
shrq $0x28, %rax
jne 0x121b8
cvtsi2sd %rdx, %xmm0
mulsd 0x28ff6(%rip), %xmm0    # 0x3b1a0
leaq 0x2cc6a(%rip), %rsi     # 0x3ee1b
movb $0x1, %al
jmp 0x10620
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: powerLawRand
long long powerLawRand(long long min, long long max, double alpha) {
    double pl, r;

    max += 1;
    r = ((double)rand()) / RAND_MAX;
    pl = pow(
        ((pow(max,alpha+1) - pow(min,alpha+1))*r + pow(min,alpha+1)),
        (1.0/(alpha+1)));
    return (max-1-(long long)pl)+min;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movsd %xmm0, (%rsp)
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1(%rsi), %r15
callq 0x106e0
cvtsi2sd %eax, %xmm0
divsd 0x28fd6(%rip), %xmm0    # 0x3b1b8
movsd %xmm0, 0x18(%rsp)
cvtsi2sd %r15, %xmm0
movsd (%rsp), %xmm1
addsd 0x28fc6(%rip), %xmm1    # 0x3b1c0
movsd %xmm1, (%rsp)
callq 0x10190
movsd %xmm0, 0x8(%rsp)
cvtsi2sd %r14, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm1
callq 0x10190
movsd 0x8(%rsp), %xmm1
subsd %xmm0, %xmm1
mulsd 0x18(%rsp), %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
movsd (%rsp), %xmm1
callq 0x10190
addsd 0x8(%rsp), %xmm0
movsd 0x28f6d(%rip), %xmm1    # 0x3b1c0
divsd (%rsp), %xmm1
callq 0x10190
cvttsd2si %xmm0, %rax
addq %r14, %rbx
subq %rax, %rbx
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: compute_something_fast
unsigned long compute_something_fast(void) {
    unsigned char s[256], i, j, t;
    int count = 1000, k;
    unsigned long output = 0;

    for (k = 0; k < 256; k++) s[k] = k;

    i = 0;
    j = 0;
    while(count--) {
        i++;
        j = j + s[i];
        t = s[i];
        s[i] = s[j];
        s[j] = t;
        output += s[(s[i]+s[j])&255];
    }
    return output;
}

// Assembly:
subq $0x88, %rsp
xorl %eax, %eax
cmpq $0x100, %rax            # imm = 0x100
je 0x122ce
movb %al, -0x80(%rsp,%rax)
incq %rax
jmp 0x122bd
xorl %ecx, %ecx
movl $0xfffffc18, %edx       # imm = 0xFFFFFC18
movl $0xff, %esi
xorl %eax, %eax
testl %edx, %edx
je 0x1231e
leal 0x3e9(%rdx), %edi
andl %esi, %edi
movzbl -0x80(%rsp,%rdi), %r8d
addl %r8d, %ecx
movl %ecx, %r9d
andl %esi, %r9d
movb -0x80(%rsp,%r9), %r10b
movb %r10b, -0x80(%rsp,%rdi)
movb %r8b, -0x80(%rsp,%r9)
movb -0x80(%rsp,%rdi), %dil
addb %r8b, %dil
movzbl %dil, %edi
movzbl -0x80(%rsp,%rdi), %edi
addq %rdi, %rax
incl %edx
jmp 0x122dc
addq $0x88, %rsp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: cliConnect
static int cliConnect(int force) {
    if (context == NULL || force) {
        if (context != NULL) {
            redisFree(context);
        }

        if (config.hostsocket == NULL) {
            context = redisConnect(config.hostip,config.hostport);
        } else {
            context = redisConnectUnix(config.hostsocket);
        }

        if (context->err) {
            fprintf(stderr,"Could not connect to Redis at ");
            if (config.hostsocket == NULL)
                fprintf(stderr,"%s:%d: %s\n",config.hostip,config.hostport,context->errstr);
            else
                fprintf(stderr,"%s: %s\n",config.hostsocket,context->errstr);
            redisFree(context);
            context = NULL;
            return REDIS_ERR;
        }

        /* Set aggressive KEEP_ALIVE socket option in the Redis context socket
         * in order to prevent timeouts caused by the execution of long
         * commands. At the same time this improves the detection of real
         * errors. */
        anetKeepAlive(NULL, context->fd, REDIS_CLI_KEEPALIVE_INTERVAL);

        /* Do AUTH and select the right DB. */
        if (cliAuth() != REDIS_OK)
            return REDIS_ERR;
        if (cliSelect() != REDIS_OK)
            return REDIS_ERR;
    }
    return REDIS_OK;
}

// Assembly:
pushq %rbx
movl %edi, %eax
movq 0x41ef0(%rip), %rdi     # 0x56558
testq %rdi, %rdi
setne %cl
testl %eax, %eax
sete %al
testb %cl, %al
jne 0x14702
testq %rdi, %rdi
je 0x14685
callq 0x18214
movq 0x41d8c(%rip), %rdi     # 0x56418
testq %rdi, %rdi
je 0x14698
callq 0x1838b
jmp 0x146aa
movq 0x41d69(%rip), %rdi     # 0x56408
movl 0x41d6b(%rip), %esi     # 0x56410
callq 0x18269
movq %rax, 0x41ea7(%rip)     # 0x56558
cmpl $0x0, (%rax)
jne 0x14706
movl 0x84(%rax), %esi
pushq $0xf
popq %rdx
xorl %edi, %edi
callq 0x10977
movq 0x41dd3(%rip), %rdx     # 0x564a0
testq %rdx, %rdx
je 0x146f4
movq 0x41e7f(%rip), %rdi     # 0x56558
leaq 0x2b5d2(%rip), %rsi     # 0x3fcb2
xorl %eax, %eax
callq 0x18878
testq %rax, %rax
je 0x146fd
movq %rax, %rdi
callq 0x170f8
callq 0x1502d
testl %eax, %eax
je 0x14702
pushq $-0x1
popq %rax
jmp 0x14704
xorl %eax, %eax
popq %rbx
retq
movq 0x3f8eb(%rip), %rbx     # 0x53ff8
movq (%rbx), %rcx
leaq 0x2b569(%rip), %rdi     # 0x3fc80
pushq $0x1e
popq %rsi
pushq $0x1
popq %rdx
callq 0x10650
movq 0x41cef(%rip), %rdx     # 0x56418
movq (%rbx), %rdi
testq %rdx, %rdx
jne 0x14759
movq 0x41cd0(%rip), %rdx     # 0x56408
movl 0x41cd2(%rip), %ecx     # 0x56410
movq 0x41e13(%rip), %r8      # 0x56558
addq $0x4, %r8
leaq 0x2b54f(%rip), %rsi     # 0x3fc9f
xorl %eax, %eax
callq 0x103b0
jmp 0x14772
movq 0x41df8(%rip), %rcx     # 0x56558
addq $0x4, %rcx
leaq 0x2b53f(%rip), %rsi     # 0x3fcaa
xorl %eax, %eax
callq 0x103b0
movq 0x41ddf(%rip), %rdi     # 0x56558
callq 0x18214
andq $0x0, 0x41dd2(%rip)     # 0x56558
jmp 0x146fd
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: slaveMode
static void slaveMode(void) {
    int fd = context->fd;
    unsigned long long payload = sendSync(fd);
    char buf[1024];
    int original_output = config.output;

    fprintf(stderr,"SYNC with master, discarding %llu "
                   "bytes of bulk transfer...\n", payload);

    /* Discard the payload. */
    while(payload) {
        ssize_t nread;

        nread = read(fd,buf,(payload > sizeof(buf)) ? sizeof(buf) : payload);
        if (nread <= 0) {
            fprintf(stderr,"Error reading RDB payload while SYNCing\n");
            exit(1);
        }
        payload -= nread;
    }
    fprintf(stderr,"SYNC done. Logging commands from master.\n");

    /* Now we can use hiredis to read the incoming protocol. */
    config.output = OUTPUT_CSV;
    while (cliReadReply(0) == REDIS_OK);
    config.output = original_output;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq 0x41db5(%rip), %rax     # 0x56558
movl 0x84(%rax), %ebx
movl %ebx, %edi
callq 0x12057
movq %rax, %r14
movl 0x41cef(%rip), %ebp     # 0x564a8
movq 0x3f838(%rip), %r12     # 0x53ff8
movq (%r12), %rdi
leaq 0x2b5d5(%rip), %rsi     # 0x3fda0
movq %rax, %rdx
xorl %eax, %eax
callq 0x103b0
movl $0x400, %r13d           # imm = 0x400
movq %rsp, %r15
testq %r14, %r14
je 0x1481f
cmpq %r13, %r14
movl $0x400, %edx            # imm = 0x400
cmovbq %r14, %rdx
movl %ebx, %edi
movq %r15, %rsi
callq 0x102f0
subq %rax, %r14
testq %rax, %rax
jg 0x147de
movq (%r12), %rcx
leaq 0x2b5d1(%rip), %rdi     # 0x3fddd
pushq $0x28
popq %rsi
pushq $0x1
popq %rdx
callq 0x10650
pushq $0x1
popq %rdi
callq 0x10630
movq (%r12), %rcx
leaq 0x2b5dc(%rip), %rdi     # 0x3fe06
pushq $0x29
popq %rsi
pushq $0x1
popq %rdx
callq 0x10650
movl $0x2, 0x41c69(%rip)     # 0x564a8
xorl %edi, %edi
callq 0x1524e
testl %eax, %eax
je 0x1483f
movl %ebp, 0x41c58(%rip)     # 0x564a8
addq $0x408, %rsp            # imm = 0x408
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/redis-cli.c
// Function: cliVersion
static sds cliVersion(void) {
    sds version;
    version = sdscatprintf(sdsempty(), "%s", REDIS_VERSION);

    /* Add git commit and working tree status when available */
    if (strtoll(redisGitSHA1(),NULL,16)) {
        version = sdscatprintf(version, " (git:%s", redisGitSHA1());
        if (strtoll(redisGitDirty(),NULL,10))
            version = sdscatprintf(version, "-dirty");
        version = sdscat(version, ")");
    }
    return version;
}

// Assembly:
pushq %rbx
callq 0x18ec4
leaq 0x2608c(%rip), %rsi     # 0x3b032
leaq 0x2acbc(%rip), %rdx     # 0x3fc69
movq %rax, %rdi
xorl %eax, %eax
callq 0x197b0
movq %rax, %rbx
callq 0x16824
pushq $0x10
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x103a0
testq %rax, %rax
je 0x15028
callq 0x16824
leaq 0x2ac93(%rip), %rsi     # 0x3fc70
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x197b0
movq %rax, %rbx
callq 0x1682c
pushq $0xa
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x103a0
testq %rax, %rax
je 0x15018
leaq 0x2ac6e(%rip), %rsi     # 0x3fc79
movq %rbx, %rdi
xorl %eax, %eax
callq 0x197b0
movq %rax, %rbx
leaq 0x2ce74(%rip), %rsi     # 0x41e93
movq %rbx, %rdi
popq %rbx
jmp 0x1952f
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: cliSelect
static int cliSelect(void) {
    redisReply *reply;
    if (config.dbnum == 0) return REDIS_OK;

    reply = redisCommand(context,"SELECT %d",config.dbnum);
    if (reply != NULL) {
        int result = REDIS_OK;
        if (reply->type == REDIS_REPLY_ERROR) result = REDIS_ERR;
        freeReplyObject(reply);
        return result;
    }
    return REDIS_ERR;
}

// Assembly:
pushq %rbx
movl 0x413fc(%rip), %edx     # 0x56430
testl %edx, %edx
je 0x15066
movq 0x41519(%rip), %rdi     # 0x56558
leaq 0x2ac74(%rip), %rsi     # 0x3fcba
xorl %eax, %eax
callq 0x18878
testq %rax, %rax
je 0x1506a
xorl %ebx, %ebx
cmpl $0x6, (%rax)
sete %bl
negl %ebx
movq %rax, %rdi
callq 0x170f8
jmp 0x1506d
xorl %ebx, %ebx
jmp 0x1506d
pushq $-0x1
popq %rbx
movl %ebx, %eax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: reconnectingRedisCommand
static redisReply *reconnectingRedisCommand(redisContext *c, const char *fmt, ...) {
    redisReply *reply = NULL;
    int tries = 0;
    va_list ap;

    assert(!c->err);
    while(reply == NULL) {
        while (c->err & (REDIS_ERR_IO | REDIS_ERR_EOF)) {
            printf("\r\x1b[0K"); /* Cursor to left edge + clear line. */
            printf("Reconnecting... %d\r", ++tries);
            fflush(stdout);

            redisFree(c);
            c = redisConnect(config.hostip,config.hostport);
            usleep(1000000);
        }

        va_start(ap,fmt);
        reply = redisvCommand(c,fmt,ap);
        va_end(ap);

        if (c->err && !(c->err & (REDIS_ERR_IO | REDIS_ERR_EOF))) {
            fprintf(stderr, "Error: %s\n", c->errstr);
            exit(1);
        } else if (tries > 0) {
            printf("\r\x1b[0K"); /* Cursor to left edge + clear line. */
        }
    }

    context = c;
    return reply;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, 0x8(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x48(%rsp)
movq %r8, 0x50(%rsp)
movq %r9, 0x58(%rsp)
testb %al, %al
je 0x150eb
movaps %xmm0, 0x60(%rsp)
movaps %xmm1, 0x70(%rsp)
movaps %xmm2, 0x80(%rsp)
movaps %xmm3, 0x90(%rsp)
movaps %xmm4, 0xa0(%rsp)
movaps %xmm5, 0xb0(%rsp)
movaps %xmm6, 0xc0(%rsp)
movaps %xmm7, 0xd0(%rsp)
cmpl $0x0, (%rdi)
jne 0x1520c
movq %rdi, %rbx
leaq 0x2ac7d(%rip), %r12     # 0x3fd7b
leaq 0x2ac7c(%rip), %r13     # 0x3fd81
movq 0x3eeb4(%rip), %r14     # 0x53fc0
xorl %r15d, %r15d
xorl %ebp, %ebp
testq %r15, %r15
je 0x15162
jmp 0x151c9
movq %r12, %rdi
xorl %eax, %eax
callq 0x101f0
incl %ebp
movq %r13, %rdi
movl %ebp, %esi
xorl %eax, %eax
callq 0x101f0
movq (%r14), %rdi
callq 0x10470
movq %rbx, %rdi
callq 0x18214
movq 0x412be(%rip), %rdi     # 0x56408
movl 0x412c0(%rip), %esi     # 0x56410
callq 0x18269
movq %rax, %rbx
movl $0xf4240, %edi          # imm = 0xF4240
callq 0x10720
testb $0x3, (%rbx)
jne 0x1511b
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
leaq 0x120(%rsp), %rax
movq %rax, 0x18(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x1883b
movq %rax, %r15
movl (%rbx), %eax
testl %eax, %eax
sete %cl
testb $0x3, %al
setne %al
orb %cl, %al
je 0x151e5
testl %ebp, %ebp
jle 0x15111
movq %r12, %rdi
xorl %eax, %eax
callq 0x101f0
jmp 0x15111
movq %rbx, 0x41388(%rip)     # 0x56558
movq %r15, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x3ee0c(%rip), %rax     # 0x53ff8
movq (%rax), %rdi
addq $0x4, %rbx
leaq 0x2ab9b(%rip), %rsi     # 0x3fd95
movq %rbx, %rdx
xorl %eax, %eax
callq 0x103b0
pushq $0x1
popq %rdi
callq 0x10630
leaq 0x2ab0c(%rip), %rdi     # 0x3fd1f
leaq 0x2ab0d(%rip), %rsi     # 0x3fd27
leaq 0x2ab12(%rip), %rcx     # 0x3fd33
movl $0x3b0, %edx            # imm = 0x3B0
callq 0x10250
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: ustime
static long long ustime(void) {
    struct timeval tv;
    long long ust;

    gettimeofday(&tv, NULL);
    ust = ((long long)tv.tv_sec)*1000000;
    ust += tv.tv_usec;
    return ust;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x10240
imulq $0xf4240, (%rbx), %rax  # imm = 0xF4240
addq 0x8(%rbx), %rax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: cliRefreshPrompt
static void cliRefreshPrompt(void) {
    int len;

    if (config.eval_ldb) return;
    if (config.hostsocket != NULL)
        len = snprintf(config.prompt,sizeof(config.prompt),"redis %s",
                       config.hostsocket);
    else
        len = anetFormatAddr(config.prompt, sizeof(config.prompt),
                           config.hostip, config.hostport);
    /* Add [dbnum] if needed */
    if (config.dbnum != 0)
        len += snprintf(config.prompt+len,sizeof(config.prompt)-len,"[%d]",
            config.dbnum);
    snprintf(config.prompt+len,sizeof(config.prompt)-len,"> ");
}

// Assembly:
cmpl $0x0, 0x410a2(%rip)     # 0x56540
je 0x154a1
retq
pushq %rbx
movq 0x40f6f(%rip), %rcx     # 0x56418
testq %rcx, %rcx
je 0x154ca
leaq 0x41003(%rip), %rdi     # 0x564b8
leaq 0x2a9ab(%rip), %rdx     # 0x3fe67
movl $0x80, %esi
xorl %eax, %eax
callq 0x10200
jmp 0x154e8
movq 0x40f37(%rip), %rdx     # 0x56408
movl 0x40f39(%rip), %ecx     # 0x56410
leaq 0x40fda(%rip), %rdi     # 0x564b8
movl $0x80, %esi
callq 0x11568
movl %eax, %ebx
movl 0x40f40(%rip), %ecx     # 0x56430
testl %ecx, %ecx
je 0x15521
movslq %ebx, %rbx
leaq 0x40f0a(%rip), %rax     # 0x56408
leaq (%rbx,%rax), %rdi
addq $0xb0, %rdi
movl $0x80, %esi
subq %rbx, %rsi
leaq 0x2a958(%rip), %rdx     # 0x3fe70
xorl %eax, %eax
callq 0x10200
addl %eax, %ebx
movslq %ebx, %rax
leaq 0x40edd(%rip), %rcx     # 0x56408
leaq (%rax,%rcx), %rdi
addq $0xb0, %rdi
movl $0x80, %esi
subq %rax, %rsi
leaq 0x2b134(%rip), %rdx     # 0x40679
xorl %eax, %eax
popq %rbx
jmp 0x10200
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: cliFormatReplyCSV
static sds cliFormatReplyCSV(redisReply *r) {
    unsigned int i;

    sds out = sdsempty();
    switch (r->type) {
    case REDIS_REPLY_ERROR:
        out = sdscat(out,"ERROR,");
        out = sdscatrepr(out,r->str,strlen(r->str));
    break;
    case REDIS_REPLY_STATUS:
        out = sdscatrepr(out,r->str,r->len);
    break;
    case REDIS_REPLY_INTEGER:
        out = sdscatprintf(out,"%lld",r->integer);
    break;
    case REDIS_REPLY_STRING:
        out = sdscatrepr(out,r->str,r->len);
    break;
    case REDIS_REPLY_NIL:
        out = sdscat(out,"NIL");
    break;
    case REDIS_REPLY_ARRAY:
        for (i = 0; i < r->elements; i++) {
            sds tmp = cliFormatReplyCSV(r->element[i]);
            out = sdscatlen(out,tmp,sdslen(tmp));
            if (i != r->elements-1) out = sdscat(out,",");
            sdsfree(tmp);
        }
    break;
    default:
        fprintf(stderr,"Unknown reply type: %d\n", r->type);
        exit(1);
    }
    return out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x18ec4
movq %rax, %r14
movl (%rbx), %edx
leal -0x1(%rdx), %eax
cmpl $0x5, %eax
ja 0x159b8
leaq 0x259a8(%rip), %rcx     # 0x3b26c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x18(%rbx), %rsi
movslq 0x10(%rbx), %rdx
movq %r14, %rdi
jmp 0x159aa
leaq 0x2a605(%rip), %rsi     # 0x3fee9
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x1952f
xorl %r13d, %r13d
leaq 0x2a5e8(%rip), %r15     # 0x3fee7
movl %r13d, %r13d
cmpq %r13, 0x20(%rbx)
jbe 0x15976
movq 0x28(%rbx), %rax
movq (%rax,%r13,8), %rdi
callq 0x1589b
movq %rax, %r12
movq %rax, %rdi
callq 0x159d8
movq %r14, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x194d0
movq %rax, %r14
movq 0x20(%rbx), %rax
decq %rax
cmpq %r13, %rax
je 0x1594b
movq %r14, %rdi
movq %r15, %rsi
callq 0x1952f
movq %rax, %r14
movq %r12, %rdi
callq 0x18f40
incl %r13d
jmp 0x158ff
movq 0x8(%rbx), %rdx
leaq 0x2a51f(%rip), %rsi     # 0x3fe82
movq %r14, %rdi
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x197b0
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
leaq 0x2a558(%rip), %rsi     # 0x3fee2
movq %r14, %rdi
callq 0x1952f
movq %rax, %r14
movq 0x18(%rbx), %rbx
movq %rbx, %rdi
callq 0x101c0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x19f69
movq 0x3e639(%rip), %rax     # 0x53ff8
movq (%rax), %rdi
leaq 0x2a4be(%rip), %rsi     # 0x3fe87
xorl %eax, %eax
callq 0x103b0
pushq $0x1
popq %rdi
callq 0x10630
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/../deps/hiredis/sds.h
// Function: sdslen
static inline size_t sdslen(const sds s) {
    unsigned char flags = s[-1];
    switch(flags&SDS_TYPE_MASK) {
        case SDS_TYPE_5:
            return SDS_TYPE_5_LEN(flags);
        case SDS_TYPE_8:
            return SDS_HDR(8,s)->len;
        case SDS_TYPE_16:
            return SDS_HDR(16,s)->len;
        case SDS_TYPE_32:
            return SDS_HDR(32,s)->len;
        case SDS_TYPE_64:
            return SDS_HDR(64,s)->len;
    }
    return 0;
}

// Assembly:
movzbl -0x1(%rdi), %eax
movl %eax, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x15a0d
leaq 0x25897(%rip), %rdx     # 0x3b284
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
shrl $0x3, %eax
retq
movq -0x11(%rdi), %rax
retq
movzwl -0x5(%rdi), %eax
retq
movl -0x9(%rdi), %eax
retq
movzbl -0x3(%rdi), %eax
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: getLongInfoField
static long getLongInfoField(char *info, char *field) {
    char *value = getInfoField(info,field);
    long l;

    if (!value) return LONG_MIN;
    l = strtol(value,NULL,10);
    zfree(value);
    return l;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
callq 0x106c0
testq %rax, %rax
je 0x15a9d
movq %rax, %r14
movq %rbx, %rdi
callq 0x101c0
leaq (%r14,%rax), %rbx
incq %rbx
pushq $0xd
popq %rsi
movq %rbx, %rdi
callq 0x101e0
movq %rax, %r14
pushq $0x2c
popq %rsi
movq %rbx, %rdi
callq 0x101e0
cmpq %r14, %rax
movq %r14, %r15
cmovbq %rax, %r15
testq %rax, %rax
cmoveq %r14, %r15
subq %rbx, %r15
leaq 0x1(%r15), %rdi
callq 0x163fd
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x10400
movb $0x0, (%r14,%r15)
pushq $0xa
popq %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x103f0
movq %rax, %rbx
movq %r14, %rdi
callq 0x1653d
movq %rbx, %rax
jmp 0x15aa7
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: completionCallback
static void completionCallback(const char *buf, linenoiseCompletions *lc) {
    size_t startpos = 0;
    int mask;
    int i;
    size_t matchlen;
    sds tmp;

    if (strncasecmp(buf,"help ",5) == 0) {
        startpos = 5;
        while (isspace(buf[startpos])) startpos++;
        mask = CLI_HELP_COMMAND | CLI_HELP_GROUP;
    } else {
        mask = CLI_HELP_COMMAND;
    }

    for (i = 0; i < helpEntriesLen; i++) {
        if (!(helpEntries[i].type & mask)) continue;

        matchlen = strlen(buf+startpos);
        if (strncasecmp(buf+startpos,helpEntries[i].full,matchlen) == 0) {
            tmp = sdsnewlen(buf,startpos);
            tmp = sdscat(tmp,helpEntries[i].full);
            linenoiseAddCompletion(lc,tmp);
            sdsfree(tmp);
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, 0x10(%rsp)
movq %rdi, %rbx
leaq 0x2acbf(%rip), %rsi     # 0x40794
pushq $0x5
popq %rdx
callq 0x10460
testl %eax, %eax
je 0x15aed
pushq $0x1
popq %rax
movl %eax, 0x4(%rsp)
xorl %r15d, %r15d
jmp 0x15b10
callq 0x10710
movq (%rax), %rax
pushq $0x4
popq %r15
pushq $0x3
popq %rcx
movl %ecx, 0x4(%rsp)
movsbq 0x1(%rbx,%r15), %rcx
incq %r15
testb $0x20, 0x1(%rax,%rcx,2)
jne 0x15b00
movq %rbx, 0x8(%rsp)
leaq (%rbx,%r15), %r12
pushq $0x10
popq %rbx
movl 0x40a41(%rip), %r13d    # 0x56564
xorl %r14d, %r14d
movslq %r13d, %rax
cmpq %rax, %r14
jge 0x15ba3
movq 0x40a33(%rip), %rbp     # 0x56568
movl 0x4(%rsp), %eax
testl %eax, -0x10(%rbp,%rbx)
je 0x15b9a
movq %r12, %rdi
callq 0x101c0
movq (%rbp,%rbx), %rsi
movq %r12, %rdi
movq %rax, %rdx
callq 0x10460
testl %eax, %eax
jne 0x15b9a
movq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x18d90
movq 0x409f9(%rip), %rcx     # 0x56568
movq (%rcx,%rbx), %rsi
movq %rax, %rdi
callq 0x1952f
movq %rax, %r13
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x1acb9
movq %r13, %rdi
callq 0x18f40
movl 0x409ca(%rip), %r13d    # 0x56564
incq %r14
addq $0x20, %rbx
jmp 0x15b26
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/redis-cli.c
// Function: issueCommandRepeat
static int issueCommandRepeat(int argc, char **argv, long repeat) {
    while (1) {
        config.cluster_reissue_command = 0;
        if (cliSendCommand(argc,argv,repeat) != REDIS_OK) {
            cliConnect(1);

            /* If we still cannot send the command print error.
             * We'll try to reconnect the next time. */
            if (cliSendCommand(argc,argv,repeat) != REDIS_OK) {
                cliPrintContextError();
                return REDIS_ERR;
            }
         }
         /* Issue the command again if we got redirected in cluster mode */
         if (config.cluster_mode && config.cluster_reissue_command) {
            cliConnect(1);
         } else {
             break;
        }
    }
    return REDIS_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
pushq $0x1
popq %r15
andl $0x0, 0x4070a(%rip)     # 0x56464
movl %ebp, %edi
movq %r14, %rsi
movl %ebx, %edx
callq 0x15db3
testl %eax, %eax
je 0x15d82
movl %r15d, %edi
callq 0x1465e
movl %ebp, %edi
movq %r14, %rsi
movl %ebx, %edx
callq 0x15db3
testl %eax, %eax
jne 0x15da0
xorl %eax, %eax
cmpl $0x0, 0x406d5(%rip)     # 0x56460
je 0x15da8
cmpl $0x0, 0x406d0(%rip)     # 0x56464
je 0x15da8
movl %r15d, %edi
callq 0x1465e
jmp 0x15d53
callq 0x1546e
pushq $-0x1
popq %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/redis-cli.c
// Function: cliOutputCommandHelp
static void cliOutputCommandHelp(struct commandHelp *help, int group) {
    printf("\r\n  \x1b[1m%s\x1b[0m \x1b[90m%s\x1b[0m\r\n", help->name, help->params);
    printf("  \x1b[33msummary:\x1b[0m %s\r\n", help->summary);
    printf("  \x1b[33msince:\x1b[0m %s\r\n", help->since);
    if (group) {
        printf("  \x1b[33mgroup:\x1b[0m %s\r\n", commandGroups[help->group]);
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdx
leaq 0x2a614(%rip), %rdi     # 0x409a4
xorl %eax, %eax
callq 0x101f0
movq 0x10(%rbx), %rsi
leaq 0x2a61f(%rip), %rdi     # 0x409c1
xorl %eax, %eax
callq 0x101f0
movq 0x20(%rbx), %rsi
leaq 0x2a626(%rip), %rdi     # 0x409da
xorl %eax, %eax
callq 0x101f0
testl %ebp, %ebp
je 0x163e2
movslq 0x18(%rbx), %rax
leaq 0x3bfe6(%rip), %rcx     # 0x523b0
movq (%rcx,%rax,8), %rsi
leaq 0x2a61c(%rip), %rdi     # 0x409f1
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x101f0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/zmalloc.c
// Function: zmalloc
void *zmalloc(size_t size) {
    void *ptr = malloc(size+PREFIX_SIZE);

    if (!ptr) zmalloc_oom_handler(size);
#ifdef HAVE_MALLOC_SIZE
    update_zmalloc_stat_alloc(zmalloc_size(ptr));
    return ptr;
#else
    *((size_t*)ptr) = size;
    update_zmalloc_stat_alloc(size+PREFIX_SIZE);
    return (char*)ptr+PREFIX_SIZE;
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x1c960
movq %rax, %rbx
testq %rax, %rax
jne 0x1641a
movq %r14, %rdi
callq *0x3fefe(%rip)          # 0x56318
movq %rbx, %rdi
callq 0x21066
addq $0x7, %rax
andq $-0x8, %rax
cmpb $0x1, 0x40167(%rip)     # 0x56598
jne 0x1643d
lock
addq %rax, 0x40165(%rip)     # 0x565a0
jmp 0x16444
addq %rax, 0x4015c(%rip)     # 0x565a0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/zmalloc.c
// Function: zcalloc
void *zcalloc(size_t size) {
    void *ptr = calloc(1, size+PREFIX_SIZE);

    if (!ptr) zmalloc_oom_handler(size);
#ifdef HAVE_MALLOC_SIZE
    update_zmalloc_stat_alloc(zmalloc_size(ptr));
    return ptr;
#else
    *((size_t*)ptr) = size;
    update_zmalloc_stat_alloc(size+PREFIX_SIZE);
    return (char*)ptr+PREFIX_SIZE;
#endif
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
pushq $0x1
popq %rdi
movq %r14, %rsi
callq 0x1d452
movq %rax, %rbx
testq %rax, %rax
jne 0x16472
movq %r14, %rdi
callq *0x3fea6(%rip)          # 0x56318
movq %rbx, %rdi
callq 0x21066
addq $0x7, %rax
andq $-0x8, %rax
cmpb $0x1, 0x4010f(%rip)     # 0x56598
jne 0x16495
lock
addq %rax, 0x4010d(%rip)     # 0x565a0
jmp 0x1649c
addq %rax, 0x40104(%rip)     # 0x565a0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/zmalloc.c
// Function: zrealloc
void *zrealloc(void *ptr, size_t size) {
#ifndef HAVE_MALLOC_SIZE
    void *realptr;
#endif
    size_t oldsize;
    void *newptr;

    if (ptr == NULL) return zmalloc(size);
#ifdef HAVE_MALLOC_SIZE
    oldsize = zmalloc_size(ptr);
    newptr = realloc(ptr,size);
    if (!newptr) zmalloc_oom_handler(size);

    update_zmalloc_stat_free(oldsize);
    update_zmalloc_stat_alloc(zmalloc_size(newptr));
    return newptr;
#else
    realptr = (char*)ptr-PREFIX_SIZE;
    oldsize = *((size_t*)realptr);
    newptr = realloc(realptr,size+PREFIX_SIZE);
    if (!newptr) zmalloc_oom_handler(size);

    *((size_t*)newptr) = size;
    update_zmalloc_stat_free(oldsize);
    update_zmalloc_stat_alloc(size);
    return (char*)newptr+PREFIX_SIZE;
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
testq %rdi, %rdi
je 0x164f6
movq %rdi, %rbx
callq 0x21066
movq %rax, %r14
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1d983
movq %rax, %rbx
testq %rax, %rax
jne 0x164db
movq %r15, %rdi
callq *0x3fe3d(%rip)          # 0x56318
addq $0x7, %r14
andq $-0x8, %r14
cmpb $0x1, 0x400ae(%rip)     # 0x56598
jne 0x16503
lock
subq %r14, 0x400ac(%rip)     # 0x565a0
jmp 0x1650a
movq %r15, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x163fd
subq %r14, 0x40096(%rip)     # 0x565a0
movq %rbx, %rdi
callq 0x21066
addq $0x7, %rax
andq $-0x8, %rax
cmpb $0x1, 0x40077(%rip)     # 0x56598
jne 0x1652d
lock
addq %rax, 0x40075(%rip)     # 0x565a0
jmp 0x16534
addq %rax, 0x4006c(%rip)     # 0x565a0
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/zmalloc.c
// Function: zfree
void zfree(void *ptr) {
#ifndef HAVE_MALLOC_SIZE
    void *realptr;
    size_t oldsize;
#endif

    if (ptr == NULL) return;
#ifdef HAVE_MALLOC_SIZE
    update_zmalloc_stat_free(zmalloc_size(ptr));
    free(ptr);
#else
    realptr = (char*)ptr-PREFIX_SIZE;
    oldsize = *((size_t*)realptr);
    update_zmalloc_stat_free(oldsize+PREFIX_SIZE);
    free(realptr);
#endif
}

// Assembly:
testq %rdi, %rdi
je 0x16566
pushq %rbx
movq %rdi, %rbx
callq 0x21066
addq $0x7, %rax
andq $-0x8, %rax
cmpb $0x1, 0x4003e(%rip)     # 0x56598
jne 0x16567
lock
subq %rax, 0x4003c(%rip)     # 0x565a0
jmp 0x1656e
retq
subq %rax, 0x40032(%rip)     # 0x565a0
movq %rbx, %rdi
popq %rbx
jmp 0x1e6df
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/zmalloc.c
// Function: zstrdup
char *zstrdup(const char *s) {
    size_t l = strlen(s)+1;
    char *p = zmalloc(l);

    memcpy(p,s,l);
    return p;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x101c0
leaq 0x1(%rax), %r14
movq %r14, %rdi
callq 0x163fd
movq %rax, %rdi
movq %rbx, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10400
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/zmalloc.c
// Function: zmalloc_get_rss
size_t zmalloc_get_rss(void) {
    int page = sysconf(_SC_PAGESIZE);
    size_t rss;
    char buf[4096];
    char filename[256];
    int fd, count;
    char *p, *x;

    snprintf(filename,256,"/proc/%d/stat",getpid());
    if ((fd = open(filename,O_RDONLY)) == -1) return 0;
    if (read(fd,buf,4096) <= 0) {
        close(fd);
        return 0;
    }
    close(fd);

    p = buf;
    count = 23; /* RSS is the 24th field in /proc/<pid>/stat */
    while(p && count--) {
        p = strchr(p,' ');
        if (p) p++;
    }
    if (!p) return 0;
    x = strchr(p,' ');
    if (!x) return 0;
    *x = '\0';

    rss = strtoll(p,NULL,10);
    rss *= page;
    return rss;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x1100, %rsp           # imm = 0x1100
pushq $0x1e
popq %rdi
callq 0x105c0
movq %rax, %rbx
callq 0x10180
leaq 0x2a8ce(%rip), %rdx     # 0x40ebc
xorl %r14d, %r14d
movq %rsp, %r15
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0x10200
movq %r15, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x10590
cmpl $-0x1, %eax
je 0x1669c
movl %eax, %ebp
leaq 0x100(%rsp), %r15
movl $0x1000, %edx           # imm = 0x1000
movl %eax, %edi
movq %r15, %rsi
callq 0x102f0
movq %rax, %r14
movl %ebp, %edi
callq 0x102a0
testq %r14, %r14
jle 0x16699
pushq $-0x17
popq %r12
xorl %r14d, %r14d
pushq $0x20
popq %rbp
testq %r15, %r15
je 0x1669c
testl %r12d, %r12d
je 0x16670
movq %r15, %rdi
movl %ebp, %esi
callq 0x101e0
leaq 0x1(%rax), %r15
testq %rax, %rax
cmoveq %rax, %r15
incl %r12d
jmp 0x1664c
pushq $0x20
popq %rsi
movq %r15, %rdi
callq 0x101e0
testq %rax, %rax
je 0x16699
movb $0x0, (%rax)
pushq $0xa
popq %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x103a0
movslq %ebx, %r14
imulq %rax, %r14
jmp 0x1669c
xorl %r14d, %r14d
movq %r14, %rax
addq $0x1100, %rsp           # imm = 0x1100
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/zmalloc.c
// Function: zmalloc_get_smap_bytes_by_field
size_t zmalloc_get_smap_bytes_by_field(char *field) {
    char line[1024];
    size_t bytes = 0;
    FILE *fp = fopen("/proc/self/smaps","r");
    int flen = strlen(field);

    if (!fp) return 0;
    while(fgets(line,sizeof(line),fp) != NULL) {
        if (strncmp(line,field,flen) == 0) {
            char *p = strchr(line,'k');
            if (p) {
                *p = '\0';
                bytes += strtol(line+flen,NULL,10) * 1024;
            }
        }
    }
    fclose(fp);
    return bytes;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x418, %rsp            # imm = 0x418
movq %rdi, %rbx
leaq 0x2a7a6(%rip), %rdi     # 0x40eca
leaq 0x2b772(%rip), %rsi     # 0x41e9d
callq 0x105a0
testq %rax, %rax
je 0x167bc
movq %rax, %r14
movq %rbx, %rdi
callq 0x101c0
movslq %eax, %r12
leaq (%rsp,%r12), %rax
addq $0x10, %rax
movq %rax, 0x8(%rsp)
xorl %r15d, %r15d
leaq 0x10(%rsp), %rbp
pushq $0x6b
popq %r13
movq %rbp, %rdi
movl $0x400, %esi            # imm = 0x400
movq %r14, %rdx
callq 0x10330
testq %rax, %rax
je 0x167b2
movq %rbp, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x100c0
testl %eax, %eax
jne 0x16760
movq %rbp, %rdi
movl %r13d, %esi
callq 0x101e0
testq %rax, %rax
je 0x16760
movb $0x0, (%rax)
movq 0x8(%rsp), %rdi
xorl %esi, %esi
pushq $0xa
popq %rdx
callq 0x103f0
shlq $0xa, %rax
addq %rax, %r15
jmp 0x16760
movq %r14, %rdi
callq 0x101b0
jmp 0x167bf
xorl %r15d, %r15d
movq %r15, %rax
addq $0x418, %rsp            # imm = 0x418
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/zmalloc.c
// Function: zmalloc_default_oom
static void zmalloc_default_oom(size_t size) {
    fprintf(stderr, "zmalloc: Out of memory trying to allocate %zu bytes\n",
        size);
    fflush(stderr);
    abort();
}

// Assembly:
pushq %rbx
movq %rdi, %rdx
movq 0x3d7f3(%rip), %rbx     # 0x53ff8
movq (%rbx), %rdi
leaq 0x2a6db(%rip), %rsi     # 0x40eea
xorl %eax, %eax
callq 0x103b0
movq (%rbx), %rdi
callq 0x10470
callq 0x10090
nop
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ae.c
// Function: aeCreateEventLoop
aeEventLoop *aeCreateEventLoop(int setsize) {
    aeEventLoop *eventLoop;
    int i;

    if ((eventLoop = zmalloc(sizeof(*eventLoop))) == NULL) goto err;
    eventLoop->events = zmalloc(sizeof(aeFileEvent)*setsize);
    eventLoop->fired = zmalloc(sizeof(aeFiredEvent)*setsize);
    if (eventLoop->events == NULL || eventLoop->fired == NULL) goto err;
    eventLoop->setsize = setsize;
    eventLoop->lastTime = time(NULL);
    eventLoop->timeEventHead = NULL;
    eventLoop->timeEventNextId = 0;
    eventLoop->stop = 0;
    eventLoop->maxfd = -1;
    eventLoop->beforesleep = NULL;
    if (aeApiCreate(eventLoop) == -1) goto err;
    /* Events with mask == AE_NONE are not set. So let's initialize the
     * vector with it. */
    for (i = 0; i < setsize; i++)
        eventLoop->events[i].mask = AE_NONE;
    return eventLoop;

err:
    if (eventLoop) {
        zfree(eventLoop->events);
        zfree(eventLoop->fired);
        zfree(eventLoop);
    }
    return NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %edi, %r14d
pushq $0x48
popq %rdi
callq 0x163fd
testq %rax, %rax
je 0x16949
movq %rax, %rbx
movslq %r14d, %r15
movq %r15, %rdi
shlq $0x5, %rdi
callq 0x163fd
movq %rax, 0x18(%rbx)
shlq $0x3, %r15
movq %r15, %rdi
callq 0x163fd
movq %rax, 0x20(%rbx)
cmpq $0x0, 0x18(%rbx)
sete %cl
testq %rax, %rax
sete %al
orb %cl, %al
jne 0x1692f
movl %r14d, 0x4(%rbx)
xorl %edi, %edi
callq 0x10410
movq %rax, 0x10(%rbx)
andq $0x0, 0x28(%rbx)
andq $0x0, 0x8(%rbx)
andl $0x0, 0x30(%rbx)
orl $-0x1, (%rbx)
andq $0x0, 0x40(%rbx)
pushq $0x10
popq %rdi
callq 0x163fd
testq %rax, %rax
je 0x1692f
movq %rax, %r15
movslq 0x4(%rbx), %rax
imulq $0xc, %rax, %rdi
callq 0x163fd
movq %rax, 0x8(%r15)
testq %rax, %rax
je 0x16927
movl $0x400, %edi            # imm = 0x400
callq 0x10610
movl %eax, (%r15)
cmpl $-0x1, %eax
je 0x1691e
movq %r15, 0x38(%rbx)
xorl %eax, %eax
testl %r14d, %r14d
cmovlel %eax, %r14d
shlq $0x5, %r14
cmpq %rax, %r14
je 0x1694b
movq 0x18(%rbx), %rcx
andl $0x0, (%rcx,%rax)
addq $0x20, %rax
jmp 0x1690b
movq 0x8(%r15), %rdi
callq 0x1653d
movq %r15, %rdi
callq 0x1653d
movq 0x18(%rbx), %rdi
callq 0x1653d
movq 0x20(%rbx), %rdi
callq 0x1653d
movq %rbx, %rdi
callq 0x1653d
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ae.c
// Function: aeResizeSetSize
int aeResizeSetSize(aeEventLoop *eventLoop, int setsize) {
    int i;

    if (setsize == eventLoop->setsize) return AE_OK;
    if (eventLoop->maxfd >= setsize) return AE_ERR;
    if (aeApiResize(eventLoop,setsize) == -1) return AE_ERR;

    eventLoop->events = zrealloc(eventLoop->events,sizeof(aeFileEvent)*setsize);
    eventLoop->fired = zrealloc(eventLoop->fired,sizeof(aeFiredEvent)*setsize);
    eventLoop->setsize = setsize;

    /* Make sure that if we created new slots, they are initialized with
     * an AE_NONE mask. */
    for (i = eventLoop->maxfd+1; i < setsize; i++)
        eventLoop->events[i].mask = AE_NONE;
    return AE_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
cmpl %esi, 0x4(%rdi)
je 0x169d9
movq %rdi, %r14
cmpl %esi, (%rdi)
jge 0x169d6
movq 0x38(%r14), %r12
movq 0x8(%r12), %rdi
movslq %esi, %r15
imulq $0xc, %r15, %rsi
callq 0x164a7
movq %rax, 0x8(%r12)
movq 0x18(%r14), %rdi
movq %r15, %rsi
shlq $0x5, %rsi
callq 0x164a7
movq %rax, 0x18(%r14)
movq 0x20(%r14), %rdi
leaq (,%r15,8), %rsi
callq 0x164a7
movq %rax, 0x20(%r14)
movl %r15d, 0x4(%r14)
movslq (%r14), %rax
leaq 0x1(%rax), %rcx
shlq $0x5, %rax
addq $0x20, %rax
cmpq %r15, %rcx
jge 0x169d9
movq 0x18(%r14), %rdx
andl $0x0, (%rdx,%rax)
incq %rcx
jmp 0x169c0
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ae.c
// Function: aeDeleteEventLoop
void aeDeleteEventLoop(aeEventLoop *eventLoop) {
    aeApiFree(eventLoop);
    zfree(eventLoop->events);
    zfree(eventLoop->fired);
    zfree(eventLoop);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %r14
movl (%r14), %edi
callq 0x102a0
movq 0x8(%r14), %rdi
callq 0x1653d
movq %r14, %rdi
callq 0x1653d
movq 0x18(%rbx), %rdi
callq 0x1653d
movq 0x20(%rbx), %rdi
callq 0x1653d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x1653d
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ae.c
// Function: aeCreateFileEvent
int aeCreateFileEvent(aeEventLoop *eventLoop, int fd, int mask,
        aeFileProc *proc, void *clientData)
{
    if (fd >= eventLoop->setsize) {
        errno = ERANGE;
        return AE_ERR;
    }
    aeFileEvent *fe = &eventLoop->events[fd];

    if (aeApiAddEvent(eventLoop, fd, mask) == -1)
        return AE_ERR;
    fe->mask |= mask;
    if (mask & AE_READABLE) fe->rfileProc = proc;
    if (mask & AE_WRITABLE) fe->wfileProc = proc;
    fe->clientData = clientData;
    if (fd > eventLoop->maxfd)
        eventLoop->maxfd = fd;
    return AE_OK;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl %esi, 0x4(%rdi)
jle 0x16ad7
movq %rcx, %r12
movl %edx, %ebp
movl %esi, %ebx
movq %rdi, %r14
movq %r8, (%rsp)
movslq %esi, %rdx
movq 0x18(%rdi), %r13
movq 0x38(%rdi), %rax
leaq 0xc(%rsp), %rcx
andl $0x0, 0x8(%rcx)
movq %rdx, %r15
shlq $0x5, %r15
movl (%r13,%r15), %esi
movl %esi, %edi
orl %ebp, %edi
movl %edi, %r8d
andl $0x1, %r8d
andl $0x2, %edi
leal (%r8,%rdi,2), %edi
movl %edi, (%rcx)
xorl %edi, %edi
testl %esi, %esi
setne %dil
leal 0x1(%rdi,%rdi), %esi
movl %edx, 0x4(%rcx)
movl (%rax), %edi
callq 0x102c0
cmpl $-0x1, %eax
je 0x16ae2
addq %r15, %r13
orl %ebp, (%r13)
testb $0x1, %bpl
je 0x16ab9
movq %r12, 0x8(%r13)
testb $0x2, %bpl
movq (%rsp), %rax
je 0x16ac7
movq %r12, 0x10(%r13)
movq %rax, 0x18(%r13)
xorl %eax, %eax
cmpl %ebx, (%r14)
jge 0x16ae5
movl %ebx, (%r14)
jmp 0x16ae5
callq 0x100a0
movl $0x22, (%rax)
pushq $-0x1
popq %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/ae.c
// Function: aeDeleteFileEvent
void aeDeleteFileEvent(aeEventLoop *eventLoop, int fd, int mask)
{
    if (fd >= eventLoop->setsize) return;
    aeFileEvent *fe = &eventLoop->events[fd];
    if (fe->mask == AE_NONE) return;

    aeApiDelEvent(eventLoop, fd, mask);
    fe->mask = fe->mask & (~mask);
    if (fd == eventLoop->maxfd && fe->mask == AE_NONE) {
        /* Update the max fd */
        int j;

        for (j = eventLoop->maxfd-1; j >= 0; j--)
            if (eventLoop->events[j].mask != AE_NONE) break;
        eventLoop->maxfd = j;
    }
}

// Assembly:
cmpl %esi, 0x4(%rdi)
jle 0x16bb3
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edx, %r14d
movl %esi, %ebp
movq %rdi, %rbx
movq 0x18(%rdi), %r15
movslq %esi, %rdx
shlq $0x5, %rdx
movl (%r15,%rdx), %ecx
testl %ecx, %ecx
je 0x16ba9
movq 0x38(%rbx), %rax
andq $0x0, 0x10(%rsp)
addq %rdx, %r15
notl %r14d
andl %r14d, %ecx
movl %ecx, %edx
andl $0x1, %edx
movl %edx, 0xc(%rsp)
testb $0x2, %cl
jne 0x16b52
cmpl $0x1, %ecx
pushq $0x3
popq %rsi
sbbl $0x0, %esi
jmp 0x16b5c
orl $0x4, %edx
movl %edx, 0xc(%rsp)
pushq $0x3
popq %rsi
leaq 0xc(%rsp), %rcx
movl %ebp, 0x4(%rcx)
movl (%rax), %edi
movl %ebp, %edx
callq 0x102c0
andl (%r15), %r14d
movl %r14d, (%r15)
cmpl %ebp, (%rbx)
jne 0x16ba9
testl %r14d, %r14d
jne 0x16ba9
movl %ebp, %eax
movl %ebp, %ecx
sarl $0x1f, %ecx
andl %ebp, %ecx
decl %ecx
decq %rax
testl %ebp, %ebp
jle 0x16ba5
movq 0x18(%rbx), %rdx
movl %eax, %esi
shlq $0x5, %rsi
decl %ebp
decq %rax
cmpl $0x0, (%rdx,%rsi)
je 0x16b8a
jmp 0x16ba7
movl %ecx, %ebp
movl %ebp, (%rbx)
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/ae.c
// Function: aeCreateTimeEvent
long long aeCreateTimeEvent(aeEventLoop *eventLoop, long long milliseconds,
        aeTimeProc *proc, void *clientData,
        aeEventFinalizerProc *finalizerProc)
{
    long long id = eventLoop->timeEventNextId++;
    aeTimeEvent *te;

    te = zmalloc(sizeof(*te));
    if (te == NULL) return AE_ERR;
    te->id = id;
    aeAddMillisecondsToNow(milliseconds,&te->when_sec,&te->when_ms);
    te->timeProc = proc;
    te->finalizerProc = finalizerProc;
    te->clientData = clientData;
    te->next = eventLoop->timeEventHead;
    eventLoop->timeEventHead = te;
    return id;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r12
movq %rcx, (%rsp)
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, %r14
movq 0x8(%rdi), %rbx
leaq 0x1(%rbx), %rax
movq %rax, 0x8(%rdi)
pushq $0x38
popq %rdi
callq 0x163fd
testq %rax, %rax
je 0x16c35
movq %rax, %r15
movq %rbx, (%rax)
leaq 0x8(%rax), %rsi
movq %rax, %rdx
addq $0x10, %rdx
movq %rbp, %rdi
callq 0x16c4a
movq %r13, 0x18(%r15)
movq %r12, 0x20(%r15)
movq (%rsp), %rax
movq %rax, 0x28(%r15)
movq 0x28(%r14), %rax
movq %rax, 0x30(%r15)
movq %r15, 0x28(%r14)
jmp 0x16c38
pushq $-0x1
popq %rbx
movq %rbx, %rax
addq $0x8, %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/ae.c
// Function: aeAddMillisecondsToNow
static void aeAddMillisecondsToNow(long long milliseconds, long *sec, long *ms) {
    long cur_sec, cur_ms, when_sec, when_ms;

    aeGetTime(&cur_sec, &cur_ms);
    when_sec = cur_sec + milliseconds/1000;
    when_ms = cur_ms + milliseconds%1000;
    if (when_ms >= 1000) {
        when_sec ++;
        when_ms -= 1000;
    }
    *sec = when_sec;
    *ms = when_ms;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x8(%rsp), %r12
movq %rsp, %r13
movq %r12, %rdi
movq %r13, %rsi
callq 0x16ff0
movl $0x3e8, %ecx            # imm = 0x3E8
movq %r15, %rax
cqto
idivq %rcx
addq (%r12), %rax
movq (%r13), %rsi
leaq (%rsi,%rdx), %rdi
xorl %r8d, %r8d
cmpq %rcx, %rdi
leaq -0x3e8(%rsi,%rdx), %rcx
cmovlq %rdi, %rcx
setge %r8b
addq %rax, %r8
movq %r8, (%r14)
movq %rcx, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq