// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/vm.c
// Function: vm_run_bytecode
Result vm_run_bytecode(Vm* vm) {
    assert(vm->frame_len > 0);
    CallFrame* frame = &vm->frames[vm->frame_len - 1];

    while (true) {
        uint8_t opcode = 0;
        read_u8(vm, &opcode);
        const Location* const loc = get_location(vm);

        LOG("opcode=%d %s\n", opcode, opcode_str[opcode]);

        switch (opcode) {
            case OP_RETURN: {
                stack_log(vm);
                Value return_value = {0};
                RETURN_IF_ERR(stack_pop(vm, &return_value));

                vm->frame_len--;
                stack_log(vm);

                if (vm->frame_len == 0) {  // End of script
                    LOG("final pop%s\n", "");
                    RETURN_IF_ERR(stack_pop(vm, &return_value));
                    return RES_OK;
                }

                vm->stack_top = frame->slots;
                RETURN_IF_ERR(stack_push(vm, return_value));

                frame = &vm->frames[vm->frame_len - 1];

                break;
            }
            case OP_NEGATE: {
                Value value = {0};
                RETURN_IF_ERR(stack_pop(vm, &value));

                if (!IS_NUMBER(value)) {
                    VM_ERROR(vm, loc, "Negation: expected a number, got: %s",
                             value_to_str_debug(value));
                }

                RETURN_IF_ERR(stack_push(vm, NUMBER_VAL(-AS_NUMBER(value))));
                break;
            }
            case OP_ADD: {
                Value rhs = {0};
                RETURN_IF_ERR(stack_pop(vm, &rhs));
                Value lhs = {0};
                RETURN_IF_ERR(stack_pop(vm, &lhs));

                if (IS_STRING(lhs) && IS_STRING(rhs)) {
                    Value v = {0};
                    str_cat(vm, lhs, rhs, &v);

                    RETURN_IF_ERR(stack_push(vm, v));
                    break;
                }

                if ((IS_STRING(lhs) && !IS_STRING(rhs))) {
                    VM_ERROR(vm, loc,
                             "Addition: cannot concatenate a non-string type, "
                             "got: %s",
                             value_to_str_debug(rhs));
                }

                if ((IS_STRING(rhs) && !IS_STRING(lhs))) {
                    VM_ERROR(vm, loc,
                             "Addition: cannot concatenate a non-string type, "
                             "got: %s",
                             value_to_str_debug(lhs));
                }

                if (!IS_NUMBER(lhs)) {
                    VM_ERROR(vm, loc, "Addition: expected a number, got: %s",
                             value_to_str_debug(lhs));
                }

                if (!IS_NUMBER(rhs)) {
                    VM_ERROR(vm, loc, "Addition: expected a number, got: %s",
                             value_to_str_debug(rhs));
                }

                // TODO: Check for underflow/overflow
                RETURN_IF_ERR(stack_push(
                    vm, NUMBER_VAL(AS_NUMBER(lhs) + AS_NUMBER(rhs))));
                break;
            }
            case OP_SUBTRACT: {
                Value rhs = {0};
                RETURN_IF_ERR(stack_pop(vm, &rhs));
                if (!IS_NUMBER(rhs)) {
                    VM_ERROR(vm, loc, "Subtraction: expected a number, got: %s",
                             value_to_str_debug(rhs));
                }

                Value lhs = {0};
                RETURN_IF_ERR(stack_pop(vm, &lhs));
                if (!IS_NUMBER(lhs)) {
                    VM_ERROR(vm, loc, "Subtraction: expected a number, got: %s",
                             value_to_str_debug(lhs));
                }

                // TODO: Check for underflow/overflow
                RETURN_IF_ERR(stack_push(
                    vm, NUMBER_VAL(AS_NUMBER(lhs) - AS_NUMBER(rhs))));
                break;
            }
            case OP_MULTIPLY: {
                Value rhs = {0};
                RETURN_IF_ERR(stack_pop(vm, &rhs));
                if (!IS_NUMBER(rhs)) {
                    VM_ERROR(vm, loc,
                             "Multiplication: expected a number, got: %s",
                             value_to_str_debug(rhs));
                }

                Value lhs = {0};
                RETURN_IF_ERR(stack_pop(vm, &lhs));
                if (!IS_NUMBER(lhs)) {
                    VM_ERROR(vm, loc,
                             "Multiplication: expected a number, got: %s",
                             value_to_str_debug(lhs));
                }

                // TODO: Check for underflow/overflow
                RETURN_IF_ERR(stack_push(
                    vm, NUMBER_VAL(AS_NUMBER(lhs) * AS_NUMBER(rhs))));
                break;
            }
            case OP_DIVIDE: {
                Value rhs = {0};
                RETURN_IF_ERR(stack_pop(vm, &rhs));
                if (!IS_NUMBER(rhs)) {
                    VM_ERROR(vm, loc, "Division: expected a number, got: %s",
                             value_to_str_debug(rhs));
                }

                Value lhs = {0};
                RETURN_IF_ERR(stack_pop(vm, &lhs));
                if (!IS_NUMBER(lhs)) {
                    VM_ERROR(vm, loc, "Division: expected a number, got: %s",
                             value_to_str_debug(lhs));
                }

                RETURN_IF_ERR(stack_push(
                    vm, NUMBER_VAL(AS_NUMBER(lhs) / AS_NUMBER(rhs))));
                break;
            }
            case OP_CONSTANT: {
                Value v = {0};
                RETURN_IF_ERR(read_constant(vm, &v));
                RETURN_IF_ERR(stack_push(vm, v));
            } break;
            case OP_NIL:
                RETURN_IF_ERR(stack_push(vm, NIL_VAL));
                break;
            case OP_TRUE:
                RETURN_IF_ERR(stack_push(vm, BOOL_VAL(true)));
                break;
            case OP_FALSE:
                RETURN_IF_ERR(stack_push(vm, BOOL_VAL(false)));
                break;
            case OP_NOT: {
                Value v = {0};
                RETURN_IF_ERR(stack_pop(vm, &v));
                RETURN_IF_ERR(stack_push(vm, BOOL_VAL(value_is_falsy(v))));
                break;
            }
            case OP_EQUAL: {
                Value rhs = {0};
                RETURN_IF_ERR(stack_pop(vm, &rhs));
                Value lhs = {0};
                RETURN_IF_ERR(stack_pop(vm, &lhs));
                RETURN_IF_ERR(stack_push(vm, BOOL_VAL(value_eq(lhs, rhs))));
                break;
            }
            case OP_LESS: {
                Value rhs = {0};
                RETURN_IF_ERR(stack_pop(vm, &rhs));
                if (!IS_NUMBER(rhs)) {
                    VM_ERROR(vm, loc, "Comparison:expected a number, got: %s",
                             value_to_str_debug(rhs));
                }

                Value lhs = {0};
                RETURN_IF_ERR(stack_pop(vm, &lhs));
                if (!IS_NUMBER(lhs)) {
                    VM_ERROR(vm, loc, "Comparison:expected a number, got: %s",
                             value_to_str_debug(lhs));
                }

                // TODO: Check for 0
                RETURN_IF_ERR(
                    stack_push(vm, BOOL_VAL(AS_NUMBER(lhs) < AS_NUMBER(rhs))));
                break;
            }
            case OP_GREATER: {
                Value rhs = {0};
                RETURN_IF_ERR(stack_pop(vm, &rhs));
                if (!IS_NUMBER(rhs)) {
                    VM_ERROR(vm, loc, "Comparison:expected a number, got: %s",
                             value_to_str_debug(rhs));
                }

                Value lhs = {0};
                RETURN_IF_ERR(stack_pop(vm, &lhs));
                if (!IS_NUMBER(lhs)) {
                    VM_ERROR(vm, loc, "Comparison:expected a number, got: %s",
                             value_to_str_debug(lhs));
                }

                // TODO: Check for 0
                RETURN_IF_ERR(
                    stack_push(vm, BOOL_VAL(AS_NUMBER(lhs) > AS_NUMBER(rhs))));
                break;
            }
            case OP_PRINT: {
                Value value = {0};
                RETURN_IF_ERR(stack_pop(vm, &value));
                printf("%s\n", value_to_str(value));
            } break;
            case OP_POP: {
                Value value = {0};
                RETURN_IF_ERR(stack_pop(vm, &value));
            } break;
            case OP_DEFINE_GLOBAL: {
                Value name = {0};
                RETURN_IF_ERR(read_constant(vm, &name));

                Value value = {0};
                RETURN_IF_ERR(stack_pop(vm, &value));

                ht_insert(vm->globals, AS_CSTRING(name), AS_STRING(name)->len,
                          &value, sizeof(value));
                LOG("def global name=%.*s value=%s\n",
                    (int)AS_STRING(name)->len, AS_CSTRING(name),
                    value_to_str_debug(value));

                LOG("stack size: %zu\n", stack_len(vm));
                break;
            }
            case OP_GET_GLOBAL: {
                Value name = {0};
                RETURN_IF_ERR(read_constant(vm, &name));

                char* const s = AS_CSTRING(name);
                const size_t s_len = AS_STRING(name)->len;
                Value* value = ht_search(vm->globals, s, s_len);

                if (!value) {
                    VM_ERROR(vm, loc, "Undefined global variable `%.*s`",
                             (int)s_len, s);
                }

                LOG("get global name=%.*s value=%s\n", (int)s_len, s,
                    value_to_str_debug(*value));
                RETURN_IF_ERR(stack_push(vm, *value));
                break;
            }
            case OP_SET_GLOBAL: {
                Value name = {0};
                RETURN_IF_ERR(read_constant(vm, &name));

                char* const s = AS_CSTRING(name);
                const size_t s_len = AS_STRING(name)->len;
                Value* const value = ht_search(vm->globals, s, s_len);
                if (!value) {
                    VM_ERROR(vm, loc, "Undefined global variable `%.*s`",
                             (int)s_len, s);
                }

                RETURN_IF_ERR(stack_peek_from_top_at(vm, value, 0));
                LOG("set global name=%.*s value=%s\n", (int)s_len, s,
                    value_to_str_debug(*value));

                break;
            }
            case OP_GET_LOCAL: {
                uint8_t slot = 0;
                RETURN_IF_ERR(read_u8(vm, &slot));

                RETURN_IF_ERR(stack_push(vm, frame->slots[slot]));
                LOG("OP_GET_LOCAL local_index=%d v=%s\n", slot,
                    value_to_str_debug(frame->slots[slot]));

                stack_log(vm);
                break;
            }
            case OP_SET_LOCAL: {
                uint8_t slot = 0;
                RETURN_IF_ERR(read_u8(vm, &slot));

                Value v = {0};
                RETURN_IF_ERR(stack_peek_from_top_at(vm, &v, 0));
                frame->slots[slot] = v;
                stack_log(vm);

                break;
            }
            case OP_JUMP_IF_FALSE: {
                uint16_t jump = 0;
                RETURN_IF_ERR(read_u16(vm, &jump));

                Value v = {0};
                RETURN_IF_ERR(stack_peek_from_top_at(vm, &v, 0));
                frame->ip += jump * (size_t)(value_is_falsy(v));
            } break;
            case OP_JUMP: {
                uint16_t jump = 0;
                RETURN_IF_ERR(read_u16(vm, &jump));
                frame->ip += jump;
            } break;
            case OP_LOOP: {
                uint16_t jump = 0;
                RETURN_IF_ERR(read_u16(vm, &jump));
                frame->ip -= jump;
            } break;
            case OP_CALL: {
                uint8_t arg_count = 0;
                RETURN_IF_ERR(read_u8(vm, &arg_count));

                Value callee = {0};
                RETURN_IF_ERR(stack_peek_from_top_at(vm, &callee, arg_count));
                RETURN_IF_ERR(value_call(vm, callee, arg_count));
                LOG("stack top after call=%s\n",
                    value_to_str_debug(*(vm->stack_top - 1)));

                frame = &vm->frames[vm->frame_len - 1];

                LOG("called f=%.*s slots[0]=%s\n", (int)frame->fn->name_len,
                    frame->fn->name, value_to_str_debug(frame->slots[0]));

                break;
            }
        }
    }
}

// Assembly:
subq $0x5a8, %rsp            # imm = 0x5A8
movq %rdi, 0x598(%rsp)
movq 0x598(%rsp), %rax
movsbl 0x40618(%rax), %eax
cmpl $0x0, %eax
jle 0x7455
jmp 0x7474
leaq 0x5c84(%rip), %rdi      # 0xd0e0
leaq 0x5c8f(%rip), %rsi      # 0xd0f2
movl $0x1a1, %edx            # imm = 0x1A1
leaq 0x5d24(%rip), %rcx      # 0xd193
callq 0x10e0
movq 0x598(%rsp), %rax
addq $0x40018, %rax          # imm = 0x40018
movq 0x598(%rsp), %rcx
movsbl 0x40618(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x590(%rsp)
movb $0x0, 0x58f(%rsp)
movq 0x598(%rsp), %rdi
leaq 0x58f(%rsp), %rsi
callq 0x70a0
movq 0x598(%rsp), %rdi
callq 0x71c0
movq %rax, 0x580(%rsp)
jmp 0x74da
movzbl 0x58f(%rsp), %eax
movq %rax, 0x188(%rsp)
subq $0x18, %rax
ja 0x9479
movq 0x188(%rsp), %rax
leaq 0x4a71(%rip), %rcx      # 0xbf74
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x598(%rsp), %rdi
callq 0x9490
leaq 0x570(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x570(%rsp), %rsi
callq 0x94e0
movl %eax, 0x56c(%rsp)
cmpl $0x0, 0x56c(%rsp)
je 0x7566
movl 0x56c(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x7568
movq 0x598(%rsp), %rax
movb 0x40618(%rax), %cl
addb $-0x1, %cl
movb %cl, 0x40618(%rax)
movq 0x598(%rsp), %rdi
callq 0x9490
movq 0x598(%rsp), %rax
movsbl 0x40618(%rax), %eax
cmpl $0x0, %eax
jne 0x75f1
jmp 0x75a2
jmp 0x75a4
jmp 0x75a6
movq 0x598(%rsp), %rdi
leaq 0x570(%rsp), %rsi
callq 0x94e0
movl %eax, 0x568(%rsp)
cmpl $0x0, 0x568(%rsp)
je 0x75df
movl 0x568(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x75e1
movl $0x0, 0x5a4(%rsp)
jmp 0x947e
movq 0x590(%rsp), %rax
movq 0x10(%rax), %rcx
movq 0x598(%rsp), %rax
movq %rcx, 0x40000(%rax)
movq 0x598(%rsp), %rdi
movl 0x570(%rsp), %esi
movq 0x578(%rsp), %rdx
callq 0x9560
movl %eax, 0x564(%rsp)
cmpl $0x0, 0x564(%rsp)
je 0x764c
movl 0x564(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x764e
movq 0x598(%rsp), %rax
addq $0x40018, %rax          # imm = 0x40018
movq 0x598(%rsp), %rcx
movsbl 0x40618(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x590(%rsp)
jmp 0x9479
leaq 0x550(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x550(%rsp), %rsi
callq 0x94e0
movl %eax, 0x54c(%rsp)
cmpl $0x0, 0x54c(%rsp)
je 0x76d2
movl 0x54c(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x76d4
cmpl $0x2, 0x550(%rsp)
je 0x7777
jmp 0x76e4
movq 0x8905(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x170(%rsp)
movq 0x580(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x178(%rsp)
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x180(%rsp)
movl 0x550(%rsp), %edi
movq 0x558(%rsp), %rsi
callq 0x6ad0
movq 0x170(%rsp), %rdi
movq 0x178(%rsp), %rdx
movq 0x180(%rsp), %rcx
movq %rax, %r8
leaq 0x5a5d(%rip), %rsi      # 0xd1b0
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
jmp 0x7779
movq 0x598(%rsp), %rdi
movl $0x2, 0x538(%rsp)
movsd 0x558(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x540(%rsp)
movl 0x538(%rsp), %esi
movq 0x540(%rsp), %rdx
callq 0x9560
movl %eax, 0x548(%rsp)
cmpl $0x0, 0x548(%rsp)
je 0x77ed
movl 0x548(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x77ef
jmp 0x9479
leaq 0x528(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x528(%rsp), %rsi
callq 0x94e0
movl %eax, 0x524(%rsp)
cmpl $0x0, 0x524(%rsp)
je 0x7841
movl 0x524(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x7843
leaq 0x510(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x510(%rsp), %rsi
callq 0x94e0
movl %eax, 0x50c(%rsp)
cmpl $0x0, 0x50c(%rsp)
je 0x7890
movl 0x50c(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x7892
movl 0x510(%rsp), %edi
movq 0x518(%rsp), %rsi
xorl %edx, %edx
callq 0x66f0
testb $0x1, %al
jne 0x78b1
jmp 0x795e
movl 0x528(%rsp), %edi
movq 0x530(%rsp), %rsi
xorl %edx, %edx
callq 0x66f0
testb $0x1, %al
jne 0x78d0
jmp 0x795e
leaq 0x4f8(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
movl 0x510(%rsp), %esi
movq 0x518(%rsp), %rdx
movl 0x528(%rsp), %ecx
movq 0x530(%rsp), %r8
leaq 0x4f8(%rsp), %r9
callq 0x96f0
movq 0x598(%rsp), %rdi
movl 0x4f8(%rsp), %esi
movq 0x500(%rsp), %rdx
callq 0x9560
movl %eax, 0x4f4(%rsp)
cmpl $0x0, 0x4f4(%rsp)
je 0x7957
movl 0x4f4(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x7959
jmp 0x9479
movl 0x510(%rsp), %edi
movq 0x518(%rsp), %rsi
xorl %edx, %edx
callq 0x66f0
testb $0x1, %al
jne 0x797d
jmp 0x7a30
movl 0x528(%rsp), %edi
movq 0x530(%rsp), %rsi
xorl %edx, %edx
callq 0x66f0
testb $0x1, %al
jne 0x7a30
jmp 0x799d
movq 0x864c(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x158(%rsp)
movq 0x580(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x160(%rsp)
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x168(%rsp)
movl 0x528(%rsp), %edi
movq 0x530(%rsp), %rsi
callq 0x6ad0
movq 0x158(%rsp), %rdi
movq 0x160(%rsp), %rdx
movq 0x168(%rsp), %rcx
movq %rax, %r8
leaq 0x57d2(%rip), %rsi      # 0xd1de
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
movl 0x528(%rsp), %edi
movq 0x530(%rsp), %rsi
xorl %edx, %edx
callq 0x66f0
testb $0x1, %al
jne 0x7a4f
jmp 0x7b02
movl 0x510(%rsp), %edi
movq 0x518(%rsp), %rsi
xorl %edx, %edx
callq 0x66f0
testb $0x1, %al
jne 0x7b02
jmp 0x7a6f
movq 0x857a(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x140(%rsp)
movq 0x580(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x148(%rsp)
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x150(%rsp)
movl 0x510(%rsp), %edi
movq 0x518(%rsp), %rsi
callq 0x6ad0
movq 0x140(%rsp), %rdi
movq 0x148(%rsp), %rdx
movq 0x150(%rsp), %rcx
movq %rax, %r8
leaq 0x5700(%rip), %rsi      # 0xd1de
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
cmpl $0x2, 0x510(%rsp)
je 0x7ba5
jmp 0x7b12
movq 0x84d7(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x128(%rsp)
movq 0x580(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x130(%rsp)
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x138(%rsp)
movl 0x510(%rsp), %edi
movq 0x518(%rsp), %rsi
callq 0x6ad0
movq 0x128(%rsp), %rdi
movq 0x130(%rsp), %rdx
movq 0x138(%rsp), %rcx
movq %rax, %r8
leaq 0x569e(%rip), %rsi      # 0xd21f
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
cmpl $0x2, 0x528(%rsp)
je 0x7c48
jmp 0x7bb5
movq 0x8434(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x110(%rsp)
movq 0x580(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x118(%rsp)
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x120(%rsp)
movl 0x528(%rsp), %edi
movq 0x530(%rsp), %rsi
callq 0x6ad0
movq 0x110(%rsp), %rdi
movq 0x118(%rsp), %rdx
movq 0x120(%rsp), %rcx
movq %rax, %r8
leaq 0x55fb(%rip), %rsi      # 0xd21f
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
jmp 0x7c4a
movq 0x598(%rsp), %rdi
movl $0x2, 0x4e0(%rsp)
movsd 0x518(%rsp), %xmm0
addsd 0x530(%rsp), %xmm0
movsd %xmm0, 0x4e8(%rsp)
movl 0x4e0(%rsp), %esi
movq 0x4e8(%rsp), %rdx
callq 0x9560
movl %eax, 0x4f0(%rsp)
cmpl $0x0, 0x4f0(%rsp)
je 0x7cb0
movl 0x4f0(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x7cb2
jmp 0x9479
leaq 0x4d0(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x4d0(%rsp), %rsi
callq 0x94e0
movl %eax, 0x4cc(%rsp)
cmpl $0x0, 0x4cc(%rsp)
je 0x7d04
movl 0x4cc(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x7d06
cmpl $0x2, 0x4d0(%rsp)
je 0x7da9
jmp 0x7d16
movq 0x82d3(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0xf8(%rsp)
movq 0x580(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x100(%rsp)
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x108(%rsp)
movl 0x4d0(%rsp), %edi
movq 0x4d8(%rsp), %rsi
callq 0x6ad0
movq 0xf8(%rsp), %rdi
movq 0x100(%rsp), %rdx
movq 0x108(%rsp), %rcx
movq %rax, %r8
leaq 0x54c8(%rip), %rsi      # 0xd24d
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
leaq 0x4b8(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x4b8(%rsp), %rsi
callq 0x94e0
movl %eax, 0x4b4(%rsp)
cmpl $0x0, 0x4b4(%rsp)
je 0x7df6
movl 0x4b4(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x7df8
cmpl $0x2, 0x4b8(%rsp)
je 0x7e9b
jmp 0x7e08
movq 0x81e1(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0xe0(%rsp)
movq 0x580(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xe8(%rsp)
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xf0(%rsp)
movl 0x4b8(%rsp), %edi
movq 0x4c0(%rsp), %rsi
callq 0x6ad0
movq 0xe0(%rsp), %rdi
movq 0xe8(%rsp), %rdx
movq 0xf0(%rsp), %rcx
movq %rax, %r8
leaq 0x53d6(%rip), %rsi      # 0xd24d
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
jmp 0x7e9d
movq 0x598(%rsp), %rdi
movl $0x2, 0x4a0(%rsp)
movsd 0x4c0(%rsp), %xmm0
subsd 0x4d8(%rsp), %xmm0
movsd %xmm0, 0x4a8(%rsp)
movl 0x4a0(%rsp), %esi
movq 0x4a8(%rsp), %rdx
callq 0x9560
movl %eax, 0x4b0(%rsp)
cmpl $0x0, 0x4b0(%rsp)
je 0x7f03
movl 0x4b0(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x7f05
jmp 0x9479
leaq 0x490(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x490(%rsp), %rsi
callq 0x94e0
movl %eax, 0x48c(%rsp)
cmpl $0x0, 0x48c(%rsp)
je 0x7f57
movl 0x48c(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x7f59
cmpl $0x2, 0x490(%rsp)
je 0x7ffc
jmp 0x7f69
movq 0x8080(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0xc8(%rsp)
movq 0x580(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xd0(%rsp)
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xd8(%rsp)
movl 0x490(%rsp), %edi
movq 0x498(%rsp), %rsi
callq 0x6ad0
movq 0xc8(%rsp), %rdi
movq 0xd0(%rsp), %rdx
movq 0xd8(%rsp), %rcx
movq %rax, %r8
leaq 0x52a6(%rip), %rsi      # 0xd27e
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
leaq 0x478(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x478(%rsp), %rsi
callq 0x94e0
movl %eax, 0x474(%rsp)
cmpl $0x0, 0x474(%rsp)
je 0x8049
movl 0x474(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x804b
cmpl $0x2, 0x478(%rsp)
je 0x80ee
jmp 0x805b
movq 0x7f8e(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0x580(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xb8(%rsp)
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xc0(%rsp)
movl 0x478(%rsp), %edi
movq 0x480(%rsp), %rsi
callq 0x6ad0
movq 0xb0(%rsp), %rdi
movq 0xb8(%rsp), %rdx
movq 0xc0(%rsp), %rcx
movq %rax, %r8
leaq 0x51b4(%rip), %rsi      # 0xd27e
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
jmp 0x80f0
movq 0x598(%rsp), %rdi
movl $0x2, 0x460(%rsp)
movsd 0x480(%rsp), %xmm0
mulsd 0x498(%rsp), %xmm0
movsd %xmm0, 0x468(%rsp)
movl 0x460(%rsp), %esi
movq 0x468(%rsp), %rdx
callq 0x9560
movl %eax, 0x470(%rsp)
cmpl $0x0, 0x470(%rsp)
je 0x8156
movl 0x470(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8158
jmp 0x9479
leaq 0x450(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x450(%rsp), %rsi
callq 0x94e0
movl %eax, 0x44c(%rsp)
cmpl $0x0, 0x44c(%rsp)
je 0x81aa
movl 0x44c(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x81ac
cmpl $0x2, 0x450(%rsp)
je 0x824f
jmp 0x81bc
movq 0x7e2d(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x98(%rsp)
movq 0x580(%rsp), %rax
movq (%rax), %rax
movq %rax, 0xa0(%rsp)
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0xa8(%rsp)
movl 0x450(%rsp), %edi
movq 0x458(%rsp), %rsi
callq 0x6ad0
movq 0x98(%rsp), %rdi
movq 0xa0(%rsp), %rdx
movq 0xa8(%rsp), %rcx
movq %rax, %r8
leaq 0x5087(%rip), %rsi      # 0xd2b2
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
leaq 0x438(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x438(%rsp), %rsi
callq 0x94e0
movl %eax, 0x434(%rsp)
cmpl $0x0, 0x434(%rsp)
je 0x829c
movl 0x434(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x829e
cmpl $0x2, 0x438(%rsp)
je 0x8341
jmp 0x82ae
movq 0x7d3b(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x80(%rsp)
movq 0x580(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x90(%rsp)
movl 0x438(%rsp), %edi
movq 0x440(%rsp), %rsi
callq 0x6ad0
movq 0x80(%rsp), %rdi
movq 0x88(%rsp), %rdx
movq 0x90(%rsp), %rcx
movq %rax, %r8
leaq 0x4f95(%rip), %rsi      # 0xd2b2
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8343
movq 0x598(%rsp), %rdi
movl $0x2, 0x420(%rsp)
movsd 0x440(%rsp), %xmm0
divsd 0x458(%rsp), %xmm0
movsd %xmm0, 0x428(%rsp)
movl 0x420(%rsp), %esi
movq 0x428(%rsp), %rdx
callq 0x9560
movl %eax, 0x430(%rsp)
cmpl $0x0, 0x430(%rsp)
je 0x83a9
movl 0x430(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x83ab
jmp 0x9479
leaq 0x410(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x410(%rsp), %rsi
callq 0x7260
movl %eax, 0x40c(%rsp)
cmpl $0x0, 0x40c(%rsp)
je 0x83fd
movl 0x40c(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x83ff
jmp 0x8401
movq 0x598(%rsp), %rdi
movl 0x410(%rsp), %esi
movq 0x418(%rsp), %rdx
callq 0x9560
movl %eax, 0x408(%rsp)
cmpl $0x0, 0x408(%rsp)
je 0x8441
movl 0x408(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8443
jmp 0x9479
jmp 0x844a
movq 0x598(%rsp), %rdi
movl $0x1, 0x3f0(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x3f8(%rsp)
movl 0x3f0(%rsp), %esi
movq 0x3f8(%rsp), %rdx
callq 0x9560
movl %eax, 0x404(%rsp)
cmpl $0x0, 0x404(%rsp)
je 0x84a1
movl 0x404(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x84a3
jmp 0x9479
jmp 0x84aa
movq 0x598(%rsp), %rdi
movl $0x0, 0x3d8(%rsp)
movb $0x1, 0x3e0(%rsp)
movl 0x3d8(%rsp), %esi
movq 0x3e0(%rsp), %rdx
callq 0x9560
movl %eax, 0x3ec(%rsp)
cmpl $0x0, 0x3ec(%rsp)
je 0x84fd
movl 0x3ec(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x84ff
jmp 0x9479
jmp 0x8506
movq 0x598(%rsp), %rdi
movl $0x0, 0x3c0(%rsp)
movb $0x0, 0x3c8(%rsp)
movl 0x3c0(%rsp), %esi
movq 0x3c8(%rsp), %rdx
callq 0x9560
movl %eax, 0x3d4(%rsp)
cmpl $0x0, 0x3d4(%rsp)
je 0x8559
movl 0x3d4(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x855b
jmp 0x9479
leaq 0x3b0(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x3b0(%rsp), %rsi
callq 0x94e0
movl %eax, 0x3ac(%rsp)
cmpl $0x0, 0x3ac(%rsp)
je 0x85ad
movl 0x3ac(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x85af
jmp 0x85b1
movq 0x598(%rsp), %rax
movq %rax, 0x78(%rsp)
movl $0x0, 0x398(%rsp)
movl 0x3b0(%rsp), %edi
movq 0x3b8(%rsp), %rsi
callq 0x6570
movq 0x78(%rsp), %rdi
andb $0x1, %al
movb %al, 0x3a0(%rsp)
movl 0x398(%rsp), %esi
movq 0x3a0(%rsp), %rdx
callq 0x9560
movl %eax, 0x3a8(%rsp)
cmpl $0x0, 0x3a8(%rsp)
je 0x8623
movl 0x3a8(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8625
jmp 0x9479
leaq 0x388(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x388(%rsp), %rsi
callq 0x94e0
movl %eax, 0x384(%rsp)
cmpl $0x0, 0x384(%rsp)
je 0x8677
movl 0x384(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8679
leaq 0x370(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x370(%rsp), %rsi
callq 0x94e0
movl %eax, 0x36c(%rsp)
cmpl $0x0, 0x36c(%rsp)
je 0x86c6
movl 0x36c(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x86c8
jmp 0x86ca
movq 0x598(%rsp), %rax
movq %rax, 0x70(%rsp)
movl $0x0, 0x358(%rsp)
movl 0x370(%rsp), %edi
movq 0x378(%rsp), %rsi
movl 0x388(%rsp), %edx
movq 0x390(%rsp), %rcx
callq 0x65c0
movq 0x70(%rsp), %rdi
andb $0x1, %al
movb %al, 0x360(%rsp)
movl 0x358(%rsp), %esi
movq 0x360(%rsp), %rdx
callq 0x9560
movl %eax, 0x368(%rsp)
cmpl $0x0, 0x368(%rsp)
je 0x874b
movl 0x368(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x874d
jmp 0x9479
leaq 0x348(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x348(%rsp), %rsi
callq 0x94e0
movl %eax, 0x344(%rsp)
cmpl $0x0, 0x344(%rsp)
je 0x879f
movl 0x344(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x87a1
cmpl $0x2, 0x348(%rsp)
je 0x8832
jmp 0x87b1
movq 0x7838(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x580(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x60(%rsp)
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x68(%rsp)
movl 0x348(%rsp), %edi
movq 0x350(%rsp), %rsi
callq 0x6ad0
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rdx
movq 0x68(%rsp), %rcx
movq %rax, %r8
leaq 0x4ad2(%rip), %rsi      # 0xd2e0
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
leaq 0x330(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x330(%rsp), %rsi
callq 0x94e0
movl %eax, 0x32c(%rsp)
cmpl $0x0, 0x32c(%rsp)
je 0x887f
movl 0x32c(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8881
cmpl $0x2, 0x330(%rsp)
je 0x8912
jmp 0x8891
movq 0x7758(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x580(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x50(%rsp)
movl 0x330(%rsp), %edi
movq 0x338(%rsp), %rsi
callq 0x6ad0
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rdx
movq 0x50(%rsp), %rcx
movq %rax, %r8
leaq 0x49f2(%rip), %rsi      # 0xd2e0
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8914
movq 0x598(%rsp), %rdi
movl $0x0, 0x318(%rsp)
movsd 0x338(%rsp), %xmm1
movsd 0x350(%rsp), %xmm0
ucomisd %xmm1, %xmm0
seta %al
andb $0x1, %al
movb %al, 0x320(%rsp)
movl 0x318(%rsp), %esi
movq 0x320(%rsp), %rdx
callq 0x9560
movl %eax, 0x328(%rsp)
cmpl $0x0, 0x328(%rsp)
je 0x8981
movl 0x328(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8983
jmp 0x9479
leaq 0x308(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x308(%rsp), %rsi
callq 0x94e0
movl %eax, 0x304(%rsp)
cmpl $0x0, 0x304(%rsp)
je 0x89d5
movl 0x304(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x89d7
cmpl $0x2, 0x308(%rsp)
je 0x8a68
jmp 0x89e7
movq 0x7602(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x580(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x38(%rsp)
movl 0x308(%rsp), %edi
movq 0x310(%rsp), %rsi
callq 0x6ad0
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rcx
movq %rax, %r8
leaq 0x489c(%rip), %rsi      # 0xd2e0
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
leaq 0x2f0(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x2f0(%rsp), %rsi
callq 0x94e0
movl %eax, 0x2ec(%rsp)
cmpl $0x0, 0x2ec(%rsp)
je 0x8ab5
movl 0x2ec(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8ab7
cmpl $0x2, 0x2f0(%rsp)
je 0x8b48
jmp 0x8ac7
movq 0x7522(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x580(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
movl 0x2f0(%rsp), %edi
movq 0x2f8(%rsp), %rsi
callq 0x6ad0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq %rax, %r8
leaq 0x47bc(%rip), %rsi      # 0xd2e0
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8b4a
movq 0x598(%rsp), %rdi
movl $0x0, 0x2d8(%rsp)
movsd 0x2f8(%rsp), %xmm0
ucomisd 0x310(%rsp), %xmm0
seta %al
andb $0x1, %al
movb %al, 0x2e0(%rsp)
movl 0x2d8(%rsp), %esi
movq 0x2e0(%rsp), %rdx
callq 0x9560
movl %eax, 0x2e8(%rsp)
cmpl $0x0, 0x2e8(%rsp)
je 0x8bb3
movl 0x2e8(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8bb5
jmp 0x9479
leaq 0x2c8(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x2c8(%rsp), %rsi
callq 0x94e0
movl %eax, 0x2c4(%rsp)
cmpl $0x0, 0x2c4(%rsp)
je 0x8c07
movl 0x2c4(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8c09
movl 0x2c8(%rsp), %edi
movq 0x2d0(%rsp), %rsi
callq 0x68f0
movq %rax, %rsi
leaq 0x4ad8(%rip), %rdi      # 0xd6ff
movb $0x0, %al
callq 0x10a0
jmp 0x9479
leaq 0x2b0(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x2b0(%rsp), %rsi
callq 0x94e0
movl %eax, 0x2ac(%rsp)
cmpl $0x0, 0x2ac(%rsp)
je 0x8c80
movl 0x2ac(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8c82
jmp 0x9479
leaq 0x298(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x298(%rsp), %rsi
callq 0x7260
movl %eax, 0x294(%rsp)
cmpl $0x0, 0x294(%rsp)
je 0x8cd4
movl 0x294(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8cd6
leaq 0x280(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x280(%rsp), %rsi
callq 0x94e0
movl %eax, 0x27c(%rsp)
cmpl $0x0, 0x27c(%rsp)
je 0x8d23
movl 0x27c(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8d25
movq 0x598(%rsp), %rax
movq 0x40010(%rax), %rdi
movq 0x2a0(%rsp), %rsi
addq $0x18, %rsi
movq 0x2a0(%rsp), %rax
movq 0x10(%rax), %rdx
leaq 0x280(%rsp), %rcx
movl $0x10, %r8d
callq 0x1510
jmp 0x8d61
jmp 0x8d63
jmp 0x8d65
jmp 0x9479
leaq 0x268(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x268(%rsp), %rsi
callq 0x7260
movl %eax, 0x264(%rsp)
cmpl $0x0, 0x264(%rsp)
je 0x8db7
movl 0x264(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8db9
movq 0x270(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x258(%rsp)
movq 0x270(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x250(%rsp)
movq 0x598(%rsp), %rax
movq 0x40010(%rax), %rdi
movq 0x258(%rsp), %rsi
movq 0x250(%rsp), %rdx
callq 0x1440
movq %rax, 0x248(%rsp)
cmpq $0x0, 0x248(%rsp)
jne 0x8e79
jmp 0x8e1a
movq 0x71cf(%rip), %rax      # 0xfff0
movq (%rax), %rdi
movq 0x580(%rsp), %rax
movq (%rax), %rdx
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x250(%rsp), %rax
movl %eax, %r8d
movq 0x258(%rsp), %r9
leaq 0x44ba(%rip), %rsi      # 0xd30f
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8e7b
jmp 0x8e7d
jmp 0x8e7f
movq 0x598(%rsp), %rdi
movq 0x248(%rsp), %rax
movl (%rax), %esi
movq 0x8(%rax), %rdx
callq 0x9560
movl %eax, 0x244(%rsp)
cmpl $0x0, 0x244(%rsp)
je 0x8ebe
movl 0x244(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8ec0
jmp 0x9479
leaq 0x230(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x230(%rsp), %rsi
callq 0x7260
movl %eax, 0x22c(%rsp)
cmpl $0x0, 0x22c(%rsp)
je 0x8f12
movl 0x22c(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8f14
movq 0x238(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x220(%rsp)
movq 0x238(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x218(%rsp)
movq 0x598(%rsp), %rax
movq 0x40010(%rax), %rdi
movq 0x220(%rsp), %rsi
movq 0x218(%rsp), %rdx
callq 0x1440
movq %rax, 0x210(%rsp)
cmpq $0x0, 0x210(%rsp)
jne 0x8fd4
jmp 0x8f75
movq 0x7074(%rip), %rax      # 0xfff0
movq (%rax), %rdi
movq 0x580(%rsp), %rax
movq (%rax), %rdx
movq 0x580(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x218(%rsp), %rax
movl %eax, %r8d
movq 0x220(%rsp), %r9
leaq 0x435f(%rip), %rsi      # 0xd30f
movb $0x0, %al
callq 0x1140
movq 0x598(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x5a4(%rsp)
jmp 0x947e
jmp 0x8fd6
movq 0x598(%rsp), %rdi
movq 0x210(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x9840
movl %eax, 0x20c(%rsp)
cmpl $0x0, 0x20c(%rsp)
je 0x9013
movl 0x20c(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x9015
jmp 0x9017
jmp 0x9019
jmp 0x9479
movb $0x0, 0x20b(%rsp)
movq 0x598(%rsp), %rdi
leaq 0x20b(%rsp), %rsi
callq 0x70a0
movl %eax, 0x204(%rsp)
cmpl $0x0, 0x204(%rsp)
je 0x905f
movl 0x204(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x9061
jmp 0x9063
movq 0x598(%rsp), %rdi
movq 0x590(%rsp), %rax
movq 0x10(%rax), %rax
movzbl 0x20b(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movl (%rax), %esi
movq 0x8(%rax), %rdx
callq 0x9560
movl %eax, 0x200(%rsp)
cmpl $0x0, 0x200(%rsp)
je 0x90b5
movl 0x200(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x90b7
jmp 0x90b9
jmp 0x90bb
movq 0x598(%rsp), %rdi
callq 0x9490
jmp 0x9479
movb $0x0, 0x1ff(%rsp)
movq 0x598(%rsp), %rdi
leaq 0x1ff(%rsp), %rsi
callq 0x70a0
movl %eax, 0x1f8(%rsp)
cmpl $0x0, 0x1f8(%rsp)
je 0x910e
movl 0x1f8(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x9110
leaq 0x1e8(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x9840
movl %eax, 0x1e4(%rsp)
cmpl $0x0, 0x1e4(%rsp)
je 0x9161
movl 0x1e4(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x9163
movq 0x590(%rsp), %rax
movq 0x10(%rax), %rax
movzbl 0x1ff(%rsp), %ecx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x1e8(%rsp), %rcx
movq %rcx, (%rax)
movq 0x1f0(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x598(%rsp), %rdi
callq 0x9490
jmp 0x9479
movw $0x0, 0x1e2(%rsp)
movq 0x598(%rsp), %rdi
leaq 0x1e2(%rsp), %rsi
callq 0x73a0
movl %eax, 0x1dc(%rsp)
cmpl $0x0, 0x1dc(%rsp)
je 0x91ea
movl 0x1dc(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x91ec
leaq 0x1c8(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
leaq 0x1c8(%rsp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x9840
movl %eax, 0x1c4(%rsp)
cmpl $0x0, 0x1c4(%rsp)
je 0x923d
movl 0x1c4(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x923f
movzwl 0x1e2(%rsp), %eax
movq %rax, 0x8(%rsp)
movl 0x1c8(%rsp), %edi
movq 0x1d0(%rsp), %rsi
callq 0x6570
movq 0x8(%rsp), %rcx
andb $0x1, %al
movzbl %al, %eax
imulq %rax, %rcx
movq 0x590(%rsp), %rax
addq 0x8(%rax), %rcx
movq %rcx, 0x8(%rax)
jmp 0x9479
movw $0x0, 0x1c2(%rsp)
movq 0x598(%rsp), %rdi
leaq 0x1c2(%rsp), %rsi
callq 0x73a0
movl %eax, 0x1bc(%rsp)
cmpl $0x0, 0x1bc(%rsp)
je 0x92c6
movl 0x1bc(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x92c8
movzwl 0x1c2(%rsp), %edx
movq 0x590(%rsp), %rax
movq 0x8(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
jmp 0x9479
movw $0x0, 0x1ba(%rsp)
movq 0x598(%rsp), %rdi
leaq 0x1ba(%rsp), %rsi
callq 0x73a0
movl %eax, 0x1b4(%rsp)
cmpl $0x0, 0x1b4(%rsp)
je 0x932e
movl 0x1b4(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x9330
movzwl 0x1ba(%rsp), %edx
movq 0x590(%rsp), %rax
movq 0x8(%rax), %rcx
movslq %edx, %rsi
xorl %edx, %edx
subq %rsi, %rdx
addq %rdx, %rcx
movq %rcx, 0x8(%rax)
jmp 0x9479
movb $0x0, 0x1b3(%rsp)
movq 0x598(%rsp), %rdi
leaq 0x1b3(%rsp), %rsi
callq 0x70a0
movl %eax, 0x1ac(%rsp)
cmpl $0x0, 0x1ac(%rsp)
je 0x9399
movl 0x1ac(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x939b
leaq 0x198(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
movq 0x598(%rsp), %rdi
movzbl 0x1b3(%rsp), %eax
movl %eax, %edx
leaq 0x198(%rsp), %rsi
callq 0x9840
movl %eax, 0x194(%rsp)
cmpl $0x0, 0x194(%rsp)
je 0x93f2
movl 0x194(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x93f4
jmp 0x93f6
movq 0x598(%rsp), %rdi
movb 0x1b3(%rsp), %al
movl 0x198(%rsp), %esi
movq 0x1a0(%rsp), %rdx
movzbl %al, %ecx
callq 0x9910
movl %eax, 0x190(%rsp)
cmpl $0x0, 0x190(%rsp)
je 0x943d
movl 0x190(%rsp), %eax
movl %eax, 0x5a4(%rsp)
jmp 0x947e
jmp 0x943f
jmp 0x9441
jmp 0x9443
movq 0x598(%rsp), %rax
addq $0x40018, %rax          # imm = 0x40018
movq 0x598(%rsp), %rcx
movsbl 0x40618(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x590(%rsp)
jmp 0x9477
jmp 0x9479
jmp 0x74a6
movl 0x5a4(%rsp), %eax
addq $0x5a8, %rsp            # imm = 0x5A8
retq
nopl (%rax)