// File: /workspace/github_cpp_makefile_star2_O2/Laakeri[P]Triangulator/src/minfill.cpp
// Function: MinFill::SolveAtom::findCycle2(Graph const&, int, int, std::vector<int, std::allocator<int>>&)
vector<int> findCycle2(const Graph& G, int x, int y, vector<int>& removedFromB) {
	int bfsBack = 0;
	int tmpBack = 0;
	bfs[bfsBack++] = y;
	d[y] = 1;
	int i2 = 1;
	for (int ny : G.g[y]) {
		if (!del1[ny] && !removedFromB[ny]) {
			d[ny] = 1;
			from[ny] = y;
			bfs[bfsBack++] = ny;
		}
		else if (ny != x) {
			d[ny] = 1;
			tmp[tmpBack++] = ny;
		}
	}
	bool fo = false;
	while (i2 < bfsBack) {
		int t = bfs[i2++];
		for (int nt : G.g[t]) {
			if (d[nt]) continue;
			if (del1[nt]) continue;
			if (nt == x) {
				fo = true;
				from[x] = t;
				bfs[bfsBack++] = nt;
				break;
			}
			d[nt] = d[t]+1;
			from[nt] = t;
			bfs[bfsBack++] = nt;
		}
		if (fo) break;
	}
	vector<int> ret;
	if (fo) {
		while (x != y) {
			ret.push_back(x);
			x = from[x];
		}
		ret.push_back(y);
	}
	for (int i = 0; i < bfsBack; i++) {
		d[bfs[i]] = 0;
		from[bfs[i]] = 0;
	}
	for (int i = 0; i < tmpBack; i++) {
		d[tmp[i]] = 0;
		from[tmp[i]] = 0;
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, 0x10(%rsp)
movl %edx, 0xc(%rsp)
movl %ecx, 0x24(%rsp)
movl %ecx, 0x575fe0(%rip)    # 0x587580
movl %ecx, 0x1c(%rsp)
movslq %ecx, %rax
leaq 0x4e3812(%rip), %r15    # 0x4f4dc0
movl $0x1, (%r15,%rax,4)
movq 0x38(%rsi), %rcx
imulq $0x18, %rax, %rax
movq (%rcx,%rax), %rsi
movq %rcx, 0x28(%rsp)
movq 0x8(%rcx,%rax), %rdi
movq (%r8), %r8
pushq $0x1
popq %rbx
xorl %r13d, %r13d
leaq 0x4b2aa4(%rip), %rcx    # 0x4c4080
leaq 0x51451d(%rip), %r12    # 0x525b00
leaq 0x575f96(%rip), %r9     # 0x587580
leaq 0x5a6ccf(%rip), %r10    # 0x5b82c0
cmpq %rdi, %rsi
je 0x11648
movl (%rsi), %r11d
movslq %r11d, %rax
cmpl $0x0, (%rcx,%rax,4)
jne 0x11609
cmpl $0x0, (%r8,%rax,4)
je 0x11625
cmpl %edx, %r11d
je 0x11642
movl $0x1, (%r15,%rax,4)
movl %r13d, %eax
leal 0x1(%r13), %ebp
movq %r10, %r14
movl %ebp, %r13d
jmp 0x1163c
movl $0x1, (%r15,%rax,4)
movl 0x1c(%rsp), %ebp
movl %ebp, (%r12,%rax,4)
movl %ebx, %eax
incl %ebx
movq %r9, %r14
cltq
movl %r11d, (%r14,%rax,4)
addq $0x4, %rsi
jmp 0x115f1
pushq $0x1
popq %rsi
leaq 0x575f2e(%rip), %rbp    # 0x587580
movslq %ebx, %rdi
cmpq %rdi, %rsi
jge 0x11729
leaq 0x1(%rsi), %rax
movq %rax, 0x30(%rsp)
movl (%rbp,%rsi,4), %eax
movl %eax, 0x20(%rsp)
movslq %eax, %r10
imulq $0x18, %r10, %rax
movq 0x28(%rsp), %r8
movq (%r8,%rax), %r11
movq 0x8(%r8,%rax), %r14
cmpq %r14, %r11
je 0x116c1
movl (%r11), %eax
movslq %eax, %r9
cmpl $0x0, (%r15,%r9,4)
jne 0x116bb
cmpl $0x0, (%rcx,%r9,4)
jne 0x116bb
movslq %ebx, %r8
cmpl %edx, %eax
je 0x116c8
movl (%r15,%r10,4), %ebx
incl %ebx
movl %ebx, (%r15,%r9,4)
movl %r10d, (%r12,%r9,4)
leal 0x1(%r8), %ebx
movl %eax, (%rbp,%r8,4)
addq $0x4, %r11
jmp 0x11684
movq 0x30(%rsp), %rsi
jmp 0x11652
movslq %edx, %rax
movl 0x20(%rsp), %ecx
movl %ecx, (%r12,%rax,4)
leal 0x1(%r8), %ebx
movq 0x10(%rsp), %rax
andq $0x0, 0x10(%rax)
movl %edx, (%rbp,%r8,4)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
cmpq %rdi, %rsi
jge 0x11739
leaq 0xc(%rsp), %r14
cmpl 0x1c(%rsp), %edx
je 0x11718
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x6402
movslq 0xc(%rsp), %rax
movl (%r12,%rax,4), %edx
movl %edx, 0xc(%rsp)
jmp 0x116f6
leaq 0x24(%rsp), %rsi
movq 0x10(%rsp), %rdi
callq 0x6402
jmp 0x11739
xorps %xmm0, %xmm0
movq 0x10(%rsp), %rax
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
xorl %eax, %eax
testl %ebx, %ebx
cmovlel %eax, %ebx
shlq $0x2, %rbx
cmpq %rax, %rbx
je 0x1175d
movslq (%rax,%rbp), %rcx
andl $0x0, (%r15,%rcx,4)
andl $0x0, (%r12,%rcx,4)
addq $0x4, %rax
jmp 0x11744
xorl %eax, %eax
testl %r13d, %r13d
cmovlel %eax, %r13d
shlq $0x2, %r13
leaq 0x5a6b4f(%rip), %rcx    # 0x5b82c0
cmpq %rax, %r13
je 0x1178a
movslq (%rax,%rcx), %rdx
andl $0x0, (%r15,%rdx,4)
andl $0x0, (%r12,%rdx,4)
addq $0x4, %rax
jmp 0x11771
movq 0x10(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x117a0
movq %rax, %r14
movq 0x10(%rsp), %rdi
callq 0x38e4
movq %r14, %rdi
callq 0x2340