// File: /workspace/github_cpp_makefile_star2_O2/Nallantli[P]Rossa/main/rossa/operation/operation.cpp
// Function: operation::unot(object_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::unot(const object_t *scope, const symbol_t &evalA, const token_t *token, trace_t &stack_trace)
{
	switch (evalA.getValueType())
	{
	case value_type_enum::BOOLEAN_D:
		return symbol_t::Boolean(!evalA.getBool(token, stack_trace));
	case value_type_enum::ARRAY:
	{
		auto av = evalA.getVector(token, stack_trace);
		std::vector<symbol_t> v(av.size());
		for (size_t i = 0; i < v.size(); i++)
			v[i] = unot(scope, av[i], token, stack_trace);
		return symbol_t::Array(v);
	}
	case value_type_enum::OBJECT:
	{
		const auto &o = evalA.getObject(token, stack_trace);
		if (o->hasValue(parser_t::HASH_NOT))
			return o->getVariable(parser_t::HASH_NOT, token, stack_trace).call({}, token, stack_trace);
	}
	default:
		break;
	}

	if (scope != NULL)
		return scope->getVariable(parser_t::HASH_NOT, token, stack_trace).call({evalA}, token, stack_trace);

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %r15
movq %rdx, %rdi
callq 0x39ca6
cmpl $-0x8, %eax
je 0x74cbd
cmpl $-0x5, %eax
je 0x74c24
cmpl $-0x3, %eax
jne 0x74d1c
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x39b5c
xorb $0x1, %al
leaq 0x10(%rsp), %rsi
movb %al, (%rsi)
movq %r15, %rdi
callq 0x3908e
jmp 0x74db3
movq %r15, 0x58(%rsp)
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x39a02
leaq 0x10(%rsp), %r13
movq %r13, %rdi
movq %rax, %rsi
callq 0x3bbc0
movq 0x8(%r13), %rsi
subq (%r13), %rsi
sarq $0x4, %rsi
leaq 0x38(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x3b8f4
xorl %ebp, %ebp
leaq 0x60(%rsp), %r13
xorl %r15d, %r15d
movq 0x40(%rsp), %rax
subq 0x38(%rsp), %rax
sarq $0x4, %rax
cmpq %rax, %r15
jae 0x74d8d
movq 0x10(%rsp), %rdx
addq %rbp, %rdx
movq %r13, %rdi
movq %r12, %rsi
movq %r14, %rcx
movq %rbx, %r8
callq 0x74bc1
movq 0x38(%rsp), %rdi
addq %rbp, %rdi
movq %r13, %rsi
callq 0x39122
movq %r13, %rdi
callq 0x39102
incq %r15
addq $0x10, %rbp
jmp 0x74c6c
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x39c02
movq %rax, %rbp
leaq 0x41d2b(%rip), %rsi     # 0xb6a00
movq %rax, %rdi
callq 0x366b2
testb %al, %al
je 0x74d1c
leaq 0x41d18(%rip), %rsi     # 0xb6a00
movq %rbp, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x366ec
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdx
movaps %xmm0, (%rdx)
andq $0x0, 0x10(%rdx)
movq %r15, %rdi
movq %rax, %rsi
movq %r14, %rcx
movq %rbx, %r8
callq 0x3aa8c
jmp 0x74da9
testq %r12, %r12
je 0x74dc8
leaq 0x41cd4(%rip), %rsi     # 0xb6a00
movq %r12, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x366ec
movq %rax, %r12
leaq 0x38(%rsp), %rdi
movq %r13, %rsi
callq 0x390f0
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0x60(%rsp), %rcx
callq 0x3ba84
leaq 0x10(%rsp), %rdx
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rcx
movq %rbx, %r8
callq 0x3aa8c
leaq 0x10(%rsp), %rdi
callq 0x1f0b8
leaq 0x38(%rsp), %rdi
callq 0x39102
jmp 0x74db3
leaq 0x38(%rsp), %rsi
movq 0x58(%rsp), %r15
movq %r15, %rdi
callq 0x3909c
leaq 0x38(%rsp), %rdi
callq 0x1f0b8
leaq 0x10(%rsp), %rdi
callq 0x1f0b8
movq %r15, %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xa8, %edi
callq 0x101f0
movq %rax, %r15
leaq 0x5ae7(%rip), %rsi      # 0x7a8c3
leaq 0x38(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x1c814
leaq 0x1255(%rip), %rsi      # 0x76047
leaq 0x60(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0x1c814
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0xd(%rsp), %rcx
callq 0x1f298
leaq 0x10(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x3f724
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x3ebb8
xorl %ebp, %ebp
leaq 0x3ce4f(%rip), %rsi     # 0xb1ca0
leaq -0x459e6(%rip), %rdx    # 0x2f472
movq %r15, %rdi
callq 0x106c0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x101d0
jmp 0x74e75
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x80(%rsp), %rdi
callq 0x1cea0
jmp 0x74e8a
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x60(%rsp), %rdi
callq 0x101d0
jmp 0x74e9c
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x38(%rsp), %rdi
callq 0x101d0
testb %bpl, %bpl
jne 0x74eb2
jmp 0x74f0c
jmp 0x74ebe
movq %rax, %rbx
movq %r15, %rdi
callq 0x102e0
jmp 0x74f0c
jmp 0x74ef5
movq %rax, %rbx
jmp 0x74f02
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1f0b8
jmp 0x74ed5
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x39102
jmp 0x74f0c
movq %rax, %rbx
jmp 0x74f0c
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x39102
jmp 0x74ef8
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x1f0b8
leaq 0x10(%rsp), %rdi
callq 0x1f0b8
movq %rbx, %rdi
callq 0x106f0