// File: /workspace/github_cpp_makefile_star2_O2/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 $0x58, %rsp
movq %rdi, (%rsp)
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %rsi, 0x10(%rsp)
movq %rcx, 0x8(%rsp)
callq 0xebd1
movq (%r12), %rax
movq 0x8(%r12), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
xorl %edx, %edx
testl %ecx, %ecx
cmovlel %edx, %ecx
leaq 0x4524a0(%rip), %r12    # 0x4625e0
cmpq %rdx, %rcx
je 0x10152
movslq (%rax,%rdx,4), %rsi
movl %edx, (%r12,%rsi,4)
incq %rdx
jmp 0x10140
movq (%rsp), %rax
andq $0x0, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
xorl %eax, %eax
leaq 0x421736(%rip), %r13    # 0x4318a0
leaq 0x3f09ef(%rip), %rbp    # 0x400b60
leaq 0x4831a8(%rip), %rbx    # 0x493320
xorl %r15d, %r15d
movq 0x18(%rsp), %rcx
movq 0x20(%rsp), %rdx
subq %rcx, %rdx
shrq $0x2, %rdx
movslq %edx, %rdx
cmpq %rdx, %r15
jge 0x10336
movl (%rcx,%r15,4), %ecx
movslq %ecx, %rdx
movl %edx, (%r13,%rdx,4)
movl %r15d, (%rbp,%rdx,4)
movq 0x10(%rsp), %rsi
movq 0x38(%rsi), %r9
imulq $0x18, %rdx, %rdx
movq (%r9,%rdx), %rsi
movq %rdx, 0x38(%rsp)
movq 0x8(%r9,%rdx), %rdi
movq 0x8(%rsp), %rdx
movq (%rdx), %rdx
movq %rsi, %r8
cmpq %rdi, %r8
je 0x101fe
movslq (%r8), %r10
movslq (%r12,%r10,4), %r11
cmpq %r11, %r15
jle 0x101f8
cmpl $0x0, (%rdx,%r10,4)
jne 0x101f8
movl %r15d, (%rbp,%r10,4)
cmpl %r10d, (%r13,%r10,4)
jne 0x101f8
movl %ecx, (%r13,%r10,4)
addq $0x4, %r8
jmp 0x101cf
movq 0x8(%rsp), %rdx
movq (%rdx), %r8
movq %rsi, %r10
cmpq %rdi, %r10
je 0x10236
movslq (%r10), %rdx
movslq (%r12,%rdx,4), %r11
cmpq %r11, %r15
jle 0x10230
cmpl $0x0, (%r8,%rdx,4)
jne 0x10230
movslq (%r13,%rdx,4), %r11
movslq (%rbp,%r11,4), %r11
cmpq %r11, %r15
jg 0x1024a
addq $0x4, %r10
jmp 0x10209
movq %rax, %rcx
incq %r15
cmpq %rax, %rcx
je 0x1017b
jmp 0x10339
imulq $0x18, %rdx, %r10
movq (%r9,%r10), %rax
movq %r10, 0x30(%rsp)
movq 0x8(%r9,%r10), %r9
cmpq %r9, %rax
je 0x1028e
movslq (%rax), %r10
cmpl $0x0, (%r8,%r10,4)
jne 0x10273
movl $0x1, (%rbx,%r10,4)
addq $0x4, %rax
jmp 0x1025c
movslq (%rsi), %rax
cmpl $0x0, (%rbx,%rax,4)
je 0x1028a
movl $0x1, (%r8,%rax,4)
addq $0x4, %rsi
cmpq %rdi, %rsi
jne 0x10279
leaq 0x40(%rsp), %r14
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %r8
callq 0xfeec
movq (%rsp), %rdi
movq %r14, %rsi
callq 0x7000
movq %r14, %rdi
callq 0x38e4
movq (%rsp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movq %rcx, %rdx
subq %rax, %rdx
cmpq $0xc, %rdx
jbe 0x1038a
movq 0x10(%rsp), %rdx
movq 0x38(%rdx), %rdx
movq 0x38(%rsp), %rdi
movq (%rdx,%rdi), %rsi
movq 0x8(%rdx,%rdi), %rdi
movq 0x8(%rsp), %r8
movq (%r8), %r8
cmpq %rdi, %rsi
je 0x10312
movslq (%rsi), %r9
cmpl $0x0, (%rbx,%r9,4)
je 0x1030c
andl $0x0, (%r8,%r9,4)
addq $0x4, %rsi
jmp 0x102f8
movq 0x30(%rsp), %rdi
movq (%rdx,%rdi), %rsi
movq 0x8(%rdx,%rdi), %rdx
cmpq %rdx, %rsi
je 0x10239
movslq (%rsi), %rdi
andl $0x0, (%rbx,%rdi,4)
addq $0x4, %rsi
jmp 0x10320
movq %rax, %rcx
subq %rax, %rcx
sete %al
cmpq $0xd, %rcx
setae %cl
orb %al, %cl
je 0x103a9
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
cmpq %rcx, %rax
je 0x1036d
movslq (%rax), %rdx
andl $0x0, (%rbp,%rdx,4)
andl $0x0, (%r13,%rdx,4)
addq $0x4, %rax
jmp 0x10354
leaq 0x18(%rsp), %rdi
callq 0x38e4
movq (%rsp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x10ce8(%rip), %rdi     # 0x21079
leaq 0x10947(%rip), %rsi     # 0x20cdf
leaq 0x10ce9(%rip), %rcx     # 0x21088
movl $0x1f0, %edx            # imm = 0x1F0
callq 0x2150
leaq 0x10cc9(%rip), %rdi     # 0x21079
leaq 0x10928(%rip), %rsi     # 0x20cdf
leaq 0x10cca(%rip), %rcx     # 0x21088
movl $0x1fc, %edx            # imm = 0x1FC
callq 0x2150
movq %rax, %r14
movq (%rsp), %rdi
callq 0x38e4
leaq 0x18(%rsp), %rdi
callq 0x38e4
movq %r14, %rdi
callq 0x2340