// File: /workspace/github_c_makefile_star2_O0/nilyang[P]redis-tdd-annotation/src/rdb.c
// Function: rdbLoadObject
robj *rdbLoadObject(int rdbtype, rio *rdb) {
    robj *o, *ele, *dec;
    size_t len;
    unsigned int i;

    // 载入字符串对象
    if (rdbtype == REDIS_RDB_TYPE_STRING) {
        /* Read string value */
        if ((o = rdbLoadEncodedStringObject(rdb)) == NULL) return NULL;
        o = tryObjectEncoding(o);

    // 载入列表对象
    } else if (rdbtype == REDIS_RDB_TYPE_LIST) {

        /* Read list value 
         *
         * 读入列表的节点数
         */
        if ((len = rdbLoadLen(rdb,NULL)) == REDIS_RDB_LENERR) return NULL;

        /* Use a real list when there are too many entries 
         *
         * 根据节点数，创建对象的编码
         */
        if (len > server.list_max_ziplist_entries) {
            o = createListObject();
        } else {
            o = createZiplistObject();
        }

        /* Load every single element of the list 
         *
         * 载入所有列表项
         */
        while(len--) {

            // 载入字符串对象
            if ((ele = rdbLoadEncodedStringObject(rdb)) == NULL) return NULL;

            /* If we are using a ziplist and the value is too big, convert
             * the object to a real list. 
             *
             * 根据字符串对象，
             * 检查是否需要将列表从 ZIPLIST 编码转换为 LINKEDLIST 编码
             */
            if (o->encoding == REDIS_ENCODING_ZIPLIST &&
                sdsEncodedObject(ele) &&
                sdslen(ele->ptr) > server.list_max_ziplist_value)
                    listTypeConvert(o,REDIS_ENCODING_LINKEDLIST);

            // ZIPLIST
            if (o->encoding == REDIS_ENCODING_ZIPLIST) {
                dec = getDecodedObject(ele);

                // 将字符串值推入 ZIPLIST 末尾来重建列表
                o->ptr = ziplistPush(o->ptr,dec->ptr,sdslen(dec->ptr),REDIS_TAIL);

                decrRefCount(dec);
                decrRefCount(ele);
            } else {
                // 将新列表项推入到链表的末尾
                ele = tryObjectEncoding(ele);
                listAddNodeTail(o->ptr,ele);
            }
        }

    // 载入集合对象
    } else if (rdbtype == REDIS_RDB_TYPE_SET) {

        /* Read list/set value 
         *
         * 载入列表元素的数量
         */
        if ((len = rdbLoadLen(rdb,NULL)) == REDIS_RDB_LENERR) return NULL;

        /* Use a regular set when there are too many entries. 
         *
         * 根据数量，选择 INTSET 编码还是 HT 编码*/
        if (len > server.set_max_intset_entries) {
            o = createSetObject();
            /* It's faster to expand the dict to the right size asap in order
             * to avoid rehashing */
            if (len > DICT_HT_INITIAL_SIZE)
                dictExpand(o->ptr,len);
        } else {
            o = createIntsetObject();
        }

        /* Load every single element of the list/set 
         *
         * 载入所有集合元素*/
        for (i = 0; i < len; i++) {
            long long llval;

            // 载入元素
            if ((ele = rdbLoadEncodedStringObject(rdb)) == NULL) return NULL;
            ele = tryObjectEncoding(ele);

            // 将元素添加到 INTSET 集合，并在有需要的时候，转换编码为 HT
            if (o->encoding == REDIS_ENCODING_INTSET) {
                /* Fetch integer value from element */
                if (isObjectRepresentableAsLongLong(ele,&llval) == REDIS_OK) {
                    o->ptr = intsetAdd(o->ptr,llval,NULL);
                } else {
                    setTypeConvert(o,REDIS_ENCODING_HT);
                    dictExpand(o->ptr,len);
                }
            }

            /* This will also be called when the set was just converted
             * to a regular hash table encoded set 
             *
             * 将元素添加到 HT 编码的集合
             */
            if (o->encoding == REDIS_ENCODING_HT) {
                dictAdd((dict*)o->ptr,ele,NULL);
            } else {
                decrRefCount(ele);
            }
        }

    // 载入有序集合对象
    } else if (rdbtype == REDIS_RDB_TYPE_ZSET) {
        /* Read list/set value */
        size_t zsetlen;
        size_t maxelelen = 0;
        zset *zs;

        // 载入有序集合的元素数量
        if ((zsetlen = rdbLoadLen(rdb,NULL)) == REDIS_RDB_LENERR) return NULL;

        // 创建有序集合
        o = createZsetObject();
        zs = o->ptr;

        /* Load every single element of the list/set */
        while(zsetlen--) {
            robj *ele;
            double score;
            zskiplistNode *znode;

            // 载入元素成员
            if ((ele = rdbLoadEncodedStringObject(rdb)) == NULL) return NULL;
            ele = tryObjectEncoding(ele);

            // 载入元素分值
            if (rdbLoadDoubleValue(rdb,&score) == -1) return NULL;

            /* Don't care about integer-encoded strings. */
            // 记录成员的最大长度
            if (sdsEncodedObject(ele) && sdslen(ele->ptr) > maxelelen)
                maxelelen = sdslen(ele->ptr);

            // 将元素插入到跳跃表中
            znode = zslInsert(zs->zsl,score,ele);
            // 将元素关联到字典中
            dictAdd(zs->dict,ele,&znode->score);

            incrRefCount(ele); /* added to skiplist */
        }

        /* Convert *after* loading, since sorted sets are not stored ordered. 
         *
         * 如果有序集合符合条件的话，将它转换为 ZIPLIST 编码
         * 节约空间
         */
        if (zsetLength(o) <= server.zset_max_ziplist_entries &&
            maxelelen <= server.zset_max_ziplist_value)
                zsetConvert(o,REDIS_ENCODING_ZIPLIST);

    // 载入哈希表对象
    } else if (rdbtype == REDIS_RDB_TYPE_HASH) {
        size_t len;
        int ret;

        // 载入哈希表节点数量
        len = rdbLoadLen(rdb, NULL);
        if (len == REDIS_RDB_LENERR) return NULL;

        // 创建哈希表
        o = createHashObject();

        /* Too many entries? Use a hash table.
         * 根据节点数量，选择使用 ZIPLIST 编码还是 HT 编码
         */
        if (len > server.hash_max_ziplist_entries)
            hashTypeConvert(o, REDIS_ENCODING_HT);

        /* Load every field and value into the ziplist 
         *
         * 载入所有域和值，并将它们推入到 ZIPLIST 中
         */
        while (o->encoding == REDIS_ENCODING_ZIPLIST && len > 0) {
            robj *field, *value;

            len--;

            /* Load raw strings */
            // 载入域（一个字符串）
            field = rdbLoadStringObject(rdb);
            if (field == NULL) return NULL;
            // 载入值（一个字符串）
            redisAssert(sdsEncodedObject(field));
            value = rdbLoadStringObject(rdb);
            if (value == NULL) return NULL;
            redisAssert(sdsEncodedObject(value));

            /* Add pair to ziplist 
             *
             * 将域和值推入到 ZIPLIST 末尾
             *
             * 先推入域，再推入值。
             */
            o->ptr = ziplistPush(o->ptr, field->ptr, sdslen(field->ptr), ZIPLIST_TAIL);
            o->ptr = ziplistPush(o->ptr, value->ptr, sdslen(value->ptr), ZIPLIST_TAIL);

            /* Convert to hash table if size threshold is exceeded 
             *
             * 如果元素过多，那么将编码转换为 HT 
             */
            if (sdslen(field->ptr) > server.hash_max_ziplist_value ||
                sdslen(value->ptr) > server.hash_max_ziplist_value)
            {
                decrRefCount(field);
                decrRefCount(value);
                hashTypeConvert(o, REDIS_ENCODING_HT);
                break;
            }
            decrRefCount(field);
            decrRefCount(value);
        }

        /* Load remaining fields and values into the hash table 
         *
         * 载入域值对到哈希表
         */
        while (o->encoding == REDIS_ENCODING_HT && len > 0) {
            robj *field, *value;

            len--;

            /* Load encoded strings */
            // 域和值都载入为字符串对象
            field = rdbLoadEncodedStringObject(rdb);
            if (field == NULL) return NULL;
            value = rdbLoadEncodedStringObject(rdb);
            if (value == NULL) return NULL;

            // 尝试编码
            field = tryObjectEncoding(field);
            value = tryObjectEncoding(value);

            /* Add pair to hash table 
             *
             * 添加到哈希表
             */
            ret = dictAdd((dict*)o->ptr, field, value);
            redisAssert(ret == REDIS_OK);
        }

        /* All pairs should be read by now */
        redisAssert(len == 0);

    } else if (rdbtype == REDIS_RDB_TYPE_HASH_ZIPMAP  ||
               rdbtype == REDIS_RDB_TYPE_LIST_ZIPLIST ||
               rdbtype == REDIS_RDB_TYPE_SET_INTSET   ||
               rdbtype == REDIS_RDB_TYPE_ZSET_ZIPLIST ||
               rdbtype == REDIS_RDB_TYPE_HASH_ZIPLIST)
    {
        // 载入字符串对象
        robj *aux = rdbLoadStringObject(rdb);

        if (aux == NULL) return NULL;

        o = createObject(REDIS_STRING,NULL); /* string is just placeholder */
        o->ptr = zmalloc(sdslen(aux->ptr));
        memcpy(o->ptr,aux->ptr,sdslen(aux->ptr));
        decrRefCount(aux);

        /* Fix the object encoding, and make sure to convert the encoded
         * data type into the base type if accordingly to the current
         * configuration there are too many elements in the encoded data
         * type. Note that we only check the length and not max element
         * size as this is an O(N) scan. Eventually everything will get
         * converted. 
         *
         * 根据读取的类型，将值恢复成原来的编码对象。
         *
         * 在创建编码对象的过程中，程序会检查对象的元素长度，
         * 如果长度超过指定值的话，就会将内存编码对象转换成普通数据结构对象。
         */
        switch(rdbtype) {

            // ZIPMAP 编码的哈希表
            case REDIS_RDB_TYPE_HASH_ZIPMAP:
                /* Convert to ziplist encoded hash. This must be deprecated
                 * when loading dumps created by Redis 2.4 gets deprecated. */
                {
                    // 创建 ZIPLIST
                    unsigned char *zl = ziplistNew();
                    unsigned char *zi = zipmapRewind(o->ptr);
                    unsigned char *fstr, *vstr;
                    unsigned int flen, vlen;
                    unsigned int maxlen = 0;

                    // 从 2.6 开始， HASH 不再使用 ZIPMAP 来进行编码
                    // 所以遇到 ZIPMAP 编码的值时，要将它转换为 ZIPLIST

                    // 从字符串中取出 ZIPMAP 的域和值，然后推入到 ZIPLIST 中
                    while ((zi = zipmapNext(zi, &fstr, &flen, &vstr, &vlen)) != NULL) {
                        if (flen > maxlen) maxlen = flen;
                        if (vlen > maxlen) maxlen = vlen;
                        zl = ziplistPush(zl, fstr, flen, ZIPLIST_TAIL);
                        zl = ziplistPush(zl, vstr, vlen, ZIPLIST_TAIL);
                    }

                    zfree(o->ptr);

                    // 设置类型、编码和值指针
                    o->ptr = zl;
                    o->type = REDIS_HASH;
                    o->encoding = REDIS_ENCODING_ZIPLIST;

                    // 是否需要从 ZIPLIST 编码转换为 HT 编码
                    if (hashTypeLength(o) > server.hash_max_ziplist_entries ||
                        maxlen > server.hash_max_ziplist_value)
                    {
                        hashTypeConvert(o, REDIS_ENCODING_HT);
                    }
                }
                break;

            // ZIPLIST 编码的列表
            case REDIS_RDB_TYPE_LIST_ZIPLIST:

                o->type = REDIS_LIST;
                o->encoding = REDIS_ENCODING_ZIPLIST;

                // 检查是否需要转换编码
                if (ziplistLen(o->ptr) > server.list_max_ziplist_entries)
                    listTypeConvert(o,REDIS_ENCODING_LINKEDLIST);
                break;

            // INTSET 编码的集合
            case REDIS_RDB_TYPE_SET_INTSET:

                o->type = REDIS_SET;
                o->encoding = REDIS_ENCODING_INTSET;

                // 检查是否需要转换编码
                if (intsetLen(o->ptr) > server.set_max_intset_entries)
                    setTypeConvert(o,REDIS_ENCODING_HT);
                break;

            // ZIPLIST 编码的有序集合
            case REDIS_RDB_TYPE_ZSET_ZIPLIST:

                o->type = REDIS_ZSET;
                o->encoding = REDIS_ENCODING_ZIPLIST;

                // 检查是否需要转换编码
                if (zsetLength(o) > server.zset_max_ziplist_entries)
                    zsetConvert(o,REDIS_ENCODING_SKIPLIST);
                break;

            // ZIPLIST 编码的 HASH
            case REDIS_RDB_TYPE_HASH_ZIPLIST:

                o->type = REDIS_HASH;
                o->encoding = REDIS_ENCODING_ZIPLIST;

                // 检查是否需要转换编码
                if (hashTypeLength(o) > server.hash_max_ziplist_entries)
                    hashTypeConvert(o, REDIS_ENCODING_HT);
                break;

            default:
                redisPanic("Unknown encoding");
                break;
        }

    } else {
        redisPanic("Unknown object type");
    }

    return o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movl %edi, -0xc(%rbp)
movq %rsi, -0x18(%rbp)
cmpl $0x0, -0xc(%rbp)
jne 0x4511a
movq -0x18(%rbp), %rdi
callq 0x43ce0
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x45108
movq $0x0, -0x8(%rbp)
jmp 0x45d6d
movq -0x20(%rbp), %rdi
callq 0x3acc0
movq %rax, -0x20(%rbp)
jmp 0x45d65
cmpl $0x1, -0xc(%rbp)
jne 0x452b9
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x43260
movl %eax, %eax
movq %rax, -0x38(%rbp)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0x4514e
movq $0x0, -0x8(%rbp)
jmp 0x45d6d
movq -0x38(%rbp), %rax
leaq 0xce79f(%rip), %rcx     # 0x1138f8
cmpq 0x768(%rcx), %rax
jbe 0x4516d
callq 0x3a620
movq %rax, -0x20(%rbp)
jmp 0x45176
callq 0x3a690
movq %rax, -0x20(%rbp)
jmp 0x45178
movq -0x38(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x38(%rbp)
cmpq $0x0, %rax
je 0x452b4
movq -0x18(%rbp), %rdi
callq 0x43ce0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x451b1
movq $0x0, -0x8(%rbp)
jmp 0x45d6d
movq -0x20(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x5, %eax
jne 0x4520f
movq -0x28(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x451e4
movq -0x28(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x4520f
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x42ec0
leaq 0xce700(%rip), %rcx     # 0x1138f8
cmpq 0x770(%rcx), %rax
jbe 0x4520f
movq -0x20(%rbp), %rdi
movl $0x4, %esi
callq 0x47d40
movq -0x20(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x5, %eax
jne 0x45291
movq -0x28(%rbp), %rdi
callq 0x3aef0
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xf0(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xe8(%rbp)
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x42ec0
movq -0xf0(%rbp), %rdi
movq -0xe8(%rbp), %rsi
movl %eax, %edx
movl $0x1, %ecx
callq 0x32a60
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x30(%rbp), %rdi
callq 0x3aaa0
movq -0x28(%rbp), %rdi
callq 0x3aaa0
jmp 0x452af
movq -0x28(%rbp), %rdi
callq 0x3acc0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x1ff90
jmp 0x45178
jmp 0x45d63
cmpl $0x2, -0xc(%rbp)
jne 0x4541a
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x43260
movl %eax, %eax
movq %rax, -0x38(%rbp)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0x452ed
movq $0x0, -0x8(%rbp)
jmp 0x45d6d
movq -0x38(%rbp), %rax
leaq 0xce600(%rip), %rcx     # 0x1138f8
cmpq 0x778(%rcx), %rax
jbe 0x45324
callq 0x3a6d0
movq %rax, -0x20(%rbp)
cmpq $0x4, -0x38(%rbp)
jbe 0x45322
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x232b0
jmp 0x4532d
callq 0x3a720
movq %rax, -0x20(%rbp)
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
cmpq -0x38(%rbp), %rax
jae 0x45415
movq -0x18(%rbp), %rdi
callq 0x43ce0
movq %rax, -0x28(%rbp)
cmpq $0x0, %rax
jne 0x45361
movq $0x0, -0x8(%rbp)
jmp 0x45d6d
movq -0x28(%rbp), %rdi
callq 0x3acc0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x6, %eax
jne 0x453d4
movq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x3ac00
cmpl $0x0, %eax
jne 0x453b3
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x48(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x67370
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x453d2
movq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0x4aeb0
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0x232b0
jmp 0x453d4
movq -0x20(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x2, %eax
jne 0x453fc
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x28(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x236d0
jmp 0x45405
movq -0x28(%rbp), %rdi
callq 0x3aaa0
jmp 0x45407
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x45334
jmp 0x45d61
cmpl $0x3, -0xc(%rbp)
jne 0x45598
movq $0x0, -0x58(%rbp)
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x43260
movl %eax, %eax
movq %rax, -0x50(%rbp)
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jne 0x45456
movq $0x0, -0x8(%rbp)
jmp 0x45d6d
callq 0x3a7a0
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $-0x1, %rcx
movq %rcx, -0x50(%rbp)
cmpq $0x0, %rax
je 0x45556
movq -0x18(%rbp), %rdi
callq 0x43ce0
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
jne 0x454a4
movq $0x0, -0x8(%rbp)
jmp 0x45d6d
movq -0x68(%rbp), %rdi
callq 0x3acc0
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x43e00
cmpl $-0x1, %eax
jne 0x454d0
movq $0x0, -0x8(%rbp)
jmp 0x45d6d
movq -0x68(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x454f2
movq -0x68(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x45516
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x42ec0
cmpq -0x58(%rbp), %rax
jbe 0x45516
movq -0x68(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x42ec0
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rdi
movsd -0x70(%rbp), %xmm0
movq -0x68(%rbp), %rsi
callq 0x4d210
movq %rax, -0x78(%rbp)
movq -0x60(%rbp), %rax
movq (%rax), %rdi
movq -0x68(%rbp), %rsi
movq -0x78(%rbp), %rdx
addq $0x8, %rdx
callq 0x236d0
movq -0x68(%rbp), %rdi
callq 0x3a3f0
jmp 0x4546b
movq -0x20(%rbp), %rdi
callq 0x50080
movl %eax, %eax
leaq 0xce390(%rip), %rcx     # 0x1138f8
cmpq 0x780(%rcx), %rax
ja 0x45593
movq -0x58(%rbp), %rax
leaq 0xce37c(%rip), %rcx     # 0x1138f8
cmpq 0x788(%rcx), %rax
ja 0x45593
movq -0x20(%rbp), %rdi
movl $0x5, %esi
callq 0x50110
jmp 0x45d5f
cmpl $0x4, -0xc(%rbp)
jne 0x4598e
movq -0x18(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x43260
movl %eax, %eax
movq %rax, -0x80(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, -0x80(%rbp)
jne 0x455cd
movq $0x0, -0x8(%rbp)
jmp 0x45d6d
callq 0x3a760
movq %rax, -0x20(%rbp)
movq -0x80(%rbp), %rax
leaq 0xce317(%rip), %rcx     # 0x1138f8
cmpq 0x758(%rcx), %rax
jbe 0x455f8
movq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0x55030
jmp 0x455fa
movq -0x20(%rbp), %rax
movl (%rax), %ecx
shrl $0x4, %ecx
andl $0xf, %ecx
xorl %eax, %eax
cmpl $0x5, %ecx
movb %al, -0xf1(%rbp)
jne 0x45621
cmpq $0x0, -0x80(%rbp)
seta %al
movb %al, -0xf1(%rbp)
movb -0xf1(%rbp), %al
testb $0x1, %al
jne 0x45630
jmp 0x45853
movq -0x80(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rdi
callq 0x43cc0
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x90(%rbp)
jne 0x45663
movq $0x0, -0x8(%rbp)
jmp 0x45d6d
movq -0x90(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x4568b
movq -0x90(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x4568d
jmp 0x456af
leaq 0x9d630(%rip), %rdi     # 0xe2cc4
leaq 0x9d469(%rip), %rsi     # 0xe2b04
movl $0x556, %edx            # imm = 0x556
callq 0x63ca0
movl $0x1, %edi
callq 0x1f3b0
movq -0x18(%rbp), %rdi
callq 0x43cc0
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
jne 0x456d6
movq $0x0, -0x8(%rbp)
jmp 0x45d6d
movq -0x98(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x0, %eax
je 0x456fe
movq -0x98(%rbp), %rax
movl (%rax), %eax
shrl $0x4, %eax
andl $0xf, %eax
cmpl $0x8, %eax
jne 0x45700
jmp 0x45722
leaq 0x9d5d5(%rip), %rdi     # 0xe2cdc
leaq 0x9d3f6(%rip), %rsi     # 0xe2b04
movl $0x559, %edx            # imm = 0x559
callq 0x63ca0
movl $0x1, %edi
callq 0x1f3b0
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x118(%rbp)
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x110(%rbp)
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x42ec0
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rsi
movl %eax, %edx
movl $0x1, %ecx
callq 0x32a60
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x108(%rbp)
movq -0x98(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x100(%rbp)
movq -0x98(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x42ec0
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rsi
movl %eax, %edx
movl $0x1, %ecx
callq 0x32a60
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x42ec0
leaq 0xce113(%rip), %rcx     # 0x1138f8
cmpq 0x760(%rcx), %rax
ja 0x4580e
movq -0x98(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x42ec0
leaq 0xce0f3(%rip), %rcx     # 0x1138f8
cmpq 0x760(%rcx), %rax
jbe 0x45836
movq -0x90(%rbp), %rdi
callq 0x3aaa0
movq -0x98(%rbp), %rdi
callq 0x3aaa0
movq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0x55030
jmp 0x45853
movq -0x90(%rbp), %rdi
callq 0x3aaa0
movq -0x98(%rbp), %rdi
callq 0x3aaa0
jmp 0x455fa
jmp 0x45855
movq -0x20(%rbp), %rax
movl (%rax), %ecx
shrl $0x4, %ecx
andl $0xf, %ecx
xorl %eax, %eax
cmpl $0x2, %ecx
movb %al, -0x119(%rbp)
jne 0x4587c
cmpq $0x0, -0x80(%rbp)
seta %al
movb %al, -0x119(%rbp)
movb -0x119(%rbp), %al
testb $0x1, %al
jne 0x4588b
jmp 0x4595e
movq -0x80(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rdi
callq 0x43ce0
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0xa0(%rbp)
jne 0x458be
movq $0x0, -0x8(%rbp)
jmp 0x45d6d
movq -0x18(%rbp), %rdi
callq 0x43ce0
movq %rax, -0xa8(%rbp)
cmpq $0x0, -0xa8(%rbp)
jne 0x458e5
movq $0x0, -0x8(%rbp)
jmp 0x45d6d
movq -0xa0(%rbp), %rdi
callq 0x3acc0
movq %rax, -0xa0(%rbp)
movq -0xa8(%rbp), %rdi
callq 0x3acc0
movq %rax, -0xa8(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0xa0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
callq 0x236d0
movl %eax, -0x84(%rbp)
cmpl $0x0, -0x84(%rbp)
jne 0x45937
jmp 0x45959
leaq 0x9d3b6(%rip), %rdi     # 0xe2cf4
leaq 0x9d1bf(%rip), %rsi     # 0xe2b04
movl $0x58d, %edx            # imm = 0x58D
callq 0x63ca0
movl $0x1, %edi
callq 0x1f3b0
jmp 0x45855
cmpq $0x0, -0x80(%rbp)
jne 0x45967
jmp 0x45989
leaq 0x9d396(%rip), %rdi     # 0xe2d04
leaq 0x9d18f(%rip), %rsi     # 0xe2b04
movl $0x591, %edx            # imm = 0x591
callq 0x63ca0
movl $0x1, %edi
callq 0x1f3b0
jmp 0x45d5d
cmpl $0x9, -0xc(%rbp)
je 0x459b0
cmpl $0xa, -0xc(%rbp)
je 0x459b0
cmpl $0xb, -0xc(%rbp)
je 0x459b0
cmpl $0xc, -0xc(%rbp)
je 0x459b0
cmpl $0xd, -0xc(%rbp)
jne 0x45d39
movq -0x18(%rbp), %rdi
callq 0x43cc0
movq %rax, -0xb0(%rbp)
cmpq $0x0, -0xb0(%rbp)
jne 0x459d7
movq $0x0, -0x8(%rbp)
jmp 0x45d6d
xorl %edi, %edi
movl %edi, %esi
callq 0x3a0d0
movq %rax, -0x20(%rbp)
movq -0xb0(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x42ec0
movq %rax, %rdi
callq 0x2e130
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x138(%rbp)
movq -0xb0(%rbp), %rax
movq 0x8(%rax), %rdi
movq %rdi, -0x130(%rbp)
callq 0x42ec0
movq -0x138(%rbp), %rdi
movq -0x130(%rbp), %rsi
movq %rax, %rdx
callq 0x1fbf0
movq -0xb0(%rbp), %rdi
callq 0x3aaa0
movl -0xc(%rbp), %eax
addl $-0x9, %eax
movl %eax, %ecx
movq %rcx, -0x128(%rbp)
subl $0x4, %eax
ja 0x45d15
movq -0x128(%rbp), %rax
leaq 0x9d057(%rip), %rcx     # 0xe2acc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x32a00
movq %rax, -0xb8(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x30530
movq %rax, -0xc0(%rbp)
movl $0x0, -0xdc(%rbp)
movq -0xc0(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
leaq -0xd4(%rbp), %rdx
leaq -0xd0(%rbp), %rcx
leaq -0xd8(%rbp), %r8
callq 0x30550
movq %rax, -0xc0(%rbp)
cmpq $0x0, %rax
je 0x45b64
movl -0xd4(%rbp), %eax
cmpl -0xdc(%rbp), %eax
jbe 0x45afb
movl -0xd4(%rbp), %eax
movl %eax, -0xdc(%rbp)
movl -0xd8(%rbp), %eax
cmpl -0xdc(%rbp), %eax
jbe 0x45b15
movl -0xd8(%rbp), %eax
movl %eax, -0xdc(%rbp)
movq -0xb8(%rbp), %rdi
movq -0xc8(%rbp), %rsi
movl -0xd4(%rbp), %edx
movl $0x1, %ecx
callq 0x32a60
movq %rax, -0xb8(%rbp)
movq -0xb8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
movl -0xd8(%rbp), %edx
movl $0x1, %ecx
callq 0x32a60
movq %rax, -0xb8(%rbp)
jmp 0x45aa8
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2e3a0
movq -0xb8(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
andl $-0x10, %ecx
orl $0x4, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x50, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rdi
callq 0x557a0
leaq 0xcdd49(%rip), %rcx     # 0x1138f8
cmpq 0x758(%rcx), %rax
ja 0x45bce
movl -0xdc(%rbp), %eax
leaq 0xcdd33(%rip), %rcx     # 0x1138f8
cmpq 0x760(%rcx), %rax
jbe 0x45bdc
movq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0x55030
jmp 0x45d37
movq -0x20(%rbp), %rax
movl (%rax), %ecx
andl $-0x10, %ecx
orl $0x1, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x50, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x33f70
movl %eax, %eax
leaq 0xcdce2(%rip), %rcx     # 0x1138f8
cmpq 0x768(%rcx), %rax
jbe 0x45c2d
movq -0x20(%rbp), %rdi
movl $0x4, %esi
callq 0x47d40
jmp 0x45d37
movq -0x20(%rbp), %rax
movl (%rax), %ecx
andl $-0x10, %ecx
orl $0x2, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x60, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x67ab0
movl %eax, %eax
leaq 0xcdc91(%rip), %rcx     # 0x1138f8
cmpq 0x778(%rcx), %rax
jbe 0x45c7e
movq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0x4aeb0
jmp 0x45d37
movq -0x20(%rbp), %rax
movl (%rax), %ecx
andl $-0x10, %ecx
orl $0x3, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x50, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rdi
callq 0x50080
movl %eax, %eax
leaq 0xcdc44(%rip), %rcx     # 0x1138f8
cmpq 0x780(%rcx), %rax
jbe 0x45ccb
movq -0x20(%rbp), %rdi
movl $0x7, %esi
callq 0x50110
jmp 0x45d37
movq -0x20(%rbp), %rax
movl (%rax), %ecx
andl $-0x10, %ecx
orl $0x4, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
movl (%rax), %ecx
andl $0xffffff0f, %ecx       # imm = 0xFFFFFF0F
orl $0x50, %ecx
movl %ecx, (%rax)
movq -0x20(%rbp), %rdi
callq 0x557a0
leaq 0xcdbfc(%rip), %rcx     # 0x1138f8
cmpq 0x758(%rcx), %rax
jbe 0x45d13
movq -0x20(%rbp), %rdi
movl $0x2, %esi
callq 0x55030
jmp 0x45d37
leaq 0x9cff1(%rip), %rdi     # 0xe2d0d
leaq 0x9cde1(%rip), %rsi     # 0xe2b04
movl $0x605, %edx            # imm = 0x605
callq 0x63d40
movl $0x1, %edi
callq 0x1f3b0
jmp 0x45d5b
leaq 0x9b7bb(%rip), %rdi     # 0xe14fb
leaq 0x9cdbd(%rip), %rsi     # 0xe2b04
movl $0x60a, %edx            # imm = 0x60A
callq 0x63d40
movl $0x1, %edi
callq 0x1f3b0
jmp 0x45d5d
jmp 0x45d5f
jmp 0x45d61
jmp 0x45d63
jmp 0x45d65
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw (%rax,%rax)