LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hstrlenCommand
void hstrlenCommand(client *c) {
    robj *o;

    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL ||
        checkType(c,o,OBJ_HASH)) return;
    addReplyLongLong(c,hashTypeGetValueLength(o,c->argv[2]));
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xac8cb(%rip), %rax     # 0xfa310
movq 0x20(%rax), %rdx
callq 0x3aee5
testq %rax, %rax
je 0x4da68
movq %rax, %r14
pushq $0x4
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3a311
testl %eax, %eax
je 0x4da70
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0x4c8f7
movq %rbx, %rdi
movq %rax, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x370a6
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: genericHgetallCommand
void genericHgetallCommand(client *c, int flags) {
    robj *o;
    hashTypeIterator *hi;
    int multiplier = 0;
    int length, count = 0;

    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.emptymultibulk)) == NULL
        || checkType(c,o,OBJ_HASH)) return;

    if (flags & OBJ_HASH_KEY) multiplier++;
    if (flags & OBJ_HASH_VALUE) multiplier++;

    length = hashTypeLength(o) * multiplier;
    addReplyMultiBulkLen(c, length);

    hi = hashTypeInitIterator(o);
    while (hashTypeNext(hi) != C_ERR) {
        if (flags & OBJ_HASH_KEY) {
            addHashIteratorCursorToReply(c, hi, OBJ_HASH_KEY);
            count++;
        }
        if (flags & OBJ_HASH_VALUE) {
            addHashIteratorCursorToReply(c, hi, OBJ_HASH_VALUE);
            count++;
        }
    }

    hashTypeReleaseIterator(hi);
    serverAssert(count == length);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %r15d
movq %rdi, %r14
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xac85e(%rip), %rax     # 0xfa310
movq 0x68(%rax), %rdx
callq 0x3aee5
testq %rax, %rax
je 0x4db5e
movq %rax, %r12
pushq $0x4
popq %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x3a311
testl %eax, %eax
jne 0x4db5e
movl %r15d, %ebx
andl $0x1, %ebx
andl $0x2, %r15d
movl %r15d, %ebp
shrl %ebp
addl %ebx, %ebp
movq %r12, %rdi
callq 0x4cbe1
imull %ebp, %eax
movq %rax, (%rsp)
movslq %eax, %rsi
movq %r14, %rdi
callq 0x370d9
movq %r12, %rdi
callq 0x4cd29
movq %rax, %r12
xorl %ebp, %ebp
pushq $0x1
popq %r13
movq %r12, %rdi
callq 0x4cdb1
cmpl $-0x1, %eax
je 0x4db51
testl %ebx, %ebx
je 0x4db3a
movq %r14, %rdi
movq %r12, %rsi
movl %r13d, %edx
callq 0x4db8d
incl %ebp
testl %r15d, %r15d
je 0x4db19
movq %r14, %rdi
movq %r12, %rsi
pushq $0x2
popq %rdx
callq 0x4db8d
incl %ebp
jmp 0x4db19
movq %r12, %rdi
callq 0x4cd95
cmpl (%rsp), %ebp
jne 0x4db6d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x67541(%rip), %rdi     # 0xb50b5
leaq 0x67409(%rip), %rsi     # 0xb4f84
movl $0x303, %edx            # imm = 0x303
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: addHashIteratorCursorToReply
static void addHashIteratorCursorToReply(client *c, hashTypeIterator *hi, int what) {
    if (hi->encoding == OBJ_ENCODING_ZIPLIST) {
        unsigned char *vstr = NULL;
        unsigned int vlen = UINT_MAX;
        long long vll = LLONG_MAX;

        hashTypeCurrentFromZiplist(hi, what, &vstr, &vlen, &vll);
        if (vstr) {
            addReplyBulkCBuffer(c, vstr, vlen);
        } else {
            addReplyBulkLongLong(c, vll);
        }

    } else if (hi->encoding == OBJ_ENCODING_HT) {
        robj *value;

        hashTypeCurrentFromHashTable(hi, what, &value);
        addReplyBulk(c, value);

    } else {
        serverPanic("Unknown hash encoding");
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movl 0x8(%rsi), %eax
cmpl $0x2, %eax
je 0x4dbea
cmpl $0x5, %eax
jne 0x4dc1e
leaq 0x10(%rsp), %r14
andq $0x0, (%r14)
leaq 0x4(%rsp), %rcx
orl $-0x1, (%rcx)
movabsq $0x7fffffffffffffff, %rax # imm = 0x7FFFFFFFFFFFFFFF
leaq 0x8(%rsp), %r8
movq %rax, (%r8)
movq %rsi, %rdi
movl %edx, %esi
movq %r14, %rdx
callq 0x4ce9b
movq (%r14), %rsi
testq %rsi, %rsi
je 0x4dc09
movl 0x4(%rsp), %edx
movq %rbx, %rdi
callq 0x3716c
jmp 0x4dc16
leaq 0x10(%rsp), %r14
movq %rsi, %rdi
movl %edx, %esi
movq %r14, %rdx
callq 0x4cf20
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x36fd9
jmp 0x4dc16
movq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x37206
addq $0x18, %rsp
popq %rbx
popq %r14
retq
leaq 0x6651c(%rip), %rdi     # 0xb4141
leaq 0x67358(%rip), %rsi     # 0xb4f84
movl $0x2e3, %edx            # imm = 0x2E3
callq 0x57b45
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hexistsCommand
void hexistsCommand(client *c) {
    robj *o;
    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.czero)) == NULL ||
        checkType(c,o,OBJ_HASH)) return;

    addReply(c, hashTypeExists(o,c->argv[2]) ? shared.cone : shared.czero);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x8(%rax), %rsi
leaq 0xac6a3(%rip), %r15     # 0xfa310
movq 0x20(%r15), %rdx
callq 0x3aee5
testq %rax, %rax
je 0x4dc90
movq %rax, %r14
pushq $0x4
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3a311
testl %eax, %eax
je 0x4dc96
popq %rbx
popq %r14
popq %r15
retq
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
movq %r14, %rdi
callq 0x4c990
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movq 0x20(%r15,%rcx,8), %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x36987
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/t_hash.c
// Function: hscanCommand
void hscanCommand(client *c) {
    robj *o;
    unsigned long cursor;

    if (parseScanCursorOrReply(c,c->argv[2],&cursor) == C_ERR) return;
    if ((o = lookupKeyReadOrReply(c,c->argv[1],shared.emptyscan)) == NULL ||
        checkType(c,o,OBJ_HASH)) return;
    scanGenericCommand(c,o,cursor);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x40(%rdi), %rax
movq 0x10(%rax), %rsi
movq %rsp, %rdx
callq 0x3b897
cmpl $-0x1, %eax
je 0x4dd22
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rsi
leaq 0xac626(%rip), %rax     # 0xfa310
movq 0x148(%rax), %rdx
movq %rbx, %rdi
callq 0x3aee5
testq %rax, %rax
je 0x4dd22
movq %rax, %r14
pushq $0x4
popq %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3a311
testl %eax, %eax
jne 0x4dd22
movq (%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3b90d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: configEnumGetValue
int configEnumGetValue(configEnum *ce, char *name) {
    while(ce->name != NULL) {
        if (!strcasecmp(ce->name,name)) return ce->val;
        ce++;
    }
    return INT_MIN;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
addq $0x8, %rbx
movq -0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x4dd55
movq %r14, %rsi
callq 0x262f0
testl %eax, %eax
je 0x4dd5c
addq $0x10, %rbx
jmp 0x4dd3a
movl $0x80000000, %eax       # imm = 0x80000000
jmp 0x4dd5e
movl (%rbx), %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: appendServerSaveParams
void appendServerSaveParams(time_t seconds, int changes) {
    server.saveparams = zrealloc(server.saveparams,sizeof(struct saveparam)*(server.saveparamslen+1));
    server.saveparams[server.saveparamslen].seconds = seconds;
    server.saveparams[server.saveparamslen].changes = changes;
    server.saveparamslen++;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movl %esi, %ebx
movq %rdi, %r14
leaq 0xababb(%rip), %r15     # 0xf98a8
movq 0x738(%r15), %rdi
movslq 0x740(%r15), %rsi
shlq $0x4, %rsi
addq $0x10, %rsi
callq 0x32863
movq %rax, 0x738(%r15)
movslq 0x740(%r15), %rcx
leal 0x1(%rcx), %edx
shlq $0x4, %rcx
movq %r14, (%rax,%rcx)
movl %ebx, 0x8(%rax,%rcx)
movl %edx, 0x740(%r15)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: loadServerConfig
void loadServerConfig(char *filename, char *options) {
    sds config = sdsempty();
    char buf[CONFIG_MAX_LINE+1];

    /* Load the file content */
    if (filename) {
        FILE *fp;

        if (filename[0] == '-' && filename[1] == '\0') {
            fp = stdin;
        } else {
            if ((fp = fopen(filename,"r")) == NULL) {
                serverLog(LL_WARNING,
                    "Fatal error, can't open config file '%s'", filename);
                exit(1);
            }
        }
        while(fgets(buf,CONFIG_MAX_LINE+1,fp) != NULL)
            config = sdscat(config,buf);
        if (fp != stdin) fclose(fp);
    }
    /* Append the additional options */
    if (options) {
        config = sdscat(config,"\n");
        config = sdscat(config,options);
    }
    loadServerConfigFromString(config);
    sdsfree(config);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x408, %rsp            # imm = 0x408
movq %rsi, %rbx
movq %rdi, %r12
callq 0x3114c
movq %rax, %r14
testq %r12, %r12
je 0x4f516
cmpb $0x2d, (%r12)
jne 0x4f4bf
cmpb $0x0, 0x1(%r12)
je 0x4f557
leaq 0x621cf(%rip), %rsi     # 0xb1695
movq %r12, %rdi
callq 0x26ae0
movq %rax, %r15
testq %rax, %rax
je 0x4f566
movq %rsp, %r12
movq %r12, %rdi
movl $0x401, %esi            # imm = 0x401
movq %r15, %rdx
callq 0x26440
testq %rax, %rax
je 0x4f502
movq %r14, %rdi
movq %r12, %rsi
callq 0x317b7
movq %rax, %r14
jmp 0x4f4dd
movq 0xa5a6f(%rip), %rax     # 0xf4f78
cmpq (%rax), %r15
je 0x4f516
movq %r15, %rdi
callq 0x26a10
testq %rbx, %rbx
je 0x4f538
leaq 0x61897(%rip), %rsi     # 0xb0db9
movq %r14, %rdi
callq 0x317b7
movq %rax, %rdi
movq %rbx, %rsi
callq 0x317b7
movq %rax, %r14
movq %r14, %rdi
callq 0x4de57
movq %r14, %rdi
callq 0x311c8
addq $0x408, %rsp            # imm = 0x408
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0xa5a1a(%rip), %rax     # 0xf4f78
movq (%rax), %r15
jmp 0x4f4da
leaq 0x6684a(%rip), %rsi     # 0xb5db7
pushq $0x3
popq %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x2b699
pushq $0x1
popq %rdi
callq 0x262c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigAddLineNumberToOption
void rewriteConfigAddLineNumberToOption(struct rewriteConfigState *state, sds option, int linenum) {
    list *l = dictFetchValue(state->option_to_line,option);

    if (l == NULL) {
        l = listCreate();
        dictAdd(state->option_to_line,sdsdup(option),l);
    }
    listAddNodeTail(l,(void*)(long)linenum);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r12
movq (%rdi), %rdi
callq 0x2a900
movq %rax, %r14
testq %rax, %rax
jne 0x522e0
callq 0x26e0c
movq %rax, %r14
movq (%r12), %r12
movq %r15, %rdi
callq 0x3117b
movq %r12, %rdi
movq %rax, %rsi
movq %r14, %rdx
callq 0x2a3ed
movslq %ebx, %rsi
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x26ecc
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigRewriteLine
void rewriteConfigRewriteLine(struct rewriteConfigState *state, const char *option, sds line, int force) {
    sds o = sdsnew(option);
    list *l = dictFetchValue(state->option_to_line,o);

    rewriteConfigMarkAsProcessed(state,option);

    if (!l && !force) {
        /* Option not used previously, and we are not forced to use it. */
        sdsfree(line);
        sdsfree(o);
        return;
    }

    if (l) {
        listNode *ln = listFirst(l);
        int linenum = (long) ln->value;

        /* There are still lines in the old configuration file we can reuse
         * for this option. Replace the line with the new one. */
        listDelNode(l,ln);
        if (listLength(l) == 0) dictDelete(state->option_to_line,o);
        sdsfree(state->lines[linenum]);
        state->lines[linenum] = line;
    } else {
        /* Append a new line. */
        if (!state->has_tail) {
            rewriteConfigAppendLine(state,
                sdsnew(REDIS_CONFIG_REWRITE_SIGNATURE));
            state->has_tail = 1;
        }
        rewriteConfigAppendLine(state,line);
    }
    sdsfree(o);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r15
movq %rsi, %rdi
callq 0x3115a
movq %rax, %rbx
movq (%r15), %rdi
movq %rax, %rsi
callq 0x2a900
movq %rax, %r12
movq %r15, %rdi
movq %r13, %rsi
callq 0x522f6
testq %r12, %r12
setne %al
testl %ebp, %ebp
setne %cl
orb %al, %cl
je 0x52559
testq %r12, %r12
je 0x52563
movq (%r12), %rsi
movq 0x10(%rsi), %r13
movq %r12, %rdi
callq 0x26fa8
cmpq $0x0, 0x28(%r12)
jne 0x5253f
movq (%r15), %rdi
movq %rbx, %rsi
callq 0x2a6dc
movq 0x18(%r15), %rax
movslq %r13d, %r12
movq (%rax,%r12,8), %rdi
callq 0x311c8
movq 0x18(%r15), %rax
movq %r14, (%rax,%r12,8)
jmp 0x52594
movq %r14, %rdi
callq 0x311c8
jmp 0x52594
cmpl $0x0, 0x20(%r15)
jne 0x52589
leaq 0x63ae2(%rip), %rdi     # 0xb6053
callq 0x3115a
movq %r15, %rdi
movq %rax, %rsi
callq 0x52264
movl $0x1, 0x20(%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x52264
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x311c8
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigFormatMemory
int rewriteConfigFormatMemory(char *buf, size_t len, long long bytes) {
    int gb = 1024*1024*1024;
    int mb = 1024*1024;
    int kb = 1024;

    if (bytes && (bytes % gb) == 0) {
        return snprintf(buf,len,"%lldgb",bytes/gb);
    } else if (bytes && (bytes % mb) == 0) {
        return snprintf(buf,len,"%lldmb",bytes/mb);
    } else if (bytes && (bytes % kb) == 0) {
        return snprintf(buf,len,"%lldkb",bytes/kb);
    } else {
        return snprintf(buf,len,"%lld",bytes);
    }
}

// Assembly:
movq %rdx, %rcx
testq %rdx, %rdx
sete %al
testl $0x3fffffff, %ecx       # imm = 0x3FFFFFFF
setne %dl
orb %al, %dl
jne 0x525cd
sarq $0x1e, %rcx
leaq 0x63aad(%rip), %rdx     # 0xb6078
jmp 0x52613
testq %rcx, %rcx
sete %al
testl $0xfffff, %ecx          # imm = 0xFFFFF
setne %dl
orb %al, %dl
jne 0x525ed
sarq $0x14, %rcx
leaq 0x63a94(%rip), %rdx     # 0xb607f
jmp 0x52613
testq %rcx, %rcx
sete %al
testw $0x3ff, %cx             # imm = 0x3FF
setne %dl
orb %al, %dl
jne 0x5260c
sarq $0xa, %rcx
leaq 0x63a7c(%rip), %rdx     # 0xb6086
jmp 0x52613
leaq 0x677dd(%rip), %rdx     # 0xb9df0
xorl %eax, %eax
jmp 0x26120
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigBytesOption
void rewriteConfigBytesOption(struct rewriteConfigState *state, char *option, long long value, long long defvalue) {
    char buf[64];
    int force = value != defvalue;
    sds line;

    rewriteConfigFormatMemory(buf,sizeof(buf),value);
    line = sdscatprintf(sdsempty(),"%s %s",option,buf);
    rewriteConfigRewriteLine(state,option,line,force);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movq %rsi, %rbx
movq %rdi, %r14
xorl %ebp, %ebp
cmpq %rcx, %rdx
setne %bpl
movq %rsp, %r15
pushq $0x40
popq %rsi
movq %r15, %rdi
callq 0x525aa
callq 0x3114c
leaq 0x6b9bf(%rip), %rsi     # 0xbe00c
movq %rax, %rdi
movq %rbx, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x31a38
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq 0x524ce
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigYesNoOption
void rewriteConfigYesNoOption(struct rewriteConfigState *state, char *option, int value, int defvalue) {
    int force = value != defvalue;
    sds line = sdscatprintf(sdsempty(),"%s %s",option,
        value ? "yes" : "no");

    rewriteConfigRewriteLine(state,option,line,force);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
xorl %ebp, %ebp
cmpl %ecx, %edx
setne %bpl
callq 0x3114c
testl %ebx, %ebx
leaq 0x68d41(%rip), %rdx     # 0xbb3de
leaq 0x5f615(%rip), %rcx     # 0xb1cb9
cmoveq %rdx, %rcx
leaq 0x6b95d(%rip), %rsi     # 0xbe00c
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x31a38
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
movl %ebp, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x524ce
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigStringOption
void rewriteConfigStringOption(struct rewriteConfigState *state, char *option, char *value, char *defvalue) {
    int force = 1;
    sds line;

    /* String options set to NULL need to be not present at all in the
     * configuration file to be set to NULL again at the next reboot. */
    if (value == NULL) {
        rewriteConfigMarkAsProcessed(state,option);
        return;
    }

    /* Set force to zero if the value is set to its default. */
    if (defvalue && strcmp(value,defvalue) == 0) force = 0;

    line = sdsnew(option);
    line = sdscatlen(line, " ", 1);
    line = sdscatrepr(line, value, strlen(value));

    rewriteConfigRewriteLine(state,option,line,force);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
testq %rdx, %rdx
je 0x52706
movq %rdx, %r15
testq %rcx, %rcx
je 0x52719
movq %r15, %rdi
movq %rcx, %rsi
callq 0x268f0
xorl %ebp, %ebp
testl %eax, %eax
setne %bpl
jmp 0x5271c
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x522f6
pushq $0x1
popq %rbp
movq %rbx, %rdi
callq 0x3115a
leaq 0x63926(%rip), %rsi     # 0xb6051
pushq $0x1
popq %rdx
movq %rax, %rdi
callq 0x31758
movq %rax, %r12
movq %r15, %rdi
callq 0x26500
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x321f1
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
movl %ebp, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x524ce
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigEnumOption
void rewriteConfigEnumOption(struct rewriteConfigState *state, char *option, int value, configEnum *ce, int defval) {
    sds line;
    const char *name = configEnumGetNameOrUnknown(ce,value);
    int force = value != defval;

    line = sdscatprintf(sdsempty(),"%s %s",option,name);
    rewriteConfigRewriteLine(state,option,line,force);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movq %rcx, %rdi
movl %edx, %esi
callq 0x4dd7b
movq %rax, %r12
xorl %r13d, %r13d
cmpl %ebx, %ebp
setne %r13b
callq 0x3114c
leaq 0x6b7d2(%rip), %rsi     # 0xbe00c
movq %rax, %rdi
movq %r14, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x31a38
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
movl %r13d, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x524ce
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigSyslogfacilityOption
void rewriteConfigSyslogfacilityOption(struct rewriteConfigState *state) {
    int value = server.syslog_facility;
    int force = value != LOG_LOCAL0;
    const char *name = NULL, *option = "syslog-facility";
    sds line;

    name = configEnumGetNameOrUnknown(syslog_facility_enum,value);
    line = sdscatprintf(sdsempty(),"%s %s",option,name);
    rewriteConfigRewriteLine(state,option,line,force);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa702e(%rip), %rax     # 0xf98a8
movl 0x7b8(%rax), %esi
xorl %ebp, %ebp
cmpl $0x80, %esi
setne %bpl
leaq 0xa67dd(%rip), %rdi     # 0xf9070
callq 0x4dd7b
movq %rax, %r14
callq 0x3114c
leaq 0x6b765(%rip), %rsi     # 0xbe00c
leaq 0x62abf(%rip), %r15     # 0xb536d
movq %rax, %rdi
movq %r15, %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x31a38
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
movl %ebp, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x524ce
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigSaveOption
void rewriteConfigSaveOption(struct rewriteConfigState *state) {
    int j;
    sds line;

    /* Note that if there are no save parameters at all, all the current
     * config line with "save" will be detected as orphaned and deleted,
     * resulting into no RDB persistence as expected. */
    for (j = 0; j < server.saveparamslen; j++) {
        line = sdscatprintf(sdsempty(),"save %ld %d",
            (long) server.saveparams[j].seconds, server.saveparams[j].changes);
        rewriteConfigRewriteLine(state,"save",line,1);
    }
    /* Mark "save" as processed in case server.saveparamslen is zero. */
    rewriteConfigMarkAsProcessed(state,"save");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x8
popq %r12
leaq 0xa6fb7(%rip), %r13     # 0xf98a8
leaq 0x61985(%rip), %r15     # 0xb427d
pushq $0x1
popq %rbp
xorl %r14d, %r14d
movslq 0x740(%r13), %rax
cmpq %rax, %r14
jge 0x52949
callq 0x3114c
movq 0x738(%r13), %rcx
movq -0x8(%rcx,%r12), %rdx
movl (%rcx,%r12), %ecx
movq %rax, %rdi
leaq 0x63772(%rip), %rsi     # 0xb609b
xorl %eax, %eax
callq 0x31a38
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
movl %ebp, %ecx
callq 0x524ce
incq %r14
addq $0x10, %r12
jmp 0x528fe
leaq 0x6192d(%rip), %rsi     # 0xb427d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x522f6
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigDirOption
void rewriteConfigDirOption(struct rewriteConfigState *state) {
    char cwd[1024];

    if (getcwd(cwd,sizeof(cwd)) == NULL) {
        rewriteConfigMarkAsProcessed(state,"dir");
        return; /* no rewrite on error. */
    }
    rewriteConfigStringOption(state,"dir",cwd,NULL);
}

// Assembly:
pushq %rbx
subq $0x400, %rsp            # imm = 0x400
movq %rdi, %rbx
movq %rsp, %rdi
movl $0x400, %esi            # imm = 0x400
callq 0x26910
leaq 0x62941(%rip), %rsi     # 0xb52c6
testq %rax, %rax
je 0x52999
movq %rsp, %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x526d6
jmp 0x529a1
movq %rbx, %rdi
callq 0x522f6
addq $0x400, %rsp            # imm = 0x400
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigSlaveofOption
void rewriteConfigSlaveofOption(struct rewriteConfigState *state) {
    char *option = "slaveof";
    sds line;

    /* If this is a master, we want all the slaveof config options
     * in the file to be removed. Note that if this is a cluster instance
     * we don't want a slaveof directive inside redis.conf. */
    if (server.cluster_enabled || server.masterhost == NULL) {
        rewriteConfigMarkAsProcessed(state,"slaveof");
        return;
    }
    line = sdscatprintf(sdsempty(),"%s %s %d", option,
        server.masterhost, server.masterport);
    rewriteConfigRewriteLine(state,option,line,1);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa6ef0(%rip), %r14     # 0xf98a8
cmpl $0x0, 0x99c(%r14)
jne 0x52a12
cmpq $0x0, 0x828(%r14)
je 0x52a12
callq 0x3114c
movq 0x828(%r14), %rcx
movl 0x830(%r14), %r8d
leaq 0x6a54c(%rip), %rsi     # 0xbcf32
leaq 0x5bda4(%rip), %r14     # 0xae791
movq %rax, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x31a38
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x524ce
leaq 0x5bd78(%rip), %rsi     # 0xae791
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x522f6
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigNotifykeyspaceeventsOption
void rewriteConfigNotifykeyspaceeventsOption(struct rewriteConfigState *state) {
    int force = server.notify_keyspace_events != 0;
    char *option = "notify-keyspace-events";
    sds line, flags;

    flags = keyspaceEventsFlagsToString(server.notify_keyspace_events);
    line = sdsnew(option);
    line = sdscatlen(line, " ", 1);
    line = sdscatrepr(line, flags, sdslen(flags));
    sdsfree(flags);
    rewriteConfigRewriteLine(state,option,line,force);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0xa6e6e(%rip), %rax     # 0xf98a8
movl 0x998(%rax), %edi
xorl %ebp, %ebp
testl %edi, %edi
setne %bpl
callq 0x6fa4f
movq %rax, %r15
leaq 0x631d8(%rip), %r14     # 0xb5c2f
movq %r14, %rdi
callq 0x3115a
leaq 0x635eb(%rip), %rsi     # 0xb6051
pushq $0x1
popq %rdx
movq %rax, %rdi
callq 0x31758
movq %rax, %r12
movq %r15, %rdi
callq 0x4f582
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x321f1
movq %rax, %r12
movq %r15, %rdi
callq 0x311c8
movq %rbx, %rdi
movq %r14, %rsi
movq %r12, %rdx
movl %ebp, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x524ce
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigClientoutputbufferlimitOption
void rewriteConfigClientoutputbufferlimitOption(struct rewriteConfigState *state) {
    int j;
    char *option = "client-output-buffer-limit";

    for (j = 0; j < CLIENT_TYPE_OBUF_COUNT; j++) {
        int force = (server.client_obuf_limits[j].hard_limit_bytes !=
                    clientBufferLimitsDefaults[j].hard_limit_bytes) ||
                    (server.client_obuf_limits[j].soft_limit_bytes !=
                    clientBufferLimitsDefaults[j].soft_limit_bytes) ||
                    (server.client_obuf_limits[j].soft_limit_seconds !=
                    clientBufferLimitsDefaults[j].soft_limit_seconds);
        sds line;
        char hard[64], soft[64];

        rewriteConfigFormatMemory(hard,sizeof(hard),
                server.client_obuf_limits[j].hard_limit_bytes);
        rewriteConfigFormatMemory(soft,sizeof(soft),
                server.client_obuf_limits[j].soft_limit_bytes);

        line = sdscatprintf(sdsempty(),"%s %s %s %s %ld",
                option, getClientTypeName(j), hard, soft,
                (long) server.client_obuf_limits[j].soft_limit_seconds);
        rewriteConfigRewriteLine(state,option,line,force);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdi, 0x8(%rsp)
leaq 0xa6726(%rip), %rbp     # 0xf91f0
xorl %r12d, %r12d
xorl %r13d, %r13d
cmpq $0x3, %r13
je 0x52b9e
leaq 0xa6dc7(%rip), %r14     # 0xf98a8
movq 0x620(%r14,%r12), %rdx
pushq $0x1
popq %rbx
cmpq (%r12,%rbp), %rdx
jne 0x52b13
movq 0x628(%r14,%r12), %rax
cmpq 0x8(%r12,%rbp), %rax
jne 0x52b13
movq 0x630(%r14,%r12), %rax
xorl %ebx, %ebx
cmpq 0x10(%r12,%rbp), %rax
setne %bl
leaq 0x50(%rsp), %rdi
pushq $0x40
popq %r15
movq %r15, %rsi
callq 0x525aa
movq 0x628(%r14,%r12), %rdx
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x525aa
callq 0x3114c
movq %r14, %r15
movq %rax, %r14
movl %r13d, %edi
callq 0x39128
movq 0x630(%r15,%r12), %rcx
movq %rcx, (%rsp)
movq %r14, %rdi
leaq 0x63545(%rip), %rsi     # 0xb60a7
leaq 0x62f46(%rip), %r14     # 0xb5aaf
movq %r14, %rdx
movq %rax, %rcx
leaq 0x50(%rsp), %r8
leaq 0x10(%rsp), %r9
xorl %eax, %eax
callq 0x31a38
movq 0x8(%rsp), %rdi
movq %r14, %rsi
movq %rax, %rdx
movl %ebx, %ecx
callq 0x524ce
incq %r13
addq $0x18, %r12
jmp 0x52ad0
addq $0x98, %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/config.c
// Function: rewriteConfigBindOption
void rewriteConfigBindOption(struct rewriteConfigState *state) {
    int force = 1;
    sds line, addresses;
    char *option = "bind";

    /* Nothing to rewrite if we don't have bind addresses. */
    if (server.bindaddr_count == 0) {
        rewriteConfigMarkAsProcessed(state,option);
        return;
    }

    /* Rewrite as bind <addr1> <addr2> ... <addrN> */
    addresses = sdsjoin(server.bindaddr,server.bindaddr_count," ");
    line = sdsnew(option);
    line = sdscatlen(line, " ", 1);
    line = sdscatsds(line, addresses);
    sdsfree(addresses);

    rewriteConfigRewriteLine(state,option,line,force);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0xa6ce6(%rip), %rax     # 0xf98a8
movl 0x128(%rax), %esi
testl %esi, %esi
je 0x52c39
movl $0xa8, %edi
addq 0xa23e0(%rip), %rdi     # 0xf4fb8
leaq 0x63472(%rip), %r14     # 0xb6051
movq %r14, %rdx
callq 0x326ed
movq %rax, %r15
leaq 0x62667(%rip), %r12     # 0xb5258
movq %r12, %rdi
callq 0x3115a
pushq $0x1
popq %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x31758
movq %rax, %rdi
movq %r15, %rsi
callq 0x317de
movq %rax, %r14
movq %r15, %rdi
callq 0x311c8
pushq $0x1
popq %rcx
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x524ce
leaq 0x62618(%rip), %rsi     # 0xb5258
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x522f6
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigGetContentFromState
sds rewriteConfigGetContentFromState(struct rewriteConfigState *state) {
    sds content = sdsempty();
    int j, was_empty = 0;

    for (j = 0; j < state->numlines; j++) {
        /* Every cluster of empty lines is turned into a single empty line. */
        if (sdslen(state->lines[j]) == 0) {
            if (was_empty) continue;
            was_empty = 1;
        } else {
            was_empty = 0;
        }
        content = sdscatsds(content,state->lines[j]);
        content = sdscatlen(content,"\n",1);
    }
    return content;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %ebp, %ebp
callq 0x3114c
movq %rax, %r12
xorl %r15d, %r15d
movslq 0x10(%rbx), %rax
cmpq %rax, %rbp
jge 0x52cc2
movq 0x18(%rbx), %rax
movq (%rax,%rbp,8), %r13
movq %r13, %rdi
callq 0x4f582
xorl %r14d, %r14d
testq %rax, %rax
je 0x52cb1
movq %r12, %rdi
movq %r13, %rsi
callq 0x317de
movq %rax, %rdi
leaq 0x5e115(%rip), %rsi     # 0xb0db9
pushq $0x1
popq %rdx
callq 0x31758
movq %rax, %r12
jmp 0x52cba
pushq $0x1
popq %r14
testl %r15d, %r15d
je 0x52c8f
incq %rbp
movl %r14d, %r15d
jmp 0x52c6e
movq %r12, %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/config.c
// Function: rewriteConfigReleaseState
void rewriteConfigReleaseState(struct rewriteConfigState *state) {
    sdsfreesplitres(state->lines,state->numlines);
    dictRelease(state->option_to_line);
    dictRelease(state->rewritten);
    zfree(state);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rdi), %rdi
movl 0x10(%rbx), %esi
callq 0x321be
movq (%rbx), %rdi
callq 0x2a8da
movq 0x8(%rbx), %rdi
callq 0x2a8da
movq %rbx, %rdi
popq %rbx
jmp 0x328f9
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigRemoveOrphaned
void rewriteConfigRemoveOrphaned(struct rewriteConfigState *state) {
    dictIterator *di = dictGetIterator(state->option_to_line);
    dictEntry *de;

    while((de = dictNext(di)) != NULL) {
        list *l = dictGetVal(de);
        sds option = dictGetKey(de);

        /* Don't blank lines about options the rewrite process
         * don't understand. */
        if (dictFind(state->rewritten,option) == NULL) {
            serverLog(LL_DEBUG,"Not rewritten option: %s", option);
            continue;
        }

        while(listLength(l)) {
            listNode *ln = listFirst(l);
            int linenum = (long) ln->value;

            sdsfree(state->lines[linenum]);
            state->lines[linenum] = sdsempty();
            listDelNode(l,ln);
        }
    }
    dictReleaseIterator(di);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
callq 0x2a99f
movq %rax, %r14
leaq 0x63399(%rip), %r15     # 0xb60b7
movq %r14, %rdi
callq 0x2a9d3
testq %rax, %rax
je 0x52d8b
movq (%rax), %r13
movq 0x8(%rax), %r12
movq 0x8(%rbx), %rdi
movq %r13, %rsi
callq 0x2a5f9
testq %rax, %rax
jne 0x52d81
xorl %edi, %edi
movq %r15, %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x2b699
jmp 0x52d1e
movq (%r12), %r13
movslq 0x10(%r13), %rbp
movq 0x18(%rbx), %rax
movq (%rax,%rbp,8), %rdi
callq 0x311c8
callq 0x3114c
movq 0x18(%rbx), %rcx
movq %rax, (%rcx,%rbp,8)
movq %r12, %rdi
movq %r13, %rsi
callq 0x26fa8
cmpq $0x0, 0x28(%r12)
jne 0x52d54
jmp 0x52d1e
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2aa94
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/config.c
// Function: rewriteConfigOverwriteFile
int rewriteConfigOverwriteFile(char *configfile, sds content) {
    int retval = 0;
    int fd = open(configfile,O_RDWR|O_CREAT,0644);
    int content_size = sdslen(content), padding = 0;
    struct stat sb;
    sds content_padded;

    /* 1) Open the old file (or create a new one if it does not
     *    exist), get the size. */
    if (fd == -1) return -1; /* errno set by open(). */
    if (fstat(fd,&sb) == -1) {
        close(fd);
        return -1; /* errno set by fstat(). */
    }

    /* 2) Pad the content at least match the old file size. */
    content_padded = sdsdup(content);
    if (content_size < sb.st_size) {
        /* If the old file was bigger, pad the content with
         * a newline plus as many "#" chars as required. */
        padding = sb.st_size - content_size;
        content_padded = sdsgrowzero(content_padded,sb.st_size);
        content_padded[content_size] = '\n';
        memset(content_padded+content_size+1,'#',padding-1);
    }

    /* 3) Write the new content using a single write(2). */
    if (write(fd,content_padded,strlen(content_padded)) == -1) {
        retval = -1;
        goto cleanup;
    }

    /* 4) Truncate the file to the right length if we used padding. */
    if (padding) {
        if (ftruncate(fd,content_size) == -1) {
            /* Non critical error... */
        }
    }

cleanup:
    sdsfree(content_padded);
    close(fd);
    return retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
pushq $0x42
popq %rsi
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x26690
movl %eax, %ebx
movq %r14, %rdi
callq 0x4f582
cmpl $-0x1, %ebx
je 0x52e6a
movq %rax, %r12
leaq 0x8(%rsp), %rsi
movl %ebx, %edi
callq 0x266e0
cmpl $-0x1, %eax
je 0x52e6f
movq %r14, %rdi
callq 0x3117b
movq %rax, %r14
movslq %r12d, %r15
movq 0x38(%rsp), %rsi
movb $0x1, %r13b
cmpq %rsi, %r15
jge 0x52e3c
movl %esi, %r13d
subl %r12d, %r13d
movq %r14, %rdi
callq 0x316f6
movq %rax, %r14
leaq (%rax,%r15), %rdi
incq %rdi
movb $0xa, -0x1(%rdi)
leal -0x1(%r13), %eax
movslq %eax, %rdx
pushq $0x23
popq %rsi
callq 0x26110
testl %r13d, %r13d
sete %r13b
movq %r14, %rdi
callq 0x26500
movl %ebx, %edi
movq %r14, %rsi
movq %rax, %rdx
callq 0x26bb0
xorl %ebp, %ebp
cmpq $-0x1, %rax
sete %al
orb %al, %r13b
testb $0x1, %r13b
je 0x52e74
movb %al, %bpl
negl %ebp
jmp 0x52e80
pushq $-0x1
popq %rbp
jmp 0x52e8f
pushq $-0x1
popq %rbp
jmp 0x52e88
movl %ebx, %edi
movq %r15, %rsi
callq 0x26730
xorl %ebp, %ebp
movq %r14, %rdi
callq 0x311c8
movl %ebx, %edi
callq 0x26180
movl %ebp, %eax
addq $0x98, %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/aof.c
// Function: aofRewriteBufferReset
void aofRewriteBufferReset(void) {
    if (server.aof_rewrite_buf_blocks)
        listRelease(server.aof_rewrite_buf_blocks);

    server.aof_rewrite_buf_blocks = listCreate();
    listSetFreeMethod(server.aof_rewrite_buf_blocks,zfree);
}

// Assembly:
pushq %rbx
leaq 0xa6108(%rip), %rbx     # 0xf98a8
movq 0x6a0(%rbx), %rdi
testq %rdi, %rdi
je 0x537b1
callq 0x26e2a
callq 0x26e0c
movq %rax, 0x6a0(%rbx)
leaq -0x20ecb(%rip), %rcx    # 0x328f9
movq %rcx, 0x18(%rax)
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/aof.c
// Function: aofRewriteBufferSize
unsigned long aofRewriteBufferSize(void) {
    listNode *ln;
    listIter li;
    unsigned long size = 0;

    listRewind(server.aof_rewrite_buf_blocks,&li);
    while((ln = listNext(&li))) {
        aofrwblock *block = listNodeValue(ln);
        size += block->used;
    }
    return size;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0xa60d0(%rip), %rax     # 0xf98a8
movq 0x6a0(%rax), %rdi
leaq 0x8(%rsp), %rbx
movq %rbx, %rsi
callq 0x2702c
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0x27046
testq %rax, %rax
je 0x53805
movq 0x10(%rax), %rax
addq (%rax), %r14
jmp 0x537ef
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/aof.c
// Function: aofChildWriteDiffData
void aofChildWriteDiffData(aeEventLoop *el, int fd, void *privdata, int mask) {
    listNode *ln;
    aofrwblock *block;
    ssize_t nwritten;
    UNUSED(el);
    UNUSED(fd);
    UNUSED(privdata);
    UNUSED(mask);

    while(1) {
        ln = listFirst(server.aof_rewrite_buf_blocks);
        block = ln ? ln->value : NULL;
        if (server.aof_stop_sending_diff || !block) {
            aeDeleteFileEvent(server.el,server.aof_pipe_write_data_to_child,
                              AE_WRITABLE);
            return;
        }
        if (block->used > 0) {
            nwritten = write(server.aof_pipe_write_data_to_child,
                             block->buf,block->used);
            if (nwritten <= 0) return;
            memmove(block->buf,block->buf+nwritten,block->used-nwritten);
            block->used -= nwritten;
            block->free += nwritten;
        }
        if (block->used == 0) listDelNode(server.aof_rewrite_buf_blocks,ln);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0xa6086(%rip), %r12     # 0xf98a8
movq 0x6a0(%r12), %rdi
movq (%rdi), %rbx
testq %rbx, %rbx
je 0x53838
movq 0x10(%rbx), %r13
jmp 0x5383b
xorl %r13d, %r13d
cmpl $0x0, 0x710(%r12)
jne 0x538a8
testq %r13, %r13
je 0x538a8
movq (%r13), %rdx
testq %rdx, %rdx
je 0x5389b
movl 0x6f8(%r12), %edi
leaq 0x10(%r13), %r14
movq %r14, %rsi
callq 0x26bb0
testq %rax, %rax
jle 0x538cb
movq %rax, %r15
leaq (%r14,%rax), %rsi
movq (%r13), %rbp
movq %rbp, %rdx
subq %rax, %rdx
movq %r14, %rdi
callq 0x267e0
addq %r15, 0x8(%r13)
subq %r15, %rbp
movq %rbp, (%r13)
jne 0x53822
movq 0x6a0(%r12), %rdi
movq %rbx, %rsi
callq 0x26fa8
jmp 0x53822
movq 0x40(%r12), %rdi
movl 0x6f8(%r12), %esi
pushq $0x2
popq %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x28ba8
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/aof.c
// Function: aofRewriteBufferWrite
ssize_t aofRewriteBufferWrite(int fd) {
    listNode *ln;
    listIter li;
    ssize_t count = 0;

    listRewind(server.aof_rewrite_buf_blocks,&li);
    while((ln = listNext(&li))) {
        aofrwblock *block = listNodeValue(ln);
        ssize_t nwritten;

        if (block->used) {
            nwritten = write(fd,block->buf,block->used);
            if (nwritten != (ssize_t)block->used) {
                if (nwritten == 0) errno = EIO;
                return -1;
            }
            count += nwritten;
        }
    }
    return count;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %edi, %ebp
leaq 0xa5e66(%rip), %rax     # 0xf98a8
movq 0x6a0(%rax), %rdi
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x2702c
xorl %ebx, %ebx
movq %r14, %rdi
callq 0x27046
testq %rax, %rax
je 0x53a99
movq 0x10(%rax), %r15
movq (%r15), %rdx
testq %rdx, %rdx
je 0x53a58
leaq 0x10(%r15), %rsi
movl %ebp, %edi
callq 0x26bb0
cmpq (%r15), %rax
jne 0x53a86
addq %rax, %rbx
jmp 0x53a58
pushq $-0x1
popq %rbx
testq %rax, %rax
jne 0x53a99
callq 0x26880
movl $0x5, (%rax)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/aof.c
// Function: stopAppendOnly
void stopAppendOnly(void) {
    serverAssert(server.aof_state != AOF_OFF);
    flushAppendOnlyFile(1);
    aof_fsync(server.aof_fd);
    close(server.aof_fd);

    server.aof_fd = -1;
    server.aof_selected_db = -1;
    server.aof_state = AOF_OFF;
    /* rewrite operation in progress? kill it, wait child exit */
    if (server.aof_child_pid != -1) {
        int statloc;

        serverLog(LL_NOTICE,"Killing running AOF rewrite child: %ld",
            (long) server.aof_child_pid);
        if (kill(server.aof_child_pid,SIGUSR1) != -1) {
            while(wait3(&statloc,0,NULL) != server.aof_child_pid);
        }
        /* reset the buffer accumulating changes while the child saves */
        aofRewriteBufferReset();
        aofRemoveTempFile(server.aof_child_pid);
        server.aof_child_pid = -1;
        server.aof_rewrite_time_start = -1;
        /* close pipes used for IPC between the two processes. */
        aofClosePipes();
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
leaq 0xa5de7(%rip), %r14     # 0xf98a8
cmpl $0x0, 0x668(%r14)
je 0x53b79
pushq $0x1
popq %rdi
callq 0x53b99
movl 0x6b0(%r14), %edi
callq 0x26570
movl 0x6b0(%r14), %edi
callq 0x26180
orq $-0x1, 0x6b0(%r14)
andl $0x0, 0x668(%r14)
movslq 0x69c(%r14), %rdx
cmpq $-0x1, %rdx
je 0x53b71
leaq 0x6275a(%rip), %rsi     # 0xb626d
pushq $0x2
popq %rdi
xorl %eax, %eax
callq 0x2b699
movl 0x69c(%r14), %edi
pushq $0xa
popq %rsi
callq 0x26660
cmpl $-0x1, %eax
je 0x53b4b
leaq 0x4(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x26870
cmpl 0x69c(%r14), %eax
jne 0x53b36
callq 0x53798
movl 0x69c(%r14), %edi
callq 0x5402e
orl $-0x1, 0x69c(%r14)
orq $-0x1, 0x6d0(%r14)
callq 0x54062
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x626cb(%rip), %rdi     # 0xb624b
leaq 0x626e0(%rip), %rsi     # 0xb6267
movl $0xd1, %edx
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/aof.c
// Function: aofClosePipes
void aofClosePipes(void) {
    aeDeleteFileEvent(server.el,server.aof_pipe_read_ack_from_child,AE_READABLE);
    aeDeleteFileEvent(server.el,server.aof_pipe_write_data_to_child,AE_WRITABLE);
    close(server.aof_pipe_write_data_to_child);
    close(server.aof_pipe_read_data_from_parent);
    close(server.aof_pipe_write_ack_to_parent);
    close(server.aof_pipe_read_ack_from_child);
    close(server.aof_pipe_write_ack_to_child);
    close(server.aof_pipe_read_ack_from_parent);
}

// Assembly:
pushq %rbx
leaq 0xa583e(%rip), %rbx     # 0xf98a8
movq 0x40(%rbx), %rdi
movl 0x704(%rbx), %esi
pushq $0x1
popq %rdx
callq 0x28ba8
movq 0x40(%rbx), %rdi
movl 0x6f8(%rbx), %esi
pushq $0x2
popq %rdx
callq 0x28ba8
movl 0x6f8(%rbx), %edi
callq 0x26180
movl 0x6fc(%rbx), %edi
callq 0x26180
movl 0x700(%rbx), %edi
callq 0x26180
movl 0x704(%rbx), %edi
callq 0x26180
movl 0x708(%rbx), %edi
callq 0x26180
movl 0x70c(%rbx), %edi
popq %rbx
jmp 0x26180
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/aof.c
// Function: startAppendOnly
int startAppendOnly(void) {
    char cwd[MAXPATHLEN]; /* Current working dir path for error messages. */

    server.aof_last_fsync = server.unixtime;
    server.aof_fd = open(server.aof_filename,O_WRONLY|O_APPEND|O_CREAT,0644);
    serverAssert(server.aof_state == AOF_OFF);
    if (server.aof_fd == -1) {
        char *cwdp = getcwd(cwd,MAXPATHLEN);

        serverLog(LL_WARNING,
            "Redis needs to enable the AOF but can't open the "
            "append only file %s (in server root dir %s): %s",
            server.aof_filename,
            cwdp ? cwdp : "unknown",
            strerror(errno));
        return C_ERR;
    }
    if (server.rdb_child_pid != -1) {
        server.aof_rewrite_scheduled = 1;
        serverLog(LL_WARNING,"AOF was enabled but there is already a child process saving an RDB file on disk. An AOF background was scheduled to start when possible.");
    } else if (rewriteAppendOnlyFileBackground() == C_ERR) {
        close(server.aof_fd);
        serverLog(LL_WARNING,"Redis needs to enable the AOF but can't trigger a background AOF rewrite operation. Check the above logs for more info about the error.");
        return C_ERR;
    }
    /* We correctly switched on AOF, now wait for the rewrite to be complete
     * in order to append data on disk. */
    server.aof_state = AOF_WAIT_REWRITE;
    return C_OK;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1008, %rsp           # imm = 0x1008
leaq 0xa57c6(%rip), %rbx     # 0xf98a8
movq 0x978(%rbx), %rax
movq %rax, 0x6c0(%rbx)
movq 0x670(%rbx), %rdi
movl $0x441, %esi            # imm = 0x441
movl $0x1a4, %edx            # imm = 0x1A4
xorl %eax, %eax
callq 0x26690
movl %eax, 0x6b0(%rbx)
cmpl $0x0, 0x668(%rbx)
jne 0x541d2
cmpl $-0x1, %eax
je 0x54146
cmpl $-0x1, 0x730(%rbx)
je 0x54193
movl $0x1, 0x698(%rbx)
leaq 0x621d7(%rip), %rsi     # 0xb6311
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x2b699
jmp 0x5419d
movq %rsp, %rdi
movl $0x1000, %esi           # imm = 0x1000
callq 0x26910
movq 0x670(%rbx), %rbx
testq %rax, %rax
leaq 0x5e557(%rip), %r14     # 0xb26bb
cmovneq %rax, %r14
callq 0x26880
movl (%rax), %edi
callq 0x26680
leaq 0x62135(%rip), %rsi     # 0xb62b0
pushq $0x3
popq %rdi
movq %rbx, %rdx
movq %r14, %rcx
movq %rax, %r8
xorl %eax, %eax
callq 0x2b699
pushq $-0x1
popq %rax
jmp 0x541a9
callq 0x541f2
cmpl $-0x1, %eax
je 0x541b4
movl $0x2, 0x668(%rbx)
xorl %eax, %eax
addq $0x1008, %rsp           # imm = 0x1008
popq %rbx
popq %r14
retq
movl 0x6b0(%rbx), %edi
callq 0x26180
leaq 0x621d4(%rip), %rsi     # 0xb639a
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x2b699
jmp 0x5418e
leaq 0x620bb(%rip), %rdi     # 0xb6294
leaq 0x62087(%rip), %rsi     # 0xb6267
movl $0xf3, %edx
callq 0x57ac8
pushq $0x1
popq %rdi
callq 0x263c0
// File: /workspace/github_c_makefile_star2_O2/gplessis[P]dotdeb-redis/src/aof.c
// Function: catAppendOnlyGenericCommand
sds catAppendOnlyGenericCommand(sds dst, int argc, robj **argv) {
    char buf[32];
    int len, j;
    robj *o;

    buf[0] = '*';
    len = 1+ll2string(buf+1,sizeof(buf)-1,argc);
    buf[len++] = '\r';
    buf[len++] = '\n';
    dst = sdscatlen(dst,buf,len);

    for (j = 0; j < argc; j++) {
        o = getDecodedObject(argv[j]);
        buf[0] = '$';
        len = 1+ll2string(buf+1,sizeof(buf)-1,sdslen(o->ptr));
        buf[len++] = '\r';
        buf[len++] = '\n';
        dst = sdscatlen(dst,buf,len);
        dst = sdscatlen(dst,o->ptr,sdslen(o->ptr));
        dst = sdscatlen(dst,"\r\n",2);
        decrRefCount(o);
    }
    return dst;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdx, 0x8(%rsp)
movq %rdi, %r14
leaq 0x11(%rsp), %rdi
movb $0x2a, -0x1(%rdi)
movslq %esi, %r15
pushq $0x1f
popq %rsi
movq %r15, %rdx
callq 0x39796
cltq
leaq 0x10(%rsp), %r13
movw $0xa0d, 0x1(%rax,%r13)  # imm = 0xA0D
addl $0x3, %eax
movslq %eax, %rdx
movq %r14, %rdi
movq %r13, %rsi
callq 0x31758
movq %rax, %r12
xorl %ebx, %ebx
testl %r15d, %r15d
cmovlel %ebx, %r15d
cmpq %rbx, %r15
je 0x544f1
movq 0x8(%rsp), %rax
movq (%rax,%rbx,8), %rdi
callq 0x3a57d
movq %rax, %rbp
movb $0x24, 0x10(%rsp)
movq 0x8(%rax), %rdi
callq 0x543cb
leaq 0x11(%rsp), %rdi
pushq $0x1f
popq %rsi
movq %rax, %rdx
callq 0x39796
cltq
movw $0xa0d, 0x1(%rax,%r13)  # imm = 0xA0D
addl $0x3, %eax
movslq %eax, %rdx
movq %r12, %rdi
movq %r13, %rsi
callq 0x31758
movq %rax, %r12
movq 0x8(%rbp), %r14
movq %r14, %rdi
callq 0x543cb
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x31758
movq %rax, %rdi
leaq 0x60cba(%rip), %rsi     # 0xb5190
pushq $0x2
popq %rdx
callq 0x31758
movq %rax, %r12
movq %rbp, %rdi
callq 0x3a265
incq %rbx
jmp 0x5445c
movq %r12, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq