// File: menhits[P]phplus/src/Parser.cpp
// Function: importFile(std::vector<std::unique_ptr<AstNodeBase, std::default_delete<AstNodeBase>>, std::allocator<std::unique_ptr<AstNodeBase, std::default_delete<AstNodeBase>>>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void importFile(vector<AstNode>& nodes, string path)
{
	auto file=shared_ptr<SourceFile>(new SourceFile(path, false));
	
	if (file->getContents().empty())
	{
		throw PhplusError("file '"+path+"' failed to open or was empty", SOURCE_ERROR);
	}
	
	vector<Token> tokens;
	
	lexString(file, tokens);
	
	parseTokenList(tokens, 0, tokens.size()-1, nodes);
}

// Assembly:
subq $0x118, %rsp            # imm = 0x118
movq %rsi, 0x38(%rsp)
movq %rdi, 0x110(%rsp)
movq %rsi, 0x108(%rsp)
movl $0x40, %edi
callq 0xb390
movq 0x38(%rsp), %rsi
movq %rax, 0x40(%rsp)
movb $0x1, 0xcb(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0xb1a0
jmp 0x480c7
movq 0x40(%rsp), %rdi
leaq 0xd8(%rsp), %rsi
xorl %edx, %edx
callq 0x9b6c0
jmp 0x480dd
movq 0x40(%rsp), %rsi
movb $0x0, 0xcb(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x49640
jmp 0x480f9
leaq 0xd8(%rsp), %rdi
callq 0xb6e8
leaq 0xf8(%rsp), %rdi
callq 0x35780
movq %rax, %rdi
callq 0x49670
movq %rax, 0x30(%rsp)
jmp 0x48122
movq 0x30(%rsp), %rdi
callq 0xb610
testb $0x1, %al
jne 0x48135
jmp 0x482bf
movb $0x1, 0x77(%rsp)
movl $0x38, %edi
callq 0xb1f0
movq 0x38(%rsp), %rdx
movq %rax, 0x28(%rsp)
leaq 0x8a560(%rip), %rsi     # 0xd26b5
leaq 0x88(%rsp), %rdi
callq 0xfab0
jmp 0x48164
leaq 0x8a551(%rip), %rdx     # 0xd26bc
leaq 0xa8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xfa60
jmp 0x48182
xorl %eax, %eax
movl %eax, 0x1c(%rsp)
movl %eax, %esi
leaq 0x78(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0xfbe0
movq 0x28(%rsp), %rdi
movl 0x1c(%rsp), %edx
movq 0x20(%rsp), %rcx
leaq 0xa8(%rsp), %rsi
callq 0x35600
jmp 0x481b6
movq 0x28(%rsp), %rdi
movb $0x0, 0x77(%rsp)
leaq 0xcd401(%rip), %rsi     # 0x1155c8
leaq -0x2db5e(%rip), %rdx    # 0x1a670
callq 0xb640
jmp 0x4839e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x4820f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0xb6e8
testb $0x1, 0xcb(%rsp)
jne 0x4821b
jmp 0x48225
movq 0x40(%rsp), %rdi
callq 0xb350
jmp 0x48391
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x48384
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x482a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
jmp 0x4829a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0x78(%rsp), %rdi
callq 0xfc00
leaq 0xa8(%rsp), %rdi
callq 0xb6e8
leaq 0x88(%rsp), %rdi
callq 0xb6e8
testb $0x1, 0x77(%rsp)
jne 0x482b0
jmp 0x482ba
movq 0x28(%rsp), %rdi
callq 0xb2d0
jmp 0x48384
leaq 0x58(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x49680
leaq 0x48(%rsp), %rdi
movq %rdi, 0x8(%rsp)
leaq 0xf8(%rsp), %rsi
callq 0x357f0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x35b80
jmp 0x482f6
leaq 0x48(%rsp), %rdi
callq 0x357d0
leaq 0x58(%rsp), %rdi
movq %rdi, (%rsp)
callq 0x393f0
movq (%rsp), %rdi
movl %eax, %edx
decl %edx
movq 0x110(%rsp), %rcx
xorl %esi, %esi
callq 0x42a30
jmp 0x48327
leaq 0x58(%rsp), %rdi
callq 0x49690
leaq 0xf8(%rsp), %rdi
callq 0x357d0
addq $0x118, %rsp            # imm = 0x118
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0x48(%rsp), %rdi
callq 0x357d0
jmp 0x4837a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xd0(%rsp)
movl %eax, 0xcc(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x49690
leaq 0xf8(%rsp), %rdi
callq 0x357d0
movq 0xd0(%rsp), %rdi
callq 0xb680
nop