// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/latency.c
// Function: createLatencyReport
sds createLatencyReport(void) {
    sds report = sdsempty();
    int advise_better_vm = 0;       /* Better virtual machines. */
    int advise_slowlog_enabled = 0; /* Enable slowlog. */
    int advise_slowlog_tuning = 0;  /* Reconfigure slowlog. */
    int advise_slowlog_inspect = 0; /* Check your slowlog. */
    int advise_disk_contention = 0; /* Try to lower disk contention. */
    int advise_scheduler = 0;       /* Intrinsic latency. */
    int advise_data_writeback = 0;  /* data=writeback. */
    int advise_no_appendfsync = 0;  /* don't fsync during rewrites. */
    int advise_local_disk = 0;      /* Avoid remote disks. */
    int advise_ssd = 0;             /* Use an SSD drive. */
    int advise_write_load_info = 0; /* Print info about AOF and write load. */
    int advise_hz = 0;              /* Use higher HZ. */
    int advise_large_objects = 0;   /* Deletion of large objects. */
    int advise_mass_eviction = 0;   /* Avoid mass eviction of keys. */
    int advise_relax_fsync_policy = 0; /* appendfsync always is slow. */
    int advise_disable_thp = 0;     /* AnonHugePages detected. */
    int advices = 0;

    /* Return ASAP if the latency engine is disabled and it looks like it
     * was never enabled so far. */
    if (dictSize(server.latency_events) == 0 &&
        server.latency_monitor_threshold == 0)
    {
        report = sdscat(report,"I'm sorry, Dave, I can't do that. Latency monitoring is disabled in this Redis instance. You may use \"CONFIG SET latency-monitor-threshold <milliseconds>.\" in order to enable it. If we weren't in a deep space mission I'd suggest to take a look at http://redis.io/topics/latency-monitor.\n");
        return report;
    }

    /* Show all the events stats and add for each event some event-related
     * comment depending on the values. */
    dictIterator *di;
    dictEntry *de;
    int eventnum = 0;

    di = dictGetSafeIterator(server.latency_events);
    while((de = dictNext(di)) != NULL) {
        char *event = dictGetKey(de);
        struct latencyTimeSeries *ts = dictGetVal(de);
        struct latencyStats ls;

        if (ts == NULL) continue;
        eventnum++;
        if (eventnum == 1) {
            report = sdscat(report,"Dave, I have observed latency spikes in this Redis instance. You don't mind talking about it, do you Dave?\n\n");
        }
        analyzeLatencyForEvent(event,&ls);

        report = sdscatprintf(report,
            "%d. %s: %d latency spikes (average %lums, mean deviation %lums, period %.2f sec). Worst all time event %lums.",
            eventnum, event,
            ls.samples,
            (unsigned long) ls.avg,
            (unsigned long) ls.mad,
            (double) ls.period/ls.samples,
            (unsigned long) ts->max);

        /* Fork */
        if (!strcasecmp(event,"fork")) {
            char *fork_quality;
            if (server.stat_fork_rate < 10) {
                fork_quality = "terrible";
                advise_better_vm = 1;
                advices++;
            } else if (server.stat_fork_rate < 25) {
                fork_quality = "poor";
                advise_better_vm = 1;
                advices++;
            } else if (server.stat_fork_rate < 100) {
                fork_quality = "good";
            } else {
                fork_quality = "excellent";
            }
            report = sdscatprintf(report,
                " Fork rate is %.2f GB/sec (%s).", server.stat_fork_rate,
                fork_quality);
        }

        /* Potentially commands. */
        if (!strcasecmp(event,"command")) {
            if (server.slowlog_log_slower_than == 0) {
                advise_slowlog_enabled = 1;
                advices++;
            } else if (server.slowlog_log_slower_than/1000 >
                       server.latency_monitor_threshold)
            {
                advise_slowlog_tuning = 1;
                advices++;
            }
            advise_slowlog_inspect = 1;
            advise_large_objects = 1;
            advices += 2;
        }

        /* fast-command. */
        if (!strcasecmp(event,"fast-command")) {
            advise_scheduler = 1;
            advices++;
        }

        /* AOF and I/O. */
        if (!strcasecmp(event,"aof-write-pending-fsync")) {
            advise_local_disk = 1;
            advise_disk_contention = 1;
            advise_ssd = 1;
            advise_data_writeback = 1;
            advices += 4;
        }

        if (!strcasecmp(event,"aof-write-active-child")) {
            advise_no_appendfsync = 1;
            advise_data_writeback = 1;
            advise_ssd = 1;
            advices += 3;
        }

        if (!strcasecmp(event,"aof-write-alone")) {
            advise_local_disk = 1;
            advise_data_writeback = 1;
            advise_ssd = 1;
            advices += 3;
        }

        if (!strcasecmp(event,"aof-fsync-always")) {
            advise_relax_fsync_policy = 1;
            advices++;
        }

        if (!strcasecmp(event,"aof-fstat") ||
            !strcasecmp(event,"rdb-unlik-temp-file")) {
            advise_disk_contention = 1;
            advise_local_disk = 1;
            advices += 2;
        }

        if (!strcasecmp(event,"aof-rewrite-diff-write") ||
            !strcasecmp(event,"aof-rename")) {
            advise_write_load_info = 1;
            advise_data_writeback = 1;
            advise_ssd = 1;
            advise_local_disk = 1;
            advices += 4;
        }

        /* Expire cycle. */
        if (!strcasecmp(event,"expire-cycle")) {
            advise_hz = 1;
            advise_large_objects = 1;
            advices += 2;
        }

        /* Eviction cycle. */
        if (!strcasecmp(event,"eviction-del")) {
            advise_large_objects = 1;
            advices++;
        }

        if (!strcasecmp(event,"eviction-cycle")) {
            advise_mass_eviction = 1;
            advices++;
        }

        report = sdscatlen(report,"\n",1);
    }
    dictReleaseIterator(di);

    /* Add non event based advices. */
    if (THPGetAnonHugePagesSize() > 0) {
        advise_disable_thp = 1;
        advices++;
    }

    if (eventnum == 0 && advices == 0) {
        report = sdscat(report,"Dave, no latency spike was observed during the lifetime of this Redis instance, not in the slightest bit. I honestly think you ought to sit down calmly, take a stress pill, and think things over.\n");
    } else if (eventnum > 0 && advices == 0) {
        report = sdscat(report,"\nWhile there are latency events logged, I'm not able to suggest any easy fix. Please use the Redis community to get some help, providing this report in your help request.\n");
    } else {
        /* Add all the suggestions accumulated so far. */

        /* Better VM. */
        report = sdscat(report,"\nI have a few advices for you:\n\n");
        if (advise_better_vm) {
            report = sdscat(report,"- If you are using a virtual machine, consider upgrading it with a faster one using an hypervisior that provides less latency during fork() calls. Xen is known to have poor fork() performance. Even in the context of the same VM provider, certain kinds of instances can execute fork faster than others.\n");
        }

        /* Slow log. */
        if (advise_slowlog_enabled) {
            report = sdscatprintf(report,"- There are latency issues with potentially slow commands you are using. Try to enable the Slow Log Redis feature using the command 'CONFIG SET slowlog-log-slower-than %llu'. If the Slow log is disabled Redis is not able to log slow commands execution for you.\n", (unsigned long long)server.latency_monitor_threshold*1000);
        }

        if (advise_slowlog_tuning) {
            report = sdscatprintf(report,"- Your current Slow Log configuration only logs events that are slower than your configured latency monitor threshold. Please use 'CONFIG SET slowlog-log-slower-than %llu'.\n", (unsigned long long)server.latency_monitor_threshold*1000);
        }

        if (advise_slowlog_inspect) {
            report = sdscat(report,"- Check your Slow Log to understand what are the commands you are running which are too slow to execute. Please check http://redis.io/commands/slowlog for more information.\n");
        }

        /* Intrinsic latency. */
        if (advise_scheduler) {
            report = sdscat(report,"- The system is slow to execute Redis code paths not containing system calls. This usually means the system does not provide Redis CPU time to run for long periods. You should try to:\n"
            "  1) Lower the system load.\n"
            "  2) Use a computer / VM just for Redis if you are running other softawre in the same system.\n"
            "  3) Check if you have a \"noisy neighbour\" problem.\n"
            "  4) Check with 'redis-cli --intrinsic-latency 100' what is the intrinsic latency in your system.\n"
            "  5) Check if the problem is allocator-related by recompiling Redis with MALLOC=libc, if you are using Jemalloc. However this may create fragmentation problems.\n");
        }

        /* AOF / Disk latency. */
        if (advise_local_disk) {
            report = sdscat(report,"- It is strongly advised to use local disks for persistence, especially if you are using AOF. Remote disks provided by platform-as-a-service providers are known to be slow.\n");
        }

        if (advise_ssd) {
            report = sdscat(report,"- SSD disks are able to reduce fsync latency, and total time needed for snapshotting and AOF log rewriting (resulting in smaller memory usage and smaller final AOF rewrite buffer flushes). With extremely high write load SSD disks can be a good option. However Redis should perform reasonably with high load using normal disks. Use this advice as a last resort.\n");
        }

        if (advise_data_writeback) {
            report = sdscat(report,"- Mounting ext3/4 filesystems with data=writeback can provide a performance boost compared to data=ordered, however this mode of operation provides less guarantees, and sometimes it can happen that after a hard crash the AOF file will have an half-written command at the end and will require to be repaired before Redis restarts.\n");
        }

        if (advise_disk_contention) {
            report = sdscat(report,"- Try to lower the disk contention. This is often caused by other disk intensive processes running in the same computer (including other Redis instances).\n");
        }

        if (advise_no_appendfsync) {
            report = sdscat(report,"- Assuming from the point of view of data safety this is viable in your environment, you could try to enable the 'no-appendfsync-on-rewrite' option, so that fsync will not be performed while there is a child rewriting the AOF file or producing an RDB file (the moment where there is high disk contention).\n");
        }

        if (advise_relax_fsync_policy && server.aof_fsync == AOF_FSYNC_ALWAYS) {
            report = sdscat(report,"- Your fsync policy is set to 'always'. It is very hard to get good performances with such a setup, if possible try to relax the fsync policy to 'onesec'.\n");
        }

        if (advise_write_load_info) {
            report = sdscat(report,"- Latency during the AOF atomic rename operation or when the final difference is flushed to the AOF file at the end of the rewrite, sometimes is caused by very high write load, causing the AOF buffer to get very large. If possible try to send less commands to accomplish the same work, or use Lua scripts to group multiple operations into a single EVALSHA call.\n");
        }

        if (advise_hz && server.hz < 100) {
            report = sdscat(report,"- In order to make the Redis keys expiring process more incremental, try to set the 'hz' configuration parameter to 100 using 'CONFIG SET hz 100'.\n");
        }

        if (advise_large_objects) {
            report = sdscat(report,"- Deleting, expiring or evicting (because of maxmemory policy) large objects is a blocking operation. If you have very large objects that are often deleted, expired, or evicted, try to fragment those objects into multiple smaller objects.\n");
        }

        if (advise_mass_eviction) {
            report = sdscat(report,"- Sudden changes to the 'maxmemory' setting via 'CONFIG SET', or allocation of large objects via sets or sorted sets intersections, STORE option of SORT, Redis Cluster large keys migrations (RESTORE command), may create sudden memory pressure forcing the server to block trying to evict keys. \n");
        }

        if (advise_disable_thp) {
            report = sdscat(report,"- I detected a non zero amount of anonymous huge pages used by your process. This creates very serious latency events in different conditions, especially when Redis is persisting on disk. To disable THP support use the command 'echo never > /sys/kernel/mm/transparent_hugepage/enabled', make sure to also add it into /etc/rc.local so that the command will be executed again after a reboot. Note that even if you have already disabled THP, you still need to restart the Redis process to get rid of the huge pages already created.\n");
        }
    }

    return report;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
callq 0x39222
movq %rax, %r15
leaq 0x83fdc(%rip), %rcx     # 0x106858
movq 0xa10(%rcx), %rdi
movq 0x28(%rdi), %rax
addq 0x48(%rdi), %rax
jne 0x828a3
cmpq $0x0, 0xa08(%rcx)
jne 0x828a3
leaq 0x4e2d1(%rip), %rsi     # 0xd0b6f
jmp 0x82e22
callq 0x320e5
movq %rax, 0x50(%rsp)
movq %rax, %rdi
callq 0x32116
testq %rax, %rax
je 0x82d8c
xorl %ebp, %ebp
movl $0x0, 0x24(%rsp)
movl $0x0, 0x30(%rsp)
movl $0x0, %r12d
movl $0x0, 0x1c(%rsp)
movl $0x0, 0x44(%rsp)
movl $0x0, 0x20(%rsp)
movl $0x0, 0x2c(%rsp)
movl $0x0, 0x4c(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
movl $0x0, 0x48(%rsp)
movl $0x0, 0x14(%rsp)
xorl %r13d, %r13d
movl $0x0, 0x40(%rsp)
movl $0x0, 0x34(%rsp)
movl $0x0, 0x28(%rsp)
movq 0x8(%rax), %rbx
testq %rbx, %rbx
je 0x82ce2
movq (%rax), %r14
testl %ebp, %ebp
jne 0x8295f
movq %r15, %rdi
leaq 0x4e338(%rip), %rsi     # 0xd0c8f
callq 0x39b26
movq %rax, %r15
incl %ebp
movq %r14, %rdi
leaq 0x58(%rsp), %rsi
callq 0x82744
movl 0x6c(%rsp), %r8d
movl 0x5c(%rsp), %r9d
movl 0x68(%rsp), %r10d
cvtsi2sdq 0x70(%rsp), %xmm0
cvtsi2sd %r8, %xmm1
divsd %xmm1, %xmm0
movl 0x4(%rbx), %r11d
movq %r15, %rdi
leaq 0x4e361(%rip), %rsi     # 0xd0cfc
movl %ebp, %edx
movq %r14, %rcx
movb $0x1, %al
pushq %r11
pushq %r10
callq 0x39eb7
addq $0x10, %rsp
movq %rax, %r15
movq %r14, %rdi
leaq 0x431b2(%rip), %rsi     # 0xc5b6e
callq 0x26300
testl %eax, %eax
jne 0x82a4e
leaq 0x83e88(%rip), %rax     # 0x106858
movsd 0x3c0(%rax), %xmm0
movsd 0x4e128(%rip), %xmm1    # 0xd0b08
ucomisd %xmm0, %xmm1
jbe 0x829fa
incl %r12d
movl $0x1, 0x24(%rsp)
leaq 0x4e372(%rip), %rdx     # 0xd0d6a
jmp 0x82a3a
movsd 0x4e10e(%rip), %xmm1    # 0xd0b10
ucomisd %xmm0, %xmm1
jbe 0x82a1c
incl %r12d
movl $0x1, 0x24(%rsp)
leaq 0x4e359(%rip), %rdx     # 0xd0d73
jmp 0x82a3a
movsd 0x3cae4(%rip), %xmm1    # 0xbf508
ucomisd %xmm0, %xmm1
leaq 0x4e34e(%rip), %rdx     # 0xd0d7d
leaq 0x4e342(%rip), %rax     # 0xd0d78
cmovaq %rax, %rdx
movq %r15, %rdi
leaq 0x4e343(%rip), %rsi     # 0xd0d87
movb $0x1, %al
callq 0x39eb7
movq %rax, %r15
movq %r14, %rdi
leaq 0x3dbdd(%rip), %rsi     # 0xc0635
callq 0x26300
testl %eax, %eax
jne 0x82ad1
leaq 0x83df0(%rip), %rcx     # 0x106858
movq 0x3f8(%rcx), %rax
movl $0x1, 0x34(%rsp)
testq %rax, %rax
je 0x82ab5
movabsq $0x20c49ba5e353f7cf, %rdx # imm = 0x20C49BA5E353F7CF
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x7, %rdx
addq %rax, %rdx
xorl %eax, %eax
cmpq 0xa08(%rcx), %rdx
setg %al
movl $0x1, %ecx
movl 0x28(%rsp), %edx
cmovgl %ecx, %edx
movl %edx, 0x28(%rsp)
jmp 0x82ac2
movl $0x1, %eax
movl $0x1, 0x30(%rsp)
addl %eax, %r12d
addl $0x2, %r12d
movl $0x1, 0x20(%rsp)
movq %r14, %rdi
leaq 0x3db10(%rip), %rsi     # 0xc05eb
callq 0x26300
xorl %ebx, %ebx
testl %eax, %eax
sete %bl
movl $0x1, %eax
cmovel %eax, %r13d
addl %r12d, %ebx
movq %r14, %rdi
leaq 0x45660(%rip), %rsi     # 0xc815d
callq 0x26300
testl %eax, %eax
jne 0x82b29
addl $0x4, %ebx
movl $0x1, 0x40(%rsp)
movl $0x1, 0x14(%rsp)
movl $0x1, 0x18(%rsp)
movl $0x1, 0x10(%rsp)
movl 0x1c(%rsp), %r12d
movq %r14, %rdi
leaq 0x4563d(%rip), %rsi     # 0xc8175
callq 0x26300
testl %eax, %eax
jne 0x82b5c
addl $0x3, %ebx
movl $0x1, 0x14(%rsp)
movl $0x1, 0x48(%rsp)
movl $0x1, 0x10(%rsp)
movl %r13d, 0x3c(%rsp)
movq %r14, %rdi
leaq 0x45621(%rip), %rsi     # 0xc818c
callq 0x26300
testl %eax, %eax
movl %ebp, 0x38(%rsp)
jne 0x82b93
addl $0x3, %ebx
movl $0x1, 0x14(%rsp)
movl $0x1, 0x18(%rsp)
movl $0x1, 0x10(%rsp)
movq %r14, %rdi
leaq 0x45781(%rip), %rsi     # 0xc831e
callq 0x26300
xorl %ebp, %ebp
testl %eax, %eax
sete %bpl
movl $0x1, %eax
cmovel %eax, %r12d
addl %ebx, %ebp
movq %r14, %rdi
leaq 0x45ef1(%rip), %rsi     # 0xc8ab0
callq 0x26300
testl %eax, %eax
je 0x82bdb
movq %r14, %rdi
leaq 0x4e1d5(%rip), %rsi     # 0xd0da7
callq 0x26300
testl %eax, %eax
jne 0x82bee
addl $0x2, %ebp
movl $0x1, 0x40(%rsp)
movl $0x1, 0x18(%rsp)
movq %r14, %rdi
leaq 0x45f6b(%rip), %rsi     # 0xc8b63
callq 0x26300
testl %eax, %eax
movl %r12d, 0x1c(%rsp)
je 0x82c1e
movq %r14, %rdi
leaq 0x45ff0(%rip), %rsi     # 0xc8c00
callq 0x26300
testl %eax, %eax
je 0x82c1e
movq %r15, %r13
jmp 0x82c44
movq %r15, %r13
addl $0x4, %ebp
movl $0x1, 0x14(%rsp)
movl $0x1, 0x18(%rsp)
movl $0x1, 0x10(%rsp)
movl $0x1, 0x4c(%rsp)
movq %r14, %rdi
leaq 0x3cd73(%rip), %rsi     # 0xbf9c1
callq 0x26300
movl %eax, %r12d
leal 0x2(%rbp), %ebx
movq %r14, %rdi
leaq 0x3e84a(%rip), %rsi     # 0xc14ad
callq 0x26300
testl %r12d, %r12d
movl 0x2c(%rsp), %ecx
movl $0x1, %r15d
cmovel %r15d, %ecx
movl %ecx, 0x2c(%rsp)
cmovnel %ebp, %ebx
movl 0x20(%rsp), %ecx
cmovel %r15d, %ecx
xorl %ebp, %ebp
testl %eax, %eax
sete %bpl
cmovel %r15d, %ecx
movl %ecx, 0x20(%rsp)
movq %r14, %rdi
leaq 0x3e820(%rip), %rsi     # 0xc14c2
callq 0x26300
xorl %r12d, %r12d
testl %eax, %eax
sete %r12b
movl 0x44(%rsp), %eax
cmovel %r15d, %eax
movl %eax, 0x44(%rsp)
addl %ebp, %r12d
addl %ebx, %r12d
movl $0x1, %edx
movq %r13, %rdi
leaq 0x3f186(%rip), %rsi     # 0xc1e57
callq 0x39a56
movq %rax, %r15
movl 0x38(%rsp), %ebp
movl 0x3c(%rsp), %r13d
movq 0x50(%rsp), %rdi
callq 0x32116
testq %rax, %rax
jne 0x82939
cmpl $0x0, 0x24(%rsp)
sete %bl
cmpl $0x0, 0x30(%rsp)
sete %r14b
cmpl $0x0, 0x28(%rsp)
sete 0xf(%rsp)
cmpl $0x0, 0x34(%rsp)
sete 0x30(%rsp)
testl %r13d, %r13d
sete 0x24(%rsp)
cmpl $0x0, 0x18(%rsp)
sete 0x34(%rsp)
cmpl $0x0, 0x10(%rsp)
sete 0x28(%rsp)
cmpl $0x0, 0x14(%rsp)
sete 0x10(%rsp)
cmpl $0x0, 0x40(%rsp)
sete 0x14(%rsp)
cmpl $0x0, 0x48(%rsp)
sete 0x38(%rsp)
cmpl $0x0, 0x1c(%rsp)
setne %al
movl %eax, 0x3c(%rsp)
cmpl $0x0, 0x4c(%rsp)
sete 0x18(%rsp)
cmpl $0x0, 0x2c(%rsp)
setne %al
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x20(%rsp)
sete 0x2c(%rsp)
cmpl $0x0, 0x44(%rsp)
sete 0x20(%rsp)
jmp 0x82ddd
movl $0x0, 0x1c(%rsp)
movb $0x1, 0xf(%rsp)
movb $0x1, 0x30(%rsp)
movb $0x1, 0x14(%rsp)
movb $0x1, 0x24(%rsp)
movb $0x1, 0x10(%rsp)
movb $0x1, 0x38(%rsp)
movb $0x1, 0x34(%rsp)
movb $0x1, 0x28(%rsp)
movb $0x1, 0x18(%rsp)
movb $0x1, 0x2c(%rsp)
movb $0x1, 0x20(%rsp)
movl $0x0, 0x3c(%rsp)
xorl %r12d, %r12d
movb $0x1, %r14b
movb $0x1, %bl
xorl %ebp, %ebp
movq 0x50(%rsp), %rdi
callq 0x321d3
leaq 0x4dd72(%rip), %rdi     # 0xd0b60
callq 0x3b5a7
movq %rax, %r13
xorl %eax, %eax
testl %r13d, %r13d
setg %al
negl %eax
testl %ebp, %ebp
jne 0x82e12
cmpl %eax, %r12d
jne 0x82e12
leaq 0x4dfab(%rip), %rsi     # 0xd0dbb
jmp 0x82e22
testl %ebp, %ebp
jle 0x82e38
cmpl %eax, %r12d
jne 0x82e38
leaq 0x4e05e(%rip), %rsi     # 0xd0e80
movq %r15, %rdi
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x39b26
leaq 0x4e0ed(%rip), %rsi     # 0xd0f2c
movq %r15, %rdi
callq 0x39b26
testb %bl, %bl
jne 0x82e5a
leaq 0x4e0fb(%rip), %rsi     # 0xd0f4d
movq %rax, %rdi
callq 0x39b26
testb %r14b, %r14b
jne 0x82e82
leaq 0x839f2(%rip), %rcx     # 0x106858
imulq $0x3e8, 0xa08(%rcx), %rdx # imm = 0x3E8
leaq 0x4e204(%rip), %rsi     # 0xd107c
movq %rax, %rdi
xorl %eax, %eax
callq 0x39eb7
cmpb $0x0, 0xf(%rsp)
jne 0x82eac
leaq 0x839c8(%rip), %rcx     # 0x106858
imulq $0x3e8, 0xa08(%rcx), %rdx # imm = 0x3E8
leaq 0x4e2e0(%rip), %rsi     # 0xd1182
movq %rax, %rdi
xorl %eax, %eax
callq 0x39eb7
cmpb $0x0, 0x30(%rsp)
jne 0x82ec2
leaq 0x4e376(%rip), %rsi     # 0xd1230
movq %rax, %rdi
callq 0x39b26
cmpb $0x0, 0x24(%rsp)
jne 0x82ed8
leaq 0x4e40e(%rip), %rsi     # 0xd12de
movq %rax, %rdi
callq 0x39b26
cmpb $0x0, 0x34(%rsp)
jne 0x82eee
leaq 0x4e662(%rip), %rsi     # 0xd1548
movq %rax, %rdi
callq 0x39b26
cmpb $0x0, 0x28(%rsp)
jne 0x82f04
leaq 0x4e6fa(%rip), %rsi     # 0xd15f6
movq %rax, %rdi
callq 0x39b26
cmpb $0x0, 0x10(%rsp)
jne 0x82f1a
leaq 0x4e84e(%rip), %rsi     # 0xd1760
movq %rax, %rdi
callq 0x39b26
cmpb $0x0, 0x14(%rsp)
jne 0x82f30
leaq 0x4e983(%rip), %rsi     # 0xd18ab
movq %rax, %rdi
callq 0x39b26
cmpb $0x0, 0x38(%rsp)
jne 0x82f46
leaq 0x4ea09(%rip), %rsi     # 0xd1947
movq %rax, %rdi
callq 0x39b26
leaq 0x8390b(%rip), %rcx     # 0x106858
cmpl $0x1, 0x65c(%rcx)
sete %cl
movl 0x3c(%rsp), %edx
andb %cl, %dl
cmpb $0x1, %dl
jne 0x82f71
leaq 0x4eb11(%rip), %rsi     # 0xd1a7a
movq %rax, %rdi
callq 0x39b26
cmpb $0x0, 0x18(%rsp)
jne 0x82f87
leaq 0x4eb97(%rip), %rsi     # 0xd1b16
movq %rax, %rdi
callq 0x39b26
leaq 0x838ca(%rip), %rcx     # 0x106858
cmpl $0x64, 0x20(%rcx)
setl %cl
movl 0x1c(%rsp), %edx
andb %cl, %dl
cmpb $0x1, %dl
jne 0x82faf
leaq 0x4ecda(%rip), %rsi     # 0xd1c81
movq %rax, %rdi
callq 0x39b26
cmpb $0x0, 0x2c(%rsp)
jne 0x82fc5
leaq 0x4ed58(%rip), %rsi     # 0xd1d15
movq %rax, %rdi
callq 0x39b26
cmpb $0x0, 0x20(%rsp)
jne 0x82fdb
leaq 0x4ee32(%rip), %rsi     # 0xd1e05
movq %rax, %rdi
callq 0x39b26
testl %r13d, %r13d
jle 0x82fef
leaq 0x4ef45(%rip), %rsi     # 0xd1f2c
movq %rax, %rdi
jmp 0x82e25
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq