// File: /workspace/github_cpp_makefile_star2_O3/iamlouk[P]asbi/src/vm.cc
// Function: asbi::execute(std::vector<asbi::OpCode, std::allocator<asbi::OpCode>>, std::shared_ptr<asbi::Env>, asbi::Context*)
Value asbi::execute(std::vector<OpCode> opcodes, std::shared_ptr<Env> env, Context* ctx) {
#ifndef NDEBUG
	auto oldstacksize = ctx->stack.size();
#endif
	unsigned int pc = 0;
	while (pc < opcodes.size()) {
		switch (opcodes[pc++]) {
		case PUSH_NUMBER:{
			auto flt = opcodes[pc++];
			auto fltptr = reinterpret_cast<double*>(&flt);
			ctx->push(Value::number(*fltptr));
			break;
		}
		case PUSH_BOOLEAN:{
			auto val = opcodes[pc++];
			ctx->push(Value::boolean(val != 0));
			break;
		}
		case PUSH_TRUE:
			ctx->push(Value::boolean(true));
			break;
		case PUSH_FALSE:
			ctx->push(Value::boolean(false));
			break;
		case PUSH_NIL:
			ctx->push(Value::nil());
			break;
		case PUSH_SYMBOL:{
			auto raw = opcodes[pc++];
			auto sc = reinterpret_cast<StringContainer*>(raw);
			ctx->push(Value::symbol(sc));
			break;
		}
		case PUSH_STRING:{
			auto raw = opcodes[pc++];
			auto sc = reinterpret_cast<StringContainer*>(raw);
			ctx->push(Value::string(sc));
			break;
		}
		case PUSH_LAMBDA:{
			auto raw = opcodes[pc++];
			auto lc = reinterpret_cast<LambdaContainer*>(raw);
			ctx->push(Value::lambda(new LambdaContainer(env, lc->ops, lc->argnames, ctx, true)));
			break;
		}
		case PUSH_STACK_PLACEHOLDER:{
			auto raw = opcodes[pc++];
			auto sc = reinterpret_cast<StringContainer*>(raw);
			ctx->push(Value::stackplaceholder(sc));
			break;
		}
		case POP:
			ctx->pop();
			break;
		case ENTER_SCOPE:{
			env = std::make_shared<Env>(ctx, env);
			break;
		}
		case LEAVE_SCOPE:{
			env = env->outer;
			assert(env != nullptr);
			break;
		}
		case CALL:{
			auto n = static_cast<unsigned int>(opcodes[pc++]);
			auto callable = ctx->pop();
			ctx->push(callable.call(ctx, n, env));
			break;
		}
		case LOOKUP:{
			auto raw = opcodes[pc++];
			auto sc = reinterpret_cast<StringContainer*>(raw);
			ctx->push(env->lookup(sc));
			break;
		}
		case DECL:{
			auto raw = opcodes[pc++];
			auto sc = reinterpret_cast<StringContainer*>(raw);
			env->decl(sc, ctx->pop());
			ctx->push(Value::nil());
			break;
		}
		case SET:{
			auto raw = opcodes[pc++];
			auto sc = reinterpret_cast<StringContainer*>(raw);
			auto val = ctx->pop();
			env->set(sc, val);
			ctx->push(val);
			break;
		}
		case ADD:{
			auto b = ctx->pop();
			auto a = ctx->pop();
			if (a.type == type_t::Number && b.type == type_t::Number) {
				ctx->push(Value::number(a._number + b._number));
				break;
			}

			if (a.type == type_t::String/* && b.type == type_t::String*/) {
				auto sc = ctx->new_string(a._string->data);
				sc->data += b/*._string->data*/.to_string(false);
				ctx->push(Value::string(sc));
				ctx->heap_size += sc->gc_size();
				ctx->check_gc(env);
				break;
			}

			throw std::runtime_error("expected number or string");
		}
		case SUB:{
			auto b = ctx->pop();
			auto a = ctx->pop();
			if (a.type != type_t::Number || b.type != type_t::Number)
				throw std::runtime_error("expected number");
			ctx->push(Value::number(a._number - b._number));
			break;
		}
		case MUL:{
			auto b = ctx->pop();
			auto a = ctx->pop();
			if (a.type != type_t::Number || b.type != type_t::Number)
				throw std::runtime_error("expected number");
			ctx->push(Value::number(a._number * b._number));
			break;
		}
		case DIV:{
			auto b = ctx->pop();
			auto a = ctx->pop();
			if (a.type != type_t::Number || b.type != type_t::Number)
				throw std::runtime_error("expected number");
			ctx->push(Value::number(a._number / b._number));
			break;
		}
		case EQUALS:{
			auto b = ctx->pop();
			auto a = ctx->pop();
			ctx->push(Value::boolean(a == b));
			break;
		}
		case EQUALS_NOT:{
			auto b = ctx->pop();
			auto a = ctx->pop();
			ctx->push(Value::boolean(!(a == b)));
			break;
		}
		case SMALLER:{
			auto b = ctx->pop();
			auto a = ctx->pop();
			if (a.type != type_t::Number || b.type != type_t::Number)
				throw std::runtime_error("expected number");
			ctx->push(Value::boolean(a._number < b._number));
			break;
		}
		case BIGGER:{
			auto b = ctx->pop();
			auto a = ctx->pop();
			if (a.type != type_t::Number || b.type != type_t::Number)
				throw std::runtime_error("expected number");
			ctx->push(Value::boolean(a._number > b._number));
			break;
		}
		case SMALLER_OR_EQUAL:{
			auto b = ctx->pop();
			auto a = ctx->pop();
			if (a.type != type_t::Number || b.type != type_t::Number)
				throw std::runtime_error("expected number");
			ctx->push(Value::boolean(a._number <= b._number));
			break;
		}
		case BIGGER_OR_EQUAL:{
			auto b = ctx->pop();
			auto a = ctx->pop();
			if (a.type != type_t::Number || b.type != type_t::Number)
				throw std::runtime_error("expected number");
			ctx->push(Value::boolean(a._number >= b._number));
			break;
		}
		case NOT:{
			auto a = ctx->pop();
			if (a.type != type_t::Bool)
				throw std::runtime_error("expected boolean");
			ctx->push(Value::boolean(!a._boolean));
			break;
		}
		case MAKE_MAP:{
			auto n = static_cast<unsigned int>(opcodes[pc++]);
			auto mc = new MapContainer(ctx);
			for (unsigned int i = 0; i < n; ++i) {
				mc->set(ctx->pop(), ctx->pop());
			}

			ctx->push(Value::map(mc));
			ctx->heap_size += mc->gc_size();
			ctx->check_gc(env);
			break;
		}
		case MAKE_MAP_ARRLIKE:{
			auto n = static_cast<unsigned int>(opcodes[pc++]);
			auto mc = new MapContainer(ctx);
			for (unsigned int i = 0; i < n; ++i) {
				mc->set(Value::number(n - 1- i), ctx->pop());
			}

			ctx->push(Value::map(mc));
			ctx->heap_size += mc->gc_size();
			ctx->check_gc(env);
			break;
		}
		case GET_MAP_VAL:{
			auto map = ctx->pop();
			if (map.type != type_t::Map)
				throw std::runtime_error("expected map");

			ctx->push(map._map->get(ctx->pop()));
			break;
		}
		case SET_MAP_VAL:{
			auto map = ctx->pop();
			if (map.type != type_t::Map)
				throw std::runtime_error("expected map");

			auto val = ctx->pop();
			auto key = ctx->pop();
			auto prevsize = map._map->gc_size();
			map._map->set(key, val);
			if (prevsize < map._map->gc_size()) {
				ctx->heap_size -= prevsize;
				ctx->heap_size += map._map->gc_size();
				ctx->push(val);
				ctx->check_gc(env);
				break;
			}
			ctx->push(val);
			break;
		}
		case DESTRUCT_ARRLIKE:{
			auto n = static_cast<unsigned int>(opcodes[pc++]);
			auto map = ctx->pop();
			if (map.type != type_t::Map)
				throw std::runtime_error("expected map");

			for (unsigned int i = 0; i < n; ++i) {
				auto tomatch = ctx->pop();
				auto value = map._map->get(Value::number(i));
				if (tomatch.type == type_t::StackPlaceholder) {
					env->decl(tomatch._string, value);
				} else {
					if (!(tomatch == value)) {
						throw std::runtime_error("match error in destruction");
					}
				}
			}
			ctx->push(map);
			break;
		}
		case GOTO:{
			pc = static_cast<unsigned int>(opcodes[pc++]);
			assert(pc <= opcodes.size());
			break;
		}
		case IF_TRUE_GOTO:{
			auto a = ctx->pop();
			auto new_pc = static_cast<unsigned int>(opcodes[pc++]);
			if (a.type != type_t::Bool)
				throw std::runtime_error("expected boolean");

			if (a._boolean)
				pc = new_pc;
			break;
		}
		case IF_FALSE_GOTO:{
			auto a = ctx->pop();
			auto new_pc = static_cast<unsigned int>(opcodes[pc++]);
			if (a.type != type_t::Bool)
				throw std::runtime_error("expected boolean");

			if (!a._boolean)
				pc = new_pc;
			break;
		}
		case NOOP:
			assert("NOOPs should not happen");
			break;
		default:
			throw std::runtime_error("invalid opcode");
		}
	}

	assert(pc <= opcodes.size());
	assert(ctx->stack.size() == oldstacksize + 1);
	return ctx->pop();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rsi, %r13
movq %rdx, (%rsp)
movq 0x510(%rdx), %rsi
subq 0x508(%rdx), %rsi
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
subq %rax, %rcx
je 0xcdd7
movq %rdi, %r15
movq %rsi, 0xc8(%rsp)
sarq $0x3, %rcx
leaq 0x8(%r13), %rdx
movq %rdx, 0xc0(%rsp)
xorl %edx, %edx
xorl %ebx, %ebx
movq %r13, 0x38(%rsp)
movq %rdi, 0x8(%rsp)
movq (%rax,%rdx,8), %rdx
cmpq $0x23, %rdx
ja 0xd068
leal 0x1(%rbx), %r14d
leaq 0xb958(%rip), %rsi      # 0x17b6c
movslq (%rsi,%rdx,4), %rdx
addq %rsi, %rdx
jmpq *%rdx
addl $0x2, %ebx
movl %r14d, %ecx
movq (%rax,%rcx,8), %rdx
movq (%rsp), %rdi
movl $0x1, %esi
jmp 0xc703
movq (%rsp), %rdi
callq 0x11122
testl %eax, %eax
jne 0xce80
testb $0x1, %dl
je 0xc296
jmp 0xcc98
movq (%rsp), %rdi
callq 0x11122
testl %eax, %eax
jne 0xcf41
movq (%rsp), %rdi
notb %dl
andb $0x1, %dl
movq $0x0, 0x10(%rsp)
movb %dl, 0x10(%rsp)
jmp 0xc4cf
movq (%rsp), %rdi
callq 0x11122
testl %eax, %eax
jne 0xce9e
testb $0x1, %dl
je 0xcc98
movq (%r15), %rax
movl %r14d, %ecx
movl (%rax,%rcx,8), %r14d
jmp 0xcb6a
addl $0x2, %ebx
movl %r14d, %ecx
movq (%rax,%rcx,8), %r15
movq (%rsp), %rdi
callq 0x11122
movl %eax, %ebp
movq %rdx, %r12
movq (%r13), %rdi
movq %r15, %rsi
movq 0x8(%rsp), %r15
movl %eax, %edx
movq %r12, %rcx
callq 0x10c18
movq (%rsp), %rdi
movl %ebp, %esi
movq %r12, %rdx
jmp 0xc703
addl $0x2, %ebx
movl %r14d, %ecx
movq (%rax,%rcx,8), %rsi
movq (%rsp), %r15
movq (%r13), %rdi
callq 0x108ce
movq %r15, %rdi
movq 0x8(%rsp), %r15
movl %eax, %esi
jmp 0xc703
movl %r14d, %edx
movq (%rax,%rdx,8), %r14
movl %r14d, %eax
cmpq %rcx, %rax
jbe 0xcb6a
jmp 0xcebf
leaq 0x10(%rsp), %r15
movq $0x0, (%r15)
leaq 0x48(%rsp), %rdx
movq %rsp, %rcx
leaq 0x18(%rsp), %rdi
movq %r15, %rsi
movq %r13, %r8
callq 0xd21a
movapd (%r15), %xmm0
xorpd %xmm1, %xmm1
movapd %xmm1, (%r15)
movq 0x8(%r13), %rdi
movupd %xmm0, (%r13)
testq %rdi, %rdi
je 0xcb65
callq 0x65d6
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0xcb65
callq 0x65d6
jmp 0xcb65
movq (%rsp), %rdi
movq $0x0, 0x10(%rsp)
movb $0x0, 0x10(%rsp)
jmp 0xc4cf
movq (%r13), %rsi
movq (%rsi), %rax
movq %rax, (%r13)
addq $0x8, %rsi
movq 0xc0(%rsp), %rdi
callq 0xd1d0
cmpq $0x0, (%r13)
jne 0xcb6a
jmp 0xd049
addl $0x2, %ebx
movl %r14d, %ecx
movq (%rax,%rcx,8), %rdx
movq (%rsp), %rdi
movl $0x8, %esi
jmp 0xc703
movq (%rsp), %rdi
callq 0x11122
movl %eax, %ebp
movq %rdx, %r15
movq (%rsp), %rdi
callq 0x11122
cmpl $0x1, %eax
jne 0xcf83
cmpl $0x1, %ebp
jne 0xcf83
movq %rdx, %xmm0
movq %r15, %xmm1
movq (%rsp), %rdi
ucomisd %xmm0, %xmm1
jmp 0xcb4b
movq (%rsp), %rdi
callq 0x11122
movl %eax, %ebp
movq %rdx, %r15
movq (%rsp), %rdi
callq 0x11122
cmpl $0x1, %eax
jne 0xcfa4
cmpl $0x1, %ebp
jne 0xcfa4
movq %rdx, %xmm0
movq %r15, %xmm1
ucomisd %xmm1, %xmm0
jmp 0xc983
addl $0x2, %ebx
movl %r14d, %ecx
movq (%rsp), %rdi
cmpq $0x0, (%rax,%rcx,8)
movq $0x0, 0x10(%rsp)
setne 0x10(%rsp)
movq 0x10(%rsp), %rdx
xorl %esi, %esi
jmp 0xc703
addl $0x2, %ebx
movl %r14d, %ecx
movq (%rax,%rcx,8), %r15
movq (%r13), %r12
movq (%rsp), %rdi
callq 0x11122
movq %rdx, %rcx
movq %r12, %rdi
movq %r15, %rsi
movq 0x8(%rsp), %r15
movl %eax, %edx
callq 0x10b4e
movq (%rsp), %rdi
movl $0x2, %esi
xorl %edx, %edx
jmp 0xc703
movq (%rsp), %rdi
movq $0x0, 0x10(%rsp)
movb $0x1, 0x10(%rsp)
movq 0x10(%rsp), %rdx
jmp 0xc8f6
addl $0x2, %ebx
movl %r14d, %ecx
movq (%rax,%rcx,8), %rdx
movq (%rsp), %rdi
movl $0x4, %esi
jmp 0xc703
movq (%rsp), %rdi
callq 0x11122
cmpl $0x6, %eax
jne 0xceff
movq %rdx, %r12
movq (%rsp), %rdi
callq 0x11122
movl %eax, 0x5c(%rsp)
movq %rdx, %rbp
movq (%rsp), %rdi
callq 0x11122
movl %eax, %ebx
movq %rdx, %r13
movq (%r12), %rax
movq %r12, %rdi
callq *0x18(%rax)
movq %rax, %r15
movq %r12, %rdi
movl %ebx, %esi
movq %rbp, %rbx
movl 0x5c(%rsp), %ebp
movq %r13, %rdx
movl %ebp, %ecx
movq %rbx, %r8
callq 0xf382
movq (%r12), %rax
movq %r12, %rdi
callq *0x18(%rax)
movq (%rsp), %rdi
cmpq %rax, %r15
jae 0xcc4d
subq %r15, 0x308(%rdi)
movq (%r12), %rax
movq %r12, %rdi
callq *0x18(%rax)
movq (%rsp), %rdi
addq %rax, 0x308(%rdi)
movl %ebp, %esi
movq %rbx, %rdx
callq 0x110dc
movq (%rsp), %rdi
movq 0x38(%rsp), %r13
movq (%r13), %rax
movq %rax, 0x60(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0x68(%rsp)
testq %rax, %rax
je 0xcd7f
movq 0x14a06(%rip), %rcx     # 0x20fb8
cmpb $0x0, (%rcx)
je 0xcd7b
incl 0x8(%rax)
jmp 0xcd7f
movq (%rsp), %rdi
callq 0x11122
movl %eax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq (%rsp), %rdi
callq 0x11122
cmpl $0x1, %eax
jne 0xcb8c
cmpl $0x1, 0x48(%rsp)
jne 0xcb8c
movq %rdx, %xmm0
movq (%rsp), %rdi
addsd 0x50(%rsp), %xmm0
movq %xmm0, %rdx
movl $0x1, %esi
jmp 0xc8f8
movq (%rsp), %rdi
callq 0x11122
movl %eax, %ebp
movq %rdx, %r15
movq (%rsp), %rdi
callq 0x11122
cmpl $0x1, %eax
jne 0xcfe6
cmpl $0x1, %ebp
jne 0xcfe6
movq %rdx, %xmm0
movq %r15, %xmm1
divsd %xmm1, %xmm0
jmp 0xc747
movq (%rsp), %rdi
movl $0x2, %esi
xorl %edx, %edx
jmp 0xc8f8
movq (%rsp), %rdi
callq 0x11122
leaq 0x10(%rsp), %r15
movl %eax, (%r15)
movq %rdx, 0x8(%r15)
movq (%rsp), %rdi
callq 0x11122
leaq 0x48(%rsp), %rdi
movl %eax, (%rdi)
movq %rdx, 0x8(%rdi)
movq (%rsp), %r12
movq %r15, %rsi
movq 0x8(%rsp), %r15
callq 0xf8a8
jmp 0xc8e1
movl %r14d, %ecx
movl (%rax,%rcx,8), %ebp
movq (%rsp), %rdi
callq 0x11122
movl %eax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movq (%rsp), %r12
movq (%r13), %rax
movq %rax, 0xa0(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0xa8(%rsp)
testq %rax, %rax
je 0xcc65
movq 0x148d9(%rip), %rcx     # 0x20fb8
cmpb $0x0, (%rcx)
je 0xcc61
incl 0x8(%rax)
jmp 0xcc65
addl $0x2, %ebx
movl %r14d, %ecx
movq (%rax,%rcx,8), %rdx
movq (%rsp), %rdi
movl $0x3, %esi
callq 0x110dc
movl %ebx, %r14d
jmp 0xcb6a
movq (%rsp), %rdi
callq 0x11122
movl %eax, %ebp
movq %rdx, %r15
movq (%rsp), %rdi
callq 0x11122
cmpl $0x1, %eax
jne 0xd028
cmpl $0x1, %ebp
jne 0xd028
movq %rdx, %xmm0
movq %r15, %xmm1
subsd %xmm1, %xmm0
movq (%rsp), %rdi
movq %xmm0, %rdx
jmp 0xc942
movq (%rsp), %rdi
callq 0x11122
jmp 0xcb6a
movl %r14d, %ecx
movq (%rax,%rcx,8), %r12
movq (%rsp), %rbp
movl $0x48, %edi
callq 0x5380
movq %r13, %rcx
movq %rax, %r13
movq (%rcx), %rax
movq %rax, 0xb0(%rsp)
movq 0x8(%rcx), %rax
movq %rax, 0xb8(%rsp)
testq %rax, %rax
je 0xcca4
movq 0x14813(%rip), %rcx     # 0x20fb8
cmpb $0x0, (%rcx)
je 0xcca0
incl 0x8(%rax)
jmp 0xcca4
movq (%rsp), %rdi
callq 0x11122
cmpl $0x6, %eax
jne 0xcf20
movq %rdx, %r15
movq (%rsp), %r12
movq %r12, %rdi
callq 0x11122
movq %r15, %rdi
movl %eax, %esi
callq 0xf4b8
movq %r12, %rdi
movl %eax, %esi
jmp 0xcb60
movl %r14d, %ecx
movl (%rax,%rcx,8), %ebp
movq (%rsp), %rdi
callq 0x11122
cmpl $0x6, %eax
jne 0xcede
movq %rdx, %r13
testl %ebp, %ebp
je 0xc884
xorl %r14d, %r14d
movq (%rsp), %rdi
callq 0x11122
movl %eax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
movl %r14d, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq %xmm0, %rdx
movq %r13, %rdi
movl $0x1, %esi
callq 0xf4b8
movl %eax, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
cmpl $0x8, 0x10(%rsp)
jne 0xc865
movq %rdx, %rcx
movq 0x38(%rsp), %rdx
movq (%rdx), %rdi
movq 0x18(%rsp), %rsi
movl %eax, %edx
callq 0x10b4e
jmp 0xc87c
leaq 0x10(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xf8a8
testb %al, %al
je 0xce10
incl %r14d
cmpl %r14d, %ebp
jne 0xc80d
addl $0x2, %ebx
movq (%rsp), %rdi
movl $0x6, %esi
movq %r13, %rdx
callq 0x110dc
movl %ebx, %r14d
movq 0x38(%rsp), %r13
jmp 0xcb6a
movq (%rsp), %rdi
callq 0x11122
leaq 0x10(%rsp), %r15
movl %eax, (%r15)
movq %rdx, 0x8(%r15)
movq (%rsp), %rdi
callq 0x11122
leaq 0x48(%rsp), %rdi
movl %eax, (%rdi)
movq %rdx, 0x8(%rdi)
movq (%rsp), %r12
movq %r15, %rsi
movq 0x8(%rsp), %r15
callq 0xf8a8
xorb $0x1, %al
movq $0x0, 0x40(%rsp)
movb %al, 0x40(%rsp)
movq 0x40(%rsp), %rdx
movq %r12, %rdi
xorl %esi, %esi
callq 0x110dc
jmp 0xcb6a
movq (%rsp), %rdi
callq 0x11122
movl %eax, %ebp
movq %rdx, %r15
movq (%rsp), %rdi
callq 0x11122
cmpl $0x1, %eax
jne 0xd007
cmpl $0x1, %ebp
jne 0xd007
movq %rdx, %xmm0
movq %r15, %xmm1
mulsd %xmm0, %xmm1
movq (%rsp), %rdi
movq %xmm1, %rdx
movl $0x1, %esi
jmp 0xcb60
movq (%rsp), %rdi
callq 0x11122
movl %eax, %ebp
movq %rdx, %r15
movq (%rsp), %rdi
callq 0x11122
cmpl $0x1, %eax
jne 0xcfc5
cmpl $0x1, %ebp
jne 0xcfc5
movq %rdx, %xmm0
movq %r15, %xmm1
ucomisd %xmm0, %xmm1
movq $0x0, 0x10(%rsp)
seta 0x10(%rsp)
movq (%rsp), %rdi
jmp 0xcb59
movl %r14d, %ecx
movl (%rax,%rcx,8), %r14d
movl $0x68, %edi
callq 0x5380
movq %rax, %r13
movq (%rsp), %rsi
movq %rax, %rdi
callq 0xf274
testl %r14d, %r14d
je 0xc9ed
movq (%rsp), %rdi
callq 0x11122
movl %eax, %ebp
movq %rdx, %r15
movq (%rsp), %rdi
callq 0x11122
movq %rdx, %r8
movq %r13, %rdi
movl %ebp, %esi
movq %r15, %rdx
movl %eax, %ecx
callq 0xf382
decl %r14d
jne 0xc9bf
movq (%rsp), %rdi
movl $0x6, %esi
movq %r13, %rdx
callq 0x110dc
movq (%r13), %rax
movq %r13, %rdi
callq *0x18(%rax)
movq (%rsp), %rdi
addq %rax, 0x308(%rdi)
movq 0x38(%rsp), %r13
movq (%r13), %rax
movq %rax, 0x80(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0x88(%rsp)
testq %rax, %rax
movq 0x8(%rsp), %r15
je 0xcd38
movq 0x14573(%rip), %rcx     # 0x20fb8
cmpb $0x0, (%rcx)
je 0xcd34
incl 0x8(%rax)
jmp 0xcd38
movl %r14d, %ecx
movl (%rax,%rcx,8), %ebp
movl $0x68, %edi
callq 0x5380
movq %rax, %r13
movq (%rsp), %rsi
movq %rax, %rdi
callq 0xf274
testl %ebp, %ebp
je 0xcaad
decl %ebp
movl %ebp, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movq %xmm0, %r15
movq (%rsp), %rdi
callq 0x11122
movq %rdx, %r8
movq %r13, %rdi
movl $0x1, %esi
movq %r15, %rdx
movl %eax, %ecx
callq 0xf382
addl $-0x1, %ebp
jb 0xca7b
movq (%rsp), %rdi
movl $0x6, %esi
movq %r13, %rdx
callq 0x110dc
movq (%r13), %rax
movq %r13, %rdi
callq *0x18(%rax)
movq (%rsp), %rdi
addq %rax, 0x308(%rdi)
movq 0x38(%rsp), %r13
movq (%r13), %rax
movq %rax, 0x70(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0x78(%rsp)
testq %rax, %rax
movq 0x8(%rsp), %r15
je 0xcd56
movq 0x144b9(%rip), %rcx     # 0x20fb8
cmpb $0x0, (%rcx)
je 0xcd52
incl 0x8(%rax)
jmp 0xcd56
movq (%rsp), %rdi
callq 0x11122
movl %eax, %ebp
movq %rdx, %r15
movq (%rsp), %rdi
callq 0x11122
cmpl $0x1, %eax
jne 0xcf62
cmpl $0x1, %ebp
jne 0xcf62
movq %rdx, %xmm0
movq %r15, %xmm1
movq (%rsp), %rdi
ucomisd %xmm1, %xmm0
movq $0x0, 0x10(%rsp)
setae 0x10(%rsp)
movq 0x10(%rsp), %rdx
xorl %esi, %esi
callq 0x110dc
movq 0x8(%rsp), %r15
movl %r14d, %edx
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
movl %r14d, %ebx
cmpq %rdx, %rcx
ja 0xc1fb
jmp 0xcdc9
cmpl $0x4, %eax
jne 0xd089
movq (%rsp), %rdi
addq $0x20, %rdx
movq %rdx, %rsi
callq 0x11482
movq %rax, %r12
leaq 0x10(%rsp), %r15
leaq 0x48(%rsp), %rsi
movq %r15, %rdi
xorl %edx, %edx
callq 0xfa02
leaq 0x20(%r12), %rdi
movq (%r15), %rsi
movq 0x8(%r15), %rdx
callq 0x50e0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xcbe9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x5390
movq (%rsp), %rdi
movl $0x4, %esi
movq %r12, %rdx
callq 0x110dc
movq (%r12), %rax
movq %r12, %rdi
callq *0x18(%rax)
movq (%rsp), %rdi
addq %rax, 0x308(%rdi)
movq (%r13), %rax
movq %rax, 0x90(%rsp)
movq 0x8(%r13), %rax
movq %rax, 0x98(%rsp)
testq %rax, %rax
movq 0x8(%rsp), %r15
je 0xcda1
movq 0x1437c(%rip), %rcx     # 0x20fb8
cmpb $0x0, (%rcx)
je 0xcd9d
incl 0x8(%rax)
jmp 0xcda1
movl %ebp, %esi
movq %rbx, %rdx
callq 0x110dc
movq 0x38(%rsp), %r13
jmp 0xcb65
lock
incl 0x8(%rax)
leaq 0x10(%rsp), %rdi
leaq 0xa0(%rsp), %rcx
movq %r12, %rsi
movl %ebp, %edx
callq 0xf64e
movq %r12, %rdi
movl %eax, %esi
callq 0x110dc
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0xcc98
callq 0x65d6
addl $0x2, %ebx
jmp 0xc708
lock
incl 0x8(%rax)
movq 0x28(%r12), %r15
addq $0x30, %r12
leaq 0xd0(%rsp), %rdi
movq %r12, %rsi
callq 0xa0e0
movb $0x1, %r14b
movq (%rsp), %r8
leaq 0xb0(%rsp), %rsi
leaq 0xd0(%rsp), %rcx
movq %r13, %rdi
movq %r15, %rdx
movl $0x1, %r9d
callq 0xf150
xorl %r14d, %r14d
movq %rbp, %rdi
movl $0x5, %esi
movq %r13, %rdx
callq 0x110dc
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
movq 0x8(%rsp), %r15
je 0xcd1a
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x5390
addl $0x2, %ebx
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
movq 0x38(%rsp), %r13
jne 0xcd71
jmp 0xc708
lock
incl 0x8(%rax)
leaq 0x80(%rsp), %rsi
callq 0xc04a
addl $0x2, %ebx
movq 0x88(%rsp), %rdi
jmp 0xcd68
lock
incl 0x8(%rax)
leaq 0x70(%rsp), %rsi
callq 0xc04a
addl $0x2, %ebx
movq 0x78(%rsp), %rdi
testq %rdi, %rdi
je 0xc708
callq 0x65d6
jmp 0xc708
lock
incl 0x8(%rax)
leaq 0x60(%rsp), %rsi
callq 0xc04a
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
movq 0x8(%rsp), %r15
jne 0xcdbf
jmp 0xcb6a
lock
incl 0x8(%rax)
leaq 0x90(%rsp), %rsi
callq 0xc04a
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0xcb6a
callq 0x65d6
jmp 0xcb6a
movq 0xc8(%rsp), %rsi
jb 0xce61
movq (%rsp), %rdi
movq 0x510(%rdi), %rax
subq 0x508(%rdi), %rax
sarq $0x4, %rsi
sarq $0x4, %rax
incq %rsi
cmpq %rsi, %rax
jne 0xce42
callq 0x11122
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xae7f(%rip), %rsi      # 0x17ca3
movq %rax, %rdi
callq 0x5150
movq 0x141bd(%rip), %rsi     # 0x20ff0
movq 0x14176(%rip), %rdx     # 0x20fb0
movq %r14, %rdi
callq 0x55d0
leaq 0xae99(%rip), %rdi      # 0x17ce2
leaq 0xadbb(%rip), %rsi      # 0x17c0b
leaq 0xadba(%rip), %rcx      # 0x17c11
movl $0x129, %edx            # imm = 0x129
callq 0x5210
leaq 0xae56(%rip), %rdi      # 0x17cbe
leaq 0xad9c(%rip), %rsi      # 0x17c0b
leaq 0xad9b(%rip), %rcx      # 0x17c11
movl $0x128, %edx            # imm = 0x128
callq 0x5210
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xadf1(%rip), %rsi      # 0x17c85
movq %rax, %rdi
callq 0x5150
jmp 0xce2c
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xadd3(%rip), %rsi      # 0x17c85
movq %rax, %rdi
callq 0x5150
jmp 0xce2c
leaq 0xadf8(%rip), %rdi      # 0x17cbe
leaq 0xad3e(%rip), %rsi      # 0x17c0b
leaq 0xad3d(%rip), %rcx      # 0x17c11
movl $0x109, %edx            # imm = 0x109
callq 0x5210
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xada4(%rip), %rsi      # 0x17c96
movq %rax, %rdi
callq 0x5150
jmp 0xce2c
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xad83(%rip), %rsi      # 0x17c96
movq %rax, %rdi
callq 0x5150
jmp 0xce2c
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xad62(%rip), %rsi      # 0x17c96
movq %rax, %rdi
callq 0x5150
jmp 0xce2c
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xad30(%rip), %rsi      # 0x17c85
movq %rax, %rdi
callq 0x5150
jmp 0xce2c
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xacff(%rip), %rsi      # 0x17c75
movq %rax, %rdi
callq 0x5150
jmp 0xce2c
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xacde(%rip), %rsi      # 0x17c75
movq %rax, %rdi
callq 0x5150
jmp 0xce2c
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xacbd(%rip), %rsi      # 0x17c75
movq %rax, %rdi
callq 0x5150
jmp 0xce2c
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xac9c(%rip), %rsi      # 0x17c75
movq %rax, %rdi
callq 0x5150
jmp 0xce2c
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xac7b(%rip), %rsi      # 0x17c75
movq %rax, %rdi
callq 0x5150
jmp 0xce2c
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xac5a(%rip), %rsi      # 0x17c75
movq %rax, %rdi
callq 0x5150
jmp 0xce2c
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xac39(%rip), %rsi      # 0x17c75
movq %rax, %rdi
callq 0x5150
jmp 0xce2c
leaq 0xabac(%rip), %rdi      # 0x17bfc
leaq 0xabb4(%rip), %rsi      # 0x17c0b
leaq 0xabb3(%rip), %rcx      # 0x17c11
movl $0x44, %edx
callq 0x5210
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xac57(%rip), %rsi      # 0x17cd3
movq %rax, %rdi
callq 0x5150
jmp 0xce2c
movl $0x10, %edi
callq 0x51b0
movq %rax, %r14
leaq 0xabbe(%rip), %rsi      # 0x17c5b
movq %rax, %rdi
callq 0x5150
jmp 0xce2c
jmp 0xd1bd
jmp 0xd1bd
movq %rax, %rbx
movq 0x98(%rsp), %rdi
jmp 0xd1b1
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0xd1c8
movq 0x20(%rsp), %rsi
incq %rsi
jmp 0xd19f
jmp 0xd1bd
jmp 0xd1bd
jmp 0xd1bd
jmp 0xd1bd
jmp 0xd1bd
jmp 0xd1bd
jmp 0xd1bd
jmp 0xd1bd
jmp 0xd1bd
movq %rax, %rbx
movq 0x68(%rsp), %rdi
jmp 0xd1b1
jmp 0xd1bd
jmp 0xd1bd
jmp 0xd1bd
jmp 0xd1bd
movq %rax, %rbx
movb $0x1, %r14b
jmp 0xd180
movq %rax, %rbx
movq 0x88(%rsp), %rdi
jmp 0xd1b1
jmp 0xd156
movq %rax, %rbx
movq 0x78(%rsp), %rdi
jmp 0xd1b1
movq %rax, %rbx
movl $0x68, %esi
jmp 0xd19c
movq %rax, %rbx
movq 0xd0(%rsp), %rdi
testq %rdi, %rdi
je 0xd180
movq 0xe0(%rsp), %rsi
subq %rdi, %rsi
callq 0x5390
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0xd192
callq 0x65d6
testb %r14b, %r14b
je 0xd1c8
movl $0x48, %esi
movq %r13, %rdi
callq 0x5390
jmp 0xd1c8
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0xd1c8
callq 0x65d6
jmp 0xd1c8
movq %rax, %rbx
movq %r14, %rdi
callq 0x5280
movq %rbx, %rdi
callq 0x55e0