// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/redis.c
// Function: serverCron
int serverCron(struct aeEventLoop *eventLoop, long long id, void *clientData) {
    int j;
    REDIS_NOTUSED(eventLoop);
    REDIS_NOTUSED(id);
    REDIS_NOTUSED(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) trackOperationsPerSecond();

    /* We have just REDIS_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.
     *
     * 即使服务器的时间最终比 1.5 年长也无所谓，
     * 对象系统仍会正常运作，不过一些对象可能会比服务器本身的时钟更年轻。
     * 不过这要这个对象在 1.5 年内都没有被访问过，才会出现这种现象。
     *
     * Note that you can change the resolution altering the
     * REDIS_LRU_CLOCK_RESOLUTION define.
     *
     * LRU 时间的精度可以通过修改 REDIS_LRU_CLOCK_RESOLUTION 常量来改变。
     */
    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. */
    // 服务器进程收到 SIGTERM 信号，关闭服务器
    if (server.shutdown_asap) {

        // 尝试关闭服务器
        if (prepareForShutdown(0) == REDIS_OK) exit(0);

        // 如果关闭失败，那么打印 LOG ，并移除关闭标识
        redisLog(REDIS_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);

            // 用 LOG 打印数量
            if (used || vkeys) {
                redisLog(REDIS_VERBOSE,"DB %d: %lld keys (%lld volatile) in %lld slots HT.",j,used,vkeys,size);
                /* dictPrintStats(server.dict); */
            }
        }
    }

    /* Show information about connected clients */
    // 如果服务器没有运行在 SENTINEL 模式下，那么打印客户端的连接信息
    if (!server.sentinel_mode) {
        run_with_period(5000) {
            redisLog(REDIS_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. */
    // 如果 BGSAVE 和 BGREWRITEAOF 都没有在执行
    // 并且有一个 BGREWRITEAOF 在等待，那么执行 BGREWRITEAOF
    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. */
    // 检查 BGSAVE 或者 BGREWRITEAOF 是否已经执行完毕
    if (server.rdb_child_pid != -1 || server.aof_child_pid != -1) {
        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);

            // BGSAVE 执行完毕
            if (pid == server.rdb_child_pid) {
                backgroundSaveDoneHandler(exitcode,bysignal);

            // BGREWRITEAOF 执行完毕
            } else if (pid == server.aof_child_pid) {
                backgroundRewriteDoneHandler(exitcode,bysignal);

            } else {
                redisLog(REDIS_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 */
        // 既然没有 BGSAVE 或者 BGREWRITEAOF 在执行，那么检查是否需要执行它们

        // 遍历所有保存条件，看是否需要执行 BGSAVE 命令
         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
             * REDIS_BGSAVE_RETRY_DELAY seconds already elapsed. */
            // 检查是否有某个保存条件已经满足了
            if (server.dirty >= sp->changes &&
                server.unixtime-server.lastsave > sp->seconds &&
                (server.unixtime-server.lastbgsave_try >
                 REDIS_BGSAVE_RETRY_DELAY ||
                 server.lastbgsave_status == REDIS_OK))
            {
                redisLog(REDIS_NOTICE,"%d changes in %d seconds. Saving...",
                    sp->changes, (int)sp->seconds);
                // 执行 BGSAVE
                rdbSaveBackground(server.rdb_filename);
                break;
            }
         }

         /* Trigger an AOF rewrite if needed */
        // 出发 BGREWRITEAOF
         if (server.rdb_child_pid == -1 &&
             server.aof_child_pid == -1 &&
             server.aof_rewrite_perc &&
             // AOF 文件的当前大小大于执行 BGREWRITEAOF 所需的最小大小
             server.aof_current_size > server.aof_rewrite_min_size)
         {
            // 上一次完成 AOF 写入之后，AOF 文件的大小
            long long base = server.aof_rewrite_base_size ?
                            server.aof_rewrite_base_size : 1;

            // AOF 文件当前的体积相对于 base 的体积的百分比
            long long growth = (server.aof_current_size*100/base) - 100;

            // 如果增长体积的百分比超过了 growth ，那么执行 BGREWRITEAOF
            if (growth >= server.aof_rewrite_perc) {
                redisLog(REDIS_NOTICE,"Starting automatic rewriting of AOF on %lld%% growth",growth);
                // 执行 BGREWRITEAOF
                rewriteAppendOnlyFileBackground();
            }
         }
    }

    // 根据 AOF 政策，
    // 考虑是否需要将 AOF 缓冲区中的内容写入到 AOF 文件中
    /* 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 == REDIS_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 and
     * to detect transfer failures. */
    // 复制函数
    // 重连接主服务器、向主服务器发送 ACK 、判断数据发送失败情况、断开本服务器超时的从服务器，等等
    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. */
    // 如果服务器运行在 sentinel 模式下，那么执行 SENTINEL 的主函数
    run_with_period(100) {
        if (server.sentinel_mode) sentinelTimer();
    }

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

    // 增加 loop 计数器
    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, 0xedf52(%rip)     # 0x114130
je 0x261eb
movl 0xedf4a(%rip), %edi     # 0x114130
callq 0x65b00
callq 0x26190
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed704(%rip)           # 0x113900
movl %eax, %ecx
movl $0x64, %eax
cmpl %ecx, %eax
jle 0x26233
movl 0xed73f(%rip), %eax     # 0x11394c
movl %eax, -0x64(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed6e4(%rip)           # 0x113900
movl %eax, %ecx
movl $0x64, %eax
cltd
idivl %ecx
movl %eax, %ecx
movl -0x64(%rbp), %eax
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x26238
callq 0x25cd0
callq 0x25cb0
movl %eax, %ecx
movl 0xed6e3(%rip), %eax     # 0x113928
andl $0xffffff, %ecx         # imm = 0xFFFFFF
andl $0xff000000, %eax       # imm = 0xFF000000
orl %ecx, %eax
movl %eax, 0xed6d0(%rip)     # 0x113928
callq 0x2e480
cmpq 0xeda0c(%rip), %rax     # 0x113c70
jbe 0x26272
callq 0x2e480
movq %rax, 0xed9fe(%rip)     # 0x113c70
callq 0x2e4f0
movq %rax, 0xeda42(%rip)     # 0x113cc0
cmpl $0x0, 0xed6a7(%rip)     # 0x11392c
je 0x262b7
xorl %edi, %edi
callq 0x29980
cmpl $0x0, %eax
jne 0x2629a
xorl %edi, %edi
callq 0x1f2c0
movl $0x3, %edi
leaq 0xb84a5(%rip), %rsi     # 0xde74b
movb $0x0, %al
callq 0x24fb0
movl $0x0, 0xed675(%rip)     # 0x11392c
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed63d(%rip)           # 0x113900
movl %eax, %ecx
movl $0x1388, %eax           # imm = 0x1388
cmpl %ecx, %eax
jle 0x262fe
movl 0xed678(%rip), %eax     # 0x11394c
movl %eax, -0x68(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed61d(%rip)           # 0x113900
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 0x263fa
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0xeda6a(%rip), %eax     # 0x113d78
jge 0x263f8
movq 0xed5ed(%rip), %rax     # 0x113908
movslq -0x1c(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq 0xed5d4(%rip), %rcx     # 0x113908
movslq -0x1c(%rbp), %rdx
shlq $0x6, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
addq 0x38(%rcx), %rax
movq %rax, -0x28(%rbp)
movq 0xed5b7(%rip), %rax     # 0x113908
movslq -0x1c(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq 0xed59e(%rip), %rcx     # 0x113908
movslq -0x1c(%rbp), %rdx
shlq $0x6, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
addq 0x48(%rcx), %rax
movq %rax, -0x30(%rbp)
movq 0xed581(%rip), %rax     # 0x113908
movslq -0x1c(%rbp), %rcx
shlq $0x6, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rax
movq 0xed567(%rip), %rcx     # 0x113908
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 0x263c6
cmpq $0x0, -0x38(%rbp)
je 0x263e8
movl -0x1c(%rbp), %edx
movq -0x30(%rbp), %rcx
movq -0x38(%rbp), %r8
movq -0x28(%rbp), %r9
movl $0x1, %edi
leaq 0xb83ca(%rip), %rsi     # 0xde7ab
movb $0x0, %al
callq 0x24fb0
jmp 0x263ea
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x26305
jmp 0x263fa
cmpl $0x0, 0xed57b(%rip)     # 0x11397c
jne 0x26498
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed4ed(%rip)           # 0x113900
movl %eax, %ecx
movl $0x1388, %eax           # imm = 0x1388
cmpl %ecx, %eax
jle 0x2644a
movl 0xed528(%rip), %eax     # 0x11394c
movl %eax, -0x6c(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed4cd(%rip)           # 0x113900
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 0x26496
movq 0xed657(%rip), %rax     # 0x113aa8
movq 0x28(%rax), %rax
movq 0xed65c(%rip), %rcx     # 0x113ab8
subq 0x28(%rcx), %rax
movq %rax, -0x80(%rbp)
movq 0xed64d(%rip), %rax     # 0x113ab8
movq 0x28(%rax), %rax
movq %rax, -0x78(%rbp)
callq 0x2e480
movq -0x80(%rbp), %rdx
movq -0x78(%rbp), %rcx
movq %rax, %r8
movl $0x1, %edi
leaq 0xb834f(%rip), %rsi     # 0xde7de
movb $0x0, %al
callq 0x24fb0
jmp 0x26498
callq 0x25fc0
callq 0x26090
cmpl $-0x1, 0xed9bf(%rip)    # 0x113e68
jne 0x264c2
cmpl $-0x1, 0xed94a(%rip)    # 0x113dfc
jne 0x264c2
cmpl $0x0, 0xed93d(%rip)     # 0x113df8
je 0x264c2
callq 0x5f290
cmpl $-0x1, 0xed99f(%rip)    # 0x113e68
jne 0x264d8
cmpl $-0x1, 0xed92a(%rip)    # 0x113dfc
je 0x26576
leaq -0x3c(%rbp), %rdi
movl $0x1, %esi
xorl %eax, %eax
movl %eax, %edx
callq 0x1f810
movl %eax, -0x40(%rbp)
cmpl $0x0, %eax
je 0x26571
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 0x26523
movl -0x3c(%rbp), %eax
andl $0x7f, %eax
movl %eax, -0x48(%rbp)
movl -0x40(%rbp), %eax
cmpl 0xed93c(%rip), %eax     # 0x113e68
jne 0x2653b
movl -0x44(%rbp), %edi
movl -0x48(%rbp), %esi
callq 0x463d0
jmp 0x2656c
movl -0x40(%rbp), %eax
cmpl 0xed8b8(%rip), %eax     # 0x113dfc
jne 0x26553
movl -0x44(%rbp), %edi
movl -0x48(%rbp), %esi
callq 0x61490
jmp 0x2656a
movslq -0x40(%rbp), %rdx
movl $0x3, %edi
leaq 0xb82b0(%rip), %rsi     # 0xde813
movb $0x0, %al
callq 0x24fb0
jmp 0x2656c
callq 0x258c0
jmp 0x266db
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
cmpl 0xed8f2(%rip), %eax     # 0x113e78
jge 0x2662b
movq 0xed8dd(%rip), %rax     # 0x113e70
movslq -0x1c(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq 0xed8af(%rip), %rax     # 0x113e58
movq -0x50(%rbp), %rcx
movslq 0x8(%rcx), %rcx
cmpq %rcx, %rax
jl 0x2661b
movq 0xedad3(%rip), %rax     # 0x114090
subq 0xed8cc(%rip), %rax     # 0x113e90
movq -0x50(%rbp), %rcx
cmpq (%rcx), %rax
jle 0x2661b
movq 0xedabc(%rip), %rax     # 0x114090
subq 0xed8bd(%rip), %rax     # 0x113e98
cmpq $0x5, %rax
jg 0x265ea
cmpl $0x0, 0xed8c8(%rip)     # 0x113eb0
jne 0x2661b
movq -0x50(%rbp), %rax
movl 0x8(%rax), %edx
movq -0x50(%rbp), %rax
movq (%rax), %rax
movl %eax, %ecx
movl $0x2, %edi
leaq 0xb823d(%rip), %rsi     # 0xde843
movb $0x0, %al
callq 0x24fb0
movq 0xed86c(%rip), %rdi     # 0x113e80
callq 0x44ef0
jmp 0x2662b
jmp 0x2661d
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x2657d
cmpl $-0x1, 0xed836(%rip)    # 0x113e68
jne 0x266d9
cmpl $-0x1, 0xed7bd(%rip)    # 0x113dfc
jne 0x266d9
cmpl $0x0, 0xed790(%rip)     # 0x113ddc
je 0x266d9
movq 0xed797(%rip), %rax     # 0x113df0
cmpq 0xed780(%rip), %rax     # 0x113de0
jle 0x266d9
cmpq $0x0, 0xed77e(%rip)     # 0x113de8
je 0x2667c
movq 0xed775(%rip), %rax     # 0x113de8
movq %rax, -0x88(%rbp)
jmp 0x2668a
movl $0x1, %eax
movq %rax, -0x88(%rbp)
jmp 0x2668a
movq -0x88(%rbp), %rax
movq %rax, -0x58(%rbp)
imulq $0x64, 0xed753(%rip), %rax # 0x113df0
cqto
idivq -0x58(%rbp)
subq $0x64, %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movslq 0xed726(%rip), %rcx     # 0x113ddc
cmpq %rcx, %rax
jl 0x266d7
movq -0x60(%rbp), %rdx
movl $0x2, %edi
leaq 0xb819c(%rip), %rsi     # 0xde867
movb $0x0, %al
callq 0x24fb0
callq 0x5f290
jmp 0x266d9
jmp 0x266db
cmpq $0x0, 0xed735(%rip)     # 0x113e18
je 0x266ec
xorl %edi, %edi
callq 0x5ec30
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed208(%rip)           # 0x113900
movl %eax, %ecx
movl $0x3e8, %eax            # imm = 0x3E8
cmpl %ecx, %eax
jle 0x26735
movl 0xed243(%rip), %eax     # 0x11394c
movl %eax, -0x8c(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed1e5(%rip)           # 0x113900
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 0x26747
cmpl $-0x1, 0xed710(%rip)    # 0x113e4c
jne 0x26745
xorl %edi, %edi
callq 0x5ec30
jmp 0x26747
callq 0x37060
callq 0x37b90
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed1a3(%rip)           # 0x113900
movl %eax, %ecx
movl $0x3e8, %eax            # imm = 0x3E8
cmpl %ecx, %eax
jle 0x2679a
movl 0xed1de(%rip), %eax     # 0x11394c
movl %eax, -0x90(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed180(%rip)           # 0x113900
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 0x2679f
callq 0x429f0
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed155(%rip)           # 0x113900
movl %eax, %ecx
movl $0x64, %eax
cmpl %ecx, %eax
jle 0x267e8
movl 0xed190(%rip), %eax     # 0x11394c
movl %eax, -0x94(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed132(%rip)           # 0x113900
movl %eax, %ecx
movl $0x64, %eax
cltd
idivl %ecx
movl %eax, %ecx
movl -0x94(%rbp), %eax
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x267f8
cmpl $0x0, 0xed8c5(%rip)     # 0x1140b4
je 0x267f6
callq 0x6e270
jmp 0x267f8
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed0fc(%rip)           # 0x113900
movl %eax, %ecx
movl $0x64, %eax
cmpl %ecx, %eax
jle 0x26841
movl 0xed137(%rip), %eax     # 0x11394c
movl %eax, -0x98(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed0d9(%rip)           # 0x113900
movl %eax, %ecx
movl $0x64, %eax
cltd
idivl %ecx
movl %eax, %ecx
movl -0x98(%rbp), %eax
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x26851
cmpl $0x0, 0xed134(%rip)     # 0x11397c
je 0x2684f
callq 0x80f60
jmp 0x26851
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed0a3(%rip)           # 0x113900
movl %eax, %ecx
movl $0x3e8, %eax            # imm = 0x3E8
cmpl %ecx, %eax
jle 0x2689a
movl 0xed0de(%rip), %eax     # 0x11394c
movl %eax, -0x9c(%rbp)
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed080(%rip)           # 0x113900
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 0x2689f
callq 0x71290
movl 0xed0a7(%rip), %eax     # 0x11394c
addl $0x1, %eax
movl %eax, 0xed09e(%rip)     # 0x11394c
movl $0x3e8, %eax            # imm = 0x3E8
cltd
idivl 0xed046(%rip)           # 0x113900
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)