// File: /workspace/github_c_makefile_star2_O0/jtuu[P]quesler/src/vm.c
// Function: run
static InterpretResult run(void) {
#define ARITHMETIC_OP_RI(op) \
    do { \
        uint8_t reg = READ1(); \
        int32_t val1 = AS_DWORD(vm.registers[reg]); \
        int32_t val2 = READ4(); \
        vm.registers[reg] = DWORD_VAL(val1 op val2); \
    } while (false)
#define ARITHMETIC_OP_RR(op) \
    do { \
        uint8_t reg1 = READ1(); \
        uint8_t reg2 = READ1(); \
        int32_t val1 = AS_DWORD(vm.registers[reg1]); \
        int32_t val2 = AS_DWORD(vm.registers[reg2]); \
        vm.registers[reg1] = DWORD_VAL(val1 op val2); \
    } while (false)
#define ARITHMETIC_OP_RF(op) \
    do { \
        uint8_t reg1 = READ1(); \
        int8_t reg2 = READ1(); \
        float val1 = *(float*) &vm.registers[reg1]; \
        float val2 = *(float*) &vm.registers[reg2]; \
        vm.registers[reg1] = FLOAT_VAL(val1 op val2); \
    } while (false)

    while (true) {
#ifdef DEBUG
        printf("          ");
        for (Value* slot = vm.stack; slot < vm.stack_top; slot++) {
            printf("[ ");
            print_value(*slot);
            printf(" ]");
        }
        printf("\n");

        disassemble_instruction(vm.chunk, (size_t) (vm.ip - vm.chunk->code), true);
#endif
        uint16_t opcode = READ1();
        
        if (opcode == EXTENDED_OPCODE_TABLE1 ||
                opcode == EXTENDED_OPCODE_TABLE2) {
            opcode = (uint16_t) (opcode << 8 | READ1());
        }

        const OpcodeDefinition* opcode_def = get_opcode_definition(opcode);

        if (opcode_def == NULL) {
            fprintf(stderr, "VM: Invalid opcode 0x%04x\n", opcode);
            return INTERPRET_RUNTIME_ERROR;
        }

        bool has_stack_args = opcode_def->parameters[0] == T_ARGS;

        Value stack_args[ARG_STACK_LEN];
        if (has_stack_args) {
            take_stack_args(stack_args);
        }

        switch (opcode) {
            case OP_RET: {
                    if (stack_empty()) {
                        return INTERPRET_OK;
                    } else {
                        int32_t ret_addr = AS_DWORD(stack_pop());
                        vm.ip = vm.chunk->code + ret_addr;
                    }
                    break;
                }
            case OP_ARG_PUSHB: {
                uint8_t b = READ1();
                arg_stack_push(BYTE_VAL(b));
                break;
            }
            case OP_ARG_PUSHR: {
                uint8_t reg = READ1();
                arg_stack_push(vm.registers[reg]);
                break;
            }
            case OP_ARG_PUSHS: {
                    uint16_t* str_start = (uint16_t*) vm.ip;
                    uint16_t* str_end = (uint16_t*)  vm.ip;

                    while (*str_end != 0) {
                        str_end++;
                    }

                    vm.ip += (size_t) (str_end - str_start + 1) * 2;

                    arg_stack_push(STRING_VAL(str_start));
                }
                break;
            case OP_LETI: {
                uint8_t reg = READ1();
                int32_t val = READ4();
                vm.registers[reg] = DWORD_VAL(val);
                break;
            }
            case OP_REV: {
                uint8_t reg = READ1();
                if (vm.registers[reg].as.dword == 0) {
                    vm.registers[reg].as.dword = 1;
                } else {
                    vm.registers[reg].as.dword = 0;
                }
                break;
            }
            case OP_CALL: {
                size_t label = (size_t) READ2();
                int32_t offset = vm.chunk->labels[label];

                if (offset < 0) {
                    fprintf(stderr, "VM: Invalid call target\n");
                } else {
                    stack_push(DWORD_VAL((int32_t) (vm.ip - vm.chunk->code)));
                    vm.ip = vm.chunk->code + offset;
                }
                break;
            }
            case OP_JMP: {
                size_t label = (size_t) READ2();
                do_jump(label);
                break;
            }
            case OP_JMP_EQ:  __attribute__ ((fallthrough));
            case OP_JMP_NEQ: __attribute__ ((fallthrough));
            case OP_JMP_GT:  __attribute__ ((fallthrough));
            case OP_JMP_LT:  __attribute__ ((fallthrough));
            case OP_JMP_GTE: __attribute__ ((fallthrough));
            case OP_JMP_LTE: {
                uint8_t reg1 = READ1();
                uint8_t reg2 = READ1();
                int32_t val1 = AS_DWORD(vm.registers[reg1]);
                int32_t val2 = AS_DWORD(vm.registers[reg2]);
                size_t label = (size_t) READ2();

                if (compare(opcode, val1, val2)) {
                    do_jump(label);
                }
                break;
            }
            case OP_JMPI_EQ:  __attribute__ ((fallthrough));
            case OP_JMPI_NEQ: __attribute__ ((fallthrough));
            case OP_JMPI_GT:  __attribute__ ((fallthrough));
            case OP_JMPI_LT:  __attribute__ ((fallthrough));
            case OP_JMPI_GTE: __attribute__ ((fallthrough));
            case OP_JMPI_LTE: {
                uint8_t reg = READ1();
                int32_t val1 = AS_DWORD(vm.registers[reg]);
                int32_t val2 = READ4();
                size_t label = (size_t) READ2();

                if (compare(opcode, val1, val2)) {
                    do_jump(label);
                }
                break;
            }
            case OP_ADDI:
                ARITHMETIC_OP_RI(+);
                break;
            case OP_SUBI:
                ARITHMETIC_OP_RI(-);
                break;
            case OP_MULI: 
                ARITHMETIC_OP_RI(*);
                break;
            case OP_DIVI:
                ARITHMETIC_OP_RI(/);
                break;
            case OP_ADD:
                ARITHMETIC_OP_RR(+);
                break;
            case OP_SUB:
                ARITHMETIC_OP_RR(-);
                break;
            case OP_MUL: 
                ARITHMETIC_OP_RR(*);
                break;
            case OP_DIV:
                ARITHMETIC_OP_RR(/);
                break;
            case OP_STACK_PUSH: {
                uint8_t reg = READ1();
                stack_push(vm.registers[reg]);
                break;
            }
            case OP_STACK_POP: {
                uint8_t reg = READ1();
                vm.registers[reg] = stack_pop();
                break;
            }
            case OP_WINDOW_MSG: {
                uint16_t* processed = process_string_tags(AS_STRING(stack_args[0]));
                print_value(STRING_VAL(processed));
                printf("\n");
                free(processed);
                break;
            }
            case OP_WINEND:
                break;
            case OP_GET_FLOOR_NUMBER:
                vm.registers[AS_DWORD(stack_args[0])] = DWORD_VAL(123);
                break;
            default: {
                fprintf(stderr, "VM: Unsupported opcode \"%s\"\n", opcode_def->name);
                break;
            }
        }

        if (has_stack_args) {
            reset_arg_stack();
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2d0, %rsp            # imm = 0x2D0
movq 0xf86e(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xf860(%rip)      # 0x19780
movzbl (%rax), %eax
movw %ax, -0x6(%rbp)
movzwl -0x6(%rbp), %eax
cmpl $0xf8, %eax
je 0x9f3d
movzwl -0x6(%rbp), %eax
cmpl $0xf9, %eax
jne 0x9f62
movzwl -0x6(%rbp), %eax
shll $0x8, %eax
movq 0xf835(%rip), %rcx      # 0x19780
movq %rcx, %rdx
addq $0x1, %rdx
movq %rdx, 0xf827(%rip)      # 0x19780
movzbl (%rcx), %ecx
orl %ecx, %eax
movw %ax, -0x6(%rbp)
movzwl -0x6(%rbp), %edi
callq 0x7bf0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x9f9e
movq 0xf073(%rip), %rax      # 0x18ff0
movq (%rax), %rdi
movzwl -0x6(%rbp), %edx
leaq 0x4336(%rip), %rsi      # 0xe2c1
movb $0x0, %al
callq 0x40f0
movl $0x2, -0x4(%rbp)
jmp 0xb063
movq -0x10(%rbp), %rax
cmpl $0x1, 0x10(%rax)
sete %al
andb $0x1, %al
movb %al, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
je 0x9fc0
leaq -0xa0(%rbp), %rdi
callq 0xb0d0
movzwl -0x6(%rbp), %eax
movl %eax, -0x2b4(%rbp)
subl $0x1, %eax
je 0xa1fa
jmp 0x9fd5
movl -0x2b4(%rbp), %eax
subl $0x9, %eax
je 0xa379
jmp 0x9fe6
movl -0x2b4(%rbp), %eax
subl $0x12, %eax
je 0xa434
jmp 0x9ff7
movl -0x2b4(%rbp), %eax
subl $0x18, %eax
je 0xab72
jmp 0xa008
movl -0x2b4(%rbp), %eax
subl $0x19, %eax
je 0xa7c4
jmp 0xa019
movl -0x2b4(%rbp), %eax
subl $0x1a, %eax
je 0xac47
jmp 0xa02a
movl -0x2b4(%rbp), %eax
subl $0x1b, %eax
je 0xa8ab
jmp 0xa03b
movl -0x2b4(%rbp), %eax
subl $0x1c, %eax
je 0xad1c
jmp 0xa04c
movl -0x2b4(%rbp), %eax
subl $0x1d, %eax
je 0xa992
jmp 0xa05d
movl -0x2b4(%rbp), %eax
subl $0x1e, %eax
je 0xadf2
jmp 0xa06e
movl -0x2b4(%rbp), %eax
subl $0x1f, %eax
je 0xaa7a
jmp 0xa07f
movl -0x2b4(%rbp), %eax
subl $0x28, %eax
je 0xa589
jmp 0xa090
movl -0x2b4(%rbp), %eax
subl $0x29, %eax
je 0xa4bd
jmp 0xa0a1
movl -0x2b4(%rbp), %eax
subl $0x2c, %eax
je 0xa5d0
jmp 0xa0b2
movl -0x2b4(%rbp), %eax
subl $0x2d, %eax
je 0xa6c1
jmp 0xa0c3
movl -0x2b4(%rbp), %eax
subl $0x2e, %eax
je 0xa5d2
jmp 0xa0d4
movl -0x2b4(%rbp), %eax
subl $0x2f, %eax
je 0xa6c3
jmp 0xa0e5
movl -0x2b4(%rbp), %eax
subl $0x32, %eax
je 0xa5d4
jmp 0xa0f6
movl -0x2b4(%rbp), %eax
subl $0x33, %eax
je 0xa6c5
jmp 0xa107
movl -0x2b4(%rbp), %eax
subl $0x36, %eax
je 0xa5d6
jmp 0xa118
movl -0x2b4(%rbp), %eax
subl $0x37, %eax
je 0xa6c7
jmp 0xa129
movl -0x2b4(%rbp), %eax
subl $0x3a, %eax
je 0xa5d8
jmp 0xa13a
movl -0x2b4(%rbp), %eax
subl $0x3b, %eax
je 0xa6c9
jmp 0xa14b
movl -0x2b4(%rbp), %eax
subl $0x3e, %eax
je 0xa5da
jmp 0xa15c
movl -0x2b4(%rbp), %eax
subl $0x3f, %eax
je 0xa6cb
jmp 0xa16d
movl -0x2b4(%rbp), %eax
subl $0x42, %eax
je 0xaed8
jmp 0xa17e
movl -0x2b4(%rbp), %eax
subl $0x43, %eax
je 0xaf20
jmp 0xa18f
movl -0x2b4(%rbp), %eax
subl $0x48, %eax
je 0xa29a
jmp 0xa1a0
movl -0x2b4(%rbp), %eax
subl $0x4a, %eax
je 0xa250
jmp 0xa1b1
movl -0x2b4(%rbp), %eax
subl $0x4e, %eax
je 0xa2e2
jmp 0xa1c2
movl -0x2b4(%rbp), %eax
subl $0x5a, %eax
je 0xaf94
jmp 0xa1d3
movl -0x2b4(%rbp), %eax
subl $0x5e, %eax
je 0xafed
jmp 0xa1e4
movl -0x2b4(%rbp), %eax
subl $0xf923, %eax           # imm = 0xF923
je 0xafef
jmp 0xb033
callq 0xb140
testb $0x1, %al
jne 0xa205
jmp 0xa211
movl $0x0, -0x4(%rbp)
jmp 0xb063
callq 0x9e20
movl %eax, -0xb8(%rbp)
movq %rdx, -0xb0(%rbp)
movl -0xb0(%rbp), %eax
movl %eax, -0xa4(%rbp)
movq 0xf542(%rip), %rax      # 0x19778
movq 0x10(%rax), %rax
movslq -0xa4(%rbp), %rcx
addq %rcx, %rax
movq %rax, 0xf535(%rip)      # 0x19780
jmp 0xb053
movq 0xf529(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xf51b(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0xb9(%rbp)
movl $0x3, -0xd0(%rbp)
movb -0xb9(%rbp), %al
movb %al, -0xc8(%rbp)
movl -0xd0(%rbp), %edi
movq -0xc8(%rbp), %rsi
callq 0xb160
jmp 0xb053
movq 0xf4df(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xf4d1(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0xd1(%rbp)
movzbl -0xd1(%rbp), %eax
movl %eax, %ecx
leaq 0xf4b1(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %edi
movq 0x8(%rax), %rsi
callq 0xb160
jmp 0xb053
movq 0xf497(%rip), %rax      # 0x19780
movq %rax, -0xe0(%rbp)
movq 0xf489(%rip), %rax      # 0x19780
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movzwl (%rax), %eax
cmpl $0x0, %eax
je 0xa321
movq -0xe8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0xe8(%rbp)
jmp 0xa2fe
movq -0xe8(%rbp), %rax
movq -0xe0(%rbp), %rcx
subq %rcx, %rax
sarq %rax
addq $0x1, %rax
shlq %rax
addq 0xf43d(%rip), %rax      # 0x19780
movq %rax, 0xf436(%rip)      # 0x19780
movl $0x6, -0xf8(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xf0(%rbp)
movl -0xf8(%rbp), %edi
movq -0xf0(%rbp), %rsi
callq 0xb160
jmp 0xb053
movq 0xf400(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xf3f2(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0xf9(%rbp)
movq 0xf3e3(%rip), %rax      # 0x19780
addq $0x4, %rax
movq %rax, 0xf3d8(%rip)      # 0x19780
movq 0xf3d1(%rip), %rax      # 0x19780
movzbl -0x4(%rax), %eax
shll $0x18, %eax
movq 0xf3c3(%rip), %rcx      # 0x19780
movzbl -0x3(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq 0xf3b3(%rip), %rcx      # 0x19780
movzbl -0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq 0xf3a3(%rip), %rcx      # 0x19780
movzbl -0x1(%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x100(%rbp)
movzbl -0xf9(%rbp), %eax
movl %eax, %ecx
leaq 0xf37f(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x1, -0x110(%rbp)
movl -0x100(%rbp), %ecx
movl %ecx, -0x108(%rbp)
movq -0x110(%rbp), %rcx
movq %rcx, (%rax)
movq -0x108(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0xb053
movq 0xf345(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xf337(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x111(%rbp)
movzbl -0x111(%rbp), %eax
movl %eax, %ecx
leaq 0xf317(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
cmpl $0x0, 0x8(%rax)
jne 0xa496
movzbl -0x111(%rbp), %eax
movl %eax, %ecx
leaq 0xf2f6(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x1, 0x8(%rax)
jmp 0xa4b8
movzbl -0x111(%rbp), %eax
movl %eax, %ecx
leaq 0xf2d2(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x0, 0x8(%rax)
jmp 0xb053
movq 0xf2bc(%rip), %rax      # 0x19780
addq $0x2, %rax
movq %rax, 0xf2b1(%rip)      # 0x19780
movq 0xf2aa(%rip), %rax      # 0x19780
movzbl -0x2(%rax), %eax
shll $0x8, %eax
movq 0xf29c(%rip), %rcx      # 0x19780
movzbl -0x1(%rcx), %ecx
orl %ecx, %eax
cltq
movq %rax, -0x120(%rbp)
movq 0xf27e(%rip), %rax      # 0x19778
movq 0x38(%rax), %rax
movq -0x120(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x124(%rbp)
cmpl $0x0, -0x124(%rbp)
jge 0xa531
movq 0xead2(%rip), %rax      # 0x18ff0
movq (%rax), %rdi
leaq 0x3db4(%rip), %rsi      # 0xe2dc
movb $0x0, %al
callq 0x40f0
jmp 0xa584
movl $0x1, -0x138(%rbp)
movq 0xf23e(%rip), %rax      # 0x19780
movq 0xf22f(%rip), %rcx      # 0x19778
movq 0x10(%rcx), %rcx
subq %rcx, %rax
movl %eax, -0x130(%rbp)
movl -0x138(%rbp), %edi
movq -0x130(%rbp), %rsi
callq 0x9da0
movq 0xf209(%rip), %rax      # 0x19778
movq 0x10(%rax), %rax
movslq -0x124(%rbp), %rcx
addq %rcx, %rax
movq %rax, 0xf1fc(%rip)      # 0x19780
jmp 0xb053
movq 0xf1f0(%rip), %rax      # 0x19780
addq $0x2, %rax
movq %rax, 0xf1e5(%rip)      # 0x19780
movq 0xf1de(%rip), %rax      # 0x19780
movzbl -0x2(%rax), %eax
shll $0x8, %eax
movq 0xf1d0(%rip), %rcx      # 0x19780
movzbl -0x1(%rcx), %ecx
orl %ecx, %eax
cltq
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rdi
callq 0xb1a0
jmp 0xb053
jmp 0xa5d2
jmp 0xa5d4
jmp 0xa5d6
jmp 0xa5d8
jmp 0xa5da
movq 0xf19f(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xf191(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x141(%rbp)
movq 0xf182(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xf174(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x142(%rbp)
movzbl -0x141(%rbp), %eax
movl %eax, %ecx
leaq 0xf154(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x148(%rbp)
movzbl -0x142(%rbp), %eax
movl %eax, %ecx
leaq 0xf130(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x14c(%rbp)
movq 0xf11d(%rip), %rax      # 0x19780
addq $0x2, %rax
movq %rax, 0xf112(%rip)      # 0x19780
movq 0xf10b(%rip), %rax      # 0x19780
movzbl -0x2(%rax), %eax
shll $0x8, %eax
movq 0xf0fd(%rip), %rcx      # 0x19780
movzbl -0x1(%rcx), %ecx
orl %ecx, %eax
cltq
movq %rax, -0x158(%rbp)
movw -0x6(%rbp), %ax
movl -0x148(%rbp), %esi
movl -0x14c(%rbp), %edx
movzwl %ax, %edi
callq 0xb200
testb $0x1, %al
jne 0xa6b0
jmp 0xa6bc
movq -0x158(%rbp), %rdi
callq 0xb1a0
jmp 0xb053
jmp 0xa6c3
jmp 0xa6c5
jmp 0xa6c7
jmp 0xa6c9
jmp 0xa6cb
movq 0xf0ae(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xf0a0(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x159(%rbp)
movzbl -0x159(%rbp), %eax
movl %eax, %ecx
leaq 0xf080(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x160(%rbp)
movq 0xf06d(%rip), %rax      # 0x19780
addq $0x4, %rax
movq %rax, 0xf062(%rip)      # 0x19780
movq 0xf05b(%rip), %rax      # 0x19780
movzbl -0x4(%rax), %eax
shll $0x18, %eax
movq 0xf04d(%rip), %rcx      # 0x19780
movzbl -0x3(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq 0xf03d(%rip), %rcx      # 0x19780
movzbl -0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq 0xf02d(%rip), %rcx      # 0x19780
movzbl -0x1(%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x164(%rbp)
movq 0xf01a(%rip), %rax      # 0x19780
addq $0x2, %rax
movq %rax, 0xf00f(%rip)      # 0x19780
movq 0xf008(%rip), %rax      # 0x19780
movzbl -0x2(%rax), %eax
shll $0x8, %eax
movq 0xeffa(%rip), %rcx      # 0x19780
movzbl -0x1(%rcx), %ecx
orl %ecx, %eax
cltq
movq %rax, -0x170(%rbp)
movw -0x6(%rbp), %ax
movl -0x160(%rbp), %esi
movl -0x164(%rbp), %edx
movzwl %ax, %edi
callq 0xb200
testb $0x1, %al
jne 0xa7b3
jmp 0xa7bf
movq -0x170(%rbp), %rdi
callq 0xb1a0
jmp 0xb053
jmp 0xa7c6
movq 0xefb3(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xefa5(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x171(%rbp)
movzbl -0x171(%rbp), %eax
movl %eax, %ecx
leaq 0xef85(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x178(%rbp)
movq 0xef72(%rip), %rax      # 0x19780
addq $0x4, %rax
movq %rax, 0xef67(%rip)      # 0x19780
movq 0xef60(%rip), %rax      # 0x19780
movzbl -0x4(%rax), %eax
shll $0x18, %eax
movq 0xef52(%rip), %rcx      # 0x19780
movzbl -0x3(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq 0xef42(%rip), %rcx      # 0x19780
movzbl -0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq 0xef32(%rip), %rcx      # 0x19780
movzbl -0x1(%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x17c(%rbp)
movzbl -0x171(%rbp), %eax
movl %eax, %ecx
leaq 0xef0e(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x1, -0x190(%rbp)
movl -0x178(%rbp), %ecx
addl -0x17c(%rbp), %ecx
movl %ecx, -0x188(%rbp)
movq -0x190(%rbp), %rcx
movq %rcx, (%rax)
movq -0x188(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0xb053
jmp 0xa8ad
movq 0xeecc(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xeebe(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x191(%rbp)
movzbl -0x191(%rbp), %eax
movl %eax, %ecx
leaq 0xee9e(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x198(%rbp)
movq 0xee8b(%rip), %rax      # 0x19780
addq $0x4, %rax
movq %rax, 0xee80(%rip)      # 0x19780
movq 0xee79(%rip), %rax      # 0x19780
movzbl -0x4(%rax), %eax
shll $0x18, %eax
movq 0xee6b(%rip), %rcx      # 0x19780
movzbl -0x3(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq 0xee5b(%rip), %rcx      # 0x19780
movzbl -0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq 0xee4b(%rip), %rcx      # 0x19780
movzbl -0x1(%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x19c(%rbp)
movzbl -0x191(%rbp), %eax
movl %eax, %ecx
leaq 0xee27(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x1, -0x1b0(%rbp)
movl -0x198(%rbp), %ecx
subl -0x19c(%rbp), %ecx
movl %ecx, -0x1a8(%rbp)
movq -0x1b0(%rbp), %rcx
movq %rcx, (%rax)
movq -0x1a8(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0xb053
jmp 0xa994
movq 0xede5(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xedd7(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x1b1(%rbp)
movzbl -0x1b1(%rbp), %eax
movl %eax, %ecx
leaq 0xedb7(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x1b8(%rbp)
movq 0xeda4(%rip), %rax      # 0x19780
addq $0x4, %rax
movq %rax, 0xed99(%rip)      # 0x19780
movq 0xed92(%rip), %rax      # 0x19780
movzbl -0x4(%rax), %eax
shll $0x18, %eax
movq 0xed84(%rip), %rcx      # 0x19780
movzbl -0x3(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq 0xed74(%rip), %rcx      # 0x19780
movzbl -0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq 0xed64(%rip), %rcx      # 0x19780
movzbl -0x1(%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x1bc(%rbp)
movzbl -0x1b1(%rbp), %eax
movl %eax, %ecx
leaq 0xed40(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x1, -0x1d0(%rbp)
movl -0x1b8(%rbp), %ecx
imull -0x1bc(%rbp), %ecx
movl %ecx, -0x1c8(%rbp)
movq -0x1d0(%rbp), %rcx
movq %rcx, (%rax)
movq -0x1c8(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0xb053
jmp 0xaa7c
movq 0xecfd(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xecef(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x1d1(%rbp)
movzbl -0x1d1(%rbp), %eax
movl %eax, %ecx
leaq 0xeccf(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x1d8(%rbp)
movq 0xecbc(%rip), %rax      # 0x19780
addq $0x4, %rax
movq %rax, 0xecb1(%rip)      # 0x19780
movq 0xecaa(%rip), %rax      # 0x19780
movzbl -0x4(%rax), %eax
shll $0x18, %eax
movq 0xec9c(%rip), %rcx      # 0x19780
movzbl -0x3(%rcx), %ecx
shll $0x10, %ecx
orl %ecx, %eax
movq 0xec8c(%rip), %rcx      # 0x19780
movzbl -0x2(%rcx), %ecx
shll $0x8, %ecx
orl %ecx, %eax
movq 0xec7c(%rip), %rcx      # 0x19780
movzbl -0x1(%rcx), %ecx
orl %ecx, %eax
movl %eax, -0x1dc(%rbp)
movzbl -0x1d1(%rbp), %eax
movl %eax, %ecx
leaq 0xec58(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x2c0(%rbp)
movl $0x1, -0x1f0(%rbp)
movl -0x1d8(%rbp), %eax
cltd
idivl -0x1dc(%rbp)
movl %eax, %ecx
movq -0x2c0(%rbp), %rax
movl %ecx, -0x1e8(%rbp)
movq -0x1f0(%rbp), %rcx
movq %rcx, (%rax)
movq -0x1e8(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0xb053
jmp 0xab74
movq 0xec05(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xebf7(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x1f1(%rbp)
movq 0xebe8(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xebda(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x1f2(%rbp)
movzbl -0x1f1(%rbp), %eax
movl %eax, %ecx
leaq 0xebba(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x1f8(%rbp)
movzbl -0x1f2(%rbp), %eax
movl %eax, %ecx
leaq 0xeb96(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x1fc(%rbp)
movzbl -0x1f1(%rbp), %eax
movl %eax, %ecx
leaq 0xeb72(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x1, -0x210(%rbp)
movl -0x1f8(%rbp), %ecx
addl -0x1fc(%rbp), %ecx
movl %ecx, -0x208(%rbp)
movq -0x210(%rbp), %rcx
movq %rcx, (%rax)
movq -0x208(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0xb053
jmp 0xac49
movq 0xeb30(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xeb22(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x211(%rbp)
movq 0xeb13(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xeb05(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x212(%rbp)
movzbl -0x211(%rbp), %eax
movl %eax, %ecx
leaq 0xeae5(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x218(%rbp)
movzbl -0x212(%rbp), %eax
movl %eax, %ecx
leaq 0xeac1(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x21c(%rbp)
movzbl -0x211(%rbp), %eax
movl %eax, %ecx
leaq 0xea9d(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x1, -0x230(%rbp)
movl -0x218(%rbp), %ecx
subl -0x21c(%rbp), %ecx
movl %ecx, -0x228(%rbp)
movq -0x230(%rbp), %rcx
movq %rcx, (%rax)
movq -0x228(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0xb053
jmp 0xad1e
movq 0xea5b(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xea4d(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x231(%rbp)
movq 0xea3e(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xea30(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x232(%rbp)
movzbl -0x231(%rbp), %eax
movl %eax, %ecx
leaq 0xea10(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x238(%rbp)
movzbl -0x232(%rbp), %eax
movl %eax, %ecx
leaq 0xe9ec(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x23c(%rbp)
movzbl -0x231(%rbp), %eax
movl %eax, %ecx
leaq 0xe9c8(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x1, -0x250(%rbp)
movl -0x238(%rbp), %ecx
imull -0x23c(%rbp), %ecx
movl %ecx, -0x248(%rbp)
movq -0x250(%rbp), %rcx
movq %rcx, (%rax)
movq -0x248(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0xb053
jmp 0xadf4
movq 0xe985(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xe977(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x251(%rbp)
movq 0xe968(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xe95a(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x252(%rbp)
movzbl -0x251(%rbp), %eax
movl %eax, %ecx
leaq 0xe93a(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x258(%rbp)
movzbl -0x252(%rbp), %eax
movl %eax, %ecx
leaq 0xe916(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
movl %eax, -0x25c(%rbp)
movzbl -0x251(%rbp), %eax
movl %eax, %ecx
leaq 0xe8f2(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x2c8(%rbp)
movl $0x1, -0x270(%rbp)
movl -0x258(%rbp), %eax
cltd
idivl -0x25c(%rbp)
movl %eax, %ecx
movq -0x2c8(%rbp), %rax
movl %ecx, -0x268(%rbp)
movq -0x270(%rbp), %rcx
movq %rcx, (%rax)
movq -0x268(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0xb053
movq 0xe8a1(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xe893(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x271(%rbp)
movzbl -0x271(%rbp), %eax
movl %eax, %ecx
leaq 0xe873(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %edi
movq 0x8(%rax), %rsi
callq 0x9da0
jmp 0xb053
movq 0xe859(%rip), %rax      # 0x19780
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, 0xe84b(%rip)      # 0x19780
movb (%rax), %al
movb %al, -0x272(%rbp)
movzbl -0x272(%rbp), %eax
movl %eax, %ecx
leaq 0xe82b(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x2d0(%rbp)
callq 0x9e20
movl %eax, %ecx
movq -0x2d0(%rbp), %rax
movl %ecx, -0x288(%rbp)
movq %rdx, -0x280(%rbp)
movq -0x288(%rbp), %rcx
movq %rcx, (%rax)
movq -0x280(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0xb053
movq -0x98(%rbp), %rdi
callq 0xb2e0
movq %rax, -0x290(%rbp)
movl $0x6, -0x2a0(%rbp)
movq -0x290(%rbp), %rax
movq %rax, -0x298(%rbp)
movl -0x2a0(%rbp), %edi
movq -0x298(%rbp), %rsi
callq 0x9bc0
leaq 0x3338(%rip), %rdi      # 0xe310
movb $0x0, %al
callq 0x4090
movq -0x290(%rbp), %rdi
callq 0x4030
jmp 0xb053
jmp 0xb053
movslq -0x98(%rbp), %rcx
leaq 0xe77b(%rip), %rax      # 0x19778
addq $0x10, %rax
shlq $0x4, %rcx
addq %rcx, %rax
movl $0x1, -0x2b0(%rbp)
movl $0x7b, -0x2a8(%rbp)
movq -0x2b0(%rbp), %rcx
movq %rcx, (%rax)
movq -0x2a8(%rbp), %rcx
movq %rcx, 0x8(%rax)
jmp 0xb053
movq 0xdfb6(%rip), %rax      # 0x18ff0
movq (%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x32a9(%rip), %rsi      # 0xe2f5
movb $0x0, %al
callq 0x40f0
testb $0x1, -0x11(%rbp)
je 0xb05e
callq 0x9d10
jmp 0x9f0b
movl -0x4(%rbp), %eax
addq $0x2d0, %rsp            # imm = 0x2D0
popq %rbp
retq
nop