// File: CobaltXII[P]cxcc/./semantic/semantic_analyzer.hpp
// Function: semantic_analyzer_t::expand_literal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, expression_t*)
std::string expand_literal(std::string literal, expression_t* expression) {
		std::string expanded;
		bool escaped = false;
		for (int i = 0; i < literal.size(); i++) {
			if (literal[i] == '\\') {
				escaped = true;
			} else {
				if (escaped) {
					if (literal[i] == 'a') {
						expanded += '\a';
					} else if (literal[i] == 'b') {
						expanded += '\b';
					} else if (literal[i] == 'f') {
						expanded += '\f';
					} else if (literal[i] == 'n') {
						expanded += '\n';
					} else if (literal[i] == 'r') {
						expanded += '\r';
					} else if (literal[i] == 't') {
						expanded += '\t';
					} else if (literal[i] == 'v') {
						expanded += '\v';
					} else if (literal[i] == '0') {
						expanded += '\0';
					} else if (literal[i] == 'x') {
						// Parse hexadecimal character literal.
						if (++i >= literal.size()) {
							die("\\x used with no following hex digits", expression->lineno, expression->colno + i);
						}
						std::string hex;
						while (i < literal.size() && char_is_hex(literal[i])) {
							hex += literal[i++];
						}
						i--;
						expanded += std::stoul(hex, nullptr, 16);
					} else if (literal[i] == '\\') {
						expanded += '\\';
					} else if (literal[i] == '\'') {
						expanded += '\'';
					} else if (literal[i] == '"') {
						expanded += '"';
					} else {
						die("unknown escape sequence", expression->lineno, expression->colno + i - 2);
					}
					escaped = false;
				} else {
					expanded += literal[i];
				}
			}
		}
		return expanded;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdx, -0xc8(%rbp)
movq %rdi, -0xc0(%rbp)
movq %rdi, %rax
movq %rax, -0xb8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
movb $0x0, -0x21(%rbp)
callq 0x33e0
movb $0x0, -0x22(%rbp)
movl $0x0, -0x28(%rbp)
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rax
movq %rax, -0xd0(%rbp)
callq 0x31f0
movq %rax, %rcx
movq -0xd0(%rbp), %rax
cmpq %rcx, %rax
jae 0x21205
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3540
movq %rax, -0xd8(%rbp)
jmp 0x20bf5
movq -0xd8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x20c1e
movb $0x1, -0x22(%rbp)
jmp 0x211f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x2122b
testb $0x1, -0x22(%rbp)
je 0x211c0
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3540
movq %rax, -0xe0(%rbp)
jmp 0x20c41
movq -0xe0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x61, %eax
jne 0x20c68
movq -0xc0(%rbp), %rdi
movl $0x7, %esi
callq 0x31d0
jmp 0x20c63
jmp 0x211ba
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3540
movq %rax, -0xe8(%rbp)
jmp 0x20c81
movq -0xe8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x62, %eax
jne 0x20ca8
movq -0xc0(%rbp), %rdi
movl $0x8, %esi
callq 0x31d0
jmp 0x20ca3
jmp 0x211b8
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3540
movq %rax, -0xf0(%rbp)
jmp 0x20cc1
movq -0xf0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x66, %eax
jne 0x20ce8
movq -0xc0(%rbp), %rdi
movl $0xc, %esi
callq 0x31d0
jmp 0x20ce3
jmp 0x211b6
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3540
movq %rax, -0xf8(%rbp)
jmp 0x20d01
movq -0xf8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x6e, %eax
jne 0x20d28
movq -0xc0(%rbp), %rdi
movl $0xa, %esi
callq 0x31d0
jmp 0x20d23
jmp 0x211b4
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3540
movq %rax, -0x100(%rbp)
jmp 0x20d41
movq -0x100(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x72, %eax
jne 0x20d68
movq -0xc0(%rbp), %rdi
movl $0xd, %esi
callq 0x31d0
jmp 0x20d63
jmp 0x211b2
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3540
movq %rax, -0x108(%rbp)
jmp 0x20d81
movq -0x108(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x74, %eax
jne 0x20da8
movq -0xc0(%rbp), %rdi
movl $0x9, %esi
callq 0x31d0
jmp 0x20da3
jmp 0x211b0
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3540
movq %rax, -0x110(%rbp)
jmp 0x20dc1
movq -0x110(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x76, %eax
jne 0x20de8
movq -0xc0(%rbp), %rdi
movl $0xb, %esi
callq 0x31d0
jmp 0x20de3
jmp 0x211ae
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3540
movq %rax, -0x118(%rbp)
jmp 0x20e01
movq -0x118(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jne 0x20e25
movq -0xc0(%rbp), %rdi
xorl %esi, %esi
callq 0x31d0
jmp 0x20e20
jmp 0x211ac
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3540
movq %rax, -0x120(%rbp)
jmp 0x20e3e
movq -0x120(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x78, %eax
jne 0x2103a
movq -0xc8(%rbp), %rdi
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
cltq
movq %rax, -0x128(%rbp)
callq 0x31f0
movq %rax, %rcx
movq -0x128(%rbp), %rax
cmpq %rcx, %rax
jb 0x20f15
leaq -0x59(%rbp), %rdi
movq %rdi, -0x130(%rbp)
callq 0x34d0
movq -0x130(%rbp), %rdx
leaq 0x7b58(%rip), %rsi      # 0x289f8
leaq -0x58(%rbp), %rdi
callq 0x6d70
jmp 0x20eab
movq -0xb0(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rcx
movslq -0x28(%rbp), %rax
addq %rax, %rcx
leaq -0x58(%rbp), %rsi
callq 0x1bac0
jmp 0x20ed0
leaq -0x58(%rbp), %rdi
callq 0x31c0
leaq -0x59(%rbp), %rdi
callq 0x3320
jmp 0x20f15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x20f07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x31c0
leaq -0x59(%rbp), %rdi
callq 0x3320
jmp 0x2122b
leaq -0x80(%rbp), %rdi
callq 0x33e0
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rax
movq %rax, -0x140(%rbp)
callq 0x31f0
movq -0x140(%rbp), %rcx
movq %rax, %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
movb %al, -0x131(%rbp)
jae 0x20f91
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3540
movq %rax, -0x148(%rbp)
jmp 0x20f65
movq -0xb0(%rbp), %rdi
movq -0x148(%rbp), %rax
movsbl (%rax), %esi
callq 0x21300
movb %al, -0x149(%rbp)
jmp 0x20f83
movb -0x149(%rbp), %al
movb %al, -0x131(%rbp)
jmp 0x20f91
movb -0x131(%rbp), %al
testb $0x1, %al
jne 0x20f9d
jmp 0x20ff1
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
movl %esi, %eax
incl %eax
movl %eax, -0x28(%rbp)
callq 0x3540
movq %rax, -0x158(%rbp)
jmp 0x20fbd
movq -0x158(%rbp), %rax
movsbl (%rax), %esi
leaq -0x80(%rbp), %rdi
callq 0x31d0
jmp 0x20fd2
jmp 0x20f1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x31c0
jmp 0x2122b
movl -0x28(%rbp), %eax
decl %eax
movl %eax, -0x28(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x80(%rbp), %rdi
movl $0x10, %edx
callq 0x21370
movq %rax, -0x160(%rbp)
jmp 0x21014
movq -0xc0(%rbp), %rdi
movq -0x160(%rbp), %rax
movsbl %al, %esi
callq 0x31d0
jmp 0x2102c
leaq -0x80(%rbp), %rdi
callq 0x31c0
jmp 0x211aa
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3540
movq %rax, -0x168(%rbp)
jmp 0x21053
movq -0x168(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5c, %eax
jne 0x2107a
movq -0xc0(%rbp), %rdi
movl $0x5c, %esi
callq 0x31d0
jmp 0x21075
jmp 0x211a8
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3540
movq %rax, -0x170(%rbp)
jmp 0x21093
movq -0x170(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x27, %eax
jne 0x210ba
movq -0xc0(%rbp), %rdi
movl $0x27, %esi
callq 0x31d0
jmp 0x210b5
jmp 0x211a6
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3540
movq %rax, -0x178(%rbp)
jmp 0x210d3
movq -0x178(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
jne 0x210fa
movq -0xc0(%rbp), %rdi
movl $0x22, %esi
callq 0x31d0
jmp 0x210f5
jmp 0x211a4
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x180(%rbp)
callq 0x34d0
movq -0x180(%rbp), %rdx
leaq 0x7902(%rip), %rsi      # 0x28a1d
leaq -0xa0(%rbp), %rdi
callq 0x6d70
jmp 0x21129
movq -0xb0(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdx
movq 0x18(%rax), %rax
movslq -0x28(%rbp), %rcx
leaq -0x2(%rax,%rcx), %rcx
leaq -0xa0(%rbp), %rsi
callq 0x1bac0
jmp 0x21153
leaq -0xa0(%rbp), %rdi
callq 0x31c0
leaq -0xa1(%rbp), %rdi
callq 0x3320
jmp 0x211a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x21193
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x31c0
leaq -0xa1(%rbp), %rdi
callq 0x3320
jmp 0x2122b
jmp 0x211a6
jmp 0x211a8
jmp 0x211aa
jmp 0x211ac
jmp 0x211ae
jmp 0x211b0
jmp 0x211b2
jmp 0x211b4
jmp 0x211b6
jmp 0x211b8
jmp 0x211ba
movb $0x0, -0x22(%rbp)
jmp 0x211f3
movq -0xc8(%rbp), %rdi
movslq -0x28(%rbp), %rsi
callq 0x3540
movq %rax, -0x188(%rbp)
jmp 0x211d9
movq -0xc0(%rbp), %rdi
movq -0x188(%rbp), %rax
movsbl (%rax), %esi
callq 0x31d0
jmp 0x211f1
jmp 0x211f3
jmp 0x211f5
jmp 0x211f7
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x20bb2
movb $0x1, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
jne 0x2121b
movq -0xc0(%rbp), %rdi
callq 0x31c0
movq -0xb8(%rbp), %rax
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
movq -0xc0(%rbp), %rdi
callq 0x31c0
movq -0x30(%rbp), %rdi
callq 0x34c0