// File: /workspace/github_cpp_makefile_star2_O1/menhits[P]phplus/src/Parser.cpp
// Function: skipBrace(std::vector<std::shared_ptr<TokenData>, std::allocator<std::shared_ptr<TokenData>>> const&, int)
int skipBrace(const vector<Token>& tokens, int start)
{
	Operator open, close;
	int step;
	
	Operator op=tokens[start]->getOp();
	
	if (tokens[start]->getOp()==ops->openPeren)
	{
		open=ops->openPeren;
		close=ops->closePeren;
		step=1;
	}
	else if (tokens[start]->getOp()==ops->closePeren)
	{
		open=ops->closePeren;
		close=ops->openPeren;
		step=-1;
	}
	else if (tokens[start]->getOp()==ops->openSqBrac)
	{
		open=ops->openSqBrac;
		close=ops->closeSqBrac;
		step=1;
	}
	else if (tokens[start]->getOp()==ops->closeSqBrac)
	{
		open=ops->closeSqBrac;
		close=ops->openSqBrac;
		step=-1;
	}
	else if (tokens[start]->getOp()==ops->openCrBrac)
	{
		open=ops->openCrBrac;
		close=ops->closeCrBrac;
		step=1;
	}
	else if (tokens[start]->getOp()==ops->closeCrBrac)
	{
		open=ops->closeCrBrac;
		close=ops->openCrBrac;
		step=-1;
	}
	else
	{
		throw PhplusError(FUNC + " called with index that is not a valid brace", INTERNAL_ERROR, tokens[start]);
	}
	
	int c=1;
	int i=start;
	
	while(true)
	{
		i+=step;
		
		if (i>=int(tokens.size()))
		{
			throw PhplusError("no matching brace", SOURCE_ERROR, tokens[start]);
		}
		
		if (tokens[i]->getOp()==open)
		{
			c++;
		}
		else if (tokens[i]->getOp()==close)
		{
			c--;
			
			if (c<=0)
			{
				return i;
			}
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %esi, %ebp
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movslq %esi, %r15
movq %rdi, (%rsp)
movq (%rdi), %rax
movq %r15, %rcx
shlq $0x4, %rcx
movq %rcx, 0x8(%rsp)
movq (%rax,%rcx), %rax
movq 0x48(%rax), %r12
testq %r12, %r12
je 0x27374
movq 0x71c46(%rip), %rax     # 0x98fa8
cmpb $0x0, (%rax)
je 0x2736e
incl 0x8(%r12)
jmp 0x27374
lock
incl 0x8(%r12)
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx), %rax
movq 0x40(%rax), %rbx
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x273a6
movq 0x71c10(%rip), %rax     # 0x98fa8
cmpb $0x0, (%rax)
je 0x273a2
incl 0x8(%rdi)
jmp 0x273a6
lock
incl 0x8(%rdi)
leaq 0x71f5b(%rip), %r13     # 0x99308
movq (%r13), %rax
movq 0x190(%rax), %r14
testq %rdi, %rdi
je 0x273c2
callq 0xdcba
cmpq %r14, %rbx
movq %r12, 0x38(%rsp)
je 0x273fa
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx), %rax
movq 0x40(%rax), %rbx
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x2743e
movq 0x71bb8(%rip), %rax     # 0x98fa8
cmpb $0x0, (%rax)
je 0x2743a
incl 0x8(%rdi)
jmp 0x2743e
movq (%r13), %rsi
movq 0x190(%rsi), %rax
leaq 0x28(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x198, %rsi            # imm = 0x198
callq 0xde72
movq (%r13), %rsi
movq 0x1a0(%rsi), %rax
leaq 0x18(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1a8, %rsi            # imm = 0x1A8
jmp 0x27665
lock
incl 0x8(%rdi)
movq (%r13), %rax
movq 0x1a0(%rax), %r14
testq %rdi, %rdi
je 0x27453
callq 0xdcba
cmpq %r14, %rbx
je 0x27486
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx), %rax
movq 0x40(%rax), %rbx
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x274ca
movq 0x71b2c(%rip), %rax     # 0x98fa8
cmpb $0x0, (%rax)
je 0x274c6
incl 0x8(%rdi)
jmp 0x274ca
movq (%r13), %rsi
movq 0x1a0(%rsi), %rax
leaq 0x28(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1a8, %rsi            # imm = 0x1A8
callq 0xde72
movq (%r13), %rsi
movq 0x190(%rsi), %rax
leaq 0x18(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x198, %rsi            # imm = 0x198
jmp 0x276ce
lock
incl 0x8(%rdi)
movq (%r13), %rax
movq 0x1b0(%rax), %r14
testq %rdi, %rdi
je 0x274df
callq 0xdcba
cmpq %r14, %rbx
je 0x27512
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx), %rax
movq 0x40(%rax), %rbx
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x27556
movq 0x71aa0(%rip), %rax     # 0x98fa8
cmpb $0x0, (%rax)
je 0x27552
incl 0x8(%rdi)
jmp 0x27556
movq (%r13), %rsi
movq 0x1b0(%rsi), %rax
leaq 0x28(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1b8, %rsi            # imm = 0x1B8
callq 0xde72
movq (%r13), %rsi
movq 0x1c0(%rsi), %rax
leaq 0x18(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1c8, %rsi            # imm = 0x1C8
jmp 0x27665
lock
incl 0x8(%rdi)
movq (%r13), %rax
movq 0x1c0(%rax), %r14
testq %rdi, %rdi
je 0x2756b
callq 0xdcba
cmpq %r14, %rbx
je 0x2759e
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx), %rax
movq 0x40(%rax), %rbx
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x275e2
movq 0x71a14(%rip), %rax     # 0x98fa8
cmpb $0x0, (%rax)
je 0x275de
incl 0x8(%rdi)
jmp 0x275e2
movq (%r13), %rsi
movq 0x1c0(%rsi), %rax
leaq 0x28(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1c8, %rsi            # imm = 0x1C8
callq 0xde72
movq (%r13), %rsi
movq 0x1b0(%rsi), %rax
leaq 0x18(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1b8, %rsi            # imm = 0x1B8
jmp 0x276ce
lock
incl 0x8(%rdi)
movq (%r13), %rax
movq 0x1d0(%rax), %r14
testq %rdi, %rdi
je 0x275f7
callq 0xdcba
cmpq %r14, %rbx
je 0x2762a
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx), %rax
movq 0x40(%rax), %rbx
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x27675
movq 0x71988(%rip), %rax     # 0x98fa8
cmpb $0x0, (%rax)
je 0x27671
incl 0x8(%rdi)
jmp 0x27675
movq (%r13), %rsi
movq 0x1d0(%rsi), %rax
leaq 0x28(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1d8, %rsi            # imm = 0x1D8
callq 0xde72
movq (%r13), %rsi
movq 0x1e0(%rsi), %rax
leaq 0x18(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1e8, %rsi            # imm = 0x1E8
callq 0xde72
movl $0x1, %ecx
jmp 0x276d8
lock
incl 0x8(%rdi)
movq (%r13), %rax
movq 0x1e0(%rax), %r14
testq %rdi, %rdi
je 0x2768a
callq 0xdcba
cmpq %r14, %rbx
jne 0x278a9
movq (%r13), %rsi
movq 0x1e0(%rsi), %rax
leaq 0x28(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1e8, %rsi            # imm = 0x1E8
callq 0xde72
movq (%r13), %rsi
movq 0x1d0(%rsi), %rax
leaq 0x18(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1d8, %rsi            # imm = 0x1D8
callq 0xde72
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
addl %ecx, %ebp
movq (%rsp), %rdx
movq (%rdx), %rax
movq 0x8(%rdx), %rdx
subq %rax, %rdx
shrq $0x4, %rdx
cmpl %edx, %ebp
jge 0x277c3
movslq %ecx, %r13
addq %r13, %r15
movq %r15, %rbp
shlq $0x4, %rbp
movq %r13, 0x40(%rsp)
shlq $0x4, %r13
movl $0x1, %r12d
movq (%rax,%rbp), %rax
movq 0x40(%rax), %r14
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x27736
movq 0x71880(%rip), %rax     # 0x98fa8
cmpb $0x0, (%rax)
je 0x27732
incl 0x8(%rdi)
jmp 0x27736
lock
incl 0x8(%rdi)
movq 0x20(%rsp), %rbx
testq %rdi, %rdi
je 0x27745
callq 0xdcba
cmpq %rbx, %r14
je 0x27773
movq (%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbp), %rax
movq 0x40(%rax), %r14
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x2777c
movq 0x7183f(%rip), %rax     # 0x98fa8
cmpb $0x0, (%rax)
je 0x27778
incl 0x8(%rdi)
jmp 0x2777c
incl %r12d
jmp 0x2779d
lock
incl 0x8(%rdi)
movq 0x10(%rsp), %rbx
testq %rdi, %rdi
je 0x2778b
callq 0xdcba
cmpq %rbx, %r14
jne 0x2779d
cmpl $0x1, %r12d
jle 0x2782d
decl %r12d
addq 0x40(%rsp), %r15
movq (%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
subq %rax, %rcx
shrq $0x4, %rcx
movslq %ecx, %rcx
addq %r13, %rbp
cmpq %rcx, %r15
jl 0x27710
movl $0x38, %edi
callq 0xa1b0
movq %rax, %r15
leaq 0x98(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x4fc84(%rip), %rsi     # 0x77467
leaq 0x4fc8e(%rip), %rdx     # 0x77478
leaq 0x88(%rsp), %rdi
callq 0xdf6a
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rdx
movq (%rax,%rdx), %rcx
movq %rcx, 0x48(%rsp)
movq 0x8(%rax,%rdx), %rax
movq %rax, 0x50(%rsp)
testq %rax, %rax
je 0x27872
movq 0x71786(%rip), %rcx     # 0x98fa8
cmpb $0x0, (%rcx)
jne 0x2786f
lock
incl 0x8(%rax)
jmp 0x27872
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x2783c
callq 0xdcba
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2784b
callq 0xdcba
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x2785a
callq 0xdcba
movl %r15d, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
incl 0x8(%rax)
movb $0x1, %bpl
leaq 0x88(%rsp), %rsi
leaq 0x48(%rsp), %rcx
movq %r15, %rdi
xorl %edx, %edx
callq 0x200e4
xorl %ebp, %ebp
leaq 0x6eda3(%rip), %rsi     # 0x96638
leaq -0x12fa4(%rip), %rdx    # 0x148f8
movq %r15, %rdi
callq 0xa4f0
jmp 0x279a1
movl $0x38, %edi
callq 0xa1b0
movq %rax, %r15
leaq 0xb8(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x4fb67(%rip), %rsi     # 0x77430
leaq 0x4fb69(%rip), %rdx     # 0x77439
leaq 0xa8(%rsp), %rdi
callq 0xdf6a
leaq 0x4fb56(%rip), %rsi     # 0x7743a
leaq 0xa8(%rsp), %rdi
callq 0xa560
leaq 0x78(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
jne 0x27911
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
jmp 0x2791e
movq %rdx, 0x68(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x78(%rsp)
movq 0x8(%rax), %rdx
movq %rdx, 0x70(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rdx
movq (%rax,%rdx), %rcx
movq %rcx, 0x58(%rsp)
movq 0x8(%rax,%rdx), %rax
movq %rax, 0x60(%rsp)
testq %rax, %rax
je 0x2796f
movq 0x71647(%rip), %rcx     # 0x98fa8
cmpb $0x0, (%rcx)
jne 0x2796c
lock
incl 0x8(%rax)
jmp 0x2796f
incl 0x8(%rax)
movb $0x1, %bpl
leaq 0x68(%rsp), %rsi
leaq 0x58(%rsp), %rcx
movq %r15, %rdi
movl $0x3, %edx
callq 0x200e4
xorl %ebp, %ebp
leaq 0x6eca6(%rip), %rsi     # 0x96638
leaq -0x130a1(%rip), %rdx    # 0x148f8
movq %r15, %rdi
callq 0xa4f0
movq %rax, %r14
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x279b3
callq 0xdcba
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x279ca
callq 0xa2b0
jmp 0x279ca
movq %rax, %r14
movb $0x1, %bpl
movq 0xa8(%rsp), %rdi
cmpq %r13, %rdi
je 0x279e4
callq 0xa2b0
jmp 0x279e4
movq %rax, %r14
movb $0x1, %bpl
testb %bpl, %bpl
movq %r12, %rbx
jne 0x27a24
jmp 0x27a2c
movq %rax, %r14
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x27a00
callq 0xdcba
movq 0x88(%rsp), %rdi
cmpq %rbx, %rdi
je 0x27a1a
callq 0xa2b0
jmp 0x27a1a
movq %rax, %r14
movb $0x1, %bpl
movq 0x38(%rsp), %rbx
testb %bpl, %bpl
je 0x27a2c
movq %r15, %rdi
callq 0xa240
testq %rbx, %rbx
je 0x27a39
movq %rbx, %rdi
callq 0xdcba
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x27a48
callq 0xdcba
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x27a57
callq 0xdcba
movq %r14, %rdi
callq 0xa510