// File: /workspace/github_c_makefile_star2_O1/zhou-yuxin[P]redis-aof-no-cow/src/debug.c
// Function: debugCommand
void debugCommand(client *c) {
    if (c->argc == 1) {
        addReplyError(c,"You must specify a subcommand for DEBUG. Try DEBUG HELP for info.");
        return;
    }

    if (!strcasecmp(c->argv[1]->ptr,"help")) {
        void *blenp = addDeferredMultiBulkLength(c);
        int blen = 0;
        blen++; addReplyStatus(c,
        "DEBUG <subcommand> arg arg ... arg. Subcommands:");
        blen++; addReplyStatus(c,
        "segfault -- Crash the server with sigsegv.");
        blen++; addReplyStatus(c,
        "restart  -- Graceful restart: save config, db, restart.");
        blen++; addReplyStatus(c,
        "crash-and-recovery <milliseconds> -- Hard crash and restart after <milliseconds> delay.");
        blen++; addReplyStatus(c,
        "assert   -- Crash by assertion failed.");
        blen++; addReplyStatus(c,
        "reload   -- Save the RDB on disk and reload it back in memory.");
        blen++; addReplyStatus(c,
        "loadaof  -- Flush the AOF buffers on disk and reload the AOF in memory.");
        blen++; addReplyStatus(c,
        "object <key> -- Show low level info about key and associated value.");
        blen++; addReplyStatus(c,
        "sdslen <key> -- Show low level SDS string info representing key and value.");
        blen++; addReplyStatus(c,
        "populate <count> [prefix] -- Create <count> string keys named key:<num>. If a prefix is specified is used instead of the 'key' prefix.");
        blen++; addReplyStatus(c,
        "digest   -- Outputs an hex signature representing the current DB content.");
        blen++; addReplyStatus(c,
        "sleep <seconds> -- Stop the server for <seconds>. Decimals allowed.");
        blen++; addReplyStatus(c,
        "set-active-expire (0|1) -- Setting it to 0 disables expiring keys in background when they are not accessed (otherwise the Redis behavior). Setting it to 1 reenables back the default.");
        blen++; addReplyStatus(c,
        "lua-always-replicate-commands (0|1) -- Setting it to 1 makes Lua replication defaulting to replicating single commands, without the script having to enable effects replication.");
        blen++; addReplyStatus(c,
        "error <string> -- Return a Redis protocol error with <string> as message. Useful for clients unit tests to simulate Redis errors.");
        blen++; addReplyStatus(c,
        "structsize -- Return the size of different Redis core C structures.");
        blen++; addReplyStatus(c,
        "htstats <dbid> -- Return hash table statistics of the specified Redis database.");
        blen++; addReplyStatus(c,
        "jemalloc info  -- Show internal jemalloc statistics.");
        blen++; addReplyStatus(c,
        "jemalloc purge -- Force jemalloc to release unused memory.");
        setDeferredMultiBulkLength(c,blenp,blen);
    } else if (!strcasecmp(c->argv[1]->ptr,"segfault")) {
        *((char*)-1) = 'x';
    } else if (!strcasecmp(c->argv[1]->ptr,"restart") ||
               !strcasecmp(c->argv[1]->ptr,"crash-and-recover"))
    {
        long long delay = 0;
        if (c->argc >= 3) {
            if (getLongLongFromObjectOrReply(c, c->argv[2], &delay, NULL)
                != C_OK) return;
            if (delay < 0) delay = 0;
        }
        int flags = !strcasecmp(c->argv[1]->ptr,"restart") ?
            (RESTART_SERVER_GRACEFULLY|RESTART_SERVER_CONFIG_REWRITE) :
             RESTART_SERVER_NONE;
        restartServer(flags,delay);
        addReplyError(c,"failed to restart the server. Check server logs.");
    } else if (!strcasecmp(c->argv[1]->ptr,"oom")) {
        void *ptr = zmalloc(ULONG_MAX); /* Should trigger an out of memory. */
        zfree(ptr);
        addReply(c,shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr,"assert")) {
        if (c->argc >= 3) c->argv[2] = tryObjectEncoding(c->argv[2]);
        serverAssertWithInfo(c,c->argv[0],1 == 2);
    } else if (!strcasecmp(c->argv[1]->ptr,"reload")) {
        if (rdbSave(server.rdb_filename) != C_OK) {
            addReply(c,shared.err);
            return;
        }
        emptyDb(NULL);
        if (rdbLoad(server.rdb_filename) != C_OK) {
            addReplyError(c,"Error trying to load the RDB dump");
            return;
        }
        serverLog(LL_WARNING,"DB reloaded by DEBUG RELOAD");
        addReply(c,shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr,"loadaof")) {
        if (server.aof_state == AOF_ON) flushAppendOnlyFile(1);
        emptyDb(NULL);
        if (loadAppendOnlyFile(server.aof_filename) != C_OK) {
            addReply(c,shared.err);
            return;
        }
        server.dirty = 0; /* Prevent AOF / replication */
        serverLog(LL_WARNING,"Append Only File loaded by DEBUG LOADAOF");
        addReply(c,shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr,"object") && c->argc == 3) {
        dictEntry *de;
        robj *val;
        char *strenc;

        if ((de = dictFind(c->db->dict,c->argv[2]->ptr)) == NULL) {
            addReply(c,shared.nokeyerr);
            return;
        }
        val = dictGetVal(de);
        strenc = strEncoding(val->encoding);

        char extra[128] = {0};
        if (val->encoding == OBJ_ENCODING_QUICKLIST) {
            char *nextra = extra;
            int remaining = sizeof(extra);
            quicklist *ql = val->ptr;
            /* Add number of quicklist nodes */
            int used = snprintf(nextra, remaining, " ql_nodes:%u", ql->len);
            nextra += used;
            remaining -= used;
            /* Add average quicklist fill factor */
            double avg = (double)ql->count/ql->len;
            used = snprintf(nextra, remaining, " ql_avg_node:%.2f", avg);
            nextra += used;
            remaining -= used;
            /* Add quicklist fill level / max ziplist size */
            used = snprintf(nextra, remaining, " ql_ziplist_max:%d", ql->fill);
            nextra += used;
            remaining -= used;
            /* Add isCompressed? */
            int compressed = ql->compress != 0;
            used = snprintf(nextra, remaining, " ql_compressed:%d", compressed);
            nextra += used;
            remaining -= used;
            /* Add total uncompressed size */
            unsigned long sz = 0;
            for (quicklistNode *node = ql->head; node; node = node->next) {
                sz += node->sz;
            }
            used = snprintf(nextra, remaining, " ql_uncompressed_size:%lu", sz);
            nextra += used;
            remaining -= used;
        }

        addReplyStatusFormat(c,
            "Value at:%p refcount:%d "
            "encoding:%s serializedlength:%zu "
            "lru:%d lru_seconds_idle:%llu%s",
            (void*)val, val->refcount,
            strenc, rdbSavedObjectLen(val),
            val->lru, estimateObjectIdleTime(val)/1000, extra);
    } else if (!strcasecmp(c->argv[1]->ptr,"sdslen") && c->argc == 3) {
        dictEntry *de;
        robj *val;
        sds key;

        if ((de = dictFind(c->db->dict,c->argv[2]->ptr)) == NULL) {
            addReply(c,shared.nokeyerr);
            return;
        }
        val = dictGetVal(de);
        key = dictGetKey(de);

        if (val->type != OBJ_STRING || !sdsEncodedObject(val)) {
            addReplyError(c,"Not an sds encoded string.");
        } else {
            addReplyStatusFormat(c,
                "key_sds_len:%lld, key_sds_avail:%lld, "
                "val_sds_len:%lld, val_sds_avail:%lld",
                (long long) sdslen(key),
                (long long) sdsavail(key),
                (long long) sdslen(val->ptr),
                (long long) sdsavail(val->ptr));
        }
    } else if (!strcasecmp(c->argv[1]->ptr,"populate") &&
               (c->argc == 3 || c->argc == 4)) {
        long keys, j;
        robj *key, *val;
        char buf[128];

        if (getLongFromObjectOrReply(c, c->argv[2], &keys, NULL) != C_OK)
            return;
        dictExpand(c->db->dict,keys);
        for (j = 0; j < keys; j++) {
            snprintf(buf,sizeof(buf),"%s:%lu",
                (c->argc == 3) ? "key" : (char*)c->argv[3]->ptr, j);
            key = createStringObject(buf,strlen(buf));
            if (lookupKeyWrite(c->db,key) != NULL) {
                decrRefCount(key);
                continue;
            }
            snprintf(buf,sizeof(buf),"value:%lu",j);
            val = createStringObject(buf,strlen(buf));
            dbAdd(c->db,key,val);
            signalModifiedKey(c->db,key);
            decrRefCount(key);
        }
        addReply(c,shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr,"digest") && c->argc == 2) {
        unsigned char digest[20];
        sds d = sdsempty();
        int j;

        computeDatasetDigest(digest);
        for (j = 0; j < 20; j++)
            d = sdscatprintf(d, "%02x",digest[j]);
        addReplyStatus(c,d);
        sdsfree(d);
    } else if (!strcasecmp(c->argv[1]->ptr,"sleep") && c->argc == 3) {
        double dtime = strtod(c->argv[2]->ptr,NULL);
        long long utime = dtime*1000000;
        struct timespec tv;

        tv.tv_sec = utime / 1000000;
        tv.tv_nsec = (utime % 1000000) * 1000;
        nanosleep(&tv, NULL);
        addReply(c,shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr,"set-active-expire") &&
               c->argc == 3)
    {
        server.active_expire_enabled = atoi(c->argv[2]->ptr);
        addReply(c,shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr,"lua-always-replicate-commands") &&
               c->argc == 3)
    {
        server.lua_always_replicate_commands = atoi(c->argv[2]->ptr);
        addReply(c,shared.ok);
    } else if (!strcasecmp(c->argv[1]->ptr,"error") && c->argc == 3) {
        sds errstr = sdsnewlen("-",1);

        errstr = sdscatsds(errstr,c->argv[2]->ptr);
        errstr = sdsmapchars(errstr,"\n\r","  ",2); /* no newlines in errors. */
        errstr = sdscatlen(errstr,"\r\n",2);
        addReplySds(c,errstr);
    } else if (!strcasecmp(c->argv[1]->ptr,"structsize") && c->argc == 2) {
        sds sizes = sdsempty();
        sizes = sdscatprintf(sizes,"bits:%d ",(sizeof(void*) == 8)?64:32);
        sizes = sdscatprintf(sizes,"robj:%d ",(int)sizeof(robj));
        sizes = sdscatprintf(sizes,"dictentry:%d ",(int)sizeof(dictEntry));
        sizes = sdscatprintf(sizes,"sdshdr5:%d ",(int)sizeof(struct sdshdr5));
        sizes = sdscatprintf(sizes,"sdshdr8:%d ",(int)sizeof(struct sdshdr8));
        sizes = sdscatprintf(sizes,"sdshdr16:%d ",(int)sizeof(struct sdshdr16));
        sizes = sdscatprintf(sizes,"sdshdr32:%d ",(int)sizeof(struct sdshdr32));
        sizes = sdscatprintf(sizes,"sdshdr64:%d ",(int)sizeof(struct sdshdr64));
        addReplyBulkSds(c,sizes);
    } else if (!strcasecmp(c->argv[1]->ptr,"htstats") && c->argc == 3) {
        long dbid;
        sds stats = sdsempty();
        char buf[4096];

        if (getLongFromObjectOrReply(c, c->argv[2], &dbid, NULL) != C_OK)
            return;
        if (dbid < 0 || dbid >= server.dbnum) {
            addReplyError(c,"Out of range database");
            return;
        }

        stats = sdscatprintf(stats,"[Dictionary HT]\n");
        dictGetStats(buf,sizeof(buf),server.db[dbid].dict);
        stats = sdscat(stats,buf);

        stats = sdscatprintf(stats,"[Expires HT]\n");
        dictGetStats(buf,sizeof(buf),server.db[dbid].expires);
        stats = sdscat(stats,buf);

        addReplyBulkSds(c,stats);
    } else if (!strcasecmp(c->argv[1]->ptr,"jemalloc") && c->argc == 3) {
#if defined(USE_JEMALLOC)
        if (!strcasecmp(c->argv[2]->ptr, "info")) {
            sds info = sdsempty();
            je_malloc_stats_print(inputCatSds, &info, NULL);
            addReplyBulkSds(c, info);
        } else if (!strcasecmp(c->argv[2]->ptr, "purge")) {
            char tmp[32];
            unsigned narenas = 0;
            size_t sz = sizeof(unsigned);
            if (!je_mallctl("arenas.narenas", &narenas, &sz, NULL, 0)) {
                sprintf(tmp, "arena.%d.purge", narenas);
                if (!je_mallctl(tmp, NULL, 0, NULL, 0)) {
                    addReply(c, shared.ok);
                    return;
                }
            }
            addReplyError(c, "Error purging dirty pages");
        } else {
            addReplyErrorFormat(c, "Valid jemalloc debug fields: info, purge");
        }
#else
        addReplyErrorFormat(c, "jemalloc support not available");
#endif
    } else {
        addReplyErrorFormat(c, "Unknown DEBUG subcommand or wrong number of arguments for '%s'",
            (char*)c->argv[1]->ptr);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1028, %rsp           # imm = 0x1028
movq %rdi, %rbx
movl 0x38(%rdi), %r12d
cmpl $0x1, %r12d
jne 0x65696
leaq 0x638b6(%rip), %rsi     # 0xc8f33
movq %rbx, %rdi
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3ffcb
movq 0x40(%rbx), %r15
movq 0x8(%r15), %rax
movq 0x8(%rax), %r14
leaq 0x5ca52(%rip), %rsi     # 0xc20fb
movq %r14, %rdi
callq 0x26300
testl %eax, %eax
je 0x65970
leaq 0x63ee1(%rip), %rsi     # 0xc95a1
movq %r14, %rdi
callq 0x26300
testl %eax, %eax
je 0x65b2d
leaq 0x63ed3(%rip), %rsi     # 0xc95aa
movq %r14, %rdi
callq 0x26300
testl %eax, %eax
je 0x65ab9
leaq 0x63ec4(%rip), %rsi     # 0xc95b2
movq %r14, %rdi
callq 0x26300
testl %eax, %eax
je 0x65ab9
leaq 0x5b16c(%rip), %rsi     # 0xc0871
movq %r14, %rdi
callq 0x26300
testl %eax, %eax
je 0x65b47
leaq 0x63ed9(%rip), %rsi     # 0xc95f5
movq %r14, %rdi
callq 0x26300
testl %eax, %eax
je 0x6633c
leaq 0x63ed0(%rip), %rsi     # 0xc9603
movq %r14, %rdi
callq 0x26300
testl %eax, %eax
je 0x65b6b
leaq 0x63efe(%rip), %rsi     # 0xc9648
movq %r14, %rdi
callq 0x26300
testl %eax, %eax
je 0x65ba9
leaq 0x6e790(%rip), %rsi     # 0xd3ef1
movq %r14, %rdi
callq 0x26300
cmpl $0x3, %r12d
jne 0x65bec
testl %eax, %eax
jne 0x65bec
movq 0x10(%rbx), %rax
movq (%rax), %rdi
movq 0x10(%r15), %rax
movq 0x8(%rax), %rsi
callq 0x31cca
testq %rax, %rax
je 0x65c3b
movq 0x8(%rax), %r14
movl (%r14), %edi
shrl $0x4, %edi
andl $0xf, %edi
callq 0x44bce
movq %rax, %r13
xorpd %xmm0, %xmm0
movapd %xmm0, 0x90(%rsp)
movapd %xmm0, 0x80(%rsp)
movapd %xmm0, 0x70(%rsp)
movapd %xmm0, 0x60(%rsp)
movapd %xmm0, 0x50(%rsp)
movapd %xmm0, 0x40(%rsp)
movapd %xmm0, 0x30(%rsp)
movapd %xmm0, 0x20(%rsp)
movl $0xf0, %eax
andl (%r14), %eax
cmpl $0x90, %eax
jne 0x65906
movq %r13, 0x18(%rsp)
movq 0x8(%r14), %r15
movl 0x18(%r15), %ecx
leaq 0x63e6b(%rip), %rdx     # 0xc9679
xorl %r12d, %r12d
leaq 0x20(%rsp), %rdi
movl $0x80, %esi
xorl %eax, %eax
callq 0x26120
cltq
leaq (%rsp,%rax), %r13
addq $0x20, %r13
movl $0x80, %ecx
subl %eax, %ecx
movsd 0x10(%r15), %xmm1
unpcklps 0x600a0(%rip), %xmm1    # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x600a8(%rip), %xmm1    # 0xc58f0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movl 0x18(%r15), %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
divsd %xmm1, %xmm0
movslq %ecx, %rbp
leaq 0x63e18(%rip), %rdx     # 0xc9686
movq %r13, %rdi
movq %rbp, %rsi
movb $0x1, %al
callq 0x26120
cltq
addq %rax, %r13
subl %eax, %ebp
movslq %ebp, %rbp
movswl 0x1c(%r15), %ecx
leaq 0x63e07(%rip), %rdx     # 0xc9698
movq %r13, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x26120
cltq
addq %rax, %r13
subl %eax, %ebp
xorl %ecx, %ecx
cmpl $0x10000, 0x1c(%r15)    # imm = 0x10000
setae %cl
movslq %ebp, %rbp
leaq 0x63def(%rip), %rdx     # 0xc96ab
movq %r13, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x26120
cltq
addq %rax, %r13
subl %eax, %ebp
movq (%r15), %rax
testq %rax, %rax
je 0x658ea
xorl %r12d, %r12d
movl 0x18(%rax), %ecx
addq %rcx, %r12
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x658db
movslq %ebp, %rsi
leaq 0x63dc9(%rip), %rdx     # 0xc96bd
movq %r13, %rdi
movq %r12, %rcx
xorl %eax, %eax
callq 0x26120
movq 0x18(%rsp), %r13
movl 0x4(%r14), %ebp
movq %r14, %rdi
callq 0x4c3b8
movq %rax, %r12
movl (%r14), %r15d
shrl $0x8, %r15d
movq %r14, %rdi
callq 0x44be9
shrq $0x3, %rax
movabsq $0x20c49ba5e353f7cf, %rcx # imm = 0x20C49BA5E353F7CF
mulq %rcx
movq %rdx, %r10
shrq $0x4, %r10
subq $0x8, %rsp
leaq 0x28(%rsp), %r11
leaq 0x63d8b(%rip), %rsi     # 0xc96d7
movq %rbx, %rdi
movq %r14, %rdx
movl %ebp, %ecx
movq %r13, %r8
movq %r12, %r9
xorl %eax, %eax
pushq %r11
pushq %r10
pushq %r15
callq 0x401b9
addq $0x20, %rsp
jmp 0x65b35
movq %rbx, %rdi
callq 0x402b0
movq %rax, %r14
leaq 0x635f3(%rip), %rsi     # 0xc8f75
movq %rbx, %rdi
callq 0x40192
leaq 0x63615(%rip), %rsi     # 0xc8fa6
movq %rbx, %rdi
callq 0x40192
leaq 0x63631(%rip), %rsi     # 0xc8fd1
movq %rbx, %rdi
callq 0x40192
leaq 0x6365a(%rip), %rsi     # 0xc9009
movq %rbx, %rdi
callq 0x40192
leaq 0x636a3(%rip), %rsi     # 0xc9061
movq %rbx, %rdi
callq 0x40192
leaq 0x636bb(%rip), %rsi     # 0xc9088
movq %rbx, %rdi
callq 0x40192
leaq 0x636eb(%rip), %rsi     # 0xc90c7
movq %rbx, %rdi
callq 0x40192
leaq 0x63724(%rip), %rsi     # 0xc910f
movq %rbx, %rdi
callq 0x40192
leaq 0x63759(%rip), %rsi     # 0xc9153
movq %rbx, %rdi
callq 0x40192
leaq 0x63795(%rip), %rsi     # 0xc919e
movq %rbx, %rdi
callq 0x40192
leaq 0x6380d(%rip), %rsi     # 0xc9225
movq %rbx, %rdi
callq 0x40192
leaq 0x63848(%rip), %rsi     # 0xc926f
movq %rbx, %rdi
callq 0x40192
leaq 0x6387d(%rip), %rsi     # 0xc92b3
movq %rbx, %rdi
callq 0x40192
leaq 0x63925(%rip), %rsi     # 0xc936a
movq %rbx, %rdi
callq 0x40192
leaq 0x639c7(%rip), %rsi     # 0xc941b
movq %rbx, %rdi
callq 0x40192
leaq 0x63a3a(%rip), %rsi     # 0xc949d
movq %rbx, %rdi
callq 0x40192
leaq 0x63a6f(%rip), %rsi     # 0xc94e1
movq %rbx, %rdi
callq 0x40192
leaq 0x63ab0(%rip), %rsi     # 0xc9531
movq %rbx, %rdi
callq 0x40192
leaq 0x63ad6(%rip), %rsi     # 0xc9566
movq %rbx, %rdi
callq 0x40192
movl $0x13, %edx
movq %rbx, %rdi
movq %r14, %rsi
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x402ec
movq $0x0, 0x20(%rsp)
cmpl $0x3, %r12d
jl 0x65af0
movq 0x10(%r15), %rsi
leaq 0x20(%rsp), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x44b44
testl %eax, %eax
jne 0x65b35
cmpq $0x0, 0x20(%rsp)
jns 0x65af0
movq $0x0, 0x20(%rsp)
movq 0x40(%rbx), %rax
movq 0x8(%rax), %rax
movq 0x8(%rax), %rdi
leaq 0x63aa7(%rip), %rsi     # 0xc95aa
callq 0x26300
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
leal (%rcx,%rcx,2), %edi
movq 0x20(%rsp), %rsi
callq 0x3516d
leaq 0x63aa1(%rip), %rsi     # 0xc95c4
movq %rbx, %rdi
callq 0x3ffcb
jmp 0x65b35
movb $0x78, -0x1
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq $-0x1, %rdi
callq 0x3b29d
movq %rax, %rdi
callq 0x3b3df
leaq 0xa174e(%rip), %rax     # 0x1072b0
movq 0x8(%rax), %rsi
jmp 0x65c46
leaq 0xa0ce6(%rip), %r14     # 0x106858
movq 0x738(%r14), %rdi
callq 0x4cb97
testl %eax, %eax
jne 0x65bdf
xorl %edi, %edi
callq 0x45479
movq 0x738(%r14), %rdi
callq 0x4da84
testl %eax, %eax
je 0x65d99
leaq 0x63a66(%rip), %rsi     # 0xc960a
jmp 0x6567d
leaq 0xa0ca8(%rip), %r14     # 0x106858
cmpl $0x1, 0x658(%r14)
jne 0x65bc4
movl $0x1, %edi
callq 0x60d6c
xorl %edi, %edi
callq 0x45479
movq 0x660(%r14), %rdi
callq 0x61c46
testl %eax, %eax
je 0x65d85
leaq 0xa16ca(%rip), %rax     # 0x1072b0
movq 0x10(%rax), %rsi
jmp 0x65c46
leaq 0x63b3c(%rip), %rsi     # 0xc972f
movq %r14, %rdi
callq 0x26300
cmpl $0x3, %r12d
jne 0x65c5f
testl %eax, %eax
jne 0x65c5f
movq 0x10(%rbx), %rax
movq (%rax), %rdi
movq 0x10(%r15), %rax
movq 0x8(%rax), %rsi
callq 0x31cca
testq %rax, %rax
je 0x65c3b
movq 0x8(%rax), %r12
movl (%r12), %ecx
testb $0xf, %cl
je 0x65eb4
leaq 0x63b00(%rip), %rsi     # 0xc9736
jmp 0x6567d
leaq 0xa166e(%rip), %rax     # 0x1072b0
movq 0x78(%rax), %rsi
movq %rbx, %rdi
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3fc19
leaq 0x63b36(%rip), %rsi     # 0xc979c
movq %r14, %rdi
callq 0x26300
leal -0x3(%r12), %ecx
cmpl $0x1, %ecx
ja 0x65db1
testl %eax, %eax
jne 0x65db1
movq 0x10(%r15), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x44ba1
testl %eax, %eax
jne 0x65b35
movq 0x10(%rbx), %rax
movq (%rax), %rdi
movq 0x8(%rsp), %rsi
callq 0x317e2
cmpq $0x0, 0x8(%rsp)
jle 0x65e9c
leaq 0x6c550(%rip), %r12     # 0xd2213
leaq 0x63adb(%rip), %r14     # 0xc97a5
leaq 0x20(%rsp), %r15
xorl %r13d, %r13d
cmpl $0x3, 0x38(%rbx)
movq %r12, %rcx
je 0x65ce7
movq 0x40(%rbx), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rcx
movl $0x80, %esi
movq %r15, %rdi
movq %r14, %rdx
movq %r13, %r8
xorl %eax, %eax
callq 0x26120
movq %r15, %rdi
callq 0x26510
movq %r15, %rdi
movq %rax, %rsi
callq 0x43ba8
movq %rax, %rbp
movq 0x10(%rbx), %rdi
movq %rax, %rsi
callq 0x44f66
testq %rax, %rax
jne 0x65d6a
movl $0x80, %esi
movq %r15, %rdi
leaq 0x63a7a(%rip), %rdx     # 0xc97ac
movq %r13, %rcx
xorl %eax, %eax
callq 0x26120
movq %r15, %rdi
callq 0x26510
movq %r15, %rdi
movq %rax, %rsi
callq 0x43ba8
movq 0x10(%rbx), %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x45007
movq 0x10(%rbx), %rdi
movq %rbp, %rsi
callq 0x45220
movq %rbp, %rdi
callq 0x440f3
incq %r13
cmpq 0x8(%rsp), %r13
jl 0x65cd2
jmp 0x65e9c
movq $0x0, 0x710(%r14)
leaq 0x638b9(%rip), %rsi     # 0xc9650
jmp 0x65da0
leaq 0x6388c(%rip), %rsi     # 0xc962c
movl $0x3, %edi
xorl %eax, %eax
callq 0x32ea6
jmp 0x65b5b
leaq 0x639fe(%rip), %rsi     # 0xc97b6
movq %r14, %rdi
callq 0x26300
cmpl $0x2, %r12d
jne 0x65e1d
testl %eax, %eax
jne 0x65e1d
callq 0x39222
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x64ef8
leaq 0x5cc1f(%rip), %r15     # 0xc2a02
xorl %r12d, %r12d
movzbl 0x20(%rsp,%r12), %edx
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x39eb7
movq %rax, %r14
incq %r12
cmpq $0x14, %r12
jne 0x65de6
movq %rbx, %rdi
movq %r14, %rsi
callq 0x40192
movq %r14, %rdi
callq 0x392b6
jmp 0x65b35
leaq 0x63999(%rip), %rsi     # 0xc97bd
movq %r14, %rdi
callq 0x26300
cmpl $0x3, %r12d
jne 0x65f1f
testl %eax, %eax
jne 0x65f1f
movq 0x10(%r15), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0x26cd0
mulsd 0x5faab(%rip), %xmm0    # 0xc5900
cvttsd2si %xmm0, %rcx
movabsq $0x431bde82d7b634db, %rdx # imm = 0x431BDE82D7B634DB
movq %rcx, %rax
imulq %rdx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x12, %rdx
addq %rax, %rdx
leaq 0x20(%rsp), %rdi
movq %rdx, (%rdi)
imulq $0xf4240, %rdx, %rax    # imm = 0xF4240
subq %rax, %rcx
imulq $0x3e8, %rcx, %rax      # imm = 0x3E8
movq %rax, 0x8(%rdi)
xorl %esi, %esi
callq 0x26960
leaq 0xa140d(%rip), %rax     # 0x1072b0
movq 0x8(%rax), %rsi
movq %rbx, %rdi
callq 0x3fc19
jmp 0x65b35
shrl $0x4, %ecx
testb $0x7, %cl
jne 0x65c2f
movq (%rax), %r14
movq %r14, %rdi
callq 0x64e18
movq %rax, %r15
movq %r14, %rdi
callq 0x663c3
movq %rax, %r14
movq 0x8(%r12), %r12
movq %r12, %rdi
callq 0x64e18
movq %rax, %r13
movq %r12, %rdi
callq 0x663c3
leaq 0x63859(%rip), %rsi     # 0xc9751
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
movq %r13, %r8
movq %rax, %r9
xorl %eax, %eax
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x401b9
leaq 0x6389d(%rip), %rsi     # 0xc97c3
movq %r14, %rdi
callq 0x26300
cmpl $0x3, %r12d
jne 0x65f57
testl %eax, %eax
jne 0x65f57
movq 0x10(%r15), %rax
movq 0x8(%rax), %rdi
callq 0x26770
leaq 0xa090c(%rip), %rcx     # 0x106858
movl %eax, 0x5f4(%rcx)
jmp 0x65b5b
leaq 0x63877(%rip), %rsi     # 0xc97d5
movq %r14, %rdi
callq 0x26300
cmpl $0x3, %r12d
jne 0x65f8f
testl %eax, %eax
jne 0x65f8f
movq 0x10(%r15), %rax
movq 0x8(%rax), %rdi
callq 0x26770
leaq 0xa08d4(%rip), %rcx     # 0x106858
movl %eax, 0xa04(%rcx)
jmp 0x65b5b
leaq 0x5fde5(%rip), %rsi     # 0xc5d7b
movq %r14, %rdi
callq 0x26300
cmpl $0x3, %r12d
jne 0x66018
testl %eax, %eax
jne 0x66018
leaq 0x6e43f(%rip), %rdi     # 0xd43ee
movl $0x1, %esi
callq 0x3910c
movq 0x40(%rbx), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %rsi
movq %rax, %rdi
callq 0x39b4d
leaq 0x6381f(%rip), %rsi     # 0xc97f3
leaq 0x676e8(%rip), %rdx     # 0xcd6c3
movl $0x2, %ecx
movq %rax, %rdi
callq 0x3b0f4
leaq 0x60d81(%rip), %rsi     # 0xc6d70
movl $0x2, %edx
movq %rax, %rdi
callq 0x39a56
movq %rbx, %rdi
movq %rax, %rsi
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3fe4b
leaq 0x637d7(%rip), %rsi     # 0xc97f6
movq %r14, %rdi
callq 0x26300
cmpl $0x2, %r12d
jne 0x6610a
testl %eax, %eax
jne 0x6610a
callq 0x39222
leaq 0x637bc(%rip), %rsi     # 0xc9801
movq %rax, %rdi
movl $0x40, %edx
xorl %eax, %eax
callq 0x39eb7
leaq 0x637af(%rip), %rsi     # 0xc980a
movq %rax, %rdi
movl $0x10, %edx
xorl %eax, %eax
callq 0x39eb7
leaq 0x637a2(%rip), %rsi     # 0xc9813
movq %rax, %rdi
movl $0x18, %edx
xorl %eax, %eax
callq 0x39eb7
leaq 0x6379a(%rip), %rsi     # 0xc9821
movq %rax, %rdi
movl $0x1, %edx
xorl %eax, %eax
callq 0x39eb7
leaq 0x63790(%rip), %rsi     # 0xc982d
movq %rax, %rdi
movl $0x3, %edx
xorl %eax, %eax
callq 0x39eb7
leaq 0x63786(%rip), %rsi     # 0xc9839
movq %rax, %rdi
movl $0x5, %edx
xorl %eax, %eax
callq 0x39eb7
leaq 0x6377d(%rip), %rsi     # 0xc9846
movq %rax, %rdi
movl $0x9, %edx
xorl %eax, %eax
callq 0x39eb7
leaq 0x63774(%rip), %rsi     # 0xc9853
movq %rax, %rdi
movl $0x11, %edx
xorl %eax, %eax
callq 0x39eb7
movq %rbx, %rdi
movq %rax, %rsi
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4074f
leaq 0x6374f(%rip), %rsi     # 0xc9860
movq %r14, %rdi
callq 0x26300
cmpl $0x3, %r12d
jne 0x66205
testl %eax, %eax
jne 0x66205
callq 0x39222
movq %rax, %r14
movq 0x40(%rbx), %rax
movq 0x10(%rax), %rsi
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x44ba1
testl %eax, %eax
jne 0x65b35
movq 0x8(%rsp), %rax
testq %rax, %rax
js 0x66297
leaq 0xa06f1(%rip), %r12     # 0x106858
movslq 0x600(%r12), %rcx
cmpq %rcx, %rax
jge 0x66297
leaq 0x636ff(%rip), %rsi     # 0xc987e
movq %r14, %rdi
xorl %eax, %eax
callq 0x39eb7
movq %rax, %r15
movq 0x28(%r12), %rax
movq 0x8(%rsp), %rcx
shlq $0x6, %rcx
movq (%rax,%rcx), %rdx
leaq 0x20(%rsp), %r14
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
callq 0x328d8
movq %r15, %rdi
movq %r14, %rsi
callq 0x39b26
leaq 0x636cd(%rip), %rsi     # 0xc988f
movq %rax, %rdi
xorl %eax, %eax
callq 0x39eb7
movq %rax, %r15
movq 0x28(%r12), %rax
movq 0x8(%rsp), %rcx
shlq $0x6, %rcx
movq 0x8(%rax,%rcx), %rdx
movl $0x1000, %esi           # imm = 0x1000
movq %r14, %rdi
callq 0x328d8
movq %r15, %rdi
movq %r14, %rsi
callq 0x39b26
movq %rbx, %rdi
movq %rax, %rsi
jmp 0x662c7
leaq 0x63691(%rip), %rsi     # 0xc989d
movq %r14, %rdi
callq 0x26300
cmpl $0x3, %r12d
jne 0x66272
testl %eax, %eax
jne 0x66272
movq 0x10(%r15), %rax
movq 0x8(%rax), %r14
leaq 0x6db17(%rip), %rsi     # 0xd3d44
movq %r14, %rdi
callq 0x26300
testl %eax, %eax
je 0x662a3
leaq 0x636c1(%rip), %rsi     # 0xc9901
movq %r14, %rdi
callq 0x26300
testl %eax, %eax
je 0x662d1
leaq 0x63687(%rip), %rsi     # 0xc98de
movq %rbx, %rdi
xorl %eax, %eax
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3fff2
leaq 0x6368e(%rip), %rsi     # 0xc9907
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3fff2
leaq 0x635ca(%rip), %rsi     # 0xc9868
jmp 0x65b23
callq 0x39222
leaq 0x20(%rsp), %r14
movq %rax, (%r14)
leaq -0xc70(%rip), %rdi      # 0x65647
movq %r14, %rsi
xorl %edx, %edx
callq 0xa6f08
movq (%r14), %rsi
movq %rbx, %rdi
callq 0x4074f
jmp 0x65b35
leaq 0x14(%rsp), %rsi
movl $0x0, (%rsi)
leaq 0x8(%rsp), %rdx
movq $0x4, (%rdx)
leaq 0x635b7(%rip), %rdi     # 0xc98a6
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xa6c74
testl %eax, %eax
jne 0x66330
movl 0x14(%rsp), %edx
leaq 0x635ad(%rip), %rsi     # 0xc98b5
leaq 0x20(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x26590
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0xa6c74
testl %eax, %eax
je 0x65e9c
leaq 0x6358d(%rip), %rsi     # 0xc98c4
jmp 0x65b23
cmpl $0x3, %r12d
jl 0x66353
movq 0x10(%r15), %rdi
callq 0x4426d
movq 0x40(%rbx), %rcx
movq %rax, 0x10(%rcx)
movq 0x40(%rbx), %rax
movq (%rax), %rsi
leaq 0x6329b(%rip), %rdx     # 0xc95fc
leaq 0x62bb8(%rip), %rcx     # 0xc8f20
movq %rbx, %rdi
movl $0x14f, %r8d            # imm = 0x14F
callq 0x66380
movl $0x1, %edi
callq 0x263d0