// File: /workspace/github_cpp_makefile_star2_O3/BlinfoldKing[P]lisval/src/lib/parser.cpp
// Function: Token::debug[abi:cxx11]()
string Token::debug() {
	string res = "";
	switch (this->type) {
		case TokenType::ATOM:
		{
			Atom* a = static_cast<Atom*>(this);
			res += a->str;
			break;
		}
		case TokenType::LIST:
			{
				res += "(";
				List* l = static_cast<List*>(this);
				for (size_t i = 0; i < l->list.size(); i++) {
					res += l->list[i]->debug();
					if (i < l->list.size() - 1) res += ' ';
				}
				res += ")";
				break;
			}
		case TokenType::NUMBER:
			{
				Number* a = static_cast<Number*>(this);
				res += to_string(a->value);
				break;
			}
		case TokenType::VARIABLE:
		{
			Variable* a = static_cast<Variable*>(this);
			res += a->str;
			break;
		}
		case TokenType::UNARY_OPERATOR:
		{
			UnaryOperator* a = static_cast<UnaryOperator*>(this);
			res += unaryOperatorToString(a->operator_type);
			break;
		}
		case TokenType::BINARY_OPERATOR:
		{
			BinaryOperator* a = static_cast<BinaryOperator*>(this);
			res += binaryOperatorToString(a->operator_type);
			break;
		}
		case TokenType::BOOLEAN:
		{
			Boolean* a = static_cast<Boolean*>(this);
			res += boolToString(a->value);
			break;
		}
        case TokenType::ERROR:
        {
			Error* a = static_cast<Error*>(this);
		    res += "(:error \""+a->message+"\")";
            break;
        }
		default:
			res += "UNKNOWN";
	}

	return res;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
leaq 0x3671(%rip), %rdx      # 0xf5a8
movq %rdx, %rsi
callq 0x3bb0
movl (%r14), %eax
cmpq $0x8, %rax
ja 0xbf6d
leaq 0x355d(%rip), %rcx      # 0xf4ac
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x30c0
jmp 0xc13f
leaq 0x35ff(%rip), %rsi      # 0xf573
movq %rbx, %rdi
callq 0x3330
jmp 0xc13f
movl 0x4(%r14), %esi
leaq -0x50(%rbp), %rdi
callq 0xa873
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x30c0
jmp 0xc126
leaq 0x35d1(%rip), %rsi      # 0xf57b
movq %rbx, %rdi
callq 0x3330
movq %r12, -0x30(%rbp)
movq 0x8(%r14), %rax
cmpq %rax, 0x10(%r14)
je 0xc038
leaq -0x40(%rbp), %r13
xorl %r12d, %r12d
leaq -0x50(%rbp), %r15
movq (%rax,%r12,8), %rsi
movq %r15, %rdi
callq 0xbf12
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x30c0
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0xbffc
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x31c0
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
leaq -0x1(%rcx), %rdx
cmpq %rdx, %r12
jae 0xc030
movq %rbx, %rdi
movl $0x20, %esi
callq 0x3180
movq 0x8(%r14), %rax
movq 0x10(%r14), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
incq %r12
cmpq %rcx, %r12
jb 0xbfcb
leaq 0x3549(%rip), %rsi      # 0xf588
movq %rbx, %rdi
callq 0x3330
jmp 0xc13f
movzbl 0x4(%r14), %esi
leaq -0x50(%rbp), %rdi
callq 0xafde
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x30c0
jmp 0xc126
addq $0x8, %r14
leaq 0x3503(%rip), %rsi      # 0xf57d
leaq -0x70(%rbp), %rdi
movq %r14, %rdx
callq 0xc775
leaq 0x34fa(%rip), %rsi      # 0xf587
leaq -0x70(%rbp), %rdi
callq 0x3330
leaq -0x40(%rbp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0xc151
movq %rsi, -0x50(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x40(%rbp)
jmp 0xc15b
cvtss2sd 0x4(%r14), %xmm0
movq 0x8eea(%rip), %rsi      # 0x14fb8
leaq 0x34ba(%rip), %rcx      # 0xf58f
leaq -0x50(%rbp), %rdi
movl $0x3a, %edx
movb $0x1, %al
callq 0xcb5c
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x30c0
jmp 0xc126
movq 0x8(%r14), %rsi
movq 0x10(%r14), %rdx
movq %rbx, %rdi
callq 0x30c0
jmp 0xc13f
movl 0x4(%r14), %esi
leaq -0x50(%rbp), %rdi
callq 0xa57d
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq %rbx, %rdi
callq 0x30c0
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc13f
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x31c0
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq %r15, %rsi
movq 0x8(%rax), %rdx
movq %rdx, -0x48(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq %rbx, %rdi
callq 0x30c0
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0xc18f
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x31c0
leaq -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc13f
movq -0x60(%rbp), %rsi
jmp 0xc137
jmp 0xc20e
movq %r12, -0x30(%rbp)
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %r15, %rdi
je 0xc1cd
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x31c0
jmp 0xc1cd
jmp 0xc1e2
jmp 0xc1e2
movq %r12, -0x30(%rbp)
movq %rax, %r14
leaq -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xc22b
movq -0x60(%rbp), %rsi
jmp 0xc223
jmp 0xc1e2
movq %r12, -0x30(%rbp)
movq %rax, %r14
leaq -0x40(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0xc21f
jmp 0xc22b
jmp 0xc206
jmp 0xc206
jmp 0xc206
jmp 0xc206
jmp 0xc206
jmp 0xc206
jmp 0xc206
movq %r12, -0x30(%rbp)
jmp 0xc20e
jmp 0xc20e
movq %rax, %r14
jmp 0xc22b
movq %rax, %r14
movq -0x50(%rbp), %rdi
cmpq %r13, %rdi
je 0xc22b
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x31c0
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0xc243
movq -0x30(%rbp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x31c0
movq %r14, %rdi
callq 0x32e0
nop