// File: /workspace/github_cpp_makefile_star2_O3/Nallantli[P]Rossa/main/rossa/instruction/instruction.cpp
// Function: ClassI::evaluate(object_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const symbol_t ClassI::evaluate(const object_t *scope, trace_t &stack_trace) const
{
	ptr_instruction_t nbody = body;
	object_t *ex = NULL;
	std::vector<aug_type_t> extensions;
	if (extends)
	{
		const symbol_t e = extends->evaluate(scope, stack_trace);
		if (e.getValueType() == value_type_enum::TYPE_NAME)
			extensions.push_back(e.getTypeName(&token, stack_trace).getBase());
		else
		{
			ex = e.getObject(&token, stack_trace);
			if (ex->getType() == scope_type_enum::SCOPE_STATIC)
				throw rossa_error_t(_FAILURE_EXTEND_, token, stack_trace);
			const ptr_instruction_t eb = ex->getBody();
			std::vector<ptr_instruction_t> temp;
			temp.push_back(body);
			temp.push_back(eb);
			nbody = std::make_shared<ScopeI>(temp, token);
		}
	}
	object_t o(scope, type, nbody, key, ex, extensions);
	if (type == scope_type_enum::SCOPE_STATIC)
		nbody->evaluate(&o, stack_trace);
	return scope->createVariable(key, symbol_t::Object(o), &token);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, 0xd0(%rsp)
movq 0xa0(%rsi), %rax
movq %rax, 0x30(%rsp)
movq 0xa8(%rsi), %rax
movq %rax, 0x38(%rsp)
testq %rax, %rax
je 0x713f6
movq 0x43ba8(%rip), %rcx     # 0xb4f90
cmpb $0x0, (%rcx)
je 0x713f2
incl 0x8(%rax)
jmp 0x713f6
lock
incl 0x8(%rax)
xorps %xmm0, %xmm0
movaps %xmm0, 0xb0(%rsp)
movq $0x0, 0xc0(%rsp)
movq 0xb0(%r14), %rsi
testq %rsi, %rsi
je 0x714c9
movq (%rsi), %rax
leaq 0x40(%rsp), %rdi
movq %r12, %rdx
movq %r15, %rcx
callq *(%rax)
leaq 0x40(%rsp), %rdi
callq 0x40b5a
cmpl $-0x9, %eax
jne 0x714d1
leaq 0x8(%r14), %rdx
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
movq %r15, %rcx
callq 0x40c24
leaq 0x18(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x3dad8
leaq 0xb0(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x3d0e6
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x7148e
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x103d0
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
callq 0x36f28
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0x714b7
movq 0x88(%rsp), %rsi
subq %rdi, %rsi
callq 0x103d0
leaq 0x60(%rsp), %rdi
callq 0x36d84
xorl %r13d, %r13d
jmp 0x715a1
xorl %r13d, %r13d
jmp 0x715ab
leaq 0x8(%r14), %rbp
leaq 0x40(%rsp), %rdi
movq %rbp, %rsi
movq %r15, %rdx
callq 0x40a9e
movq %rax, %r13
movq %rax, %rdi
callq 0x3cf0e
cmpl $0x2, %eax
je 0x7168a
leaq 0x18(%rsp), %rdi
movq %r13, %rsi
callq 0x3cf14
leaq 0xa0(%r14), %rsi
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
callq 0x76256
leaq 0x60(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x76256
leaq 0x58(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x50(%rsp), %rsi
leaq 0x17(%rsp), %rdx
leaq 0x60(%rsp), %rcx
movq %rbp, %r8
callq 0x67526
movaps 0x50(%rsp), %xmm0
xorps %xmm1, %xmm1
movaps %xmm1, 0x50(%rsp)
movq 0x38(%rsp), %rdi
movaps %xmm0, 0x30(%rsp)
testq %rdi, %rdi
je 0x71588
callq 0x1e5bc
movq 0x58(%rsp), %rdi
testq %rdi, %rdi
je 0x71588
callq 0x1e5bc
leaq 0x60(%rsp), %rdi
callq 0x66a3c
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x715a1
callq 0x1e5bc
leaq 0x40(%rsp), %rdi
callq 0x3fe06
leaq 0x98(%r14), %rbx
leaq 0x90(%r14), %rbp
leaq 0xb0(%rsp), %rax
movq %rax, (%rsp)
leaq 0x60(%rsp), %rdi
leaq 0x30(%rsp), %rcx
movq %r12, %rsi
movq %rbx, %rdx
movq %rbp, %r8
movq %r13, %r9
callq 0x3c9fc
cmpl $0x2, (%rbx)
jne 0x7160c
movq 0x30(%rsp), %rsi
movq (%rsi), %rax
leaq 0xd8(%rsp), %rdi
leaq 0x60(%rsp), %rdx
movq %r15, %rcx
callq *(%rax)
leaq 0xd8(%rsp), %rdi
callq 0x3fe06
leaq 0x18(%rsp), %rdi
leaq 0x60(%rsp), %rsi
callq 0x3fdae
addq $0x8, %r14
leaq 0x18(%rsp), %rdx
movq %r12, %rdi
movq %rbp, %rsi
movq %r14, %rcx
callq 0x3cee2
movq 0xd0(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3fdf4
leaq 0x18(%rsp), %rdi
callq 0x3fe06
leaq 0x60(%rsp), %rdi
callq 0x3cb40
leaq 0xb0(%rsp), %rdi
callq 0x36d84
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x71675
callq 0x1e5bc
movq %rbx, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xa8, %edi
callq 0x101e0
movq %rax, %r14
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x160bb(%rip), %rsi     # 0x87763
leaq 0x160de(%rip), %rdx     # 0x8778d
leaq 0x60(%rsp), %rdi
callq 0x1e698
movb $0x1, %r13b
leaq 0x60(%rsp), %rsi
movq %r14, %rdi
movq %rbp, %rdx
movq %r15, %rcx
callq 0x46e88
xorl %r13d, %r13d
leaq 0x3f647(%rip), %rsi     # 0xb0d20
leaq -0x3a43c(%rip), %rdx    # 0x372a4
movq %r14, %rdi
callq 0x106d0
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x71702
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x103d0
testb %r13b, %r13b
jne 0x7170c
jmp 0x71776
movq %rax, %rbx
movq %r14, %rdi
callq 0x102d0
jmp 0x71776
jmp 0x71749
jmp 0x71773
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x71739
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x103d0
jmp 0x71739
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x36e1e
jmp 0x71776
jmp 0x71773
jmp 0x71769
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x66a3c
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x71776
callq 0x1e5bc
jmp 0x71776
jmp 0x7176e
movq %rax, %rbx
jmp 0x7178f
movq %rax, %rbx
jmp 0x71799
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3fe06
jmp 0x71799
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x3fe06
leaq 0x60(%rsp), %rdi
callq 0x3cb40
leaq 0xb0(%rsp), %rdi
callq 0x36d84
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x717b5
callq 0x1e5bc
movq %rbx, %rdi
callq 0x106f0
nop