LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: cliAuth
static int cliAuth(void) {
    redisReply *reply;
    if (config.auth == NULL) return REDIS_OK;

    reply = redisCommand(context,"AUTH %s",config.auth);
    if (reply != NULL) {
        freeReplyObject(reply);
        return REDIS_OK;
    }
    return REDIS_ERR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpq $0x0, 0x8a6e0(%rip)     # 0xa1520
jne 0x16e4b
movl $0x0, -0x4(%rbp)
jmp 0x16e8b
movq 0x8a786(%rip), %rdi     # 0xa15d8
movq 0x8a6c7(%rip), %rdx     # 0xa1520
leaq 0x74ee6(%rip), %rsi     # 0x8bd46
movb $0x0, %al
callq 0x1d7f0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x16e84
movq -0x10(%rbp), %rdi
callq 0x1b290
movl $0x0, -0x4(%rbp)
jmp 0x16e8b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
cmpl $0x0, 0x8a601(%rip)     # 0xa14b0
jne 0x16eba
movl $0x0, -0x4(%rbp)
jmp 0x16f0f
movq 0x8a717(%rip), %rdi     # 0xa15d8
movl 0x8a5e9(%rip), %edx     # 0xa14b0
leaq 0x74e80(%rip), %rsi     # 0x8bd4e
movb $0x0, %al
callq 0x1d7f0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x16f08
movl $0x0, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x16ef7
movl $0xffffffff, -0x14(%rbp) # imm = 0xFFFFFFFF
movq -0x10(%rbp), %rdi
callq 0x1b290
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x16f0f
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq -0x10(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x10220
imulq $0xf4240, -0x10(%rbp), %rax # imm = 0xF4240
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
cmpl $0x0, 0x8a131(%rip)     # 0xa15c0
je 0x17496
jmp 0x17568
cmpq $0x0, 0x89ffa(%rip)     # 0xa1498
je 0x174cd
movq 0x89ff1(%rip), %rcx     # 0xa1498
leaq 0x89fda(%rip), %rdi     # 0xa1488
addq $0xb0, %rdi
movl $0x80, %esi
leaq 0x74a3a(%rip), %rdx     # 0x8befb
movb $0x0, %al
callq 0x101e0
movl %eax, -0x4(%rbp)
jmp 0x174f5
movq 0x89fb4(%rip), %rdx     # 0xa1488
movl 0x89fb6(%rip), %ecx     # 0xa1490
leaq 0x89fa7(%rip), %rdi     # 0xa1488
addq $0xb0, %rdi
movl $0x80, %esi
callq 0x11f10
movl %eax, -0x4(%rbp)
cmpl $0x0, 0x89fb4(%rip)     # 0xa14b0
je 0x17539
movslq -0x4(%rbp), %rax
leaq 0x89f7f(%rip), %rdi     # 0xa1488
addq $0xb0, %rdi
addq %rax, %rdi
movslq -0x4(%rbp), %rax
movl $0x80, %esi
subq %rax, %rsi
movl 0x89f8b(%rip), %ecx     # 0xa14b0
leaq 0x749d8(%rip), %rdx     # 0x8bf04
movb $0x0, %al
callq 0x101e0
addl -0x4(%rbp), %eax
movl %eax, -0x4(%rbp)
movslq -0x4(%rbp), %rax
leaq 0x89f44(%rip), %rdi     # 0xa1488
addq $0xb0, %rdi
addq %rax, %rdi
movslq -0x4(%rbp), %rax
movl $0x80, %esi
subq %rax, %rsi
leaq 0x75371(%rip), %rdx     # 0x8c8d2
movb $0x0, %al
callq 0x101e0
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb -0x1(%rax), %al
movb %al, -0x11(%rbp)
movzbl -0x11(%rbp), %eax
andl $0x7, %eax
movl %eax, %ecx
movq %rcx, -0x20(%rbp)
subl $0x4, %eax
ja 0x17c9e
movq -0x20(%rbp), %rax
leaq 0x6f61d(%rip), %rcx     # 0x8726c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl -0x11(%rbp), %eax
sarl $0x3, %eax
cltq
movq %rax, -0x8(%rbp)
jmp 0x17ca6
movq -0x10(%rbp), %rax
movzbl -0x3(%rax), %eax
movq %rax, -0x8(%rbp)
jmp 0x17ca6
movq -0x10(%rbp), %rax
movzwl -0x5(%rax), %eax
movq %rax, -0x8(%rbp)
jmp 0x17ca6
movq -0x10(%rbp), %rax
movl -0x9(%rax), %eax
movq %rax, -0x8(%rbp)
jmp 0x17ca6
movq -0x10(%rbp), %rax
movq -0x11(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x17ca6
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: getDbSize
static int getDbSize(void) {
    redisReply *reply;
    int size;

    reply = redisCommand(context, "DBSIZE");

    if(reply == NULL || reply->type != REDIS_REPLY_INTEGER) {
        fprintf(stderr, "Couldn't determine DBSIZE!\n");
        exit(1);
    }

    /* Grab the number of keys and free our reply */
    size = reply->integer;
    freeReplyObject(reply);

    return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x89919(%rip), %rdi     # 0xa15d8
leaq 0x704f1(%rip), %rsi     # 0x881b7
movb $0x0, %al
callq 0x1d7f0
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x17ce1
movq -0x8(%rbp), %rax
cmpl $0x3, (%rax)
je 0x17d03
movq 0x87308(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
leaq 0x74708(%rip), %rsi     # 0x8c3fa
movb $0x0, %al
callq 0x10360
movl $0x1, %edi
callq 0x10600
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1b290
movl -0xc(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: sendScan
static redisReply *sendScan(unsigned long long *it) {
    redisReply *reply = redisCommand(context, "SCAN %llu", *it);

    /* Handle any error conditions */
    if(reply == NULL) {
        fprintf(stderr, "\nI/O error\n");
        exit(1);
    } else if(reply->type == REDIS_REPLY_ERROR) {
        fprintf(stderr, "SCAN error: %s\n", reply->str);
        exit(1);
    } else if(reply->type != REDIS_REPLY_ARRAY) {
        fprintf(stderr, "Non ARRAY response from SCAN!\n");
        exit(1);
    } else if(reply->elements != 2) {
        fprintf(stderr, "Invalid element count from SCAN!\n");
        exit(1);
    }

    /* Validate our types are correct */
    assert(reply->element[0]->type == REDIS_REPLY_STRING);
    assert(reply->element[1]->type == REDIS_REPLY_ARRAY);

    /* Update iterator */
    *it = strtoull(reply->element[0]->str, NULL, 10);

    return reply;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x898a5(%rip), %rdi     # 0xa15d8
movq -0x8(%rbp), %rax
movq (%rax), %rdx
leaq 0x746d5(%rip), %rsi     # 0x8c416
movb $0x0, %al
callq 0x1d7f0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x17d75
movq 0x87296(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
leaq 0x73ff4(%rip), %rsi     # 0x8bd58
movb $0x0, %al
callq 0x10360
movl $0x1, %edi
callq 0x10600
movq -0x10(%rbp), %rax
cmpl $0x6, (%rax)
jne 0x17da8
movq 0x8726b(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
leaq 0x74689(%rip), %rsi     # 0x8c420
movb $0x0, %al
callq 0x10360
movl $0x1, %edi
callq 0x10600
movq -0x10(%rbp), %rax
cmpl $0x2, (%rax)
je 0x17dd3
movq 0x87238(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
leaq 0x7466e(%rip), %rsi     # 0x8c430
movb $0x0, %al
callq 0x10360
movl $0x1, %edi
callq 0x10600
movq -0x10(%rbp), %rax
cmpq $0x2, 0x20(%rax)
je 0x17e00
movq 0x8720b(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
leaq 0x74660(%rip), %rsi     # 0x8c44f
movb $0x0, %al
callq 0x10360
movl $0x1, %edi
callq 0x10600
jmp 0x17e02
jmp 0x17e04
jmp 0x17e06
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
cmpl $0x1, (%rax)
jne 0x17e18
jmp 0x17e37
leaq 0x74652(%rip), %rdi     # 0x8c471
leaq 0x73f95(%rip), %rsi     # 0x8bdbb
movl $0x7ae, %edx            # imm = 0x7AE
leaq 0x7466d(%rip), %rcx     # 0x8c49f
callq 0x10230
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
cmpl $0x2, (%rax)
jne 0x17e4a
jmp 0x17e69
leaq 0x74679(%rip), %rdi     # 0x8c4ca
leaq 0x73f63(%rip), %rsi     # 0x8bdbb
movl $0x7af, %edx            # imm = 0x7AF
leaq 0x7463b(%rip), %rcx     # 0x8c49f
callq 0x10230
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movq 0x18(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x10310
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: toIntType
static int toIntType(char *key, char *type) {
    if(!strcmp(type, "string")) {
        return TYPE_STRING;
    } else if(!strcmp(type, "list")) {
        return TYPE_LIST;
    } else if(!strcmp(type, "set")) {
        return TYPE_SET;
    } else if(!strcmp(type, "hash")) {
        return TYPE_HASH;
    } else if(!strcmp(type, "zset")) {
        return TYPE_ZSET;
    } else if(!strcmp(type, "none")) {
        return TYPE_NONE;
    } else {
        fprintf(stderr, "Unknown type '%s' for key '%s'\n", type, key);
        exit(1);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x6f5ac(%rip), %rsi     # 0x877a7
callq 0x10330
cmpl $0x0, %eax
jne 0x18211
movl $0x0, -0x4(%rbp)
jmp 0x182d7
movq -0x18(%rbp), %rdi
leaq 0x70cf9(%rip), %rsi     # 0x88f15
callq 0x10330
cmpl $0x0, %eax
jne 0x18232
movl $0x1, -0x4(%rbp)
jmp 0x182d7
movq -0x18(%rbp), %rdi
leaq 0x71c73(%rip), %rsi     # 0x89eb0
callq 0x10330
cmpl $0x0, %eax
jne 0x18253
movl $0x2, -0x4(%rbp)
jmp 0x182d7
movq -0x18(%rbp), %rdi
leaq 0x708bb(%rip), %rsi     # 0x88b19
callq 0x10330
cmpl $0x0, %eax
jne 0x18271
movl $0x3, -0x4(%rbp)
jmp 0x182d7
movq -0x18(%rbp), %rdi
leaq 0x73f07(%rip), %rsi     # 0x8c183
callq 0x10330
cmpl $0x0, %eax
jne 0x1828f
movl $0x4, -0x4(%rbp)
jmp 0x182d7
movq -0x18(%rbp), %rdi
leaq 0x742da(%rip), %rsi     # 0x8c574
callq 0x10330
cmpl $0x0, %eax
jne 0x182ad
movl $0x5, -0x4(%rbp)
jmp 0x182d7
movq 0x86d3c(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rcx
leaq 0x742b3(%rip), %rsi     # 0x8c579
movb $0x0, %al
callq 0x10360
movl $0x1, %edi
callq 0x10600
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x18350
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x18318
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
movq %rax, -0x8(%rbp)
jmp 0x1833f
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x103a0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x19a30
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: getInfoField
static char *getInfoField(char *info, char *field) {
    char *p = strstr(info,field);
    char *n1, *n2;
    char *result;

    if (!p) return NULL;
    p += strlen(field)+1;
    n1 = strchr(p,'\r');
    n2 = strchr(p,',');
    if (n2 && n2 < n1) n1 = n2;
    result = zmalloc(sizeof(char)*(n1-p)+1);
    memcpy(result,p,(n1-p));
    result[n1-p] = '\0';
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x106a0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x18385
movq $0x0, -0x8(%rbp)
jmp 0x18426
movq -0x18(%rbp), %rdi
callq 0x101a0
addq $0x1, %rax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl $0xd, %esi
callq 0x101c0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movl $0x2c, %esi
callq 0x101c0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x183d7
movq -0x30(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x183d7
movq -0x30(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
movq -0x20(%rbp), %rax
subq %rax, %rdi
shlq $0x0, %rdi
addq $0x1, %rdi
callq 0x19760
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x20(%rbp), %rax
subq %rax, %rdx
callq 0x103b0
movq -0x38(%rbp), %rax
movq -0x28(%rbp), %rcx
movq -0x20(%rbp), %rdx
subq %rdx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq 0x7409f(%rip), %rsi     # 0x8ca02
movl $0x5, %edx
callq 0x10420
cmpl $0x0, %eax
jne 0x189b6
movq $0x5, -0x18(%rbp)
callq 0x106e0
movq (%rax), %rax
movq -0x8(%rbp), %rcx
movq -0x18(%rbp), %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x189ad
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x1897a
movl $0x3, -0x1c(%rbp)
jmp 0x189bd
movl $0x1, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl 0x88c17(%rip), %eax     # 0xa15e4
jge 0x18a8b
movq 0x88c0e(%rip), %rax     # 0xa15e8
movslq -0x20(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
andl -0x1c(%rbp), %eax
cmpl $0x0, %eax
jne 0x189f4
jmp 0x18a7d
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
callq 0x101a0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
addq -0x18(%rbp), %rdi
movq 0x88bd4(%rip), %rax     # 0xa15e8
movslq -0x20(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0x10420
cmpl $0x0, %eax
jne 0x18a7b
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x1eaa0
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq 0x88b9b(%rip), %rax     # 0xa15e8
movslq -0x20(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rsi
callq 0x1f930
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x22320
movq -0x30(%rbp), %rdi
callq 0x1ee80
jmp 0x18a7d
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x189c4
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: cliSplitArgs
static sds *cliSplitArgs(char *line, int *argc) {
    if (config.eval_ldb && (strstr(line,"eval ") == line ||
                            strstr(line,"e ") == line))
    {
        sds *argv = sds_malloc(sizeof(sds)*2);
        *argc = 2;
        int len = strlen(line);
        int elen = line[1] == ' ' ? 2 : 5; /* "e " or "eval "? */
        argv[0] = sdsnewlen(line,elen-1);
        argv[1] = sdsnewlen(line+elen,len-elen);
        return argv;
    } else {
        return sdssplitargs(line,argc);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpl $0x0, 0x888b9(%rip)     # 0xa15c0
je 0x18dc6
movq -0x10(%rbp), %rdi
leaq 0x73cf0(%rip), %rsi     # 0x8ca08
callq 0x106a0
cmpq -0x10(%rbp), %rax
je 0x18d3d
movq -0x10(%rbp), %rdi
leaq 0x73ce0(%rip), %rsi     # 0x8ca0e
callq 0x106a0
cmpq -0x10(%rbp), %rax
jne 0x18dc6
movl $0x10, %edi
callq 0x214a0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl $0x2, (%rax)
movq -0x10(%rbp), %rdi
callq 0x101a0
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movsbl 0x1(%rax), %edx
movl $0x5, %eax
movl $0x2, %ecx
cmpl $0x20, %edx
cmovel %ecx, %eax
movl %eax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0x1eaa0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rdi
movslq -0x28(%rbp), %rax
addq %rax, %rdi
movl -0x24(%rbp), %eax
subl -0x28(%rbp), %eax
movslq %eax, %rsi
callq 0x1eaa0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x18dd7
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x20e50
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/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
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, 0x886d7(%rip)     # 0xa14e4
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
callq 0x18e90
cmpl $0x0, %eax
je 0x18e55
movl $0x1, %edi
callq 0x14530
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rax
movl %eax, %edx
callq 0x18e90
cmpl $0x0, %eax
je 0x18e53
callq 0x17440
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x18e7e
jmp 0x18e55
cmpl $0x0, 0x88684(%rip)     # 0xa14e0
je 0x18e73
cmpl $0x0, 0x8867f(%rip)     # 0xa14e4
je 0x18e73
movl $0x1, %edi
callq 0x14530
jmp 0x18e75
jmp 0x18e77
jmp 0x18e03
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x73673(%rip), %rdi     # 0x8cc78
movb $0x0, %al
callq 0x101d0
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rsi
leaq 0x7367a(%rip), %rdi     # 0x8cc95
movb $0x0, %al
callq 0x101d0
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rsi
leaq 0x7367d(%rip), %rdi     # 0x8ccae
movb $0x0, %al
callq 0x101d0
cmpl $0x0, -0xc(%rbp)
je 0x1965f
movq -0x8(%rbp), %rax
movslq 0x18(%rax), %rcx
leaq 0x87cb3(%rip), %rax     # 0xa1300
movq (%rax,%rcx,8), %rsi
leaq 0x7366d(%rip), %rdi     # 0x8ccc5
movb $0x0, %al
callq 0x101d0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/redis-cli.c
// Function: readArgFromStdin
static sds readArgFromStdin(void) {
    char buf[1024];
    sds arg = sdsempty();

    while(1) {
        int nread = read(fileno(stdin),buf,1024);

        if (nread == 0) break;
        else if (nread == -1) {
            perror("Reading from standard input");
            exit(1);
        }
        arg = sdscatlen(arg,buf,nread);
    }
    return arg;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x410, %rsp            # imm = 0x410
callq 0x1ed50
movq %rax, -0x408(%rbp)
movq 0x8590a(%rip), %rax     # 0x9efc8
movq (%rax), %rdi
callq 0x103d0
movl %eax, %edi
leaq -0x400(%rbp), %rsi
movl $0x400, %edx            # imm = 0x400
callq 0x102b0
movl %eax, -0x40c(%rbp)
cmpl $0x0, -0x40c(%rbp)
jne 0x196ea
jmp 0x1972e
cmpl $-0x1, -0x40c(%rbp)
jne 0x19709
leaq 0x736fe(%rip), %rdi     # 0x8cdf8
callq 0x10570
movl $0x1, %edi
callq 0x10600
jmp 0x1970b
movq -0x408(%rbp), %rdi
leaq -0x400(%rbp), %rsi
movslq -0x40c(%rbp), %rdx
callq 0x1f8a0
movq %rax, -0x408(%rbp)
jmp 0x196b7
movq -0x408(%rbp), %rax
addq $0x410, %rsp            # imm = 0x410
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
addq $0x0, %rdi
callq 0x266f0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x19791
movq 0x87be5(%rip), %rax     # 0xa1370
movq -0x8(%rbp), %rdi
callq *%rax
jmp 0x19793
movq -0x10(%rbp), %rdi
callq 0x39eb0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x7, %rax
cmpq $0x0, %rax
je 0x197c6
movq -0x18(%rbp), %rcx
andq $0x7, %rcx
movl $0x8, %eax
subq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, 0x87e4b(%rip)     # 0xa1618
je 0x197f0
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq %rcx, %rax
lock
xaddq %rax, 0x87e39(%rip)     # 0xa1620
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x19802
movq -0x18(%rbp), %rax
addq 0x87e25(%rip), %rax     # 0xa1620
movq %rax, 0x87e1e(%rip)     # 0xa1620
jmp 0x19804
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rsi
addq $0x0, %rsi
movl $0x1, %edi
callq 0x29530
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x19846
movq 0x87b30(%rip), %rax     # 0xa1370
movq -0x8(%rbp), %rdi
callq *%rax
jmp 0x19848
movq -0x10(%rbp), %rdi
callq 0x39eb0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
andq $0x7, %rax
cmpq $0x0, %rax
je 0x1987b
movq -0x18(%rbp), %rcx
andq $0x7, %rcx
movl $0x8, %eax
subq %rcx, %rax
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpl $0x0, 0x87d96(%rip)     # 0xa1618
je 0x198a5
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rcx
movq %rcx, %rax
lock
xaddq %rax, 0x87d84(%rip)     # 0xa1620
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x198b7
movq -0x18(%rbp), %rax
addq 0x87d70(%rip), %rax     # 0xa1620
movq %rax, 0x87d69(%rip)     # 0xa1620
jmp 0x198b9
movq -0x10(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x198f9
movq -0x18(%rbp), %rdi
callq 0x19760
movq %rax, -0x8(%rbp)
jmp 0x19a1a
movq -0x10(%rbp), %rdi
callq 0x39eb0
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x2a910
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1992b
movq 0x87a4b(%rip), %rax     # 0xa1370
movq -0x18(%rbp), %rdi
callq *%rax
jmp 0x1992d
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
andq $0x7, %rax
cmpq $0x0, %rax
je 0x1995b
movq -0x30(%rbp), %rcx
andq $0x7, %rcx
movl $0x8, %eax
subq %rcx, %rax
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpl $0x0, 0x87cb6(%rip)     # 0xa1618
je 0x19988
movq -0x30(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rcx
movq %rcx, %rax
negq %rax
lock
xaddq %rax, 0x87ca1(%rip)     # 0xa1620
subq %rcx, %rax
movq %rax, -0x40(%rbp)
jmp 0x1999d
movq -0x30(%rbp), %rcx
movq 0x87c8d(%rip), %rax     # 0xa1620
subq %rcx, %rax
movq %rax, 0x87c83(%rip)     # 0xa1620
jmp 0x1999f
jmp 0x199a1
movq -0x28(%rbp), %rdi
callq 0x39eb0
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
andq $0x7, %rax
cmpq $0x0, %rax
je 0x199d4
movq -0x48(%rbp), %rcx
andq $0x7, %rcx
movl $0x8, %eax
subq %rcx, %rax
addq -0x48(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpl $0x0, 0x87c3d(%rip)     # 0xa1618
je 0x199fe
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rcx
movq %rcx, %rax
lock
xaddq %rax, 0x87c2b(%rip)     # 0xa1620
addq %rcx, %rax
movq %rax, -0x58(%rbp)
jmp 0x19a10
movq -0x48(%rbp), %rax
addq 0x87c17(%rip), %rax     # 0xa1620
movq %rax, 0x87c10(%rip)     # 0xa1620
jmp 0x19a12
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
jne 0x19a48
jmp 0x19aca
jmp 0x19a4a
movq -0x8(%rbp), %rdi
callq 0x39eb0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
andq $0x7, %rax
cmpq $0x0, %rax
je 0x19a7d
movq -0x10(%rbp), %rcx
andq $0x7, %rcx
movl $0x8, %eax
subq %rcx, %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
cmpl $0x0, 0x87b94(%rip)     # 0xa1618
je 0x19aaa
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rcx
movq %rcx, %rax
negq %rax
lock
xaddq %rax, 0x87b7f(%rip)     # 0xa1620
subq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x19abf
movq -0x10(%rbp), %rcx
movq 0x87b6b(%rip), %rax     # 0xa1620
subq %rcx, %rax
movq %rax, 0x87b61(%rip)     # 0xa1620
jmp 0x19ac1
movq -0x8(%rbp), %rdi
callq 0x2f750
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x101a0
addq $0x1, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x19760
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x103b0
movq -0x18(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/zmalloc.c
// Function: zmalloc_used_memory
size_t zmalloc_used_memory(void) {
    size_t um;

    if (zmalloc_thread_safe) {
#if defined(__ATOMIC_RELAXED) || defined(HAVE_ATOMIC)
        um = update_zmalloc_stat_add(0);
#else
        pthread_mutex_lock(&used_memory_mutex);
        um = used_memory;
        pthread_mutex_unlock(&used_memory_mutex);
#endif
    }
    else {
        um = used_memory;
    }

    return um;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
cmpl $0x0, 0x87aed(%rip)     # 0xa1618
je 0x19b56
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq %rcx, %rax
lock
xaddq %rax, 0x87adb(%rip)     # 0xa1620
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x19b61
movq 0x87ac3(%rip), %rax     # 0xa1620
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x1150, %rsp           # imm = 0x1150
movl $0x1e, %edi
callq 0x10580
movl %eax, -0xc(%rbp)
leaq -0x1120(%rbp), %rax
movq %rax, -0x1140(%rbp)
callq 0x10160
movq -0x1140(%rbp), %rdi
movl %eax, %ecx
movl $0x100, %esi            # imm = 0x100
leaq 0x7326c(%rip), %rdx     # 0x8ce4c
movb $0x0, %al
callq 0x101e0
leaq -0x1120(%rbp), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x10550
movl %eax, -0x1124(%rbp)
cmpl $-0x1, %eax
jne 0x19c0f
movq $0x0, -0x8(%rbp)
jmp 0x19d50
movl -0x1124(%rbp), %edi
leaq -0x1020(%rbp), %rsi
movl $0x1000, %edx           # imm = 0x1000
callq 0x102b0
cmpq $0x0, %rax
jg 0x19c44
movl -0x1124(%rbp), %edi
callq 0x10280
movq $0x0, -0x8(%rbp)
jmp 0x19d50
movl -0x1124(%rbp), %edi
callq 0x10280
leaq -0x1020(%rbp), %rax
movq %rax, -0x1130(%rbp)
movl $0x17, -0x1128(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x1130(%rbp)
movb %al, -0x1141(%rbp)
je 0x19c96
movl -0x1128(%rbp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0x1128(%rbp)
cmpl $0x0, %eax
setne %al
movb %al, -0x1141(%rbp)
movb -0x1141(%rbp), %al
testb $0x1, %al
jne 0x19ca2
jmp 0x19cd8
movq -0x1130(%rbp), %rdi
movl $0x20, %esi
callq 0x101c0
movq %rax, -0x1130(%rbp)
cmpq $0x0, -0x1130(%rbp)
je 0x19cd6
movq -0x1130(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1130(%rbp)
jmp 0x19c67
cmpq $0x0, -0x1130(%rbp)
jne 0x19cec
movq $0x0, -0x8(%rbp)
jmp 0x19d50
movq -0x1130(%rbp), %rdi
movl $0x20, %esi
callq 0x101c0
movq %rax, -0x1138(%rbp)
cmpq $0x0, -0x1138(%rbp)
jne 0x19d18
movq $0x0, -0x8(%rbp)
jmp 0x19d50
movq -0x1138(%rbp), %rax
movb $0x0, (%rax)
movq -0x1130(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x10350
movq %rax, -0x18(%rbp)
movslq -0xc(%rbp), %rax
imulq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x1150, %rsp           # imm = 0x1150
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x430, %rsp            # imm = 0x430
movq %rdi, -0x10(%rbp)
movq $0x0, -0x418(%rbp)
leaq 0x73039(%rip), %rdi     # 0x8ce5a
leaq 0x710b1(%rip), %rsi     # 0x8aed9
callq 0x10560
movq %rax, -0x420(%rbp)
movq -0x10(%rbp), %rdi
callq 0x101a0
movl %eax, -0x424(%rbp)
cmpq $0x0, -0x420(%rbp)
jne 0x19e5a
movq $0x0, -0x8(%rbp)
jmp 0x19f15
jmp 0x19e5c
leaq -0x410(%rbp), %rdi
movq -0x420(%rbp), %rdx
movl $0x400, %esi            # imm = 0x400
callq 0x102f0
cmpq $0x0, %rax
je 0x19efe
leaq -0x410(%rbp), %rdi
movq -0x10(%rbp), %rsi
movslq -0x424(%rbp), %rdx
callq 0x100a0
cmpl $0x0, %eax
jne 0x19ef9
leaq -0x410(%rbp), %rdi
movl $0x6b, %esi
callq 0x101c0
movq %rax, -0x430(%rbp)
cmpq $0x0, -0x430(%rbp)
je 0x19ef7
movq -0x430(%rbp), %rax
movb $0x0, (%rax)
leaq -0x410(%rbp), %rdi
movslq -0x424(%rbp), %rax
addq %rax, %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0xa, %edx
callq 0x103a0
shlq $0xa, %rax
addq -0x418(%rbp), %rax
movq %rax, -0x418(%rbp)
jmp 0x19ef9
jmp 0x19e5c
movq -0x420(%rbp), %rdi
callq 0x10190
movq -0x418(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x430, %rsp            # imm = 0x430
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq 0x8504d(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
movq -0x8(%rbp), %rdx
leaq 0x72ec9(%rip), %rsi     # 0x8ce7a
movb $0x0, %al
callq 0x10360
movq 0x85031(%rip), %rax     # 0x9eff0
movq (%rax), %rdi
callq 0x10430
callq 0x10070
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0xc(%rbp)
movl $0x48, %edi
callq 0x19760
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x1a054
jmp 0x1a143
movslq -0xc(%rbp), %rdi
shlq $0x5, %rdi
callq 0x19760
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
movslq -0xc(%rbp), %rdi
shlq $0x3, %rdi
callq 0x19760
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x1a09a
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x1a09f
jmp 0x1a143
movl -0xc(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x4(%rax)
xorl %eax, %eax
movl %eax, %edi
callq 0x103c0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x18(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x30(%rax)
movq -0x18(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x18(%rbp), %rax
movq $0x0, 0x40(%rax)
movq -0x18(%rbp), %rdi
callq 0x1a180
cmpl $-0x1, %eax
jne 0x1a106
jmp 0x1a143
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x1a139
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x1c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0x0, (%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1a10d
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x1a175
cmpq $0x0, -0x18(%rbp)
je 0x1a16d
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x19a30
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x19a30
movq -0x18(%rbp), %rdi
callq 0x19a30
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/./ae_epoll.c
// Function: aeApiCreate
static int aeApiCreate(aeEventLoop *eventLoop) {
    aeApiState *state = zmalloc(sizeof(aeApiState));

    if (!state) return -1;
    state->events = zmalloc(sizeof(struct epoll_event)*eventLoop->setsize);
    if (!state->events) {
        zfree(state);
        return -1;
    }
    state->epfd = epoll_create(1024); /* 1024 is just a hint for the kernel */
    if (state->epfd == -1) {
        zfree(state->events);
        zfree(state);
        return -1;
    }
    eventLoop->apidata = state;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl $0x10, %edi
callq 0x19760
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1a1ad
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1a233
movq -0x10(%rbp), %rax
movslq 0x4(%rax), %rax
imulq $0xc, %rax, %rdi
callq 0x19760
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x1a1e6
movq -0x18(%rbp), %rdi
callq 0x19a30
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1a233
movl $0x400, %edi            # imm = 0x400
callq 0x105e0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x18(%rbp), %rax
cmpl $-0x1, (%rax)
jne 0x1a220
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x19a30
movq -0x18(%rbp), %rdi
callq 0x19a30
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1a233
movq -0x18(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jne 0x1a287
movl $0x0, -0x4(%rbp)
jmp 0x1a344
movq -0x10(%rbp), %rax
movl (%rax), %eax
cmpl -0x14(%rbp), %eax
jl 0x1a29e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1a344
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x1a350
cmpl $-0x1, %eax
jne 0x1a2bb
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1a344
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movslq -0x14(%rbp), %rsi
shlq $0x5, %rsi
callq 0x198d0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movslq -0x14(%rbp), %rsi
shlq $0x3, %rsi
callq 0x198d0
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl (%rax), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x1a33d
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x18(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl $0x0, (%rax)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x1a311
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/ae.c
// Function: aeDeleteEventLoop
void aeDeleteEventLoop(aeEventLoop *eventLoop) {
    aeApiFree(eventLoop);
    zfree(eventLoop->events);
    zfree(eventLoop->fired);
    zfree(eventLoop);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1a3e0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x19a30
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x19a30
movq -0x8(%rbp), %rdi
callq 0x19a30
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/./ae_epoll.c
// Function: aeApiFree
static void aeApiFree(aeEventLoop *eventLoop) {
    aeApiState *state = eventLoop->apidata;

    close(state->epfd);
    zfree(state->events);
    zfree(state);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %edi
callq 0x10280
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x19a30
movq -0x10(%rbp), %rdi
callq 0x19a30
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jl 0x1a47d
callq 0x10080
movl $0x22, (%rax)
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1a511
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x18(%rbp), %edx
callq 0x1a520
cmpl $-0x1, %eax
jne 0x1a4b1
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1a511
movl -0x18(%rbp), %ecx
movq -0x30(%rbp), %rax
orl (%rax), %ecx
movl %ecx, (%rax)
movl -0x18(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1a4d3
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movl -0x18(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1a4ea
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x18(%rax)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl (%rcx), %eax
jle 0x1a50a
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/./ae_epoll.c
// Function: aeApiAddEvent
static int aeApiAddEvent(aeEventLoop *eventLoop, int fd, int mask) {
    aeApiState *state = eventLoop->apidata;
    struct epoll_event ee = {0}; /* avoid valgrind warning */
    /* If the fd was already monitored for some event, we need a MOD
     * operation. Otherwise we need an ADD operation. */
    int op = eventLoop->events[fd].mask == AE_NONE ?
            EPOLL_CTL_ADD : EPOLL_CTL_MOD;

    ee.events = 0;
    mask |= eventLoop->events[fd].mask; /* Merge old events */
    if (mask & AE_READABLE) ee.events |= EPOLLIN;
    if (mask & AE_WRITABLE) ee.events |= EPOLLOUT;
    ee.data.fd = fd;
    if (epoll_ctl(state->epfd,op,fd,&ee) == -1) return -1;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
leaq -0x2c(%rbp), %rdi
xorl %esi, %esi
movl $0xc, %edx
callq 0x10250
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %edx
movl $0x3, %eax
movl $0x1, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movl %eax, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x14(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movl (%rax), %eax
orl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x1a5ac
movl -0x2c(%rbp), %eax
orl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x18(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x1a5c0
movl -0x2c(%rbp), %eax
orl $0x4, %eax
movl %eax, -0x2c(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %edi
movl -0x30(%rbp), %esi
movl -0x14(%rbp), %edx
leaq -0x2c(%rbp), %rcx
callq 0x10290
cmpl $-0x1, %eax
jne 0x1a5e9
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1a5f0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)