// File: /workspace/github_cpp_makefile_star2_O3/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
movq %r12, 0x38(%rsp)
je 0x275b8
movq 0x72a03(%rip), %rcx     # 0x99fa8
cmpb $0x0, (%rcx)
je 0x275d7
incl 0x8(%r12)
movq 0x40(%rax), %r13
movq %r12, %rdi
jmp 0x275fa
movq 0x40(%rax), %r13
leaq 0x72d45(%rip), %rcx     # 0x9a308
movq (%rcx), %rsi
movq 0x190(%rsi), %rcx
cmpq %rcx, %r13
jne 0x27637
jmp 0x2767a
lock
incl 0x8(%r12)
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rdx
movq (%rax,%rdx), %rax
movq 0x40(%rax), %r13
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x275bc
cmpb $0x0, (%rcx)
je 0x27604
incl 0x8(%rdi)
jmp 0x27608
lock
incl 0x8(%rdi)
leaq 0x72cf9(%rip), %rbx     # 0x9a308
movq (%rbx), %rax
movq 0x190(%rax), %r14
callq 0xdce4
cmpq %r14, %r13
je 0x27670
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx), %rax
movq 0x40(%rax), %r13
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x27651
movq 0x72961(%rip), %rax     # 0x99fa8
cmpb $0x0, (%rax)
je 0x276b5
incl 0x8(%rdi)
jmp 0x276b9
leaq 0x72cb0(%rip), %rax     # 0x9a308
movq (%rax), %rsi
movq 0x1a0(%rsi), %rax
cmpq %rax, %r13
jne 0x2770d
jmp 0x277ba
movq (%rbx), %rsi
movq 0x190(%rsi), %rcx
leaq 0x28(%rsp), %rdi
movq %rcx, -0x8(%rdi)
addq $0x198, %rsi            # imm = 0x198
callq 0xdea2
leaq 0x72c72(%rip), %rax     # 0x9a308
movq (%rax), %rsi
movq 0x1a0(%rsi), %rax
leaq 0x18(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1a8, %rsi            # imm = 0x1A8
jmp 0x279c3
lock
incl 0x8(%rdi)
leaq 0x72c48(%rip), %rbx     # 0x9a308
movq (%rbx), %rax
movq 0x1a0(%rax), %r14
callq 0xdce4
cmpq %r14, %r13
je 0x277b0
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx), %rax
movq 0x40(%rax), %r13
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x2770d
movq 0x728ac(%rip), %rax     # 0x99fa8
cmpb $0x0, (%rax)
je 0x277f5
incl 0x8(%rdi)
jmp 0x277f9
leaq 0x72bf4(%rip), %rax     # 0x9a308
movq (%rax), %rsi
movq 0x1b0(%rsi), %rax
cmpq %rax, %r13
je 0x27850
leaq 0x72bda(%rip), %rax     # 0x9a308
movq (%rax), %rsi
movq 0x1c0(%rsi), %rax
cmpq %rax, %r13
je 0x278e6
leaq 0x72bc0(%rip), %rax     # 0x9a308
movq (%rax), %rsi
movq 0x1d0(%rsi), %rax
cmpq %rax, %r13
je 0x2798d
leaq 0x72ba6(%rip), %rax     # 0x9a308
movq (%rax), %rsi
movq 0x1e0(%rsi), %rax
cmpq %rax, %r13
jne 0x27bd8
leaq 0x28(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1e8, %rsi            # imm = 0x1E8
callq 0xdea2
leaq 0x72b77(%rip), %rax     # 0x9a308
movq (%rax), %rsi
movq 0x1d0(%rsi), %rax
leaq 0x18(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1d8, %rsi            # imm = 0x1D8
jmp 0x2791c
movq (%rbx), %rsi
movq 0x1a0(%rsi), %rax
leaq 0x28(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1a8, %rsi            # imm = 0x1A8
callq 0xdea2
leaq 0x72b32(%rip), %rax     # 0x9a308
movq (%rax), %rsi
movq 0x190(%rsi), %rax
leaq 0x18(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x198, %rsi            # imm = 0x198
jmp 0x2791c
lock
incl 0x8(%rdi)
leaq 0x72b08(%rip), %rbx     # 0x9a308
movq (%rbx), %rax
movq 0x1b0(%rax), %r14
callq 0xdce4
cmpq %r14, %r13
je 0x27846
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx), %rax
movq 0x40(%rax), %r13
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x27727
movq 0x7276c(%rip), %rax     # 0x99fa8
cmpb $0x0, (%rax)
je 0x2788b
incl 0x8(%rdi)
jmp 0x2788f
movq (%rbx), %rsi
movq 0x1b0(%rsi), %rax
leaq 0x28(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1b8, %rsi            # imm = 0x1B8
callq 0xdea2
leaq 0x72a9c(%rip), %rax     # 0x9a308
movq (%rax), %rsi
movq 0x1c0(%rsi), %rax
leaq 0x18(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1c8, %rsi            # imm = 0x1C8
jmp 0x279c3
lock
incl 0x8(%rdi)
leaq 0x72a72(%rip), %rbx     # 0x9a308
movq (%rbx), %rax
movq 0x1c0(%rax), %r14
callq 0xdce4
cmpq %r14, %r13
je 0x278dc
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx), %rax
movq 0x40(%rax), %r13
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x27741
movq 0x726d6(%rip), %rax     # 0x99fa8
cmpb $0x0, (%rax)
je 0x2792b
incl 0x8(%rdi)
jmp 0x2792f
movq (%rbx), %rsi
movq 0x1c0(%rsi), %rax
leaq 0x28(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1c8, %rsi            # imm = 0x1C8
callq 0xdea2
leaq 0x72a06(%rip), %rax     # 0x9a308
movq (%rax), %rsi
movq 0x1b0(%rsi), %rax
leaq 0x18(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1b8, %rsi            # imm = 0x1B8
callq 0xdea2
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x279cd
lock
incl 0x8(%rdi)
leaq 0x729d2(%rip), %rbx     # 0x9a308
movq (%rbx), %rax
movq 0x1d0(%rax), %r14
callq 0xdce4
cmpq %r14, %r13
je 0x27983
movq (%rsp), %rax
movq (%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx), %rax
movq 0x40(%rax), %r13
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x2775b
movq 0x72636(%rip), %rax     # 0x99fa8
cmpb $0x0, (%rax)
je 0x27b70
incl 0x8(%rdi)
jmp 0x27b74
movq (%rbx), %rsi
movq 0x1d0(%rsi), %rax
leaq 0x28(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1d8, %rsi            # imm = 0x1D8
callq 0xdea2
leaq 0x7295f(%rip), %rax     # 0x9a308
movq (%rax), %rsi
movq 0x1e0(%rsi), %rax
leaq 0x18(%rsp), %rdi
movq %rax, -0x8(%rdi)
addq $0x1e8, %rsi            # imm = 0x1E8
callq 0xdea2
movl $0x1, %ecx
addl %ecx, %ebp
movq (%rsp), %rdx
movq (%rdx), %rax
movq 0x8(%rdx), %rdx
subq %rax, %rdx
shrq $0x4, %rdx
cmpl %edx, %ebp
jge 0x27ac0
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 0x27a27
movq 0x7258b(%rip), %rax     # 0x99fa8
cmpb $0x0, (%rax)
je 0x27a30
incl 0x8(%rdi)
jmp 0x27a34
cmpq 0x20(%rsp), %r14
jne 0x27a6c
jmp 0x27a75
lock
incl 0x8(%rdi)
movq 0x20(%rsp), %rbx
callq 0xdce4
cmpq %rbx, %r14
je 0x27a75
movq (%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbp), %rax
movq 0x40(%rax), %r14
movq 0x48(%rax), %rdi
testq %rdi, %rdi
je 0x27a6c
movq 0x72546(%rip), %rax     # 0x99fa8
cmpb $0x0, (%rax)
je 0x27a7a
incl 0x8(%rdi)
jmp 0x27a7e
cmpq 0x10(%rsp), %r14
jne 0x27a9a
jmp 0x27a8d
incl %r12d
jmp 0x27a9a
lock
incl 0x8(%rdi)
movq 0x10(%rsp), %rbx
callq 0xdce4
cmpq %rbx, %r14
jne 0x27a9a
cmpl $0x1, %r12d
jle 0x27b2e
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 0x27a05
movl $0x38, %edi
callq 0xa1b0
movq %rax, %r15
leaq 0xb8(%rsp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x50987(%rip), %rsi     # 0x78467
leaq 0x50991(%rip), %rdx     # 0x78478
leaq 0xa8(%rsp), %rdi
callq 0xdfa8
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 0x27ba1
movq 0x72485(%rip), %rcx     # 0x99fa8
cmpb $0x0, (%rcx)
jne 0x27b9e
lock
incl 0x8(%rax)
jmp 0x27ba1
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x27b3d
callq 0xdce4
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x27b4c
callq 0xdce4
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x27b5b
callq 0xdce4
movl %r15d, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
lock
incl 0x8(%rdi)
leaq 0x7278d(%rip), %r14     # 0x9a308
movq (%r14), %rax
movq 0x1e0(%rax), %rbx
callq 0xdce4
cmpq %rbx, %r13
jne 0x27bd8
movq (%r14), %rsi
movq 0x1e0(%rsi), %rax
jmp 0x27775
incl 0x8(%rax)
movb $0x1, %bpl
leaq 0xa8(%rsp), %rsi
leaq 0x48(%rsp), %rcx
movq %r15, %rdi
xorl %edx, %edx
callq 0x203f4
xorl %ebp, %ebp
leaq 0x6fa74(%rip), %rsi     # 0x97638
leaq -0x130a5(%rip), %rdx    # 0x14b26
movq %r15, %rdi
callq 0xa4f0
jmp 0x27cd0
movl $0x38, %edi
callq 0xa1b0
movq %rax, %r15
leaq 0x98(%rsp), %r13
movq %r13, -0x10(%r13)
leaq 0x50838(%rip), %rsi     # 0x78430
leaq 0x5083a(%rip), %rdx     # 0x78439
leaq 0x88(%rsp), %rdi
callq 0xdfa8
leaq 0x50827(%rip), %rsi     # 0x7843a
leaq 0x88(%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 0x27c40
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
jmp 0x27c4d
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 0x27c9e
movq 0x72318(%rip), %rcx     # 0x99fa8
cmpb $0x0, (%rcx)
jne 0x27c9b
lock
incl 0x8(%rax)
jmp 0x27c9e
incl 0x8(%rax)
movb $0x1, %bpl
leaq 0x68(%rsp), %rsi
leaq 0x58(%rsp), %rcx
movq %r15, %rdi
movl $0x3, %edx
callq 0x203f4
xorl %ebp, %ebp
leaq 0x6f977(%rip), %rsi     # 0x97638
leaq -0x131a2(%rip), %rdx    # 0x14b26
movq %r15, %rdi
callq 0xa4f0
movq %rax, %r14
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x27ce2
callq 0xdce4
movq 0x68(%rsp), %rdi
cmpq %rbx, %rdi
je 0x27cf1
callq 0xa2b0
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x27d03
callq 0xa2b0
testb %bpl, %bpl
movq %r12, %rbx
jne 0x27d64
jmp 0x27d6c
movq %rax, %r14
movq 0x88(%rsp), %rdi
cmpq %r13, %rdi
je 0x27d27
callq 0xa2b0
jmp 0x27d27
movq %rax, %r14
movq %r12, %rbx
jmp 0x27d64
movq %rax, %r14
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x27d3e
callq 0xdce4
movq 0xa8(%rsp), %rdi
cmpq %rbx, %rdi
je 0x27d50
callq 0xa2b0
testb %bpl, %bpl
movq 0x38(%rsp), %rbx
jne 0x27d64
jmp 0x27d6c
movq %rax, %r14
movq 0x38(%rsp), %rbx
movq %r15, %rdi
callq 0xa240
testq %rbx, %rbx
je 0x27d79
movq %rbx, %rdi
callq 0xdce4
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x27d88
callq 0xdce4
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x27d97
callq 0xdce4
movq %r14, %rdi
callq 0xa510