// File: /workspace/github_cpp_makefile_star2_O2/iamlouk[P]asbi/src/types.cc
// Function: asbi::Value::to_string[abi:cxx11](bool) const
std::string Value::to_string(bool debug) const {
	assert(type != type_t::StackPlaceholder);
	switch (type) {
	case type_t::Bool:
		return _boolean ? "true" : "false";
	case type_t::Number:{
		auto integer = static_cast<int>(_number);
		return integer == _number ? std::to_string(integer) : std::to_string(_number);
	}
	case type_t::Nil:
		return "nil";
	case type_t::Symbol:
		return std::string(":") + _string->data;
	case type_t::String:
		return debug ? std::string("\"") + _string->data + "\"" : _string->data;
	case type_t::Lambda:{
		std::stringstream ss;
		ss << "<Lambda#" << (void*)_lambda->ops << ">";
		return ss.str();
	}
	case type_t::Map:{
		std::stringstream ss;
		ss << "[";
		for (auto val: _map->vecdata)
			ss << val.to_string(true) << ", ";
		for (auto [key, val]: _map->data)
			ss << key.to_string(true) << " ~ " << val.to_string(true) << ", ";
		ss << "]";
		return ss.str();
	}
	case type_t::Macro:{
		std::stringstream ss;
		ss << "<Macro#" << (void*)_lambda->ops << ">";
		return ss.str();
	}
	case type_t::StackPlaceholder:
		return std::string("<StackPlaceholder>");
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
leaq 0x6f9c(%rip), %rcx      # 0x14e24
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x65b4(%rip), %rax      # 0x1444c
leaq 0x65b2(%rip), %rsi      # 0x14451
cmpb $0x0, 0x8(%r14)
cmovneq %rax, %rsi
jmp 0xdf05
testb %dl, %dl
je 0xe188
leaq 0x65d7(%rip), %rsi      # 0x14490
movq %rsp, %rdi
leaq 0x30(%rsp), %rdx
callq 0x60ee
movq 0x8(%r14), %rdx
addq $0x20, %rdx
leaq 0x50(%rsp), %rdi
movq %rsp, %rsi
callq 0x7096
leaq 0x65ae(%rip), %rdx      # 0x14490
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x7077
leaq 0x50(%rsp), %rdi
callq 0x5170
movq %rsp, %rdi
jmp 0xdf45
leaq 0x7df3(%rip), %rsi      # 0x15cf8
leaq 0x50(%rsp), %rdx
movq %rbx, %rdi
callq 0x60ee
jmp 0xe173
leaq 0x708d(%rip), %rsi      # 0x14fab
leaq 0x50(%rsp), %rdi
movq %rsp, %rdx
callq 0x60ee
movq 0x8(%r14), %rdx
addq $0x20, %rdx
leaq 0x50(%rsp), %rsi
movq %rbx, %rdi
callq 0x7096
leaq 0x50(%rsp), %rdi
callq 0x5170
jmp 0xe173
leaq 0x50(%rsp), %rdi
callq 0x5270
leaq 0x60(%rsp), %rdi
leaq 0x705c(%rip), %rsi      # 0x14fc1
callq 0x5380
movq 0x8(%r14), %rcx
movq 0x28(%rcx), %rsi
movq %rax, %rdi
callq 0x52c0
leaq 0x7035(%rip), %rsi      # 0x14fb6
movq %rax, %rdi
callq 0x5380
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x5570
jmp 0xe169
movsd 0x8(%r14), %xmm0
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xe19a
jp 0xe19a
cvttsd2si %xmm0, %esi
movq %rbx, %rdi
callq 0x711c
jmp 0xe173
leaq 0x50(%rsp), %rdi
callq 0x5270
leaq 0x60(%rsp), %rdi
leaq 0x6fcd(%rip), %rsi      # 0x14fad
callq 0x5380
movq 0x8(%r14), %rcx
movq 0x28(%rcx), %rsi
movq %rax, %rdi
callq 0x52c0
leaq 0x6fba(%rip), %rsi      # 0x14fb6
movq %rax, %rdi
callq 0x5380
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x5570
jmp 0xe169
leaq 0x50(%rsp), %rdi
callq 0x5270
leaq 0x60(%rsp), %rdi
leaq 0x6f8c(%rip), %rsi      # 0x14fb8
callq 0x5380
movq %rbx, 0x20(%rsp)
movq %r14, 0x28(%rsp)
movq 0x8(%r14), %rax
movq 0x50(%rax), %r15
movq 0x58(%rax), %r14
movq %rsp, %rbx
leaq 0x30(%rsp), %r12
pushq $0x1
popq %rbp
leaq 0x6f61(%rip), %r13      # 0x14fba
cmpq %r14, %r15
je 0xe09c
movupd (%r15), %xmm0
movapd %xmm0, 0x30(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movl %ebp, %edx
callq 0xde68
leaq 0x60(%rsp), %rdi
movq %rbx, %rsi
callq 0x5320
movq %rax, %rdi
movq %r13, %rsi
callq 0x5380
movq %rbx, %rdi
callq 0x5170
addq $0x10, %r15
jmp 0xe059
movq 0x28(%rsp), %rax
movq 0x8(%rax), %r13
addq $0x28, %r13
leaq 0x10(%rsp), %r14
leaq 0x30(%rsp), %r12
pushq $0x1
popq %rbp
leaq 0x1d8(%rsp), %r15
movq (%r13), %r13
testq %r13, %r13
je 0xe146
movupd 0x8(%r13), %xmm0
movupd 0x18(%r13), %xmm1
movapd %xmm1, 0x10(%rsp)
movapd %xmm0, (%rsp)
movq %r12, %rdi
movq %rsp, %rsi
movl %ebp, %edx
callq 0xde68
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
callq 0x5320
movq %rax, %rdi
leaq 0x6ebb(%rip), %rsi      # 0x14fbd
callq 0x5380
movq %rax, %rbx
movq %r15, %rdi
movq %r14, %rsi
movl %ebp, %edx
callq 0xde68
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5320
movq %rax, %rdi
leaq 0x6e8e(%rip), %rsi      # 0x14fba
callq 0x5380
movq %r15, %rdi
callq 0x5170
movq %r12, %rdi
callq 0x5170
jmp 0xe0be
leaq 0x5f19(%rip), %rsi      # 0x14066
leaq 0x60(%rsp), %rdi
callq 0x5380
movq 0x20(%rsp), %rbx
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x5570
leaq 0x50(%rsp), %rdi
callq 0x52a0
movq %rbx, %rax
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%r14), %rsi
addq $0x20, %rsi
movq %rbx, %rdi
callq 0x54d0
jmp 0xe173
movq %rbx, %rdi
callq 0x7175
jmp 0xe173
leaq 0x6d8a(%rip), %rdi      # 0x14f35
leaq 0x6cde(%rip), %rsi      # 0x14e90
leaq 0x6dc3(%rip), %rcx      # 0x14f7c
movl $0xcc, %edx
callq 0x5220
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x5170
jmp 0xe1d5
movq %rax, %rbx
movq %rsp, %rdi
jmp 0xe1e4
jmp 0xe1eb
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x5170
jmp 0xe230
movq %rax, %rbx
jmp 0xe230
jmp 0xe1fa
jmp 0xe1fa
jmp 0xe1fa
jmp 0xe211
jmp 0xe1fa
movq %rax, %rbx
jmp 0xe226
movq %rax, %rbx
leaq 0x1d8(%rsp), %rdi
callq 0x5170
jmp 0xe214
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0xe221
movq %rax, %rbx
movq %rsp, %rdi
callq 0x5170
leaq 0x50(%rsp), %rdi
callq 0x52a0
movq %rbx, %rdi
callq 0x5600