// File: /workspace/github_cpp_makefile_star2_O1/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 0x3d76
movq 0x8(%rbx), %rax
cmpq %rax, (%rbx)
je 0x3cee
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
leaq 0x10(%rsp), %r13
movzbl %bpl, %r12d
movq 0x4665(%rip), %rcx      # 0x81e0
subq 0x4656(%rip), %rcx      # 0x81d8
movq 0x466f(%rip), %rsi      # 0x81f8
movq %rsi, %rdx
subq 0x465d(%rip), %rdx      # 0x81f0
sarq $0x2, %rcx
sarq $0x2, %rdx
movl %ecx, %edi
subl %edx, %edi
cmpq %rdx, %rcx
cmovbel %r15d, %edi
cmpl %edi, -0x4(%rax)
jl 0x3cee
movl -0x8(%rax), %ebp
addq $-0x8, %rax
movq %rax, 0x8(%rbx)
movl %ebp, 0xc(%rsp)
cmpq 0x463b(%rip), %rsi      # 0x8200
je 0x3bd6
movl %ebp, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x4624(%rip)      # 0x81f8
jmp 0x3be7
leaq 0x4613(%rip), %rdi      # 0x81f0
leaq 0xc(%rsp), %rdx
callq 0x3072
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movl %ebp, %ecx
callq 0x25f8
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
je 0x3c1c
incl 0x45ff(%rip)            # 0x8208
movl %r12d, %edi
movq %r14, %rsi
movq %r13, %rdx
callq 0x3b36
jmp 0x3cd9
movq 0x45d5(%rip), %rax      # 0x81f8
subq 0x45c6(%rip), %rax      # 0x81f0
movq 0x45af(%rip), %rcx      # 0x81e0
subq 0x45a0(%rip), %rcx      # 0x81d8
cmpq %rcx, %rax
jbe 0x3cd9
movl $0x7, %edx
movq 0x438b(%rip), %rdi      # 0x7fd8
leaq 0x150d(%rip), %rsi      # 0x5161
callq 0x2200
movl 0x45a9(%rip), %esi      # 0x8208
movq 0x4372(%rip), %rdi      # 0x7fd8
callq 0x2270
movq %rax, %rbp
movl $0x13, %edx
movq %rax, %rdi
leaq 0x14ec(%rip), %rsi      # 0x5169
callq 0x2200
movq 0x456f(%rip), %rsi      # 0x81f8
subq 0x4560(%rip), %rsi      # 0x81f0
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 0x450b(%rip), %rdi      # 0x81d8
leaq 0x451c(%rip), %rsi      # 0x81f0
callq 0x3f30
addq $-0x4, 0x4517(%rip)     # 0x81f8
movq 0x8(%rbx), %rax
cmpq %rax, (%rbx)
jne 0x3b74
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3d05
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 0x3d16
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x3d30
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x21e0
movq %rbx, %rdi
callq 0x2280