// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/operation/operation.cpp
// Function: operation::del(object_t const*, symbol_t const&, symbol_t const&, token_t const*, std::vector<std::pair<token_t, function_t>, std::allocator<std::pair<token_t, function_t>>>&)
const symbol_t operation::del(const object_t *scope, const symbol_t &evalA, const symbol_t &evalB, const token_t *token, trace_t &stack_trace)
{
	switch (COMP(evalA.getValueType(), evalB.getValueType()))
	{
	case COMP(value_type_enum::DICTIONARY, value_type_enum::STRING):
	{
		auto it = evalA.getDictionary(token, stack_trace).find(evalB.getString(token, stack_trace));
		evalA.getDictionary(token, stack_trace).erase(it);
		return evalA;
	}
	case value_type_enum::OBJECT:
	{
		const auto &o = evalA.getObject(token, stack_trace);
		if (o->hasValue(parser_t::HASH_DEL))
			return o->getVariable(parser_t::HASH_DEL, token, stack_trace).call({evalB}, token, stack_trace);
	}
	default:
		if (scope != NULL)
			return scope->getVariable(parser_t::HASH_DEL, token, stack_trace).call({evalA, evalB}, token, stack_trace);
	}

	throw rossa_error_t(util::format(_UNDECLARED_OPERATOR_ERROR_, {"delete"}), *token, stack_trace);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r9, %r15
movq %r8, %r14
movq %rcx, 0x10(%rsp)
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %r13
movq %rdx, %rdi
callq 0x41262
movl $0xfffffff8, %ecx       # imm = 0xFFFFFFF8
cmpl $-0x8, %eax
je 0x82d5d
movq %r12, %rdi
callq 0x41262
movl %eax, %ebx
shll $0x18, %ebx
negl %ebx
sarl $0x14, %ebx
movq 0x10(%rsp), %rdi
callq 0x41262
negb %al
movsbl %al, %ecx
orl %ebx, %ecx
cmpl $-0x8, %ecx
je 0x82df6
cmpl $0x74, %ecx
jne 0x82e99
movq %r13, %rbp
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x40cb8
movq %rax, %rbx
movq %r15, %rcx
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq 0x10(%rsp), %rsi
movq %r14, %r13
movq %r14, %rdx
movq %rcx, %r14
callq 0x41004
movq %rbx, %rdi
movq %r15, %rsi
callq 0x45ff0
movq %rax, %r15
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x82dca
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x103d0
movq %r12, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x40cb8
movq %rax, %rdi
movq %r15, %rsi
callq 0x83700
movq %rbp, %r13
movq %rbp, %rdi
movq %r12, %rsi
callq 0x404c8
jmp 0x82f3e
movq %r12, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x411a4
movq %rax, %rbx
leaq 0x34c02(%rip), %rsi     # 0xb7a10
movq %rax, %rdi
callq 0x3d498
testb %al, %al
je 0x82e99
movb %al, 0x38(%rsp)
leaq 0x34beb(%rip), %rsi     # 0xb7a10
movq %rbx, %rdi
movq %r14, %rdx
movq %r15, %rbx
movq %r15, %rcx
callq 0x3d502
movq %rax, %r15
leaq 0x40(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x404c8
leaq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x60(%rsp), %rcx
movl $0x1, %edx
callq 0x43e3c
leaq 0x18(%rsp), %rdx
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rcx
movq %rbx, %r15
movq %rbx, %r8
callq 0x42736
leaq 0x18(%rsp), %rdi
callq 0x20a84
leaq 0x40(%rsp), %rdi
callq 0x404da
cmpb $0x0, 0x38(%rsp)
jne 0x82f3e
testq %rbp, %rbp
je 0x82f53
leaq 0x34b67(%rip), %rsi     # 0xb7a10
movq %rbp, %rdi
movq %r14, 0x38(%rsp)
movq %r14, %rdx
movq %r15, %r14
movq %r15, %rcx
callq 0x3d502
movq %rax, %rbp
leaq 0x18(%rsp), %rbx
movq %rbx, %r15
movq %rbx, %rdi
movq %r12, %rsi
callq 0x404c8
leaq 0x28(%rsp), %r15
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x404c8
leaq 0x40(%rsp), %rdi
leaq 0x18(%rsp), %rsi
leaq 0x60(%rsp), %rcx
movl $0x2, %edx
callq 0x43e3c
leaq 0x40(%rsp), %rdx
movq %r13, %rdi
movq %rbp, %rsi
movq 0x38(%rsp), %rcx
movq %r14, %r8
callq 0x42736
leaq 0x40(%rsp), %rdi
callq 0x20a84
movl $0x10, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x18, %rdi
callq 0x404da
addq $-0x10, %rbx
cmpq $-0x10, %rbx
jne 0x82f27
movq %r13, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r15, %r13
movl $0xa8, %edi
callq 0x101e0
movq %rax, %r15
leaq 0x50(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x5938(%rip), %rsi      # 0x888ab
leaq 0x5963(%rip), %rdx      # 0x888dd
leaq 0x40(%rsp), %rdi
callq 0x1e7ca
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
leaq 0x1093(%rip), %rsi      # 0x84028
leaq 0x1092(%rip), %rdx      # 0x8402e
leaq 0x60(%rsp), %rdi
callq 0x1e7ca
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0xf(%rsp), %rcx
movl $0x1, %edx
callq 0x20c5e
leaq 0x18(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x48694
movb $0x1, %bpl
leaq 0x18(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %r13, %rcx
callq 0x476dc
xorl %ebp, %ebp
leaq 0x2fce8(%rip), %rsi     # 0xb2ce0
leaq -0x4b84b(%rip), %rdx    # 0x377b4
movq %r15, %rdi
callq 0x106d0
movq %rax, %r14
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8302d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x8302d
movq %rax, %r14
movb $0x1, %bpl
leaq 0x80(%rsp), %rdi
callq 0x1dca2
jmp 0x83042
movq %rax, %r14
movb $0x1, %bpl
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x83061
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x83061
movq %rax, %r14
movb $0x1, %bpl
movq 0x40(%rsp), %rdi
cmpq %rbx, %rdi
je 0x830a9
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x830a9
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x20a84
jmp 0x8308c
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x404da
jmp 0x83126
movq %rax, %r14
jmp 0x83126
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x83126
movq %r15, %rdi
callq 0x102d0
jmp 0x83126
movq %rax, %r14
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x83126
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x83126
movq %rax, %r14
leaq 0x40(%rsp), %rdi
callq 0x20a84
jmp 0x830ea
movq %rax, %r14
movl $0x10, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x18, %rdi
callq 0x404da
addq $-0x10, %rbx
cmpq $-0x10, %rbx
jne 0x830ef
jmp 0x83126
movq %rax, %r14
cmpq %r15, %rbx
je 0x83126
leaq 0x18(%rsp), %rbx
addq $-0x10, %r15
movq %r15, %rdi
callq 0x404da
cmpq %rbx, %r15
jne 0x83115
movq %r14, %rdi
callq 0x106f0