// File: /workspace/github_cpp_makefile_star2_O3/Laakeri[P]Triangulator/src/MCS.cpp
// Function: MCS::getChordlessCycle(Graph const&, int, std::vector<int, std::allocator<int>>&)
vector<int> getChordlessCycle(const Graph& G, int sv, vector<int>& rmV) {
	vector<int> order = MCS_L(G, sv, rmV);
	for (int i = 0; i < (int)order.size(); i++) {
		invOrd[order[i]] = i;
	}
	vector<int> ret;
	for (int i = 0; i < (int)order.size(); i++) {
		int w = order[i];
		f[w] = w;
		index[w] = i;
		for (int v : G.g[w]) {
			if (invOrd[v] >= i || rmV[v]) continue;
			index[v] = i;
			if (f[v] == v) f[v] = w;
		}
		for (int v : G.g[w]) {
			if (invOrd[v] >= i || rmV[v]) continue;
			if (index[f[v]] < i) {
				for (int nx : G.g[v]) {
					if (!rmV[nx]) mk[nx] = 1;
				}
				for (int nx : G.g[w]) {
					if (mk[nx]) rmV[nx] = 1;
				}
				ret = findShortestPath(G, v, w, rmV);
				assert(ret.size() > 3);
				for (int nx : G.g[w]) {
					if (mk[nx]) rmV[nx] = 0;
				}
				for (int nx : G.g[v]) {
					mk[nx] = 0;
				}
				break;
			}
		}
		if (ret.size() > 0) break;
	}
	if (ret.size() > 0) assert(ret.size() > 3);
	for (int x : order) {
		index[x] = 0;
		f[x] = 0;
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rsi, %rbx
movq %rdi, %r13
leaq 0x38(%rsp), %r12
movq %r12, %rdi
movq %rcx, 0x10(%rsp)
callq 0x137a2
movq (%r12), %rcx
movq 0x8(%r12), %rax
subq %rcx, %rax
shrq $0x2, %rax
testl %eax, %eax
jle 0x155a7
movl %eax, %edx
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
xorl %esi, %esi
leaq 0x4522c8(%rip), %rbp    # 0x4675d0
movslq (%rcx,%rsi,4), %rdi
movl %esi, (%rbp,%rdi,4)
incq %rsi
cmpq %rsi, %rdx
jne 0x15308
xorps %xmm0, %xmm0
movups %xmm0, (%r13)
movq $0x0, 0x10(%r13)
testl %eax, %eax
jle 0x155af
movq %rbx, 0x18(%rsp)
movq 0x38(%rbx), %r8
xorl %r12d, %r12d
leaq 0x42154d(%rip), %r15    # 0x436890
leaq 0x482fc6(%rip), %rbx    # 0x498310
xorl %r14d, %r14d
movq %r13, 0x8(%rsp)
movl (%rcx,%r12,4), %ecx
movslq %ecx, %rdx
movl %edx, (%r15,%rdx,4)
leaq 0x3f07ec(%rip), %rsi    # 0x405b50
movl %r12d, (%rsi,%rdx,4)
leaq (%rdx,%rdx,2), %r13
movq (%r8,%r13,8), %rsi
movq 0x8(%r8,%r13,8), %rdi
cmpq %rdi, %rsi
je 0x153f8
movq 0x10(%rsp), %rax
movq (%rax), %rdx
movq %rsi, %r11
movslq (%r11), %r9
movslq (%rbp,%r9,4), %r10
cmpq %r10, %r12
jle 0x153ae
cmpl $0x0, (%rdx,%r9,4)
jne 0x153ae
leaq 0x3f07b0(%rip), %r10    # 0x405b50
movl %r12d, (%r10,%r9,4)
cmpl %r9d, (%r15,%r9,4)
jne 0x153ae
movl %ecx, (%r15,%r9,4)
addq $0x4, %r11
cmpq %rdi, %r11
jne 0x15385
cmpq %rdi, %rsi
je 0x153f8
movq 0x10(%rsp), %rax
movq (%rax), %r11
movq %rsi, %r9
movslq (%r9), %rdx
movslq (%rbp,%rdx,4), %r10
cmpq %r10, %r12
jle 0x153ef
cmpl $0x0, (%r11,%rdx,4)
jne 0x153ef
movslq (%r15,%rdx,4), %r10
leaq 0x3f076a(%rip), %rax    # 0x405b50
movslq (%rax,%r10,4), %r10
cmpq %r10, %r12
jg 0x15435
addq $0x4, %r9
cmpq %rdi, %r9
jne 0x153c7
movq 0x8(%rsp), %r13
movq %r14, %rcx
movq 0x8(%r13), %rdx
movq %rcx, %r14
cmpq %rcx, %rdx
jne 0x15573
incq %r12
movq 0x38(%rsp), %rcx
movq 0x40(%rsp), %rsi
subq %rcx, %rsi
shrq $0x2, %rsi
movslq %esi, %rsi
cmpq %rsi, %r12
jl 0x15352
jmp 0x15573
leaq (%rdx,%rdx,2), %rax
movq (%r8,%rax,8), %r9
movq %rax, 0x60(%rsp)
movq 0x8(%r8,%rax,8), %rax
cmpq %rax, %r9
je 0x15464
movslq (%r9), %r10
cmpl $0x0, (%r11,%r10,4)
jne 0x1545e
movl $0x1, (%rbx,%r10,4)
addq $0x4, %r9
jmp 0x15447
movslq (%rsi), %rax
cmpl $0x0, (%rbx,%rax,4)
je 0x15475
movl $0x1, (%r11,%rax,4)
addq $0x4, %rsi
cmpq %rdi, %rsi
jne 0x15464
leaq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %r8
callq 0x14fdc
movq 0x8(%rsp), %rcx
movq 0x10(%rcx), %rsi
movq 0x20(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x28(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %rax, 0x8(%rcx)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
testq %r14, %r14
je 0x154f4
subq %r14, %rsi
movq %r14, %rdi
callq 0x2210
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x154f4
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq 0x58(%rsp), %r9
movq 0x50(%rsp), %rax
subq %r9, %rax
cmpq $0xc, %rax
jbe 0x15611
movq 0x18(%rsp), %rax
movq 0x38(%rax), %r8
movq (%r8,%r13,8), %rcx
movq 0x8(%r8,%r13,8), %rdx
cmpq %rdx, %rcx
movq 0x8(%rsp), %r13
je 0x15548
movq 0x10(%rsp), %rax
movq (%rax), %rsi
movslq (%rcx), %rdi
cmpl $0x0, (%rbx,%rdi,4)
je 0x1553f
movl $0x0, (%rsi,%rdi,4)
addq $0x4, %rcx
cmpq %rdx, %rcx
jne 0x1552f
movq 0x60(%rsp), %rax
movq (%r8,%rax,8), %rcx
movq 0x8(%r8,%rax,8), %rdx
cmpq %rdx, %rcx
je 0x1556b
movslq (%rcx), %rsi
movl $0x0, (%rbx,%rsi,4)
addq $0x4, %rcx
jmp 0x15556
movq %r9, %rcx
jmp 0x15400
movq %r14, (%r13)
subq %r14, %rdx
sete %al
cmpq $0xd, %rdx
setae %cl
orb %al, %cl
jne 0x155b7
leaq 0x14aea(%rip), %rdi     # 0x2a079
leaq 0x14749(%rip), %rsi     # 0x29cdf
leaq 0x14aeb(%rip), %rcx     # 0x2a088
movl $0x1fc, %edx            # imm = 0x1FC
callq 0x2140
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r13)
movq $0x0, (%r13)
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x155ed
leaq 0x3f0583(%rip), %rcx    # 0x405b50
xorl %edx, %edx
leaq 0x4212ba(%rip), %rsi    # 0x436890
movq %rdi, %r8
movslq (%r8), %r9
movl %edx, (%rcx,%r9,4)
movl %edx, (%rsi,%r9,4)
addq $0x4, %r8
cmpq %rax, %r8
jne 0x155d9
testq %rdi, %rdi
je 0x155ff
movq 0x48(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq %r13, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rax
movq %r9, (%rax)
leaq 0x14a59(%rip), %rdi     # 0x2a079
leaq 0x146b8(%rip), %rsi     # 0x29cdf
leaq 0x14a5a(%rip), %rcx     # 0x2a088
movl $0x1f0, %edx            # imm = 0x1F0
callq 0x2140
movq %rax, %rbx
movq 0x8(%rsp), %rax
movq %r14, (%rax)
testq %r14, %r14
je 0x1565c
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rsi
subq %r14, %rsi
movq %r14, %rdi
callq 0x2210
leaq 0x38(%rsp), %rdi
callq 0x253e
movq %rbx, %rdi
callq 0x2310