// File: /workspace/github_cpp_makefile_star2_O3/Nallantli[P]Rossa/main/rossa/instruction/instruction.cpp
// Function: VargDefineI::evaluate(object_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const symbol_t VargDefineI::evaluate(const object_t *scope, trace_t &stack_trace) const
{
	std::map<const hash_ull, const symbol_t> capturedVars;
	for (const hash_ull &e : captures)
	{
		capturedVars[e].set(&scope->getVariable(e, &token, stack_trace), &token, stack_trace);
	}
	ptr_function_t f = std::make_shared<function_t>(key, scope->getPtr(), body, capturedVars);
	if (key > 0)
	{
		return scope->createVariable(key, symbol_t::FunctionVARG(static_cast<ptr_function_t>(f)), &token);
	}
	return symbol_t::FunctionVARG(static_cast<ptr_function_t>(f));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rcx, %r12
movq %rdx, 0x18(%rsp)
movq %rdi, 0x30(%rsp)
leaq 0x50(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq 0xa8(%rsi), %r13
movq %rsi, 0x10(%rsp)
movq 0xb0(%rsi), %r15
cmpq %r15, %r13
je 0x6e219
movq 0x10(%rsp), %rax
leaq 0x8(%rax), %rbp
leaq 0x48(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3e782
movq %rax, %r14
movq 0x18(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r12, %rcx
callq 0x3ced2
movq %r14, %rdi
movq %rax, %rsi
movq %rbp, %rdx
movq %r12, %rcx
callq 0x3ff88
addq $0x8, %r13
cmpq %r15, %r13
jne 0x6e1de
movq 0x18(%rsp), %rdi
callq 0x3cf44
movq 0x10(%rsp), %rdx
leaq 0x90(%rdx), %r12
movq %rsp, %rcx
movq %rax, (%rcx)
leaq 0x98(%rdx), %r8
leaq 0x20(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x48(%rsp), %r9
movq %r12, %rdx
callq 0x7884a
cmpq $0x0, (%r12)
je 0x6e284
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
testq %rax, %rax
je 0x6e2b6
movq 0x46d16(%rip), %rcx     # 0xb4f90
cmpb $0x0, (%rcx)
je 0x6e2b2
incl 0x8(%rax)
jmp 0x6e2b6
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rax
movq %rcx, (%rsp)
movq %rax, 0x8(%rsp)
testq %rax, %rax
movq 0x30(%rsp), %rbx
je 0x6e2ff
movq 0x46ce8(%rip), %rcx     # 0xb4f90
cmpb $0x0, (%rcx)
je 0x6e2fb
incl 0x8(%rax)
jmp 0x6e2ff
lock
incl 0x8(%rax)
movq %rsp, %rdi
leaq 0x38(%rsp), %rsi
callq 0x3fdca
movq 0x10(%rsp), %rcx
addq $0x8, %rcx
movq %rsp, %rdx
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0x3cee2
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x3fdf4
movq %rsp, %rdi
callq 0x3fe06
movq 0x40(%rsp), %rdi
jmp 0x6e30f
lock
incl 0x8(%rax)
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x3fdca
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x6e319
callq 0x1e5bc
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x6e328
callq 0x1e5bc
leaq 0x48(%rsp), %rdi
callq 0x1ec5a
movq %rbx, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x8(%rsp), %rdi
jmp 0x6e363
movq %rax, %rbx
jmp 0x6e35e
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3fe06
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x6e36d
callq 0x1e5bc
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x6e383
callq 0x1e5bc
jmp 0x6e383
jmp 0x6e380
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x1ec5a
movq %rbx, %rdi
callq 0x106f0
nop