// File: menhits[P]phplus/src/Parser.cpp
// Function: parseSequence(std::vector<std::shared_ptr<TokenData>, std::allocator<std::shared_ptr<TokenData>>> const&, int, int, std::shared_ptr<OperatorData>, std::vector<std::unique_ptr<AstNodeBase, std::default_delete<AstNodeBase>>, std::allocator<std::unique_ptr<AstNodeBase, std::default_delete<AstNodeBase>>>>&)
void parseSequence(const vector<Token>& tokens, int left, int right, Operator splitter, vector<AstNode>& out)
{
	int start=left;
	
	for (int i=left; i<=right; i++)
	{
		if (ops->isOpenBrac(tokens[i]->getOp()))
		{
			i=skipBrace(tokens, i);
		}
		else if (tokens[i]->getOp()==splitter)
		{
			if (start<=i-1)
				out.push_back(parseExpression(tokens, start, i-1));
			start=i+1;
		}
		else if (tokens[i]->getOp() && tokens[i]->getOp()->getPrecedence()==splitter->getPrecedence())
		{
			break;
		}
		else if (tokens[i]->getOp() && tokens[i]->getOp()->getPrecedence()<splitter->getPrecedence())
		{
			out.clear();
			out.push_back(parseExpression(tokens, left, right));
			return;
		}
	}
	
	if (start<=right)
		out.push_back(parseExpression(tokens, start, right));
}

// Assembly:
subq $0x138, %rsp            # imm = 0x138
movq %rcx, 0x70(%rsp)
movq %rdi, 0x130(%rsp)
movl %esi, 0x12c(%rsp)
movl %edx, 0x128(%rsp)
movq %rcx, 0x120(%rsp)
movq %r8, 0x118(%rsp)
movl 0x12c(%rsp), %eax
movl %eax, 0x114(%rsp)
movl 0x12c(%rsp), %eax
movl %eax, 0x110(%rsp)
movl 0x110(%rsp), %eax
cmpl 0x128(%rsp), %eax
jg 0x47fe1
leaq 0xd08ef(%rip), %rax     # 0x1183b8
movq (%rax), %rax
movq %rax, 0x58(%rsp)
movq 0x130(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x48650
movq %rax, %rdi
callq 0x1bb70
movq %rax, %rsi
leaq 0x100(%rsp), %rdi
movq %rdi, 0x60(%rsp)
callq 0x1bc10
movq 0x58(%rsp), %rdi
movq 0x60(%rsp), %rsi
callq 0xf780
movb %al, 0x6f(%rsp)
jmp 0x47b18
leaq 0x100(%rsp), %rdi
callq 0xf9a0
movb 0x6f(%rsp), %al
testb $0x1, %al
jne 0x47b2f
jmp 0x47b75
movq 0x130(%rsp), %rdi
movl 0x110(%rsp), %esi
callq 0x43610
movl %eax, 0x110(%rsp)
jmp 0x47fc9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x100(%rsp), %rdi
callq 0xf9a0
jmp 0x48066
movq 0x130(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x48650
movq %rax, %rdi
callq 0x1bb70
movq %rax, %rsi
leaq 0xe0(%rsp), %rdi
callq 0x1bc10
movq 0x70(%rsp), %rsi
leaq 0xe0(%rsp), %rdi
callq 0xfd20
movb %al, 0x57(%rsp)
leaq 0xe0(%rsp), %rdi
callq 0xf9a0
movb 0x57(%rsp), %al
testb $0x1, %al
jne 0x47bd2
jmp 0x47c7a
movl 0x114(%rsp), %eax
movl 0x110(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jg 0x47c64
movq 0x118(%rsp), %rax
movq %rax, 0x40(%rsp)
movq 0x130(%rsp), %rsi
movl 0x114(%rsp), %edx
movl 0x110(%rsp), %ecx
decl %ecx
leaq 0xd8(%rsp), %rdi
movq %rdi, 0x48(%rsp)
callq 0x443c0
movq 0x40(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x1eac0
jmp 0x47c2f
leaq 0xd8(%rsp), %rdi
callq 0x1b3f0
jmp 0x47c64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0xd8(%rsp), %rdi
callq 0x1b3f0
jmp 0x48066
movl 0x110(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x114(%rsp)
jmp 0x47fc7
movq 0x130(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x48650
movq %rax, %rdi
callq 0x1bb70
movq %rax, %rsi
leaq 0xc8(%rsp), %rdi
callq 0x1bc10
leaq 0xc8(%rsp), %rdi
callq 0x1bef0
movb %al, %cl
movb $0x0, 0xb7(%rsp)
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x3f(%rsp)
jne 0x47ccb
jmp 0x47d46
movq 0x130(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x48650
movq %rax, %rdi
callq 0x1bb70
movq %rax, %rsi
leaq 0xb8(%rsp), %rdi
callq 0x1bc10
jmp 0x47cfa
movb $0x1, 0xb7(%rsp)
leaq 0xb8(%rsp), %rdi
callq 0xf9f0
movq %rax, %rdi
callq 0x48670
movl %eax, 0x38(%rsp)
jmp 0x47d1d
movq 0x70(%rsp), %rdi
callq 0xf9f0
movq %rax, %rdi
callq 0x48670
movl %eax, 0x34(%rsp)
jmp 0x47d35
movl 0x38(%rsp), %eax
movl 0x34(%rsp), %ecx
cmpl %ecx, %eax
sete %al
movb %al, 0x3f(%rsp)
movb 0x3f(%rsp), %al
movb %al, 0x33(%rsp)
testb $0x1, 0xb7(%rsp)
jne 0x47d5a
jmp 0x47d67
leaq 0xb8(%rsp), %rdi
callq 0xf9a0
leaq 0xc8(%rsp), %rdi
callq 0xf9a0
movb 0x33(%rsp), %al
testb $0x1, %al
jne 0x47d7e
jmp 0x47dda
jmp 0x47fe1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x47dc8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
testb $0x1, 0xb7(%rsp)
jne 0x47db9
jmp 0x47dc6
leaq 0xb8(%rsp), %rdi
callq 0xf9a0
jmp 0x47dc8
leaq 0xc8(%rsp), %rdi
callq 0xf9a0
jmp 0x48066
movq 0x130(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x48650
movq %rax, %rdi
callq 0x1bb70
movq %rax, %rsi
leaq 0xa0(%rsp), %rdi
callq 0x1bc10
leaq 0xa0(%rsp), %rdi
callq 0x1bef0
movb %al, %cl
movb $0x0, 0x8f(%rsp)
xorl %eax, %eax
testb $0x1, %cl
movb %al, 0x32(%rsp)
jne 0x47e2b
jmp 0x47ea6
movq 0x130(%rsp), %rdi
movslq 0x110(%rsp), %rsi
callq 0x48650
movq %rax, %rdi
callq 0x1bb70
movq %rax, %rsi
leaq 0x90(%rsp), %rdi
callq 0x1bc10
jmp 0x47e5a
movb $0x1, 0x8f(%rsp)
leaq 0x90(%rsp), %rdi
callq 0xf9f0
movq %rax, %rdi
callq 0x48670
movl %eax, 0x2c(%rsp)
jmp 0x47e7d
movq 0x70(%rsp), %rdi
callq 0xf9f0
movq %rax, %rdi
callq 0x48670
movl %eax, 0x28(%rsp)
jmp 0x47e95
movl 0x2c(%rsp), %eax
movl 0x28(%rsp), %ecx
cmpl %ecx, %eax
setl %al
movb %al, 0x32(%rsp)
movb 0x32(%rsp), %al
movb %al, 0x27(%rsp)
testb $0x1, 0x8f(%rsp)
jne 0x47eba
jmp 0x47ec7
leaq 0x90(%rsp), %rdi
callq 0xf9a0
leaq 0xa0(%rsp), %rdi
callq 0xf9a0
movb 0x27(%rsp), %al
testb $0x1, %al
jne 0x47ee1
jmp 0x47fc3
movq 0x118(%rsp), %rdi
callq 0x491a0
movq 0x118(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x130(%rsp), %rsi
movl 0x12c(%rsp), %edx
movl 0x128(%rsp), %ecx
leaq 0x80(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x443c0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x1eac0
jmp 0x47f34
leaq 0x80(%rsp), %rdi
callq 0x1b3f0
jmp 0x4805e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
jmp 0x47f8b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
testb $0x1, 0x8f(%rsp)
jne 0x47f7c
jmp 0x47f89
leaq 0x90(%rsp), %rdi
callq 0xf9a0
jmp 0x47f8b
leaq 0xa0(%rsp), %rdi
callq 0xf9a0
jmp 0x48066
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x1b3f0
jmp 0x48066
jmp 0x47fc5
jmp 0x47fc7
jmp 0x47fc9
jmp 0x47fcb
movl 0x110(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x110(%rsp)
jmp 0x47aae
movl 0x114(%rsp), %eax
cmpl 0x128(%rsp), %eax
jg 0x4805e
movq 0x118(%rsp), %rax
movq %rax, (%rsp)
movq 0x130(%rsp), %rsi
movl 0x114(%rsp), %edx
movl 0x128(%rsp), %ecx
leaq 0x78(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x443c0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x1eac0
jmp 0x48032
leaq 0x78(%rsp), %rdi
callq 0x1b3f0
jmp 0x4805e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf8(%rsp)
movl %eax, 0xf4(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x1b3f0
jmp 0x48066
addq $0x138, %rsp            # imm = 0x138
retq
movq 0xf8(%rsp), %rdi
callq 0xb680
nopw %cs:(%rax,%rax)