// File: Nallantli[P]Rossa/main/rossa/instruction/instruction.cpp
// Function: EqualsI::evaluate(object_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&) const
const symbol_t EqualsI::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 (evalA.getValueType() == value_type_enum::OBJECT && !evalA.getObject(&token, stack_trace)->hasValue(parser_t::HASH_EQUALS))
		return scope->getVariable(parser_t::HASH_EQUALS, &token, stack_trace).call({evalA, evalB}, &token, stack_trace);

	return symbol_t::Boolean(evalA.equals(&evalB, &token, stack_trace));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0xc8(%rbp)
movq %rdi, %rax
movq %rax, -0xc0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
addq $0x90, %rdi
callq 0x2d300
movq %rax, %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq (%rsi), %rax
movq (%rax), %rax
leaq -0x30(%rbp), %rdi
callq *%rax
movq -0xb8(%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 -0x40(%rbp), %rdi
callq *%rax
jmp 0x12b646
leaq -0x30(%rbp), %rdi
callq 0x883e0
movl %eax, -0xcc(%rbp)
jmp 0x12b657
movl -0xcc(%rbp), %eax
cmpl $-0x8, %eax
jne 0x12b8db
movq -0xb8(%rbp), %rsi
addq $0x8, %rsi
movq -0x20(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x882f0
movq %rax, -0xd8(%rbp)
jmp 0x12b687
movq -0xd8(%rbp), %rdi
leaq 0xba4cb(%rip), %rsi     # 0x1e5b60
callq 0x7dd00
movb %al, -0xd9(%rbp)
jmp 0x12b6a2
movb -0xd9(%rbp), %al
testb $0x1, %al
jne 0x12b8db
jmp 0x12b6b2
movq -0xb8(%rbp), %rdx
movq -0x18(%rbp), %rdi
addq $0x8, %rdx
movq -0x20(%rbp), %rcx
leaq 0xba494(%rip), %rsi     # 0x1e5b60
callq 0x7ddd0
movq %rax, -0xe8(%rbp)
jmp 0x12b6da
leaq -0x98(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x86d80
jmp 0x12b6f3
leaq -0x88(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x86d80
jmp 0x12b70c
leaq -0x98(%rbp), %rax
movq %rax, -0x78(%rbp)
movq $0x2, -0x70(%rbp)
leaq -0xa1(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x2e2f0
movq -0xf0(%rbp), %rcx
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
leaq -0x68(%rbp), %rdi
callq 0x8c330
jmp 0x12b74c
movq -0xe8(%rbp), %rsi
movq -0xc8(%rbp), %rdi
movq -0xb8(%rbp), %rcx
addq $0x8, %rcx
movq -0x20(%rbp), %r8
leaq -0x68(%rbp), %rdx
callq 0x89e20
jmp 0x12b774
leaq -0x68(%rbp), %rdi
callq 0x2cf10
leaq -0xa1(%rbp), %rdi
callq 0x304d0
leaq -0x98(%rbp), %rax
movq %rax, -0x100(%rbp)
addq $0x20, %rax
movq %rax, -0xf8(%rbp)
movq -0xf8(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x108(%rbp)
callq 0x86dc0
movq -0x100(%rbp), %rcx
movq -0x108(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0xf8(%rbp)
jne 0x12b7a2
movl $0x1, -0xa8(%rbp)
jmp 0x12b92c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x12b957
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x12b94e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
movq -0xa0(%rbp), %rax
leaq -0x98(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x110(%rbp)
je 0x12b85b
movq -0x110(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x118(%rbp)
callq 0x86dc0
movq -0x118(%rbp), %rax
leaq -0x98(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x110(%rbp)
jne 0x12b82a
jmp 0x12b94e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x12b883
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x2cf10
leaq -0xa1(%rbp), %rdi
callq 0x304d0
leaq -0x98(%rbp), %rax
movq %rax, -0x128(%rbp)
addq $0x20, %rax
movq %rax, -0x120(%rbp)
movq -0x120(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x130(%rbp)
callq 0x86dc0
movq -0x128(%rbp), %rcx
movq -0x130(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x120(%rbp)
jne 0x12b8a8
jmp 0x12b94e
movq -0xb8(%rbp), %rdx
addq $0x8, %rdx
movq -0x20(%rbp), %rcx
leaq -0x30(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x8ace0
movb %al, -0x131(%rbp)
jmp 0x12b8ff
movq -0xc8(%rbp), %rdi
movb -0x131(%rbp), %al
andb $0x1, %al
movb %al, -0xa9(%rbp)
leaq -0xa9(%rbp), %rsi
callq 0x86c20
jmp 0x12b922
movl $0x1, -0xa8(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x86dc0
leaq -0x30(%rbp), %rdi
callq 0x86dc0
movq -0xc0(%rbp), %rax
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0x86dc0
leaq -0x30(%rbp), %rdi
callq 0x86dc0
movq -0x48(%rbp), %rdi
callq 0x119c0
nopl (%rax)