// File: /workspace/github_cpp_makefile_star2_O1/Nallantli[P]Rossa/main/rossa/operation/operation.cpp
// Function: operation::band(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::band(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::NUMBER, value_type_enum::NUMBER):
		return symbol_t::Number(evalA.getNumber(token, stack_trace) & evalB.getNumber(token, stack_trace));
	case COMP(value_type_enum::BOOLEAN_D, value_type_enum::BOOLEAN_D):
		return symbol_t::Boolean(evalA.getBool(token, stack_trace) & evalB.getBool(token, stack_trace));
	case COMP(value_type_enum::STRING, value_type_enum::ARRAY):
	{
		std::vector<std::string> elems;
		for (const symbol_t &e : evalB.getVector(token, stack_trace))
			elems.push_back(e.toString(token, stack_trace));
		return symbol_t::String(util::format(evalA.getString(token, stack_trace), elems));
	}
	case COMP(value_type_enum::ARRAY, value_type_enum::ARRAY):
	{
		auto av = evalA.getVector(token, stack_trace);
		auto bv = evalB.getVector(token, stack_trace);
		if (av.size() != bv.size())
			throw rossa_error_t(_INCOMPATIBLE_VECTOR_SIZES_, *token, stack_trace);
		std::vector<symbol_t> v(av.size());
		for (size_t i = 0; i < v.size(); i++)
			v[i] = band(scope, av[i], bv[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_B_AND))
			return o->getVariable(parser_t::HASH_B_AND, token, stack_trace).call({evalB}, token, stack_trace);
	}
	default:
		if (scope != NULL)
			return scope->getVariable(parser_t::HASH_B_AND, token, stack_trace).call({evalA, evalB}, 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 %r9, %r14
movq %r8, %r15
movq %rcx, %rbp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, 0x28(%rsp)
movq %rdx, %rdi
callq 0x41262
movl $0xfffffff8, %ecx       # imm = 0xFFFFFFF8
cmpl $-0x8, %eax
je 0x806d3
movq %r13, %rdi
callq 0x41262
movl %eax, %ebx
shll $0x18, %ebx
negl %ebx
sarl $0x14, %ebx
movq %rbp, %rdi
callq 0x41262
negb %al
movsbl %al, %ecx
orl %ebx, %ecx
cmpl $0x32, %ecx
jle 0x807fd
cmpl $0x33, %ecx
je 0x80853
cmpl $0x45, %ecx
je 0x80889
cmpl $0x55, %ecx
jne 0x80a24
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x40f46
leaq 0x38(%rsp), %rdi
movq %rax, %rsi
callq 0x43f8e
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x40f46
leaq 0x60(%rsp), %rdi
movq %rax, %rsi
callq 0x43f8e
movq 0x40(%rsp), %rsi
subq 0x38(%rsp), %rsi
movq 0x68(%rsp), %rax
subq 0x60(%rsp), %rax
cmpq %rax, %rsi
jne 0x80b8c
sarq $0x4, %rsi
leaq 0x8(%rsp), %rdi
leaq 0x80(%rsp), %rdx
callq 0x43baa
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
je 0x807cb
xorl %ebx, %ebx
leaq 0x80(%rsp), %r13
xorl %ebp, %ebp
movq 0x38(%rsp), %rdx
addq %rbx, %rdx
movq 0x60(%rsp), %rcx
addq %rbx, %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %r8
movq %r14, %r9
callq 0x8067b
movq 0x8(%rsp), %rdi
addq %rbx, %rdi
movq %r13, %rsi
callq 0x40508
movq %r13, %rdi
callq 0x404da
movq 0x10(%rsp), %rax
subq 0x8(%rsp), %rax
incq %rbp
sarq $0x4, %rax
addq $0x10, %rbx
cmpq %rax, %rbp
jb 0x80778
leaq 0x8(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x40474
leaq 0x8(%rsp), %rdi
callq 0x20a84
leaq 0x60(%rsp), %rdi
callq 0x20a84
leaq 0x38(%rsp), %rdi
callq 0x20a84
jmp 0x80ac3
cmpl $-0x8, %ecx
je 0x80987
cmpl $0x22, %ecx
jne 0x80a24
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x40b0c
movq %rax, %rbx
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x40b0c
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4801e
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movl %edx, 0x8(%rsi)
movq 0x28(%rsp), %rdi
callq 0x40458
jmp 0x80ac3
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x410e2
movl %eax, %ebx
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x410e2
andb %bl, %al
leaq 0x8(%rsp), %rsi
movb %al, (%rsi)
movq 0x28(%rsp), %rdi
callq 0x40466
jmp 0x80ac3
movq %r13, 0x58(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x60(%rsp)
movq $0x0, 0x70(%rsp)
movq %rbp, %rdi
movq %r15, %r13
movq %r15, %rsi
movq %r14, %r15
movq %r14, %rdx
callq 0x40f46
movq (%rax), %r12
movq 0x8(%rax), %r14
cmpq %r14, %r12
je 0x8090a
leaq 0x8(%rsp), %rbp
leaq 0x60(%rsp), %rbx
movq %rbp, %rdi
movq %r12, %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x41a70
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x20e04
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x80901
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x103d0
addq $0x10, %r12
cmpq %r14, %r12
jne 0x808c9
leaq 0x38(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq %r13, %rdx
movq %r15, %rcx
callq 0x41004
leaq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x60(%rsp), %rdx
callq 0x48694
leaq 0x8(%rsp), %rsi
movq 0x28(%rsp), %rdi
callq 0x404ac
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x8095d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x103d0
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x80978
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x103d0
leaq 0x60(%rsp), %rdi
callq 0x1dca2
jmp 0x80ac3
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x411a4
movq %rax, %rbx
leaq 0x36fc9(%rip), %rsi     # 0xb7968
movq %rax, %rdi
callq 0x3d498
testb %al, %al
je 0x80a24
movb %al, 0x58(%rsp)
leaq 0x36fb2(%rip), %rsi     # 0xb7968
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x3d502
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
movq %rbp, %rsi
callq 0x404c8
leaq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x60(%rsp), %rcx
movl $0x1, %edx
callq 0x43e3c
leaq 0x8(%rsp), %rdx
movq 0x28(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rcx
movq %r14, %r8
callq 0x42736
leaq 0x8(%rsp), %rdi
callq 0x20a84
leaq 0x38(%rsp), %rdi
callq 0x404da
cmpb $0x0, 0x58(%rsp)
jne 0x80ac3
testq %r12, %r12
je 0x80ada
leaq 0x36f34(%rip), %rsi     # 0xb7968
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x3d502
movq %rax, 0x58(%rsp)
leaq 0x8(%rsp), %r12
movq %r12, %rbx
movq %r12, %rdi
movq %r13, %rsi
callq 0x404c8
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x404c8
leaq 0x38(%rsp), %rdi
leaq 0x8(%rsp), %rsi
leaq 0x60(%rsp), %rcx
movl $0x2, %edx
callq 0x43e3c
leaq 0x38(%rsp), %rdx
movq 0x28(%rsp), %rdi
movq 0x58(%rsp), %rsi
movq %r15, %rcx
movq %r14, %r8
callq 0x42736
leaq 0x38(%rsp), %rdi
callq 0x20a84
movl $0x10, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x8, %rdi
callq 0x404da
addq $-0x10, %rbx
cmpq $-0x10, %rbx
jne 0x80aac
movq 0x28(%rsp), %rax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xa8, %edi
callq 0x101e0
movq %rax, %r12
leaq 0x48(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x7db4(%rip), %rsi      # 0x888ab
leaq 0x7ddf(%rip), %rdx      # 0x888dd
leaq 0x38(%rsp), %rdi
callq 0x1e7ca
leaq 0x70(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x6079(%rip), %rsi      # 0x86b91
leaq 0x6073(%rip), %rdx      # 0x86b92
leaq 0x60(%rsp), %rdi
callq 0x1e7ca
leaq 0x80(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x37(%rsp), %rcx
movl $0x1, %edx
callq 0x20c5e
leaq 0x8(%rsp), %rdi
leaq 0x38(%rsp), %rsi
leaq 0x80(%rsp), %rdx
callq 0x48694
movb $0x1, %bpl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x476dc
xorl %ebp, %ebp
leaq 0x32165(%rip), %rsi     # 0xb2ce0
leaq -0x493ce(%rip), %rdx    # 0x377b4
movq %r12, %rdi
callq 0x106d0
jmp 0x80be7
movl $0xa8, %edi
callq 0x101e0
movq %rax, %r12
leaq 0x18(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x7c41(%rip), %rsi      # 0x887ea
leaq 0x7c61(%rip), %rdx      # 0x88811
leaq 0x8(%rsp), %rdi
callq 0x1e7ca
movb $0x1, %bl
leaq 0x8(%rsp), %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x476dc
xorl %ebx, %ebx
leaq 0x32108(%rip), %rsi     # 0xb2ce0
leaq -0x4942b(%rip), %rdx    # 0x377b4
movq %r12, %rdi
callq 0x106d0
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x80c0d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x80c0d
movq %rax, %r14
movb $0x1, %bpl
leaq 0x80(%rsp), %rdi
callq 0x1dca2
jmp 0x80c22
movq %rax, %r14
movb $0x1, %bpl
movq 0x60(%rsp), %rdi
cmpq %r13, %rdi
je 0x80c41
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x80c41
movq %rax, %r14
movb $0x1, %bpl
movq 0x38(%rsp), %rdi
cmpq %rbx, %rdi
je 0x80cbf
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x80cbf
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x80c7b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x80c7b
movq %rax, %r14
movb $0x1, %bl
testb %bl, %bl
je 0x80d9f
movq %r12, %rdi
callq 0x102d0
jmp 0x80d9f
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x20a84
jmp 0x80ca2
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x404da
jmp 0x80de3
movq %rax, %r14
jmp 0x80de3
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
je 0x80de3
movq %r12, %rdi
callq 0x102d0
jmp 0x80de3
jmp 0x80d80
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x80cfd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x80cfd
movq %rax, %r14
leaq 0x48(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x80dd9
movq 0x48(%rsp), %rsi
jmp 0x80dd1
jmp 0x80db5
movq %rax, %r14
jmp 0x80d9f
jmp 0x80db5
movq %rax, %r14
leaq 0x38(%rsp), %rdi
callq 0x20a84
jmp 0x80d3a
movq %rax, %r14
movl $0x10, %ebx
leaq (%rsp,%rbx), %rdi
addq $0x8, %rdi
callq 0x404da
addq $-0x10, %rbx
cmpq $-0x10, %rbx
jne 0x80d3f
jmp 0x80de3
movq %rax, %r14
jmp 0x80da9
movq %rax, %r14
cmpq %rbx, %r12
je 0x80de3
leaq 0x8(%rsp), %r15
addq $-0x10, %rbx
movq %rbx, %rdi
callq 0x404da
cmpq %r15, %rbx
jne 0x80d6d
jmp 0x80de3
movq %rax, %r14
jmp 0x80d95
movq %rax, %r14
leaq 0x80(%rsp), %rdi
callq 0x404da
leaq 0x8(%rsp), %rdi
callq 0x20a84
leaq 0x60(%rsp), %rdi
callq 0x20a84
leaq 0x38(%rsp), %rdi
callq 0x20a84
jmp 0x80de3
movq %rax, %r14
jmp 0x80dd9
movq %rax, %r14
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x80dd9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x103d0
leaq 0x60(%rsp), %rdi
callq 0x1dca2
movq %r14, %rdi
callq 0x106f0