// File: ryuichiueda[P]GlueLang/src/Feeder.cc
// Function: Feeder::literalEsc(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*)
bool Feeder::literalEsc(string *ans)
{
	if(outOfRange())
		return false;

	*ans = "";

	string *p = &m_lines[m_cur_line];
	int i = m_cur_char;

	if(p->at(i) != '\'')
		return false;

	i++;

	bool escaped = false;
	bool end = false;

	while(1){
		for(;i < (int)p->length();i++){
			char c = p->at(i);
			if(c == '\\'){
				escaped = true;
				continue;
			}
	
			if(c == '\''){
				if(escaped){
					escaped = false;
					continue;
				}else{
					end = true;
					break;
				}
			}else{
				escaped = false;
			}
	
		}

		*ans += string(p->c_str()+m_cur_char,i-m_cur_char);
		if(end){ // end ' is found
			m_cur_char = i+1;
			blank();
			checkEol(p);
			*ans = string(ans->c_str()+1,ans->length()-1);
			return true;
		}else{ // go to next line
			m_cur_char = 0;
			m_cur_line++;
			if(atEnd()){
				m_error_msg = "Literal not end";
				throw this;
			}
			p = &m_lines[m_cur_line];
			i = 0;
			*ans += '\n';
		}
	}
	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x163e0
testb $0x1, %al
jne 0x171a9
jmp 0x171b2
movb $0x0, -0x1(%rbp)
jmp 0x1749e
movq -0x18(%rbp), %rdi
leaq 0x662e(%rip), %rsi      # 0x1d7eb
callq 0x6580
movq -0x90(%rbp), %rax
movq %rax, %rdi
addq $0x8, %rdi
movslq 0x20(%rax), %rsi
callq 0xb680
movq %rax, %rcx
movq -0x90(%rbp), %rax
movq %rcx, -0x20(%rbp)
movl 0x24(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0x6770
movsbl (%rax), %eax
cmpl $0x27, %eax
je 0x1720b
movb $0x0, -0x1(%rbp)
jmp 0x1749e
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movb $0x0, -0x25(%rbp)
movb $0x0, -0x26(%rbp)
jmp 0x1721e
movl -0x24(%rbp), %eax
movl %eax, -0x94(%rbp)
movq -0x20(%rbp), %rdi
callq 0x6620
movq %rax, %rcx
movl -0x94(%rbp), %eax
cmpl %ecx, %eax
jge 0x1728a
movq -0x20(%rbp), %rdi
movslq -0x24(%rbp), %rsi
callq 0x6770
movb (%rax), %al
movb %al, -0x27(%rbp)
movsbl -0x27(%rbp), %eax
cmpl $0x5c, %eax
jne 0x1725e
movb $0x1, -0x25(%rbp)
jmp 0x1727f
movsbl -0x27(%rbp), %eax
cmpl $0x27, %eax
jne 0x17279
testb $0x1, -0x25(%rbp)
je 0x17273
movb $0x0, -0x25(%rbp)
jmp 0x1727f
movb $0x1, -0x26(%rbp)
jmp 0x1728a
movb $0x0, -0x25(%rbp)
jmp 0x1727f
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x1721e
movq -0x20(%rbp), %rdi
callq 0x6190
movq -0x90(%rbp), %rcx
movslq 0x24(%rcx), %rdx
movl %edx, %ecx
addq %rdx, %rax
movq %rax, -0xb0(%rbp)
movl -0x24(%rbp), %eax
subl %ecx, %eax
cltq
movq %rax, -0xa8(%rbp)
leaq -0x49(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x6710
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
movq -0xa0(%rbp), %rcx
leaq -0x48(%rbp), %rdi
callq 0x64c0
jmp 0x172e8
movq -0x18(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x6560
jmp 0x172f7
leaq -0x48(%rbp), %rdi
callq 0x6280
leaq -0x49(%rbp), %rdi
callq 0x6480
testb $0x1, -0x26(%rbp)
je 0x17409
movq -0x90(%rbp), %rdi
movl -0x24(%rbp), %eax
incl %eax
movl %eax, 0x24(%rdi)
callq 0x164a0
movq -0x90(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x165b0
movq -0x18(%rbp), %rdi
callq 0x6190
incq %rax
movq %rax, -0xc8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x6620
decq %rax
movq %rax, -0xc0(%rbp)
leaq -0x81(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x6710
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
movq -0xb8(%rbp), %rcx
leaq -0x80(%rbp), %rdi
callq 0x64c0
jmp 0x17390
movq -0x18(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x6520
leaq -0x80(%rbp), %rdi
callq 0x6280
leaq -0x81(%rbp), %rdi
callq 0x6480
movb $0x1, -0x1(%rbp)
jmp 0x1749e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x173de
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x6280
leaq -0x49(%rbp), %rdi
callq 0x6480
jmp 0x174ac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x81(%rbp), %rdi
callq 0x6480
jmp 0x174ac
movq -0x90(%rbp), %rdi
movl $0x0, 0x24(%rdi)
movl 0x20(%rdi), %eax
addl $0x1, %eax
movl %eax, 0x20(%rdi)
callq 0x174c0
testb $0x1, %al
jne 0x1742b
jmp 0x17469
movq -0x90(%rbp), %rdi
addq $0x28, %rdi
leaq 0x6199(%rip), %rsi      # 0x1d5d6
callq 0x6580
movl $0x8, %edi
callq 0x6200
movq %rax, %rdi
movq -0x90(%rbp), %rax
movq %rax, (%rdi)
leaq 0x10dc0(%rip), %rsi     # 0x28220
xorl %eax, %eax
movl %eax, %edx
callq 0x66d0
movq -0x90(%rbp), %rax
movq %rax, %rdi
addq $0x8, %rdi
movslq 0x20(%rax), %rsi
callq 0xb680
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rdi
movl $0xa, %esi
callq 0x6290
jmp 0x1721c
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xd0, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x6700
nopw %cs:(%rax,%rax)