// File: iamlouk[P]asbi/src/tokenizer.cc
// Function: tok::Tokenizer::next_string(char)
Token Tokenizer::next_string(char strstart) {
	std::string *str = new std::string("");
	pos++;
	while (pos < source.length()) {
		char c = source[pos++];
		if (c == '\\') {
			char c = source[pos++];
			switch (c) {
			case 'n': c = '\n'; break;
			case 't': c = '\t'; break;
			case 'r': c = '\r'; break;
			case '"': c = '"';  break;
			case '\'': c = '\''; break;
			default:
				throw utils::tokenizer_error("not escapeable", line, c);
			}
		} else if (c == strstart)
			break;
		*str += c;
	}
	return Token(String, str, line);
}

// Assembly:
subq $0x78, %rsp
movb %sil, %al
movq %rdi, 0x60(%rsp)
movb %al, 0x5f(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x20, %edi
callq 0x6460
movq %rax, 0x28(%rsp)
movq %rax, 0x20(%rsp)
movb $0x1, 0x3b(%rsp)
leaq 0x4f(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x67b0
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rdx
leaq 0x2f271(%rip), %rsi     # 0x38104
callq 0x7c20
jmp 0x8e9a
movb $0x0, 0x3b(%rsp)
leaq 0x4f(%rsp), %rdi
callq 0x64c0
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x50(%rsp)
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movq %rcx, 0x10(%rsp)
movq 0x10(%rax), %rdi
callq 0x66c0
movq %rax, %rcx
movq 0x10(%rsp), %rax
cmpq %rcx, %rax
jae 0x9055
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
movq (%rax), %rsi
movq %rsi, %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
callq 0x64e0
movb (%rax), %al
movb %al, 0x3a(%rsp)
movsbl 0x3a(%rsp), %eax
cmpl $0x5c, %eax
jne 0x902d
movq 0x18(%rsp), %rax
movq (%rax), %rsi
movq 0x10(%rax), %rdi
movq %rsi, %rcx
incq %rcx
movq %rcx, (%rax)
callq 0x64e0
movb (%rax), %al
movb %al, 0x39(%rsp)
movsbl 0x39(%rsp), %eax
movl %eax, 0xc(%rsp)
subl $0x22, %eax
je 0x8fbe
jmp 0x8f48
movl 0xc(%rsp), %eax
subl $0x27, %eax
je 0x8fc5
jmp 0x8f53
movl 0xc(%rsp), %eax
subl $0x6e, %eax
je 0x8fa9
jmp 0x8f5e
movl 0xc(%rsp), %eax
subl $0x72, %eax
je 0x8fb7
jmp 0x8f69
movl 0xc(%rsp), %eax
subl $0x74, %eax
je 0x8fb0
jmp 0x8fcc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
leaq 0x4f(%rsp), %rdi
callq 0x64c0
testb $0x1, 0x3b(%rsp)
jne 0x8f95
jmp 0x8fa4
movq 0x20(%rsp), %rdi
movl $0x20, %esi
callq 0x6470
jmp 0x9080
movb $0xa, 0x39(%rsp)
jmp 0x902b
movb $0x9, 0x39(%rsp)
jmp 0x902b
movb $0xd, 0x39(%rsp)
jmp 0x902b
movb $0x22, 0x39(%rsp)
jmp 0x902b
movb $0x27, 0x39(%rsp)
jmp 0x902b
movl $0x38, %edi
callq 0x6200
movq %rax, %rdi
movq 0x18(%rsp), %rax
movq %rdi, %rcx
movq %rcx, (%rsp)
movl 0x8(%rax), %edx
movsbl 0x39(%rsp), %ecx
leaq 0x2f553(%rip), %rsi     # 0x38547
callq 0x171c0
jmp 0x8ffb
movq (%rsp), %rdi
leaq 0x424e2(%rip), %rsi     # 0x4b4e8
leaq 0x29c3(%rip), %rdx      # 0xb9d0
callq 0x6780
movq (%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x40(%rsp)
movl %eax, 0x3c(%rsp)
callq 0x6320
jmp 0x9080
jmp 0x903f
movsbl 0x3a(%rsp), %eax
movsbl 0x5f(%rsp), %ecx
cmpl %ecx, %eax
jne 0x903d
jmp 0x9055
jmp 0x903f
movb 0x3a(%rsp), %al
movq 0x50(%rsp), %rdi
movsbl %al, %esi
callq 0x62a0
jmp 0x8ec2
movq 0x18(%rsp), %rax
movq 0x50(%rsp), %rdx
movl 0x8(%rax), %ecx
leaq 0x68(%rsp), %rdi
movl $0x3, %esi
callq 0xba10
movq 0x68(%rsp), %rax
movq 0x70(%rsp), %rdx
addq $0x78, %rsp
retq
movq 0x40(%rsp), %rdi
callq 0x67a0
nopw (%rax,%rax)