// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movl %edi, %r15d
cmpl $0x4, %edi
ja 0x37c73
movl %r15d, %eax
leaq 0x61055(%rip), %rcx     # 0x98a14
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
movl $0x1, %esi
callq 0x36bfd
testq %rax, %rax
je 0x380f5
movq %rax, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x30c49
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3645f
cmpl $-0x1, %eax
je 0x380f7
movl %eax, %ebp
callq 0x30911
movq %rax, %rbx
leaq 0x9258e(%rip), %r13     # 0xc9fa8
cmpq %rbp, 0x758(%r13)
jae 0x37a30
movq %rbx, %rdi
movl $0x2, %esi
callq 0x42183
movl $0xf0, %ecx
movl (%rbx), %eax
andl %ecx, %eax
cmpl $0x50, %eax
setne %al
testq %rbp, %rbp
sete %cl
orb %al, %cl
jne 0x3805c
decq %rbp
movq %rbp, %rax
movq %rax, %rbp
movq %r14, %rdi
xorl %esi, %esi
callq 0x36bfd
testq %rax, %rax
je 0x380f5
movq %rax, %r15
movl (%rax), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x38123
movq %r14, %rdi
xorl %esi, %esi
callq 0x36bfd
testq %rax, %rax
je 0x380f5
movq %rax, %r12
movl (%rax), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x38152
movq 0x8(%rbx), %rdi
movq 0x8(%r15), %rsi
movl -0x8(%rsi), %edx
movl $0x1, %ecx
callq 0x2be64
movq %rax, 0x8(%rbx)
movq 0x8(%r12), %rsi
movl -0x8(%rsi), %edx
movq %rax, %rdi
movl $0x1, %ecx
callq 0x2be64
movq %rax, 0x8(%rbx)
movq 0x8(%r15), %rax
movslq -0x8(%rax), %rcx
movq 0x760(%r13), %rax
cmpq %rcx, %rax
jb 0x3803f
movq 0x8(%r12), %rcx
movslq -0x8(%rcx), %rcx
cmpq %rcx, %rax
jb 0x3803f
movq %r15, %rdi
callq 0x30b0c
movq %r12, %rdi
callq 0x30b0c
movl (%rbx), %edx
movl $0xf0, %eax
andl %eax, %edx
movq %rbp, %rax
addq $-0x1, %rax
setb %cl
cmpl $0x50, %edx
jne 0x3805c
testb %cl, %cl
jne 0x37a53
jmp 0x3805c
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3645f
cmpl $-0x1, %eax
je 0x380f7
movl %eax, %ebp
movl %eax, %r15d
leaq 0x92456(%rip), %rax     # 0xc9fa8
cmpq %r15, 0x778(%rax)
jae 0x37dc2
callq 0x3089e
movq %rax, %rbx
cmpl $0x5, %ebp
jb 0x37dca
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x221e2
jmp 0x37dd2
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3645f
cmpl $-0x1, %eax
je 0x380f7
movl %eax, %ebp
callq 0x30946
movq %rax, %rbx
testl %ebp, %ebp
je 0x37f38
movq 0x8(%rbx), %r15
movl %ebp, %ebp
xorl %r13d, %r13d
movq %r14, %rdi
movl $0x1, %esi
callq 0x36bfd
testq %rax, %rax
je 0x380f5
movq %rax, %rdi
callq 0x30c49
movq %rax, %r12
movq %r14, %rdi
leaq 0x10(%rsp), %rsi
callq 0x36d8b
cmpl $-0x1, %eax
je 0x380f5
movl (%r12), %eax
shrl $0x4, %eax
testb $0x7, %al
jne 0x37c03
movq 0x8(%r12), %rax
movslq -0x8(%rax), %rax
cmpq %rax, %r13
cmovbeq %rax, %r13
decq %rbp
movq 0x8(%r15), %rdi
movsd 0x10(%rsp), %xmm0
movq %r12, %rsi
callq 0x3d10a
movq (%r15), %rdi
leaq 0x8(%rax), %rdx
movq %r12, %rsi
callq 0x2249c
movq %r12, %rdi
callq 0x306f3
testq %rbp, %rbp
jne 0x37bb1
jmp 0x37f3b
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3645f
cmpl $-0x1, %eax
je 0x380f7
movl %eax, %r13d
leaq 0x9234c(%rip), %rbp     # 0xc9fa8
cmpq %r13, 0x768(%rbp)
jae 0x37e72
callq 0x30819
jmp 0x37e77
addl $-0x9, %r15d
cmpl $0x4, %r15d
ja 0x38138
xorl %ebx, %ebx
movq %r14, %rdi
xorl %esi, %esi
callq 0x36bfd
testq %rax, %rax
je 0x380f7
movq %rax, %r14
xorl %edi, %edi
xorl %esi, %esi
callq 0x3059c
movq %rax, %rbx
movq 0x8(%r14), %rax
movslq -0x8(%rax), %rdi
callq 0x299b5
movq %rax, 0x8(%rbx)
movq 0x8(%r14), %rsi
movslq -0x8(%rsi), %rdx
movq %rax, %rdi
callq 0x1fbd0
movq %r14, %rdi
callq 0x30b0c
leaq 0x60d53(%rip), %rax     # 0x98a28
movslq (%rax,%r15,4), %rcx
addq %rax, %rcx
jmpq *%rcx
callq 0x2be40
movq %rax, %r14
movq 0x8(%rbx), %rdi
callq 0x2a9c2
leaq 0x10(%rsp), %rsi
leaq 0x1c(%rsp), %rdx
leaq 0x20(%rsp), %rcx
leaq 0xc(%rsp), %r8
movq %rax, %rdi
callq 0x2a9c7
xorl %r13d, %r13d
testq %rax, %rax
je 0x37d84
movq %rax, %r12
leaq 0x20(%rsp), %rbp
leaq 0xc(%rsp), %r15
movl 0x1c(%rsp), %edx
cmpl %r13d, %edx
cmoval %edx, %r13d
movl 0xc(%rsp), %eax
cmpl %r13d, %eax
cmoval %eax, %r13d
movq 0x10(%rsp), %rsi
movq %r14, %rdi
movl $0x1, %ecx
callq 0x2be64
movq 0x20(%rsp), %rsi
movl 0xc(%rsp), %edx
movq %rax, %rdi
movl $0x1, %ecx
callq 0x2be64
movq %rax, %r14
movq %r12, %rdi
leaq 0x10(%rsp), %rsi
leaq 0x1c(%rsp), %rdx
movq %rbp, %rcx
movq %r15, %r8
callq 0x2a9c7
movq %rax, %r12
testq %rax, %rax
jne 0x37d20
movl %r13d, %r13d
movq 0x8(%rbx), %rdi
callq 0x29af7
movq %r14, 0x8(%rbx)
movb $0x54, (%rbx)
movq %rbx, %rdi
callq 0x4261c
leaq 0x92205(%rip), %rcx     # 0xc9fa8
cmpq 0x758(%rcx), %rax
ja 0x37f92
cmpq %r13, 0x760(%rcx)
jae 0x380f7
jmp 0x37f92
callq 0x308dc
movq %rax, %rbx
testl %ebp, %ebp
je 0x380f7
movl $0xf0, %r12d
movq %r14, %rdi
movl $0x1, %esi
callq 0x36bfd
testq %rax, %rax
je 0x380f5
movq %rax, %rdi
callq 0x30c49
movq %rax, %r13
movl (%rbx), %eax
andl %r12d, %eax
cmpl $0x60, %eax
jne 0x37e43
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
callq 0x30be5
testl %eax, %eax
je 0x37e2f
movq %rbx, %rdi
movl $0x2, %esi
callq 0x3b7f9
movq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x221e2
jmp 0x37e43
movq 0x8(%rbx), %rdi
movq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x4f07c
movq %rax, 0x8(%rbx)
movl (%rbx), %eax
andl %r12d, %eax
cmpl $0x20, %eax
jne 0x37e5d
movq 0x8(%rbx), %rdi
movq %r13, %rsi
xorl %edx, %edx
callq 0x2249c
jmp 0x37e65
movq %r13, %rdi
callq 0x30b0c
decl %ebp
jne 0x37dd8
jmp 0x380f7
callq 0x30869
movq %rax, %rbx
testq %r13, %r13
je 0x380f7
movq %r14, %rdi
movl $0x1, %esi
callq 0x36bfd
testq %rax, %rax
je 0x380f5
movq %rax, %r15
movl (%rbx), %eax
movl %eax, %ecx
andl $0xf0, %ecx
cmpl $0x50, %ecx
jne 0x37ed6
movl (%r15), %ecx
shrl $0x4, %ecx
testb $0x7, %cl
jne 0x37ed6
movq 0x8(%r15), %rcx
movslq -0x8(%rcx), %rcx
cmpq %rcx, 0x770(%rbp)
jae 0x37ed6
movq %rbx, %rdi
movl $0x4, %esi
callq 0x396bc
movl (%rbx), %eax
andl $0xf0, %eax
cmpl $0x50, %eax
jne 0x37f16
movq %r15, %rdi
callq 0x30d93
movq %rax, %r12
movq 0x8(%rbx), %rdi
movq 0x8(%rax), %rsi
movl -0x8(%rsi), %edx
movl $0x1, %ecx
callq 0x2be64
movq %rax, 0x8(%rbx)
movq %r12, %rdi
callq 0x30b0c
movq %r15, %rdi
callq 0x30b0c
jmp 0x37f2a
movq %r15, %rdi
callq 0x30c49
movq 0x8(%rbx), %rdi
movq %rax, %rsi
callq 0x204cb
decq %r13
jne 0x37e83
jmp 0x380f7
xorl %r13d, %r13d
movq %rbx, %rdi
callq 0x3eadd
movl %eax, %ecx
leaq 0x9205c(%rip), %rax     # 0xc9fa8
cmpq %rcx, 0x780(%rax)
jb 0x380f7
cmpq 0x788(%rax), %r13
ja 0x380f7
movq %rbx, %rdi
movl $0x5, %esi
jmp 0x38001
movb $0x54, (%rbx)
movq %rbx, %rdi
callq 0x4261c
leaq 0x92023(%rip), %rcx     # 0xc9fa8
cmpq 0x758(%rcx), %rax
jbe 0x380f7
movq %rbx, %rdi
movl $0x2, %esi
callq 0x42183
jmp 0x380f7
movb $0x62, (%rbx)
movq 0x8(%rbx), %rdi
callq 0x4f4bf
movl %eax, %eax
leaq 0x91fef(%rip), %rcx     # 0xc9fa8
cmpq %rax, 0x778(%rcx)
jae 0x380f7
movq %rbx, %rdi
movl $0x2, %esi
callq 0x3b7f9
jmp 0x380f7
movb $0x53, (%rbx)
movq %rbx, %rdi
callq 0x3eadd
movl %eax, %eax
leaq 0x91fbc(%rip), %rcx     # 0xc9fa8
cmpq %rax, 0x780(%rcx)
jae 0x380f7
movq %rbx, %rdi
movl $0x7, %esi
callq 0x3eb2c
jmp 0x380f7
movb $0x51, (%rbx)
movq 0x8(%rbx), %rdi
callq 0x2cc17
movl %eax, %eax
leaq 0x91f88(%rip), %rcx     # 0xc9fa8
cmpq %rax, 0x768(%rcx)
jae 0x380f7
movq %rbx, %rdi
movl $0x4, %esi
callq 0x396bc
jmp 0x380f7
movq %r15, %rdi
callq 0x30b0c
movq %r12, %rdi
callq 0x30b0c
movq %rbx, %rdi
movl $0x2, %esi
callq 0x42183
movq %rbp, %r13
movl (%rbx), %ecx
movl $0xf0, %eax
andl %eax, %ecx
addq $-0x1, %r13
setb %al
cmpl $0x20, %ecx
jne 0x38109
testb %al, %al
je 0x38109
movq %r14, %rdi
movl $0x1, %esi
callq 0x36bfd
testq %rax, %rax
je 0x380f5
movq %rax, %r15
movq %r14, %rdi
movl $0x1, %esi
callq 0x36bfd
testq %rax, %rax
je 0x380f5
movq %rax, %r12
movq %r15, %rdi
callq 0x30c49
movq %rax, %r15
movq %r12, %rdi
callq 0x30c49
movq 0x8(%rbx), %rdi
movq %r15, %rsi
movq %rax, %rdx
callq 0x2249c
movq %r13, %rbp
testl %eax, %eax
je 0x3805f
leaq 0x60bae(%rip), %rdi     # 0x98c88
leaq 0x609b7(%rip), %rsi     # 0x98a98
movl $0x58d, %edx            # imm = 0x58D
callq 0x4ca32
movl $0x1, %edi
callq 0x1f3b0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testq %rbp, %rbp
je 0x380f7
leaq 0x60b83(%rip), %rdi     # 0x98c98
leaq 0x6097c(%rip), %rsi     # 0x98a98
movl $0x591, %edx            # imm = 0x591
jmp 0x380e6
leaq 0x60b2e(%rip), %rdi     # 0x98c58
leaq 0x60967(%rip), %rsi     # 0x98a98
movl $0x556, %edx            # imm = 0x556
jmp 0x380e6
leaq 0x5f2d4(%rip), %rdi     # 0x97413
leaq 0x60952(%rip), %rsi     # 0x98a98
movl $0x60a, %edx            # imm = 0x60A
callq 0x4cae0
jmp 0x380eb
leaq 0x60b17(%rip), %rdi     # 0x98c70
leaq 0x60938(%rip), %rsi     # 0x98a98
movl $0x559, %edx            # imm = 0x559
jmp 0x380e6