// File: menhits[P]phplus/src/ResolveLiteral.cpp
// Function: resolveStringLiteral(std::shared_ptr<TokenData>)
Action resolveStringLiteral(Token token)
{
	string text=token->getText();
	
	//this nonesens is required because my lexer is shit and includes the first quote but not the last one
	//instead of hardcoding that in, I figured I'd make it flexable so I don't break everthing when I fix the lexer
	
	while (text.size()>0 && text[0]=='"')
		text=text.substr(1, string::npos);
	
	while (text.size()>0 && text[text.size()-1]=='"')
		text=text.substr(0, text.size()-1);
	
	void* obj=cppStr2PncnStr(text);
	
	return constGetAction(obj, String, "\""+text+"\"", globalNamespace);
}

// Assembly:
subq $0x168, %rsp            # imm = 0x168
movq %rsi, 0x48(%rsp)
movq %rdi, %rax
movq 0x48(%rsp), %rdi
movq %rax, 0x50(%rsp)
movq %rax, %rcx
movq %rcx, 0x58(%rsp)
movq %rax, 0x160(%rsp)
movq %rdi, 0x158(%rsp)
callq 0x1bb70
movq %rax, %rsi
leaq 0x138(%rsp), %rdi
callq 0x1bb80
leaq 0x138(%rsp), %rdi
callq 0xb2a0
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, 0x47(%rsp)
jbe 0x9aacc
xorl %eax, %eax
movl %eax, %esi
leaq 0x138(%rsp), %rdi
callq 0xb6d0
movq %rax, 0x38(%rsp)
jmp 0x9aaba
movq 0x38(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
sete %al
movb %al, 0x47(%rsp)
movb 0x47(%rsp), %al
testb $0x1, %al
jne 0x9aad6
jmp 0x9ab39
leaq 0x108(%rsp), %rdi
leaq 0x138(%rsp), %rsi
movl $0x1, %edx
movq $-0x1, %rcx
callq 0xb3a0
jmp 0x9aaf9
leaq 0x138(%rsp), %rdi
leaq 0x108(%rsp), %rsi
callq 0xb450
leaq 0x108(%rsp), %rdi
callq 0xb6e8
jmp 0x9aa86
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x130(%rsp)
movl %eax, 0x12c(%rsp)
jmp 0x9ada2
jmp 0x9ab3b
leaq 0x138(%rsp), %rdi
callq 0xb2a0
movq %rax, %rcx
xorl %eax, %eax
cmpq $0x0, %rcx
movb %al, 0x37(%rsp)
jbe 0x9ab92
leaq 0x138(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xb2a0
movq 0x20(%rsp), %rdi
movq %rax, %rsi
decq %rsi
callq 0xb6d0
movq %rax, 0x28(%rsp)
jmp 0x9ab80
movq 0x28(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x22, %eax
sete %al
movb %al, 0x37(%rsp)
movb 0x37(%rsp), %al
testb $0x1, %al
jne 0x9ab9c
jmp 0x9abf3
leaq 0x138(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0xb2a0
movq 0x18(%rsp), %rsi
movq %rax, %rcx
decq %rcx
xorl %eax, %eax
movl %eax, %edx
leaq 0xe8(%rsp), %rdi
callq 0xb3a0
jmp 0x9abcc
leaq 0x138(%rsp), %rdi
leaq 0xe8(%rsp), %rsi
callq 0xb450
leaq 0xe8(%rsp), %rdi
callq 0xb6e8
jmp 0x9ab3b
leaq 0xc0(%rsp), %rdi
leaq 0x138(%rsp), %rsi
callq 0xb1a0
jmp 0x9ac0a
leaq 0xc0(%rsp), %rdi
callq 0x98540
movq %rax, 0x10(%rsp)
jmp 0x9ac1e
leaq 0xc0(%rsp), %rdi
callq 0xb6e8
movq 0x10(%rsp), %rax
movq %rax, 0xe0(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x7d8bc(%rip), %rsi     # 0x118508
leaq 0xb0(%rsp), %rdi
callq 0x1a920
leaq 0x3aa5b(%rip), %rsi     # 0xd56bb
leaq 0x70(%rsp), %rdi
leaq 0x138(%rsp), %rdx
callq 0xfab0
jmp 0x9ac74
leaq 0x3aa40(%rip), %rdx     # 0xd56bb
leaq 0x90(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0xfa60
jmp 0x9ac8f
leaq 0x7d792(%rip), %rsi     # 0x118428
leaq 0x60(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x1a8f0
movq 0x50(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq (%rsp), %r8
leaq 0xb0(%rsp), %rdx
leaq 0x90(%rsp), %rcx
callq 0xc5050
jmp 0x9acc9
leaq 0x60(%rsp), %rdi
callq 0x1a6e0
leaq 0x90(%rsp), %rdi
callq 0xb6e8
leaq 0x70(%rsp), %rdi
callq 0xb6e8
leaq 0xb0(%rsp), %rdi
callq 0x1a950
leaq 0x138(%rsp), %rdi
callq 0xb6e8
movq 0x58(%rsp), %rax
addq $0x168, %rsp            # imm = 0x168
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x130(%rsp)
movl %eax, 0x12c(%rsp)
leaq 0xc0(%rsp), %rdi
callq 0xb6e8
jmp 0x9ada2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x130(%rsp)
movl %eax, 0x12c(%rsp)
jmp 0x9ad95
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x130(%rsp)
movl %eax, 0x12c(%rsp)
jmp 0x9ad8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x130(%rsp)
movl %eax, 0x12c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x1a6e0
leaq 0x90(%rsp), %rdi
callq 0xb6e8
leaq 0x70(%rsp), %rdi
callq 0xb6e8
leaq 0xb0(%rsp), %rdi
callq 0x1a950
leaq 0x138(%rsp), %rdi
callq 0xb6e8
movq 0x130(%rsp), %rdi
callq 0xb680
nopl (%rax)