// File: /workspace/github_c_makefile_star2_O3/gplessis[P]dotdeb-redis/src/sentinel.c
// Function: sentinelRefreshInstanceInfo
void sentinelRefreshInstanceInfo(sentinelRedisInstance *ri, const char *info) {
    sds *lines;
    int numlines, j;
    int role = 0;

    /* cache full INFO output for instance */
    sdsfree(ri->info);
    ri->info = sdsnew(info);

    /* The following fields must be reset to a given value in the case they
     * are not found at all in the INFO output. */
    ri->master_link_down_time = 0;

    /* Process line by line. */
    lines = sdssplitlen(info,strlen(info),"\r\n",2,&numlines);
    for (j = 0; j < numlines; j++) {
        sentinelRedisInstance *slave;
        sds l = lines[j];

        /* run_id:<40 hex chars>*/
        if (sdslen(l) >= 47 && !memcmp(l,"run_id:",7)) {
            if (ri->runid == NULL) {
                ri->runid = sdsnewlen(l+7,40);
            } else {
                if (strncmp(ri->runid,l+7,40) != 0) {
                    sentinelEvent(LL_NOTICE,"+reboot",ri,"%@");
                    sdsfree(ri->runid);
                    ri->runid = sdsnewlen(l+7,40);
                }
            }
        }

        /* old versions: slave0:<ip>,<port>,<state>
         * new versions: slave0:ip=127.0.0.1,port=9999,... */
        if ((ri->flags & SRI_MASTER) &&
            sdslen(l) >= 7 &&
            !memcmp(l,"slave",5) && isdigit(l[5]))
        {
            char *ip, *port, *end;

            if (strstr(l,"ip=") == NULL) {
                /* Old format. */
                ip = strchr(l,':'); if (!ip) continue;
                ip++; /* Now ip points to start of ip address. */
                port = strchr(ip,','); if (!port) continue;
                *port = '\0'; /* nul term for easy access. */
                port++; /* Now port points to start of port number. */
                end = strchr(port,','); if (!end) continue;
                *end = '\0'; /* nul term for easy access. */
            } else {
                /* New format. */
                ip = strstr(l,"ip="); if (!ip) continue;
                ip += 3; /* Now ip points to start of ip address. */
                port = strstr(l,"port="); if (!port) continue;
                port += 5; /* Now port points to start of port number. */
                /* Nul term both fields for easy access. */
                end = strchr(ip,','); if (end) *end = '\0';
                end = strchr(port,','); if (end) *end = '\0';
            }

            /* Check if we already have this slave into our table,
             * otherwise add it. */
            if (sentinelRedisInstanceLookupSlave(ri,ip,atoi(port)) == NULL) {
                if ((slave = createSentinelRedisInstance(NULL,SRI_SLAVE,ip,
                            atoi(port), ri->quorum, ri)) != NULL)
                {
                    sentinelEvent(LL_NOTICE,"+slave",slave,"%@");
                    sentinelFlushConfig();
                }
            }
        }

        /* master_link_down_since_seconds:<seconds> */
        if (sdslen(l) >= 32 &&
            !memcmp(l,"master_link_down_since_seconds",30))
        {
            ri->master_link_down_time = strtoll(l+31,NULL,10)*1000;
        }

        /* role:<role> */
        if (!memcmp(l,"role:master",11)) role = SRI_MASTER;
        else if (!memcmp(l,"role:slave",10)) role = SRI_SLAVE;

        if (role == SRI_SLAVE) {
            /* master_host:<host> */
            if (sdslen(l) >= 12 && !memcmp(l,"master_host:",12)) {
                if (ri->slave_master_host == NULL ||
                    strcasecmp(l+12,ri->slave_master_host))
                {
                    sdsfree(ri->slave_master_host);
                    ri->slave_master_host = sdsnew(l+12);
                    ri->slave_conf_change_time = mstime();
                }
            }

            /* master_port:<port> */
            if (sdslen(l) >= 12 && !memcmp(l,"master_port:",12)) {
                int slave_master_port = atoi(l+12);

                if (ri->slave_master_port != slave_master_port) {
                    ri->slave_master_port = slave_master_port;
                    ri->slave_conf_change_time = mstime();
                }
            }

            /* master_link_status:<status> */
            if (sdslen(l) >= 19 && !memcmp(l,"master_link_status:",19)) {
                ri->slave_master_link_status =
                    (strcasecmp(l+19,"up") == 0) ?
                    SENTINEL_MASTER_LINK_STATUS_UP :
                    SENTINEL_MASTER_LINK_STATUS_DOWN;
            }

            /* slave_priority:<priority> */
            if (sdslen(l) >= 15 && !memcmp(l,"slave_priority:",15))
                ri->slave_priority = atoi(l+15);

            /* slave_repl_offset:<offset> */
            if (sdslen(l) >= 18 && !memcmp(l,"slave_repl_offset:",18))
                ri->slave_repl_offset = strtoull(l+18,NULL,10);
        }
    }
    ri->info_refresh = mstime();
    sdsfreesplitres(lines,numlines);

    /* ---------------------------- Acting half -----------------------------
     * Some things will not happen if sentinel.tilt is true, but some will
     * still be processed. */

    /* Remember when the role changed. */
    if (role != ri->role_reported) {
        ri->role_reported_time = mstime();
        ri->role_reported = role;
        if (role == SRI_SLAVE) ri->slave_conf_change_time = mstime();
        /* Log the event with +role-change if the new role is coherent or
         * with -role-change if there is a mismatch with the current config. */
        sentinelEvent(LL_VERBOSE,
            ((ri->flags & (SRI_MASTER|SRI_SLAVE)) == role) ?
            "+role-change" : "-role-change",
            ri, "%@ new reported role is %s",
            role == SRI_MASTER ? "master" : "slave",
            ri->flags & SRI_MASTER ? "master" : "slave");
    }

    /* None of the following conditions are processed when in tilt mode, so
     * return asap. */
    if (sentinel.tilt) return;

    /* Handle master -> slave role switch. */
    if ((ri->flags & SRI_MASTER) && role == SRI_SLAVE) {
        /* Nothing to do, but masters claiming to be slaves are
         * considered to be unreachable by Sentinel, so eventually
         * a failover will be triggered. */
    }

    /* Handle slave -> master role switch. */
    if ((ri->flags & SRI_SLAVE) && role == SRI_MASTER) {
        /* If this is a promoted slave we can change state to the
         * failover state machine. */
        if ((ri->flags & SRI_PROMOTED) &&
            (ri->master->flags & SRI_FAILOVER_IN_PROGRESS) &&
            (ri->master->failover_state ==
                SENTINEL_FAILOVER_STATE_WAIT_PROMOTION))
        {
            /* Now that we are sure the slave was reconfigured as a master
             * set the master configuration epoch to the epoch we won the
             * election to perform this failover. This will force the other
             * Sentinels to update their config (assuming there is not
             * a newer one already available). */
            ri->master->config_epoch = ri->master->failover_epoch;
            ri->master->failover_state = SENTINEL_FAILOVER_STATE_RECONF_SLAVES;
            ri->master->failover_state_change_time = mstime();
            sentinelFlushConfig();
            sentinelEvent(LL_WARNING,"+promoted-slave",ri,"%@");
            if (sentinel.simfailure_flags &
                SENTINEL_SIMFAILURE_CRASH_AFTER_PROMOTION)
                sentinelSimFailureCrash();
            sentinelEvent(LL_WARNING,"+failover-state-reconf-slaves",
                ri->master,"%@");
            sentinelCallClientReconfScript(ri->master,SENTINEL_LEADER,
                "start",ri->master->addr,ri->addr);
            sentinelForceHelloUpdateForMaster(ri->master);
        } else {
            /* A slave turned into a master. We want to force our view and
             * reconfigure as slave. Wait some time after the change before
             * going forward, to receive new configs if any. */
            mstime_t wait_time = SENTINEL_PUBLISH_PERIOD*4;

            if (!(ri->flags & SRI_PROMOTED) &&
                 sentinelMasterLooksSane(ri->master) &&
                 sentinelRedisInstanceNoDownFor(ri,wait_time) &&
                 mstime() - ri->role_reported_time > wait_time)
            {
                int retval = sentinelSendSlaveOf(ri,
                        ri->master->addr->ip,
                        ri->master->addr->port);
                if (retval == C_OK)
                    sentinelEvent(LL_NOTICE,"+convert-to-slave",ri,"%@");
            }
        }
    }

    /* Handle slaves replicating to a different master address. */
    if ((ri->flags & SRI_SLAVE) &&
        role == SRI_SLAVE &&
        (ri->slave_master_port != ri->master->addr->port ||
         strcasecmp(ri->slave_master_host,ri->master->addr->ip)))
    {
        mstime_t wait_time = ri->master->failover_timeout;

        /* Make sure the master is sane before reconfiguring this instance
         * into a slave. */
        if (sentinelMasterLooksSane(ri->master) &&
            sentinelRedisInstanceNoDownFor(ri,wait_time) &&
            mstime() - ri->slave_conf_change_time > wait_time)
        {
            int retval = sentinelSendSlaveOf(ri,
                    ri->master->addr->ip,
                    ri->master->addr->port);
            if (retval == C_OK)
                sentinelEvent(LL_NOTICE,"+fix-slave-config",ri,"%@");
        }
    }

    /* Detect if the slave that is in the process of being reconfigured
     * changed state. */
    if ((ri->flags & SRI_SLAVE) && role == SRI_SLAVE &&
        (ri->flags & (SRI_RECONF_SENT|SRI_RECONF_INPROG)))
    {
        /* SRI_RECONF_SENT -> SRI_RECONF_INPROG. */
        if ((ri->flags & SRI_RECONF_SENT) &&
            ri->slave_master_host &&
            strcmp(ri->slave_master_host,
                    ri->master->promoted_slave->addr->ip) == 0 &&
            ri->slave_master_port == ri->master->promoted_slave->addr->port)
        {
            ri->flags &= ~SRI_RECONF_SENT;
            ri->flags |= SRI_RECONF_INPROG;
            sentinelEvent(LL_NOTICE,"+slave-reconf-inprog",ri,"%@");
        }

        /* SRI_RECONF_INPROG -> SRI_RECONF_DONE */
        if ((ri->flags & SRI_RECONF_INPROG) &&
            ri->slave_master_link_status == SENTINEL_MASTER_LINK_STATUS_UP)
        {
            ri->flags &= ~SRI_RECONF_INPROG;
            ri->flags |= SRI_RECONF_DONE;
            sentinelEvent(LL_NOTICE,"+slave-reconf-done",ri,"%@");
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x130(%rdi), %rdi
callq 0x36330
movq %r14, %rdi
callq 0x362b0
movq %rax, 0x130(%rbx)
movq $0x0, 0xa0(%rbx)
movq %r14, %rdi
callq 0x26500
leaq 0x4ac67(%rip), %rdx     # 0xc3ddc
leaq 0xc(%rsp), %r15
movq %r14, %rdi
movl %eax, %esi
movl $0x2, %ecx
movq %r15, %r8
callq 0x37a38
movq %rax, 0x10(%rsp)
cmpl $0x0, (%r15)
jle 0x79808
xorl %r14d, %r14d
xorl %ebp, %ebp
movq 0x10(%rsp), %rax
movq (%rax,%r14,8), %r12
movzbl -0x1(%r12), %eax
andl $0x7, %eax
decl %eax
cmpl $0x3, %eax
ja 0x79260
leaq 0x52f64(%rip), %rcx     # 0xcc128
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl -0x3(%r12), %eax
jmp 0x791e9
movl -0x9(%r12), %eax
jmp 0x791e9
movq -0x11(%r12), %rax
jmp 0x791e9
movzwl -0x5(%r12), %eax
cmpq $0x2f, %rax
jb 0x79260
movl (%r12), %eax
movl $0x5f6e7572, %ecx       # imm = 0x5F6E7572
xorl %ecx, %eax
movl 0x3(%r12), %ecx
movl $0x3a64695f, %edx       # imm = 0x3A64695F
xorl %edx, %ecx
orl %eax, %ecx
jne 0x79260
movq 0x10(%rbx), %rdi
leaq 0x7(%r12), %r15
testq %rdi, %rdi
je 0x7924f
movl $0x28, %edx
movq %r15, %rsi
callq 0x26350
testl %eax, %eax
je 0x79260
movl $0x2, %edi
leaq 0x537d7(%rip), %rsi     # 0xcca0c
movq %rbx, %rdx
leaq 0x532c1(%rip), %rcx     # 0xcc500
xorl %eax, %eax
callq 0x76a24
movq 0x10(%rbx), %rdi
callq 0x36330
movl $0x28, %esi
movq %r15, %rdi
callq 0x36178
movq %rax, 0x10(%rbx)
testb $0x1, (%rbx)
je 0x79408
movzbl -0x1(%r12), %eax
movl %eax, %ecx
andl $0x7, %ecx
cmpl $0x4, %ecx
ja 0x79408
leaq 0x52eb4(%rip), %rdx     # 0xcc138
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
shrl $0x3, %eax
jmp 0x792ae
movq -0x11(%r12), %rax
jmp 0x792ae
movzwl -0x5(%r12), %eax
jmp 0x792ae
movl -0x9(%r12), %eax
jmp 0x792ae
movzbl -0x3(%r12), %eax
cmpq $0x7, %rax
jb 0x79408
movl (%r12), %eax
movl $0x76616c73, %ecx       # imm = 0x76616C73
xorl %ecx, %eax
movzbl 0x4(%r12), %ecx
xorl $0x65, %ecx
orl %eax, %ecx
jne 0x79408
callq 0x26560
movq (%rax), %rax
movsbq 0x5(%r12), %rcx
testb $0x8, 0x1(%rax,%rcx,2)
je 0x79408
movq %r12, %rdi
leaq 0x5371d(%rip), %rsi     # 0xcca14
callq 0x266b0
testq %rax, %rax
je 0x79350
movq %rax, %r15
movq %r12, %rdi
leaq 0x5370a(%rip), %rsi     # 0xcca18
callq 0x266b0
testq %rax, %rax
je 0x797f5
movq %rax, %r13
addq $0x3, %r15
movq %r15, %rdi
movl $0x2c, %esi
callq 0x267f0
testq %rax, %rax
je 0x79338
movb $0x0, (%rax)
addq $0x5, %r13
movq %r13, %rdi
movl $0x2c, %esi
callq 0x267f0
testq %rax, %rax
jne 0x793a1
jmp 0x793a4
movq %r12, %rdi
movl $0x3a, %esi
callq 0x267f0
testq %rax, %rax
je 0x797f5
movq %rax, %r15
incq %r15
movq %r15, %rdi
movl $0x2c, %esi
callq 0x267f0
testq %rax, %rax
je 0x797f5
movq %rax, %r13
movb $0x0, (%rax)
incq %r13
movq %r13, %rdi
movl $0x2c, %esi
callq 0x267f0
testq %rax, %rax
je 0x797f5
movb $0x0, (%rax)
movq %r13, %rdi
callq 0x26760
movq %rbx, %rdi
movq %r15, %rsi
movl %eax, %edx
callq 0x77c0c
testq %rax, %rax
jne 0x79408
movq %r13, %rdi
callq 0x26760
movl 0x90(%rbx), %r8d
xorl %edi, %edi
movl $0x2, %esi
movq %r15, %rdx
movl %eax, %ecx
movq %rbx, %r9
callq 0x7798b
testq %rax, %rax
je 0x79408
movl $0x2, %edi
leaq 0x53111(%rip), %rsi     # 0xcc503
movq %rax, %rdx
leaq 0x53104(%rip), %rcx     # 0xcc500
xorl %eax, %eax
callq 0x76a24
callq 0x76861
movzbl -0x1(%r12), %eax
andl $0x7, %eax
decl %eax
cmpl $0x3, %eax
ja 0x79495
leaq 0x52d2d(%rip), %rcx     # 0xcc14c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl -0x3(%r12), %eax
jmp 0x79444
movl -0x9(%r12), %eax
jmp 0x79444
movq -0x11(%r12), %rax
jmp 0x79444
movzwl -0x5(%r12), %eax
cmpq $0x20, %rax
jb 0x79495
movdqu (%r12), %xmm0
pcmpeqb 0x52da8(%rip), %xmm0    # 0xcc200
movdqu 0xe(%r12), %xmm1
pcmpeqb 0x52d89(%rip), %xmm1    # 0xcc1f0
pand %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x79495
leaq 0x1f(%r12), %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x26af0
imulq $0x3e8, %rax, %rax      # imm = 0x3E8
movq %rax, 0xa0(%rbx)
movq (%r12), %rax
movabsq $0x73616d3a656c6f72, %rcx # imm = 0x73616D3A656C6F72
xorq %rcx, %rax
movq 0x3(%r12), %rcx
movabsq $0x72657473616d3a65, %rdx # imm = 0x72657473616D3A65
xorq %rdx, %rcx
orq %rax, %rcx
je 0x7951f
movq (%r12), %rax
movabsq $0x616c733a656c6f72, %rcx # imm = 0x616C733A656C6F72
xorq %rcx, %rax
movzwl 0x8(%r12), %ecx
xorq $0x6576, %rcx           # imm = 0x6576
orq %rax, %rcx
sete %al
cmpl $0x2, %ebp
sete %cl
orb %al, %cl
cmpb $0x1, %cl
jne 0x797f5
movzbl -0x1(%r12), %r13d
movl %r13d, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x795b2
leaq 0x52c4e(%rip), %rcx     # 0xcc15c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl %r13d, %eax
shrl $0x3, %eax
jmp 0x79545
movl $0x1, %ebp
jmp 0x797f5
movq -0x11(%r12), %rax
jmp 0x79545
movzwl -0x5(%r12), %eax
jmp 0x79545
movl -0x9(%r12), %eax
jmp 0x79545
movzbl -0x3(%r12), %eax
cmpq $0xc, %rax
jb 0x795b2
movq (%r12), %rax
movabsq $0x685f72657473616d, %rcx # imm = 0x685F72657473616D
xorq %rcx, %rax
movl 0x8(%r12), %ecx
xorq $0x3a74736f, %rcx       # imm = 0x3A74736F
orq %rax, %rcx
jne 0x795b2
movq 0xc0(%rbx), %r15
testq %r15, %r15
je 0x7958a
leaq 0xc(%r12), %rdi
movq %r15, %rsi
callq 0x262f0
testl %eax, %eax
je 0x795b2
movq %r15, %rdi
callq 0x36330
leaq 0xc(%r12), %rdi
callq 0x362b0
movq %rax, 0xc0(%rbx)
callq 0x2ffce
movq %rax, 0x78(%rbx)
movzbl -0x1(%r12), %r13d
movl %r13d, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x79644
leaq 0x52ba8(%rip), %rcx     # 0xcc170
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl %r13d, %eax
shrl $0x3, %eax
jmp 0x795f5
movq -0x11(%r12), %rax
jmp 0x795f5
movzwl -0x5(%r12), %eax
jmp 0x795f5
movl -0x9(%r12), %eax
jmp 0x795f5
movzbl -0x3(%r12), %eax
cmpq $0xc, %rax
jb 0x79644
movq (%r12), %rax
movabsq $0x705f72657473616d, %rcx # imm = 0x705F72657473616D
xorq %rcx, %rax
movl 0x8(%r12), %ecx
xorq $0x3a74726f, %rcx       # imm = 0x3A74726F
orq %rax, %rcx
jne 0x79644
leaq 0xc(%r12), %rdi
callq 0x26760
cmpl %eax, 0xc8(%rbx)
je 0x79644
movl %eax, 0xc8(%rbx)
callq 0x2ffce
movq %rax, 0x78(%rbx)
movzbl -0x1(%r12), %r13d
movl %r13d, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x796dd
leaq 0x52b2a(%rip), %rcx     # 0xcc184
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl %r13d, %eax
shrl $0x3, %eax
jmp 0x79687
movq -0x11(%r12), %rax
jmp 0x79687
movzwl -0x5(%r12), %eax
jmp 0x79687
movl -0x9(%r12), %eax
jmp 0x79687
movzbl -0x3(%r12), %eax
cmpq $0x13, %rax
jb 0x796dd
movdqu (%r12), %xmm0
pcmpeqb 0x52b85(%rip), %xmm0    # 0xcc220
movdqu 0x3(%r12), %xmm1
pcmpeqb 0x52b66(%rip), %xmm1    # 0xcc210
pand %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x796dd
leaq 0x13(%r12), %rdi
leaq 0x4eac0(%rip), %rsi     # 0xc8185
callq 0x262f0
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
movl %ecx, 0xcc(%rbx)
movzbl -0x1(%r12), %r13d
movl %r13d, %eax
andl $0x7, %eax
cmpl $0x4, %eax
ja 0x79760
leaq 0x52aa9(%rip), %rcx     # 0xcc198
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl %r13d, %eax
shrl $0x3, %eax
jmp 0x7971c
movq -0x11(%r12), %rax
jmp 0x7971c
movzwl -0x5(%r12), %eax
jmp 0x7971c
movl -0x9(%r12), %eax
jmp 0x7971c
movzbl -0x3(%r12), %eax
cmpq $0xf, %rax
jb 0x79760
movq (%r12), %rax
movabsq $0x72705f6576616c73, %rcx # imm = 0x72705F6576616C73
xorq %rcx, %rax
movq 0x7(%r12), %rcx
movabsq $0x3a797469726f6972, %rdx # imm = 0x3A797469726F6972
xorq %rdx, %rcx
orq %rax, %rcx
jne 0x79760
leaq 0xf(%r12), %rdi
callq 0x26760
movl %eax, 0xa8(%rbx)
movzbl -0x1(%r12), %r13d
movl %r13d, %eax
andl $0x7, %eax
movl $0x2, %ebp
cmpl $0x4, %eax
ja 0x797f5
leaq 0x52a31(%rip), %rcx     # 0xcc1ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
shrl $0x3, %r13d
jmp 0x797a6
movq -0x11(%r12), %r13
jmp 0x797a6
movzwl -0x5(%r12), %r13d
jmp 0x797a6
movl -0x9(%r12), %r13d
jmp 0x797a6
movzbl -0x3(%r12), %r13d
cmpq $0x12, %r13
jb 0x797f5
movdqu (%r12), %xmm0
pcmpeqb 0x52a76(%rip), %xmm0    # 0xcc230
movzwl 0x10(%r12), %eax
movd %eax, %xmm1
pcmpeqb 0x52a74(%rip), %xmm1    # 0xcc240
pand %xmm0, %xmm1
pmovmskb %xmm1, %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x797f5
addq $0x12, %r12
movq %r12, %rdi
xorl %esi, %esi
movl $0xa, %edx
callq 0x26a70
movq %rax, 0xd0(%rbx)
incq %r14
movslq 0xc(%rsp), %rax
cmpq %rax, %r14
jl 0x791a0
jmp 0x7980a
xorl %ebp, %ebp
callq 0x2ffce
movq %rax, 0x60(%rbx)
movl 0xc(%rsp), %esi
movq 0x10(%rsp), %rdi
callq 0x37c04
cmpl 0x68(%rbx), %ebp
je 0x7988f
callq 0x2ffce
movq %rax, 0x70(%rbx)
movl %ebp, 0x68(%rbx)
cmpl $0x2, %ebp
jne 0x79840
callq 0x2ffce
movq %rax, 0x78(%rbx)
movl (%rbx), %eax
movl %eax, %ecx
andl $0x3, %ecx
cmpl %ebp, %ecx
leaq 0x53255(%rip), %rcx     # 0xccaa5
leaq 0x5325b(%rip), %rsi     # 0xccab2
cmoveq %rcx, %rsi
cmpl $0x1, %ebp
leaq 0x4f43e(%rip), %r9      # 0xc8ca3
leaq 0x4f489(%rip), %rcx     # 0xc8cf5
movq %rcx, %r8
cmoveq %r9, %r8
testb $0x1, %al
cmoveq %rcx, %r9
leaq 0x5323f(%rip), %rcx     # 0xccabf
movl $0x1, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x76a24
cmpl $0x0, 0x9ce82(%rip)     # 0x116718
je 0x798a7
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl (%rbx), %eax
movl %eax, %ecx
shrb %cl
cmpl $0x1, %ebp
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x79944
movq 0xb8(%rbx), %rdi
testb %al, %al
js 0x79a15
callq 0x790fa
testl %eax, %eax
je 0x79acf
movq 0x48(%rbx), %r14
movq 0x50(%rbx), %rax
cmpq %r14, %rax
cmovgq %rax, %r14
testq %r14, %r14
je 0x79902
callq 0x2ffce
subq %r14, %rax
cmpq $0x1f41, %rax           # imm = 0x1F41
jl 0x79acf
callq 0x2ffce
subq 0x70(%rbx), %rax
cmpq $0x1f41, %rax           # imm = 0x1F41
jl 0x79acf
movq 0xb8(%rbx), %rax
movq 0x20(%rax), %rax
movq (%rax), %rsi
movl 0x8(%rax), %edx
movq %rbx, %rdi
callq 0x79c10
testl %eax, %eax
jne 0x79acf
leaq 0x531c9(%rip), %rsi     # 0xccb08
jmp 0x799fa
shrb %al
cmpl $0x2, %ebp
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x79acf
movl 0xc8(%rbx), %ecx
movq 0xb8(%rbx), %r14
movq 0x20(%r14), %rax
cmpl 0x8(%rax), %ecx
jne 0x79984
movq 0xc0(%rbx), %rdi
movq (%rax), %rsi
callq 0x262f0
testl %eax, %eax
je 0x79acf
movq 0x108(%r14), %r15
movq %r14, %rdi
callq 0x790fa
testl %eax, %eax
je 0x79acf
movq 0x48(%rbx), %r14
movq 0x50(%rbx), %rax
cmpq %r14, %rax
cmovgq %rax, %r14
testq %r14, %r14
je 0x799c0
callq 0x2ffce
subq %r14, %rax
cmpq %r15, %rax
jle 0x79acf
callq 0x2ffce
subq 0x78(%rbx), %rax
cmpq %r15, %rax
jle 0x79acf
movq 0xb8(%rbx), %rax
movq 0x20(%rax), %rax
movq (%rax), %rsi
movl 0x8(%rax), %edx
movq %rbx, %rdi
callq 0x79c10
testl %eax, %eax
jne 0x79acf
leaq 0x53120(%rip), %rsi     # 0xccb1a
leaq 0x52aff(%rip), %rcx     # 0xcc500
movl $0x2, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x76a24
jmp 0x79acf
testb $0x40, (%rdi)
je 0x79acf
cmpl $0x4, 0xf0(%rdi)
jne 0x79acf
movq 0xe8(%rdi), %rax
movq %rax, 0x18(%rdi)
movl $0x5, 0xf0(%rdi)
callq 0x2ffce
movq 0xb8(%rbx), %rcx
movq %rax, 0xf8(%rcx)
callq 0x76861
leaq 0x5307b(%rip), %rsi     # 0xccada
leaq 0x52a9a(%rip), %rcx     # 0xcc500
movl $0x3, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x76a24
testb $0x2, 0x9cccc(%rip)     # 0x116748
jne 0x79bad
movq 0xb8(%rbx), %rdx
leaq 0x5305a(%rip), %rsi     # 0xccaea
leaq 0x52a69(%rip), %rcx     # 0xcc500
movl $0x3, %edi
xorl %eax, %eax
callq 0x76a24
movq 0x20(%rbx), %r8
movq 0xb8(%rbx), %rdi
movq 0x20(%rdi), %rcx
leaq 0x53187(%rip), %rdx     # 0xccc40
movl $0x20000, %esi          # imm = 0x20000
callq 0x77455
movq 0xb8(%rbx), %rdi
callq 0x79bd0
movl (%rbx), %r14d
testl $0x300, %r14d           # imm = 0x300
je 0x79898
movl %r14d, %eax
andl $0x2, %eax
je 0x79898
cmpl $0x2, %ebp
jne 0x79898
btl $0x8, %r14d
jae 0x79b62
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0x79b62
movq 0xb8(%rbx), %rax
movq 0x118(%rax), %rax
movq 0x20(%rax), %r15
movq (%r15), %rsi
callq 0x268f0
testl %eax, %eax
jne 0x79b62
movl 0xc8(%rbx), %eax
cmpl 0x8(%r15), %eax
jne 0x79b62
andl $0xfffffcff, %r14d      # imm = 0xFFFFFCFF
orl $0x200, %r14d           # imm = 0x200
movl %r14d, (%rbx)
leaq 0x52fe3(%rip), %rsi     # 0xccb2c
leaq 0x529b0(%rip), %rcx     # 0xcc500
movl $0x2, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x76a24
movl (%rbx), %r14d
btl $0x9, %r14d
jae 0x79898
cmpl $0x0, 0xcc(%rbx)
jne 0x79898
andl $0xfffff9ff, %r14d      # imm = 0xFFFFF9FF
orl $0x400, %r14d           # imm = 0x400
movl %r14d, (%rbx)
leaq 0x52faf(%rip), %rsi     # 0xccb41
leaq 0x52967(%rip), %rcx     # 0xcc500
movl $0x2, %edi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x76a24
jmp 0x79898
callq 0x79bb2