// File: /workspace/github_cpp_makefile_star2_O2/Nallantli[P]Rossa/main/rossa/operation/operation.cpp
// Function: operation::cct(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::cct(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::ARRAY, value_type_enum::ARRAY):
	{
		std::vector<symbol_t> valA = evalA.getVector(token, stack_trace);
		const std::vector<symbol_t> &valB = evalB.getVector(token, stack_trace);
		valA.insert(valA.end(), std::make_move_iterator(valB.begin()), std::make_move_iterator(valB.end()));
		return symbol_t::Array(valA);
	}
	case COMP(value_type_enum::DICTIONARY, value_type_enum::DICTIONARY):
	{
		std::map<const std::string, const symbol_t> valA = evalA.getDictionary(token, stack_trace);
		std::map<const std::string, const symbol_t> valB = evalB.getDictionary(token, stack_trace);
		valA.merge(valB);
		return symbol_t::Dictionary(valA);
	}
	case COMP(value_type_enum::STRING, value_type_enum::STRING):
		return symbol_t::String(evalA.getString(token, stack_trace) + evalB.getString(token, stack_trace));
	case value_type_enum::OBJECT:
	{
		const auto &o = evalA.getObject(token, stack_trace);
		if (o->hasValue(parser_t::HASH_CCT))
			return o->getVariable(parser_t::HASH_CCT, token, stack_trace).call({evalB}, token, stack_trace);
	}
	default:
		if (scope != NULL)
			return scope->getVariable(parser_t::HASH_CCT, 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 $0xa8, %rsp
movq %r9, %r14
movq %r8, %r15
movq %rcx, %r12
movq %rdx, %r13
movq %rsi, %rbp
movq %rdi, 0x8(%rsp)
movq %rdx, %rdi
callq 0x39ca6
cmpl $-0x8, %eax
jne 0x74fe2
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x39c02
movq %rax, %rbx
leaq 0x41ab6(%rip), %rsi     # 0xb6a18
movq %rax, %rdi
callq 0x366b2
testb %al, %al
je 0x75082
leaq 0x41a9f(%rip), %rsi     # 0xb6a18
movq %rbx, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x366ec
movq %rax, %r13
leaq 0x40(%rsp), %rdi
movq %r12, %rsi
callq 0x390f0
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0x70(%rsp), %rcx
callq 0x3ba84
movq 0x8(%rsp), %r12
leaq 0x10(%rsp), %rdx
movq %r12, %rdi
movq %r13, %rsi
movq %r15, %rcx
movq %r14, %r8
callq 0x3aa8c
leaq 0x10(%rsp), %rdi
callq 0x1f0b8
leaq 0x40(%rsp), %rdi
callq 0x39102
jmp 0x751f0
movq %r13, %rdi
callq 0x39ca6
movl %eax, %ebx
shll $0x18, %ebx
negl %ebx
sarl $0x14, %ebx
movq %r12, %rdi
callq 0x39ca6
negb %al
movsbl %al, %eax
orl %ebx, %eax
cmpl $-0x8, %eax
je 0x74f4a
cmpl $0x44, %eax
je 0x75118
cmpl $0x77, %eax
je 0x75184
cmpl $0x55, %eax
jne 0x75082
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x39a02
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x3bbc0
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x39a02
movq 0x8(%rsp), %r12
leaq 0x10(%rsp), %rdi
movq 0x8(%rdi), %rsi
movq (%rax), %rdx
movq 0x8(%rax), %rcx
callq 0x758a2
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x3909c
leaq 0x10(%rsp), %rdi
callq 0x1f0b8
jmp 0x751f0
testq %rbp, %rbp
je 0x75205
leaq 0x41986(%rip), %rsi     # 0xb6a18
movq %rbp, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x366ec
movq %rax, %rbp
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x390f0
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x390f0
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
pushq $0x2
popq %rdx
leaq 0x70(%rsp), %rcx
callq 0x3ba84
movq 0x8(%rsp), %r12
leaq 0x40(%rsp), %rdx
movq %r12, %rdi
movq %rbp, %rsi
movq %r15, %rcx
movq %r14, %r8
callq 0x3aa8c
leaq 0x40(%rsp), %rdi
callq 0x1f0b8
pushq $0x10
popq %rbx
leaq (%rsp,%rbx), %rdi
addq $0x10, %rdi
callq 0x39102
addq $-0x10, %rbx
cmpq $-0x10, %rbx
jne 0x750fc
jmp 0x751f0
leaq 0x40(%rsp), %rdi
movq %r13, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x39aa6
leaq 0x70(%rsp), %rdi
movq %r12, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x39aa6
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x70(%rsp), %rdx
callq 0x758ec
movq 0x8(%rsp), %r12
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
callq 0x390d4
leaq 0x10(%rsp), %rdi
callq 0x101d0
leaq 0x70(%rsp), %rdi
callq 0x101d0
leaq 0x40(%rsp), %rdi
callq 0x101d0
jmp 0x751f0
movq %r13, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x397e6
leaq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x3d37a
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x397e6
leaq 0x40(%rsp), %rdi
movq %rax, %rsi
callq 0x3d37a
leaq 0x10(%rsp), %rbx
leaq 0x40(%rsp), %rsi
movq %rbx, %rdi
callq 0x75c58
movq 0x8(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x390e2
leaq 0x40(%rsp), %rdi
callq 0x3bdb2
leaq 0x10(%rsp), %rdi
callq 0x3bdb2
movq %r12, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0xa8, %edi
callq 0x101f0
movq %rax, %r12
leaq 0x56aa(%rip), %rsi      # 0x7a8c3
leaq 0x40(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x1c814
leaq 0xdff(%rip), %rsi       # 0x7602e
leaq 0x70(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0x1c814
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
pushq $0x1
popq %rdx
leaq 0x5(%rsp), %rcx
callq 0x1f298
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x90(%rsp), %rdx
callq 0x3f724
movb $0x1, %bpl
leaq 0x10(%rsp), %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %r14, %rcx
callq 0x3ebb8
xorl %ebp, %ebp
leaq 0x3ca12(%rip), %rsi     # 0xb1ca0
leaq -0x45e23(%rip), %rdx    # 0x2f472
movq %r12, %rdi
callq 0x106c0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x101d0
jmp 0x752b2
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x90(%rsp), %rdi
callq 0x1cea0
jmp 0x752c7
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x70(%rsp), %rdi
callq 0x101d0
jmp 0x75308
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x3bdb2
jmp 0x75340
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x101d0
jmp 0x752f4
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0x101d0
jmp 0x7531f
jmp 0x7532e
movq %rax, %rbx
movb $0x1, %bpl
leaq 0x40(%rsp), %rdi
callq 0x101d0
testb %bpl, %bpl
jne 0x7534f
jmp 0x753b5
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x101d0
jmp 0x753b5
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1f0b8
jmp 0x753b5
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3bdb2
jmp 0x753b5
movq %rax, %rbx
movq %r12, %rdi
callq 0x102e0
jmp 0x753b5
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x1f0b8
jmp 0x7536b
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
jmp 0x753ab
jmp 0x753b2
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x1f0b8
jmp 0x75386
movq %rax, %rbx
pushq $0x10
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x10, %rdi
callq 0x39102
addq $-0x10, %r14
cmpq $-0x10, %r14
jne 0x7538a
jmp 0x753b5
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x39102
jmp 0x753b5
movq %rax, %rbx
movq %rbx, %rdi
callq 0x106f0