// File: Nallantli[P]Rossa/main/rossa/operation/operation.cpp
// Function: operation::bor(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::bor(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::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] = bor(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_OR))
			return o->getVariable(parser_t::HASH_B_OR, token, stack_trace).call({evalB}, token, stack_trace);
	}
	default:
		if (scope != NULL)
			return scope->getVariable(parser_t::HASH_B_OR, token, stack_trace).call({evalA, evalB}, token, stack_trace);
	}

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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3b0, %rsp            # imm = 0x3B0
movq %rdi, -0x258(%rbp)
movq %rdi, %rax
movq %rax, -0x250(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movq -0x18(%rbp), %rdi
callq 0x883e0
cmpl $-0x8, %eax
jne 0x14706f
movl $0xfffffff8, %eax       # imm = 0xFFFFFFF8
movl %eax, -0x25c(%rbp)
jmp 0x1470aa
movq -0x18(%rbp), %rdi
callq 0x883e0
movl %eax, %ecx
xorl %eax, %eax
subl %ecx, %eax
movsbl %al, %eax
shll $0x4, %eax
movl %eax, -0x260(%rbp)
movq -0x20(%rbp), %rdi
callq 0x883e0
movl %eax, %edx
movl -0x260(%rbp), %eax
xorl %ecx, %ecx
subl %edx, %ecx
movsbl %cl, %ecx
orl %ecx, %eax
movl %eax, -0x25c(%rbp)
movl -0x25c(%rbp), %eax
movl %eax, -0x264(%rbp)
subl $-0x8, %eax
je 0x1474ff
jmp 0x1470c1
movl -0x264(%rbp), %eax
subl $0x22, %eax
je 0x1470ef
jmp 0x1470ce
movl -0x264(%rbp), %eax
subl $0x33, %eax
je 0x147151
jmp 0x1470db
movl -0x264(%rbp), %eax
subl $0x55, %eax
je 0x1471ae
jmp 0x14774d
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x87a00
movq %rax, -0x270(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x87a00
movq -0x270(%rbp), %rdi
movq %rax, %rsi
callq 0x9d700
movq -0x258(%rbp), %rdi
movl %edx, -0x48(%rbp)
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x38(%rbp)
leaq -0x40(%rbp), %rsi
callq 0x86bf0
jmp 0x147c28
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x881f0
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x274(%rbp)
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x881f0
movq -0x258(%rbp), %rdi
movb %al, %cl
movl -0x274(%rbp), %eax
andb $0x1, %cl
movzbl %cl, %ecx
orl %ecx, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x51(%rbp)
leaq -0x51(%rbp), %rsi
callq 0x86c20
jmp 0x147c28
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x87fe0
movq %rax, %rsi
leaq -0x70(%rbp), %rdi
callq 0x8c650
movq -0x20(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x87fe0
movq %rax, -0x280(%rbp)
jmp 0x1471e5
movq -0x280(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x8c650
jmp 0x1471fa
leaq -0x70(%rbp), %rdi
callq 0x30a90
movq %rax, -0x288(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x30a90
movq %rax, %rcx
movq -0x288(%rbp), %rax
cmpq %rcx, %rax
je 0x147324
movb $0x1, -0xba(%rbp)
movl $0xa8, %edi
callq 0x112b0
movq %rax, -0x298(%rbp)
leaq -0xb9(%rbp), %rdi
movq %rdi, -0x290(%rbp)
callq 0x119d0
movq -0x290(%rbp), %rdx
leaq 0xdfe8(%rip), %rsi      # 0x15524a
leaq -0xb8(%rbp), %rdi
callq 0x24740
jmp 0x147270
movq -0x298(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0xb8(%rbp), %rsi
callq 0x9c360
jmp 0x14728d
movq -0x298(%rbp), %rdi
movb $0x0, -0xba(%rbp)
leaq 0x999de(%rip), %rsi     # 0x1e0c80
leaq -0xec909(%rip), %rdx    # 0x5a9a0
callq 0x11970
jmp 0x147c44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x1474f1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x1472fc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x11360
leaq -0xb9(%rbp), %rdi
callq 0x11600
testb $0x1, -0xba(%rbp)
jne 0x147313
jmp 0x14731f
movq -0x298(%rbp), %rdi
callq 0x11420
jmp 0x1474e5
leaq -0x70(%rbp), %rdi
callq 0x30a90
movq %rax, -0x2a8(%rbp)
leaq -0xd9(%rbp), %rdi
movq %rdi, -0x2a0(%rbp)
callq 0x2e2f0
movq -0x2a8(%rbp), %rsi
movq -0x2a0(%rbp), %rdx
leaq -0xd8(%rbp), %rdi
callq 0x8bb50
jmp 0x147363
leaq -0xd9(%rbp), %rdi
callq 0x304d0
movq $0x0, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0x2b0(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x30a90
movq %rax, %rcx
movq -0x2b0(%rbp), %rax
cmpq %rcx, %rax
jae 0x14749e
movq -0x10(%rbp), %rax
movq %rax, -0x2c0(%rbp)
movq -0xe8(%rbp), %rsi
leaq -0x70(%rbp), %rdi
callq 0x8c3d0
movq %rax, -0x2b8(%rbp)
movq -0xe8(%rbp), %rsi
leaq -0x88(%rbp), %rdi
callq 0x8c3d0
movq -0x2c0(%rbp), %rsi
movq -0x2b8(%rbp), %rdx
movq %rax, %rcx
movq -0x28(%rbp), %r8
movq -0x30(%rbp), %r9
leaq -0xf8(%rbp), %rdi
callq 0x147020
jmp 0x147403
movq -0xe8(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
callq 0x8c3d0
movq %rax, %rdi
leaq -0xf8(%rbp), %rsi
callq 0x86e20
jmp 0x147427
leaq -0xf8(%rbp), %rdi
callq 0x86dc0
movq -0xe8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xe8(%rbp)
jmp 0x14737a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xd9(%rbp), %rdi
callq 0x304d0
jmp 0x1474e5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x1474d9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x86dc0
jmp 0x1474d9
movq -0x258(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x86c50
jmp 0x1474b3
leaq -0xd8(%rbp), %rdi
callq 0x2cf10
leaq -0x88(%rbp), %rdi
callq 0x2cf10
leaq -0x70(%rbp), %rdi
callq 0x2cf10
jmp 0x147c28
leaq -0xd8(%rbp), %rdi
callq 0x2cf10
leaq -0x88(%rbp), %rdi
callq 0x2cf10
leaq -0x70(%rbp), %rdi
callq 0x2cf10
jmp 0x147c38
movq -0x18(%rbp), %rdi
movq -0x28(%rbp), %rsi
movq -0x30(%rbp), %rdx
callq 0x882f0
movq %rax, -0x108(%rbp)
leaq -0x108(%rbp), %rax
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
movq (%rax), %rdi
leaq 0x9e5da(%rip), %rsi     # 0x1e5b10
callq 0x7dd00
testb $0x1, %al
jne 0x147544
jmp 0x14774b
movq -0x100(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq 0x9e5b3(%rip), %rsi     # 0x1e5b10
callq 0x7ddd0
movq %rax, -0x2c8(%rbp)
leaq -0x140(%rbp), %rdi
movq %rdi, -0x148(%rbp)
movq -0x20(%rbp), %rsi
callq 0x86d80
jmp 0x147582
leaq -0x140(%rbp), %rax
movq %rax, -0x130(%rbp)
movq $0x1, -0x128(%rbp)
leaq -0x149(%rbp), %rdi
movq %rdi, -0x2d0(%rbp)
callq 0x2e2f0
movq -0x2d0(%rbp), %rcx
movq -0x130(%rbp), %rsi
movq -0x128(%rbp), %rdx
leaq -0x120(%rbp), %rdi
callq 0x8c330
jmp 0x1475d1
movq -0x2c8(%rbp), %rsi
movq -0x258(%rbp), %rdi
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
leaq -0x120(%rbp), %rdx
callq 0x89e20
jmp 0x1475f5
leaq -0x120(%rbp), %rdi
callq 0x2cf10
leaq -0x149(%rbp), %rdi
callq 0x304d0
leaq -0x140(%rbp), %rax
movq %rax, -0x2e0(%rbp)
addq $0x10, %rax
movq %rax, -0x2d8(%rbp)
movq -0x2d8(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x2e8(%rbp)
callq 0x86dc0
movq -0x2e0(%rbp), %rcx
movq -0x2e8(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x2d8(%rbp)
jne 0x147626
jmp 0x147c28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
movq -0x148(%rbp), %rax
leaq -0x140(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x2f0(%rbp)
je 0x1476b9
movq -0x2f0(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x2f8(%rbp)
callq 0x86dc0
movq -0x2f8(%rbp), %rax
leaq -0x140(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x2f0(%rbp)
jne 0x147688
jmp 0x147c38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x1476f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x2cf10
leaq -0x149(%rbp), %rdi
callq 0x304d0
leaq -0x140(%rbp), %rax
movq %rax, -0x308(%rbp)
addq $0x10, %rax
movq %rax, -0x300(%rbp)
movq -0x300(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x310(%rbp)
callq 0x86dc0
movq -0x308(%rbp), %rcx
movq -0x310(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x300(%rbp)
jne 0x147715
jmp 0x147c38
jmp 0x14774d
cmpq $0x0, -0x10(%rbp)
je 0x147972
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq 0x9e3a5(%rip), %rsi     # 0x1e5b10
callq 0x7ddd0
movq %rax, -0x318(%rbp)
leaq -0x198(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
movq -0x18(%rbp), %rsi
callq 0x86d80
jmp 0x147790
leaq -0x188(%rbp), %rdi
movq %rdi, -0x1a0(%rbp)
movq -0x20(%rbp), %rsi
callq 0x86d80
jmp 0x1477a9
leaq -0x198(%rbp), %rax
movq %rax, -0x178(%rbp)
movq $0x2, -0x170(%rbp)
leaq -0x1a1(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x2e2f0
movq -0x320(%rbp), %rcx
movq -0x178(%rbp), %rsi
movq -0x170(%rbp), %rdx
leaq -0x168(%rbp), %rdi
callq 0x8c330
jmp 0x1477f8
movq -0x318(%rbp), %rsi
movq -0x258(%rbp), %rdi
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %r8
leaq -0x168(%rbp), %rdx
callq 0x89e20
jmp 0x14781c
leaq -0x168(%rbp), %rdi
callq 0x2cf10
leaq -0x1a1(%rbp), %rdi
callq 0x304d0
leaq -0x198(%rbp), %rax
movq %rax, -0x330(%rbp)
addq $0x20, %rax
movq %rax, -0x328(%rbp)
movq -0x328(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x338(%rbp)
callq 0x86dc0
movq -0x330(%rbp), %rcx
movq -0x338(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x328(%rbp)
jne 0x14784d
jmp 0x147c28
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
movq -0x1a0(%rbp), %rax
leaq -0x198(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x340(%rbp)
je 0x1478e0
movq -0x340(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x348(%rbp)
callq 0x86dc0
movq -0x348(%rbp), %rax
leaq -0x198(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x340(%rbp)
jne 0x1478af
jmp 0x147c38
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x147917
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x2cf10
leaq -0x1a1(%rbp), %rdi
callq 0x304d0
leaq -0x198(%rbp), %rax
movq %rax, -0x358(%rbp)
addq $0x20, %rax
movq %rax, -0x350(%rbp)
movq -0x350(%rbp), %rdi
addq $-0x10, %rdi
movq %rdi, -0x360(%rbp)
callq 0x86dc0
movq -0x358(%rbp), %rcx
movq -0x360(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x350(%rbp)
jne 0x14793c
jmp 0x147c38
jmp 0x147974
movb $0x1, -0x244(%rbp)
movl $0xa8, %edi
callq 0x112b0
movq %rax, -0x370(%rbp)
leaq -0x1e9(%rbp), %rdi
movq %rdi, -0x368(%rbp)
callq 0x119d0
movq -0x368(%rbp), %rdx
leaq 0xd95e(%rip), %rsi      # 0x15530b
leaq -0x1e8(%rbp), %rdi
callq 0x24740
jmp 0x1479bb
movb $0x1, -0x242(%rbp)
leaq -0x238(%rbp), %rax
movq %rax, -0x380(%rbp)
movq %rax, -0x240(%rbp)
leaq -0x241(%rbp), %rdi
movq %rdi, -0x378(%rbp)
callq 0x119d0
movq -0x380(%rbp), %rdi
movq -0x378(%rbp), %rdx
leaq 0x8634(%rip), %rsi      # 0x150033
callq 0x24740
jmp 0x147a06
movb $0x0, -0x242(%rbp)
leaq -0x238(%rbp), %rax
movq %rax, -0x218(%rbp)
movq $0x1, -0x210(%rbp)
leaq -0x243(%rbp), %rdi
movq %rdi, -0x388(%rbp)
callq 0x26e30
movq -0x388(%rbp), %rcx
movq -0x218(%rbp), %rsi
movq -0x210(%rbp), %rdx
leaq -0x208(%rbp), %rdi
callq 0x2d6a0
jmp 0x147a5c
leaq -0x1c8(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
leaq -0x208(%rbp), %rdx
callq 0x9e250
jmp 0x147a78
movq -0x370(%rbp), %rdi
movq -0x28(%rbp), %rdx
movq -0x30(%rbp), %rcx
leaq -0x1c8(%rbp), %rsi
callq 0x9c360
jmp 0x147a95
movq -0x370(%rbp), %rdi
movb $0x0, -0x244(%rbp)
leaq 0x991d6(%rip), %rsi     # 0x1e0c80
leaq -0xed111(%rip), %rdx    # 0x5a9a0
callq 0x11970
jmp 0x147c44
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x147c03
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x147b93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x147b3b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x147b2f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x11360
leaq -0x208(%rbp), %rdi
callq 0x25b00
leaq -0x243(%rbp), %rdi
callq 0x279c0
leaq -0x238(%rbp), %rax
movq %rax, -0x398(%rbp)
addq $0x20, %rax
movq %rax, -0x390(%rbp)
movq -0x390(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x3a0(%rbp)
callq 0x11360
movq -0x398(%rbp), %rcx
movq -0x3a0(%rbp), %rax
cmpq %rcx, %rax
movq %rax, -0x390(%rbp)
jne 0x147b60
jmp 0x147b93
leaq -0x241(%rbp), %rdi
callq 0x11600
testb $0x1, -0x242(%rbp)
jne 0x147baa
jmp 0x147bf7
movq -0x240(%rbp), %rax
leaq -0x238(%rbp), %rcx
cmpq %rax, %rcx
movq %rax, -0x3a8(%rbp)
je 0x147bf5
movq -0x3a8(%rbp), %rdi
addq $-0x20, %rdi
movq %rdi, -0x3b0(%rbp)
callq 0x11360
movq -0x3b0(%rbp), %rax
leaq -0x238(%rbp), %rcx
cmpq %rcx, %rax
movq %rax, -0x3a8(%rbp)
jne 0x147bc4
jmp 0x147bf7
leaq -0x1e8(%rbp), %rdi
callq 0x11360
leaq -0x1e9(%rbp), %rdi
callq 0x11600
testb $0x1, -0x244(%rbp)
jne 0x147c1a
jmp 0x147c26
movq -0x370(%rbp), %rdi
callq 0x11420
jmp 0x147c38
movq -0x250(%rbp), %rax
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0x119c0
nopw %cs:(%rax,%rax)