// File: /workspace/github_cpp_makefile_star2_O3/jkunlin[P]maxclique/main.cpp
// Function: expand(bool, bool const* const*, Vertices&)
void expand(bool MCR, const bool * const * conn, Vertices &V) {
	int min_k;
	Vertices temp;
	size_t i;
	while(!V.empty()) {
		min_k = maxclique.size() > tmpclique.size() ? maxclique.size() - tmpclique.size() : -1;
		if(V.get_color_num() > min_k) {
			i = V.pop();
			tmpclique.push_back(i);
			temp.cut_vertex_from(conn, V, i);
			if(!temp.empty()) {
		//		temp.set_degrees(conn);
		//		MCR ? temp.MCR_sort(conn) : temp.degree_sort();
		//		temp.colo_sort(conn, min_k);
				num++;
				expand(MCR, conn, temp);
			}
			else if (tmpclique.size() > maxclique.size()) {
				std::cout<<"step = "<<num<<" current max size: "<<tmpclique.size()<<std::endl;
				maxclique = tmpclique;
			}
			tmpclique.pop_back();
		}
		else {
			return;
		}
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movq %rsi, %r14
movl %edi, %ebp
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x3e40
movq 0x8(%rbx), %rax
cmpq %rax, (%rbx)
je 0x3db8
movq 0x45dc(%rip), %rsi      # 0x8208
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
leaq 0x10(%rsp), %r13
movzbl %bpl, %r12d
movq 0x45ae(%rip), %rcx      # 0x81f0
subq 0x459f(%rip), %rcx      # 0x81e8
movq %rsi, %rdx
subq 0x45ad(%rip), %rdx      # 0x8200
sarq $0x2, %rcx
sarq $0x2, %rdx
movl %ecx, %edi
subl %edx, %edi
cmpq %rdx, %rcx
cmovbel %r15d, %edi
cmpl %edi, -0x4(%rax)
jl 0x3db8
movl -0x8(%rax), %ebp
addq $-0x8, %rax
movq %rax, 0x8(%rbx)
movl %ebp, 0xc(%rsp)
cmpq 0x458b(%rip), %rsi      # 0x8210
je 0x3c96
movl %ebp, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x4574(%rip)      # 0x8208
jmp 0x3ca7
leaq 0x4563(%rip), %rdi      # 0x8200
leaq 0xc(%rsp), %rdx
callq 0x314a
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0x2608
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x3cdc
incl 0x454f(%rip)            # 0x8218
movl %r12d, %edi
movq %r14, %rsi
movq %r13, %rdx
callq 0x3bf6
jmp 0x3d99
movq 0x4525(%rip), %rax      # 0x8208
subq 0x4516(%rip), %rax      # 0x8200
movq 0x44ff(%rip), %rcx      # 0x81f0
subq 0x44f0(%rip), %rcx      # 0x81e8
cmpq %rcx, %rax
jbe 0x3d99
movl $0x7, %edx
movq 0x42cb(%rip), %rdi      # 0x7fd8
leaq 0x147d(%rip), %rsi      # 0x5191
callq 0x2200
movl 0x44f9(%rip), %esi      # 0x8218
movq 0x42b2(%rip), %rdi      # 0x7fd8
callq 0x2270
movq %rax, %rbp
movl $0x13, %edx
movq %rax, %rdi
leaq 0x145c(%rip), %rsi      # 0x5199
callq 0x2200
movq 0x44bf(%rip), %rsi      # 0x8208
subq 0x44b0(%rip), %rsi      # 0x8200
sarq $0x2, %rsi
movq %rbp, %rdi
callq 0x2130
movq %rax, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x21b0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2140
leaq 0x445b(%rip), %rdi      # 0x81e8
leaq 0x446c(%rip), %rsi      # 0x8200
callq 0x401e
movq 0x4468(%rip), %rsi      # 0x8208
addq $-0x4, %rsi
movq %rsi, 0x445d(%rip)      # 0x8208
movq 0x8(%rbx), %rax
cmpq %rax, (%rbx)
jne 0x3c3b
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3dcf
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3de0
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3dfa
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x2280