// File: /workspace/github_cpp_makefile_star2_O3/Nallantli[P]Rossa/main/rossa/global/global.cpp
// Function: global::convertToSymbol(mediator_t const&)
const symbol_t global::convertToSymbol(const mediator_t &m)
{
	switch (m.getType())
	{
	case MEDIATOR_NIL:
		return symbol_t();
	case MEDIATOR_BOOLEAN_D:
		return symbol_t::Boolean(COERCE_BOOLEAN(m));
	case MEDIATOR_NUMBER:
		return symbol_t::Number(COERCE_NUMBER(m));
	case MEDIATOR_STRING:
		return symbol_t::String(COERCE_STRING(m));
	case MEDIATOR_POINTER:
		return symbol_t::Pointer(COERCE_POINTER(m, void));
	case MEDIATOR_ARRAY:
	{
		std::vector<symbol_t> sv;
		for (auto &e : COERCE_ARRAY(m))
		{
			sv.push_back(convertToSymbol(e));
		}
		return symbol_t::Array(sv);
	}
	case DICTIONARY:
	{
		std::map<const std::string, const symbol_t> sd;
		for (auto &e : COERCE_DICTIONARY(m))
		{
			sd.insert({e.first, convertToSymbol(e.second)});
		}
		return symbol_t::Dictionary(sd);
	}
	default:
		return symbol_t();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %r14
movq %rdi, %r13
movq %rsi, %rdi
callq 0x6db2c
addl $0xa, %eax
cmpl $0x9, %eax
ja 0x57481
leaq 0x2e390(%rip), %rcx     # 0x85808
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r13, %rdi
callq 0x3f9d0
jmp 0x576b7
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6db30
movq (%r15), %rsi
movq %r13, %rdi
callq 0x3fd92
jmp 0x57683
leaq 0x30(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6db30
movq (%r15), %rcx
movq 0x8(%r15), %rax
movq %rcx, (%rsp)
movq %rax, 0x8(%rsp)
testq %rax, %rax
je 0x5768e
movq 0x5dab4(%rip), %rcx     # 0xb4f90
cmpb $0x0, (%rcx)
je 0x5768a
incl 0x8(%rax)
jmp 0x5768e
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6db30
movq (%r15), %rsi
movq %r13, %rdi
callq 0x3fd84
jmp 0x57683
leaq 0x8(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x6db30
movq %r13, 0x60(%rsp)
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x5754e
callq 0x1e5bc
movq 0x18(%rbx), %r14
addq $0x8, %rbx
cmpq %rbx, %r14
je 0x575cc
leaq 0x40(%rsp), %r15
leaq 0x68(%rsp), %r12
leaq 0x30(%rsp), %r13
movq %rsp, %rbp
leaq 0x40(%r14), %rsi
movq %r12, %rdi
callq 0x5744d
leaq 0x20(%r14), %rsi
movq %r13, %rdi
movq %r12, %rdx
callq 0x57a40
movq %rbp, %rdi
movq %r13, %rsi
callq 0x45d92
leaq 0x50(%rsp), %rdi
callq 0x3fe06
movq 0x30(%rsp), %rdi
cmpq %r15, %rdi
je 0x575b4
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x103d0
movq %r12, %rdi
callq 0x3fe06
movq %r14, %rdi
callq 0x102a0
movq %rax, %r14
cmpq %rbx, %rax
jne 0x5756d
movq %rsp, %rsi
movq 0x60(%rsp), %r13
movq %r13, %rdi
callq 0x3fde6
movq %rsp, %rdi
callq 0x43c6a
jmp 0x576b7
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
leaq 0x30(%rsp), %rdi
movq %r14, %rsi
callq 0x6db30
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x5761a
callq 0x1e5bc
movq (%rbx), %r14
movq 0x8(%rbx), %rbx
cmpq %rbx, %r14
je 0x57655
leaq 0x30(%rsp), %r15
movq %rsp, %r12
movq %r15, %rdi
movq %r14, %rsi
callq 0x5744d
movq %r12, %rdi
movq %r15, %rsi
callq 0x2087a
movq %r15, %rdi
callq 0x3fe06
addq $0x18, %r14
cmpq %rbx, %r14
jne 0x5762e
movq %rsp, %rsi
movq %r13, %rdi
callq 0x3fda0
movq %rsp, %rdi
callq 0x20952
jmp 0x576b7
movq %rsp, %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x6db30
movq (%r15), %rsi
movq %r13, %rdi
callq 0x3fdd8
movq 0x8(%rsp), %rdi
jmp 0x576ad
lock
incl 0x8(%rax)
movq %rsp, %rsi
movq %r13, %rdi
callq 0x3fd68
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x576a8
callq 0x1e5bc
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x576b7
callq 0x1e5bc
movq %r13, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x57702
jmp 0x5772d
jmp 0x576ee
jmp 0x5772d
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x576e3
callq 0x1e5bc
movq 0x38(%rsp), %rdi
jmp 0x576f6
jmp 0x57702
jmp 0x576ee
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x57747
callq 0x1e5bc
jmp 0x57747
movq %rax, %rbx
jmp 0x57723
movq %rax, %rbx
jmp 0x57719
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x57a94
leaq 0x68(%rsp), %rdi
callq 0x3fe06
movq %rsp, %rdi
callq 0x43c6a
jmp 0x57747
movq %rax, %rbx
jmp 0x5773f
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3fe06
movq %rsp, %rdi
callq 0x20952
movq %rbx, %rdi
callq 0x106f0
nop