// File: /workspace/github_cpp_makefile_star2_O3/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 $0x88, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rcx, %rbp
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, 0x20(%rsp)
movq %rdx, %rdi
callq 0x40b5a
cmpl $-0x8, %eax
jne 0x7f274
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x40a9e
movq %rax, %rbx
leaq 0x3676d(%rip), %rsi     # 0xb5968
movq %rax, %rdi
callq 0x3ce6c
testb %al, %al
je 0x7f400
leaq 0x36756(%rip), %rsi     # 0xb5968
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x3ced2
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
movq %rbp, %rsi
callq 0x3fdf4
movq %rsp, %rdi
leaq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rcx
movl $0x1, %edx
callq 0x436ac
movq %rsp, %rdx
movq 0x20(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rcx
movq %r14, %r8
callq 0x41ffe
movq %rsp, %rdi
callq 0x20952
leaq 0x30(%rsp), %rdi
callq 0x3fe06
jmp 0x7f48a
movq %r13, %rdi
callq 0x40b5a
movl %eax, %ebx
shll $0x18, %ebx
negl %ebx
sarl $0x14, %ebx
movq %rbp, %rdi
callq 0x40b5a
negb %al
movsbl %al, %eax
orl %ebx, %eax
cmpl $0x32, %eax
jle 0x7f3b0
cmpl $0x33, %eax
je 0x7f4a1
cmpl $0x45, %eax
je 0x7f4d2
cmpl $0x55, %eax
jne 0x7f400
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x40848
leaq 0x30(%rsp), %rdi
movq %rax, %rsi
callq 0x437fe
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x40848
leaq 0x50(%rsp), %rdi
movq %rax, %rsi
callq 0x437fe
movq 0x38(%rsp), %rsi
subq 0x30(%rsp), %rsi
movq 0x58(%rsp), %rax
subq 0x50(%rsp), %rax
cmpq %rax, %rsi
jne 0x7f661
sarq $0x4, %rsi
movq %rsp, %rdi
leaq 0x70(%rsp), %rdx
callq 0x43418
movq 0x8(%rsp), %rax
cmpq (%rsp), %rax
je 0x7f382
xorl %ebx, %ebx
leaq 0x70(%rsp), %r13
xorl %ebp, %ebp
movq 0x30(%rsp), %rdx
addq %rbx, %rdx
movq 0x50(%rsp), %rcx
addq %rbx, %rcx
movq %r13, %rdi
movq %r12, %rsi
movq %r15, %r8
movq %r14, %r9
callq 0x7f1ad
movq (%rsp), %rdi
addq %rbx, %rdi
movq %r13, %rsi
callq 0x3fe28
movq %r13, %rdi
callq 0x3fe06
movq 0x8(%rsp), %rax
subq (%rsp), %rax
incq %rbp
sarq $0x4, %rax
addq $0x10, %rbx
cmpq %rax, %rbp
jb 0x7f331
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x3fda0
movq %rsp, %rdi
callq 0x20952
leaq 0x50(%rsp), %rdi
callq 0x20952
leaq 0x30(%rsp), %rdi
callq 0x20952
jmp 0x7f48a
cmpl $-0x8, %eax
je 0x7f1e3
cmpl $0x22, %eax
jne 0x7f400
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x40416
movq %rax, %rbx
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x40416
movq %rbx, %rdi
movq %rax, %rsi
callq 0x47740
movq %rsp, %rsi
movq %rax, (%rsi)
movl %edx, 0x8(%rsi)
movq 0x20(%rsp), %rdi
callq 0x3fd84
jmp 0x7f48a
testq %r12, %r12
je 0x7f5b9
leaq 0x36558(%rip), %rsi     # 0xb5968
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x3ced2
movq %rax, %rbx
movq %rsp, %rdi
movq %r13, %rsi
callq 0x3fdf4
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x3fdf4
leaq 0x30(%rsp), %rdi
movq %rsp, %rsi
leaq 0x50(%rsp), %rcx
movl $0x2, %edx
callq 0x436ac
leaq 0x30(%rsp), %rdx
movq 0x20(%rsp), %rdi
movq %rbx, %rsi
movq %r15, %rcx
movq %r14, %r8
callq 0x41ffe
leaq 0x30(%rsp), %rdi
callq 0x20952
movl $0x10, %ebx
leaq (%rsp,%rbx), %rdi
callq 0x3fe06
addq $-0x10, %rbx
cmpq $-0x10, %rbx
jne 0x7f477
movq 0x20(%rsp), %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x409e0
movl %eax, %ebx
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x409e0
andb %bl, %al
movq %rsp, %rsi
movb %al, (%rsi)
movq 0x20(%rsp), %rdi
callq 0x3fd92
jmp 0x7f48a
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movq $0x0, 0x60(%rsp)
movq %rbp, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x40848
movq (%rax), %r12
movq 0x8(%rax), %rbx
cmpq %rbx, %r12
je 0x7f542
movq %rsp, %rbp
movq %rbp, %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x41338
leaq 0x50(%rsp), %rdi
movq %rbp, %rsi
callq 0x20cde
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7f539
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x103d0
addq $0x10, %r12
cmpq %rbx, %r12
jne 0x7f500
leaq 0x30(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x40904
movq %rsp, %rdi
leaq 0x30(%rsp), %rsi
leaq 0x50(%rsp), %rdx
callq 0x47db4
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x3fdd8
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7f58f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x103d0
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7f5aa
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x103d0
leaq 0x50(%rsp), %rdi
callq 0x1db60
jmp 0x7f48a
movl $0xa8, %edi
callq 0x101e0
movq %rax, %r12
leaq 0x40(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x82f5(%rip), %rsi      # 0x878cb
leaq 0x8320(%rip), %rdx      # 0x878fd
leaq 0x30(%rsp), %rdi
callq 0x1e698
leaq 0x60(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x65ba(%rip), %rsi      # 0x85bb1
leaq 0x65b4(%rip), %rdx      # 0x85bb2
leaq 0x50(%rsp), %rdi
callq 0x1e698
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x2f(%rsp), %rcx
movl $0x1, %edx
callq 0x20b38
movq %rsp, %rdi
leaq 0x30(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x47db4
movb $0x1, %bpl
movq %rsp, %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x46e88
xorl %ebp, %ebp
leaq 0x316d0(%rip), %rsi     # 0xb0d20
leaq -0x483b3(%rip), %rdx    # 0x372a4
movq %r12, %rdi
callq 0x106d0
jmp 0x7f6b9
movl $0xa8, %edi
callq 0x101e0
movq %rax, %r12
leaq 0x10(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x818c(%rip), %rsi      # 0x8780a
leaq 0x81ac(%rip), %rdx      # 0x87831
movq %rsp, %rdi
callq 0x1e698
movb $0x1, %bpl
movq %rsp, %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x46e88
xorl %ebp, %ebp
leaq 0x31676(%rip), %rsi     # 0xb0d20
leaq -0x4840d(%rip), %rdx    # 0x372a4
movq %r12, %rdi
callq 0x106d0
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7f6df
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x7f6df
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x70(%rsp), %rdi
callq 0x1db60
jmp 0x7f724
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x7f704
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x103d0
testb %bpl, %bpl
jne 0x7f711
jmp 0x7f861
movq %rax, %rbx
movq %r12, %rdi
callq 0x102d0
jmp 0x7f861
movq %rax, %rbx
movb $0x1, %bpl
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x7f740
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x103d0
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x7f757
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x103d0
testb %bpl, %bpl
jne 0x7f7e2
jmp 0x7f8a4
jmp 0x7f847
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7f78d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x7f78d
movq %rax, %rbx
leaq 0x40(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7f89a
movq 0x40(%rsp), %rsi
jmp 0x7f892
jmp 0x7f877
movq %rax, %rbx
jmp 0x7f861
jmp 0x7f877
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r13, %rdi
je 0x7f7e2
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x103d0
jmp 0x7f7e2
movq %rax, %rbx
jmp 0x7f86b
movq %rax, %rbx
movq %r12, %rdi
callq 0x102d0
jmp 0x7f8a4
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20952
jmp 0x7f7ff
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x7f83b
jmp 0x7f842
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20952
jmp 0x7f81a
movq %rax, %rbx
movl $0x10, %r14d
leaq (%rsp,%r14), %rdi
callq 0x3fe06
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x7f820
jmp 0x7f8a4
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3fe06
jmp 0x7f8a4
movq %rax, %rbx
jmp 0x7f8a4
movq %rax, %rbx
jmp 0x7f859
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x3fe06
movq %rsp, %rdi
callq 0x20952
leaq 0x50(%rsp), %rdi
callq 0x20952
leaq 0x30(%rsp), %rdi
callq 0x20952
jmp 0x7f8a4
movq %rax, %rbx
jmp 0x7f89a
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x7f89a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x103d0
leaq 0x50(%rsp), %rdi
callq 0x1db60
movq %rbx, %rdi
callq 0x106f0