// File: /workspace/github_cpp_makefile_star2_O3/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, %r15
movq %rdi, %r12
movl (%rsi), %eax
leaq 0x83f2(%rip), %rcx      # 0x17e14
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzbl 0x8(%r15), %edx
leaq 0x7a0d(%rip), %rax      # 0x17444
leaq 0x7a0b(%rip), %rsi      # 0x17449
testq %rdx, %rdx
cmovneq %rax, %rsi
leaq 0x10(%r12), %rax
movq %rax, (%r12)
xorq $0x5, %rdx
addq %rsi, %rdx
jmp 0xfae0
testb %dl, %dl
je 0xfe8a
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x7a16(%rip), %rsi      # 0x17488
leaq 0x7a10(%rip), %rdx      # 0x17489
movq %rsp, %rdi
callq 0x6646
movq 0x8(%r15), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
movq %rsp, %rdi
callq 0x50e0
leaq 0x80(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xff0c
movq %rdx, 0x70(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x80(%rsp)
jmp 0xff15
leaq 0x10(%r12), %rax
movq %rax, (%r12)
leaq 0x920f(%rip), %rsi      # 0x18ce8
leaq 0x920b(%rip), %rdx      # 0x18ceb
movq %r12, %rdi
callq 0x6646
jmp 0xffed
leaq 0x80(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x849b(%rip), %rsi      # 0x17f9b
leaq 0x8495(%rip), %rdx      # 0x17f9c
leaq 0x70(%rsp), %rdi
callq 0x6646
movq 0x8(%r15), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
leaq 0x70(%rsp), %rdi
callq 0x50e0
leaq 0x10(%r12), %rdx
movq %rdx, (%r12)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0xfed1
movq %rsi, (%r12)
movq (%rcx), %rdx
movq %rdx, 0x10(%r12)
jmp 0xfed9
leaq 0x70(%rsp), %rdi
callq 0x5260
leaq 0x80(%rsp), %rbx
leaq 0x8444(%rip), %rsi      # 0x17fb1
movl $0x7, %edx
movq %rbx, %rdi
callq 0x5400
movq 0x8(%r15), %rax
movq 0x28(%rax), %rsi
movq %rbx, %rdi
callq 0x52b0
leaq 0x8415(%rip), %rsi      # 0x17fa6
movl $0x1, %edx
movq %rax, %rdi
callq 0x5400
leaq 0x88(%rsp), %rsi
movq %r12, %rdi
callq 0x5550
jmp 0xfe67
movsd 0x8(%r15), %xmm0
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xfeaf
jp 0xfeaf
cvttsd2si %xmm0, %r14d
movl %r14d, %ebx
negl %ebx
cmovsl %r14d, %ebx
movl $0x1, %r15d
cmpl $0xa, %ebx
jb 0xffbe
movl $0x4, %r15d
movl $0xd1b71759, %eax       # imm = 0xD1B71759
movl %ebx, %ecx
cmpl $0x63, %ecx
jbe 0xffb5
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0xffbb
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0xffbe
movl %ecx, %edx
imulq %rax, %rdx
shrq $0x2d, %rdx
addl $0x4, %r15d
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0xfbfb
addl $-0x3, %r15d
jmp 0xffbe
leaq 0x70(%rsp), %rdi
callq 0x5260
leaq 0x80(%rsp), %rbx
leaq 0x8347(%rip), %rsi      # 0x17f9d
movl $0x8, %edx
movq %rbx, %rdi
callq 0x5400
movq 0x8(%r15), %rax
movq 0x28(%rax), %rsi
movq %rbx, %rdi
callq 0x52b0
leaq 0x832c(%rip), %rsi      # 0x17fa6
movl $0x1, %edx
movq %rax, %rdi
callq 0x5400
leaq 0x88(%rsp), %rsi
movq %r12, %rdi
callq 0x5550
jmp 0xfe67
leaq 0x70(%rsp), %rdi
callq 0x5260
leaq 0x80(%rsp), %rdi
leaq 0x82f3(%rip), %rsi      # 0x17fa8
movl $0x1, %edx
callq 0x5400
movq %r12, 0x68(%rsp)
movq 0x8(%r15), %rax
movq 0x50(%rax), %rbp
movq 0x58(%rax), %r14
cmpq %r14, %rbp
je 0xfd4d
movq %rsp, %rbx
leaq 0x20(%rsp), %r12
leaq 0x82c6(%rip), %r13      # 0x17faa
movupd (%rbp), %xmm0
movapd %xmm0, 0x20(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movl $0x1, %edx
callq 0xfa02
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x80(%rsp), %rdi
callq 0x5400
movl $0x2, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x5400
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0xfd40
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5390
addq $0x10, %rbp
cmpq %r14, %rbp
jne 0xfce4
movq 0x8(%r15), %rax
movq 0x28(%rax), %r13
testq %r13, %r13
je 0xfe39
leaq 0x30(%rsp), %r14
leaq 0x8247(%rip), %rbp      # 0x17fad
leaq 0x48(%rsp), %rbx
leaq 0x8238(%rip), %r15      # 0x17faa
movupd 0x8(%r13), %xmm0
movupd 0x18(%r13), %xmm1
movapd %xmm1, 0x10(%rsp)
movapd %xmm0, (%rsp)
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
movl $0x1, %edx
callq 0xfa02
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
leaq 0x80(%rsp), %rdi
callq 0x5400
movq %rax, %r12
movl $0x3, %edx
movq %rax, %rdi
movq %rbp, %rsi
callq 0x5400
movq %rbx, %rdi
leaq 0x10(%rsp), %rsi
movl $0x1, %edx
callq 0xfa02
movq 0x48(%rsp), %rsi
movq 0x50(%rsp), %rdx
movq %r12, %rdi
callq 0x5400
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x5400
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0xfe15
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0xfe2c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x5390
movq (%r13), %r13
testq %r13, %r13
jne 0xfd72
leaq 0x7226(%rip), %rsi      # 0x17066
movl $0x1, %edx
leaq 0x80(%rsp), %rdi
callq 0x5400
movq 0x68(%rsp), %r12
leaq 0x88(%rsp), %rsi
movq %r12, %rdi
callq 0x5550
movq 0x11122(%rip), %rsi     # 0x20f90
leaq 0x70(%rsp), %rdi
callq 0x5290
leaq 0xf0(%rsp), %rdi
callq 0x50f0
jmp 0xffed
movq 0x8(%r15), %rax
leaq 0x10(%r12), %rcx
movq %rcx, (%r12)
movq 0x20(%rax), %rsi
movq 0x28(%rax), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x7c3e
jmp 0xffed
movq 0x110ea(%rip), %rsi     # 0x20fa0
leaq 0x76e6(%rip), %rcx      # 0x175a3
movl $0x148, %edx            # imm = 0x148
movq %r12, %rdi
movb $0x1, %al
callq 0x7b8c
jmp 0xffed
movupd (%rcx), %xmm0
movupd %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%r12)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0xffed
movq 0x80(%rsp), %rsi
jmp 0xffab
movupd (%rcx), %xmm0
movupd %xmm0, (%r15)
movq 0x8(%rax), %rdx
leaq 0x70(%rsp), %rdi
movq %rdx, 0x8(%rdi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x7550(%rip), %rsi      # 0x17488
callq 0x5630
leaq 0x10(%r12), %rdx
movq %rdx, (%r12)
movq (%rax), %rsi
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rsi
je 0xff63
movq %rsi, (%r12)
movq (%rcx), %rdx
movq %rdx, 0x10(%r12)
jmp 0xff6b
movupd (%rcx), %xmm0
movupd %xmm0, (%rdx)
movq 0x8(%rax), %rdx
movq %rdx, 0x8(%r12)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x70(%rsp), %rdi
cmpq %r15, %rdi
je 0xff9d
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5390
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0xffed
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5390
jmp 0xffed
addl $-0x2, %r15d
jmp 0xffbe
decl %r15d
shrl $0x1f, %r14d
leal (%r15,%r14), %esi
leaq 0x10(%r12), %rax
movq %rax, (%r12)
movq %r12, %rdi
movl $0x2d, %edx
callq 0x5410
addq (%r12), %r14
movq %r14, %rdi
movl %r15d, %esi
movl %ebx, %edx
callq 0x7b1f
movq %r12, %rax
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x7f1c(%rip), %rdi      # 0x17f25
leaq 0x7e70(%rip), %rsi      # 0x17e80
leaq 0x7f55(%rip), %rcx      # 0x17f6c
movl $0xcc, %edx
callq 0x5210
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r15, %rdi
je 0x10043
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5390
jmp 0x10043
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x10107
movq 0x10(%rsp), %rsi
jmp 0x10072
jmp 0x1007f
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x10107
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x5390
jmp 0x10107
movq %rax, %rbx
jmp 0x10107
jmp 0x10091
jmp 0x10091
jmp 0x10091
jmp 0x10091
jmp 0x10096
movq %rax, %rbx
jmp 0x100e9
movq %rax, %rbx
jmp 0x100ba
movq %rax, %rbx
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x100ba
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0x100e9
movq 0x30(%rsp), %rsi
jmp 0x100e1
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x100e9
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5390
movq 0x10ea0(%rip), %rsi     # 0x20f90
leaq 0x70(%rsp), %rdi
callq 0x5290
leaq 0xf0(%rsp), %rdi
callq 0x50f0
movq %rbx, %rdi
callq 0x55e0
nop