// File: /workspace/github_cpp_makefile_star2_O2/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 $0x58, %rsp
movq %rsi, 0x40(%rsp)
movl %edx, 0xc(%rsp)
movl %ecx, 0x10(%rsp)
cmpl %ecx, %edx
je 0x100b0
movq %r8, %r14
movl %ecx, %ebp
movq %rdi, %rbx
movslq %edx, %rax
leaq 0x38f1bf(%rip), %r15    # 0x39f0e0
movl $0x1, (%r15,%rax,4)
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0xc(%rsp), %rsi
callq 0x6402
xorl %esi, %esi
leaq 0x3bfed4(%rip), %r12    # 0x3cfe20
movq %rbx, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movq %rcx, %rdx
subq %rax, %rdx
shrq $0x2, %rdx
movslq %edx, %rdx
cmpq %rdx, %rsi
jge 0x10071
movl (%rax,%rsi,4), %ebx
incq %rsi
movq %rsi, 0x48(%rsp)
movslq %ebx, %rdx
movq 0x40(%rsp), %rax
movq 0x38(%rax), %rax
movq %rdx, 0x50(%rsp)
imulq $0x18, %rdx, %rcx
movq (%rax,%rcx), %r13
movq 0x8(%rax,%rcx), %r12
cmpq %r12, %r13
je 0xfff3
movslq (%r13), %rax
movl %eax, 0x14(%rsp)
cmpl $0x0, (%r15,%rax,4)
jne 0xffed
movq (%r14), %rcx
cmpl $0x0, (%rcx,%rax,4)
jne 0xffed
cmpl 0xc(%rsp), %ebx
jne 0xffc1
cmpl %ebp, %eax
je 0xffed
cmpl %ebp, %eax
je 0x10009
movq 0x50(%rsp), %rcx
movl (%r15,%rcx,4), %ecx
incl %ecx
movl %ecx, (%r15,%rax,4)
leaq 0x3bfe45(%rip), %rcx    # 0x3cfe20
movl %ebx, (%rcx,%rax,4)
leaq 0x20(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0x6402
addq $0x4, %r13
jmp 0xff9a
movq 0x18(%rsp), %rbx
leaq 0x3bfe21(%rip), %r12    # 0x3cfe20
movq 0x48(%rsp), %rsi
jmp 0xff51
leaq 0x3bfe10(%rip), %r12    # 0x3cfe20
movl %ebx, (%r12,%rax,4)
leaq 0x20(%rsp), %rdi
leaq 0x14(%rsp), %rsi
callq 0x6402
xorps %xmm0, %xmm0
movq 0x18(%rsp), %rbx
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
leaq 0x10(%rsp), %r14
cmpl 0xc(%rsp), %ebp
je 0x10058
movq %rbx, %rdi
movq %r14, %rsi
callq 0x6402
movslq 0x10(%rsp), %rax
movl (%r12,%rax,4), %ebp
movl %ebp, 0x10(%rsp)
jmp 0x10038
leaq 0xc(%rsp), %rsi
movq %rbx, %rdi
callq 0x6402
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
jmp 0x1008f
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
jmp 0x1008f
movslq (%rax), %rdx
andl $0x0, (%r15,%rdx,4)
andl $0x0, (%r12,%rdx,4)
addq $0x4, %rax
cmpq %rcx, %rax
jne 0x1007e
leaq 0x20(%rsp), %rdi
callq 0x38e4
movq %rbx, %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10f6b(%rip), %rdi     # 0x21022
leaq 0x10c21(%rip), %rsi     # 0x20cdf
leaq 0x10f64(%rip), %rcx     # 0x21029
movl $0x1b0, %edx            # imm = 0x1B0
callq 0x2150
jmp 0x100da
jmp 0x100d5
jmp 0x100d5
movq %rax, %r14
jmp 0x100e7
movq %rax, %r14
movq 0x18(%rsp), %rdi
callq 0x38e4
leaq 0x20(%rsp), %rdi
callq 0x38e4
movq %r14, %rdi
callq 0x2340