LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/bitops.c
// Function: lookupStringForBitCommand
robj *lookupStringForBitCommand(client *c, size_t maxbit) {
    size_t byte = maxbit >> 3;
    robj *o = lookupKeyWrite(c->db,c->argv[1]);

    if (o == NULL) {
        o = createObject(OBJ_STRING,sdsnewlen(NULL, byte+1));
        dbAdd(c->db,c->argv[1],o);
    } else {
        if (checkType(c,o,OBJ_STRING)) return NULL;
        o = dbUnshareStringValue(c->db,c->argv[1],o);
        o->ptr = sdsgrowzero(o->ptr,byte+1);
    }
    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
shrq $0x3, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
callq 0x4a6f0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x9101e
movq -0x20(%rbp), %rsi
addq $0x1, %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0x38230
movq %rax, %rsi
xorl %edi, %edi
callq 0x48480
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0x4a7d0
jmp 0x9107d
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
xorl %edx, %edx
callq 0x490a0
cmpl $0x0, %eax
je 0x9103c
movq $0x0, -0x8(%rbp)
jmp 0x91085
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0x4ad00
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x20(%rbp), %rsi
addq $0x1, %rsi
callq 0x38fa0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/bitops.c
// Function: getObjectReadOnlyString
unsigned char *getObjectReadOnlyString(robj *o, long *len, char *llbuf) {
    serverAssert(o->type == OBJ_STRING);
    unsigned char *p = NULL;

    /* Set the 'p' pointer to the string, that can be just a stack allocated
     * array if our string was integer encoded. */
    if (o && o->encoding == OBJ_ENCODING_INT) {
        p = (unsigned char*) llbuf;
        if (len) *len = ll2string(llbuf,LONG_STR_SIZE,(long)o->ptr);
    } else if (o) {
        p = (unsigned char*) o->ptr;
        if (len) *len = sdslen(o->ptr);
    } else {
        if (len) *len = 0;
    }
    return p;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0xf, %eax
cmpl $0x0, %eax
jne 0x910b4
jmp 0x910d6
leaq 0xa9965(%rip), %rdi     # 0x13aa20
leaq 0xb4d1e(%rip), %rsi     # 0x145de0
movl $0x1f4, %edx            # imm = 0x1F4
callq 0x76ce0
movl $0x1, %edi
callq 0x263c0
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x91127
movq -0x8(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x1, %eax
jne 0x91127
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x91125
movq -0x18(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdx
movl $0x15, %esi
callq 0x477e0
movslq %eax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x91170
cmpq $0x0, -0x8(%rbp)
je 0x9115a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x91158
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x90e00
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x9116e
cmpq $0x0, -0x10(%rbp)
je 0x9116c
movq -0x10(%rbp), %rax
movq $0x0, (%rax)
jmp 0x9116e
jmp 0x91170
movq -0x20(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/bitops.c
// Function: getbitCommand
void getbitCommand(client *c) {
    robj *o;
    char llbuf[32];
    size_t bitoffset;
    size_t byte, bit;
    size_t bitval = 0;

    if (getBitOffsetFromArgument(c,c->argv[2],&bitoffset,0,0) != C_OK)
        return;

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

    byte = bitoffset >> 3;
    bit = 7 - (bitoffset & 0x7);
    if (sdsEncodedObject(o)) {
        if (byte < sdslen(o->ptr))
            bitval = ((uint8_t*)o->ptr)[byte] & (1 << bit);
    } else {
        if (byte < (size_t)ll2string(llbuf,sizeof(llbuf),(long)o->ptr))
            bitval = llbuf[byte] & (1 << bit);
    }

    addReply(c, bitval ? shared.cone : shared.czero);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rsi
leaq -0x38(%rbp), %rdx
xorl %r8d, %r8d
movl %r8d, %ecx
callq 0x90d00
cmpl $0x0, %eax
je 0x9139d
jmp 0x914f2
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rsi
leaq 0xe788c(%rip), %rax     # 0x178c40
movq 0x20(%rax), %rdx
callq 0x4a730
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x913db
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x490a0
cmpl $0x0, %eax
je 0x913e0
jmp 0x914f2
movq -0x38(%rbp), %rax
shrq $0x3, %rax
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rcx
andq $0x7, %rcx
movl $0x7, %eax
subq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x91422
movq -0x10(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x9146a
movq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x90e00
movq %rax, %rcx
movq -0x58(%rbp), %rax
cmpq %rcx, %rax
jae 0x91468
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x40(%rbp), %rcx
movzbl (%rax,%rcx), %eax
movq -0x48(%rbp), %rcx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cltq
movq %rax, -0x50(%rbp)
jmp 0x914b6
movq -0x40(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
movl $0x20, %esi
callq 0x477e0
movl %eax, %ecx
movq -0x60(%rbp), %rax
movslq %ecx, %rcx
cmpq %rcx, %rax
jae 0x914b4
movq -0x40(%rbp), %rax
movsbl -0x30(%rbp,%rax), %eax
movq -0x48(%rbp), %rcx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
andl %ecx, %eax
cltq
movq %rax, -0x50(%rbp)
jmp 0x914b6
movq -0x8(%rbp), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x914d6
leaq 0xe7774(%rip), %rax     # 0x178c40
movq 0x28(%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0x914e5
leaq 0xe7763(%rip), %rax     # 0x178c40
movq 0x20(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x68(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x42cc0
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: releaseSentinelRedisInstance
void releaseSentinelRedisInstance(sentinelRedisInstance *ri) {
    /* Release all its slaves or sentinels if any. */
    dictRelease(ri->sentinels);
    dictRelease(ri->slaves);

    /* Disconnect the instance. */
    releaseInstanceLink(ri->link,ri);

    /* Free other resources. */
    sdsfree(ri->name);
    sdsfree(ri->runid);
    sdsfree(ri->notification_script);
    sdsfree(ri->client_reconfig_script);
    sdsfree(ri->slave_master_host);
    sdsfree(ri->leader);
    sdsfree(ri->auth_pass);
    sdsfree(ri->info);
    releaseSentinelAddr(ri->addr);

    /* Clear state into the master if needed. */
    if ((ri->flags & SRI_SLAVE) && (ri->flags & SRI_PROMOTED) && ri->master)
        ri->master->promoted_slave = NULL;

    zfree(ri);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0x2e230
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0x2e230
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rsi
callq 0x959d0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x38620
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x38620
movq -0x8(%rbp), %rax
movq 0x120(%rax), %rdi
callq 0x38620
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rdi
callq 0x38620
movq -0x8(%rbp), %rax
movq 0xc0(%rax), %rdi
callq 0x38620
movq -0x8(%rbp), %rax
movq 0xd8(%rax), %rdi
callq 0x38620
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rdi
callq 0x38620
movq -0x8(%rbp), %rax
movq 0x130(%rax), %rdi
callq 0x38620
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x94900
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x92dc6
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x92dc6
movq -0x8(%rbp), %rax
cmpq $0x0, 0xb8(%rax)
je 0x92dc6
movq -0x8(%rbp), %rax
movq 0xb8(%rax), %rax
movq $0x0, 0x118(%rax)
movq -0x8(%rbp), %rdi
callq 0x3afa0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelPublishCommand
void sentinelPublishCommand(client *c) {
    if (strcmp(c->argv[1]->ptr,SENTINEL_HELLO_CHANNEL)) {
        addReplyError(c, "Only HELLO messages are accepted by Sentinel instances.");
        return;
    }
    sentinelProcessHelloMessage(c->argv[2]->ptr,sdslen(c->argv[2]->ptr));
    addReplyLongLong(c,1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0xb28aa(%rip), %rsi     # 0x1466fd
callq 0x268f0
cmpl $0x0, %eax
je 0x93e6f
movq -0x8(%rbp), %rdi
leaq 0xb3296(%rip), %rsi     # 0x1470fe
callq 0x42f90
jmp 0x93eb1
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rdi
callq 0x97af0
movq -0x10(%rbp), %rdi
movl %eax, %esi
callq 0x99400
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x43780
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelRoleCommand
void sentinelRoleCommand(client *c) {
    dictIterator *di;
    dictEntry *de;

    addReplyMultiBulkLen(c,2);
    addReplyBulkCBuffer(c,"sentinel",8);
    addReplyMultiBulkLen(c,dictSize(sentinel.masters));

    di = dictGetIterator(sentinel.masters);
    while((de = dictNext(di)) != NULL) {
        sentinelRedisInstance *ri = dictGetVal(de);

        addReplyBulkCString(c,ri->name);
    }
    dictReleaseIterator(di);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movl $0x2, %esi
callq 0x437f0
movq -0x8(%rbp), %rdi
leaq 0xb24ed(%rip), %rsi     # 0x1468d2
movl $0x8, %edx
callq 0x43920
movq -0x8(%rbp), %rdi
movq 0xf8c46(%rip), %rax     # 0x18d040
movq 0x28(%rax), %rsi
movq 0xf8c3b(%rip), %rax     # 0x18d040
addq 0x48(%rax), %rsi
callq 0x437f0
movq 0xf8c2b(%rip), %rdi     # 0x18d040
callq 0x2e400
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2e4a0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x94450
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x43580
jmp 0x9441e
movq -0x10(%rbp), %rdi
callq 0x2e600
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: initSentinel
void initSentinel(void) {
    unsigned int j;

    /* Remove usual Redis commands from the command table, then just add
     * the SENTINEL command. */
    dictEmpty(server.commands,NULL);
    for (j = 0; j < sizeof(sentinelcmds)/sizeof(sentinelcmds[0]); j++) {
        int retval;
        struct redisCommand *cmd = sentinelcmds+j;

        retval = dictAdd(server.commands, sdsnew(cmd->name), cmd);
        serverAssert(retval == DICT_OK);
    }

    /* Initialize various data structures. */
    sentinel.current_epoch = 0;
    sentinel.masters = dictCreate(&instancesDictType,NULL);
    sentinel.tilt = 0;
    sentinel.tilt_start_time = 0;
    sentinel.previous_time = mstime();
    sentinel.running_scripts = 0;
    sentinel.scripts_queue = listCreate();
    sentinel.announce_ip = NULL;
    sentinel.announce_port = 0;
    sentinel.simfailure_flags = SENTINEL_SIMFAILURE_NONE;
    memset(sentinel.myid,0,sizeof(sentinel.myid));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0xe3d49(%rip), %rax     # 0x1781d8
movq 0x30(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2ed40
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpq $0xb, %rax
jae 0x9452b
movl -0x4(%rbp), %eax
movl %eax, %ecx
leaq 0xe2ee8(%rip), %rax     # 0x1773a0
imulq $0x50, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
leaq 0xe3d0e(%rip), %rax     # 0x1781d8
movq 0x30(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
callq 0x38510
movq -0x18(%rbp), %rdi
movq %rax, %rsi
movq -0x10(%rbp), %rdx
callq 0x2d8c0
movl %eax, -0x8(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x944f9
jmp 0x9451b
leaq 0xa738c(%rip), %rdi     # 0x13b88c
leaq 0xb1a55(%rip), %rsi     # 0x145f5c
movl $0x1c9, %edx            # imm = 0x1C9
callq 0x76ce0
movl $0x1, %edi
callq 0x263c0
jmp 0x9451d
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x944a3
movq $0x0, 0xf8b02(%rip) # 0x18d038
leaq 0xe2e03(%rip), %rdi     # 0x177340
xorl %eax, %eax
movl %eax, %esi
callq 0x2d330
movq %rax, 0xf8af3(%rip)     # 0x18d040
movl $0x0, 0xf8af1(%rip)     # 0x18d048
movq $0x0, 0xf8aee(%rip) # 0x18d050
callq 0x2ff70
movq %rax, 0xf8aea(%rip)     # 0x18d058
movl $0x0, 0xf8ad4(%rip)     # 0x18d04c
callq 0x26e20
movq %rax, 0xf8adc(%rip)     # 0x18d060
movq $0x0, 0xf8ad9(%rip) # 0x18d068
movl $0x0, 0xf8ad7(%rip)     # 0x18d070
movq $0x0, 0xf8ad4(%rip) # 0x18d078
leaq 0xf8a5d(%rip), %rdi     # 0x18d008
xorl %esi, %esi
movl $0x29, %edx
callq 0x26110
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelIsRunning
void sentinelIsRunning(void) {
    int j;

    if (server.configfile == NULL) {
        serverLog(LL_WARNING,
            "Sentinel started without a config file. Exiting...");
        exit(1);
    } else if (access(server.configfile,W_OK) == -1) {
        serverLog(LL_WARNING,
            "Sentinel config file %s is not writable: %s. Exiting...",
            server.configfile,strerror(errno));
        exit(1);
    }

    /* If this Sentinel has yet no ID set in the configuration file, we
     * pick a random one and persist the config on disk. From now on this
     * will be this Sentinel ID across restarts. */
    for (j = 0; j < CONFIG_RUN_ID_SIZE; j++)
        if (sentinel.myid[j] != 0) break;

    if (j == CONFIG_RUN_ID_SIZE) {
        /* Pick ID and presist the config. */
        getRandomHexChars(sentinel.myid,CONFIG_RUN_ID_SIZE);
        sentinelFlushConfig();
    }

    /* Log its ID to make debugging of issues simpler. */
    serverLog(LL_WARNING,"Sentinel ID is %s", sentinel.myid);

    /* We want to generate a +monitor event for every configured master
     * at startup. */
    sentinelGenerateInitialMonitorEvents();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
leaq 0xe3c09(%rip), %rax     # 0x1781d8
cmpq $0x0, 0x8(%rax)
jne 0x945f3
movl $0x3, %edi
leaq 0xb1985(%rip), %rsi     # 0x145f67
movb $0x0, %al
callq 0x2fc60
movl $0x1, %edi
callq 0x262d0
leaq 0xe3bde(%rip), %rax     # 0x1781d8
movq 0x8(%rax), %rdi
movl $0x2, %esi
callq 0x26aa0
cmpl $-0x1, %eax
jne 0x9464c
leaq 0xe3bc4(%rip), %rax     # 0x1781d8
movq 0x8(%rax), %rax
movq %rax, -0x10(%rbp)
callq 0x26880
movl (%rax), %edi
callq 0x26690
movq -0x10(%rbp), %rdx
movq %rax, %rcx
movl $0x3, %edi
leaq 0xb195f(%rip), %rsi     # 0x145f9a
movb $0x0, %al
callq 0x2fc60
movl $0x1, %edi
callq 0x262d0
jmp 0x9464e
movl $0x0, -0x4(%rbp)
cmpl $0x28, -0x4(%rbp)
jge 0x9467e
movslq -0x4(%rbp), %rcx
leaq 0xf89a2(%rip), %rax     # 0x18d008
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x94671
jmp 0x9467e
jmp 0x94673
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x94655
cmpl $0x28, -0x4(%rbp)
jne 0x9469a
leaq 0xf897d(%rip), %rdi     # 0x18d008
movl $0x28, %esi
callq 0x47e40
callq 0x946c0
movl $0x3, %edi
leaq 0xb192c(%rip), %rsi     # 0x145fd2
leaq 0xf895b(%rip), %rdx     # 0x18d008
movb $0x0, %al
callq 0x2fc60
callq 0x94790
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelFlushConfig
void sentinelFlushConfig(void) {
    int fd = -1;
    int saved_hz = server.hz;
    int rewrite_status;

    server.hz = CONFIG_DEFAULT_HZ;
    rewrite_status = rewriteConfig(server.configfile);
    server.hz = saved_hz;

    if (rewrite_status == -1) goto werr;
    if ((fd = open(server.configfile,O_RDONLY)) == -1) goto werr;
    if (fsync(fd) == -1) goto werr;
    if (close(fd) == EOF) goto werr;
    return;

werr:
    if (fd != -1) close(fd);
    serverLog(LL_WARNING,"WARNING: Sentinel was not able to save the new configuration on disk!!!: %s", strerror(errno));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
leaq 0xe3b02(%rip), %rax     # 0x1781d8
movl 0x20(%rax), %eax
movl %eax, -0x8(%rbp)
leaq 0xe3af5(%rip), %rax     # 0x1781d8
movl $0xa, 0x20(%rax)
leaq 0xe3ae7(%rip), %rax     # 0x1781d8
movq 0x8(%rax), %rdi
callq 0x6f960
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %ecx
leaq 0xe3ad1(%rip), %rax     # 0x1781d8
movl %ecx, 0x20(%rax)
cmpl $-0x1, -0xc(%rbp)
jne 0x94712
jmp 0x94750
leaq 0xe3abf(%rip), %rax     # 0x1781d8
movq 0x8(%rax), %rdi
xorl %esi, %esi
movb $0x0, %al
callq 0x266a0
movl %eax, -0x4(%rbp)
cmpl $-0x1, %eax
jne 0x94730
jmp 0x94750
movl -0x4(%rbp), %edi
callq 0x26610
cmpl $-0x1, %eax
jne 0x9473f
jmp 0x94750
movl -0x4(%rbp), %edi
callq 0x26180
cmpl $-0x1, %eax
jne 0x9474e
jmp 0x94750
jmp 0x94780
cmpl $-0x1, -0x4(%rbp)
je 0x9475e
movl -0x4(%rbp), %edi
callq 0x26180
callq 0x26880
movl (%rax), %edi
callq 0x26690
movq %rax, %rdx
movl $0x3, %edi
leaq 0xb1ec4(%rip), %rsi     # 0x14663d
movb $0x0, %al
callq 0x2fc60
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelGenerateInitialMonitorEvents
void sentinelGenerateInitialMonitorEvents(void) {
    dictIterator *di;
    dictEntry *de;

    di = dictGetIterator(sentinel.masters);
    while((de = dictNext(di)) != NULL) {
        sentinelRedisInstance *ri = dictGetVal(de);
        sentinelEvent(LL_WARNING,"+monitor",ri,"%@ quorum %d",ri->quorum);
    }
    dictReleaseIterator(di);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq 0xf88a1(%rip), %rdi     # 0x18d040
callq 0x2e400
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2e4a0
movq %rax, -0x10(%rbp)
cmpq $0x0, %rax
je 0x947f2
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdx
movq -0x18(%rbp), %rax
movl 0x90(%rax), %r8d
movl $0x3, %edi
leaq 0xb1825(%rip), %rsi     # 0x146007
leaq 0xb1827(%rip), %rcx     # 0x146010
movb $0x0, %al
callq 0x94990
jmp 0x947a8
movq -0x8(%rbp), %rdi
callq 0x2e600
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: createSentinelAddr
sentinelAddr *createSentinelAddr(char *hostname, int port) {
    char ip[NET_IP_STR_LEN];
    sentinelAddr *sa;

    if (port < 0 || port > 65535) {
        errno = EINVAL;
        return NULL;
    }
    if (anetResolve(NULL,hostname,ip,sizeof(ip)) == ANET_ERR) {
        errno = ENOENT;
        return NULL;
    }
    sa = zmalloc(sizeof(*sa));
    sa->ip = sdsnew(ip);
    sa->port = port;
    return sa;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jl 0x9482e
cmpl $0xffff, -0x14(%rbp)    # imm = 0xFFFF
jle 0x94843
callq 0x26880
movl $0x16, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x948a6
movq -0x10(%rbp), %rsi
leaq -0x50(%rbp), %rdx
xorl %eax, %eax
movl %eax, %edi
movl $0x2e, %ecx
callq 0x2be10
cmpl $-0x1, %eax
jne 0x94873
callq 0x26880
movl $0x2, (%rax)
movq $0x0, -0x8(%rbp)
jmp 0x948a6
movl $0x10, %edi
callq 0x3acd0
movq %rax, -0x58(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x38510
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, (%rax)
movl -0x14(%rbp), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: dupSentinelAddr
sentinelAddr *dupSentinelAddr(sentinelAddr *src) {
    sentinelAddr *sa;

    sa = zmalloc(sizeof(*sa));
    sa->ip = sdsnew(src->ip);
    sa->port = src->port;
    return sa;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x10, %edi
callq 0x3acd0
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0x38510
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8(%rax)
movq -0x10(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelRedisInstanceTypeStr
const char *sentinelRedisInstanceTypeStr(sentinelRedisInstance *ri) {
    if (ri->flags & SRI_MASTER) return "master";
    else if (ri->flags & SRI_SLAVE) return "slave";
    else if (ri->flags & SRI_SENTINEL) return "sentinel";
    else return "unknown";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x94d63
leaq 0xadfc7(%rip), %rax     # 0x142d24
movq %rax, -0x8(%rbp)
jmp 0x94da4
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x94d7e
leaq 0xadffe(%rip), %rax     # 0x142d76
movq %rax, -0x8(%rbp)
jmp 0x94da4
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x94d99
leaq 0xb1b3f(%rip), %rax     # 0x1468d2
movq %rax, -0x8(%rbp)
jmp 0x94da4
leaq 0xa6a7d(%rip), %rax     # 0x13b81d
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/sentinel.c
// Function: sentinelReleaseScriptJob
void sentinelReleaseScriptJob(sentinelScriptJob *sj) {
    int j = 0;

    while(sj->argv[j]) sdsfree(sj->argv[j++]);
    zfree(sj->argv);
    zfree(sj);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x950e7
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl -0xc(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0xc(%rbp)
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdi
callq 0x38620
jmp 0x950b3
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3afa0
movq -0x8(%rbp), %rdi
callq 0x3afa0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelGetScriptListNodeByPid
listNode *sentinelGetScriptListNodeByPid(pid_t pid) {
    listNode *ln;
    listIter li;

    listRewind(sentinel.scripts_queue,&li);
    while ((ln = listNext(&li)) != NULL) {
        sentinelScriptJob *sj = ln->value;

        if ((sj->flags & SENTINEL_SCRIPT_RUNNING) && sj->pid == pid)
            return ln;
    }
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl %edi, -0xc(%rbp)
movq 0xf7f3e(%rip), %rdi     # 0x18d060
leaq -0x28(%rbp), %rsi
callq 0x27320
leaq -0x28(%rbp), %rdi
callq 0x27380
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x95170
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x9516e
movq -0x30(%rbp), %rax
movl 0x18(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x9516e
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x95178
jmp 0x9512b
movq $0x0, -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/sentinel.c
// Function: sentinelKillTimedoutScripts
void sentinelKillTimedoutScripts(void) {
    listNode *ln;
    listIter li;
    mstime_t now = mstime();

    listRewind(sentinel.scripts_queue,&li);
    while ((ln = listNext(&li)) != NULL) {
        sentinelScriptJob *sj = ln->value;

        if (sj->flags & SENTINEL_SCRIPT_RUNNING &&
            (now - sj->start_time) > SENTINEL_SCRIPT_MAX_RUNTIME)
        {
            sentinelEvent(LL_WARNING,"-script-timeout",NULL,"%s %ld",
                sj->argv[0], (long)sj->pid);
            kill(sj->pid,SIGKILL);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
callq 0x2ff70
movq %rax, -0x20(%rbp)
movq 0xf7b68(%rip), %rdi     # 0x18d060
leaq -0x18(%rbp), %rsi
callq 0x27320
leaq -0x18(%rbp), %rdi
callq 0x27380
movq %rax, -0x8(%rbp)
cmpq $0x0, %rax
je 0x95589
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x95584
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
subq 0x10(%rcx), %rax
cmpq $0xea60, %rax           # imm = 0xEA60
jle 0x95584
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %r8
movq -0x28(%rbp), %rax
movslq 0x18(%rax), %r9
movl $0x3, %edi
leaq 0xb0b7b(%rip), %rsi     # 0x1460dc
xorl %eax, %eax
movl %eax, %edx
leaq 0xa9c3c(%rip), %rcx     # 0x13f1a8
movb $0x0, %al
callq 0x94990
movq -0x28(%rbp), %rax
movl 0x18(%rax), %edi
movl $0x9, %esi
callq 0x26670
jmp 0x95501
addq $0x30, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelCallClientReconfScript
void sentinelCallClientReconfScript(sentinelRedisInstance *master, int role, char *state, sentinelAddr *from, sentinelAddr *to) {
    char fromport[32], toport[32];

    if (master->client_reconfig_script == NULL) return;
    ll2string(fromport,sizeof(fromport),from->port);
    ll2string(toport,sizeof(toport),to->port);
    sentinelScheduleScriptExecution(master->client_reconfig_script,
        master->name,
        (role == SENTINEL_LEADER) ? "leader" : "observer",
        state, from->ip, fromport, to->ip, toport, NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x128(%rax)
jne 0x957d1
jmp 0x95861
leaq -0x50(%rbp), %rdi
movq -0x20(%rbp), %rax
movslq 0x8(%rax), %rdx
movl $0x20, %esi
callq 0x477e0
leaq -0x70(%rbp), %rdi
movq -0x28(%rbp), %rax
movslq 0x8(%rax), %rdx
movl $0x20, %esi
callq 0x477e0
movq -0x8(%rbp), %rax
movq 0x128(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
movl -0xc(%rbp), %ecx
leaq 0xb08fc(%rip), %rdx     # 0x146116
leaq 0xb163b(%rip), %rax     # 0x146e5c
cmpl $0x20000, %ecx          # imm = 0x20000
cmoveq %rax, %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq (%rax), %r8
leaq -0x50(%rbp), %r9
movq -0x28(%rbp), %rax
movq (%rax), %r10
leaq -0x70(%rbp), %rax
xorl %r11d, %r11d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, %al
callq 0x94db0
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: createInstanceLink
instanceLink *createInstanceLink(void) {
    instanceLink *link = zmalloc(sizeof(*link));

    link->refcount = 1;
    link->disconnected = 1;
    link->pending_commands = 0;
    link->cc = NULL;
    link->pc = NULL;
    link->cc_conn_time = 0;
    link->pc_conn_time = 0;
    link->last_reconn_time = 0;
    link->pc_last_activity = 0;
    /* We set the act_ping_time to "now" even if we actually don't have yet
     * a connection with the node, nor we sent a ping.
     * This is useful to detect a timeout in case we'll not be able to connect
     * with the node at all. */
    link->act_ping_time = mstime();
    link->last_ping_time = 0;
    link->last_avail_time = mstime();
    link->last_pong_time = mstime();
    return link;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl $0x60, %edi
callq 0x3acd0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x1, (%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x58(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x30(%rax)
callq 0x2ff70
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x48(%rax)
callq 0x2ff70
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x38(%rax)
callq 0x2ff70
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x8(%rbp), %rax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: instanceLinkCloseConnection
void instanceLinkCloseConnection(instanceLink *link, redisAsyncContext *c) {
    if (c == NULL) return;

    if (link->cc == c) {
        link->cc = NULL;
        link->pending_commands = 0;
    }
    if (link->pc == c) link->pc = NULL;
    c->data = NULL;
    link->disconnected = 1;
    redisAsyncFree(c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x95959
jmp 0x959bb
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x9597e
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x10(%rbp), %rax
jne 0x95998
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
movq -0x10(%rbp), %rax
movq $0x0, 0xb0(%rax)
movq -0x8(%rbp), %rax
movl $0x1, 0x4(%rax)
movq -0x10(%rbp), %rdi
callq 0xa5f60
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: releaseInstanceLink
instanceLink *releaseInstanceLink(instanceLink *link, sentinelRedisInstance *ri)
{
    serverAssert(link->refcount > 0);
    link->refcount--;
    if (link->refcount != 0) {
        if (ri && ri->link->cc) {
            /* This instance may have pending callbacks in the hiredis async
             * context, having as 'privdata' the instance that we are going to
             * free. Let's rewrite the callback list, directly exploiting
             * hiredis internal data structures, in order to bind them with
             * a callback that will ignore the reply at all. */
            redisCallback *cb;
            redisCallbackList *callbacks = &link->cc->replies;

            cb = callbacks->head;
            while(cb) {
                if (cb->privdata == ri) {
                    cb->fn = sentinelDiscardReplyCallback;
                    cb->privdata = NULL; /* Not strictly needed. */
                }
                cb = cb->next;
            }
        }
        return link; /* Other active users. */
    }

    instanceLinkCloseConnection(link,link->cc);
    instanceLinkCloseConnection(link,link->pc);
    zfree(link);
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
jle 0x959eb
jmp 0x95a0d
leaq 0xb072d(%rip), %rdi     # 0x14611f
leaq 0xb0563(%rip), %rsi     # 0x145f5c
movl $0x3d0, %edx            # imm = 0x3D0
callq 0x76ce0
movl $0x1, %edi
callq 0x263c0
movq -0x10(%rbp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x95a9d
cmpq $0x0, -0x18(%rbp)
je 0x95a93
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x10(%rax)
je 0x95a93
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
addq $0xf8, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x95a91
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x18(%rbp), %rax
jne 0x95a84
movq -0x20(%rbp), %rax
leaq 0x6c(%rip), %rcx        # 0x95ae0
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
jmp 0x95a54
jmp 0x95a93
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x95ad0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x95940
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x95940
movq -0x10(%rbp), %rdi
callq 0x3afa0
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelTryConnectionSharing
int sentinelTryConnectionSharing(sentinelRedisInstance *ri) {
    serverAssert(ri->flags & SRI_SENTINEL);
    dictIterator *di;
    dictEntry *de;

    if (ri->runid == NULL) return C_ERR; /* No way to identify it. */
    if (ri->link->refcount > 1) return C_ERR; /* Already shared. */

    di = dictGetIterator(sentinel.masters);
    while((de = dictNext(di)) != NULL) {
        sentinelRedisInstance *master = dictGetVal(de), *match;
        /* We want to share with the same physical Sentinel referenced
         * in other masters, so skip our master. */
        if (master == ri->master) continue;
        match = getSentinelRedisInstanceByAddrAndRunID(master->sentinels,
                                                       NULL,0,ri->runid);
        if (match == NULL) continue; /* No match. */
        if (match == ri) continue; /* Should never happen but... safer. */

        /* We identified a matching Sentinel, great! Let's free our link
         * and use the one of the matching Sentinel. */
        releaseInstanceLink(ri->link,NULL);
        ri->link = match->link;
        match->link->refcount++;
        return C_OK;
    }
    dictReleaseIterator(di);
    return C_ERR;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x95b3c
jmp 0x95b5e
leaq 0xb05ef(%rip), %rdi     # 0x146132
leaq 0xb0412(%rip), %rsi     # 0x145f5c
movl $0x3fb, %edx            # imm = 0x3FB
callq 0x76ce0
movl $0x1, %edi
callq 0x263c0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x95b75
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x95c54
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
cmpl $0x1, (%rax)
jle 0x95b8e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x95c54
movq 0xf74ab(%rip), %rdi     # 0x18d040
callq 0x2e400
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2e4a0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x95c44
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0xb8(%rcx), %rax
jne 0x95bd4
jmp 0x95b9e
movq -0x28(%rbp), %rax
movq 0x80(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0x95c60
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x95bff
jmp 0x95b9e
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0x95c0b
jmp 0x95b9e
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x959d0
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x30(%rbp), %rax
movq 0x28(%rax), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
movl $0x0, -0x4(%rbp)
jmp 0x95c54
movq -0x18(%rbp), %rdi
callq 0x2e600
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: getSentinelRedisInstanceByAddrAndRunID
sentinelRedisInstance *getSentinelRedisInstanceByAddrAndRunID(dict *instances, char *ip, int port, char *runid) {
    dictIterator *di;
    dictEntry *de;
    sentinelRedisInstance *instance = NULL;

    serverAssert(ip || runid);   /* User must pass at least one search param. */
    di = dictGetIterator(instances);
    while((de = dictNext(di)) != NULL) {
        sentinelRedisInstance *ri = dictGetVal(de);

        if (runid && !ri->runid) continue;
        if ((runid == NULL || strcmp(ri->runid, runid) == 0) &&
            (ip == NULL || (strcmp(ri->addr->ip, ip) == 0 &&
                            ri->addr->port == port)))
        {
            instance = ri;
            break;
        }
    }
    dictReleaseIterator(di);
    return instance;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq $0x0, -0x38(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x95c8d
cmpq $0x0, -0x20(%rbp)
je 0x95c8f
jmp 0x95cb1
leaq 0xb055c(%rip), %rdi     # 0x1461f2
leaq 0xb02bf(%rip), %rsi     # 0x145f5c
movl $0x533, %edx            # imm = 0x533
callq 0x76ce0
movl $0x1, %edi
callq 0x263c0
movq -0x8(%rbp), %rdi
callq 0x2e400
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x2e4a0
movq %rax, -0x30(%rbp)
cmpq $0x0, %rax
je 0x95d4d
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x95cf1
movq -0x40(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x95cf1
jmp 0x95cbe
cmpq $0x0, -0x20(%rbp)
je 0x95d0e
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x268f0
cmpl $0x0, %eax
jne 0x95d48
cmpq $0x0, -0x10(%rbp)
je 0x95d3e
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x268f0
cmpl $0x0, %eax
jne 0x95d48
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rax
movl 0x8(%rax), %eax
cmpl -0x14(%rbp), %eax
jne 0x95d48
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
jmp 0x95d4d
jmp 0x95cbe
movq -0x28(%rbp), %rdi
callq 0x2e600
movq -0x38(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: instanceLinkConnectionError
void instanceLinkConnectionError(const redisAsyncContext *c) {
    instanceLink *link = c->data;
    int pubsub;

    if (!link) return;

    pubsub = (link->pc == c);
    if (pubsub)
        link->pc = NULL;
    else
        link->cc = NULL;
    link->disconnected = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0xb0(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x95ef0
jmp 0x95f32
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
cmpq -0x8(%rbp), %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x95f1b
movq -0x10(%rbp), %rax
movq $0x0, 0x18(%rax)
jmp 0x95f27
movq -0x10(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rax
movl $0x1, 0x4(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelRedisInstanceLookupSlave
sentinelRedisInstance *sentinelRedisInstanceLookupSlave(
                sentinelRedisInstance *ri, char *ip, int port)
{
    sds key;
    sentinelRedisInstance *slave;
    char buf[NET_PEER_ID_LEN];

    serverAssert(ri->flags & SRI_MASTER);
    anetFormatAddr(buf,sizeof(buf),ip,port);
    key = sdsnew(buf);
    slave = dictFetchValue(ri->slaves,key);
    sdsfree(key);
    return slave;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x96406
jmp 0x96428
leaq 0xafdce(%rip), %rdi     # 0x1461db
leaq 0xafb48(%rip), %rsi     # 0x145f5c
movl $0x4f9, %edx            # imm = 0x4F9
callq 0x76ce0
movl $0x1, %edi
callq 0x263c0
leaq -0x80(%rbp), %rdi
movq -0x10(%rbp), %rdx
movl -0x14(%rbp), %ecx
movl $0x4e, %esi
callq 0x2cdc0
leaq -0x80(%rbp), %rdi
callq 0x38510
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rdi
movq -0x20(%rbp), %rsi
callq 0x2e280
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
callq 0x38620
movq -0x28(%rbp), %rax
addq $0x80, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: removeMatchingSentinelFromMaster
int removeMatchingSentinelFromMaster(sentinelRedisInstance *master, char *runid) {
    dictIterator *di;
    dictEntry *de;
    int removed = 0;

    if (runid == NULL) return 0;

    di = dictGetSafeIterator(master->sentinels);
    while((de = dictNext(di)) != NULL) {
        sentinelRedisInstance *ri = dictGetVal(de);

        if (ri->runid && strcmp(ri->runid,runid) == 0) {
            dictDelete(master->sentinels,ri->name);
            removed++;
        }
    }
    dictReleaseIterator(di);
    return removed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x2c(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x964aa
movl $0x0, -0x4(%rbp)
jmp 0x96530
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0x2e470
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2e4a0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
je 0x96521
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x9651f
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0x268f0
cmpl $0x0, %eax
jne 0x9651f
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rdi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x2de50
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x964be
movq -0x20(%rbp), %rdi
callq 0x2e600
movl -0x2c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelGetMasterByName
sentinelRedisInstance *sentinelGetMasterByName(char *name) {
    sentinelRedisInstance *ri;
    sds sdsname = sdsnew(name);

    ri = dictFetchValue(sentinel.masters,sdsname);
    sdsfree(sdsname);
    return ri;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x38510
movq %rax, -0x18(%rbp)
movq 0xf6ae0(%rip), %rdi     # 0x18d040
movq -0x18(%rbp), %rsi
callq 0x2e280
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rdi
callq 0x38620
movq -0x10(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelAddFlagsToDictOfRedisInstances
void sentinelAddFlagsToDictOfRedisInstances(dict *instances, int flags) {
    dictIterator *di;
    dictEntry *de;

    di = dictGetIterator(instances);
    while((de = dictNext(di)) != NULL) {
        sentinelRedisInstance *ri = dictGetVal(de);
        ri->flags |= flags;
    }
    dictReleaseIterator(di);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
callq 0x2e400
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2e4a0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x965c8
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %ecx
movq -0x28(%rbp), %rax
orl (%rax), %ecx
movl %ecx, (%rax)
jmp 0x9659c
movq -0x18(%rbp), %rdi
callq 0x2e600
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelResetMastersByPattern
int sentinelResetMastersByPattern(char *pattern, int flags) {
    dictIterator *di;
    dictEntry *de;
    int reset = 0;

    di = dictGetIterator(sentinel.masters);
    while((de = dictNext(di)) != NULL) {
        sentinelRedisInstance *ri = dictGetVal(de);

        if (ri->name) {
            if (stringmatch(pattern,ri->name,0)) {
                sentinelResetMaster(ri,flags);
                reset++;
            }
        }
    }
    dictReleaseIterator(di);
    return reset;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x24(%rbp)
movq 0xf67c3(%rip), %rdi     # 0x18d040
callq 0x2e400
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2e4a0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
je 0x968e1
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x968df
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
xorl %edx, %edx
callq 0x47320
cmpl $0x0, %eax
je 0x968dd
movq -0x30(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x96640
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x968df
jmp 0x96886
movq -0x18(%rbp), %rdi
callq 0x2e600
movl -0x24(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelRedisInstanceNoDownFor
int sentinelRedisInstanceNoDownFor(sentinelRedisInstance *ri, mstime_t ms) {
    mstime_t most_recent;

    most_recent = ri->s_down_since_time;
    if (ri->o_down_since_time > most_recent)
        most_recent = ri->o_down_since_time;
    return most_recent == 0 || (mstime() - most_recent) > ms;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
cmpq -0x18(%rbp), %rax
jle 0x96b86
movq -0x8(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x18(%rbp)
movb $0x1, %al
cmpq $0x0, -0x18(%rbp)
movb %al, -0x19(%rbp)
je 0x96ba5
callq 0x2ff70
subq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
setg %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelGetCurrentMasterAddress
sentinelAddr *sentinelGetCurrentMasterAddress(sentinelRedisInstance *master) {
    /* If we are failing over the master, and the state is already
     * SENTINEL_FAILOVER_STATE_RECONF_SLAVES or greater, it means that we
     * already have the new configuration epoch in the master, and the
     * slave acknowledged the configuration switch. Advertise the new
     * address. */
    if ((master->flags & SRI_FAILOVER_IN_PROGRESS) &&
        master->promoted_slave &&
        master->failover_state >= SENTINEL_FAILOVER_STATE_RECONF_SLAVES)
    {
        return master->promoted_slave->addr;
    } else {
        return master->addr;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x96c06
movq -0x10(%rbp), %rax
cmpq $0x0, 0x118(%rax)
je 0x96c06
movq -0x10(%rbp), %rax
cmpl $0x5, 0xf0(%rax)
jl 0x96c06
movq -0x10(%rbp), %rax
movq 0x118(%rax), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x96c12
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelPropagateDownAfterPeriod
void sentinelPropagateDownAfterPeriod(sentinelRedisInstance *master) {
    dictIterator *di;
    dictEntry *de;
    int j;
    dict *d[] = {master->slaves, master->sentinels, NULL};

    for (j = 0; d[j]; j++) {
        di = dictGetIterator(d[j]);
        while((de = dictNext(di)) != NULL) {
            sentinelRedisInstance *ri = dictGetVal(de);
            ri->down_after_period = master->down_after_period;
        }
        dictReleaseIterator(di);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
movl $0x0, -0x1c(%rbp)
movslq -0x1c(%rbp), %rax
cmpq $0x0, -0x40(%rbp,%rax,8)
je 0x96cbc
movslq -0x1c(%rbp), %rax
movq -0x40(%rbp,%rax,8), %rdi
callq 0x2e400
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x2e4a0
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x96ca8
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x58(%rax), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x58(%rax)
jmp 0x96c77
movq -0x10(%rbp), %rdi
callq 0x2e600
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x96c59
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)