// File: /workspace/github_c_makefile_star2_O0/gplessis[P]dotdeb-redis/src/server.c
// Function: serverCron
int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
    int j;
    UNUSED(eventLoop);
    UNUSED(id);
    UNUSED(clientData);

    /* Software watchdog: deliver the SIGALRM that will reach the signal
     * handler if we don't return here fast enough. */
    if (server.watchdog_period) watchdogScheduleSignal(server.watchdog_period);

    /* Update the time cache. */
    updateCachedTime();

    run_with_period(100) {
        trackInstantaneousMetric(STATS_METRIC_COMMAND,server.stat_numcommands);
        trackInstantaneousMetric(STATS_METRIC_NET_INPUT,
                server.stat_net_input_bytes);
        trackInstantaneousMetric(STATS_METRIC_NET_OUTPUT,
                server.stat_net_output_bytes);
    }

    /* We have just LRU_BITS bits per object for LRU information.
     * So we use an (eventually wrapping) LRU clock.
     *
     * Note that even if the counter wraps it's not a big problem,
     * everything will still work but some object will appear younger
     * to Redis. However for this to happen a given object should never be
     * touched for all the time needed to the counter to wrap, which is
     * not likely.
     *
     * Note that you can change the resolution altering the
     * LRU_CLOCK_RESOLUTION define. */
    server.lruclock = getLRUClock();

    /* Record the max memory used since the server was started. */
    if (zmalloc_used_memory() > server.stat_peak_memory)
        server.stat_peak_memory = zmalloc_used_memory();

    /* Sample the RSS here since this is a relatively slow call. */
    server.resident_set_size = zmalloc_get_rss();

    /* We received a SIGTERM, shutting down here in a safe way, as it is
     * not ok doing so inside the signal handler. */
    if (server.shutdown_asap) {
        if (prepareForShutdown(SHUTDOWN_NOFLAGS) == C_OK) exit(0);
        serverLog(LL_WARNING,"SIGTERM received but errors trying to shut down the server, check the logs for more information");
        server.shutdown_asap = 0;
    }

    /* Show some info about non-empty databases */
    run_with_period(5000) {
        for (j = 0; j < server.dbnum; j++) {
            long long size, used, vkeys;

            size = dictSlots(server.db[j].dict);
            used = dictSize(server.db[j].dict);
            vkeys = dictSize(server.db[j].expires);
            if (used || vkeys) {
                serverLog(LL_VERBOSE,"DB %d: %lld keys (%lld volatile) in %lld slots HT.",j,used,vkeys,size);
                /* dictPrintStats(server.dict); */
            }
        }
    }

    /* Show information about connected clients */
    if (!server.sentinel_mode) {
        run_with_period(5000) {
            serverLog(LL_VERBOSE,
                "%lu clients connected (%lu slaves), %zu bytes in use",
                listLength(server.clients)-listLength(server.slaves),
                listLength(server.slaves),
                zmalloc_used_memory());
        }
    }

    /* We need to do a few operations on clients asynchronously. */
    clientsCron();

    /* Handle background operations on Redis databases. */
    databasesCron();

    /* Start a scheduled AOF rewrite if this was requested by the user while
     * a BGSAVE was in progress. */
    if (server.rdb_child_pid == -1 && server.aof_child_pid == -1 &&
        server.aof_rewrite_scheduled)
    {
        rewriteAppendOnlyFileBackground();
    }

    /* Check if a background saving or AOF rewrite in progress terminated. */
    if (server.rdb_child_pid != -1 || server.aof_child_pid != -1 ||
        ldbPendingChildren())
    {
        int statloc;
        pid_t pid;

        if ((pid = wait3(&statloc,WNOHANG,NULL)) != 0) {
            int exitcode = WEXITSTATUS(statloc);
            int bysignal = 0;

            if (WIFSIGNALED(statloc)) bysignal = WTERMSIG(statloc);

            if (pid == -1) {
                serverLog(LL_WARNING,"wait3() returned an error: %s. "
                    "rdb_child_pid = %d, aof_child_pid = %d",
                    strerror(errno),
                    (int) server.rdb_child_pid,
                    (int) server.aof_child_pid);
            } else if (pid == server.rdb_child_pid) {
                backgroundSaveDoneHandler(exitcode,bysignal);
            } else if (pid == server.aof_child_pid) {
                backgroundRewriteDoneHandler(exitcode,bysignal);
            } else {
                if (!ldbRemoveChild(pid)) {
                    serverLog(LL_WARNING,
                        "Warning, detected child with unmatched pid: %ld",
                        (long)pid);
                }
            }
            updateDictResizePolicy();
        }
    } else {
        /* If there is not a background saving/rewrite in progress check if
         * we have to save/rewrite now */
         for (j = 0; j < server.saveparamslen; j++) {
            struct saveparam *sp = server.saveparams+j;

            /* Save if we reached the given amount of changes,
             * the given amount of seconds, and if the latest bgsave was
             * successful or if, in case of an error, at least
             * CONFIG_BGSAVE_RETRY_DELAY seconds already elapsed. */
            if (server.dirty >= sp->changes &&
                server.unixtime-server.lastsave > sp->seconds &&
                (server.unixtime-server.lastbgsave_try >
                 CONFIG_BGSAVE_RETRY_DELAY ||
                 server.lastbgsave_status == C_OK))
            {
                serverLog(LL_NOTICE,"%d changes in %d seconds. Saving...",
                    sp->changes, (int)sp->seconds);
                rdbSaveBackground(server.rdb_filename);
                break;
            }
         }

         /* Trigger an AOF rewrite if needed */
         if (server.rdb_child_pid == -1 &&
             server.aof_child_pid == -1 &&
             server.aof_rewrite_perc &&
             server.aof_current_size > server.aof_rewrite_min_size)
         {
            long long base = server.aof_rewrite_base_size ?
                            server.aof_rewrite_base_size : 1;
            long long growth = (server.aof_current_size*100/base) - 100;
            if (growth >= server.aof_rewrite_perc) {
                serverLog(LL_NOTICE,"Starting automatic rewriting of AOF on %lld%% growth",growth);
                rewriteAppendOnlyFileBackground();
            }
         }
    }


    /* AOF postponed flush: Try at every cron cycle if the slow fsync
     * completed. */
    if (server.aof_flush_postponed_start) flushAppendOnlyFile(0);

    /* AOF write errors: in this case we have a buffer to flush as well and
     * clear the AOF error in case of success to make the DB writable again,
     * however to try every second is enough in case of 'hz' is set to
     * an higher frequency. */
    run_with_period(1000) {
        if (server.aof_last_write_status == C_ERR)
            flushAppendOnlyFile(0);
    }

    /* Close clients that need to be closed asynchronous */
    freeClientsInAsyncFreeQueue();

    /* Clear the paused clients flag if needed. */
    clientsArePaused(); /* Don't check return value, just use the side effect. */

    /* Replication cron function -- used to reconnect to master,
     * detect transfer failures, start background RDB transfers and so forth. */
    run_with_period(1000) replicationCron();

    /* Run the Redis Cluster cron. */
    run_with_period(100) {
        if (server.cluster_enabled) clusterCron();
    }

    /* Run the Sentinel timer if we are in sentinel mode. */
    run_with_period(100) {
        if (server.sentinel_mode) sentinelTimer();
    }

    /* Cleanup expired MIGRATE cached sockets. */
    run_with_period(1000) {
        migrateCloseTimedoutSockets();
    }

    /* Start a scheduled BGSAVE if the corresponding flag is set. This is
     * useful when we are forced to postpone a BGSAVE because an AOF
     * rewrite is in progress.
     *
     * Note: this code must be after the replicationCron() call above so
     * make sure when refactoring this file to keep this order. This is useful
     * because we want to give priority to RDB savings for replication. */
    if (server.rdb_child_pid == -1 && server.aof_child_pid == -1 &&
        server.rdb_bgsave_scheduled &&
        (server.unixtime-server.lastbgsave_try > CONFIG_BGSAVE_RETRY_DELAY ||
         server.lastbgsave_status == C_OK))
    {
        if (rdbSaveBackground(server.rdb_filename) == C_OK)
            server.rdb_bgsave_scheduled = 0;
    }

    server.cronloops++;
    return 1000/server.hz;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpl $0x0, 0x147aea(%rip)    # 0x178c18
je 0x3113b
movl 0x147ae2(%rip), %edi    # 0x178c18
callq 0x798d0
callq 0x310e0
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x1470ac(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x64, %eax
cmpl %ecx, %eax
jle 0x31183
movl 0x1470e7(%rip), %eax    # 0x178244
movl %eax, -0x64(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x14708c(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x64, %eax
cltd
idivl %ecx
movl %eax, %ecx
movl -0x64(%rbp), %eax
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x311b3
movq 0x1473de(%rip), %rsi    # 0x178568
xorl %edi, %edi
callq 0x30a20
movq 0x147460(%rip), %rsi    # 0x1785f8
movl $0x1, %edi
callq 0x30a20
movq 0x147457(%rip), %rsi    # 0x178600
movl $0x2, %edi
callq 0x30a20
callq 0x30a00
movl %eax, %ecx
movl 0x147060(%rip), %eax    # 0x178220
andl $0xffffff, %ecx         # imm = 0xFFFFFF
andl $0xff000000, %eax       # imm = 0xFF000000
orl %ecx, %eax
movl %eax, 0x14704d(%rip)    # 0x178220
callq 0x3b090
cmpq 0x1473b9(%rip), %rax    # 0x178598
jbe 0x311ed
callq 0x3b090
movq %rax, 0x1473ab(%rip)    # 0x178598
callq 0x3b110
movq %rax, 0x1473f7(%rip)    # 0x1785f0
cmpl $0x0, 0x147024(%rip)    # 0x178224
je 0x31232
xorl %edi, %edi
callq 0x35010
cmpl $0x0, %eax
jne 0x31215
xorl %edi, %edi
callq 0x262d0
movl $0x3, %edi
leaq 0x1067a3(%rip), %rsi    # 0x1379c4
movb $0x0, %al
callq 0x2fc60
movl $0x0, 0x146ff2(%rip)    # 0x178224
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x146fba(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x1388, %eax           # imm = 0x1388
cmpl %ecx, %eax
jle 0x31279
movl 0x146ff5(%rip), %eax    # 0x178244
movl %eax, -0x68(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x146f9a(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x1388, %eax           # imm = 0x1388
cltd
idivl %ecx
movl %eax, %ecx
movl -0x68(%rbp), %eax
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x31375
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x14755f(%rip), %eax    # 0x1787e8
jge 0x31373
movq 0x146f6a(%rip), %rax    # 0x178200
movslq -0x1c(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0x146f51(%rip), %rcx    # 0x178200
movslq -0x1c(%rbp), %rdx
shlq $0x6, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
addq 0x38(%rcx), %rax
movq %rax, -0x28(%rbp)
movq 0x146f34(%rip), %rax    # 0x178200
movslq -0x1c(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq 0x146f1b(%rip), %rcx    # 0x178200
movslq -0x1c(%rbp), %rdx
shlq $0x6, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
addq 0x48(%rcx), %rax
movq %rax, -0x30(%rbp)
movq 0x146efe(%rip), %rax    # 0x178200
movslq -0x1c(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rax
movq 0x146ee4(%rip), %rcx    # 0x178200
movslq -0x1c(%rbp), %rdx
shlq $0x6, %rdx
addq %rdx, %rcx
movq 0x8(%rcx), %rcx
addq 0x48(%rcx), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x31341
cmpq $0x0, -0x38(%rbp)
je 0x31363
movl -0x1c(%rbp), %edx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x28(%rbp), %r9
movl $0x1, %edi
leaq 0x1066c8(%rip), %rsi    # 0x137a24
movb $0x0, %al
callq 0x2fc60
jmp 0x31365
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x31280
jmp 0x31375
cmpl $0x0, 0x146ef8(%rip)    # 0x178274
jne 0x31413
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x146e6a(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x1388, %eax           # imm = 0x1388
cmpl %ecx, %eax
jle 0x313c5
movl 0x146ea5(%rip), %eax    # 0x178244
movl %eax, -0x6c(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x146e4a(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x1388, %eax           # imm = 0x1388
cltd
idivl %ecx
movl %eax, %ecx
movl -0x6c(%rbp), %eax
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x31411
movq 0x146fd4(%rip), %rax    # 0x1783a0
movq 0x28(%rax), %rax
movq 0x146fe1(%rip), %rcx    # 0x1783b8
subq 0x28(%rcx), %rax
movq %rax, -0x80(%rbp)
movq 0x146fd2(%rip), %rax    # 0x1783b8
movq 0x28(%rax), %rax
movq %rax, -0x78(%rbp)
callq 0x3b090
movq -0x80(%rbp), %rdx
movq -0x78(%rbp), %rcx
movq %rax, %r8
movl $0x1, %edi
leaq 0x10664d(%rip), %rsi    # 0x137a57
movb $0x0, %al
callq 0x2fc60
jmp 0x31413
callq 0x30f00
callq 0x30fe0
cmpl $-0x1, 0x1474e4(%rip)   # 0x178908
jne 0x3143d
cmpl $-0x1, 0x147447(%rip)   # 0x178874
jne 0x3143d
cmpl $0x0, 0x14743a(%rip)    # 0x178870
je 0x3143d
callq 0x715a0
cmpl $-0x1, 0x1474c4(%rip)   # 0x178908
jne 0x3145d
cmpl $-0x1, 0x147427(%rip)   # 0x178874
jne 0x3145d
callq 0x8c2f0
cmpl $0x0, %eax
je 0x31547
leaq -0x3c(%rbp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x26870
movl %eax, -0x40(%rbp)
cmpl $0x0, %eax
je 0x31542
movl -0x3c(%rbp), %eax
andl $0xff00, %eax           # imm = 0xFF00
sarl $0x8, %eax
movl %eax, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movl -0x3c(%rbp), %eax
andl $0x7f, %eax
addl $0x1, %eax
movsbl %al, %eax
sarl %eax
cmpl $0x0, %eax
jle 0x314ac
movl -0x3c(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0x48(%rbp)
cmpl $-0x1, -0x40(%rbp)
jne 0x314e3
callq 0x26880
movl (%rax), %edi
callq 0x26690
movq %rax, %rdx
movl 0x147441(%rip), %ecx    # 0x178908
movl 0x1473a6(%rip), %r8d    # 0x178874
movl $0x3, %edi
leaq 0x1065b2(%rip), %rsi    # 0x137a8c
movb $0x0, %al
callq 0x2fc60
jmp 0x3153d
movl -0x40(%rbp), %eax
cmpl 0x14741c(%rip), %eax    # 0x178908
jne 0x314fb
movl -0x44(%rbp), %edi
movl -0x48(%rbp), %esi
callq 0x56f50
jmp 0x3153b
movl -0x40(%rbp), %eax
cmpl 0x147370(%rip), %eax    # 0x178874
jne 0x31513
movl -0x44(%rbp), %edi
movl -0x48(%rbp), %esi
callq 0x74280
jmp 0x31539
movl -0x40(%rbp), %edi
callq 0x8c2a0
cmpl $0x0, %eax
jne 0x31537
movslq -0x40(%rbp), %rdx
movl $0x3, %edi
leaq 0x1065a2(%rip), %rsi    # 0x137ad2
movb $0x0, %al
callq 0x2fc60
jmp 0x31539
jmp 0x3153b
jmp 0x3153d
callq 0x305c0
jmp 0x316ac
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0x1473c1(%rip), %eax    # 0x178918
jge 0x315fc
movq 0x1473ac(%rip), %rax    # 0x178910
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq 0x14737e(%rip), %rax    # 0x1788f8
movq -0x50(%rbp), %rcx
movslq 0x8(%rcx), %rcx
cmpq %rcx, %rax
jl 0x315ec
movq 0x1475c2(%rip), %rax    # 0x178b50
subq 0x14739b(%rip), %rax    # 0x178930
movq -0x50(%rbp), %rcx
cmpq (%rcx), %rax
jle 0x315ec
movq 0x1475ab(%rip), %rax    # 0x178b50
subq 0x14738c(%rip), %rax    # 0x178938
cmpq $0x5, %rax
jg 0x315bb
cmpl $0x0, 0x14739f(%rip)    # 0x178958
jne 0x315ec
movq -0x50(%rbp), %rax
movl 0x8(%rax), %edx
movq -0x50(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movl $0x2, %edi
leaq 0x10652b(%rip), %rsi    # 0x137b02
movb $0x0, %al
callq 0x2fc60
movq 0x14733b(%rip), %rdi    # 0x178920
callq 0x55360
jmp 0x315fc
jmp 0x315ee
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x3154e
cmpl $-0x1, 0x147305(%rip)   # 0x178908
jne 0x316aa
cmpl $-0x1, 0x147264(%rip)   # 0x178874
jne 0x316aa
cmpl $0x0, 0x147237(%rip)    # 0x178854
je 0x316aa
movq 0x14723e(%rip), %rax    # 0x178868
cmpq 0x147227(%rip), %rax    # 0x178858
jle 0x316aa
cmpq $0x0, 0x147225(%rip)    # 0x178860
je 0x3164d
movq 0x14721c(%rip), %rax    # 0x178860
movq %rax, -0x88(%rbp)
jmp 0x3165b
movl $0x1, %eax
movq %rax, -0x88(%rbp)
jmp 0x3165b
movq -0x88(%rbp), %rax
movq %rax, -0x58(%rbp)
imulq $0x64, 0x1471fa(%rip), %rax # 0x178868
cqto
idivq -0x58(%rbp)
subq $0x64, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movslq 0x1471cd(%rip), %rcx    # 0x178854
cmpq %rcx, %rax
jl 0x316a8
movq -0x60(%rbp), %rdx
movl $0x2, %edi
leaq 0x10648a(%rip), %rsi    # 0x137b26
movb $0x0, %al
callq 0x2fc60
callq 0x715a0
jmp 0x316aa
jmp 0x316ac
cmpq $0x0, 0x1471dc(%rip)    # 0x178890
je 0x316bd
xorl %edi, %edi
callq 0x70c00
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x146b2f(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x3e8, %eax            # imm = 0x3E8
cmpl %ecx, %eax
jle 0x31706
movl 0x146b6a(%rip), %eax    # 0x178244
movl %eax, -0x8c(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x146b0c(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl %ecx
movl %eax, %ecx
movl -0x8c(%rbp), %eax
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x31718
cmpl $-0x1, 0x1471b7(%rip)   # 0x1788c4
jne 0x31716
xorl %edi, %edi
callq 0x70c00
jmp 0x31718
callq 0x444d0
callq 0x454e0
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x146aca(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x3e8, %eax            # imm = 0x3E8
cmpl %ecx, %eax
jle 0x3176b
movl 0x146b05(%rip), %eax    # 0x178244
movl %eax, -0x90(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x146aa7(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl %ecx
movl %eax, %ecx
movl -0x90(%rbp), %eax
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x31770
callq 0x52460
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x146a7c(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x64, %eax
cmpl %ecx, %eax
jle 0x317b9
movl 0x146ab7(%rip), %eax    # 0x178244
movl %eax, -0x94(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x146a59(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x64, %eax
cltd
idivl %ecx
movl %eax, %ecx
movl -0x94(%rbp), %eax
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x317c9
cmpl $0x0, 0x1473b4(%rip)    # 0x178b74
je 0x317c7
callq 0x82a10
jmp 0x317c9
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x146a23(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x64, %eax
cmpl %ecx, %eax
jle 0x31812
movl 0x146a5e(%rip), %eax    # 0x178244
movl %eax, -0x98(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x146a00(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x64, %eax
cltd
idivl %ecx
movl %eax, %ecx
movl -0x98(%rbp), %eax
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x31822
cmpl $0x0, 0x146a5b(%rip)    # 0x178274
je 0x31820
callq 0x9c920
jmp 0x31822
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x1469ca(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x3e8, %eax            # imm = 0x3E8
cmpl %ecx, %eax
jle 0x3186b
movl 0x146a05(%rip), %eax    # 0x178244
movl %eax, -0x9c(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x1469a7(%rip)          # 0x1781f8
movl %eax, %ecx
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl %ecx
movl %eax, %ecx
movl -0x9c(%rbp), %eax
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x31870
callq 0x85fa0
cmpl $-0x1, 0x147091(%rip)   # 0x178908
jne 0x318c5
cmpl $-0x1, 0x146ff4(%rip)   # 0x178874
jne 0x318c5
cmpl $0x0, 0x1470c7(%rip)    # 0x178950
je 0x318c5
movq 0x1472be(%rip), %rax    # 0x178b50
subq 0x14709f(%rip), %rax    # 0x178938
cmpq $0x5, %rax
jg 0x318a8
cmpl $0x0, 0x1470b2(%rip)    # 0x178958
jne 0x318c5
movq 0x147071(%rip), %rdi    # 0x178920
callq 0x55360
cmpl $0x0, %eax
jne 0x318c3
movl $0x0, 0x14708d(%rip)    # 0x178950
jmp 0x318c5
movl 0x146979(%rip), %eax    # 0x178244
addl $0x1, %eax
movl %eax, 0x146970(%rip)    # 0x178244
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0x146918(%rip)          # 0x1781f8
addq $0xa0, %rsp
popq %rbp
retq
nopl (%rax)