// File: 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
movq %rsp, %rbp
subq $0x200, %rsp            # imm = 0x200
movq %rdi, -0x140(%rbp)
movq %rdi, %rax
movq %rax, -0x148(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x138(%rbp)
movb $0x0, -0x21(%rbp)
addq $0x90, %rdi
callq 0x2d300
movq -0x140(%rbp), %rdi
movq %rax, %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq (%rsi), %rax
movq (%rax), %rax
callq *%rax
movq -0x138(%rbp), %rdi
addq $0xa0, %rdi
callq 0x2d300
movq %rax, %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x38(%rbp), %rdi
callq *%rax
jmp 0x12c88d
movq -0x18(%rbp), %rdi
leaq 0xb92d8(%rip), %rsi     # 0x1e5b70
callq 0x7dd00
movb %al, -0x149(%rbp)
jmp 0x12c8a5
movb -0x149(%rbp), %al
testb $0x1, %al
jne 0x12c8b4
jmp 0x12ce19
movq -0x140(%rbp), %rdi
callq 0x883e0
movl %eax, -0x150(%rbp)
jmp 0x12c8c8
movl -0x150(%rbp), %eax
cmpl $-0x8, %eax
jne 0x12c91e
movq -0x140(%rbp), %rdi
movq -0x138(%rbp), %rsi
addq $0x8, %rsi
movq -0x20(%rbp), %rdx
callq 0x882f0
movq %rax, -0x158(%rbp)
jmp 0x12c8f7
movq -0x158(%rbp), %rdi
leaq 0xb926b(%rip), %rsi     # 0x1e5b70
callq 0x7dd00
movb %al, -0x159(%rbp)
jmp 0x12c912
movb -0x159(%rbp), %al
testb $0x1, %al
jne 0x12c91e
jmp 0x12c93e
leaq -0x38(%rbp), %rdi
callq 0x883e0
movl %eax, -0x160(%rbp)
jmp 0x12c92f
movl -0x160(%rbp), %eax
cmpl $-0x8, %eax
jne 0x12ce19
xorl %eax, %eax
movl %eax, %esi
leaq -0x58(%rbp), %rdi
callq 0x8be00
movq -0x138(%rbp), %rdx
movq -0x18(%rbp), %rdi
addq $0x8, %rdx
movq -0x20(%rbp), %rcx
leaq 0xb920b(%rip), %rsi     # 0x1e5b70
callq 0x7ddd0
movq %rax, -0x168(%rbp)
jmp 0x12c973
movq -0x140(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x86d80
jmp 0x12c98f
leaq -0xa0(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
leaq -0x38(%rbp), %rsi
callq 0x86d80
jmp 0x12c9a8
leaq -0xb0(%rbp), %rax
movq %rax, -0x90(%rbp)
movq $0x2, -0x88(%rbp)
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x170(%rbp)
callq 0x2e2f0
movq -0x170(%rbp), %rcx
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq -0x80(%rbp), %rdi
callq 0x8c330
jmp 0x12c9f4
movq -0x168(%rbp), %rsi
movq -0x138(%rbp), %rcx
addq $0x8, %rcx
movq -0x20(%rbp), %r8
leaq -0x68(%rbp), %rdi
leaq -0x80(%rbp), %rdx
callq 0x88920
jmp 0x12ca19
leaq -0x58(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x8be20
leaq -0x68(%rbp), %rdi
callq 0x85eb0
leaq -0x80(%rbp), %rdi
callq 0x2cf10
leaq -0xb9(%rbp), %rdi
callq 0x304d0
leaq -0xb0(%rbp), %rax
movq %rax, -0x180(%rbp)
addq $0x20, %rax
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x188(%rbp)
callq 0x86dc0
movq -0x180(%rbp), %rcx
movq -0x188(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x178(%rbp)
jne 0x12ca5d
jmp 0x12cbc3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12ce80
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12ce59
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12cb9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movq -0xb8(%rbp), %rax
leaq -0xb0(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x190(%rbp)
je 0x12cb1d
movq -0x190(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x198(%rbp)
callq 0x86dc0
movq -0x198(%rbp), %rax
leaq -0xb0(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x190(%rbp)
jne 0x12caec
jmp 0x12cb9a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12cb42
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x2cf10
leaq -0xb9(%rbp), %rdi
callq 0x304d0
leaq -0xb0(%rbp), %rax
movq %rax, -0x1a8(%rbp)
addq $0x20, %rax
movq %rax, -0x1a0(%rbp)
movq -0x1a0(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x1b0(%rbp)
callq 0x86dc0
movq -0x1a8(%rbp), %rcx
movq -0x1b0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1a0(%rbp)
jne 0x12cb67
jmp 0x12cb9a
movl -0x44(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x12ce0e
movq -0x40(%rbp), %rdi
callq 0x11220
movq %rax, -0xc8(%rbp)
callq 0x11910
jmp 0x12cbc1
jmp 0x12cbc3
leaq -0x58(%rbp), %rdi
callq 0x8c3b0
testb $0x1, %al
jne 0x12cbd5
jmp 0x12cded
movq -0x140(%rbp), %rsi
leaq -0x120(%rbp), %rdi
movq %rdi, -0x128(%rbp)
callq 0x86d80
jmp 0x12cbf1
leaq -0x110(%rbp), %rdi
movq %rdi, -0x128(%rbp)
leaq -0x38(%rbp), %rsi
callq 0x86d80
jmp 0x12cc0a
leaq -0x120(%rbp), %rax
movq %rax, -0x100(%rbp)
movq $0x2, -0xf8(%rbp)
leaq -0x129(%rbp), %rdi
movq %rdi, -0x1b8(%rbp)
callq 0x2e2f0
movq -0x1b8(%rbp), %rcx
movq -0x100(%rbp), %rsi
movq -0xf8(%rbp), %rdx
leaq -0xf0(%rbp), %rdi
callq 0x8c330
jmp 0x12cc59
movq -0x138(%rbp), %rcx
addq $0x8, %rcx
movq -0x20(%rbp), %r8
leaq -0xd8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0xf0(%rbp), %rdx
callq 0x37a30
jmp 0x12cc81
leaq -0xd8(%rbp), %rdi
callq 0x86dc0
leaq -0xf0(%rbp), %rdi
callq 0x2cf10
leaq -0x129(%rbp), %rdi
callq 0x304d0
leaq -0x120(%rbp), %rax
movq %rax, -0x1c8(%rbp)
addq $0x20, %rax
movq %rax, -0x1c0(%rbp)
movq -0x1c0(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x86dc0
movq -0x1c8(%rbp), %rcx
movq -0x1d0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1c0(%rbp)
jne 0x12ccbe
movb $0x1, -0x21(%rbp)
movl $0x1, -0x130(%rbp)
jmp 0x12cdf7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12ce0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
movq -0x128(%rbp), %rax
leaq -0x120(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x1d8(%rbp)
je 0x12cd6a
movq -0x1d8(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x86dc0
movq -0x1e0(%rbp), %rax
leaq -0x120(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x1d8(%rbp)
jne 0x12cd39
jmp 0x12ce0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x12cd95
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x2cf10
leaq -0x129(%rbp), %rdi
callq 0x304d0
leaq -0x120(%rbp), %rax
movq %rax, -0x1f0(%rbp)
addq $0x20, %rax
movq %rax, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x1f8(%rbp)
callq 0x86dc0
movq -0x1f0(%rbp), %rcx
movq -0x1f8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x1e8(%rbp)
jne 0x12cdba
jmp 0x12ce0e
movl $0x0, -0x130(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x85eb0
movl -0x130(%rbp), %eax
testl %eax, %eax
jne 0x12ce48
jmp 0x12ce0c
jmp 0x12ce19
leaq -0x58(%rbp), %rdi
callq 0x85eb0
jmp 0x12ce59
movq -0x140(%rbp), %rdi
movq -0x138(%rbp), %rdx
addq $0x8, %rdx
movq -0x20(%rbp), %rcx
leaq -0x38(%rbp), %rsi
callq 0x870e0
jmp 0x12ce3a
movb $0x1, -0x21(%rbp)
movl $0x1, -0x130(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x86dc0
testb $0x1, -0x21(%rbp)
jne 0x12ce70
jmp 0x12ce64
leaq -0x38(%rbp), %rdi
callq 0x86dc0
jmp 0x12ce80
movq -0x140(%rbp), %rdi
callq 0x86dc0
movq -0x148(%rbp), %rax
addq $0x200, %rsp            # imm = 0x200
popq %rbp
retq
movq -0x140(%rbp), %rdi
callq 0x86dc0
movq -0x40(%rbp), %rdi
callq 0x119c0
nopw %cs:(%rax,%rax)