// File: /workspace/github_c_makefile_star2_O1/vtereshkov[P]umka-lang/src/umka_vm.c
// Function: doFillReprBuf
static int doFillReprBuf(const Slot *slot, const Type *type, char *buf, int maxLen, int depth, bool pretty, bool dereferenced, Storage *storage, Error *error)
{
    enum {MAX_DEPTH = 20};

    int len = 0;

    if (depth == MAX_DEPTH)
    {
        len += snprintf(buf + len, maxLen, "...");
        return len;
    }

    switch (type->kind)
    {
        case TYPE_VOID:     len += snprintf(buf + len, maxLen, "void");                                                             break;
        case TYPE_INT8:
        case TYPE_INT16:
        case TYPE_INT32:
        case TYPE_INT:
        case TYPE_UINT8:
        case TYPE_UINT16:
        case TYPE_UINT32:   len += snprintf(buf + len, maxLen, "%lld", (long long int)slot->intVal);                                break;
        case TYPE_UINT:     len += snprintf(buf + len, maxLen, "%llu", (unsigned long long int)slot->uintVal);                      break;
        case TYPE_BOOL:     len += snprintf(buf + len, maxLen, slot->intVal ? "true" : "false");                                    break;
        case TYPE_CHAR:
        {
            const char *format = (unsigned char)slot->intVal >= ' ' ? "'%c'" : "0x%02X";
            len += snprintf(buf + len, maxLen, format, (unsigned char)slot->intVal);
            break;
        }
        case TYPE_REAL32:
        case TYPE_REAL:     len += snprintf(buf + len, maxLen, "%lg", slot->realVal);                                               break;
        case TYPE_PTR:
        {
            len += snprintf(buf + len, maxLen, "%p", slot->ptrVal);

            if (dereferenced && slot->ptrVal && type->base->kind != TYPE_VOID)
            {
                Slot dataSlot = {.ptrVal = slot->ptrVal};
                doDerefImpl(&dataSlot, type->base->kind, error);

                len += snprintf(buf + len, maxLen, " -> ");
                len += doPrintIndented(buf + len, maxLen, depth, pretty, '(');
                len += doFillReprBuf(&dataSlot, type->base, buf + len, maxLen, depth + 1, pretty, dereferenced, storage, error);
                len += doPrintIndented(buf + len, maxLen, depth, pretty, ')');
            }
            break;
        }
        case TYPE_WEAKPTR:  len += snprintf(buf + len, maxLen, "%llx", (unsigned long long int)slot->weakPtrVal);                   break;
        case TYPE_STR:
        {
            doCheckStr((char *)slot->ptrVal, error);
            len += snprintf(buf + len, maxLen, "\"%s\"", slot->ptrVal ? (char *)slot->ptrVal : "");
            break;
        }
        case TYPE_ARRAY:
        {
            len += doPrintIndented(buf + len, maxLen, depth, pretty, '[');

            char *itemPtr = slot->ptrVal;
            const int itemSize = type->base->size;

            for (int i = 0; i < type->numItems; i++)
            {
                Slot itemSlot = {.ptrVal = itemPtr};
                doDerefImpl(&itemSlot, type->base->kind, error);
                len += doFillReprBuf(&itemSlot, type->base, buf + len, maxLen, depth + 1, pretty, dereferenced, storage, error);

                if (i < type->numItems - 1)
                    len += doPrintIndented(buf + len, maxLen, depth, pretty, ' ');

                itemPtr += itemSize;
            }

            len += doPrintIndented(buf + len, maxLen, depth, pretty, ']');
            break;
        }

        case TYPE_DYNARRAY:
        {
            len += doPrintIndented(buf + len, maxLen, depth, pretty, '[');

            const DynArray *array = slot->ptrVal;
            if (array && array->data)
            {
                char *itemPtr = array->data;
                for (int i = 0; i < getDims(array)->len; i++)
                {
                    Slot itemSlot = {.ptrVal = itemPtr};
                    doDerefImpl(&itemSlot, type->base->kind, error);
                    len += doFillReprBuf(&itemSlot, type->base, buf + len, maxLen, depth + 1, pretty, dereferenced, storage, error);

                    if (i < getDims(array)->len - 1)
                        len += doPrintIndented(buf + len, maxLen, depth, pretty, ' ');

                    itemPtr += array->itemSize;
                }
            }

            len += doPrintIndented(buf + len, maxLen, depth, pretty, ']');
            break;
        }

        case TYPE_MAP:
        {
            len += doPrintIndented(buf + len, maxLen, depth, pretty, '{');

            Map *map = slot->ptrVal;
            if (map && map->root)
            {
                const Type *keyType = typeMapKey(map->type);
                const Type *itemType = typeMapItem(map->type);

                void *keys = storageAdd(storage, map->root->len * keyType->size);

                doGetMapKeys(map, keys, error);

                char *keyPtr = (char *)keys;
                for (int i = 0; i < map->root->len; i++)
                {
                    Slot keySlot = {.ptrVal = keyPtr};
                    doDerefImpl(&keySlot, keyType->kind, error);
                    len += doFillReprBuf(&keySlot, keyType, buf + len, maxLen, depth + 1, pretty, dereferenced, storage, error);

                    len += snprintf(buf + len, maxLen, ": ");

                    const MapNode *node = *doGetMapNode(map, keySlot, false, NULL, error);
                    if (UNLIKELY(!node))
                        error->runtimeHandler(error->context, ERR_RUNTIME, "Map node is null");

                    Slot itemSlot = {.ptrVal = node->data};
                    doDerefImpl(&itemSlot, itemType->kind, error);
                    len += doFillReprBuf(&itemSlot, itemType, buf + len, maxLen, depth + 1, pretty, dereferenced, storage, error);

                    if (i < map->root->len - 1)
                        len += doPrintIndented(buf + len, maxLen, depth, pretty, ' ');

                    keyPtr += keyType->size;
                }

                storageRemove(storage, keys);
            }

            len += doPrintIndented(buf + len, maxLen, depth, pretty, '}');
            break;
        }


        case TYPE_STRUCT:
        case TYPE_CLOSURE:
        {
            len += doPrintIndented(buf + len, maxLen, depth, pretty, '{');

            bool skipNames = typeExprListStruct(type);

            for (int i = 0; i < type->numItems; i++)
            {
                Slot fieldSlot = {.ptrVal = (char *)slot->ptrVal + type->field[i]->offset};
                doDerefImpl(&fieldSlot, type->field[i]->type->kind, error);
                if (!skipNames)
                    len += snprintf(buf + len, maxLen, "%s: ", type->field[i]->name);
                len += doFillReprBuf(&fieldSlot, type->field[i]->type, buf + len, maxLen, depth + 1, pretty, dereferenced, storage, error);

                if (i < type->numItems - 1)
                    len += doPrintIndented(buf + len, maxLen, depth, pretty, ' ');
            }

            len += doPrintIndented(buf + len, maxLen, depth, pretty, '}');
            break;
        }

        case TYPE_INTERFACE:
        {
            const Interface *interface = (Interface *)slot->ptrVal;
            if (interface->self)
            {
                Slot selfSlot = {.ptrVal = interface->self};
                doDerefImpl(&selfSlot, interface->selfType->base->kind, error);

                if (pretty)
                {
                    char selfTypeBuf[DEFAULT_STR_LEN + 1];
                    len += snprintf(buf + len, maxLen, "%s", typeSpelling(interface->selfType->base, selfTypeBuf));
                    len += doPrintIndented(buf + len, maxLen, depth, pretty, '(');
                }

                len += doFillReprBuf(&selfSlot, interface->selfType->base, buf + len, maxLen, depth + 1, pretty, dereferenced, storage, error);

                if (pretty)
                    len += doPrintIndented(buf + len, maxLen, depth, pretty, ')');
            }
            else
                len += snprintf(buf + len, maxLen, "null");
            break;
        }

        case TYPE_FIBER:    len += snprintf(buf + len, maxLen, "fiber @ %p", slot->ptrVal);                break;
        case TYPE_FN:       len += snprintf(buf + len, maxLen, "fn @ %lld", (long long int)slot->intVal);  break;
        default:            break;
    }

    return len;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movl %r9d, 0x4(%rsp)
movl %ecx, %r9d
movq %rdx, %rbx
cmpl $0x14, %r8d
jne 0x4905f
movslq %r9d, %rsi
leaq 0x2fcdd(%rip), %rdx     # 0x78d21
movq %rbx, %rdi
xorl %eax, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3170
movq %rsi, %rbp
movq %r8, 0x30(%rsp)
movl (%rsi), %eax
xorl %r13d, %r13d
addl $-0x2, %eax
cmpl $0x18, %eax
ja 0x49fc4
movq %rdi, %r14
movq 0x1e0(%rsp), %r12
movq 0x1d8(%rsp), %rcx
movq %rcx, 0x48(%rsp)
movb 0x1d0(%rsp), %r15b
leaq 0x31305(%rip), %rcx     # 0x7a3a4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq %rbx, 0x38(%rsp)
movl %r9d, 0x24(%rsp)
movq %r12, 0x10(%rsp)
jmpq *%rax
movslq %r9d, %rsi
movq (%r14), %rcx
leaq 0x3323a(%rip), %rdx     # 0x7c2fe
movq %rbx, %rdi
xorl %eax, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3170
movl %r15d, %r12d
movslq %r9d, %rsi
leaq 0x33217(%rip), %rdx     # 0x7c303
movq %rbx, %rdi
movq %rsi, 0x18(%rsp)
movl $0x7b, %ecx
xorl %eax, %eax
callq 0x3170
movl %eax, %r15d
cmpb $0x0, 0x4(%rsp)
je 0x4913b
movslq %r15d, %rdi
addq %rbx, %rdi
movq 0x30(%rsp), %rax
leal 0x4(,%rax,4), %ecx
leaq 0x331e3(%rip), %rdx     # 0x7c306
movq 0x18(%rsp), %rsi
movl $0x20, %r8d
xorl %eax, %eax
callq 0x3170
addl %r15d, %eax
movl %eax, %r15d
cmpl $0x16, (%rbp)
movq 0x30(%rsp), %rax
jne 0x49183
cmpb $0x1, 0x14(%rbp)
jne 0x49183
cmpl $0x0, 0x10(%rbp)
setg %cl
movl %ecx, 0x40(%rsp)
jmp 0x4918b
movslq %r9d, %rsi
movsd (%r14), %xmm0
leaq 0x32f4c(%rip), %rdx     # 0x7c0b4
movq %rbx, %rdi
movb $0x1, %al
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3170
movl $0x0, 0x40(%rsp)
cmpl $0x0, 0x10(%rbp)
jle 0x49370
leal 0x1(%rax), %ecx
movl %ecx, 0x60(%rsp)
leal 0x4(,%rax,4), %eax
movl %eax, 0x50(%rsp)
movzbl %r12b, %eax
movq %rax, 0x28(%rsp)
movzbl 0x4(%rsp), %eax
movl %eax, 0x58(%rsp)
xorl %r13d, %r13d
movq (%r14), %rax
movq 0x28(%rbp), %rcx
movq (%rcx,%r13,8), %rcx
movslq 0x110(%rcx), %r12
addq %rax, %r12
movq %r12, 0x70(%rsp)
movq 0x108(%rcx), %rcx
movl (%rcx), %ebx
testq %rax, %rax
je 0x49351
addl $-0x4, %ebx
cmpl $0x16, %ebx
ja 0x4932d
leaq 0x31269(%rip), %rcx     # 0x7a464
movslq (%rcx,%rbx,4), %rax
addq %rcx, %rax
movq 0x38(%rsp), %rbx
jmpq *%rax
movq (%r12), %rax
jmp 0x4924e
movzbl (%r12), %eax
jmp 0x4924e
movslq (%r12), %rax
jmp 0x4924e
movl (%r12), %eax
jmp 0x4924e
xorps %xmm0, %xmm0
cvtss2sd (%r12), %xmm0
jmp 0x49241
movsbq (%r12), %rax
jmp 0x4924e
movswq (%r12), %rax
jmp 0x4924e
movsd (%r12), %xmm0
movsd %xmm0, 0x70(%rsp)
jmp 0x49253
movzwl (%r12), %eax
movq %rax, 0x70(%rsp)
cmpb $0x0, 0x40(%rsp)
jne 0x4927f
movslq %r15d, %r15
leaq (%rbx,%r15), %rdi
movq 0x28(%rbp), %rax
movq (%rax,%r13,8), %rcx
movq 0x18(%rsp), %rsi
leaq 0x33074(%rip), %rdx     # 0x7c2e9
xorl %eax, %eax
callq 0x3170
addl %eax, %r15d
movl 0x24(%rsp), %ecx
movq 0x48(%rsp), %r10
movq 0x10(%rsp), %r11
movq 0x28(%rbp), %rax
movq (%rax,%r13,8), %rax
movq 0x108(%rax), %rsi
movslq %r15d, %r15
leaq (%rbx,%r15), %rdx
subq $0x8, %rsp
leaq 0x78(%rsp), %rdi
movl 0x68(%rsp), %r8d
movl 0x60(%rsp), %r9d
pushq %r11
pushq %r10
pushq 0x40(%rsp)
callq 0x49018
addq $0x20, %rsp
addl %eax, %r15d
movslq 0x10(%rbp), %rax
decq %rax
cmpq %rax, %r13
jge 0x4931b
movslq %r15d, %rdi
addq %rbx, %rdi
cmpb $0x0, 0x4(%rsp)
je 0x49302
movq 0x18(%rsp), %rsi
leaq 0x33017(%rip), %rdx     # 0x7c306
movl 0x50(%rsp), %ecx
movl $0x20, %r8d
xorl %eax, %eax
callq 0x3170
jmp 0x49315
movq 0x18(%rsp), %rsi
leaq 0x2c1b0(%rip), %rdx     # 0x754be
xorl %eax, %eax
callq 0x3170
addl %r15d, %eax
movl %eax, %r15d
incq %r13
movslq 0x10(%rbp), %rax
cmpq %rax, %r13
jl 0x491bc
jmp 0x49370
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x2dcce(%rip), %rdx     # 0x77010
xorl %eax, %eax
callq *0x8(%rcx)
movq 0x38(%rsp), %rbx
jmp 0x49253
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x2dc9a(%rip), %rdx     # 0x77000
xorl %eax, %eax
callq *0x8(%rcx)
jmp 0x491e8
movslq %r15d, %rax
addq %rax, %rbx
xorl %eax, %eax
cmpb $0x0, 0x4(%rsp)
je 0x49ed9
movq 0x30(%rsp), %rcx
testl %ecx, %ecx
jle 0x49ec3
shll $0x2, %ecx
leaq 0x32f6c(%rip), %rdx     # 0x7c306
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movl $0x20, %r8d
xorl %eax, %eax
callq 0x3170
jmp 0x49ed9
movslq %r9d, %rsi
leaq 0x32f45(%rip), %rdx     # 0x7c303
movq %rbx, %rdi
movq %rsi, 0x50(%rsp)
movl $0x7b, %ecx
xorl %eax, %eax
callq 0x3170
movl %eax, %r12d
cmpb $0x0, 0x4(%rsp)
je 0x4940d
movslq %r12d, %rdi
addq %rbx, %rdi
movq 0x30(%rsp), %rax
leal 0x4(,%rax,4), %ecx
leaq 0x32f11(%rip), %rdx     # 0x7c306
movq 0x50(%rsp), %rsi
movl $0x20, %r8d
xorl %eax, %eax
callq 0x3170
addl %r12d, %eax
movl %eax, %r12d
movq (%r14), %rbp
testq %rbp, %rbp
je 0x49f4e
movq 0x8(%rbp), %rax
testq %rax, %rax
je 0x49f4e
movb %r15b, 0x18(%rsp)
leaq 0x8(%rbp), %r15
movq (%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x28(%rcx), %rcx
movq 0x8(%rcx), %rdx
movq 0x10(%rcx), %rcx
movq 0x108(%rdx), %rdx
movq 0x8(%rdx), %r14
movq 0x108(%rcx), %rcx
movq 0x8(%rcx), %r13
movslq 0xc0(%r14), %rsi
imulq (%rax), %rsi
movq 0x48(%rsp), %rdi
callq 0xcca8
leaq 0x70(%rsp), %rbx
movl $0x0, (%rbx)
movq 0x8(%rbp), %rsi
movq %rbp, %rdi
movq %rax, 0x178(%rsp)
movq %rax, %rdx
movq %rbx, %rcx
movq 0x10(%rsp), %r8
callq 0x4a312
movslq (%rbx), %rax
movq 0x8(%rbp), %rcx
cmpq %rax, (%rcx)
jne 0x4a303
movq (%r15), %rax
cmpq $0x0, (%rax)
jle 0x49f37
movq 0x30(%rsp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x40(%rsp)
leal 0x4(,%rax,4), %eax
movl %eax, 0x6c(%rsp)
movzbl 0x18(%rsp), %eax
movq %rax, 0x60(%rsp)
movzbl 0x4(%rsp), %eax
movl %eax, 0x28(%rsp)
xorl %ecx, %ecx
movq 0x178(%rsp), %rdx
movq %r15, 0x190(%rsp)
movq %r14, 0x180(%rsp)
movq %r13, 0x188(%rsp)
movq %rcx, 0x18(%rsp)
movq %rdx, 0x70(%rsp)
movl (%r14), %ebx
testq %rdx, %rdx
movq %rdx, 0x58(%rsp)
je 0x49874
addl $-0x4, %ebx
cmpl $0x16, %ebx
ja 0x4982e
leaq 0x30f91(%rip), %rcx     # 0x7a4c0
movslq (%rcx,%rbx,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%rdx), %rax
jmp 0x4956f
movzbl (%rdx), %eax
jmp 0x4956f
movslq (%rdx), %rax
jmp 0x4956f
movl (%rdx), %eax
jmp 0x4956f
xorps %xmm0, %xmm0
cvtss2sd (%rdx), %xmm0
jmp 0x49564
movsbq (%rdx), %rax
jmp 0x4956f
movswq (%rdx), %rax
jmp 0x4956f
movsd (%rdx), %xmm0
movsd %xmm0, 0x70(%rsp)
jmp 0x49574
movzwl (%rdx), %eax
movq %rax, 0x70(%rsp)
movslq %r12d, %r12
movq 0x38(%rsp), %rbx
leaq (%rbx,%r12), %rdx
subq $0x8, %rsp
leaq 0x78(%rsp), %rdi
movq %r14, %rsi
movl 0x2c(%rsp), %ecx
movl 0x48(%rsp), %r8d
movl 0x30(%rsp), %r9d
pushq 0x18(%rsp)
pushq 0x58(%rsp)
pushq 0x78(%rsp)
callq 0x49018
addq $0x20, %rsp
addl %eax, %r12d
movslq %r12d, %rdi
addq %rbx, %rdi
movq 0x50(%rsp), %rsi
leaq 0x32d27(%rip), %rdx     # 0x7c2eb
xorl %eax, %eax
callq 0x3170
movl %eax, %r14d
movq 0x70(%rsp), %rbx
cmpq $0x0, (%r15)
je 0x49898
addl %r14d, %r12d
movq (%r15), %rax
testq %rax, %rax
je 0x496d8
movq 0x8(%rax), %r14
testq %r14, %r14
je 0x4962f
movq (%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movq 0x108(%rax), %rax
movq 0x8(%rax), %rax
movl (%rax), %eax
addl $-0x4, %eax
cmpl $0x16, %eax
ja 0x49667
leaq 0x30efb(%rip), %rcx     # 0x7a51c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%r14), %r14
jmp 0x49681
movl $0x1, %eax
jmp 0x496ac
movzbl (%r14), %r14d
jmp 0x49681
movslq (%r14), %r14
jmp 0x49681
movzwl (%r14), %r14d
jmp 0x49681
movl (%r14), %r14d
jmp 0x49681
movsbq (%r14), %r14
jmp 0x49681
movswq (%r14), %r14
jmp 0x49681
xorps %xmm0, %xmm0
cvtss2sd (%r14), %xmm0
movq %xmm0, %r14
jmp 0x49681
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x2d994(%rip), %rdx     # 0x77010
xorl %eax, %eax
callq *0x8(%rcx)
movq (%rbp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movq 0x108(%rax), %rax
movq 0x8(%rax), %rdx
movq %rbx, %rdi
movq %r14, %rsi
movq 0x10(%rsp), %rcx
callq 0x48d31
movl $0x20, %ecx
testq %rax, %rax
jle 0x496c0
addq (%r15), %rcx
movb $0x1, %al
movq %rcx, %r15
jmp 0x496c7
js 0x496d1
xorl %eax, %eax
movq %r15, %r13
testb %al, %al
jne 0x495e0
jmp 0x496db
movl $0x18, %ecx
jmp 0x496b6
movq %r15, %r13
movq (%r13), %rbx
testq %rbx, %rbx
je 0x498b7
movq 0x10(%rbx), %rbx
movq %rbx, 0x8(%rsp)
movq 0x188(%rsp), %r13
movl (%r13), %r14d
testq %rbx, %rbx
movq 0x190(%rsp), %r15
je 0x498d6
addl $-0x4, %r14d
cmpl $0x16, %r14d
ja 0x4984d
leaq 0x30e55(%rip), %rcx     # 0x7a578
movslq (%rcx,%r14,4), %rax
addq %rcx, %rax
movq 0x180(%rsp), %r14
jmpq *%rax
movq (%rbx), %rax
jmp 0x4976b
movzbl (%rbx), %eax
jmp 0x4976b
movslq (%rbx), %rax
jmp 0x4976b
movl (%rbx), %eax
jmp 0x4976b
xorps %xmm0, %xmm0
cvtss2sd (%rbx), %xmm0
jmp 0x49760
movsbq (%rbx), %rax
jmp 0x4976b
movswq (%rbx), %rax
jmp 0x4976b
movsd (%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x49770
movzwl (%rbx), %eax
movq %rax, 0x8(%rsp)
movslq %r12d, %r12
movq 0x38(%rsp), %rbx
leaq (%rbx,%r12), %rdx
subq $0x8, %rsp
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
movl 0x2c(%rsp), %ecx
movl 0x48(%rsp), %r8d
movl 0x30(%rsp), %r9d
pushq 0x18(%rsp)
pushq 0x58(%rsp)
pushq 0x78(%rsp)
callq 0x49018
addq $0x20, %rsp
addl %eax, %r12d
movq (%r15), %rax
movq (%rax), %rax
decq %rax
movq 0x18(%rsp), %rcx
cmpq %rcx, %rax
jle 0x4980b
movslq %r12d, %rdi
addq %rbx, %rdi
cmpb $0x0, 0x4(%rsp)
je 0x497ed
movq 0x50(%rsp), %rsi
leaq 0x32b2c(%rip), %rdx     # 0x7c306
movl 0x6c(%rsp), %ecx
movl $0x20, %r8d
xorl %eax, %eax
callq 0x3170
jmp 0x49800
movq 0x50(%rsp), %rsi
leaq 0x2bcc5(%rip), %rdx     # 0x754be
xorl %eax, %eax
callq 0x3170
addl %r12d, %eax
movl %eax, %r12d
movq 0x18(%rsp), %rcx
movq 0x58(%rsp), %rdx
movslq 0xc0(%r14), %rax
addq %rax, %rdx
incq %rcx
movq (%r15), %rax
cmpq %rcx, (%rax)
jg 0x49501
jmp 0x49f3c
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x2d7cd(%rip), %rdx     # 0x77010
xorl %eax, %eax
callq *0x8(%rcx)
jmp 0x49574
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x2d7ae(%rip), %rdx     # 0x77010
xorl %eax, %eax
callq *0x8(%rcx)
movq 0x180(%rsp), %r14
jmp 0x49770
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x2d777(%rip), %rdx     # 0x77000
xorl %eax, %eax
callq *0x8(%rcx)
movq 0x58(%rsp), %rdx
jmp 0x4951c
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x32931(%rip), %rdx     # 0x7c1de
xorl %eax, %eax
callq *0x8(%rcx)
jmp 0x495dd
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x32a0c(%rip), %rdx     # 0x7c2d8
xorl %eax, %eax
callq *0x8(%rcx)
jmp 0x496e8
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x2d715(%rip), %rdx     # 0x77000
xorl %eax, %eax
callq *0x8(%rcx)
jmp 0x4970e
movl %r15d, %ebp
movq (%r14), %r15
movq (%r15), %rax
testq %rax, %rax
je 0x49eb4
movq %rax, 0x8(%rsp)
movq 0x8(%r15), %rcx
movq 0x8(%rcx), %rcx
movl (%rcx), %ecx
addl $-0x4, %ecx
cmpl $0x16, %ecx
ja 0x4a16e
leaq 0x30adf(%rip), %rdx     # 0x7a408
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq (%rax), %rax
jmp 0x4a008
movslq %r9d, %rsi
cmpq $0x0, (%r14)
leaq 0x29ab1(%rip), %rax     # 0x733f9
leaq 0x29aa5(%rip), %rdx     # 0x733f4
cmoveq %rax, %rdx
jmp 0x49044
movslq %r9d, %rsi
movq (%r14), %rcx
leaq 0x32991(%rip), %rdx     # 0x7c2f6
movq %rbx, %rdi
movq %rsi, 0x18(%rsp)
xorl %eax, %eax
callq 0x3170
movl %eax, %r13d
testb %r15b, %r15b
je 0x49fc4
movq (%r14), %rax
testq %rax, %rax
je 0x49fc4
movq 0x8(%rbp), %rcx
movl (%rcx), %ecx
cmpl $0x2, %ecx
je 0x49fc4
movq %rax, 0x70(%rsp)
addl $-0x4, %ecx
cmpl $0x16, %ecx
ja 0x4a2e1
leaq 0x30cd9(%rip), %rdx     # 0x7a68c
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
movq 0x18(%rsp), %r15
jmpq *%rcx
movq (%rax), %rax
jmp 0x4a1ba
movslq %r9d, %rsi
movq (%r14), %rcx
leaq 0x32923(%rip), %rdx     # 0x7c2f9
jmp 0x490c4
movzbl (%r14), %ecx
cmpl $0x20, %ecx
leaq 0x328d4(%rip), %rax     # 0x7c2bd
leaq 0x328d2(%rip), %rdx     # 0x7c2c2
cmovaeq %rax, %rdx
movslq %r9d, %rsi
movq %rbx, %rdi
xorl %eax, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x3170
movslq %r9d, %rsi
leaq 0x2d85e(%rip), %rdx     # 0x7727a
jmp 0x49044
movslq %r9d, %rsi
movq (%r14), %rcx
leaq 0x3288a(%rip), %rdx     # 0x7c2b8
jmp 0x490c4
movslq %r9d, %rsi
movq (%r14), %rcx
leaq 0x328ae(%rip), %rdx     # 0x7c2ee
jmp 0x490c4
movslq %r9d, %rsi
movq (%r14), %rcx
leaq 0x3287c(%rip), %rdx     # 0x7c2ce
jmp 0x490c4
movslq %r9d, %rsi
leaq 0x328a2(%rip), %rdx     # 0x7c303
movq %rbx, %rdi
movq %rsi, 0x28(%rsp)
movl $0x5b, %ecx
xorl %eax, %eax
callq 0x3170
movl %eax, %r12d
cmpb $0x0, 0x4(%rsp)
je 0x49ab0
movslq %r12d, %rdi
addq %rbx, %rdi
movq 0x30(%rsp), %rax
leal 0x4(,%rax,4), %ecx
leaq 0x3286e(%rip), %rdx     # 0x7c306
movq 0x28(%rsp), %rsi
movl $0x20, %r8d
xorl %eax, %eax
callq 0x3170
addl %r12d, %eax
movl %eax, %r12d
cmpl $0x0, 0x10(%rbp)
jle 0x49e72
movq 0x8(%rbp), %rax
movslq 0xc0(%rax), %rax
movq %rax, 0x18(%rsp)
movq (%r14), %r14
movq 0x30(%rsp), %rax
leal 0x1(%rax), %ecx
movl %ecx, 0x40(%rsp)
leal 0x4(,%rax,4), %eax
movl %eax, 0x58(%rsp)
movzbl %r15b, %eax
movq %rax, 0x60(%rsp)
movzbl 0x4(%rsp), %r13d
xorl %ebx, %ebx
movq %r14, 0x70(%rsp)
movq 0x8(%rbp), %rax
movl (%rax), %r15d
testq %r14, %r14
je 0x49c28
addl $-0x4, %r15d
cmpl $0x16, %r15d
ja 0x49c09
leaq 0x30b11(%rip), %rcx     # 0x7a630
movslq (%rcx,%r15,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%r14), %rax
jmp 0x49b64
movzbl (%r14), %eax
jmp 0x49b64
movslq (%r14), %rax
jmp 0x49b64
movl (%r14), %eax
jmp 0x49b64
xorps %xmm0, %xmm0
cvtss2sd (%r14), %xmm0
jmp 0x49b58
movsbq (%r14), %rax
jmp 0x49b64
movswq (%r14), %rax
jmp 0x49b64
movsd (%r14), %xmm0
movsd %xmm0, 0x70(%rsp)
jmp 0x49b69
movzwl (%r14), %eax
movq %rax, 0x70(%rsp)
movq 0x8(%rbp), %rsi
movslq %r12d, %r12
movq 0x38(%rsp), %r15
leaq (%r15,%r12), %rdx
subq $0x8, %rsp
leaq 0x78(%rsp), %rdi
movl 0x2c(%rsp), %ecx
movl 0x48(%rsp), %r8d
movl %r13d, %r9d
pushq 0x18(%rsp)
pushq 0x58(%rsp)
pushq 0x78(%rsp)
callq 0x49018
addq $0x20, %rsp
addl %eax, %r12d
movl 0x10(%rbp), %eax
decl %eax
cmpl %eax, %ebx
jge 0x49bf4
movslq %r12d, %rdi
addq %r15, %rdi
cmpb $0x0, 0x4(%rsp)
je 0x49bdb
movq 0x28(%rsp), %rsi
leaq 0x3273e(%rip), %rdx     # 0x7c306
movl 0x58(%rsp), %ecx
movl $0x20, %r8d
xorl %eax, %eax
callq 0x3170
jmp 0x49bee
movq 0x28(%rsp), %rsi
leaq 0x2b8d7(%rip), %rdx     # 0x754be
xorl %eax, %eax
callq 0x3170
addl %r12d, %eax
movl %eax, %r12d
addq 0x18(%rsp), %r14
incl %ebx
cmpl 0x10(%rbp), %ebx
jl 0x49af5
jmp 0x49e72
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x2d3f2(%rip), %rdx     # 0x77010
xorl %eax, %eax
callq *0x8(%rcx)
jmp 0x49b69
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x2d3c3(%rip), %rdx     # 0x77000
xorl %eax, %eax
callq *0x8(%rcx)
jmp 0x49b0a
movslq %r9d, %rsi
movq (%r14), %rax
testq %rax, %rax
leaq 0x2e51f(%rip), %rcx     # 0x78176
cmovneq %rax, %rcx
leaq 0x32671(%rip), %rdx     # 0x7c2d3
jmp 0x490c4
movslq %r9d, %rsi
leaq 0x32692(%rip), %rdx     # 0x7c303
movq %rbx, %rdi
movq %rsi, 0x28(%rsp)
movl $0x5b, %ecx
xorl %eax, %eax
callq 0x3170
movl %eax, %r12d
cmpb $0x0, 0x4(%rsp)
je 0x49cc0
movslq %r12d, %rdi
addq %rbx, %rdi
movq 0x30(%rsp), %rax
leal 0x4(,%rax,4), %ecx
leaq 0x3265e(%rip), %rdx     # 0x7c306
movq 0x28(%rsp), %rsi
movl $0x20, %r8d
xorl %eax, %eax
callq 0x3170
addl %r12d, %eax
movl %eax, %r12d
movq (%r14), %r14
testq %r14, %r14
je 0x49e72
movl %r15d, %ecx
movq 0x10(%r14), %r15
testq %r15, %r15
je 0x49e72
movq 0x10(%r14), %rax
cmpq $0x0, -0x10(%rax)
jle 0x49e72
movq 0x30(%rsp), %rax
leal 0x1(%rax), %edx
movl %edx, 0x18(%rsp)
leal 0x4(,%rax,4), %eax
movl %eax, 0x58(%rsp)
movzbl %cl, %eax
movq %rax, 0x40(%rsp)
movzbl 0x4(%rsp), %eax
movl %eax, 0x60(%rsp)
xorl %ebx, %ebx
movq %r15, 0x70(%rsp)
movq 0x8(%rbp), %rax
movl (%rax), %r13d
testq %r15, %r15
je 0x49e53
addl $-0x4, %r13d
cmpl $0x16, %r13d
ja 0x49e34
leaq 0x30895(%rip), %rcx     # 0x7a5d4
movslq (%rcx,%r13,4), %rax
addq %rcx, %rax
jmpq *%rax
movq (%r15), %rax
jmp 0x49d84
movzbl (%r15), %eax
jmp 0x49d84
movslq (%r15), %rax
jmp 0x49d84
movl (%r15), %eax
jmp 0x49d84
xorps %xmm0, %xmm0
cvtss2sd (%r15), %xmm0
jmp 0x49d78
movsbq (%r15), %rax
jmp 0x49d84
movswq (%r15), %rax
jmp 0x49d84
movsd (%r15), %xmm0
movsd %xmm0, 0x70(%rsp)
jmp 0x49d89
movzwl (%r15), %eax
movq %rax, 0x70(%rsp)
movq 0x8(%rbp), %rsi
movslq %r12d, %r12
movq 0x38(%rsp), %r13
leaq (%r12,%r13), %rdx
subq $0x8, %rsp
leaq 0x78(%rsp), %rdi
movl 0x2c(%rsp), %ecx
movl 0x20(%rsp), %r8d
movl 0x68(%rsp), %r9d
pushq 0x18(%rsp)
pushq 0x58(%rsp)
pushq 0x58(%rsp)
callq 0x49018
addq $0x20, %rsp
addl %eax, %r12d
movq 0x10(%r14), %rax
movq -0x10(%rax), %rax
decq %rax
cmpq %rbx, %rax
jle 0x49e1d
movslq %r12d, %rdi
addq %r13, %rdi
cmpb $0x0, 0x4(%rsp)
je 0x49e04
movq 0x28(%rsp), %rsi
leaq 0x32515(%rip), %rdx     # 0x7c306
movl 0x58(%rsp), %ecx
movl $0x20, %r8d
xorl %eax, %eax
callq 0x3170
jmp 0x49e17
movq 0x28(%rsp), %rsi
leaq 0x2b6ae(%rip), %rdx     # 0x754be
xorl %eax, %eax
callq 0x3170
addl %r12d, %eax
movl %eax, %r12d
addq 0x8(%r14), %r15
incq %rbx
movq 0x10(%r14), %rax
cmpq %rbx, -0x10(%rax)
jg 0x49d15
jmp 0x49e72
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x2d1c7(%rip), %rdx     # 0x77010
xorl %eax, %eax
callq *0x8(%rcx)
jmp 0x49d89
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
leaq 0x2d198(%rip), %rdx     # 0x77000
xorl %eax, %eax
callq *0x8(%rcx)
jmp 0x49d2a
movslq %r12d, %rax
movq 0x38(%rsp), %rbx
addq %rax, %rbx
xorl %eax, %eax
cmpb $0x0, 0x4(%rsp)
je 0x49f18
movq 0x30(%rsp), %rcx
testl %ecx, %ecx
jle 0x49f02
shll $0x2, %ecx
leaq 0x32469(%rip), %rdx     # 0x7c306
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
movl $0x20, %r8d
xorl %eax, %eax
callq 0x3170
jmp 0x49f18
movslq %r9d, %rsi
leaq 0x32526(%rip), %rdx     # 0x7c3e4
jmp 0x49044
leaq 0x2e2ab(%rip), %rdx     # 0x78175
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
xorl %eax, %eax
callq 0x3170
movslq %eax, %r13
addq %r13, %rbx
leaq 0x3241d(%rip), %rdx     # 0x7c303
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movl $0x7d, %ecx
xorl %eax, %eax
callq 0x3170
addl %r15d, %r13d
jmp 0x49fc1
leaq 0x2e26c(%rip), %rdx     # 0x78175
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
xorl %eax, %eax
callq 0x3170
movslq %eax, %r13
addq %r13, %rbx
leaq 0x323de(%rip), %rdx     # 0x7c303
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
movl $0x5d, %ecx
jmp 0x49fb7
movq 0x38(%rsp), %rbx
movq 0x48(%rsp), %rdi
movq 0x178(%rsp), %rsi
callq 0xcde8
movslq %r12d, %rax
addq %rax, %rbx
xorl %eax, %eax
cmpb $0x0, 0x4(%rsp)
je 0x49f9d
movq 0x30(%rsp), %rcx
testl %ecx, %ecx
jle 0x49f87
shll $0x2, %ecx
leaq 0x32396(%rip), %rdx     # 0x7c306
movq %rbx, %rdi
movq 0x50(%rsp), %rsi
movl $0x20, %r8d
xorl %eax, %eax
callq 0x3170
jmp 0x49f9d
leaq 0x2e1e7(%rip), %rdx     # 0x78175
movq %rbx, %rdi
movq 0x50(%rsp), %rsi
xorl %eax, %eax
callq 0x3170
movslq %eax, %r13
addq %r13, %rbx
leaq 0x32359(%rip), %rdx     # 0x7c303
movq %rbx, %rdi
movq 0x50(%rsp), %rsi
movl $0x7d, %ecx
xorl %eax, %eax
callq 0x3170
addl %r12d, %r13d
addl %eax, %r13d
movl %r13d, %eax
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzbl (%rax), %eax
jmp 0x4a008
movslq (%rax), %rax
jmp 0x4a008
movl (%rax), %eax
jmp 0x4a008
cvtss2sd (%rax), %xmm0
jmp 0x49ffd
movsbq (%rax), %rax
jmp 0x4a008
movswq (%rax), %rax
jmp 0x4a008
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0x4a00d
movzwl (%rax), %eax
movq %rax, 0x8(%rsp)
xorl %r12d, %r12d
cmpb $0x0, 0x4(%rsp)
je 0x4a0a7
movslq 0x24(%rsp), %rbx
movq 0x8(%r15), %rax
movq 0x8(%rax), %rdi
leaq 0x70(%rsp), %rsi
callq 0x1ee46
leaq 0x2ecde(%rip), %rdx     # 0x78d17
movq 0x38(%rsp), %rdi
movq %rbx, %rsi
movq %rax, %rcx
xorl %eax, %eax
callq 0x3170
movslq %eax, %r13
movq 0x38(%rsp), %rax
leaq (%rax,%r13), %r14
leaq 0x322a5(%rip), %rdx     # 0x7c303
movq %r14, %rdi
movq %rbx, %rsi
movl $0x28, %ecx
xorl %eax, %eax
callq 0x3170
movslq %eax, %r12
addq %r12, %r14
movq 0x30(%rsp), %rax
leal 0x4(,%rax,4), %ecx
leaq 0x3227d(%rip), %rdx     # 0x7c306
movq %r14, %rdi
movq %rbx, %rsi
movq 0x38(%rsp), %rbx
movl $0x20, %r8d
xorl %eax, %eax
callq 0x3170
addl %r13d, %r12d
addl %eax, %r12d
movq 0x8(%r15), %rax
movq 0x8(%rax), %rsi
movslq %r12d, %r13
leaq (%rbx,%r13), %rdx
movq 0x30(%rsp), %r14
leal 0x1(%r14), %r8d
subq $0x8, %rsp
movzbl %bpl, %eax
movl 0xc(%rsp), %ebp
movzbl %bpl, %r9d
leaq 0x10(%rsp), %rdi
movl 0x2c(%rsp), %r12d
movl %r12d, %ecx
pushq 0x18(%rsp)
pushq 0x58(%rsp)
pushq %rax
callq 0x49018
addq $0x20, %rsp
addl %eax, %r13d
testb %bpl, %bpl
je 0x49fc4
movslq %r13d, %rax
addq %rax, %rbx
movq %rbx, %r15
movslq %r12d, %rbx
testl %r14d, %r14d
jle 0x4a12d
movq %r14, %rcx
shll $0x2, %ecx
leaq 0x321ee(%rip), %rdx     # 0x7c306
movq %r15, %rdi
movq %rbx, %rsi
movl $0x20, %r8d
xorl %eax, %eax
callq 0x3170
jmp 0x4a141
leaq 0x2e041(%rip), %rdx     # 0x78175
movq %r15, %rdi
movq %rbx, %rsi
xorl %eax, %eax
callq 0x3170
movslq %eax, %r14
addq %r14, %r15
leaq 0x321b5(%rip), %rdx     # 0x7c303
movq %r15, %rdi
movq %rbx, %rsi
movl $0x29, %ecx
xorl %eax, %eax
callq 0x3170
addl %r13d, %r14d
addl %eax, %r14d
movl %r14d, %r13d
jmp 0x49fc4
movq 0x20(%r12), %rdi
leaq 0x2ce96(%rip), %rdx     # 0x77010
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq *0x8(%r12)
jmp 0x4a00d
movzbl (%rax), %eax
jmp 0x4a1ba
movslq (%rax), %rax
jmp 0x4a1ba
movl (%rax), %eax
jmp 0x4a1ba
cvtss2sd (%rax), %xmm0
jmp 0x4a1af
movsbq (%rax), %rax
jmp 0x4a1ba
movswq (%rax), %rax
jmp 0x4a1ba
movsd (%rax), %xmm0
movsd %xmm0, 0x70(%rsp)
jmp 0x4a1bf
movzwl (%rax), %eax
movq %rax, 0x70(%rsp)
movslq %r13d, %rdi
addq %rbx, %rdi
leaq 0x320fd(%rip), %rdx     # 0x7c2c9
movq %r15, %rsi
xorl %eax, %eax
callq 0x3170
movl %eax, %r14d
addl %r13d, %r14d
movslq %r14d, %r13
addq %rbx, %r13
leaq 0x3211a(%rip), %rdx     # 0x7c303
movq %r13, %rdi
movq %r15, %rsi
movl $0x28, %ecx
xorl %eax, %eax
callq 0x3170
movl %eax, %r12d
cmpb $0x0, 0x4(%rsp)
je 0x4a234
movslq %r12d, %rax
addq %rax, %r13
movq 0x30(%rsp), %rax
leal 0x4(,%rax,4), %ecx
leaq 0x320e8(%rip), %rdx     # 0x7c306
movq %r13, %rdi
movq %r15, %rsi
movl $0x20, %r8d
xorl %eax, %eax
callq 0x3170
addl %eax, %r12d
addl %r14d, %r12d
movq 0x8(%rbp), %rsi
movslq %r12d, %r12
movq 0x38(%rsp), %r13
leaq (%r12,%r13), %rdx
movq 0x30(%rsp), %rbp
leal 0x1(%rbp), %r8d
subq $0x8, %rsp
movl 0xc(%rsp), %ebx
movzbl %bl, %r9d
leaq 0x78(%rsp), %rdi
movl 0x2c(%rsp), %ecx
pushq 0x18(%rsp)
pushq 0x58(%rsp)
pushq $0x1
callq 0x49018
addq $0x20, %rsp
addl %eax, %r12d
movslq %r12d, %r14
addq %r13, %r14
testb %bl, %bl
movl $0x0, %eax
je 0x4a2c4
testl %ebp, %ebp
jle 0x4a2b0
movq %rbp, %rcx
shll $0x2, %ecx
leaq 0x3206b(%rip), %rdx     # 0x7c306
movq %r14, %rdi
movq %r15, %rsi
movl $0x20, %r8d
xorl %eax, %eax
callq 0x3170
jmp 0x4a2c4
leaq 0x2debe(%rip), %rdx     # 0x78175
movq %r14, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3170
movslq %eax, %r13
addq %r13, %r14
leaq 0x32032(%rip), %rdx     # 0x7c303
movq %r14, %rdi
movq %r15, %rsi
movl $0x29, %ecx
jmp 0x49fb7
movq 0x20(%r12), %rdi
leaq 0x2cd23(%rip), %rdx     # 0x77010
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %eax, %eax
callq *0x8(%r12)
movq 0x18(%rsp), %r15
jmp 0x4a1bf
movq 0x10(%rsp), %rdi
callq 0x7938
jmp 0x494a8