// File: 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
movq %rsp, %rbp
subq $0x290, %rsp            # imm = 0x290
movq %rdi, -0x1b8(%rbp)
movq %rdi, %rax
movq %rax, -0x1b0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x883e0
movl %eax, %ecx
movl %ecx, -0x1a8(%rbp)
subl $-0x8, %eax
je 0x14c641
jmp 0x14c46c
movl -0x1a8(%rbp), %eax
subl $-0x5, %eax
je 0x14c4b7
jmp 0x14c479
movl -0x1a8(%rbp), %eax
subl $-0x3, %eax
jne 0x14c727
jmp 0x14c48a
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x881f0
movq -0x1b8(%rbp), %rdi
xorb $-0x1, %al
andb $0x1, %al
movb %al, -0x29(%rbp)
leaq -0x29(%rbp), %rsi
callq 0x86c20
jmp 0x14cbb9
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x87fe0
movq %rax, %rsi
leaq -0x48(%rbp), %rdi
movq %rdi, -0x1d0(%rbp)
callq 0x8c650
movq -0x1d0(%rbp), %rdi
callq 0x30a90
movq %rax, -0x1c8(%rbp)
leaq -0x61(%rbp), %rdi
movq %rdi, -0x1c0(%rbp)
callq 0x2e2f0
movq -0x1c8(%rbp), %rsi
movq -0x1c0(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0x8bb50
jmp 0x14c517
leaq -0x61(%rbp), %rdi
callq 0x304d0
movq $0x0, -0x80(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x1d8(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x30a90
movq %rax, %rcx
movq -0x1d8(%rbp), %rax
cmpq %rcx, %rax
jae 0x14c601
movq -0x10(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movq -0x80(%rbp), %rsi
leaq -0x48(%rbp), %rdi
callq 0x8c3d0
movq -0x1e0(%rbp), %rsi
movq %rax, %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
leaq -0x90(%rbp), %rdi
callq 0x14c420
jmp 0x14c587
movq -0x80(%rbp), %rsi
leaq -0x60(%rbp), %rdi
callq 0x8c3d0
movq %rax, %rdi
leaq -0x90(%rbp), %rsi
callq 0x86e20
jmp 0x14c5a5
leaq -0x90(%rbp), %rdi
callq 0x86dc0
movq -0x80(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x80(%rbp)
jmp 0x14c528
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x61(%rbp), %rdi
callq 0x304d0
jmp 0x14c633
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x14c62a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x86dc0
jmp 0x14c62a
movq -0x1b8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x86c50
jmp 0x14c613
leaq -0x60(%rbp), %rdi
callq 0x2cf10
leaq -0x48(%rbp), %rdi
callq 0x2cf10
jmp 0x14cbb9
leaq -0x60(%rbp), %rdi
callq 0x2cf10
leaq -0x48(%rbp), %rdi
callq 0x2cf10
jmp 0x14cbc9
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x882f0
movq %rax, -0xa0(%rbp)
leaq -0xa0(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x98(%rbp), %rax
movq (%rax), %rdi
leaq 0x99518(%rip), %rsi     # 0x1e5b90
callq 0x7dd00
testb $0x1, %al
jne 0x14c686
jmp 0x14c725
movq -0x98(%rbp), %rax
movq (%rax), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x994f1(%rip), %rsi     # 0x1e5b90
callq 0x7ddd0
movq %rax, -0x1f0(%rbp)
xorps %xmm0, %xmm0
movaps %xmm0, -0xc0(%rbp)
movq $0x0, -0xb0(%rbp)
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x2cc30
movq -0x1b8(%rbp), %rdi
movq -0x1f0(%rbp), %rsi
movq -0x1e8(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
callq 0x89e20
jmp 0x14c6f7
leaq -0xc0(%rbp), %rdi
callq 0x2cf10
jmp 0x14cbb9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x2cf10
jmp 0x14cbc9
jmp 0x14c727
jmp 0x14c729
cmpq $0x0, -0x10(%rbp)
je 0x14c923
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x99449(%rip), %rsi     # 0x1e5b90
callq 0x7ddd0
movq %rax, -0x1f8(%rbp)
leaq -0xf8(%rbp), %rdi
movq %rdi, -0x100(%rbp)
movq -0x18(%rbp), %rsi
callq 0x86d80
jmp 0x14c76c
leaq -0xf8(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq $0x1, -0xe0(%rbp)
leaq -0x101(%rbp), %rdi
movq %rdi, -0x200(%rbp)
callq 0x2e2f0
movq -0x200(%rbp), %rcx
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
leaq -0xd8(%rbp), %rdi
callq 0x8c330
jmp 0x14c7bb
movq -0x1f8(%rbp), %rsi
movq -0x1b8(%rbp), %rdi
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
leaq -0xd8(%rbp), %rdx
callq 0x89e20
jmp 0x14c7df
leaq -0xd8(%rbp), %rdi
callq 0x2cf10
leaq -0x101(%rbp), %rdi
callq 0x304d0
leaq -0xf8(%rbp), %rax
movq %rax, -0x210(%rbp)
addq $0x10, %rax
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x218(%rbp)
callq 0x86dc0
movq -0x210(%rbp), %rcx
movq -0x218(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x208(%rbp)
jne 0x14c810
jmp 0x14cbb9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
movq -0x100(%rbp), %rax
leaq -0xf8(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x220(%rbp)
je 0x14c89d
movq -0x220(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x228(%rbp)
callq 0x86dc0
movq -0x228(%rbp), %rax
leaq -0xf8(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x220(%rbp)
jne 0x14c86c
jmp 0x14cbc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x14c8c8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x2cf10
leaq -0x101(%rbp), %rdi
callq 0x304d0
leaq -0xf8(%rbp), %rax
movq %rax, -0x238(%rbp)
addq $0x10, %rax
movq %rax, -0x230(%rbp)
movq -0x230(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x240(%rbp)
callq 0x86dc0
movq -0x238(%rbp), %rcx
movq -0x240(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x230(%rbp)
jne 0x14c8ed
jmp 0x14cbc9
movb $0x1, -0x1a4(%rbp)
movl $0xa8, %edi
callq 0x112b0
movq %rax, -0x250(%rbp)
leaq -0x149(%rbp), %rdi
movq %rdi, -0x248(%rbp)
callq 0x119d0
movq -0x248(%rbp), %rdx
leaq 0x89af(%rip), %rsi      # 0x15530b
leaq -0x148(%rbp), %rdi
callq 0x24740
jmp 0x14c96a
movb $0x1, -0x1a2(%rbp)
leaq -0x198(%rbp), %rax
movq %rax, -0x260(%rbp)
movq %rax, -0x1a0(%rbp)
leaq -0x1a1(%rbp), %rdi
movq %rdi, -0x258(%rbp)
callq 0x119d0
movq -0x260(%rbp), %rdi
movq -0x258(%rbp), %rdx
leaq 0x367d(%rip), %rsi      # 0x15002b
callq 0x24740
jmp 0x14c9b5
movb $0x0, -0x1a2(%rbp)
leaq -0x198(%rbp), %rax
movq %rax, -0x178(%rbp)
movq $0x1, -0x170(%rbp)
leaq -0x1a3(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x26e30
movq -0x268(%rbp), %rcx
movq -0x178(%rbp), %rsi
movq -0x170(%rbp), %rdx
leaq -0x168(%rbp), %rdi
callq 0x2d6a0
jmp 0x14ca0b
leaq -0x128(%rbp), %rdi
leaq -0x148(%rbp), %rsi
leaq -0x168(%rbp), %rdx
callq 0x9e250
jmp 0x14ca27
movq -0x250(%rbp), %rdi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq -0x128(%rbp), %rsi
callq 0x9c360
jmp 0x14ca44
movq -0x250(%rbp), %rdi
movb $0x0, -0x1a4(%rbp)
leaq 0x94227(%rip), %rsi     # 0x1e0c80
leaq -0xf20c0(%rip), %rdx    # 0x5a9a0
callq 0x11970
jmp 0x14cbd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x14cb94
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x14cb24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x14cacc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x14cac0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x11360
leaq -0x168(%rbp), %rdi
callq 0x25b00
leaq -0x1a3(%rbp), %rdi
callq 0x279c0
leaq -0x198(%rbp), %rax
movq %rax, -0x278(%rbp)
addq $0x20, %rax
movq %rax, -0x270(%rbp)
movq -0x270(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x280(%rbp)
callq 0x11360
movq -0x278(%rbp), %rcx
movq -0x280(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x270(%rbp)
jne 0x14caf1
jmp 0x14cb24
leaq -0x1a1(%rbp), %rdi
callq 0x11600
testb $0x1, -0x1a2(%rbp)
jne 0x14cb3b
jmp 0x14cb88
movq -0x1a0(%rbp), %rax
leaq -0x198(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x288(%rbp)
je 0x14cb86
movq -0x288(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x290(%rbp)
callq 0x11360
movq -0x290(%rbp), %rax
leaq -0x198(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x288(%rbp)
jne 0x14cb55
jmp 0x14cb88
leaq -0x148(%rbp), %rdi
callq 0x11360
leaq -0x149(%rbp), %rdi
callq 0x11600
testb $0x1, -0x1a4(%rbp)
jne 0x14cbab
jmp 0x14cbb7
movq -0x250(%rbp), %rdi
callq 0x11420
jmp 0x14cbc9
movq -0x1b0(%rbp), %rax
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq
movq -0x70(%rbp), %rdi
callq 0x119c0
nopw %cs:(%rax,%rax)