// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/instruction/instruction.cpp
// Function: SetI::evaluate(object_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const symbol_t SetI::evaluate(const object_t *scope, trace_t &stack_trace) const
{
	const symbol_t evalA = a->evaluate(scope, stack_trace);
	const symbol_t evalB = b->evaluate(scope, stack_trace);

	if (scope->hasValue(parser_t::HASH_SET) && ((evalA.getValueType() == value_type_enum::OBJECT && !evalA.getObject(&token, stack_trace)->hasValue(parser_t::HASH_SET)) || evalB.getValueType() == value_type_enum::OBJECT))
	{
		ptr_function_t f = nullptr;
		try
		{
			f = scope->getVariable(parser_t::HASH_SET, &token, stack_trace).getFunction({evalA, evalB}, &token, stack_trace);
		}
		catch (const rossa_error_t &e)
		{
		}
		if (f)
		{
			function_evaluate(f, {evalA, evalB}, &token, stack_trace);
			return evalA;
		}
	}
	evalA.set(&evalB, &token, stack_trace);
	return evalA;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
movq 0x90(%rsi), %rsi
movq (%rsi), %rax
callq *(%rax)
movq 0xa0(%r15), %rsi
movq (%rsi), %rax
leaq 0x10(%rsp), %rdi
movq %r13, %rdx
movq %r14, %rcx
callq *(%rax)
leaq 0x4605d(%rip), %rsi     # 0xb79d0
movq %r13, %rdi
callq 0x3d498
testb %al, %al
je 0x71b54
movq %rbx, %rdi
callq 0x41262
cmpl $-0x8, %eax
jne 0x719b2
leaq 0x8(%r15), %rsi
movq %rbx, %rdi
movq %r14, %rdx
callq 0x411a4
leaq 0x4602a(%rip), %rsi     # 0xb79d0
movq %rax, %rdi
callq 0x3d498
testb %al, %al
je 0x719c5
leaq 0x10(%rsp), %rdi
callq 0x41262
cmpl $-0x8, %eax
jne 0x71b54
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
leaq 0x8(%r15), %rdx
leaq 0x45ff8(%rip), %rsi     # 0xb79d0
movq %r13, %rdi
movq %rdx, 0x38(%rsp)
movq %r14, %rcx
callq 0x3d502
movq %rax, %r13
leaq 0x40(%rsp), %r12
movq %r12, %rbp
movq %r12, %rdi
movq %rbx, %rsi
callq 0x404c8
leaq 0x50(%rsp), %rbp
leaq 0x10(%rsp), %rsi
movq %rbp, %rdi
callq 0x404c8
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x7(%rsp), %rcx
movl $0x2, %edx
callq 0x43e3c
leaq 0x78(%rsp), %rdi
leaq 0x60(%rsp), %rdx
movq %r13, %rsi
movq 0x38(%rsp), %r13
movq %r13, %rcx
movq %r14, %r8
callq 0x41626
leaq 0x80(%rsp), %r12
movq -0x8(%r12), %rax
leaq 0x28(%rsp), %rdi
movq %rax, -0x8(%rdi)
movq %r12, %rsi
callq 0x37c6e
movq (%r12), %rdi
testq %rdi, %rdi
je 0x71a72
callq 0x1e6ee
leaq 0x60(%rsp), %rdi
callq 0x20a84
movl $0x10, %r12d
leaq (%rsp,%r12), %rdi
addq $0x40, %rdi
callq 0x404da
addq $-0x10, %r12
cmpq $-0x10, %r12
jne 0x71a82
cmpq $0x0, 0x20(%rsp)
je 0x71b45
leaq 0x40(%rsp), %r12
movq %r12, %r15
movq %r12, %rdi
movq %rbx, %rsi
callq 0x404c8
leaq 0x50(%rsp), %r15
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
callq 0x404c8
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x78(%rsp), %rcx
movl $0x2, %edx
callq 0x43e3c
leaq 0x88(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x60(%rsp), %rdx
movq %r13, %rcx
movq %r14, %r8
callq 0x24a66
leaq 0x88(%rsp), %rdi
callq 0x404da
leaq 0x60(%rsp), %rdi
callq 0x20a84
movl $0x10, %r14d
leaq (%rsp,%r14), %rdi
addq $0x40, %rdi
callq 0x404da
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x71b1d
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x71b6b
callq 0x1e6ee
jmp 0x71b6b
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x71b54
callq 0x1e6ee
addq $0x8, %r15
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x40674
leaq 0x10(%rsp), %rdi
callq 0x404da
movq %rbx, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
leaq 0x60(%rsp), %rdi
callq 0x20a84
jmp 0x71b9c
movq %rax, %r13
movl $0x10, %r14d
leaq (%rsp,%r14), %rdi
addq $0x40, %rdi
callq 0x404da
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x71ba2
jmp 0x71c1e
movq %rdx, 0x8(%rsp)
movq %rax, %r13
leaq 0x60(%rsp), %rdi
callq 0x20a84
jmp 0x71bd7
movq %rdx, 0x8(%rsp)
movq %rax, %r13
movl $0x10, %r12d
leaq (%rsp,%r12), %rdi
addq $0x40, %rdi
callq 0x404da
addq $-0x10, %r12
cmpq $-0x10, %r12
jne 0x71bdd
jmp 0x71c52
movq %rdx, 0x8(%rsp)
movq %rax, %r13
jmp 0x71c52
movq %rax, %r13
cmpq %r15, %r12
je 0x71c1e
leaq 0x40(%rsp), %r14
addq $-0x10, %r15
movq %r15, %rdi
callq 0x404da
cmpq %r14, %r15
jne 0x71c0d
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x71c7d
callq 0x1e6ee
jmp 0x71c7d
movq %rdx, 0x8(%rsp)
movq %rax, %r13
cmpq %rbp, %r12
je 0x71c52
leaq 0x40(%rsp), %r12
addq $-0x10, %rbp
movq %rbp, %rdi
callq 0x404da
cmpq %r12, %rbp
jne 0x71c41
cmpl $0x1, 0x8(%rsp)
jne 0x71c1e
movq %r13, %rdi
callq 0x101a0
callq 0x10690
movq 0x38(%rsp), %r13
jmp 0x71a99
movq %rax, %r13
jmp 0x71c1e
movq %rax, %r13
jmp 0x71c87
movq %rax, %r13
leaq 0x10(%rsp), %rdi
callq 0x404da
movq %rbx, %rdi
callq 0x404da
movq %r13, %rdi
callq 0x106f0
nop