// File: /workspace/github_cpp_makefile_star2_O1/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 0x20(%rsp), %r12
movq %r12, %rdi
movq %rsi, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
callq 0x134fd
movq (%r12), %rax
movq 0x8(%r12), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
testl %ecx, %ecx
jle 0x15083
andl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorl %edx, %edx
leaq 0x45355c(%rip), %rsi    # 0x4685d0
movslq (%rax,%rdx,4), %rdi
movl %edx, (%rsi,%rdi,4)
incq %rdx
cmpq %rdx, %rcx
jne 0x15074
xorps %xmm0, %xmm0
movq (%rsp), %rax
movups %xmm0, (%rax)
movq $0x0, 0x10(%rax)
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
testl %ecx, %ecx
movq 0x10(%rsp), %r8
movq 0x8(%rsp), %rsi
jle 0x152e4
xorl %r13d, %r13d
leaq 0x4227ce(%rip), %r9     # 0x437890
leaq 0x3f1a87(%rip), %r10    # 0x406b50
leaq 0x453500(%rip), %r15    # 0x4685d0
leaq 0x40(%rsp), %rdi
leaq 0x484234(%rip), %rbx    # 0x499310
movl (%rax,%r13,4), %ecx
movslq %ecx, %rax
movl %eax, (%r9,%rax,4)
movl %r13d, (%r10,%rax,4)
movq 0x38(%rsi), %rdx
leaq (%rax,%rax,2), %rax
movq (%rdx,%rax,8), %rbp
movq %rax, 0x18(%rsp)
movq 0x8(%rdx,%rax,8), %r14
cmpq %r14, %rbp
je 0x1513c
movq (%r8), %rax
movq %rbp, %r12
movslq (%r12), %rdx
movslq (%r15,%rdx,4), %r11
cmpq %r11, %r13
jle 0x1512d
cmpl $0x0, (%rax,%rdx,4)
jne 0x1512d
movl %r13d, (%r10,%rdx,4)
cmpl %edx, (%r9,%rdx,4)
jne 0x1512d
movl %ecx, (%r9,%rdx,4)
addq $0x4, %r12
cmpq %r14, %r12
jne 0x1510c
jmp 0x1513c
addq $0x4, %rbp
cmpq %r14, %rbp
je 0x152b7
movslq (%rbp), %rdx
movslq (%r15,%rdx,4), %rax
movl $0xb, %r12d
cmpq %rax, %r13
jle 0x152a4
movq (%r8), %rax
cmpl $0x0, (%rax,%rdx,4)
jne 0x152a4
movslq (%r9,%rdx,4), %r11
movslq (%r10,%r11,4), %r11
xorl %r12d, %r12d
cmpq %r11, %r13
jle 0x152a4
movq 0x38(%rsi), %r15
leaq (%rdx,%rdx,2), %r9
movq (%r15,%r9,8), %r10
movq %r9, 0x38(%rsp)
movq 0x8(%r15,%r9,8), %r11
cmpq %r11, %r10
je 0x151b0
movslq (%r10), %r9
cmpl $0x0, (%rax,%r9,4)
jne 0x151aa
movl $0x1, (%rbx,%r9,4)
addq $0x4, %r10
jmp 0x15193
movq 0x18(%rsp), %r10
movq (%r15,%r10,8), %r9
movq 0x8(%r15,%r10,8), %r11
cmpq %r11, %r9
je 0x151db
movslq (%r9), %r10
cmpl $0x0, (%rbx,%r10,4)
je 0x151d5
movl $0x1, (%rax,%r10,4)
addq $0x4, %r9
jmp 0x151be
movl %ecx, %r15d
movq %rdi, %r12
callq 0x14d34
movq (%rsp), %rdi
movq %r12, %rsi
callq 0x8738
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x15209
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq (%rsp), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
cmpq $0xc, %rax
jbe 0x15358
movl %r15d, %ecx
movq 0x8(%rsp), %rsi
movq 0x38(%rsi), %rax
movq 0x18(%rsp), %rdx
movq (%rax,%rdx,8), %r15
movq 0x8(%rax,%rdx,8), %rdx
cmpq %rdx, %r15
movq 0x10(%rsp), %r8
leaq 0x3f1909(%rip), %r10    # 0x406b50
leaq 0x40(%rsp), %rdi
je 0x1526c
movq (%r8), %r9
movslq (%r15), %r11
cmpl $0x0, (%rbx,%r11,4)
je 0x15263
movl $0x0, (%r9,%r11,4)
addq $0x4, %r15
cmpq %rdx, %r15
jne 0x15251
movq 0x38(%rsp), %r9
movq (%rax,%r9,8), %rdx
movq 0x8(%rax,%r9,8), %rax
movl $0xa, %r12d
cmpq %rax, %rdx
je 0x15296
movslq (%rdx), %r9
movl $0x0, (%rbx,%r9,4)
addq $0x4, %rdx
jmp 0x15280
leaq 0x4225f3(%rip), %r9     # 0x437890
leaq 0x45332c(%rip), %r15    # 0x4685d0
cmpl $0xb, %r12d
je 0x15138
testl %r12d, %r12d
je 0x15138
movq (%rsp), %rcx
movq 0x8(%rcx), %rax
cmpq (%rcx), %rax
jne 0x152e4
incq %r13
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r13
jl 0x150dc
movq (%rsp), %rcx
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sete %cl
cmpq $0xd, %rax
setae %al
orb %cl, %al
je 0x15377
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rax
cmpq %rax, %rdi
je 0x15333
leaq 0x3f183d(%rip), %rcx    # 0x406b50
xorl %edx, %edx
leaq 0x422574(%rip), %rsi    # 0x437890
movq %rdi, %r8
movslq (%r8), %r9
movl %edx, (%rcx,%r9,4)
movl %edx, (%rsi,%r9,4)
addq $0x4, %r8
cmpq %rax, %r8
jne 0x1531f
testq %rdi, %rdi
je 0x15345
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x2210
movq (%rsp), %rax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x15d0a(%rip), %rdi     # 0x2b069
leaq 0x15969(%rip), %rsi     # 0x2accf
leaq 0x15d0b(%rip), %rcx     # 0x2b078
movl $0x1f0, %edx            # imm = 0x1F0
callq 0x2140
leaq 0x15ceb(%rip), %rdi     # 0x2b069
leaq 0x1594a(%rip), %rsi     # 0x2accf
leaq 0x15cec(%rip), %rcx     # 0x2b078
movl $0x1fc, %edx            # imm = 0x1FC
callq 0x2140
movq %rax, %r14
movq (%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x153b5
movq (%rsp), %rax
movq 0x10(%rax), %rsi
subq %rdi, %rsi
callq 0x2210
leaq 0x20(%rsp), %rdi
callq 0x250e
movq %r14, %rdi
callq 0x2310