// File: /workspace/github_cpp_makefile_star2_O2/pixlark[P]Badge/src/vm.cc
// Function: VM::step()
VM_Response step()
	{	
		if (halted()) {
			return VM_HALTED;
		}
		
		/* Manage call stack and VM halting */
		Call_Frame * frame;
		{
			frame = frame_reference();
			
			// If our call frame has come to an implicit end
			while (frame->bc_pointer >= frame->bc_length) {
				assert(stack.size > 0);

				if (call_stack.size == 1) {
					// If we're about to return from global scope, we
					// need to do some special stuff
					do_halting_tasks();
					return_function();
					return VM_HALTED;
				}
				return_function();
				
				// Update frame reference
				frame = frame_reference();
			}
		}
		
		BC bc = frame->bytecode[frame->bc_pointer++];
		current_assoc = bc.assoc;
		
		switch (bc.kind) {
		case BC_NOP: break;
		case BC_POP_AND_DISCARD: {
			pop();
		} break;
		case BC_LOAD_CONST: {
			push(bc.arg.value);
		} break;
		case BC_DUPLICATE: {
			push(stack[stack.size - 1]);
		} break;
		case BC_CREATE_BINDING: {
			auto symbol = pop_symbol();
			auto value = pop();
			create_binding(symbol, value);
		} break;
		case BC_UPDATE_BINDING: {
			auto symbol = pop_symbol();
			auto value = pop();
			if (!frame->environment->update_binding(symbol, value)) {
				error("Tried to set unbound variable '%s'", symbol);
			}
		} break;
		case BC_RESOLVE_BINDING: {
			auto symbol = pop_symbol();
			auto value = resolve_binding(symbol);
			push(value);
		} break;
		case BC_ADD: {
			auto b = pop();
			auto a = pop();
			push(Value::add(a, b, bc.assoc));
		} break;
		case BC_SUBTRACT: {
			auto b = pop();
			auto a = pop();
			push(Value::subtract(a, b, bc.assoc));
		} break;
		case BC_MULTIPLY: {
			auto b = pop();
			auto a = pop();
			push(Value::multiply(a, b, bc.assoc));
		} break;
		case BC_DIVIDE: {
			auto b = pop();
			auto a = pop();
			push(Value::divide(a, b, bc.assoc));
		} break;
		case BC_NEGATE: {
			auto a = pop();
			push(Value::subtract(Value::raise(0), a, bc.assoc));
		} break;
		case BC_EQUAL: {
			auto b = pop();
			auto a = pop();
			push(Value::raise_bool(Value::equal(a, b, bc.assoc)));
		} break;
		case BC_NOT_EQUAL: {
			auto b = pop();
			auto a = pop();
			push(Value::raise_bool(!Value::equal(a, b, bc.assoc)));
		} break;
		case BC_GREATER_THAN: {
			auto b = pop();
			auto a = pop();
			push(Value::raise_bool(Value::greater_than(a, b, bc.assoc)));
		} break;
		case BC_LESS_THAN: {
			auto b = pop();
			auto a = pop();
			push(Value::raise_bool(Value::less_than(a, b, bc.assoc)));
		} break;
		case BC_GREATER_THAN_OR_EQUAL_TO: {
			auto b = pop();
			auto a = pop();
			push(Value::raise_bool(Value::greater_than_or_equal_to(a, b, bc.assoc)));
		} break;
		case BC_LESS_THAN_OR_EQUAL_TO: {
			auto b = pop();
			auto a = pop();
			push(Value::raise_bool(Value::less_than_or_equal_to(a, b, bc.assoc)));
		} break;
		case BC_AND: {
			auto b = pop();
			auto a = pop();
			push(Value::raise_bool(Value::_and(a, b, bc.assoc)));
		} break;
		case BC_OR: {
			auto b = pop();
			auto a = pop();
			push(Value::raise_bool(Value::_or(a, b, bc.assoc)));
		} break;
		case BC_NOT: {
			auto a = pop();
			push(Value::raise_bool(!a.truthy()));
		} break;
		case BC_CONSTRUCT_FUNCTION: {
			auto count = pop_integer();
			
			Function * func = (Function*) GC::alloc(sizeof(Function));
			func->block_reference = bc.arg.block_reference;

			// Insert parameters
			func->parameter_count = count;
			func->parameters = (Symbol*) GC::alloc(sizeof(Symbol) * count);
			for (int i = 0; i < count; i++) {
				auto it = pop_symbol();
				func->parameters[count - i - 1] = it;
			}

			// Close over local environment
			func->closure = frame->environment;
			
			// Create and push value
			Value value = Value::create(TYPE_FUNCTION);
			value.ref_function = func;
			push(value);
		} break;
		case BC_POP_AND_CALL_FUNCTION: {
			auto func_val = pop();
			if (func_val.is(TYPE_BUILTIN)) {
				// If this is a builtin function, override everything and just do a builtin call
				auto builtin = func_val.builtin;
				auto passed_arg_count = pop_integer();
				if (passed_arg_count != builtin->arg_count) {
					error("Function takes %d arguments; was passed %d",
						  builtin->arg_count,
						  passed_arg_count);
				}
				Value * args = (Value*) malloc(sizeof(Value) * builtin->arg_count);
				defer { free(args); };
				for (int i = 0; i < builtin->arg_count; i++) {
					args[i] = pop();
				}
				push((builtin->funcptr)(args));
			} else if (func_val.is(TYPE_CONSTRUCTOR)) {
				auto ctor = func_val.ref_constructor;
				auto object = (Object*) GC::alloc(sizeof(Object));
				object->fields.alloc(symbol_comparator);

				auto passed_arg_count = pop_integer();
				if (passed_arg_count != ctor->field_count) {
					error("Constructor has %d fields; was passed %d",
						  ctor->field_count,
						  passed_arg_count);
				}

				for (int i = 0; i < ctor->field_count; i++) {
					auto val = pop();
					auto symbol = ctor->fields[i];
					object->fields.add(symbol, val);
				}

				auto val = Value::create(TYPE_OBJECT);
				val.ref_object = object;
				push(val);
			} else {
				// Otherwise, this is a normal function
				func_val.assert_is(TYPE_FUNCTION);
				auto func = func_val.ref_function;
				auto passed_arg_count = pop_integer();
				if (passed_arg_count != func->parameter_count) {
					error("Function takes %d arguments; was passed %d",
						  func->parameter_count,
						  passed_arg_count);
				}

				#if TAIL_CALL_OPTIMIZATION
				{
					bool is_tail_call = true;
					size_t ptr = frame->bc_pointer;
					while (ptr < frame->bc_length) {
						auto kind = frame->bytecode[ptr].kind;
						if (kind == BC_RETURN) {
							break;
						}
						if (!BC::tail_call_safe(kind)) {
							is_tail_call = false;
							break;
						}
						ptr++;
					}
					if (is_tail_call) {
						return_function();
					}
				}
				#endif
				
				// Create our new call frame
				call_stack.push(Call_Frame::alloc(blocks, func->block_reference,
												  func, func->closure));
				
				// Create bindings to pushed arguments
				for (int i = 0; i < passed_arg_count; i++) {
					auto value = pop();
					create_binding(func->parameters[i], value);
				}
			}
		} break;
		case BC_RETURN: {
			// WARNING: `frame` invalidated here! Don't use it!
			return_function();
		} break;
		case BC_THIS_FUNCTION: {
			auto func = Value::create(TYPE_FUNCTION);
			if (!frame->origin) {
				error("Invalid use of this -- not in a function!");
			}
			func.ref_function = frame->origin;
			push(func);
		} break;
		case BC_SYMBOL_TO_STRING: {
			auto symbol = pop_symbol();
			auto string = (String*) GC::alloc(sizeof(String));
			string->length = strlen(symbol);
			string->string = (char*) GC::alloc(sizeof(char) * string->length);
			strncpy(string->string, symbol, string->length);
			auto value = Value::create(TYPE_STRING);
			value.ref_string = string;
			push(value);
		} break;
		case BC_JUMP: {
			frame->bc_pointer = bc.arg.integer;
		} break;
		case BC_POP_JUMP: {
			auto a = pop();
			if (a.type != TYPE_NOTHING) {
				frame->bc_pointer = bc.arg.integer;
			}
		} break;
		case BC_ENTER_SCOPE: {
			auto new_env = Environment::alloc();
			new_env->next_env = frame->environment;
			frame->environment = new_env;
		} break;
		case BC_EXIT_SCOPE: {
			frame->environment = frame->environment->next_env;
			GC::heuristic_exit_scope();
		} break;
		case BC_CONSTRUCT_CONSTRUCTOR: {
			auto count = pop_integer();
			auto ctor = (Constructor*) GC::alloc(sizeof(Constructor));
			ctor->fields = (Symbol*) GC::alloc(sizeof(Symbol) * count);
			ctor->field_count = count;
			for (int i = 0; i < count; i++) {
				ctor->fields[i] = pop_symbol();
			}
			auto val = Value::create(TYPE_CONSTRUCTOR);
			val.ref_constructor = ctor;
			push(val);
		} break;
		case BC_RESOLVE_FIELD: {
			auto symbol = pop_symbol();
			auto obj_val = pop();
			if (!obj_val.is(TYPE_OBJECT)) {
				error("Cannot access field of non-object");
			}
			auto obj = obj_val.ref_object;
			if (!obj->fields.bound(symbol)) {
				error("No such field %s on object", symbol);
			}
			auto resolved = obj->fields.lookup(symbol);
			push(resolved);
		} break;
		case BC_UPDATE_FIELD: {
			auto symbol = pop_symbol();
			auto obj_val = pop();
			if (!obj_val.is(TYPE_OBJECT)) {
				error("Cannot access field of non-object");
			}
			auto obj = obj_val.ref_object;
			if (!obj->fields.bound(symbol)) {
				error("No such field %s on object", symbol);
			}
			auto val = pop();
			obj->fields.update(symbol, val);
		} break;
		case BC_PUSH_BODY: {
			frame->body_stack.push(bc.arg.integer);
		} break;
		case BC_BREAK_BODY: {
			if (frame->body_stack.size == 0) {
				error("Nothing to break out of");
			}
			int exit_pos = frame->body_stack.pop();
			frame->bc_pointer = exit_pos;
		} break;
		case BC_RUN_FILE_UNIT: {
			block_reference_to_push = pop_integer();
			push(Value::nothing());
			return VM_SWITCH;
		} break;
		case BC_EXPORT_SYMBOL: {
			auto symbol = pop_symbol();
			export_queue.push((Export) { symbol, bc.assoc });
			push(Value::nothing());
		} break;
		case BC_GET_CALL_FLAG: {
			auto symbol_val = bc.arg.value;
			if (!symbol_val.is(TYPE_SYMBOL)) {
				fatal("Can't lookup call-flag for non-symbol. (This error should never trigger!)");
			}
			auto symbol = symbol_val.symbol;
			push(lookup_call_flag(symbol));
		} break;
		default: {
			fatal("Internal error: VM ran unrecognized instruction");
		}
		}

		return VM_OK;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
pushq $0x1
popq %r14
cmpq $0x0, 0x68(%rdi)
je 0x5913
movq %rdi, %rbx
movq %rbx, %rdi
callq 0x7304
movq %rax, %r15
movq 0x28(%rax), %rax
cmpq 0x30(%r15), %rax
jb 0x50fc
cmpq $0x0, 0x40(%rbx)
je 0x5a15
cmpq $0x1, 0x68(%rbx)
je 0x5151
movq %rbx, %rdi
callq 0x73b6
jmp 0x50cb
movq 0x20(%r15), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x28(%r15)
imulq $0x18, %rax, %rax
movl (%rcx,%rax), %r14d
movl 0x4(%rcx,%rax), %r12d
movq 0x8(%rcx,%rax), %r13
movq 0x10(%rcx,%rax), %rdx
movl %r12d, 0x88(%rbx)
cmpq $0x25, %r14
ja 0x5a34
leaq 0x404d(%rip), %rax      # 0x9184
movslq (%rax,%r14,4), %rcx
addq %rax, %rcx
jmpq *%rcx
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
jmp 0x5910
movq %rbx, %rdi
callq 0x7342
movq %rbx, %rdi
callq 0x73b6
jmp 0x5913
cmpl $0x2, %r13d
jne 0x5a3d
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x78fe
jmp 0x5589
movq %rbx, %rdi
callq 0x763a
cltq
movq %rax, 0x90(%rbx)
addq $0x38, %rbx
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x7afe
pushq $0x2
popq %r14
jmp 0x5913
movq %rbx, %rdi
callq 0x73fa
leaq 0x10(%rbx), %rdi
movq %rax, %rsi
movl %r12d, %edx
callq 0x78ba
addq $0x38, %rbx
xorl %r14d, %r14d
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
jmp 0x52c0
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
xorl %r14d, %r14d
testl %eax, %eax
je 0x5913
movslq %r13d, %rax
movq %rax, 0x28(%r15)
jmp 0x5913
leaq 0x38(%r15), %r14
cmpq $0x0, 0x40(%r15)
jne 0x5213
leaq 0x4b0b(%rip), %rsi      # 0x9d14
movq %rbx, %rdi
xorl %eax, %eax
callq 0x7522
movq %r14, %rdi
callq 0x7868
cltq
jmp 0x588f
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %r14d
movq %rdx, %r15
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %edi
movq %rdx, %rsi
movl %r14d, %edx
movq %r15, %rcx
movl %r12d, %r8d
callq 0x40a4
jmp 0x5569
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %r14d
movq %rdx, %r15
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %edi
movq %rdx, %rsi
movl %r14d, %edx
movq %r15, %rcx
movl %r12d, %r8d
callq 0x4048
jmp 0x5569
addq $0x38, %r15
movq %r15, %rdi
movl %r13d, %esi
callq 0x6d88
jmp 0x5910
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
movq %rdx, %rcx
xorl %r14d, %r14d
pushq $0x1
popq %rdi
xorl %esi, %esi
movl %eax, %edx
movl %r12d, %r8d
callq 0x3ed6
movq %rbx, %rdi
movl %eax, %esi
callq 0x7afe
jmp 0x5913
movq %rbx, %rdi
callq 0x73fa
movq %rax, %r14
leaq 0x38(%rbx), %rdi
callq 0x7cd0
movq %rdx, %rcx
movq %rbx, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x742c
jmp 0x5910
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %r14d
movq %rdx, %r15
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %edi
movq %rdx, %rsi
movl %r14d, %edx
movq %r15, %rcx
callq 0x3f6e
jmp 0x5569
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %r14d
movq %rdx, %r15
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %edi
movq %rdx, %rsi
movl %r14d, %edx
movq %r15, %rcx
movl %r12d, %r8d
callq 0x3f08
jmp 0x5659
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
xorl %edx, %edx
testl %eax, %eax
sete %dl
jmp 0x556c
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %r14d
movq %rbx, %rdi
callq 0x7cd0
xorl %edx, %edx
orl %r14d, %eax
setne %dl
jmp 0x556c
addq $0x38, %rbx
movq %rbx, %rdi
movl %r13d, %esi
jmp 0x590b
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %r14d
movq %rdx, %r15
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %edi
movq %rdx, %rsi
movl %r14d, %edx
movq %r15, %rcx
movl %r12d, %r8d
callq 0x401a
jmp 0x5569
movq 0x40(%rbx), %rsi
addq $0x38, %rbx
decq %rsi
movq %rbx, %rdi
callq 0x5c5c
movl (%rax), %esi
movq 0x8(%rax), %rdx
jmp 0x5535
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %r14d
movq %rdx, %r15
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %edi
movq %rdx, %rsi
movl %r14d, %edx
movq %r15, %rcx
movl %r12d, %r8d
callq 0x3ea4
jmp 0x5659
movq %rbx, %rdi
callq 0x73fa
movq %rax, %r15
leaq 0x38(%rbx), %r14
movq %r14, %rdi
callq 0x7cd0
movq %rdx, %r12
cmpl $0x7, %eax
je 0x5451
leaq 0x4890(%rip), %rsi      # 0x9cd7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x7522
movq %r12, %rdi
movq %r15, %rsi
callq 0x7706
testb %al, %al
jne 0x5474
leaq 0x4892(%rip), %rsi      # 0x9cf9
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x7522
movq %r12, %rdi
movq %r15, %rsi
callq 0x7762
movq %r14, %rdi
jmp 0x565c
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %r14d
movq %rdx, %r15
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %edi
movq %rdx, %rsi
movl %r14d, %edx
movq %r15, %rcx
movl %r12d, %r8d
callq 0x4076
jmp 0x5569
movq %rbx, %rdi
callq 0x73b6
jmp 0x5910
movq %rbx, %rdi
callq 0x73fa
movq %rax, %r12
leaq 0x38(%rbx), %rdi
callq 0x7cd0
movq %rdx, %rcx
movq 0x8(%r15), %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x7484
xorl %r14d, %r14d
testb %al, %al
jne 0x5913
leaq 0x4739(%rip), %rsi      # 0x9c36
xorl %r14d, %r14d
movq %rbx, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x7522
jmp 0x5913
movq (%r15), %rdx
testq %rdx, %rdx
jne 0x552e
leaq 0x478c(%rip), %rsi      # 0x9cad
movq %rbx, %rdi
xorl %eax, %eax
callq 0x7522
movq (%r15), %rdx
addq $0x38, %rbx
pushq $0x5
popq %rsi
movq %rbx, %rdi
jmp 0x590b
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %r14d
movq %rdx, %r15
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %edi
movq %rdx, %rsi
movl %r14d, %edx
movq %r15, %rcx
callq 0x3f6e
xorb $0x1, %al
movzbl %al, %edx
movq %rbx, %rdi
movl %edx, %esi
jmp 0x590b
movq %rbx, %rdi
callq 0x73fa
movq %rbx, %rdi
movq %rax, %rsi
callq 0x7596
addq $0x38, %rbx
jmp 0x5659
movq %rbx, %rdi
callq 0x763a
movl %eax, %r12d
pushq $0x20
popq %rdi
callq 0x3c0e
movq %rax, %r14
movq %r13, 0x10(%rax)
movslq %r12d, %r12
movq %r12, 0x8(%rax)
leaq (,%r12,8), %rdi
callq 0x3c0e
movq %rax, (%r14)
xorl %r13d, %r13d
testl %r12d, %r12d
cmovgl %r12d, %r13d
decl %r12d
subq $0x1, %r13
jb 0x55ea
movq %rbx, %rdi
callq 0x73fa
movq (%r14), %rcx
movslq %r12d, %r12
movq %rax, (%rcx,%r12,8)
jmp 0x55cd
movq 0x8(%r15), %rax
movq %rax, 0x18(%r14)
addq $0x38, %rbx
pushq $0x5
jmp 0x56b9
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %r14d
movq %rdx, %r15
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %edi
movq %rdx, %rsi
movl %r14d, %edx
movq %r15, %rcx
movl %r12d, %r8d
callq 0x3f3a
jmp 0x5659
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %r14d
movq %rdx, %r15
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %edi
movq %rdx, %rsi
movl %r14d, %edx
movq %r15, %rcx
movl %r12d, %r8d
callq 0x3ed6
movq %rbx, %rdi
movl %eax, %esi
jmp 0x590b
movq %rbx, %rdi
callq 0x763a
movl %eax, %r15d
pushq $0x10
popq %rdi
callq 0x3c0e
movq %rax, %r14
movslq %r15d, %r15
leaq (,%r15,8), %rdi
callq 0x3c0e
movq %rax, (%r14)
movq %r15, 0x8(%r14)
xorl %r12d, %r12d
testl %r15d, %r15d
cmovlel %r12d, %r15d
cmpq %r12, %r15
je 0x56b3
movq %rbx, %rdi
callq 0x73fa
movq (%r14), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
jmp 0x569a
addq $0x38, %rbx
pushq $0x6
popq %rsi
movq %rbx, %rdi
movq %r14, %rdx
jmp 0x590b
movq %rbx, %rdi
callq 0x73fa
movq %rax, %r14
leaq 0x38(%rbx), %r15
movq %r15, %rdi
callq 0x7cd0
movq %rdx, %r12
cmpl $0x7, %eax
je 0x56f5
leaq 0x45ec(%rip), %rsi      # 0x9cd7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x7522
movq %r12, %rdi
movq %r14, %rsi
callq 0x7706
testb %al, %al
jne 0x5718
leaq 0x45ee(%rip), %rsi      # 0x9cf9
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x7522
movq %r15, %rdi
callq 0x7cd0
movq %rdx, %rcx
movq %r12, %rdi
movq %r14, %rsi
movl %eax, %edx
callq 0x77e6
jmp 0x5910
movq %rbx, %rdi
callq 0x73fa
movq %rax, %r14
pushq $0x10
popq %rdi
callq 0x3c0e
movq %rax, %r15
movq %r14, %rdi
callq 0x1080
movq %rax, 0x8(%r15)
movq %rax, %rdi
callq 0x3c0e
movq %rax, (%r15)
movq 0x8(%r15), %rdx
movq %rax, %rdi
movq %r14, %rsi
callq 0x10b0
addq $0x38, %rbx
pushq $0x4
popq %rsi
movq %rbx, %rdi
jmp 0x5908
leaq 0x38(%rbx), %r14
movq %r14, %rdi
callq 0x7cd0
movq %rdx, %r12
movl %eax, -0x48(%rbp)
movq %rdx, -0x40(%rbp)
cmpl $0x6, %eax
je 0x5895
cmpl $0x3, %eax
jne 0x5925
movq %rbx, %rdi
callq 0x763a
movslq %eax, %r13
movq 0x8(%r12), %rdx
cmpq %r13, %rdx
je 0x57d5
leaq 0x4495(%rip), %rsi      # 0x9c59
movq %rbx, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0x7522
movq 0x8(%r12), %r13
movq %r13, %rdi
shlq $0x4, %rdi
callq 0x1200
leaq -0x38(%rbp), %rcx
movq %rax, (%rcx)
movq %rcx, -0x30(%rbp)
pushq $0x8
popq %rbx
xorl %r15d, %r15d
cmpq %r15, %r13
jbe 0x598e
movq %r14, %rdi
callq 0x7cd0
movq -0x38(%rbp), %rcx
movl %eax, -0x8(%rcx,%rbx)
movq %rdx, (%rcx,%rbx)
incq %r15
movq 0x8(%r12), %r13
addq $0x10, %rbx
jmp 0x57f2
addq $0x38, %rbx
movq %rbx, %rdi
callq 0x7cd0
movl %eax, %r14d
movq %rbx, %rdi
callq 0x7cd0
testl %eax, %eax
setne %al
testl %r14d, %r14d
setne %cl
andb %al, %cl
movzbl %cl, %edx
jmp 0x556c
callq 0x4f82
movq 0x8(%r15), %rcx
movq %rcx, 0x50(%rax)
movq %rax, 0x8(%r15)
jmp 0x5910
movq 0x8(%r15), %rax
movq 0x50(%rax), %rax
movq %rax, 0x8(%r15)
cvtss2sd 0x99bd(%rip), %xmm0     # 0xf230
addsd 0x38dd(%rip), %xmm0     # 0x9158
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x99a9(%rip)     # 0xf230
jmp 0x5910
movslq %r13d, %rax
movq %rax, 0x28(%r15)
jmp 0x5910
pushq $0x58
popq %rdi
callq 0x3c0e
movq %rax, %r15
leaq -0x4277(%rip), %rsi     # 0x1630
movq %rax, %rdi
callq 0x766c
movq %rbx, %rdi
callq 0x763a
movslq %eax, %rcx
movq 0x8(%r12), %rdx
cmpq %rcx, %rdx
je 0x58d7
leaq 0x43b9(%rip), %rsi      # 0x9c84
movq %rbx, %rdi
movl %eax, %ecx
xorl %eax, %eax
callq 0x7522
xorl %ebx, %ebx
cmpq %rbx, 0x8(%r12)
jbe 0x5902
movq %r14, %rdi
callq 0x7cd0
movq %rdx, %rcx
movq (%r12), %rdx
movq (%rdx,%rbx,8), %rsi
movq %r15, %rdi
movl %eax, %edx
callq 0x7684
incq %rbx
jmp 0x58d9
pushq $0x7
popq %rsi
movq %r14, %rdi
movq %r15, %rdx
callq 0x7afe
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq -0x48(%rbp), %r12
pushq $0x5
popq %rsi
movq %r12, %rdi
callq 0x76e0
movq 0x8(%r12), %r12
movq %rbx, %rdi
callq 0x763a
movl %eax, %r13d
cltq
movq 0x8(%r12), %rdx
cmpq %rax, %rdx
je 0x5964
leaq 0x4302(%rip), %rsi      # 0x9c59
movq %rbx, %rdi
movl %r13d, %ecx
xorl %eax, %eax
callq 0x7522
movq 0x28(%r15), %rax
movq 0x30(%r15), %rcx
imulq $0x18, %rax, %rdx
cmpq %rcx, %rax
jae 0x59b4
movq 0x20(%r15), %rsi
movl (%rsi,%rdx), %esi
testl %esi, %esi
je 0x5985
cmpl $0x1d, %esi
jne 0x59af
incq %rax
addq $0x18, %rdx
jmp 0x5970
movq -0x38(%rbp), %rdi
callq *0x10(%r12)
movq %r14, %rdi
movl %eax, %esi
callq 0x7afe
leaq -0x30(%rbp), %rdi
callq 0x7e30
jmp 0x5910
cmpl $0x14, %esi
jne 0x59bc
movq %rbx, %rdi
callq 0x73b6
leaq 0x60(%rbx), %r15
movq (%rbx), %rdi
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rcx
movq %r12, %rdx
callq 0x713c
movq %r15, %rdi
movq %rax, %rsi
callq 0x710a
xorl %r15d, %r15d
testl %r13d, %r13d
cmovlel %r15d, %r13d
cmpq %r15, %r13
je 0x5910
movq %r14, %rdi
callq 0x7cd0
movq %rdx, %rcx
movq (%r12), %rdx
movq (%rdx,%r15,8), %rsi
movq %rbx, %rdi
movl %eax, %edx
callq 0x742c
incq %r15
jmp 0x59ea
leaq 0x438f(%rip), %rdi      # 0x9dab
leaq 0x41f2(%rip), %rsi      # 0x9c15
leaq 0x41f5(%rip), %rcx      # 0x9c1f
movl $0xe2, %edx
callq 0x10d0
leaq 0x433b(%rip), %rdi      # 0x9d76
jmp 0x5a44
leaq 0x42e8(%rip), %rdi      # 0x9d2c
xorl %eax, %eax
callq 0x1928
jmp 0x5a4d
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x7e30
movq %rbx, %rdi
callq 0x11c0
nop