// File: /workspace/github_cpp_makefile_star2_O3/Laakeri[P]Triangulator/src/MCS.cpp
// Function: MCS::findShortestPath(Graph const&, int, int, std::vector<int, std::allocator<int>> const&)
vector<int> findShortestPath(const Graph& G, int a, int b, const vector<int>& rmV) {
	assert(a != b);
	d[a] = 1;
	vector<int> bfs;
	bfs.push_back(a);
	int i2 = 0;
	bool fo = false;
	while (i2 < (int)bfs.size()) {
		int x = bfs[i2++];
		for (int nx : G.g[x]) {
			if (d[nx]) continue;
			if (rmV[nx]) continue;
			if (x == a && nx == b) continue;
			if (nx == b) {
				from[nx] = x;
				fo = true;
				bfs.push_back(nx);
				break;
			}
			d[nx] = d[x]+1;
			from[nx] = x;
			bfs.push_back(nx);
		}
		if (fo) break;
	}
	vector<int> ret;
	if (fo) {
		while (b != a) {
			ret.push_back(b);
			b = from[b];
		}
		ret.push_back(a);
	}
	for (int x : bfs) {
		d[x] = 0;
		from[x] = 0;
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, 0x38(%rsp)
movl %edx, 0x4(%rsp)
movl %ecx, 0xc(%rsp)
cmpl %ecx, %edx
je 0x1524f
movq %r8, %r14
movl %ecx, 0x8(%rsp)
movq %rdi, 0x28(%rsp)
movslq %edx, %rax
leaq 0x38f0bb(%rip), %r12    # 0x3a40d0
movl $0x1, (%r12,%rax,4)
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x4(%rsp), %rdx
xorl %esi, %esi
callq 0x92c4
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x2, %rdx
testl %edx, %edx
jle 0x15125
xorl %r13d, %r13d
movl (%rax,%r13,4), %r15d
movslq %r15d, %rsi
movq 0x38(%rsp), %rdx
movq 0x38(%rdx), %rdx
movq %rsi, 0x40(%rsp)
leaq (%rsi,%rsi,2), %rsi
movq (%rdx,%rsi,8), %rbp
movq 0x8(%rdx,%rsi,8), %rbx
cmpq %rbx, %rbp
je 0x1510c
movl (%rbp), %eax
movl %eax, 0x34(%rsp)
movslq %eax, %rcx
cmpl $0x0, (%r12,%rcx,4)
jne 0x150f9
movq (%r14), %rdx
cmpl $0x0, (%rdx,%rcx,4)
jne 0x150f9
cmpl 0x4(%rsp), %r15d
jne 0x150ad
cmpl 0x8(%rsp), %eax
je 0x150f9
cmpl 0x8(%rsp), %eax
je 0x1513d
movq 0x40(%rsp), %rdx
movl (%r12,%rdx,4), %edx
incl %edx
movl %edx, (%r12,%rcx,4)
leaq 0x3bfd43(%rip), %rdx    # 0x3d4e10
movl %r15d, (%rdx,%rcx,4)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x150ea
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x150f9
leaq 0x10(%rsp), %rdi
leaq 0x34(%rsp), %rdx
callq 0x92c4
addq $0x4, %rbp
cmpq %rbx, %rbp
jne 0x15086
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
incq %r13
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x2, %rdx
movslq %edx, %rdx
cmpq %rdx, %r13
jl 0x1505b
xorps %xmm0, %xmm0
movq 0x28(%rsp), %rbx
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
jmp 0x151fc
leaq 0x3bfccc(%rip), %rax    # 0x3d4e10
movl %r15d, (%rax,%rcx,4)
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x1516a
movl 0x8(%rsp), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
movq 0x28(%rsp), %rbx
jmp 0x15182
leaq 0x10(%rsp), %rdi
leaq 0x34(%rsp), %rdx
callq 0x92c4
movq 0x28(%rsp), %rbx
movl 0x8(%rsp), %eax
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
cmpl %eax, 0x4(%rsp)
jne 0x1519a
xorl %esi, %esi
jmp 0x151ef
leaq 0xc(%rsp), %r14
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x151b5
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x151c0
movq %rbx, %rdi
movq %r14, %rdx
callq 0x92c4
movslq 0xc(%rsp), %rax
leaq 0x3bfc44(%rip), %rcx    # 0x3d4e10
movl (%rcx,%rax,4), %eax
movl %eax, 0xc(%rsp)
cmpl 0x4(%rsp), %eax
jne 0x1519f
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x151ef
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x151fc
leaq 0x4(%rsp), %rdx
movq %rbx, %rdi
callq 0x92c4
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1522b
xorl %ecx, %ecx
leaq 0x3bfbfc(%rip), %rdx    # 0x3d4e10
movq %rdi, %rsi
movslq (%rsi), %r8
movl %ecx, (%r12,%r8,4)
movl %ecx, (%rdx,%r8,4)
addq $0x4, %rsi
cmpq %rax, %rsi
jne 0x15217
testq %rdi, %rdi
je 0x1523d
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x14dcc(%rip), %rdi     # 0x2a022
leaq 0x14a82(%rip), %rsi     # 0x29cdf
leaq 0x14dc5(%rip), %rcx     # 0x2a029
movl $0x1b0, %edx            # imm = 0x1B0
callq 0x2140
jmp 0x15297
jmp 0x15274
jmp 0x15297
movq %rax, %r14
movq 0x28(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x1529a
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rsi
subq %rdi, %rsi
callq 0x2210
jmp 0x1529a
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x152b1
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq %r14, %rdi
callq 0x2310