// File: 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
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0xa0(%rbp)
movq %rdi, %rax
movq %rax, -0x98(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x18(%rbp), %eax
je 0x2c1a8
jmp 0x2c1c7
leaq 0x2de43(%rip), %rdi     # 0x59ff2
leaq 0x2daf9(%rip), %rsi     # 0x59caf
movl $0x1b0, %edx            # imm = 0x1B0
leaq 0x2de37(%rip), %rcx     # 0x59ff9
callq 0x31a0
movslq -0x14(%rbp), %rcx
leaq 0x3bcfde(%rip), %rax    # 0x3e91b0
movl $0x1, (%rax,%rcx,4)
leaq -0x38(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0xdf40
movq -0xa8(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0xdff0
jmp 0x2c1fb
movl $0x0, -0x48(%rbp)
movb $0x0, -0x49(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0xac(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x59a0
movq %rax, %rcx
movl -0xac(%rbp), %eax
cmpl %ecx, %eax
jge 0x2c367
movl -0x48(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x48(%rbp)
movslq %eax, %rsi
leaq -0x38(%rbp), %rdi
callq 0x178f0
movl (%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
addq $0x38, %rdi
movslq -0x50(%rbp), %rsi
callq 0xbba0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x6680
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rdi
callq 0x66b0
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0xbbc0
testb $0x1, %al
jne 0x2c28a
jmp 0x2c35a
leaq -0x60(%rbp), %rdi
callq 0xbc00
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
movslq -0x6c(%rbp), %rcx
leaq 0x3bcf0d(%rip), %rax    # 0x3e91b0
cmpl $0x0, (%rax,%rcx,4)
je 0x2c2bf
jmp 0x2c34c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x2c48d
movq -0x20(%rbp), %rdi
movslq -0x6c(%rbp), %rsi
callq 0x17a50
cmpl $0x0, (%rax)
je 0x2c2d3
jmp 0x2c34c
movl -0x50(%rbp), %eax
cmpl -0x14(%rbp), %eax
jne 0x2c2e5
movl -0x6c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0x2c2e5
jmp 0x2c34c
movl -0x6c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jne 0x2c313
movl -0x50(%rbp), %edx
movslq -0x6c(%rbp), %rcx
leaq 0x3edbf5(%rip), %rax    # 0x419ef0
movl %edx, (%rax,%rcx,4)
movb $0x1, -0x49(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x6c(%rbp), %rsi
callq 0xdff0
jmp 0x2c311
jmp 0x2c35a
movslq -0x50(%rbp), %rcx
leaq 0x3bce92(%rip), %rax    # 0x3e91b0
movl (%rax,%rcx,4), %edx
incl %edx
movslq -0x6c(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movl -0x50(%rbp), %edx
movslq -0x6c(%rbp), %rcx
leaq 0x3edbb8(%rip), %rax    # 0x419ef0
movl %edx, (%rax,%rcx,4)
leaq -0x38(%rbp), %rdi
leaq -0x6c(%rbp), %rsi
callq 0xdff0
jmp 0x2c34a
jmp 0x2c34c
leaq -0x60(%rbp), %rdi
callq 0xbc80
jmp 0x2c274
testb $0x1, -0x49(%rbp)
je 0x2c362
jmp 0x2c367
jmp 0x2c206
movq -0xa0(%rbp), %rdi
movb $0x0, -0x6d(%rbp)
callq 0xdf40
testb $0x1, -0x49(%rbp)
je 0x2c3dd
jmp 0x2c37f
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
je 0x2c3c9
movq -0xa0(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0xdff0
jmp 0x2c399
movslq -0x18(%rbp), %rcx
leaq 0x3edb4c(%rip), %rax    # 0x419ef0
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rbp)
jmp 0x2c37f
movq -0xa0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
callq 0x6d30
jmp 0x2c48d
movq -0xa0(%rbp), %rdi
leaq -0x14(%rbp), %rsi
callq 0xdff0
jmp 0x2c3db
jmp 0x2c3dd
leaq -0x38(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
callq 0xe060
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rdi
callq 0xe090
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xe0c0
testb $0x1, %al
jne 0x2c418
jmp 0x2c45e
leaq -0x80(%rbp), %rdi
callq 0xe100
movl (%rax), %eax
movl %eax, -0x8c(%rbp)
movslq -0x8c(%rbp), %rcx
leaq 0x3bcd79(%rip), %rax    # 0x3e91b0
movl $0x0, (%rax,%rcx,4)
movslq -0x8c(%rbp), %rcx
leaq 0x3edaa4(%rip), %rax    # 0x419ef0
movl $0x0, (%rax,%rcx,4)
leaq -0x80(%rbp), %rdi
callq 0xe120
jmp 0x2c402
movb $0x1, -0x6d(%rbp)
testb $0x1, -0x6d(%rbp)
jne 0x2c474
movq -0xa0(%rbp), %rdi
callq 0x6d30
leaq -0x38(%rbp), %rdi
callq 0x6d30
movq -0x98(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
leaq -0x38(%rbp), %rdi
callq 0x6d30
movq -0x40(%rbp), %rdi
callq 0x3480
nop