// File: /workspace/github_cpp_makefile_star2_O1/menhits[P]phplus/src/Parser.cpp
// Function: parseTokenList(std::vector<std::shared_ptr<TokenData>, std::allocator<std::shared_ptr<TokenData>>> const&, int, int, std::vector<std::unique_ptr<AstNodeBase, std::default_delete<AstNodeBase>>, std::allocator<std::unique_ptr<AstNodeBase, std::default_delete<AstNodeBase>>>>&)
void parseTokenList(const vector<Token>& tokens, int left, int right, vector<AstNode>& nodes)
{
	int start=left;
	
	for (int i=left; i<=right; i++)
	{
		if (tokens[i]->getOp()==ops->import)
		{
			if (i==right || tokens[i+1]->getType()!=TokenData::STRING_LITERAL)
			{
				throw PhplusError("'"+ops->import->getText()+"' must be followed by a string literal", SOURCE_ERROR, tokens[i]);
			}
			
			string path=tokens[i+1]->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 (path.size()>0 && path[0]=='"')
				path=path.substr(1, string::npos);
			
			while (path.size()>0 && path[path.size()-1]=='"')
				path=path.substr(0, path.size()-1);
			
			path=tokens[i]->getFile()->getDirPath()+"/"+path;
			
			try
			{
				importFile(nodes, path);
			}
			catch (PhplusError err)
			{
				err.log();
			}
			
			
			i+=2;
			start=i;
		}
		else
		{
			if (ops->isOpenBrac(tokens[i]->getOp()))
			{
				i=skipBrace(tokens, i);
			}
			
			bool tokenTakesRightInput=(tokens[i]->getOp() && tokens[i]->getOp()->takesRightInput());
			int next=i+1;
			bool nextTokenTakesLeftInput=(next<=right && tokens[next]->getOp() && tokens[next]->getOp()->takesLeftInput());
			
			if (i==right || (!tokenTakesRightInput && !nextTokenTakesLeftInput))
			{
				try
				{
					AstNode node=parseExpression(tokens, start, i);
					nodes.push_back(move(node));
				}
				catch (PhplusError err)
				{
					err.log();
				}
				
				start=next;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rcx, 0x48(%rsp)
movl %edx, 0x4(%rsp)
cmpl %edx, %esi
jle 0x26a77
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %esi, %r14d
movq %rdi, %r15
leaq 0x50(%rsp), %r13
movl %esi, %r12d
movq %rdi, 0x8(%rsp)
movslq %r12d, %rbp
movq (%r15), %rax
shlq $0x4, %rbp
movq (%rax,%rbp), %rax
movq 0x40(%rax), %rbx
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x26aba
movq 0x724fc(%rip), %rax     # 0x98fa8
cmpb $0x0, (%rax)
je 0x26ab6
incl 0x8(%rdi)
jmp 0x26aba
lock
incl 0x8(%rdi)
leaq 0x72847(%rip), %rax     # 0x99308
movq (%rax), %rax
movq 0x180(%rax), %r15
testq %rdi, %rdi
je 0x26ad5
callq 0xdcba
cmpq %r15, %rbx
je 0x26b29
leaq 0x72827(%rip), %rax     # 0x99308
movq (%rax), %rdi
movq 0x8(%rsp), %r15
movq (%r15), %rax
movq (%rax,%rbp), %rax
movq 0x40(%rax), %rcx
movq %rcx, 0x88(%rsp)
movq 0x48(%rax), %rax
movq %rax, 0x90(%rsp)
testq %rax, %rax
je 0x26c32
movq 0x72490(%rip), %rcx     # 0x98fa8
cmpb $0x0, (%rcx)
je 0x26c2e
incl 0x8(%rax)
jmp 0x26c32
cmpl 0x4(%rsp), %r12d
leaq 0x60(%rsp), %rbx
movq 0x8(%rsp), %r15
je 0x270bc
movq (%r15), %rax
movq 0x10(%rax,%rbp), %rcx
cmpl $0x4, 0x38(%rcx)
jne 0x270bc
addq %rbp, %rax
movq 0x10(%rax), %rax
leaq 0x20(%rsp), %rcx
movq %rcx, 0x10(%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0xdde2
cmpq $0x0, 0x18(%rsp)
je 0x26be7
movq 0x10(%rsp), %rax
cmpb $0x22, (%rax)
jne 0x26be7
movl $0x1, %edx
movq %r13, %rdi
movq %r14, %rsi
movq $-0x1, %rcx
callq 0xa2f0
movq %r14, %rdi
movq %r13, %rsi
callq 0xa370
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x26b78
callq 0xa2b0
jmp 0x26b78
decq %rcx
movq %r13, %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0xa2f0
movq %r14, %rdi
movq %r13, %rsi
callq 0xa370
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x26be7
callq 0xa2b0
movq 0x18(%rsp), %rcx
testq %rcx, %rcx
je 0x26bfd
movq 0x10(%rsp), %rax
cmpb $0x22, -0x1(%rax,%rcx)
je 0x26bbd
movq (%r15), %rax
movq (%rax,%rbp), %rax
movq 0x20(%rax), %rsi
movq 0x28(%rax), %r14
testq %r14, %r14
je 0x26d5e
movq 0x7238c(%rip), %rax     # 0x98fa8
cmpb $0x0, (%rax)
je 0x26d59
incl 0x8(%r14)
jmp 0x26d5e
lock
incl 0x8(%rax)
leaq 0x88(%rsp), %rsi
callq 0xdb52
movl %eax, %ebp
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x26c53
callq 0xdcba
testb %bpl, %bpl
je 0x26c66
movq %r15, %rdi
movl %r12d, %esi
callq 0x27318
movl %eax, %r12d
movslq %r12d, %rcx
movq (%r15), %rax
shlq $0x4, %rcx
movq (%rax,%rcx), %rdx
movq 0x40(%rdx), %rax
movq 0x48(%rdx), %rbp
testq %rbp, %rbp
je 0x26c96
movq 0x72320(%rip), %rdx     # 0x98fa8
cmpb $0x0, (%rdx)
je 0x26c92
incl 0x8(%rbp)
jmp 0x26c96
lock
incl 0x8(%rbp)
testq %rax, %rax
je 0x26cca
movq (%r15), %rdx
movq (%rdx,%rcx), %rdx
movq 0x40(%rdx), %rcx
movq 0x48(%rdx), %rdx
movq %rdx, 0x40(%rsp)
testq %rdx, %rdx
je 0x26cd7
movq 0x722ed(%rip), %rdx     # 0x98fa8
cmpb $0x0, (%rdx)
je 0x26cce
movq 0x40(%rsp), %rdx
incl 0x8(%rdx)
jmp 0x26cd7
xorl %ebx, %ebx
jmp 0x26ce2
movq 0x40(%rsp), %rdx
lock
incl 0x8(%rdx)
movl 0x28(%rcx), %ecx
decl %ecx
cmpl $0x2, %ecx
setb %bl
testq %rax, %rax
je 0x26cf9
cmpq $0x0, 0x40(%rsp)
je 0x26cf9
movq 0x40(%rsp), %rdi
callq 0xdcba
testq %rbp, %rbp
je 0x26d06
movq %rbp, %rdi
callq 0xdcba
leal 0x1(%r12), %ebp
movb $0x1, %al
cmpl 0x4(%rsp), %r12d
jge 0x26f38
movslq %ebp, %rcx
movq (%r15), %rdx
shlq $0x4, %rcx
movq (%rdx,%rcx), %rsi
movq 0x40(%rsi), %rdx
movq 0x48(%rsi), %rsi
movq %rsi, 0x38(%rsp)
testq %rsi, %rsi
je 0x26f04
movq 0x72265(%rip), %rsi     # 0x98fa8
cmpb $0x0, (%rsi)
je 0x26efb
movq 0x38(%rsp), %rsi
incl 0x8(%rsi)
jmp 0x26f04
lock
incl 0x8(%r14)
leaq 0x108(%rsp), %rbp
movq %rbp, %rdi
callq 0x523e6
movq %rbp, %rdi
leaq 0x53b32(%rip), %rsi     # 0x7a8aa
callq 0xa560
leaq 0xa8(%rsp), %rsi
movq %rsi, 0x98(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x26db1
movq %rdx, 0x98(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xa8(%rsp)
jmp 0x26db7
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0xa0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x98(%rsp), %rdi
callq 0xa110
movq %rbx, 0x50(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x26e0c
movq %rdx, 0x50(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x60(%rsp)
jmp 0x26e12
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, 0x58(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0xa370
movq 0x50(%rsp), %rdi
cmpq %rbx, %rdi
je 0x26e46
callq 0xa2b0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
leaq 0xc8(%rsp), %rbx
je 0x26e68
callq 0xa2b0
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x26e82
callq 0xa2b0
testq %r14, %r14
je 0x26e8f
movq %r14, %rdi
callq 0xdcba
leaq 0xd8(%rsp), %rax
movq %rax, 0xc8(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
movq %rbx, %rdi
callq 0xdde2
movq 0x48(%rsp), %rdi
movq %rbx, %rsi
callq 0x2b20c
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x26edb
callq 0xa2b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x26eef
callq 0xa2b0
addl $0x2, %r12d
movl %r12d, %ebp
jmp 0x26fcd
movq 0x38(%rsp), %rsi
lock
incl 0x8(%rsi)
testq %rdx, %rdx
je 0x26f38
movq (%r15), %rax
movq (%rax,%rcx), %rcx
movq 0x40(%rcx), %rax
movq 0x48(%rcx), %rcx
movq %rcx, 0x30(%rsp)
testq %rcx, %rcx
je 0x26f46
movq 0x7207f(%rip), %rcx     # 0x98fa8
cmpb $0x0, (%rcx)
je 0x26f3d
movq 0x30(%rsp), %rcx
incl 0x8(%rcx)
jmp 0x26f46
xorl %r15d, %r15d
jmp 0x26f53
movq 0x30(%rsp), %rcx
lock
incl 0x8(%rcx)
testl $0xfffffffd, 0x28(%rax) # imm = 0xFFFFFFFD
sete %r15b
xorl %eax, %eax
testb %al, %al
jne 0x26f69
cmpq $0x0, 0x30(%rsp)
je 0x26f69
movq 0x30(%rsp), %rdi
callq 0xdcba
cmpl 0x4(%rsp), %r12d
jge 0x26f82
cmpq $0x0, 0x38(%rsp)
je 0x26f82
movq 0x38(%rsp), %rdi
callq 0xdcba
cmpl 0x4(%rsp), %r12d
je 0x26f98
orb %r15b, %bl
je 0x26f98
movl %r14d, %ebp
movq 0x8(%rsp), %r15
jmp 0x26fcd
movq %r13, %rdi
movq 0x8(%rsp), %r15
movq %r15, %rsi
movl %r14d, %edx
movl %r12d, %ecx
callq 0x27d96
movq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x16a7e
movq 0x50(%rsp), %rsi
testq %rsi, %rsi
je 0x26fcd
movq %r13, %rdi
callq 0x168f8
leal 0x1(%r12), %eax
movl %ebp, %r14d
cmpl 0x4(%rsp), %r12d
movl %eax, %r12d
jl 0x26a8a
jmp 0x26a65
movq %rdx, %r14
movq %rax, %rbx
movq 0x50(%rsp), %rsi
testq %rsi, %rsi
je 0x27000
movq %r13, %rdi
callq 0x168f8
movq $0x0, 0x50(%rsp)
jmp 0x27011
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x27310
movq %rbx, %rdi
callq 0xa380
movq %r13, %rdi
movq %rax, %rsi
callq 0x14d22
movq %rbx, %rdi
callq 0xa170
movq %r13, %rdi
callq 0x20160
movq %r13, %rdi
callq 0x148f8
callq 0xa4c0
jmp 0x26f91
movq %rdx, %r14
movq %rax, %rbx
movq 0xc8(%rsp), %rdi
leaq 0xd8(%rsp), %rax
cmpq %rax, %rdi
je 0x27078
callq 0xa2b0
jmp 0x27078
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x272fc
movq %rbx, %rdi
callq 0xa380
movq %r13, %rdi
movq %rax, %rsi
callq 0x14d22
movq %rbx, %rdi
callq 0xa170
movq %r13, %rdi
callq 0x20160
movq %r13, %rdi
callq 0x148f8
callq 0xa4c0
movq 0x8(%rsp), %r15
jmp 0x26edb
movl $0x38, %edi
callq 0xa1b0
movq %rax, %r15
leaq 0x72238(%rip), %rax     # 0x99308
movq (%rax), %rax
movq 0x180(%rax), %rax
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rcx
movq %rcx, (%rdi)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
callq 0xdde2
leaq 0x541ad(%rip), %rsi     # 0x7b2aa
leaq 0x50(%rsp), %rdi
leaq 0x10(%rsp), %rdx
callq 0x1562b
leaq 0x50472(%rip), %rsi     # 0x77585
leaq 0x50(%rsp), %rdi
callq 0xa560
leaq 0xf8(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x27141
movups (%rcx), %xmm0
movups %xmm0, (%r14)
jmp 0x27154
movq %rdx, 0xe8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0xf8(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0xf0(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbp), %rcx
movq %rcx, 0xb8(%rsp)
movq 0x8(%rax,%rbp), %rax
movq %rax, 0xc0(%rsp)
testq %rax, %rax
je 0x271aa
movq 0x71e0c(%rip), %rcx     # 0x98fa8
cmpb $0x0, (%rcx)
jne 0x271a7
lock
incl 0x8(%rax)
jmp 0x271aa
incl 0x8(%rax)
movb $0x1, %bl
leaq 0xe8(%rsp), %rsi
leaq 0xb8(%rsp), %rcx
movq %r15, %rdi
xorl %edx, %edx
callq 0x200e4
xorl %ebx, %ebx
leaq 0x6f469(%rip), %rsi     # 0x96638
leaq -0x128de(%rip), %rdx    # 0x148f8
movq %r15, %rdi
callq 0xa4f0
jmp 0x272f9
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x148f8
callq 0xa4c0
jmp 0x272fc
jmp 0x27213
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x148f8
callq 0xa4c0
jmp 0x27310
movq %rax, %rdi
callq 0xdcaf
movq %rax, %r12
movq 0xc0(%rsp), %rdi
testq %rdi, %rdi
je 0x27230
callq 0xdcba
movq 0xe8(%rsp), %rdi
cmpq %r14, %rdi
je 0x27249
callq 0xa2b0
jmp 0x27249
movq %rax, %r12
movb $0x1, %bl
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x27264
callq 0xa2b0
jmp 0x27264
movq %rax, %r12
movb $0x1, %bl
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x2729e
callq 0xa2b0
jmp 0x2729e
movq %rax, %rbx
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x272b2
callq 0xa2b0
jmp 0x272b2
movq %rax, %r12
movb $0x1, %bl
testb %bl, %bl
je 0x272aa
movq %r15, %rdi
callq 0xa240
movq %r12, %rbx
jmp 0x27310
movq %rax, %rbx
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x272d1
callq 0xa2b0
jmp 0x272d1
movq %rax, %rbx
testq %r14, %r14
je 0x272fc
movq %r14, %rdi
callq 0xdcba
jmp 0x272fc
movq %rax, %rbx
movq 0x90(%rsp), %rdi
testq %rdi, %rdi
je 0x27310
callq 0xdcba
jmp 0x27310
jmp 0x272f9
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x27310
callq 0xa2b0
movq %rbx, %rdi
callq 0xa510